@wordpress/components 32.0.1-next.ba3aee3a2.0 → 32.0.2-next.v.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 +12 -1
- package/CONTRIBUTING.md +6 -0
- package/build/angle-picker-control/index.cjs +1 -0
- package/build/angle-picker-control/index.cjs.map +2 -2
- package/build/box-control/index.cjs +15 -7
- package/build/box-control/index.cjs.map +2 -2
- package/build/button/deprecated.cjs +12 -8
- package/build/button/deprecated.cjs.map +2 -2
- package/build/button/index.cjs +1 -0
- package/build/button/index.cjs.map +2 -2
- package/build/button-group/index.cjs +1 -0
- package/build/button-group/index.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
- package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker.cjs +1 -0
- package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
- package/build/clipboard-button/index.cjs +11 -7
- package/build/clipboard-button/index.cjs.map +2 -2
- package/build/color-indicator/index.cjs +1 -0
- package/build/color-indicator/index.cjs.map +2 -2
- package/build/color-palette/index.cjs +1 -0
- package/build/color-palette/index.cjs.map +2 -2
- package/build/combobox-control/index.cjs +1 -1
- package/build/combobox-control/index.cjs.map +2 -2
- package/build/context/context-system-provider.cjs +1 -1
- package/build/context/context-system-provider.cjs.map +2 -2
- package/build/date-time/date-time/index.cjs +1 -0
- package/build/date-time/date-time/index.cjs.map +2 -2
- package/build/disclosure/index.cjs +1 -0
- package/build/disclosure/index.cjs.map +2 -2
- package/build/duotone-picker/duotone-picker.cjs +1 -1
- package/build/duotone-picker/duotone-picker.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -0
- package/build/external-link/index.cjs.map +2 -2
- package/build/font-size-picker/index.cjs +1 -0
- package/build/font-size-picker/index.cjs.map +2 -2
- package/build/form-file-upload/index.cjs +9 -5
- package/build/form-file-upload/index.cjs.map +2 -2
- package/build/form-toggle/index.cjs +1 -0
- package/build/form-toggle/index.cjs.map +2 -2
- package/build/form-token-field/token-input.cjs +1 -0
- package/build/form-token-field/token-input.cjs.map +2 -2
- package/build/form-token-field/token.cjs.map +2 -2
- package/build/higher-order/navigate-regions/index.cjs +9 -7
- package/build/higher-order/navigate-regions/index.cjs.map +2 -2
- package/build/higher-order/with-fallback-styles/index.cjs +2 -2
- package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
- package/build/higher-order/with-focus-outside/index.cjs +1 -1
- package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
- package/build/higher-order/with-spoken-messages/index.cjs +7 -5
- package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
- package/build/input-control/index.cjs +1 -0
- package/build/input-control/index.cjs.map +2 -2
- package/build/input-control/styles/input-control-styles.cjs +22 -22
- package/build/input-control/styles/input-control-styles.cjs.map +2 -2
- package/build/menu/popover.cjs +1 -0
- package/build/menu/popover.cjs.map +2 -2
- package/build/menu/styles.cjs +15 -15
- package/build/menu/styles.cjs.map +2 -2
- package/build/menu-item/index.cjs +1 -0
- package/build/menu-item/index.cjs.map +2 -2
- package/build/modal/index.cjs +1 -0
- package/build/modal/index.cjs.map +2 -2
- package/build/navigable-container/menu.cjs +1 -0
- package/build/navigable-container/menu.cjs.map +2 -2
- package/build/navigable-container/tabbable.cjs +1 -0
- package/build/navigable-container/tabbable.cjs.map +2 -2
- package/build/navigation/back-button/index.cjs +1 -0
- package/build/navigation/back-button/index.cjs.map +2 -2
- package/build/number-control/index.cjs +1 -0
- package/build/number-control/index.cjs.map +2 -2
- package/build/panel/body.cjs +1 -0
- package/build/panel/body.cjs.map +2 -2
- package/build/panel/index.cjs +1 -0
- package/build/panel/index.cjs.map +2 -2
- package/build/panel/row.cjs +1 -0
- package/build/panel/row.cjs.map +2 -2
- package/build/progress-bar/index.cjs +1 -0
- package/build/progress-bar/index.cjs.map +2 -2
- package/build/radio-group/index.cjs +1 -0
- package/build/radio-group/index.cjs.map +2 -2
- package/build/radio-group/radio.cjs +9 -4
- package/build/radio-group/radio.cjs.map +2 -2
- package/build/range-control/index.cjs +1 -0
- package/build/range-control/index.cjs.map +2 -2
- package/build/resizable-box/index.cjs +1 -0
- package/build/resizable-box/index.cjs.map +2 -2
- package/build/search-control/index.cjs +1 -0
- package/build/search-control/index.cjs.map +2 -2
- package/build/select-control/index.cjs +1 -0
- package/build/select-control/index.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
- package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
- package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
- package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
- package/build/slot-fill/context.cjs +17 -6
- package/build/slot-fill/context.cjs.map +3 -3
- package/build/slot-fill/fill.cjs +29 -4
- package/build/slot-fill/fill.cjs.map +4 -4
- package/build/slot-fill/index.cjs +8 -23
- package/build/slot-fill/index.cjs.map +3 -3
- package/build/slot-fill/provider.cjs +33 -17
- package/build/slot-fill/provider.cjs.map +2 -2
- package/build/slot-fill/slot.cjs +7 -4
- package/build/slot-fill/slot.cjs.map +2 -2
- package/build/snackbar/index.cjs +1 -0
- package/build/snackbar/index.cjs.map +2 -2
- package/build/spinner/index.cjs +1 -0
- package/build/spinner/index.cjs.map +2 -2
- package/build/tab-panel/index.cjs +1 -0
- package/build/tab-panel/index.cjs.map +2 -2
- package/build/text-control/index.cjs +1 -0
- package/build/text-control/index.cjs.map +2 -2
- package/build/text-highlight/index.cjs +1 -0
- package/build/text-highlight/index.cjs.map +2 -2
- package/build/textarea-control/index.cjs +1 -0
- package/build/textarea-control/index.cjs.map +2 -2
- package/build/toggle-control/index.cjs +1 -0
- package/build/toggle-control/index.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
- package/build/toolbar/toolbar/index.cjs +1 -0
- package/build/toolbar/toolbar/index.cjs.map +2 -2
- package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
- package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
- package/build/toolbar/toolbar-button/index.cjs +1 -0
- package/build/toolbar/toolbar-button/index.cjs.map +2 -2
- package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
- package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
- package/build/toolbar/toolbar-item/index.cjs +1 -0
- package/build/toolbar/toolbar-item/index.cjs.map +2 -2
- package/build/tooltip/index.cjs +1 -0
- package/build/tooltip/index.cjs.map +2 -2
- package/build/tree-grid/cell.cjs +1 -0
- package/build/tree-grid/cell.cjs.map +2 -2
- package/build/tree-grid/index.cjs +1 -0
- package/build/tree-grid/index.cjs.map +2 -2
- package/build/tree-grid/item.cjs +1 -0
- package/build/tree-grid/item.cjs.map +2 -2
- package/build/tree-grid/roving-tab-index-item.cjs +1 -0
- package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
- package/build/tree-grid/row.cjs +1 -0
- package/build/tree-grid/row.cjs.map +2 -2
- package/build/tree-select/index.cjs +12 -8
- package/build/tree-select/index.cjs.map +2 -2
- package/build/unit-control/index.cjs +1 -0
- package/build/unit-control/index.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
- package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
- package/build/validated-form-controls/components/combobox-control.cjs +1 -0
- package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
- package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
- package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
- package/build/validated-form-controls/components/form-token-field.cjs +1 -0
- package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
- package/build/validated-form-controls/components/input-control.cjs +1 -0
- package/build/validated-form-controls/components/input-control.cjs.map +2 -2
- package/build/validated-form-controls/components/number-control.cjs +1 -0
- package/build/validated-form-controls/components/number-control.cjs.map +2 -2
- package/build/validated-form-controls/components/radio-control.cjs +1 -0
- package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
- package/build/validated-form-controls/components/range-control.cjs +1 -0
- package/build/validated-form-controls/components/range-control.cjs.map +2 -2
- package/build/validated-form-controls/components/select-control.cjs +1 -0
- package/build/validated-form-controls/components/select-control.cjs.map +2 -2
- package/build/validated-form-controls/components/text-control.cjs +1 -0
- package/build/validated-form-controls/components/text-control.cjs.map +2 -2
- package/build/validated-form-controls/components/textarea-control.cjs +1 -0
- package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
- package/build/validated-form-controls/components/toggle-control.cjs +1 -0
- package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
- package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
- package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
- package/build/validated-form-controls/control-with-error.cjs +1 -0
- package/build/validated-form-controls/control-with-error.cjs.map +2 -2
- package/build-module/angle-picker-control/index.mjs +1 -0
- package/build-module/angle-picker-control/index.mjs.map +2 -2
- package/build-module/box-control/index.mjs +15 -7
- package/build-module/box-control/index.mjs.map +2 -2
- package/build-module/button/deprecated.mjs +12 -8
- package/build-module/button/deprecated.mjs.map +2 -2
- package/build-module/button/index.mjs +1 -0
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/button-group/index.mjs +1 -0
- package/build-module/button-group/index.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
- package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
- package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
- package/build-module/clipboard-button/index.mjs +11 -7
- package/build-module/clipboard-button/index.mjs.map +2 -2
- package/build-module/color-indicator/index.mjs +1 -0
- package/build-module/color-indicator/index.mjs.map +2 -2
- package/build-module/color-palette/index.mjs +1 -0
- package/build-module/color-palette/index.mjs.map +2 -2
- package/build-module/combobox-control/index.mjs +1 -1
- package/build-module/combobox-control/index.mjs.map +2 -2
- package/build-module/context/context-system-provider.mjs +1 -1
- package/build-module/context/context-system-provider.mjs.map +2 -2
- package/build-module/date-time/date-time/index.mjs +1 -0
- package/build-module/date-time/date-time/index.mjs.map +2 -2
- package/build-module/disclosure/index.mjs +1 -0
- package/build-module/disclosure/index.mjs.map +2 -2
- package/build-module/duotone-picker/duotone-picker.mjs +1 -1
- package/build-module/duotone-picker/duotone-picker.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -0
- package/build-module/external-link/index.mjs.map +2 -2
- package/build-module/font-size-picker/index.mjs +1 -0
- package/build-module/font-size-picker/index.mjs.map +2 -2
- package/build-module/form-file-upload/index.mjs +9 -5
- package/build-module/form-file-upload/index.mjs.map +2 -2
- package/build-module/form-toggle/index.mjs +1 -0
- package/build-module/form-toggle/index.mjs.map +2 -2
- package/build-module/form-token-field/token-input.mjs +1 -0
- package/build-module/form-token-field/token-input.mjs.map +2 -2
- package/build-module/form-token-field/token.mjs.map +2 -2
- package/build-module/higher-order/navigate-regions/index.mjs +9 -7
- package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
- package/build-module/higher-order/with-fallback-styles/index.mjs +2 -2
- package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
- package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
- package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
- package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
- package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
- package/build-module/input-control/index.mjs +1 -0
- package/build-module/input-control/index.mjs.map +2 -2
- package/build-module/input-control/styles/input-control-styles.mjs +22 -22
- package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
- package/build-module/menu/popover.mjs +1 -0
- package/build-module/menu/popover.mjs.map +2 -2
- package/build-module/menu/styles.mjs +15 -15
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/menu-item/index.mjs +1 -0
- package/build-module/menu-item/index.mjs.map +2 -2
- package/build-module/modal/index.mjs +1 -0
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/navigable-container/menu.mjs +1 -0
- package/build-module/navigable-container/menu.mjs.map +2 -2
- package/build-module/navigable-container/tabbable.mjs +1 -0
- package/build-module/navigable-container/tabbable.mjs.map +2 -2
- package/build-module/navigation/back-button/index.mjs +1 -0
- package/build-module/navigation/back-button/index.mjs.map +2 -2
- package/build-module/number-control/index.mjs +1 -0
- package/build-module/number-control/index.mjs.map +2 -2
- package/build-module/panel/body.mjs +1 -0
- package/build-module/panel/body.mjs.map +2 -2
- package/build-module/panel/index.mjs +1 -0
- package/build-module/panel/index.mjs.map +2 -2
- package/build-module/panel/row.mjs +1 -0
- package/build-module/panel/row.mjs.map +2 -2
- package/build-module/progress-bar/index.mjs +1 -0
- package/build-module/progress-bar/index.mjs.map +2 -2
- package/build-module/radio-group/index.mjs +1 -0
- package/build-module/radio-group/index.mjs.map +2 -2
- package/build-module/radio-group/radio.mjs +9 -4
- package/build-module/radio-group/radio.mjs.map +2 -2
- package/build-module/range-control/index.mjs +1 -0
- package/build-module/range-control/index.mjs.map +2 -2
- package/build-module/resizable-box/index.mjs +1 -0
- package/build-module/resizable-box/index.mjs.map +2 -2
- package/build-module/search-control/index.mjs +1 -0
- package/build-module/search-control/index.mjs.map +2 -2
- package/build-module/select-control/index.mjs +1 -0
- package/build-module/select-control/index.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
- package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
- package/build-module/slot-fill/context.mjs +7 -2
- package/build-module/slot-fill/context.mjs.map +2 -2
- package/build-module/slot-fill/fill.mjs +30 -5
- package/build-module/slot-fill/fill.mjs.map +3 -3
- package/build-module/slot-fill/index.mjs +7 -21
- package/build-module/slot-fill/index.mjs.map +2 -2
- package/build-module/slot-fill/provider.mjs +33 -17
- package/build-module/slot-fill/provider.mjs.map +2 -2
- package/build-module/slot-fill/slot.mjs +7 -4
- package/build-module/slot-fill/slot.mjs.map +2 -2
- package/build-module/snackbar/index.mjs +1 -0
- package/build-module/snackbar/index.mjs.map +2 -2
- package/build-module/spinner/index.mjs +1 -0
- package/build-module/spinner/index.mjs.map +2 -2
- package/build-module/tab-panel/index.mjs +1 -0
- package/build-module/tab-panel/index.mjs.map +2 -2
- package/build-module/text-control/index.mjs +1 -0
- package/build-module/text-control/index.mjs.map +2 -2
- package/build-module/text-highlight/index.mjs +1 -0
- package/build-module/text-highlight/index.mjs.map +2 -2
- package/build-module/textarea-control/index.mjs +1 -0
- package/build-module/textarea-control/index.mjs.map +2 -2
- package/build-module/toggle-control/index.mjs +1 -0
- package/build-module/toggle-control/index.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
- package/build-module/toolbar/toolbar/index.mjs +1 -0
- package/build-module/toolbar/toolbar/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
- package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
- package/build-module/toolbar/toolbar-button/index.mjs +1 -0
- package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
- package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar-item/index.mjs +1 -0
- package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
- package/build-module/tooltip/index.mjs +1 -0
- package/build-module/tooltip/index.mjs.map +2 -2
- package/build-module/tree-grid/cell.mjs +1 -0
- package/build-module/tree-grid/cell.mjs.map +2 -2
- package/build-module/tree-grid/index.mjs +1 -0
- package/build-module/tree-grid/index.mjs.map +2 -2
- package/build-module/tree-grid/item.mjs +1 -0
- package/build-module/tree-grid/item.mjs.map +2 -2
- package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
- package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
- package/build-module/tree-grid/row.mjs +1 -0
- package/build-module/tree-grid/row.mjs.map +2 -2
- package/build-module/tree-select/index.mjs +12 -8
- package/build-module/tree-select/index.mjs.map +2 -2
- package/build-module/unit-control/index.mjs +1 -0
- package/build-module/unit-control/index.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
- package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/combobox-control.mjs +1 -0
- package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
- package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
- package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
- package/build-module/validated-form-controls/components/input-control.mjs +1 -0
- package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/number-control.mjs +1 -0
- package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
- package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/range-control.mjs +1 -0
- package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/select-control.mjs +1 -0
- package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/text-control.mjs +1 -0
- package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
- package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/toggle-control.mjs +1 -0
- package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
- package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
- package/build-module/validated-form-controls/control-with-error.mjs +1 -0
- package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/animate/stories/index.story.d.ts +8 -8
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/stories/index.story.d.ts +1 -1
- package/build-types/badge/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +2 -2
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +2 -2
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +6 -6
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +8 -8
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +2 -2
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +9 -9
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +1 -1
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
- package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -1
- package/build-types/card/stories/index.story.d.ts +1 -1
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/clipboard-button/types.d.ts +1 -0
- package/build-types/clipboard-button/types.d.ts.map +1 -1
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +4 -4
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +5 -5
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
- package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/context/context-system-provider.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +2 -2
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts.map +1 -1
- package/build-types/divider/stories/index.story.d.ts +1 -1
- package/build-types/divider/stories/index.story.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts +1 -1
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +2 -2
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/elevation/stories/index.story.d.ts +1 -1
- package/build-types/elevation/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/stories/index.story.d.ts +1 -1
- package/build-types/flex/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/stories/index.story.d.ts +1 -1
- package/build-types/grid/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +2 -2
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts +1 -1
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts +1 -1
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +5 -5
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/index.d.ts +1 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +8 -8
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/stories/index.story.d.ts +1 -1
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts.map +1 -1
- package/build-types/menu/stories/index.story.d.ts +1 -1
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +2 -2
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +5 -5
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigable-container/tabbable.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +7 -7
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/default.d.ts +1 -1
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/group.d.ts +1 -1
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/search.d.ts +1 -1
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +6 -6
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +3 -3
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/index.d.ts.map +1 -1
- package/build-types/panel/row.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts +1 -1
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +2 -2
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +2 -2
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +2 -2
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +3 -3
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +2 -2
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.story.d.ts +1 -1
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +2 -2
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +6 -6
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +2 -2
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts +2 -2
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +3 -4
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +23 -25
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts +1 -1
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/stories/index.story.d.ts +1 -1
- package/build-types/spacer/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/stories/index.story.d.ts +1 -1
- package/build-types/surface/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +5 -5
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +8 -8
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +4 -4
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +4 -1
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +2 -2
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts +1 -1
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +3 -3
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +4 -4
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +2 -2
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/index.d.ts.map +1 -1
- package/build-types/tree-grid/item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/tree-grid/row.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +2 -2
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +2 -2
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts +1 -1
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/dropdown-motion.d.ts.map +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +2 -2
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
- package/build-types/view/stories/index.story.d.ts +1 -1
- package/build-types/view/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.story.d.ts +1 -1
- package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +27 -25
- package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
- package/src/angle-picker-control/index.tsx +1 -0
- package/src/angle-picker-control/stories/index.story.tsx +1 -1
- package/src/animate/stories/index.story.tsx +1 -1
- package/src/badge/stories/index.story.tsx +1 -1
- package/src/base-control/stories/index.story.tsx +4 -2
- package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
- package/src/border-box-control/stories/index.story.tsx +3 -1
- package/src/border-box-control/test/index.tsx +51 -20
- package/src/border-control/stories/index.story.tsx +2 -1
- package/src/border-control/test/index.js +37 -34
- package/src/box-control/index.tsx +6 -0
- package/src/box-control/stories/index.story.tsx +3 -2
- package/src/button/deprecated.tsx +2 -0
- package/src/button/index.tsx +16 -15
- package/src/button/stories/e2e/index.story.tsx +9 -5
- package/src/button/stories/index.story.tsx +14 -11
- package/src/button/test/index.tsx +0 -5
- package/src/button-group/index.tsx +1 -0
- package/src/button-group/stories/index.story.tsx +5 -3
- package/src/calendar/stories/date-calendar.story.tsx +1 -1
- package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
- package/src/card/stories/index.story.tsx +4 -2
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
- package/src/circular-option-picker/circular-option-picker.tsx +2 -0
- package/src/circular-option-picker/stories/index.story.tsx +1 -1
- package/src/clipboard-button/index.tsx +2 -0
- package/src/clipboard-button/types.ts +1 -0
- package/src/color-indicator/index.tsx +1 -0
- package/src/color-indicator/stories/index.story.tsx +1 -1
- package/src/color-palette/index.tsx +1 -0
- package/src/color-palette/stories/index.story.tsx +1 -1
- package/src/color-picker/stories/index.story.tsx +1 -1
- package/src/combobox-control/index.tsx +1 -1
- package/src/combobox-control/stories/index.story.tsx +2 -1
- package/src/composite/legacy/stories/index.story.tsx +1 -1
- package/src/composite/legacy/stories/utils.tsx +1 -1
- package/src/composite/stories/index.story.tsx +1 -1
- package/src/confirm-dialog/stories/index.story.tsx +6 -2
- package/src/context/context-system-provider.js +2 -1
- package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
- package/src/custom-select-control/stories/index.story.tsx +2 -1
- package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
- package/src/date-time/date-time/index.tsx +1 -0
- package/src/date-time/stories/date-time.story.tsx +1 -1
- package/src/date-time/stories/date.story.tsx +1 -1
- package/src/date-time/stories/time.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +1 -1
- package/src/disclosure/index.tsx +1 -0
- package/src/divider/stories/index.story.tsx +1 -1
- package/src/draggable/stories/index.story.tsx +1 -1
- package/src/drop-zone/stories/index.story.tsx +1 -1
- package/src/dropdown/stories/index.story.tsx +2 -1
- package/src/dropdown-menu/stories/index.story.tsx +1 -1
- package/src/duotone-picker/duotone-picker.tsx +1 -1
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
- package/src/elevation/stories/index.story.tsx +1 -1
- package/src/external-link/index.tsx +1 -0
- package/src/external-link/stories/index.story.tsx +1 -1
- package/src/flex/stories/index.story.tsx +1 -1
- package/src/focal-point-picker/stories/index.story.tsx +1 -1
- package/src/font-size-picker/index.tsx +1 -0
- package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
- package/src/font-size-picker/stories/index.story.tsx +2 -1
- package/src/form-file-upload/index.tsx +2 -0
- package/src/form-file-upload/stories/index.story.tsx +2 -2
- package/src/form-toggle/index.tsx +1 -0
- package/src/form-toggle/stories/index.story.tsx +1 -1
- package/src/form-token-field/stories/index.story.tsx +3 -1
- package/src/form-token-field/token-input.tsx +1 -0
- package/src/form-token-field/token.tsx +2 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/grid/stories/index.story.tsx +1 -1
- package/src/guide/stories/index.story.tsx +6 -2
- package/src/h-stack/stories/e2e/index.story.tsx +1 -1
- package/src/h-stack/stories/index.story.tsx +1 -1
- package/src/heading/stories/index.story.tsx +1 -1
- package/src/higher-order/navigate-regions/index.tsx +7 -5
- package/src/higher-order/with-fallback-styles/index.tsx +2 -2
- package/src/higher-order/with-focus-outside/index.tsx +25 -24
- package/src/higher-order/with-spoken-messages/index.tsx +10 -7
- package/src/icon/stories/index.story.tsx +1 -1
- package/src/index.ts +6 -0
- package/src/input-control/index.tsx +1 -0
- package/src/input-control/stories/index.story.tsx +3 -2
- package/src/input-control/styles/input-control-styles.tsx +0 -4
- package/src/item-group/stories/index.story.tsx +1 -1
- package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
- package/src/menu/popover.tsx +1 -0
- package/src/menu/stories/index.story.tsx +5 -2
- package/src/menu/styles.ts +36 -26
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/menu-item/index.tsx +1 -0
- package/src/menu-item/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/stories/index.story.tsx +1 -1
- package/src/modal/index.tsx +1 -0
- package/src/modal/stories/index.story.tsx +11 -3
- package/src/navigable-container/menu.tsx +1 -0
- package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
- package/src/navigable-container/tabbable.tsx +1 -0
- package/src/navigation/back-button/index.tsx +1 -0
- package/src/navigation/stories/index.story.tsx +1 -1
- package/src/navigation/stories/utils/controlled-state.tsx +4 -1
- package/src/navigation/stories/utils/default.tsx +1 -1
- package/src/navigation/stories/utils/group.tsx +1 -1
- package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
- package/src/navigation/stories/utils/more-examples.tsx +1 -1
- package/src/navigation/stories/utils/search.tsx +1 -1
- package/src/navigator/stories/index.story.tsx +2 -1
- package/src/navigator/test/index.tsx +1 -1
- package/src/notice/stories/index.story.tsx +1 -1
- package/src/number-control/index.tsx +1 -0
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/palette-edit/stories/index.story.tsx +1 -1
- package/src/panel/body.tsx +1 -0
- package/src/panel/index.tsx +1 -0
- package/src/panel/row.tsx +1 -0
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +1 -1
- package/src/popover/stories/index.story.tsx +9 -2
- package/src/progress-bar/index.tsx +1 -0
- package/src/progress-bar/stories/index.story.tsx +1 -1
- package/src/query-controls/stories/index.story.tsx +1 -1
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/index.tsx +1 -0
- package/src/radio-group/radio.tsx +3 -0
- package/src/radio-group/stories/index.story.tsx +1 -1
- package/src/range-control/index.tsx +1 -0
- package/src/range-control/stories/index.story.tsx +5 -1
- package/src/resizable-box/index.tsx +1 -0
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scroll-lock/stories/index.story.tsx +6 -2
- package/src/scrollable/stories/index.story.tsx +1 -1
- package/src/search-control/index.tsx +1 -0
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/index.tsx +3 -0
- package/src/select-control/stories/index.story.tsx +3 -1
- package/src/shortcut/stories/index.story.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
- package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
- package/src/slot-fill/context.ts +15 -4
- package/src/slot-fill/fill.tsx +74 -0
- package/src/slot-fill/index.tsx +17 -33
- package/src/slot-fill/provider.tsx +49 -35
- package/src/slot-fill/slot.tsx +4 -4
- package/src/slot-fill/stories/index.story.tsx +1 -1
- package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
- package/src/slot-fill/test/slot.js +24 -1
- package/src/slot-fill/types.ts +16 -32
- package/src/snackbar/index.tsx +1 -0
- package/src/snackbar/stories/index.story.tsx +1 -1
- package/src/snackbar/stories/list.story.tsx +1 -1
- package/src/spacer/stories/index.story.tsx +1 -1
- package/src/spinner/index.tsx +1 -0
- package/src/spinner/stories/index.story.tsx +1 -1
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/tab-panel/index.tsx +1 -0
- package/src/tab-panel/stories/index.story.tsx +1 -1
- package/src/tabs/stories/index.story.tsx +11 -3
- package/src/text/stories/index.story.tsx +1 -1
- package/src/text-control/index.tsx +1 -0
- package/src/text-control/stories/index.story.tsx +2 -1
- package/src/text-highlight/index.tsx +2 -0
- package/src/text-highlight/stories/index.story.tsx +1 -1
- package/src/textarea-control/index.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/stories/index.story.tsx +8 -4
- package/src/tip/stories/index.story.tsx +1 -1
- package/src/toggle-control/index.tsx +1 -0
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar/index.tsx +1 -0
- package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
- package/src/toolbar/toolbar-button/index.tsx +1 -0
- package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
- package/src/toolbar/toolbar-item/index.tsx +1 -0
- package/src/tools-panel/stories/index.story.tsx +1 -1
- package/src/tooltip/index.tsx +1 -0
- package/src/tooltip/stories/index.story.tsx +14 -4
- package/src/tree-grid/cell.tsx +1 -0
- package/src/tree-grid/index.tsx +1 -0
- package/src/tree-grid/item.tsx +1 -0
- package/src/tree-grid/roving-tab-index-item.tsx +1 -0
- package/src/tree-grid/row.tsx +1 -0
- package/src/tree-grid/stories/index.story.tsx +6 -2
- package/src/tree-select/index.tsx +2 -0
- package/src/tree-select/stories/index.story.tsx +2 -1
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/index.tsx +1 -0
- package/src/unit-control/stories/index.story.tsx +3 -1
- package/src/utils/dropdown-motion.ts +1 -0
- package/src/v-stack/stories/e2e/index.story.tsx +1 -1
- package/src/v-stack/stories/index.story.tsx +1 -1
- package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
- package/src/validated-form-controls/components/combobox-control.tsx +1 -0
- package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
- package/src/validated-form-controls/components/form-token-field.tsx +1 -0
- package/src/validated-form-controls/components/input-control.tsx +1 -0
- package/src/validated-form-controls/components/number-control.tsx +1 -0
- package/src/validated-form-controls/components/radio-control.tsx +1 -0
- package/src/validated-form-controls/components/range-control.tsx +1 -0
- package/src/validated-form-controls/components/select-control.tsx +1 -0
- package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
- package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
- package/src/validated-form-controls/components/text-control.tsx +1 -0
- package/src/validated-form-controls/components/textarea-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
- package/src/validated-form-controls/control-with-error.tsx +1 -0
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
- package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
- package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
- package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
- package/src/slot-fill/fill.ts +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/range-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport { ActionRightWrapper, AfterIconWrapper, BeforeIconWrapper, InputNumber, Root, Track, ThumbWrapper, Thumb, Wrapper } from './styles/range-control-styles';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue({\n resetFallbackValue,\n initialPosition\n}) {\n if (resetFallbackValue !== undefined) {\n return !Number.isNaN(resetFallbackValue) ? resetFallbackValue : null;\n }\n if (initialPosition !== undefined) {\n return !Number.isNaN(initialPosition) ? initialPosition : null;\n }\n return null;\n}\nfunction UnforwardedRangeControl(props, forwardedRef) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n afterIcon,\n allowReset = false,\n beforeIcon,\n className,\n color: colorProp = COLORS.theme.accent,\n currentInput,\n disabled = false,\n help,\n hideLabelFromVision = false,\n initialPosition,\n isShiftStepEnabled = true,\n label,\n marks = false,\n max = 100,\n min = 0,\n onBlur = noop,\n onChange = noop,\n onFocus = noop,\n onMouseLeave = noop,\n onMouseMove = noop,\n railColor,\n renderTooltipContent = v => v,\n resetFallbackValue,\n __next40pxDefaultSize = false,\n shiftStep = 10,\n showTooltip: showTooltipProp,\n step = 1,\n trackColor,\n value: valueProp,\n withInputField = true,\n __shouldNotWarnDeprecated36pxSize,\n ...otherProps\n } = props;\n const [value, setValue] = useControlledRangeValue({\n min,\n max,\n value: valueProp !== null && valueProp !== void 0 ? valueProp : null,\n initial: initialPosition\n });\n const isResetPendent = useRef(false);\n let hasTooltip = showTooltipProp;\n let hasInputField = withInputField;\n if (step === 'any') {\n // The tooltip and number input field are hidden when the step is \"any\"\n // because the decimals get too lengthy to fit well.\n hasTooltip = false;\n hasInputField = false;\n }\n const [showTooltip, setShowTooltip] = useState(hasTooltip);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef();\n const isCurrentlyFocused = inputRef.current?.matches(':focus');\n const isThumbFocused = !disabled && isFocused;\n const isValueReset = value === null;\n const currentValue = value !== undefined ? value : currentInput;\n const inputSliderValue = isValueReset ? '' : currentValue;\n const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;\n const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;\n const fillValueOffset = `${clamp(fillValue, 0, 100)}%`;\n const classes = clsx('components-range-control', className);\n const wrapperClasses = clsx('components-range-control__wrapper', !!marks && 'is-marked');\n const id = useInstanceId(UnforwardedRangeControl, 'inspector-range-control');\n const describedBy = !!help ? `${id}__help` : undefined;\n const enableTooltip = hasTooltip !== false && Number.isFinite(value);\n const handleOnRangeChange = event => {\n const nextValue = parseFloat(event.target.value);\n setValue(nextValue);\n onChange(nextValue);\n };\n const handleOnChange = next => {\n // @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n // potentially receive a NaN when next is undefined.\n let nextValue = parseFloat(next);\n setValue(nextValue);\n\n /*\n * Calls onChange only when nextValue is numeric\n * otherwise may queue a reset for the blur event.\n */\n if (!isNaN(nextValue)) {\n if (nextValue < min || nextValue > max) {\n nextValue = floatClamp(nextValue, min, max);\n }\n onChange(nextValue);\n isResetPendent.current = false;\n } else if (allowReset) {\n isResetPendent.current = true;\n }\n };\n const handleOnInputNumberBlur = () => {\n if (isResetPendent.current) {\n handleOnReset();\n isResetPendent.current = false;\n }\n };\n const handleOnReset = () => {\n // Reset to `resetFallbackValue` if defined, otherwise set internal value\n // to `null` \u2014 which, if propagated to the `value` prop, will cause\n // the value to be reset to the `initialPosition` prop if defined.\n const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue !== null && resetFallbackValue !== void 0 ? resetFallbackValue : null;\n setValue(resetValue);\n\n /**\n * Previously, this callback would always receive undefined as\n * an argument. This behavior is unexpected, specifically\n * when resetFallbackValue is defined.\n *\n * The value of undefined is not ideal. Passing it through\n * to internal <input /> elements would change it from a\n * controlled component to an uncontrolled component.\n *\n * For now, to minimize unexpected regressions, we're going to\n * preserve the undefined callback argument, except when a\n * resetFallbackValue is defined.\n */\n onChange(resetValue !== null && resetValue !== void 0 ? resetValue : undefined);\n };\n const handleShowTooltip = () => setShowTooltip(true);\n const handleHideTooltip = () => setShowTooltip(false);\n const handleOnBlur = event => {\n onBlur(event);\n setIsFocused(false);\n handleHideTooltip();\n };\n const handleOnFocus = event => {\n onFocus(event);\n setIsFocused(true);\n handleShowTooltip();\n };\n const offsetStyle = {\n [isRTL() ? 'right' : 'left']: fillValueOffset\n };\n\n // Add default size deprecation warning.\n maybeWarnDeprecated36pxSize({\n componentName: 'RangeControl',\n __next40pxDefaultSize,\n size: undefined,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: `${id}`,\n help: help,\n children: /*#__PURE__*/_jsxs(Root, {\n className: \"components-range-control__root\",\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [beforeIcon && /*#__PURE__*/_jsx(BeforeIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: beforeIcon\n })\n }), /*#__PURE__*/_jsxs(Wrapper, {\n className: wrapperClasses,\n color: colorProp,\n marks: !!marks,\n children: [/*#__PURE__*/_jsx(InputRange, {\n ...otherProps,\n className: \"components-range-control__slider\",\n describedBy: describedBy,\n disabled: disabled,\n id: `${id}`,\n label: label,\n max: max,\n min: min,\n onBlur: handleOnBlur,\n onChange: handleOnRangeChange,\n onFocus: handleOnFocus,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n ref: useMergeRefs([inputRef, forwardedRef]),\n step: step,\n value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : undefined\n }), /*#__PURE__*/_jsx(RangeRail, {\n \"aria-hidden\": true,\n disabled: disabled,\n marks: marks,\n max: max,\n min: min,\n railColor: railColor,\n step: step,\n value: rangeFillValue\n }), /*#__PURE__*/_jsx(Track, {\n \"aria-hidden\": true,\n className: \"components-range-control__track\",\n disabled: disabled,\n style: {\n width: fillValueOffset\n },\n trackColor: trackColor\n }), /*#__PURE__*/_jsx(ThumbWrapper, {\n className: \"components-range-control__thumb-wrapper\",\n style: offsetStyle,\n disabled: disabled,\n children: /*#__PURE__*/_jsx(Thumb, {\n \"aria-hidden\": true,\n isFocused: isThumbFocused,\n disabled: disabled\n })\n }), enableTooltip && /*#__PURE__*/_jsx(SimpleTooltip, {\n className: \"components-range-control__tooltip\",\n inputRef: inputRef,\n tooltipPlacement: \"bottom\",\n renderTooltipContent: renderTooltipContent,\n show: isCurrentlyFocused || showTooltip,\n style: offsetStyle,\n value: value\n })]\n }), afterIcon && /*#__PURE__*/_jsx(AfterIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: afterIcon\n })\n }), hasInputField && /*#__PURE__*/_jsx(InputNumber, {\n \"aria-label\": label,\n className: \"components-range-control__number\",\n disabled: disabled,\n inputMode: \"decimal\",\n isShiftStepEnabled: isShiftStepEnabled,\n max: max,\n min: min,\n onBlur: handleOnInputNumberBlur,\n onChange: handleOnChange,\n shiftStep: shiftStep,\n size: __next40pxDefaultSize ? '__unstable-large' : 'default',\n __unstableInputWidth: __next40pxDefaultSize ? space(20) : space(16),\n step: step\n // @ts-expect-error TODO: Investigate if the `null` value is necessary\n ,\n value: inputSliderValue,\n __shouldNotWarnDeprecated36pxSize: true\n }), allowReset && /*#__PURE__*/_jsx(ActionRightWrapper, {\n children: /*#__PURE__*/_jsx(Button, {\n className: \"components-range-control__reset\"\n // If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n ,\n accessibleWhenDisabled: !disabled\n // The reset button should be disabled if RangeControl itself is disabled,\n // or if the current `value` is equal to the value that would be currently\n // assigned when clicking the button.\n ,\n disabled: disabled || value === computeResetValue({\n resetFallbackValue,\n initialPosition\n }),\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n children: __('Reset')\n })\n })]\n })\n });\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ value, setValue ] = useState();\n * return (\n * <RangeControl\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={ 50 }\n * label=\"Opacity\"\n * max={ 100 }\n * min={ 0 }\n * value={ value }\n * onChange={ setValue }\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef(UnforwardedRangeControl);\nexport default RangeControl;"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0B,uCAAAN,KAAK,8CAAkB;AAAA,QACnD,UAAuB,uCAAAA,KAAK,YAAAG,SAAM;AAAA,UAChC,MAAM;AAAA,QACR,CAAC;AAAA,MACH,CAAC,GAAG,iBAA8B,uCAAAH,KAAK,yCAAa;AAAA,QAClD,cAAc;AAAA,QACd,WAAW;AAAA,QACX;AAAA,QACA,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA,QAAQ;AAAA,QACR,UAAU;AAAA,QACV;AAAA,QACA,MAAM,wBAAwB,qBAAqB;AAAA,QACnD,sBAAsB,4BAAwB,oBAAM,EAAE,QAAI,oBAAM,EAAE;AAAA,QAClE;AAAA,QAGA,OAAO;AAAA,QACP,mCAAmC;AAAA,MACrC,CAAC,GAAG,cAA2B,uCAAAA,KAAK,gDAAoB;AAAA,QACtD,UAAuB,uCAAAA,KAAK,cAAAO,SAAQ;AAAA,UAClC,WAAW;AAAA,UAGX,wBAAwB,CAAC;AAAA,UAKzB,UAAU,YAAY,UAAU,kBAAkB;AAAA,YAChD;AAAA,YACA;AAAA,UACF,CAAC;AAAA,UACD,SAAS;AAAA,UACT,MAAM;AAAA,UACN,SAAS;AAAA,UACT,cAAU,gBAAG,OAAO;AAAA,QACtB,CAAC;AAAA,MACH,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AA0BO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport { ActionRightWrapper, AfterIconWrapper, BeforeIconWrapper, InputNumber, Root, Track, ThumbWrapper, Thumb, Wrapper } from './styles/range-control-styles';\nimport { space } from '../utils/space';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue({\n resetFallbackValue,\n initialPosition\n}) {\n if (resetFallbackValue !== undefined) {\n return !Number.isNaN(resetFallbackValue) ? resetFallbackValue : null;\n }\n if (initialPosition !== undefined) {\n return !Number.isNaN(initialPosition) ? initialPosition : null;\n }\n return null;\n}\nfunction UnforwardedRangeControl(props, forwardedRef) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n afterIcon,\n allowReset = false,\n beforeIcon,\n className,\n color: colorProp = COLORS.theme.accent,\n currentInput,\n disabled = false,\n help,\n hideLabelFromVision = false,\n initialPosition,\n isShiftStepEnabled = true,\n label,\n marks = false,\n max = 100,\n min = 0,\n onBlur = noop,\n onChange = noop,\n onFocus = noop,\n onMouseLeave = noop,\n onMouseMove = noop,\n railColor,\n renderTooltipContent = v => v,\n resetFallbackValue,\n __next40pxDefaultSize = false,\n shiftStep = 10,\n showTooltip: showTooltipProp,\n step = 1,\n trackColor,\n value: valueProp,\n withInputField = true,\n __shouldNotWarnDeprecated36pxSize,\n ...otherProps\n } = props;\n const [value, setValue] = useControlledRangeValue({\n min,\n max,\n value: valueProp !== null && valueProp !== void 0 ? valueProp : null,\n initial: initialPosition\n });\n const isResetPendent = useRef(false);\n let hasTooltip = showTooltipProp;\n let hasInputField = withInputField;\n if (step === 'any') {\n // The tooltip and number input field are hidden when the step is \"any\"\n // because the decimals get too lengthy to fit well.\n hasTooltip = false;\n hasInputField = false;\n }\n const [showTooltip, setShowTooltip] = useState(hasTooltip);\n const [isFocused, setIsFocused] = useState(false);\n const inputRef = useRef();\n const isCurrentlyFocused = inputRef.current?.matches(':focus');\n const isThumbFocused = !disabled && isFocused;\n const isValueReset = value === null;\n const currentValue = value !== undefined ? value : currentInput;\n const inputSliderValue = isValueReset ? '' : currentValue;\n const rangeFillValue = isValueReset ? (max - min) / 2 + min : value;\n const fillValue = isValueReset ? 50 : (value - min) / (max - min) * 100;\n const fillValueOffset = `${clamp(fillValue, 0, 100)}%`;\n const classes = clsx('components-range-control', className);\n const wrapperClasses = clsx('components-range-control__wrapper', !!marks && 'is-marked');\n const id = useInstanceId(UnforwardedRangeControl, 'inspector-range-control');\n const describedBy = !!help ? `${id}__help` : undefined;\n const enableTooltip = hasTooltip !== false && Number.isFinite(value);\n const handleOnRangeChange = event => {\n const nextValue = parseFloat(event.target.value);\n setValue(nextValue);\n onChange(nextValue);\n };\n const handleOnChange = next => {\n // @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n // potentially receive a NaN when next is undefined.\n let nextValue = parseFloat(next);\n setValue(nextValue);\n\n /*\n * Calls onChange only when nextValue is numeric\n * otherwise may queue a reset for the blur event.\n */\n if (!isNaN(nextValue)) {\n if (nextValue < min || nextValue > max) {\n nextValue = floatClamp(nextValue, min, max);\n }\n onChange(nextValue);\n isResetPendent.current = false;\n } else if (allowReset) {\n isResetPendent.current = true;\n }\n };\n const handleOnInputNumberBlur = () => {\n if (isResetPendent.current) {\n handleOnReset();\n isResetPendent.current = false;\n }\n };\n const handleOnReset = () => {\n // Reset to `resetFallbackValue` if defined, otherwise set internal value\n // to `null` \u2014 which, if propagated to the `value` prop, will cause\n // the value to be reset to the `initialPosition` prop if defined.\n const resetValue = Number.isNaN(resetFallbackValue) ? null : resetFallbackValue !== null && resetFallbackValue !== void 0 ? resetFallbackValue : null;\n setValue(resetValue);\n\n /**\n * Previously, this callback would always receive undefined as\n * an argument. This behavior is unexpected, specifically\n * when resetFallbackValue is defined.\n *\n * The value of undefined is not ideal. Passing it through\n * to internal <input /> elements would change it from a\n * controlled component to an uncontrolled component.\n *\n * For now, to minimize unexpected regressions, we're going to\n * preserve the undefined callback argument, except when a\n * resetFallbackValue is defined.\n */\n onChange(resetValue !== null && resetValue !== void 0 ? resetValue : undefined);\n };\n const handleShowTooltip = () => setShowTooltip(true);\n const handleHideTooltip = () => setShowTooltip(false);\n const handleOnBlur = event => {\n onBlur(event);\n setIsFocused(false);\n handleHideTooltip();\n };\n const handleOnFocus = event => {\n onFocus(event);\n setIsFocused(true);\n handleShowTooltip();\n };\n const offsetStyle = {\n [isRTL() ? 'right' : 'left']: fillValueOffset\n };\n\n // Add default size deprecation warning.\n maybeWarnDeprecated36pxSize({\n componentName: 'RangeControl',\n __next40pxDefaultSize,\n size: undefined,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: `${id}`,\n help: help,\n children: /*#__PURE__*/_jsxs(Root, {\n className: \"components-range-control__root\",\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: [beforeIcon && /*#__PURE__*/_jsx(BeforeIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: beforeIcon\n })\n }), /*#__PURE__*/_jsxs(Wrapper, {\n className: wrapperClasses,\n color: colorProp,\n marks: !!marks,\n children: [/*#__PURE__*/_jsx(InputRange, {\n ...otherProps,\n className: \"components-range-control__slider\",\n describedBy: describedBy,\n disabled: disabled,\n id: `${id}`,\n label: label,\n max: max,\n min: min,\n onBlur: handleOnBlur,\n onChange: handleOnRangeChange,\n onFocus: handleOnFocus,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n ref: useMergeRefs([inputRef, forwardedRef]),\n step: step,\n value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : undefined\n }), /*#__PURE__*/_jsx(RangeRail, {\n \"aria-hidden\": true,\n disabled: disabled,\n marks: marks,\n max: max,\n min: min,\n railColor: railColor,\n step: step,\n value: rangeFillValue\n }), /*#__PURE__*/_jsx(Track, {\n \"aria-hidden\": true,\n className: \"components-range-control__track\",\n disabled: disabled,\n style: {\n width: fillValueOffset\n },\n trackColor: trackColor\n }), /*#__PURE__*/_jsx(ThumbWrapper, {\n className: \"components-range-control__thumb-wrapper\",\n style: offsetStyle,\n disabled: disabled,\n children: /*#__PURE__*/_jsx(Thumb, {\n \"aria-hidden\": true,\n isFocused: isThumbFocused,\n disabled: disabled\n })\n }), enableTooltip && /*#__PURE__*/_jsx(SimpleTooltip, {\n className: \"components-range-control__tooltip\",\n inputRef: inputRef,\n tooltipPlacement: \"bottom\",\n renderTooltipContent: renderTooltipContent,\n show: isCurrentlyFocused || showTooltip,\n style: offsetStyle,\n value: value\n })]\n }), afterIcon && /*#__PURE__*/_jsx(AfterIconWrapper, {\n children: /*#__PURE__*/_jsx(Icon, {\n icon: afterIcon\n })\n }), hasInputField && /*#__PURE__*/_jsx(InputNumber, {\n \"aria-label\": label,\n className: \"components-range-control__number\",\n disabled: disabled,\n inputMode: \"decimal\",\n isShiftStepEnabled: isShiftStepEnabled,\n max: max,\n min: min,\n onBlur: handleOnInputNumberBlur,\n onChange: handleOnChange,\n shiftStep: shiftStep,\n size: __next40pxDefaultSize ? '__unstable-large' : 'default',\n __unstableInputWidth: __next40pxDefaultSize ? space(20) : space(16),\n step: step\n // @ts-expect-error TODO: Investigate if the `null` value is necessary\n ,\n value: inputSliderValue,\n __shouldNotWarnDeprecated36pxSize: true\n }), allowReset && /*#__PURE__*/_jsx(ActionRightWrapper, {\n children: /*#__PURE__*/_jsx(Button, {\n className: \"components-range-control__reset\"\n // If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n ,\n accessibleWhenDisabled: !disabled\n // The reset button should be disabled if RangeControl itself is disabled,\n // or if the current `value` is equal to the value that would be currently\n // assigned when clicking the button.\n ,\n disabled: disabled || value === computeResetValue({\n resetFallbackValue,\n initialPosition\n }),\n variant: \"secondary\",\n size: \"small\",\n onClick: handleOnReset,\n children: __('Reset')\n })\n })]\n })\n });\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ value, setValue ] = useState();\n * return (\n * <RangeControl\n * __next40pxDefaultSize\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={ 50 }\n * label=\"Opacity\"\n * max={ 100 }\n * min={ 0 }\n * value={ value }\n * onChange={ setValue }\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef(UnforwardedRangeControl);\nRangeControl.displayName = 'RangeControl';\nexport default RangeControl;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,kBAA0B;AAC1B,qBAA6C;AAC7C,qBAA4C;AAK5C,0BAAwB;AACxB,oBAAmB;AACnB,kBAAiB;AACjB,mBAAuB;AACvB,IAAAA,gBAAoD;AACpD,kBAAsB;AACtB,yBAAuB;AACvB,kBAAsB;AACtB,qBAA0B;AAC1B,kCAAgI;AAChI,mBAAsB;AACtB,kCAA4C;AAC5C,yBAA2C;AAC3C,IAAM,OAAO,MAAM;AAAC;AAMpB,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA;AACF,GAAG;AACD,MAAI,uBAAuB,QAAW;AACpC,WAAO,CAAC,OAAO,MAAM,kBAAkB,IAAI,qBAAqB;AAAA,EAClE;AACA,MAAI,oBAAoB,QAAW;AACjC,WAAO,CAAC,OAAO,MAAM,eAAe,IAAI,kBAAkB;AAAA,EAC5D;AACA,SAAO;AACT;AACA,SAAS,wBAAwB,OAAO,cAAc;AACpD,QAAM;AAAA,IACJ,yBAAyB;AAAA;AAAA,IAEzB;AAAA,IACA,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,OAAO,YAAY,oBAAO,MAAM;AAAA,IAChC;AAAA,IACA,WAA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ACH,CAAC;AACH;AA0BO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["import_utils", "clsx", "_jsx", "BaseControl", "_jsxs", "Icon", "InputRange", "RangeRail", "SimpleTooltip", "Button"]
|
|
7
7
|
}
|
|
@@ -93,6 +93,7 @@ function UnforwardedResizableBox({
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
var ResizableBox = (0, import_element.forwardRef)(UnforwardedResizableBox);
|
|
96
|
+
ResizableBox.displayName = "ResizableBox";
|
|
96
97
|
var resizable_box_default = ResizableBox;
|
|
97
98
|
// Annotate the CommonJS export names for ESM import in node:
|
|
98
99
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/resizable-box/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\nconst HANDLE_CLASSES = {\n top: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),\n right: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),\n bottom: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),\n left: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),\n topLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),\n topRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),\n bottomRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),\n bottomLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n width: undefined,\n height: undefined,\n top: undefined,\n right: undefined,\n bottom: undefined,\n left: undefined\n};\nconst HANDLE_STYLES = {\n top: HANDLE_STYLES_OVERRIDES,\n right: HANDLE_STYLES_OVERRIDES,\n bottom: HANDLE_STYLES_OVERRIDES,\n left: HANDLE_STYLES_OVERRIDES,\n topLeft: HANDLE_STYLES_OVERRIDES,\n topRight: HANDLE_STYLES_OVERRIDES,\n bottomRight: HANDLE_STYLES_OVERRIDES,\n bottomLeft: HANDLE_STYLES_OVERRIDES\n};\nfunction UnforwardedResizableBox({\n className,\n children,\n showHandle = true,\n __experimentalShowTooltip: showTooltip = false,\n __experimentalTooltipProps: tooltipProps = {},\n ...props\n}, ref) {\n return /*#__PURE__*/_jsxs(Resizable, {\n className: clsx('components-resizable-box__container', showHandle && 'has-show-handle', className)\n // Add a focusable element within the drag handle. Unfortunately,\n // `re-resizable` does not make them properly focusable by default,\n // causing focus to move the the block wrapper which triggers block\n // drag.\n ,\n handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map(key => [key, /*#__PURE__*/_jsx(\"div\", {\n tabIndex: -1\n }, key)])),\n handleClasses: HANDLE_CLASSES,\n handleStyles: HANDLE_STYLES,\n ref: ref,\n ...props,\n children: [children, showTooltip && /*#__PURE__*/_jsx(ResizeToolt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A4B,eAAe,CAAC;AAAA,EAC5C,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAC,MAAM,+BAAW;AAAA,IACnC,eAAW,YAAAD,SAAK,uCAAuC,cAAc,mBAAmB,SAAS;AAAA,IAMjG,iBAAiB,OAAO,YAAY,OAAO,KAAK,cAAc,EAAE,IAAI,SAAO,CAAC,KAAkB,uCAAAE,KAAK,OAAO;AAAA,MACxG,UAAU;AAAA,IACZ,GAAG,GAAG,CAAC,CAAC,CAAC;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,IACH,UAAU,CAAC,UAAU,eAA4B,uCAAAA,KAAK,sBAAAC,SAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport { Resizable } from 're-resizable';\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\nconst HANDLE_CLASSES = {\n top: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top'),\n right: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-right'),\n bottom: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom'),\n left: clsx(HANDLE_CLASS_NAME, SIDE_HANDLE_CLASS_NAME, 'components-resizable-box__handle-left'),\n topLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-left'),\n topRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-top', 'components-resizable-box__handle-right'),\n bottomRight: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-right'),\n bottomLeft: clsx(HANDLE_CLASS_NAME, CORNER_HANDLE_CLASS_NAME, 'components-resizable-box__handle-bottom', 'components-resizable-box__handle-left')\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n width: undefined,\n height: undefined,\n top: undefined,\n right: undefined,\n bottom: undefined,\n left: undefined\n};\nconst HANDLE_STYLES = {\n top: HANDLE_STYLES_OVERRIDES,\n right: HANDLE_STYLES_OVERRIDES,\n bottom: HANDLE_STYLES_OVERRIDES,\n left: HANDLE_STYLES_OVERRIDES,\n topLeft: HANDLE_STYLES_OVERRIDES,\n topRight: HANDLE_STYLES_OVERRIDES,\n bottomRight: HANDLE_STYLES_OVERRIDES,\n bottomLeft: HANDLE_STYLES_OVERRIDES\n};\nfunction UnforwardedResizableBox({\n className,\n children,\n showHandle = true,\n __experimentalShowTooltip: showTooltip = false,\n __experimentalTooltipProps: tooltipProps = {},\n ...props\n}, ref) {\n return /*#__PURE__*/_jsxs(Resizable, {\n className: clsx('components-resizable-box__container', showHandle && 'has-show-handle', className)\n // Add a focusable element within the drag handle. Unfortunately,\n // `re-resizable` does not make them properly focusable by default,\n // causing focus to move the the block wrapper which triggers block\n // drag.\n ,\n handleComponent: Object.fromEntries(Object.keys(HANDLE_CLASSES).map(key => [key, /*#__PURE__*/_jsx(\"div\", {\n tabIndex: -1\n }, key)])),\n handleClasses: HANDLE_CLASSES,\n handleStyles: HANDLE_STYLES,\n ref: ref,\n ...props,\n children: [children, showTooltip && /*#__PURE__*/_jsx(ResizeTooltip, {\n ...tooltipProps\n })]\n });\n}\nexport const ResizableBox = forwardRef(UnforwardedResizableBox);\nResizableBox.displayName = 'ResizableBox';\nexport default ResizableBox;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,kBAAiB;AACjB,0BAA0B;AAI1B,4BAA0B;AAC1B,yBAA2C;AAC3C,IAAM,oBAAoB;AAC1B,IAAM,yBAAyB;AAC/B,IAAM,2BAA2B;AACjC,IAAM,iBAAiB;AAAA,EACrB,SAAK,YAAAA,SAAK,mBAAmB,wBAAwB,sCAAsC;AAAA,EAC3F,WAAO,YAAAA,SAAK,mBAAmB,wBAAwB,wCAAwC;AAAA,EAC/F,YAAQ,YAAAA,SAAK,mBAAmB,wBAAwB,yCAAyC;AAAA,EACjG,UAAM,YAAAA,SAAK,mBAAmB,wBAAwB,uCAAuC;AAAA,EAC7F,aAAS,YAAAA,SAAK,mBAAmB,0BAA0B,wCAAwC,uCAAuC;AAAA,EAC1I,cAAU,YAAAA,SAAK,mBAAmB,0BAA0B,wCAAwC,wCAAwC;AAAA,EAC5I,iBAAa,YAAAA,SAAK,mBAAmB,0BAA0B,2CAA2C,wCAAwC;AAAA,EAClJ,gBAAY,YAAAA,SAAK,mBAAmB,0BAA0B,2CAA2C,uCAAuC;AAClJ;AAGA,IAAM,0BAA0B;AAAA,EAC9B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AACA,IAAM,gBAAgB;AAAA,EACpB,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AACd;AACA,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,2BAA2B,cAAc;AAAA,EACzC,4BAA4B,eAAe,CAAC;AAAA,EAC5C,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAC,MAAM,+BAAW;AAAA,IACnC,eAAW,YAAAD,SAAK,uCAAuC,cAAc,mBAAmB,SAAS;AAAA,IAMjG,iBAAiB,OAAO,YAAY,OAAO,KAAK,cAAc,EAAE,IAAI,SAAO,CAAC,KAAkB,uCAAAE,KAAK,OAAO;AAAA,MACxG,UAAU;AAAA,IACZ,GAAG,GAAG,CAAC,CAAC,CAAC;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd;AAAA,IACA,GAAG;AAAA,IACH,UAAU,CAAC,UAAU,eAA4B,uCAAAA,KAAK,sBAAAC,SAAe;AAAA,MACnE,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": ["clsx", "_jsxs", "_jsx", "ResizeTooltip"]
|
|
7
7
|
}
|
|
@@ -122,6 +122,7 @@ function UnforwardedSearchControl({
|
|
|
122
122
|
});
|
|
123
123
|
}
|
|
124
124
|
var SearchControl = (0, import_element.forwardRef)(UnforwardedSearchControl);
|
|
125
|
+
SearchControl.displayName = "SearchControl";
|
|
125
126
|
var search_control_default = SearchControl;
|
|
126
127
|
// Annotate the CommonJS export names for ESM import in node:
|
|
127
128
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/search-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { InputControlPrefixWrapper } from '../input-control/input-prefix-wrapper';\nimport { InputControlSuffixWrapper } from '../input-control/input-suffix-wrapper';\nimport { StyledInputControl, StyledIcon } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction SuffixItem({\n searchRef,\n value,\n onChange,\n onClose\n}) {\n if (!onClose && !value) {\n return null;\n }\n if (onClose) {\n deprecated('`onClose` prop in wp.components.SearchControl', {\n since: '6.8'\n });\n }\n const onReset = () => {\n onChange('');\n searchRef.current?.focus();\n };\n return /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n variant: \"control\",\n children: /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n label: onClose ? __('Close search') : __('Reset search'),\n onClick: onClose !== null && onClose !== void 0 ? onClose : onReset\n })\n });\n}\nfunction UnforwardedSearchControl({\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n className,\n onChange,\n value,\n label = __('Search'),\n placeholder = __('Search'),\n hideLabelFromVision = true,\n onClose,\n size = 'default',\n ...restProps\n}, forwardedRef) {\n // @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n // Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n const {\n disabled,\n ...filteredRestProps\n } = restProps;\n const searchRef = useRef(null);\n const instanceId = useInstanceId(SearchControl, 'components-search-control');\n return /*#__PURE__*/_jsx(StyledInputControl, {\n __next40pxDefaultSize: true,\n id: instanceId,\n hideLabelFromVision: hideLabelFromVision,\n label: label,\n ref: useMergeRefs([searchRef, forwardedRef]),\n type: \"search\",\n size: size,\n className: clsx('components-search-control', className),\n onChange: nextValue => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ''),\n autoComplete: \"off\",\n placeholder: placeholder,\n value: value !== null && value !== void 0 ? value : '',\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n variant: \"icon\",\n children: /*#__PURE__*/_jsx(StyledIcon, {\n icon: search,\n fill: \"currentColor\"\n })\n }),\n suffix: /*#__PURE__*/_jsx(SuffixItem, {\n searchRef: searchRef,\n value: value,\n onChange: onChange,\n onClose: onClose\n }),\n ...filteredRestProps\n });\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef(UnforwardedSearchControl);\nexport default SearchControl;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA4C;AAC5C,kBAAmB;AACnB,mBAAmC;AACnC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,kCAA0C;AAC1C,kCAA0C;AAC1C,oBAA+C;AAC/C,yBAA4B;AAC5B,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,WAAW,CAAC,OAAO;AACtB,WAAO;AAAA,EACT;AACA,MAAI,SAAS;AACX,0BAAAA,SAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,uCAAAC,KAAK,uDAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,MACN,OAAO,cAAU,gBAAG,cAAc,QAAI,gBAAG,cAAc;AAAA,MACvD,SAAS,YAAY,QAAQ,YAAY,SAAS,UAAU;AAAA,IAC9D,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,yBAAyB;AAAA,EAChC,yBAAyB;AAAA;AAAA,EAEzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAQ,gBAAG,QAAQ;AAAA,EACnB,kBAAc,gBAAG,QAAQ;AAAA,EACzB,sBAAsB;AAAA,EACtB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAG,cAAc;AAGf,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,gBAAY,uBAAO,IAAI;AAC7B,QAAM,iBAAa,8BAAc,eAAe,2BAA2B;AAC3E,SAAoB,uCAAAD,KAAK,kCAAoB;AAAA,IAC3C,uBAAuB;AAAA,IACvB,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAK,6BAAa,CAAC,WAAW,YAAY,CAAC;AAAA,IAC3C,MAAM;AAAA,IACN;AAAA,IACA,eAAW,YAAAE,SAAK,6BAA6B,SAAS;AAAA,IACtD,UAAU,eAAa,SAAS,cAAc,QAAQ,cAAc,SAAS,YAAY,EAAE;AAAA,IAC3F,cAAc;AAAA,IACd;AAAA,IACA,OAAO,UAAU,QAAQ,UAAU,SAAS,QAAQ;AAAA,IACpD,QAAqB,uCAAAF,KAAK,uDAA2B;AAAA,MACnD,SAAS;AAAA,MACT,UAAuB,uCAAAA,KAAK,0BAAY;AAAA,QACtC,MAAM;AAAA,QACN,MAAM;AAAA,MACR,CAAC;AAAA,IACH,CAAC;AAAA,IACD,QAAqB,uCAAAA,KAAK,YAAY;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;AAqBO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { InputControlPrefixWrapper } from '../input-control/input-prefix-wrapper';\nimport { InputControlSuffixWrapper } from '../input-control/input-suffix-wrapper';\nimport { StyledInputControl, StyledIcon } from './styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction SuffixItem({\n searchRef,\n value,\n onChange,\n onClose\n}) {\n if (!onClose && !value) {\n return null;\n }\n if (onClose) {\n deprecated('`onClose` prop in wp.components.SearchControl', {\n since: '6.8'\n });\n }\n const onReset = () => {\n onChange('');\n searchRef.current?.focus();\n };\n return /*#__PURE__*/_jsx(InputControlSuffixWrapper, {\n variant: \"control\",\n children: /*#__PURE__*/_jsx(Button, {\n size: \"small\",\n icon: closeSmall,\n label: onClose ? __('Close search') : __('Reset search'),\n onClick: onClose !== null && onClose !== void 0 ? onClose : onReset\n })\n });\n}\nfunction UnforwardedSearchControl({\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n className,\n onChange,\n value,\n label = __('Search'),\n placeholder = __('Search'),\n hideLabelFromVision = true,\n onClose,\n size = 'default',\n ...restProps\n}, forwardedRef) {\n // @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n // Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n const {\n disabled,\n ...filteredRestProps\n } = restProps;\n const searchRef = useRef(null);\n const instanceId = useInstanceId(SearchControl, 'components-search-control');\n return /*#__PURE__*/_jsx(StyledInputControl, {\n __next40pxDefaultSize: true,\n id: instanceId,\n hideLabelFromVision: hideLabelFromVision,\n label: label,\n ref: useMergeRefs([searchRef, forwardedRef]),\n type: \"search\",\n size: size,\n className: clsx('components-search-control', className),\n onChange: nextValue => onChange(nextValue !== null && nextValue !== void 0 ? nextValue : ''),\n autoComplete: \"off\",\n placeholder: placeholder,\n value: value !== null && value !== void 0 ? value : '',\n prefix: /*#__PURE__*/_jsx(InputControlPrefixWrapper, {\n variant: \"icon\",\n children: /*#__PURE__*/_jsx(StyledIcon, {\n icon: search,\n fill: \"currentColor\"\n })\n }),\n suffix: /*#__PURE__*/_jsx(SuffixItem, {\n searchRef: searchRef,\n value: value,\n onChange: onChange,\n onClose: onClose\n }),\n ...filteredRestProps\n });\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef(UnforwardedSearchControl);\nSearchControl.displayName = 'SearchControl';\nexport default SearchControl;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA4C;AAC5C,kBAAmB;AACnB,mBAAmC;AACnC,qBAAmC;AACnC,wBAAuB;AAKvB,oBAAmB;AACnB,kCAA0C;AAC1C,kCAA0C;AAC1C,oBAA+C;AAC/C,yBAA4B;AAC5B,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,MAAI,CAAC,WAAW,CAAC,OAAO;AACtB,WAAO;AAAA,EACT;AACA,MAAI,SAAS;AACX,0BAAAA,SAAW,iDAAiD;AAAA,MAC1D,OAAO;AAAA,IACT,CAAC;AAAA,EACH;AACA,QAAM,UAAU,MAAM;AACpB,aAAS,EAAE;AACX,cAAU,SAAS,MAAM;AAAA,EAC3B;AACA,SAAoB,uCAAAC,KAAK,uDAA2B;AAAA,IAClD,SAAS;AAAA,IACT,UAAuB,uCAAAA,KAAK,cAAAC,SAAQ;AAAA,MAClC,MAAM;AAAA,MACN,MAAM;AAAA,M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AAC5B,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["deprecated", "_jsx", "Button", "clsx"]
|
|
7
7
|
}
|
|
@@ -156,6 +156,7 @@ function UnforwardedSelectControl(props, ref) {
|
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
var SelectControl = (0, import_element.forwardRef)(UnforwardedSelectControl);
|
|
159
|
+
SelectControl.displayName = "SelectControl";
|
|
159
160
|
var select_control_default = SelectControl;
|
|
160
161
|
// Annotate the CommonJS export names for ESM import in node:
|
|
161
162
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/select-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(SelectControl);\n const id = `inspector-select-control-${instanceId}`;\n return idProp || id;\n}\nfunction SelectOptions({\n options\n}) {\n return options.map(({\n id,\n label,\n value,\n ...optionProps\n }, index) => {\n const key = id || `${label}-${value}-${index}`;\n return /*#__PURE__*/_jsx(\"option\", {\n value: value,\n ...optionProps,\n children: label\n }, key);\n });\n}\nfunction UnforwardedSelectControl(props, ref) {\n const {\n className,\n disabled = false,\n help,\n hideLabelFromVision,\n id: idProp,\n label,\n multiple = false,\n onChange,\n options = [],\n size = 'default',\n value: valueProp,\n labelPosition = 'top',\n children,\n prefix,\n suffix,\n variant = 'default',\n __next40pxDefaultSize = false,\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const helpId = help ? `${id}__help` : undefined;\n if (!options?.length && !children) {\n return null;\n }\n const handleOnChange = event => {\n if (props.multiple) {\n const selectedOptions = Array.from(event.target.options).filter(({\n selected\n }) => selected);\n const newValues = selectedOptions.map(({\n value\n }) => value);\n props.onChange?.(newValues, {\n event\n });\n return;\n }\n props.onChange?.(event.target.value, {\n event\n });\n };\n const classes = clsx('components-select-control', className);\n maybeWarnDeprecated36pxSize({\n componentName: 'SelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n help: help,\n id: id,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledInputBase, {\n disabled: disabled,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n isBorderless: variant === 'minimal',\n label: label,\n size: size,\n suffix: suffix || !multiple && /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n prefix: prefix,\n labelPosition: labelPosition,\n __unstableInputWidth: variant === 'minimal' ? 'auto' : undefined,\n variant: variant,\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: /*#__PURE__*/_jsx(Select, {\n ...restProps,\n __next40pxDefaultSize: __next40pxDefaultSize,\n \"aria-describedby\": helpId,\n className: \"components-select-control__input\",\n disabled: disabled,\n id: id,\n multiple: multiple,\n onChange: handleOnChange,\n ref: ref,\n selectSize: size,\n value: valueProp,\n variant: variant,\n children: children || /*#__PURE__*/_jsx(SelectOptions, {\n options: options\n })\n })\n })\n });\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __next40pxDefaultSize\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef(UnforwardedSelectControl);\nexport default SelectControl;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA2B;AAK3B,0BAAwB;AACxB,mCAAwC;AACxC,0BAAqC;AACrC,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QAAM,iBAAa,8BAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,SAAO,UAAU;AACnB;AACA,SAAS,cAAc;AAAA,EACrB;AACF,GAAG;AACD,SAAO,QAAQ,IAAI,CAAC;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAAG,UAAU;AACX,UAAM,MAAM,MAAM,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK;AAC5C,WAAoB,uCAAAA,KAAK,UAAU;AAAA,MACjC;AAAA,MACA,GAAG;AAAA,MACH,UAAU;AAAA,IACZ,GAAG,GAAG;AAAA,EACR,CAAC;AACH;AACA,SAAS,yBAAyB,OAAO,KAAK;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,UAAU,CAAC;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,wBAAwB;AAAA,IACxB,yBAAyB;AAAA;AAAA,IAEzB;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,YAAY;AAAA,QACZ,OAAO;AAAA,QACP;AAAA,QACA,UAAU,YAAyB,uCAAAA,KAAK,eAAe;AAAA,UACrD;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AA6BO,IAAM,oBAAgB,2BAAW,wBAAwB;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { Select, StyledInputBase } from './styles/select-control-styles';\nimport SelectControlChevronDown from './chevron-down';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(SelectControl);\n const id = `inspector-select-control-${instanceId}`;\n return idProp || id;\n}\nfunction SelectOptions({\n options\n}) {\n return options.map(({\n id,\n label,\n value,\n ...optionProps\n }, index) => {\n const key = id || `${label}-${value}-${index}`;\n return /*#__PURE__*/_jsx(\"option\", {\n value: value,\n ...optionProps,\n children: label\n }, key);\n });\n}\nfunction UnforwardedSelectControl(props, ref) {\n const {\n className,\n disabled = false,\n help,\n hideLabelFromVision,\n id: idProp,\n label,\n multiple = false,\n onChange,\n options = [],\n size = 'default',\n value: valueProp,\n labelPosition = 'top',\n children,\n prefix,\n suffix,\n variant = 'default',\n __next40pxDefaultSize = false,\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n __shouldNotWarnDeprecated36pxSize,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const helpId = help ? `${id}__help` : undefined;\n if (!options?.length && !children) {\n return null;\n }\n const handleOnChange = event => {\n if (props.multiple) {\n const selectedOptions = Array.from(event.target.options).filter(({\n selected\n }) => selected);\n const newValues = selectedOptions.map(({\n value\n }) => value);\n props.onChange?.(newValues, {\n event\n });\n return;\n }\n props.onChange?.(event.target.value, {\n event\n });\n };\n const classes = clsx('components-select-control', className);\n maybeWarnDeprecated36pxSize({\n componentName: 'SelectControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n help: help,\n id: id,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledInputBase, {\n disabled: disabled,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n isBorderless: variant === 'minimal',\n label: label,\n size: size,\n suffix: suffix || !multiple && /*#__PURE__*/_jsx(SelectControlChevronDown, {}),\n prefix: prefix,\n labelPosition: labelPosition,\n __unstableInputWidth: variant === 'minimal' ? 'auto' : undefined,\n variant: variant,\n __next40pxDefaultSize: __next40pxDefaultSize,\n children: /*#__PURE__*/_jsx(Select, {\n ...restProps,\n __next40pxDefaultSize: __next40pxDefaultSize,\n \"aria-describedby\": helpId,\n className: \"components-select-control__input\",\n disabled: disabled,\n id: id,\n multiple: multiple,\n onChange: handleOnChange,\n ref: ref,\n selectSize: size,\n value: valueProp,\n variant: variant,\n children: children || /*#__PURE__*/_jsx(SelectOptions, {\n options: options\n })\n })\n })\n });\n}\n\n/**\n * `SelectControl` allows users to select from a single or multiple option menu.\n * It functions as a wrapper around the browser's native `<select>` element.\n *\n * ```jsx\n * import { SelectControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MySelectControl = () => {\n * const [ size, setSize ] = useState( '50%' );\n *\n * return (\n * <SelectControl\n * __next40pxDefaultSize\n * label=\"Size\"\n * value={ size }\n * options={ [\n * { label: 'Big', value: '100%' },\n * { label: 'Medium', value: '50%' },\n * { label: 'Small', value: '25%' },\n * ] }\n * onChange={ setSize }\n * />\n * );\n * };\n * ```\n */\nexport const SelectControl = forwardRef(UnforwardedSelectControl);\n\n// @ts-expect-error TS says: \"Property 'displayName' does not exist on type ...\"\nSelectControl.displayName = 'SelectControl';\nexport default SelectControl;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA2B;AAK3B,0BAAwB;AACxB,mCAAwC;AACxC,0BAAqC;AACrC,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,YAAY,QAAQ;AAC3B,QAAM,iBAAa,8BAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,SAAO,UAAU;AACnB;AACA,SAAS,cAAc;AAAA,EACrB;AACF,GAAG;AACD,SAAO,QAAQ,IAAI,CAAC;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GAAG,UAAU;AACX,UAAM,MAAM,MAAM,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK;AAC5C,WAAoB,uCAAAA,KAAK,UAAU;AAAA,MACjC;AAAA,MACA,GAAG;AAAA,MACH,UAAU;AAAA,IACZ,GAAG,GAAG;AAAA,EACR,CAAC;AACH;AACA,SAAS,yBAAyB,OAAO,KAAK;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,UAAU,CAAC;AAAA,IACX,OAAO;AAAA,IACP,OAAO;AAAA,IACP,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,wBAAwB;AAAA,IACxB,yBAAyB;AAAA;AAAA,IAEzB;AAAA,IACA,GAAG;AAAA,EACL,QAAI,8DAAiC,KAAK;AAC1C,QAAM,KAAK,YAAY,MAAM;AAC7B,QAAM,SAAS,OAAO,GAAG,EAAE,WAAW;AACtC,MAAI,CAAC,SAAS,UAAU,CAAC,UAAU;AACjC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O,IAAM,oBAAgB,2BAAW,wBAAwB;AAGhE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["_jsx", "clsx", "BaseControl", "SelectControlChevronDown"]
|
|
7
7
|
}
|
|
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(slot_exports);
|
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_compose = require("@wordpress/compose");
|
|
38
38
|
var import_view = require("../../view/index.cjs");
|
|
39
|
-
var
|
|
39
|
+
var import_context = __toESM(require("../context.cjs"));
|
|
40
40
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
function Slot(props, forwardedRef) {
|
|
42
42
|
const {
|
|
@@ -48,18 +48,30 @@ function Slot(props, forwardedRef) {
|
|
|
48
48
|
children,
|
|
49
49
|
...restProps
|
|
50
50
|
} = props;
|
|
51
|
-
const registry = (0, import_element.useContext)(
|
|
51
|
+
const registry = (0, import_element.useContext)(import_context.default);
|
|
52
|
+
const instanceRef = (0, import_element.useRef)({});
|
|
52
53
|
const ref = (0, import_element.useRef)(null);
|
|
53
54
|
const fillPropsRef = (0, import_element.useRef)(fillProps);
|
|
54
55
|
(0, import_element.useLayoutEffect)(() => {
|
|
55
56
|
fillPropsRef.current = fillProps;
|
|
56
57
|
}, [fillProps]);
|
|
57
58
|
(0, import_element.useLayoutEffect)(() => {
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
const instance = instanceRef.current;
|
|
60
|
+
registry.registerSlot(name, {
|
|
61
|
+
type: "portal",
|
|
62
|
+
instance,
|
|
63
|
+
ref,
|
|
64
|
+
fillProps: fillPropsRef.current
|
|
65
|
+
});
|
|
66
|
+
return () => registry.unregisterSlot(name, instance);
|
|
60
67
|
}, [registry, name]);
|
|
61
68
|
(0, import_element.useLayoutEffect)(() => {
|
|
62
|
-
registry.updateSlot(name,
|
|
69
|
+
registry.updateSlot(name, {
|
|
70
|
+
type: "portal",
|
|
71
|
+
instance: instanceRef.current,
|
|
72
|
+
ref,
|
|
73
|
+
fillProps: fillPropsRef.current
|
|
74
|
+
});
|
|
63
75
|
});
|
|
64
76
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_view.View, {
|
|
65
77
|
as,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/slot-fill/bubbles-virtually/slot.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect, useContext, forwardRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAAgE;AAChE,qBAA6B;AAK7B,kBAAqB;AACrB
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useLayoutEffect, useContext, forwardRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport SlotFillContext from '../context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Slot(props, forwardedRef) {\n const {\n name,\n fillProps = {},\n as,\n // `children` is not allowed. However, if it is passed,\n // it will be displayed as is, so remove `children`.\n children,\n ...restProps\n } = props;\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const ref = useRef(null);\n const fillPropsRef = useRef(fillProps);\n useLayoutEffect(() => {\n fillPropsRef.current = fillProps;\n }, [fillProps]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerSlot(name, {\n type: 'portal',\n instance,\n ref,\n fillProps: fillPropsRef.current\n });\n return () => registry.unregisterSlot(name, instance);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateSlot(name, {\n type: 'portal',\n instance: instanceRef.current,\n ref,\n fillProps: fillPropsRef.current\n });\n });\n return /*#__PURE__*/_jsx(View, {\n as: as,\n ref: useMergeRefs([forwardedRef, ref]),\n ...restProps\n });\n}\nexport default forwardRef(Slot);"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAAgE;AAChE,qBAA6B;AAK7B,kBAAqB;AACrB,qBAA4B;AAC5B,yBAA4B;AAC5B,SAAS,KAAK,OAAO,cAAc;AACjC,QAAM;AAAA,IACJ;AAAA,IACA,YAAY,CAAC;AAAA,IACb;AAAA;AAAA;AAAA,IAGA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,kBAAc,uBAAO,CAAC,CAAC;AAC7B,QAAM,UAAM,uBAAO,IAAI;AACvB,QAAM,mBAAe,uBAAO,SAAS;AACrC,sCAAgB,MAAM;AACpB,iBAAa,UAAU;AAAA,EACzB,GAAG,CAAC,SAAS,CAAC;AACd,sCAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM;AAAA,MAC1B,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,WAAW,aAAa;AAAA,IAC1B,CAAC;AACD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM;AAAA,MACxB,MAAM;AAAA,MACN,UAAU,YAAY;AAAA,MACtB;AAAA,MACA,WAAW,aAAa;AAAA,IAC1B,CAAC;AAAA,EACH,CAAC;AACD,SAAoB,uCAAAC,KAAK,kBAAM;AAAA,IAC7B;AAAA,IACA,SAAK,6BAAa,CAAC,cAAc,GAAG,CAAC;AAAA,IACrC,GAAG;AAAA,EACL,CAAC;AACH;AACA,IAAO,mBAAQ,2BAAW,IAAI;",
|
|
6
6
|
"names": ["SlotFillContext", "_jsx"]
|
|
7
7
|
}
|
|
@@ -34,10 +34,23 @@ __export(use_slot_fills_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(use_slot_fills_exports);
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
|
-
var
|
|
38
|
-
|
|
37
|
+
var import_context = __toESM(require("../context.cjs"));
|
|
38
|
+
function useObservableValueWithSelector(map, name, selector) {
|
|
39
|
+
const subscribe = (0, import_element.useMemo)(() => (listener) => map.subscribe(name, listener), [map, name]);
|
|
40
|
+
const getValue = () => selector(map.get(name));
|
|
41
|
+
return (0, import_element.useSyncExternalStore)(subscribe, getValue, getValue);
|
|
42
|
+
}
|
|
43
|
+
function getLength(array) {
|
|
44
|
+
return array?.length;
|
|
45
|
+
}
|
|
39
46
|
function useSlotFills(name) {
|
|
40
|
-
const registry = (0, import_element.useContext)(
|
|
41
|
-
|
|
47
|
+
const registry = (0, import_element.useContext)(import_context.default);
|
|
48
|
+
const length = useObservableValueWithSelector(registry.fills, name, getLength);
|
|
49
|
+
const fills = (0, import_element.useMemo)(() => {
|
|
50
|
+
return length !== void 0 ? Array.from({
|
|
51
|
+
length
|
|
52
|
+
}) : void 0;
|
|
53
|
+
}, [length]);
|
|
54
|
+
return fills;
|
|
42
55
|
}
|
|
43
56
|
//# sourceMappingURL=use-slot-fills.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/slot-fill/bubbles-virtually/use-slot-fills.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext, useMemo, useSyncExternalStore } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport SlotFillContext from '../context';\nfunction useObservableValueWithSelector(map, name, selector) {\n const subscribe = useMemo(() => listener => map.subscribe(name, listener), [map, name]);\n const getValue = () => selector(map.get(name));\n return useSyncExternalStore(subscribe, getValue, getValue);\n}\nfunction getLength(array) {\n return array?.length;\n}\nexport default function useSlotFills(name) {\n const registry = useContext(SlotFillContext);\n const length = useObservableValueWithSelector(registry.fills, name, getLength);\n // callers expect an opaque array with length `length`, so create that array\n const fills = useMemo(() => {\n return length !== undefined ? Array.from({\n length\n }) : undefined;\n }, [length]);\n return fills;\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA0D;AAI1D,qBAA4B;AAC5B,SAAS,+BAA+B,KAAK,MAAM,UAAU;AAC3D,QAAM,gBAAY,wBAAQ,MAAM,cAAY,IAAI,UAAU,MAAM,QAAQ,GAAG,CAAC,KAAK,IAAI,CAAC;AACtF,QAAM,WAAW,MAAM,SAAS,IAAI,IAAI,IAAI,CAAC;AAC7C,aAAO,qCAAqB,WAAW,UAAU,QAAQ;AAC3D;AACA,SAAS,UAAU,OAAO;AACxB,SAAO,OAAO;AAChB;AACe,SAAR,aAA8B,MAAM;AACzC,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,SAAS,+BAA+B,SAAS,OAAO,MAAM,SAAS;AAE7E,QAAM,YAAQ,wBAAQ,MAAM;AAC1B,WAAO,WAAW,SAAY,MAAM,KAAK;AAAA,MACvC;AAAA,IACF,CAAC,IAAI;AAAA,EACP,GAAG,CAAC,MAAM,CAAC;AACX,SAAO;AACT;",
|
|
6
6
|
"names": ["SlotFillContext"]
|
|
7
7
|
}
|
|
@@ -35,12 +35,16 @@ __export(use_slot_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(use_slot_exports);
|
|
36
36
|
var import_element = require("@wordpress/element");
|
|
37
37
|
var import_compose = require("@wordpress/compose");
|
|
38
|
-
var
|
|
38
|
+
var import_context = __toESM(require("../context.cjs"));
|
|
39
39
|
function useSlot(name) {
|
|
40
|
-
const registry = (0, import_element.useContext)(
|
|
40
|
+
const registry = (0, import_element.useContext)(import_context.default);
|
|
41
41
|
const slot = (0, import_compose.useObservableValue)(registry.slots, name);
|
|
42
|
+
let ref;
|
|
43
|
+
if (slot && slot.type === "portal") {
|
|
44
|
+
ref = slot.ref;
|
|
45
|
+
}
|
|
42
46
|
return {
|
|
43
|
-
|
|
47
|
+
ref
|
|
44
48
|
};
|
|
45
49
|
}
|
|
46
50
|
//# sourceMappingURL=use-slot.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/slot-fill/bubbles-virtually/use-slot.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from '
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAC3B,qBAAmC;AAKnC
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\nimport { useObservableValue } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from '../context';\nexport default function useSlot(name) {\n const registry = useContext(SlotFillContext);\n const slot = useObservableValue(registry.slots, name);\n let ref;\n if (slot && slot.type === 'portal') {\n ref = slot.ref;\n }\n return {\n ref\n };\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAC3B,qBAAmC;AAKnC,qBAA4B;AACb,SAAR,QAAyB,MAAM;AACpC,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,WAAO,mCAAmB,SAAS,OAAO,IAAI;AACpD,MAAI;AACJ,MAAI,QAAQ,KAAK,SAAS,UAAU;AAClC,UAAM,KAAK;AAAA,EACb;AACA,SAAO;AAAA,IACL;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["SlotFillContext"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,36 +17,45 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// packages/components/src/slot-fill/context.ts
|
|
21
31
|
var context_exports = {};
|
|
22
32
|
__export(context_exports, {
|
|
23
|
-
SlotFillContext: () => SlotFillContext,
|
|
24
33
|
default: () => context_default
|
|
25
34
|
});
|
|
26
35
|
module.exports = __toCommonJS(context_exports);
|
|
27
36
|
var import_compose = require("@wordpress/compose");
|
|
28
37
|
var import_element = require("@wordpress/element");
|
|
38
|
+
var import_warning = __toESM(require("@wordpress/warning"));
|
|
29
39
|
var initialValue = {
|
|
30
40
|
slots: (0, import_compose.observableMap)(),
|
|
31
41
|
fills: (0, import_compose.observableMap)(),
|
|
32
42
|
registerSlot: () => {
|
|
43
|
+
globalThis.SCRIPT_DEBUG === true ? (0, import_warning.default)("Components must be wrapped within `SlotFillProvider`. See https://developer.wordpress.org/block-editor/components/slot-fill/") : void 0;
|
|
33
44
|
},
|
|
34
45
|
unregisterSlot: () => {
|
|
35
46
|
},
|
|
47
|
+
updateSlot: () => {
|
|
48
|
+
},
|
|
36
49
|
registerFill: () => {
|
|
37
50
|
},
|
|
38
51
|
unregisterFill: () => {
|
|
39
52
|
},
|
|
40
53
|
updateFill: () => {
|
|
41
|
-
}
|
|
54
|
+
},
|
|
55
|
+
// This helps the provider know if it's using the default context value or not.
|
|
56
|
+
isDefault: true
|
|
42
57
|
};
|
|
43
58
|
var SlotFillContext = (0, import_element.createContext)(initialValue);
|
|
44
59
|
SlotFillContext.displayName = "SlotFillContext";
|
|
45
60
|
var context_default = SlotFillContext;
|
|
46
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
SlotFillContext
|
|
49
|
-
});
|
|
50
61
|
//# sourceMappingURL=context.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/slot-fill/context.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { createContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nconst initialValue = {\n slots: observableMap(),\n fills: observableMap(),\n registerSlot: () => {},\n unregisterSlot: () => {},\n registerFill: () => {},\n unregisterFill: () => {},\n updateFill: () => {}\n};\
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { createContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\n\nconst initialValue = {\n slots: observableMap(),\n fills: observableMap(),\n registerSlot: () => {\n globalThis.SCRIPT_DEBUG === true ? warning('Components must be wrapped within `SlotFillProvider`. ' + 'See https://developer.wordpress.org/block-editor/components/slot-fill/') : void 0;\n },\n unregisterSlot: () => {},\n updateSlot: () => {},\n registerFill: () => {},\n unregisterFill: () => {},\n updateFill: () => {},\n // This helps the provider know if it's using the default context value or not.\n isDefault: true\n};\nconst SlotFillContext = createContext(initialValue);\nSlotFillContext.displayName = 'SlotFillContext';\nexport default SlotFillContext;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA8B;AAC9B,qBAA8B;AAC9B,qBAAoB;AAMpB,IAAM,eAAe;AAAA,EACnB,WAAO,8BAAc;AAAA,EACrB,WAAO,8BAAc;AAAA,EACrB,cAAc,MAAM;AAClB,eAAW,iBAAiB,WAAO,eAAAA,SAAQ,8HAAmI,IAAI;AAAA,EACpL;AAAA,EACA,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,YAAY,MAAM;AAAA,EAAC;AAAA,EACnB,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,YAAY,MAAM;AAAA,EAAC;AAAA;AAAA,EAEnB,WAAW;AACb;AACA,IAAM,sBAAkB,8BAAc,YAAY;AAClD,gBAAgB,cAAc;AAC9B,IAAO,kBAAQ;",
|
|
6
|
+
"names": ["warning"]
|
|
7
7
|
}
|
package/build/slot-fill/fill.cjs
CHANGED
|
@@ -27,18 +27,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
|
-
// packages/components/src/slot-fill/fill.
|
|
30
|
+
// packages/components/src/slot-fill/fill.tsx
|
|
31
31
|
var fill_exports = {};
|
|
32
32
|
__export(fill_exports, {
|
|
33
33
|
default: () => Fill
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(fill_exports);
|
|
36
|
+
var import_compose = require("@wordpress/compose");
|
|
36
37
|
var import_element = require("@wordpress/element");
|
|
37
38
|
var import_context = __toESM(require("./context.cjs"));
|
|
39
|
+
var import_style_provider = __toESM(require("../style-provider/index.cjs"));
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
41
|
function Fill({
|
|
39
42
|
name,
|
|
40
43
|
children
|
|
41
44
|
}) {
|
|
45
|
+
var _slot$fillProps;
|
|
42
46
|
const registry = (0, import_element.useContext)(import_context.default);
|
|
43
47
|
const instanceRef = (0, import_element.useRef)({});
|
|
44
48
|
const childrenRef = (0, import_element.useRef)(children);
|
|
@@ -47,12 +51,33 @@ function Fill({
|
|
|
47
51
|
}, [children]);
|
|
48
52
|
(0, import_element.useLayoutEffect)(() => {
|
|
49
53
|
const instance = instanceRef.current;
|
|
50
|
-
registry.registerFill(name,
|
|
54
|
+
registry.registerFill(name, {
|
|
55
|
+
instance,
|
|
56
|
+
children: childrenRef.current
|
|
57
|
+
});
|
|
51
58
|
return () => registry.unregisterFill(name, instance);
|
|
52
59
|
}, [registry, name]);
|
|
53
60
|
(0, import_element.useLayoutEffect)(() => {
|
|
54
|
-
registry.updateFill(name,
|
|
61
|
+
registry.updateFill(name, {
|
|
62
|
+
instance: instanceRef.current,
|
|
63
|
+
children: childrenRef.current
|
|
64
|
+
});
|
|
55
65
|
});
|
|
56
|
-
|
|
66
|
+
const slot = (0, import_compose.useObservableValue)(registry.slots, name);
|
|
67
|
+
if (!slot) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
if (slot.type === "children") {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
const portalEl = slot.ref.current;
|
|
74
|
+
if (!portalEl) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const wrappedChildren = typeof children === "function" ? children((_slot$fillProps = slot.fillProps) !== null && _slot$fillProps !== void 0 ? _slot$fillProps : {}) : children;
|
|
78
|
+
return (0, import_element.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_style_provider.default, {
|
|
79
|
+
document: portalEl.ownerDocument,
|
|
80
|
+
children: wrappedChildren
|
|
81
|
+
}), portalEl);
|
|
57
82
|
}
|
|
58
83
|
//# sourceMappingURL=fill.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/slot-fill/fill.
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useContext, useLayoutEffect, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nexport default function Fill({\n name,\n children\n}) {\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const childrenRef = useRef(children);\n useLayoutEffect(() => {\n childrenRef.current = children;\n }, [children]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerFill(name, instance
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,
|
|
6
|
-
"names": ["SlotFillContext"]
|
|
3
|
+
"sources": ["../../src/slot-fill/fill.tsx"],
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport { useContext, useLayoutEffect, useRef, createPortal } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport StyleProvider from '../style-provider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function Fill({\n name,\n children\n}) {\n var _slot$fillProps;\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n const childrenRef = useRef(children);\n useLayoutEffect(() => {\n childrenRef.current = children;\n }, [children]);\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerFill(name, {\n instance,\n children: childrenRef.current\n });\n return () => registry.unregisterFill(name, instance);\n }, [registry, name]);\n useLayoutEffect(() => {\n registry.updateFill(name, {\n instance: instanceRef.current,\n children: childrenRef.current\n });\n });\n const slot = useObservableValue(registry.slots, name);\n if (!slot) {\n return null;\n }\n if (slot.type === 'children') {\n return null;\n }\n const portalEl = slot.ref.current;\n if (!portalEl) {\n return null;\n }\n const wrappedChildren = typeof children === 'function' ? children((_slot$fillProps = slot.fillProps) !== null && _slot$fillProps !== void 0 ? _slot$fillProps : {}) : children;\n\n // When using a `Fill`, the `children` will be rendered in the document of the\n // `Slot`. This means that we need to wrap the `children` in a `StyleProvider`\n // to make sure we're referencing the right document/iframe (instead of the\n // context of the `Fill`'s parent).\n return createPortal(/*#__PURE__*/_jsx(StyleProvider, {\n document: portalEl.ownerDocument,\n children: wrappedChildren\n }), portalEl);\n}"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAmC;AACnC,qBAAkE;AAKlE,qBAA4B;AAC5B,4BAA0B;AAC1B,yBAA4B;AACb,SAAR,KAAsB;AAAA,EAC3B;AAAA,EACA;AACF,GAAG;AACD,MAAI;AACJ,QAAM,eAAW,2BAAW,eAAAA,OAAe;AAC3C,QAAM,kBAAc,uBAAO,CAAC,CAAC;AAC7B,QAAM,kBAAc,uBAAO,QAAQ;AACnC,sCAAgB,MAAM;AACpB,gBAAY,UAAU;AAAA,EACxB,GAAG,CAAC,QAAQ,CAAC;AACb,sCAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM;AAAA,MAC1B;AAAA,MACA,UAAU,YAAY;AAAA,IACxB,CAAC;AACD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,sCAAgB,MAAM;AACpB,aAAS,WAAW,MAAM;AAAA,MACxB,UAAU,YAAY;AAAA,MACtB,UAAU,YAAY;AAAA,IACxB,CAAC;AAAA,EACH,CAAC;AACD,QAAM,WAAO,mCAAmB,SAAS,OAAO,IAAI;AACpD,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,MAAI,KAAK,SAAS,YAAY;AAC5B,WAAO;AAAA,EACT;AACA,QAAM,WAAW,KAAK,IAAI;AAC1B,MAAI,CAAC,UAAU;AACb,WAAO;AAAA,EACT;AACA,QAAM,kBAAkB,OAAO,aAAa,aAAa,UAAU,kBAAkB,KAAK,eAAe,QAAQ,oBAAoB,SAAS,kBAAkB,CAAC,CAAC,IAAI;AAMtK,aAAO,6BAA0B,uCAAAC,KAAK,sBAAAC,SAAe;AAAA,IACnD,UAAU,SAAS;AAAA,IACnB,UAAU;AAAA,EACZ,CAAC,GAAG,QAAQ;AACd;",
|
|
6
|
+
"names": ["SlotFillContext", "_jsx", "StyleProvider"]
|
|
7
7
|
}
|
|
@@ -30,10 +30,9 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// packages/components/src/slot-fill/index.tsx
|
|
31
31
|
var slot_fill_exports = {};
|
|
32
32
|
__export(slot_fill_exports, {
|
|
33
|
-
Fill: () =>
|
|
33
|
+
Fill: () => import_fill.default,
|
|
34
34
|
Provider: () => Provider,
|
|
35
35
|
Slot: () => Slot,
|
|
36
|
-
UnforwardedSlot: () => UnforwardedSlot,
|
|
37
36
|
createSlotFill: () => createSlotFill,
|
|
38
37
|
useSlot: () => import_use_slot.default,
|
|
39
38
|
useSlotFills: () => import_use_slot_fills.default
|
|
@@ -42,24 +41,13 @@ module.exports = __toCommonJS(slot_fill_exports);
|
|
|
42
41
|
var import_element = require("@wordpress/element");
|
|
43
42
|
var import_fill = __toESM(require("./fill.cjs"));
|
|
44
43
|
var import_slot = __toESM(require("./slot.cjs"));
|
|
45
|
-
var import_fill2 = __toESM(require("./bubbles-virtually/fill.cjs"));
|
|
46
44
|
var import_slot2 = __toESM(require("./bubbles-virtually/slot.cjs"));
|
|
47
|
-
var import_slot_fill_provider = __toESM(require("./bubbles-virtually/slot-fill-provider.cjs"));
|
|
48
45
|
var import_provider = __toESM(require("./provider.cjs"));
|
|
49
|
-
var
|
|
46
|
+
var import_context = __toESM(require("./context.cjs"));
|
|
50
47
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
51
48
|
var import_use_slot = __toESM(require("./bubbles-virtually/use-slot.cjs"));
|
|
52
49
|
var import_use_slot_fills = __toESM(require("./bubbles-virtually/use-slot-fills.cjs"));
|
|
53
|
-
|
|
54
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
55
|
-
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill.default, {
|
|
56
|
-
...props
|
|
57
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill2.default, {
|
|
58
|
-
...props
|
|
59
|
-
})]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
function UnforwardedSlot(props, ref) {
|
|
50
|
+
var Slot = (0, import_element.forwardRef)((props, ref) => {
|
|
63
51
|
const {
|
|
64
52
|
bubblesVirtually,
|
|
65
53
|
...restProps
|
|
@@ -73,28 +61,26 @@ function UnforwardedSlot(props, ref) {
|
|
|
73
61
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_slot.default, {
|
|
74
62
|
...restProps
|
|
75
63
|
});
|
|
76
|
-
}
|
|
77
|
-
|
|
64
|
+
});
|
|
65
|
+
Slot.displayName = "Slot";
|
|
78
66
|
function Provider({
|
|
79
67
|
children,
|
|
80
68
|
passthrough = false
|
|
81
69
|
}) {
|
|
82
|
-
const parent = (0, import_element.useContext)(
|
|
70
|
+
const parent = (0, import_element.useContext)(import_context.default);
|
|
83
71
|
if (!parent.isDefault && passthrough) {
|
|
84
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {
|
|
85
73
|
children
|
|
86
74
|
});
|
|
87
75
|
}
|
|
88
76
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_provider.default, {
|
|
89
|
-
children
|
|
90
|
-
children
|
|
91
|
-
})
|
|
77
|
+
children
|
|
92
78
|
});
|
|
93
79
|
}
|
|
94
80
|
Provider.displayName = "SlotFillProvider";
|
|
95
81
|
function createSlotFill(key) {
|
|
96
82
|
const baseName = typeof key === "symbol" ? key.description : key;
|
|
97
|
-
const FillComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
83
|
+
const FillComponent = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_fill.default, {
|
|
98
84
|
name: key,
|
|
99
85
|
...props
|
|
100
86
|
});
|
|
@@ -116,7 +102,6 @@ function createSlotFill(key) {
|
|
|
116
102
|
Fill,
|
|
117
103
|
Provider,
|
|
118
104
|
Slot,
|
|
119
|
-
UnforwardedSlot,
|
|
120
105
|
createSlotFill,
|
|
121
106
|
useSlot,
|
|
122
107
|
useSlotFills
|