@ark-ui/react 1.3.0 → 2.0.1
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/CHANGELOG.md +58 -0
- package/README.md +1 -0
- package/accordion/accordion-item-content.cjs +1 -2
- package/accordion/accordion-item-content.mjs +1 -2
- package/accordion/accordion-item-trigger.cjs +1 -2
- package/accordion/accordion-item-trigger.mjs +1 -2
- package/accordion/accordion-item.cjs +3 -4
- package/accordion/accordion-item.mjs +3 -4
- package/accordion/accordion-root.cjs +38 -0
- package/accordion/accordion-root.d.ts +9 -0
- package/accordion/accordion-root.mjs +34 -0
- package/accordion/accordion.cjs +11 -33
- package/accordion/accordion.d.ts +6 -9
- package/accordion/accordion.mjs +5 -35
- package/accordion/index.cjs +5 -10
- package/accordion/index.d.ts +4 -12
- package/accordion/index.mjs +7 -16
- package/accordion/use-accordion.cjs +1 -2
- package/accordion/use-accordion.mjs +1 -2
- package/avatar/avatar-root.cjs +27 -0
- package/avatar/avatar-root.d.ts +8 -0
- package/avatar/avatar-root.mjs +23 -0
- package/avatar/avatar.cjs +7 -21
- package/avatar/avatar.d.ts +4 -8
- package/avatar/avatar.mjs +3 -23
- package/avatar/index.cjs +5 -8
- package/avatar/index.d.ts +4 -10
- package/avatar/index.mjs +5 -12
- package/avatar/use-avatar.cjs +1 -2
- package/avatar/use-avatar.mjs +1 -2
- package/carousel/carousel-root.cjs +40 -0
- package/carousel/carousel-root.d.ts +9 -0
- package/carousel/carousel-root.mjs +36 -0
- package/carousel/carousel.cjs +19 -34
- package/carousel/carousel.d.ts +10 -9
- package/carousel/carousel.mjs +9 -36
- package/carousel/index.cjs +5 -14
- package/carousel/index.d.ts +4 -16
- package/carousel/index.mjs +11 -24
- package/carousel/use-carousel.cjs +1 -2
- package/carousel/use-carousel.mjs +1 -2
- package/checkbox/checkbox-root.cjs +41 -0
- package/checkbox/checkbox-root.d.ts +9 -0
- package/checkbox/checkbox-root.mjs +37 -0
- package/checkbox/checkbox.cjs +9 -35
- package/checkbox/checkbox.d.ts +5 -9
- package/checkbox/checkbox.mjs +4 -37
- package/checkbox/index.cjs +5 -9
- package/checkbox/index.d.ts +5 -12
- package/checkbox/index.mjs +6 -14
- package/checkbox/use-checkbox.cjs +1 -2
- package/checkbox/use-checkbox.mjs +1 -2
- package/color-picker/color-picker-content.cjs +1 -2
- package/color-picker/color-picker-content.mjs +1 -2
- package/color-picker/color-picker-positioner.cjs +1 -2
- package/color-picker/color-picker-positioner.mjs +1 -2
- package/color-picker/color-picker-root.cjs +55 -0
- package/color-picker/color-picker-root.d.ts +10 -0
- package/color-picker/color-picker-root.mjs +51 -0
- package/color-picker/color-picker.cjs +47 -50
- package/color-picker/color-picker.d.ts +24 -10
- package/color-picker/color-picker.mjs +23 -52
- package/color-picker/index.cjs +5 -28
- package/color-picker/index.d.ts +4 -30
- package/color-picker/index.mjs +25 -52
- package/color-picker/use-color-picker.cjs +1 -2
- package/color-picker/use-color-picker.mjs +1 -2
- package/combobox/combobox-content.cjs +1 -2
- package/combobox/combobox-content.mjs +1 -2
- package/combobox/combobox-positioner.cjs +1 -2
- package/combobox/combobox-positioner.mjs +1 -2
- package/combobox/combobox-root.cjs +70 -0
- package/combobox/combobox-root.d.ts +13 -0
- package/combobox/combobox-root.mjs +66 -0
- package/combobox/combobox.cjs +27 -65
- package/combobox/combobox.d.ts +14 -13
- package/combobox/combobox.mjs +13 -67
- package/combobox/index.cjs +5 -18
- package/combobox/index.d.ts +4 -20
- package/combobox/index.mjs +15 -32
- package/combobox/use-combobox.cjs +1 -2
- package/combobox/use-combobox.mjs +1 -2
- package/date-picker/date-picker-content.cjs +1 -2
- package/date-picker/date-picker-content.mjs +1 -2
- package/date-picker/date-picker-positioner.cjs +1 -2
- package/date-picker/date-picker-positioner.mjs +1 -2
- package/date-picker/date-picker-root.cjs +65 -0
- package/date-picker/date-picker-root.d.ts +10 -0
- package/date-picker/date-picker-root.mjs +61 -0
- package/date-picker/date-picker.cjs +47 -60
- package/date-picker/date-picker.d.ts +24 -10
- package/date-picker/date-picker.mjs +23 -62
- package/date-picker/index.cjs +5 -28
- package/date-picker/index.d.ts +4 -30
- package/date-picker/index.mjs +25 -52
- package/date-picker/use-date-picker.cjs +1 -2
- package/date-picker/use-date-picker.mjs +1 -2
- package/dialog/dialog-backdrop.cjs +1 -2
- package/dialog/dialog-backdrop.mjs +1 -2
- package/dialog/dialog-content.cjs +1 -2
- package/dialog/dialog-content.mjs +1 -2
- package/dialog/dialog-positioner.cjs +1 -2
- package/dialog/dialog-positioner.mjs +1 -2
- package/dialog/dialog-root.cjs +25 -0
- package/dialog/dialog-root.d.ts +8 -0
- package/dialog/dialog-root.mjs +21 -0
- package/dialog/dialog-trigger.cjs +1 -2
- package/dialog/dialog-trigger.mjs +1 -2
- package/dialog/dialog.cjs +17 -20
- package/dialog/dialog.d.ts +9 -8
- package/dialog/dialog.mjs +8 -22
- package/dialog/index.cjs +5 -13
- package/dialog/index.d.ts +4 -16
- package/dialog/index.mjs +10 -22
- package/dialog/use-dialog.cjs +1 -2
- package/dialog/use-dialog.mjs +1 -2
- package/editable/editable-root.cjs +55 -0
- package/editable/editable-root.d.ts +9 -0
- package/editable/editable-root.mjs +51 -0
- package/editable/editable.cjs +19 -49
- package/editable/editable.d.ts +10 -9
- package/editable/editable.mjs +9 -51
- package/editable/index.cjs +5 -14
- package/editable/index.d.ts +4 -16
- package/editable/index.mjs +11 -24
- package/editable/use-editable.cjs +1 -2
- package/editable/use-editable.mjs +1 -2
- package/environment/index.cjs +2 -5
- package/environment/index.d.ts +1 -5
- package/environment/index.mjs +1 -8
- package/file-upload/file-upload-root.cjs +46 -0
- package/file-upload/file-upload-root.d.ts +9 -0
- package/file-upload/file-upload-root.mjs +42 -0
- package/file-upload/file-upload.cjs +23 -40
- package/file-upload/file-upload.d.ts +12 -9
- package/file-upload/file-upload.mjs +11 -42
- package/file-upload/index.cjs +6 -16
- package/file-upload/index.d.ts +5 -19
- package/file-upload/index.mjs +13 -28
- package/file-upload/use-file-upload.cjs +1 -2
- package/file-upload/use-file-upload.mjs +1 -2
- package/hover-card/hover-card-content.cjs +1 -2
- package/hover-card/hover-card-content.mjs +1 -2
- package/hover-card/hover-card-positioner.cjs +1 -2
- package/hover-card/hover-card-positioner.mjs +1 -2
- package/hover-card/hover-card-root.cjs +24 -0
- package/hover-card/hover-card-root.d.ts +8 -0
- package/hover-card/hover-card-root.mjs +20 -0
- package/hover-card/hover-card.cjs +13 -19
- package/hover-card/hover-card.d.ts +7 -8
- package/hover-card/hover-card.mjs +6 -21
- package/hover-card/index.cjs +5 -11
- package/hover-card/index.d.ts +5 -15
- package/hover-card/index.mjs +8 -18
- package/hover-card/use-hover-card.cjs +1 -2
- package/hover-card/use-hover-card.mjs +1 -2
- package/index.cjs +238 -148
- package/index.d.ts +1 -0
- package/index.mjs +148 -73
- package/menu/index.cjs +5 -18
- package/menu/index.d.ts +4 -21
- package/menu/index.mjs +15 -32
- package/menu/menu-content.cjs +1 -2
- package/menu/menu-content.mjs +1 -2
- package/menu/menu-positioner.cjs +1 -2
- package/menu/menu-positioner.mjs +1 -2
- package/menu/menu-root.cjs +58 -0
- package/menu/menu-root.d.ts +8 -0
- package/menu/menu-root.mjs +54 -0
- package/menu/menu-trigger.cjs +1 -2
- package/menu/menu-trigger.mjs +1 -2
- package/menu/menu.cjs +27 -53
- package/menu/menu.d.ts +14 -8
- package/menu/menu.mjs +13 -55
- package/menu/use-menu.cjs +1 -2
- package/menu/use-menu.mjs +1 -2
- package/number-input/index.cjs +5 -12
- package/number-input/index.d.ts +4 -14
- package/number-input/index.mjs +9 -20
- package/number-input/number-input-root.cjs +52 -0
- package/number-input/number-input-root.d.ts +9 -0
- package/number-input/number-input-root.mjs +48 -0
- package/number-input/number-input.cjs +15 -46
- package/number-input/number-input.d.ts +8 -9
- package/number-input/number-input.mjs +7 -48
- package/number-input/use-number-input.cjs +1 -2
- package/number-input/use-number-input.mjs +1 -2
- package/package.json +60 -54
- package/pagination/index.cjs +5 -10
- package/pagination/index.d.ts +4 -12
- package/pagination/index.mjs +7 -16
- package/pagination/pagination-root.cjs +40 -0
- package/pagination/pagination-root.d.ts +9 -0
- package/pagination/pagination-root.mjs +36 -0
- package/pagination/pagination.cjs +11 -34
- package/pagination/pagination.d.ts +6 -9
- package/pagination/pagination.mjs +5 -36
- package/pagination/use-pagination.cjs +1 -2
- package/pagination/use-pagination.mjs +1 -2
- package/pin-input/index.cjs +5 -9
- package/pin-input/index.d.ts +4 -11
- package/pin-input/index.mjs +6 -14
- package/pin-input/pin-input-root.cjs +48 -0
- package/pin-input/pin-input-root.d.ts +8 -0
- package/pin-input/pin-input-root.mjs +44 -0
- package/pin-input/pin-input.cjs +9 -42
- package/pin-input/pin-input.d.ts +5 -8
- package/pin-input/pin-input.mjs +4 -44
- package/pin-input/use-pin-input.cjs +1 -2
- package/pin-input/use-pin-input.mjs +1 -2
- package/popover/index.cjs +5 -16
- package/popover/index.d.ts +4 -19
- package/popover/index.mjs +13 -28
- package/popover/popover-content.cjs +1 -2
- package/popover/popover-content.mjs +1 -2
- package/popover/popover-positioner.cjs +1 -2
- package/popover/popover-positioner.mjs +1 -2
- package/popover/popover-root.cjs +24 -0
- package/popover/popover-root.d.ts +8 -0
- package/popover/popover-root.mjs +20 -0
- package/popover/popover-trigger.cjs +1 -2
- package/popover/popover-trigger.mjs +1 -2
- package/popover/popover.cjs +23 -19
- package/popover/popover.d.ts +12 -8
- package/popover/popover.mjs +11 -21
- package/popover/use-popover.cjs +1 -2
- package/popover/use-popover.mjs +1 -2
- package/portal.cjs +1 -2
- package/portal.mjs +1 -2
- package/presence/index.cjs +2 -5
- package/presence/index.d.ts +1 -6
- package/presence/index.mjs +1 -8
- package/progress/index.cjs +7 -16
- package/progress/index.d.ts +5 -27
- package/progress/index.mjs +11 -24
- package/progress/progress-root.cjs +34 -0
- package/progress/progress-root.d.ts +9 -0
- package/progress/progress-root.mjs +30 -0
- package/progress/progress-view.cjs +20 -0
- package/progress/progress-view.d.ts +8 -0
- package/progress/progress-view.mjs +16 -0
- package/progress/progress.cjs +19 -28
- package/progress/progress.d.ts +10 -9
- package/progress/progress.mjs +9 -30
- package/progress/use-progress.cjs +0 -1
- package/progress/use-progress.mjs +0 -1
- package/radio-group/index.cjs +6 -11
- package/radio-group/index.d.ts +5 -14
- package/radio-group/index.mjs +8 -18
- package/radio-group/radio-group-root.cjs +34 -0
- package/radio-group/radio-group-root.d.ts +8 -0
- package/radio-group/radio-group-root.mjs +30 -0
- package/radio-group/radio-group.cjs +13 -28
- package/radio-group/radio-group.d.ts +7 -8
- package/radio-group/radio-group.mjs +6 -30
- package/radio-group/use-radio-group.cjs +1 -2
- package/radio-group/use-radio-group.mjs +1 -2
- package/rating-group/index.cjs +5 -9
- package/rating-group/index.d.ts +4 -11
- package/rating-group/index.mjs +6 -14
- package/rating-group/rating-group-root.cjs +39 -0
- package/rating-group/rating-group-root.d.ts +8 -0
- package/rating-group/rating-group-root.mjs +35 -0
- package/rating-group/rating-group.cjs +9 -33
- package/rating-group/rating-group.d.ts +5 -8
- package/rating-group/rating-group.mjs +4 -35
- package/rating-group/use-rating-group.cjs +1 -2
- package/rating-group/use-rating-group.mjs +1 -2
- package/segment-group/index.cjs +5 -11
- package/segment-group/index.d.ts +4 -13
- package/segment-group/index.mjs +8 -18
- package/segment-group/segment-group-root.cjs +39 -0
- package/segment-group/segment-group-root.d.ts +8 -0
- package/segment-group/segment-group-root.mjs +35 -0
- package/segment-group/segment-group.cjs +13 -33
- package/segment-group/segment-group.d.ts +7 -8
- package/segment-group/segment-group.mjs +6 -35
- package/segment-group/use-segment-group.cjs +1 -2
- package/segment-group/use-segment-group.mjs +1 -2
- package/select/index.cjs +5 -19
- package/select/index.d.ts +4 -21
- package/select/index.mjs +16 -34
- package/select/select-content.cjs +1 -2
- package/select/select-content.mjs +1 -2
- package/select/select-positioner.cjs +1 -2
- package/select/select-positioner.mjs +1 -2
- package/select/select-root.cjs +61 -0
- package/select/select-root.d.ts +13 -0
- package/select/select-root.mjs +57 -0
- package/select/select.cjs +29 -56
- package/select/select.d.ts +15 -13
- package/select/select.mjs +14 -58
- package/select/use-select.cjs +1 -2
- package/select/use-select.mjs +1 -2
- package/slider/index.cjs +5 -14
- package/slider/index.d.ts +4 -16
- package/slider/index.mjs +11 -24
- package/slider/slider-root.cjs +51 -0
- package/slider/slider-root.d.ts +9 -0
- package/slider/slider-root.mjs +47 -0
- package/slider/slider.cjs +19 -45
- package/slider/slider.d.ts +10 -9
- package/slider/slider.mjs +9 -47
- package/slider/use-slider.cjs +1 -2
- package/slider/use-slider.mjs +1 -2
- package/splitter/index.cjs +5 -8
- package/splitter/index.d.ts +4 -10
- package/splitter/index.mjs +5 -12
- package/splitter/splitter-root.cjs +38 -0
- package/splitter/splitter-root.d.ts +9 -0
- package/splitter/splitter-root.mjs +34 -0
- package/splitter/splitter.cjs +7 -32
- package/splitter/splitter.d.ts +4 -9
- package/splitter/splitter.mjs +3 -34
- package/splitter/use-splitter.cjs +1 -2
- package/splitter/use-splitter.mjs +1 -2
- package/switch/index.cjs +5 -9
- package/switch/index.d.ts +4 -11
- package/switch/index.mjs +6 -14
- package/switch/switch-root.cjs +39 -0
- package/switch/switch-root.d.ts +9 -0
- package/switch/switch-root.mjs +35 -0
- package/switch/switch.cjs +9 -33
- package/switch/switch.d.ts +5 -9
- package/switch/switch.mjs +4 -35
- package/switch/use-switch.cjs +1 -2
- package/switch/use-switch.mjs +1 -2
- package/tabs/index.cjs +5 -10
- package/tabs/index.d.ts +4 -12
- package/tabs/index.mjs +7 -16
- package/tabs/tab-content.cjs +2 -3
- package/tabs/tab-content.mjs +2 -3
- package/tabs/tabs-root.cjs +38 -0
- package/tabs/tabs-root.d.ts +9 -0
- package/tabs/tabs-root.mjs +34 -0
- package/tabs/tabs.cjs +11 -33
- package/tabs/tabs.d.ts +6 -9
- package/tabs/tabs.mjs +5 -35
- package/tabs/use-tabs.cjs +1 -2
- package/tabs/use-tabs.mjs +1 -2
- package/tags-input/index.cjs +7 -14
- package/tags-input/index.d.ts +5 -16
- package/tags-input/index.mjs +12 -24
- package/tags-input/tags-input-item-preview.cjs +23 -0
- package/tags-input/tags-input-item-preview.d.ts +6 -0
- package/tags-input/tags-input-item-preview.mjs +19 -0
- package/tags-input/tags-input-root.cjs +59 -0
- package/tags-input/tags-input-root.d.ts +9 -0
- package/tags-input/tags-input-root.mjs +55 -0
- package/tags-input/tags-input.cjs +21 -53
- package/tags-input/tags-input.d.ts +11 -9
- package/tags-input/tags-input.mjs +10 -55
- package/tags-input/use-tags-input.cjs +1 -2
- package/tags-input/use-tags-input.mjs +1 -2
- package/toast/create-toaster.cjs +1 -2
- package/toast/create-toaster.mjs +1 -2
- package/toast/index.cjs +5 -10
- package/toast/index.d.ts +4 -12
- package/toast/index.mjs +7 -16
- package/toast/toast-root.cjs +19 -0
- package/toast/toast-root.d.ts +6 -0
- package/toast/toast-root.mjs +15 -0
- package/toast/toast.cjs +11 -13
- package/toast/toast.d.ts +6 -6
- package/toast/toast.mjs +5 -15
- package/toggle-group/index.cjs +5 -7
- package/toggle-group/index.d.ts +4 -9
- package/toggle-group/index.mjs +4 -10
- package/toggle-group/toggle-group-root.cjs +35 -0
- package/toggle-group/toggle-group-root.d.ts +8 -0
- package/toggle-group/toggle-group-root.mjs +31 -0
- package/toggle-group/toggle-group.cjs +5 -29
- package/toggle-group/toggle-group.d.ts +3 -8
- package/toggle-group/toggle-group.mjs +2 -31
- package/toggle-group/use-toggle-group.cjs +1 -2
- package/toggle-group/use-toggle-group.mjs +1 -2
- package/tooltip/index.cjs +5 -11
- package/tooltip/index.d.ts +4 -14
- package/tooltip/index.mjs +8 -18
- package/tooltip/tooltip-content.cjs +1 -2
- package/tooltip/tooltip-content.mjs +1 -2
- package/tooltip/tooltip-positioner.cjs +1 -2
- package/tooltip/tooltip-positioner.mjs +1 -2
- package/tooltip/tooltip-root.cjs +24 -0
- package/tooltip/tooltip-root.d.ts +8 -0
- package/tooltip/tooltip-root.mjs +20 -0
- package/tooltip/tooltip.cjs +13 -19
- package/tooltip/tooltip.d.ts +7 -8
- package/tooltip/tooltip.mjs +6 -21
- package/tooltip/use-tooltip.cjs +1 -2
- package/tooltip/use-tooltip.mjs +1 -2
- package/tree-view/index.cjs +33 -0
- package/tree-view/index.d.ts +16 -0
- package/tree-view/index.mjs +14 -0
- package/tree-view/tree-view-branch-content.cjs +27 -0
- package/tree-view/tree-view-branch-content.d.ts +8 -0
- package/tree-view/tree-view-branch-content.mjs +23 -0
- package/tree-view/tree-view-branch-control.cjs +27 -0
- package/tree-view/tree-view-branch-control.d.ts +8 -0
- package/tree-view/tree-view-branch-control.mjs +23 -0
- package/tree-view/tree-view-branch-indicator.cjs +32 -0
- package/tree-view/tree-view-branch-indicator.d.ts +8 -0
- package/tree-view/tree-view-branch-indicator.mjs +28 -0
- package/tree-view/tree-view-branch-text.cjs +27 -0
- package/tree-view/tree-view-branch-text.d.ts +8 -0
- package/tree-view/tree-view-branch-text.mjs +23 -0
- package/tree-view/tree-view-branch-trigger.cjs +27 -0
- package/tree-view/tree-view-branch-trigger.d.ts +8 -0
- package/tree-view/tree-view-branch-trigger.mjs +23 -0
- package/tree-view/tree-view-branch.cjs +28 -0
- package/tree-view/tree-view-branch.d.ts +9 -0
- package/tree-view/tree-view-branch.mjs +24 -0
- package/tree-view/tree-view-context.cjs +15 -0
- package/tree-view/tree-view-context.d.ts +22 -0
- package/tree-view/tree-view-context.mjs +10 -0
- package/tree-view/tree-view-item-text.cjs +30 -0
- package/tree-view/tree-view-item-text.d.ts +8 -0
- package/tree-view/tree-view-item-text.mjs +26 -0
- package/tree-view/tree-view-item.cjs +28 -0
- package/tree-view/tree-view-item.d.ts +9 -0
- package/tree-view/tree-view-item.mjs +24 -0
- package/tree-view/tree-view-label.cjs +19 -0
- package/tree-view/tree-view-label.d.ts +6 -0
- package/tree-view/tree-view-label.mjs +15 -0
- package/tree-view/tree-view-root.cjs +40 -0
- package/tree-view/tree-view-root.d.ts +9 -0
- package/tree-view/tree-view-root.mjs +36 -0
- package/tree-view/tree-view-tree.cjs +19 -0
- package/tree-view/tree-view-tree.d.ts +6 -0
- package/tree-view/tree-view-tree.mjs +15 -0
- package/tree-view/tree-view.cjs +29 -0
- package/tree-view/tree-view.d.ts +12 -0
- package/tree-view/tree-view.mjs +11 -0
- package/tree-view/use-tree-view.cjs +49 -0
- package/tree-view/use-tree-view.d.ts +12 -0
- package/tree-view/use-tree-view.mjs +26 -0
- package/accordion/accordion.test.d.ts +0 -1
- package/accordion/stories/accordion.stories.d.ts +0 -13
- package/avatar/avatar.test.d.ts +0 -1
- package/avatar/stories/avatar.stories.d.ts +0 -8
- package/carousel/carousel.test.d.ts +0 -1
- package/carousel/stories/carousel.stories.d.ts +0 -9
- package/checkbox/checkbox.test.d.ts +0 -1
- package/checkbox/stories/checkbox.stories.d.ts +0 -10
- package/color-picker/color-picker.test.d.ts +0 -1
- package/color-picker/stories/color-picker.stories.d.ts +0 -8
- package/combobox/combobox.test.d.ts +0 -1
- package/combobox/stories/combobox.stories.d.ts +0 -8
- package/date-picker/date-picker.test.d.ts +0 -1
- package/date-picker/stories/date-picker.stories.d.ts +0 -8
- package/date-picker/stories/date-range-picker.stories.d.ts +0 -8
- package/dialog/dialog.test.d.ts +0 -1
- package/dialog/stories/dialog.stories.d.ts +0 -10
- package/editable/editable.test.d.ts +0 -1
- package/editable/stories/editable.stories.d.ts +0 -8
- package/environment/environment.test.d.ts +0 -1
- package/environment/stories/environment.stories.d.ts +0 -7
- package/factory.test.d.ts +0 -1
- package/file-upload/file-upload.test.d.ts +0 -1
- package/file-upload/stories/file-upload.stories.d.ts +0 -7
- package/hover-card/hover-card.test.d.ts +0 -1
- package/hover-card/stories/hover-card.stories.d.ts +0 -10
- package/menu/menu.test.d.ts +0 -1
- package/menu/stories/context-menu.stories.d.ts +0 -7
- package/menu/stories/menu.stories.d.ts +0 -11
- package/menu/stories/nested-menu.stories.d.ts +0 -8
- package/number-input/number-input.test.d.ts +0 -1
- package/number-input/stories/number-input.stories.d.ts +0 -15
- package/pagination/pagination.test.d.ts +0 -1
- package/pagination/stories/pagination.stories.d.ts +0 -9
- package/pin-input/pin-input.test.d.ts +0 -1
- package/pin-input/stories/pin-input.stories.d.ts +0 -12
- package/popover/popover.test.d.ts +0 -1
- package/popover/stories/popover.stories.d.ts +0 -15
- package/presence/presence.test.d.ts +0 -1
- package/presence/stories/presence.stories.d.ts +0 -10
- package/progress/progress-indicator.cjs +0 -22
- package/progress/progress-indicator.d.ts +0 -8
- package/progress/progress-indicator.mjs +0 -18
- package/progress/progress.test.d.ts +0 -1
- package/progress/stories/circular-progress.stories.d.ts +0 -11
- package/progress/stories/linear-progress.stories.d.ts +0 -12
- package/radio-group/radio-group.test.d.ts +0 -1
- package/radio-group/stories/radio-group.stories.d.ts +0 -10
- package/rating-group/rating-group.test.d.ts +0 -1
- package/rating-group/stories/rating-group.stories.d.ts +0 -13
- package/segment-group/segment-group.test.d.ts +0 -1
- package/segment-group/stories/segment-group.stories.d.ts +0 -10
- package/select/select.test.d.ts +0 -1
- package/select/stories/select.stories.d.ts +0 -11
- package/setup-test.d.ts +0 -3
- package/slider/slider.test.d.ts +0 -1
- package/slider/stories/range-slider.stories.d.ts +0 -14
- package/slider/stories/slider.stories.d.ts +0 -14
- package/splitter/splitter.test.d.ts +0 -1
- package/splitter/stories/splitter.stories.d.ts +0 -10
- package/switch/stories/switch.stories.d.ts +0 -11
- package/switch/switch.test.d.ts +0 -1
- package/tabs/stories/tabs.stories.d.ts +0 -14
- package/tabs/tabs.test.d.ts +0 -1
- package/tags-input/stories/tags-input.stories.d.ts +0 -14
- package/tags-input/tags-input.test.d.ts +0 -1
- package/toast/stories/toast.stories.d.ts +0 -9
- package/toast/toast.test.d.ts +0 -2
- package/toggle-group/stories/toggle-group.stories.d.ts +0 -9
- package/toggle-group/toggle-group.test.d.ts +0 -1
- package/tooltip/stories/tooltip.stories.d.ts +0 -12
- package/tooltip/tooltip.test.d.ts +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
6
|
+
import { ark } from '../factory.mjs';
|
|
7
|
+
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
|
+
import { SplitterProvider } from './splitter-context.mjs';
|
|
9
|
+
import { useSplitter } from './use-splitter.mjs';
|
|
10
|
+
|
|
11
|
+
const SplitterRoot = forwardRef((props, ref) => {
|
|
12
|
+
const [useSplitterProps, { children, ...divProps }] = createSplitProps()(
|
|
13
|
+
props,
|
|
14
|
+
[
|
|
15
|
+
"defaultSize",
|
|
16
|
+
"dir",
|
|
17
|
+
"getRootNode",
|
|
18
|
+
"id",
|
|
19
|
+
"ids",
|
|
20
|
+
"onSizeChange",
|
|
21
|
+
"onSizeChangeEnd",
|
|
22
|
+
"onSizeChangeStart",
|
|
23
|
+
"orientation",
|
|
24
|
+
"size"
|
|
25
|
+
]
|
|
26
|
+
);
|
|
27
|
+
const api = useSplitter(useSplitterProps);
|
|
28
|
+
const mergedProps = mergeProps(api.rootProps, divProps);
|
|
29
|
+
const view = runIfFn(children, api);
|
|
30
|
+
return /* @__PURE__ */ jsx(SplitterProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) });
|
|
31
|
+
});
|
|
32
|
+
SplitterRoot.displayName = "SplitterRoot";
|
|
33
|
+
|
|
34
|
+
export { SplitterRoot };
|
package/splitter/splitter.cjs
CHANGED
|
@@ -1,38 +1,13 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const createSplitProps = require('../create-split-props.cjs');
|
|
10
|
-
const factory = require('../factory.cjs');
|
|
11
|
-
const runIfFn = require('../run-if-fn.cjs');
|
|
12
|
-
const splitterContext = require('./splitter-context.cjs');
|
|
13
|
-
const useSplitter = require('./use-splitter.cjs');
|
|
5
|
+
const splitterPanel = require('./splitter-panel.cjs');
|
|
6
|
+
const splitterResizeTrigger = require('./splitter-resize-trigger.cjs');
|
|
7
|
+
const splitterRoot = require('./splitter-root.cjs');
|
|
14
8
|
|
|
15
|
-
const Splitter = react.forwardRef((props, ref) => {
|
|
16
|
-
const [useSplitterProps, { children, ...divProps }] = createSplitProps.createSplitProps()(
|
|
17
|
-
props,
|
|
18
|
-
[
|
|
19
|
-
"defaultSize",
|
|
20
|
-
"dir",
|
|
21
|
-
"getRootNode",
|
|
22
|
-
"id",
|
|
23
|
-
"ids",
|
|
24
|
-
"onSizeChange",
|
|
25
|
-
"onSizeChangeEnd",
|
|
26
|
-
"onSizeChangeStart",
|
|
27
|
-
"orientation",
|
|
28
|
-
"size"
|
|
29
|
-
]
|
|
30
|
-
);
|
|
31
|
-
const api = useSplitter.useSplitter(useSplitterProps);
|
|
32
|
-
const mergedProps = react$1.mergeProps(api.rootProps, divProps);
|
|
33
|
-
const view = runIfFn.runIfFn(children, api);
|
|
34
|
-
return /* @__PURE__ */ jsxRuntime.jsx(splitterContext.SplitterProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }) });
|
|
35
|
-
});
|
|
36
|
-
Splitter.displayName = "Splitter";
|
|
37
9
|
|
|
38
|
-
|
|
10
|
+
|
|
11
|
+
exports.Panel = splitterPanel.SplitterPanel;
|
|
12
|
+
exports.ResizeTrigger = splitterResizeTrigger.SplitterResizeTrigger;
|
|
13
|
+
exports.Root = splitterRoot.SplitterRoot;
|
package/splitter/splitter.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
export interface SplitterProps extends Assign<Assign<HTMLArkProps<'div'>, {
|
|
6
|
-
children?: ReactNode | ((api: UseSplitterReturn) => ReactNode);
|
|
7
|
-
}>, UseSplitterProps> {
|
|
8
|
-
}
|
|
9
|
-
export declare const Splitter: ForwardRefExoticComponent<SplitterProps & RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { SplitterPanel as Panel } from './splitter-panel';
|
|
2
|
+
import { SplitterResizeTrigger as ResizeTrigger } from './splitter-resize-trigger';
|
|
3
|
+
import { SplitterRoot as Root } from './splitter-root';
|
|
4
|
+
export { Panel, ResizeTrigger, Root };
|
package/splitter/splitter.mjs
CHANGED
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { forwardRef } from 'react';
|
|
5
|
-
import { createSplitProps } from '../create-split-props.mjs';
|
|
6
|
-
import { ark } from '../factory.mjs';
|
|
7
|
-
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
|
-
import { SplitterProvider } from './splitter-context.mjs';
|
|
9
|
-
import { useSplitter } from './use-splitter.mjs';
|
|
10
|
-
|
|
11
|
-
const Splitter = forwardRef((props, ref) => {
|
|
12
|
-
const [useSplitterProps, { children, ...divProps }] = createSplitProps()(
|
|
13
|
-
props,
|
|
14
|
-
[
|
|
15
|
-
"defaultSize",
|
|
16
|
-
"dir",
|
|
17
|
-
"getRootNode",
|
|
18
|
-
"id",
|
|
19
|
-
"ids",
|
|
20
|
-
"onSizeChange",
|
|
21
|
-
"onSizeChangeEnd",
|
|
22
|
-
"onSizeChangeStart",
|
|
23
|
-
"orientation",
|
|
24
|
-
"size"
|
|
25
|
-
]
|
|
26
|
-
);
|
|
27
|
-
const api = useSplitter(useSplitterProps);
|
|
28
|
-
const mergedProps = mergeProps(api.rootProps, divProps);
|
|
29
|
-
const view = runIfFn(children, api);
|
|
30
|
-
return /* @__PURE__ */ jsx(SplitterProvider, { value: api, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) });
|
|
31
|
-
});
|
|
32
|
-
Splitter.displayName = "Splitter";
|
|
33
|
-
|
|
34
|
-
export { Splitter };
|
|
1
|
+
export { SplitterPanel as Panel } from './splitter-panel.mjs';
|
|
2
|
+
export { SplitterResizeTrigger as ResizeTrigger } from './splitter-resize-trigger.mjs';
|
|
3
|
+
export { SplitterRoot as Root } from './splitter-root.mjs';
|
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const react$1 = require('@zag-js/react');
|
|
7
7
|
const splitter = require('@zag-js/splitter');
|
|
8
8
|
const react = require('react');
|
|
9
|
-
require('../environment/index.cjs');
|
|
10
|
-
const useEvent = require('../use-event.cjs');
|
|
11
9
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
10
|
+
const useEvent = require('../use-event.cjs');
|
|
12
11
|
|
|
13
12
|
function _interopNamespaceDefault(e) {
|
|
14
13
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
3
3
|
import * as splitter from '@zag-js/splitter';
|
|
4
4
|
import { useId } from 'react';
|
|
5
|
-
import '../environment/index.mjs';
|
|
6
|
-
import { useEvent } from '../use-event.mjs';
|
|
7
5
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
6
|
+
import { useEvent } from '../use-event.mjs';
|
|
8
7
|
|
|
9
8
|
const useSplitter = (props) => {
|
|
10
9
|
const initialContext = {
|
package/switch/index.cjs
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
4
|
|
|
6
|
-
const _switch = require('./switch.cjs');
|
|
7
5
|
const switchContext = require('./switch-context.cjs');
|
|
8
6
|
const switchControl = require('./switch-control.cjs');
|
|
9
7
|
const switchLabel = require('./switch-label.cjs');
|
|
8
|
+
const switchRoot = require('./switch-root.cjs');
|
|
10
9
|
const switchThumb = require('./switch-thumb.cjs');
|
|
10
|
+
const _switch = require('./switch.cjs');
|
|
11
|
+
|
|
11
12
|
|
|
12
|
-
const Switch = Object.assign(_switch.Switch, {
|
|
13
|
-
Root: _switch.Switch,
|
|
14
|
-
Control: switchControl.SwitchControl,
|
|
15
|
-
Label: switchLabel.SwitchLabel,
|
|
16
|
-
Thumb: switchThumb.SwitchThumb
|
|
17
|
-
});
|
|
18
13
|
|
|
19
14
|
exports.useSwitchContext = switchContext.useSwitchContext;
|
|
20
15
|
exports.SwitchControl = switchControl.SwitchControl;
|
|
21
16
|
exports.SwitchLabel = switchLabel.SwitchLabel;
|
|
17
|
+
exports.SwitchRoot = switchRoot.SwitchRoot;
|
|
22
18
|
exports.SwitchThumb = switchThumb.SwitchThumb;
|
|
23
|
-
exports.Switch =
|
|
19
|
+
exports.Switch = _switch;
|
package/switch/index.d.ts
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import type { CheckedChangeDetails as SwitchCheckedChangeDetails } from '@zag-js/switch';
|
|
4
|
-
import { type SwitchProps } from './switch';
|
|
5
2
|
import { useSwitchContext, type SwitchContext } from './switch-context';
|
|
6
3
|
import { SwitchControl, type SwitchControlProps } from './switch-control';
|
|
7
4
|
import { SwitchLabel, type SwitchLabelProps } from './switch-label';
|
|
5
|
+
import { SwitchRoot, type SwitchRootProps } from './switch-root';
|
|
8
6
|
import { SwitchThumb, type SwitchThumbProps } from './switch-thumb';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Label: ForwardRefExoticComponent<SwitchLabelProps & RefAttributes<HTMLSpanElement>>;
|
|
13
|
-
Thumb: ForwardRefExoticComponent<SwitchThumbProps & RefAttributes<HTMLSpanElement>>;
|
|
14
|
-
};
|
|
15
|
-
export { Switch, SwitchControl, SwitchLabel, SwitchThumb, useSwitchContext };
|
|
16
|
-
export type { SwitchCheckedChangeDetails, SwitchContext, SwitchControlProps, SwitchLabelProps, SwitchProps, SwitchThumbProps, };
|
|
7
|
+
export * as Switch from './switch';
|
|
8
|
+
export { SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, useSwitchContext };
|
|
9
|
+
export type { SwitchCheckedChangeDetails, SwitchContext, SwitchControlProps, SwitchLabelProps, SwitchRootProps, SwitchThumbProps, };
|
package/switch/index.mjs
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { Switch as Switch$1 } from './switch.mjs';
|
|
3
1
|
export { useSwitchContext } from './switch-context.mjs';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Control: SwitchControl,
|
|
11
|
-
Label: SwitchLabel,
|
|
12
|
-
Thumb: SwitchThumb
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export { Switch, SwitchControl, SwitchLabel, SwitchThumb };
|
|
2
|
+
export { SwitchControl } from './switch-control.mjs';
|
|
3
|
+
export { SwitchLabel } from './switch-label.mjs';
|
|
4
|
+
export { SwitchRoot } from './switch-root.mjs';
|
|
5
|
+
export { SwitchThumb } from './switch-thumb.mjs';
|
|
6
|
+
import * as _switch from './switch.mjs';
|
|
7
|
+
export { _switch as Switch };
|
|
@@ -0,0 +1,39 @@
|
|
|
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('../create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const runIfFn = require('../run-if-fn.cjs');
|
|
12
|
+
const switchContext = require('./switch-context.cjs');
|
|
13
|
+
const useSwitch = require('./use-switch.cjs');
|
|
14
|
+
|
|
15
|
+
const SwitchRoot = react.forwardRef((props, ref) => {
|
|
16
|
+
const [switchProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, [
|
|
17
|
+
"checked",
|
|
18
|
+
"defaultChecked",
|
|
19
|
+
"dir",
|
|
20
|
+
"disabled",
|
|
21
|
+
"form",
|
|
22
|
+
"getRootNode",
|
|
23
|
+
"id",
|
|
24
|
+
"ids",
|
|
25
|
+
"invalid",
|
|
26
|
+
"label",
|
|
27
|
+
"name",
|
|
28
|
+
"onCheckedChange",
|
|
29
|
+
"required",
|
|
30
|
+
"value"
|
|
31
|
+
]);
|
|
32
|
+
const api = useSwitch.useSwitch(switchProps);
|
|
33
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
34
|
+
const view = runIfFn.runIfFn(children, api);
|
|
35
|
+
return /* @__PURE__ */ jsxRuntime.jsx(switchContext.SwitchProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref, children: view }) });
|
|
36
|
+
});
|
|
37
|
+
SwitchRoot.displayName = "SwitchRoot";
|
|
38
|
+
|
|
39
|
+
exports.SwitchRoot = SwitchRoot;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ReactNode } from 'react';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
|
+
import { type UseSwitchProps, type UseSwitchReturn } from './use-switch';
|
|
5
|
+
export interface SwitchRootProps extends Assign<Assign<HTMLArkProps<'label'>, {
|
|
6
|
+
children?: ReactNode | ((api: UseSwitchReturn) => ReactNode);
|
|
7
|
+
}>, UseSwitchProps> {
|
|
8
|
+
}
|
|
9
|
+
export declare const SwitchRoot: ForwardRefExoticComponent<SwitchRootProps & RefAttributes<HTMLLabelElement>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
6
|
+
import { ark } from '../factory.mjs';
|
|
7
|
+
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
|
+
import { SwitchProvider } from './switch-context.mjs';
|
|
9
|
+
import { useSwitch } from './use-switch.mjs';
|
|
10
|
+
|
|
11
|
+
const SwitchRoot = forwardRef((props, ref) => {
|
|
12
|
+
const [switchProps, { children, ...localProps }] = createSplitProps()(props, [
|
|
13
|
+
"checked",
|
|
14
|
+
"defaultChecked",
|
|
15
|
+
"dir",
|
|
16
|
+
"disabled",
|
|
17
|
+
"form",
|
|
18
|
+
"getRootNode",
|
|
19
|
+
"id",
|
|
20
|
+
"ids",
|
|
21
|
+
"invalid",
|
|
22
|
+
"label",
|
|
23
|
+
"name",
|
|
24
|
+
"onCheckedChange",
|
|
25
|
+
"required",
|
|
26
|
+
"value"
|
|
27
|
+
]);
|
|
28
|
+
const api = useSwitch(switchProps);
|
|
29
|
+
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
30
|
+
const view = runIfFn(children, api);
|
|
31
|
+
return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref, children: view }) });
|
|
32
|
+
});
|
|
33
|
+
SwitchRoot.displayName = "SwitchRoot";
|
|
34
|
+
|
|
35
|
+
export { SwitchRoot };
|
package/switch/switch.cjs
CHANGED
|
@@ -1,39 +1,15 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const factory = require('../factory.cjs');
|
|
11
|
-
const runIfFn = require('../run-if-fn.cjs');
|
|
12
|
-
const switchContext = require('./switch-context.cjs');
|
|
13
|
-
const useSwitch = require('./use-switch.cjs');
|
|
5
|
+
const switchControl = require('./switch-control.cjs');
|
|
6
|
+
const switchLabel = require('./switch-label.cjs');
|
|
7
|
+
const switchRoot = require('./switch-root.cjs');
|
|
8
|
+
const switchThumb = require('./switch-thumb.cjs');
|
|
14
9
|
|
|
15
|
-
const Switch = react.forwardRef((props, ref) => {
|
|
16
|
-
const [switchProps, { children, ...localProps }] = createSplitProps.createSplitProps()(props, [
|
|
17
|
-
"checked",
|
|
18
|
-
"defaultChecked",
|
|
19
|
-
"dir",
|
|
20
|
-
"disabled",
|
|
21
|
-
"form",
|
|
22
|
-
"getRootNode",
|
|
23
|
-
"id",
|
|
24
|
-
"ids",
|
|
25
|
-
"invalid",
|
|
26
|
-
"label",
|
|
27
|
-
"name",
|
|
28
|
-
"onCheckedChange",
|
|
29
|
-
"required",
|
|
30
|
-
"value"
|
|
31
|
-
]);
|
|
32
|
-
const api = useSwitch.useSwitch(switchProps);
|
|
33
|
-
const mergedProps = react$1.mergeProps(api.rootProps, localProps);
|
|
34
|
-
const view = runIfFn.runIfFn(children, api);
|
|
35
|
-
return /* @__PURE__ */ jsxRuntime.jsx(switchContext.SwitchProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref, children: view }) });
|
|
36
|
-
});
|
|
37
|
-
Switch.displayName = "Switch";
|
|
38
10
|
|
|
39
|
-
|
|
11
|
+
|
|
12
|
+
exports.Control = switchControl.SwitchControl;
|
|
13
|
+
exports.Label = switchLabel.SwitchLabel;
|
|
14
|
+
exports.Root = switchRoot.SwitchRoot;
|
|
15
|
+
exports.Thumb = switchThumb.SwitchThumb;
|
package/switch/switch.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
export
|
|
6
|
-
children?: ReactNode | ((api: UseSwitchReturn) => ReactNode);
|
|
7
|
-
}>, UseSwitchProps> {
|
|
8
|
-
}
|
|
9
|
-
export declare const Switch: ForwardRefExoticComponent<SwitchProps & RefAttributes<HTMLLabelElement>>;
|
|
1
|
+
import { SwitchControl as Control } from './switch-control';
|
|
2
|
+
import { SwitchLabel as Label } from './switch-label';
|
|
3
|
+
import { SwitchRoot as Root } from './switch-root';
|
|
4
|
+
import { SwitchThumb as Thumb } from './switch-thumb';
|
|
5
|
+
export { Control, Label, Root, Thumb };
|
package/switch/switch.mjs
CHANGED
|
@@ -1,35 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { createSplitProps } from '../create-split-props.mjs';
|
|
6
|
-
import { ark } from '../factory.mjs';
|
|
7
|
-
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
|
-
import { SwitchProvider } from './switch-context.mjs';
|
|
9
|
-
import { useSwitch } from './use-switch.mjs';
|
|
10
|
-
|
|
11
|
-
const Switch = forwardRef((props, ref) => {
|
|
12
|
-
const [switchProps, { children, ...localProps }] = createSplitProps()(props, [
|
|
13
|
-
"checked",
|
|
14
|
-
"defaultChecked",
|
|
15
|
-
"dir",
|
|
16
|
-
"disabled",
|
|
17
|
-
"form",
|
|
18
|
-
"getRootNode",
|
|
19
|
-
"id",
|
|
20
|
-
"ids",
|
|
21
|
-
"invalid",
|
|
22
|
-
"label",
|
|
23
|
-
"name",
|
|
24
|
-
"onCheckedChange",
|
|
25
|
-
"required",
|
|
26
|
-
"value"
|
|
27
|
-
]);
|
|
28
|
-
const api = useSwitch(switchProps);
|
|
29
|
-
const mergedProps = mergeProps(api.rootProps, localProps);
|
|
30
|
-
const view = runIfFn(children, api);
|
|
31
|
-
return /* @__PURE__ */ jsx(SwitchProvider, { value: api, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref, children: view }) });
|
|
32
|
-
});
|
|
33
|
-
Switch.displayName = "Switch";
|
|
34
|
-
|
|
35
|
-
export { Switch };
|
|
1
|
+
export { SwitchControl as Control } from './switch-control.mjs';
|
|
2
|
+
export { SwitchLabel as Label } from './switch-label.mjs';
|
|
3
|
+
export { SwitchRoot as Root } from './switch-root.mjs';
|
|
4
|
+
export { SwitchThumb as Thumb } from './switch-thumb.mjs';
|
package/switch/use-switch.cjs
CHANGED
|
@@ -6,9 +6,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const react$1 = require('@zag-js/react');
|
|
7
7
|
const zagSwitch = require('@zag-js/switch');
|
|
8
8
|
const react = require('react');
|
|
9
|
-
require('../environment/index.cjs');
|
|
10
|
-
const useEvent = require('../use-event.cjs');
|
|
11
9
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
10
|
+
const useEvent = require('../use-event.cjs');
|
|
12
11
|
|
|
13
12
|
function _interopNamespaceDefault(e) {
|
|
14
13
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
package/switch/use-switch.mjs
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
3
3
|
import * as zagSwitch from '@zag-js/switch';
|
|
4
4
|
import { useId } from 'react';
|
|
5
|
-
import '../environment/index.mjs';
|
|
6
|
-
import { useEvent } from '../use-event.mjs';
|
|
7
5
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
6
|
+
import { useEvent } from '../use-event.mjs';
|
|
8
7
|
|
|
9
8
|
const useSwitch = (props) => {
|
|
10
9
|
const initialContext = {
|
package/tabs/index.cjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -7,20 +6,16 @@ const tabContent = require('./tab-content.cjs');
|
|
|
7
6
|
const tabIndicator = require('./tab-indicator.cjs');
|
|
8
7
|
const tabList = require('./tab-list.cjs');
|
|
9
8
|
const tabTrigger = require('./tab-trigger.cjs');
|
|
10
|
-
const tabs = require('./tabs.cjs');
|
|
11
9
|
const tabsContext = require('./tabs-context.cjs');
|
|
10
|
+
const tabsRoot = require('./tabs-root.cjs');
|
|
11
|
+
const tabs = require('./tabs.cjs');
|
|
12
|
+
|
|
12
13
|
|
|
13
|
-
const Tabs = Object.assign(tabs.Tabs, {
|
|
14
|
-
Root: tabs.Tabs,
|
|
15
|
-
Content: tabContent.TabContent,
|
|
16
|
-
Indicator: tabIndicator.TabIndicator,
|
|
17
|
-
List: tabList.TabList,
|
|
18
|
-
Trigger: tabTrigger.TabTrigger
|
|
19
|
-
});
|
|
20
14
|
|
|
21
15
|
exports.TabContent = tabContent.TabContent;
|
|
22
16
|
exports.TabIndicator = tabIndicator.TabIndicator;
|
|
23
17
|
exports.TabList = tabList.TabList;
|
|
24
18
|
exports.TabTrigger = tabTrigger.TabTrigger;
|
|
25
19
|
exports.useTabsContext = tabsContext.useTabsContext;
|
|
26
|
-
exports.
|
|
20
|
+
exports.TabsRoot = tabsRoot.TabsRoot;
|
|
21
|
+
exports.Tabs = tabs;
|
package/tabs/index.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import type { FocusChangeDetails as TabsFocusChangeDetails, ValueChangeDetails as TabsValueChangeDetails } from '@zag-js/tabs';
|
|
4
2
|
import { TabContent, type TabContentProps } from './tab-content';
|
|
5
3
|
import { TabIndicator, type TabIndicatorProps } from './tab-indicator';
|
|
6
4
|
import { TabList, type TabListProps } from './tab-list';
|
|
7
5
|
import { TabTrigger, type TabTriggerProps } from './tab-trigger';
|
|
8
|
-
import { type TabsProps } from './tabs';
|
|
9
6
|
import { useTabsContext, type TabsContext } from './tabs-context';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
List: ForwardRefExoticComponent<TabListProps & RefAttributes<HTMLDivElement>>;
|
|
15
|
-
Trigger: ForwardRefExoticComponent<TabTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
16
|
-
};
|
|
17
|
-
export { TabContent, TabIndicator, TabList, TabTrigger, Tabs, useTabsContext };
|
|
18
|
-
export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsContext, TabsFocusChangeDetails, TabsProps, TabsValueChangeDetails, };
|
|
7
|
+
import { TabsRoot, type TabsRootProps } from './tabs-root';
|
|
8
|
+
export * as Tabs from './tabs';
|
|
9
|
+
export { TabContent, TabIndicator, TabList, TabTrigger, TabsRoot, useTabsContext };
|
|
10
|
+
export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsContext, TabsFocusChangeDetails, TabsRootProps, TabsValueChangeDetails, };
|
package/tabs/index.mjs
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { TabTrigger } from './tab-trigger.mjs';
|
|
6
|
-
import { Tabs as Tabs$1 } from './tabs.mjs';
|
|
1
|
+
export { TabContent } from './tab-content.mjs';
|
|
2
|
+
export { TabIndicator } from './tab-indicator.mjs';
|
|
3
|
+
export { TabList } from './tab-list.mjs';
|
|
4
|
+
export { TabTrigger } from './tab-trigger.mjs';
|
|
7
5
|
export { useTabsContext } from './tabs-context.mjs';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Content: TabContent,
|
|
12
|
-
Indicator: TabIndicator,
|
|
13
|
-
List: TabList,
|
|
14
|
-
Trigger: TabTrigger
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export { TabContent, TabIndicator, TabList, TabTrigger, Tabs };
|
|
6
|
+
export { TabsRoot } from './tabs-root.mjs';
|
|
7
|
+
import * as tabs from './tabs.mjs';
|
|
8
|
+
export { tabs as Tabs };
|
package/tabs/tab-content.cjs
CHANGED
|
@@ -9,11 +9,10 @@ require('@zag-js/tabs');
|
|
|
9
9
|
const react = require('react');
|
|
10
10
|
const createSplitProps = require('../create-split-props.cjs');
|
|
11
11
|
const factory = require('../factory.cjs');
|
|
12
|
-
require('../presence/
|
|
13
|
-
const tabsContext = require('./tabs-context.cjs');
|
|
12
|
+
const presenceContext = require('../presence/presence-context.cjs');
|
|
14
13
|
const presencePropsContext = require('../presence/presence-props-context.cjs');
|
|
15
14
|
const usePresence = require('../presence/use-presence.cjs');
|
|
16
|
-
const
|
|
15
|
+
const tabsContext = require('./tabs-context.cjs');
|
|
17
16
|
|
|
18
17
|
const TabContent = react.forwardRef((props, ref) => {
|
|
19
18
|
const [contentProps, localProps] = createSplitProps.createSplitProps()(props, ["value"]);
|
package/tabs/tab-content.mjs
CHANGED
|
@@ -5,11 +5,10 @@ import '@zag-js/tabs';
|
|
|
5
5
|
import { forwardRef } from 'react';
|
|
6
6
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
7
7
|
import { ark } from '../factory.mjs';
|
|
8
|
-
import '../presence/
|
|
9
|
-
import { useTabsContext } from './tabs-context.mjs';
|
|
8
|
+
import { PresenceProvider } from '../presence/presence-context.mjs';
|
|
10
9
|
import { usePresencePropsContext } from '../presence/presence-props-context.mjs';
|
|
11
10
|
import { usePresence } from '../presence/use-presence.mjs';
|
|
12
|
-
import {
|
|
11
|
+
import { useTabsContext } from './tabs-context.mjs';
|
|
13
12
|
|
|
14
13
|
const TabContent = forwardRef((props, ref) => {
|
|
15
14
|
const [contentProps, localProps] = createSplitProps()(props, ["value"]);
|
|
@@ -0,0 +1,38 @@
|
|
|
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('../create-split-props.cjs');
|
|
10
|
+
const factory = require('../factory.cjs');
|
|
11
|
+
const presencePropsContext = require('../presence/presence-props-context.cjs');
|
|
12
|
+
const splitPresenceProps = require('../presence/split-presence-props.cjs');
|
|
13
|
+
const tabsContext = require('./tabs-context.cjs');
|
|
14
|
+
const useTabs = require('./use-tabs.cjs');
|
|
15
|
+
|
|
16
|
+
const TabsRoot = react.forwardRef((props, ref) => {
|
|
17
|
+
const [presenceProps, tabsProps] = splitPresenceProps.splitPresenceProps(props);
|
|
18
|
+
const [useTabsProps, localprops] = createSplitProps.createSplitProps()(tabsProps, [
|
|
19
|
+
"activationMode",
|
|
20
|
+
"defaultValue",
|
|
21
|
+
"dir",
|
|
22
|
+
"getRootNode",
|
|
23
|
+
"id",
|
|
24
|
+
"ids",
|
|
25
|
+
"loop",
|
|
26
|
+
"onFocusChange",
|
|
27
|
+
"onValueChange",
|
|
28
|
+
"orientation",
|
|
29
|
+
"translations",
|
|
30
|
+
"value"
|
|
31
|
+
]);
|
|
32
|
+
const api = useTabs.useTabs(useTabsProps);
|
|
33
|
+
const mergedProps = react$1.mergeProps(api.rootProps, localprops);
|
|
34
|
+
return /* @__PURE__ */ jsxRuntime.jsx(tabsContext.TabsProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(presencePropsContext.PresencePropsProvider, { value: presenceProps, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }) }) });
|
|
35
|
+
});
|
|
36
|
+
TabsRoot.displayName = "TabsRoot";
|
|
37
|
+
|
|
38
|
+
exports.TabsRoot = TabsRoot;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import { type UsePresenceProps } from '../presence';
|
|
5
|
+
import { type Assign } from '../types';
|
|
6
|
+
import { type UseTabsProps } from './use-tabs';
|
|
7
|
+
export interface TabsRootProps extends Assign<HTMLArkProps<'div'>, UseTabsProps>, UsePresenceProps {
|
|
8
|
+
}
|
|
9
|
+
export declare const TabsRoot: ForwardRefExoticComponent<TabsRootProps & RefAttributes<HTMLDivElement>>;
|