Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(types): missing and new option for slider #3113

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 54 additions & 2 deletions types/fomantic-ui-slider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,18 @@ declare namespace FomanticUI {
*/
end: number;

/**
* Makes sure that the two thumbs of a range slider always need to have a difference of the given value.
* @default false
*/
minRange: false | number;

/**
* Makes sure that the two thumbs of a range slider don't exceed a difference of the given value.
* @default false
*/
maxRange: false | number;

/**
* The type of label to display for a labeled slider.
* Can be 'number' or 'letter'.
Expand All @@ -91,11 +103,41 @@ declare namespace FomanticUI {
*/
interpretLabel: false | ((value: any) => string);

/**
* String or array of strings to be used for labelType 'letter'
* @default 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
*/
letters: string | string[],

/**
* An array of label values which restrict the displayed labels to only those which are defined
* @default []
*/
restrictedLabels: number[];

/**
* If the selected range labels should be highlighted
* @default false
*/
highlightRange: boolean;

/**
* Whether a tooltip should be shown to the thumb(s) on hover. Will contain the current slider value.
* @default false
*/
showThumbTooltip: boolean;

/**
* Tooltip configuration used when showThumbTooltip is true
* @default false
*/
tooltipConfig: object;

/**
* Show ticks on a labeled slider.
* @default false
*/
showLabelTicks: boolean;
showLabelTicks: boolean | 'always';

/**
* Define smoothness when the slider is moving.
Expand All @@ -107,7 +149,7 @@ declare namespace FomanticUI {
* Whether labels should auto adjust on window resize.
* @default true
*/
autoAdjustLabels: boolean;
autoAdjustLabels: boolean | 'fixed';

/**
* The distance between labels.
Expand Down Expand Up @@ -254,6 +296,16 @@ declare namespace FomanticUI {
* @default 'smooth'
*/
smooth: string;

/**
* @default 'label'
*/
label: string;

/**
* @default 'active'
*/
active: string;
}

interface Metadatas {
Expand Down