@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InteractionType } from '@base-ui/utils/useEnhancedClickHandler';
|
|
2
2
|
import { Padding } from '@floating-ui/react-dom';
|
|
3
3
|
import * as React_2 from 'react';
|
|
4
|
-
import { Rect } from '@floating-ui/utils';
|
|
4
|
+
import type { Rect } from '@floating-ui/utils';
|
|
5
5
|
import { SelectArrowProps as SelectArrowProps_2 } from '@base-ui/react';
|
|
6
6
|
import { SelectBackdropProps as SelectBackdropProps_2 } from '@base-ui/react';
|
|
7
7
|
import { SelectGroupLabelProps as SelectGroupLabelProps_2 } from '@base-ui/react';
|
|
@@ -17,9 +17,9 @@ import { SelectPortalProps as SelectPortalProps_2 } from '@base-ui/react';
|
|
|
17
17
|
import { SelectPositionerProps as SelectPositionerProps_2 } from '@base-ui/react';
|
|
18
18
|
import { SelectScrollDownArrowProps as SelectScrollDownArrowProps_2 } from '@base-ui/react';
|
|
19
19
|
import { SelectScrollUpArrowProps as SelectScrollUpArrowProps_2 } from '@base-ui/react';
|
|
20
|
+
import { SelectSeparatorProps as SelectSeparatorProps_2 } from '@base-ui/react';
|
|
20
21
|
import { SelectTriggerProps as SelectTriggerProps_2 } from '@base-ui/react';
|
|
21
22
|
import { SelectValueProps as SelectValueProps_2 } from '@base-ui/react';
|
|
22
|
-
import { SeparatorProps as SeparatorProps_2 } from '@base-ui/react';
|
|
23
23
|
import { VirtualElement } from '@floating-ui/react-dom';
|
|
24
24
|
|
|
25
25
|
declare type Align = 'start' | 'center' | 'end';
|
|
@@ -107,15 +107,15 @@ declare type BaseUIGenericEventDetails<Reason extends string, CustomProperties e
|
|
|
107
107
|
|
|
108
108
|
declare type Boundary = 'clipping-ancestors' | Element | Element[] | Rect;
|
|
109
109
|
|
|
110
|
-
declare const cancelOpen:
|
|
110
|
+
declare const cancelOpen: 'cancel-open';
|
|
111
111
|
|
|
112
|
-
declare const chipRemovePress:
|
|
112
|
+
declare const chipRemovePress: 'chip-remove-press';
|
|
113
113
|
|
|
114
|
-
declare const clearPress:
|
|
114
|
+
declare const clearPress: 'clear-press';
|
|
115
115
|
|
|
116
|
-
declare const closePress:
|
|
116
|
+
declare const closePress: 'close-press';
|
|
117
117
|
|
|
118
|
-
declare const closeWatcher:
|
|
118
|
+
declare const closeWatcher: 'close-watcher';
|
|
119
119
|
|
|
120
120
|
declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
|
|
121
121
|
|
|
@@ -127,15 +127,15 @@ declare type CollisionAvoidance = SideFlipMode | SideShiftMode;
|
|
|
127
127
|
*/
|
|
128
128
|
declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => React_2.ReactElement<unknown>;
|
|
129
129
|
|
|
130
|
-
declare const decrementPress:
|
|
130
|
+
declare const decrementPress: 'decrement-press';
|
|
131
131
|
|
|
132
|
-
declare const disabled:
|
|
132
|
+
declare const disabled: 'disabled';
|
|
133
133
|
|
|
134
|
-
declare const drag:
|
|
134
|
+
declare const drag: 'drag';
|
|
135
135
|
|
|
136
136
|
declare type Errors = Record<string, string | string[]>;
|
|
137
137
|
|
|
138
|
-
declare const escapeKey:
|
|
138
|
+
declare const escapeKey: 'escape-key';
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Groups all parts of the field.
|
|
@@ -169,11 +169,12 @@ declare interface FieldRootProps extends BaseUIComponentProps<'div', FieldRootSt
|
|
|
169
169
|
name?: string | undefined;
|
|
170
170
|
/**
|
|
171
171
|
* A function for custom validation. Return a string or an array of strings with
|
|
172
|
-
* the error message(s) if the value is invalid,
|
|
172
|
+
* the error message(s) if the value is invalid. Returning nothing, `null`, an empty
|
|
173
|
+
* string, or an empty array means the value is valid.
|
|
173
174
|
* Asynchronous functions are supported, but they do not prevent form submission
|
|
174
175
|
* when using `validationMode="onSubmit"`.
|
|
175
176
|
*/
|
|
176
|
-
validate?: ((value: unknown, formValues: Form.Values) => string | string[] | null | Promise<string | string[] | null>) | undefined;
|
|
177
|
+
validate?: ((value: unknown, formValues: Form.Values) => string | string[] | null | void | Promise<string | string[] | null | void>) | undefined;
|
|
177
178
|
/**
|
|
178
179
|
* Determines when the field should be validated.
|
|
179
180
|
* This takes precedence over the `validationMode` prop on `<Form>`.
|
|
@@ -260,32 +261,7 @@ declare interface FieldValidityData {
|
|
|
260
261
|
initialValue: unknown;
|
|
261
262
|
}
|
|
262
263
|
|
|
263
|
-
|
|
264
|
-
* Portals the floating element into a given container element — by default,
|
|
265
|
-
* outside of the app root and into the body.
|
|
266
|
-
* This is necessary to ensure the floating element can appear outside any
|
|
267
|
-
* potential parent containers that cause clipping (such as `overflow: hidden`),
|
|
268
|
-
* while retaining its location in the React tree.
|
|
269
|
-
* @see https://floating-ui.com/docs/FloatingPortal
|
|
270
|
-
* @internal
|
|
271
|
-
*/
|
|
272
|
-
declare const FloatingPortal: React_2.ForwardRefExoticComponent<Omit<FloatingPortal.Props<any> & {
|
|
273
|
-
renderGuards?: boolean | undefined;
|
|
274
|
-
}, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
275
|
-
|
|
276
|
-
declare namespace FloatingPortal {
|
|
277
|
-
type State = FloatingPortalState;
|
|
278
|
-
interface Props<TState> extends BaseUIComponentProps<'div', TState> {
|
|
279
|
-
/**
|
|
280
|
-
* A parent element to render the portal element into.
|
|
281
|
-
*/
|
|
282
|
-
container?: UseFloatingPortalNodeProps['container'] | undefined;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
declare interface FloatingPortalState {}
|
|
287
|
-
|
|
288
|
-
declare const focusOut: "focus-out";
|
|
264
|
+
declare const focusOut: 'focus-out';
|
|
289
265
|
|
|
290
266
|
/**
|
|
291
267
|
* A native form element with consolidated error handling.
|
|
@@ -316,6 +292,7 @@ declare interface FormActions {
|
|
|
316
292
|
declare interface FormContext {
|
|
317
293
|
errors: Errors;
|
|
318
294
|
clearErrors: (name: string | undefined) => void;
|
|
295
|
+
elementRef: React_2.RefObject<HTMLFormElement | null>;
|
|
319
296
|
formRef: React_2.RefObject<{
|
|
320
297
|
fields: Map<string, {
|
|
321
298
|
name: string | undefined;
|
|
@@ -330,12 +307,12 @@ declare interface FormContext {
|
|
|
330
307
|
}>;
|
|
331
308
|
}>;
|
|
332
309
|
validationMode: Form.ValidationMode;
|
|
333
|
-
|
|
310
|
+
submitCountRef: React_2.RefObject<number>;
|
|
334
311
|
}
|
|
335
312
|
|
|
336
313
|
declare const FormContext: React_2.Context<FormContext>;
|
|
337
314
|
|
|
338
|
-
declare interface FormProps<FormValues extends Record<string, any> = Record<string, any>> extends BaseUIComponentProps<'form', FormState
|
|
315
|
+
declare interface FormProps<FormValues extends Record<string, any> = Record<string, any>> extends BaseUIComponentProps<'form', FormState, React_2.ComponentPropsWithRef<'form'>> {
|
|
339
316
|
/**
|
|
340
317
|
* Determines when the form should be validated.
|
|
341
318
|
* The `validationMode` prop on `<Field.Root>` takes precedence over this.
|
|
@@ -364,10 +341,10 @@ declare interface FormProps<FormValues extends Record<string, any> = Record<stri
|
|
|
364
341
|
* @example
|
|
365
342
|
* ```tsx
|
|
366
343
|
* // validate all fields
|
|
367
|
-
* actionsRef.current
|
|
344
|
+
* actionsRef.current?.validate();
|
|
368
345
|
*
|
|
369
346
|
* // validate one field
|
|
370
|
-
* actionsRef.current
|
|
347
|
+
* actionsRef.current?.validate('email');
|
|
371
348
|
* ```
|
|
372
349
|
*/
|
|
373
350
|
actionsRef?: React_2.RefObject<Form.Actions | null> | undefined;
|
|
@@ -390,31 +367,31 @@ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
|
390
367
|
ref?: React_2.Ref<T> | undefined;
|
|
391
368
|
};
|
|
392
369
|
|
|
393
|
-
declare const imperativeAction:
|
|
370
|
+
declare const imperativeAction: 'imperative-action';
|
|
394
371
|
|
|
395
|
-
declare const incrementPress:
|
|
372
|
+
declare const incrementPress: 'increment-press';
|
|
396
373
|
|
|
397
|
-
declare const initial:
|
|
374
|
+
declare const initial: 'initial';
|
|
398
375
|
|
|
399
|
-
declare const inputBlur:
|
|
376
|
+
declare const inputBlur: 'input-blur';
|
|
400
377
|
|
|
401
|
-
declare const inputChange:
|
|
378
|
+
declare const inputChange: 'input-change';
|
|
402
379
|
|
|
403
|
-
declare const inputClear:
|
|
380
|
+
declare const inputClear: 'input-clear';
|
|
404
381
|
|
|
405
|
-
declare const inputPaste:
|
|
382
|
+
declare const inputPaste: 'input-paste';
|
|
406
383
|
|
|
407
|
-
declare const inputPress:
|
|
384
|
+
declare const inputPress: 'input-press';
|
|
408
385
|
|
|
409
|
-
declare const itemPress:
|
|
386
|
+
declare const itemPress: 'item-press';
|
|
410
387
|
|
|
411
|
-
declare const keyboard:
|
|
388
|
+
declare const keyboard: 'keyboard';
|
|
412
389
|
|
|
413
|
-
declare const linkPress:
|
|
390
|
+
declare const linkPress: 'link-press';
|
|
414
391
|
|
|
415
|
-
declare const listNavigation:
|
|
392
|
+
declare const listNavigation: 'list-navigation';
|
|
416
393
|
|
|
417
|
-
declare const missing:
|
|
394
|
+
declare const missing: 'missing';
|
|
418
395
|
|
|
419
396
|
declare interface NativeButtonProps {
|
|
420
397
|
/**
|
|
@@ -426,7 +403,7 @@ declare interface NativeButtonProps {
|
|
|
426
403
|
nativeButton?: boolean | undefined;
|
|
427
404
|
}
|
|
428
405
|
|
|
429
|
-
declare const none:
|
|
406
|
+
declare const none: 'none';
|
|
430
407
|
|
|
431
408
|
declare interface NonNativeButtonProps {
|
|
432
409
|
/**
|
|
@@ -453,9 +430,11 @@ declare type OffsetFunction = (data: {
|
|
|
453
430
|
|
|
454
431
|
declare type Orientation = 'horizontal' | 'vertical';
|
|
455
432
|
|
|
456
|
-
declare const outsidePress:
|
|
433
|
+
declare const outsidePress: 'outside-press';
|
|
434
|
+
|
|
435
|
+
declare const pointer: 'pointer';
|
|
457
436
|
|
|
458
|
-
declare const
|
|
437
|
+
declare const popupClose: 'popup-close';
|
|
459
438
|
|
|
460
439
|
declare namespace REASONS {
|
|
461
440
|
export {
|
|
@@ -486,6 +465,7 @@ declare namespace REASONS {
|
|
|
486
465
|
drag,
|
|
487
466
|
wheel,
|
|
488
467
|
scrub,
|
|
468
|
+
popupClose,
|
|
489
469
|
cancelOpen,
|
|
490
470
|
siblingOpen,
|
|
491
471
|
disabled,
|
|
@@ -542,7 +522,7 @@ declare interface ReasonToEventMap {
|
|
|
542
522
|
|
|
543
523
|
declare type RootOwnProps = Omit<React_2.ComponentProps<typeof Select.Root>, 'children'>;
|
|
544
524
|
|
|
545
|
-
declare const scrub:
|
|
525
|
+
declare const scrub: 'scrub';
|
|
546
526
|
|
|
547
527
|
declare const Select: {
|
|
548
528
|
Root: typeof Select_2.Root;
|
|
@@ -595,7 +575,7 @@ declare const Select: {
|
|
|
595
575
|
GroupLabel: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<SelectGroupLabelProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
596
576
|
className?: string;
|
|
597
577
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
598
|
-
Separator: React_2.ForwardRefExoticComponent<Omit<Omit<
|
|
578
|
+
Separator: React_2.ForwardRefExoticComponent<Omit<Omit<SelectSeparatorProps_2 & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
|
|
599
579
|
className?: string;
|
|
600
580
|
} & React_2.RefAttributes<HTMLDivElement>>;
|
|
601
581
|
};
|
|
@@ -620,7 +600,7 @@ export declare namespace Select_2 {
|
|
|
620
600
|
SelectScrollUpArrow as ScrollUpArrow,
|
|
621
601
|
SelectGroup as Group,
|
|
622
602
|
SelectGroupLabel as GroupLabel,
|
|
623
|
-
Separator
|
|
603
|
+
SelectSeparator as Separator
|
|
624
604
|
}
|
|
625
605
|
}
|
|
626
606
|
|
|
@@ -659,7 +639,7 @@ declare interface SelectArrowState {
|
|
|
659
639
|
}
|
|
660
640
|
|
|
661
641
|
/**
|
|
662
|
-
* An overlay displayed beneath the
|
|
642
|
+
* An overlay displayed beneath the select popup.
|
|
663
643
|
* Renders a `<div>` element.
|
|
664
644
|
*
|
|
665
645
|
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
@@ -856,6 +836,8 @@ declare interface SelectIconState {
|
|
|
856
836
|
open: boolean;
|
|
857
837
|
}
|
|
858
838
|
|
|
839
|
+
declare type SelectInputValue<Value, Multiple extends boolean | undefined> = Multiple extends true ? readonly Value[] : Value;
|
|
840
|
+
|
|
859
841
|
/**
|
|
860
842
|
* An individual option in the select popup.
|
|
861
843
|
* Renders a `<div>` element.
|
|
@@ -987,6 +969,8 @@ declare interface SelectListProps extends BaseUIComponentProps<'div', SelectList
|
|
|
987
969
|
|
|
988
970
|
declare interface SelectListState {}
|
|
989
971
|
|
|
972
|
+
declare type SelectOutputValue<Value, Multiple extends boolean | undefined> = Multiple extends true ? Value[] : Value;
|
|
973
|
+
|
|
990
974
|
/**
|
|
991
975
|
* A container for the select list.
|
|
992
976
|
* Renders a `<div>` element.
|
|
@@ -1047,7 +1031,12 @@ declare namespace SelectPortal {
|
|
|
1047
1031
|
type Props = SelectPortalProps;
|
|
1048
1032
|
}
|
|
1049
1033
|
|
|
1050
|
-
declare interface SelectPortalProps extends
|
|
1034
|
+
declare interface SelectPortalProps extends BaseUIComponentProps<'div', SelectPortalState> {
|
|
1035
|
+
/**
|
|
1036
|
+
* A parent element to render the portal element into.
|
|
1037
|
+
*/
|
|
1038
|
+
container?: HTMLElement | ShadowRoot | React_2.RefObject<HTMLElement | ShadowRoot | null> | null | undefined;
|
|
1039
|
+
}
|
|
1051
1040
|
|
|
1052
1041
|
declare interface SelectPortalState {}
|
|
1053
1042
|
|
|
@@ -1105,15 +1094,22 @@ declare namespace SelectRoot {
|
|
|
1105
1094
|
type Actions = SelectRootActions;
|
|
1106
1095
|
type ChangeEventReason = SelectRootChangeEventReason;
|
|
1107
1096
|
type ChangeEventDetails = SelectRootChangeEventDetails;
|
|
1097
|
+
type OpenChangeEventDetails = SelectRootOpenChangeEventDetails;
|
|
1108
1098
|
}
|
|
1109
1099
|
|
|
1110
1100
|
declare interface SelectRootActions {
|
|
1111
1101
|
unmount: () => void;
|
|
1102
|
+
close: () => void;
|
|
1112
1103
|
}
|
|
1113
1104
|
|
|
1114
1105
|
declare type SelectRootChangeEventDetails = BaseUIChangeEventDetails<SelectRootChangeEventReason>;
|
|
1115
1106
|
|
|
1116
|
-
declare type SelectRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.windowResize | typeof REASONS.itemPress | typeof REASONS.focusOut | typeof REASONS.listNavigation | typeof REASONS.cancelOpen | typeof REASONS.none;
|
|
1107
|
+
declare type SelectRootChangeEventReason = typeof REASONS.triggerPress | typeof REASONS.outsidePress | typeof REASONS.escapeKey | typeof REASONS.windowResize | typeof REASONS.itemPress | typeof REASONS.focusOut | typeof REASONS.listNavigation | typeof REASONS.cancelOpen | typeof REASONS.imperativeAction | typeof REASONS.none;
|
|
1108
|
+
|
|
1109
|
+
declare type SelectRootOpenChangeEventDetails = SelectRootChangeEventDetails & {
|
|
1110
|
+
/** Prevents the popup from unmounting until the `unmount` action is called. */
|
|
1111
|
+
preventUnmountOnClose: () => void;
|
|
1112
|
+
};
|
|
1117
1113
|
|
|
1118
1114
|
declare interface SelectRootProps<Value, Multiple extends boolean | undefined = false> {
|
|
1119
1115
|
children?: React_2.ReactNode;
|
|
@@ -1175,7 +1171,7 @@ declare interface SelectRootProps<Value, Multiple extends boolean | undefined =
|
|
|
1175
1171
|
/**
|
|
1176
1172
|
* Event handler called when the select popup is opened or closed.
|
|
1177
1173
|
*/
|
|
1178
|
-
onOpenChange?: ((open: boolean, eventDetails:
|
|
1174
|
+
onOpenChange?: ((open: boolean, eventDetails: SelectRootOpenChangeEventDetails) => void) | undefined;
|
|
1179
1175
|
/**
|
|
1180
1176
|
* Event handler called after any animations complete when the select popup is opened or closed.
|
|
1181
1177
|
*/
|
|
@@ -1188,14 +1184,17 @@ declare interface SelectRootProps<Value, Multiple extends boolean | undefined =
|
|
|
1188
1184
|
* Determines if the select enters a modal state when open.
|
|
1189
1185
|
* - `true`: user interaction is limited to the select: document page scroll is locked and pointer interactions on outside elements are disabled.
|
|
1190
1186
|
* - `false`: user interaction with the rest of the document is allowed.
|
|
1187
|
+
*
|
|
1188
|
+
* On touch devices, a `true` modal blocks outside taps but leaves the page scrollable unless the popup spans nearly the full viewport width, matching native iOS behavior.
|
|
1191
1189
|
* @default true
|
|
1192
1190
|
*/
|
|
1193
1191
|
modal?: boolean | undefined;
|
|
1194
1192
|
/**
|
|
1195
1193
|
* A ref to imperative actions.
|
|
1196
|
-
* - `unmount`:
|
|
1197
|
-
*
|
|
1198
|
-
*
|
|
1194
|
+
* - `unmount`: Ends the closing phase of the select after an externally controlled closing animation finishes.
|
|
1195
|
+
* Call `preventUnmountOnClose()` in `onOpenChange` first, otherwise the select completes closing on its own.
|
|
1196
|
+
* Whether it leaves the DOM is decided by `keepMounted` on the portal.
|
|
1197
|
+
* - `close`: Closes the select imperatively when called.
|
|
1199
1198
|
*/
|
|
1200
1199
|
actionsRef?: React_2.RefObject<SelectRootActions | null> | undefined;
|
|
1201
1200
|
/**
|
|
@@ -1236,15 +1235,15 @@ declare interface SelectRootProps<Value, Multiple extends boolean | undefined =
|
|
|
1236
1235
|
*
|
|
1237
1236
|
* To render a controlled select, use the `value` prop instead.
|
|
1238
1237
|
*/
|
|
1239
|
-
defaultValue?:
|
|
1238
|
+
defaultValue?: SelectInputValue<Value, Multiple> | null | undefined;
|
|
1240
1239
|
/**
|
|
1241
1240
|
* The value of the select. Use when controlled.
|
|
1242
1241
|
*/
|
|
1243
|
-
value?:
|
|
1242
|
+
value?: SelectInputValue<Value, Multiple> | null | undefined;
|
|
1244
1243
|
/**
|
|
1245
1244
|
* Event handler called when the value of the select changes.
|
|
1246
1245
|
*/
|
|
1247
|
-
onValueChange?: ((value:
|
|
1246
|
+
onValueChange?: ((value: SelectOutputValue<Value, Multiple> | (Multiple extends true ? never : null), eventDetails: SelectRootChangeEventDetails) => void) | undefined;
|
|
1248
1247
|
}
|
|
1249
1248
|
|
|
1250
1249
|
declare interface SelectRootState {}
|
|
@@ -1295,6 +1294,34 @@ declare interface SelectScrollUpArrowProps extends BaseUIComponentProps<'div', S
|
|
|
1295
1294
|
|
|
1296
1295
|
declare interface SelectScrollUpArrowState {}
|
|
1297
1296
|
|
|
1297
|
+
/**
|
|
1298
|
+
* A visual separator between items or groups.
|
|
1299
|
+
* Renders a `<div>` element.
|
|
1300
|
+
*
|
|
1301
|
+
* Documentation: [Base UI Select](https://base-ui.com/react/components/select)
|
|
1302
|
+
*/
|
|
1303
|
+
declare const SelectSeparator: React_2.ForwardRefExoticComponent<SelectSeparatorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
1304
|
+
|
|
1305
|
+
declare namespace SelectSeparator {
|
|
1306
|
+
type Props = SelectSeparatorProps;
|
|
1307
|
+
type State = SelectSeparatorState;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
declare interface SelectSeparatorProps extends BaseUIComponentProps<'div', SelectSeparatorState> {
|
|
1311
|
+
/**
|
|
1312
|
+
* The orientation of the separator.
|
|
1313
|
+
* @default 'horizontal'
|
|
1314
|
+
*/
|
|
1315
|
+
orientation?: Orientation | undefined;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
declare interface SelectSeparatorState {
|
|
1319
|
+
/**
|
|
1320
|
+
* The orientation of the separator.
|
|
1321
|
+
*/
|
|
1322
|
+
orientation: Orientation;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1298
1325
|
/**
|
|
1299
1326
|
* A button that opens the select popup.
|
|
1300
1327
|
* Renders a `<button>` element.
|
|
@@ -1355,6 +1382,8 @@ declare namespace SelectValue {
|
|
|
1355
1382
|
declare interface SelectValueProps extends Omit<BaseUIComponentProps<'span', SelectValueState>, 'children'> {
|
|
1356
1383
|
/**
|
|
1357
1384
|
* Accepts a function that returns a `ReactNode` to format the selected value.
|
|
1385
|
+
* Treat the value as read-only: in `multiple` mode it may be a shared frozen array
|
|
1386
|
+
* when nothing is selected.
|
|
1358
1387
|
* @example
|
|
1359
1388
|
* ```tsx
|
|
1360
1389
|
* <Select.Value>
|
|
@@ -1381,37 +1410,7 @@ declare interface SelectValueState {
|
|
|
1381
1410
|
placeholder: boolean;
|
|
1382
1411
|
}
|
|
1383
1412
|
|
|
1384
|
-
declare
|
|
1385
|
-
|
|
1386
|
-
/**
|
|
1387
|
-
* A separator element accessible to screen readers.
|
|
1388
|
-
* Renders a `<div>` element.
|
|
1389
|
-
*
|
|
1390
|
-
* Documentation: [Base UI Separator](https://base-ui.com/react/components/separator)
|
|
1391
|
-
*/
|
|
1392
|
-
declare const Separator: React_2.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1393
|
-
|
|
1394
|
-
declare namespace Separator {
|
|
1395
|
-
type Props = SeparatorProps;
|
|
1396
|
-
type State = SeparatorState;
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
declare interface SeparatorProps extends BaseUIComponentProps<'div', SeparatorState> {
|
|
1400
|
-
/**
|
|
1401
|
-
* The orientation of the separator.
|
|
1402
|
-
* @default 'horizontal'
|
|
1403
|
-
*/
|
|
1404
|
-
orientation?: Orientation | undefined;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
declare interface SeparatorState {
|
|
1408
|
-
/**
|
|
1409
|
-
* The orientation of the separator.
|
|
1410
|
-
*/
|
|
1411
|
-
orientation: Orientation;
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
declare const siblingOpen: "sibling-open";
|
|
1413
|
+
declare const siblingOpen: 'sibling-open';
|
|
1415
1414
|
|
|
1416
1415
|
declare type Side = 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start';
|
|
1417
1416
|
|
|
@@ -1462,17 +1461,17 @@ declare interface SideShiftMode {
|
|
|
1462
1461
|
fallbackAxisSide?: 'start' | 'end' | 'none' | undefined;
|
|
1463
1462
|
}
|
|
1464
1463
|
|
|
1465
|
-
declare const swipe:
|
|
1464
|
+
declare const swipe: 'swipe';
|
|
1466
1465
|
|
|
1467
|
-
declare const trackPress:
|
|
1466
|
+
declare const trackPress: 'track-press';
|
|
1468
1467
|
|
|
1469
1468
|
declare type TransitionStatus = 'starting' | 'ending' | 'idle' | undefined;
|
|
1470
1469
|
|
|
1471
|
-
declare const triggerFocus:
|
|
1470
|
+
declare const triggerFocus: 'trigger-focus';
|
|
1472
1471
|
|
|
1473
|
-
declare const triggerHover:
|
|
1472
|
+
declare const triggerHover: 'trigger-hover';
|
|
1474
1473
|
|
|
1475
|
-
declare const triggerPress:
|
|
1474
|
+
declare const triggerPress: 'trigger-press';
|
|
1476
1475
|
|
|
1477
1476
|
declare interface UseAnchorPositioningSharedParameters {
|
|
1478
1477
|
/**
|
|
@@ -1616,33 +1615,9 @@ declare interface UseAnchorPositioningSharedParameters {
|
|
|
1616
1615
|
collisionAvoidance?: CollisionAvoidance | undefined;
|
|
1617
1616
|
}
|
|
1618
1617
|
|
|
1619
|
-
declare
|
|
1620
|
-
ref?: React_2.Ref<HTMLDivElement> | undefined;
|
|
1621
|
-
container?: HTMLElement | ShadowRoot | null | React_2.RefObject<HTMLElement | ShadowRoot | null> | undefined;
|
|
1622
|
-
componentProps?: UseRenderElementComponentProps<any> | undefined;
|
|
1623
|
-
elementProps?: React_2.HTMLAttributes<HTMLDivElement> | undefined;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
declare interface UseRenderElementComponentProps<State> {
|
|
1627
|
-
/**
|
|
1628
|
-
* The class name to apply to the rendered element.
|
|
1629
|
-
* Can be a string or a function that accepts the state and returns a string.
|
|
1630
|
-
*/
|
|
1631
|
-
className?: string | ((state: State) => string | undefined) | undefined;
|
|
1632
|
-
/**
|
|
1633
|
-
* The render prop or React element to override the default element.
|
|
1634
|
-
*/
|
|
1635
|
-
render?: undefined | React_2.ReactElement | ComponentRenderFn<React_2.HTMLAttributes<any>, State>;
|
|
1636
|
-
/**
|
|
1637
|
-
* The style to apply to the rendered element.
|
|
1638
|
-
* Can be a style object or a function that accepts the state and returns a style object.
|
|
1639
|
-
*/
|
|
1640
|
-
style?: React_2.CSSProperties | ((state: State) => React_2.CSSProperties | undefined) | undefined;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
declare const wheel: "wheel";
|
|
1618
|
+
declare const wheel: 'wheel';
|
|
1644
1619
|
|
|
1645
|
-
declare const windowResize:
|
|
1620
|
+
declare const windowResize: 'window-resize';
|
|
1646
1621
|
|
|
1647
1622
|
/**
|
|
1648
1623
|
* Adds a `preventBaseUIHandler` method to all event handlers.
|
|
@@ -41,11 +41,15 @@ function renderOption(option) {
|
|
|
41
41
|
})
|
|
42
42
|
}, value);
|
|
43
43
|
}
|
|
44
|
-
const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options, label, 'aria-label': ariaLabel, placeholder, description, error, variant = 'floating', alignment = 'start', invalid = false, loading = false, required = false, disabled = false, readOnly, icon = /*#__PURE__*/ jsx(ChevronDown, {}), outerBorder = false, sideOffset = 4, dir, triggerClassName, popupClassName, ...rootProps }, ref)=>/*#__PURE__*/ jsx(Field.Root, {
|
|
44
|
+
const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options, label, 'aria-label': ariaLabel, placeholder, description, error, variant = 'floating', alignment = 'start', invalid = false, loading = false, required = false, disabled = false, readOnly, onOpenChange, icon = /*#__PURE__*/ jsx(ChevronDown, {}), outerBorder = false, sideOffset = 4, dir, triggerClassName, popupClassName, ...rootProps }, ref)=>/*#__PURE__*/ jsx(Field.Root, {
|
|
45
45
|
invalid: invalid,
|
|
46
46
|
disabled: disabled,
|
|
47
47
|
children: /*#__PURE__*/ jsxs(Select.Root, {
|
|
48
48
|
readOnly: readOnly || loading,
|
|
49
|
+
onOpenChange: (nextOpen, eventDetails)=>{
|
|
50
|
+
if (loading && nextOpen) return void eventDetails.cancel();
|
|
51
|
+
onOpenChange?.(nextOpen, eventDetails);
|
|
52
|
+
},
|
|
49
53
|
required: required,
|
|
50
54
|
disabled: disabled,
|
|
51
55
|
...rootProps,
|
|
@@ -45,6 +45,12 @@ declare type HTMLProps<T = any> = React_2.HTMLAttributes<T> & {
|
|
|
45
45
|
|
|
46
46
|
declare type Orientation = 'horizontal' | 'vertical';
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Indicates the orientation of the separator.
|
|
50
|
+
* @type {'horizontal' | 'vertical'}
|
|
51
|
+
*/
|
|
52
|
+
declare const orientation_2 = "data-orientation";
|
|
53
|
+
|
|
48
54
|
export declare const Separator: React_2.ForwardRefExoticComponent<SeparatorProps_2 & React_2.RefAttributes<HTMLDivElement>>;
|
|
49
55
|
|
|
50
56
|
/**
|
|
@@ -60,6 +66,12 @@ declare namespace Separator_2 {
|
|
|
60
66
|
type State = SeparatorState;
|
|
61
67
|
}
|
|
62
68
|
|
|
69
|
+
export declare namespace SeparatorDataAttributes {
|
|
70
|
+
export {
|
|
71
|
+
orientation_2 as orientation
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
63
75
|
export declare interface SeparatorProps extends BaseUIComponentProps<'div', SeparatorState> {
|
|
64
76
|
/**
|
|
65
77
|
* The orientation of the separator.
|
package/dist/Separator/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
|
-
import { Separator as Separator_Separator } from "../
|
|
3
|
+
import { Separator as Separator_Separator } from "../6498.js";
|
|
4
4
|
import * as __rspack_external_react from "react";
|
|
5
5
|
const Separator_module = {
|
|
6
6
|
root: "root-rb7o7e",
|