@ark-ui/solid 1.0.0-beta.3 → 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 +14 -0
- package/cjs/index.js +590 -452
- package/cjs/index.js.map +1 -1
- package/esm/index.js +587 -454
- package/esm/index.js.map +1 -1
- package/package.json +42 -42
- package/source/accordion/accordion-item-content.jsx +6 -5
- 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 +6 -5
- package/source/color-picker/color-picker-positioner.jsx +6 -1
- 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 +2 -0
- package/source/combobox/combobox-content.jsx +6 -5
- package/source/combobox/combobox-positioner.jsx +8 -3
- package/source/combobox/combobox.jsx +8 -3
- package/source/date-picker/date-picker-content.jsx +6 -5
- package/source/date-picker/date-picker-positioner.jsx +6 -1
- package/source/date-picker/date-picker.jsx +8 -3
- 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.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/split-presence-props.js +0 -1
- 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-positioner.jsx +6 -1
- package/source/select/select.jsx +8 -3
- package/source/slider/slider-thumb.jsx +2 -2
- package/source/slider/slider-value-text.jsx +3 -3
- 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 +1 -3
- 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-content.d.ts +1 -3
- 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 +3 -1
- package/types/combobox/combobox-clear-trigger.d.ts +2 -1
- package/types/combobox/combobox-content.d.ts +1 -3
- 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.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-content.d.ts +1 -3
- 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 +1 -3
- package/types/dialog/dialog-close-trigger.d.ts +2 -1
- package/types/dialog/dialog-content.d.ts +1 -3
- 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 +1 -3
- 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 +1 -3
- package/types/menu/menu-context-trigger.d.ts +2 -1
- 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 +1 -3
- 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 +3 -18
- 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 +1 -3
- 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.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/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 +3 -7
- 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 +1 -3
- 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/tabs/tab-presence.jsx +0 -6
- 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,83 +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$() ? localProps.fallback : getChildren();
|
|
580
|
-
})());
|
|
581
622
|
};
|
|
582
623
|
|
|
583
|
-
function splitPresenceProps(props) {
|
|
584
|
-
return createSplitProps()(props, ['fallback', 'lazyMount', 'onExitComplete', 'present', 'unmountOnExit']);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
const Presence = Object.assign(Presence$1, {
|
|
588
|
-
Root: Presence$1
|
|
589
|
-
});
|
|
590
|
-
|
|
591
|
-
const _tmpl$$l = /*#__PURE__*/web.template(`<div>`);
|
|
592
624
|
const AccordionItemContent = props => {
|
|
593
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
594
625
|
const api = useAccordionContext();
|
|
595
626
|
const accordionItem = useAccordionItemContext();
|
|
596
|
-
const
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}, presenceProps, {
|
|
602
|
-
get fallback() {
|
|
603
|
-
return (() => {
|
|
604
|
-
const _el$ = _tmpl$$l();
|
|
605
|
-
web.spread(_el$, web.mergeProps(() => api().getItemContentProps(accordionItem)), false, false);
|
|
606
|
-
return _el$;
|
|
607
|
-
})();
|
|
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;
|
|
608
632
|
},
|
|
609
633
|
get children() {
|
|
610
634
|
return web.createComponent(ark.div, mergedProps);
|
|
611
635
|
}
|
|
612
|
-
})
|
|
636
|
+
});
|
|
613
637
|
};
|
|
614
638
|
|
|
615
639
|
const AccordionItemIndicator = props => {
|
|
@@ -622,7 +646,12 @@ const AccordionItemIndicator = props => {
|
|
|
622
646
|
const AccordionItemTrigger = props => {
|
|
623
647
|
const api = useAccordionContext();
|
|
624
648
|
const item = useAccordionItemContext();
|
|
625
|
-
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
|
|
626
655
|
return web.createComponent(ark.button, mergedProps);
|
|
627
656
|
};
|
|
628
657
|
|
|
@@ -654,25 +683,25 @@ const useAvatar = props => {
|
|
|
654
683
|
const Avatar$1 = props => {
|
|
655
684
|
const [params, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'onLoadingStatusChange']);
|
|
656
685
|
const api = useAvatar(params);
|
|
657
|
-
const
|
|
686
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
658
687
|
return web.createComponent(AvatarProvider, {
|
|
659
688
|
value: api,
|
|
660
689
|
get children() {
|
|
661
|
-
return web.createComponent(ark.div,
|
|
690
|
+
return web.createComponent(ark.div, mergedProps);
|
|
662
691
|
}
|
|
663
692
|
});
|
|
664
693
|
};
|
|
665
694
|
|
|
666
695
|
const AvatarFallback = props => {
|
|
667
696
|
const avatar = useAvatarContext();
|
|
668
|
-
const
|
|
669
|
-
return web.createComponent(ark.span,
|
|
697
|
+
const mergedProps = solid.mergeProps(() => avatar().fallbackProps, props);
|
|
698
|
+
return web.createComponent(ark.span, mergedProps);
|
|
670
699
|
};
|
|
671
700
|
|
|
672
701
|
const AvatarImage = props => {
|
|
673
702
|
const avatar = useAvatarContext();
|
|
674
|
-
const
|
|
675
|
-
return web.createComponent(ark.img,
|
|
703
|
+
const mergedProps = solid.mergeProps(() => avatar().imageProps, props);
|
|
704
|
+
return web.createComponent(ark.img, mergedProps);
|
|
676
705
|
};
|
|
677
706
|
|
|
678
707
|
const Avatar = Object.assign(Avatar$1, {
|
|
@@ -700,12 +729,17 @@ const useCarousel = props => {
|
|
|
700
729
|
|
|
701
730
|
const Carousel$1 = props => {
|
|
702
731
|
const [useCarouselProps, localProps] = createSplitProps()(props, ['align', 'dir', 'getRootNode', 'id', 'ids', 'index', 'loop', 'onIndexChange', 'orientation', 'slidesPerView', 'spacing']);
|
|
703
|
-
const
|
|
704
|
-
const
|
|
732
|
+
const api = useCarousel(useCarouselProps);
|
|
733
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
734
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
705
735
|
return web.createComponent(CarouselProvider, {
|
|
706
|
-
value:
|
|
736
|
+
value: api,
|
|
707
737
|
get children() {
|
|
708
|
-
return web.createComponent(ark.div,
|
|
738
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
739
|
+
get children() {
|
|
740
|
+
return getChildren();
|
|
741
|
+
}
|
|
742
|
+
}));
|
|
709
743
|
}
|
|
710
744
|
});
|
|
711
745
|
};
|
|
@@ -805,12 +839,12 @@ const Checkbox$1 = props => {
|
|
|
805
839
|
});
|
|
806
840
|
};
|
|
807
841
|
|
|
808
|
-
const _tmpl$$
|
|
842
|
+
const _tmpl$$a = /*#__PURE__*/web.template(`<input>`);
|
|
809
843
|
const CheckboxControl = props => {
|
|
810
844
|
const api = useCheckboxContext();
|
|
811
845
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
812
846
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
813
|
-
const _el$ = _tmpl$$
|
|
847
|
+
const _el$ = _tmpl$$a();
|
|
814
848
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
815
849
|
return _el$;
|
|
816
850
|
})()];
|
|
@@ -824,8 +858,8 @@ const CheckboxIndicator = props => {
|
|
|
824
858
|
|
|
825
859
|
const CheckboxLabel = props => {
|
|
826
860
|
const checkbox = useCheckboxContext();
|
|
827
|
-
const
|
|
828
|
-
return web.createComponent(ark.span,
|
|
861
|
+
const mergedProps = solid.mergeProps(() => checkbox().labelProps, props);
|
|
862
|
+
return web.createComponent(ark.span, mergedProps);
|
|
829
863
|
};
|
|
830
864
|
|
|
831
865
|
const Checkbox = Object.assign(Checkbox$1, {
|
|
@@ -854,21 +888,30 @@ const useColorPicker = props => {
|
|
|
854
888
|
return solidJs.createMemo(() => colorPicker__namespace.connect(state, send, solid.normalizeProps));
|
|
855
889
|
};
|
|
856
890
|
|
|
857
|
-
const _tmpl$$
|
|
891
|
+
const _tmpl$$9 = /*#__PURE__*/web.template(`<input>`);
|
|
858
892
|
const ColorPicker$1 = props => {
|
|
859
|
-
const [
|
|
860
|
-
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
|
+
})));
|
|
861
899
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
862
900
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
863
901
|
return web.createComponent(ColorPickerProvider, {
|
|
864
902
|
value: api,
|
|
865
903
|
get children() {
|
|
866
|
-
return [web.createComponent(
|
|
904
|
+
return [web.createComponent(PresenceProvider, {
|
|
905
|
+
value: apiPresence,
|
|
867
906
|
get children() {
|
|
868
|
-
return
|
|
907
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
908
|
+
get children() {
|
|
909
|
+
return getChildren();
|
|
910
|
+
}
|
|
911
|
+
}));
|
|
869
912
|
}
|
|
870
|
-
})
|
|
871
|
-
const _el$ = _tmpl$$
|
|
913
|
+
}), (() => {
|
|
914
|
+
const _el$ = _tmpl$$9();
|
|
872
915
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
873
916
|
return _el$;
|
|
874
917
|
})()];
|
|
@@ -945,27 +988,18 @@ const ColorPickerChannelSliderTrack = props => {
|
|
|
945
988
|
return web.createComponent(ark.div, mergedProps);
|
|
946
989
|
};
|
|
947
990
|
|
|
948
|
-
const _tmpl$$i = /*#__PURE__*/web.template(`<div>`);
|
|
949
991
|
const ColorPickerContent = props => {
|
|
950
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
951
992
|
const api = useColorPickerContext();
|
|
952
|
-
const
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}, presenceProps, {
|
|
958
|
-
get fallback() {
|
|
959
|
-
return (() => {
|
|
960
|
-
const _el$ = _tmpl$$i();
|
|
961
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
962
|
-
return _el$;
|
|
963
|
-
})();
|
|
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;
|
|
964
998
|
},
|
|
965
999
|
get children() {
|
|
966
1000
|
return web.createComponent(ark.div, mergedProps);
|
|
967
1001
|
}
|
|
968
|
-
})
|
|
1002
|
+
});
|
|
969
1003
|
};
|
|
970
1004
|
|
|
971
1005
|
const ColorPickerControl = props => {
|
|
@@ -988,8 +1022,16 @@ const ColorPickerLabel = props => {
|
|
|
988
1022
|
|
|
989
1023
|
const ColorPickerPositioner = props => {
|
|
990
1024
|
const api = useColorPickerContext();
|
|
1025
|
+
const presenceApi = usePresenceContext();
|
|
991
1026
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
992
|
-
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
|
+
});
|
|
993
1035
|
};
|
|
994
1036
|
|
|
995
1037
|
const ColorPickerSwatch = props => {
|
|
@@ -1035,6 +1077,25 @@ const ColorPickerValueText = props => {
|
|
|
1035
1077
|
}));
|
|
1036
1078
|
};
|
|
1037
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
|
+
|
|
1038
1099
|
const ColorPicker = Object.assign(ColorPicker$1, {
|
|
1039
1100
|
Root: ColorPicker$1,
|
|
1040
1101
|
Area: ColorPickerArea,
|
|
@@ -1054,7 +1115,8 @@ const ColorPicker = Object.assign(ColorPicker$1, {
|
|
|
1054
1115
|
SwatchTrigger: ColorPickerSwatchTrigger,
|
|
1055
1116
|
TransparencyGrid: ColorPickerTransparencyGrid,
|
|
1056
1117
|
Trigger: ColorPickerTrigger,
|
|
1057
|
-
ValueText: ColorPickerValueText
|
|
1118
|
+
ValueText: ColorPickerValueText,
|
|
1119
|
+
View: ColorPickerView
|
|
1058
1120
|
});
|
|
1059
1121
|
|
|
1060
1122
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -1079,18 +1141,27 @@ const useCombobox = props => {
|
|
|
1079
1141
|
};
|
|
1080
1142
|
|
|
1081
1143
|
const Combobox$1 = props => {
|
|
1082
|
-
const [
|
|
1083
|
-
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
|
+
})));
|
|
1084
1150
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1085
1151
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1086
1152
|
return web.createComponent(ComboboxProvider, {
|
|
1087
1153
|
value: api,
|
|
1088
1154
|
get children() {
|
|
1089
|
-
return web.createComponent(
|
|
1155
|
+
return web.createComponent(PresenceProvider, {
|
|
1156
|
+
value: apiPresence,
|
|
1090
1157
|
get children() {
|
|
1091
|
-
return
|
|
1158
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1159
|
+
get children() {
|
|
1160
|
+
return getChildren();
|
|
1161
|
+
}
|
|
1162
|
+
}));
|
|
1092
1163
|
}
|
|
1093
|
-
})
|
|
1164
|
+
});
|
|
1094
1165
|
}
|
|
1095
1166
|
});
|
|
1096
1167
|
};
|
|
@@ -1101,27 +1172,18 @@ const ComboboxClearTrigger = props => {
|
|
|
1101
1172
|
return web.createComponent(ark.button, mergedProps);
|
|
1102
1173
|
};
|
|
1103
1174
|
|
|
1104
|
-
const _tmpl$$h = /*#__PURE__*/web.template(`<div>`);
|
|
1105
1175
|
const ComboboxContent = props => {
|
|
1106
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1107
1176
|
const api = useComboboxContext();
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
}, presenceProps, {
|
|
1114
|
-
get fallback() {
|
|
1115
|
-
return (() => {
|
|
1116
|
-
const _el$ = _tmpl$$h();
|
|
1117
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
1118
|
-
return _el$;
|
|
1119
|
-
})();
|
|
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;
|
|
1120
1182
|
},
|
|
1121
1183
|
get children() {
|
|
1122
1184
|
return web.createComponent(ark.div, mergedProps);
|
|
1123
1185
|
}
|
|
1124
|
-
})
|
|
1186
|
+
});
|
|
1125
1187
|
};
|
|
1126
1188
|
|
|
1127
1189
|
const ComboboxControl = props => {
|
|
@@ -1195,9 +1257,17 @@ const ComboboxLabel = props => {
|
|
|
1195
1257
|
};
|
|
1196
1258
|
|
|
1197
1259
|
const ComboboxPositioner = props => {
|
|
1198
|
-
const
|
|
1199
|
-
const
|
|
1200
|
-
|
|
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
|
+
});
|
|
1201
1271
|
};
|
|
1202
1272
|
|
|
1203
1273
|
const ComboboxTrigger = props => {
|
|
@@ -1243,18 +1313,27 @@ const useDatePicker = props => {
|
|
|
1243
1313
|
};
|
|
1244
1314
|
|
|
1245
1315
|
const DatePicker$1 = props => {
|
|
1246
|
-
const [
|
|
1247
|
-
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
|
+
})));
|
|
1248
1322
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
1249
1323
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1250
1324
|
return web.createComponent(DatePickerProvider, {
|
|
1251
1325
|
value: api,
|
|
1252
1326
|
get children() {
|
|
1253
|
-
return web.createComponent(
|
|
1327
|
+
return web.createComponent(PresenceProvider, {
|
|
1328
|
+
value: apiPresence,
|
|
1254
1329
|
get children() {
|
|
1255
|
-
return
|
|
1330
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1331
|
+
get children() {
|
|
1332
|
+
return getChildren();
|
|
1333
|
+
}
|
|
1334
|
+
}));
|
|
1256
1335
|
}
|
|
1257
|
-
})
|
|
1336
|
+
});
|
|
1258
1337
|
}
|
|
1259
1338
|
});
|
|
1260
1339
|
};
|
|
@@ -1265,27 +1344,18 @@ const DatePickerClearTrigger = props => {
|
|
|
1265
1344
|
return web.createComponent(ark.button, mergedProps);
|
|
1266
1345
|
};
|
|
1267
1346
|
|
|
1268
|
-
const _tmpl$$g = /*#__PURE__*/web.template(`<div>`);
|
|
1269
1347
|
const DatePickerContent = props => {
|
|
1270
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1271
1348
|
const api = useDatePickerContext();
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
}, presenceProps, {
|
|
1278
|
-
get fallback() {
|
|
1279
|
-
return (() => {
|
|
1280
|
-
const _el$ = _tmpl$$g();
|
|
1281
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
1282
|
-
return _el$;
|
|
1283
|
-
})();
|
|
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;
|
|
1284
1354
|
},
|
|
1285
1355
|
get children() {
|
|
1286
1356
|
return web.createComponent(ark.div, mergedProps);
|
|
1287
1357
|
}
|
|
1288
|
-
})
|
|
1358
|
+
});
|
|
1289
1359
|
};
|
|
1290
1360
|
|
|
1291
1361
|
const DatePickerControl = props => {
|
|
@@ -1306,14 +1376,14 @@ const DatePickerLabel = props => {
|
|
|
1306
1376
|
return web.createComponent(ark.label, mergedProps);
|
|
1307
1377
|
};
|
|
1308
1378
|
|
|
1309
|
-
const _tmpl$$
|
|
1379
|
+
const _tmpl$$8 = /*#__PURE__*/web.template(`<option>`);
|
|
1310
1380
|
const DatePickerMonthSelect = props => {
|
|
1311
1381
|
const api = useDatePickerContext();
|
|
1312
1382
|
const mergedProps = solid.mergeProps(() => api().monthSelectProps, props);
|
|
1313
1383
|
return web.createComponent(ark.select, web.mergeProps(mergedProps, {
|
|
1314
1384
|
get children() {
|
|
1315
1385
|
return api().getMonths().map(month => (() => {
|
|
1316
|
-
const _el$ = _tmpl$$
|
|
1386
|
+
const _el$ = _tmpl$$8();
|
|
1317
1387
|
web.insert(_el$, () => month.label);
|
|
1318
1388
|
web.effect(() => _el$.value = month.value);
|
|
1319
1389
|
return _el$;
|
|
@@ -1336,8 +1406,16 @@ const DatePickerNextTrigger = props => {
|
|
|
1336
1406
|
|
|
1337
1407
|
const DatePickerPositioner = props => {
|
|
1338
1408
|
const api = useDatePickerContext();
|
|
1409
|
+
const presenceApi = usePresenceContext();
|
|
1339
1410
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
1340
|
-
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
|
+
});
|
|
1341
1419
|
};
|
|
1342
1420
|
|
|
1343
1421
|
const DatePickerPrevTrigger = props => {
|
|
@@ -1488,7 +1566,7 @@ const DatePickerViewTrigger = props => {
|
|
|
1488
1566
|
return web.createComponent(ark.button, mergedProps);
|
|
1489
1567
|
};
|
|
1490
1568
|
|
|
1491
|
-
const _tmpl$$
|
|
1569
|
+
const _tmpl$$7 = /*#__PURE__*/web.template(`<option>`);
|
|
1492
1570
|
const DatePickerYearSelect = props => {
|
|
1493
1571
|
const api = useDatePickerContext();
|
|
1494
1572
|
const mergedProps = solid.mergeProps(() => api().yearSelectProps, props);
|
|
@@ -1498,7 +1576,7 @@ const DatePickerYearSelect = props => {
|
|
|
1498
1576
|
from: 1_000,
|
|
1499
1577
|
to: 4_000
|
|
1500
1578
|
}).map(year => (() => {
|
|
1501
|
-
const _el$ = _tmpl$$
|
|
1579
|
+
const _el$ = _tmpl$$7();
|
|
1502
1580
|
_el$.value = year;
|
|
1503
1581
|
web.insert(_el$, year);
|
|
1504
1582
|
return _el$;
|
|
@@ -1558,91 +1636,95 @@ const useDialog = props => {
|
|
|
1558
1636
|
};
|
|
1559
1637
|
|
|
1560
1638
|
const Dialog$1 = props => {
|
|
1561
|
-
const [
|
|
1562
|
-
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
|
+
})));
|
|
1563
1645
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1564
1646
|
return web.createComponent(DialogProvider, {
|
|
1565
1647
|
value: api,
|
|
1566
1648
|
get children() {
|
|
1567
|
-
return
|
|
1649
|
+
return web.createComponent(PresenceProvider, {
|
|
1650
|
+
value: apiPresence,
|
|
1651
|
+
get children() {
|
|
1652
|
+
return getChildren();
|
|
1653
|
+
}
|
|
1654
|
+
});
|
|
1568
1655
|
}
|
|
1569
1656
|
});
|
|
1570
1657
|
};
|
|
1571
1658
|
|
|
1572
|
-
const _tmpl$$d = /*#__PURE__*/web.template(`<div>`);
|
|
1573
1659
|
const DialogBackdrop = props => {
|
|
1574
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1575
1660
|
const api = useDialogContext();
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
}, presenceProps, {
|
|
1582
|
-
get fallback() {
|
|
1583
|
-
return (() => {
|
|
1584
|
-
const _el$ = _tmpl$$d();
|
|
1585
|
-
web.spread(_el$, web.mergeProps(() => api().backdropProps), false, false);
|
|
1586
|
-
return _el$;
|
|
1587
|
-
})();
|
|
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;
|
|
1588
1666
|
},
|
|
1589
1667
|
get children() {
|
|
1590
1668
|
return web.createComponent(ark.div, mergedProps);
|
|
1591
1669
|
}
|
|
1592
|
-
})
|
|
1670
|
+
});
|
|
1593
1671
|
};
|
|
1594
1672
|
|
|
1595
1673
|
const DialogCloseTrigger = props => {
|
|
1596
1674
|
const dialog = useDialogContext();
|
|
1597
|
-
const
|
|
1598
|
-
return web.createComponent(ark.button,
|
|
1675
|
+
const mergedProps = solid.mergeProps(() => dialog().triggerProps, props);
|
|
1676
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1599
1677
|
};
|
|
1600
1678
|
|
|
1601
|
-
const _tmpl$$c = /*#__PURE__*/web.template(`<div>`);
|
|
1602
1679
|
const DialogContent = props => {
|
|
1603
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1604
1680
|
const api = useDialogContext();
|
|
1605
|
-
const
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
}, presenceProps, {
|
|
1611
|
-
get fallback() {
|
|
1612
|
-
return (() => {
|
|
1613
|
-
const _el$ = _tmpl$$c();
|
|
1614
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
1615
|
-
return _el$;
|
|
1616
|
-
})();
|
|
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;
|
|
1617
1686
|
},
|
|
1618
1687
|
get children() {
|
|
1619
1688
|
return web.createComponent(ark.div, mergedProps);
|
|
1620
1689
|
}
|
|
1621
|
-
})
|
|
1690
|
+
});
|
|
1622
1691
|
};
|
|
1623
1692
|
|
|
1624
1693
|
const DialogDescription = props => {
|
|
1625
1694
|
const dialog = useDialogContext();
|
|
1626
|
-
const
|
|
1627
|
-
return web.createComponent(ark.p,
|
|
1695
|
+
const mergedProps = solid.mergeProps(() => dialog().descriptionProps, props);
|
|
1696
|
+
return web.createComponent(ark.p, mergedProps);
|
|
1628
1697
|
};
|
|
1629
1698
|
|
|
1630
1699
|
const DialogPositioner = props => {
|
|
1631
|
-
const
|
|
1632
|
-
const
|
|
1633
|
-
|
|
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
|
+
});
|
|
1634
1711
|
};
|
|
1635
1712
|
|
|
1636
1713
|
const DialogTitle = props => {
|
|
1637
1714
|
const dialog = useDialogContext();
|
|
1638
|
-
const
|
|
1639
|
-
return web.createComponent(ark.h2,
|
|
1715
|
+
const mergedProps = solid.mergeProps(() => dialog().titleProps, props);
|
|
1716
|
+
return web.createComponent(ark.h2, mergedProps);
|
|
1640
1717
|
};
|
|
1641
1718
|
|
|
1642
1719
|
const DialogTrigger = props => {
|
|
1643
|
-
const
|
|
1644
|
-
const
|
|
1645
|
-
|
|
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);
|
|
1646
1728
|
};
|
|
1647
1729
|
|
|
1648
1730
|
const Dialog = Object.assign(Dialog$1, {
|
|
@@ -1677,12 +1759,12 @@ const Editable$1 = props => {
|
|
|
1677
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']);
|
|
1678
1760
|
const editable = useEditable(useEditableProps);
|
|
1679
1761
|
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
1680
|
-
const
|
|
1762
|
+
const mergedProps = solid.mergeProps(() => editable().rootProps, localProps);
|
|
1681
1763
|
const getChildren = () => runIfFn(childrenProps.children, editable);
|
|
1682
1764
|
return web.createComponent(EditableProvider, {
|
|
1683
1765
|
value: editable,
|
|
1684
1766
|
get children() {
|
|
1685
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
1767
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1686
1768
|
get children() {
|
|
1687
1769
|
return getChildren();
|
|
1688
1770
|
}
|
|
@@ -1693,50 +1775,50 @@ const Editable$1 = props => {
|
|
|
1693
1775
|
|
|
1694
1776
|
const EditableArea = props => {
|
|
1695
1777
|
const editable = useEditableContext();
|
|
1696
|
-
const
|
|
1697
|
-
return web.createComponent(ark.div,
|
|
1778
|
+
const mergedProps = solid.mergeProps(() => editable().areaProps, props);
|
|
1779
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1698
1780
|
};
|
|
1699
1781
|
|
|
1700
1782
|
const EditableCancelTrigger = props => {
|
|
1701
1783
|
const editable = useEditableContext();
|
|
1702
|
-
const
|
|
1703
|
-
return web.createComponent(ark.button,
|
|
1784
|
+
const mergedProps = solid.mergeProps(() => editable().cancelTriggerProps, props);
|
|
1785
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1704
1786
|
};
|
|
1705
1787
|
|
|
1706
1788
|
const EditableControl = props => {
|
|
1707
1789
|
const editable = useEditableContext();
|
|
1708
|
-
const
|
|
1709
|
-
return web.createComponent(ark.div,
|
|
1790
|
+
const mergedProps = solid.mergeProps(() => editable().controlProps, props);
|
|
1791
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1710
1792
|
};
|
|
1711
1793
|
|
|
1712
1794
|
const EditableEditTrigger = props => {
|
|
1713
1795
|
const editable = useEditableContext();
|
|
1714
|
-
const
|
|
1715
|
-
return web.createComponent(ark.button,
|
|
1796
|
+
const mergedProps = solid.mergeProps(() => editable().editTriggerProps, props);
|
|
1797
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1716
1798
|
};
|
|
1717
1799
|
|
|
1718
1800
|
const EditableInput = props => {
|
|
1719
1801
|
const editable = useEditableContext();
|
|
1720
|
-
const
|
|
1721
|
-
return web.createComponent(ark.input,
|
|
1802
|
+
const mergedProps = solid.mergeProps(() => editable().inputProps, props);
|
|
1803
|
+
return web.createComponent(ark.input, mergedProps);
|
|
1722
1804
|
};
|
|
1723
1805
|
|
|
1724
1806
|
const EditableLabel = props => {
|
|
1725
1807
|
const editable = useEditableContext();
|
|
1726
|
-
const
|
|
1727
|
-
return web.createComponent(ark.label,
|
|
1808
|
+
const mergedProps = solid.mergeProps(() => editable().labelProps, props);
|
|
1809
|
+
return web.createComponent(ark.label, mergedProps);
|
|
1728
1810
|
};
|
|
1729
1811
|
|
|
1730
1812
|
const EditablePreview = props => {
|
|
1731
1813
|
const editable = useEditableContext();
|
|
1732
|
-
const
|
|
1733
|
-
return web.createComponent(ark.span,
|
|
1814
|
+
const mergedProps = solid.mergeProps(() => editable().previewProps, props);
|
|
1815
|
+
return web.createComponent(ark.span, mergedProps);
|
|
1734
1816
|
};
|
|
1735
1817
|
|
|
1736
1818
|
const EditableSubmitTrigger = props => {
|
|
1737
1819
|
const dialog = useEditableContext();
|
|
1738
|
-
const
|
|
1739
|
-
return web.createComponent(ark.button,
|
|
1820
|
+
const mergedProps = solid.mergeProps(() => dialog().submitTriggerProps, props);
|
|
1821
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1740
1822
|
};
|
|
1741
1823
|
|
|
1742
1824
|
const Editable = Object.assign(Editable$1, {
|
|
@@ -1769,62 +1851,70 @@ const useHoverCard = props => {
|
|
|
1769
1851
|
};
|
|
1770
1852
|
|
|
1771
1853
|
const HoverCard$1 = props => {
|
|
1772
|
-
const [
|
|
1773
|
-
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
|
+
})));
|
|
1774
1860
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
1775
1861
|
return web.createComponent(HoverCardProvider, {
|
|
1776
1862
|
value: api,
|
|
1777
1863
|
get children() {
|
|
1778
|
-
return
|
|
1864
|
+
return web.createComponent(PresenceProvider, {
|
|
1865
|
+
value: apiPresence,
|
|
1866
|
+
get children() {
|
|
1867
|
+
return getChildren();
|
|
1868
|
+
}
|
|
1869
|
+
});
|
|
1779
1870
|
}
|
|
1780
1871
|
});
|
|
1781
1872
|
};
|
|
1782
1873
|
|
|
1783
1874
|
const HoverCardArrow = props => {
|
|
1784
1875
|
const hoverCard = useHoverCardContext();
|
|
1785
|
-
const
|
|
1786
|
-
return web.createComponent(ark.div,
|
|
1876
|
+
const mergedProps = solid.mergeProps(() => hoverCard().arrowProps, props);
|
|
1877
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1787
1878
|
};
|
|
1788
1879
|
|
|
1789
1880
|
const HoverCardArrowTip = props => {
|
|
1790
1881
|
const hoverCard = useHoverCardContext();
|
|
1791
|
-
const
|
|
1792
|
-
return web.createComponent(ark.div,
|
|
1882
|
+
const mergedProps = solid.mergeProps(() => hoverCard().arrowTipProps, props);
|
|
1883
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1793
1884
|
};
|
|
1794
1885
|
|
|
1795
|
-
const _tmpl$$b = /*#__PURE__*/web.template(`<div>`);
|
|
1796
1886
|
const HoverCardContent = props => {
|
|
1797
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1798
1887
|
const api = useHoverCardContext();
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
}, presenceProps, {
|
|
1805
|
-
get fallback() {
|
|
1806
|
-
return (() => {
|
|
1807
|
-
const _el$ = _tmpl$$b();
|
|
1808
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
1809
|
-
return _el$;
|
|
1810
|
-
})();
|
|
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;
|
|
1811
1893
|
},
|
|
1812
1894
|
get children() {
|
|
1813
1895
|
return web.createComponent(ark.div, mergedProps);
|
|
1814
1896
|
}
|
|
1815
|
-
})
|
|
1897
|
+
});
|
|
1816
1898
|
};
|
|
1817
1899
|
|
|
1818
1900
|
const HoverCardPositioner = props => {
|
|
1819
|
-
const
|
|
1820
|
-
const
|
|
1821
|
-
|
|
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
|
+
});
|
|
1822
1912
|
};
|
|
1823
1913
|
|
|
1824
1914
|
const HoverCardTrigger = props => {
|
|
1825
1915
|
const hoverCard = useHoverCardContext();
|
|
1826
|
-
const
|
|
1827
|
-
return web.createComponent(ark.button,
|
|
1916
|
+
const mergedProps = solid.mergeProps(() => hoverCard().triggerProps, props);
|
|
1917
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1828
1918
|
};
|
|
1829
1919
|
|
|
1830
1920
|
const HoverCard = Object.assign(HoverCard$1, {
|
|
@@ -1868,25 +1958,22 @@ const useMenu = props => {
|
|
|
1868
1958
|
};
|
|
1869
1959
|
|
|
1870
1960
|
const Menu$1 = props => {
|
|
1871
|
-
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']);
|
|
1872
1963
|
const parentMenu = useMenuContext();
|
|
1873
1964
|
const parentMachine = useMenuMachineContext();
|
|
1874
|
-
const menu = useMenu(
|
|
1965
|
+
const menu = useMenu(useMenuProps);
|
|
1966
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
1967
|
+
present: menu().api().isOpen
|
|
1968
|
+
})));
|
|
1875
1969
|
solidJs.createEffect(() => {
|
|
1876
1970
|
if (!parentMachine) return;
|
|
1877
1971
|
parentMenu?.().setChild(menu().machine);
|
|
1878
1972
|
menu().api().setParent(parentMachine());
|
|
1879
1973
|
});
|
|
1880
|
-
solidJs.createEffect(() => {
|
|
1881
|
-
if (!restProps.isOpen) return;
|
|
1882
|
-
restProps.isOpen?.() ? menu().api().open() : menu().api().close();
|
|
1883
|
-
});
|
|
1884
1974
|
const triggerItemContext = solidJs.createMemo(() => parentMenu?.().getTriggerItemProps(menu().api()));
|
|
1885
1975
|
const machineContext = () => menu().machine;
|
|
1886
|
-
const getChildren = () => runIfFn(
|
|
1887
|
-
isOpen: menu?.().api().isOpen,
|
|
1888
|
-
onClose: menu?.().api().close
|
|
1889
|
-
}));
|
|
1976
|
+
const getChildren = () => runIfFn(localProps.children, menu().api);
|
|
1890
1977
|
return web.createComponent(MenuTriggerItemProvider, {
|
|
1891
1978
|
value: triggerItemContext,
|
|
1892
1979
|
get children() {
|
|
@@ -1898,7 +1985,12 @@ const Menu$1 = props => {
|
|
|
1898
1985
|
return menu().api;
|
|
1899
1986
|
},
|
|
1900
1987
|
get children() {
|
|
1901
|
-
return
|
|
1988
|
+
return web.createComponent(PresenceProvider, {
|
|
1989
|
+
value: apiPresence,
|
|
1990
|
+
get children() {
|
|
1991
|
+
return getChildren();
|
|
1992
|
+
}
|
|
1993
|
+
});
|
|
1902
1994
|
}
|
|
1903
1995
|
});
|
|
1904
1996
|
}
|
|
@@ -1909,57 +2001,48 @@ const Menu$1 = props => {
|
|
|
1909
2001
|
|
|
1910
2002
|
const MenuArrow = props => {
|
|
1911
2003
|
const menu = useMenuContext();
|
|
1912
|
-
const
|
|
1913
|
-
return web.createComponent(ark.div,
|
|
2004
|
+
const mergedProps = solid.mergeProps(() => menu?.().arrowProps, props);
|
|
2005
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1914
2006
|
};
|
|
1915
2007
|
|
|
1916
2008
|
const MenuArrowTip = props => {
|
|
1917
2009
|
const menu = useMenuContext();
|
|
1918
|
-
const
|
|
1919
|
-
return web.createComponent(ark.div,
|
|
2010
|
+
const mergedProps = solid.mergeProps(() => menu?.().arrowTipProps, props);
|
|
2011
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1920
2012
|
};
|
|
1921
2013
|
|
|
1922
|
-
const _tmpl$$a = /*#__PURE__*/web.template(`<div>`);
|
|
1923
2014
|
const MenuContent = props => {
|
|
1924
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
1925
2015
|
const api = useMenuContext();
|
|
1926
|
-
const
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
}, presenceProps, {
|
|
1932
|
-
get fallback() {
|
|
1933
|
-
return (() => {
|
|
1934
|
-
const _el$ = _tmpl$$a();
|
|
1935
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
1936
|
-
return _el$;
|
|
1937
|
-
})();
|
|
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;
|
|
1938
2021
|
},
|
|
1939
2022
|
get children() {
|
|
1940
2023
|
return web.createComponent(ark.div, mergedProps);
|
|
1941
2024
|
}
|
|
1942
|
-
})
|
|
2025
|
+
});
|
|
1943
2026
|
};
|
|
1944
2027
|
|
|
1945
2028
|
const MenuContextTrigger = props => {
|
|
1946
2029
|
const menu = useMenuContext();
|
|
1947
|
-
const
|
|
1948
|
-
return web.createComponent(ark.button,
|
|
2030
|
+
const mergedProps = solid.mergeProps(() => menu?.().contextTriggerProps, props);
|
|
2031
|
+
return web.createComponent(ark.button, mergedProps);
|
|
1949
2032
|
};
|
|
1950
2033
|
|
|
1951
2034
|
const MenuItem = props => {
|
|
1952
2035
|
const menu = useMenuContext();
|
|
1953
2036
|
const [itemParams, restProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect']);
|
|
1954
|
-
const
|
|
1955
|
-
return web.createComponent(ark.div,
|
|
2037
|
+
const mergedProps = solid.mergeProps(() => menu?.().getItemProps(itemParams), restProps);
|
|
2038
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1956
2039
|
};
|
|
1957
2040
|
|
|
1958
2041
|
const MenuItemGroup = props => {
|
|
1959
2042
|
const menu = useMenuContext();
|
|
1960
2043
|
const [itemGroupProps, localProps] = createSplitProps()(props, ['id']);
|
|
1961
|
-
const
|
|
1962
|
-
return web.createComponent(ark.div,
|
|
2044
|
+
const mergedProps = solid.mergeProps(() => menu?.().getItemGroupProps(itemGroupProps), localProps);
|
|
2045
|
+
return web.createComponent(ark.div, mergedProps);
|
|
1963
2046
|
};
|
|
1964
2047
|
|
|
1965
2048
|
const MenuItemGroupLabel = props => {
|
|
@@ -1974,10 +2057,10 @@ const MenuItemGroupLabel = props => {
|
|
|
1974
2057
|
const MenuOptionItem = props => {
|
|
1975
2058
|
const menu = useMenuContext();
|
|
1976
2059
|
const [optionProps, localProps] = createSplitProps()(props, ['id', 'disabled', 'valueText', 'closeOnSelect', 'name', 'type', 'value', 'onCheckedChange']);
|
|
1977
|
-
const
|
|
2060
|
+
const mergedProps = solid.mergeProps(() => menu().getOptionItemProps(optionProps), localProps);
|
|
1978
2061
|
const itemState = solidJs.createMemo(() => menu().getOptionItemState(optionProps));
|
|
1979
2062
|
const getChildren = () => runIfFn(localProps.children, itemState);
|
|
1980
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
2063
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
1981
2064
|
get children() {
|
|
1982
2065
|
return getChildren();
|
|
1983
2066
|
}
|
|
@@ -1985,27 +2068,35 @@ const MenuOptionItem = props => {
|
|
|
1985
2068
|
};
|
|
1986
2069
|
|
|
1987
2070
|
const MenuPositioner = props => {
|
|
1988
|
-
const
|
|
1989
|
-
const
|
|
1990
|
-
|
|
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
|
+
});
|
|
1991
2082
|
};
|
|
1992
2083
|
|
|
1993
2084
|
const MenuSeparator = props => {
|
|
1994
2085
|
const menu = useMenuContext();
|
|
1995
|
-
const
|
|
1996
|
-
return web.createComponent(ark.hr,
|
|
2086
|
+
const mergedProps = solid.mergeProps(() => menu?.().separatorProps, props);
|
|
2087
|
+
return web.createComponent(ark.hr, mergedProps);
|
|
1997
2088
|
};
|
|
1998
2089
|
|
|
1999
2090
|
const MenuTrigger = props => {
|
|
2000
2091
|
const menu = useMenuContext();
|
|
2001
|
-
const
|
|
2002
|
-
return web.createComponent(ark.button,
|
|
2092
|
+
const mergedProps = solid.mergeProps(() => menu?.().triggerProps, props);
|
|
2093
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2003
2094
|
};
|
|
2004
2095
|
|
|
2005
2096
|
const MenuTriggerItem = props => {
|
|
2006
2097
|
const getTriggerItemProps = useMenuTriggerItemContext();
|
|
2007
|
-
const
|
|
2008
|
-
return web.createComponent(ark.div,
|
|
2098
|
+
const mergedProps = solid.mergeProps(() => getTriggerItemProps?.(), props);
|
|
2099
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2009
2100
|
};
|
|
2010
2101
|
|
|
2011
2102
|
const Menu = Object.assign(Menu$1, {
|
|
@@ -2044,49 +2135,49 @@ const useNumberInput = props => {
|
|
|
2044
2135
|
const NumberInput$1 = props => {
|
|
2045
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']);
|
|
2046
2137
|
const api = useNumberInput(useNumberInputProps);
|
|
2047
|
-
const
|
|
2138
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2048
2139
|
return web.createComponent(NumberInputProvider, {
|
|
2049
2140
|
value: api,
|
|
2050
2141
|
get children() {
|
|
2051
|
-
return web.createComponent(ark.div,
|
|
2142
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2052
2143
|
}
|
|
2053
2144
|
});
|
|
2054
2145
|
};
|
|
2055
2146
|
|
|
2056
2147
|
const NumberInputControl = props => {
|
|
2057
2148
|
const api = useNumberInputContext();
|
|
2058
|
-
const
|
|
2059
|
-
return web.createComponent(ark.div,
|
|
2149
|
+
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2150
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2060
2151
|
};
|
|
2061
2152
|
|
|
2062
2153
|
const NumberInputDecrementTrigger = props => {
|
|
2063
2154
|
const api = useNumberInputContext();
|
|
2064
|
-
const
|
|
2065
|
-
return web.createComponent(ark.button,
|
|
2155
|
+
const mergedProps = solid.mergeProps(() => api().decrementTriggerProps, props);
|
|
2156
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2066
2157
|
};
|
|
2067
2158
|
|
|
2068
2159
|
const NumberInputInput = props => {
|
|
2069
2160
|
const api = useNumberInputContext();
|
|
2070
|
-
const
|
|
2071
|
-
return web.createComponent(ark.input,
|
|
2161
|
+
const mergedProps = solid.mergeProps(() => api().inputProps, props);
|
|
2162
|
+
return web.createComponent(ark.input, mergedProps);
|
|
2072
2163
|
};
|
|
2073
2164
|
|
|
2074
2165
|
const NumberInputIncrementTrigger = props => {
|
|
2075
2166
|
const api = useNumberInputContext();
|
|
2076
|
-
const
|
|
2077
|
-
return web.createComponent(ark.button,
|
|
2167
|
+
const mergedProps = solid.mergeProps(() => api().incrementTriggerProps, props);
|
|
2168
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2078
2169
|
};
|
|
2079
2170
|
|
|
2080
2171
|
const NumberInputLabel = props => {
|
|
2081
2172
|
const api = useNumberInputContext();
|
|
2082
|
-
const
|
|
2083
|
-
return web.createComponent(ark.label,
|
|
2173
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
2174
|
+
return web.createComponent(ark.label, mergedProps);
|
|
2084
2175
|
};
|
|
2085
2176
|
|
|
2086
2177
|
const NumberInputScrubber = props => {
|
|
2087
2178
|
const api = useNumberInputContext();
|
|
2088
|
-
const
|
|
2089
|
-
return web.createComponent(ark.div,
|
|
2179
|
+
const mergedProps = solid.mergeProps(() => api().scrubberProps, props);
|
|
2180
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2090
2181
|
};
|
|
2091
2182
|
|
|
2092
2183
|
const NumberInput = Object.assign(NumberInput$1, {
|
|
@@ -2121,11 +2212,11 @@ const Pagination$1 = props => {
|
|
|
2121
2212
|
const [childrenProps, localProps] = solidJs.splitProps(restProps, ['children']);
|
|
2122
2213
|
const api = usePagination(paginationParams);
|
|
2123
2214
|
const getChildren = () => runIfFn(childrenProps.children, api);
|
|
2124
|
-
const
|
|
2215
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2125
2216
|
return web.createComponent(PaginationProvider, {
|
|
2126
2217
|
value: api,
|
|
2127
2218
|
get children() {
|
|
2128
|
-
return web.createComponent(ark.nav, web.mergeProps(
|
|
2219
|
+
return web.createComponent(ark.nav, web.mergeProps(mergedProps, {
|
|
2129
2220
|
get children() {
|
|
2130
2221
|
return getChildren();
|
|
2131
2222
|
}
|
|
@@ -2185,7 +2276,7 @@ const usePinInput = props => {
|
|
|
2185
2276
|
return solidJs.createMemo(() => pinInput__namespace.connect(state, send, solid.normalizeProps));
|
|
2186
2277
|
};
|
|
2187
2278
|
|
|
2188
|
-
const _tmpl$$
|
|
2279
|
+
const _tmpl$$6 = /*#__PURE__*/web.template(`<input>`);
|
|
2189
2280
|
const PinInput$1 = props => {
|
|
2190
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']);
|
|
2191
2282
|
const api = usePinInput(pinInputProps);
|
|
@@ -2194,7 +2285,7 @@ const PinInput$1 = props => {
|
|
|
2194
2285
|
value: api,
|
|
2195
2286
|
get children() {
|
|
2196
2287
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2197
|
-
const _el$ = _tmpl$$
|
|
2288
|
+
const _el$ = _tmpl$$6();
|
|
2198
2289
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2199
2290
|
return _el$;
|
|
2200
2291
|
})()];
|
|
@@ -2211,14 +2302,14 @@ const PinInputControl = props => {
|
|
|
2211
2302
|
const PinInputInput = props => {
|
|
2212
2303
|
const [inputParams, localProps] = solidJs.splitProps(props, ['index']);
|
|
2213
2304
|
const api = usePinInputContext();
|
|
2214
|
-
const
|
|
2215
|
-
return web.createComponent(ark.input,
|
|
2305
|
+
const mergedProps = solid.mergeProps(() => api().getInputProps(inputParams), localProps);
|
|
2306
|
+
return web.createComponent(ark.input, mergedProps);
|
|
2216
2307
|
};
|
|
2217
2308
|
|
|
2218
2309
|
const PinInputLabel = props => {
|
|
2219
2310
|
const api = usePinInputContext();
|
|
2220
|
-
const
|
|
2221
|
-
return web.createComponent(ark.label,
|
|
2311
|
+
const mergedProps = solid.mergeProps(() => api().labelProps, props);
|
|
2312
|
+
return web.createComponent(ark.label, mergedProps);
|
|
2222
2313
|
};
|
|
2223
2314
|
|
|
2224
2315
|
const PinInput = Object.assign(PinInput$1, {
|
|
@@ -2246,67 +2337,68 @@ const usePopover = props => {
|
|
|
2246
2337
|
};
|
|
2247
2338
|
|
|
2248
2339
|
const Popover$1 = props => {
|
|
2249
|
-
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']);
|
|
2250
2342
|
const api = usePopover(usePopoverProps);
|
|
2343
|
+
const apiPresence = usePresence(solid.mergeProps(presenceProps, () => ({
|
|
2344
|
+
present: api().isOpen
|
|
2345
|
+
})));
|
|
2346
|
+
const getChildren = () => runIfFn(localProps.children, api);
|
|
2251
2347
|
return web.createComponent(PopoverProvider, {
|
|
2252
2348
|
value: api,
|
|
2253
2349
|
get children() {
|
|
2254
|
-
return
|
|
2350
|
+
return web.createComponent(PresenceProvider, {
|
|
2351
|
+
value: apiPresence,
|
|
2352
|
+
get children() {
|
|
2353
|
+
return getChildren();
|
|
2354
|
+
}
|
|
2355
|
+
});
|
|
2255
2356
|
}
|
|
2256
2357
|
});
|
|
2257
2358
|
};
|
|
2258
2359
|
|
|
2259
2360
|
const PopoverAnchor = props => {
|
|
2260
2361
|
const api = usePopoverContext();
|
|
2261
|
-
const
|
|
2262
|
-
return web.createComponent(ark.div,
|
|
2362
|
+
const mergedProps = solid.mergeProps(() => api().anchorProps, props);
|
|
2363
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2263
2364
|
};
|
|
2264
2365
|
|
|
2265
2366
|
const PopoverArrow = props => {
|
|
2266
2367
|
const popover = usePopoverContext();
|
|
2267
|
-
const
|
|
2268
|
-
return web.createComponent(ark.div,
|
|
2368
|
+
const mergedProps = solid.mergeProps(() => popover().arrowProps, props);
|
|
2369
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2269
2370
|
};
|
|
2270
2371
|
|
|
2271
2372
|
const PopoverArrowTip = props => {
|
|
2272
2373
|
const popover = usePopoverContext();
|
|
2273
|
-
const
|
|
2274
|
-
return web.createComponent(ark.div,
|
|
2374
|
+
const mergedProps = solid.mergeProps(() => popover().arrowTipProps, props);
|
|
2375
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2275
2376
|
};
|
|
2276
2377
|
|
|
2277
2378
|
const PopoverCloseTrigger = props => {
|
|
2278
2379
|
const api = usePopoverContext();
|
|
2279
|
-
const
|
|
2280
|
-
return web.createComponent(ark.button,
|
|
2380
|
+
const mergedProps = solid.mergeProps(() => api().closeTriggerProps, props);
|
|
2381
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2281
2382
|
};
|
|
2282
2383
|
|
|
2283
|
-
const _tmpl$$8 = /*#__PURE__*/web.template(`<div>`);
|
|
2284
2384
|
const PopoverContent = props => {
|
|
2285
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
2286
2385
|
const api = usePopoverContext();
|
|
2287
|
-
const
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
}, presenceProps, {
|
|
2293
|
-
get fallback() {
|
|
2294
|
-
return (() => {
|
|
2295
|
-
const _el$ = _tmpl$$8();
|
|
2296
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
2297
|
-
return _el$;
|
|
2298
|
-
})();
|
|
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;
|
|
2299
2391
|
},
|
|
2300
2392
|
get children() {
|
|
2301
2393
|
return web.createComponent(ark.div, mergedProps);
|
|
2302
2394
|
}
|
|
2303
|
-
})
|
|
2395
|
+
});
|
|
2304
2396
|
};
|
|
2305
2397
|
|
|
2306
2398
|
const PopoverDescription = props => {
|
|
2307
2399
|
const api = usePopoverContext();
|
|
2308
|
-
const
|
|
2309
|
-
return web.createComponent(ark.div,
|
|
2400
|
+
const mergedProps = solid.mergeProps(() => api().descriptionProps, props);
|
|
2401
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2310
2402
|
};
|
|
2311
2403
|
|
|
2312
2404
|
const PopoverIndicator = props => {
|
|
@@ -2317,20 +2409,33 @@ const PopoverIndicator = props => {
|
|
|
2317
2409
|
|
|
2318
2410
|
const PopoverPositioner = props => {
|
|
2319
2411
|
const api = usePopoverContext();
|
|
2320
|
-
const
|
|
2321
|
-
|
|
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
|
+
});
|
|
2322
2422
|
};
|
|
2323
2423
|
|
|
2324
2424
|
const PopoverTitle = props => {
|
|
2325
2425
|
const api = usePopoverContext();
|
|
2326
|
-
const
|
|
2327
|
-
return web.createComponent(ark.div,
|
|
2426
|
+
const mergedProps = solid.mergeProps(() => api().titleProps, props);
|
|
2427
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2328
2428
|
};
|
|
2329
2429
|
|
|
2330
2430
|
const PopoverTrigger = props => {
|
|
2331
2431
|
const api = usePopoverContext();
|
|
2332
|
-
const
|
|
2333
|
-
|
|
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);
|
|
2334
2439
|
};
|
|
2335
2440
|
|
|
2336
2441
|
const Popover = Object.assign(Popover$1, {
|
|
@@ -2399,13 +2504,13 @@ const RadioGroupItem = props => {
|
|
|
2399
2504
|
});
|
|
2400
2505
|
};
|
|
2401
2506
|
|
|
2402
|
-
const _tmpl$$
|
|
2507
|
+
const _tmpl$$5 = /*#__PURE__*/web.template(`<input>`);
|
|
2403
2508
|
const RadioGroupItemControl = props => {
|
|
2404
2509
|
const api = useRadioGroupContext();
|
|
2405
2510
|
const itemProps = useRadioGroupItemContext();
|
|
2406
2511
|
const mergedProps = solid.mergeProps(() => api().getItemControlProps(itemProps), props);
|
|
2407
2512
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2408
|
-
const _el$ = _tmpl$$
|
|
2513
|
+
const _el$ = _tmpl$$5();
|
|
2409
2514
|
web.spread(_el$, web.mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2410
2515
|
return _el$;
|
|
2411
2516
|
})()];
|
|
@@ -2462,7 +2567,7 @@ const RatingGroup$1 = props => {
|
|
|
2462
2567
|
});
|
|
2463
2568
|
};
|
|
2464
2569
|
|
|
2465
|
-
const _tmpl$$
|
|
2570
|
+
const _tmpl$$4 = /*#__PURE__*/web.template(`<input>`);
|
|
2466
2571
|
const RatingGroupControl = props => {
|
|
2467
2572
|
const api = useRatingGroupContext();
|
|
2468
2573
|
const getChildren = () => runIfFn(props.children, api);
|
|
@@ -2472,7 +2577,7 @@ const RatingGroupControl = props => {
|
|
|
2472
2577
|
return getChildren();
|
|
2473
2578
|
}
|
|
2474
2579
|
})), (() => {
|
|
2475
|
-
const _el$ = _tmpl$$
|
|
2580
|
+
const _el$ = _tmpl$$4();
|
|
2476
2581
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2477
2582
|
return _el$;
|
|
2478
2583
|
})()];
|
|
@@ -2484,11 +2589,11 @@ const [RatingGroupItemProvider, useRatingGroupItemContext] = createContext({
|
|
|
2484
2589
|
});
|
|
2485
2590
|
|
|
2486
2591
|
const RatingGroupItem = props => {
|
|
2487
|
-
const [
|
|
2592
|
+
const [itemProps, localProps] = createSplitProps()(props, ['index']);
|
|
2488
2593
|
const api = useRatingGroupContext();
|
|
2489
|
-
const itemState = api().getItemState(
|
|
2490
|
-
const
|
|
2491
|
-
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);
|
|
2492
2597
|
return web.createComponent(RatingGroupItemProvider, {
|
|
2493
2598
|
value: itemState,
|
|
2494
2599
|
get children() {
|
|
@@ -2566,13 +2671,13 @@ const SegmentGroupItem = props => {
|
|
|
2566
2671
|
});
|
|
2567
2672
|
};
|
|
2568
2673
|
|
|
2569
|
-
const _tmpl$$
|
|
2674
|
+
const _tmpl$$3 = /*#__PURE__*/web.template(`<input>`);
|
|
2570
2675
|
const SegmentGroupItemControl = props => {
|
|
2571
2676
|
const api = useSegmentGroupContext();
|
|
2572
2677
|
const itemProps = useSegmentGroupItemContext();
|
|
2573
2678
|
const mergedProps = solid.mergeProps(() => api().getItemControlProps(itemProps), anatomy.segmentGroupAnatomy.build().itemControl.attrs, props);
|
|
2574
2679
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2575
|
-
const _el$ = _tmpl$$
|
|
2680
|
+
const _el$ = _tmpl$$3();
|
|
2576
2681
|
web.spread(_el$, web.mergeProps(() => api().getItemHiddenInputProps(itemProps)), false, false);
|
|
2577
2682
|
return _el$;
|
|
2578
2683
|
})()];
|
|
@@ -2622,18 +2727,27 @@ const useSelect = props => {
|
|
|
2622
2727
|
};
|
|
2623
2728
|
|
|
2624
2729
|
const Select$1 = props => {
|
|
2625
|
-
const [
|
|
2626
|
-
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
|
+
})));
|
|
2627
2736
|
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2628
2737
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2629
2738
|
return web.createComponent(SelectProvider, {
|
|
2630
2739
|
value: api,
|
|
2631
2740
|
get children() {
|
|
2632
|
-
return web.createComponent(
|
|
2741
|
+
return web.createComponent(PresenceProvider, {
|
|
2742
|
+
value: apiPresence,
|
|
2633
2743
|
get children() {
|
|
2634
|
-
return
|
|
2744
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2745
|
+
get children() {
|
|
2746
|
+
return getChildren();
|
|
2747
|
+
}
|
|
2748
|
+
}));
|
|
2635
2749
|
}
|
|
2636
|
-
})
|
|
2750
|
+
});
|
|
2637
2751
|
}
|
|
2638
2752
|
});
|
|
2639
2753
|
};
|
|
@@ -2644,36 +2758,27 @@ const SelectClearTrigger = props => {
|
|
|
2644
2758
|
return web.createComponent(ark.button, mergedProps);
|
|
2645
2759
|
};
|
|
2646
2760
|
|
|
2647
|
-
const _tmpl$$4 = /*#__PURE__*/web.template(`<div>`);
|
|
2648
2761
|
const SelectContent = props => {
|
|
2649
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
2650
2762
|
const api = useSelectContext();
|
|
2651
|
-
const
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
}, presenceProps, {
|
|
2657
|
-
get fallback() {
|
|
2658
|
-
return (() => {
|
|
2659
|
-
const _el$ = _tmpl$$4();
|
|
2660
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
2661
|
-
return _el$;
|
|
2662
|
-
})();
|
|
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;
|
|
2663
2768
|
},
|
|
2664
2769
|
get children() {
|
|
2665
2770
|
return web.createComponent(ark.div, mergedProps);
|
|
2666
2771
|
}
|
|
2667
|
-
})
|
|
2772
|
+
});
|
|
2668
2773
|
};
|
|
2669
2774
|
|
|
2670
|
-
const _tmpl$$
|
|
2775
|
+
const _tmpl$$2 = /*#__PURE__*/web.template(`<select>`),
|
|
2671
2776
|
_tmpl$2 = /*#__PURE__*/web.template(`<option>`);
|
|
2672
2777
|
const SelectControl = props => {
|
|
2673
2778
|
const api = useSelectContext();
|
|
2674
2779
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2675
2780
|
return [web.createComponent(ark.div, mergedProps), (() => {
|
|
2676
|
-
const _el$ = _tmpl$$
|
|
2781
|
+
const _el$ = _tmpl$$2();
|
|
2677
2782
|
web.spread(_el$, web.mergeProps(() => api().hiddenSelectProps), false, true);
|
|
2678
2783
|
web.insert(_el$, web.createComponent(solidJs.Index, {
|
|
2679
2784
|
get each() {
|
|
@@ -2756,8 +2861,16 @@ const SelectLabel = props => {
|
|
|
2756
2861
|
|
|
2757
2862
|
const SelectPositioner = props => {
|
|
2758
2863
|
const api = useSelectContext();
|
|
2864
|
+
const presenceApi = usePresenceContext();
|
|
2759
2865
|
const mergedProps = solid.mergeProps(() => api().positionerProps, props);
|
|
2760
|
-
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
|
+
});
|
|
2761
2874
|
};
|
|
2762
2875
|
|
|
2763
2876
|
const SelectTrigger = props => {
|
|
@@ -2861,8 +2974,8 @@ const SliderRange = props => {
|
|
|
2861
2974
|
const SliderThumb = props => {
|
|
2862
2975
|
const [thumbProps, localProps] = createSplitProps()(props, ['index']);
|
|
2863
2976
|
const api = useSliderContext();
|
|
2864
|
-
const
|
|
2865
|
-
return web.createComponent(ark.div,
|
|
2977
|
+
const mergedProps = solid.mergeProps(() => api().getThumbProps(thumbProps), localProps);
|
|
2978
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2866
2979
|
};
|
|
2867
2980
|
|
|
2868
2981
|
const SliderTrack = props => {
|
|
@@ -2873,11 +2986,11 @@ const SliderTrack = props => {
|
|
|
2873
2986
|
|
|
2874
2987
|
const SliderValueText = props => {
|
|
2875
2988
|
const api = useSliderContext();
|
|
2876
|
-
const getChildren = () => runIfFn(props.children, api);
|
|
2877
2989
|
const mergedProps = solid.mergeProps(() => api().valueTextProps, props);
|
|
2990
|
+
const getChildren = solidJs.children(() => props.children);
|
|
2878
2991
|
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2879
2992
|
get children() {
|
|
2880
|
-
return getChildren();
|
|
2993
|
+
return getChildren() || api().value.join(',');
|
|
2881
2994
|
}
|
|
2882
2995
|
}));
|
|
2883
2996
|
};
|
|
@@ -2915,11 +3028,11 @@ const Splitter$1 = props => {
|
|
|
2915
3028
|
const [splitterParams, localProps] = createSplitProps()(props, ['dir', 'getRootNode', 'id', 'ids', 'onSizeChange', 'onSizeChangeEnd', 'onSizeChangeStart', 'orientation', 'size']);
|
|
2916
3029
|
const api = useSplitter(splitterParams);
|
|
2917
3030
|
const getChildren = () => runIfFn(localProps.children, api);
|
|
2918
|
-
const
|
|
3031
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, localProps);
|
|
2919
3032
|
return web.createComponent(SplitterProvider, {
|
|
2920
3033
|
value: api,
|
|
2921
3034
|
get children() {
|
|
2922
|
-
return web.createComponent(ark.div, web.mergeProps(
|
|
3035
|
+
return web.createComponent(ark.div, web.mergeProps(mergedProps, {
|
|
2923
3036
|
get children() {
|
|
2924
3037
|
return getChildren();
|
|
2925
3038
|
}
|
|
@@ -2931,15 +3044,15 @@ const Splitter$1 = props => {
|
|
|
2931
3044
|
const SplitterPanel = props => {
|
|
2932
3045
|
const [panelParams, restProps] = createSplitProps()(props, ['id', 'snapSize']);
|
|
2933
3046
|
const api = useSplitterContext();
|
|
2934
|
-
const
|
|
2935
|
-
return web.createComponent(ark.div,
|
|
3047
|
+
const mergedProps = solid.mergeProps(() => api().getPanelProps(panelParams), restProps);
|
|
3048
|
+
return web.createComponent(ark.div, mergedProps);
|
|
2936
3049
|
};
|
|
2937
3050
|
|
|
2938
3051
|
const SplitterResizeTrigger = props => {
|
|
2939
3052
|
const api = useSplitterContext();
|
|
2940
3053
|
const [triggerParams, restProps] = createSplitProps()(props, ['disabled', 'id', 'step']);
|
|
2941
|
-
const
|
|
2942
|
-
return web.createComponent(ark.button,
|
|
3054
|
+
const mergedProps = solid.mergeProps(() => api().getResizeTriggerProps(triggerParams), restProps);
|
|
3055
|
+
return web.createComponent(ark.button, mergedProps);
|
|
2943
3056
|
};
|
|
2944
3057
|
|
|
2945
3058
|
const Splitter = Object.assign(Splitter$1, {
|
|
@@ -2982,12 +3095,12 @@ const Switch$1 = props => {
|
|
|
2982
3095
|
});
|
|
2983
3096
|
};
|
|
2984
3097
|
|
|
2985
|
-
const _tmpl$$
|
|
3098
|
+
const _tmpl$$1 = /*#__PURE__*/web.template(`<input>`);
|
|
2986
3099
|
const SwitchControl = props => {
|
|
2987
3100
|
const api = useSwitchContext();
|
|
2988
3101
|
const mergedProps = solid.mergeProps(() => api().controlProps, props);
|
|
2989
3102
|
return [web.createComponent(ark.span, mergedProps), (() => {
|
|
2990
|
-
const _el$ = _tmpl$$
|
|
3103
|
+
const _el$ = _tmpl$$1();
|
|
2991
3104
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
2992
3105
|
return _el$;
|
|
2993
3106
|
})()];
|
|
@@ -2995,14 +3108,14 @@ const SwitchControl = props => {
|
|
|
2995
3108
|
|
|
2996
3109
|
const SwitchLabel = props => {
|
|
2997
3110
|
const checkbox = useSwitchContext();
|
|
2998
|
-
const
|
|
2999
|
-
return web.createComponent(ark.span,
|
|
3111
|
+
const mergedProps = solid.mergeProps(() => checkbox().labelProps, props);
|
|
3112
|
+
return web.createComponent(ark.span, mergedProps);
|
|
3000
3113
|
};
|
|
3001
3114
|
|
|
3002
3115
|
const SwitchThumb = props => {
|
|
3003
3116
|
const checkbox = useSwitchContext();
|
|
3004
|
-
const
|
|
3005
|
-
return web.createComponent(ark.span,
|
|
3117
|
+
const mergedProps = solid.mergeProps(() => checkbox().thumbProps, props);
|
|
3118
|
+
return web.createComponent(ark.span, mergedProps);
|
|
3006
3119
|
};
|
|
3007
3120
|
|
|
3008
3121
|
const Switch = Object.assign(Switch$1, {
|
|
@@ -3017,44 +3130,46 @@ const [TabsProvider, useTabsContext] = createContext({
|
|
|
3017
3130
|
providerName: '<TabsProvider />'
|
|
3018
3131
|
});
|
|
3019
3132
|
|
|
3020
|
-
const TabPresence = props => {
|
|
3021
|
-
const api = useTabsContext();
|
|
3022
|
-
return web.createComponent(Presence, web.mergeProps({
|
|
3023
|
-
get present() {
|
|
3024
|
-
return api().value === props.value;
|
|
3025
|
-
}
|
|
3026
|
-
}, props));
|
|
3027
|
-
};
|
|
3028
|
-
|
|
3029
3133
|
const TabContent = props => {
|
|
3030
|
-
const [
|
|
3031
|
-
const [getContentProps, restProps] = createSplitProps()(localProps, ['value']);
|
|
3134
|
+
const [contentProps, localProps] = createSplitProps()(props, ['value']);
|
|
3032
3135
|
const api = useTabsContext();
|
|
3033
|
-
const
|
|
3034
|
-
|
|
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,
|
|
3035
3143
|
get children() {
|
|
3036
|
-
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
|
+
});
|
|
3037
3152
|
}
|
|
3038
|
-
})
|
|
3153
|
+
});
|
|
3039
3154
|
};
|
|
3040
3155
|
|
|
3041
3156
|
const TabIndicator = props => {
|
|
3042
3157
|
const api = useTabsContext();
|
|
3043
|
-
const
|
|
3044
|
-
return web.createComponent(ark.div,
|
|
3158
|
+
const mergedProps = solid.mergeProps(() => api().indicatorProps, props);
|
|
3159
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3045
3160
|
};
|
|
3046
3161
|
|
|
3047
3162
|
const TabList = props => {
|
|
3048
3163
|
const api = useTabsContext();
|
|
3049
|
-
const
|
|
3050
|
-
return web.createComponent(ark.div,
|
|
3164
|
+
const mergedProps = solid.mergeProps(() => api().tablistProps, props);
|
|
3165
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3051
3166
|
};
|
|
3052
3167
|
|
|
3053
3168
|
const TabTrigger = props => {
|
|
3054
3169
|
const [tabParams, restProps] = createSplitProps()(props, ['disabled', 'value']);
|
|
3055
3170
|
const api = useTabsContext();
|
|
3056
|
-
const
|
|
3057
|
-
return web.createComponent(ark.button,
|
|
3171
|
+
const mergedProps = solid.mergeProps(() => api().getTriggerProps(tabParams), restProps);
|
|
3172
|
+
return web.createComponent(ark.button, mergedProps);
|
|
3058
3173
|
};
|
|
3059
3174
|
|
|
3060
3175
|
const useTabs = props => {
|
|
@@ -3070,13 +3185,19 @@ const useTabs = props => {
|
|
|
3070
3185
|
};
|
|
3071
3186
|
|
|
3072
3187
|
const Tabs$1 = props => {
|
|
3073
|
-
const [
|
|
3188
|
+
const [presenceProps, tabsProps] = splitPresenceProps(props);
|
|
3189
|
+
const [tabsParams, restProps] = createSplitProps()(tabsProps, ['activationMode', 'dir', 'getRootNode', 'id', 'ids', 'loop', 'onFocusChange', 'onValueChange', 'orientation', 'translations', 'value']);
|
|
3074
3190
|
const api = useTabs(tabsParams);
|
|
3075
|
-
const
|
|
3191
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, restProps);
|
|
3076
3192
|
return web.createComponent(TabsProvider, {
|
|
3077
3193
|
value: api,
|
|
3078
3194
|
get children() {
|
|
3079
|
-
return web.createComponent(
|
|
3195
|
+
return web.createComponent(PresencePropsProvider, {
|
|
3196
|
+
value: presenceProps,
|
|
3197
|
+
get children() {
|
|
3198
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3199
|
+
}
|
|
3200
|
+
});
|
|
3080
3201
|
}
|
|
3081
3202
|
});
|
|
3082
3203
|
};
|
|
@@ -3106,7 +3227,7 @@ const useTagsInput = props => {
|
|
|
3106
3227
|
return solidJs.createMemo(() => tagsInput__namespace.connect(state, send, solid.normalizeProps));
|
|
3107
3228
|
};
|
|
3108
3229
|
|
|
3109
|
-
const _tmpl
|
|
3230
|
+
const _tmpl$ = /*#__PURE__*/web.template(`<input>`);
|
|
3110
3231
|
const TagsInput$1 = props => {
|
|
3111
3232
|
const [tagsInputParams, restProps] = createSplitProps()(props, ['addOnPaste', 'allowEditTag', 'allowOverflow', 'autoFocus', 'blurBehavior', 'delimiter', 'dir', 'disabled', 'form', 'getRootNode', 'id', 'ids', 'inputValue', 'invalid', 'max', 'maxLength', 'name', 'onFocusOutside', 'onHighlightChange', 'onInteractOutside', 'onPointerDownOutside', 'onValueChange', 'onValueInvalid', 'readOnly', 'translations', 'validate', 'value']);
|
|
3112
3233
|
const api = useTagsInput(tagsInputParams);
|
|
@@ -3120,7 +3241,7 @@ const TagsInput$1 = props => {
|
|
|
3120
3241
|
return getChildren();
|
|
3121
3242
|
}
|
|
3122
3243
|
})), (() => {
|
|
3123
|
-
const _el$ = _tmpl
|
|
3244
|
+
const _el$ = _tmpl$();
|
|
3124
3245
|
web.spread(_el$, web.mergeProps(() => api().hiddenInputProps), false, false);
|
|
3125
3246
|
return _el$;
|
|
3126
3247
|
})()];
|
|
@@ -3316,11 +3437,11 @@ const useToggleGroup = props => {
|
|
|
3316
3437
|
const ToggleGroup$1 = props => {
|
|
3317
3438
|
const [groupParams, restProps] = createSplitProps()(props, ['dir', 'disabled', 'getRootNode', 'id', 'ids', 'loop', 'multiple', 'onValueChange', 'orientation', 'rovingFocus', 'value']);
|
|
3318
3439
|
const api = useToggleGroup(groupParams);
|
|
3319
|
-
const
|
|
3440
|
+
const mergedProps = solid.mergeProps(() => api().rootProps, restProps);
|
|
3320
3441
|
return web.createComponent(ToggleGroupProvider, {
|
|
3321
3442
|
value: api,
|
|
3322
3443
|
get children() {
|
|
3323
|
-
return web.createComponent(ark.div,
|
|
3444
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3324
3445
|
}
|
|
3325
3446
|
});
|
|
3326
3447
|
};
|
|
@@ -3355,58 +3476,70 @@ const useTooltip = props => {
|
|
|
3355
3476
|
};
|
|
3356
3477
|
|
|
3357
3478
|
const Tooltip$1 = props => {
|
|
3358
|
-
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']);
|
|
3359
3481
|
const api = useTooltip(useTooltipProps);
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
}
|
|
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
|
+
});
|
|
3363
3497
|
};
|
|
3364
3498
|
|
|
3365
3499
|
const TooltipArrow = props => {
|
|
3366
3500
|
const tooltip = useTooltipContext();
|
|
3367
|
-
const
|
|
3368
|
-
return web.createComponent(ark.div,
|
|
3501
|
+
const mergedProps = solid.mergeProps(() => tooltip().arrowProps, props);
|
|
3502
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3369
3503
|
};
|
|
3370
3504
|
|
|
3371
3505
|
const TooltipArrowTip = props => {
|
|
3372
3506
|
const api = useTooltipContext();
|
|
3373
|
-
const
|
|
3374
|
-
return web.createComponent(ark.div,
|
|
3507
|
+
const mergedProps = solid.mergeProps(() => api().arrowTipProps, props);
|
|
3508
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3375
3509
|
};
|
|
3376
3510
|
|
|
3377
|
-
const _tmpl$ = /*#__PURE__*/web.template(`<div>`);
|
|
3378
3511
|
const TooltipContent = props => {
|
|
3379
|
-
const [presenceProps, localProps] = splitPresenceProps(props);
|
|
3380
3512
|
const api = useTooltipContext();
|
|
3381
|
-
const
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
}, presenceProps, {
|
|
3387
|
-
get fallback() {
|
|
3388
|
-
return (() => {
|
|
3389
|
-
const _el$ = _tmpl$();
|
|
3390
|
-
web.spread(_el$, web.mergeProps(() => api().contentProps), false, false);
|
|
3391
|
-
return _el$;
|
|
3392
|
-
})();
|
|
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;
|
|
3393
3518
|
},
|
|
3394
3519
|
get children() {
|
|
3395
|
-
return web.createComponent(ark.div,
|
|
3520
|
+
return web.createComponent(ark.div, mergedProps);
|
|
3396
3521
|
}
|
|
3397
|
-
})
|
|
3522
|
+
});
|
|
3398
3523
|
};
|
|
3399
3524
|
|
|
3400
3525
|
const TooltipPositioner = props => {
|
|
3401
3526
|
const api = useTooltipContext();
|
|
3402
|
-
const
|
|
3403
|
-
|
|
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
|
+
});
|
|
3404
3537
|
};
|
|
3405
3538
|
|
|
3406
3539
|
const TooltipTrigger = props => {
|
|
3407
3540
|
const api = useTooltipContext();
|
|
3408
|
-
const
|
|
3409
|
-
return web.createComponent(ark.button,
|
|
3541
|
+
const mergedProps = solid.mergeProps(() => api().triggerProps, props);
|
|
3542
|
+
return web.createComponent(ark.button, mergedProps);
|
|
3410
3543
|
};
|
|
3411
3544
|
|
|
3412
3545
|
const Tooltip = Object.assign(Tooltip$1, {
|
|
@@ -3559,6 +3692,8 @@ exports.PopoverPositioner = PopoverPositioner;
|
|
|
3559
3692
|
exports.PopoverTitle = PopoverTitle;
|
|
3560
3693
|
exports.PopoverTrigger = PopoverTrigger;
|
|
3561
3694
|
exports.Presence = Presence;
|
|
3695
|
+
exports.PresencePropsProvider = PresencePropsProvider;
|
|
3696
|
+
exports.PresenceProvider = PresenceProvider;
|
|
3562
3697
|
exports.RadioGroup = RadioGroup;
|
|
3563
3698
|
exports.RadioGroupItem = RadioGroupItem;
|
|
3564
3699
|
exports.RadioGroupItemControl = RadioGroupItemControl;
|
|
@@ -3655,6 +3790,9 @@ exports.useNumberInputContext = useNumberInputContext;
|
|
|
3655
3790
|
exports.usePaginationContext = usePaginationContext;
|
|
3656
3791
|
exports.usePinInputContext = usePinInputContext;
|
|
3657
3792
|
exports.usePopoverContext = usePopoverContext;
|
|
3793
|
+
exports.usePresence = usePresence;
|
|
3794
|
+
exports.usePresenceContext = usePresenceContext;
|
|
3795
|
+
exports.usePresencePropsContext = usePresencePropsContext;
|
|
3658
3796
|
exports.useRadioGroupContext = useRadioGroupContext;
|
|
3659
3797
|
exports.useRadioGroupItemContext = useRadioGroupItemContext;
|
|
3660
3798
|
exports.useRatingGroupContext = useRatingGroupContext;
|