@agnos-ui/react-bootstrap 0.4.0-next.0 → 0.4.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/{accordion-DnlQmoOX.cjs → accordion-CG9yl3xh.cjs} +10 -8
- package/{accordion-CMbgQzoG.js → accordion-DKdL2Sr3.js} +12 -10
- package/{alert-DKl7HLhb.js → alert-0W1n8ahW.js} +7 -7
- package/{alert-Bn5ooyqK.cjs → alert-DeQRFTm3.cjs} +6 -6
- package/components/accordion/accordion.d.ts +1 -6
- package/components/accordion/accordion.gen.d.ts +77 -5
- package/components/accordion/index.cjs +5 -4
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/index.js +5 -4
- package/components/alert/alert.d.ts +1 -5
- package/components/alert/alert.gen.d.ts +61 -7
- package/components/alert/index.cjs +3 -3
- package/components/alert/index.d.ts +1 -0
- package/components/alert/index.js +3 -3
- package/components/modal/index.cjs +5 -12
- package/components/modal/index.d.ts +1 -0
- package/components/modal/index.js +5 -6
- package/components/modal/modal.d.ts +1 -6
- package/components/modal/modal.gen.d.ts +131 -31
- package/components/pagination/index.cjs +3 -3
- package/components/pagination/index.d.ts +2 -0
- package/components/pagination/index.js +4 -4
- package/components/pagination/pagination.d.ts +1 -6
- package/components/pagination/pagination.gen.d.ts +204 -34
- package/components/progressbar/index.cjs +3 -3
- package/components/progressbar/index.d.ts +1 -0
- package/components/progressbar/index.js +3 -3
- package/components/progressbar/progressbar.d.ts +1 -5
- package/components/progressbar/progressbar.gen.d.ts +56 -3
- package/components/rating/index.cjs +3 -3
- package/components/rating/index.d.ts +1 -0
- package/components/rating/index.js +3 -3
- package/components/rating/rating.d.ts +1 -5
- package/components/rating/rating.gen.d.ts +84 -1
- package/components/select/index.cjs +3 -3
- package/components/select/index.d.ts +1 -0
- package/components/select/index.js +3 -3
- package/components/select/select.d.ts +1 -5
- package/components/select/select.gen.d.ts +121 -1
- package/components/slider/index.cjs +3 -3
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +3 -3
- package/components/slider/slider.d.ts +1 -5
- package/components/slider/slider.gen.d.ts +98 -3
- package/components/toast/index.cjs +3 -3
- package/components/toast/index.d.ts +1 -0
- package/components/toast/index.js +3 -3
- package/components/toast/toast.d.ts +1 -5
- package/components/toast/toast.gen.d.ts +65 -7
- package/config.d.ts +1 -1
- package/index.cjs +31 -37
- package/index.js +35 -35
- package/{modal-Vd0W6U05.cjs → modal-Cyt40iyH.cjs} +20 -17
- package/{modal-B9xclGji.js → modal-qidZ4ghL.js} +21 -18
- package/package.json +3 -3
- package/{pagination-BGHP7K6U.js → pagination-BDq1dOoH.js} +19 -19
- package/{pagination-BO6qrpA6.cjs → pagination-ChA90-py.cjs} +16 -16
- package/{progressbar-D8_F2wYh.js → progressbar-B0keLNtE.js} +10 -10
- package/{progressbar-Bi9aS9jg.cjs → progressbar-Fa1PDviu.cjs} +9 -9
- package/{rating-DRAx20tg.js → rating-CWOEBPWs.js} +7 -7
- package/{rating-DB4Ze-r4.cjs → rating-D5-3ELHv.cjs} +6 -6
- package/{select-CxX_TdVh.cjs → select-C4STYCmG.cjs} +6 -6
- package/{select-CEXxOyRB.js → select-DmgOBdqs.js} +6 -6
- package/{slider-CnK847iw.js → slider-CxodlRoZ.js} +9 -9
- package/{slider-Du37lWVJ.cjs → slider-MNZTN_vu.cjs} +8 -8
- package/{toast-Bvz7Uyrd.js → toast-3amUxqw1.js} +7 -7
- package/{toast-cd5__9Rl.cjs → toast-BXMjE9E3.cjs} +6 -6
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, Directive } from '@agnos-ui/react-headless/types';
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Widget, PropsConfig, Directive } from '@agnos-ui/react-headless/types';
|
|
2
2
|
import type { Placement } from '@floating-ui/dom';
|
|
3
3
|
import type { HasFocus } from '@agnos-ui/react-headless/services/focustrack';
|
|
4
4
|
import type { FloatingUI } from '@agnos-ui/react-headless/services/floatingUI';
|
|
5
|
+
/**
|
|
6
|
+
* Retrieve a shallow copy of the default Select config
|
|
7
|
+
* @returns the default Select config
|
|
8
|
+
*/
|
|
9
|
+
declare const export_getSelectDefaultConfig: () => SelectProps<any>;
|
|
10
|
+
export { export_getSelectDefaultConfig as getSelectDefaultConfig };
|
|
11
|
+
/**
|
|
12
|
+
* A type for the slot context of the pagination widget
|
|
13
|
+
*/
|
|
5
14
|
export type SelectContext<Item> = WidgetSlotContext<SelectWidget<Item>>;
|
|
6
15
|
export type SelectItemContext<Item> = SelectContext<Item> & {
|
|
7
16
|
/**
|
|
@@ -33,84 +42,150 @@ export interface SelectState<Item> {
|
|
|
33
42
|
id: string | undefined;
|
|
34
43
|
/**
|
|
35
44
|
* aria-label used for the input inside the select
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue `'Select'`
|
|
36
47
|
*/
|
|
37
48
|
ariaLabel: string | undefined;
|
|
38
49
|
/**
|
|
39
50
|
* List of selected item ids
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue `[]`
|
|
40
53
|
*/
|
|
41
54
|
selected: Item[];
|
|
42
55
|
/**
|
|
43
56
|
* Filtered text to be display in the filter input
|
|
57
|
+
*
|
|
58
|
+
* @defaultValue `''`
|
|
44
59
|
*/
|
|
45
60
|
filterText: string;
|
|
46
61
|
/**
|
|
47
62
|
* true if the select is disabled
|
|
63
|
+
*
|
|
64
|
+
* @defaultValue `false`
|
|
48
65
|
*/
|
|
49
66
|
disabled: boolean;
|
|
50
67
|
/**
|
|
51
68
|
* true if the select is open
|
|
69
|
+
*
|
|
70
|
+
* @defaultValue `false`
|
|
52
71
|
*/
|
|
53
72
|
open: boolean;
|
|
54
73
|
/**
|
|
55
74
|
* Class to be added on the dropdown menu container
|
|
75
|
+
*
|
|
76
|
+
* @defaultValue `''`
|
|
56
77
|
*/
|
|
57
78
|
menuClassName: string;
|
|
58
79
|
/**
|
|
59
80
|
* Class to be added on menu items
|
|
81
|
+
*
|
|
82
|
+
* @defaultValue `''`
|
|
60
83
|
*/
|
|
61
84
|
menuItemClassName: string;
|
|
62
85
|
/**
|
|
63
86
|
* Class to be added on selected items (displayed in the input zone)
|
|
87
|
+
*
|
|
88
|
+
* @defaultValue `''`
|
|
64
89
|
*/
|
|
65
90
|
badgeClassName: string;
|
|
66
91
|
/**
|
|
67
92
|
* true if a loading process is being done
|
|
93
|
+
*
|
|
94
|
+
* @defaultValue `false`
|
|
68
95
|
*/
|
|
69
96
|
loading: boolean;
|
|
70
97
|
/**
|
|
71
98
|
* CSS classes to be applied on the widget main container
|
|
99
|
+
*
|
|
100
|
+
* @defaultValue `''`
|
|
72
101
|
*/
|
|
73
102
|
className: string;
|
|
74
103
|
/**
|
|
75
104
|
* The template to override the way each badge on the left of the input is displayed.
|
|
76
105
|
* This define the content of the badge inside the badge container.
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue
|
|
108
|
+
* ```ts
|
|
109
|
+
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
110
|
+
* ```
|
|
77
111
|
*/
|
|
78
112
|
badgeLabel: SlotContent<SelectItemContext<Item>>;
|
|
79
113
|
/**
|
|
80
114
|
* The template to override the way each item is displayed in the list.
|
|
81
115
|
* This define the content of the badge inside the badge container.
|
|
116
|
+
*
|
|
117
|
+
* @defaultValue
|
|
118
|
+
* ```ts
|
|
119
|
+
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
120
|
+
* ```
|
|
82
121
|
*/
|
|
83
122
|
itemLabel: SlotContent<SelectItemContext<Item>>;
|
|
84
123
|
}
|
|
85
124
|
export interface SelectProps<Item> {
|
|
86
125
|
/**
|
|
87
126
|
* List of available items for the dropdown
|
|
127
|
+
*
|
|
128
|
+
* @defaultValue `[]`
|
|
88
129
|
*/
|
|
89
130
|
items: Item[];
|
|
90
131
|
/**
|
|
91
132
|
* List of allowed placements for the dropdown.
|
|
92
133
|
* This refers to the [allowedPlacements from floating UI](https://floating-ui.com/docs/autoPlacement#allowedplacements), given the different [Placement possibilities](https://floating-ui.com/docs/computePosition#placement).
|
|
134
|
+
*
|
|
135
|
+
* @defaultValue
|
|
136
|
+
* ```ts
|
|
137
|
+
* ['bottom-start', 'top-start', 'bottom-end', 'top-end']
|
|
138
|
+
* ```
|
|
93
139
|
*/
|
|
94
140
|
allowedPlacements: Placement[];
|
|
95
141
|
/**
|
|
96
142
|
* Custom function to get the id of an item
|
|
97
143
|
* By default, the item is returned
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue
|
|
146
|
+
* ```ts
|
|
147
|
+
* (item: any) => '' + item
|
|
148
|
+
* ```
|
|
98
149
|
*/
|
|
99
150
|
itemIdFn(item: Item): string;
|
|
100
151
|
/**
|
|
101
152
|
* Retrieves navigable elements within an HTML element containing badges and the input.
|
|
153
|
+
*
|
|
154
|
+
* @param node - HTMLElement that contains the badges and the input
|
|
155
|
+
*
|
|
156
|
+
* @defaultValue
|
|
157
|
+
* ```ts
|
|
158
|
+
* (node: HTMLElement) => node.querySelectorAll('.au-select-badge,input')
|
|
159
|
+
* ```
|
|
102
160
|
*/
|
|
103
161
|
navSelector(node: HTMLElement): NodeListOf<HTMLSpanElement | HTMLInputElement>;
|
|
104
162
|
/**
|
|
105
163
|
* Callback called dropdown open state change
|
|
164
|
+
* @param isOpen - updated open state
|
|
165
|
+
*
|
|
166
|
+
* @defaultValue
|
|
167
|
+
* ```ts
|
|
168
|
+
* () => {}
|
|
169
|
+
* ```
|
|
106
170
|
*/
|
|
107
171
|
onOpenChange(isOpen: boolean): void;
|
|
108
172
|
/**
|
|
109
173
|
* Callback called when the text filter change
|
|
174
|
+
* @param text - Filtered text
|
|
175
|
+
*
|
|
176
|
+
* @defaultValue
|
|
177
|
+
* ```ts
|
|
178
|
+
* () => {}
|
|
179
|
+
* ```
|
|
110
180
|
*/
|
|
111
181
|
onFilterTextChange(text: string): void;
|
|
112
182
|
/**
|
|
113
183
|
* Callback called when the selection change
|
|
184
|
+
*
|
|
185
|
+
* @defaultValue
|
|
186
|
+
* ```ts
|
|
187
|
+
* () => {}
|
|
188
|
+
* ```
|
|
114
189
|
*/
|
|
115
190
|
onSelectedChange(selected: Item[]): void;
|
|
116
191
|
/**
|
|
@@ -119,56 +194,93 @@ export interface SelectProps<Item> {
|
|
|
119
194
|
id: string | undefined;
|
|
120
195
|
/**
|
|
121
196
|
* aria-label used for the input inside the select
|
|
197
|
+
*
|
|
198
|
+
* @defaultValue `'Select'`
|
|
122
199
|
*/
|
|
123
200
|
ariaLabel: string | undefined;
|
|
124
201
|
/**
|
|
125
202
|
* List of selected item ids
|
|
203
|
+
*
|
|
204
|
+
* @defaultValue `[]`
|
|
126
205
|
*/
|
|
127
206
|
selected: Item[];
|
|
128
207
|
/**
|
|
129
208
|
* Filtered text to be display in the filter input
|
|
209
|
+
*
|
|
210
|
+
* @defaultValue `''`
|
|
130
211
|
*/
|
|
131
212
|
filterText: string;
|
|
132
213
|
/**
|
|
133
214
|
* true if the select is disabled
|
|
215
|
+
*
|
|
216
|
+
* @defaultValue `false`
|
|
134
217
|
*/
|
|
135
218
|
disabled: boolean;
|
|
136
219
|
/**
|
|
137
220
|
* true if the select is open
|
|
221
|
+
*
|
|
222
|
+
* @defaultValue `false`
|
|
138
223
|
*/
|
|
139
224
|
open: boolean;
|
|
140
225
|
/**
|
|
141
226
|
* Class to be added on the dropdown menu container
|
|
227
|
+
*
|
|
228
|
+
* @defaultValue `''`
|
|
142
229
|
*/
|
|
143
230
|
menuClassName: string;
|
|
144
231
|
/**
|
|
145
232
|
* Class to be added on menu items
|
|
233
|
+
*
|
|
234
|
+
* @defaultValue `''`
|
|
146
235
|
*/
|
|
147
236
|
menuItemClassName: string;
|
|
148
237
|
/**
|
|
149
238
|
* Class to be added on selected items (displayed in the input zone)
|
|
239
|
+
*
|
|
240
|
+
* @defaultValue `''`
|
|
150
241
|
*/
|
|
151
242
|
badgeClassName: string;
|
|
152
243
|
/**
|
|
153
244
|
* true if a loading process is being done
|
|
245
|
+
*
|
|
246
|
+
* @defaultValue `false`
|
|
154
247
|
*/
|
|
155
248
|
loading: boolean;
|
|
156
249
|
/**
|
|
157
250
|
* CSS classes to be applied on the widget main container
|
|
251
|
+
*
|
|
252
|
+
* @defaultValue `''`
|
|
158
253
|
*/
|
|
159
254
|
className: string;
|
|
160
255
|
/**
|
|
161
256
|
* The template to override the way each badge on the left of the input is displayed.
|
|
162
257
|
* This define the content of the badge inside the badge container.
|
|
258
|
+
*
|
|
259
|
+
* @defaultValue
|
|
260
|
+
* ```ts
|
|
261
|
+
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
262
|
+
* ```
|
|
163
263
|
*/
|
|
164
264
|
badgeLabel: SlotContent<SelectItemContext<Item>>;
|
|
165
265
|
/**
|
|
166
266
|
* The template to override the way each item is displayed in the list.
|
|
167
267
|
* This define the content of the badge inside the badge container.
|
|
268
|
+
*
|
|
269
|
+
* @defaultValue
|
|
270
|
+
* ```ts
|
|
271
|
+
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
272
|
+
* ```
|
|
168
273
|
*/
|
|
169
274
|
itemLabel: SlotContent<SelectItemContext<Item>>;
|
|
170
275
|
}
|
|
171
276
|
export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectActions<Item>, SelectDirectives<Item>>;
|
|
277
|
+
/**
|
|
278
|
+
* Creates a new select widget instance.
|
|
279
|
+
* @param config - config of the modal, either as a store or as an object containing values or stores.
|
|
280
|
+
* @returns a new select widget instance
|
|
281
|
+
*/
|
|
282
|
+
declare const export_createSelect: <Item>(config?: PropsConfig<SelectProps<Item>>) => SelectWidget<Item>;
|
|
283
|
+
export { export_createSelect as createSelect };
|
|
172
284
|
export interface ItemContext<T> {
|
|
173
285
|
/**
|
|
174
286
|
* Original item given in the parameters
|
|
@@ -217,14 +329,18 @@ export interface SelectApi<Item> {
|
|
|
217
329
|
/**
|
|
218
330
|
* Select the provided item.
|
|
219
331
|
* The selected list is used to
|
|
332
|
+
* @param item - the item to select
|
|
220
333
|
*/
|
|
221
334
|
select(item: Item): void;
|
|
222
335
|
/**
|
|
223
336
|
* Unselect the provided item.
|
|
337
|
+
* @param item - the item to unselect
|
|
224
338
|
*/
|
|
225
339
|
unselect(item: Item): void;
|
|
226
340
|
/**
|
|
227
341
|
* Toggle the selection of an item
|
|
342
|
+
* @param item - the item to toggle
|
|
343
|
+
* @param selected - an optional boolean to enforce the selected/unselected state instead of toggling
|
|
228
344
|
*/
|
|
229
345
|
toggleItem(item: Item, selected?: boolean): void;
|
|
230
346
|
/**
|
|
@@ -237,6 +353,7 @@ export interface SelectApi<Item> {
|
|
|
237
353
|
close(): void;
|
|
238
354
|
/**
|
|
239
355
|
* Toggle the dropdown menu
|
|
356
|
+
* @param isOpen - If specified, set the menu in the defined state.
|
|
240
357
|
*/
|
|
241
358
|
toggle(isOpen?: boolean): void;
|
|
242
359
|
}
|
|
@@ -288,6 +405,9 @@ export interface SelectActions<Item> {
|
|
|
288
405
|
onInputKeydown: (event: KeyboardEvent) => void;
|
|
289
406
|
/**
|
|
290
407
|
* Method to be plugged to on an keydown event of a badge container, in order to manage main actions on badges.
|
|
408
|
+
*
|
|
409
|
+
* @param event - keyboard event
|
|
410
|
+
* @param item - corresponding item
|
|
291
411
|
*/
|
|
292
412
|
onBadgeKeydown: (event: KeyboardEvent, item: Item) => void;
|
|
293
413
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const slider = require("../../slider-
|
|
3
|
+
const slider = require("../../slider-MNZTN_vu.cjs");
|
|
4
4
|
exports.DefaultSlotHandle = slider.DefaultSlotHandle;
|
|
5
5
|
exports.DefaultSlotStructure = slider.DefaultSlotStructure;
|
|
6
6
|
exports.Slider = slider.Slider;
|
|
7
|
-
exports.createSlider = slider.
|
|
8
|
-
exports.getSliderDefaultConfig = slider.
|
|
7
|
+
exports.createSlider = slider.export_createSlider;
|
|
8
|
+
exports.getSliderDefaultConfig = slider.export_getSliderDefaultConfig;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D, a, S,
|
|
1
|
+
import { D, a, S, b, e } from "../../slider-CxodlRoZ.js";
|
|
2
2
|
export {
|
|
3
3
|
D as DefaultSlotHandle,
|
|
4
4
|
a as DefaultSlotStructure,
|
|
5
5
|
S as Slider,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
b as createSlider,
|
|
7
|
+
e as getSliderDefaultConfig
|
|
8
8
|
};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type { WidgetFactory } from '@agnos-ui/react-headless/types';
|
|
2
1
|
import type { PropsWithChildren } from 'react';
|
|
3
|
-
import type {
|
|
4
|
-
export type * from './slider.gen';
|
|
5
|
-
export declare const createSlider: WidgetFactory<SliderWidget>;
|
|
6
|
-
export declare const getSliderDefaultConfig: () => SliderProps;
|
|
2
|
+
import type { SliderContext, SliderProps, SliderSlotHandleContext } from './slider.gen';
|
|
7
3
|
export declare const DefaultSlotHandle: (slotContext: SliderSlotHandleContext) => import("react/jsx-runtime").JSX.Element;
|
|
8
4
|
export declare const DefaultSlotStructure: (slotContext: SliderContext) => import("react/jsx-runtime").JSX.Element;
|
|
9
5
|
export declare function Slider(props: PropsWithChildren<Partial<SliderProps>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, Directive } from '@agnos-ui/react-headless/types';
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive } from '@agnos-ui/react-headless/types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Slider config
|
|
4
|
+
* @returns the default Slider config
|
|
5
|
+
*/
|
|
6
|
+
declare const export_getSliderDefaultConfig: () => SliderProps;
|
|
7
|
+
export { export_getSliderDefaultConfig as getSliderDefaultConfig };
|
|
2
8
|
export type SliderContext = WidgetSlotContext<SliderWidget>;
|
|
3
9
|
export type SliderSlotLabelContext = SliderContext & {
|
|
4
10
|
value: number;
|
|
@@ -49,46 +55,68 @@ export interface SliderState {
|
|
|
49
55
|
interactive: boolean;
|
|
50
56
|
/**
|
|
51
57
|
* Minimum value that can be assigned to the slider
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue `0`
|
|
52
60
|
*/
|
|
53
61
|
min: number;
|
|
54
62
|
/**
|
|
55
63
|
* Maximum value that can be assigned to the slider
|
|
64
|
+
*
|
|
65
|
+
* @defaultValue `100`
|
|
56
66
|
*/
|
|
57
67
|
max: number;
|
|
58
68
|
/**
|
|
59
69
|
* Unit value between slider steps
|
|
70
|
+
*
|
|
71
|
+
* @defaultValue `1`
|
|
60
72
|
*/
|
|
61
73
|
stepSize: number;
|
|
62
74
|
/**
|
|
63
75
|
* If `true` slider value cannot be changed but the slider is still focusable
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue `false`
|
|
64
78
|
*/
|
|
65
79
|
readonly: boolean;
|
|
66
80
|
/**
|
|
67
81
|
* If `true` slider value cannot be changed and the slider cannot be focused
|
|
82
|
+
*
|
|
83
|
+
* @defaultValue `false`
|
|
68
84
|
*/
|
|
69
85
|
disabled: boolean;
|
|
70
86
|
/**
|
|
71
87
|
* If `true` is vertically positioned otherwise it is horizontal
|
|
88
|
+
*
|
|
89
|
+
* @defaultValue `false`
|
|
72
90
|
*/
|
|
73
91
|
vertical: boolean;
|
|
74
92
|
/**
|
|
75
93
|
* Current slider values
|
|
94
|
+
*
|
|
95
|
+
* @defaultValue `[0]`
|
|
76
96
|
*/
|
|
77
97
|
values: number[];
|
|
78
98
|
/**
|
|
79
99
|
* If `true` the value labels are displayed on the slider
|
|
100
|
+
*
|
|
101
|
+
* @defaultValue `true`
|
|
80
102
|
*/
|
|
81
103
|
showValueLabels: boolean;
|
|
82
104
|
/**
|
|
83
105
|
* If `true` the min and max labels are displayed on the slider
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue `true`
|
|
84
108
|
*/
|
|
85
109
|
showMinMaxLabels: boolean;
|
|
86
110
|
/**
|
|
87
111
|
* It `true` slider display is inversed
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue `false`
|
|
88
114
|
*/
|
|
89
115
|
rtl: boolean;
|
|
90
116
|
/**
|
|
91
117
|
* CSS classes to be applied on the widget main container
|
|
118
|
+
*
|
|
119
|
+
* @defaultValue `''`
|
|
92
120
|
*/
|
|
93
121
|
className: string;
|
|
94
122
|
/**
|
|
@@ -97,70 +125,118 @@ export interface SliderState {
|
|
|
97
125
|
structure: SlotContent<SliderContext>;
|
|
98
126
|
/**
|
|
99
127
|
* Slot to change the default labels of the slider
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue
|
|
130
|
+
* ```ts
|
|
131
|
+
* ({value}: SliderSlotLabelContext) => '' + value
|
|
132
|
+
* ```
|
|
100
133
|
*/
|
|
101
134
|
label: SlotContent<SliderSlotLabelContext>;
|
|
102
135
|
/**
|
|
103
|
-
*
|
|
136
|
+
* Slot to change the handlers
|
|
104
137
|
*/
|
|
105
138
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
106
139
|
}
|
|
107
140
|
export interface SliderProps {
|
|
108
141
|
/**
|
|
109
142
|
* Return the value for the 'aria-label' attribute for the handle
|
|
143
|
+
* @param value - value of the handle
|
|
144
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
145
|
+
* @param index - index of the handle in the original list
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue
|
|
148
|
+
* ```ts
|
|
149
|
+
* (value: number) => '' + value
|
|
150
|
+
* ```
|
|
110
151
|
*/
|
|
111
152
|
ariaLabelHandle: (value: number, sortedIndex: number, index: number) => string;
|
|
112
153
|
/**
|
|
113
154
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
155
|
+
* @param value - value of the handle
|
|
156
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
157
|
+
* @param index - index of the handle in the original list
|
|
158
|
+
*
|
|
159
|
+
* @defaultValue
|
|
160
|
+
* ```ts
|
|
161
|
+
* (value: number) => '' + value
|
|
162
|
+
* ```
|
|
114
163
|
*/
|
|
115
164
|
ariaValueText: (value: number, sortedIndex: number, index: number) => string;
|
|
116
165
|
/**
|
|
117
166
|
* An event emitted when slider values are changed
|
|
118
167
|
*
|
|
119
168
|
* Event payload equals to the updated slider values
|
|
169
|
+
*
|
|
170
|
+
* @defaultValue
|
|
171
|
+
* ```ts
|
|
172
|
+
* () => {}
|
|
173
|
+
* ```
|
|
120
174
|
*/
|
|
121
175
|
onValuesChange: (values: number[]) => void;
|
|
122
176
|
/**
|
|
123
177
|
* Minimum value that can be assigned to the slider
|
|
178
|
+
*
|
|
179
|
+
* @defaultValue `0`
|
|
124
180
|
*/
|
|
125
181
|
min: number;
|
|
126
182
|
/**
|
|
127
183
|
* Maximum value that can be assigned to the slider
|
|
184
|
+
*
|
|
185
|
+
* @defaultValue `100`
|
|
128
186
|
*/
|
|
129
187
|
max: number;
|
|
130
188
|
/**
|
|
131
189
|
* Unit value between slider steps
|
|
190
|
+
*
|
|
191
|
+
* @defaultValue `1`
|
|
132
192
|
*/
|
|
133
193
|
stepSize: number;
|
|
134
194
|
/**
|
|
135
195
|
* If `true` slider value cannot be changed but the slider is still focusable
|
|
196
|
+
*
|
|
197
|
+
* @defaultValue `false`
|
|
136
198
|
*/
|
|
137
199
|
readonly: boolean;
|
|
138
200
|
/**
|
|
139
201
|
* If `true` slider value cannot be changed and the slider cannot be focused
|
|
202
|
+
*
|
|
203
|
+
* @defaultValue `false`
|
|
140
204
|
*/
|
|
141
205
|
disabled: boolean;
|
|
142
206
|
/**
|
|
143
207
|
* If `true` is vertically positioned otherwise it is horizontal
|
|
208
|
+
*
|
|
209
|
+
* @defaultValue `false`
|
|
144
210
|
*/
|
|
145
211
|
vertical: boolean;
|
|
146
212
|
/**
|
|
147
213
|
* Current slider values
|
|
214
|
+
*
|
|
215
|
+
* @defaultValue `[0]`
|
|
148
216
|
*/
|
|
149
217
|
values: number[];
|
|
150
218
|
/**
|
|
151
219
|
* If `true` the value labels are displayed on the slider
|
|
220
|
+
*
|
|
221
|
+
* @defaultValue `true`
|
|
152
222
|
*/
|
|
153
223
|
showValueLabels: boolean;
|
|
154
224
|
/**
|
|
155
225
|
* If `true` the min and max labels are displayed on the slider
|
|
226
|
+
*
|
|
227
|
+
* @defaultValue `true`
|
|
156
228
|
*/
|
|
157
229
|
showMinMaxLabels: boolean;
|
|
158
230
|
/**
|
|
159
231
|
* It `true` slider display is inversed
|
|
232
|
+
*
|
|
233
|
+
* @defaultValue `false`
|
|
160
234
|
*/
|
|
161
235
|
rtl: boolean;
|
|
162
236
|
/**
|
|
163
237
|
* CSS classes to be applied on the widget main container
|
|
238
|
+
*
|
|
239
|
+
* @defaultValue `''`
|
|
164
240
|
*/
|
|
165
241
|
className: string;
|
|
166
242
|
/**
|
|
@@ -169,14 +245,26 @@ export interface SliderProps {
|
|
|
169
245
|
structure: SlotContent<SliderContext>;
|
|
170
246
|
/**
|
|
171
247
|
* Slot to change the default labels of the slider
|
|
248
|
+
*
|
|
249
|
+
* @defaultValue
|
|
250
|
+
* ```ts
|
|
251
|
+
* ({value}: SliderSlotLabelContext) => '' + value
|
|
252
|
+
* ```
|
|
172
253
|
*/
|
|
173
254
|
label: SlotContent<SliderSlotLabelContext>;
|
|
174
255
|
/**
|
|
175
|
-
*
|
|
256
|
+
* Slot to change the handlers
|
|
176
257
|
*/
|
|
177
258
|
handle: SlotContent<SliderSlotHandleContext>;
|
|
178
259
|
}
|
|
179
260
|
export type SliderWidget = Widget<SliderProps, SliderState, SliderApi, SliderActions, SliderDirectives>;
|
|
261
|
+
/**
|
|
262
|
+
* Create a Slider with given config props
|
|
263
|
+
* @param config - an optional slider config
|
|
264
|
+
* @returns a SliderWidget
|
|
265
|
+
*/
|
|
266
|
+
declare const export_createSlider: WidgetFactory<SliderWidget>;
|
|
267
|
+
export { export_createSlider as createSlider };
|
|
180
268
|
export interface ProgressDisplayOptions {
|
|
181
269
|
/**
|
|
182
270
|
* Right offset of the progress in %
|
|
@@ -276,18 +364,25 @@ export interface SliderDirectives {
|
|
|
276
364
|
export interface SliderActions {
|
|
277
365
|
/**
|
|
278
366
|
* Method to handle click on the slider
|
|
367
|
+
* @param event - mouse event
|
|
279
368
|
*/
|
|
280
369
|
click(event: MouseEvent): void;
|
|
281
370
|
/**
|
|
282
371
|
* Method to process the keyboard event
|
|
372
|
+
* @param event - keyboard event object
|
|
373
|
+
* @param handleNumber - id of the modified handle
|
|
283
374
|
*/
|
|
284
375
|
keydown(event: KeyboardEvent, handleNumber: number): void;
|
|
285
376
|
/**
|
|
286
377
|
* Method describing the behavior of the slider handle on mouse down event
|
|
378
|
+
* @param event - mouse event
|
|
379
|
+
* @param handleId - numeric id of the handle
|
|
287
380
|
*/
|
|
288
381
|
mouseDown(event: MouseEvent, handleId: number): void;
|
|
289
382
|
/**
|
|
290
383
|
* Method describing the behavior of the slider handle on touch start event
|
|
384
|
+
* @param event - touch event
|
|
385
|
+
* @param handleId - number id of the handle
|
|
291
386
|
*/
|
|
292
387
|
touchStart(event: TouchEvent, handleId: number): void;
|
|
293
388
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toast = require("../../toast-
|
|
3
|
+
const toast = require("../../toast-BXMjE9E3.cjs");
|
|
4
4
|
exports.Toast = toast.Toast;
|
|
5
|
-
exports.createToast = toast.
|
|
6
|
-
exports.getToastDefaultConfig = toast.
|
|
5
|
+
exports.createToast = toast.export_createToast;
|
|
6
|
+
exports.getToastDefaultConfig = toast.export_getToastDefaultConfig;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
import type { ToastWidget, ToastProps, ToastApi } from './toast.gen';
|
|
4
|
-
export type * from './toast.gen';
|
|
5
|
-
export declare const createToast: WidgetFactory<ToastWidget>;
|
|
6
|
-
export declare const getToastDefaultConfig: () => ToastProps;
|
|
2
|
+
import type { ToastApi, ToastProps } from './toast.gen';
|
|
7
3
|
export declare const Toast: ForwardRefExoticComponent<Partial<ToastProps> & RefAttributes<ToastApi>>;
|