@ark-ui/solid 3.0.0-4 → 3.0.0-5
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/cjs/index.js +290 -215
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +292 -217
- package/dist/esm/index.js.map +1 -1
- package/dist/source/components/accordion/accordion-item-content.jsx +7 -2
- package/dist/source/components/accordion/accordion-root.jsx +1 -0
- package/dist/source/components/accordion/use-accordion.js +12 -3
- package/dist/source/components/avatar/use-avatar.js +9 -3
- package/dist/source/components/carousel/carousel-root.jsx +1 -0
- package/dist/source/components/carousel/use-carousel.js +10 -3
- package/dist/source/components/checkbox/checkbox-root.jsx +1 -0
- package/dist/source/components/checkbox/use-checkbox.js +10 -3
- package/dist/source/components/clipboard/use-clipboard.js +8 -3
- package/dist/source/components/collapsible/collapsible-root.jsx +1 -0
- package/dist/source/components/collapsible/use-collapsible.js +8 -5
- package/dist/source/components/color-picker/color-picker-root.jsx +2 -0
- package/dist/source/components/color-picker/use-color-picker.js +14 -8
- package/dist/source/components/combobox/combobox-root.jsx +4 -2
- package/dist/source/components/combobox/combobox-trigger.jsx +3 -1
- package/dist/source/components/combobox/use-combobox.js +12 -10
- package/dist/source/components/date-picker/date-picker-root.jsx +2 -0
- package/dist/source/components/date-picker/use-date-picker.js +17 -11
- package/dist/source/components/dialog/dialog-root.jsx +2 -0
- package/dist/source/components/dialog/use-dialog.js +8 -5
- package/dist/source/components/editable/editable-root.jsx +1 -0
- package/dist/source/components/editable/use-editable.js +10 -3
- package/dist/source/components/file-upload/use-file-upload.js +9 -3
- package/dist/source/components/hover-card/hover-card-root.jsx +1 -0
- package/dist/source/components/hover-card/use-hover-card.js +8 -5
- package/dist/source/components/menu/menu-root.jsx +2 -0
- package/dist/source/components/menu/use-menu.js +8 -5
- package/dist/source/components/number-input/number-input-root.jsx +1 -0
- package/dist/source/components/number-input/use-number-input.js +10 -3
- package/dist/source/components/pagination/pagination-root.jsx +1 -0
- package/dist/source/components/pagination/use-pagination.js +10 -3
- package/dist/source/components/pin-input/pin-input-root.jsx +1 -0
- package/dist/source/components/pin-input/use-pin-input.js +10 -3
- package/dist/source/components/popover/popover-root.jsx +3 -1
- package/dist/source/components/popover/use-popover.js +8 -5
- package/dist/source/components/progress/use-progress.js +9 -3
- package/dist/source/components/radio-group/radio-group-root.jsx +1 -0
- package/dist/source/components/radio-group/use-radio-group.js +10 -3
- package/dist/source/components/rating-group/rating-group-root.jsx +1 -0
- package/dist/source/components/rating-group/use-rating-group.js +10 -3
- package/dist/source/components/segment-group/segment-group-root.jsx +1 -0
- package/dist/source/components/segment-group/use-segment-group.js +12 -5
- package/dist/source/components/select/select-item.jsx +1 -1
- package/dist/source/components/select/select-root.jsx +3 -0
- package/dist/source/components/select/use-select.js +12 -10
- package/dist/source/components/slider/slider-root.jsx +1 -0
- package/dist/source/components/slider/use-slider.js +10 -3
- package/dist/source/components/splitter/splitter-root.jsx +1 -0
- package/dist/source/components/splitter/use-splitter.js +10 -3
- package/dist/source/components/switch/switch-root.jsx +1 -0
- package/dist/source/components/switch/use-switch.js +10 -3
- package/dist/source/components/tabs/tabs-root.jsx +2 -0
- package/dist/source/components/tabs/use-tabs.js +10 -3
- package/dist/source/components/tags-input/tags-input-root.jsx +1 -0
- package/dist/source/components/tags-input/use-tags-input.js +10 -3
- package/dist/source/components/toggle-group/toggle-group-root.jsx +1 -0
- package/dist/source/components/toggle-group/use-toggle-group.js +10 -3
- package/dist/source/components/tooltip/tooltip-root.jsx +2 -1
- package/dist/source/components/tooltip/use-tooltip.js +8 -5
- package/dist/source/components/tree-view/tree-view-root.jsx +3 -1
- package/dist/source/components/tree-view/use-tree-view.js +11 -3
- package/dist/source/providers/locale/locale-provider.jsx +5 -19
- package/dist/types/components/accordion/accordion-item.d.ts +1 -2
- package/dist/types/components/accordion/use-accordion.d.ts +5 -0
- package/dist/types/components/carousel/use-carousel.d.ts +5 -0
- package/dist/types/components/checkbox/use-checkbox.d.ts +5 -0
- package/dist/types/components/collapsible/use-collapsible.d.ts +5 -0
- package/dist/types/components/color-picker/use-color-picker.d.ts +10 -0
- package/dist/types/components/combobox/combobox-trigger.d.ts +3 -1
- package/dist/types/components/combobox/use-combobox.d.ts +10 -0
- package/dist/types/components/date-picker/use-date-picker.d.ts +14 -4
- package/dist/types/components/dialog/use-dialog.d.ts +5 -0
- package/dist/types/components/editable/use-editable.d.ts +5 -0
- package/dist/types/components/hover-card/use-hover-card.d.ts +5 -0
- package/dist/types/components/menu/use-menu.d.ts +5 -0
- package/dist/types/components/number-input/use-number-input.d.ts +5 -0
- package/dist/types/components/pagination/use-pagination.d.ts +5 -0
- package/dist/types/components/pin-input/use-pin-input.d.ts +5 -0
- package/dist/types/components/popover/use-popover.d.ts +5 -0
- package/dist/types/components/radio-group/use-radio-group.d.ts +5 -0
- package/dist/types/components/rating-group/use-rating-group.d.ts +5 -0
- package/dist/types/components/segment-group/use-segment-group.d.ts +8 -3
- package/dist/types/components/select/use-select.d.ts +10 -0
- package/dist/types/components/slider/use-slider.d.ts +5 -0
- package/dist/types/components/splitter/use-splitter.d.ts +5 -0
- package/dist/types/components/switch/use-switch.d.ts +5 -0
- package/dist/types/components/tabs/use-tabs.d.ts +5 -0
- package/dist/types/components/tags-input/use-tags-input.d.ts +5 -0
- package/dist/types/components/toggle-group/use-toggle-group.d.ts +5 -0
- package/dist/types/components/tooltip/use-tooltip.d.ts +5 -0
- package/dist/types/components/tree-view/use-tree-view.d.ts +10 -0
- package/dist/types/providers/locale/locale-provider.d.ts +3 -5
- package/package.json +46 -46
- /package/dist/source/providers/locale/{use-locale-context.jsx → use-locale-context.js} +0 -0
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext as createContext$1, useContext, splitProps, Show, createSignal, createMemo,
|
|
1
|
+
import { createContext as createContext$1, useContext, splitProps, Show, createSignal, createMemo, createUniqueId, createEffect, children, Index, For } from 'solid-js';
|
|
2
2
|
import { memo, createComponent, Dynamic, mergeProps, use, template, insert, effect, spread } from 'solid-js/web';
|
|
3
3
|
import { mergeProps as mergeProps$1, useMachine, normalizeProps, useActor } from '@zag-js/solid';
|
|
4
4
|
import * as collapsible$1 from '@zag-js/collapsible';
|
|
@@ -15,7 +15,7 @@ import * as datePicker$1 from '@zag-js/date-picker';
|
|
|
15
15
|
import * as dialog$1 from '@zag-js/dialog';
|
|
16
16
|
import * as editable$1 from '@zag-js/editable';
|
|
17
17
|
import * as fileUpload$1 from '@zag-js/file-upload';
|
|
18
|
-
import {
|
|
18
|
+
import { isRTL, formatBytes, formatNumber } from '@zag-js/i18n-utils';
|
|
19
19
|
import * as hoverCard$1 from '@zag-js/hover-card';
|
|
20
20
|
import * as menu$1 from '@zag-js/menu';
|
|
21
21
|
import * as numberInput$1 from '@zag-js/number-input';
|
|
@@ -191,27 +191,14 @@ const [LocaleContextProvider, useLocaleContext] = createContext({
|
|
|
191
191
|
});
|
|
192
192
|
|
|
193
193
|
const LocaleProvider = props => {
|
|
194
|
-
const [localeProps, restProps] = splitProps(props, ['locale', 'defaultLocale']);
|
|
195
|
-
const [locale, setLocale] = createSignal(localeProps.defaultLocale || localeProps.locale || 'en-US');
|
|
196
|
-
const environment = useEnvironmentContext();
|
|
197
|
-
createEffect(() => {
|
|
198
|
-
const cleanup = trackLocale({
|
|
199
|
-
locale: localeProps.locale,
|
|
200
|
-
getRootNode: environment().getRootNode,
|
|
201
|
-
onLocaleChange(locale) {
|
|
202
|
-
setLocale(locale.locale);
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
onCleanup(cleanup);
|
|
206
|
-
});
|
|
207
194
|
const context = createMemo(() => ({
|
|
208
|
-
locale: locale
|
|
209
|
-
dir: isRTL(locale
|
|
195
|
+
locale: props.locale,
|
|
196
|
+
dir: isRTL(props.locale) ? 'rtl' : 'ltr'
|
|
210
197
|
}));
|
|
211
198
|
return createComponent(LocaleContextProvider, {
|
|
212
199
|
value: context,
|
|
213
200
|
get children() {
|
|
214
|
-
return
|
|
201
|
+
return props.children;
|
|
215
202
|
}
|
|
216
203
|
});
|
|
217
204
|
};
|
|
@@ -220,13 +207,16 @@ const useCollapsible = props => {
|
|
|
220
207
|
const locale = useLocaleContext();
|
|
221
208
|
const environment = useEnvironmentContext();
|
|
222
209
|
const [renderStrategyProps, collapsibleProps] = splitRenderStrategyProps(props);
|
|
223
|
-
const
|
|
224
|
-
|
|
210
|
+
const id = createUniqueId();
|
|
211
|
+
const context = createMemo(() => ({
|
|
212
|
+
id,
|
|
225
213
|
dir: locale().dir,
|
|
226
214
|
getRootNode: environment().getRootNode,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
215
|
+
open: props.defaultOpen,
|
|
216
|
+
'open.controlled': props.open !== undefined,
|
|
217
|
+
...collapsibleProps
|
|
218
|
+
}));
|
|
219
|
+
const [state, send] = useMachine(collapsible$1.machine(context()), {
|
|
230
220
|
context
|
|
231
221
|
});
|
|
232
222
|
const [wasVisible, setWasVisible] = createSignal(false);
|
|
@@ -242,7 +232,7 @@ const useCollapsible = props => {
|
|
|
242
232
|
};
|
|
243
233
|
|
|
244
234
|
const CollapsibleRoot = props => {
|
|
245
|
-
const [useCollapsibleProps, localProps] = createSplitProps()(props, ['disabled', 'id', 'ids', 'lazyMount', 'onExitComplete', 'onOpenChange', 'open', 'unmountOnExit']);
|
|
235
|
+
const [useCollapsibleProps, localProps] = createSplitProps()(props, ['defaultOpen', 'disabled', 'id', 'ids', 'lazyMount', 'onExitComplete', 'onOpenChange', 'open', 'unmountOnExit']);
|
|
246
236
|
const api = useCollapsible(useCollapsibleProps);
|
|
247
237
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
248
238
|
return createComponent(CollapsibleProvider, {
|
|
@@ -306,12 +296,13 @@ const AccordionItem = props => {
|
|
|
306
296
|
});
|
|
307
297
|
};
|
|
308
298
|
|
|
299
|
+
const splitVisibilityProps = createSplitProps();
|
|
309
300
|
const AccordionItemContent = props => {
|
|
310
301
|
const accordion = useAccordionContext();
|
|
311
302
|
const itemProps = useAccordionItemPropsContext();
|
|
312
303
|
const itemContentProps = createMemo(() => {
|
|
313
|
-
const
|
|
314
|
-
ownProps
|
|
304
|
+
const contentProps = accordion().getItemContentProps(itemProps);
|
|
305
|
+
const [, ownProps] = splitVisibilityProps(contentProps, ['hidden', 'data-state']);
|
|
315
306
|
return ownProps;
|
|
316
307
|
});
|
|
317
308
|
const mergedProps = mergeProps$1(itemContentProps, props);
|
|
@@ -337,14 +328,17 @@ const AccordionItemTrigger = props => {
|
|
|
337
328
|
};
|
|
338
329
|
|
|
339
330
|
const useAccordion = props => {
|
|
331
|
+
const id = createUniqueId();
|
|
340
332
|
const locale = useLocaleContext();
|
|
341
333
|
const environment = useEnvironmentContext();
|
|
342
|
-
const context =
|
|
343
|
-
id
|
|
334
|
+
const context = createMemo(() => ({
|
|
335
|
+
id,
|
|
344
336
|
dir: locale().dir,
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
value: props.defaultValue,
|
|
338
|
+
getRootNode: environment().getRootNode,
|
|
339
|
+
...props
|
|
340
|
+
}));
|
|
341
|
+
const [state, send] = useMachine(accordion$1.machine(context()), {
|
|
348
342
|
context
|
|
349
343
|
});
|
|
350
344
|
return createMemo(() => accordion$1.connect(state, send, normalizeProps));
|
|
@@ -352,7 +346,7 @@ const useAccordion = props => {
|
|
|
352
346
|
|
|
353
347
|
const AccordionRoot = props => {
|
|
354
348
|
const [renderStrategyProps, accordionProps] = splitRenderStrategyProps(props);
|
|
355
|
-
const [useAccordionProps, localProps] = createSplitProps()(accordionProps, ['collapsible', 'disabled', 'id', 'ids', 'multiple', 'onFocusChange', 'onValueChange', 'orientation', 'value']);
|
|
349
|
+
const [useAccordionProps, localProps] = createSplitProps()(accordionProps, ['collapsible', 'defaultValue', 'disabled', 'id', 'ids', 'multiple', 'onFocusChange', 'onValueChange', 'orientation', 'value']);
|
|
356
350
|
const api = useAccordion(useAccordionProps);
|
|
357
351
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
358
352
|
return createComponent(AccordionProvider, {
|
|
@@ -401,12 +395,14 @@ const AvatarImage = props => {
|
|
|
401
395
|
const useAvatar = props => {
|
|
402
396
|
const locale = useLocaleContext();
|
|
403
397
|
const environment = useEnvironmentContext();
|
|
404
|
-
const
|
|
405
|
-
|
|
398
|
+
const id = createUniqueId();
|
|
399
|
+
const context = createMemo(() => ({
|
|
400
|
+
id,
|
|
406
401
|
dir: locale().dir,
|
|
407
|
-
getRootNode: environment().getRootNode
|
|
408
|
-
|
|
409
|
-
|
|
402
|
+
getRootNode: environment().getRootNode,
|
|
403
|
+
...props
|
|
404
|
+
}));
|
|
405
|
+
const [state, send] = useMachine(avatar$1.machine(context()), {
|
|
410
406
|
context
|
|
411
407
|
});
|
|
412
408
|
return createMemo(() => avatar$1.connect(state, send, normalizeProps));
|
|
@@ -485,19 +481,22 @@ const CarouselPrevTrigger = props => {
|
|
|
485
481
|
const useCarousel = props => {
|
|
486
482
|
const locale = useLocaleContext();
|
|
487
483
|
const environment = useEnvironmentContext();
|
|
488
|
-
const
|
|
489
|
-
|
|
484
|
+
const id = createUniqueId();
|
|
485
|
+
const context = createMemo(() => ({
|
|
486
|
+
id,
|
|
490
487
|
dir: locale().dir,
|
|
491
|
-
getRootNode: environment().getRootNode
|
|
492
|
-
|
|
493
|
-
|
|
488
|
+
getRootNode: environment().getRootNode,
|
|
489
|
+
index: props.defaultIndex,
|
|
490
|
+
...props
|
|
491
|
+
}));
|
|
492
|
+
const [state, send] = useMachine(carousel$1.machine(context()), {
|
|
494
493
|
context
|
|
495
494
|
});
|
|
496
495
|
return createMemo(() => carousel$1.connect(state, send, normalizeProps));
|
|
497
496
|
};
|
|
498
497
|
|
|
499
498
|
const CarouselRoot = props => {
|
|
500
|
-
const [useCarouselProps, localProps] = createSplitProps()(props, ['align', 'id', 'ids', 'index', 'loop', 'onIndexChange', 'orientation', 'slidesPerView', 'spacing']);
|
|
499
|
+
const [useCarouselProps, localProps] = createSplitProps()(props, ['align', 'defaultIndex', 'id', 'ids', 'index', 'loop', 'onIndexChange', 'orientation', 'slidesPerView', 'spacing']);
|
|
501
500
|
const api = useCarousel(useCarouselProps);
|
|
502
501
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
503
502
|
return createComponent(CarouselProvider, {
|
|
@@ -567,19 +566,22 @@ const CheckboxLabel = props => {
|
|
|
567
566
|
const useCheckbox = props => {
|
|
568
567
|
const locale = useLocaleContext();
|
|
569
568
|
const environment = useEnvironmentContext();
|
|
570
|
-
const
|
|
571
|
-
|
|
569
|
+
const id = createUniqueId();
|
|
570
|
+
const context = createMemo(() => ({
|
|
571
|
+
id,
|
|
572
572
|
dir: locale().dir,
|
|
573
|
-
getRootNode: environment().getRootNode
|
|
574
|
-
|
|
575
|
-
|
|
573
|
+
getRootNode: environment().getRootNode,
|
|
574
|
+
checked: props.defaultChecked,
|
|
575
|
+
...props
|
|
576
|
+
}));
|
|
577
|
+
const [state, send] = useMachine(checkbox$1.machine(context()), {
|
|
576
578
|
context
|
|
577
579
|
});
|
|
578
580
|
return createMemo(() => checkbox$1.connect(state, send, normalizeProps));
|
|
579
581
|
};
|
|
580
582
|
|
|
581
583
|
const CheckboxRoot = props => {
|
|
582
|
-
const [useCheckboxProps, labelprops] = createSplitProps()(props, ['checked', 'disabled', 'form', 'id', 'ids', 'invalid', 'name', 'onCheckedChange', 'readOnly', 'required', 'value']);
|
|
584
|
+
const [useCheckboxProps, labelprops] = createSplitProps()(props, ['checked', 'defaultChecked', 'disabled', 'form', 'id', 'ids', 'invalid', 'name', 'onCheckedChange', 'readOnly', 'required', 'value']);
|
|
583
585
|
const checkbox = useCheckbox(useCheckboxProps);
|
|
584
586
|
const mergedProps = mergeProps$1(() => checkbox().rootProps, labelprops);
|
|
585
587
|
return createComponent(CheckboxProvider, {
|
|
@@ -652,11 +654,13 @@ const ClipboardLabel = props => {
|
|
|
652
654
|
|
|
653
655
|
const useClipboard = props => {
|
|
654
656
|
const environment = useEnvironmentContext();
|
|
655
|
-
const
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
657
|
+
const id = createUniqueId();
|
|
658
|
+
const context = createMemo(() => ({
|
|
659
|
+
id,
|
|
660
|
+
getRootNode: environment().getRootNode,
|
|
661
|
+
...props
|
|
662
|
+
}));
|
|
663
|
+
const [state, send] = useMachine(clipboard$1.machine(context()), {
|
|
660
664
|
context
|
|
661
665
|
});
|
|
662
666
|
return createMemo(() => clipboard$1.connect(state, send, normalizeProps));
|
|
@@ -892,17 +896,19 @@ const ColorPickerPositioner = props => {
|
|
|
892
896
|
};
|
|
893
897
|
|
|
894
898
|
const useColorPicker = props => {
|
|
895
|
-
const [local, rest] = splitProps(props, ['value']);
|
|
896
899
|
const locale = useLocaleContext();
|
|
897
900
|
const environment = useEnvironmentContext();
|
|
898
|
-
const
|
|
899
|
-
|
|
901
|
+
const id = createUniqueId();
|
|
902
|
+
const context = createMemo(() => ({
|
|
903
|
+
id,
|
|
900
904
|
dir: locale().dir,
|
|
901
905
|
getRootNode: environment().getRootNode,
|
|
906
|
+
open: props.defaultOpen,
|
|
902
907
|
'open.controlled': props.open !== undefined,
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
908
|
+
...props,
|
|
909
|
+
value: props.value ? colorPicker$1.parse(props.value) : props.defaultValue ? colorPicker$1.parse(props.defaultValue) : undefined
|
|
910
|
+
}));
|
|
911
|
+
const [state, send] = useMachine(colorPicker$1.machine(context()), {
|
|
906
912
|
context
|
|
907
913
|
});
|
|
908
914
|
return createMemo(() => colorPicker$1.connect(state, send, normalizeProps));
|
|
@@ -910,7 +916,7 @@ const useColorPicker = props => {
|
|
|
910
916
|
|
|
911
917
|
const ColorPickerRoot = props => {
|
|
912
918
|
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
913
|
-
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['closeOnSelect', 'disabled', 'format', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onFormatChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
919
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['closeOnSelect', 'defaultOpen', 'defaultValue', 'disabled', 'format', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onFormatChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
914
920
|
const api = useColorPicker(useColorPickerProps);
|
|
915
921
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
916
922
|
present: api().open
|
|
@@ -1171,20 +1177,22 @@ const ComboboxPositioner = props => {
|
|
|
1171
1177
|
};
|
|
1172
1178
|
|
|
1173
1179
|
const useCombobox = props => {
|
|
1174
|
-
const [collectionOptions,
|
|
1175
|
-
const collection =
|
|
1180
|
+
const [collectionOptions, comboboxProps] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
1181
|
+
const collection = () => combobox$1.collection(collectionOptions);
|
|
1176
1182
|
const locale = useLocaleContext();
|
|
1177
1183
|
const environment = useEnvironmentContext();
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1184
|
+
const id = createUniqueId();
|
|
1185
|
+
const context = createMemo(() => ({
|
|
1186
|
+
id,
|
|
1187
|
+
collection: collection(),
|
|
1180
1188
|
dir: locale().dir,
|
|
1181
1189
|
getRootNode: environment().getRootNode,
|
|
1190
|
+
open: props.defaultOpen,
|
|
1191
|
+
value: props.defaultValue,
|
|
1182
1192
|
'open.controlled': props.open !== undefined,
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
}, rest);
|
|
1187
|
-
const [state, send] = useMachine(combobox$1.machine(context), {
|
|
1193
|
+
...comboboxProps
|
|
1194
|
+
}));
|
|
1195
|
+
const [state, send] = useMachine(combobox$1.machine(context()), {
|
|
1188
1196
|
context
|
|
1189
1197
|
});
|
|
1190
1198
|
return createMemo(() => combobox$1.connect(state, send, normalizeProps));
|
|
@@ -1192,7 +1200,7 @@ const useCombobox = props => {
|
|
|
1192
1200
|
|
|
1193
1201
|
const ComboboxRoot = props => {
|
|
1194
1202
|
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
1195
|
-
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ['allowCustomValue', 'autoFocus', 'closeOnSelect', 'disabled', '
|
|
1203
|
+
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ['allowCustomValue', 'autoFocus', 'closeOnSelect', 'composite', 'defaultOpen', 'defaultValue', 'disabled', 'disableLayer', 'form', 'getSelectionValue', 'highlightedValue', 'id', 'ids', 'inputBehavior', 'inputValue', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loopFocus', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onOpenChange', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'open', 'openOnChange', 'openOnClick', 'openOnKeyPress', 'placeholder', 'positioning', 'readOnly', 'scrollToIndexFn', 'selectionBehavior', 'translations', 'value']);
|
|
1196
1204
|
const api = useCombobox(useComboboxProps);
|
|
1197
1205
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1198
1206
|
present: api().open
|
|
@@ -1212,8 +1220,9 @@ const ComboboxRoot = props => {
|
|
|
1212
1220
|
};
|
|
1213
1221
|
|
|
1214
1222
|
const ComboboxTrigger = props => {
|
|
1223
|
+
const [triggerProps, localProps] = createSplitProps()(props, ['focusable']);
|
|
1215
1224
|
const combobox = useComboboxContext();
|
|
1216
|
-
const mergedProps = mergeProps$1(() => combobox().triggerProps,
|
|
1225
|
+
const mergedProps = mergeProps$1(() => combobox().getTriggerProps(triggerProps), localProps);
|
|
1217
1226
|
return createComponent(ark.button, mergedProps);
|
|
1218
1227
|
};
|
|
1219
1228
|
|
|
@@ -1351,18 +1360,20 @@ const DatePickerRangeText = props => {
|
|
|
1351
1360
|
const useDatePicker = props => {
|
|
1352
1361
|
const locale = useLocaleContext();
|
|
1353
1362
|
const environment = useEnvironmentContext();
|
|
1354
|
-
const
|
|
1355
|
-
const context =
|
|
1356
|
-
id
|
|
1363
|
+
const id = createUniqueId();
|
|
1364
|
+
const context = createMemo(() => ({
|
|
1365
|
+
id,
|
|
1357
1366
|
dir: locale().dir,
|
|
1358
1367
|
getRootNode: environment().getRootNode,
|
|
1359
1368
|
'open.controlled': props.open !== undefined,
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1369
|
+
open: props.defaultOpen,
|
|
1370
|
+
...props,
|
|
1371
|
+
focusedValue: props.focusedValue ? datePicker$1.parse(props.focusedValue) : undefined,
|
|
1372
|
+
value: props.value ? datePicker$1.parse(props.value) : props.defaultValue ? datePicker$1.parse(props.defaultValue) : undefined,
|
|
1373
|
+
max: props.max ? datePicker$1.parse(props.max) : undefined,
|
|
1374
|
+
min: props.min ? datePicker$1.parse(props.min) : undefined
|
|
1375
|
+
}));
|
|
1376
|
+
const [state, send] = useMachine(datePicker$1.machine(context()), {
|
|
1366
1377
|
context
|
|
1367
1378
|
});
|
|
1368
1379
|
return createMemo(() => datePicker$1.connect(state, send, normalizeProps));
|
|
@@ -1370,7 +1381,7 @@ const useDatePicker = props => {
|
|
|
1370
1381
|
|
|
1371
1382
|
const DatePickerRoot = props => {
|
|
1372
1383
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1373
|
-
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', 'min', 'modal', 'name', 'numOfMonths', 'onFocusChange', 'onOpenChange', 'onValueChange', 'onViewChange', 'open', 'positioning', 'readOnly', 'selectionMode', 'startOfWeek', 'timeZone', 'translations', 'value', 'view']);
|
|
1384
|
+
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'defaultOpen', 'defaultValue', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', 'min', 'modal', 'name', 'numOfMonths', 'onFocusChange', 'onOpenChange', 'onValueChange', 'onViewChange', 'open', 'positioning', 'readOnly', 'selectionMode', 'startOfWeek', 'timeZone', 'translations', 'value', 'view']);
|
|
1374
1385
|
const api = useDatePicker(useDatePickerProps);
|
|
1375
1386
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1376
1387
|
present: api().open
|
|
@@ -1638,13 +1649,16 @@ const DialogPositioner = props => {
|
|
|
1638
1649
|
const useDialog = props => {
|
|
1639
1650
|
const locale = useLocaleContext();
|
|
1640
1651
|
const environment = useEnvironmentContext();
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1652
|
+
const id = createUniqueId();
|
|
1653
|
+
const context = createMemo(() => ({
|
|
1654
|
+
id,
|
|
1643
1655
|
dir: locale().dir,
|
|
1644
1656
|
getRootNode: environment().getRootNode,
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1657
|
+
open: props.defaultOpen,
|
|
1658
|
+
'open.controlled': props.open !== undefined,
|
|
1659
|
+
...props
|
|
1660
|
+
}));
|
|
1661
|
+
const [state, send] = useMachine(dialog$1.machine(context()), {
|
|
1648
1662
|
context
|
|
1649
1663
|
});
|
|
1650
1664
|
return createMemo(() => dialog$1.connect(state, send, normalizeProps));
|
|
@@ -1653,7 +1667,7 @@ const useDialog = props => {
|
|
|
1653
1667
|
const DialogRoot = props => {
|
|
1654
1668
|
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
1655
1669
|
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
1656
|
-
const [useDialogProps, localProps] = createSplitProps()(dialogProps, ['aria-label', 'closeOnEscape', 'closeOnInteractOutside', 'finalFocusEl', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'preventScroll', 'restoreFocus', 'role', 'trapFocus']);
|
|
1670
|
+
const [useDialogProps, localProps] = createSplitProps()(dialogProps, ['aria-label', 'closeOnEscape', 'closeOnInteractOutside', 'defaultOpen', 'finalFocusEl', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'persistentElements', 'preventScroll', 'restoreFocus', 'role', 'trapFocus']);
|
|
1657
1671
|
const api = useDialog(useDialogProps);
|
|
1658
1672
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1659
1673
|
present: api().open
|
|
@@ -1756,19 +1770,22 @@ const EditablePreview = props => {
|
|
|
1756
1770
|
const useEditable = props => {
|
|
1757
1771
|
const locale = useLocaleContext();
|
|
1758
1772
|
const environment = useEnvironmentContext();
|
|
1759
|
-
const
|
|
1760
|
-
|
|
1773
|
+
const id = createUniqueId();
|
|
1774
|
+
const context = createMemo(() => ({
|
|
1775
|
+
id,
|
|
1761
1776
|
dir: locale().dir,
|
|
1762
|
-
getRootNode: environment().getRootNode
|
|
1763
|
-
|
|
1764
|
-
|
|
1777
|
+
getRootNode: environment().getRootNode,
|
|
1778
|
+
value: props.defaultValue,
|
|
1779
|
+
...props
|
|
1780
|
+
}));
|
|
1781
|
+
const [state, send] = useMachine(editable$1.machine(context()), {
|
|
1765
1782
|
context
|
|
1766
1783
|
});
|
|
1767
1784
|
return createMemo(() => editable$1.connect(state, send, normalizeProps));
|
|
1768
1785
|
};
|
|
1769
1786
|
|
|
1770
1787
|
const EditableRoot = props => {
|
|
1771
|
-
const [useEditableProps, localProps] = createSplitProps()(props, ['activationMode', 'autoResize', 'disabled', 'finalFocusEl', 'form', 'id', 'ids', 'invalid', 'maxLength', 'name', 'onEdit', 'onFocusOutside', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueCommit', 'onValueRevert', 'placeholder', 'readOnly', 'selectOnFocus', 'startWithEditView', 'submitMode', 'translations', 'value']);
|
|
1788
|
+
const [useEditableProps, localProps] = createSplitProps()(props, ['activationMode', 'autoResize', 'defaultValue', 'disabled', 'finalFocusEl', 'form', 'id', 'ids', 'invalid', 'maxLength', 'name', 'onEdit', 'onFocusOutside', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueCommit', 'onValueRevert', 'placeholder', 'readOnly', 'selectOnFocus', 'startWithEditView', 'submitMode', 'translations', 'value']);
|
|
1772
1789
|
const api = useEditable(useEditableProps);
|
|
1773
1790
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1774
1791
|
return createComponent(EditableProvider, {
|
|
@@ -1893,12 +1910,14 @@ const FileUploadLabel = props => {
|
|
|
1893
1910
|
const useFileUpload = props => {
|
|
1894
1911
|
const locale = useLocaleContext();
|
|
1895
1912
|
const environment = useEnvironmentContext();
|
|
1896
|
-
const
|
|
1897
|
-
|
|
1913
|
+
const id = createUniqueId();
|
|
1914
|
+
const context = createMemo(() => ({
|
|
1915
|
+
id,
|
|
1898
1916
|
dir: locale().dir,
|
|
1899
|
-
getRootNode: environment().getRootNode
|
|
1900
|
-
|
|
1901
|
-
|
|
1917
|
+
getRootNode: environment().getRootNode,
|
|
1918
|
+
...props
|
|
1919
|
+
}));
|
|
1920
|
+
const [state, send] = useMachine(fileUpload$1.machine(context()), {
|
|
1902
1921
|
context
|
|
1903
1922
|
});
|
|
1904
1923
|
return createMemo(() => fileUpload$1.connect(state, send, normalizeProps));
|
|
@@ -2015,13 +2034,16 @@ const HoverCardPositioner = props => {
|
|
|
2015
2034
|
const useHoverCard = props => {
|
|
2016
2035
|
const locale = useLocaleContext();
|
|
2017
2036
|
const environment = useEnvironmentContext();
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2037
|
+
const id = createUniqueId();
|
|
2038
|
+
const context = createMemo(() => ({
|
|
2039
|
+
id,
|
|
2020
2040
|
dir: locale().dir,
|
|
2021
2041
|
getRootNode: environment().getRootNode,
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2042
|
+
open: props.defaultOpen,
|
|
2043
|
+
'open.controlled': props.open !== undefined,
|
|
2044
|
+
...props
|
|
2045
|
+
}));
|
|
2046
|
+
const [state, send] = useMachine(hoverCard$1.machine(context()), {
|
|
2025
2047
|
context
|
|
2026
2048
|
});
|
|
2027
2049
|
return createMemo(() => hoverCard$1.connect(state, send, normalizeProps));
|
|
@@ -2029,7 +2051,7 @@ const useHoverCard = props => {
|
|
|
2029
2051
|
|
|
2030
2052
|
const HoverCardRoot = props => {
|
|
2031
2053
|
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
2032
|
-
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ['closeDelay', 'id', 'ids', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
2054
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ['closeDelay', 'defaultOpen', 'id', 'ids', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
2033
2055
|
const api = useHoverCard(useHoverCardProps);
|
|
2034
2056
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
2035
2057
|
present: api().open
|
|
@@ -2257,13 +2279,16 @@ const MenuRadioItemGroup = props => {
|
|
|
2257
2279
|
const useMenu = props => {
|
|
2258
2280
|
const locale = useLocaleContext();
|
|
2259
2281
|
const environment = useEnvironmentContext();
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2282
|
+
const id = createUniqueId();
|
|
2283
|
+
const context = createMemo(() => ({
|
|
2284
|
+
id,
|
|
2262
2285
|
dir: locale().dir,
|
|
2263
2286
|
getRootNode: environment().getRootNode,
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2287
|
+
open: props.defaultOpen,
|
|
2288
|
+
'open.controlled': props.open !== undefined,
|
|
2289
|
+
...props
|
|
2290
|
+
}));
|
|
2291
|
+
const [state, send, machine] = useMachine(menu$1.machine(context()), {
|
|
2267
2292
|
context
|
|
2268
2293
|
});
|
|
2269
2294
|
const api = createMemo(() => menu$1.connect(state, send, normalizeProps));
|
|
@@ -2287,7 +2312,7 @@ const [MenuTriggerItemProvider, useMenuTriggerItemContext] = createContext({
|
|
|
2287
2312
|
|
|
2288
2313
|
const MenuRoot = props => {
|
|
2289
2314
|
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
2290
|
-
const [useMenuProps, localProps] = createSplitProps()(menuProps, ['anchorPoint', 'aria-label', 'closeOnSelect', 'highlightedValue', 'id', 'ids', 'loopFocus', 'onEscapeKeyDown', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onSelect', 'open', 'positioning', 'typeahead']);
|
|
2315
|
+
const [useMenuProps, localProps] = createSplitProps()(menuProps, ['anchorPoint', 'aria-label', 'closeOnSelect', 'composite', 'defaultOpen', 'highlightedValue', 'id', 'ids', 'loopFocus', 'onEscapeKeyDown', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onSelect', 'open', 'positioning', 'typeahead']);
|
|
2291
2316
|
const parentApi = useMenuContext();
|
|
2292
2317
|
const parentMachine = useMenuMachineContext();
|
|
2293
2318
|
const menu = useMenu(useMenuProps);
|
|
@@ -2412,19 +2437,22 @@ const NumberInputLabel = props => {
|
|
|
2412
2437
|
const useNumberInput = props => {
|
|
2413
2438
|
const locale = useLocaleContext();
|
|
2414
2439
|
const environment = useEnvironmentContext();
|
|
2415
|
-
const
|
|
2416
|
-
|
|
2440
|
+
const id = createUniqueId();
|
|
2441
|
+
const context = createMemo(() => ({
|
|
2442
|
+
id,
|
|
2417
2443
|
dir: locale().dir,
|
|
2418
|
-
getRootNode: environment().getRootNode
|
|
2419
|
-
|
|
2420
|
-
|
|
2444
|
+
getRootNode: environment().getRootNode,
|
|
2445
|
+
value: props.defaultValue,
|
|
2446
|
+
...props
|
|
2447
|
+
}));
|
|
2448
|
+
const [state, send] = useMachine(numberInput$1.machine(context()), {
|
|
2421
2449
|
context
|
|
2422
2450
|
});
|
|
2423
2451
|
return createMemo(() => numberInput$1.connect(state, send, normalizeProps));
|
|
2424
2452
|
};
|
|
2425
2453
|
|
|
2426
2454
|
const NumberInputRoot = props => {
|
|
2427
|
-
const [useNumberInputProps, localProps] = createSplitProps()(props, ['allowMouseWheel', 'allowOverflow', 'clampValueOnBlur', 'disabled', 'focusInputOnChange', 'form', 'formatOptions', 'id', 'ids', 'inputMode', 'invalid', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onValueChange', 'onValueInvalid', 'pattern', 'readOnly', 'spinOnPress', 'step', 'translations', 'value']);
|
|
2455
|
+
const [useNumberInputProps, localProps] = createSplitProps()(props, ['allowMouseWheel', 'allowOverflow', 'clampValueOnBlur', 'defaultValue', 'disabled', 'focusInputOnChange', 'form', 'formatOptions', 'id', 'ids', 'inputMode', 'invalid', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onValueChange', 'onValueInvalid', 'pattern', 'readOnly', 'spinOnPress', 'step', 'translations', 'value']);
|
|
2428
2456
|
const api = useNumberInput(useNumberInputProps);
|
|
2429
2457
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2430
2458
|
return createComponent(NumberInputProvider, {
|
|
@@ -2489,19 +2517,22 @@ const PaginationPrevTrigger = props => {
|
|
|
2489
2517
|
const usePagination = props => {
|
|
2490
2518
|
const locale = useLocaleContext();
|
|
2491
2519
|
const environment = useEnvironmentContext();
|
|
2492
|
-
const
|
|
2493
|
-
|
|
2520
|
+
const id = createUniqueId();
|
|
2521
|
+
const context = createMemo(() => ({
|
|
2522
|
+
id,
|
|
2494
2523
|
dir: locale().dir,
|
|
2495
|
-
getRootNode: environment().getRootNode
|
|
2496
|
-
|
|
2497
|
-
|
|
2524
|
+
getRootNode: environment().getRootNode,
|
|
2525
|
+
page: props.defaultPage,
|
|
2526
|
+
...props
|
|
2527
|
+
}));
|
|
2528
|
+
const [state, send] = useMachine(pagination$1.machine(context()), {
|
|
2498
2529
|
context
|
|
2499
2530
|
});
|
|
2500
2531
|
return createMemo(() => pagination$1.connect(state, send, normalizeProps));
|
|
2501
2532
|
};
|
|
2502
2533
|
|
|
2503
2534
|
const PaginationRoot = props => {
|
|
2504
|
-
const [usePaginationProps, localProps] = createSplitProps()(props, ['count', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2535
|
+
const [usePaginationProps, localProps] = createSplitProps()(props, ['count', 'defaultPage', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2505
2536
|
const api = usePagination(usePaginationProps);
|
|
2506
2537
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2507
2538
|
return createComponent(PaginationProvider, {
|
|
@@ -2551,19 +2582,22 @@ const PinInputLabel = props => {
|
|
|
2551
2582
|
const usePinInput = props => {
|
|
2552
2583
|
const locale = useLocaleContext();
|
|
2553
2584
|
const environment = useEnvironmentContext();
|
|
2554
|
-
const
|
|
2555
|
-
|
|
2585
|
+
const id = createUniqueId();
|
|
2586
|
+
const context = createMemo(() => ({
|
|
2587
|
+
id,
|
|
2556
2588
|
dir: locale().dir,
|
|
2557
|
-
getRootNode: environment().getRootNode
|
|
2558
|
-
|
|
2559
|
-
|
|
2589
|
+
getRootNode: environment().getRootNode,
|
|
2590
|
+
value: props.defaultValue,
|
|
2591
|
+
...props
|
|
2592
|
+
}));
|
|
2593
|
+
const [state, send] = useMachine(pinInput$1.machine(context()), {
|
|
2560
2594
|
context
|
|
2561
2595
|
});
|
|
2562
2596
|
return createMemo(() => pinInput$1.connect(state, send, normalizeProps));
|
|
2563
2597
|
};
|
|
2564
2598
|
|
|
2565
2599
|
const PinInputRoot = props => {
|
|
2566
|
-
const [usePinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'disabled', 'form', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2600
|
+
const [usePinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'defaultValue', 'disabled', 'form', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2567
2601
|
const pinInput = usePinInput(usePinInputProps);
|
|
2568
2602
|
const mergedProps = mergeProps$1(() => pinInput().rootProps, localProps);
|
|
2569
2603
|
return createComponent(PinInputProvider, {
|
|
@@ -2664,13 +2698,16 @@ const PopoverPositioner = props => {
|
|
|
2664
2698
|
const usePopover = props => {
|
|
2665
2699
|
const locale = useLocaleContext();
|
|
2666
2700
|
const environment = useEnvironmentContext();
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2701
|
+
const id = createUniqueId();
|
|
2702
|
+
const context = createMemo(() => ({
|
|
2703
|
+
id,
|
|
2669
2704
|
dir: locale().dir,
|
|
2670
2705
|
getRootNode: environment().getRootNode,
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2706
|
+
open: props.defaultOpen,
|
|
2707
|
+
'open.controlled': props.open !== undefined,
|
|
2708
|
+
...props
|
|
2709
|
+
}));
|
|
2710
|
+
const [state, send] = useMachine(popover$1.machine(context()), {
|
|
2674
2711
|
context
|
|
2675
2712
|
});
|
|
2676
2713
|
return createMemo(() => popover$1.connect(state, send, normalizeProps));
|
|
@@ -2678,7 +2715,7 @@ const usePopover = props => {
|
|
|
2678
2715
|
|
|
2679
2716
|
const PopoverRoot = props => {
|
|
2680
2717
|
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
2681
|
-
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ['autoFocus', '
|
|
2718
|
+
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ['autoFocus', 'closeOnEscape', 'closeOnInteractOutside', 'defaultOpen', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'persistentElements', 'portalled', 'positioning']);
|
|
2682
2719
|
const api = usePopover(usePopoverProps);
|
|
2683
2720
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
2684
2721
|
present: api().open
|
|
@@ -2767,12 +2804,14 @@ const ProgressRange = props => {
|
|
|
2767
2804
|
const useProgress = props => {
|
|
2768
2805
|
const locale = useLocaleContext();
|
|
2769
2806
|
const environment = useEnvironmentContext();
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2807
|
+
const id = createUniqueId();
|
|
2808
|
+
const context = createMemo(() => ({
|
|
2809
|
+
id,
|
|
2772
2810
|
dir: locale().dir,
|
|
2773
|
-
getRootNode: environment().getRootNode
|
|
2774
|
-
|
|
2775
|
-
|
|
2811
|
+
getRootNode: environment().getRootNode,
|
|
2812
|
+
...props
|
|
2813
|
+
}));
|
|
2814
|
+
const [state, send] = useMachine(progress$1.machine(context()), {
|
|
2776
2815
|
context
|
|
2777
2816
|
});
|
|
2778
2817
|
return createMemo(() => progress$1.connect(state, send, normalizeProps));
|
|
@@ -2898,19 +2937,22 @@ const RadioGroupLabel = props => {
|
|
|
2898
2937
|
const useRadioGroup = props => {
|
|
2899
2938
|
const locale = useLocaleContext();
|
|
2900
2939
|
const environment = useEnvironmentContext();
|
|
2901
|
-
const
|
|
2902
|
-
|
|
2940
|
+
const id = createUniqueId();
|
|
2941
|
+
const context = createMemo(() => ({
|
|
2942
|
+
id,
|
|
2903
2943
|
dir: locale().dir,
|
|
2904
|
-
getRootNode: environment().getRootNode
|
|
2905
|
-
|
|
2906
|
-
|
|
2944
|
+
getRootNode: environment().getRootNode,
|
|
2945
|
+
value: props.defaultValue,
|
|
2946
|
+
...props
|
|
2947
|
+
}));
|
|
2948
|
+
const [state, send] = useMachine(radio.machine(context()), {
|
|
2907
2949
|
context
|
|
2908
2950
|
});
|
|
2909
2951
|
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
2910
2952
|
};
|
|
2911
2953
|
|
|
2912
2954
|
const RadioGroupRoot = props => {
|
|
2913
|
-
const [useRadioGroupProps, localProps] = createSplitProps()(props, ['disabled', 'form', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'readOnly', 'value']);
|
|
2955
|
+
const [useRadioGroupProps, localProps] = createSplitProps()(props, ['defaultValue', 'disabled', 'form', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'readOnly', 'value']);
|
|
2914
2956
|
const radioGroup = useRadioGroup(useRadioGroupProps);
|
|
2915
2957
|
const mergedProps = mergeProps$1(() => radioGroup().rootProps, localProps);
|
|
2916
2958
|
return createComponent(RadioGroupProvider, {
|
|
@@ -2975,19 +3017,22 @@ const RatingGroupLabel = props => {
|
|
|
2975
3017
|
const useRatingGroup = props => {
|
|
2976
3018
|
const locale = useLocaleContext();
|
|
2977
3019
|
const environment = useEnvironmentContext();
|
|
2978
|
-
const
|
|
2979
|
-
|
|
3020
|
+
const id = createUniqueId();
|
|
3021
|
+
const context = createMemo(() => ({
|
|
3022
|
+
id,
|
|
2980
3023
|
dir: locale().dir,
|
|
2981
|
-
getRootNode: environment().getRootNode
|
|
2982
|
-
|
|
2983
|
-
|
|
3024
|
+
getRootNode: environment().getRootNode,
|
|
3025
|
+
value: props.defaultValue,
|
|
3026
|
+
...props
|
|
3027
|
+
}));
|
|
3028
|
+
const [state, send] = useMachine(rating.machine(context()), {
|
|
2984
3029
|
context
|
|
2985
3030
|
});
|
|
2986
3031
|
return createMemo(() => rating.connect(state, send, normalizeProps));
|
|
2987
3032
|
};
|
|
2988
3033
|
|
|
2989
3034
|
const RatingGroupRoot = props => {
|
|
2990
|
-
const [useRatingProps, localProps] = createSplitProps()(props, ['allowHalf', 'autoFocus', 'count', 'disabled', 'form', 'id', 'ids', 'name', 'onHoverChange', 'onValueChange', 'readOnly', 'translations', 'value']);
|
|
3035
|
+
const [useRatingProps, localProps] = createSplitProps()(props, ['allowHalf', 'autoFocus', 'count', 'defaultValue', 'disabled', 'form', 'id', 'ids', 'name', 'onHoverChange', 'onValueChange', 'readOnly', 'translations', 'value']);
|
|
2991
3036
|
const api = useRatingGroup(useRatingProps);
|
|
2992
3037
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2993
3038
|
return createComponent(RatingGroupProvider, {
|
|
@@ -3086,19 +3131,22 @@ const SegmentGroupLabel = props => {
|
|
|
3086
3131
|
const useSegmentGroup = props => {
|
|
3087
3132
|
const locale = useLocaleContext();
|
|
3088
3133
|
const environment = useEnvironmentContext();
|
|
3089
|
-
const
|
|
3090
|
-
|
|
3134
|
+
const id = createUniqueId();
|
|
3135
|
+
const context = createMemo(() => ({
|
|
3136
|
+
id,
|
|
3091
3137
|
dir: locale().dir,
|
|
3092
|
-
getRootNode: environment().getRootNode
|
|
3093
|
-
|
|
3094
|
-
|
|
3138
|
+
getRootNode: environment().getRootNode,
|
|
3139
|
+
value: props.defaultValue,
|
|
3140
|
+
...props
|
|
3141
|
+
}));
|
|
3142
|
+
const [state, send] = useMachine(radio.machine(context()), {
|
|
3095
3143
|
context
|
|
3096
3144
|
});
|
|
3097
3145
|
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
3098
3146
|
};
|
|
3099
3147
|
|
|
3100
3148
|
const SegmentGroupRoot = props => {
|
|
3101
|
-
const [useSegmentGroupProps, localProps] = createSplitProps()(props, ['disabled', 'form', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'readOnly', 'value']);
|
|
3149
|
+
const [useSegmentGroupProps, localProps] = createSplitProps()(props, ['defaultValue', 'disabled', 'form', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'readOnly', 'value']);
|
|
3102
3150
|
const segmentGroup = useSegmentGroup(useSegmentGroupProps);
|
|
3103
3151
|
const mergedProps = mergeProps$1(() => segmentGroup().rootProps, segmentGroupAnatomy.build().root.attrs, localProps);
|
|
3104
3152
|
return createComponent(SegmentGroupProvider, {
|
|
@@ -3202,7 +3250,7 @@ const [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({
|
|
|
3202
3250
|
});
|
|
3203
3251
|
|
|
3204
3252
|
const SelectItem = props => {
|
|
3205
|
-
const [itemProps, localProps] = createSplitProps()(props, ['item']);
|
|
3253
|
+
const [itemProps, localProps] = createSplitProps()(props, ['item', 'persistFocus']);
|
|
3206
3254
|
const select = useSelectContext();
|
|
3207
3255
|
const mergedProps = mergeProps$1(() => select().getItemProps(itemProps), localProps);
|
|
3208
3256
|
const itemState = createMemo(() => select().getItemState(itemProps));
|
|
@@ -3285,20 +3333,22 @@ const SelectPositioner = props => {
|
|
|
3285
3333
|
};
|
|
3286
3334
|
|
|
3287
3335
|
const useSelect = props => {
|
|
3288
|
-
const [collectionOptions,
|
|
3289
|
-
const collection =
|
|
3336
|
+
const [collectionOptions, selectProps] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
3337
|
+
const collection = () => select$1.collection(collectionOptions);
|
|
3290
3338
|
const locale = useLocaleContext();
|
|
3291
3339
|
const environment = useEnvironmentContext();
|
|
3292
|
-
const
|
|
3293
|
-
|
|
3340
|
+
const id = createUniqueId();
|
|
3341
|
+
const context = createMemo(() => ({
|
|
3342
|
+
id,
|
|
3343
|
+
collection: collection(),
|
|
3294
3344
|
dir: locale().dir,
|
|
3295
3345
|
getRootNode: environment().getRootNode,
|
|
3346
|
+
open: props.defaultOpen,
|
|
3347
|
+
value: props.defaultValue,
|
|
3296
3348
|
'open.controlled': props.open !== undefined,
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
}, localProps);
|
|
3301
|
-
const [state, send] = useMachine(select$1.machine(context), {
|
|
3349
|
+
...selectProps
|
|
3350
|
+
}));
|
|
3351
|
+
const [state, send] = useMachine(select$1.machine(context()), {
|
|
3302
3352
|
context
|
|
3303
3353
|
});
|
|
3304
3354
|
return createMemo(() => select$1.connect(state, send, normalizeProps));
|
|
@@ -3306,7 +3356,7 @@ const useSelect = props => {
|
|
|
3306
3356
|
|
|
3307
3357
|
const SelectRoot = props => {
|
|
3308
3358
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
3309
|
-
const [useSelectProps, localProps] = createSplitProps()(selectProps, ['closeOnSelect', 'disabled', 'form', 'highlightedValue', 'id', 'ids', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loopFocus', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'open', 'positioning', 'readOnly', 'scrollToIndexFn', 'value']);
|
|
3359
|
+
const [useSelectProps, localProps] = createSplitProps()(selectProps, ['closeOnSelect', 'composite', 'defaultOpen', 'defaultValue', 'disabled', 'form', 'highlightedValue', 'id', 'ids', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loopFocus', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'open', 'positioning', 'readOnly', 'scrollToIndexFn', 'value']);
|
|
3310
3360
|
const select = useSelect(useSelectProps);
|
|
3311
3361
|
const presenceApi = usePresence(mergeProps$1(() => ({
|
|
3312
3362
|
present: select().open
|
|
@@ -3403,19 +3453,22 @@ const SliderRange = props => {
|
|
|
3403
3453
|
const useSlider = props => {
|
|
3404
3454
|
const locale = useLocaleContext();
|
|
3405
3455
|
const environment = useEnvironmentContext();
|
|
3406
|
-
const
|
|
3407
|
-
|
|
3456
|
+
const id = createUniqueId();
|
|
3457
|
+
const context = createMemo(() => ({
|
|
3458
|
+
id,
|
|
3408
3459
|
dir: locale().dir,
|
|
3409
|
-
getRootNode: environment().getRootNode
|
|
3410
|
-
|
|
3411
|
-
|
|
3460
|
+
getRootNode: environment().getRootNode,
|
|
3461
|
+
value: props.defaultValue,
|
|
3462
|
+
...props
|
|
3463
|
+
}));
|
|
3464
|
+
const [state, send] = useMachine(slider$1.machine(context()), {
|
|
3412
3465
|
context
|
|
3413
3466
|
});
|
|
3414
3467
|
return createMemo(() => slider$1.connect(state, send, normalizeProps));
|
|
3415
3468
|
};
|
|
3416
3469
|
|
|
3417
3470
|
const SliderRoot = props => {
|
|
3418
|
-
const [useSliderProps, localProps] = createSplitProps()(props, ['aria-label', 'aria-labelledby', 'disabled', 'form', 'getAriaValueText', 'id', 'ids', 'invalid', 'max', 'min', 'minStepsBetweenThumbs', 'name', 'onFocusChange', 'onValueChange', 'onValueChangeEnd', 'orientation', 'origin', 'readOnly', 'step', 'thumbAlignment', 'thumbAlignment', 'thumbSize', 'value']);
|
|
3471
|
+
const [useSliderProps, localProps] = createSplitProps()(props, ['aria-label', 'aria-labelledby', 'defaultValue', 'disabled', 'form', 'getAriaValueText', 'id', 'ids', 'invalid', 'max', 'min', 'minStepsBetweenThumbs', 'name', 'onFocusChange', 'onValueChange', 'onValueChangeEnd', 'orientation', 'origin', 'readOnly', 'step', 'thumbAlignment', 'thumbAlignment', 'thumbSize', 'value']);
|
|
3419
3472
|
const api = useSlider(useSliderProps);
|
|
3420
3473
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3421
3474
|
return createComponent(SliderProvider, {
|
|
@@ -3487,19 +3540,22 @@ const SplitterResizeTrigger = props => {
|
|
|
3487
3540
|
const useSplitter = props => {
|
|
3488
3541
|
const locale = useLocaleContext();
|
|
3489
3542
|
const environment = useEnvironmentContext();
|
|
3490
|
-
const
|
|
3491
|
-
|
|
3543
|
+
const id = createUniqueId();
|
|
3544
|
+
const context = createMemo(() => ({
|
|
3545
|
+
id,
|
|
3492
3546
|
dir: locale().dir,
|
|
3493
|
-
getRootNode: environment().getRootNode
|
|
3494
|
-
|
|
3495
|
-
|
|
3547
|
+
getRootNode: environment().getRootNode,
|
|
3548
|
+
size: props.defaultSize,
|
|
3549
|
+
...props
|
|
3550
|
+
}));
|
|
3551
|
+
const [state, send] = useMachine(splitter$1.machine(context()), {
|
|
3496
3552
|
context
|
|
3497
3553
|
});
|
|
3498
3554
|
return createMemo(() => splitter$1.connect(state, send, normalizeProps));
|
|
3499
3555
|
};
|
|
3500
3556
|
|
|
3501
3557
|
const SplitterRoot = props => {
|
|
3502
|
-
const [useSplitterProps, localProps] = createSplitProps()(props, ['id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'orientation', 'size']);
|
|
3558
|
+
const [useSplitterProps, localProps] = createSplitProps()(props, ['defaultSize', 'id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'orientation', 'size']);
|
|
3503
3559
|
const api = useSplitter(useSplitterProps);
|
|
3504
3560
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3505
3561
|
return createComponent(SplitterProvider, {
|
|
@@ -3546,19 +3602,22 @@ const SwitchLabel = props => {
|
|
|
3546
3602
|
const useSwitch = props => {
|
|
3547
3603
|
const locale = useLocaleContext();
|
|
3548
3604
|
const environment = useEnvironmentContext();
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3605
|
+
const id = createUniqueId();
|
|
3606
|
+
const context = createMemo(() => ({
|
|
3607
|
+
id,
|
|
3551
3608
|
dir: locale().dir,
|
|
3552
|
-
getRootNode: environment().getRootNode
|
|
3553
|
-
|
|
3554
|
-
|
|
3609
|
+
getRootNode: environment().getRootNode,
|
|
3610
|
+
checked: props.defaultChecked,
|
|
3611
|
+
...props
|
|
3612
|
+
}));
|
|
3613
|
+
const [state, send] = useMachine(zagSwitch.machine(context()), {
|
|
3555
3614
|
context
|
|
3556
3615
|
});
|
|
3557
3616
|
return createMemo(() => zagSwitch.connect(state, send, normalizeProps));
|
|
3558
3617
|
};
|
|
3559
3618
|
|
|
3560
3619
|
const SwitchRoot = props => {
|
|
3561
|
-
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'disabled', 'form', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'readOnly', 'required', 'value']);
|
|
3620
|
+
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'defaultChecked', 'disabled', 'form', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'readOnly', 'required', 'value']);
|
|
3562
3621
|
const api = useSwitch(switchProps);
|
|
3563
3622
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3564
3623
|
return createComponent(SwitchProvider, {
|
|
@@ -3637,12 +3696,15 @@ const TabsContext = props => props.children(useTabsContext());
|
|
|
3637
3696
|
const useTabs = props => {
|
|
3638
3697
|
const locale = useLocaleContext();
|
|
3639
3698
|
const environment = useEnvironmentContext();
|
|
3640
|
-
const
|
|
3641
|
-
|
|
3699
|
+
const id = createUniqueId();
|
|
3700
|
+
const context = createMemo(() => ({
|
|
3701
|
+
id,
|
|
3642
3702
|
dir: locale().dir,
|
|
3643
|
-
getRootNode: environment().getRootNode
|
|
3644
|
-
|
|
3645
|
-
|
|
3703
|
+
getRootNode: environment().getRootNode,
|
|
3704
|
+
value: props.defaultValue,
|
|
3705
|
+
...props
|
|
3706
|
+
}));
|
|
3707
|
+
const [state, send] = useMachine(tabs$1.machine(context()), {
|
|
3646
3708
|
context
|
|
3647
3709
|
});
|
|
3648
3710
|
return createMemo(() => tabs$1.connect(state, send, normalizeProps));
|
|
@@ -3650,7 +3712,7 @@ const useTabs = props => {
|
|
|
3650
3712
|
|
|
3651
3713
|
const TabsRoot = props => {
|
|
3652
3714
|
const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);
|
|
3653
|
-
const [useTabsProps, restProps] = createSplitProps()(tabsProps, ['activationMode', 'id', 'ids', 'loopFocus', 'onFocusChange', 'onValueChange', 'orientation', 'translations', 'value']);
|
|
3715
|
+
const [useTabsProps, restProps] = createSplitProps()(tabsProps, ['activationMode', 'composite', 'defaultValue', 'id', 'ids', 'loopFocus', 'onFocusChange', 'onValueChange', 'orientation', 'translations', 'value']);
|
|
3654
3716
|
const api = useTabs(useTabsProps);
|
|
3655
3717
|
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3656
3718
|
return createComponent(TabsProvider, {
|
|
@@ -3774,19 +3836,22 @@ const TagsInputLabel = props => {
|
|
|
3774
3836
|
const useTagsInput = props => {
|
|
3775
3837
|
const locale = useLocaleContext();
|
|
3776
3838
|
const environment = useEnvironmentContext();
|
|
3777
|
-
const
|
|
3778
|
-
|
|
3839
|
+
const id = createUniqueId();
|
|
3840
|
+
const context = createMemo(() => ({
|
|
3841
|
+
id,
|
|
3779
3842
|
dir: locale().dir,
|
|
3780
|
-
getRootNode: environment().getRootNode
|
|
3781
|
-
|
|
3782
|
-
|
|
3843
|
+
getRootNode: environment().getRootNode,
|
|
3844
|
+
value: props.defaultValue,
|
|
3845
|
+
...props
|
|
3846
|
+
}));
|
|
3847
|
+
const [state, send] = useMachine(tagsInput$1.machine(context()), {
|
|
3783
3848
|
context
|
|
3784
3849
|
});
|
|
3785
3850
|
return createMemo(() => tagsInput$1.connect(state, send, normalizeProps));
|
|
3786
3851
|
};
|
|
3787
3852
|
|
|
3788
3853
|
const TagsInputRoot = props => {
|
|
3789
|
-
const [useTagsInputProps, localProps] = createSplitProps()(props, ['addOnPaste', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'disabled', 'editable', 'form', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3854
|
+
const [useTagsInputProps, localProps] = createSplitProps()(props, ['addOnPaste', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'defaultValue', 'disabled', 'editable', 'form', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3790
3855
|
const api = useTagsInput(useTagsInputProps);
|
|
3791
3856
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3792
3857
|
return createComponent(TagsInputProvider, {
|
|
@@ -3934,19 +3999,22 @@ const ToggleGroupItem = props => {
|
|
|
3934
3999
|
const useToggleGroup = props => {
|
|
3935
4000
|
const locale = useLocaleContext();
|
|
3936
4001
|
const environment = useEnvironmentContext();
|
|
3937
|
-
const
|
|
3938
|
-
|
|
4002
|
+
const id = createUniqueId();
|
|
4003
|
+
const context = createMemo(() => ({
|
|
4004
|
+
id,
|
|
3939
4005
|
dir: locale().dir,
|
|
3940
|
-
getRootNode: environment().getRootNode
|
|
3941
|
-
|
|
3942
|
-
|
|
4006
|
+
getRootNode: environment().getRootNode,
|
|
4007
|
+
value: props.defaultValue,
|
|
4008
|
+
...props
|
|
4009
|
+
}));
|
|
4010
|
+
const [state, send] = useMachine(toggleGroup$1.machine(context()), {
|
|
3943
4011
|
context
|
|
3944
4012
|
});
|
|
3945
4013
|
return createMemo(() => toggleGroup$1.connect(state, send, normalizeProps));
|
|
3946
4014
|
};
|
|
3947
4015
|
|
|
3948
4016
|
const ToggleGroupRoot = props => {
|
|
3949
|
-
const [useToggleGroupProps, restProps] = createSplitProps()(props, ['disabled', 'id', 'ids', 'loopFocus', 'multiple', 'onValueChange', 'orientation', 'rovingFocus', 'value']);
|
|
4017
|
+
const [useToggleGroupProps, restProps] = createSplitProps()(props, ['defaultValue', 'disabled', 'id', 'ids', 'loopFocus', 'multiple', 'onValueChange', 'orientation', 'rovingFocus', 'value']);
|
|
3950
4018
|
const api = useToggleGroup(useToggleGroupProps);
|
|
3951
4019
|
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3952
4020
|
return createComponent(ToggleGroupProvider, {
|
|
@@ -4014,13 +4082,16 @@ const TooltipPositioner = props => {
|
|
|
4014
4082
|
const useTooltip = props => {
|
|
4015
4083
|
const locale = useLocaleContext();
|
|
4016
4084
|
const environment = useEnvironmentContext();
|
|
4017
|
-
const
|
|
4018
|
-
|
|
4085
|
+
const id = createUniqueId();
|
|
4086
|
+
const context = createMemo(() => ({
|
|
4087
|
+
id,
|
|
4019
4088
|
dir: locale().dir,
|
|
4020
4089
|
getRootNode: environment().getRootNode,
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4090
|
+
open: props.defaultOpen,
|
|
4091
|
+
'open.controlled': props.open !== undefined,
|
|
4092
|
+
...props
|
|
4093
|
+
}));
|
|
4094
|
+
const [state, send] = useMachine(tooltip$1.machine(context()), {
|
|
4024
4095
|
context
|
|
4025
4096
|
});
|
|
4026
4097
|
return createMemo(() => tooltip$1.connect(state, send, normalizeProps));
|
|
@@ -4028,7 +4099,7 @@ const useTooltip = props => {
|
|
|
4028
4099
|
|
|
4029
4100
|
const TooltipRoot = props => {
|
|
4030
4101
|
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
4031
|
-
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', '
|
|
4102
|
+
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', 'closeOnEscape', 'closeOnPointerDown', 'defaultOpen', 'disabled', 'id', 'ids', 'interactive', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
4032
4103
|
const api = useTooltip(useTooltipProps);
|
|
4033
4104
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
4034
4105
|
present: api().open
|
|
@@ -4193,19 +4264,23 @@ const TreeViewLabel = props => {
|
|
|
4193
4264
|
const useTreeView = props => {
|
|
4194
4265
|
const locale = useLocaleContext();
|
|
4195
4266
|
const environment = useEnvironmentContext();
|
|
4196
|
-
const
|
|
4197
|
-
|
|
4267
|
+
const id = createUniqueId();
|
|
4268
|
+
const context = createMemo(() => ({
|
|
4269
|
+
id,
|
|
4198
4270
|
dir: locale().dir,
|
|
4199
|
-
getRootNode: environment().getRootNode
|
|
4200
|
-
|
|
4201
|
-
|
|
4271
|
+
getRootNode: environment().getRootNode,
|
|
4272
|
+
selectedValue: props.defaultSelectedValue,
|
|
4273
|
+
expandedValue: props.defaultExpandedValue,
|
|
4274
|
+
...props
|
|
4275
|
+
}));
|
|
4276
|
+
const [state, send] = useMachine(treeView$1.machine(context()), {
|
|
4202
4277
|
context
|
|
4203
4278
|
});
|
|
4204
4279
|
return createMemo(() => treeView$1.connect(state, send, normalizeProps));
|
|
4205
4280
|
};
|
|
4206
4281
|
|
|
4207
4282
|
const TreeViewRoot = props => {
|
|
4208
|
-
const [useTreeViewProps, localProps] = createSplitProps()(props, ['expandedValue', 'focusedValue', 'id', 'ids', 'onExpandedChange', 'onFocusChange', 'onSelectionChange', '
|
|
4283
|
+
const [useTreeViewProps, localProps] = createSplitProps()(props, ['defaultExpandedValue', 'defaultSelectedValue', 'expandedValue', 'expandOnClick', 'focusedValue', 'id', 'ids', 'onExpandedChange', 'onFocusChange', 'onSelectionChange', 'selectedValue', 'selectionMode', 'typeahead']);
|
|
4209
4284
|
const api = useTreeView(useTreeViewProps);
|
|
4210
4285
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
4211
4286
|
return createComponent(TreeViewProvider, {
|