@design-factory/core 21.1.0-next.1

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.
Files changed (176) hide show
  1. package/README.md +3 -0
  2. package/accordion-B0vs8JWM.cjs +314 -0
  3. package/accordion-D9ba0XYq.js +315 -0
  4. package/alert-AhaliJ17.cjs +9 -0
  5. package/alert-Cb9FhbFQ.js +10 -0
  6. package/collapse-Bn8iHKrd.js +95 -0
  7. package/collapse-BnWw4Hnc.cjs +94 -0
  8. package/common-B5jS-Ih_.cjs +73 -0
  9. package/common-DFyZvkII.js +74 -0
  10. package/components/accordion/accordion.d.ts +333 -0
  11. package/components/accordion/index.cjs +7 -0
  12. package/components/accordion/index.d.ts +1 -0
  13. package/components/accordion/index.js +7 -0
  14. package/components/alert/alert.d.ts +37 -0
  15. package/components/alert/common.d.ts +138 -0
  16. package/components/alert/index.cjs +5 -0
  17. package/components/alert/index.d.ts +1 -0
  18. package/components/alert/index.js +5 -0
  19. package/components/carousel/carousel.d.ts +247 -0
  20. package/components/carousel/index.cjs +292 -0
  21. package/components/carousel/index.d.ts +1 -0
  22. package/components/carousel/index.js +292 -0
  23. package/components/collapse/collapse.d.ts +135 -0
  24. package/components/collapse/index.cjs +5 -0
  25. package/components/collapse/index.d.ts +1 -0
  26. package/components/collapse/index.js +5 -0
  27. package/components/commonProps.d.ts +11 -0
  28. package/components/drawer/drawer.d.ts +279 -0
  29. package/components/drawer/index.cjs +5 -0
  30. package/components/drawer/index.d.ts +1 -0
  31. package/components/drawer/index.js +5 -0
  32. package/components/modal/index.cjs +8 -0
  33. package/components/modal/index.d.ts +1 -0
  34. package/components/modal/index.js +8 -0
  35. package/components/modal/modal.d.ts +245 -0
  36. package/components/pagination/index.cjs +5 -0
  37. package/components/pagination/index.d.ts +1 -0
  38. package/components/pagination/index.js +5 -0
  39. package/components/pagination/pagination.d.ts +313 -0
  40. package/components/progressbar/index.cjs +5 -0
  41. package/components/progressbar/index.d.ts +1 -0
  42. package/components/progressbar/index.js +5 -0
  43. package/components/progressbar/progressbar.d.ts +91 -0
  44. package/components/rating/index.cjs +5 -0
  45. package/components/rating/index.d.ts +1 -0
  46. package/components/rating/index.js +5 -0
  47. package/components/rating/rating.d.ts +191 -0
  48. package/components/slider/index.cjs +5 -0
  49. package/components/slider/index.d.ts +1 -0
  50. package/components/slider/index.js +5 -0
  51. package/components/slider/slider-utils.d.ts +25 -0
  52. package/components/slider/slider.d.ts +383 -0
  53. package/components/toast/index.cjs +7 -0
  54. package/components/toast/index.d.ts +2 -0
  55. package/components/toast/index.js +7 -0
  56. package/components/toast/toast.d.ts +66 -0
  57. package/components/toast/toaster.d.ts +128 -0
  58. package/components/tree/index.cjs +5 -0
  59. package/components/tree/index.d.ts +1 -0
  60. package/components/tree/index.js +5 -0
  61. package/components/tree/tree.d.ts +143 -0
  62. package/config.cjs +36 -0
  63. package/config.d.ts +117 -0
  64. package/config.js +36 -0
  65. package/directive-CNNSo5Yn.js +524 -0
  66. package/directive-DyTodNPd.cjs +523 -0
  67. package/drawer-BIIfJa0F.js +329 -0
  68. package/drawer-C8ojtwIn.cjs +328 -0
  69. package/index.cjs +134 -0
  70. package/index.d.ts +29 -0
  71. package/index.js +134 -0
  72. package/isFocusable-Ckwus82R.js +32 -0
  73. package/isFocusable-DfzDLeAN.cjs +31 -0
  74. package/modal-C13G13jV.js +253 -0
  75. package/modal-DWv0VqiG.cjs +252 -0
  76. package/package.json +56 -0
  77. package/pagination-BLVa1UsZ.cjs +254 -0
  78. package/pagination-BQWusWXN.js +255 -0
  79. package/progressbar-RopgvVeA.cjs +86 -0
  80. package/progressbar-S1pNn5rM.js +87 -0
  81. package/promise-CxCD3NYv.cjs +118 -0
  82. package/promise-D-RZVPuv.js +119 -0
  83. package/rating-DWgGgwk3.js +184 -0
  84. package/rating-DZ3OQgtt.cjs +183 -0
  85. package/scrollbars-CT87iv_6.cjs +30 -0
  86. package/scrollbars-CcxSrnCx.js +31 -0
  87. package/services/extendWidget.cjs +41 -0
  88. package/services/extendWidget.d.ts +31 -0
  89. package/services/extendWidget.js +41 -0
  90. package/services/floatingUI.cjs +111 -0
  91. package/services/floatingUI.d.ts +76 -0
  92. package/services/floatingUI.js +111 -0
  93. package/services/focusElement.cjs +46 -0
  94. package/services/focusElement.d.ts +9 -0
  95. package/services/focusElement.js +46 -0
  96. package/services/focustrack.cjs +47 -0
  97. package/services/focustrack.d.ts +40 -0
  98. package/services/focustrack.js +47 -0
  99. package/services/hash.cjs +15 -0
  100. package/services/hash.d.ts +3 -0
  101. package/services/hash.js +15 -0
  102. package/services/intersection.cjs +53 -0
  103. package/services/intersection.d.ts +30 -0
  104. package/services/intersection.js +53 -0
  105. package/services/matchMedia.cjs +14 -0
  106. package/services/matchMedia.d.ts +8 -0
  107. package/services/matchMedia.js +14 -0
  108. package/services/navManager.cjs +166 -0
  109. package/services/navManager.d.ts +144 -0
  110. package/services/navManager.js +166 -0
  111. package/services/pointerdownPosition.cjs +60 -0
  112. package/services/pointerdownPosition.d.ts +42 -0
  113. package/services/pointerdownPosition.js +60 -0
  114. package/services/portal.cjs +42 -0
  115. package/services/portal.d.ts +16 -0
  116. package/services/portal.js +42 -0
  117. package/services/resizeObserver.cjs +54 -0
  118. package/services/resizeObserver.d.ts +18 -0
  119. package/services/resizeObserver.js +54 -0
  120. package/services/siblingsInert.cjs +44 -0
  121. package/services/siblingsInert.d.ts +16 -0
  122. package/services/siblingsInert.js +44 -0
  123. package/services/transitions/baseTransitions.cjs +186 -0
  124. package/services/transitions/baseTransitions.d.ts +166 -0
  125. package/services/transitions/baseTransitions.js +186 -0
  126. package/services/transitions/collapse.cjs +40 -0
  127. package/services/transitions/collapse.d.ts +49 -0
  128. package/services/transitions/collapse.js +40 -0
  129. package/services/transitions/cssTransitions.cjs +32 -0
  130. package/services/transitions/cssTransitions.d.ts +25 -0
  131. package/services/transitions/cssTransitions.js +32 -0
  132. package/services/transitions/simpleClassTransition.cjs +37 -0
  133. package/services/transitions/simpleClassTransition.d.ts +47 -0
  134. package/services/transitions/simpleClassTransition.js +37 -0
  135. package/slider-Br_Qiopx.js +808 -0
  136. package/slider-pgDq1V5r.cjs +807 -0
  137. package/textDirection-cNgt24LJ.js +4 -0
  138. package/textDirection-zqcZ5-eK.cjs +3 -0
  139. package/toaster-BUBzFeJM.js +162 -0
  140. package/toaster-Dlube4Ya.cjs +161 -0
  141. package/tree-Chcy4ulJ.cjs +228 -0
  142. package/tree-vD7ZkV8Z.js +229 -0
  143. package/types.cjs +6 -0
  144. package/types.d.ts +246 -0
  145. package/types.js +6 -0
  146. package/utils/directive.cjs +28 -0
  147. package/utils/directive.d.ts +352 -0
  148. package/utils/directive.js +28 -0
  149. package/utils/func.cjs +7 -0
  150. package/utils/func.d.ts +11 -0
  151. package/utils/func.js +7 -0
  152. package/utils/id.cjs +5 -0
  153. package/utils/id.d.ts +6 -0
  154. package/utils/id.js +5 -0
  155. package/utils/internal/assign.d.ts +10 -0
  156. package/utils/internal/checks.d.ts +57 -0
  157. package/utils/internal/dom.d.ts +75 -0
  158. package/utils/internal/isFocusable.d.ts +9 -0
  159. package/utils/internal/math.d.ts +5 -0
  160. package/utils/internal/promise.d.ts +98 -0
  161. package/utils/internal/scrollbars.d.ts +8 -0
  162. package/utils/internal/sort.d.ts +16 -0
  163. package/utils/internal/ssrHTMLElement.d.ts +17 -0
  164. package/utils/internal/textDirection.d.ts +7 -0
  165. package/utils/internal/traversal.d.ts +54 -0
  166. package/utils/stores.cjs +172 -0
  167. package/utils/stores.d.ts +224 -0
  168. package/utils/stores.js +172 -0
  169. package/utils/widget.cjs +8 -0
  170. package/utils/widget.d.ts +11 -0
  171. package/utils/widget.js +8 -0
  172. package/utils/writables.cjs +16 -0
  173. package/utils/writables.d.ts +95 -0
  174. package/utils/writables.js +16 -0
  175. package/writables-DYGjj5T3.js +103 -0
  176. package/writables-Dt68gADJ.cjs +102 -0
