@ark-ui/react 0.14.0 → 0.15.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 +38 -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-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.d.ts +5 -11
- package/accordion/accordion.stories.d.ts +1 -1
- package/accordion/index.d.ts +13 -34
- package/accordion/use-accordion.d.ts +2 -2
- 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 +2 -1
- 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 +6 -9
- package/carousel/index.d.ts +24 -47
- package/carousel/use-carousel.d.ts +2 -1
- 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 +4 -8
- package/checkbox/checkbox.mjs +8 -5
- package/checkbox/checkbox.stories.d.ts +1 -1
- package/checkbox/index.d.ts +8 -19
- package/checkbox/use-checkbox.d.ts +3 -3
- 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-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 +2 -2
- 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 +3 -2
- 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 -17
- package/combobox/combobox.d.ts +9 -13
- package/combobox/combobox.mjs +20 -17
- package/combobox/combobox.stories.d.ts +1 -0
- package/combobox/index.cjs +15 -9
- package/combobox/index.d.ts +35 -67
- package/combobox/index.mjs +11 -7
- package/combobox/use-combobox.cjs +24 -3
- package/combobox/use-combobox.d.ts +8 -4
- package/combobox/use-combobox.mjs +24 -3
- 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-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 +2 -1
- 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-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 +2 -1
- package/editable/editable-area.d.ts +6 -7
- package/editable/editable-cancel-trigger.d.ts +6 -7
- 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 +5 -12
- package/editable/index.d.ts +23 -51
- package/editable/use-editable.d.ts +3 -3
- package/factory.d.ts +4 -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-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 +2 -1
- package/index.cjs +38 -19
- package/index.d.ts +1 -0
- package/index.mjs +18 -7
- 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 +5 -8
- 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 +2 -1
- package/number-input/index.d.ts +18 -41
- 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 +2 -2
- package/number-input/use-number-input.mjs +3 -8
- package/package.json +56 -49
- package/pagination/index.d.ts +16 -39
- 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 +4 -8
- package/pagination/use-pagination.d.ts +2 -2
- package/pin-input/index.d.ts +11 -30
- 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 +2 -2
- 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-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 +2 -1
- package/presence/presence.d.ts +2 -2
- package/presence/use-presence.d.ts +2 -1
- package/pressable/index.d.ts +4 -24
- package/pressable/pressable.d.ts +5 -15
- package/pressable/use-pressable.d.ts +2 -1
- 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-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 +2 -2
- package/range-slider/index.d.ts +20 -54
- 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.d.ts +4 -11
- package/range-slider/use-range-slider.cjs +3 -1
- package/range-slider/use-range-slider.d.ts +2 -2
- package/range-slider/use-range-slider.mjs +3 -1
- package/rating-group/index.d.ts +10 -31
- package/rating-group/rating-group-control.cjs +4 -7
- package/rating-group/rating-group-control.d.ts +4 -8
- 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 +2 -2
- 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-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 +2 -2
- 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 +3 -2
- 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 -6
- package/select/use-select.mjs +13 -3
- package/slider/index.d.ts +18 -45
- 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 +7 -4
- package/slider/slider.d.ts +4 -8
- package/slider/slider.mjs +8 -5
- package/slider/use-slider.cjs +2 -7
- package/slider/use-slider.d.ts +2 -2
- package/slider/use-slider.mjs +3 -8
- package/splitter/index.d.ts +10 -39
- 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 +2 -2
- package/switch/index.d.ts +12 -25
- package/switch/switch-control.cjs +3 -6
- package/switch/switch-control.d.ts +6 -7
- package/switch/switch-control.mjs +4 -7
- 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 +4 -9
- 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 +3 -3
- 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.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.d.ts +2 -2
- package/tags-input/index.d.ts +17 -44
- 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-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 +7 -4
- package/tags-input/tags-input.d.ts +4 -8
- package/tags-input/tags-input.mjs +8 -5
- package/tags-input/use-tags-input.d.ts +2 -2
- package/toast/index.d.ts +13 -30
- package/toast/toast-close-trigger.d.ts +6 -7
- package/toast/toast-description.d.ts +6 -7
- package/toast/toast-group.d.ts +4 -8
- package/toast/toast-provider.cjs +0 -1
- package/toast/toast-provider.d.ts +3 -4
- 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/toggle-group/index.cjs +19 -0
- package/toggle-group/index.d.ts +20 -0
- package/toggle-group/index.mjs +12 -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.anatomy.cjs +10 -0
- package/toggle-group/toggle-group.anatomy.d.ts +2 -0
- package/toggle-group/toggle-group.anatomy.mjs +6 -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-positioner.d.ts +6 -7
- package/tooltip/tooltip-trigger.d.ts +6 -7
- package/tooltip/use-tooltip.d.ts +2 -1
- 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/tooltip/tooltip-presence.cjs +0 -16
- package/tooltip/tooltip-presence.d.ts +0 -4
- package/tooltip/tooltip-presence.mjs +0 -12
|
@@ -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 RangeSliderRangeProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const RangeSliderRange: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -10,12 +10,12 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const rangeSliderContext = require('./range-slider-context.cjs');
|
|
11
11
|
|
|
12
12
|
const RangeSliderThumb = react.forwardRef((props, ref) => {
|
|
13
|
-
const { index, ...
|
|
14
|
-
const
|
|
15
|
-
const mergedProps = react$1.mergeProps(getThumbProps(index),
|
|
13
|
+
const { index, ...localProps } = props;
|
|
14
|
+
const api = rangeSliderContext.useRangeSliderContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(api.getThumbProps(index), localProps);
|
|
16
16
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17
|
-
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref
|
|
18
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { ...getHiddenInputProps(index) })
|
|
17
|
+
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }),
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.getHiddenInputProps(index) })
|
|
19
19
|
] });
|
|
20
20
|
});
|
|
21
21
|
RangeSliderThumb.displayName = "RangeSliderThumb";
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent,
|
|
2
|
-
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
4
|
import { type Assign } from '../types';
|
|
4
|
-
export type RangeSliderThumbProps = Assign<
|
|
5
|
+
export type RangeSliderThumbProps = Assign<HTMLArkProps<'div'>, {
|
|
5
6
|
index: number;
|
|
6
7
|
}>;
|
|
7
|
-
export declare const RangeSliderThumb: ForwardRefExoticComponent<Omit<
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
asChild?: boolean | undefined;
|
|
11
|
-
}, "ref">, "index"> & {
|
|
8
|
+
export declare const RangeSliderThumb: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "index"> & {
|
|
12
9
|
index: number;
|
|
13
10
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -6,12 +6,12 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useRangeSliderContext } from './range-slider-context.mjs';
|
|
7
7
|
|
|
8
8
|
const RangeSliderThumb = forwardRef((props, ref) => {
|
|
9
|
-
const { index, ...
|
|
10
|
-
const
|
|
11
|
-
const mergedProps = mergeProps(getThumbProps(index),
|
|
9
|
+
const { index, ...localProps } = props;
|
|
10
|
+
const api = useRangeSliderContext();
|
|
11
|
+
const mergedProps = mergeProps(api.getThumbProps(index), localProps);
|
|
12
12
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
-
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref
|
|
14
|
-
/* @__PURE__ */ jsx("input", { ...getHiddenInputProps(index) })
|
|
13
|
+
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }),
|
|
14
|
+
/* @__PURE__ */ jsx("input", { ...api.getHiddenInputProps(index) })
|
|
15
15
|
] });
|
|
16
16
|
});
|
|
17
17
|
RangeSliderThumb.displayName = "RangeSliderThumb";
|
|
@@ -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 RangeSliderTrackProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const RangeSliderTrack: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { ark } from '../factory';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
3
|
import { type Assign } from '../types';
|
|
5
4
|
import { type UseRangeSliderProps, type UseRangeSliderReturn } from './use-range-slider';
|
|
6
|
-
export type RangeSliderProps = Assign<
|
|
5
|
+
export type RangeSliderProps = Assign<HTMLArkProps<'div'>, UseRangeSliderProps & {
|
|
7
6
|
children?: ((api: UseRangeSliderReturn) => ReactNode) | ReactNode;
|
|
8
7
|
}>;
|
|
9
|
-
export declare const RangeSlider: ForwardRefExoticComponent<Omit<
|
|
10
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
} & {
|
|
12
|
-
asChild?: boolean | undefined;
|
|
13
|
-
}, "ref">, "name" | "value" | "children" | "getRootNode" | "form" | "id" | "ids" | "aria-label" | "disabled" | "defaultValue" | "dir" | "aria-labelledby" | "onChange" | "max" | "min" | "readOnly" | "step" | "orientation" | "onFocusChange" | "invalid" | "onChangeEnd" | "onChangeStart" | "getAriaValueText" | "minStepsBetweenThumbs" | "thumbAlignment" | "thumbSize"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
14
|
-
defaultValue?: number[] | undefined;
|
|
15
|
-
} & {
|
|
8
|
+
export declare const RangeSlider: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children" | keyof UseRangeSliderProps> & UseRangeSliderProps & {
|
|
16
9
|
children?: ReactNode | ((api: UseRangeSliderReturn) => ReactNode);
|
|
17
10
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -7,6 +7,7 @@ const rangeSlider = require('@zag-js/range-slider');
|
|
|
7
7
|
const react$1 = require('@zag-js/react');
|
|
8
8
|
const react = require('react');
|
|
9
9
|
require('../environment/index.cjs');
|
|
10
|
+
const useEvent = require('../use-event.cjs');
|
|
10
11
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
11
12
|
|
|
12
13
|
function _interopNamespaceDefault(e) {
|
|
@@ -38,7 +39,8 @@ const useRangeSlider = (props) => {
|
|
|
38
39
|
};
|
|
39
40
|
const context = {
|
|
40
41
|
...initialContext,
|
|
41
|
-
value: props.value
|
|
42
|
+
value: props.value,
|
|
43
|
+
onChange: useEvent.useEvent(props.onChange, { sync: true })
|
|
42
44
|
};
|
|
43
45
|
const [state, send] = react$1.useMachine(rangeSlider__namespace.machine(initialContext), {
|
|
44
46
|
context
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rangeSlider from '@zag-js/range-slider';
|
|
2
2
|
import { type Optional } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export interface UseRangeSliderProps extends Optional<rangeSlider.Context, 'id'> {
|
|
4
4
|
defaultValue?: rangeSlider.Context['value'];
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export type UseRangeSliderReturn = rangeSlider.Api;
|
|
7
7
|
export declare const useRangeSlider: (props: UseRangeSliderProps) => UseRangeSliderReturn;
|
|
@@ -3,6 +3,7 @@ import * as rangeSlider from '@zag-js/range-slider';
|
|
|
3
3
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import '../environment/index.mjs';
|
|
6
|
+
import { useEvent } from '../use-event.mjs';
|
|
6
7
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
7
8
|
|
|
8
9
|
const useRangeSlider = (props) => {
|
|
@@ -15,7 +16,8 @@ const useRangeSlider = (props) => {
|
|
|
15
16
|
};
|
|
16
17
|
const context = {
|
|
17
18
|
...initialContext,
|
|
18
|
-
value: props.value
|
|
19
|
+
value: props.value,
|
|
20
|
+
onChange: useEvent(props.onChange, { sync: true })
|
|
19
21
|
};
|
|
20
22
|
const [state, send] = useMachine(rangeSlider.machine(initialContext), {
|
|
21
23
|
context
|
package/rating-group/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ItemProps, ItemState } from '@zag-js/rating-group';
|
|
2
|
+
import { UseRatingGroupProps, UseRatingGroupReturn } from './use-rating-group';
|
|
3
|
+
import { HTMLArkProps } from '..';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes, ReactNode, DetailedHTMLProps, LabelHTMLAttributes } from 'react';
|
|
4
5
|
/// <reference types="react" />
|
|
5
6
|
import { Rating, type RatingProps } from './rating';
|
|
6
7
|
import { useRatingContext } from './rating-context';
|
|
@@ -9,37 +10,15 @@ import { useRatingGroupContext } from './rating-group-context';
|
|
|
9
10
|
import { RatingGroupControl, type RatingGroupControlProps } from './rating-group-control';
|
|
10
11
|
import { RatingGroupLabel, type RatingGroupLabelProps } from './rating-group-label';
|
|
11
12
|
import { ratingGroupAnatomy } from './rating-group.anatomy';
|
|
12
|
-
declare const RatingGroup: ForwardRefExoticComponent<Omit<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
asChild?: boolean | undefined;
|
|
16
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "autoFocus" | "dir" | "onChange" | "max" | "readOnly" | "translations" | "allowHalf" | "onHover"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
17
|
-
defaultValue?: number | 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
|
-
} & {
|
|
22
|
-
asChild?: boolean | undefined;
|
|
23
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "autoFocus" | "dir" | "onChange" | "max" | "readOnly" | "translations" | "allowHalf" | "onHover"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
24
|
-
defaultValue?: number | undefined;
|
|
25
|
-
} & RefAttributes<HTMLDivElement>>;
|
|
26
|
-
Control: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
28
|
-
} & {
|
|
29
|
-
asChild?: boolean | undefined;
|
|
30
|
-
}, "ref">, "children"> & {
|
|
13
|
+
declare const RatingGroup: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseRatingGroupProps> & UseRatingGroupProps & RefAttributes<HTMLDivElement>> & {
|
|
14
|
+
Root: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseRatingGroupProps> & UseRatingGroupProps & RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Control: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children"> & {
|
|
31
16
|
children?: ReactNode | ((context: UseRatingGroupReturn) => ReactNode);
|
|
32
17
|
} & RefAttributes<HTMLDivElement>>;
|
|
33
|
-
Label: ForwardRefExoticComponent<Omit<
|
|
34
|
-
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
35
|
-
} & {
|
|
36
|
-
asChild?: boolean | undefined;
|
|
37
|
-
}, "ref"> & RefAttributes<HTMLLabelElement>>;
|
|
38
|
-
Rating: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
39
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
40
|
-
} & {
|
|
18
|
+
Label: ForwardRefExoticComponent<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
41
19
|
asChild?: boolean | undefined;
|
|
42
|
-
}
|
|
20
|
+
} & RefAttributes<HTMLLabelElement>>;
|
|
21
|
+
Rating: ForwardRefExoticComponent<Omit<HTMLArkProps<"span">, "children" | "index"> & ItemProps & {
|
|
43
22
|
children: (state: ItemState) => ReactNode;
|
|
44
23
|
} & RefAttributes<HTMLSpanElement>>;
|
|
45
24
|
};
|
|
@@ -13,13 +13,10 @@ const ratingGroupContext = require('./rating-group-context.cjs');
|
|
|
13
13
|
const RatingGroupControl = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
15
|
const { children, ...divProps } = props;
|
|
16
|
-
const
|
|
17
|
-
const mergedProps = react$1.mergeProps(
|
|
18
|
-
const view = runIfFn.runIfFn(children,
|
|
19
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
20
|
-
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }),
|
|
21
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { ...ratingGroup.hiddenInputProps })
|
|
22
|
-
] });
|
|
16
|
+
const api = ratingGroupContext.useRatingGroupContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.controlProps, divProps);
|
|
18
|
+
const view = runIfFn.runIfFn(children, api);
|
|
19
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref, children: view }) });
|
|
23
20
|
}
|
|
24
21
|
);
|
|
25
22
|
RatingGroupControl.displayName = "RatingGroupControl";
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent,
|
|
2
|
-
import {
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
3
|
import { type RatingGroupContext } from './rating-group-context';
|
|
4
|
-
export type RatingGroupControlProps = Omit<
|
|
4
|
+
export type RatingGroupControlProps = Omit<HTMLArkProps<'div'>, 'children'> & {
|
|
5
5
|
children?: ReactNode | ((context: RatingGroupContext) => ReactNode);
|
|
6
6
|
};
|
|
7
|
-
export declare const RatingGroupControl: ForwardRefExoticComponent<Omit<
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
asChild?: boolean | undefined;
|
|
11
|
-
}, "ref">, "children"> & {
|
|
7
|
+
export declare const RatingGroupControl: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "children"> & {
|
|
12
8
|
children?: ReactNode | ((context: RatingGroupContext) => ReactNode);
|
|
13
9
|
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { ark } from '../factory.mjs';
|
|
@@ -9,13 +9,10 @@ import { useRatingGroupContext } from './rating-group-context.mjs';
|
|
|
9
9
|
const RatingGroupControl = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
11
|
const { children, ...divProps } = props;
|
|
12
|
-
const
|
|
13
|
-
const mergedProps = mergeProps(
|
|
14
|
-
const view = runIfFn(children,
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }),
|
|
17
|
-
/* @__PURE__ */ jsx("input", { ...ratingGroup.hiddenInputProps })
|
|
18
|
-
] });
|
|
12
|
+
const api = useRatingGroupContext();
|
|
13
|
+
const mergedProps = mergeProps(api.controlProps, divProps);
|
|
14
|
+
const view = runIfFn(children, api);
|
|
15
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref, children: view }) });
|
|
19
16
|
}
|
|
20
17
|
);
|
|
21
18
|
RatingGroupControl.displayName = "RatingGroupControl";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type RatingGroupLabelProps = HTMLArkProps<'label'>;
|
|
5
|
+
export declare const RatingGroupLabel: ForwardRefExoticComponent<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLLabelElement>>;
|
|
@@ -30,9 +30,12 @@ const RatingGroup = react.forwardRef((props, ref) => {
|
|
|
30
30
|
"translations",
|
|
31
31
|
"value"
|
|
32
32
|
]);
|
|
33
|
-
const
|
|
34
|
-
const mergedProps = react$1.mergeProps(
|
|
35
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
33
|
+
const api = useRatingGroup.useRatingGroup(useRatingProps);
|
|
34
|
+
const mergedProps = react$1.mergeProps(api.rootProps, inputProps);
|
|
35
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(ratingGroupContext.RatingGroupProvider, { value: api, children: [
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref }),
|
|
37
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { ...api.hiddenInputProps })
|
|
38
|
+
] });
|
|
36
39
|
});
|
|
37
40
|
RatingGroup.displayName = "RatingGroup";
|
|
38
41
|
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
4
|
import { type Assign } from '../types';
|
|
5
5
|
import { type UseRatingGroupProps } from './use-rating-group';
|
|
6
|
-
export type RatingGroupProps = Assign<
|
|
7
|
-
export declare const RatingGroup: ForwardRefExoticComponent<Omit<
|
|
8
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
-
} & {
|
|
10
|
-
asChild?: boolean | undefined;
|
|
11
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "autoFocus" | "dir" | "onChange" | "max" | "readOnly" | "translations" | "allowHalf" | "onHover"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
12
|
-
defaultValue?: number | undefined;
|
|
13
|
-
} & RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export type RatingGroupProps = Assign<HTMLArkProps<'div'>, UseRatingGroupProps>;
|
|
7
|
+
export declare const RatingGroup: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseRatingGroupProps> & UseRatingGroupProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -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';
|
|
@@ -26,9 +26,12 @@ const RatingGroup = forwardRef((props, ref) => {
|
|
|
26
26
|
"translations",
|
|
27
27
|
"value"
|
|
28
28
|
]);
|
|
29
|
-
const
|
|
30
|
-
const mergedProps = mergeProps(
|
|
31
|
-
return /* @__PURE__ */
|
|
29
|
+
const api = useRatingGroup(useRatingProps);
|
|
30
|
+
const mergedProps = mergeProps(api.rootProps, inputProps);
|
|
31
|
+
return /* @__PURE__ */ jsxs(RatingGroupProvider, { value: api, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref }),
|
|
33
|
+
/* @__PURE__ */ jsx("input", { ...api.hiddenInputProps })
|
|
34
|
+
] });
|
|
32
35
|
});
|
|
33
36
|
RatingGroup.displayName = "RatingGroup";
|
|
34
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JSX } from 'react/jsx-runtime';
|
|
2
2
|
import type { Meta } from '@storybook/react';
|
|
3
|
-
import { RatingGroup } from '
|
|
3
|
+
import { RatingGroup } from './';
|
|
4
4
|
type RatingGroupType = typeof RatingGroup;
|
|
5
5
|
declare const meta: Meta<RatingGroupType>;
|
|
6
6
|
export default meta;
|
package/rating-group/rating.d.ts
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import type { ItemProps } from '@zag-js/rating-group';
|
|
2
|
-
import { ForwardRefExoticComponent,
|
|
3
|
-
import {
|
|
2
|
+
import { ForwardRefExoticComponent, RefAttributes, type ReactNode } from 'react';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
4
|
import type { Assign } from '../types';
|
|
5
5
|
import { type RatingContext } from './rating-context';
|
|
6
|
-
export type RatingProps = Assign<
|
|
6
|
+
export type RatingProps = Assign<HTMLArkProps<'span'>, ItemProps & {
|
|
7
7
|
children: (state: RatingContext) => ReactNode | ReactNode;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const Rating: ForwardRefExoticComponent<Omit<
|
|
10
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
11
|
-
} & {
|
|
12
|
-
asChild?: boolean | undefined;
|
|
13
|
-
}, "ref">, "children" | "index"> & ItemProps & {
|
|
9
|
+
export declare const Rating: ForwardRefExoticComponent<Omit<HTMLArkProps<"span">, "children" | "index"> & ItemProps & {
|
|
14
10
|
children: (state: RatingContext) => ReactNode | ReactNode;
|
|
15
11
|
} & RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ratingGroup from '@zag-js/rating-group';
|
|
2
2
|
import { type Optional } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export interface UseRatingGroupProps extends Optional<ratingGroup.Context, 'id'> {
|
|
4
4
|
defaultValue?: ratingGroup.Context['value'];
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export type UseRatingGroupReturn = ratingGroup.Api;
|
|
7
7
|
export declare const useRatingGroup: (props: UseRatingGroupProps) => UseRatingGroupReturn;
|
package/run-if-fn.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export type AnyFunction<Arg = unknown, ReturnValue = unknown> = (...args: Arg[]) => ReturnValue;
|
|
2
1
|
export declare const runIfFn: <MaybeReturnValue, FunctionArgs>(valueOrFn: MaybeReturnValue | ((...fnArgs: FunctionArgs[]) => MaybeReturnValue), ...args: FunctionArgs[]) => MaybeReturnValue;
|
package/segment-group/index.d.ts
CHANGED
|
@@ -1,64 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RadioProps } from '@zag-js/radio-group';
|
|
2
|
+
import { UseSegmentGroupProps } from './use-segment-group';
|
|
3
|
+
import { HTMLArkProps } from '..';
|
|
4
|
+
import { ForwardRefExoticComponent, RefAttributes, DetailedHTMLProps, LabelHTMLAttributes, HTMLAttributes } from 'react';
|
|
3
5
|
/// <reference types="react" />
|
|
4
6
|
import { Segment, type SegmentProps } from './segment';
|
|
5
|
-
import { useSegmentContext } from './segment-context';
|
|
7
|
+
import { useSegmentContext, type SegmentContext } from './segment-context';
|
|
6
8
|
import { SegmentControl, type SegmentControlProps } from './segment-control';
|
|
7
9
|
import { type SegmentGroupProps } from './segment-group';
|
|
8
|
-
import { useSegmentGroupContext } from './segment-group-context';
|
|
10
|
+
import { useSegmentGroupContext, type SegmentGroupContext } from './segment-group-context';
|
|
9
11
|
import { SegmentGroupIndicator, type SegmentGroupIndicatorProps } from './segment-group-indicator';
|
|
10
12
|
import { SegmentGroupLabel, type SegmentGroupLabelProps } from './segment-group-label';
|
|
11
13
|
import { segmentGroupAnatomy } from './segment-group.anatomy';
|
|
12
14
|
import { SegmentLabel, type SegmentLabelProps } from './segment-label';
|
|
13
|
-
declare const SegmentGroup: ForwardRefExoticComponent<Omit<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
asChild?: boolean | undefined;
|
|
17
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "onChange" | "readOnly" | "orientation"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
18
|
-
defaultValue?: string | null | undefined;
|
|
19
|
-
} & RefAttributes<HTMLDivElement>> & {
|
|
20
|
-
Root: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
21
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
22
|
-
} & {
|
|
15
|
+
declare const SegmentGroup: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseSegmentGroupProps> & UseSegmentGroupProps & RefAttributes<HTMLDivElement>> & {
|
|
16
|
+
Root: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof UseSegmentGroupProps> & UseSegmentGroupProps & RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Label: ForwardRefExoticComponent<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
23
18
|
asChild?: boolean | undefined;
|
|
24
|
-
}, "ref">, "name" | "value" | "getRootNode" | "form" | "id" | "ids" | "disabled" | "defaultValue" | "dir" | "onChange" | "readOnly" | "orientation"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
25
|
-
defaultValue?: string | null | undefined;
|
|
26
|
-
} & RefAttributes<HTMLDivElement>>;
|
|
27
|
-
Label: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
28
|
-
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
29
|
-
} & {
|
|
30
|
-
asChild?: boolean | undefined;
|
|
31
|
-
}, "ref"> & RefAttributes<HTMLLabelElement>>;
|
|
32
|
-
Indicator: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
33
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
34
|
-
} & {
|
|
35
|
-
asChild?: boolean | undefined;
|
|
36
|
-
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
37
|
-
Segment: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
38
|
-
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
39
|
-
} & {
|
|
40
|
-
asChild?: boolean | undefined;
|
|
41
|
-
}, "ref">, keyof {
|
|
42
|
-
value: string;
|
|
43
|
-
disabled?: boolean | undefined;
|
|
44
|
-
readOnly?: boolean | undefined;
|
|
45
|
-
invalid?: boolean | undefined;
|
|
46
|
-
}> & {
|
|
47
|
-
value: string;
|
|
48
|
-
disabled?: boolean | undefined;
|
|
49
|
-
readOnly?: boolean | undefined;
|
|
50
|
-
invalid?: boolean | undefined;
|
|
51
19
|
} & RefAttributes<HTMLLabelElement>>;
|
|
52
|
-
|
|
53
|
-
ref?: RefObject<HTMLSpanElement> | ((instance: HTMLSpanElement | null) => void) | null | undefined;
|
|
54
|
-
} & {
|
|
20
|
+
Indicator: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
55
21
|
asChild?: boolean | undefined;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
22
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Segment: ForwardRefExoticComponent<Omit<HTMLArkProps<"label">, keyof RadioProps> & RadioProps & RefAttributes<HTMLLabelElement>>;
|
|
24
|
+
SegmentLabel: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
25
|
+
asChild?: boolean | undefined;
|
|
26
|
+
} & RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
SegmentControl: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
60
28
|
asChild?: boolean | undefined;
|
|
61
|
-
}
|
|
29
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
62
30
|
};
|
|
63
31
|
export { Segment, SegmentControl, SegmentGroup, SegmentGroupIndicator, SegmentGroupLabel, SegmentLabel, segmentGroupAnatomy, useSegmentContext, useSegmentGroupContext, };
|
|
64
|
-
export type { SegmentControlProps, SegmentGroupIndicatorProps, SegmentGroupLabelProps, SegmentGroupProps, SegmentLabelProps, SegmentProps, };
|
|
32
|
+
export type { SegmentContext, SegmentControlProps, SegmentGroupContext, SegmentGroupIndicatorProps, SegmentGroupLabelProps, SegmentGroupProps, SegmentLabelProps, SegmentProps, };
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { Provider } from 'react';
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
import { type connect } from '@zag-js/radio-group';
|
|
3
|
+
import { RadioProps, type connect } from '@zag-js/radio-group';
|
|
4
4
|
export type SegmentContext = Parameters<ReturnType<typeof connect>['getRadioProps']>[0];
|
|
5
|
-
export declare const SegmentProvider: Provider<
|
|
6
|
-
value: string;
|
|
7
|
-
disabled?: boolean | undefined;
|
|
8
|
-
readOnly?: boolean | undefined;
|
|
9
|
-
invalid?: boolean | undefined;
|
|
10
|
-
}>, useSegmentContext: () => {
|
|
11
|
-
value: string;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
|
-
readOnly?: boolean | undefined;
|
|
14
|
-
invalid?: boolean | undefined;
|
|
15
|
-
};
|
|
5
|
+
export declare const SegmentProvider: Provider<RadioProps>, useSegmentContext: () => RadioProps;
|
|
@@ -12,13 +12,10 @@ const segmentGroupContext = require('./segment-group-context.cjs');
|
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
14
|
const SegmentControl = react.forwardRef((props, ref) => {
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const mergedProps = react$1.mergeProps(getRadioControlProps(
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
19
|
-
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ...segmentGroup_anatomy.parts.radioControl.attrs, ref }),
|
|
20
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { ...getRadioHiddenInputProps(context) })
|
|
21
|
-
] });
|
|
15
|
+
const api = segmentGroupContext.useSegmentGroupContext();
|
|
16
|
+
const segmentProps = segmentContext.useSegmentContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.getRadioControlProps(segmentProps), props);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ...segmentGroup_anatomy.parts.radioControl.attrs, ref });
|
|
22
19
|
});
|
|
23
20
|
SegmentControl.displayName = "SegmentControl";
|
|
24
21
|
|
|
@@ -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 SegmentControlProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const SegmentControl: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { ark } from '../factory.mjs';
|
|
@@ -8,13 +8,10 @@ import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
9
9
|
|
|
10
10
|
const SegmentControl = forwardRef((props, ref) => {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const mergedProps = mergeProps(getRadioControlProps(
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */ jsx(ark.div, { ...mergedProps, ...parts.radioControl.attrs, ref }),
|
|
16
|
-
/* @__PURE__ */ jsx("input", { ...getRadioHiddenInputProps(context) })
|
|
17
|
-
] });
|
|
11
|
+
const api = useSegmentGroupContext();
|
|
12
|
+
const segmentProps = useSegmentContext();
|
|
13
|
+
const mergedProps = mergeProps(api.getRadioControlProps(segmentProps), props);
|
|
14
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ...parts.radioControl.attrs, ref });
|
|
18
15
|
});
|
|
19
16
|
SegmentControl.displayName = "SegmentControl";
|
|
20
17
|
|
|
@@ -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 SegmentGroupIndicatorProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const SegmentGroupIndicator: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|