@ark-ui/react 5.30.0 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/accordion-item.cjs +1 -0
- package/dist/components/accordion/accordion-item.js +1 -0
- package/dist/components/accordion/index.cjs +4 -4
- package/dist/components/anatomy.cjs +7 -5
- package/dist/components/anatomy.d.cts +2 -1
- package/dist/components/anatomy.d.ts +2 -1
- package/dist/components/anatomy.js +2 -1
- package/dist/components/angle-slider/angle-slider-label.d.cts +1 -1
- package/dist/components/angle-slider/angle-slider-label.d.ts +1 -1
- package/dist/components/angle-slider/index.cjs +4 -4
- package/dist/components/avatar/index.cjs +4 -4
- package/dist/components/checkbox/checkbox-group.cjs +2 -1
- package/dist/components/checkbox/checkbox-group.js +2 -1
- package/dist/components/checkbox/use-checkbox-group.cjs +7 -3
- package/dist/components/checkbox/use-checkbox-group.d.cts +4 -0
- package/dist/components/checkbox/use-checkbox-group.d.ts +4 -0
- package/dist/components/checkbox/use-checkbox-group.js +7 -3
- package/dist/components/checkbox/use-checkbox.cjs +1 -1
- package/dist/components/checkbox/use-checkbox.js +1 -1
- package/dist/components/clipboard/index.cjs +4 -4
- package/dist/components/collapsible/index.cjs +4 -4
- package/dist/components/collection/tree-collection.js +1 -1
- package/dist/components/color-picker/index.cjs +4 -4
- package/dist/components/date-picker/date-picker-root.cjs +5 -1
- package/dist/components/date-picker/date-picker-root.js +5 -1
- package/dist/components/date-picker/date-picker-value-text.cjs +30 -0
- package/dist/components/date-picker/date-picker-value-text.d.cts +29 -0
- package/dist/components/date-picker/date-picker-value-text.d.ts +29 -0
- package/dist/components/date-picker/date-picker-value-text.js +26 -0
- package/dist/components/date-picker/date-picker-week-number-cell.cjs +24 -0
- package/dist/components/date-picker/date-picker-week-number-cell.d.cts +10 -0
- package/dist/components/date-picker/date-picker-week-number-cell.d.ts +10 -0
- package/dist/components/date-picker/date-picker-week-number-cell.js +20 -0
- package/dist/components/date-picker/date-picker-week-number-header-cell.cjs +23 -0
- package/dist/components/date-picker/date-picker-week-number-header-cell.d.cts +7 -0
- package/dist/components/date-picker/date-picker-week-number-header-cell.d.ts +7 -0
- package/dist/components/date-picker/date-picker-week-number-header-cell.js +19 -0
- package/dist/components/date-picker/date-picker.anatomy.cjs +1 -1
- package/dist/components/date-picker/date-picker.anatomy.d.cts +1 -1
- package/dist/components/date-picker/date-picker.anatomy.d.ts +1 -1
- package/dist/components/date-picker/date-picker.anatomy.js +1 -1
- package/dist/components/date-picker/date-picker.cjs +6 -0
- package/dist/components/date-picker/date-picker.d.cts +4 -1
- package/dist/components/date-picker/date-picker.d.ts +4 -1
- package/dist/components/date-picker/date-picker.js +3 -0
- package/dist/components/date-picker/index.cjs +10 -4
- package/dist/components/date-picker/index.d.cts +4 -1
- package/dist/components/date-picker/index.d.ts +4 -1
- package/dist/components/date-picker/index.js +3 -0
- package/dist/components/dialog/index.cjs +4 -4
- package/dist/components/{bottom-sheet/bottom-sheet-backdrop.cjs → drawer/drawer-backdrop.cjs} +7 -7
- package/dist/components/drawer/drawer-backdrop.d.cts +7 -0
- package/dist/components/drawer/drawer-backdrop.d.ts +7 -0
- package/dist/components/{bottom-sheet/bottom-sheet-backdrop.js → drawer/drawer-backdrop.js} +7 -7
- package/dist/components/drawer/drawer-close-trigger.cjs +19 -0
- package/dist/components/drawer/drawer-close-trigger.d.cts +7 -0
- package/dist/components/drawer/drawer-close-trigger.d.ts +7 -0
- package/dist/components/drawer/drawer-close-trigger.js +15 -0
- package/dist/components/{bottom-sheet/bottom-sheet-content.cjs → drawer/drawer-content.cjs} +6 -6
- package/dist/components/drawer/drawer-content.d.cts +8 -0
- package/dist/components/drawer/drawer-content.d.ts +8 -0
- package/dist/components/{bottom-sheet/bottom-sheet-content.js → drawer/drawer-content.js} +6 -6
- package/dist/components/drawer/drawer-context.cjs +10 -0
- package/dist/components/drawer/drawer-context.d.cts +6 -0
- package/dist/components/drawer/drawer-context.d.ts +6 -0
- package/dist/components/drawer/drawer-context.js +6 -0
- package/dist/components/drawer/drawer-grabber-indicator.cjs +19 -0
- package/dist/components/drawer/drawer-grabber-indicator.d.cts +7 -0
- package/dist/components/drawer/drawer-grabber-indicator.d.ts +7 -0
- package/dist/components/drawer/drawer-grabber-indicator.js +15 -0
- package/dist/components/drawer/drawer-grabber.cjs +19 -0
- package/dist/components/drawer/drawer-grabber.d.cts +7 -0
- package/dist/components/drawer/drawer-grabber.d.ts +7 -0
- package/dist/components/drawer/drawer-grabber.js +15 -0
- package/dist/components/drawer/drawer-indent-background.cjs +19 -0
- package/dist/components/drawer/drawer-indent-background.d.cts +7 -0
- package/dist/components/drawer/drawer-indent-background.d.ts +7 -0
- package/dist/components/drawer/drawer-indent-background.js +15 -0
- package/dist/components/drawer/drawer-indent.cjs +19 -0
- package/dist/components/drawer/drawer-indent.d.cts +7 -0
- package/dist/components/drawer/drawer-indent.d.ts +7 -0
- package/dist/components/drawer/drawer-indent.js +15 -0
- package/dist/components/drawer/drawer-positioner.cjs +24 -0
- package/dist/components/drawer/drawer-positioner.d.cts +7 -0
- package/dist/components/drawer/drawer-positioner.d.ts +7 -0
- package/dist/components/drawer/drawer-positioner.js +20 -0
- package/dist/components/drawer/drawer-root-provider.cjs +21 -0
- package/dist/components/drawer/drawer-root-provider.d.cts +14 -0
- package/dist/components/drawer/drawer-root-provider.d.ts +14 -0
- package/dist/components/drawer/drawer-root-provider.js +17 -0
- package/dist/components/{bottom-sheet/bottom-sheet-root.cjs → drawer/drawer-root.cjs} +7 -7
- package/dist/components/drawer/drawer-root.d.cts +9 -0
- package/dist/components/drawer/drawer-root.d.ts +9 -0
- package/dist/components/drawer/drawer-root.js +19 -0
- package/dist/components/drawer/drawer-stack.cjs +40 -0
- package/dist/components/drawer/drawer-stack.d.cts +5 -0
- package/dist/components/drawer/drawer-stack.d.ts +5 -0
- package/dist/components/drawer/drawer-stack.js +17 -0
- package/dist/components/drawer/drawer-title.cjs +19 -0
- package/dist/components/drawer/drawer-title.d.cts +7 -0
- package/dist/components/drawer/drawer-title.d.ts +7 -0
- package/dist/components/drawer/drawer-title.js +15 -0
- package/dist/components/{bottom-sheet/bottom-sheet-trigger.cjs → drawer/drawer-trigger.cjs} +7 -7
- package/dist/components/drawer/drawer-trigger.d.cts +7 -0
- package/dist/components/drawer/drawer-trigger.d.ts +7 -0
- package/dist/components/{bottom-sheet/bottom-sheet-trigger.js → drawer/drawer-trigger.js} +7 -7
- package/dist/components/drawer/drawer.anatomy.d.cts +1 -0
- package/dist/components/drawer/drawer.anatomy.d.ts +1 -0
- package/dist/components/drawer/drawer.cjs +35 -0
- package/dist/components/drawer/drawer.d.cts +15 -0
- package/dist/components/drawer/drawer.d.ts +15 -0
- package/dist/components/drawer/drawer.js +14 -0
- package/dist/components/drawer/index.cjs +48 -0
- package/dist/components/drawer/index.d.cts +20 -0
- package/dist/components/drawer/index.d.ts +20 -0
- package/dist/components/drawer/index.js +20 -0
- package/dist/components/drawer/use-drawer-context.cjs +15 -0
- package/dist/components/drawer/use-drawer-context.d.cts +5 -0
- package/dist/components/drawer/use-drawer-context.d.ts +5 -0
- package/dist/components/drawer/use-drawer-context.js +10 -0
- package/dist/components/drawer/use-drawer-stack-context.cjs +15 -0
- package/dist/components/drawer/use-drawer-stack-context.d.cts +6 -0
- package/dist/components/drawer/use-drawer-stack-context.d.ts +6 -0
- package/dist/components/drawer/use-drawer-stack-context.js +10 -0
- package/dist/components/drawer/use-drawer-stack-store.cjs +13 -0
- package/dist/components/drawer/use-drawer-stack-store.d.cts +4 -0
- package/dist/components/drawer/use-drawer-stack-store.d.ts +4 -0
- package/dist/components/drawer/use-drawer-stack-store.js +8 -0
- package/dist/components/{bottom-sheet/use-bottom-sheet.cjs → drawer/use-drawer.cjs} +9 -6
- package/dist/components/drawer/use-drawer.d.cts +9 -0
- package/dist/components/drawer/use-drawer.d.ts +9 -0
- package/dist/components/{bottom-sheet/use-bottom-sheet.js → drawer/use-drawer.js} +8 -5
- package/dist/components/editable/index.cjs +4 -4
- package/dist/components/file-upload/file-upload-root.cjs +1 -0
- package/dist/components/file-upload/file-upload-root.js +1 -0
- package/dist/components/file-upload/index.cjs +4 -4
- package/dist/components/floating-panel/index.cjs +4 -4
- package/dist/components/hover-card/index.cjs +4 -4
- package/dist/components/image-cropper/index.cjs +4 -4
- package/dist/components/index.cjs +217 -172
- package/dist/components/index.d.cts +2 -1
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +33 -15
- package/dist/components/json-tree-view/json-tree-view-root-provider.cjs +4 -1
- package/dist/components/json-tree-view/json-tree-view-root-provider.d.cts +3 -1
- package/dist/components/json-tree-view/json-tree-view-root-provider.d.ts +3 -1
- package/dist/components/json-tree-view/json-tree-view-root-provider.js +4 -1
- package/dist/components/json-tree-view/use-json-tree-view.cjs +12 -2
- package/dist/components/json-tree-view/use-json-tree-view.d.cts +4 -2
- package/dist/components/json-tree-view/use-json-tree-view.d.ts +4 -2
- package/dist/components/json-tree-view/use-json-tree-view.js +13 -3
- package/dist/components/marquee/index.cjs +4 -4
- package/dist/components/menu/index.cjs +4 -4
- package/dist/components/navigation-menu/index.cjs +4 -4
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.cjs +4 -3
- package/dist/components/navigation-menu/navigation-menu-viewport-positioner.js +4 -3
- package/dist/components/navigation-menu/navigation-menu-viewport.cjs +8 -6
- package/dist/components/navigation-menu/navigation-menu-viewport.d.cts +1 -2
- package/dist/components/navigation-menu/navigation-menu-viewport.d.ts +1 -2
- package/dist/components/navigation-menu/navigation-menu-viewport.js +8 -6
- package/dist/components/navigation-menu/use-navigation-menu-viewport-props-context.cjs +16 -0
- package/dist/components/navigation-menu/use-navigation-menu-viewport-props-context.d.cts +3 -0
- package/dist/components/navigation-menu/use-navigation-menu-viewport-props-context.d.ts +3 -0
- package/dist/components/navigation-menu/use-navigation-menu-viewport-props-context.js +11 -0
- package/dist/components/number-input/index.cjs +4 -4
- package/dist/components/pagination/index.cjs +4 -4
- package/dist/components/password-input/index.cjs +4 -4
- package/dist/components/pin-input/index.cjs +4 -4
- package/dist/components/popover/index.cjs +4 -4
- package/dist/components/progress/examples/circular/with-label.d.cts +1 -0
- package/dist/components/progress/examples/circular/with-label.d.ts +1 -0
- package/dist/components/progress/index.cjs +4 -4
- package/dist/components/scroll-area/index.cjs +4 -4
- package/dist/components/select/index.cjs +4 -4
- package/dist/components/select/select-root.cjs +1 -0
- package/dist/components/select/select-root.js +1 -0
- package/dist/components/signature-pad/index.cjs +4 -4
- package/dist/components/slider/index.cjs +4 -4
- package/dist/components/slider/slider-root.cjs +1 -1
- package/dist/components/slider/slider-root.js +1 -1
- package/dist/components/splitter/index.cjs +5 -5
- package/dist/components/steps/index.cjs +4 -4
- package/dist/components/steps/steps-root.cjs +4 -1
- package/dist/components/steps/steps-root.js +4 -1
- package/dist/components/swap/index.cjs +21 -0
- package/dist/components/swap/index.d.cts +7 -0
- package/dist/components/swap/index.d.ts +7 -0
- package/dist/components/swap/index.js +8 -0
- package/dist/components/swap/swap-indicator.cjs +23 -0
- package/dist/components/swap/swap-indicator.d.cts +8 -0
- package/dist/components/swap/swap-indicator.d.ts +8 -0
- package/dist/components/swap/swap-indicator.js +19 -0
- package/dist/components/swap/swap-root-provider.cjs +19 -0
- package/dist/components/swap/swap-root-provider.d.cts +9 -0
- package/dist/components/swap/swap-root-provider.d.ts +9 -0
- package/dist/components/swap/swap-root-provider.js +15 -0
- package/dist/components/swap/swap-root.cjs +21 -0
- package/dist/components/swap/swap-root.d.cts +8 -0
- package/dist/components/swap/swap-root.d.ts +8 -0
- package/dist/components/swap/swap-root.js +17 -0
- package/dist/components/swap/swap.anatomy.cjs +12 -0
- package/dist/components/swap/swap.anatomy.d.cts +3 -0
- package/dist/components/swap/swap.anatomy.d.ts +3 -0
- package/dist/components/swap/swap.anatomy.js +7 -0
- package/dist/components/swap/swap.cjs +15 -0
- package/dist/components/swap/swap.d.cts +4 -0
- package/dist/components/swap/swap.d.ts +4 -0
- package/dist/components/swap/swap.js +4 -0
- package/dist/components/swap/use-swap-context.cjs +15 -0
- package/dist/components/swap/use-swap-context.d.cts +5 -0
- package/dist/components/swap/use-swap-context.d.ts +5 -0
- package/dist/components/swap/use-swap-context.js +10 -0
- package/dist/components/swap/use-swap.cjs +37 -0
- package/dist/components/swap/use-swap.d.cts +36 -0
- package/dist/components/swap/use-swap.d.ts +36 -0
- package/dist/components/swap/use-swap.js +33 -0
- package/dist/components/tabs/index.cjs +4 -4
- package/dist/components/tags-input/index.cjs +4 -4
- package/dist/components/tags-input/tags-input-root.cjs +1 -0
- package/dist/components/tags-input/tags-input-root.js +1 -0
- package/dist/components/timer/index.cjs +4 -4
- package/dist/components/toast/index.cjs +4 -4
- package/dist/components/toggle-group/index.cjs +4 -4
- package/dist/components/tooltip/index.cjs +4 -4
- package/dist/components/tour/index.cjs +15 -0
- package/dist/components/tour/index.d.cts +3 -1
- package/dist/components/tour/index.d.ts +3 -1
- package/dist/components/tour/index.js +2 -0
- package/dist/components/tour/wait-for-event.cjs +26 -0
- package/dist/components/tour/wait-for-event.d.cts +6 -0
- package/dist/components/tour/wait-for-event.d.ts +6 -0
- package/dist/components/tour/wait-for-event.js +22 -0
- package/dist/components/tree-view/index.cjs +4 -4
- package/dist/index.cjs +219 -172
- package/dist/index.js +34 -15
- package/dist/providers/index.cjs +2 -0
- package/dist/providers/index.js +1 -0
- package/dist/providers/locale/index.cjs +2 -0
- package/dist/providers/locale/index.d.cts +1 -0
- package/dist/providers/locale/index.d.ts +1 -0
- package/dist/providers/locale/index.js +1 -0
- package/dist/providers/locale/use-date-formatter.cjs +19 -0
- package/dist/providers/locale/use-date-formatter.d.cts +5 -0
- package/dist/providers/locale/use-date-formatter.d.ts +5 -0
- package/dist/providers/locale/use-date-formatter.js +15 -0
- package/package.json +84 -82
- package/dist/components/bottom-sheet/bottom-sheet-backdrop.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-backdrop.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-close-trigger.cjs +0 -19
- package/dist/components/bottom-sheet/bottom-sheet-close-trigger.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-close-trigger.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-close-trigger.js +0 -15
- package/dist/components/bottom-sheet/bottom-sheet-content.d.cts +0 -8
- package/dist/components/bottom-sheet/bottom-sheet-content.d.ts +0 -8
- package/dist/components/bottom-sheet/bottom-sheet-context.cjs +0 -10
- package/dist/components/bottom-sheet/bottom-sheet-context.d.cts +0 -6
- package/dist/components/bottom-sheet/bottom-sheet-context.d.ts +0 -6
- package/dist/components/bottom-sheet/bottom-sheet-context.js +0 -6
- package/dist/components/bottom-sheet/bottom-sheet-grabber-indicator.cjs +0 -21
- package/dist/components/bottom-sheet/bottom-sheet-grabber-indicator.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-grabber-indicator.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-grabber-indicator.js +0 -17
- package/dist/components/bottom-sheet/bottom-sheet-grabber.cjs +0 -19
- package/dist/components/bottom-sheet/bottom-sheet-grabber.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-grabber.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-grabber.js +0 -15
- package/dist/components/bottom-sheet/bottom-sheet-root-provider.cjs +0 -21
- package/dist/components/bottom-sheet/bottom-sheet-root-provider.d.cts +0 -14
- package/dist/components/bottom-sheet/bottom-sheet-root-provider.d.ts +0 -14
- package/dist/components/bottom-sheet/bottom-sheet-root-provider.js +0 -17
- package/dist/components/bottom-sheet/bottom-sheet-root.d.cts +0 -9
- package/dist/components/bottom-sheet/bottom-sheet-root.d.ts +0 -9
- package/dist/components/bottom-sheet/bottom-sheet-root.js +0 -19
- package/dist/components/bottom-sheet/bottom-sheet-title.cjs +0 -19
- package/dist/components/bottom-sheet/bottom-sheet-title.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-title.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-title.js +0 -15
- package/dist/components/bottom-sheet/bottom-sheet-trigger.d.cts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet-trigger.d.ts +0 -7
- package/dist/components/bottom-sheet/bottom-sheet.anatomy.d.cts +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.anatomy.d.ts +0 -1
- package/dist/components/bottom-sheet/bottom-sheet.cjs +0 -27
- package/dist/components/bottom-sheet/bottom-sheet.d.cts +0 -11
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +0 -11
- package/dist/components/bottom-sheet/bottom-sheet.js +0 -10
- package/dist/components/bottom-sheet/index.cjs +0 -38
- package/dist/components/bottom-sheet/index.d.cts +0 -15
- package/dist/components/bottom-sheet/index.d.ts +0 -15
- package/dist/components/bottom-sheet/index.js +0 -15
- package/dist/components/bottom-sheet/use-bottom-sheet-context.cjs +0 -15
- package/dist/components/bottom-sheet/use-bottom-sheet-context.d.cts +0 -5
- package/dist/components/bottom-sheet/use-bottom-sheet-context.d.ts +0 -5
- package/dist/components/bottom-sheet/use-bottom-sheet-context.js +0 -10
- package/dist/components/bottom-sheet/use-bottom-sheet.d.cts +0 -8
- package/dist/components/bottom-sheet/use-bottom-sheet.d.ts +0 -8
- package/dist/components/progress/examples/circular/value-text.d.cts +0 -1
- package/dist/components/progress/examples/circular/value-text.d.ts +0 -1
|
@@ -12,6 +12,7 @@ const collapsibleRoot = require('../collapsible/collapsible-root.cjs');
|
|
|
12
12
|
require('@zag-js/color-picker');
|
|
13
13
|
require('@zag-js/date-picker');
|
|
14
14
|
require('@zag-js/splitter');
|
|
15
|
+
require('@zag-js/tour');
|
|
15
16
|
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
16
17
|
const renderStrategy = require('../../utils/render-strategy.cjs');
|
|
17
18
|
const useAccordionItemPropsContext = require('./use-accordion-item-props-context.cjs');
|
|
@@ -8,6 +8,7 @@ import { CollapsibleRoot } from '../collapsible/collapsible-root.js';
|
|
|
8
8
|
import '@zag-js/color-picker';
|
|
9
9
|
import '@zag-js/date-picker';
|
|
10
10
|
import '@zag-js/splitter';
|
|
11
|
+
import '@zag-js/tour';
|
|
11
12
|
import { createSplitProps } from '../../utils/create-split-props.js';
|
|
12
13
|
import { useRenderStrategyPropsContext } from '../../utils/render-strategy.js';
|
|
13
14
|
import { AccordionItemPropsProvider } from './use-accordion-item-props-context.js';
|
|
@@ -13,8 +13,8 @@ const accordionRootProvider = require('./accordion-root-provider.cjs');
|
|
|
13
13
|
const useAccordion = require('./use-accordion.cjs');
|
|
14
14
|
const useAccordionContext = require('./use-accordion-context.cjs');
|
|
15
15
|
const useAccordionItemContext = require('./use-accordion-item-context.cjs');
|
|
16
|
-
const accordion
|
|
17
|
-
const accordion = require('@zag-js/accordion');
|
|
16
|
+
const accordion = require('./accordion.cjs');
|
|
17
|
+
const accordion$1 = require('@zag-js/accordion');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -29,8 +29,8 @@ exports.AccordionRootProvider = accordionRootProvider.AccordionRootProvider;
|
|
|
29
29
|
exports.useAccordion = useAccordion.useAccordion;
|
|
30
30
|
exports.useAccordionContext = useAccordionContext.useAccordionContext;
|
|
31
31
|
exports.useAccordionItemContext = useAccordionItemContext.useAccordionItemContext;
|
|
32
|
-
exports.Accordion = accordion
|
|
32
|
+
exports.Accordion = accordion;
|
|
33
33
|
Object.defineProperty(exports, "accordionAnatomy", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: () => accordion.anatomy
|
|
35
|
+
get: () => accordion$1.anatomy
|
|
36
36
|
});
|
|
@@ -12,15 +12,16 @@ const field_anatomy = require('./field/field.anatomy.cjs');
|
|
|
12
12
|
const fieldset_anatomy = require('./fieldset/fieldset.anatomy.cjs');
|
|
13
13
|
const listbox_anatomy = require('./listbox/listbox.anatomy.cjs');
|
|
14
14
|
const segmentGroup_anatomy = require('./segment-group/segment-group.anatomy.cjs');
|
|
15
|
+
const swap_anatomy = require('./swap/swap.anatomy.cjs');
|
|
15
16
|
const toggle_anatomy = require('./toggle/toggle.anatomy.cjs');
|
|
16
17
|
const tour_anatomy = require('./tour/tour.anatomy.cjs');
|
|
17
18
|
const accordion = require('@zag-js/accordion');
|
|
18
19
|
const angleSlider = require('@zag-js/angle-slider');
|
|
19
20
|
const avatar = require('@zag-js/avatar');
|
|
20
|
-
const bottomSheet = require('@zag-js/bottom-sheet');
|
|
21
21
|
const clipboard = require('@zag-js/clipboard');
|
|
22
22
|
const collapsible = require('@zag-js/collapsible');
|
|
23
23
|
const dialog = require('@zag-js/dialog');
|
|
24
|
+
const drawer = require('@zag-js/drawer');
|
|
24
25
|
const editable = require('@zag-js/editable');
|
|
25
26
|
const fileUpload = require('@zag-js/file-upload');
|
|
26
27
|
const floatingPanel = require('@zag-js/floating-panel');
|
|
@@ -64,6 +65,7 @@ exports.fieldAnatomy = field_anatomy.fieldAnatomy;
|
|
|
64
65
|
exports.fieldsetAnatomy = fieldset_anatomy.fieldsetAnatomy;
|
|
65
66
|
exports.listboxAnatomy = listbox_anatomy.listboxAnatomy;
|
|
66
67
|
exports.segmentGroupAnatomy = segmentGroup_anatomy.segmentGroupAnatomy;
|
|
68
|
+
exports.swapAnatomy = swap_anatomy.swapAnatomy;
|
|
67
69
|
exports.toggleAnatomy = toggle_anatomy.toggleAnatomy;
|
|
68
70
|
exports.tourAnatomy = tour_anatomy.tourAnatomy;
|
|
69
71
|
Object.defineProperty(exports, "accordionAnatomy", {
|
|
@@ -78,10 +80,6 @@ Object.defineProperty(exports, "avatarAnatomy", {
|
|
|
78
80
|
enumerable: true,
|
|
79
81
|
get: () => avatar.anatomy
|
|
80
82
|
});
|
|
81
|
-
Object.defineProperty(exports, "bottomSheetAnatomy", {
|
|
82
|
-
enumerable: true,
|
|
83
|
-
get: () => bottomSheet.anatomy
|
|
84
|
-
});
|
|
85
83
|
Object.defineProperty(exports, "clipboardAnatomy", {
|
|
86
84
|
enumerable: true,
|
|
87
85
|
get: () => clipboard.anatomy
|
|
@@ -94,6 +92,10 @@ Object.defineProperty(exports, "dialogAnatomy", {
|
|
|
94
92
|
enumerable: true,
|
|
95
93
|
get: () => dialog.anatomy
|
|
96
94
|
});
|
|
95
|
+
Object.defineProperty(exports, "drawerAnatomy", {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: () => drawer.anatomy
|
|
98
|
+
});
|
|
97
99
|
Object.defineProperty(exports, "editableAnatomy", {
|
|
98
100
|
enumerable: true,
|
|
99
101
|
get: () => editable.anatomy
|
|
@@ -2,7 +2,7 @@ export * from '@zag-js/anatomy';
|
|
|
2
2
|
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
3
|
export { angleSliderAnatomy } from './angle-slider/angle-slider.anatomy';
|
|
4
4
|
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
5
|
-
export {
|
|
5
|
+
export { drawerAnatomy } from './drawer/drawer.anatomy';
|
|
6
6
|
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
7
7
|
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
8
8
|
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
@@ -38,6 +38,7 @@ export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
|
38
38
|
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
39
39
|
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
40
40
|
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
41
|
+
export { swapAnatomy } from './swap/swap.anatomy';
|
|
41
42
|
export { switchAnatomy } from './switch/switch.anatomy';
|
|
42
43
|
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
43
44
|
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
@@ -2,7 +2,7 @@ export * from '@zag-js/anatomy';
|
|
|
2
2
|
export { accordionAnatomy } from './accordion/accordion.anatomy';
|
|
3
3
|
export { angleSliderAnatomy } from './angle-slider/angle-slider.anatomy';
|
|
4
4
|
export { avatarAnatomy } from './avatar/avatar.anatomy';
|
|
5
|
-
export {
|
|
5
|
+
export { drawerAnatomy } from './drawer/drawer.anatomy';
|
|
6
6
|
export { carouselAnatomy } from './carousel/carousel.anatomy';
|
|
7
7
|
export { checkboxAnatomy } from './checkbox/checkbox.anatomy';
|
|
8
8
|
export { clipboardAnatomy } from './clipboard/clipboard.anatomy';
|
|
@@ -38,6 +38,7 @@ export { signaturePadAnatomy } from './signature-pad/signature-pad.anatomy';
|
|
|
38
38
|
export { sliderAnatomy } from './slider/slider.anatomy';
|
|
39
39
|
export { splitterAnatomy } from './splitter/splitter.anatomy';
|
|
40
40
|
export { stepsAnatomy } from './steps/steps.anatomy';
|
|
41
|
+
export { swapAnatomy } from './swap/swap.anatomy';
|
|
41
42
|
export { switchAnatomy } from './switch/switch.anatomy';
|
|
42
43
|
export { tabsAnatomy } from './tabs/tabs.anatomy';
|
|
43
44
|
export { tagsInputAnatomy } from './tags-input/tags-input.anatomy';
|
|
@@ -8,15 +8,16 @@ export { fieldAnatomy } from './field/field.anatomy.js';
|
|
|
8
8
|
export { fieldsetAnatomy } from './fieldset/fieldset.anatomy.js';
|
|
9
9
|
export { listboxAnatomy } from './listbox/listbox.anatomy.js';
|
|
10
10
|
export { segmentGroupAnatomy } from './segment-group/segment-group.anatomy.js';
|
|
11
|
+
export { swapAnatomy } from './swap/swap.anatomy.js';
|
|
11
12
|
export { toggleAnatomy } from './toggle/toggle.anatomy.js';
|
|
12
13
|
export { tourAnatomy } from './tour/tour.anatomy.js';
|
|
13
14
|
export { anatomy as accordionAnatomy } from '@zag-js/accordion';
|
|
14
15
|
export { anatomy as angleSliderAnatomy } from '@zag-js/angle-slider';
|
|
15
16
|
export { anatomy as avatarAnatomy } from '@zag-js/avatar';
|
|
16
|
-
export { anatomy as bottomSheetAnatomy } from '@zag-js/bottom-sheet';
|
|
17
17
|
export { anatomy as clipboardAnatomy } from '@zag-js/clipboard';
|
|
18
18
|
export { anatomy as collapsibleAnatomy } from '@zag-js/collapsible';
|
|
19
19
|
export { anatomy as dialogAnatomy } from '@zag-js/dialog';
|
|
20
|
+
export { anatomy as drawerAnatomy } from '@zag-js/drawer';
|
|
20
21
|
export { anatomy as editableAnatomy } from '@zag-js/editable';
|
|
21
22
|
export { anatomy as fileUploadAnatomy } from '@zag-js/file-upload';
|
|
22
23
|
export { anatomy as floatingPanelAnatomy } from '@zag-js/floating-panel';
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface AngleSliderLabelBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface AngleSliderLabelProps extends HTMLProps<'
|
|
5
|
+
export interface AngleSliderLabelProps extends HTMLProps<'label'>, AngleSliderLabelBaseProps {
|
|
6
6
|
}
|
|
7
7
|
export declare const AngleSliderLabel: ForwardRefExoticComponent<AngleSliderLabelProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -2,6 +2,6 @@ import { HTMLProps, PolymorphicProps } from '../factory';
|
|
|
2
2
|
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
export interface AngleSliderLabelBaseProps extends PolymorphicProps {
|
|
4
4
|
}
|
|
5
|
-
export interface AngleSliderLabelProps extends HTMLProps<'
|
|
5
|
+
export interface AngleSliderLabelProps extends HTMLProps<'label'>, AngleSliderLabelBaseProps {
|
|
6
6
|
}
|
|
7
7
|
export declare const AngleSliderLabel: ForwardRefExoticComponent<AngleSliderLabelProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -14,8 +14,8 @@ const angleSliderThumb = require('./angle-slider-thumb.cjs');
|
|
|
14
14
|
const angleSliderValueText = require('./angle-slider-value-text.cjs');
|
|
15
15
|
const useAngleSlider = require('./use-angle-slider.cjs');
|
|
16
16
|
const useAngleSliderContext = require('./use-angle-slider-context.cjs');
|
|
17
|
-
const angleSlider
|
|
18
|
-
const angleSlider = require('@zag-js/angle-slider');
|
|
17
|
+
const angleSlider = require('./angle-slider.cjs');
|
|
18
|
+
const angleSlider$1 = require('@zag-js/angle-slider');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -31,8 +31,8 @@ exports.AngleSliderThumb = angleSliderThumb.AngleSliderThumb;
|
|
|
31
31
|
exports.AngleSliderValueText = angleSliderValueText.AngleSliderValueText;
|
|
32
32
|
exports.useAngleSlider = useAngleSlider.useAngleSlider;
|
|
33
33
|
exports.useAngleSliderContext = useAngleSliderContext.useAngleSliderContext;
|
|
34
|
-
exports.AngleSlider = angleSlider
|
|
34
|
+
exports.AngleSlider = angleSlider;
|
|
35
35
|
Object.defineProperty(exports, "angleSliderAnatomy", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: () => angleSlider.anatomy
|
|
37
|
+
get: () => angleSlider$1.anatomy
|
|
38
38
|
});
|
|
@@ -9,8 +9,8 @@ const avatarRoot = require('./avatar-root.cjs');
|
|
|
9
9
|
const avatarRootProvider = require('./avatar-root-provider.cjs');
|
|
10
10
|
const useAvatar = require('./use-avatar.cjs');
|
|
11
11
|
const useAvatarContext = require('./use-avatar-context.cjs');
|
|
12
|
-
const avatar
|
|
13
|
-
const avatar = require('@zag-js/avatar');
|
|
12
|
+
const avatar = require('./avatar.cjs');
|
|
13
|
+
const avatar$1 = require('@zag-js/avatar');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -21,8 +21,8 @@ exports.AvatarRoot = avatarRoot.AvatarRoot;
|
|
|
21
21
|
exports.AvatarRootProvider = avatarRootProvider.AvatarRootProvider;
|
|
22
22
|
exports.useAvatar = useAvatar.useAvatar;
|
|
23
23
|
exports.useAvatarContext = useAvatarContext.useAvatarContext;
|
|
24
|
-
exports.Avatar = avatar
|
|
24
|
+
exports.Avatar = avatar;
|
|
25
25
|
Object.defineProperty(exports, "avatarAnatomy", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: () => avatar.anatomy
|
|
27
|
+
get: () => avatar$1.anatomy
|
|
28
28
|
});
|
|
@@ -20,7 +20,8 @@ const CheckboxGroup = react.forwardRef((props, ref) => {
|
|
|
20
20
|
"disabled",
|
|
21
21
|
"invalid",
|
|
22
22
|
"readOnly",
|
|
23
|
-
"name"
|
|
23
|
+
"name",
|
|
24
|
+
"maxSelectedValues"
|
|
24
25
|
]);
|
|
25
26
|
const checkboxGroup = useCheckboxGroup.useCheckboxGroup(checkboxGroupProps);
|
|
26
27
|
return /* @__PURE__ */ jsxRuntime.jsx(useCheckboxGroupContext.CheckboxGroupContextProvider, { value: checkboxGroup, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ref, role: "group", ...localProps, ...checkbox_anatomy.checkboxAnatomy.build().group.attrs }) });
|
|
@@ -16,7 +16,8 @@ const CheckboxGroup = forwardRef((props, ref) => {
|
|
|
16
16
|
"disabled",
|
|
17
17
|
"invalid",
|
|
18
18
|
"readOnly",
|
|
19
|
-
"name"
|
|
19
|
+
"name",
|
|
20
|
+
"maxSelectedValues"
|
|
20
21
|
]);
|
|
21
22
|
const checkboxGroup = useCheckboxGroup(checkboxGroupProps);
|
|
22
23
|
return /* @__PURE__ */ jsx(CheckboxGroupContextProvider, { value: checkboxGroup, children: /* @__PURE__ */ jsx(ark.div, { ref, role: "group", ...localProps, ...checkboxAnatomy.build().group.attrs }) });
|
|
@@ -16,7 +16,8 @@ function useCheckboxGroup(props = {}) {
|
|
|
16
16
|
disabled = fieldset?.disabled,
|
|
17
17
|
readOnly,
|
|
18
18
|
name,
|
|
19
|
-
invalid = fieldset?.invalid
|
|
19
|
+
invalid = fieldset?.invalid,
|
|
20
|
+
maxSelectedValues
|
|
20
21
|
} = props;
|
|
21
22
|
const interactive = !(disabled || readOnly);
|
|
22
23
|
const onChangeProp = useEvent.useEvent(onValueChange, { sync: true });
|
|
@@ -31,9 +32,11 @@ function useCheckboxGroup(props = {}) {
|
|
|
31
32
|
const toggleValue = (val) => {
|
|
32
33
|
isChecked(val) ? removeValue(val) : addValue(val);
|
|
33
34
|
};
|
|
35
|
+
const isAtMax = maxSelectedValues != null && value.length >= maxSelectedValues;
|
|
34
36
|
const addValue = (val) => {
|
|
35
37
|
if (!interactive) return;
|
|
36
38
|
if (isChecked(val)) return;
|
|
39
|
+
if (isAtMax) return;
|
|
37
40
|
setValue(value.concat(val));
|
|
38
41
|
};
|
|
39
42
|
const removeValue = (val) => {
|
|
@@ -41,15 +44,16 @@ function useCheckboxGroup(props = {}) {
|
|
|
41
44
|
setValue(value.filter((v) => String(v) !== String(val)));
|
|
42
45
|
};
|
|
43
46
|
const getItemProps = (props2) => {
|
|
47
|
+
const checked = props2.value != null ? isChecked(props2.value) : void 0;
|
|
44
48
|
return {
|
|
45
|
-
checked
|
|
49
|
+
checked,
|
|
46
50
|
onCheckedChange() {
|
|
47
51
|
if (props2.value != null) {
|
|
48
52
|
toggleValue(props2.value);
|
|
49
53
|
}
|
|
50
54
|
},
|
|
51
55
|
name,
|
|
52
|
-
disabled,
|
|
56
|
+
disabled: disabled || isAtMax && !checked,
|
|
53
57
|
readOnly,
|
|
54
58
|
invalid
|
|
55
59
|
};
|
|
@@ -28,6 +28,10 @@ export interface UseCheckboxGroupProps {
|
|
|
28
28
|
* If `true`, the checkbox group is invalid
|
|
29
29
|
*/
|
|
30
30
|
invalid?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum number of selected values
|
|
33
|
+
*/
|
|
34
|
+
maxSelectedValues?: number | undefined;
|
|
31
35
|
}
|
|
32
36
|
export interface CheckboxGroupItemProps {
|
|
33
37
|
value: string | undefined;
|
|
@@ -28,6 +28,10 @@ export interface UseCheckboxGroupProps {
|
|
|
28
28
|
* If `true`, the checkbox group is invalid
|
|
29
29
|
*/
|
|
30
30
|
invalid?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The maximum number of selected values
|
|
33
|
+
*/
|
|
34
|
+
maxSelectedValues?: number | undefined;
|
|
31
35
|
}
|
|
32
36
|
export interface CheckboxGroupItemProps {
|
|
33
37
|
value: string | undefined;
|
|
@@ -12,7 +12,8 @@ function useCheckboxGroup(props = {}) {
|
|
|
12
12
|
disabled = fieldset?.disabled,
|
|
13
13
|
readOnly,
|
|
14
14
|
name,
|
|
15
|
-
invalid = fieldset?.invalid
|
|
15
|
+
invalid = fieldset?.invalid,
|
|
16
|
+
maxSelectedValues
|
|
16
17
|
} = props;
|
|
17
18
|
const interactive = !(disabled || readOnly);
|
|
18
19
|
const onChangeProp = useEvent(onValueChange, { sync: true });
|
|
@@ -27,9 +28,11 @@ function useCheckboxGroup(props = {}) {
|
|
|
27
28
|
const toggleValue = (val) => {
|
|
28
29
|
isChecked(val) ? removeValue(val) : addValue(val);
|
|
29
30
|
};
|
|
31
|
+
const isAtMax = maxSelectedValues != null && value.length >= maxSelectedValues;
|
|
30
32
|
const addValue = (val) => {
|
|
31
33
|
if (!interactive) return;
|
|
32
34
|
if (isChecked(val)) return;
|
|
35
|
+
if (isAtMax) return;
|
|
33
36
|
setValue(value.concat(val));
|
|
34
37
|
};
|
|
35
38
|
const removeValue = (val) => {
|
|
@@ -37,15 +40,16 @@ function useCheckboxGroup(props = {}) {
|
|
|
37
40
|
setValue(value.filter((v) => String(v) !== String(val)));
|
|
38
41
|
};
|
|
39
42
|
const getItemProps = (props2) => {
|
|
43
|
+
const checked = props2.value != null ? isChecked(props2.value) : void 0;
|
|
40
44
|
return {
|
|
41
|
-
checked
|
|
45
|
+
checked,
|
|
42
46
|
onCheckedChange() {
|
|
43
47
|
if (props2.value != null) {
|
|
44
48
|
toggleValue(props2.value);
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
name,
|
|
48
|
-
disabled,
|
|
52
|
+
disabled: disabled || isAtMax && !checked,
|
|
49
53
|
readOnly,
|
|
50
54
|
invalid
|
|
51
55
|
};
|
|
@@ -34,7 +34,7 @@ const useCheckbox = (ownProps = {}) => {
|
|
|
34
34
|
const checkboxGroup = useCheckboxGroupContext.useCheckboxGroupContext();
|
|
35
35
|
const field = useFieldContext.useFieldContext();
|
|
36
36
|
const props = react.useMemo(() => {
|
|
37
|
-
return react$1.mergeProps(
|
|
37
|
+
return react$1.mergeProps(checkboxGroup?.getItemProps({ value: ownProps.value }) ?? {}, ownProps);
|
|
38
38
|
}, [ownProps, checkboxGroup]);
|
|
39
39
|
const id = react.useId();
|
|
40
40
|
const { getRootNode } = useEnvironmentContext.useEnvironmentContext();
|
|
@@ -11,7 +11,7 @@ const useCheckbox = (ownProps = {}) => {
|
|
|
11
11
|
const checkboxGroup = useCheckboxGroupContext();
|
|
12
12
|
const field = useFieldContext();
|
|
13
13
|
const props = useMemo(() => {
|
|
14
|
-
return mergeProps(
|
|
14
|
+
return mergeProps(checkboxGroup?.getItemProps({ value: ownProps.value }) ?? {}, ownProps);
|
|
15
15
|
}, [ownProps, checkboxGroup]);
|
|
16
16
|
const id = useId();
|
|
17
17
|
const { getRootNode } = useEnvironmentContext();
|
|
@@ -13,8 +13,8 @@ const clipboardTrigger = require('./clipboard-trigger.cjs');
|
|
|
13
13
|
const clipboardValueText = require('./clipboard-value-text.cjs');
|
|
14
14
|
const useClipboard = require('./use-clipboard.cjs');
|
|
15
15
|
const useClipboardContext = require('./use-clipboard-context.cjs');
|
|
16
|
-
const clipboard
|
|
17
|
-
const clipboard = require('@zag-js/clipboard');
|
|
16
|
+
const clipboard = require('./clipboard.cjs');
|
|
17
|
+
const clipboard$1 = require('@zag-js/clipboard');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -29,8 +29,8 @@ exports.ClipboardTrigger = clipboardTrigger.ClipboardTrigger;
|
|
|
29
29
|
exports.ClipboardValueText = clipboardValueText.ClipboardValueText;
|
|
30
30
|
exports.useClipboard = useClipboard.useClipboard;
|
|
31
31
|
exports.useClipboardContext = useClipboardContext.useClipboardContext;
|
|
32
|
-
exports.Clipboard = clipboard
|
|
32
|
+
exports.Clipboard = clipboard;
|
|
33
33
|
Object.defineProperty(exports, "clipboardAnatomy", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: () => clipboard.anatomy
|
|
35
|
+
get: () => clipboard$1.anatomy
|
|
36
36
|
});
|
|
@@ -10,8 +10,8 @@ const collapsibleRootProvider = require('./collapsible-root-provider.cjs');
|
|
|
10
10
|
const collapsibleTrigger = require('./collapsible-trigger.cjs');
|
|
11
11
|
const useCollapsible = require('./use-collapsible.cjs');
|
|
12
12
|
const useCollapsibleContext = require('./use-collapsible-context.cjs');
|
|
13
|
-
const collapsible
|
|
14
|
-
const collapsible = require('@zag-js/collapsible');
|
|
13
|
+
const collapsible = require('./collapsible.cjs');
|
|
14
|
+
const collapsible$1 = require('@zag-js/collapsible');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -23,8 +23,8 @@ exports.CollapsibleRootProvider = collapsibleRootProvider.CollapsibleRootProvide
|
|
|
23
23
|
exports.CollapsibleTrigger = collapsibleTrigger.CollapsibleTrigger;
|
|
24
24
|
exports.useCollapsible = useCollapsible.useCollapsible;
|
|
25
25
|
exports.useCollapsibleContext = useCollapsibleContext.useCollapsibleContext;
|
|
26
|
-
exports.Collapsible = collapsible
|
|
26
|
+
exports.Collapsible = collapsible;
|
|
27
27
|
Object.defineProperty(exports, "collapsibleAnatomy", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: () => collapsible.anatomy
|
|
29
|
+
get: () => collapsible$1.anatomy
|
|
30
30
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { TreeCollection, filePathToTree } from '@zag-js/collection';
|
|
3
3
|
|
|
4
4
|
const createTreeCollection = (options) => new TreeCollection(options);
|
|
5
5
|
const createFileTreeCollection = (paths) => filePathToTree(paths);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const colorPicker = require('@zag-js/color-picker');
|
|
5
|
+
const colorPicker$1 = require('@zag-js/color-picker');
|
|
6
6
|
const colorPickerArea = require('./color-picker-area.cjs');
|
|
7
7
|
const colorPickerAreaBackground = require('./color-picker-area-background.cjs');
|
|
8
8
|
const colorPickerAreaThumb = require('./color-picker-area-thumb.cjs');
|
|
@@ -35,13 +35,13 @@ const colorPickerView = require('./color-picker-view.cjs');
|
|
|
35
35
|
const colorPicker_anatomy = require('./color-picker.anatomy.cjs');
|
|
36
36
|
const useColorPicker = require('./use-color-picker.cjs');
|
|
37
37
|
const useColorPickerContext = require('./use-color-picker-context.cjs');
|
|
38
|
-
const colorPicker
|
|
38
|
+
const colorPicker = require('./color-picker.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
Object.defineProperty(exports, "parseColor", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: () => colorPicker.parse
|
|
44
|
+
get: () => colorPicker$1.parse
|
|
45
45
|
});
|
|
46
46
|
exports.ColorPickerArea = colorPickerArea.ColorPickerArea;
|
|
47
47
|
exports.ColorPickerAreaBackground = colorPickerAreaBackground.ColorPickerAreaBackground;
|
|
@@ -75,4 +75,4 @@ exports.ColorPickerView = colorPickerView.ColorPickerView;
|
|
|
75
75
|
exports.colorPickerAnatomy = colorPicker_anatomy.colorPickerAnatomy;
|
|
76
76
|
exports.useColorPicker = useColorPicker.useColorPicker;
|
|
77
77
|
exports.useColorPickerContext = useColorPickerContext.useColorPickerContext;
|
|
78
|
-
exports.ColorPicker = colorPicker
|
|
78
|
+
exports.ColorPicker = colorPicker;
|
|
@@ -43,6 +43,7 @@ const DatePickerRoot = react.forwardRef((props, ref) => {
|
|
|
43
43
|
"onOpenChange",
|
|
44
44
|
"onValueChange",
|
|
45
45
|
"onViewChange",
|
|
46
|
+
"onVisibleRangeChange",
|
|
46
47
|
"open",
|
|
47
48
|
"outsideDaySelectable",
|
|
48
49
|
"parse",
|
|
@@ -55,7 +56,10 @@ const DatePickerRoot = react.forwardRef((props, ref) => {
|
|
|
55
56
|
"timeZone",
|
|
56
57
|
"translations",
|
|
57
58
|
"value",
|
|
58
|
-
"view"
|
|
59
|
+
"view",
|
|
60
|
+
"openOnClick",
|
|
61
|
+
"showWeekNumbers",
|
|
62
|
+
"maxSelectedDates"
|
|
59
63
|
]);
|
|
60
64
|
const datePicker = useDatePicker.useDatePicker(useDatePickerProps);
|
|
61
65
|
const presence = usePresence.usePresence(react$1.mergeProps({ present: datePicker.open }, presenceProps));
|
|
@@ -39,6 +39,7 @@ const DatePickerRoot = forwardRef((props, ref) => {
|
|
|
39
39
|
"onOpenChange",
|
|
40
40
|
"onValueChange",
|
|
41
41
|
"onViewChange",
|
|
42
|
+
"onVisibleRangeChange",
|
|
42
43
|
"open",
|
|
43
44
|
"outsideDaySelectable",
|
|
44
45
|
"parse",
|
|
@@ -51,7 +52,10 @@ const DatePickerRoot = forwardRef((props, ref) => {
|
|
|
51
52
|
"timeZone",
|
|
52
53
|
"translations",
|
|
53
54
|
"value",
|
|
54
|
-
"view"
|
|
55
|
+
"view",
|
|
56
|
+
"openOnClick",
|
|
57
|
+
"showWeekNumbers",
|
|
58
|
+
"maxSelectedDates"
|
|
55
59
|
]);
|
|
56
60
|
const datePicker = useDatePicker(useDatePickerProps);
|
|
57
61
|
const presence = usePresence(mergeProps({ present: datePicker.open }, presenceProps));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react = require('react');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const datePicker_anatomy = require('./date-picker.anatomy.cjs');
|
|
10
|
+
const useDatePickerContext = require('./use-date-picker-context.cjs');
|
|
11
|
+
|
|
12
|
+
const DatePickerValueText = react.forwardRef((props, ref) => {
|
|
13
|
+
const { children, placeholder, separator = ", ", ...localProps } = props;
|
|
14
|
+
const datePicker = useDatePickerContext.useDatePickerContext();
|
|
15
|
+
const hasValue = datePicker.value.length > 0;
|
|
16
|
+
if (typeof children === "function") {
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: hasValue ? datePicker.value.map((value, index) => /* @__PURE__ */ jsxRuntime.jsx(react.Fragment, { children: children({
|
|
18
|
+
value,
|
|
19
|
+
index,
|
|
20
|
+
valueAsString: datePicker.valueAsString[index],
|
|
21
|
+
remove: () => {
|
|
22
|
+
datePicker.setValue(datePicker.value.filter((_, i) => i !== index));
|
|
23
|
+
}
|
|
24
|
+
}) }, index)) : placeholder });
|
|
25
|
+
}
|
|
26
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...datePicker_anatomy.datePickerAnatomy.build().valueText.attrs, ...localProps, ref, children: hasValue ? datePicker.valueAsString.join(separator) : placeholder });
|
|
27
|
+
});
|
|
28
|
+
DatePickerValueText.displayName = "DatePickerValueText";
|
|
29
|
+
|
|
30
|
+
exports.DatePickerValueText = DatePickerValueText;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DateValue } from '@zag-js/date-picker';
|
|
2
|
+
import { Assign } from '../../types';
|
|
3
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
+
export interface DatePickerValueTextRenderProps {
|
|
6
|
+
value: DateValue;
|
|
7
|
+
index: number;
|
|
8
|
+
valueAsString: string;
|
|
9
|
+
remove: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface DatePickerValueTextBaseProps extends PolymorphicProps {
|
|
12
|
+
/**
|
|
13
|
+
* Text to display when no date is selected.
|
|
14
|
+
*/
|
|
15
|
+
placeholder?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* A function to render each selected date value.
|
|
18
|
+
* When provided, each date in the selection will be rendered using this function.
|
|
19
|
+
*/
|
|
20
|
+
children?: ((props: DatePickerValueTextRenderProps) => React.ReactNode) | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The separator to use between multiple date values when using default rendering.
|
|
23
|
+
* @default ", "
|
|
24
|
+
*/
|
|
25
|
+
separator?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface DatePickerValueTextProps extends Assign<HTMLProps<'span'>, DatePickerValueTextBaseProps> {
|
|
28
|
+
}
|
|
29
|
+
export declare const DatePickerValueText: ForwardRefExoticComponent<DatePickerValueTextProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DateValue } from '@zag-js/date-picker';
|
|
2
|
+
import { Assign } from '../../types';
|
|
3
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
5
|
+
export interface DatePickerValueTextRenderProps {
|
|
6
|
+
value: DateValue;
|
|
7
|
+
index: number;
|
|
8
|
+
valueAsString: string;
|
|
9
|
+
remove: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface DatePickerValueTextBaseProps extends PolymorphicProps {
|
|
12
|
+
/**
|
|
13
|
+
* Text to display when no date is selected.
|
|
14
|
+
*/
|
|
15
|
+
placeholder?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* A function to render each selected date value.
|
|
18
|
+
* When provided, each date in the selection will be rendered using this function.
|
|
19
|
+
*/
|
|
20
|
+
children?: ((props: DatePickerValueTextRenderProps) => React.ReactNode) | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The separator to use between multiple date values when using default rendering.
|
|
23
|
+
* @default ", "
|
|
24
|
+
*/
|
|
25
|
+
separator?: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface DatePickerValueTextProps extends Assign<HTMLProps<'span'>, DatePickerValueTextBaseProps> {
|
|
28
|
+
}
|
|
29
|
+
export declare const DatePickerValueText: ForwardRefExoticComponent<DatePickerValueTextProps & RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, Fragment } from 'react';
|
|
4
|
+
import { ark } from '../factory.js';
|
|
5
|
+
import { datePickerAnatomy } from './date-picker.anatomy.js';
|
|
6
|
+
import { useDatePickerContext } from './use-date-picker-context.js';
|
|
7
|
+
|
|
8
|
+
const DatePickerValueText = forwardRef((props, ref) => {
|
|
9
|
+
const { children, placeholder, separator = ", ", ...localProps } = props;
|
|
10
|
+
const datePicker = useDatePickerContext();
|
|
11
|
+
const hasValue = datePicker.value.length > 0;
|
|
12
|
+
if (typeof children === "function") {
|
|
13
|
+
return /* @__PURE__ */ jsx(Fragment, { children: hasValue ? datePicker.value.map((value, index) => /* @__PURE__ */ jsx(Fragment, { children: children({
|
|
14
|
+
value,
|
|
15
|
+
index,
|
|
16
|
+
valueAsString: datePicker.valueAsString[index],
|
|
17
|
+
remove: () => {
|
|
18
|
+
datePicker.setValue(datePicker.value.filter((_, i) => i !== index));
|
|
19
|
+
}
|
|
20
|
+
}) }, index)) : placeholder });
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsx(ark.span, { ...datePickerAnatomy.build().valueText.attrs, ...localProps, ref, children: hasValue ? datePicker.valueAsString.join(separator) : placeholder });
|
|
23
|
+
});
|
|
24
|
+
DatePickerValueText.displayName = "DatePickerValueText";
|
|
25
|
+
|
|
26
|
+
export { DatePickerValueText };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const createSplitProps = require('../../utils/create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const useDatePickerContext = require('./use-date-picker-context.cjs');
|
|
12
|
+
|
|
13
|
+
const splitWeekNumberCellProps = createSplitProps.createSplitProps();
|
|
14
|
+
const DatePickerWeekNumberCell = react.forwardRef(
|
|
15
|
+
(props, ref) => {
|
|
16
|
+
const [cellProps, localProps] = splitWeekNumberCellProps(props, ["weekIndex", "week"]);
|
|
17
|
+
const datePicker = useDatePickerContext.useDatePickerContext();
|
|
18
|
+
const mergedProps = react$1.mergeProps(datePicker.getWeekNumberCellProps(cellProps), localProps);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.td, { ...mergedProps, ref });
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
DatePickerWeekNumberCell.displayName = "DatePickerWeekNumberCell";
|
|
23
|
+
|
|
24
|
+
exports.DatePickerWeekNumberCell = DatePickerWeekNumberCell;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DateValue } from '@zag-js/date-picker';
|
|
2
|
+
import { HTMLProps, PolymorphicProps } from '../factory';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
|
+
export interface DatePickerWeekNumberCellBaseProps extends PolymorphicProps {
|
|
5
|
+
weekIndex: number;
|
|
6
|
+
week: DateValue[];
|
|
7
|
+
}
|
|
8
|
+
export interface DatePickerWeekNumberCellProps extends HTMLProps<'td'>, DatePickerWeekNumberCellBaseProps {
|
|
9
|
+
}
|
|
10
|
+
export declare const DatePickerWeekNumberCell: ForwardRefExoticComponent<DatePickerWeekNumberCellProps & RefAttributes<HTMLTableCellElement>>;
|