@ark-ui/solid 3.0.0-3 → 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 +289 -210
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +291 -212
- 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 +11 -7
- 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 +11 -7
- 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,18 +1177,22 @@ const ComboboxPositioner = props => {
|
|
|
1171
1177
|
};
|
|
1172
1178
|
|
|
1173
1179
|
const useCombobox = props => {
|
|
1174
|
-
const [collectionOptions,
|
|
1180
|
+
const [collectionOptions, comboboxProps] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
1175
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
|
-
const [state, send] = useMachine(combobox$1.machine(context), {
|
|
1193
|
+
...comboboxProps
|
|
1194
|
+
}));
|
|
1195
|
+
const [state, send] = useMachine(combobox$1.machine(context()), {
|
|
1186
1196
|
context
|
|
1187
1197
|
});
|
|
1188
1198
|
return createMemo(() => combobox$1.connect(state, send, normalizeProps));
|
|
@@ -1190,7 +1200,7 @@ const useCombobox = props => {
|
|
|
1190
1200
|
|
|
1191
1201
|
const ComboboxRoot = props => {
|
|
1192
1202
|
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
1193
|
-
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']);
|
|
1194
1204
|
const api = useCombobox(useComboboxProps);
|
|
1195
1205
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1196
1206
|
present: api().open
|
|
@@ -1210,8 +1220,9 @@ const ComboboxRoot = props => {
|
|
|
1210
1220
|
};
|
|
1211
1221
|
|
|
1212
1222
|
const ComboboxTrigger = props => {
|
|
1223
|
+
const [triggerProps, localProps] = createSplitProps()(props, ['focusable']);
|
|
1213
1224
|
const combobox = useComboboxContext();
|
|
1214
|
-
const mergedProps = mergeProps$1(() => combobox().triggerProps,
|
|
1225
|
+
const mergedProps = mergeProps$1(() => combobox().getTriggerProps(triggerProps), localProps);
|
|
1215
1226
|
return createComponent(ark.button, mergedProps);
|
|
1216
1227
|
};
|
|
1217
1228
|
|
|
@@ -1349,18 +1360,20 @@ const DatePickerRangeText = props => {
|
|
|
1349
1360
|
const useDatePicker = props => {
|
|
1350
1361
|
const locale = useLocaleContext();
|
|
1351
1362
|
const environment = useEnvironmentContext();
|
|
1352
|
-
const
|
|
1353
|
-
const context =
|
|
1354
|
-
id
|
|
1363
|
+
const id = createUniqueId();
|
|
1364
|
+
const context = createMemo(() => ({
|
|
1365
|
+
id,
|
|
1355
1366
|
dir: locale().dir,
|
|
1356
1367
|
getRootNode: environment().getRootNode,
|
|
1357
1368
|
'open.controlled': props.open !== undefined,
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
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()), {
|
|
1364
1377
|
context
|
|
1365
1378
|
});
|
|
1366
1379
|
return createMemo(() => datePicker$1.connect(state, send, normalizeProps));
|
|
@@ -1368,7 +1381,7 @@ const useDatePicker = props => {
|
|
|
1368
1381
|
|
|
1369
1382
|
const DatePickerRoot = props => {
|
|
1370
1383
|
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1371
|
-
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']);
|
|
1372
1385
|
const api = useDatePicker(useDatePickerProps);
|
|
1373
1386
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1374
1387
|
present: api().open
|
|
@@ -1636,13 +1649,16 @@ const DialogPositioner = props => {
|
|
|
1636
1649
|
const useDialog = props => {
|
|
1637
1650
|
const locale = useLocaleContext();
|
|
1638
1651
|
const environment = useEnvironmentContext();
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1652
|
+
const id = createUniqueId();
|
|
1653
|
+
const context = createMemo(() => ({
|
|
1654
|
+
id,
|
|
1641
1655
|
dir: locale().dir,
|
|
1642
1656
|
getRootNode: environment().getRootNode,
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1657
|
+
open: props.defaultOpen,
|
|
1658
|
+
'open.controlled': props.open !== undefined,
|
|
1659
|
+
...props
|
|
1660
|
+
}));
|
|
1661
|
+
const [state, send] = useMachine(dialog$1.machine(context()), {
|
|
1646
1662
|
context
|
|
1647
1663
|
});
|
|
1648
1664
|
return createMemo(() => dialog$1.connect(state, send, normalizeProps));
|
|
@@ -1651,7 +1667,7 @@ const useDialog = props => {
|
|
|
1651
1667
|
const DialogRoot = props => {
|
|
1652
1668
|
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
1653
1669
|
const [renderStrategyProps] = splitRenderStrategyProps(presenceProps);
|
|
1654
|
-
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']);
|
|
1655
1671
|
const api = useDialog(useDialogProps);
|
|
1656
1672
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1657
1673
|
present: api().open
|
|
@@ -1754,19 +1770,22 @@ const EditablePreview = props => {
|
|
|
1754
1770
|
const useEditable = props => {
|
|
1755
1771
|
const locale = useLocaleContext();
|
|
1756
1772
|
const environment = useEnvironmentContext();
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1773
|
+
const id = createUniqueId();
|
|
1774
|
+
const context = createMemo(() => ({
|
|
1775
|
+
id,
|
|
1759
1776
|
dir: locale().dir,
|
|
1760
|
-
getRootNode: environment().getRootNode
|
|
1761
|
-
|
|
1762
|
-
|
|
1777
|
+
getRootNode: environment().getRootNode,
|
|
1778
|
+
value: props.defaultValue,
|
|
1779
|
+
...props
|
|
1780
|
+
}));
|
|
1781
|
+
const [state, send] = useMachine(editable$1.machine(context()), {
|
|
1763
1782
|
context
|
|
1764
1783
|
});
|
|
1765
1784
|
return createMemo(() => editable$1.connect(state, send, normalizeProps));
|
|
1766
1785
|
};
|
|
1767
1786
|
|
|
1768
1787
|
const EditableRoot = props => {
|
|
1769
|
-
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']);
|
|
1770
1789
|
const api = useEditable(useEditableProps);
|
|
1771
1790
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1772
1791
|
return createComponent(EditableProvider, {
|
|
@@ -1891,12 +1910,14 @@ const FileUploadLabel = props => {
|
|
|
1891
1910
|
const useFileUpload = props => {
|
|
1892
1911
|
const locale = useLocaleContext();
|
|
1893
1912
|
const environment = useEnvironmentContext();
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1913
|
+
const id = createUniqueId();
|
|
1914
|
+
const context = createMemo(() => ({
|
|
1915
|
+
id,
|
|
1896
1916
|
dir: locale().dir,
|
|
1897
|
-
getRootNode: environment().getRootNode
|
|
1898
|
-
|
|
1899
|
-
|
|
1917
|
+
getRootNode: environment().getRootNode,
|
|
1918
|
+
...props
|
|
1919
|
+
}));
|
|
1920
|
+
const [state, send] = useMachine(fileUpload$1.machine(context()), {
|
|
1900
1921
|
context
|
|
1901
1922
|
});
|
|
1902
1923
|
return createMemo(() => fileUpload$1.connect(state, send, normalizeProps));
|
|
@@ -2013,13 +2034,16 @@ const HoverCardPositioner = props => {
|
|
|
2013
2034
|
const useHoverCard = props => {
|
|
2014
2035
|
const locale = useLocaleContext();
|
|
2015
2036
|
const environment = useEnvironmentContext();
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2037
|
+
const id = createUniqueId();
|
|
2038
|
+
const context = createMemo(() => ({
|
|
2039
|
+
id,
|
|
2018
2040
|
dir: locale().dir,
|
|
2019
2041
|
getRootNode: environment().getRootNode,
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2042
|
+
open: props.defaultOpen,
|
|
2043
|
+
'open.controlled': props.open !== undefined,
|
|
2044
|
+
...props
|
|
2045
|
+
}));
|
|
2046
|
+
const [state, send] = useMachine(hoverCard$1.machine(context()), {
|
|
2023
2047
|
context
|
|
2024
2048
|
});
|
|
2025
2049
|
return createMemo(() => hoverCard$1.connect(state, send, normalizeProps));
|
|
@@ -2027,7 +2051,7 @@ const useHoverCard = props => {
|
|
|
2027
2051
|
|
|
2028
2052
|
const HoverCardRoot = props => {
|
|
2029
2053
|
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
2030
|
-
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']);
|
|
2031
2055
|
const api = useHoverCard(useHoverCardProps);
|
|
2032
2056
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
2033
2057
|
present: api().open
|
|
@@ -2255,13 +2279,16 @@ const MenuRadioItemGroup = props => {
|
|
|
2255
2279
|
const useMenu = props => {
|
|
2256
2280
|
const locale = useLocaleContext();
|
|
2257
2281
|
const environment = useEnvironmentContext();
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2282
|
+
const id = createUniqueId();
|
|
2283
|
+
const context = createMemo(() => ({
|
|
2284
|
+
id,
|
|
2260
2285
|
dir: locale().dir,
|
|
2261
2286
|
getRootNode: environment().getRootNode,
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2287
|
+
open: props.defaultOpen,
|
|
2288
|
+
'open.controlled': props.open !== undefined,
|
|
2289
|
+
...props
|
|
2290
|
+
}));
|
|
2291
|
+
const [state, send, machine] = useMachine(menu$1.machine(context()), {
|
|
2265
2292
|
context
|
|
2266
2293
|
});
|
|
2267
2294
|
const api = createMemo(() => menu$1.connect(state, send, normalizeProps));
|
|
@@ -2285,7 +2312,7 @@ const [MenuTriggerItemProvider, useMenuTriggerItemContext] = createContext({
|
|
|
2285
2312
|
|
|
2286
2313
|
const MenuRoot = props => {
|
|
2287
2314
|
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
2288
|
-
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']);
|
|
2289
2316
|
const parentApi = useMenuContext();
|
|
2290
2317
|
const parentMachine = useMenuMachineContext();
|
|
2291
2318
|
const menu = useMenu(useMenuProps);
|
|
@@ -2410,19 +2437,22 @@ const NumberInputLabel = props => {
|
|
|
2410
2437
|
const useNumberInput = props => {
|
|
2411
2438
|
const locale = useLocaleContext();
|
|
2412
2439
|
const environment = useEnvironmentContext();
|
|
2413
|
-
const
|
|
2414
|
-
|
|
2440
|
+
const id = createUniqueId();
|
|
2441
|
+
const context = createMemo(() => ({
|
|
2442
|
+
id,
|
|
2415
2443
|
dir: locale().dir,
|
|
2416
|
-
getRootNode: environment().getRootNode
|
|
2417
|
-
|
|
2418
|
-
|
|
2444
|
+
getRootNode: environment().getRootNode,
|
|
2445
|
+
value: props.defaultValue,
|
|
2446
|
+
...props
|
|
2447
|
+
}));
|
|
2448
|
+
const [state, send] = useMachine(numberInput$1.machine(context()), {
|
|
2419
2449
|
context
|
|
2420
2450
|
});
|
|
2421
2451
|
return createMemo(() => numberInput$1.connect(state, send, normalizeProps));
|
|
2422
2452
|
};
|
|
2423
2453
|
|
|
2424
2454
|
const NumberInputRoot = props => {
|
|
2425
|
-
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']);
|
|
2426
2456
|
const api = useNumberInput(useNumberInputProps);
|
|
2427
2457
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2428
2458
|
return createComponent(NumberInputProvider, {
|
|
@@ -2487,19 +2517,22 @@ const PaginationPrevTrigger = props => {
|
|
|
2487
2517
|
const usePagination = props => {
|
|
2488
2518
|
const locale = useLocaleContext();
|
|
2489
2519
|
const environment = useEnvironmentContext();
|
|
2490
|
-
const
|
|
2491
|
-
|
|
2520
|
+
const id = createUniqueId();
|
|
2521
|
+
const context = createMemo(() => ({
|
|
2522
|
+
id,
|
|
2492
2523
|
dir: locale().dir,
|
|
2493
|
-
getRootNode: environment().getRootNode
|
|
2494
|
-
|
|
2495
|
-
|
|
2524
|
+
getRootNode: environment().getRootNode,
|
|
2525
|
+
page: props.defaultPage,
|
|
2526
|
+
...props
|
|
2527
|
+
}));
|
|
2528
|
+
const [state, send] = useMachine(pagination$1.machine(context()), {
|
|
2496
2529
|
context
|
|
2497
2530
|
});
|
|
2498
2531
|
return createMemo(() => pagination$1.connect(state, send, normalizeProps));
|
|
2499
2532
|
};
|
|
2500
2533
|
|
|
2501
2534
|
const PaginationRoot = props => {
|
|
2502
|
-
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']);
|
|
2503
2536
|
const api = usePagination(usePaginationProps);
|
|
2504
2537
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2505
2538
|
return createComponent(PaginationProvider, {
|
|
@@ -2549,19 +2582,22 @@ const PinInputLabel = props => {
|
|
|
2549
2582
|
const usePinInput = props => {
|
|
2550
2583
|
const locale = useLocaleContext();
|
|
2551
2584
|
const environment = useEnvironmentContext();
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2585
|
+
const id = createUniqueId();
|
|
2586
|
+
const context = createMemo(() => ({
|
|
2587
|
+
id,
|
|
2554
2588
|
dir: locale().dir,
|
|
2555
|
-
getRootNode: environment().getRootNode
|
|
2556
|
-
|
|
2557
|
-
|
|
2589
|
+
getRootNode: environment().getRootNode,
|
|
2590
|
+
value: props.defaultValue,
|
|
2591
|
+
...props
|
|
2592
|
+
}));
|
|
2593
|
+
const [state, send] = useMachine(pinInput$1.machine(context()), {
|
|
2558
2594
|
context
|
|
2559
2595
|
});
|
|
2560
2596
|
return createMemo(() => pinInput$1.connect(state, send, normalizeProps));
|
|
2561
2597
|
};
|
|
2562
2598
|
|
|
2563
2599
|
const PinInputRoot = props => {
|
|
2564
|
-
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']);
|
|
2565
2601
|
const pinInput = usePinInput(usePinInputProps);
|
|
2566
2602
|
const mergedProps = mergeProps$1(() => pinInput().rootProps, localProps);
|
|
2567
2603
|
return createComponent(PinInputProvider, {
|
|
@@ -2662,13 +2698,16 @@ const PopoverPositioner = props => {
|
|
|
2662
2698
|
const usePopover = props => {
|
|
2663
2699
|
const locale = useLocaleContext();
|
|
2664
2700
|
const environment = useEnvironmentContext();
|
|
2665
|
-
const
|
|
2666
|
-
|
|
2701
|
+
const id = createUniqueId();
|
|
2702
|
+
const context = createMemo(() => ({
|
|
2703
|
+
id,
|
|
2667
2704
|
dir: locale().dir,
|
|
2668
2705
|
getRootNode: environment().getRootNode,
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2706
|
+
open: props.defaultOpen,
|
|
2707
|
+
'open.controlled': props.open !== undefined,
|
|
2708
|
+
...props
|
|
2709
|
+
}));
|
|
2710
|
+
const [state, send] = useMachine(popover$1.machine(context()), {
|
|
2672
2711
|
context
|
|
2673
2712
|
});
|
|
2674
2713
|
return createMemo(() => popover$1.connect(state, send, normalizeProps));
|
|
@@ -2676,7 +2715,7 @@ const usePopover = props => {
|
|
|
2676
2715
|
|
|
2677
2716
|
const PopoverRoot = props => {
|
|
2678
2717
|
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
2679
|
-
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']);
|
|
2680
2719
|
const api = usePopover(usePopoverProps);
|
|
2681
2720
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
2682
2721
|
present: api().open
|
|
@@ -2765,12 +2804,14 @@ const ProgressRange = props => {
|
|
|
2765
2804
|
const useProgress = props => {
|
|
2766
2805
|
const locale = useLocaleContext();
|
|
2767
2806
|
const environment = useEnvironmentContext();
|
|
2768
|
-
const
|
|
2769
|
-
|
|
2807
|
+
const id = createUniqueId();
|
|
2808
|
+
const context = createMemo(() => ({
|
|
2809
|
+
id,
|
|
2770
2810
|
dir: locale().dir,
|
|
2771
|
-
getRootNode: environment().getRootNode
|
|
2772
|
-
|
|
2773
|
-
|
|
2811
|
+
getRootNode: environment().getRootNode,
|
|
2812
|
+
...props
|
|
2813
|
+
}));
|
|
2814
|
+
const [state, send] = useMachine(progress$1.machine(context()), {
|
|
2774
2815
|
context
|
|
2775
2816
|
});
|
|
2776
2817
|
return createMemo(() => progress$1.connect(state, send, normalizeProps));
|
|
@@ -2896,19 +2937,22 @@ const RadioGroupLabel = props => {
|
|
|
2896
2937
|
const useRadioGroup = props => {
|
|
2897
2938
|
const locale = useLocaleContext();
|
|
2898
2939
|
const environment = useEnvironmentContext();
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2940
|
+
const id = createUniqueId();
|
|
2941
|
+
const context = createMemo(() => ({
|
|
2942
|
+
id,
|
|
2901
2943
|
dir: locale().dir,
|
|
2902
|
-
getRootNode: environment().getRootNode
|
|
2903
|
-
|
|
2904
|
-
|
|
2944
|
+
getRootNode: environment().getRootNode,
|
|
2945
|
+
value: props.defaultValue,
|
|
2946
|
+
...props
|
|
2947
|
+
}));
|
|
2948
|
+
const [state, send] = useMachine(radio.machine(context()), {
|
|
2905
2949
|
context
|
|
2906
2950
|
});
|
|
2907
2951
|
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
2908
2952
|
};
|
|
2909
2953
|
|
|
2910
2954
|
const RadioGroupRoot = props => {
|
|
2911
|
-
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']);
|
|
2912
2956
|
const radioGroup = useRadioGroup(useRadioGroupProps);
|
|
2913
2957
|
const mergedProps = mergeProps$1(() => radioGroup().rootProps, localProps);
|
|
2914
2958
|
return createComponent(RadioGroupProvider, {
|
|
@@ -2973,19 +3017,22 @@ const RatingGroupLabel = props => {
|
|
|
2973
3017
|
const useRatingGroup = props => {
|
|
2974
3018
|
const locale = useLocaleContext();
|
|
2975
3019
|
const environment = useEnvironmentContext();
|
|
2976
|
-
const
|
|
2977
|
-
|
|
3020
|
+
const id = createUniqueId();
|
|
3021
|
+
const context = createMemo(() => ({
|
|
3022
|
+
id,
|
|
2978
3023
|
dir: locale().dir,
|
|
2979
|
-
getRootNode: environment().getRootNode
|
|
2980
|
-
|
|
2981
|
-
|
|
3024
|
+
getRootNode: environment().getRootNode,
|
|
3025
|
+
value: props.defaultValue,
|
|
3026
|
+
...props
|
|
3027
|
+
}));
|
|
3028
|
+
const [state, send] = useMachine(rating.machine(context()), {
|
|
2982
3029
|
context
|
|
2983
3030
|
});
|
|
2984
3031
|
return createMemo(() => rating.connect(state, send, normalizeProps));
|
|
2985
3032
|
};
|
|
2986
3033
|
|
|
2987
3034
|
const RatingGroupRoot = props => {
|
|
2988
|
-
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']);
|
|
2989
3036
|
const api = useRatingGroup(useRatingProps);
|
|
2990
3037
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2991
3038
|
return createComponent(RatingGroupProvider, {
|
|
@@ -3084,19 +3131,22 @@ const SegmentGroupLabel = props => {
|
|
|
3084
3131
|
const useSegmentGroup = props => {
|
|
3085
3132
|
const locale = useLocaleContext();
|
|
3086
3133
|
const environment = useEnvironmentContext();
|
|
3087
|
-
const
|
|
3088
|
-
|
|
3134
|
+
const id = createUniqueId();
|
|
3135
|
+
const context = createMemo(() => ({
|
|
3136
|
+
id,
|
|
3089
3137
|
dir: locale().dir,
|
|
3090
|
-
getRootNode: environment().getRootNode
|
|
3091
|
-
|
|
3092
|
-
|
|
3138
|
+
getRootNode: environment().getRootNode,
|
|
3139
|
+
value: props.defaultValue,
|
|
3140
|
+
...props
|
|
3141
|
+
}));
|
|
3142
|
+
const [state, send] = useMachine(radio.machine(context()), {
|
|
3093
3143
|
context
|
|
3094
3144
|
});
|
|
3095
3145
|
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
3096
3146
|
};
|
|
3097
3147
|
|
|
3098
3148
|
const SegmentGroupRoot = props => {
|
|
3099
|
-
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']);
|
|
3100
3150
|
const segmentGroup = useSegmentGroup(useSegmentGroupProps);
|
|
3101
3151
|
const mergedProps = mergeProps$1(() => segmentGroup().rootProps, segmentGroupAnatomy.build().root.attrs, localProps);
|
|
3102
3152
|
return createComponent(SegmentGroupProvider, {
|
|
@@ -3200,7 +3250,7 @@ const [SelectItemPropsProvider, useSelectItemPropsContext] = createContext({
|
|
|
3200
3250
|
});
|
|
3201
3251
|
|
|
3202
3252
|
const SelectItem = props => {
|
|
3203
|
-
const [itemProps, localProps] = createSplitProps()(props, ['item']);
|
|
3253
|
+
const [itemProps, localProps] = createSplitProps()(props, ['item', 'persistFocus']);
|
|
3204
3254
|
const select = useSelectContext();
|
|
3205
3255
|
const mergedProps = mergeProps$1(() => select().getItemProps(itemProps), localProps);
|
|
3206
3256
|
const itemState = createMemo(() => select().getItemState(itemProps));
|
|
@@ -3283,18 +3333,22 @@ const SelectPositioner = props => {
|
|
|
3283
3333
|
};
|
|
3284
3334
|
|
|
3285
3335
|
const useSelect = props => {
|
|
3286
|
-
const [collectionOptions,
|
|
3336
|
+
const [collectionOptions, selectProps] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
3287
3337
|
const collection = () => select$1.collection(collectionOptions);
|
|
3288
3338
|
const locale = useLocaleContext();
|
|
3289
3339
|
const environment = useEnvironmentContext();
|
|
3290
|
-
const
|
|
3291
|
-
|
|
3340
|
+
const id = createUniqueId();
|
|
3341
|
+
const context = createMemo(() => ({
|
|
3342
|
+
id,
|
|
3343
|
+
collection: collection(),
|
|
3292
3344
|
dir: locale().dir,
|
|
3293
3345
|
getRootNode: environment().getRootNode,
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3346
|
+
open: props.defaultOpen,
|
|
3347
|
+
value: props.defaultValue,
|
|
3348
|
+
'open.controlled': props.open !== undefined,
|
|
3349
|
+
...selectProps
|
|
3350
|
+
}));
|
|
3351
|
+
const [state, send] = useMachine(select$1.machine(context()), {
|
|
3298
3352
|
context
|
|
3299
3353
|
});
|
|
3300
3354
|
return createMemo(() => select$1.connect(state, send, normalizeProps));
|
|
@@ -3302,7 +3356,7 @@ const useSelect = props => {
|
|
|
3302
3356
|
|
|
3303
3357
|
const SelectRoot = props => {
|
|
3304
3358
|
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
3305
|
-
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']);
|
|
3306
3360
|
const select = useSelect(useSelectProps);
|
|
3307
3361
|
const presenceApi = usePresence(mergeProps$1(() => ({
|
|
3308
3362
|
present: select().open
|
|
@@ -3399,19 +3453,22 @@ const SliderRange = props => {
|
|
|
3399
3453
|
const useSlider = props => {
|
|
3400
3454
|
const locale = useLocaleContext();
|
|
3401
3455
|
const environment = useEnvironmentContext();
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3456
|
+
const id = createUniqueId();
|
|
3457
|
+
const context = createMemo(() => ({
|
|
3458
|
+
id,
|
|
3404
3459
|
dir: locale().dir,
|
|
3405
|
-
getRootNode: environment().getRootNode
|
|
3406
|
-
|
|
3407
|
-
|
|
3460
|
+
getRootNode: environment().getRootNode,
|
|
3461
|
+
value: props.defaultValue,
|
|
3462
|
+
...props
|
|
3463
|
+
}));
|
|
3464
|
+
const [state, send] = useMachine(slider$1.machine(context()), {
|
|
3408
3465
|
context
|
|
3409
3466
|
});
|
|
3410
3467
|
return createMemo(() => slider$1.connect(state, send, normalizeProps));
|
|
3411
3468
|
};
|
|
3412
3469
|
|
|
3413
3470
|
const SliderRoot = props => {
|
|
3414
|
-
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']);
|
|
3415
3472
|
const api = useSlider(useSliderProps);
|
|
3416
3473
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3417
3474
|
return createComponent(SliderProvider, {
|
|
@@ -3483,19 +3540,22 @@ const SplitterResizeTrigger = props => {
|
|
|
3483
3540
|
const useSplitter = props => {
|
|
3484
3541
|
const locale = useLocaleContext();
|
|
3485
3542
|
const environment = useEnvironmentContext();
|
|
3486
|
-
const
|
|
3487
|
-
|
|
3543
|
+
const id = createUniqueId();
|
|
3544
|
+
const context = createMemo(() => ({
|
|
3545
|
+
id,
|
|
3488
3546
|
dir: locale().dir,
|
|
3489
|
-
getRootNode: environment().getRootNode
|
|
3490
|
-
|
|
3491
|
-
|
|
3547
|
+
getRootNode: environment().getRootNode,
|
|
3548
|
+
size: props.defaultSize,
|
|
3549
|
+
...props
|
|
3550
|
+
}));
|
|
3551
|
+
const [state, send] = useMachine(splitter$1.machine(context()), {
|
|
3492
3552
|
context
|
|
3493
3553
|
});
|
|
3494
3554
|
return createMemo(() => splitter$1.connect(state, send, normalizeProps));
|
|
3495
3555
|
};
|
|
3496
3556
|
|
|
3497
3557
|
const SplitterRoot = props => {
|
|
3498
|
-
const [useSplitterProps, localProps] = createSplitProps()(props, ['id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'orientation', 'size']);
|
|
3558
|
+
const [useSplitterProps, localProps] = createSplitProps()(props, ['defaultSize', 'id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'orientation', 'size']);
|
|
3499
3559
|
const api = useSplitter(useSplitterProps);
|
|
3500
3560
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3501
3561
|
return createComponent(SplitterProvider, {
|
|
@@ -3542,19 +3602,22 @@ const SwitchLabel = props => {
|
|
|
3542
3602
|
const useSwitch = props => {
|
|
3543
3603
|
const locale = useLocaleContext();
|
|
3544
3604
|
const environment = useEnvironmentContext();
|
|
3545
|
-
const
|
|
3546
|
-
|
|
3605
|
+
const id = createUniqueId();
|
|
3606
|
+
const context = createMemo(() => ({
|
|
3607
|
+
id,
|
|
3547
3608
|
dir: locale().dir,
|
|
3548
|
-
getRootNode: environment().getRootNode
|
|
3549
|
-
|
|
3550
|
-
|
|
3609
|
+
getRootNode: environment().getRootNode,
|
|
3610
|
+
checked: props.defaultChecked,
|
|
3611
|
+
...props
|
|
3612
|
+
}));
|
|
3613
|
+
const [state, send] = useMachine(zagSwitch.machine(context()), {
|
|
3551
3614
|
context
|
|
3552
3615
|
});
|
|
3553
3616
|
return createMemo(() => zagSwitch.connect(state, send, normalizeProps));
|
|
3554
3617
|
};
|
|
3555
3618
|
|
|
3556
3619
|
const SwitchRoot = props => {
|
|
3557
|
-
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']);
|
|
3558
3621
|
const api = useSwitch(switchProps);
|
|
3559
3622
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3560
3623
|
return createComponent(SwitchProvider, {
|
|
@@ -3633,12 +3696,15 @@ const TabsContext = props => props.children(useTabsContext());
|
|
|
3633
3696
|
const useTabs = props => {
|
|
3634
3697
|
const locale = useLocaleContext();
|
|
3635
3698
|
const environment = useEnvironmentContext();
|
|
3636
|
-
const
|
|
3637
|
-
|
|
3699
|
+
const id = createUniqueId();
|
|
3700
|
+
const context = createMemo(() => ({
|
|
3701
|
+
id,
|
|
3638
3702
|
dir: locale().dir,
|
|
3639
|
-
getRootNode: environment().getRootNode
|
|
3640
|
-
|
|
3641
|
-
|
|
3703
|
+
getRootNode: environment().getRootNode,
|
|
3704
|
+
value: props.defaultValue,
|
|
3705
|
+
...props
|
|
3706
|
+
}));
|
|
3707
|
+
const [state, send] = useMachine(tabs$1.machine(context()), {
|
|
3642
3708
|
context
|
|
3643
3709
|
});
|
|
3644
3710
|
return createMemo(() => tabs$1.connect(state, send, normalizeProps));
|
|
@@ -3646,7 +3712,7 @@ const useTabs = props => {
|
|
|
3646
3712
|
|
|
3647
3713
|
const TabsRoot = props => {
|
|
3648
3714
|
const [renderStrategyProps, tabsProps] = splitRenderStrategyProps(props);
|
|
3649
|
-
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']);
|
|
3650
3716
|
const api = useTabs(useTabsProps);
|
|
3651
3717
|
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3652
3718
|
return createComponent(TabsProvider, {
|
|
@@ -3770,19 +3836,22 @@ const TagsInputLabel = props => {
|
|
|
3770
3836
|
const useTagsInput = props => {
|
|
3771
3837
|
const locale = useLocaleContext();
|
|
3772
3838
|
const environment = useEnvironmentContext();
|
|
3773
|
-
const
|
|
3774
|
-
|
|
3839
|
+
const id = createUniqueId();
|
|
3840
|
+
const context = createMemo(() => ({
|
|
3841
|
+
id,
|
|
3775
3842
|
dir: locale().dir,
|
|
3776
|
-
getRootNode: environment().getRootNode
|
|
3777
|
-
|
|
3778
|
-
|
|
3843
|
+
getRootNode: environment().getRootNode,
|
|
3844
|
+
value: props.defaultValue,
|
|
3845
|
+
...props
|
|
3846
|
+
}));
|
|
3847
|
+
const [state, send] = useMachine(tagsInput$1.machine(context()), {
|
|
3779
3848
|
context
|
|
3780
3849
|
});
|
|
3781
3850
|
return createMemo(() => tagsInput$1.connect(state, send, normalizeProps));
|
|
3782
3851
|
};
|
|
3783
3852
|
|
|
3784
3853
|
const TagsInputRoot = props => {
|
|
3785
|
-
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']);
|
|
3786
3855
|
const api = useTagsInput(useTagsInputProps);
|
|
3787
3856
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3788
3857
|
return createComponent(TagsInputProvider, {
|
|
@@ -3930,19 +3999,22 @@ const ToggleGroupItem = props => {
|
|
|
3930
3999
|
const useToggleGroup = props => {
|
|
3931
4000
|
const locale = useLocaleContext();
|
|
3932
4001
|
const environment = useEnvironmentContext();
|
|
3933
|
-
const
|
|
3934
|
-
|
|
4002
|
+
const id = createUniqueId();
|
|
4003
|
+
const context = createMemo(() => ({
|
|
4004
|
+
id,
|
|
3935
4005
|
dir: locale().dir,
|
|
3936
|
-
getRootNode: environment().getRootNode
|
|
3937
|
-
|
|
3938
|
-
|
|
4006
|
+
getRootNode: environment().getRootNode,
|
|
4007
|
+
value: props.defaultValue,
|
|
4008
|
+
...props
|
|
4009
|
+
}));
|
|
4010
|
+
const [state, send] = useMachine(toggleGroup$1.machine(context()), {
|
|
3939
4011
|
context
|
|
3940
4012
|
});
|
|
3941
4013
|
return createMemo(() => toggleGroup$1.connect(state, send, normalizeProps));
|
|
3942
4014
|
};
|
|
3943
4015
|
|
|
3944
4016
|
const ToggleGroupRoot = props => {
|
|
3945
|
-
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']);
|
|
3946
4018
|
const api = useToggleGroup(useToggleGroupProps);
|
|
3947
4019
|
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3948
4020
|
return createComponent(ToggleGroupProvider, {
|
|
@@ -4010,13 +4082,16 @@ const TooltipPositioner = props => {
|
|
|
4010
4082
|
const useTooltip = props => {
|
|
4011
4083
|
const locale = useLocaleContext();
|
|
4012
4084
|
const environment = useEnvironmentContext();
|
|
4013
|
-
const
|
|
4014
|
-
|
|
4085
|
+
const id = createUniqueId();
|
|
4086
|
+
const context = createMemo(() => ({
|
|
4087
|
+
id,
|
|
4015
4088
|
dir: locale().dir,
|
|
4016
4089
|
getRootNode: environment().getRootNode,
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4090
|
+
open: props.defaultOpen,
|
|
4091
|
+
'open.controlled': props.open !== undefined,
|
|
4092
|
+
...props
|
|
4093
|
+
}));
|
|
4094
|
+
const [state, send] = useMachine(tooltip$1.machine(context()), {
|
|
4020
4095
|
context
|
|
4021
4096
|
});
|
|
4022
4097
|
return createMemo(() => tooltip$1.connect(state, send, normalizeProps));
|
|
@@ -4024,7 +4099,7 @@ const useTooltip = props => {
|
|
|
4024
4099
|
|
|
4025
4100
|
const TooltipRoot = props => {
|
|
4026
4101
|
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
4027
|
-
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']);
|
|
4028
4103
|
const api = useTooltip(useTooltipProps);
|
|
4029
4104
|
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
4030
4105
|
present: api().open
|
|
@@ -4189,19 +4264,23 @@ const TreeViewLabel = props => {
|
|
|
4189
4264
|
const useTreeView = props => {
|
|
4190
4265
|
const locale = useLocaleContext();
|
|
4191
4266
|
const environment = useEnvironmentContext();
|
|
4192
|
-
const
|
|
4193
|
-
|
|
4267
|
+
const id = createUniqueId();
|
|
4268
|
+
const context = createMemo(() => ({
|
|
4269
|
+
id,
|
|
4194
4270
|
dir: locale().dir,
|
|
4195
|
-
getRootNode: environment().getRootNode
|
|
4196
|
-
|
|
4197
|
-
|
|
4271
|
+
getRootNode: environment().getRootNode,
|
|
4272
|
+
selectedValue: props.defaultSelectedValue,
|
|
4273
|
+
expandedValue: props.defaultExpandedValue,
|
|
4274
|
+
...props
|
|
4275
|
+
}));
|
|
4276
|
+
const [state, send] = useMachine(treeView$1.machine(context()), {
|
|
4198
4277
|
context
|
|
4199
4278
|
});
|
|
4200
4279
|
return createMemo(() => treeView$1.connect(state, send, normalizeProps));
|
|
4201
4280
|
};
|
|
4202
4281
|
|
|
4203
4282
|
const TreeViewRoot = props => {
|
|
4204
|
-
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']);
|
|
4205
4284
|
const api = useTreeView(useTreeViewProps);
|
|
4206
4285
|
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
4207
4286
|
return createComponent(TreeViewProvider, {
|