@agnos-ui/angular-bootstrap 0.7.0 → 0.8.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agnos-ui-angular.module.d.ts +1 -1
- package/components/collapse/collapse.component.d.ts +8 -0
- package/components/collapse/collapse.gen.d.ts +4 -0
- package/components/slider/slider.component.d.ts +58 -11
- package/components/slider/slider.gen.d.ts +107 -9
- package/fesm2022/agnos-ui-angular-bootstrap.mjs +333 -96
- package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -13,6 +13,6 @@ import * as i11 from "./components/collapse/collapse.component";
|
|
|
13
13
|
import * as i12 from "./components/tree/tree.component";
|
|
14
14
|
export declare class AgnosUIAngularModule {
|
|
15
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<AgnosUIAngularModule, never>;
|
|
16
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective]>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective]>;
|
|
17
17
|
static ɵinj: i0.ɵɵInjectorDeclaration<AgnosUIAngularModule>;
|
|
18
18
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
2
2
|
import type { CollapseWidget } from '@agnos-ui/core-bootstrap/components/collapse';
|
|
3
|
+
import { type OnInit } from '@angular/core';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
5
6
|
* Directive to control the collapse behavior of an element.
|
|
@@ -73,3 +74,10 @@ export declare class CollapseDirective extends BaseWidgetDirective<CollapseWidge
|
|
|
73
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<CollapseDirective, never>;
|
|
74
75
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[auCollapse]", ["auCollapse"], { "animatedOnInit": { "alias": "auAnimatedOnInit"; "required": false; "isSignal": true; }; "animated": { "alias": "auAnimated"; "required": false; "isSignal": true; }; "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "horizontal": { "alias": "auHorizontal"; "required": false; "isSignal": true; }; "visible": { "alias": "auVisible"; "required": false; "isSignal": true; }; "id": { "alias": "auId"; "required": false; "isSignal": true; }; }, { "visibleChange": "auVisibleChange"; "hidden": "auHidden"; "shown": "auShown"; }, never, never, true, never>;
|
|
75
76
|
}
|
|
77
|
+
export declare class CollapseTriggerDirective implements OnInit {
|
|
78
|
+
readonly auCollapseTrigger: import("@angular/core").InputSignal<CollapseDirective>;
|
|
79
|
+
private readonly injector;
|
|
80
|
+
ngOnInit(): Promise<void>;
|
|
81
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CollapseTriggerDirective, never>;
|
|
82
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseTriggerDirective, "[auCollapseTrigger]", never, { "auCollapseTrigger": { "alias": "auCollapseTrigger"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
83
|
+
}
|
|
@@ -134,6 +134,10 @@ export interface CollapseDirectives {
|
|
|
134
134
|
* Directive to apply the collapse.
|
|
135
135
|
*/
|
|
136
136
|
collapseDirective: Directive;
|
|
137
|
+
/**
|
|
138
|
+
* Directive to apply to a trigger;
|
|
139
|
+
*/
|
|
140
|
+
triggerDirective: Directive;
|
|
137
141
|
}
|
|
138
142
|
/**
|
|
139
143
|
* Represents a widget for handling collapse functionality.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { SlotContent } from '@agnos-ui/angular-headless';
|
|
2
2
|
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
3
3
|
import { TemplateRef } from '@angular/core';
|
|
4
|
-
import
|
|
4
|
+
import { type ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import type { SliderContext, SliderSlotHandleContext, SliderSlotLabelContext, SliderSlotTickContext, SliderWidget } from './slider.gen';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
/**
|
|
7
8
|
* Directive to provide a template reference for slider labels.
|
|
@@ -17,7 +18,7 @@ export declare class SliderLabelDirective {
|
|
|
17
18
|
/**
|
|
18
19
|
* Directive representing a handle for a slider component.
|
|
19
20
|
*
|
|
20
|
-
* This directive uses a template reference to render the {@link
|
|
21
|
+
* This directive uses a template reference to render the {@link SliderSlotHandleContext}.
|
|
21
22
|
*/
|
|
22
23
|
export declare class SliderHandleDirective {
|
|
23
24
|
templateRef: TemplateRef<any>;
|
|
@@ -29,6 +30,21 @@ export declare class SliderHandleDirective {
|
|
|
29
30
|
* A constant representing the default slot handle for the slider component.
|
|
30
31
|
*/
|
|
31
32
|
export declare const sliderDefaultSlotHandle: SlotContent<SliderSlotHandleContext>;
|
|
33
|
+
/**
|
|
34
|
+
* Directive representing a tick for a slider component.
|
|
35
|
+
*
|
|
36
|
+
* This directive uses a template reference to render the {@link SliderSlotTickContext}.
|
|
37
|
+
*/
|
|
38
|
+
export declare class SliderTickDirective {
|
|
39
|
+
templateRef: TemplateRef<any>;
|
|
40
|
+
static ngTemplateContextGuard(_dir: SliderTickDirective, context: unknown): context is SliderSlotTickContext;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SliderTickDirective, never>;
|
|
42
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SliderTickDirective, "ng-template[auSliderTick]", never, {}, {}, never, never, true, never>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* A constant representing the default slot tick for the slider component.
|
|
46
|
+
*/
|
|
47
|
+
export declare const sliderDefaultSlotTick: SlotContent<SliderSlotTickContext>;
|
|
32
48
|
/**
|
|
33
49
|
* Directive that provides structure for the slider component.
|
|
34
50
|
*
|
|
@@ -49,7 +65,7 @@ export declare const sliderDefaultSlotStructure: SlotContent<SliderContext>;
|
|
|
49
65
|
* to provide a customizable slider widget. This component allows for various
|
|
50
66
|
* configurations and customizations through its inputs and outputs.
|
|
51
67
|
*/
|
|
52
|
-
export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
|
|
68
|
+
export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> implements ControlValueAccessor {
|
|
53
69
|
/**
|
|
54
70
|
* CSS classes to be applied on the widget main container
|
|
55
71
|
*
|
|
@@ -100,28 +116,35 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
|
|
|
100
116
|
readonly showMinMaxLabels: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
101
117
|
/**
|
|
102
118
|
* Return the value for the 'aria-label' attribute for the handle
|
|
103
|
-
* @param value - value of the handle
|
|
104
119
|
* @param sortedIndex - index of the handle in the sorted list
|
|
105
|
-
* @param index - index of the handle in the original list
|
|
106
120
|
*
|
|
107
121
|
* @defaultValue
|
|
108
122
|
* ```ts
|
|
109
|
-
* (
|
|
123
|
+
* () => 'Value'
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
readonly ariaLabel: import("@angular/core").InputSignal<((sortedIndex: number) => string) | undefined>;
|
|
127
|
+
/**
|
|
128
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
129
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
130
|
+
*
|
|
131
|
+
* @defaultValue
|
|
132
|
+
* ```ts
|
|
133
|
+
* () => ''
|
|
110
134
|
* ```
|
|
111
135
|
*/
|
|
112
|
-
readonly
|
|
136
|
+
readonly ariaLabelledBy: import("@angular/core").InputSignal<((sortedIndex: number) => string) | undefined>;
|
|
113
137
|
/**
|
|
114
138
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
115
139
|
* @param value - value of the handle
|
|
116
140
|
* @param sortedIndex - index of the handle in the sorted list
|
|
117
|
-
* @param index - index of the handle in the original list
|
|
118
141
|
*
|
|
119
142
|
* @defaultValue
|
|
120
143
|
* ```ts
|
|
121
|
-
* (value: number) => ''
|
|
144
|
+
* (value: number) => ''
|
|
122
145
|
* ```
|
|
123
146
|
*/
|
|
124
|
-
readonly ariaValueText: import("@angular/core").InputSignal<((value: number, sortedIndex: number
|
|
147
|
+
readonly ariaValueText: import("@angular/core").InputSignal<((value: number, sortedIndex: number) => string) | undefined>;
|
|
125
148
|
/**
|
|
126
149
|
* If `true` slider value cannot be changed but the slider is still focusable
|
|
127
150
|
*
|
|
@@ -140,6 +163,25 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
|
|
|
140
163
|
* @defaultValue `false`
|
|
141
164
|
*/
|
|
142
165
|
readonly vertical: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
166
|
+
/**
|
|
167
|
+
* If `true` the ticks are displayed on the slider
|
|
168
|
+
*
|
|
169
|
+
* @defaultValue `false`
|
|
170
|
+
*/
|
|
171
|
+
readonly showTicks: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
172
|
+
/**
|
|
173
|
+
* Unit value between the ticks
|
|
174
|
+
* If value is set to `0` the {@link stepSize} is used to space the ticks
|
|
175
|
+
*
|
|
176
|
+
* @defaultValue `0`
|
|
177
|
+
*/
|
|
178
|
+
readonly tickInterval: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
179
|
+
/**
|
|
180
|
+
* If `true` the tick values are displayed on the slider
|
|
181
|
+
*
|
|
182
|
+
* @defaultValue `true`
|
|
183
|
+
*/
|
|
184
|
+
readonly showTickValues: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
143
185
|
/**
|
|
144
186
|
* An event emitted when slider values are changed
|
|
145
187
|
*
|
|
@@ -171,6 +213,11 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
|
|
|
171
213
|
*/
|
|
172
214
|
readonly handle: import("@angular/core").InputSignal<SlotContent<SliderSlotHandleContext>>;
|
|
173
215
|
readonly slotHandleFromContent: import("@angular/core").Signal<SliderHandleDirective | undefined>;
|
|
216
|
+
/**
|
|
217
|
+
* Slot to change the ticks
|
|
218
|
+
*/
|
|
219
|
+
readonly tick: import("@angular/core").InputSignal<SlotContent<SliderSlotTickContext>>;
|
|
220
|
+
readonly slotTickFromContent: import("@angular/core").Signal<SliderTickDirective | undefined>;
|
|
174
221
|
constructor();
|
|
175
222
|
/**
|
|
176
223
|
* Control value accessor methods
|
|
@@ -183,5 +230,5 @@ export declare class SliderComponent extends BaseWidgetDirective<SliderWidget> {
|
|
|
183
230
|
setDisabledState(isDisabled: boolean): void;
|
|
184
231
|
handleBlur(): void;
|
|
185
232
|
static ɵfac: i0.ɵɵFactoryDeclaration<SliderComponent, never>;
|
|
186
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SliderComponent, "[auSlider]", never, { "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "min": { "alias": "auMin"; "required": false; "isSignal": true; }; "max": { "alias": "auMax"; "required": false; "isSignal": true; }; "stepSize": { "alias": "auStepSize"; "required": false; "isSignal": true; }; "values": { "alias": "auValues"; "required": false; "isSignal": true; }; "rtl": { "alias": "auRtl"; "required": false; "isSignal": true; }; "showValueLabels": { "alias": "auShowValueLabels"; "required": false; "isSignal": true; }; "showMinMaxLabels": { "alias": "auShowMinMaxLabels"; "required": false; "isSignal": true; }; "
|
|
233
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SliderComponent, "[auSlider]", never, { "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "min": { "alias": "auMin"; "required": false; "isSignal": true; }; "max": { "alias": "auMax"; "required": false; "isSignal": true; }; "stepSize": { "alias": "auStepSize"; "required": false; "isSignal": true; }; "values": { "alias": "auValues"; "required": false; "isSignal": true; }; "rtl": { "alias": "auRtl"; "required": false; "isSignal": true; }; "showValueLabels": { "alias": "auShowValueLabels"; "required": false; "isSignal": true; }; "showMinMaxLabels": { "alias": "auShowMinMaxLabels"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "auAriaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "auAriaLabelledBy"; "required": false; "isSignal": true; }; "ariaValueText": { "alias": "auAriaValueText"; "required": false; "isSignal": true; }; "readonly": { "alias": "auReadonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "auDisabled"; "required": false; "isSignal": true; }; "vertical": { "alias": "auVertical"; "required": false; "isSignal": true; }; "showTicks": { "alias": "auShowTicks"; "required": false; "isSignal": true; }; "tickInterval": { "alias": "auTickInterval"; "required": false; "isSignal": true; }; "showTickValues": { "alias": "auShowTickValues"; "required": false; "isSignal": true; }; "label": { "alias": "auLabel"; "required": false; "isSignal": true; }; "structure": { "alias": "auStructure"; "required": false; "isSignal": true; }; "handle": { "alias": "auHandle"; "required": false; "isSignal": true; }; "tick": { "alias": "auTick"; "required": false; "isSignal": true; }; }, { "valuesChange": "auValuesChange"; }, ["slotLabelFromContent", "slotStructureFromContent", "slotHandleFromContent", "slotTickFromContent"], never, true, never>;
|
|
187
234
|
}
|
|
@@ -31,6 +31,15 @@ export interface SliderSlotHandleContext extends SliderContext {
|
|
|
31
31
|
*/
|
|
32
32
|
item: SliderHandle;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Represents the context for a slider tick slot
|
|
36
|
+
*/
|
|
37
|
+
export interface SliderSlotTickContext extends SliderContext {
|
|
38
|
+
/**
|
|
39
|
+
* tick context
|
|
40
|
+
*/
|
|
41
|
+
tick: SliderTick;
|
|
42
|
+
}
|
|
34
43
|
/**
|
|
35
44
|
* Represents the state of a slider component.
|
|
36
45
|
*/
|
|
@@ -75,6 +84,10 @@ export interface SliderState {
|
|
|
75
84
|
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
76
85
|
*/
|
|
77
86
|
interactive: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Array of ticks to display on the slider component
|
|
89
|
+
*/
|
|
90
|
+
ticks: SliderTick[];
|
|
78
91
|
/**
|
|
79
92
|
* Minimum value that can be assigned to the slider
|
|
80
93
|
*
|
|
@@ -129,6 +142,12 @@ export interface SliderState {
|
|
|
129
142
|
* @defaultValue `true`
|
|
130
143
|
*/
|
|
131
144
|
showMinMaxLabels: boolean;
|
|
145
|
+
/**
|
|
146
|
+
* If `true` the ticks are displayed on the slider
|
|
147
|
+
*
|
|
148
|
+
* @defaultValue `false`
|
|
149
|
+
*/
|
|
150
|
+
showTicks: boolean;
|
|
132
151
|
/**
|
|
133
152
|
* It `true` slider display is inversed
|
|
134
153
|
*
|
|
@@ -158,6 +177,10 @@ export interface SliderState {
|
|
|
158
177
|
* Slot to change the handlers
|
|
159
178
|
*/
|
|
160
179
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
180
|
+
/**
|
|
181
|
+
* Slot to change the ticks
|
|
182
|
+
*/
|
|
183
|
+
tick: SlotContent<SliderSlotTickContext>;
|
|
161
184
|
}
|
|
162
185
|
/**
|
|
163
186
|
* Represents the properties for the Slider component.
|
|
@@ -165,28 +188,35 @@ export interface SliderState {
|
|
|
165
188
|
export interface SliderProps {
|
|
166
189
|
/**
|
|
167
190
|
* Return the value for the 'aria-label' attribute for the handle
|
|
168
|
-
* @param value - value of the handle
|
|
169
191
|
* @param sortedIndex - index of the handle in the sorted list
|
|
170
|
-
* @param index - index of the handle in the original list
|
|
171
192
|
*
|
|
172
193
|
* @defaultValue
|
|
173
194
|
* ```ts
|
|
174
|
-
* (
|
|
195
|
+
* () => 'Value'
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
ariaLabel: (sortedIndex: number) => string;
|
|
199
|
+
/**
|
|
200
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
201
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
202
|
+
*
|
|
203
|
+
* @defaultValue
|
|
204
|
+
* ```ts
|
|
205
|
+
* () => ''
|
|
175
206
|
* ```
|
|
176
207
|
*/
|
|
177
|
-
|
|
208
|
+
ariaLabelledBy: (sortedIndex: number) => string;
|
|
178
209
|
/**
|
|
179
210
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
180
211
|
* @param value - value of the handle
|
|
181
212
|
* @param sortedIndex - index of the handle in the sorted list
|
|
182
|
-
* @param index - index of the handle in the original list
|
|
183
213
|
*
|
|
184
214
|
* @defaultValue
|
|
185
215
|
* ```ts
|
|
186
|
-
* (value: number) => ''
|
|
216
|
+
* (value: number) => ''
|
|
187
217
|
* ```
|
|
188
218
|
*/
|
|
189
|
-
ariaValueText: (value: number, sortedIndex: number
|
|
219
|
+
ariaValueText: (value: number, sortedIndex: number) => string;
|
|
190
220
|
/**
|
|
191
221
|
* An event emitted when slider values are changed
|
|
192
222
|
*
|
|
@@ -198,6 +228,19 @@ export interface SliderProps {
|
|
|
198
228
|
* ```
|
|
199
229
|
*/
|
|
200
230
|
onValuesChange: (values: number[]) => void;
|
|
231
|
+
/**
|
|
232
|
+
* Unit value between the ticks
|
|
233
|
+
* If value is set to `0` the {@link stepSize} is used to space the ticks
|
|
234
|
+
*
|
|
235
|
+
* @defaultValue `0`
|
|
236
|
+
*/
|
|
237
|
+
tickInterval: number;
|
|
238
|
+
/**
|
|
239
|
+
* If `true` the tick values are displayed on the slider
|
|
240
|
+
*
|
|
241
|
+
* @defaultValue `true`
|
|
242
|
+
*/
|
|
243
|
+
showTickValues: boolean;
|
|
201
244
|
/**
|
|
202
245
|
* Minimum value that can be assigned to the slider
|
|
203
246
|
*
|
|
@@ -252,6 +295,12 @@ export interface SliderProps {
|
|
|
252
295
|
* @defaultValue `true`
|
|
253
296
|
*/
|
|
254
297
|
showMinMaxLabels: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* If `true` the ticks are displayed on the slider
|
|
300
|
+
*
|
|
301
|
+
* @defaultValue `false`
|
|
302
|
+
*/
|
|
303
|
+
showTicks: boolean;
|
|
255
304
|
/**
|
|
256
305
|
* It `true` slider display is inversed
|
|
257
306
|
*
|
|
@@ -281,6 +330,10 @@ export interface SliderProps {
|
|
|
281
330
|
* Slot to change the handlers
|
|
282
331
|
*/
|
|
283
332
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
333
|
+
/**
|
|
334
|
+
* Slot to change the ticks
|
|
335
|
+
*/
|
|
336
|
+
tick: SlotContent<SliderSlotTickContext>;
|
|
284
337
|
}
|
|
285
338
|
/**
|
|
286
339
|
* Represents a slider widget component.
|
|
@@ -354,11 +407,44 @@ export interface SliderHandle {
|
|
|
354
407
|
/**
|
|
355
408
|
* ariaLabel of the handle
|
|
356
409
|
*/
|
|
357
|
-
ariaLabel: string;
|
|
410
|
+
ariaLabel: string | undefined;
|
|
358
411
|
/**
|
|
359
412
|
* ariaValueText of the handle
|
|
360
413
|
*/
|
|
361
|
-
ariaValueText: string;
|
|
414
|
+
ariaValueText: string | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* aria-labelledBy of the handle
|
|
417
|
+
*/
|
|
418
|
+
ariaLabelledBy: string | undefined;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Represents a tick in a slider component.
|
|
422
|
+
*/
|
|
423
|
+
export interface SliderTick {
|
|
424
|
+
/**
|
|
425
|
+
* CSS classes to be applied on the tick
|
|
426
|
+
*/
|
|
427
|
+
className?: string | null;
|
|
428
|
+
/**
|
|
429
|
+
* Visualized optional explanation of the label
|
|
430
|
+
*/
|
|
431
|
+
legend?: string | null;
|
|
432
|
+
/**
|
|
433
|
+
* Position of the tick in percent
|
|
434
|
+
*/
|
|
435
|
+
position: number;
|
|
436
|
+
/**
|
|
437
|
+
* If `true` the tick has selected style
|
|
438
|
+
*/
|
|
439
|
+
selected: boolean;
|
|
440
|
+
/**
|
|
441
|
+
* Value of the tick
|
|
442
|
+
*/
|
|
443
|
+
value: number;
|
|
444
|
+
/**
|
|
445
|
+
* If `true` the tick label is displayed
|
|
446
|
+
*/
|
|
447
|
+
displayLabel: boolean;
|
|
362
448
|
}
|
|
363
449
|
/**
|
|
364
450
|
* Interface representing various directives used in the slider component.
|
|
@@ -410,4 +496,16 @@ export interface SliderDirectives {
|
|
|
410
496
|
handleLabelDisplayDirective: Directive<{
|
|
411
497
|
index: number;
|
|
412
498
|
}>;
|
|
499
|
+
/**
|
|
500
|
+
* Directive to apply to the slider tick
|
|
501
|
+
*/
|
|
502
|
+
tickDirective: Directive<{
|
|
503
|
+
tick: SliderTick;
|
|
504
|
+
}>;
|
|
505
|
+
/**
|
|
506
|
+
* Directive to apply to the slider tick label
|
|
507
|
+
*/
|
|
508
|
+
tickLabelDirective: Directive<{
|
|
509
|
+
tick: SliderTick;
|
|
510
|
+
}>;
|
|
413
511
|
}
|