@ark-ui/solid 1.0.0-beta.2 → 1.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 +33 -1
- package/cjs/index.js +659 -381
- package/cjs/index.js.map +1 -1
- package/esm/index.js +655 -383
- package/esm/index.js.map +1 -1
- package/package.json +45 -45
- package/source/accordion/accordion-item-content.jsx +7 -6
- package/source/accordion/accordion-item-trigger.jsx +4 -1
- package/source/accordion/accordion-item.jsx +10 -6
- package/source/accordion/accordion.jsx +8 -4
- package/source/avatar/avatar-fallback.jsx +2 -2
- package/source/avatar/avatar-image.jsx +2 -2
- package/source/avatar/avatar.jsx +2 -2
- package/source/carousel/carousel.jsx +6 -4
- package/source/checkbox/checkbox-label.jsx +2 -2
- package/source/color-picker/color-picker-content.jsx +7 -2
- package/source/color-picker/color-picker-positioner.jsx +6 -1
- package/source/color-picker/color-picker-value-text.jsx +9 -0
- package/source/color-picker/color-picker-view.jsx +13 -0
- package/source/color-picker/color-picker.jsx +8 -3
- package/source/color-picker/index.js +5 -1
- package/source/combobox/combobox-content.jsx +6 -5
- package/source/combobox/combobox-item-group-label.jsx +2 -2
- package/source/combobox/combobox-positioner.jsx +8 -3
- package/source/combobox/combobox.jsx +8 -3
- package/source/date-picker/date-picker-content.jsx +7 -2
- package/source/date-picker/date-picker-positioner.jsx +6 -1
- package/source/date-picker/date-picker-view.jsx +4 -1
- package/source/date-picker/date-picker.jsx +9 -4
- package/source/dialog/dialog-backdrop.jsx +6 -5
- package/source/dialog/dialog-close-trigger.jsx +2 -2
- package/source/dialog/dialog-content.jsx +6 -5
- package/source/dialog/dialog-description.jsx +2 -2
- package/source/dialog/dialog-positioner.jsx +8 -3
- package/source/dialog/dialog-title.jsx +2 -2
- package/source/dialog/dialog-trigger.jsx +6 -3
- package/source/dialog/dialog.jsx +9 -3
- package/source/editable/editable-area.jsx +2 -2
- package/source/editable/editable-cancel-trigger.jsx +2 -2
- package/source/editable/editable-control.jsx +2 -2
- package/source/editable/editable-edit-trigger.jsx +2 -2
- package/source/editable/editable-input.jsx +2 -2
- package/source/editable/editable-label.jsx +2 -2
- package/source/editable/editable-preview.jsx +2 -2
- package/source/editable/editable-submit-trigger.jsx +2 -2
- package/source/editable/editable.jsx +2 -2
- package/source/hover-card/hover-card-arrow-tip.jsx +2 -2
- package/source/hover-card/hover-card-arrow.jsx +2 -2
- package/source/hover-card/hover-card-content.jsx +6 -5
- package/source/hover-card/hover-card-positioner.jsx +8 -3
- package/source/hover-card/hover-card-trigger.jsx +2 -2
- package/source/hover-card/hover-card.jsx +9 -3
- package/source/menu/menu-arrow-tip.jsx +2 -2
- package/source/menu/menu-arrow.jsx +2 -2
- package/source/menu/menu-content.jsx +6 -5
- package/source/menu/menu-context-trigger.jsx +2 -2
- package/source/menu/menu-item-group-label.jsx +3 -5
- package/source/menu/menu-item-group.jsx +2 -2
- package/source/menu/menu-item.jsx +2 -2
- package/source/menu/menu-option-item.jsx +2 -2
- package/source/menu/menu-positioner.jsx +8 -3
- package/source/menu/menu-separator.jsx +2 -2
- package/source/menu/menu-trigger-item.jsx +2 -2
- package/source/menu/menu-trigger.jsx +2 -2
- package/source/menu/menu.jsx +11 -12
- package/source/number-input/number-input-control.jsx +2 -2
- package/source/number-input/number-input-decrement-trigger.jsx +2 -2
- package/source/number-input/number-input-field.jsx +2 -2
- package/source/number-input/number-input-increment-trigger.jsx +2 -2
- package/source/number-input/number-input-label.jsx +2 -2
- package/source/number-input/number-input-scrubber.jsx +2 -2
- package/source/number-input/number-input.jsx +2 -2
- package/source/pagination/pagination.jsx +2 -2
- package/source/pin-input/pin-input-field.jsx +2 -2
- package/source/pin-input/pin-input-label.jsx +2 -2
- package/source/popover/popover-anchor.jsx +2 -2
- package/source/popover/popover-arrow-tip.jsx +2 -2
- package/source/popover/popover-arrow.jsx +2 -2
- package/source/popover/popover-close-trigger.jsx +2 -2
- package/source/popover/popover-content.jsx +6 -5
- package/source/popover/popover-description.jsx +2 -2
- package/source/popover/popover-positioner.jsx +7 -2
- package/source/popover/popover-title.jsx +2 -2
- package/source/popover/popover-trigger.jsx +5 -2
- package/source/popover/popover.jsx +10 -2
- package/source/presence/index.js +4 -1
- package/source/presence/presence-context.js +5 -0
- package/source/presence/presence-props-context.js +5 -0
- package/source/presence/presence.jsx +9 -28
- package/source/presence/use-presence.js +21 -4
- package/source/rating-group/rating-group-item.jsx +5 -4
- package/source/select/select-content.jsx +6 -5
- package/source/select/select-control.jsx +9 -1
- package/source/select/select-item-group-label.jsx +2 -2
- package/source/select/select-positioner.jsx +6 -1
- package/source/select/select.jsx +8 -3
- package/source/slider/index.js +3 -3
- package/source/slider/slider-thumb.jsx +2 -2
- package/source/slider/slider-value-text.jsx +10 -0
- package/source/splitter/splitter-panel.jsx +2 -2
- package/source/splitter/splitter-resize-trigger.jsx +2 -2
- package/source/splitter/splitter.jsx +2 -2
- package/source/switch/switch-label.jsx +2 -2
- package/source/switch/switch-thumb.jsx +2 -2
- package/source/tabs/tab-content.jsx +11 -8
- package/source/tabs/tab-indicator.jsx +2 -2
- package/source/tabs/tab-list.jsx +2 -2
- package/source/tabs/tab-trigger.jsx +2 -2
- package/source/tabs/tabs.jsx +7 -3
- package/source/toggle-group/toggle-group.jsx +2 -2
- package/source/tooltip/tooltip-arrow-tip.jsx +2 -2
- package/source/tooltip/tooltip-arrow.jsx +2 -2
- package/source/tooltip/tooltip-content.jsx +7 -6
- package/source/tooltip/tooltip-positioner.jsx +7 -2
- package/source/tooltip/tooltip-trigger.jsx +2 -2
- package/source/tooltip/tooltip.jsx +10 -2
- package/types/accordion/accordion-context.d.ts +3 -2
- package/types/accordion/accordion-item-content.d.ts +2 -2
- package/types/accordion/accordion-item-context.d.ts +3 -2
- package/types/accordion/accordion-item-indicator.d.ts +2 -1
- package/types/accordion/accordion-item-trigger.d.ts +2 -1
- package/types/accordion/accordion-item.d.ts +5 -4
- package/types/accordion/accordion.d.ts +3 -1
- package/types/accordion/use-accordion.d.ts +4 -2
- package/types/avatar/avatar-context.d.ts +3 -2
- package/types/avatar/avatar-fallback.d.ts +2 -1
- package/types/avatar/avatar-image.d.ts +2 -1
- package/types/avatar/avatar.d.ts +2 -1
- package/types/avatar/use-avatar.d.ts +4 -2
- package/types/carousel/carousel-context.d.ts +3 -2
- package/types/carousel/carousel-control.d.ts +2 -1
- package/types/carousel/carousel-indicator-group.d.ts +2 -1
- package/types/carousel/carousel-indicator.d.ts +2 -1
- package/types/carousel/carousel-next-trigger.d.ts +2 -1
- package/types/carousel/carousel-prev-trigger.d.ts +2 -1
- package/types/carousel/carousel-slide-group.d.ts +2 -1
- package/types/carousel/carousel-slide.d.ts +2 -1
- package/types/carousel/carousel-viewport.d.ts +2 -1
- package/types/carousel/carousel.d.ts +7 -3
- package/types/carousel/use-carousel.d.ts +4 -2
- package/types/checkbox/checkbox-context.d.ts +3 -2
- package/types/checkbox/checkbox-control.d.ts +2 -1
- package/types/checkbox/checkbox-indicator.d.ts +2 -1
- package/types/checkbox/checkbox-label.d.ts +2 -1
- package/types/checkbox/checkbox.d.ts +5 -5
- package/types/checkbox/use-checkbox.d.ts +4 -2
- package/types/color-picker/color-picker-transparency-grid.d.ts +2 -2
- package/types/color-picker/color-picker-value-text.d.ts +5 -0
- package/types/color-picker/color-picker-view.d.ts +7 -0
- package/types/color-picker/color-picker.d.ts +5 -3
- package/types/color-picker/index.d.ts +8 -4
- package/types/combobox/combobox-clear-trigger.d.ts +2 -1
- package/types/combobox/combobox-content.d.ts +2 -2
- package/types/combobox/combobox-context.d.ts +2 -1
- package/types/combobox/combobox-control.d.ts +2 -1
- package/types/combobox/combobox-input.d.ts +2 -1
- package/types/combobox/combobox-item-context.d.ts +3 -2
- package/types/combobox/combobox-item-group-label.d.ts +6 -2
- package/types/combobox/combobox-item-group.d.ts +2 -1
- package/types/combobox/combobox-item-indicator.d.ts +2 -1
- package/types/combobox/combobox-item-text.d.ts +2 -1
- package/types/combobox/combobox-item.d.ts +5 -4
- package/types/combobox/combobox-label.d.ts +2 -1
- package/types/combobox/combobox-positioner.d.ts +2 -1
- package/types/combobox/combobox-trigger.d.ts +2 -1
- package/types/combobox/combobox.d.ts +7 -6
- package/types/combobox/use-combobox.d.ts +2 -1
- package/types/date-picker/date-picker-context.d.ts +3 -2
- package/types/date-picker/date-picker-view.d.ts +4 -3
- package/types/date-picker/date-picker.d.ts +5 -3
- package/types/dialog/dialog-backdrop.d.ts +2 -2
- package/types/dialog/dialog-close-trigger.d.ts +2 -1
- package/types/dialog/dialog-content.d.ts +2 -2
- package/types/dialog/dialog-context.d.ts +3 -2
- package/types/dialog/dialog-description.d.ts +2 -1
- package/types/dialog/dialog-positioner.d.ts +2 -1
- package/types/dialog/dialog-title.d.ts +2 -1
- package/types/dialog/dialog-trigger.d.ts +2 -1
- package/types/dialog/dialog.d.ts +4 -3
- package/types/dialog/use-dialog.d.ts +4 -2
- package/types/editable/editable-area.d.ts +2 -1
- package/types/editable/editable-cancel-trigger.d.ts +2 -1
- package/types/editable/editable-context.d.ts +3 -2
- package/types/editable/editable-control.d.ts +2 -1
- package/types/editable/editable-edit-trigger.d.ts +2 -1
- package/types/editable/editable-input.d.ts +2 -1
- package/types/editable/editable-label.d.ts +2 -1
- package/types/editable/editable-preview.d.ts +2 -1
- package/types/editable/editable-submit-trigger.d.ts +2 -1
- package/types/editable/editable.d.ts +5 -5
- package/types/editable/use-editable.d.ts +4 -2
- package/types/environment/environment.d.ts +2 -2
- package/types/hover-card/hover-card-arrow-tip.d.ts +2 -1
- package/types/hover-card/hover-card-arrow.d.ts +2 -1
- package/types/hover-card/hover-card-content.d.ts +2 -2
- package/types/hover-card/hover-card-context.d.ts +3 -2
- package/types/hover-card/hover-card-positioner.d.ts +2 -1
- package/types/hover-card/hover-card-trigger.d.ts +2 -1
- package/types/hover-card/hover-card.d.ts +4 -3
- package/types/hover-card/use-hover-card.d.ts +4 -2
- package/types/menu/menu-arrow-tip.d.ts +2 -1
- package/types/menu/menu-arrow.d.ts +2 -1
- package/types/menu/menu-content.d.ts +2 -2
- package/types/menu/menu-context-trigger.d.ts +2 -1
- package/types/menu/menu-item-group-label.d.ts +5 -4
- package/types/menu/menu-item-group.d.ts +2 -1
- package/types/menu/menu-item.d.ts +2 -1
- package/types/menu/menu-option-item.d.ts +3 -2
- package/types/menu/menu-positioner.d.ts +2 -1
- package/types/menu/menu-separator.d.ts +2 -1
- package/types/menu/menu-trigger-item.d.ts +2 -1
- package/types/menu/menu-trigger.d.ts +2 -1
- package/types/menu/menu.d.ts +6 -9
- package/types/menu/use-menu.d.ts +2 -1
- package/types/number-input/number-input-context.d.ts +3 -2
- package/types/number-input/number-input-control.d.ts +2 -1
- package/types/number-input/number-input-decrement-trigger.d.ts +2 -1
- package/types/number-input/number-input-field.d.ts +2 -1
- package/types/number-input/number-input-increment-trigger.d.ts +2 -1
- package/types/number-input/number-input-label.d.ts +2 -1
- package/types/number-input/number-input-scrubber.d.ts +2 -1
- package/types/number-input/number-input.d.ts +2 -1
- package/types/number-input/use-number-input.d.ts +4 -2
- package/types/pagination/pagination-context.d.ts +3 -2
- package/types/pagination/pagination-ellipsis.d.ts +2 -1
- package/types/pagination/pagination-item.d.ts +2 -1
- package/types/pagination/pagination.d.ts +4 -3
- package/types/pagination/use-pagination.d.ts +4 -2
- package/types/pin-input/pin-input-context.d.ts +3 -2
- package/types/pin-input/pin-input-control.d.ts +2 -1
- package/types/pin-input/pin-input-field.d.ts +3 -2
- package/types/pin-input/pin-input-label.d.ts +2 -1
- package/types/pin-input/pin-input.d.ts +2 -1
- package/types/pin-input/use-pin-input.d.ts +4 -2
- package/types/popover/popover-anchor.d.ts +2 -1
- package/types/popover/popover-arrow-tip.d.ts +2 -1
- package/types/popover/popover-arrow.d.ts +2 -1
- package/types/popover/popover-close-trigger.d.ts +2 -1
- package/types/popover/popover-content.d.ts +2 -2
- package/types/popover/popover-context.d.ts +3 -2
- package/types/popover/popover-description.d.ts +2 -1
- package/types/popover/popover-indicator.d.ts +2 -1
- package/types/popover/popover-positioner.d.ts +2 -1
- package/types/popover/popover-title.d.ts +2 -1
- package/types/popover/popover-trigger.d.ts +2 -1
- package/types/popover/popover.d.ts +5 -4
- package/types/popover/use-popover.d.ts +4 -2
- package/types/presence/index.d.ts +5 -2
- package/types/presence/presence-context.d.ts +4 -0
- package/types/presence/presence-props-context.d.ts +4 -0
- package/types/presence/presence.d.ts +4 -15
- package/types/presence/split-presence-props.d.ts +2 -2
- package/types/presence/use-presence.d.ts +23 -2
- package/types/radio-group/radio-group-context.d.ts +3 -2
- package/types/radio-group/radio-group-indicator.d.ts +2 -1
- package/types/radio-group/radio-group-item-context.d.ts +3 -2
- package/types/radio-group/radio-group-item-control.d.ts +2 -1
- package/types/radio-group/radio-group-item-text.d.ts +2 -1
- package/types/radio-group/radio-group-item.d.ts +2 -1
- package/types/radio-group/radio-group-label.d.ts +2 -1
- package/types/radio-group/radio-group.d.ts +2 -1
- package/types/radio-group/use-radio-group.d.ts +4 -2
- package/types/rating-group/rating-group-context.d.ts +3 -2
- package/types/rating-group/rating-group-control.d.ts +6 -5
- package/types/rating-group/rating-group-item-context.d.ts +4 -2
- package/types/rating-group/rating-group-item.d.ts +6 -6
- package/types/rating-group/rating-group-label.d.ts +2 -1
- package/types/rating-group/rating-group.d.ts +2 -1
- package/types/rating-group/use-rating-group.d.ts +4 -2
- package/types/segment-group/segment-group-context.d.ts +3 -2
- package/types/segment-group/segment-group-indicator.d.ts +2 -1
- package/types/segment-group/segment-group-item-control.d.ts +2 -1
- package/types/segment-group/segment-group-item-text.d.ts +2 -1
- package/types/segment-group/segment-group-item.d.ts +2 -1
- package/types/segment-group/segment-group-label.d.ts +2 -1
- package/types/segment-group/segment-group.d.ts +2 -1
- package/types/segment-group/use-segment-group.d.ts +4 -2
- package/types/select/select-clear-trigger.d.ts +2 -1
- package/types/select/select-content.d.ts +2 -2
- package/types/select/select-context.d.ts +2 -1
- package/types/select/select-control.d.ts +2 -1
- package/types/select/select-indicator.d.ts +2 -1
- package/types/select/select-item-context.d.ts +2 -1
- package/types/select/select-item-group-label.d.ts +6 -2
- package/types/select/select-item-group.d.ts +2 -1
- package/types/select/select-item-indicator.d.ts +2 -1
- package/types/select/select-item-text.d.ts +2 -1
- package/types/select/select-item.d.ts +5 -4
- package/types/select/select-label.d.ts +2 -1
- package/types/select/select-positioner.d.ts +2 -1
- package/types/select/select-trigger.d.ts +2 -1
- package/types/select/select.d.ts +7 -6
- package/types/select/use-select.d.ts +2 -1
- package/types/slider/index.d.ts +4 -4
- package/types/slider/slider-context.d.ts +3 -2
- package/types/slider/slider-control.d.ts +2 -1
- package/types/slider/slider-label.d.ts +2 -1
- package/types/slider/slider-marker-group.d.ts +2 -1
- package/types/slider/slider-marker.d.ts +2 -1
- package/types/slider/slider-range.d.ts +2 -1
- package/types/slider/slider-thumb.d.ts +2 -1
- package/types/slider/slider-track.d.ts +2 -1
- package/types/slider/slider-value-text.d.ts +4 -0
- package/types/slider/slider.d.ts +4 -3
- package/types/slider/use-slider.d.ts +4 -2
- package/types/splitter/splitter-context.d.ts +3 -2
- package/types/splitter/splitter-panel.d.ts +2 -1
- package/types/splitter/splitter-resize-trigger.d.ts +2 -1
- package/types/splitter/splitter.d.ts +4 -3
- package/types/splitter/use-splitter.d.ts +4 -2
- package/types/switch/switch-context.d.ts +3 -2
- package/types/switch/switch-control.d.ts +2 -1
- package/types/switch/switch-label.d.ts +2 -1
- package/types/switch/switch-thumb.d.ts +2 -1
- package/types/switch/switch.d.ts +5 -5
- package/types/switch/use-switch.d.ts +4 -2
- package/types/tabs/tab-content.d.ts +2 -2
- package/types/tabs/tab-indicator.d.ts +2 -1
- package/types/tabs/tab-list.d.ts +2 -1
- package/types/tabs/tab-trigger.d.ts +2 -1
- package/types/tabs/tabs-context.d.ts +3 -2
- package/types/tabs/tabs.d.ts +3 -1
- package/types/tabs/use-tabs.d.ts +4 -2
- package/types/tags-input/tags-input-clear-trigger.d.ts +2 -1
- package/types/tags-input/tags-input-context.d.ts +3 -2
- package/types/tags-input/tags-input-control.d.ts +2 -1
- package/types/tags-input/tags-input-input.d.ts +2 -1
- package/types/tags-input/tags-input-item-context.d.ts +3 -2
- package/types/tags-input/tags-input-item-delete-trigger.d.ts +2 -1
- package/types/tags-input/tags-input-item-input.d.ts +2 -1
- package/types/tags-input/tags-input-item-text.d.ts +2 -1
- package/types/tags-input/tags-input-item.d.ts +5 -4
- package/types/tags-input/tags-input-label.d.ts +2 -1
- package/types/tags-input/tags-input.d.ts +5 -5
- package/types/tags-input/use-tags-input.d.ts +4 -2
- package/types/toast/toast-close-trigger.d.ts +2 -1
- package/types/toast/toast-description.d.ts +2 -1
- package/types/toast/toast-title.d.ts +2 -1
- package/types/toast/toast.d.ts +2 -1
- package/types/toggle-group/toggle-group-context.d.ts +3 -2
- package/types/toggle-group/toggle-group.d.ts +2 -1
- package/types/toggle-group/use-toggle-group.d.ts +4 -2
- package/types/tooltip/tooltip-arrow-tip.d.ts +2 -1
- package/types/tooltip/tooltip-arrow.d.ts +2 -1
- package/types/tooltip/tooltip-content.d.ts +2 -2
- package/types/tooltip/tooltip-context.d.ts +3 -2
- package/types/tooltip/tooltip-positioner.d.ts +2 -1
- package/types/tooltip/tooltip-trigger.d.ts +2 -1
- package/types/tooltip/tooltip.d.ts +6 -5
- package/types/tooltip/use-tooltip.d.ts +4 -2
- package/source/slider/slider-output.jsx +0 -10
- package/source/tabs/tab-presence.jsx +0 -6
- package/types/slider/slider-output.d.ts +0 -8
- package/types/tabs/tab-presence.d.ts +0 -4
- /package/source/date-picker/{use-date-picker.jsx → use-date-picker.js} +0 -0
- /package/source/radio-group/{use-radio-group.jsx → use-radio-group.js} +0 -0
- /package/source/rating-group/{use-rating-group.jsx → use-rating-group.js} +0 -0
- /package/source/segment-group/{use-segment-group.jsx → use-segment-group.js} +0 -0
package/cjs/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var web = require('solid-js/web');
|
|
4
4
|
var solid = require('@zag-js/solid');
|
|
5
5
|
var solidJs = require('solid-js');
|
|
6
|
-
var accordion = require('@zag-js/accordion');
|
|
7
6
|
var presence = require('@zag-js/presence');
|
|
7
|
+
var accordion = require('@zag-js/accordion');
|
|
8
8
|
var avatar = require('@zag-js/avatar');
|
|
9
9
|
var carousel = require('@zag-js/carousel');
|
|
10
10
|
var anatomy = require('@ark-ui/anatomy');
|
|
@@ -49,8 +49,8 @@ function _interopNamespaceDefault(e) {
|
|
|
49
49
|
return Object.freeze(n);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var accordion__namespace = /*#__PURE__*/_interopNamespaceDefault(accordion);
|
|
53
52
|
var presence__namespace = /*#__PURE__*/_interopNamespaceDefault(presence);
|
|
53
|
+
var accordion__namespace = /*#__PURE__*/_interopNamespaceDefault(accordion);
|
|
54
54
|
var avatar__namespace = /*#__PURE__*/_interopNamespaceDefault(avatar);
|
|
55
55
|
var carousel__namespace = /*#__PURE__*/_interopNamespaceDefault(carousel);
|
|
56
56
|
var checkbox__namespace = /*#__PURE__*/_interopNamespaceDefault(checkbox);
|
|
@@ -441,6 +441,49 @@ function jsxFactory() {
|
|
|
441
441
|
}
|
|
442
442
|
const ark = jsxFactory();
|
|
443
443
|
|
|
444
|
+
function splitPresenceProps(props) {
|
|
445
|
+
return createSplitProps()(props, ['lazyMount', 'onExitComplete', 'present', 'unmountOnExit']);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
const usePresence = props => {
|
|
449
|
+
const [localProps, machineProps] = solidJs.splitProps(props, ['lazyMount', 'unmountOnExit']);
|
|
450
|
+
const [wasEverPresent, setWasEverPresent] = solidJs.createSignal(false);
|
|
451
|
+
const [state, send] = solid.useMachine(presence__namespace.machine(machineProps), {
|
|
452
|
+
context: machineProps
|
|
453
|
+
});
|
|
454
|
+
const api = solidJs.createMemo(() => presence__namespace.connect(state, send, solid.normalizeProps));
|
|
455
|
+
solidJs.createEffect(() => {
|
|
456
|
+
const isPresent = api().isPresent;
|
|
457
|
+
if (isPresent) setWasEverPresent(true);
|
|
458
|
+
});
|
|
459
|
+
return solidJs.createMemo(() => ({
|
|
460
|
+
isUnmounted: !api().isPresent && !wasEverPresent() && localProps.lazyMount || localProps.unmountOnExit && !api().isPresent && wasEverPresent(),
|
|
461
|
+
isPresent: api().isPresent,
|
|
462
|
+
presenceProps: {
|
|
463
|
+
ref: api().setNode,
|
|
464
|
+
hidden: !api().isPresent,
|
|
465
|
+
'data-state': machineProps.present ? 'open' : 'closed'
|
|
466
|
+
}
|
|
467
|
+
}));
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
const Presence$1 = props => {
|
|
471
|
+
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
472
|
+
const api = usePresence(presenceProps);
|
|
473
|
+
const mergedProps = solid.mergeProps(() => api().presenceProps, localProps);
|
|
474
|
+
return web.createComponent(solidJs.Show, {
|
|
475
|
+
get when() {
|
|
476
|
+
return !api().isUnmounted;
|
|
477
|
+
},
|
|
478
|
+
get children() {
|
|
479
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
480
|
+
"data-scope": "presence",
|
|
481
|
+
"data-part": "root"
|
|
482
|
+
}));
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
};
|
|
486
|
+
|
|
444
487
|
function getErrorMessage(hook, provider) {
|
|
445
488
|
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
|
446
489
|
}
|
|
@@ -465,6 +508,20 @@ function createContext(options = {}) {
|
|
|
465
508
|
return [Context.Provider, useContext, Context];
|
|
466
509
|
}
|
|
467
510
|
|
|
511
|
+
const [PresenceProvider, usePresenceContext] = createContext({
|
|
512
|
+
hookName: 'usePresenceContext',
|
|
513
|
+
providerName: '<PresenceProvider />'
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
const [PresencePropsProvider, usePresencePropsContext] = createContext({
|
|
517
|
+
hookName: 'usePresencePropsContext',
|
|
518
|
+
providerName: '<PresencePropsProvider />'
|
|
519
|
+
});
|
|
520
|
+
|
|
521
|
+
const Presence = Object.assign(Presence$1, {
|
|
522
|
+
Root: Presence$1
|
|
523
|
+
});
|
|
524
|
+
|
|
468
525
|
const [AccordionProvider, useAccordionContext] = createContext({
|
|
469
526
|
hookName: 'useAccordionContext',
|
|
470
527
|
providerName: '<AccordionProvider />'
|
|
@@ -476,7 +533,7 @@ const [EnvironmentProvider, useEnvironmentContext] = createContext({
|
|
|
476
533
|
strict: false
|
|
477
534
|
});
|
|
478
535
|
|
|
479
|
-
const _tmpl$$
|
|
536
|
+
const _tmpl$$b = /*#__PURE__*/web.template(`<span hidden>`);
|
|
480
537
|
const Environment$1 = props => {
|
|
481
538
|
// eslint-disable-next-line prefer-const
|
|
482
539
|
let spanRef = undefined;
|
|
@@ -487,7 +544,7 @@ const Environment$1 = props => {
|
|
|
487
544
|
},
|
|
488
545
|
get children() {
|
|
489
546
|
return [web.memo(() => props.children), web.memo(() => web.memo(() => !!!props.value)() && (() => {
|
|
490
|
-
const _el$ = _tmpl$$
|
|
547
|
+
const _el$ = _tmpl$$b();
|
|
491
548
|
const _ref$ = spanRef;
|
|
492
549
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : spanRef = _el$;
|
|
493
550
|
return _el$;
|
|
@@ -513,13 +570,19 @@ const useAccordion = props => {
|
|
|
513
570
|
};
|
|
514
571
|
|
|
515
572
|
const Accordion$1 = props => {
|
|
516
|
-
const [
|
|
517
|
-
const
|
|
518
|
-
const
|
|
573
|
+
const [presenceProps, accordionProps] = splitPresenceProps(props);
|
|
574
|
+
const [useAccordionProps, localProps] = createSplitProps()(accordionProps, ['collapsible', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'multiple', 'onFocusChange', 'onValueChange', 'orientation', 'value']);
|
|
575
|
+
const api = useAccordion(useAccordionProps);
|
|
576
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
519
577
|
return web.createComponent(AccordionProvider, {
|
|
520
578
|
value: api,
|
|
521
579
|
get children() {
|
|
522
|
-
return web.createComponent(
|
|
580
|
+
return web.createComponent(PresencePropsProvider, {
|
|
581
|
+
value: presenceProps,
|
|
582
|
+
get children() {
|
|
583
|
+
return web.createComponent(ark.div, mergedProps);
|
|
584
|
+
}
|
|
585
|
+
});
|
|
523
586
|
}
|
|
524
587
|
});
|
|
525
588
|
};
|
|
@@ -533,75 +596,44 @@ const [AccordionItemProvider, useAccordionItemContext] = createContext({
|
|
|
533
596
|
});
|
|
534
597
|
|
|
535
598
|
const AccordionItem = props => {
|
|
536
|
-
const [itemProps,
|
|
599
|
+
const [itemProps, localProps] = createSplitProps()(props, ['value', 'disabled']);
|
|
537
600
|
const api = useAccordionContext();
|
|
538
|
-
const
|
|
539
|
-
const
|
|
540
|
-
|
|
601
|
+
const presenceProps = usePresencePropsContext();
|
|
602
|
+
const presenceApi = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
603
|
+
present: api().getItemState(itemProps).isOpen
|
|
604
|
+
})));
|
|
605
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
606
|
+
const getChildren = () => runIfFn(localProps.children, () => api().getItemState(itemProps));
|
|
541
607
|
return web.createComponent(AccordionItemProvider, {
|
|
542
|
-
value:
|
|
608
|
+
value: itemProps,
|
|
543
609
|
get children() {
|
|
544
|
-
return web.createComponent(
|
|
610
|
+
return web.createComponent(PresenceProvider, {
|
|
611
|
+
value: presenceApi,
|
|
545
612
|
get children() {
|
|
546
|
-
return
|
|
613
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
614
|
+
get children() {
|
|
615
|
+
return getChildren();
|
|
616
|
+
}
|
|
617
|
+
}));
|
|
547
618
|
}
|
|
548
|
-
}));
|
|
549
|
-
}
|
|
550
|
-
});
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
const usePresence = props => {
|
|
554
|
-
const [state, send] = solid.useMachine(presence__namespace.machine(props), {
|
|
555
|
-
context: props
|
|
556
|
-
});
|
|
557
|
-
return solidJs.createMemo(() => presence__namespace.connect(state, send, solid.normalizeProps));
|
|
558
|
-
};
|
|
559
|
-
|
|
560
|
-
const Presence$1 = props => {
|
|
561
|
-
const [presenceProps, localProps] = createSplitProps()(props, ['onExitComplete', 'present']);
|
|
562
|
-
const api = usePresence(presenceProps);
|
|
563
|
-
const [wasEverPresent, setWasEverPresent] = solidJs.createSignal(false);
|
|
564
|
-
const getChildren = solidJs.children(() => props.children);
|
|
565
|
-
solidJs.createEffect(() => {
|
|
566
|
-
const isPresent = api().isPresent;
|
|
567
|
-
if (isPresent) setWasEverPresent(true);
|
|
568
|
-
const children = getChildren();
|
|
569
|
-
if (children instanceof HTMLElement) {
|
|
570
|
-
api().setNode(children);
|
|
571
|
-
web.spread(children, {
|
|
572
|
-
['data-state']: presenceProps.present ? 'open' : 'closed',
|
|
573
|
-
hidden: !api().isPresent
|
|
574
619
|
});
|
|
575
620
|
}
|
|
576
621
|
});
|
|
577
|
-
return web.memo((() => {
|
|
578
|
-
const _c$ = web.memo(() => !!(!api().isPresent && !wasEverPresent() && localProps.lazyMount || localProps.unmountOnExit && !api().isPresent && wasEverPresent()));
|
|
579
|
-
return () => _c$() ? null : getChildren();
|
|
580
|
-
})());
|
|
581
622
|
};
|
|
582
623
|
|
|
583
|
-
function splitPresenceProps(props) {
|
|
584
|
-
return createSplitProps()(props, ['lazyMount', 'onExitComplete', 'present', 'unmountOnExit']);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
const Presence = Object.assign(Presence$1, {
|
|
588
|
-
Root: Presence$1
|
|
589
|
-
});
|
|
590
|
-
|
|
591
624
|
const AccordionItemContent = props => {
|
|
592
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
593
625
|
const api = useAccordionContext();
|
|
594
626
|
const accordionItem = useAccordionItemContext();
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
627
|
+
const presenceApi = usePresenceContext();
|
|
628
|
+
const mergedProps = solid.mergeProps(() => api().getItemContentProps(accordionItem), () => presenceApi().presenceProps, props);
|
|
629
|
+
return web.createComponent(solidJs.Show, {
|
|
630
|
+
get when() {
|
|
631
|
+
return !presenceApi().isUnmounted;
|
|
632
|
+
},
|
|
601
633
|
get children() {
|
|
602
|
-
return web.createComponent(ark.div,
|
|
634
|
+
return web.createComponent(ark.div, mergedProps);
|
|
603
635
|
}
|
|
604
|
-
})
|
|
636
|
+
});
|
|
605
637
|
};
|
|
606
638
|
|
|
607
639
|
const AccordionItemIndicator = props => {
|
|
@@ -614,7 +646,12 @@ const AccordionItemIndicator = props => {
|
|
|
614
646
|
const AccordionItemTrigger = props => {
|
|
615
647
|
const api = useAccordionContext();
|
|
616
648
|
const item = useAccordionItemContext();
|
|
617
|
-
const
|
|
649
|
+
const presenceApi = usePresenceContext();
|
|
650
|
+
const mergedProps = solid.mergeProps(() => api().getItemTriggerProps(item), () => ({
|
|
651
|
+
'aria-controls': presenceApi().isUnmounted && null
|
|
652
|
+
}), props);
|
|
653
|
+
|
|
654
|
+
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
618
655
|
return web.createComponent(ark.button, mergedProps);
|
|
619
656
|
};
|
|
620
657
|
|
|
@@ -646,25 +683,25 @@ const useAvatar = props => {
|
|
|
646
683
|
const Avatar$1 = props => {
|
|
647
684
|
const [params, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'onLoadingStatusChange']);
|
|
648
685
|
const api = useAvatar(params);
|
|
649
|
-
const
|
|
686
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
650
687
|
return web.createComponent(AvatarProvider, {
|
|
651
688
|
value: api,
|
|
652
689
|
get children() {
|
|
653
|
-
return web.createComponent(ark.div,
|
|
690
|
+
return web.createComponent(ark.div, mergedProps);
|
|
654
691
|
}
|
|
655
692
|
});
|
|
656
693
|
};
|
|
657
694
|
|
|
658
695
|
const AvatarFallback = props => {
|
|
659
696
|
const avatar = useAvatarContext();
|
|
660
|
-
const
|
|
661
|
-
return web.createComponent(ark.span,
|
|
697
|
+
const mergedProps = solid.mergeProps(() => avatar().fallbackProps, props);
|
|
698
|
+
return web.createComponent(ark.span, mergedProps);
|
|
662
699
|
};
|
|
663
700
|
|
|
664
701
|
const AvatarImage = props => {
|
|
665
702
|
const avatar = useAvatarContext();
|
|
666
|
-
const
|
|
667
|
-
return web.createComponent(ark.img,
|
|
703
|
+
const mergedProps = solid.mergeProps(() => avatar().imageProps, props);
|
|
704
|
+
return web.createComponent(ark.img, mergedProps);
|
|
668
705
|
};
|
|
669
706
|
|
|
670
707
|
const Avatar = Object.assign(Avatar$1, {
|
|
@@ -692,12 +729,17 @@ const useCarousel = props => {
|
|
|
692
729
|
|
|
693
730
|
const Carousel$1 = props => {
|
|
694
731
|
const [useCarouselProps, localProps] = createSplitProps()(props, ['align', 'dir', 'getRootNode', 'id', 'ids', 'index', 'loop', 'onIndexChange', 'orientation', 'slidesPerView', 'spacing']);
|
|
695
|
-
const
|
|
696
|
-
const
|
|
732
|
+
const api = useCarousel(useCarouselProps);
|
|
733
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
734
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
697
735
|
return web.createComponent(CarouselProvider, {
|
|
698
|
-
value:
|
|
736
|
+
value: api,
|
|
699
737
|
get children() {
|
|
700
|
-
return web.createComponent(ark.div,
|
|
738
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
739
|
+
get children() {
|
|
740
|
+
return getChildren();
|
|
741
|
+
}
|
|
742
|
+
}));
|
|
701
743
|
}
|
|
702
744
|
});
|
|
703
745
|
};
|
|
@@ -797,12 +839,12 @@ const Checkbox$1 = props => {
|
|
|
797
839
|
});
|
|
798
840
|
};
|
|
799
841
|
|
|
800
|
-
const _tmpl$$
|
|
842
|
+
const _tmpl$$a = /*#__PURE__*/web.template(`<input>`);
|
|
801
843
|
const CheckboxControl = props => {
|
|
802
844
|
const api = useCheckboxContext();
|
|
803
845
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
804
846
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
805
|
-
const _el$ = _tmpl$$
|
|
847
|
+
const _el$ = _tmpl$$a();
|
|
806
848
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
807
849
|
return _el$;
|
|
808
850
|
})()];
|
|
@@ -816,8 +858,8 @@ const CheckboxIndicator = props => {
|
|
|
816
858
|
|
|
817
859
|
const CheckboxLabel = props => {
|
|
818
860
|
const checkbox = useCheckboxContext();
|
|
819
|
-
const
|
|
820
|
-
return web.createComponent(ark.span,
|
|
861
|
+
const mergedProps = solid.mergeProps(() => checkbox().labelProps, props);
|
|
862
|
+
return web.createComponent(ark.span, mergedProps);
|
|
821
863
|
};
|
|
822
864
|
|
|
823
865
|
const Checkbox = Object.assign(Checkbox$1, {
|
|
@@ -846,21 +888,30 @@ const useColorPicker = props => {
|
|
|
846
888
|
return solidJs.createMemo(() => colorPicker__namespace.connect(state, send, solid.normalizeProps));
|
|
847
889
|
};
|
|
848
890
|
|
|
849
|
-
const _tmpl$$
|
|
891
|
+
const _tmpl$$9 = /*#__PURE__*/web.template(`<input>`);
|
|
850
892
|
const ColorPicker$1 = props => {
|
|
851
|
-
const [
|
|
852
|
-
const
|
|
893
|
+
const [presenceProps, colorPickerProps] = splitPresenceProps(props);
|
|
894
|
+
const [useColorPickerProps, localProps] = createSplitProps()(colorPickerProps, ['autoFocus', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'name', 'name', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onValueChange', 'onValueChangeEnd', 'open', 'positioning', 'readOnly', 'value']);
|
|
895
|
+
const api = useColorPicker(useColorPickerProps);
|
|
896
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
897
|
+
present: api().isOpen
|
|
898
|
+
})));
|
|
853
899
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
854
900
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
855
901
|
return web.createComponent(ColorPickerProvider, {
|
|
856
902
|
value: api,
|
|
857
903
|
get children() {
|
|
858
|
-
return [web.createComponent(
|
|
904
|
+
return [web.createComponent(PresenceProvider, {
|
|
905
|
+
value: apiPresence,
|
|
859
906
|
get children() {
|
|
860
|
-
return
|
|
907
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
908
|
+
get children() {
|
|
909
|
+
return getChildren();
|
|
910
|
+
}
|
|
911
|
+
}));
|
|
861
912
|
}
|
|
862
|
-
})
|
|
863
|
-
const _el$ = _tmpl$$
|
|
913
|
+
}), (() => {
|
|
914
|
+
const _el$ = _tmpl$$9();
|
|
864
915
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
865
916
|
return _el$;
|
|
866
917
|
})()];
|
|
@@ -939,8 +990,16 @@ const ColorPickerChannelSliderTrack = props => {
|
|
|
939
990
|
|
|
940
991
|
const ColorPickerContent = props => {
|
|
941
992
|
const api = useColorPickerContext();
|
|
942
|
-
const
|
|
943
|
-
|
|
993
|
+
const presenceApi = usePresenceContext();
|
|
994
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
995
|
+
return web.createComponent(solidJs.Show, {
|
|
996
|
+
get when() {
|
|
997
|
+
return !presenceApi().isUnmounted;
|
|
998
|
+
},
|
|
999
|
+
get children() {
|
|
1000
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
944
1003
|
};
|
|
945
1004
|
|
|
946
1005
|
const ColorPickerControl = props => {
|
|
@@ -963,8 +1022,16 @@ const ColorPickerLabel = props => {
|
|
|
963
1022
|
|
|
964
1023
|
const ColorPickerPositioner = props => {
|
|
965
1024
|
const api = useColorPickerContext();
|
|
1025
|
+
const presenceApi = usePresenceContext();
|
|
966
1026
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
967
|
-
return web.createComponent(
|
|
1027
|
+
return web.createComponent(solidJs.Show, {
|
|
1028
|
+
get when() {
|
|
1029
|
+
return !presenceApi().isUnmounted;
|
|
1030
|
+
},
|
|
1031
|
+
get children() {
|
|
1032
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1033
|
+
}
|
|
1034
|
+
});
|
|
968
1035
|
};
|
|
969
1036
|
|
|
970
1037
|
const ColorPickerSwatch = props => {
|
|
@@ -1000,6 +1067,35 @@ const ColorPickerTrigger = props => {
|
|
|
1000
1067
|
return web.createComponent(ark.button, mergedProps);
|
|
1001
1068
|
};
|
|
1002
1069
|
|
|
1070
|
+
const ColorPickerValueText = props => {
|
|
1071
|
+
const api = useColorPickerContext();
|
|
1072
|
+
const mergedProps = solid.mergeProps(() => anatomy.colorPickerAnatomy.build().valueText.attrs, props);
|
|
1073
|
+
return web.createComponent(ark.span, web.mergeProps(mergedProps, {
|
|
1074
|
+
get children() {
|
|
1075
|
+
return api().valueAsString || props.children;
|
|
1076
|
+
}
|
|
1077
|
+
}));
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
const ColorPickerView = props => {
|
|
1081
|
+
const api = useColorPickerContext();
|
|
1082
|
+
const mergedProps = solid.mergeProps(() => anatomy.colorPickerAnatomy.build().view.attrs, props);
|
|
1083
|
+
|
|
1084
|
+
// TODO @segunadebayo
|
|
1085
|
+
return web.createComponent(solidJs.Show, {
|
|
1086
|
+
get when() {
|
|
1087
|
+
return api().format === props.format;
|
|
1088
|
+
},
|
|
1089
|
+
get children() {
|
|
1090
|
+
return web.createComponent(ark.div, web.mergeProps({
|
|
1091
|
+
get ["data-format"]() {
|
|
1092
|
+
return props.format;
|
|
1093
|
+
}
|
|
1094
|
+
}, mergedProps));
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
};
|
|
1098
|
+
|
|
1003
1099
|
const ColorPicker = Object.assign(ColorPicker$1, {
|
|
1004
1100
|
Root: ColorPicker$1,
|
|
1005
1101
|
Area: ColorPickerArea,
|
|
@@ -1018,7 +1114,9 @@ const ColorPicker = Object.assign(ColorPicker$1, {
|
|
|
1018
1114
|
SwatchGroup: ColorPickerSwatchGroup,
|
|
1019
1115
|
SwatchTrigger: ColorPickerSwatchTrigger,
|
|
1020
1116
|
TransparencyGrid: ColorPickerTransparencyGrid,
|
|
1021
|
-
Trigger: ColorPickerTrigger
|
|
1117
|
+
Trigger: ColorPickerTrigger,
|
|
1118
|
+
ValueText: ColorPickerValueText,
|
|
1119
|
+
View: ColorPickerView
|
|
1022
1120
|
});
|
|
1023
1121
|
|
|
1024
1122
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1043,18 +1141,27 @@ const useCombobox = props => {
|
|
|
1043
1141
|
};
|
|
1044
1142
|
|
|
1045
1143
|
const Combobox$1 = props => {
|
|
1046
|
-
const [
|
|
1047
|
-
const
|
|
1144
|
+
const [presenceProps, comboboxProps] = splitPresenceProps(props);
|
|
1145
|
+
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']);
|
|
1146
|
+
const api = useCombobox(useComboboxProps);
|
|
1147
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1148
|
+
present: api().isOpen
|
|
1149
|
+
})));
|
|
1048
1150
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1049
1151
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1050
1152
|
return web.createComponent(ComboboxProvider, {
|
|
1051
1153
|
value: api,
|
|
1052
1154
|
get children() {
|
|
1053
|
-
return web.createComponent(
|
|
1155
|
+
return web.createComponent(PresenceProvider, {
|
|
1156
|
+
value: apiPresence,
|
|
1054
1157
|
get children() {
|
|
1055
|
-
return
|
|
1158
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1159
|
+
get children() {
|
|
1160
|
+
return getChildren();
|
|
1161
|
+
}
|
|
1162
|
+
}));
|
|
1056
1163
|
}
|
|
1057
|
-
})
|
|
1164
|
+
});
|
|
1058
1165
|
}
|
|
1059
1166
|
});
|
|
1060
1167
|
};
|
|
@@ -1066,18 +1173,17 @@ const ComboboxClearTrigger = props => {
|
|
|
1066
1173
|
};
|
|
1067
1174
|
|
|
1068
1175
|
const ComboboxContent = props => {
|
|
1069
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1070
1176
|
const api = useComboboxContext();
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1177
|
+
const presenceApi = usePresenceContext();
|
|
1178
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1179
|
+
return web.createComponent(solidJs.Show, {
|
|
1180
|
+
get when() {
|
|
1181
|
+
return !presenceApi().isUnmounted;
|
|
1182
|
+
},
|
|
1077
1183
|
get children() {
|
|
1078
1184
|
return web.createComponent(ark.div, mergedProps);
|
|
1079
1185
|
}
|
|
1080
|
-
})
|
|
1186
|
+
});
|
|
1081
1187
|
};
|
|
1082
1188
|
|
|
1083
1189
|
const ComboboxControl = props => {
|
|
@@ -1122,9 +1228,11 @@ const ComboboxItemGroup = props => {
|
|
|
1122
1228
|
};
|
|
1123
1229
|
|
|
1124
1230
|
const ComboboxItemGroupLabel = props => {
|
|
1125
|
-
const [labelProps, localProps] = createSplitProps()(props, ['
|
|
1231
|
+
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
1126
1232
|
const api = useComboboxContext();
|
|
1127
|
-
const mergedProps = solid.mergeProps(() => api().getItemGroupLabelProps(
|
|
1233
|
+
const mergedProps = solid.mergeProps(() => api().getItemGroupLabelProps({
|
|
1234
|
+
htmlFor: labelProps.for
|
|
1235
|
+
}), localProps);
|
|
1128
1236
|
return web.createComponent(ark.div, mergedProps);
|
|
1129
1237
|
};
|
|
1130
1238
|
|
|
@@ -1149,9 +1257,17 @@ const ComboboxLabel = props => {
|
|
|
1149
1257
|
};
|
|
1150
1258
|
|
|
1151
1259
|
const ComboboxPositioner = props => {
|
|
1152
|
-
const
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1260
|
+
const api = useComboboxContext();
|
|
1261
|
+
const presenceApi = usePresenceContext();
|
|
1262
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
1263
|
+
return web.createComponent(solidJs.Show, {
|
|
1264
|
+
get when() {
|
|
1265
|
+
return !presenceApi().isUnmounted;
|
|
1266
|
+
},
|
|
1267
|
+
get children() {
|
|
1268
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1269
|
+
}
|
|
1270
|
+
});
|
|
1155
1271
|
};
|
|
1156
1272
|
|
|
1157
1273
|
const ComboboxTrigger = props => {
|
|
@@ -1197,18 +1313,27 @@ const useDatePicker = props => {
|
|
|
1197
1313
|
};
|
|
1198
1314
|
|
|
1199
1315
|
const DatePicker$1 = props => {
|
|
1200
|
-
const [
|
|
1201
|
-
const
|
|
1316
|
+
const [presenceProps, datePickerProps] = splitPresenceProps(props);
|
|
1317
|
+
const [useDatePickerProps, localProps] = createSplitProps()(datePickerProps, ['closeOnSelect', 'dir', 'disabled', 'fixedWeeks', 'focusedValue', 'format', 'getRootNode', 'id', 'ids', 'isDateUnavailable', 'isDateUnavailable', 'locale', 'max', 'messages', 'min', 'modal', 'name', 'numOfMonths', 'onFocusChange', 'onOpenChange', 'onValueChange', 'onViewChange', 'open', 'parse', 'positioning', 'readOnly', 'selectionMode', 'startOfWeek', 'timeZone', 'value', 'view']);
|
|
1318
|
+
const api = useDatePicker(useDatePickerProps);
|
|
1319
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1320
|
+
present: api().isOpen
|
|
1321
|
+
})));
|
|
1202
1322
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1203
1323
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1204
1324
|
return web.createComponent(DatePickerProvider, {
|
|
1205
1325
|
value: api,
|
|
1206
1326
|
get children() {
|
|
1207
|
-
return web.createComponent(
|
|
1327
|
+
return web.createComponent(PresenceProvider, {
|
|
1328
|
+
value: apiPresence,
|
|
1208
1329
|
get children() {
|
|
1209
|
-
return
|
|
1330
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1331
|
+
get children() {
|
|
1332
|
+
return getChildren();
|
|
1333
|
+
}
|
|
1334
|
+
}));
|
|
1210
1335
|
}
|
|
1211
|
-
})
|
|
1336
|
+
});
|
|
1212
1337
|
}
|
|
1213
1338
|
});
|
|
1214
1339
|
};
|
|
@@ -1221,8 +1346,16 @@ const DatePickerClearTrigger = props => {
|
|
|
1221
1346
|
|
|
1222
1347
|
const DatePickerContent = props => {
|
|
1223
1348
|
const api = useDatePickerContext();
|
|
1224
|
-
const
|
|
1225
|
-
|
|
1349
|
+
const presenceApi = usePresenceContext();
|
|
1350
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1351
|
+
return web.createComponent(solidJs.Show, {
|
|
1352
|
+
get when() {
|
|
1353
|
+
return !presenceApi().isUnmounted;
|
|
1354
|
+
},
|
|
1355
|
+
get children() {
|
|
1356
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1357
|
+
}
|
|
1358
|
+
});
|
|
1226
1359
|
};
|
|
1227
1360
|
|
|
1228
1361
|
const DatePickerControl = props => {
|
|
@@ -1243,14 +1376,14 @@ const DatePickerLabel = props => {
|
|
|
1243
1376
|
return web.createComponent(ark.label, mergedProps);
|
|
1244
1377
|
};
|
|
1245
1378
|
|
|
1246
|
-
const _tmpl$$
|
|
1379
|
+
const _tmpl$$8 = /*#__PURE__*/web.template(`<option>`);
|
|
1247
1380
|
const DatePickerMonthSelect = props => {
|
|
1248
1381
|
const api = useDatePickerContext();
|
|
1249
1382
|
const mergedProps = solid.mergeProps(() => api().monthSelectProps, props);
|
|
1250
1383
|
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
1251
1384
|
get children() {
|
|
1252
1385
|
return api().getMonths().map(month => (() => {
|
|
1253
|
-
const _el$ = _tmpl$$
|
|
1386
|
+
const _el$ = _tmpl$$8();
|
|
1254
1387
|
web.insert(_el$, () => month.label);
|
|
1255
1388
|
web.effect(() => _el$.value = month.value);
|
|
1256
1389
|
return _el$;
|
|
@@ -1273,8 +1406,16 @@ const DatePickerNextTrigger = props => {
|
|
|
1273
1406
|
|
|
1274
1407
|
const DatePickerPositioner = props => {
|
|
1275
1408
|
const api = useDatePickerContext();
|
|
1409
|
+
const presenceApi = usePresenceContext();
|
|
1276
1410
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
1277
|
-
return web.createComponent(
|
|
1411
|
+
return web.createComponent(solidJs.Show, {
|
|
1412
|
+
get when() {
|
|
1413
|
+
return !presenceApi().isUnmounted;
|
|
1414
|
+
},
|
|
1415
|
+
get children() {
|
|
1416
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1417
|
+
}
|
|
1418
|
+
});
|
|
1278
1419
|
};
|
|
1279
1420
|
|
|
1280
1421
|
const DatePickerPrevTrigger = props => {
|
|
@@ -1395,10 +1536,11 @@ const DatePickerView = props => {
|
|
|
1395
1536
|
const [viewProps, localProps] = createSplitProps()(props, ['view']);
|
|
1396
1537
|
const api = useDatePickerContext();
|
|
1397
1538
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1539
|
+
const mergedProps = solid.mergeProps(() => anatomy.datePickerAnatomy.build().view.attrs, localProps);
|
|
1398
1540
|
return web.createComponent(DatePickerViewProvider, {
|
|
1399
1541
|
value: viewProps,
|
|
1400
1542
|
get children() {
|
|
1401
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
1543
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1402
1544
|
get hidden() {
|
|
1403
1545
|
return api().view !== viewProps.view;
|
|
1404
1546
|
},
|
|
@@ -1424,7 +1566,7 @@ const DatePickerViewTrigger = props => {
|
|
|
1424
1566
|
return web.createComponent(ark.button, mergedProps);
|
|
1425
1567
|
};
|
|
1426
1568
|
|
|
1427
|
-
const _tmpl$$
|
|
1569
|
+
const _tmpl$$7 = /*#__PURE__*/web.template(`<option>`);
|
|
1428
1570
|
const DatePickerYearSelect = props => {
|
|
1429
1571
|
const api = useDatePickerContext();
|
|
1430
1572
|
const mergedProps = solid.mergeProps(() => api().yearSelectProps, props);
|
|
@@ -1434,7 +1576,7 @@ const DatePickerYearSelect = props => {
|
|
|
1434
1576
|
from: 1_000,
|
|
1435
1577
|
to: 4_000
|
|
1436
1578
|
}).map(year => (() => {
|
|
1437
|
-
const _el$ = _tmpl$$
|
|
1579
|
+
const _el$ = _tmpl$$7();
|
|
1438
1580
|
_el$.value = year;
|
|
1439
1581
|
web.insert(_el$, year);
|
|
1440
1582
|
return _el$;
|
|
@@ -1494,75 +1636,95 @@ const useDialog = props => {
|
|
|
1494
1636
|
};
|
|
1495
1637
|
|
|
1496
1638
|
const Dialog$1 = props => {
|
|
1497
|
-
const [
|
|
1498
|
-
const
|
|
1639
|
+
const [presenceProps, dialogProps] = splitPresenceProps(props);
|
|
1640
|
+
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']);
|
|
1641
|
+
const api = useDialog(useDialogProps);
|
|
1642
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1643
|
+
present: api().isOpen
|
|
1644
|
+
})));
|
|
1499
1645
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1500
1646
|
return web.createComponent(DialogProvider, {
|
|
1501
1647
|
value: api,
|
|
1502
1648
|
get children() {
|
|
1503
|
-
return
|
|
1649
|
+
return web.createComponent(PresenceProvider, {
|
|
1650
|
+
value: apiPresence,
|
|
1651
|
+
get children() {
|
|
1652
|
+
return getChildren();
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1504
1655
|
}
|
|
1505
1656
|
});
|
|
1506
1657
|
};
|
|
1507
1658
|
|
|
1508
1659
|
const DialogBackdrop = props => {
|
|
1509
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1510
1660
|
const api = useDialogContext();
|
|
1511
|
-
const
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1661
|
+
const presenceApi = usePresenceContext();
|
|
1662
|
+
const mergedProps = solid.mergeProps(() => api().backdropProps, props);
|
|
1663
|
+
return web.createComponent(solidJs.Show, {
|
|
1664
|
+
get when() {
|
|
1665
|
+
return !presenceApi().isUnmounted;
|
|
1666
|
+
},
|
|
1517
1667
|
get children() {
|
|
1518
1668
|
return web.createComponent(ark.div, mergedProps);
|
|
1519
1669
|
}
|
|
1520
|
-
})
|
|
1670
|
+
});
|
|
1521
1671
|
};
|
|
1522
1672
|
|
|
1523
1673
|
const DialogCloseTrigger = props => {
|
|
1524
1674
|
const dialog = useDialogContext();
|
|
1525
|
-
const
|
|
1526
|
-
return web.createComponent(ark.button,
|
|
1675
|
+
const mergedProps = solid.mergeProps(() => dialog().triggerProps, props);
|
|
1676
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1527
1677
|
};
|
|
1528
1678
|
|
|
1529
1679
|
const DialogContent = props => {
|
|
1530
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1531
1680
|
const api = useDialogContext();
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1681
|
+
const presenceApi = usePresenceContext();
|
|
1682
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1683
|
+
return web.createComponent(solidJs.Show, {
|
|
1684
|
+
get when() {
|
|
1685
|
+
return !presenceApi().isUnmounted;
|
|
1686
|
+
},
|
|
1538
1687
|
get children() {
|
|
1539
1688
|
return web.createComponent(ark.div, mergedProps);
|
|
1540
1689
|
}
|
|
1541
|
-
})
|
|
1690
|
+
});
|
|
1542
1691
|
};
|
|
1543
1692
|
|
|
1544
1693
|
const DialogDescription = props => {
|
|
1545
1694
|
const dialog = useDialogContext();
|
|
1546
|
-
const
|
|
1547
|
-
return web.createComponent(ark.p,
|
|
1695
|
+
const mergedProps = solid.mergeProps(() => dialog().descriptionProps, props);
|
|
1696
|
+
return web.createComponent(ark.p, mergedProps);
|
|
1548
1697
|
};
|
|
1549
1698
|
|
|
1550
1699
|
const DialogPositioner = props => {
|
|
1551
|
-
const
|
|
1552
|
-
const
|
|
1553
|
-
|
|
1700
|
+
const api = useDialogContext();
|
|
1701
|
+
const presenceApi = usePresenceContext();
|
|
1702
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
1703
|
+
return web.createComponent(solidJs.Show, {
|
|
1704
|
+
get when() {
|
|
1705
|
+
return !presenceApi().isUnmounted;
|
|
1706
|
+
},
|
|
1707
|
+
get children() {
|
|
1708
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1709
|
+
}
|
|
1710
|
+
});
|
|
1554
1711
|
};
|
|
1555
1712
|
|
|
1556
1713
|
const DialogTitle = props => {
|
|
1557
1714
|
const dialog = useDialogContext();
|
|
1558
|
-
const
|
|
1559
|
-
return web.createComponent(ark.h2,
|
|
1715
|
+
const mergedProps = solid.mergeProps(() => dialog().titleProps, props);
|
|
1716
|
+
return web.createComponent(ark.h2, mergedProps);
|
|
1560
1717
|
};
|
|
1561
1718
|
|
|
1562
1719
|
const DialogTrigger = props => {
|
|
1563
|
-
const
|
|
1564
|
-
const
|
|
1565
|
-
|
|
1720
|
+
const api = useDialogContext();
|
|
1721
|
+
const presenceApi = usePresenceContext();
|
|
1722
|
+
const mergedProps = solid.mergeProps(() => api().triggerProps, () => ({
|
|
1723
|
+
'aria-controls': presenceApi().isUnmounted && null
|
|
1724
|
+
}), props);
|
|
1725
|
+
|
|
1726
|
+
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
1727
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1566
1728
|
};
|
|
1567
1729
|
|
|
1568
1730
|
const Dialog = Object.assign(Dialog$1, {
|
|
@@ -1597,12 +1759,12 @@ const Editable$1 = props => {
|
|
|
1597
1759
|
const [useEditableProps, restProps] = 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']);
|
|
1598
1760
|
const editable = useEditable(useEditableProps);
|
|
1599
1761
|
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
1600
|
-
const
|
|
1762
|
+
const mergedProps = solid.mergeProps(() => editable().rootProps, localProps);
|
|
1601
1763
|
const getChildren = () => runIfFn(childrenProps.children, editable);
|
|
1602
1764
|
return web.createComponent(EditableProvider, {
|
|
1603
1765
|
value: editable,
|
|
1604
1766
|
get children() {
|
|
1605
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
1767
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1606
1768
|
get children() {
|
|
1607
1769
|
return getChildren();
|
|
1608
1770
|
}
|
|
@@ -1613,50 +1775,50 @@ const Editable$1 = props => {
|
|
|
1613
1775
|
|
|
1614
1776
|
const EditableArea = props => {
|
|
1615
1777
|
const editable = useEditableContext();
|
|
1616
|
-
const
|
|
1617
|
-
return web.createComponent(ark.div,
|
|
1778
|
+
const mergedProps = solid.mergeProps(() => editable().areaProps, props);
|
|
1779
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1618
1780
|
};
|
|
1619
1781
|
|
|
1620
1782
|
const EditableCancelTrigger = props => {
|
|
1621
1783
|
const editable = useEditableContext();
|
|
1622
|
-
const
|
|
1623
|
-
return web.createComponent(ark.button,
|
|
1784
|
+
const mergedProps = solid.mergeProps(() => editable().cancelTriggerProps, props);
|
|
1785
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1624
1786
|
};
|
|
1625
1787
|
|
|
1626
1788
|
const EditableControl = props => {
|
|
1627
1789
|
const editable = useEditableContext();
|
|
1628
|
-
const
|
|
1629
|
-
return web.createComponent(ark.div,
|
|
1790
|
+
const mergedProps = solid.mergeProps(() => editable().controlProps, props);
|
|
1791
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1630
1792
|
};
|
|
1631
1793
|
|
|
1632
1794
|
const EditableEditTrigger = props => {
|
|
1633
1795
|
const editable = useEditableContext();
|
|
1634
|
-
const
|
|
1635
|
-
return web.createComponent(ark.button,
|
|
1796
|
+
const mergedProps = solid.mergeProps(() => editable().editTriggerProps, props);
|
|
1797
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1636
1798
|
};
|
|
1637
1799
|
|
|
1638
1800
|
const EditableInput = props => {
|
|
1639
1801
|
const editable = useEditableContext();
|
|
1640
|
-
const
|
|
1641
|
-
return web.createComponent(ark.input,
|
|
1802
|
+
const mergedProps = solid.mergeProps(() => editable().inputProps, props);
|
|
1803
|
+
return web.createComponent(ark.input, mergedProps);
|
|
1642
1804
|
};
|
|
1643
1805
|
|
|
1644
1806
|
const EditableLabel = props => {
|
|
1645
1807
|
const editable = useEditableContext();
|
|
1646
|
-
const
|
|
1647
|
-
return web.createComponent(ark.label,
|
|
1808
|
+
const mergedProps = solid.mergeProps(() => editable().labelProps, props);
|
|
1809
|
+
return web.createComponent(ark.label, mergedProps);
|
|
1648
1810
|
};
|
|
1649
1811
|
|
|
1650
1812
|
const EditablePreview = props => {
|
|
1651
1813
|
const editable = useEditableContext();
|
|
1652
|
-
const
|
|
1653
|
-
return web.createComponent(ark.span,
|
|
1814
|
+
const mergedProps = solid.mergeProps(() => editable().previewProps, props);
|
|
1815
|
+
return web.createComponent(ark.span, mergedProps);
|
|
1654
1816
|
};
|
|
1655
1817
|
|
|
1656
1818
|
const EditableSubmitTrigger = props => {
|
|
1657
1819
|
const dialog = useEditableContext();
|
|
1658
|
-
const
|
|
1659
|
-
return web.createComponent(ark.button,
|
|
1820
|
+
const mergedProps = solid.mergeProps(() => dialog().submitTriggerProps, props);
|
|
1821
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1660
1822
|
};
|
|
1661
1823
|
|
|
1662
1824
|
const Editable = Object.assign(Editable$1, {
|
|
@@ -1689,54 +1851,70 @@ const useHoverCard = props => {
|
|
|
1689
1851
|
};
|
|
1690
1852
|
|
|
1691
1853
|
const HoverCard$1 = props => {
|
|
1692
|
-
const [
|
|
1693
|
-
const
|
|
1854
|
+
const [presenceProps, hoverCardProps] = splitPresenceProps(props);
|
|
1855
|
+
const [useHoverCardProps, localProps] = createSplitProps()(hoverCardProps, ['closeDelay', 'dir', 'getRootNode', 'id', 'ids', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
1856
|
+
const api = useHoverCard(useHoverCardProps);
|
|
1857
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1858
|
+
present: api().isOpen
|
|
1859
|
+
})));
|
|
1694
1860
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1695
1861
|
return web.createComponent(HoverCardProvider, {
|
|
1696
1862
|
value: api,
|
|
1697
1863
|
get children() {
|
|
1698
|
-
return
|
|
1864
|
+
return web.createComponent(PresenceProvider, {
|
|
1865
|
+
value: apiPresence,
|
|
1866
|
+
get children() {
|
|
1867
|
+
return getChildren();
|
|
1868
|
+
}
|
|
1869
|
+
});
|
|
1699
1870
|
}
|
|
1700
1871
|
});
|
|
1701
1872
|
};
|
|
1702
1873
|
|
|
1703
1874
|
const HoverCardArrow = props => {
|
|
1704
1875
|
const hoverCard = useHoverCardContext();
|
|
1705
|
-
const
|
|
1706
|
-
return web.createComponent(ark.div,
|
|
1876
|
+
const mergedProps = solid.mergeProps(() => hoverCard().arrowProps, props);
|
|
1877
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1707
1878
|
};
|
|
1708
1879
|
|
|
1709
1880
|
const HoverCardArrowTip = props => {
|
|
1710
1881
|
const hoverCard = useHoverCardContext();
|
|
1711
|
-
const
|
|
1712
|
-
return web.createComponent(ark.div,
|
|
1882
|
+
const mergedProps = solid.mergeProps(() => hoverCard().arrowTipProps, props);
|
|
1883
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1713
1884
|
};
|
|
1714
1885
|
|
|
1715
1886
|
const HoverCardContent = props => {
|
|
1716
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1717
1887
|
const api = useHoverCardContext();
|
|
1718
|
-
const
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1888
|
+
const presenceApi = usePresenceContext();
|
|
1889
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
1890
|
+
return web.createComponent(solidJs.Show, {
|
|
1891
|
+
get when() {
|
|
1892
|
+
return !presenceApi().isUnmounted;
|
|
1893
|
+
},
|
|
1724
1894
|
get children() {
|
|
1725
1895
|
return web.createComponent(ark.div, mergedProps);
|
|
1726
1896
|
}
|
|
1727
|
-
})
|
|
1897
|
+
});
|
|
1728
1898
|
};
|
|
1729
1899
|
|
|
1730
1900
|
const HoverCardPositioner = props => {
|
|
1731
|
-
const
|
|
1732
|
-
const
|
|
1733
|
-
|
|
1901
|
+
const api = useHoverCardContext();
|
|
1902
|
+
const presenceApi = usePresenceContext();
|
|
1903
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
1904
|
+
return web.createComponent(solidJs.Show, {
|
|
1905
|
+
get when() {
|
|
1906
|
+
return !presenceApi().isUnmounted;
|
|
1907
|
+
},
|
|
1908
|
+
get children() {
|
|
1909
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1910
|
+
}
|
|
1911
|
+
});
|
|
1734
1912
|
};
|
|
1735
1913
|
|
|
1736
1914
|
const HoverCardTrigger = props => {
|
|
1737
1915
|
const hoverCard = useHoverCardContext();
|
|
1738
|
-
const
|
|
1739
|
-
return web.createComponent(ark.button,
|
|
1916
|
+
const mergedProps = solid.mergeProps(() => hoverCard().triggerProps, props);
|
|
1917
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1740
1918
|
};
|
|
1741
1919
|
|
|
1742
1920
|
const HoverCard = Object.assign(HoverCard$1, {
|
|
@@ -1780,25 +1958,22 @@ const useMenu = props => {
|
|
|
1780
1958
|
};
|
|
1781
1959
|
|
|
1782
1960
|
const Menu$1 = props => {
|
|
1783
|
-
const [
|
|
1961
|
+
const [presenceProps, menuProps] = splitPresenceProps(props);
|
|
1962
|
+
const [useMenuProps, localProps] = createSplitProps()(menuProps, ['anchorPoint', 'aria-label', 'closeOnSelect', 'dir', 'getRootNode', 'highlightedId', 'id', 'ids', 'loop', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'onSelect', 'onValueChange', 'open', 'positioning', 'value']);
|
|
1784
1963
|
const parentMenu = useMenuContext();
|
|
1785
1964
|
const parentMachine = useMenuMachineContext();
|
|
1786
|
-
const menu = useMenu(
|
|
1965
|
+
const menu = useMenu(useMenuProps);
|
|
1966
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1967
|
+
present: menu().api().isOpen
|
|
1968
|
+
})));
|
|
1787
1969
|
solidJs.createEffect(() => {
|
|
1788
1970
|
if (!parentMachine) return;
|
|
1789
1971
|
parentMenu?.().setChild(menu().machine);
|
|
1790
1972
|
menu().api().setParent(parentMachine());
|
|
1791
1973
|
});
|
|
1792
|
-
solidJs.createEffect(() => {
|
|
1793
|
-
if (!restProps.isOpen) return;
|
|
1794
|
-
restProps.isOpen?.() ? menu().api().open() : menu().api().close();
|
|
1795
|
-
});
|
|
1796
1974
|
const triggerItemContext = solidJs.createMemo(() => parentMenu?.().getTriggerItemProps(menu().api()));
|
|
1797
1975
|
const machineContext = () => menu().machine;
|
|
1798
|
-
const getChildren = () => runIfFn(
|
|
1799
|
-
isOpen: menu?.().api().isOpen,
|
|
1800
|
-
onClose: menu?.().api().close
|
|
1801
|
-
}));
|
|
1976
|
+
const getChildren = () => runIfFn(localProps.children, menu().api);
|
|
1802
1977
|
return web.createComponent(MenuTriggerItemProvider, {
|
|
1803
1978
|
value: triggerItemContext,
|
|
1804
1979
|
get children() {
|
|
@@ -1810,7 +1985,12 @@ const Menu$1 = props => {
|
|
|
1810
1985
|
return menu().api;
|
|
1811
1986
|
},
|
|
1812
1987
|
get children() {
|
|
1813
|
-
return
|
|
1988
|
+
return web.createComponent(PresenceProvider, {
|
|
1989
|
+
value: apiPresence,
|
|
1990
|
+
get children() {
|
|
1991
|
+
return getChildren();
|
|
1992
|
+
}
|
|
1993
|
+
});
|
|
1814
1994
|
}
|
|
1815
1995
|
});
|
|
1816
1996
|
}
|
|
@@ -1821,65 +2001,66 @@ const Menu$1 = props => {
|
|
|
1821
2001
|
|
|
1822
2002
|
const MenuArrow = props => {
|
|
1823
2003
|
const menu = useMenuContext();
|
|
1824
|
-
const
|
|
1825
|
-
return web.createComponent(ark.div,
|
|
2004
|
+
const mergedProps = solid.mergeProps(() => menu?.().arrowProps, props);
|
|
2005
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1826
2006
|
};
|
|
1827
2007
|
|
|
1828
2008
|
const MenuArrowTip = props => {
|
|
1829
2009
|
const menu = useMenuContext();
|
|
1830
|
-
const
|
|
1831
|
-
return web.createComponent(ark.div,
|
|
2010
|
+
const mergedProps = solid.mergeProps(() => menu?.().arrowTipProps, props);
|
|
2011
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1832
2012
|
};
|
|
1833
2013
|
|
|
1834
2014
|
const MenuContent = props => {
|
|
1835
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1836
2015
|
const api = useMenuContext();
|
|
1837
|
-
const
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
2016
|
+
const presenceApi = usePresenceContext();
|
|
2017
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2018
|
+
return web.createComponent(solidJs.Show, {
|
|
2019
|
+
get when() {
|
|
2020
|
+
return !presenceApi().isUnmounted;
|
|
2021
|
+
},
|
|
1843
2022
|
get children() {
|
|
1844
2023
|
return web.createComponent(ark.div, mergedProps);
|
|
1845
2024
|
}
|
|
1846
|
-
})
|
|
2025
|
+
});
|
|
1847
2026
|
};
|
|
1848
2027
|
|
|
1849
2028
|
const MenuContextTrigger = props => {
|
|
1850
2029
|
const menu = useMenuContext();
|
|
1851
|
-
const
|
|
1852
|
-
return web.createComponent(ark.button,
|
|
2030
|
+
const mergedProps = solid.mergeProps(() => menu?.().contextTriggerProps, props);
|
|
2031
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1853
2032
|
};
|
|
1854
2033
|
|
|
1855
2034
|
const MenuItem = props => {
|
|
1856
2035
|
const menu = useMenuContext();
|
|
1857
2036
|
const [itemParams, restProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect']);
|
|
1858
|
-
const
|
|
1859
|
-
return web.createComponent(ark.div,
|
|
2037
|
+
const mergedProps = solid.mergeProps(() => menu?.().getItemProps(itemParams), restProps);
|
|
2038
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1860
2039
|
};
|
|
1861
2040
|
|
|
1862
2041
|
const MenuItemGroup = props => {
|
|
1863
2042
|
const menu = useMenuContext();
|
|
1864
2043
|
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
1865
|
-
const
|
|
1866
|
-
return web.createComponent(ark.div,
|
|
2044
|
+
const mergedProps = solid.mergeProps(() => menu?.().getItemGroupProps(itemGroupProps), localProps);
|
|
2045
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1867
2046
|
};
|
|
1868
2047
|
|
|
1869
2048
|
const MenuItemGroupLabel = props => {
|
|
1870
2049
|
const menu = useMenuContext();
|
|
1871
|
-
const [
|
|
1872
|
-
const
|
|
1873
|
-
|
|
2050
|
+
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
2051
|
+
const mergedProps = solid.mergeProps(() => menu?.().getItemGroupLabelProps({
|
|
2052
|
+
htmlFor: labelProps.for
|
|
2053
|
+
}), localProps);
|
|
2054
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1874
2055
|
};
|
|
1875
2056
|
|
|
1876
2057
|
const MenuOptionItem = props => {
|
|
1877
2058
|
const menu = useMenuContext();
|
|
1878
2059
|
const [optionProps, localProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect', 'name', 'type', 'value', 'onCheckedChange']);
|
|
1879
|
-
const
|
|
2060
|
+
const mergedProps = solid.mergeProps(() => menu().getOptionItemProps(optionProps), localProps);
|
|
1880
2061
|
const itemState = solidJs.createMemo(() => menu().getOptionItemState(optionProps));
|
|
1881
2062
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
1882
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
2063
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1883
2064
|
get children() {
|
|
1884
2065
|
return getChildren();
|
|
1885
2066
|
}
|
|
@@ -1887,27 +2068,35 @@ const MenuOptionItem = props => {
|
|
|
1887
2068
|
};
|
|
1888
2069
|
|
|
1889
2070
|
const MenuPositioner = props => {
|
|
1890
|
-
const
|
|
1891
|
-
const
|
|
1892
|
-
|
|
2071
|
+
const api = useMenuContext();
|
|
2072
|
+
const presenceApi = usePresenceContext();
|
|
2073
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
2074
|
+
return web.createComponent(solidJs.Show, {
|
|
2075
|
+
get when() {
|
|
2076
|
+
return !presenceApi().isUnmounted;
|
|
2077
|
+
},
|
|
2078
|
+
get children() {
|
|
2079
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2080
|
+
}
|
|
2081
|
+
});
|
|
1893
2082
|
};
|
|
1894
2083
|
|
|
1895
2084
|
const MenuSeparator = props => {
|
|
1896
2085
|
const menu = useMenuContext();
|
|
1897
|
-
const
|
|
1898
|
-
return web.createComponent(ark.hr,
|
|
2086
|
+
const mergedProps = solid.mergeProps(() => menu?.().separatorProps, props);
|
|
2087
|
+
return web.createComponent(ark.hr, mergedProps);
|
|
1899
2088
|
};
|
|
1900
2089
|
|
|
1901
2090
|
const MenuTrigger = props => {
|
|
1902
2091
|
const menu = useMenuContext();
|
|
1903
|
-
const
|
|
1904
|
-
return web.createComponent(ark.button,
|
|
2092
|
+
const mergedProps = solid.mergeProps(() => menu?.().triggerProps, props);
|
|
2093
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1905
2094
|
};
|
|
1906
2095
|
|
|
1907
2096
|
const MenuTriggerItem = props => {
|
|
1908
2097
|
const getTriggerItemProps = useMenuTriggerItemContext();
|
|
1909
|
-
const
|
|
1910
|
-
return web.createComponent(ark.div,
|
|
2098
|
+
const mergedProps = solid.mergeProps(() => getTriggerItemProps?.(), props);
|
|
2099
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1911
2100
|
};
|
|
1912
2101
|
|
|
1913
2102
|
const Menu = Object.assign(Menu$1, {
|
|
@@ -1946,49 +2135,49 @@ const useNumberInput = props => {
|
|
|
1946
2135
|
const NumberInput$1 = props => {
|
|
1947
2136
|
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']);
|
|
1948
2137
|
const api = useNumberInput(useNumberInputProps);
|
|
1949
|
-
const
|
|
2138
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1950
2139
|
return web.createComponent(NumberInputProvider, {
|
|
1951
2140
|
value: api,
|
|
1952
2141
|
get children() {
|
|
1953
|
-
return web.createComponent(ark.div,
|
|
2142
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1954
2143
|
}
|
|
1955
2144
|
});
|
|
1956
2145
|
};
|
|
1957
2146
|
|
|
1958
2147
|
const NumberInputControl = props => {
|
|
1959
2148
|
const api = useNumberInputContext();
|
|
1960
|
-
const
|
|
1961
|
-
return web.createComponent(ark.div,
|
|
2149
|
+
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2150
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1962
2151
|
};
|
|
1963
2152
|
|
|
1964
2153
|
const NumberInputDecrementTrigger = props => {
|
|
1965
2154
|
const api = useNumberInputContext();
|
|
1966
|
-
const
|
|
1967
|
-
return web.createComponent(ark.button,
|
|
2155
|
+
const mergedProps = solid.mergeProps(() => api().decrementTriggerProps, props);
|
|
2156
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1968
2157
|
};
|
|
1969
2158
|
|
|
1970
2159
|
const NumberInputInput = props => {
|
|
1971
2160
|
const api = useNumberInputContext();
|
|
1972
|
-
const
|
|
1973
|
-
return web.createComponent(ark.input,
|
|
2161
|
+
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
2162
|
+
return web.createComponent(ark.input, mergedProps);
|
|
1974
2163
|
};
|
|
1975
2164
|
|
|
1976
2165
|
const NumberInputIncrementTrigger = props => {
|
|
1977
2166
|
const api = useNumberInputContext();
|
|
1978
|
-
const
|
|
1979
|
-
return web.createComponent(ark.button,
|
|
2167
|
+
const mergedProps = solid.mergeProps(() => api().incrementTriggerProps, props);
|
|
2168
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1980
2169
|
};
|
|
1981
2170
|
|
|
1982
2171
|
const NumberInputLabel = props => {
|
|
1983
2172
|
const api = useNumberInputContext();
|
|
1984
|
-
const
|
|
1985
|
-
return web.createComponent(ark.label,
|
|
2173
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
2174
|
+
return web.createComponent(ark.label, mergedProps);
|
|
1986
2175
|
};
|
|
1987
2176
|
|
|
1988
2177
|
const NumberInputScrubber = props => {
|
|
1989
2178
|
const api = useNumberInputContext();
|
|
1990
|
-
const
|
|
1991
|
-
return web.createComponent(ark.div,
|
|
2179
|
+
const mergedProps = solid.mergeProps(() => api().scrubberProps, props);
|
|
2180
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1992
2181
|
};
|
|
1993
2182
|
|
|
1994
2183
|
const NumberInput = Object.assign(NumberInput$1, {
|
|
@@ -2023,11 +2212,11 @@ const Pagination$1 = props => {
|
|
|
2023
2212
|
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
2024
2213
|
const api = usePagination(paginationParams);
|
|
2025
2214
|
const getChildren = () => runIfFn(childrenProps.children, api);
|
|
2026
|
-
const
|
|
2215
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2027
2216
|
return web.createComponent(PaginationProvider, {
|
|
2028
2217
|
value: api,
|
|
2029
2218
|
get children() {
|
|
2030
|
-
return web.createComponent(ark.nav, web.mergeProps(
|
|
2219
|
+
return web.createComponent(ark.nav, web.mergeProps(mergedProps, {
|
|
2031
2220
|
get children() {
|
|
2032
2221
|
return getChildren();
|
|
2033
2222
|
}
|
|
@@ -2087,7 +2276,7 @@ const usePinInput = props => {
|
|
|
2087
2276
|
return solidJs.createMemo(() => pinInput__namespace.connect(state, send, solid.normalizeProps));
|
|
2088
2277
|
};
|
|
2089
2278
|
|
|
2090
|
-
const _tmpl$$
|
|
2279
|
+
const _tmpl$$6 = /*#__PURE__*/web.template(`<input>`);
|
|
2091
2280
|
const PinInput$1 = props => {
|
|
2092
2281
|
const [pinInputProps, localProps] = createSplitProps()(props, ['autoFocus', 'blurOnComplete', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'invalid', 'mask', 'name', 'onValueChange', 'onValueComplete', 'onValueInvalid', 'otp', 'pattern', 'placeholder', 'selectOnFocus', 'translations', 'type', 'value']);
|
|
2093
2282
|
const api = usePinInput(pinInputProps);
|
|
@@ -2096,7 +2285,7 @@ const PinInput$1 = props => {
|
|
|
2096
2285
|
value: api,
|
|
2097
2286
|
get children() {
|
|
2098
2287
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2099
|
-
const _el$ = _tmpl$$
|
|
2288
|
+
const _el$ = _tmpl$$6();
|
|
2100
2289
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2101
2290
|
return _el$;
|
|
2102
2291
|
})()];
|
|
@@ -2113,14 +2302,14 @@ const PinInputControl = props => {
|
|
|
2113
2302
|
const PinInputInput = props => {
|
|
2114
2303
|
const [inputParams, localProps] = solidJs.splitProps(props, ['index']);
|
|
2115
2304
|
const api = usePinInputContext();
|
|
2116
|
-
const
|
|
2117
|
-
return web.createComponent(ark.input,
|
|
2305
|
+
const mergedProps = solid.mergeProps(() => api().getInputProps(inputParams), localProps);
|
|
2306
|
+
return web.createComponent(ark.input, mergedProps);
|
|
2118
2307
|
};
|
|
2119
2308
|
|
|
2120
2309
|
const PinInputLabel = props => {
|
|
2121
2310
|
const api = usePinInputContext();
|
|
2122
|
-
const
|
|
2123
|
-
return web.createComponent(ark.label,
|
|
2311
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
2312
|
+
return web.createComponent(ark.label, mergedProps);
|
|
2124
2313
|
};
|
|
2125
2314
|
|
|
2126
2315
|
const PinInput = Object.assign(PinInput$1, {
|
|
@@ -2148,59 +2337,68 @@ const usePopover = props => {
|
|
|
2148
2337
|
};
|
|
2149
2338
|
|
|
2150
2339
|
const Popover$1 = props => {
|
|
2151
|
-
const [
|
|
2340
|
+
const [presenceProps, popoverProps] = splitPresenceProps(props);
|
|
2341
|
+
const [usePopoverProps, localProps] = createSplitProps()(popoverProps, ['autoFocus', 'closeOnEsc', 'closeOnInteractOutside', 'dir', 'getRootNode', 'id', 'ids', 'initialFocusEl', 'modal', 'onEscapeKeyDown', 'onFocusOutside', 'onInteractOutside', 'onOpenChange', 'onPointerDownOutside', 'open', 'portalled', 'positioning']);
|
|
2152
2342
|
const api = usePopover(usePopoverProps);
|
|
2343
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
2344
|
+
present: api().isOpen
|
|
2345
|
+
})));
|
|
2346
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2153
2347
|
return web.createComponent(PopoverProvider, {
|
|
2154
2348
|
value: api,
|
|
2155
2349
|
get children() {
|
|
2156
|
-
return
|
|
2350
|
+
return web.createComponent(PresenceProvider, {
|
|
2351
|
+
value: apiPresence,
|
|
2352
|
+
get children() {
|
|
2353
|
+
return getChildren();
|
|
2354
|
+
}
|
|
2355
|
+
});
|
|
2157
2356
|
}
|
|
2158
2357
|
});
|
|
2159
2358
|
};
|
|
2160
2359
|
|
|
2161
2360
|
const PopoverAnchor = props => {
|
|
2162
2361
|
const api = usePopoverContext();
|
|
2163
|
-
const
|
|
2164
|
-
return web.createComponent(ark.div,
|
|
2362
|
+
const mergedProps = solid.mergeProps(() => api().anchorProps, props);
|
|
2363
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2165
2364
|
};
|
|
2166
2365
|
|
|
2167
2366
|
const PopoverArrow = props => {
|
|
2168
2367
|
const popover = usePopoverContext();
|
|
2169
|
-
const
|
|
2170
|
-
return web.createComponent(ark.div,
|
|
2368
|
+
const mergedProps = solid.mergeProps(() => popover().arrowProps, props);
|
|
2369
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2171
2370
|
};
|
|
2172
2371
|
|
|
2173
2372
|
const PopoverArrowTip = props => {
|
|
2174
2373
|
const popover = usePopoverContext();
|
|
2175
|
-
const
|
|
2176
|
-
return web.createComponent(ark.div,
|
|
2374
|
+
const mergedProps = solid.mergeProps(() => popover().arrowTipProps, props);
|
|
2375
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2177
2376
|
};
|
|
2178
2377
|
|
|
2179
2378
|
const PopoverCloseTrigger = props => {
|
|
2180
2379
|
const api = usePopoverContext();
|
|
2181
|
-
const
|
|
2182
|
-
return web.createComponent(ark.button,
|
|
2380
|
+
const mergedProps = solid.mergeProps(() => api().closeTriggerProps, props);
|
|
2381
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2183
2382
|
};
|
|
2184
2383
|
|
|
2185
2384
|
const PopoverContent = props => {
|
|
2186
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
2187
2385
|
const api = usePopoverContext();
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2386
|
+
const presenceApi = usePresenceContext();
|
|
2387
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2388
|
+
return web.createComponent(solidJs.Show, {
|
|
2389
|
+
get when() {
|
|
2390
|
+
return !presenceApi().isUnmounted;
|
|
2391
|
+
},
|
|
2194
2392
|
get children() {
|
|
2195
2393
|
return web.createComponent(ark.div, mergedProps);
|
|
2196
2394
|
}
|
|
2197
|
-
})
|
|
2395
|
+
});
|
|
2198
2396
|
};
|
|
2199
2397
|
|
|
2200
2398
|
const PopoverDescription = props => {
|
|
2201
2399
|
const api = usePopoverContext();
|
|
2202
|
-
const
|
|
2203
|
-
return web.createComponent(ark.div,
|
|
2400
|
+
const mergedProps = solid.mergeProps(() => api().descriptionProps, props);
|
|
2401
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2204
2402
|
};
|
|
2205
2403
|
|
|
2206
2404
|
const PopoverIndicator = props => {
|
|
@@ -2211,20 +2409,33 @@ const PopoverIndicator = props => {
|
|
|
2211
2409
|
|
|
2212
2410
|
const PopoverPositioner = props => {
|
|
2213
2411
|
const api = usePopoverContext();
|
|
2214
|
-
const
|
|
2215
|
-
|
|
2412
|
+
const presenceApi = usePresenceContext();
|
|
2413
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
2414
|
+
return web.createComponent(solidJs.Show, {
|
|
2415
|
+
get when() {
|
|
2416
|
+
return !presenceApi().isUnmounted;
|
|
2417
|
+
},
|
|
2418
|
+
get children() {
|
|
2419
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2420
|
+
}
|
|
2421
|
+
});
|
|
2216
2422
|
};
|
|
2217
2423
|
|
|
2218
2424
|
const PopoverTitle = props => {
|
|
2219
2425
|
const api = usePopoverContext();
|
|
2220
|
-
const
|
|
2221
|
-
return web.createComponent(ark.div,
|
|
2426
|
+
const mergedProps = solid.mergeProps(() => api().titleProps, props);
|
|
2427
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2222
2428
|
};
|
|
2223
2429
|
|
|
2224
2430
|
const PopoverTrigger = props => {
|
|
2225
2431
|
const api = usePopoverContext();
|
|
2226
|
-
const
|
|
2227
|
-
|
|
2432
|
+
const presenceApi = usePresenceContext();
|
|
2433
|
+
const mergedProps = solid.mergeProps(() => api().triggerProps, () => ({
|
|
2434
|
+
'aria-controls': presenceApi().isUnmounted && null
|
|
2435
|
+
}), props);
|
|
2436
|
+
|
|
2437
|
+
// @ts-expect-error we want aria-controls to be null to remove them if the popover if lazy mounted
|
|
2438
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2228
2439
|
};
|
|
2229
2440
|
|
|
2230
2441
|
const Popover = Object.assign(Popover$1, {
|
|
@@ -2293,13 +2504,13 @@ const RadioGroupItem = props => {
|
|
|
2293
2504
|
});
|
|
2294
2505
|
};
|
|
2295
2506
|
|
|
2296
|
-
const _tmpl$$
|
|
2507
|
+
const _tmpl$$5 = /*#__PURE__*/web.template(`<input>`);
|
|
2297
2508
|
const RadioGroupItemControl = props => {
|
|
2298
2509
|
const api = useRadioGroupContext();
|
|
2299
2510
|
const itemProps = useRadioGroupItemContext();
|
|
2300
2511
|
const mergedProps = solid.mergeProps(() => api().getItemControlProps(itemProps), props);
|
|
2301
2512
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2302
|
-
const _el$ = _tmpl$$
|
|
2513
|
+
const _el$ = _tmpl$$5();
|
|
2303
2514
|
web.spread(_el$, web.mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2304
2515
|
return _el$;
|
|
2305
2516
|
})()];
|
|
@@ -2356,7 +2567,7 @@ const RatingGroup$1 = props => {
|
|
|
2356
2567
|
});
|
|
2357
2568
|
};
|
|
2358
2569
|
|
|
2359
|
-
const _tmpl$$
|
|
2570
|
+
const _tmpl$$4 = /*#__PURE__*/web.template(`<input>`);
|
|
2360
2571
|
const RatingGroupControl = props => {
|
|
2361
2572
|
const api = useRatingGroupContext();
|
|
2362
2573
|
const getChildren = () => runIfFn(props.children, api);
|
|
@@ -2366,7 +2577,7 @@ const RatingGroupControl = props => {
|
|
|
2366
2577
|
return getChildren();
|
|
2367
2578
|
}
|
|
2368
2579
|
})), (() => {
|
|
2369
|
-
const _el$ = _tmpl$$
|
|
2580
|
+
const _el$ = _tmpl$$4();
|
|
2370
2581
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2371
2582
|
return _el$;
|
|
2372
2583
|
})()];
|
|
@@ -2378,11 +2589,11 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2378
2589
|
});
|
|
2379
2590
|
|
|
2380
2591
|
const RatingGroupItem = props => {
|
|
2381
|
-
const [
|
|
2592
|
+
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2382
2593
|
const api = useRatingGroupContext();
|
|
2383
|
-
const itemState = api().getItemState(
|
|
2384
|
-
const
|
|
2385
|
-
const
|
|
2594
|
+
const itemState = solidJs.createMemo(() => api().getItemState(itemProps));
|
|
2595
|
+
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
2596
|
+
const mergedProps = solid.mergeProps(() => api().getItemProps(itemProps), localProps);
|
|
2386
2597
|
return web.createComponent(RatingGroupItemProvider, {
|
|
2387
2598
|
value: itemState,
|
|
2388
2599
|
get children() {
|
|
@@ -2460,13 +2671,13 @@ const SegmentGroupItem = props => {
|
|
|
2460
2671
|
});
|
|
2461
2672
|
};
|
|
2462
2673
|
|
|
2463
|
-
const _tmpl$$
|
|
2674
|
+
const _tmpl$$3 = /*#__PURE__*/web.template(`<input>`);
|
|
2464
2675
|
const SegmentGroupItemControl = props => {
|
|
2465
2676
|
const api = useSegmentGroupContext();
|
|
2466
2677
|
const itemProps = useSegmentGroupItemContext();
|
|
2467
2678
|
const mergedProps = solid.mergeProps(() => api().getItemControlProps(itemProps), anatomy.segmentGroupAnatomy.build().itemControl.attrs, props);
|
|
2468
2679
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2469
|
-
const _el$ = _tmpl$$
|
|
2680
|
+
const _el$ = _tmpl$$3();
|
|
2470
2681
|
web.spread(_el$, web.mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2471
2682
|
return _el$;
|
|
2472
2683
|
})()];
|
|
@@ -2516,18 +2727,27 @@ const useSelect = props => {
|
|
|
2516
2727
|
};
|
|
2517
2728
|
|
|
2518
2729
|
const Select$1 = props => {
|
|
2519
|
-
const [
|
|
2520
|
-
const
|
|
2730
|
+
const [presenceProps, selectProps] = splitPresenceProps(props);
|
|
2731
|
+
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']);
|
|
2732
|
+
const api = useSelect(useSelectProps);
|
|
2733
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
2734
|
+
present: api().isOpen
|
|
2735
|
+
})));
|
|
2521
2736
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2522
2737
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2523
2738
|
return web.createComponent(SelectProvider, {
|
|
2524
2739
|
value: api,
|
|
2525
2740
|
get children() {
|
|
2526
|
-
return web.createComponent(
|
|
2741
|
+
return web.createComponent(PresenceProvider, {
|
|
2742
|
+
value: apiPresence,
|
|
2527
2743
|
get children() {
|
|
2528
|
-
return
|
|
2744
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2745
|
+
get children() {
|
|
2746
|
+
return getChildren();
|
|
2747
|
+
}
|
|
2748
|
+
}));
|
|
2529
2749
|
}
|
|
2530
|
-
})
|
|
2750
|
+
});
|
|
2531
2751
|
}
|
|
2532
2752
|
});
|
|
2533
2753
|
};
|
|
@@ -2539,24 +2759,40 @@ const SelectClearTrigger = props => {
|
|
|
2539
2759
|
};
|
|
2540
2760
|
|
|
2541
2761
|
const SelectContent = props => {
|
|
2542
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
2543
2762
|
const api = useSelectContext();
|
|
2544
|
-
const
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2763
|
+
const presenceApi = usePresenceContext();
|
|
2764
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
2765
|
+
return web.createComponent(solidJs.Show, {
|
|
2766
|
+
get when() {
|
|
2767
|
+
return !presenceApi().isUnmounted;
|
|
2768
|
+
},
|
|
2550
2769
|
get children() {
|
|
2551
2770
|
return web.createComponent(ark.div, mergedProps);
|
|
2552
2771
|
}
|
|
2553
|
-
})
|
|
2772
|
+
});
|
|
2554
2773
|
};
|
|
2555
2774
|
|
|
2775
|
+
const _tmpl$$2 = /*#__PURE__*/web.template(`<select>`),
|
|
2776
|
+
_tmpl$2 = /*#__PURE__*/web.template(`<option>`);
|
|
2556
2777
|
const SelectControl = props => {
|
|
2557
2778
|
const api = useSelectContext();
|
|
2558
2779
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2559
|
-
return web.createComponent(ark.div, mergedProps)
|
|
2780
|
+
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2781
|
+
const _el$ = _tmpl$$2();
|
|
2782
|
+
web.spread(_el$, web.mergeProps(() => api().hiddenSelectProps), false, true);
|
|
2783
|
+
web.insert(_el$, web.createComponent(solidJs.Index, {
|
|
2784
|
+
get each() {
|
|
2785
|
+
return api().collection.toArray();
|
|
2786
|
+
},
|
|
2787
|
+
children: option => (() => {
|
|
2788
|
+
const _el$2 = _tmpl$2();
|
|
2789
|
+
web.insert(_el$2, () => option().label);
|
|
2790
|
+
web.effect(() => _el$2.value = option().value);
|
|
2791
|
+
return _el$2;
|
|
2792
|
+
})()
|
|
2793
|
+
}));
|
|
2794
|
+
return _el$;
|
|
2795
|
+
})()];
|
|
2560
2796
|
};
|
|
2561
2797
|
|
|
2562
2798
|
const SelectIndicator = props => {
|
|
@@ -2595,9 +2831,11 @@ const SelectItemGroup = props => {
|
|
|
2595
2831
|
};
|
|
2596
2832
|
|
|
2597
2833
|
const SelectItemGroupLabel = props => {
|
|
2598
|
-
const [labelProps, localProps] = createSplitProps()(props, ['
|
|
2834
|
+
const [labelProps, localProps] = createSplitProps()(props, ['for']);
|
|
2599
2835
|
const api = useSelectContext();
|
|
2600
|
-
const mergedProps = solid.mergeProps(() => api().getItemGroupLabelProps(
|
|
2836
|
+
const mergedProps = solid.mergeProps(() => api().getItemGroupLabelProps({
|
|
2837
|
+
htmlFor: labelProps.for
|
|
2838
|
+
}), localProps);
|
|
2601
2839
|
return web.createComponent(ark.div, mergedProps);
|
|
2602
2840
|
};
|
|
2603
2841
|
|
|
@@ -2623,8 +2861,16 @@ const SelectLabel = props => {
|
|
|
2623
2861
|
|
|
2624
2862
|
const SelectPositioner = props => {
|
|
2625
2863
|
const api = useSelectContext();
|
|
2864
|
+
const presenceApi = usePresenceContext();
|
|
2626
2865
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
2627
|
-
return web.createComponent(
|
|
2866
|
+
return web.createComponent(solidJs.Show, {
|
|
2867
|
+
get when() {
|
|
2868
|
+
return !presenceApi().isUnmounted;
|
|
2869
|
+
},
|
|
2870
|
+
get children() {
|
|
2871
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2872
|
+
}
|
|
2873
|
+
});
|
|
2628
2874
|
};
|
|
2629
2875
|
|
|
2630
2876
|
const SelectTrigger = props => {
|
|
@@ -2719,17 +2965,6 @@ const SliderMarkerGroup = props => {
|
|
|
2719
2965
|
return web.createComponent(ark.div, mergedProps);
|
|
2720
2966
|
};
|
|
2721
2967
|
|
|
2722
|
-
const SliderOutput = props => {
|
|
2723
|
-
const slider = useSliderContext();
|
|
2724
|
-
const getChildren = () => runIfFn(props.children, slider);
|
|
2725
|
-
const outputProps = solid.mergeProps(() => slider().outputProps, props);
|
|
2726
|
-
return web.createComponent(ark.output, web.mergeProps(outputProps, {
|
|
2727
|
-
get children() {
|
|
2728
|
-
return getChildren();
|
|
2729
|
-
}
|
|
2730
|
-
}));
|
|
2731
|
-
};
|
|
2732
|
-
|
|
2733
2968
|
const SliderRange = props => {
|
|
2734
2969
|
const api = useSliderContext();
|
|
2735
2970
|
const mergedProps = solid.mergeProps(() => api().rangeProps, props);
|
|
@@ -2739,8 +2974,8 @@ const SliderRange = props => {
|
|
|
2739
2974
|
const SliderThumb = props => {
|
|
2740
2975
|
const [thumbProps, localProps] = createSplitProps()(props, ['index']);
|
|
2741
2976
|
const api = useSliderContext();
|
|
2742
|
-
const
|
|
2743
|
-
return web.createComponent(ark.div,
|
|
2977
|
+
const mergedProps = solid.mergeProps(() => api().getThumbProps(thumbProps), localProps);
|
|
2978
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2744
2979
|
};
|
|
2745
2980
|
|
|
2746
2981
|
const SliderTrack = props => {
|
|
@@ -2749,16 +2984,27 @@ const SliderTrack = props => {
|
|
|
2749
2984
|
return web.createComponent(ark.div, mergedProps);
|
|
2750
2985
|
};
|
|
2751
2986
|
|
|
2987
|
+
const SliderValueText = props => {
|
|
2988
|
+
const api = useSliderContext();
|
|
2989
|
+
const mergedProps = solid.mergeProps(() => api().valueTextProps, props);
|
|
2990
|
+
const getChildren = solidJs.children(() => props.children);
|
|
2991
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2992
|
+
get children() {
|
|
2993
|
+
return getChildren() || api().value.join(',');
|
|
2994
|
+
}
|
|
2995
|
+
}));
|
|
2996
|
+
};
|
|
2997
|
+
|
|
2752
2998
|
const Slider = Object.assign(Slider$1, {
|
|
2753
2999
|
Root: Slider$1,
|
|
2754
3000
|
Control: SliderControl,
|
|
2755
3001
|
Label: SliderLabel,
|
|
2756
3002
|
Marker: SliderMarker,
|
|
2757
3003
|
MarkerGroup: SliderMarkerGroup,
|
|
2758
|
-
Output: SliderOutput,
|
|
2759
3004
|
Range: SliderRange,
|
|
2760
3005
|
Thumb: SliderThumb,
|
|
2761
|
-
Track: SliderTrack
|
|
3006
|
+
Track: SliderTrack,
|
|
3007
|
+
ValueText: SliderValueText
|
|
2762
3008
|
});
|
|
2763
3009
|
|
|
2764
3010
|
const [SplitterProvider, useSplitterContext] = createContext({
|
|
@@ -2782,11 +3028,11 @@ const Splitter$1 = props => {
|
|
|
2782
3028
|
const [splitterParams, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'onSizeChangeStart', 'orientation', 'size']);
|
|
2783
3029
|
const api = useSplitter(splitterParams);
|
|
2784
3030
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2785
|
-
const
|
|
3031
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2786
3032
|
return web.createComponent(SplitterProvider, {
|
|
2787
3033
|
value: api,
|
|
2788
3034
|
get children() {
|
|
2789
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
3035
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2790
3036
|
get children() {
|
|
2791
3037
|
return getChildren();
|
|
2792
3038
|
}
|
|
@@ -2798,15 +3044,15 @@ const Splitter$1 = props => {
|
|
|
2798
3044
|
const SplitterPanel = props => {
|
|
2799
3045
|
const [panelParams, restProps] = createSplitProps()(props, ['id', 'snapSize']);
|
|
2800
3046
|
const api = useSplitterContext();
|
|
2801
|
-
const
|
|
2802
|
-
return web.createComponent(ark.div,
|
|
3047
|
+
const mergedProps = solid.mergeProps(() => api().getPanelProps(panelParams), restProps);
|
|
3048
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2803
3049
|
};
|
|
2804
3050
|
|
|
2805
3051
|
const SplitterResizeTrigger = props => {
|
|
2806
3052
|
const api = useSplitterContext();
|
|
2807
3053
|
const [triggerParams, restProps] = createSplitProps()(props, ['disabled', 'id', 'step']);
|
|
2808
|
-
const
|
|
2809
|
-
return web.createComponent(ark.button,
|
|
3054
|
+
const mergedProps = solid.mergeProps(() => api().getResizeTriggerProps(triggerParams), restProps);
|
|
3055
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2810
3056
|
};
|
|
2811
3057
|
|
|
2812
3058
|
const Splitter = Object.assign(Splitter$1, {
|
|
@@ -2862,14 +3108,14 @@ const SwitchControl = props => {
|
|
|
2862
3108
|
|
|
2863
3109
|
const SwitchLabel = props => {
|
|
2864
3110
|
const checkbox = useSwitchContext();
|
|
2865
|
-
const
|
|
2866
|
-
return web.createComponent(ark.span,
|
|
3111
|
+
const mergedProps = solid.mergeProps(() => checkbox().labelProps, props);
|
|
3112
|
+
return web.createComponent(ark.span, mergedProps);
|
|
2867
3113
|
};
|
|
2868
3114
|
|
|
2869
3115
|
const SwitchThumb = props => {
|
|
2870
3116
|
const checkbox = useSwitchContext();
|
|
2871
|
-
const
|
|
2872
|
-
return web.createComponent(ark.span,
|
|
3117
|
+
const mergedProps = solid.mergeProps(() => checkbox().thumbProps, props);
|
|
3118
|
+
return web.createComponent(ark.span, mergedProps);
|
|
2873
3119
|
};
|
|
2874
3120
|
|
|
2875
3121
|
const Switch = Object.assign(Switch$1, {
|
|
@@ -2884,44 +3130,46 @@ const [TabsProvider, useTabsContext] = createContext({
|
|
|
2884
3130
|
providerName: '<TabsProvider />'
|
|
2885
3131
|
});
|
|
2886
3132
|
|
|
2887
|
-
const TabPresence = props => {
|
|
2888
|
-
const api = useTabsContext();
|
|
2889
|
-
return web.createComponent(Presence, web.mergeProps({
|
|
2890
|
-
get present() {
|
|
2891
|
-
return api().value === props.value;
|
|
2892
|
-
}
|
|
2893
|
-
}, props));
|
|
2894
|
-
};
|
|
2895
|
-
|
|
2896
3133
|
const TabContent = props => {
|
|
2897
|
-
const [
|
|
2898
|
-
const [getContentProps, restProps] = createSplitProps()(localProps, ['value']);
|
|
3134
|
+
const [contentProps, localProps] = createSplitProps()(props, ['value']);
|
|
2899
3135
|
const api = useTabsContext();
|
|
2900
|
-
const
|
|
2901
|
-
|
|
3136
|
+
const presenceProps = usePresencePropsContext();
|
|
3137
|
+
const presenceApi = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
3138
|
+
present: api().value === contentProps.value
|
|
3139
|
+
})));
|
|
3140
|
+
const mergedProps = solid.mergeProps(() => api().getContentProps(contentProps), () => presenceApi().presenceProps, localProps);
|
|
3141
|
+
return web.createComponent(PresenceProvider, {
|
|
3142
|
+
value: presenceApi,
|
|
2902
3143
|
get children() {
|
|
2903
|
-
return web.createComponent(
|
|
3144
|
+
return web.createComponent(solidJs.Show, {
|
|
3145
|
+
get when() {
|
|
3146
|
+
return !presenceApi().isUnmounted;
|
|
3147
|
+
},
|
|
3148
|
+
get children() {
|
|
3149
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3150
|
+
}
|
|
3151
|
+
});
|
|
2904
3152
|
}
|
|
2905
|
-
})
|
|
3153
|
+
});
|
|
2906
3154
|
};
|
|
2907
3155
|
|
|
2908
3156
|
const TabIndicator = props => {
|
|
2909
3157
|
const api = useTabsContext();
|
|
2910
|
-
const
|
|
2911
|
-
return web.createComponent(ark.div,
|
|
3158
|
+
const mergedProps = solid.mergeProps(() => api().indicatorProps, props);
|
|
3159
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2912
3160
|
};
|
|
2913
3161
|
|
|
2914
3162
|
const TabList = props => {
|
|
2915
3163
|
const api = useTabsContext();
|
|
2916
|
-
const
|
|
2917
|
-
return web.createComponent(ark.div,
|
|
3164
|
+
const mergedProps = solid.mergeProps(() => api().tablistProps, props);
|
|
3165
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2918
3166
|
};
|
|
2919
3167
|
|
|
2920
3168
|
const TabTrigger = props => {
|
|
2921
3169
|
const [tabParams, restProps] = createSplitProps()(props, ['disabled', 'value']);
|
|
2922
3170
|
const api = useTabsContext();
|
|
2923
|
-
const
|
|
2924
|
-
return web.createComponent(ark.button,
|
|
3171
|
+
const mergedProps = solid.mergeProps(() => api().getTriggerProps(tabParams), restProps);
|
|
3172
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2925
3173
|
};
|
|
2926
3174
|
|
|
2927
3175
|
const useTabs = props => {
|
|
@@ -2937,13 +3185,19 @@ const useTabs = props => {
|
|
|
2937
3185
|
};
|
|
2938
3186
|
|
|
2939
3187
|
const Tabs$1 = props => {
|
|
2940
|
-
const [
|
|
3188
|
+
const [presenceProps, tabsProps] = splitPresenceProps(props);
|
|
3189
|
+
const [tabsParams, restProps] = createSplitProps()(tabsProps, ['activationMode', 'dir', 'getRootNode', 'id', 'ids', 'loop', 'onFocusChange', 'onValueChange', 'orientation', 'translations', 'value']);
|
|
2941
3190
|
const api = useTabs(tabsParams);
|
|
2942
|
-
const
|
|
3191
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, restProps);
|
|
2943
3192
|
return web.createComponent(TabsProvider, {
|
|
2944
3193
|
value: api,
|
|
2945
3194
|
get children() {
|
|
2946
|
-
return web.createComponent(
|
|
3195
|
+
return web.createComponent(PresencePropsProvider, {
|
|
3196
|
+
value: presenceProps,
|
|
3197
|
+
get children() {
|
|
3198
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
2947
3201
|
}
|
|
2948
3202
|
});
|
|
2949
3203
|
};
|
|
@@ -3079,8 +3333,6 @@ const [ToastProvider, useToastContext] = createContext({
|
|
|
3079
3333
|
providerName: '<ToastProvider />'
|
|
3080
3334
|
});
|
|
3081
3335
|
|
|
3082
|
-
// TODO simplify types after next zag.js upgrade
|
|
3083
|
-
|
|
3084
3336
|
const createToaster = props => {
|
|
3085
3337
|
const {
|
|
3086
3338
|
placement,
|
|
@@ -3185,11 +3437,11 @@ const useToggleGroup = props => {
|
|
|
3185
3437
|
const ToggleGroup$1 = props => {
|
|
3186
3438
|
const [groupParams, restProps] = createSplitProps()(props, ['dir', 'disabled', 'getRootNode', 'id', 'ids', 'loop', 'multiple', 'onValueChange', 'orientation', 'rovingFocus', 'value']);
|
|
3187
3439
|
const api = useToggleGroup(groupParams);
|
|
3188
|
-
const
|
|
3440
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, restProps);
|
|
3189
3441
|
return web.createComponent(ToggleGroupProvider, {
|
|
3190
3442
|
value: api,
|
|
3191
3443
|
get children() {
|
|
3192
|
-
return web.createComponent(ark.div,
|
|
3444
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3193
3445
|
}
|
|
3194
3446
|
});
|
|
3195
3447
|
};
|
|
@@ -3224,50 +3476,70 @@ const useTooltip = props => {
|
|
|
3224
3476
|
};
|
|
3225
3477
|
|
|
3226
3478
|
const Tooltip$1 = props => {
|
|
3227
|
-
const [
|
|
3479
|
+
const [presenceProps, tooltipProps] = splitPresenceProps(props);
|
|
3480
|
+
const [useTooltipProps, localProps] = createSplitProps()(tooltipProps, ['aria-label', 'closeDelay', 'closeOnEsc', 'closeOnPointerDown', 'dir', 'disabled', 'getRootNode', 'id', 'ids', 'interactive', 'onOpenChange', 'open', 'openDelay', 'positioning']);
|
|
3228
3481
|
const api = useTooltip(useTooltipProps);
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
}
|
|
3482
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
3483
|
+
present: api().isOpen
|
|
3484
|
+
})));
|
|
3485
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
3486
|
+
return web.createComponent(TooltipProvider, {
|
|
3487
|
+
value: api,
|
|
3488
|
+
get children() {
|
|
3489
|
+
return web.createComponent(PresenceProvider, {
|
|
3490
|
+
value: apiPresence,
|
|
3491
|
+
get children() {
|
|
3492
|
+
return getChildren();
|
|
3493
|
+
}
|
|
3494
|
+
});
|
|
3495
|
+
}
|
|
3496
|
+
});
|
|
3232
3497
|
};
|
|
3233
3498
|
|
|
3234
3499
|
const TooltipArrow = props => {
|
|
3235
3500
|
const tooltip = useTooltipContext();
|
|
3236
|
-
const
|
|
3237
|
-
return web.createComponent(ark.div,
|
|
3501
|
+
const mergedProps = solid.mergeProps(() => tooltip().arrowProps, props);
|
|
3502
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3238
3503
|
};
|
|
3239
3504
|
|
|
3240
3505
|
const TooltipArrowTip = props => {
|
|
3241
3506
|
const api = useTooltipContext();
|
|
3242
|
-
const
|
|
3243
|
-
return web.createComponent(ark.div,
|
|
3507
|
+
const mergedProps = solid.mergeProps(() => api().arrowTipProps, props);
|
|
3508
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3244
3509
|
};
|
|
3245
3510
|
|
|
3246
3511
|
const TooltipContent = props => {
|
|
3247
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
3248
3512
|
const api = useTooltipContext();
|
|
3249
|
-
const
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3513
|
+
const presenceApi = usePresenceContext();
|
|
3514
|
+
const mergedProps = solid.mergeProps(() => api().contentProps, () => presenceApi().presenceProps, props);
|
|
3515
|
+
return web.createComponent(solidJs.Show, {
|
|
3516
|
+
get when() {
|
|
3517
|
+
return !presenceApi().isUnmounted;
|
|
3518
|
+
},
|
|
3255
3519
|
get children() {
|
|
3256
|
-
return web.createComponent(ark.div,
|
|
3520
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3257
3521
|
}
|
|
3258
|
-
})
|
|
3522
|
+
});
|
|
3259
3523
|
};
|
|
3260
3524
|
|
|
3261
3525
|
const TooltipPositioner = props => {
|
|
3262
3526
|
const api = useTooltipContext();
|
|
3263
|
-
const
|
|
3264
|
-
|
|
3527
|
+
const presenceApi = usePresenceContext();
|
|
3528
|
+
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
3529
|
+
return web.createComponent(solidJs.Show, {
|
|
3530
|
+
get when() {
|
|
3531
|
+
return !presenceApi().isUnmounted;
|
|
3532
|
+
},
|
|
3533
|
+
get children() {
|
|
3534
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3535
|
+
}
|
|
3536
|
+
});
|
|
3265
3537
|
};
|
|
3266
3538
|
|
|
3267
3539
|
const TooltipTrigger = props => {
|
|
3268
3540
|
const api = useTooltipContext();
|
|
3269
|
-
const
|
|
3270
|
-
return web.createComponent(ark.button,
|
|
3541
|
+
const mergedProps = solid.mergeProps(() => api().triggerProps, props);
|
|
3542
|
+
return web.createComponent(ark.button, mergedProps);
|
|
3271
3543
|
};
|
|
3272
3544
|
|
|
3273
3545
|
const Tooltip = Object.assign(Tooltip$1, {
|
|
@@ -3318,6 +3590,7 @@ exports.ColorPickerSwatchGroup = ColorPickerSwatchGroup;
|
|
|
3318
3590
|
exports.ColorPickerSwatchTrigger = ColorPickerSwatchTrigger;
|
|
3319
3591
|
exports.ColorPickerTransparencyGrid = ColorPickerTransparencyGrid;
|
|
3320
3592
|
exports.ColorPickerTrigger = ColorPickerTrigger;
|
|
3593
|
+
exports.ColorPickerValueText = ColorPickerValueText;
|
|
3321
3594
|
exports.Combobox = Combobox;
|
|
3322
3595
|
exports.ComboboxClearTrigger = ComboboxClearTrigger;
|
|
3323
3596
|
exports.ComboboxContent = ComboboxContent;
|
|
@@ -3419,6 +3692,8 @@ exports.PopoverPositioner = PopoverPositioner;
|
|
|
3419
3692
|
exports.PopoverTitle = PopoverTitle;
|
|
3420
3693
|
exports.PopoverTrigger = PopoverTrigger;
|
|
3421
3694
|
exports.Presence = Presence;
|
|
3695
|
+
exports.PresencePropsProvider = PresencePropsProvider;
|
|
3696
|
+
exports.PresenceProvider = PresenceProvider;
|
|
3422
3697
|
exports.RadioGroup = RadioGroup;
|
|
3423
3698
|
exports.RadioGroupItem = RadioGroupItem;
|
|
3424
3699
|
exports.RadioGroupItemControl = RadioGroupItemControl;
|
|
@@ -3453,10 +3728,10 @@ exports.SliderControl = SliderControl;
|
|
|
3453
3728
|
exports.SliderLabel = SliderLabel;
|
|
3454
3729
|
exports.SliderMarker = SliderMarker;
|
|
3455
3730
|
exports.SliderMarkerGroup = SliderMarkerGroup;
|
|
3456
|
-
exports.SliderOutput = SliderOutput;
|
|
3457
3731
|
exports.SliderRange = SliderRange;
|
|
3458
3732
|
exports.SliderThumb = SliderThumb;
|
|
3459
3733
|
exports.SliderTrack = SliderTrack;
|
|
3734
|
+
exports.SliderValueText = SliderValueText;
|
|
3460
3735
|
exports.Splitter = Splitter;
|
|
3461
3736
|
exports.SplitterPanel = SplitterPanel;
|
|
3462
3737
|
exports.SplitterResizeTrigger = SplitterResizeTrigger;
|
|
@@ -3515,6 +3790,9 @@ exports.useNumberInputContext = useNumberInputContext;
|
|
|
3515
3790
|
exports.usePaginationContext = usePaginationContext;
|
|
3516
3791
|
exports.usePinInputContext = usePinInputContext;
|
|
3517
3792
|
exports.usePopoverContext = usePopoverContext;
|
|
3793
|
+
exports.usePresence = usePresence;
|
|
3794
|
+
exports.usePresenceContext = usePresenceContext;
|
|
3795
|
+
exports.usePresencePropsContext = usePresencePropsContext;
|
|
3518
3796
|
exports.useRadioGroupContext = useRadioGroupContext;
|
|
3519
3797
|
exports.useRadioGroupItemContext = useRadioGroupItemContext;
|
|
3520
3798
|
exports.useRatingGroupContext = useRatingGroupContext;
|