From 9b313a5f7a3c7d281727df0825ec8ff1aee540fe Mon Sep 17 00:00:00 2001 From: Marco 'Lubber' Wienkoop Date: Thu, 31 Oct 2024 20:41:33 +0100 Subject: [PATCH] feat(types): missing and new option for slider Missing and new types for slider matching the feature s of #3111 --- types/fomantic-ui-slider.d.ts | 56 +++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/types/fomantic-ui-slider.d.ts b/types/fomantic-ui-slider.d.ts index 3ac57cfde9..f54cf9456c 100644 --- a/types/fomantic-ui-slider.d.ts +++ b/types/fomantic-ui-slider.d.ts @@ -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'. @@ -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. @@ -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. @@ -254,6 +296,16 @@ declare namespace FomanticUI { * @default 'smooth' */ smooth: string; + + /** + * @default 'label' + */ + label: string; + + /** + * @default 'active' + */ + active: string; } interface Metadatas {