@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
|
@@ -56,6 +56,7 @@ function UnforwardedToggleGroupControlOptionIcon(props, ref) {
|
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
var ToggleGroupControlOptionIcon = (0, import_element.forwardRef)(UnforwardedToggleGroupControlOptionIcon);
|
|
59
|
+
ToggleGroupControlOptionIcon.displayName = "ToggleGroupControlOptionIcon";
|
|
59
60
|
var component_default = ToggleGroupControlOptionIcon;
|
|
60
61
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
62
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toggle-group-control/toggle-group-control-option-icon/component.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOptionIcon(props, ref) {\n const {\n icon,\n label,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n isIcon: true,\n \"aria-label\": label,\n showTooltip: true,\n ref: ref,\n children: /*#__PURE__*/_jsx(Icon, {\n icon: icon\n })\n });\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl __next40pxDefaultSize>\n * <ToggleGroupControlOptionIcon\n * value=\"uppercase\"\n * label=\"Uppercase\"\n * icon={ formatUppercase }\n * />\n * <ToggleGroupControlOptionIcon\n * value=\"lowercase\"\n * label=\"Lowercase\"\n * icon={ formatLowercase }\n * />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(UnforwardedToggleGroupControlOptionIcon);\nexport default ToggleGroupControlOptionIcon;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAM3B,8CAA6C;AAC7C,kBAAiB;AACjB,yBAA4B;AAC5B,SAAS,wCAAwC,OAAO,KAAK;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,sEAA8B;AAAA,IACrD,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,IACb;AAAA,IACA,UAAuB,uCAAAA,KAAK,YAAAC,SAAM;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAgCO,IAAM,mCAA+B,2BAAW,uCAAuC;AAC9F,IAAO,oBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOptionIcon(props, ref) {\n const {\n icon,\n label,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n isIcon: true,\n \"aria-label\": label,\n showTooltip: true,\n ref: ref,\n children: /*#__PURE__*/_jsx(Icon, {\n icon: icon\n })\n });\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl __next40pxDefaultSize>\n * <ToggleGroupControlOptionIcon\n * value=\"uppercase\"\n * label=\"Uppercase\"\n * icon={ formatUppercase }\n * />\n * <ToggleGroupControlOptionIcon\n * value=\"lowercase\"\n * label=\"Lowercase\"\n * icon={ formatLowercase }\n * />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(UnforwardedToggleGroupControlOptionIcon);\nToggleGroupControlOptionIcon.displayName = 'ToggleGroupControlOptionIcon';\nexport default ToggleGroupControlOptionIcon;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAM3B,8CAA6C;AAC7C,kBAAiB;AACjB,yBAA4B;AAC5B,SAAS,wCAAwC,OAAO,KAAK;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,uCAAAA,KAAK,sEAA8B;AAAA,IACrD,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,IACb;AAAA,IACA,UAAuB,uCAAAA,KAAK,YAAAC,SAAM;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAgCO,IAAM,mCAA+B,2BAAW,uCAAuC;AAC9F,6BAA6B,cAAc;AAC3C,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["_jsx", "Icon"]
|
|
7
7
|
}
|
|
@@ -92,6 +92,7 @@ function UnforwardedToolbar({
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
var Toolbar = (0, import_element.forwardRef)(UnforwardedToolbar);
|
|
95
|
+
Toolbar.displayName = "Toolbar";
|
|
95
96
|
var toolbar_default = Toolbar;
|
|
96
97
|
// Annotate the CommonJS export names for ESM import in node:
|
|
97
98
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/toolbar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport ToolbarGroup from '../toolbar-group';\nimport ToolbarContainer from './toolbar-container';\nimport { ContextSystemProvider } from '../../context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbar({\n className,\n label,\n variant,\n ...props\n}, ref) {\n const isVariantDefined = variant !== undefined;\n const contextSystemValue = useMemo(() => {\n if (isVariantDefined) {\n return {};\n }\n return {\n DropdownMenu: {\n variant: 'toolbar'\n },\n Dropdown: {\n variant: 'toolbar'\n },\n Menu: {\n variant: 'toolbar'\n }\n };\n }, [isVariantDefined]);\n if (!label) {\n deprecated('Using Toolbar without label prop', {\n since: '5.6',\n alternative: 'ToolbarGroup component',\n link: 'https://developer.wordpress.org/block-editor/components/toolbar/'\n });\n // Extracting title from `props` because `ToolbarGroup` doesn't accept it.\n const {\n title: _title,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToolbarGroup, {\n isCollapsed: false,\n ...restProps,\n className: className\n });\n }\n // `ToolbarGroup` already uses components-toolbar for compatibility reasons.\n const finalClassName = clsx('components-accessible-toolbar', className, variant && `is-${variant}`);\n return /*#__PURE__*/_jsx(ContextSystemProvider, {\n value: contextSystemValue,\n children: /*#__PURE__*/_jsx(ToolbarContainer, {\n className: finalClassName,\n label: label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * Renders a toolbar.\n *\n * To add controls, simply pass `ToolbarButton` components as children.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { formatBold, formatItalic, link } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n * <Toolbar label=\"Options\">\n * <ToolbarButton icon={ formatBold } label=\"Bold\" />\n * <ToolbarButton icon={ formatItalic } label=\"Italic\" />\n * <ToolbarButton icon={ link } label=\"Link\" />\n * </Toolbar>\n * );\n * }\n * ```\n */\nexport const Toolbar = forwardRef(UnforwardedToolbar);\nexport default Toolbar;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAoC;AACpC,wBAAuB;AAKvB,2BAAyB;AACzB,+BAA6B;AAC7B,qBAAsC;AACtC,yBAA4B;AAC5B,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,mBAAmB,YAAY;AACrC,QAAM,yBAAqB,wBAAQ,MAAM;AACvC,QAAI,kBAAkB;AACpB,aAAO,CAAC;AAAA,IACV;AACA,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,SAAS;AAAA,MACX;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,CAAC;AACrB,MAAI,CAAC,OAAO;AACV,0BAAAA,SAAW,oCAAoC;AAAA,MAC7C,OAAO;AAAA,MACP,aAAa;AAAA,MACb,MAAM;AAAA,IACR,CAAC;AAED,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,GAAG;AAAA,IACL,IAAI;AACJ,WAAoB,uCAAAC,KAAK,qBAAAC,SAAc;AAAA,MACrC,aAAa;AAAA,MACb,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,qBAAiB,YAAAC,SAAK,iCAAiC,WAAW,WAAW,MAAM,OAAO,EAAE;AAClG,SAAoB,uCAAAF,KAAK,sCAAuB;AAAA,IAC9C,OAAO;AAAA,IACP,UAAuB,uCAAAA,KAAK,yBAAAG,SAAkB;AAAA,MAC5C,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAsBO,IAAM,cAAU,2BAAW,kBAAkB;AACpD,IAAO,kBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport ToolbarGroup from '../toolbar-group';\nimport ToolbarContainer from './toolbar-container';\nimport { ContextSystemProvider } from '../../context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbar({\n className,\n label,\n variant,\n ...props\n}, ref) {\n const isVariantDefined = variant !== undefined;\n const contextSystemValue = useMemo(() => {\n if (isVariantDefined) {\n return {};\n }\n return {\n DropdownMenu: {\n variant: 'toolbar'\n },\n Dropdown: {\n variant: 'toolbar'\n },\n Menu: {\n variant: 'toolbar'\n }\n };\n }, [isVariantDefined]);\n if (!label) {\n deprecated('Using Toolbar without label prop', {\n since: '5.6',\n alternative: 'ToolbarGroup component',\n link: 'https://developer.wordpress.org/block-editor/components/toolbar/'\n });\n // Extracting title from `props` because `ToolbarGroup` doesn't accept it.\n const {\n title: _title,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToolbarGroup, {\n isCollapsed: false,\n ...restProps,\n className: className\n });\n }\n // `ToolbarGroup` already uses components-toolbar for compatibility reasons.\n const finalClassName = clsx('components-accessible-toolbar', className, variant && `is-${variant}`);\n return /*#__PURE__*/_jsx(ContextSystemProvider, {\n value: contextSystemValue,\n children: /*#__PURE__*/_jsx(ToolbarContainer, {\n className: finalClassName,\n label: label,\n ref: ref,\n ...props\n })\n });\n}\n\n/**\n * Renders a toolbar.\n *\n * To add controls, simply pass `ToolbarButton` components as children.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { formatBold, formatItalic, link } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n * <Toolbar label=\"Options\">\n * <ToolbarButton icon={ formatBold } label=\"Bold\" />\n * <ToolbarButton icon={ formatItalic } label=\"Italic\" />\n * <ToolbarButton icon={ link } label=\"Link\" />\n * </Toolbar>\n * );\n * }\n * ```\n */\nexport const Toolbar = forwardRef(UnforwardedToolbar);\nToolbar.displayName = 'Toolbar';\nexport default Toolbar;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAoC;AACpC,wBAAuB;AAKvB,2BAAyB;AACzB,+BAA6B;AAC7B,qBAAsC;AACtC,yBAA4B;AAC5B,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,mBAAmB,YAAY;AACrC,QAAM,yBAAqB,wBAAQ,MAAM;AACvC,QAAI,kBAAkB;AACpB,aAAO,CAAC;AAAA,IACV;AACA,WAAO;AAAA,MACL,cAAc;AAAA,QACZ,SAAS;AAAA,MACX;AAAA,MACA,UAAU;AAAA,QACR,SAAS;AAAA,MACX;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,CAAC;AACrB,MAAI,CAAC,OAAO;AACV,0BAAAA,SAAW,oCAAoC;AAAA,MAC7C,OAAO;AAAA,MACP,aAAa;AAAA,MACb,MAAM;AAAA,IACR,CAAC;AAED,UAAM;AAAA,MACJ,OAAO;AAAA,MACP,GAAG;AAAA,IACL,IAAI;AACJ,WAAoB,uCAAAC,KAAK,qBAAAC,SAAc;AAAA,MACrC,aAAa;AAAA,MACb,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH;AAEA,QAAM,qBAAiB,YAAAC,SAAK,iCAAiC,WAAW,WAAW,MAAM,OAAO,EAAE;AAClG,SAAoB,uCAAAF,KAAK,sCAAuB;AAAA,IAC9C,OAAO;AAAA,IACP,UAAuB,uCAAAA,KAAK,yBAAAG,SAAkB;AAAA,MAC5C,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAsBO,IAAM,cAAU,2BAAW,kBAAkB;AACpD,QAAQ,cAAc;AACtB,IAAO,kBAAQ;",
|
|
6
6
|
"names": ["deprecated", "_jsx", "ToolbarGroup", "clsx", "ToolbarContainer"]
|
|
7
7
|
}
|
|
@@ -61,6 +61,7 @@ function UnforwardedToolbarContainer({
|
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
63
|
var ToolbarContainer = (0, import_element.forwardRef)(UnforwardedToolbarContainer);
|
|
64
|
+
ToolbarContainer.displayName = "ToolbarContainer";
|
|
64
65
|
var toolbar_container_default = ToolbarContainer;
|
|
65
66
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
67
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/toolbar/toolbar-container.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarContainer({\n label,\n ...props\n}, ref) {\n const toolbarStore = Ariakit.useToolbarStore({\n focusLoop: true,\n rtl: isRTL()\n });\n return (\n /*#__PURE__*/\n // This will provide state for `ToolbarButton`'s\n _jsx(ToolbarContext.Provider, {\n value: toolbarStore,\n children: /*#__PURE__*/_jsx(Ariakit.Toolbar, {\n ref: ref,\n \"aria-label\": label,\n store: toolbarStore,\n ...props\n })\n })\n );\n}\nexport const ToolbarContainer = forwardRef(UnforwardedToolbarContainer);\nexport default ToolbarContainer;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAIzB,qBAA2B;AAC3B,kBAAsB;AAKtB,6BAA2B;AAC3B,yBAA4B;AAC5B,SAAS,4BAA4B;AAAA,EACnC;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,eAAuB,wBAAgB;AAAA,IAC3C,WAAW;AAAA,IACX,SAAK,mBAAM;AAAA,EACb,CAAC;AACD;AAAA;AAAA,IAGE,uCAAAA,KAAK,uBAAAC,QAAe,UAAU;AAAA,MAC5B,OAAO;AAAA,MACP,UAAuB,uCAAAD,KAAa,iBAAS;AAAA,QAC3C;AAAA,QACA,cAAc;AAAA,QACd,OAAO;AAAA,QACP,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC;AAAA;AAEL;AACO,IAAM,uBAAmB,2BAAW,2BAA2B;AACtE,IAAO,4BAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarContainer({\n label,\n ...props\n}, ref) {\n const toolbarStore = Ariakit.useToolbarStore({\n focusLoop: true,\n rtl: isRTL()\n });\n return (\n /*#__PURE__*/\n // This will provide state for `ToolbarButton`'s\n _jsx(ToolbarContext.Provider, {\n value: toolbarStore,\n children: /*#__PURE__*/_jsx(Ariakit.Toolbar, {\n ref: ref,\n \"aria-label\": label,\n store: toolbarStore,\n ...props\n })\n })\n );\n}\nexport const ToolbarContainer = forwardRef(UnforwardedToolbarContainer);\nToolbarContainer.displayName = 'ToolbarContainer';\nexport default ToolbarContainer;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAIzB,qBAA2B;AAC3B,kBAAsB;AAKtB,6BAA2B;AAC3B,yBAA4B;AAC5B,SAAS,4BAA4B;AAAA,EACnC;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,eAAuB,wBAAgB;AAAA,IAC3C,WAAW;AAAA,IACX,SAAK,mBAAM;AAAA,EACb,CAAC;AACD;AAAA;AAAA,IAGE,uCAAAA,KAAK,uBAAAC,QAAe,UAAU;AAAA,MAC5B,OAAO;AAAA,MACP,UAAuB,uCAAAD,KAAa,iBAAS;AAAA,QAC3C;AAAA,QACA,cAAc;AAAA,QACd,OAAO;AAAA,QACP,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC;AAAA;AAEL;AACO,IAAM,uBAAmB,2BAAW,2BAA2B;AACtE,iBAAiB,cAAc;AAC/B,IAAO,4BAAQ;",
|
|
6
6
|
"names": ["_jsx", "ToolbarContext"]
|
|
7
7
|
}
|
|
@@ -102,6 +102,7 @@ function UnforwardedToolbarButton(props, ref) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
var ToolbarButton = (0, import_element.forwardRef)(UnforwardedToolbarButton);
|
|
105
|
+
ToolbarButton.displayName = "ToolbarButton";
|
|
105
106
|
var toolbar_button_default = ToolbarButton;
|
|
106
107
|
// Annotate the CommonJS export names for ESM import in node:
|
|
107
108
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/toolbar-button/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useDeprecatedProps({\n isDisabled,\n ...otherProps\n}) {\n return {\n disabled: isDisabled,\n ...otherProps\n };\n}\nfunction UnforwardedToolbarButton(props, ref) {\n const {\n children,\n className,\n containerClassName,\n extraProps,\n isActive,\n title,\n ...restProps\n } = useDeprecatedProps(props);\n const accessibleToolbarState = useContext(ToolbarContext);\n if (!accessibleToolbarState) {\n return /*#__PURE__*/_jsx(ToolbarButtonContainer, {\n className: containerClassName,\n children: /*#__PURE__*/_jsx(Button, {\n ref: ref,\n icon: restProps.icon,\n size: \"compact\",\n label: title,\n shortcut: restProps.shortcut,\n \"data-subscript\": restProps.subscript,\n onClick: event => {\n event.stopPropagation();\n // TODO: Possible bug; maybe use onClick instead of restProps.onClick.\n if (restProps.onClick) {\n restProps.onClick(event);\n }\n },\n className: clsx('components-toolbar__control', className),\n isPressed: isActive,\n accessibleWhenDisabled: true,\n \"data-toolbar-item\": true,\n ...extraProps,\n ...restProps,\n children: children\n })\n });\n }\n\n // ToobarItem will pass all props to the render prop child, which will pass\n // all props to Button. This means that ToolbarButton has the same API as\n // Button.\n return /*#__PURE__*/_jsx(ToolbarItem, {\n className: clsx('components-toolbar-button', className),\n ...extraProps,\n ...restProps,\n ref: ref,\n children: toolbarItemProps => /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n label: title,\n isPressed: isActive,\n ...toolbarItemProps,\n children: children\n })\n });\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { pencil } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ pencil }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef(UnforwardedToolbarButton);\nexport default ToolbarButton;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAuC;AAKvC,oBAAmB;AACnB,0BAAwB;AACxB,6BAA2B;AAC3B,sCAAmC;AACnC,yBAA4B;AAC5B,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,UAAU;AAAA,IACV,GAAG;AAAA,EACL;AACF;AACA,SAAS,yBAAyB,OAAO,KAAK;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI,mBAAmB,KAAK;AAC5B,QAAM,6BAAyB,2BAAW,uBAAAA,OAAc;AACxD,MAAI,CAAC,wBAAwB;AAC3B,WAAoB,uCAAAC,KAAK,gCAAAC,SAAwB;AAAA,MAC/C,WAAW;AAAA,MACX,UAAuB,uCAAAD,KAAK,cAAAE,SAAQ;AAAA,QAClC;AAAA,QACA,MAAM,UAAU;AAAA,QAChB,MAAM;AAAA,QACN,OAAO;AAAA,QACP,UAAU,UAAU;AAAA,QACpB,kBAAkB,UAAU;AAAA,QAC5B,SAAS,WAAS;AAChB,gBAAM,gBAAgB;AAEtB,cAAI,UAAU,SAAS;AACrB,sBAAU,QAAQ,KAAK;AAAA,UACzB;AAAA,QACF;AAAA,QACA,eAAW,YAAAC,SAAK,+BAA+B,SAAS;AAAA,QACxD,WAAW;AAAA,QACX,wBAAwB;AAAA,QACxB,qBAAqB;AAAA,QACrB,GAAG;AAAA,QACH,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAKA,SAAoB,uCAAAH,KAAK,oBAAAI,SAAa;AAAA,IACpC,eAAW,YAAAD,SAAK,6BAA6B,SAAS;AAAA,IACtD,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA,UAAU,sBAAiC,uCAAAH,KAAK,cAAAE,SAAQ;AAAA,MACtD,MAAM;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction useDeprecatedProps({\n isDisabled,\n ...otherProps\n}) {\n return {\n disabled: isDisabled,\n ...otherProps\n };\n}\nfunction UnforwardedToolbarButton(props, ref) {\n const {\n children,\n className,\n containerClassName,\n extraProps,\n isActive,\n title,\n ...restProps\n } = useDeprecatedProps(props);\n const accessibleToolbarState = useContext(ToolbarContext);\n if (!accessibleToolbarState) {\n return /*#__PURE__*/_jsx(ToolbarButtonContainer, {\n className: containerClassName,\n children: /*#__PURE__*/_jsx(Button, {\n ref: ref,\n icon: restProps.icon,\n size: \"compact\",\n label: title,\n shortcut: restProps.shortcut,\n \"data-subscript\": restProps.subscript,\n onClick: event => {\n event.stopPropagation();\n // TODO: Possible bug; maybe use onClick instead of restProps.onClick.\n if (restProps.onClick) {\n restProps.onClick(event);\n }\n },\n className: clsx('components-toolbar__control', className),\n isPressed: isActive,\n accessibleWhenDisabled: true,\n \"data-toolbar-item\": true,\n ...extraProps,\n ...restProps,\n children: children\n })\n });\n }\n\n // ToobarItem will pass all props to the render prop child, which will pass\n // all props to Button. This means that ToolbarButton has the same API as\n // Button.\n return /*#__PURE__*/_jsx(ToolbarItem, {\n className: clsx('components-toolbar-button', className),\n ...extraProps,\n ...restProps,\n ref: ref,\n children: toolbarItemProps => /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n label: title,\n isPressed: isActive,\n ...toolbarItemProps,\n children: children\n })\n });\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { pencil } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ pencil }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef(UnforwardedToolbarButton);\nToolbarButton.displayName = 'ToolbarButton';\nexport default ToolbarButton;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAAuC;AAKvC,oBAAmB;AACnB,0BAAwB;AACxB,6BAA2B;AAC3B,sCAAmC;AACnC,yBAA4B;AAC5B,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA,GAAG;AACL,GAAG;AACD,SAAO;AAAA,IACL,UAAU;AAAA,IACV,GAAG;AAAA,EACL;AACF;AACA,SAAS,yBAAyB,OAAO,KAAK;AAC5C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI,mBAAmB,KAAK;AAC5B,QAAM,6BAAyB,2BAAW,uBAAAA,OAAc;AACxD,MAAI,CAAC,wBAAwB;AAC3B,WAAoB,uCAAAC,KAAK,gCAAAC,SAAwB;AAAA,MAC/C,WAAW;AAAA,MACX,UAAuB,uCAAAD,KAAK,cAAAE,SAAQ;AAAA,QAClC;AAAA,QACA,MAAM,UAAU;AAAA,QAChB,MAAM;AAAA,QACN,OAAO;AAAA,QACP,UAAU,UAAU;AAAA,QACpB,kBAAkB,UAAU;AAAA,QAC5B,SAAS,WAAS;AAChB,gBAAM,gBAAgB;AAEtB,cAAI,UAAU,SAAS;AACrB,sBAAU,QAAQ,KAAK;AAAA,UACzB;AAAA,QACF;AAAA,QACA,eAAW,YAAAC,SAAK,+BAA+B,SAAS;AAAA,QACxD,WAAW;AAAA,QACX,wBAAwB;AAAA,QACxB,qBAAqB;AAAA,QACrB,GAAG;AAAA,QACH,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AAKA,SAAoB,uCAAAH,KAAK,oBAAAI,SAAa;AAAA,IACpC,eAAW,YAAAD,SAAK,6BAA6B,SAAS;AAAA,IACtD,GAAG;AAAA,IACH,GAAG;AAAA,IACH;AAAA,IACA,UAAU,sBAAiC,uCAAAH,KAAK,cAAAE,SAAQ;AAAA,MACtD,MAAM;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
|
|
6
6
|
"names": ["ToolbarContext", "_jsx", "ToolbarButtonContainer", "Button", "clsx", "ToolbarItem"]
|
|
7
7
|
}
|
|
@@ -59,6 +59,7 @@ function UnforwardedToolbarDropdownMenu(props, ref) {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
var ToolbarDropdownMenu = (0, import_element.forwardRef)(UnforwardedToolbarDropdownMenu);
|
|
62
|
+
ToolbarDropdownMenu.displayName = "ToolbarDropdownMenu";
|
|
62
63
|
var toolbar_dropdown_menu_default = ToolbarDropdownMenu;
|
|
63
64
|
// Annotate the CommonJS export names for ESM import in node:
|
|
64
65
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/toolbar-dropdown-menu/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarDropdownMenu(props, ref) {\n const accessibleToolbarState = useContext(ToolbarContext);\n if (!accessibleToolbarState) {\n return /*#__PURE__*/_jsx(DropdownMenu, {\n ...props\n });\n }\n\n // ToolbarItem will pass all props to the render prop child, which will pass\n // all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n // has the same API as DropdownMenu.\n return /*#__PURE__*/_jsx(ToolbarItem, {\n ref: ref,\n ...props.toggleProps,\n children: toolbarItemProps => /*#__PURE__*/_jsx(DropdownMenu, {\n ...props,\n popoverProps: {\n ...props.popoverProps\n },\n toggleProps: toolbarItemProps\n })\n });\n}\nexport const ToolbarDropdownMenu = forwardRef(UnforwardedToolbarDropdownMenu);\nexport default ToolbarDropdownMenu;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAuC;AASvC,0BAAwB;AACxB,6BAA2B;AAC3B,2BAAyB;AACzB,yBAA4B;AAC5B,SAAS,+BAA+B,OAAO,KAAK;AAClD,QAAM,6BAAyB,2BAAW,uBAAAA,OAAc;AACxD,MAAI,CAAC,wBAAwB;AAC3B,WAAoB,uCAAAC,KAAK,qBAAAC,SAAc;AAAA,MACrC,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAKA,SAAoB,uCAAAD,KAAK,oBAAAE,SAAa;AAAA,IACpC;AAAA,IACA,GAAG,MAAM;AAAA,IACT,UAAU,sBAAiC,uCAAAF,KAAK,qBAAAC,SAAc;AAAA,MAC5D,GAAG;AAAA,MACH,cAAc;AAAA,QACZ,GAAG,MAAM;AAAA,MACX;AAAA,MACA,aAAa;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,0BAAsB,2BAAW,8BAA8B;AAC5E,IAAO,gCAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * External dependencies\n */\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarDropdownMenu(props, ref) {\n const accessibleToolbarState = useContext(ToolbarContext);\n if (!accessibleToolbarState) {\n return /*#__PURE__*/_jsx(DropdownMenu, {\n ...props\n });\n }\n\n // ToolbarItem will pass all props to the render prop child, which will pass\n // all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n // has the same API as DropdownMenu.\n return /*#__PURE__*/_jsx(ToolbarItem, {\n ref: ref,\n ...props.toggleProps,\n children: toolbarItemProps => /*#__PURE__*/_jsx(DropdownMenu, {\n ...props,\n popoverProps: {\n ...props.popoverProps\n },\n toggleProps: toolbarItemProps\n })\n });\n}\nexport const ToolbarDropdownMenu = forwardRef(UnforwardedToolbarDropdownMenu);\nToolbarDropdownMenu.displayName = 'ToolbarDropdownMenu';\nexport default ToolbarDropdownMenu;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAuC;AASvC,0BAAwB;AACxB,6BAA2B;AAC3B,2BAAyB;AACzB,yBAA4B;AAC5B,SAAS,+BAA+B,OAAO,KAAK;AAClD,QAAM,6BAAyB,2BAAW,uBAAAA,OAAc;AACxD,MAAI,CAAC,wBAAwB;AAC3B,WAAoB,uCAAAC,KAAK,qBAAAC,SAAc;AAAA,MACrC,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAKA,SAAoB,uCAAAD,KAAK,oBAAAE,SAAa;AAAA,IACpC;AAAA,IACA,GAAG,MAAM;AAAA,IACT,UAAU,sBAAiC,uCAAAF,KAAK,qBAAAC,SAAc;AAAA,MAC5D,GAAG;AAAA,MACH,cAAc;AAAA,QACZ,GAAG,MAAM;AAAA,MACX;AAAA,MACA,aAAa;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,0BAAsB,2BAAW,8BAA8B;AAC5E,oBAAoB,cAAc;AAClC,IAAO,gCAAQ;",
|
|
6
6
|
"names": ["ToolbarContext", "_jsx", "DropdownMenu", "ToolbarItem"]
|
|
7
7
|
}
|
|
@@ -78,6 +78,7 @@ function UnforwardedToolbarItem({
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
var ToolbarItem2 = (0, import_element.forwardRef)(UnforwardedToolbarItem);
|
|
81
|
+
ToolbarItem2.displayName = "ToolbarItem";
|
|
81
82
|
var toolbar_item_default = ToolbarItem2;
|
|
82
83
|
// Annotate the CommonJS export names for ESM import in node:
|
|
83
84
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toolbar/toolbar-item/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarItem({\n children,\n as: Component,\n ...props\n}, ref) {\n const accessibleToolbarStore = useContext(ToolbarContext);\n const isRenderProp = typeof children === 'function';\n if (!isRenderProp && !Component) {\n globalThis.SCRIPT_DEBUG === true ? warning('`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' + 'See https://developer.wordpress.org/block-editor/components/toolbar-item/') : void 0;\n return null;\n }\n const allProps = {\n ...props,\n ref,\n 'data-toolbar-item': true\n };\n if (!accessibleToolbarStore) {\n if (Component) {\n return /*#__PURE__*/_jsx(Component, {\n ...allProps,\n children: children\n });\n }\n if (!isRenderProp) {\n return null;\n }\n return children(allProps);\n }\n const render = isRenderProp ? children : Component && /*#__PURE__*/_jsx(Component, {\n children: children\n });\n return /*#__PURE__*/_jsx(Ariakit.ToolbarItem, {\n accessibleWhenDisabled: true,\n ...allProps,\n store: accessibleToolbarStore,\n render: render\n });\n}\nexport const ToolbarItem = forwardRef(UnforwardedToolbarItem);\nexport default ToolbarItem;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAIzB,qBAAuC;AACvC,qBAAoB;AAKpB,6BAA2B;AAC3B,yBAA4B;AAC5B,SAAS,uBAAuB;AAAA,EAC9B;AAAA,EACA,IAAI;AAAA,EACJ,GAAG;AACL,GAAG,KAAK;AACN,QAAM,6BAAyB,2BAAW,uBAAAC,OAAc;AACxD,QAAM,eAAe,OAAO,aAAa;AACzC,MAAI,CAAC,gBAAgB,CAAC,WAAW;AAC/B,eAAW,iBAAiB,WAAO,eAAAC,SAAQ,+MAAoN,IAAI;AACnQ,WAAO;AAAA,EACT;AACA,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH;AAAA,IACA,qBAAqB;AAAA,EACvB;AACA,MAAI,CAAC,wBAAwB;AAC3B,QAAI,WAAW;AACb,aAAoB,uCAAAC,KAAK,WAAW;AAAA,QAClC,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AACA,QAAI,CAAC,cAAc;AACjB,aAAO;AAAA,IACT;AACA,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,QAAM,SAAS,eAAe,WAAW,aAA0B,uCAAAA,KAAK,WAAW;AAAA,IACjF;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAA,KAAa,qBAAa;AAAA,IAC5C,wBAAwB;AAAA,IACxB,GAAG;AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAMH,mBAAc,2BAAW,sBAAsB;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToolbarItem({\n children,\n as: Component,\n ...props\n}, ref) {\n const accessibleToolbarStore = useContext(ToolbarContext);\n const isRenderProp = typeof children === 'function';\n if (!isRenderProp && !Component) {\n globalThis.SCRIPT_DEBUG === true ? warning('`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' + 'See https://developer.wordpress.org/block-editor/components/toolbar-item/') : void 0;\n return null;\n }\n const allProps = {\n ...props,\n ref,\n 'data-toolbar-item': true\n };\n if (!accessibleToolbarStore) {\n if (Component) {\n return /*#__PURE__*/_jsx(Component, {\n ...allProps,\n children: children\n });\n }\n if (!isRenderProp) {\n return null;\n }\n return children(allProps);\n }\n const render = isRenderProp ? children : Component && /*#__PURE__*/_jsx(Component, {\n children: children\n });\n return /*#__PURE__*/_jsx(Ariakit.ToolbarItem, {\n accessibleWhenDisabled: true,\n ...allProps,\n store: accessibleToolbarStore,\n render: render\n });\n}\nexport const ToolbarItem = forwardRef(UnforwardedToolbarItem);\nToolbarItem.displayName = 'ToolbarItem';\nexport default ToolbarItem;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AAIzB,qBAAuC;AACvC,qBAAoB;AAKpB,6BAA2B;AAC3B,yBAA4B;AAC5B,SAAS,uBAAuB;AAAA,EAC9B;AAAA,EACA,IAAI;AAAA,EACJ,GAAG;AACL,GAAG,KAAK;AACN,QAAM,6BAAyB,2BAAW,uBAAAC,OAAc;AACxD,QAAM,eAAe,OAAO,aAAa;AACzC,MAAI,CAAC,gBAAgB,CAAC,WAAW;AAC/B,eAAW,iBAAiB,WAAO,eAAAC,SAAQ,+MAAoN,IAAI;AACnQ,WAAO;AAAA,EACT;AACA,QAAM,WAAW;AAAA,IACf,GAAG;AAAA,IACH;AAAA,IACA,qBAAqB;AAAA,EACvB;AACA,MAAI,CAAC,wBAAwB;AAC3B,QAAI,WAAW;AACb,aAAoB,uCAAAC,KAAK,WAAW;AAAA,QAClC,GAAG;AAAA,QACH;AAAA,MACF,CAAC;AAAA,IACH;AACA,QAAI,CAAC,cAAc;AACjB,aAAO;AAAA,IACT;AACA,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,QAAM,SAAS,eAAe,WAAW,aAA0B,uCAAAA,KAAK,WAAW;AAAA,IACjF;AAAA,EACF,CAAC;AACD,SAAoB,uCAAAA,KAAa,qBAAa;AAAA,IAC5C,wBAAwB;AAAA,IACxB,GAAG;AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACO,IAAMH,mBAAc,2BAAW,sBAAsB;AAC5DA,aAAY,cAAc;AAC1B,IAAO,uBAAQA;",
|
|
6
6
|
"names": ["ToolbarItem", "ToolbarContext", "warning", "_jsx"]
|
|
7
7
|
}
|
package/build/tooltip/index.cjs
CHANGED
|
@@ -125,6 +125,7 @@ function UnforwardedTooltip(props, ref) {
|
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
var Tooltip2 = (0, import_element.forwardRef)(UnforwardedTooltip);
|
|
128
|
+
Tooltip2.displayName = "Tooltip";
|
|
128
129
|
var tooltip_default = Tooltip2;
|
|
129
130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
130
131
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tooltip/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { Children, useContext, createContext, forwardRef, cloneElement } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\n\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst TooltipInternalContext = createContext({\n isNestedInTooltip: false\n});\nTooltipInternalContext.displayName = 'TooltipInternalContext';\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\nconst CONTEXT_VALUE = {\n isNestedInTooltip: true\n};\nfunction UnforwardedTooltip(props, ref) {\n const {\n children,\n className,\n delay = TOOLTIP_DELAY,\n hideOnClick = true,\n placement,\n position,\n shortcut,\n text,\n ...restProps\n } = props;\n const {\n isNestedInTooltip\n } = useContext(TooltipInternalContext);\n const baseId = useInstanceId(Tooltip, 'tooltip');\n const describedById = text || shortcut ? baseId : undefined;\n const isOnlyChild = Children.count(children) === 1;\n // console error if more than one child element is added\n if (!isOnlyChild) {\n if ('development' === process.env.NODE_ENV) {\n // eslint-disable-next-line no-console\n console.error('wp-components.Tooltip should be called with only a single child element.');\n }\n }\n\n // Compute tooltip's placement:\n // - give priority to `placement` prop, if defined\n // - otherwise, compute it from the legacy `position` prop (if defined)\n // - finally, fallback to the default placement: 'bottom'\n let computedPlacement;\n if (placement !== undefined) {\n computedPlacement = placement;\n } else if (position !== undefined) {\n computedPlacement = positionToPlacement(position);\n deprecated('`position` prop in wp.components.tooltip', {\n since: '6.4',\n alternative: '`placement` prop'\n });\n }\n computedPlacement = computedPlacement || 'bottom';\n const tooltipStore = Ariakit.useTooltipStore({\n placement: computedPlacement,\n showTimeout: delay\n });\n const mounted = Ariakit.useStoreState(tooltipStore, 'mounted');\n if (isNestedInTooltip) {\n return isOnlyChild ? /*#__PURE__*/_jsx(Ariakit.Role, {\n ...restProps,\n render: children\n }) : children;\n }\n\n // TODO: this is a temporary workaround to minimize the effects of the\n // Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n // the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n // The `aria-describedby` attribute is added only if the anchor doesn't have\n // one already, and if the tooltip text is not the same as the anchor's\n // `aria-label`\n // See: https://github.com/WordPress/gutenberg/pull/64066\n // See: https://github.com/WordPress/gutenberg/pull/65989\n function addDescribedById(element) {\n return describedById && mounted && element.props['aria-describedby'] === undefined && element.props['aria-label'] !== text ? cloneElement(element, {\n 'aria-describedby': describedById\n }) : element;\n }\n return /*#__PURE__*/_jsxs(TooltipInternalContext.Provider, {\n value: CONTEXT_VALUE,\n children: [/*#__PURE__*/_jsx(Ariakit.TooltipAnchor, {\n onClick: hideOnClick ? tooltipStore.hide : undefined,\n store: tooltipStore,\n render: isOnlyChild ? addDescribedById(children) : undefined,\n ref: ref,\n children: isOnlyChild ? undefined : children\n }), isOnlyChild && (text || shortcut) && /*#__PURE__*/_jsxs(Ariakit.Tooltip, {\n ...restProps,\n className: clsx('components-tooltip', className),\n unmountOnHide: true,\n gutter: 4,\n id: describedById,\n overflowPadding: 0.5,\n store: tooltipStore,\n children: [text, shortcut && /*#__PURE__*/_jsx(Shortcut, {\n className: text ? 'components-tooltip__shortcut' : '',\n shortcut: shortcut\n })]\n })]\n });\n}\nexport const Tooltip = forwardRef(UnforwardedTooltip);\nexport default Tooltip;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AACzB,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA8E;AAC9E,wBAAuB;AAMvB,sBAAqB;AACrB,mBAAoC;AACpC,yBAA2C;AAC3C,IAAM,6BAAyB,8BAAc;AAAA,EAC3C,mBAAmB;AACrB,CAAC;AACD,uBAAuB,cAAc;AAK9B,IAAM,gBAAgB;AAC7B,IAAM,gBAAgB;AAAA,EACpB,mBAAmB;AACrB;AACA,SAAS,mBAAmB,OAAO,KAAK;AACtC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,EACF,QAAI,2BAAW,sBAAsB;AACrC,QAAM,aAAS,8BAAcA,UAAS,SAAS;AAC/C,QAAM,gBAAgB,QAAQ,WAAW,SAAS;AAClD,QAAM,cAAc,wBAAS,MAAM,QAAQ,MAAM;AAEjD,MAAI,CAAC,aAAa;AAChB,QAAI,kBAAkB,QAAQ,IAAI,UAAU;AAE1C,cAAQ,MAAM,0EAA0E;AAAA,IAC1F;AAAA,EACF;AAMA,MAAI;AACJ,MAAI,cAAc,QAAW;AAC3B,wBAAoB;AAAA,EACtB,WAAW,aAAa,QAAW;AACjC,4BAAoB,kCAAoB,QAAQ;AAChD,0BAAAC,SAAW,4CAA4C;AAAA,MACrD,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,sBAAoB,qBAAqB;AACzC,QAAM,eAAuB,wBAAgB;AAAA,IAC3C,WAAW;AAAA,IACX,aAAa;AAAA,EACf,CAAC;AACD,QAAM,UAAkB,sBAAc,cAAc,SAAS;AAC7D,MAAI,mBAAmB;AACrB,WAAO,cAA2B,uCAAAC,KAAa,cAAM;AAAA,MACnD,GAAG;AAAA,MACH,QAAQ;AAAA,IACV,CAAC,IAAI;AAAA,EACP;AAUA,WAAS,iBAAiB,SAAS;AACjC,WAAO,iBAAiB,WAAW,QAAQ,MAAM,kBAAkB,MAAM,UAAa,QAAQ,MAAM,YAAY,MAAM,WAAO,6BAAa,SAAS;AAAA,MACjJ,oBAAoB;AAAA,IACtB,CAAC,IAAI;AAAA,EACP;AACA,SAAoB,uCAAAC,MAAM,uBAAuB,UAAU;AAAA,IACzD,OAAO;AAAA,IACP,UAAU,CAAc,uCAAAD,KAAa,uBAAe;AAAA,MAClD,SAAS,cAAc,aAAa,OAAO;AAAA,MAC3C,OAAO;AAAA,MACP,QAAQ,cAAc,iBAAiB,QAAQ,IAAI;AAAA,MACnD;AAAA,MACA,UAAU,cAAc,SAAY;AAAA,IACtC,CAAC,GAAG,gBAAgB,QAAQ,aAA0B,uCAAAC,MAAc,iBAAS;AAAA,MAC3E,GAAG;AAAA,MACH,eAAW,YAAAC,SAAK,sBAAsB,SAAS;AAAA,MAC/C,eAAe;AAAA,MACf,QAAQ;AAAA,MACR,IAAI;AAAA,MACJ,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,UAAU,CAAC,MAAM,YAAyB,uCAAAF,KAAK,gBAAAG,SAAU;AAAA,QACvD,WAAW,OAAO,iCAAiC;AAAA,QACnD;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAML,eAAU,2BAAW,kBAAkB;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { Children, useContext, createContext, forwardRef, cloneElement } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\n\nimport Shortcut from '../shortcut';\nimport { positionToPlacement } from '../popover/utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst TooltipInternalContext = createContext({\n isNestedInTooltip: false\n});\nTooltipInternalContext.displayName = 'TooltipInternalContext';\n\n/**\n * Time over anchor to wait before showing tooltip\n */\nexport const TOOLTIP_DELAY = 700;\nconst CONTEXT_VALUE = {\n isNestedInTooltip: true\n};\nfunction UnforwardedTooltip(props, ref) {\n const {\n children,\n className,\n delay = TOOLTIP_DELAY,\n hideOnClick = true,\n placement,\n position,\n shortcut,\n text,\n ...restProps\n } = props;\n const {\n isNestedInTooltip\n } = useContext(TooltipInternalContext);\n const baseId = useInstanceId(Tooltip, 'tooltip');\n const describedById = text || shortcut ? baseId : undefined;\n const isOnlyChild = Children.count(children) === 1;\n // console error if more than one child element is added\n if (!isOnlyChild) {\n if ('development' === process.env.NODE_ENV) {\n // eslint-disable-next-line no-console\n console.error('wp-components.Tooltip should be called with only a single child element.');\n }\n }\n\n // Compute tooltip's placement:\n // - give priority to `placement` prop, if defined\n // - otherwise, compute it from the legacy `position` prop (if defined)\n // - finally, fallback to the default placement: 'bottom'\n let computedPlacement;\n if (placement !== undefined) {\n computedPlacement = placement;\n } else if (position !== undefined) {\n computedPlacement = positionToPlacement(position);\n deprecated('`position` prop in wp.components.tooltip', {\n since: '6.4',\n alternative: '`placement` prop'\n });\n }\n computedPlacement = computedPlacement || 'bottom';\n const tooltipStore = Ariakit.useTooltipStore({\n placement: computedPlacement,\n showTimeout: delay\n });\n const mounted = Ariakit.useStoreState(tooltipStore, 'mounted');\n if (isNestedInTooltip) {\n return isOnlyChild ? /*#__PURE__*/_jsx(Ariakit.Role, {\n ...restProps,\n render: children\n }) : children;\n }\n\n // TODO: this is a temporary workaround to minimize the effects of the\n // Ariakit upgrade. Ariakit doesn't pass the `aria-describedby` prop to\n // the tooltip anchor anymore since 0.4.0, so we need to add it manually.\n // The `aria-describedby` attribute is added only if the anchor doesn't have\n // one already, and if the tooltip text is not the same as the anchor's\n // `aria-label`\n // See: https://github.com/WordPress/gutenberg/pull/64066\n // See: https://github.com/WordPress/gutenberg/pull/65989\n function addDescribedById(element) {\n return describedById && mounted && element.props['aria-describedby'] === undefined && element.props['aria-label'] !== text ? cloneElement(element, {\n 'aria-describedby': describedById\n }) : element;\n }\n return /*#__PURE__*/_jsxs(TooltipInternalContext.Provider, {\n value: CONTEXT_VALUE,\n children: [/*#__PURE__*/_jsx(Ariakit.TooltipAnchor, {\n onClick: hideOnClick ? tooltipStore.hide : undefined,\n store: tooltipStore,\n render: isOnlyChild ? addDescribedById(children) : undefined,\n ref: ref,\n children: isOnlyChild ? undefined : children\n }), isOnlyChild && (text || shortcut) && /*#__PURE__*/_jsxs(Ariakit.Tooltip, {\n ...restProps,\n className: clsx('components-tooltip', className),\n unmountOnHide: true,\n gutter: 4,\n id: describedById,\n overflowPadding: 0.5,\n store: tooltipStore,\n children: [text, shortcut && /*#__PURE__*/_jsx(Shortcut, {\n className: text ? 'components-tooltip__shortcut' : '',\n shortcut: shortcut\n })]\n })]\n });\n}\nexport const Tooltip = forwardRef(UnforwardedTooltip);\nTooltip.displayName = 'Tooltip';\nexport default Tooltip;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA,EAAA;AAAA;AAAA;AAGA,cAAyB;AACzB,kBAAiB;AAKjB,qBAA8B;AAC9B,qBAA8E;AAC9E,wBAAuB;AAMvB,sBAAqB;AACrB,mBAAoC;AACpC,yBAA2C;AAC3C,IAAM,6BAAyB,8BAAc;AAAA,EAC3C,mBAAmB;AACrB,CAAC;AACD,uBAAuB,cAAc;AAK9B,IAAM,gBAAgB;AAC7B,IAAM,gBAAgB;AAAA,EACpB,mBAAmB;AACrB;AACA,SAAS,mBAAmB,OAAO,KAAK;AACtC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,EACF,QAAI,2BAAW,sBAAsB;AACrC,QAAM,aAAS,8BAAcA,UAAS,SAAS;AAC/C,QAAM,gBAAgB,QAAQ,WAAW,SAAS;AAClD,QAAM,cAAc,wBAAS,MAAM,QAAQ,MAAM;AAEjD,MAAI,CAAC,aAAa;AAChB,QAAI,kBAAkB,QAAQ,IAAI,UAAU;AAE1C,cAAQ,MAAM,0EAA0E;AAAA,IAC1F;AAAA,EACF;AAMA,MAAI;AACJ,MAAI,cAAc,QAAW;AAC3B,wBAAoB;AAAA,EACtB,WAAW,aAAa,QAAW;AACjC,4BAAoB,kCAAoB,QAAQ;AAChD,0BAAAC,SAAW,4CAA4C;AAAA,MACrD,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,sBAAoB,qBAAqB;AACzC,QAAM,eAAuB,wBAAgB;AAAA,IAC3C,WAAW;AAAA,IACX,aAAa;AAAA,EACf,CAAC;AACD,QAAM,UAAkB,sBAAc,cAAc,SAAS;AAC7D,MAAI,mBAAmB;AACrB,WAAO,cAA2B,uCAAAC,KAAa,cAAM;AAAA,MACnD,GAAG;AAAA,MACH,QAAQ;AAAA,IACV,CAAC,IAAI;AAAA,EACP;AAUA,WAAS,iBAAiB,SAAS;AACjC,WAAO,iBAAiB,WAAW,QAAQ,MAAM,kBAAkB,MAAM,UAAa,QAAQ,MAAM,YAAY,MAAM,WAAO,6BAAa,SAAS;AAAA,MACjJ,oBAAoB;AAAA,IACtB,CAAC,IAAI;AAAA,EACP;AACA,SAAoB,uCAAAC,MAAM,uBAAuB,UAAU;AAAA,IACzD,OAAO;AAAA,IACP,UAAU,CAAc,uCAAAD,KAAa,uBAAe;AAAA,MAClD,SAAS,cAAc,aAAa,OAAO;AAAA,MAC3C,OAAO;AAAA,MACP,QAAQ,cAAc,iBAAiB,QAAQ,IAAI;AAAA,MACnD;AAAA,MACA,UAAU,cAAc,SAAY;AAAA,IACtC,CAAC,GAAG,gBAAgB,QAAQ,aAA0B,uCAAAC,MAAc,iBAAS;AAAA,MAC3E,GAAG;AAAA,MACH,eAAW,YAAAC,SAAK,sBAAsB,SAAS;AAAA,MAC/C,eAAe;AAAA,MACf,QAAQ;AAAA,MACR,IAAI;AAAA,MACJ,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,UAAU,CAAC,MAAM,YAAyB,uCAAAF,KAAK,gBAAAG,SAAU;AAAA,QACvD,WAAW,OAAO,iCAAiC;AAAA,QACnD;AAAA,MACF,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAML,eAAU,2BAAW,kBAAkB;AACpDA,SAAQ,cAAc;AACtB,IAAO,kBAAQA;",
|
|
6
6
|
"names": ["Tooltip", "deprecated", "_jsx", "_jsxs", "clsx", "Shortcut"]
|
|
7
7
|
}
|
package/build/tree-grid/cell.cjs
CHANGED
|
@@ -57,6 +57,7 @@ function UnforwardedTreeGridCell({
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
var TreeGridCell = (0, import_element.forwardRef)(UnforwardedTreeGridCell);
|
|
60
|
+
TreeGridCell.displayName = "TreeGridCell";
|
|
60
61
|
var cell_default = TreeGridCell;
|
|
61
62
|
// Annotate the CommonJS export names for ESM import in node:
|
|
62
63
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-grid/cell.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TreeGridItem from './item';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridCell({\n children,\n withoutGridItem = false,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(\"td\", {\n ...props,\n role: \"gridcell\",\n children: withoutGridItem ? /*#__PURE__*/_jsx(_Fragment, {\n children: typeof children === 'function' ? children({\n ...props,\n ref\n }) : children\n }) : /*#__PURE__*/_jsx(TreeGridItem, {\n ref: ref,\n children: children\n })\n });\n}\n\n/**\n * `TreeGridCell` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridCell = forwardRef(UnforwardedTreeGridCell);\nexport default TreeGridCell;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,kBAAyB;AACzB,yBAAmD;AACnD,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,kBAAkB;AAAA,EAClB,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH,MAAM;AAAA,IACN,UAAU,kBAA+B,uCAAAA,KAAK,mBAAAC,UAAW;AAAA,MACvD,UAAU,OAAO,aAAa,aAAa,SAAS;AAAA,QAClD,GAAG;AAAA,QACH;AAAA,MACF,CAAC,IAAI;AAAA,IACP,CAAC,IAAiB,uCAAAD,KAAK,YAAAE,SAAc;AAAA,MACnC;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AASO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport TreeGridItem from './item';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridCell({\n children,\n withoutGridItem = false,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(\"td\", {\n ...props,\n role: \"gridcell\",\n children: withoutGridItem ? /*#__PURE__*/_jsx(_Fragment, {\n children: typeof children === 'function' ? children({\n ...props,\n ref\n }) : children\n }) : /*#__PURE__*/_jsx(TreeGridItem, {\n ref: ref,\n children: children\n })\n });\n}\n\n/**\n * `TreeGridCell` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridCell = forwardRef(UnforwardedTreeGridCell);\nTreeGridCell.displayName = 'TreeGridCell';\nexport default TreeGridCell;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,kBAAyB;AACzB,yBAAmD;AACnD,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,kBAAkB;AAAA,EAClB,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH,MAAM;AAAA,IACN,UAAU,kBAA+B,uCAAAA,KAAK,mBAAAC,UAAW;AAAA,MACvD,UAAU,OAAO,aAAa,aAAa,SAAS;AAAA,QAClD,GAAG;AAAA,QACH;AAAA,MACF,CAAC,IAAI;AAAA,IACP,CAAC,IAAiB,uCAAAD,KAAK,YAAAE,SAAc;AAAA,MACnC;AAAA,MACA;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AASO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,eAAQ;",
|
|
6
6
|
"names": ["_jsx", "_Fragment", "TreeGridItem"]
|
|
7
7
|
}
|
|
@@ -203,6 +203,7 @@ function UnforwardedTreeGrid({
|
|
|
203
203
|
});
|
|
204
204
|
}
|
|
205
205
|
var TreeGrid = (0, import_element.forwardRef)(UnforwardedTreeGrid);
|
|
206
|
+
TreeGrid.displayName = "TreeGrid";
|
|
206
207
|
var tree_grid_default = TreeGrid;
|
|
207
208
|
// Annotate the CommonJS export names for ESM import in node:
|
|
208
209
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-grid/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param rowElement The DOM element representing the row.\n *\n * @return The array of focusables in the row.\n */\nfunction getRowFocusables(rowElement) {\n const focusablesInRow = focus.focusable.find(rowElement, {\n sequential: true\n });\n return focusablesInRow.filter(focusable => {\n return focusable.closest('[role=\"row\"]') === rowElement;\n });\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n */\nfunction UnforwardedTreeGrid({\n children,\n onExpandRow = () => {},\n onCollapseRow = () => {},\n onFocusRow = () => {},\n applicationAriaLabel,\n ...props\n}, /** A ref to the underlying DOM table element. */\nref) {\n const onKeyDown = useCallback(event => {\n const {\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n } = event;\n\n // The shift key is intentionally absent from the following list,\n // to enable shift + up/down to select items from the list.\n const hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n if (hasModifierKeyPressed || ![UP, DOWN, LEFT, RIGHT, HOME, END].includes(keyCode)) {\n return;\n }\n\n // The event will be handled, stop propagation.\n event.stopPropagation();\n const {\n activeElement\n } = document;\n const {\n currentTarget: treeGridElement\n } = event;\n if (!activeElement || !treeGridElement.contains(activeElement)) {\n return;\n }\n\n // Calculate the columnIndex of the active element.\n const activeRow = activeElement.closest('[role=\"row\"]');\n if (!activeRow) {\n return;\n }\n const focusablesInRow = getRowFocusables(activeRow);\n const currentColumnIndex = focusablesInRow.indexOf(activeElement);\n const canExpandCollapse = 0 === currentColumnIndex;\n const cannotFocusNextColumn = canExpandCollapse && (activeRow.getAttribute('data-expanded') === 'false' || activeRow.getAttribute('aria-expanded') === 'false') && keyCode === RIGHT;\n if ([LEFT, RIGHT].includes(keyCode)) {\n // Calculate to the next element.\n let nextIndex;\n if (keyCode === LEFT) {\n nextIndex = Math.max(0, currentColumnIndex - 1);\n } else {\n nextIndex = Math.min(currentColumnIndex + 1, focusablesInRow.length - 1);\n }\n\n // Focus is at the left most column.\n if (canExpandCollapse) {\n if (keyCode === LEFT) {\n var _activeRow$getAttribu;\n // Left:\n // If a row is focused, and it is expanded, collapses the current row.\n if (activeRow.getAttribute('data-expanded') === 'true' || activeRow.getAttribute('aria-expanded') === 'true') {\n onCollapseRow(activeRow);\n event.preventDefault();\n return;\n }\n // If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n const level = Math.max(parseInt((_activeRow$getAttribu = activeRow?.getAttribute('aria-level')) !== null && _activeRow$getAttribu !== void 0 ? _activeRow$getAttribu : '1', 10) - 1, 1);\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n let parentRow = activeRow;\n const currentRowIndex = rows.indexOf(activeRow);\n for (let i = currentRowIndex; i >= 0; i--) {\n const ariaLevel = rows[i].getAttribute('aria-level');\n if (ariaLevel !== null && parseInt(ariaLevel, 10) === level) {\n parentRow = rows[i];\n break;\n }\n }\n getRowFocusables(parentRow)?.[0]?.focus();\n }\n if (keyCode === RIGHT) {\n // Right:\n // If a row is focused, and it is collapsed, expands the current row.\n if (activeRow.getAttribute('data-expanded') === 'false' || activeRow.getAttribute('aria-expanded') === 'false') {\n onExpandRow(activeRow);\n event.preventDefault();\n return;\n }\n // If a row is focused, and it is expanded, focuses the next cell in the row.\n const focusableItems = getRowFocusables(activeRow);\n if (focusableItems.length > 0) {\n focusableItems[nextIndex]?.focus();\n }\n }\n // Prevent key use for anything else. For example, Voiceover\n // will start reading text on continued use of left/right arrow\n // keys.\n event.preventDefault();\n return;\n }\n\n // Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n if (cannotFocusNextColumn) {\n return;\n }\n focusablesInRow[nextIndex].focus();\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n } else if ([UP, DOWN].includes(keyCode)) {\n // Calculate the rowIndex of the next row.\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n const currentRowIndex = rows.indexOf(activeRow);\n let nextRowIndex;\n if (keyCode === UP) {\n nextRowIndex = Math.max(0, currentRowIndex - 1);\n } else {\n nextRowIndex = Math.min(currentRowIndex + 1, rows.length - 1);\n }\n\n // Focus is either at the top or bottom edge of the grid. Do nothing.\n if (nextRowIndex === currentRowIndex) {\n // Prevent key use for anything else. For example, Voiceover\n // will start navigating horizontally when reaching the vertical\n // bounds of a table.\n event.preventDefault();\n return;\n }\n\n // Get the focusables in the next row.\n const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);\n\n // If for some reason there are no focusables in the next row, do nothing.\n if (!focusablesInNextRow || !focusablesInNextRow.length) {\n // Prevent key use for anything else. For example, Voiceover\n // will still focus text when using arrow keys, while this\n // component should limit navigation to focusables.\n event.preventDefault();\n return;\n }\n\n // Try to focus the element in the next row that's at a similar column to the activeElement.\n const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);\n focusablesInNextRow[nextIndex].focus();\n\n // Let consumers know the row that was originally focused,\n // and the row that is now in focus.\n onFocusRow(event, activeRow, rows[nextRowIndex]);\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n } else if ([HOME, END].includes(keyCode)) {\n // Calculate the rowIndex of the next row.\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n const currentRowIndex = rows.indexOf(activeRow);\n let nextRowIndex;\n if (keyCode === HOME) {\n nextRowIndex = 0;\n } else {\n nextRowIndex = rows.length - 1;\n }\n\n // Focus is either at the top or bottom edge of the grid. Do nothing.\n if (nextRowIndex === currentRowIndex) {\n // Prevent key use for anything else. For example, Voiceover\n // will start navigating horizontally when reaching the vertical\n // bounds of a table.\n event.preventDefault();\n return;\n }\n\n // Get the focusables in the next row.\n const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);\n\n // If for some reason there are no focusables in the next row, do nothing.\n if (!focusablesInNextRow || !focusablesInNextRow.length) {\n // Prevent key use for anything else. For example, Voiceover\n // will still focus text when using arrow keys, while this\n // component should limit navigation to focusables.\n event.preventDefault();\n return;\n }\n\n // Try to focus the element in the next row that's at a similar column to the activeElement.\n const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);\n focusablesInNextRow[nextIndex].focus();\n\n // Let consumers know the row that was originally focused,\n // and the row that is now in focus.\n onFocusRow(event, activeRow, rows[nextRowIndex]);\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n }\n }, [onExpandRow, onCollapseRow, onFocusRow]);\n\n /* Disable reason: A treegrid is implemented using a table element. */\n /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n return /*#__PURE__*/_jsx(RovingTabIndexContainer, {\n children: /*#__PURE__*/_jsx(\"div\", {\n role: \"application\",\n \"aria-label\": applicationAriaLabel,\n children: /*#__PURE__*/_jsx(\"table\", {\n ...props,\n role: \"treegrid\",\n onKeyDown: onKeyDown,\n ref: ref,\n children: /*#__PURE__*/_jsx(\"tbody\", {\n children: children\n })\n })\n })\n });\n /* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\n/**\n * `TreeGrid` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * A tree grid is a hierarchical 2 dimensional UI component, for example it could be\n * used to implement a file system browser.\n *\n * A tree grid allows the user to navigate using arrow keys.\n * Up/down to navigate vertically across rows, and left/right to navigate horizontally\n * between focusables in a row.\n *\n * The `TreeGrid` renders both a `table` and `tbody` element, and is intended to be used\n * with `TreeGridRow` (`tr`) and `TreeGridCell` (`td`) to build out a grid.\n *\n * ```jsx\n * function TreeMenu() {\n * \treturn (\n * \t\t<TreeGrid>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 1 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 2 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 2 } positionInSet={ 1 } setSize={ 1 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t</TreeGrid>\n * \t);\n * }\n * ```\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGrid = forwardRef(UnforwardedTreeGrid);\nexport default TreeGrid;\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAsB;AACtB,qBAAwC;AACxC,sBAAiD;AAKjD,8BAAoC;AACpC,yBAA4B;
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { forwardRef, useCallback } from '@wordpress/element';\nimport { UP, DOWN, LEFT, RIGHT, HOME, END } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexContainer from './roving-tab-index';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Return focusables in a row element, excluding those from other branches\n * nested within the row.\n *\n * @param rowElement The DOM element representing the row.\n *\n * @return The array of focusables in the row.\n */\nfunction getRowFocusables(rowElement) {\n const focusablesInRow = focus.focusable.find(rowElement, {\n sequential: true\n });\n return focusablesInRow.filter(focusable => {\n return focusable.closest('[role=\"row\"]') === rowElement;\n });\n}\n\n/**\n * Renders both a table and tbody element, used to create a tree hierarchy.\n *\n */\nfunction UnforwardedTreeGrid({\n children,\n onExpandRow = () => {},\n onCollapseRow = () => {},\n onFocusRow = () => {},\n applicationAriaLabel,\n ...props\n}, /** A ref to the underlying DOM table element. */\nref) {\n const onKeyDown = useCallback(event => {\n const {\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n } = event;\n\n // The shift key is intentionally absent from the following list,\n // to enable shift + up/down to select items from the list.\n const hasModifierKeyPressed = metaKey || ctrlKey || altKey;\n if (hasModifierKeyPressed || ![UP, DOWN, LEFT, RIGHT, HOME, END].includes(keyCode)) {\n return;\n }\n\n // The event will be handled, stop propagation.\n event.stopPropagation();\n const {\n activeElement\n } = document;\n const {\n currentTarget: treeGridElement\n } = event;\n if (!activeElement || !treeGridElement.contains(activeElement)) {\n return;\n }\n\n // Calculate the columnIndex of the active element.\n const activeRow = activeElement.closest('[role=\"row\"]');\n if (!activeRow) {\n return;\n }\n const focusablesInRow = getRowFocusables(activeRow);\n const currentColumnIndex = focusablesInRow.indexOf(activeElement);\n const canExpandCollapse = 0 === currentColumnIndex;\n const cannotFocusNextColumn = canExpandCollapse && (activeRow.getAttribute('data-expanded') === 'false' || activeRow.getAttribute('aria-expanded') === 'false') && keyCode === RIGHT;\n if ([LEFT, RIGHT].includes(keyCode)) {\n // Calculate to the next element.\n let nextIndex;\n if (keyCode === LEFT) {\n nextIndex = Math.max(0, currentColumnIndex - 1);\n } else {\n nextIndex = Math.min(currentColumnIndex + 1, focusablesInRow.length - 1);\n }\n\n // Focus is at the left most column.\n if (canExpandCollapse) {\n if (keyCode === LEFT) {\n var _activeRow$getAttribu;\n // Left:\n // If a row is focused, and it is expanded, collapses the current row.\n if (activeRow.getAttribute('data-expanded') === 'true' || activeRow.getAttribute('aria-expanded') === 'true') {\n onCollapseRow(activeRow);\n event.preventDefault();\n return;\n }\n // If a row is focused, and it is collapsed, moves to the parent row (if there is one).\n const level = Math.max(parseInt((_activeRow$getAttribu = activeRow?.getAttribute('aria-level')) !== null && _activeRow$getAttribu !== void 0 ? _activeRow$getAttribu : '1', 10) - 1, 1);\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n let parentRow = activeRow;\n const currentRowIndex = rows.indexOf(activeRow);\n for (let i = currentRowIndex; i >= 0; i--) {\n const ariaLevel = rows[i].getAttribute('aria-level');\n if (ariaLevel !== null && parseInt(ariaLevel, 10) === level) {\n parentRow = rows[i];\n break;\n }\n }\n getRowFocusables(parentRow)?.[0]?.focus();\n }\n if (keyCode === RIGHT) {\n // Right:\n // If a row is focused, and it is collapsed, expands the current row.\n if (activeRow.getAttribute('data-expanded') === 'false' || activeRow.getAttribute('aria-expanded') === 'false') {\n onExpandRow(activeRow);\n event.preventDefault();\n return;\n }\n // If a row is focused, and it is expanded, focuses the next cell in the row.\n const focusableItems = getRowFocusables(activeRow);\n if (focusableItems.length > 0) {\n focusableItems[nextIndex]?.focus();\n }\n }\n // Prevent key use for anything else. For example, Voiceover\n // will start reading text on continued use of left/right arrow\n // keys.\n event.preventDefault();\n return;\n }\n\n // Focus the next element. If at most left column and row is collapsed, moving right is not allowed as this will expand. However, if row is collapsed, moving left is allowed.\n if (cannotFocusNextColumn) {\n return;\n }\n focusablesInRow[nextIndex].focus();\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n } else if ([UP, DOWN].includes(keyCode)) {\n // Calculate the rowIndex of the next row.\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n const currentRowIndex = rows.indexOf(activeRow);\n let nextRowIndex;\n if (keyCode === UP) {\n nextRowIndex = Math.max(0, currentRowIndex - 1);\n } else {\n nextRowIndex = Math.min(currentRowIndex + 1, rows.length - 1);\n }\n\n // Focus is either at the top or bottom edge of the grid. Do nothing.\n if (nextRowIndex === currentRowIndex) {\n // Prevent key use for anything else. For example, Voiceover\n // will start navigating horizontally when reaching the vertical\n // bounds of a table.\n event.preventDefault();\n return;\n }\n\n // Get the focusables in the next row.\n const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);\n\n // If for some reason there are no focusables in the next row, do nothing.\n if (!focusablesInNextRow || !focusablesInNextRow.length) {\n // Prevent key use for anything else. For example, Voiceover\n // will still focus text when using arrow keys, while this\n // component should limit navigation to focusables.\n event.preventDefault();\n return;\n }\n\n // Try to focus the element in the next row that's at a similar column to the activeElement.\n const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);\n focusablesInNextRow[nextIndex].focus();\n\n // Let consumers know the row that was originally focused,\n // and the row that is now in focus.\n onFocusRow(event, activeRow, rows[nextRowIndex]);\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n } else if ([HOME, END].includes(keyCode)) {\n // Calculate the rowIndex of the next row.\n const rows = Array.from(treeGridElement.querySelectorAll('[role=\"row\"]'));\n const currentRowIndex = rows.indexOf(activeRow);\n let nextRowIndex;\n if (keyCode === HOME) {\n nextRowIndex = 0;\n } else {\n nextRowIndex = rows.length - 1;\n }\n\n // Focus is either at the top or bottom edge of the grid. Do nothing.\n if (nextRowIndex === currentRowIndex) {\n // Prevent key use for anything else. For example, Voiceover\n // will start navigating horizontally when reaching the vertical\n // bounds of a table.\n event.preventDefault();\n return;\n }\n\n // Get the focusables in the next row.\n const focusablesInNextRow = getRowFocusables(rows[nextRowIndex]);\n\n // If for some reason there are no focusables in the next row, do nothing.\n if (!focusablesInNextRow || !focusablesInNextRow.length) {\n // Prevent key use for anything else. For example, Voiceover\n // will still focus text when using arrow keys, while this\n // component should limit navigation to focusables.\n event.preventDefault();\n return;\n }\n\n // Try to focus the element in the next row that's at a similar column to the activeElement.\n const nextIndex = Math.min(currentColumnIndex, focusablesInNextRow.length - 1);\n focusablesInNextRow[nextIndex].focus();\n\n // Let consumers know the row that was originally focused,\n // and the row that is now in focus.\n onFocusRow(event, activeRow, rows[nextRowIndex]);\n\n // Prevent key use for anything else. This ensures Voiceover\n // doesn't try to handle key navigation.\n event.preventDefault();\n }\n }, [onExpandRow, onCollapseRow, onFocusRow]);\n\n /* Disable reason: A treegrid is implemented using a table element. */\n /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n return /*#__PURE__*/_jsx(RovingTabIndexContainer, {\n children: /*#__PURE__*/_jsx(\"div\", {\n role: \"application\",\n \"aria-label\": applicationAriaLabel,\n children: /*#__PURE__*/_jsx(\"table\", {\n ...props,\n role: \"treegrid\",\n onKeyDown: onKeyDown,\n ref: ref,\n children: /*#__PURE__*/_jsx(\"tbody\", {\n children: children\n })\n })\n })\n });\n /* eslint-enable jsx-a11y/no-noninteractive-element-to-interactive-role */\n}\n\n/**\n * `TreeGrid` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * A tree grid is a hierarchical 2 dimensional UI component, for example it could be\n * used to implement a file system browser.\n *\n * A tree grid allows the user to navigate using arrow keys.\n * Up/down to navigate vertically across rows, and left/right to navigate horizontally\n * between focusables in a row.\n *\n * The `TreeGrid` renders both a `table` and `tbody` element, and is intended to be used\n * with `TreeGridRow` (`tr`) and `TreeGridCell` (`td`) to build out a grid.\n *\n * ```jsx\n * function TreeMenu() {\n * \treturn (\n * \t\t<TreeGrid>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 1 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 1 } positionInSet={ 2 } setSize={ 2 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t\t<TreeGridRow level={ 2 } positionInSet={ 1 } setSize={ 1 }>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onSelect } { ...props }>Select</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t\t<TreeGridCell>\n * \t\t\t\t\t{ ( props ) => (\n * \t\t\t\t\t\t<Button onClick={ onMove } { ...props }>Move</Button>\n * \t\t\t\t\t) }\n * \t\t\t\t</TreeGridCell>\n * \t\t\t</TreeGridRow>\n * \t\t</TreeGrid>\n * \t);\n * }\n * ```\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGrid = forwardRef(UnforwardedTreeGrid);\nTreeGrid.displayName = 'TreeGrid';\nexport default TreeGrid;\nexport { default as TreeGridRow } from './row';\nexport { default as TreeGridCell } from './cell';\nexport { default as TreeGridItem } from './item';"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,iBAAsB;AACtB,qBAAwC;AACxC,sBAAiD;AAKjD,8BAAoC;AACpC,yBAA4B;AAiT5B,iBAAuC;AACvC,kBAAwC;AACxC,kBAAwC;AA1SxC,SAAS,iBAAiB,YAAY;AACpC,QAAM,kBAAkB,iBAAM,UAAU,KAAK,YAAY;AAAA,IACvD,YAAY;AAAA,EACd,CAAC;AACD,SAAO,gBAAgB,OAAO,eAAa;AACzC,WAAO,UAAU,QAAQ,cAAc,MAAM;AAAA,EAC/C,CAAC;AACH;AAMA,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,cAAc,MAAM;AAAA,EAAC;AAAA,EACrB,gBAAgB,MAAM;AAAA,EAAC;AAAA,EACvB,aAAa,MAAM;AAAA,EAAC;AAAA,EACpB;AAAA,EACA,GAAG;AACL,GACA,KAAK;AACH,QAAM,gBAAY,4BAAY,WAAS;AACrC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,IAAI;AAIJ,UAAM,wBAAwB,WAAW,WAAW;AACpD,QAAI,yBAAyB,CAAC,CAAC,oBAAI,sBAAM,sBAAM,uBAAO,sBAAM,mBAAG,EAAE,SAAS,OAAO,GAAG;AAClF;AAAA,IACF;AAGA,UAAM,gBAAgB;AACtB,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,UAAM;AAAA,MACJ,eAAe;AAAA,IACjB,IAAI;AACJ,QAAI,CAAC,iBAAiB,CAAC,gBAAgB,SAAS,aAAa,GAAG;AAC9D;AAAA,IACF;AAGA,UAAM,YAAY,cAAc,QAAQ,cAAc;AACtD,QAAI,CAAC,WAAW;AACd;AAAA,IACF;AACA,UAAM,kBAAkB,iBAAiB,SAAS;AAClD,UAAM,qBAAqB,gBAAgB,QAAQ,aAAa;AAChE,UAAM,oBAAoB,MAAM;AAChC,UAAM,wBAAwB,sBAAsB,UAAU,aAAa,eAAe,MAAM,WAAW,UAAU,aAAa,eAAe,MAAM,YAAY,YAAY;AAC/K,QAAI,CAAC,sBAAM,qBAAK,EAAE,SAAS,OAAO,GAAG;AAEnC,UAAI;AACJ,UAAI,YAAY,sBAAM;AACpB,oBAAY,KAAK,IAAI,GAAG,qBAAqB,CAAC;AAAA,MAChD,OAAO;AACL,oBAAY,KAAK,IAAI,qBAAqB,GAAG,gBAAgB,SAAS,CAAC;AAAA,MACzE;AAGA,UAAI,mBAAmB;AACrB,YAAI,YAAY,sBAAM;AACpB,cAAI;AAGJ,cAAI,UAAU,aAAa,eAAe,MAAM,UAAU,UAAU,aAAa,eAAe,MAAM,QAAQ;AAC5G,0BAAc,SAAS;AACvB,kBAAM,eAAe;AACrB;AAAA,UACF;AAEA,gBAAM,QAAQ,KAAK,IAAI,UAAU,wBAAwB,WAAW,aAAa,YAAY,OAAO,QAAQ,0BAA0B,SAAS,wBAAwB,KAAK,EAAE,IAAI,GAAG,CAAC;AACtL,gBAAM,OAAO,MAAM,KAAK,gBAAgB,iBAAiB,cAAc,CAAC;AACxE,cAAI,YAAY;AAChB,gBAAM,kBAAkB,KAAK,QAAQ,SAAS;AAC9C,mBAAS,IAAI,iBAAiB,KAAK,GAAG,KAAK;AACzC,kBAAM,YAAY,KAAK,CAAC,EAAE,aAAa,YAAY;AACnD,gBAAI,cAAc,QAAQ,SAAS,WAAW,EAAE,MAAM,OAAO;AAC3D,0BAAY,KAAK,CAAC;AAClB;AAAA,YACF;AAAA,UACF;AACA,2BAAiB,SAAS,IAAI,CAAC,GAAG,MAAM;AAAA,QAC1C;AACA,YAAI,YAAY,uBAAO;AAGrB,cAAI,UAAU,aAAa,eAAe,MAAM,WAAW,UAAU,aAAa,eAAe,MAAM,SAAS;AAC9G,wBAAY,SAAS;AACrB,kBAAM,eAAe;AACrB;AAAA,UACF;AAEA,gBAAM,iBAAiB,iBAAiB,SAAS;AACjD,cAAI,eAAe,SAAS,GAAG;AAC7B,2BAAe,SAAS,GAAG,MAAM;AAAA,UACnC;AAAA,QACF;AAIA,cAAM,eAAe;AACrB;AAAA,MACF;AAGA,UAAI,uBAAuB;AACzB;AAAA,MACF;AACA,sBAAgB,SAAS,EAAE,MAAM;AAIjC,YAAM,eAAe;AAAA,IACvB,WAAW,CAAC,oBAAI,oBAAI,EAAE,SAAS,OAAO,GAAG;AAEvC,YAAM,OAAO,MAAM,KAAK,gBAAgB,iBAAiB,cAAc,CAAC;AACxE,YAAM,kBAAkB,KAAK,QAAQ,SAAS;AAC9C,UAAI;AACJ,UAAI,YAAY,oBAAI;AAClB,uBAAe,KAAK,IAAI,GAAG,kBAAkB,CAAC;AAAA,MAChD,OAAO;AACL,uBAAe,KAAK,IAAI,kBAAkB,GAAG,KAAK,SAAS,CAAC;AAAA,MAC9D;AAGA,UAAI,iBAAiB,iBAAiB;AAIpC,cAAM,eAAe;AACrB;AAAA,MACF;AAGA,YAAM,sBAAsB,iBAAiB,KAAK,YAAY,CAAC;AAG/D,UAAI,CAAC,uBAAuB,CAAC,oBAAoB,QAAQ;AAIvD,cAAM,eAAe;AACrB;AAAA,MACF;AAGA,YAAM,YAAY,KAAK,IAAI,oBAAoB,oBAAoB,SAAS,CAAC;AAC7E,0BAAoB,SAAS,EAAE,MAAM;AAIrC,iBAAW,OAAO,WAAW,KAAK,YAAY,CAAC;AAI/C,YAAM,eAAe;AAAA,IACvB,WAAW,CAAC,sBAAM,mBAAG,EAAE,SAAS,OAAO,GAAG;AAExC,YAAM,OAAO,MAAM,KAAK,gBAAgB,iBAAiB,cAAc,CAAC;AACxE,YAAM,kBAAkB,KAAK,QAAQ,SAAS;AAC9C,UAAI;AACJ,UAAI,YAAY,sBAAM;AACpB,uBAAe;AAAA,MACjB,OAAO;AACL,uBAAe,KAAK,SAAS;AAAA,MAC/B;AAGA,UAAI,iBAAiB,iBAAiB;AAIpC,cAAM,eAAe;AACrB;AAAA,MACF;AAGA,YAAM,sBAAsB,iBAAiB,KAAK,YAAY,CAAC;AAG/D,UAAI,CAAC,uBAAuB,CAAC,oBAAoB,QAAQ;AAIvD,cAAM,eAAe;AACrB;AAAA,MACF;AAGA,YAAM,YAAY,KAAK,IAAI,oBAAoB,oBAAoB,SAAS,CAAC;AAC7E,0BAAoB,SAAS,EAAE,MAAM;AAIrC,iBAAW,OAAO,WAAW,KAAK,YAAY,CAAC;AAI/C,YAAM,eAAe;AAAA,IACvB;AAAA,EACF,GAAG,CAAC,aAAa,eAAe,UAAU,CAAC;AAI3C,SAAoB,uCAAAA,KAAK,wBAAAC,SAAyB;AAAA,IAChD,UAAuB,uCAAAD,KAAK,OAAO;AAAA,MACjC,MAAM;AAAA,MACN,cAAc;AAAA,MACd,UAAuB,uCAAAA,KAAK,SAAS;AAAA,QACnC,GAAG;AAAA,QACH,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,UAAuB,uCAAAA,KAAK,SAAS;AAAA,UACnC;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AAEH;AAgEO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,SAAS,cAAc;AACvB,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["_jsx", "RovingTabIndexContainer"]
|
|
7
7
|
}
|
package/build/tree-grid/item.cjs
CHANGED
|
@@ -48,6 +48,7 @@ function UnforwardedTreeGridItem({
|
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
var TreeGridItem = (0, import_element.forwardRef)(UnforwardedTreeGridItem);
|
|
51
|
+
TreeGridItem.displayName = "TreeGridItem";
|
|
51
52
|
var item_default = TreeGridItem;
|
|
52
53
|
// Annotate the CommonJS export names for ESM import in node:
|
|
53
54
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-grid/item.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridItem({\n children,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(RovingTabIndexItem, {\n ref: ref,\n ...props,\n children: children\n });\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef(UnforwardedTreeGridItem);\nexport default TreeGridItem;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,mCAA+B;AAC/B,yBAA4B;AAC5B,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,6BAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AASO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RovingTabIndexItem from './roving-tab-index-item';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridItem({\n children,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(RovingTabIndexItem, {\n ref: ref,\n ...props,\n children: children\n });\n}\n\n/**\n * `TreeGridItem` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridItem = forwardRef(UnforwardedTreeGridItem);\nTreeGridItem.displayName = 'TreeGridItem';\nexport default TreeGridItem;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,mCAA+B;AAC/B,yBAA4B;AAC5B,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,6BAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AASO,IAAM,mBAAe,2BAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,eAAQ;",
|
|
6
6
|
"names": ["_jsx", "RovingTabIndexItem"]
|
|
7
7
|
}
|
|
@@ -64,6 +64,7 @@ var RovingTabIndexItem = (0, import_element.forwardRef)(function UnforwardedRovi
|
|
|
64
64
|
children
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
+
RovingTabIndexItem.displayName = "RovingTabIndexItem";
|
|
67
68
|
var roving_tab_index_item_default = RovingTabIndexItem;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-grid/roving-tab-index-item.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const RovingTabIndexItem = forwardRef(function UnforwardedRovingTabIndexItem({\n children,\n as: Component,\n ...props\n}, forwardedRef) {\n const localRef = useRef();\n const ref = forwardedRef || localRef;\n // @ts-expect-error - We actually want to throw an error if this is undefined.\n const {\n lastFocusedElement,\n setLastFocusedElement\n } = useRovingTabIndexContext();\n let tabIndex;\n if (lastFocusedElement) {\n tabIndex = lastFocusedElement === (\n // TODO: The original implementation simply used `ref.current` here, assuming\n // that a forwarded ref would always be an object, which is not necessarily true.\n // This workaround maintains the original runtime behavior in a type-safe way,\n // but should be revisited.\n 'current' in ref ? ref.current : undefined) ? 0 : -1;\n }\n const onFocus = event => setLastFocusedElement?.(event.target);\n const allProps = {\n ref,\n tabIndex,\n onFocus,\n ...props\n };\n if (typeof children === 'function') {\n return children(allProps);\n }\n if (!Component) {\n return null;\n }\n return /*#__PURE__*/_jsx(Component, {\n ...allProps,\n children: children\n });\n});\nexport default RovingTabIndexItem;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAmC;AAKnC,sCAAyC;AACzC,yBAA4B;AACrB,IAAM,yBAAqB,2BAAW,SAAS,8BAA8B;AAAA,EAClF;AAAA,EACA,IAAI;AAAA,EACJ,GAAG;AACL,GAAG,cAAc;AACf,QAAM,eAAW,uBAAO;AACxB,QAAM,MAAM,gBAAgB;AAE5B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,0DAAyB;AAC7B,MAAI;AACJ,MAAI,oBAAoB;AACtB,eAAW;AAAA;AAAA;AAAA;AAAA,KAKX,aAAa,MAAM,IAAI,UAAU,UAAa,IAAI;AAAA,EACpD;AACA,QAAM,UAAU,WAAS,wBAAwB,MAAM,MAAM;AAC7D,QAAM,WAAW;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AACA,MAAI,OAAO,aAAa,YAAY;AAClC,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,WAAW;AAAA,IAClC,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;AACD,IAAO,gCAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useRovingTabIndexContext } from './roving-tab-index-context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const RovingTabIndexItem = forwardRef(function UnforwardedRovingTabIndexItem({\n children,\n as: Component,\n ...props\n}, forwardedRef) {\n const localRef = useRef();\n const ref = forwardedRef || localRef;\n // @ts-expect-error - We actually want to throw an error if this is undefined.\n const {\n lastFocusedElement,\n setLastFocusedElement\n } = useRovingTabIndexContext();\n let tabIndex;\n if (lastFocusedElement) {\n tabIndex = lastFocusedElement === (\n // TODO: The original implementation simply used `ref.current` here, assuming\n // that a forwarded ref would always be an object, which is not necessarily true.\n // This workaround maintains the original runtime behavior in a type-safe way,\n // but should be revisited.\n 'current' in ref ? ref.current : undefined) ? 0 : -1;\n }\n const onFocus = event => setLastFocusedElement?.(event.target);\n const allProps = {\n ref,\n tabIndex,\n onFocus,\n ...props\n };\n if (typeof children === 'function') {\n return children(allProps);\n }\n if (!Component) {\n return null;\n }\n return /*#__PURE__*/_jsx(Component, {\n ...allProps,\n children: children\n });\n});\nRovingTabIndexItem.displayName = 'RovingTabIndexItem';\nexport default RovingTabIndexItem;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAmC;AAKnC,sCAAyC;AACzC,yBAA4B;AACrB,IAAM,yBAAqB,2BAAW,SAAS,8BAA8B;AAAA,EAClF;AAAA,EACA,IAAI;AAAA,EACJ,GAAG;AACL,GAAG,cAAc;AACf,QAAM,eAAW,uBAAO;AACxB,QAAM,MAAM,gBAAgB;AAE5B,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,0DAAyB;AAC7B,MAAI;AACJ,MAAI,oBAAoB;AACtB,eAAW;AAAA;AAAA;AAAA;AAAA,KAKX,aAAa,MAAM,IAAI,UAAU,UAAa,IAAI;AAAA,EACpD;AACA,QAAM,UAAU,WAAS,wBAAwB,MAAM,MAAM;AAC7D,QAAM,WAAW;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL;AACA,MAAI,OAAO,aAAa,YAAY;AAClC,WAAO,SAAS,QAAQ;AAAA,EAC1B;AACA,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,WAAW;AAAA,IAClC,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH,CAAC;AACD,mBAAmB,cAAc;AACjC,IAAO,gCAAQ;",
|
|
6
6
|
"names": ["_jsx"]
|
|
7
7
|
}
|
package/build/tree-grid/row.cjs
CHANGED
|
@@ -46,6 +46,7 @@ function UnforwardedTreeGridRow({
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
var TreeGridRow = (0, import_element.forwardRef)(UnforwardedTreeGridRow);
|
|
49
|
+
TreeGridRow.displayName = "TreeGridRow";
|
|
49
50
|
var row_default = TreeGridRow;
|
|
50
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
52
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-grid/row.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridRow({\n children,\n level,\n positionInSet,\n setSize,\n isExpanded,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(\"tr\", {\n ...props,\n ref: ref,\n role: \"row\",\n \"aria-level\": level,\n \"aria-posinset\": positionInSet,\n \"aria-setsize\": setSize,\n \"aria-expanded\": isExpanded,\n children: children\n });\n}\n\n/**\n * `TreeGridRow` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridRow = forwardRef(UnforwardedTreeGridRow);\nexport default TreeGridRow;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,uBAAuB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH;AAAA,IACA,MAAM;AAAA,IACN,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB;AAAA,EACF,CAAC;AACH;AASO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,IAAO,cAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTreeGridRow({\n children,\n level,\n positionInSet,\n setSize,\n isExpanded,\n ...props\n}, ref) {\n return /*#__PURE__*/_jsx(\"tr\", {\n ...props,\n ref: ref,\n role: \"row\",\n \"aria-level\": level,\n \"aria-posinset\": positionInSet,\n \"aria-setsize\": setSize,\n \"aria-expanded\": isExpanded,\n children: children\n });\n}\n\n/**\n * `TreeGridRow` is used to create a tree hierarchy.\n * It is not a visually styled component, but instead helps with adding\n * keyboard navigation and roving tab index behaviors to tree grid structures.\n *\n * @see {@link https://www.w3.org/TR/wai-aria-practices/examples/treegrid/treegrid-1.html}\n */\nexport const TreeGridRow = forwardRef(UnforwardedTreeGridRow);\nTreeGridRow.displayName = 'TreeGridRow';\nexport default TreeGridRow;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAA2B;AAK3B,yBAA4B;AAC5B,SAAS,uBAAuB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,SAAoB,uCAAAA,KAAK,MAAM;AAAA,IAC7B,GAAG;AAAA,IACH;AAAA,IACA,MAAM;AAAA,IACN,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB;AAAA,EACF,CAAC;AACH;AASO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,cAAQ;",
|
|
6
6
|
"names": ["_jsx"]
|
|
7
7
|
}
|
|
@@ -58,14 +58,18 @@ function TreeSelect(props) {
|
|
|
58
58
|
size: restProps.size,
|
|
59
59
|
__next40pxDefaultSize: restProps.__next40pxDefaultSize
|
|
60
60
|
});
|
|
61
|
-
return
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
return (
|
|
62
|
+
// Disable reason: the parent component already takes case of the `__next40pxDefaultSize` prop.
|
|
63
|
+
// eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select_control.SelectControl, {
|
|
65
|
+
__shouldNotWarnDeprecated36pxSize: true,
|
|
66
|
+
label,
|
|
67
|
+
options,
|
|
68
|
+
onChange,
|
|
69
|
+
value: selectedId,
|
|
70
|
+
...restProps
|
|
71
|
+
})
|
|
72
|
+
);
|
|
69
73
|
}
|
|
70
74
|
var tree_select_default = TreeSelect;
|
|
71
75
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tree-select/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getSelectOptions(tree, level = 0) {\n return tree.flatMap(treeNode => [{\n value: treeNode.id,\n label: '\\u00A0'.repeat(level * 3) + decodeEntities(treeNode.name)\n }, ...getSelectOptions(treeNode.children || [], level + 1)]);\n}\n\n/**\n * Generates a hierarchical select input.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { TreeSelect } from '@wordpress/components';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect(props) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n label,\n noOptionLabel,\n onChange,\n selectedId,\n tree = [],\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const options = useMemo(() => {\n return [noOptionLabel && {\n value: '',\n label: noOptionLabel\n }, ...getSelectOptions(tree)].filter(option => !!option);\n }, [noOptionLabel, tree]);\n maybeWarnDeprecated36pxSize({\n componentName: 'TreeSelect',\n size: restProps.size,\n __next40pxDefaultSize: restProps.__next40pxDefaultSize\n });\n return /*#__PURE__
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwB;AACxB,2BAA+B;AAK/B,4BAA8B;AAC9B,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,iBAAiB,MAAM,QAAQ,GAAG;AACzC,SAAO,KAAK,QAAQ,cAAY,CAAC;AAAA,IAC/B,OAAO,SAAS;AAAA,IAChB,OAAO,OAAS,OAAO,QAAQ,CAAC,QAAI,qCAAe,SAAS,IAAI;AAAA,EAClE,GAAG,GAAG,iBAAiB,SAAS,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAC7D;AAkDO,SAAS,WAAW,OAAO;AAChC,QAAM;AAAA,IACJ,yBAAyB;AAAA;AAAA,IAEzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,IACR,GAAG;AAAA,EACL,QAAI,8DAAiC,KAAK;AAC1C,QAAM,cAAU,wBAAQ,MAAM;AAC5B,WAAO,CAAC,iBAAiB;AAAA,MACvB,OAAO;AAAA,MACP,OAAO;AAAA,IACT,GAAG,GAAG,iBAAiB,IAAI,CAAC,EAAE,OAAO,YAAU,CAAC,CAAC,MAAM;AAAA,EACzD,GAAG,CAAC,eAAe,IAAI,CAAC;AACxB,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM,UAAU;AAAA,IAChB,uBAAuB,UAAU;AAAA,EACnC,CAAC;AACD,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport { SelectControl } from '../select-control';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getSelectOptions(tree, level = 0) {\n return tree.flatMap(treeNode => [{\n value: treeNode.id,\n label: '\\u00A0'.repeat(level * 3) + decodeEntities(treeNode.name)\n }, ...getSelectOptions(treeNode.children || [], level + 1)]);\n}\n\n/**\n * Generates a hierarchical select input.\n *\n * ```jsx\n * import { useState } from 'react';\n * import { TreeSelect } from '@wordpress/components';\n *\n * const MyTreeSelect = () => {\n * \tconst [ page, setPage ] = useState( 'p21' );\n *\n * \treturn (\n * \t\t<TreeSelect\n * \t\t\t__next40pxDefaultSize\n * \t\t\tlabel=\"Parent page\"\n * \t\t\tnoOptionLabel=\"No parent page\"\n * \t\t\tonChange={ ( newPage ) => setPage( newPage ) }\n * \t\t\tselectedId={ page }\n * \t\t\ttree={ [\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 1',\n * \t\t\t\t\tid: 'p1',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{ name: 'Descend 1 of page 1', id: 'p11' },\n * \t\t\t\t\t\t{ name: 'Descend 2 of page 1', id: 'p12' },\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\tname: 'Page 2',\n * \t\t\t\t\tid: 'p2',\n * \t\t\t\t\tchildren: [\n * \t\t\t\t\t\t{\n * \t\t\t\t\t\t\tname: 'Descend 1 of page 2',\n * \t\t\t\t\t\t\tid: 'p21',\n * \t\t\t\t\t\t\tchildren: [\n * \t\t\t\t\t\t\t\t{\n * \t\t\t\t\t\t\t\t\tname: 'Descend 1 of Descend 1 of page 2',\n * \t\t\t\t\t\t\t\t\tid: 'p211',\n * \t\t\t\t\t\t\t\t},\n * \t\t\t\t\t\t\t],\n * \t\t\t\t\t\t},\n * \t\t\t\t\t],\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nexport function TreeSelect(props) {\n const {\n __nextHasNoMarginBottom: _,\n // Prevent passing to internal component\n label,\n noOptionLabel,\n onChange,\n selectedId,\n tree = [],\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const options = useMemo(() => {\n return [noOptionLabel && {\n value: '',\n label: noOptionLabel\n }, ...getSelectOptions(tree)].filter(option => !!option);\n }, [noOptionLabel, tree]);\n maybeWarnDeprecated36pxSize({\n componentName: 'TreeSelect',\n size: restProps.size,\n __next40pxDefaultSize: restProps.__next40pxDefaultSize\n });\n return (\n /*#__PURE__*/\n // Disable reason: the parent component already takes case of the `__next40pxDefaultSize` prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(SelectControl, {\n __shouldNotWarnDeprecated36pxSize: true,\n label,\n options,\n onChange,\n value: selectedId,\n ...restProps\n })\n );\n}\nexport default TreeSelect;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAwB;AACxB,2BAA+B;AAK/B,4BAA8B;AAC9B,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAC5B,SAAS,iBAAiB,MAAM,QAAQ,GAAG;AACzC,SAAO,KAAK,QAAQ,cAAY,CAAC;AAAA,IAC/B,OAAO,SAAS;AAAA,IAChB,OAAO,OAAS,OAAO,QAAQ,CAAC,QAAI,qCAAe,SAAS,IAAI;AAAA,EAClE,GAAG,GAAG,iBAAiB,SAAS,YAAY,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;AAC7D;AAkDO,SAAS,WAAW,OAAO;AAChC,QAAM;AAAA,IACJ,yBAAyB;AAAA;AAAA,IAEzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,CAAC;AAAA,IACR,GAAG;AAAA,EACL,QAAI,8DAAiC,KAAK;AAC1C,QAAM,cAAU,wBAAQ,MAAM;AAC5B,WAAO,CAAC,iBAAiB;AAAA,MACvB,OAAO;AAAA,MACP,OAAO;AAAA,IACT,GAAG,GAAG,iBAAiB,IAAI,CAAC,EAAE,OAAO,YAAU,CAAC,CAAC,MAAM;AAAA,EACzD,GAAG,CAAC,eAAe,IAAI,CAAC;AACxB,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM,UAAU;AAAA,IAChB,uBAAuB,UAAU;AAAA,EACnC,CAAC;AACD;AAAA;AAAA;AAAA,IAIE,uCAAAA,KAAK,qCAAe;AAAA,MAClB,mCAAmC;AAAA,MACnC;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,MACP,GAAG;AAAA,IACL,CAAC;AAAA;AAEL;AACA,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["_jsx"]
|
|
7
7
|
}
|
|
@@ -186,6 +186,7 @@ function UnforwardedUnitControl(unitControlProps, forwardedRef) {
|
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
var UnitControl = (0, import_element.forwardRef)(UnforwardedUnitControl);
|
|
189
|
+
UnitControl.displayName = "UnitControl";
|
|
189
190
|
var unit_control_default = UnitControl;
|
|
190
191
|
// Annotate the CommonJS export names for ESM import in node:
|
|
191
192
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/unit-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport { CSS_UNITS, getParsedQuantityAndUnit, getUnitsWithCurrentUnit, getValidParsedQuantityAndUnit } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedUnitControl(unitControlProps, forwardedRef) {\n const {\n __unstableStateReducer,\n autoComplete = 'off',\n // @ts-expect-error Ensure that children is omitted from restProps\n children,\n className,\n disabled = false,\n disableUnits = false,\n isPressEnterToChange = false,\n isResetValueOnUnitChange = false,\n isUnitSelectTabbable = true,\n label,\n onChange: onChangeProp,\n onUnitChange,\n size = 'default',\n unit: unitProp,\n units: unitsProp = CSS_UNITS,\n value: valueProp,\n onFocus: onFocusProp,\n __shouldNotWarnDeprecated36pxSize,\n ...props\n } = useDeprecated36pxDefaultSizeProp(unitControlProps);\n maybeWarnDeprecated36pxSize({\n componentName: 'UnitControl',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n if ('unit' in unitControlProps) {\n deprecated('UnitControl unit prop', {\n since: '5.6',\n hint: 'The unit should be provided within the `value` prop.',\n version: '6.2'\n });\n }\n\n // The `value` prop, in theory, should not be `null`, but the following line\n // ensures it fallback to `undefined` in case a consumer of `UnitControl`\n // still passes `null` as a `value`.\n const nonNullValueProp = valueProp !== null && valueProp !== void 0 ? valueProp : undefined;\n const [units, reFirstCharacterOfUnits] = useMemo(() => {\n const list = getUnitsWithCurrentUnit(nonNullValueProp, unitProp, unitsProp);\n const [{\n value: firstUnitValue = ''\n } = {}, ...rest] = list;\n const firstCharacters = rest.reduce((carry, {\n value\n }) => {\n const first = escapeRegExp(value?.substring(0, 1) || '');\n return carry.includes(first) ? carry : `${carry}|${first}`;\n }, escapeRegExp(firstUnitValue.substring(0, 1)));\n return [list, new RegExp(`^(?:${firstCharacters})$`, 'i')];\n }, [nonNullValueProp, unitProp, unitsProp]);\n const [parsedQuantity, parsedUnit] = getParsedQuantityAndUnit(nonNullValueProp, unitProp, units);\n const [unit, setUnit] = useControlledState(units.length === 1 ? units[0].value : unitProp, {\n initial: parsedUnit,\n fallback: ''\n });\n useEffect(() => {\n if (parsedUnit !== undefined) {\n setUnit(parsedUnit);\n }\n }, [parsedUnit, setUnit]);\n const classes = clsx('components-unit-control',\n // This class is added for legacy purposes to maintain it on the outer\n // wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n 'components-unit-control-wrapper', className);\n const handleOnQuantityChange = (nextQuantityValue, changeProps) => {\n if (nextQuantityValue === '' || typeof nextQuantityValue === 'undefined' || nextQuantityValue === null) {\n onChangeProp?.('', changeProps);\n return;\n }\n\n /*\n * Customizing the onChange callback.\n * This allows as to broadcast a combined value+unit to onChange.\n */\n const onChangeValue = getValidParsedQuantityAndUnit(nextQuantityValue, units, parsedQuantity, unit).join('');\n onChangeProp?.(onChangeValue, changeProps);\n };\n const handleOnUnitChange = (nextUnitValue, changeProps) => {\n const {\n data\n } = changeProps;\n let nextValue = `${parsedQuantity !== null && parsedQuantity !== void 0 ? parsedQuantity : ''}${nextUnitValue}`;\n if (isResetValueOnUnitChange && data?.default !== undefined) {\n nextValue = `${data.default}${nextUnitValue}`;\n }\n onChangeProp?.(nextValue, changeProps);\n onUnitChange?.(nextUnitValue, changeProps);\n setUnit(nextUnitValue);\n };\n let handleOnKeyDown;\n if (!disableUnits && isUnitSelectTabbable && units.length) {\n handleOnKeyDown = event => {\n props.onKeyDown?.(event);\n // Unless the meta or ctrl key was pressed (to avoid interfering with\n // shortcuts, e.g. pastes), move focus to the unit select if a key\n // matches the first character of a unit.\n if (!event.metaKey && !event.ctrlKey && reFirstCharacterOfUnits.test(event.key)) {\n refInputSuffix.current?.focus();\n }\n };\n }\n const refInputSuffix = useRef(null);\n const inputSuffix = !disableUnits ? /*#__PURE__*/_jsx(UnitSelectControl, {\n ref: refInputSuffix,\n \"aria-label\": __('Select unit'),\n disabled: disabled,\n isUnitSelectTabbable: isUnitSelectTabbable,\n onChange: handleOnUnitChange,\n size: ['small', 'compact'].includes(size) || size === 'default' && !props.__next40pxDefaultSize ? 'small' : 'default',\n unit: unit,\n units: units,\n onFocus: onFocusProp,\n onBlur: unitControlProps.onBlur\n }) : null;\n let step = props.step;\n\n /*\n * If no step prop has been passed, lookup the active unit and\n * try to get step from `units`, or default to a value of `1`\n */\n if (!step && units) {\n var _activeUnit$step;\n const activeUnit = units.find(option => option.value === unit);\n step = (_activeUnit$step = activeUnit?.step) !== null && _activeUnit$step !== void 0 ? _activeUnit$step : 1;\n }\n return /*#__PURE__*/_jsx(ValueInput, {\n ...props,\n __shouldNotWarnDeprecated36pxSize: true,\n autoComplete: autoComplete,\n className: classes,\n disabled: disabled,\n spinControls: \"none\",\n isPressEnterToChange: isPressEnterToChange,\n label: label,\n onKeyDown: handleOnKeyDown,\n onChange: handleOnQuantityChange,\n ref: forwardedRef,\n size: size,\n suffix: inputSuffix,\n type: isPressEnterToChange ? 'text' : 'number',\n value: parsedQuantity !== null && parsedQuantity !== void 0 ? parsedQuantity : '',\n step: step,\n onFocus: onFocusProp,\n __unstableStateReducer: __unstableStateReducer\n });\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl __next40pxDefaultSize onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef(UnforwardedUnitControl);\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,wBAAuB;AACvB,qBAAuD;AACvD,kBAAmB;AAMnB,iCAA2B;AAC3B,iCAA8B;AAC9B,mBAA4G;AAC5G,mBAAmC;AACnC,qBAA6B;AAC7B,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { forwardRef, useMemo, useRef, useEffect } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport { ValueInput } from './styles/unit-control-styles';\nimport UnitSelectControl from './unit-select-control';\nimport { CSS_UNITS, getParsedQuantityAndUnit, getUnitsWithCurrentUnit, getValidParsedQuantityAndUnit } from './utils';\nimport { useControlledState } from '../utils/hooks';\nimport { escapeRegExp } from '../utils/strings';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedUnitControl(unitControlProps, forwardedRef) {\n const {\n __unstableStateReducer,\n autoComplete = 'off',\n // @ts-expect-error Ensure that children is omitted from restProps\n children,\n className,\n disabled = false,\n disableUnits = false,\n isPressEnterToChange = false,\n isResetValueOnUnitChange = false,\n isUnitSelectTabbable = true,\n label,\n onChange: onChangeProp,\n onUnitChange,\n size = 'default',\n unit: unitProp,\n units: unitsProp = CSS_UNITS,\n value: valueProp,\n onFocus: onFocusProp,\n __shouldNotWarnDeprecated36pxSize,\n ...props\n } = useDeprecated36pxDefaultSizeProp(unitControlProps);\n maybeWarnDeprecated36pxSize({\n componentName: 'UnitControl',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n if ('unit' in unitControlProps) {\n deprecated('UnitControl unit prop', {\n since: '5.6',\n hint: 'The unit should be provided within the `value` prop.',\n version: '6.2'\n });\n }\n\n // The `value` prop, in theory, should not be `null`, but the following line\n // ensures it fallback to `undefined` in case a consumer of `UnitControl`\n // still passes `null` as a `value`.\n const nonNullValueProp = valueProp !== null && valueProp !== void 0 ? valueProp : undefined;\n const [units, reFirstCharacterOfUnits] = useMemo(() => {\n const list = getUnitsWithCurrentUnit(nonNullValueProp, unitProp, unitsProp);\n const [{\n value: firstUnitValue = ''\n } = {}, ...rest] = list;\n const firstCharacters = rest.reduce((carry, {\n value\n }) => {\n const first = escapeRegExp(value?.substring(0, 1) || '');\n return carry.includes(first) ? carry : `${carry}|${first}`;\n }, escapeRegExp(firstUnitValue.substring(0, 1)));\n return [list, new RegExp(`^(?:${firstCharacters})$`, 'i')];\n }, [nonNullValueProp, unitProp, unitsProp]);\n const [parsedQuantity, parsedUnit] = getParsedQuantityAndUnit(nonNullValueProp, unitProp, units);\n const [unit, setUnit] = useControlledState(units.length === 1 ? units[0].value : unitProp, {\n initial: parsedUnit,\n fallback: ''\n });\n useEffect(() => {\n if (parsedUnit !== undefined) {\n setUnit(parsedUnit);\n }\n }, [parsedUnit, setUnit]);\n const classes = clsx('components-unit-control',\n // This class is added for legacy purposes to maintain it on the outer\n // wrapper. See: https://github.com/WordPress/gutenberg/pull/45139\n 'components-unit-control-wrapper', className);\n const handleOnQuantityChange = (nextQuantityValue, changeProps) => {\n if (nextQuantityValue === '' || typeof nextQuantityValue === 'undefined' || nextQuantityValue === null) {\n onChangeProp?.('', changeProps);\n return;\n }\n\n /*\n * Customizing the onChange callback.\n * This allows as to broadcast a combined value+unit to onChange.\n */\n const onChangeValue = getValidParsedQuantityAndUnit(nextQuantityValue, units, parsedQuantity, unit).join('');\n onChangeProp?.(onChangeValue, changeProps);\n };\n const handleOnUnitChange = (nextUnitValue, changeProps) => {\n const {\n data\n } = changeProps;\n let nextValue = `${parsedQuantity !== null && parsedQuantity !== void 0 ? parsedQuantity : ''}${nextUnitValue}`;\n if (isResetValueOnUnitChange && data?.default !== undefined) {\n nextValue = `${data.default}${nextUnitValue}`;\n }\n onChangeProp?.(nextValue, changeProps);\n onUnitChange?.(nextUnitValue, changeProps);\n setUnit(nextUnitValue);\n };\n let handleOnKeyDown;\n if (!disableUnits && isUnitSelectTabbable && units.length) {\n handleOnKeyDown = event => {\n props.onKeyDown?.(event);\n // Unless the meta or ctrl key was pressed (to avoid interfering with\n // shortcuts, e.g. pastes), move focus to the unit select if a key\n // matches the first character of a unit.\n if (!event.metaKey && !event.ctrlKey && reFirstCharacterOfUnits.test(event.key)) {\n refInputSuffix.current?.focus();\n }\n };\n }\n const refInputSuffix = useRef(null);\n const inputSuffix = !disableUnits ? /*#__PURE__*/_jsx(UnitSelectControl, {\n ref: refInputSuffix,\n \"aria-label\": __('Select unit'),\n disabled: disabled,\n isUnitSelectTabbable: isUnitSelectTabbable,\n onChange: handleOnUnitChange,\n size: ['small', 'compact'].includes(size) || size === 'default' && !props.__next40pxDefaultSize ? 'small' : 'default',\n unit: unit,\n units: units,\n onFocus: onFocusProp,\n onBlur: unitControlProps.onBlur\n }) : null;\n let step = props.step;\n\n /*\n * If no step prop has been passed, lookup the active unit and\n * try to get step from `units`, or default to a value of `1`\n */\n if (!step && units) {\n var _activeUnit$step;\n const activeUnit = units.find(option => option.value === unit);\n step = (_activeUnit$step = activeUnit?.step) !== null && _activeUnit$step !== void 0 ? _activeUnit$step : 1;\n }\n return /*#__PURE__*/_jsx(ValueInput, {\n ...props,\n __shouldNotWarnDeprecated36pxSize: true,\n autoComplete: autoComplete,\n className: classes,\n disabled: disabled,\n spinControls: \"none\",\n isPressEnterToChange: isPressEnterToChange,\n label: label,\n onKeyDown: handleOnKeyDown,\n onChange: handleOnQuantityChange,\n ref: forwardedRef,\n size: size,\n suffix: inputSuffix,\n type: isPressEnterToChange ? 'text' : 'number',\n value: parsedQuantity !== null && parsedQuantity !== void 0 ? parsedQuantity : '',\n step: step,\n onFocus: onFocusProp,\n __unstableStateReducer: __unstableStateReducer\n });\n}\n\n/**\n * `UnitControl` allows the user to set a numeric quantity as well as a unit (e.g. `px`).\n *\n *\n * ```jsx\n * import { __experimentalUnitControl as UnitControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '10px' );\n *\n * return <UnitControl __next40pxDefaultSize onChange={ setValue } value={ value } />;\n * };\n * ```\n */\nexport const UnitControl = forwardRef(UnforwardedUnitControl);\nUnitControl.displayName = 'UnitControl';\nexport { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';\nexport default UnitControl;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,wBAAuB;AACvB,qBAAuD;AACvD,kBAAmB;AAMnB,iCAA2B;AAC3B,iCAA8B;AAC9B,mBAA4G;AAC5G,mBAAmC;AACnC,qBAA6B;AAC7B,kCAAiD;AACjD,kCAA4C;AAC5C,yBAA4B;AAyK5B,IAAAA,gBAAiE;AAxKjE,SAAS,uBAAuB,kBAAkB,cAAc;AAC9D,QAAM;AAAA,IACJ;AAAA,IACA,eAAe;AAAA;AAAA,IAEf;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,eAAe;AAAA,IACf,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,uBAAuB;AAAA,IACvB;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO,YAAY;AAAA,IACnB,OAAO;AAAA,IACP,SAAS;AAAA,IACT;AAAA,IACA,GAAG;AAAA,EACL,QAAI,8DAAiC,gBAAgB;AACrD,+DAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,uBAAuB,MAAM;AAAA,IAC7B;AAAA,IACA;AAAA,EACF,CAAC;AACD,MAAI,UAAU,kBAAkB;AAC9B,0BAAAC,SAAW,yBAAyB;AAAA,MAClC,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,IACX,CAAC;AAAA,EACH;AAKA,QAAM,mBAAmB,cAAc,QAAQ,cAAc,SAAS,YAAY;AAClF,QAAM,CAAC,OAAO,uBAAuB,QAAI,wBAAQ,MAAM;AACrD,UAAM,WAAO,sCAAwB,kBAAkB,UAAU,SAAS;AAC1E,UAAM,CAAC;AAAA,MACL,OAAO,iBAAiB;AAAA,IAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,IAAI;AACnB,UAAM,kBAAkB,KAAK,OAAO,CAAC,OAAO;AAAA,MAC1C;AAAA,IACF,MAAM;AACJ,YAAM,YAAQ,6BAAa,OAAO,UAAU,GAAG,CAAC,KAAK,EAAE;AACvD,aAAO,MAAM,SAAS,KAAK,IAAI,QAAQ,GAAG,KAAK,IAAI,KAAK;AAAA,IAC1D,OAAG,6BAAa,eAAe,UAAU,GAAG,CAAC,CAAC,CAAC;AAC/C,WAAO,CAAC,MAAM,IAAI,OAAO,OAAO,eAAe,MAAM,GAAG,CAAC;AAAA,EAC3D,GAAG,CAAC,kBAAkB,UAAU,SAAS,CAAC;AAC1C,QAAM,CAAC,gBAAgB,UAAU,QAAI,uCAAyB,kBAAkB,UAAU,KAAK;AAC/F,QAAM,CAAC,MAAM,OAAO,QAAI,iCAAmB,MAAM,WAAW,IAAI,MAAM,CAAC,EAAE,QAAQ,UAAU;AAAA,IACzF,SAAS;AAAA,IACT,UAAU;AAAA,EACZ,CAAC;AACD,gCAAU,MAAM;AACd,QAAI,eAAe,QAAW;AAC5B,cAAQ,UAAU;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,YAAY,OAAO,CAAC;AACxB,QAAM,cAAU,YAAAC;AAAA,IAAK;AAAA;AAAA;AAAA,IAGrB;AAAA,IAAmC;AAAA,EAAS;AAC5C,QAAM,yBAAyB,CAAC,mBAAmB,gBAAgB;AACjE,QAAI,sBAAsB,MAAM,OAAO,sBAAsB,eAAe,sBAAsB,MAAM;AACtG,qBAAe,IAAI,WAAW;AAC9B;AAAA,IACF;AAMA,UAAM,oBAAgB,4CAA8B,mBAAmB,OAAO,gBAAgB,IAAI,EAAE,KAAK,EAAE;AAC3G,mBAAe,eAAe,WAAW;AAAA,EAC3C;AACA,QAAM,qBAAqB,CAAC,eAAe,gBAAgB;AACzD,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,QAAI,YAAY,GAAG,mBAAmB,QAAQ,mBAAmB,SAAS,iBAAiB,EAAE,GAAG,aAAa;AAC7G,QAAI,4BAA4B,MAAM,YAAY,QAAW;AAC3D,kBAAY,GAAG,KAAK,OAAO,GAAG,aAAa;AAAA,IAC7C;AACA,mBAAe,WAAW,WAAW;AACrC,mBAAe,eAAe,WAAW;AACzC,YAAQ,aAAa;AAAA,EACvB;AACA,MAAI;AACJ,MAAI,CAAC,gBAAgB,wBAAwB,MAAM,QAAQ;AACzD,sBAAkB,WAAS;AACzB,YAAM,YAAY,KAAK;AAIvB,UAAI,CAAC,MAAM,WAAW,CAAC,MAAM,WAAW,wBAAwB,KAAK,MAAM,GAAG,GAAG;AAC/E,uBAAe,SAAS,MAAM;AAAA,MAChC;AAAA,IACF;AAAA,EACF;AACA,QAAM,qBAAiB,uBAAO,IAAI;AAClC,QAAM,cAAc,CAAC,eAA4B,uCAAAC,KAAK,2BAAAC,SAAmB;AAAA,IACvE,KAAK;AAAA,IACL,kBAAc,gBAAG,aAAa;AAAA,IAC9B;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,MAAM,CAAC,SAAS,SAAS,EAAE,SAAS,IAAI,KAAK,SAAS,aAAa,CAAC,MAAM,wBAAwB,UAAU;AAAA,IAC5G;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,QAAQ,iBAAiB;AAAA,EAC3B,CAAC,IAAI;AACL,MAAI,OAAO,MAAM;AAMjB,MAAI,CAAC,QAAQ,OAAO;AAClB,QAAI;AACJ,UAAM,aAAa,MAAM,KAAK,YAAU,OAAO,UAAU,IAAI;AAC7D,YAAQ,mBAAmB,YAAY,UAAU,QAAQ,qBAAqB,SAAS,mBAAmB;AAAA,EAC5G;AACA,SAAoB,uCAAAD,KAAK,uCAAY;AAAA,IACnC,GAAG;AAAA,IACH,mCAAmC;AAAA,IACnC;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAU;AAAA,IACV,KAAK;AAAA,IACL;AAAA,IACA,QAAQ;AAAA,IACR,MAAM,uBAAuB,SAAS;AAAA,IACtC,OAAO,mBAAmB,QAAQ,mBAAmB,SAAS,iBAAiB;AAAA,IAC/E;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EACF,CAAC;AACH;AAiBO,IAAM,kBAAc,2BAAW,sBAAsB;AAC5D,YAAY,cAAc;AAE1B,IAAO,uBAAQ;",
|
|
6
6
|
"names": ["import_utils", "deprecated", "clsx", "_jsx", "UnitSelectControl"]
|
|
7
7
|
}
|