@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
|
@@ -47,7 +47,7 @@ function KeyboardShortcuts({
|
|
|
47
47
|
eventName
|
|
48
48
|
}) {
|
|
49
49
|
const target = (0, import_element.useRef)(null);
|
|
50
|
-
const element = Object.entries(shortcuts
|
|
50
|
+
const element = Object.entries(shortcuts ?? {}).map(([shortcut, callback]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(KeyboardShortcut, {
|
|
51
51
|
shortcut,
|
|
52
52
|
callback,
|
|
53
53
|
bindGlobal,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/keyboard-shortcuts/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction KeyboardShortcut({\n target,\n callback,\n shortcut,\n bindGlobal,\n eventName\n}) {\n useKeyboardShortcut(shortcut, callback, {\n bindGlobal,\n target,\n eventName\n });\n return null;\n}\n\n/**\n * `KeyboardShortcuts` is a component which handles keyboard sequences during the lifetime of the rendering element.\n *\n * When passed children, it will capture key events which occur on or within the children. If no children are passed, events are captured on the document.\n *\n * It uses the [Mousetrap](https://craig.is/killing/mice) library to implement keyboard sequence bindings.\n *\n * ```jsx\n * import { KeyboardShortcuts } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyKeyboardShortcuts = () => {\n * \tconst [ isAllSelected, setIsAllSelected ] = useState( false );\n * \tconst selectAll = () => {\n * \t\tsetIsAllSelected( true );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t<KeyboardShortcuts\n * \t\t\t\tshortcuts={ {\n * \t\t\t\t\t'mod+a': selectAll,\n * \t\t\t\t} }\n * \t\t\t/>\n * \t\t\t[cmd/ctrl + A] Combination pressed? { isAllSelected ? 'Yes' : 'No' }\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction KeyboardShortcuts({\n children,\n shortcuts,\n bindGlobal,\n eventName\n}) {\n const target = useRef(null);\n const element = Object.entries(shortcuts
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAiC;AACjC,qBAAoC;AAKpC,yBAAkE;AAClE,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,0CAAoB,UAAU,UAAU;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAgCA,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,aAAS,uBAAO,IAAI;AAC1B,QAAM,UAAU,OAAO,QAAQ,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction KeyboardShortcut({\n target,\n callback,\n shortcut,\n bindGlobal,\n eventName\n}) {\n useKeyboardShortcut(shortcut, callback, {\n bindGlobal,\n target,\n eventName\n });\n return null;\n}\n\n/**\n * `KeyboardShortcuts` is a component which handles keyboard sequences during the lifetime of the rendering element.\n *\n * When passed children, it will capture key events which occur on or within the children. If no children are passed, events are captured on the document.\n *\n * It uses the [Mousetrap](https://craig.is/killing/mice) library to implement keyboard sequence bindings.\n *\n * ```jsx\n * import { KeyboardShortcuts } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyKeyboardShortcuts = () => {\n * \tconst [ isAllSelected, setIsAllSelected ] = useState( false );\n * \tconst selectAll = () => {\n * \t\tsetIsAllSelected( true );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t<KeyboardShortcuts\n * \t\t\t\tshortcuts={ {\n * \t\t\t\t\t'mod+a': selectAll,\n * \t\t\t\t} }\n * \t\t\t/>\n * \t\t\t[cmd/ctrl + A] Combination pressed? { isAllSelected ? 'Yes' : 'No' }\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction KeyboardShortcuts({\n children,\n shortcuts,\n bindGlobal,\n eventName\n}) {\n const target = useRef(null);\n const element = Object.entries(shortcuts ?? {}).map(([shortcut, callback]) => /*#__PURE__*/_jsx(KeyboardShortcut, {\n shortcut: shortcut,\n callback: callback,\n bindGlobal: bindGlobal,\n eventName: eventName,\n target: target\n }, shortcut));\n\n // Render as non-visual if there are no children pressed. Keyboard\n // events will be bound to the document instead.\n if (!Children.count(children)) {\n return /*#__PURE__*/_jsx(_Fragment, {\n children: element\n });\n }\n return /*#__PURE__*/_jsxs(\"div\", {\n ref: target,\n children: [element, children]\n });\n}\nexport default KeyboardShortcuts;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,qBAAiC;AACjC,qBAAoC;AAKpC,yBAAkE;AAClE,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,0CAAoB,UAAU,UAAU;AAAA,IACtC;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,SAAO;AACT;AAgCA,SAAS,kBAAkB;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG;AACD,QAAM,aAAS,uBAAO,IAAI;AAC1B,QAAM,UAAU,OAAO,QAAQ,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,UAAU,QAAQ,MAAmB,uCAAAA,KAAK,kBAAkB;AAAA,IAChH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAAG,QAAQ,CAAC;AAIZ,MAAI,CAAC,wBAAS,MAAM,QAAQ,GAAG;AAC7B,WAAoB,uCAAAA,KAAK,mBAAAC,UAAW;AAAA,MAClC,UAAU;AAAA,IACZ,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,OAAO;AAAA,IAC/B,KAAK;AAAA,IACL,UAAU,CAAC,SAAS,QAAQ;AAAA,EAC9B,CAAC;AACH;AACA,IAAO,6BAAQ;",
|
|
6
6
|
"names": ["_jsx", "_Fragment", "_jsxs"]
|
|
7
7
|
}
|
package/build/menu/index.cjs
CHANGED
|
@@ -63,7 +63,7 @@ var UnconnectedMenu = (props) => {
|
|
|
63
63
|
} = (0, import_context.useContextSystem)(props, "Menu");
|
|
64
64
|
const parentContext = (0, import_element.useContext)(import_context2.Context);
|
|
65
65
|
const rtl = (0, import_i18n.isRTL)();
|
|
66
|
-
let computedPlacement = placement
|
|
66
|
+
let computedPlacement = placement ?? (parentContext?.store ? "right-start" : "bottom-start");
|
|
67
67
|
if (rtl) {
|
|
68
68
|
if (/right/.test(computedPlacement)) {
|
|
69
69
|
computedPlacement = computedPlacement.replace("right", "left");
|
package/build/menu/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/menu/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo } from '@wordpress/element';\nimport { isRTL as isRTLFn } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnectWithoutRef } from '../context';\nimport { Context } from './context';\nimport { Item } from './item';\nimport { CheckboxItem } from './checkbox-item';\nimport { RadioItem } from './radio-item';\nimport { Group } from './group';\nimport { GroupLabel } from './group-label';\nimport { Separator } from './separator';\nimport { ItemLabel } from './item-label';\nimport { ItemHelpText } from './item-help-text';\nimport { TriggerButton } from './trigger-button';\nimport { SubmenuTriggerItem } from './submenu-trigger-item';\nimport { Popover } from './popover';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst UnconnectedMenu = props => {\n const {\n children,\n defaultOpen = false,\n open,\n onOpenChange,\n placement,\n // From internal components context\n variant\n } = useContextSystem(props, 'Menu');\n const parentContext = useContext(Context);\n const rtl = isRTLFn();\n\n // If an explicit value for the `placement` prop is not passed,\n // apply a default placement of `bottom-start` for the root menu popover,\n // and of `right-start` for nested menu popovers.\n let computedPlacement = placement
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAAoC;AACpC,kBAAiC;AAKjC,qBAA2D;AAC3D,IAAAA,kBAAwB;AACxB,kBAAqB;AACrB,2BAA6B;AAC7B,wBAA0B;AAC1B,mBAAsB;AACtB,yBAA2B;AAC3B,uBAA0B;AAC1B,wBAA0B;AAC1B,4BAA6B;AAC7B,4BAA8B;AAC9B,kCAAmC;AACnC,qBAAwB;AACxB,yBAA4B;AAC5B,IAAM,kBAAkB,WAAS;AAC/B,QAAM;AAAA,IACJ;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,EACF,QAAI,iCAAiB,OAAO,MAAM;AAClC,QAAM,oBAAgB,2BAAW,uBAAO;AACxC,QAAM,UAAM,YAAAC,OAAQ;AAKpB,MAAI,oBAAoB,cAAc,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo } from '@wordpress/element';\nimport { isRTL as isRTLFn } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, contextConnectWithoutRef } from '../context';\nimport { Context } from './context';\nimport { Item } from './item';\nimport { CheckboxItem } from './checkbox-item';\nimport { RadioItem } from './radio-item';\nimport { Group } from './group';\nimport { GroupLabel } from './group-label';\nimport { Separator } from './separator';\nimport { ItemLabel } from './item-label';\nimport { ItemHelpText } from './item-help-text';\nimport { TriggerButton } from './trigger-button';\nimport { SubmenuTriggerItem } from './submenu-trigger-item';\nimport { Popover } from './popover';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst UnconnectedMenu = props => {\n const {\n children,\n defaultOpen = false,\n open,\n onOpenChange,\n placement,\n // From internal components context\n variant\n } = useContextSystem(props, 'Menu');\n const parentContext = useContext(Context);\n const rtl = isRTLFn();\n\n // If an explicit value for the `placement` prop is not passed,\n // apply a default placement of `bottom-start` for the root menu popover,\n // and of `right-start` for nested menu popovers.\n let computedPlacement = placement ?? (parentContext?.store ? 'right-start' : 'bottom-start');\n // Swap left/right in case of RTL direction\n if (rtl) {\n if (/right/.test(computedPlacement)) {\n computedPlacement = computedPlacement.replace('right', 'left');\n } else if (/left/.test(computedPlacement)) {\n computedPlacement = computedPlacement.replace('left', 'right');\n }\n }\n const menuStore = Ariakit.useMenuStore({\n parent: parentContext?.store,\n open,\n defaultOpen,\n placement: computedPlacement,\n focusLoop: true,\n setOpen(willBeOpen) {\n onOpenChange?.(willBeOpen);\n },\n rtl\n });\n const contextValue = useMemo(() => ({\n store: menuStore,\n variant\n }), [menuStore, variant]);\n return /*#__PURE__*/_jsx(Context.Provider, {\n value: contextValue,\n children: children\n });\n};\n\n/**\n * Menu is a collection of React components that combine to render\n * ARIA-compliant [menu](https://www.w3.org/WAI/ARIA/apg/patterns/menu/) and\n * [menu button](https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/) patterns.\n *\n * `Menu` itself is a wrapper component and context provider.\n * It is responsible for managing the state of the menu and its items, and for\n * rendering the `Menu.TriggerButton` (or the `Menu.SubmenuTriggerItem`)\n * component, and the `Menu.Popover` component.\n */\nexport const Menu = Object.assign(contextConnectWithoutRef(UnconnectedMenu, 'Menu'), {\n Context: Object.assign(Context, {\n displayName: 'Menu.Context'\n }),\n /**\n * Renders a menu item inside the `Menu.Popover` or `Menu.Group` components.\n *\n * It can optionally contain one instance of the `Menu.ItemLabel` component\n * and one instance of the `Menu.ItemHelpText` component.\n */\n Item: Object.assign(Item, {\n displayName: 'Menu.Item'\n }),\n /**\n * Renders a radio menu item inside the `Menu.Popover` or `Menu.Group`\n * components.\n *\n * It can optionally contain one instance of the `Menu.ItemLabel` component\n * and one instance of the `Menu.ItemHelpText` component.\n */\n RadioItem: Object.assign(RadioItem, {\n displayName: 'Menu.RadioItem'\n }),\n /**\n * Renders a checkbox menu item inside the `Menu.Popover` or `Menu.Group`\n * components.\n *\n * It can optionally contain one instance of the `Menu.ItemLabel` component\n * and one instance of the `Menu.ItemHelpText` component.\n */\n CheckboxItem: Object.assign(CheckboxItem, {\n displayName: 'Menu.CheckboxItem'\n }),\n /**\n * Renders a group for menu items.\n *\n * It should contain one instance of `Menu.GroupLabel` and one or more\n * instances of `Menu.Item`, `Menu.RadioItem`, or `Menu.CheckboxItem`.\n */\n Group: Object.assign(Group, {\n displayName: 'Menu.Group'\n }),\n /**\n * Renders a label in a menu group.\n *\n * This component should be wrapped with `Menu.Group` so the\n * `aria-labelledby` is correctly set on the group element.\n */\n GroupLabel: Object.assign(GroupLabel, {\n displayName: 'Menu.GroupLabel'\n }),\n /**\n * Renders a divider between menu items or menu groups.\n */\n Separator: Object.assign(Separator, {\n displayName: 'Menu.Separator'\n }),\n /**\n * Renders a menu item's label text. It should be wrapped with `Menu.Item`,\n * `Menu.RadioItem`, or `Menu.CheckboxItem`.\n */\n ItemLabel: Object.assign(ItemLabel, {\n displayName: 'Menu.ItemLabel'\n }),\n /**\n * Renders a menu item's help text. It should be wrapped with `Menu.Item`,\n * `Menu.RadioItem`, or `Menu.CheckboxItem`.\n */\n ItemHelpText: Object.assign(ItemHelpText, {\n displayName: 'Menu.ItemHelpText'\n }),\n /**\n * Renders a dropdown menu element that's controlled by a sibling\n * `Menu.TriggerButton` component. It renders a popover and automatically\n * focuses on items when the menu is shown.\n *\n * The only valid children of `Menu.Popover` are `Menu.Item`,\n * `Menu.RadioItem`, `Menu.CheckboxItem`, `Menu.Group`, `Menu.Separator`,\n * and `Menu` (for nested dropdown menus).\n */\n Popover: Object.assign(Popover, {\n displayName: 'Menu.Popover'\n }),\n /**\n * Renders a menu button that toggles the visibility of a sibling\n * `Menu.Popover` component when clicked or when using arrow keys.\n */\n TriggerButton: Object.assign(TriggerButton, {\n displayName: 'Menu.TriggerButton'\n }),\n /**\n * Renders a menu item that toggles the visibility of a sibling\n * `Menu.Popover` component when clicked or when using arrow keys.\n *\n * This component is used to create a nested dropdown menu.\n */\n SubmenuTriggerItem: Object.assign(SubmenuTriggerItem, {\n displayName: 'Menu.SubmenuTriggerItem'\n })\n});\nexport default Menu;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAAoC;AACpC,kBAAiC;AAKjC,qBAA2D;AAC3D,IAAAA,kBAAwB;AACxB,kBAAqB;AACrB,2BAA6B;AAC7B,wBAA0B;AAC1B,mBAAsB;AACtB,yBAA2B;AAC3B,uBAA0B;AAC1B,wBAA0B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;AAAA,EAQD,WAAW,OAAO,OAAO,6BAAW;AAAA,IAClC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQD,cAAc,OAAO,OAAO,mCAAc;AAAA,IACxC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOD,OAAO,OAAO,OAAO,oBAAO;AAAA,IAC1B,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOD,YAAY,OAAO,OAAO,+BAAY;AAAA,IACpC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA,EAID,WAAW,OAAO,OAAO,4BAAW;AAAA,IAClC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKD,WAAW,OAAO,OAAO,6BAAW;AAAA,IAClC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKD,cAAc,OAAO,OAAO,oCAAc;AAAA,IACxC,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUD,SAAS,OAAO,OAAO,wBAAS;AAAA,IAC9B,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,EAKD,eAAe,OAAO,OAAO,qCAAe;AAAA,IAC1C,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOD,oBAAoB,OAAO,OAAO,gDAAoB;AAAA,IACpD,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AACD,IAAO,eAAQ;",
|
|
6
6
|
"names": ["import_context", "isRTLFn", "_jsx"]
|
|
7
7
|
}
|
package/build/menu/item.cjs
CHANGED
|
@@ -50,7 +50,7 @@ var Item2 = (0, import_element.forwardRef)(function Item3({
|
|
|
50
50
|
if (!menuContext?.store) {
|
|
51
51
|
throw new Error("Menu.Item can only be rendered inside a Menu component");
|
|
52
52
|
}
|
|
53
|
-
const computedStore = store
|
|
53
|
+
const computedStore = store ?? menuContext.store;
|
|
54
54
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Styled.Item, {
|
|
55
55
|
ref,
|
|
56
56
|
...props,
|
package/build/menu/item.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/menu/item.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { Context } from './context';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const Item = forwardRef(function Item({\n prefix,\n suffix,\n children,\n disabled = false,\n hideOnClick = true,\n store,\n ...props\n}, ref) {\n const menuContext = useContext(Context);\n if (!menuContext?.store) {\n throw new Error('Menu.Item can only be rendered inside a Menu component');\n }\n\n // In most cases, the menu store will be retrieved from context (ie. the store\n // created by the top-level menu component). But in rare cases (ie.\n // `Menu.SubmenuTriggerItem`), the context store wouldn't be correct. This is\n // why the component accepts a `store` prop to override the context store.\n const computedStore = store
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;AAGA,qBAAuC;AAMvC,aAAwB;AACxB,qBAAwB;AACxB,yBAA2C;AACpC,IAAMA,YAAO,2BAAW,SAASA,MAAK;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,kBAAc,2BAAW,sBAAO;AACtC,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAMA,QAAM,gBAAgB,
|
|
4
|
+
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { Context } from './context';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const Item = forwardRef(function Item({\n prefix,\n suffix,\n children,\n disabled = false,\n hideOnClick = true,\n store,\n ...props\n}, ref) {\n const menuContext = useContext(Context);\n if (!menuContext?.store) {\n throw new Error('Menu.Item can only be rendered inside a Menu component');\n }\n\n // In most cases, the menu store will be retrieved from context (ie. the store\n // created by the top-level menu component). But in rare cases (ie.\n // `Menu.SubmenuTriggerItem`), the context store wouldn't be correct. This is\n // why the component accepts a `store` prop to override the context store.\n const computedStore = store ?? menuContext.store;\n return /*#__PURE__*/_jsxs(Styled.Item, {\n ref: ref,\n ...props,\n accessibleWhenDisabled: true,\n disabled: disabled,\n hideOnClick: hideOnClick,\n store: computedStore,\n children: [/*#__PURE__*/_jsx(Styled.ItemPrefixWrapper, {\n children: prefix\n }), /*#__PURE__*/_jsxs(Styled.ItemContentWrapper, {\n children: [/*#__PURE__*/_jsx(Styled.ItemChildrenWrapper, {\n children: children\n }), suffix && /*#__PURE__*/_jsx(Styled.ItemSuffixWrapper, {\n children: suffix\n })]\n })]\n });\n});"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,cAAAA;AAAA;AAAA;AAGA,qBAAuC;AAMvC,aAAwB;AACxB,qBAAwB;AACxB,yBAA2C;AACpC,IAAMA,YAAO,2BAAW,SAASA,MAAK;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,kBAAc,2BAAW,sBAAO;AACtC,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAC1E;AAMA,QAAM,gBAAgB,SAAS,YAAY;AAC3C,SAAoB,uCAAAC,MAAa,aAAM;AAAA,IACrC;AAAA,IACA,GAAG;AAAA,IACH,wBAAwB;AAAA,IACxB;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP,UAAU,CAAc,uCAAAC,KAAY,0BAAmB;AAAA,MACrD,UAAU;AAAA,IACZ,CAAC,GAAgB,uCAAAD,MAAa,2BAAoB;AAAA,MAChD,UAAU,CAAc,uCAAAC,KAAY,4BAAqB;AAAA,QACvD;AAAA,MACF,CAAC,GAAG,UAAuB,uCAAAA,KAAY,0BAAmB;AAAA,QACxD,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC,CAAC;AAAA,EACJ,CAAC;AACH,CAAC;",
|
|
6
6
|
"names": ["Item", "_jsxs", "_jsx"]
|
|
7
7
|
}
|
package/build/menu/popover.cjs
CHANGED
|
@@ -66,8 +66,8 @@ var Popover = (0, import_element.forwardRef)(function Popover2({
|
|
|
66
66
|
ref,
|
|
67
67
|
modal,
|
|
68
68
|
store: menuContext.store,
|
|
69
|
-
gutter: gutter
|
|
70
|
-
shift: shift
|
|
69
|
+
gutter: gutter ?? (menuContext.store.parent ? 0 : 8),
|
|
70
|
+
shift: shift ?? (menuContext.store.parent ? -4 : 0),
|
|
71
71
|
hideOnHoverOutside: false,
|
|
72
72
|
"data-side": appliedPlacementSide,
|
|
73
73
|
"data-submenu": !!menuContext.store.parent || void 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/menu/popover.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo, forwardRef, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { Context } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Popover = forwardRef(function Popover({\n gutter,\n children,\n shift,\n modal = true,\n ...otherProps\n}, ref) {\n const menuContext = useContext(Context);\n\n // Extract the side from the applied placement \u2014 useful for animations.\n // Using `currentPlacement` instead of `placement` to make sure that we\n // use the final computed placement (including \"flips\" etc).\n const appliedPlacementSide = Ariakit.useStoreState(menuContext?.store, 'currentPlacement')?.split('-')[0];\n const hideOnEscape = useCallback(event => {\n // Pressing Escape can cause unexpected consequences (ie. exiting\n // full screen mode on MacOs, close parent modals...).\n event.preventDefault();\n // Returning `true` causes the menu to hide.\n return true;\n }, []);\n const computedDirection = Ariakit.useStoreState(menuContext?.store, 'rtl') ? 'rtl' : 'ltr';\n const wrapperProps = useMemo(() => ({\n dir: computedDirection,\n style: {\n direction: computedDirection\n }\n }), [computedDirection]);\n if (!menuContext?.store) {\n throw new Error('Menu.Popover can only be rendered inside a Menu component');\n }\n return /*#__PURE__*/_jsx(Styled.Menu, {\n ...otherProps,\n ref: ref,\n modal: modal,\n store: menuContext.store\n // Root menu has an 8px distance from its trigger,\n // otherwise 0 (which causes the submenu to slightly overlap)\n ,\n gutter: gutter
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA6D;AAM7D,aAAwB;AACxB,qBAAwB;AACxB,yBAA4B;AACrB,IAAM,cAAU,2BAAW,SAASA,SAAQ;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAG,KAAK;AACN,QAAM,kBAAc,2BAAW,sBAAO;AAKtC,QAAM,uBAA+B,sBAAc,aAAa,OAAO,kBAAkB,GAAG,MAAM,GAAG,EAAE,CAAC;AACxG,QAAM,mBAAe,4BAAY,WAAS;AAGxC,UAAM,eAAe;AAErB,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,oBAA4B,sBAAc,aAAa,OAAO,KAAK,IAAI,QAAQ;AACrF,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC,KAAK;AAAA,IACL,OAAO;AAAA,MACL,WAAW;AAAA,IACb;AAAA,EACF,IAAI,CAAC,iBAAiB,CAAC;AACvB,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAoB,uCAAAC,KAAY,aAAM;AAAA,IACpC,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA,OAAO,YAAY;AAAA,IAInB,QAAQ,WAAW,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, useMemo, forwardRef, useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n\nimport * as Styled from './styles';\nimport { Context } from './context';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const Popover = forwardRef(function Popover({\n gutter,\n children,\n shift,\n modal = true,\n ...otherProps\n}, ref) {\n const menuContext = useContext(Context);\n\n // Extract the side from the applied placement \u2014 useful for animations.\n // Using `currentPlacement` instead of `placement` to make sure that we\n // use the final computed placement (including \"flips\" etc).\n const appliedPlacementSide = Ariakit.useStoreState(menuContext?.store, 'currentPlacement')?.split('-')[0];\n const hideOnEscape = useCallback(event => {\n // Pressing Escape can cause unexpected consequences (ie. exiting\n // full screen mode on MacOs, close parent modals...).\n event.preventDefault();\n // Returning `true` causes the menu to hide.\n return true;\n }, []);\n const computedDirection = Ariakit.useStoreState(menuContext?.store, 'rtl') ? 'rtl' : 'ltr';\n const wrapperProps = useMemo(() => ({\n dir: computedDirection,\n style: {\n direction: computedDirection\n }\n }), [computedDirection]);\n if (!menuContext?.store) {\n throw new Error('Menu.Popover can only be rendered inside a Menu component');\n }\n return /*#__PURE__*/_jsx(Styled.Menu, {\n ...otherProps,\n ref: ref,\n modal: modal,\n store: menuContext.store\n // Root menu has an 8px distance from its trigger,\n // otherwise 0 (which causes the submenu to slightly overlap)\n ,\n gutter: gutter ?? (menuContext.store.parent ? 0 : 8)\n // Align nested menu by the same (but opposite) amount\n // as the menu container's padding.\n ,\n shift: shift ?? (menuContext.store.parent ? -4 : 0),\n hideOnHoverOutside: false,\n \"data-side\": appliedPlacementSide,\n \"data-submenu\": !!menuContext.store.parent || undefined,\n wrapperProps: wrapperProps,\n hideOnEscape: hideOnEscape,\n unmountOnHide: true,\n variant: menuContext.variant,\n children: children\n });\n});"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,cAAyB;AAKzB,qBAA6D;AAM7D,aAAwB;AACxB,qBAAwB;AACxB,yBAA4B;AACrB,IAAM,cAAU,2BAAW,SAASA,SAAQ;AAAA,EACjD;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAG,KAAK;AACN,QAAM,kBAAc,2BAAW,sBAAO;AAKtC,QAAM,uBAA+B,sBAAc,aAAa,OAAO,kBAAkB,GAAG,MAAM,GAAG,EAAE,CAAC;AACxG,QAAM,mBAAe,4BAAY,WAAS;AAGxC,UAAM,eAAe;AAErB,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AACL,QAAM,oBAA4B,sBAAc,aAAa,OAAO,KAAK,IAAI,QAAQ;AACrF,QAAM,mBAAe,wBAAQ,OAAO;AAAA,IAClC,KAAK;AAAA,IACL,OAAO;AAAA,MACL,WAAW;AAAA,IACb;AAAA,EACF,IAAI,CAAC,iBAAiB,CAAC;AACvB,MAAI,CAAC,aAAa,OAAO;AACvB,UAAM,IAAI,MAAM,2DAA2D;AAAA,EAC7E;AACA,SAAoB,uCAAAC,KAAY,aAAM;AAAA,IACpC,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA,OAAO,YAAY;AAAA,IAInB,QAAQ,WAAW,YAAY,MAAM,SAAS,IAAI;AAAA,IAIlD,OAAO,UAAU,YAAY,MAAM,SAAS,KAAK;AAAA,IACjD,oBAAoB;AAAA,IACpB,aAAa;AAAA,IACb,gBAAgB,CAAC,CAAC,YAAY,MAAM,UAAU;AAAA,IAC9C;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf,SAAS,YAAY;AAAA,IACrB;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
6
|
"names": ["Popover", "_jsx"]
|
|
7
7
|
}
|
|
@@ -94,6 +94,7 @@ function UnforwardedMenuItem(props, ref) {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
var MenuItem = (0, import_element.forwardRef)(UnforwardedMenuItem);
|
|
97
|
+
MenuItem.displayName = "MenuItem";
|
|
97
98
|
var menu_item_default = MenuItem;
|
|
98
99
|
// Annotate the CommonJS export names for ESM import in node:
|
|
99
100
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/menu-item/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedMenuItem(props, ref) {\n let {\n children,\n info,\n className,\n icon,\n iconPosition = 'right',\n shortcut,\n isSelected,\n role = 'menuitem',\n suffix,\n ...buttonProps\n } = props;\n className = clsx('components-menu-item__button', className);\n if (info) {\n children = /*#__PURE__*/_jsxs(\"span\", {\n className: \"components-menu-item__info-wrapper\",\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__info\",\n children: info\n })]\n });\n }\n if (icon && typeof icon !== 'string') {\n icon = cloneElement(icon, {\n className: clsx('components-menu-items__item-icon', {\n 'has-icon-right': iconPosition === 'right'\n })\n });\n }\n return /*#__PURE__*/_jsxs(Button, {\n size: \"compact\",\n ref: ref\n // Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n ,\n \"aria-checked\": role === 'menuitemcheckbox' || role === 'menuitemradio' ? isSelected : undefined,\n role: role,\n icon: iconPosition === 'left' ? icon : undefined,\n className: className,\n accessibleWhenDisabled: true,\n ...buttonProps,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), !suffix && /*#__PURE__*/_jsx(Shortcut, {\n className: \"components-menu-item__shortcut\",\n shortcut: shortcut\n }), !suffix && icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), suffix]\n });\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef(UnforwardedMenuItem);\nexport default MenuItem;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAAyC;AAKzC,sBAAqB;AACrB,oBAAmB;AACnB,kBAAiB;AACjB,yBAA2C;AAC3C,SAAS,oBAAoB,OAAO,KAAK;AACvC,MAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA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*/\nimport { cloneElement, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Shortcut from '../shortcut';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedMenuItem(props, ref) {\n let {\n children,\n info,\n className,\n icon,\n iconPosition = 'right',\n shortcut,\n isSelected,\n role = 'menuitem',\n suffix,\n ...buttonProps\n } = props;\n className = clsx('components-menu-item__button', className);\n if (info) {\n children = /*#__PURE__*/_jsxs(\"span\", {\n className: \"components-menu-item__info-wrapper\",\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), /*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__info\",\n children: info\n })]\n });\n }\n if (icon && typeof icon !== 'string') {\n icon = cloneElement(icon, {\n className: clsx('components-menu-items__item-icon', {\n 'has-icon-right': iconPosition === 'right'\n })\n });\n }\n return /*#__PURE__*/_jsxs(Button, {\n size: \"compact\",\n ref: ref\n // Make sure aria-checked matches spec https://www.w3.org/TR/wai-aria-1.1/#aria-checked\n ,\n \"aria-checked\": role === 'menuitemcheckbox' || role === 'menuitemradio' ? isSelected : undefined,\n role: role,\n icon: iconPosition === 'left' ? icon : undefined,\n className: className,\n accessibleWhenDisabled: true,\n ...buttonProps,\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-menu-item__item\",\n children: children\n }), !suffix && /*#__PURE__*/_jsx(Shortcut, {\n className: \"components-menu-item__shortcut\",\n shortcut: shortcut\n }), !suffix && icon && iconPosition === 'right' && /*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), suffix]\n });\n}\n\n/**\n * MenuItem is a component which renders a button intended to be used in combination with the `DropdownMenu` component.\n *\n * ```jsx\n * import { MenuItem } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyMenuItem = () => {\n * \tconst [ isActive, setIsActive ] = useState( true );\n *\n * \treturn (\n * \t\t<MenuItem\n * \t\t\ticon={ isActive ? 'yes' : 'no' }\n * \t\t\tisSelected={ isActive }\n * \t\t\trole=\"menuitemcheckbox\"\n * \t\t\tonClick={ () => setIsActive( ( state ) => ! state ) }\n * \t\t>\n * \t\t\tToggle\n * \t\t</MenuItem>\n * \t);\n * };\n * ```\n */\nexport const MenuItem = forwardRef(UnforwardedMenuItem);\nMenuItem.displayName = 'MenuItem';\nexport default MenuItem;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,kBAAiB;AAKjB,qBAAyC;AAKzC,sBAAqB;AACrB,oBAAmB;AACnB,kBAAiB;AACjB,yBAA2C;AAC3C,SAAS,oBAAoB,OAAO,KAAK;AACvC,MAAI;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,kBAAY,YAAAA,SAAK,gCAAgC,SAAS;AAC1D,MAAI,MAAM;AACR,eAAwB,uCAAAC,MAAM,QAAQ;AAAA,MACpC,WAAW;AAAA,MACX,UAAU,CAAc,uCAAAC,KAAK,QAAQ;AAAA,QACnC,WAAW;AAAA,QACX;AAAA,MACF,CAAC,GAAgB,uCAAAA,KAAK,QAAQ;AAAA,QAC5B,WAAW;AAAA,QACX,UAAU;AAAA,MACZ,CAAC,CAAC;AAAA,IACJ,CAAC;AAAA,EACH;AACA,MAAI,QAAQ,OAAO,SAAS,UAAU;AACpC,eAAO,6BAAa,MAAM;AAAA,MACxB,eAAW,YAAAF,SAAK,oCAAoC;AAAA,QAClD,kBAAkB,iBAAiB;AAAA,MACrC,CAAC;AAAA,IACH,CAAC;AAAA,EACH;AACA,SAAoB,uCAAAC,MAAM,cAAAE,SAAQ;AAAA,IAChC,MAAM;AAAA,IACN;AAAA,IAGA,gBAAgB,SAAS,sBAAsB,SAAS,kBAAkB,aAAa;AAAA,IACvF;AAAA,IACA,MAAM,iBAAiB,SAAS,OAAO;AAAA,IACvC;AAAA,IACA,wBAAwB;AAAA,IACxB,GAAG;AAAA,IACH,UAAU,CAAc,uCAAAD,KAAK,QAAQ;AAAA,MACnC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAuB,uCAAAA,KAAK,gBAAAE,SAAU;AAAA,MACzC,WAAW;AAAA,MACX;AAAA,IACF,CAAC,GAAG,CAAC,UAAU,QAAQ,iBAAiB,WAAwB,uCAAAF,KAAK,YAAAG,SAAM;AAAA,MACzE;AAAA,IACF,CAAC,GAAG,MAAM;AAAA,EACZ,CAAC;AACH;AAyBO,IAAM,eAAW,2BAAW,mBAAmB;AACtD,SAAS,cAAc;AACvB,IAAO,oBAAQ;",
|
|
6
6
|
"names": ["clsx", "_jsxs", "_jsx", "Button", "Shortcut", "Icon"]
|
|
7
7
|
}
|
package/build/modal/index.cjs
CHANGED
|
@@ -130,9 +130,8 @@ function UnforwardedModal(props, forwardedRef) {
|
|
|
130
130
|
};
|
|
131
131
|
}, [dismissers, nestedDismissers]);
|
|
132
132
|
(0, import_element.useEffect)(() => {
|
|
133
|
-
var _bodyOpenClasses$get;
|
|
134
133
|
const theClass = bodyOpenClassName;
|
|
135
|
-
const oneMore = 1 + (
|
|
134
|
+
const oneMore = 1 + (bodyOpenClasses.get(theClass) ?? 0);
|
|
136
135
|
bodyOpenClasses.set(theClass, oneMore);
|
|
137
136
|
document.body.classList.add(bodyOpenClassName);
|
|
138
137
|
return () => {
|
|
@@ -169,8 +168,7 @@ function UnforwardedModal(props, forwardedRef) {
|
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
const onContentContainerScroll = (0, import_element.useCallback)((e) => {
|
|
172
|
-
|
|
173
|
-
const scrollY = (_e$currentTarget$scro = e?.currentTarget?.scrollTop) !== null && _e$currentTarget$scro !== void 0 ? _e$currentTarget$scro : -1;
|
|
171
|
+
const scrollY = e?.currentTarget?.scrollTop ?? -1;
|
|
174
172
|
if (!hasScrolledContent && scrollY > 0) {
|
|
175
173
|
setHasScrolledContent(true);
|
|
176
174
|
} else if (hasScrolledContent && scrollY <= 0) {
|
|
@@ -275,6 +273,7 @@ function UnforwardedModal(props, forwardedRef) {
|
|
|
275
273
|
}), document.body);
|
|
276
274
|
}
|
|
277
275
|
var Modal = (0, import_element.forwardRef)(UnforwardedModal);
|
|
276
|
+
Modal.displayName = "Modal";
|
|
278
277
|
var modal_default = Modal;
|
|
279
278
|
// Annotate the CommonJS export names for ESM import in node:
|
|
280
279
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/modal/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createPortal, useCallback, useEffect, useRef, useState, forwardRef, useLayoutEffect, createContext, useContext } from '@wordpress/element';\nimport { useInstanceId, useFocusReturn, useFocusOnMount, useConstrainedTabbing, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst ModalContext = createContext(new Set());\nModalContext.displayName = 'ModalContext';\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map();\nfunction UnforwardedModal(props, forwardedRef) {\n const {\n bodyOpenClassName = 'modal-open',\n role = 'dialog',\n title = null,\n focusOnMount = true,\n shouldCloseOnEsc = true,\n shouldCloseOnClickOutside = true,\n isDismissible = true,\n /* Accessibility. */\n aria = {\n labelledby: undefined,\n describedby: undefined\n },\n onRequestClose,\n icon,\n closeButtonLabel,\n children,\n style,\n overlayClassName: overlayClassnameProp,\n className,\n contentLabel,\n onKeyDown,\n isFullScreen = false,\n size,\n headerActions = null,\n __experimentalHideHeader = false\n } = props;\n const ref = useRef();\n const instanceId = useInstanceId(Modal);\n const headingId = title ? `components-modal-header-${instanceId}` : aria.labelledby;\n\n // The focus hook does not support 'firstContentElement' but this is a valid\n // value for the Modal's focusOnMount prop. The following code ensures the focus\n // hook will focus the first focusable node within the element to which it is applied.\n // When `firstContentElement` is passed as the value of the focusOnMount prop,\n // the focus hook is applied to the Modal's content element.\n // Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n // focus hook will focus the first element in the Modal's **content** when\n // `firstContentElement` is passed.\n const focusOnMountRef = useFocusOnMount(focusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount);\n const constrainedTabbingRef = useConstrainedTabbing();\n const focusReturnRef = useFocusReturn();\n const contentRef = useRef(null);\n const childrenContainerRef = useRef(null);\n const [hasScrolledContent, setHasScrolledContent] = useState(false);\n const [hasScrollableContent, setHasScrollableContent] = useState(false);\n let sizeClass;\n if (isFullScreen || size === 'fill') {\n sizeClass = 'is-full-screen';\n } else if (size) {\n sizeClass = `has-size-${size}`;\n }\n\n // Determines whether the Modal content is scrollable and updates the state.\n const isContentScrollable = useCallback(() => {\n if (!contentRef.current) {\n return;\n }\n const closestScrollContainer = getScrollContainer(contentRef.current);\n if (contentRef.current === closestScrollContainer) {\n setHasScrollableContent(true);\n } else {\n setHasScrollableContent(false);\n }\n }, [contentRef]);\n\n // Accessibly isolates/unisolates the modal.\n useEffect(() => {\n ariaHelper.modalize(ref.current);\n return () => ariaHelper.unmodalize();\n }, []);\n\n // Keeps a fresh ref for the subsequent effect.\n const onRequestCloseRef = useRef();\n useEffect(() => {\n onRequestCloseRef.current = onRequestClose;\n }, [onRequestClose]);\n\n // The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n // one should remain open at a time and the list enables closing prior ones.\n const dismissers = useContext(ModalContext);\n // Used for the tracking and dismissing any nested modals.\n const [nestedDismissers] = useState(() => new Set());\n\n // Updates the stack tracking open modals at this level and calls\n // onRequestClose for any prior and/or nested modals as applicable.\n useEffect(() => {\n // add this modal instance to the dismissers set\n dismissers.add(onRequestCloseRef);\n // request that all the other modals close themselves\n for (const dismisser of dismissers) {\n if (dismisser !== onRequestCloseRef) {\n dismisser.current?.();\n }\n }\n return () => {\n // request that all the nested modals close themselves\n for (const dismisser of nestedDismissers) {\n dismisser.current?.();\n }\n // remove this modal instance from the dismissers set\n dismissers.delete(onRequestCloseRef);\n };\n }, [dismissers, nestedDismissers]);\n\n // Adds/removes the value of bodyOpenClassName to body element.\n useEffect(() => {\n var _bodyOpenClasses$get;\n const theClass = bodyOpenClassName;\n const oneMore = 1 + ((_bodyOpenClasses$get = bodyOpenClasses.get(theClass)) !== null && _bodyOpenClasses$get !== void 0 ? _bodyOpenClasses$get : 0);\n bodyOpenClasses.set(theClass, oneMore);\n document.body.classList.add(bodyOpenClassName);\n return () => {\n const oneLess = bodyOpenClasses.get(theClass) - 1;\n if (oneLess === 0) {\n document.body.classList.remove(theClass);\n bodyOpenClasses.delete(theClass);\n } else {\n bodyOpenClasses.set(theClass, oneLess);\n }\n };\n }, [bodyOpenClassName]);\n const {\n closeModal,\n frameRef,\n frameStyle,\n overlayClassname\n } = useModalExitAnimation();\n\n // Calls the isContentScrollable callback when the Modal children container resizes.\n useLayoutEffect(() => {\n if (!window.ResizeObserver || !childrenContainerRef.current) {\n return;\n }\n const resizeObserver = new ResizeObserver(isContentScrollable);\n resizeObserver.observe(childrenContainerRef.current);\n isContentScrollable();\n return () => {\n resizeObserver.disconnect();\n };\n }, [isContentScrollable, childrenContainerRef]);\n function handleEscapeKeyDown(event) {\n if (shouldCloseOnEsc && (event.code === 'Escape' || event.key === 'Escape') && !event.defaultPrevented) {\n event.preventDefault();\n closeModal().then(() => onRequestClose(event));\n }\n }\n const onContentContainerScroll = useCallback(e => {\n var _e$currentTarget$scro;\n const scrollY = (_e$currentTarget$scro = e?.currentTarget?.scrollTop) !== null && _e$currentTarget$scro !== void 0 ? _e$currentTarget$scro : -1;\n if (!hasScrolledContent && scrollY > 0) {\n setHasScrolledContent(true);\n } else if (hasScrolledContent && scrollY <= 0) {\n setHasScrolledContent(false);\n }\n }, [hasScrolledContent]);\n let pressTarget = null;\n const overlayPressHandlers = {\n onPointerDown: event => {\n if (event.target === event.currentTarget) {\n pressTarget = event.target;\n // Avoids focus changing so that focus return works as expected.\n event.preventDefault();\n }\n },\n // Closes the modal with two exceptions. 1. Opening the context menu on\n // the overlay. 2. Pressing on the overlay then dragging the pointer\n // over the modal and releasing. Due to the modal being a child of the\n // overlay, such a gesture is a `click` on the overlay and cannot be\n // excepted by a `click` handler. Thus the tactic of handling\n // `pointerup` and comparing its target to that of the `pointerdown`.\n onPointerUp: ({\n target,\n button\n }) => {\n const isSameTarget = target === pressTarget;\n pressTarget = null;\n if (button === 0 && isSameTarget) {\n closeModal().then(() => onRequestClose());\n }\n }\n };\n const modal =\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: useMergeRefs([ref, forwardedRef]),\n className: clsx('components-modal__screen-overlay', overlayClassname, overlayClassnameProp),\n onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),\n ...(shouldCloseOnClickOutside ? overlayPressHandlers : {}),\n children: /*#__PURE__*/_jsx(StyleProvider, {\n document: document,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-modal__frame', sizeClass, className),\n style: {\n ...frameStyle,\n ...style\n },\n ref: useMergeRefs([frameRef, constrainedTabbingRef, focusReturnRef, focusOnMount !== 'firstContentElement' ? focusOnMountRef : null]),\n role: role,\n \"aria-label\": contentLabel,\n \"aria-labelledby\": contentLabel ? undefined : headingId,\n \"aria-describedby\": aria.describedby,\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-modal__content', {\n 'hide-header': __experimentalHideHeader,\n 'is-scrollable': hasScrollableContent,\n 'has-scrolled-content': hasScrolledContent\n }),\n role: \"document\",\n onScroll: onContentContainerScroll,\n ref: contentRef,\n \"aria-label\": hasScrollableContent ? __('Scrollable section') : undefined,\n tabIndex: hasScrollableContent ? 0 : undefined,\n children: [!__experimentalHideHeader && /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header\",\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header-heading-container\",\n children: [icon && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-modal__icon-container\",\n \"aria-hidden\": true,\n children: icon\n }), title && /*#__PURE__*/_jsx(\"h1\", {\n id: headingId,\n className: \"components-modal__header-heading\",\n children: title\n })]\n }), headerActions, isDismissible && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginLeft: 2\n }), /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n onClick: event => closeModal().then(() => onRequestClose(event)),\n icon: close,\n label: closeButtonLabel || __('Close')\n })]\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n ref: useMergeRefs([childrenContainerRef, focusOnMount === 'firstContentElement' ? focusOnMountRef : null]),\n className: \"components-modal__children-container\",\n children: children\n })]\n })\n })\n })\n });\n return createPortal(/*#__PURE__*/_jsx(ModalContext.Provider, {\n value: nestedDismissers,\n children: modal\n }), document.body);\n}\n\n/**\n * Modals give users information and choices related to a task they\u2019re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef(UnforwardedModal);\nexport default Modal;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+H;AAC/H,qBAAoG;AACpG,kBAAmB;AACnB,mBAAsB;AACtB,iBAAmC;AAKnC,iBAA4B;AAC5B,oBAAmB;AACnB,4BAA0B;AAC1B,oCAAoC;AACpC,oBAAuB;AACvB,sCAAsC;AAGtC,yBAAkE;AAClE,IAAM,mBAAe,8BAAc,oBAAI,IAAI,CAAC;AAC5C,aAAa,cAAc;AAG3B,IAAM,kBAAkB,oBAAI,IAAI;AAChC,SAAS,iBAAiB,OAAO,cAAc;AAC7C,QAAM;AAAA,IACJ,oBAAoB;AAAA,IACpB,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,4BAA4B;AAAA,IAC5B,gBAAgB;AAAA;AAAA,IAEhB,OAAO;AAAA,MACL,YAAY;AAAA,MACZ,aAAa;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,gBAAgB;AAAA,IAChB,2BAA2B;AAAA,EAC7B,IAAI;AACJ,QAAM,UAAM,uBAAO;AACnB,QAAM,iBAAa,8BAAc,KAAK;AACtC,QAAM,YAAY,QAAQ,2BAA2B,UAAU,KAAK,KAAK;AAUzE,QAAM,sBAAkB,gCAAgB,iBAA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,gBAAgB,CAAC;AAGjC,gCAAU,MAAM;AACd,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { createPortal, useCallback, useEffect, useRef, useState, forwardRef, useLayoutEffect, createContext, useContext } from '@wordpress/element';\nimport { useInstanceId, useFocusReturn, useFocusOnMount, useConstrainedTabbing, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst ModalContext = createContext(new Set());\nModalContext.displayName = 'ModalContext';\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map();\nfunction UnforwardedModal(props, forwardedRef) {\n const {\n bodyOpenClassName = 'modal-open',\n role = 'dialog',\n title = null,\n focusOnMount = true,\n shouldCloseOnEsc = true,\n shouldCloseOnClickOutside = true,\n isDismissible = true,\n /* Accessibility. */\n aria = {\n labelledby: undefined,\n describedby: undefined\n },\n onRequestClose,\n icon,\n closeButtonLabel,\n children,\n style,\n overlayClassName: overlayClassnameProp,\n className,\n contentLabel,\n onKeyDown,\n isFullScreen = false,\n size,\n headerActions = null,\n __experimentalHideHeader = false\n } = props;\n const ref = useRef();\n const instanceId = useInstanceId(Modal);\n const headingId = title ? `components-modal-header-${instanceId}` : aria.labelledby;\n\n // The focus hook does not support 'firstContentElement' but this is a valid\n // value for the Modal's focusOnMount prop. The following code ensures the focus\n // hook will focus the first focusable node within the element to which it is applied.\n // When `firstContentElement` is passed as the value of the focusOnMount prop,\n // the focus hook is applied to the Modal's content element.\n // Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n // focus hook will focus the first element in the Modal's **content** when\n // `firstContentElement` is passed.\n const focusOnMountRef = useFocusOnMount(focusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount);\n const constrainedTabbingRef = useConstrainedTabbing();\n const focusReturnRef = useFocusReturn();\n const contentRef = useRef(null);\n const childrenContainerRef = useRef(null);\n const [hasScrolledContent, setHasScrolledContent] = useState(false);\n const [hasScrollableContent, setHasScrollableContent] = useState(false);\n let sizeClass;\n if (isFullScreen || size === 'fill') {\n sizeClass = 'is-full-screen';\n } else if (size) {\n sizeClass = `has-size-${size}`;\n }\n\n // Determines whether the Modal content is scrollable and updates the state.\n const isContentScrollable = useCallback(() => {\n if (!contentRef.current) {\n return;\n }\n const closestScrollContainer = getScrollContainer(contentRef.current);\n if (contentRef.current === closestScrollContainer) {\n setHasScrollableContent(true);\n } else {\n setHasScrollableContent(false);\n }\n }, [contentRef]);\n\n // Accessibly isolates/unisolates the modal.\n useEffect(() => {\n ariaHelper.modalize(ref.current);\n return () => ariaHelper.unmodalize();\n }, []);\n\n // Keeps a fresh ref for the subsequent effect.\n const onRequestCloseRef = useRef();\n useEffect(() => {\n onRequestCloseRef.current = onRequestClose;\n }, [onRequestClose]);\n\n // The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n // one should remain open at a time and the list enables closing prior ones.\n const dismissers = useContext(ModalContext);\n // Used for the tracking and dismissing any nested modals.\n const [nestedDismissers] = useState(() => new Set());\n\n // Updates the stack tracking open modals at this level and calls\n // onRequestClose for any prior and/or nested modals as applicable.\n useEffect(() => {\n // add this modal instance to the dismissers set\n dismissers.add(onRequestCloseRef);\n // request that all the other modals close themselves\n for (const dismisser of dismissers) {\n if (dismisser !== onRequestCloseRef) {\n dismisser.current?.();\n }\n }\n return () => {\n // request that all the nested modals close themselves\n for (const dismisser of nestedDismissers) {\n dismisser.current?.();\n }\n // remove this modal instance from the dismissers set\n dismissers.delete(onRequestCloseRef);\n };\n }, [dismissers, nestedDismissers]);\n\n // Adds/removes the value of bodyOpenClassName to body element.\n useEffect(() => {\n const theClass = bodyOpenClassName;\n const oneMore = 1 + (bodyOpenClasses.get(theClass) ?? 0);\n bodyOpenClasses.set(theClass, oneMore);\n document.body.classList.add(bodyOpenClassName);\n return () => {\n const oneLess = bodyOpenClasses.get(theClass) - 1;\n if (oneLess === 0) {\n document.body.classList.remove(theClass);\n bodyOpenClasses.delete(theClass);\n } else {\n bodyOpenClasses.set(theClass, oneLess);\n }\n };\n }, [bodyOpenClassName]);\n const {\n closeModal,\n frameRef,\n frameStyle,\n overlayClassname\n } = useModalExitAnimation();\n\n // Calls the isContentScrollable callback when the Modal children container resizes.\n useLayoutEffect(() => {\n if (!window.ResizeObserver || !childrenContainerRef.current) {\n return;\n }\n const resizeObserver = new ResizeObserver(isContentScrollable);\n resizeObserver.observe(childrenContainerRef.current);\n isContentScrollable();\n return () => {\n resizeObserver.disconnect();\n };\n }, [isContentScrollable, childrenContainerRef]);\n function handleEscapeKeyDown(event) {\n if (shouldCloseOnEsc && (event.code === 'Escape' || event.key === 'Escape') && !event.defaultPrevented) {\n event.preventDefault();\n closeModal().then(() => onRequestClose(event));\n }\n }\n const onContentContainerScroll = useCallback(e => {\n const scrollY = e?.currentTarget?.scrollTop ?? -1;\n if (!hasScrolledContent && scrollY > 0) {\n setHasScrolledContent(true);\n } else if (hasScrolledContent && scrollY <= 0) {\n setHasScrolledContent(false);\n }\n }, [hasScrolledContent]);\n let pressTarget = null;\n const overlayPressHandlers = {\n onPointerDown: event => {\n if (event.target === event.currentTarget) {\n pressTarget = event.target;\n // Avoids focus changing so that focus return works as expected.\n event.preventDefault();\n }\n },\n // Closes the modal with two exceptions. 1. Opening the context menu on\n // the overlay. 2. Pressing on the overlay then dragging the pointer\n // over the modal and releasing. Due to the modal being a child of the\n // overlay, such a gesture is a `click` on the overlay and cannot be\n // excepted by a `click` handler. Thus the tactic of handling\n // `pointerup` and comparing its target to that of the `pointerdown`.\n onPointerUp: ({\n target,\n button\n }) => {\n const isSameTarget = target === pressTarget;\n pressTarget = null;\n if (button === 0 && isSameTarget) {\n closeModal().then(() => onRequestClose());\n }\n }\n };\n const modal =\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n _jsx(\"div\", {\n ref: useMergeRefs([ref, forwardedRef]),\n className: clsx('components-modal__screen-overlay', overlayClassname, overlayClassnameProp),\n onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),\n ...(shouldCloseOnClickOutside ? overlayPressHandlers : {}),\n children: /*#__PURE__*/_jsx(StyleProvider, {\n document: document,\n children: /*#__PURE__*/_jsx(\"div\", {\n className: clsx('components-modal__frame', sizeClass, className),\n style: {\n ...frameStyle,\n ...style\n },\n ref: useMergeRefs([frameRef, constrainedTabbingRef, focusReturnRef, focusOnMount !== 'firstContentElement' ? focusOnMountRef : null]),\n role: role,\n \"aria-label\": contentLabel,\n \"aria-labelledby\": contentLabel ? undefined : headingId,\n \"aria-describedby\": aria.describedby,\n tabIndex: -1,\n onKeyDown: onKeyDown,\n children: /*#__PURE__*/_jsxs(\"div\", {\n className: clsx('components-modal__content', {\n 'hide-header': __experimentalHideHeader,\n 'is-scrollable': hasScrollableContent,\n 'has-scrolled-content': hasScrolledContent\n }),\n role: \"document\",\n onScroll: onContentContainerScroll,\n ref: contentRef,\n \"aria-label\": hasScrollableContent ? __('Scrollable section') : undefined,\n tabIndex: hasScrollableContent ? 0 : undefined,\n children: [!__experimentalHideHeader && /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header\",\n children: [/*#__PURE__*/_jsxs(\"div\", {\n className: \"components-modal__header-heading-container\",\n children: [icon && /*#__PURE__*/_jsx(\"span\", {\n className: \"components-modal__icon-container\",\n \"aria-hidden\": true,\n children: icon\n }), title && /*#__PURE__*/_jsx(\"h1\", {\n id: headingId,\n className: \"components-modal__header-heading\",\n children: title\n })]\n }), headerActions, isDismissible && /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(Spacer, {\n marginBottom: 0,\n marginLeft: 2\n }), /*#__PURE__*/_jsx(Button, {\n size: \"compact\",\n onClick: event => closeModal().then(() => onRequestClose(event)),\n icon: close,\n label: closeButtonLabel || __('Close')\n })]\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n ref: useMergeRefs([childrenContainerRef, focusOnMount === 'firstContentElement' ? focusOnMountRef : null]),\n className: \"components-modal__children-container\",\n children: children\n })]\n })\n })\n })\n });\n return createPortal(/*#__PURE__*/_jsx(ModalContext.Provider, {\n value: nestedDismissers,\n children: modal\n }), document.body);\n}\n\n/**\n * Modals give users information and choices related to a task they\u2019re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef(UnforwardedModal);\nModal.displayName = 'Modal';\nexport default Modal;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAKjB,qBAA+H;AAC/H,qBAAoG;AACpG,kBAAmB;AACnB,mBAAsB;AACtB,iBAAmC;AAKnC,iBAA4B;AAC5B,oBAAmB;AACnB,4BAA0B;AAC1B,oCAAoC;AACpC,oBAAuB;AACvB,sCAAsC;AAGtC,yBAAkE;AAClE,IAAM,mBAAe,8BAAc,oBAAI,I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ChE,UAAU,CAAc,uCAAAJ,KAAK,sBAAQ;AAAA,kBACnC,cAAc;AAAA,kBACd,YAAY;AAAA,gBACd,CAAC,GAAgB,uCAAAA,KAAK,cAAAK,SAAQ;AAAA,kBAC5B,MAAM;AAAA,kBACN,SAAS,WAAS,WAAW,EAAE,KAAK,MAAM,eAAe,KAAK,CAAC;AAAA,kBAC/D,MAAM;AAAA,kBACN,OAAO,wBAAoB,gBAAG,OAAO;AAAA,gBACvC,CAAC,CAAC;AAAA,cACJ,CAAC,CAAC;AAAA,YACJ,CAAC,GAAgB,uCAAAL,KAAK,OAAO;AAAA,cAC3B,SAAK,6BAAa,CAAC,sBAAsB,iBAAiB,wBAAwB,kBAAkB,IAAI,CAAC;AAAA,cACzG,WAAW;AAAA,cACX;AAAA,YACF,CAAC,CAAC;AAAA,UACJ,CAAC;AAAA,QACH,CAAC;AAAA,MACH,CAAC;AAAA,IACH,CAAC;AAAA;AACD,aAAO,6BAA0B,uCAAAA,KAAK,aAAa,UAAU;AAAA,IAC3D,OAAO;AAAA,IACP,UAAU;AAAA,EACZ,CAAC,GAAG,SAAS,IAAI;AACnB;AAiCO,IAAM,YAAQ,2BAAW,gBAAgB;AAChD,MAAM,cAAc;AACpB,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["_jsx", "clsx", "StyleProvider", "_jsxs", "_Fragment", "Button"]
|
|
7
7
|
}
|
|
@@ -77,6 +77,7 @@ function UnforwardedNavigableMenu({
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
var NavigableMenu = (0, import_element.forwardRef)(UnforwardedNavigableMenu);
|
|
80
|
+
NavigableMenu.displayName = "NavigableMenu";
|
|
80
81
|
var menu_default = NavigableMenu;
|
|
81
82
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
83
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/navigable-container/menu.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedNavigableMenu({\n role = 'menu',\n orientation = 'vertical',\n ...rest\n}, ref) {\n const eventToOffset = evt => {\n const {\n code\n } = evt;\n let next = ['ArrowDown'];\n let previous = ['ArrowUp'];\n if (orientation === 'horizontal') {\n next = ['ArrowRight'];\n previous = ['ArrowLeft'];\n }\n if (orientation === 'both') {\n next = ['ArrowRight', 'ArrowDown'];\n previous = ['ArrowLeft', 'ArrowUp'];\n }\n if (next.includes(code)) {\n return 1;\n } else if (previous.includes(code)) {\n return -1;\n } else if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(code)) {\n // Key press should be handled, e.g. have event propagation and\n // default behavior handled by NavigableContainer but not result\n // in an offset.\n return 0;\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: false,\n role: role,\n \"aria-orientation\": role !== 'presentation' && (orientation === 'vertical' || orientation === 'horizontal') ? orientation : undefined,\n eventToOffset: eventToOffset,\n ...rest\n });\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef(UnforwardedNavigableMenu);\nexport default NavigableMenu;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,yBAAyB;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,EACd,GAAG;AACL,GAAG,KAAK;AACN,QAAM,gBAAgB,SAAO;AAC3B,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,QAAI,OAAO,CAAC,WAAW;AACvB,QAAI,WAAW,CAAC,SAAS;AACzB,QAAI,gBAAgB,cAAc;AAChC,aAAO,CAAC,YAAY;AACpB,iBAAW,CAAC,WAAW;AAAA,IACzB;AACA,QAAI,gBAAgB,QAAQ;AAC1B,aAAO,CAAC,cAAc,WAAW;AACjC,iBAAW,CAAC,aAAa,SAAS;AAAA,IACpC;AACA,QAAI,KAAK,SAAS,IAAI,GAAG;AACvB,aAAO;AAAA,IACT,WAAW,SAAS,SAAS,IAAI,GAAG;AAClC,aAAO;AAAA,IACT,WAAW,CAAC,aAAa,WAAW,aAAa,YAAY,EAAE,SAAS,IAAI,GAAG;AAI7E,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB;AAAA,IACA,oBAAoB,SAAS,mBAAmB,gBAAgB,cAAc,gBAAgB,gBAAgB,cAAc;AAAA,IAC5H;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AACH;AA2BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,IAAO,eAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedNavigableMenu({\n role = 'menu',\n orientation = 'vertical',\n ...rest\n}, ref) {\n const eventToOffset = evt => {\n const {\n code\n } = evt;\n let next = ['ArrowDown'];\n let previous = ['ArrowUp'];\n if (orientation === 'horizontal') {\n next = ['ArrowRight'];\n previous = ['ArrowLeft'];\n }\n if (orientation === 'both') {\n next = ['ArrowRight', 'ArrowDown'];\n previous = ['ArrowLeft', 'ArrowUp'];\n }\n if (next.includes(code)) {\n return 1;\n } else if (previous.includes(code)) {\n return -1;\n } else if (['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'].includes(code)) {\n // Key press should be handled, e.g. have event propagation and\n // default behavior handled by NavigableContainer but not result\n // in an offset.\n return 0;\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: false,\n role: role,\n \"aria-orientation\": role !== 'presentation' && (orientation === 'vertical' || orientation === 'horizontal') ? orientation : undefined,\n eventToOffset: eventToOffset,\n ...rest\n });\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef(UnforwardedNavigableMenu);\nNavigableMenu.displayName = 'NavigableMenu';\nexport default NavigableMenu;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,yBAAyB;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,EACd,GAAG;AACL,GAAG,KAAK;AACN,QAAM,gBAAgB,SAAO;AAC3B,UAAM;AAAA,MACJ;AAAA,IACF,IAAI;AACJ,QAAI,OAAO,CAAC,WAAW;AACvB,QAAI,WAAW,CAAC,SAAS;AACzB,QAAI,gBAAgB,cAAc;AAChC,aAAO,CAAC,YAAY;AACpB,iBAAW,CAAC,WAAW;AAAA,IACzB;AACA,QAAI,gBAAgB,QAAQ;AAC1B,aAAO,CAAC,cAAc,WAAW;AACjC,iBAAW,CAAC,aAAa,SAAS;AAAA,IACpC;AACA,QAAI,KAAK,SAAS,IAAI,GAAG;AACvB,aAAO;AAAA,IACT,WAAW,SAAS,SAAS,IAAI,GAAG;AAClC,aAAO;AAAA,IACT,WAAW,CAAC,aAAa,WAAW,aAAa,YAAY,EAAE,SAAS,IAAI,GAAG;AAI7E,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB;AAAA,IACA,oBAAoB,SAAS,mBAAmB,gBAAgB,cAAc,gBAAgB,gBAAgB,cAAc;AAAA,IAC5H;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AACH;AA2BO,IAAM,oBAAgB,2BAAW,wBAAwB;AAChE,cAAc,cAAc;AAC5B,IAAO,eAAQ;",
|
|
6
6
|
"names": ["_jsx", "NavigableContainer"]
|
|
7
7
|
}
|
|
@@ -64,6 +64,7 @@ function UnforwardedTabbableContainer({
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
var TabbableContainer = (0, import_element.forwardRef)(UnforwardedTabbableContainer);
|
|
67
|
+
TabbableContainer.displayName = "TabbableContainer";
|
|
67
68
|
var tabbable_default = TabbableContainer;
|
|
68
69
|
// Annotate the CommonJS export names for ESM import in node:
|
|
69
70
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/navigable-container/tabbable.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedTabbableContainer({\n eventToOffset,\n ...props\n}, ref) {\n const innerEventToOffset = evt => {\n const {\n code,\n shiftKey\n } = evt;\n if ('Tab' === code) {\n return shiftKey ? -1 : 1;\n }\n\n // Allow custom handling of keys besides Tab.\n //\n // By default, TabbableContainer will move focus forward on Tab and\n // backward on Shift+Tab. The handler below will be used for all other\n // events. The semantics for `eventToOffset`'s return\n // values are the following:\n //\n // - +1: move focus forward\n // - -1: move focus backward\n // - 0: don't move focus, but acknowledge event and thus stop it\n // - undefined: do nothing, let the event propagate.\n if (eventToOffset) {\n return eventToOffset(evt);\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: true,\n eventToOffset: innerEventToOffset,\n ...props\n });\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef(UnforwardedTabbableContainer);\nexport default TabbableContainer;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,qBAAqB,SAAO;AAChC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAAI;AACJ,QAAI,UAAU,MAAM;AAClB,aAAO,WAAW,KAAK;AAAA,IACzB;AAaA,QAAI,eAAe;AACjB,aAAO,cAAc,GAAG;AAAA,IAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,GAAG;AAAA,EACL,CAAC;AACH;AAoCO,IAAM,wBAAoB,2BAAW,4BAA4B;AACxE,IAAO,mBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function UnforwardedTabbableContainer({\n eventToOffset,\n ...props\n}, ref) {\n const innerEventToOffset = evt => {\n const {\n code,\n shiftKey\n } = evt;\n if ('Tab' === code) {\n return shiftKey ? -1 : 1;\n }\n\n // Allow custom handling of keys besides Tab.\n //\n // By default, TabbableContainer will move focus forward on Tab and\n // backward on Shift+Tab. The handler below will be used for all other\n // events. The semantics for `eventToOffset`'s return\n // values are the following:\n //\n // - +1: move focus forward\n // - -1: move focus backward\n // - 0: don't move focus, but acknowledge event and thus stop it\n // - undefined: do nothing, let the event propagate.\n if (eventToOffset) {\n return eventToOffset(evt);\n }\n return undefined;\n };\n return /*#__PURE__*/_jsx(NavigableContainer, {\n ref: ref,\n stopNavigationEvents: true,\n onlyBrowserTabstops: true,\n eventToOffset: innerEventToOffset,\n ...props\n });\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef(UnforwardedTabbableContainer);\nTabbableContainer.displayName = 'TabbableContainer';\nexport default TabbableContainer;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,qBAA2B;AAK3B,uBAA+B;AAC/B,yBAA4B;AACrB,SAAS,6BAA6B;AAAA,EAC3C;AAAA,EACA,GAAG;AACL,GAAG,KAAK;AACN,QAAM,qBAAqB,SAAO;AAChC,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACF,IAAI;AACJ,QAAI,UAAU,MAAM;AAClB,aAAO,WAAW,KAAK;AAAA,IACzB;AAaA,QAAI,eAAe;AACjB,aAAO,cAAc,GAAG;AAAA,IAC1B;AACA,WAAO;AAAA,EACT;AACA,SAAoB,uCAAAA,KAAK,iBAAAC,SAAoB;AAAA,IAC3C;AAAA,IACA,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,GAAG;AAAA,EACL,CAAC;AACH;AAoCO,IAAM,wBAAoB,2BAAW,4BAA4B;AACxE,kBAAkB,cAAc;AAChC,IAAO,mBAAQ;",
|
|
6
6
|
"names": ["_jsx", "NavigableContainer"]
|
|
7
7
|
}
|
|
@@ -77,6 +77,7 @@ function UnforwardedNavigationBackButton({
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
var NavigationBackButton = (0, import_element.forwardRef)(UnforwardedNavigationBackButton);
|
|
80
|
+
NavigationBackButton.displayName = "NavigationBackButton";
|
|
80
81
|
var back_button_default = NavigationBackButton;
|
|
81
82
|
// Annotate the CommonJS export names for ESM import in node:
|
|
82
83
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/navigation/back-button/index.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedNavigationBackButton({\n backButtonLabel,\n className,\n href,\n onClick,\n parentMenu\n}, ref) {\n const {\n setActiveMenu,\n navigationTree\n } = useNavigationContext();\n const classes = clsx('components-navigation__back-button', className);\n const parentMenuTitle = parentMenu !== undefined ? navigationTree.getMenu(parentMenu)?.title : undefined;\n const handleOnClick = event => {\n if (typeof onClick === 'function') {\n onClick(event);\n }\n const animationDirection = isRTL() ? 'left' : 'right';\n if (parentMenu && !event.defaultPrevented) {\n setActiveMenu(parentMenu, animationDirection);\n }\n };\n const icon = isRTL() ? chevronRight : chevronLeft;\n return /*#__PURE__*/_jsxs(MenuBackButtonUI, {\n __next40pxDefaultSize: true,\n className: classes,\n href: href,\n variant: \"tertiary\",\n ref: ref,\n onClick: handleOnClick,\n children: [/*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), backButtonLabel || parentMenuTitle || __('Back')]\n });\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(UnforwardedNavigationBackButton);\nexport default NavigationBackButton;"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,kBAA0B;AAC1B,mBAAgD;AAKhD,qBAAqC;AACrC,+BAAiC;AACjC,yBAA2C;AAC3C,SAAS,gCAAgC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,qCAAqB;AACzB,QAAM,cAAU,YAAAA,SAAK,sCAAsC,SAAS;AACpE,QAAM,kBAAkB,eAAe,SAAY,eAAe,QAAQ,UAAU,GAAG,QAAQ;AAC/F,QAAM,gBAAgB,WAAS;AAC7B,QAAI,OAAO,YAAY,YAAY;AACjC,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,yBAAqB,mBAAM,IAAI,SAAS;AAC9C,QAAI,cAAc,CAAC,MAAM,kBAAkB;AACzC,oBAAc,YAAY,kBAAkB;AAAA,IAC9C;AAAA,EACF;AACA,QAAM,WAAO,mBAAM,IAAI,4BAAe;AACtC,SAAoB,uCAAAC,MAAM,2CAAkB;AAAA,IAC1C,uBAAuB;AAAA,IACvB,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,SAAS;AAAA,IACT,UAAU,CAAc,uCAAAC,KAAK,mBAAM;AAAA,MACjC;AAAA,IACF,CAAC,GAAG,mBAAmB,uBAAmB,gBAAG,MAAM,CAAC;AAAA,EACtD,CAAC;AACH;AAKO,IAAM,2BAAuB,2BAAW,+BAA+B;AAC9E,IAAO,sBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction UnforwardedNavigationBackButton({\n backButtonLabel,\n className,\n href,\n onClick,\n parentMenu\n}, ref) {\n const {\n setActiveMenu,\n navigationTree\n } = useNavigationContext();\n const classes = clsx('components-navigation__back-button', className);\n const parentMenuTitle = parentMenu !== undefined ? navigationTree.getMenu(parentMenu)?.title : undefined;\n const handleOnClick = event => {\n if (typeof onClick === 'function') {\n onClick(event);\n }\n const animationDirection = isRTL() ? 'left' : 'right';\n if (parentMenu && !event.defaultPrevented) {\n setActiveMenu(parentMenu, animationDirection);\n }\n };\n const icon = isRTL() ? chevronRight : chevronLeft;\n return /*#__PURE__*/_jsxs(MenuBackButtonUI, {\n __next40pxDefaultSize: true,\n className: classes,\n href: href,\n variant: \"tertiary\",\n ref: ref,\n onClick: handleOnClick,\n children: [/*#__PURE__*/_jsx(Icon, {\n icon: icon\n }), backButtonLabel || parentMenuTitle || __('Back')]\n });\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(UnforwardedNavigationBackButton);\nNavigationBackButton.displayName = 'NavigationBackButton';\nexport default NavigationBackButton;"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAiB;AAIjB,qBAA2B;AAC3B,kBAA0B;AAC1B,mBAAgD;AAKhD,qBAAqC;AACrC,+BAAiC;AACjC,yBAA2C;AAC3C,SAAS,gCAAgC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAG,KAAK;AACN,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,EACF,QAAI,qCAAqB;AACzB,QAAM,cAAU,YAAAA,SAAK,sCAAsC,SAAS;AACpE,QAAM,kBAAkB,eAAe,SAAY,eAAe,QAAQ,UAAU,GAAG,QAAQ;AAC/F,QAAM,gBAAgB,WAAS;AAC7B,QAAI,OAAO,YAAY,YAAY;AACjC,cAAQ,KAAK;AAAA,IACf;AACA,UAAM,yBAAqB,mBAAM,IAAI,SAAS;AAC9C,QAAI,cAAc,CAAC,MAAM,kBAAkB;AACzC,oBAAc,YAAY,kBAAkB;AAAA,IAC9C;AAAA,EACF;AACA,QAAM,WAAO,mBAAM,IAAI,4BAAe;AACtC,SAAoB,uCAAAC,MAAM,2CAAkB;AAAA,IAC1C,uBAAuB;AAAA,IACvB,WAAW;AAAA,IACX;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,SAAS;AAAA,IACT,UAAU,CAAc,uCAAAC,KAAK,mBAAM;AAAA,MACjC;AAAA,IACF,CAAC,GAAG,mBAAmB,uBAAmB,gBAAG,MAAM,CAAC;AAAA,EACtD,CAAC;AACH;AAKO,IAAM,2BAAuB,2BAAW,+BAA+B;AAC9E,qBAAqB,cAAc;AACnC,IAAO,sBAAQ;",
|
|
6
6
|
"names": ["clsx", "_jsxs", "_jsx"]
|
|
7
7
|
}
|
|
@@ -60,7 +60,6 @@ function removeScreen({
|
|
|
60
60
|
return screens.filter((s) => s.id !== screen.id);
|
|
61
61
|
}
|
|
62
62
|
function goTo(state, path, options = {}) {
|
|
63
|
-
var _focusSelectorsCopy2;
|
|
64
63
|
const {
|
|
65
64
|
focusSelectors
|
|
66
65
|
} = state;
|
|
@@ -85,8 +84,7 @@ function goTo(state, path, options = {}) {
|
|
|
85
84
|
}
|
|
86
85
|
let focusSelectorsCopy;
|
|
87
86
|
function getFocusSelectorsCopy() {
|
|
88
|
-
|
|
89
|
-
focusSelectorsCopy = (_focusSelectorsCopy = focusSelectorsCopy) !== null && _focusSelectorsCopy !== void 0 ? _focusSelectorsCopy : new Map(state.focusSelectors);
|
|
87
|
+
focusSelectorsCopy = focusSelectorsCopy ?? new Map(state.focusSelectors);
|
|
90
88
|
return focusSelectorsCopy;
|
|
91
89
|
}
|
|
92
90
|
if (focusTargetSelector && currentLocation.path) {
|
|
@@ -109,7 +107,7 @@ function goTo(state, path, options = {}) {
|
|
|
109
107
|
focusTargetSelector: currentFocusSelector,
|
|
110
108
|
skipFocus
|
|
111
109
|
},
|
|
112
|
-
focusSelectors:
|
|
110
|
+
focusSelectors: focusSelectorsCopy ?? focusSelectors
|
|
113
111
|
};
|
|
114
112
|
}
|
|
115
113
|
function goToParent(state, options = {}) {
|
|
@@ -236,15 +234,12 @@ function UnconnectedNavigator(props, forwardedRef) {
|
|
|
236
234
|
currentLocation,
|
|
237
235
|
matchedPath
|
|
238
236
|
} = routerState;
|
|
239
|
-
const navigatorContextValue = (0, import_element.useMemo)(() => {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
...methods
|
|
246
|
-
};
|
|
247
|
-
}, [currentLocation, matchedPath, methods]);
|
|
237
|
+
const navigatorContextValue = (0, import_element.useMemo)(() => ({
|
|
238
|
+
location: currentLocation,
|
|
239
|
+
params: matchedPath?.params ?? {},
|
|
240
|
+
match: matchedPath?.id,
|
|
241
|
+
...methods
|
|
242
|
+
}), [currentLocation, matchedPath, methods]);
|
|
248
243
|
const cx = (0, import_use_cx.useCx)();
|
|
249
244
|
const classes = (0, import_element.useMemo)(() => cx(styles.navigatorWrapper, className), [className, cx]);
|
|
250
245
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_view.View, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/navigator/navigator/component.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, useReducer } from '@wordpress/element';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\n\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { patternMatch, findParent } from '../utils/router';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport * as styles from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction addScreen({\n screens\n}, screen) {\n if (screens.some(s => s.path === screen.path)) {\n globalThis.SCRIPT_DEBUG === true ? warning(`Navigator: a screen with path ${screen.path} already exists.\nThe screen with id ${screen.id} will not be added.`) : void 0;\n return screens;\n }\n return [...screens, screen];\n}\nfunction removeScreen({\n screens\n}, screen) {\n return screens.filter(s => s.id !== screen.id);\n}\nfunction goTo(state, path, options = {}) {\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAAoC;AACpC,8BAA+B;AAC/B,qBAAoB;AAMpB,qBAAiD;AACjD,oBAAsB;AACtB,oBAAyC;AACzC,kBAAqB;AACrB,IAAAA,kBAAiC;AACjC,aAAwB;AACxB,yBAA4B;AAC5B,SAAS,UAAU;AAAA,EACjB;AACF,GAAG,QAAQ;AACT,MAAI,QAAQ,KAAK,OAAK,EAAE,SAAS,OAAO,IAAI,GAAG;AAC7C,eAAW,iBAAiB,WAAO,eAAAC,SAAQ,iCAAiC,OAAO,IAAI;AAAA,qBACtE,OAAO,EAAE,qBAAqB,IAAI;AACnD,WAAO;AAAA,EACT;AACA,SAAO,CAAC,GAAG,SAAS,MAAM;AAC5B;AACA,SAAS,aAAa;AAAA,EACpB;AACF,GAAG,QAAQ;AACT,SAAO,QAAQ,OAAO,OAAK,EAAE,OAAO,OAAO,EAAE;AAC/C;AACA,SAAS,KAAK,OAAO,MAAM,UAAU,CAAC,GAAG;AACvC,
|
|
4
|
+
"sourcesContent": ["/**\n * External dependencies\n */\n\n/**\n * WordPress dependencies\n */\nimport deprecated from '@wordpress/deprecated';\nimport { useMemo, useReducer } from '@wordpress/element';\nimport { isShallowEqual } from '@wordpress/is-shallow-equal';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\n\nimport { contextConnect, useContextSystem } from '../../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { patternMatch, findParent } from '../utils/router';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport * as styles from '../styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction addScreen({\n screens\n}, screen) {\n if (screens.some(s => s.path === screen.path)) {\n globalThis.SCRIPT_DEBUG === true ? warning(`Navigator: a screen with path ${screen.path} already exists.\nThe screen with id ${screen.id} will not be added.`) : void 0;\n return screens;\n }\n return [...screens, screen];\n}\nfunction removeScreen({\n screens\n}, screen) {\n return screens.filter(s => s.id !== screen.id);\n}\nfunction goTo(state, path, options = {}) {\n const {\n focusSelectors\n } = state;\n const currentLocation = {\n ...state.currentLocation\n };\n const {\n // Default assignments\n isBack = false,\n skipFocus = false,\n // Extract to avoid forwarding\n replace,\n focusTargetSelector,\n // Rest\n ...restOptions\n } = options;\n if (currentLocation.path === path) {\n return {\n currentLocation,\n focusSelectors\n };\n }\n let focusSelectorsCopy;\n function getFocusSelectorsCopy() {\n focusSelectorsCopy = focusSelectorsCopy ?? new Map(state.focusSelectors);\n return focusSelectorsCopy;\n }\n\n // Set a focus selector that will be used when navigating\n // back to the current location.\n if (focusTargetSelector && currentLocation.path) {\n getFocusSelectorsCopy().set(currentLocation.path, focusTargetSelector);\n }\n\n // Get the focus selector for the new location.\n let currentFocusSelector;\n if (focusSelectors.get(path)) {\n if (isBack) {\n // Use the found focus selector only when navigating back.\n currentFocusSelector = focusSelectors.get(path);\n }\n // Make a copy of the focusSelectors map to remove the focus selector\n // only if necessary (ie. a focus selector was found).\n getFocusSelectorsCopy().delete(path);\n }\n return {\n currentLocation: {\n ...restOptions,\n isInitial: false,\n path,\n isBack,\n hasRestoredFocus: false,\n focusTargetSelector: currentFocusSelector,\n skipFocus\n },\n focusSelectors: focusSelectorsCopy ?? focusSelectors\n };\n}\nfunction goToParent(state, options = {}) {\n const {\n screens,\n focusSelectors\n } = state;\n const currentLocation = {\n ...state.currentLocation\n };\n const currentPath = currentLocation.path;\n if (currentPath === undefined) {\n return {\n currentLocation,\n focusSelectors\n };\n }\n const parentPath = findParent(currentPath, screens);\n if (parentPath === undefined) {\n return {\n currentLocation,\n focusSelectors\n };\n }\n return goTo(state, parentPath, {\n ...options,\n isBack: true\n });\n}\nfunction routerReducer(state, action) {\n let {\n screens,\n currentLocation,\n matchedPath,\n focusSelectors,\n ...restState\n } = state;\n switch (action.type) {\n case 'add':\n screens = addScreen(state, action.screen);\n break;\n case 'remove':\n screens = removeScreen(state, action.screen);\n break;\n case 'goto':\n ({\n currentLocation,\n focusSelectors\n } = goTo(state, action.path, action.options));\n break;\n case 'gotoparent':\n ({\n currentLocation,\n focusSelectors\n } = goToParent(state, action.options));\n break;\n }\n\n // Return early in case there is no change\n if (screens === state.screens && currentLocation === state.currentLocation) {\n return state;\n }\n\n // Compute the matchedPath\n const currentPath = currentLocation.path;\n matchedPath = currentPath !== undefined ? patternMatch(currentPath, screens) : undefined;\n\n // If the new match is the same as the previous match,\n // return the previous one to keep immutability.\n if (matchedPath && state.matchedPath && matchedPath.id === state.matchedPath.id && isShallowEqual(matchedPath.params, state.matchedPath.params)) {\n matchedPath = state.matchedPath;\n }\n return {\n ...restState,\n screens,\n currentLocation,\n matchedPath,\n focusSelectors\n };\n}\nfunction UnconnectedNavigator(props, forwardedRef) {\n const {\n initialPath: initialPathProp,\n children,\n className,\n ...otherProps\n } = useContextSystem(props, 'Navigator');\n const [routerState, dispatch] = useReducer(routerReducer, initialPathProp, path => ({\n screens: [],\n currentLocation: {\n path,\n isInitial: true\n },\n matchedPath: undefined,\n focusSelectors: new Map(),\n initialPath: initialPathProp\n }));\n\n // The methods are constant forever, create stable references to them.\n const methods = useMemo(() => ({\n // Note: calling goBack calls `goToParent` internally, as it was established\n // that `goBack` should behave like `goToParent`, and `goToParent` should\n // be marked as deprecated.\n goBack: options => dispatch({\n type: 'gotoparent',\n options\n }),\n goTo: (path, options) => dispatch({\n type: 'goto',\n path,\n options\n }),\n goToParent: options => {\n deprecated(`wp.components.useNavigator().goToParent`, {\n since: '6.7',\n alternative: 'wp.components.useNavigator().goBack'\n });\n dispatch({\n type: 'gotoparent',\n options\n });\n },\n addScreen: screen => dispatch({\n type: 'add',\n screen\n }),\n removeScreen: screen => dispatch({\n type: 'remove',\n screen\n })\n }), []);\n const {\n currentLocation,\n matchedPath\n } = routerState;\n const navigatorContextValue = useMemo(() => ({\n location: currentLocation,\n params: matchedPath?.params ?? {},\n match: matchedPath?.id,\n ...methods\n }), [currentLocation, matchedPath, methods]);\n const cx = useCx();\n const classes = useMemo(() => cx(styles.navigatorWrapper, className), [className, cx]);\n return /*#__PURE__*/_jsx(View, {\n ref: forwardedRef,\n className: classes,\n ...otherProps,\n children: /*#__PURE__*/_jsx(NavigatorContext.Provider, {\n value: navigatorContextValue,\n children: children\n })\n });\n}\nexport const Navigator = contextConnect(UnconnectedNavigator, 'Navigator');"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,wBAAuB;AACvB,qBAAoC;AACpC,8BAA+B;AAC/B,qBAAoB;AAMpB,qBAAiD;AACjD,oBAAsB;AACtB,oBAAyC;AACzC,kBAAqB;AACrB,IAAAA,kBAAiC;AACjC,aAAwB;AACxB,yBAA4B;AAC5B,SAAS,UAAU;AAAA,EACjB;AACF,GAAG,QAAQ;AACT,MAAI,QAAQ,KAAK,OAAK,EAAE,SAAS,OAAO,IAAI,G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QAAM,SAAK,qBAAM;AACjB,QAAM,cAAU,wBAAQ,MAAM,GAAU,yBAAkB,SAAS,GAAG,CAAC,WAAW,EAAE,CAAC;AACrF,SAAoB,uCAAAC,KAAK,kBAAM;AAAA,IAC7B,KAAK;AAAA,IACL,WAAW;AAAA,IACX,GAAG;AAAA,IACH,UAAuB,uCAAAA,KAAK,iCAAiB,UAAU;AAAA,MACrD,OAAO;AAAA,MACP;AAAA,IACF,CAAC;AAAA,EACH,CAAC;AACH;AACO,IAAM,gBAAY,+BAAe,sBAAsB,WAAW;",
|
|
6
6
|
"names": ["import_context", "warning", "deprecated", "_jsx"]
|
|
7
7
|
}
|
|
@@ -111,7 +111,7 @@ function UnconnectedNavigatorScreen(props, forwardedRef) {
|
|
|
111
111
|
}
|
|
112
112
|
if (!elementToFocus) {
|
|
113
113
|
const [firstTabbable] = import_dom.focus.tabbable.find(wrapperEl);
|
|
114
|
-
elementToFocus = firstTabbable
|
|
114
|
+
elementToFocus = firstTabbable ?? wrapperEl;
|
|
115
115
|
}
|
|
116
116
|
locationRef.current.hasRestoredFocus = true;
|
|
117
117
|
elementToFocus.focus();
|