@ark-ui/react 0.10.0-beta.0 → 0.10.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 +16 -2
- package/accordion/accordion-content.cjs +16 -12
- package/accordion/accordion-content.d.ts +9 -5
- package/accordion/accordion-content.mjs +15 -11
- package/accordion/accordion-item.cjs +5 -4
- package/accordion/accordion-item.d.ts +10 -4
- package/accordion/accordion-item.mjs +2 -1
- package/accordion/accordion-trigger.cjs +11 -8
- package/accordion/accordion-trigger.d.ts +8 -5
- package/accordion/accordion-trigger.mjs +10 -7
- package/accordion/accordion.cjs +5 -4
- package/accordion/accordion.d.ts +11 -4
- package/accordion/accordion.mjs +2 -1
- package/accordion/use-accordion.cjs +5 -5
- package/avatar/avatar-fallback.cjs +5 -4
- package/avatar/avatar-fallback.d.ts +8 -5
- package/avatar/avatar-fallback.mjs +2 -1
- package/avatar/avatar-image.cjs +5 -4
- package/avatar/avatar-image.d.ts +8 -5
- package/avatar/avatar-image.mjs +2 -1
- package/avatar/avatar.cjs +5 -4
- package/avatar/avatar.d.ts +9 -4
- package/avatar/avatar.mjs +2 -1
- package/avatar/use-avatar.cjs +5 -5
- package/carousel/carousel-control.cjs +3 -2
- package/carousel/carousel-control.d.ts +8 -5
- package/carousel/carousel-control.mjs +2 -1
- package/carousel/carousel-indicator-group.cjs +10 -7
- package/carousel/carousel-indicator-group.d.ts +8 -5
- package/carousel/carousel-indicator-group.mjs +9 -6
- package/carousel/carousel-indicator.cjs +14 -11
- package/carousel/carousel-indicator.d.ts +8 -4
- package/carousel/carousel-indicator.mjs +13 -10
- package/carousel/carousel-next-slide-trigger.cjs +5 -4
- package/carousel/carousel-next-slide-trigger.d.ts +8 -5
- package/carousel/carousel-next-slide-trigger.mjs +2 -1
- package/carousel/carousel-prev-slide-trigger.cjs +5 -4
- package/carousel/carousel-prev-slide-trigger.d.ts +8 -5
- package/carousel/carousel-prev-slide-trigger.mjs +2 -1
- package/carousel/carousel-slide-group.cjs +10 -7
- package/carousel/carousel-slide-group.d.ts +8 -5
- package/carousel/carousel-slide-group.mjs +9 -6
- package/carousel/carousel-slide.cjs +5 -4
- package/carousel/carousel-slide.d.ts +8 -4
- package/carousel/carousel-slide.mjs +2 -1
- package/carousel/carousel-viewport.cjs +5 -4
- package/carousel/carousel-viewport.d.ts +8 -5
- package/carousel/carousel-viewport.mjs +2 -1
- package/carousel/carousel.cjs +5 -5
- package/carousel/carousel.d.ts +11 -4
- package/carousel/carousel.mjs +2 -2
- package/carousel/use-carousel.cjs +5 -5
- package/checkbox/checkbox-control.cjs +5 -4
- package/checkbox/checkbox-control.d.ts +8 -5
- package/checkbox/checkbox-control.mjs +2 -1
- package/checkbox/checkbox-input.cjs +5 -4
- package/checkbox/checkbox-input.d.ts +8 -5
- package/checkbox/checkbox-input.mjs +2 -1
- package/checkbox/checkbox-label.cjs +5 -4
- package/checkbox/checkbox-label.d.ts +8 -5
- package/checkbox/checkbox-label.mjs +2 -1
- package/checkbox/checkbox.cjs +5 -5
- package/checkbox/checkbox.d.ts +11 -7
- package/checkbox/checkbox.mjs +2 -2
- package/checkbox/use-checkbox.cjs +5 -5
- package/color-picker/color-picker-area-gradient.cjs +11 -8
- package/color-picker/color-picker-area-gradient.d.ts +8 -5
- package/color-picker/color-picker-area-gradient.mjs +10 -7
- package/color-picker/color-picker-area-thumb.cjs +11 -8
- package/color-picker/color-picker-area-thumb.d.ts +8 -5
- package/color-picker/color-picker-area-thumb.mjs +10 -7
- package/color-picker/color-picker-area.cjs +5 -4
- package/color-picker/color-picker-area.d.ts +8 -4
- package/color-picker/color-picker-area.mjs +2 -1
- package/color-picker/color-picker-channel-input.cjs +14 -11
- package/color-picker/color-picker-channel-input.d.ts +8 -4
- package/color-picker/color-picker-channel-input.mjs +13 -10
- package/color-picker/color-picker-channel-slider-background.cjs +5 -4
- package/color-picker/color-picker-channel-slider-background.d.ts +8 -5
- package/color-picker/color-picker-channel-slider-background.mjs +2 -1
- package/color-picker/color-picker-channel-slider-thumb.cjs +5 -4
- package/color-picker/color-picker-channel-slider-thumb.d.ts +8 -5
- package/color-picker/color-picker-channel-slider-thumb.mjs +2 -1
- package/color-picker/color-picker-channel-slider-track.cjs +5 -4
- package/color-picker/color-picker-channel-slider-track.d.ts +8 -4
- package/color-picker/color-picker-channel-slider-track.mjs +2 -1
- package/color-picker/color-picker-content.cjs +10 -7
- package/color-picker/color-picker-content.d.ts +8 -5
- package/color-picker/color-picker-content.mjs +9 -6
- package/color-picker/color-picker-eye-dropper-trigger.cjs +5 -4
- package/color-picker/color-picker-eye-dropper-trigger.d.ts +8 -5
- package/color-picker/color-picker-eye-dropper-trigger.mjs +2 -1
- package/color-picker/color-picker-swatch-background.cjs +5 -4
- package/color-picker/color-picker-swatch-background.d.ts +8 -5
- package/color-picker/color-picker-swatch-background.mjs +2 -1
- package/color-picker/color-picker-swatch-group.cjs +5 -2
- package/color-picker/color-picker-swatch-group.d.ts +8 -5
- package/color-picker/color-picker-swatch-group.mjs +5 -2
- package/color-picker/color-picker-swatch.cjs +14 -11
- package/color-picker/color-picker-swatch.d.ts +8 -4
- package/color-picker/color-picker-swatch.mjs +13 -10
- package/color-picker/use-color-picker.cjs +6 -6
- package/combobox/combobox-content.cjs +12 -8
- package/combobox/combobox-content.d.ts +9 -5
- package/combobox/combobox-content.mjs +10 -6
- package/combobox/combobox-control.cjs +5 -4
- package/combobox/combobox-control.d.ts +8 -5
- package/combobox/combobox-control.mjs +2 -1
- package/combobox/combobox-input.cjs +5 -4
- package/combobox/combobox-input.d.ts +8 -5
- package/combobox/combobox-input.mjs +2 -1
- package/combobox/combobox-label.cjs +5 -4
- package/combobox/combobox-label.d.ts +8 -5
- package/combobox/combobox-label.mjs +2 -1
- package/combobox/combobox-option.cjs +5 -4
- package/combobox/combobox-option.d.ts +13 -5
- package/combobox/combobox-option.mjs +2 -1
- package/combobox/combobox-positioner.cjs +10 -7
- package/combobox/combobox-positioner.d.ts +8 -5
- package/combobox/combobox-positioner.mjs +9 -6
- package/combobox/combobox-trigger.cjs +5 -4
- package/combobox/combobox-trigger.d.ts +8 -5
- package/combobox/combobox-trigger.mjs +2 -1
- package/combobox/combobox.cjs +5 -4
- package/combobox/combobox.d.ts +11 -4
- package/combobox/combobox.mjs +2 -1
- package/combobox/use-combobox.cjs +5 -5
- package/create-context.cjs +3 -3
- package/date-picker/date-picker-clear-trigger.cjs +10 -7
- package/date-picker/date-picker-clear-trigger.d.ts +8 -5
- package/date-picker/date-picker-clear-trigger.mjs +9 -6
- package/date-picker/date-picker-column-header.cjs +7 -4
- package/date-picker/date-picker-column-header.d.ts +8 -5
- package/date-picker/date-picker-column-header.mjs +7 -4
- package/date-picker/date-picker-content.cjs +10 -7
- package/date-picker/date-picker-content.d.ts +8 -5
- package/date-picker/date-picker-content.mjs +9 -6
- package/date-picker/date-picker-control.cjs +10 -7
- package/date-picker/date-picker-control.d.ts +8 -5
- package/date-picker/date-picker-control.mjs +9 -6
- package/date-picker/date-picker-day-cell-trigger.cjs +5 -4
- package/date-picker/date-picker-day-cell-trigger.d.ts +8 -5
- package/date-picker/date-picker-day-cell-trigger.mjs +2 -1
- package/date-picker/date-picker-day-cell.cjs +15 -12
- package/date-picker/date-picker-day-cell.d.ts +8 -4
- package/date-picker/date-picker-day-cell.mjs +14 -11
- package/date-picker/date-picker-grid.cjs +5 -5
- package/date-picker/date-picker-grid.d.ts +8 -4
- package/date-picker/date-picker-grid.mjs +2 -2
- package/date-picker/date-picker-input.cjs +5 -4
- package/date-picker/date-picker-input.d.ts +8 -5
- package/date-picker/date-picker-input.mjs +2 -1
- package/date-picker/date-picker-month-cell-trigger.cjs +5 -4
- package/date-picker/date-picker-month-cell-trigger.d.ts +8 -5
- package/date-picker/date-picker-month-cell-trigger.mjs +2 -1
- package/date-picker/date-picker-month-cell.cjs +11 -8
- package/date-picker/date-picker-month-cell.d.ts +8 -4
- package/date-picker/date-picker-month-cell.mjs +10 -7
- package/date-picker/date-picker-month-select.cjs +5 -4
- package/date-picker/date-picker-month-select.d.ts +8 -5
- package/date-picker/date-picker-month-select.mjs +2 -1
- package/date-picker/date-picker-next-trigger.cjs +10 -7
- package/date-picker/date-picker-next-trigger.d.ts +8 -5
- package/date-picker/date-picker-next-trigger.mjs +9 -6
- package/date-picker/date-picker-prev-trigger.cjs +10 -7
- package/date-picker/date-picker-prev-trigger.d.ts +8 -4
- package/date-picker/date-picker-prev-trigger.mjs +9 -6
- package/date-picker/date-picker-row-group.cjs +5 -2
- package/date-picker/date-picker-row-group.d.ts +8 -5
- package/date-picker/date-picker-row-group.mjs +5 -2
- package/date-picker/date-picker-row-header.cjs +10 -7
- package/date-picker/date-picker-row-header.d.ts +8 -5
- package/date-picker/date-picker-row-header.mjs +9 -6
- package/date-picker/date-picker-row.cjs +3 -2
- package/date-picker/date-picker-row.d.ts +8 -5
- package/date-picker/date-picker-row.mjs +2 -1
- package/date-picker/date-picker-trigger.cjs +10 -7
- package/date-picker/date-picker-trigger.d.ts +8 -5
- package/date-picker/date-picker-trigger.mjs +9 -6
- package/date-picker/date-picker-view-trigger.cjs +14 -8
- package/date-picker/date-picker-view-trigger.d.ts +8 -4
- package/date-picker/date-picker-view-trigger.mjs +13 -7
- package/date-picker/date-picker-year-cell-trigger.cjs +5 -4
- package/date-picker/date-picker-year-cell-trigger.d.ts +8 -5
- package/date-picker/date-picker-year-cell-trigger.mjs +2 -1
- package/date-picker/date-picker-year-cell.cjs +11 -8
- package/date-picker/date-picker-year-cell.d.ts +8 -4
- package/date-picker/date-picker-year-cell.mjs +10 -7
- package/date-picker/date-picker-year-select.cjs +10 -7
- package/date-picker/date-picker-year-select.d.ts +8 -5
- package/date-picker/date-picker-year-select.mjs +9 -6
- package/date-picker/date-picker.anatomy.d.ts +2 -2
- package/date-picker/use-date-picker.cjs +5 -5
- package/dialog/dialog-backdrop.cjs +7 -5
- package/dialog/dialog-backdrop.d.ts +9 -5
- package/dialog/dialog-backdrop.mjs +3 -1
- package/dialog/dialog-close-trigger.cjs +10 -7
- package/dialog/dialog-close-trigger.d.ts +8 -5
- package/dialog/dialog-close-trigger.mjs +9 -6
- package/dialog/dialog-container.cjs +5 -4
- package/dialog/dialog-container.d.ts +8 -5
- package/dialog/dialog-container.mjs +2 -1
- package/dialog/dialog-content.cjs +12 -8
- package/dialog/dialog-content.d.ts +9 -5
- package/dialog/dialog-content.mjs +10 -6
- package/dialog/dialog-description.cjs +10 -7
- package/dialog/dialog-description.d.ts +8 -5
- package/dialog/dialog-description.mjs +9 -6
- package/dialog/dialog-title.cjs +5 -4
- package/dialog/dialog-title.d.ts +8 -5
- package/dialog/dialog-title.mjs +2 -1
- package/dialog/dialog-trigger.cjs +5 -4
- package/dialog/dialog-trigger.d.ts +8 -5
- package/dialog/dialog-trigger.mjs +2 -1
- package/dialog/use-dialog.cjs +5 -5
- package/editable/editable-area.cjs +5 -4
- package/editable/editable-area.d.ts +8 -5
- package/editable/editable-area.mjs +2 -1
- package/editable/editable-cancel-trigger.cjs +10 -8
- package/editable/editable-cancel-trigger.d.ts +8 -7
- package/editable/editable-cancel-trigger.mjs +9 -7
- package/editable/editable-control.cjs +5 -4
- package/editable/editable-control.d.ts +8 -5
- package/editable/editable-control.mjs +2 -1
- package/editable/editable-edit-trigger.cjs +10 -8
- package/editable/editable-edit-trigger.d.ts +8 -7
- package/editable/editable-edit-trigger.mjs +9 -7
- package/editable/editable-input.cjs +5 -4
- package/editable/editable-input.d.ts +8 -5
- package/editable/editable-input.mjs +2 -1
- package/editable/editable-label.cjs +5 -4
- package/editable/editable-label.d.ts +8 -5
- package/editable/editable-label.mjs +2 -1
- package/editable/editable-preview.cjs +5 -4
- package/editable/editable-preview.d.ts +8 -5
- package/editable/editable-preview.mjs +2 -1
- package/editable/editable-submit-trigger.cjs +10 -8
- package/editable/editable-submit-trigger.d.ts +8 -7
- package/editable/editable-submit-trigger.mjs +9 -7
- package/editable/editable.cjs +5 -5
- package/editable/editable.d.ts +13 -4
- package/editable/editable.mjs +2 -2
- package/editable/use-editable.cjs +5 -5
- package/environment/environment.cjs +3 -3
- package/factory.cjs +6 -6
- package/factory.d.ts +4 -10
- package/hover-card/hover-card-arrow-tip.cjs +10 -7
- package/hover-card/hover-card-arrow-tip.d.ts +8 -5
- package/hover-card/hover-card-arrow-tip.mjs +9 -6
- package/hover-card/hover-card-arrow.cjs +5 -4
- package/hover-card/hover-card-arrow.d.ts +8 -5
- package/hover-card/hover-card-arrow.mjs +2 -1
- package/hover-card/hover-card-content.cjs +12 -8
- package/hover-card/hover-card-content.d.ts +9 -5
- package/hover-card/hover-card-content.mjs +10 -6
- package/hover-card/hover-card-positioner.cjs +10 -7
- package/hover-card/hover-card-positioner.d.ts +8 -5
- package/hover-card/hover-card-positioner.mjs +9 -6
- package/hover-card/hover-card-trigger.cjs +10 -7
- package/hover-card/hover-card-trigger.d.ts +8 -5
- package/hover-card/hover-card-trigger.mjs +9 -6
- package/hover-card/use-hover-card.cjs +5 -5
- package/menu/menu-arrow-tip.cjs +5 -4
- package/menu/menu-arrow-tip.d.ts +8 -5
- package/menu/menu-arrow-tip.mjs +2 -1
- package/menu/menu-arrow.cjs +5 -4
- package/menu/menu-arrow.d.ts +8 -5
- package/menu/menu-arrow.mjs +2 -1
- package/menu/menu-content.cjs +5 -4
- package/menu/menu-content.d.ts +8 -5
- package/menu/menu-content.mjs +2 -1
- package/menu/menu-context-trigger.cjs +10 -7
- package/menu/menu-context-trigger.d.ts +8 -5
- package/menu/menu-context-trigger.mjs +9 -6
- package/menu/menu-item-group-label.cjs +11 -8
- package/menu/menu-item-group-label.d.ts +8 -4
- package/menu/menu-item-group-label.mjs +10 -7
- package/menu/menu-item-group.cjs +5 -4
- package/menu/menu-item-group.d.ts +9 -4
- package/menu/menu-item-group.mjs +2 -1
- package/menu/menu-item.cjs +5 -4
- package/menu/menu-item.d.ts +9 -4
- package/menu/menu-item.mjs +2 -1
- package/menu/menu-option-item.cjs +5 -5
- package/menu/menu-option-item.d.ts +16 -5
- package/menu/menu-option-item.mjs +2 -2
- package/menu/menu-positioner.cjs +5 -4
- package/menu/menu-positioner.d.ts +8 -5
- package/menu/menu-positioner.mjs +2 -1
- package/menu/menu-separator.cjs +5 -4
- package/menu/menu-separator.d.ts +8 -5
- package/menu/menu-separator.mjs +2 -1
- package/menu/menu-trigger-item.cjs +5 -4
- package/menu/menu-trigger-item.d.ts +8 -5
- package/menu/menu-trigger-item.mjs +2 -1
- package/menu/menu-trigger.cjs +5 -4
- package/menu/menu-trigger.d.ts +8 -5
- package/menu/menu-trigger.mjs +2 -1
- package/menu/menu.cjs +3 -3
- package/menu/use-menu.cjs +5 -5
- package/number-input/number-input-control.cjs +10 -7
- package/number-input/number-input-control.d.ts +8 -5
- package/number-input/number-input-control.mjs +9 -6
- package/number-input/number-input-decrement-trigger.cjs +5 -5
- package/number-input/number-input-decrement-trigger.d.ts +8 -7
- package/number-input/number-input-decrement-trigger.mjs +2 -2
- package/number-input/number-input-field.cjs +10 -7
- package/number-input/number-input-field.d.ts +8 -5
- package/number-input/number-input-field.mjs +9 -6
- package/number-input/number-input-increment-trigger.cjs +5 -5
- package/number-input/number-input-increment-trigger.d.ts +8 -7
- package/number-input/number-input-increment-trigger.mjs +2 -2
- package/number-input/number-input-label.cjs +10 -7
- package/number-input/number-input-label.d.ts +8 -5
- package/number-input/number-input-label.mjs +9 -6
- package/number-input/number-input-scrubber.cjs +10 -7
- package/number-input/number-input-scrubber.d.ts +8 -5
- package/number-input/number-input-scrubber.mjs +9 -6
- package/number-input/number-input.cjs +5 -4
- package/number-input/number-input.d.ts +11 -4
- package/number-input/number-input.mjs +2 -1
- package/number-input/use-number-input.cjs +6 -6
- package/package.json +46 -46
- package/pagination/pagination-ellipsis.cjs +11 -8
- package/pagination/pagination-ellipsis.d.ts +8 -4
- package/pagination/pagination-ellipsis.mjs +10 -7
- package/pagination/pagination-list-item.cjs +5 -2
- package/pagination/pagination-list-item.d.ts +8 -5
- package/pagination/pagination-list-item.mjs +5 -2
- package/pagination/pagination-list.cjs +3 -2
- package/pagination/pagination-list.d.ts +8 -5
- package/pagination/pagination-list.mjs +2 -1
- package/pagination/pagination-next-page-trigger.cjs +5 -4
- package/pagination/pagination-next-page-trigger.d.ts +8 -5
- package/pagination/pagination-next-page-trigger.mjs +2 -1
- package/pagination/pagination-page-trigger.cjs +5 -4
- package/pagination/pagination-page-trigger.d.ts +8 -4
- package/pagination/pagination-page-trigger.mjs +2 -1
- package/pagination/pagination-prev-page-trigger.cjs +5 -4
- package/pagination/pagination-prev-page-trigger.d.ts +8 -5
- package/pagination/pagination-prev-page-trigger.mjs +2 -1
- package/pagination/pagination.cjs +5 -5
- package/pagination/pagination.d.ts +10 -4
- package/pagination/pagination.mjs +2 -2
- package/pagination/use-pagination.cjs +5 -5
- package/pin-input/pin-input-control.cjs +5 -4
- package/pin-input/pin-input-control.d.ts +8 -5
- package/pin-input/pin-input-control.mjs +2 -1
- package/pin-input/pin-input-field.cjs +5 -4
- package/pin-input/pin-input-field.d.ts +9 -5
- package/pin-input/pin-input-field.mjs +2 -1
- package/pin-input/pin-input-label.cjs +5 -4
- package/pin-input/pin-input-label.d.ts +8 -5
- package/pin-input/pin-input-label.mjs +2 -1
- package/pin-input/pin-input.cjs +5 -4
- package/pin-input/pin-input.d.ts +11 -4
- package/pin-input/pin-input.mjs +2 -1
- package/pin-input/use-pin-input.cjs +5 -5
- package/popover/popover-anchor.cjs +5 -4
- package/popover/popover-anchor.d.ts +8 -5
- package/popover/popover-anchor.mjs +2 -1
- package/popover/popover-arrow-tip.cjs +5 -4
- package/popover/popover-arrow-tip.d.ts +8 -5
- package/popover/popover-arrow-tip.mjs +2 -1
- package/popover/popover-arrow.cjs +5 -4
- package/popover/popover-arrow.d.ts +8 -5
- package/popover/popover-arrow.mjs +2 -1
- package/popover/popover-close-trigger.cjs +10 -7
- package/popover/popover-close-trigger.d.ts +8 -5
- package/popover/popover-close-trigger.mjs +9 -6
- package/popover/popover-content.cjs +12 -8
- package/popover/popover-content.d.ts +9 -5
- package/popover/popover-content.mjs +10 -6
- package/popover/popover-description.cjs +10 -7
- package/popover/popover-description.d.ts +8 -5
- package/popover/popover-description.mjs +9 -6
- package/popover/popover-positioner.cjs +10 -7
- package/popover/popover-positioner.d.ts +8 -5
- package/popover/popover-positioner.mjs +9 -6
- package/popover/popover-title.cjs +5 -4
- package/popover/popover-title.d.ts +8 -5
- package/popover/popover-title.mjs +2 -1
- package/popover/popover-trigger.cjs +5 -4
- package/popover/popover-trigger.d.ts +8 -5
- package/popover/popover-trigger.mjs +2 -1
- package/popover/use-popover.cjs +5 -5
- package/presence/presence.cjs +4 -4
- package/pressable/pressable.cjs +5 -4
- package/pressable/pressable.d.ts +15 -4
- package/pressable/pressable.mjs +2 -1
- package/pressable/use-pressable.cjs +5 -5
- package/radio-group/radio-control.cjs +5 -4
- package/radio-group/radio-control.d.ts +8 -5
- package/radio-group/radio-control.mjs +2 -1
- package/radio-group/radio-group-label.cjs +5 -4
- package/radio-group/radio-group-label.d.ts +8 -5
- package/radio-group/radio-group-label.mjs +2 -1
- package/radio-group/radio-group.cjs +5 -4
- package/radio-group/radio-group.d.ts +11 -4
- package/radio-group/radio-group.mjs +2 -1
- package/radio-group/radio-input.cjs +5 -4
- package/radio-group/radio-input.d.ts +8 -5
- package/radio-group/radio-input.mjs +2 -1
- package/radio-group/radio-label.cjs +5 -4
- package/radio-group/radio-label.d.ts +8 -5
- package/radio-group/radio-label.mjs +2 -1
- package/radio-group/radio.cjs +5 -4
- package/radio-group/radio.d.ts +14 -5
- package/radio-group/radio.mjs +2 -1
- package/radio-group/use-radio-group.cjs +5 -5
- package/range-slider/range-slider-control.cjs +10 -7
- package/range-slider/range-slider-control.d.ts +8 -5
- package/range-slider/range-slider-control.mjs +9 -6
- package/range-slider/range-slider-label.cjs +10 -7
- package/range-slider/range-slider-label.d.ts +8 -5
- package/range-slider/range-slider-label.mjs +9 -6
- package/range-slider/range-slider-marker-group.cjs +5 -4
- package/range-slider/range-slider-marker-group.d.ts +8 -5
- package/range-slider/range-slider-marker-group.mjs +2 -1
- package/range-slider/range-slider-marker.cjs +11 -8
- package/range-slider/range-slider-marker.d.ts +10 -4
- package/range-slider/range-slider-marker.mjs +10 -7
- package/range-slider/range-slider-output.cjs +12 -10
- package/range-slider/range-slider-output.d.ts +10 -4
- package/range-slider/range-slider-output.mjs +11 -9
- package/range-slider/range-slider-range.cjs +5 -4
- package/range-slider/range-slider-range.d.ts +8 -5
- package/range-slider/range-slider-range.mjs +2 -1
- package/range-slider/range-slider-thumb.cjs +16 -6
- package/range-slider/range-slider-thumb.d.ts +10 -4
- package/range-slider/range-slider-thumb.mjs +13 -3
- package/range-slider/range-slider-track.cjs +5 -4
- package/range-slider/range-slider-track.d.ts +8 -5
- package/range-slider/range-slider-track.mjs +2 -1
- package/range-slider/range-slider.cjs +5 -5
- package/range-slider/range-slider.d.ts +13 -4
- package/range-slider/range-slider.mjs +2 -2
- package/range-slider/use-range-slider.cjs +5 -5
- package/rating-group/rating-group-control.cjs +12 -10
- package/rating-group/rating-group-control.d.ts +10 -5
- package/rating-group/rating-group-control.mjs +11 -9
- package/rating-group/rating-group-label.cjs +10 -7
- package/rating-group/rating-group-label.d.ts +8 -5
- package/rating-group/rating-group-label.mjs +9 -6
- package/rating-group/rating-group.cjs +5 -4
- package/rating-group/rating-group.d.ts +11 -4
- package/rating-group/rating-group.mjs +2 -1
- package/rating-group/rating.cjs +5 -5
- package/rating-group/rating.d.ts +10 -4
- package/rating-group/rating.mjs +2 -2
- package/rating-group/use-rating-group.cjs +5 -5
- package/segment-group/segment-control.cjs +5 -4
- package/segment-group/segment-control.d.ts +8 -5
- package/segment-group/segment-control.mjs +2 -1
- package/segment-group/segment-group-label.cjs +10 -7
- package/segment-group/segment-group-label.d.ts +8 -5
- package/segment-group/segment-group-label.mjs +9 -6
- package/segment-group/segment-group.cjs +5 -4
- package/segment-group/segment-group.d.ts +11 -4
- package/segment-group/segment-group.mjs +2 -1
- package/segment-group/segment-indicator.cjs +5 -4
- package/segment-group/segment-indicator.d.ts +8 -5
- package/segment-group/segment-indicator.mjs +2 -1
- package/segment-group/segment-input.cjs +5 -4
- package/segment-group/segment-input.d.ts +8 -5
- package/segment-group/segment-input.mjs +2 -1
- package/segment-group/segment-label.cjs +5 -4
- package/segment-group/segment-label.d.ts +8 -5
- package/segment-group/segment-label.mjs +2 -1
- package/segment-group/segment.cjs +5 -4
- package/segment-group/segment.d.ts +14 -5
- package/segment-group/segment.mjs +2 -1
- package/segment-group/use-segment-group.cjs +5 -5
- package/select/select-content.cjs +12 -8
- package/select/select-content.d.ts +9 -5
- package/select/select-content.mjs +10 -6
- package/select/select-label.cjs +5 -4
- package/select/select-label.d.ts +8 -5
- package/select/select-label.mjs +2 -1
- package/select/select-option-group-label.cjs +5 -4
- package/select/select-option-group-label.d.ts +10 -4
- package/select/select-option-group-label.mjs +2 -1
- package/select/select-option-group.cjs +11 -8
- package/select/select-option-group.d.ts +10 -4
- package/select/select-option-group.mjs +10 -7
- package/select/select-option.cjs +5 -4
- package/select/select-option.d.ts +9 -4
- package/select/select-option.mjs +2 -1
- package/select/select-positioner.cjs +5 -4
- package/select/select-positioner.d.ts +8 -5
- package/select/select-positioner.mjs +2 -1
- package/select/select-trigger.cjs +5 -4
- package/select/select-trigger.d.ts +8 -5
- package/select/select-trigger.mjs +2 -1
- package/select/use-select.cjs +5 -5
- package/slider/slider-control.cjs +5 -4
- package/slider/slider-control.d.ts +8 -5
- package/slider/slider-control.mjs +2 -1
- package/slider/slider-label.cjs +5 -4
- package/slider/slider-label.d.ts +8 -5
- package/slider/slider-label.mjs +2 -1
- package/slider/slider-marker-group.cjs +10 -7
- package/slider/slider-marker-group.d.ts +8 -5
- package/slider/slider-marker-group.mjs +9 -6
- package/slider/slider-marker.cjs +5 -4
- package/slider/slider-marker.d.ts +9 -5
- package/slider/slider-marker.mjs +2 -1
- package/slider/slider-output.cjs +5 -4
- package/slider/slider-output.d.ts +11 -5
- package/slider/slider-output.mjs +2 -1
- package/slider/slider-range.cjs +5 -4
- package/slider/slider-range.d.ts +8 -5
- package/slider/slider-range.mjs +2 -1
- package/slider/slider-thumb.cjs +15 -6
- package/slider/slider-thumb.d.ts +8 -5
- package/slider/slider-thumb.mjs +12 -3
- package/slider/slider-track.cjs +5 -4
- package/slider/slider-track.d.ts +8 -5
- package/slider/slider-track.mjs +2 -1
- package/slider/slider.cjs +5 -5
- package/slider/slider.d.ts +10 -4
- package/slider/slider.mjs +2 -2
- package/slider/use-slider.cjs +6 -6
- package/splitter/splitter-panel.cjs +5 -4
- package/splitter/splitter-panel.d.ts +8 -4
- package/splitter/splitter-panel.mjs +2 -1
- package/splitter/splitter-resize-trigger.cjs +5 -4
- package/splitter/splitter-resize-trigger.d.ts +9 -7
- package/splitter/splitter-resize-trigger.mjs +2 -1
- package/splitter/splitter.cjs +5 -4
- package/splitter/splitter.d.ts +19 -4
- package/splitter/splitter.mjs +2 -1
- package/splitter/use-splitter.cjs +5 -5
- package/switch/switch-control.cjs +5 -4
- package/switch/switch-control.d.ts +8 -5
- package/switch/switch-control.mjs +2 -1
- package/switch/switch-input.cjs +5 -4
- package/switch/switch-input.d.ts +8 -5
- package/switch/switch-input.mjs +2 -1
- package/switch/switch-label.cjs +5 -4
- package/switch/switch-label.d.ts +8 -5
- package/switch/switch-label.mjs +2 -1
- package/switch/switch-thumb.cjs +5 -4
- package/switch/switch-thumb.d.ts +8 -5
- package/switch/switch-thumb.mjs +2 -1
- package/switch/switch.cjs +5 -4
- package/switch/switch.d.ts +11 -4
- package/switch/switch.mjs +2 -1
- package/switch/use-switch.cjs +5 -5
- package/tabs/tab-content.cjs +7 -5
- package/tabs/tab-content.d.ts +8 -5
- package/tabs/tab-content.mjs +3 -1
- package/tabs/tab-indicator.cjs +5 -4
- package/tabs/tab-indicator.d.ts +8 -5
- package/tabs/tab-indicator.mjs +2 -1
- package/tabs/tab-list.cjs +5 -4
- package/tabs/tab-list.d.ts +8 -5
- package/tabs/tab-list.mjs +2 -1
- package/tabs/tab-trigger.cjs +5 -4
- package/tabs/tab-trigger.d.ts +8 -4
- package/tabs/tab-trigger.mjs +2 -1
- package/tabs/tabs.cjs +5 -4
- package/tabs/tabs.d.ts +11 -4
- package/tabs/tabs.mjs +2 -1
- package/tabs/use-tabs.cjs +5 -5
- package/tags-input/tag-delete-trigger.cjs +15 -12
- package/tags-input/tag-delete-trigger.d.ts +14 -5
- package/tags-input/tag-delete-trigger.mjs +14 -11
- package/tags-input/tag-input.cjs +10 -5
- package/tags-input/tag-input.d.ts +14 -5
- package/tags-input/tag-input.mjs +7 -2
- package/tags-input/tag.cjs +5 -4
- package/tags-input/tag.d.ts +10 -4
- package/tags-input/tag.mjs +2 -1
- package/tags-input/tags-input-clear-trigger.cjs +10 -7
- package/tags-input/tags-input-clear-trigger.d.ts +8 -5
- package/tags-input/tags-input-clear-trigger.mjs +9 -6
- package/tags-input/tags-input-control.cjs +5 -4
- package/tags-input/tags-input-control.d.ts +8 -5
- package/tags-input/tags-input-control.mjs +2 -1
- package/tags-input/tags-input-field.cjs +5 -4
- package/tags-input/tags-input-field.d.ts +8 -5
- package/tags-input/tags-input-field.mjs +2 -1
- package/tags-input/tags-input-label.cjs +5 -4
- package/tags-input/tags-input-label.d.ts +8 -5
- package/tags-input/tags-input-label.mjs +2 -1
- package/tags-input/tags-input.cjs +5 -5
- package/tags-input/tags-input.d.ts +10 -4
- package/tags-input/tags-input.mjs +2 -2
- package/tags-input/use-tags-input.cjs +5 -5
- package/toast/toast-close-trigger.cjs +10 -7
- package/toast/toast-close-trigger.d.ts +8 -5
- package/toast/toast-close-trigger.mjs +9 -6
- package/toast/toast-description.cjs +10 -7
- package/toast/toast-description.d.ts +8 -5
- package/toast/toast-description.mjs +9 -6
- package/toast/toast-group.cjs +5 -5
- package/toast/toast-group.d.ts +11 -4
- package/toast/toast-group.mjs +2 -2
- package/toast/toast-provider.cjs +5 -5
- package/toast/toast-title.cjs +5 -4
- package/toast/toast-title.d.ts +8 -5
- package/toast/toast-title.mjs +2 -1
- package/toast/toast.cjs +5 -4
- package/toast/toast.d.ts +8 -4
- package/toast/toast.mjs +2 -1
- package/tooltip/tooltip-arrow-tip.cjs +5 -4
- package/tooltip/tooltip-arrow-tip.d.ts +8 -5
- package/tooltip/tooltip-arrow-tip.mjs +2 -1
- package/tooltip/tooltip-arrow.cjs +5 -4
- package/tooltip/tooltip-arrow.d.ts +8 -5
- package/tooltip/tooltip-arrow.mjs +2 -1
- package/tooltip/tooltip-content.cjs +12 -8
- package/tooltip/tooltip-content.d.ts +9 -5
- package/tooltip/tooltip-content.mjs +10 -6
- package/tooltip/tooltip-positioner.cjs +10 -7
- package/tooltip/tooltip-positioner.d.ts +8 -5
- package/tooltip/tooltip-positioner.mjs +9 -6
- package/tooltip/tooltip-trigger.cjs +5 -4
- package/tooltip/tooltip-trigger.d.ts +8 -5
- package/tooltip/tooltip-trigger.mjs +2 -1
- package/tooltip/use-tooltip.cjs +5 -5
- package/use-effect-once.cjs +5 -5
- package/forward-ref.cjs +0 -12
- package/forward-ref.d.ts +0 -4
- package/forward-ref.mjs +0 -8
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const createSplitProps = require('../create-split-props.cjs');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
11
11
|
const ratingGroupContext = require('./rating-group-context.cjs');
|
|
12
12
|
const useRatingGroup = require('./use-rating-group.cjs');
|
|
13
13
|
|
|
14
|
-
const RatingGroup =
|
|
14
|
+
const RatingGroup = react.forwardRef((props, ref) => {
|
|
15
15
|
const [useRatingProps, inputProps] = createSplitProps.createSplitProps()(props, [
|
|
16
16
|
"allowHalf",
|
|
17
17
|
"autoFocus",
|
|
@@ -31,11 +31,12 @@ const RatingGroup = forwardRef.forwardRef((props, ref) => {
|
|
|
31
31
|
"value"
|
|
32
32
|
]);
|
|
33
33
|
const ratingGroup = useRatingGroup.useRatingGroup(useRatingProps);
|
|
34
|
-
const mergedProps = react.mergeProps(ratingGroup.rootProps, inputProps);
|
|
34
|
+
const mergedProps = react$1.mergeProps(ratingGroup.rootProps, inputProps);
|
|
35
35
|
return /* @__PURE__ */ jsxRuntime.jsx(ratingGroupContext.RatingGroupProvider, { value: ratingGroup, children: /* @__PURE__ */ jsxRuntime.jsxs(factory.ark.div, { ...mergedProps, children: [
|
|
36
36
|
/* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...ratingGroup.hiddenInputProps, ref }),
|
|
37
37
|
props.children
|
|
38
38
|
] }) });
|
|
39
39
|
});
|
|
40
|
+
RatingGroup.displayName = "RatingGroup";
|
|
40
41
|
|
|
41
42
|
exports.RatingGroup = RatingGroup;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Context } from '@zag-js/rating-group';
|
|
2
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { ark } from '../factory';
|
|
3
4
|
import { type Assign } from '../types';
|
|
4
5
|
import { type UseRatingGroupProps } from './use-rating-group';
|
|
5
|
-
export type RatingGroupProps = Assign<
|
|
6
|
-
export declare const RatingGroup: ForwardRefExoticComponent<
|
|
6
|
+
export type RatingGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.input>, UseRatingGroupProps>;
|
|
7
|
+
export declare const RatingGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
8
|
+
ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
asChild?: boolean | undefined;
|
|
11
|
+
}, "ref">, "name" | "value" | "form" | "id" | "max" | "onChange" | "defaultValue" | "autoFocus" | "dir" | "disabled" | "readOnly" | "getRootNode" | "ids" | "translations" | "allowHalf" | "onHover"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
12
|
+
defaultValue?: number | undefined;
|
|
13
|
+
} & RefAttributes<HTMLInputElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
7
7
|
import { RatingGroupProvider } from './rating-group-context.mjs';
|
|
8
8
|
import { useRatingGroup } from './use-rating-group.mjs';
|
|
9
9
|
|
|
@@ -33,5 +33,6 @@ const RatingGroup = forwardRef((props, ref) => {
|
|
|
33
33
|
props.children
|
|
34
34
|
] }) });
|
|
35
35
|
});
|
|
36
|
+
RatingGroup.displayName = "RatingGroup";
|
|
36
37
|
|
|
37
38
|
export { RatingGroup };
|
package/rating-group/rating.cjs
CHANGED
|
@@ -4,21 +4,21 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
8
|
-
require('react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
9
|
const factory = require('../factory.cjs');
|
|
10
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
11
10
|
const runIfFn = require('../run-if-fn.cjs');
|
|
12
11
|
const ratingContext = require('./rating-context.cjs');
|
|
13
12
|
const ratingGroupContext = require('./rating-group-context.cjs');
|
|
14
13
|
|
|
15
|
-
const Rating =
|
|
14
|
+
const Rating = react.forwardRef((props, ref) => {
|
|
16
15
|
const { children, index, ...divProps } = props;
|
|
17
16
|
const { getRatingState, getRatingProps } = ratingGroupContext.useRatingGroupContext();
|
|
18
17
|
const ratingState = getRatingState({ index });
|
|
19
|
-
const mergedProps = react.mergeProps(getRatingProps({ index }), divProps);
|
|
18
|
+
const mergedProps = react$1.mergeProps(getRatingProps({ index }), divProps);
|
|
20
19
|
const view = runIfFn.runIfFn(children, ratingState);
|
|
21
20
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(ratingContext.RatingProvider, { value: ratingState, children: view }) });
|
|
22
21
|
});
|
|
22
|
+
Rating.displayName = "Rating";
|
|
23
23
|
|
|
24
24
|
exports.Rating = Rating;
|
package/rating-group/rating.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { ItemProps } from '@zag-js/rating-group';
|
|
2
|
-
import type { ForwardRefExoticComponent, type ReactNode } from 'react';
|
|
3
|
-
import
|
|
2
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
+
import { ark } 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<ComponentPropsWithoutRef<typeof ark.span>, ItemProps & {
|
|
7
7
|
children: (state: RatingContext) => ReactNode | ReactNode;
|
|
8
8
|
}>;
|
|
9
|
-
export declare const Rating: ForwardRefExoticComponent<
|
|
9
|
+
export declare const Rating: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | RefObject<HTMLSpanElement> | null | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
asChild?: boolean | undefined;
|
|
13
|
+
}, "ref">, "children" | "index"> & ItemProps & {
|
|
14
|
+
children: (state: RatingContext) => ReactNode | ReactNode;
|
|
15
|
+
} & RefAttributes<HTMLSpanElement>>;
|
package/rating-group/rating.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
-
import 'react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
5
|
import { ark } from '../factory.mjs';
|
|
6
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
7
6
|
import { runIfFn } from '../run-if-fn.mjs';
|
|
8
7
|
import { RatingProvider } from './rating-context.mjs';
|
|
9
8
|
import { useRatingGroupContext } from './rating-group-context.mjs';
|
|
@@ -16,5 +15,6 @@ const Rating = forwardRef((props, ref) => {
|
|
|
16
15
|
const view = runIfFn(children, ratingState);
|
|
17
16
|
return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ref, children: /* @__PURE__ */ jsx(RatingProvider, { value: ratingState, children: view }) });
|
|
18
17
|
});
|
|
18
|
+
Rating.displayName = "Rating";
|
|
19
19
|
|
|
20
20
|
export { Rating };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const ratingGroup = require('@zag-js/rating-group');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
8
|
-
const
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
9
9
|
const environmentContext = require('../environment/environment-context.cjs');
|
|
10
10
|
|
|
11
11
|
function _interopNamespaceDefault(e) {
|
|
@@ -30,7 +30,7 @@ const ratingGroup__namespace = /*#__PURE__*/_interopNamespaceDefault(ratingGroup
|
|
|
30
30
|
const useRatingGroup = (props) => {
|
|
31
31
|
const getRootNode = environmentContext.useEnvironmentContext();
|
|
32
32
|
const initialContext = {
|
|
33
|
-
id:
|
|
33
|
+
id: react.useId(),
|
|
34
34
|
getRootNode,
|
|
35
35
|
...props,
|
|
36
36
|
value: props.defaultValue
|
|
@@ -39,10 +39,10 @@ const useRatingGroup = (props) => {
|
|
|
39
39
|
...initialContext,
|
|
40
40
|
value: props.value
|
|
41
41
|
};
|
|
42
|
-
const [state, send] = react.useMachine(ratingGroup__namespace.machine(initialContext), {
|
|
42
|
+
const [state, send] = react$1.useMachine(ratingGroup__namespace.machine(initialContext), {
|
|
43
43
|
context
|
|
44
44
|
});
|
|
45
|
-
return ratingGroup__namespace.connect(state, send, react.normalizeProps);
|
|
45
|
+
return ratingGroup__namespace.connect(state, send, react$1.normalizeProps);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
exports.useRatingGroup = useRatingGroup;
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentContext = require('./segment-context.cjs');
|
|
11
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
|
-
const SegmentControl =
|
|
14
|
+
const SegmentControl = react.forwardRef((props, ref) => {
|
|
15
15
|
const { getRadioControlProps } = segmentGroupContext.useSegmentGroupContext();
|
|
16
16
|
const context = segmentContext.useSegmentContext();
|
|
17
|
-
const mergedProps = react.mergeProps(getRadioControlProps(context), props);
|
|
17
|
+
const mergedProps = react$1.mergeProps(getRadioControlProps(context), props);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ...segmentGroup_anatomy.parts.radioControl.attrs, ref });
|
|
19
19
|
});
|
|
20
|
+
SegmentControl.displayName = "SegmentControl";
|
|
20
21
|
|
|
21
22
|
exports.SegmentControl = SegmentControl;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type SegmentControlProps = ComponentPropsWithoutRef<typeof ark.div>;
|
|
4
|
+
export declare const SegmentControl: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { useSegmentContext } from './segment-context.mjs';
|
|
7
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
@@ -13,5 +13,6 @@ const SegmentControl = forwardRef((props, ref) => {
|
|
|
13
13
|
const mergedProps = mergeProps(getRadioControlProps(context), props);
|
|
14
14
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ...parts.radioControl.attrs, ref });
|
|
15
15
|
});
|
|
16
|
+
SegmentControl.displayName = "SegmentControl";
|
|
16
17
|
|
|
17
18
|
export { SegmentControl };
|
|
@@ -4,16 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
11
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
12
12
|
|
|
13
|
-
const SegmentGroupLabel =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
13
|
+
const SegmentGroupLabel = react.forwardRef(
|
|
14
|
+
(props, ref) => {
|
|
15
|
+
const { labelProps } = segmentGroupContext.useSegmentGroupContext();
|
|
16
|
+
const mergedProps = react$1.mergeProps(labelProps, props);
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ...segmentGroup_anatomy.parts.label.attrs, ref });
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
SegmentGroupLabel.displayName = "SegmentGroupLabel";
|
|
18
21
|
|
|
19
22
|
exports.SegmentGroupLabel = SegmentGroupLabel;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type SegmentGroupLabelProps = ComponentPropsWithoutRef<typeof ark.label>;
|
|
4
|
+
export declare const SegmentGroupLabel: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
7
|
import { parts } from './segment-group.anatomy.mjs';
|
|
8
8
|
|
|
9
|
-
const SegmentGroupLabel = forwardRef(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
9
|
+
const SegmentGroupLabel = forwardRef(
|
|
10
|
+
(props, ref) => {
|
|
11
|
+
const { labelProps } = useSegmentGroupContext();
|
|
12
|
+
const mergedProps = mergeProps(labelProps, props);
|
|
13
|
+
return /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ...parts.label.attrs, ref });
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
SegmentGroupLabel.displayName = "SegmentGroupLabel";
|
|
14
17
|
|
|
15
18
|
export { SegmentGroupLabel };
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const createSplitProps = require('../create-split-props.cjs');
|
|
9
10
|
const factory = require('../factory.cjs');
|
|
10
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
11
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
const useSegmentGroup = require('./use-segment-group.cjs');
|
|
14
14
|
|
|
15
|
-
const SegmentGroup =
|
|
15
|
+
const SegmentGroup = react.forwardRef((props, ref) => {
|
|
16
16
|
const [useSegmentGroupProps, divProps] = createSplitProps.createSplitProps()(props, [
|
|
17
17
|
"defaultValue",
|
|
18
18
|
"dir",
|
|
@@ -28,8 +28,9 @@ const SegmentGroup = forwardRef.forwardRef((props, ref) => {
|
|
|
28
28
|
"value"
|
|
29
29
|
]);
|
|
30
30
|
const segmentGroup = useSegmentGroup.useSegmentGroup(useSegmentGroupProps);
|
|
31
|
-
const mergedProps = react.mergeProps(segmentGroup.rootProps, divProps);
|
|
31
|
+
const mergedProps = react$1.mergeProps(segmentGroup.rootProps, divProps);
|
|
32
32
|
return /* @__PURE__ */ jsxRuntime.jsx(segmentGroupContext.SegmentGroupProvider, { value: segmentGroup, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ...segmentGroup_anatomy.parts.root.attrs, ref }) });
|
|
33
33
|
});
|
|
34
|
+
SegmentGroup.displayName = "SegmentGroup";
|
|
34
35
|
|
|
35
36
|
exports.SegmentGroup = SegmentGroup;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Context } from '@zag-js/radio-group';
|
|
2
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { ark } from '../factory';
|
|
3
4
|
import { type Assign } from '../types';
|
|
4
5
|
import { type UseSegmentGroupProps } from './use-segment-group';
|
|
5
|
-
export type SegmentGroupProps = Assign<
|
|
6
|
-
export declare const SegmentGroup: ForwardRefExoticComponent<
|
|
6
|
+
export type SegmentGroupProps = Assign<ComponentPropsWithoutRef<typeof ark.div>, UseSegmentGroupProps>;
|
|
7
|
+
export declare const SegmentGroup: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
asChild?: boolean | undefined;
|
|
11
|
+
}, "ref">, "name" | "value" | "form" | "id" | "orientation" | "onChange" | "defaultValue" | "dir" | "disabled" | "readOnly" | "getRootNode" | "ids"> & Pick<Partial<Context>, "id"> & Omit<Context, "id"> & {
|
|
12
|
+
defaultValue?: string | null | undefined;
|
|
13
|
+
} & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
5
6
|
import { ark } from '../factory.mjs';
|
|
6
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
7
7
|
import { SegmentGroupProvider } from './segment-group-context.mjs';
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
9
9
|
import { useSegmentGroup } from './use-segment-group.mjs';
|
|
@@ -27,5 +27,6 @@ const SegmentGroup = forwardRef((props, ref) => {
|
|
|
27
27
|
const mergedProps = mergeProps(segmentGroup.rootProps, divProps);
|
|
28
28
|
return /* @__PURE__ */ jsx(SegmentGroupProvider, { value: segmentGroup, children: /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ...parts.root.attrs, ref }) });
|
|
29
29
|
});
|
|
30
|
+
SegmentGroup.displayName = "SegmentGroup";
|
|
30
31
|
|
|
31
32
|
export { SegmentGroup };
|
|
@@ -4,16 +4,17 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
11
11
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
12
12
|
|
|
13
|
-
const SegmentIndicator =
|
|
13
|
+
const SegmentIndicator = react.forwardRef((props, ref) => {
|
|
14
14
|
const { indicatorProps } = segmentGroupContext.useSegmentGroupContext();
|
|
15
|
-
const mergedProps = react.mergeProps(indicatorProps, props);
|
|
15
|
+
const mergedProps = react$1.mergeProps(indicatorProps, props);
|
|
16
16
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.div, { ...mergedProps, ...segmentGroup_anatomy.parts.indicator.attrs, ref });
|
|
17
17
|
});
|
|
18
|
+
SegmentIndicator.displayName = "SegmentIndicator";
|
|
18
19
|
|
|
19
20
|
exports.SegmentIndicator = SegmentIndicator;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type SegmentIndicatorProps = ComponentPropsWithoutRef<typeof ark.div>;
|
|
4
|
+
export declare const SegmentIndicator: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
7
7
|
import { parts } from './segment-group.anatomy.mjs';
|
|
8
8
|
|
|
@@ -11,5 +11,6 @@ const SegmentIndicator = forwardRef((props, ref) => {
|
|
|
11
11
|
const mergedProps = mergeProps(indicatorProps, props);
|
|
12
12
|
return /* @__PURE__ */ jsx(ark.div, { ...mergedProps, ...parts.indicator.attrs, ref });
|
|
13
13
|
});
|
|
14
|
+
SegmentIndicator.displayName = "SegmentIndicator";
|
|
14
15
|
|
|
15
16
|
export { SegmentIndicator };
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentContext = require('./segment-context.cjs');
|
|
11
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
|
-
const SegmentInput =
|
|
14
|
+
const SegmentInput = react.forwardRef((props, ref) => {
|
|
15
15
|
const { getRadioInputProps } = segmentGroupContext.useSegmentGroupContext();
|
|
16
16
|
const context = segmentContext.useSegmentContext();
|
|
17
|
-
const mergedProps = react.mergeProps(getRadioInputProps(context), props);
|
|
17
|
+
const mergedProps = react$1.mergeProps(getRadioInputProps(context), props);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.input, { ...mergedProps, ...segmentGroup_anatomy.parts.radioInput.attrs, ref });
|
|
19
19
|
});
|
|
20
|
+
SegmentInput.displayName = "SegmentInput";
|
|
20
21
|
|
|
21
22
|
exports.SegmentInput = SegmentInput;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, InputHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type SegmentInputProps = ComponentPropsWithoutRef<typeof ark.input>;
|
|
4
|
+
export declare const SegmentInput: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLInputElement | null) => void) | RefObject<HTMLInputElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & RefAttributes<HTMLInputElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { useSegmentContext } from './segment-context.mjs';
|
|
7
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
@@ -13,5 +13,6 @@ const SegmentInput = forwardRef((props, ref) => {
|
|
|
13
13
|
const mergedProps = mergeProps(getRadioInputProps(context), props);
|
|
14
14
|
return /* @__PURE__ */ jsx(ark.input, { ...mergedProps, ...parts.radioInput.attrs, ref });
|
|
15
15
|
});
|
|
16
|
+
SegmentInput.displayName = "SegmentInput";
|
|
16
17
|
|
|
17
18
|
export { SegmentInput };
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentContext = require('./segment-context.cjs');
|
|
11
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
|
-
const SegmentLabel =
|
|
14
|
+
const SegmentLabel = react.forwardRef((props, ref) => {
|
|
15
15
|
const { getRadioLabelProps } = segmentGroupContext.useSegmentGroupContext();
|
|
16
16
|
const context = segmentContext.useSegmentContext();
|
|
17
|
-
const mergedProps = react.mergeProps(getRadioLabelProps(context), props);
|
|
17
|
+
const mergedProps = react$1.mergeProps(getRadioLabelProps(context), props);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(factory.ark.span, { ...mergedProps, ...segmentGroup_anatomy.parts.radioLabel.attrs, ref });
|
|
19
19
|
});
|
|
20
|
+
SegmentLabel.displayName = "SegmentLabel";
|
|
20
21
|
|
|
21
22
|
exports.SegmentLabel = SegmentLabel;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, HTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
export type SegmentLabelProps = ComponentPropsWithoutRef<typeof ark.span>;
|
|
4
|
+
export declare const SegmentLabel: ForwardRefExoticComponent<Omit<Omit<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLSpanElement | null) => void) | RefObject<HTMLSpanElement> | null | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
asChild?: boolean | undefined;
|
|
8
|
+
}, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { useSegmentContext } from './segment-context.mjs';
|
|
7
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
@@ -13,5 +13,6 @@ const SegmentLabel = forwardRef((props, ref) => {
|
|
|
13
13
|
const mergedProps = mergeProps(getRadioLabelProps(context), props);
|
|
14
14
|
return /* @__PURE__ */ jsx(ark.span, { ...mergedProps, ...parts.radioLabel.attrs, ref });
|
|
15
15
|
});
|
|
16
|
+
SegmentLabel.displayName = "SegmentLabel";
|
|
16
17
|
|
|
17
18
|
export { SegmentLabel };
|
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const react = require('@zag-js/react');
|
|
7
|
+
const react$1 = require('@zag-js/react');
|
|
8
|
+
const react = require('react');
|
|
8
9
|
const factory = require('../factory.cjs');
|
|
9
|
-
const forwardRef = require('../forward-ref.cjs');
|
|
10
10
|
const segmentContext = require('./segment-context.cjs');
|
|
11
11
|
const segmentGroupContext = require('./segment-group-context.cjs');
|
|
12
12
|
const segmentGroup_anatomy = require('./segment-group.anatomy.cjs');
|
|
13
13
|
|
|
14
|
-
const Segment =
|
|
14
|
+
const Segment = react.forwardRef((props, ref) => {
|
|
15
15
|
const { value, disabled, invalid, readOnly, ...divProps } = props;
|
|
16
16
|
const { getRadioProps } = segmentGroupContext.useSegmentGroupContext();
|
|
17
|
-
const mergedProps = react.mergeProps(getRadioProps({ value, disabled }), divProps);
|
|
17
|
+
const mergedProps = react$1.mergeProps(getRadioProps({ value, disabled }), divProps);
|
|
18
18
|
return /* @__PURE__ */ jsxRuntime.jsx(segmentContext.SegmentProvider, { value: { value, disabled, invalid, readOnly }, children: /* @__PURE__ */ jsxRuntime.jsx(factory.ark.label, { ...mergedProps, ...segmentGroup_anatomy.parts.radio.attrs, ref }) });
|
|
19
19
|
});
|
|
20
|
+
Segment.displayName = "Segment";
|
|
20
21
|
|
|
21
22
|
exports.Segment = Segment;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import type { ForwardRefExoticComponent } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import type { ForwardRefExoticComponent, DetailedHTMLProps, LabelHTMLAttributes, RefObject, RefAttributes, type ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
3
|
import type { Assign } from '../types';
|
|
4
4
|
import { type SegmentContext } from './segment-context';
|
|
5
|
-
export type SegmentProps = Assign<
|
|
6
|
-
export declare const Segment: ForwardRefExoticComponent<
|
|
5
|
+
export type SegmentProps = Assign<ComponentPropsWithoutRef<typeof ark.label>, SegmentContext>;
|
|
6
|
+
export declare const Segment: ForwardRefExoticComponent<Omit<Omit<Omit<DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
7
|
+
ref?: ((instance: HTMLLabelElement | null) => void) | RefObject<HTMLLabelElement> | null | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
asChild?: boolean | undefined;
|
|
10
|
+
}, "ref">, keyof {
|
|
7
11
|
value: string;
|
|
8
12
|
disabled?: boolean | undefined;
|
|
9
13
|
readOnly?: boolean | undefined;
|
|
10
14
|
invalid?: boolean | undefined;
|
|
11
|
-
}
|
|
15
|
+
}> & {
|
|
16
|
+
value: string;
|
|
17
|
+
disabled?: boolean | undefined;
|
|
18
|
+
readOnly?: boolean | undefined;
|
|
19
|
+
invalid?: boolean | undefined;
|
|
20
|
+
} & RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { mergeProps } from '@zag-js/react';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
4
5
|
import { ark } from '../factory.mjs';
|
|
5
|
-
import { forwardRef } from '../forward-ref.mjs';
|
|
6
6
|
import { SegmentProvider } from './segment-context.mjs';
|
|
7
7
|
import { useSegmentGroupContext } from './segment-group-context.mjs';
|
|
8
8
|
import { parts } from './segment-group.anatomy.mjs';
|
|
@@ -13,5 +13,6 @@ const Segment = forwardRef((props, ref) => {
|
|
|
13
13
|
const mergedProps = mergeProps(getRadioProps({ value, disabled }), divProps);
|
|
14
14
|
return /* @__PURE__ */ jsx(SegmentProvider, { value: { value, disabled, invalid, readOnly }, children: /* @__PURE__ */ jsx(ark.label, { ...mergedProps, ...parts.radio.attrs, ref }) });
|
|
15
15
|
});
|
|
16
|
+
Segment.displayName = "Segment";
|
|
16
17
|
|
|
17
18
|
export { Segment };
|