@ark-ui/solid 0.2.0 → 0.3.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/README.md +100 -0
- package/dist/accordion/accordion-content.cjs +5 -5
- package/dist/accordion/accordion-content.mjs +6 -6
- package/dist/accordion/accordion-context.cjs +2 -2
- package/dist/accordion/accordion-context.mjs +2 -2
- package/dist/accordion/accordion-item.cjs +10 -6
- package/dist/accordion/accordion-item.d.ts +1 -1
- package/dist/accordion/accordion-item.mjs +12 -8
- package/dist/accordion/accordion-trigger.cjs +7 -14
- package/dist/accordion/accordion-trigger.d.ts +4 -6
- package/dist/accordion/accordion-trigger.mjs +7 -14
- package/dist/accordion/accordion.cjs +6 -4
- package/dist/accordion/accordion.d.ts +1 -1
- package/dist/accordion/accordion.mjs +7 -5
- package/dist/carousel/carousel-context.cjs +13 -0
- package/dist/carousel/carousel-context.d.ts +62 -0
- package/dist/carousel/carousel-context.mjs +8 -0
- package/dist/carousel/carousel-control.cjs +10 -0
- package/dist/carousel/carousel-control.d.ts +4 -0
- package/dist/carousel/carousel-control.mjs +6 -0
- package/dist/carousel/carousel-next-slide-trigger.cjs +16 -0
- package/dist/carousel/carousel-next-slide-trigger.d.ts +4 -0
- package/dist/carousel/carousel-next-slide-trigger.mjs +12 -0
- package/dist/carousel/carousel-prev-slide-trigger.cjs +16 -0
- package/dist/carousel/carousel-prev-slide-trigger.d.ts +4 -0
- package/dist/carousel/carousel-prev-slide-trigger.mjs +12 -0
- package/dist/carousel/carousel-slide-group.cjs +16 -0
- package/dist/carousel/carousel-slide-group.d.ts +4 -0
- package/dist/carousel/carousel-slide-group.mjs +12 -0
- package/dist/carousel/carousel-slide.cjs +18 -0
- package/dist/carousel/carousel-slide.d.ts +6 -0
- package/dist/carousel/carousel-slide.mjs +14 -0
- package/dist/carousel/carousel-viewport.cjs +16 -0
- package/dist/carousel/carousel-viewport.d.ts +4 -0
- package/dist/carousel/carousel-viewport.mjs +12 -0
- package/dist/carousel/carousel.anatomy.cjs +10 -0
- package/dist/carousel/carousel.anatomy.d.ts +3 -0
- package/dist/carousel/carousel.anatomy.mjs +6 -0
- package/dist/carousel/carousel.cjs +24 -0
- package/dist/carousel/carousel.d.ts +6 -0
- package/dist/carousel/carousel.mjs +20 -0
- package/dist/carousel/index.d.ts +8 -0
- package/dist/carousel/use-carousel.cjs +36 -0
- package/dist/carousel/use-carousel.d.ts +35 -0
- package/dist/carousel/use-carousel.mjs +13 -0
- package/dist/checkbox/checkbox-context.cjs +2 -2
- package/dist/checkbox/checkbox-context.mjs +2 -2
- package/dist/checkbox/checkbox-control.cjs +3 -1
- package/dist/checkbox/checkbox-control.mjs +4 -2
- package/dist/checkbox/checkbox-input.cjs +3 -1
- package/dist/checkbox/checkbox-input.mjs +4 -2
- package/dist/checkbox/checkbox-label.cjs +3 -1
- package/dist/checkbox/checkbox-label.mjs +4 -2
- package/dist/checkbox/checkbox.cjs +10 -13
- package/dist/checkbox/checkbox.d.ts +3 -5
- package/dist/checkbox/checkbox.mjs +12 -15
- package/dist/combobox/combobox-content.cjs +3 -1
- package/dist/combobox/combobox-content.mjs +4 -2
- package/dist/combobox/combobox-control.cjs +3 -1
- package/dist/combobox/combobox-control.mjs +4 -2
- package/dist/combobox/combobox-input.cjs +3 -1
- package/dist/combobox/combobox-input.mjs +4 -2
- package/dist/combobox/combobox-label.cjs +3 -1
- package/dist/combobox/combobox-label.mjs +4 -2
- package/dist/combobox/combobox-option.cjs +5 -6
- package/dist/combobox/combobox-option.d.ts +1 -1
- package/dist/combobox/combobox-option.mjs +8 -9
- package/dist/combobox/combobox-positioner.cjs +3 -1
- package/dist/combobox/combobox-positioner.mjs +4 -2
- package/dist/combobox/combobox-trigger.cjs +4 -11
- package/dist/combobox/combobox-trigger.d.ts +4 -6
- package/dist/combobox/combobox-trigger.mjs +5 -12
- package/dist/combobox/combobox.cjs +9 -12
- package/dist/combobox/combobox.d.ts +3 -5
- package/dist/combobox/combobox.mjs +11 -14
- package/dist/create-split-props.d.ts +3 -1
- package/dist/dialog/dialog-backdrop.cjs +3 -1
- package/dist/dialog/dialog-backdrop.mjs +4 -2
- package/dist/dialog/dialog-close-trigger.cjs +4 -11
- package/dist/dialog/dialog-close-trigger.d.ts +4 -6
- package/dist/dialog/dialog-close-trigger.mjs +5 -12
- package/dist/dialog/dialog-container.cjs +3 -1
- package/dist/dialog/dialog-container.mjs +4 -2
- package/dist/dialog/dialog-content.cjs +3 -1
- package/dist/dialog/dialog-content.mjs +4 -2
- package/dist/dialog/dialog-description.cjs +3 -1
- package/dist/dialog/dialog-description.mjs +4 -2
- package/dist/dialog/dialog-title.cjs +3 -1
- package/dist/dialog/dialog-title.mjs +4 -2
- package/dist/dialog/dialog-trigger.cjs +4 -11
- package/dist/dialog/dialog-trigger.d.ts +4 -6
- package/dist/dialog/dialog-trigger.mjs +5 -12
- package/dist/dialog/dialog.cjs +5 -6
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dialog/dialog.mjs +5 -6
- package/dist/editable/editable-area.cjs +3 -1
- package/dist/editable/editable-area.mjs +4 -2
- package/dist/editable/editable-cancel-trigger.cjs +5 -12
- package/dist/editable/editable-cancel-trigger.d.ts +4 -6
- package/dist/editable/editable-cancel-trigger.mjs +6 -13
- package/dist/editable/editable-control.cjs +3 -1
- package/dist/editable/editable-control.mjs +4 -2
- package/dist/editable/editable-edit-trigger.cjs +5 -12
- package/dist/editable/editable-edit-trigger.d.ts +4 -6
- package/dist/editable/editable-edit-trigger.mjs +6 -13
- package/dist/editable/editable-input.cjs +3 -1
- package/dist/editable/editable-input.mjs +4 -2
- package/dist/editable/editable-label.cjs +3 -1
- package/dist/editable/editable-label.mjs +4 -2
- package/dist/editable/editable-preview.cjs +3 -1
- package/dist/editable/editable-preview.mjs +4 -2
- package/dist/editable/editable-submit-trigger.cjs +4 -11
- package/dist/editable/editable-submit-trigger.d.ts +4 -6
- package/dist/editable/editable-submit-trigger.mjs +5 -12
- package/dist/editable/editable.cjs +10 -11
- package/dist/editable/editable.d.ts +4 -6
- package/dist/editable/editable.mjs +13 -14
- package/dist/factory.cjs +43 -9
- package/dist/factory.d.ts +14 -12
- package/dist/factory.mjs +43 -10
- package/dist/filter-props.cjs +28 -0
- package/dist/filter-props.d.ts +2 -0
- package/dist/filter-props.mjs +23 -0
- package/dist/hover-card/hover-card-arrow-tip.cjs +3 -1
- package/dist/hover-card/hover-card-arrow-tip.mjs +4 -2
- package/dist/hover-card/hover-card-arrow.cjs +3 -1
- package/dist/hover-card/hover-card-arrow.mjs +4 -2
- package/dist/hover-card/hover-card-content.cjs +3 -1
- package/dist/hover-card/hover-card-content.mjs +4 -2
- package/dist/hover-card/hover-card-positioner.cjs +3 -1
- package/dist/hover-card/hover-card-positioner.mjs +4 -2
- package/dist/hover-card/hover-card-trigger.cjs +4 -11
- package/dist/hover-card/hover-card-trigger.d.ts +4 -6
- package/dist/hover-card/hover-card-trigger.mjs +5 -12
- package/dist/index.cjs +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +9 -0
- package/dist/menu/menu-arrow-tip.cjs +3 -1
- package/dist/menu/menu-arrow-tip.mjs +4 -2
- package/dist/menu/menu-arrow.cjs +3 -1
- package/dist/menu/menu-arrow.mjs +4 -2
- package/dist/menu/menu-content.cjs +3 -1
- package/dist/menu/menu-content.mjs +4 -2
- package/dist/menu/menu-context-trigger.cjs +4 -9
- package/dist/menu/menu-context-trigger.d.ts +4 -6
- package/dist/menu/menu-context-trigger.mjs +5 -10
- package/dist/menu/menu-item-group-label.cjs +4 -2
- package/dist/menu/menu-item-group-label.d.ts +1 -1
- package/dist/menu/menu-item-group-label.mjs +5 -3
- package/dist/menu/menu-item-group.cjs +4 -2
- package/dist/menu/menu-item-group.d.ts +1 -1
- package/dist/menu/menu-item-group.mjs +5 -3
- package/dist/menu/menu-item.cjs +4 -2
- package/dist/menu/menu-item.d.ts +1 -1
- package/dist/menu/menu-item.mjs +5 -3
- package/dist/menu/menu-option-item.cjs +9 -4
- package/dist/menu/menu-option-item.d.ts +3 -3
- package/dist/menu/menu-option-item.mjs +11 -6
- package/dist/menu/menu-positioner.cjs +3 -1
- package/dist/menu/menu-positioner.mjs +4 -2
- package/dist/menu/menu-separator.cjs +3 -1
- package/dist/menu/menu-separator.mjs +4 -2
- package/dist/menu/menu-trigger-item.cjs +3 -1
- package/dist/menu/menu-trigger-item.mjs +4 -2
- package/dist/menu/menu-trigger.cjs +4 -10
- package/dist/menu/menu-trigger.d.ts +4 -6
- package/dist/menu/menu-trigger.mjs +5 -11
- package/dist/menu/menu.cjs +13 -21
- package/dist/menu/menu.d.ts +1 -1
- package/dist/menu/menu.mjs +15 -23
- package/dist/number-input/number-input-control.cjs +4 -2
- package/dist/number-input/number-input-control.mjs +5 -3
- package/dist/number-input/number-input-decrement-trigger.cjs +5 -12
- package/dist/number-input/number-input-decrement-trigger.d.ts +4 -6
- package/dist/number-input/number-input-decrement-trigger.mjs +6 -13
- package/dist/number-input/number-input-field.cjs +4 -2
- package/dist/number-input/number-input-field.mjs +5 -3
- package/dist/number-input/number-input-increment-trigger.cjs +5 -12
- package/dist/number-input/number-input-increment-trigger.d.ts +4 -6
- package/dist/number-input/number-input-increment-trigger.mjs +6 -13
- package/dist/number-input/number-input-label.cjs +4 -2
- package/dist/number-input/number-input-label.mjs +5 -3
- package/dist/number-input/number-input-scrubber.cjs +4 -2
- package/dist/number-input/number-input-scrubber.mjs +5 -3
- package/dist/number-input/number-input.cjs +6 -4
- package/dist/number-input/number-input.d.ts +1 -1
- package/dist/number-input/number-input.mjs +7 -5
- package/dist/pagination/index.d.ts +1 -0
- package/dist/pagination/pagination-context.d.ts +5 -15
- package/dist/pagination/pagination-ellipsis.cjs +5 -3
- package/dist/pagination/pagination-ellipsis.d.ts +3 -6
- package/dist/pagination/pagination-ellipsis.mjs +6 -4
- package/dist/pagination/pagination-list-item.cjs +11 -0
- package/dist/pagination/pagination-list-item.d.ts +4 -0
- package/dist/pagination/pagination-list-item.mjs +7 -0
- package/dist/pagination/pagination-list.cjs +2 -1
- package/dist/pagination/pagination-list.mjs +3 -2
- package/dist/pagination/pagination-page-trigger.d.ts +1 -1
- package/dist/pagination/pagination-prev-page-trigger.cjs +2 -2
- package/dist/pagination/pagination-prev-page-trigger.mjs +2 -2
- package/dist/pagination/pagination.anatomy.cjs +3 -1
- package/dist/pagination/pagination.anatomy.d.ts +3 -2
- package/dist/pagination/pagination.anatomy.mjs +3 -2
- package/dist/pagination/pagination.cjs +9 -7
- package/dist/pagination/pagination.d.ts +3 -3
- package/dist/pagination/pagination.mjs +11 -9
- package/dist/pagination/use-pagination.d.ts +3 -8
- package/dist/pin-input/pin-input-control.cjs +8 -4
- package/dist/pin-input/pin-input-control.mjs +9 -5
- package/dist/pin-input/pin-input-field.cjs +6 -8
- package/dist/pin-input/pin-input-field.d.ts +1 -1
- package/dist/pin-input/pin-input-field.mjs +7 -9
- package/dist/pin-input/pin-input-label.cjs +4 -2
- package/dist/pin-input/pin-input-label.mjs +5 -3
- package/dist/pin-input/pin-input.cjs +5 -3
- package/dist/pin-input/pin-input.d.ts +1 -1
- package/dist/pin-input/pin-input.mjs +6 -4
- package/dist/popover/popover-anchor.cjs +6 -13
- package/dist/popover/popover-anchor.d.ts +4 -6
- package/dist/popover/popover-anchor.mjs +6 -13
- package/dist/popover/popover-arrow-tip.cjs +3 -1
- package/dist/popover/popover-arrow-tip.mjs +4 -2
- package/dist/popover/popover-arrow.cjs +3 -1
- package/dist/popover/popover-arrow.mjs +4 -2
- package/dist/popover/popover-close-trigger.cjs +5 -12
- package/dist/popover/popover-close-trigger.d.ts +4 -6
- package/dist/popover/popover-close-trigger.mjs +6 -13
- package/dist/popover/popover-content.cjs +4 -2
- package/dist/popover/popover-content.mjs +5 -3
- package/dist/popover/popover-description.cjs +4 -2
- package/dist/popover/popover-description.mjs +5 -3
- package/dist/popover/popover-positioner.cjs +4 -2
- package/dist/popover/popover-positioner.mjs +5 -3
- package/dist/popover/popover-title.cjs +4 -2
- package/dist/popover/popover-title.mjs +5 -3
- package/dist/popover/popover-trigger.cjs +6 -13
- package/dist/popover/popover-trigger.d.ts +4 -6
- package/dist/popover/popover-trigger.mjs +6 -13
- package/dist/popover/popover.cjs +2 -2
- package/dist/popover/popover.mjs +2 -2
- package/dist/pressable/pressable.cjs +5 -5
- package/dist/pressable/pressable.d.ts +1 -1
- package/dist/pressable/pressable.mjs +6 -6
- package/dist/pressable/use-pressable.cjs +1 -1
- package/dist/pressable/use-pressable.d.ts +3 -3
- package/dist/pressable/use-pressable.mjs +2 -2
- package/dist/prop-trap.cjs +37 -0
- package/dist/prop-trap.d.ts +5 -0
- package/dist/prop-trap.mjs +33 -0
- package/dist/radio-group/radio-control.cjs +5 -3
- package/dist/radio-group/radio-control.mjs +6 -4
- package/dist/radio-group/radio-group-label.cjs +4 -2
- package/dist/radio-group/radio-group-label.mjs +5 -3
- package/dist/radio-group/radio-group.cjs +6 -4
- package/dist/radio-group/radio-group.d.ts +1 -1
- package/dist/radio-group/radio-group.mjs +7 -5
- package/dist/radio-group/radio-input.cjs +5 -3
- package/dist/radio-group/radio-input.mjs +6 -4
- package/dist/radio-group/radio-label.cjs +5 -3
- package/dist/radio-group/radio-label.mjs +6 -4
- package/dist/radio-group/radio.cjs +5 -6
- package/dist/radio-group/radio.d.ts +1 -1
- package/dist/radio-group/radio.mjs +6 -7
- package/dist/range-slider/range-slider-control.cjs +3 -1
- package/dist/range-slider/range-slider-control.mjs +4 -2
- package/dist/range-slider/range-slider-label.cjs +3 -1
- package/dist/range-slider/range-slider-label.mjs +4 -2
- package/dist/range-slider/range-slider-marker-group.cjs +3 -1
- package/dist/range-slider/range-slider-marker-group.mjs +4 -2
- package/dist/range-slider/range-slider-marker.cjs +5 -3
- package/dist/range-slider/range-slider-marker.d.ts +1 -1
- package/dist/range-slider/range-slider-marker.mjs +6 -4
- package/dist/range-slider/range-slider-output.cjs +6 -5
- package/dist/range-slider/range-slider-output.d.ts +2 -2
- package/dist/range-slider/range-slider-output.mjs +7 -6
- package/dist/range-slider/range-slider-range.cjs +3 -1
- package/dist/range-slider/range-slider-range.mjs +4 -2
- package/dist/range-slider/range-slider-thumb.cjs +5 -3
- package/dist/range-slider/range-slider-thumb.d.ts +1 -1
- package/dist/range-slider/range-slider-thumb.mjs +6 -4
- package/dist/range-slider/range-slider-track.cjs +3 -1
- package/dist/range-slider/range-slider-track.mjs +4 -2
- package/dist/range-slider/range-slider.cjs +7 -6
- package/dist/range-slider/range-slider.d.ts +2 -2
- package/dist/range-slider/range-slider.mjs +7 -6
- package/dist/rating-group/rating-context.d.ts +4 -3
- package/dist/rating-group/rating-group-control.cjs +6 -5
- package/dist/rating-group/rating-group-control.d.ts +3 -2
- package/dist/rating-group/rating-group-control.mjs +7 -6
- package/dist/rating-group/rating-group-label.cjs +3 -1
- package/dist/rating-group/rating-group-label.mjs +4 -2
- package/dist/rating-group/rating-group.cjs +7 -5
- package/dist/rating-group/rating-group.d.ts +2 -2
- package/dist/rating-group/rating-group.mjs +8 -6
- package/dist/rating-group/rating.cjs +9 -8
- package/dist/rating-group/rating.d.ts +5 -3
- package/dist/rating-group/rating.mjs +10 -9
- package/dist/select/select-content.cjs +4 -2
- package/dist/select/select-content.mjs +5 -3
- package/dist/select/select-label.cjs +4 -2
- package/dist/select/select-label.mjs +5 -3
- package/dist/select/select-option-group-label.cjs +5 -3
- package/dist/select/select-option-group-label.d.ts +3 -3
- package/dist/select/select-option-group-label.mjs +6 -4
- package/dist/select/select-option-group.cjs +5 -3
- package/dist/select/select-option-group.d.ts +3 -3
- package/dist/select/select-option-group.mjs +6 -4
- package/dist/select/select-option.cjs +6 -4
- package/dist/select/select-option.d.ts +3 -3
- package/dist/select/select-option.mjs +7 -5
- package/dist/select/select-positioner.cjs +4 -2
- package/dist/select/select-positioner.mjs +5 -3
- package/dist/select/select-trigger.cjs +5 -12
- package/dist/select/select-trigger.d.ts +4 -6
- package/dist/select/select-trigger.mjs +6 -13
- package/dist/select/select.cjs +5 -12
- package/dist/select/select.d.ts +1 -1
- package/dist/select/select.mjs +7 -14
- package/dist/slider/slider-control.cjs +4 -2
- package/dist/slider/slider-control.mjs +5 -3
- package/dist/slider/slider-label.cjs +4 -2
- package/dist/slider/slider-label.mjs +5 -3
- package/dist/slider/slider-marker-group.cjs +4 -2
- package/dist/slider/slider-marker-group.mjs +5 -3
- package/dist/slider/slider-marker.cjs +5 -3
- package/dist/slider/slider-marker.d.ts +3 -3
- package/dist/slider/slider-marker.mjs +6 -4
- package/dist/slider/slider-output.cjs +7 -4
- package/dist/slider/slider-output.d.ts +2 -2
- package/dist/slider/slider-output.mjs +8 -5
- package/dist/slider/slider-range.cjs +3 -1
- package/dist/slider/slider-range.mjs +4 -2
- package/dist/slider/slider-thumb.cjs +5 -3
- package/dist/slider/slider-thumb.mjs +6 -4
- package/dist/slider/slider-track.cjs +3 -1
- package/dist/slider/slider-track.mjs +4 -2
- package/dist/slider/slider.cjs +10 -7
- package/dist/slider/slider.d.ts +2 -2
- package/dist/slider/slider.mjs +11 -8
- package/dist/splitter/splitter-panel.cjs +5 -3
- package/dist/splitter/splitter-panel.d.ts +3 -3
- package/dist/splitter/splitter-panel.mjs +6 -4
- package/dist/splitter/splitter-resize-trigger.cjs +7 -12
- package/dist/splitter/splitter-resize-trigger.d.ts +7 -9
- package/dist/splitter/splitter-resize-trigger.mjs +8 -13
- package/dist/splitter/splitter.cjs +6 -4
- package/dist/splitter/splitter.d.ts +1 -1
- package/dist/splitter/splitter.mjs +7 -5
- package/dist/spread.cjs +26 -13
- package/dist/spread.mjs +26 -13
- package/dist/tabs/tab-content.cjs +5 -3
- package/dist/tabs/tab-content.d.ts +3 -3
- package/dist/tabs/tab-content.mjs +6 -4
- package/dist/tabs/tab-indicator.cjs +4 -2
- package/dist/tabs/tab-indicator.mjs +5 -3
- package/dist/tabs/tab-list.cjs +4 -2
- package/dist/tabs/tab-list.mjs +5 -3
- package/dist/tabs/tab-trigger.cjs +6 -13
- package/dist/tabs/tab-trigger.d.ts +6 -8
- package/dist/tabs/tab-trigger.mjs +7 -14
- package/dist/tabs/tabs.cjs +6 -4
- package/dist/tabs/tabs.d.ts +1 -1
- package/dist/tabs/tabs.mjs +7 -5
- package/dist/tags-input/tag-delete-trigger.cjs +6 -13
- package/dist/tags-input/tag-delete-trigger.d.ts +5 -7
- package/dist/tags-input/tag-delete-trigger.mjs +7 -14
- package/dist/tags-input/tag-input.cjs +5 -3
- package/dist/tags-input/tag-input.d.ts +1 -1
- package/dist/tags-input/tag-input.mjs +6 -4
- package/dist/tags-input/tag.cjs +5 -3
- package/dist/tags-input/tag.d.ts +1 -1
- package/dist/tags-input/tag.mjs +6 -4
- package/dist/tags-input/tags-input-clear-trigger.cjs +4 -11
- package/dist/tags-input/tags-input-clear-trigger.d.ts +4 -6
- package/dist/tags-input/tags-input-clear-trigger.mjs +5 -12
- package/dist/tags-input/tags-input-control.cjs +4 -2
- package/dist/tags-input/tags-input-control.mjs +5 -3
- package/dist/tags-input/tags-input-field.cjs +4 -2
- package/dist/tags-input/tags-input-field.mjs +5 -3
- package/dist/tags-input/tags-input-label.cjs +4 -2
- package/dist/tags-input/tags-input-label.mjs +5 -3
- package/dist/tags-input/tags-input.cjs +10 -7
- package/dist/tags-input/tags-input.d.ts +3 -3
- package/dist/tags-input/tags-input.mjs +11 -8
- package/dist/toast/toast-close-trigger.cjs +5 -12
- package/dist/toast/toast-close-trigger.d.ts +4 -6
- package/dist/toast/toast-close-trigger.mjs +6 -13
- package/dist/toast/toast-description.cjs +5 -3
- package/dist/toast/toast-description.mjs +6 -4
- package/dist/toast/toast-group.cjs +8 -6
- package/dist/toast/toast-group.d.ts +6 -4
- package/dist/toast/toast-group.mjs +10 -8
- package/dist/toast/toast-placements.cjs +4 -2
- package/dist/toast/toast-placements.d.ts +2 -2
- package/dist/toast/toast-placements.mjs +5 -3
- package/dist/toast/toast-provider.cjs +2 -2
- package/dist/toast/toast-provider.mjs +2 -2
- package/dist/toast/toast-title.cjs +3 -1
- package/dist/toast/toast-title.mjs +4 -2
- package/dist/toast/toast.cjs +6 -4
- package/dist/toast/toast.d.ts +1 -1
- package/dist/toast/toast.mjs +7 -5
- package/dist/tooltip/tooltip-arrow-tip.cjs +4 -2
- package/dist/tooltip/tooltip-arrow-tip.mjs +5 -3
- package/dist/tooltip/tooltip-arrow.cjs +3 -1
- package/dist/tooltip/tooltip-arrow.mjs +4 -2
- package/dist/tooltip/tooltip-content.cjs +4 -2
- package/dist/tooltip/tooltip-content.mjs +5 -3
- package/dist/tooltip/tooltip-context.cjs +2 -2
- package/dist/tooltip/tooltip-context.mjs +2 -2
- package/dist/tooltip/tooltip-positioner.cjs +5 -3
- package/dist/tooltip/tooltip-positioner.mjs +6 -4
- package/dist/tooltip/tooltip-trigger.cjs +5 -12
- package/dist/tooltip/tooltip-trigger.d.ts +4 -6
- package/dist/tooltip/tooltip-trigger.mjs +6 -13
- package/dist/tooltip/tooltip.cjs +4 -4
- package/dist/tooltip/tooltip.mjs +4 -4
- package/dist/types.d.ts +7 -4
- package/package.json +70 -40
|
@@ -2,22 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
8
|
const popoverContext = require('./popover-context.cjs');
|
|
9
9
|
|
|
10
10
|
const PopoverAnchor = props => {
|
|
11
|
-
const
|
|
12
|
-
const anchorProps =
|
|
13
|
-
|
|
14
|
-
solidJs.createEffect(() => {
|
|
15
|
-
const children = getChildren();
|
|
16
|
-
if (children instanceof HTMLElement) {
|
|
17
|
-
spread.spread(children, anchorProps);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return getChildren();
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const anchorProps = solid.mergeProps(() => api().anchorProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, anchorProps);
|
|
21
14
|
};
|
|
22
15
|
|
|
23
16
|
exports.PopoverAnchor = PopoverAnchor;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type
|
|
3
|
-
export type PopoverAnchorProps =
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const PopoverAnchor: (props: PopoverAnchorProps) => ResolvedChildren;
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
export type PopoverAnchorProps = HTMLArkProps<'div'>;
|
|
4
|
+
export declare const PopoverAnchor: (props: PopoverAnchorProps) => JSX.Element;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
5
5
|
|
|
6
6
|
const PopoverAnchor = props => {
|
|
7
|
-
const
|
|
8
|
-
const anchorProps =
|
|
9
|
-
|
|
10
|
-
createEffect(() => {
|
|
11
|
-
const children = getChildren();
|
|
12
|
-
if (children instanceof HTMLElement) {
|
|
13
|
-
spread(children, anchorProps);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return getChildren();
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const anchorProps = mergeProps(() => api().anchorProps, props);
|
|
9
|
+
return createComponent(ark.div, anchorProps);
|
|
17
10
|
};
|
|
18
11
|
|
|
19
12
|
export { PopoverAnchor };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverArrowTip = props => {
|
|
10
11
|
const popover = popoverContext.usePopoverContext();
|
|
11
|
-
|
|
12
|
+
const arrowTipProps = solid.mergeProps(() => popover().arrowTipProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, arrowTipProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverArrowTip = PopoverArrowTip;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverArrowTip = props => {
|
|
6
7
|
const popover = usePopoverContext();
|
|
7
|
-
|
|
8
|
+
const arrowTipProps = mergeProps(() => popover().arrowTipProps, props);
|
|
9
|
+
return createComponent(ark.div, arrowTipProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverArrowTip };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverArrow = props => {
|
|
10
11
|
const popover = popoverContext.usePopoverContext();
|
|
11
|
-
|
|
12
|
+
const arrowProps = solid.mergeProps(() => popover().arrowProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, arrowProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverArrow = PopoverArrow;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverArrow = props => {
|
|
6
7
|
const popover = usePopoverContext();
|
|
7
|
-
|
|
8
|
+
const arrowProps = mergeProps(() => popover().arrowProps, props);
|
|
9
|
+
return createComponent(ark.div, arrowProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverArrow };
|
|
@@ -2,22 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const solidJs = require('solid-js');
|
|
6
5
|
const web = require('solid-js/web');
|
|
7
|
-
const
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
8
|
const popoverContext = require('./popover-context.cjs');
|
|
9
9
|
|
|
10
10
|
const PopoverCloseTrigger = props => {
|
|
11
|
-
const
|
|
12
|
-
const triggerProps =
|
|
13
|
-
|
|
14
|
-
solidJs.createEffect(() => {
|
|
15
|
-
const children = getChildren();
|
|
16
|
-
if (children instanceof HTMLElement) {
|
|
17
|
-
web.spread(children, triggerProps);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return getChildren();
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const triggerProps = solid.mergeProps(() => api().closeTriggerProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.button, triggerProps);
|
|
21
14
|
};
|
|
22
15
|
|
|
23
16
|
exports.PopoverCloseTrigger = PopoverCloseTrigger;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type
|
|
3
|
-
export type PopoverCloseTriggerProps =
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const PopoverCloseTrigger: (props: PopoverCloseTriggerProps) => ResolvedChildren;
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
export type PopoverCloseTriggerProps = HTMLArkProps<'button'>;
|
|
4
|
+
export declare const PopoverCloseTrigger: (props: PopoverCloseTriggerProps) => JSX.Element;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
5
5
|
|
|
6
6
|
const PopoverCloseTrigger = props => {
|
|
7
|
-
const
|
|
8
|
-
const triggerProps =
|
|
9
|
-
|
|
10
|
-
createEffect(() => {
|
|
11
|
-
const children = getChildren();
|
|
12
|
-
if (children instanceof HTMLElement) {
|
|
13
|
-
spread(children, triggerProps);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return getChildren();
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const triggerProps = mergeProps(() => api().closeTriggerProps, props);
|
|
9
|
+
return createComponent(ark.button, triggerProps);
|
|
17
10
|
};
|
|
18
11
|
|
|
19
12
|
export { PopoverCloseTrigger };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverContent = props => {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const contentProps = solid.mergeProps(() => api().contentProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, contentProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverContent = PopoverContent;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverContent = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const contentProps = mergeProps(() => api().contentProps, props);
|
|
9
|
+
return createComponent(ark.div, contentProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverContent };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverDescription = props => {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const descriptionProps = solid.mergeProps(() => api().descriptionProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, descriptionProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverDescription = PopoverDescription;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverDescription = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const descriptionProps = mergeProps(() => api().descriptionProps, props);
|
|
9
|
+
return createComponent(ark.div, descriptionProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverDescription };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverPositioner = props => {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const positionerProps = solid.mergeProps(() => api().positionerProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, positionerProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverPositioner = PopoverPositioner;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverPositioner = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const positionerProps = mergeProps(() => api().positionerProps, props);
|
|
9
|
+
return createComponent(ark.div, positionerProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverPositioner };
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const popoverContext = require('./popover-context.cjs');
|
|
8
9
|
|
|
9
10
|
const PopoverTitle = props => {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const titleProps = solid.mergeProps(() => api().titleProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, titleProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.PopoverTitle = PopoverTitle;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { ark } from '../factory.mjs';
|
|
3
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
4
5
|
|
|
5
6
|
const PopoverTitle = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const titleProps = mergeProps(() => api().titleProps, props);
|
|
9
|
+
return createComponent(ark.div, titleProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { PopoverTitle };
|
|
@@ -2,22 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
8
|
const popoverContext = require('./popover-context.cjs');
|
|
9
9
|
|
|
10
10
|
const PopoverTrigger = props => {
|
|
11
|
-
const
|
|
12
|
-
const triggerProps =
|
|
13
|
-
|
|
14
|
-
solidJs.createEffect(() => {
|
|
15
|
-
const children = getChildren();
|
|
16
|
-
if (children instanceof HTMLElement) {
|
|
17
|
-
spread.spread(children, triggerProps);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
return getChildren();
|
|
11
|
+
const api = popoverContext.usePopoverContext();
|
|
12
|
+
const triggerProps = solid.mergeProps(() => api().triggerProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.button, triggerProps);
|
|
21
14
|
};
|
|
22
15
|
|
|
23
16
|
exports.PopoverTrigger = PopoverTrigger;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { type
|
|
3
|
-
export type PopoverTriggerProps =
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export declare const PopoverTrigger: (props: PopoverTriggerProps) => ResolvedChildren;
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
export type PopoverTriggerProps = HTMLArkProps<'button'>;
|
|
4
|
+
export declare const PopoverTrigger: (props: PopoverTriggerProps) => JSX.Element;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
4
|
import { usePopoverContext } from './popover-context.mjs';
|
|
5
5
|
|
|
6
6
|
const PopoverTrigger = props => {
|
|
7
|
-
const
|
|
8
|
-
const triggerProps =
|
|
9
|
-
|
|
10
|
-
createEffect(() => {
|
|
11
|
-
const children = getChildren();
|
|
12
|
-
if (children instanceof HTMLElement) {
|
|
13
|
-
spread(children, triggerProps);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return getChildren();
|
|
7
|
+
const api = usePopoverContext();
|
|
8
|
+
const triggerProps = mergeProps(() => api().triggerProps, props);
|
|
9
|
+
return createComponent(ark.button, triggerProps);
|
|
17
10
|
};
|
|
18
11
|
|
|
19
12
|
export { PopoverTrigger };
|
package/dist/popover/popover.cjs
CHANGED
|
@@ -9,9 +9,9 @@ const usePopover = require('./use-popover.cjs');
|
|
|
9
9
|
|
|
10
10
|
const Popover = props => {
|
|
11
11
|
const [usePopoverProps, restProps] = createSplitProps.createSplitProps()(props, ['autoFocus', 'closeOnEsc', 'closeOnInteractOutside', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onClose', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpen', 'onPointerDownOutside', 'open', 'portalled', 'positioning']);
|
|
12
|
-
const
|
|
12
|
+
const api = usePopover.usePopover(usePopoverProps);
|
|
13
13
|
return web.createComponent(popoverContext.PopoverProvider, {
|
|
14
|
-
value:
|
|
14
|
+
value: api,
|
|
15
15
|
get children() {
|
|
16
16
|
return restProps.children;
|
|
17
17
|
}
|
package/dist/popover/popover.mjs
CHANGED
|
@@ -5,9 +5,9 @@ import { usePopover } from './use-popover.mjs';
|
|
|
5
5
|
|
|
6
6
|
const Popover = props => {
|
|
7
7
|
const [usePopoverProps, restProps] = createSplitProps()(props, ['autoFocus', 'closeOnEsc', 'closeOnInteractOutside', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onClose', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpen', 'onPointerDownOutside', 'open', 'portalled', 'positioning']);
|
|
8
|
-
const
|
|
8
|
+
const api = usePopover(usePopoverProps);
|
|
9
9
|
return createComponent(PopoverProvider, {
|
|
10
|
-
value:
|
|
10
|
+
value: api,
|
|
11
11
|
get children() {
|
|
12
12
|
return restProps.children;
|
|
13
13
|
}
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const createSplitProps = require('../create-split-props.cjs');
|
|
7
8
|
const factory = require('../factory.cjs');
|
|
8
9
|
const usePressable = require('./use-pressable.cjs');
|
|
9
10
|
|
|
10
11
|
const Pressable = props => {
|
|
11
|
-
const [
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return web.createComponent(factory.ark.button, web.mergeProps(pressableProps, buttonProps));
|
|
12
|
+
const [pressableParams, restProps] = createSplitProps.createSplitProps()(props, ['allowTextSelectionOnPress', 'cancelOnPointerExit', 'dir', 'disabled', 'getRootNode', 'id', 'onLongPress', 'onPress', 'onPressEnd', 'onPressStart', 'onPressUp', 'preventFocusOnPress']);
|
|
13
|
+
const api = usePressable.usePressable(pressableParams);
|
|
14
|
+
const buttonProps = solid.mergeProps(() => api().pressableProps, restProps);
|
|
15
|
+
return web.createComponent(factory.ark.button, buttonProps);
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.Pressable = Pressable;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { JSX } from 'solid-js';
|
|
2
|
-
import { type Assign } from '@polymorphic-factory/solid';
|
|
3
2
|
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
4
|
import { type UsePressableProps } from './use-pressable';
|
|
5
5
|
export type PressableProps = Assign<HTMLArkProps<'button'>, UsePressableProps>;
|
|
6
6
|
export declare const Pressable: (props: PressableProps) => JSX.Element;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { createComponent
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
3
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
3
4
|
import { ark } from '../factory.mjs';
|
|
4
5
|
import { usePressable } from './use-pressable.mjs';
|
|
5
6
|
|
|
6
7
|
const Pressable = props => {
|
|
7
|
-
const [
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return createComponent(ark.button, mergeProps(pressableProps, buttonProps));
|
|
8
|
+
const [pressableParams, restProps] = createSplitProps()(props, ['allowTextSelectionOnPress', 'cancelOnPointerExit', 'dir', 'disabled', 'getRootNode', 'id', 'onLongPress', 'onPress', 'onPressEnd', 'onPressStart', 'onPressUp', 'preventFocusOnPress']);
|
|
9
|
+
const api = usePressable(pressableParams);
|
|
10
|
+
const buttonProps = mergeProps(() => api().pressableProps, restProps);
|
|
11
|
+
return createComponent(ark.button, buttonProps);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { Pressable };
|
|
@@ -35,7 +35,7 @@ const usePressable = props => {
|
|
|
35
35
|
const [state, send] = solid.useMachine(pressable__namespace.machine(context), {
|
|
36
36
|
context
|
|
37
37
|
});
|
|
38
|
-
return pressable__namespace.connect(state, send, solid.normalizeProps);
|
|
38
|
+
return solidJs.createMemo(() => pressable__namespace.connect(state, send, solid.normalizeProps));
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
exports.usePressable = usePressable;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { JSX } from 'solid-js';
|
|
1
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
2
2
|
import * as pressable from '@zag-js/pressable';
|
|
3
3
|
import { type Optional } from '../types';
|
|
4
4
|
export type UsePressableProps = Optional<pressable.Context, 'id'>;
|
|
5
5
|
export type UsePressableReturn = ReturnType<typeof usePressable>;
|
|
6
|
-
export declare const usePressable: (props?: UsePressableProps) => {
|
|
6
|
+
export declare const usePressable: (props?: UsePressableProps) => Accessor<{
|
|
7
7
|
isPressed: boolean;
|
|
8
8
|
pressableProps: JSX.HTMLAttributes<any>;
|
|
9
|
-
}
|
|
9
|
+
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as pressable from '@zag-js/pressable';
|
|
2
2
|
import { useMachine, normalizeProps } from '@zag-js/solid';
|
|
3
|
-
import { mergeProps, createUniqueId } from 'solid-js';
|
|
3
|
+
import { mergeProps, createUniqueId, createMemo } from 'solid-js';
|
|
4
4
|
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
5
5
|
|
|
6
6
|
const usePressable = props => {
|
|
@@ -12,7 +12,7 @@ const usePressable = props => {
|
|
|
12
12
|
const [state, send] = useMachine(pressable.machine(context), {
|
|
13
13
|
context
|
|
14
14
|
});
|
|
15
|
-
return pressable.connect(state, send, normalizeProps);
|
|
15
|
+
return createMemo(() => pressable.connect(state, send, normalizeProps));
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export { usePressable };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const solidJs = require('solid-js');
|
|
6
|
+
|
|
7
|
+
function trueFn() {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
const propTraps = {
|
|
11
|
+
get(_, property, receiver) {
|
|
12
|
+
if (property === solidJs.$PROXY)
|
|
13
|
+
return receiver;
|
|
14
|
+
return _.get(property);
|
|
15
|
+
},
|
|
16
|
+
has(_, property) {
|
|
17
|
+
return _.has(property);
|
|
18
|
+
},
|
|
19
|
+
set: trueFn,
|
|
20
|
+
deleteProperty: trueFn,
|
|
21
|
+
getOwnPropertyDescriptor(_, property) {
|
|
22
|
+
return {
|
|
23
|
+
configurable: true,
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get() {
|
|
26
|
+
return _.get(property);
|
|
27
|
+
},
|
|
28
|
+
set: trueFn,
|
|
29
|
+
deleteProperty: trueFn
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
ownKeys(_) {
|
|
33
|
+
return _.keys();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.propTraps = propTraps;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { $PROXY } from 'solid-js';
|
|
2
|
+
|
|
3
|
+
function trueFn() {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
const propTraps = {
|
|
7
|
+
get(_, property, receiver) {
|
|
8
|
+
if (property === $PROXY)
|
|
9
|
+
return receiver;
|
|
10
|
+
return _.get(property);
|
|
11
|
+
},
|
|
12
|
+
has(_, property) {
|
|
13
|
+
return _.has(property);
|
|
14
|
+
},
|
|
15
|
+
set: trueFn,
|
|
16
|
+
deleteProperty: trueFn,
|
|
17
|
+
getOwnPropertyDescriptor(_, property) {
|
|
18
|
+
return {
|
|
19
|
+
configurable: true,
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get() {
|
|
22
|
+
return _.get(property);
|
|
23
|
+
},
|
|
24
|
+
set: trueFn,
|
|
25
|
+
deleteProperty: trueFn
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
ownKeys(_) {
|
|
29
|
+
return _.keys();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { propTraps };
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
6
7
|
const factory = require('../factory.cjs');
|
|
7
8
|
const radioContext = require('./radio-context.cjs');
|
|
8
9
|
const radioGroupContext = require('./radio-group-context.cjs');
|
|
9
10
|
|
|
10
11
|
const RadioControl = props => {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const api = radioGroupContext.useRadioGroupContext();
|
|
13
|
+
const radioParams = radioContext.useRadioContext();
|
|
14
|
+
const controlProps = solid.mergeProps(() => api().getRadioControlProps(radioParams), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, controlProps);
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
exports.RadioControl = RadioControl;
|