@wordpress/components 32.0.1-next.ba3aee3a2.0 → 32.0.2-next.v.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/CONTRIBUTING.md +6 -0
- package/build/angle-picker-control/index.cjs +1 -0
- package/build/angle-picker-control/index.cjs.map +2 -2
- package/build/box-control/index.cjs +15 -7
- package/build/box-control/index.cjs.map +2 -2
- package/build/button/deprecated.cjs +12 -8
- package/build/button/deprecated.cjs.map +2 -2
- package/build/button/index.cjs +1 -0
- package/build/button/index.cjs.map +2 -2
- package/build/button-group/index.cjs +1 -0
- package/build/button-group/index.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker-option.cjs +2 -1
- package/build/circular-option-picker/circular-option-picker-option.cjs.map +2 -2
- package/build/circular-option-picker/circular-option-picker.cjs +1 -0
- package/build/circular-option-picker/circular-option-picker.cjs.map +2 -2
- package/build/clipboard-button/index.cjs +11 -7
- package/build/clipboard-button/index.cjs.map +2 -2
- package/build/color-indicator/index.cjs +1 -0
- package/build/color-indicator/index.cjs.map +2 -2
- package/build/color-palette/index.cjs +1 -0
- package/build/color-palette/index.cjs.map +2 -2
- package/build/combobox-control/index.cjs +1 -1
- package/build/combobox-control/index.cjs.map +2 -2
- package/build/context/context-system-provider.cjs +1 -1
- package/build/context/context-system-provider.cjs.map +2 -2
- package/build/date-time/date-time/index.cjs +1 -0
- package/build/date-time/date-time/index.cjs.map +2 -2
- package/build/disclosure/index.cjs +1 -0
- package/build/disclosure/index.cjs.map +2 -2
- package/build/duotone-picker/duotone-picker.cjs +1 -1
- package/build/duotone-picker/duotone-picker.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -0
- package/build/external-link/index.cjs.map +2 -2
- package/build/font-size-picker/index.cjs +1 -0
- package/build/font-size-picker/index.cjs.map +2 -2
- package/build/form-file-upload/index.cjs +9 -5
- package/build/form-file-upload/index.cjs.map +2 -2
- package/build/form-toggle/index.cjs +1 -0
- package/build/form-toggle/index.cjs.map +2 -2
- package/build/form-token-field/token-input.cjs +1 -0
- package/build/form-token-field/token-input.cjs.map +2 -2
- package/build/form-token-field/token.cjs.map +2 -2
- package/build/higher-order/navigate-regions/index.cjs +9 -7
- package/build/higher-order/navigate-regions/index.cjs.map +2 -2
- package/build/higher-order/with-fallback-styles/index.cjs +2 -2
- package/build/higher-order/with-fallback-styles/index.cjs.map +2 -2
- package/build/higher-order/with-focus-outside/index.cjs +1 -1
- package/build/higher-order/with-focus-outside/index.cjs.map +2 -2
- package/build/higher-order/with-spoken-messages/index.cjs +7 -5
- package/build/higher-order/with-spoken-messages/index.cjs.map +2 -2
- package/build/input-control/index.cjs +1 -0
- package/build/input-control/index.cjs.map +2 -2
- package/build/input-control/styles/input-control-styles.cjs +22 -22
- package/build/input-control/styles/input-control-styles.cjs.map +2 -2
- package/build/menu/popover.cjs +1 -0
- package/build/menu/popover.cjs.map +2 -2
- package/build/menu/styles.cjs +15 -15
- package/build/menu/styles.cjs.map +2 -2
- package/build/menu-item/index.cjs +1 -0
- package/build/menu-item/index.cjs.map +2 -2
- package/build/modal/index.cjs +1 -0
- package/build/modal/index.cjs.map +2 -2
- package/build/navigable-container/menu.cjs +1 -0
- package/build/navigable-container/menu.cjs.map +2 -2
- package/build/navigable-container/tabbable.cjs +1 -0
- package/build/navigable-container/tabbable.cjs.map +2 -2
- package/build/navigation/back-button/index.cjs +1 -0
- package/build/navigation/back-button/index.cjs.map +2 -2
- package/build/number-control/index.cjs +1 -0
- package/build/number-control/index.cjs.map +2 -2
- package/build/panel/body.cjs +1 -0
- package/build/panel/body.cjs.map +2 -2
- package/build/panel/index.cjs +1 -0
- package/build/panel/index.cjs.map +2 -2
- package/build/panel/row.cjs +1 -0
- package/build/panel/row.cjs.map +2 -2
- package/build/progress-bar/index.cjs +1 -0
- package/build/progress-bar/index.cjs.map +2 -2
- package/build/radio-group/index.cjs +1 -0
- package/build/radio-group/index.cjs.map +2 -2
- package/build/radio-group/radio.cjs +9 -4
- package/build/radio-group/radio.cjs.map +2 -2
- package/build/range-control/index.cjs +1 -0
- package/build/range-control/index.cjs.map +2 -2
- package/build/resizable-box/index.cjs +1 -0
- package/build/resizable-box/index.cjs.map +2 -2
- package/build/search-control/index.cjs +1 -0
- package/build/search-control/index.cjs.map +2 -2
- package/build/select-control/index.cjs +1 -0
- package/build/select-control/index.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/slot.cjs +17 -5
- package/build/slot-fill/bubbles-virtually/slot.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs +17 -4
- package/build/slot-fill/bubbles-virtually/use-slot-fills.cjs.map +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot.cjs +7 -3
- package/build/slot-fill/bubbles-virtually/use-slot.cjs.map +2 -2
- package/build/slot-fill/context.cjs +17 -6
- package/build/slot-fill/context.cjs.map +3 -3
- package/build/slot-fill/fill.cjs +29 -4
- package/build/slot-fill/fill.cjs.map +4 -4
- package/build/slot-fill/index.cjs +8 -23
- package/build/slot-fill/index.cjs.map +3 -3
- package/build/slot-fill/provider.cjs +33 -17
- package/build/slot-fill/provider.cjs.map +2 -2
- package/build/slot-fill/slot.cjs +7 -4
- package/build/slot-fill/slot.cjs.map +2 -2
- package/build/snackbar/index.cjs +1 -0
- package/build/snackbar/index.cjs.map +2 -2
- package/build/spinner/index.cjs +1 -0
- package/build/spinner/index.cjs.map +2 -2
- package/build/tab-panel/index.cjs +1 -0
- package/build/tab-panel/index.cjs.map +2 -2
- package/build/text-control/index.cjs +1 -0
- package/build/text-control/index.cjs.map +2 -2
- package/build/text-highlight/index.cjs +1 -0
- package/build/text-highlight/index.cjs.map +2 -2
- package/build/textarea-control/index.cjs +1 -0
- package/build/textarea-control/index.cjs.map +2 -2
- package/build/toggle-control/index.cjs +1 -0
- package/build/toggle-control/index.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/as-button-group.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control/as-button-group.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control-option/component.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control-option/component.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs +1 -0
- package/build/toggle-group-control/toggle-group-control-option-icon/component.cjs.map +2 -2
- package/build/toolbar/toolbar/index.cjs +1 -0
- package/build/toolbar/toolbar/index.cjs.map +2 -2
- package/build/toolbar/toolbar/toolbar-container.cjs +1 -0
- package/build/toolbar/toolbar/toolbar-container.cjs.map +2 -2
- package/build/toolbar/toolbar-button/index.cjs +1 -0
- package/build/toolbar/toolbar-button/index.cjs.map +2 -2
- package/build/toolbar/toolbar-dropdown-menu/index.cjs +1 -0
- package/build/toolbar/toolbar-dropdown-menu/index.cjs.map +2 -2
- package/build/toolbar/toolbar-item/index.cjs +1 -0
- package/build/toolbar/toolbar-item/index.cjs.map +2 -2
- package/build/tooltip/index.cjs +1 -0
- package/build/tooltip/index.cjs.map +2 -2
- package/build/tree-grid/cell.cjs +1 -0
- package/build/tree-grid/cell.cjs.map +2 -2
- package/build/tree-grid/index.cjs +1 -0
- package/build/tree-grid/index.cjs.map +2 -2
- package/build/tree-grid/item.cjs +1 -0
- package/build/tree-grid/item.cjs.map +2 -2
- package/build/tree-grid/roving-tab-index-item.cjs +1 -0
- package/build/tree-grid/roving-tab-index-item.cjs.map +2 -2
- package/build/tree-grid/row.cjs +1 -0
- package/build/tree-grid/row.cjs.map +2 -2
- package/build/tree-select/index.cjs +12 -8
- package/build/tree-select/index.cjs.map +2 -2
- package/build/unit-control/index.cjs +1 -0
- package/build/unit-control/index.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/validated-form-controls/components/checkbox-control.cjs +1 -0
- package/build/validated-form-controls/components/checkbox-control.cjs.map +2 -2
- package/build/validated-form-controls/components/combobox-control.cjs +1 -0
- package/build/validated-form-controls/components/combobox-control.cjs.map +2 -2
- package/build/validated-form-controls/components/custom-select-control.cjs +1 -0
- package/build/validated-form-controls/components/custom-select-control.cjs.map +2 -2
- package/build/validated-form-controls/components/form-token-field.cjs +1 -0
- package/build/validated-form-controls/components/form-token-field.cjs.map +2 -2
- package/build/validated-form-controls/components/input-control.cjs +1 -0
- package/build/validated-form-controls/components/input-control.cjs.map +2 -2
- package/build/validated-form-controls/components/number-control.cjs +1 -0
- package/build/validated-form-controls/components/number-control.cjs.map +2 -2
- package/build/validated-form-controls/components/radio-control.cjs +1 -0
- package/build/validated-form-controls/components/radio-control.cjs.map +2 -2
- package/build/validated-form-controls/components/range-control.cjs +1 -0
- package/build/validated-form-controls/components/range-control.cjs.map +2 -2
- package/build/validated-form-controls/components/select-control.cjs +1 -0
- package/build/validated-form-controls/components/select-control.cjs.map +2 -2
- package/build/validated-form-controls/components/text-control.cjs +1 -0
- package/build/validated-form-controls/components/text-control.cjs.map +2 -2
- package/build/validated-form-controls/components/textarea-control.cjs +1 -0
- package/build/validated-form-controls/components/textarea-control.cjs.map +2 -2
- package/build/validated-form-controls/components/toggle-control.cjs +1 -0
- package/build/validated-form-controls/components/toggle-control.cjs.map +2 -2
- package/build/validated-form-controls/components/toggle-group-control.cjs +1 -0
- package/build/validated-form-controls/components/toggle-group-control.cjs.map +2 -2
- package/build/validated-form-controls/control-with-error.cjs +1 -0
- package/build/validated-form-controls/control-with-error.cjs.map +2 -2
- package/build-module/angle-picker-control/index.mjs +1 -0
- package/build-module/angle-picker-control/index.mjs.map +2 -2
- package/build-module/box-control/index.mjs +15 -7
- package/build-module/box-control/index.mjs.map +2 -2
- package/build-module/button/deprecated.mjs +12 -8
- package/build-module/button/deprecated.mjs.map +2 -2
- package/build-module/button/index.mjs +1 -0
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/button-group/index.mjs +1 -0
- package/build-module/button-group/index.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker-option.mjs +2 -1
- package/build-module/circular-option-picker/circular-option-picker-option.mjs.map +2 -2
- package/build-module/circular-option-picker/circular-option-picker.mjs +1 -0
- package/build-module/circular-option-picker/circular-option-picker.mjs.map +2 -2
- package/build-module/clipboard-button/index.mjs +11 -7
- package/build-module/clipboard-button/index.mjs.map +2 -2
- package/build-module/color-indicator/index.mjs +1 -0
- package/build-module/color-indicator/index.mjs.map +2 -2
- package/build-module/color-palette/index.mjs +1 -0
- package/build-module/color-palette/index.mjs.map +2 -2
- package/build-module/combobox-control/index.mjs +1 -1
- package/build-module/combobox-control/index.mjs.map +2 -2
- package/build-module/context/context-system-provider.mjs +1 -1
- package/build-module/context/context-system-provider.mjs.map +2 -2
- package/build-module/date-time/date-time/index.mjs +1 -0
- package/build-module/date-time/date-time/index.mjs.map +2 -2
- package/build-module/disclosure/index.mjs +1 -0
- package/build-module/disclosure/index.mjs.map +2 -2
- package/build-module/duotone-picker/duotone-picker.mjs +1 -1
- package/build-module/duotone-picker/duotone-picker.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -0
- package/build-module/external-link/index.mjs.map +2 -2
- package/build-module/font-size-picker/index.mjs +1 -0
- package/build-module/font-size-picker/index.mjs.map +2 -2
- package/build-module/form-file-upload/index.mjs +9 -5
- package/build-module/form-file-upload/index.mjs.map +2 -2
- package/build-module/form-toggle/index.mjs +1 -0
- package/build-module/form-toggle/index.mjs.map +2 -2
- package/build-module/form-token-field/token-input.mjs +1 -0
- package/build-module/form-token-field/token-input.mjs.map +2 -2
- package/build-module/form-token-field/token.mjs.map +2 -2
- package/build-module/higher-order/navigate-regions/index.mjs +9 -7
- package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
- package/build-module/higher-order/with-fallback-styles/index.mjs +2 -2
- package/build-module/higher-order/with-fallback-styles/index.mjs.map +2 -2
- package/build-module/higher-order/with-focus-outside/index.mjs +1 -1
- package/build-module/higher-order/with-focus-outside/index.mjs.map +2 -2
- package/build-module/higher-order/with-spoken-messages/index.mjs +7 -5
- package/build-module/higher-order/with-spoken-messages/index.mjs.map +2 -2
- package/build-module/input-control/index.mjs +1 -0
- package/build-module/input-control/index.mjs.map +2 -2
- package/build-module/input-control/styles/input-control-styles.mjs +22 -22
- package/build-module/input-control/styles/input-control-styles.mjs.map +2 -2
- package/build-module/menu/popover.mjs +1 -0
- package/build-module/menu/popover.mjs.map +2 -2
- package/build-module/menu/styles.mjs +15 -15
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/menu-item/index.mjs +1 -0
- package/build-module/menu-item/index.mjs.map +2 -2
- package/build-module/modal/index.mjs +1 -0
- package/build-module/modal/index.mjs.map +2 -2
- package/build-module/navigable-container/menu.mjs +1 -0
- package/build-module/navigable-container/menu.mjs.map +2 -2
- package/build-module/navigable-container/tabbable.mjs +1 -0
- package/build-module/navigable-container/tabbable.mjs.map +2 -2
- package/build-module/navigation/back-button/index.mjs +1 -0
- package/build-module/navigation/back-button/index.mjs.map +2 -2
- package/build-module/number-control/index.mjs +1 -0
- package/build-module/number-control/index.mjs.map +2 -2
- package/build-module/panel/body.mjs +1 -0
- package/build-module/panel/body.mjs.map +2 -2
- package/build-module/panel/index.mjs +1 -0
- package/build-module/panel/index.mjs.map +2 -2
- package/build-module/panel/row.mjs +1 -0
- package/build-module/panel/row.mjs.map +2 -2
- package/build-module/progress-bar/index.mjs +1 -0
- package/build-module/progress-bar/index.mjs.map +2 -2
- package/build-module/radio-group/index.mjs +1 -0
- package/build-module/radio-group/index.mjs.map +2 -2
- package/build-module/radio-group/radio.mjs +9 -4
- package/build-module/radio-group/radio.mjs.map +2 -2
- package/build-module/range-control/index.mjs +1 -0
- package/build-module/range-control/index.mjs.map +2 -2
- package/build-module/resizable-box/index.mjs +1 -0
- package/build-module/resizable-box/index.mjs.map +2 -2
- package/build-module/search-control/index.mjs +1 -0
- package/build-module/search-control/index.mjs.map +2 -2
- package/build-module/select-control/index.mjs +1 -0
- package/build-module/select-control/index.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/slot.mjs +16 -4
- package/build-module/slot-fill/bubbles-virtually/slot.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs +17 -4
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.mjs.map +2 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot.mjs +6 -2
- package/build-module/slot-fill/bubbles-virtually/use-slot.mjs.map +2 -2
- package/build-module/slot-fill/context.mjs +7 -2
- package/build-module/slot-fill/context.mjs.map +2 -2
- package/build-module/slot-fill/fill.mjs +30 -5
- package/build-module/slot-fill/fill.mjs.map +3 -3
- package/build-module/slot-fill/index.mjs +7 -21
- package/build-module/slot-fill/index.mjs.map +2 -2
- package/build-module/slot-fill/provider.mjs +33 -17
- package/build-module/slot-fill/provider.mjs.map +2 -2
- package/build-module/slot-fill/slot.mjs +7 -4
- package/build-module/slot-fill/slot.mjs.map +2 -2
- package/build-module/snackbar/index.mjs +1 -0
- package/build-module/snackbar/index.mjs.map +2 -2
- package/build-module/spinner/index.mjs +1 -0
- package/build-module/spinner/index.mjs.map +2 -2
- package/build-module/tab-panel/index.mjs +1 -0
- package/build-module/tab-panel/index.mjs.map +2 -2
- package/build-module/text-control/index.mjs +1 -0
- package/build-module/text-control/index.mjs.map +2 -2
- package/build-module/text-highlight/index.mjs +1 -0
- package/build-module/text-highlight/index.mjs.map +2 -2
- package/build-module/textarea-control/index.mjs +1 -0
- package/build-module/textarea-control/index.mjs.map +2 -2
- package/build-module/toggle-control/index.mjs +1 -0
- package/build-module/toggle-control/index.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option/component.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option/component.mjs.map +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map +2 -2
- package/build-module/toolbar/toolbar/index.mjs +1 -0
- package/build-module/toolbar/toolbar/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar/toolbar-container.mjs +1 -0
- package/build-module/toolbar/toolbar/toolbar-container.mjs.map +2 -2
- package/build-module/toolbar/toolbar-button/index.mjs +1 -0
- package/build-module/toolbar/toolbar-button/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar-dropdown-menu/index.mjs +1 -0
- package/build-module/toolbar/toolbar-dropdown-menu/index.mjs.map +2 -2
- package/build-module/toolbar/toolbar-item/index.mjs +1 -0
- package/build-module/toolbar/toolbar-item/index.mjs.map +2 -2
- package/build-module/tooltip/index.mjs +1 -0
- package/build-module/tooltip/index.mjs.map +2 -2
- package/build-module/tree-grid/cell.mjs +1 -0
- package/build-module/tree-grid/cell.mjs.map +2 -2
- package/build-module/tree-grid/index.mjs +1 -0
- package/build-module/tree-grid/index.mjs.map +2 -2
- package/build-module/tree-grid/item.mjs +1 -0
- package/build-module/tree-grid/item.mjs.map +2 -2
- package/build-module/tree-grid/roving-tab-index-item.mjs +1 -0
- package/build-module/tree-grid/roving-tab-index-item.mjs.map +2 -2
- package/build-module/tree-grid/row.mjs +1 -0
- package/build-module/tree-grid/row.mjs.map +2 -2
- package/build-module/tree-select/index.mjs +12 -8
- package/build-module/tree-select/index.mjs.map +2 -2
- package/build-module/unit-control/index.mjs +1 -0
- package/build-module/unit-control/index.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/validated-form-controls/components/checkbox-control.mjs +1 -0
- package/build-module/validated-form-controls/components/checkbox-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/combobox-control.mjs +1 -0
- package/build-module/validated-form-controls/components/combobox-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/custom-select-control.mjs +1 -0
- package/build-module/validated-form-controls/components/custom-select-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/form-token-field.mjs +1 -0
- package/build-module/validated-form-controls/components/form-token-field.mjs.map +2 -2
- package/build-module/validated-form-controls/components/input-control.mjs +1 -0
- package/build-module/validated-form-controls/components/input-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/number-control.mjs +1 -0
- package/build-module/validated-form-controls/components/number-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/radio-control.mjs +1 -0
- package/build-module/validated-form-controls/components/radio-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/range-control.mjs +1 -0
- package/build-module/validated-form-controls/components/range-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/select-control.mjs +1 -0
- package/build-module/validated-form-controls/components/select-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/text-control.mjs +1 -0
- package/build-module/validated-form-controls/components/text-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/textarea-control.mjs +1 -0
- package/build-module/validated-form-controls/components/textarea-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/toggle-control.mjs +1 -0
- package/build-module/validated-form-controls/components/toggle-control.mjs.map +2 -2
- package/build-module/validated-form-controls/components/toggle-group-control.mjs +1 -0
- package/build-module/validated-form-controls/components/toggle-group-control.mjs.map +2 -2
- package/build-module/validated-form-controls/control-with-error.mjs +1 -0
- package/build-module/validated-form-controls/control-with-error.mjs.map +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/animate/stories/index.story.d.ts +8 -8
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/stories/index.story.d.ts +1 -1
- package/build-types/badge/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +2 -2
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +2 -2
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +6 -6
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +8 -8
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +2 -2
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +9 -9
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +1 -1
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-calendar.story.d.ts +1 -1
- package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -1
- package/build-types/card/stories/index.story.d.ts +1 -1
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts +1 -0
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +6 -6
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/clipboard-button/types.d.ts +1 -0
- package/build-types/clipboard-button/types.d.ts.map +1 -1
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +4 -4
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +5 -5
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/index.story.d.ts +1 -1
- package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +3 -3
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/context/context-system-provider.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +4 -4
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -4
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +2 -2
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts.map +1 -1
- package/build-types/divider/stories/index.story.d.ts +1 -1
- package/build-types/divider/stories/index.story.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts +1 -1
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +2 -2
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +4 -4
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/elevation/stories/index.story.d.ts +1 -1
- package/build-types/elevation/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts +1 -1
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/stories/index.story.d.ts +1 -1
- package/build-types/flex/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +5 -5
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +6 -6
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +4 -4
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/stories/index.story.d.ts +1 -1
- package/build-types/grid/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +2 -2
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts +1 -1
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts +1 -1
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +5 -5
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/index.d.ts +1 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +8 -8
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/stories/index.story.d.ts +1 -1
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts.map +1 -1
- package/build-types/menu/stories/index.story.d.ts +1 -1
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +2 -2
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +5 -5
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts +1 -1
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/menu.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigable-container/tabbable.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +7 -7
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/default.d.ts +1 -1
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/group.d.ts +1 -1
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/search.d.ts +1 -1
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +1 -1
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +6 -6
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +3 -3
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/index.d.ts.map +1 -1
- package/build-types/panel/row.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts +1 -1
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts +1 -1
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +2 -2
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +2 -2
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts +1 -1
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +2 -2
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts +1 -1
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +3 -3
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts +2 -2
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +2 -2
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.story.d.ts +1 -1
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +2 -2
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +6 -6
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +2 -2
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +2 -3
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts +2 -2
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +3 -4
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts +1 -1
- package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +23 -25
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts +1 -1
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts +1 -1
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/stories/index.story.d.ts +1 -1
- package/build-types/spacer/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts +1 -1
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/stories/index.story.d.ts +1 -1
- package/build-types/surface/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +5 -5
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +8 -8
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +4 -4
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts +1 -1
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +4 -1
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +2 -2
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts +1 -1
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +3 -3
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +4 -4
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +2 -2
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/index.d.ts.map +1 -1
- package/build-types/tree-grid/item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/tree-grid/row.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +2 -2
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +2 -2
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts +1 -1
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/dropdown-motion.d.ts.map +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +2 -2
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/story-utils.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
- package/build-types/view/stories/index.story.d.ts +1 -1
- package/build-types/view/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.story.d.ts +1 -1
- package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +27 -25
- package/src/alignment-matrix-control/stories/index.story.tsx +1 -1
- package/src/angle-picker-control/index.tsx +1 -0
- package/src/angle-picker-control/stories/index.story.tsx +1 -1
- package/src/animate/stories/index.story.tsx +1 -1
- package/src/badge/stories/index.story.tsx +1 -1
- package/src/base-control/stories/index.story.tsx +4 -2
- package/src/border-box-control/border-box-control-split-controls/component.tsx +9 -0
- package/src/border-box-control/stories/index.story.tsx +3 -1
- package/src/border-box-control/test/index.tsx +51 -20
- package/src/border-control/stories/index.story.tsx +2 -1
- package/src/border-control/test/index.js +37 -34
- package/src/box-control/index.tsx +6 -0
- package/src/box-control/stories/index.story.tsx +3 -2
- package/src/button/deprecated.tsx +2 -0
- package/src/button/index.tsx +16 -15
- package/src/button/stories/e2e/index.story.tsx +9 -5
- package/src/button/stories/index.story.tsx +14 -11
- package/src/button/test/index.tsx +0 -5
- package/src/button-group/index.tsx +1 -0
- package/src/button-group/stories/index.story.tsx +5 -3
- package/src/calendar/stories/date-calendar.story.tsx +1 -1
- package/src/calendar/stories/date-range-calendar.story.tsx +1 -1
- package/src/card/stories/index.story.tsx +4 -2
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/circular-option-picker-option.tsx +2 -1
- package/src/circular-option-picker/circular-option-picker.tsx +2 -0
- package/src/circular-option-picker/stories/index.story.tsx +1 -1
- package/src/clipboard-button/index.tsx +2 -0
- package/src/clipboard-button/types.ts +1 -0
- package/src/color-indicator/index.tsx +1 -0
- package/src/color-indicator/stories/index.story.tsx +1 -1
- package/src/color-palette/index.tsx +1 -0
- package/src/color-palette/stories/index.story.tsx +1 -1
- package/src/color-picker/stories/index.story.tsx +1 -1
- package/src/combobox-control/index.tsx +1 -1
- package/src/combobox-control/stories/index.story.tsx +2 -1
- package/src/composite/legacy/stories/index.story.tsx +1 -1
- package/src/composite/legacy/stories/utils.tsx +1 -1
- package/src/composite/stories/index.story.tsx +1 -1
- package/src/confirm-dialog/stories/index.story.tsx +6 -2
- package/src/context/context-system-provider.js +2 -1
- package/src/custom-gradient-picker/stories/index.story.tsx +1 -1
- package/src/custom-select-control/stories/index.story.tsx +2 -1
- package/src/custom-select-control-v2/stories/index.story.tsx +1 -1
- package/src/date-time/date-time/index.tsx +1 -0
- package/src/date-time/stories/date-time.story.tsx +1 -1
- package/src/date-time/stories/date.story.tsx +1 -1
- package/src/date-time/stories/time.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +1 -1
- package/src/disclosure/index.tsx +1 -0
- package/src/divider/stories/index.story.tsx +1 -1
- package/src/draggable/stories/index.story.tsx +1 -1
- package/src/drop-zone/stories/index.story.tsx +1 -1
- package/src/dropdown/stories/index.story.tsx +2 -1
- package/src/dropdown-menu/stories/index.story.tsx +1 -1
- package/src/duotone-picker/duotone-picker.tsx +1 -1
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/duotone-picker/stories/duotone-swatch.story.tsx +1 -1
- package/src/elevation/stories/index.story.tsx +1 -1
- package/src/external-link/index.tsx +1 -0
- package/src/external-link/stories/index.story.tsx +1 -1
- package/src/flex/stories/index.story.tsx +1 -1
- package/src/focal-point-picker/stories/index.story.tsx +1 -1
- package/src/font-size-picker/index.tsx +1 -0
- package/src/font-size-picker/stories/e2e/index.story.tsx +3 -1
- package/src/font-size-picker/stories/index.story.tsx +2 -1
- package/src/form-file-upload/index.tsx +2 -0
- package/src/form-file-upload/stories/index.story.tsx +2 -2
- package/src/form-toggle/index.tsx +1 -0
- package/src/form-toggle/stories/index.story.tsx +1 -1
- package/src/form-token-field/stories/index.story.tsx +3 -1
- package/src/form-token-field/token-input.tsx +1 -0
- package/src/form-token-field/token.tsx +2 -2
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/grid/stories/index.story.tsx +1 -1
- package/src/guide/stories/index.story.tsx +6 -2
- package/src/h-stack/stories/e2e/index.story.tsx +1 -1
- package/src/h-stack/stories/index.story.tsx +1 -1
- package/src/heading/stories/index.story.tsx +1 -1
- package/src/higher-order/navigate-regions/index.tsx +7 -5
- package/src/higher-order/with-fallback-styles/index.tsx +2 -2
- package/src/higher-order/with-focus-outside/index.tsx +25 -24
- package/src/higher-order/with-spoken-messages/index.tsx +10 -7
- package/src/icon/stories/index.story.tsx +1 -1
- package/src/index.ts +6 -0
- package/src/input-control/index.tsx +1 -0
- package/src/input-control/stories/index.story.tsx +3 -2
- package/src/input-control/styles/input-control-styles.tsx +0 -4
- package/src/item-group/stories/index.story.tsx +1 -1
- package/src/keyboard-shortcuts/stories/index.story.tsx +1 -1
- package/src/menu/popover.tsx +1 -0
- package/src/menu/stories/index.story.tsx +5 -2
- package/src/menu/styles.ts +36 -26
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/menu-item/index.tsx +1 -0
- package/src/menu-item/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/stories/index.story.tsx +1 -1
- package/src/modal/index.tsx +1 -0
- package/src/modal/stories/index.story.tsx +11 -3
- package/src/navigable-container/menu.tsx +1 -0
- package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
- package/src/navigable-container/tabbable.tsx +1 -0
- package/src/navigation/back-button/index.tsx +1 -0
- package/src/navigation/stories/index.story.tsx +1 -1
- package/src/navigation/stories/utils/controlled-state.tsx +4 -1
- package/src/navigation/stories/utils/default.tsx +1 -1
- package/src/navigation/stories/utils/group.tsx +1 -1
- package/src/navigation/stories/utils/hide-if-empty.tsx +1 -1
- package/src/navigation/stories/utils/more-examples.tsx +1 -1
- package/src/navigation/stories/utils/search.tsx +1 -1
- package/src/navigator/stories/index.story.tsx +2 -1
- package/src/navigator/test/index.tsx +1 -1
- package/src/notice/stories/index.story.tsx +1 -1
- package/src/number-control/index.tsx +1 -0
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/palette-edit/stories/index.story.tsx +1 -1
- package/src/panel/body.tsx +1 -0
- package/src/panel/index.tsx +1 -0
- package/src/panel/row.tsx +1 -0
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +1 -1
- package/src/popover/stories/index.story.tsx +9 -2
- package/src/progress-bar/index.tsx +1 -0
- package/src/progress-bar/stories/index.story.tsx +1 -1
- package/src/query-controls/stories/index.story.tsx +1 -1
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/index.tsx +1 -0
- package/src/radio-group/radio.tsx +3 -0
- package/src/radio-group/stories/index.story.tsx +1 -1
- package/src/range-control/index.tsx +1 -0
- package/src/range-control/stories/index.story.tsx +5 -1
- package/src/resizable-box/index.tsx +1 -0
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scroll-lock/stories/index.story.tsx +6 -2
- package/src/scrollable/stories/index.story.tsx +1 -1
- package/src/search-control/index.tsx +1 -0
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/index.tsx +3 -0
- package/src/select-control/stories/index.story.tsx +3 -1
- package/src/shortcut/stories/index.story.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
- package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
- package/src/slot-fill/context.ts +15 -4
- package/src/slot-fill/fill.tsx +74 -0
- package/src/slot-fill/index.tsx +17 -33
- package/src/slot-fill/provider.tsx +49 -35
- package/src/slot-fill/slot.tsx +4 -4
- package/src/slot-fill/stories/index.story.tsx +1 -1
- package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
- package/src/slot-fill/test/slot.js +24 -1
- package/src/slot-fill/types.ts +16 -32
- package/src/snackbar/index.tsx +1 -0
- package/src/snackbar/stories/index.story.tsx +1 -1
- package/src/snackbar/stories/list.story.tsx +1 -1
- package/src/spacer/stories/index.story.tsx +1 -1
- package/src/spinner/index.tsx +1 -0
- package/src/spinner/stories/index.story.tsx +1 -1
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/tab-panel/index.tsx +1 -0
- package/src/tab-panel/stories/index.story.tsx +1 -1
- package/src/tabs/stories/index.story.tsx +11 -3
- package/src/text/stories/index.story.tsx +1 -1
- package/src/text-control/index.tsx +1 -0
- package/src/text-control/stories/index.story.tsx +2 -1
- package/src/text-highlight/index.tsx +2 -0
- package/src/text-highlight/stories/index.story.tsx +1 -1
- package/src/textarea-control/index.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/stories/index.story.tsx +8 -4
- package/src/tip/stories/index.story.tsx +1 -1
- package/src/toggle-control/index.tsx +1 -0
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar/index.tsx +1 -0
- package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
- package/src/toolbar/toolbar-button/index.tsx +1 -0
- package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
- package/src/toolbar/toolbar-item/index.tsx +1 -0
- package/src/tools-panel/stories/index.story.tsx +1 -1
- package/src/tooltip/index.tsx +1 -0
- package/src/tooltip/stories/index.story.tsx +14 -4
- package/src/tree-grid/cell.tsx +1 -0
- package/src/tree-grid/index.tsx +1 -0
- package/src/tree-grid/item.tsx +1 -0
- package/src/tree-grid/roving-tab-index-item.tsx +1 -0
- package/src/tree-grid/row.tsx +1 -0
- package/src/tree-grid/stories/index.story.tsx +6 -2
- package/src/tree-select/index.tsx +2 -0
- package/src/tree-select/stories/index.story.tsx +2 -1
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/index.tsx +1 -0
- package/src/unit-control/stories/index.story.tsx +3 -1
- package/src/utils/dropdown-motion.ts +1 -0
- package/src/v-stack/stories/e2e/index.story.tsx +1 -1
- package/src/v-stack/stories/index.story.tsx +1 -1
- package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
- package/src/validated-form-controls/components/combobox-control.tsx +1 -0
- package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
- package/src/validated-form-controls/components/form-token-field.tsx +1 -0
- package/src/validated-form-controls/components/input-control.tsx +1 -0
- package/src/validated-form-controls/components/number-control.tsx +1 -0
- package/src/validated-form-controls/components/radio-control.tsx +1 -0
- package/src/validated-form-controls/components/range-control.tsx +1 -0
- package/src/validated-form-controls/components/select-control.tsx +1 -0
- package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
- package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
- package/src/validated-form-controls/components/text-control.tsx +1 -0
- package/src/validated-form-controls/components/textarea-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
- package/src/validated-form-controls/control-with-error.tsx +1 -0
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
- package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
- package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
- package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
- package/src/slot-fill/fill.ts +0 -32
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
// packages/components/src/slot-fill/provider.tsx
|
|
2
|
+
import { observableMap } from "@wordpress/compose";
|
|
2
3
|
import { useState } from "@wordpress/element";
|
|
4
|
+
import { isShallowEqual } from "@wordpress/is-shallow-equal";
|
|
3
5
|
import SlotFillContext from "./context.mjs";
|
|
4
|
-
import { observableMap } from "@wordpress/compose";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
function createSlotRegistry() {
|
|
7
8
|
const slots = observableMap();
|
|
8
9
|
const fills = observableMap();
|
|
9
|
-
function registerSlot(name,
|
|
10
|
-
slots.set(name,
|
|
10
|
+
function registerSlot(name, slot) {
|
|
11
|
+
slots.set(name, slot);
|
|
11
12
|
}
|
|
12
13
|
function unregisterSlot(name, instance) {
|
|
13
|
-
|
|
14
|
+
const currentSlot = slots.get(name);
|
|
15
|
+
if (!currentSlot || currentSlot.instance !== instance) {
|
|
14
16
|
return;
|
|
15
17
|
}
|
|
16
18
|
slots.delete(name);
|
|
17
19
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
function updateSlot(name, slot) {
|
|
21
|
+
if (slot.type !== "portal") {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const slotForName = slots.get(name);
|
|
25
|
+
if (!slotForName) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (slotForName.type !== "portal") {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (slotForName.instance !== slot.instance) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
if (isShallowEqual(slotForName.fillProps, slot.fillProps)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
slots.set(name, slot);
|
|
38
|
+
}
|
|
39
|
+
function registerFill(name, fill) {
|
|
40
|
+
fills.set(name, [...fills.get(name) || [], fill]);
|
|
23
41
|
}
|
|
24
42
|
function unregisterFill(name, instance) {
|
|
25
43
|
const fillsForName = fills.get(name);
|
|
@@ -28,24 +46,21 @@ function createSlotRegistry() {
|
|
|
28
46
|
}
|
|
29
47
|
fills.set(name, fillsForName.filter((fill) => fill.instance !== instance));
|
|
30
48
|
}
|
|
31
|
-
function updateFill(name,
|
|
49
|
+
function updateFill(name, fill) {
|
|
32
50
|
const fillsForName = fills.get(name);
|
|
33
51
|
if (!fillsForName) {
|
|
34
52
|
return;
|
|
35
53
|
}
|
|
36
|
-
const fillForInstance = fillsForName.find((f) => f.instance === instance);
|
|
54
|
+
const fillForInstance = fillsForName.find((f) => f.instance === fill.instance);
|
|
37
55
|
if (!fillForInstance) {
|
|
38
56
|
return;
|
|
39
57
|
}
|
|
40
|
-
if (fillForInstance.children === children) {
|
|
58
|
+
if (fillForInstance.children === fill.children) {
|
|
41
59
|
return;
|
|
42
60
|
}
|
|
43
61
|
fills.set(name, fillsForName.map((f) => {
|
|
44
|
-
if (f.instance === instance) {
|
|
45
|
-
return
|
|
46
|
-
instance,
|
|
47
|
-
children
|
|
48
|
-
};
|
|
62
|
+
if (f.instance === fill.instance) {
|
|
63
|
+
return fill;
|
|
49
64
|
}
|
|
50
65
|
return f;
|
|
51
66
|
}));
|
|
@@ -55,6 +70,7 @@ function createSlotRegistry() {
|
|
|
55
70
|
fills,
|
|
56
71
|
registerSlot,
|
|
57
72
|
unregisterSlot,
|
|
73
|
+
updateSlot,
|
|
58
74
|
registerFill,
|
|
59
75
|
unregisterFill,
|
|
60
76
|
updateFill
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/slot-fill/provider.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport {
|
|
5
|
-
"mappings": ";AAGA,SAAS,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { observableMap } from '@wordpress/compose';\nimport { useState } from '@wordpress/element';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction createSlotRegistry() {\n const slots = observableMap();\n const fills = observableMap();\n function registerSlot(name, slot) {\n slots.set(name, slot);\n }\n function unregisterSlot(name, instance) {\n // If a previous instance of a Slot by this name unmounts, do nothing,\n // as the slot and its fills should only be removed for the current\n // known instance.\n const currentSlot = slots.get(name);\n if (!currentSlot || currentSlot.instance !== instance) {\n return;\n }\n slots.delete(name);\n }\n function updateSlot(name, slot) {\n if (slot.type !== 'portal') {\n return;\n }\n const slotForName = slots.get(name);\n if (!slotForName) {\n return;\n }\n if (slotForName.type !== 'portal') {\n return;\n }\n if (slotForName.instance !== slot.instance) {\n return;\n }\n if (isShallowEqual(slotForName.fillProps, slot.fillProps)) {\n return;\n }\n slots.set(name, slot);\n }\n function registerFill(name, fill) {\n fills.set(name, [...(fills.get(name) || []), fill]);\n }\n function unregisterFill(name, instance) {\n const fillsForName = fills.get(name);\n if (!fillsForName) {\n return;\n }\n fills.set(name, fillsForName.filter(fill => fill.instance !== instance));\n }\n function updateFill(name, fill) {\n const fillsForName = fills.get(name);\n if (!fillsForName) {\n return;\n }\n const fillForInstance = fillsForName.find(f => f.instance === fill.instance);\n if (!fillForInstance) {\n return;\n }\n if (fillForInstance.children === fill.children) {\n return;\n }\n fills.set(name, fillsForName.map(f => {\n if (f.instance === fill.instance) {\n // Replace with the new fill record with updated `children`.\n return fill;\n }\n return f;\n }));\n }\n return {\n slots,\n fills,\n registerSlot,\n unregisterSlot,\n updateSlot,\n registerFill,\n unregisterFill,\n updateFill\n };\n}\nexport function SlotFillProvider({\n children\n}) {\n const [contextValue] = useState(createSlotRegistry);\n return /*#__PURE__*/_jsx(SlotFillContext.Provider, {\n value: contextValue,\n children: children\n });\n}\nexport default SlotFillProvider;"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAK/B,OAAO,qBAAqB;AAC5B,SAAS,OAAO,YAAY;AAC5B,SAAS,qBAAqB;AAC5B,QAAM,QAAQ,cAAc;AAC5B,QAAM,QAAQ,cAAc;AAC5B,WAAS,aAAa,MAAM,MAAM;AAChC,UAAM,IAAI,MAAM,IAAI;AAAA,EACtB;AACA,WAAS,eAAe,MAAM,UAAU;AAItC,UAAM,cAAc,MAAM,IAAI,IAAI;AAClC,QAAI,CAAC,eAAe,YAAY,aAAa,UAAU;AACrD;AAAA,IACF;AACA,UAAM,OAAO,IAAI;AAAA,EACnB;AACA,WAAS,WAAW,MAAM,MAAM;AAC9B,QAAI,KAAK,SAAS,UAAU;AAC1B;AAAA,IACF;AACA,UAAM,cAAc,MAAM,IAAI,IAAI;AAClC,QAAI,CAAC,aAAa;AAChB;AAAA,IACF;AACA,QAAI,YAAY,SAAS,UAAU;AACjC;AAAA,IACF;AACA,QAAI,YAAY,aAAa,KAAK,UAAU;AAC1C;AAAA,IACF;AACA,QAAI,eAAe,YAAY,WAAW,KAAK,SAAS,GAAG;AACzD;AAAA,IACF;AACA,UAAM,IAAI,MAAM,IAAI;AAAA,EACtB;AACA,WAAS,aAAa,MAAM,MAAM;AAChC,UAAM,IAAI,MAAM,CAAC,GAAI,MAAM,IAAI,IAAI,KAAK,CAAC,GAAI,IAAI,CAAC;AAAA,EACpD;AACA,WAAS,eAAe,MAAM,UAAU;AACtC,UAAM,eAAe,MAAM,IAAI,IAAI;AACnC,QAAI,CAAC,cAAc;AACjB;AAAA,IACF;AACA,UAAM,IAAI,MAAM,aAAa,OAAO,UAAQ,KAAK,aAAa,QAAQ,CAAC;AAAA,EACzE;AACA,WAAS,WAAW,MAAM,MAAM;AAC9B,UAAM,eAAe,MAAM,IAAI,IAAI;AACnC,QAAI,CAAC,cAAc;AACjB;AAAA,IACF;AACA,UAAM,kBAAkB,aAAa,KAAK,OAAK,EAAE,aAAa,KAAK,QAAQ;AAC3E,QAAI,CAAC,iBAAiB;AACpB;AAAA,IACF;AACA,QAAI,gBAAgB,aAAa,KAAK,UAAU;AAC9C;AAAA,IACF;AACA,UAAM,IAAI,MAAM,aAAa,IAAI,OAAK;AACpC,UAAI,EAAE,aAAa,KAAK,UAAU;AAEhC,eAAO;AAAA,MACT;AACA,aAAO;AAAA,IACT,CAAC,CAAC;AAAA,EACJ;AACA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AACO,SAAS,iBAAiB;AAAA,EAC/B;AACF,GAAG;AACD,QAAM,CAAC,YAAY,IAAI,SAAS,kBAAkB;AAClD,SAAoB,qBAAK,gBAAgB,UAAU;AAAA,IACjD,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACH;AACA,IAAO,mBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,21 +22,24 @@ function addKeysToChildren(children) {
|
|
|
22
22
|
}
|
|
23
23
|
function Slot(props) {
|
|
24
24
|
var _useObservableValue;
|
|
25
|
-
const registry = useContext(SlotFillContext);
|
|
26
|
-
const instanceRef = useRef({});
|
|
27
25
|
const {
|
|
28
26
|
name,
|
|
29
27
|
children,
|
|
30
28
|
fillProps = {}
|
|
31
29
|
} = props;
|
|
30
|
+
const registry = useContext(SlotFillContext);
|
|
31
|
+
const instanceRef = useRef({});
|
|
32
32
|
useLayoutEffect(() => {
|
|
33
33
|
const instance = instanceRef.current;
|
|
34
|
-
registry.registerSlot(name,
|
|
34
|
+
registry.registerSlot(name, {
|
|
35
|
+
type: "children",
|
|
36
|
+
instance
|
|
37
|
+
});
|
|
35
38
|
return () => registry.unregisterSlot(name, instance);
|
|
36
39
|
}, [registry, name]);
|
|
37
40
|
let fills = (_useObservableValue = useObservableValue(registry.fills, name)) !== null && _useObservableValue !== void 0 ? _useObservableValue : [];
|
|
38
41
|
const currentSlot = useObservableValue(registry.slots, name);
|
|
39
|
-
if (currentSlot !== instanceRef.current) {
|
|
42
|
+
if (!currentSlot || currentSlot.instance !== instanceRef.current) {
|
|
40
43
|
fills = [];
|
|
41
44
|
}
|
|
42
45
|
const renderedFills = fills.map((fill) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/slot-fill/slot.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport { useContext, useLayoutEffect, useRef, Children, cloneElement, isEmptyElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Whether the argument is a function.\n *\n * @param maybeFunc The argument to check.\n * @return True if the argument is a function, false otherwise.\n */\nfunction isFunction(maybeFunc) {\n return typeof maybeFunc === 'function';\n}\nfunction addKeysToChildren(children) {\n return Children.map(children, (child, childIndex) => {\n if (!child || typeof child === 'string') {\n return child;\n }\n let childKey = childIndex;\n if (typeof child === 'object' && 'key' in child && child?.key) {\n childKey = child.key;\n }\n return cloneElement(child, {\n key: childKey\n });\n });\n}\nfunction Slot(props) {\n var _useObservableValue;\n const
|
|
5
|
-
"mappings": ";AAOA,SAAS,0BAA0B;AACnC,SAAS,YAAY,iBAAiB,QAAQ,UAAU,cAAc,sBAAsB;AAK5F,OAAO,qBAAqB;AAC5B,SAAS,YAAY,WAAW,OAAO,YAAY;AAOnD,SAAS,WAAW,WAAW;AAC7B,SAAO,OAAO,cAAc;AAC9B;AACA,SAAS,kBAAkB,UAAU;AACnC,SAAO,SAAS,IAAI,UAAU,CAAC,OAAO,eAAe;AACnD,QAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,aAAO;AAAA,IACT;AACA,QAAI,WAAW;AACf,QAAI,OAAO,UAAU,YAAY,SAAS,SAAS,OAAO,KAAK;AAC7D,iBAAW,MAAM;AAAA,IACnB;AACA,WAAO,aAAa,OAAO;AAAA,MACzB,KAAK;AAAA,IACP,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,KAAK,OAAO;AACnB,MAAI;AACJ,QAAM
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { useObservableValue } from '@wordpress/compose';\nimport { useContext, useLayoutEffect, useRef, Children, cloneElement, isEmptyElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport SlotFillContext from './context';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Whether the argument is a function.\n *\n * @param maybeFunc The argument to check.\n * @return True if the argument is a function, false otherwise.\n */\nfunction isFunction(maybeFunc) {\n return typeof maybeFunc === 'function';\n}\nfunction addKeysToChildren(children) {\n return Children.map(children, (child, childIndex) => {\n if (!child || typeof child === 'string') {\n return child;\n }\n let childKey = childIndex;\n if (typeof child === 'object' && 'key' in child && child?.key) {\n childKey = child.key;\n }\n return cloneElement(child, {\n key: childKey\n });\n });\n}\nfunction Slot(props) {\n var _useObservableValue;\n const {\n name,\n children,\n fillProps = {}\n } = props;\n const registry = useContext(SlotFillContext);\n const instanceRef = useRef({});\n useLayoutEffect(() => {\n const instance = instanceRef.current;\n registry.registerSlot(name, {\n type: 'children',\n instance\n });\n return () => registry.unregisterSlot(name, instance);\n }, [registry, name]);\n let fills = (_useObservableValue = useObservableValue(registry.fills, name)) !== null && _useObservableValue !== void 0 ? _useObservableValue : [];\n const currentSlot = useObservableValue(registry.slots, name);\n\n // Fills should only be rendered in the currently registered instance of the slot.\n if (!currentSlot || currentSlot.instance !== instanceRef.current) {\n fills = [];\n }\n const renderedFills = fills.map(fill => {\n const fillChildren = isFunction(fill.children) ? fill.children(fillProps) : fill.children;\n return addKeysToChildren(fillChildren);\n }).filter(\n // In some cases fills are rendered only when some conditions apply.\n // This ensures that we only use non-empty fills when rendering, i.e.,\n // it allows us to render wrappers only when the fills are actually present.\n element => !isEmptyElement(element));\n return /*#__PURE__*/_jsx(_Fragment, {\n children: isFunction(children) ? children(renderedFills) : renderedFills\n });\n}\nexport default Slot;"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,0BAA0B;AACnC,SAAS,YAAY,iBAAiB,QAAQ,UAAU,cAAc,sBAAsB;AAK5F,OAAO,qBAAqB;AAC5B,SAAS,YAAY,WAAW,OAAO,YAAY;AAOnD,SAAS,WAAW,WAAW;AAC7B,SAAO,OAAO,cAAc;AAC9B;AACA,SAAS,kBAAkB,UAAU;AACnC,SAAO,SAAS,IAAI,UAAU,CAAC,OAAO,eAAe;AACnD,QAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,aAAO;AAAA,IACT;AACA,QAAI,WAAW;AACf,QAAI,OAAO,UAAU,YAAY,SAAS,SAAS,OAAO,KAAK;AAC7D,iBAAW,MAAM;AAAA,IACnB;AACA,WAAO,aAAa,OAAO;AAAA,MACzB,KAAK;AAAA,IACP,CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,KAAK,OAAO;AACnB,MAAI;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,YAAY,CAAC;AAAA,EACf,IAAI;AACJ,QAAM,WAAW,WAAW,eAAe;AAC3C,QAAM,cAAc,OAAO,CAAC,CAAC;AAC7B,kBAAgB,MAAM;AACpB,UAAM,WAAW,YAAY;AAC7B,aAAS,aAAa,MAAM;AAAA,MAC1B,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AACD,WAAO,MAAM,SAAS,eAAe,MAAM,QAAQ;AAAA,EACrD,GAAG,CAAC,UAAU,IAAI,CAAC;AACnB,MAAI,SAAS,sBAAsB,mBAAmB,SAAS,OAAO,IAAI,OAAO,QAAQ,wBAAwB,SAAS,sBAAsB,CAAC;AACjJ,QAAM,cAAc,mBAAmB,SAAS,OAAO,IAAI;AAG3D,MAAI,CAAC,eAAe,YAAY,aAAa,YAAY,SAAS;AAChE,YAAQ,CAAC;AAAA,EACX;AACA,QAAM,gBAAgB,MAAM,IAAI,UAAQ;AACtC,UAAM,eAAe,WAAW,KAAK,QAAQ,IAAI,KAAK,SAAS,SAAS,IAAI,KAAK;AACjF,WAAO,kBAAkB,YAAY;AAAA,EACvC,CAAC,EAAE;AAAA;AAAA;AAAA;AAAA,IAIH,aAAW,CAAC,eAAe,OAAO;AAAA,EAAC;AACnC,SAAoB,qBAAK,WAAW;AAAA,IAClC,UAAU,WAAW,QAAQ,IAAI,SAAS,aAAa,IAAI;AAAA,EAC7D,CAAC;AACH;AACA,IAAO,eAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/snackbar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { useEffect, useLayoutEffect, useRef, forwardRef, renderToString } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ExternalLink from '../external-link';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst NOTICE_TIMEOUT = 6000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(message, politeness) {\n const spokenMessage = typeof message === 'string' ? message : renderToString(message);\n useEffect(() => {\n if (spokenMessage) {\n speak(spokenMessage, politeness);\n }\n }, [spokenMessage, politeness]);\n}\nfunction UnforwardedSnackbar({\n className,\n children,\n spokenMessage = children,\n politeness = 'polite',\n actions = [],\n onRemove,\n icon = null,\n explicitDismiss = false,\n // onDismiss is a callback executed when the snackbar is dismissed.\n // It is distinct from onRemove, which _looks_ like a callback but is\n // actually the function to call to remove the snackbar from the UI.\n onDismiss,\n listRef\n}, ref) {\n function dismissMe(event) {\n if (event && event.preventDefault) {\n event.preventDefault();\n }\n\n // Prevent focus loss by moving it to the list element.\n listRef?.current?.focus();\n onDismiss?.();\n onRemove?.();\n }\n function onActionClick(event, onClick) {\n event.stopPropagation();\n onRemove?.();\n if (onClick) {\n onClick(event);\n }\n }\n useSpokenMessage(spokenMessage, politeness);\n\n // The `onDismiss/onRemove` can have unstable references,\n // trigger side-effect cleanup, and reset timers.\n const callbacksRef = useRef({\n onDismiss,\n onRemove\n });\n useLayoutEffect(() => {\n callbacksRef.current = {\n onDismiss,\n onRemove\n };\n });\n useEffect(() => {\n // Only set up the timeout dismiss if we're not explicitly dismissing.\n const timeoutHandle = setTimeout(() => {\n if (!explicitDismiss) {\n callbacksRef.current.onDismiss?.();\n callbacksRef.current.onRemove?.();\n }\n }, NOTICE_TIMEOUT);\n return () => clearTimeout(timeoutHandle);\n }, [explicitDismiss]);\n const classes = clsx(className, 'components-snackbar', {\n 'components-snackbar-explicit-dismiss': !!explicitDismiss\n });\n if (actions && actions.length > 1) {\n // We need to inform developers that snackbar only accepts 1 action.\n globalThis.SCRIPT_DEBUG === true ? warning('Snackbar can only have one action. Use Notice if your message requires many actions.') : void 0;\n // return first element only while keeping it inside an array\n actions = [actions[0]];\n }\n const snackbarContentClassnames = clsx('components-snackbar__content', {\n 'components-snackbar__content-with-icon': !!icon\n });\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n className: classes,\n onClick: !explicitDismiss ? dismissMe : undefined,\n tabIndex: 0,\n role: !explicitDismiss ? 'button' : undefined,\n onKeyPress: !explicitDismiss ? dismissMe : undefined,\n \"aria-label\": !explicitDismiss ? __('Dismiss this notice') : undefined,\n \"data-testid\": \"snackbar\",\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: snackbarContentClassnames,\n children: [icon && /*#__PURE__*/_jsx(\"div\", {\n className: \"components-snackbar__icon\",\n children: icon\n }), children, actions.map(({\n label,\n onClick,\n url,\n openInNewTab = false\n }, index) => url !== undefined && openInNewTab ? /*#__PURE__*/_jsx(ExternalLink, {\n href: url,\n onClick: event => onActionClick(event, onClick),\n className: \"components-snackbar__action\",\n children: label\n }, index) : /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n href: url,\n variant: \"link\",\n onClick: event => onActionClick(event, onClick),\n className: \"components-snackbar__action\",\n children: label\n }, index)), explicitDismiss && /*#__PURE__*/_jsx(\"span\", {\n role: \"button\",\n \"aria-label\": __('Dismiss this notice'),\n tabIndex: 0,\n className: \"components-snackbar__dismiss-button\",\n onClick: dismissMe,\n onKeyPress: dismissMe,\n children: \"\\u2715\"\n })]\n })\n });\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef(UnforwardedSnackbar);\nexport default Snackbar;"],
|
|
5
|
-
"mappings": "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",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { useEffect, useLayoutEffect, useRef, forwardRef, renderToString } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ExternalLink from '../external-link';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst NOTICE_TIMEOUT = 6000;\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n *\n * @param message Message to announce.\n * @param politeness Politeness to announce.\n */\nfunction useSpokenMessage(message, politeness) {\n const spokenMessage = typeof message === 'string' ? message : renderToString(message);\n useEffect(() => {\n if (spokenMessage) {\n speak(spokenMessage, politeness);\n }\n }, [spokenMessage, politeness]);\n}\nfunction UnforwardedSnackbar({\n className,\n children,\n spokenMessage = children,\n politeness = 'polite',\n actions = [],\n onRemove,\n icon = null,\n explicitDismiss = false,\n // onDismiss is a callback executed when the snackbar is dismissed.\n // It is distinct from onRemove, which _looks_ like a callback but is\n // actually the function to call to remove the snackbar from the UI.\n onDismiss,\n listRef\n}, ref) {\n function dismissMe(event) {\n if (event && event.preventDefault) {\n event.preventDefault();\n }\n\n // Prevent focus loss by moving it to the list element.\n listRef?.current?.focus();\n onDismiss?.();\n onRemove?.();\n }\n function onActionClick(event, onClick) {\n event.stopPropagation();\n onRemove?.();\n if (onClick) {\n onClick(event);\n }\n }\n useSpokenMessage(spokenMessage, politeness);\n\n // The `onDismiss/onRemove` can have unstable references,\n // trigger side-effect cleanup, and reset timers.\n const callbacksRef = useRef({\n onDismiss,\n onRemove\n });\n useLayoutEffect(() => {\n callbacksRef.current = {\n onDismiss,\n onRemove\n };\n });\n useEffect(() => {\n // Only set up the timeout dismiss if we're not explicitly dismissing.\n const timeoutHandle = setTimeout(() => {\n if (!explicitDismiss) {\n callbacksRef.current.onDismiss?.();\n callbacksRef.current.onRemove?.();\n }\n }, NOTICE_TIMEOUT);\n return () => clearTimeout(timeoutHandle);\n }, [explicitDismiss]);\n const classes = clsx(className, 'components-snackbar', {\n 'components-snackbar-explicit-dismiss': !!explicitDismiss\n });\n if (actions && actions.length > 1) {\n // We need to inform developers that snackbar only accepts 1 action.\n globalThis.SCRIPT_DEBUG === true ? warning('Snackbar can only have one action. Use Notice if your message requires many actions.') : void 0;\n // return first element only while keeping it inside an array\n actions = [actions[0]];\n }\n const snackbarContentClassnames = clsx('components-snackbar__content', {\n 'components-snackbar__content-with-icon': !!icon\n });\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n className: classes,\n onClick: !explicitDismiss ? dismissMe : undefined,\n tabIndex: 0,\n role: !explicitDismiss ? 'button' : undefined,\n onKeyPress: !explicitDismiss ? dismissMe : undefined,\n \"aria-label\": !explicitDismiss ? __('Dismiss this notice') : undefined,\n \"data-testid\": \"snackbar\",\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: snackbarContentClassnames,\n children: [icon && /*#__PURE__*/_jsx(\"div\", {\n className: \"components-snackbar__icon\",\n children: icon\n }), children, actions.map(({\n label,\n onClick,\n url,\n openInNewTab = false\n }, index) => url !== undefined && openInNewTab ? /*#__PURE__*/_jsx(ExternalLink, {\n href: url,\n onClick: event => onActionClick(event, onClick),\n className: \"components-snackbar__action\",\n children: label\n }, index) : /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n href: url,\n variant: \"link\",\n onClick: event => onActionClick(event, onClick),\n className: \"components-snackbar__action\",\n children: label\n }, index)), explicitDismiss && /*#__PURE__*/_jsx(\"span\", {\n role: \"button\",\n \"aria-label\": __('Dismiss this notice'),\n tabIndex: 0,\n className: \"components-snackbar__dismiss-button\",\n onClick: dismissMe,\n onKeyPress: dismissMe,\n children: \"\\u2715\"\n })]\n })\n });\n}\n\n/**\n * A Snackbar displays a succinct message that is cleared out after a small delay.\n *\n * It can also offer the user options, like viewing a published post.\n * But these options should also be available elsewhere in the UI.\n *\n * ```jsx\n * const MySnackbarNotice = () => (\n * <Snackbar>Post published successfully.</Snackbar>\n * );\n * ```\n */\nexport const Snackbar = forwardRef(UnforwardedSnackbar);\nSnackbar.displayName = 'Snackbar';\nexport default Snackbar;"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/spinner/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function UnforwardedSpinner({\n className,\n ...props\n}, forwardedRef) {\n return /*#__PURE__*/_jsxs(StyledSpinner, {\n className: clsx('components-spinner', className),\n viewBox: \"0 0 100 100\",\n width: \"16\",\n height: \"16\",\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"presentation\",\n focusable: \"false\",\n ...props,\n ref: forwardedRef,\n children: [/*#__PURE__*/_jsx(SpinnerTrack, {\n cx: \"50\",\n cy: \"50\",\n r: \"50\",\n vectorEffect: \"non-scaling-stroke\"\n }), /*#__PURE__*/_jsx(SpinnerIndicator, {\n d: \"m 50 0 a 50 50 0 0 1 50 50\",\n vectorEffect: \"non-scaling-stroke\"\n })]\n });\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```jsx\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * \treturn <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef(UnforwardedSpinner);\nexport default Spinner;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,eAAe,cAAc,wBAAwB;AAI9D,SAAS,kBAAkB;AAC3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,SAAoB,sBAAM,eAAe;AAAA,IACvC,WAAW,KAAK,sBAAsB,SAAS;AAAA,IAC/C,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,IACH,KAAK;AAAA,IACL,UAAU,CAAc,qBAAK,cAAc;AAAA,MACzC,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,cAAc;AAAA,IAChB,CAAC,GAAgB,qBAAK,kBAAkB;AAAA,MACtC,GAAG;AAAA,MACH,cAAc;AAAA,IAChB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAYO,IAAM,UAAU,WAAW,kBAAkB;AACpD,IAAO,kBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * Internal dependencies\n */\nimport { StyledSpinner, SpinnerTrack, SpinnerIndicator } from './styles';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport function UnforwardedSpinner({\n className,\n ...props\n}, forwardedRef) {\n return /*#__PURE__*/_jsxs(StyledSpinner, {\n className: clsx('components-spinner', className),\n viewBox: \"0 0 100 100\",\n width: \"16\",\n height: \"16\",\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"presentation\",\n focusable: \"false\",\n ...props,\n ref: forwardedRef,\n children: [/*#__PURE__*/_jsx(SpinnerTrack, {\n cx: \"50\",\n cy: \"50\",\n r: \"50\",\n vectorEffect: \"non-scaling-stroke\"\n }), /*#__PURE__*/_jsx(SpinnerIndicator, {\n d: \"m 50 0 a 50 50 0 0 1 50 50\",\n vectorEffect: \"non-scaling-stroke\"\n })]\n });\n}\n/**\n * `Spinner` is a component used to notify users that their action is being processed.\n *\n * ```jsx\n * import { Spinner } from '@wordpress/components';\n *\n * function Example() {\n * \treturn <Spinner />;\n * }\n * ```\n */\nexport const Spinner = forwardRef(UnforwardedSpinner);\nSpinner.displayName = 'Spinner';\nexport default Spinner;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,eAAe,cAAc,wBAAwB;AAI9D,SAAS,kBAAkB;AAC3B,SAAS,OAAO,MAAM,QAAQ,aAAa;AACpC,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,SAAoB,sBAAM,eAAe;AAAA,IACvC,WAAW,KAAK,sBAAsB,SAAS;AAAA,IAC/C,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,IACH,KAAK;AAAA,IACL,UAAU,CAAc,qBAAK,cAAc;AAAA,MACzC,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,GAAG;AAAA,MACH,cAAc;AAAA,IAChB,CAAC,GAAgB,qBAAK,kBAAkB;AAAA,MACtC,GAAG;AAAA,MACH,cAAc;AAAA,IAChB,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AAYO,IAAM,UAAU,WAAW,kBAAkB;AACpD,QAAQ,cAAc;AACtB,IAAO,kBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/tab-panel/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect, useLayoutEffect, useCallback } from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = id => {\n if (typeof id === 'undefined' || id === null) {\n return;\n }\n return id.match(/^tab-panel-[0-9]*-(.*)/)?.[1];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = ({\n className,\n children,\n tabs,\n selectOnMove = true,\n initialTabName,\n orientation = 'horizontal',\n activeClass = 'is-active',\n onSelect\n}, ref) => {\n const instanceId = useInstanceId(TabPanel, 'tab-panel');\n const prependInstanceId = useCallback(tabName => {\n if (typeof tabName === 'undefined') {\n return;\n }\n return `${instanceId}-${tabName}`;\n }, [instanceId]);\n const tabStore = Ariakit.useTabStore({\n setSelectedId: newTabValue => {\n if (typeof newTabValue === 'undefined' || newTabValue === null) {\n return;\n }\n const newTab = tabs.find(t => prependInstanceId(t.name) === newTabValue);\n if (newTab?.disabled || newTab === selectedTab) {\n return;\n }\n const simplifiedTabName = extractTabName(newTabValue);\n if (typeof simplifiedTabName === 'undefined') {\n return;\n }\n onSelect?.(simplifiedTabName);\n },\n orientation,\n selectOnMove,\n defaultSelectedId: prependInstanceId(initialTabName),\n rtl: isRTL()\n });\n const selectedTabName = extractTabName(Ariakit.useStoreState(tabStore, 'selectedId'));\n const setTabStoreSelectedId = useCallback(tabName => {\n tabStore.setState('selectedId', prependInstanceId(tabName));\n }, [prependInstanceId, tabStore]);\n const selectedTab = tabs.find(({\n name\n }) => name === selectedTabName);\n const previousSelectedTabName = usePrevious(selectedTabName);\n\n // Ensure `onSelect` is called when the initial tab is selected.\n useEffect(() => {\n if (previousSelectedTabName !== selectedTabName && selectedTabName === initialTabName && !!selectedTabName) {\n onSelect?.(selectedTabName);\n }\n }, [selectedTabName, initialTabName, onSelect, previousSelectedTabName]);\n\n // Handle selecting the initial tab.\n useLayoutEffect(() => {\n // If there's a selected tab, don't override it.\n if (selectedTab) {\n return;\n }\n const initialTab = tabs.find(tab => tab.name === initialTabName);\n // Wait for the denoted initial tab to be declared before making a\n // selection. This ensures that if a tab is declared lazily it can\n // still receive initial selection.\n if (initialTabName && !initialTab) {\n return;\n }\n if (initialTab && !initialTab.disabled) {\n // Select the initial tab if it's not disabled.\n setTabStoreSelectedId(initialTab.name);\n } else {\n // Fallback to the first enabled tab when the initial tab is\n // disabled or it can't be found.\n const firstEnabledTab = tabs.find(tab => !tab.disabled);\n if (firstEnabledTab) {\n setTabStoreSelectedId(firstEnabledTab.name);\n }\n }\n }, [tabs, selectedTab, initialTabName, instanceId, setTabStoreSelectedId]);\n\n // Handle the currently selected tab becoming disabled.\n useEffect(() => {\n // This effect only runs when the selected tab is defined and becomes disabled.\n if (!selectedTab?.disabled) {\n return;\n }\n const firstEnabledTab = tabs.find(tab => !tab.disabled);\n // If the currently selected tab becomes disabled, select the first enabled tab.\n // (if there is one).\n if (firstEnabledTab) {\n setTabStoreSelectedId(firstEnabledTab.name);\n }\n }, [tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId]);\n return /*#__PURE__*/_jsxs(\"div\", {\n className: className,\n ref: ref,\n children: [/*#__PURE__*/_jsx(Ariakit.TabList, {\n store: tabStore,\n className: \"components-tab-panel__tabs\",\n children: tabs.map(tab => {\n return /*#__PURE__*/_jsx(Ariakit.Tab, {\n id: prependInstanceId(tab.name),\n className: clsx('components-tab-panel__tabs-item', tab.className, {\n [activeClass]: tab.name === selectedTabName\n }),\n disabled: tab.disabled,\n \"aria-controls\": `${prependInstanceId(tab.name)}-view`,\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n icon: tab.icon,\n label: tab.icon && tab.title,\n showTooltip: !!tab.icon\n }),\n children: !tab.icon && tab.title\n }, tab.name);\n })\n }), selectedTab && /*#__PURE__*/_jsx(Ariakit.TabPanel, {\n id: `${prependInstanceId(selectedTab.name)}-view`,\n store: tabStore,\n tabId: prependInstanceId(selectedTab.name),\n className: \"components-tab-panel__tab-content\",\n children: children(selectedTab)\n })]\n });\n};\nexport const TabPanel = forwardRef(UnforwardedTabPanel);\nexport default TabPanel;"],
|
|
5
|
-
"mappings": "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
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useEffect, useLayoutEffect, useCallback } from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = id => {\n if (typeof id === 'undefined' || id === null) {\n return;\n }\n return id.match(/^tab-panel-[0-9]*-(.*)/)?.[1];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = ({\n className,\n children,\n tabs,\n selectOnMove = true,\n initialTabName,\n orientation = 'horizontal',\n activeClass = 'is-active',\n onSelect\n}, ref) => {\n const instanceId = useInstanceId(TabPanel, 'tab-panel');\n const prependInstanceId = useCallback(tabName => {\n if (typeof tabName === 'undefined') {\n return;\n }\n return `${instanceId}-${tabName}`;\n }, [instanceId]);\n const tabStore = Ariakit.useTabStore({\n setSelectedId: newTabValue => {\n if (typeof newTabValue === 'undefined' || newTabValue === null) {\n return;\n }\n const newTab = tabs.find(t => prependInstanceId(t.name) === newTabValue);\n if (newTab?.disabled || newTab === selectedTab) {\n return;\n }\n const simplifiedTabName = extractTabName(newTabValue);\n if (typeof simplifiedTabName === 'undefined') {\n return;\n }\n onSelect?.(simplifiedTabName);\n },\n orientation,\n selectOnMove,\n defaultSelectedId: prependInstanceId(initialTabName),\n rtl: isRTL()\n });\n const selectedTabName = extractTabName(Ariakit.useStoreState(tabStore, 'selectedId'));\n const setTabStoreSelectedId = useCallback(tabName => {\n tabStore.setState('selectedId', prependInstanceId(tabName));\n }, [prependInstanceId, tabStore]);\n const selectedTab = tabs.find(({\n name\n }) => name === selectedTabName);\n const previousSelectedTabName = usePrevious(selectedTabName);\n\n // Ensure `onSelect` is called when the initial tab is selected.\n useEffect(() => {\n if (previousSelectedTabName !== selectedTabName && selectedTabName === initialTabName && !!selectedTabName) {\n onSelect?.(selectedTabName);\n }\n }, [selectedTabName, initialTabName, onSelect, previousSelectedTabName]);\n\n // Handle selecting the initial tab.\n useLayoutEffect(() => {\n // If there's a selected tab, don't override it.\n if (selectedTab) {\n return;\n }\n const initialTab = tabs.find(tab => tab.name === initialTabName);\n // Wait for the denoted initial tab to be declared before making a\n // selection. This ensures that if a tab is declared lazily it can\n // still receive initial selection.\n if (initialTabName && !initialTab) {\n return;\n }\n if (initialTab && !initialTab.disabled) {\n // Select the initial tab if it's not disabled.\n setTabStoreSelectedId(initialTab.name);\n } else {\n // Fallback to the first enabled tab when the initial tab is\n // disabled or it can't be found.\n const firstEnabledTab = tabs.find(tab => !tab.disabled);\n if (firstEnabledTab) {\n setTabStoreSelectedId(firstEnabledTab.name);\n }\n }\n }, [tabs, selectedTab, initialTabName, instanceId, setTabStoreSelectedId]);\n\n // Handle the currently selected tab becoming disabled.\n useEffect(() => {\n // This effect only runs when the selected tab is defined and becomes disabled.\n if (!selectedTab?.disabled) {\n return;\n }\n const firstEnabledTab = tabs.find(tab => !tab.disabled);\n // If the currently selected tab becomes disabled, select the first enabled tab.\n // (if there is one).\n if (firstEnabledTab) {\n setTabStoreSelectedId(firstEnabledTab.name);\n }\n }, [tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId]);\n return /*#__PURE__*/_jsxs(\"div\", {\n className: className,\n ref: ref,\n children: [/*#__PURE__*/_jsx(Ariakit.TabList, {\n store: tabStore,\n className: \"components-tab-panel__tabs\",\n children: tabs.map(tab => {\n return /*#__PURE__*/_jsx(Ariakit.Tab, {\n id: prependInstanceId(tab.name),\n className: clsx('components-tab-panel__tabs-item', tab.className, {\n [activeClass]: tab.name === selectedTabName\n }),\n disabled: tab.disabled,\n \"aria-controls\": `${prependInstanceId(tab.name)}-view`,\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n icon: tab.icon,\n label: tab.icon && tab.title,\n showTooltip: !!tab.icon\n }),\n children: !tab.icon && tab.title\n }, tab.name);\n })\n }), selectedTab && /*#__PURE__*/_jsx(Ariakit.TabPanel, {\n id: `${prependInstanceId(selectedTab.name)}-view`,\n store: tabStore,\n tabId: prependInstanceId(selectedTab.name),\n className: \"components-tab-panel__tab-content\",\n children: children(selectedTab)\n })]\n });\n};\nexport const TabPanel = forwardRef(UnforwardedTabPanel);\nTabPanel.displayName = 'TabPanel';\nexport default TabPanel;"],
|
|
5
|
+
"mappings": "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",
|
|
6
6
|
"names": ["TabPanel"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/text-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTextControl(props, ref) {\n const {\n // Prevent passing this to `input`.\n __nextHasNoMarginBottom: _,\n __next40pxDefaultSize = false,\n label,\n hideLabelFromVision,\n value,\n help,\n id: idProp,\n className,\n onChange,\n type = 'text',\n ...additionalProps\n } = props;\n const id = useInstanceId(TextControl, 'inspector-text-control', idProp);\n const onChangeValue = event => onChange(event.target.value);\n maybeWarnDeprecated36pxSize({\n componentName: 'TextControl',\n size: undefined,\n __next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n help: help,\n className: className,\n children: /*#__PURE__*/_jsx(\"input\", {\n className: clsx('components-text-control__input', {\n 'is-next-40px-default-size': __next40pxDefaultSize\n }),\n type: type,\n id: id,\n value: value,\n onChange: onChangeValue,\n \"aria-describedby\": !!help ? id + '__help' : undefined,\n ref: ref,\n ...additionalProps\n })\n });\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * __next40pxDefaultSize\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef(UnforwardedTextControl);\nexport default TextControl;"],
|
|
5
|
-
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA;AAAA,IAEJ,yBAAyB;AAAA,IACzB,wBAAwB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,KAAK,cAAc,aAAa,0BAA0B,MAAM;AACtE,QAAM,gBAAgB,WAAS,SAAS,MAAM,OAAO,KAAK;AAC1D,8BAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACD,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAuB,qBAAK,SAAS;AAAA,MACnC,WAAW,KAAK,kCAAkC;AAAA,QAChD,6BAA6B;AAAA,MAC/B,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAoB,CAAC,CAAC,OAAO,KAAK,WAAW;AAAA,MAC7C;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,IAAO,uBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTextControl(props, ref) {\n const {\n // Prevent passing this to `input`.\n __nextHasNoMarginBottom: _,\n __next40pxDefaultSize = false,\n label,\n hideLabelFromVision,\n value,\n help,\n id: idProp,\n className,\n onChange,\n type = 'text',\n ...additionalProps\n } = props;\n const id = useInstanceId(TextControl, 'inspector-text-control', idProp);\n const onChangeValue = event => onChange(event.target.value);\n maybeWarnDeprecated36pxSize({\n componentName: 'TextControl',\n size: undefined,\n __next40pxDefaultSize\n });\n return /*#__PURE__*/_jsx(BaseControl, {\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n help: help,\n className: className,\n children: /*#__PURE__*/_jsx(\"input\", {\n className: clsx('components-text-control__input', {\n 'is-next-40px-default-size': __next40pxDefaultSize\n }),\n type: type,\n id: id,\n value: value,\n onChange: onChangeValue,\n \"aria-describedby\": !!help ? id + '__help' : undefined,\n ref: ref,\n ...additionalProps\n })\n });\n}\n\n/**\n * TextControl components let users enter and edit text.\n *\n * ```jsx\n * import { TextControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextControl = () => {\n * const [ className, setClassName ] = useState( '' );\n *\n * return (\n * <TextControl\n * __next40pxDefaultSize\n * label=\"Additional CSS Class\"\n * value={ className }\n * onChange={ ( value ) => setClassName( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextControl = forwardRef(UnforwardedTextControl);\nTextControl.displayName = 'TextControl';\nexport default TextControl;"],
|
|
5
|
+
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,mCAAmC;AAC5C,SAAS,OAAO,YAAY;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA;AAAA,IAEJ,yBAAyB;AAAA,IACzB,wBAAwB;AAAA,IACxB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,IAAI;AAAA,IACJ;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,KAAK,cAAc,aAAa,0BAA0B,MAAM;AACtE,QAAM,gBAAgB,WAAS,SAAS,MAAM,OAAO,KAAK;AAC1D,8BAA4B;AAAA,IAC1B,eAAe;AAAA,IACf,MAAM;AAAA,IACN;AAAA,EACF,CAAC;AACD,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAuB,qBAAK,SAAS;AAAA,MACnC,WAAW,KAAK,kCAAkC;AAAA,QAChD,6BAA6B;AAAA,MAC/B,CAAC;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAoB,CAAC,CAAC,OAAO,KAAK,WAAW;AAAA,MAC7C;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAuBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/text-highlight/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Highlights occurrences of a given string within another string of text. Wraps\n * each match with a `<mark>` tag which provides browser default styling.\n *\n * ```jsx\n * import { TextHighlight } from '@wordpress/components';\n *\n * const MyTextHighlight = () => (\n * <TextHighlight\n * text=\"Why do we like Gutenberg? Because Gutenberg is the best!\"\n * highlight=\"Gutenberg\"\n * />\n * );\n * ```\n */\nexport const TextHighlight = props => {\n const {\n text = '',\n highlight = ''\n } = props;\n const trimmedHighlightText = highlight.trim();\n if (!trimmedHighlightText) {\n return /*#__PURE__*/_jsx(_Fragment, {\n children: text\n });\n }\n const regex = new RegExp(`(${escapeRegExp(trimmedHighlightText)})`, 'gi');\n return createInterpolateElement(text.replace(regex, '<mark>$&</mark>'), {\n mark: /*#__PURE__*/_jsx(\"mark\", {})\n });\n};\nexport default TextHighlight;"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,gCAAgC;AAKzC,SAAS,oBAAoB;AAC7B,SAAS,YAAY,WAAW,OAAO,YAAY;AAgB5C,IAAM,gBAAgB,WAAS;AACpC,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,YAAY;AAAA,EACd,IAAI;AACJ,QAAM,uBAAuB,UAAU,KAAK;AAC5C,MAAI,CAAC,sBAAsB;AACzB,WAAoB,qBAAK,WAAW;AAAA,MAClC,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACA,QAAM,QAAQ,IAAI,OAAO,IAAI,aAAa,oBAAoB,CAAC,KAAK,IAAI;AACxE,SAAO,yBAAyB,KAAK,QAAQ,OAAO,iBAAiB,GAAG;AAAA,IACtE,MAAmB,qBAAK,QAAQ,CAAC,CAAC;AAAA,EACpC,CAAC;AACH;AACA,IAAO,yBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { createInterpolateElement } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { escapeRegExp } from '../utils/strings';\nimport { Fragment as _Fragment, jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Highlights occurrences of a given string within another string of text. Wraps\n * each match with a `<mark>` tag which provides browser default styling.\n *\n * ```jsx\n * import { TextHighlight } from '@wordpress/components';\n *\n * const MyTextHighlight = () => (\n * <TextHighlight\n * text=\"Why do we like Gutenberg? Because Gutenberg is the best!\"\n * highlight=\"Gutenberg\"\n * />\n * );\n * ```\n */\nexport const TextHighlight = props => {\n const {\n text = '',\n highlight = ''\n } = props;\n const trimmedHighlightText = highlight.trim();\n if (!trimmedHighlightText) {\n return /*#__PURE__*/_jsx(_Fragment, {\n children: text\n });\n }\n const regex = new RegExp(`(${escapeRegExp(trimmedHighlightText)})`, 'gi');\n return createInterpolateElement(text.replace(regex, '<mark>$&</mark>'), {\n mark: /*#__PURE__*/_jsx(\"mark\", {})\n });\n};\nTextHighlight.displayName = 'TextHighlight';\nexport default TextHighlight;"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,gCAAgC;AAKzC,SAAS,oBAAoB;AAC7B,SAAS,YAAY,WAAW,OAAO,YAAY;AAgB5C,IAAM,gBAAgB,WAAS;AACpC,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,YAAY;AAAA,EACd,IAAI;AACJ,QAAM,uBAAuB,UAAU,KAAK;AAC5C,MAAI,CAAC,sBAAsB;AACzB,WAAoB,qBAAK,WAAW;AAAA,MAClC,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACA,QAAM,QAAQ,IAAI,OAAO,IAAI,aAAa,oBAAoB,CAAC,KAAK,IAAI;AACxE,SAAO,yBAAyB,KAAK,QAAQ,OAAO,iBAAiB,GAAG;AAAA,IACtE,MAAmB,qBAAK,QAAQ,CAAC,CAAC;AAAA,EACpC,CAAC;AACH;AACA,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/textarea-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTextareaControl(props, ref) {\n const {\n // Prevent passing this to `textarea`.\n __nextHasNoMarginBottom: _,\n label,\n hideLabelFromVision,\n value,\n help,\n onChange,\n rows = 4,\n className,\n ...additionalProps\n } = props;\n const instanceId = useInstanceId(TextareaControl);\n const id = `inspector-textarea-control-${instanceId}`;\n const onChangeValue = event => onChange(event.target.value);\n const classes = clsx('components-textarea-control', className);\n return /*#__PURE__*/_jsx(BaseControl, {\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n help: help,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledTextarea, {\n className: \"components-textarea-control__input\",\n id: id,\n rows: rows,\n onChange: onChangeValue,\n \"aria-describedby\": !!help ? id + '__help' : undefined,\n value: value,\n ref: ref,\n ...additionalProps\n })\n });\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef(UnforwardedTextareaControl);\nexport default TextareaControl;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,sBAAsB;AAC/B,SAAS,OAAO,YAAY;AAC5B,SAAS,2BAA2B,OAAO,KAAK;AAC9C,QAAM;AAAA;AAAA,IAEJ,yBAAyB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,aAAa,cAAc,eAAe;AAChD,QAAM,KAAK,8BAA8B,UAAU;AACnD,QAAM,gBAAgB,WAAS,SAAS,MAAM,OAAO,KAAK;AAC1D,QAAM,UAAU,KAAK,+BAA+B,SAAS;AAC7D,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,qBAAK,gBAAgB;AAAA,MAC1C,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAoB,CAAC,CAAC,OAAO,KAAK,WAAW;AAAA,MAC7C;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAyBO,IAAM,kBAAkB,WAAW,0BAA0B;AACpE,IAAO,2BAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedTextareaControl(props, ref) {\n const {\n // Prevent passing this to `textarea`.\n __nextHasNoMarginBottom: _,\n label,\n hideLabelFromVision,\n value,\n help,\n onChange,\n rows = 4,\n className,\n ...additionalProps\n } = props;\n const instanceId = useInstanceId(TextareaControl);\n const id = `inspector-textarea-control-${instanceId}`;\n const onChangeValue = event => onChange(event.target.value);\n const classes = clsx('components-textarea-control', className);\n return /*#__PURE__*/_jsx(BaseControl, {\n label: label,\n hideLabelFromVision: hideLabelFromVision,\n id: id,\n help: help,\n className: classes,\n children: /*#__PURE__*/_jsx(StyledTextarea, {\n className: \"components-textarea-control__input\",\n id: id,\n rows: rows,\n onChange: onChangeValue,\n \"aria-describedby\": !!help ? id + '__help' : undefined,\n value: value,\n ref: ref,\n ...additionalProps\n })\n });\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef(UnforwardedTextareaControl);\nTextareaControl.displayName = 'TextareaControl';\nexport default TextareaControl;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;AAK3B,OAAO,iBAAiB;AACxB,SAAS,sBAAsB;AAC/B,SAAS,OAAO,YAAY;AAC5B,SAAS,2BAA2B,OAAO,KAAK;AAC9C,QAAM;AAAA;AAAA,IAEJ,yBAAyB;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,aAAa,cAAc,eAAe;AAChD,QAAM,KAAK,8BAA8B,UAAU;AACnD,QAAM,gBAAgB,WAAS,SAAS,MAAM,OAAO,KAAK;AAC1D,QAAM,UAAU,KAAK,+BAA+B,SAAS;AAC7D,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX,UAAuB,qBAAK,gBAAgB;AAAA,MAC1C,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,oBAAoB,CAAC,CAAC,OAAO,KAAK,WAAW;AAAA,MAC7C;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,CAAC;AAAA,EACH,CAAC;AACH;AAyBO,IAAM,kBAAkB,WAAW,0BAA0B;AACpE,gBAAgB,cAAc;AAC9B,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/toggle-control/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport { HStack } from '../h-stack';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedToggleControl({\n label,\n checked,\n help,\n className,\n onChange,\n disabled\n}, ref) {\n function onChangeToggle(event) {\n onChange(event.target.checked);\n }\n const instanceId = useInstanceId(ToggleControl);\n const id = `inspector-toggle-control-${instanceId}`;\n let describedBy, helpLabel;\n if (help) {\n if (typeof help === 'function') {\n // `help` as a function works only for controlled components where\n // `checked` is passed down from parent component. Uncontrolled\n // component can show only a static help label.\n if (checked !== undefined) {\n helpLabel = help(checked);\n }\n } else {\n helpLabel = help;\n }\n if (helpLabel) {\n describedBy = id + '__help';\n }\n }\n return /*#__PURE__*/_jsx(BaseControl, {\n id: id,\n help: helpLabel && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-toggle-control__help\",\n children: helpLabel\n }),\n className: clsx('components-toggle-control', className),\n children: /*#__PURE__*/_jsxs(HStack, {\n justify: \"flex-start\",\n spacing: 2,\n children: [/*#__PURE__*/_jsx(FormToggle, {\n id: id,\n checked: checked,\n onChange: onChangeToggle,\n \"aria-describedby\": describedBy,\n disabled: disabled,\n ref: ref\n }), /*#__PURE__*/_jsx(FlexBlock, {\n as: \"label\",\n htmlFor: id,\n className: clsx('components-toggle-control__label', {\n 'is-disabled': disabled\n }),\n children: label\n })]\n })\n });\n}\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const ToggleControl = forwardRef(UnforwardedToggleControl);\nexport default ToggleControl;"],
|
|
5
|
-
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAK9B,SAAS,iBAAiB;AAC1B,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,SAAS,cAAc;AACvB,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,yBAAyB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,WAAS,eAAe,OAAO;AAC7B,aAAS,MAAM,OAAO,OAAO;AAAA,EAC/B;AACA,QAAM,aAAa,cAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,MAAI,aAAa;AACjB,MAAI,MAAM;AACR,QAAI,OAAO,SAAS,YAAY;AAI9B,UAAI,YAAY,QAAW;AACzB,oBAAY,KAAK,OAAO;AAAA,MAC1B;AAAA,IACF,OAAO;AACL,kBAAY;AAAA,IACd;AACA,QAAI,WAAW;AACb,oBAAc,KAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA,MAAM,aAA0B,qBAAK,QAAQ;AAAA,MAC3C,WAAW;AAAA,MACX,UAAU;AAAA,IACZ,CAAC;AAAA,IACD,WAAW,KAAK,6BAA6B,SAAS;AAAA,IACtD,UAAuB,sBAAM,QAAQ;AAAA,MACnC,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU,CAAc,qBAAK,YAAY;AAAA,QACvC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,qBAAK,WAAW;AAAA,QAC/B,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,WAAW,KAAK,oCAAoC;AAAA,UAClD,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAsBO,IAAM,gBAAgB,WAAW,wBAAwB;AAChE,IAAO,yBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport { HStack } from '../h-stack';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedToggleControl({\n label,\n checked,\n help,\n className,\n onChange,\n disabled\n}, ref) {\n function onChangeToggle(event) {\n onChange(event.target.checked);\n }\n const instanceId = useInstanceId(ToggleControl);\n const id = `inspector-toggle-control-${instanceId}`;\n let describedBy, helpLabel;\n if (help) {\n if (typeof help === 'function') {\n // `help` as a function works only for controlled components where\n // `checked` is passed down from parent component. Uncontrolled\n // component can show only a static help label.\n if (checked !== undefined) {\n helpLabel = help(checked);\n }\n } else {\n helpLabel = help;\n }\n if (helpLabel) {\n describedBy = id + '__help';\n }\n }\n return /*#__PURE__*/_jsx(BaseControl, {\n id: id,\n help: helpLabel && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-toggle-control__help\",\n children: helpLabel\n }),\n className: clsx('components-toggle-control', className),\n children: /*#__PURE__*/_jsxs(HStack, {\n justify: \"flex-start\",\n spacing: 2,\n children: [/*#__PURE__*/_jsx(FormToggle, {\n id: id,\n checked: checked,\n onChange: onChangeToggle,\n \"aria-describedby\": describedBy,\n disabled: disabled,\n ref: ref\n }), /*#__PURE__*/_jsx(FlexBlock, {\n as: \"label\",\n htmlFor: id,\n className: clsx('components-toggle-control__label', {\n 'is-disabled': disabled\n }),\n children: label\n })]\n })\n });\n}\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport const ToggleControl = forwardRef(UnforwardedToggleControl);\nToggleControl.displayName = 'ToggleControl';\nexport default ToggleControl;"],
|
|
5
|
+
"mappings": ";AAIA,OAAO,UAAU;AAKjB,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAK9B,SAAS,iBAAiB;AAC1B,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,SAAS,cAAc;AACvB,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,yBAAyB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,WAAS,eAAe,OAAO;AAC7B,aAAS,MAAM,OAAO,OAAO;AAAA,EAC/B;AACA,QAAM,aAAa,cAAc,aAAa;AAC9C,QAAM,KAAK,4BAA4B,UAAU;AACjD,MAAI,aAAa;AACjB,MAAI,MAAM;AACR,QAAI,OAAO,SAAS,YAAY;AAI9B,UAAI,YAAY,QAAW;AACzB,oBAAY,KAAK,OAAO;AAAA,MAC1B;AAAA,IACF,OAAO;AACL,kBAAY;AAAA,IACd;AACA,QAAI,WAAW;AACb,oBAAc,KAAK;AAAA,IACrB;AAAA,EACF;AACA,SAAoB,qBAAK,aAAa;AAAA,IACpC;AAAA,IACA,MAAM,aAA0B,qBAAK,QAAQ;AAAA,MAC3C,WAAW;AAAA,MACX,UAAU;AAAA,IACZ,CAAC;AAAA,IACD,WAAW,KAAK,6BAA6B,SAAS;AAAA,IACtD,UAAuB,sBAAM,QAAQ;AAAA,MACnC,SAAS;AAAA,MACT,SAAS;AAAA,MACT,UAAU,CAAc,qBAAK,YAAY;AAAA,QACvC;AAAA,QACA;AAAA,QACA,UAAU;AAAA,QACV,oBAAoB;AAAA,QACpB;AAAA,QACA;AAAA,MACF,CAAC,GAAgB,qBAAK,WAAW;AAAA,QAC/B,IAAI;AAAA,QACJ,SAAS;AAAA,QACT,WAAW,KAAK,oCAAoC;AAAA,UAClD,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH,CAAC;AACH;AAsBO,IAAM,gBAAgB,WAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,yBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -49,6 +49,7 @@ function UnforwardedToggleGroupControlAsButtonGroup({
|
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
var ToggleGroupControlAsButtonGroup = forwardRef(UnforwardedToggleGroupControlAsButtonGroup);
|
|
52
|
+
ToggleGroupControlAsButtonGroup.displayName = "ToggleGroupControlAsButtonGroup";
|
|
52
53
|
export {
|
|
53
54
|
ToggleGroupControlAsButtonGroup
|
|
54
55
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toggle-group-control/toggle-group-control/as-button-group.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { useControlledValue } from '../../utils';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlAsButtonGroup({\n children,\n isAdaptiveWidth,\n label,\n onChange,\n size,\n value: valueProp,\n id: idProp,\n setSelectedElement,\n ...otherProps\n}, forwardedRef) {\n const generatedId = useInstanceId(ToggleGroupControlAsButtonGroup, 'toggle-group-control-as-button-group');\n const baseId = idProp || generatedId;\n\n // Use a heuristic to understand if the component is being used in controlled\n // or uncontrolled mode, and consequently:\n // - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n // - use the `value` prop as the `defaultValue` when uncontrolled\n const {\n value,\n defaultValue\n } = useComputeControlledOrUncontrolledValue(valueProp);\n const [selectedValue, setSelectedValue] = useControlledValue({\n defaultValue,\n value,\n onChange\n });\n const groupContextValue = useMemo(() => ({\n baseId,\n value: selectedValue,\n setValue: setSelectedValue,\n isBlock: !isAdaptiveWidth,\n isDeselectable: true,\n size,\n setSelectedElement\n }), [baseId, selectedValue, setSelectedValue, isAdaptiveWidth, size, setSelectedElement]);\n return /*#__PURE__*/_jsx(ToggleGroupControlContext.Provider, {\n value: groupContextValue,\n children: /*#__PURE__*/_jsx(View, {\n \"aria-label\": label,\n ...otherProps,\n ref: forwardedRef,\n role: \"group\",\n children: children\n })\n });\n}\nexport const ToggleGroupControlAsButtonGroup = forwardRef(UnforwardedToggleGroupControlAsButtonGroup);"],
|
|
5
|
-
"mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,YAAY,eAAe;AAKpC,SAAS,YAAY;AACrB,SAAS,0BAA0B;AACnC,OAAO,+BAA+B;AACtC,SAAS,+CAA+C;AACxD,SAAS,OAAO,YAAY;AAC5B,SAAS,2CAA2C;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,IAAI;AAAA,EACJ;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,QAAM,cAAc,cAAc,iCAAiC,sCAAsC;AACzG,QAAM,SAAS,UAAU;AAMzB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,wCAAwC,SAAS;AACrD,QAAM,CAAC,eAAe,gBAAgB,IAAI,mBAAmB;AAAA,IAC3D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,oBAAoB,QAAQ,OAAO;AAAA,IACvC;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,eAAe,kBAAkB,iBAAiB,MAAM,kBAAkB,CAAC;AACxF,SAAoB,qBAAK,0BAA0B,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAuB,qBAAK,MAAM;AAAA,MAChC,cAAc;AAAA,MACd,GAAG;AAAA,MACH,KAAK;AAAA,MACL,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,kCAAkC,WAAW,0CAA0C;",
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport { useControlledValue } from '../../utils';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlAsButtonGroup({\n children,\n isAdaptiveWidth,\n label,\n onChange,\n size,\n value: valueProp,\n id: idProp,\n setSelectedElement,\n ...otherProps\n}, forwardedRef) {\n const generatedId = useInstanceId(ToggleGroupControlAsButtonGroup, 'toggle-group-control-as-button-group');\n const baseId = idProp || generatedId;\n\n // Use a heuristic to understand if the component is being used in controlled\n // or uncontrolled mode, and consequently:\n // - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n // - use the `value` prop as the `defaultValue` when uncontrolled\n const {\n value,\n defaultValue\n } = useComputeControlledOrUncontrolledValue(valueProp);\n const [selectedValue, setSelectedValue] = useControlledValue({\n defaultValue,\n value,\n onChange\n });\n const groupContextValue = useMemo(() => ({\n baseId,\n value: selectedValue,\n setValue: setSelectedValue,\n isBlock: !isAdaptiveWidth,\n isDeselectable: true,\n size,\n setSelectedElement\n }), [baseId, selectedValue, setSelectedValue, isAdaptiveWidth, size, setSelectedElement]);\n return /*#__PURE__*/_jsx(ToggleGroupControlContext.Provider, {\n value: groupContextValue,\n children: /*#__PURE__*/_jsx(View, {\n \"aria-label\": label,\n ...otherProps,\n ref: forwardedRef,\n role: \"group\",\n children: children\n })\n });\n}\nexport const ToggleGroupControlAsButtonGroup = forwardRef(UnforwardedToggleGroupControlAsButtonGroup);\nToggleGroupControlAsButtonGroup.displayName = 'ToggleGroupControlAsButtonGroup';"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,qBAAqB;AAC9B,SAAS,YAAY,eAAe;AAKpC,SAAS,YAAY;AACrB,SAAS,0BAA0B;AACnC,OAAO,+BAA+B;AACtC,SAAS,+CAA+C;AACxD,SAAS,OAAO,YAAY;AAC5B,SAAS,2CAA2C;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,IAAI;AAAA,EACJ;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,QAAM,cAAc,cAAc,iCAAiC,sCAAsC;AACzG,QAAM,SAAS,UAAU;AAMzB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,wCAAwC,SAAS;AACrD,QAAM,CAAC,eAAe,gBAAgB,IAAI,mBAAmB;AAAA,IAC3D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,oBAAoB,QAAQ,OAAO;AAAA,IACvC;AAAA,IACA,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,eAAe,kBAAkB,iBAAiB,MAAM,kBAAkB,CAAC;AACxF,SAAoB,qBAAK,0BAA0B,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAuB,qBAAK,MAAM;AAAA,MAChC,cAAc;AAAA,MACd,GAAG;AAAA,MACH,KAAK;AAAA,MACL,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,kCAAkC,WAAW,0CAA0C;AACpG,gCAAgC,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -65,6 +65,7 @@ function UnforwardedToggleGroupControlAsRadioGroup({
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
var ToggleGroupControlAsRadioGroup = forwardRef(UnforwardedToggleGroupControlAsRadioGroup);
|
|
68
|
+
ToggleGroupControlAsRadioGroup.displayName = "ToggleGroupControlAsRadioGroup";
|
|
68
69
|
export {
|
|
69
70
|
ToggleGroupControlAsRadioGroup
|
|
70
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toggle-group-control/toggle-group-control/as-radio-group.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useEffect, useMemo } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlAsRadioGroup({\n children,\n isAdaptiveWidth,\n label,\n onChange: onChangeProp,\n size,\n value: valueProp,\n id: idProp,\n setSelectedElement,\n ...otherProps\n}, forwardedRef) {\n const generatedId = useInstanceId(ToggleGroupControlAsRadioGroup, 'toggle-group-control-as-radio-group');\n const baseId = idProp || generatedId;\n\n // Use a heuristic to understand if the component is being used in controlled\n // or uncontrolled mode, and consequently:\n // - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n // - use the `value` prop as the `defaultValue` when uncontrolled\n const {\n value,\n defaultValue\n } = useComputeControlledOrUncontrolledValue(valueProp);\n\n // `useRadioStore`'s `setValue` prop can be called with `null`, while\n // the component's `onChange` prop only expects `undefined`\n const wrappedOnChangeProp = onChangeProp ? v => {\n onChangeProp(v !== null && v !== void 0 ? v : undefined);\n } : undefined;\n const radio = Ariakit.useRadioStore({\n defaultValue,\n value,\n setValue: wrappedOnChangeProp,\n rtl: isRTL()\n });\n const selectedValue = Ariakit.useStoreState(radio, 'value');\n const setValue = radio.setValue;\n\n // Ensures that the active id is also reset after the value is \"reset\" by the consumer.\n useEffect(() => {\n if (selectedValue === '') {\n radio.setActiveId(undefined);\n }\n }, [radio, selectedValue]);\n const groupContextValue = useMemo(() => ({\n activeItemIsNotFirstItem: () => radio.getState().activeId !== radio.first(),\n baseId,\n isBlock: !isAdaptiveWidth,\n size,\n // @ts-expect-error - This is wrong and we should fix it.\n value: selectedValue,\n // @ts-expect-error - This is wrong and we should fix it.\n setValue,\n setSelectedElement\n }), [baseId, isAdaptiveWidth, radio, selectedValue, setSelectedElement, setValue, size]);\n return /*#__PURE__*/_jsx(ToggleGroupControlContext.Provider, {\n value: groupContextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radio,\n \"aria-label\": label,\n render: /*#__PURE__*/_jsx(View, {}),\n ...otherProps,\n id: baseId,\n ref: forwardedRef,\n children: children\n })\n });\n}\nexport const ToggleGroupControlAsRadioGroup = forwardRef(UnforwardedToggleGroupControlAsRadioGroup);"],
|
|
5
|
-
"mappings": ";AAIA,YAAY,aAAa;AAKzB,SAAS,qBAAqB;AAC9B,SAAS,YAAY,WAAW,eAAe;AAC/C,SAAS,aAAa;AAKtB,SAAS,YAAY;AACrB,OAAO,+BAA+B;AACtC,SAAS,+CAA+C;AACxD,SAAS,OAAO,YAAY;AAC5B,SAAS,0CAA0C;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,OAAO;AAAA,EACP,IAAI;AAAA,EACJ;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,QAAM,cAAc,cAAc,gCAAgC,qCAAqC;AACvG,QAAM,SAAS,UAAU;AAMzB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,wCAAwC,SAAS;AAIrD,QAAM,sBAAsB,eAAe,OAAK;AAC9C,iBAAa,MAAM,QAAQ,MAAM,SAAS,IAAI,MAAS;AAAA,EACzD,IAAI;AACJ,QAAM,QAAgB,sBAAc;AAAA,IAClC;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,KAAK,MAAM;AAAA,EACb,CAAC;AACD,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,WAAW,MAAM;AAGvB,YAAU,MAAM;AACd,QAAI,kBAAkB,IAAI;AACxB,YAAM,YAAY,MAAS;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,OAAO,aAAa,CAAC;AACzB,QAAM,oBAAoB,QAAQ,OAAO;AAAA,IACvC,0BAA0B,MAAM,MAAM,SAAS,EAAE,aAAa,MAAM,MAAM;AAAA,IAC1E;AAAA,IACA,SAAS,CAAC;AAAA,IACV;AAAA;AAAA,IAEA,OAAO;AAAA;AAAA,IAEP;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,iBAAiB,OAAO,eAAe,oBAAoB,UAAU,IAAI,CAAC;AACvF,SAAoB,qBAAK,0BAA0B,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAuB,qBAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,cAAc;AAAA,MACd,QAAqB,qBAAK,MAAM,CAAC,CAAC;AAAA,MAClC,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,iCAAiC,WAAW,yCAAyC;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useEffect, useMemo } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { View } from '../../view';\nimport ToggleGroupControlContext from '../context';\nimport { useComputeControlledOrUncontrolledValue } from './utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlAsRadioGroup({\n children,\n isAdaptiveWidth,\n label,\n onChange: onChangeProp,\n size,\n value: valueProp,\n id: idProp,\n setSelectedElement,\n ...otherProps\n}, forwardedRef) {\n const generatedId = useInstanceId(ToggleGroupControlAsRadioGroup, 'toggle-group-control-as-radio-group');\n const baseId = idProp || generatedId;\n\n // Use a heuristic to understand if the component is being used in controlled\n // or uncontrolled mode, and consequently:\n // - when controlled, convert `undefined` values to `''` (ie. \"no value\")\n // - use the `value` prop as the `defaultValue` when uncontrolled\n const {\n value,\n defaultValue\n } = useComputeControlledOrUncontrolledValue(valueProp);\n\n // `useRadioStore`'s `setValue` prop can be called with `null`, while\n // the component's `onChange` prop only expects `undefined`\n const wrappedOnChangeProp = onChangeProp ? v => {\n onChangeProp(v !== null && v !== void 0 ? v : undefined);\n } : undefined;\n const radio = Ariakit.useRadioStore({\n defaultValue,\n value,\n setValue: wrappedOnChangeProp,\n rtl: isRTL()\n });\n const selectedValue = Ariakit.useStoreState(radio, 'value');\n const setValue = radio.setValue;\n\n // Ensures that the active id is also reset after the value is \"reset\" by the consumer.\n useEffect(() => {\n if (selectedValue === '') {\n radio.setActiveId(undefined);\n }\n }, [radio, selectedValue]);\n const groupContextValue = useMemo(() => ({\n activeItemIsNotFirstItem: () => radio.getState().activeId !== radio.first(),\n baseId,\n isBlock: !isAdaptiveWidth,\n size,\n // @ts-expect-error - This is wrong and we should fix it.\n value: selectedValue,\n // @ts-expect-error - This is wrong and we should fix it.\n setValue,\n setSelectedElement\n }), [baseId, isAdaptiveWidth, radio, selectedValue, setSelectedElement, setValue, size]);\n return /*#__PURE__*/_jsx(ToggleGroupControlContext.Provider, {\n value: groupContextValue,\n children: /*#__PURE__*/_jsx(Ariakit.RadioGroup, {\n store: radio,\n \"aria-label\": label,\n render: /*#__PURE__*/_jsx(View, {}),\n ...otherProps,\n id: baseId,\n ref: forwardedRef,\n children: children\n })\n });\n}\nexport const ToggleGroupControlAsRadioGroup = forwardRef(UnforwardedToggleGroupControlAsRadioGroup);\nToggleGroupControlAsRadioGroup.displayName = 'ToggleGroupControlAsRadioGroup';"],
|
|
5
|
+
"mappings": ";AAIA,YAAY,aAAa;AAKzB,SAAS,qBAAqB;AAC9B,SAAS,YAAY,WAAW,eAAe;AAC/C,SAAS,aAAa;AAKtB,SAAS,YAAY;AACrB,OAAO,+BAA+B;AACtC,SAAS,+CAA+C;AACxD,SAAS,OAAO,YAAY;AAC5B,SAAS,0CAA0C;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,OAAO;AAAA,EACP,IAAI;AAAA,EACJ;AAAA,EACA,GAAG;AACL,GAAG,cAAc;AACf,QAAM,cAAc,cAAc,gCAAgC,qCAAqC;AACvG,QAAM,SAAS,UAAU;AAMzB,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,wCAAwC,SAAS;AAIrD,QAAM,sBAAsB,eAAe,OAAK;AAC9C,iBAAa,MAAM,QAAQ,MAAM,SAAS,IAAI,MAAS;AAAA,EACzD,IAAI;AACJ,QAAM,QAAgB,sBAAc;AAAA,IAClC;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV,KAAK,MAAM;AAAA,EACb,CAAC;AACD,QAAM,gBAAwB,sBAAc,OAAO,OAAO;AAC1D,QAAM,WAAW,MAAM;AAGvB,YAAU,MAAM;AACd,QAAI,kBAAkB,IAAI;AACxB,YAAM,YAAY,MAAS;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,OAAO,aAAa,CAAC;AACzB,QAAM,oBAAoB,QAAQ,OAAO;AAAA,IACvC,0BAA0B,MAAM,MAAM,SAAS,EAAE,aAAa,MAAM,MAAM;AAAA,IAC1E;AAAA,IACA,SAAS,CAAC;AAAA,IACV;AAAA;AAAA,IAEA,OAAO;AAAA;AAAA,IAEP;AAAA,IACA;AAAA,EACF,IAAI,CAAC,QAAQ,iBAAiB,OAAO,eAAe,oBAAoB,UAAU,IAAI,CAAC;AACvF,SAAoB,qBAAK,0BAA0B,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAuB,qBAAa,oBAAY;AAAA,MAC9C,OAAO;AAAA,MACP,cAAc;AAAA,MACd,QAAqB,qBAAK,MAAM,CAAC,CAAC;AAAA,MAClC,GAAG;AAAA,MACH,IAAI;AAAA,MACJ,KAAK;AAAA,MACL;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,iCAAiC,WAAW,yCAAyC;AAClG,+BAA+B,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -16,6 +16,7 @@ function UnforwardedToggleGroupControlOption(props, ref) {
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
var ToggleGroupControlOption = forwardRef(UnforwardedToggleGroupControlOption);
|
|
19
|
+
ToggleGroupControlOption.displayName = "ToggleGroupControlOption";
|
|
19
20
|
var component_default = ToggleGroupControlOption;
|
|
20
21
|
export {
|
|
21
22
|
ToggleGroupControlOption,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toggle-group-control/toggle-group-control-option/component.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOption(props, ref) {\n const {\n label,\n ...restProps\n } = props;\n const optionLabel = restProps['aria-label'] || label;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n \"aria-label\": optionLabel,\n ref: ref,\n children: label\n });\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __next40pxDefaultSize\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(UnforwardedToggleGroupControlOption);\nexport default ToggleGroupControlOption;"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,kBAAkB;AAM3B,SAAS,oCAAoC;AAC7C,SAAS,OAAO,YAAY;AAC5B,SAAS,oCAAoC,OAAO,KAAK;AACvD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAc,UAAU,YAAY,KAAK;AAC/C,SAAoB,qBAAK,8BAA8B;AAAA,IACrD,GAAG;AAAA,IACH,cAAc;AAAA,IACd;AAAA,IACA,UAAU;AAAA,EACZ,CAAC;AACH;AA2BO,IAAM,2BAA2B,WAAW,mCAAmC;AACtF,IAAO,oBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOption(props, ref) {\n const {\n label,\n ...restProps\n } = props;\n const optionLabel = restProps['aria-label'] || label;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n \"aria-label\": optionLabel,\n ref: ref,\n children: label\n });\n}\n\n/**\n * `ToggleGroupControlOption` is a form component and is meant to be used as a\n * child of `ToggleGroupControl`.\n *\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOption as ToggleGroupControlOption,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl\n * label=\"my label\"\n * value=\"vertical\"\n * isBlock\n * __next40pxDefaultSize\n * >\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOption = forwardRef(UnforwardedToggleGroupControlOption);\nToggleGroupControlOption.displayName = 'ToggleGroupControlOption';\nexport default ToggleGroupControlOption;"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,kBAAkB;AAM3B,SAAS,oCAAoC;AAC7C,SAAS,OAAO,YAAY;AAC5B,SAAS,oCAAoC,OAAO,KAAK;AACvD,QAAM;AAAA,IACJ;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,cAAc,UAAU,YAAY,KAAK;AAC/C,SAAoB,qBAAK,8BAA8B;AAAA,IACrD,GAAG;AAAA,IACH,cAAc;AAAA,IACd;AAAA,IACA,UAAU;AAAA,EACZ,CAAC;AACH;AA2BO,IAAM,2BAA2B,WAAW,mCAAmC;AACtF,yBAAyB,cAAc;AACvC,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,6 +21,7 @@ function UnforwardedToggleGroupControlOptionIcon(props, ref) {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
var ToggleGroupControlOptionIcon = forwardRef(UnforwardedToggleGroupControlOptionIcon);
|
|
24
|
+
ToggleGroupControlOptionIcon.displayName = "ToggleGroupControlOptionIcon";
|
|
24
25
|
var component_default = ToggleGroupControlOptionIcon;
|
|
25
26
|
export {
|
|
26
27
|
ToggleGroupControlOptionIcon,
|
package/build-module/toggle-group-control/toggle-group-control-option-icon/component.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/toggle-group-control/toggle-group-control-option-icon/component.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOptionIcon(props, ref) {\n const {\n icon,\n label,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n isIcon: true,\n \"aria-label\": label,\n showTooltip: true,\n ref: ref,\n children: /*#__PURE__*/_jsx(Icon, {\n icon: icon\n })\n });\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl __next40pxDefaultSize>\n * <ToggleGroupControlOptionIcon\n * value=\"uppercase\"\n * label=\"Uppercase\"\n * icon={ formatUppercase }\n * />\n * <ToggleGroupControlOptionIcon\n * value=\"lowercase\"\n * label=\"Lowercase\"\n * icon={ formatLowercase }\n * />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(UnforwardedToggleGroupControlOptionIcon);\nexport default ToggleGroupControlOptionIcon;"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,kBAAkB;AAM3B,SAAS,oCAAoC;AAC7C,OAAO,UAAU;AACjB,SAAS,OAAO,YAAY;AAC5B,SAAS,wCAAwC,OAAO,KAAK;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,qBAAK,8BAA8B;AAAA,IACrD,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,IACb;AAAA,IACA,UAAuB,qBAAK,MAAM;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAgCO,IAAM,+BAA+B,WAAW,uCAAuC;AAC9F,IAAO,oBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { ToggleGroupControlOptionBase } from '../toggle-group-control-option-base';\nimport Icon from '../../icon';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedToggleGroupControlOptionIcon(props, ref) {\n const {\n icon,\n label,\n ...restProps\n } = props;\n return /*#__PURE__*/_jsx(ToggleGroupControlOptionBase, {\n ...restProps,\n isIcon: true,\n \"aria-label\": label,\n showTooltip: true,\n ref: ref,\n children: /*#__PURE__*/_jsx(Icon, {\n icon: icon\n })\n });\n}\n\n/**\n * `ToggleGroupControlOptionIcon` is a form component which is meant to be used as a\n * child of `ToggleGroupControl` and displays an icon.\n *\n * ```jsx\n *\n * import {\n *\t__experimentalToggleGroupControl as ToggleGroupControl,\n *\t__experimentalToggleGroupControlOptionIcon as ToggleGroupControlOptionIcon,\n * from '@wordpress/components';\n * import { formatLowercase, formatUppercase } from '@wordpress/icons';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl __next40pxDefaultSize>\n * <ToggleGroupControlOptionIcon\n * value=\"uppercase\"\n * label=\"Uppercase\"\n * icon={ formatUppercase }\n * />\n * <ToggleGroupControlOptionIcon\n * value=\"lowercase\"\n * label=\"Lowercase\"\n * icon={ formatLowercase }\n * />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nexport const ToggleGroupControlOptionIcon = forwardRef(UnforwardedToggleGroupControlOptionIcon);\nToggleGroupControlOptionIcon.displayName = 'ToggleGroupControlOptionIcon';\nexport default ToggleGroupControlOptionIcon;"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,kBAAkB;AAM3B,SAAS,oCAAoC;AAC7C,OAAO,UAAU;AACjB,SAAS,OAAO,YAAY;AAC5B,SAAS,wCAAwC,OAAO,KAAK;AAC3D,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,qBAAK,8BAA8B;AAAA,IACrD,GAAG;AAAA,IACH,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,aAAa;AAAA,IACb;AAAA,IACA,UAAuB,qBAAK,MAAM;AAAA,MAChC;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AAgCO,IAAM,+BAA+B,WAAW,uCAAuC;AAC9F,6BAA6B,cAAc;AAC3C,IAAO,oBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|