@ark-ui/solid 0.1.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 -5
- 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 -5
- 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 -5
- 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 -5
- package/dist/dialog/dialog-trigger.mjs +5 -12
- package/dist/dialog/dialog.cjs +7 -6
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dialog/dialog.mjs +7 -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 -5
- 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 -5
- 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 -5
- 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/environment/environment.cjs +2 -2
- package/dist/environment/environment.mjs +2 -2
- 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 -5
- package/dist/hover-card/hover-card-trigger.mjs +5 -12
- package/dist/index.cjs +72 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.mjs +31 -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 -5
- 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 -5
- 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 -5
- 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 -5
- 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 +10 -6
- package/dist/pin-input/pin-input-control.mjs +11 -7
- 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 -5
- 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 -5
- 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 -5
- 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/index.d.ts +10 -0
- package/dist/range-slider/range-slider-context.cjs +13 -0
- package/dist/range-slider/range-slider-context.d.ts +61 -0
- package/dist/range-slider/range-slider-context.mjs +8 -0
- package/dist/range-slider/range-slider-control.cjs +16 -0
- package/dist/range-slider/range-slider-control.d.ts +4 -0
- package/dist/range-slider/range-slider-control.mjs +12 -0
- package/dist/range-slider/range-slider-label.cjs +16 -0
- package/dist/range-slider/range-slider-label.d.ts +4 -0
- package/dist/range-slider/range-slider-label.mjs +12 -0
- package/dist/range-slider/range-slider-marker-group.cjs +16 -0
- package/dist/range-slider/range-slider-marker-group.d.ts +4 -0
- package/dist/range-slider/range-slider-marker-group.mjs +12 -0
- package/dist/range-slider/range-slider-marker.cjs +18 -0
- package/dist/range-slider/range-slider-marker.d.ts +9 -0
- package/dist/range-slider/range-slider-marker.mjs +14 -0
- package/dist/range-slider/range-slider-output.cjs +22 -0
- package/dist/range-slider/range-slider-output.d.ts +8 -0
- package/dist/range-slider/range-slider-output.mjs +18 -0
- package/dist/range-slider/range-slider-range.cjs +16 -0
- package/dist/range-slider/range-slider-range.d.ts +4 -0
- package/dist/range-slider/range-slider-range.mjs +12 -0
- package/dist/range-slider/range-slider-thumb.cjs +18 -0
- package/dist/range-slider/range-slider-thumb.d.ts +9 -0
- package/dist/range-slider/range-slider-thumb.mjs +14 -0
- package/dist/range-slider/range-slider-track.cjs +16 -0
- package/dist/range-slider/range-slider-track.d.ts +4 -0
- package/dist/range-slider/range-slider-track.mjs +12 -0
- package/dist/range-slider/range-slider.anatomy.d.ts +1 -0
- package/dist/range-slider/range-slider.cjs +28 -0
- package/dist/range-slider/range-slider.d.ts +8 -0
- package/dist/range-slider/range-slider.mjs +24 -0
- package/dist/range-slider/use-range-slider.cjs +38 -0
- package/dist/range-slider/use-range-slider.d.ts +34 -0
- package/dist/range-slider/use-range-slider.mjs +15 -0
- 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 -5
- 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/index.d.ts +4 -0
- package/dist/splitter/splitter-context.cjs +13 -0
- package/dist/splitter/splitter-context.d.ts +50 -0
- package/dist/splitter/splitter-context.mjs +8 -0
- package/dist/splitter/splitter-panel.cjs +18 -0
- package/dist/splitter/splitter-panel.d.ts +8 -0
- package/dist/splitter/splitter-panel.mjs +14 -0
- package/dist/splitter/splitter-resize-trigger.cjs +18 -0
- package/dist/splitter/splitter-resize-trigger.d.ts +8 -0
- package/dist/splitter/splitter-resize-trigger.mjs +14 -0
- package/dist/splitter/splitter.anatomy.d.ts +1 -0
- package/dist/splitter/splitter.cjs +24 -0
- package/dist/splitter/splitter.d.ts +6 -0
- package/dist/splitter/splitter.mjs +20 -0
- package/dist/splitter/use-splitter.cjs +17 -0
- package/dist/splitter/use-splitter.d.ts +29 -0
- package/dist/splitter/use-splitter.mjs +13 -0
- 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 -7
- 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 -6
- 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 -5
- 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/index.d.ts +8 -0
- package/dist/toast/toast-close-trigger.cjs +16 -0
- package/dist/toast/toast-close-trigger.d.ts +4 -0
- package/dist/toast/toast-close-trigger.mjs +12 -0
- package/dist/toast/toast-description.cjs +20 -0
- package/dist/toast/toast-description.d.ts +4 -0
- package/dist/toast/toast-description.mjs +16 -0
- package/dist/toast/toast-group.cjs +27 -0
- package/dist/toast/toast-group.d.ts +13 -0
- package/dist/toast/toast-group.mjs +23 -0
- package/dist/toast/toast-item-context.cjs +13 -0
- package/dist/toast/toast-item-context.d.ts +38 -0
- package/dist/toast/toast-item-context.mjs +8 -0
- package/dist/toast/toast-placements.cjs +17 -0
- package/dist/toast/toast-placements.d.ts +6 -0
- package/dist/toast/toast-placements.mjs +13 -0
- package/dist/toast/toast-provider.cjs +52 -0
- package/dist/toast/toast-provider.d.ts +13 -0
- package/dist/toast/toast-provider.mjs +27 -0
- package/dist/toast/toast-title.cjs +20 -0
- package/dist/toast/toast-title.d.ts +4 -0
- package/dist/toast/toast-title.mjs +16 -0
- package/dist/toast/toast.anatomy.d.ts +1 -0
- package/dist/toast/toast.cjs +24 -0
- package/dist/toast/toast.d.ts +6 -0
- package/dist/toast/toast.mjs +20 -0
- package/dist/toast/use-toast-item.cjs +33 -0
- package/dist/toast/use-toast-item.d.ts +23 -0
- package/dist/toast/use-toast-item.mjs +10 -0
- 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 +71 -40
|
@@ -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 tagsInputContext = require('./tags-input-context.cjs');
|
|
8
9
|
|
|
9
10
|
const TagsInputLabel = props => {
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const api = tagsInputContext.useTagsInputContext();
|
|
12
|
+
const labelProps = solid.mergeProps(() => api().labelProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.label, labelProps);
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
exports.TagsInputLabel = TagsInputLabel;
|
|
@@ -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 { useTagsInputContext } from './tags-input-context.mjs';
|
|
4
5
|
|
|
5
6
|
const TagsInputLabel = props => {
|
|
6
|
-
const
|
|
7
|
-
|
|
7
|
+
const api = useTagsInputContext();
|
|
8
|
+
const labelProps = mergeProps(() => api().labelProps, props);
|
|
9
|
+
return createComponent(ark.label, labelProps);
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export { TagsInputLabel };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
5
|
const web = require('solid-js/web');
|
|
6
|
-
const
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
7
|
const createSplitProps = require('../create-split-props.cjs');
|
|
8
8
|
const factory = require('../factory.cjs');
|
|
9
9
|
const runIfFn = require('../run-if-fn.cjs');
|
|
@@ -11,14 +11,17 @@ const tagsInputContext = require('./tags-input-context.cjs');
|
|
|
11
11
|
const useTagsInput = require('./use-tags-input.cjs');
|
|
12
12
|
|
|
13
13
|
const TagsInput = props => {
|
|
14
|
-
const [
|
|
15
|
-
const
|
|
16
|
-
const
|
|
14
|
+
const [tagsInputParams, restProps] = createSplitProps.createSplitProps()(props, ['addOnPaste', 'allowEditTag', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onChange', 'onHighlight', 'onInteractOutside', 'onInvalid', 'onTagUpdate', 'readOnly', 'translations', 'validate', 'value']);
|
|
15
|
+
const api = useTagsInput.useTagsInput(tagsInputParams);
|
|
16
|
+
const rootProps = solid.mergeProps(() => api().rootProps, restProps);
|
|
17
|
+
const getChildren = () => runIfFn.runIfFn(restProps.children, api);
|
|
17
18
|
return web.createComponent(tagsInputContext.TagsInputProvider, {
|
|
18
|
-
value:
|
|
19
|
+
value: api,
|
|
19
20
|
get children() {
|
|
20
|
-
return web.createComponent(factory.ark.div, web.mergeProps(
|
|
21
|
-
children
|
|
21
|
+
return web.createComponent(factory.ark.div, web.mergeProps(rootProps, {
|
|
22
|
+
get children() {
|
|
23
|
+
return getChildren();
|
|
24
|
+
}
|
|
22
25
|
}));
|
|
23
26
|
}
|
|
24
27
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type Assign } from '@polymorphic-factory/solid';
|
|
2
1
|
import { type JSX } from 'solid-js/jsx-runtime';
|
|
3
2
|
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
4
|
import { type UseTagsInputProps, type UseTagsInputReturn } from './use-tags-input';
|
|
5
5
|
export type TagsInputChildren = {
|
|
6
|
-
children: (pages:
|
|
6
|
+
children: (pages: UseTagsInputReturn) => JSX.Element | JSX.Element;
|
|
7
7
|
};
|
|
8
|
-
export type TagsInputProps = Assign<
|
|
8
|
+
export type TagsInputProps = Assign<HTMLArkProps<'div'>, UseTagsInputProps & TagsInputChildren>;
|
|
9
9
|
export declare const TagsInput: (props: TagsInputProps) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createComponent, mergeProps } from 'solid-js/web';
|
|
2
|
-
import {
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
3
|
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
4
|
import { ark } from '../factory.mjs';
|
|
5
5
|
import { runIfFn } from '../run-if-fn.mjs';
|
|
@@ -7,14 +7,17 @@ import { TagsInputProvider } from './tags-input-context.mjs';
|
|
|
7
7
|
import { useTagsInput } from './use-tags-input.mjs';
|
|
8
8
|
|
|
9
9
|
const TagsInput = props => {
|
|
10
|
-
const [
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const [tagsInputParams, restProps] = createSplitProps()(props, ['addOnPaste', 'allowEditTag', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onChange', 'onHighlight', 'onInteractOutside', 'onInvalid', 'onTagUpdate', 'readOnly', 'translations', 'validate', 'value']);
|
|
11
|
+
const api = useTagsInput(tagsInputParams);
|
|
12
|
+
const rootProps = mergeProps(() => api().rootProps, restProps);
|
|
13
|
+
const getChildren = () => runIfFn(restProps.children, api);
|
|
13
14
|
return createComponent(TagsInputProvider, {
|
|
14
|
-
value:
|
|
15
|
+
value: api,
|
|
15
16
|
get children() {
|
|
16
|
-
return createComponent(ark.div, mergeProps(
|
|
17
|
-
children
|
|
17
|
+
return createComponent(ark.div, mergeProps$1(rootProps, {
|
|
18
|
+
get children() {
|
|
19
|
+
return getChildren();
|
|
20
|
+
}
|
|
18
21
|
}));
|
|
19
22
|
}
|
|
20
23
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { Toast, type ToastProps } from './toast';
|
|
2
|
+
export { ToastCloseTrigger, type ToastCloseTriggerProps } from './toast-close-trigger';
|
|
3
|
+
export { ToastDescription, type ToastDescriptionProps } from './toast-description';
|
|
4
|
+
export { ToastGroup, type ToastGroupProps } from './toast-group';
|
|
5
|
+
export { ToastPlacements, type ToastPlacementsProps } from './toast-placements';
|
|
6
|
+
export { ToastProvider, useToast, type ToastProviderProps } from './toast-provider';
|
|
7
|
+
export { ToastTitle, type ToastTitleProps } from './toast-title';
|
|
8
|
+
export { toastAnatomy } from './toast.anatomy';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const toastItemContext = require('./toast-item-context.cjs');
|
|
9
|
+
|
|
10
|
+
const ToastCloseTrigger = props => {
|
|
11
|
+
const api = toastItemContext.useToastItemContext();
|
|
12
|
+
const triggerProps = solid.mergeProps(() => api().closeTriggerProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.button, triggerProps);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.ToastCloseTrigger = ToastCloseTrigger;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useToastItemContext } from './toast-item-context.mjs';
|
|
5
|
+
|
|
6
|
+
const ToastCloseTrigger = props => {
|
|
7
|
+
const api = useToastItemContext();
|
|
8
|
+
const triggerProps = mergeProps(() => api().closeTriggerProps, props);
|
|
9
|
+
return createComponent(ark.button, triggerProps);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ToastCloseTrigger };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const toastItemContext = require('./toast-item-context.cjs');
|
|
9
|
+
|
|
10
|
+
const ToastDescription = props => {
|
|
11
|
+
const api = toastItemContext.useToastItemContext();
|
|
12
|
+
const descriptionProps = solid.mergeProps(() => api().descriptionProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.p, web.mergeProps(descriptionProps, {
|
|
14
|
+
get children() {
|
|
15
|
+
return api().description;
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.ToastDescription = ToastDescription;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useToastItemContext } from './toast-item-context.mjs';
|
|
5
|
+
|
|
6
|
+
const ToastDescription = props => {
|
|
7
|
+
const api = useToastItemContext();
|
|
8
|
+
const descriptionProps = mergeProps(() => api().descriptionProps, props);
|
|
9
|
+
return createComponent(ark.p, mergeProps$1(descriptionProps, {
|
|
10
|
+
get children() {
|
|
11
|
+
return api().description;
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { ToastDescription };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const solidJs = require('solid-js');
|
|
8
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
9
|
+
const factory = require('../factory.cjs');
|
|
10
|
+
const runIfFn = require('../run-if-fn.cjs');
|
|
11
|
+
const toastProvider = require('./toast-provider.cjs');
|
|
12
|
+
|
|
13
|
+
const ToastGroup = props => {
|
|
14
|
+
const [childrenProps, localProps] = solidJs.splitProps(props, ['children']);
|
|
15
|
+
const [groupParams, restProps] = createSplitProps.createSplitProps()(localProps, ['placement', 'label']);
|
|
16
|
+
const toast = toastProvider.useToast();
|
|
17
|
+
const toastsByPlacement = solidJs.createMemo(() => toast().toastsByPlacement[groupParams.placement] ?? []);
|
|
18
|
+
const groupProps = solid.mergeProps(() => toast().getGroupProps(groupParams), restProps);
|
|
19
|
+
const getChildren = () => runIfFn.runIfFn(childrenProps.children, toastsByPlacement);
|
|
20
|
+
return web.createComponent(factory.ark.div, web.mergeProps(groupProps, {
|
|
21
|
+
get children() {
|
|
22
|
+
return getChildren();
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.ToastGroup = ToastGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type Placement, type Service } from '@zag-js/toast';
|
|
2
|
+
import { type Accessor, type JSX } from 'solid-js';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import type { Assign } from '../types';
|
|
5
|
+
type ToastGroupParams = {
|
|
6
|
+
placement: Placement;
|
|
7
|
+
label?: string;
|
|
8
|
+
};
|
|
9
|
+
export type ToastGroupProps = Assign<HTMLArkProps<'div'>, ToastGroupParams & {
|
|
10
|
+
children: JSX.Element | ((toasts: Accessor<Service[]>) => JSX.Element);
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ToastGroup: (props: ToastGroupProps) => JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { splitProps, createMemo } from 'solid-js';
|
|
4
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
5
|
+
import { ark } from '../factory.mjs';
|
|
6
|
+
import { runIfFn } from '../run-if-fn.mjs';
|
|
7
|
+
import { useToast } from './toast-provider.mjs';
|
|
8
|
+
|
|
9
|
+
const ToastGroup = props => {
|
|
10
|
+
const [childrenProps, localProps] = splitProps(props, ['children']);
|
|
11
|
+
const [groupParams, restProps] = createSplitProps()(localProps, ['placement', 'label']);
|
|
12
|
+
const toast = useToast();
|
|
13
|
+
const toastsByPlacement = createMemo(() => toast().toastsByPlacement[groupParams.placement] ?? []);
|
|
14
|
+
const groupProps = mergeProps(() => toast().getGroupProps(groupParams), restProps);
|
|
15
|
+
const getChildren = () => runIfFn(childrenProps.children, toastsByPlacement);
|
|
16
|
+
return createComponent(ark.div, mergeProps$1(groupProps, {
|
|
17
|
+
get children() {
|
|
18
|
+
return getChildren();
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { ToastGroup };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const createContext = require('../create-context.cjs');
|
|
6
|
+
|
|
7
|
+
const [ToastItemProvider, useToastItemContext] = createContext.createContext({
|
|
8
|
+
hookName: "useToastItemContext",
|
|
9
|
+
providerName: "<ToastItemProvider />"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.ToastItemProvider = ToastItemProvider;
|
|
13
|
+
exports.useToastItemContext = useToastItemContext;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Type, Placement } from '@zag-js/toast/dist/toast.types';
|
|
2
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
3
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
4
|
+
import { type UseToastItemReturn } from './use-toast-item';
|
|
5
|
+
export type ToastItemContext = UseToastItemReturn;
|
|
6
|
+
export declare const ToastItemProvider: ContextProviderComponent<Accessor<{
|
|
7
|
+
type: Type;
|
|
8
|
+
title: string | undefined;
|
|
9
|
+
description: string | undefined;
|
|
10
|
+
placement: Placement;
|
|
11
|
+
isVisible: boolean;
|
|
12
|
+
isPaused: boolean;
|
|
13
|
+
isRtl: boolean;
|
|
14
|
+
pause(): void;
|
|
15
|
+
resume(): void;
|
|
16
|
+
dismiss(): void;
|
|
17
|
+
render(): any;
|
|
18
|
+
rootProps: JSX.HTMLAttributes<any>;
|
|
19
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
20
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
21
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
22
|
+
}>>, useToastItemContext: () => Accessor<{
|
|
23
|
+
type: Type;
|
|
24
|
+
title: string | undefined;
|
|
25
|
+
description: string | undefined;
|
|
26
|
+
placement: Placement;
|
|
27
|
+
isVisible: boolean;
|
|
28
|
+
isPaused: boolean;
|
|
29
|
+
isRtl: boolean;
|
|
30
|
+
pause(): void;
|
|
31
|
+
resume(): void;
|
|
32
|
+
dismiss(): void;
|
|
33
|
+
render(): any;
|
|
34
|
+
rootProps: JSX.HTMLAttributes<any>;
|
|
35
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
36
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
37
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solidJs = require('solid-js');
|
|
7
|
+
const runIfFn = require('../run-if-fn.cjs');
|
|
8
|
+
const toastProvider = require('./toast-provider.cjs');
|
|
9
|
+
|
|
10
|
+
const ToastPlacements = props => {
|
|
11
|
+
const toast = toastProvider.useToast();
|
|
12
|
+
const placements = solidJs.createMemo(() => Object.keys(toast().toastsByPlacement));
|
|
13
|
+
const getChildren = () => runIfFn.runIfFn(props.children, placements);
|
|
14
|
+
return web.memo(getChildren);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.ToastPlacements = ToastPlacements;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Placement } from '@zag-js/toast';
|
|
2
|
+
import { type Accessor, type JSX } from 'solid-js';
|
|
3
|
+
export type ToastPlacementsProps = {
|
|
4
|
+
children: (placements: Accessor<Placement[]>) => JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
export declare const ToastPlacements: (props: ToastPlacementsProps) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { memo } from 'solid-js/web';
|
|
2
|
+
import { createMemo } from 'solid-js';
|
|
3
|
+
import { runIfFn } from '../run-if-fn.mjs';
|
|
4
|
+
import { useToast } from './toast-provider.mjs';
|
|
5
|
+
|
|
6
|
+
const ToastPlacements = props => {
|
|
7
|
+
const toast = useToast();
|
|
8
|
+
const placements = createMemo(() => Object.keys(toast().toastsByPlacement));
|
|
9
|
+
const getChildren = () => runIfFn(props.children, placements);
|
|
10
|
+
return memo(getChildren);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { ToastPlacements };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const toast = require('@zag-js/toast');
|
|
8
|
+
const solidJs = require('solid-js');
|
|
9
|
+
const createContext = require('../create-context.cjs');
|
|
10
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
11
|
+
const environmentContext = require('../environment/environment-context.cjs');
|
|
12
|
+
|
|
13
|
+
function _interopNamespaceDefault(e) {
|
|
14
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
15
|
+
if (e) {
|
|
16
|
+
for (const k in e) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: () => e[k]
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
n.default = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const toast__namespace = /*#__PURE__*/_interopNamespaceDefault(toast);
|
|
31
|
+
|
|
32
|
+
const [ToastContextProvider, useToast] = createContext.createContext();
|
|
33
|
+
const ToastProvider = props => {
|
|
34
|
+
const [childrenProps, machineProps] = createSplitProps.createSplitProps()(props, ['children']);
|
|
35
|
+
const getRootNode = environmentContext.useEnvironmentContext();
|
|
36
|
+
const context = solidJs.mergeProps({
|
|
37
|
+
id: solidJs.createUniqueId(),
|
|
38
|
+
getRootNode
|
|
39
|
+
}, machineProps);
|
|
40
|
+
const [state, send] = solid.useMachine(toast__namespace.group.machine(context));
|
|
41
|
+
const api = solidJs.createMemo(() => toast__namespace.group.connect(state, send, solid.normalizeProps));
|
|
42
|
+
return web.createComponent(ToastContextProvider, {
|
|
43
|
+
value: api,
|
|
44
|
+
get children() {
|
|
45
|
+
return childrenProps.children;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
exports.ToastContextProvider = ToastContextProvider;
|
|
51
|
+
exports.ToastProvider = ToastProvider;
|
|
52
|
+
exports.useToast = useToast;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
2
|
+
import * as toast from '@zag-js/toast';
|
|
3
|
+
import { type JSX } from 'solid-js';
|
|
4
|
+
import { type Optional } from '../types';
|
|
5
|
+
type GroupPublicContext = Parameters<(typeof toast)['group']['machine']>[0];
|
|
6
|
+
type ToastProviderParams = {
|
|
7
|
+
children: JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export type ToastContext = () => ReturnType<(typeof toast)['group']['connect']>;
|
|
10
|
+
export type ToastProviderProps = Optional<GroupPublicContext, 'id'> & ToastProviderParams;
|
|
11
|
+
export declare const ToastContextProvider: ContextProviderComponent<ToastContext>, useToast: () => ToastContext;
|
|
12
|
+
export declare const ToastProvider: (props: ToastProviderProps) => JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { useMachine, normalizeProps } from '@zag-js/solid';
|
|
3
|
+
import * as toast from '@zag-js/toast';
|
|
4
|
+
import { mergeProps, createUniqueId, createMemo } from 'solid-js';
|
|
5
|
+
import { createContext } from '../create-context.mjs';
|
|
6
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
7
|
+
import { useEnvironmentContext } from '../environment/environment-context.mjs';
|
|
8
|
+
|
|
9
|
+
const [ToastContextProvider, useToast] = createContext();
|
|
10
|
+
const ToastProvider = props => {
|
|
11
|
+
const [childrenProps, machineProps] = createSplitProps()(props, ['children']);
|
|
12
|
+
const getRootNode = useEnvironmentContext();
|
|
13
|
+
const context = mergeProps({
|
|
14
|
+
id: createUniqueId(),
|
|
15
|
+
getRootNode
|
|
16
|
+
}, machineProps);
|
|
17
|
+
const [state, send] = useMachine(toast.group.machine(context));
|
|
18
|
+
const api = createMemo(() => toast.group.connect(state, send, normalizeProps));
|
|
19
|
+
return createComponent(ToastContextProvider, {
|
|
20
|
+
value: api,
|
|
21
|
+
get children() {
|
|
22
|
+
return childrenProps.children;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { ToastContextProvider, ToastProvider, useToast };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const toastItemContext = require('./toast-item-context.cjs');
|
|
9
|
+
|
|
10
|
+
const ToastTitle = props => {
|
|
11
|
+
const toast = toastItemContext.useToastItemContext();
|
|
12
|
+
const titleProps = solid.mergeProps(() => toast().titleProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.h3, web.mergeProps(titleProps, {
|
|
14
|
+
get children() {
|
|
15
|
+
return toast().title;
|
|
16
|
+
}
|
|
17
|
+
}));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
exports.ToastTitle = ToastTitle;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useToastItemContext } from './toast-item-context.mjs';
|
|
5
|
+
|
|
6
|
+
const ToastTitle = props => {
|
|
7
|
+
const toast = useToastItemContext();
|
|
8
|
+
const titleProps = mergeProps(() => toast().titleProps, props);
|
|
9
|
+
return createComponent(ark.h3, mergeProps$1(titleProps, {
|
|
10
|
+
get children() {
|
|
11
|
+
return toast().title;
|
|
12
|
+
}
|
|
13
|
+
}));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { ToastTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { anatomy as toastAnatomy } from '@zag-js/toast';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const toastItemContext = require('./toast-item-context.cjs');
|
|
10
|
+
const useToastItem = require('./use-toast-item.cjs');
|
|
11
|
+
|
|
12
|
+
const Toast = props => {
|
|
13
|
+
const [toastParams, localProps] = createSplitProps.createSplitProps()(props, ['toast']);
|
|
14
|
+
const api = useToastItem.useToastItem(toastParams);
|
|
15
|
+
const rootProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
16
|
+
return web.createComponent(toastItemContext.ToastItemProvider, {
|
|
17
|
+
value: api,
|
|
18
|
+
get children() {
|
|
19
|
+
return web.createComponent(factory.ark.div, rootProps);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.Toast = Toast;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
|
+
import { type UseToastItemProps } from './use-toast-item';
|
|
5
|
+
export type ToastProps = Assign<HTMLArkProps<'div'>, UseToastItemProps>;
|
|
6
|
+
export declare const Toast: (props: ToastProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
|
+
import { ark } from '../factory.mjs';
|
|
5
|
+
import { ToastItemProvider } from './toast-item-context.mjs';
|
|
6
|
+
import { useToastItem } from './use-toast-item.mjs';
|
|
7
|
+
|
|
8
|
+
const Toast = props => {
|
|
9
|
+
const [toastParams, localProps] = createSplitProps()(props, ['toast']);
|
|
10
|
+
const api = useToastItem(toastParams);
|
|
11
|
+
const rootProps = mergeProps(() => api().rootProps, localProps);
|
|
12
|
+
return createComponent(ToastItemProvider, {
|
|
13
|
+
value: api,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(ark.div, rootProps);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Toast };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const solid = require('@zag-js/solid');
|
|
6
|
+
const toast = require('@zag-js/toast');
|
|
7
|
+
const solidJs = require('solid-js');
|
|
8
|
+
|
|
9
|
+
function _interopNamespaceDefault(e) {
|
|
10
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
|
|
11
|
+
if (e) {
|
|
12
|
+
for (const k in e) {
|
|
13
|
+
if (k !== 'default') {
|
|
14
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
15
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: () => e[k]
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
n.default = e;
|
|
23
|
+
return Object.freeze(n);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const toast__namespace = /*#__PURE__*/_interopNamespaceDefault(toast);
|
|
27
|
+
|
|
28
|
+
const useToastItem = (props) => {
|
|
29
|
+
const [state, send] = solid.useActor(props.toast);
|
|
30
|
+
return solidJs.createMemo(() => toast__namespace.connect(state, send, solid.normalizeProps));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.useToastItem = useToastItem;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Accessor, JSX } from 'solid-js';
|
|
2
|
+
import * as toast from '@zag-js/toast';
|
|
3
|
+
export type UseToastItemProps = {
|
|
4
|
+
toast: toast.Service;
|
|
5
|
+
};
|
|
6
|
+
export type UseToastItemReturn = ReturnType<typeof useToastItem>;
|
|
7
|
+
export declare const useToastItem: (props: UseToastItemProps) => Accessor<{
|
|
8
|
+
type: toast.Type;
|
|
9
|
+
title: string | undefined;
|
|
10
|
+
description: string | undefined;
|
|
11
|
+
placement: toast.Placement;
|
|
12
|
+
isVisible: boolean;
|
|
13
|
+
isPaused: boolean;
|
|
14
|
+
isRtl: boolean;
|
|
15
|
+
pause(): void;
|
|
16
|
+
resume(): void;
|
|
17
|
+
dismiss(): void;
|
|
18
|
+
render(): any;
|
|
19
|
+
rootProps: JSX.HTMLAttributes<any>;
|
|
20
|
+
titleProps: JSX.HTMLAttributes<any>;
|
|
21
|
+
descriptionProps: JSX.HTMLAttributes<any>;
|
|
22
|
+
closeTriggerProps: JSX.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
23
|
+
}>;
|