@ark-ui/solid 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +1 -0
- package/cjs/index.js +1129 -1298
- package/cjs/index.js.map +1 -1
- package/esm/index.js +1349 -1563
- 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.jsx → accordion-root.jsx} +1 -1
- package/source/accordion/index.js +4 -4
- package/source/avatar/{avatar.jsx → avatar-root.jsx} +1 -1
- package/source/avatar/index.js +4 -4
- package/source/carousel/{carousel.jsx → carousel-root.jsx} +1 -1
- package/source/carousel/index.js +6 -6
- package/source/checkbox/{checkbox.jsx → checkbox-root.jsx} +1 -1
- package/source/checkbox/index.js +4 -4
- package/source/color-picker/{color-picker.jsx → color-picker-root.jsx} +1 -1
- package/source/color-picker/index.js +4 -4
- package/source/combobox/{combobox.jsx → combobox-root.jsx} +1 -1
- package/source/combobox/index.js +4 -4
- package/source/date-picker/{date-picker.jsx → date-picker-root.jsx} +1 -1
- package/source/date-picker/index.js +4 -4
- package/source/dialog/{dialog.jsx → dialog-root.jsx} +1 -1
- package/source/dialog/dialog-trigger.jsx +0 -1
- package/source/dialog/index.js +5 -5
- package/source/editable/{editable.jsx → editable-root.jsx} +1 -1
- package/source/editable/index.js +4 -4
- package/source/environment/index.js +1 -4
- package/source/factory.jsx +10 -23
- package/source/file-upload/{file-upload.jsx → file-upload-root.jsx} +1 -1
- package/source/file-upload/index.js +4 -4
- package/source/hover-card/{hover-card.jsx → hover-card-root.jsx} +1 -1
- package/source/hover-card/index.js +4 -4
- package/source/index.jsx +1 -0
- package/source/menu/index.js +4 -4
- package/source/menu/{menu.jsx → menu-root.jsx} +1 -1
- package/source/menu/menu-trigger.jsx +0 -1
- package/source/number-input/index.js +4 -4
- package/source/number-input/{number-input.jsx → number-input-root.jsx} +1 -1
- package/source/pagination/index.js +4 -4
- package/source/pagination/{pagination.jsx → pagination-root.jsx} +1 -1
- package/source/pin-input/index.js +4 -4
- package/source/pin-input/{pin-input.jsx → pin-input-root.jsx} +1 -1
- package/source/popover/index.js +4 -4
- package/source/popover/{popover.jsx → popover-root.jsx} +1 -1
- package/source/popover/popover-trigger.jsx +0 -1
- package/source/presence/index.js +1 -4
- package/source/progress/index.js +6 -6
- package/source/progress/{progress.jsx → progress-root.jsx} +1 -1
- package/source/progress/{progress-indicator.jsx → progress-view.jsx} +2 -2
- package/source/radio-group/index.js +4 -4
- package/source/radio-group/{radio-group.jsx → radio-group-root.jsx} +1 -1
- package/source/rating-group/index.js +4 -4
- package/source/rating-group/{rating-group.jsx → rating-group-root.jsx} +1 -1
- package/source/segment-group/index.js +4 -4
- package/source/segment-group/{segment-group.jsx → segment-group-root.jsx} +1 -1
- package/source/select/index.js +4 -4
- package/source/select/{select.jsx → select-root.jsx} +1 -1
- package/source/slider/index.js +4 -4
- package/source/slider/{slider.jsx → slider-root.jsx} +1 -1
- package/source/splitter/index.js +4 -4
- package/source/splitter/{splitter.jsx → splitter-root.jsx} +1 -1
- package/source/switch/index.js +4 -4
- package/source/switch/{switch.jsx → switch-root.jsx} +1 -1
- package/source/tabs/index.js +4 -4
- package/source/tabs/{tabs.jsx → tabs-root.jsx} +1 -1
- package/source/tags-input/index.js +6 -4
- package/source/tags-input/tags-input-item-preview.jsx +10 -0
- package/source/tags-input/{tags-input.jsx → tags-input-root.jsx} +1 -1
- package/source/toast/index.js +4 -4
- package/source/toast/{toast.jsx → toast-root.jsx} +1 -1
- package/source/toggle-group/index.js +4 -4
- package/source/toggle-group/{toggle-group.jsx → toggle-group-root.jsx} +1 -1
- package/source/tooltip/index.js +4 -4
- package/source/tooltip/{tooltip.jsx → tooltip-root.jsx} +1 -1
- package/source/tree-view/index.js +26 -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/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/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/index.d.ts +7 -7
- 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/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/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/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.d.ts → combobox-root.d.ts} +2 -2
- package/types/combobox/combobox-trigger.d.ts +2 -2
- 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/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.d.ts → dialog-root.d.ts} +2 -2
- package/types/dialog/dialog-title.d.ts +2 -2
- package/types/dialog/dialog-trigger.d.ts +2 -2
- package/types/dialog/index.d.ts +12 -12
- 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/index.d.ts +13 -13
- 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/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.d.ts → hover-card-root.d.ts} +2 -2
- package/types/hover-card/hover-card-trigger.d.ts +2 -2
- package/types/hover-card/index.d.ts +11 -11
- package/types/index.d.ts +1 -0
- 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.d.ts → menu-root.d.ts} +2 -2
- 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/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/pagination/index.d.ts +9 -9
- 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/pin-input/index.d.ts +10 -8
- 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/popover/index.d.ts +15 -15
- 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.d.ts → popover-root.d.ts} +2 -2
- package/types/popover/popover-title.d.ts +2 -2
- package/types/popover/popover-trigger.d.ts +2 -2
- package/types/presence/index.d.ts +1 -4
- package/types/presence/presence.d.ts +2 -2
- package/types/progress/index.d.ts +14 -14
- 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/radio-group/index.d.ts +10 -10
- 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/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/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/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.d.ts → select-root.d.ts} +2 -2
- package/types/select/select-trigger.d.ts +2 -2
- package/types/select/select-value-text.d.ts +6 -3
- package/types/slider/index.d.ts +13 -13
- 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/splitter/index.d.ts +7 -7
- 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/switch/index.d.ts +8 -8
- 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/tabs/index.d.ts +9 -9
- 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/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/toast/index.d.ts +9 -9
- 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/toggle-group/index.d.ts +6 -6
- package/types/toggle-group/toggle-group-item.d.ts +2 -2
- package/types/toggle-group/toggle-group-root.d.ts +6 -0
- package/types/tooltip/index.d.ts +10 -10
- 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.d.ts → tooltip-root.d.ts} +2 -2
- package/types/tooltip/tooltip-trigger.d.ts +2 -2
- 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/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/accordion/accordion.d.ts +0 -7
- package/types/accordion/index.d.ts +0 -17
- package/types/avatar/avatar.d.ts +0 -6
- package/types/carousel/carousel-slide-group.d.ts +0 -4
- package/types/carousel/carousel.d.ts +0 -9
- package/types/carousel/index.d.ts +0 -24
- package/types/checkbox/checkbox.d.ts +0 -9
- package/types/checkbox/index.d.ts +0 -14
- package/types/color-picker/color-picker.d.ts +0 -10
- package/types/color-picker/index.d.ts +0 -54
- package/types/combobox/index.d.ts +0 -33
- package/types/constants.d.ts +0 -1
- package/types/date-picker/date-picker.d.ts +0 -10
- package/types/date-picker/index.d.ts +0 -55
- package/types/editable/editable.d.ts +0 -9
- package/types/file-upload/file-upload.d.ts +0 -9
- package/types/file-upload/index.d.ts +0 -28
- 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/menu/index.d.ts +0 -32
- package/types/merge-style.d.ts +0 -6
- package/types/number-input/index.d.ts +0 -20
- package/types/number-input/number-input.d.ts +0 -9
- package/types/pagination/pagination.d.ts +0 -9
- package/types/parse-template.d.ts +0 -45
- package/types/pin-input/pin-input.d.ts +0 -6
- package/types/pipe.d.ts +0 -10
- package/types/progress/progress-indicator.d.ts +0 -6
- package/types/progress/progress.d.ts +0 -9
- package/types/radio-group/radio-group.d.ts +0 -6
- package/types/rating-group/index.d.ts +0 -15
- package/types/rating-group/rating-group.d.ts +0 -6
- package/types/segment-group/index.d.ts +0 -19
- package/types/segment-group/segment-group.d.ts +0 -6
- package/types/select/index.d.ts +0 -36
- package/types/slider/slider.d.ts +0 -9
- package/types/splitter/splitter.d.ts +0 -9
- package/types/spread.d.ts +0 -1
- package/types/ssr-spread.d.ts +0 -10
- package/types/switch/switch.d.ts +0 -9
- package/types/tabs/tabs.d.ts +0 -7
- package/types/tags-input/index.d.ts +0 -25
- package/types/tags-input/tags-input.d.ts +0 -9
- package/types/toast/toast.d.ts +0 -4
- package/types/toggle-group/toggle-group.d.ts +0 -6
- /package/source/carousel/{carousel-slide-group.jsx → carousel-item-group.jsx} +0 -0
- /package/source/carousel/{carousel-slide.jsx → carousel-item.jsx} +0 -0
package/esm/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useMachine, normalizeProps, mergeProps as mergeProps$
|
|
3
|
-
import {
|
|
1
|
+
import { createComponent, Dynamic, mergeProps, memo, use, template, spread, insert, effect } from 'solid-js/web';
|
|
2
|
+
import { useMachine, normalizeProps, mergeProps as mergeProps$1, useActor } from '@zag-js/solid';
|
|
3
|
+
import { createContext as createContext$1, useContext, splitProps, createSignal, createMemo, createEffect, Show, createUniqueId, Index, children, onCleanup } from 'solid-js';
|
|
4
4
|
import * as presence from '@zag-js/presence';
|
|
5
5
|
import * as accordion from '@zag-js/accordion';
|
|
6
6
|
import * as avatar from '@zag-js/avatar';
|
|
7
|
+
import { carouselAnatomy, colorPickerAnatomy, datePickerAnatomy, segmentGroupAnatomy, selectAnatomy, treeViewAnatomy } from '@ark-ui/anatomy';
|
|
7
8
|
import * as carousel from '@zag-js/carousel';
|
|
8
|
-
import { carouselAnatomy, colorPickerAnatomy, datePickerAnatomy, segmentGroupAnatomy, selectAnatomy } from '@ark-ui/anatomy';
|
|
9
9
|
import * as checkbox from '@zag-js/checkbox';
|
|
10
10
|
import * as colorPicker from '@zag-js/color-picker';
|
|
11
11
|
import * as combobox from '@zag-js/combobox';
|
|
@@ -30,366 +30,61 @@ import * as tabs from '@zag-js/tabs';
|
|
|
30
30
|
import * as tagsInput from '@zag-js/tags-input';
|
|
31
31
|
import * as toggleGroup from '@zag-js/toggle-group';
|
|
32
32
|
import * as tooltip from '@zag-js/tooltip';
|
|
33
|
+
import * as treeView from '@zag-js/tree-view';
|
|
33
34
|
import * as toast from '@zag-js/toast';
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const mergeStyle = (a, b) => styleObjectToString({
|
|
38
|
-
...getStyleObject(a),
|
|
39
|
-
...getStyleObject(b)
|
|
40
|
-
});
|
|
41
|
-
const getStyleObject = style => typeof style === 'object' ? style : stringStyleToObject(style);
|
|
42
|
-
const stringStyleToObject = style => {
|
|
43
|
-
const object = {};
|
|
44
|
-
if (!style) return object;
|
|
45
|
-
const extractCSSregex = /([^:; ]*):\s*([^;]*)/g;
|
|
46
|
-
let match;
|
|
47
|
-
while (match = extractCSSregex.exec(style)) {
|
|
48
|
-
object[match[1]] = match[2];
|
|
49
|
-
}
|
|
50
|
-
return object;
|
|
51
|
-
};
|
|
52
|
-
const styleObjectToString = value => {
|
|
53
|
-
if (!value) return '';
|
|
54
|
-
let result = '';
|
|
55
|
-
const k = Object.keys(value);
|
|
56
|
-
for (let i = 0; i < k.length; i++) {
|
|
57
|
-
const s = k[i];
|
|
58
|
-
// @ts-expect-error - we know this is a string
|
|
59
|
-
const v = value[s];
|
|
60
|
-
if (v != undefined) {
|
|
61
|
-
if (i) result += ';';
|
|
62
|
-
result += `${s}:${v}`;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return result;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
69
|
-
const getEventKey = key => `$$${key.toLowerCase().slice(2)}`;
|
|
70
|
-
const hasOwn = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
71
|
-
function mapProps(props, mapper) {
|
|
72
|
-
return Object.fromEntries(Object.entries(props).map(([key, value]) => [key, mapper(key, value)]));
|
|
73
|
-
}
|
|
74
|
-
const spread = (node, props) => {
|
|
75
|
-
const nodeEvents = Object.fromEntries(Object.keys(node).filter(prop => prop.startsWith('$$'))
|
|
76
|
-
// @ts-expect-error - fix later
|
|
77
|
-
.map(prop => [prop, node[prop]]));
|
|
78
|
-
const isSVG = node instanceof SVGElement;
|
|
79
|
-
const childProps = createMemo(() => mapProps(props, (key, value) => {
|
|
80
|
-
const eventKey = getEventKey(key);
|
|
81
|
-
|
|
82
|
-
// event composition
|
|
83
|
-
if (hasOwn(nodeEvents, eventKey)) {
|
|
84
|
-
return function next(...args) {
|
|
85
|
-
if (typeof value === 'function') value(...args);
|
|
86
|
-
nodeEvents[eventKey](...args);
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// style composition
|
|
91
|
-
if (key === 'style') {
|
|
92
|
-
return mergeStyle(node.style.cssText, value);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// class composition
|
|
96
|
-
if (key === 'class') {
|
|
97
|
-
return [node.classList.toString(), value].filter(Boolean).join(' ');
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// don't override existing child attributes
|
|
101
|
-
if (node.hasAttribute(key)) return;
|
|
102
|
-
return value;
|
|
103
|
-
}));
|
|
104
|
-
spread$1(node, mergeProps(childProps), isSVG);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
const booleans = ['allowfullscreen', 'async', 'autofocus', 'autoplay', 'checked', 'controls', 'default', 'disabled', 'formnovalidate', 'hidden', 'indeterminate', 'ismap', 'loop', 'multiple', 'muted', 'nomodule', 'novalidate', 'open', 'playsinline', 'readonly', 'required', 'reversed', 'seamless', 'selected'];
|
|
108
|
-
const BooleanAttributes = new Set(booleans);
|
|
109
|
-
|
|
110
|
-
const isEmpty = value => value == null || value == undefined || typeof value === 'object' && Object.keys(value).length === 0 || typeof value === 'string' && value.trim().length === 0;
|
|
111
|
-
|
|
112
|
-
const isFunction$1 = value => typeof value === 'function';
|
|
113
|
-
|
|
114
|
-
const filterObject = (obj, fn) => Object.fromEntries(Object.entries(obj).filter(fn));
|
|
115
|
-
const filterEmptyValues = obj => filterObject(obj, ([, v]) => !isEmpty(v));
|
|
116
|
-
const filterFunctionValues = obj => filterObject(obj, ([, v]) => !isFunction$1(v));
|
|
117
|
-
const filterBooleanAttributeValues = obj => filterObject(obj, ([k, v]) => !(BooleanAttributes.has(k) && !v));
|
|
118
|
-
|
|
119
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
120
|
-
// Forked from https://github.com/natemoo-re/ultrahtml.git under MIT license
|
|
121
|
-
|
|
122
|
-
const DOCUMENT_NODE = 0;
|
|
123
|
-
const ELEMENT_NODE = 1;
|
|
124
|
-
const TEXT_NODE = 2;
|
|
125
|
-
const COMMENT_NODE = 3;
|
|
126
|
-
const DOCTYPE_NODE = 4;
|
|
127
|
-
const Fragment = Symbol('Fragment');
|
|
128
|
-
const VOID_TAGS = new Set(['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']);
|
|
129
|
-
const RAW_TAGS = new Set(['script', 'style']);
|
|
130
|
-
const SPLIT_ATTRS_RE = /([@.a-z0-9_:-]*)\s*?=?\s*?(['"]?)([\s\S]*?)\2\s+/gim;
|
|
131
|
-
const DOM_PARSER_RE = /(?:<(\/?)([a-zA-Z][a-zA-Z0-9:-]*)(?:\s([^>]*?))?((?:\s*\/)?)>|(<!--)([\s\S]*?)(-->)|(<!)([\s\S]*?)(>))/gm;
|
|
132
|
-
function splitAttrs(str) {
|
|
133
|
-
const obj = {};
|
|
134
|
-
let token;
|
|
135
|
-
if (str) {
|
|
136
|
-
SPLIT_ATTRS_RE.lastIndex = 0;
|
|
137
|
-
str = ' ' + (str || '') + ' ';
|
|
138
|
-
while (token = SPLIT_ATTRS_RE.exec(str)) {
|
|
139
|
-
if (token[0] === ' ') continue;
|
|
140
|
-
obj[token[1]] = token[3];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return obj;
|
|
144
|
-
}
|
|
145
|
-
function parse(str) {
|
|
146
|
-
let doc, parent, token, text, i, bStart, bText, bEnd, tag;
|
|
147
|
-
const tags = [];
|
|
148
|
-
DOM_PARSER_RE.lastIndex = 0;
|
|
149
|
-
parent = doc = {
|
|
150
|
-
type: DOCUMENT_NODE,
|
|
151
|
-
children: []
|
|
152
|
-
};
|
|
153
|
-
let lastIndex = 0;
|
|
154
|
-
function commitTextNode() {
|
|
155
|
-
text = str.substring(lastIndex, DOM_PARSER_RE.lastIndex - token[0].length);
|
|
156
|
-
if (text) {
|
|
157
|
-
parent.children.push({
|
|
158
|
-
type: TEXT_NODE,
|
|
159
|
-
value: text,
|
|
160
|
-
parent
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
while (token = DOM_PARSER_RE.exec(str)) {
|
|
165
|
-
bStart = token[5] || token[8];
|
|
166
|
-
bText = token[6] || token[9];
|
|
167
|
-
bEnd = token[7] || token[10];
|
|
168
|
-
if (RAW_TAGS.has(parent.name) && token[2] !== parent.name) {
|
|
169
|
-
i = DOM_PARSER_RE.lastIndex - token[0].length;
|
|
170
|
-
if (parent.children.length > 0) {
|
|
171
|
-
parent.children[0].value += token[0];
|
|
172
|
-
}
|
|
173
|
-
continue;
|
|
174
|
-
} else if (bStart === '<!--') {
|
|
175
|
-
i = DOM_PARSER_RE.lastIndex - token[0].length;
|
|
176
|
-
if (RAW_TAGS.has(parent.name)) {
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
tag = {
|
|
180
|
-
type: COMMENT_NODE,
|
|
181
|
-
value: bText,
|
|
182
|
-
parent: parent,
|
|
183
|
-
loc: [{
|
|
184
|
-
start: i,
|
|
185
|
-
end: i + bStart.length
|
|
186
|
-
}, {
|
|
187
|
-
start: DOM_PARSER_RE.lastIndex - bEnd.length,
|
|
188
|
-
end: DOM_PARSER_RE.lastIndex
|
|
189
|
-
}]
|
|
190
|
-
};
|
|
191
|
-
tags.push(tag);
|
|
192
|
-
tag.parent.children.push(tag);
|
|
193
|
-
} else if (bStart === '<!') {
|
|
194
|
-
i = DOM_PARSER_RE.lastIndex - token[0].length;
|
|
195
|
-
tag = {
|
|
196
|
-
type: DOCTYPE_NODE,
|
|
197
|
-
value: bText,
|
|
198
|
-
parent: parent,
|
|
199
|
-
loc: [{
|
|
200
|
-
start: i,
|
|
201
|
-
end: i + bStart.length
|
|
202
|
-
}, {
|
|
203
|
-
start: DOM_PARSER_RE.lastIndex - bEnd.length,
|
|
204
|
-
end: DOM_PARSER_RE.lastIndex
|
|
205
|
-
}]
|
|
206
|
-
};
|
|
207
|
-
// commitTextNode();
|
|
208
|
-
tags.push(tag);
|
|
209
|
-
tag.parent.children.push(tag);
|
|
210
|
-
} else if (token[1] !== '/') {
|
|
211
|
-
commitTextNode();
|
|
212
|
-
if (RAW_TAGS.has(parent.name)) {
|
|
213
|
-
lastIndex = DOM_PARSER_RE.lastIndex;
|
|
214
|
-
commitTextNode();
|
|
215
|
-
continue;
|
|
216
|
-
} else {
|
|
217
|
-
tag = {
|
|
218
|
-
type: ELEMENT_NODE,
|
|
219
|
-
name: token[2] + '',
|
|
220
|
-
attributes: splitAttrs(token[3]),
|
|
221
|
-
parent,
|
|
222
|
-
children: [],
|
|
223
|
-
loc: [{
|
|
224
|
-
start: DOM_PARSER_RE.lastIndex - token[0].length,
|
|
225
|
-
end: DOM_PARSER_RE.lastIndex
|
|
226
|
-
}]
|
|
227
|
-
};
|
|
228
|
-
tags.push(tag);
|
|
229
|
-
tag.parent.children.push(tag);
|
|
230
|
-
if (token[4] && token[4].indexOf('/') > -1 || VOID_TAGS.has(tag.name)) {
|
|
231
|
-
tag.loc[1] = tag.loc[0];
|
|
232
|
-
tag.isSelfClosingTag = true;
|
|
233
|
-
} else {
|
|
234
|
-
parent = tag;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
} else {
|
|
238
|
-
commitTextNode();
|
|
239
|
-
// Close parent node if end-tag matches
|
|
240
|
-
if (token[2] + '' === parent.name) {
|
|
241
|
-
tag = parent;
|
|
242
|
-
parent = tag.parent;
|
|
243
|
-
tag.loc.push({
|
|
244
|
-
start: DOM_PARSER_RE.lastIndex - token[0].length,
|
|
245
|
-
end: DOM_PARSER_RE.lastIndex
|
|
246
|
-
});
|
|
247
|
-
text = str.substring(tag.loc[0].end, tag.loc[1].start);
|
|
248
|
-
if (tag.children.length === 0) {
|
|
249
|
-
tag.children.push({
|
|
250
|
-
type: TEXT_NODE,
|
|
251
|
-
value: text,
|
|
252
|
-
parent
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
// account for abuse of self-closing tags when an end-tag is also provided:
|
|
257
|
-
else if (token[2] + '' === tags[tags.length - 1].name && tags[tags.length - 1].isSelfClosingTag === true) {
|
|
258
|
-
tag = tags[tags.length - 1];
|
|
259
|
-
tag.loc.push({
|
|
260
|
-
start: DOM_PARSER_RE.lastIndex - token[0].length,
|
|
261
|
-
end: DOM_PARSER_RE.lastIndex
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
lastIndex = DOM_PARSER_RE.lastIndex;
|
|
266
|
-
}
|
|
267
|
-
text = str.slice(lastIndex);
|
|
268
|
-
parent.children.push({
|
|
269
|
-
type: TEXT_NODE,
|
|
270
|
-
value: text,
|
|
271
|
-
parent
|
|
272
|
-
});
|
|
273
|
-
return doc;
|
|
274
|
-
}
|
|
275
|
-
const HTMLString = Symbol('HTMLString');
|
|
276
|
-
const AttrString = Symbol('AttrString');
|
|
277
|
-
const RenderFn = Symbol('RenderFn');
|
|
278
|
-
function mark(str, tags = [HTMLString]) {
|
|
279
|
-
const v = {
|
|
280
|
-
value: str
|
|
281
|
-
};
|
|
282
|
-
for (const tag of tags) {
|
|
283
|
-
Object.defineProperty(v, tag, {
|
|
284
|
-
value: true,
|
|
285
|
-
enumerable: false,
|
|
286
|
-
writable: false
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
return v;
|
|
290
|
-
}
|
|
291
|
-
const ESCAPE_CHARS = {
|
|
292
|
-
'&': '&',
|
|
293
|
-
'<': '<',
|
|
294
|
-
'>': '>'
|
|
295
|
-
};
|
|
296
|
-
function escapeHTML(str) {
|
|
297
|
-
return str.replace(/[&<>]/g, c => ESCAPE_CHARS[c] || c);
|
|
298
|
-
}
|
|
299
|
-
function attrs(attributes) {
|
|
300
|
-
let attrStr = '';
|
|
301
|
-
for (const [key, value] of Object.entries(attributes)) {
|
|
302
|
-
attrStr += ` ${key}="${value}"`;
|
|
303
|
-
}
|
|
304
|
-
return mark(attrStr, [HTMLString, AttrString]);
|
|
36
|
+
function getErrorMessage(hook, provider) {
|
|
37
|
+
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
305
38
|
}
|
|
306
|
-
function
|
|
39
|
+
function createContext(options = {}) {
|
|
307
40
|
const {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
function render(node) {
|
|
324
|
-
switch (node.type) {
|
|
325
|
-
case DOCUMENT_NODE:
|
|
326
|
-
return node.children.map(child => render(child)).join('');
|
|
327
|
-
case ELEMENT_NODE:
|
|
328
|
-
return renderElement(node);
|
|
329
|
-
case TEXT_NODE:
|
|
330
|
-
return `${node.value}`;
|
|
331
|
-
case COMMENT_NODE:
|
|
332
|
-
return `<!--${node.value}-->`;
|
|
333
|
-
case DOCTYPE_NODE:
|
|
334
|
-
return `<!${node.value}>`;
|
|
41
|
+
strict = true,
|
|
42
|
+
hookName = 'useContext',
|
|
43
|
+
providerName = 'Provider',
|
|
44
|
+
errorMessage
|
|
45
|
+
} = options;
|
|
46
|
+
const Context = createContext$1(undefined);
|
|
47
|
+
function useContext$1() {
|
|
48
|
+
const context = useContext(Context);
|
|
49
|
+
if (!context && strict) {
|
|
50
|
+
const error = new Error(errorMessage ?? getErrorMessage(hookName, providerName));
|
|
51
|
+
error.name = 'ContextError';
|
|
52
|
+
Error.captureStackTrace?.(error, useContext$1);
|
|
53
|
+
throw error;
|
|
54
|
+
}
|
|
55
|
+
return context;
|
|
335
56
|
}
|
|
57
|
+
return [Context.Provider, useContext$1, Context];
|
|
336
58
|
}
|
|
337
59
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
60
|
+
const [AccordionProvider, useAccordionContext] = createContext({
|
|
61
|
+
hookName: 'useAccordionContext',
|
|
62
|
+
providerName: '<AccordionProvider />'
|
|
63
|
+
});
|
|
341
64
|
|
|
342
|
-
const
|
|
343
|
-
if (isJSXElement(children)) return children;
|
|
344
|
-
const {
|
|
345
|
-
t
|
|
346
|
-
} = children;
|
|
347
|
-
const ast = parse(t);
|
|
348
|
-
const [node] = ast.children;
|
|
349
|
-
const mergedAttributes = Object.assign({}, attributes, {
|
|
350
|
-
class: [attributes?.class, node.attributes.class].filter(Boolean).join(' '),
|
|
351
|
-
style: mergeStyle(attributes.style, node.attributes.style)
|
|
352
|
-
});
|
|
353
|
-
const ssrAttributes = pipe(mergedAttributes, filterEmptyValues, filterFunctionValues, filterBooleanAttributeValues);
|
|
354
|
-
Object.assign(node.attributes, ssrAttributes);
|
|
355
|
-
return {
|
|
356
|
-
t: render(ast)
|
|
357
|
-
};
|
|
358
|
-
};
|
|
359
|
-
const isJSXElement = children => !Object.hasOwnProperty.call(children, 't');
|
|
65
|
+
const createSplitProps = () => (props, keys) => splitProps(props, keys);
|
|
360
66
|
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
const [localProps,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
}, restProps, {
|
|
368
|
-
get children() {
|
|
369
|
-
return localProps.children;
|
|
370
|
-
}
|
|
371
|
-
}));
|
|
372
|
-
}
|
|
373
|
-
const getChildren = children(() => ssrSpread(localProps.children, restProps));
|
|
374
|
-
createEffect(() => {
|
|
375
|
-
const children = getChildren();
|
|
376
|
-
if (children instanceof HTMLElement || children instanceof SVGElement) {
|
|
377
|
-
spread(children, restProps);
|
|
67
|
+
const withAsProp = Component => {
|
|
68
|
+
const ArkComponent = props => {
|
|
69
|
+
const [localProps, otherProps] = splitProps(props, ['as']);
|
|
70
|
+
return createComponent(Dynamic, mergeProps({
|
|
71
|
+
get component() {
|
|
72
|
+
return localProps.as || Component;
|
|
378
73
|
}
|
|
379
|
-
});
|
|
380
|
-
return getChildren;
|
|
74
|
+
}, otherProps));
|
|
381
75
|
};
|
|
382
|
-
|
|
76
|
+
return ArkComponent;
|
|
77
|
+
};
|
|
383
78
|
function jsxFactory() {
|
|
384
79
|
const cache = new Map();
|
|
385
|
-
return new Proxy(
|
|
80
|
+
return new Proxy(withAsProp, {
|
|
386
81
|
apply(target, thisArg, argArray) {
|
|
387
|
-
return
|
|
82
|
+
return withAsProp(argArray[0]);
|
|
388
83
|
},
|
|
389
84
|
get(_, element) {
|
|
390
85
|
const asElement = element;
|
|
391
86
|
if (!cache.has(asElement)) {
|
|
392
|
-
cache.set(asElement,
|
|
87
|
+
cache.set(asElement, withAsProp(asElement));
|
|
393
88
|
}
|
|
394
89
|
return cache.get(asElement);
|
|
395
90
|
}
|
|
@@ -423,16 +118,16 @@ const usePresence = props => {
|
|
|
423
118
|
}));
|
|
424
119
|
};
|
|
425
120
|
|
|
426
|
-
const Presence
|
|
121
|
+
const Presence = props => {
|
|
427
122
|
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
428
123
|
const api = usePresence(presenceProps);
|
|
429
|
-
const mergedProps = mergeProps$
|
|
124
|
+
const mergedProps = mergeProps$1(() => api().presenceProps, localProps);
|
|
430
125
|
return createComponent(Show, {
|
|
431
126
|
get when() {
|
|
432
127
|
return !api().isUnmounted;
|
|
433
128
|
},
|
|
434
129
|
get children() {
|
|
435
|
-
return createComponent(ark.div, mergeProps
|
|
130
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
436
131
|
"data-scope": "presence",
|
|
437
132
|
"data-part": "root"
|
|
438
133
|
}));
|
|
@@ -440,30 +135,6 @@ const Presence$1 = props => {
|
|
|
440
135
|
});
|
|
441
136
|
};
|
|
442
137
|
|
|
443
|
-
function getErrorMessage(hook, provider) {
|
|
444
|
-
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
445
|
-
}
|
|
446
|
-
function createContext(options = {}) {
|
|
447
|
-
const {
|
|
448
|
-
strict = true,
|
|
449
|
-
hookName = 'useContext',
|
|
450
|
-
providerName = 'Provider',
|
|
451
|
-
errorMessage
|
|
452
|
-
} = options;
|
|
453
|
-
const Context = createContext$1(undefined);
|
|
454
|
-
function useContext$1() {
|
|
455
|
-
const context = useContext(Context);
|
|
456
|
-
if (!context && strict) {
|
|
457
|
-
const error = new Error(errorMessage ?? getErrorMessage(hookName, providerName));
|
|
458
|
-
error.name = 'ContextError';
|
|
459
|
-
Error.captureStackTrace?.(error, useContext$1);
|
|
460
|
-
throw error;
|
|
461
|
-
}
|
|
462
|
-
return context;
|
|
463
|
-
}
|
|
464
|
-
return [Context.Provider, useContext$1, Context];
|
|
465
|
-
}
|
|
466
|
-
|
|
467
138
|
const [PresenceProvider, usePresenceContext] = createContext({
|
|
468
139
|
hookName: 'usePresenceContext',
|
|
469
140
|
providerName: '<PresenceProvider />'
|
|
@@ -474,75 +145,6 @@ const [PresencePropsProvider, usePresencePropsContext] = createContext({
|
|
|
474
145
|
providerName: '<PresencePropsProvider />'
|
|
475
146
|
});
|
|
476
147
|
|
|
477
|
-
const Presence = Object.assign(Presence$1, {
|
|
478
|
-
Root: Presence$1
|
|
479
|
-
});
|
|
480
|
-
|
|
481
|
-
const [AccordionProvider, useAccordionContext] = createContext({
|
|
482
|
-
hookName: 'useAccordionContext',
|
|
483
|
-
providerName: '<AccordionProvider />'
|
|
484
|
-
});
|
|
485
|
-
|
|
486
|
-
const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
487
|
-
hookName: 'useEnvironmentContext',
|
|
488
|
-
providerName: '<EnvironmentProvider />',
|
|
489
|
-
strict: false
|
|
490
|
-
});
|
|
491
|
-
|
|
492
|
-
const _tmpl$$c = /*#__PURE__*/template(`<span hidden>`);
|
|
493
|
-
const Environment$1 = props => {
|
|
494
|
-
// eslint-disable-next-line prefer-const
|
|
495
|
-
let spanRef = undefined;
|
|
496
|
-
const currentEnv = createMemo(() => () => props.value ?? spanRef?.ownerDocument ?? document);
|
|
497
|
-
return createComponent(EnvironmentProvider, {
|
|
498
|
-
get value() {
|
|
499
|
-
return currentEnv();
|
|
500
|
-
},
|
|
501
|
-
get children() {
|
|
502
|
-
return [memo(() => props.children), memo(() => memo(() => !!!props.value)() && (() => {
|
|
503
|
-
const _el$ = _tmpl$$c();
|
|
504
|
-
const _ref$ = spanRef;
|
|
505
|
-
typeof _ref$ === "function" ? use(_ref$, _el$) : spanRef = _el$;
|
|
506
|
-
return _el$;
|
|
507
|
-
})())];
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
const Environment = Object.assign(Environment$1, {
|
|
513
|
-
Root: Environment$1
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
const useAccordion = props => {
|
|
517
|
-
const getRootNode = useEnvironmentContext();
|
|
518
|
-
const context = mergeProps$2({
|
|
519
|
-
id: createUniqueId(),
|
|
520
|
-
getRootNode
|
|
521
|
-
}, props);
|
|
522
|
-
const [state, send] = useMachine(accordion.machine(context), {
|
|
523
|
-
context
|
|
524
|
-
});
|
|
525
|
-
return createMemo(() => accordion.connect(state, send, normalizeProps));
|
|
526
|
-
};
|
|
527
|
-
|
|
528
|
-
const Accordion$1 = props => {
|
|
529
|
-
const [presenceProps, accordionProps] = splitPresenceProps(props);
|
|
530
|
-
const [useAccordionProps, localProps] = createSplitProps()(accordionProps, ['collapsible', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'multiple', 'onFocusChange', 'onValueChange', 'orientation', 'value']);
|
|
531
|
-
const api = useAccordion(useAccordionProps);
|
|
532
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
533
|
-
return createComponent(AccordionProvider, {
|
|
534
|
-
value: api,
|
|
535
|
-
get children() {
|
|
536
|
-
return createComponent(PresencePropsProvider, {
|
|
537
|
-
value: presenceProps,
|
|
538
|
-
get children() {
|
|
539
|
-
return createComponent(ark.div, mergedProps);
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
};
|
|
545
|
-
|
|
546
148
|
const isFunction = value => typeof value === 'function';
|
|
547
149
|
const runIfFn = (valueOrFn, ...args) => isFunction(valueOrFn) ? valueOrFn(...args) : valueOrFn;
|
|
548
150
|
|
|
@@ -555,10 +157,10 @@ const AccordionItem = props => {
|
|
|
555
157
|
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
556
158
|
const api = useAccordionContext();
|
|
557
159
|
const presenceProps = usePresencePropsContext();
|
|
558
|
-
const presenceApi = usePresence(mergeProps$
|
|
160
|
+
const presenceApi = usePresence(mergeProps$1(presenceProps, () => ({
|
|
559
161
|
present: api().getItemState(itemProps).isOpen
|
|
560
162
|
})));
|
|
561
|
-
const mergedProps = mergeProps$
|
|
163
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
562
164
|
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
563
165
|
return createComponent(AccordionItemProvider, {
|
|
564
166
|
value: itemProps,
|
|
@@ -566,7 +168,7 @@ const AccordionItem = props => {
|
|
|
566
168
|
return createComponent(PresenceProvider, {
|
|
567
169
|
value: presenceApi,
|
|
568
170
|
get children() {
|
|
569
|
-
return createComponent(ark.div, mergeProps
|
|
171
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
570
172
|
get children() {
|
|
571
173
|
return getChildren();
|
|
572
174
|
}
|
|
@@ -581,7 +183,7 @@ const AccordionItemContent = props => {
|
|
|
581
183
|
const api = useAccordionContext();
|
|
582
184
|
const accordionItem = useAccordionItemContext();
|
|
583
185
|
const presenceApi = usePresenceContext();
|
|
584
|
-
const mergedProps = mergeProps$
|
|
186
|
+
const mergedProps = mergeProps$1(() => api().getItemContentProps(accordionItem), () => presenceApi().presenceProps, props);
|
|
585
187
|
return createComponent(Show, {
|
|
586
188
|
get when() {
|
|
587
189
|
return !presenceApi().isUnmounted;
|
|
@@ -595,7 +197,7 @@ const AccordionItemContent = props => {
|
|
|
595
197
|
const AccordionItemIndicator = props => {
|
|
596
198
|
const api = useAccordionContext();
|
|
597
199
|
const itemParams = useAccordionItemContext();
|
|
598
|
-
const mergedProps = mergeProps$
|
|
200
|
+
const mergedProps = mergeProps$1(() => api().getItemIndicatorProps(itemParams), props);
|
|
599
201
|
return createComponent(ark.div, mergedProps);
|
|
600
202
|
};
|
|
601
203
|
|
|
@@ -603,190 +205,192 @@ const AccordionItemTrigger = props => {
|
|
|
603
205
|
const api = useAccordionContext();
|
|
604
206
|
const item = useAccordionItemContext();
|
|
605
207
|
const presenceApi = usePresenceContext();
|
|
606
|
-
const mergedProps = mergeProps$
|
|
208
|
+
const mergedProps = mergeProps$1(() => api().getItemTriggerProps(item), () => ({
|
|
607
209
|
'aria-controls': presenceApi().isUnmounted && null
|
|
608
210
|
}), props);
|
|
609
|
-
|
|
610
|
-
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
611
211
|
return createComponent(ark.button, mergedProps);
|
|
612
212
|
};
|
|
613
213
|
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
ItemIndicator: AccordionItemIndicator,
|
|
619
|
-
ItemTrigger: AccordionItemTrigger
|
|
214
|
+
const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
215
|
+
hookName: 'useEnvironmentContext',
|
|
216
|
+
providerName: '<EnvironmentProvider />',
|
|
217
|
+
strict: false
|
|
620
218
|
});
|
|
621
219
|
|
|
622
|
-
const
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
220
|
+
const _tmpl$$c = /*#__PURE__*/template(`<span hidden>`);
|
|
221
|
+
const Environment = props => {
|
|
222
|
+
// eslint-disable-next-line prefer-const
|
|
223
|
+
let spanRef = undefined;
|
|
224
|
+
const currentEnv = createMemo(() => () => props.value ?? spanRef?.ownerDocument ?? document);
|
|
225
|
+
return createComponent(EnvironmentProvider, {
|
|
226
|
+
get value() {
|
|
227
|
+
return currentEnv();
|
|
228
|
+
},
|
|
229
|
+
get children() {
|
|
230
|
+
return [memo(() => props.children), memo(() => memo(() => !!!props.value)() && (() => {
|
|
231
|
+
const _el$ = _tmpl$$c();
|
|
232
|
+
const _ref$ = spanRef;
|
|
233
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : spanRef = _el$;
|
|
234
|
+
return _el$;
|
|
235
|
+
})())];
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
};
|
|
626
239
|
|
|
627
|
-
const
|
|
240
|
+
const useAccordion = props => {
|
|
628
241
|
const getRootNode = useEnvironmentContext();
|
|
629
|
-
const context = mergeProps$
|
|
242
|
+
const context = mergeProps$1({
|
|
630
243
|
id: createUniqueId(),
|
|
631
244
|
getRootNode
|
|
632
245
|
}, props);
|
|
633
|
-
const [state, send] = useMachine(
|
|
246
|
+
const [state, send] = useMachine(accordion.machine(context), {
|
|
634
247
|
context
|
|
635
248
|
});
|
|
636
|
-
return createMemo(() =>
|
|
249
|
+
return createMemo(() => accordion.connect(state, send, normalizeProps));
|
|
637
250
|
};
|
|
638
251
|
|
|
639
|
-
const
|
|
640
|
-
const [
|
|
641
|
-
const
|
|
642
|
-
const
|
|
643
|
-
|
|
252
|
+
const AccordionRoot = props => {
|
|
253
|
+
const [presenceProps, accordionProps] = splitPresenceProps(props);
|
|
254
|
+
const [useAccordionProps, localProps] = createSplitProps()(accordionProps, ['collapsible', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'multiple', 'onFocusChange', 'onValueChange', 'orientation', 'value']);
|
|
255
|
+
const api = useAccordion(useAccordionProps);
|
|
256
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
257
|
+
return createComponent(AccordionProvider, {
|
|
644
258
|
value: api,
|
|
645
259
|
get children() {
|
|
646
|
-
return createComponent(
|
|
260
|
+
return createComponent(PresencePropsProvider, {
|
|
261
|
+
value: presenceProps,
|
|
262
|
+
get children() {
|
|
263
|
+
return createComponent(ark.div, mergedProps);
|
|
264
|
+
}
|
|
265
|
+
});
|
|
647
266
|
}
|
|
648
267
|
});
|
|
649
268
|
};
|
|
650
269
|
|
|
270
|
+
const Accordion = {
|
|
271
|
+
Root: AccordionRoot,
|
|
272
|
+
Item: AccordionItem,
|
|
273
|
+
ItemContent: AccordionItemContent,
|
|
274
|
+
ItemIndicator: AccordionItemIndicator,
|
|
275
|
+
ItemTrigger: AccordionItemTrigger
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
const [AvatarProvider, useAvatarContext] = createContext({
|
|
279
|
+
hookName: 'useAvatarContext',
|
|
280
|
+
providerName: '<AvatarProvider />'
|
|
281
|
+
});
|
|
282
|
+
|
|
651
283
|
const AvatarFallback = props => {
|
|
652
284
|
const avatar = useAvatarContext();
|
|
653
|
-
const mergedProps = mergeProps$
|
|
285
|
+
const mergedProps = mergeProps$1(() => avatar().fallbackProps, props);
|
|
654
286
|
return createComponent(ark.span, mergedProps);
|
|
655
287
|
};
|
|
656
288
|
|
|
657
289
|
const AvatarImage = props => {
|
|
658
290
|
const avatar = useAvatarContext();
|
|
659
|
-
const mergedProps = mergeProps$
|
|
291
|
+
const mergedProps = mergeProps$1(() => avatar().imageProps, props);
|
|
660
292
|
return createComponent(ark.img, mergedProps);
|
|
661
293
|
};
|
|
662
294
|
|
|
663
|
-
const
|
|
664
|
-
Root: Avatar$1,
|
|
665
|
-
Fallback: AvatarFallback,
|
|
666
|
-
Image: AvatarImage
|
|
667
|
-
});
|
|
668
|
-
|
|
669
|
-
const [CarouselProvider, useCarouselContext] = createContext({
|
|
670
|
-
hookName: 'useCarouselContext',
|
|
671
|
-
providerName: '<CarouselProvider />'
|
|
672
|
-
});
|
|
673
|
-
|
|
674
|
-
const useCarousel = props => {
|
|
295
|
+
const useAvatar = props => {
|
|
675
296
|
const getRootNode = useEnvironmentContext();
|
|
676
|
-
const context = mergeProps$
|
|
297
|
+
const context = mergeProps$1({
|
|
677
298
|
id: createUniqueId(),
|
|
678
299
|
getRootNode
|
|
679
300
|
}, props);
|
|
680
|
-
const [state, send] = useMachine(
|
|
301
|
+
const [state, send] = useMachine(avatar.machine(context), {
|
|
681
302
|
context
|
|
682
303
|
});
|
|
683
|
-
return createMemo(() =>
|
|
304
|
+
return createMemo(() => avatar.connect(state, send, normalizeProps));
|
|
684
305
|
};
|
|
685
306
|
|
|
686
|
-
const
|
|
687
|
-
const [
|
|
688
|
-
const api =
|
|
689
|
-
const mergedProps = mergeProps$
|
|
690
|
-
|
|
691
|
-
return createComponent(CarouselProvider, {
|
|
307
|
+
const AvatarRoot = props => {
|
|
308
|
+
const [params, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'onLoadingStatusChange']);
|
|
309
|
+
const api = useAvatar(params);
|
|
310
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
311
|
+
return createComponent(AvatarProvider, {
|
|
692
312
|
value: api,
|
|
693
313
|
get children() {
|
|
694
|
-
return createComponent(ark.div,
|
|
695
|
-
get children() {
|
|
696
|
-
return getChildren();
|
|
697
|
-
}
|
|
698
|
-
}));
|
|
314
|
+
return createComponent(ark.div, mergedProps);
|
|
699
315
|
}
|
|
700
316
|
});
|
|
701
317
|
};
|
|
702
318
|
|
|
319
|
+
const Avatar = {
|
|
320
|
+
Root: AvatarRoot,
|
|
321
|
+
Fallback: AvatarFallback,
|
|
322
|
+
Image: AvatarImage
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
const [CarouselProvider, useCarouselContext] = createContext({
|
|
326
|
+
hookName: 'useCarouselContext',
|
|
327
|
+
providerName: '<CarouselProvider />'
|
|
328
|
+
});
|
|
329
|
+
|
|
703
330
|
const CarouselControl = props => {
|
|
704
|
-
const mergedProps = mergeProps$
|
|
331
|
+
const mergedProps = mergeProps$1(() => carouselAnatomy.build().control.attrs, props);
|
|
705
332
|
return createComponent(ark.div, mergedProps);
|
|
706
333
|
};
|
|
707
334
|
|
|
708
335
|
const CarouselIndicator = props => {
|
|
709
336
|
const [indicatorProps, localProps] = createSplitProps()(props, ['index', 'readOnly']);
|
|
710
337
|
const api = useCarouselContext();
|
|
711
|
-
const mergedProps = mergeProps$
|
|
338
|
+
const mergedProps = mergeProps$1(() => api().getIndicatorProps(indicatorProps), localProps);
|
|
712
339
|
return createComponent(ark.button, mergedProps);
|
|
713
340
|
};
|
|
714
341
|
|
|
715
342
|
const CarouselIndicatorGroup = props => {
|
|
716
343
|
const api = useCarouselContext();
|
|
717
|
-
const mergedProps = mergeProps$
|
|
344
|
+
const mergedProps = mergeProps$1(() => api().indicatorGroupProps, props);
|
|
718
345
|
return createComponent(ark.div, mergedProps);
|
|
719
346
|
};
|
|
720
347
|
|
|
721
|
-
const CarouselNextTrigger = props => {
|
|
722
|
-
const api = useCarouselContext();
|
|
723
|
-
const mergedProps = mergeProps$2(() => api().nextTriggerProps, props);
|
|
724
|
-
return createComponent(ark.button, mergedProps);
|
|
725
|
-
};
|
|
726
|
-
|
|
727
|
-
const CarouselPrevTrigger = props => {
|
|
728
|
-
const api = useCarouselContext();
|
|
729
|
-
const mergedProps = mergeProps$2(() => api().prevTriggerProps, props);
|
|
730
|
-
return createComponent(ark.button, mergedProps);
|
|
731
|
-
};
|
|
732
|
-
|
|
733
348
|
const CarouselItem = props => {
|
|
734
349
|
const [slideParams, localProps] = createSplitProps()(props, ['index']);
|
|
735
350
|
const api = useCarouselContext();
|
|
736
|
-
const mergedProps = mergeProps$
|
|
351
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(slideParams), localProps);
|
|
737
352
|
return createComponent(ark.div, mergedProps);
|
|
738
353
|
};
|
|
739
354
|
|
|
740
355
|
const CarouselItemGroup = props => {
|
|
741
356
|
const api = useCarouselContext();
|
|
742
|
-
const mergedProps = mergeProps$
|
|
357
|
+
const mergedProps = mergeProps$1(() => api().itemGroupProps, props);
|
|
743
358
|
return createComponent(ark.div, mergedProps);
|
|
744
359
|
};
|
|
745
360
|
|
|
746
|
-
const
|
|
361
|
+
const CarouselNextTrigger = props => {
|
|
747
362
|
const api = useCarouselContext();
|
|
748
|
-
const mergedProps = mergeProps$
|
|
749
|
-
return createComponent(ark.
|
|
363
|
+
const mergedProps = mergeProps$1(() => api().nextTriggerProps, props);
|
|
364
|
+
return createComponent(ark.button, mergedProps);
|
|
750
365
|
};
|
|
751
366
|
|
|
752
|
-
const
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
NextTrigger: CarouselNextTrigger,
|
|
758
|
-
PrevTrigger: CarouselPrevTrigger,
|
|
759
|
-
Item: CarouselItem,
|
|
760
|
-
ItemGroup: CarouselItemGroup,
|
|
761
|
-
Viewport: CarouselViewport
|
|
762
|
-
});
|
|
763
|
-
|
|
764
|
-
const [CheckboxProvider, useCheckboxContext] = createContext({
|
|
765
|
-
hookName: 'useCheckboxContext',
|
|
766
|
-
providerName: '<CheckboxProvider />'
|
|
767
|
-
});
|
|
367
|
+
const CarouselPrevTrigger = props => {
|
|
368
|
+
const api = useCarouselContext();
|
|
369
|
+
const mergedProps = mergeProps$1(() => api().prevTriggerProps, props);
|
|
370
|
+
return createComponent(ark.button, mergedProps);
|
|
371
|
+
};
|
|
768
372
|
|
|
769
|
-
const
|
|
373
|
+
const useCarousel = props => {
|
|
770
374
|
const getRootNode = useEnvironmentContext();
|
|
771
|
-
const context = mergeProps$
|
|
375
|
+
const context = mergeProps$1({
|
|
772
376
|
id: createUniqueId(),
|
|
773
377
|
getRootNode
|
|
774
378
|
}, props);
|
|
775
|
-
const [state, send] = useMachine(
|
|
379
|
+
const [state, send] = useMachine(carousel.machine(context), {
|
|
776
380
|
context
|
|
777
381
|
});
|
|
778
|
-
return createMemo(() =>
|
|
382
|
+
return createMemo(() => carousel.connect(state, send, normalizeProps));
|
|
779
383
|
};
|
|
780
384
|
|
|
781
|
-
const
|
|
782
|
-
const [
|
|
783
|
-
const api =
|
|
784
|
-
const mergedProps = mergeProps$
|
|
785
|
-
const getChildren = () => runIfFn(
|
|
786
|
-
return createComponent(
|
|
385
|
+
const CarouselRoot = props => {
|
|
386
|
+
const [useCarouselProps, localProps] = createSplitProps()(props, ['align', 'dir', 'getRootNode', 'id', 'ids', 'index', 'loop', 'onIndexChange', 'orientation', 'slidesPerView', 'spacing']);
|
|
387
|
+
const api = useCarousel(useCarouselProps);
|
|
388
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
389
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
390
|
+
return createComponent(CarouselProvider, {
|
|
787
391
|
value: api,
|
|
788
392
|
get children() {
|
|
789
|
-
return createComponent(ark.
|
|
393
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
790
394
|
get children() {
|
|
791
395
|
return getChildren();
|
|
792
396
|
}
|
|
@@ -795,95 +399,102 @@ const Checkbox$1 = props => {
|
|
|
795
399
|
});
|
|
796
400
|
};
|
|
797
401
|
|
|
402
|
+
const CarouselViewport = props => {
|
|
403
|
+
const api = useCarouselContext();
|
|
404
|
+
const mergedProps = mergeProps$1(() => api().viewportProps, props);
|
|
405
|
+
return createComponent(ark.div, mergedProps);
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
const Carousel = {
|
|
409
|
+
Root: CarouselRoot,
|
|
410
|
+
Control: CarouselControl,
|
|
411
|
+
Indicator: CarouselIndicator,
|
|
412
|
+
IndicatorGroup: CarouselIndicatorGroup,
|
|
413
|
+
NextTrigger: CarouselNextTrigger,
|
|
414
|
+
PrevTrigger: CarouselPrevTrigger,
|
|
415
|
+
Item: CarouselItem,
|
|
416
|
+
ItemGroup: CarouselItemGroup,
|
|
417
|
+
Viewport: CarouselViewport
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
const [CheckboxProvider, useCheckboxContext] = createContext({
|
|
421
|
+
hookName: 'useCheckboxContext',
|
|
422
|
+
providerName: '<CheckboxProvider />'
|
|
423
|
+
});
|
|
424
|
+
|
|
798
425
|
const _tmpl$$b = /*#__PURE__*/template(`<input>`);
|
|
799
426
|
const CheckboxControl = props => {
|
|
800
427
|
const api = useCheckboxContext();
|
|
801
|
-
const mergedProps = mergeProps$
|
|
428
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
802
429
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
803
430
|
const _el$ = _tmpl$$b();
|
|
804
|
-
spread
|
|
431
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
805
432
|
return _el$;
|
|
806
433
|
})()];
|
|
807
434
|
};
|
|
808
435
|
|
|
809
436
|
const CheckboxIndicator = props => {
|
|
810
437
|
const api = useCheckboxContext();
|
|
811
|
-
const mergedProps = mergeProps$
|
|
438
|
+
const mergedProps = mergeProps$1(() => api().indicatorProps, props);
|
|
812
439
|
return createComponent(ark.div, mergedProps);
|
|
813
440
|
};
|
|
814
441
|
|
|
815
442
|
const CheckboxLabel = props => {
|
|
816
443
|
const checkbox = useCheckboxContext();
|
|
817
|
-
const mergedProps = mergeProps$
|
|
444
|
+
const mergedProps = mergeProps$1(() => checkbox().labelProps, props);
|
|
818
445
|
return createComponent(ark.span, mergedProps);
|
|
819
446
|
};
|
|
820
447
|
|
|
821
|
-
const
|
|
822
|
-
Root: Checkbox$1,
|
|
823
|
-
Control: CheckboxControl,
|
|
824
|
-
Label: CheckboxLabel,
|
|
825
|
-
Indicator: CheckboxIndicator
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
const [ColorPickerProvider, useColorPickerContext] = createContext({
|
|
829
|
-
hookName: 'useColorPickerContext',
|
|
830
|
-
providerName: '<ColorPickerProvider />'
|
|
831
|
-
});
|
|
832
|
-
|
|
833
|
-
const useColorPicker = props => {
|
|
834
|
-
const [local, rest] = splitProps(props, ['value']);
|
|
448
|
+
const useCheckbox = props => {
|
|
835
449
|
const getRootNode = useEnvironmentContext();
|
|
836
|
-
const context = mergeProps$
|
|
450
|
+
const context = mergeProps$1({
|
|
837
451
|
id: createUniqueId(),
|
|
838
|
-
getRootNode
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
const [state, send] = useMachine(colorPicker.machine(context), {
|
|
452
|
+
getRootNode
|
|
453
|
+
}, props);
|
|
454
|
+
const [state, send] = useMachine(checkbox.machine(context), {
|
|
842
455
|
context
|
|
843
456
|
});
|
|
844
|
-
return createMemo(() =>
|
|
457
|
+
return createMemo(() => checkbox.connect(state, send, normalizeProps));
|
|
845
458
|
};
|
|
846
459
|
|
|
847
|
-
const
|
|
848
|
-
const
|
|
849
|
-
const
|
|
850
|
-
const
|
|
851
|
-
const
|
|
852
|
-
|
|
853
|
-
present: api().isOpen
|
|
854
|
-
})));
|
|
855
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
856
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
857
|
-
return createComponent(ColorPickerProvider, {
|
|
460
|
+
const CheckboxRoot = props => {
|
|
461
|
+
const [useCheckboxProps, labelprops] = createSplitProps()(props, ['checked', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'name', 'onCheckedChange', 'required', 'value']);
|
|
462
|
+
const api = useCheckbox(useCheckboxProps);
|
|
463
|
+
const mergedProps = mergeProps$1(() => api().rootProps, labelprops);
|
|
464
|
+
const getChildren = () => runIfFn(props.children, api);
|
|
465
|
+
return createComponent(CheckboxProvider, {
|
|
858
466
|
value: api,
|
|
859
467
|
get children() {
|
|
860
|
-
return
|
|
861
|
-
value: apiPresence,
|
|
468
|
+
return createComponent(ark.label, mergeProps(mergedProps, {
|
|
862
469
|
get children() {
|
|
863
|
-
return
|
|
864
|
-
get children() {
|
|
865
|
-
return getChildren();
|
|
866
|
-
}
|
|
867
|
-
}));
|
|
470
|
+
return getChildren();
|
|
868
471
|
}
|
|
869
|
-
})
|
|
870
|
-
const _el$ = _tmpl$$a();
|
|
871
|
-
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
872
|
-
return _el$;
|
|
873
|
-
})()];
|
|
472
|
+
}));
|
|
874
473
|
}
|
|
875
474
|
});
|
|
876
475
|
};
|
|
877
476
|
|
|
477
|
+
const Checkbox = {
|
|
478
|
+
Root: CheckboxRoot,
|
|
479
|
+
Control: CheckboxControl,
|
|
480
|
+
Label: CheckboxLabel,
|
|
481
|
+
Indicator: CheckboxIndicator
|
|
482
|
+
};
|
|
483
|
+
|
|
878
484
|
const [ColorPickerAreaProvider, useColorPickerAreaContext] = createContext({
|
|
879
485
|
hookName: 'useColorPickerAreaContext',
|
|
880
486
|
providerName: '<ColorPickerAreaProvider />'
|
|
881
487
|
});
|
|
882
488
|
|
|
489
|
+
const [ColorPickerProvider, useColorPickerContext] = createContext({
|
|
490
|
+
hookName: 'useColorPickerContext',
|
|
491
|
+
providerName: '<ColorPickerProvider />'
|
|
492
|
+
});
|
|
493
|
+
|
|
883
494
|
const ColorPickerArea = props => {
|
|
884
495
|
const [channelProps, divprops] = createSplitProps()(props, ['xChannel', 'yChannel']);
|
|
885
496
|
const api = useColorPickerContext();
|
|
886
|
-
const mergedProps = mergeProps$
|
|
497
|
+
const mergedProps = mergeProps$1(() => api().getAreaProps(channelProps), divprops);
|
|
887
498
|
return createComponent(ColorPickerAreaProvider, {
|
|
888
499
|
value: channelProps,
|
|
889
500
|
get children() {
|
|
@@ -895,21 +506,21 @@ const ColorPickerArea = props => {
|
|
|
895
506
|
const ColorPickerAreaBackground = props => {
|
|
896
507
|
const colorAreaProps = useColorPickerAreaContext();
|
|
897
508
|
const api = useColorPickerContext();
|
|
898
|
-
const mergedProps = mergeProps$
|
|
509
|
+
const mergedProps = mergeProps$1(() => api().getAreaBackgroundProps(colorAreaProps), props);
|
|
899
510
|
return createComponent(ark.div, mergedProps);
|
|
900
511
|
};
|
|
901
512
|
|
|
902
513
|
const ColorPickerAreaThumb = props => {
|
|
903
514
|
const colorAreaProps = useColorPickerAreaContext();
|
|
904
515
|
const api = useColorPickerContext();
|
|
905
|
-
const mergedProps = mergeProps$
|
|
516
|
+
const mergedProps = mergeProps$1(() => api().getAreaThumbProps(colorAreaProps), props);
|
|
906
517
|
return createComponent(ark.div, mergedProps);
|
|
907
518
|
};
|
|
908
519
|
|
|
909
520
|
const ColorPickerChannelInput = props => {
|
|
910
521
|
const [channelProps, inputProps] = createSplitProps()(props, ['channel', 'orientation']);
|
|
911
522
|
const api = useColorPickerContext();
|
|
912
|
-
const mergedProps = mergeProps$
|
|
523
|
+
const mergedProps = mergeProps$1(() => api().getChannelInputProps(channelProps), inputProps);
|
|
913
524
|
return createComponent(ark.input, mergedProps);
|
|
914
525
|
};
|
|
915
526
|
|
|
@@ -921,7 +532,7 @@ const [ColorPickerChannelSliderProvider, useColorPickerChannelSliderContext] = c
|
|
|
921
532
|
const ColorPickerChannelSlider = props => {
|
|
922
533
|
const [channelProps, localProps] = createSplitProps()(props, ['channel', 'orientation']);
|
|
923
534
|
const api = useColorPickerContext();
|
|
924
|
-
const mergedProps = mergeProps$
|
|
535
|
+
const mergedProps = mergeProps$1(() => api().getChannelSliderProps(channelProps), localProps);
|
|
925
536
|
return createComponent(ColorPickerChannelSliderProvider, {
|
|
926
537
|
value: channelProps,
|
|
927
538
|
get children() {
|
|
@@ -933,21 +544,21 @@ const ColorPickerChannelSlider = props => {
|
|
|
933
544
|
const ColorPickerChannelSliderThumb = props => {
|
|
934
545
|
const sliderContext = useColorPickerChannelSliderContext();
|
|
935
546
|
const api = useColorPickerContext();
|
|
936
|
-
const mergedProps = mergeProps$
|
|
547
|
+
const mergedProps = mergeProps$1(() => api().getChannelSliderThumbProps(sliderContext), props);
|
|
937
548
|
return createComponent(ark.div, mergedProps);
|
|
938
549
|
};
|
|
939
550
|
|
|
940
551
|
const ColorPickerChannelSliderTrack = props => {
|
|
941
552
|
const sliderContext = useColorPickerChannelSliderContext();
|
|
942
553
|
const api = useColorPickerContext();
|
|
943
|
-
const mergedProps = mergeProps$
|
|
554
|
+
const mergedProps = mergeProps$1(() => api().getChannelSliderTrackProps(sliderContext), props);
|
|
944
555
|
return createComponent(ark.div, mergedProps);
|
|
945
556
|
};
|
|
946
557
|
|
|
947
558
|
const ColorPickerContent = props => {
|
|
948
559
|
const api = useColorPickerContext();
|
|
949
560
|
const presenceApi = usePresenceContext();
|
|
950
|
-
const mergedProps = mergeProps$
|
|
561
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
951
562
|
return createComponent(Show, {
|
|
952
563
|
get when() {
|
|
953
564
|
return !presenceApi().isUnmounted;
|
|
@@ -960,20 +571,20 @@ const ColorPickerContent = props => {
|
|
|
960
571
|
|
|
961
572
|
const ColorPickerControl = props => {
|
|
962
573
|
const api = useColorPickerContext();
|
|
963
|
-
const mergedProps = mergeProps$
|
|
574
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
964
575
|
return createComponent(ark.div, mergedProps);
|
|
965
576
|
};
|
|
966
577
|
|
|
967
578
|
const ColorPickerEyeDropperTrigger = props => {
|
|
968
579
|
const api = useColorPickerContext();
|
|
969
|
-
const mergedProps = mergeProps$
|
|
580
|
+
const mergedProps = mergeProps$1(() => api().eyeDropperTriggerProps, props);
|
|
970
581
|
return createComponent(ark.button, mergedProps);
|
|
971
582
|
};
|
|
972
583
|
|
|
973
584
|
const ColorPickerFormatSelect = props => {
|
|
974
585
|
const api = useColorPickerContext();
|
|
975
|
-
const mergedProps = mergeProps$
|
|
976
|
-
return createComponent(ark.select, mergeProps
|
|
586
|
+
const mergedProps = mergeProps$1(() => api().formatSelectProps, props);
|
|
587
|
+
return createComponent(ark.select, mergeProps(mergedProps, {
|
|
977
588
|
get children() {
|
|
978
589
|
return createComponent(Index, {
|
|
979
590
|
each: ['rgba', 'hsla', 'hsba'],
|
|
@@ -992,20 +603,20 @@ const ColorPickerFormatSelect = props => {
|
|
|
992
603
|
|
|
993
604
|
const ColorPickerFormatTrigger = props => {
|
|
994
605
|
const api = useColorPickerContext();
|
|
995
|
-
const mergedProps = mergeProps$
|
|
606
|
+
const mergedProps = mergeProps$1(() => api().formatTriggerProps, props);
|
|
996
607
|
return createComponent(ark.button, mergedProps);
|
|
997
608
|
};
|
|
998
609
|
|
|
999
610
|
const ColorPickerLabel = props => {
|
|
1000
611
|
const api = useColorPickerContext();
|
|
1001
|
-
const mergedProps = mergeProps$
|
|
612
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
1002
613
|
return createComponent(ark.label, mergedProps);
|
|
1003
614
|
};
|
|
1004
615
|
|
|
1005
616
|
const ColorPickerPositioner = props => {
|
|
1006
617
|
const api = useColorPickerContext();
|
|
1007
618
|
const presenceApi = usePresenceContext();
|
|
1008
|
-
const mergedProps = mergeProps$
|
|
619
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
1009
620
|
return createComponent(Show, {
|
|
1010
621
|
get when() {
|
|
1011
622
|
return !presenceApi().isUnmounted;
|
|
@@ -1016,6 +627,51 @@ const ColorPickerPositioner = props => {
|
|
|
1016
627
|
});
|
|
1017
628
|
};
|
|
1018
629
|
|
|
630
|
+
const useColorPicker = props => {
|
|
631
|
+
const [local, rest] = splitProps(props, ['value']);
|
|
632
|
+
const getRootNode = useEnvironmentContext();
|
|
633
|
+
const context = mergeProps$1(() => ({
|
|
634
|
+
id: createUniqueId(),
|
|
635
|
+
getRootNode,
|
|
636
|
+
value: local.value ? colorPicker.parse(local.value) : undefined
|
|
637
|
+
}), rest);
|
|
638
|
+
const [state, send] = useMachine(colorPicker.machine(context), {
|
|
639
|
+
context
|
|
640
|
+
});
|
|
641
|
+
return createMemo(() => colorPicker.connect(state, send, normalizeProps));
|
|
642
|
+
};
|
|
643
|
+
|
|
644
|
+
const _tmpl$$a = /*#__PURE__*/template(`<input>`);
|
|
645
|
+
const ColorPickerRoot = props => {
|
|
646
|
+
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
647
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['closeOnSelect', 'dir', 'disabled', 'format', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onFormatChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
648
|
+
const api = useColorPicker(useColorPickerProps);
|
|
649
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
650
|
+
present: api().isOpen
|
|
651
|
+
})));
|
|
652
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
653
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
654
|
+
return createComponent(ColorPickerProvider, {
|
|
655
|
+
value: api,
|
|
656
|
+
get children() {
|
|
657
|
+
return [createComponent(PresenceProvider, {
|
|
658
|
+
value: apiPresence,
|
|
659
|
+
get children() {
|
|
660
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
661
|
+
get children() {
|
|
662
|
+
return getChildren();
|
|
663
|
+
}
|
|
664
|
+
}));
|
|
665
|
+
}
|
|
666
|
+
}), (() => {
|
|
667
|
+
const _el$ = _tmpl$$a();
|
|
668
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
669
|
+
return _el$;
|
|
670
|
+
})()];
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
};
|
|
674
|
+
|
|
1019
675
|
const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext({
|
|
1020
676
|
hookName: 'useColorPickerSwatchContext',
|
|
1021
677
|
providerName: '<ColorPickerSwatchProvider />'
|
|
@@ -1024,7 +680,7 @@ const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext({
|
|
|
1024
680
|
const ColorPickerSwatch = props => {
|
|
1025
681
|
const [swatchProps, localProps] = createSplitProps()(props, ['respectAlpha', 'value']);
|
|
1026
682
|
const api = useColorPickerContext();
|
|
1027
|
-
const mergedProps = mergeProps$
|
|
683
|
+
const mergedProps = mergeProps$1(() => api().getSwatchProps(swatchProps), localProps);
|
|
1028
684
|
return createComponent(ColorPickerSwatchProvider, {
|
|
1029
685
|
value: swatchProps,
|
|
1030
686
|
get children() {
|
|
@@ -1035,41 +691,41 @@ const ColorPickerSwatch = props => {
|
|
|
1035
691
|
|
|
1036
692
|
const ColorPickerSwatchGroup = props => {
|
|
1037
693
|
const api = useColorPickerContext();
|
|
1038
|
-
const mergedProps = mergeProps$
|
|
694
|
+
const mergedProps = mergeProps$1(() => api().swatchGroupProps, props);
|
|
1039
695
|
return createComponent(ark.div, mergedProps);
|
|
1040
696
|
};
|
|
1041
697
|
|
|
1042
698
|
const ColorPickerSwatchIndicator = props => {
|
|
1043
699
|
const api = useColorPickerContext();
|
|
1044
700
|
const swatchProps = useColorPickerSwatchContext();
|
|
1045
|
-
const mergedProps = mergeProps$
|
|
701
|
+
const mergedProps = mergeProps$1(() => api().getSwatchIndicatorProps(swatchProps), props);
|
|
1046
702
|
return createComponent(ark.div, mergedProps);
|
|
1047
703
|
};
|
|
1048
704
|
|
|
1049
705
|
const ColorPickerSwatchTrigger = props => {
|
|
1050
706
|
const [triggerProps, localProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
1051
707
|
const api = useColorPickerContext();
|
|
1052
|
-
const mergedProps = mergeProps$
|
|
708
|
+
const mergedProps = mergeProps$1(() => api().getSwatchTriggerProps(triggerProps), localProps);
|
|
1053
709
|
return createComponent(ark.button, mergedProps);
|
|
1054
710
|
};
|
|
1055
711
|
|
|
1056
712
|
const ColorPickerTransparencyGrid = props => {
|
|
1057
713
|
const [gridProps, localProps] = createSplitProps()(props, ['size']);
|
|
1058
714
|
const api = useColorPickerContext();
|
|
1059
|
-
const mergedProps = mergeProps$
|
|
715
|
+
const mergedProps = mergeProps$1(() => api().getTransparencyGridProps(gridProps), localProps);
|
|
1060
716
|
return createComponent(ark.div, mergedProps);
|
|
1061
717
|
};
|
|
1062
718
|
|
|
1063
719
|
const ColorPickerTrigger = props => {
|
|
1064
720
|
const api = useColorPickerContext();
|
|
1065
|
-
const mergedProps = mergeProps$
|
|
721
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, props);
|
|
1066
722
|
return createComponent(ark.button, mergedProps);
|
|
1067
723
|
};
|
|
1068
724
|
|
|
1069
725
|
const ColorPickerValueText = props => {
|
|
1070
726
|
const api = useColorPickerContext();
|
|
1071
|
-
const mergedProps = mergeProps$
|
|
1072
|
-
return createComponent(ark.span, mergeProps
|
|
727
|
+
const mergedProps = mergeProps$1(() => colorPickerAnatomy.build().valueText.attrs, props);
|
|
728
|
+
return createComponent(ark.span, mergeProps(mergedProps, {
|
|
1073
729
|
get children() {
|
|
1074
730
|
return api().valueAsString || props.children;
|
|
1075
731
|
}
|
|
@@ -1078,7 +734,7 @@ const ColorPickerValueText = props => {
|
|
|
1078
734
|
|
|
1079
735
|
const ColorPickerView = props => {
|
|
1080
736
|
const api = useColorPickerContext();
|
|
1081
|
-
const mergedProps = mergeProps$
|
|
737
|
+
const mergedProps = mergeProps$1(() => colorPickerAnatomy.build().view.attrs, props);
|
|
1082
738
|
|
|
1083
739
|
// TODO @segunadebayo
|
|
1084
740
|
return createComponent(Show, {
|
|
@@ -1086,7 +742,7 @@ const ColorPickerView = props => {
|
|
|
1086
742
|
return api().format === props.format;
|
|
1087
743
|
},
|
|
1088
744
|
get children() {
|
|
1089
|
-
return createComponent(ark.div, mergeProps
|
|
745
|
+
return createComponent(ark.div, mergeProps({
|
|
1090
746
|
get ["data-format"]() {
|
|
1091
747
|
return props.format;
|
|
1092
748
|
}
|
|
@@ -1095,8 +751,8 @@ const ColorPickerView = props => {
|
|
|
1095
751
|
});
|
|
1096
752
|
};
|
|
1097
753
|
|
|
1098
|
-
const ColorPicker =
|
|
1099
|
-
Root:
|
|
754
|
+
const ColorPicker = {
|
|
755
|
+
Root: ColorPickerRoot,
|
|
1100
756
|
Area: ColorPickerArea,
|
|
1101
757
|
AreaBackground: ColorPickerAreaBackground,
|
|
1102
758
|
AreaThumb: ColorPickerAreaThumb,
|
|
@@ -1119,7 +775,7 @@ const ColorPicker = Object.assign(ColorPicker$1, {
|
|
|
1119
775
|
Trigger: ColorPickerTrigger,
|
|
1120
776
|
ValueText: ColorPickerValueText,
|
|
1121
777
|
View: ColorPickerView
|
|
1122
|
-
}
|
|
778
|
+
};
|
|
1123
779
|
|
|
1124
780
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1125
781
|
const [ComboboxProvider, useComboboxContext] = createContext({
|
|
@@ -1127,57 +783,16 @@ const [ComboboxProvider, useComboboxContext] = createContext({
|
|
|
1127
783
|
providerName: '<ComboboxProvider />'
|
|
1128
784
|
});
|
|
1129
785
|
|
|
1130
|
-
const useCombobox = props => {
|
|
1131
|
-
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
1132
|
-
const collection = () => combobox.collection(collectionOptions);
|
|
1133
|
-
const getRootNode = useEnvironmentContext();
|
|
1134
|
-
const context = () => mergeProps$2({
|
|
1135
|
-
id: createUniqueId(),
|
|
1136
|
-
getRootNode,
|
|
1137
|
-
collection: collection()
|
|
1138
|
-
}, rest);
|
|
1139
|
-
const [state, send] = useMachine(combobox.machine(context()), {
|
|
1140
|
-
context
|
|
1141
|
-
});
|
|
1142
|
-
return createMemo(() => combobox.connect(state, send, normalizeProps));
|
|
1143
|
-
};
|
|
1144
|
-
|
|
1145
|
-
const Combobox$1 = props => {
|
|
1146
|
-
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
1147
|
-
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ['allowCustomValue', 'autoFocus', 'closeOnSelect', 'dir', 'disabled', 'form', 'getRootNode', 'highlightedValue', 'id', 'ids', 'inputBehavior', 'inputValue', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loop', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onOpenChange', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'openOnClick', 'placeholder', 'positioning', 'readOnly', 'selectionBehavior', 'selectOnBlur', 'translations', 'value']);
|
|
1148
|
-
const api = useCombobox(useComboboxProps);
|
|
1149
|
-
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
1150
|
-
present: api().isOpen
|
|
1151
|
-
})));
|
|
1152
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
1153
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
1154
|
-
return createComponent(ComboboxProvider, {
|
|
1155
|
-
value: api,
|
|
1156
|
-
get children() {
|
|
1157
|
-
return createComponent(PresenceProvider, {
|
|
1158
|
-
value: apiPresence,
|
|
1159
|
-
get children() {
|
|
1160
|
-
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
1161
|
-
get children() {
|
|
1162
|
-
return getChildren();
|
|
1163
|
-
}
|
|
1164
|
-
}));
|
|
1165
|
-
}
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
});
|
|
1169
|
-
};
|
|
1170
|
-
|
|
1171
786
|
const ComboboxClearTrigger = props => {
|
|
1172
787
|
const combobox = useComboboxContext();
|
|
1173
|
-
const mergedProps = mergeProps$
|
|
788
|
+
const mergedProps = mergeProps$1(() => combobox().clearTriggerProps, props);
|
|
1174
789
|
return createComponent(ark.button, mergedProps);
|
|
1175
790
|
};
|
|
1176
791
|
|
|
1177
792
|
const ComboboxContent = props => {
|
|
1178
793
|
const api = useComboboxContext();
|
|
1179
794
|
const presenceApi = usePresenceContext();
|
|
1180
|
-
const mergedProps = mergeProps$
|
|
795
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1181
796
|
return createComponent(Show, {
|
|
1182
797
|
get when() {
|
|
1183
798
|
return !presenceApi().isUnmounted;
|
|
@@ -1190,13 +805,13 @@ const ComboboxContent = props => {
|
|
|
1190
805
|
|
|
1191
806
|
const ComboboxControl = props => {
|
|
1192
807
|
const combobox = useComboboxContext();
|
|
1193
|
-
const mergedProps = mergeProps$
|
|
808
|
+
const mergedProps = mergeProps$1(() => combobox().controlProps, props);
|
|
1194
809
|
return createComponent(ark.div, mergedProps);
|
|
1195
810
|
};
|
|
1196
811
|
|
|
1197
812
|
const ComboboxInput = props => {
|
|
1198
813
|
const combobox = useComboboxContext();
|
|
1199
|
-
const mergedProps = mergeProps$
|
|
814
|
+
const mergedProps = mergeProps$1(() => combobox().inputProps, props);
|
|
1200
815
|
return createComponent(ark.input, mergedProps);
|
|
1201
816
|
};
|
|
1202
817
|
|
|
@@ -1208,12 +823,12 @@ const [ComboboxItemProvider, useComboboxItemContext] = createContext({
|
|
|
1208
823
|
const ComboboxItem = props => {
|
|
1209
824
|
const [itemProps, localProps] = createSplitProps()(props, ['item']);
|
|
1210
825
|
const api = useComboboxContext();
|
|
1211
|
-
const mergedProps = mergeProps$
|
|
826
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
1212
827
|
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
1213
828
|
return createComponent(ComboboxItemProvider, {
|
|
1214
829
|
value: itemProps,
|
|
1215
830
|
get children() {
|
|
1216
|
-
return createComponent(ark.div, mergeProps
|
|
831
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1217
832
|
get children() {
|
|
1218
833
|
return getChildren();
|
|
1219
834
|
}
|
|
@@ -1225,14 +840,14 @@ const ComboboxItem = props => {
|
|
|
1225
840
|
const ComboboxItemGroup = props => {
|
|
1226
841
|
const [groupProps, localProps] = createSplitProps()(props, ['id']);
|
|
1227
842
|
const combobox = useComboboxContext();
|
|
1228
|
-
const mergedProps = mergeProps$
|
|
843
|
+
const mergedProps = mergeProps$1(() => combobox().getItemGroupProps(groupProps), localProps);
|
|
1229
844
|
return createComponent(ark.div, mergedProps);
|
|
1230
845
|
};
|
|
1231
846
|
|
|
1232
847
|
const ComboboxItemGroupLabel = props => {
|
|
1233
848
|
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
1234
849
|
const api = useComboboxContext();
|
|
1235
|
-
const mergedProps = mergeProps$
|
|
850
|
+
const mergedProps = mergeProps$1(() => api().getItemGroupLabelProps({
|
|
1236
851
|
htmlFor: labelProps.for
|
|
1237
852
|
}), localProps);
|
|
1238
853
|
return createComponent(ark.div, mergedProps);
|
|
@@ -1241,27 +856,27 @@ const ComboboxItemGroupLabel = props => {
|
|
|
1241
856
|
const ComboboxItemIndicator = props => {
|
|
1242
857
|
const combobox = useComboboxContext();
|
|
1243
858
|
const itemProps = useComboboxItemContext();
|
|
1244
|
-
const mergedProps = mergeProps$
|
|
859
|
+
const mergedProps = mergeProps$1(() => combobox().getItemIndicatorProps(itemProps), props);
|
|
1245
860
|
return createComponent(ark.div, mergedProps);
|
|
1246
861
|
};
|
|
1247
862
|
|
|
1248
863
|
const ComboboxItemText = props => {
|
|
1249
864
|
const api = useComboboxContext();
|
|
1250
865
|
const itemProps = useComboboxItemContext();
|
|
1251
|
-
const mergedProps = mergeProps$
|
|
866
|
+
const mergedProps = mergeProps$1(() => api().getItemTextProps(itemProps), props);
|
|
1252
867
|
return createComponent(ark.span, mergedProps);
|
|
1253
868
|
};
|
|
1254
869
|
|
|
1255
870
|
const ComboboxLabel = props => {
|
|
1256
871
|
const combobox = useComboboxContext();
|
|
1257
|
-
const mergedProps = mergeProps$
|
|
872
|
+
const mergedProps = mergeProps$1(() => combobox().labelProps, props);
|
|
1258
873
|
return createComponent(ark.label, mergedProps);
|
|
1259
874
|
};
|
|
1260
875
|
|
|
1261
876
|
const ComboboxPositioner = props => {
|
|
1262
877
|
const api = useComboboxContext();
|
|
1263
878
|
const presenceApi = usePresenceContext();
|
|
1264
|
-
const mergedProps = mergeProps$
|
|
879
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
1265
880
|
return createComponent(Show, {
|
|
1266
881
|
get when() {
|
|
1267
882
|
return !presenceApi().isUnmounted;
|
|
@@ -1272,64 +887,37 @@ const ComboboxPositioner = props => {
|
|
|
1272
887
|
});
|
|
1273
888
|
};
|
|
1274
889
|
|
|
1275
|
-
const
|
|
1276
|
-
const
|
|
1277
|
-
const
|
|
1278
|
-
return createComponent(ark.button, mergedProps);
|
|
1279
|
-
};
|
|
1280
|
-
|
|
1281
|
-
const Combobox = Object.assign(Combobox$1, {
|
|
1282
|
-
Root: Combobox$1,
|
|
1283
|
-
ClearTrigger: ComboboxClearTrigger,
|
|
1284
|
-
Content: ComboboxContent,
|
|
1285
|
-
Control: ComboboxControl,
|
|
1286
|
-
Input: ComboboxInput,
|
|
1287
|
-
Item: ComboboxItem,
|
|
1288
|
-
ItemGroup: ComboboxItemGroup,
|
|
1289
|
-
ItemGroupLabel: ComboboxItemGroupLabel,
|
|
1290
|
-
ItemIndicator: ComboboxItemIndicator,
|
|
1291
|
-
ItemText: ComboboxItemText,
|
|
1292
|
-
Label: ComboboxLabel,
|
|
1293
|
-
Positioner: ComboboxPositioner,
|
|
1294
|
-
Trigger: ComboboxTrigger
|
|
1295
|
-
});
|
|
1296
|
-
|
|
1297
|
-
const [DatePickerProvider, useDatePickerContext] = createContext({
|
|
1298
|
-
hookName: 'useDatePickerContext',
|
|
1299
|
-
providerName: '<DatePickerProvider />'
|
|
1300
|
-
});
|
|
1301
|
-
|
|
1302
|
-
const useDatePicker = props => {
|
|
1303
|
-
const [local, rest] = splitProps(props, ['value', 'focusedValue']);
|
|
890
|
+
const useCombobox = props => {
|
|
891
|
+
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
892
|
+
const collection = () => combobox.collection(collectionOptions);
|
|
1304
893
|
const getRootNode = useEnvironmentContext();
|
|
1305
|
-
const context =
|
|
894
|
+
const context = () => mergeProps$1({
|
|
1306
895
|
id: createUniqueId(),
|
|
1307
896
|
getRootNode,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
const [state, send] = useMachine(datePicker.machine(context), {
|
|
897
|
+
collection: collection()
|
|
898
|
+
}, rest);
|
|
899
|
+
const [state, send] = useMachine(combobox.machine(context()), {
|
|
1312
900
|
context
|
|
1313
901
|
});
|
|
1314
|
-
return createMemo(() =>
|
|
902
|
+
return createMemo(() => combobox.connect(state, send, normalizeProps));
|
|
1315
903
|
};
|
|
1316
904
|
|
|
1317
|
-
const
|
|
1318
|
-
const [presenceProps,
|
|
1319
|
-
const [
|
|
1320
|
-
const api =
|
|
1321
|
-
const apiPresence = usePresence(mergeProps$
|
|
905
|
+
const ComboboxRoot = props => {
|
|
906
|
+
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
907
|
+
const [useComboboxProps, localProps] = createSplitProps()(comboboxProps, ['allowCustomValue', 'autoFocus', 'closeOnSelect', 'dir', 'disabled', 'form', 'getRootNode', 'highlightedValue', 'id', 'ids', 'inputBehavior', 'inputValue', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loop', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInputValueChange', 'onInteractOutside', 'onOpenChange', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'openOnClick', 'placeholder', 'positioning', 'readOnly', 'selectionBehavior', 'selectOnBlur', 'translations', 'value']);
|
|
908
|
+
const api = useCombobox(useComboboxProps);
|
|
909
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1322
910
|
present: api().isOpen
|
|
1323
911
|
})));
|
|
1324
|
-
const mergedProps = mergeProps$
|
|
912
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1325
913
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1326
|
-
return createComponent(
|
|
914
|
+
return createComponent(ComboboxProvider, {
|
|
1327
915
|
value: api,
|
|
1328
916
|
get children() {
|
|
1329
917
|
return createComponent(PresenceProvider, {
|
|
1330
918
|
value: apiPresence,
|
|
1331
919
|
get children() {
|
|
1332
|
-
return createComponent(ark.div, mergeProps
|
|
920
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1333
921
|
get children() {
|
|
1334
922
|
return getChildren();
|
|
1335
923
|
}
|
|
@@ -1340,16 +928,43 @@ const DatePicker$1 = props => {
|
|
|
1340
928
|
});
|
|
1341
929
|
};
|
|
1342
930
|
|
|
931
|
+
const ComboboxTrigger = props => {
|
|
932
|
+
const combobox = useComboboxContext();
|
|
933
|
+
const mergedProps = mergeProps$1(() => combobox().triggerProps, props);
|
|
934
|
+
return createComponent(ark.button, mergedProps);
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
const Combobox = {
|
|
938
|
+
Root: ComboboxRoot,
|
|
939
|
+
ClearTrigger: ComboboxClearTrigger,
|
|
940
|
+
Content: ComboboxContent,
|
|
941
|
+
Control: ComboboxControl,
|
|
942
|
+
Input: ComboboxInput,
|
|
943
|
+
Item: ComboboxItem,
|
|
944
|
+
ItemGroup: ComboboxItemGroup,
|
|
945
|
+
ItemGroupLabel: ComboboxItemGroupLabel,
|
|
946
|
+
ItemIndicator: ComboboxItemIndicator,
|
|
947
|
+
ItemText: ComboboxItemText,
|
|
948
|
+
Label: ComboboxLabel,
|
|
949
|
+
Positioner: ComboboxPositioner,
|
|
950
|
+
Trigger: ComboboxTrigger
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
const [DatePickerProvider, useDatePickerContext] = createContext({
|
|
954
|
+
hookName: 'useDatePickerContext',
|
|
955
|
+
providerName: '<DatePickerProvider />'
|
|
956
|
+
});
|
|
957
|
+
|
|
1343
958
|
const DatePickerClearTrigger = props => {
|
|
1344
959
|
const api = useDatePickerContext();
|
|
1345
|
-
const mergedProps = mergeProps$
|
|
960
|
+
const mergedProps = mergeProps$1(() => api().clearTriggerProps, props);
|
|
1346
961
|
return createComponent(ark.button, mergedProps);
|
|
1347
962
|
};
|
|
1348
963
|
|
|
1349
964
|
const DatePickerContent = props => {
|
|
1350
965
|
const api = useDatePickerContext();
|
|
1351
966
|
const presenceApi = usePresenceContext();
|
|
1352
|
-
const mergedProps = mergeProps$
|
|
967
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1353
968
|
return createComponent(Show, {
|
|
1354
969
|
get when() {
|
|
1355
970
|
return !presenceApi().isUnmounted;
|
|
@@ -1362,27 +977,27 @@ const DatePickerContent = props => {
|
|
|
1362
977
|
|
|
1363
978
|
const DatePickerControl = props => {
|
|
1364
979
|
const api = useDatePickerContext();
|
|
1365
|
-
const mergedProps = mergeProps$
|
|
980
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
1366
981
|
return createComponent(ark.div, mergedProps);
|
|
1367
982
|
};
|
|
1368
983
|
|
|
1369
984
|
const DatePickerInput = props => {
|
|
1370
985
|
const api = useDatePickerContext();
|
|
1371
|
-
const mergedProps = mergeProps$
|
|
986
|
+
const mergedProps = mergeProps$1(() => api().inputProps, props);
|
|
1372
987
|
return createComponent(ark.input, mergedProps);
|
|
1373
988
|
};
|
|
1374
989
|
|
|
1375
990
|
const DatePickerLabel = props => {
|
|
1376
991
|
const api = useDatePickerContext();
|
|
1377
|
-
const mergedProps = mergeProps$
|
|
992
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
1378
993
|
return createComponent(ark.label, mergedProps);
|
|
1379
994
|
};
|
|
1380
995
|
|
|
1381
996
|
const _tmpl$$9 = /*#__PURE__*/template(`<option>`);
|
|
1382
997
|
const DatePickerMonthSelect = props => {
|
|
1383
998
|
const api = useDatePickerContext();
|
|
1384
|
-
const mergedProps = mergeProps$
|
|
1385
|
-
return createComponent(ark.select, mergeProps
|
|
999
|
+
const mergedProps = mergeProps$1(() => api().monthSelectProps, props);
|
|
1000
|
+
return createComponent(ark.select, mergeProps(mergedProps, {
|
|
1386
1001
|
get children() {
|
|
1387
1002
|
return api().getMonths().map(month => (() => {
|
|
1388
1003
|
const _el$ = _tmpl$$9();
|
|
@@ -1402,14 +1017,14 @@ const [DatePickerViewProvider, useDatePickerViewContext] = createContext({
|
|
|
1402
1017
|
const DatePickerNextTrigger = props => {
|
|
1403
1018
|
const api = useDatePickerContext();
|
|
1404
1019
|
const viewProps = useDatePickerViewContext();
|
|
1405
|
-
const mergedProps = mergeProps$
|
|
1020
|
+
const mergedProps = mergeProps$1(() => api().getNextTriggerProps(viewProps), props);
|
|
1406
1021
|
return createComponent(ark.button, mergedProps);
|
|
1407
1022
|
};
|
|
1408
1023
|
|
|
1409
1024
|
const DatePickerPositioner = props => {
|
|
1410
1025
|
const api = useDatePickerContext();
|
|
1411
1026
|
const presenceApi = usePresenceContext();
|
|
1412
|
-
const mergedProps = mergeProps$
|
|
1027
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
1413
1028
|
return createComponent(Show, {
|
|
1414
1029
|
get when() {
|
|
1415
1030
|
return !presenceApi().isUnmounted;
|
|
@@ -1423,20 +1038,61 @@ const DatePickerPositioner = props => {
|
|
|
1423
1038
|
const DatePickerPrevTrigger = props => {
|
|
1424
1039
|
const api = useDatePickerContext();
|
|
1425
1040
|
const viewProps = useDatePickerViewContext();
|
|
1426
|
-
const mergedProps = mergeProps$
|
|
1041
|
+
const mergedProps = mergeProps$1(() => api().getPrevTriggerProps(viewProps), props);
|
|
1427
1042
|
return createComponent(ark.button, mergedProps);
|
|
1428
1043
|
};
|
|
1429
1044
|
|
|
1430
1045
|
const DatePickerRangeText = props => {
|
|
1431
1046
|
const api = useDatePickerContext();
|
|
1432
|
-
const mergedProps = mergeProps$
|
|
1433
|
-
return createComponent(ark.div, mergeProps
|
|
1047
|
+
const mergedProps = mergeProps$1(() => api().rangeTextProps, props);
|
|
1048
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1434
1049
|
get children() {
|
|
1435
1050
|
return api().visibleRangeText.start;
|
|
1436
1051
|
}
|
|
1437
1052
|
}));
|
|
1438
1053
|
};
|
|
1439
1054
|
|
|
1055
|
+
const useDatePicker = props => {
|
|
1056
|
+
const [local, rest] = splitProps(props, ['value', 'focusedValue']);
|
|
1057
|
+
const getRootNode = useEnvironmentContext();
|
|
1058
|
+
const context = mergeProps$1(() => ({
|
|
1059
|
+
id: createUniqueId(),
|
|
1060
|
+
getRootNode,
|
|
1061
|
+
focusedValue: local.focusedValue ? datePicker.parse(local.focusedValue) : undefined,
|
|
1062
|
+
value: local.value ? datePicker.parse(local.value) : undefined
|
|
1063
|
+
}), rest);
|
|
1064
|
+
const [state, send] = useMachine(datePicker.machine(context), {
|
|
1065
|
+
context
|
|
1066
|
+
});
|
|
1067
|
+
return createMemo(() => datePicker.connect(state, send, normalizeProps));
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
const DatePickerRoot = props => {
|
|
1071
|
+
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1072
|
+
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'dir', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'getRootNode', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', 'min', 'modal', 'name', 'numOfMonths', 'onFocusChange', 'onOpenChange', 'onValueChange', 'onViewChange', 'open', 'parse', 'positioning', 'readOnly', 'selectionMode', 'startOfWeek', 'timeZone', 'translations', 'value', 'view']);
|
|
1073
|
+
const api = useDatePicker(useDatePickerProps);
|
|
1074
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1075
|
+
present: api().isOpen
|
|
1076
|
+
})));
|
|
1077
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1078
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1079
|
+
return createComponent(DatePickerProvider, {
|
|
1080
|
+
value: api,
|
|
1081
|
+
get children() {
|
|
1082
|
+
return createComponent(PresenceProvider, {
|
|
1083
|
+
value: apiPresence,
|
|
1084
|
+
get children() {
|
|
1085
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1086
|
+
get children() {
|
|
1087
|
+
return getChildren();
|
|
1088
|
+
}
|
|
1089
|
+
}));
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
});
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1440
1096
|
const [DatePickerTableProvider, useDatePickerTableContext] = createContext({
|
|
1441
1097
|
hookName: 'useDatePickerTableContext',
|
|
1442
1098
|
providerName: '<DatePickerTableProvider />'
|
|
@@ -1453,7 +1109,7 @@ const DatePickerTable = props => {
|
|
|
1453
1109
|
id: createUniqueId(),
|
|
1454
1110
|
...viewProps
|
|
1455
1111
|
};
|
|
1456
|
-
const mergedProps = mergeProps$
|
|
1112
|
+
const mergedProps = mergeProps$1(() => api().getTableProps(tableProps), localProps);
|
|
1457
1113
|
return createComponent(DatePickerTableProvider, {
|
|
1458
1114
|
value: tableProps,
|
|
1459
1115
|
get children() {
|
|
@@ -1465,7 +1121,7 @@ const DatePickerTable = props => {
|
|
|
1465
1121
|
const DatePickerTableBody = props => {
|
|
1466
1122
|
const api = useDatePickerContext();
|
|
1467
1123
|
const tableProps = useDatePickerTableContext();
|
|
1468
|
-
const mergedProps = mergeProps$
|
|
1124
|
+
const mergedProps = mergeProps$1(() => api().getTableBodyProps(tableProps), props);
|
|
1469
1125
|
return createComponent(ark.tbody, mergedProps);
|
|
1470
1126
|
};
|
|
1471
1127
|
|
|
@@ -1484,7 +1140,7 @@ const DatePickerTableCell = props => {
|
|
|
1484
1140
|
year: api().getYearTableCellProps
|
|
1485
1141
|
// @ts-expect-error use filter guard
|
|
1486
1142
|
}[viewProps.view](cellProps);
|
|
1487
|
-
const mergedProps = mergeProps$
|
|
1143
|
+
const mergedProps = mergeProps$1(() => tableCellProps, localProps);
|
|
1488
1144
|
return createComponent(DatePickerTableCellProvider, {
|
|
1489
1145
|
value: cellProps,
|
|
1490
1146
|
get children() {
|
|
@@ -1503,34 +1159,34 @@ const DatePickerTableCellTrigger = props => {
|
|
|
1503
1159
|
year: api().getYearTableCellTriggerProps
|
|
1504
1160
|
// @ts-expect-error value is number filter
|
|
1505
1161
|
}[viewProps.view](cellProps);
|
|
1506
|
-
const mergedProps = mergeProps$
|
|
1162
|
+
const mergedProps = mergeProps$1(() => triggerProps, props);
|
|
1507
1163
|
return createComponent(ark.button, mergedProps);
|
|
1508
1164
|
};
|
|
1509
1165
|
|
|
1510
1166
|
const DatePickerTableHead = props => {
|
|
1511
1167
|
const api = useDatePickerContext();
|
|
1512
1168
|
const tableProps = useDatePickerTableContext();
|
|
1513
|
-
const mergedProps = mergeProps$
|
|
1169
|
+
const mergedProps = mergeProps$1(() => api().getTableHeadProps(tableProps), props);
|
|
1514
1170
|
return createComponent(ark.thead, mergedProps);
|
|
1515
1171
|
};
|
|
1516
1172
|
|
|
1517
1173
|
const DatePickerTableHeader = props => {
|
|
1518
1174
|
const api = useDatePickerContext();
|
|
1519
1175
|
const tableProps = useDatePickerTableContext();
|
|
1520
|
-
const mergedProps = mergeProps$
|
|
1176
|
+
const mergedProps = mergeProps$1(() => api().getTableHeaderProps(tableProps), props);
|
|
1521
1177
|
return createComponent(ark.th, mergedProps);
|
|
1522
1178
|
};
|
|
1523
1179
|
|
|
1524
1180
|
const DatePickerTableRow = props => {
|
|
1525
1181
|
const api = useDatePickerContext();
|
|
1526
1182
|
const tableProps = useDatePickerTableContext();
|
|
1527
|
-
const mergedProps = mergeProps$
|
|
1183
|
+
const mergedProps = mergeProps$1(() => api().getTableRowProps(tableProps), props);
|
|
1528
1184
|
return createComponent(ark.tr, mergedProps);
|
|
1529
1185
|
};
|
|
1530
1186
|
|
|
1531
1187
|
const DatePickerTrigger = props => {
|
|
1532
1188
|
const api = useDatePickerContext();
|
|
1533
|
-
const mergedProps = mergeProps$
|
|
1189
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, props);
|
|
1534
1190
|
return createComponent(ark.button, mergedProps);
|
|
1535
1191
|
};
|
|
1536
1192
|
|
|
@@ -1538,11 +1194,11 @@ const DatePickerView = props => {
|
|
|
1538
1194
|
const [viewProps, localProps] = createSplitProps()(props, ['view']);
|
|
1539
1195
|
const api = useDatePickerContext();
|
|
1540
1196
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1541
|
-
const mergedProps = mergeProps$
|
|
1197
|
+
const mergedProps = mergeProps$1(() => datePickerAnatomy.build().view.attrs, localProps);
|
|
1542
1198
|
return createComponent(DatePickerViewProvider, {
|
|
1543
1199
|
value: viewProps,
|
|
1544
1200
|
get children() {
|
|
1545
|
-
return createComponent(ark.div, mergeProps
|
|
1201
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1546
1202
|
get hidden() {
|
|
1547
1203
|
return api().view !== viewProps.view;
|
|
1548
1204
|
},
|
|
@@ -1557,22 +1213,22 @@ const DatePickerView = props => {
|
|
|
1557
1213
|
const DatePickerViewControl = props => {
|
|
1558
1214
|
const api = useDatePickerContext();
|
|
1559
1215
|
const viewProps = useDatePickerViewContext();
|
|
1560
|
-
const mergedProps = mergeProps$
|
|
1216
|
+
const mergedProps = mergeProps$1(() => api().getViewControlProps(viewProps), props);
|
|
1561
1217
|
return createComponent(ark.div, mergedProps);
|
|
1562
1218
|
};
|
|
1563
1219
|
|
|
1564
1220
|
const DatePickerViewTrigger = props => {
|
|
1565
1221
|
const api = useDatePickerContext();
|
|
1566
1222
|
const viewProps = useDatePickerViewContext();
|
|
1567
|
-
const mergedProps = mergeProps$
|
|
1223
|
+
const mergedProps = mergeProps$1(() => api().getViewTriggerProps(viewProps), props);
|
|
1568
1224
|
return createComponent(ark.button, mergedProps);
|
|
1569
1225
|
};
|
|
1570
1226
|
|
|
1571
1227
|
const _tmpl$$8 = /*#__PURE__*/template(`<option>`);
|
|
1572
1228
|
const DatePickerYearSelect = props => {
|
|
1573
1229
|
const api = useDatePickerContext();
|
|
1574
|
-
const mergedProps = mergeProps$
|
|
1575
|
-
return createComponent(ark.select, mergeProps
|
|
1230
|
+
const mergedProps = mergeProps$1(() => api().yearSelectProps, props);
|
|
1231
|
+
return createComponent(ark.select, mergeProps(mergedProps, {
|
|
1576
1232
|
get children() {
|
|
1577
1233
|
return getYearsRange({
|
|
1578
1234
|
from: 1_000,
|
|
@@ -1594,8 +1250,8 @@ function getYearsRange(range) {
|
|
|
1594
1250
|
return years;
|
|
1595
1251
|
}
|
|
1596
1252
|
|
|
1597
|
-
const DatePicker =
|
|
1598
|
-
Root:
|
|
1253
|
+
const DatePicker = {
|
|
1254
|
+
Root: DatePickerRoot,
|
|
1599
1255
|
ClearTrigger: DatePickerClearTrigger,
|
|
1600
1256
|
Content: DatePickerContent,
|
|
1601
1257
|
Control: DatePickerControl,
|
|
@@ -1618,58 +1274,20 @@ const DatePicker = Object.assign(DatePicker$1, {
|
|
|
1618
1274
|
ViewControl: DatePickerViewControl,
|
|
1619
1275
|
ViewTrigger: DatePickerViewTrigger,
|
|
1620
1276
|
YearSelect: DatePickerYearSelect
|
|
1621
|
-
}
|
|
1277
|
+
};
|
|
1622
1278
|
|
|
1623
1279
|
const [DialogProvider, useDialogContext] = createContext({
|
|
1624
1280
|
hookName: 'useDialogContext',
|
|
1625
1281
|
providerName: '<DialogProvider />'
|
|
1626
1282
|
});
|
|
1627
1283
|
|
|
1628
|
-
const useDialog = props => {
|
|
1629
|
-
const getRootNode = useEnvironmentContext();
|
|
1630
|
-
const context = mergeProps$2({
|
|
1631
|
-
id: createUniqueId(),
|
|
1632
|
-
getRootNode
|
|
1633
|
-
}, props);
|
|
1634
|
-
const [state, send] = useMachine(dialog.machine(context), {
|
|
1635
|
-
context
|
|
1636
|
-
});
|
|
1637
|
-
return createMemo(() => dialog.connect(state, send, normalizeProps));
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
const Dialog$1 = props => {
|
|
1641
|
-
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
1642
|
-
const [useDialogProps, localProps] = createSplitProps()(dialogProps, ['aria-label', 'closeOnEscapeKeyDown', 'closeOnInteractOutside', 'dir', 'finalFocusEl', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'preventScroll', 'restoreFocus', 'role', 'trapFocus']);
|
|
1643
|
-
const api = useDialog(useDialogProps);
|
|
1644
|
-
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
1645
|
-
present: api().isOpen
|
|
1646
|
-
})));
|
|
1647
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
1648
|
-
return createComponent(DialogProvider, {
|
|
1649
|
-
value: api,
|
|
1650
|
-
get children() {
|
|
1651
|
-
return createComponent(PresencePropsProvider, {
|
|
1652
|
-
value: presenceProps,
|
|
1653
|
-
get children() {
|
|
1654
|
-
return createComponent(PresenceProvider, {
|
|
1655
|
-
value: apiPresence,
|
|
1656
|
-
get children() {
|
|
1657
|
-
return getChildren();
|
|
1658
|
-
}
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
});
|
|
1662
|
-
}
|
|
1663
|
-
});
|
|
1664
|
-
};
|
|
1665
|
-
|
|
1666
1284
|
const DialogBackdrop = props => {
|
|
1667
1285
|
const api = useDialogContext();
|
|
1668
1286
|
const presenceProps = usePresencePropsContext();
|
|
1669
|
-
const presenceApi = usePresence(mergeProps$
|
|
1287
|
+
const presenceApi = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1670
1288
|
present: api().isOpen
|
|
1671
1289
|
})));
|
|
1672
|
-
const mergedProps = mergeProps$
|
|
1290
|
+
const mergedProps = mergeProps$1(() => api().backdropProps, () => presenceApi().presenceProps, props);
|
|
1673
1291
|
return createComponent(Show, {
|
|
1674
1292
|
get when() {
|
|
1675
1293
|
return !presenceApi().isUnmounted;
|
|
@@ -1682,14 +1300,14 @@ const DialogBackdrop = props => {
|
|
|
1682
1300
|
|
|
1683
1301
|
const DialogCloseTrigger = props => {
|
|
1684
1302
|
const dialog = useDialogContext();
|
|
1685
|
-
const mergedProps = mergeProps$
|
|
1303
|
+
const mergedProps = mergeProps$1(() => dialog().closeTriggerProps, props);
|
|
1686
1304
|
return createComponent(ark.button, mergedProps);
|
|
1687
1305
|
};
|
|
1688
1306
|
|
|
1689
1307
|
const DialogContent = props => {
|
|
1690
1308
|
const api = useDialogContext();
|
|
1691
1309
|
const presenceApi = usePresenceContext();
|
|
1692
|
-
const mergedProps = mergeProps$
|
|
1310
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1693
1311
|
return createComponent(Show, {
|
|
1694
1312
|
get when() {
|
|
1695
1313
|
return !presenceApi().isUnmounted;
|
|
@@ -1702,14 +1320,14 @@ const DialogContent = props => {
|
|
|
1702
1320
|
|
|
1703
1321
|
const DialogDescription = props => {
|
|
1704
1322
|
const dialog = useDialogContext();
|
|
1705
|
-
const mergedProps = mergeProps$
|
|
1323
|
+
const mergedProps = mergeProps$1(() => dialog().descriptionProps, props);
|
|
1706
1324
|
return createComponent(ark.p, mergedProps);
|
|
1707
1325
|
};
|
|
1708
1326
|
|
|
1709
1327
|
const DialogPositioner = props => {
|
|
1710
1328
|
const api = useDialogContext();
|
|
1711
1329
|
const presenceApi = usePresenceContext();
|
|
1712
|
-
const mergedProps = mergeProps$
|
|
1330
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
1713
1331
|
return createComponent(Show, {
|
|
1714
1332
|
get when() {
|
|
1715
1333
|
return !presenceApi().isUnmounted;
|
|
@@ -1720,154 +1338,138 @@ const DialogPositioner = props => {
|
|
|
1720
1338
|
});
|
|
1721
1339
|
};
|
|
1722
1340
|
|
|
1723
|
-
const
|
|
1724
|
-
const dialog = useDialogContext();
|
|
1725
|
-
const mergedProps = mergeProps$2(() => dialog().titleProps, props);
|
|
1726
|
-
return createComponent(ark.h2, mergedProps);
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
|
-
const DialogTrigger = props => {
|
|
1730
|
-
const api = useDialogContext();
|
|
1731
|
-
const presenceApi = usePresenceContext();
|
|
1732
|
-
const mergedProps = mergeProps$2(() => api().triggerProps, () => ({
|
|
1733
|
-
'aria-controls': presenceApi().isUnmounted && null
|
|
1734
|
-
}), props);
|
|
1735
|
-
|
|
1736
|
-
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
1737
|
-
return createComponent(ark.button, mergedProps);
|
|
1738
|
-
};
|
|
1739
|
-
|
|
1740
|
-
const Dialog = Object.assign(Dialog$1, {
|
|
1741
|
-
Root: Dialog$1,
|
|
1742
|
-
Backdrop: DialogBackdrop,
|
|
1743
|
-
CloseTrigger: DialogCloseTrigger,
|
|
1744
|
-
Positioner: DialogPositioner,
|
|
1745
|
-
Content: DialogContent,
|
|
1746
|
-
Description: DialogDescription,
|
|
1747
|
-
Title: DialogTitle,
|
|
1748
|
-
Trigger: DialogTrigger
|
|
1749
|
-
});
|
|
1750
|
-
|
|
1751
|
-
const [EditableProvider, useEditableContext] = createContext({
|
|
1752
|
-
hookName: 'useEditableContext',
|
|
1753
|
-
providerName: '<EditableProvider />'
|
|
1754
|
-
});
|
|
1755
|
-
|
|
1756
|
-
const useEditable = props => {
|
|
1341
|
+
const useDialog = props => {
|
|
1757
1342
|
const getRootNode = useEnvironmentContext();
|
|
1758
|
-
const context = mergeProps$
|
|
1343
|
+
const context = mergeProps$1({
|
|
1759
1344
|
id: createUniqueId(),
|
|
1760
1345
|
getRootNode
|
|
1761
1346
|
}, props);
|
|
1762
|
-
const [state, send] = useMachine(
|
|
1347
|
+
const [state, send] = useMachine(dialog.machine(context), {
|
|
1763
1348
|
context
|
|
1764
1349
|
});
|
|
1765
|
-
return createMemo(() =>
|
|
1350
|
+
return createMemo(() => dialog.connect(state, send, normalizeProps));
|
|
1766
1351
|
};
|
|
1767
1352
|
|
|
1768
|
-
const
|
|
1769
|
-
const [
|
|
1770
|
-
const
|
|
1771
|
-
const
|
|
1353
|
+
const DialogRoot = props => {
|
|
1354
|
+
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
1355
|
+
const [useDialogProps, localProps] = createSplitProps()(dialogProps, ['aria-label', 'closeOnEscapeKeyDown', 'closeOnInteractOutside', 'dir', 'finalFocusEl', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'preventScroll', 'restoreFocus', 'role', 'trapFocus']);
|
|
1356
|
+
const api = useDialog(useDialogProps);
|
|
1357
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1358
|
+
present: api().isOpen
|
|
1359
|
+
})));
|
|
1772
1360
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1773
|
-
return createComponent(
|
|
1361
|
+
return createComponent(DialogProvider, {
|
|
1774
1362
|
value: api,
|
|
1775
1363
|
get children() {
|
|
1776
|
-
return createComponent(
|
|
1364
|
+
return createComponent(PresencePropsProvider, {
|
|
1365
|
+
value: presenceProps,
|
|
1777
1366
|
get children() {
|
|
1778
|
-
return
|
|
1367
|
+
return createComponent(PresenceProvider, {
|
|
1368
|
+
value: apiPresence,
|
|
1369
|
+
get children() {
|
|
1370
|
+
return getChildren();
|
|
1371
|
+
}
|
|
1372
|
+
});
|
|
1779
1373
|
}
|
|
1780
|
-
})
|
|
1374
|
+
});
|
|
1781
1375
|
}
|
|
1782
1376
|
});
|
|
1783
1377
|
};
|
|
1784
1378
|
|
|
1379
|
+
const DialogTitle = props => {
|
|
1380
|
+
const dialog = useDialogContext();
|
|
1381
|
+
const mergedProps = mergeProps$1(() => dialog().titleProps, props);
|
|
1382
|
+
return createComponent(ark.h2, mergedProps);
|
|
1383
|
+
};
|
|
1384
|
+
|
|
1385
|
+
const DialogTrigger = props => {
|
|
1386
|
+
const api = useDialogContext();
|
|
1387
|
+
const presenceApi = usePresenceContext();
|
|
1388
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, () => ({
|
|
1389
|
+
'aria-controls': presenceApi().isUnmounted && null
|
|
1390
|
+
}), props);
|
|
1391
|
+
return createComponent(ark.button, mergedProps);
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1394
|
+
const Dialog = {
|
|
1395
|
+
Root: DialogRoot,
|
|
1396
|
+
Backdrop: DialogBackdrop,
|
|
1397
|
+
CloseTrigger: DialogCloseTrigger,
|
|
1398
|
+
Content: DialogContent,
|
|
1399
|
+
Description: DialogDescription,
|
|
1400
|
+
Positioner: DialogPositioner,
|
|
1401
|
+
Title: DialogTitle,
|
|
1402
|
+
Trigger: DialogTrigger
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1405
|
+
const [EditableProvider, useEditableContext] = createContext({
|
|
1406
|
+
hookName: 'useEditableContext',
|
|
1407
|
+
providerName: '<EditableProvider />'
|
|
1408
|
+
});
|
|
1409
|
+
|
|
1785
1410
|
const EditableArea = props => {
|
|
1786
1411
|
const api = useEditableContext();
|
|
1787
|
-
const mergedProps = mergeProps$
|
|
1412
|
+
const mergedProps = mergeProps$1(() => api().areaProps, props);
|
|
1788
1413
|
return createComponent(ark.div, mergedProps);
|
|
1789
1414
|
};
|
|
1790
1415
|
|
|
1791
1416
|
const EditableCancelTrigger = props => {
|
|
1792
1417
|
const api = useEditableContext();
|
|
1793
|
-
const mergedProps = mergeProps$
|
|
1418
|
+
const mergedProps = mergeProps$1(() => api().cancelTriggerProps, props);
|
|
1794
1419
|
return createComponent(ark.button, mergedProps);
|
|
1795
1420
|
};
|
|
1796
1421
|
|
|
1797
1422
|
const EditableControl = props => {
|
|
1798
1423
|
const api = useEditableContext();
|
|
1799
|
-
const mergedProps = mergeProps$
|
|
1424
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
1800
1425
|
return createComponent(ark.div, mergedProps);
|
|
1801
1426
|
};
|
|
1802
1427
|
|
|
1803
1428
|
const EditableEditTrigger = props => {
|
|
1804
1429
|
const api = useEditableContext();
|
|
1805
|
-
const mergedProps = mergeProps$
|
|
1430
|
+
const mergedProps = mergeProps$1(() => api().editTriggerProps, props);
|
|
1806
1431
|
return createComponent(ark.button, mergedProps);
|
|
1807
1432
|
};
|
|
1808
1433
|
|
|
1809
1434
|
const EditableInput = props => {
|
|
1810
1435
|
const api = useEditableContext();
|
|
1811
|
-
const mergedProps = mergeProps$
|
|
1436
|
+
const mergedProps = mergeProps$1(() => api().inputProps, props);
|
|
1812
1437
|
return createComponent(ark.input, mergedProps);
|
|
1813
1438
|
};
|
|
1814
1439
|
|
|
1815
1440
|
const EditableLabel = props => {
|
|
1816
1441
|
const api = useEditableContext();
|
|
1817
|
-
const mergedProps = mergeProps$
|
|
1442
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
1818
1443
|
return createComponent(ark.label, mergedProps);
|
|
1819
1444
|
};
|
|
1820
1445
|
|
|
1821
1446
|
const EditablePreview = props => {
|
|
1822
1447
|
const api = useEditableContext();
|
|
1823
|
-
const mergedProps = mergeProps$
|
|
1448
|
+
const mergedProps = mergeProps$1(() => api().previewProps, props);
|
|
1824
1449
|
return createComponent(ark.span, mergedProps);
|
|
1825
1450
|
};
|
|
1826
1451
|
|
|
1827
|
-
const
|
|
1828
|
-
const api = useEditableContext();
|
|
1829
|
-
const mergedProps = mergeProps$2(() => api().submitTriggerProps, props);
|
|
1830
|
-
return createComponent(ark.button, mergedProps);
|
|
1831
|
-
};
|
|
1832
|
-
|
|
1833
|
-
const Editable = Object.assign(Editable$1, {
|
|
1834
|
-
Root: Editable$1,
|
|
1835
|
-
Area: EditableArea,
|
|
1836
|
-
CancelTrigger: EditableCancelTrigger,
|
|
1837
|
-
Control: EditableControl,
|
|
1838
|
-
EditTrigger: EditableEditTrigger,
|
|
1839
|
-
Input: EditableInput,
|
|
1840
|
-
Label: EditableLabel,
|
|
1841
|
-
Preview: EditablePreview,
|
|
1842
|
-
SubmitTrigger: EditableSubmitTrigger
|
|
1843
|
-
});
|
|
1844
|
-
|
|
1845
|
-
const [FileUploadProvider, useFileUploadContext] = createContext({
|
|
1846
|
-
hookName: 'useFileUploadContext',
|
|
1847
|
-
providerName: '<FileUploadProvider />'
|
|
1848
|
-
});
|
|
1849
|
-
|
|
1850
|
-
const useFileUpload = props => {
|
|
1452
|
+
const useEditable = props => {
|
|
1851
1453
|
const getRootNode = useEnvironmentContext();
|
|
1852
|
-
const context = mergeProps$
|
|
1454
|
+
const context = mergeProps$1({
|
|
1853
1455
|
id: createUniqueId(),
|
|
1854
1456
|
getRootNode
|
|
1855
1457
|
}, props);
|
|
1856
|
-
const [state, send] = useMachine(
|
|
1458
|
+
const [state, send] = useMachine(editable.machine(context), {
|
|
1857
1459
|
context
|
|
1858
1460
|
});
|
|
1859
|
-
return createMemo(() =>
|
|
1461
|
+
return createMemo(() => editable.connect(state, send, normalizeProps));
|
|
1860
1462
|
};
|
|
1861
1463
|
|
|
1862
|
-
const
|
|
1863
|
-
const [
|
|
1864
|
-
const api =
|
|
1865
|
-
const mergedProps = mergeProps$
|
|
1464
|
+
const EditableRoot = props => {
|
|
1465
|
+
const [useEditableProps, localProps] = createSplitProps()(props, ['activationMode', 'autoResize', 'dir', 'disabled', 'finalFocusEl', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'maxLength', 'name', 'onEdit', 'onFocusOutside', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueCommit', 'onValueRevert', 'placeholder', 'readOnly', 'selectOnFocus', 'startWithEditView', 'submitMode', 'translations', 'value']);
|
|
1466
|
+
const api = useEditable(useEditableProps);
|
|
1467
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1866
1468
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1867
|
-
return createComponent(
|
|
1469
|
+
return createComponent(EditableProvider, {
|
|
1868
1470
|
value: api,
|
|
1869
1471
|
get children() {
|
|
1870
|
-
return createComponent(ark.div, mergeProps
|
|
1472
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1871
1473
|
get children() {
|
|
1872
1474
|
return getChildren();
|
|
1873
1475
|
}
|
|
@@ -1876,13 +1478,36 @@ const FileUpload$1 = props => {
|
|
|
1876
1478
|
});
|
|
1877
1479
|
};
|
|
1878
1480
|
|
|
1481
|
+
const EditableSubmitTrigger = props => {
|
|
1482
|
+
const api = useEditableContext();
|
|
1483
|
+
const mergedProps = mergeProps$1(() => api().submitTriggerProps, props);
|
|
1484
|
+
return createComponent(ark.button, mergedProps);
|
|
1485
|
+
};
|
|
1486
|
+
|
|
1487
|
+
const Editable = {
|
|
1488
|
+
Root: EditableRoot,
|
|
1489
|
+
Area: EditableArea,
|
|
1490
|
+
CancelTrigger: EditableCancelTrigger,
|
|
1491
|
+
Control: EditableControl,
|
|
1492
|
+
EditTrigger: EditableEditTrigger,
|
|
1493
|
+
Input: EditableInput,
|
|
1494
|
+
Label: EditableLabel,
|
|
1495
|
+
Preview: EditablePreview,
|
|
1496
|
+
SubmitTrigger: EditableSubmitTrigger
|
|
1497
|
+
};
|
|
1498
|
+
|
|
1499
|
+
const [FileUploadProvider, useFileUploadContext] = createContext({
|
|
1500
|
+
hookName: 'useFileUploadContext',
|
|
1501
|
+
providerName: '<FileUploadProvider />'
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1879
1504
|
const _tmpl$$7 = /*#__PURE__*/template(`<input>`);
|
|
1880
1505
|
const FileUploadDropzone = props => {
|
|
1881
1506
|
const api = useFileUploadContext();
|
|
1882
|
-
const mergedProps = mergeProps$
|
|
1507
|
+
const mergedProps = mergeProps$1(() => api().dropzoneProps, props);
|
|
1883
1508
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
1884
1509
|
const _el$ = _tmpl$$7();
|
|
1885
|
-
spread
|
|
1510
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
1886
1511
|
return _el$;
|
|
1887
1512
|
})()];
|
|
1888
1513
|
};
|
|
@@ -1895,12 +1520,12 @@ const [FileUploadItemProvider, useFileUploadItemContext] = createContext({
|
|
|
1895
1520
|
const FileUploadItem = props => {
|
|
1896
1521
|
const [itemProps, localProps] = createSplitProps()(props, ['file']);
|
|
1897
1522
|
const api = useFileUploadContext();
|
|
1898
|
-
const mergedProps = mergeProps$
|
|
1523
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
1899
1524
|
const getChildren = () => runIfFn(localProps.children);
|
|
1900
1525
|
return createComponent(FileUploadItemProvider, {
|
|
1901
1526
|
value: itemProps,
|
|
1902
1527
|
get children() {
|
|
1903
|
-
return createComponent(ark.li, mergeProps
|
|
1528
|
+
return createComponent(ark.li, mergeProps(mergedProps, {
|
|
1904
1529
|
get children() {
|
|
1905
1530
|
return getChildren();
|
|
1906
1531
|
}
|
|
@@ -1912,15 +1537,15 @@ const FileUploadItem = props => {
|
|
|
1912
1537
|
const FileUploadItemDeleteTrigger = props => {
|
|
1913
1538
|
const api = useFileUploadContext();
|
|
1914
1539
|
const item = useFileUploadItemContext();
|
|
1915
|
-
const mergedProps = mergeProps$
|
|
1540
|
+
const mergedProps = mergeProps$1(() => api().getItemDeleteTriggerProps(item), props);
|
|
1916
1541
|
return createComponent(ark.button, mergedProps);
|
|
1917
1542
|
};
|
|
1918
1543
|
|
|
1919
1544
|
const FileUploadItemGroup = props => {
|
|
1920
1545
|
const api = useFileUploadContext();
|
|
1921
|
-
const mergedProps = mergeProps$
|
|
1546
|
+
const mergedProps = mergeProps$1(() => api().itemGroupProps, props);
|
|
1922
1547
|
const getChildren = () => runIfFn(props.children, () => api().files);
|
|
1923
|
-
return createComponent(ark.ul, mergeProps
|
|
1548
|
+
return createComponent(ark.ul, mergeProps(mergedProps, {
|
|
1924
1549
|
get children() {
|
|
1925
1550
|
return getChildren();
|
|
1926
1551
|
}
|
|
@@ -1930,9 +1555,9 @@ const FileUploadItemGroup = props => {
|
|
|
1930
1555
|
const FileUploadItemName = props => {
|
|
1931
1556
|
const api = useFileUploadContext();
|
|
1932
1557
|
const item = useFileUploadItemContext();
|
|
1933
|
-
const mergedProps = mergeProps$
|
|
1558
|
+
const mergedProps = mergeProps$1(() => api().getItemNameProps(item), props);
|
|
1934
1559
|
const getChildren = children(() => props.children);
|
|
1935
|
-
return createComponent(ark.div, mergeProps
|
|
1560
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1936
1561
|
get children() {
|
|
1937
1562
|
return getChildren() || item.file.name;
|
|
1938
1563
|
}
|
|
@@ -1942,7 +1567,7 @@ const FileUploadItemName = props => {
|
|
|
1942
1567
|
const FileUploadItemPreview = props => {
|
|
1943
1568
|
const api = useFileUploadContext();
|
|
1944
1569
|
const item = useFileUploadItemContext();
|
|
1945
|
-
const mergedProps = mergeProps$
|
|
1570
|
+
const mergedProps = mergeProps$1(() => api().getItemPreviewProps(item), props);
|
|
1946
1571
|
if (!item.file.type.match(props.type ?? '.*')) return null;
|
|
1947
1572
|
return createComponent(ark.div, mergedProps);
|
|
1948
1573
|
};
|
|
@@ -1952,7 +1577,7 @@ const FileUploadItemPreviewImage = props => {
|
|
|
1952
1577
|
const item = useFileUploadItemContext();
|
|
1953
1578
|
const [url, setUrl] = createSignal('');
|
|
1954
1579
|
api().createFileUrl(item.file, url => setUrl(url));
|
|
1955
|
-
const mergedProps = mergeProps$
|
|
1580
|
+
const mergedProps = mergeProps$1(api().getItemPreviewImageProps({
|
|
1956
1581
|
...item,
|
|
1957
1582
|
url: url()
|
|
1958
1583
|
}), props);
|
|
@@ -1962,9 +1587,9 @@ const FileUploadItemPreviewImage = props => {
|
|
|
1962
1587
|
const FileUploadItemSizeText = props => {
|
|
1963
1588
|
const api = useFileUploadContext();
|
|
1964
1589
|
const item = useFileUploadItemContext();
|
|
1965
|
-
const mergedProps = mergeProps$
|
|
1590
|
+
const mergedProps = mergeProps$1(() => api().getItemSizeTextProps(item), props);
|
|
1966
1591
|
const getChildren = children(() => props.children);
|
|
1967
|
-
return createComponent(ark.div, mergeProps
|
|
1592
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1968
1593
|
get children() {
|
|
1969
1594
|
return getChildren() || api().getFileSize(item.file);
|
|
1970
1595
|
}
|
|
@@ -1973,18 +1598,47 @@ const FileUploadItemSizeText = props => {
|
|
|
1973
1598
|
|
|
1974
1599
|
const FileUploadLabel = props => {
|
|
1975
1600
|
const api = useFileUploadContext();
|
|
1976
|
-
const mergedProps = mergeProps$
|
|
1601
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
1977
1602
|
return createComponent(ark.label, mergedProps);
|
|
1978
1603
|
};
|
|
1979
1604
|
|
|
1605
|
+
const useFileUpload = props => {
|
|
1606
|
+
const getRootNode = useEnvironmentContext();
|
|
1607
|
+
const context = mergeProps$1({
|
|
1608
|
+
id: createUniqueId(),
|
|
1609
|
+
getRootNode
|
|
1610
|
+
}, props);
|
|
1611
|
+
const [state, send] = useMachine(fileUpload.machine(context), {
|
|
1612
|
+
context
|
|
1613
|
+
});
|
|
1614
|
+
return createMemo(() => fileUpload.connect(state, send, normalizeProps));
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
const FileUploadRoot = props => {
|
|
1618
|
+
const [fileUploadProps, localProps] = createSplitProps()(props, ['accept', 'allowDrop', 'dir', 'disabled', 'files', 'getRootNode', 'id', 'ids', 'locale', 'maxFiles', 'maxFileSize', 'minFileSize', 'name', 'onFileAccept', 'onFileReject', 'onFilesChange', 'translations', 'validate']);
|
|
1619
|
+
const api = useFileUpload(fileUploadProps);
|
|
1620
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1621
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1622
|
+
return createComponent(FileUploadProvider, {
|
|
1623
|
+
value: api,
|
|
1624
|
+
get children() {
|
|
1625
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1626
|
+
get children() {
|
|
1627
|
+
return getChildren();
|
|
1628
|
+
}
|
|
1629
|
+
}));
|
|
1630
|
+
}
|
|
1631
|
+
});
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1980
1634
|
const FileUploadTrigger = props => {
|
|
1981
1635
|
const api = useFileUploadContext();
|
|
1982
|
-
const mergedProps = mergeProps$
|
|
1636
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, props);
|
|
1983
1637
|
return createComponent(ark.button, mergedProps);
|
|
1984
1638
|
};
|
|
1985
1639
|
|
|
1986
|
-
const FileUpload =
|
|
1987
|
-
Root:
|
|
1640
|
+
const FileUpload = {
|
|
1641
|
+
Root: FileUploadRoot,
|
|
1988
1642
|
Dropzone: FileUploadDropzone,
|
|
1989
1643
|
Item: FileUploadItem,
|
|
1990
1644
|
ItemDeleteTrigger: FileUploadItemDeleteTrigger,
|
|
@@ -1995,62 +1649,29 @@ const FileUpload = Object.assign(FileUpload$1, {
|
|
|
1995
1649
|
ItemSizeText: FileUploadItemSizeText,
|
|
1996
1650
|
Label: FileUploadLabel,
|
|
1997
1651
|
Trigger: FileUploadTrigger
|
|
1998
|
-
}
|
|
1652
|
+
};
|
|
1999
1653
|
|
|
2000
1654
|
const [HoverCardProvider, useHoverCardContext] = createContext({
|
|
2001
1655
|
hookName: 'useHoverCardContext',
|
|
2002
1656
|
providerName: '<HoverCardProvider />'
|
|
2003
1657
|
});
|
|
2004
1658
|
|
|
2005
|
-
const useHoverCard = props => {
|
|
2006
|
-
const getRootNode = useEnvironmentContext();
|
|
2007
|
-
const context = mergeProps$2({
|
|
2008
|
-
id: createUniqueId(),
|
|
2009
|
-
getRootNode
|
|
2010
|
-
}, props);
|
|
2011
|
-
const [state, send] = useMachine(hoverCard.machine(context), {
|
|
2012
|
-
context
|
|
2013
|
-
});
|
|
2014
|
-
return createMemo(() => hoverCard.connect(state, send, normalizeProps));
|
|
2015
|
-
};
|
|
2016
|
-
|
|
2017
|
-
const HoverCard$1 = props => {
|
|
2018
|
-
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
2019
|
-
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ['closeDelay', 'dir', 'getRootNode', 'id', 'ids', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
2020
|
-
const api = useHoverCard(useHoverCardProps);
|
|
2021
|
-
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
2022
|
-
present: api().isOpen
|
|
2023
|
-
})));
|
|
2024
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
2025
|
-
return createComponent(HoverCardProvider, {
|
|
2026
|
-
value: api,
|
|
2027
|
-
get children() {
|
|
2028
|
-
return createComponent(PresenceProvider, {
|
|
2029
|
-
value: apiPresence,
|
|
2030
|
-
get children() {
|
|
2031
|
-
return getChildren();
|
|
2032
|
-
}
|
|
2033
|
-
});
|
|
2034
|
-
}
|
|
2035
|
-
});
|
|
2036
|
-
};
|
|
2037
|
-
|
|
2038
1659
|
const HoverCardArrow = props => {
|
|
2039
1660
|
const hoverCard = useHoverCardContext();
|
|
2040
|
-
const mergedProps = mergeProps$
|
|
1661
|
+
const mergedProps = mergeProps$1(() => hoverCard().arrowProps, props);
|
|
2041
1662
|
return createComponent(ark.div, mergedProps);
|
|
2042
1663
|
};
|
|
2043
1664
|
|
|
2044
1665
|
const HoverCardArrowTip = props => {
|
|
2045
1666
|
const hoverCard = useHoverCardContext();
|
|
2046
|
-
const mergedProps = mergeProps$
|
|
1667
|
+
const mergedProps = mergeProps$1(() => hoverCard().arrowTipProps, props);
|
|
2047
1668
|
return createComponent(ark.div, mergedProps);
|
|
2048
1669
|
};
|
|
2049
1670
|
|
|
2050
1671
|
const HoverCardContent = props => {
|
|
2051
1672
|
const api = useHoverCardContext();
|
|
2052
1673
|
const presenceApi = usePresenceContext();
|
|
2053
|
-
const mergedProps = mergeProps$
|
|
1674
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2054
1675
|
return createComponent(Show, {
|
|
2055
1676
|
get when() {
|
|
2056
1677
|
return !presenceApi().isUnmounted;
|
|
@@ -2064,7 +1685,7 @@ const HoverCardContent = props => {
|
|
|
2064
1685
|
const HoverCardPositioner = props => {
|
|
2065
1686
|
const api = useHoverCardContext();
|
|
2066
1687
|
const presenceApi = usePresenceContext();
|
|
2067
|
-
const mergedProps = mergeProps$
|
|
1688
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
2068
1689
|
return createComponent(Show, {
|
|
2069
1690
|
get when() {
|
|
2070
1691
|
return !presenceApi().isUnmounted;
|
|
@@ -2075,20 +1696,53 @@ const HoverCardPositioner = props => {
|
|
|
2075
1696
|
});
|
|
2076
1697
|
};
|
|
2077
1698
|
|
|
1699
|
+
const useHoverCard = props => {
|
|
1700
|
+
const getRootNode = useEnvironmentContext();
|
|
1701
|
+
const context = mergeProps$1({
|
|
1702
|
+
id: createUniqueId(),
|
|
1703
|
+
getRootNode
|
|
1704
|
+
}, props);
|
|
1705
|
+
const [state, send] = useMachine(hoverCard.machine(context), {
|
|
1706
|
+
context
|
|
1707
|
+
});
|
|
1708
|
+
return createMemo(() => hoverCard.connect(state, send, normalizeProps));
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1711
|
+
const HoverCardRoot = props => {
|
|
1712
|
+
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
1713
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ['closeDelay', 'dir', 'getRootNode', 'id', 'ids', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
1714
|
+
const api = useHoverCard(useHoverCardProps);
|
|
1715
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1716
|
+
present: api().isOpen
|
|
1717
|
+
})));
|
|
1718
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1719
|
+
return createComponent(HoverCardProvider, {
|
|
1720
|
+
value: api,
|
|
1721
|
+
get children() {
|
|
1722
|
+
return createComponent(PresenceProvider, {
|
|
1723
|
+
value: apiPresence,
|
|
1724
|
+
get children() {
|
|
1725
|
+
return getChildren();
|
|
1726
|
+
}
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
});
|
|
1730
|
+
};
|
|
1731
|
+
|
|
2078
1732
|
const HoverCardTrigger = props => {
|
|
2079
1733
|
const hoverCard = useHoverCardContext();
|
|
2080
|
-
const mergedProps = mergeProps$
|
|
1734
|
+
const mergedProps = mergeProps$1(() => hoverCard().triggerProps, props);
|
|
2081
1735
|
return createComponent(ark.button, mergedProps);
|
|
2082
1736
|
};
|
|
2083
1737
|
|
|
2084
|
-
const HoverCard =
|
|
2085
|
-
Root:
|
|
1738
|
+
const HoverCard = {
|
|
1739
|
+
Root: HoverCardRoot,
|
|
2086
1740
|
Arrow: HoverCardArrow,
|
|
2087
1741
|
ArrowTip: HoverCardArrowTip,
|
|
2088
1742
|
Content: HoverCardContent,
|
|
2089
1743
|
Positioner: HoverCardPositioner,
|
|
2090
1744
|
Trigger: HoverCardTrigger
|
|
2091
|
-
}
|
|
1745
|
+
};
|
|
2092
1746
|
|
|
2093
1747
|
const [MenuProvider, useMenuContext] = createContext({
|
|
2094
1748
|
hookName: 'useMenuContext',
|
|
@@ -2106,79 +1760,22 @@ const [MenuTriggerItemProvider, useMenuTriggerItemContext] = createContext({
|
|
|
2106
1760
|
strict: false
|
|
2107
1761
|
});
|
|
2108
1762
|
|
|
2109
|
-
const useMenu = props => {
|
|
2110
|
-
const getRootNode = useEnvironmentContext();
|
|
2111
|
-
const context = mergeProps$2({
|
|
2112
|
-
id: createUniqueId(),
|
|
2113
|
-
getRootNode
|
|
2114
|
-
}, props);
|
|
2115
|
-
const [state, send, machine] = useMachine(menu.machine(context), {
|
|
2116
|
-
context
|
|
2117
|
-
});
|
|
2118
|
-
return createMemo(() => ({
|
|
2119
|
-
api: () => menu.connect(state, send, normalizeProps),
|
|
2120
|
-
machine: machine
|
|
2121
|
-
}));
|
|
2122
|
-
};
|
|
2123
|
-
|
|
2124
|
-
const Menu$1 = props => {
|
|
2125
|
-
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
2126
|
-
const [useMenuProps, localProps] = createSplitProps()(menuProps, ['anchorPoint', 'aria-label', 'closeOnSelect', 'dir', 'getRootNode', 'highlightedId', 'id', 'ids', 'loop', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onSelect', 'onValueChange', 'open', 'positioning', 'value']);
|
|
2127
|
-
const parentMenu = useMenuContext();
|
|
2128
|
-
const parentMachine = useMenuMachineContext();
|
|
2129
|
-
const menu = useMenu(useMenuProps);
|
|
2130
|
-
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
2131
|
-
present: menu().api().isOpen
|
|
2132
|
-
})));
|
|
2133
|
-
createEffect(() => {
|
|
2134
|
-
if (!parentMachine) return;
|
|
2135
|
-
parentMenu?.().setChild(menu().machine);
|
|
2136
|
-
menu().api().setParent(parentMachine());
|
|
2137
|
-
});
|
|
2138
|
-
const triggerItemContext = createMemo(() => parentMenu?.().getTriggerItemProps(menu().api()));
|
|
2139
|
-
const machineContext = () => menu().machine;
|
|
2140
|
-
const getChildren = () => runIfFn(localProps.children, menu().api);
|
|
2141
|
-
return createComponent(MenuTriggerItemProvider, {
|
|
2142
|
-
value: triggerItemContext,
|
|
2143
|
-
get children() {
|
|
2144
|
-
return createComponent(MenuMachineProvider, {
|
|
2145
|
-
value: machineContext,
|
|
2146
|
-
get children() {
|
|
2147
|
-
return createComponent(MenuProvider, {
|
|
2148
|
-
get value() {
|
|
2149
|
-
return menu().api;
|
|
2150
|
-
},
|
|
2151
|
-
get children() {
|
|
2152
|
-
return createComponent(PresenceProvider, {
|
|
2153
|
-
value: apiPresence,
|
|
2154
|
-
get children() {
|
|
2155
|
-
return getChildren();
|
|
2156
|
-
}
|
|
2157
|
-
});
|
|
2158
|
-
}
|
|
2159
|
-
});
|
|
2160
|
-
}
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2163
|
-
});
|
|
2164
|
-
};
|
|
2165
|
-
|
|
2166
1763
|
const MenuArrow = props => {
|
|
2167
1764
|
const menu = useMenuContext();
|
|
2168
|
-
const mergedProps = mergeProps$
|
|
1765
|
+
const mergedProps = mergeProps$1(() => menu?.().arrowProps, props);
|
|
2169
1766
|
return createComponent(ark.div, mergedProps);
|
|
2170
1767
|
};
|
|
2171
1768
|
|
|
2172
1769
|
const MenuArrowTip = props => {
|
|
2173
1770
|
const menu = useMenuContext();
|
|
2174
|
-
const mergedProps = mergeProps$
|
|
1771
|
+
const mergedProps = mergeProps$1(() => menu?.().arrowTipProps, props);
|
|
2175
1772
|
return createComponent(ark.div, mergedProps);
|
|
2176
1773
|
};
|
|
2177
1774
|
|
|
2178
1775
|
const MenuContent = props => {
|
|
2179
1776
|
const api = useMenuContext();
|
|
2180
1777
|
const presenceApi = usePresenceContext();
|
|
2181
|
-
const mergedProps = mergeProps$
|
|
1778
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2182
1779
|
return createComponent(Show, {
|
|
2183
1780
|
get when() {
|
|
2184
1781
|
return !presenceApi().isUnmounted;
|
|
@@ -2191,28 +1788,28 @@ const MenuContent = props => {
|
|
|
2191
1788
|
|
|
2192
1789
|
const MenuContextTrigger = props => {
|
|
2193
1790
|
const menu = useMenuContext();
|
|
2194
|
-
const mergedProps = mergeProps$
|
|
1791
|
+
const mergedProps = mergeProps$1(() => menu?.().contextTriggerProps, props);
|
|
2195
1792
|
return createComponent(ark.button, mergedProps);
|
|
2196
1793
|
};
|
|
2197
1794
|
|
|
2198
1795
|
const MenuItem = props => {
|
|
2199
1796
|
const menu = useMenuContext();
|
|
2200
1797
|
const [itemParams, restProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect']);
|
|
2201
|
-
const mergedProps = mergeProps$
|
|
1798
|
+
const mergedProps = mergeProps$1(() => menu?.().getItemProps(itemParams), restProps);
|
|
2202
1799
|
return createComponent(ark.div, mergedProps);
|
|
2203
1800
|
};
|
|
2204
1801
|
|
|
2205
1802
|
const MenuItemGroup = props => {
|
|
2206
1803
|
const menu = useMenuContext();
|
|
2207
1804
|
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
2208
|
-
const mergedProps = mergeProps$
|
|
1805
|
+
const mergedProps = mergeProps$1(() => menu?.().getItemGroupProps(itemGroupProps), localProps);
|
|
2209
1806
|
return createComponent(ark.div, mergedProps);
|
|
2210
1807
|
};
|
|
2211
1808
|
|
|
2212
1809
|
const MenuItemGroupLabel = props => {
|
|
2213
1810
|
const menu = useMenuContext();
|
|
2214
1811
|
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
2215
|
-
const mergedProps = mergeProps$
|
|
1812
|
+
const mergedProps = mergeProps$1(() => menu?.().getItemGroupLabelProps({
|
|
2216
1813
|
htmlFor: labelProps.for
|
|
2217
1814
|
}), localProps);
|
|
2218
1815
|
return createComponent(ark.div, mergedProps);
|
|
@@ -2221,10 +1818,10 @@ const MenuItemGroupLabel = props => {
|
|
|
2221
1818
|
const MenuOptionItem = props => {
|
|
2222
1819
|
const menu = useMenuContext();
|
|
2223
1820
|
const [optionProps, localProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect', 'name', 'type', 'value', 'onCheckedChange']);
|
|
2224
|
-
const mergedProps = mergeProps$
|
|
1821
|
+
const mergedProps = mergeProps$1(() => menu().getOptionItemProps(optionProps), localProps);
|
|
2225
1822
|
const itemState = createMemo(() => menu().getOptionItemState(optionProps));
|
|
2226
1823
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2227
|
-
return createComponent(ark.div, mergeProps
|
|
1824
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
2228
1825
|
get children() {
|
|
2229
1826
|
return getChildren();
|
|
2230
1827
|
}
|
|
@@ -2234,7 +1831,7 @@ const MenuOptionItem = props => {
|
|
|
2234
1831
|
const MenuPositioner = props => {
|
|
2235
1832
|
const api = useMenuContext();
|
|
2236
1833
|
const presenceApi = usePresenceContext();
|
|
2237
|
-
const mergedProps = mergeProps$
|
|
1834
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
2238
1835
|
return createComponent(Show, {
|
|
2239
1836
|
get when() {
|
|
2240
1837
|
return !presenceApi().isUnmounted;
|
|
@@ -2245,31 +1842,86 @@ const MenuPositioner = props => {
|
|
|
2245
1842
|
});
|
|
2246
1843
|
};
|
|
2247
1844
|
|
|
1845
|
+
const useMenu = props => {
|
|
1846
|
+
const getRootNode = useEnvironmentContext();
|
|
1847
|
+
const context = mergeProps$1({
|
|
1848
|
+
id: createUniqueId(),
|
|
1849
|
+
getRootNode
|
|
1850
|
+
}, props);
|
|
1851
|
+
const [state, send, machine] = useMachine(menu.machine(context), {
|
|
1852
|
+
context
|
|
1853
|
+
});
|
|
1854
|
+
return createMemo(() => ({
|
|
1855
|
+
api: () => menu.connect(state, send, normalizeProps),
|
|
1856
|
+
machine: machine
|
|
1857
|
+
}));
|
|
1858
|
+
};
|
|
1859
|
+
|
|
1860
|
+
const MenuRoot = props => {
|
|
1861
|
+
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
1862
|
+
const [useMenuProps, localProps] = createSplitProps()(menuProps, ['anchorPoint', 'aria-label', 'closeOnSelect', 'dir', 'getRootNode', 'highlightedId', 'id', 'ids', 'loop', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onSelect', 'onValueChange', 'open', 'positioning', 'value']);
|
|
1863
|
+
const parentMenu = useMenuContext();
|
|
1864
|
+
const parentMachine = useMenuMachineContext();
|
|
1865
|
+
const menu = useMenu(useMenuProps);
|
|
1866
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
1867
|
+
present: menu().api().isOpen
|
|
1868
|
+
})));
|
|
1869
|
+
createEffect(() => {
|
|
1870
|
+
if (!parentMachine) return;
|
|
1871
|
+
parentMenu?.().setChild(menu().machine);
|
|
1872
|
+
menu().api().setParent(parentMachine());
|
|
1873
|
+
});
|
|
1874
|
+
const triggerItemContext = createMemo(() => parentMenu?.().getTriggerItemProps(menu().api()));
|
|
1875
|
+
const machineContext = () => menu().machine;
|
|
1876
|
+
const getChildren = () => runIfFn(localProps.children, menu().api);
|
|
1877
|
+
return createComponent(MenuTriggerItemProvider, {
|
|
1878
|
+
value: triggerItemContext,
|
|
1879
|
+
get children() {
|
|
1880
|
+
return createComponent(MenuMachineProvider, {
|
|
1881
|
+
value: machineContext,
|
|
1882
|
+
get children() {
|
|
1883
|
+
return createComponent(MenuProvider, {
|
|
1884
|
+
get value() {
|
|
1885
|
+
return menu().api;
|
|
1886
|
+
},
|
|
1887
|
+
get children() {
|
|
1888
|
+
return createComponent(PresenceProvider, {
|
|
1889
|
+
value: apiPresence,
|
|
1890
|
+
get children() {
|
|
1891
|
+
return getChildren();
|
|
1892
|
+
}
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
});
|
|
1896
|
+
}
|
|
1897
|
+
});
|
|
1898
|
+
}
|
|
1899
|
+
});
|
|
1900
|
+
};
|
|
1901
|
+
|
|
2248
1902
|
const MenuSeparator = props => {
|
|
2249
1903
|
const menu = useMenuContext();
|
|
2250
|
-
const mergedProps = mergeProps$
|
|
1904
|
+
const mergedProps = mergeProps$1(() => menu?.().separatorProps, props);
|
|
2251
1905
|
return createComponent(ark.hr, mergedProps);
|
|
2252
1906
|
};
|
|
2253
1907
|
|
|
2254
1908
|
const MenuTrigger = props => {
|
|
2255
1909
|
const api = useMenuContext();
|
|
2256
1910
|
const presenceApi = usePresenceContext();
|
|
2257
|
-
const mergedProps = mergeProps$
|
|
1911
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, () => ({
|
|
2258
1912
|
'aria-controls': presenceApi().isUnmounted && null
|
|
2259
1913
|
}), props);
|
|
2260
|
-
|
|
2261
|
-
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
2262
1914
|
return createComponent(ark.button, mergedProps);
|
|
2263
1915
|
};
|
|
2264
1916
|
|
|
2265
1917
|
const MenuTriggerItem = props => {
|
|
2266
1918
|
const getTriggerItemProps = useMenuTriggerItemContext();
|
|
2267
|
-
const mergedProps = mergeProps$
|
|
1919
|
+
const mergedProps = mergeProps$1(() => getTriggerItemProps?.(), props);
|
|
2268
1920
|
return createComponent(ark.div, mergedProps);
|
|
2269
1921
|
};
|
|
2270
1922
|
|
|
2271
|
-
const Menu =
|
|
2272
|
-
Root:
|
|
1923
|
+
const Menu = {
|
|
1924
|
+
Root: MenuRoot,
|
|
2273
1925
|
Arrow: MenuArrow,
|
|
2274
1926
|
ArrowTip: MenuArrowTip,
|
|
2275
1927
|
Content: MenuContent,
|
|
@@ -2282,96 +1934,122 @@ const Menu = Object.assign(Menu$1, {
|
|
|
2282
1934
|
Separator: MenuSeparator,
|
|
2283
1935
|
Trigger: MenuTrigger,
|
|
2284
1936
|
TriggerItem: MenuTriggerItem
|
|
2285
|
-
}
|
|
1937
|
+
};
|
|
2286
1938
|
|
|
2287
1939
|
const [NumberInputProvider, useNumberInputContext] = createContext({
|
|
2288
1940
|
hookName: 'useNumberInputContext',
|
|
2289
1941
|
providerName: '<NumberInputProvider />'
|
|
2290
1942
|
});
|
|
2291
1943
|
|
|
2292
|
-
const useNumberInput = props => {
|
|
2293
|
-
const getRootNode = useEnvironmentContext();
|
|
2294
|
-
const context = mergeProps$2({
|
|
2295
|
-
id: createUniqueId(),
|
|
2296
|
-
getRootNode
|
|
2297
|
-
}, props);
|
|
2298
|
-
const [state, send] = useMachine(numberInput.machine(context), {
|
|
2299
|
-
context
|
|
2300
|
-
});
|
|
2301
|
-
return createMemo(() => numberInput.connect(state, send, normalizeProps));
|
|
2302
|
-
};
|
|
2303
|
-
|
|
2304
|
-
const NumberInput$1 = props => {
|
|
2305
|
-
const [useNumberInputProps, localProps] = createSplitProps()(props, ['allowMouseWheel', 'allowOverflow', 'clampValueOnBlur', 'dir', 'disabled', 'focusInputOnChange', 'form', 'formatOptions', 'getRootNode', 'id', 'ids', 'inputMode', 'invalid', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onValueChange', 'onValueInvalid', 'pattern', 'readOnly', 'spinOnPress', 'step', 'translations', 'value']);
|
|
2306
|
-
const api = useNumberInput(useNumberInputProps);
|
|
2307
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2308
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
2309
|
-
return createComponent(NumberInputProvider, {
|
|
2310
|
-
value: api,
|
|
2311
|
-
get children() {
|
|
2312
|
-
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
2313
|
-
get children() {
|
|
2314
|
-
return getChildren();
|
|
2315
|
-
}
|
|
2316
|
-
}));
|
|
2317
|
-
}
|
|
2318
|
-
});
|
|
2319
|
-
};
|
|
2320
|
-
|
|
2321
1944
|
const NumberInputControl = props => {
|
|
2322
1945
|
const api = useNumberInputContext();
|
|
2323
|
-
const mergedProps = mergeProps$
|
|
1946
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
2324
1947
|
return createComponent(ark.div, mergedProps);
|
|
2325
1948
|
};
|
|
2326
1949
|
|
|
2327
1950
|
const NumberInputDecrementTrigger = props => {
|
|
2328
1951
|
const api = useNumberInputContext();
|
|
2329
|
-
const mergedProps = mergeProps$
|
|
1952
|
+
const mergedProps = mergeProps$1(() => api().decrementTriggerProps, props);
|
|
2330
1953
|
return createComponent(ark.button, mergedProps);
|
|
2331
1954
|
};
|
|
2332
1955
|
|
|
2333
1956
|
const NumberInputIncrementTrigger = props => {
|
|
2334
1957
|
const api = useNumberInputContext();
|
|
2335
|
-
const mergedProps = mergeProps$
|
|
1958
|
+
const mergedProps = mergeProps$1(() => api().incrementTriggerProps, props);
|
|
2336
1959
|
return createComponent(ark.button, mergedProps);
|
|
2337
1960
|
};
|
|
2338
1961
|
|
|
2339
1962
|
const NumberInputInput = props => {
|
|
2340
1963
|
const api = useNumberInputContext();
|
|
2341
|
-
const mergedProps = mergeProps$
|
|
1964
|
+
const mergedProps = mergeProps$1(() => api().inputProps, props);
|
|
2342
1965
|
return createComponent(ark.input, mergedProps);
|
|
2343
1966
|
};
|
|
2344
1967
|
|
|
2345
1968
|
const NumberInputLabel = props => {
|
|
2346
1969
|
const api = useNumberInputContext();
|
|
2347
|
-
const mergedProps = mergeProps$
|
|
1970
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
2348
1971
|
return createComponent(ark.label, mergedProps);
|
|
2349
1972
|
};
|
|
2350
1973
|
|
|
1974
|
+
const useNumberInput = props => {
|
|
1975
|
+
const getRootNode = useEnvironmentContext();
|
|
1976
|
+
const context = mergeProps$1({
|
|
1977
|
+
id: createUniqueId(),
|
|
1978
|
+
getRootNode
|
|
1979
|
+
}, props);
|
|
1980
|
+
const [state, send] = useMachine(numberInput.machine(context), {
|
|
1981
|
+
context
|
|
1982
|
+
});
|
|
1983
|
+
return createMemo(() => numberInput.connect(state, send, normalizeProps));
|
|
1984
|
+
};
|
|
1985
|
+
|
|
1986
|
+
const NumberInputRoot = props => {
|
|
1987
|
+
const [useNumberInputProps, localProps] = createSplitProps()(props, ['allowMouseWheel', 'allowOverflow', 'clampValueOnBlur', 'dir', 'disabled', 'focusInputOnChange', 'form', 'formatOptions', 'getRootNode', 'id', 'ids', 'inputMode', 'invalid', 'locale', 'max', 'min', 'name', 'onFocusChange', 'onValueChange', 'onValueInvalid', 'pattern', 'readOnly', 'spinOnPress', 'step', 'translations', 'value']);
|
|
1988
|
+
const api = useNumberInput(useNumberInputProps);
|
|
1989
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
1990
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
1991
|
+
return createComponent(NumberInputProvider, {
|
|
1992
|
+
value: api,
|
|
1993
|
+
get children() {
|
|
1994
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
1995
|
+
get children() {
|
|
1996
|
+
return getChildren();
|
|
1997
|
+
}
|
|
1998
|
+
}));
|
|
1999
|
+
}
|
|
2000
|
+
});
|
|
2001
|
+
};
|
|
2002
|
+
|
|
2351
2003
|
const NumberInputScrubber = props => {
|
|
2352
2004
|
const api = useNumberInputContext();
|
|
2353
|
-
const mergedProps = mergeProps$
|
|
2005
|
+
const mergedProps = mergeProps$1(() => api().scrubberProps, props);
|
|
2354
2006
|
return createComponent(ark.div, mergedProps);
|
|
2355
2007
|
};
|
|
2356
2008
|
|
|
2357
|
-
const NumberInput =
|
|
2358
|
-
Root:
|
|
2009
|
+
const NumberInput = {
|
|
2010
|
+
Root: NumberInputRoot,
|
|
2359
2011
|
Control: NumberInputControl,
|
|
2360
2012
|
DecrementTrigger: NumberInputDecrementTrigger,
|
|
2361
2013
|
Input: NumberInputInput,
|
|
2362
2014
|
IncrementTrigger: NumberInputIncrementTrigger,
|
|
2363
2015
|
Label: NumberInputLabel,
|
|
2364
2016
|
Scrubber: NumberInputScrubber
|
|
2365
|
-
}
|
|
2017
|
+
};
|
|
2366
2018
|
|
|
2367
2019
|
const [PaginationProvider, usePaginationContext] = createContext({
|
|
2368
2020
|
hookName: 'usePaginationContext',
|
|
2369
2021
|
providerName: '<PaginationProvider />'
|
|
2370
2022
|
});
|
|
2371
2023
|
|
|
2024
|
+
const PaginationEllipsis = props => {
|
|
2025
|
+
const [ellipsisProps, localProps] = createSplitProps()(props, ['index']);
|
|
2026
|
+
const api = usePaginationContext();
|
|
2027
|
+
const mergedProps = mergeProps$1(() => api().getEllipsisProps(ellipsisProps), localProps);
|
|
2028
|
+
return createComponent(ark.div, mergedProps);
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
const PaginationItem = props => {
|
|
2032
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'type']);
|
|
2033
|
+
const api = usePaginationContext();
|
|
2034
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
2035
|
+
return createComponent(ark.button, mergedProps);
|
|
2036
|
+
};
|
|
2037
|
+
|
|
2038
|
+
const PaginationNextTrigger = props => {
|
|
2039
|
+
const api = usePaginationContext();
|
|
2040
|
+
const mergedProps = mergeProps$1(() => api().nextTriggerProps, props);
|
|
2041
|
+
return createComponent(ark.button, mergedProps);
|
|
2042
|
+
};
|
|
2043
|
+
|
|
2044
|
+
const PaginationPrevTrigger = props => {
|
|
2045
|
+
const api = usePaginationContext();
|
|
2046
|
+
const mergedProps = mergeProps$1(() => api().prevTriggerProps, props);
|
|
2047
|
+
return createComponent(ark.button, mergedProps);
|
|
2048
|
+
};
|
|
2049
|
+
|
|
2372
2050
|
const usePagination = props => {
|
|
2373
2051
|
const getRootNode = useEnvironmentContext();
|
|
2374
|
-
const context = mergeProps$
|
|
2052
|
+
const context = mergeProps$1({
|
|
2375
2053
|
id: createUniqueId(),
|
|
2376
2054
|
getRootNode
|
|
2377
2055
|
}, props);
|
|
@@ -2381,15 +2059,15 @@ const usePagination = props => {
|
|
|
2381
2059
|
return createMemo(() => pagination.connect(state, send, normalizeProps));
|
|
2382
2060
|
};
|
|
2383
2061
|
|
|
2384
|
-
const
|
|
2062
|
+
const PaginationRoot = props => {
|
|
2385
2063
|
const [paginationParams, localProps] = createSplitProps()(props, ['count', 'dir', 'getRootNode', 'id', 'ids', 'onPageChange', 'page', 'pageSize', 'siblingCount', 'translations', 'type']);
|
|
2386
2064
|
const api = usePagination(paginationParams);
|
|
2387
|
-
const mergedProps = mergeProps$
|
|
2065
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2388
2066
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2389
2067
|
return createComponent(PaginationProvider, {
|
|
2390
2068
|
value: api,
|
|
2391
2069
|
get children() {
|
|
2392
|
-
return createComponent(ark.nav, mergeProps
|
|
2070
|
+
return createComponent(ark.nav, mergeProps(mergedProps, {
|
|
2393
2071
|
get children() {
|
|
2394
2072
|
return getChildren();
|
|
2395
2073
|
}
|
|
@@ -2398,48 +2076,41 @@ const Pagination$1 = props => {
|
|
|
2398
2076
|
});
|
|
2399
2077
|
};
|
|
2400
2078
|
|
|
2401
|
-
const
|
|
2402
|
-
|
|
2403
|
-
const api = usePaginationContext();
|
|
2404
|
-
const mergedProps = mergeProps$2(() => api().getEllipsisProps(ellipsisProps), localProps);
|
|
2405
|
-
return createComponent(ark.div, mergedProps);
|
|
2406
|
-
};
|
|
2407
|
-
|
|
2408
|
-
const PaginationItem = props => {
|
|
2409
|
-
const [itemProps, localProps] = createSplitProps()(props, ['value', 'type']);
|
|
2410
|
-
const api = usePaginationContext();
|
|
2411
|
-
const mergedProps = mergeProps$2(() => api().getItemProps(itemProps), localProps);
|
|
2412
|
-
return createComponent(ark.button, mergedProps);
|
|
2413
|
-
};
|
|
2414
|
-
|
|
2415
|
-
const PaginationNextTrigger = props => {
|
|
2416
|
-
const api = usePaginationContext();
|
|
2417
|
-
const mergedProps = mergeProps$2(() => api().nextTriggerProps, props);
|
|
2418
|
-
return createComponent(ark.button, mergedProps);
|
|
2419
|
-
};
|
|
2420
|
-
|
|
2421
|
-
const PaginationPrevTrigger = props => {
|
|
2422
|
-
const api = usePaginationContext();
|
|
2423
|
-
const mergedProps = mergeProps$2(() => api().prevTriggerProps, props);
|
|
2424
|
-
return createComponent(ark.button, mergedProps);
|
|
2425
|
-
};
|
|
2426
|
-
|
|
2427
|
-
const Pagination = Object.assign(Pagination$1, {
|
|
2428
|
-
Root: Pagination$1,
|
|
2079
|
+
const Pagination = {
|
|
2080
|
+
Root: PaginationRoot,
|
|
2429
2081
|
Ellipsis: PaginationEllipsis,
|
|
2430
2082
|
Item: PaginationItem,
|
|
2431
2083
|
NextTrigger: PaginationNextTrigger,
|
|
2432
2084
|
PrevTrigger: PaginationPrevTrigger
|
|
2433
|
-
}
|
|
2085
|
+
};
|
|
2434
2086
|
|
|
2435
2087
|
const [PinInputProvider, usePinInputContext] = createContext({
|
|
2436
2088
|
hookName: 'usePinInputContext',
|
|
2437
2089
|
providerName: '<PinInputProvider />'
|
|
2438
2090
|
});
|
|
2439
2091
|
|
|
2092
|
+
const PinInputControl = props => {
|
|
2093
|
+
const api = usePinInputContext();
|
|
2094
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
2095
|
+
return createComponent(ark.div, mergedProps);
|
|
2096
|
+
};
|
|
2097
|
+
|
|
2098
|
+
const PinInputInput = props => {
|
|
2099
|
+
const [inputParams, localProps] = splitProps(props, ['index']);
|
|
2100
|
+
const api = usePinInputContext();
|
|
2101
|
+
const mergedProps = mergeProps$1(() => api().getInputProps(inputParams), localProps);
|
|
2102
|
+
return createComponent(ark.input, mergedProps);
|
|
2103
|
+
};
|
|
2104
|
+
|
|
2105
|
+
const PinInputLabel = props => {
|
|
2106
|
+
const api = usePinInputContext();
|
|
2107
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
2108
|
+
return createComponent(ark.label, mergedProps);
|
|
2109
|
+
};
|
|
2110
|
+
|
|
2440
2111
|
const usePinInput = props => {
|
|
2441
2112
|
const getRootNode = useEnvironmentContext();
|
|
2442
|
-
const context = mergeProps$
|
|
2113
|
+
const context = mergeProps$1({
|
|
2443
2114
|
id: createUniqueId(),
|
|
2444
2115
|
getRootNode
|
|
2445
2116
|
}, props);
|
|
@@ -2450,114 +2121,62 @@ const usePinInput = props => {
|
|
|
2450
2121
|
};
|
|
2451
2122
|
|
|
2452
2123
|
const _tmpl$$6 = /*#__PURE__*/template(`<input>`);
|
|
2453
|
-
const
|
|
2124
|
+
const PinInputRoot = props => {
|
|
2454
2125
|
const [usePinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2455
2126
|
const api = usePinInput(usePinInputProps);
|
|
2456
|
-
const mergedProps = mergeProps$
|
|
2127
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2457
2128
|
return createComponent(PinInputProvider, {
|
|
2458
2129
|
value: api,
|
|
2459
2130
|
get children() {
|
|
2460
2131
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
2461
2132
|
const _el$ = _tmpl$$6();
|
|
2462
|
-
spread
|
|
2133
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
2463
2134
|
return _el$;
|
|
2464
2135
|
})()];
|
|
2465
2136
|
}
|
|
2466
2137
|
});
|
|
2467
2138
|
};
|
|
2468
2139
|
|
|
2469
|
-
const
|
|
2470
|
-
|
|
2471
|
-
const mergedProps = mergeProps$2(() => api().controlProps, props);
|
|
2472
|
-
return createComponent(ark.div, mergedProps);
|
|
2473
|
-
};
|
|
2474
|
-
|
|
2475
|
-
const PinInputInput = props => {
|
|
2476
|
-
const [inputParams, localProps] = splitProps(props, ['index']);
|
|
2477
|
-
const api = usePinInputContext();
|
|
2478
|
-
const mergedProps = mergeProps$2(() => api().getInputProps(inputParams), localProps);
|
|
2479
|
-
return createComponent(ark.input, mergedProps);
|
|
2480
|
-
};
|
|
2481
|
-
|
|
2482
|
-
const PinInputLabel = props => {
|
|
2483
|
-
const api = usePinInputContext();
|
|
2484
|
-
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
2485
|
-
return createComponent(ark.label, mergedProps);
|
|
2486
|
-
};
|
|
2487
|
-
|
|
2488
|
-
const PinInput = Object.assign(PinInput$1, {
|
|
2489
|
-
Root: PinInput$1,
|
|
2140
|
+
const PinInput = {
|
|
2141
|
+
Root: PinInputRoot,
|
|
2490
2142
|
Control: PinInputControl,
|
|
2491
2143
|
Input: PinInputInput,
|
|
2492
2144
|
Label: PinInputLabel
|
|
2493
|
-
}
|
|
2145
|
+
};
|
|
2494
2146
|
|
|
2495
2147
|
const [PopoverProvider, usePopoverContext] = createContext({
|
|
2496
2148
|
hookName: 'usePopoverContext',
|
|
2497
2149
|
providerName: '<PopoverProvider />'
|
|
2498
2150
|
});
|
|
2499
2151
|
|
|
2500
|
-
const usePopover = props => {
|
|
2501
|
-
const getRootNode = useEnvironmentContext();
|
|
2502
|
-
const context = mergeProps$2({
|
|
2503
|
-
id: createUniqueId(),
|
|
2504
|
-
getRootNode
|
|
2505
|
-
}, props);
|
|
2506
|
-
const [state, send] = useMachine(popover.machine(context), {
|
|
2507
|
-
context
|
|
2508
|
-
});
|
|
2509
|
-
return createMemo(() => popover.connect(state, send, normalizeProps));
|
|
2510
|
-
};
|
|
2511
|
-
|
|
2512
|
-
const Popover$1 = props => {
|
|
2513
|
-
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
2514
|
-
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ['autoFocus', 'closeOnEsc', 'closeOnInteractOutside', 'dir', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'portalled', 'positioning']);
|
|
2515
|
-
const api = usePopover(usePopoverProps);
|
|
2516
|
-
const apiPresence = usePresence(mergeProps$2(presenceProps, () => ({
|
|
2517
|
-
present: api().isOpen
|
|
2518
|
-
})));
|
|
2519
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
2520
|
-
return createComponent(PopoverProvider, {
|
|
2521
|
-
value: api,
|
|
2522
|
-
get children() {
|
|
2523
|
-
return createComponent(PresenceProvider, {
|
|
2524
|
-
value: apiPresence,
|
|
2525
|
-
get children() {
|
|
2526
|
-
return getChildren();
|
|
2527
|
-
}
|
|
2528
|
-
});
|
|
2529
|
-
}
|
|
2530
|
-
});
|
|
2531
|
-
};
|
|
2532
|
-
|
|
2533
2152
|
const PopoverAnchor = props => {
|
|
2534
2153
|
const api = usePopoverContext();
|
|
2535
|
-
const mergedProps = mergeProps$
|
|
2154
|
+
const mergedProps = mergeProps$1(() => api().anchorProps, props);
|
|
2536
2155
|
return createComponent(ark.div, mergedProps);
|
|
2537
2156
|
};
|
|
2538
2157
|
|
|
2539
2158
|
const PopoverArrow = props => {
|
|
2540
2159
|
const popover = usePopoverContext();
|
|
2541
|
-
const mergedProps = mergeProps$
|
|
2160
|
+
const mergedProps = mergeProps$1(() => popover().arrowProps, props);
|
|
2542
2161
|
return createComponent(ark.div, mergedProps);
|
|
2543
2162
|
};
|
|
2544
2163
|
|
|
2545
2164
|
const PopoverArrowTip = props => {
|
|
2546
2165
|
const popover = usePopoverContext();
|
|
2547
|
-
const mergedProps = mergeProps$
|
|
2166
|
+
const mergedProps = mergeProps$1(() => popover().arrowTipProps, props);
|
|
2548
2167
|
return createComponent(ark.div, mergedProps);
|
|
2549
2168
|
};
|
|
2550
2169
|
|
|
2551
2170
|
const PopoverCloseTrigger = props => {
|
|
2552
2171
|
const api = usePopoverContext();
|
|
2553
|
-
const mergedProps = mergeProps$
|
|
2172
|
+
const mergedProps = mergeProps$1(() => api().closeTriggerProps, props);
|
|
2554
2173
|
return createComponent(ark.button, mergedProps);
|
|
2555
2174
|
};
|
|
2556
2175
|
|
|
2557
2176
|
const PopoverContent = props => {
|
|
2558
2177
|
const api = usePopoverContext();
|
|
2559
2178
|
const presenceApi = usePresenceContext();
|
|
2560
|
-
const mergedProps = mergeProps$
|
|
2179
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2561
2180
|
return createComponent(Show, {
|
|
2562
2181
|
get when() {
|
|
2563
2182
|
return !presenceApi().isUnmounted;
|
|
@@ -2570,20 +2189,20 @@ const PopoverContent = props => {
|
|
|
2570
2189
|
|
|
2571
2190
|
const PopoverDescription = props => {
|
|
2572
2191
|
const api = usePopoverContext();
|
|
2573
|
-
const mergedProps = mergeProps$
|
|
2192
|
+
const mergedProps = mergeProps$1(() => api().descriptionProps, props);
|
|
2574
2193
|
return createComponent(ark.p, mergedProps);
|
|
2575
2194
|
};
|
|
2576
2195
|
|
|
2577
2196
|
const PopoverIndicator = props => {
|
|
2578
2197
|
const popover = usePopoverContext();
|
|
2579
|
-
const mergedProps = mergeProps$
|
|
2198
|
+
const mergedProps = mergeProps$1(() => popover().indicatorProps, props);
|
|
2580
2199
|
return createComponent(ark.div, mergedProps);
|
|
2581
2200
|
};
|
|
2582
2201
|
|
|
2583
2202
|
const PopoverPositioner = props => {
|
|
2584
2203
|
const api = usePopoverContext();
|
|
2585
2204
|
const presenceApi = usePresenceContext();
|
|
2586
|
-
const mergedProps = mergeProps$
|
|
2205
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
2587
2206
|
return createComponent(Show, {
|
|
2588
2207
|
get when() {
|
|
2589
2208
|
return !presenceApi().isUnmounted;
|
|
@@ -2594,25 +2213,56 @@ const PopoverPositioner = props => {
|
|
|
2594
2213
|
});
|
|
2595
2214
|
};
|
|
2596
2215
|
|
|
2216
|
+
const usePopover = props => {
|
|
2217
|
+
const getRootNode = useEnvironmentContext();
|
|
2218
|
+
const context = mergeProps$1({
|
|
2219
|
+
id: createUniqueId(),
|
|
2220
|
+
getRootNode
|
|
2221
|
+
}, props);
|
|
2222
|
+
const [state, send] = useMachine(popover.machine(context), {
|
|
2223
|
+
context
|
|
2224
|
+
});
|
|
2225
|
+
return createMemo(() => popover.connect(state, send, normalizeProps));
|
|
2226
|
+
};
|
|
2227
|
+
|
|
2228
|
+
const PopoverRoot = props => {
|
|
2229
|
+
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
2230
|
+
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ['autoFocus', 'closeOnEsc', 'closeOnInteractOutside', 'dir', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'portalled', 'positioning']);
|
|
2231
|
+
const api = usePopover(usePopoverProps);
|
|
2232
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
2233
|
+
present: api().isOpen
|
|
2234
|
+
})));
|
|
2235
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2236
|
+
return createComponent(PopoverProvider, {
|
|
2237
|
+
value: api,
|
|
2238
|
+
get children() {
|
|
2239
|
+
return createComponent(PresenceProvider, {
|
|
2240
|
+
value: apiPresence,
|
|
2241
|
+
get children() {
|
|
2242
|
+
return getChildren();
|
|
2243
|
+
}
|
|
2244
|
+
});
|
|
2245
|
+
}
|
|
2246
|
+
});
|
|
2247
|
+
};
|
|
2248
|
+
|
|
2597
2249
|
const PopoverTitle = props => {
|
|
2598
2250
|
const api = usePopoverContext();
|
|
2599
|
-
const mergedProps = mergeProps$
|
|
2251
|
+
const mergedProps = mergeProps$1(() => api().titleProps, props);
|
|
2600
2252
|
return createComponent(ark.div, mergedProps);
|
|
2601
2253
|
};
|
|
2602
2254
|
|
|
2603
2255
|
const PopoverTrigger = props => {
|
|
2604
2256
|
const api = usePopoverContext();
|
|
2605
2257
|
const presenceApi = usePresenceContext();
|
|
2606
|
-
const mergedProps = mergeProps$
|
|
2258
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, () => ({
|
|
2607
2259
|
'aria-controls': presenceApi().isUnmounted && null
|
|
2608
2260
|
}), props);
|
|
2609
|
-
|
|
2610
|
-
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
2611
2261
|
return createComponent(ark.button, mergedProps);
|
|
2612
2262
|
};
|
|
2613
2263
|
|
|
2614
|
-
const Popover =
|
|
2615
|
-
Root:
|
|
2264
|
+
const Popover = {
|
|
2265
|
+
Root: PopoverRoot,
|
|
2616
2266
|
Anchor: PopoverAnchor,
|
|
2617
2267
|
Arrow: PopoverArrow,
|
|
2618
2268
|
ArrowTip: PopoverArrowTip,
|
|
@@ -2623,140 +2273,116 @@ const Popover = Object.assign(Popover$1, {
|
|
|
2623
2273
|
Positioner: PopoverPositioner,
|
|
2624
2274
|
Title: PopoverTitle,
|
|
2625
2275
|
Trigger: PopoverTrigger
|
|
2626
|
-
}
|
|
2276
|
+
};
|
|
2627
2277
|
|
|
2628
2278
|
const [ProgressProvider, useProgressContext] = createContext({
|
|
2629
2279
|
hookName: 'useProgressContext',
|
|
2630
2280
|
providerName: '<ProgressProvider />'
|
|
2631
2281
|
});
|
|
2632
2282
|
|
|
2633
|
-
const useProgress = props => {
|
|
2634
|
-
const getRootNode = useEnvironmentContext();
|
|
2635
|
-
const context = mergeProps$2({
|
|
2636
|
-
id: createUniqueId(),
|
|
2637
|
-
getRootNode
|
|
2638
|
-
}, props);
|
|
2639
|
-
const [state, send] = useMachine(progress.machine(context), {
|
|
2640
|
-
context
|
|
2641
|
-
});
|
|
2642
|
-
return createMemo(() => progress.connect(state, send, normalizeProps));
|
|
2643
|
-
};
|
|
2644
|
-
|
|
2645
|
-
const Progress$1 = props => {
|
|
2646
|
-
const [progressProps, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'max', 'min', 'orientation', 'translations', 'value']);
|
|
2647
|
-
const api = useProgress(progressProps);
|
|
2648
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2649
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
2650
|
-
return createComponent(ProgressProvider, {
|
|
2651
|
-
value: api,
|
|
2652
|
-
get children() {
|
|
2653
|
-
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
2654
|
-
get children() {
|
|
2655
|
-
return getChildren();
|
|
2656
|
-
}
|
|
2657
|
-
}));
|
|
2658
|
-
}
|
|
2659
|
-
});
|
|
2660
|
-
};
|
|
2661
|
-
|
|
2662
2283
|
const ProgressCircle = props => {
|
|
2663
2284
|
const api = useProgressContext();
|
|
2664
|
-
const mergedProps = mergeProps$
|
|
2285
|
+
const mergedProps = mergeProps$1(() => api().circleProps, props);
|
|
2665
2286
|
return createComponent(ark.svg, mergedProps);
|
|
2666
2287
|
};
|
|
2667
2288
|
|
|
2668
2289
|
const ProgressCircleRange = props => {
|
|
2669
2290
|
const api = useProgressContext();
|
|
2670
|
-
const mergedProps = mergeProps$
|
|
2291
|
+
const mergedProps = mergeProps$1(() => api().circleRangeProps, props);
|
|
2671
2292
|
return createComponent(ark.circle, mergedProps);
|
|
2672
2293
|
};
|
|
2673
2294
|
|
|
2674
2295
|
const ProgressCircleTrack = props => {
|
|
2675
2296
|
const api = useProgressContext();
|
|
2676
|
-
const mergedProps = mergeProps$
|
|
2297
|
+
const mergedProps = mergeProps$1(() => api().circleTrackProps, props);
|
|
2677
2298
|
return createComponent(ark.circle, mergedProps);
|
|
2678
2299
|
};
|
|
2679
2300
|
|
|
2680
|
-
const ProgressIndicator = props => {
|
|
2681
|
-
const [state, localProps] = createSplitProps()(props, ['state']);
|
|
2682
|
-
const api = useProgressContext();
|
|
2683
|
-
const mergedProps = mergeProps$2(() => api().getIndicatorProps(state), localProps);
|
|
2684
|
-
return createComponent(ark.span, mergedProps);
|
|
2685
|
-
};
|
|
2686
|
-
|
|
2687
2301
|
const ProgressLabel = props => {
|
|
2688
2302
|
const api = useProgressContext();
|
|
2689
|
-
const mergedProps = mergeProps$
|
|
2303
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
2690
2304
|
return createComponent(ark.label, mergedProps);
|
|
2691
2305
|
};
|
|
2692
2306
|
|
|
2693
2307
|
const ProgressRange = props => {
|
|
2694
2308
|
const api = useProgressContext();
|
|
2695
|
-
const mergedProps = mergeProps$
|
|
2309
|
+
const mergedProps = mergeProps$1(() => api().rangeProps, props);
|
|
2696
2310
|
return createComponent(ark.div, mergedProps);
|
|
2697
2311
|
};
|
|
2698
2312
|
|
|
2313
|
+
const useProgress = props => {
|
|
2314
|
+
const getRootNode = useEnvironmentContext();
|
|
2315
|
+
const context = mergeProps$1({
|
|
2316
|
+
id: createUniqueId(),
|
|
2317
|
+
getRootNode
|
|
2318
|
+
}, props);
|
|
2319
|
+
const [state, send] = useMachine(progress.machine(context), {
|
|
2320
|
+
context
|
|
2321
|
+
});
|
|
2322
|
+
return createMemo(() => progress.connect(state, send, normalizeProps));
|
|
2323
|
+
};
|
|
2324
|
+
|
|
2325
|
+
const ProgressRoot = props => {
|
|
2326
|
+
const [progressProps, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'max', 'min', 'orientation', 'translations', 'value']);
|
|
2327
|
+
const api = useProgress(progressProps);
|
|
2328
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2329
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2330
|
+
return createComponent(ProgressProvider, {
|
|
2331
|
+
value: api,
|
|
2332
|
+
get children() {
|
|
2333
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
2334
|
+
get children() {
|
|
2335
|
+
return getChildren();
|
|
2336
|
+
}
|
|
2337
|
+
}));
|
|
2338
|
+
}
|
|
2339
|
+
});
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2699
2342
|
const ProgressTrack = props => {
|
|
2700
2343
|
const api = useProgressContext();
|
|
2701
|
-
const mergedProps = mergeProps$
|
|
2344
|
+
const mergedProps = mergeProps$1(() => api().trackProps, props);
|
|
2702
2345
|
return createComponent(ark.div, mergedProps);
|
|
2703
2346
|
};
|
|
2704
2347
|
|
|
2705
2348
|
const ProgressValueText = props => {
|
|
2706
2349
|
const api = useProgressContext();
|
|
2707
|
-
const mergedProps = mergeProps$
|
|
2350
|
+
const mergedProps = mergeProps$1(() => api().valueTextProps, props);
|
|
2708
2351
|
const getChildren = () => runIfFn(props.children, () => api().valueAsString);
|
|
2709
|
-
return createComponent(ark.span, mergeProps
|
|
2352
|
+
return createComponent(ark.span, mergeProps(mergedProps, {
|
|
2710
2353
|
get children() {
|
|
2711
2354
|
return getChildren() || api().valueAsString;
|
|
2712
2355
|
}
|
|
2713
2356
|
}));
|
|
2714
2357
|
};
|
|
2715
2358
|
|
|
2716
|
-
const
|
|
2717
|
-
|
|
2359
|
+
const ProgressView = props => {
|
|
2360
|
+
const [state, localProps] = createSplitProps()(props, ['state']);
|
|
2361
|
+
const api = useProgressContext();
|
|
2362
|
+
const mergedProps = mergeProps$1(() => api().getViewProps(state), localProps);
|
|
2363
|
+
return createComponent(ark.span, mergedProps);
|
|
2364
|
+
};
|
|
2365
|
+
|
|
2366
|
+
const Progress = {
|
|
2367
|
+
Root: ProgressRoot,
|
|
2718
2368
|
Label: ProgressLabel,
|
|
2719
2369
|
Track: ProgressTrack,
|
|
2720
2370
|
Range: ProgressRange,
|
|
2721
2371
|
ValueText: ProgressValueText,
|
|
2722
|
-
|
|
2372
|
+
View: ProgressView,
|
|
2723
2373
|
Circle: ProgressCircle,
|
|
2724
2374
|
CircleTrack: ProgressCircleTrack,
|
|
2725
2375
|
CircleRange: ProgressCircleRange
|
|
2726
|
-
}
|
|
2376
|
+
};
|
|
2727
2377
|
|
|
2728
2378
|
const [RadioGroupProvider, useRadioGroupContext] = createContext({
|
|
2729
2379
|
hookName: 'useRadioGroupContext',
|
|
2730
2380
|
providerName: '<RadioGroupProvider />'
|
|
2731
2381
|
});
|
|
2732
2382
|
|
|
2733
|
-
const useRadioGroup = props => {
|
|
2734
|
-
const getRootNode = useEnvironmentContext();
|
|
2735
|
-
const context = mergeProps$2({
|
|
2736
|
-
id: createUniqueId(),
|
|
2737
|
-
getRootNode
|
|
2738
|
-
}, props);
|
|
2739
|
-
const [state, send] = useMachine(radio.machine(context), {
|
|
2740
|
-
context
|
|
2741
|
-
});
|
|
2742
|
-
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
2743
|
-
};
|
|
2744
|
-
|
|
2745
|
-
const RadioGroup$1 = props => {
|
|
2746
|
-
const [useRadioGroupProps, localProps] = createSplitProps()(props, ['dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'value']);
|
|
2747
|
-
const api = useRadioGroup(useRadioGroupProps);
|
|
2748
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
2749
|
-
return createComponent(RadioGroupProvider, {
|
|
2750
|
-
value: api,
|
|
2751
|
-
get children() {
|
|
2752
|
-
return createComponent(ark.div, mergedProps);
|
|
2753
|
-
}
|
|
2754
|
-
});
|
|
2755
|
-
};
|
|
2756
|
-
|
|
2757
2383
|
const RadioGroupIndicator = props => {
|
|
2758
2384
|
const api = useRadioGroupContext();
|
|
2759
|
-
const mergedProps = mergeProps$
|
|
2385
|
+
const mergedProps = mergeProps$1(() => api().indicatorProps, props);
|
|
2760
2386
|
return createComponent(ark.div, mergedProps);
|
|
2761
2387
|
};
|
|
2762
2388
|
|
|
@@ -2768,13 +2394,13 @@ const [RadioGroupItemProvider, useRadioGroupItemContext] = createContext({
|
|
|
2768
2394
|
const RadioGroupItem = props => {
|
|
2769
2395
|
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2770
2396
|
const api = useRadioGroupContext();
|
|
2771
|
-
const mergedProps = mergeProps$
|
|
2397
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
2772
2398
|
const itemState = api().getItemState(itemProps);
|
|
2773
2399
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2774
2400
|
return createComponent(RadioGroupItemProvider, {
|
|
2775
2401
|
value: itemProps,
|
|
2776
2402
|
get children() {
|
|
2777
|
-
return createComponent(ark.label, mergeProps
|
|
2403
|
+
return createComponent(ark.label, mergeProps(mergedProps, {
|
|
2778
2404
|
get children() {
|
|
2779
2405
|
return getChildren();
|
|
2780
2406
|
}
|
|
@@ -2787,10 +2413,10 @@ const _tmpl$$5 = /*#__PURE__*/template(`<input>`);
|
|
|
2787
2413
|
const RadioGroupItemControl = props => {
|
|
2788
2414
|
const api = useRadioGroupContext();
|
|
2789
2415
|
const itemProps = useRadioGroupItemContext();
|
|
2790
|
-
const mergedProps = mergeProps$
|
|
2416
|
+
const mergedProps = mergeProps$1(() => api().getItemControlProps(itemProps), props);
|
|
2791
2417
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
2792
2418
|
const _el$ = _tmpl$$5();
|
|
2793
|
-
spread
|
|
2419
|
+
spread(_el$, mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2794
2420
|
return _el$;
|
|
2795
2421
|
})()];
|
|
2796
2422
|
};
|
|
@@ -2798,47 +2424,33 @@ const RadioGroupItemControl = props => {
|
|
|
2798
2424
|
const RadioGroupItemText = props => {
|
|
2799
2425
|
const api = useRadioGroupContext();
|
|
2800
2426
|
const itemProps = useRadioGroupItemContext();
|
|
2801
|
-
const mergedProps = mergeProps$
|
|
2427
|
+
const mergedProps = mergeProps$1(() => api().getItemTextProps(itemProps), props);
|
|
2802
2428
|
return createComponent(ark.span, mergedProps);
|
|
2803
2429
|
};
|
|
2804
2430
|
|
|
2805
2431
|
const RadioGroupLabel = props => {
|
|
2806
2432
|
const api = useRadioGroupContext();
|
|
2807
|
-
const mergedProps = mergeProps$
|
|
2433
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
2808
2434
|
return createComponent(ark.label, mergedProps);
|
|
2809
2435
|
};
|
|
2810
2436
|
|
|
2811
|
-
const
|
|
2812
|
-
Root: RadioGroup$1,
|
|
2813
|
-
Indicator: RadioGroupIndicator,
|
|
2814
|
-
Item: RadioGroupItem,
|
|
2815
|
-
ItemControl: RadioGroupItemControl,
|
|
2816
|
-
ItemText: RadioGroupItemText,
|
|
2817
|
-
Label: RadioGroupLabel
|
|
2818
|
-
});
|
|
2819
|
-
|
|
2820
|
-
const [RatingGroupProvider, useRatingGroupContext] = createContext({
|
|
2821
|
-
hookName: 'useRatingGroupContext',
|
|
2822
|
-
providerName: '<RatingGroupProvider />'
|
|
2823
|
-
});
|
|
2824
|
-
|
|
2825
|
-
const useRatingGroup = props => {
|
|
2437
|
+
const useRadioGroup = props => {
|
|
2826
2438
|
const getRootNode = useEnvironmentContext();
|
|
2827
|
-
const context = mergeProps$
|
|
2439
|
+
const context = mergeProps$1({
|
|
2828
2440
|
id: createUniqueId(),
|
|
2829
2441
|
getRootNode
|
|
2830
2442
|
}, props);
|
|
2831
|
-
const [state, send] = useMachine(
|
|
2443
|
+
const [state, send] = useMachine(radio.machine(context), {
|
|
2832
2444
|
context
|
|
2833
2445
|
});
|
|
2834
|
-
return createMemo(() =>
|
|
2446
|
+
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
2835
2447
|
};
|
|
2836
2448
|
|
|
2837
|
-
const
|
|
2838
|
-
const [
|
|
2839
|
-
const api =
|
|
2840
|
-
const mergedProps = mergeProps$
|
|
2841
|
-
return createComponent(
|
|
2449
|
+
const RadioGroupRoot = props => {
|
|
2450
|
+
const [useRadioGroupProps, localProps] = createSplitProps()(props, ['dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'value']);
|
|
2451
|
+
const api = useRadioGroup(useRadioGroupProps);
|
|
2452
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2453
|
+
return createComponent(RadioGroupProvider, {
|
|
2842
2454
|
value: api,
|
|
2843
2455
|
get children() {
|
|
2844
2456
|
return createComponent(ark.div, mergedProps);
|
|
@@ -2846,18 +2458,32 @@ const RatingGroup$1 = props => {
|
|
|
2846
2458
|
});
|
|
2847
2459
|
};
|
|
2848
2460
|
|
|
2461
|
+
const RadioGroup = {
|
|
2462
|
+
Root: RadioGroupRoot,
|
|
2463
|
+
Indicator: RadioGroupIndicator,
|
|
2464
|
+
Item: RadioGroupItem,
|
|
2465
|
+
ItemControl: RadioGroupItemControl,
|
|
2466
|
+
ItemText: RadioGroupItemText,
|
|
2467
|
+
Label: RadioGroupLabel
|
|
2468
|
+
};
|
|
2469
|
+
|
|
2470
|
+
const [RatingGroupProvider, useRatingGroupContext] = createContext({
|
|
2471
|
+
hookName: 'useRatingGroupContext',
|
|
2472
|
+
providerName: '<RatingGroupProvider />'
|
|
2473
|
+
});
|
|
2474
|
+
|
|
2849
2475
|
const _tmpl$$4 = /*#__PURE__*/template(`<input>`);
|
|
2850
2476
|
const RatingGroupControl = props => {
|
|
2851
2477
|
const api = useRatingGroupContext();
|
|
2852
|
-
const mergedProps = mergeProps$
|
|
2478
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
2853
2479
|
const getChildren = () => runIfFn(props.children, api);
|
|
2854
|
-
return [createComponent(ark.div, mergeProps
|
|
2480
|
+
return [createComponent(ark.div, mergeProps(mergedProps, {
|
|
2855
2481
|
get children() {
|
|
2856
2482
|
return getChildren();
|
|
2857
2483
|
}
|
|
2858
2484
|
})), (() => {
|
|
2859
2485
|
const _el$ = _tmpl$$4();
|
|
2860
|
-
spread
|
|
2486
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
2861
2487
|
return _el$;
|
|
2862
2488
|
})()];
|
|
2863
2489
|
};
|
|
@@ -2870,13 +2496,13 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2870
2496
|
const RatingGroupItem = props => {
|
|
2871
2497
|
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2872
2498
|
const api = useRatingGroupContext();
|
|
2873
|
-
const mergedProps = mergeProps$
|
|
2499
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
2874
2500
|
const itemState = createMemo(() => api().getItemState(itemProps));
|
|
2875
2501
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2876
2502
|
return createComponent(RatingGroupItemProvider, {
|
|
2877
2503
|
value: itemProps,
|
|
2878
2504
|
get children() {
|
|
2879
|
-
return createComponent(ark.span, mergeProps
|
|
2505
|
+
return createComponent(ark.span, mergeProps(mergedProps, {
|
|
2880
2506
|
get children() {
|
|
2881
2507
|
return getChildren();
|
|
2882
2508
|
}
|
|
@@ -2887,39 +2513,27 @@ const RatingGroupItem = props => {
|
|
|
2887
2513
|
|
|
2888
2514
|
const RatingGroupLabel = props => {
|
|
2889
2515
|
const api = useRatingGroupContext();
|
|
2890
|
-
const mergedProps = mergeProps$
|
|
2516
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
2891
2517
|
return createComponent(ark.label, mergedProps);
|
|
2892
2518
|
};
|
|
2893
2519
|
|
|
2894
|
-
const
|
|
2895
|
-
Root: RatingGroup$1,
|
|
2896
|
-
Control: RatingGroupControl,
|
|
2897
|
-
Label: RatingGroupLabel,
|
|
2898
|
-
Item: RatingGroupItem
|
|
2899
|
-
});
|
|
2900
|
-
|
|
2901
|
-
const [SegmentGroupProvider, useSegmentGroupContext] = createContext({
|
|
2902
|
-
hookName: 'useSegmentGroupContext',
|
|
2903
|
-
providerName: '<SegmentGroupProvider />'
|
|
2904
|
-
});
|
|
2905
|
-
|
|
2906
|
-
const useSegmentGroup = props => {
|
|
2520
|
+
const useRatingGroup = props => {
|
|
2907
2521
|
const getRootNode = useEnvironmentContext();
|
|
2908
|
-
const context = mergeProps$
|
|
2522
|
+
const context = mergeProps$1({
|
|
2909
2523
|
id: createUniqueId(),
|
|
2910
2524
|
getRootNode
|
|
2911
2525
|
}, props);
|
|
2912
|
-
const [state, send] = useMachine(
|
|
2526
|
+
const [state, send] = useMachine(rating.machine(context), {
|
|
2913
2527
|
context
|
|
2914
2528
|
});
|
|
2915
|
-
return createMemo(() =>
|
|
2529
|
+
return createMemo(() => rating.connect(state, send, normalizeProps));
|
|
2916
2530
|
};
|
|
2917
2531
|
|
|
2918
|
-
const
|
|
2919
|
-
const [
|
|
2920
|
-
const api =
|
|
2921
|
-
const mergedProps = mergeProps$
|
|
2922
|
-
return createComponent(
|
|
2532
|
+
const RatingGroupRoot = props => {
|
|
2533
|
+
const [useRatingProps, localProps] = createSplitProps()(props, ['allowHalf', 'autoFocus', 'count', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onHoverChange', 'onValueChange', 'readOnly', 'translations', 'value']);
|
|
2534
|
+
const api = useRatingGroup(useRatingProps);
|
|
2535
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2536
|
+
return createComponent(RatingGroupProvider, {
|
|
2923
2537
|
value: api,
|
|
2924
2538
|
get children() {
|
|
2925
2539
|
return createComponent(ark.div, mergedProps);
|
|
@@ -2927,9 +2541,21 @@ const SegmentGroup$1 = props => {
|
|
|
2927
2541
|
});
|
|
2928
2542
|
};
|
|
2929
2543
|
|
|
2544
|
+
const RatingGroup = {
|
|
2545
|
+
Root: RatingGroupRoot,
|
|
2546
|
+
Control: RatingGroupControl,
|
|
2547
|
+
Label: RatingGroupLabel,
|
|
2548
|
+
Item: RatingGroupItem
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
const [SegmentGroupProvider, useSegmentGroupContext] = createContext({
|
|
2552
|
+
hookName: 'useSegmentGroupContext',
|
|
2553
|
+
providerName: '<SegmentGroupProvider />'
|
|
2554
|
+
});
|
|
2555
|
+
|
|
2930
2556
|
const SegmentGroupIndicator = props => {
|
|
2931
2557
|
const api = useSegmentGroupContext();
|
|
2932
|
-
const mergedProps = mergeProps$
|
|
2558
|
+
const mergedProps = mergeProps$1(() => api().indicatorProps, segmentGroupAnatomy.build().indicator.attrs, props);
|
|
2933
2559
|
return createComponent(ark.div, mergedProps);
|
|
2934
2560
|
};
|
|
2935
2561
|
|
|
@@ -2941,13 +2567,13 @@ const [SegmentGroupItemProvider, useSegmentGroupItemContext] = createContext({
|
|
|
2941
2567
|
const SegmentGroupItem = props => {
|
|
2942
2568
|
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled', 'invalid']);
|
|
2943
2569
|
const api = useSegmentGroupContext();
|
|
2944
|
-
const mergedProps = mergeProps$
|
|
2570
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), segmentGroupAnatomy.build().item.attrs, localProps);
|
|
2945
2571
|
const itemState = api().getItemState(itemProps);
|
|
2946
2572
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2947
2573
|
return createComponent(SegmentGroupItemProvider, {
|
|
2948
2574
|
value: itemProps,
|
|
2949
2575
|
get children() {
|
|
2950
|
-
return createComponent(ark.label, mergeProps
|
|
2576
|
+
return createComponent(ark.label, mergeProps(mergedProps, {
|
|
2951
2577
|
get children() {
|
|
2952
2578
|
return getChildren();
|
|
2953
2579
|
}
|
|
@@ -2960,10 +2586,10 @@ const _tmpl$$3 = /*#__PURE__*/template(`<input>`);
|
|
|
2960
2586
|
const SegmentGroupItemControl = props => {
|
|
2961
2587
|
const api = useSegmentGroupContext();
|
|
2962
2588
|
const itemProps = useSegmentGroupItemContext();
|
|
2963
|
-
const mergedProps = mergeProps$
|
|
2589
|
+
const mergedProps = mergeProps$1(() => api().getItemControlProps(itemProps), segmentGroupAnatomy.build().itemControl.attrs, props);
|
|
2964
2590
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
2965
2591
|
const _el$ = _tmpl$$3();
|
|
2966
|
-
spread
|
|
2592
|
+
spread(_el$, mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2967
2593
|
return _el$;
|
|
2968
2594
|
})()];
|
|
2969
2595
|
};
|
|
@@ -2971,82 +2597,65 @@ const SegmentGroupItemControl = props => {
|
|
|
2971
2597
|
const SegmentGroupItemText = props => {
|
|
2972
2598
|
const api = useSegmentGroupContext();
|
|
2973
2599
|
const itemProps = useSegmentGroupItemContext();
|
|
2974
|
-
const mergedProps = mergeProps$
|
|
2600
|
+
const mergedProps = mergeProps$1(() => api().getItemTextProps(itemProps), segmentGroupAnatomy.build().itemText.attrs, props);
|
|
2975
2601
|
return createComponent(ark.span, mergedProps);
|
|
2976
2602
|
};
|
|
2977
2603
|
|
|
2978
2604
|
const SegmentGroupLabel = props => {
|
|
2979
2605
|
const api = useSegmentGroupContext();
|
|
2980
|
-
const mergedProps = mergeProps$
|
|
2606
|
+
const mergedProps = mergeProps$1(() => api().labelProps, segmentGroupAnatomy.build().label.attrs, props);
|
|
2981
2607
|
return createComponent(ark.label, mergedProps);
|
|
2982
2608
|
};
|
|
2983
2609
|
|
|
2984
|
-
const
|
|
2985
|
-
Root: SegmentGroup$1,
|
|
2986
|
-
Indicator: SegmentGroupIndicator,
|
|
2987
|
-
Item: SegmentGroupItem,
|
|
2988
|
-
ItemControl: SegmentGroupItemControl,
|
|
2989
|
-
ItemText: SegmentGroupItemText,
|
|
2990
|
-
Label: SegmentGroupLabel
|
|
2991
|
-
});
|
|
2992
|
-
|
|
2993
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2994
|
-
const [SelectProvider, useSelectContext] = createContext({
|
|
2995
|
-
hookName: 'useSelectContext',
|
|
2996
|
-
providerName: '<SelectProvider />'
|
|
2997
|
-
});
|
|
2998
|
-
|
|
2999
|
-
const useSelect = props => {
|
|
3000
|
-
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
3001
|
-
const collection = () => select.collection(collectionOptions);
|
|
2610
|
+
const useSegmentGroup = props => {
|
|
3002
2611
|
const getRootNode = useEnvironmentContext();
|
|
3003
|
-
const context =
|
|
2612
|
+
const context = mergeProps$1({
|
|
3004
2613
|
id: createUniqueId(),
|
|
3005
|
-
getRootNode
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
const [state, send] = useMachine(select.machine(context()), {
|
|
2614
|
+
getRootNode
|
|
2615
|
+
}, props);
|
|
2616
|
+
const [state, send] = useMachine(radio.machine(context), {
|
|
3009
2617
|
context
|
|
3010
2618
|
});
|
|
3011
|
-
return createMemo(() =>
|
|
2619
|
+
return createMemo(() => radio.connect(state, send, normalizeProps));
|
|
3012
2620
|
};
|
|
3013
2621
|
|
|
3014
|
-
const
|
|
3015
|
-
const [
|
|
3016
|
-
const
|
|
3017
|
-
const
|
|
3018
|
-
|
|
3019
|
-
present: api().isOpen
|
|
3020
|
-
}), presenceProps));
|
|
3021
|
-
const mergedProps = mergeProps$2(() => api().rootProps, localProps);
|
|
3022
|
-
const getChildren = () => runIfFn(localProps.children, api);
|
|
3023
|
-
return createComponent(SelectProvider, {
|
|
2622
|
+
const SegmentGroupRoot = props => {
|
|
2623
|
+
const [groupParams, localProps] = createSplitProps()(props, ['dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'name', 'onValueChange', 'orientation', 'value']);
|
|
2624
|
+
const api = useSegmentGroup(groupParams);
|
|
2625
|
+
const mergedProps = mergeProps$1(() => api().rootProps, segmentGroupAnatomy.build().root.attrs, localProps);
|
|
2626
|
+
return createComponent(SegmentGroupProvider, {
|
|
3024
2627
|
value: api,
|
|
3025
2628
|
get children() {
|
|
3026
|
-
return createComponent(
|
|
3027
|
-
value: presenceApi,
|
|
3028
|
-
get children() {
|
|
3029
|
-
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
3030
|
-
get children() {
|
|
3031
|
-
return getChildren();
|
|
3032
|
-
}
|
|
3033
|
-
}));
|
|
3034
|
-
}
|
|
3035
|
-
});
|
|
2629
|
+
return createComponent(ark.div, mergedProps);
|
|
3036
2630
|
}
|
|
3037
2631
|
});
|
|
3038
2632
|
};
|
|
3039
2633
|
|
|
2634
|
+
const SegmentGroup = {
|
|
2635
|
+
Root: SegmentGroupRoot,
|
|
2636
|
+
Indicator: SegmentGroupIndicator,
|
|
2637
|
+
Item: SegmentGroupItem,
|
|
2638
|
+
ItemControl: SegmentGroupItemControl,
|
|
2639
|
+
ItemText: SegmentGroupItemText,
|
|
2640
|
+
Label: SegmentGroupLabel
|
|
2641
|
+
};
|
|
2642
|
+
|
|
2643
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2644
|
+
const [SelectProvider, useSelectContext] = createContext({
|
|
2645
|
+
hookName: 'useSelectContext',
|
|
2646
|
+
providerName: '<SelectProvider />'
|
|
2647
|
+
});
|
|
2648
|
+
|
|
3040
2649
|
const SelectClearTrigger = props => {
|
|
3041
2650
|
const api = useSelectContext();
|
|
3042
|
-
const mergedProps = mergeProps$
|
|
2651
|
+
const mergedProps = mergeProps$1(() => api().clearTriggerProps, props);
|
|
3043
2652
|
return createComponent(ark.button, mergedProps);
|
|
3044
2653
|
};
|
|
3045
2654
|
|
|
3046
2655
|
const SelectContent = props => {
|
|
3047
2656
|
const api = useSelectContext();
|
|
3048
2657
|
const presenceApi = usePresenceContext();
|
|
3049
|
-
const mergedProps = mergeProps$
|
|
2658
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
3050
2659
|
return createComponent(Show, {
|
|
3051
2660
|
get when() {
|
|
3052
2661
|
return !presenceApi().isUnmounted;
|
|
@@ -3061,10 +2670,10 @@ const _tmpl$$2 = /*#__PURE__*/template(`<select>`),
|
|
|
3061
2670
|
_tmpl$2 = /*#__PURE__*/template(`<option>`);
|
|
3062
2671
|
const SelectControl = props => {
|
|
3063
2672
|
const api = useSelectContext();
|
|
3064
|
-
const mergedProps = mergeProps$
|
|
2673
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
3065
2674
|
return [createComponent(ark.div, mergedProps), (() => {
|
|
3066
2675
|
const _el$ = _tmpl$$2();
|
|
3067
|
-
spread
|
|
2676
|
+
spread(_el$, mergeProps(() => api().hiddenSelectProps), false, true);
|
|
3068
2677
|
insert(_el$, createComponent(Index, {
|
|
3069
2678
|
get each() {
|
|
3070
2679
|
return api().collection.toArray();
|
|
@@ -3082,7 +2691,7 @@ const SelectControl = props => {
|
|
|
3082
2691
|
|
|
3083
2692
|
const SelectIndicator = props => {
|
|
3084
2693
|
const api = useSelectContext();
|
|
3085
|
-
const mergedProps = mergeProps$
|
|
2694
|
+
const mergedProps = mergeProps$1(() => api().indicatorProps, props);
|
|
3086
2695
|
return createComponent(ark.div, mergedProps);
|
|
3087
2696
|
};
|
|
3088
2697
|
|
|
@@ -3094,12 +2703,12 @@ const [SelectItemProvider, useSelectItemContext] = createContext({
|
|
|
3094
2703
|
const SelectItem = props => {
|
|
3095
2704
|
const [itemProps, localProps] = createSplitProps()(props, ['item']);
|
|
3096
2705
|
const api = useSelectContext();
|
|
3097
|
-
const mergedProps = mergeProps$
|
|
2706
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
3098
2707
|
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
3099
2708
|
return createComponent(SelectItemProvider, {
|
|
3100
2709
|
value: itemProps,
|
|
3101
2710
|
get children() {
|
|
3102
|
-
return createComponent(ark.div, mergeProps
|
|
2711
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
3103
2712
|
get children() {
|
|
3104
2713
|
return getChildren();
|
|
3105
2714
|
}
|
|
@@ -3111,14 +2720,14 @@ const SelectItem = props => {
|
|
|
3111
2720
|
const SelectItemGroup = props => {
|
|
3112
2721
|
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
3113
2722
|
const api = useSelectContext();
|
|
3114
|
-
const mergedProps = mergeProps$
|
|
2723
|
+
const mergedProps = mergeProps$1(() => api().getItemGroupProps(itemGroupProps), localProps);
|
|
3115
2724
|
return createComponent(ark.div, mergedProps);
|
|
3116
2725
|
};
|
|
3117
2726
|
|
|
3118
2727
|
const SelectItemGroupLabel = props => {
|
|
3119
2728
|
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
3120
2729
|
const api = useSelectContext();
|
|
3121
|
-
const mergedProps = mergeProps$
|
|
2730
|
+
const mergedProps = mergeProps$1(() => api().getItemGroupLabelProps({
|
|
3122
2731
|
htmlFor: labelProps.for
|
|
3123
2732
|
}), localProps);
|
|
3124
2733
|
return createComponent(ark.div, mergedProps);
|
|
@@ -3127,27 +2736,27 @@ const SelectItemGroupLabel = props => {
|
|
|
3127
2736
|
const SelectItemIndicator = props => {
|
|
3128
2737
|
const api = useSelectContext();
|
|
3129
2738
|
const itemProps = useSelectItemContext();
|
|
3130
|
-
const mergedProps = mergeProps$
|
|
2739
|
+
const mergedProps = mergeProps$1(() => api().getItemIndicatorProps(itemProps), props);
|
|
3131
2740
|
return createComponent(ark.div, mergedProps);
|
|
3132
2741
|
};
|
|
3133
2742
|
|
|
3134
2743
|
const SelectItemText = props => {
|
|
3135
2744
|
const api = useSelectContext();
|
|
3136
2745
|
const itemProps = useSelectItemContext();
|
|
3137
|
-
const mergedProps = mergeProps$
|
|
2746
|
+
const mergedProps = mergeProps$1(() => api().getItemTextProps(itemProps), props);
|
|
3138
2747
|
return createComponent(ark.span, mergedProps);
|
|
3139
2748
|
};
|
|
3140
2749
|
|
|
3141
2750
|
const SelectLabel = props => {
|
|
3142
2751
|
const api = useSelectContext();
|
|
3143
|
-
const mergedProps = mergeProps$
|
|
2752
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
3144
2753
|
return createComponent(ark.label, mergedProps);
|
|
3145
2754
|
};
|
|
3146
2755
|
|
|
3147
2756
|
const SelectPositioner = props => {
|
|
3148
2757
|
const api = useSelectContext();
|
|
3149
2758
|
const presenceApi = usePresenceContext();
|
|
3150
|
-
const mergedProps = mergeProps$
|
|
2759
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
3151
2760
|
return createComponent(Show, {
|
|
3152
2761
|
get when() {
|
|
3153
2762
|
return !presenceApi().isUnmounted;
|
|
@@ -3158,24 +2767,65 @@ const SelectPositioner = props => {
|
|
|
3158
2767
|
});
|
|
3159
2768
|
};
|
|
3160
2769
|
|
|
2770
|
+
const useSelect = props => {
|
|
2771
|
+
const [collectionOptions, rest] = createSplitProps()(props, ['isItemDisabled', 'itemToValue', 'itemToString', 'items']);
|
|
2772
|
+
const collection = () => select.collection(collectionOptions);
|
|
2773
|
+
const getRootNode = useEnvironmentContext();
|
|
2774
|
+
const context = () => mergeProps$1({
|
|
2775
|
+
id: createUniqueId(),
|
|
2776
|
+
getRootNode,
|
|
2777
|
+
collection: collection()
|
|
2778
|
+
}, rest);
|
|
2779
|
+
const [state, send] = useMachine(select.machine(context()), {
|
|
2780
|
+
context
|
|
2781
|
+
});
|
|
2782
|
+
return createMemo(() => select.connect(state, send, normalizeProps));
|
|
2783
|
+
};
|
|
2784
|
+
|
|
2785
|
+
const SelectRoot = props => {
|
|
2786
|
+
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
2787
|
+
const [useSelectProps, localProps] = createSplitProps()(selectProps, ['closeOnSelect', 'dir', 'disabled', 'form', 'getRootNode', 'highlightedValue', 'id', 'ids', 'invalid', 'isItemDisabled', 'items', 'itemToString', 'itemToValue', 'loop', 'multiple', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'open', 'positioning', 'readOnly', 'selectOnBlur', 'value']);
|
|
2788
|
+
const api = useSelect(useSelectProps);
|
|
2789
|
+
const presenceApi = usePresence(mergeProps$1(() => ({
|
|
2790
|
+
present: api().isOpen
|
|
2791
|
+
}), presenceProps));
|
|
2792
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
2793
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2794
|
+
return createComponent(SelectProvider, {
|
|
2795
|
+
value: api,
|
|
2796
|
+
get children() {
|
|
2797
|
+
return createComponent(PresenceProvider, {
|
|
2798
|
+
value: presenceApi,
|
|
2799
|
+
get children() {
|
|
2800
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
2801
|
+
get children() {
|
|
2802
|
+
return getChildren();
|
|
2803
|
+
}
|
|
2804
|
+
}));
|
|
2805
|
+
}
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2808
|
+
});
|
|
2809
|
+
};
|
|
2810
|
+
|
|
3161
2811
|
const SelectTrigger = props => {
|
|
3162
2812
|
const api = useSelectContext();
|
|
3163
|
-
const mergedProps = mergeProps$
|
|
2813
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, props);
|
|
3164
2814
|
return createComponent(ark.button, mergedProps);
|
|
3165
2815
|
};
|
|
3166
2816
|
|
|
3167
2817
|
const SelectValueText = props => {
|
|
3168
2818
|
const api = useSelectContext();
|
|
3169
|
-
const mergedProps = mergeProps$
|
|
3170
|
-
return createComponent(ark.span, mergeProps
|
|
2819
|
+
const mergedProps = mergeProps$1(() => selectAnatomy.build().valueText.attrs, props);
|
|
2820
|
+
return createComponent(ark.span, mergeProps(mergedProps, {
|
|
3171
2821
|
get children() {
|
|
3172
2822
|
return api().valueAsString || props.placeholder;
|
|
3173
2823
|
}
|
|
3174
2824
|
}));
|
|
3175
2825
|
};
|
|
3176
2826
|
|
|
3177
|
-
const Select =
|
|
3178
|
-
Root:
|
|
2827
|
+
const Select = {
|
|
2828
|
+
Root: SelectRoot,
|
|
3179
2829
|
ClearTrigger: SelectClearTrigger,
|
|
3180
2830
|
Content: SelectContent,
|
|
3181
2831
|
Control: SelectControl,
|
|
@@ -3189,99 +2839,99 @@ const Select = Object.assign(Select$1, {
|
|
|
3189
2839
|
Positioner: SelectPositioner,
|
|
3190
2840
|
Trigger: SelectTrigger,
|
|
3191
2841
|
ValueText: SelectValueText
|
|
3192
|
-
}
|
|
2842
|
+
};
|
|
3193
2843
|
|
|
3194
2844
|
const [SliderProvider, useSliderContext] = createContext({
|
|
3195
2845
|
hookName: 'useSliderContext',
|
|
3196
2846
|
providerName: '<SliderProvider />'
|
|
3197
2847
|
});
|
|
3198
2848
|
|
|
3199
|
-
const useSlider = props => {
|
|
3200
|
-
const getRootNode = useEnvironmentContext();
|
|
3201
|
-
const context = mergeProps$2({
|
|
3202
|
-
id: createUniqueId(),
|
|
3203
|
-
getRootNode
|
|
3204
|
-
}, props);
|
|
3205
|
-
const [state, send] = useMachine(slider.machine(context), {
|
|
3206
|
-
context
|
|
3207
|
-
});
|
|
3208
|
-
return createMemo(() => slider.connect(state, send, normalizeProps));
|
|
3209
|
-
};
|
|
3210
|
-
|
|
3211
|
-
const Slider$1 = props => {
|
|
3212
|
-
const [sliderParams, restProps] = createSplitProps()(props, ['aria-label', 'aria-labelledby', 'dir', 'disabled', 'form', 'getAriaValueText', 'getRootNode', 'id', 'ids', 'invalid', 'max', 'min', 'minStepsBetweenThumbs', 'name', 'onFocusChange', 'onValueChange', 'onValueChangeEnd', 'orientation', 'origin', 'readOnly', 'step', 'thumbAlignment', 'thumbAlignment', 'thumbSize', 'value']);
|
|
3213
|
-
const api = useSlider(sliderParams);
|
|
3214
|
-
const mergedProps = mergeProps$2(() => api().rootProps, restProps);
|
|
3215
|
-
const getChildren = () => runIfFn(restProps.children, api);
|
|
3216
|
-
return createComponent(SliderProvider, {
|
|
3217
|
-
value: api,
|
|
3218
|
-
get children() {
|
|
3219
|
-
return createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
3220
|
-
get children() {
|
|
3221
|
-
return getChildren();
|
|
3222
|
-
}
|
|
3223
|
-
}));
|
|
3224
|
-
}
|
|
3225
|
-
});
|
|
3226
|
-
};
|
|
3227
|
-
|
|
3228
2849
|
const SliderControl = props => {
|
|
3229
2850
|
const api = useSliderContext();
|
|
3230
|
-
const mergedProps = mergeProps$
|
|
2851
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
3231
2852
|
return createComponent(ark.div, mergedProps);
|
|
3232
2853
|
};
|
|
3233
2854
|
|
|
3234
2855
|
const SliderLabel = props => {
|
|
3235
2856
|
const api = useSliderContext();
|
|
3236
|
-
const mergedProps = mergeProps$
|
|
2857
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
3237
2858
|
return createComponent(ark.label, mergedProps);
|
|
3238
2859
|
};
|
|
3239
2860
|
|
|
3240
2861
|
const SliderMarker = props => {
|
|
3241
2862
|
const [markerProps, localProps] = createSplitProps()(props, ['value']);
|
|
3242
2863
|
const api = useSliderContext();
|
|
3243
|
-
const mergedProps = mergeProps$
|
|
2864
|
+
const mergedProps = mergeProps$1(() => api().getMarkerProps(markerProps), localProps);
|
|
3244
2865
|
return createComponent(ark.span, mergedProps);
|
|
3245
2866
|
};
|
|
3246
2867
|
|
|
3247
2868
|
const SliderMarkerGroup = props => {
|
|
3248
2869
|
const api = useSliderContext();
|
|
3249
|
-
const mergedProps = mergeProps$
|
|
2870
|
+
const mergedProps = mergeProps$1(() => api().markerGroupProps, props);
|
|
3250
2871
|
return createComponent(ark.div, mergedProps);
|
|
3251
2872
|
};
|
|
3252
2873
|
|
|
3253
2874
|
const SliderRange = props => {
|
|
3254
2875
|
const api = useSliderContext();
|
|
3255
|
-
const mergedProps = mergeProps$
|
|
2876
|
+
const mergedProps = mergeProps$1(() => api().rangeProps, props);
|
|
3256
2877
|
return createComponent(ark.div, mergedProps);
|
|
3257
2878
|
};
|
|
3258
2879
|
|
|
2880
|
+
const useSlider = props => {
|
|
2881
|
+
const getRootNode = useEnvironmentContext();
|
|
2882
|
+
const context = mergeProps$1({
|
|
2883
|
+
id: createUniqueId(),
|
|
2884
|
+
getRootNode
|
|
2885
|
+
}, props);
|
|
2886
|
+
const [state, send] = useMachine(slider.machine(context), {
|
|
2887
|
+
context
|
|
2888
|
+
});
|
|
2889
|
+
return createMemo(() => slider.connect(state, send, normalizeProps));
|
|
2890
|
+
};
|
|
2891
|
+
|
|
2892
|
+
const SliderRoot = props => {
|
|
2893
|
+
const [sliderParams, restProps] = createSplitProps()(props, ['aria-label', 'aria-labelledby', 'dir', 'disabled', 'form', 'getAriaValueText', 'getRootNode', 'id', 'ids', 'invalid', 'max', 'min', 'minStepsBetweenThumbs', 'name', 'onFocusChange', 'onValueChange', 'onValueChangeEnd', 'orientation', 'origin', 'readOnly', 'step', 'thumbAlignment', 'thumbAlignment', 'thumbSize', 'value']);
|
|
2894
|
+
const api = useSlider(sliderParams);
|
|
2895
|
+
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
2896
|
+
const getChildren = () => runIfFn(restProps.children, api);
|
|
2897
|
+
return createComponent(SliderProvider, {
|
|
2898
|
+
value: api,
|
|
2899
|
+
get children() {
|
|
2900
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
2901
|
+
get children() {
|
|
2902
|
+
return getChildren();
|
|
2903
|
+
}
|
|
2904
|
+
}));
|
|
2905
|
+
}
|
|
2906
|
+
});
|
|
2907
|
+
};
|
|
2908
|
+
|
|
3259
2909
|
const SliderThumb = props => {
|
|
3260
2910
|
const [thumbProps, localProps] = createSplitProps()(props, ['index']);
|
|
3261
2911
|
const api = useSliderContext();
|
|
3262
|
-
const mergedProps = mergeProps$
|
|
2912
|
+
const mergedProps = mergeProps$1(() => api().getThumbProps(thumbProps), localProps);
|
|
3263
2913
|
return createComponent(ark.div, mergedProps);
|
|
3264
2914
|
};
|
|
3265
2915
|
|
|
3266
2916
|
const SliderTrack = props => {
|
|
3267
2917
|
const api = useSliderContext();
|
|
3268
|
-
const mergedProps = mergeProps$
|
|
2918
|
+
const mergedProps = mergeProps$1(() => api().trackProps, props);
|
|
3269
2919
|
return createComponent(ark.div, mergedProps);
|
|
3270
2920
|
};
|
|
3271
2921
|
|
|
3272
2922
|
const SliderValueText = props => {
|
|
3273
2923
|
const api = useSliderContext();
|
|
3274
|
-
const mergedProps = mergeProps$
|
|
2924
|
+
const mergedProps = mergeProps$1(() => api().valueTextProps, props);
|
|
3275
2925
|
const getChildren = children(() => props.children);
|
|
3276
|
-
return createComponent(ark.div, mergeProps
|
|
2926
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
3277
2927
|
get children() {
|
|
3278
2928
|
return getChildren() || api().value.join(',');
|
|
3279
2929
|
}
|
|
3280
2930
|
}));
|
|
3281
2931
|
};
|
|
3282
2932
|
|
|
3283
|
-
const Slider =
|
|
3284
|
-
Root:
|
|
2933
|
+
const Slider = {
|
|
2934
|
+
Root: SliderRoot,
|
|
3285
2935
|
Control: SliderControl,
|
|
3286
2936
|
Label: SliderLabel,
|
|
3287
2937
|
Marker: SliderMarker,
|
|
@@ -3290,16 +2940,30 @@ const Slider = Object.assign(Slider$1, {
|
|
|
3290
2940
|
Thumb: SliderThumb,
|
|
3291
2941
|
Track: SliderTrack,
|
|
3292
2942
|
ValueText: SliderValueText
|
|
3293
|
-
}
|
|
2943
|
+
};
|
|
3294
2944
|
|
|
3295
2945
|
const [SplitterProvider, useSplitterContext] = createContext({
|
|
3296
2946
|
hookName: 'useSplitterContext',
|
|
3297
2947
|
providerName: '<SplitterProvider />'
|
|
3298
2948
|
});
|
|
3299
2949
|
|
|
2950
|
+
const SplitterPanel = props => {
|
|
2951
|
+
const [panelParams, restProps] = createSplitProps()(props, ['id', 'snapSize']);
|
|
2952
|
+
const api = useSplitterContext();
|
|
2953
|
+
const mergedProps = mergeProps$1(() => api().getPanelProps(panelParams), restProps);
|
|
2954
|
+
return createComponent(ark.div, mergedProps);
|
|
2955
|
+
};
|
|
2956
|
+
|
|
2957
|
+
const SplitterResizeTrigger = props => {
|
|
2958
|
+
const api = useSplitterContext();
|
|
2959
|
+
const [triggerParams, restProps] = createSplitProps()(props, ['disabled', 'id', 'step']);
|
|
2960
|
+
const mergedProps = mergeProps$1(() => api().getResizeTriggerProps(triggerParams), restProps);
|
|
2961
|
+
return createComponent(ark.button, mergedProps);
|
|
2962
|
+
};
|
|
2963
|
+
|
|
3300
2964
|
const useSplitter = props => {
|
|
3301
2965
|
const getRootNode = useEnvironmentContext();
|
|
3302
|
-
const context = mergeProps$
|
|
2966
|
+
const context = mergeProps$1({
|
|
3303
2967
|
id: createUniqueId(),
|
|
3304
2968
|
getRootNode
|
|
3305
2969
|
}, props);
|
|
@@ -3309,15 +2973,15 @@ const useSplitter = props => {
|
|
|
3309
2973
|
return createMemo(() => splitter.connect(state, send, normalizeProps));
|
|
3310
2974
|
};
|
|
3311
2975
|
|
|
3312
|
-
const
|
|
2976
|
+
const SplitterRoot = props => {
|
|
3313
2977
|
const [splitterParams, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'onSizeChangeStart', 'orientation', 'size']);
|
|
3314
2978
|
const api = useSplitter(splitterParams);
|
|
3315
2979
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
3316
|
-
const mergedProps = mergeProps$
|
|
2980
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3317
2981
|
return createComponent(SplitterProvider, {
|
|
3318
2982
|
value: api,
|
|
3319
2983
|
get children() {
|
|
3320
|
-
return createComponent(ark.div, mergeProps
|
|
2984
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
3321
2985
|
get children() {
|
|
3322
2986
|
return getChildren();
|
|
3323
2987
|
}
|
|
@@ -3326,34 +2990,37 @@ const Splitter$1 = props => {
|
|
|
3326
2990
|
});
|
|
3327
2991
|
};
|
|
3328
2992
|
|
|
3329
|
-
const
|
|
3330
|
-
|
|
3331
|
-
const api = useSplitterContext();
|
|
3332
|
-
const mergedProps = mergeProps$2(() => api().getPanelProps(panelParams), restProps);
|
|
3333
|
-
return createComponent(ark.div, mergedProps);
|
|
3334
|
-
};
|
|
3335
|
-
|
|
3336
|
-
const SplitterResizeTrigger = props => {
|
|
3337
|
-
const api = useSplitterContext();
|
|
3338
|
-
const [triggerParams, restProps] = createSplitProps()(props, ['disabled', 'id', 'step']);
|
|
3339
|
-
const mergedProps = mergeProps$2(() => api().getResizeTriggerProps(triggerParams), restProps);
|
|
3340
|
-
return createComponent(ark.button, mergedProps);
|
|
3341
|
-
};
|
|
3342
|
-
|
|
3343
|
-
const Splitter = Object.assign(Splitter$1, {
|
|
3344
|
-
Root: Splitter$1,
|
|
2993
|
+
const Splitter = {
|
|
2994
|
+
Root: SplitterRoot,
|
|
3345
2995
|
Panel: SplitterPanel,
|
|
3346
2996
|
ResizeTrigger: SplitterResizeTrigger
|
|
3347
|
-
}
|
|
2997
|
+
};
|
|
3348
2998
|
|
|
3349
2999
|
const [SwitchProvider, useSwitchContext] = createContext({
|
|
3350
3000
|
hookName: 'useSwitchContext',
|
|
3351
3001
|
providerName: '<SwitchProvider />'
|
|
3352
3002
|
});
|
|
3353
3003
|
|
|
3004
|
+
const _tmpl$$1 = /*#__PURE__*/template(`<input>`);
|
|
3005
|
+
const SwitchControl = props => {
|
|
3006
|
+
const api = useSwitchContext();
|
|
3007
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
3008
|
+
return [createComponent(ark.span, mergedProps), (() => {
|
|
3009
|
+
const _el$ = _tmpl$$1();
|
|
3010
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
3011
|
+
return _el$;
|
|
3012
|
+
})()];
|
|
3013
|
+
};
|
|
3014
|
+
|
|
3015
|
+
const SwitchLabel = props => {
|
|
3016
|
+
const api = useSwitchContext();
|
|
3017
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
3018
|
+
return createComponent(ark.span, mergedProps);
|
|
3019
|
+
};
|
|
3020
|
+
|
|
3354
3021
|
const useSwitch = props => {
|
|
3355
3022
|
const getRootNode = useEnvironmentContext();
|
|
3356
|
-
const context = mergeProps$
|
|
3023
|
+
const context = mergeProps$1({
|
|
3357
3024
|
id: createUniqueId(),
|
|
3358
3025
|
getRootNode
|
|
3359
3026
|
}, props);
|
|
@@ -3363,15 +3030,15 @@ const useSwitch = props => {
|
|
|
3363
3030
|
return createMemo(() => zagSwitch.connect(state, send, normalizeProps));
|
|
3364
3031
|
};
|
|
3365
3032
|
|
|
3366
|
-
const
|
|
3033
|
+
const SwitchRoot = props => {
|
|
3367
3034
|
const [switchProps, localProps] = createSplitProps()(props, ['checked', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'label', 'name', 'onCheckedChange', 'required', 'value']);
|
|
3368
3035
|
const api = useSwitch(switchProps);
|
|
3369
|
-
const mergedProps = mergeProps$
|
|
3036
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3370
3037
|
const getChildren = () => runIfFn(props.children, api);
|
|
3371
3038
|
return createComponent(SwitchProvider, {
|
|
3372
3039
|
value: api,
|
|
3373
3040
|
get children() {
|
|
3374
|
-
return createComponent(ark.label, mergeProps
|
|
3041
|
+
return createComponent(ark.label, mergeProps(mergedProps, {
|
|
3375
3042
|
get children() {
|
|
3376
3043
|
return getChildren();
|
|
3377
3044
|
}
|
|
@@ -3380,35 +3047,18 @@ const Switch$1 = props => {
|
|
|
3380
3047
|
});
|
|
3381
3048
|
};
|
|
3382
3049
|
|
|
3383
|
-
const _tmpl$$1 = /*#__PURE__*/template(`<input>`);
|
|
3384
|
-
const SwitchControl = props => {
|
|
3385
|
-
const api = useSwitchContext();
|
|
3386
|
-
const mergedProps = mergeProps$2(() => api().controlProps, props);
|
|
3387
|
-
return [createComponent(ark.span, mergedProps), (() => {
|
|
3388
|
-
const _el$ = _tmpl$$1();
|
|
3389
|
-
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
3390
|
-
return _el$;
|
|
3391
|
-
})()];
|
|
3392
|
-
};
|
|
3393
|
-
|
|
3394
|
-
const SwitchLabel = props => {
|
|
3395
|
-
const api = useSwitchContext();
|
|
3396
|
-
const mergedProps = mergeProps$2(() => api().labelProps, props);
|
|
3397
|
-
return createComponent(ark.span, mergedProps);
|
|
3398
|
-
};
|
|
3399
|
-
|
|
3400
3050
|
const SwitchThumb = props => {
|
|
3401
3051
|
const api = useSwitchContext();
|
|
3402
|
-
const mergedProps = mergeProps$
|
|
3052
|
+
const mergedProps = mergeProps$1(() => api().thumbProps, props);
|
|
3403
3053
|
return createComponent(ark.span, mergedProps);
|
|
3404
3054
|
};
|
|
3405
3055
|
|
|
3406
|
-
const Switch =
|
|
3407
|
-
Root:
|
|
3056
|
+
const Switch = {
|
|
3057
|
+
Root: SwitchRoot,
|
|
3408
3058
|
Control: SwitchControl,
|
|
3409
3059
|
Label: SwitchLabel,
|
|
3410
3060
|
Thumb: SwitchThumb
|
|
3411
|
-
}
|
|
3061
|
+
};
|
|
3412
3062
|
|
|
3413
3063
|
const [TabsProvider, useTabsContext] = createContext({
|
|
3414
3064
|
hookName: 'useTabsContext',
|
|
@@ -3419,10 +3069,10 @@ const TabContent = props => {
|
|
|
3419
3069
|
const [contentProps, localProps] = createSplitProps()(props, ['value']);
|
|
3420
3070
|
const api = useTabsContext();
|
|
3421
3071
|
const presenceProps = usePresencePropsContext();
|
|
3422
|
-
const presenceApi = usePresence(mergeProps$
|
|
3072
|
+
const presenceApi = usePresence(mergeProps$1(presenceProps, () => ({
|
|
3423
3073
|
present: api().value === contentProps.value
|
|
3424
3074
|
})));
|
|
3425
|
-
const mergedProps = mergeProps$
|
|
3075
|
+
const mergedProps = mergeProps$1(() => api().getContentProps(contentProps), () => presenceApi().presenceProps, localProps);
|
|
3426
3076
|
return createComponent(PresenceProvider, {
|
|
3427
3077
|
value: presenceApi,
|
|
3428
3078
|
get children() {
|
|
@@ -3440,26 +3090,26 @@ const TabContent = props => {
|
|
|
3440
3090
|
|
|
3441
3091
|
const TabIndicator = props => {
|
|
3442
3092
|
const api = useTabsContext();
|
|
3443
|
-
const mergedProps = mergeProps$
|
|
3093
|
+
const mergedProps = mergeProps$1(() => api().indicatorProps, props);
|
|
3444
3094
|
return createComponent(ark.div, mergedProps);
|
|
3445
3095
|
};
|
|
3446
3096
|
|
|
3447
3097
|
const TabList = props => {
|
|
3448
3098
|
const api = useTabsContext();
|
|
3449
|
-
const mergedProps = mergeProps$
|
|
3099
|
+
const mergedProps = mergeProps$1(() => api().tablistProps, props);
|
|
3450
3100
|
return createComponent(ark.div, mergedProps);
|
|
3451
3101
|
};
|
|
3452
3102
|
|
|
3453
3103
|
const TabTrigger = props => {
|
|
3454
3104
|
const [tabParams, restProps] = createSplitProps()(props, ['disabled', 'value']);
|
|
3455
3105
|
const api = useTabsContext();
|
|
3456
|
-
const mergedProps = mergeProps$
|
|
3106
|
+
const mergedProps = mergeProps$1(() => api().getTriggerProps(tabParams), restProps);
|
|
3457
3107
|
return createComponent(ark.button, mergedProps);
|
|
3458
3108
|
};
|
|
3459
3109
|
|
|
3460
3110
|
const useTabs = props => {
|
|
3461
3111
|
const getRootNode = useEnvironmentContext();
|
|
3462
|
-
const context = mergeProps$
|
|
3112
|
+
const context = mergeProps$1({
|
|
3463
3113
|
id: createUniqueId(),
|
|
3464
3114
|
getRootNode
|
|
3465
3115
|
}, props);
|
|
@@ -3469,11 +3119,11 @@ const useTabs = props => {
|
|
|
3469
3119
|
return createMemo(() => tabs.connect(state, send, normalizeProps));
|
|
3470
3120
|
};
|
|
3471
3121
|
|
|
3472
|
-
const
|
|
3122
|
+
const TabsRoot = props => {
|
|
3473
3123
|
const [presenceProps, tabsProps] = splitPresenceProps(props);
|
|
3474
3124
|
const [tabsParams, restProps] = createSplitProps()(tabsProps, ['activationMode', 'dir', 'getRootNode', 'id', 'ids', 'loop', 'onFocusChange', 'onValueChange', 'orientation', 'translations', 'value']);
|
|
3475
3125
|
const api = useTabs(tabsParams);
|
|
3476
|
-
const mergedProps = mergeProps$
|
|
3126
|
+
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3477
3127
|
return createComponent(TabsProvider, {
|
|
3478
3128
|
value: api,
|
|
3479
3129
|
get children() {
|
|
@@ -3487,68 +3137,34 @@ const Tabs$1 = props => {
|
|
|
3487
3137
|
});
|
|
3488
3138
|
};
|
|
3489
3139
|
|
|
3490
|
-
const Tabs =
|
|
3491
|
-
Root:
|
|
3140
|
+
const Tabs = {
|
|
3141
|
+
Root: TabsRoot,
|
|
3492
3142
|
Content: TabContent,
|
|
3493
3143
|
Indicator: TabIndicator,
|
|
3494
3144
|
List: TabList,
|
|
3495
3145
|
Trigger: TabTrigger
|
|
3496
|
-
}
|
|
3146
|
+
};
|
|
3497
3147
|
|
|
3498
3148
|
const [TagsInputProvider, useTagsInputContext] = createContext({
|
|
3499
3149
|
hookName: 'useTagsInputContext',
|
|
3500
3150
|
providerName: '<TagsInputProvider />'
|
|
3501
3151
|
});
|
|
3502
3152
|
|
|
3503
|
-
const useTagsInput = props => {
|
|
3504
|
-
const getRootNode = useEnvironmentContext();
|
|
3505
|
-
const context = mergeProps$2({
|
|
3506
|
-
id: createUniqueId(),
|
|
3507
|
-
getRootNode
|
|
3508
|
-
}, props);
|
|
3509
|
-
const [state, send] = useMachine(tagsInput.machine(context), {
|
|
3510
|
-
context
|
|
3511
|
-
});
|
|
3512
|
-
return createMemo(() => tagsInput.connect(state, send, normalizeProps));
|
|
3513
|
-
};
|
|
3514
|
-
|
|
3515
|
-
const _tmpl$ = /*#__PURE__*/template(`<input>`);
|
|
3516
|
-
const TagsInput$1 = props => {
|
|
3517
|
-
const [tagsInputParams, restProps] = createSplitProps()(props, ['addOnPaste', 'allowEditTag', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3518
|
-
const api = useTagsInput(tagsInputParams);
|
|
3519
|
-
const mergedProps = mergeProps$2(() => api().rootProps, restProps);
|
|
3520
|
-
const getChildren = () => runIfFn(restProps.children, api);
|
|
3521
|
-
return createComponent(TagsInputProvider, {
|
|
3522
|
-
value: api,
|
|
3523
|
-
get children() {
|
|
3524
|
-
return [createComponent(ark.div, mergeProps$1(mergedProps, {
|
|
3525
|
-
get children() {
|
|
3526
|
-
return getChildren();
|
|
3527
|
-
}
|
|
3528
|
-
})), (() => {
|
|
3529
|
-
const _el$ = _tmpl$();
|
|
3530
|
-
spread$1(_el$, mergeProps$1(() => api().hiddenInputProps), false, false);
|
|
3531
|
-
return _el$;
|
|
3532
|
-
})()];
|
|
3533
|
-
}
|
|
3534
|
-
});
|
|
3535
|
-
};
|
|
3536
|
-
|
|
3537
3153
|
const TagsInputClearTrigger = props => {
|
|
3538
3154
|
const api = useTagsInputContext();
|
|
3539
|
-
const mergedProps = mergeProps$
|
|
3155
|
+
const mergedProps = mergeProps$1(() => api().clearTriggerProps, props);
|
|
3540
3156
|
return createComponent(ark.button, mergedProps);
|
|
3541
3157
|
};
|
|
3542
3158
|
|
|
3543
3159
|
const TagsInputControl = props => {
|
|
3544
3160
|
const api = useTagsInputContext();
|
|
3545
|
-
const mergedProps = mergeProps$
|
|
3161
|
+
const mergedProps = mergeProps$1(() => api().controlProps, props);
|
|
3546
3162
|
return createComponent(ark.div, mergedProps);
|
|
3547
3163
|
};
|
|
3548
3164
|
|
|
3549
3165
|
const TagsInputInput = props => {
|
|
3550
3166
|
const api = useTagsInputContext();
|
|
3551
|
-
const mergedProps = mergeProps$
|
|
3167
|
+
const mergedProps = mergeProps$1(() => api().inputProps, props);
|
|
3552
3168
|
return createComponent(ark.input, mergedProps);
|
|
3553
3169
|
};
|
|
3554
3170
|
|
|
@@ -3560,12 +3176,12 @@ const [TagsInputItemProvider, useTagsInputItemContext] = createContext({
|
|
|
3560
3176
|
const TagsInputItem = props => {
|
|
3561
3177
|
const [itemProps, localProps] = createSplitProps()(props, ['disabled', 'index', 'value']);
|
|
3562
3178
|
const api = useTagsInputContext();
|
|
3563
|
-
const mergedProps = mergeProps$
|
|
3179
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
3564
3180
|
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
3565
3181
|
return createComponent(TagsInputItemProvider, {
|
|
3566
3182
|
value: itemProps,
|
|
3567
3183
|
get children() {
|
|
3568
|
-
return createComponent(ark.div, mergeProps
|
|
3184
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
3569
3185
|
get children() {
|
|
3570
3186
|
return getChildren();
|
|
3571
3187
|
}
|
|
@@ -3577,41 +3193,83 @@ const TagsInputItem = props => {
|
|
|
3577
3193
|
const TagsInputItemDeleteTrigger = props => {
|
|
3578
3194
|
const api = useTagsInputContext();
|
|
3579
3195
|
const itemProps = useTagsInputItemContext();
|
|
3580
|
-
const mergedProps = mergeProps$
|
|
3196
|
+
const mergedProps = mergeProps$1(() => api().getItemDeleteTriggerProps(itemProps), props);
|
|
3581
3197
|
return createComponent(ark.button, mergedProps);
|
|
3582
3198
|
};
|
|
3583
3199
|
|
|
3584
3200
|
const TagsInputItemInput = props => {
|
|
3585
3201
|
const api = useTagsInputContext();
|
|
3586
3202
|
const itemProps = useTagsInputItemContext();
|
|
3587
|
-
const mergedProps = mergeProps$
|
|
3203
|
+
const mergedProps = mergeProps$1(() => api().getItemInputProps(itemProps), props);
|
|
3588
3204
|
return createComponent(ark.input, mergedProps);
|
|
3589
3205
|
};
|
|
3590
3206
|
|
|
3207
|
+
const TagsInputItemPreview = props => {
|
|
3208
|
+
const api = useTagsInputContext();
|
|
3209
|
+
const itemProps = useTagsInputItemContext();
|
|
3210
|
+
const mergedProps = mergeProps$1(() => api().getItemPreviewProps(itemProps), props);
|
|
3211
|
+
return createComponent(ark.div, mergedProps);
|
|
3212
|
+
};
|
|
3213
|
+
|
|
3591
3214
|
const TagsInputItemText = props => {
|
|
3592
3215
|
const api = useTagsInputContext();
|
|
3593
3216
|
const itemProps = useTagsInputItemContext();
|
|
3594
|
-
const mergedProps = mergeProps$
|
|
3217
|
+
const mergedProps = mergeProps$1(() => api().getItemTextProps(itemProps), props);
|
|
3595
3218
|
return createComponent(ark.span, mergedProps);
|
|
3596
3219
|
};
|
|
3597
3220
|
|
|
3598
3221
|
const TagsInputLabel = props => {
|
|
3599
3222
|
const api = useTagsInputContext();
|
|
3600
|
-
const mergedProps = mergeProps$
|
|
3223
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
3601
3224
|
return createComponent(ark.label, mergedProps);
|
|
3602
3225
|
};
|
|
3603
3226
|
|
|
3604
|
-
const
|
|
3605
|
-
|
|
3227
|
+
const useTagsInput = props => {
|
|
3228
|
+
const getRootNode = useEnvironmentContext();
|
|
3229
|
+
const context = mergeProps$1({
|
|
3230
|
+
id: createUniqueId(),
|
|
3231
|
+
getRootNode
|
|
3232
|
+
}, props);
|
|
3233
|
+
const [state, send] = useMachine(tagsInput.machine(context), {
|
|
3234
|
+
context
|
|
3235
|
+
});
|
|
3236
|
+
return createMemo(() => tagsInput.connect(state, send, normalizeProps));
|
|
3237
|
+
};
|
|
3238
|
+
|
|
3239
|
+
const _tmpl$ = /*#__PURE__*/template(`<input>`);
|
|
3240
|
+
const TagsInputRoot = props => {
|
|
3241
|
+
const [tagsInputParams, restProps] = createSplitProps()(props, ['addOnPaste', 'allowEditTag', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3242
|
+
const api = useTagsInput(tagsInputParams);
|
|
3243
|
+
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3244
|
+
const getChildren = () => runIfFn(restProps.children, api);
|
|
3245
|
+
return createComponent(TagsInputProvider, {
|
|
3246
|
+
value: api,
|
|
3247
|
+
get children() {
|
|
3248
|
+
return [createComponent(ark.div, mergeProps(mergedProps, {
|
|
3249
|
+
get children() {
|
|
3250
|
+
return getChildren();
|
|
3251
|
+
}
|
|
3252
|
+
})), (() => {
|
|
3253
|
+
const _el$ = _tmpl$();
|
|
3254
|
+
spread(_el$, mergeProps(() => api().hiddenInputProps), false, false);
|
|
3255
|
+
return _el$;
|
|
3256
|
+
})()];
|
|
3257
|
+
}
|
|
3258
|
+
});
|
|
3259
|
+
};
|
|
3260
|
+
|
|
3261
|
+
const TagsInput = {
|
|
3262
|
+
Root: TagsInputRoot,
|
|
3606
3263
|
ClearTrigger: TagsInputClearTrigger,
|
|
3607
3264
|
Control: TagsInputControl,
|
|
3608
3265
|
Input: TagsInputInput,
|
|
3609
3266
|
Item: TagsInputItem,
|
|
3267
|
+
ItemPreview: TagsInputItemPreview,
|
|
3610
3268
|
ItemDeleteTrigger: TagsInputItemDeleteTrigger,
|
|
3611
3269
|
ItemInput: TagsInputItemInput,
|
|
3612
3270
|
ItemText: TagsInputItemText,
|
|
3613
3271
|
Label: TagsInputLabel
|
|
3614
|
-
}
|
|
3272
|
+
};
|
|
3615
3273
|
|
|
3616
3274
|
const [ToastProvider, useToastContext] = createContext({
|
|
3617
3275
|
hookName: 'useToastContext',
|
|
@@ -3637,10 +3295,10 @@ const createToaster = props => {
|
|
|
3637
3295
|
});
|
|
3638
3296
|
onCleanup(() => service.stop());
|
|
3639
3297
|
});
|
|
3640
|
-
const mergedProps = mergeProps$
|
|
3298
|
+
const mergedProps = mergeProps$1(() => api().getGroupProps({
|
|
3641
3299
|
placement: props.placement
|
|
3642
3300
|
}), toasterProps);
|
|
3643
|
-
return createComponent(ToastGroup, mergeProps
|
|
3301
|
+
return createComponent(ToastGroup, mergeProps(mergedProps, {
|
|
3644
3302
|
get children() {
|
|
3645
3303
|
return createComponent(Index, {
|
|
3646
3304
|
get each() {
|
|
@@ -3668,46 +3326,53 @@ const ToastProviderFactory = props => {
|
|
|
3668
3326
|
});
|
|
3669
3327
|
};
|
|
3670
3328
|
|
|
3671
|
-
const Toast$1 = props => {
|
|
3672
|
-
const api = useToastContext();
|
|
3673
|
-
const mergedProps = mergeProps$2(() => api().rootProps, props);
|
|
3674
|
-
return createComponent(ark.li, mergedProps);
|
|
3675
|
-
};
|
|
3676
|
-
|
|
3677
3329
|
const ToastCloseTrigger = props => {
|
|
3678
3330
|
const api = useToastContext();
|
|
3679
|
-
const mergedProps = mergeProps$
|
|
3331
|
+
const mergedProps = mergeProps$1(() => api().closeTriggerProps, props);
|
|
3680
3332
|
return createComponent(ark.button, mergedProps);
|
|
3681
3333
|
};
|
|
3682
3334
|
|
|
3683
3335
|
const ToastDescription = props => {
|
|
3684
3336
|
const api = useToastContext();
|
|
3685
|
-
const mergedProps = mergeProps$
|
|
3337
|
+
const mergedProps = mergeProps$1(() => api().descriptionProps, props);
|
|
3686
3338
|
return createComponent(ark.div, mergedProps);
|
|
3687
3339
|
};
|
|
3688
3340
|
|
|
3341
|
+
const ToastRoot = props => {
|
|
3342
|
+
const api = useToastContext();
|
|
3343
|
+
const mergedProps = mergeProps$1(() => api().rootProps, props);
|
|
3344
|
+
return createComponent(ark.li, mergedProps);
|
|
3345
|
+
};
|
|
3346
|
+
|
|
3689
3347
|
const ToastTitle = props => {
|
|
3690
3348
|
const api = useToastContext();
|
|
3691
|
-
const mergedProps = mergeProps$
|
|
3349
|
+
const mergedProps = mergeProps$1(() => api().titleProps, props);
|
|
3692
3350
|
return createComponent(ark.div, mergedProps);
|
|
3693
3351
|
};
|
|
3694
3352
|
|
|
3695
|
-
const Toast =
|
|
3696
|
-
Root:
|
|
3353
|
+
const Toast = {
|
|
3354
|
+
Root: ToastRoot,
|
|
3697
3355
|
CloseTrigger: ToastCloseTrigger,
|
|
3698
3356
|
Description: ToastDescription,
|
|
3699
3357
|
Group: ToastGroup,
|
|
3700
3358
|
Title: ToastTitle
|
|
3701
|
-
}
|
|
3359
|
+
};
|
|
3702
3360
|
|
|
3703
3361
|
const [ToggleGroupProvider, useToggleGroupContext] = createContext({
|
|
3704
3362
|
hookName: 'useToggleGroupContext',
|
|
3705
3363
|
providerName: '<ToggleGroupProvider />'
|
|
3706
3364
|
});
|
|
3707
3365
|
|
|
3366
|
+
const ToggleGroupItem = props => {
|
|
3367
|
+
const [toggleProps, restProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
3368
|
+
const api = useToggleGroupContext();
|
|
3369
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(toggleProps), restProps);
|
|
3370
|
+
return createComponent(ark.button, mergedProps);
|
|
3371
|
+
};
|
|
3372
|
+
|
|
3708
3373
|
const useToggleGroup = props => {
|
|
3709
3374
|
const getRootNode = useEnvironmentContext();
|
|
3710
|
-
const context = mergeProps$
|
|
3375
|
+
const context = mergeProps$1({
|
|
3711
3376
|
id: createUniqueId(),
|
|
3712
3377
|
getRootNode
|
|
3713
3378
|
}, props);
|
|
@@ -3717,10 +3382,10 @@ const useToggleGroup = props => {
|
|
|
3717
3382
|
return createMemo(() => toggleGroup.connect(state, send, normalizeProps));
|
|
3718
3383
|
};
|
|
3719
3384
|
|
|
3720
|
-
const
|
|
3385
|
+
const ToggleGroupRoot = props => {
|
|
3721
3386
|
const [groupParams, restProps] = createSplitProps()(props, ['dir', 'disabled', 'getRootNode', 'id', 'ids', 'loop', 'multiple', 'onValueChange', 'orientation', 'rovingFocus', 'value']);
|
|
3722
3387
|
const api = useToggleGroup(groupParams);
|
|
3723
|
-
const mergedProps = mergeProps$
|
|
3388
|
+
const mergedProps = mergeProps$1(() => api().rootProps, restProps);
|
|
3724
3389
|
return createComponent(ToggleGroupProvider, {
|
|
3725
3390
|
value: api,
|
|
3726
3391
|
get children() {
|
|
@@ -3729,26 +3394,59 @@ const ToggleGroup$1 = props => {
|
|
|
3729
3394
|
});
|
|
3730
3395
|
};
|
|
3731
3396
|
|
|
3732
|
-
const
|
|
3733
|
-
|
|
3734
|
-
const api = useToggleGroupContext();
|
|
3735
|
-
const mergedProps = mergeProps$2(() => api().getItemProps(toggleProps), restProps);
|
|
3736
|
-
return createComponent(ark.button, mergedProps);
|
|
3737
|
-
};
|
|
3738
|
-
|
|
3739
|
-
const ToggleGroup = Object.assign(ToggleGroup$1, {
|
|
3740
|
-
Root: ToggleGroup$1,
|
|
3397
|
+
const ToggleGroup = {
|
|
3398
|
+
Root: ToggleGroupRoot,
|
|
3741
3399
|
Item: ToggleGroupItem
|
|
3742
|
-
}
|
|
3400
|
+
};
|
|
3743
3401
|
|
|
3744
3402
|
const [TooltipProvider, useTooltipContext] = createContext({
|
|
3745
3403
|
hookName: 'useTooltipContext',
|
|
3746
3404
|
providerName: '<TooltipProvider />'
|
|
3747
3405
|
});
|
|
3748
3406
|
|
|
3407
|
+
const TooltipArrow = props => {
|
|
3408
|
+
const tooltip = useTooltipContext();
|
|
3409
|
+
const mergedProps = mergeProps$1(() => tooltip().arrowProps, props);
|
|
3410
|
+
return createComponent(ark.div, mergedProps);
|
|
3411
|
+
};
|
|
3412
|
+
|
|
3413
|
+
const TooltipArrowTip = props => {
|
|
3414
|
+
const api = useTooltipContext();
|
|
3415
|
+
const mergedProps = mergeProps$1(() => api().arrowTipProps, props);
|
|
3416
|
+
return createComponent(ark.div, mergedProps);
|
|
3417
|
+
};
|
|
3418
|
+
|
|
3419
|
+
const TooltipContent = props => {
|
|
3420
|
+
const api = useTooltipContext();
|
|
3421
|
+
const presenceApi = usePresenceContext();
|
|
3422
|
+
const mergedProps = mergeProps$1(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
3423
|
+
return createComponent(Show, {
|
|
3424
|
+
get when() {
|
|
3425
|
+
return !presenceApi().isUnmounted;
|
|
3426
|
+
},
|
|
3427
|
+
get children() {
|
|
3428
|
+
return createComponent(ark.div, mergedProps);
|
|
3429
|
+
}
|
|
3430
|
+
});
|
|
3431
|
+
};
|
|
3432
|
+
|
|
3433
|
+
const TooltipPositioner = props => {
|
|
3434
|
+
const api = useTooltipContext();
|
|
3435
|
+
const presenceApi = usePresenceContext();
|
|
3436
|
+
const mergedProps = mergeProps$1(() => api().positionerProps, props);
|
|
3437
|
+
return createComponent(Show, {
|
|
3438
|
+
get when() {
|
|
3439
|
+
return !presenceApi().isUnmounted;
|
|
3440
|
+
},
|
|
3441
|
+
get children() {
|
|
3442
|
+
return createComponent(ark.div, mergedProps);
|
|
3443
|
+
}
|
|
3444
|
+
});
|
|
3445
|
+
};
|
|
3446
|
+
|
|
3749
3447
|
const useTooltip = props => {
|
|
3750
3448
|
const getRootNode = useEnvironmentContext();
|
|
3751
|
-
const context = mergeProps$
|
|
3449
|
+
const context = mergeProps$1({
|
|
3752
3450
|
id: createUniqueId(),
|
|
3753
3451
|
getRootNode
|
|
3754
3452
|
}, props);
|
|
@@ -3758,11 +3456,11 @@ const useTooltip = props => {
|
|
|
3758
3456
|
return createMemo(() => tooltip.connect(state, send, normalizeProps));
|
|
3759
3457
|
};
|
|
3760
3458
|
|
|
3761
|
-
const
|
|
3459
|
+
const TooltipRoot = props => {
|
|
3762
3460
|
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
3763
3461
|
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', 'closeOnEsc', 'closeOnPointerDown', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'interactive', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
3764
3462
|
const api = useTooltip(useTooltipProps);
|
|
3765
|
-
const apiPresence = usePresence(mergeProps$
|
|
3463
|
+
const apiPresence = usePresence(mergeProps$1(presenceProps, () => ({
|
|
3766
3464
|
present: api().isOpen
|
|
3767
3465
|
})));
|
|
3768
3466
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
@@ -3779,60 +3477,148 @@ const Tooltip$1 = props => {
|
|
|
3779
3477
|
});
|
|
3780
3478
|
};
|
|
3781
3479
|
|
|
3782
|
-
const
|
|
3783
|
-
const
|
|
3784
|
-
const mergedProps = mergeProps$
|
|
3480
|
+
const TooltipTrigger = props => {
|
|
3481
|
+
const api = useTooltipContext();
|
|
3482
|
+
const mergedProps = mergeProps$1(() => api().triggerProps, props);
|
|
3483
|
+
return createComponent(ark.button, mergedProps);
|
|
3484
|
+
};
|
|
3485
|
+
|
|
3486
|
+
const Tooltip = {
|
|
3487
|
+
Root: TooltipRoot,
|
|
3488
|
+
Arrow: TooltipArrow,
|
|
3489
|
+
ArrowTip: TooltipArrowTip,
|
|
3490
|
+
Content: TooltipContent,
|
|
3491
|
+
Positioner: TooltipPositioner,
|
|
3492
|
+
Trigger: TooltipTrigger
|
|
3493
|
+
};
|
|
3494
|
+
|
|
3495
|
+
// TODO: remove after zag release
|
|
3496
|
+
|
|
3497
|
+
const [TreeViewProvider, useTreeViewContext] = createContext({
|
|
3498
|
+
hookName: 'useTreeViewContext',
|
|
3499
|
+
providerName: '<TreeViewProvider />'
|
|
3500
|
+
});
|
|
3501
|
+
|
|
3502
|
+
const TreeViewBranch = props => {
|
|
3503
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3504
|
+
const api = useTreeViewContext();
|
|
3505
|
+
const mergedProps = mergeProps$1(() => api().getBranchProps(branchProps), localProps);
|
|
3506
|
+
const getChildren = () => runIfFn(localProps.children, () => api().getBranchState(branchProps));
|
|
3507
|
+
return createComponent(ark.li, mergeProps(mergedProps, {
|
|
3508
|
+
get children() {
|
|
3509
|
+
return getChildren();
|
|
3510
|
+
}
|
|
3511
|
+
}));
|
|
3512
|
+
};
|
|
3513
|
+
|
|
3514
|
+
const TreeViewBranchContent = props => {
|
|
3515
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3516
|
+
const api = useTreeViewContext();
|
|
3517
|
+
const mergedProps = mergeProps$1(() => api().getBranchContentProps(branchProps), localProps);
|
|
3518
|
+
return createComponent(ark.ul, mergedProps);
|
|
3519
|
+
};
|
|
3520
|
+
|
|
3521
|
+
const TreeViewBranchControl = props => {
|
|
3522
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3523
|
+
const api = useTreeViewContext();
|
|
3524
|
+
const mergedProps = mergeProps$1(() => api().getBranchControlProps(branchProps), localProps);
|
|
3785
3525
|
return createComponent(ark.div, mergedProps);
|
|
3786
3526
|
};
|
|
3787
3527
|
|
|
3788
|
-
const
|
|
3789
|
-
const
|
|
3790
|
-
const
|
|
3528
|
+
const TreeViewBranchIndicator = props => {
|
|
3529
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3530
|
+
const api = useTreeViewContext();
|
|
3531
|
+
const mergedProps = mergeProps$1(() => api().getBranchProps(branchProps), treeViewAnatomy.build().branchIndicator.attrs, localProps);
|
|
3791
3532
|
return createComponent(ark.div, mergedProps);
|
|
3792
3533
|
};
|
|
3793
3534
|
|
|
3794
|
-
const
|
|
3795
|
-
const
|
|
3796
|
-
const
|
|
3797
|
-
const mergedProps = mergeProps$
|
|
3798
|
-
return createComponent(
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3535
|
+
const TreeViewBranchText = props => {
|
|
3536
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3537
|
+
const api = useTreeViewContext();
|
|
3538
|
+
const mergedProps = mergeProps$1(() => api().getBranchTextProps(branchProps), localProps);
|
|
3539
|
+
return createComponent(ark.span, mergedProps);
|
|
3540
|
+
};
|
|
3541
|
+
|
|
3542
|
+
const TreeViewBranchTrigger = props => {
|
|
3543
|
+
const [branchProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3544
|
+
const api = useTreeViewContext();
|
|
3545
|
+
const mergedProps = mergeProps$1(() => api().getBranchTriggerProps(branchProps), localProps);
|
|
3546
|
+
return createComponent(ark.button, mergedProps);
|
|
3547
|
+
};
|
|
3548
|
+
|
|
3549
|
+
const TreeViewItem = props => {
|
|
3550
|
+
const [itemProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3551
|
+
const api = useTreeViewContext();
|
|
3552
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), localProps);
|
|
3553
|
+
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
3554
|
+
return createComponent(ark.li, mergeProps(mergedProps, {
|
|
3802
3555
|
get children() {
|
|
3803
|
-
return
|
|
3556
|
+
return getChildren();
|
|
3804
3557
|
}
|
|
3558
|
+
}));
|
|
3559
|
+
};
|
|
3560
|
+
|
|
3561
|
+
const TreeViewItemText = props => {
|
|
3562
|
+
const [itemProps, localProps] = createSplitProps()(props, ['depth', 'id', 'disabled']);
|
|
3563
|
+
const api = useTreeViewContext();
|
|
3564
|
+
const mergedProps = mergeProps$1(() => api().getItemProps(itemProps), treeViewAnatomy.build().itemText.attrs, localProps);
|
|
3565
|
+
return createComponent(ark.span, mergedProps);
|
|
3566
|
+
};
|
|
3567
|
+
|
|
3568
|
+
const TreeViewLabel = props => {
|
|
3569
|
+
const api = useTreeViewContext();
|
|
3570
|
+
const mergedProps = mergeProps$1(() => api().labelProps, props);
|
|
3571
|
+
return createComponent(ark.label, mergedProps);
|
|
3572
|
+
};
|
|
3573
|
+
|
|
3574
|
+
const useTreeView = props => {
|
|
3575
|
+
const getRootNode = useEnvironmentContext();
|
|
3576
|
+
const context = mergeProps$1({
|
|
3577
|
+
id: createUniqueId(),
|
|
3578
|
+
getRootNode
|
|
3579
|
+
}, props);
|
|
3580
|
+
const [state, send] = useMachine(treeView.machine(context), {
|
|
3581
|
+
context
|
|
3805
3582
|
});
|
|
3583
|
+
return createMemo(() => treeView.connect(state, send, normalizeProps));
|
|
3806
3584
|
};
|
|
3807
3585
|
|
|
3808
|
-
const
|
|
3809
|
-
const
|
|
3810
|
-
const
|
|
3811
|
-
const mergedProps = mergeProps$
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
},
|
|
3586
|
+
const TreeViewRoot = props => {
|
|
3587
|
+
const [useTreeViewProps, localProps] = createSplitProps()(props, ['dir', 'expandedIds', 'focusedId', 'getRootNode', 'id', 'onExpandedChange', 'onFocusChange', 'onSelectionChange', 'openOnClick', 'selectedIds', 'selectionMode']);
|
|
3588
|
+
const api = useTreeView(useTreeViewProps);
|
|
3589
|
+
const mergedProps = mergeProps$1(() => api().rootProps, localProps);
|
|
3590
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
3591
|
+
return createComponent(TreeViewProvider, {
|
|
3592
|
+
value: api,
|
|
3816
3593
|
get children() {
|
|
3817
|
-
return createComponent(ark.div, mergedProps
|
|
3594
|
+
return createComponent(ark.div, mergeProps(mergedProps, {
|
|
3595
|
+
get children() {
|
|
3596
|
+
return getChildren();
|
|
3597
|
+
}
|
|
3598
|
+
}));
|
|
3818
3599
|
}
|
|
3819
3600
|
});
|
|
3820
3601
|
};
|
|
3821
3602
|
|
|
3822
|
-
const
|
|
3823
|
-
const api =
|
|
3824
|
-
const mergedProps = mergeProps$
|
|
3825
|
-
return createComponent(ark.
|
|
3603
|
+
const TreeViewTree = props => {
|
|
3604
|
+
const api = useTreeViewContext();
|
|
3605
|
+
const mergedProps = mergeProps$1(() => api().treeProps, props);
|
|
3606
|
+
return createComponent(ark.ul, mergedProps);
|
|
3826
3607
|
};
|
|
3827
3608
|
|
|
3828
|
-
const
|
|
3829
|
-
Root:
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3609
|
+
const TreeView = {
|
|
3610
|
+
Root: TreeViewRoot,
|
|
3611
|
+
Label: TreeViewLabel,
|
|
3612
|
+
Tree: TreeViewTree,
|
|
3613
|
+
Branch: TreeViewBranch,
|
|
3614
|
+
Item: TreeViewItem,
|
|
3615
|
+
ItemText: TreeViewItemText,
|
|
3616
|
+
BranchContent: TreeViewBranchContent,
|
|
3617
|
+
BranchControl: TreeViewBranchControl,
|
|
3618
|
+
BranchTrigger: TreeViewBranchTrigger,
|
|
3619
|
+
BranchIndicator: TreeViewBranchIndicator,
|
|
3620
|
+
BranchText: TreeViewBranchText
|
|
3621
|
+
};
|
|
3836
3622
|
|
|
3837
|
-
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, Avatar, AvatarFallback, AvatarImage, Carousel, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselViewport, Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel, ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerFormatSelect, ColorPickerFormatTrigger, ColorPickerLabel, ColorPickerPositioner, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchIndicator, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueText, ColorPickerView, Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxPositioner, ComboboxTrigger, DatePicker, DatePickerClearTrigger, DatePickerContent, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPrevTrigger, DatePickerRangeText, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, Dialog, DialogBackdrop, DialogCloseTrigger, DialogContent, DialogDescription, DialogPositioner, DialogTitle, DialogTrigger, Editable, EditableArea, EditableCancelTrigger, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableSubmitTrigger, Environment, FileUpload, FileUploadDropzone, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadTrigger, HoverCard, HoverCardArrow, HoverCardArrowTip, HoverCardContent, HoverCardPositioner, HoverCardTrigger, Menu, MenuArrow, MenuArrowTip, MenuContent, MenuContextTrigger, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuOptionItem, MenuPositioner, MenuSeparator, MenuTrigger, MenuTriggerItem, NumberInput, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputScrubber, Pagination, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PinInput, PinInputControl, PinInputInput, PinInputLabel, Popover, PopoverAnchor, PopoverArrow, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverTitle, PopoverTrigger, Presence, PresencePropsProvider, PresenceProvider, Progress, ProgressCircle, ProgressCircleRange, ProgressCircleTrack,
|
|
3623
|
+
export { Accordion, AccordionItem, AccordionItemContent, AccordionItemIndicator, AccordionItemTrigger, AccordionRoot, Avatar, AvatarFallback, AvatarImage, AvatarRoot, Carousel, CarouselControl, CarouselIndicator, CarouselIndicatorGroup, CarouselItem, CarouselItemGroup, CarouselNextTrigger, CarouselPrevTrigger, CarouselRoot, CarouselViewport, Checkbox, CheckboxControl, CheckboxIndicator, CheckboxLabel, CheckboxRoot, ColorPicker, ColorPickerArea, ColorPickerAreaBackground, ColorPickerAreaThumb, ColorPickerChannelInput, ColorPickerChannelSlider, ColorPickerChannelSliderThumb, ColorPickerChannelSliderTrack, ColorPickerContent, ColorPickerControl, ColorPickerEyeDropperTrigger, ColorPickerFormatSelect, ColorPickerFormatTrigger, ColorPickerLabel, ColorPickerPositioner, ColorPickerRoot, ColorPickerSwatch, ColorPickerSwatchGroup, ColorPickerSwatchIndicator, ColorPickerSwatchTrigger, ColorPickerTransparencyGrid, ColorPickerTrigger, ColorPickerValueText, ColorPickerView, Combobox, ComboboxClearTrigger, ComboboxContent, ComboboxControl, ComboboxInput, ComboboxItem, ComboboxItemGroup, ComboboxItemGroupLabel, ComboboxItemIndicator, ComboboxItemText, ComboboxLabel, ComboboxPositioner, ComboboxRoot, ComboboxTrigger, DatePicker, DatePickerClearTrigger, DatePickerContent, DatePickerControl, DatePickerInput, DatePickerLabel, DatePickerMonthSelect, DatePickerNextTrigger, DatePickerPositioner, DatePickerPrevTrigger, DatePickerRangeText, DatePickerRoot, DatePickerTable, DatePickerTableBody, DatePickerTableCell, DatePickerTableCellTrigger, DatePickerTableHead, DatePickerTableHeader, DatePickerTableRow, DatePickerTrigger, DatePickerView, DatePickerViewControl, DatePickerViewTrigger, DatePickerYearSelect, Dialog, DialogBackdrop, DialogCloseTrigger, DialogContent, DialogDescription, DialogPositioner, DialogRoot, DialogTitle, DialogTrigger, Editable, EditableArea, EditableCancelTrigger, EditableControl, EditableEditTrigger, EditableInput, EditableLabel, EditablePreview, EditableRoot, EditableSubmitTrigger, Environment, FileUpload, FileUploadDropzone, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadRoot, FileUploadTrigger, HoverCard, HoverCardArrow, HoverCardArrowTip, HoverCardContent, HoverCardPositioner, HoverCardRoot, HoverCardTrigger, Menu, MenuArrow, MenuArrowTip, MenuContent, MenuContextTrigger, MenuItem, MenuItemGroup, MenuItemGroupLabel, MenuOptionItem, MenuPositioner, MenuRoot, MenuSeparator, MenuTrigger, MenuTriggerItem, NumberInput, NumberInputControl, NumberInputDecrementTrigger, NumberInputIncrementTrigger, NumberInputInput, NumberInputLabel, NumberInputRoot, NumberInputScrubber, Pagination, PaginationEllipsis, PaginationItem, PaginationNextTrigger, PaginationPrevTrigger, PaginationRoot, PinInput, PinInputControl, PinInputInput, PinInputLabel, PinInputRoot, Popover, PopoverAnchor, PopoverArrow, PopoverArrowTip, PopoverCloseTrigger, PopoverContent, PopoverDescription, PopoverIndicator, PopoverPositioner, PopoverRoot, PopoverTitle, PopoverTrigger, Presence, PresencePropsProvider, PresenceProvider, Progress, ProgressCircle, ProgressCircleRange, ProgressCircleTrack, ProgressLabel, ProgressRange, ProgressRoot, ProgressTrack, ProgressValueText, ProgressView, RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemText, RadioGroupLabel, RadioGroupRoot, RatingGroup, RatingGroupControl, RatingGroupItem, RatingGroupLabel, RatingGroupRoot, SegmentGroup, SegmentGroupIndicator, SegmentGroupItem, SegmentGroupItemControl, SegmentGroupItemText, SegmentGroupLabel, SegmentGroupRoot, Select, SelectClearTrigger, SelectContent, SelectControl, SelectIndicator, SelectItem, SelectItemGroup, SelectItemGroupLabel, SelectItemIndicator, SelectItemText, SelectLabel, SelectPositioner, SelectRoot, SelectTrigger, SelectValueText, Slider, SliderControl, SliderLabel, SliderMarker, SliderMarkerGroup, SliderRange, SliderRoot, SliderThumb, SliderTrack, SliderValueText, Splitter, SplitterPanel, SplitterResizeTrigger, SplitterRoot, Switch, SwitchControl, SwitchLabel, SwitchRoot, SwitchThumb, TabContent, TabIndicator, TabList, TabTrigger, Tabs, TabsRoot, TagsInput, TagsInputClearTrigger, TagsInputControl, TagsInputInput, TagsInputItem, TagsInputItemDeleteTrigger, TagsInputItemInput, TagsInputItemPreview, TagsInputItemText, TagsInputLabel, TagsInputRoot, Toast, ToastCloseTrigger, ToastDescription, ToastGroup, ToastRoot, ToastTitle, ToggleGroup, ToggleGroupItem, ToggleGroupRoot, Tooltip, TooltipArrow, TooltipArrowTip, TooltipContent, TooltipPositioner, TooltipRoot, TooltipTrigger, TreeView, TreeViewBranch, TreeViewBranchContent, TreeViewBranchControl, TreeViewBranchIndicator, TreeViewBranchText, TreeViewBranchTrigger, TreeViewItem, TreeViewItemText, TreeViewLabel, TreeViewRoot, TreeViewTree, ark, createToaster, splitPresenceProps, useAccordionContext, useAccordionItemContext, useAvatarContext, useCarouselContext, useCheckboxContext, useColorPickerAreaContext, useColorPickerChannelSliderContext, useColorPickerContext, useComboboxContext, useDatePickerContext, useDatePickerTableCellContext, useDatePickerTableContext, useDatePickerViewContext, useDialogContext, useEditableContext, useEnvironmentContext, useFileUploadContext, useHoverCardContext, useMenuContext, useNumberInputContext, usePaginationContext, usePinInputContext, usePopoverContext, usePresence, usePresenceContext, usePresencePropsContext, useProgressContext, useRadioGroupContext, useRadioGroupItemContext, useRatingGroupContext, useRatingGroupItemContext, useSegmentGroupContext, useSegmentGroupItemContext, useSelectContext, useSelectItemContext, useSliderContext, useSplitterContext, useSwitchContext, useTabsContext, useTagsInputContext, useTagsInputItemContext, useToggleGroupContext, useTooltipContext, useTreeViewContext, withAsProp };
|
|
3838
3624
|
//# sourceMappingURL=index.js.map
|