@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":["forwardRef","classnames","Resizable","ResizeTooltip","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","createElement","handleClasses","handleStyles","ResizableBox"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,SAAS,QAAQ,cAAc;AAIxC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAE5C,MAAMC,iBAAiB,GAAG,kCAAkC;AAC5D,MAAMC,sBAAsB,GAAG,uCAAuC;AACtE,MAAMC,wBAAwB,GAAG,yCAAyC;AAE1E,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAEP,UAAU,CACdG,iBAAiB,EACjBC,sBAAsB,EACtB,sCACD,CAAC;EACDI,KAAK,EAAER,UAAU,CAChBG,iBAAiB,EACjBC,sBAAsB,EACtB,wCACD,CAAC;EACDK,MAAM,EAAET,UAAU,CACjBG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B,UAAU,IAAI,iBAAiB,EAC/BF,SACD,CAAG;IACHU,aAAa,EAAGzB,cAAgB;IAChC0B,YAAY,EAAGb,aAAe;IAC9BU,GAAG,EAAGA,GAAK;IAAA,GACND;EAAK,GAERN,QAAQ,EACRG,WAAW,IAAIK,aAAA,CAAC5B,aAAa;IAAA,GAAMyB;EAAY,CAAI,CAC3C,CAAC;AAEd;AAEA,OAAO,MAAMM,YAAY,GAAGlC,UAAU,CAAEqB,uBAAwB,CAAC;AAEjE,eAAea,YAAY"}
|
|
1
|
+
{"version":3,"names":["forwardRef","classnames","Resizable","ResizeTooltip","HANDLE_CLASS_NAME","SIDE_HANDLE_CLASS_NAME","CORNER_HANDLE_CLASS_NAME","HANDLE_CLASSES","top","right","bottom","left","topLeft","topRight","bottomRight","bottomLeft","HANDLE_STYLES_OVERRIDES","width","undefined","height","HANDLE_STYLES","UnforwardedResizableBox","className","children","showHandle","__experimentalShowTooltip","showTooltip","__experimentalTooltipProps","tooltipProps","props","ref","createElement","handleClasses","handleStyles","ResizableBox"],"sources":["@wordpress/components/src/resizable-box/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { Resizable } from 're-resizable';\nimport type { ResizableProps } from 're-resizable';\nimport type { ReactNode, ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ResizeTooltip from './resize-tooltip';\n\nconst HANDLE_CLASS_NAME = 'components-resizable-box__handle';\nconst SIDE_HANDLE_CLASS_NAME = 'components-resizable-box__side-handle';\nconst CORNER_HANDLE_CLASS_NAME = 'components-resizable-box__corner-handle';\n\nconst HANDLE_CLASSES = {\n\ttop: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top'\n\t),\n\tright: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottom: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom'\n\t),\n\tleft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tSIDE_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-left'\n\t),\n\ttopRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-top',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomRight: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-right'\n\t),\n\tbottomLeft: classnames(\n\t\tHANDLE_CLASS_NAME,\n\t\tCORNER_HANDLE_CLASS_NAME,\n\t\t'components-resizable-box__handle-bottom',\n\t\t'components-resizable-box__handle-left'\n\t),\n};\n\n// Removes the inline styles in the drag handles.\nconst HANDLE_STYLES_OVERRIDES = {\n\twidth: undefined,\n\theight: undefined,\n\ttop: undefined,\n\tright: undefined,\n\tbottom: undefined,\n\tleft: undefined,\n};\nconst HANDLE_STYLES = {\n\ttop: HANDLE_STYLES_OVERRIDES,\n\tright: HANDLE_STYLES_OVERRIDES,\n\tbottom: HANDLE_STYLES_OVERRIDES,\n\tleft: HANDLE_STYLES_OVERRIDES,\n\ttopLeft: HANDLE_STYLES_OVERRIDES,\n\ttopRight: HANDLE_STYLES_OVERRIDES,\n\tbottomRight: HANDLE_STYLES_OVERRIDES,\n\tbottomLeft: HANDLE_STYLES_OVERRIDES,\n};\n\ntype ResizableBoxProps = ResizableProps & {\n\tchildren: ReactNode;\n\tshowHandle?: boolean;\n\t__experimentalShowTooltip?: boolean;\n\t__experimentalTooltipProps?: Parameters< typeof ResizeTooltip >[ 0 ];\n};\n\nfunction UnforwardedResizableBox(\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\tshowHandle = true,\n\t\t__experimentalShowTooltip: showTooltip = false,\n\t\t__experimentalTooltipProps: tooltipProps = {},\n\t\t...props\n\t}: ResizableBoxProps,\n\tref: ForwardedRef< Resizable >\n): JSX.Element {\n\treturn (\n\t\t<Resizable\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-resizable-box__container',\n\t\t\t\tshowHandle && 'has-show-handle',\n\t\t\t\tclassName\n\t\t\t) }\n\t\t\thandleClasses={ HANDLE_CLASSES }\n\t\t\thandleStyles={ HANDLE_STYLES }\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children }\n\t\t\t{ showTooltip && <ResizeTooltip { ...tooltipProps } /> }\n\t\t</Resizable>\n\t);\n}\n\nexport const ResizableBox = forwardRef( UnforwardedResizableBox );\n\nexport default ResizableBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,SAAS,QAAQ,cAAc;AAIxC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAE5C,MAAMC,iBAAiB,GAAG,kCAAkC;AAC5D,MAAMC,sBAAsB,GAAG,uCAAuC;AACtE,MAAMC,wBAAwB,GAAG,yCAAyC;AAE1E,MAAMC,cAAc,GAAG;EACtBC,GAAG,EAAEP,UAAU,CACdG,iBAAiB,EACjBC,sBAAsB,EACtB,sCACD,CAAC;EACDI,KAAK,EAAER,UAAU,CAChBG,iBAAiB,EACjBC,sBAAsB,EACtB,wCACD,CAAC;EACDK,MAAM,EAAET,UAAU,CACjBG,iBAAiB,EACjBC,sBAAsB,EACtB,yCACD,CAAC;EACDM,IAAI,EAAEV,UAAU,CACfG,iBAAi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AY,EAAGb,aAAe;IAC9BU,GAAG,EAAGA,GAAK;IAAA,GACND;EAAK,GAERN,QAAQ,EACRG,WAAW,IAAIK,aAAA,CAAC5B,aAAa;IAAA,GAAMyB;EAAY,CAAI,CAC3C,CAAC;AAEd;AAEA,OAAO,MAAMM,YAAY,GAAGlC,UAAU,CAAEqB,uBAAwB,CAAC;AAEjE,eAAea,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["View","withPreferredColorScheme","styles","ResizableBox","props","size","showHandle","getStylesFromColorScheme","height","defaultStyle","staticSpacer","staticDarkSpacer","createElement","style","selectedSpacer"],"sources":["@wordpress/components/src/resizable-box/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nfunction ResizableBox( props ) {\n\tconst { size, showHandle = true, getStylesFromColorScheme } = props;\n\tconst { height } = size;\n\tconst defaultStyle = getStylesFromColorScheme(\n\t\tstyles.staticSpacer,\n\t\tstyles.staticDarkSpacer\n\t);\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\tdefaultStyle,\n\t\t\t\tshowHandle && styles.selectedSpacer,\n\t\t\t\t{ height },\n\t\t\t] }\n\t\t></View>\n\t);\n}\n\nexport default withPreferredColorScheme( ResizableBox );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;AACnC;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC9B,MAAM;IAAEC,IAAI;IAAEC,UAAU,GAAG,IAAI;IAAEC;EAAyB,CAAC,GAAGH,KAAK;EACnE,MAAM;IAAEI;EAAO,CAAC,GAAGH,IAAI;EACvB,MAAMI,YAAY,GAAGF,wBAAwB,CAC5CL,MAAM,CAACQ,YAAY,EACnBR,MAAM,CAACS,gBACR,CAAC;EACD,OACCC,aAAA,CAACZ,IAAI;IACJa,KAAK,EAAG,CACPJ,YAAY,EACZH,UAAU,IAAIJ,MAAM,CAACY,cAAc,EACnC;MAAEN;IAAO,CAAC;EACR,CACG,CAAC;AAEV;AAEA,eAAeP,wBAAwB,CAAEE,YAAa,CAAC"}
|
|
1
|
+
{"version":3,"names":["View","withPreferredColorScheme","styles","ResizableBox","props","size","showHandle","getStylesFromColorScheme","height","defaultStyle","staticSpacer","staticDarkSpacer","createElement","style","selectedSpacer"],"sources":["@wordpress/components/src/resizable-box/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport styles from './style.scss';\n\nfunction ResizableBox( props ) {\n\tconst { size, showHandle = true, getStylesFromColorScheme } = props;\n\tconst { height } = size;\n\tconst defaultStyle = getStylesFromColorScheme(\n\t\tstyles.staticSpacer,\n\t\tstyles.staticDarkSpacer\n\t);\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\tdefaultStyle,\n\t\t\t\tshowHandle && styles.selectedSpacer,\n\t\t\t\t{ height },\n\t\t\t] }\n\t\t></View>\n\t);\n}\n\nexport default withPreferredColorScheme( ResizableBox );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,cAAc;AACnC;AACA;AACA;AACA,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D;AACA;AACA;AACA,OAAOC,MAAM,MAAM,cAAc;AAEjC,SAASC,YAAYA,CAAEC,KAAK,EAAG;EAC9B,MAAM;IAAEC,IAAI;IAAEC,UAAU,GAAG,IAAI;IAAEC;EAAyB,CAAC,GAAGH,KAAK;EACnE,MAAM;IAAEI;EAAO,CAAC,GAAGH,IAAI;EACvB,MAAMI,YAAY,GAAGF,wBAAwB,CAC5CL,MAAM,CAACQ,YAAY,EACnBR,MAAM,CAACS,gBACR,CAAC;EACD,OACCC,aAAA,CAACZ,IAAI;IACJa,KAAK,EAAG,CACPJ,YAAY,EACZH,UAAU,IAAIJ,MAAM,CAACY,cAAc,EACnC;MAAEN;IAAO,CAAC;EACR,CACG,CAAC;AAEV;AAEA,eAAeP,wBAAwB,CAAEE,YAAa,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","forwardRef","Label","useResizeLabel","POSITIONS","Root","noop","ResizeTooltip","axis","className","fadeTimeout","isVisible","labelRef","onResize","position","bottom","showPx","zIndex","props","ref","label","resizeListener","classes","createElement","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport type { Axis, Position } from './utils';\nimport { useResizeLabel, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) return null;\n\n\tconst classes = classnames( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,KAAK,MAAM,SAAS;AAE3B,SAASC,cAAc,EAAEC,SAAS,QAAQ,SAAS;AACnD,SAASC,IAAI,QAAQ,gCAAgC;AAerD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,aAAaA,CACrB;EACCC,IAAI;EACJC,SAAS;EACTC,WAAW,GAAG,GAAG;EACjBC,SAAS,GAAG,IAAI;EAChBC,QAAQ;EACRC,QAAQ,GAAGP,IAAI;EACfQ,QAAQ,GAAGV,SAAS,CAACW,MAAM;EAC3BC,MAAM,GAAG,IAAI;EACbC,MAAM,GAAG,IAAI;EACb,GAAGC;AACgB,CAAC,EACrBC,GAAmC,EACd;EACrB,MAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGlB,cAAc,CAAE;IACjDK,IAAI;IACJE,WAAW;IACXG,QAAQ;IACRG,MAAM;IACNF;EACD,CAAE,CAAC;EAEH,IAAK,CAAEH,SAAS,EAAG,OAAO,IAAI;EAE9B,MAAMW,OAAO,GAAGtB,UAAU,CAAE,2BAA2B,EAAES,SAAU,CAAC;EAEpE,OACCc,aAAA,CAAClB,IAAI;IAAC,eAAY,MAAM;IAACI,SAAS,EAAGa,OAAS;IAACH,GAAG,EAAGA,GAAK;IAAA,GAAMD;EAAK,GAClEG,cAAc,EAChBE,aAAA,CAACrB,KAAK;IACL,eAAcgB,KAAK,CAAE,aAAa,CAAI;IACtCE,KAAK,EAAGA,KAAO;IACfN,QAAQ,EAAGA,QAAU;IACrBK,GAAG,EAAGP,QAAU;IAChBK,MAAM,EAAGA;EAAQ,CACjB,CACI,CAAC;AAET;AAEA,MAAMO,kBAAkB,GAAGvB,UAAU,CAAEM,aAAc,CAAC;AAEtD,eAAeiB,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["classnames","forwardRef","Label","useResizeLabel","POSITIONS","Root","noop","ResizeTooltip","axis","className","fadeTimeout","isVisible","labelRef","onResize","position","bottom","showPx","zIndex","props","ref","label","resizeListener","classes","createElement","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { Ref, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Label from './label';\nimport type { Axis, Position } from './utils';\nimport { useResizeLabel, POSITIONS } from './utils';\nimport { Root } from './styles/resize-tooltip.styles';\n\ntype ResizeTooltipProps = React.ComponentProps< typeof Root > & {\n\t'aria-hidden'?: boolean;\n\taxis?: Axis;\n\tclassName?: string;\n\tfadeTimeout?: number;\n\tisVisible?: boolean;\n\tlabelRef?: Ref< HTMLDivElement >;\n\tonResize?: Parameters< typeof useResizeLabel >[ 0 ][ 'onResize' ];\n\tposition?: Position;\n\tshowPx?: boolean;\n\tzIndex?: number;\n};\n\nconst noop = () => {};\n\nfunction ResizeTooltip(\n\t{\n\t\taxis,\n\t\tclassName,\n\t\tfadeTimeout = 180,\n\t\tisVisible = true,\n\t\tlabelRef,\n\t\tonResize = noop,\n\t\tposition = POSITIONS.bottom,\n\t\tshowPx = true,\n\t\tzIndex = 1000,\n\t\t...props\n\t}: ResizeTooltipProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst { label, resizeListener } = useResizeLabel( {\n\t\taxis,\n\t\tfadeTimeout,\n\t\tonResize,\n\t\tshowPx,\n\t\tposition,\n\t} );\n\n\tif ( ! isVisible ) return null;\n\n\tconst classes = classnames( 'components-resize-tooltip', className );\n\n\treturn (\n\t\t<Root aria-hidden=\"true\" className={ classes } ref={ ref } { ...props }>\n\t\t\t{ resizeListener }\n\t\t\t<Label\n\t\t\t\taria-hidden={ props[ 'aria-hidden' ] }\n\t\t\t\tlabel={ label }\n\t\t\t\tposition={ position }\n\t\t\t\tref={ labelRef }\n\t\t\t\tzIndex={ zIndex }\n\t\t\t/>\n\t\t</Root>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( ResizeTooltip );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;AAGnC;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,KAAK,MAAM,SAAS;AAE3B,SAASC,cAAc,EAAEC,SAAS,QAAQ,SAAS;AACnD,SAASC,IAAI,QAAQ,gCAAgC;AAerD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAErB,SAASC,aAAaA,CACrB;EACCC,IAAI;EACJC,SAAS;EACTC,WAAW,GAAG,GAAG;EACjBC,SAAS,GAAG,IAAI;EAChBC,QAAQ;EACRC,QAAQ,GAAGP,IAAI;EACfQ,QAAQ,GAAGV,SAAS,CAACW,MAAM;EAC3BC,MAAM,GAAG,IAAI;EACbC,MAAM,GAAG,IAAI;EACb,GAAGC;AACgB,CAAC,EACrBC,GAAmC,EACd;EACrB,MAAM;IAAEC,KAAK;IAAEC;EAAe,CAAC,GAAGlB,cAAc,CAAE;IACjDK,IAAI;IACJE,WAAW;IACXG,QAAQ;IACRG,MAAM;IACNF;EACD,CAAE,CAAC;EAEH,IAAK,CAAEH,SAAS,EAAG,OAAO,IAAI;EAE9B,MAAMW,OAAO,GAAGtB,UAAU,CAAE,2BAA2B,EAAES,SAAU,CAAC;EAEpE,OACCc,aAAA,CAAClB,IAAI;IAAC,eAAY,MAAM;IAACI,SAAS,EAAGa,OAAS;IAACH,GAAG,EAAGA,GAAK;IAAA,GAAMD;EAAK,GAClEG,cAAc,EAChBE,aAAA,CAACrB,KAAK;IACL,eAAcgB,KAAK,CAAE,aAAa,CAAI;IACtCE,KAAK,EAAGA,KAAO;IACfN,QAAQ,EAAGA,QAAU;IACrBK,GAAG,EAAGP,QAAU;IAChBK,MAAM,EAAGA;EAAQ,CACjB,CACI,CAAC;AAET;AAEA,MAAMO,kBAAkB,GAAGvB,UAAU,CAAEM,aAAc,CAAC;AAEtD,eAAeiB,kBAAkB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","isRTL","POSITIONS","TooltipWrapper","Tooltip","LabelText","CORNER_OFFSET","CURSOR_OFFSET_TOP","Label","label","position","corner","zIndex","props","ref","showLabel","isBottom","bottom","isCorner","style","opacity","undefined","labelStyle","left","transform","top","right","createElement","className","as","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/label.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Position } from './utils';\nimport { POSITIONS } from './utils';\nimport {\n\tTooltipWrapper,\n\tTooltip,\n\tLabelText,\n} from './styles/resize-tooltip.styles';\n\nconst CORNER_OFFSET = 4;\nconst CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;\n\ntype LabelProps = React.DetailedHTMLProps<\n\tReact.HTMLAttributes< HTMLDivElement >,\n\tHTMLDivElement\n> & {\n\tlabel?: string;\n\tposition: Position;\n\tzIndex: number;\n};\n\nfunction Label(\n\t{ label, position = POSITIONS.corner, zIndex = 1000, ...props }: LabelProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst showLabel = !! label;\n\n\tconst isBottom = position === POSITIONS.bottom;\n\tconst isCorner = position === POSITIONS.corner;\n\n\tif ( ! showLabel ) return null;\n\n\tlet style: React.CSSProperties = {\n\t\topacity: showLabel ? 1 : undefined,\n\t\tzIndex,\n\t};\n\n\tlet labelStyle = {};\n\n\tif ( isBottom ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\tbottom: CURSOR_OFFSET_TOP * -1,\n\t\t\tleft: '50%',\n\t\t\ttransform: 'translate(-50%, 0)',\n\t\t};\n\n\t\tlabelStyle = {\n\t\t\ttransform: `translate(0, 100%)`,\n\t\t};\n\t}\n\n\tif ( isCorner ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\ttop: CORNER_OFFSET,\n\t\t\tright: isRTL() ? undefined : CORNER_OFFSET,\n\t\t\tleft: isRTL() ? CORNER_OFFSET : undefined,\n\t\t};\n\t}\n\n\treturn (\n\t\t<TooltipWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-resizable-tooltip__tooltip-wrapper\"\n\t\t\tref={ ref }\n\t\t\tstyle={ style }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Tooltip\n\t\t\t\tclassName=\"components-resizable-tooltip__tooltip\"\n\t\t\t\tstyle={ labelStyle }\n\t\t\t>\n\t\t\t\t<LabelText as=\"span\">{ label }</LabelText>\n\t\t\t</Tooltip>\n\t\t</TooltipWrapper>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( Label );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;;AA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,GAAGK,aAAa,GAAGe;IACjC,CAAC;EACF;EAEA,OACCM,aAAA,CAACxB,cAAc;IACd,eAAY,MAAM;IAClByB,SAAS,EAAC,+CAA+C;IACzDd,GAAG,EAAGA,GAAK;IACXK,KAAK,EAAGA,KAAO;IAAA,GACVN;EAAK,GAEVc,aAAA,CAACvB,OAAO;IACPwB,SAAS,EAAC,uCAAuC;IACjDT,KAAK,EAAGG;EAAY,GAEpBK,aAAA,CAACtB,SAAS;IAACwB,EAAE,EAAC;EAAM,GAAGpB,KAAkB,CACjC,CACM,CAAC;AAEnB;AAEA,MAAMqB,kBAAkB,GAAG9B,UAAU,CAAEQ,KAAM,CAAC;AAE9C,eAAesB,kBAAkB"}
|
|
1
|
+
{"version":3,"names":["forwardRef","isRTL","POSITIONS","TooltipWrapper","Tooltip","LabelText","CORNER_OFFSET","CURSOR_OFFSET_TOP","Label","label","position","corner","zIndex","props","ref","showLabel","isBottom","bottom","isCorner","style","opacity","undefined","labelStyle","left","transform","top","right","createElement","className","as","ForwardedComponent"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/label.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport type { Position } from './utils';\nimport { POSITIONS } from './utils';\nimport {\n\tTooltipWrapper,\n\tTooltip,\n\tLabelText,\n} from './styles/resize-tooltip.styles';\n\nconst CORNER_OFFSET = 4;\nconst CURSOR_OFFSET_TOP = CORNER_OFFSET * 2.5;\n\ntype LabelProps = React.DetailedHTMLProps<\n\tReact.HTMLAttributes< HTMLDivElement >,\n\tHTMLDivElement\n> & {\n\tlabel?: string;\n\tposition: Position;\n\tzIndex: number;\n};\n\nfunction Label(\n\t{ label, position = POSITIONS.corner, zIndex = 1000, ...props }: LabelProps,\n\tref: ForwardedRef< HTMLDivElement >\n): JSX.Element | null {\n\tconst showLabel = !! label;\n\n\tconst isBottom = position === POSITIONS.bottom;\n\tconst isCorner = position === POSITIONS.corner;\n\n\tif ( ! showLabel ) return null;\n\n\tlet style: React.CSSProperties = {\n\t\topacity: showLabel ? 1 : undefined,\n\t\tzIndex,\n\t};\n\n\tlet labelStyle = {};\n\n\tif ( isBottom ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\tbottom: CURSOR_OFFSET_TOP * -1,\n\t\t\tleft: '50%',\n\t\t\ttransform: 'translate(-50%, 0)',\n\t\t};\n\n\t\tlabelStyle = {\n\t\t\ttransform: `translate(0, 100%)`,\n\t\t};\n\t}\n\n\tif ( isCorner ) {\n\t\tstyle = {\n\t\t\t...style,\n\t\t\tposition: 'absolute',\n\t\t\ttop: CORNER_OFFSET,\n\t\t\tright: isRTL() ? undefined : CORNER_OFFSET,\n\t\t\tleft: isRTL() ? CORNER_OFFSET : undefined,\n\t\t};\n\t}\n\n\treturn (\n\t\t<TooltipWrapper\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName=\"components-resizable-tooltip__tooltip-wrapper\"\n\t\t\tref={ ref }\n\t\t\tstyle={ style }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<Tooltip\n\t\t\t\tclassName=\"components-resizable-tooltip__tooltip\"\n\t\t\t\tstyle={ labelStyle }\n\t\t\t>\n\t\t\t\t<LabelText as=\"span\">{ label }</LabelText>\n\t\t\t</Tooltip>\n\t\t</TooltipWrapper>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( Label );\n\nexport default ForwardedComponent;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;;AAEA,SAASC,SAAS,QAAQ,SAAS;AACnC,SACCC,cAAc,EACdC,OAAO,EACPC,SAAS,QACH,gCAAgC;AAEvC,MAAMC,aAAa,GAAG,CAAC;AACv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,EAAC,uCAAuC;IACjDT,KAAK,EAAGG;EAAY,GAEpBK,aAAA,CAACtB,SAAS;IAACwB,EAAE,EAAC;EAAM,GAAGpB,KAAkB,CACjC,CACM,CAAC;AAEnB;AAEA,MAAMqB,kBAAkB,GAAG9B,UAAU,CAAEQ,KAAM,CAAC;AAE9C,eAAesB,kBAAkB","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
9
9
|
*/
|
|
10
10
|
import { Text } from '../../../text';
|
|
11
11
|
import { font, COLORS } from '../../../utils';
|
|
12
|
-
export const Root = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
12
|
+
export const Root = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
13
13
|
target: "e1wq7y4k3"
|
|
14
14
|
} : {
|
|
15
15
|
target: "e1wq7y4k3",
|
|
@@ -23,7 +23,7 @@ export const Root = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
|
23
23
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcmVzaXphYmxlLWJveC9yZXNpemUtdG9vbHRpcC9zdHlsZXMvcmVzaXplLXRvb2x0aXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVc4QiIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3Jlc2l6YWJsZS1ib3gvcmVzaXplLXRvb2x0aXAvc3R5bGVzL3Jlc2l6ZS10b29sdGlwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbm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2ZSBuZWVkIHRvIHVzZSAmJiYgdG8gaW5jcmVhc2Ugc3BlY2lmaWNpdHlcbi8vIGh0dHBzOi8vZ2l0aHViLmNvbS9Xb3JkUHJlc3MvZ3V0ZW5iZXJnL2lzc3Vlcy8xODQ4M1xuXG5leHBvcnQgY29uc3QgTGFiZWxUZXh0ID0gc3R5bGVkKCBUZXh0IClgXG5cdCYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy50aGVtZS5mb3JlZ3JvdW5kSW52ZXJ0ZWQgfTtcblx0XHRkaXNwbGF5OiBibG9jaztcblx0XHRmb250LXNpemU6IDEzcHg7XG5cdFx0bGluZS1oZWlnaHQ6IDEuNDtcblx0XHR3aGl0ZS1zcGFjZTogbm93cmFwO1xuXHR9XG5gO1xuIl19 */",
|
|
24
24
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
25
25
|
});
|
|
26
|
-
export const TooltipWrapper = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
26
|
+
export const TooltipWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
27
27
|
target: "e1wq7y4k2"
|
|
28
28
|
} : {
|
|
29
29
|
target: "e1wq7y4k2",
|
|
@@ -37,7 +37,7 @@ export const TooltipWrapper = _styled("div", process.env.NODE_ENV === "productio
|
|
|
37
37
|
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcmVzaXphYmxlLWJveC9yZXNpemUtdG9vbHRpcC9zdHlsZXMvcmVzaXplLXRvb2x0aXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCd0MiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9yZXNpemFibGUtYm94L3Jlc2l6ZS10b29sdGlwL3N0eWxlcy9yZXNpemUtdG9vbHRpcC5zdHlsZXMudH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dGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdHBhZGRpbmc6IDRweCA4cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcbmA7XG5cbi8vIFRPRE86IFJlc29sdmUgbmVlZCB0byB1c2UgJiYmIHRvIGluY3JlYXNlIHNwZWNpZmljaXR5XG4vLyBodHRwczovL2dpdGh1Yi5jb20vV29yZFByZXNzL2d1dGVuYmVyZy9pc3N1ZXMvMTg0ODNcblxuZXhwb3J0IGNvbnN0IExhYmVsVGV4dCA9IHN0eWxlZCggVGV4dCApYFxuXHQmJiYge1xuXHRcdGNvbG9yOiAkeyBDT0xPUlMudGhlbWUuZm9yZWdyb3VuZEludmVydGVkIH07XG5cdFx0ZGlzcGxheTogYmxvY2s7XG5cdFx0Zm9udC1zaXplOiAxM3B4O1xuXHRcdGxpbmUtaGVpZ2h0OiAxLjQ7XG5cdFx0d2hpdGUtc3BhY2U6IG5vd3JhcDtcblx0fVxuYDtcbiJdfQ== */",
|
|
38
38
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
39
39
|
});
|
|
40
|
-
export const Tooltip = _styled("div", process.env.NODE_ENV === "production" ? {
|
|
40
|
+
export const Tooltip = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "production" ? {
|
|
41
41
|
target: "e1wq7y4k1"
|
|
42
42
|
} : {
|
|
43
43
|
target: "e1wq7y4k1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","font","COLORS","Root","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","TooltipWrapper","Tooltip","theme","foreground","foregroundInverted","LabelText"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Text } from '../../../text';\nimport { font, COLORS } from '../../../utils';\n\nexport const Root = styled.div`\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tleft: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nexport const TooltipWrapper = styled.div`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\topacity: 0;\n\tpointer-events: none;\n\ttransition: opacity 120ms linear;\n`;\n\nexport const Tooltip = styled.div`\n\tbackground: ${ COLORS.theme.foreground };\n\tborder-radius: 2px;\n\tbox-sizing: border-box;\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: 12px;\n\tcolor: ${ COLORS.theme.foregroundInverted };\n\tpadding: 4px 8px;\n\tposition: relative;\n`;\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const LabelText = styled( Text )`\n\t&&& {\n\t\tcolor: ${ COLORS.theme.foregroundInverted };\n\t\tdisplay: block;\n\t\tfont-size: 13px;\n\t\tline-height: 1.4;\n\t\twhite-space: nowrap;\n\t}\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,gBAAgB;AAE7C,OAAO,MAAMC,IAAI,
|
|
1
|
+
{"version":3,"names":["Text","font","COLORS","Root","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","TooltipWrapper","Tooltip","theme","foreground","foregroundInverted","LabelText"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport { Text } from '../../../text';\nimport { font, COLORS } from '../../../utils';\n\nexport const Root = styled.div`\n\tbottom: 0;\n\tbox-sizing: border-box;\n\tleft: 0;\n\tpointer-events: none;\n\tposition: absolute;\n\tright: 0;\n\ttop: 0;\n`;\n\nexport const TooltipWrapper = styled.div`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\topacity: 0;\n\tpointer-events: none;\n\ttransition: opacity 120ms linear;\n`;\n\nexport const Tooltip = styled.div`\n\tbackground: ${ COLORS.theme.foreground };\n\tborder-radius: 2px;\n\tbox-sizing: border-box;\n\tfont-family: ${ font( 'default.fontFamily' ) };\n\tfont-size: 12px;\n\tcolor: ${ COLORS.theme.foregroundInverted };\n\tpadding: 4px 8px;\n\tposition: relative;\n`;\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const LabelText = styled( Text )`\n\t&&& {\n\t\tcolor: ${ COLORS.theme.foregroundInverted };\n\t\tdisplay: block;\n\t\tfont-size: 13px;\n\t\tline-height: 1.4;\n\t\twhite-space: nowrap;\n\t}\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,IAAI,QAAQ,eAAe;AACpC,SAASC,IAAI,EAAEC,MAAM,QAAQ,gBAAgB;AAE7C,OAAO,MAAMC,IAAI,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAQhB;AAED,OAAO,MAAMC,cAAc,gBAAAX,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAQ1B;AAED,OAAO,MAAME,OAAO,gBAAAZ,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,kBACJP,MAAM,CAACe,KAAK,CAACC,UAAU,2DAGtBjB,IAAI,CAAE,oBAAqB,CAAC,4BAElCC,MAAM,CAACe,KAAK,CAACE,kBAAkB,2CAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA,ohEAGzC;;AAED;AACA;;AAEA,OAAO,MAAMa,SAAS,gBAAGhB,OAAA,CAAQJ,IAAI,EAAAK,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,eAE3BP,MAAM,CAACe,KAAK,CAACE,kBAAkB,0EAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA,ohEAM1C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useRef","useState","useResizeObserver","noop","POSITIONS","bottom","corner","useResizeLabel","axis","fadeTimeout","onResize","position","showPx","resizeListener","sizes","isAxisControlled","moveX","setMoveX","moveY","setMoveY","width","height","heightRef","widthRef","moveTimeoutRef","debounceUnsetMoveXY","unsetMoveXY","current","window","clearTimeout","setTimeout","isRendered","didWidthChange","didHeightChange","label","getSizeLabel","undefined","labelUnit"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n\nconst noop = () => {};\n\nexport type Axis = 'x' | 'y';\n\nexport const POSITIONS = {\n\tbottom: 'bottom',\n\tcorner: 'corner',\n} as const;\n\nexport type Position = ( typeof POSITIONS )[ keyof typeof POSITIONS ];\n\ninterface UseResizeLabelProps {\n\t/** The label value. */\n\tlabel?: string;\n\t/** Element to be rendered for resize listening events. */\n\tresizeListener: JSX.Element;\n}\n\ninterface UseResizeLabelArgs {\n\taxis?: Axis;\n\tfadeTimeout: number;\n\tonResize( data: { width: number | null; height: number | null } ): void;\n\tposition: Position;\n\tshowPx: boolean;\n}\n\n/**\n * Custom hook that manages resize listener events. It also provides a label\n * based on current resize width x height values.\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.fadeTimeout Duration (ms) before deactivating the resize label.\n * @param props.onResize Callback when a resize occurs. Provides { width, height } callback.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n *\n * @return Properties for hook.\n */\nexport function useResizeLabel( {\n\taxis,\n\tfadeTimeout = 180,\n\tonResize = noop,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n}: UseResizeLabelArgs ): UseResizeLabelProps {\n\t/*\n\t * The width/height values derive from this special useResizeObserver hook.\n\t * This custom hook uses the ResizeObserver API to listen for resize events.\n\t */\n\tconst [ resizeListener, sizes ] = useResizeObserver();\n\n\t/*\n\t * Indicates if the x/y axis is preferred.\n\t * If set, we will avoid resetting the moveX and moveY values.\n\t * This will allow for the preferred axis values to persist in the label.\n\t */\n\tconst isAxisControlled = !! axis;\n\n\t/*\n\t * The moveX and moveY values are used to track whether the label should\n\t * display width, height, or width x height.\n\t */\n\tconst [ moveX, setMoveX ] = useState( false );\n\tconst [ moveY, setMoveY ] = useState( false );\n\n\t/*\n\t * Cached dimension values to check for width/height updates from the\n\t * sizes property from useResizeAware()\n\t */\n\tconst { width, height } = sizes;\n\tconst heightRef = useRef( height );\n\tconst widthRef = useRef( width );\n\n\t/*\n\t * This timeout is used with setMoveX and setMoveY to determine of\n\t * both width and height values have changed at (roughly) the same time.\n\t */\n\tconst moveTimeoutRef = useRef< number >();\n\n\tconst debounceUnsetMoveXY = useCallback( () => {\n\t\tconst unsetMoveXY = () => {\n\t\t\t/*\n\t\t\t * If axis is controlled, we will avoid resetting the moveX and moveY values.\n\t\t\t * This will allow for the preferred axis values to persist in the label.\n\t\t\t */\n\t\t\tif ( isAxisControlled ) return;\n\t\t\tsetMoveX( false );\n\t\t\tsetMoveY( false );\n\t\t};\n\n\t\tif ( moveTimeoutRef.current ) {\n\t\t\twindow.clearTimeout( moveTimeoutRef.current );\n\t\t}\n\n\t\tmoveTimeoutRef.current = window.setTimeout( unsetMoveXY, fadeTimeout );\n\t}, [ fadeTimeout, isAxisControlled ] );\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * On the initial render of useResizeAware, the height and width values are\n\t\t * null. They are calculated then set using via an internal useEffect hook.\n\t\t */\n\t\tconst isRendered = width !== null || height !== null;\n\n\t\tif ( ! isRendered ) return;\n\n\t\tconst didWidthChange = width !== widthRef.current;\n\t\tconst didHeightChange = height !== heightRef.current;\n\n\t\tif ( ! didWidthChange && ! didHeightChange ) return;\n\n\t\t/*\n\t\t * After the initial render, the useResizeAware will set the first\n\t\t * width and height values. We'll sync those values with our\n\t\t * width and height refs. However, we shouldn't render our Tooltip\n\t\t * label on this first cycle.\n\t\t */\n\t\tif ( width && ! widthRef.current && height && ! heightRef.current ) {\n\t\t\twidthRef.current = width;\n\t\t\theightRef.current = height;\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * After the first cycle, we can track width and height changes.\n\t\t */\n\t\tif ( didWidthChange ) {\n\t\t\tsetMoveX( true );\n\t\t\twidthRef.current = width;\n\t\t}\n\n\t\tif ( didHeightChange ) {\n\t\t\tsetMoveY( true );\n\t\t\theightRef.current = height;\n\t\t}\n\n\t\tonResize( { width, height } );\n\t\tdebounceUnsetMoveXY();\n\t}, [ width, height, onResize, debounceUnsetMoveXY ] );\n\n\tconst label = getSizeLabel( {\n\t\taxis,\n\t\theight,\n\t\tmoveX,\n\t\tmoveY,\n\t\tposition,\n\t\tshowPx,\n\t\twidth,\n\t} );\n\n\treturn {\n\t\tlabel,\n\t\tresizeListener,\n\t};\n}\n\ninterface GetSizeLabelArgs {\n\taxis?: Axis;\n\theight: number | null;\n\tmoveX: boolean;\n\tmoveY: boolean;\n\tposition: Position;\n\tshowPx: boolean;\n\twidth: number | null;\n}\n\n/**\n * Gets the resize label based on width and height values (as well as recent changes).\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.height Height value.\n * @param props.moveX Recent width (x axis) changes.\n * @param props.moveY Recent width (y axis) changes.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n * @param props.width Width value.\n *\n * @return The rendered label.\n */\nfunction getSizeLabel( {\n\taxis,\n\theight,\n\tmoveX = false,\n\tmoveY = false,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n\twidth,\n}: GetSizeLabelArgs ): string | undefined {\n\tif ( ! moveX && ! moveY ) return undefined;\n\n\t/*\n\t * Corner position...\n\t * We want the label to appear like width x height.\n\t */\n\tif ( position === POSITIONS.corner ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\n\t/*\n\t * Other POSITIONS...\n\t * The label will combine both width x height values if both\n\t * values have recently been changed.\n\t *\n\t * Otherwise, only width or height will be displayed.\n\t * The `PX` unit will be added, if specified by the `showPx` prop.\n\t */\n\tconst labelUnit = showPx ? ' px' : '';\n\n\tif ( axis ) {\n\t\tif ( axis === 'x' && moveX ) {\n\t\t\treturn `${ width }${ labelUnit }`;\n\t\t}\n\t\tif ( axis === 'y' && moveY ) {\n\t\t\treturn `${ height }${ labelUnit }`;\n\t\t}\n\t}\n\n\tif ( moveX && moveY ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\tif ( moveX ) {\n\t\treturn `${ width }${ labelUnit }`;\n\t}\n\tif ( moveY ) {\n\t\treturn `${ height }${ labelUnit }`;\n\t}\n\n\treturn undefined;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;AAC7E,SAASC,iBAAiB,QAAQ,oBAAoB;AAEtD,MAAMC,IAAI,GAAGA,CAAA,KAAM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,MAAM;IACNQ;EACD,CAAE,CAAC;EAEH,OAAO;IACNc,KAAK;IACLrB;EACD,CAAC;AACF;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASsB,YAAYA,CAAE;EACtB3B,IAAI;EACJa,MAAM;EACNL,KAAK,GAAG,KAAK;EACbE,KAAK,GAAG,KAAK;EACbP,QAAQ,GAAGP,SAAS,CAACC,MAAM;EAC3BO,MAAM,GAAG,KAAK;EACdQ;AACiB,CAAC,EAAuB;EACzC,IAAK,CAAEJ,KAAK,IAAI,CAAEE,KAAK,EAAG,OAAOkB,SAAS;;EAE1C;AACD;AACA;AACA;EACC,IAAKzB,QAAQ,KAAKP,SAAS,CAACE,MAAM,EAAG;IACpC,OAAQ,GAAGc,KAAO,MAAMC,MAAQ,EAAC;EAClC;;EAEA;AACD;AACA;AACA;AACA;AACA;AACA;AACA;EACC,MAAMgB,SAAS,GAAGzB,MAAM,GAAG,KAAK,GAAG,EAAE;EAErC,IAAKJ,IAAI,EAAG;IACX,IAAKA,IAAI,KAAK,GAAG,IAAIQ,KAAK,EAAG;MAC5B,OAAQ,GAAGI,KAAO,GAAGiB,SAAW,EAAC;IAClC;IACA,IAAK7B,IAAI,KAAK,GAAG,IAAIU,KAAK,EAAG;MAC5B,OAAQ,GAAGG,MAAQ,GAAGgB,SAAW,EAAC;IACnC;EACD;EAEA,IAAKrB,KAAK,IAAIE,KAAK,EAAG;IACrB,OAAQ,GAAGE,KAAO,MAAMC,MAAQ,EAAC;EAClC;EACA,IAAKL,KAAK,EAAG;IACZ,OAAQ,GAAGI,KAAO,GAAGiB,SAAW,EAAC;EAClC;EACA,IAAKnB,KAAK,EAAG;IACZ,OAAQ,GAAGG,MAAQ,GAAGgB,SAAW,EAAC;EACnC;EAEA,OAAOD,SAAS;AACjB"}
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useRef","useState","useResizeObserver","noop","POSITIONS","bottom","corner","useResizeLabel","axis","fadeTimeout","onResize","position","showPx","resizeListener","sizes","isAxisControlled","moveX","setMoveX","moveY","setMoveY","width","height","heightRef","widthRef","moveTimeoutRef","debounceUnsetMoveXY","unsetMoveXY","current","window","clearTimeout","setTimeout","isRendered","didWidthChange","didHeightChange","label","getSizeLabel","undefined","labelUnit"],"sources":["@wordpress/components/src/resizable-box/resize-tooltip/utils.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback, useEffect, useRef, useState } from '@wordpress/element';\nimport { useResizeObserver } from '@wordpress/compose';\n\nconst noop = () => {};\n\nexport type Axis = 'x' | 'y';\n\nexport const POSITIONS = {\n\tbottom: 'bottom',\n\tcorner: 'corner',\n} as const;\n\nexport type Position = ( typeof POSITIONS )[ keyof typeof POSITIONS ];\n\ninterface UseResizeLabelProps {\n\t/** The label value. */\n\tlabel?: string;\n\t/** Element to be rendered for resize listening events. */\n\tresizeListener: JSX.Element;\n}\n\ninterface UseResizeLabelArgs {\n\taxis?: Axis;\n\tfadeTimeout: number;\n\tonResize( data: { width: number | null; height: number | null } ): void;\n\tposition: Position;\n\tshowPx: boolean;\n}\n\n/**\n * Custom hook that manages resize listener events. It also provides a label\n * based on current resize width x height values.\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.fadeTimeout Duration (ms) before deactivating the resize label.\n * @param props.onResize Callback when a resize occurs. Provides { width, height } callback.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n *\n * @return Properties for hook.\n */\nexport function useResizeLabel( {\n\taxis,\n\tfadeTimeout = 180,\n\tonResize = noop,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n}: UseResizeLabelArgs ): UseResizeLabelProps {\n\t/*\n\t * The width/height values derive from this special useResizeObserver hook.\n\t * This custom hook uses the ResizeObserver API to listen for resize events.\n\t */\n\tconst [ resizeListener, sizes ] = useResizeObserver();\n\n\t/*\n\t * Indicates if the x/y axis is preferred.\n\t * If set, we will avoid resetting the moveX and moveY values.\n\t * This will allow for the preferred axis values to persist in the label.\n\t */\n\tconst isAxisControlled = !! axis;\n\n\t/*\n\t * The moveX and moveY values are used to track whether the label should\n\t * display width, height, or width x height.\n\t */\n\tconst [ moveX, setMoveX ] = useState( false );\n\tconst [ moveY, setMoveY ] = useState( false );\n\n\t/*\n\t * Cached dimension values to check for width/height updates from the\n\t * sizes property from useResizeAware()\n\t */\n\tconst { width, height } = sizes;\n\tconst heightRef = useRef( height );\n\tconst widthRef = useRef( width );\n\n\t/*\n\t * This timeout is used with setMoveX and setMoveY to determine of\n\t * both width and height values have changed at (roughly) the same time.\n\t */\n\tconst moveTimeoutRef = useRef< number >();\n\n\tconst debounceUnsetMoveXY = useCallback( () => {\n\t\tconst unsetMoveXY = () => {\n\t\t\t/*\n\t\t\t * If axis is controlled, we will avoid resetting the moveX and moveY values.\n\t\t\t * This will allow for the preferred axis values to persist in the label.\n\t\t\t */\n\t\t\tif ( isAxisControlled ) return;\n\t\t\tsetMoveX( false );\n\t\t\tsetMoveY( false );\n\t\t};\n\n\t\tif ( moveTimeoutRef.current ) {\n\t\t\twindow.clearTimeout( moveTimeoutRef.current );\n\t\t}\n\n\t\tmoveTimeoutRef.current = window.setTimeout( unsetMoveXY, fadeTimeout );\n\t}, [ fadeTimeout, isAxisControlled ] );\n\n\tuseEffect( () => {\n\t\t/*\n\t\t * On the initial render of useResizeAware, the height and width values are\n\t\t * null. They are calculated then set using via an internal useEffect hook.\n\t\t */\n\t\tconst isRendered = width !== null || height !== null;\n\n\t\tif ( ! isRendered ) return;\n\n\t\tconst didWidthChange = width !== widthRef.current;\n\t\tconst didHeightChange = height !== heightRef.current;\n\n\t\tif ( ! didWidthChange && ! didHeightChange ) return;\n\n\t\t/*\n\t\t * After the initial render, the useResizeAware will set the first\n\t\t * width and height values. We'll sync those values with our\n\t\t * width and height refs. However, we shouldn't render our Tooltip\n\t\t * label on this first cycle.\n\t\t */\n\t\tif ( width && ! widthRef.current && height && ! heightRef.current ) {\n\t\t\twidthRef.current = width;\n\t\t\theightRef.current = height;\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * After the first cycle, we can track width and height changes.\n\t\t */\n\t\tif ( didWidthChange ) {\n\t\t\tsetMoveX( true );\n\t\t\twidthRef.current = width;\n\t\t}\n\n\t\tif ( didHeightChange ) {\n\t\t\tsetMoveY( true );\n\t\t\theightRef.current = height;\n\t\t}\n\n\t\tonResize( { width, height } );\n\t\tdebounceUnsetMoveXY();\n\t}, [ width, height, onResize, debounceUnsetMoveXY ] );\n\n\tconst label = getSizeLabel( {\n\t\taxis,\n\t\theight,\n\t\tmoveX,\n\t\tmoveY,\n\t\tposition,\n\t\tshowPx,\n\t\twidth,\n\t} );\n\n\treturn {\n\t\tlabel,\n\t\tresizeListener,\n\t};\n}\n\ninterface GetSizeLabelArgs {\n\taxis?: Axis;\n\theight: number | null;\n\tmoveX: boolean;\n\tmoveY: boolean;\n\tposition: Position;\n\tshowPx: boolean;\n\twidth: number | null;\n}\n\n/**\n * Gets the resize label based on width and height values (as well as recent changes).\n *\n * @param props\n * @param props.axis Only shows the label corresponding to the axis.\n * @param props.height Height value.\n * @param props.moveX Recent width (x axis) changes.\n * @param props.moveY Recent width (y axis) changes.\n * @param props.position Adjusts label value.\n * @param props.showPx Whether to add `PX` to the label.\n * @param props.width Width value.\n *\n * @return The rendered label.\n */\nfunction getSizeLabel( {\n\taxis,\n\theight,\n\tmoveX = false,\n\tmoveY = false,\n\tposition = POSITIONS.bottom,\n\tshowPx = false,\n\twidth,\n}: GetSizeLabelArgs ): string | undefined {\n\tif ( ! moveX && ! moveY ) return undefined;\n\n\t/*\n\t * Corner position...\n\t * We want the label to appear like width x height.\n\t */\n\tif ( position === POSITIONS.corner ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\n\t/*\n\t * Other POSITIONS...\n\t * The label will combine both width x height values if both\n\t * values have recently been changed.\n\t *\n\t * Otherwise, only width or height will be displayed.\n\t * The `PX` unit will be added, if specified by the `showPx` prop.\n\t */\n\tconst labelUnit = showPx ? ' px' : '';\n\n\tif ( axis ) {\n\t\tif ( axis === 'x' && moveX ) {\n\t\t\treturn `${ width }${ labelUnit }`;\n\t\t}\n\t\tif ( axis === 'y' && moveY ) {\n\t\t\treturn `${ height }${ labelUnit }`;\n\t\t}\n\t}\n\n\tif ( moveX && moveY ) {\n\t\treturn `${ width } x ${ height }`;\n\t}\n\tif ( moveX ) {\n\t\treturn `${ width }${ labelUnit }`;\n\t}\n\tif ( moveY ) {\n\t\treturn `${ height }${ labelUnit }`;\n\t}\n\n\treturn undefined;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,oBAAoB;AAC7E,SAASC,iBAAiB,QAAQ,oBAAoB;AAEtD,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AAIrB,OAAO,MAAMC,SAAS,GAAG;EACxBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE;AACT,CAAU;AAmBV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAE;EAC/BC,IAAI;EACJC,WAAW,GAAG,GAAG;EACjBC,QAAQ,GAAGP,IAAI;EACfQ,QAAQ,GAAGP,SAAS,CAACC,MAAM;EAC3BO,MAAM,GAAG;AACU,CAAC,EAAwB;EAC5C;AACD;AACA;AACA;EACC,MAAM,CAAEC,cAAc,EAAEC,KAAK,CAAE,GAAGZ,iBAAiB,CAAC,CAAC;;EAErD;AACD;AACA;AACA;AACA;EACC,MAAMa,gBAAgB,GAAG,CAAC,CAAEP,IAAI;;EAEhC;AACD;AACA;AACA;EACC,MAAM,CAAEQ,KAAK,EAAEC,QAAQ,CAAE,GAAGhB,QAAQ,CAAE,KAAM,CAAC;EAC7C,MAAM,CAAEiB,KAAK,EAAEC,QAAQ,CAAE,GAAGlB,QAAQ,CAAE,KAAM,CAAC;;EAE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AAK,EAAG;MAC5B,OAAQ,GAAGI,KAAO,GAAGiB,SAAW,EAAC;IAClC;IACA,IAAK7B,IAAI,KAAK,GAAG,IAAIU,KAAK,EAAG;MAC5B,OAAQ,GAAGG,MAAQ,GAAGgB,SAAW,EAAC;IACnC;EACD;EAEA,IAAKrB,KAAK,IAAIE,KAAK,EAAG;IACrB,OAAQ,GAAGE,KAAO,MAAMC,MAAQ,EAAC;EAClC;EACA,IAAKL,KAAK,EAAG;IACZ,OAAQ,GAAGI,KAAO,GAAGiB,SAAW,EAAC;EAClC;EACA,IAAKnB,KAAK,EAAG;IACZ,OAAQ,GAAGG,MAAQ,GAAGgB,SAAW,EAAC;EACnC;EAEA,OAAOD,SAAS;AACjB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","cloneElement","Children","ResponsiveWrapper","naturalWidth","naturalHeight","children","isInline","count","TagName","aspectRatio","createElement","className","props","style"],"sources":["@wordpress/components/src/responsive-wrapper/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ResponsiveWrapperProps } from './types';\n\n/**\n * A wrapper component that maintains its aspect ratio when resized.\n *\n * ```jsx\n * import { ResponsiveWrapper } from '@wordpress/components';\n *\n * const MyResponsiveWrapper = () => (\n * \t<ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>\n * \t\t<img\n * \t\t\tsrc=\"https://s.w.org/style/images/about/WordPress-logotype-standard.png\"\n * \t\t\talt=\"WordPress\"\n * \t\t/>\n * \t</ResponsiveWrapper>\n * );\n * ```\n */\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n}: ResponsiveWrapperProps ) {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\n\tconst TagName = isInline ? 'span' : 'div';\n\tlet aspectRatio;\n\tif ( naturalWidth && naturalHeight ) {\n\t\taspectRatio = `${ naturalWidth } / ${ naturalHeight }`;\n\t}\n\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t<div>\n\t\t\t\t{ cloneElement( children, {\n\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\t\tchildren.props.className\n\t\t\t\t\t),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...children.props.style,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t},\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAAE;EAC3BC,YAAY;EACZC,aAAa;EACbC,QAAQ;EACRC,QAAQ,GAAG;AACY,CAAC,EAAG;EAC3B,IAAKL,QAAQ,CAACM,KAAK,CAAEF,QAAS,CAAC,KAAK,CAAC,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,MAAMG,OAAO,GAAGF,QAAQ,GAAG,MAAM,GAAG,KAAK;EACzC,IAAIG,WAAW;EACf,IAAKN,YAAY,IAAIC,aAAa,EAAG;IACpCK,WAAW,GAAI,GAAGN,YAAc,MAAMC,aAAe,EAAC;EACvD;EAEA,OACCM,aAAA,CAACF,OAAO;IAACG,SAAS,EAAC;EAA+B,GACjDD,aAAA,cACGV,YAAY,CAAEK,QAAQ,EAAE;IACzBM,SAAS,EAAEZ,UAAU,CACpB,wCAAwC,EACxCM,QAAQ,CAACO,KAAK,CAACD,SAChB,CAAC;IACDE,KAAK,EAAE;MACN,GAAGR,QAAQ,CAACO,KAAK,CAACC,KAAK;MACvBJ;IACD;EACD,CAAE,CACE,CACG,CAAC;AAEZ;AAEA,eAAeP,iBAAiB"}
|
|
1
|
+
{"version":3,"names":["classnames","cloneElement","Children","ResponsiveWrapper","naturalWidth","naturalHeight","children","isInline","count","TagName","aspectRatio","createElement","className","props","style"],"sources":["@wordpress/components/src/responsive-wrapper/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { cloneElement, Children } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { ResponsiveWrapperProps } from './types';\n\n/**\n * A wrapper component that maintains its aspect ratio when resized.\n *\n * ```jsx\n * import { ResponsiveWrapper } from '@wordpress/components';\n *\n * const MyResponsiveWrapper = () => (\n * \t<ResponsiveWrapper naturalWidth={ 2000 } naturalHeight={ 680 }>\n * \t\t<img\n * \t\t\tsrc=\"https://s.w.org/style/images/about/WordPress-logotype-standard.png\"\n * \t\t\talt=\"WordPress\"\n * \t\t/>\n * \t</ResponsiveWrapper>\n * );\n * ```\n */\nfunction ResponsiveWrapper( {\n\tnaturalWidth,\n\tnaturalHeight,\n\tchildren,\n\tisInline = false,\n}: ResponsiveWrapperProps ) {\n\tif ( Children.count( children ) !== 1 ) {\n\t\treturn null;\n\t}\n\n\tconst TagName = isInline ? 'span' : 'div';\n\tlet aspectRatio;\n\tif ( naturalWidth && naturalHeight ) {\n\t\taspectRatio = `${ naturalWidth } / ${ naturalHeight }`;\n\t}\n\n\treturn (\n\t\t<TagName className=\"components-responsive-wrapper\">\n\t\t\t<div>\n\t\t\t\t{ cloneElement( children, {\n\t\t\t\t\tclassName: classnames(\n\t\t\t\t\t\t'components-responsive-wrapper__content',\n\t\t\t\t\t\tchildren.props.className\n\t\t\t\t\t),\n\t\t\t\t\tstyle: {\n\t\t\t\t\t\t...children.props.style,\n\t\t\t\t\t\taspectRatio,\n\t\t\t\t\t},\n\t\t\t\t} ) }\n\t\t\t</div>\n\t\t</TagName>\n\t);\n}\n\nexport default ResponsiveWrapper;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,YAAY,EAAEC,QAAQ,QAAQ,oBAAoB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,iBAAiBA,CAAE;EAC3BC,YAAY;EACZC,aAAa;EACbC,QAAQ;EACRC,QAAQ,GAAG;AACY,CAAC,EAAG;EAC3B,IAAKL,QAAQ,CAACM,KAAK,CAAEF,QAAS,CAAC,KAAK,CAAC,EAAG;IACvC,OAAO,IAAI;EACZ;EAEA,MAAMG,OAAO,GAAGF,QAAQ,GAAG,MAAM,GAAG,KAAK;EACzC,IAAIG,WAAW;EACf,IAAKN,YAAY,IAAIC,aAAa,EAAG;IACpCK,WAAW,GAAI,GAAGN,YAAc,MAAMC,aAAe,EAAC;EACvD;EAEA,OACCM,aAAA,CAACF,OAAO;IAACG,SAAS,EAAC;EAA+B,GACjDD,aAAA,cACGV,YAAY,CAAEK,QAAQ,EAAE;IACzBM,SAAS,EAAEZ,UAAU,CACpB,wCAAwC,EACxCM,QAAQ,CAACO,KAAK,CAACD,SAChB,CAAC;IACDE,KAAK,EAAE;MACN,GAAGR,QAAQ,CAACO,KAAK,CAACC,KAAK;MACvBJ;IACD;EACD,CAAE,CACE,CACG,CAAC;AAEZ;AAEA,eAAeP,iBAAiB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/responsive-wrapper/types.ts"],"sourcesContent":["export type ResponsiveWrapperProps = {\n\t/**\n\t * The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.\n\t */\n\tnaturalWidth?: number;\n\t/**\n\t * The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.\n\t */\n\tnaturalHeight?: number;\n\t/**\n\t * The element to wrap.\n\t */\n\tchildren: React.ReactElement;\n\t/**\n\t * If true, the wrapper will be `span` instead of `div`.\n\t *\n\t * @default false\n\t */\n\tisInline?: boolean;\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/responsive-wrapper/types.ts"],"sourcesContent":["export type ResponsiveWrapperProps = {\n\t/**\n\t * The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.\n\t */\n\tnaturalWidth?: number;\n\t/**\n\t * The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.\n\t */\n\tnaturalHeight?: number;\n\t/**\n\t * The element to wrap.\n\t */\n\tchildren: React.ReactElement;\n\t/**\n\t * If true, the wrapper will be `span` instead of `div`.\n\t *\n\t * @default false\n\t */\n\tisInline?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["renderToString","useRef","useState","useEffect","useFocusableIframe","useMergeRefs","observeAndResizeJS","MutationObserver","window","document","body","parent","sendResize","clientBoundingRect","getBoundingClientRect","postMessage","action","width","height","observer","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","addEventListener","removeViewportStyles","ruleOrNode","style","forEach","test","Array","prototype","call","querySelectorAll","styleSheets","stylesheet","cssRules","rules","position","setAttribute","SandBox","html","title","type","styles","scripts","onFocus","tabIndex","ref","setWidth","setHeight","isFrameAccessible","current","contentDocument","e","trySandBox","forceRerender","ownerDocument","getAttribute","htmlDoc","createElement","lang","documentElement","className","dangerouslySetInnerHTML","__html","map","i","key","toString","src","open","write","close","tryNoForceSandBox","checkMessageForResize","event","iframe","contentWindow","source","data","JSON","parse","defaultView","removeEventListener","sandbox","Math","ceil"],"sources":["@wordpress/components/src/sandbox/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SandBoxProps } from './types';\n\nconst observeAndResizeJS = function () {\n\tconst { MutationObserver } = window;\n\n\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\treturn;\n\t}\n\n\tfunction sendResize() {\n\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\twindow.parent.postMessage(\n\t\t\t{\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t},\n\t\t\t'*'\n\t\t);\n\t}\n\n\tconst observer = new MutationObserver( sendResize );\n\tobserver.observe( document.body, {\n\t\tattributes: true,\n\t\tattributeOldValue: false,\n\t\tcharacterData: true,\n\t\tcharacterDataOldValue: false,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t} );\n\n\twindow.addEventListener( 'load', sendResize, true );\n\n\t// Hack: Remove viewport unit styles, as these are relative\n\t// the iframe root and interfere with our mechanism for\n\t// determining the unconstrained page bounds.\n\tfunction removeViewportStyles( ruleOrNode: ElementCSSInlineStyle ) {\n\t\tif ( ruleOrNode.style ) {\n\t\t\t(\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ] as const\n\t\t\t ).forEach( function ( style ) {\n\t\t\t\tif (\n\t\t\t\t\t/^\\\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(\n\t\t\t\t\t\truleOrNode.style[ style ]\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tArray.prototype.forEach.call(\n\t\tdocument.querySelectorAll( '[style]' ),\n\t\tremoveViewportStyles\n\t);\n\tArray.prototype.forEach.call(\n\t\tdocument.styleSheets,\n\t\tfunction ( stylesheet ) {\n\t\t\tArray.prototype.forEach.call(\n\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\tremoveViewportStyles\n\t\t\t);\n\t\t}\n\t);\n\n\tdocument.body.style.position = 'absolute';\n\tdocument.body.style.width = '100%';\n\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\tsendResize();\n\n\t// Resize events can change the width of elements with 100% width, but we don't\n\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\twindow.addEventListener( 'resize', sendResize, true );\n};\n\n// TODO: These styles shouldn't be coupled with WordPress.\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\n/**\n * This component provides an isolated environment for arbitrary HTML via iframes.\n *\n * ```jsx\n * import { SandBox } from '@wordpress/components';\n *\n * const MySandBox = () => (\n * \t<SandBox html=\"<p>Content</p>\" title=\"SandBox\" type=\"embed\" />\n * );\n * ```\n */\nfunction SandBox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n\ttabIndex,\n}: SandBoxProps ) {\n\tconst ref = useRef< HTMLIFrameElement >();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current?.contentDocument?.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandBox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } =\n\t\t\tref.current as HTMLIFrameElement & {\n\t\t\t\tcontentDocument: Document;\n\t\t\t};\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !==\n\t\t\t\tcontentDocument?.body.getAttribute(\n\t\t\t\t\t'data-resizable-iframe-connected'\n\t\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: `(${ observeAndResizeJS.toString() })();`,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\n\t\tfunction tryNoForceSandBox() {\n\t\t\ttrySandBox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event: MessageEvent ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst defaultView = iframe?.ownerDocument?.defaultView;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe?.addEventListener( 'load', tryNoForceSandBox, false );\n\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandBox, false );\n\t\t\tdefaultView?.removeEventListener(\n\t\t\t\t'message',\n\t\t\t\tcheckMessageForResize\n\t\t\t);\n\t\t};\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandBox( true );\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\n\nexport default SandBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,MAAM,EACNC,QAAQ,EACRC,SAAS,QACH,oBAAoB;AAC3B,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,oBAAoB;;AAErE;AACA;AACA;;AAGA,MAAMC,kBAAkB,GAAG,SAAAA,CAAA,EAAY;EACtC,MAAM;IAAEC;EAAiB,CAAC,GAAGC,MAAM;EAEnC,IAAK,CAAED,gBAAgB,IAAI,CAAEE,QAAQ,CAACC,IAAI,IAAI,CAAEF,MAAM,CAACG,MAAM,EAAG;IAC/D;EACD;EAEA,SAASC,UAAUA,CAAA,EAAG;IACrB,MAAMC,kBAAkB,GAAGJ,QAAQ,CAACC,IAAI,CAACI,qBAAqB,CAAC,CAAC;IAEhEN,MAAM,CAACG,MAAM,CAACI,WAAW,CACxB;MAC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IACZ;IACA;IACA;EACD,CAAC,EAAE,CAAEb,KAAK,EAAEE,MAAM,EAAEC,OAAO,CAAG,CAAC;EAE/B7C,SAAS,CAAE,MAAM;IAChBuD,UAAU,CAAE,IAAK,CAAC;IAClB;IACA;IACA;EACD,CAAC,EAAE,CAAEd,IAAI,EAAEE,IAAI,CAAG,CAAC;EAEnB,OACCiB,aAAA;IACCZ,GAAG,EAAG9C,YAAY,CAAE,CAAE8C,GAAG,EAAE/C,kBAAkB,CAAC,CAAC,CAAG,CAAG;IACrDyC,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGA,QAAU;IACrBgB,SAAS,EAAC,oBAAoB;IAC9BsB,OAAO,EAAC,oDAAoD;IAC5DvC,OAAO,EAAGA,OAAS;IACnBhC,KAAK,EAAGwE,IAAI,CAACC,IAAI,CAAEzE,KAAM,CAAG;IAC5BC,MAAM,EAAGuE,IAAI,CAACC,IAAI,CAAExE,MAAO;EAAG,CAC9B,CAAC;AAEJ;AAEA,eAAeyB,OAAO"}
|
|
1
|
+
{"version":3,"names":["renderToString","useRef","useState","useEffect","useFocusableIframe","useMergeRefs","observeAndResizeJS","MutationObserver","window","document","body","parent","sendResize","clientBoundingRect","getBoundingClientRect","postMessage","action","width","height","observer","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","addEventListener","removeViewportStyles","ruleOrNode","style","forEach","test","Array","prototype","call","querySelectorAll","styleSheets","stylesheet","cssRules","rules","position","setAttribute","SandBox","html","title","type","styles","scripts","onFocus","tabIndex","ref","setWidth","setHeight","isFrameAccessible","current","contentDocument","e","trySandBox","forceRerender","ownerDocument","getAttribute","htmlDoc","createElement","lang","documentElement","className","dangerouslySetInnerHTML","__html","map","i","key","toString","src","open","write","close","tryNoForceSandBox","checkMessageForResize","event","iframe","contentWindow","source","data","JSON","parse","defaultView","removeEventListener","sandbox","Math","ceil"],"sources":["@wordpress/components/src/sandbox/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SandBoxProps } from './types';\n\nconst observeAndResizeJS = function () {\n\tconst { MutationObserver } = window;\n\n\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\treturn;\n\t}\n\n\tfunction sendResize() {\n\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\twindow.parent.postMessage(\n\t\t\t{\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t},\n\t\t\t'*'\n\t\t);\n\t}\n\n\tconst observer = new MutationObserver( sendResize );\n\tobserver.observe( document.body, {\n\t\tattributes: true,\n\t\tattributeOldValue: false,\n\t\tcharacterData: true,\n\t\tcharacterDataOldValue: false,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t} );\n\n\twindow.addEventListener( 'load', sendResize, true );\n\n\t// Hack: Remove viewport unit styles, as these are relative\n\t// the iframe root and interfere with our mechanism for\n\t// determining the unconstrained page bounds.\n\tfunction removeViewportStyles( ruleOrNode: ElementCSSInlineStyle ) {\n\t\tif ( ruleOrNode.style ) {\n\t\t\t(\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ] as const\n\t\t\t ).forEach( function ( style ) {\n\t\t\t\tif (\n\t\t\t\t\t/^\\\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test(\n\t\t\t\t\t\truleOrNode.style[ style ]\n\t\t\t\t\t)\n\t\t\t\t) {\n\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tArray.prototype.forEach.call(\n\t\tdocument.querySelectorAll( '[style]' ),\n\t\tremoveViewportStyles\n\t);\n\tArray.prototype.forEach.call(\n\t\tdocument.styleSheets,\n\t\tfunction ( stylesheet ) {\n\t\t\tArray.prototype.forEach.call(\n\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\tremoveViewportStyles\n\t\t\t);\n\t\t}\n\t);\n\n\tdocument.body.style.position = 'absolute';\n\tdocument.body.style.width = '100%';\n\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\tsendResize();\n\n\t// Resize events can change the width of elements with 100% width, but we don't\n\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\twindow.addEventListener( 'resize', sendResize, true );\n};\n\n// TODO: These styles shouldn't be coupled with WordPress.\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\n/**\n * This component provides an isolated environment for arbitrary HTML via iframes.\n *\n * ```jsx\n * import { SandBox } from '@wordpress/components';\n *\n * const MySandBox = () => (\n * \t<SandBox html=\"<p>Content</p>\" title=\"SandBox\" type=\"embed\" />\n * );\n * ```\n */\nfunction SandBox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n\ttabIndex,\n}: SandBoxProps ) {\n\tconst ref = useRef< HTMLIFrameElement >();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current?.contentDocument?.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandBox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } =\n\t\t\tref.current as HTMLIFrameElement & {\n\t\t\t\tcontentDocument: Document;\n\t\t\t};\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !==\n\t\t\t\tcontentDocument?.body.getAttribute(\n\t\t\t\t\t'data-resizable-iframe-connected'\n\t\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: `(${ observeAndResizeJS.toString() })();`,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\n\t\tfunction tryNoForceSandBox() {\n\t\t\ttrySandBox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event: MessageEvent ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst defaultView = iframe?.ownerDocument?.defaultView;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe?.addEventListener( 'load', tryNoForceSandBox, false );\n\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandBox, false );\n\t\t\tdefaultView?.removeEventListener(\n\t\t\t\t'message',\n\t\t\t\tcheckMessageForResize\n\t\t\t);\n\t\t};\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandBox( true );\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\ttabIndex={ tabIndex }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\n\nexport default SandBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,MAAM,EACNC,QAAQ,EACRC,SAAS,QACH,oBAAoB;AAC3B,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,oBAAoB;;AAErE;AACA;AACA;;AAGA,MAAMC,kBAAkB,GAAG,SAAAA,CAAA,EAAY;EACtC,MAAM;IAAEC;EAAiB,CAAC,GAAGC,MAAM;EAEnC,IAAK,CAAED,gBAAgB,IAAI,CAAEE,QAAQ,CAACC,IAAI,IAAI,CAAEF,MAAM,CAACG,MAAM,EAAG;IAC/D;EACD;EAEA,SAASC,UAAUA,CAAA,EAAG;IACrB,MAAMC,kBAAkB,GAAGJ,QAAQ,CAACC,IAAI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AC,EAAE,EAAG,CAAC;EAEP3E,SAAS,CAAE,MAAM;IAChBuD,UAAU,CAAC,CAAC;IACZ;IACA;IACA;EACD,CAAC,EAAE,CAAEb,KAAK,EAAEE,MAAM,EAAEC,OAAO,CAAG,CAAC;EAE/B7C,SAAS,CAAE,MAAM;IAChBuD,UAAU,CAAE,IAAK,CAAC;IAClB;IACA;IACA;EACD,CAAC,EAAE,CAAEd,IAAI,EAAEE,IAAI,CAAG,CAAC;EAEnB,OACCiB,aAAA;IACCZ,GAAG,EAAG9C,YAAY,CAAE,CAAE8C,GAAG,EAAE/C,kBAAkB,CAAC,CAAC,CAAG,CAAG;IACrDyC,KAAK,EAAGA,KAAO;IACfK,QAAQ,EAAGA,QAAU;IACrBgB,SAAS,EAAC,oBAAoB;IAC9BsB,OAAO,EAAC,oDAAoD;IAC5DvC,OAAO,EAAGA,OAAS;IACnBhC,KAAK,EAAGwE,IAAI,CAACC,IAAI,CAAEzE,KAAM,CAAG;IAC5BC,MAAM,EAAGuE,IAAI,CAACC,IAAI,CAAExE,MAAO;EAAG,CAC9B,CAAC;AAEJ;AAEA,eAAeyB,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Dimensions","StyleSheet","WebView","Platform","renderToString","memo","useRef","useState","useEffect","forwardRef","useCallback","usePreferredColorScheme","sandboxStyles","observeAndResizeJS","style","EMPTY_ARRAY","Sandbox","containerStyle","customJS","html","lang","providerUrl","scripts","styles","title","type","url","onWindowEvents","viewportProps","onLoadEnd","testID","ref","colorScheme","height","setHeight","contentHtml","setContentHtml","getHtmlDoc","windowSize","get","isLandscape","setIsLandscape","width","wasLandscape","key","select","android","ios","addViewportProps","trim","replace","htmlDoc","createElement","name","content","dangerouslySetInnerHTML","__html","map","rules","i","className","src","getInjectedJavaScript","injectedJS","Object","keys","forEach","eventType","updateContentHtml","forceRerender","newContentHtml","setImmediate","getSizeStyle","contentHeight","Math","ceil","aspectRatio","onChangeDimensions","dimensions","window","onMessage","message","data","nativeEvent","JSON","parse","e","action","console","warn","dimensionsChangeSubscription","addEventListener","remove","current","injectedJavaScript","source","baseUrl","originWhitelist","isAndroid","workaroundStyles","webView","scrollEnabled","setBuiltInZoomControls","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","mediaPlaybackRequiresUserAction","create","opacity"],"sources":["@wordpress/components/src/sandbox/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Dimensions, StyleSheet } from 'react-native';\nimport { WebView } from 'react-native-webview';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tPlatform,\n\trenderToString,\n\tmemo,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n\tforwardRef,\n\tuseCallback,\n} from '@wordpress/element';\nimport { usePreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport sandboxStyles from './style.scss';\n\nconst observeAndResizeJS = `\n\t(function() {\n\t\tconst { MutationObserver } = window;\n\n\t\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t// The function postMessage is exposed by the react-native-webview library\n\t\t\t// to communicate between React Native and the WebView, in this case,\n\t\t\t// we use it for notifying resize changes.\n\t\t\twindow.ReactNativeWebView.postMessage(\n\t\t\t\tJSON.stringify( {\n\t\t\t\t\taction: 'resize',\n\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\theight: clientBoundingRect.height,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tconst observer = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif ( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function (\n\t\t\t\t\tstyle\n\t\t\t\t) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t/^\\\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test( ruleOrNode.style[ style ] )\n\t\t\t\t\t) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call(\n\t\t\tdocument.querySelectorAll( '[style]' ),\n\t\t\tremoveViewportStyles\n\t\t);\n\t\tArray.prototype.forEach.call(\n\t\t\tdocument.styleSheets,\n\t\t\tfunction ( stylesheet ) {\n\t\t\t\tArray.prototype.forEach.call(\n\t\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\t\tremoveViewportStyles\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n\t\twindow.addEventListener( 'orientationchange', sendResize, true );\n\t})();\n`;\n\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div,\n\tbody > div iframe {\n\t\twidth: 100%;\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n\n\t.wp-block-embed__wrapper {\n\t\tposition: relative;\n\t}\n\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\n\t/**\n\t * Add responsiveness to embeds with aspect ratios.\n\t *\n\t * These styles have been copied from the web version (https://github.com/WordPress/gutenberg/blob/7901895ca20cf61e402925e31571d659dab64721/packages/block-library/src/embed/style.scss#L42-L89) and\n\t * adapted for the native version.\n\t */\n\t.wp-has-aspect-ratio.wp-block-embed__wrapper::before {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tpadding-top: 50%; // Default to 2:1 aspect ratio.\n\t}\n\t.wp-has-aspect-ratio iframe {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\t.wp-embed-aspect-21-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 42.85%; // 9 / 21 * 100\n\t}\n\t.wp-embed-aspect-18-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 50%; // 9 / 18 * 100\n\t}\n\t.wp-embed-aspect-16-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 56.25%; // 9 / 16 * 100\n\t}\n\t.wp-embed-aspect-4-3.wp-block-embed__wrapper::before {\n\t\tpadding-top: 75%; // 3 / 4 * 100\n\t}\n\t.wp-embed-aspect-1-1.wp-block-embed__wrapper::before {\n\t\tpadding-top: 100%; // 1 / 1 * 100\n\t}\n\t.wp-embed-aspect-9-16.wp-block-embed__wrapper::before {\n\t\tpadding-top: 177.77%; // 16 / 9 * 100\n\t}\n\t.wp-embed-aspect-1-2.wp-block-embed__wrapper::before {\n\t\tpadding-top: 200%; // 2 / 1 * 100\n\t}\n`;\n\nconst EMPTY_ARRAY = [];\n\nconst Sandbox = forwardRef( function Sandbox(\n\t{\n\t\tcontainerStyle,\n\t\tcustomJS,\n\t\thtml = '',\n\t\tlang = 'en',\n\t\tproviderUrl = '',\n\t\tscripts = EMPTY_ARRAY,\n\t\tstyles = EMPTY_ARRAY,\n\t\ttitle = '',\n\t\ttype,\n\t\turl,\n\t\tonWindowEvents = {},\n\t\tviewportProps = '',\n\t\tonLoadEnd = () => {},\n\t\ttestID,\n\t},\n\tref\n) {\n\tconst colorScheme = usePreferredColorScheme();\n\tconst [ height, setHeight ] = useState( 0 );\n\tconst [ contentHtml, setContentHtml ] = useState( getHtmlDoc() );\n\n\tconst windowSize = Dimensions.get( 'window' );\n\tconst [ isLandscape, setIsLandscape ] = useState(\n\t\twindowSize.width >= windowSize.height\n\t);\n\tconst wasLandscape = useRef( isLandscape );\n\t// On Android, we need to recreate the WebView on any of the following actions, otherwise it disappears:\n\t// - Device rotation\n\t// - Light/dark mode changes\n\t// For this purpose, the key prop used in the WebView will be updated with the value of the actions.\n\tconst key = Platform.select( {\n\t\tandroid: `${ url }-${\n\t\t\tisLandscape ? 'landscape' : 'portrait'\n\t\t}-${ colorScheme }`,\n\t\tios: url,\n\t} );\n\n\tfunction getHtmlDoc() {\n\t\t// Put the html snippet into a html document, and update the state to refresh the WebView,\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\n\t\t// Avoid comma issues with props.viewportProps.\n\t\tconst addViewportProps = viewportProps\n\t\t\t.trim()\n\t\t\t.replace( /(^[^,])/, ', $1' );\n\n\t\tconst htmlDoc = (\n\t\t\t<html lang={ lang }>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<meta\n\t\t\t\t\t\tname=\"viewport\"\n\t\t\t\t\t\tcontent={ `width=device-width, initial-scale=1${ addViewportProps }` }\n\t\t\t\t\t></meta>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\t\treturn '<!DOCTYPE html>' + renderToString( htmlDoc );\n\t}\n\n\tconst getInjectedJavaScript = useCallback( () => {\n\t\t// Allow parent to override the resize observers with prop.customJS (legacy support)\n\t\tlet injectedJS = customJS || observeAndResizeJS;\n\n\t\t// Add any event listeners that were passed in.\n\t\tObject.keys( onWindowEvents ).forEach( ( eventType ) => {\n\t\t\tinjectedJS += `\n\t\t\t\twindow.addEventListener( '${ eventType }', function( event ) {\n\t\t\t\t\twindow.ReactNativeWebView.postMessage( JSON.stringify( { type: '${ eventType }', ...event.data } ) );\n\t\t\t\t});`;\n\t\t} );\n\n\t\treturn injectedJS;\n\t}, [ customJS, onWindowEvents ] );\n\n\tfunction updateContentHtml( forceRerender = false ) {\n\t\tconst newContentHtml = getHtmlDoc();\n\n\t\tif ( forceRerender && contentHtml === newContentHtml ) {\n\t\t\t// The re-render is forced by updating the state with empty HTML,\n\t\t\t// waiting for the JS code to be executed with \"setImmediate\" and then\n\t\t\t// setting the content HTML again.\n\t\t\tsetContentHtml( '' );\n\t\t\tsetImmediate( () => setContentHtml( newContentHtml ) );\n\t\t} else {\n\t\t\tsetContentHtml( newContentHtml );\n\t\t}\n\t}\n\n\tfunction getSizeStyle() {\n\t\tconst contentHeight = Math.ceil( height );\n\n\t\treturn contentHeight ? { height: contentHeight } : { aspectRatio: 1 };\n\t}\n\n\tfunction onChangeDimensions( dimensions ) {\n\t\tsetIsLandscape( dimensions.window.width >= dimensions.window.height );\n\t}\n\n\tconst onMessage = useCallback(\n\t\t( message ) => {\n\t\t\tlet data = message?.nativeEvent?.data;\n\n\t\t\ttry {\n\t\t\t\tdata = JSON.parse( data );\n\t\t\t} catch ( e ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// check for resize event\n\t\t\tif ( 'resize' === data?.action ) {\n\t\t\t\tsetHeight( data.height );\n\t\t\t}\n\n\t\t\t// Forward the event to parent event listeners\n\t\t\tObject.keys( onWindowEvents ).forEach( ( eventType ) => {\n\t\t\t\tif ( data?.type === eventType ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tonWindowEvents[ eventType ]( data );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t`Error handling event ${ eventType }`,\n\t\t\t\t\t\t\te\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[ onWindowEvents ]\n\t);\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonChangeDimensions\n\t\t);\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tupdateContentHtml();\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}, [ html, title, type, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\t// When device orientation changes we have to recalculate the size,\n\t\t// for this purpose we reset the current size value.\n\t\tif ( wasLandscape.current !== isLandscape ) {\n\t\t\tsetHeight( 0 );\n\t\t}\n\t\twasLandscape.current = isLandscape;\n\t}, [ isLandscape ] );\n\n\treturn (\n\t\t<WebView\n\t\t\tcontainerStyle={ [\n\t\t\t\tsandboxStyles[ 'sandbox-webview__container' ],\n\t\t\t\tcontainerStyle,\n\t\t\t] }\n\t\t\tinjectedJavaScript={ getInjectedJavaScript() }\n\t\t\tkey={ key }\n\t\t\tref={ ref }\n\t\t\tsource={ { baseUrl: providerUrl, html: contentHtml } }\n\t\t\t// Wildcard value is required for static HTML\n\t\t\t// Reference: https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#source\n\t\t\toriginWhitelist={ [ '*' ] }\n\t\t\tstyle={ [\n\t\t\t\tsandboxStyles[ 'sandbox-webview__content' ],\n\t\t\t\tgetSizeStyle(),\n\t\t\t\tPlatform.isAndroid && workaroundStyles.webView,\n\t\t\t] }\n\t\t\tonMessage={ onMessage }\n\t\t\tscrollEnabled={ false }\n\t\t\tsetBuiltInZoomControls={ false }\n\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\tshowsVerticalScrollIndicator={ false }\n\t\t\tmediaPlaybackRequiresUserAction={ false }\n\t\t\tonLoadEnd={ onLoadEnd }\n\t\t\ttestID={ testID }\n\t\t/>\n\t);\n} );\n\nconst workaroundStyles = StyleSheet.create( {\n\twebView: {\n\t\t/**\n\t\t * The slight opacity below is a workaround for an Android crash caused from combining Android\n\t\t * 12's new scroll overflow behavior and webviews.\n\t\t * https://github.com/react-native-webview/react-native-webview/issues/1915#issuecomment-808869253\n\t\t */\n\t\topacity: 0.99,\n\t},\n} );\n\nexport default memo( Sandbox );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,OAAO,QAAQ,sBAAsB;;AAE9C;AACA;AACA;AACA,SACCC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,WAAW,QACL,oBAAoB;AAC3B,SAASC,uBAAuB,QAAQ,oBAAoB;;AAE5D;AACA;AACA;AACA,OAAOC,aAAa,MAAM,cAAc;AAExC,MAAMC,kBAAkB,GAAI;AAC5B;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,KAAK,GAAI;AACf;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;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,CAAC;AAED,MAAMC,WAAW,GAAG,EAAE;AAEtB,MAAMC,OAAO,GAAGP,UAAU,CAAE,SAASO,OAAOA,CAC3C;EACCC,cAAc;EACdC,QAAQ;EACRC,IAAI,GAAG,EAAE;EACTC,IAAI,GAAG,IAAI;EACXC,WAAW,GAAG,EAAE;EAChBC,OAAO,GAAGP,WAAW;EACrBQ,MAAM,GAAGR,WAAW;EACpBS,KAAK,GAAG,EAAE;EACVC,IAAI;EACJC,GAAG;EACHC,cAAc,GAAG,CAAC,CAAC;EACnBC,aAAa,GAAG,EAAE;EAClBC,SAAS,GAAGA,CAAA,KAAM,CAAC,CAAC;EACpBC;AACD,CAAC,EACDC,GAAG,EACF;EACD,MAAMC,WAAW,GAAGrB,uBAAuB,CAAC,CAAC;EAC7C,MAAM,CAAEsB,MAAM,EAAEC,SAAS,CAA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AAE,MAAM;IAChB;IACA;IACA,IAAKmC,YAAY,CAACkD,OAAO,KAAKrD,WAAW,EAAG;MAC3CN,SAAS,CAAE,CAAE,CAAC;IACf;IACAS,YAAY,CAACkD,OAAO,GAAGrD,WAAW;EACnC,CAAC,EAAE,CAAEA,WAAW,CAAG,CAAC;EAEpB,OACCY,aAAA,CAAClD,OAAO;IACPe,cAAc,EAAG,CAChBL,aAAa,CAAE,4BAA4B,CAAE,EAC7CK,cAAc,CACZ;IACH6E,kBAAkB,EAAGhC,qBAAqB,CAAC,CAAG;IAC9ClB,GAAG,EAAGA,GAAK;IACXb,GAAG,EAAGA,GAAK;IACXgE,MAAM,EAAG;MAAEC,OAAO,EAAE3E,WAAW;MAAEF,IAAI,EAAEgB;IAAY;IACnD;IACA;IAAA;IACA8D,eAAe,EAAG,CAAE,GAAG,CAAI;IAC3BnF,KAAK,EAAG,CACPF,aAAa,CAAE,0BAA0B,CAAE,EAC3C4D,YAAY,CAAC,CAAC,EACdrE,QAAQ,CAAC+F,SAAS,IAAIC,gBAAgB,CAACC,OAAO,CAC5C;IACHpB,SAAS,EAAGA,SAAW;IACvBqB,aAAa,EAAG,KAAO;IACvBC,sBAAsB,EAAG,KAAO;IAChCC,8BAA8B,EAAG,KAAO;IACxCC,4BAA4B,EAAG,KAAO;IACtCC,+BAA+B,EAAG,KAAO;IACzC5E,SAAS,EAAGA,SAAW;IACvBC,MAAM,EAAGA;EAAQ,CACjB,CAAC;AAEJ,CAAE,CAAC;AAEH,MAAMqE,gBAAgB,GAAGlG,UAAU,CAACyG,MAAM,CAAE;EAC3CN,OAAO,EAAE;IACR;AACF;AACA;AACA;AACA;IACEO,OAAO,EAAE;EACV;AACD,CAAE,CAAC;AAEH,eAAetG,IAAI,CAAEW,OAAQ,CAAC"}
|
|
1
|
+
{"version":3,"names":["Dimensions","StyleSheet","WebView","Platform","renderToString","memo","useRef","useState","useEffect","forwardRef","useCallback","usePreferredColorScheme","sandboxStyles","observeAndResizeJS","style","EMPTY_ARRAY","Sandbox","containerStyle","customJS","html","lang","providerUrl","scripts","styles","title","type","url","onWindowEvents","viewportProps","onLoadEnd","testID","ref","colorScheme","height","setHeight","contentHtml","setContentHtml","getHtmlDoc","windowSize","get","isLandscape","setIsLandscape","width","wasLandscape","key","select","android","ios","addViewportProps","trim","replace","htmlDoc","createElement","name","content","dangerouslySetInnerHTML","__html","map","rules","i","className","src","getInjectedJavaScript","injectedJS","Object","keys","forEach","eventType","updateContentHtml","forceRerender","newContentHtml","setImmediate","getSizeStyle","contentHeight","Math","ceil","aspectRatio","onChangeDimensions","dimensions","window","onMessage","message","data","nativeEvent","JSON","parse","e","action","console","warn","dimensionsChangeSubscription","addEventListener","remove","current","injectedJavaScript","source","baseUrl","originWhitelist","isAndroid","workaroundStyles","webView","scrollEnabled","setBuiltInZoomControls","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","mediaPlaybackRequiresUserAction","create","opacity"],"sources":["@wordpress/components/src/sandbox/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Dimensions, StyleSheet } from 'react-native';\nimport { WebView } from 'react-native-webview';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tPlatform,\n\trenderToString,\n\tmemo,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n\tforwardRef,\n\tuseCallback,\n} from '@wordpress/element';\nimport { usePreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport sandboxStyles from './style.scss';\n\nconst observeAndResizeJS = `\n\t(function() {\n\t\tconst { MutationObserver } = window;\n\n\t\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfunction sendResize() {\n\t\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\t\t// The function postMessage is exposed by the react-native-webview library\n\t\t\t// to communicate between React Native and the WebView, in this case,\n\t\t\t// we use it for notifying resize changes.\n\t\t\twindow.ReactNativeWebView.postMessage(\n\t\t\t\tJSON.stringify( {\n\t\t\t\t\taction: 'resize',\n\t\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\t\theight: clientBoundingRect.height,\n\t\t\t\t} )\n\t\t\t);\n\t\t}\n\n\t\tconst observer = new MutationObserver( sendResize );\n\t\tobserver.observe( document.body, {\n\t\t\tattributes: true,\n\t\t\tattributeOldValue: false,\n\t\t\tcharacterData: true,\n\t\t\tcharacterDataOldValue: false,\n\t\t\tchildList: true,\n\t\t\tsubtree: true,\n\t\t} );\n\n\t\twindow.addEventListener( 'load', sendResize, true );\n\n\t\t// Hack: Remove viewport unit styles, as these are relative\n\t\t// the iframe root and interfere with our mechanism for\n\t\t// determining the unconstrained page bounds.\n\t\tfunction removeViewportStyles( ruleOrNode ) {\n\t\t\tif ( ruleOrNode.style ) {\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ].forEach( function (\n\t\t\t\t\tstyle\n\t\t\t\t) {\n\t\t\t\t\tif (\n\t\t\t\t\t\t/^\\\\d+(vw|vh|svw|lvw|dvw|svh|lvh|dvh|vi|svi|lvi|dvi|vb|svb|lvb|dvb|vmin|svmin|lvmin|dvmin|vmax|svmax|lvmax|dvmax)$/.test( ruleOrNode.style[ style ] )\n\t\t\t\t\t) {\n\t\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t}\n\n\t\tArray.prototype.forEach.call(\n\t\t\tdocument.querySelectorAll( '[style]' ),\n\t\t\tremoveViewportStyles\n\t\t);\n\t\tArray.prototype.forEach.call(\n\t\t\tdocument.styleSheets,\n\t\t\tfunction ( stylesheet ) {\n\t\t\t\tArray.prototype.forEach.call(\n\t\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\t\tremoveViewportStyles\n\t\t\t\t);\n\t\t\t}\n\t\t);\n\n\t\tdocument.body.style.position = 'absolute';\n\t\tdocument.body.style.width = '100%';\n\t\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\t\tsendResize();\n\n\t\t// Resize events can change the width of elements with 100% width, but we don't\n\t\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\t\twindow.addEventListener( 'resize', sendResize, true );\n\t\twindow.addEventListener( 'orientationchange', sendResize, true );\n\t})();\n`;\n\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div,\n\tbody > div iframe {\n\t\twidth: 100%;\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n\n\t.wp-block-embed__wrapper {\n\t\tposition: relative;\n\t}\n\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\n\t/**\n\t * Add responsiveness to embeds with aspect ratios.\n\t *\n\t * These styles have been copied from the web version (https://github.com/WordPress/gutenberg/blob/7901895ca20cf61e402925e31571d659dab64721/packages/block-library/src/embed/style.scss#L42-L89) and\n\t * adapted for the native version.\n\t */\n\t.wp-has-aspect-ratio.wp-block-embed__wrapper::before {\n\t\tcontent: \"\";\n\t\tdisplay: block;\n\t\tpadding-top: 50%; // Default to 2:1 aspect ratio.\n\t}\n\t.wp-has-aspect-ratio iframe {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t}\n\t.wp-embed-aspect-21-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 42.85%; // 9 / 21 * 100\n\t}\n\t.wp-embed-aspect-18-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 50%; // 9 / 18 * 100\n\t}\n\t.wp-embed-aspect-16-9.wp-block-embed__wrapper::before {\n\t\tpadding-top: 56.25%; // 9 / 16 * 100\n\t}\n\t.wp-embed-aspect-4-3.wp-block-embed__wrapper::before {\n\t\tpadding-top: 75%; // 3 / 4 * 100\n\t}\n\t.wp-embed-aspect-1-1.wp-block-embed__wrapper::before {\n\t\tpadding-top: 100%; // 1 / 1 * 100\n\t}\n\t.wp-embed-aspect-9-16.wp-block-embed__wrapper::before {\n\t\tpadding-top: 177.77%; // 16 / 9 * 100\n\t}\n\t.wp-embed-aspect-1-2.wp-block-embed__wrapper::before {\n\t\tpadding-top: 200%; // 2 / 1 * 100\n\t}\n`;\n\nconst EMPTY_ARRAY = [];\n\nconst Sandbox = forwardRef( function Sandbox(\n\t{\n\t\tcontainerStyle,\n\t\tcustomJS,\n\t\thtml = '',\n\t\tlang = 'en',\n\t\tproviderUrl = '',\n\t\tscripts = EMPTY_ARRAY,\n\t\tstyles = EMPTY_ARRAY,\n\t\ttitle = '',\n\t\ttype,\n\t\turl,\n\t\tonWindowEvents = {},\n\t\tviewportProps = '',\n\t\tonLoadEnd = () => {},\n\t\ttestID,\n\t},\n\tref\n) {\n\tconst colorScheme = usePreferredColorScheme();\n\tconst [ height, setHeight ] = useState( 0 );\n\tconst [ contentHtml, setContentHtml ] = useState( getHtmlDoc() );\n\n\tconst windowSize = Dimensions.get( 'window' );\n\tconst [ isLandscape, setIsLandscape ] = useState(\n\t\twindowSize.width >= windowSize.height\n\t);\n\tconst wasLandscape = useRef( isLandscape );\n\t// On Android, we need to recreate the WebView on any of the following actions, otherwise it disappears:\n\t// - Device rotation\n\t// - Light/dark mode changes\n\t// For this purpose, the key prop used in the WebView will be updated with the value of the actions.\n\tconst key = Platform.select( {\n\t\tandroid: `${ url }-${\n\t\t\tisLandscape ? 'landscape' : 'portrait'\n\t\t}-${ colorScheme }`,\n\t\tios: url,\n\t} );\n\n\tfunction getHtmlDoc() {\n\t\t// Put the html snippet into a html document, and update the state to refresh the WebView,\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\n\t\t// Avoid comma issues with props.viewportProps.\n\t\tconst addViewportProps = viewportProps\n\t\t\t.trim()\n\t\t\t.replace( /(^[^,])/, ', $1' );\n\n\t\tconst htmlDoc = (\n\t\t\t<html lang={ lang }>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<meta\n\t\t\t\t\t\tname=\"viewport\"\n\t\t\t\t\t\tcontent={ `width=device-width, initial-scale=1${ addViewportProps }` }\n\t\t\t\t\t></meta>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\t\treturn '<!DOCTYPE html>' + renderToString( htmlDoc );\n\t}\n\n\tconst getInjectedJavaScript = useCallback( () => {\n\t\t// Allow parent to override the resize observers with prop.customJS (legacy support)\n\t\tlet injectedJS = customJS || observeAndResizeJS;\n\n\t\t// Add any event listeners that were passed in.\n\t\tObject.keys( onWindowEvents ).forEach( ( eventType ) => {\n\t\t\tinjectedJS += `\n\t\t\t\twindow.addEventListener( '${ eventType }', function( event ) {\n\t\t\t\t\twindow.ReactNativeWebView.postMessage( JSON.stringify( { type: '${ eventType }', ...event.data } ) );\n\t\t\t\t});`;\n\t\t} );\n\n\t\treturn injectedJS;\n\t}, [ customJS, onWindowEvents ] );\n\n\tfunction updateContentHtml( forceRerender = false ) {\n\t\tconst newContentHtml = getHtmlDoc();\n\n\t\tif ( forceRerender && contentHtml === newContentHtml ) {\n\t\t\t// The re-render is forced by updating the state with empty HTML,\n\t\t\t// waiting for the JS code to be executed with \"setImmediate\" and then\n\t\t\t// setting the content HTML again.\n\t\t\tsetContentHtml( '' );\n\t\t\tsetImmediate( () => setContentHtml( newContentHtml ) );\n\t\t} else {\n\t\t\tsetContentHtml( newContentHtml );\n\t\t}\n\t}\n\n\tfunction getSizeStyle() {\n\t\tconst contentHeight = Math.ceil( height );\n\n\t\treturn contentHeight ? { height: contentHeight } : { aspectRatio: 1 };\n\t}\n\n\tfunction onChangeDimensions( dimensions ) {\n\t\tsetIsLandscape( dimensions.window.width >= dimensions.window.height );\n\t}\n\n\tconst onMessage = useCallback(\n\t\t( message ) => {\n\t\t\tlet data = message?.nativeEvent?.data;\n\n\t\t\ttry {\n\t\t\t\tdata = JSON.parse( data );\n\t\t\t} catch ( e ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// check for resize event\n\t\t\tif ( 'resize' === data?.action ) {\n\t\t\t\tsetHeight( data.height );\n\t\t\t}\n\n\t\t\t// Forward the event to parent event listeners\n\t\t\tObject.keys( onWindowEvents ).forEach( ( eventType ) => {\n\t\t\t\tif ( data?.type === eventType ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tonWindowEvents[ eventType ]( data );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t// eslint-disable-next-line no-console\n\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t`Error handling event ${ eventType }`,\n\t\t\t\t\t\t\te\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\t[ onWindowEvents ]\n\t);\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonChangeDimensions\n\t\t);\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tupdateContentHtml();\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}, [ html, title, type, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\t// When device orientation changes we have to recalculate the size,\n\t\t// for this purpose we reset the current size value.\n\t\tif ( wasLandscape.current !== isLandscape ) {\n\t\t\tsetHeight( 0 );\n\t\t}\n\t\twasLandscape.current = isLandscape;\n\t}, [ isLandscape ] );\n\n\treturn (\n\t\t<WebView\n\t\t\tcontainerStyle={ [\n\t\t\t\tsandboxStyles[ 'sandbox-webview__container' ],\n\t\t\t\tcontainerStyle,\n\t\t\t] }\n\t\t\tinjectedJavaScript={ getInjectedJavaScript() }\n\t\t\tkey={ key }\n\t\t\tref={ ref }\n\t\t\tsource={ { baseUrl: providerUrl, html: contentHtml } }\n\t\t\t// Wildcard value is required for static HTML\n\t\t\t// Reference: https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#source\n\t\t\toriginWhitelist={ [ '*' ] }\n\t\t\tstyle={ [\n\t\t\t\tsandboxStyles[ 'sandbox-webview__content' ],\n\t\t\t\tgetSizeStyle(),\n\t\t\t\tPlatform.isAndroid && workaroundStyles.webView,\n\t\t\t] }\n\t\t\tonMessage={ onMessage }\n\t\t\tscrollEnabled={ false }\n\t\t\tsetBuiltInZoomControls={ false }\n\t\t\tshowsHorizontalScrollIndicator={ false }\n\t\t\tshowsVerticalScrollIndicator={ false }\n\t\t\tmediaPlaybackRequiresUserAction={ false }\n\t\t\tonLoadEnd={ onLoadEnd }\n\t\t\ttestID={ testID }\n\t\t/>\n\t);\n} );\n\nconst workaroundStyles = StyleSheet.create( {\n\twebView: {\n\t\t/**\n\t\t * The slight opacity below is a workaround for an Android crash caused from combining Android\n\t\t * 12's new scroll overflow behavior and webviews.\n\t\t * https://github.com/react-native-webview/react-native-webview/issues/1915#issuecomment-808869253\n\t\t */\n\t\topacity: 0.99,\n\t},\n} );\n\nexport default memo( Sandbox );\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,UAAU,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,OAAO,QAAQ,sBAAsB;;AAE9C;AACA;AACA;AACA,SACCC,QAAQ,EACRC,cAAc,EACdC,IAAI,EACJC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,UAAU,EACVC,WAAW,QACL,oBAAoB;AAC3B,SAASC,uBAAuB,QAAQ,oBAAoB;;AAE5D;AACA;AACA;AACA,OAAOC,aAAa,MAAM,cAAc;AAExC,MAAMC,kBAAkB,GAAI;AAC5B;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;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAED,MAAMC,KAAK,GAAI;AACf;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;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,CAAC;AAED,MAAMC,WAAW,GAAG,EAAE;AAEtB,MAAMC,OAAO,GAAGP,UAAU,CAAE,SAASO,OAAOA,CAC3C;EACCC,cAAc;EACdC,QAAQ;EACRC,IAAI,GAAG,EAAE;EACTC,IAA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IACvBC,MAAM,EAAGA;EAAQ,CACjB,CAAC;AAEJ,CAAE,CAAC;AAEH,MAAMqE,gBAAgB,GAAGlG,UAAU,CAACyG,MAAM,CAAE;EAC3CN,OAAO,EAAE;IACR;AACF;AACA;AACA;AACA;IACEO,OAAO,EAAE;EACV;AACD,CAAE,CAAC;AAEH,eAAetG,IAAI,CAAEW,OAAQ,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/sandbox/types.ts"],"sourcesContent":["export type SandBoxProps = {\n\t/**\n\t * The HTML to render in the body of the iframe document.\n\t *\n\t * @default ''\n\t */\n\thtml?: string;\n\t/**\n\t * The `<title>` of the iframe document.\n\t *\n\t * @default ''\n\t */\n\ttitle?: string;\n\t/**\n\t * The CSS class name to apply to the `<html>` and `<body>` elements of the iframe.\n\t */\n\ttype?: string;\n\t/**\n\t * An array of CSS strings to inject into the `<head>` of the iframe document.\n\t *\n\t * @default []\n\t */\n\tstyles?: string[];\n\t/**\n\t * An array of script URLs to inject as `<script>` tags into the bottom of the `<body>` of the iframe document.\n\t *\n\t * @default []\n\t */\n\tscripts?: string[];\n\t/**\n\t * The `onFocus` callback for the iframe.\n\t */\n\tonFocus?: React.DOMAttributes< HTMLIFrameElement >[ 'onFocus' ];\n\t/**\n\t * The `tabindex` the iframe should receive.\n\t *\n\t * @default 0\n\t */\n\ttabIndex?: HTMLElement[ 'tabIndex' ];\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/sandbox/types.ts"],"sourcesContent":["export type SandBoxProps = {\n\t/**\n\t * The HTML to render in the body of the iframe document.\n\t *\n\t * @default ''\n\t */\n\thtml?: string;\n\t/**\n\t * The `<title>` of the iframe document.\n\t *\n\t * @default ''\n\t */\n\ttitle?: string;\n\t/**\n\t * The CSS class name to apply to the `<html>` and `<body>` elements of the iframe.\n\t */\n\ttype?: string;\n\t/**\n\t * An array of CSS strings to inject into the `<head>` of the iframe document.\n\t *\n\t * @default []\n\t */\n\tstyles?: string[];\n\t/**\n\t * An array of script URLs to inject as `<script>` tags into the bottom of the `<body>` of the iframe document.\n\t *\n\t * @default []\n\t */\n\tscripts?: string[];\n\t/**\n\t * The `onFocus` callback for the iframe.\n\t */\n\tonFocus?: React.DOMAttributes< HTMLIFrameElement >[ 'onFocus' ];\n\t/**\n\t * The `tabindex` the iframe should receive.\n\t *\n\t * @default 0\n\t */\n\ttabIndex?: HTMLElement[ 'tabIndex' ];\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","previousScrollTop","setLocked","locked","scrollingElement","document","body","scrollTop","methodName","classList","documentElement","lockCounter","ScrollLock"],"sources":["@wordpress/components/src/scroll-lock/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/*\n * Setting `overflow: hidden` on html and body elements resets body scroll in iOS.\n * Save scroll top so we can restore it after locking scroll.\n *\n * NOTE: It would be cleaner and possibly safer to find a localized solution such\n * as preventing default on certain touchmove events.\n */\nlet previousScrollTop = 0;\n\nfunction setLocked( locked: boolean ) {\n\tconst scrollingElement = document.scrollingElement || document.body;\n\n\tif ( locked ) {\n\t\tpreviousScrollTop = scrollingElement.scrollTop;\n\t}\n\n\tconst methodName = locked ? 'add' : 'remove';\n\tscrollingElement.classList[ methodName ]( 'lockscroll' );\n\n\t// Adding the class to the document element seems to be necessary in iOS.\n\tdocument.documentElement.classList[ methodName ]( 'lockscroll' );\n\n\tif ( ! locked ) {\n\t\tscrollingElement.scrollTop = previousScrollTop;\n\t}\n}\n\nlet lockCounter = 0;\n\n/**\n * ScrollLock is a content-free React component for declaratively preventing\n * scroll bleed from modal UI to the page body. This component applies a\n * `lockscroll` class to the `document.documentElement` and\n * `document.scrollingElement` elements to stop the body from scrolling. When it\n * is present, the lock is applied.\n *\n * ```jsx\n * import { ScrollLock, Button } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyScrollLock = () => {\n * const [ isScrollLocked, setIsScrollLocked ] = useState( false );\n *\n * const toggleLock = () => {\n * setIsScrollLocked( ( locked ) => ! locked ) );\n * };\n *\n * return (\n * <div>\n * <Button variant=\"secondary\" onClick={ toggleLock }>\n * Toggle scroll lock\n * </Button>\n * { isScrollLocked && <ScrollLock /> }\n * <p>\n * Scroll locked:\n * <strong>{ isScrollLocked ? 'Yes' : 'No' }</strong>\n * </p>\n * </div>\n * );\n * };\n * ```\n */\nexport function ScrollLock(): null {\n\tuseEffect( () => {\n\t\tif ( lockCounter === 0 ) {\n\t\t\tsetLocked( true );\n\t\t}\n\n\t\t++lockCounter;\n\n\t\treturn () => {\n\t\t\tif ( lockCounter === 1 ) {\n\t\t\t\tsetLocked( false );\n\t\t\t}\n\n\t\t\t--lockCounter;\n\t\t};\n\t}, [] );\n\n\treturn null;\n}\n\nexport default ScrollLock;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,iBAAiB,GAAG,CAAC;AAEzB,SAASC,SAASA,CAAEC,MAAe,EAAG;EACrC,MAAMC,gBAAgB,GAAGC,QAAQ,CAACD,gBAAgB,IAAIC,QAAQ,CAACC,IAAI;EAEnE,IAAKH,MAAM,EAAG;IACbF,iBAAiB,GAAGG,gBAAgB,CAACG,SAAS;EAC/C;EAEA,MAAMC,UAAU,GAAGL,MAAM,GAAG,KAAK,GAAG,QAAQ;EAC5CC,gBAAgB,CAACK,SAAS,CAAED,UAAU,CAAE,CAAE,YAAa,CAAC;;EAExD;EACAH,QAAQ,CAACK,eAAe,CAACD,SAAS,CAAED,UAAU,CAAE,CAAE,YAAa,CAAC;EAEhE,IAAK,CAAEL,MAAM,EAAG;IACfC,gBAAgB,CAACG,SAAS,GAAGN,iBAAiB;EAC/C;AACD;AAEA,IAAIU,WAAW,GAAG,CAAC;;AAEnB;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,OAAO,SAASC,UAAUA,CAAA,EAAS;EAClCZ,SAAS,CAAE,MAAM;IAChB,IAAKW,WAAW,KAAK,CAAC,EAAG;MACxBT,SAAS,CAAE,IAAK,CAAC;IAClB;IAEA,EAAES,WAAW;IAEb,OAAO,MAAM;MACZ,IAAKA,WAAW,KAAK,CAAC,EAAG;QACxBT,SAAS,CAAE,KAAM,CAAC;MACnB;MAEA,EAAES,WAAW;IACd,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OAAO,IAAI;AACZ;AAEA,eAAeC,UAAU"}
|
|
1
|
+
{"version":3,"names":["useEffect","previousScrollTop","setLocked","locked","scrollingElement","document","body","scrollTop","methodName","classList","documentElement","lockCounter","ScrollLock"],"sources":["@wordpress/components/src/scroll-lock/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\n\n/*\n * Setting `overflow: hidden` on html and body elements resets body scroll in iOS.\n * Save scroll top so we can restore it after locking scroll.\n *\n * NOTE: It would be cleaner and possibly safer to find a localized solution such\n * as preventing default on certain touchmove events.\n */\nlet previousScrollTop = 0;\n\nfunction setLocked( locked: boolean ) {\n\tconst scrollingElement = document.scrollingElement || document.body;\n\n\tif ( locked ) {\n\t\tpreviousScrollTop = scrollingElement.scrollTop;\n\t}\n\n\tconst methodName = locked ? 'add' : 'remove';\n\tscrollingElement.classList[ methodName ]( 'lockscroll' );\n\n\t// Adding the class to the document element seems to be necessary in iOS.\n\tdocument.documentElement.classList[ methodName ]( 'lockscroll' );\n\n\tif ( ! locked ) {\n\t\tscrollingElement.scrollTop = previousScrollTop;\n\t}\n}\n\nlet lockCounter = 0;\n\n/**\n * ScrollLock is a content-free React component for declaratively preventing\n * scroll bleed from modal UI to the page body. This component applies a\n * `lockscroll` class to the `document.documentElement` and\n * `document.scrollingElement` elements to stop the body from scrolling. When it\n * is present, the lock is applied.\n *\n * ```jsx\n * import { ScrollLock, Button } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyScrollLock = () => {\n * const [ isScrollLocked, setIsScrollLocked ] = useState( false );\n *\n * const toggleLock = () => {\n * setIsScrollLocked( ( locked ) => ! locked ) );\n * };\n *\n * return (\n * <div>\n * <Button variant=\"secondary\" onClick={ toggleLock }>\n * Toggle scroll lock\n * </Button>\n * { isScrollLocked && <ScrollLock /> }\n * <p>\n * Scroll locked:\n * <strong>{ isScrollLocked ? 'Yes' : 'No' }</strong>\n * </p>\n * </div>\n * );\n * };\n * ```\n */\nexport function ScrollLock(): null {\n\tuseEffect( () => {\n\t\tif ( lockCounter === 0 ) {\n\t\t\tsetLocked( true );\n\t\t}\n\n\t\t++lockCounter;\n\n\t\treturn () => {\n\t\t\tif ( lockCounter === 1 ) {\n\t\t\t\tsetLocked( false );\n\t\t\t}\n\n\t\t\t--lockCounter;\n\t\t};\n\t}, [] );\n\n\treturn null;\n}\n\nexport default ScrollLock;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,SAAS,QAAQ,oBAAoB;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,iBAAiB,GAAG,CAAC;AAEzB,SAASC,SAASA,CAAEC,MAAe,EAAG;EACrC,MAAMC,gBAAgB,GAAGC,QAAQ,CAACD,gBAAgB,IAAIC,QAAQ,CAACC,IAAI;EAEnE,IAAKH,MAAM,EAAG;IACbF,iBAAiB,GAAGG,gBAAgB,CAACG,SAAS;EAC/C;EAEA,MAAMC,UAAU,GAAGL,MAAM,GAAG,KAAK,GAAG,QAAQ;EAC5CC,gBAAgB,CAACK,SAAS,CAAED,UAAU,CAAE,CAAE,YAAa,CAAC;;EAExD;EACAH,QAAQ,CAACK,eAAe,CAACD,SAAS,CAAED,UAAU,CAAE,CAAE,YAAa,CAAC;EAEhE,IAAK,CAAEL,MAAM,EAAG;IACfC,gBAAgB,CAACG,SAAS,GAAGN,iBAAiB;EAC/C;AACD;AAEA,IAAIU,WAAW,GAAG,CAAC;;AAEnB;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,OAAO,SAASC,UAAUA,CAAA,EAAS;EAClCZ,SAAS,CAAE,MAAM;IAChB,IAAKW,WAAW,KAAK,CAAC,EAAG;MACxBT,SAAS,CAAE,IAAK,CAAC;IAClB;IAEA,EAAES,WAAW;IAEb,OAAO,MAAM;MACZ,IAAKA,WAAW,KAAK,CAAC,EAAG;QACxBT,SAAS,CAAE,KAAM,CAAC;MACnB;MAEA,EAAES,WAAW;IACd,CAAC;EACF,CAAC,EAAE,EAAG,CAAC;EAEP,OAAO,IAAI;AACZ;AAEA,eAAeC,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["contextConnect","View","useScrollable","UnconnectedScrollable","props","forwardedRef","scrollableProps","createElement","ref","Scrollable"],"sources":["@wordpress/components/src/scrollable/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useScrollable } from './hook';\nimport type { ScrollableProps } from './types';\n\nfunction UnconnectedScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst scrollableProps = useScrollable( props );\n\n\treturn <View { ...scrollableProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Scrollable` is a layout component that content in a scrollable container.\n *\n * ```jsx\n * import { __experimentalScrollable as Scrollable } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Scrollable style={ { maxHeight: 200 } }>\n * \t\t\t<div style={ { height: 500 } }>...</div>\n * \t\t</Scrollable>\n * \t);\n * }\n * ```\n */\nexport const Scrollable = contextConnect( UnconnectedScrollable, 'Scrollable' );\n\nexport default Scrollable;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,YAAY;AAC3C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,aAAa,QAAQ,QAAQ;AAGtC,SAASC,qBAAqBA,CAC7BC,KAAwD,EACxDC,YAAiC,EAChC;EACD,MAAMC,eAAe,GAAGJ,aAAa,CAAEE,KAAM,CAAC;EAE9C,OAAOG,aAAA,CAACN,IAAI;IAAA,GAAMK,eAAe;IAAGE,GAAG,EAAGH;EAAc,CAAE,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,UAAU,GAAGT,cAAc,CAAEG,qBAAqB,EAAE,YAAa,CAAC;AAE/E,eAAeM,UAAU"}
|
|
1
|
+
{"version":3,"names":["contextConnect","View","useScrollable","UnconnectedScrollable","props","forwardedRef","scrollableProps","createElement","ref","Scrollable"],"sources":["@wordpress/components/src/scrollable/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { contextConnect } from '../context';\nimport { View } from '../view';\nimport { useScrollable } from './hook';\nimport type { ScrollableProps } from './types';\n\nfunction UnconnectedScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst scrollableProps = useScrollable( props );\n\n\treturn <View { ...scrollableProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Scrollable` is a layout component that content in a scrollable container.\n *\n * ```jsx\n * import { __experimentalScrollable as Scrollable } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Scrollable style={ { maxHeight: 200 } }>\n * \t\t\t<div style={ { height: 500 } }>...</div>\n * \t\t</Scrollable>\n * \t);\n * }\n * ```\n */\nexport const Scrollable = contextConnect( UnconnectedScrollable, 'Scrollable' );\n\nexport default Scrollable;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;;AAEA,SAASA,cAAc,QAAQ,YAAY;AAC3C,SAASC,IAAI,QAAQ,SAAS;AAC9B,SAASC,aAAa,QAAQ,QAAQ;AAGtC,SAASC,qBAAqBA,CAC7BC,KAAwD,EACxDC,YAAiC,EAChC;EACD,MAAMC,eAAe,GAAGJ,aAAa,CAAEE,KAAM,CAAC;EAE9C,OAAOG,aAAA,CAACN,IAAI;IAAA,GAAMK,eAAe;IAAGE,GAAG,EAAGH;EAAc,CAAE,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,UAAU,GAAGT,cAAc,CAAEG,qBAAqB,EAAE,YAAa,CAAC;AAE/E,eAAeM,UAAU","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useContextSystem","styles","useCx","useScrollable","props","className","scrollDirection","smoothScroll","otherProps","cx","classes","Scrollable","scrollableScrollbar","scrollX","scrollY","scrollAuto"],"sources":["@wordpress/components/src/scrollable/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { ScrollableProps } from './types';\n\nexport function useScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tscrollDirection = 'y',\n\t\tsmoothScroll = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Scrollable' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Scrollable,\n\t\t\t\tstyles.scrollableScrollbar,\n\t\t\t\tsmoothScroll && styles.smoothScroll,\n\t\t\t\tscrollDirection === 'x' && styles.scrollX,\n\t\t\t\tscrollDirection === 'y' && styles.scrollY,\n\t\t\t\tscrollDirection === 'auto' && styles.scrollAuto,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, scrollDirection, smoothScroll ]\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;;AAEA,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,KAAK,QAAQ,uBAAuB;AAG7C,OAAO,SAASC,aAAaA,CAC5BC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,eAAe,GAAG,GAAG;IACrBC,YAAY,GAAG,KAAK;IACpB,GAAGC;EACJ,CAAC,GAAGR,gBAAgB,CAAEI,KAAK,EAAE,YAAa,CAAC;EAE3C,MAAMK,EAAE,GAAGP,KAAK,CAAC,CAAC;EAElB,MAAMQ,OAAO,GAAGX,OAAO,CACtB,MACCU,EAAE,CACDR,MAAM,CAACU,UAAU,EACjBV,MAAM,CAACW,mBAAmB,EAC1BL,YAAY,IAAIN,MAAM,CAACM,YAAY,EACnCD,eAAe,KAAK,GAAG,IAAIL,MAAM,CAACY,OAAO,EACzCP,eAAe,KAAK,GAAG,IAAIL,MAAM,CAACa,OAAO,EACzCR,eAAe,KAAK,MAAM,IAAIL,MAAM,CAACc,UAAU,EAC/CV,SACD,CAAC,EACF,CAAEA,SAAS,EAAEI,EAAE,EAAEH,eAAe,EAAEC,YAAY,CAC/C,CAAC;EAED,OAAO;IAAE,GAAGC,UAAU;IAAEH,SAAS,EAAEK;EAAQ,CAAC;AAC7C"}
|
|
1
|
+
{"version":3,"names":["useMemo","useContextSystem","styles","useCx","useScrollable","props","className","scrollDirection","smoothScroll","otherProps","cx","classes","Scrollable","scrollableScrollbar","scrollX","scrollY","scrollAuto"],"sources":["@wordpress/components/src/scrollable/hook.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { useContextSystem } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../utils/hooks/use-cx';\nimport type { ScrollableProps } from './types';\n\nexport function useScrollable(\n\tprops: WordPressComponentProps< ScrollableProps, 'div' >\n) {\n\tconst {\n\t\tclassName,\n\t\tscrollDirection = 'y',\n\t\tsmoothScroll = false,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Scrollable' );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.Scrollable,\n\t\t\t\tstyles.scrollableScrollbar,\n\t\t\t\tsmoothScroll && styles.smoothScroll,\n\t\t\t\tscrollDirection === 'x' && styles.scrollX,\n\t\t\t\tscrollDirection === 'y' && styles.scrollY,\n\t\t\t\tscrollDirection === 'auto' && styles.scrollAuto,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx, scrollDirection, smoothScroll ]\n\t);\n\n\treturn { ...otherProps, className: classes };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,OAAO,QAAQ,oBAAoB;;AAE5C;AACA;AACA;;AAEA,SAASC,gBAAgB,QAAQ,YAAY;AAC7C,OAAO,KAAKC,MAAM,MAAM,UAAU;AAClC,SAASC,KAAK,QAAQ,uBAAuB;AAG7C,OAAO,SAASC,aAAaA,CAC5BC,KAAwD,EACvD;EACD,MAAM;IACLC,SAAS;IACTC,eAAe,GAAG,GAAG;IACrBC,YAAY,GAAG,KAAK;IACpB,GAAGC;EACJ,CAAC,GAAGR,gBAAgB,CAAEI,KAAK,EAAE,YAAa,CAAC;EAE3C,MAAMK,EAAE,GAAGP,KAAK,CAAC,CAAC;EAElB,MAAMQ,OAAO,GAAGX,OAAO,CACtB,MACCU,EAAE,CACDR,MAAM,CAACU,UAAU,EACjBV,MAAM,CAACW,mBAAmB,EAC1BL,YAAY,IAAIN,MAAM,CAACM,YAAY,EACnCD,eAAe,KAAK,GAAG,IAAIL,MAAM,CAACY,OAAO,EACzCP,eAAe,KAAK,GAAG,IAAIL,MAAM,CAACa,OAAO,EACzCR,eAAe,KAAK,MAAM,IAAIL,MAAM,CAACc,UAAU,EAC/CV,SACD,CAAC,EACF,CAAEA,SAAS,EAAEI,EAAE,EAAEH,eAAe,EAAEC,YAAY,CAC/C,CAAC;EAED,OAAO;IAAE,GAAGC,UAAU;IAAEH,SAAS,EAAEK;EAAQ,CAAC;AAC7C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","Scrollable"],"sources":["@wordpress/components/src/scrollable/index.ts"],"sourcesContent":["export { default as Scrollable } from './component';\n\nexport * from './hook';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,aAAa;AAEnD,cAAc,QAAQ"}
|
|
1
|
+
{"version":3,"names":["default","Scrollable"],"sources":["@wordpress/components/src/scrollable/index.ts"],"sourcesContent":["export { default as Scrollable } from './component';\n\nexport * from './hook';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,UAAU,QAAQ,aAAa;AAEnD,cAAc,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["css","CONFIG","scrollableScrollbar","colorScrollbarTrack","colorScrollbarThumb","colorScrollbarThumbHover","process","env","NODE_ENV","Scrollable","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","Content","smoothScroll","scrollX","scrollY","scrollAuto"],"sources":["@wordpress/components/src/scrollable/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\n\nexport const scrollableScrollbar = css`\n\t@media only screen and ( min-device-width: 40em ) {\n\t\t&::-webkit-scrollbar {\n\t\t\theight: 12px;\n\t\t\twidth: 12px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground: ${ CONFIG.colorScrollbarTrack };\n\t\t\tborder-radius: 8px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-thumb {\n\t\t\tbackground-clip: padding-box;\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumb };\n\t\t\tborder: 2px solid rgba( 0, 0, 0, 0 );\n\t\t\tborder-radius: 7px;\n\t\t}\n\n\t\t&:hover::-webkit-scrollbar-thumb {\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumbHover };\n\t\t}\n\t}\n`;\n\nexport const Scrollable = css`\n\theight: 100%;\n`;\n\nexport const Content = css`\n\tposition: relative;\n`;\n\nexport const smoothScroll = css`\n\tscroll-behavior: smooth;\n`;\n\nexport const scrollX = css`\n\toverflow-x: auto;\n\toverflow-y: hidden;\n`;\n\nexport const scrollY = css`\n\toverflow-x: hidden;\n\toverflow-y: auto;\n`;\n\nexport const scrollAuto = css`\n\toverflow-y: auto;\n`;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,UAAU;AAEjC,OAAO,MAAMC,mBAAmB,gBAAGF,GAAG,mMAYpBC,MAAM,CAACE,mBAAmB,kGAMpBF,MAAM,CAACG,mBAAmB,gHAM1BH,MAAM,CAACI,wBAAwB,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,yDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,29DAGtD;AAED,OAAO,MAAMC,UAAU,GAAAH,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEtB;AAED,OAAO,MAAMC,OAAO,GAAAT,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEnB;AAED,OAAO,MAAME,YAAY,GAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAExB;AAED,OAAO,MAAMG,OAAO,GAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGnB;AAED,OAAO,MAAMI,OAAO,GAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGnB;AAED,OAAO,MAAMK,UAAU,GAAAb,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEtB"}
|
|
1
|
+
{"version":3,"names":["css","CONFIG","scrollableScrollbar","colorScrollbarTrack","colorScrollbarThumb","colorScrollbarThumbHover","process","env","NODE_ENV","Scrollable","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","Content","smoothScroll","scrollX","scrollY","scrollAuto"],"sources":["@wordpress/components/src/scrollable/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\n\nexport const scrollableScrollbar = css`\n\t@media only screen and ( min-device-width: 40em ) {\n\t\t&::-webkit-scrollbar {\n\t\t\theight: 12px;\n\t\t\twidth: 12px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground-color: transparent;\n\t\t}\n\n\t\t&::-webkit-scrollbar-track {\n\t\t\tbackground: ${ CONFIG.colorScrollbarTrack };\n\t\t\tborder-radius: 8px;\n\t\t}\n\n\t\t&::-webkit-scrollbar-thumb {\n\t\t\tbackground-clip: padding-box;\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumb };\n\t\t\tborder: 2px solid rgba( 0, 0, 0, 0 );\n\t\t\tborder-radius: 7px;\n\t\t}\n\n\t\t&:hover::-webkit-scrollbar-thumb {\n\t\t\tbackground-color: ${ CONFIG.colorScrollbarThumbHover };\n\t\t}\n\t}\n`;\n\nexport const Scrollable = css`\n\theight: 100%;\n`;\n\nexport const Content = css`\n\tposition: relative;\n`;\n\nexport const smoothScroll = css`\n\tscroll-behavior: smooth;\n`;\n\nexport const scrollX = css`\n\toverflow-x: auto;\n\toverflow-y: hidden;\n`;\n\nexport const scrollY = css`\n\toverflow-x: hidden;\n\toverflow-y: auto;\n`;\n\nexport const scrollAuto = css`\n\toverflow-y: auto;\n`;\n"],"mappings":";AAAA;AACA;AACA;AACA,SAASA,GAAG,QAAQ,gBAAgB;;AAEpC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,UAAU;AAEjC,OAAO,MAAMC,mBAAmB,gBAAGF,GAAG,mMAYpBC,MAAM,CAACE,mBAAmB,kGAMpBF,MAAM,CAACG,mBAAmB,gHAM1BH,MAAM,CAACI,wBAAwB,WAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA,yDAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,29DAGtD;AAED,OAAO,MAAMC,UAAU,GAAAH,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEtB;AAED,OAAO,MAAMC,OAAO,GAAAT,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEnB;AAED,OAAO,MAAME,YAAY,GAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAExB;AAED,OAAO,MAAMG,OAAO,GAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGnB;AAED,OAAO,MAAMI,OAAO,GAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAGnB;AAED,OAAO,MAAMK,UAAU,GAAAb,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAE,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,CAEtB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/scrollable/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\nexport type ScrollableDirection = 'x' | 'y' | 'auto';\n\nexport type ScrollableProps = {\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Renders a scrollbar for a specific axis when content overflows.\n\t *\n\t * @default 'y'\n\t */\n\tscrollDirection?: ScrollableDirection;\n\t/**\n\t * Enables (CSS) smooth scrolling.\n\t *\n\t * @default false\n\t */\n\tsmoothScroll?: boolean;\n};\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/scrollable/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode } from 'react';\n\nexport type ScrollableDirection = 'x' | 'y' | 'auto';\n\nexport type ScrollableProps = {\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Renders a scrollbar for a specific axis when content overflows.\n\t *\n\t * @default 'y'\n\t */\n\tscrollDirection?: ScrollableDirection;\n\t/**\n\t * Enables (CSS) smooth scrolling.\n\t *\n\t * @default false\n\t */\n\tsmoothScroll?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["classnames","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","SuffixItem","searchRef","value","onChange","onClose","createElement","icon","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","instanceId","SearchControl","contextValue","BaseControl","_overrides","InputBase","isBorderless","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tdelete restProps.disabled;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\tBaseControl: { _overrides: { __nextHasNoMarginBottom } },\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-search-control',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AAC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Ic;EAAS,CACd,CACqB,CAAC;AAE1B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,aAAa,GAAG7B,UAAU,CAAEoB,wBAAyB,CAAC;AAEnE,eAAeS,aAAa"}
|
|
1
|
+
{"version":3,"names":["classnames","useInstanceId","useMergeRefs","__","Icon","search","closeSmall","forwardRef","useMemo","useRef","Button","ContextSystemProvider","StyledInputControl","SuffixItemWrapper","SuffixItem","searchRef","value","onChange","onClose","createElement","icon","onReset","current","focus","size","label","onClick","UnforwardedSearchControl","__nextHasNoMarginBottom","className","placeholder","hideLabelFromVision","restProps","forwardedRef","disabled","instanceId","SearchControl","contextValue","BaseControl","_overrides","InputBase","isBorderless","__next40pxDefaultSize","id","ref","type","nextValue","autoComplete","suffix"],"sources":["@wordpress/components/src/search-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { Icon, search, closeSmall } from '@wordpress/icons';\nimport { forwardRef, useMemo, useRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { SearchControlProps, SuffixItemProps } from './types';\nimport type { ForwardedRef } from 'react';\nimport { ContextSystemProvider } from '../context';\nimport { StyledInputControl, SuffixItemWrapper } from './styles';\n\nfunction SuffixItem( {\n\tsearchRef,\n\tvalue,\n\tonChange,\n\tonClose,\n}: SuffixItemProps ) {\n\tif ( ! onClose && ! value ) {\n\t\treturn <Icon icon={ search } />;\n\t}\n\n\tconst onReset = () => {\n\t\tonChange( '' );\n\t\tsearchRef.current?.focus();\n\t};\n\n\treturn (\n\t\t<Button\n\t\t\tsize=\"small\"\n\t\t\ticon={ closeSmall }\n\t\t\tlabel={ onClose ? __( 'Close search' ) : __( 'Reset search' ) }\n\t\t\tonClick={ onClose ?? onReset }\n\t\t/>\n\t);\n}\n\nfunction UnforwardedSearchControl(\n\t{\n\t\t__nextHasNoMarginBottom = false,\n\t\tclassName,\n\t\tonChange,\n\t\tvalue,\n\t\tlabel = __( 'Search' ),\n\t\tplaceholder = __( 'Search' ),\n\t\thideLabelFromVision = true,\n\t\tonClose,\n\t\tsize = 'default',\n\t\t...restProps\n\t}: Omit<\n\t\tWordPressComponentProps< SearchControlProps, 'input', false >,\n\t\t// TODO: Background styling currently doesn't support a disabled state. Needs design work.\n\t\t'disabled'\n\t>,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\t// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.\n\t// Work with the design team (@WordPress/gutenberg-design) if you need this feature.\n\tdelete restProps.disabled;\n\n\tconst searchRef = useRef< HTMLInputElement >( null );\n\tconst instanceId = useInstanceId(\n\t\tSearchControl,\n\t\t'components-search-control'\n\t);\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\t// Overrides the underlying BaseControl `__nextHasNoMarginBottom` via the context system\n\t\t\t// to provide backwards compatibile margin for SearchControl.\n\t\t\t// (In a standard InputControl, the BaseControl `__nextHasNoMarginBottom` is always set to true.)\n\t\t\tBaseControl: { _overrides: { __nextHasNoMarginBottom } },\n\t\t\t// `isBorderless` is still experimental and not a public prop for InputControl yet.\n\t\t\tInputBase: { isBorderless: true },\n\t\t} ),\n\t\t[ __nextHasNoMarginBottom ]\n\t);\n\n\treturn (\n\t\t<ContextSystemProvider value={ contextValue }>\n\t\t\t<StyledInputControl\n\t\t\t\t__next40pxDefaultSize\n\t\t\t\tid={ instanceId }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabel={ label }\n\t\t\t\tref={ useMergeRefs( [ searchRef, forwardedRef ] ) }\n\t\t\t\ttype=\"search\"\n\t\t\t\tsize={ size }\n\t\t\t\tclassName={ classnames(\n\t\t\t\t\t'components-search-control',\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\tonChange={ ( nextValue?: string ) =>\n\t\t\t\t\tonChange( nextValue ?? '' )\n\t\t\t\t}\n\t\t\t\tautoComplete=\"off\"\n\t\t\t\tplaceholder={ placeholder }\n\t\t\t\tvalue={ value ?? '' }\n\t\t\t\tsuffix={\n\t\t\t\t\t<SuffixItemWrapper size={ size }>\n\t\t\t\t\t\t<SuffixItem\n\t\t\t\t\t\t\tsearchRef={ searchRef }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\t\tonClose={ onClose }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</SuffixItemWrapper>\n\t\t\t\t}\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t</ContextSystemProvider>\n\t);\n}\n\n/**\n * SearchControl components let users display a search control.\n *\n * ```jsx\n * import { SearchControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * function MySearchControl( { className, setState } ) {\n * const [ searchInput, setSearchInput ] = useState( '' );\n *\n * return (\n * <SearchControl\n * __nextHasNoMarginBottom\n * value={ searchInput }\n * onChange={ setSearchInput }\n * />\n * );\n * }\n * ```\n */\nexport const SearchControl = forwardRef( UnforwardedSearchControl );\n\nexport default SearchControl;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,UAAU,MAAM,YAAY;;AAEnC;AACA;AACA;AACA,SAASC,aAAa,EAAEC,YAAY,QAAQ,oBAAoB;AAChE,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,IAAI,EAAEC,MAAM,EAAEC,UAAU,QAAQ,kBAAkB;AAC3D,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,oBAAoB;;AAEhE;AACA;AACA;AACA,OAAOC,MAAM,MAAM,WAAW;AAI9B,SAASC,qBAAqB,QAAQ,YAAY;AAClD,SAASC,kBAAkB,EAAEC,iBAAiB,QAAQ,UAA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