@ark-ui/react 0.13.1 → 0.15.0-beta.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/CHANGELOG.md +37 -2
- package/accordion/accordion-content.cjs +8 -8
- package/accordion/accordion-content.d.ts +7 -10
- package/accordion/accordion-content.mjs +8 -8
- package/accordion/accordion-context.d.ts +2 -9
- package/accordion/accordion-item-context.d.ts +3 -5
- package/accordion/accordion-item.d.ts +5 -8
- package/accordion/accordion-trigger.d.ts +6 -7
- package/accordion/accordion.cjs +3 -2
- package/accordion/accordion.d.ts +5 -11
- package/accordion/accordion.mjs +3 -2
- package/accordion/accordion.stories.d.ts +1 -1
- package/accordion/index.d.ts +13 -34
- package/accordion/use-accordion.d.ts +4 -9
- package/avatar/avatar-context.d.ts +2 -9
- package/avatar/avatar-fallback.d.ts +6 -7
- package/avatar/avatar-image.d.ts +6 -7
- package/avatar/avatar.d.ts +5 -9
- package/avatar/avatar.test.d.ts +1 -0
- package/avatar/index.d.ts +11 -22
- package/avatar/use-avatar.d.ts +4 -8
- package/carousel/carousel-context.d.ts +2 -9
- package/carousel/carousel-control.d.ts +6 -7
- package/carousel/carousel-indicator-group.d.ts +6 -7
- package/carousel/carousel-indicator.d.ts +5 -8
- package/carousel/carousel-next-slide-trigger.d.ts +6 -7
- package/carousel/carousel-prev-slide-trigger.d.ts +6 -7
- package/carousel/carousel-slide-group.d.ts +6 -7
- package/carousel/carousel-slide.d.ts +5 -8
- package/carousel/carousel-viewport.d.ts +6 -7
- package/carousel/carousel.d.ts +8 -11
- package/carousel/index.d.ts +25 -53
- package/carousel/use-carousel.d.ts +4 -8
- package/checkbox/checkbox-context.d.ts +2 -9
- package/checkbox/checkbox-control.cjs +3 -6
- package/checkbox/checkbox-control.d.ts +6 -7
- package/checkbox/checkbox-control.mjs +4 -7
- package/checkbox/checkbox-label.d.ts +6 -7
- package/checkbox/checkbox.cjs +7 -4
- package/checkbox/checkbox.d.ts +6 -10
- package/checkbox/checkbox.mjs +8 -5
- package/checkbox/checkbox.stories.d.ts +1 -1
- package/checkbox/index.d.ts +12 -29
- package/checkbox/use-checkbox.d.ts +5 -10
- package/color-picker/color-picker-area-gradient.d.ts +6 -7
- package/color-picker/color-picker-area-thumb.d.ts +6 -7
- package/color-picker/color-picker-area.d.ts +5 -8
- package/color-picker/color-picker-channel-input.d.ts +6 -7
- package/color-picker/color-picker-channel-slider-background.d.ts +6 -7
- package/color-picker/color-picker-channel-slider-thumb.d.ts +6 -7
- package/color-picker/color-picker-channel-slider-track.d.ts +5 -8
- package/color-picker/color-picker-content.d.ts +6 -7
- package/color-picker/color-picker-context.d.ts +2 -9
- package/color-picker/color-picker-eye-dropper-trigger.d.ts +6 -7
- package/color-picker/color-picker-swatch-background.d.ts +6 -7
- package/color-picker/color-picker-swatch-group.d.ts +6 -7
- package/color-picker/color-picker-swatch.d.ts +5 -8
- package/color-picker/index.d.ts +23 -52
- package/color-picker/use-color-picker.cjs +2 -7
- package/color-picker/use-color-picker.d.ts +4 -9
- package/color-picker/use-color-picker.mjs +3 -8
- package/combobox/combobox-clear-trigger.cjs +2 -2
- package/combobox/combobox-clear-trigger.d.ts +6 -7
- package/combobox/combobox-clear-trigger.mjs +2 -2
- package/combobox/combobox-content.cjs +8 -9
- package/combobox/combobox-content.d.ts +7 -10
- package/combobox/combobox-content.mjs +8 -9
- package/combobox/combobox-context.d.ts +4 -10
- package/combobox/combobox-control.cjs +2 -2
- package/combobox/combobox-control.d.ts +6 -7
- package/combobox/combobox-control.mjs +2 -2
- package/combobox/combobox-input.cjs +2 -2
- package/combobox/combobox-input.d.ts +6 -7
- package/combobox/combobox-input.mjs +2 -2
- package/combobox/combobox-item-context.cjs +15 -0
- package/combobox/combobox-item-context.d.ts +5 -0
- package/combobox/combobox-item-context.mjs +10 -0
- package/combobox/{combobox-option-group.cjs → combobox-item-group-label.cjs} +6 -6
- package/combobox/combobox-item-group-label.d.ts +7 -0
- package/combobox/{combobox-option-group.mjs → combobox-item-group-label.mjs} +6 -6
- package/combobox/{combobox-option-group-label.cjs → combobox-item-group.cjs} +6 -6
- package/combobox/combobox-item-group.d.ts +7 -0
- package/combobox/{combobox-option-group-label.mjs → combobox-item-group.mjs} +6 -6
- package/combobox/combobox-item-indicator.cjs +23 -0
- package/combobox/combobox-item-indicator.d.ts +7 -0
- package/combobox/combobox-item-indicator.mjs +19 -0
- package/combobox/combobox-item-text.cjs +21 -0
- package/combobox/combobox-item-text.d.ts +7 -0
- package/combobox/combobox-item-text.mjs +17 -0
- package/combobox/combobox-item.cjs +25 -0
- package/{select/select-option.d.ts → combobox/combobox-item.d.ts} +5 -5
- package/combobox/combobox-item.mjs +21 -0
- package/combobox/combobox-label.cjs +2 -2
- package/combobox/combobox-label.d.ts +6 -7
- package/combobox/combobox-label.mjs +2 -2
- package/combobox/combobox-positioner.cjs +2 -2
- package/combobox/combobox-positioner.d.ts +6 -7
- package/combobox/combobox-positioner.mjs +2 -2
- package/combobox/combobox-trigger.cjs +2 -2
- package/combobox/combobox-trigger.d.ts +6 -7
- package/combobox/combobox-trigger.mjs +2 -2
- package/combobox/combobox.cjs +20 -18
- package/combobox/combobox.d.ts +9 -13
- package/combobox/combobox.mjs +20 -18
- package/combobox/combobox.stories.d.ts +1 -0
- package/combobox/index.cjs +15 -9
- package/combobox/index.d.ts +35 -72
- package/combobox/index.mjs +11 -7
- package/combobox/use-combobox.cjs +24 -3
- package/combobox/use-combobox.d.ts +8 -9
- package/combobox/use-combobox.mjs +24 -3
- package/compose-refs.cjs +0 -1
- package/compose-refs.mjs +0 -1
- package/create-context.d.ts +3 -2
- package/date-picker/date-picker-clear-trigger.d.ts +6 -7
- package/date-picker/date-picker-column-header.d.ts +6 -7
- package/date-picker/date-picker-content.d.ts +6 -7
- package/date-picker/date-picker-context.d.ts +2 -9
- package/date-picker/date-picker-control.d.ts +6 -7
- package/date-picker/date-picker-day-cell-trigger.d.ts +6 -7
- package/date-picker/date-picker-day-cell.d.ts +5 -8
- package/date-picker/date-picker-grid.d.ts +5 -8
- package/date-picker/date-picker-input.d.ts +6 -7
- package/date-picker/date-picker-month-cell-trigger.d.ts +6 -7
- package/date-picker/date-picker-month-cell.d.ts +5 -8
- package/date-picker/date-picker-month-select.d.ts +6 -7
- package/date-picker/date-picker-next-trigger.d.ts +6 -7
- package/date-picker/date-picker-positioner.d.ts +6 -7
- package/date-picker/date-picker-prev-trigger.d.ts +5 -8
- package/date-picker/date-picker-row-group.d.ts +6 -7
- package/date-picker/date-picker-row-header.d.ts +6 -7
- package/date-picker/date-picker-row.d.ts +6 -7
- package/date-picker/date-picker-trigger.d.ts +6 -7
- package/date-picker/date-picker-view-trigger.d.ts +5 -8
- package/date-picker/date-picker-year-cell-trigger.d.ts +6 -7
- package/date-picker/date-picker-year-cell.d.ts +5 -8
- package/date-picker/date-picker-year-select.cjs +0 -1
- package/date-picker/date-picker-year-select.d.ts +6 -12
- package/date-picker/date-picker-year-select.mjs +1 -1
- package/date-picker/index.d.ts +56 -111
- package/date-picker/use-date-picker.d.ts +4 -8
- package/dialog/dialog-backdrop.cjs +14 -8
- package/dialog/dialog-backdrop.d.ts +7 -10
- package/dialog/dialog-backdrop.mjs +14 -8
- package/dialog/dialog-close-trigger.d.ts +6 -7
- package/dialog/dialog-container.d.ts +6 -7
- package/dialog/dialog-content.cjs +8 -9
- package/dialog/dialog-content.d.ts +7 -10
- package/dialog/dialog-content.mjs +8 -9
- package/dialog/dialog-context.d.ts +2 -9
- package/dialog/dialog-description.d.ts +6 -7
- package/dialog/dialog-title.d.ts +6 -7
- package/dialog/dialog-trigger.d.ts +6 -7
- package/dialog/index.d.ts +14 -32
- package/dialog/use-dialog.d.ts +4 -8
- package/editable/editable-area.d.ts +6 -7
- package/editable/editable-cancel-trigger.d.ts +6 -7
- package/editable/editable-context.d.ts +2 -9
- package/editable/editable-control.d.ts +6 -7
- package/editable/editable-edit-trigger.d.ts +6 -7
- package/editable/editable-input.d.ts +6 -7
- package/editable/editable-label.d.ts +6 -7
- package/editable/editable-preview.d.ts +6 -7
- package/editable/editable-submit-trigger.d.ts +6 -7
- package/editable/editable.d.ts +7 -14
- package/editable/index.d.ts +24 -57
- package/editable/use-editable.d.ts +4 -9
- package/factory.cjs +2 -2
- package/factory.d.ts +4 -1
- package/factory.mjs +1 -1
- package/hover-card/hover-card-arrow-tip.d.ts +6 -7
- package/hover-card/hover-card-arrow.d.ts +6 -7
- package/hover-card/hover-card-content.cjs +8 -9
- package/hover-card/hover-card-content.d.ts +7 -10
- package/hover-card/hover-card-content.mjs +8 -9
- package/hover-card/hover-card-context.d.ts +2 -9
- package/hover-card/hover-card-positioner.d.ts +6 -7
- package/hover-card/hover-card-trigger.d.ts +6 -7
- package/hover-card/hover-card.stories.d.ts +1 -1
- package/hover-card/index.d.ts +11 -23
- package/hover-card/use-hover-card.d.ts +4 -8
- package/index.cjs +36 -21
- package/index.d.ts +1 -0
- package/index.mjs +17 -8
- package/menu/index.d.ts +21 -54
- package/menu/menu-arrow-tip.d.ts +6 -7
- package/menu/menu-arrow.d.ts +6 -7
- package/menu/menu-content.cjs +11 -2
- package/menu/menu-content.d.ts +7 -8
- package/menu/menu-content.mjs +11 -2
- package/menu/menu-context-trigger.d.ts +6 -7
- package/menu/menu-context.d.ts +2 -3
- package/menu/menu-item-group-label.d.ts +5 -8
- package/menu/menu-item-group.d.ts +5 -8
- package/menu/menu-item.d.ts +6 -12
- package/menu/menu-option-item.d.ts +5 -10
- package/menu/menu-positioner.d.ts +6 -7
- package/menu/menu-separator.d.ts +6 -7
- package/menu/menu-trigger-item.d.ts +6 -7
- package/menu/menu-trigger.d.ts +6 -7
- package/menu/menu.d.ts +2 -1
- package/menu/menu.stories.d.ts +1 -1
- package/menu/use-menu.d.ts +3 -2
- package/number-input/index.d.ts +18 -41
- package/number-input/number-input-context.d.ts +2 -9
- package/number-input/number-input-control.d.ts +6 -7
- package/number-input/number-input-decrement-trigger.d.ts +6 -7
- package/number-input/number-input-field.d.ts +6 -7
- package/number-input/number-input-increment-trigger.d.ts +6 -7
- package/number-input/number-input-label.d.ts +6 -7
- package/number-input/number-input-scrubber.d.ts +6 -7
- package/number-input/number-input.d.ts +5 -11
- package/number-input/number-input.stories.d.ts +2 -0
- package/number-input/use-number-input.cjs +2 -7
- package/number-input/use-number-input.d.ts +4 -9
- package/number-input/use-number-input.mjs +3 -8
- package/package.json +61 -53
- package/pagination/index.d.ts +20 -49
- package/pagination/pagination-context.d.ts +2 -9
- package/pagination/pagination-ellipsis.d.ts +5 -8
- package/pagination/pagination-list-item.d.ts +6 -7
- package/pagination/pagination-list.d.ts +6 -7
- package/pagination/pagination-next-page-trigger.d.ts +6 -7
- package/pagination/pagination-page-trigger.d.ts +5 -8
- package/pagination/pagination-prev-page-trigger.d.ts +6 -7
- package/pagination/pagination.d.ts +6 -10
- package/pagination/use-pagination.d.ts +4 -9
- package/pin-input/index.d.ts +11 -30
- package/pin-input/pin-input-context.d.ts +2 -9
- package/pin-input/pin-input-control.cjs +3 -6
- package/pin-input/pin-input-control.d.ts +6 -7
- package/pin-input/pin-input-control.mjs +4 -7
- package/pin-input/pin-input-field.d.ts +5 -8
- package/pin-input/pin-input-label.d.ts +6 -7
- package/pin-input/pin-input.cjs +6 -3
- package/pin-input/pin-input.d.ts +5 -11
- package/pin-input/pin-input.mjs +7 -4
- package/pin-input/use-pin-input.d.ts +4 -9
- package/popover/index.d.ts +19 -39
- package/popover/popover-anchor.d.ts +6 -7
- package/popover/popover-arrow-tip.d.ts +6 -7
- package/popover/popover-arrow.d.ts +6 -7
- package/popover/popover-close-trigger.d.ts +6 -7
- package/popover/popover-content.cjs +8 -9
- package/popover/popover-content.d.ts +7 -10
- package/popover/popover-content.mjs +8 -9
- package/popover/popover-context.d.ts +2 -9
- package/popover/popover-description.d.ts +6 -7
- package/popover/popover-positioner.d.ts +6 -7
- package/popover/popover-title.d.ts +6 -7
- package/popover/popover-trigger.d.ts +6 -7
- package/popover/use-popover.d.ts +4 -8
- package/presence/presence.d.ts +2 -2
- package/presence/use-presence.d.ts +3 -2
- package/pressable/index.d.ts +4 -24
- package/pressable/pressable.d.ts +5 -15
- package/pressable/use-pressable.d.ts +4 -8
- package/radio-group/index.d.ts +15 -45
- package/radio-group/radio-context.d.ts +2 -12
- package/radio-group/radio-control.cjs +4 -7
- package/radio-group/radio-control.d.ts +6 -7
- package/radio-group/radio-control.mjs +5 -8
- package/radio-group/radio-group-context.d.ts +2 -9
- package/radio-group/radio-group-label.d.ts +6 -7
- package/radio-group/radio-group.cjs +0 -1
- package/radio-group/radio-group.d.ts +5 -11
- package/radio-group/radio-group.mjs +0 -1
- package/radio-group/radio-label.d.ts +6 -7
- package/radio-group/radio.cjs +12 -4
- package/radio-group/radio.d.ts +6 -18
- package/radio-group/radio.mjs +13 -5
- package/radio-group/use-radio-group.d.ts +4 -9
- package/range-slider/index.d.ts +23 -65
- package/range-slider/range-slider-context.d.ts +2 -9
- package/range-slider/range-slider-control.d.ts +6 -7
- package/range-slider/range-slider-label.d.ts +6 -7
- package/range-slider/range-slider-marker-group.d.ts +6 -7
- package/range-slider/range-slider-marker.d.ts +5 -8
- package/range-slider/range-slider-output.d.ts +4 -8
- package/range-slider/range-slider-range.d.ts +6 -7
- package/range-slider/range-slider-thumb.cjs +5 -5
- package/range-slider/range-slider-thumb.d.ts +5 -8
- package/range-slider/range-slider-thumb.mjs +5 -5
- package/range-slider/range-slider-track.d.ts +6 -7
- package/range-slider/range-slider.cjs +3 -0
- package/range-slider/range-slider.d.ts +4 -11
- package/range-slider/range-slider.mjs +3 -0
- package/range-slider/use-range-slider.cjs +3 -1
- package/range-slider/use-range-slider.d.ts +4 -9
- package/range-slider/use-range-slider.mjs +3 -1
- package/rating-group/index.d.ts +11 -34
- package/rating-group/rating-group-context.d.ts +2 -9
- package/rating-group/rating-group-control.cjs +4 -7
- package/rating-group/rating-group-control.d.ts +6 -10
- package/rating-group/rating-group-control.mjs +5 -8
- package/rating-group/rating-group-label.d.ts +6 -7
- package/rating-group/rating-group.cjs +6 -3
- package/rating-group/rating-group.d.ts +5 -11
- package/rating-group/rating-group.mjs +7 -4
- package/rating-group/rating-group.stories.d.ts +1 -1
- package/rating-group/rating.d.ts +4 -8
- package/rating-group/use-rating-group.d.ts +4 -9
- package/run-if-fn.d.ts +0 -1
- package/segment-group/index.d.ts +18 -50
- package/segment-group/segment-context.d.ts +2 -12
- package/segment-group/segment-control.cjs +4 -7
- package/segment-group/segment-control.d.ts +6 -7
- package/segment-group/segment-control.mjs +5 -8
- package/segment-group/segment-group-context.d.ts +2 -9
- package/segment-group/segment-group-indicator.d.ts +6 -7
- package/segment-group/segment-group-label.d.ts +6 -7
- package/segment-group/segment-group.cjs +0 -1
- package/segment-group/segment-group.d.ts +5 -11
- package/segment-group/segment-group.mjs +0 -1
- package/segment-group/segment-label.d.ts +6 -7
- package/segment-group/segment.cjs +12 -4
- package/segment-group/segment.d.ts +6 -18
- package/segment-group/segment.mjs +13 -5
- package/segment-group/use-segment-group.d.ts +4 -9
- package/select/index.cjs +30 -18
- package/select/index.d.ts +44 -46
- package/select/index.mjs +19 -9
- package/select/select-clear-trigger.cjs +21 -0
- package/select/select-clear-trigger.d.ts +7 -0
- package/select/select-clear-trigger.mjs +17 -0
- package/select/select-content.cjs +8 -9
- package/select/select-content.d.ts +7 -10
- package/select/select-content.mjs +8 -9
- package/select/select-context.d.ts +4 -10
- package/select/select-control.cjs +19 -0
- package/select/select-control.d.ts +7 -0
- package/select/select-control.mjs +15 -0
- package/select/select-item-context.cjs +15 -0
- package/select/select-item-context.d.ts +5 -0
- package/select/select-item-context.mjs +10 -0
- package/select/{select-option-group.cjs → select-item-group-label.cjs} +8 -6
- package/select/select-item-group-label.d.ts +7 -0
- package/select/{select-option-group.mjs → select-item-group-label.mjs} +8 -6
- package/select/select-item-group.cjs +21 -0
- package/select/select-item-group.d.ts +7 -0
- package/select/select-item-group.mjs +17 -0
- package/select/{select-option-group-label.cjs → select-item-indicator.cjs} +7 -6
- package/select/select-item-indicator.d.ts +7 -0
- package/select/select-item-indicator.mjs +19 -0
- package/select/select-item-text.cjs +21 -0
- package/select/select-item-text.d.ts +7 -0
- package/select/select-item-text.mjs +17 -0
- package/select/select-item.cjs +25 -0
- package/select/select-item.d.ts +11 -0
- package/select/select-item.mjs +21 -0
- package/select/select-label.cjs +2 -2
- package/select/select-label.d.ts +6 -7
- package/select/select-label.mjs +2 -2
- package/select/select-positioner.cjs +2 -2
- package/select/select-positioner.d.ts +6 -7
- package/select/select-positioner.mjs +2 -2
- package/select/select-trigger.cjs +2 -2
- package/select/select-trigger.d.ts +6 -7
- package/select/select-trigger.mjs +2 -2
- package/select/select-value.cjs +19 -0
- package/select/select-value.d.ts +7 -0
- package/select/select-value.mjs +15 -0
- package/select/select.anatomy.cjs +12 -0
- package/select/select.anatomy.d.ts +3 -1
- package/select/select.anatomy.mjs +7 -0
- package/select/select.cjs +43 -30
- package/select/select.d.ts +9 -6
- package/select/select.mjs +43 -30
- package/select/select.stories.d.ts +3 -0
- package/select/use-select.cjs +13 -3
- package/select/use-select.d.ts +8 -11
- package/select/use-select.mjs +13 -3
- package/slider/index.d.ts +22 -59
- package/slider/slider-context.d.ts +2 -9
- package/slider/slider-control.d.ts +6 -7
- package/slider/slider-label.d.ts +6 -7
- package/slider/slider-marker-group.d.ts +6 -7
- package/slider/slider-marker.d.ts +5 -8
- package/slider/slider-output.d.ts +5 -8
- package/slider/slider-range.d.ts +6 -7
- package/slider/slider-thumb.cjs +3 -6
- package/slider/slider-thumb.d.ts +6 -7
- package/slider/slider-thumb.mjs +4 -7
- package/slider/slider-track.d.ts +6 -7
- package/slider/slider.cjs +9 -4
- package/slider/slider.d.ts +4 -8
- package/slider/slider.mjs +10 -5
- package/slider/use-slider.cjs +2 -7
- package/slider/use-slider.d.ts +4 -9
- package/slider/use-slider.mjs +3 -8
- package/splitter/index.d.ts +12 -46
- package/splitter/splitter-context.d.ts +2 -9
- package/splitter/splitter-panel.d.ts +5 -8
- package/splitter/splitter-resize-trigger.d.ts +5 -8
- package/splitter/splitter.d.ts +4 -17
- package/splitter/splitter.stories.d.ts +1 -1
- package/splitter/use-splitter.d.ts +4 -9
- package/switch/index.cjs +0 -3
- package/switch/index.d.ts +16 -42
- package/switch/index.mjs +1 -3
- package/switch/switch-context.d.ts +2 -9
- package/switch/switch-control.cjs +2 -2
- package/switch/switch-control.d.ts +6 -7
- package/switch/switch-control.mjs +2 -2
- package/switch/switch-label.d.ts +6 -7
- package/switch/switch-thumb.d.ts +6 -7
- package/switch/switch.cjs +4 -2
- package/switch/switch.d.ts +6 -11
- package/switch/switch.mjs +5 -3
- package/switch/switch.stories.d.ts +1 -0
- package/switch/switch.test.d.ts +1 -0
- package/switch/use-switch.d.ts +5 -10
- package/tabs/index.d.ts +15 -35
- package/tabs/tab-content.d.ts +6 -7
- package/tabs/tab-indicator.d.ts +6 -7
- package/tabs/tab-list.d.ts +6 -7
- package/tabs/tab-trigger.d.ts +5 -8
- package/tabs/tabs-context.d.ts +2 -9
- package/tabs/tabs.cjs +0 -1
- package/tabs/tabs.d.ts +5 -11
- package/tabs/tabs.mjs +0 -1
- package/tabs/tabs.stories.d.ts +1 -1
- package/tabs/use-tabs.cjs +21 -2
- package/tabs/use-tabs.d.ts +6 -11
- package/tabs/use-tabs.mjs +3 -3
- package/tags-input/index.d.ts +19 -46
- package/tags-input/tag-delete-trigger.d.ts +5 -8
- package/tags-input/tag-input.d.ts +5 -8
- package/tags-input/tag.d.ts +5 -8
- package/tags-input/tags-input-clear-trigger.d.ts +6 -7
- package/tags-input/tags-input-context.d.ts +2 -9
- package/tags-input/tags-input-control.cjs +3 -6
- package/tags-input/tags-input-control.d.ts +6 -7
- package/tags-input/tags-input-control.mjs +4 -7
- package/tags-input/tags-input-field.d.ts +6 -7
- package/tags-input/tags-input-label.d.ts +6 -7
- package/tags-input/tags-input.cjs +8 -6
- package/tags-input/tags-input.d.ts +6 -10
- package/tags-input/tags-input.mjs +9 -7
- package/tags-input/use-tags-input.d.ts +4 -9
- package/toast/index.d.ts +14 -31
- package/toast/toast-close-trigger.d.ts +6 -7
- package/toast/toast-description.d.ts +6 -7
- package/toast/toast-group.d.ts +6 -10
- package/toast/toast-item-context.d.ts +2 -9
- package/toast/toast-provider.cjs +0 -1
- package/toast/toast-provider.d.ts +4 -60
- package/toast/toast-provider.mjs +1 -1
- package/toast/toast-title.d.ts +6 -7
- package/toast/toast.d.ts +5 -8
- package/toast/toast.stories.d.ts +1 -1
- package/toast/use-toast-item.d.ts +2 -7
- package/toggle-group/index.cjs +17 -0
- package/toggle-group/index.d.ts +19 -0
- package/toggle-group/index.mjs +11 -0
- package/toggle-group/toggle-group-context.cjs +15 -0
- package/toggle-group/toggle-group-context.d.ts +5 -0
- package/toggle-group/toggle-group-context.mjs +10 -0
- package/toggle-group/toggle-group.cjs +35 -0
- package/toggle-group/toggle-group.d.ts +7 -0
- package/toggle-group/toggle-group.mjs +31 -0
- package/toggle-group/toggle-group.stories.d.ts +9 -0
- package/toggle-group/toggle-group.test.d.ts +1 -0
- package/toggle-group/toggle.cjs +21 -0
- package/toggle-group/toggle.d.ts +11 -0
- package/toggle-group/toggle.mjs +17 -0
- package/toggle-group/use-toggle-group.cjs +49 -0
- package/toggle-group/use-toggle-group.d.ts +7 -0
- package/toggle-group/use-toggle-group.mjs +26 -0
- package/tooltip/index.d.ts +11 -23
- package/tooltip/tooltip-arrow-tip.d.ts +6 -7
- package/tooltip/tooltip-arrow.d.ts +6 -7
- package/tooltip/tooltip-content.cjs +5 -6
- package/tooltip/tooltip-content.d.ts +7 -10
- package/tooltip/tooltip-content.mjs +5 -6
- package/tooltip/tooltip-context.d.ts +2 -9
- package/tooltip/tooltip-positioner.d.ts +6 -7
- package/tooltip/tooltip-trigger.d.ts +6 -7
- package/tooltip/use-tooltip.d.ts +4 -8
- package/types.d.ts +1 -0
- package/use-event.cjs +23 -0
- package/use-event.d.ts +12 -0
- package/use-event.mjs +19 -0
- package/use-latest-ref.cjs +14 -0
- package/use-latest-ref.mjs +10 -0
- package/accordion/accordion-item-presence.cjs +0 -16
- package/accordion/accordion-item-presence.d.ts +0 -4
- package/accordion/accordion-item-presence.mjs +0 -12
- package/combobox/combobox-option-group-label.d.ts +0 -10
- package/combobox/combobox-option-group.d.ts +0 -10
- package/combobox/combobox-option.cjs +0 -27
- package/combobox/combobox-option.d.ts +0 -14
- package/combobox/combobox-option.mjs +0 -23
- package/combobox/combobox-presence.cjs +0 -16
- package/combobox/combobox-presence.d.ts +0 -4
- package/combobox/combobox-presence.mjs +0 -12
- package/dialog/dialog-presence.cjs +0 -16
- package/dialog/dialog-presence.d.ts +0 -4
- package/dialog/dialog-presence.mjs +0 -12
- package/hover-card/hover-card-presence.cjs +0 -16
- package/hover-card/hover-card-presence.d.ts +0 -4
- package/hover-card/hover-card-presence.mjs +0 -12
- package/popover/popover-presence.cjs +0 -16
- package/popover/popover-presence.d.ts +0 -4
- package/popover/popover-presence.mjs +0 -12
- package/select/select-option-group-label.d.ts +0 -13
- package/select/select-option-group-label.mjs +0 -18
- package/select/select-option-group.d.ts +0 -10
- package/select/select-option.cjs +0 -26
- package/select/select-option.mjs +0 -22
- package/select/select-presence.cjs +0 -16
- package/select/select-presence.d.ts +0 -4
- package/select/select-presence.mjs +0 -12
- package/switch/switch-input.cjs +0 -19
- package/switch/switch-input.d.ts +0 -8
- package/switch/switch-input.mjs +0 -15
- package/tooltip/tooltip-presence.cjs +0 -16
- package/tooltip/tooltip-presence.d.ts +0 -4
- package/tooltip/tooltip-presence.mjs +0 -12
package/slider/use-slider.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
3
3
|
import * as slider from '@zag-js/slider';
|
|
4
|
-
import { useId
|
|
5
|
-
import { flushSync } from 'react-dom';
|
|
4
|
+
import { useId } from 'react';
|
|
6
5
|
import '../environment/index.mjs';
|
|
6
|
+
import { useEvent } from '../use-event.mjs';
|
|
7
7
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
8
8
|
|
|
9
9
|
const useSlider = (props) => {
|
|
@@ -14,15 +14,10 @@ const useSlider = (props) => {
|
|
|
14
14
|
...props,
|
|
15
15
|
value: props.defaultValue ?? props.value
|
|
16
16
|
};
|
|
17
|
-
const onChange = props.onChange;
|
|
18
|
-
const onChangeWithFlushSync = useCallback(
|
|
19
|
-
(e) => flushSync(() => onChange?.(e)),
|
|
20
|
-
[onChange]
|
|
21
|
-
);
|
|
22
17
|
const context = {
|
|
23
18
|
...initialContext,
|
|
24
19
|
value: props.value,
|
|
25
|
-
onChange:
|
|
20
|
+
onChange: useEvent(props.onChange, { sync: true })
|
|
26
21
|
};
|
|
27
22
|
const [state, send] = useMachine(slider.machine(initialContext), { context });
|
|
28
23
|
return slider.connect(state, send, normalizeProps);
|
package/splitter/index.d.ts
CHANGED
|
@@ -1,55 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { PanelProps, ResizeTriggerProps } from '@zag-js/splitter';
|
|
2
|
+
import { UseSplitterProps, UseSplitterReturn } from './use-splitter';
|
|
3
|
+
import { HTMLArkProps } from '..';
|
|
4
|
+
import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
3
5
|
/// <reference types="react" />
|
|
4
6
|
import { type SplitterProps } from './splitter';
|
|
5
|
-
import { useSplitterContext } from './splitter-context';
|
|
7
|
+
import { useSplitterContext, type SplitterContext } from './splitter-context';
|
|
6
8
|
import { SplitterPanel, type SplitterPanelProps } from './splitter-panel';
|
|
7
9
|
import { SplitterResizeTrigger, type SplitterResizeTriggerProps } from './splitter-resize-trigger';
|
|
8
10
|
import { splitterAnatomy } from './splitter.anatomy';
|
|
9
|
-
declare const Splitter: ForwardRefExoticComponent<Omit<
|
|
10
|
-
|
|
11
|
-
} & {
|
|
12
|
-
asChild?: boolean | undefined;
|
|
13
|
-
}, "ref">, "children" | "getRootNode" | "id" | "ids" | "orientation" | "onResize" | "dir" | "size" | "onResizeStart" | "onResizeEnd" | "defaultSize"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
14
|
-
defaultSize?: {
|
|
15
|
-
id: string | number;
|
|
16
|
-
size?: number | undefined;
|
|
17
|
-
minSize?: number | undefined;
|
|
18
|
-
maxSize?: number | undefined;
|
|
19
|
-
}[] | undefined;
|
|
20
|
-
} & {
|
|
21
|
-
children?: ReactNode | ((state: PublicApi<JSX.IntrinsicElements & {
|
|
22
|
-
element: HTMLAttributes<HTMLElement>;
|
|
23
|
-
style: CSSProperties;
|
|
24
|
-
}>) => ReactNode);
|
|
11
|
+
declare const Splitter: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children" | keyof UseSplitterProps> & UseSplitterProps & {
|
|
12
|
+
children?: ReactNode | ((state: UseSplitterReturn) => ReactNode);
|
|
25
13
|
} & RefAttributes<HTMLDivElement>> & {
|
|
26
|
-
Root: ForwardRefExoticComponent<Omit<
|
|
27
|
-
|
|
28
|
-
} & {
|
|
29
|
-
asChild?: boolean | undefined;
|
|
30
|
-
}, "ref">, "children" | "getRootNode" | "id" | "ids" | "orientation" | "onResize" | "dir" | "size" | "onResizeStart" | "onResizeEnd" | "defaultSize"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
31
|
-
defaultSize?: {
|
|
32
|
-
id: string | number;
|
|
33
|
-
size?: number | undefined;
|
|
34
|
-
minSize?: number | undefined;
|
|
35
|
-
maxSize?: number | undefined;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
} & {
|
|
38
|
-
children?: ReactNode | ((state: PublicApi<JSX.IntrinsicElements & {
|
|
39
|
-
element: HTMLAttributes<HTMLElement>;
|
|
40
|
-
style: CSSProperties;
|
|
41
|
-
}>) => ReactNode);
|
|
14
|
+
Root: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children" | keyof UseSplitterProps> & UseSplitterProps & {
|
|
15
|
+
children?: ReactNode | ((state: UseSplitterReturn) => ReactNode);
|
|
42
16
|
} & RefAttributes<HTMLDivElement>>;
|
|
43
|
-
Panel: ForwardRefExoticComponent<Omit<
|
|
44
|
-
|
|
45
|
-
} & {
|
|
46
|
-
asChild?: boolean | undefined;
|
|
47
|
-
}, "ref">, keyof PanelProps> & PanelProps & RefAttributes<HTMLDivElement>>;
|
|
48
|
-
ResizeTrigger: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
49
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
50
|
-
} & {
|
|
51
|
-
asChild?: boolean | undefined;
|
|
52
|
-
}, "ref">, keyof ResizeTriggerProps> & ResizeTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
Panel: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof PanelProps> & PanelProps & RefAttributes<HTMLDivElement>>;
|
|
18
|
+
ResizeTrigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof ResizeTriggerProps> & ResizeTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
53
19
|
};
|
|
54
20
|
export { Splitter, SplitterPanel, SplitterResizeTrigger, splitterAnatomy, useSplitterContext };
|
|
55
|
-
export type { SplitterPanelProps, SplitterProps, SplitterResizeTriggerProps };
|
|
21
|
+
export type { SplitterContext, SplitterPanelProps, SplitterProps, SplitterResizeTriggerProps };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UseSplitterReturn } from './use-splitter';
|
|
5
4
|
export type SplitterContext = UseSplitterReturn;
|
|
6
|
-
export declare const SplitterProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, useSplitterContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const SplitterProvider: Provider<UseSplitterReturn>, useSplitterContext: () => UseSplitterReturn;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import { type PanelProps } from '@zag-js/splitter';
|
|
2
|
-
import {
|
|
3
|
-
import { ark } from '../factory';
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
5
|
import type { Assign } from '../types';
|
|
5
|
-
export type SplitterPanelProps = Assign<
|
|
6
|
-
export declare const SplitterPanel: ForwardRefExoticComponent<Omit<
|
|
7
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
asChild?: boolean | undefined;
|
|
10
|
-
}, "ref">, keyof PanelProps> & PanelProps & RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export type SplitterPanelProps = Assign<HTMLArkProps<'div'>, PanelProps>;
|
|
7
|
+
export declare const SplitterPanel: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof PanelProps> & PanelProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import { type ResizeTriggerProps } from '@zag-js/splitter';
|
|
2
|
-
import {
|
|
3
|
-
import { ark } from '../factory';
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
5
|
import type { Assign } from '../types';
|
|
5
|
-
export type SplitterResizeTriggerProps = Assign<
|
|
6
|
-
export declare const SplitterResizeTrigger: ForwardRefExoticComponent<Omit<
|
|
7
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
8
|
-
} & {
|
|
9
|
-
asChild?: boolean | undefined;
|
|
10
|
-
}, "ref">, keyof ResizeTriggerProps> & ResizeTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export type SplitterResizeTriggerProps = Assign<HTMLArkProps<'button'>, ResizeTriggerProps>;
|
|
7
|
+
export declare const SplitterResizeTrigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof ResizeTriggerProps> & ResizeTriggerProps & RefAttributes<HTMLButtonElement>>;
|
package/splitter/splitter.d.ts
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { type ComponentPropsWithoutRef } from 'react';
|
|
4
|
-
import { ark } from '../factory';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ReactNode } from 'react';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
5
3
|
import type { Assign } from '../types';
|
|
6
4
|
import { type UseSplitterProps, type UseSplitterReturn } from './use-splitter';
|
|
7
|
-
export type SplitterProps = Assign<
|
|
5
|
+
export type SplitterProps = Assign<HTMLArkProps<'div'>, UseSplitterProps & {
|
|
8
6
|
children?: ReactNode | ((state: UseSplitterReturn) => ReactNode);
|
|
9
7
|
}>;
|
|
10
|
-
export declare const Splitter: ForwardRefExoticComponent<Omit<
|
|
11
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
-
} & {
|
|
13
|
-
asChild?: boolean | undefined;
|
|
14
|
-
}, "ref">, "children" | "getRootNode" | "id" | "ids" | "orientation" | "onResize" | "dir" | "size" | "onResizeStart" | "onResizeEnd" | "defaultSize"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
15
|
-
defaultSize?: {
|
|
16
|
-
id: string | number;
|
|
17
|
-
size?: number | undefined;
|
|
18
|
-
minSize?: number | undefined;
|
|
19
|
-
maxSize?: number | undefined;
|
|
20
|
-
}[] | undefined;
|
|
21
|
-
} & {
|
|
8
|
+
export declare const Splitter: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children" | keyof UseSplitterProps> & UseSplitterProps & {
|
|
22
9
|
children?: ReactNode | ((state: UseSplitterReturn) => ReactNode);
|
|
23
10
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as splitter from '@zag-js/splitter';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
|
-
export
|
|
3
|
+
export interface UseSplitterProps extends Optional<splitter.Context, 'id'> {
|
|
6
4
|
defaultSize?: splitter.Context['size'];
|
|
7
|
-
}
|
|
8
|
-
export type UseSplitterReturn =
|
|
9
|
-
export declare const useSplitter: (props: UseSplitterProps) =>
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
}
|
|
6
|
+
export type UseSplitterReturn = splitter.Api;
|
|
7
|
+
export declare const useSplitter: (props: UseSplitterProps) => UseSplitterReturn;
|
package/switch/index.cjs
CHANGED
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const _switch = require('./switch.cjs');
|
|
7
7
|
const switchContext = require('./switch-context.cjs');
|
|
8
8
|
const switchControl = require('./switch-control.cjs');
|
|
9
|
-
const switchInput = require('./switch-input.cjs');
|
|
10
9
|
const switchLabel = require('./switch-label.cjs');
|
|
11
10
|
const switchThumb = require('./switch-thumb.cjs');
|
|
12
11
|
const zagSwitch = require('@zag-js/switch');
|
|
@@ -14,14 +13,12 @@ const zagSwitch = require('@zag-js/switch');
|
|
|
14
13
|
const Switch = Object.assign(_switch.Switch, {
|
|
15
14
|
Root: _switch.Switch,
|
|
16
15
|
Control: switchControl.SwitchControl,
|
|
17
|
-
Input: switchInput.SwitchInput,
|
|
18
16
|
Label: switchLabel.SwitchLabel,
|
|
19
17
|
Thumb: switchThumb.SwitchThumb
|
|
20
18
|
});
|
|
21
19
|
|
|
22
20
|
exports.useSwitchContext = switchContext.useSwitchContext;
|
|
23
21
|
exports.SwitchControl = switchControl.SwitchControl;
|
|
24
|
-
exports.SwitchInput = switchInput.SwitchInput;
|
|
25
22
|
exports.SwitchLabel = switchLabel.SwitchLabel;
|
|
26
23
|
exports.SwitchThumb = switchThumb.SwitchThumb;
|
|
27
24
|
Object.defineProperty(exports, 'switchAnatomy', {
|
package/switch/index.d.ts
CHANGED
|
@@ -1,55 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UseSwitchProps, UseSwitchReturn } from './use-switch';
|
|
2
|
+
import { HTMLArkProps } from '..';
|
|
3
3
|
import { Assign } from '../types';
|
|
4
|
-
import { ForwardRefExoticComponent,
|
|
4
|
+
import { ForwardRefExoticComponent, ReactNode, RefAttributes, DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
5
5
|
/// <reference types="react" />
|
|
6
6
|
import { type SwitchProps } from './switch';
|
|
7
|
-
import { useSwitchContext } from './switch-context';
|
|
7
|
+
import { useSwitchContext, type SwitchContext } from './switch-context';
|
|
8
8
|
import { SwitchControl, type SwitchControlProps } from './switch-control';
|
|
9
|
-
import { SwitchInput, type SwitchInputProps } from './switch-input';
|
|
10
9
|
import { SwitchLabel, type SwitchLabelProps } from './switch-label';
|
|
11
10
|
import { SwitchThumb, type SwitchThumbProps } from './switch-thumb';
|
|
12
11
|
import { switchAnatomy } from './switch.anatomy';
|
|
13
|
-
declare const Switch: ForwardRefExoticComponent<Omit<Assign<
|
|
14
|
-
|
|
15
|
-
} & {
|
|
16
|
-
asChild?: boolean | undefined;
|
|
17
|
-
}, "ref">, UseSwitchProps>, "children"> & {
|
|
18
|
-
children: ReactNode | ((pages: PublicApi<JSX.IntrinsicElements & {
|
|
19
|
-
element: HTMLAttributes<HTMLElement>;
|
|
20
|
-
style: CSSProperties;
|
|
21
|
-
}>) => ReactNode);
|
|
12
|
+
declare const Switch: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"label">, UseSwitchProps>, "children"> & {
|
|
13
|
+
children?: ReactNode | ((pages: UseSwitchReturn) => ReactNode);
|
|
22
14
|
} & RefAttributes<HTMLLabelElement>> & {
|
|
23
|
-
Root: ForwardRefExoticComponent<Omit<Assign<
|
|
24
|
-
|
|
25
|
-
} & {
|
|
26
|
-
asChild?: boolean | undefined;
|
|
27
|
-
}, "ref">, UseSwitchProps>, "children"> & {
|
|
28
|
-
children: ReactNode | ((pages: PublicApi<JSX.IntrinsicElements & {
|
|
29
|
-
element: HTMLAttributes<HTMLElement>;
|
|
30
|
-
style: CSSProperties;
|
|
31
|
-
}>) => ReactNode);
|
|
15
|
+
Root: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"label">, UseSwitchProps>, "children"> & {
|
|
16
|
+
children?: ReactNode | ((pages: UseSwitchReturn) => ReactNode);
|
|
32
17
|
} & RefAttributes<HTMLLabelElement>>;
|
|
33
|
-
Control: ForwardRefExoticComponent<Omit<
|
|
34
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
35
|
-
} & {
|
|
36
|
-
asChild?: boolean | undefined;
|
|
37
|
-
}, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
38
|
-
Input: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
39
|
-
ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
|
|
40
|
-
} & {
|
|
18
|
+
Control: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
41
19
|
asChild?: boolean | undefined;
|
|
42
|
-
}
|
|
43
|
-
Label: ForwardRefExoticComponent<Omit<
|
|
44
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
45
|
-
} & {
|
|
20
|
+
} & RefAttributes<HTMLSpanElement>>;
|
|
21
|
+
Label: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
46
22
|
asChild?: boolean | undefined;
|
|
47
|
-
}
|
|
48
|
-
Thumb: ForwardRefExoticComponent<Omit<
|
|
49
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
50
|
-
} & {
|
|
23
|
+
} & RefAttributes<HTMLSpanElement>>;
|
|
24
|
+
Thumb: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
51
25
|
asChild?: boolean | undefined;
|
|
52
|
-
}
|
|
26
|
+
} & RefAttributes<HTMLSpanElement>>;
|
|
53
27
|
};
|
|
54
|
-
export { Switch, SwitchControl,
|
|
55
|
-
export type {
|
|
28
|
+
export { Switch, SwitchControl, SwitchLabel, SwitchThumb, switchAnatomy, useSwitchContext };
|
|
29
|
+
export type { SwitchContext, SwitchControlProps, SwitchLabelProps, SwitchProps, SwitchThumbProps };
|
package/switch/index.mjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { Switch as Switch$1 } from './switch.mjs';
|
|
3
3
|
export { useSwitchContext } from './switch-context.mjs';
|
|
4
4
|
import { SwitchControl } from './switch-control.mjs';
|
|
5
|
-
import { SwitchInput } from './switch-input.mjs';
|
|
6
5
|
import { SwitchLabel } from './switch-label.mjs';
|
|
7
6
|
import { SwitchThumb } from './switch-thumb.mjs';
|
|
8
7
|
export { anatomy as switchAnatomy } from '@zag-js/switch';
|
|
@@ -10,9 +9,8 @@ export { anatomy as switchAnatomy } from '@zag-js/switch';
|
|
|
10
9
|
const Switch = Object.assign(Switch$1, {
|
|
11
10
|
Root: Switch$1,
|
|
12
11
|
Control: SwitchControl,
|
|
13
|
-
Input: SwitchInput,
|
|
14
12
|
Label: SwitchLabel,
|
|
15
13
|
Thumb: SwitchThumb
|
|
16
14
|
});
|
|
17
15
|
|
|
18
|
-
export { Switch, SwitchControl,
|
|
16
|
+
export { Switch, SwitchControl, SwitchLabel, SwitchThumb };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Provider, HTMLAttributes, CSSProperties } from 'react';
|
|
1
|
+
import { Provider } from 'react';
|
|
3
2
|
/// <reference types="react" />
|
|
4
3
|
import { type UseSwitchReturn } from './use-switch';
|
|
5
4
|
export type SwitchContext = UseSwitchReturn;
|
|
6
|
-
export declare const SwitchProvider: Provider<
|
|
7
|
-
element: HTMLAttributes<HTMLElement>;
|
|
8
|
-
style: CSSProperties;
|
|
9
|
-
}>>, useSwitchContext: () => PublicApi<JSX.IntrinsicElements & {
|
|
10
|
-
element: HTMLAttributes<HTMLElement>;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
5
|
+
export declare const SwitchProvider: Provider<UseSwitchReturn>, useSwitchContext: () => UseSwitchReturn;
|
|
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const switchContext = require('./switch-context.cjs');
|
|
11
11
|
|
|
12
12
|
const SwitchControl = react.forwardRef((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
const mergedProps = react$1.mergeProps(controlProps, props);
|
|
13
|
+
const api = switchContext.useSwitchContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(api.controlProps, props);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
SwitchControl.displayName = "SwitchControl";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type SwitchControlProps = HTMLArkProps<'span'>;
|
|
5
|
+
export declare const SwitchControl: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLSpanElement>>;
|
|
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useSwitchContext } from './switch-context.mjs';
|
|
7
7
|
|
|
8
8
|
const SwitchControl = forwardRef((props, ref) => {
|
|
9
|
-
const
|
|
10
|
-
const mergedProps = mergeProps(controlProps, props);
|
|
9
|
+
const api = useSwitchContext();
|
|
10
|
+
const mergedProps = mergeProps(api.controlProps, props);
|
|
11
11
|
return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
SwitchControl.displayName = "SwitchControl";
|
package/switch/switch-label.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type SwitchLabelProps = HTMLArkProps<'span'>;
|
|
5
|
+
export declare const SwitchLabel: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLSpanElement>>;
|
package/switch/switch-thumb.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type SwitchThumbProps = HTMLArkProps<'span'>;
|
|
5
|
+
export declare const SwitchThumb: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLSpanElement>>;
|
package/switch/switch.cjs
CHANGED
|
@@ -18,7 +18,6 @@ const Switch = react.forwardRef((props, ref) => {
|
|
|
18
18
|
"defaultChecked",
|
|
19
19
|
"dir",
|
|
20
20
|
"disabled",
|
|
21
|
-
"focusable",
|
|
22
21
|
"form",
|
|
23
22
|
"getRootNode",
|
|
24
23
|
"id",
|
|
@@ -34,7 +33,10 @@ const Switch = react.forwardRef((props, ref) => {
|
|
|
34
33
|
const api = useSwitch.useSwitch(switchProps);
|
|
35
34
|
const view = runIfFn.runIfFn(children, api);
|
|
36
35
|
const mergedProps = react$1.mergeProps(api.rootProps, labelProps);
|
|
37
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
36
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(switchContext.SwitchProvider, { value: api, children: [
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ref, children: view }),
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.hiddenInputProps })
|
|
39
|
+
] });
|
|
38
40
|
});
|
|
39
41
|
Switch.displayName = "Switch";
|
|
40
42
|
|
package/switch/switch.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent,
|
|
2
|
-
import { type
|
|
3
|
-
import { ark } from '../factory';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ReactNode } from 'react';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
3
|
import type { Assign } from '../types';
|
|
5
4
|
import { type UseSwitchProps, type UseSwitchReturn } from './use-switch';
|
|
6
|
-
export type SwitchProps = Assign<Assign<
|
|
7
|
-
children
|
|
5
|
+
export type SwitchProps = Assign<Assign<HTMLArkProps<'label'>, UseSwitchProps>, {
|
|
6
|
+
children?: ReactNode | ((pages: UseSwitchReturn) => ReactNode);
|
|
8
7
|
}>;
|
|
9
|
-
export declare const Switch: ForwardRefExoticComponent<Omit<Assign<
|
|
10
|
-
|
|
11
|
-
} & {
|
|
12
|
-
asChild?: boolean | undefined;
|
|
13
|
-
}, "ref">, UseSwitchProps>, "children"> & {
|
|
14
|
-
children: ReactNode | ((pages: UseSwitchReturn) => ReactNode);
|
|
8
|
+
export declare const Switch: ForwardRefExoticComponent<Omit<Assign<HTMLArkProps<"label">, UseSwitchProps>, "children"> & {
|
|
9
|
+
children?: ReactNode | ((pages: UseSwitchReturn) => ReactNode);
|
|
15
10
|
} & RefAttributes<HTMLLabelElement>>;
|
package/switch/switch.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
@@ -14,7 +14,6 @@ const Switch = forwardRef((props, ref) => {
|
|
|
14
14
|
"defaultChecked",
|
|
15
15
|
"dir",
|
|
16
16
|
"disabled",
|
|
17
|
-
"focusable",
|
|
18
17
|
"form",
|
|
19
18
|
"getRootNode",
|
|
20
19
|
"id",
|
|
@@ -30,7 +29,10 @@ const Switch = forwardRef((props, ref) => {
|
|
|
30
29
|
const api = useSwitch(switchProps);
|
|
31
30
|
const view = runIfFn(children, api);
|
|
32
31
|
const mergedProps = mergeProps(api.rootProps, labelProps);
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ jsxs(SwitchProvider, { value: api, children: [
|
|
33
|
+
/* @__PURE__ */ jsx(ark.label, { ...mergedProps, ref, children: view }),
|
|
34
|
+
/* @__PURE__ */ jsx("input", { ...api.hiddenInputProps })
|
|
35
|
+
] });
|
|
34
36
|
});
|
|
35
37
|
Switch.displayName = "Switch";
|
|
36
38
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/switch/use-switch.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
import { HTMLAttributes, CSSProperties } from 'react';
|
|
2
|
-
/// <reference types="react" />
|
|
3
1
|
import * as zagSwitch from '@zag-js/switch';
|
|
4
2
|
import { type Optional } from '../types';
|
|
5
|
-
export
|
|
6
|
-
defaultChecked?:
|
|
7
|
-
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
style: CSSProperties;
|
|
11
|
-
}>;
|
|
12
|
-
export type UseSwitchReturn = ReturnType<typeof useSwitch>;
|
|
3
|
+
export interface UseSwitchProps extends Optional<zagSwitch.Context, 'id'> {
|
|
4
|
+
defaultChecked?: zagSwitch.Context['checked'];
|
|
5
|
+
}
|
|
6
|
+
export type UseSwitchReturn = zagSwitch.Api;
|
|
7
|
+
export declare const useSwitch: (props: UseSwitchProps) => UseSwitchReturn;
|
package/tabs/index.d.ts
CHANGED
|
@@ -1,48 +1,28 @@
|
|
|
1
1
|
import { TabPresenceProps } from './tab-presence';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ContentProps, TriggerProps } from '@zag-js/tabs';
|
|
3
|
+
import { UseTabsProps } from './use-tabs';
|
|
4
|
+
import { HTMLArkProps } from '..';
|
|
5
|
+
import { ForwardRefExoticComponent, RefAttributes, DetailedHTMLProps, HTMLAttributes } from 'react';
|
|
4
6
|
/// <reference types="react" />
|
|
5
7
|
import { TabContent, type TabContentProps } from './tab-content';
|
|
6
8
|
import { TabIndicator, type TabIndicatorProps } from './tab-indicator';
|
|
7
9
|
import { TabList, type TabListProps } from './tab-list';
|
|
8
10
|
import { TabTrigger, type TabTriggerProps } from './tab-trigger';
|
|
9
11
|
import { type TabsProps } from './tabs';
|
|
10
|
-
import { useTabsContext } from './tabs-context';
|
|
12
|
+
import { useTabsContext, type TabsContext } from './tabs-context';
|
|
11
13
|
import { tabsAnatomy } from './tabs.anatomy';
|
|
12
|
-
declare const Tabs: ForwardRefExoticComponent<Omit<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
asChild?: boolean | undefined;
|
|
16
|
-
}, "ref">, "value" | "getRootNode" | "id" | "ids" | "orientation" | "onFocus" | "onChange" | "defaultValue" | "dir" | "loop" | "translations" | "activationMode" | "onDelete"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
17
|
-
defaultValue?: string | null | undefined;
|
|
18
|
-
} & RefAttributes<HTMLDivElement>> & {
|
|
19
|
-
Root: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
-
} & {
|
|
14
|
+
declare const Tabs: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseTabsProps> & UseTabsProps & RefAttributes<HTMLDivElement>> & {
|
|
15
|
+
Root: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseTabsProps> & UseTabsProps & RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Content: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
22
17
|
asChild?: boolean | undefined;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
} & RefAttributes<HTMLDivElement>>;
|
|
26
|
-
Content: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
-
} & {
|
|
29
|
-
asChild?: boolean | undefined;
|
|
30
|
-
}, "ref"> & ContentProps & Omit<TabPresenceProps, "children"> & RefAttributes<HTMLDivElement>>;
|
|
31
|
-
Indicator: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
32
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
33
|
-
} & {
|
|
34
|
-
asChild?: boolean | undefined;
|
|
35
|
-
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
36
|
-
List: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
37
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
38
|
-
} & {
|
|
18
|
+
} & ContentProps & Omit<TabPresenceProps, "children"> & RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Indicator: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
39
20
|
asChild?: boolean | undefined;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
43
|
-
} & {
|
|
21
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
22
|
+
List: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
44
23
|
asChild?: boolean | undefined;
|
|
45
|
-
}
|
|
24
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
25
|
+
Trigger: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof TriggerProps> & TriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
46
26
|
};
|
|
47
27
|
export { TabContent, TabIndicator, TabList, TabTrigger, Tabs, tabsAnatomy, useTabsContext };
|
|
48
|
-
export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsProps };
|
|
28
|
+
export type { TabContentProps, TabIndicatorProps, TabListProps, TabTriggerProps, TabsContext, TabsProps, };
|
package/tabs/tab-content.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
1
3
|
import { type ContentProps } from '@zag-js/tabs';
|
|
2
|
-
import {
|
|
3
|
-
import { ark } from '../factory';
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
5
|
import { type TabPresenceProps } from './tab-presence';
|
|
5
6
|
export type TabContentProps = InnerTabContentProps & Omit<TabPresenceProps, 'children'>;
|
|
6
|
-
export declare const TabContent: ForwardRefExoticComponent<Omit<
|
|
7
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
8
|
-
} & {
|
|
7
|
+
export declare const TabContent: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
9
8
|
asChild?: boolean | undefined;
|
|
10
|
-
}
|
|
11
|
-
type InnerTabContentProps =
|
|
9
|
+
} & ContentProps & Omit<TabPresenceProps, "children"> & RefAttributes<HTMLDivElement>>;
|
|
10
|
+
type InnerTabContentProps = HTMLArkProps<'div'> & ContentProps;
|
|
12
11
|
export {};
|