@@ -0,0 +1,191 @@
1
+ import type { Directive, Widget, WidgetFactory } from '../../types';
2
+ import type { WidgetsCommonPropsAndState } from '../commonProps';
3
+ /**
4
+ * Represents the context for a star in a rating component.
5
+ */
6
+ export interface StarContext {
7
+ /**
8
+ * indicates how much the current star is filled, from 0 to 100
9
+ */
10
+ fill: number;
11
+ /**
12
+ * the position of the star in the rating
13
+ */
14
+ index: number;
15
+ }
16
+ interface RatingCommonPropsAndState extends WidgetsCommonPropsAndState {
17
+ /**
18
+ * The current rating. Could be a decimal value like `3.75`.
19
+ *
20
+ * @defaultValue `0`
21
+ */
22
+ rating: number;
23
+ /**
24
+ * The maximum rating that can be given.
25
+ *
26
+ * @defaultValue `10`
27
+ */
28
+ maxRating: number;
29
+ /**
30
+ * If `true`, the rating is disabled.
31
+ *
32
+ * @defaultValue `false`
33
+ */
34
+ disabled: boolean;
35
+ /**
36
+ * If `true`, the rating can't be changed.
37
+ *
38
+ * @defaultValue `false`
39
+ */
40
+ readonly: boolean;
41
+ /**
42
+ * Define if the rating can be reset.
43
+ *
44
+ * If set to true, the user can 'unset' the rating value by cliking on the current rating value.
45
+ *
46
+ * @defaultValue `true`
47
+ */
48
+ resettable: boolean;
49
+ /**
50
+ * Allows setting a custom rating tabindex.
51
+ * If the component is disabled, `tabindex` will still be set to `-1`.
52
+ *
53
+ * @defaultValue `0`
54
+ */
55
+ tabindex: number;
56
+ /**
57
+ * The aria label
58
+ *
59
+ * @defaultValue `'Rating'`
60
+ */
61
+ ariaLabel: string;
62
+ /**
63
+ * The aria labelled by
64
+ *
65
+ * @defaultValue `''`
66
+ */
67
+ ariaLabelledBy: string;
68
+ }
69
+ /**
70
+ * Interface representing the properties for the Rating widget.
71
+ */
72
+ export interface RatingProps extends RatingCommonPropsAndState {
73
+ /**
74
+ * Return the value for the 'aria-valuetext' attribute.
75
+ * @param rating - Current rating value.
76
+ * @param maxRating - maxRating value.
77
+ *
78
+ * @defaultValue
79
+ * ```ts
80
+ * (rating: number, maxRating: number) => `${rating} out of ${maxRating}`
81
+ * ```
82
+ */
83
+ ariaValueTextFn: (rating: number, maxRating: number) => string;
84
+ /**
85
+ * An event emitted when the rating is changed.
86
+ *
87
+ * Event payload is equal to the newly selected rating.
88
+ *
89
+ * @defaultValue
90
+ * ```ts
91
+ * () => {}
92
+ * ```
93
+ */
94
+ onRatingChange: (rating: number) => void;
95
+ /**
96
+ * An event emitted when the user is hovering over a given rating.
97
+ *
98
+ * Event payload is equal to the rating being hovered over.
99
+ *
100
+ * @defaultValue
101
+ * ```ts
102
+ * () => {}
103
+ * ```
104
+ */
105
+ onHover: (rating: number) => void;
106
+ /**
107
+ * An event emitted when the user stops hovering over a given rating.
108
+ *
109
+ * Event payload is equal to the rating of the last item being hovered over.
110
+ *
111
+ * @defaultValue
112
+ * ```ts
113
+ * () => {}
114
+ * ```
115
+ */
116
+ onLeave: (rating: number) => void;
117
+ }
118
+ /**
119
+ * Interface representing directives for a rating component.
120
+ */
121
+ export interface RatingDirectives {
122
+ /**
123
+ * A directive to be applied to the main container
124
+ * This will handle the keydown, mouseleave, tabindex and aria attributes
125
+ */
126
+ containerDirective: Directive;
127
+ /**
128
+ * A directive to be applied on each star element
129
+ */
130
+ starDirective: Directive<{
131
+ index: number;
132
+ }>;
133
+ }
134
+ /**
135
+ * Represents the state of a rating component.
136
+ */
137
+ export interface RatingState extends RatingCommonPropsAndState {
138
+ /**
139
+ * the aria value of the rating
140
+ */
141
+ ariaValueText: string;
142
+ /**
143
+ * the visible value of the rating (it changes when hovering over the rating even though the real value did not change)
144
+ */
145
+ visibleRating: number;
146
+ /**
147
+ * is the rating interactive i.e. listening to hover, click and keyboard events
148
+ */
149
+ interactive: boolean;
150
+ /**
151
+ * the list of stars
152
+ */
153
+ stars: StarContext[];
154
+ }
155
+ /**
156
+ * Interface representing the API that can be performed on a rating component.
157
+ */
158
+ export interface RatingApi {
159
+ /**
160
+ * Sets the rating value.
161
+ *
162
+ * @param index - Star index, starting from 1
163
+ */
164
+ setRating(index: number): void;
165
+ /**
166
+ * Sets the hovered rating value.
167
+ *
168
+ * @param index - Star index, starting from 1
169
+ */
170
+ setHoveredRating(index: number): void;
171
+ /**
172
+ * Leave the rating, resetting the visible rating to the rating value and triggering the onLeave callback
173
+ */
174
+ leave(): void;
175
+ }
176
+ /**
177
+ * Represents a Rating widget.
178
+ */
179
+ export type RatingWidget = Widget<RatingProps, RatingState, RatingApi, RatingDirectives>;
180
+ /**
181
+ * Returns a shallow copy of the default rating config.
182
+ * @returns a copy of the default config
183
+ */
184
+ export declare function getRatingDefaultConfig(): RatingProps;
185
+ /**
186
+ * Create a RatingWidget with given config props
187
+ * @param config - an optional alert config
188
+ * @returns a RatingWidget
189
+ */
190
+ export declare const createRating: WidgetFactory<RatingWidget>;
191
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const slider = require("../../slider-pgDq1V5r.cjs");
4
+ exports.createSlider = slider.createSlider;
5
+ exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -0,0 +1 @@
1
+ export * from './slider';
@@ -0,0 +1,5 @@
1
+ import { c, g } from "../../slider-Br_Qiopx.js";
2
+ export {
3
+ c as createSlider,
4
+ g as getSliderDefaultConfig
5
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Manages minimum and maximum range constraints for values in an array by adjusting adjacent values.
3
+ *
4
+ * This function ensures that the value at the specified index maintains proper minimum and maximum
5
+ * distance constraints with its neighboring values. It pushes adjacent handles when necessary to
6
+ * maintain the required range constraints.
7
+ *
8
+ * @param values - Array of numeric values to be managed (typically slider handle positions)
9
+ * @param index - Index of the value in the array that serves as the reference point
10
+ * @param minRange - Minimum allowed distance between adjacent values
11
+ * @param maxRange - Maximum allowed distance between adjacent values
12
+ * @param min - Minimum boundary of the slider
13
+ * @param max - Maximum boundary of the slider
14
+ * @param pushRange - Whether to enable pushing of adjacent values to maintain range constraints
15
+ *
16
+ * @returns The modified values array with range constraints applied
17
+ *
18
+ * @example
19
+ * ```typescript
20
+ * const values = [10, 20, 30, 40];
21
+ * const result = manageMinMaxRange(values, 1, 5, 15, 0, 50, true);
22
+ * // Result ensures value at index 1 maintains 5-15 unit distance from neighbors
23
+ * ```
24
+ */
25
+ export declare const manageMinMaxRange: (values: number[], index: number, minRange: number, maxRange: number, min: number, max: number, pushRange: boolean) => number[];
@@ -0,0 +1,383 @@
1
+ import type { WidgetsCommonPropsAndState } from '../commonProps';
2
+ import type { Directive, Widget, WidgetFactory } from '../../types';
3
+ /**
4
+ * Options for displaying progress in a slider component.
5
+ */
6
+ export interface ProgressDisplayOptions {
7
+ /**
8
+ * Right offset of the progress in %
9
+ */
10
+ left: number | null;
11
+ /**
12
+ * Left offset of the progress in %
13
+ */
14
+ right: number | null;
15
+ /**
16
+ * Top offset of the progress in %
17
+ */
18
+ top: number | null;
19
+ /**
20
+ * Bottom offset of the progress in %
21
+ */
22
+ bottom: number | null;
23
+ /**
24
+ * Width of the progress in %
25
+ */
26
+ width: number;
27
+ /**
28
+ * Height of the progress in %
29
+ */
30
+ height: number;
31
+ /**
32
+ * Id of the progress
33
+ */
34
+ id: number;
35
+ }
36
+ /**
37
+ * Options for displaying a handle in a slider component.
38
+ */
39
+ export interface HandleDisplayOptions {
40
+ /**
41
+ * Left offset of the handle in %
42
+ */
43
+ left: number | null;
44
+ /**
45
+ * Top offset of the handle in %
46
+ */
47
+ top: number | null;
48
+ }
49
+ /**
50
+ * Represents a handle in a slider component.
51
+ */
52
+ export interface SliderHandle {
53
+ /**
54
+ * Value of the handle
55
+ */
56
+ value: number;
57
+ /**
58
+ * Handle id
59
+ */
60
+ id: number;
61
+ /**
62
+ * ariaLabel of the handle
63
+ */
64
+ ariaLabel: string | undefined;
65
+ /**
66
+ * ariaValueText of the handle
67
+ */
68
+ ariaValueText: string | undefined;
69
+ /**
70
+ * aria-labelledBy of the handle
71
+ */
72
+ ariaLabelledBy: string | undefined;
73
+ }
74
+ /**
75
+ * Represents a tick in a slider component.
76
+ */
77
+ export interface SliderTick {
78
+ /**
79
+ * CSS classes to be applied on the tick
80
+ */
81
+ className?: string | null;
82
+ /**
83
+ * Visualized optional explanation of the label
84
+ */
85
+ legend?: string | null;
86
+ /**
87
+ * Position of the tick in percent
88
+ */
89
+ position: number;
90
+ /**
91
+ * If `true` the tick has selected style
92
+ */
93
+ selected: boolean;
94
+ /**
95
+ * Value of the tick
96
+ */
97
+ value: number;
98
+ /**
99
+ * If `true` the tick label is displayed
100
+ */
101
+ displayLabel: boolean;
102
+ }
103
+ interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
104
+ /**
105
+ * Minimum value that can be assigned to the slider
106
+ *
107
+ * @defaultValue `0`
108
+ */
109
+ min: number;
110
+ /**
111
+ * Maximum value that can be assigned to the slider
112
+ *
113
+ * @defaultValue `100`
114
+ */
115
+ max: number;
116
+ /**
117
+ * Unit value between slider steps
118
+ *
119
+ * @defaultValue `1`
120
+ */
121
+ stepSize: number;
122
+ /**
123
+ * If `true` slider value cannot be changed but the slider is still focusable
124
+ *
125
+ * @defaultValue `false`
126
+ */
127
+ readonly: boolean;
128
+ /**
129
+ * If `true` slider value cannot be changed and the slider cannot be focused
130
+ *
131
+ * @defaultValue `false`
132
+ */
133
+ disabled: boolean;
134
+ /**
135
+ * If `true` is vertically positioned otherwise it is horizontal
136
+ *
137
+ * @defaultValue `false`
138
+ */
139
+ vertical: boolean;
140
+ /**
141
+ * Current slider values
142
+ *
143
+ * @defaultValue `[0]`
144
+ */
145
+ values: number[];
146
+ /**
147
+ * If `true` the value labels are displayed on the slider
148
+ *
149
+ * @defaultValue `true`
150
+ */
151
+ showValueLabels: boolean;
152
+ /**
153
+ * If `true` the min and max labels are displayed on the slider
154
+ *
155
+ * @defaultValue `true`
156
+ */
157
+ showMinMaxLabels: boolean;
158
+ /**
159
+ * If `true` the ticks are displayed on the slider
160
+ *
161
+ * @defaultValue `false`
162
+ */
163
+ showTicks: boolean;
164
+ /**
165
+ * It `true` slider display is inversed
166
+ *
167
+ * @defaultValue `false`
168
+ */
169
+ rtl: boolean;
170
+ }
171
+ /**
172
+ * Represents the state of a slider component.
173
+ */
174
+ export interface SliderState extends SliderCommonPropsAndState {
175
+ /**
176
+ * Sorted slider values
177
+ */
178
+ sortedValues: number[];
179
+ /**
180
+ * Combined label left offset in %
181
+ */
182
+ combinedLabelPositionLeft: number;
183
+ /**
184
+ * Combined label top offset in %
185
+ */
186
+ combinedLabelPositionTop: number;
187
+ /**
188
+ * If true, the minimum label will be visible
189
+ */
190
+ minValueLabelDisplay: boolean;
191
+ /**
192
+ * If true, the maximum label will be visible
193
+ */
194
+ maxValueLabelDisplay: boolean;
195
+ /**
196
+ * If true, the label when the handles are close is visible
197
+ */
198
+ combinedLabelDisplay: boolean;
199
+ /**
200
+ * Array of the sorted handles to display
201
+ */
202
+ sortedHandles: SliderHandle[];
203
+ /**
204
+ * Array of objects representing progress display options
205
+ */
206
+ progressDisplayOptions: ProgressDisplayOptions[];
207
+ /**
208
+ * Array of objects representing handle display options
209
+ */
210
+ handleDisplayOptions: HandleDisplayOptions[];
211
+ /**
212
+ * Check if the slider is interactive, meaning it is not disabled or readonly
213
+ */
214
+ interactive: boolean;
215
+ /**
216
+ * Array of ticks to display on the slider component
217
+ */
218
+ ticks: SliderTick[];
219
+ }
220
+ /**
221
+ * Interface representing the properties for the Slider component.
222
+ */
223
+ export interface SliderProps extends SliderCommonPropsAndState {
224
+ /**
225
+ * Return the value for the 'aria-label' attribute for the handle
226
+ * @param sortedIndex - index of the handle in the sorted list
227
+ *
228
+ * @defaultValue
229
+ * ```ts
230
+ * () => 'Value'
231
+ * ```
232
+ */
233
+ ariaLabel: (sortedIndex: number) => string;
234
+ /**
235
+ * Return the value for the 'aria-labelledBy' attribute for the handle
236
+ * @param sortedIndex - index of the handle in the sorted list
237
+ *
238
+ * @defaultValue
239
+ * ```ts
240
+ * () => ''
241
+ * ```
242
+ */
243
+ ariaLabelledBy: (sortedIndex: number) => string;
244
+ /**
245
+ * Return the value for the 'aria-valuetext' attribute for the handle
246
+ * @param value - value of the handle
247
+ * @param sortedIndex - index of the handle in the sorted list
248
+ *
249
+ * @defaultValue
250
+ * ```ts
251
+ * () => ''
252
+ * ```
253
+ */
254
+ ariaValueText: (value: number, sortedIndex: number) => string;
255
+ /**
256
+ * An event emitted when slider values are changed
257
+ *
258
+ * Event payload equals to the updated slider values
259
+ *
260
+ * @defaultValue
261
+ * ```ts
262
+ * () => {}
263
+ * ```
264
+ */
265
+ onValuesChange: (values: number[]) => void;
266
+ /**
267
+ * Unit value between the ticks
268
+ * If value is set to `0` the {@link stepSize} is used to space the ticks
269
+ *
270
+ * @defaultValue `0`
271
+ */
272
+ tickInterval: number;
273
+ /**
274
+ * If `true` the tick values are displayed on the slider
275
+ *
276
+ * @defaultValue `true`
277
+ */
278
+ showTickValues: boolean;
279
+ /**
280
+ * Minimum distance between two values.
281
+ * When set to 0, no minimum distance constraint is applied.
282
+ *
283
+ * @defaultValue `0`
284
+ */
285
+ minRange: number;
286
+ /**
287
+ * Maximum distance between two values
288
+ * When set to 0, no maximum distance constraint is applied.
289
+ *
290
+ * @defaultValue `0`
291
+ */
292
+ maxRange: number;
293
+ /**
294
+ * When true, if moving a value would break the minRange or maxRange constraint,
295
+ * it will instead push or pull the neighboring values to keep the allowed range rather than just stopping.
296
+ *
297
+ * @defaultValue `false`
298
+ */
299
+ pushRange: boolean;
300
+ }
301
+ /**
302
+ * Interface representing various directives used in the slider component.
303
+ */
304
+ export interface SliderDirectives {
305
+ /**
306
+ * Directive to get the slider component elementRef
307
+ */
308
+ sliderDirective: Directive;
309
+ /**
310
+ * Directive to apply to the slider container wrapping the slider content
311
+ */
312
+ containerDirective: Directive;
313
+ /**
314
+ * Directive used to style the progress display for each handle
315
+ */
316
+ progressDisplayDirective: Directive<{
317
+ option: ProgressDisplayOptions;
318
+ }>;
319
+ /**
320
+ * Directive to apply to the slider clickable area, to directly move the handle to a given specific position
321
+ */
322
+ clickableAreaDirective: Directive;
323
+ /**
324
+ * Directive to apply handle events handlers
325
+ */
326
+ handleEventsDirective: Directive<{
327
+ item: {
328
+ id: number;
329
+ };
330
+ }>;
331
+ /**
332
+ * Directive to apply to the slider handle if any
333
+ */
334
+ handleDirective: Directive<{
335
+ item: SliderHandle;
336
+ }>;
337
+ /**
338
+ * Directive to get the minLabel elementRef
339
+ */
340
+ minLabelDirective: Directive;
341
+ /**
342
+ * Directive to get the maxLabel elementRef
343
+ */
344
+ maxLabelDirective: Directive;
345
+ /**
346
+ * Directive to apply to the handle when combined label display is active
347
+ */
348
+ combinedHandleLabelDisplayDirective: Directive;
349
+ /**
350
+ * Directive to apply to the handle when combined label display is not active
351
+ */
352
+ handleLabelDisplayDirective: Directive<{
353
+ index: number;
354
+ }>;
355
+ /**
356
+ * Directive to apply to the slider tick
357
+ */
358
+ tickDirective: Directive<{
359
+ tick: SliderTick;
360
+ }>;
361
+ /**
362
+ * Directive to apply to the slider tick label
363
+ */
364
+ tickLabelDirective: Directive<{
365
+ tick: SliderTick;
366
+ }>;
367
+ }
368
+ /**
369
+ * Represents a slider widget component.
370
+ */
371
+ export type SliderWidget = Widget<SliderProps, SliderState, object, SliderDirectives>;
372
+ /**
373
+ * Returns a shallow copy of the default slider config.
374
+ * @returns a copy of the default config
375
+ */
376
+ export declare function getSliderDefaultConfig(): SliderProps;
377
+ /**
378
+ * Create a slider widget with given config props
379
+ * @param config - an optional slider config
380
+ * @returns a SliderWidget
381
+ */
382
+ export declare const createSlider: WidgetFactory<SliderWidget>;
383
+ export {};
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const toaster = require("../../toaster-Dlube4Ya.cjs");
4
+ exports.Toaster = toaster.Toaster;
5
+ exports.createToast = toaster.createToast;
6
+ exports.defaultToasterProps = toaster.defaultToasterProps;
7
+ exports.getToastDefaultConfig = toaster.getToastDefaultConfig;
@@ -0,0 +1,2 @@
1
+ export * from './toast';
2
+ export * from './toaster';
@@ -0,0 +1,7 @@
1
+ import { T, c, d, g } from "../../toaster-BUBzFeJM.js";
2
+ export {
3
+ T as Toaster,
4
+ c as createToast,
5
+ d as defaultToasterProps,
6
+ g as getToastDefaultConfig
7
+ };
@@ -0,0 +1,66 @@
1
+ import type { Directive, Widget, WidgetFactory } from '../../types';
2
+ import type { CommonAlertApi, CommonAlertDirectives, CommonAlertProps, CommonAlertState } from '../alert/common';
3
+ interface ToastExtraProps {
4
+ /**
5
+ * If `true` automatically hides the toast after the delay.
6
+ *
7
+ * @defaultValue `true`
8
+ */
9
+ autoHide: boolean;
10
+ /**
11
+ * Delay in milliseconds before hiding the toast.
12
+ *
13
+ * @defaultValue `5000`
14
+ */
15
+ delay: number;
16
+ }
17
+ interface ExtraDirectives {
18
+ /**
19
+ * Directive that handles the autohide of the toast component
20
+ */
21
+ autoHideDirective: Directive;
22
+ /**
23
+ * Directive that adds all the necessary attributes to the body
24
+ */
25
+ bodyDirective: Directive;
26
+ /**
27
+ * Directive that adds all the necessary attributes to the close button depending on the presence of the header
28
+ */
29
+ closeButtonDirective: Directive;
30
+ }
31
+ /**
32
+ * Represents the state of a toast component.
33
+ */
34
+ export interface ToastState extends CommonAlertState, ToastExtraProps {
35
+ }
36
+ /**
37
+ * Represents the properties for the toast component.
38
+ */
39
+ export interface ToastProps extends CommonAlertProps, ToastExtraProps {
40
+ }
41
+ /**
42
+ * Represents the API for the toast component.
43
+ */
44
+ export interface ToastApi extends CommonAlertApi {
45
+ }
46
+ /**
47
+ * Interface representing the directives for a toast component.
48
+ */
49
+ export interface ToastDirectives extends CommonAlertDirectives, ExtraDirectives {
50
+ }
51
+ /**
52
+ * Represents a toast widget with specific properties, state, API, and directives.
53
+ */
54
+ export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectives>;
55
+ /**
56
+ * Retrieve a shallow copy of the default toast config
57
+ * @returns the default toast config
58
+ */
59
+ export declare function getToastDefaultConfig(): ToastProps;
60
+ /**
61
+ * Create a ToastWidget with given config props
62
+ * @param config - an optional toast config
63
+ * @returns a ToastWidget
64
+ */
65
+ export declare const createToast: WidgetFactory<ToastWidget>;
66
+ export {};