@wordpress/components 27.3.0 → 27.4.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 +39 -4
- package/build/alignment-matrix-control/cell.js.map +1 -1
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +8 -4
- package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -5
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/alignment-matrix-control/types.js.map +1 -1
- package/build/alignment-matrix-control/utils.js +4 -0
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +9 -5
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/angle-picker-control/types.js.map +1 -1
- package/build/animate/index.js +4 -0
- package/build/animate/index.js.map +1 -1
- package/build/animate/types.js.map +1 -1
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/background-view.android.js.map +1 -1
- package/build/autocomplete/background-view.ios.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/autocomplete/types.js.map +1 -1
- package/build/base-control/hooks.js.map +1 -1
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/index.native.js.map +1 -1
- package/build/base-control/styles/base-control-styles.js +10 -6
- package/build/base-control/styles/base-control-styles.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control/hook.js +1 -1
- package/build/border-box-control/border-box-control/hook.js.map +1 -1
- package/build/border-box-control/border-box-control/index.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/hook.js +1 -1
- package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/index.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/hook.js +1 -1
- package/build/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/index.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/hook.js +1 -1
- package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/index.js.map +1 -1
- package/build/border-box-control/index.js.map +1 -1
- package/build/border-box-control/styles.js +5 -1
- package/build/border-box-control/styles.js.map +1 -1
- package/build/border-box-control/types.js.map +1 -1
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +1 -1
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control/index.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/hook.js +1 -1
- package/build/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/index.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/index.js.map +1 -1
- package/build/border-control/index.js.map +1 -1
- package/build/border-control/styles.js +5 -1
- package/build/border-control/styles.js.map +1 -1
- package/build/border-control/types.js.map +1 -1
- package/build/box-control/all-input-control.js +4 -0
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/linked-button.js.map +1 -1
- package/build/box-control/styles/box-control-icon-styles.js +12 -10
- package/build/box-control/styles/box-control-icon-styles.js.map +1 -1
- package/build/box-control/styles/box-control-styles.js +11 -7
- package/build/box-control/styles/box-control-styles.js.map +1 -1
- package/build/box-control/types.js.map +1 -1
- package/build/box-control/utils.js.map +1 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/button-group/index.js +4 -0
- package/build/button-group/index.js.map +1 -1
- package/build/button-group/types.js.map +1 -1
- package/build/card/card/component.js +5 -1
- package/build/card/card/component.js.map +1 -1
- package/build/card/card/hook.js +5 -1
- package/build/card/card/hook.js.map +1 -1
- package/build/card/card/index.js.map +1 -1
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-body/hook.js +5 -1
- package/build/card/card-body/hook.js.map +1 -1
- package/build/card/card-body/index.js.map +1 -1
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-divider/hook.js +5 -1
- package/build/card/card-divider/hook.js.map +1 -1
- package/build/card/card-divider/index.js.map +1 -1
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-footer/hook.js +5 -1
- package/build/card/card-footer/hook.js.map +1 -1
- package/build/card/card-footer/index.js.map +1 -1
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-header/hook.js +5 -1
- package/build/card/card-header/hook.js.map +1 -1
- package/build/card/card-header/index.js.map +1 -1
- package/build/card/card-media/component.js.map +1 -1
- package/build/card/card-media/hook.js +5 -1
- package/build/card/card-media/hook.js.map +1 -1
- package/build/card/card-media/index.js.map +1 -1
- package/build/card/context.js.map +1 -1
- package/build/card/index.js +1 -1
- package/build/card/index.js.map +1 -1
- package/build/card/styles.js +5 -1
- package/build/card/styles.js.map +1 -1
- package/build/card/types.js.map +1 -1
- package/build/checkbox-control/index.js.map +1 -1
- package/build/checkbox-control/types.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-context.js +4 -0
- package/build/circular-option-picker/circular-option-picker-context.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option-group.js +4 -0
- package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/circular-option-picker/types.js.map +1 -1
- package/build/clipboard-button/index.js.map +1 -1
- package/build/clipboard-button/types.js.map +1 -1
- package/build/color-control/index.native.js.map +1 -1
- package/build/color-indicator/index.js +4 -0
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-indicator/index.native.js.map +1 -1
- package/build/color-indicator/types.js.map +1 -1
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +4 -3
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-palette/styles.js +6 -2
- package/build/color-palette/styles.js.map +1 -1
- package/build/color-palette/types.js.map +1 -1
- package/build/color-palette/utils.js +4 -0
- package/build/color-palette/utils.js.map +1 -1
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/hsl-input.js.map +1 -1
- package/build/color-picker/hsv-color-picker.native.js.map +1 -1
- package/build/color-picker/hue-picker.native.js +1 -1
- package/build/color-picker/hue-picker.native.js.map +1 -1
- package/build/color-picker/index.js.map +1 -1
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/legacy-adapter.js.map +1 -1
- package/build/color-picker/picker.js +4 -0
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/rgb-input.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +1 -1
- package/build/color-picker/saturation-picker.native.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/color-picker/types.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +4 -0
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/styles.js +1 -1
- package/build/combobox-control/styles.js.map +1 -1
- package/build/combobox-control/types.js.map +1 -1
- package/build/composite/current/index.js.map +1 -1
- package/build/composite/index.js.map +1 -1
- package/build/composite/legacy/index.js +6 -1
- package/build/composite/legacy/index.js.map +1 -1
- package/build/composite/v2.js.map +1 -1
- package/build/confirm-dialog/component.js +1 -1
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/confirm-dialog/index.js.map +1 -1
- package/build/confirm-dialog/styles.js +3 -1
- package/build/confirm-dialog/styles.js.map +1 -1
- package/build/confirm-dialog/types.js.map +1 -1
- package/build/context/constants.js.map +1 -1
- package/build/context/context-connect.js.map +1 -1
- package/build/context/context-system-provider.js.map +1 -1
- package/build/context/get-styled-class-name-from-key.js.map +1 -1
- package/build/context/index.js.map +1 -1
- package/build/context/use-context-system.js.map +1 -1
- package/build/context/utils.js.map +1 -1
- package/build/context/wordpress-component.js.map +1 -1
- package/build/custom-gradient-picker/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/index.native.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +7 -3
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build/custom-gradient-picker/types.js.map +1 -1
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control/index.js +6 -14
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control-v2/custom-select.js +1 -1
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/custom-select-control-v2/default-component/index.js +1 -1
- package/build/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build/custom-select-control-v2/index.js.map +1 -1
- package/build/custom-select-control-v2/item.js +5 -1
- package/build/custom-select-control-v2/item.js.map +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +15 -10
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/custom-select-control-v2/types.js.map +1 -1
- package/build/dashicon/index.js.map +1 -1
- package/build/dashicon/index.native.js +1 -1
- package/build/dashicon/index.native.js.map +1 -1
- package/build/dashicon/types.js.map +1 -1
- package/build/date-time/constants.js.map +1 -1
- package/build/date-time/date/index.js +4 -0
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/styles.js +11 -7
- package/build/date-time/date/styles.js.map +1 -1
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/date-time/styles.js +6 -2
- package/build/date-time/date-time/styles.js.map +1 -1
- package/build/date-time/index.js.map +1 -1
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/time/styles.js +15 -11
- package/build/date-time/time/styles.js.map +1 -1
- package/build/date-time/time/timezone.js.map +1 -1
- package/build/date-time/types.js.map +1 -1
- package/build/date-time/utils.js.map +1 -1
- package/build/dimension-control/index.js +1 -1
- package/build/dimension-control/index.js.map +1 -1
- package/build/dimension-control/sizes.js +4 -0
- package/build/dimension-control/sizes.js.map +1 -1
- package/build/dimension-control/types.js.map +1 -1
- package/build/disabled/index.js.map +1 -1
- package/build/disabled/index.native.js.map +1 -1
- package/build/disabled/styles/disabled-styles.js +3 -1
- package/build/disabled/styles/disabled-styles.js.map +1 -1
- package/build/disabled/types.js.map +1 -1
- package/build/disclosure/index.js +5 -1
- package/build/disclosure/index.js.map +1 -1
- package/build/disclosure/types.js.map +1 -1
- package/build/divider/component.js +5 -1
- package/build/divider/component.js.map +1 -1
- package/build/divider/index.js.map +1 -1
- package/build/divider/styles.js +6 -2
- package/build/divider/styles.js.map +1 -1
- package/build/divider/types.js.map +1 -1
- package/build/draggable/index.js +4 -0
- package/build/draggable/index.js.map +1 -1
- package/build/draggable/index.native.js +1 -1
- package/build/draggable/index.native.js.map +1 -1
- package/build/draggable/types.js.map +1 -1
- package/build/drop-zone/index.js.map +1 -1
- package/build/drop-zone/provider.js.map +1 -1
- package/build/drop-zone/types.js.map +1 -1
- package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown/index.native.js.map +1 -1
- package/build/dropdown/styles.js +1 -1
- package/build/dropdown/styles.js.map +1 -1
- package/build/dropdown/types.js.map +1 -1
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/dropdown-menu/types.js.map +1 -1
- package/build/dropdown-menu-v2/index.js +1 -1
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js +20 -15
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/dropdown-menu-v2/types.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/duotone-picker/color-list-picker/types.js.map +1 -1
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/duotone-swatch.js.map +1 -1
- package/build/duotone-picker/index.js.map +1 -1
- package/build/duotone-picker/types.js.map +1 -1
- package/build/duotone-picker/utils.js +4 -0
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/elevation/component.js.map +1 -1
- package/build/elevation/hook.js +5 -1
- package/build/elevation/hook.js.map +1 -1
- package/build/elevation/index.js.map +1 -1
- package/build/elevation/styles.js +3 -1
- package/build/elevation/styles.js.map +1 -1
- package/build/elevation/types.js.map +1 -1
- package/build/external-link/index.js +7 -10
- package/build/external-link/index.js.map +1 -1
- package/build/external-link/index.native.js.map +1 -1
- package/build/external-link/types.js.map +1 -1
- package/build/flex/context.js.map +1 -1
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex/hook.js +5 -1
- package/build/flex/flex/hook.js.map +1 -1
- package/build/flex/flex/index.js.map +1 -1
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-block/hook.js.map +1 -1
- package/build/flex/flex-block/index.js.map +1 -1
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/flex/flex-item/hook.js +5 -1
- package/build/flex/flex-item/hook.js.map +1 -1
- package/build/flex/flex-item/index.js.map +1 -1
- package/build/flex/index.js +1 -1
- package/build/flex/index.js.map +1 -1
- package/build/flex/styles.js +3 -1
- package/build/flex/styles.js.map +1 -1
- package/build/flex/types.js.map +1 -1
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/focal-point.js.map +1 -1
- package/build/focal-point-picker/focal-point.native.js.map +1 -1
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/media.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +14 -10
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/focal-point-picker/types.js.map +1 -1
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/focusable-iframe/index.js +4 -0
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/focusable-iframe/types.js.map +1 -1
- package/build/font-size-picker/constants.js.map +1 -1
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build/font-size-picker/index.js +1 -1
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +1 -1
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/font-size-picker/styles.js +10 -6
- package/build/font-size-picker/styles.js.map +1 -1
- package/build/font-size-picker/types.js.map +1 -1
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/footer-message-control/index.native.js.map +1 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-file-upload/types.js.map +1 -1
- package/build/form-toggle/index.js +13 -3
- package/build/form-toggle/index.js.map +1 -1
- package/build/form-toggle/types.js.map +1 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/styles.js +1 -1
- package/build/form-token-field/styles.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +4 -0
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js +4 -0
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/form-token-field/token.js.map +1 -1
- package/build/form-token-field/types.js.map +1 -1
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js.map +1 -1
- package/build/grid/component.js.map +1 -1
- package/build/grid/hook.js +4 -0
- package/build/grid/hook.js.map +1 -1
- package/build/grid/index.js.map +1 -1
- package/build/grid/types.js.map +1 -1
- package/build/grid/utils.js.map +1 -1
- package/build/guide/icons.js.map +1 -1
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js.map +1 -1
- package/build/guide/page.js +4 -0
- package/build/guide/page.js.map +1 -1
- package/build/guide/types.js.map +1 -1
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js.map +1 -1
- package/build/h-stack/index.js.map +1 -1
- package/build/h-stack/types.js.map +1 -1
- package/build/h-stack/utils.js.map +1 -1
- package/build/heading/component.js.map +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/heading/index.js.map +1 -1
- package/build/heading/types.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build/higher-order/with-focus-return/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/higher-order/with-notices/types.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/icon/index.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/index.native.js +1 -1
- package/build/index.native.js.map +1 -1
- package/build/input-control/backdrop.js +2 -4
- package/build/input-control/backdrop.js.map +1 -1
- package/build/input-control/index.js +0 -4
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +1 -5
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js +4 -9
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js.map +1 -1
- package/build/input-control/input-suffix-wrapper.js.map +1 -1
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/reducer/actions.js.map +1 -1
- package/build/input-control/reducer/reducer.js +5 -1
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/reducer/state.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +80 -107
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/input-control/types.js.map +1 -1
- package/build/input-control/utils.js +4 -0
- package/build/input-control/utils.js.map +1 -1
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/context.js +4 -0
- package/build/item-group/context.js.map +1 -1
- package/build/item-group/index.js.map +1 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item/hook.js +5 -1
- package/build/item-group/item/hook.js.map +1 -1
- package/build/item-group/item/index.js.map +1 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/item-group/item-group/hook.js +1 -1
- package/build/item-group/item-group/hook.js.map +1 -1
- package/build/item-group/item-group/index.js.map +1 -1
- package/build/item-group/styles.js +5 -1
- package/build/item-group/styles.js.map +1 -1
- package/build/item-group/types.js.map +1 -1
- package/build/keyboard-shortcuts/index.js +4 -0
- package/build/keyboard-shortcuts/index.js.map +1 -1
- package/build/keyboard-shortcuts/index.native.js.map +1 -1
- package/build/keyboard-shortcuts/types.js.map +1 -1
- package/build/lock-unlock.js.map +1 -1
- package/build/menu-group/index.js +4 -0
- package/build/menu-group/index.js.map +1 -1
- package/build/menu-group/types.js.map +1 -1
- package/build/menu-item/index.js.map +1 -1
- package/build/menu-item/types.js.map +1 -1
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/menu-items-choice/types.js.map +1 -1
- package/build/mobile/audio-player/audio-url-parser.native.js.map +1 -1
- package/build/mobile/audio-player/index.native.js.map +1 -1
- package/build/mobile/autocompletion-items.native.js.map +1 -1
- package/build/mobile/badge/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
- package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +5 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/clipboard/index.native.js.map +1 -1
- package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build/mobile/color-settings/utils.native.js.map +1 -1
- package/build/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build/mobile/dashicons/index.native.js.map +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/gridicons/index.native.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/image/constants.js.map +1 -1
- package/build/mobile/image/icon-customize.native.js.map +1 -1
- package/build/mobile/image/icon-retry.native.js.map +1 -1
- package/build/mobile/image/image-editing-button.native.js.map +1 -1
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/image/utils/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.android.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -1
- package/build/mobile/layout-animation/index.native.js.map +1 -1
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/link-settings/link-rel.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/alignments.native.js.map +1 -1
- package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build/mobile/utils/index.native.js.map +1 -1
- package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +1 -1
- package/build/modal/index.js.map +1 -1
- package/build/modal/types.js.map +1 -1
- package/build/navigable-container/container.js +4 -0
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/index.js.map +1 -1
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigable-container/types.js.map +1 -1
- package/build/navigation/back-button/index.js +4 -0
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/constants.js.map +1 -1
- package/build/navigation/context.js.map +1 -1
- package/build/navigation/group/context.js +4 -0
- package/build/navigation/group/context.js.map +1 -1
- package/build/navigation/group/index.js +4 -0
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/index.js +2 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base-content.js.map +1 -1
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +4 -0
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build/navigation/menu/context.js +4 -0
- package/build/navigation/menu/context.js.map +1 -1
- package/build/navigation/menu/index.js +3 -0
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +19 -13
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigation/types.js.map +1 -1
- package/build/navigation/use-create-navigation-tree.js.map +1 -1
- package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build/navigation/utils.js.map +1 -1
- package/build/navigator/context.js +4 -0
- package/build/navigator/context.js.map +1 -1
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-back-button/hook.js +4 -0
- package/build/navigator/navigator-back-button/hook.js.map +1 -1
- package/build/navigator/navigator-back-button/index.js.map +1 -1
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-button/hook.js +4 -0
- package/build/navigator/navigator-button/hook.js.map +1 -1
- package/build/navigator/navigator-button/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +9 -1
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-provider/index.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +5 -1
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-screen/index.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/index.js.map +1 -1
- package/build/navigator/styles.js +3 -1
- package/build/navigator/styles.js.map +1 -1
- package/build/navigator/types.js.map +1 -1
- package/build/navigator/use-navigator.js.map +1 -1
- package/build/navigator/utils/router.js +4 -0
- package/build/navigator/utils/router.js.map +1 -1
- package/build/notice/index.js.map +1 -1
- package/build/notice/index.native.js.map +1 -1
- package/build/notice/list.js.map +1 -1
- package/build/notice/list.native.js.map +1 -1
- package/build/notice/types.js.map +1 -1
- package/build/number-control/index.js +1 -1
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/styles/number-control-styles.js +7 -3
- package/build/number-control/styles/number-control-styles.js.map +1 -1
- package/build/number-control/types.js.map +1 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +15 -11
- package/build/palette-edit/styles.js.map +1 -1
- package/build/palette-edit/types.js.map +1 -1
- package/build/panel/actions.native.js.map +1 -1
- package/build/panel/body.js +4 -0
- package/build/panel/body.js.map +1 -1
- package/build/panel/body.native.js.map +1 -1
- package/build/panel/bottom-separator-cover.native.js.map +1 -1
- package/build/panel/header.js.map +1 -1
- package/build/panel/index.js.map +1 -1
- package/build/panel/row.js +4 -0
- package/build/panel/row.js.map +1 -1
- package/build/panel/types.js.map +1 -1
- package/build/placeholder/index.js.map +1 -1
- package/build/placeholder/types.js.map +1 -1
- package/build/popover/index.js +2 -0
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/popover/utils.js.map +1 -1
- package/build/private-apis.js.map +1 -1
- package/build/private-apis.native.js.map +1 -1
- package/build/progress-bar/index.js +5 -3
- package/build/progress-bar/index.js.map +1 -1
- package/build/progress-bar/styles.js +21 -12
- package/build/progress-bar/styles.js.map +1 -1
- package/build/progress-bar/types.js.map +1 -1
- package/build/query-controls/author-select.js.map +1 -1
- package/build/query-controls/category-select.js.map +1 -1
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/index.native.js.map +1 -1
- package/build/query-controls/terms.js.map +1 -1
- package/build/query-controls/types.js.map +1 -1
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js.map +1 -1
- package/build/radio-control/types.js.map +1 -1
- package/build/radio-group/context.js.map +1 -1
- package/build/radio-group/index.js +1 -1
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +1 -1
- package/build/radio-group/radio.js.map +1 -1
- package/build/radio-group/types.js.map +1 -1
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/index.native.js.map +1 -1
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +20 -16
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js.map +1 -1
- package/build/range-control/types.js.map +1 -1
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/index.native.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +4 -0
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +9 -5
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/responsive-wrapper/index.js +4 -0
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/responsive-wrapper/types.js.map +1 -1
- package/build/sandbox/index.js +4 -0
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/sandbox/types.js.map +1 -1
- package/build/scroll-lock/index.js.map +1 -1
- package/build/scrollable/component.js.map +1 -1
- package/build/scrollable/hook.js +5 -1
- package/build/scrollable/hook.js.map +1 -1
- package/build/scrollable/index.js.map +1 -1
- package/build/scrollable/styles.js +5 -1
- package/build/scrollable/styles.js.map +1 -1
- package/build/scrollable/types.js.map +1 -1
- package/build/search-control/index.js.map +1 -1
- package/build/search-control/index.native.js.map +1 -1
- package/build/search-control/styles.js +2 -2
- package/build/search-control/styles.js.map +1 -1
- package/build/search-control/types.js.map +1 -1
- package/build/select-control/chevron-down.js.map +1 -1
- package/build/select-control/index.js +0 -15
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/index.native.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +3 -3
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/select-control/types.js.map +1 -1
- package/build/shortcut/index.js.map +1 -1
- package/build/shortcut/types.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/observable-map.js +68 -0
- package/build/slot-fill/bubbles-virtually/observable-map.js.map +1 -0
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +5 -5
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -12
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -12
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +2 -12
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/context.js +4 -0
- package/build/slot-fill/context.js.map +1 -1
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/index.native.js.map +1 -1
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/slot-fill/use-slot.js.map +1 -1
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/snackbar/types.js.map +1 -1
- package/build/spacer/component.js.map +1 -1
- package/build/spacer/hook.js +4 -0
- package/build/spacer/hook.js.map +1 -1
- package/build/spacer/index.js.map +1 -1
- package/build/spacer/types.js.map +1 -1
- package/build/spinner/index.js.map +1 -1
- package/build/spinner/index.native.js.map +1 -1
- package/build/spinner/styles.js +8 -4
- package/build/spinner/styles.js.map +1 -1
- package/build/style-provider/index.js +5 -1
- package/build/style-provider/index.js.map +1 -1
- package/build/style-provider/index.native.js.map +1 -1
- package/build/style-provider/types.js.map +1 -1
- package/build/surface/component.js.map +1 -1
- package/build/surface/hook.js +1 -1
- package/build/surface/hook.js.map +1 -1
- package/build/surface/index.js.map +1 -1
- package/build/surface/styles.js.map +1 -1
- package/build/surface/types.js.map +1 -1
- package/build/tab-panel/index.js +1 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tab-panel/types.js.map +1 -1
- package/build/tabs/context.js +4 -0
- package/build/tabs/context.js.map +1 -1
- package/build/tabs/index.js +12 -1
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +10 -5
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tab.js +4 -0
- package/build/tabs/tab.js.map +1 -1
- package/build/tabs/tablist.js +5 -1
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/tabpanel.js +4 -0
- package/build/tabs/tabpanel.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/text/component.js.map +1 -1
- package/build/text/get-line-height.js.map +1 -1
- package/build/text/hook.js +8 -2
- package/build/text/hook.js.map +1 -1
- package/build/text/index.js.map +1 -1
- package/build/text/index.native.js.map +1 -1
- package/build/text/styles/emotion-css.native.js.map +1 -1
- package/build/text/styles/font-family.native.js.map +1 -1
- package/build/text/styles/text-mixins.native.js.map +1 -1
- package/build/text/styles.js +12 -8
- package/build/text/styles.js.map +1 -1
- package/build/text/types.js.map +1 -1
- package/build/text/utils.js +23 -0
- package/build/text/utils.js.map +1 -1
- package/build/text-control/index.js.map +1 -1
- package/build/text-control/index.native.js.map +1 -1
- package/build/text-control/types.js.map +1 -1
- package/build/text-highlight/index.js.map +1 -1
- package/build/text-highlight/types.js.map +1 -1
- package/build/textarea-control/index.js.map +1 -1
- package/build/textarea-control/index.native.js.map +1 -1
- package/build/textarea-control/styles/textarea-control-styles.js +1 -1
- package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build/textarea-control/types.js.map +1 -1
- package/build/theme/color-algorithms.js +4 -0
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/theme/index.js +4 -0
- package/build/theme/index.js.map +1 -1
- package/build/theme/styles.js +8 -2
- package/build/theme/styles.js.map +1 -1
- package/build/theme/types.js.map +1 -1
- package/build/tip/index.js +4 -0
- package/build/tip/index.js.map +1 -1
- package/build/tip/types.js.map +1 -1
- package/build/toggle-control/index.js +6 -4
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-control/types.js.map +1 -1
- package/build/toggle-group-control/context.js +4 -0
- package/build/toggle-group-control/context.js.map +1 -1
- package/build/toggle-group-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +5 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +6 -2
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/utils.js +4 -0
- package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +4 -0
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +5 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +7 -3
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js +4 -0
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/index.js.map +1 -1
- package/build/toggle-group-control/types.js.map +1 -1
- package/build/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.js +1 -1
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -1
- package/build/toolbar/toolbar/types.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
- package/build/toolbar/toolbar-button/types.js.map +1 -1
- package/build/toolbar/toolbar-context/index.js.map +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js +4 -0
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build/toolbar/toolbar-group/types.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +1 -1
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build/toolbar/toolbar-item/types.js.map +1 -1
- package/build/tools-panel/context.js +4 -0
- package/build/tools-panel/context.js.map +1 -1
- package/build/tools-panel/index.js.map +1 -1
- package/build/tools-panel/styles.js +7 -3
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +1 -1
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel/index.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +1 -1
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/index.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +1 -1
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/index.js.map +1 -1
- package/build/tools-panel/types.js.map +1 -1
- package/build/tooltip/index.js +5 -1
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tooltip/types.js.map +1 -1
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-grid/item.js.map +1 -1
- package/build/tree-grid/roving-tab-index-context.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/tree-grid/roving-tab-index.js.map +1 -1
- package/build/tree-grid/row.js +4 -0
- package/build/tree-grid/row.js.map +1 -1
- package/build/tree-grid/types.js.map +1 -1
- package/build/tree-select/index.js.map +1 -1
- package/build/tree-select/types.js.map +1 -1
- package/build/truncate/component.js.map +1 -1
- package/build/truncate/hook.js +9 -2
- package/build/truncate/hook.js.map +1 -1
- package/build/truncate/index.js.map +1 -1
- package/build/truncate/styles.js +3 -1
- package/build/truncate/styles.js.map +1 -1
- package/build/truncate/types.js.map +1 -1
- package/build/truncate/utils.js.map +1 -1
- package/build/unit-control/index.js +4 -0
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +6 -3
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/unit-control/types.js.map +1 -1
- package/build/unit-control/unit-select-control.js +4 -0
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +4 -0
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/base-label.js +3 -1
- package/build/utils/base-label.js.map +1 -1
- package/build/utils/box-sizing.js +3 -1
- package/build/utils/box-sizing.js.map +1 -1
- package/build/utils/breakpoint-values.js.map +1 -1
- package/build/utils/breakpoint.js.map +1 -1
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/colors.js.map +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/font-size.js.map +1 -1
- package/build/utils/font-values.js.map +1 -1
- package/build/utils/font.js.map +1 -1
- package/build/utils/get-valid-children.js.map +1 -1
- package/build/utils/hooks/emotion.d.js.map +1 -1
- package/build/utils/hooks/index.js.map +1 -1
- package/build/utils/hooks/use-controlled-state.js.map +1 -1
- package/build/utils/hooks/use-controlled-value.js.map +1 -1
- package/build/utils/hooks/use-cx.js +2 -0
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/utils/hooks/use-update-effect.js.map +1 -1
- package/build/utils/index.js.map +1 -1
- package/build/utils/input/base.js.map +1 -1
- package/build/utils/input/index.js.map +1 -1
- package/build/utils/input/input-control.js.map +1 -1
- package/build/utils/math.js.map +1 -1
- package/build/utils/reduce-motion.js +4 -0
- package/build/utils/reduce-motion.js.map +1 -1
- package/build/utils/rtl.js +2 -2
- package/build/utils/rtl.js.map +1 -1
- package/build/utils/space.js.map +1 -1
- package/build/utils/strings.js.map +1 -1
- package/build/utils/style-mixins.js.map +1 -1
- package/build/utils/types.js.map +1 -1
- package/build/utils/unit-values.js.map +1 -1
- package/build/utils/use-deprecated-props.js.map +1 -1
- package/build/utils/use-responsive-value.js.map +1 -1
- package/build/utils/values.js.map +1 -1
- package/build/utils/with-ignore-ime-events.js.map +1 -1
- package/build/v-stack/component.js.map +1 -1
- package/build/v-stack/hook.js.map +1 -1
- package/build/v-stack/index.js.map +1 -1
- package/build/v-stack/types.js.map +1 -1
- package/build/view/component.js +5 -1
- package/build/view/component.js.map +1 -1
- package/build/view/index.js.map +1 -1
- package/build/view/types.js.map +1 -1
- package/build/visually-hidden/component.js.map +1 -1
- package/build/visually-hidden/index.js.map +1 -1
- package/build/visually-hidden/styles.js.map +1 -1
- package/build/visually-hidden/types.js.map +1 -1
- package/build/z-stack/component.js.map +1 -1
- package/build/z-stack/index.js.map +1 -1
- package/build/z-stack/styles.js +5 -3
- package/build/z-stack/styles.js.map +1 -1
- package/build/z-stack/types.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +3 -3
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +4 -4
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/alignment-matrix-control/types.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +3 -3
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/angle-picker-control/types.js.map +1 -1
- package/build-module/animate/index.js.map +1 -1
- package/build-module/animate/types.js.map +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/background-view.android.js.map +1 -1
- package/build-module/autocomplete/background-view.ios.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/autocomplete/types.js.map +1 -1
- package/build-module/base-control/hooks.js.map +1 -1
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/index.native.js.map +1 -1
- package/build-module/base-control/styles/base-control-styles.js +5 -5
- package/build-module/base-control/styles/base-control-styles.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/index.js.map +1 -1
- package/build-module/border-box-control/index.js.map +1 -1
- package/build-module/border-box-control/styles.js.map +1 -1
- package/build-module/border-box-control/types.js.map +1 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control/index.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/index.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/index.js.map +1 -1
- package/build-module/border-control/index.js.map +1 -1
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/border-control/types.js.map +1 -1
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/linked-button.js.map +1 -1
- package/build-module/box-control/styles/box-control-icon-styles.js +3 -3
- package/build-module/box-control/styles/box-control-icon-styles.js.map +1 -1
- package/build-module/box-control/styles/box-control-styles.js +1 -1
- package/build-module/box-control/styles/box-control-styles.js.map +1 -1
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/button-group/types.js.map +1 -1
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card/hook.js.map +1 -1
- package/build-module/card/card/index.js.map +1 -1
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-body/hook.js.map +1 -1
- package/build-module/card/card-body/index.js.map +1 -1
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-divider/hook.js.map +1 -1
- package/build-module/card/card-divider/index.js.map +1 -1
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-footer/hook.js.map +1 -1
- package/build-module/card/card-footer/index.js.map +1 -1
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-header/hook.js.map +1 -1
- package/build-module/card/card-header/index.js.map +1 -1
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/card/card-media/hook.js.map +1 -1
- package/build-module/card/card-media/index.js.map +1 -1
- package/build-module/card/context.js.map +1 -1
- package/build-module/card/index.js.map +1 -1
- package/build-module/card/styles.js.map +1 -1
- package/build-module/card/types.js.map +1 -1
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/checkbox-control/types.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-context.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/circular-option-picker/types.js.map +1 -1
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/clipboard-button/types.js.map +1 -1
- package/build-module/color-control/index.native.js.map +1 -1
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-indicator/index.native.js.map +1 -1
- package/build-module/color-indicator/types.js.map +1 -1
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +4 -3
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-palette/styles.js.map +1 -1
- package/build-module/color-palette/types.js.map +1 -1
- package/build-module/color-palette/utils.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hsl-input.js.map +1 -1
- package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
- package/build-module/color-picker/hue-picker.native.js.map +1 -1
- package/build-module/color-picker/index.js.map +1 -1
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/legacy-adapter.js.map +1 -1
- package/build-module/color-picker/picker.js.map +1 -1
- package/build-module/color-picker/rgb-input.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js.map +1 -1
- package/build-module/color-picker/styles.js +2 -2
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/color-picker/types.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/styles.js.map +1 -1
- package/build-module/combobox-control/types.js.map +1 -1
- package/build-module/composite/current/index.js.map +1 -1
- package/build-module/composite/index.js.map +1 -1
- package/build-module/composite/legacy/index.js +6 -0
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/composite/v2.js.map +1 -1
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/confirm-dialog/index.js.map +1 -1
- package/build-module/confirm-dialog/styles.js.map +1 -1
- package/build-module/confirm-dialog/types.js.map +1 -1
- package/build-module/context/constants.js.map +1 -1
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/context/context-system-provider.js.map +1 -1
- package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
- package/build-module/context/index.js.map +1 -1
- package/build-module/context/use-context-system.js.map +1 -1
- package/build-module/context/utils.js.map +1 -1
- package/build-module/context/wordpress-component.js.map +1 -1
- package/build-module/custom-gradient-picker/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.native.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build-module/custom-gradient-picker/types.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js +7 -15
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js.map +1 -1
- package/build-module/custom-select-control-v2/item.js.map +1 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +3 -3
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/custom-select-control-v2/types.js.map +1 -1
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/dashicon/index.native.js.map +1 -1
- package/build-module/dashicon/types.js.map +1 -1
- package/build-module/date-time/constants.js.map +1 -1
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/styles.js +3 -3
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/date-time/styles.js.map +1 -1
- package/build-module/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time/styles.js +6 -6
- package/build-module/date-time/time/styles.js.map +1 -1
- package/build-module/date-time/time/timezone.js.map +1 -1
- package/build-module/date-time/types.js.map +1 -1
- package/build-module/date-time/utils.js.map +1 -1
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/dimension-control/sizes.js.map +1 -1
- package/build-module/dimension-control/types.js.map +1 -1
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/disabled/index.native.js.map +1 -1
- package/build-module/disabled/styles/disabled-styles.js.map +1 -1
- package/build-module/disabled/types.js.map +1 -1
- package/build-module/disclosure/index.js.map +1 -1
- package/build-module/disclosure/types.js.map +1 -1
- package/build-module/divider/component.js +5 -0
- package/build-module/divider/component.js.map +1 -1
- package/build-module/divider/index.js.map +1 -1
- package/build-module/divider/styles.js +1 -1
- package/build-module/divider/styles.js.map +1 -1
- package/build-module/divider/types.js.map +1 -1
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/draggable/types.js.map +1 -1
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/drop-zone/provider.js.map +1 -1
- package/build-module/drop-zone/types.js.map +1 -1
- package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown/index.native.js.map +1 -1
- package/build-module/dropdown/styles.js +1 -1
- package/build-module/dropdown/styles.js.map +1 -1
- package/build-module/dropdown/types.js.map +1 -1
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/dropdown-menu/types.js.map +1 -1
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/styles.js +4 -4
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/dropdown-menu-v2/types.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/types.js.map +1 -1
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
- package/build-module/duotone-picker/index.js.map +1 -1
- package/build-module/duotone-picker/types.js.map +1 -1
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/elevation/index.js.map +1 -1
- package/build-module/elevation/styles.js.map +1 -1
- package/build-module/elevation/types.js.map +1 -1
- package/build-module/external-link/index.js +8 -10
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/external-link/index.native.js.map +1 -1
- package/build-module/external-link/types.js.map +1 -1
- package/build-module/flex/context.js.map +1 -1
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/flex/flex/index.js.map +1 -1
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-block/hook.js.map +1 -1
- package/build-module/flex/flex-block/index.js.map +1 -1
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/flex/flex-item/hook.js.map +1 -1
- package/build-module/flex/flex-item/index.js.map +1 -1
- package/build-module/flex/index.js.map +1 -1
- package/build-module/flex/styles.js.map +1 -1
- package/build-module/flex/types.js.map +1 -1
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/media.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +5 -5
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/focal-point-picker/types.js.map +1 -1
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/focusable-iframe/types.js.map +1 -1
- package/build-module/font-size-picker/constants.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/font-size-picker/styles.js +2 -2
- package/build-module/font-size-picker/styles.js.map +1 -1
- package/build-module/font-size-picker/types.js.map +1 -1
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/footer-message-control/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-file-upload/types.js.map +1 -1
- package/build-module/form-toggle/index.js +8 -3
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-toggle/types.js.map +1 -1
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/styles.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/form-token-field/types.js.map +1 -1
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js.map +1 -1
- package/build-module/grid/component.js.map +1 -1
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/grid/index.js.map +1 -1
- package/build-module/grid/types.js.map +1 -1
- package/build-module/grid/utils.js.map +1 -1
- package/build-module/guide/icons.js.map +1 -1
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/guide/page.js.map +1 -1
- package/build-module/guide/types.js.map +1 -1
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/h-stack/index.js.map +1 -1
- package/build-module/h-stack/types.js.map +1 -1
- package/build-module/h-stack/utils.js.map +1 -1
- package/build-module/heading/component.js.map +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/heading/index.js.map +1 -1
- package/build-module/heading/types.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build-module/higher-order/with-focus-return/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/higher-order/with-notices/types.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/backdrop.js +2 -4
- package/build-module/input-control/backdrop.js.map +1 -1
- package/build-module/input-control/index.js +1 -5
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -5
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +0 -9
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/reducer/actions.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/reducer/state.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +76 -103
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/input-control/types.js.map +1 -1
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/context.js.map +1 -1
- package/build-module/item-group/index.js.map +1 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/item-group/item/index.js.map +1 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/item-group/item-group/hook.js.map +1 -1
- package/build-module/item-group/item-group/index.js.map +1 -1
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/item-group/types.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.native.js.map +1 -1
- package/build-module/keyboard-shortcuts/types.js.map +1 -1
- package/build-module/lock-unlock.js.map +1 -1
- package/build-module/menu-group/index.js.map +1 -1
- package/build-module/menu-group/types.js.map +1 -1
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/menu-item/types.js.map +1 -1
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/menu-items-choice/types.js.map +1 -1
- package/build-module/mobile/audio-player/audio-url-parser.native.js.map +1 -1
- package/build-module/mobile/audio-player/index.native.js.map +1 -1
- package/build-module/mobile/autocompletion-items.native.js.map +1 -1
- package/build-module/mobile/badge/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/bottom-sheet-navigation-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/action-button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/apply-button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +5 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/clipboard/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/utils.native.js.map +1 -1
- package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build-module/mobile/dashicons/index.native.js.map +1 -1
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/gridicons/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/image/constants.js.map +1 -1
- package/build-module/mobile/image/icon-customize.native.js.map +1 -1
- package/build-module/mobile/image/icon-retry.native.js.map +1 -1
- package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/image/utils/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-keyboard-offset.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-caret-position.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/use-text-input-offset.native.js.map +1 -1
- package/build-module/mobile/layout-animation/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-rel.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/alignments.native.js.map +1 -1
- package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build-module/mobile/utils/index.native.js.map +1 -1
- package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/modal/types.js.map +1 -1
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/index.js.map +1 -1
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigable-container/types.js.map +1 -1
- package/build-module/navigation/back-button/index.js +4 -0
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/constants.js.map +1 -1
- package/build-module/navigation/context.js.map +1 -1
- package/build-module/navigation/group/context.js.map +1 -1
- package/build-module/navigation/group/index.js +4 -0
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +2 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base-content.js.map +1 -1
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +4 -0
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build-module/navigation/menu/context.js.map +1 -1
- package/build-module/navigation/menu/index.js +3 -0
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +9 -9
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigation/types.js.map +1 -1
- package/build-module/navigation/use-create-navigation-tree.js.map +1 -1
- package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build-module/navigation/utils.js.map +1 -1
- package/build-module/navigator/context.js.map +1 -1
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-back-button/index.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/hook.js.map +1 -1
- package/build-module/navigator/navigator-button/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +4 -0
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-provider/index.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/index.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/index.js.map +1 -1
- package/build-module/navigator/styles.js.map +1 -1
- package/build-module/navigator/types.js.map +1 -1
- package/build-module/navigator/use-navigator.js.map +1 -1
- package/build-module/navigator/utils/router.js.map +1 -1
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/notice/types.js.map +1 -1
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/styles/number-control-styles.js.map +1 -1
- package/build-module/number-control/types.js.map +1 -1
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +1 -1
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/palette-edit/types.js.map +1 -1
- package/build-module/panel/actions.native.js.map +1 -1
- package/build-module/panel/body.js.map +1 -1
- package/build-module/panel/body.native.js.map +1 -1
- package/build-module/panel/bottom-separator-cover.native.js.map +1 -1
- package/build-module/panel/header.js.map +1 -1
- package/build-module/panel/index.js.map +1 -1
- package/build-module/panel/row.js +5 -0
- package/build-module/panel/row.js.map +1 -1
- package/build-module/panel/types.js.map +1 -1
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/placeholder/types.js.map +1 -1
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/private-apis.native.js.map +1 -1
- package/build-module/progress-bar/index.js +4 -2
- package/build-module/progress-bar/index.js.map +1 -1
- package/build-module/progress-bar/styles.js +16 -11
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/progress-bar/types.js.map +1 -1
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/query-controls/types.js.map +1 -1
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/radio-control/types.js.map +1 -1
- package/build-module/radio-group/context.js.map +1 -1
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/radio-group/types.js.map +1 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +14 -14
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/range-control/types.js.map +1 -1
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/index.native.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +3 -3
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/responsive-wrapper/types.js.map +1 -1
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/sandbox/types.js.map +1 -1
- package/build-module/scroll-lock/index.js.map +1 -1
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/scrollable/index.js.map +1 -1
- package/build-module/scrollable/styles.js.map +1 -1
- package/build-module/scrollable/types.js.map +1 -1
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/search-control/styles.js +1 -1
- package/build-module/search-control/styles.js.map +1 -1
- package/build-module/search-control/types.js.map +1 -1
- package/build-module/select-control/chevron-down.js.map +1 -1
- package/build-module/select-control/index.js +1 -16
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/index.native.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +2 -2
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/select-control/types.js.map +1 -1
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/shortcut/types.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/observable-map.js +60 -0
- package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +1 -0
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -6
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -12
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +2 -12
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +2 -12
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/context.js.map +1 -1
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/index.native.js.map +1 -1
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/slot-fill/use-slot.js.map +1 -1
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/snackbar/types.js.map +1 -1
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/spacer/types.js.map +1 -1
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/index.native.js.map +1 -1
- package/build-module/spinner/styles.js +3 -3
- package/build-module/spinner/styles.js.map +1 -1
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/style-provider/index.native.js.map +1 -1
- package/build-module/style-provider/types.js.map +1 -1
- package/build-module/surface/component.js.map +1 -1
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/surface/index.js.map +1 -1
- package/build-module/surface/styles.js.map +1 -1
- package/build-module/surface/types.js.map +1 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tab-panel/types.js.map +1 -1
- package/build-module/tabs/context.js.map +1 -1
- package/build-module/tabs/index.js +7 -0
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +1 -1
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/tabpanel.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/text/component.js.map +1 -1
- package/build-module/text/get-line-height.js.map +1 -1
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/index.js.map +1 -1
- package/build-module/text/index.native.js.map +1 -1
- package/build-module/text/styles/emotion-css.native.js.map +1 -1
- package/build-module/text/styles/font-family.native.js.map +1 -1
- package/build-module/text/styles/text-mixins.native.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/text/types.js.map +1 -1
- package/build-module/text/utils.js.map +1 -1
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/text-control/index.native.js.map +1 -1
- package/build-module/text-control/types.js.map +1 -1
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/text-highlight/types.js.map +1 -1
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/textarea-control/index.native.js.map +1 -1
- package/build-module/textarea-control/styles/textarea-control-styles.js +1 -1
- package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
- package/build-module/textarea-control/types.js.map +1 -1
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/theme/index.js.map +1 -1
- package/build-module/theme/styles.js +1 -1
- package/build-module/theme/styles.js.map +1 -1
- package/build-module/theme/types.js.map +1 -1
- package/build-module/tip/index.js.map +1 -1
- package/build-module/tip/types.js.map +1 -1
- package/build-module/toggle-control/index.js +6 -4
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-control/types.js.map +1 -1
- package/build-module/toggle-group-control/context.js.map +1 -1
- package/build-module/toggle-group-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +2 -2
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-icon/index.js.map +1 -1
- package/build-module/toggle-group-control/types.js.map +1 -1
- package/build-module/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar/types.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-button/types.js.map +1 -1
- package/build-module/toolbar/toolbar-context/index.js.map +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-group/types.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build-module/toolbar/toolbar-item/types.js.map +1 -1
- package/build-module/tools-panel/context.js.map +1 -1
- package/build-module/tools-panel/index.js.map +1 -1
- package/build-module/tools-panel/styles.js +2 -2
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/index.js.map +1 -1
- package/build-module/tools-panel/types.js.map +1 -1
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tooltip/types.js.map +1 -1
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-grid/item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-context.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index.js.map +1 -1
- package/build-module/tree-grid/row.js.map +1 -1
- package/build-module/tree-grid/types.js.map +1 -1
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/tree-select/types.js.map +1 -1
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/truncate/hook.js +4 -1
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/truncate/index.js.map +1 -1
- package/build-module/truncate/styles.js.map +1 -1
- package/build-module/truncate/types.js.map +1 -1
- package/build-module/truncate/utils.js.map +1 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +2 -2
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/unit-control/types.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/base-label.js.map +1 -1
- package/build-module/utils/box-sizing.js.map +1 -1
- package/build-module/utils/breakpoint-values.js.map +1 -1
- package/build-module/utils/breakpoint.js.map +1 -1
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/colors.js.map +1 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/font-size.js.map +1 -1
- package/build-module/utils/font-values.js.map +1 -1
- package/build-module/utils/font.js.map +1 -1
- package/build-module/utils/get-valid-children.js.map +1 -1
- package/build-module/utils/hooks/emotion.d.js.map +1 -1
- package/build-module/utils/hooks/index.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-state.js.map +1 -1
- package/build-module/utils/hooks/use-controlled-value.js.map +1 -1
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/utils/hooks/use-update-effect.js.map +1 -1
- package/build-module/utils/index.js.map +1 -1
- package/build-module/utils/input/base.js.map +1 -1
- package/build-module/utils/input/index.js.map +1 -1
- package/build-module/utils/input/input-control.js.map +1 -1
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/reduce-motion.js +4 -0
- package/build-module/utils/reduce-motion.js.map +1 -1
- package/build-module/utils/rtl.js +2 -2
- package/build-module/utils/rtl.js.map +1 -1
- package/build-module/utils/space.js.map +1 -1
- package/build-module/utils/strings.js.map +1 -1
- package/build-module/utils/style-mixins.js.map +1 -1
- package/build-module/utils/types.js.map +1 -1
- package/build-module/utils/unit-values.js.map +1 -1
- package/build-module/utils/use-deprecated-props.js.map +1 -1
- package/build-module/utils/use-responsive-value.js.map +1 -1
- package/build-module/utils/values.js.map +1 -1
- package/build-module/utils/with-ignore-ime-events.js.map +1 -1
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/v-stack/hook.js.map +1 -1
- package/build-module/v-stack/index.js.map +1 -1
- package/build-module/v-stack/types.js.map +1 -1
- package/build-module/view/component.js +5 -1
- package/build-module/view/component.js.map +1 -1
- package/build-module/view/index.js.map +1 -1
- package/build-module/view/types.js.map +1 -1
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/visually-hidden/index.js.map +1 -1
- package/build-module/visually-hidden/styles.js.map +1 -1
- package/build-module/visually-hidden/types.js.map +1 -1
- package/build-module/z-stack/component.js.map +1 -1
- package/build-module/z-stack/index.js.map +1 -1
- package/build-module/z-stack/styles.js +2 -2
- package/build-module/z-stack/styles.js.map +1 -1
- package/build-module/z-stack/types.js.map +1 -1
- package/build-style/style-rtl.css +43 -36
- package/build-style/style.css +43 -36
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
- package/build-types/animate/stories/index.story.d.ts +7 -7
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +1 -1
- package/build-types/border-control/stories/index.story.d.ts +6 -6
- package/build-types/box-control/stories/index.story.d.ts +6 -6
- package/build-types/button/stories/e2e/index.story.d.ts +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +7 -7
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +2 -2
- package/build-types/circular-option-picker/stories/index.story.d.ts +5 -5
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +3 -3
- 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/styles.d.ts +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +3 -3
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +3 -3
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +7 -0
- package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +4 -4
- package/build-types/dimension-control/stories/index.story.d.ts +2 -2
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +4 -4
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +1 -1
- 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 +3 -3
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts +3 -0
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
- package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/index.d.ts +4 -3
- 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/gradient-picker/stories/index.story.d.ts +3 -3
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +1 -1
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
- package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
- package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +4 -4
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/backdrop.d.ts +1 -2
- package/build-types/input-control/backdrop.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +6 -6
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +16 -21
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +3 -12
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/navigation/back-button/index.d.ts +3 -0
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/group/index.d.ts +3 -0
- package/build-types/navigation/group/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +2 -0
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts +3 -0
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/menu/index.d.ts +3 -0
- package/build-types/navigation/menu/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +11 -6
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +4 -4
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +1 -1
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts +0 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +1 -1
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/responsive-wrapper/stories/index.story.d.ts +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +1 -1
- package/build-types/sandbox/stories/index.story.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 +2 -2
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +19 -0
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +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.map +1 -1
- package/build-types/slot-fill/types.d.ts +6 -2
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +4 -4
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +9 -9
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +3 -3
- package/build-types/text/styles.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +1 -1
- package/build-types/toggle-control/index.d.ts +11 -3
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +4 -4
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +3 -3
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
- package/build-types/unit-control/utils.d.ts +3 -3
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/utils/reduce-motion.d.ts +4 -0
- package/build-types/utils/reduce-motion.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +1 -1
- package/package.json +20 -21
- package/src/checkbox-control/style.scss +22 -24
- package/src/color-palette/index.native.js +4 -3
- package/src/combobox-control/README.md +4 -4
- package/src/custom-select-control/index.js +45 -55
- package/src/custom-select-control/style.scss +6 -0
- package/src/custom-select-control-v2/types.ts +7 -0
- package/src/dimension-control/stories/index.story.tsx +4 -4
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +60 -12
- package/src/external-link/index.tsx +9 -11
- package/src/external-link/style.scss +12 -0
- package/src/form-toggle/index.tsx +10 -2
- package/src/form-toggle/stories/index.story.tsx +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +5 -2
- package/src/input-control/backdrop.tsx +1 -6
- package/src/input-control/index.tsx +1 -6
- package/src/input-control/input-base.tsx +1 -8
- package/src/input-control/input-field.tsx +0 -10
- package/src/input-control/styles/input-control-styles.tsx +61 -77
- package/src/input-control/types.ts +2 -13
- package/src/mobile/bottom-sheet-select-control/index.native.js +7 -3
- package/src/navigation/README.md +4 -0
- package/src/navigation/back-button/index.tsx +3 -0
- package/src/navigation/group/index.tsx +3 -0
- package/src/navigation/index.tsx +2 -0
- package/src/navigation/item/index.tsx +3 -0
- package/src/navigation/menu/index.tsx +3 -0
- package/src/navigation/stories/index.story.tsx +7 -1
- package/src/navigator/navigator-provider/component.tsx +7 -1
- package/src/placeholder/style.scss +3 -7
- package/src/progress-bar/index.tsx +8 -2
- package/src/progress-bar/styles.ts +2 -3
- package/src/progress-bar/test/index.tsx +4 -1
- package/src/select-control/index.tsx +1 -19
- package/src/slot-fill/bubbles-virtually/observable-map.ts +79 -0
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +3 -6
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +10 -18
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +2 -10
- package/src/slot-fill/bubbles-virtually/use-slot.ts +2 -10
- package/src/slot-fill/test/observable-map.js +83 -0
- package/src/slot-fill/types.ts +7 -2
- package/src/snackbar/index.tsx +1 -1
- package/src/style.scss +1 -0
- package/src/tabs/index.tsx +8 -0
- package/src/tabs/test/index.tsx +38 -0
- package/src/text/styles.ts +1 -0
- package/src/text/test/__snapshots__/index.tsx.snap +4 -1
- package/src/toggle-control/index.tsx +16 -11
- package/src/toolbar/toolbar-group/style.scss +1 -6
- package/src/tooltip/test/index.tsx +5 -8
- package/src/truncate/hook.ts +4 -0
- package/src/utils/reduce-motion.js +4 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/external-link/styles/external-link-styles.js +0 -25
- package/build/external-link/styles/external-link-styles.js.map +0 -1
- package/build-module/external-link/styles/external-link-styles.js +0 -25
- package/build-module/external-link/styles/external-link-styles.js.map +0 -1
- package/build-types/external-link/styles/external-link-styles.d.ts +0 -10
- package/build-types/external-link/styles/external-link-styles.d.ts.map +0 -1
- package/src/external-link/styles/external-link-styles.ts +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","_compose","_layoutAnimation","_style","_interopRequireDefault","ANIMATION_DURATION","isIOS","Platform","OS","Segment","isSelected","title","onPress","onLayout","props","isSelectedIOS","segmentStyle","styles","segment","segmentIOS","textStyle","usePreferredColorSchemeStyle","buttonTextDefault","buttonTextDefaultDark","selectedTextStyle","buttonTextSelected","buttonTextSelectedDark","shadowStyle","shadowIOS","_react","createElement","View","style","TouchableWithoutFeedback","Text","maxFontSizeMultiplier","SegmentedControls","segments","segmentHandler","selectedIndex","addonLeft","addonRight","selectedSegmentIndex","activeSegmentIndex","setActiveSegmentIndex","useState","segmentsDimensions","setSegmentsDimensions","width","height","positionAnimationValue","Animated","Value","useEffect","setValue","calculateEndValue","containerStyle","container","containerDark","performSwatchAnimation","index","timing","toValue","duration","easing","Easing","ease","useNativeDriver","start","paddingLeft","offset","containerIOS","widths","Object","values","map","dimension","widthsDistance","slice","widthsDistanceSum","reduce","sum","n","endValue","onHandlePress","performLayoutAnimation","segmentOnLayout","event","nativeEvent","layout","selectedStyle","selected","selectedDark","outlineStyle","outline","outlineIOS","row","flex","left","key","accessibilityState","accessibilityRole","accessibilityLabel","accessibilityHint","length","_default","exports","default"],"sources":["@wordpress/components/src/mobile/segmented-control/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tTouchableWithoutFeedback,\n\tText,\n\tPlatform,\n\tAnimated,\n\tEasing,\n} from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { performLayoutAnimation } from '../layout-animation';\nimport styles from './style.scss';\n\nconst ANIMATION_DURATION = 200;\n\nconst isIOS = Platform.OS === 'ios';\n\nconst Segment = ( { isSelected, title, onPress, onLayout, ...props } ) => {\n\tconst isSelectedIOS = isIOS && isSelected;\n\n\tconst segmentStyle = [ styles.segment, isIOS && styles.segmentIOS ];\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonTextDefault,\n\t\tstyles.buttonTextDefaultDark\n\t);\n\tconst selectedTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonTextSelected,\n\t\tstyles.buttonTextSelectedDark\n\t);\n\tconst shadowStyle = usePreferredColorSchemeStyle( styles.shadowIOS, {} );\n\n\treturn (\n\t\t<View style={ isSelectedIOS && shadowStyle }>\n\t\t\t<TouchableWithoutFeedback onPress={ onPress }>\n\t\t\t\t<View style={ segmentStyle } onLayout={ onLayout } { ...props }>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ [ textStyle, isSelected && selectedTextStyle ] }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t</View>\n\t);\n};\n\nconst SegmentedControls = ( {\n\tsegments,\n\tsegmentHandler,\n\tselectedIndex,\n\taddonLeft,\n\taddonRight,\n} ) => {\n\tconst selectedSegmentIndex = selectedIndex || 0;\n\tconst [ activeSegmentIndex, setActiveSegmentIndex ] =\n\t\tuseState( selectedSegmentIndex );\n\tconst [ segmentsDimensions, setSegmentsDimensions ] = useState( {\n\t\t[ activeSegmentIndex ]: { width: 0, height: 0 },\n\t} );\n\tconst [ positionAnimationValue ] = useState( new Animated.Value( 0 ) );\n\n\tuseEffect( () => {\n\t\tsetActiveSegmentIndex( selectedSegmentIndex );\n\t\tsegmentHandler( segments[ selectedSegmentIndex ] );\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tpositionAnimationValue.setValue(\n\t\t\tcalculateEndValue( activeSegmentIndex )\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ segmentsDimensions ] );\n\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.container,\n\t\tstyles.containerDark\n\t);\n\n\tfunction performSwatchAnimation( index ) {\n\t\tAnimated.timing( positionAnimationValue, {\n\t\t\ttoValue: calculateEndValue( index ),\n\t\t\tduration: ANIMATION_DURATION,\n\t\t\teasing: Easing.ease,\n\t\t\tuseNativeDriver: false,\n\t\t} ).start();\n\t}\n\n\tfunction calculateEndValue( index ) {\n\t\tconst { paddingLeft: offset } = isIOS\n\t\t\t? styles.containerIOS\n\t\t\t: styles.container;\n\t\tconst widths = Object.values( segmentsDimensions ).map(\n\t\t\t( dimension ) => dimension.width\n\t\t);\n\t\tconst widthsDistance = widths.slice( 0, index );\n\t\tconst widthsDistanceSum = widthsDistance.reduce(\n\t\t\t( sum, n ) => sum + n,\n\t\t\t0\n\t\t);\n\n\t\tconst endValue = index === 0 ? 0 : widthsDistanceSum;\n\t\treturn endValue + offset;\n\t}\n\n\tfunction onHandlePress( segment, index ) {\n\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\tsetActiveSegmentIndex( index );\n\t\tsegmentHandler( segment );\n\t\tperformSwatchAnimation( index );\n\t}\n\n\tfunction segmentOnLayout( event, index ) {\n\t\tconst { width, height } = event.nativeEvent.layout;\n\n\t\tsetSegmentsDimensions( {\n\t\t\t...segmentsDimensions,\n\t\t\t[ index ]: { width, height },\n\t\t} );\n\t}\n\n\tconst selectedStyle = usePreferredColorSchemeStyle(\n\t\tstyles.selected,\n\t\tstyles.selectedDark\n\t);\n\n\tconst width = segmentsDimensions[ activeSegmentIndex ]?.width;\n\tconst height = segmentsDimensions[ activeSegmentIndex ]?.height;\n\n\tconst outlineStyle = [ styles.outline, isIOS && styles.outlineIOS ];\n\n\treturn (\n\t\t<View style={ styles.row }>\n\t\t\t<View style={ styles.flex }>{ addonLeft }</View>\n\t\t\t<View style={ [ containerStyle, isIOS && styles.containerIOS ] }>\n\t\t\t\t<Animated.View\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\tleft: positionAnimationValue,\n\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tselectedStyle,\n\t\t\t\t\t\toutlineStyle,\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t\t{ segments.map( ( segment, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Segment\n\t\t\t\t\t\t\ttitle={ segment }\n\t\t\t\t\t\t\tonPress={ () => onHandlePress( segment, index ) }\n\t\t\t\t\t\t\tisSelected={ activeSegmentIndex === index }\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonLayout={ ( event ) =>\n\t\t\t\t\t\t\t\tsegmentOnLayout( event, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taccessibilityState={ {\n\t\t\t\t\t\t\t\tselected: activeSegmentIndex === index,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\taccessibilityLabel={ segment }\n\t\t\t\t\t\t\taccessibilityHint={ `${ index + 1 } on ${\n\t\t\t\t\t\t\t\tsegments.length\n\t\t\t\t\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AAAC,aAAA,EAACrB,OAAO;MACPE,KAAK,EAAGO,OAAS;MACjBN,OAAO,EAAGA,CAAA,KAAMwE,aAAa,CAAElE,OAAO,EAAE0C,KAAM,CAAG;MACjDlD,UAAU,EAAGiC,kBAAkB,KAAKiB,KAAO;MAC3CuC,GAAG,EAAGvC,KAAO;MACb/C,QAAQ,EAAK0E,KAAK,IACjBD,eAAe,CAAEC,KAAK,EAAE3B,KAAM,CAC9B;MACDwC,kBAAkB,EAAG;QACpBT,QAAQ,EAAEhD,kBAAkB,KAAKiB;MAClC,CAAG;MACHyC,iBAAiB,EAAG,QAAU;MAC9BC,kBAAkB,EAAGpF,OAAS;MAC9BqF,iBAAiB,EAAI,GAAG3C,KAAK,GAAG,CAAG,OAClCvB,QAAQ,CAACmE,MACT;IAAG,CACJ,CAAC;EAEJ,CAAE,CACG,CAAC,EACP,IAAA3E,MAAA,CAAAC,aAAA,EAAChC,YAAA,CAAAiC,IAAI;IAACC,KAAK,EAAGf,cAAM,CAACgF;EAAM,GAAGxD,UAAkB,CAC3C,CAAC;AAET,CAAC;AAAC,IAAAgE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavE,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","_compose","_layoutAnimation","_style","_interopRequireDefault","ANIMATION_DURATION","isIOS","Platform","OS","Segment","isSelected","title","onPress","onLayout","props","isSelectedIOS","segmentStyle","styles","segment","segmentIOS","textStyle","usePreferredColorSchemeStyle","buttonTextDefault","buttonTextDefaultDark","selectedTextStyle","buttonTextSelected","buttonTextSelectedDark","shadowStyle","shadowIOS","_react","createElement","View","style","TouchableWithoutFeedback","Text","maxFontSizeMultiplier","SegmentedControls","segments","segmentHandler","selectedIndex","addonLeft","addonRight","selectedSegmentIndex","activeSegmentIndex","setActiveSegmentIndex","useState","segmentsDimensions","setSegmentsDimensions","width","height","positionAnimationValue","Animated","Value","useEffect","setValue","calculateEndValue","containerStyle","container","containerDark","performSwatchAnimation","index","timing","toValue","duration","easing","Easing","ease","useNativeDriver","start","paddingLeft","offset","containerIOS","widths","Object","values","map","dimension","widthsDistance","slice","widthsDistanceSum","reduce","sum","n","endValue","onHandlePress","performLayoutAnimation","segmentOnLayout","event","nativeEvent","layout","selectedStyle","selected","selectedDark","outlineStyle","outline","outlineIOS","row","flex","left","key","accessibilityState","accessibilityRole","accessibilityLabel","accessibilityHint","length","_default","exports","default"],"sources":["@wordpress/components/src/mobile/segmented-control/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tView,\n\tTouchableWithoutFeedback,\n\tText,\n\tPlatform,\n\tAnimated,\n\tEasing,\n} from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { performLayoutAnimation } from '../layout-animation';\nimport styles from './style.scss';\n\nconst ANIMATION_DURATION = 200;\n\nconst isIOS = Platform.OS === 'ios';\n\nconst Segment = ( { isSelected, title, onPress, onLayout, ...props } ) => {\n\tconst isSelectedIOS = isIOS && isSelected;\n\n\tconst segmentStyle = [ styles.segment, isIOS && styles.segmentIOS ];\n\n\tconst textStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonTextDefault,\n\t\tstyles.buttonTextDefaultDark\n\t);\n\tconst selectedTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.buttonTextSelected,\n\t\tstyles.buttonTextSelectedDark\n\t);\n\tconst shadowStyle = usePreferredColorSchemeStyle( styles.shadowIOS, {} );\n\n\treturn (\n\t\t<View style={ isSelectedIOS && shadowStyle }>\n\t\t\t<TouchableWithoutFeedback onPress={ onPress }>\n\t\t\t\t<View style={ segmentStyle } onLayout={ onLayout } { ...props }>\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ [ textStyle, isSelected && selectedTextStyle ] }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t</View>\n\t);\n};\n\nconst SegmentedControls = ( {\n\tsegments,\n\tsegmentHandler,\n\tselectedIndex,\n\taddonLeft,\n\taddonRight,\n} ) => {\n\tconst selectedSegmentIndex = selectedIndex || 0;\n\tconst [ activeSegmentIndex, setActiveSegmentIndex ] =\n\t\tuseState( selectedSegmentIndex );\n\tconst [ segmentsDimensions, setSegmentsDimensions ] = useState( {\n\t\t[ activeSegmentIndex ]: { width: 0, height: 0 },\n\t} );\n\tconst [ positionAnimationValue ] = useState( new Animated.Value( 0 ) );\n\n\tuseEffect( () => {\n\t\tsetActiveSegmentIndex( selectedSegmentIndex );\n\t\tsegmentHandler( segments[ selectedSegmentIndex ] );\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tpositionAnimationValue.setValue(\n\t\t\tcalculateEndValue( activeSegmentIndex )\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ segmentsDimensions ] );\n\n\tconst containerStyle = usePreferredColorSchemeStyle(\n\t\tstyles.container,\n\t\tstyles.containerDark\n\t);\n\n\tfunction performSwatchAnimation( index ) {\n\t\tAnimated.timing( positionAnimationValue, {\n\t\t\ttoValue: calculateEndValue( index ),\n\t\t\tduration: ANIMATION_DURATION,\n\t\t\teasing: Easing.ease,\n\t\t\tuseNativeDriver: false,\n\t\t} ).start();\n\t}\n\n\tfunction calculateEndValue( index ) {\n\t\tconst { paddingLeft: offset } = isIOS\n\t\t\t? styles.containerIOS\n\t\t\t: styles.container;\n\t\tconst widths = Object.values( segmentsDimensions ).map(\n\t\t\t( dimension ) => dimension.width\n\t\t);\n\t\tconst widthsDistance = widths.slice( 0, index );\n\t\tconst widthsDistanceSum = widthsDistance.reduce(\n\t\t\t( sum, n ) => sum + n,\n\t\t\t0\n\t\t);\n\n\t\tconst endValue = index === 0 ? 0 : widthsDistanceSum;\n\t\treturn endValue + offset;\n\t}\n\n\tfunction onHandlePress( segment, index ) {\n\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\tsetActiveSegmentIndex( index );\n\t\tsegmentHandler( segment );\n\t\tperformSwatchAnimation( index );\n\t}\n\n\tfunction segmentOnLayout( event, index ) {\n\t\tconst { width, height } = event.nativeEvent.layout;\n\n\t\tsetSegmentsDimensions( {\n\t\t\t...segmentsDimensions,\n\t\t\t[ index ]: { width, height },\n\t\t} );\n\t}\n\n\tconst selectedStyle = usePreferredColorSchemeStyle(\n\t\tstyles.selected,\n\t\tstyles.selectedDark\n\t);\n\n\tconst width = segmentsDimensions[ activeSegmentIndex ]?.width;\n\tconst height = segmentsDimensions[ activeSegmentIndex ]?.height;\n\n\tconst outlineStyle = [ styles.outline, isIOS && styles.outlineIOS ];\n\n\treturn (\n\t\t<View style={ styles.row }>\n\t\t\t<View style={ styles.flex }>{ addonLeft }</View>\n\t\t\t<View style={ [ containerStyle, isIOS && styles.containerIOS ] }>\n\t\t\t\t<Animated.View\n\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\twidth,\n\t\t\t\t\t\t\tleft: positionAnimationValue,\n\t\t\t\t\t\t\theight,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tselectedStyle,\n\t\t\t\t\t\toutlineStyle,\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t\t{ segments.map( ( segment, index ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Segment\n\t\t\t\t\t\t\ttitle={ segment }\n\t\t\t\t\t\t\tonPress={ () => onHandlePress( segment, index ) }\n\t\t\t\t\t\t\tisSelected={ activeSegmentIndex === index }\n\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\tonLayout={ ( event ) =>\n\t\t\t\t\t\t\t\tsegmentOnLayout( event, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taccessibilityState={ {\n\t\t\t\t\t\t\t\tselected: activeSegmentIndex === index,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\taccessibilityLabel={ segment }\n\t\t\t\t\t\t\taccessibilityHint={ `${ index + 1 } on ${\n\t\t\t\t\t\t\t\tsegments.length\n\t\t\t\t\t\t\t}` }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</View>\n\t\t\t<View style={ styles.flex }>{ addonRight }</View>\n\t\t</View>\n\t);\n};\n\nexport default SegmentedControls;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAWA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAC,sBAAA,CAAAL,OAAA;AArBA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;;AAIA,MAAMM,kBAAkB,GAAG,GAAG;AAE9B,MAAMC,KAAK,GAAGC,qBAAQ,CAACC,EAAE,KAAK,KAAK;AAEnC,MAAMC,OAAO,GAAGA,CAAE;EAAEC,UAAU;EAAEC,KAAK;EAAEC,OAAO;EAAEC,QAAQ;EAAE,GAAGC;AAAM,CAAC,KAAM;EACzE,MAAMC,aAAa,GAAGT,KAAK,IAAII,UAAU;EAEzC,MAAMM,YAAY,GAAG,CAAEC,cAAM,CAACC,OAAO,EAAEZ,KAAK,IAAIW,cAAM,CAACE,UAAU,CAAE;EAEnE,MAAMC,SAAS,GAAG,IAAAC,qCAA4B,EAC7CJ,cAAM,CAACK,iBAAiB,EACxBL,cAAM,CAACM,qBACR,CAAC;EACD,MAAMC,iBAAiB,GAAG,IAAAH,qCAA4B,EACrDJ,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AIW,cAAM,CAACsD,YAAY;EAAI,GAC/D,IAAA1C,MAAA,CAAAC,aAAA,EAAChC,YAAA,CAAAqD,QAAQ,CAACpB,IAAI;IACbC,KAAK,EAAG,CACP;MACCgB,KAAK;MACLkD,IAAI,EAAEhD,sBAAsB;MAC5BD;IACD,CAAC,EACDyC,aAAa,EACbG,YAAY;EACV,CACH,CAAC,EACAxD,QAAQ,CAACsC,GAAG,CAAE,CAAEzD,OAAO,EAAE0C,KAAK,KAAM;IACrC,OACC,IAAA/B,MAAA,CAAAC,aAAA,EAACrB,OAAO;MACPE,KAAK,EAAGO,OAAS;MACjBN,OAAO,EAAGA,CAAA,KAAMwE,aAAa,CAAElE,OAAO,EAAE0C,KAAM,CAAG;MACjDlD,UAAU,EAAGiC,kBAAkB,KAAKiB,KAAO;MAC3CuC,GAAG,EAAGvC,KAAO;MACb/C,QAAQ,EAAK0E,KAAK,IACjBD,eAAe,CAAEC,KAAK,EAAE3B,KAAM,CAC9B;MACDwC,kBAAkB,EAAG;QACpBT,QAAQ,EAAEhD,kBAAkB,KAAKiB;MAClC,CAAG;MACHyC,iBAAiB,EAAG,QAAU;MAC9BC,kBAAkB,EAAGpF,OAAS;MAC9BqF,iBAAiB,EAAI,GAAG3C,KAAK,GAAG,CAAG,OAClCvB,QAAQ,CAACmE,MACT;IAAG,CACJ,CAAC;EAEJ,CAAE,CACG,CAAC,EACP,IAAA3E,MAAA,CAAAC,aAAA,EAAChC,YAAA,CAAAiC,IAAI;IAACC,KAAK,EAAGf,cAAM,CAACgF;EAAM,GAAGxD,UAAkB,CAC3C,CAAC;AAET,CAAC;AAAC,IAAAgE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEavE,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_blocks","require","WIDE_ALIGNMENTS","exports","alignments","wide","full","excludeBlocks","notInnerContainers","ALIGNMENT_BREAKPOINTS","large","medium","small","mobile","isFullWidth","align","isWideWidth","isWider","width","breakpoint","isContainerRelated","blockName","includes","hasFullWidthSupport","hasParentFullWidthSupport","blockType","getBlockType","blockAlign","supports","Array","isArray","parent","some","alignmentHelpers"],"sources":["@wordpress/components/src/mobile/utils/alignments.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\n\nexport const WIDE_ALIGNMENTS = {\n\talignments: {\n\t\twide: 'wide',\n\t\tfull: 'full',\n\t},\n\texcludeBlocks: [ 'core/heading' ],\n\tnotInnerContainers: [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/media-text',\n\t\t'core/pullquote',\n\t],\n};\n\nexport const ALIGNMENT_BREAKPOINTS = {\n\twide: 1024,\n\tlarge: 820,\n\tmedium: 768,\n\tsmall: 680,\n\tmobile: 480,\n};\n\nconst isFullWidth = ( align ) => align === WIDE_ALIGNMENTS.alignments.full;\n\nconst isWideWidth = ( align ) => align === WIDE_ALIGNMENTS.alignments.wide;\n\nconst isWider = ( width, breakpoint ) =>\n\twidth > ALIGNMENT_BREAKPOINTS[ breakpoint ];\n\nconst isContainerRelated = ( blockName ) => {\n\tif ( WIDE_ALIGNMENTS.notInnerContainers.includes( blockName ) ) {\n\t\treturn false;\n\t}\n\n\tif ( hasFullWidthSupport( blockName ) ) {\n\t\treturn true;\n\t}\n\n\treturn hasParentFullWidthSupport( blockName );\n};\n\n/**\n * Whether the block has support for full width alignment.\n *\n * @param {string} blockName\n * @return {boolean} Return whether the block supports full width alignment.\n */\nfunction hasFullWidthSupport( blockName ) {\n\tconst blockType = getBlockType( blockName );\n\tconst blockAlign = blockType?.supports?.align;\n\treturn (\n\t\t!! Array.isArray( blockAlign ) &&\n\t\tblockAlign.includes( WIDE_ALIGNMENTS.alignments.full )\n\t);\n}\n/**\n * Whether the block's parent has support for full width alignment.\n *\n * @param {string} blockName\n * @return {boolean} Return whether the block's parent supports full width alignment.\n */\nfunction hasParentFullWidthSupport( blockName ) {\n\tconst blockType = getBlockType( blockName );\n\treturn !! blockType?.parent?.some( hasFullWidthSupport );\n}\n\nexport const alignmentHelpers = {\n\tisFullWidth,\n\tisWideWidth,\n\tisWider,\n\tisContainerRelated,\n};\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC9BE,UAAU,EAAE;IACXC,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE;EACP,CAAC;EACDC,aAAa,EAAE,CAAE,cAAc,CAAE;EACjCC,kBAAkB,EAAE,CACnB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB;AAElB,CAAC;AAEM,MAAMC,qBAAqB,GAAAN,OAAA,CAAAM,qBAAA,GAAG;EACpCJ,IAAI,EAAE,IAAI;EACVK,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE,GAAG;EACXC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACT,CAAC;AAED,MAAMC,WAAW,GAAKC,KAAK,IAAMA,KAAK,KAAKb,eAAe,CAACE,UAAU,CAACE,IAAI;AAE1E,MAAMU,WAAW,GAAKD,KAAK,IAAMA,KAAK,KAAKb,eAAe,CAACE,UAAU,CAACC,IAAI;AAE1E,MAAMY,OAAO,GAAGA,CAAEC,KAAK,EAAEC,UAAU,KAClCD,KAAK,GAAGT,qBAAqB,CAAEU,UAAU,CAAE;AAE5C,MAAMC,kBAAkB,GAAKC,SAAS,IAAM;EAC3C,IAAKnB,eAAe,CAACM,kBAAkB,CAACc,QAAQ,CAAED,SAAU,CAAC,EAAG;IAC/D,OAAO,KAAK;EACb;EAEA,IAAKE,mBAAmB,CAAEF,SAAU,CAAC,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,OAAOG,yBAAyB,CAAEH,SAAU,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,SAASE,mBAAmBA,CAAEF,SAAS,EAAG;EACzC,MAAMI,SAAS,GAAG,IAAAC,oBAAY,EAAEL,SAAU,CAAC;EAC3C,MAAMM,UAAU,GAAGF,SAAS,EAAEG,QAAQ,EAAEb,KAAK;EAC7C,OACC,CAAC,CAAEc,KAAK,CAACC,OAAO,CAAEH,UAAW,CAAC,IAC9BA,UAAU,CAACL,QAAQ,CAAEpB,eAAe,CAACE,UAAU,CAACE,IAAK,CAAC;AAExD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASkB,yBAAyBA,CAAEH,SAAS,EAAG;EAC/C,MAAMI,SAAS,GAAG,IAAAC,oBAAY,EAAEL,SAAU,CAAC;EAC3C,OAAO,CAAC,CAAEI,SAAS,EAAEM,MAAM,EAAEC,IAAI,CAAET,mBAAoB,CAAC;AACzD;AAEO,MAAMU,gBAAgB,GAAA9B,OAAA,CAAA8B,gBAAA,GAAG;EAC/BnB,WAAW;EACXE,WAAW;EACXC,OAAO;EACPG;AACD,CAAC"}
|
|
1
|
+
{"version":3,"names":["_blocks","require","WIDE_ALIGNMENTS","exports","alignments","wide","full","excludeBlocks","notInnerContainers","ALIGNMENT_BREAKPOINTS","large","medium","small","mobile","isFullWidth","align","isWideWidth","isWider","width","breakpoint","isContainerRelated","blockName","includes","hasFullWidthSupport","hasParentFullWidthSupport","blockType","getBlockType","blockAlign","supports","Array","isArray","parent","some","alignmentHelpers"],"sources":["@wordpress/components/src/mobile/utils/alignments.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { getBlockType } from '@wordpress/blocks';\n\nexport const WIDE_ALIGNMENTS = {\n\talignments: {\n\t\twide: 'wide',\n\t\tfull: 'full',\n\t},\n\texcludeBlocks: [ 'core/heading' ],\n\tnotInnerContainers: [\n\t\t'core/image',\n\t\t'core/separator',\n\t\t'core/media-text',\n\t\t'core/pullquote',\n\t],\n};\n\nexport const ALIGNMENT_BREAKPOINTS = {\n\twide: 1024,\n\tlarge: 820,\n\tmedium: 768,\n\tsmall: 680,\n\tmobile: 480,\n};\n\nconst isFullWidth = ( align ) => align === WIDE_ALIGNMENTS.alignments.full;\n\nconst isWideWidth = ( align ) => align === WIDE_ALIGNMENTS.alignments.wide;\n\nconst isWider = ( width, breakpoint ) =>\n\twidth > ALIGNMENT_BREAKPOINTS[ breakpoint ];\n\nconst isContainerRelated = ( blockName ) => {\n\tif ( WIDE_ALIGNMENTS.notInnerContainers.includes( blockName ) ) {\n\t\treturn false;\n\t}\n\n\tif ( hasFullWidthSupport( blockName ) ) {\n\t\treturn true;\n\t}\n\n\treturn hasParentFullWidthSupport( blockName );\n};\n\n/**\n * Whether the block has support for full width alignment.\n *\n * @param {string} blockName\n * @return {boolean} Return whether the block supports full width alignment.\n */\nfunction hasFullWidthSupport( blockName ) {\n\tconst blockType = getBlockType( blockName );\n\tconst blockAlign = blockType?.supports?.align;\n\treturn (\n\t\t!! Array.isArray( blockAlign ) &&\n\t\tblockAlign.includes( WIDE_ALIGNMENTS.alignments.full )\n\t);\n}\n/**\n * Whether the block's parent has support for full width alignment.\n *\n * @param {string} blockName\n * @return {boolean} Return whether the block's parent supports full width alignment.\n */\nfunction hasParentFullWidthSupport( blockName ) {\n\tconst blockType = getBlockType( blockName );\n\treturn !! blockType?.parent?.some( hasFullWidthSupport );\n}\n\nexport const alignmentHelpers = {\n\tisFullWidth,\n\tisWideWidth,\n\tisWider,\n\tisContainerRelated,\n};\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC9BE,UAAU,EAAE;IACXC,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE;EACP,CAAC;EACDC,aAAa,EAAE,CAAE,cAAc,CAAE;EACjCC,kBAAkB,EAAE,CACnB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB;AAElB,CAAC;AAEM,MAAMC,qBAAqB,GAAAN,OAAA,CAAAM,qBAAA,GAAG;EACpCJ,IAAI,EAAE,IAAI;EACVK,KA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C/BnB,WAAW;EACXE,WAAW;EACXC,OAAO;EACPG;AACD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["parseUnit","cssUnit","match","trim","isNaN","parseFloat","value","unit","undefined","calculate","expression","Function","err","getFunctionUnitValue","functionUnitValue","options","functionUnit","split","filter","Boolean","units","slice","map","getPxFromCssUnit","Math","min","max","length","parseUnitFunction","currentCssUnit","regExp","matches","exec","replace","isMathExpression","i","includes","evalMathExpression","errorFound","cssUnitsBits","parsedUnit","expressionsMatches","values","currentValue","rawCurrentValue","calculatedExpression","calculatedValue","toFixed","parsedValue","calculatedResult","convertParsedUnitToPx","PIXELS_PER_INCH","ONE_PERCENT","defaultProperties","fontSize","lineHeight","width","height","type","setOptions","Object","assign","relativeUnits","em","rem","vh","vw","vmin","vmax","ch","ex","lh","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","svmin","lvmin","dvmin","svmax","lvmax","dvmax","absoluteUnits","in","cm","mm","pt","pc","px","Q","Number","isFinite","cache","memoizedGetPxFromCssUnit","hash","hashOptions","hasOwnProperty","_default","exports","default"],"sources":["@wordpress/components/src/mobile/utils/get-px-from-css-unit.native.js"],"sourcesContent":["/**\n * Converts string to object { value, unit }.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit\n */\nfunction parseUnit( cssUnit ) {\n\tconst match = cssUnit\n\t\t?.trim()\n\t\t.match(\n\t\t\t/^(0?[-.]?\\d*\\.?\\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/\n\t\t);\n\tif ( ! isNaN( cssUnit ) && ! isNaN( parseFloat( cssUnit ) ) ) {\n\t\treturn { value: parseFloat( cssUnit ), unit: 'px' };\n\t}\n\treturn match\n\t\t? { value: parseFloat( match[ 1 ] ) || match[ 1 ], unit: match[ 2 ] }\n\t\t: { value: cssUnit, unit: undefined };\n}\n/**\n * Evaluate a math expression.\n *\n * @param {string} expression\n * @return {number} evaluated expression.\n */\nfunction calculate( expression ) {\n\ttry {\n\t\treturn Function( `'use strict'; return (${ expression })` )();\n\t} catch ( err ) {\n\t\treturn null;\n\t}\n}\n\n/**\n * Calculates the css function value for the supported css functions such as max, min, clamp and calc.\n *\n * @param {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops.\n * @param {Object} options\n * @return {string} unit containing the unit in PX.\n */\nfunction getFunctionUnitValue( functionUnitValue, options ) {\n\tconst functionUnit = functionUnitValue.split( /[(),]/g ).filter( Boolean );\n\n\tconst units = functionUnit\n\t\t.slice( 1 )\n\t\t.map( ( unit ) => parseUnit( getPxFromCssUnit( unit, options ) ).value )\n\t\t.filter( Boolean );\n\n\tswitch ( functionUnit[ 0 ] ) {\n\t\tcase 'min':\n\t\t\treturn Math.min( ...units ) + 'px';\n\t\tcase 'max':\n\t\t\treturn Math.max( ...units ) + 'px';\n\t\tcase 'clamp':\n\t\t\tif ( units.length !== 3 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif ( units[ 1 ] < units[ 0 ] ) {\n\t\t\t\treturn units[ 0 ] + 'px';\n\t\t\t}\n\t\t\tif ( units[ 1 ] > units[ 2 ] ) {\n\t\t\t\treturn units[ 2 ] + 'px';\n\t\t\t}\n\t\t\treturn units[ 1 ] + 'px';\n\t\tcase 'calc':\n\t\t\treturn units[ 0 ] + 'px';\n\t}\n}\n\n/**\n * Take a css function such as min, max, calc, clamp and returns parsedUnit\n *\n * How this works for the nested function is that it first replaces the inner function call.\n * Then it tackles the outer onces.\n * So for example: min( max(25px, 35px), 40px )\n * in the first pass we would replace max(25px, 35px) with 35px.\n * then we would try to evaluate min( 35px, 40px )\n * and then finally return 35px.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit object.\n */\nfunction parseUnitFunction( cssUnit ) {\n\twhile ( true ) {\n\t\tconst currentCssUnit = cssUnit;\n\t\tconst regExp = /(max|min|calc|clamp)\\(([^()]*)\\)/g;\n\t\tconst matches = regExp.exec( cssUnit ) || [];\n\t\tif ( matches[ 0 ] ) {\n\t\t\tconst functionUnitValue = getFunctionUnitValue( matches[ 0 ] );\n\t\t\tcssUnit = cssUnit.replace( matches[ 0 ], functionUnitValue );\n\t\t}\n\n\t\t// If the unit hasn't been modified or we have a single value break free.\n\t\tif ( cssUnit === currentCssUnit || parseFloat( cssUnit ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parseUnit( cssUnit );\n}\n/**\n * Return true if we think this is a math expression.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {boolean} Whether the cssUnit is a math expression.\n */\nfunction isMathExpression( cssUnit ) {\n\tfor ( let i = 0; i < cssUnit.length; i++ ) {\n\t\tif ( [ '+', '-', '/', '*' ].includes( cssUnit[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n * Evaluates the math expression and return a px value.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {string} return a converfted value to px.\n */\nfunction evalMathExpression( cssUnit ) {\n\tlet errorFound = false;\n\t// Convert every part of the expression to px values.\n\t// The following regex matches numbers that have a following unit\n\t// E.g. 5.25rem, 1vw\n\tconst cssUnitsBits = cssUnit.match( /\\d+\\.?\\d*[a-zA-Z]+|\\.\\d+[a-zA-Z]+/g );\n\tif ( cssUnitsBits ) {\n\t\tfor ( const unit of cssUnitsBits ) {\n\t\t\t// Standardize the unit to px and extract the value.\n\t\t\tconst parsedUnit = parseUnit( getPxFromCssUnit( unit ) );\n\t\t\tif ( ! parseFloat( parsedUnit.value ) ) {\n\t\t\t\terrorFound = true;\n\t\t\t\t// End early since we are dealing with a null value.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcssUnit = cssUnit.replace( unit, parsedUnit.value );\n\t\t}\n\t} else {\n\t\terrorFound = true;\n\t}\n\n\t// For mixed math expressions wrapped within CSS expressions\n\tconst expressionsMatches = cssUnit.match( /(max|min|clamp)/g );\n\tif ( ! errorFound && expressionsMatches ) {\n\t\tconst values = cssUnit.split( ',' );\n\t\tfor ( const currentValue of values ) {\n\t\t\t// Check for nested calc() and remove them to calculate the value.\n\t\t\tconst rawCurrentValue = currentValue.replace( /\\s|calc/g, '' );\n\n\t\t\tif ( isMathExpression( rawCurrentValue ) ) {\n\t\t\t\tconst calculatedExpression = calculate( rawCurrentValue );\n\n\t\t\t\tif ( calculatedExpression ) {\n\t\t\t\t\tconst calculatedValue =\n\t\t\t\t\t\tcalculatedExpression.toFixed( 0 ) + 'px';\n\t\t\t\t\tcssUnit = cssUnit.replace( currentValue, calculatedValue );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst parsedValue = parseUnitFunction( cssUnit );\n\t\treturn ! parsedValue ? null : parsedValue.value + parsedValue.unit;\n\t}\n\n\tif ( errorFound ) {\n\t\treturn null;\n\t}\n\n\tconst calculatedResult = calculate( cssUnit );\n\treturn calculatedResult ? calculatedResult.toFixed( 0 ) + 'px' : null;\n}\n\n/**\n * Convert a parsedUnit object to px value.\n *\n * @param {Object} parsedUnit\n * @param {Object} options\n * @return {string} or {null} returns the converted with in a px value format.\n */\nfunction convertParsedUnitToPx( parsedUnit, options ) {\n\tconst PIXELS_PER_INCH = 96;\n\tconst ONE_PERCENT = 0.01;\n\n\tconst defaultProperties = {\n\t\tfontSize: 16,\n\t\tlineHeight: 16,\n\t\twidth: 375,\n\t\theight: 812,\n\t\ttype: 'font',\n\t};\n\n\tconst setOptions = Object.assign( {}, defaultProperties, options );\n\n\tconst relativeUnits = {\n\t\tem: setOptions.fontSize,\n\t\trem: setOptions.fontSize,\n\t\tvh: setOptions.height * ONE_PERCENT,\n\t\tvw: setOptions.width * ONE_PERCENT,\n\t\tvmin:\n\t\t\t( setOptions.width < setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\tvmax:\n\t\t\t( setOptions.width > setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\t'%':\n\t\t\t( setOptions.type === 'font'\n\t\t\t\t? setOptions.fontSize\n\t\t\t\t: setOptions.width ) * ONE_PERCENT,\n\t\tch: 8, // The advance measure (width) of the glyph \"0\" of the element's font. Approximate\n\t\tex: 7.15625, // X-height of the element's font. Approximate.\n\t\tlh: setOptions.lineHeight,\n\t};\n\trelativeUnits.svw = relativeUnits.vmin;\n\trelativeUnits.lvw = relativeUnits.vmax;\n\trelativeUnits.dvw = relativeUnits.vw;\n\trelativeUnits.svh = relativeUnits.vmin;\n\trelativeUnits.lvh = relativeUnits.vmax;\n\trelativeUnits.dvh = relativeUnits.vh;\n\trelativeUnits.vi = relativeUnits.vh;\n\trelativeUnits.svi = relativeUnits.vmin;\n\trelativeUnits.lvi = relativeUnits.vmax;\n\trelativeUnits.dvi = relativeUnits.vw;\n\trelativeUnits.vb = relativeUnits.vh;\n\trelativeUnits.svb = relativeUnits.vmin;\n\trelativeUnits.lvb = relativeUnits.vmax;\n\trelativeUnits.dvb = relativeUnits.vh;\n\trelativeUnits.svmin = relativeUnits.vmin;\n\trelativeUnits.lvmin = relativeUnits.vmin;\n\trelativeUnits.dvmin = relativeUnits.vmin;\n\trelativeUnits.svmax = relativeUnits.vmax;\n\trelativeUnits.lvmax = relativeUnits.vmax;\n\trelativeUnits.dvmax = relativeUnits.vmax;\n\n\tconst absoluteUnits = {\n\t\tin: PIXELS_PER_INCH,\n\t\tcm: PIXELS_PER_INCH / 2.54,\n\t\tmm: PIXELS_PER_INCH / 25.4,\n\t\tpt: PIXELS_PER_INCH / 72,\n\t\tpc: PIXELS_PER_INCH / 6,\n\t\tpx: 1,\n\t\tQ: PIXELS_PER_INCH / 2.54 / 40,\n\t};\n\n\tif ( relativeUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( relativeUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\tif ( absoluteUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( absoluteUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the px value of a cssUnit.\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nexport function getPxFromCssUnit( cssUnit, options = {} ) {\n\tif ( Number.isFinite( cssUnit ) ) {\n\t\treturn cssUnit.toFixed( 0 ) + 'px';\n\t}\n\tif ( cssUnit === undefined ) {\n\t\treturn null;\n\t}\n\tlet parsedUnit = parseUnit( cssUnit );\n\n\tif ( ! parsedUnit.unit ) {\n\t\tparsedUnit = parseUnitFunction( cssUnit );\n\t}\n\n\tif ( isMathExpression( cssUnit ) && ! parsedUnit.unit ) {\n\t\treturn evalMathExpression( cssUnit );\n\t}\n\n\treturn convertParsedUnitToPx( parsedUnit, options );\n}\n\n// Use simple cache.\nconst cache = {};\n/**\n * Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit;\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nfunction memoizedGetPxFromCssUnit( cssUnit, options = {} ) {\n\tconst hash = cssUnit + hashOptions( options );\n\n\tif ( ! cache[ hash ] ) {\n\t\tcache[ hash ] = getPxFromCssUnit( cssUnit, options );\n\t}\n\treturn cache[ hash ];\n}\n\nfunction hashOptions( options ) {\n\tlet hash = '';\n\tif ( options.hasOwnProperty( 'fontSize' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'lineHeight' ) ) {\n\t\thash = ':' + options.lineHeight;\n\t}\n\tif ( options.hasOwnProperty( 'width' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'height' ) ) {\n\t\thash = ':' + options.height;\n\t}\n\tif ( options.hasOwnProperty( 'type' ) ) {\n\t\thash = ':' + options.type;\n\t}\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IAC3CF,IAAI,GAAG,GAAG,GAAGzF,OAAO,CAACyC,KAAK;EAC3B;EACA,IAAKzC,OAAO,CAAC2F,cAAc,CAAE,YAAa,CAAC,EAAG;IAC7CF,IAAI,GAAG,GAAG,GAAGzF,OAAO,CAACwC,UAAU;EAChC;EACA,IAAKxC,OAAO,CAAC2F,cAAc,CAAE,OAAQ,CAAC,EAAG;IACxCF,IAAI,GAAG,GAAG,GAAGzF,OAAO,CAACyC,KAAK;EAC3B;EACA,IAAKzC,OAAO,CAAC2F,cAAc,CAAE,QAAS,CAAC,EAAG;IACzCF,IAAI,GAAG,GAAG,GAAGzF,OAAO,CAAC0C,MAAM;EAC5B;EACA,IAAK1C,OAAO,CAAC2F,cAAc,CAAE,MAAO,CAAC,EAAG;IACvCF,IAAI,GAAG,GAAG,GAAGzF,OAAO,CAAC2C,IAAI;EAC1B;EACA,OAAO8C,IAAI;AACZ;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcN,wBAAwB"}
|
|
1
|
+
{"version":3,"names":["parseUnit","cssUnit","match","trim","isNaN","parseFloat","value","unit","undefined","calculate","expression","Function","err","getFunctionUnitValue","functionUnitValue","options","functionUnit","split","filter","Boolean","units","slice","map","getPxFromCssUnit","Math","min","max","length","parseUnitFunction","currentCssUnit","regExp","matches","exec","replace","isMathExpression","i","includes","evalMathExpression","errorFound","cssUnitsBits","parsedUnit","expressionsMatches","values","currentValue","rawCurrentValue","calculatedExpression","calculatedValue","toFixed","parsedValue","calculatedResult","convertParsedUnitToPx","PIXELS_PER_INCH","ONE_PERCENT","defaultProperties","fontSize","lineHeight","width","height","type","setOptions","Object","assign","relativeUnits","em","rem","vh","vw","vmin","vmax","ch","ex","lh","svw","lvw","dvw","svh","lvh","dvh","vi","svi","lvi","dvi","vb","svb","lvb","dvb","svmin","lvmin","dvmin","svmax","lvmax","dvmax","absoluteUnits","in","cm","mm","pt","pc","px","Q","Number","isFinite","cache","memoizedGetPxFromCssUnit","hash","hashOptions","hasOwnProperty","_default","exports","default"],"sources":["@wordpress/components/src/mobile/utils/get-px-from-css-unit.native.js"],"sourcesContent":["/**\n * Converts string to object { value, unit }.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit\n */\nfunction parseUnit( cssUnit ) {\n\tconst match = cssUnit\n\t\t?.trim()\n\t\t.match(\n\t\t\t/^(0?[-.]?\\d*\\.?\\d+)(r?e[m|x]|v[h|w|min|max]+|p[x|t|c]|[c|m]m|%|in|ch|Q|lh)$/\n\t\t);\n\tif ( ! isNaN( cssUnit ) && ! isNaN( parseFloat( cssUnit ) ) ) {\n\t\treturn { value: parseFloat( cssUnit ), unit: 'px' };\n\t}\n\treturn match\n\t\t? { value: parseFloat( match[ 1 ] ) || match[ 1 ], unit: match[ 2 ] }\n\t\t: { value: cssUnit, unit: undefined };\n}\n/**\n * Evaluate a math expression.\n *\n * @param {string} expression\n * @return {number} evaluated expression.\n */\nfunction calculate( expression ) {\n\ttry {\n\t\treturn Function( `'use strict'; return (${ expression })` )();\n\t} catch ( err ) {\n\t\treturn null;\n\t}\n}\n\n/**\n * Calculates the css function value for the supported css functions such as max, min, clamp and calc.\n *\n * @param {string} functionUnitValue string should be in a particular format (for example min(12px,12px) ) no nested loops.\n * @param {Object} options\n * @return {string} unit containing the unit in PX.\n */\nfunction getFunctionUnitValue( functionUnitValue, options ) {\n\tconst functionUnit = functionUnitValue.split( /[(),]/g ).filter( Boolean );\n\n\tconst units = functionUnit\n\t\t.slice( 1 )\n\t\t.map( ( unit ) => parseUnit( getPxFromCssUnit( unit, options ) ).value )\n\t\t.filter( Boolean );\n\n\tswitch ( functionUnit[ 0 ] ) {\n\t\tcase 'min':\n\t\t\treturn Math.min( ...units ) + 'px';\n\t\tcase 'max':\n\t\t\treturn Math.max( ...units ) + 'px';\n\t\tcase 'clamp':\n\t\t\tif ( units.length !== 3 ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tif ( units[ 1 ] < units[ 0 ] ) {\n\t\t\t\treturn units[ 0 ] + 'px';\n\t\t\t}\n\t\t\tif ( units[ 1 ] > units[ 2 ] ) {\n\t\t\t\treturn units[ 2 ] + 'px';\n\t\t\t}\n\t\t\treturn units[ 1 ] + 'px';\n\t\tcase 'calc':\n\t\t\treturn units[ 0 ] + 'px';\n\t}\n}\n\n/**\n * Take a css function such as min, max, calc, clamp and returns parsedUnit\n *\n * How this works for the nested function is that it first replaces the inner function call.\n * Then it tackles the outer onces.\n * So for example: min( max(25px, 35px), 40px )\n * in the first pass we would replace max(25px, 35px) with 35px.\n * then we would try to evaluate min( 35px, 40px )\n * and then finally return 35px.\n *\n * @param {string} cssUnit\n * @return {Object} parsedUnit object.\n */\nfunction parseUnitFunction( cssUnit ) {\n\twhile ( true ) {\n\t\tconst currentCssUnit = cssUnit;\n\t\tconst regExp = /(max|min|calc|clamp)\\(([^()]*)\\)/g;\n\t\tconst matches = regExp.exec( cssUnit ) || [];\n\t\tif ( matches[ 0 ] ) {\n\t\t\tconst functionUnitValue = getFunctionUnitValue( matches[ 0 ] );\n\t\t\tcssUnit = cssUnit.replace( matches[ 0 ], functionUnitValue );\n\t\t}\n\n\t\t// If the unit hasn't been modified or we have a single value break free.\n\t\tif ( cssUnit === currentCssUnit || parseFloat( cssUnit ) ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn parseUnit( cssUnit );\n}\n/**\n * Return true if we think this is a math expression.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {boolean} Whether the cssUnit is a math expression.\n */\nfunction isMathExpression( cssUnit ) {\n\tfor ( let i = 0; i < cssUnit.length; i++ ) {\n\t\tif ( [ '+', '-', '/', '*' ].includes( cssUnit[ i ] ) ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n/**\n * Evaluates the math expression and return a px value.\n *\n * @param {string} cssUnit the cssUnit value being evaluted.\n * @return {string} return a converfted value to px.\n */\nfunction evalMathExpression( cssUnit ) {\n\tlet errorFound = false;\n\t// Convert every part of the expression to px values.\n\t// The following regex matches numbers that have a following unit\n\t// E.g. 5.25rem, 1vw\n\tconst cssUnitsBits = cssUnit.match( /\\d+\\.?\\d*[a-zA-Z]+|\\.\\d+[a-zA-Z]+/g );\n\tif ( cssUnitsBits ) {\n\t\tfor ( const unit of cssUnitsBits ) {\n\t\t\t// Standardize the unit to px and extract the value.\n\t\t\tconst parsedUnit = parseUnit( getPxFromCssUnit( unit ) );\n\t\t\tif ( ! parseFloat( parsedUnit.value ) ) {\n\t\t\t\terrorFound = true;\n\t\t\t\t// End early since we are dealing with a null value.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcssUnit = cssUnit.replace( unit, parsedUnit.value );\n\t\t}\n\t} else {\n\t\terrorFound = true;\n\t}\n\n\t// For mixed math expressions wrapped within CSS expressions\n\tconst expressionsMatches = cssUnit.match( /(max|min|clamp)/g );\n\tif ( ! errorFound && expressionsMatches ) {\n\t\tconst values = cssUnit.split( ',' );\n\t\tfor ( const currentValue of values ) {\n\t\t\t// Check for nested calc() and remove them to calculate the value.\n\t\t\tconst rawCurrentValue = currentValue.replace( /\\s|calc/g, '' );\n\n\t\t\tif ( isMathExpression( rawCurrentValue ) ) {\n\t\t\t\tconst calculatedExpression = calculate( rawCurrentValue );\n\n\t\t\t\tif ( calculatedExpression ) {\n\t\t\t\t\tconst calculatedValue =\n\t\t\t\t\t\tcalculatedExpression.toFixed( 0 ) + 'px';\n\t\t\t\t\tcssUnit = cssUnit.replace( currentValue, calculatedValue );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst parsedValue = parseUnitFunction( cssUnit );\n\t\treturn ! parsedValue ? null : parsedValue.value + parsedValue.unit;\n\t}\n\n\tif ( errorFound ) {\n\t\treturn null;\n\t}\n\n\tconst calculatedResult = calculate( cssUnit );\n\treturn calculatedResult ? calculatedResult.toFixed( 0 ) + 'px' : null;\n}\n\n/**\n * Convert a parsedUnit object to px value.\n *\n * @param {Object} parsedUnit\n * @param {Object} options\n * @return {string} or {null} returns the converted with in a px value format.\n */\nfunction convertParsedUnitToPx( parsedUnit, options ) {\n\tconst PIXELS_PER_INCH = 96;\n\tconst ONE_PERCENT = 0.01;\n\n\tconst defaultProperties = {\n\t\tfontSize: 16,\n\t\tlineHeight: 16,\n\t\twidth: 375,\n\t\theight: 812,\n\t\ttype: 'font',\n\t};\n\n\tconst setOptions = Object.assign( {}, defaultProperties, options );\n\n\tconst relativeUnits = {\n\t\tem: setOptions.fontSize,\n\t\trem: setOptions.fontSize,\n\t\tvh: setOptions.height * ONE_PERCENT,\n\t\tvw: setOptions.width * ONE_PERCENT,\n\t\tvmin:\n\t\t\t( setOptions.width < setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\tvmax:\n\t\t\t( setOptions.width > setOptions.height\n\t\t\t\t? setOptions.width\n\t\t\t\t: setOptions.height ) * ONE_PERCENT,\n\t\t'%':\n\t\t\t( setOptions.type === 'font'\n\t\t\t\t? setOptions.fontSize\n\t\t\t\t: setOptions.width ) * ONE_PERCENT,\n\t\tch: 8, // The advance measure (width) of the glyph \"0\" of the element's font. Approximate\n\t\tex: 7.15625, // X-height of the element's font. Approximate.\n\t\tlh: setOptions.lineHeight,\n\t};\n\trelativeUnits.svw = relativeUnits.vmin;\n\trelativeUnits.lvw = relativeUnits.vmax;\n\trelativeUnits.dvw = relativeUnits.vw;\n\trelativeUnits.svh = relativeUnits.vmin;\n\trelativeUnits.lvh = relativeUnits.vmax;\n\trelativeUnits.dvh = relativeUnits.vh;\n\trelativeUnits.vi = relativeUnits.vh;\n\trelativeUnits.svi = relativeUnits.vmin;\n\trelativeUnits.lvi = relativeUnits.vmax;\n\trelativeUnits.dvi = relativeUnits.vw;\n\trelativeUnits.vb = relativeUnits.vh;\n\trelativeUnits.svb = relativeUnits.vmin;\n\trelativeUnits.lvb = relativeUnits.vmax;\n\trelativeUnits.dvb = relativeUnits.vh;\n\trelativeUnits.svmin = relativeUnits.vmin;\n\trelativeUnits.lvmin = relativeUnits.vmin;\n\trelativeUnits.dvmin = relativeUnits.vmin;\n\trelativeUnits.svmax = relativeUnits.vmax;\n\trelativeUnits.lvmax = relativeUnits.vmax;\n\trelativeUnits.dvmax = relativeUnits.vmax;\n\n\tconst absoluteUnits = {\n\t\tin: PIXELS_PER_INCH,\n\t\tcm: PIXELS_PER_INCH / 2.54,\n\t\tmm: PIXELS_PER_INCH / 25.4,\n\t\tpt: PIXELS_PER_INCH / 72,\n\t\tpc: PIXELS_PER_INCH / 6,\n\t\tpx: 1,\n\t\tQ: PIXELS_PER_INCH / 2.54 / 40,\n\t};\n\n\tif ( relativeUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( relativeUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\tif ( absoluteUnits[ parsedUnit.unit ] ) {\n\t\treturn (\n\t\t\t( absoluteUnits[ parsedUnit.unit ] * parsedUnit.value ).toFixed(\n\t\t\t\t0\n\t\t\t) + 'px'\n\t\t);\n\t}\n\n\treturn null;\n}\n\n/**\n * Returns the px value of a cssUnit.\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nexport function getPxFromCssUnit( cssUnit, options = {} ) {\n\tif ( Number.isFinite( cssUnit ) ) {\n\t\treturn cssUnit.toFixed( 0 ) + 'px';\n\t}\n\tif ( cssUnit === undefined ) {\n\t\treturn null;\n\t}\n\tlet parsedUnit = parseUnit( cssUnit );\n\n\tif ( ! parsedUnit.unit ) {\n\t\tparsedUnit = parseUnitFunction( cssUnit );\n\t}\n\n\tif ( isMathExpression( cssUnit ) && ! parsedUnit.unit ) {\n\t\treturn evalMathExpression( cssUnit );\n\t}\n\n\treturn convertParsedUnitToPx( parsedUnit, options );\n}\n\n// Use simple cache.\nconst cache = {};\n/**\n * Returns the px value of a cssUnit. The memoized version of getPxFromCssUnit;\n *\n * @param {string} cssUnit\n * @param {Object} options\n * @return {string} returns the cssUnit value in a simple px format.\n */\nfunction memoizedGetPxFromCssUnit( cssUnit, options = {} ) {\n\tconst hash = cssUnit + hashOptions( options );\n\n\tif ( ! cache[ hash ] ) {\n\t\tcache[ hash ] = getPxFromCssUnit( cssUnit, options );\n\t}\n\treturn cache[ hash ];\n}\n\nfunction hashOptions( options ) {\n\tlet hash = '';\n\tif ( options.hasOwnProperty( 'fontSize' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'lineHeight' ) ) {\n\t\thash = ':' + options.lineHeight;\n\t}\n\tif ( options.hasOwnProperty( 'width' ) ) {\n\t\thash = ':' + options.width;\n\t}\n\tif ( options.hasOwnProperty( 'height' ) ) {\n\t\thash = ':' + options.height;\n\t}\n\tif ( options.hasOwnProperty( 'type' ) ) {\n\t\thash = ':' + options.type;\n\t}\n\treturn hash;\n}\n\nexport default memoizedGetPxFromCssUnit;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAASA,CAAEC,OAAO,EAAG;EAC7B,MAAMC,KAAK,GAAGD,OAAO,EAClBE,IAAI,CAAC,CAAC,CACPD,KAAK,CACL,6EACD,CAAC;EACF,IAAK,CAAEE,KAAK,CAAEH,OAAQ,CAAC,IAAI,CAAEG,KAAK,CAAEC,UAAU,CAAEJ,OAAQ,CAAE,CAAC,EAAG;IAC7D,OAAO;MAAEK,KAAK,EAAED,UAAU,CAAEJ,OAAQ,CAAC;MAAEM,IAAI,EAAE;IAAK,CAAC;EACpD;EACA,OAAOL,KAAK,GACT;IAAEI,KAAK,EAAED,UAAU,CAAEH,KAAK,CAAE,CAAC,CAAG,CAAC,IAAIA,KAAK,CAAE,CAAC,CAAE;IAAEK,IAAI,EAAEL,KAAK,CAAE,CAAC;EAAG,CAAC,GACnE;IAAEI,KAAK,EAAEL,OAAO;IAAEM,IAAI,EAAEC;EAAU,CAAC;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,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imalNum","regex","result","match","toFixed","num","decimalOffset","Number","parseFloat"],"sources":["@wordpress/components/src/mobile/utils/index.native.js"],"sourcesContent":["export function removeNonDigit( text, decimalNum ) {\n\tconst regex = decimalNum > 0 ? /^(\\d+\\.?\\,?(\\d+)?)/ : /([\\d]+)/;\n\tconst result = text.match( regex );\n\treturn result ? result[ 0 ] : '';\n}\n\nexport function toFixed( num, decimalNum = 0 ) {\n\tconst decimalOffset = decimalNum < 0 ? 0 : decimalNum;\n\treturn Number.parseFloat(\n\t\tNumber.parseFloat( num ).toFixed( decimalOffset )\n\t);\n}\n"],"mappings":";;;;;;;AAAO,SAASA,cAAcA,CAAEC,IAAI,EAAEC,UAAU,EAAG;EAClD,MAAMC,KAAK,GAAGD,UAAU,GAAG,CAAC,GAAG,oBAAoB,GAAG,SAAS;EAC/D,MAAME,MAAM,GAAGH,IAAI,CAACI,KAAK,CAAEF,KAAM,CAAC;EAClC,OAAOC,MAAM,GAAGA,MAAM,CAAE,CAAC,CAAE,GAAG,EAAE;AACjC;AAEO,SAASE,OAAOA,CAAEC,GAAG,EAAEL,UAAU,GAAG,CAAC,EAAG;EAC9C,MAAMM,aAAa,GAAGN,UAAU,GAAG,CAAC,GAAG,CAAC,GAAGA,UAAU;EACrD,OAAOO,MAAM,CAACC,UAAU,CACvBD,MAAM,CAACC,UAAU,CAAEH,GAAI,CAAC,CAACD,OAAO,CAAEE,aAAc,CACjD,CAAC;AACF"}
|
|
1
|
+
{"version":3,"names":["removeNonDigit","text","decimalNum","regex","result","match","toFixed","num","decimalOffset","Number","parseFloat"],"sources":["@wordpress/components/src/mobile/utils/index.native.js"],"sourcesContent":["export function removeNonDigit( text, decimalNum ) {\n\tconst regex = decimalNum > 0 ? /^(\\d+\\.?\\,?(\\d+)?)/ : /([\\d]+)/;\n\tconst result = text.match( regex );\n\treturn result ? result[ 0 ] : '';\n}\n\nexport function toFixed( num, decimalNum = 0 ) {\n\tconst decimalOffset = decimalNum < 0 ? 0 : decimalNum;\n\treturn Number.parseFloat(\n\t\tNumber.parseFloat( num ).toFixed( decimalOffset )\n\t);\n}\n"],"mappings":";;;;;;;AAAO,SAASA,cAAcA,CAAEC,IAAI,EAAEC,UAAU,EAAG;EAClD,MAAMC,KAAK,GAAGD,UAAU,GAAG,CAAC,GAAG,oBAAoB,GAAG,SAAS;EAC/D,MAAME,MAAM,GAAGH,IAAI,CAACI,KAAK,CAAEF,KAAM,CAAC;EAClC,OAAOC,MAAM,GAAGA,MAAM,CAAE,CAAC,CAAE,GAAG,EAAE;AACjC;AAEO,SAASE,OAAOA,CAAEC,GAAG,EAAEL,UAAU,GAAG,CAAC,EAAG;EAC9C,MAAMM,aAAa,GAAGN,UAAU,GAAG,CAAC,GAAG,CAAC,GAAGA,UAAU;EACrD,OAAOO,MAAM,CAACC,UAAU,CACvBD,MAAM,CAACC,UAAU,CAAEH,GAAI,CAAC,CAACD,OAAO,CAAEE,aAAc,CACjD,CAAC;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","useIsFloatingKeyboard","windowWidth","Dimensions","get","width","floating","setFloating","useState","useEffect","onKeyboardWillChangeFrame","event","endCoordinates","keyboardChangeSubscription","Keyboard","addListener","remove"],"sources":["@wordpress/components/src/mobile/utils/use-is-floating-keyboard.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nexport default function useIsFloatingKeyboard() {\n\tconst windowWidth = Dimensions.get( 'window' ).width;\n\n\tconst [ floating, setFloating ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst onKeyboardWillChangeFrame = ( event ) => {\n\t\t\tsetFloating( event.endCoordinates.width !== windowWidth );\n\t\t};\n\n\t\tconst keyboardChangeSubscription = Keyboard.addListener(\n\t\t\t'keyboardWillChangeFrame',\n\t\t\tonKeyboardWillChangeFrame\n\t\t);\n\t\treturn () => {\n\t\t\tkeyboardChangeSubscription.remove();\n\t\t};\n\t}, [ windowWidth ] );\n\n\treturn floating;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASE,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,WAAW,GAAGC,uBAAU,CAACC,GAAG,CAAE,QAAS,CAAC,CAACC,KAAK;EAEpD,MAAM,CAAEC,QAAQ,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAEnD,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,yBAAyB,GAAKC,KAAK,IAAM;MAC9CJ,WAAW,CAAEI,KAAK,CAACC,cAAc,CAACP,KAAK,KAAKH,WAAY,CAAC;IAC1D,CAAC;IAED,MAAMW,0BAA0B,GAAGC,qBAAQ,CAACC,WAAW,CACtD,yBAAyB,EACzBL,yBACD,CAAC;IACD,OAAO,MAAM;MACZG,0BAA0B,CAACG,MAAM,CAAC,CAAC;IACpC,CAAC;EACF,CAAC,EAAE,CAAEd,WAAW,CAAG,CAAC;EAEpB,OAAOI,QAAQ;AAChB"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","useIsFloatingKeyboard","windowWidth","Dimensions","get","width","floating","setFloating","useState","useEffect","onKeyboardWillChangeFrame","event","endCoordinates","keyboardChangeSubscription","Keyboard","addListener","remove"],"sources":["@wordpress/components/src/mobile/utils/use-is-floating-keyboard.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Keyboard, Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState } from '@wordpress/element';\n\nexport default function useIsFloatingKeyboard() {\n\tconst windowWidth = Dimensions.get( 'window' ).width;\n\n\tconst [ floating, setFloating ] = useState( false );\n\n\tuseEffect( () => {\n\t\tconst onKeyboardWillChangeFrame = ( event ) => {\n\t\t\tsetFloating( event.endCoordinates.width !== windowWidth );\n\t\t};\n\n\t\tconst keyboardChangeSubscription = Keyboard.addListener(\n\t\t\t'keyboardWillChangeFrame',\n\t\t\tonKeyboardWillChangeFrame\n\t\t);\n\t\treturn () => {\n\t\t\tkeyboardChangeSubscription.remove();\n\t\t};\n\t}, [ windowWidth ] );\n\n\treturn floating;\n}\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAGe,SAASE,qBAAqBA,CAAA,EAAG;EAC/C,MAAMC,WAAW,GAAGC,uBAAU,CAACC,GAAG,CAAE,QAAS,CAAC,CAACC,KAAK;EAEpD,MAAM,CAAEC,QAAQ,EAAEC,WAAW,CAAE,GAAG,IAAAC,iBAAQ,EAAE,KAAM,CAAC;EAEnD,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,yBAAyB,GAAKC,KAAK,IAAM;MAC9CJ,WAAW,CAAEI,KAAK,CAACC,cAAc,CAACP,KAAK,KAAKH,WAAY,CAAC;IAC1D,CAAC;IAED,MAAMW,0BAA0B,GAAGC,qBAAQ,CAACC,WAAW,CACtD,yBAAyB,EACzBL,yBACD,CAAC;IACD,OAAO,MAAM;MACZG,0BAA0B,CAACG,MAAM,CAAC,CAAC;IACpC,CAAC;EACF,CAAC,EAAE,CAAEd,WAAW,CAAG,CAAC;EAEpB,OAAOI,QAAQ;AAChB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_element","_globalStylesContext","_interopRequireDefault","getValueAndUnit","value","unit","regex","splitValue","match","filter","v","valueToConvert","valueUnit","undefined","exports","convertUnitToMobile","containerSize","globalStyles","width","height","fontSize","Number","vw","Math","round","vh","useConvertUnitToMobile","styles","useContext","GlobalStylesContext","windowSizes","setWindowSizes","useState","Dimensions","get","useEffect","dimensionsChangeSubscription","addEventListener","onDimensionsChange","remove","useCallback","window","useMemo"],"sources":["@wordpress/components/src/mobile/utils/use-unit-converter-to-mobile.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseState,\n\tuseMemo,\n\tuseCallback,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport GlobalStylesContext from '../global-styles-context';\n\nconst getValueAndUnit = ( value, unit ) => {\n\tconst regex = /(\\d+\\.?\\d*)(.*)/;\n\n\tconst splitValue = `${ value }`\n\t\t?.match( regex )\n\t\t?.filter( ( v ) => v !== '' );\n\n\tif ( splitValue ) {\n\t\treturn {\n\t\t\tvalueToConvert: splitValue[ 1 ],\n\t\t\tvalueUnit: unit || splitValue[ 2 ],\n\t\t};\n\t}\n\treturn undefined;\n};\n\nconst convertUnitToMobile = ( containerSize, globalStyles, value, unit ) => {\n\tconst { width, height } = containerSize;\n\tconst { valueToConvert, valueUnit } = getValueAndUnit( value, unit ) || {};\n\tconst { fontSize = 16 } = globalStyles || {};\n\n\tif ( valueToConvert === undefined ) {\n\t\treturn undefined;\n\t}\n\n\tswitch ( valueUnit ) {\n\t\tcase 'rem':\n\t\tcase 'em':\n\t\t\treturn valueToConvert * fontSize;\n\t\tcase '%':\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t\tcase 'px':\n\t\t\treturn Number( valueToConvert );\n\t\tcase 'vw':\n\t\t\tconst vw = width / 100;\n\t\t\treturn Math.round( valueToConvert * vw );\n\t\tcase 'vh':\n\t\t\tconst vh = height / 100;\n\t\t\treturn Math.round( valueToConvert * vh );\n\t\tdefault:\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t}\n};\n\nconst useConvertUnitToMobile = ( value, unit ) => {\n\tconst { globalStyles: styles } = useContext( GlobalStylesContext );\n\tconst [ windowSizes, setWindowSizes ] = useState(\n\t\tDimensions.get( 'window' )\n\t);\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonDimensionsChange\n\t\t);\n\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst onDimensionsChange = useCallback( ( { window } ) => {\n\t\tsetWindowSizes( window );\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tconst { valueToConvert, valueUnit } =\n\t\t\tgetValueAndUnit( value, unit ) || {};\n\n\t\treturn convertUnitToMobile(\n\t\t\twindowSizes,\n\t\t\tstyles,\n\t\t\tvalueToConvert,\n\t\t\tvalueUnit\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ windowSizes, value, unit ] );\n};\n\nexport { convertUnitToMobile, useConvertUnitToMobile, getValueAndUnit };\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAMI,eAAe,GAAGA,CAAEC,KAAK,EAAEC,IAAI,KAAM;EAC1C,MAAMC,KAAK,GAAG,iBAAiB;EAE/B,MAAMC,UAAU,GAAI,GAAGH,KAAO,EAAC,EAC5BI,KAAK,CAAEF,KAAM,CAAC,EACdG,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAK,EAAG,CAAC;EAE9B,IAAKH,UAAU,EAAG;IACjB,OAAO;MACNI,cAAc,EAAEJ,UAAU,CAAE,CAAC,CAAE;MAC/BK,SAAS,EAAEP,IAAI,IAAIE,UAAU,CAAE,CAAC;IACjC,CAAC;EACF;EACA,OAAOM,S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AAEC,cAAc,CAAE,GAAG,IAAAC,iBAAQ,EAC/CC,uBAAU,CAACC,GAAG,CAAE,QAAS,CAC1B,CAAC;EAED,IAAAC,kBAAS,EAAE,MAAM;IAChB,MAAMC,4BAA4B,GAAGH,uBAAU,CAACI,gBAAgB,CAC/D,QAAQ,EACRC,kBACD,CAAC;IAED,OAAO,MAAM;MACZF,4BAA4B,CAACG,MAAM,CAAC,CAAC;IACtC,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMD,kBAAkB,GAAG,IAAAE,oBAAW,EAAE,CAAE;IAAEC;EAAO,CAAC,KAAM;IACzDV,cAAc,CAAEU,MAAO,CAAC;EACzB,CAAC,EAAE,EAAG,CAAC;EAEP,OAAO,IAAAC,gBAAO,EAAE,MAAM;IACrB,MAAM;MAAE/B,cAAc;MAAEC;IAAU,CAAC,GAClCT,eAAe,CAAEC,KAAK,EAAEC,IAAK,CAAC,IAAI,CAAC,CAAC;IAErC,OAAOU,mBAAmB,CACzBe,WAAW,EACXH,MAAM,EACNhB,cAAc,EACdC,SACD,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,CAAEkB,WAAW,EAAE1B,KAAK,EAAEC,IAAI,CAAG,CAAC;AAClC,CAAC;AAACS,OAAA,CAAAY,sBAAA,GAAAA,sBAAA"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_element","_globalStylesContext","_interopRequireDefault","getValueAndUnit","value","unit","regex","splitValue","match","filter","v","valueToConvert","valueUnit","undefined","exports","convertUnitToMobile","containerSize","globalStyles","width","height","fontSize","Number","vw","Math","round","vh","useConvertUnitToMobile","styles","useContext","GlobalStylesContext","windowSizes","setWindowSizes","useState","Dimensions","get","useEffect","dimensionsChangeSubscription","addEventListener","onDimensionsChange","remove","useCallback","window","useMemo"],"sources":["@wordpress/components/src/mobile/utils/use-unit-converter-to-mobile.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseState,\n\tuseMemo,\n\tuseCallback,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport GlobalStylesContext from '../global-styles-context';\n\nconst getValueAndUnit = ( value, unit ) => {\n\tconst regex = /(\\d+\\.?\\d*)(.*)/;\n\n\tconst splitValue = `${ value }`\n\t\t?.match( regex )\n\t\t?.filter( ( v ) => v !== '' );\n\n\tif ( splitValue ) {\n\t\treturn {\n\t\t\tvalueToConvert: splitValue[ 1 ],\n\t\t\tvalueUnit: unit || splitValue[ 2 ],\n\t\t};\n\t}\n\treturn undefined;\n};\n\nconst convertUnitToMobile = ( containerSize, globalStyles, value, unit ) => {\n\tconst { width, height } = containerSize;\n\tconst { valueToConvert, valueUnit } = getValueAndUnit( value, unit ) || {};\n\tconst { fontSize = 16 } = globalStyles || {};\n\n\tif ( valueToConvert === undefined ) {\n\t\treturn undefined;\n\t}\n\n\tswitch ( valueUnit ) {\n\t\tcase 'rem':\n\t\tcase 'em':\n\t\t\treturn valueToConvert * fontSize;\n\t\tcase '%':\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t\tcase 'px':\n\t\t\treturn Number( valueToConvert );\n\t\tcase 'vw':\n\t\t\tconst vw = width / 100;\n\t\t\treturn Math.round( valueToConvert * vw );\n\t\tcase 'vh':\n\t\t\tconst vh = height / 100;\n\t\t\treturn Math.round( valueToConvert * vh );\n\t\tdefault:\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t}\n};\n\nconst useConvertUnitToMobile = ( value, unit ) => {\n\tconst { globalStyles: styles } = useContext( GlobalStylesContext );\n\tconst [ windowSizes, setWindowSizes ] = useState(\n\t\tDimensions.get( 'window' )\n\t);\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonDimensionsChange\n\t\t);\n\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst onDimensionsChange = useCallback( ( { window } ) => {\n\t\tsetWindowSizes( window );\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tconst { valueToConvert, valueUnit } =\n\t\t\tgetValueAndUnit( value, unit ) || {};\n\n\t\treturn convertUnitToMobile(\n\t\t\twindowSizes,\n\t\t\tstyles,\n\t\t\tvalueToConvert,\n\t\t\tvalueUnit\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ windowSizes, value, unit ] );\n};\n\nexport { convertUnitToMobile, useConvertUnitToMobile, getValueAndUnit };\n"],"mappings":";;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,oBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAGA,MAAMI,eAAe,GAAGA,CAAEC,KAAK,EAAEC,IAAI,KAAM;EAC1C,MAAMC,KAAK,GAAG,iBAAiB;EAE/B,MAAMC,UAAU,GAAI,GAAGH,KAAO,EAAC,EAC5BI,KAAK,CAAEF,KAAM,CAAC,EACdG,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAK,EAAG,CAAC;EAE9B,IAAKH,UAAU,EAAG;IACjB,OAAO;MACNI,cAAc,EAAEJ,UAAU,CAAE,CAAC,CAAE;MAC/BK,SAAS,EAAEP,IAAI,IAAIE,UAAU,CAAE,CAAC;IACjC,CAAC;EACF;EACA,OAAOM,SAAS;AACjB,CAAC;AAACC,OAAA,CAAAX,eAAA,GAAAA,eAAA;AAEF,MAAMY,mBAAmB,GAAGA,CAAEC,aAAa,EAAEC,YAAY,EAAEb,K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AAM;IAChB,MAAMC,4BAA4B,GAAGH,uBAAU,CAACI,gBAAgB,CAC/D,QAAQ,EACRC,kBACD,CAAC;IAED,OAAO,MAAM;MACZF,4BAA4B,CAACG,MAAM,CAAC,CAAC;IACtC,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,EAAG,CAAC;EAEP,MAAMD,kBAAkB,GAAG,IAAAE,oBAAW,EAAE,CAAE;IAAEC;EAAO,CAAC,KAAM;IACzDV,cAAc,CAAEU,MAAO,CAAC;EACzB,CAAC,EAAE,EAAG,CAAC;EAEP,OAAO,IAAAC,gBAAO,EAAE,MAAM;IACrB,MAAM;MAAE/B,cAAc;MAAEC;IAAU,CAAC,GAClCT,eAAe,CAAEC,KAAK,EAAEC,IAAK,CAAC,IAAI,CAAC,CAAC;IAErC,OAAOU,mBAAmB,CACzBe,WAAW,EACXH,MAAM,EACNhB,cAAc,EACdC,SACD,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,CAAEkB,WAAW,EAAE1B,KAAK,EAAEC,IAAI,CAAG,CAAC;AAClC,CAAC;AAACS,OAAA,CAAAY,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LIVE_REGION_ARIA_ROLES","Set","hiddenElementsByDepth","modalize","modalElement","elements","Array","from","document","body","children","hiddenElements","push","element","elementShouldBeHidden","setAttribute","role","getAttribute","tagName","hasAttribute","has","unmodalize","pop","removeAttribute"],"sources":["@wordpress/components/src/modal/aria-helper.ts"],"sourcesContent":["const LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nconst hiddenElementsByDepth: Element[][] = [];\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param modalElement The element that should not be hidden.\n */\nexport function modalize( modalElement?: HTMLDivElement ) {\n\tconst elements = Array.from( document.body.children );\n\tconst hiddenElements: Element[] = [];\n\thiddenElementsByDepth.push( hiddenElements );\n\tfor ( const element of elements ) {\n\t\tif ( element === modalElement ) continue;\n\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t}\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param element The element that should be checked.\n *\n * @return Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element: Element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\t( role && LIVE_REGION_ARIA_ROLES.has( role ) )\n\t);\n}\n\n/**\n * Accessibly reveals the elements hidden by the latest modal.\n */\nexport function unmodalize() {\n\tconst hiddenElements = hiddenElementsByDepth.pop();\n\tif ( ! hiddenElements ) return;\n\n\tfor ( const element of hiddenElements )\n\t\telement.removeAttribute( 'aria-hidden' );\n}\n"],"mappings":";;;;;;;;AAAA,MAAMA,sBAAsB,GAAG,IAAIC,GAAG,CAAE,CACvC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,OAAO,CACN,CAAC;AAEH,MAAMC,qBAAkC,GAAG,EAAE;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQA,CAAEC,YAA6B,EAAG;EACzD,MAAMC,QAAQ,GAAGC,KAAK,CAACC,IAAI,CAAEC,QAAQ,CAACC,IAAI,CAACC,QAAS,CAAC;EACrD,MAAMC,cAAyB,GAAG,EAAE;EACpCT,qBAAqB,CAACU,IAAI,CAAED,cAAe,CAAC;EAC5C,KAAM,MAAME,OAAO,IAAIR,QAAQ,EAAG;IACjC,IAAKQ,OAAO,KAAKT,YAAY,EAAG;IAEhC,IAAKU,qBAAqB,CAAED,OAAQ,CAAC,EAAG;MACvCA,OAAO,CAACE,YAAY,CAAE,aAAa,EAAE,MAAO,CAAC;MAC7CJ,cAAc,CAACC,IAAI,CAAEC,OAAQ,CAAC;IAC/B;EACD;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAED,OAAgB,EAAG;EACzD,MAAMG,IAAI,GAAGH,OAAO,CAACI,YAAY,CAAE,MAAO,CAAC;EAC3C,OAAO,EACNJ,OAAO,CAACK,OAAO,KAAK,QAAQ,IAC5BL,OAAO,CAACM,YAAY,CAAE,aAAc,CAAC,IACrCN,OAAO,CAACM,YAAY,CAAE,WAAY,CAAC,IACjCH,IAAI,IAAIhB,sBAAsB,CAACoB,GAAG,CAAEJ,IAAK,CAAG,CAC9C;AACF;;AAEA;AACA;AACA;AACO,SAASK,UAAUA,CAAA,EAAG;EAC5B,MAAMV,cAAc,GAAGT,qBAAqB,CAACoB,GAAG,CAAC,CAAC;EAClD,IAAK,CAAEX,cAAc,EAAG;EAExB,KAAM,MAAME,OAAO,IAAIF,cAAc,EACpCE,OAAO,CAACU,eAAe,CAAE,aAAc,CAAC;AAC1C"}
|
|
1
|
+
{"version":3,"names":["LIVE_REGION_ARIA_ROLES","Set","hiddenElementsByDepth","modalize","modalElement","elements","Array","from","document","body","children","hiddenElements","push","element","elementShouldBeHidden","setAttribute","role","getAttribute","tagName","hasAttribute","has","unmodalize","pop","removeAttribute"],"sources":["@wordpress/components/src/modal/aria-helper.ts"],"sourcesContent":["const LIVE_REGION_ARIA_ROLES = new Set( [\n\t'alert',\n\t'status',\n\t'log',\n\t'marquee',\n\t'timer',\n] );\n\nconst hiddenElementsByDepth: Element[][] = [];\n\n/**\n * Hides all elements in the body element from screen-readers except\n * the provided element and elements that should not be hidden from\n * screen-readers.\n *\n * The reason we do this is because `aria-modal=\"true\"` currently is bugged\n * in Safari, and support is spotty in other browsers overall. In the future\n * we should consider removing these helper functions in favor of\n * `aria-modal=\"true\"`.\n *\n * @param modalElement The element that should not be hidden.\n */\nexport function modalize( modalElement?: HTMLDivElement ) {\n\tconst elements = Array.from( document.body.children );\n\tconst hiddenElements: Element[] = [];\n\thiddenElementsByDepth.push( hiddenElements );\n\tfor ( const element of elements ) {\n\t\tif ( element === modalElement ) continue;\n\n\t\tif ( elementShouldBeHidden( element ) ) {\n\t\t\telement.setAttribute( 'aria-hidden', 'true' );\n\t\t\thiddenElements.push( element );\n\t\t}\n\t}\n}\n\n/**\n * Determines if the passed element should not be hidden from screen readers.\n *\n * @param element The element that should be checked.\n *\n * @return Whether the element should not be hidden from screen-readers.\n */\nexport function elementShouldBeHidden( element: Element ) {\n\tconst role = element.getAttribute( 'role' );\n\treturn ! (\n\t\telement.tagName === 'SCRIPT' ||\n\t\telement.hasAttribute( 'aria-hidden' ) ||\n\t\telement.hasAttribute( 'aria-live' ) ||\n\t\t( role && LIVE_REGION_ARIA_ROLES.has( role ) )\n\t);\n}\n\n/**\n * Accessibly reveals the elements hidden by the latest modal.\n */\nexport function unmodalize() {\n\tconst hiddenElements = hiddenElementsByDepth.pop();\n\tif ( ! hiddenElements ) return;\n\n\tfor ( const element of hiddenElements )\n\t\telement.removeAttribute( 'aria-hidden' );\n}\n"],"mappings":";;;;;;;;AAAA,MAAMA,sBAAsB,GAAG,IAAIC,GAAG,CAAE,CACvC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,OAAO,CACN,CAAC;AAEH,MAAMC,qBAAkC,GAAG,EAAE;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,QAAQA,CAAEC,YAA6B,EAAG;EACzD,MAAMC,QAAQ,GAAGC,KAAK,CAACC,IAAI,CAAEC,QAAQ,CAACC,IAAI,CAACC,QAAS,CAAC;EACrD,MAAMC,cAAyB,GAAG,EAAE;EACpCT,qBAAqB,CAACU,IAAI,CAAED,cAAe,CAAC;EAC5C,KAAM,MAAME,OAAO,IAAIR,QAAQ,EAAG;IACjC,IAAKQ,OAAO,KAAKT,YAAY,EAAG;IAEhC,IAAKU,qBAAqB,CAAED,OAAQ,CAAC,EAAG;MACvCA,OAAO,CAACE,YAAY,CAAE,aAAa,EAAE,MAAO,CAAC;MAC7CJ,cAAc,CAACC,IAAI,CAAEC,OAAQ,CAAC;IAC/B;EACD;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAED,OAAgB,EAAG;EACzD,MAAMG,IAAI,GAAGH,OAAO,CAACI,YAAY,CAAE,MAAO,CAAC;EAC3C,OAAO,EACNJ,OAAO,CAACK,OAAO,KAAK,QAAQ,IAC5BL,OAAO,CAACM,YAAY,CAAE,aAAc,CAAC,IACrCN,OAAO,CAACM,YAAY,CAAE,WAAY,CAAC,IACjCH,IAAI,IAAIhB,sBAAsB,CAACoB,GAAG,CAAEJ,IAAK,CAAG,CAC9C;AACF;;AAEA;AACA;AACA;AACO,SAASK,UAAUA,CAAA,EAAG;EAC5B,MAAMV,cAAc,GAAGT,qBAAqB,CAACoB,GAAG,CAAC,CAAC;EAClD,IAAK,CAAEX,cAAc,EAAG;EAExB,KAAM,MAAME,OAAO,IAAIF,cAAc,EACpCE,OAAO,CAACU,eAAe,CAAE,aAAc,CAAC;AAC1C","ignoreList":[]}
|
package/build/modal/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var _button = _interopRequireDefault(require("../button"));
|
|
|
17
17
|
var _styleProvider = _interopRequireDefault(require("../style-provider"));
|
|
18
18
|
var _withIgnoreImeEvents = require("../utils/with-ignore-ime-events");
|
|
19
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
/**
|
|
22
22
|
* External dependencies
|
|
23
23
|
*/
|
package/build/modal/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","ModalContext","createContext","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","refOnRequestClose","dismissers","useContext","nestedDismissers","push","first","second","nested","shift","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","add","oneLess","remove","delete","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","_react","createElement","useMergeRefs","classnames","withIgnoreIMEEvents","tabIndex","onScroll","__","id","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type {\n\tForwardedRef,\n\tKeyboardEvent,\n\tMutableRefObject,\n\tUIEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} 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 type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nconst ModalContext = createContext<\n\tMutableRefObject< ModalProps[ 'onRequestClose' ] | undefined >[]\n>( [] );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst nestedDismissers = useRef< typeof dismissers >( [] );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\tdismissers.push( refOnRequestClose );\n\t\tconst [ first, second ] = dismissers;\n\t\tif ( second ) first?.current?.();\n\n\t\tconst nested = nestedDismissers.current;\n\t\treturn () => {\n\t\t\tnested[ 0 ]?.current?.();\n\t\t\tdismissers.shift();\n\t\t};\n\t}, [ dismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) onRequestClose();\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers.current }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re 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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,CAED,CAAC,EACJoB,aAAa,EACbhB,aAAa,IACd,IAAA0F,MAAA,CAAAC,aAAA,EAAChI,OAAA,CAAAS,OAAM;IACN+H,OAAO,EAAG9F,cAAgB;IAC1BC,IAAI,EAAG8F,YAAO;IACdC,KAAK,EACJ9F,gBAAgB,IAAI,IAAA0F,QAAE,EAAE,OAAQ;EAChC,CACD,CAEE,CACL,EAED,IAAAP,MAAA,CAAAC,aAAA;IACCzE,GAAG,EAAG,IAAA0E,qBAAY,EAAE,CACnB7D,oBAAoB,EACpBlC,YAAY,KAAK,qBAAqB,GACnC2B,eAAe,GACf,IAAI,CACN;EAAG,GAEHhB,QACE,CACD,CACD,CACS,CACX,CACL;EAED,OAAO,IAAA8F,qBAAY,EAClB,IAAAZ,MAAA,CAAAC,aAAA,EAACxG,YAAY,CAACoH,QAAQ;IAACC,KAAK,EAAGvD,gBAAgB,CAACT;EAAS,GACtDiD,KACoB,CAAC,EACxB/B,QAAQ,CAACC,IACV,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMrC,KAAK,GAAAmF,OAAA,CAAAnF,KAAA,GAAG,IAAAoF,mBAAU,EAAEnH,gBAAiB,CAAC;AAAC,IAAAoH,QAAA,GAAAF,OAAA,CAAArI,OAAA,GAErCkD,KAAK"}
|
|
1
|
+
{"version":3,"names":["_classnames","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalContext","createContext","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","refOnRequestClose","dismissers","useContext","nestedDismissers","push","first","second","nested","shift","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","add","oneLess","remove","delete","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","_react","createElement","useMergeRefs","classnames","withIgnoreIMEEvents","tabIndex","onScroll","__","id","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type {\n\tForwardedRef,\n\tKeyboardEvent,\n\tMutableRefObject,\n\tUIEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} 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 type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nconst ModalContext = createContext<\n\tMutableRefObject< ModalProps[ 'onRequestClose' ] | undefined >[]\n>( [] );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst nestedDismissers = useRef< typeof dismissers >( [] );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\tdismissers.push( refOnRequestClose );\n\t\tconst [ first, second ] = dismissers;\n\t\tif ( second ) first?.current?.();\n\n\t\tconst nested = nestedDismissers.current;\n\t\treturn () => {\n\t\t\tnested[ 0 ]?.current?.();\n\t\t\tdismissers.shift();\n\t\t};\n\t}, [ dismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) onRequestClose();\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ classnames( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers.current }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re 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 );\n\nexport default Modal;\n"],"mappings":";;;;;;;;AAGA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAWA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,oBAAA,GAAAV,OAAA;AAAsE,SAAAW,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN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,KAAK","ignoreList":[]}
|
package/build/modal/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/modal/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tAriaRole,\n\tCSSProperties,\n\tReactNode,\n\tKeyboardEventHandler,\n\tKeyboardEvent,\n\tSyntheticEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\nexport type ModalProps = {\n\taria?: {\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-describedby`.\n\t\t */\n\t\tdescribedby?: string;\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-labelledby`. Use this when you are rendering the title\n\t\t * yourself within the modal's content area instead of using the `title`\n\t\t * prop. This ensures the title is usable by assistive technology.\n\t\t *\n\t\t * Titles are required for accessibility reasons, see `contentLabel` and\n\t\t * `title` for other ways to provide a title.\n\t\t */\n\t\tlabelledby?: string;\n\t};\n\t/**\n\t * Class name added to the body element when the modal is open.\n\t *\n\t * @default 'modal-open'\n\t */\n\tbodyOpenClassName?: string;\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * content `div`.\n\t */\n\tclassName?: string;\n\t/**\n\t * Label on the close button.\n\t *\n\t * @default `__( 'Close' )`\n\t */\n\tcloseButtonLabel?: string;\n\t/**\n\t * If this property is added, it will be added to the modal content `div` as\n\t * `aria-label`.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `title` for other ways to provide a title.\n\t */\n\tcontentLabel?: string;\n\t/**\n\t * If this property is true, it will focus the first tabbable element\n\t * rendered in the modal.\n\t *\n\t * @default true\n\t */\n\tfocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n\t/**\n\t * Elements that are injected into the modal header to the left of the close button (if rendered).\n\t * Hidden if `__experimentalHideHeader` is `true`.\n\t *\n\t * @default null\n\t */\n\theaderActions?: ReactNode;\n\n\t/**\n\t * If this property is added, an icon will be added before the title.\n\t */\n\ticon?: JSX.Element;\n\t/**\n\t * If this property is set to false, the modal will not display a close icon\n\t * and cannot be dismissed.\n\t *\n\t * @default true\n\t */\n\tisDismissible?: boolean;\n\t/**\n\t * This property when set to `true` will render a full screen modal.\n\t *\n\t * @default false\n\t */\n\tisFullScreen?: boolean;\n\t/**\n\t * If this property is added it will cause the modal to render at a preset\n\t * width, or expand to fill the screen. This prop will be ignored if\n\t * `isFullScreen` is set to `true`.\n\t *\n\t * Note: `Modal`'s width can also be controlled by adjusting the width of the\n\t * modal's contents, or via CSS using the `style` prop.\n\t */\n\tsize?: 'small' | 'medium' | 'large' | 'fill';\n\t/**\n\t * Handle the key down on the modal frame `div`.\n\t */\n\tonKeyDown?: KeyboardEventHandler< HTMLDivElement >;\n\t/**\n\t * This function is called to indicate that the modal should be closed.\n\t */\n\tonRequestClose: (\n\t\tevent?: KeyboardEvent< HTMLDivElement > | SyntheticEvent\n\t) => void;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * overlay `div`.\n\t */\n\toverlayClassName?: string;\n\t/**\n\t * If this property is added, it will override the default role of the\n\t * modal.\n\t *\n\t * @default 'dialog'\n\t */\n\trole?: AriaRole;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when a mouse click occurs outside of the modal content.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnClickOutside?: boolean;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when the escape key is pressed.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnEsc?: boolean;\n\t/**\n\t * If this property is added, it will be added to the modal frame `div`.\n\t */\n\tstyle?: CSSProperties;\n\t/**\n\t * This property is used as the modal header's title.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `contentLabel` for other ways to provide a title.\n\t */\n\ttitle?: string;\n\t/**\n\t * When set to `true`, the Modal's header (including the icon, title and\n\t * close button) will not be rendered.\n\t *\n\t * _Warning_: This property is still experimental. “Experimental” means this\n\t * is an early implementation subject to drastic and breaking changes.\n\t *\n\t * @default false\n\t */\n\t__experimentalHideHeader?: boolean;\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/modal/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tAriaRole,\n\tCSSProperties,\n\tReactNode,\n\tKeyboardEventHandler,\n\tKeyboardEvent,\n\tSyntheticEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\nexport type ModalProps = {\n\taria?: {\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-describedby`.\n\t\t */\n\t\tdescribedby?: string;\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-labelledby`. Use this when you are rendering the title\n\t\t * yourself within the modal's content area instead of using the `title`\n\t\t * prop. This ensures the title is usable by assistive technology.\n\t\t *\n\t\t * Titles are required for accessibility reasons, see `contentLabel` and\n\t\t * `title` for other ways to provide a title.\n\t\t */\n\t\tlabelledby?: string;\n\t};\n\t/**\n\t * Class name added to the body element when the modal is open.\n\t *\n\t * @default 'modal-open'\n\t */\n\tbodyOpenClassName?: string;\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * content `div`.\n\t */\n\tclassName?: string;\n\t/**\n\t * Label on the close button.\n\t *\n\t * @default `__( 'Close' )`\n\t */\n\tcloseButtonLabel?: string;\n\t/**\n\t * If this property is added, it will be added to the modal content `div` as\n\t * `aria-label`.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `title` for other ways to provide a title.\n\t */\n\tcontentLabel?: string;\n\t/**\n\t * If this property is true, it will focus the first tabbable element\n\t * rendered in the modal.\n\t *\n\t * @default true\n\t */\n\tfocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n\t/**\n\t * Elements that are injected into the modal header to the left of the close button (if rendered).\n\t * Hidden if `__experimentalHideHeader` is `true`.\n\t *\n\t * @default null\n\t */\n\theaderActions?: ReactNode;\n\n\t/**\n\t * If this property is added, an icon will be added before the title.\n\t */\n\ticon?: JSX.Element;\n\t/**\n\t * If this property is set to false, the modal will not display a close icon\n\t * and cannot be dismissed.\n\t *\n\t * @default true\n\t */\n\tisDismissible?: boolean;\n\t/**\n\t * This property when set to `true` will render a full screen modal.\n\t *\n\t * @default false\n\t */\n\tisFullScreen?: boolean;\n\t/**\n\t * If this property is added it will cause the modal to render at a preset\n\t * width, or expand to fill the screen. This prop will be ignored if\n\t * `isFullScreen` is set to `true`.\n\t *\n\t * Note: `Modal`'s width can also be controlled by adjusting the width of the\n\t * modal's contents, or via CSS using the `style` prop.\n\t */\n\tsize?: 'small' | 'medium' | 'large' | 'fill';\n\t/**\n\t * Handle the key down on the modal frame `div`.\n\t */\n\tonKeyDown?: KeyboardEventHandler< HTMLDivElement >;\n\t/**\n\t * This function is called to indicate that the modal should be closed.\n\t */\n\tonRequestClose: (\n\t\tevent?: KeyboardEvent< HTMLDivElement > | SyntheticEvent\n\t) => void;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * overlay `div`.\n\t */\n\toverlayClassName?: string;\n\t/**\n\t * If this property is added, it will override the default role of the\n\t * modal.\n\t *\n\t * @default 'dialog'\n\t */\n\trole?: AriaRole;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when a mouse click occurs outside of the modal content.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnClickOutside?: boolean;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when the escape key is pressed.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnEsc?: boolean;\n\t/**\n\t * If this property is added, it will be added to the modal frame `div`.\n\t */\n\tstyle?: CSSProperties;\n\t/**\n\t * This property is used as the modal header's title.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `contentLabel` for other ways to provide a title.\n\t */\n\ttitle?: string;\n\t/**\n\t * When set to `true`, the Modal's header (including the icon, title and\n\t * close button) will not be rendered.\n\t *\n\t * _Warning_: This property is still experimental. “Experimental” means this\n\t * is an early implementation subject to drastic and breaking changes.\n\t *\n\t * @default false\n\t */\n\t__experimentalHideHeader?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -15,6 +15,10 @@ var _dom = require("@wordpress/dom");
|
|
|
15
15
|
* WordPress dependencies
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Internal dependencies
|
|
20
|
+
*/
|
|
21
|
+
|
|
18
22
|
const noop = () => {};
|
|
19
23
|
const MENU_ITEM_ROLES = ['menuitem', 'menuitemradio', 'menuitemcheckbox'];
|
|
20
24
|
function cycleValue(value, total, offset) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_dom","noop","MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","Component","constructor","args","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","indexOf","event","cycle","eventToOffset","onNavigate","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","targetHasMenuItemRole","includes","preventDefault","activeElement","ownerDocument","context","nextIndex","length","code","render","children","restProps","_react","createElement","forwardedNavigableContainer","displayName","_default","exports","default","forwardRef"],"sources":["@wordpress/components/src/navigable-container/container.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport type { NavigableContainerProps } from './types';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value: number, total: number, offset: number ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component< NavigableContainerProps > {\n\tcontainer?: HTMLDivElement;\n\n\tconstructor( args: NavigableContainerProps ) {\n\t\tsuper( args );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tbindContainer( ref: HTMLDivElement ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target: Element ) {\n\t\tif ( ! this.container ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables: Element[], target: Element ) {\n\t\treturn focusables.indexOf( target );\n\t}\n\n\tonKeyDown( event: KeyboardEvent ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = (\n\t\t\t\tevent.target as HTMLDivElement | null\n\t\t\t )?.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\t!! targetRole && MENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\tif ( targetHasMenuItemRole ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = ( event.target as HTMLElement | null )\n\t\t\t?.ownerDocument?.activeElement;\n\t\tif ( ! activeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tif ( event.code === 'Tab' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = (\n\tprops: NavigableContainerProps,\n\tref: ForwardedRef< HTMLDivElement >\n) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AASA,MAAME,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,MAAMC,eAAe,GAAG,CAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,CAAE;AAE3E,SAASC,UAAUA,CAAEC,KAAa,EAAEC,KAAa,EAAEC,MAAc,EAAG;EACnE,MAAMC,SAAS,GAAGH,KAAK,GAAGE,MAAM;EAChC,IAAKC,SAAS,GAAG,CAAC,EAAG;IACpB,OAAOF,KAAK,GAAGE,SAAS;EACzB,CAAC,MAAM,IAAKA,SAAS,IAAIF,KAAK,EAAG;IAChC,OAAOE,SAA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I,2BAA2B,GAAGA,CACnCnC,KAA8B,EAC9BF,GAAmC,KAC/B;EACJ,OAAO,IAAAmC,MAAA,CAAAC,aAAA,EAAClD,kBAAkB;IAAA,GAAMgB,KAAK;IAAGD,YAAY,EAAGD;EAAK,CAAE,CAAC;AAChE,CAAC;AACDqC,2BAA2B,CAACC,WAAW,GAAG,oBAAoB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEhD,IAAAC,mBAAU,EAAEL,2BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"names":["_element","require","_dom","noop","MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","Component","constructor","args","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","indexOf","event","cycle","eventToOffset","onNavigate","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","targetHasMenuItemRole","includes","preventDefault","activeElement","ownerDocument","context","nextIndex","length","code","render","children","restProps","_react","createElement","forwardedNavigableContainer","displayName","_default","exports","default","forwardRef"],"sources":["@wordpress/components/src/navigable-container/container.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport type { NavigableContainerProps } from './types';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value: number, total: number, offset: number ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component< NavigableContainerProps > {\n\tcontainer?: HTMLDivElement;\n\n\tconstructor( args: NavigableContainerProps ) {\n\t\tsuper( args );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tbindContainer( ref: HTMLDivElement ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target: Element ) {\n\t\tif ( ! this.container ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables: Element[], target: Element ) {\n\t\treturn focusables.indexOf( target );\n\t}\n\n\tonKeyDown( event: KeyboardEvent ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = (\n\t\t\t\tevent.target as HTMLDivElement | null\n\t\t\t )?.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\t!! targetRole && MENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\tif ( targetHasMenuItemRole ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = ( event.target as HTMLElement | null )\n\t\t\t?.ownerDocument?.activeElement;\n\t\tif ( ! activeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tif ( event.code === 'Tab' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = (\n\tprops: NavigableContainerProps,\n\tref: ForwardedRef< HTMLDivElement >\n) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AATA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAGA,MAAME,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,MAAMC,eAAe,GAAG,CAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,CAAE;AAE3E,SAASC,UAAUA,CAAEC,KAAa,EAAEC,KAAa,EAAEC,MAAc,EAAG;EACnE,MAAMC,SAAS,GAAGH,KAAK,GAAGE,MAAM;EAChC,IAAKC,SAAS,GAAG,CAAC,EAAG;IACpB,OAAOF,KAAK,GAAGE,SAAS;EACzB,CAAC,MAAM,IAAKA,SAAS,IAAIF,KAAK,EAAG;IAChC,OAAOE,SAAS,GAAGF,KAAK;EACzB;EAEA,OAAOE,SAAS;AACjB;AAEA,MAAMC,kBAAkB,SAASC,kBAAS,CAA4B;EAGrEC,WAAWA,CAAEC,IAA6B,EAAG;IAC5C,KAAK,CAAEA,IAAK,CAAC;IACb,IAAI,CAACC,SAAS,GAAG,IAAI,CAACA,SAAS,CAACC,IAAI,CAAE,IAAK,CAAC;IAC5C,IAAI,CAACC,aAAa,GAAG,IAAI,CAACA,aAAa,CAACD,IAAI,CAAE,IAAK,CAA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C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_menu","_interopRequireDefault","require","_tabbable"],"sources":["@wordpress/components/src/navigable-container/index.tsx"],"sourcesContent":["/**\n * Internal Dependencies\n */\nexport { default as NavigableMenu } from './menu';\nexport { default as TabbableContainer } from './tabbable';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA"}
|
|
1
|
+
{"version":3,"names":["_menu","_interopRequireDefault","require","_tabbable"],"sources":["@wordpress/components/src/navigable-container/index.tsx"],"sourcesContent":["/**\n * Internal Dependencies\n */\nexport { default as NavigableMenu } from './menu';\nexport { default as TabbableContainer } from './tabbable';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_container","_interopRequireDefault","UnforwardedNavigableMenu","role","orientation","rest","ref","eventToOffset","evt","code","next","previous","includes","undefined","_react","createElement","default","stopNavigationEvents","onlyBrowserTabstops","NavigableMenu","exports","forwardRef","_default"],"sources":["@wordpress/components/src/navigable-container/menu.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { NavigableMenuProps } from './types';\n\nexport function UnforwardedNavigableMenu(\n\t{ role = 'menu', orientation = 'vertical', ...rest }: NavigableMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst eventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code } = evt;\n\n\t\tlet next = [ 'ArrowDown' ];\n\t\tlet previous = [ 'ArrowUp' ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ 'ArrowRight' ];\n\t\t\tprevious = [ 'ArrowLeft' ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ 'ArrowRight', 'ArrowDown' ];\n\t\t\tprevious = [ 'ArrowLeft', 'ArrowUp' ];\n\t\t}\n\n\t\tif ( next.includes( code ) ) {\n\t\t\treturn 1;\n\t\t} else if ( previous.includes( code ) ) {\n\t\t\treturn -1;\n\t\t} else if (\n\t\t\t[ 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\t// Key press should be handled, e.g. have event propagation and\n\t\t\t// default behavior handled by NavigableContainer but not result\n\t\t\t// in an offset.\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={\n\t\t\t\trole !== 'presentation' &&\n\t\t\t\t( orientation === 'vertical' || orientation === 'horizontal' )\n\t\t\t\t\t? orientation\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\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 );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AI,EAAGA,IAAM;IACb,oBACCA,IAAI,KAAK,cAAc,KACrBC,WAAW,KAAK,UAAU,IAAIA,WAAW,KAAK,YAAY,CAAE,GAC3DA,WAAW,GACXS,SACH;IACDN,aAAa,EAAGA,aAAe;IAAA,GAC1BF;EAAI,CACT,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMc,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAU,EAAEnB,wBAAyB,CAAC;AAAC,IAAAoB,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAErDG,aAAa"}
|
|
1
|
+
{"version":3,"names":["_element","require","_container","_interopRequireDefault","UnforwardedNavigableMenu","role","orientation","rest","ref","eventToOffset","evt","code","next","previous","includes","undefined","_react","createElement","default","stopNavigationEvents","onlyBrowserTabstops","NavigableMenu","exports","forwardRef","_default"],"sources":["@wordpress/components/src/navigable-container/menu.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { NavigableMenuProps } from './types';\n\nexport function UnforwardedNavigableMenu(\n\t{ role = 'menu', orientation = 'vertical', ...rest }: NavigableMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst eventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code } = evt;\n\n\t\tlet next = [ 'ArrowDown' ];\n\t\tlet previous = [ 'ArrowUp' ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ 'ArrowRight' ];\n\t\t\tprevious = [ 'ArrowLeft' ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ 'ArrowRight', 'ArrowDown' ];\n\t\t\tprevious = [ 'ArrowLeft', 'ArrowUp' ];\n\t\t}\n\n\t\tif ( next.includes( code ) ) {\n\t\t\treturn 1;\n\t\t} else if ( previous.includes( code ) ) {\n\t\t\treturn -1;\n\t\t} else if (\n\t\t\t[ 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\t// Key press should be handled, e.g. have event propagation and\n\t\t\t// default behavior handled by NavigableContainer but not result\n\t\t\t// in an offset.\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={\n\t\t\t\trole !== 'presentation' &&\n\t\t\t\t( orientation === 'vertical' || orientation === 'horizontal' )\n\t\t\t\t\t? orientation\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\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 );\n\nexport default NavigableMenu;\n"],"mappings":";;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,SAASG,wBAA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EJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMc,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAAE,mBAAU,EAAEnB,wBAAyB,CAAC;AAAC,IAAAoB,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAErDG,aAAa","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_element","require","_container","_interopRequireDefault","UnforwardedTabbableContainer","eventToOffset","props","ref","innerEventToOffset","evt","code","shiftKey","undefined","_react","createElement","default","stopNavigationEvents","onlyBrowserTabstops","TabbableContainer","exports","forwardRef","_default"],"sources":["@wordpress/components/src/navigable-container/tabbable.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { TabbableContainerProps } from './types';\n\nexport function UnforwardedTabbableContainer(\n\t{ eventToOffset, ...props }: TabbableContainerProps,\n\tref: ForwardedRef< any >\n) {\n\tconst innerEventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code, shiftKey } = evt;\n\t\tif ( 'Tab' === code ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\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 );\n\nexport default TabbableContainer;\n"],"mappings":";;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,SAASG,4BAA4BA,CAC3C;EAAEC,aAAa;EAAE,GAAGC;AAA8B,CAAC,EACnDC,GAAwB,EACvB;EACD,MAAMC,kBAAkB,GAAKC,GAAkB,IAAM;IACpD,MAAM;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGF,GAAG;IAC9B,IAAK,KAAK,KAAKC,IAAI,EAAG;MACrB,OAAOC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC;IACzB;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAKN,aAAa,EAAG;MACpB,OAAOA,aAAa,CAAEI,GAAI,CAAC;IAC5B;IAEA,OAAOG,SAAS;EACjB,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,UAAA,CAAAa,OAAkB;IAClBR,GAAG,EAAGA,GAAK;IACXS,oBAAoB;IACpBC,mBAAmB;IACnBZ,aAAa,EAAGG,kBAAoB;IAAA,GAC/BF;EAAK,CACV,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,mBAAU,EAAEhB,4BAA6B,CAAC;AAAC,IAAAiB,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAE7DG,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["_element","require","_container","_interopRequireDefault","UnforwardedTabbableContainer","eventToOffset","props","ref","innerEventToOffset","evt","code","shiftKey","undefined","_react","createElement","default","stopNavigationEvents","onlyBrowserTabstops","TabbableContainer","exports","forwardRef","_default"],"sources":["@wordpress/components/src/navigable-container/tabbable.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { TabbableContainerProps } from './types';\n\nexport function UnforwardedTabbableContainer(\n\t{ eventToOffset, ...props }: TabbableContainerProps,\n\tref: ForwardedRef< any >\n) {\n\tconst innerEventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code, shiftKey } = evt;\n\t\tif ( 'Tab' === code ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\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 );\n\nexport default TabbableContainer;\n"],"mappings":";;;;;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAIO,SAASG,4BAA4BA,CAC3C;EAAEC,aAAa;EAAE,GAAGC;AAA8B,CAAC,EACnDC,GAAwB,EACvB;EACD,MAAMC,kBAAkB,GAAKC,GAAkB,IAAM;IACpD,MAAM;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGF,GAAG;IAC9B,IAAK,KAAK,KAAKC,IAAI,EAAG;MACrB,OAAOC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC;IACzB;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAKN,aAAa,EAAG;MACpB,OAAOA,aAAa,CAAEI,GAAI,CAAC;IAC5B;IAEA,OAAOG,SAAS;EACjB,CAAC;EAED,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACZ,UAAA,CAAAa,OAAkB;IAClBR,GAAG,EAAGA,GAAK;IACXS,oBAAoB;IACpBC,mBAAmB;IACnBZ,aAAa,EAAGG,kBAAoB;IAAA,GAC/BF;EAAK,CACV,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,mBAAU,EAAEhB,4BAA6B,CAAC;AAAC,IAAAiB,QAAA,GAAAF,OAAA,CAAAJ,OAAA,GAE7DG,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/navigable-container/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\n\ntype BaseProps = {\n\t/**\n\t * The component children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * A boolean which tells the component whether or not to cycle from the end back to the beginning and vice versa.\n\t *\n\t * @default true\n\t */\n\tcycle?: boolean;\n\t/**\n\t * A callback invoked on the keydown event.\n\t */\n\tonKeyDown?: ( event: KeyboardEvent ) => void;\n\t/**\n\t * A callback invoked when the menu navigates to one of its children passing the index and child as an argument\n\t */\n\tonNavigate?: ( index: number, focusable: HTMLElement ) => void;\n};\n\nexport type NavigableContainerProps = WordPressComponentProps<\n\tBaseProps & {\n\t\t/**\n\t\t * Gets an offset, given an event.\n\t\t */\n\t\teventToOffset: ( event: KeyboardEvent ) => -1 | 0 | 1 | undefined;\n\t\t/**\n\t\t * The forwarded ref.\n\t\t */\n\t\tforwardedRef?: ForwardedRef< any >;\n\t\t/**\n\t\t * Whether to only consider browser tab stops.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tonlyBrowserTabstops: boolean;\n\t\t/**\n\t\t * Whether to stop navigation events.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tstopNavigationEvents: boolean;\n\t},\n\t'div',\n\tfalse\n>;\n\nexport type NavigableMenuProps = WordPressComponentProps<\n\tBaseProps & {\n\t\t/**\n\t\t * The orientation of the menu.\n\t\t *\n\t\t * @default 'vertical'\n\t\t */\n\t\torientation?: 'vertical' | 'horizontal' | 'both';\n\t},\n\t'div',\n\tfalse\n>;\n\nexport type TabbableContainerProps = WordPressComponentProps<\n\tBaseProps & Partial< Pick< NavigableContainerProps, 'eventToOffset' > >,\n\t'div',\n\tfalse\n>;\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/navigable-container/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\n\ntype BaseProps = {\n\t/**\n\t * The component children.\n\t */\n\tchildren?: ReactNode;\n\t/**\n\t * A boolean which tells the component whether or not to cycle from the end back to the beginning and vice versa.\n\t *\n\t * @default true\n\t */\n\tcycle?: boolean;\n\t/**\n\t * A callback invoked on the keydown event.\n\t */\n\tonKeyDown?: ( event: KeyboardEvent ) => void;\n\t/**\n\t * A callback invoked when the menu navigates to one of its children passing the index and child as an argument\n\t */\n\tonNavigate?: ( index: number, focusable: HTMLElement ) => void;\n};\n\nexport type NavigableContainerProps = WordPressComponentProps<\n\tBaseProps & {\n\t\t/**\n\t\t * Gets an offset, given an event.\n\t\t */\n\t\teventToOffset: ( event: KeyboardEvent ) => -1 | 0 | 1 | undefined;\n\t\t/**\n\t\t * The forwarded ref.\n\t\t */\n\t\tforwardedRef?: ForwardedRef< any >;\n\t\t/**\n\t\t * Whether to only consider browser tab stops.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tonlyBrowserTabstops: boolean;\n\t\t/**\n\t\t * Whether to stop navigation events.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tstopNavigationEvents: boolean;\n\t},\n\t'div',\n\tfalse\n>;\n\nexport type NavigableMenuProps = WordPressComponentProps<\n\tBaseProps & {\n\t\t/**\n\t\t * The orientation of the menu.\n\t\t *\n\t\t * @default 'vertical'\n\t\t */\n\t\torientation?: 'vertical' | 'horizontal' | 'both';\n\t},\n\t'div',\n\tfalse\n>;\n\nexport type TabbableContainerProps = WordPressComponentProps<\n\tBaseProps & Partial< Pick< NavigableContainerProps, 'eventToOffset' > >,\n\t'div',\n\tfalse\n>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -57,6 +57,10 @@ function UnforwardedNavigationBackButton({
|
|
|
57
57
|
icon: icon
|
|
58
58
|
}), backButtonLabel || parentMenuTitle || (0, _i18n.__)('Back'));
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Use `Navigator` instead.
|
|
63
|
+
*/
|
|
60
64
|
const NavigationBackButton = exports.NavigationBackButton = (0, _element.forwardRef)(UnforwardedNavigationBackButton);
|
|
61
65
|
var _default = exports.default = NavigationBackButton;
|
|
62
66
|
//# sourceMappingURL=index.js.map
|