@ark-ui/react 0.14.0 → 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 +20 -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 +36 -19
- package/index.d.ts +1 -0
- package/index.mjs +17 -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 +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-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
package/color-picker/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ColorAreaProps, ColorChannelInputProps, ColorChannelProps, ColorSwatchProps } from '@zag-js/color-picker';
|
|
2
|
-
import {
|
|
2
|
+
import { HTMLArkProps } from '..';
|
|
3
|
+
import { ForwardRefExoticComponent, RefAttributes, DetailedHTMLProps, HTMLAttributes, InputHTMLAttributes, ButtonHTMLAttributes } from 'react';
|
|
3
4
|
import { JSX } from 'react/jsx-runtime';
|
|
4
5
|
/// <reference types="react" />
|
|
5
6
|
import { type ColorPickerProps } from './color-picker';
|
|
@@ -21,66 +22,36 @@ import { ColorPickerSwatchGroup, type ColorPickerSwatchGroupProps } from './colo
|
|
|
21
22
|
import { colorPickerAnatomy } from './color-picker.anatomy';
|
|
22
23
|
declare const ColorPicker: ((props: ColorPickerProps) => JSX.Element) & {
|
|
23
24
|
Root: (props: ColorPickerProps) => JSX.Element;
|
|
24
|
-
Area: ForwardRefExoticComponent<Omit<
|
|
25
|
-
|
|
26
|
-
} & {
|
|
25
|
+
Area: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof ColorAreaProps> & ColorAreaProps & RefAttributes<HTMLDivElement>>;
|
|
26
|
+
AreaGradient: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
27
27
|
asChild?: boolean | undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
31
|
-
} & {
|
|
28
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
29
|
+
AreaThumb: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
32
30
|
asChild?: boolean | undefined;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
36
|
-
} & {
|
|
31
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
32
|
+
ChannelInput: ForwardRefExoticComponent<Omit<ColorChannelInputProps, "key" | keyof InputHTMLAttributes<HTMLInputElement> | "asChild"> & Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
37
33
|
asChild?: boolean | undefined;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
|
|
41
|
-
} & {
|
|
34
|
+
} & RefAttributes<HTMLInputElement>>;
|
|
35
|
+
ChannelSliderBackground: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
42
36
|
asChild?: boolean | undefined;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
46
|
-
} & {
|
|
37
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
38
|
+
ChannelSliderThumb: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
47
39
|
asChild?: boolean | undefined;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
} & {
|
|
40
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
41
|
+
ChannelSliderTrack: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, keyof ColorChannelProps> & ColorChannelProps & RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Content: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
52
43
|
asChild?: boolean | undefined;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
56
|
-
} & {
|
|
44
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
45
|
+
EyeDropperTrigger: ForwardRefExoticComponent<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
57
46
|
asChild?: boolean | undefined;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
} & {
|
|
47
|
+
} & RefAttributes<HTMLButtonElement>>;
|
|
48
|
+
Swatch: ForwardRefExoticComponent<Omit<HTMLArkProps<"button">, keyof ColorSwatchProps> & ColorSwatchProps & RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
SwatchBackground: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
62
50
|
asChild?: boolean | undefined;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
66
|
-
} & {
|
|
51
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
52
|
+
SwatchGroup: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
67
53
|
asChild?: boolean | undefined;
|
|
68
|
-
}
|
|
69
|
-
Swatch: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
70
|
-
ref?: ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement> | null | undefined;
|
|
71
|
-
} & {
|
|
72
|
-
asChild?: boolean | undefined;
|
|
73
|
-
}, "ref">, keyof ColorSwatchProps> & ColorSwatchProps & RefAttributes<HTMLButtonElement>>;
|
|
74
|
-
SwatchBackground: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
75
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
76
|
-
} & {
|
|
77
|
-
asChild?: boolean | undefined;
|
|
78
|
-
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
79
|
-
SwatchGroup: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
80
|
-
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
81
|
-
} & {
|
|
82
|
-
asChild?: boolean | undefined;
|
|
83
|
-
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
54
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
84
55
|
};
|
|
85
56
|
export { ColorPicker, ColorPickerArea, ColorPickerAreaGradient, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSliderBackground, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerEyeDropperTrigger, ColorPickerSwatch, ColorPickerSwatchBackground, ColorPickerSwatchGroup, colorPickerAnatomy, useColorPickerAreaContext, useColorPickerContext, useColorPickerSwatchContext, };
|
|
86
57
|
export type { ColorPickerAreaGradientProps, ColorPickerAreaProps, ColorPickerAreaThumbProps, ColorPickerChannelInputProps, ColorPickerChannelSliderBackgroundProps, ColorPickerChannelSliderThumbProps, ColorPickerChannelSliderTrackProps, ColorPickerContentProps, ColorPickerEyeDropperTriggerProps, ColorPickerProps, ColorPickerSwatchBackgroundProps, ColorPickerSwatchGroupProps, ColorPickerSwatchProps, };
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6
6
|
const colorPicker = require('@zag-js/color-picker');
|
|
7
7
|
const react$1 = require('@zag-js/react');
|
|
8
8
|
const react = require('react');
|
|
9
|
-
const reactDom = require('react-dom');
|
|
10
9
|
require('../environment/index.cjs');
|
|
10
|
+
const useEvent = require('../use-event.cjs');
|
|
11
11
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
12
12
|
|
|
13
13
|
function _interopNamespaceDefault(e) {
|
|
@@ -37,15 +37,10 @@ const useColorPicker = (props) => {
|
|
|
37
37
|
...props,
|
|
38
38
|
value: props.defaultValue ?? props.value
|
|
39
39
|
};
|
|
40
|
-
const onChange = props.onChange;
|
|
41
|
-
const onChangeWithFlushSync = react.useCallback(
|
|
42
|
-
(e) => reactDom.flushSync(() => onChange?.(e)),
|
|
43
|
-
[onChange]
|
|
44
|
-
);
|
|
45
40
|
const context = {
|
|
46
41
|
...initialContext,
|
|
47
42
|
value: props.value,
|
|
48
|
-
onChange:
|
|
43
|
+
onChange: useEvent.useEvent(props.onChange, { sync: true })
|
|
49
44
|
};
|
|
50
45
|
const [state, send] = react$1.useMachine(colorPicker__namespace.machine(initialContext), { context });
|
|
51
46
|
return colorPicker__namespace.connect(state, send, react$1.normalizeProps);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as colorPicker from '@zag-js/color-picker';
|
|
2
2
|
import type { Optional } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export interface UseColorPickerProps extends Optional<colorPicker.Context, 'id'> {
|
|
4
4
|
defaultValue?: colorPicker.Context['value'];
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
6
|
export type UseColorPickerReturn = colorPicker.Api;
|
|
7
7
|
export declare const useColorPicker: (props: UseColorPickerProps) => UseColorPickerReturn;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as colorPicker from '@zag-js/color-picker';
|
|
3
3
|
import { useMachine, normalizeProps } from '@zag-js/react';
|
|
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 useColorPicker = (props) => {
|
|
@@ -14,15 +14,10 @@ const useColorPicker = (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(colorPicker.machine(initialContext), { context });
|
|
28
23
|
return colorPicker.connect(state, send, normalizeProps);
|
|
@@ -11,8 +11,8 @@ const comboboxContext = require('./combobox-context.cjs');
|
|
|
11
11
|
|
|
12
12
|
const ComboboxClearTrigger = react.forwardRef(
|
|
13
13
|
(props, ref) => {
|
|
14
|
-
const
|
|
15
|
-
const mergedProps = react$1.mergeProps(clearTriggerProps, props);
|
|
14
|
+
const api = comboboxContext.useComboboxContext();
|
|
15
|
+
const mergedProps = react$1.mergeProps(api.clearTriggerProps, props);
|
|
16
16
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.button, { ...mergedProps, ref });
|
|
17
17
|
}
|
|
18
18
|
);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, ButtonHTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type ComboboxClearTriggerProps = HTMLArkProps<'button'>;
|
|
5
|
+
export declare const ComboboxClearTrigger: ForwardRefExoticComponent<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLButtonElement>>;
|
|
@@ -7,8 +7,8 @@ import { useComboboxContext } from './combobox-context.mjs';
|
|
|
7
7
|
|
|
8
8
|
const ComboboxClearTrigger = forwardRef(
|
|
9
9
|
(props, ref) => {
|
|
10
|
-
const
|
|
11
|
-
const mergedProps = mergeProps(clearTriggerProps, props);
|
|
10
|
+
const api = useComboboxContext();
|
|
11
|
+
const mergedProps = mergeProps(api.clearTriggerProps, props);
|
|
12
12
|
return /* @__PURE__ */ jsx(ark.button, { ...mergedProps, ref });
|
|
13
13
|
}
|
|
14
14
|
);
|
|
@@ -7,23 +7,22 @@ const jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
const react$1 = require('@zag-js/react');
|
|
8
8
|
const react = require('react');
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
|
-
require('../presence/index.cjs');
|
|
10
|
+
const index = require('../presence/index.cjs');
|
|
11
11
|
const comboboxContext = require('./combobox-context.cjs');
|
|
12
|
-
const comboboxPresence = require('./combobox-presence.cjs');
|
|
13
12
|
const splitPresenceProps = require('../presence/split-presence-props.cjs');
|
|
14
13
|
|
|
15
14
|
const ComboboxContent = react.forwardRef((props, ref) => {
|
|
16
|
-
const [presenceProps,
|
|
17
|
-
|
|
15
|
+
const [presenceProps, localProps] = splitPresenceProps.splitPresenceProps(props);
|
|
16
|
+
const api = comboboxContext.useComboboxContext();
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.Presence, { present: api.isOpen, ...presenceProps, children: /* @__PURE__ */ jsxRuntime.jsx(ComboboxInnerContent, { ref, ...localProps }) });
|
|
18
18
|
});
|
|
19
19
|
ComboboxContent.displayName = "ComboboxContent";
|
|
20
|
-
const
|
|
21
|
-
(props, ref)
|
|
22
|
-
const
|
|
23
|
-
const mergedProps = react$1.mergeProps(contentProps, props);
|
|
20
|
+
const ComboboxInnerContent = react.forwardRef(
|
|
21
|
+
function ComboboxInnerContent2(props, ref) {
|
|
22
|
+
const api = comboboxContext.useComboboxContext();
|
|
23
|
+
const mergedProps = react$1.mergeProps(api.contentProps, props);
|
|
24
24
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
|
-
InnerComboboxContent.displayName = "InnerComboboxContent";
|
|
28
27
|
|
|
29
28
|
exports.ComboboxContent = ComboboxContent;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import { type
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
} & {
|
|
9
|
-
asChild?: boolean | undefined;
|
|
10
|
-
}, "ref"> & Omit<PresenceProps, "children"> & RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import { type PresenceProps } from '../presence';
|
|
5
|
+
import type { Assign } from '../types';
|
|
6
|
+
export type ComboboxContentProps = Assign<HTMLArkProps<'div'>, Omit<PresenceProps, 'children'>>;
|
|
7
|
+
export declare const ComboboxContent: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "present" | "onExitComplete" | "lazyMount" | "unmountOnExit"> & Omit<PresenceProps, "children"> & RefAttributes<HTMLDivElement>>;
|
|
@@ -3,23 +3,22 @@ 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';
|
|
6
|
-
import '../presence/index.mjs';
|
|
6
|
+
import { Presence } from '../presence/index.mjs';
|
|
7
7
|
import { useComboboxContext } from './combobox-context.mjs';
|
|
8
|
-
import { ComboboxPresence } from './combobox-presence.mjs';
|
|
9
8
|
import { splitPresenceProps } from '../presence/split-presence-props.mjs';
|
|
10
9
|
|
|
11
10
|
const ComboboxContent = forwardRef((props, ref) => {
|
|
12
|
-
const [presenceProps,
|
|
13
|
-
|
|
11
|
+
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
12
|
+
const api = useComboboxContext();
|
|
13
|
+
return /* @__PURE__ */ jsx(Presence, { present: api.isOpen, ...presenceProps, children: /* @__PURE__ */ jsx(ComboboxInnerContent, { ref, ...localProps }) });
|
|
14
14
|
});
|
|
15
15
|
ComboboxContent.displayName = "ComboboxContent";
|
|
16
|
-
const
|
|
17
|
-
(props, ref)
|
|
18
|
-
const
|
|
19
|
-
const mergedProps = mergeProps(contentProps, props);
|
|
16
|
+
const ComboboxInnerContent = forwardRef(
|
|
17
|
+
function ComboboxInnerContent2(props, ref) {
|
|
18
|
+
const api = useComboboxContext();
|
|
19
|
+
const mergedProps = mergeProps(api.contentProps, props);
|
|
20
20
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
|
-
InnerComboboxContent.displayName = "InnerComboboxContent";
|
|
24
23
|
|
|
25
24
|
export { ComboboxContent };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Provider } from 'react';
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
+
import type { CollectionItem } from '../types';
|
|
3
4
|
import { type UseComboboxReturn } from './use-combobox';
|
|
4
|
-
export type ComboboxContext = UseComboboxReturn
|
|
5
|
-
export declare const ComboboxProvider: Provider<
|
|
5
|
+
export type ComboboxContext<T extends CollectionItem> = UseComboboxReturn<T>;
|
|
6
|
+
export declare const ComboboxProvider: Provider<ComboboxContext<any>>, useComboboxContext: () => ComboboxContext<any>;
|
|
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const comboboxContext = require('./combobox-context.cjs');
|
|
11
11
|
|
|
12
12
|
const ComboboxControl = react.forwardRef((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
const mergedProps = react$1.mergeProps(controlProps, props);
|
|
13
|
+
const api = comboboxContext.useComboboxContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(api.controlProps, props);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
ComboboxControl.displayName = "ComboboxControl";
|
|
@@ -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 ComboboxControlProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const ComboboxControl: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useComboboxContext } from './combobox-context.mjs';
|
|
7
7
|
|
|
8
8
|
const ComboboxControl = forwardRef((props, ref) => {
|
|
9
|
-
const
|
|
10
|
-
const mergedProps = mergeProps(controlProps, props);
|
|
9
|
+
const api = useComboboxContext();
|
|
10
|
+
const mergedProps = mergeProps(api.controlProps, props);
|
|
11
11
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
ComboboxControl.displayName = "ComboboxControl";
|
|
@@ -10,8 +10,8 @@ const factory = require('../factory.cjs');
|
|
|
10
10
|
const comboboxContext = require('./combobox-context.cjs');
|
|
11
11
|
|
|
12
12
|
const ComboboxInput = react.forwardRef((props, ref) => {
|
|
13
|
-
const
|
|
14
|
-
const mergedProps = react$1.mergeProps(inputProps, props);
|
|
13
|
+
const api = comboboxContext.useComboboxContext();
|
|
14
|
+
const mergedProps = react$1.mergeProps(api.inputProps, props);
|
|
15
15
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ref });
|
|
16
16
|
});
|
|
17
17
|
ComboboxInput.displayName = "ComboboxInput";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
} & {
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type ComboboxInputProps = HTMLArkProps<'input'>;
|
|
5
|
+
export declare const ComboboxInput: ForwardRefExoticComponent<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
7
6
|
asChild?: boolean | undefined;
|
|
8
|
-
}
|
|
7
|
+
} & RefAttributes<HTMLInputElement>>;
|
|
@@ -6,8 +6,8 @@ import { ark } from '../factory.mjs';
|
|
|
6
6
|
import { useComboboxContext } from './combobox-context.mjs';
|
|
7
7
|
|
|
8
8
|
const ComboboxInput = forwardRef((props, ref) => {
|
|
9
|
-
const
|
|
10
|
-
const mergedProps = mergeProps(inputProps, props);
|
|
9
|
+
const api = useComboboxContext();
|
|
10
|
+
const mergedProps = mergeProps(api.inputProps, props);
|
|
11
11
|
return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ref });
|
|
12
12
|
});
|
|
13
13
|
ComboboxInput.displayName = "ComboboxInput";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const createContext = require('../create-context.cjs');
|
|
7
|
+
|
|
8
|
+
const [ComboboxItemProvider, useComboboxItemContext] = createContext.createContext({
|
|
9
|
+
name: "ComboboxItemContext",
|
|
10
|
+
hookName: "useComboboxItemContext",
|
|
11
|
+
providerName: "<ComboboxItemProvider />"
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports.ComboboxItemProvider = ComboboxItemProvider;
|
|
15
|
+
exports.useComboboxItemContext = useComboboxItemContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Provider } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import type { ItemProps } from '@zag-js/combobox';
|
|
4
|
+
export type ComboboxItemContext = ItemProps;
|
|
5
|
+
export declare const ComboboxItemProvider: Provider<ItemProps>, useComboboxItemContext: () => ItemProps;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { createContext } from '../create-context.mjs';
|
|
3
|
+
|
|
4
|
+
const [ComboboxItemProvider, useComboboxItemContext] = createContext({
|
|
5
|
+
name: "ComboboxItemContext",
|
|
6
|
+
hookName: "useComboboxItemContext",
|
|
7
|
+
providerName: "<ComboboxItemProvider />"
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export { ComboboxItemProvider, useComboboxItemContext };
|
|
@@ -10,14 +10,14 @@ const createSplitProps = require('../create-split-props.cjs');
|
|
|
10
10
|
const factory = require('../factory.cjs');
|
|
11
11
|
const comboboxContext = require('./combobox-context.cjs');
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const ComboboxItemGroupLabel = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
|
-
const [optionProps, localProps] = createSplitProps.createSplitProps()(props, ["
|
|
16
|
-
const
|
|
17
|
-
const mergedProps = react$1.mergeProps(
|
|
15
|
+
const [optionProps, localProps] = createSplitProps.createSplitProps()(props, ["htmlFor"]);
|
|
16
|
+
const api = comboboxContext.useComboboxContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.getItemGroupLabelProps(optionProps), localProps);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
|
|
21
|
+
ComboboxItemGroupLabel.displayName = "ComboboxItemGroupLabel";
|
|
22
22
|
|
|
23
|
-
exports.
|
|
23
|
+
exports.ComboboxItemGroupLabel = ComboboxItemGroupLabel;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import type { ItemGroupLabelProps } from '@zag-js/combobox';
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
5
|
+
import { type Assign } from '../types';
|
|
6
|
+
export type ComboboxItemGroupLabelProps = Assign<HTMLArkProps<'div'>, ItemGroupLabelProps>;
|
|
7
|
+
export declare const ComboboxItemGroupLabel: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "htmlFor"> & ItemGroupLabelProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -6,14 +6,14 @@ import { createSplitProps } from '../create-split-props.mjs';
|
|
|
6
6
|
import { ark } from '../factory.mjs';
|
|
7
7
|
import { useComboboxContext } from './combobox-context.mjs';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const ComboboxItemGroupLabel = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
|
-
const [optionProps, localProps] = createSplitProps()(props, ["
|
|
12
|
-
const
|
|
13
|
-
const mergedProps = mergeProps(
|
|
11
|
+
const [optionProps, localProps] = createSplitProps()(props, ["htmlFor"]);
|
|
12
|
+
const api = useComboboxContext();
|
|
13
|
+
const mergedProps = mergeProps(api.getItemGroupLabelProps(optionProps), localProps);
|
|
14
14
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
|
-
|
|
17
|
+
ComboboxItemGroupLabel.displayName = "ComboboxItemGroupLabel";
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { ComboboxItemGroupLabel };
|
|
@@ -10,14 +10,14 @@ const createSplitProps = require('../create-split-props.cjs');
|
|
|
10
10
|
const factory = require('../factory.cjs');
|
|
11
11
|
const comboboxContext = require('./combobox-context.cjs');
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const ComboboxItemGroup = react.forwardRef(
|
|
14
14
|
(props, ref) => {
|
|
15
|
-
const [
|
|
16
|
-
const
|
|
17
|
-
const mergedProps = react$1.mergeProps(
|
|
15
|
+
const [itemProps, localProps] = createSplitProps.createSplitProps()(props, ["id"]);
|
|
16
|
+
const api = comboboxContext.useComboboxContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.getItemGroupProps(itemProps), localProps);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
|
-
|
|
21
|
+
ComboboxItemGroup.displayName = "ComboboxItemGroup";
|
|
22
22
|
|
|
23
|
-
exports.
|
|
23
|
+
exports.ComboboxItemGroup = ComboboxItemGroup;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import type { ItemGroupProps } from '@zag-js/combobox';
|
|
4
|
+
import { type HTMLArkProps } from '../factory';
|
|
5
|
+
import type { Assign } from '../types';
|
|
6
|
+
export type ComboboxItemGroupProps = Assign<HTMLArkProps<'div'>, ItemGroupProps>;
|
|
7
|
+
export declare const ComboboxItemGroup: ForwardRefExoticComponent<Omit<HTMLArkProps<"div">, "id"> & ItemGroupProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -6,14 +6,14 @@ import { createSplitProps } from '../create-split-props.mjs';
|
|
|
6
6
|
import { ark } from '../factory.mjs';
|
|
7
7
|
import { useComboboxContext } from './combobox-context.mjs';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const ComboboxItemGroup = forwardRef(
|
|
10
10
|
(props, ref) => {
|
|
11
|
-
const [
|
|
12
|
-
const
|
|
13
|
-
const mergedProps = mergeProps(
|
|
11
|
+
const [itemProps, localProps] = createSplitProps()(props, ["id"]);
|
|
12
|
+
const api = useComboboxContext();
|
|
13
|
+
const mergedProps = mergeProps(api.getItemGroupProps(itemProps), localProps);
|
|
14
14
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
|
-
|
|
17
|
+
ComboboxItemGroup.displayName = "ComboboxItemGroup";
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { ComboboxItemGroup };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const comboboxContext = require('./combobox-context.cjs');
|
|
11
|
+
const comboboxItemContext = require('./combobox-item-context.cjs');
|
|
12
|
+
|
|
13
|
+
const ComboboxItemIndicator = react.forwardRef(
|
|
14
|
+
(props, ref) => {
|
|
15
|
+
const api = comboboxContext.useComboboxContext();
|
|
16
|
+
const item = comboboxItemContext.useComboboxItemContext();
|
|
17
|
+
const mergedProps = react$1.mergeProps(api.getItemIndicatorProps(item), props);
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ref });
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
ComboboxItemIndicator.displayName = "ComboboxItemIndicator";
|
|
22
|
+
|
|
23
|
+
exports.ComboboxItemIndicator = ComboboxItemIndicator;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type ComboboxItemIndicatorProps = HTMLArkProps<'div'>;
|
|
5
|
+
export declare const ComboboxItemIndicator: ForwardRefExoticComponent<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
6
|
+
asChild?: boolean | undefined;
|
|
7
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { ark } from '../factory.mjs';
|
|
6
|
+
import { useComboboxContext } from './combobox-context.mjs';
|
|
7
|
+
import { useComboboxItemContext } from './combobox-item-context.mjs';
|
|
8
|
+
|
|
9
|
+
const ComboboxItemIndicator = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const api = useComboboxContext();
|
|
12
|
+
const item = useComboboxItemContext();
|
|
13
|
+
const mergedProps = mergeProps(api.getItemIndicatorProps(item), props);
|
|
14
|
+
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ref });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
ComboboxItemIndicator.displayName = "ComboboxItemIndicator";
|
|
18
|
+
|
|
19
|
+
export { ComboboxItemIndicator };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const comboboxContext = require('./combobox-context.cjs');
|
|
11
|
+
const comboboxItemContext = require('./combobox-item-context.cjs');
|
|
12
|
+
|
|
13
|
+
const ComboboxItemText = react.forwardRef((props, ref) => {
|
|
14
|
+
const api = comboboxContext.useComboboxContext();
|
|
15
|
+
const itemProps = comboboxItemContext.useComboboxItemContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(api.getItemTextProps(itemProps), props);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref });
|
|
18
|
+
});
|
|
19
|
+
ComboboxItemText.displayName = "ComboboxItemText";
|
|
20
|
+
|
|
21
|
+
exports.ComboboxItemText = ComboboxItemText;
|