@wordpress/components 32.0.1-next.v.0 → 32.1.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 +15 -2
- package/CONTRIBUTING.md +6 -0
- package/build/alignment-matrix-control/cell.cjs +6 -121
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/icon.cjs +2 -3
- package/build/alignment-matrix-control/icon.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +6 -121
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/angle-picker-control/angle-circle.cjs +6 -85
- package/build/angle-picker-control/angle-circle.cjs.map +2 -2
- package/build/angle-picker-control/index.cjs +1 -0
- package/build/angle-picker-control/index.cjs.map +2 -2
- package/build/autocomplete/autocompleter-ui.cjs +1 -2
- package/build/autocomplete/autocompleter-ui.cjs.map +2 -2
- package/build/box-control/index.cjs +15 -7
- package/build/box-control/index.cjs.map +2 -2
- package/build/box-control/input-control.cjs +8 -12
- package/build/box-control/input-control.cjs.map +2 -2
- package/build/button/deprecated.cjs +12 -8
- package/build/button/deprecated.cjs.map +2 -2
- package/build/button/index.cjs +7 -12
- 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/calendar/date-calendar/index.cjs +2 -2
- package/build/calendar/date-calendar/index.cjs.map +2 -2
- package/build/calendar/date-range-calendar/index.cjs +4 -6
- package/build/calendar/date-range-calendar/index.cjs.map +2 -2
- package/build/card/card/hook.cjs +1 -2
- package/build/card/card/hook.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/color-palette/utils.cjs +2 -2
- package/build/color-palette/utils.cjs.map +2 -2
- package/build/combobox-control/index.cjs +2 -3
- package/build/combobox-control/index.cjs.map +2 -2
- package/build/composite/group-label.cjs +1 -2
- package/build/composite/group-label.cjs.map +2 -2
- package/build/composite/group.cjs +1 -2
- package/build/composite/group.cjs.map +2 -2
- package/build/composite/hover.cjs +1 -2
- package/build/composite/hover.cjs.map +2 -2
- package/build/composite/index.cjs +1 -1
- package/build/composite/index.cjs.map +2 -2
- package/build/composite/item.cjs +1 -2
- package/build/composite/item.cjs.map +2 -2
- package/build/composite/legacy/index.cjs +1 -2
- package/build/composite/legacy/index.cjs.map +2 -2
- package/build/composite/row.cjs +1 -2
- package/build/composite/row.cjs.map +2 -2
- package/build/composite/typeahead.cjs +1 -2
- package/build/composite/typeahead.cjs.map +2 -2
- package/build/confirm-dialog/component.cjs +2 -2
- package/build/confirm-dialog/component.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/custom-gradient-picker/index.cjs +1 -2
- package/build/custom-gradient-picker/index.cjs.map +2 -2
- package/build/custom-gradient-picker/utils.cjs +1 -1
- package/build/custom-gradient-picker/utils.cjs.map +2 -2
- package/build/custom-select-control/index.cjs +2 -3
- package/build/custom-select-control/index.cjs.map +2 -2
- package/build/custom-select-control-v2/custom-select.cjs +1 -1
- package/build/custom-select-control-v2/custom-select.cjs.map +2 -2
- package/build/custom-select-control-v2/item.cjs +2 -3
- package/build/custom-select-control-v2/item.cjs.map +2 -2
- package/build/date-time/date/index.cjs +1 -1
- package/build/date-time/date/index.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/date-time/time/index.cjs +2 -2
- package/build/date-time/time/index.cjs.map +2 -2
- package/build/date-time/utils.cjs +1 -2
- package/build/date-time/utils.cjs.map +2 -2
- package/build/disclosure/index.cjs +1 -0
- package/build/disclosure/index.cjs.map +2 -2
- package/build/divider/styles.cjs +2 -2
- package/build/divider/styles.cjs.map +2 -2
- package/build/dropdown-menu/index.cjs +2 -3
- package/build/dropdown-menu/index.cjs.map +2 -2
- package/build/duotone-picker/duotone-picker.cjs +1 -1
- package/build/duotone-picker/duotone-picker.cjs.map +2 -2
- package/build/external-link/index.cjs +1 -0
- package/build/external-link/index.cjs.map +2 -2
- package/build/flex/flex/hook.cjs +1 -1
- package/build/flex/flex/hook.cjs.map +2 -2
- package/build/focal-point-picker/index.cjs +1 -2
- package/build/focal-point-picker/index.cjs.map +2 -2
- package/build/font-size-picker/font-size-picker-select.cjs +1 -2
- package/build/font-size-picker/font-size-picker-select.cjs.map +2 -2
- package/build/font-size-picker/index.cjs +3 -2
- 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/guide/index.cjs +2 -3
- package/build/guide/index.cjs.map +2 -2
- package/build/higher-order/navigate-regions/index.cjs +10 -9
- package/build/higher-order/navigate-regions/index.cjs.map +2 -2
- package/build/higher-order/with-fallback-styles/index.cjs +1 -1
- 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/input-field.cjs +1 -1
- package/build/input-control/input-field.cjs.map +2 -2
- package/build/input-control/reducer/reducer.cjs +2 -4
- package/build/input-control/reducer/reducer.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/keyboard-shortcuts/index.cjs +1 -1
- package/build/keyboard-shortcuts/index.cjs.map +2 -2
- package/build/menu/index.cjs +1 -1
- package/build/menu/index.cjs.map +2 -2
- package/build/menu/item.cjs +1 -1
- package/build/menu/item.cjs.map +2 -2
- package/build/menu/popover.cjs +2 -2
- package/build/menu/popover.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 +3 -4
- 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/navigator/navigator/component.cjs +8 -13
- package/build/navigator/navigator/component.cjs.map +2 -2
- package/build/navigator/navigator-screen/component.cjs +1 -1
- package/build/navigator/navigator-screen/component.cjs.map +2 -2
- package/build/number-control/index.cjs +3 -3
- package/build/number-control/index.cjs.map +2 -2
- package/build/palette-edit/index.cjs +3 -4
- package/build/palette-edit/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/popover/index.cjs +1 -2
- package/build/popover/index.cjs.map +2 -2
- package/build/popover/overlay-middlewares.cjs +1 -2
- package/build/popover/overlay-middlewares.cjs.map +2 -2
- package/build/popover/utils.cjs +3 -8
- package/build/popover/utils.cjs.map +2 -2
- package/build/private-apis.cjs +1 -0
- package/build/private-apis.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 +2 -1
- 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 +5 -4
- package/build/range-control/index.cjs.map +2 -2
- package/build/range-control/utils.cjs +1 -1
- package/build/range-control/utils.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 +4 -3
- 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 +28 -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 +8 -6
- 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/tabs/tab.cjs +1 -2
- package/build/tabs/tab.cjs.map +2 -2
- package/build/tabs/tablist.cjs +7 -11
- package/build/tabs/tablist.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 +2 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.cjs.map +2 -2
- package/build/toggle-group-control/toggle-group-control/utils.cjs +1 -1
- package/build/toggle-group-control/toggle-group-control/utils.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 +2 -2
- 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 +5 -5
- package/build/unit-control/index.cjs.map +2 -2
- package/build/unit-control/utils.cjs +2 -2
- package/build/unit-control/utils.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/utils/element-rect.cjs +3 -4
- package/build/utils/element-rect.cjs.map +2 -2
- package/build/utils/font.cjs +1 -2
- package/build/utils/font.cjs.map +2 -2
- package/build/utils/strings.cjs +1 -2
- package/build/utils/strings.cjs.map +2 -2
- package/build/utils/use-deprecated-props.cjs +1 -1
- package/build/utils/use-deprecated-props.cjs.map +2 -2
- package/build/utils/values.cjs +1 -2
- package/build/utils/values.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 +2 -1
- 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 +2 -1
- 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 +4 -6
- package/build/validated-form-controls/control-with-error.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +6 -121
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/icon.mjs +2 -3
- package/build-module/alignment-matrix-control/icon.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +6 -121
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/angle-picker-control/angle-circle.mjs +6 -85
- package/build-module/angle-picker-control/angle-circle.mjs.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/autocomplete/autocompleter-ui.mjs +1 -2
- package/build-module/autocomplete/autocompleter-ui.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/box-control/input-control.mjs +8 -12
- package/build-module/box-control/input-control.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 +7 -12
- 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/calendar/date-calendar/index.mjs +2 -2
- package/build-module/calendar/date-calendar/index.mjs.map +2 -2
- package/build-module/calendar/date-range-calendar/index.mjs +4 -6
- package/build-module/calendar/date-range-calendar/index.mjs.map +2 -2
- package/build-module/card/card/hook.mjs +1 -2
- package/build-module/card/card/hook.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/color-palette/utils.mjs +2 -2
- package/build-module/color-palette/utils.mjs.map +2 -2
- package/build-module/combobox-control/index.mjs +2 -3
- package/build-module/combobox-control/index.mjs.map +2 -2
- package/build-module/composite/group-label.mjs +1 -2
- package/build-module/composite/group-label.mjs.map +2 -2
- package/build-module/composite/group.mjs +1 -2
- package/build-module/composite/group.mjs.map +2 -2
- package/build-module/composite/hover.mjs +1 -2
- package/build-module/composite/hover.mjs.map +2 -2
- package/build-module/composite/index.mjs +1 -1
- package/build-module/composite/index.mjs.map +2 -2
- package/build-module/composite/item.mjs +1 -2
- package/build-module/composite/item.mjs.map +2 -2
- package/build-module/composite/legacy/index.mjs +1 -2
- package/build-module/composite/legacy/index.mjs.map +2 -2
- package/build-module/composite/row.mjs +1 -2
- package/build-module/composite/row.mjs.map +2 -2
- package/build-module/composite/typeahead.mjs +1 -2
- package/build-module/composite/typeahead.mjs.map +2 -2
- package/build-module/confirm-dialog/component.mjs +2 -2
- package/build-module/confirm-dialog/component.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/custom-gradient-picker/index.mjs +1 -2
- package/build-module/custom-gradient-picker/index.mjs.map +2 -2
- package/build-module/custom-gradient-picker/utils.mjs +1 -1
- package/build-module/custom-gradient-picker/utils.mjs.map +2 -2
- package/build-module/custom-select-control/index.mjs +2 -3
- package/build-module/custom-select-control/index.mjs.map +2 -2
- package/build-module/custom-select-control-v2/custom-select.mjs +1 -1
- package/build-module/custom-select-control-v2/custom-select.mjs.map +2 -2
- package/build-module/custom-select-control-v2/item.mjs +2 -3
- package/build-module/custom-select-control-v2/item.mjs.map +2 -2
- package/build-module/date-time/date/index.mjs +1 -1
- package/build-module/date-time/date/index.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/date-time/time/index.mjs +2 -2
- package/build-module/date-time/time/index.mjs.map +2 -2
- package/build-module/date-time/utils.mjs +1 -2
- package/build-module/date-time/utils.mjs.map +2 -2
- package/build-module/disclosure/index.mjs +1 -0
- package/build-module/disclosure/index.mjs.map +2 -2
- package/build-module/divider/styles.mjs +2 -2
- package/build-module/divider/styles.mjs.map +2 -2
- package/build-module/dropdown-menu/index.mjs +2 -3
- package/build-module/dropdown-menu/index.mjs.map +2 -2
- package/build-module/duotone-picker/duotone-picker.mjs +1 -1
- package/build-module/duotone-picker/duotone-picker.mjs.map +2 -2
- package/build-module/external-link/index.mjs +1 -0
- package/build-module/external-link/index.mjs.map +2 -2
- package/build-module/flex/flex/hook.mjs +1 -1
- package/build-module/flex/flex/hook.mjs.map +2 -2
- package/build-module/focal-point-picker/index.mjs +1 -2
- package/build-module/focal-point-picker/index.mjs.map +2 -2
- package/build-module/font-size-picker/font-size-picker-select.mjs +1 -2
- package/build-module/font-size-picker/font-size-picker-select.mjs.map +2 -2
- package/build-module/font-size-picker/index.mjs +3 -2
- 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/guide/index.mjs +2 -3
- package/build-module/guide/index.mjs.map +2 -2
- package/build-module/higher-order/navigate-regions/index.mjs +10 -9
- package/build-module/higher-order/navigate-regions/index.mjs.map +2 -2
- package/build-module/higher-order/with-fallback-styles/index.mjs +1 -1
- 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/input-field.mjs +1 -1
- package/build-module/input-control/input-field.mjs.map +2 -2
- package/build-module/input-control/reducer/reducer.mjs +2 -4
- package/build-module/input-control/reducer/reducer.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/keyboard-shortcuts/index.mjs +1 -1
- package/build-module/keyboard-shortcuts/index.mjs.map +2 -2
- package/build-module/menu/index.mjs +1 -1
- package/build-module/menu/index.mjs.map +2 -2
- package/build-module/menu/item.mjs +1 -1
- package/build-module/menu/item.mjs.map +2 -2
- package/build-module/menu/popover.mjs +2 -2
- package/build-module/menu/popover.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 +3 -4
- 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/navigator/navigator/component.mjs +8 -13
- package/build-module/navigator/navigator/component.mjs.map +2 -2
- package/build-module/navigator/navigator-screen/component.mjs +1 -1
- package/build-module/navigator/navigator-screen/component.mjs.map +2 -2
- package/build-module/number-control/index.mjs +3 -3
- package/build-module/number-control/index.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs +3 -4
- package/build-module/palette-edit/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/popover/index.mjs +1 -2
- package/build-module/popover/index.mjs.map +2 -2
- package/build-module/popover/overlay-middlewares.mjs +1 -2
- package/build-module/popover/overlay-middlewares.mjs.map +2 -2
- package/build-module/popover/utils.mjs +3 -8
- package/build-module/popover/utils.mjs.map +2 -2
- package/build-module/private-apis.mjs +2 -1
- package/build-module/private-apis.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 +2 -1
- 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 +5 -4
- package/build-module/range-control/index.mjs.map +2 -2
- package/build-module/range-control/utils.mjs +1 -1
- package/build-module/range-control/utils.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 +4 -3
- 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 +29 -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 +8 -6
- 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/tabs/tab.mjs +1 -2
- package/build-module/tabs/tab.mjs.map +2 -2
- package/build-module/tabs/tablist.mjs +7 -11
- package/build-module/tabs/tablist.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 +2 -1
- 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/utils.mjs +1 -1
- package/build-module/toggle-group-control/toggle-group-control/utils.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 +2 -2
- 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 +5 -5
- package/build-module/unit-control/index.mjs.map +2 -2
- package/build-module/unit-control/utils.mjs +2 -2
- package/build-module/unit-control/utils.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/utils/element-rect.mjs +3 -4
- package/build-module/utils/element-rect.mjs.map +2 -2
- package/build-module/utils/font.mjs +1 -2
- package/build-module/utils/font.mjs.map +2 -2
- package/build-module/utils/strings.mjs +1 -2
- package/build-module/utils/strings.mjs.map +2 -2
- package/build-module/utils/use-deprecated-props.mjs +1 -1
- package/build-module/utils/use-deprecated-props.mjs.map +2 -2
- package/build-module/utils/values.mjs +1 -2
- package/build-module/utils/values.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 +2 -1
- 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 +2 -1
- 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 +4 -6
- 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/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/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/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/stories/index.story.d.ts +1 -1
- package/build-types/menu/stories/index.story.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/private-apis.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.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 +26 -24
- 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/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/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 +1 -1
- 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/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/stories/index.story.tsx +5 -2
- 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/private-apis.ts +2 -0
- package/src/progress-bar/index.tsx +1 -0
- package/src/progress-bar/stories/index.story.tsx +1 -1
- package/src/query-controls/stories/index.story.tsx +1 -1
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/index.tsx +1 -0
- package/src/radio-group/radio.tsx +3 -0
- package/src/radio-group/stories/index.story.tsx +1 -1
- package/src/range-control/index.tsx +1 -0
- package/src/range-control/stories/index.story.tsx +5 -1
- package/src/resizable-box/index.tsx +1 -0
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scroll-lock/stories/index.story.tsx +6 -2
- package/src/scrollable/stories/index.story.tsx +1 -1
- package/src/search-control/index.tsx +1 -0
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/index.tsx +3 -0
- package/src/select-control/stories/index.story.tsx +3 -1
- package/src/shortcut/stories/index.story.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/slot.tsx +16 -9
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +30 -4
- package/src/slot-fill/bubbles-virtually/use-slot.ts +7 -3
- package/src/slot-fill/context.ts +15 -4
- package/src/slot-fill/fill.tsx +74 -0
- package/src/slot-fill/index.tsx +17 -33
- package/src/slot-fill/provider.tsx +49 -35
- package/src/slot-fill/slot.tsx +4 -4
- package/src/slot-fill/stories/index.story.tsx +1 -1
- package/src/slot-fill/test/__snapshots__/slot.js.snap +14 -0
- package/src/slot-fill/test/slot.js +24 -1
- package/src/slot-fill/types.ts +16 -32
- package/src/snackbar/index.tsx +1 -0
- package/src/snackbar/stories/index.story.tsx +1 -1
- package/src/snackbar/stories/list.story.tsx +1 -1
- package/src/spacer/stories/index.story.tsx +1 -1
- package/src/spinner/index.tsx +1 -0
- package/src/spinner/stories/index.story.tsx +1 -1
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/tab-panel/index.tsx +1 -0
- package/src/tab-panel/stories/index.story.tsx +1 -1
- package/src/tabs/stories/index.story.tsx +11 -3
- package/src/text/stories/index.story.tsx +1 -1
- package/src/text-control/index.tsx +1 -0
- package/src/text-control/stories/index.story.tsx +2 -1
- package/src/text-highlight/index.tsx +2 -0
- package/src/text-highlight/stories/index.story.tsx +1 -1
- package/src/textarea-control/index.tsx +1 -0
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/stories/index.story.tsx +8 -4
- package/src/tip/stories/index.story.tsx +1 -1
- package/src/toggle-control/index.tsx +1 -0
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
- package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -0
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar/index.tsx +1 -0
- package/src/toolbar/toolbar/toolbar-container.tsx +1 -0
- package/src/toolbar/toolbar-button/index.tsx +1 -0
- package/src/toolbar/toolbar-dropdown-menu/index.tsx +1 -0
- package/src/toolbar/toolbar-item/index.tsx +1 -0
- package/src/tools-panel/stories/index.story.tsx +1 -1
- package/src/tooltip/index.tsx +1 -0
- package/src/tooltip/stories/index.story.tsx +14 -4
- package/src/tree-grid/cell.tsx +1 -0
- package/src/tree-grid/index.tsx +1 -0
- package/src/tree-grid/item.tsx +1 -0
- package/src/tree-grid/roving-tab-index-item.tsx +1 -0
- package/src/tree-grid/row.tsx +1 -0
- package/src/tree-grid/stories/index.story.tsx +6 -2
- package/src/tree-select/index.tsx +2 -0
- package/src/tree-select/stories/index.story.tsx +2 -1
- package/src/truncate/stories/index.story.tsx +1 -1
- package/src/unit-control/index.tsx +1 -0
- package/src/unit-control/stories/index.story.tsx +3 -1
- package/src/utils/dropdown-motion.ts +1 -0
- package/src/v-stack/stories/e2e/index.story.tsx +1 -1
- package/src/v-stack/stories/index.story.tsx +1 -1
- package/src/validated-form-controls/components/checkbox-control.tsx +1 -0
- package/src/validated-form-controls/components/combobox-control.tsx +1 -0
- package/src/validated-form-controls/components/custom-select-control.tsx +1 -0
- package/src/validated-form-controls/components/form-token-field.tsx +1 -0
- package/src/validated-form-controls/components/input-control.tsx +1 -0
- package/src/validated-form-controls/components/number-control.tsx +1 -0
- package/src/validated-form-controls/components/radio-control.tsx +1 -0
- package/src/validated-form-controls/components/range-control.tsx +1 -0
- package/src/validated-form-controls/components/select-control.tsx +1 -0
- package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/form-token-field.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/input-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/number-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/overview.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/radio-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/range-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/select-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/story-utils.tsx +1 -1
- package/src/validated-form-controls/components/stories/text-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +1 -1
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +1 -1
- package/src/validated-form-controls/components/text-control.tsx +1 -0
- package/src/validated-form-controls/components/textarea-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-control.tsx +1 -0
- package/src/validated-form-controls/components/toggle-group-control.tsx +1 -0
- package/src/validated-form-controls/control-with-error.tsx +1 -0
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/build/slot-fill/bubbles-virtually/fill.cjs +0 -63
- package/build/slot-fill/bubbles-virtually/fill.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs +0 -59
- package/build/slot-fill/bubbles-virtually/slot-fill-context.cjs.map +0 -7
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs +0 -105
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.cjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/fill.mjs +0 -32
- package/build-module/slot-fill/bubbles-virtually/fill.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs +0 -28
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.mjs.map +0 -7
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs +0 -74
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.mjs.map +0 -7
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -7
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -3
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +0 -1
- package/src/slot-fill/bubbles-virtually/fill.tsx +0 -50
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +0 -34
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +0 -106
- package/src/slot-fill/fill.ts +0 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/button-group/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedButtonGroup(props, ref) {\n const {\n className,\n __shouldNotWarnDeprecated,\n ...restProps\n } = props;\n const classes = clsx('components-button-group', className);\n if (!__shouldNotWarnDeprecated) {\n deprecated('wp.components.ButtonGroup', {\n since: '6.8',\n alternative: 'wp.components.__experimentalToggleGroupControl'\n });\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"group\",\n className: classes,\n ...restProps\n });\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * @deprecated Use `ToggleGroupControl` instead.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n * <ButtonGroup>\n * <Button variant=\"primary\">Button 1</Button>\n * <Button variant=\"primary\">Button 2</Button>\n * </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef(UnforwardedButtonGroup);\nexport default ButtonGroup;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAC3B,OAAO,gBAAgB;AAKvB,SAAS,OAAO,YAAY;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,UAAU,KAAK,2BAA2B,SAAS;AACzD,MAAI,CAAC,2BAA2B;AAC9B,eAAW,6BAA6B;AAAA,MACtC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,SAAoB,qBAAK,OAAO;AAAA,IAC9B;AAAA,IACA,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,EACL,CAAC;AACH;AAmBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,IAAO,uBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedButtonGroup(props, ref) {\n const {\n className,\n __shouldNotWarnDeprecated,\n ...restProps\n } = props;\n const classes = clsx('components-button-group', className);\n if (!__shouldNotWarnDeprecated) {\n deprecated('wp.components.ButtonGroup', {\n since: '6.8',\n alternative: 'wp.components.__experimentalToggleGroupControl'\n });\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"group\",\n className: classes,\n ...restProps\n });\n}\n\n/**\n * ButtonGroup can be used to group any related buttons together. To emphasize\n * related buttons, a group should share a common container.\n *\n * @deprecated Use `ToggleGroupControl` instead.\n *\n * ```jsx\n * import { Button, ButtonGroup } from '@wordpress/components';\n *\n * const MyButtonGroup = () => (\n * <ButtonGroup>\n * <Button variant=\"primary\">Button 1</Button>\n * <Button variant=\"primary\">Button 2</Button>\n * </ButtonGroup>\n * );\n * ```\n */\nexport const ButtonGroup = forwardRef(UnforwardedButtonGroup);\nButtonGroup.displayName = 'ButtonGroup';\nexport default ButtonGroup;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAC3B,OAAO,gBAAgB;AAKvB,SAAS,OAAO,YAAY;AAC5B,SAAS,uBAAuB,OAAO,KAAK;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,UAAU,KAAK,2BAA2B,SAAS;AACzD,MAAI,CAAC,2BAA2B;AAC9B,eAAW,6BAA6B;AAAA,MACtC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AAAA,EACH;AACA,SAAoB,qBAAK,OAAO;AAAA,IAC9B;AAAA,IACA,MAAM;AAAA,IACN,WAAW;AAAA,IACX,GAAG;AAAA,EACL,CAAC;AACH;AAmBO,IAAM,cAAc,WAAW,sBAAsB;AAC5D,YAAY,cAAc;AAC1B,IAAO,uBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,7 +22,7 @@ var DateCalendar = ({
|
|
|
22
22
|
mode: "single"
|
|
23
23
|
});
|
|
24
24
|
const onChange = useCallback((selected2, triggerDate, modifiers, e) => {
|
|
25
|
-
onSelect?.(selected2
|
|
25
|
+
onSelect?.(selected2 ?? void 0, triggerDate, modifiers, e);
|
|
26
26
|
}, [onSelect]);
|
|
27
27
|
const [selected, setSelected] = useControlledValue({
|
|
28
28
|
defaultValue: defaultSelected,
|
|
@@ -35,7 +35,7 @@ var DateCalendar = ({
|
|
|
35
35
|
...props,
|
|
36
36
|
mode: "single",
|
|
37
37
|
numberOfMonths: clampNumberOfMonths(numberOfMonths),
|
|
38
|
-
selected: selected
|
|
38
|
+
selected: selected ?? void 0,
|
|
39
39
|
onSelect: setSelected
|
|
40
40
|
});
|
|
41
41
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/calendar/date-calendar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport { DayPicker } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * `DateCalendar` is a React component that provides a customizable calendar\n * interface for **single date** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateCalendar = ({\n defaultSelected,\n selected: selectedProp,\n onSelect,\n numberOfMonths = 1,\n locale = enUS,\n timeZone,\n ...props\n}) => {\n const localizationProps = useLocalizationProps({\n locale,\n timeZone,\n mode: 'single'\n });\n const onChange = useCallback((selected, triggerDate, modifiers, e) => {\n // Convert internal `null` to `undefined` for the public event handler.\n onSelect?.(selected
|
|
5
|
-
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAIrB,SAAS,mBAAmB;AAI5B,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,OAAO,YAAY;AASrB,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,qBAAqB;AAAA,IAC7C;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACR,CAAC;AACD,QAAM,WAAW,YAAY,CAACA,WAAU,aAAa,WAAW,MAAM;AAEpE,eAAWA,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport { DayPicker } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * `DateCalendar` is a React component that provides a customizable calendar\n * interface for **single date** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateCalendar = ({\n defaultSelected,\n selected: selectedProp,\n onSelect,\n numberOfMonths = 1,\n locale = enUS,\n timeZone,\n ...props\n}) => {\n const localizationProps = useLocalizationProps({\n locale,\n timeZone,\n mode: 'single'\n });\n const onChange = useCallback((selected, triggerDate, modifiers, e) => {\n // Convert internal `null` to `undefined` for the public event handler.\n onSelect?.(selected ?? undefined, triggerDate, modifiers, e);\n }, [onSelect]);\n const [selected, setSelected] = useControlledValue({\n defaultValue: defaultSelected,\n value: selectedProp,\n onChange\n });\n return /*#__PURE__*/_jsx(DayPicker, {\n ...COMMON_PROPS,\n ...localizationProps,\n ...props,\n mode: \"single\",\n numberOfMonths: clampNumberOfMonths(numberOfMonths),\n selected: selected ?? undefined,\n onSelect: setSelected\n });\n};"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAIrB,SAAS,mBAAmB;AAI5B,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,OAAO,YAAY;AASrB,IAAM,eAAe,CAAC;AAAA,EAC3B;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,qBAAqB;AAAA,IAC7C;AAAA,IACA;AAAA,IACA,MAAM;AAAA,EACR,CAAC;AACD,QAAM,WAAW,YAAY,CAACA,WAAU,aAAa,WAAW,MAAM;AAEpE,eAAWA,aAAY,QAAW,aAAa,WAAW,CAAC;AAAA,EAC7D,GAAG,CAAC,QAAQ,CAAC;AACb,QAAM,CAAC,UAAU,WAAW,IAAI,mBAAmB;AAAA,IACjD,cAAc;AAAA,IACd,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACD,SAAoB,qBAAK,WAAW;AAAA,IAClC,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,MAAM;AAAA,IACN,gBAAgB,oBAAoB,cAAc;AAAA,IAClD,UAAU,YAAY;AAAA,IACtB,UAAU;AAAA,EACZ,CAAC;AACH;",
|
|
6
6
|
"names": ["selected"]
|
|
7
7
|
}
|
|
@@ -23,14 +23,13 @@ function usePreviewRange({
|
|
|
23
23
|
let previewHighlight;
|
|
24
24
|
let potentialNewRange;
|
|
25
25
|
if (hoveredDate < selected.from) {
|
|
26
|
-
var _selected$to;
|
|
27
26
|
previewHighlight = {
|
|
28
27
|
from: hoveredDate,
|
|
29
28
|
to: selected.from
|
|
30
29
|
};
|
|
31
30
|
potentialNewRange = {
|
|
32
31
|
from: hoveredDate,
|
|
33
|
-
to:
|
|
32
|
+
to: selected.to ?? selected.from
|
|
34
33
|
};
|
|
35
34
|
} else if (selected.to && hoveredDate > selected.from && hoveredDate < selected.to) {
|
|
36
35
|
previewHighlight = {
|
|
@@ -42,9 +41,8 @@ function usePreviewRange({
|
|
|
42
41
|
to: hoveredDate
|
|
43
42
|
};
|
|
44
43
|
} else if (hoveredDate > selected.from) {
|
|
45
|
-
var _selected$to2;
|
|
46
44
|
previewHighlight = {
|
|
47
|
-
from:
|
|
45
|
+
from: selected.to ?? selected.from,
|
|
48
46
|
to: hoveredDate
|
|
49
47
|
};
|
|
50
48
|
potentialNewRange = {
|
|
@@ -92,7 +90,7 @@ var DateRangeCalendar = ({
|
|
|
92
90
|
mode: "range"
|
|
93
91
|
});
|
|
94
92
|
const onChange = useCallback((selected2, triggerDate, modifiers2, e) => {
|
|
95
|
-
onSelect?.(selected2
|
|
93
|
+
onSelect?.(selected2 ?? void 0, triggerDate, modifiers2, e);
|
|
96
94
|
}, [onSelect]);
|
|
97
95
|
const [selected, setSelected] = useControlledValue({
|
|
98
96
|
defaultValue: defaultSelected,
|
|
@@ -125,7 +123,7 @@ var DateRangeCalendar = ({
|
|
|
125
123
|
excludeDisabled,
|
|
126
124
|
min,
|
|
127
125
|
max,
|
|
128
|
-
selected: selected
|
|
126
|
+
selected: selected ?? void 0,
|
|
129
127
|
onSelect: setSelected,
|
|
130
128
|
onDayMouseEnter: (date) => setHoveredDate(date),
|
|
131
129
|
onDayMouseLeave: () => setHoveredDate(void 0),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/calendar/date-range-calendar/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n}) {\n return useMemo(() => {\n if (!hoveredDate || !selected?.from) {\n return;\n }\n let previewHighlight;\n let potentialNewRange;\n\n // Hovering on a date before the start of the selected range\n if (hoveredDate < selected.from) {\n
|
|
5
|
-
"mappings": ";AAGA,SAAS,gCAAgC;AACzC,SAAS,WAAW,8BAA8B;AAClD,SAAS,YAAY;AAIrB,SAAS,SAAS,UAAU,mBAAmB;AAI/C,SAAS,cAAc,2BAA2B;AAClD,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,OAAO,YAAY;AACrB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,SAAO,QAAQ,MAAM;AACnB,QAAI,CAAC,eAAe,CAAC,UAAU,MAAM;AACnC;AAAA,IACF;AACA,QAAI;AACJ,QAAI;AAGJ,QAAI,cAAc,SAAS,MAAM;AAC/B,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport { differenceInCalendarDays } from 'date-fns';\nimport { DayPicker, rangeContainsModifiers } from 'react-day-picker';\nimport { enUS } from 'react-day-picker/locale';\n/**\n * WordPress dependencies\n */\nimport { useMemo, useState, useCallback } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport { COMMON_PROPS, MODIFIER_CLASSNAMES } from '../utils/constants';\nimport { clampNumberOfMonths } from '../utils/misc';\nimport { useControlledValue } from '../../utils/hooks';\nimport { useLocalizationProps } from '../utils/use-localization-props';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n}) {\n return useMemo(() => {\n if (!hoveredDate || !selected?.from) {\n return;\n }\n let previewHighlight;\n let potentialNewRange;\n\n // Hovering on a date before the start of the selected range\n if (hoveredDate < selected.from) {\n previewHighlight = {\n from: hoveredDate,\n to: selected.from\n };\n potentialNewRange = {\n from: hoveredDate,\n to: selected.to ?? selected.from\n };\n } else if (selected.to && hoveredDate > selected.from && hoveredDate < selected.to) {\n // Hovering on a date between the start and end of the selected range\n previewHighlight = {\n from: selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n } else if (hoveredDate > selected.from) {\n // Hovering on a date after the end of the selected range (either\n // because it's greater than selected.to, or because it's not defined)\n previewHighlight = {\n from: selected.to ?? selected.from,\n to: hoveredDate\n };\n potentialNewRange = {\n from: selected.from,\n to: hoveredDate\n };\n }\n if (min !== undefined && min > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) < min) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (max !== undefined && max > 0 && potentialNewRange && differenceInCalendarDays(potentialNewRange.to, potentialNewRange.from) > max) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n if (excludeDisabled && disabled && potentialNewRange && rangeContainsModifiers(potentialNewRange, disabled)) {\n previewHighlight = {\n from: hoveredDate,\n to: hoveredDate\n };\n }\n return previewHighlight;\n }, [selected, hoveredDate, excludeDisabled, min, max, disabled]);\n}\n\n/**\n * `DateRangeCalendar` is a React component that provides a customizable calendar\n * interface for **date range** selection.\n *\n * The component is built with accessibility in mind and follows ARIA best\n * practices for calendar widgets. It provides keyboard navigation, screen reader\n * support, and customizable labels for internationalization.\n */\nexport const DateRangeCalendar = ({\n defaultSelected,\n selected: selectedProp,\n onSelect,\n numberOfMonths = 1,\n excludeDisabled,\n min,\n max,\n disabled,\n locale = enUS,\n timeZone,\n ...props\n}) => {\n const localizationProps = useLocalizationProps({\n locale,\n timeZone,\n mode: 'range'\n });\n const onChange = useCallback((selected, triggerDate, modifiers, e) => {\n // Convert internal `null` to `undefined` for the public event handler.\n onSelect?.(selected ?? undefined, triggerDate, modifiers, e);\n }, [onSelect]);\n const [selected, setSelected] = useControlledValue({\n defaultValue: defaultSelected,\n value: selectedProp,\n onChange\n });\n const [hoveredDate, setHoveredDate] = useState(undefined);\n\n // Compute the preview range for hover effect\n const previewRange = usePreviewRange({\n selected,\n hoveredDate,\n excludeDisabled,\n min,\n max,\n disabled\n });\n const modifiers = useMemo(() => {\n return {\n preview: previewRange,\n preview_start: previewRange?.from,\n preview_end: previewRange?.to\n };\n }, [previewRange]);\n return /*#__PURE__*/_jsx(DayPicker, {\n ...COMMON_PROPS,\n ...localizationProps,\n ...props,\n mode: \"range\",\n numberOfMonths: clampNumberOfMonths(numberOfMonths),\n disabled: disabled,\n excludeDisabled: excludeDisabled,\n min: min,\n max: max,\n selected: selected ?? undefined,\n onSelect: setSelected,\n onDayMouseEnter: date => setHoveredDate(date),\n onDayMouseLeave: () => setHoveredDate(undefined),\n modifiers: modifiers,\n modifiersClassNames: MODIFIER_CLASSNAMES\n });\n};"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,gCAAgC;AACzC,SAAS,WAAW,8BAA8B;AAClD,SAAS,YAAY;AAIrB,SAAS,SAAS,UAAU,mBAAmB;AAI/C,SAAS,cAAc,2BAA2B;AAClD,SAAS,2BAA2B;AACpC,SAAS,0BAA0B;AACnC,SAAS,4BAA4B;AACrC,SAAS,OAAO,YAAY;AACrB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,SAAO,QAAQ,MAAM;AACnB,QAAI,CAAC,eAAe,CAAC,UAAU,MAAM;AACnC;AAAA,IACF;AACA,QAAI;AACJ,QAAI;AAGJ,QAAI,cAAc,SAAS,MAAM;AAC/B,yBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,IAAI,SAAS;AAAA,MACf;AACA,0BAAoB;AAAA,QAClB,MAAM;AAAA,QACN,IAAI,SAAS,MAAM,SAAS;AAAA,MAC9B;AAAA,IACF,WAAW,SAAS,MAAM,cAAc,SAAS,QAAQ,cAAc,SAAS,IAAI;AAElF,yBAAmB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;AAAA,EAC7D,GAAG,CAAC,QAAQ,CAAC;AACb,QAAM,CAAC,UAAU,WAAW,IAAI,mBAAmB;AAAA,IACjD,cAAc;AAAA,IACd,OAAO;AAAA,IACP;AAAA,EACF,CAAC;AACD,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,MAAS;AAGxD,QAAM,eAAe,gBAAgB;AAAA,IACnC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,YAAY,QAAQ,MAAM;AAC9B,WAAO;AAAA,MACL,SAAS;AAAA,MACT,eAAe,cAAc;AAAA,MAC7B,aAAa,cAAc;AAAA,IAC7B;AAAA,EACF,GAAG,CAAC,YAAY,CAAC;AACjB,SAAoB,qBAAK,WAAW;AAAA,IAClC,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,IACH,MAAM;AAAA,IACN,gBAAgB,oBAAoB,cAAc;AAAA,IAClD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU,YAAY;AAAA,IACtB,UAAU;AAAA,IACV,iBAAiB,UAAQ,eAAe,IAAI;AAAA,IAC5C,iBAAiB,MAAM,eAAe,MAAS;AAAA,IAC/C;AAAA,IACA,qBAAqB;AAAA,EACvB,CAAC;AACH;",
|
|
6
6
|
"names": ["selected", "modifiers"]
|
|
7
7
|
}
|
|
@@ -15,12 +15,11 @@ function useDeprecatedProps({
|
|
|
15
15
|
};
|
|
16
16
|
let computedElevation = elevation;
|
|
17
17
|
if (isElevated) {
|
|
18
|
-
var _computedElevation;
|
|
19
18
|
deprecated("Card isElevated prop", {
|
|
20
19
|
since: "5.9",
|
|
21
20
|
alternative: "elevation"
|
|
22
21
|
});
|
|
23
|
-
|
|
22
|
+
computedElevation ??= 2;
|
|
24
23
|
}
|
|
25
24
|
if (typeof computedElevation !== "undefined") {
|
|
26
25
|
propsToReturn.elevation = computedElevation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/card/card/hook.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../../context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nfunction useDeprecatedProps({\n elevation,\n isElevated,\n ...otherProps\n}) {\n const propsToReturn = {\n ...otherProps\n };\n let computedElevation = elevation;\n if (isElevated) {\n
|
|
5
|
-
"mappings": ";AAGA,OAAO,gBAAgB;AACvB,SAAS,eAAe;AAMxB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,YAAY,YAAY;AACxB,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,EACL;AACA,MAAI,oBAAoB;AACxB,MAAI,YAAY;AACd,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport { useContextSystem } from '../../context';\nimport { useSurface } from '../../surface';\nimport * as styles from '../styles';\nimport { useCx } from '../../utils/hooks/use-cx';\nfunction useDeprecatedProps({\n elevation,\n isElevated,\n ...otherProps\n}) {\n const propsToReturn = {\n ...otherProps\n };\n let computedElevation = elevation;\n if (isElevated) {\n deprecated('Card isElevated prop', {\n since: '5.9',\n alternative: 'elevation'\n });\n computedElevation ??= 2;\n }\n\n // The `elevation` prop should only be passed when it's not `undefined`,\n // otherwise it will override the value that gets derived from `useContextSystem`.\n if (typeof computedElevation !== 'undefined') {\n propsToReturn.elevation = computedElevation;\n }\n return propsToReturn;\n}\nexport function useCard(props) {\n const {\n className,\n elevation = 0,\n isBorderless = false,\n isRounded = true,\n size = 'medium',\n ...otherProps\n } = useContextSystem(useDeprecatedProps(props), 'Card');\n const cx = useCx();\n const classes = useMemo(() => {\n return cx(styles.Card, isBorderless && styles.boxShadowless, isRounded && styles.rounded, className);\n }, [className, cx, isBorderless, isRounded]);\n const surfaceProps = useSurface({\n ...otherProps,\n className: classes\n });\n return {\n ...surfaceProps,\n elevation,\n isBorderless,\n isRounded,\n size\n };\n}"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,gBAAgB;AACvB,SAAS,eAAe;AAMxB,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,YAAY,YAAY;AACxB,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,gBAAgB;AAAA,IACpB,GAAG;AAAA,EACL;AACA,MAAI,oBAAoB;AACxB,MAAI,YAAY;AACd,eAAW,wBAAwB;AAAA,MACjC,OAAO;AAAA,MACP,aAAa;AAAA,IACf,CAAC;AACD,0BAAsB;AAAA,EACxB;AAIA,MAAI,OAAO,sBAAsB,aAAa;AAC5C,kBAAc,YAAY;AAAA,EAC5B;AACA,SAAO;AACT;AACO,SAAS,QAAQ,OAAO;AAC7B,QAAM;AAAA,IACJ;AAAA,IACA,YAAY;AAAA,IACZ,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,GAAG;AAAA,EACL,IAAI,iBAAiB,mBAAmB,KAAK,GAAG,MAAM;AACtD,QAAM,KAAK,MAAM;AACjB,QAAM,UAAU,QAAQ,MAAM;AAC5B,WAAO,GAAU,aAAM,gBAAuB,sBAAe,aAAoB,gBAAS,SAAS;AAAA,EACrG,GAAG,CAAC,WAAW,IAAI,cAAc,SAAS,CAAC;AAC3C,QAAM,eAAe,WAAW;AAAA,IAC9B,GAAG;AAAA,IACH,WAAW;AAAA,EACb,CAAC;AACD,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -14,6 +14,7 @@ function UnforwardedOptionAsButton(props, forwardedRef) {
|
|
|
14
14
|
...additionalProps
|
|
15
15
|
} = props;
|
|
16
16
|
return /* @__PURE__ */ _jsx(Button, {
|
|
17
|
+
__next40pxDefaultSize: true,
|
|
17
18
|
...additionalProps,
|
|
18
19
|
"aria-pressed": isPressed,
|
|
19
20
|
ref: forwardedRef,
|
|
@@ -39,6 +40,7 @@ function UnforwardedOptionAsOption(props, forwardedRef) {
|
|
|
39
40
|
}, [isSelected, setActiveId, activeId, id]);
|
|
40
41
|
return /* @__PURE__ */ _jsx(Composite.Item, {
|
|
41
42
|
render: /* @__PURE__ */ _jsx(Button, {
|
|
43
|
+
__next40pxDefaultSize: true,
|
|
42
44
|
...additionalProps,
|
|
43
45
|
role: "option",
|
|
44
46
|
"aria-selected": !!isSelected,
|
|
@@ -64,7 +66,6 @@ function Option({
|
|
|
64
66
|
const commonProps = {
|
|
65
67
|
id,
|
|
66
68
|
className: "components-circular-option-picker__option",
|
|
67
|
-
__next40pxDefaultSize: true,
|
|
68
69
|
...additionalProps
|
|
69
70
|
};
|
|
70
71
|
const isListbox = setActiveId !== void 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/circular-option-picker/circular-option-picker-option.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,qBAAqB;AAC9B,SAAS,YAAY,YAAY,iBAAiB;AAClD,SAAS,MAAM,aAAa;AAK5B,SAAS,mCAAmC;AAC5C,OAAO,YAAY;AACnB,SAAS,iBAAiB;AAC1B,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,qBAAK,QAAQ;AAAA,IAC/B,GAAG;AAAA,IACH,gBAAgB;AAAA,IAChB,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AACA,IAAM,iBAAiB,WAAW,yBAAyB;AAC3D,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,WAAW,2BAA2B;AAC1C,YAAU,MAAM;AACd,QAAI,cAAc,CAAC,UAAU;AAI3B,aAAO,WAAW,MAAM,cAAc,EAAE,GAAG,CAAC;AAAA,IAC9C;AAAA,EACF,GAAG,CAAC,YAAY,aAAa,UAAU,EAAE,CAAC;AAC1C,SAAoB,qBAAK,UAAU,MAAM;AAAA,IACvC,QAAqB,qBAAK,QAAQ;AAAA,MAChC,GAAG;AAAA,MACH,MAAM;AAAA,MACN,iBAAiB,CAAC,CAAC;AAAA,MACnB,KAAK;AAAA,MACL;AAAA,IACF,CAAC;AAAA,IACD;AAAA,EACF,CAAC;AACH;AACA,IAAM,iBAAiB,WAAW,yBAAyB;AACpD,SAAS,OAAO;AAAA,EACrB;AAAA,EACA;AAAA,EACA,oBAAoB,CAAC;AAAA,EACrB;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,WAAW,2BAA2B;AAC1C,QAAM,KAAK,cAAc,QAAQ,UAAU,2CAA2C;AACtF,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useContext, useEffect } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport Button from '../button';\nimport { Composite } from '../composite';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedOptionAsButton(props, forwardedRef) {\n const {\n isPressed,\n label,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n \"aria-pressed\": isPressed,\n ref: forwardedRef,\n label: label\n });\n}\nconst OptionAsButton = forwardRef(UnforwardedOptionAsButton);\nfunction UnforwardedOptionAsOption(props, forwardedRef) {\n const {\n id,\n isSelected,\n label,\n ...additionalProps\n } = props;\n const {\n setActiveId,\n activeId\n } = useContext(CircularOptionPickerContext);\n useEffect(() => {\n if (isSelected && !activeId) {\n // The setTimeout call is necessary to make sure that this update\n // doesn't get overridden by `Composite`'s internal logic, which picks\n // an initial active item if one is not specifically set.\n window.setTimeout(() => setActiveId?.(id), 0);\n }\n }, [isSelected, setActiveId, activeId, id]);\n return /*#__PURE__*/_jsx(Composite.Item, {\n render: /*#__PURE__*/_jsx(Button, {\n __next40pxDefaultSize: true,\n ...additionalProps,\n role: \"option\",\n \"aria-selected\": !!isSelected,\n ref: forwardedRef,\n label: label\n }),\n id: id\n });\n}\nconst OptionAsOption = forwardRef(UnforwardedOptionAsOption);\nexport function Option({\n className,\n isSelected,\n selectedIconProps = {},\n tooltipText,\n ...additionalProps\n}) {\n const {\n baseId,\n setActiveId\n } = useContext(CircularOptionPickerContext);\n const id = useInstanceId(Option, baseId || 'components-circular-option-picker__option');\n const commonProps = {\n id,\n className: 'components-circular-option-picker__option',\n ...additionalProps\n };\n const isListbox = setActiveId !== undefined;\n const optionControl = isListbox ? /*#__PURE__*/_jsx(OptionAsOption, {\n ...commonProps,\n label: tooltipText,\n isSelected: isSelected\n }) : /*#__PURE__*/_jsx(OptionAsButton, {\n ...commonProps,\n label: tooltipText,\n isPressed: isSelected\n });\n return /*#__PURE__*/_jsxs(\"div\", {\n className: clsx(className, 'components-circular-option-picker__option-wrapper'),\n children: [optionControl, isSelected && /*#__PURE__*/_jsx(Icon, {\n icon: check,\n ...selectedIconProps\n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AA,IACJ;AAAA,IACA;AAAA,EACF,IAAI,WAAW,2BAA2B;AAC1C,QAAM,KAAK,cAAc,QAAQ,UAAU,2CAA2C;AACtF,QAAM,cAAc;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX,GAAG;AAAA,EACL;AACA,QAAM,YAAY,gBAAgB;AAClC,QAAM,gBAAgB,YAAyB,qBAAK,gBAAgB;AAAA,IAClE,GAAG;AAAA,IACH,OAAO;AAAA,IACP;AAAA,EACF,CAAC,IAAiB,qBAAK,gBAAgB;AAAA,IACrC,GAAG;AAAA,IACH,OAAO;AAAA,IACP,WAAW;AAAA,EACb,CAAC;AACD,SAAoB,sBAAM,OAAO;AAAA,IAC/B,WAAW,KAAK,WAAW,mDAAmD;AAAA,IAC9E,UAAU,CAAC,eAAe,cAA2B,qBAAK,MAAM;AAAA,MAC9D,MAAM;AAAA,MACN,GAAG;AAAA,IACL,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -95,6 +95,7 @@ CircularOptionPicker.Option = Option;
|
|
|
95
95
|
CircularOptionPicker.OptionGroup = OptionGroup;
|
|
96
96
|
CircularOptionPicker.ButtonAction = ButtonAction;
|
|
97
97
|
CircularOptionPicker.DropdownLinkAction = DropdownLinkAction;
|
|
98
|
+
CircularOptionPicker.displayName = "CircularOptionPicker";
|
|
98
99
|
var circular_option_picker_default = CircularOptionPicker;
|
|
99
100
|
export {
|
|
100
101
|
circular_option_picker_default as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/circular-option-picker/circular-option-picker.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nexport default CircularOptionPicker;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB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CAAC;AAAA,EACH,CAAC;AACH;AACA,SAAS,qBAAqB,OAAO;AACnC,QAAM;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT,SAAS;AAAA,IACT;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,SAAS,cAAc,sBAAsB,qCAAqC,gBAAgB,EAAE;AAC1G,QAAM,6BAA6B,YAAY,8BAA8B;AAC7E,QAAM,UAAU,cAA2B,qBAAK,OAAO;AAAA,IACrD,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC,IAAI;AACL,QAAM,UAAuB,qBAAK,OAAO;AAAA,IACvC,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC;AACD,SAAoB,qBAAK,4BAA4B;AAAA,IACnD,GAAG;AAAA,IACH;AAAA,IACA,WAAW,KAAK,qCAAqC,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,cAAc;AACnC,qBAAqB,eAAe;AACpC,qBAAqB,qBAAqB;AAC1C,IAAO,iCAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { useMemo, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CircularOptionPickerContext } from './circular-option-picker-context';\nimport { Composite } from '../composite';\nimport { Option } from './circular-option-picker-option';\nimport { OptionGroup } from './circular-option-picker-option-group';\nimport { ButtonAction, DropdownLinkAction } from './circular-option-picker-actions';\n\n/**\n *`CircularOptionPicker` is a component that displays a set of options as circular buttons.\n *\n * ```jsx\n * import { CircularOptionPicker } from '../circular-option-picker';\n * import { useState } from '@wordpress/element';\n *\n * const Example = () => {\n * \tconst [ currentColor, setCurrentColor ] = useState();\n * \tconst colors = [\n * \t\t{ color: '#f00', name: 'Red' },\n * \t\t{ color: '#0f0', name: 'Green' },\n * \t\t{ color: '#00f', name: 'Blue' },\n * \t];\n * \tconst colorOptions = (\n * \t\t<>\n * \t\t\t{ colors.map( ( { color, name }, index ) => {\n * \t\t\t\treturn (\n * \t\t\t\t\t<CircularOptionPicker.Option\n * \t\t\t\t\t\tkey={ `${ color }-${ index }` }\n * \t\t\t\t\t\ttooltipText={ name }\n * \t\t\t\t\t\tstyle={ { backgroundColor: color, color } }\n * \t\t\t\t\t\tisSelected={ index === currentColor }\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( index ) }\n * \t\t\t\t\t/>\n * \t\t\t\t);\n * \t\t\t} ) }\n * \t\t</>\n * \t);\n * \treturn (\n * \t\t<CircularOptionPicker\n * \t\t\t\toptions={ colorOptions }\n * \t\t\t\tactions={\n * \t\t\t\t\t<CircularOptionPicker.ButtonAction\n * \t\t\t\t\t\tonClick={ () => setCurrentColor( undefined ) }\n * \t\t\t\t\t>\n * \t\t\t\t\t\t{ 'Clear' }\n * \t\t\t\t\t</CircularOptionPicker.ButtonAction>\n * \t\t\t\t}\n * \t\t\t/>\n * \t);\n * };\n * ```\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction ListboxCircularOptionPicker(props) {\n const {\n actions,\n options,\n baseId,\n className,\n loop = true,\n children,\n ...additionalProps\n } = props;\n const [activeId, setActiveId] = useState(undefined);\n const contextValue = useMemo(() => ({\n baseId,\n activeId,\n setActiveId\n }), [baseId, activeId, setActiveId]);\n return /*#__PURE__*/_jsx(\"div\", {\n className: className,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [/*#__PURE__*/_jsx(Composite, {\n ...additionalProps,\n id: baseId,\n focusLoop: loop,\n rtl: isRTL(),\n role: \"listbox\",\n activeId: activeId,\n setActiveId: setActiveId,\n children: options\n }), children, actions]\n })\n });\n}\nfunction ButtonsCircularOptionPicker(props) {\n const {\n actions,\n options,\n children,\n baseId,\n ...additionalProps\n } = props;\n const contextValue = useMemo(() => ({\n baseId\n }), [baseId]);\n return /*#__PURE__*/_jsx(\"div\", {\n ...additionalProps,\n role: \"group\",\n id: baseId,\n children: /*#__PURE__*/_jsxs(CircularOptionPickerContext.Provider, {\n value: contextValue,\n children: [options, children, actions]\n })\n });\n}\nfunction CircularOptionPicker(props) {\n const {\n asButtons,\n actions: actionsProp,\n options: optionsProp,\n children,\n className,\n ...additionalProps\n } = props;\n const baseId = useInstanceId(CircularOptionPicker, 'components-circular-option-picker', additionalProps.id);\n const OptionPickerImplementation = asButtons ? ButtonsCircularOptionPicker : ListboxCircularOptionPicker;\n const actions = actionsProp ? /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__custom-clear-wrapper\",\n children: actionsProp\n }) : undefined;\n const options = /*#__PURE__*/_jsx(\"div\", {\n className: \"components-circular-option-picker__swatches\",\n children: optionsProp\n });\n return /*#__PURE__*/_jsx(OptionPickerImplementation, {\n ...additionalProps,\n baseId: baseId,\n className: clsx('components-circular-option-picker', className),\n actions: actions,\n options: options,\n children: children\n });\n}\nCircularOptionPicker.Option = Option;\nCircularOptionPicker.OptionGroup = OptionGroup;\nCircularOptionPicker.ButtonAction = ButtonAction;\nCircularOptionPicker.DropdownLinkAction = DropdownLinkAction;\nCircularOptionPicker.displayName = 'CircularOptionPicker';\nexport default CircularOptionPicker;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,aAAa;AACtB,SAAS,SAAS,gBAAgB;AAKlC,SAAS,mCAAmC;AAC5C,SAAS,iBAAiB;AAC1B,SAAS,cAAc;AACvB,SAAS,mBAAmB;AAC5B,SAAS,cAAc,0BAA0B;AA8CjD,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,4BAA4B,OAAO;AAC1C,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AA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W;AAAA,IACX,UAAU;AAAA,EACZ,CAAC,IAAI;AACL,QAAM,UAAuB,qBAAK,OAAO;AAAA,IACvC,WAAW;AAAA,IACX,UAAU;AAAA,EACZ,CAAC;AACD,SAAoB,qBAAK,4BAA4B;AAAA,IACnD,GAAG;AAAA,IACH;AAAA,IACA,WAAW,KAAK,qCAAqC,SAAS;AAAA,IAC9D;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AACA,qBAAqB,SAAS;AAC9B,qBAAqB,cAAc;AACnC,qBAAqB,eAAe;AACpC,qBAAqB,qBAAqB;AAC1C,qBAAqB,cAAc;AACnC,IAAO,iCAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -39,13 +39,17 @@ function ClipboardButton({
|
|
|
39
39
|
const focusOnCopyEventTarget = (event) => {
|
|
40
40
|
event.target.focus();
|
|
41
41
|
};
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
return (
|
|
43
|
+
// Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.
|
|
44
|
+
// eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop
|
|
45
|
+
/* @__PURE__ */ _jsx(Button, {
|
|
46
|
+
...buttonProps,
|
|
47
|
+
className: classes,
|
|
48
|
+
ref,
|
|
49
|
+
onCopy: focusOnCopyEventTarget,
|
|
50
|
+
children
|
|
51
|
+
})
|
|
52
|
+
);
|
|
49
53
|
}
|
|
50
54
|
export {
|
|
51
55
|
ClipboardButton as default
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/clipboard-button/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return /*#__PURE__
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,QAAQ,iBAAiB;AAClC,SAAS,0BAA0B;AACnC,OAAO,gBAAgB;AAKvB,OAAO,YAAY;AACnB,SAAS,OAAO,YAAY;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,aAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,eAAe,OAAO;AAC5B,QAAM,MAAM,mBAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,YAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,UAAU,KAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, useEffect } from '@wordpress/element';\nimport { useCopyToClipboard } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst TIMEOUT = 4000;\nexport default function ClipboardButton({\n className,\n children,\n onCopy,\n onFinishCopy,\n text,\n ...buttonProps\n}) {\n deprecated('wp.components.ClipboardButton', {\n since: '5.8',\n alternative: 'wp.compose.useCopyToClipboard'\n });\n const timeoutIdRef = useRef();\n const ref = useCopyToClipboard(text, () => {\n onCopy();\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n if (onFinishCopy) {\n timeoutIdRef.current = setTimeout(() => onFinishCopy(), TIMEOUT);\n }\n });\n useEffect(() => {\n return () => {\n if (timeoutIdRef.current) {\n clearTimeout(timeoutIdRef.current);\n }\n };\n }, []);\n const classes = clsx('components-clipboard-button', className);\n\n // Workaround for inconsistent behavior in Safari, where <textarea> is not\n // the document.activeElement at the moment when the copy event fires.\n // This causes documentHasSelection() in the copy-handler component to\n // mistakenly override the ClipboardButton, and copy a serialized string\n // of the current block instead.\n const focusOnCopyEventTarget = event => {\n // @ts-expect-error: Should be currentTarget, but not changing because this component is deprecated.\n event.target.focus();\n };\n return (\n /*#__PURE__*/\n // Disable reasons: the parent component takes care of the __next40pxDefaultSize prop.\n // eslint-disable-next-line @wordpress/components-no-missing-40px-size-prop\n _jsx(Button, {\n ...buttonProps,\n className: classes,\n ref: ref,\n onCopy: focusOnCopyEventTarget,\n children: children\n })\n );\n}"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAKjB,SAAS,QAAQ,iBAAiB;AAClC,SAAS,0BAA0B;AACnC,OAAO,gBAAgB;AAKvB,OAAO,YAAY;AACnB,SAAS,OAAO,YAAY;AAC5B,IAAM,UAAU;AACD,SAAR,gBAAiC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,aAAW,iCAAiC;AAAA,IAC1C,OAAO;AAAA,IACP,aAAa;AAAA,EACf,CAAC;AACD,QAAM,eAAe,OAAO;AAC5B,QAAM,MAAM,mBAAmB,MAAM,MAAM;AACzC,WAAO;AACP,QAAI,aAAa,SAAS;AACxB,mBAAa,aAAa,OAAO;AAAA,IACnC;AACA,QAAI,cAAc;AAChB,mBAAa,UAAU,WAAW,MAAM,aAAa,GAAG,OAAO;AAAA,IACjE;AAAA,EACF,CAAC;AACD,YAAU,MAAM;AACd,WAAO,MAAM;AACX,UAAI,aAAa,SAAS;AACxB,qBAAa,aAAa,OAAO;AAAA,MACnC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,CAAC;AACL,QAAM,UAAU,KAAK,+BAA+B,SAAS;AAO7D,QAAM,yBAAyB,WAAS;AAEtC,UAAM,OAAO,MAAM;AAAA,EACrB;AACA;AAAA;AAAA;AAAA,IAIE,qBAAK,QAAQ;AAAA,MACX,GAAG;AAAA,MACH,WAAW;AAAA,MACX;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,IACF,CAAC;AAAA;AAEL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -18,6 +18,7 @@ function UnforwardedColorIndicator(props, forwardedRef) {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
var ColorIndicator = forwardRef(UnforwardedColorIndicator);
|
|
21
|
+
ColorIndicator.displayName = "ColorIndicator";
|
|
21
22
|
var color_indicator_default = ColorIndicator;
|
|
22
23
|
export {
|
|
23
24
|
ColorIndicator,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/color-indicator/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nexport default ColorIndicator;"],
|
|
5
|
-
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,qBAAK,QAAQ;AAAA,IAC/B,WAAW,KAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,iBAAiB,WAAW,yBAAyB;AAClE,IAAO,0BAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction UnforwardedColorIndicator(props, forwardedRef) {\n const {\n className,\n colorValue,\n ...additionalProps\n } = props;\n return /*#__PURE__*/_jsx(\"span\", {\n className: clsx('component-color-indicator', className),\n style: {\n background: colorValue\n },\n ref: forwardedRef,\n ...additionalProps\n });\n}\n\n/**\n * ColorIndicator is a React component that renders a specific color in a\n * circle. It's often used to summarize a collection of used colors in a child\n * component.\n *\n * ```jsx\n * import { ColorIndicator } from '@wordpress/components';\n *\n * const MyColorIndicator = () => <ColorIndicator colorValue=\"#0073aa\" />;\n * ```\n */\nexport const ColorIndicator = forwardRef(UnforwardedColorIndicator);\nColorIndicator.displayName = 'ColorIndicator';\nexport default ColorIndicator;"],
|
|
5
|
+
"mappings": ";AAGA,OAAO,UAAU;AAIjB,SAAS,kBAAkB;AAK3B,SAAS,OAAO,YAAY;AAC5B,SAAS,0BAA0B,OAAO,cAAc;AACtD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,SAAoB,qBAAK,QAAQ;AAAA,IAC/B,WAAW,KAAK,6BAA6B,SAAS;AAAA,IACtD,OAAO;AAAA,MACL,YAAY;AAAA,IACd;AAAA,IACA,KAAK;AAAA,IACL,GAAG;AAAA,EACL,CAAC;AACH;AAaO,IAAM,iBAAiB,WAAW,yBAAyB;AAClE,eAAe,cAAc;AAC7B,IAAO,0BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/color-palette/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name\n }, index) => {\n const colordColor = colord(color);\n const isSelected = value === color;\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index)\n }, `${color}-${index}`);\n });\n }, [colors, value, onChange, clearColor]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n headingLevel\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(ColorHeading, {\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: newColor => onChange(newColor, index),\n value: value,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const paletteCommonProps = {\n clearColor,\n onChange,\n value\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nexport default ColorPalette;"],
|
|
5
|
-
"mappings": ";AAIA,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAC5B,SAAS,aAAa,SAAS,UAAU,kBAAkB;AAK3D,OAAO,cAAc;AACrB,SAAS,mBAAmB;AAC5B,OAAO,wBAAwB,iDAAiD;AAChF,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,4BAA4B;AACnC,SAAS,kCAAkC,wBAAwB,2BAA2B;AAC9F,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,OAAO,CAAC,aAAa,UAA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CAAc,qBAAK,UAAU;AAAA,UACrC,KAAK;AAAA,UACL,WAAW;AAAA,UACX,iBAAiB;AAAA,UACjB,iBAAiB;AAAA,UACjB,SAAS;AAAA,UACT,cAAc;AAAA,UACd,OAAO;AAAA,YACL,YAAY;AAAA,UACd;AAAA,UACA,MAAM;AAAA,QACR,CAAC,GAAgB,sBAAM,QAAQ;AAAA,UAC7B,WAAW;AAAA,UACX,SAAS;AAAA,UACT,UAAU,CAAc,qBAAK,UAAU;AAAA,YACrC,WAAW;AAAA,YACX,UAAU,QAAQ,kBAAkB,GAAG,mBAAmB;AAAA,UAC5D,CAAC,GAAgB,qBAAK,UAAU;AAAA,YAC9B,WAAW,KAAK,gDAAgD;AAAA,cAC9D,wDAAwD;AAAA,YAC1D,CAAC;AAAA,YACD,UAAU;AAAA,UACZ,CAAC,CAAC;AAAA,QACJ,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC,IAAI,OAAO,SAAS,KAAK,YAAyB,qBAAK,sBAAsB;AAAA,MAC5E,GAAG;AAAA,MACH,GAAG;AAAA,MACH;AAAA,MACA,SAAS,0BAAuC,qBAAK,kBAAkB;AAAA,QACrE,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,IAAiB,qBAAK,eAAe;AAAA,QACpC,GAAG;AAAA,QACH;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,IAAO,wBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo, useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Dropdown from '../dropdown';\nimport { ColorPicker } from '../color-picker';\nimport CircularOptionPicker, { getComputeCircularOptionPickerCommonProps } from '../circular-option-picker';\nimport { VStack } from '../v-stack';\nimport { Truncate } from '../truncate';\nimport { ColorHeading } from './styles';\nimport DropdownContentWrapper from '../dropdown/dropdown-content-wrapper';\nimport { extractColorNameFromCurrentValue, isMultiplePaletteArray, normalizeColorValue } from './utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nextend([namesPlugin, a11yPlugin]);\nfunction SinglePalette({\n className,\n clearColor,\n colors,\n onChange,\n value,\n ...additionalProps\n}) {\n const colorOptions = useMemo(() => {\n return colors.map(({\n color,\n name\n }, index) => {\n const colordColor = colord(color);\n const isSelected = value === color;\n return /*#__PURE__*/_jsx(CircularOptionPicker.Option, {\n isSelected: isSelected,\n selectedIconProps: isSelected ? {\n fill: colordColor.contrast() > colordColor.contrast('#000') ? '#fff' : '#000'\n } : {},\n tooltipText: name ||\n // translators: %s: color hex code e.g: \"#f00\".\n sprintf(__('Color code: %s'), color),\n style: {\n backgroundColor: color,\n color\n },\n onClick: isSelected ? clearColor : () => onChange(color, index)\n }, `${color}-${index}`);\n });\n }, [colors, value, onChange, clearColor]);\n return /*#__PURE__*/_jsx(CircularOptionPicker.OptionGroup, {\n className: className,\n options: colorOptions,\n ...additionalProps\n });\n}\nfunction MultiplePalettes({\n className,\n clearColor,\n colors,\n onChange,\n value,\n headingLevel\n}) {\n const instanceId = useInstanceId(MultiplePalettes, 'color-palette');\n if (colors.length === 0) {\n return null;\n }\n return /*#__PURE__*/_jsx(VStack, {\n spacing: 3,\n className: className,\n children: colors.map(({\n name,\n colors: colorPalette\n }, index) => {\n const id = `${instanceId}-${index}`;\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 2,\n children: [/*#__PURE__*/_jsx(ColorHeading, {\n id: id,\n level: headingLevel,\n children: name\n }), /*#__PURE__*/_jsx(SinglePalette, {\n clearColor: clearColor,\n colors: colorPalette,\n onChange: newColor => onChange(newColor, index),\n value: value,\n \"aria-labelledby\": id\n })]\n }, index);\n })\n });\n}\nexport function CustomColorPickerDropdown({\n isRenderedInSidebar,\n popoverProps: receivedPopoverProps,\n ...props\n}) {\n const popoverProps = useMemo(() => ({\n shift: true,\n // Disabling resize as it would otherwise cause the popover to show\n // scrollbars while dragging the color picker's handle close to the\n // popover edge.\n resize: false,\n ...(isRenderedInSidebar ? {\n // When in the sidebar: open to the left (stacking),\n // leaving the same gap as the parent popover.\n placement: 'left-start',\n offset: 34\n } : {\n // Default behavior: open below the anchor\n placement: 'bottom',\n offset: 8\n }),\n ...receivedPopoverProps\n }), [isRenderedInSidebar, receivedPopoverProps]);\n return /*#__PURE__*/_jsx(Dropdown, {\n contentClassName: \"components-color-palette__custom-color-dropdown-content\",\n popoverProps: popoverProps,\n ...props\n });\n}\nfunction UnforwardedColorPalette(props, forwardedRef) {\n const {\n asButtons,\n loop,\n clearable = true,\n colors = [],\n disableCustomColors = false,\n enableAlpha = false,\n onChange,\n value,\n __experimentalIsRenderedInSidebar = false,\n headingLevel = 2,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n ...additionalProps\n } = props;\n const [normalizedColorValue, setNormalizedColorValue] = useState(value);\n const clearColor = useCallback(() => onChange(undefined), [onChange]);\n const customColorPaletteCallbackRef = useCallback(node => {\n setNormalizedColorValue(normalizeColorValue(value, node));\n }, [value]);\n const hasMultipleColorOrigins = isMultiplePaletteArray(colors);\n const buttonLabelName = useMemo(() => extractColorNameFromCurrentValue(value, colors, hasMultipleColorOrigins), [value, colors, hasMultipleColorOrigins]);\n const renderCustomColorPicker = () => /*#__PURE__*/_jsx(DropdownContentWrapper, {\n paddingSize: \"none\",\n children: /*#__PURE__*/_jsx(ColorPicker, {\n color: normalizedColorValue,\n onChange: color => onChange(color),\n enableAlpha: enableAlpha\n })\n });\n const isHex = value?.startsWith('#');\n\n // Leave hex values as-is. Remove the `var()` wrapper from CSS vars.\n const displayValue = value?.replace(/^var\\((.+)\\)$/, '$1');\n const customColorAccessibleLabel = !!displayValue ? sprintf(\n // translators: 1: The name of the color e.g: \"vivid red\". 2: The color's hex code e.g: \"#f00\".\n __('Custom color picker. The currently selected color is called \"%1$s\" and has a value of \"%2$s\".'), buttonLabelName, displayValue) : __('Custom color picker');\n const paletteCommonProps = {\n clearColor,\n onChange,\n value\n };\n const actions = !!clearable && /*#__PURE__*/_jsx(CircularOptionPicker.ButtonAction, {\n onClick: clearColor,\n accessibleWhenDisabled: true,\n disabled: !value,\n children: __('Clear')\n });\n const {\n metaProps,\n labelProps\n } = getComputeCircularOptionPickerCommonProps(asButtons, loop, ariaLabel, ariaLabelledby);\n return /*#__PURE__*/_jsxs(VStack, {\n spacing: 3,\n ref: forwardedRef,\n ...additionalProps,\n children: [!disableCustomColors && /*#__PURE__*/_jsx(CustomColorPickerDropdown, {\n isRenderedInSidebar: __experimentalIsRenderedInSidebar,\n renderContent: renderCustomColorPicker,\n renderToggle: ({\n isOpen,\n onToggle\n }) => /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-wrapper\",\n spacing: 0,\n children: [/*#__PURE__*/_jsx(\"button\", {\n ref: customColorPaletteCallbackRef,\n className: \"components-color-palette__custom-color-button\",\n \"aria-expanded\": isOpen,\n \"aria-haspopup\": \"true\",\n onClick: onToggle,\n \"aria-label\": customColorAccessibleLabel,\n style: {\n background: value\n },\n type: \"button\"\n }), /*#__PURE__*/_jsxs(VStack, {\n className: \"components-color-palette__custom-color-text-wrapper\",\n spacing: 0.5,\n children: [/*#__PURE__*/_jsx(Truncate, {\n className: \"components-color-palette__custom-color-name\",\n children: value ? buttonLabelName : __('No color selected')\n }), /*#__PURE__*/_jsx(Truncate, {\n className: clsx('components-color-palette__custom-color-value', {\n 'components-color-palette__custom-color-value--is-hex': isHex\n }),\n children: displayValue\n })]\n })]\n })\n }), (colors.length > 0 || actions) && /*#__PURE__*/_jsx(CircularOptionPicker, {\n ...metaProps,\n ...labelProps,\n actions: actions,\n options: hasMultipleColorOrigins ? /*#__PURE__*/_jsx(MultiplePalettes, {\n ...paletteCommonProps,\n headingLevel: headingLevel,\n colors: colors,\n value: value\n }) : /*#__PURE__*/_jsx(SinglePalette, {\n ...paletteCommonProps,\n colors: colors,\n value: value\n })\n })]\n });\n}\n\n/**\n * Allows the user to pick a color from a list of pre-defined color entries.\n *\n * ```jsx\n * import { ColorPalette } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyColorPalette = () => {\n * const [ color, setColor ] = useState ( '#f00' )\n * const colors = [\n * { name: 'red', color: '#f00' },\n * { name: 'white', color: '#fff' },\n * { name: 'blue', color: '#00f' },\n * ];\n * return (\n * <ColorPalette\n * colors={ colors }\n * value={ color }\n * onChange={ ( color ) => setColor( color ) }\n * />\n * );\n * } );\n * ```\n */\nexport const ColorPalette = forwardRef(UnforwardedColorPalette);\nColorPalette.displayName = 'ColorPalette';\nexport default ColorPalette;"],
|
|
5
|
+
"mappings": ";AAIA,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,UAAU;AAKjB,SAAS,qBAAqB;AAC9B,SAAS,IAAI,eAAe;AAC5B,SAAS,aAAa,SAAS,UAAU,kBAAkB;AAK3D,OAAO,cAAc;AACrB,SAAS,mBAAmB;AAC5B,OAAO,wBAAwB,iDAAiD;AAChF,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,OAAO,4BAA4B;AACnC,SAAS,kCAAkC,wBAAwB,2BAA2B;AAC9F,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,OAAO,CAAC,aAAa,UAAU,CAAC;AAChC,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAG;AACD,QAAM,eAAe,QAAQ,MAAM;AACjC,WAAO,OAAO,IAAI,CAAC;AA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;AAAA,UACA,MAAM;AAAA,QACR,CAAC,GAAgB,sBAAM,QAAQ;AAAA,UAC7B,WAAW;AAAA,UACX,SAAS;AAAA,UACT,UAAU,CAAc,qBAAK,UAAU;AAAA,YACrC,WAAW;AAAA,YACX,UAAU,QAAQ,kBAAkB,GAAG,mBAAmB;AAAA,UAC5D,CAAC,GAAgB,qBAAK,UAAU;AAAA,YAC9B,WAAW,KAAK,gDAAgD;AAAA,cAC9D,wDAAwD;AAAA,YAC1D,CAAC;AAAA,YACD,UAAU;AAAA,UACZ,CAAC,CAAC;AAAA,QACJ,CAAC,CAAC;AAAA,MACJ,CAAC;AAAA,IACH,CAAC,IAAI,OAAO,SAAS,KAAK,YAAyB,qBAAK,sBAAsB;AAAA,MAC5E,GAAG;AAAA,MACH,GAAG;AAAA,MACH;AAAA,MACA,SAAS,0BAAuC,qBAAK,kBAAkB;AAAA,QACrE,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,MACF,CAAC,IAAiB,qBAAK,eAAe;AAAA,QACpC,GAAG;AAAA,QACH;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,CAAC,CAAC;AAAA,EACJ,CAAC;AACH;AA0BO,IAAM,eAAe,WAAW,uBAAuB;AAC9D,aAAa,cAAc;AAC3B,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -5,8 +5,8 @@ import a11yPlugin from "colord/plugins/a11y";
|
|
|
5
5
|
import { __ } from "@wordpress/i18n";
|
|
6
6
|
extend([namesPlugin, a11yPlugin]);
|
|
7
7
|
var isSimpleCSSColor = (value) => {
|
|
8
|
-
const valueIsCssVariable = /var\(/.test(value
|
|
9
|
-
const valueIsColorMix = /color-mix\(/.test(value
|
|
8
|
+
const valueIsCssVariable = /var\(/.test(value ?? "");
|
|
9
|
+
const valueIsColorMix = /color-mix\(/.test(value ?? "");
|
|
10
10
|
return !valueIsCssVariable && !valueIsColorMix;
|
|
11
11
|
};
|
|
12
12
|
var extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/color-palette/utils.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nextend([namesPlugin, a11yPlugin]);\n\n/**\n * Checks if a color value is a simple CSS color.\n *\n * @param value The color value to check.\n * @return A boolean indicating whether the color value is a simple CSS color.\n */\nconst isSimpleCSSColor = value => {\n const valueIsCssVariable = /var\\(/.test(value
|
|
5
|
-
"mappings": ";AAGA,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AAKvB,SAAS,UAAU;AAMnB,OAAO,CAAC,aAAa,UAAU,CAAC;AAQhC,IAAM,mBAAmB,WAAS;AAChC,QAAM,qBAAqB,QAAQ,KAAK,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport { colord, extend } from 'colord';\nimport namesPlugin from 'colord/plugins/names';\nimport a11yPlugin from 'colord/plugins/a11y';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\n\nextend([namesPlugin, a11yPlugin]);\n\n/**\n * Checks if a color value is a simple CSS color.\n *\n * @param value The color value to check.\n * @return A boolean indicating whether the color value is a simple CSS color.\n */\nconst isSimpleCSSColor = value => {\n const valueIsCssVariable = /var\\(/.test(value ?? '');\n const valueIsColorMix = /color-mix\\(/.test(value ?? '');\n return !valueIsCssVariable && !valueIsColorMix;\n};\nexport const extractColorNameFromCurrentValue = (currentValue, colors = [], showMultiplePalettes = false) => {\n if (!currentValue) {\n return '';\n }\n const currentValueIsSimpleColor = currentValue ? isSimpleCSSColor(currentValue) : false;\n const normalizedCurrentValue = currentValueIsSimpleColor ? colord(currentValue).toHex() : currentValue;\n\n // Normalize format of `colors` to simplify the following loop\n\n const colorPalettes = showMultiplePalettes ? colors : [{\n colors: colors\n }];\n for (const {\n colors: paletteColors\n } of colorPalettes) {\n for (const {\n name: colorName,\n color: colorValue\n } of paletteColors) {\n const normalizedColorValue = currentValueIsSimpleColor ? colord(colorValue).toHex() : colorValue;\n if (normalizedCurrentValue === normalizedColorValue) {\n return colorName;\n }\n }\n }\n\n // translators: shown when the user has picked a custom color (i.e not in the palette of colors).\n return __('Custom');\n};\n\n// The PaletteObject type has a `colors` property (an array of ColorObject),\n// while the ColorObject type has a `color` property (the CSS color value).\nexport const isMultiplePaletteObject = obj => Array.isArray(obj.colors) && !('color' in obj);\nexport const isMultiplePaletteArray = arr => {\n return arr.length > 0 && arr.every(colorObj => isMultiplePaletteObject(colorObj));\n};\n\n/**\n * Transform a CSS variable used as background color into the color value itself.\n *\n * @param value The color value that may be a CSS variable.\n * @param element The element for which to get the computed style.\n * @return The background color value computed from a element.\n */\nexport const normalizeColorValue = (value, element) => {\n if (!value || !element || isSimpleCSSColor(value)) {\n return value;\n }\n const {\n ownerDocument\n } = element;\n const {\n defaultView\n } = ownerDocument;\n const computedBackgroundColor = defaultView?.getComputedStyle(element).backgroundColor;\n return computedBackgroundColor ? colord(computedBackgroundColor).toHex() : value;\n};"],
|
|
5
|
+
"mappings": ";AAGA,SAAS,QAAQ,cAAc;AAC/B,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AAKvB,SAAS,UAAU;AAMnB,OAAO,CAAC,aAAa,UAAU,CAAC;AAQhC,IAAM,mBAAmB,WAAS;AAChC,QAAM,qBAAqB,QAAQ,KAAK,SAAS,EAAE;AACnD,QAAM,kBAAkB,cAAc,KAAK,SAAS,EAAE;AACtD,SAAO,CAAC,sBAAsB,CAAC;AACjC;AACO,IAAM,mCAAmC,CAAC,cAAc,SAAS,CAAC,GAAG,uBAAuB,UAAU;AAC3G,MAAI,CAAC,cAAc;AACjB,WAAO;AAAA,EACT;AACA,QAAM,4BAA4B,eAAe,iBAAiB,YAAY,IAAI;AAClF,QAAM,yBAAyB,4BAA4B,OAAO,YAAY,EAAE,MAAM,IAAI;AAI1F,QAAM,gBAAgB,uBAAuB,SAAS,CAAC;AAAA,IACrD;AAAA,EACF,CAAC;AACD,aAAW;AAAA,IACT,QAAQ;AAAA,EACV,KAAK,eAAe;AAClB,eAAW;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,IACT,KAAK,eAAe;AAClB,YAAM,uBAAuB,4BAA4B,OAAO,UAAU,EAAE,MAAM,IAAI;AACtF,UAAI,2BAA2B,sBAAsB;AACnD,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAGA,SAAO,GAAG,QAAQ;AACpB;AAIO,IAAM,0BAA0B,SAAO,MAAM,QAAQ,IAAI,MAAM,KAAK,EAAE,WAAW;AACjF,IAAM,yBAAyB,SAAO;AAC3C,SAAO,IAAI,SAAS,KAAK,IAAI,MAAM,cAAY,wBAAwB,QAAQ,CAAC;AAClF;AASO,IAAM,sBAAsB,CAAC,OAAO,YAAY;AACrD,MAAI,CAAC,SAAS,CAAC,WAAW,iBAAiB,KAAK,GAAG;AACjD,WAAO;AAAA,EACT;AACA,QAAM;AAAA,IACJ;AAAA,EACF,IAAI;AACJ,QAAM;AAAA,IACJ;AAAA,EACF,IAAI;AACJ,QAAM,0BAA0B,aAAa,iBAAiB,OAAO,EAAE;AACvE,SAAO,0BAA0B,OAAO,uBAAuB,EAAE,MAAM,IAAI;AAC7E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,7 +21,7 @@ import Spinner from "../spinner/index.mjs";
|
|
|
21
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
var noop = () => {
|
|
23
23
|
};
|
|
24
|
-
var DetectOutside = withFocusOutside(class extends Component {
|
|
24
|
+
var DetectOutside = withFocusOutside(class DetectOutsideComponent extends Component {
|
|
25
25
|
handleFocusOutside(event) {
|
|
26
26
|
this.props.onFocusOutside(event);
|
|
27
27
|
}
|
|
@@ -31,7 +31,6 @@ var DetectOutside = withFocusOutside(class extends Component {
|
|
|
31
31
|
});
|
|
32
32
|
var getIndexOfMatchingSuggestion = (selectedSuggestion, matchingSuggestions) => selectedSuggestion === null ? -1 : matchingSuggestions.indexOf(selectedSuggestion);
|
|
33
33
|
function ComboboxControl(props) {
|
|
34
|
-
var _currentOption$label;
|
|
35
34
|
const {
|
|
36
35
|
__next40pxDefaultSize = false,
|
|
37
36
|
value: valueProp,
|
|
@@ -56,7 +55,7 @@ function ComboboxControl(props) {
|
|
|
56
55
|
onChange: onChangeProp
|
|
57
56
|
});
|
|
58
57
|
const currentOption = options.find((option) => option.value === value);
|
|
59
|
-
const currentLabel =
|
|
58
|
+
const currentLabel = currentOption?.label ?? "";
|
|
60
59
|
const instanceId = useInstanceId(ComboboxControl, "combobox-control");
|
|
61
60
|
const [selectedSuggestion, setSelectedSuggestion] = useState(currentOption || null);
|
|
62
61
|
const [isExpanded, setIsExpanded] = useState(false);
|