@wix/site-ui 1.347.0 → 1.348.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/dist/{6706.js → 1093.js} +3 -3
- package/dist/{8724.js → 1219.js} +2 -2
- package/dist/{7373.js → 1288.js} +8 -2
- package/dist/{5299.js → 1381.js} +98 -127
- package/dist/{3056.js → 1607.js} +32 -34
- package/dist/1629.js +2 -0
- package/dist/1669.js +75 -0
- package/dist/1718.js +26 -0
- package/dist/{1477.js → 201.js} +17 -26
- package/dist/2221.js +9 -0
- package/dist/{2445.js → 226.js} +12 -48
- package/dist/2387.js +7 -0
- package/dist/2580.js +6 -0
- package/dist/{1500.js → 2859.js} +10 -34
- package/dist/3014.js +178 -0
- package/dist/{6247.js → 3054.js} +3 -3
- package/dist/{7642.js → 3093.js} +1 -1
- package/dist/3189.js +5 -0
- package/dist/{7564.js → 331.js} +2 -2
- package/dist/3357.js +7 -0
- package/dist/{487.js → 3398.js} +38 -39
- package/dist/3502.js +224 -0
- package/dist/3695.js +50 -0
- package/dist/3829.js +1 -1
- package/dist/{6588.js → 3859.js} +115 -92
- package/dist/{3670.js → 3910.js} +28 -21
- package/dist/392.js +7 -0
- package/dist/{4549.js → 4155.js} +11 -3
- package/dist/4226.js +7 -0
- package/dist/{6329.js → 4229.js} +1 -1
- package/dist/4293.js +3 -0
- package/dist/4346.js +853 -2
- package/dist/{285.js → 4472.js} +3 -3
- package/dist/4605.js +207 -0
- package/dist/{7366.js → 488.js} +60 -7
- package/dist/{8750.js → 497.js} +190 -375
- package/dist/4989.js +35 -0
- package/dist/{6270.js → 510.js} +157 -196
- package/dist/5258.js +26 -0
- package/dist/{5036.js → 5275.js} +0 -3
- package/dist/{8171.js → 5298.js} +90 -102
- package/dist/5473.js +11 -0
- package/dist/{4745.js → 5490.js} +3 -1
- package/dist/{6089.js → 5561.js} +869 -786
- package/dist/{8996.js → 5595.js} +4 -3
- package/dist/5890.js +25 -0
- package/dist/{6046.js → 5969.js} +1 -1
- package/dist/5984.js +38 -0
- package/dist/{8527.js → 6006.js} +3 -3
- package/dist/6040.js +97 -0
- package/dist/{8758.js → 6137.js} +10 -8
- package/dist/{4281.js → 6140.js} +18 -10
- package/dist/{8960.js → 6191.js} +2 -2
- package/dist/6240.js +121 -0
- package/dist/{4490.js → 6373.js} +7 -5
- package/dist/{904.js → 6487.js} +19 -17
- package/dist/{9635.js → 6498.js} +1 -1
- package/dist/6499.js +4 -7
- package/dist/6508.js +7 -0
- package/dist/{8225.js → 6540.js} +1 -0
- package/dist/6551.js +46 -0
- package/dist/{9369.js → 6620.js} +35 -34
- package/dist/{4143.js → 6838.js} +19 -10
- package/dist/6902.js +48 -0
- package/dist/6904.js +51 -0
- package/dist/70.js +24 -0
- package/dist/7024.js +39 -0
- package/dist/{6882.js → 721.js} +737 -362
- package/dist/{951.js → 7270.js} +4 -4
- package/dist/{3485.js → 7323.js} +143 -111
- package/dist/{7541.js → 7488.js} +2 -2
- package/dist/{4863.js → 7542.js} +7 -6
- package/dist/7551.js +28 -0
- package/dist/{7021.js → 7640.js} +1 -1
- package/dist/{353.js → 7692.js} +3 -7
- package/dist/{4707.js → 7930.js} +2 -2
- package/dist/{8052.js → 8.js} +80 -64
- package/dist/{6914.js → 8129.js} +3 -15
- package/dist/{3319.js → 8358.js} +62 -63
- package/dist/{5864.js → 8407.js} +13 -13
- package/dist/8488.js +15 -0
- package/dist/{4768.js → 8495.js} +1 -1
- package/dist/8734.js +171 -0
- package/dist/{1763.js → 9018.js} +205 -331
- package/dist/9053.js +29 -0
- package/dist/9067.js +41 -0
- package/dist/{2861.js → 9120.js} +2 -2
- package/dist/{42.js → 9197.js} +2 -2
- package/dist/{9189.js → 9248.js} +36 -17
- package/dist/{2801.js → 9252.js} +4 -9
- package/dist/9295.js +7 -0
- package/dist/9303.js +8 -0
- package/dist/{167.js → 9374.js} +1 -1
- package/dist/{9352.js → 9540.js} +17 -47
- package/dist/9576.js +51 -0
- package/dist/{8272.js → 9591.js} +36 -46
- package/dist/{6107.js → 9770.js} +2 -2
- package/dist/{5085.js → 9880.js} +6 -3
- package/dist/Accordion/index.d.ts +207 -41
- package/dist/Accordion/index.js +75 -177
- package/dist/AlertDialog/index.d.ts +440 -140
- package/dist/AlertDialog/index.js +3 -13
- package/dist/Autocomplete/index.d.ts +722 -150
- package/dist/Autocomplete/index.js +16 -29
- package/dist/Avatar/index.d.ts +38 -3
- package/dist/Avatar/index.js +82 -28
- package/dist/Breadcrumbs/index.d.ts +63 -91
- package/dist/Breadcrumbs/index.js +1 -1
- package/dist/Button/index.d.ts +11 -0
- package/dist/Button/index.js +2 -2
- package/dist/Checkbox/index.d.ts +206 -36
- package/dist/Checkbox/index.js +293 -8
- package/dist/CheckboxField/index.css +1 -1
- package/dist/CheckboxField/index.d.ts +40 -36
- package/dist/CheckboxGroup/index.d.ts +50 -36
- package/dist/CheckboxGroup/index.js +87 -58
- package/dist/CheckboxGroupField/index.css +1 -1
- package/dist/Collapsible/index.d.ts +128 -36
- package/dist/Collapsible/index.js +21 -25
- package/dist/Combobox/index.d.ts +801 -158
- package/dist/Combobox/index.js +70 -114
- package/dist/ContextMenu/index.d.ts +1162 -195
- package/dist/ContextMenu/index.js +46 -36
- package/dist/Dialog/index.d.ts +425 -133
- package/dist/Dialog/index.js +8 -4
- package/dist/Drawer/index.d.ts +589 -144
- package/dist/Drawer/index.js +482 -562
- package/dist/Field/index.css +1 -1
- package/dist/Field/index.d.ts +341 -42
- package/dist/Field/index.js +123 -273
- package/dist/Fieldset/index.d.ts +11 -0
- package/dist/Fieldset/index.js +10 -17
- package/dist/Form/index.d.ts +43 -39
- package/dist/Form/index.js +58 -50
- package/dist/Input/index.css +1 -1
- package/dist/Input/index.d.ts +94 -42
- package/dist/Input/index.js +1 -1
- package/dist/Menu/index.d.ts +1140 -175
- package/dist/Menu/index.js +51 -67
- package/dist/Menubar/index.d.ts +651 -173
- package/dist/Menubar/index.js +12 -16
- package/dist/Meter/index.js +21 -18
- package/dist/NavigationMenu/index.d.ts +370 -86
- package/dist/NavigationMenu/index.js +144 -178
- package/dist/NumberField/index.css +1 -1
- package/dist/NumberField/index.d.ts +507 -47
- package/dist/NumberField/index.js +434 -718
- package/dist/Popover/index.d.ts +561 -142
- package/dist/Popover/index.js +181 -252
- package/dist/PreviewCard/index.d.ts +507 -143
- package/dist/PreviewCard/index.js +97 -151
- package/dist/Progress/index.d.ts +117 -3
- package/dist/Progress/index.js +37 -36
- package/dist/Radio/index.d.ts +177 -7
- package/dist/Radio/index.js +54 -70
- package/dist/RadioField/index.css +1 -1
- package/dist/RadioField/index.d.ts +23 -7
- package/dist/RadioGroup/index.d.ts +51 -37
- package/dist/RadioGroup/index.js +60 -51
- package/dist/RadioGroupField/index.css +1 -1
- package/dist/RadioGroupField/index.d.ts +40 -37
- package/dist/ScrollArea/index.d.ts +295 -1
- package/dist/ScrollArea/index.js +256 -324
- package/dist/Select/index.d.ts +516 -123
- package/dist/Select/index.js +513 -635
- package/dist/SelectField/index.css +1 -1
- package/dist/SelectField/index.d.ts +109 -134
- package/dist/SelectField/index.js +5 -1
- package/dist/Separator/index.d.ts +12 -0
- package/dist/Separator/index.js +1 -1
- package/dist/Slider/index.d.ts +383 -64
- package/dist/Slider/index.js +298 -374
- package/dist/Switch/index.d.ts +184 -37
- package/dist/Switch/index.js +44 -58
- package/dist/Tabs/index.d.ts +220 -35
- package/dist/Tabs/index.js +199 -193
- package/dist/Toast/index.d.ts +280 -64
- package/dist/Toast/index.js +299 -374
- package/dist/Toggle/index.d.ts +55 -35
- package/dist/Toggle/index.js +19 -13
- package/dist/ToggleGroup/index.d.ts +62 -35
- package/dist/ToggleGroup/index.js +13 -31
- package/dist/Toolbar/index.d.ts +117 -2
- package/dist/Toolbar/index.js +31 -43
- package/dist/Tooltip/index.d.ts +507 -150
- package/dist/Tooltip/index.js +163 -213
- package/dist/index.d.ts +12912 -5382
- package/package.json +3 -3
- package/dist/2205.js +0 -26
- package/dist/2274.js +0 -34
- package/dist/2287.js +0 -17
- package/dist/3020.js +0 -7
- package/dist/3021.js +0 -72
- package/dist/3140.js +0 -4
- package/dist/3248.js +0 -307
- package/dist/4026.js +0 -12
- package/dist/4922.js +0 -15
- package/dist/5659.js +0 -4
- package/dist/5992.js +0 -447
- package/dist/6330.js +0 -30
- package/dist/6535.js +0 -72
- package/dist/6917.js +0 -55
- package/dist/7725.js +0 -10
- package/dist/7871.js +0 -38
- package/dist/8106.js +0 -239
- package/dist/8685.js +0 -102
- package/dist/8935.js +0 -8
- package/dist/8971.js +0 -40
- package/dist/8979.js +0 -10
- package/dist/9048.js +0 -52
- package/dist/9087.js +0 -256
- package/dist/9255.js +0 -136
- /package/dist/{1457.js → 1068.js} +0 -0
- /package/dist/{6003.js → 1234.js} +0 -0
- /package/dist/{4723.js → 1282.js} +0 -0
- /package/dist/{6825.js → 1876.js} +0 -0
- /package/dist/{5778.js → 1885.js} +0 -0
- /package/dist/{2445.js.LICENSE.txt → 226.js.LICENSE.txt} +0 -0
- /package/dist/{1279.js → 3278.js} +0 -0
- /package/dist/{3296.js → 5568.js} +0 -0
- /package/dist/{8685.css → 6240.css} +0 -0
- /package/dist/{9829.js → 6488.js} +0 -0
- /package/dist/{9863.js → 6534.js} +0 -0
- /package/dist/{4495.js → 7718.js} +0 -0
- /package/dist/{3395.js → 8866.js} +0 -0
- /package/dist/{2418.js → 9837.js} +0 -0
package/dist/Field/index.css
CHANGED
package/dist/Field/index.d.ts
CHANGED
|
@@ -88,15 +88,15 @@ declare type BaseUIGenericEventDetail<Reason extends string, CustomProperties ex
|
|
|
88
88
|
|
|
89
89
|
declare type BaseUIGenericEventDetails<Reason extends string, CustomProperties extends object = {}> = Reason extends string ? BaseUIGenericEventDetail<Reason, CustomProperties> & {} : never;
|
|
90
90
|
|
|
91
|
-
declare const cancelOpen:
|
|
91
|
+
declare const cancelOpen: 'cancel-open';
|
|
92
92
|
|
|
93
|
-
declare const chipRemovePress:
|
|
93
|
+
declare const chipRemovePress: 'chip-remove-press';
|
|
94
94
|
|
|
95
|
-
declare const clearPress:
|
|
95
|
+
declare const clearPress: 'clear-press';
|
|
96
96
|
|
|
97
|
-
declare const closePress:
|
|
97
|
+
declare const closePress: 'close-press';
|
|
98
98
|
|
|
99
|
-
declare const closeWatcher:
|
|
99
|
+
declare const closeWatcher: 'close-watcher';
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
* Shape of the render prop: a function that takes props to be spread on the element and component's state and returns a React element.
|
|
@@ -108,17 +108,82 @@ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => R
|
|
|
108
108
|
|
|
109
109
|
declare type ControlVariant = 'box' | 'line';
|
|
110
110
|
|
|
111
|
-
declare const decrementPress:
|
|
111
|
+
declare const decrementPress: 'decrement-press';
|
|
112
112
|
|
|
113
113
|
declare type DescriptionAlign = 'start' | 'end';
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
/**
|
|
116
|
+
* Present when the field's value has changed.
|
|
117
|
+
*/
|
|
118
|
+
declare const dirty = "data-dirty";
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Present when the field's value has changed.
|
|
122
|
+
*/
|
|
123
|
+
declare const dirty_2 = "data-dirty";
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Present when the field's value has changed.
|
|
127
|
+
*/
|
|
128
|
+
declare const dirty_3 = "data-dirty";
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Present when the field's value has changed.
|
|
132
|
+
*/
|
|
133
|
+
declare const dirty_4 = "data-dirty";
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Present when the field's value has changed.
|
|
137
|
+
*/
|
|
138
|
+
declare const dirty_5 = "data-dirty";
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Present when the field's value has changed.
|
|
142
|
+
*/
|
|
143
|
+
declare const dirty_6 = "data-dirty";
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Present when the field is disabled.
|
|
147
|
+
*/
|
|
148
|
+
declare const disabled = "data-disabled";
|
|
116
149
|
|
|
117
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Present when the field is disabled.
|
|
152
|
+
*/
|
|
153
|
+
declare const disabled_2 = "data-disabled";
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Present when the field is disabled.
|
|
157
|
+
*/
|
|
158
|
+
declare const disabled_3 = "data-disabled";
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Present when the field is disabled.
|
|
162
|
+
*/
|
|
163
|
+
declare const disabled_4 = "data-disabled";
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Present when the field is disabled.
|
|
167
|
+
*/
|
|
168
|
+
declare const disabled_5 = "data-disabled";
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Present when the field is disabled.
|
|
172
|
+
*/
|
|
173
|
+
declare const disabled_6 = "data-disabled";
|
|
174
|
+
|
|
175
|
+
declare const disabled_7: 'disabled';
|
|
176
|
+
|
|
177
|
+
declare const drag: 'drag';
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Present when the error message is animating out.
|
|
181
|
+
*/
|
|
182
|
+
declare const endingStyle = "data-ending-style";
|
|
118
183
|
|
|
119
184
|
declare type Errors = Record<string, string | string[]>;
|
|
120
185
|
|
|
121
|
-
declare const escapeKey:
|
|
186
|
+
declare const escapeKey: 'escape-key';
|
|
122
187
|
|
|
123
188
|
export declare const Field: {
|
|
124
189
|
Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldRootProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
@@ -187,6 +252,18 @@ export declare type FieldControlChangeEventDetails = BaseUIChangeEventDetails<Fi
|
|
|
187
252
|
|
|
188
253
|
export declare type FieldControlChangeEventReason = typeof REASONS.none;
|
|
189
254
|
|
|
255
|
+
export declare namespace FieldControlDataAttributes {
|
|
256
|
+
export {
|
|
257
|
+
disabled_5 as disabled,
|
|
258
|
+
valid_5 as valid,
|
|
259
|
+
invalid_5 as invalid,
|
|
260
|
+
touched_5 as touched,
|
|
261
|
+
dirty_5 as dirty,
|
|
262
|
+
filled_5 as filled,
|
|
263
|
+
focused_5 as focused
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
190
267
|
export declare interface FieldControlProps extends BaseUIComponentProps<'input', FieldControlState> {
|
|
191
268
|
/**
|
|
192
269
|
* Callback fired when the `value` changes. Use when controlled.
|
|
@@ -210,6 +287,18 @@ export declare namespace FieldDescription {
|
|
|
210
287
|
export type Props = FieldDescriptionProps;
|
|
211
288
|
}
|
|
212
289
|
|
|
290
|
+
export declare namespace FieldDescriptionDataAttributes {
|
|
291
|
+
export {
|
|
292
|
+
disabled_4 as disabled,
|
|
293
|
+
valid_4 as valid,
|
|
294
|
+
invalid_4 as invalid,
|
|
295
|
+
touched_4 as touched,
|
|
296
|
+
dirty_4 as dirty,
|
|
297
|
+
filled_4 as filled,
|
|
298
|
+
focused_4 as focused
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
213
302
|
export declare interface FieldDescriptionProps extends BaseUIComponentProps<'p', FieldDescriptionState> {}
|
|
214
303
|
|
|
215
304
|
export declare interface FieldDescriptionState extends FieldRootState {}
|
|
@@ -227,6 +316,20 @@ export declare namespace FieldError {
|
|
|
227
316
|
export type Props = FieldErrorProps;
|
|
228
317
|
}
|
|
229
318
|
|
|
319
|
+
export declare namespace FieldErrorDataAttributes {
|
|
320
|
+
export {
|
|
321
|
+
disabled_3 as disabled,
|
|
322
|
+
valid_3 as valid,
|
|
323
|
+
invalid_3 as invalid,
|
|
324
|
+
touched_3 as touched,
|
|
325
|
+
dirty_3 as dirty,
|
|
326
|
+
filled_3 as filled,
|
|
327
|
+
focused_3 as focused,
|
|
328
|
+
startingStyle,
|
|
329
|
+
endingStyle
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
230
333
|
export declare interface FieldErrorProps extends BaseUIComponentProps<'div', FieldErrorState> {
|
|
231
334
|
/**
|
|
232
335
|
* Determines whether to show the error message according to the field's
|
|
@@ -257,6 +360,18 @@ export declare namespace FieldItem {
|
|
|
257
360
|
export type Props = FieldItemProps;
|
|
258
361
|
}
|
|
259
362
|
|
|
363
|
+
export declare namespace FieldItemDataAttributes {
|
|
364
|
+
export {
|
|
365
|
+
disabled_6 as disabled,
|
|
366
|
+
valid_6 as valid,
|
|
367
|
+
invalid_6 as invalid,
|
|
368
|
+
touched_6 as touched,
|
|
369
|
+
dirty_6 as dirty,
|
|
370
|
+
filled_6 as filled,
|
|
371
|
+
focused_6 as focused
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
260
375
|
export declare interface FieldItemProps extends BaseUIComponentProps<'div', FieldItemState> {
|
|
261
376
|
/**
|
|
262
377
|
* Whether the wrapped control should ignore user interaction.
|
|
@@ -281,6 +396,18 @@ export declare namespace FieldLabel {
|
|
|
281
396
|
export type Props = FieldLabelProps;
|
|
282
397
|
}
|
|
283
398
|
|
|
399
|
+
export declare namespace FieldLabelDataAttributes {
|
|
400
|
+
export {
|
|
401
|
+
disabled_2 as disabled,
|
|
402
|
+
valid_2 as valid,
|
|
403
|
+
invalid_2 as invalid,
|
|
404
|
+
touched_2 as touched,
|
|
405
|
+
dirty_2 as dirty,
|
|
406
|
+
filled_2 as filled,
|
|
407
|
+
focused_2 as focused
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
284
411
|
export declare interface FieldLabelProps extends BaseUIComponentProps<'label', FieldLabelState> {
|
|
285
412
|
/**
|
|
286
413
|
* Whether the component renders a native `<label>` element when replacing it via the `render` prop.
|
|
@@ -312,6 +439,18 @@ export declare interface FieldRootActions {
|
|
|
312
439
|
validate: () => void;
|
|
313
440
|
}
|
|
314
441
|
|
|
442
|
+
export declare namespace FieldRootDataAttributes {
|
|
443
|
+
export {
|
|
444
|
+
disabled,
|
|
445
|
+
touched,
|
|
446
|
+
dirty,
|
|
447
|
+
valid,
|
|
448
|
+
invalid,
|
|
449
|
+
filled,
|
|
450
|
+
focused
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
315
454
|
export declare interface FieldRootProps extends BaseUIComponentProps<'div', FieldRootState> {
|
|
316
455
|
/**
|
|
317
456
|
* Whether the component should ignore user interaction.
|
|
@@ -326,11 +465,12 @@ export declare interface FieldRootProps extends BaseUIComponentProps<'div', Fiel
|
|
|
326
465
|
name?: string | undefined;
|
|
327
466
|
/**
|
|
328
467
|
* A function for custom validation. Return a string or an array of strings with
|
|
329
|
-
* the error message(s) if the value is invalid,
|
|
468
|
+
* the error message(s) if the value is invalid. Returning nothing, `null`, an empty
|
|
469
|
+
* string, or an empty array means the value is valid.
|
|
330
470
|
* Asynchronous functions are supported, but they do not prevent form submission
|
|
331
471
|
* when using `validationMode="onSubmit"`.
|
|
332
472
|
*/
|
|
333
|
-
validate?: ((value: unknown, formValues: Form.Values) => string | string[] | null | Promise<string | string[] | null>) | undefined;
|
|
473
|
+
validate?: ((value: unknown, formValues: Form.Values) => string | string[] | null | void | Promise<string | string[] | null | void>) | undefined;
|
|
334
474
|
/**
|
|
335
475
|
* Determines when the field should be validated.
|
|
336
476
|
* This takes precedence over the `validationMode` prop on `<Form>`.
|
|
@@ -456,7 +596,67 @@ export declare interface FieldValidityState extends Omit<FieldValidityData, 'sta
|
|
|
456
596
|
transitionStatus: TransitionStatus;
|
|
457
597
|
}
|
|
458
598
|
|
|
459
|
-
|
|
599
|
+
/**
|
|
600
|
+
* Present when the field is filled.
|
|
601
|
+
*/
|
|
602
|
+
declare const filled = "data-filled";
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Present when the field is filled.
|
|
606
|
+
*/
|
|
607
|
+
declare const filled_2 = "data-filled";
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Present when the field is filled.
|
|
611
|
+
*/
|
|
612
|
+
declare const filled_3 = "data-filled";
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* Present when the field is filled.
|
|
616
|
+
*/
|
|
617
|
+
declare const filled_4 = "data-filled";
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Present when the field is filled.
|
|
621
|
+
*/
|
|
622
|
+
declare const filled_5 = "data-filled";
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Present when the field is filled.
|
|
626
|
+
*/
|
|
627
|
+
declare const filled_6 = "data-filled";
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Present when the field control is focused.
|
|
631
|
+
*/
|
|
632
|
+
declare const focused = "data-focused";
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Present when the field control is focused.
|
|
636
|
+
*/
|
|
637
|
+
declare const focused_2 = "data-focused";
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Present when the field control is focused.
|
|
641
|
+
*/
|
|
642
|
+
declare const focused_3 = "data-focused";
|
|
643
|
+
|
|
644
|
+
/**
|
|
645
|
+
* Present when the field control is focused.
|
|
646
|
+
*/
|
|
647
|
+
declare const focused_4 = "data-focused";
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Present when the field control is focused.
|
|
651
|
+
*/
|
|
652
|
+
declare const focused_5 = "data-focused";
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Present when the field control is focused.
|
|
656
|
+
*/
|
|
657
|
+
declare const focused_6 = "data-focused";
|
|
658
|
+
|
|
659
|
+
declare const focusOut: 'focus-out';
|
|
460
660
|
|
|
461
661
|
/**
|
|
462
662
|
* A native form element with consolidated error handling.
|
|
@@ -487,6 +687,7 @@ declare interface FormActions {
|
|
|
487
687
|
declare interface FormContext {
|
|
488
688
|
errors: Errors;
|
|
489
689
|
clearErrors: (name: string | undefined) => void;
|
|
690
|
+
elementRef: React_2.RefObject<HTMLFormElement | null>;
|
|
490
691
|
formRef: React_2.RefObject<{
|
|
491
692
|
fields: Map<string, {
|
|
492
693
|
name: string | undefined;
|
|
@@ -501,12 +702,12 @@ declare interface FormContext {
|
|
|
501
702
|
}>;
|
|
502
703
|
}>;
|
|
503
704
|
validationMode: Form.ValidationMode;
|
|
504
|
-
|
|
705
|
+
submitCountRef: React_2.RefObject<number>;
|
|
505
706
|
}
|
|
506
707
|
|
|
507
708
|
declare const FormContext: React_2.Context<FormContext>;
|
|
508
709
|
|
|
509
|
-
declare interface FormProps<FormValues extends Record<string, any> = Record<string, any>> extends BaseUIComponentProps<'form', FormState
|
|
710
|
+
declare interface FormProps<FormValues extends Record<string, any> = Record<string, any>> extends BaseUIComponentProps<'form', FormState, React_2.ComponentPropsWithRef<'form'>> {
|
|
510
711
|
/**
|
|
511
712
|
* Determines when the form should be validated.
|
|
512
713
|
* The `validationMode` prop on `<Field.Root>` takes precedence over this.
|
|
@@ -535,10 +736,10 @@ declare interface FormProps<FormValues extends Record<string, any> = Record<stri
|
|
|
535
736
|
* @example
|
|
536
737
|
* ```tsx
|
|
537
738
|
* // validate all fields
|
|
538
|
-
* actionsRef.current
|
|
739
|
+
* actionsRef.current?.validate();
|
|
539
740
|
*
|
|
540
741
|
* // validate one field
|
|
541
|
-
* actionsRef.current
|
|
742
|
+
* actionsRef.current?.validate('email');
|
|
542
743
|
* ```
|
|
543
744
|
*/
|
|
544
745
|
actionsRef?: React_2.RefObject<Form.Actions | null> | undefined;
|
|
@@ -556,39 +757,71 @@ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
|
556
757
|
ref?: React_2.Ref<T> | undefined;
|
|
557
758
|
};
|
|
558
759
|
|
|
559
|
-
declare const imperativeAction:
|
|
760
|
+
declare const imperativeAction: 'imperative-action';
|
|
560
761
|
|
|
561
|
-
declare const incrementPress:
|
|
762
|
+
declare const incrementPress: 'increment-press';
|
|
562
763
|
|
|
563
|
-
declare const initial:
|
|
764
|
+
declare const initial: 'initial';
|
|
564
765
|
|
|
565
|
-
declare const inputBlur:
|
|
766
|
+
declare const inputBlur: 'input-blur';
|
|
566
767
|
|
|
567
|
-
declare const inputChange:
|
|
768
|
+
declare const inputChange: 'input-change';
|
|
568
769
|
|
|
569
|
-
declare const inputClear:
|
|
770
|
+
declare const inputClear: 'input-clear';
|
|
570
771
|
|
|
571
|
-
declare const inputPaste:
|
|
772
|
+
declare const inputPaste: 'input-paste';
|
|
572
773
|
|
|
573
|
-
declare const inputPress:
|
|
774
|
+
declare const inputPress: 'input-press';
|
|
574
775
|
|
|
575
|
-
|
|
776
|
+
/**
|
|
777
|
+
* Present when the field is invalid.
|
|
778
|
+
*/
|
|
779
|
+
declare const invalid = "data-invalid";
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Present when the field is in an invalid state.
|
|
783
|
+
*/
|
|
784
|
+
declare const invalid_2 = "data-invalid";
|
|
785
|
+
|
|
786
|
+
/**
|
|
787
|
+
* Present when the field is in an invalid state.
|
|
788
|
+
*/
|
|
789
|
+
declare const invalid_3 = "data-invalid";
|
|
790
|
+
|
|
791
|
+
/**
|
|
792
|
+
* Present when the field is in an invalid state.
|
|
793
|
+
*/
|
|
794
|
+
declare const invalid_4 = "data-invalid";
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Present when the field is in an invalid state.
|
|
798
|
+
*/
|
|
799
|
+
declare const invalid_5 = "data-invalid";
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Present when the field is in an invalid state.
|
|
803
|
+
*/
|
|
804
|
+
declare const invalid_6 = "data-invalid";
|
|
805
|
+
|
|
806
|
+
declare const itemPress: 'item-press';
|
|
576
807
|
|
|
577
|
-
declare const keyboard:
|
|
808
|
+
declare const keyboard: 'keyboard';
|
|
578
809
|
|
|
579
810
|
declare type LabelVariant = 'default' | 'floating';
|
|
580
811
|
|
|
581
|
-
declare const linkPress:
|
|
812
|
+
declare const linkPress: 'link-press';
|
|
582
813
|
|
|
583
|
-
declare const listNavigation:
|
|
814
|
+
declare const listNavigation: 'list-navigation';
|
|
584
815
|
|
|
585
|
-
declare const missing:
|
|
816
|
+
declare const missing: 'missing';
|
|
586
817
|
|
|
587
|
-
declare const none:
|
|
818
|
+
declare const none: 'none';
|
|
588
819
|
|
|
589
|
-
declare const outsidePress:
|
|
820
|
+
declare const outsidePress: 'outside-press';
|
|
590
821
|
|
|
591
|
-
declare const pointer:
|
|
822
|
+
declare const pointer: 'pointer';
|
|
823
|
+
|
|
824
|
+
declare const popupClose: 'popup-close';
|
|
592
825
|
|
|
593
826
|
declare namespace REASONS {
|
|
594
827
|
export {
|
|
@@ -619,9 +852,10 @@ declare namespace REASONS {
|
|
|
619
852
|
drag,
|
|
620
853
|
wheel,
|
|
621
854
|
scrub,
|
|
855
|
+
popupClose,
|
|
622
856
|
cancelOpen,
|
|
623
857
|
siblingOpen,
|
|
624
|
-
disabled,
|
|
858
|
+
disabled_7 as disabled,
|
|
625
859
|
missing,
|
|
626
860
|
initial,
|
|
627
861
|
imperativeAction,
|
|
@@ -673,25 +907,90 @@ declare interface ReasonToEventMap {
|
|
|
673
907
|
[REASONS.windowResize]: UIEvent;
|
|
674
908
|
}
|
|
675
909
|
|
|
676
|
-
declare const scrub:
|
|
910
|
+
declare const scrub: 'scrub';
|
|
677
911
|
|
|
678
|
-
declare const siblingOpen:
|
|
912
|
+
declare const siblingOpen: 'sibling-open';
|
|
679
913
|
|
|
680
|
-
|
|
914
|
+
/**
|
|
915
|
+
* Present when the error message begins animating in.
|
|
916
|
+
*/
|
|
917
|
+
declare const startingStyle = "data-starting-style";
|
|
918
|
+
|
|
919
|
+
declare const swipe: 'swipe';
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Present when the field has been touched.
|
|
923
|
+
*/
|
|
924
|
+
declare const touched = "data-touched";
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Present when the field has been touched.
|
|
928
|
+
*/
|
|
929
|
+
declare const touched_2 = "data-touched";
|
|
930
|
+
|
|
931
|
+
/**
|
|
932
|
+
* Present when the field has been touched.
|
|
933
|
+
*/
|
|
934
|
+
declare const touched_3 = "data-touched";
|
|
935
|
+
|
|
936
|
+
/**
|
|
937
|
+
* Present when the field has been touched.
|
|
938
|
+
*/
|
|
939
|
+
declare const touched_4 = "data-touched";
|
|
681
940
|
|
|
682
|
-
|
|
941
|
+
/**
|
|
942
|
+
* Present when the field has been touched.
|
|
943
|
+
*/
|
|
944
|
+
declare const touched_5 = "data-touched";
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* Present when the field has been touched.
|
|
948
|
+
*/
|
|
949
|
+
declare const touched_6 = "data-touched";
|
|
950
|
+
|
|
951
|
+
declare const trackPress: 'track-press';
|
|
683
952
|
|
|
684
953
|
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
685
954
|
|
|
686
|
-
declare const triggerFocus:
|
|
955
|
+
declare const triggerFocus: 'trigger-focus';
|
|
956
|
+
|
|
957
|
+
declare const triggerHover: 'trigger-hover';
|
|
958
|
+
|
|
959
|
+
declare const triggerPress: 'trigger-press';
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Present when the field is valid.
|
|
963
|
+
*/
|
|
964
|
+
declare const valid = "data-valid";
|
|
687
965
|
|
|
688
|
-
|
|
966
|
+
/**
|
|
967
|
+
* Present when the field is in a valid state.
|
|
968
|
+
*/
|
|
969
|
+
declare const valid_2 = "data-valid";
|
|
689
970
|
|
|
690
|
-
|
|
971
|
+
/**
|
|
972
|
+
* Present when the field is in a valid state.
|
|
973
|
+
*/
|
|
974
|
+
declare const valid_3 = "data-valid";
|
|
975
|
+
|
|
976
|
+
/**
|
|
977
|
+
* Present when the field is in a valid state.
|
|
978
|
+
*/
|
|
979
|
+
declare const valid_4 = "data-valid";
|
|
980
|
+
|
|
981
|
+
/**
|
|
982
|
+
* Present when the field is in a valid state.
|
|
983
|
+
*/
|
|
984
|
+
declare const valid_5 = "data-valid";
|
|
985
|
+
|
|
986
|
+
/**
|
|
987
|
+
* Present when the field is in a valid state.
|
|
988
|
+
*/
|
|
989
|
+
declare const valid_6 = "data-valid";
|
|
691
990
|
|
|
692
|
-
declare const wheel:
|
|
991
|
+
declare const wheel: 'wheel';
|
|
693
992
|
|
|
694
|
-
declare const windowResize:
|
|
993
|
+
declare const windowResize: 'window-resize';
|
|
695
994
|
|
|
696
995
|
/**
|
|
697
996
|
* Adds a `preventBaseUIHandler` method to all event handlers.
|