@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
|
@@ -18,6 +18,7 @@ var UnforwardedDisclosureContent = ({
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
var DisclosureContent2 = forwardRef(UnforwardedDisclosureContent);
|
|
21
|
+
DisclosureContent2.displayName = "DisclosureContent";
|
|
21
22
|
var disclosure_default = DisclosureContent2;
|
|
22
23
|
export {
|
|
23
24
|
DisclosureContent2 as DisclosureContent,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/disclosure/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nexport default DisclosureContent;"],
|
|
5
|
-
"mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,qBAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMA,qBAAoB,WAAW,4BAA4B;
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Accessible Disclosure component that controls visibility of a section of\n * content. It follows the WAI-ARIA Disclosure Pattern.\n */\nconst UnforwardedDisclosureContent = ({\n visible,\n children,\n ...props\n}, ref) => {\n const disclosure = Ariakit.useDisclosureStore({\n open: visible\n });\n return /*#__PURE__*/_jsx(Ariakit.DisclosureContent, {\n store: disclosure,\n ref: ref,\n ...props,\n children: children\n });\n};\nexport const DisclosureContent = forwardRef(UnforwardedDisclosureContent);\nDisclosureContent.displayName = 'DisclosureContent';\nexport default DisclosureContent;"],
|
|
5
|
+
"mappings": ";AAGA,YAAY,aAAa;AAKzB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAK5B,IAAM,+BAA+B,CAAC;AAAA,EACpC;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG,QAAQ;AACT,QAAM,aAAqB,2BAAmB;AAAA,IAC5C,MAAM;AAAA,EACR,CAAC;AACD,SAAoB,qBAAa,2BAAmB;AAAA,IAClD,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,IACH;AAAA,EACF,CAAC;AACH;AACO,IAAMA,qBAAoB,WAAW,4BAA4B;AACxEA,mBAAkB,cAAc;AAChC,IAAO,qBAAQA;",
|
|
6
6
|
"names": ["DisclosureContent"]
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// packages/components/src/duotone-picker/duotone-picker.tsx
|
|
2
|
-
import fastDeepEqual from "fast-deep-equal/es6";
|
|
2
|
+
import fastDeepEqual from "fast-deep-equal/es6/index.js";
|
|
3
3
|
import { useMemo } from "@wordpress/element";
|
|
4
4
|
import { __, sprintf } from "@wordpress/i18n";
|
|
5
5
|
import ColorListPicker from "./color-list-picker/index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/duotone-picker/duotone-picker.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from './color-list-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * ```jsx\n * import { DuotonePicker, DuotoneSwatch } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const DUOTONE_PALETTE = [\n * \t{ colors: [ '#8c00b7', '#fcff41' ], name: 'Purple and yellow', slug: 'purple-yellow' },\n * \t{ colors: [ '#000097', '#ff4747' ], name: 'Blue and red', slug: 'blue-red' },\n * ];\n *\n * const COLOR_PALETTE = [\n * \t{ color: '#ff4747', name: 'Red', slug: 'red' },\n * \t{ color: '#fcff41', name: 'Yellow', slug: 'yellow' },\n * \t{ color: '#000097', name: 'Blue', slug: 'blue' },\n * \t{ color: '#8c00b7', name: 'Purple', slug: 'purple' },\n * ];\n *\n * const Example = () => {\n * \tconst [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );\n * \treturn (\n * \t\t<>\n * \t\t\t<DuotonePicker\n * \t\t\t\tduotonePalette={ DUOTONE_PALETTE }\n * \t\t\t\tcolorPalette={ COLOR_PALETTE }\n * \t\t\t\tvalue={ duotone }\n * \t\t\t\tonChange={ setDuotone }\n * \t\t\t/>\n * \t\t\t<DuotoneSwatch values={ duotone } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nfunction DuotonePicker({\n asButtons,\n loop,\n clearable = true,\n unsetable = true,\n colorPalette,\n duotonePalette,\n disableCustomColors,\n disableCustomDuotone,\n value,\n onChange,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n}) {\n const [defaultDark, defaultLight] = useMemo(() => getDefaultColors(colorPalette), [colorPalette]);\n const isUnset = value === 'unset';\n const unsetOptionLabel = __('Unset');\n const unsetOption = /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: \"unset\",\n isSelected: isUnset,\n tooltipText: unsetOptionLabel,\n \"aria-label\": unsetOptionLabel,\n className: \"components-duotone-picker__color-indicator\",\n onClick: () => {\n onChange(isUnset ? undefined : 'unset');\n }\n }, \"unset\");\n const duotoneOptions = duotonePalette.map(({\n colors,\n slug,\n name\n }) => {\n const style = {\n background: getGradientFromCSSColors(colors, '135deg'),\n color: 'transparent'\n };\n const tooltipText = name !== null && name !== void 0 ? name : sprintf(\n // translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n __('Duotone code: %s'), slug);\n const label = name ? sprintf(\n // translators: %s: The name of the option e.g: \"Dark grayscale\".\n __('Duotone: %s'), name) : tooltipText;\n const isSelected = fastDeepEqual(colors, value);\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: colors,\n isSelected: isSelected,\n \"aria-label\": label,\n tooltipText: tooltipText,\n style: style,\n onClick: () => {\n onChange(isSelected ? undefined : colors);\n }\n }, slug);\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n const options = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;\n return /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...otherProps,\n ...metaProps,\n ...labelProps,\n options: options,\n actions: !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: () => onChange(undefined),\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n }),\n children: /*#__PURE__*/_jsx(Spacer, {\n paddingTop: options.length === 0 ? 0 : 4,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n children: [!disableCustomColors && !disableCustomDuotone && /*#__PURE__*/_jsx(CustomDuotoneBar, {\n value: isUnset ? undefined : value,\n onChange: onChange\n }), !disableCustomDuotone && /*#__PURE__*/_jsx(ColorListPicker, {\n labels: [__('Shadows'), __('Highlights')],\n colors: colorPalette,\n value: isUnset ? undefined : value,\n disableCustomColors: disableCustomColors,\n enableAlpha: true,\n onChange: newColors => {\n if (!newColors[0]) {\n newColors[0] = defaultDark;\n }\n if (!newColors[1]) {\n newColors[1] = defaultLight;\n }\n const newValue = newColors.length >= 2 ? newColors : undefined;\n // @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,\n // but it's currently typed as a string[].\n // See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035\n onChange(newValue);\n }\n })]\n })\n })\n });\n}\nexport default DuotonePicker;"],
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ColorListPicker from './color-list-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport CustomDuotoneBar from './custom-duotone-bar';\nimport { getDefaultColors, getGradientFromCSSColors } from './utils';\nimport { Spacer } from '../spacer';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * ```jsx\n * import { DuotonePicker, DuotoneSwatch } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const DUOTONE_PALETTE = [\n * \t{ colors: [ '#8c00b7', '#fcff41' ], name: 'Purple and yellow', slug: 'purple-yellow' },\n * \t{ colors: [ '#000097', '#ff4747' ], name: 'Blue and red', slug: 'blue-red' },\n * ];\n *\n * const COLOR_PALETTE = [\n * \t{ color: '#ff4747', name: 'Red', slug: 'red' },\n * \t{ color: '#fcff41', name: 'Yellow', slug: 'yellow' },\n * \t{ color: '#000097', name: 'Blue', slug: 'blue' },\n * \t{ color: '#8c00b7', name: 'Purple', slug: 'purple' },\n * ];\n *\n * const Example = () => {\n * \tconst [ duotone, setDuotone ] = useState( [ '#000000', '#ffffff' ] );\n * \treturn (\n * \t\t<>\n * \t\t\t<DuotonePicker\n * \t\t\t\tduotonePalette={ DUOTONE_PALETTE }\n * \t\t\t\tcolorPalette={ COLOR_PALETTE }\n * \t\t\t\tvalue={ duotone }\n * \t\t\t\tonChange={ setDuotone }\n * \t\t\t/>\n * \t\t\t<DuotoneSwatch values={ duotone } />\n * \t\t</>\n * \t);\n * };\n * ```\n */\nfunction DuotonePicker({\n asButtons,\n loop,\n clearable = true,\n unsetable = true,\n colorPalette,\n duotonePalette,\n disableCustomColors,\n disableCustomDuotone,\n value,\n onChange,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...otherProps\n}) {\n const [defaultDark, defaultLight] = useMemo(() => getDefaultColors(colorPalette), [colorPalette]);\n const isUnset = value === 'unset';\n const unsetOptionLabel = __('Unset');\n const unsetOption = /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: \"unset\",\n isSelected: isUnset,\n tooltipText: unsetOptionLabel,\n \"aria-label\": unsetOptionLabel,\n className: \"components-duotone-picker__color-indicator\",\n onClick: () => {\n onChange(isUnset ? undefined : 'unset');\n }\n }, \"unset\");\n const duotoneOptions = duotonePalette.map(({\n colors,\n slug,\n name\n }) => {\n const style = {\n background: getGradientFromCSSColors(colors, '135deg'),\n color: 'transparent'\n };\n const tooltipText = name !== null && name !== void 0 ? name : sprintf(\n // translators: %s: duotone code e.g: \"dark-grayscale\" or \"7f7f7f-ffffff\".\n __('Duotone code: %s'), slug);\n const label = name ? sprintf(\n // translators: %s: The name of the option e.g: \"Dark grayscale\".\n __('Duotone: %s'), name) : tooltipText;\n const isSelected = fastDeepEqual(colors, value);\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n value: colors,\n isSelected: isSelected,\n \"aria-label\": label,\n tooltipText: tooltipText,\n style: style,\n onClick: () => {\n onChange(isSelected ? undefined : colors);\n }\n }, slug);\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n const options = unsetable ? [unsetOption, ...duotoneOptions] : duotoneOptions;\n return /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...otherProps,\n ...metaProps,\n ...labelProps,\n options: options,\n actions: !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: () => onChange(undefined),\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n }),\n children: /*#__PURE__*/_jsx(Spacer, {\n paddingTop: options.length === 0 ? 0 : 4,\n children: /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n children: [!disableCustomColors && !disableCustomDuotone && /*#__PURE__*/_jsx(CustomDuotoneBar, {\n value: isUnset ? undefined : value,\n onChange: onChange\n }), !disableCustomDuotone && /*#__PURE__*/_jsx(ColorListPicker, {\n labels: [__('Shadows'), __('Highlights')],\n colors: colorPalette,\n value: isUnset ? undefined : value,\n disableCustomColors: disableCustomColors,\n enableAlpha: true,\n onChange: newColors => {\n if (!newColors[0]) {\n newColors[0] = defaultDark;\n }\n if (!newColors[1]) {\n newColors[1] = defaultLight;\n }\n const newValue = newColors.length >= 2 ? newColors : undefined;\n // @ts-expect-error TODO: The color arrays for a DuotonePicker should be a tuple of two colors,\n // but it's currently typed as a string[].\n // See also https://github.com/WordPress/gutenberg/pull/49060#discussion_r1136951035\n onChange(newValue);\n }\n })]\n })\n })\n });\n}\nexport default DuotonePicker;"],
|
|
5
5
|
"mappings": ";AAGA,OAAO,mBAAmB;AAK1B,SAAS,eAAe;AACxB,SAAS,IAAI,eAAe;AAK5B,OAAO,qBAAqB;AAC5B,OAAO,wBAAwB,iDAAiD;AAChF,SAAS,cAAc;AACvB,OAAO,sBAAsB;AAC7B,SAAS,kBAAkB,gCAAgC;AAC3D,SAAS,cAAc;AACvB,SAAS,OAAO,MAAM,QAAQ,aAAa;AAkC3C,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,GAAG;AACL,GAAG;AACD,QAAM,CAAC,aAAa,YAAY,IAAI,QAAQ,MAAM,iBAAiB,YAAY,GAAG,CAAC,YAAY,CAAC;AAChG,QAAM,UAAU,UAAU;AAC1B,QAAM,mBAAmB,GAAG,OAAO;AACnC,QAAM,cAA2B,qBAAK,qBAAqB,QAAQ;AAAA,IACjE,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,cAAc;AAAA,IACd,WAAW;AAAA,IACX,SAAS,MAAM;AACb,eAAS,UAAU,SAAY,OAAO;AAAA,IACxC;AAAA,EACF,GAAG,OAAO;AACV,QAAM,iBAAiB,eAAe,IAAI,CAAC;AAAA,IACzC;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAM;AACJ,UAAM,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A,UAC9D,QAAQ,CAAC,GAAG,SAAS,GAAG,GAAG,YAAY,CAAC;AAAA,UACxC,QAAQ;AAAA,UACR,OAAO,UAAU,SAAY;AAAA,UAC7B;AAAA,UACA,aAAa;AAAA,UACb,UAAU,eAAa;AACrB,gBAAI,CAAC,UAAU,CAAC,GAAG;AACjB,wBAAU,CAAC,IAAI;AAAA,YACjB;AACA,gBAAI,CAAC,UAAU,CAAC,GAAG;AACjB,wBAAU,CAAC,IAAI;AAAA,YACjB;AACA,kBAAM,WAAW,UAAU,UAAU,IAAI,YAAY;AAIrD,qBAAS,QAAQ;AAAA,UACnB;AAAA,QACF,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AACA,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/external-link/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedExternalLink(props, ref) {\n const {\n href,\n children,\n className,\n rel = '',\n ...additionalProps\n } = props;\n const optimizedRel = [...new Set([...rel.split(' '), 'external', 'noreferrer', 'noopener'].filter(Boolean))].join(' ');\n const classes = clsx('components-external-link', className);\n /* Anchor links are perceived as external links.\n This constant helps check for on page anchor links,\n to prevent them from being opened in the editor. */\n const isInternalAnchor = !!href?.startsWith('#');\n const onClickHandler = event => {\n if (isInternalAnchor) {\n event.preventDefault();\n }\n if (props.onClick) {\n props.onClick(event);\n }\n };\n return /*#__PURE__*/ /* eslint-disable react/jsx-no-target-blank */_jsxs(\"a\", {\n ...additionalProps,\n className: classes,\n href: href,\n onClick: onClickHandler,\n target: \"_blank\",\n rel: optimizedRel,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__contents\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__icon\",\n \"aria-label\": /* translators: accessibility text */\n __('(opens in a new tab)'),\n children: isRTL() ? '\\u2196' : '\\u2197'\n })]\n })\n /* eslint-enable react/jsx-no-target-blank */;\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n * <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef(UnforwardedExternalLink);\nexport default ExternalLink;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,IAAI,aAAa;AAC1B,SAAS,kBAAkB;AAK3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,wBAAwB,OAAO,KAAK;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAe,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,MAAM,GAAG,GAAG,YAAY,cAAc,UAAU,EAAE,OAAO,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG;AACrH,QAAM,UAAU,KAAK,4BAA4B,SAAS;AAI1D,QAAM,mBAAmB,CAAC,CAAC,MAAM,WAAW,GAAG;AAC/C,QAAM,iBAAiB,WAAS;AAC9B,QAAI,kBAAkB;AACpB,YAAM,eAAe;AAAA,IACvB;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,KAAK;AAAA,IACrB;AAAA,EACF;AACA;AAAA;AAAA,IAAmE,sBAAM,KAAK;AAAA,MAC5E,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,KAAK;AAAA,MACL;AAAA,MACA,UAAU,CAAc,qBAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,qBAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX;AAAA;AAAA,UACA,GAAG,sBAAsB;AAAA;AAAA,QACzB,UAAU,MAAM,IAAI,WAAW;AAAA,MACjC,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA;AAEH;AAaO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedExternalLink(props, ref) {\n const {\n href,\n children,\n className,\n rel = '',\n ...additionalProps\n } = props;\n const optimizedRel = [...new Set([...rel.split(' '), 'external', 'noreferrer', 'noopener'].filter(Boolean))].join(' ');\n const classes = clsx('components-external-link', className);\n /* Anchor links are perceived as external links.\n This constant helps check for on page anchor links,\n to prevent them from being opened in the editor. */\n const isInternalAnchor = !!href?.startsWith('#');\n const onClickHandler = event => {\n if (isInternalAnchor) {\n event.preventDefault();\n }\n if (props.onClick) {\n props.onClick(event);\n }\n };\n return /*#__PURE__*/ /* eslint-disable react/jsx-no-target-blank */_jsxs(\"a\", {\n ...additionalProps,\n className: classes,\n href: href,\n onClick: onClickHandler,\n target: \"_blank\",\n rel: optimizedRel,\n ref: ref,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__contents\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-external-link__icon\",\n \"aria-label\": /* translators: accessibility text */\n __('(opens in a new tab)'),\n children: isRTL() ? '\\u2196' : '\\u2197'\n })]\n })\n /* eslint-enable react/jsx-no-target-blank */;\n}\n\n/**\n * Link to an external resource.\n *\n * ```jsx\n * import { ExternalLink } from '@wordpress/components';\n *\n * const MyExternalLink = () => (\n * <ExternalLink href=\"https://wordpress.org\">WordPress.org</ExternalLink>\n * );\n * ```\n */\nexport const ExternalLink = forwardRef(UnforwardedExternalLink);\nExternalLink.displayName = 'ExternalLink';\nexport default ExternalLink;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,IAAI,aAAa;AAC1B,SAAS,kBAAkB;AAK3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,wBAAwB,OAAO,KAAK;AAC3C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM;AAAA,IACN,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,eAAe,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,IAAI,MAAM,GAAG,GAAG,YAAY,cAAc,UAAU,EAAE,OAAO,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG;AACrH,QAAM,UAAU,KAAK,4BAA4B,SAAS;AAI1D,QAAM,mBAAmB,CAAC,CAAC,MAAM,WAAW,GAAG;AAC/C,QAAM,iBAAiB,WAAS;AAC9B,QAAI,kBAAkB;AACpB,YAAM,eAAe;AAAA,IACvB;AACA,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,KAAK;AAAA,IACrB;AAAA,EACF;AACA;AAAA;AAAA,IAAmE,sBAAM,KAAK;AAAA,MAC5E,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,KAAK;AAAA,MACL;AAAA,MACA,UAAU,CAAc,qBAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,qBAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX;AAAA;AAAA,UACA,GAAG,sBAAsB;AAAA;AAAA,QACzB,UAAU,MAAM,IAAI,WAAW;AAAA,MACjC,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA;AAEH;AAaO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -180,6 +180,7 @@ var UnforwardedFontSizePicker = (props, ref) => {
|
|
|
180
180
|
});
|
|
181
181
|
};
|
|
182
182
|
var FontSizePicker = forwardRef(UnforwardedFontSizePicker);
|
|
183
|
+
FontSizePicker.displayName = "FontSizePicker";
|
|
183
184
|
var font_size_picker_default = FontSizePicker;
|
|
184
185
|
export {
|
|
185
186
|
FontSizePicker,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/font-size-picker/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport { default as UnitControl, parseQuantityAndUnitFromRawValue, useCustomUnits } from '../unit-control';\nimport { Container, Header, HeaderLabel, HeaderToggle } from './styles';\nimport { Spacer } from '../spacer';\nimport FontSizePickerSelect from './font-size-picker-select';\nimport FontSizePickerToggleGroup from './font-size-picker-toggle-group';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];\nconst MAX_TOGGLE_GROUP_SIZES = 5;\nconst UnforwardedFontSizePicker = (props, ref) => {\n const {\n __next40pxDefaultSize = false,\n fallbackFontSize,\n fontSizes = [],\n disableCustomFontSizes = false,\n onChange,\n size = 'default',\n units: unitsProp = DEFAULT_UNITS,\n value,\n valueMode = 'literal',\n withSlider = false,\n withReset = true\n } = props;\n const labelId = useInstanceId(UnforwardedFontSizePicker, 'font-size-picker-label');\n const units = useCustomUnits({\n availableUnits: unitsProp\n });\n const selectedFontSize = (() => {\n if (!value) {\n return undefined;\n }\n\n // If valueMode is 'slug', find by slug\n if (valueMode === 'slug') {\n return fontSizes.find(fontSize => fontSize.slug === value);\n }\n\n // If valueMode is 'literal', find by size value\n return fontSizes.find(fontSize => fontSize.size === value);\n })();\n const isCustomValue = !!value && !selectedFontSize;\n\n // Initially request a custom picker if the value is not from the predef list.\n const [userRequestedCustom, setUserRequestedCustom] = useState(isCustomValue);\n\n // Resolve the literal value to use in custom controls when operating in slug mode.\n // When `valueMode` is 'slug', the `value` prop contains the slug of the\n // selected preset. In that case, the custom input should reflect the preset's\n // actual size value so it pre-populates correctly after clicking \"Set custom size\".\n const resolvedValueForControls = valueMode === 'slug' ? selectedFontSize?.size : value;\n let currentPickerType;\n if (!disableCustomFontSizes && userRequestedCustom) {\n // While showing the custom value picker, switch back to predef only if\n // `disableCustomFontSizes` is set to `true`.\n currentPickerType = 'custom';\n } else {\n currentPickerType = fontSizes.length > MAX_TOGGLE_GROUP_SIZES ? 'select' : 'togglegroup';\n }\n if (fontSizes.length === 0 && disableCustomFontSizes) {\n return null;\n }\n\n // If neither the value or first font size is a string, then FontSizePicker\n // operates in a legacy \"unitless\" mode where UnitControl can only be used\n // to select px values and onChange() is always called with number values.\n const hasUnits = typeof resolvedValueForControls === 'string' || typeof fontSizes[0]?.size === 'string';\n const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(resolvedValueForControls, units);\n const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);\n const isDisabled = value === undefined;\n maybeWarnDeprecated36pxSize({\n componentName: 'FontSizePicker',\n __next40pxDefaultSize,\n size\n });\n return /*#__PURE__*/_jsxs(Container, {\n ref: ref,\n className: \"components-font-size-picker\"\n // This Container component renders a fieldset element that needs to be labeled.\n ,\n \"aria-labelledby\": labelId,\n children: [/*#__PURE__*/_jsx(Spacer, {\n children: /*#__PURE__*/_jsxs(Header, {\n className: \"components-font-size-picker__header\",\n children: [/*#__PURE__*/_jsx(HeaderLabel, {\n id: labelId,\n children: __('Font size')\n }), !disableCustomFontSizes && /*#__PURE__*/_jsx(HeaderToggle, {\n label: currentPickerType === 'custom' ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => setUserRequestedCustom(!userRequestedCustom),\n isPressed: currentPickerType === 'custom',\n size: \"small\"\n })]\n })\n }), /*#__PURE__*/_jsxs(\"div\", {\n children: [currentPickerType === 'select' && /*#__PURE__*/_jsx(FontSizePickerSelect, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n disableCustomFontSizes: disableCustomFontSizes,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n },\n onSelectCustom: () => setUserRequestedCustom(true)\n }), currentPickerType === 'togglegroup' && /*#__PURE__*/_jsx(FontSizePickerToggleGroup, {\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n __next40pxDefaultSize: __next40pxDefaultSize,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n }\n }), currentPickerType === 'custom' && /*#__PURE__*/_jsxs(Flex, {\n className: \"components-font-size-picker__custom-size-control\",\n children: [/*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(UnitControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n label: __('Font size'),\n labelPosition: \"top\",\n hideLabelFromVision: true,\n value: hasUnits ? `${valueQuantity !== null && valueQuantity !== void 0 ? valueQuantity : ''}${valueUnit !== null && valueUnit !== void 0 ? valueUnit : ''}` : resolvedValueForControls,\n onChange: newValue => {\n setUserRequestedCustom(true);\n\n // Treat clearing the input (empty string) as a reset\n if (newValue === undefined || newValue === '') {\n onChange?.(undefined);\n } else {\n onChange?.(hasUnits ? newValue : parseInt(newValue, 10));\n }\n },\n size: size,\n units: hasUnits ? units : [],\n min: 0\n })\n }), withSlider && /*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(Spacer, {\n marginX: 2,\n marginBottom: 0,\n children: /*#__PURE__*/_jsx(RangeControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n className: \"components-font-size-picker__custom-input\",\n label: __('Font size'),\n hideLabelFromVision: true,\n value: valueQuantity,\n initialPosition: fallbackFontSize,\n withInputField: false,\n onChange: newValue => {\n setUserRequestedCustom(true);\n if (newValue === undefined) {\n onChange?.(undefined);\n } else if (hasUnits) {\n onChange?.(newValue + (valueUnit !== null && valueUnit !== void 0 ? valueUnit : 'px'));\n } else {\n onChange?.(newValue);\n }\n },\n min: 0,\n max: isValueUnitRelative ? 10 : 100,\n step: isValueUnitRelative ? 0.1 : 1\n })\n })\n }), withReset && /*#__PURE__*/_jsx(FlexItem, {\n children: /*#__PURE__*/_jsx(Button, {\n disabled: isDisabled,\n accessibleWhenDisabled: true,\n onClick: () => {\n onChange?.(undefined);\n },\n variant: \"secondary\",\n __next40pxDefaultSize: true,\n size: size === '__unstable-large' || props.__next40pxDefaultSize ? 'default' : 'small',\n children: __('Reset')\n })\n })]\n })]\n })]\n });\n};\nexport const FontSizePicker = forwardRef(UnforwardedFontSizePicker);\nexport default FontSizePicker;"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,UAAU,kBAAkB;AACrC,SAAS,qBAAqB;AAK9B,SAAS,cAAc;AACvB,O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iBAAiB;AAAA,cACjB,gBAAgB;AAAA,cAChB,UAAU,cAAY;AACpB,uCAAuB,IAAI;AAC3B,oBAAI,aAAa,QAAW;AAC1B,6BAAW,MAAS;AAAA,gBACtB,WAAW,UAAU;AACnB,6BAAW,YAAY,cAAc,QAAQ,cAAc,SAAS,YAAY,KAAK;AAAA,gBACvF,OAAO;AACL,6BAAW,QAAQ;AAAA,gBACrB;AAAA,cACF;AAAA,cACA,KAAK;AAAA,cACL,KAAK,sBAAsB,KAAK;AAAA,cAChC,MAAM,sBAAsB,MAAM;AAAA,YACpC,CAAC;AAAA,UACH,CAAC;AAAA,QACH,CAAC,GAAG,aAA0B,qBAAK,UAAU;AAAA,UAC3C,UAAuB,qBAAK,QAAQ;AAAA,YAClC,UAAU;AAAA,YACV,wBAAwB;AAAA,YACxB,SAAS,MAAM;AACb,yBAAW,MAAS;AAAA,YACtB;AAAA,YACA,SAAS;AAAA,YACT,uBAAuB;AAAA,YACvB,MAAM,SAAS,sBAAsB,MAAM,wBAAwB,YAAY;AAAA,YAC/E,UAAU,GAAG,OAAO;AAAA,UACtB,CAAC;AAAA,QACH,CAAC,CAAC;AAAA,MACJ,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACO,IAAM,iBAAiB,WAAW,yBAAyB;AAClE,IAAO,2BAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { settings } from '@wordpress/icons';\nimport { useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { Button } from '../button';\nimport RangeControl from '../range-control';\nimport { Flex, FlexItem } from '../flex';\nimport { default as UnitControl, parseQuantityAndUnitFromRawValue, useCustomUnits } from '../unit-control';\nimport { Container, Header, HeaderLabel, HeaderToggle } from './styles';\nimport { Spacer } from '../spacer';\nimport FontSizePickerSelect from './font-size-picker-select';\nimport FontSizePickerToggleGroup from './font-size-picker-toggle-group';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst DEFAULT_UNITS = ['px', 'em', 'rem', 'vw', 'vh'];\nconst MAX_TOGGLE_GROUP_SIZES = 5;\nconst UnforwardedFontSizePicker = (props, ref) => {\n const {\n __next40pxDefaultSize = false,\n fallbackFontSize,\n fontSizes = [],\n disableCustomFontSizes = false,\n onChange,\n size = 'default',\n units: unitsProp = DEFAULT_UNITS,\n value,\n valueMode = 'literal',\n withSlider = false,\n withReset = true\n } = props;\n const labelId = useInstanceId(UnforwardedFontSizePicker, 'font-size-picker-label');\n const units = useCustomUnits({\n availableUnits: unitsProp\n });\n const selectedFontSize = (() => {\n if (!value) {\n return undefined;\n }\n\n // If valueMode is 'slug', find by slug\n if (valueMode === 'slug') {\n return fontSizes.find(fontSize => fontSize.slug === value);\n }\n\n // If valueMode is 'literal', find by size value\n return fontSizes.find(fontSize => fontSize.size === value);\n })();\n const isCustomValue = !!value && !selectedFontSize;\n\n // Initially request a custom picker if the value is not from the predef list.\n const [userRequestedCustom, setUserRequestedCustom] = useState(isCustomValue);\n\n // Resolve the literal value to use in custom controls when operating in slug mode.\n // When `valueMode` is 'slug', the `value` prop contains the slug of the\n // selected preset. In that case, the custom input should reflect the preset's\n // actual size value so it pre-populates correctly after clicking \"Set custom size\".\n const resolvedValueForControls = valueMode === 'slug' ? selectedFontSize?.size : value;\n let currentPickerType;\n if (!disableCustomFontSizes && userRequestedCustom) {\n // While showing the custom value picker, switch back to predef only if\n // `disableCustomFontSizes` is set to `true`.\n currentPickerType = 'custom';\n } else {\n currentPickerType = fontSizes.length > MAX_TOGGLE_GROUP_SIZES ? 'select' : 'togglegroup';\n }\n if (fontSizes.length === 0 && disableCustomFontSizes) {\n return null;\n }\n\n // If neither the value or first font size is a string, then FontSizePicker\n // operates in a legacy \"unitless\" mode where UnitControl can only be used\n // to select px values and onChange() is always called with number values.\n const hasUnits = typeof resolvedValueForControls === 'string' || typeof fontSizes[0]?.size === 'string';\n const [valueQuantity, valueUnit] = parseQuantityAndUnitFromRawValue(resolvedValueForControls, units);\n const isValueUnitRelative = !!valueUnit && ['em', 'rem', 'vw', 'vh'].includes(valueUnit);\n const isDisabled = value === undefined;\n maybeWarnDeprecated36pxSize({\n componentName: 'FontSizePicker',\n __next40pxDefaultSize,\n size\n });\n return /*#__PURE__*/_jsxs(Container, {\n ref: ref,\n className: \"components-font-size-picker\"\n // This Container component renders a fieldset element that needs to be labeled.\n ,\n \"aria-labelledby\": labelId,\n children: [/*#__PURE__*/_jsx(Spacer, {\n children: /*#__PURE__*/_jsxs(Header, {\n className: \"components-font-size-picker__header\",\n children: [/*#__PURE__*/_jsx(HeaderLabel, {\n id: labelId,\n children: __('Font size')\n }), !disableCustomFontSizes && /*#__PURE__*/_jsx(HeaderToggle, {\n label: currentPickerType === 'custom' ? __('Use size preset') : __('Set custom size'),\n icon: settings,\n onClick: () => setUserRequestedCustom(!userRequestedCustom),\n isPressed: currentPickerType === 'custom',\n size: \"small\"\n })]\n })\n }), /*#__PURE__*/_jsxs(\"div\", {\n children: [currentPickerType === 'select' && /*#__PURE__*/_jsx(FontSizePickerSelect, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n disableCustomFontSizes: disableCustomFontSizes,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n },\n onSelectCustom: () => setUserRequestedCustom(true)\n }), currentPickerType === 'togglegroup' && /*#__PURE__*/_jsx(FontSizePickerToggleGroup, {\n fontSizes: fontSizes,\n value: value,\n valueMode: valueMode,\n __next40pxDefaultSize: __next40pxDefaultSize,\n size: size,\n onChange: (newValue, selectedItem) => {\n if (newValue === undefined) {\n onChange?.(undefined, selectedItem);\n } else {\n onChange?.(hasUnits ? newValue : Number(newValue), selectedItem);\n }\n }\n }), currentPickerType === 'custom' && /*#__PURE__*/_jsxs(Flex, {\n className: \"components-font-size-picker__custom-size-control\",\n children: [/*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(UnitControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n label: __('Font size'),\n labelPosition: \"top\",\n hideLabelFromVision: true,\n value: hasUnits ? `${valueQuantity !== null && valueQuantity !== void 0 ? valueQuantity : ''}${valueUnit !== null && valueUnit !== void 0 ? valueUnit : ''}` : resolvedValueForControls,\n onChange: newValue => {\n setUserRequestedCustom(true);\n\n // Treat clearing the input (empty string) as a reset\n if (newValue === undefined || newValue === '') {\n onChange?.(undefined);\n } else {\n onChange?.(hasUnits ? newValue : parseInt(newValue, 10));\n }\n },\n size: size,\n units: hasUnits ? units : [],\n min: 0\n })\n }), withSlider && /*#__PURE__*/_jsx(FlexItem, {\n isBlock: true,\n children: /*#__PURE__*/_jsx(Spacer, {\n marginX: 2,\n marginBottom: 0,\n children: /*#__PURE__*/_jsx(RangeControl, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize: true,\n className: \"components-font-size-picker__custom-input\",\n label: __('Font size'),\n hideLabelFromVision: true,\n value: valueQuantity,\n initialPosition: fallbackFontSize,\n withInputField: false,\n onChange: newValue => {\n setUserRequestedCustom(true);\n if (newValue === undefined) {\n onChange?.(undefined);\n } else if (hasUnits) {\n onChange?.(newValue + (valueUnit !== null && valueUnit !== void 0 ? valueUnit : 'px'));\n } else {\n onChange?.(newValue);\n }\n },\n min: 0,\n max: isValueUnitRelative ? 10 : 100,\n step: isValueUnitRelative ? 0.1 : 1\n })\n })\n }), withReset && /*#__PURE__*/_jsx(FlexItem, {\n children: /*#__PURE__*/_jsx(Button, {\n disabled: isDisabled,\n accessibleWhenDisabled: true,\n onClick: () => {\n onChange?.(undefined);\n },\n variant: \"secondary\",\n __next40pxDefaultSize: true,\n size: size === '__unstable-large' || props.__next40pxDefaultSize ? 'default' : 'small',\n children: __('Reset')\n })\n })]\n })]\n })]\n });\n};\nexport const FontSizePicker = forwardRef(UnforwardedFontSizePicker);\nFontSizePicker.displayName = 'FontSizePicker';\nexport default FontSizePicker;"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,UAAU,kBAAkB;AACrC,SAAS,qBAAqB;AAK9B,SAAS,cAAc;AACvB,OAAO,kBAAkB;AACzB,SAAS,MAAM,gBAAgB;AAC/B,SAAS,WAAW,aAAa,kCAAkC,sBAAsB;AACzF,SAAS,WAAW,QAAQ,aAAa,oBAAoB;AAC7D,SAAS,cAAc;AACvB,OAAO,0BAA0B;AACjC,OAAO,+BAA+B;AACtC,SAAS,mCAAmC;AAC5C,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAM,gBAAgB,CAAC,MAAM,MAAM,OAAO,MAAM,IAAI;AACpD,IAAM,yBAAyB;AAC/B,IAAM,4BAA4B,CAAC,OAAO,QAAQ;AAChD,QAAM;AAAA,IACJ,wBAAwB;AAAA,IACxB;AAAA,IACA,YAAY,CAAC;AAAA,IACb,yBAAyB;AAAA,IACzB;AAAA,IACA,OAAO;AAAA,IACP,OAAO,YAAY;AAAA,IACnB;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,YAAY;AAAA,EACd,IAAI;AACJ,QAAM,UAAU,cAAc,2BAA2B,wBAAwB;AACjF,QAAM,QAAQ,eAAe;AAAA,IAC3B,gBAAgB;AAAA,EAClB,CAAC;AACD,QAAM,oBAAoB,MAAM;AAC9B,QAAI,CAAC,OAAO;AACV,aAAO;AAAA,IACT;AAGA,QAAI,cAAc,QAAQ;AACxB,aAAO,UAAU,KAAK,cAAY,SAAS,SAAS,KAAK;AAAA,IAC3D;AAGA,WAAO,UAAU,KAAK,cAAY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": []
|
|
7
7
|
}
|
|
@@ -26,11 +26,15 @@ function FormFileUpload({
|
|
|
26
26
|
}
|
|
27
27
|
const ui = render ? render({
|
|
28
28
|
openFileDialog
|
|
29
|
-
}) :
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
}) : (
|
|
30
|
+
// Disable reason: the parent component already takes care of the `__next40pxDefaultSize` prop.
|
|
31
|
+
// eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
|
|
32
|
+
/* @__PURE__ */ _jsx(Button, {
|
|
33
|
+
onClick: openFileDialog,
|
|
34
|
+
...props,
|
|
35
|
+
children
|
|
36
|
+
})
|
|
37
|
+
);
|
|
34
38
|
const compatAccept = accept?.includes("audio/*") ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;
|
|
35
39
|
return /* @__PURE__ */ _jsxs("div", {
|
|
36
40
|
className: "components-form-file-upload",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/form-file-upload/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\n/**\n * FormFileUpload allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n * <FormFileUpload\n * __next40pxDefaultSize\n * accept=\"image/*\"\n * onChange={ ( event ) => console.log( event.currentTarget.files ) }\n * >\n * Upload\n * </FormFileUpload>\n * );\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function FormFileUpload({\n accept,\n children,\n multiple = false,\n onChange,\n onClick,\n render,\n ...props\n}) {\n const ref = useRef(null);\n const openFileDialog = () => {\n ref.current?.click();\n };\n if (!render) {\n maybeWarnDeprecated36pxSize({\n componentName: 'FormFileUpload',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n // @ts-expect-error - We don't \"officially\" support all Button props but this likely happens.\n size: props.size\n });\n }\n const ui = render ? render({\n openFileDialog\n }) :
|
|
5
|
-
"mappings": ";AAGA,SAAS,cAAc;AAKvB,OAAO,YAAY;AACnB,SAAS,mCAAmC;AAmB5C,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,MAAM;AAAA,EACrB;AACA,MAAI,CAAC,QAAQ;AACX,gCAA4B;AAAA,MAC1B,eAAe;AAAA,MACf,uBAAuB,MAAM;AAAA;AAAA,MAE7B,MAAM,MAAM;AAAA,IACd,CAAC;AAAA,EACH;AACA,QAAM,KAAK,SAAS,OAAO;AAAA,IACzB;AAAA,EACF,CAAC,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\n\n/**\n * FormFileUpload allows users to select files from their local device.\n *\n * ```jsx\n * import { FormFileUpload } from '@wordpress/components';\n *\n * const MyFormFileUpload = () => (\n * <FormFileUpload\n * __next40pxDefaultSize\n * accept=\"image/*\"\n * onChange={ ( event ) => console.log( event.currentTarget.files ) }\n * >\n * Upload\n * </FormFileUpload>\n * );\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function FormFileUpload({\n accept,\n children,\n multiple = false,\n onChange,\n onClick,\n render,\n ...props\n}) {\n const ref = useRef(null);\n const openFileDialog = () => {\n ref.current?.click();\n };\n if (!render) {\n maybeWarnDeprecated36pxSize({\n componentName: 'FormFileUpload',\n __next40pxDefaultSize: props.__next40pxDefaultSize,\n // @ts-expect-error - We don't \"officially\" support all Button props but this likely happens.\n size: props.size\n });\n }\n const ui = render ? render({\n openFileDialog\n }) :\n /*#__PURE__*/\n // Disable reason: the parent component already takes care of the `__next40pxDefaultSize` prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n onClick: openFileDialog,\n ...props,\n children: children\n });\n\n // iOS browsers may not reliably handle 'audio/*' in the accept attribute.\n // Adding explicit audio MIME types improves compatibility across all devices.\n const compatAccept = accept?.includes('audio/*') ? `${accept}, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm` : accept;\n return /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-form-file-upload\",\n children: [ui, /*#__PURE__*/_jsx(\"input\", {\n type: \"file\",\n ref: ref,\n multiple: multiple,\n style: {\n display: 'none'\n },\n accept: compatAccept,\n onChange: onChange,\n onClick: onClick,\n \"data-testid\": \"form-file-upload-input\"\n })]\n });\n}\nexport default FormFileUpload;"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,cAAc;AAKvB,OAAO,YAAY;AACnB,SAAS,mCAAmC;AAmB5C,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,iBAAiB,MAAM;AAC3B,QAAI,SAAS,MAAM;AAAA,EACrB;AACA,MAAI,CAAC,QAAQ;AACX,gCAA4B;AAAA,MAC1B,eAAe;AAAA,MACf,uBAAuB,MAAM;AAAA;AAAA,MAE7B,MAAM,MAAM;AAAA,IACd,CAAC;AAAA,EACH;AACA,QAAM,KAAK,SAAS,OAAO;AAAA,IACzB;AAAA,EACF,CAAC;AAAA;AAAA;AAAA,IAID,qBAAK,QAAQ;AAAA,MACX,SAAS;AAAA,MACT,GAAG;AAAA,MACH;AAAA,IACF,CAAC;AAAA;AAID,QAAM,eAAe,QAAQ,SAAS,SAAS,IAAI,GAAG,MAAM,gFAAgF;AAC5I,SAAoB,sBAAM,OAAO;AAAA,IAC/B,WAAW;AAAA,IACX,UAAU,CAAC,IAAiB,qBAAK,SAAS;AAAA,MACxC,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA,eAAe;AAAA,IACjB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AACA,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/form-toggle/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const noop = () => {};\nfunction UnforwardedFormToggle(props, ref) {\n const {\n className,\n checked,\n id,\n disabled,\n onChange = noop,\n onClick,\n ...additionalProps\n } = props;\n const wrapperClasses = clsx('components-form-toggle', className, {\n 'is-checked': checked,\n 'is-disabled': disabled\n });\n return /*#__PURE__*/_jsxs(\"span\", {\n className: wrapperClasses,\n children: [/*#__PURE__*/_jsx(\"input\", {\n className: \"components-form-toggle__input\",\n id: id,\n type: \"checkbox\",\n checked: checked,\n onChange: onChange,\n disabled: disabled,\n onClick: event => {\n // Compat code for Safari to ensure that the toggle is focused when clicked.\n event.currentTarget.focus();\n onClick?.(event);\n },\n ...additionalProps,\n ref: ref\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__track\"\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__thumb\"\n })]\n });\n}\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n * const [ isChecked, setChecked ] = useState( true );\n *\n * return (\n * <FormToggle\n * checked={ isChecked }\n * onChange={ () => setChecked( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const FormToggle = forwardRef(UnforwardedFormToggle);\nexport default FormToggle;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,IAAM,OAAO,MAAM;AAAC;AAC3B,SAAS,sBAAsB,OAAO,KAAK;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,iBAAiB,KAAK,0BAA0B,WAAW;AAAA,IAC/D,cAAc;AAAA,IACd,eAAe;AAAA,EACjB,CAAC;AACD,SAAoB,sBAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX,UAAU,CAAc,qBAAK,SAAS;AAAA,MACpC,WAAW;AAAA,MACX;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,WAAS;AAEhB,cAAM,cAAc,MAAM;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACF,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAqBO,IAAM,aAAa,WAAW,qBAAqB;AAC1D,IAAO,sBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const noop = () => {};\nfunction UnforwardedFormToggle(props, ref) {\n const {\n className,\n checked,\n id,\n disabled,\n onChange = noop,\n onClick,\n ...additionalProps\n } = props;\n const wrapperClasses = clsx('components-form-toggle', className, {\n 'is-checked': checked,\n 'is-disabled': disabled\n });\n return /*#__PURE__*/_jsxs(\"span\", {\n className: wrapperClasses,\n children: [/*#__PURE__*/_jsx(\"input\", {\n className: \"components-form-toggle__input\",\n id: id,\n type: \"checkbox\",\n checked: checked,\n onChange: onChange,\n disabled: disabled,\n onClick: event => {\n // Compat code for Safari to ensure that the toggle is focused when clicked.\n event.currentTarget.focus();\n onClick?.(event);\n },\n ...additionalProps,\n ref: ref\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__track\"\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-form-toggle__thumb\"\n })]\n });\n}\n\n/**\n * FormToggle switches a single setting on or off.\n *\n * ```jsx\n * import { FormToggle } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyFormToggle = () => {\n * const [ isChecked, setChecked ] = useState( true );\n *\n * return (\n * <FormToggle\n * checked={ isChecked }\n * onChange={ () => setChecked( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const FormToggle = forwardRef(UnforwardedFormToggle);\nFormToggle.displayName = 'FormToggle';\nexport default FormToggle;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,IAAM,OAAO,MAAM;AAAC;AAC3B,SAAS,sBAAsB,OAAO,KAAK;AACzC,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,iBAAiB,KAAK,0BAA0B,WAAW;AAAA,IAC/D,cAAc;AAAA,IACd,eAAe;AAAA,EACjB,CAAC;AACD,SAAoB,sBAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX,UAAU,CAAc,qBAAK,SAAS;AAAA,MACpC,WAAW;AAAA,MACX;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,WAAS;AAEhB,cAAM,cAAc,MAAM;AAC1B,kBAAU,KAAK;AAAA,MACjB;AAAA,MACA,GAAG;AAAA,MACH;AAAA,IACF,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,IACb,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAqBO,IAAM,aAAa,WAAW,qBAAqB;AAC1D,WAAW,cAAc;AACzB,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/form-token-field/token-input.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnForwardedTokenInput(props, ref) {\n const {\n value,\n isExpanded,\n instanceId,\n selectedSuggestionIndex,\n className,\n onChange,\n onFocus,\n onBlur,\n ...restProps\n } = props;\n const [hasFocus, setHasFocus] = useState(false);\n const size = value ? value.length + 1 : 0;\n const onChangeHandler = event => {\n if (onChange) {\n onChange({\n value: event.target.value\n });\n }\n };\n const onFocusHandler = e => {\n setHasFocus(true);\n onFocus?.(e);\n };\n const onBlurHandler = e => {\n setHasFocus(false);\n onBlur?.(e);\n };\n return /*#__PURE__*/_jsx(\"input\", {\n ref: ref,\n id: `components-form-token-input-${instanceId}`,\n type: \"text\",\n ...restProps,\n value: value || '',\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n size: size,\n className: clsx(className, 'components-form-token-field__input'),\n autoComplete: \"off\",\n role: \"combobox\",\n \"aria-expanded\": isExpanded,\n \"aria-autocomplete\": \"list\",\n \"aria-owns\": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,\n \"aria-activedescendant\":\n // Only add the `aria-activedescendant` attribute when:\n // - the user is actively interacting with the input (`hasFocus`)\n // - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n // - the list of suggestions are rendered in the DOM (`isExpanded`)\n hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,\n \"aria-describedby\": `components-form-token-suggestions-howto-${instanceId}`\n });\n}\nexport const TokenInput = forwardRef(UnForwardedTokenInput);\nexport default TokenInput;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,YAAY,gBAAgB;AAKrC,SAAS,OAAO,YAAY;AACrB,SAAS,sBAAsB,OAAO,KAAK;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,OAAO,QAAQ,MAAM,SAAS,IAAI;AACxC,QAAM,kBAAkB,WAAS;AAC/B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,OAAO,MAAM,OAAO;AAAA,MACtB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,iBAAiB,OAAK;AAC1B,gBAAY,IAAI;AAChB,cAAU,CAAC;AAAA,EACb;AACA,QAAM,gBAAgB,OAAK;AACzB,gBAAY,KAAK;AACjB,aAAS,CAAC;AAAA,EACZ;AACA,SAAoB,qBAAK,SAAS;AAAA,IAChC;AAAA,IACA,IAAI,+BAA+B,UAAU;AAAA,IAC7C,MAAM;AAAA,IACN,GAAG;AAAA,IACH,OAAO,SAAS;AAAA,IAChB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR;AAAA,IACA,WAAW,KAAK,WAAW,oCAAoC;AAAA,IAC/D,cAAc;AAAA,IACd,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,aAAa,aAAa,qCAAqC,UAAU,KAAK;AAAA,IAC9E;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,YAAY,4BAA4B,MAAM,aAAa,qCAAqC,UAAU,IAAI,uBAAuB,KAAK;AAAA;AAAA,IAC1I,oBAAoB,2CAA2C,UAAU;AAAA,EAC3E,CAAC;AACH;AACO,IAAM,aAAa,WAAW,qBAAqB;AAC1D,IAAO,sBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnForwardedTokenInput(props, ref) {\n const {\n value,\n isExpanded,\n instanceId,\n selectedSuggestionIndex,\n className,\n onChange,\n onFocus,\n onBlur,\n ...restProps\n } = props;\n const [hasFocus, setHasFocus] = useState(false);\n const size = value ? value.length + 1 : 0;\n const onChangeHandler = event => {\n if (onChange) {\n onChange({\n value: event.target.value\n });\n }\n };\n const onFocusHandler = e => {\n setHasFocus(true);\n onFocus?.(e);\n };\n const onBlurHandler = e => {\n setHasFocus(false);\n onBlur?.(e);\n };\n return /*#__PURE__*/_jsx(\"input\", {\n ref: ref,\n id: `components-form-token-input-${instanceId}`,\n type: \"text\",\n ...restProps,\n value: value || '',\n onChange: onChangeHandler,\n onFocus: onFocusHandler,\n onBlur: onBlurHandler,\n size: size,\n className: clsx(className, 'components-form-token-field__input'),\n autoComplete: \"off\",\n role: \"combobox\",\n \"aria-expanded\": isExpanded,\n \"aria-autocomplete\": \"list\",\n \"aria-owns\": isExpanded ? `components-form-token-suggestions-${instanceId}` : undefined,\n \"aria-activedescendant\":\n // Only add the `aria-activedescendant` attribute when:\n // - the user is actively interacting with the input (`hasFocus`)\n // - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n // - the list of suggestions are rendered in the DOM (`isExpanded`)\n hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,\n \"aria-describedby\": `components-form-token-suggestions-howto-${instanceId}`\n });\n}\nexport const TokenInput = forwardRef(UnForwardedTokenInput);\nTokenInput.displayName = 'TokenInput';\nexport default TokenInput;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,YAAY,gBAAgB;AAKrC,SAAS,OAAO,YAAY;AACrB,SAAS,sBAAsB,OAAO,KAAK;AAChD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,OAAO,QAAQ,MAAM,SAAS,IAAI;AACxC,QAAM,kBAAkB,WAAS;AAC/B,QAAI,UAAU;AACZ,eAAS;AAAA,QACP,OAAO,MAAM,OAAO;AAAA,MACtB,CAAC;AAAA,IACH;AAAA,EACF;AACA,QAAM,iBAAiB,OAAK;AAC1B,gBAAY,IAAI;AAChB,cAAU,CAAC;AAAA,EACb;AACA,QAAM,gBAAgB,OAAK;AACzB,gBAAY,KAAK;AACjB,aAAS,CAAC;AAAA,EACZ;AACA,SAAoB,qBAAK,SAAS;AAAA,IAChC;AAAA,IACA,IAAI,+BAA+B,UAAU;AAAA,IAC7C,MAAM;AAAA,IACN,GAAG;AAAA,IACH,OAAO,SAAS;AAAA,IAChB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,IACR;AAAA,IACA,WAAW,KAAK,WAAW,oCAAoC;AAAA,IAC/D,cAAc;AAAA,IACd,MAAM;AAAA,IACN,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,aAAa,aAAa,qCAAqC,UAAU,KAAK;AAAA,IAC9E;AAAA;AAAA;AAAA;AAAA;AAAA,MAKA,YAAY,4BAA4B,MAAM,aAAa,qCAAqC,UAAU,IAAI,uBAAuB,KAAK;AAAA;AAAA,IAC1I,oBAAoB,2CAA2C,UAAU;AAAA,EAC3E,CAAC;AACH;AACO,IAAM,aAAa,WAAW,qBAAqB;AAC1D,WAAW,cAAc;AACzB,IAAO,sBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/form-token-field/token.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport default function Token({\n value,\n status,\n title,\n displayTransform,\n isBorderless = false,\n disabled = false,\n onClickRemove = noop,\n onMouseEnter,\n onMouseLeave,\n messages,\n termPosition,\n termsCount\n}) {\n const instanceId = useInstanceId(Token);\n const tokenClasses = clsx('components-form-token-field__token', {\n 'is-error': 'error' === status,\n 'is-success': 'success' === status,\n 'is-validating': 'validating' === status,\n 'is-borderless': isBorderless,\n 'is-disabled': disabled\n });\n const onClick = () => onClickRemove({\n value\n });\n const transformedValue = displayTransform(value);\n const termPositionAndCount = sprintf(/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n __('%1$s (%2$d of %3$d)'), transformedValue, termPosition, termsCount);\n return /*#__PURE__*/_jsxs(\"span\", {\n className: tokenClasses,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n title: title,\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: \"components-form-token-field__token-text\",\n id: `components-form-token-field__token-text-${instanceId}`,\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"span\",\n children: termPositionAndCount\n }), /*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: transformedValue\n })]\n }), /*#__PURE__*/_jsx(Button, {\n className: \"components-form-token-field__remove-token\",\n size: \"small\",\n icon: closeSmall,\n onClick: !disabled ? onClick : undefined
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAC5B,SAAS,kBAAkB;AAK3B,OAAO,YAAY;AACnB,SAAS,sBAAsB;AAC/B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAM,OAAO,MAAM;AAAC;AACL,SAAR,MAAuB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,aAAa,cAAc,KAAK;AACtC,QAAM,eAAe,KAAK,sCAAsC;AAAA,IAC9D,YAAY,YAAY;AAAA,IACxB,cAAc,cAAc;AAAA,IAC5B,iBAAiB,iBAAiB;AAAA,IAClC,iBAAiB;AAAA,IACjB,eAAe;AAAA,EACjB,CAAC;AACD,QAAM,UAAU,MAAM,cAAc;AAAA,IAClC;AAAA,EACF,CAAC;AACD,QAAM,mBAAmB,iBAAiB,KAAK;AAC/C,QAAM,uBAAuB;AAAA;AAAA,IAC7B,GAAG,qBAAqB;AAAA,IAAG;AAAA,IAAkB;AAAA,IAAc;AAAA,EAAU;AACrE,SAAoB,sBAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,CAAc,sBAAM,QAAQ;AAAA,MACpC,WAAW;AAAA,MACX,IAAI,2CAA2C,UAAU;AAAA,MACzD,UAAU,CAAc,qBAAK,gBAAgB;AAAA,QAC3C,IAAI;AAAA,QACJ,UAAU;AAAA,MACZ,CAAC,GAAgB,qBAAK,QAAQ;AAAA,QAC5B,eAAe;AAAA,QACf,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,MACX,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,UAAU;AAAA,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { closeSmall } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { VisuallyHidden } from '../visually-hidden';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst noop = () => {};\nexport default function Token({\n value,\n status,\n title,\n displayTransform,\n isBorderless = false,\n disabled = false,\n onClickRemove = noop,\n onMouseEnter,\n onMouseLeave,\n messages,\n termPosition,\n termsCount\n}) {\n const instanceId = useInstanceId(Token);\n const tokenClasses = clsx('components-form-token-field__token', {\n 'is-error': 'error' === status,\n 'is-success': 'success' === status,\n 'is-validating': 'validating' === status,\n 'is-borderless': isBorderless,\n 'is-disabled': disabled\n });\n const onClick = () => onClickRemove({\n value\n });\n const transformedValue = displayTransform(value);\n const termPositionAndCount = sprintf(/* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */\n __('%1$s (%2$d of %3$d)'), transformedValue, termPosition, termsCount);\n return /*#__PURE__*/_jsxs(\"span\", {\n className: tokenClasses,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n title: title,\n children: [/*#__PURE__*/_jsxs(\"span\", {\n className: \"components-form-token-field__token-text\",\n id: `components-form-token-field__token-text-${instanceId}`,\n children: [/*#__PURE__*/_jsx(VisuallyHidden, {\n as: \"span\",\n children: termPositionAndCount\n }), /*#__PURE__*/_jsx(\"span\", {\n \"aria-hidden\": \"true\",\n children: transformedValue\n })]\n }), /*#__PURE__*/_jsx(Button, {\n className: \"components-form-token-field__remove-token\",\n size: \"small\",\n icon: closeSmall,\n onClick: !disabled ? onClick : undefined,\n disabled: disabled,\n label: messages.remove,\n \"aria-describedby\": `components-form-token-field__token-text-${instanceId}`\n })]\n });\n}"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAC5B,SAAS,kBAAkB;AAK3B,OAAO,YAAY;AACnB,SAAS,sBAAsB;AAC/B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAM,OAAO,MAAM;AAAC;AACL,SAAR,MAAuB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,aAAa,cAAc,KAAK;AACtC,QAAM,eAAe,KAAK,sCAAsC;AAAA,IAC9D,YAAY,YAAY;AAAA,IACxB,cAAc,cAAc;AAAA,IAC5B,iBAAiB,iBAAiB;AAAA,IAClC,iBAAiB;AAAA,IACjB,eAAe;AAAA,EACjB,CAAC;AACD,QAAM,UAAU,MAAM,cAAc;AAAA,IAClC;AAAA,EACF,CAAC;AACD,QAAM,mBAAmB,iBAAiB,KAAK;AAC/C,QAAM,uBAAuB;AAAA;AAAA,IAC7B,GAAG,qBAAqB;AAAA,IAAG;AAAA,IAAkB;AAAA,IAAc;AAAA,EAAU;AACrE,SAAoB,sBAAM,QAAQ;AAAA,IAChC,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,CAAc,sBAAM,QAAQ;AAAA,MACpC,WAAW;AAAA,MACX,IAAI,2CAA2C,UAAU;AAAA,MACzD,UAAU,CAAc,qBAAK,gBAAgB;AAAA,QAC3C,IAAI;AAAA,QACJ,UAAU;AAAA,MACZ,CAAC,GAAgB,qBAAK,QAAQ;AAAA,QAC5B,eAAe;AAAA,QACf,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC,GAAgB,qBAAK,QAAQ;AAAA,MAC5B,WAAW;AAAA,MACX,MAAM;AAAA,MACN,MAAM;AAAA,MACN,SAAS,CAAC,WAAW,UAAU;AAAA,MAC/B;AAAA,MACA,OAAO,SAAS;AAAA,MAChB,oBAAoB,2CAA2C,UAAU;AAAA,IAC3E,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -74,15 +74,17 @@ function useNavigateRegions(shortcuts = defaultShortcuts) {
|
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
var navigate_regions_default = createHigherOrderComponent((Component) => ({
|
|
77
|
+
var navigate_regions_default = createHigherOrderComponent((Component) => function NavigateRegions({
|
|
78
78
|
shortcuts,
|
|
79
79
|
...props
|
|
80
|
-
})
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
})
|
|
80
|
+
}) {
|
|
81
|
+
return /* @__PURE__ */ _jsx("div", {
|
|
82
|
+
...useNavigateRegions(shortcuts),
|
|
83
|
+
children: /* @__PURE__ */ _jsx(Component, {
|
|
84
|
+
...props
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}, "navigateRegions");
|
|
86
88
|
export {
|
|
87
89
|
navigate_regions_default as default,
|
|
88
90
|
useNavigateRegions
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/higher-order/navigate-regions/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport { createHigherOrderComponent, useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultShortcuts = {\n previous: [{\n modifier: 'ctrlShift',\n character: '`'\n }, {\n modifier: 'ctrlShift',\n character: '~'\n }, {\n modifier: 'access',\n character: 'p'\n }],\n next: [{\n modifier: 'ctrl',\n character: '`'\n }, {\n modifier: 'access',\n character: 'n'\n }]\n};\nexport function useNavigateRegions(shortcuts = defaultShortcuts) {\n const ref = useRef(null);\n const [isFocusingRegions, setIsFocusingRegions] = useState(false);\n function focusRegion(offset) {\n var _ref$current$querySel;\n const regions = Array.from((_ref$current$querySel = ref.current?.querySelectorAll('[role=\"region\"][tabindex=\"-1\"]')) !== null && _ref$current$querySel !== void 0 ? _ref$current$querySel : []);\n if (!regions.length) {\n return;\n }\n let nextRegion = regions[0];\n // Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n const wrappingRegion = ref.current?.ownerDocument?.activeElement?.closest('[role=\"region\"][tabindex=\"-1\"]');\n const selectedIndex = wrappingRegion ? regions.indexOf(wrappingRegion) : -1;\n if (selectedIndex !== -1) {\n let nextIndex = selectedIndex + offset;\n nextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n nextIndex = nextIndex === regions.length ? 0 : nextIndex;\n nextRegion = regions[nextIndex];\n }\n nextRegion.focus();\n setIsFocusingRegions(true);\n }\n const clickRef = useRefEffect(element => {\n function onClick() {\n setIsFocusingRegions(false);\n }\n element.addEventListener('click', onClick);\n return () => {\n element.removeEventListener('click', onClick);\n };\n }, [setIsFocusingRegions]);\n return {\n ref: useMergeRefs([ref, clickRef]),\n className: isFocusingRegions ? 'is-focusing-regions' : '',\n onKeyDown(event) {\n if (shortcuts.previous.some(({\n modifier,\n character\n }) => {\n return isKeyboardEvent[modifier](event, character);\n })) {\n focusRegion(-1);\n } else if (shortcuts.next.some(({\n modifier,\n character\n }) => {\n return isKeyboardEvent[modifier](event, character);\n })) {\n focusRegion(1);\n }\n }\n };\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(Component => ({\n shortcuts,\n ...props\n})
|
|
5
|
-
"mappings": ";AAGA,SAAS,UAAU,cAAc;AACjC,SAAS,4BAA4B,cAAc,oBAAoB;AACvE,SAAS,uBAAuB;AAChC,SAAS,OAAO,YAAY;AAC5B,IAAM,mBAAmB;AAAA,EACvB,UAAU,CAAC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,KAAK,QAAQ,CAAC;AAAA,IACjC,WAAW,oBAAoB,wBAAwB;AAAA,IACvD,UAAU,OAAO;AACf,UAAI,UAAU,SAAS,KAAK,CAAC;AAAA,QAC3B;AAAA,QACA;AAAA,MACF,MAAM;AACJ,eAAO,gBAAgB,QAAQ,EAAE,OAAO,SAAS;AAAA,MACnD,CAAC,GAAG;AACF,oBAAY,EAAE;AAAA,MAChB,WAAW,UAAU,KAAK,KAAK,CAAC;AAAA,QAC9B;AAAA,QACA;AAAA,MACF,MAAM;AACJ,eAAO,gBAAgB,QAAQ,EAAE,OAAO,SAAS;AAAA,MACnD,CAAC,GAAG;AACF,oBAAY,CAAC;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF;AA4BA,IAAO,2BAAQ,2BAA2B,eAAa,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport { createHigherOrderComponent, useRefEffect, useMergeRefs } from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultShortcuts = {\n previous: [{\n modifier: 'ctrlShift',\n character: '`'\n }, {\n modifier: 'ctrlShift',\n character: '~'\n }, {\n modifier: 'access',\n character: 'p'\n }],\n next: [{\n modifier: 'ctrl',\n character: '`'\n }, {\n modifier: 'access',\n character: 'n'\n }]\n};\nexport function useNavigateRegions(shortcuts = defaultShortcuts) {\n const ref = useRef(null);\n const [isFocusingRegions, setIsFocusingRegions] = useState(false);\n function focusRegion(offset) {\n var _ref$current$querySel;\n const regions = Array.from((_ref$current$querySel = ref.current?.querySelectorAll('[role=\"region\"][tabindex=\"-1\"]')) !== null && _ref$current$querySel !== void 0 ? _ref$current$querySel : []);\n if (!regions.length) {\n return;\n }\n let nextRegion = regions[0];\n // Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n const wrappingRegion = ref.current?.ownerDocument?.activeElement?.closest('[role=\"region\"][tabindex=\"-1\"]');\n const selectedIndex = wrappingRegion ? regions.indexOf(wrappingRegion) : -1;\n if (selectedIndex !== -1) {\n let nextIndex = selectedIndex + offset;\n nextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n nextIndex = nextIndex === regions.length ? 0 : nextIndex;\n nextRegion = regions[nextIndex];\n }\n nextRegion.focus();\n setIsFocusingRegions(true);\n }\n const clickRef = useRefEffect(element => {\n function onClick() {\n setIsFocusingRegions(false);\n }\n element.addEventListener('click', onClick);\n return () => {\n element.removeEventListener('click', onClick);\n };\n }, [setIsFocusingRegions]);\n return {\n ref: useMergeRefs([ref, clickRef]),\n className: isFocusingRegions ? 'is-focusing-regions' : '',\n onKeyDown(event) {\n if (shortcuts.previous.some(({\n modifier,\n character\n }) => {\n return isKeyboardEvent[modifier](event, character);\n })) {\n focusRegion(-1);\n } else if (shortcuts.next.some(({\n modifier,\n character\n }) => {\n return isKeyboardEvent[modifier](event, character);\n })) {\n focusRegion(1);\n }\n }\n };\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(Component => function NavigateRegions({\n shortcuts,\n ...props\n}) {\n return /*#__PURE__*/_jsx(\"div\", {\n ...useNavigateRegions(shortcuts),\n children: /*#__PURE__*/_jsx(Component, {\n ...props\n })\n });\n}, 'navigateRegions');"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,UAAU,cAAc;AACjC,SAAS,4BAA4B,cAAc,oBAAoB;AACvE,SAAS,uBAAuB;AAChC,SAAS,OAAO,YAAY;AAC5B,IAAM,mBAAmB;AAAA,EACvB,UAAU,CAAC;AAAA,IACT,UAAU;AAAA,IACV,WAAW;AAAA,EACb,GAAG;AAAA,IACD,UAAU;AAAA,IACV,WAAW;AAAA,EACb,GAAG;AAAA,IACD,UAAU;AAAA,IACV,WAAW;AAAA,EACb,CAAC;AAAA,EACD,MAAM,CAAC;AAAA,IACL,UAAU;AAAA,IACV,WAAW;AAAA,EACb,GAAG;AAAA,IACD,UAAU;AAAA,IACV,WAAW;AAAA,EACb,CAAC;AACH;AACO,SAAS,mBAAmB,YAAY,kBAAkB;AAC/D,QAAM,MAAM,OAAO,IAAI;AACvB,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,SAAS,KAAK;AAChE,WAAS,YAAY,QAAQ;AAC3B,QAAI;AACJ,UAAM,UAAU,MAAM,MAAM,wBAAwB,IAAI,SAAS,iBAAiB,gCAAgC,OAAO,QAAQ,0BAA0B,SAAS,wBAAwB,CAAC,CAAC;AAC9L,QAAI,CAAC,QAAQ,QAAQ;AACnB;AAAA,IACF;AACA,QAAI,aAAa,QAAQ,CAAC;AAE1B,UAAM,iBAAiB,IAAI,SAAS,eAAe,eAAe,QAAQ,gCAAgC;AAC1G,UAAM,gBAAgB,iBAAiB,QAAQ,QAAQ,cAAc,IAAI;AACzE,QAAI,kBAAkB,IAAI;AACxB,UAAI,YAAY,gBAAgB;AAChC,kBAAY,cAAc,KAA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astDeepEqual from "fast-deep-equal/es6";
|
|
2
|
+
import fastDeepEqual from "fast-deep-equal/es6/index.js";
|
|
3
3
|
import { Component } from "@wordpress/element";
|
|
4
4
|
import { createHigherOrderComponent } from "@wordpress/compose";
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
var with_fallback_styles_default = (mapNodeToProps) => createHigherOrderComponent((WrappedComponent) => {
|
|
7
|
-
return class extends Component {
|
|
7
|
+
return class WithFallbackStyles extends Component {
|
|
8
8
|
constructor(props) {
|
|
9
9
|
super(props);
|
|
10
10
|
this.nodeRef = this.props.node;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/higher-order/with-fallback-styles/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default mapNodeToProps => createHigherOrderComponent(WrappedComponent => {\n return class extends Component {\n constructor(props) {\n super(props);\n this.nodeRef = this.props.node;\n this.state = {\n fallbackStyles: undefined,\n grabStylesCompleted: false\n };\n this.bindRef = this.bindRef.bind(this);\n }\n bindRef(node) {\n if (!node) {\n return;\n }\n this.nodeRef = node;\n }\n componentDidMount() {\n this.grabFallbackStyles();\n }\n componentDidUpdate() {\n this.grabFallbackStyles();\n }\n grabFallbackStyles() {\n const {\n grabStylesCompleted,\n fallbackStyles\n } = this.state;\n if (this.nodeRef && !grabStylesCompleted) {\n const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);\n if (!fastDeepEqual(newFallbackStyles, fallbackStyles)) {\n this.setState({\n fallbackStyles: newFallbackStyles,\n grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)\n });\n }\n }\n }\n render() {\n const wrappedComponent = /*#__PURE__*/_jsx(WrappedComponent, {\n ...this.props,\n ...this.state.fallbackStyles\n });\n return this.props.node ? wrappedComponent : /*#__PURE__*/_jsxs(\"div\", {\n ref: this.bindRef,\n children: [\" \", wrappedComponent, \" \"]\n });\n }\n };\n}, 'withFallbackStyles');"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,mBAAmB;AAK1B,SAAS,iBAAiB;AAC1B,SAAS,kCAAkC;AAC3C,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,IAAO,+BAAQ,oBAAkB,2BAA2B,sBAAoB;AAC9E,SAAO,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6/index.js';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport default mapNodeToProps => createHigherOrderComponent(WrappedComponent => {\n return class WithFallbackStyles extends Component {\n constructor(props) {\n super(props);\n this.nodeRef = this.props.node;\n this.state = {\n fallbackStyles: undefined,\n grabStylesCompleted: false\n };\n this.bindRef = this.bindRef.bind(this);\n }\n bindRef(node) {\n if (!node) {\n return;\n }\n this.nodeRef = node;\n }\n componentDidMount() {\n this.grabFallbackStyles();\n }\n componentDidUpdate() {\n this.grabFallbackStyles();\n }\n grabFallbackStyles() {\n const {\n grabStylesCompleted,\n fallbackStyles\n } = this.state;\n if (this.nodeRef && !grabStylesCompleted) {\n const newFallbackStyles = mapNodeToProps(this.nodeRef, this.props);\n if (!fastDeepEqual(newFallbackStyles, fallbackStyles)) {\n this.setState({\n fallbackStyles: newFallbackStyles,\n grabStylesCompleted: Object.values(newFallbackStyles).every(Boolean)\n });\n }\n }\n }\n render() {\n const wrappedComponent = /*#__PURE__*/_jsx(WrappedComponent, {\n ...this.props,\n ...this.state.fallbackStyles\n });\n return this.props.node ? wrappedComponent : /*#__PURE__*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KAAK,KAAK;AAAA,QACV,UAAU,CAAC,KAAK,kBAAkB,GAAG;AAAA,MACvC,CAAC;AAAA,IACH;AAAA,EACF;AACF,GAAG,oBAAoB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useCallback, useState } from "@wordpress/element";
|
|
3
3
|
import { createHigherOrderComponent, __experimentalUseFocusOutside as useFocusOutside } from "@wordpress/compose";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
var with_focus_outside_default = createHigherOrderComponent((WrappedComponent) => (props)
|
|
5
|
+
var with_focus_outside_default = createHigherOrderComponent((WrappedComponent) => function WithFocusOutside(props) {
|
|
6
6
|
const [handleFocusOutside, setHandleFocusOutside] = useState(void 0);
|
|
7
7
|
const bindFocusOutsideHandler = useCallback((node) => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : void 0), []);
|
|
8
8
|
return /* @__PURE__ */ _jsx("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/higher-order/with-focus-outside/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport { createHigherOrderComponent, __experimentalUseFocusOutside as useFocusOutside } from '@wordpress/compose';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createHigherOrderComponent(WrappedComponent => props
|
|
5
|
-
"mappings": ";AAGA,SAAS,aAAa,gBAAgB;AACtC,SAAS,4BAA4B,iCAAiC,uBAAuB;AAC7F,SAAS,OAAO,YAAY;AAC5B,IAAO,6BAAQ,2BAA2B,sBAAoB,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport { createHigherOrderComponent, __experimentalUseFocusOutside as useFocusOutside } from '@wordpress/compose';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createHigherOrderComponent(WrappedComponent => function WithFocusOutside(props) {\n const [handleFocusOutside, setHandleFocusOutside] = useState(undefined);\n const bindFocusOutsideHandler = useCallback(node => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);\n return /*#__PURE__*/_jsx(\"div\", {\n ...useFocusOutside(handleFocusOutside),\n children: /*#__PURE__*/_jsx(WrappedComponent, {\n ref: bindFocusOutsideHandler,\n ...props\n })\n });\n}, 'withFocusOutside');"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,aAAa,gBAAgB;AACtC,SAAS,4BAA4B,iCAAiC,uBAAuB;AAC7F,SAAS,OAAO,YAAY;AAC5B,IAAO,6BAAQ,2BAA2B,sBAAoB,SAAS,iBAAiB,OAAO;AAC7F,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,MAAS;AACtE,QAAM,0BAA0B,YAAY,UAAQ,sBAAsB,MAAM,MAAM,qBAAqB,KAAK,mBAAmB,KAAK,IAAI,IAAI,MAAS,GAAG,CAAC,CAAC;AAC9J,SAAoB,qBAAK,OAAO;AAAA,IAC9B,GAAG,gBAAgB,kBAAkB;AAAA,IACrC,UAAuB,qBAAK,kBAAkB;AAAA,MAC5C,KAAK;AAAA,MACL,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH,GAAG,kBAAkB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
import { createHigherOrderComponent, useDebounce } from "@wordpress/compose";
|
|
3
3
|
import { speak } from "@wordpress/a11y";
|
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
var with_spoken_messages_default = createHigherOrderComponent((Component) => (props)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
var with_spoken_messages_default = createHigherOrderComponent((Component) => function WithSpokenMessages(props) {
|
|
6
|
+
return /* @__PURE__ */ _jsx(Component, {
|
|
7
|
+
...props,
|
|
8
|
+
speak,
|
|
9
|
+
debouncedSpeak: useDebounce(speak, 500)
|
|
10
|
+
});
|
|
11
|
+
}, "withSpokenMessages");
|
|
10
12
|
export {
|
|
11
13
|
with_spoken_messages_default as default
|
|
12
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/higher-order/with-spoken-messages/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * A Higher Order Component used to provide speak and debounced speak functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {ComponentType} Component The component to be wrapped.\n *\n * @return {ComponentType} The wrapped component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createHigherOrderComponent(Component => props
|
|
5
|
-
"mappings": ";AAGA,SAAS,4BAA4B,mBAAmB;AACxD,SAAS,aAAa;AAatB,SAAS,OAAO,YAAY;AAC5B,IAAO,+BAAQ,2BAA2B,eAAa,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('react').ComponentType} ComponentType */\n\n/**\n * A Higher Order Component used to provide speak and debounced speak functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {ComponentType} Component The component to be wrapped.\n *\n * @return {ComponentType} The wrapped component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createHigherOrderComponent(Component => function WithSpokenMessages(props) {\n return /*#__PURE__*/_jsx(Component, {\n ...props,\n speak: speak,\n debouncedSpeak: useDebounce(speak, 500)\n });\n}, 'withSpokenMessages');"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,4BAA4B,mBAAmB;AACxD,SAAS,aAAa;AAatB,SAAS,OAAO,YAAY;AAC5B,IAAO,+BAAQ,2BAA2B,eAAa,SAAS,mBAAmB,OAAO;AACxF,SAAoB,qBAAK,WAAW;AAAA,IAClC,GAAG;AAAA,IACH;AAAA,IACA,gBAAgB,YAAY,OAAO,GAAG;AAAA,EACxC,CAAC;AACH,GAAG,oBAAoB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/input-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport { space } from '../utils/space';\nimport { useDraft } from './utils';\nimport BaseControl from '../base-control';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(InputControl);\n const id = `inspector-input-control-${instanceId}`;\n return idProp || id;\n}\nexport function UnforwardedInputControl(props, ref) {\n const {\n __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize,\n __unstableStateReducer: stateReducer = state => state,\n __unstableInputWidth,\n className,\n disabled = false,\n help,\n hideLabelFromVision = false,\n id: idProp,\n isPressEnterToChange = false,\n label,\n labelPosition = 'top',\n onChange = noop,\n onValidate = noop,\n onKeyDown = noop,\n prefix,\n size = 'default',\n style,\n suffix,\n value,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const classes = clsx('components-input-control', className);\n const draftHookProps = useDraft({\n value,\n onBlur: restProps.onBlur,\n onChange\n });\n const helpProp = !!help ? {\n 'aria-describedby': `${id}__help`\n } : {};\n maybeWarnDeprecated36pxSize({\n componentName: 'InputControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n help: help,\n id: id,\n children: /*#__PURE__*/_jsx(InputBase, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __unstableInputWidth: __unstableInputWidth,\n disabled: disabled,\n gap: 3,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n justify: \"left\",\n label: label,\n labelPosition: labelPosition,\n prefix: prefix,\n size: size,\n style: style,\n suffix: suffix,\n children: /*#__PURE__*/_jsx(InputField, {\n ...restProps,\n ...helpProp,\n __next40pxDefaultSize: __next40pxDefaultSize,\n className: \"components-input-control__input\",\n disabled: disabled,\n id: id,\n isPressEnterToChange: isPressEnterToChange,\n onKeyDown: onKeyDown,\n onValidate: onValidate,\n paddingInlineStart: prefix ? space(1) : undefined,\n paddingInlineEnd: suffix ? space(1) : undefined,\n ref: ref,\n size: size,\n stateReducer: stateReducer,\n ...draftHookProps\n })\n })\n });\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from 'react';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '' );\n *\n * return (\n * \t<InputControl\n * \t\t\t__next40pxDefaultSize\n * \t\tvalue={ value }\n * \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n * \t/>\n * );\n * };\n * ```\n */\nexport const InputControl = forwardRef(UnforwardedInputControl);\nexport default InputControl;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,eAAe;AACtB,OAAO,gBAAgB;AACvB,SAAS,aAAa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AAA,MACA;AAAA,MACA,UAAuB,qBAAK,YAAY;AAAA,QACtC,GAAG;AAAA,QACH,GAAG;AAAA,QACH;AAAA,QACA,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,oBAAoB,SAAS,MAAM,CAAC,IAAI;AAAA,QACxC,kBAAkB,SAAS,MAAM,CAAC,IAAI;AAAA,QACtC;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport { space } from '../utils/space';\nimport { useDraft } from './utils';\nimport BaseControl from '../base-control';\nimport { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst noop = () => {};\nfunction useUniqueId(idProp) {\n const instanceId = useInstanceId(InputControl);\n const id = `inspector-input-control-${instanceId}`;\n return idProp || id;\n}\nexport function UnforwardedInputControl(props, ref) {\n const {\n __next40pxDefaultSize,\n __shouldNotWarnDeprecated36pxSize,\n __unstableStateReducer: stateReducer = state => state,\n __unstableInputWidth,\n className,\n disabled = false,\n help,\n hideLabelFromVision = false,\n id: idProp,\n isPressEnterToChange = false,\n label,\n labelPosition = 'top',\n onChange = noop,\n onValidate = noop,\n onKeyDown = noop,\n prefix,\n size = 'default',\n style,\n suffix,\n value,\n ...restProps\n } = useDeprecated36pxDefaultSizeProp(props);\n const id = useUniqueId(idProp);\n const classes = clsx('components-input-control', className);\n const draftHookProps = useDraft({\n value,\n onBlur: restProps.onBlur,\n onChange\n });\n const helpProp = !!help ? {\n 'aria-describedby': `${id}__help`\n } : {};\n maybeWarnDeprecated36pxSize({\n componentName: 'InputControl',\n __next40pxDefaultSize,\n size,\n __shouldNotWarnDeprecated36pxSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n className: classes,\n help: help,\n id: id,\n children: /*#__PURE__*/_jsx(InputBase, {\n __next40pxDefaultSize: __next40pxDefaultSize,\n __unstableInputWidth: __unstableInputWidth,\n disabled: disabled,\n gap: 3,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n justify: \"left\",\n label: label,\n labelPosition: labelPosition,\n prefix: prefix,\n size: size,\n style: style,\n suffix: suffix,\n children: /*#__PURE__*/_jsx(InputField, {\n ...restProps,\n ...helpProp,\n __next40pxDefaultSize: __next40pxDefaultSize,\n className: \"components-input-control__input\",\n disabled: disabled,\n id: id,\n isPressEnterToChange: isPressEnterToChange,\n onKeyDown: onKeyDown,\n onValidate: onValidate,\n paddingInlineStart: prefix ? space(1) : undefined,\n paddingInlineEnd: suffix ? space(1) : undefined,\n ref: ref,\n size: size,\n stateReducer: stateReducer,\n ...draftHookProps\n })\n })\n });\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from 'react';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '' );\n *\n * return (\n * \t<InputControl\n * \t\t\t__next40pxDefaultSize\n * \t\tvalue={ value }\n * \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n * \t/>\n * );\n * };\n * ```\n */\nexport const InputControl = forwardRef(UnforwardedInputControl);\nInputControl.displayName = 'InputControl';\nexport default InputControl;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,eAAe;AACtB,OAA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