@ark-ui/solid 1.3.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +1 -0
- package/cjs/index.js +1247 -1384
- package/cjs/index.js.map +1 -1
- package/esm/index.js +1415 -1599
- package/esm/index.js.map +1 -1
- package/package.json +52 -51
- package/source/accordion/accordion-item-trigger.jsx +0 -1
- package/source/accordion/accordion-root.jsx +29 -0
- package/source/accordion/accordion.jsx +6 -29
- package/source/accordion/index.js +3 -9
- package/source/avatar/avatar-root.jsx +18 -0
- package/source/avatar/avatar.jsx +4 -18
- package/source/avatar/index.js +3 -7
- package/source/carousel/carousel-root.jsx +27 -0
- package/source/carousel/carousel.jsx +10 -27
- package/source/carousel/index.js +5 -15
- package/source/checkbox/checkbox-root.jsx +28 -0
- package/source/checkbox/checkbox.jsx +5 -28
- package/source/checkbox/index.js +3 -8
- package/source/color-picker/color-picker-root.jsx +43 -0
- package/source/color-picker/color-picker.jsx +24 -43
- package/source/color-picker/index.js +3 -27
- package/source/combobox/combobox-root.jsx +57 -0
- package/source/combobox/combobox.jsx +14 -57
- package/source/combobox/index.js +3 -17
- package/source/date-picker/date-picker-root.jsx +52 -0
- package/source/date-picker/date-picker.jsx +24 -52
- package/source/date-picker/index.js +3 -27
- package/source/dialog/dialog-root.jsx +39 -0
- package/source/dialog/dialog-trigger.jsx +0 -1
- package/source/dialog/dialog.jsx +9 -39
- package/source/dialog/index.js +3 -12
- package/source/editable/editable-root.jsx +42 -0
- package/source/editable/editable.jsx +10 -42
- package/source/editable/index.js +3 -13
- package/source/environment/index.js +1 -4
- package/source/factory.jsx +10 -23
- package/source/file-upload/file-upload-root.jsx +34 -0
- package/source/file-upload/file-upload.jsx +12 -34
- package/source/file-upload/index.js +3 -15
- package/source/hover-card/hover-card-root.jsx +26 -0
- package/source/hover-card/hover-card.jsx +7 -26
- package/source/hover-card/index.js +3 -10
- package/source/index.jsx +1 -0
- package/source/menu/index.js +3 -17
- package/source/menu/menu-root.jsx +50 -0
- package/source/menu/menu-trigger.jsx +0 -1
- package/source/menu/menu.jsx +14 -50
- package/source/number-input/index.js +3 -11
- package/source/number-input/number-input-root.jsx +42 -0
- package/source/number-input/number-input.jsx +8 -42
- package/source/pagination/index.js +3 -9
- package/source/pagination/pagination-root.jsx +27 -0
- package/source/pagination/pagination.jsx +6 -27
- package/source/pin-input/index.js +3 -8
- package/source/pin-input/pin-input-root.jsx +36 -0
- package/source/pin-input/pin-input.jsx +5 -36
- package/source/popover/index.js +3 -15
- package/source/popover/popover-root.jsx +34 -0
- package/source/popover/popover-trigger.jsx +0 -1
- package/source/popover/popover.jsx +12 -34
- package/source/presence/index.js +1 -4
- package/source/progress/index.js +4 -14
- package/source/progress/progress-root.jsx +24 -0
- package/source/progress/{progress-indicator.jsx → progress-view.jsx} +2 -2
- package/source/progress/progress.jsx +10 -24
- package/source/radio-group/index.js +3 -10
- package/source/radio-group/radio-group-root.jsx +24 -0
- package/source/radio-group/radio-group.jsx +7 -24
- package/source/rating-group/index.js +3 -8
- package/source/rating-group/rating-group-root.jsx +29 -0
- package/source/rating-group/rating-group.jsx +5 -29
- package/source/segment-group/index.js +3 -10
- package/source/segment-group/segment-group-root.jsx +25 -0
- package/source/segment-group/segment-group.jsx +7 -25
- package/source/select/index.js +3 -18
- package/source/select/select-root.jsx +48 -0
- package/source/select/select.jsx +15 -48
- package/source/slider/index.js +3 -13
- package/source/slider/slider-root.jsx +41 -0
- package/source/slider/slider.jsx +10 -41
- package/source/splitter/index.js +3 -7
- package/source/splitter/splitter-root.jsx +25 -0
- package/source/splitter/splitter.jsx +4 -25
- package/source/switch/index.js +3 -8
- package/source/switch/switch-root.jsx +29 -0
- package/source/switch/switch.jsx +5 -29
- package/source/tabs/index.js +3 -9
- package/source/tabs/tabs-root.jsx +29 -0
- package/source/tabs/tabs.jsx +6 -29
- package/source/tags-input/index.js +4 -13
- package/source/tags-input/tags-input-item-preview.jsx +10 -0
- package/source/tags-input/tags-input-root.jsx +44 -0
- package/source/tags-input/tags-input.jsx +11 -44
- package/source/toast/index.js +3 -9
- package/source/toast/toast-root.jsx +8 -0
- package/source/toast/toast.jsx +6 -8
- package/source/toggle-group/index.js +3 -6
- package/source/toggle-group/toggle-group-root.jsx +25 -0
- package/source/toggle-group/toggle-group.jsx +3 -25
- package/source/tooltip/index.js +3 -10
- package/source/tooltip/tooltip-root.jsx +31 -0
- package/source/tooltip/tooltip.jsx +7 -31
- package/source/tree-view/index.js +14 -0
- package/source/tree-view/tree-view-branch-content.jsx +15 -0
- package/source/tree-view/tree-view-branch-control.jsx +15 -0
- package/source/tree-view/tree-view-branch-indicator.jsx +16 -0
- package/source/tree-view/tree-view-branch-text.jsx +15 -0
- package/source/tree-view/tree-view-branch-trigger.jsx +15 -0
- package/source/tree-view/tree-view-branch.jsx +17 -0
- package/source/tree-view/tree-view-context.js +5 -0
- package/source/tree-view/tree-view-item-text.jsx +12 -0
- package/source/tree-view/tree-view-item.jsx +13 -0
- package/source/tree-view/tree-view-label.jsx +8 -0
- package/source/tree-view/tree-view-root.jsx +27 -0
- package/source/tree-view/tree-view-tree.jsx +8 -0
- package/source/tree-view/tree-view.jsx +12 -0
- package/source/tree-view/use-tree-view.js +10 -0
- package/types/accordion/accordion-item-content.d.ts +2 -2
- package/types/accordion/accordion-item-indicator.d.ts +2 -2
- package/types/accordion/accordion-item-trigger.d.ts +2 -2
- package/types/accordion/accordion-item.d.ts +7 -5
- package/types/accordion/accordion-root.d.ts +10 -0
- package/types/accordion/accordion.d.ts +6 -7
- package/types/accordion/index.d.ts +4 -10
- package/types/avatar/avatar-fallback.d.ts +2 -2
- package/types/avatar/avatar-image.d.ts +2 -2
- package/types/avatar/avatar-root.d.ts +6 -0
- package/types/avatar/avatar.d.ts +4 -6
- package/types/avatar/index.d.ts +4 -8
- package/types/carousel/carousel-control.d.ts +2 -2
- package/types/carousel/carousel-indicator-group.d.ts +2 -2
- package/types/carousel/carousel-indicator.d.ts +2 -2
- package/types/carousel/carousel-item-group.d.ts +4 -0
- package/types/carousel/{carousel-slide.d.ts → carousel-item.d.ts} +2 -2
- package/types/carousel/carousel-next-trigger.d.ts +2 -2
- package/types/carousel/carousel-prev-trigger.d.ts +2 -2
- package/types/carousel/carousel-root.d.ts +11 -0
- package/types/carousel/carousel-viewport.d.ts +2 -2
- package/types/carousel/carousel.d.ts +10 -9
- package/types/carousel/index.d.ts +6 -16
- package/types/checkbox/checkbox-control.d.ts +2 -2
- package/types/checkbox/checkbox-indicator.d.ts +2 -2
- package/types/checkbox/checkbox-label.d.ts +2 -2
- package/types/checkbox/checkbox-root.d.ts +11 -0
- package/types/checkbox/checkbox.d.ts +5 -9
- package/types/checkbox/index.d.ts +5 -10
- package/types/color-picker/color-picker-area-background.d.ts +2 -2
- package/types/color-picker/color-picker-area-thumb.d.ts +2 -2
- package/types/color-picker/color-picker-area.d.ts +2 -2
- package/types/color-picker/color-picker-channel-input.d.ts +3 -3
- package/types/color-picker/color-picker-channel-slider-thumb.d.ts +2 -2
- package/types/color-picker/color-picker-channel-slider-track.d.ts +2 -2
- package/types/color-picker/color-picker-channel-slider.d.ts +2 -2
- package/types/color-picker/color-picker-content.d.ts +2 -2
- package/types/color-picker/color-picker-control.d.ts +2 -2
- package/types/color-picker/color-picker-eye-dropper-trigger.d.ts +2 -2
- package/types/color-picker/color-picker-format-select.d.ts +2 -2
- package/types/color-picker/color-picker-format-trigger.d.ts +2 -2
- package/types/color-picker/color-picker-label.d.ts +2 -2
- package/types/color-picker/color-picker-positioner.d.ts +2 -2
- package/types/color-picker/color-picker-root.d.ts +12 -0
- package/types/color-picker/color-picker-swatch-group.d.ts +2 -2
- package/types/color-picker/color-picker-swatch-indicator.d.ts +2 -2
- package/types/color-picker/color-picker-swatch-trigger.d.ts +2 -2
- package/types/color-picker/color-picker-swatch.d.ts +2 -2
- package/types/color-picker/color-picker-transparency-grid.d.ts +2 -2
- package/types/color-picker/color-picker-trigger.d.ts +2 -2
- package/types/color-picker/color-picker-value-text.d.ts +6 -3
- package/types/color-picker/color-picker.d.ts +24 -10
- package/types/color-picker/index.d.ts +4 -28
- package/types/combobox/combobox-clear-trigger.d.ts +2 -2
- package/types/combobox/combobox-content.d.ts +2 -2
- package/types/combobox/combobox-control.d.ts +2 -2
- package/types/combobox/combobox-input.d.ts +2 -2
- package/types/combobox/combobox-item-group-label.d.ts +2 -2
- package/types/combobox/combobox-item-group.d.ts +2 -2
- package/types/combobox/combobox-item-indicator.d.ts +2 -2
- package/types/combobox/combobox-item-text.d.ts +2 -2
- package/types/combobox/combobox-item.d.ts +6 -4
- package/types/combobox/combobox-label.d.ts +2 -2
- package/types/combobox/combobox-positioner.d.ts +2 -2
- package/types/combobox/combobox-root.d.ts +10 -0
- package/types/combobox/combobox-trigger.d.ts +2 -2
- package/types/combobox/combobox.d.ts +14 -10
- package/types/combobox/index.d.ts +4 -18
- package/types/date-picker/date-picker-clear-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-content.d.ts +2 -2
- package/types/date-picker/date-picker-control.d.ts +2 -2
- package/types/date-picker/date-picker-input.d.ts +2 -2
- package/types/date-picker/date-picker-label.d.ts +2 -2
- package/types/date-picker/date-picker-month-select.d.ts +2 -2
- package/types/date-picker/date-picker-next-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-positioner.d.ts +2 -2
- package/types/date-picker/date-picker-prev-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-range-text.d.ts +2 -2
- package/types/date-picker/date-picker-root.d.ts +12 -0
- package/types/date-picker/date-picker-table-body.d.ts +2 -2
- package/types/date-picker/date-picker-table-cell-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-table-cell.d.ts +2 -2
- package/types/date-picker/date-picker-table-head.d.ts +2 -2
- package/types/date-picker/date-picker-table-header.d.ts +2 -2
- package/types/date-picker/date-picker-table-row.d.ts +2 -2
- package/types/date-picker/date-picker-table.d.ts +2 -2
- package/types/date-picker/date-picker-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-view-control.d.ts +2 -2
- package/types/date-picker/date-picker-view-trigger.d.ts +2 -2
- package/types/date-picker/date-picker-view.d.ts +6 -4
- package/types/date-picker/date-picker-year-select.d.ts +2 -2
- package/types/date-picker/date-picker.d.ts +24 -10
- package/types/date-picker/index.d.ts +4 -28
- package/types/dialog/dialog-backdrop.d.ts +2 -2
- package/types/dialog/dialog-close-trigger.d.ts +2 -2
- package/types/dialog/dialog-content.d.ts +2 -2
- package/types/dialog/dialog-description.d.ts +2 -2
- package/types/dialog/dialog-positioner.d.ts +2 -2
- package/types/dialog/dialog-root.d.ts +7 -0
- package/types/dialog/dialog-title.d.ts +2 -2
- package/types/dialog/dialog-trigger.d.ts +2 -2
- package/types/dialog/dialog.d.ts +9 -7
- package/types/dialog/index.d.ts +4 -13
- package/types/editable/editable-area.d.ts +2 -2
- package/types/editable/editable-cancel-trigger.d.ts +2 -2
- package/types/editable/editable-control.d.ts +2 -2
- package/types/editable/editable-edit-trigger.d.ts +2 -2
- package/types/editable/editable-input.d.ts +2 -2
- package/types/editable/editable-label.d.ts +2 -2
- package/types/editable/editable-preview.d.ts +2 -2
- package/types/editable/editable-root.d.ts +11 -0
- package/types/editable/editable-submit-trigger.d.ts +2 -2
- package/types/editable/editable.d.ts +10 -9
- package/types/editable/index.d.ts +4 -14
- package/types/environment/index.d.ts +1 -4
- package/types/factory.d.ts +12 -8
- package/types/file-upload/file-upload-dropzone.d.ts +2 -2
- package/types/file-upload/file-upload-item-delete-trigger.d.ts +2 -2
- package/types/file-upload/file-upload-item-group.d.ts +6 -4
- package/types/file-upload/file-upload-item-name.d.ts +2 -2
- package/types/file-upload/file-upload-item-preview-image.d.ts +2 -2
- package/types/file-upload/file-upload-item-preview.d.ts +6 -3
- package/types/file-upload/file-upload-item-size-text.d.ts +2 -2
- package/types/file-upload/file-upload-item.d.ts +2 -2
- package/types/file-upload/file-upload-label.d.ts +2 -2
- package/types/file-upload/file-upload-root.d.ts +11 -0
- package/types/file-upload/file-upload-trigger.d.ts +2 -2
- package/types/file-upload/file-upload.d.ts +12 -9
- package/types/file-upload/index.d.ts +5 -17
- package/types/hover-card/hover-card-arrow-tip.d.ts +2 -2
- package/types/hover-card/hover-card-arrow.d.ts +2 -2
- package/types/hover-card/hover-card-content.d.ts +2 -2
- package/types/hover-card/hover-card-positioner.d.ts +2 -2
- package/types/hover-card/hover-card-root.d.ts +7 -0
- package/types/hover-card/hover-card-trigger.d.ts +2 -2
- package/types/hover-card/hover-card.d.ts +7 -7
- package/types/hover-card/index.d.ts +5 -12
- package/types/index.d.ts +1 -0
- package/types/menu/index.d.ts +4 -18
- package/types/menu/menu-arrow-tip.d.ts +2 -2
- package/types/menu/menu-arrow.d.ts +2 -2
- package/types/menu/menu-content.d.ts +2 -2
- package/types/menu/menu-context-trigger.d.ts +2 -2
- package/types/menu/menu-item-group-label.d.ts +2 -2
- package/types/menu/menu-item-group.d.ts +2 -2
- package/types/menu/menu-item.d.ts +2 -2
- package/types/menu/menu-option-item.d.ts +6 -4
- package/types/menu/menu-positioner.d.ts +2 -2
- package/types/menu/menu-root.d.ts +9 -0
- package/types/menu/menu-separator.d.ts +2 -2
- package/types/menu/menu-trigger-item.d.ts +2 -2
- package/types/menu/menu-trigger.d.ts +2 -2
- package/types/menu/menu.d.ts +14 -9
- package/types/number-input/index.d.ts +4 -12
- package/types/number-input/number-input-control.d.ts +2 -2
- package/types/number-input/number-input-decrement-trigger.d.ts +2 -2
- package/types/number-input/number-input-increment-trigger.d.ts +2 -2
- package/types/number-input/number-input-input.d.ts +2 -2
- package/types/number-input/number-input-label.d.ts +2 -2
- package/types/number-input/number-input-root.d.ts +11 -0
- package/types/number-input/number-input-scrubber.d.ts +2 -2
- package/types/number-input/number-input.d.ts +8 -9
- package/types/pagination/index.d.ts +4 -10
- package/types/pagination/pagination-ellipsis.d.ts +2 -2
- package/types/pagination/pagination-item.d.ts +2 -2
- package/types/pagination/pagination-next-trigger.d.ts +2 -2
- package/types/pagination/pagination-prev-trigger.d.ts +2 -2
- package/types/pagination/pagination-root.d.ts +11 -0
- package/types/pagination/pagination.d.ts +6 -9
- package/types/pin-input/index.d.ts +4 -9
- package/types/pin-input/pin-input-control.d.ts +2 -2
- package/types/pin-input/pin-input-input.d.ts +4 -2
- package/types/pin-input/pin-input-label.d.ts +2 -2
- package/types/pin-input/pin-input-root.d.ts +6 -0
- package/types/pin-input/pin-input.d.ts +5 -6
- package/types/popover/index.d.ts +4 -16
- package/types/popover/popover-anchor.d.ts +2 -2
- package/types/popover/popover-arrow-tip.d.ts +2 -2
- package/types/popover/popover-arrow.d.ts +2 -2
- package/types/popover/popover-close-trigger.d.ts +2 -2
- package/types/popover/popover-content.d.ts +2 -2
- package/types/popover/popover-description.d.ts +2 -2
- package/types/popover/popover-indicator.d.ts +2 -2
- package/types/popover/popover-positioner.d.ts +2 -2
- package/types/popover/popover-root.d.ts +7 -0
- package/types/popover/popover-title.d.ts +2 -2
- package/types/popover/popover-trigger.d.ts +2 -2
- package/types/popover/popover.d.ts +12 -7
- package/types/presence/index.d.ts +1 -4
- package/types/presence/presence.d.ts +2 -2
- package/types/progress/index.d.ts +5 -15
- package/types/progress/progress-circle-range.d.ts +2 -2
- package/types/progress/progress-circle-track.d.ts +2 -2
- package/types/progress/progress-circle.d.ts +2 -2
- package/types/progress/progress-label.d.ts +2 -2
- package/types/progress/progress-range.d.ts +2 -2
- package/types/progress/progress-root.d.ts +11 -0
- package/types/progress/progress-track.d.ts +2 -2
- package/types/progress/progress-value-text.d.ts +2 -2
- package/types/progress/progress-view.d.ts +6 -0
- package/types/progress/progress.d.ts +10 -9
- package/types/radio-group/index.d.ts +5 -12
- package/types/radio-group/radio-group-indicator.d.ts +2 -2
- package/types/radio-group/radio-group-item-control.d.ts +2 -2
- package/types/radio-group/radio-group-item-text.d.ts +2 -2
- package/types/radio-group/radio-group-item.d.ts +6 -4
- package/types/radio-group/radio-group-label.d.ts +2 -2
- package/types/radio-group/radio-group-root.d.ts +6 -0
- package/types/radio-group/radio-group.d.ts +7 -6
- package/types/rating-group/index.d.ts +4 -9
- package/types/rating-group/rating-group-control.d.ts +6 -4
- package/types/rating-group/rating-group-item.d.ts +6 -4
- package/types/rating-group/rating-group-label.d.ts +2 -2
- package/types/rating-group/rating-group-root.d.ts +6 -0
- package/types/rating-group/rating-group.d.ts +5 -6
- package/types/segment-group/index.d.ts +4 -11
- package/types/segment-group/segment-group-indicator.d.ts +2 -2
- package/types/segment-group/segment-group-item-control.d.ts +2 -2
- package/types/segment-group/segment-group-item-text.d.ts +2 -2
- package/types/segment-group/segment-group-item.d.ts +7 -5
- package/types/segment-group/segment-group-label.d.ts +2 -2
- package/types/segment-group/segment-group-root.d.ts +6 -0
- package/types/segment-group/segment-group.d.ts +7 -6
- package/types/select/index.d.ts +4 -19
- package/types/select/select-clear-trigger.d.ts +2 -2
- package/types/select/select-content.d.ts +2 -2
- package/types/select/select-control.d.ts +2 -2
- package/types/select/select-indicator.d.ts +2 -2
- package/types/select/select-item-group-label.d.ts +2 -2
- package/types/select/select-item-group.d.ts +2 -2
- package/types/select/select-item-indicator.d.ts +2 -2
- package/types/select/select-item-text.d.ts +2 -2
- package/types/select/select-item.d.ts +6 -4
- package/types/select/select-label.d.ts +2 -2
- package/types/select/select-positioner.d.ts +2 -2
- package/types/select/select-root.d.ts +10 -0
- package/types/select/select-trigger.d.ts +2 -2
- package/types/select/select-value-text.d.ts +6 -3
- package/types/select/select.d.ts +15 -10
- package/types/slider/index.d.ts +4 -14
- package/types/slider/slider-control.d.ts +2 -2
- package/types/slider/slider-label.d.ts +2 -2
- package/types/slider/slider-marker-group.d.ts +2 -2
- package/types/slider/slider-marker.d.ts +2 -2
- package/types/slider/slider-range.d.ts +2 -2
- package/types/slider/slider-root.d.ts +11 -0
- package/types/slider/slider-thumb.d.ts +2 -2
- package/types/slider/slider-track.d.ts +2 -2
- package/types/slider/slider-value-text.d.ts +2 -2
- package/types/slider/slider.d.ts +10 -9
- package/types/splitter/index.d.ts +4 -8
- package/types/splitter/splitter-panel.d.ts +2 -2
- package/types/splitter/splitter-resize-trigger.d.ts +2 -2
- package/types/splitter/splitter-root.d.ts +11 -0
- package/types/splitter/splitter.d.ts +4 -9
- package/types/switch/index.d.ts +4 -9
- package/types/switch/switch-control.d.ts +2 -2
- package/types/switch/switch-label.d.ts +2 -2
- package/types/switch/switch-root.d.ts +11 -0
- package/types/switch/switch-thumb.d.ts +2 -2
- package/types/switch/switch.d.ts +5 -9
- package/types/tabs/index.d.ts +4 -10
- package/types/tabs/tab-content.d.ts +2 -2
- package/types/tabs/tab-indicator.d.ts +2 -2
- package/types/tabs/tab-list.d.ts +2 -2
- package/types/tabs/tab-trigger.d.ts +2 -2
- package/types/tabs/tabs-root.d.ts +10 -0
- package/types/tabs/tabs.d.ts +6 -7
- package/types/tags-input/index.d.ts +5 -14
- package/types/tags-input/tags-input-clear-trigger.d.ts +2 -2
- package/types/tags-input/tags-input-control.d.ts +2 -2
- package/types/tags-input/tags-input-input.d.ts +2 -2
- package/types/tags-input/tags-input-item-delete-trigger.d.ts +2 -2
- package/types/tags-input/tags-input-item-input.d.ts +2 -2
- package/types/tags-input/tags-input-item-preview.d.ts +4 -0
- package/types/tags-input/tags-input-item-text.d.ts +2 -2
- package/types/tags-input/tags-input-item.d.ts +6 -4
- package/types/tags-input/tags-input-label.d.ts +2 -2
- package/types/tags-input/tags-input-root.d.ts +11 -0
- package/types/tags-input/tags-input.d.ts +11 -9
- package/types/toast/index.d.ts +4 -10
- package/types/toast/toast-close-trigger.d.ts +2 -2
- package/types/toast/toast-description.d.ts +2 -2
- package/types/toast/toast-group.d.ts +2 -2
- package/types/toast/toast-root.d.ts +4 -0
- package/types/toast/toast-title.d.ts +2 -2
- package/types/toast/toast.d.ts +6 -4
- package/types/toggle-group/index.d.ts +4 -7
- package/types/toggle-group/toggle-group-item.d.ts +2 -2
- package/types/toggle-group/toggle-group-root.d.ts +6 -0
- package/types/toggle-group/toggle-group.d.ts +3 -6
- package/types/tooltip/index.d.ts +4 -11
- package/types/tooltip/tooltip-arrow-tip.d.ts +2 -2
- package/types/tooltip/tooltip-arrow.d.ts +2 -2
- package/types/tooltip/tooltip-content.d.ts +2 -2
- package/types/tooltip/tooltip-positioner.d.ts +2 -2
- package/types/tooltip/tooltip-root.d.ts +7 -0
- package/types/tooltip/tooltip-trigger.d.ts +2 -2
- package/types/tooltip/tooltip.d.ts +7 -7
- package/types/tree-view/index.d.ts +16 -0
- package/types/tree-view/tree-view-branch-content.d.ts +6 -0
- package/types/tree-view/tree-view-branch-control.d.ts +6 -0
- package/types/tree-view/tree-view-branch-indicator.d.ts +6 -0
- package/types/tree-view/tree-view-branch-text.d.ts +6 -0
- package/types/tree-view/tree-view-branch-trigger.d.ts +6 -0
- package/types/tree-view/tree-view-branch.d.ts +11 -0
- package/types/tree-view/tree-view-context.d.ts +20 -0
- package/types/tree-view/tree-view-item-text.d.ts +6 -0
- package/types/tree-view/tree-view-item.d.ts +11 -0
- package/types/tree-view/tree-view-label.d.ts +4 -0
- package/types/tree-view/tree-view-root.d.ts +11 -0
- package/types/tree-view/tree-view-tree.d.ts +4 -0
- package/types/tree-view/tree-view.d.ts +12 -0
- package/types/tree-view/use-tree-view.d.ts +9 -0
- package/source/constants.js +0 -27
- package/source/filter-object.js +0 -7
- package/source/is-empty.js +0 -4
- package/source/is-function.js +0 -1
- package/source/merge-style.js +0 -30
- package/source/parse-template.js +0 -248
- package/source/pipe.js +0 -1
- package/source/spread.js +0 -40
- package/source/ssr-spread.js +0 -19
- package/types/carousel/carousel-slide-group.d.ts +0 -4
- package/types/constants.d.ts +0 -1
- package/types/filter-object.d.ts +0 -8
- package/types/is-empty.d.ts +0 -1
- package/types/is-function.d.ts +0 -1
- package/types/merge-style.d.ts +0 -6
- package/types/parse-template.d.ts +0 -45
- package/types/pipe.d.ts +0 -10
- package/types/progress/progress-indicator.d.ts +0 -6
- package/types/spread.d.ts +0 -1
- package/types/ssr-spread.d.ts +0 -10
- /package/source/carousel/{carousel-slide-group.jsx → carousel-item-group.jsx} +0 -0
- /package/source/carousel/{carousel-slide.jsx → carousel-item.jsx} +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
|
+
import { createSplitProps } from '../create-split-props';
|
|
3
|
+
import { ark } from '../factory';
|
|
4
|
+
import { ToggleGroupProvider } from './toggle-group-context';
|
|
5
|
+
import { useToggleGroup } from './use-toggle-group';
|
|
6
|
+
export const ToggleGroupRoot = (props) => {
|
|
7
|
+
const [groupParams, restProps] = createSplitProps()(props, [
|
|
8
|
+
'dir',
|
|
9
|
+
'disabled',
|
|
10
|
+
'getRootNode',
|
|
11
|
+
'id',
|
|
12
|
+
'ids',
|
|
13
|
+
'loop',
|
|
14
|
+
'multiple',
|
|
15
|
+
'onValueChange',
|
|
16
|
+
'orientation',
|
|
17
|
+
'rovingFocus',
|
|
18
|
+
'value',
|
|
19
|
+
]);
|
|
20
|
+
const api = useToggleGroup(groupParams);
|
|
21
|
+
const mergedProps = mergeProps(() => api().rootProps, restProps);
|
|
22
|
+
return (<ToggleGroupProvider value={api}>
|
|
23
|
+
<ark.div {...mergedProps}/>
|
|
24
|
+
</ToggleGroupProvider>);
|
|
25
|
+
};
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { ToggleGroupProvider } from './toggle-group-context';
|
|
5
|
-
import { useToggleGroup } from './use-toggle-group';
|
|
6
|
-
export const ToggleGroup = (props) => {
|
|
7
|
-
const [groupParams, restProps] = createSplitProps()(props, [
|
|
8
|
-
'dir',
|
|
9
|
-
'disabled',
|
|
10
|
-
'getRootNode',
|
|
11
|
-
'id',
|
|
12
|
-
'ids',
|
|
13
|
-
'loop',
|
|
14
|
-
'multiple',
|
|
15
|
-
'onValueChange',
|
|
16
|
-
'orientation',
|
|
17
|
-
'rovingFocus',
|
|
18
|
-
'value',
|
|
19
|
-
]);
|
|
20
|
-
const api = useToggleGroup(groupParams);
|
|
21
|
-
const mergedProps = mergeProps(() => api().rootProps, restProps);
|
|
22
|
-
return (<ToggleGroupProvider value={api}>
|
|
23
|
-
<ark.div {...mergedProps}/>
|
|
24
|
-
</ToggleGroupProvider>);
|
|
25
|
-
};
|
|
1
|
+
import { ToggleGroupItem as Item } from './toggle-group-item';
|
|
2
|
+
import { ToggleGroupRoot as Root } from './toggle-group-root';
|
|
3
|
+
export { Item, Root };
|
package/source/tooltip/index.js
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import { Tooltip as TooltipRoot } from './tooltip';
|
|
2
1
|
import { TooltipArrow } from './tooltip-arrow';
|
|
3
2
|
import { TooltipArrowTip } from './tooltip-arrow-tip';
|
|
4
3
|
import { TooltipContent } from './tooltip-content';
|
|
5
4
|
import { useTooltipContext } from './tooltip-context';
|
|
6
5
|
import { TooltipPositioner } from './tooltip-positioner';
|
|
6
|
+
import { TooltipRoot } from './tooltip-root';
|
|
7
7
|
import { TooltipTrigger } from './tooltip-trigger';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Arrow: TooltipArrow,
|
|
11
|
-
ArrowTip: TooltipArrowTip,
|
|
12
|
-
Content: TooltipContent,
|
|
13
|
-
Positioner: TooltipPositioner,
|
|
14
|
-
Trigger: TooltipTrigger,
|
|
15
|
-
});
|
|
16
|
-
export { Tooltip, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipPositioner, TooltipTrigger, useTooltipContext, };
|
|
8
|
+
export * as Tooltip from './tooltip';
|
|
9
|
+
export { TooltipArrow, TooltipArrowTip, TooltipContent, TooltipPositioner, TooltipRoot, TooltipTrigger, useTooltipContext, };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
|
+
import { createSplitProps } from '../create-split-props';
|
|
3
|
+
import { PresenceProvider, splitPresenceProps, usePresence, } from '../presence';
|
|
4
|
+
import { runIfFn } from '../run-if-fn';
|
|
5
|
+
import { TooltipProvider } from './tooltip-context';
|
|
6
|
+
import { useTooltip } from './use-tooltip';
|
|
7
|
+
export const TooltipRoot = (props) => {
|
|
8
|
+
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
9
|
+
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, [
|
|
10
|
+
'aria-label',
|
|
11
|
+
'closeDelay',
|
|
12
|
+
'closeOnEsc',
|
|
13
|
+
'closeOnPointerDown',
|
|
14
|
+
'dir',
|
|
15
|
+
'disabled',
|
|
16
|
+
'getRootNode',
|
|
17
|
+
'id',
|
|
18
|
+
'ids',
|
|
19
|
+
'interactive',
|
|
20
|
+
'onOpenChange',
|
|
21
|
+
'open',
|
|
22
|
+
'openDelay',
|
|
23
|
+
'positioning',
|
|
24
|
+
]);
|
|
25
|
+
const api = useTooltip(useTooltipProps);
|
|
26
|
+
const apiPresence = usePresence(mergeProps(presenceProps, () => ({ present: api().isOpen })));
|
|
27
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
28
|
+
return (<TooltipProvider value={api}>
|
|
29
|
+
<PresenceProvider value={apiPresence}>{getChildren()}</PresenceProvider>
|
|
30
|
+
</TooltipProvider>);
|
|
31
|
+
};
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export
|
|
8
|
-
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
9
|
-
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, [
|
|
10
|
-
'aria-label',
|
|
11
|
-
'closeDelay',
|
|
12
|
-
'closeOnEsc',
|
|
13
|
-
'closeOnPointerDown',
|
|
14
|
-
'dir',
|
|
15
|
-
'disabled',
|
|
16
|
-
'getRootNode',
|
|
17
|
-
'id',
|
|
18
|
-
'ids',
|
|
19
|
-
'interactive',
|
|
20
|
-
'onOpenChange',
|
|
21
|
-
'open',
|
|
22
|
-
'openDelay',
|
|
23
|
-
'positioning',
|
|
24
|
-
]);
|
|
25
|
-
const api = useTooltip(useTooltipProps);
|
|
26
|
-
const apiPresence = usePresence(mergeProps(presenceProps, () => ({ present: api().isOpen })));
|
|
27
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
28
|
-
return (<TooltipProvider value={api}>
|
|
29
|
-
<PresenceProvider value={apiPresence}>{getChildren()}</PresenceProvider>
|
|
30
|
-
</TooltipProvider>);
|
|
31
|
-
};
|
|
1
|
+
import { TooltipArrow as Arrow } from './tooltip-arrow';
|
|
2
|
+
import { TooltipArrowTip as ArrowTip } from './tooltip-arrow-tip';
|
|
3
|
+
import { TooltipContent as Content } from './tooltip-content';
|
|
4
|
+
import { TooltipPositioner as Positioner } from './tooltip-positioner';
|
|
5
|
+
import { TooltipRoot as Root } from './tooltip-root';
|
|
6
|
+
import { TooltipTrigger as Trigger } from './tooltip-trigger';
|
|
7
|
+
export { Arrow, ArrowTip, Content, Positioner, Root, Trigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TreeViewBranch } from './tree-view-branch';
|
|
2
|
+
import { TreeViewBranchContent } from './tree-view-branch-content';
|
|
3
|
+
import { TreeViewBranchControl } from './tree-view-branch-control';
|
|
4
|
+
import { TreeViewBranchIndicator, } from './tree-view-branch-indicator';
|
|
5
|
+
import { TreeViewBranchText } from './tree-view-branch-text';
|
|
6
|
+
import { TreeViewBranchTrigger } from './tree-view-branch-trigger';
|
|
7
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
8
|
+
import { TreeViewItem } from './tree-view-item';
|
|
9
|
+
import { TreeViewItemText } from './tree-view-item-text';
|
|
10
|
+
import { TreeViewLabel } from './tree-view-label';
|
|
11
|
+
import { TreeViewRoot } from './tree-view-root';
|
|
12
|
+
import { TreeViewTree } from './tree-view-tree';
|
|
13
|
+
export * as TreeView from './tree-view';
|
|
14
|
+
export { TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, TreeViewBranchText, TreeViewBranchTrigger, TreeViewItem, TreeViewItemText, TreeViewLabel, TreeViewRoot, TreeViewTree, useTreeViewContext, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import type { BranchProps } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
6
|
+
export const TreeViewBranchContent = (props) => {
|
|
7
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
8
|
+
'depth',
|
|
9
|
+
'id',
|
|
10
|
+
'disabled',
|
|
11
|
+
]);
|
|
12
|
+
const api = useTreeViewContext();
|
|
13
|
+
const mergedProps = mergeProps(() => api().getBranchContentProps(branchProps), localProps);
|
|
14
|
+
return <ark.ul {...mergedProps}/>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import type { BranchProps } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
6
|
+
export const TreeViewBranchControl = (props) => {
|
|
7
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
8
|
+
'depth',
|
|
9
|
+
'id',
|
|
10
|
+
'disabled',
|
|
11
|
+
]);
|
|
12
|
+
const api = useTreeViewContext();
|
|
13
|
+
const mergedProps = mergeProps(() => api().getBranchControlProps(branchProps), localProps);
|
|
14
|
+
return <ark.div {...mergedProps}/>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// import type { BranchProps } from '@zag-js/tree-view'
|
|
2
|
+
import { treeViewAnatomy } from '@ark-ui/anatomy';
|
|
3
|
+
import { mergeProps } from '@zag-js/solid';
|
|
4
|
+
import { createSplitProps } from '../create-split-props';
|
|
5
|
+
import { ark } from '../factory';
|
|
6
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
7
|
+
export const TreeViewBranchIndicator = (props) => {
|
|
8
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
9
|
+
'depth',
|
|
10
|
+
'id',
|
|
11
|
+
'disabled',
|
|
12
|
+
]);
|
|
13
|
+
const api = useTreeViewContext();
|
|
14
|
+
const mergedProps = mergeProps(() => api().getBranchProps(branchProps), treeViewAnatomy.build().branchIndicator.attrs, localProps);
|
|
15
|
+
return <ark.div {...mergedProps}/>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import type { BranchProps } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
6
|
+
export const TreeViewBranchText = (props) => {
|
|
7
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
8
|
+
'depth',
|
|
9
|
+
'id',
|
|
10
|
+
'disabled',
|
|
11
|
+
]);
|
|
12
|
+
const api = useTreeViewContext();
|
|
13
|
+
const mergedProps = mergeProps(() => api().getBranchTextProps(branchProps), localProps);
|
|
14
|
+
return <ark.span {...mergedProps}/>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import type { BranchProps } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
6
|
+
export const TreeViewBranchTrigger = (props) => {
|
|
7
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
8
|
+
'depth',
|
|
9
|
+
'id',
|
|
10
|
+
'disabled',
|
|
11
|
+
]);
|
|
12
|
+
const api = useTreeViewContext();
|
|
13
|
+
const mergedProps = mergeProps(() => api().getBranchTriggerProps(branchProps), localProps);
|
|
14
|
+
return <ark.button {...mergedProps}/>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// import type { BranchProps, BranchState } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { runIfFn } from '../run-if-fn';
|
|
6
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
7
|
+
export const TreeViewBranch = (props) => {
|
|
8
|
+
const [branchProps, localProps] = createSplitProps()(props, [
|
|
9
|
+
'depth',
|
|
10
|
+
'id',
|
|
11
|
+
'disabled',
|
|
12
|
+
]);
|
|
13
|
+
const api = useTreeViewContext();
|
|
14
|
+
const mergedProps = mergeProps(() => api().getBranchProps(branchProps), localProps);
|
|
15
|
+
const getChildren = () => runIfFn(localProps.children, () => api().getBranchState(branchProps));
|
|
16
|
+
return <ark.li {...mergedProps}>{getChildren()}</ark.li>;
|
|
17
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// import type { ItemProps } from '@zag-js/tree-view'
|
|
2
|
+
import { treeViewAnatomy } from '@ark-ui/anatomy';
|
|
3
|
+
import { mergeProps } from '@zag-js/solid';
|
|
4
|
+
import { createSplitProps } from '../create-split-props';
|
|
5
|
+
import { ark } from '../factory';
|
|
6
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
7
|
+
export const TreeViewItemText = (props) => {
|
|
8
|
+
const [itemProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
9
|
+
const api = useTreeViewContext();
|
|
10
|
+
const mergedProps = mergeProps(() => api().getItemProps(itemProps), treeViewAnatomy.build().itemText.attrs, localProps);
|
|
11
|
+
return <ark.span {...mergedProps}/>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// import type { ItemProps, ItemState } from '@zag-js/tree-view'
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props';
|
|
4
|
+
import { ark } from '../factory';
|
|
5
|
+
import { runIfFn } from '../run-if-fn';
|
|
6
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
7
|
+
export const TreeViewItem = (props) => {
|
|
8
|
+
const [itemProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
9
|
+
const api = useTreeViewContext();
|
|
10
|
+
const mergedProps = mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
11
|
+
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
12
|
+
return <ark.li {...mergedProps}>{getChildren()}</ark.li>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
4
|
+
export const TreeViewLabel = (props) => {
|
|
5
|
+
const api = useTreeViewContext();
|
|
6
|
+
const mergedProps = mergeProps(() => api().labelProps, props);
|
|
7
|
+
return <ark.label {...mergedProps}/>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
|
+
import { createSplitProps } from '../create-split-props';
|
|
3
|
+
import { ark } from '../factory';
|
|
4
|
+
import { runIfFn } from '../run-if-fn';
|
|
5
|
+
import { TreeViewProvider } from './tree-view-context';
|
|
6
|
+
import { useTreeView } from './use-tree-view';
|
|
7
|
+
export const TreeViewRoot = (props) => {
|
|
8
|
+
const [useTreeViewProps, localProps] = createSplitProps()(props, [
|
|
9
|
+
'dir',
|
|
10
|
+
'expandedIds',
|
|
11
|
+
'focusedId',
|
|
12
|
+
'getRootNode',
|
|
13
|
+
'id',
|
|
14
|
+
'onExpandedChange',
|
|
15
|
+
'onFocusChange',
|
|
16
|
+
'onSelectionChange',
|
|
17
|
+
'openOnClick',
|
|
18
|
+
'selectedIds',
|
|
19
|
+
'selectionMode',
|
|
20
|
+
]);
|
|
21
|
+
const api = useTreeView(useTreeViewProps);
|
|
22
|
+
const mergedProps = mergeProps(() => api().rootProps, localProps);
|
|
23
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
24
|
+
return (<TreeViewProvider value={api}>
|
|
25
|
+
<ark.div {...mergedProps}>{getChildren()}</ark.div>
|
|
26
|
+
</TreeViewProvider>);
|
|
27
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { mergeProps } from '@zag-js/solid';
|
|
2
|
+
import { ark } from '../factory';
|
|
3
|
+
import { useTreeViewContext } from './tree-view-context';
|
|
4
|
+
export const TreeViewTree = (props) => {
|
|
5
|
+
const api = useTreeViewContext();
|
|
6
|
+
const mergedProps = mergeProps(() => api().treeProps, props);
|
|
7
|
+
return <ark.ul {...mergedProps}/>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeViewBranch as Branch } from './tree-view-branch';
|
|
2
|
+
import { TreeViewBranchContent as BranchContent } from './tree-view-branch-content';
|
|
3
|
+
import { TreeViewBranchControl as BranchControl } from './tree-view-branch-control';
|
|
4
|
+
import { TreeViewBranchIndicator as BranchIndicator } from './tree-view-branch-indicator';
|
|
5
|
+
import { TreeViewBranchText as BranchText } from './tree-view-branch-text';
|
|
6
|
+
import { TreeViewBranchTrigger as BranchTrigger } from './tree-view-branch-trigger';
|
|
7
|
+
import { TreeViewItem as Item } from './tree-view-item';
|
|
8
|
+
import { TreeViewItemText as ItemText } from './tree-view-item-text';
|
|
9
|
+
import { TreeViewLabel as Label } from './tree-view-label';
|
|
10
|
+
import { TreeViewRoot as Root } from './tree-view-root';
|
|
11
|
+
import { TreeViewTree as Tree } from './tree-view-tree';
|
|
12
|
+
export { Branch, BranchContent, BranchControl, BranchIndicator, BranchText, BranchTrigger, Item, ItemText, Label, Root, Tree, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { mergeProps, normalizeProps, useMachine } from '@zag-js/solid';
|
|
2
|
+
import * as treeView from '@zag-js/tree-view';
|
|
3
|
+
import { createMemo, createUniqueId } from 'solid-js';
|
|
4
|
+
import { useEnvironmentContext } from '../environment';
|
|
5
|
+
export const useTreeView = (props) => {
|
|
6
|
+
const getRootNode = useEnvironmentContext();
|
|
7
|
+
const context = mergeProps({ id: createUniqueId(), getRootNode }, props);
|
|
8
|
+
const [state, send] = useMachine(treeView.machine(context), { context });
|
|
9
|
+
return createMemo(() => treeView.connect(state, send, normalizeProps));
|
|
10
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface AccordionItemContentProps extends HTMLArkProps<'div'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const AccordionItemContent:
|
|
4
|
+
export declare const AccordionItemContent: ArkComponent<'div'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface AccordionItemIndicatorProps extends HTMLArkProps<'div'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const AccordionItemIndicator:
|
|
4
|
+
export declare const AccordionItemIndicator: ArkComponent<'div'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface AccordionItemTriggerProps extends HTMLArkProps<'button'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const AccordionItemTrigger:
|
|
4
|
+
export declare const AccordionItemTrigger: ArkComponent<'button'>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ItemProps, ItemState } from '@zag-js/accordion';
|
|
2
2
|
import { type Accessor, type JSX } from 'solid-js';
|
|
3
|
-
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
4
4
|
import type { Assign } from '../types';
|
|
5
|
-
|
|
5
|
+
interface ElementProps extends ItemProps {
|
|
6
6
|
children?: JSX.Element | ((state: Accessor<ItemState>) => JSX.Element);
|
|
7
|
-
}>, ItemProps {
|
|
8
7
|
}
|
|
9
|
-
export
|
|
8
|
+
export interface AccordionItemProps extends Assign<HTMLArkProps<'div'>, ElementProps> {
|
|
9
|
+
}
|
|
10
|
+
export declare const AccordionItem: ArkComponent<'div', ElementProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
|
+
import { type UsePresenceProps } from '../presence';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
|
+
import { type UseAccordionProps } from './use-accordion';
|
|
5
|
+
interface ElementProps extends UseAccordionProps, UsePresenceProps {
|
|
6
|
+
}
|
|
7
|
+
export interface AccordionRootProps extends Assign<HTMLArkProps<'div'>, ElementProps> {
|
|
8
|
+
}
|
|
9
|
+
export declare const AccordionRoot: ArkComponent<'div', ElementProps>;
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
export declare const Accordion: (props: AccordionProps) => import("solid-js").JSX.Element;
|
|
1
|
+
import { AccordionItem as Item } from './accordion-item';
|
|
2
|
+
import { AccordionItemContent as ItemContent } from './accordion-item-content';
|
|
3
|
+
import { AccordionItemIndicator as ItemIndicator } from './accordion-item-indicator';
|
|
4
|
+
import { AccordionItemTrigger as ItemTrigger } from './accordion-item-trigger';
|
|
5
|
+
import { AccordionRoot as Root } from './accordion-root';
|
|
6
|
+
export { Item, ItemContent, ItemIndicator, ItemTrigger, Root };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import type { FocusChangeDetails as AccordionFocusChangeDetails, ValueChangeDetails as AccordionValueChangeDetails } from '@zag-js/accordion';
|
|
2
|
-
import { type AccordionProps } from './accordion';
|
|
3
2
|
import { useAccordionContext, type AccordionContext } from './accordion-context';
|
|
4
3
|
import { AccordionItem, type AccordionItemProps } from './accordion-item';
|
|
5
4
|
import { AccordionItemContent, type AccordionItemContentProps } from './accordion-item-content';
|
|
6
5
|
import { useAccordionItemContext, type AccordionItemContext } from './accordion-item-context';
|
|
7
6
|
import { AccordionItemIndicator, type AccordionItemIndicatorProps } from './accordion-item-indicator';
|
|
8
7
|
import { AccordionItemTrigger, type AccordionItemTriggerProps } from './accordion-item-trigger';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
ItemIndicator: (props: AccordionItemIndicatorProps) => import("solid-js").JSX.Element;
|
|
14
|
-
ItemTrigger: (props: AccordionItemTriggerProps) => import("solid-js").JSX.Element;
|
|
15
|
-
};
|
|
16
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, useAccordionContext, useAccordionItemContext, };
|
|
17
|
-
export type { AccordionContext, AccordionFocusChangeDetails, AccordionItemContentProps, AccordionItemContext, AccordionItemIndicatorProps, AccordionItemProps, AccordionItemTriggerProps, AccordionProps, AccordionValueChangeDetails, };
|
|
8
|
+
import { AccordionRoot, type AccordionRootProps } from './accordion-root';
|
|
9
|
+
export * as Accordion from './accordion';
|
|
10
|
+
export { AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, useAccordionContext, useAccordionItemContext, };
|
|
11
|
+
export type { AccordionContext, AccordionFocusChangeDetails, AccordionItemContentProps, AccordionItemContext, AccordionItemIndicatorProps, AccordionItemProps, AccordionItemTriggerProps, AccordionRootProps, AccordionValueChangeDetails, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface AvatarFallbackProps extends HTMLArkProps<'span'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const AvatarFallback:
|
|
4
|
+
export declare const AvatarFallback: ArkComponent<'span'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface AvatarImageProps extends HTMLArkProps<'img'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const AvatarImage:
|
|
4
|
+
export declare const AvatarImage: ArkComponent<'img'>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
|
+
import type { Assign } from '../types';
|
|
3
|
+
import { type UseAvatarProps } from './use-avatar';
|
|
4
|
+
export interface AvatarRootProps extends Assign<HTMLArkProps<'div'>, UseAvatarProps> {
|
|
5
|
+
}
|
|
6
|
+
export declare const AvatarRoot: ArkComponent<'div', UseAvatarProps>;
|
package/types/avatar/avatar.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
export
|
|
5
|
-
}
|
|
6
|
-
export declare const Avatar: (props: AvatarProps) => import("solid-js").JSX.Element;
|
|
1
|
+
import { AvatarFallback as Fallback } from './avatar-fallback';
|
|
2
|
+
import { AvatarImage as Image } from './avatar-image';
|
|
3
|
+
import { AvatarRoot as Root } from './avatar-root';
|
|
4
|
+
export { Fallback, Image, Root };
|
package/types/avatar/index.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import type { StatusChangeDetails as AvatarStatusChangeDetails } from '@zag-js/avatar';
|
|
2
|
-
import { type AvatarProps } from './avatar';
|
|
3
2
|
import { useAvatarContext, type AvatarContext } from './avatar-context';
|
|
4
3
|
import { AvatarFallback, type AvatarFallbackProps } from './avatar-fallback';
|
|
5
4
|
import { AvatarImage, type AvatarImageProps } from './avatar-image';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
export { Avatar, AvatarFallback, AvatarImage, useAvatarContext };
|
|
12
|
-
export type { AvatarContext, AvatarFallbackProps, AvatarImageProps, AvatarProps, AvatarStatusChangeDetails, };
|
|
5
|
+
import { AvatarRoot, type AvatarRootProps } from './avatar-root';
|
|
6
|
+
export * as Avatar from './avatar';
|
|
7
|
+
export { AvatarFallback, AvatarImage, AvatarRoot, useAvatarContext };
|
|
8
|
+
export type { AvatarContext, AvatarFallbackProps, AvatarImageProps, AvatarRootProps, AvatarStatusChangeDetails, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface CarouselControlProps extends HTMLArkProps<'div'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const CarouselControl:
|
|
4
|
+
export declare const CarouselControl: ArkComponent<'div'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface CarouselIndicatorGroupProps extends HTMLArkProps<'div'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const CarouselIndicatorGroup:
|
|
4
|
+
export declare const CarouselIndicatorGroup: ArkComponent<'div'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IndicatorProps } from '@zag-js/carousel';
|
|
2
|
-
import { type HTMLArkProps } from '../factory';
|
|
2
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
3
3
|
import type { Assign } from '../types';
|
|
4
4
|
export interface CarouselIndicatorProps extends Assign<HTMLArkProps<'button'>, IndicatorProps> {
|
|
5
5
|
}
|
|
6
|
-
export declare const CarouselIndicator:
|
|
6
|
+
export declare const CarouselIndicator: ArkComponent<'button', IndicatorProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ItemProps } from '@zag-js/carousel';
|
|
2
|
-
import { type HTMLArkProps } from '../factory';
|
|
2
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
3
3
|
import type { Assign } from '../types';
|
|
4
4
|
export interface CarouselItemProps extends Assign<HTMLArkProps<'div'>, ItemProps> {
|
|
5
5
|
}
|
|
6
|
-
export declare const CarouselItem:
|
|
6
|
+
export declare const CarouselItem: ArkComponent<'div', ItemProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface CarouselNextTriggerProps extends HTMLArkProps<'button'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const CarouselNextTrigger:
|
|
4
|
+
export declare const CarouselNextTrigger: ArkComponent<'button'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface CarouselPrevTriggerProps extends HTMLArkProps<'button'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const CarouselPrevTrigger:
|
|
4
|
+
export declare const CarouselPrevTrigger: ArkComponent<'button'>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type JSX } from 'solid-js';
|
|
2
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
3
|
+
import type { Assign } from '../types';
|
|
4
|
+
import { type UseCarouselProps, type UseCarouselReturn } from './use-carousel';
|
|
5
|
+
interface ElementProps extends UseCarouselProps {
|
|
6
|
+
children?: JSX.Element | ((api: UseCarouselReturn) => JSX.Element);
|
|
7
|
+
}
|
|
8
|
+
export interface CarouselRootProps extends Assign<HTMLArkProps<'div'>, ElementProps> {
|
|
9
|
+
}
|
|
10
|
+
export declare const CarouselRoot: ArkComponent<'div', ElementProps>;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLArkProps } from '../factory';
|
|
1
|
+
import { type ArkComponent, type HTMLArkProps } from '../factory';
|
|
2
2
|
export interface CarouselViewportProps extends HTMLArkProps<'span'> {
|
|
3
3
|
}
|
|
4
|
-
export declare const CarouselViewport:
|
|
4
|
+
export declare const CarouselViewport: ArkComponent<'span'>;
|