@wordpress/components 27.6.0 → 28.0.1
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 +37 -0
- package/build/alignment-matrix-control/cell.js +16 -12
- package/build/alignment-matrix-control/cell.js.map +1 -1
- package/build/alignment-matrix-control/icon.js +12 -11
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +18 -18
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +14 -12
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js +30 -24
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/animate/index.js +1 -1
- package/build/animate/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +56 -30
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +50 -40
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/background-view.android.js +5 -4
- package/build/autocomplete/background-view.android.js.map +1 -1
- package/build/autocomplete/background-view.ios.js +5 -4
- package/build/autocomplete/background-view.ios.js.map +1 -1
- package/build/autocomplete/index.js +5 -3
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/index.js +33 -24
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/index.native.js +9 -4
- package/build/base-control/index.native.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +49 -44
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control-linked-button/component.js +15 -13
- package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +39 -38
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/component.js +2 -2
- package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build/border-control/border-control/component.js +56 -52
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +55 -43
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js +9 -9
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/box-control/all-input-control.js +30 -28
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +45 -41
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/icon.js +15 -12
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js +31 -24
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js +46 -43
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/linked-button.js +12 -11
- package/build/box-control/linked-button.js.map +1 -1
- package/build/button/deprecated.js +2 -2
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +34 -19
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js +27 -21
- package/build/button/index.native.js.map +1 -1
- package/build/button-group/index.js +2 -2
- package/build/button-group/index.js.map +1 -1
- package/build/card/card/component.js +22 -19
- package/build/card/card/component.js.map +1 -1
- package/build/card/card-body/component.js +3 -3
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-divider/component.js +2 -2
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-footer/component.js +2 -2
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-header/component.js +2 -2
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-media/component.js +2 -2
- package/build/card/card-media/component.js.map +1 -1
- package/build/checkbox-control/index.js +39 -34
- package/build/checkbox-control/index.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js +10 -8
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option-group.js +5 -4
- package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +16 -14
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js +36 -30
- package/build/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build/clipboard-button/index.js +5 -4
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-control/index.native.js +2 -2
- package/build/color-control/index.native.js.map +1 -1
- package/build/color-indicator/index.js +2 -2
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-indicator/index.native.js +39 -36
- package/build/color-indicator/index.native.js.map +1 -1
- package/build/color-palette/index.js +90 -82
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +75 -65
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-copy-button.js +10 -9
- package/build/color-picker/color-copy-button.js.map +1 -1
- package/build/color-picker/color-input.js +4 -4
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +36 -30
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +6 -5
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/hsl-input.js +48 -46
- package/build/color-picker/hsl-input.js.map +1 -1
- package/build/color-picker/hsv-color-picker.native.js +32 -31
- package/build/color-picker/hsv-color-picker.native.js.map +1 -1
- package/build/color-picker/hue-picker.native.js +33 -31
- package/build/color-picker/hue-picker.native.js.map +1 -1
- package/build/color-picker/index.native.js +67 -54
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js +33 -31
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/legacy-adapter.js +2 -2
- package/build/color-picker/legacy-adapter.js.map +1 -1
- package/build/color-picker/picker.js +2 -2
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/rgb-input.js +52 -50
- package/build/color-picker/rgb-input.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +44 -41
- package/build/color-picker/saturation-picker.native.js.map +1 -1
- package/build/combobox-control/index.js +67 -52
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/types.js.map +1 -1
- package/build/composite/legacy/index.js +3 -3
- package/build/composite/legacy/index.js.map +1 -1
- package/build/confirm-dialog/component.js +35 -26
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/context/context-connect.js +1 -1
- package/build/context/context-connect.js.map +1 -1
- package/build/context/context-system-provider.js +6 -5
- package/build/context/context-system-provider.js.map +1 -1
- package/build/context/use-context-system.js +1 -1
- package/build/context/use-context-system.js.map +1 -1
- package/build/css.d.js +6 -0
- package/build/css.d.js.map +1 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js +114 -107
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +49 -47
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/index.js +31 -25
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/index.native.js +23 -17
- package/build/custom-gradient-picker/index.native.js.map +1 -1
- package/build/custom-select-control/index.js +72 -59
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control-v2/custom-select.js +48 -35
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/custom-select-control-v2/default-component/index.js +2 -2
- package/build/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build/custom-select-control-v2/item.js +9 -6
- package/build/custom-select-control-v2/item.js.map +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js +32 -44
- package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +9 -9
- 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 +2 -2
- package/build/dashicon/index.js.map +1 -1
- package/build/dashicon/index.native.js +3 -3
- package/build/dashicon/index.native.js.map +1 -1
- package/build/date-time/date/index.js +92 -85
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date-time/index.js +18 -15
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/time/index.js +162 -135
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/time/timezone.js +12 -10
- package/build/date-time/time/timezone.js.map +1 -1
- package/build/dimension-control/index.js +7 -5
- package/build/dimension-control/index.js.map +1 -1
- package/build/disabled/index.js +11 -9
- package/build/disabled/index.js.map +1 -1
- package/build/disabled/index.native.js +5 -4
- package/build/disabled/index.native.js.map +1 -1
- package/build/disclosure/index.js +5 -4
- package/build/disclosure/index.js.map +1 -1
- package/build/divider/component.js +3 -3
- package/build/divider/component.js.map +1 -1
- package/build/draggable/index.js +14 -11
- package/build/draggable/index.js.map +1 -1
- package/build/draggable/index.native.js +15 -11
- package/build/draggable/index.native.js.map +1 -1
- package/build/drop-zone/index.js +23 -17
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/dropdown-content-wrapper.js +2 -2
- package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build/dropdown/index.js +21 -19
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown/index.native.js +4 -2
- package/build/dropdown/index.native.js.map +1 -1
- package/build/dropdown-menu/index.js +29 -27
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +32 -29
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/dropdown-menu-v2/index.js +108 -76
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js +52 -46
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/duotone-picker/custom-duotone-bar.js +2 -2
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +40 -38
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/duotone-swatch.js +3 -3
- package/build/duotone-picker/duotone-swatch.js.map +1 -1
- package/build/elevation/component.js +2 -2
- package/build/elevation/component.js.map +1 -1
- package/build/external-link/index.js +16 -11
- package/build/external-link/index.js.map +1 -1
- package/build/external-link/index.native.js +9 -6
- package/build/external-link/index.native.js.map +1 -1
- package/build/flex/flex/component.js +9 -7
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex-block/component.js +2 -2
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-item/component.js +2 -2
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/focal-point-picker/controls.js +20 -19
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/focal-point.js +3 -6
- package/build/focal-point-picker/focal-point.js.map +1 -1
- package/build/focal-point-picker/focal-point.native.js +11 -10
- package/build/focal-point-picker/focal-point.native.js.map +1 -1
- package/build/focal-point-picker/grid.js +21 -20
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.js +42 -39
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +66 -62
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/media.js +4 -4
- package/build/focal-point-picker/media.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js +2 -7
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +32 -27
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/focusable-iframe/index.js +2 -2
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/font-size-picker/font-size-picker-select.js +2 -2
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/font-size-picker-toggle-group.js +10 -10
- package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build/font-size-picker/index.js +119 -103
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/index.native.js +77 -64
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/footer-message-control/index.native.js +2 -2
- package/build/footer-message-control/index.native.js.map +1 -1
- package/build/form-file-upload/index.js +20 -18
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-toggle/index.js +18 -17
- package/build/form-toggle/index.js.map +1 -1
- package/build/form-token-field/index.js +59 -55
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +41 -38
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/form-token-field/token-input.js +2 -2
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/form-token-field/token.js +22 -18
- package/build/form-token-field/token.js.map +1 -1
- package/build/gradient-picker/index.js +50 -47
- package/build/gradient-picker/index.js.map +1 -1
- package/build/grid/component.js +2 -2
- package/build/grid/component.js.map +1 -1
- package/build/guide/icons.js +9 -8
- package/build/guide/icons.js.map +1 -1
- package/build/guide/index.js +33 -26
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js +16 -17
- package/build/guide/page-control.js.map +1 -1
- package/build/guide/page.js +2 -2
- package/build/guide/page.js.map +1 -1
- package/build/h-stack/component.js +2 -2
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js +3 -4
- package/build/h-stack/hook.js.map +1 -1
- package/build/heading/component.js +2 -2
- package/build/heading/component.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +7 -6
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js +8 -8
- package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +6 -5
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +2 -2
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.js +8 -7
- package/build/higher-order/with-focus-outside/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.native.js +8 -7
- package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build/higher-order/with-focus-return/index.js +8 -8
- package/build/higher-order/with-focus-return/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js +4 -4
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js +2 -2
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/icon/index.js +3 -2
- package/build/icon/index.js.map +1 -1
- package/build/index.js +7 -0
- package/build/index.js.map +1 -1
- package/build/index.native.js +0 -66
- package/build/index.native.js.map +1 -1
- package/build/input-control/backdrop.js +2 -2
- package/build/input-control/backdrop.js.map +1 -1
- package/build/input-control/index.js +36 -34
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +36 -25
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js +4 -4
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js +2 -2
- package/build/input-control/input-prefix-wrapper.js.map +1 -1
- package/build/input-control/input-suffix-wrapper.js +2 -2
- package/build/input-control/input-suffix-wrapper.js.map +1 -1
- package/build/input-control/label.js +12 -8
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +27 -27
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/isolated-event-container/index.js +2 -2
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/item/component.js +8 -7
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js +8 -7
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/keyboard-shortcuts/index.js +10 -8
- package/build/keyboard-shortcuts/index.js.map +1 -1
- package/build/menu-group/index.js +14 -11
- package/build/menu-group/index.js.map +1 -1
- package/build/menu-item/index.js +23 -18
- package/build/menu-item/index.js.map +1 -1
- package/build/menu-items-choice/index.js +24 -22
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/mobile/autocompletion-items.native.js +3 -3
- package/build/mobile/autocompletion-items.native.js.map +1 -1
- package/build/mobile/badge/index.native.js +10 -6
- package/build/mobile/badge/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +23 -18
- 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 +21 -17
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/button.native.js +17 -14
- package/build/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +69 -53
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/chevron-back.native.js +7 -6
- package/build/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
- package/build/mobile/bottom-sheet/color-cell.native.js +12 -11
- package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +2 -2
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/footer-message-cell.native.js +4 -4
- 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 +5 -4
- package/build/mobile/bottom-sheet/footer-message-link/footer-message-link.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +72 -56
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +6 -6
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js +7 -6
- package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +19 -15
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/lock-icon/index.native.js +2 -2
- package/build/mobile/bottom-sheet/lock-icon/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/action-button.native.js +9 -7
- 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 +18 -15
- 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 +19 -16
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/heading.native.js +5 -4
- package/build/mobile/bottom-sheet/nav-bar/heading.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/index.native.js +5 -4
- package/build/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js +11 -10
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/radio-cell.native.js +10 -9
- package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +50 -45
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js +28 -25
- package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build/mobile/bottom-sheet/ripple.native.js +12 -9
- package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +41 -35
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js +33 -29
- package/build/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js +33 -29
- package/build/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js +16 -5
- package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +11 -10
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +40 -31
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +41 -29
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/color-settings/gradient-picker-screen.native.js +14 -8
- package/build/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js +27 -21
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +84 -64
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/color-settings/picker-screen.native.js +4 -4
- package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build/mobile/cycle-select-control/index.native.js +2 -2
- package/build/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build/mobile/dashicons/index.native.js +8 -7
- package/build/mobile/dashicons/index.native.js.map +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js +22 -16
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +37 -30
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/gridicons/index.native.js +8 -7
- package/build/mobile/gridicons/index.native.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js +36 -34
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/image/icon-customize.native.js +8 -7
- package/build/mobile/image/icon-customize.native.js.map +1 -1
- package/build/mobile/image/icon-retry.native.js +11 -10
- package/build/mobile/image/icon-retry.native.js.map +1 -1
- package/build/mobile/image/image-editing-button.native.js +18 -15
- package/build/mobile/image/image-editing-button.native.js.map +1 -1
- package/build/mobile/image/index.native.js +83 -72
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js +10 -8
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +15 -14
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +55 -46
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +33 -29
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js +2 -2
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +58 -50
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/link-settings/link-rel.native.js +8 -7
- package/build/mobile/link-settings/link-rel.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js +23 -19
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js +2 -2
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js +8 -3
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/picker/index.android.js +27 -24
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/picker/index.ios.js +4 -4
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +49 -42
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js +1 -10
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/modal/index.js +57 -46
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +6 -5
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/menu.js +2 -2
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigable-container/tabbable.js +2 -2
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigation/back-button/index.js +7 -6
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/group/index.js +21 -16
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/index.js +13 -11
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base-content.js +11 -7
- package/build/navigation/item/base-content.js.map +1 -1
- package/build/navigation/item/base.js +5 -4
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +17 -13
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/menu/index.js +29 -23
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +14 -12
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/menu-title.js +35 -28
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js +6 -2
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +2 -2
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-button/component.js +2 -2
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +8 -6
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +5 -4
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/component.js +2 -2
- package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build/notice/index.js +44 -37
- package/build/notice/index.js.map +1 -1
- package/build/notice/index.native.js +21 -15
- package/build/notice/index.native.js.map +1 -1
- package/build/notice/list.js +16 -14
- package/build/notice/list.js.map +1 -1
- package/build/notice/list.native.js +12 -10
- package/build/notice/list.native.js.map +1 -1
- package/build/number-control/index.js +24 -20
- package/build/number-control/index.js.map +1 -1
- package/build/palette-edit/index.js +226 -196
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/actions.native.js +9 -9
- package/build/panel/actions.native.js.map +1 -1
- package/build/panel/body.js +33 -29
- package/build/panel/body.js.map +1 -1
- package/build/panel/body.native.js +9 -7
- package/build/panel/body.native.js.map +1 -1
- package/build/panel/bottom-separator-cover.native.js +2 -2
- package/build/panel/bottom-separator-cover.native.js.map +1 -1
- package/build/panel/header.js +7 -4
- package/build/panel/header.js.map +1 -1
- package/build/panel/index.js +7 -6
- package/build/panel/index.js.map +1 -1
- package/build/panel/row.js +5 -4
- package/build/panel/row.js.map +1 -1
- package/build/placeholder/index.js +26 -20
- package/build/placeholder/index.js.map +1 -1
- package/build/popover/index.js +52 -42
- package/build/popover/index.js.map +1 -1
- package/build/private-apis.js +0 -2
- package/build/private-apis.js.map +1 -1
- package/build/progress-bar/index.js +32 -15
- package/build/progress-bar/index.js.map +1 -1
- package/build/progress-bar/styles.js +4 -4
- package/build/progress-bar/styles.js.map +1 -1
- package/build/query-controls/author-select.js +2 -2
- package/build/query-controls/author-select.js.map +1 -1
- package/build/query-controls/category-select.js +2 -2
- package/build/query-controls/category-select.js.map +1 -1
- package/build/query-controls/index.js +74 -78
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/index.native.js +27 -24
- package/build/query-controls/index.native.js.map +1 -1
- package/build/radio-control/index.js +25 -22
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js +11 -10
- package/build/radio-control/index.native.js.map +1 -1
- package/build/radio-group/index.js +13 -10
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +6 -5
- package/build/radio-group/radio.js.map +1 -1
- package/build/range-control/index.js +100 -89
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/index.native.js +3 -3
- package/build/range-control/index.native.js.map +1 -1
- package/build/range-control/input-range.js +2 -2
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/mark.js +16 -13
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +24 -20
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/tooltip.js +5 -4
- package/build/range-control/tooltip.js.map +1 -1
- package/build/resizable-box/index.js +7 -6
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/index.native.js +2 -2
- package/build/resizable-box/index.native.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js +11 -10
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +12 -9
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/responsive-wrapper/index.js +13 -10
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/sandbox/index.js +33 -29
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +32 -29
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scrollable/component.js +2 -2
- package/build/scrollable/component.js.map +1 -1
- package/build/search-control/index.js +30 -28
- package/build/search-control/index.js.map +1 -1
- package/build/search-control/index.native.js +46 -38
- package/build/search-control/index.native.js.map +1 -1
- package/build/select-control/chevron-down.js +9 -5
- package/build/select-control/chevron-down.js.map +1 -1
- package/build/select-control/index.js +38 -35
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/index.native.js +2 -2
- package/build/select-control/index.native.js.map +1 -1
- package/build/shortcut/index.js +5 -4
- package/build/shortcut/index.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +5 -4
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -5
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +2 -2
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/index.js +20 -12
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/index.native.js +4 -4
- package/build/slot-fill/index.native.js.map +1 -1
- package/build/slot-fill/provider.js +6 -5
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +16 -12
- package/build/slot-fill/slot.js.map +1 -1
- package/build/snackbar/index.js +32 -28
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +29 -24
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js +2 -2
- package/build/spacer/component.js.map +1 -1
- package/build/spinner/index.js +13 -12
- package/build/spinner/index.js.map +1 -1
- package/build/spinner/index.native.js +2 -2
- package/build/spinner/index.native.js.map +1 -1
- package/build/style-provider/index.js +6 -5
- package/build/style-provider/index.js.map +1 -1
- package/build/surface/component.js +2 -2
- package/build/surface/component.js.map +1 -1
- package/build/tab-panel/index.js +29 -26
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +5 -4
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +9 -14
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tab.js +6 -5
- package/build/tabs/tab.js.map +1 -1
- package/build/tabs/tablist.js +103 -7
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/tabpanel.js +6 -5
- package/build/tabs/tabpanel.js.map +1 -1
- package/build/text/component.js +2 -2
- package/build/text/component.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/text-control/index.js +16 -15
- package/build/text-control/index.js.map +1 -1
- package/build/text-control/index.native.js +2 -2
- package/build/text-control/index.native.js.map +1 -1
- package/build/text-highlight/index.js +5 -3
- package/build/text-highlight/index.js.map +1 -1
- package/build/textarea-control/index.js +14 -13
- package/build/textarea-control/index.js.map +1 -1
- package/build/textarea-control/index.native.js +16 -15
- package/build/textarea-control/index.native.js.map +1 -1
- package/build/theme/color-algorithms.js +2 -2
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/theme/index.js +3 -4
- package/build/theme/index.js.map +1 -1
- package/build/tip/index.js +9 -6
- package/build/tip/index.js.map +1 -1
- package/build/toggle-control/index.js +23 -20
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-control/index.native.js +2 -2
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js +11 -9
- 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 +13 -11
- 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 +22 -15
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +5 -4
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +50 -38
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js +7 -6
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/toolbar/toolbar/index.js +11 -10
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.js +11 -9
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.native.js +4 -2
- package/build/toolbar/toolbar/toolbar-container.native.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +35 -31
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.js +5 -4
- package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.native.js +4 -2
- package/build/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js +12 -11
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +9 -9
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +8 -7
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.js +5 -4
- package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js +5 -4
- package/build/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +10 -7
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.native.js +1 -1
- package/build/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +14 -12
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +108 -94
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js +6 -5
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tooltip/index.js +25 -26
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +33 -24
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tree-grid/cell.js +10 -6
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/index.js +16 -10
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-grid/item.js +5 -4
- package/build/tree-grid/item.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js +5 -4
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/tree-grid/roving-tab-index.js +6 -6
- package/build/tree-grid/roving-tab-index.js.map +1 -1
- package/build/tree-grid/row.js +5 -4
- package/build/tree-grid/row.js.map +1 -1
- package/build/tree-select/index.js +2 -2
- package/build/tree-select/index.js.map +1 -1
- package/build/truncate/component.js +2 -2
- package/build/truncate/component.js.map +1 -1
- package/build/unit-control/index.js +3 -3
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +56 -48
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/unit-select-control.js +12 -10
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/utils/style-mixins.js +0 -7
- package/build/utils/style-mixins.js.map +1 -1
- package/build/v-stack/component.js +2 -2
- package/build/v-stack/component.js.map +1 -1
- package/build/view/component.js +2 -2
- package/build/view/component.js.map +1 -1
- package/build/visually-hidden/component.js +2 -2
- package/build/visually-hidden/component.js.map +1 -1
- package/build/z-stack/component.js +8 -7
- package/build/z-stack/component.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js +17 -12
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +12 -11
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +18 -18
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +14 -12
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +31 -24
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/animate/index.js +1 -1
- package/build-module/animate/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +58 -30
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +51 -40
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/background-view.android.js +5 -4
- package/build-module/autocomplete/background-view.android.js.map +1 -1
- package/build-module/autocomplete/background-view.ios.js +5 -4
- package/build-module/autocomplete/background-view.ios.js.map +1 -1
- package/build-module/autocomplete/index.js +7 -3
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/index.js +34 -24
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/index.native.js +10 -4
- package/build-module/base-control/index.native.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +50 -44
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-linked-button/component.js +15 -13
- 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-split-controls/component.js +40 -38
- 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-visualizer/component.js +2 -2
- package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build-module/border-control/border-control/component.js +57 -52
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +57 -43
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js +9 -9
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/box-control/all-input-control.js +31 -28
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +47 -41
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/icon.js +16 -12
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +32 -24
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +48 -43
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/linked-button.js +12 -11
- package/build-module/box-control/linked-button.js.map +1 -1
- package/build-module/button/deprecated.js +2 -2
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +36 -19
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +28 -21
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button-group/index.js +2 -3
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/card/card/component.js +21 -17
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card-body/component.js +3 -3
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-divider/component.js +2 -2
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-footer/component.js +2 -2
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-header/component.js +2 -2
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-media/component.js +2 -2
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/checkbox-control/index.js +40 -34
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js +10 -8
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option-group.js +5 -5
- 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 +17 -14
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js +36 -28
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/clipboard-button/index.js +5 -4
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-control/index.native.js +2 -2
- package/build-module/color-control/index.native.js.map +1 -1
- package/build-module/color-indicator/index.js +2 -3
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-indicator/index.native.js +40 -36
- package/build-module/color-indicator/index.native.js.map +1 -1
- package/build-module/color-palette/index.js +91 -82
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +77 -65
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-copy-button.js +10 -9
- package/build-module/color-picker/color-copy-button.js.map +1 -1
- package/build-module/color-picker/color-input.js +4 -4
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +37 -30
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +6 -5
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hsl-input.js +50 -46
- package/build-module/color-picker/hsl-input.js.map +1 -1
- package/build-module/color-picker/hsv-color-picker.native.js +33 -31
- package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
- package/build-module/color-picker/hue-picker.native.js +34 -31
- package/build-module/color-picker/hue-picker.native.js.map +1 -1
- package/build-module/color-picker/index.native.js +68 -53
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +34 -31
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/legacy-adapter.js +2 -2
- package/build-module/color-picker/legacy-adapter.js.map +1 -1
- package/build-module/color-picker/picker.js +2 -3
- package/build-module/color-picker/picker.js.map +1 -1
- package/build-module/color-picker/rgb-input.js +54 -50
- package/build-module/color-picker/rgb-input.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +45 -41
- package/build-module/color-picker/saturation-picker.native.js.map +1 -1
- package/build-module/combobox-control/index.js +68 -52
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/types.js.map +1 -1
- package/build-module/composite/legacy/index.js +3 -4
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/confirm-dialog/component.js +37 -26
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/context/context-connect.js +1 -1
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/context/context-system-provider.js +6 -5
- package/build-module/context/context-system-provider.js.map +1 -1
- package/build-module/context/use-context-system.js +1 -1
- package/build-module/context/use-context-system.js.map +1 -1
- package/build-module/css.d.js +2 -0
- package/build-module/css.d.js.map +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +116 -107
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +50 -47
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +32 -25
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/index.native.js +25 -17
- package/build-module/custom-gradient-picker/index.native.js.map +1 -1
- package/build-module/custom-select-control/index.js +73 -59
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js +49 -35
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/custom-select-control-v2/default-component/index.js +2 -2
- package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/item.js +10 -6
- package/build-module/custom-select-control-v2/item.js.map +1 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js +35 -43
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +9 -9
- 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 +2 -2
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/dashicon/index.native.js +3 -3
- package/build-module/dashicon/index.native.js.map +1 -1
- package/build-module/date-time/date/index.js +93 -85
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date-time/index.js +20 -15
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js +164 -135
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time/timezone.js +11 -8
- package/build-module/date-time/time/timezone.js.map +1 -1
- package/build-module/dimension-control/index.js +9 -5
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/disabled/index.js +11 -9
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/disabled/index.native.js +5 -4
- package/build-module/disabled/index.native.js.map +1 -1
- package/build-module/disclosure/index.js +5 -5
- package/build-module/disclosure/index.js.map +1 -1
- package/build-module/divider/component.js +3 -3
- package/build-module/divider/component.js.map +1 -1
- package/build-module/draggable/index.js +16 -12
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/draggable/index.native.js +15 -11
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/drop-zone/index.js +24 -17
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/dropdown-content-wrapper.js +2 -2
- package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build-module/dropdown/index.js +22 -19
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown/index.native.js +5 -2
- package/build-module/dropdown/index.native.js.map +1 -1
- package/build-module/dropdown-menu/index.js +30 -27
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +33 -29
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/dropdown-menu-v2/index.js +110 -76
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js +54 -46
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/duotone-picker/custom-duotone-bar.js +2 -2
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +41 -38
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/duotone-swatch.js +3 -3
- package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
- package/build-module/elevation/component.js +2 -2
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/external-link/index.js +17 -12
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/external-link/index.native.js +10 -6
- package/build-module/external-link/index.native.js.map +1 -1
- package/build-module/flex/flex/component.js +9 -7
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex-block/component.js +2 -2
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-item/component.js +2 -2
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +21 -19
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.js +3 -5
- package/build-module/focal-point-picker/focal-point.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.native.js +12 -10
- package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +22 -20
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.js +43 -39
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +67 -62
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/media.js +4 -4
- package/build-module/focal-point-picker/media.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js +2 -6
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +33 -27
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/focusable-iframe/index.js +2 -3
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-select.js +2 -2
- 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 +10 -10
- package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
- package/build-module/font-size-picker/index.js +120 -103
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +78 -63
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/footer-message-control/index.native.js +2 -2
- package/build-module/footer-message-control/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js +21 -18
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-toggle/index.js +19 -18
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-token-field/index.js +60 -55
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +42 -39
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/form-token-field/token-input.js +2 -3
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/form-token-field/token.js +23 -18
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/gradient-picker/index.js +51 -47
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/grid/component.js +2 -2
- package/build-module/grid/component.js.map +1 -1
- package/build-module/guide/icons.js +9 -8
- package/build-module/guide/icons.js.map +1 -1
- package/build-module/guide/index.js +34 -26
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js +16 -17
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/guide/page.js +2 -3
- package/build-module/guide/page.js.map +1 -1
- package/build-module/h-stack/component.js +2 -2
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js +3 -4
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/heading/component.js +2 -2
- package/build-module/heading/component.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +7 -6
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js +7 -6
- package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +7 -5
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +2 -2
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.js +8 -7
- package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.native.js +8 -7
- package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build-module/higher-order/with-focus-return/index.js +7 -6
- package/build-module/higher-order/with-focus-return/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +4 -4
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js +2 -2
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/icon/index.js +3 -2
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +0 -3
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/backdrop.js +2 -2
- package/build-module/input-control/backdrop.js.map +1 -1
- package/build-module/input-control/index.js +36 -34
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +38 -25
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +2 -2
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js +2 -2
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
- package/build-module/input-control/input-suffix-wrapper.js +2 -2
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
- package/build-module/input-control/label.js +12 -8
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +21 -21
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/isolated-event-container/index.js +2 -2
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/item/component.js +8 -7
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js +8 -7
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js +12 -9
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/menu-group/index.js +15 -12
- package/build-module/menu-group/index.js.map +1 -1
- package/build-module/menu-item/index.js +24 -18
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/menu-items-choice/index.js +25 -22
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/autocompletion-items.native.js +2 -2
- package/build-module/mobile/autocompletion-items.native.js.map +1 -1
- package/build-module/mobile/badge/index.native.js +12 -6
- package/build-module/mobile/badge/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +23 -18
- 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 +22 -16
- 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 +17 -14
- package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +70 -53
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/chevron-back.native.js +7 -6
- package/build-module/mobile/bottom-sheet/chevron-back.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/color-cell.native.js +14 -11
- package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +2 -2
- 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 +4 -4
- 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 +5 -4
- 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 +74 -56
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +5 -4
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js +7 -6
- 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 +20 -15
- 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 +2 -2
- 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 +9 -7
- 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 +18 -15
- 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 +20 -16
- 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 +5 -4
- 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 +5 -4
- package/build-module/mobile/bottom-sheet/nav-bar/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js +11 -10
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/radio-cell.native.js +10 -9
- package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +51 -45
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js +29 -25
- package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/ripple.native.js +12 -9
- package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +42 -35
- 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 +34 -29
- 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 +34 -29
- 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 +16 -3
- package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +11 -10
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +42 -30
- 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 +42 -28
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js +15 -8
- package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +27 -20
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +85 -63
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/picker-screen.native.js +3 -3
- package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
- package/build-module/mobile/cycle-select-control/index.native.js +2 -2
- package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build-module/mobile/dashicons/index.native.js +8 -7
- package/build-module/mobile/dashicons/index.native.js.map +1 -1
- package/build-module/mobile/focal-point-settings-panel/index.native.js +22 -15
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +37 -29
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/gridicons/index.native.js +8 -7
- package/build-module/mobile/gridicons/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +37 -34
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/image/icon-customize.native.js +8 -7
- package/build-module/mobile/image/icon-customize.native.js.map +1 -1
- package/build-module/mobile/image/icon-retry.native.js +12 -10
- package/build-module/mobile/image/icon-retry.native.js.map +1 -1
- package/build-module/mobile/image/image-editing-button.native.js +19 -15
- package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +85 -72
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +11 -8
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +15 -14
- 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 +16 -15
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +56 -46
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +33 -29
- 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 +2 -2
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +60 -50
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-rel.native.js +8 -7
- package/build-module/mobile/link-settings/link-rel.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +24 -19
- 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 +2 -2
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js +7 -3
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +28 -24
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js +3 -3
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +50 -42
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -10
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/modal/index.js +58 -46
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +6 -6
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/menu.js +2 -2
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +2 -2
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigation/back-button/index.js +8 -6
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/group/index.js +22 -16
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +13 -11
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base-content.js +13 -7
- package/build-module/navigation/item/base-content.js.map +1 -1
- package/build-module/navigation/item/base.js +5 -4
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +18 -13
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +30 -23
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +14 -12
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js +36 -28
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js +7 -2
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +2 -2
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js +2 -2
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +8 -6
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +5 -4
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/component.js +2 -2
- package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build-module/notice/index.js +45 -37
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/index.native.js +23 -15
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/notice/list.js +16 -14
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/list.native.js +12 -10
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/number-control/index.js +26 -20
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/palette-edit/index.js +228 -196
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/actions.native.js +10 -9
- package/build-module/panel/actions.native.js.map +1 -1
- package/build-module/panel/body.js +34 -29
- package/build-module/panel/body.js.map +1 -1
- package/build-module/panel/body.native.js +10 -7
- package/build-module/panel/body.native.js.map +1 -1
- package/build-module/panel/bottom-separator-cover.native.js +2 -2
- package/build-module/panel/bottom-separator-cover.native.js.map +1 -1
- package/build-module/panel/header.js +8 -4
- package/build-module/panel/header.js.map +1 -1
- package/build-module/panel/index.js +8 -6
- package/build-module/panel/index.js.map +1 -1
- package/build-module/panel/row.js +5 -5
- package/build-module/panel/row.js.map +1 -1
- package/build-module/placeholder/index.js +27 -20
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/popover/index.js +54 -42
- package/build-module/popover/index.js.map +1 -1
- package/build-module/private-apis.js +0 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/progress-bar/index.js +33 -15
- package/build-module/progress-bar/index.js.map +1 -1
- package/build-module/progress-bar/styles.js +4 -4
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/query-controls/author-select.js +2 -2
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/query-controls/category-select.js +2 -2
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/query-controls/index.js +74 -78
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/index.native.js +29 -24
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/radio-control/index.js +26 -22
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js +12 -10
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/radio-group/index.js +13 -10
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js +6 -5
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/range-control/index.js +101 -89
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/index.native.js +3 -3
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/range-control/input-range.js +2 -2
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/mark.js +18 -13
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +26 -20
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/tooltip.js +5 -4
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/resizable-box/index.js +8 -6
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/index.native.js +2 -2
- package/build-module/resizable-box/index.native.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +12 -10
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +12 -9
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/responsive-wrapper/index.js +13 -11
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/sandbox/index.js +34 -30
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +33 -29
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scrollable/component.js +2 -2
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/search-control/index.js +30 -28
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js +46 -37
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/select-control/chevron-down.js +9 -5
- package/build-module/select-control/chevron-down.js.map +1 -1
- package/build-module/select-control/index.js +38 -35
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/index.native.js +2 -2
- package/build-module/select-control/index.native.js.map +1 -1
- package/build-module/shortcut/index.js +5 -4
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +5 -4
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +1 -1
- 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 -6
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +2 -2
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/index.js +22 -12
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/index.native.js +4 -4
- package/build-module/slot-fill/index.native.js.map +1 -1
- package/build-module/slot-fill/provider.js +7 -6
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +17 -12
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/snackbar/index.js +33 -28
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +30 -24
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js +2 -2
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spinner/index.js +14 -12
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/index.native.js +2 -2
- package/build-module/spinner/index.native.js.map +1 -1
- package/build-module/style-provider/index.js +5 -5
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/surface/component.js +2 -2
- package/build-module/surface/component.js.map +1 -1
- package/build-module/tab-panel/index.js +30 -26
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +5 -4
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +3 -13
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tab.js +6 -5
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/tabs/tablist.js +104 -8
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/tabpanel.js +6 -5
- package/build-module/tabs/tabpanel.js.map +1 -1
- package/build-module/text/component.js +2 -2
- package/build-module/text/component.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-control/index.js +16 -15
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/text-control/index.native.js +2 -2
- package/build-module/text-control/index.native.js.map +1 -1
- package/build-module/text-highlight/index.js +6 -3
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/textarea-control/index.js +14 -13
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/textarea-control/index.native.js +16 -15
- package/build-module/textarea-control/index.native.js.map +1 -1
- package/build-module/theme/color-algorithms.js +2 -2
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/theme/index.js +2 -2
- package/build-module/theme/index.js.map +1 -1
- package/build-module/tip/index.js +10 -7
- package/build-module/tip/index.js.map +1 -1
- package/build-module/toggle-control/index.js +22 -18
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-control/index.native.js +2 -2
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +11 -9
- 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 +13 -11
- 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 +23 -15
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +5 -4
- 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-base/component.js +52 -38
- 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-icon/component.js +7 -6
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +11 -10
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.js +11 -9
- package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.native.js +4 -2
- package/build-module/toolbar/toolbar/toolbar-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +35 -31
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js +5 -4
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +4 -2
- package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js +12 -11
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +10 -9
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +8 -7
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js +5 -4
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js +5 -4
- package/build-module/toolbar/toolbar-group/toolbar-group-container.native.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +10 -7
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.native.js +1 -1
- package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +15 -12
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +110 -94
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js +6 -5
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tooltip/index.js +26 -26
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +35 -24
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/cell.js +11 -6
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/index.js +16 -10
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-grid/item.js +5 -4
- package/build-module/tree-grid/item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js +5 -4
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index.js +5 -4
- package/build-module/tree-grid/roving-tab-index.js.map +1 -1
- package/build-module/tree-grid/row.js +5 -5
- package/build-module/tree-grid/row.js.map +1 -1
- package/build-module/tree-select/index.js +2 -2
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/truncate/component.js +2 -2
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/unit-control/index.js +3 -3
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +58 -48
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +12 -10
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/utils/style-mixins.js +0 -1
- package/build-module/utils/style-mixins.js.map +1 -1
- package/build-module/v-stack/component.js +2 -2
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/view/component.js +2 -3
- package/build-module/view/component.js.map +1 -1
- package/build-module/visually-hidden/component.js +2 -2
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/z-stack/component.js +8 -7
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +11 -0
- package/build-style/style.css +11 -0
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +15 -15
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +17 -17
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +15 -15
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +14 -14
- package/build-types/border-box-control/stories/index.story.d.ts +2 -2
- package/build-types/border-control/border-control/hook.d.ts +14 -14
- package/build-types/border-control/border-control-dropdown/hook.d.ts +14 -14
- package/build-types/border-control/stories/index.story.d.ts +6 -6
- package/build-types/box-control/stories/index.story.d.ts +180 -180
- package/build-types/box-control/styles/box-control-styles.d.ts +4 -4
- package/build-types/button/deprecated.d.ts +9 -9
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +14 -14
- package/build-types/card/card-body/hook.d.ts +14 -14
- package/build-types/card/card-divider/component.d.ts +1 -1
- package/build-types/card/card-divider/hook.d.ts +15 -15
- package/build-types/card/card-footer/hook.d.ts +14 -14
- package/build-types/card/card-header/hook.d.ts +14 -14
- package/build-types/card/card-media/hook.d.ts +14 -14
- package/build-types/card/stories/index.story.d.ts +2 -2
- package/build-types/color-palette/stories/index.story.d.ts +3 -0
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-picker/component.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +1 -1
- package/build-types/color-picker/styles.d.ts +5 -5
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +27 -3
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +7 -0
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts +2 -2
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +18 -6
- package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts +2 -2
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +11 -15
- package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +3 -3
- package/build-types/date-time/date-time/styles.d.ts +2 -2
- package/build-types/date-time/time/styles.d.ts +8 -8
- package/build-types/dimension-control/stories/index.story.d.ts +10 -2
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +1 -1
- package/build-types/divider/styles.d.ts +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +14 -14
- package/build-types/flex/flex/hook.d.ts +16 -16
- package/build-types/flex/flex-block/hook.d.ts +14 -14
- package/build-types/flex/flex-item/hook.d.ts +14 -14
- package/build-types/focal-point-picker/focal-point.d.ts +3 -0
- package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +2 -2
- package/build-types/grid/hook.d.ts +14 -14
- package/build-types/h-stack/component.d.ts +1 -1
- package/build-types/h-stack/hook.d.ts +16 -16
- package/build-types/heading/hook.d.ts +13 -13
- package/build-types/index.d.ts +1 -0
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +4 -5
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +13 -13
- package/build-types/item-group/item-group/hook.d.ts +14 -14
- package/build-types/menu-item/index.d.ts +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +2 -2
- package/build-types/navigator/navigator-back-button/hook.d.ts +19 -19
- package/build-types/navigator/navigator-button/component.d.ts +2 -2
- package/build-types/navigator/navigator-button/hook.d.ts +19 -19
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -2
- package/build-types/number-control/index.d.ts +2 -2
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/styles.d.ts +629 -629
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +2 -2
- package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts +15 -0
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +18 -0
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +2 -2
- package/build-types/scrollable/hook.d.ts +14 -14
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
- package/build-types/snackbar/index.d.ts +1 -1
- package/build-types/spacer/hook.d.ts +14 -14
- package/build-types/surface/hook.d.ts +14 -14
- package/build-types/tabs/stories/index.story.d.ts +1 -0
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +14 -14
- package/build-types/text/styles.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +3 -3
- package/build-types/textarea-control/index.d.ts +1 -1
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +9 -9
- package/build-types/tools-panel/tools-panel/hook.d.ts +14 -14
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +14 -14
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +14 -14
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +14 -14
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -2
- package/build-types/utils/style-mixins.d.ts +0 -1
- package/build-types/v-stack/component.d.ts +1 -1
- package/build-types/v-stack/hook.d.ts +16 -16
- package/build-types/v-stack/stories/index.story.d.ts +2 -2
- package/build-types/view/component.d.ts +157 -157
- package/package.json +21 -20
- package/src/animate/index.tsx +1 -1
- package/src/animate/stories/index.story.tsx +6 -1
- package/src/autocomplete/autocompleter-ui.native.js +2 -4
- package/src/autocomplete/autocompleter-ui.tsx +68 -38
- package/src/autocomplete/test/index.tsx +3 -3
- package/src/button/index.native.js +1 -1
- package/src/button/index.tsx +6 -2
- package/src/circular-option-picker/circular-option-picker.tsx +2 -2
- package/src/circular-option-picker/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/test/index.tsx +3 -9
- package/src/color-indicator/index.native.js +1 -1
- package/src/color-palette/index.native.js +2 -2
- package/src/color-palette/stories/index.story.tsx +5 -8
- package/src/color-picker/index.native.js +1 -1
- package/src/combobox-control/README.md +9 -0
- package/src/combobox-control/index.tsx +10 -1
- package/src/combobox-control/stories/index.story.tsx +14 -0
- package/src/combobox-control/types.ts +7 -0
- package/src/composite/current/stories/index.story.tsx +1 -1
- package/src/css.d.ts +9 -0
- package/src/custom-gradient-picker/index.native.js +3 -1
- package/src/custom-select-control/index.js +7 -4
- package/src/custom-select-control-v2/custom-select.tsx +37 -36
- package/src/custom-select-control-v2/legacy-component/index.tsx +22 -31
- package/src/custom-select-control-v2/stories/default.story.tsx +0 -1
- package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
- package/src/custom-select-control-v2/styles.ts +10 -8
- package/src/custom-select-control-v2/types.ts +16 -15
- package/src/dashicon/index.native.js +1 -1
- package/src/dimension-control/stories/index.story.tsx +3 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -16
- package/src/dimension-control/test/index.test.js +7 -10
- package/src/draggable/test/index.native.js +2 -2
- package/src/dropdown/stories/index.story.tsx +6 -2
- package/src/dropdown-menu/index.native.js +2 -1
- package/src/dropdown-menu-v2/stories/index.story.tsx +1 -2
- package/src/dropdown-menu-v2/test/index.tsx +8 -3
- package/src/focal-point-picker/focal-point.tsx +7 -4
- package/src/focal-point-picker/index.native.js +2 -1
- package/src/focal-point-picker/styles/focal-point-style.ts +3 -7
- package/src/font-size-picker/index.native.js +6 -6
- package/src/font-size-picker/index.tsx +2 -2
- package/src/form-token-field/index.tsx +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +1 -0
- package/src/index.native.js +0 -14
- package/src/index.ts +1 -0
- package/src/input-control/input-base.tsx +5 -1
- package/src/input-control/styles/input-control-styles.tsx +0 -2
- package/src/keyboard-shortcuts/stories/index.story.tsx +3 -1
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/mobile/autocompletion-items.native.js +2 -2
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
- package/src/mobile/bottom-sheet/cell.native.js +3 -3
- package/src/mobile/bottom-sheet/color-cell.native.js +3 -2
- package/src/mobile/bottom-sheet/footer-message-cell.native.js +2 -2
- package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +3 -3
- package/src/mobile/bottom-sheet/nav-bar/action-button.native.js +1 -1
- package/src/mobile/bottom-sheet/radio-cell.native.js +2 -2
- package/src/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -1
- package/src/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -1
- package/src/mobile/bottom-sheet/sub-sheet/index.native.js +6 -1
- package/src/mobile/bottom-sheet/switch-cell.native.js +2 -2
- package/src/mobile/bottom-sheet-select-control/index.native.js +4 -3
- package/src/mobile/bottom-sheet-text-control/index.native.js +5 -7
- package/src/mobile/color-settings/index.native.js +2 -1
- package/src/mobile/color-settings/palette.screen.native.js +4 -7
- package/src/mobile/color-settings/picker-screen.native.js +1 -1
- package/src/mobile/focal-point-settings-panel/index.native.js +2 -1
- package/src/mobile/gradient/index.native.js +1 -1
- package/src/mobile/image/icon-customize.native.js +1 -1
- package/src/mobile/image/icon-retry.native.js +2 -2
- package/src/mobile/image/image-editing-button.native.js +2 -2
- package/src/mobile/image/index.native.js +2 -2
- package/src/mobile/link-picker/index.native.js +2 -1
- package/src/mobile/link-picker/link-picker-results.native.js +2 -1
- package/src/mobile/link-settings/link-rel.native.js +1 -1
- package/src/mobile/media-edit/index.native.js +5 -1
- package/src/mobile/picker/index.android.js +4 -3
- package/src/mobile/picker/index.ios.js +1 -1
- package/src/mobile/segmented-control/index.native.js +1 -1
- package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -14
- package/src/notice/stories/index.story.tsx +1 -1
- package/src/palette-edit/test/index.tsx +15 -11
- package/src/panel/actions.native.js +1 -1
- package/src/popover/index.tsx +1 -1
- package/src/private-apis.ts +0 -2
- package/src/progress-bar/README.md +39 -5
- package/src/progress-bar/index.tsx +21 -8
- package/src/progress-bar/stories/index.story.tsx +36 -3
- package/src/progress-bar/styles.ts +4 -2
- package/src/query-controls/index.native.js +2 -1
- package/src/search-control/index.native.js +3 -2
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -2
- package/src/slot-fill/provider.tsx +2 -2
- package/src/snackbar/list.tsx +3 -3
- package/src/tab-panel/index.tsx +1 -1
- package/src/tab-panel/style.scss +16 -0
- package/src/tabs/stories/index.story.tsx +39 -31
- package/src/tabs/styles.ts +43 -34
- package/src/tabs/tablist.tsx +132 -3
- package/src/text/styles.ts +1 -0
- package/src/text/test/__snapshots__/index.tsx.snap +2 -0
- package/src/theme/stories/index.story.tsx +0 -1
- package/src/tools-panel/stories/index.story.tsx +1 -1
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/tooltip/index.tsx +1 -4
- package/src/tooltip/test/index.native.js +1 -5
- package/src/unit-control/test/index.tsx +12 -12
- package/src/utils/style-mixins.js +0 -1
- package/tsconfig.json +1 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/mobile/audio-player/audio-url-parser.native.js +0 -24
- package/build/mobile/audio-player/audio-url-parser.native.js.map +0 -1
- package/build/mobile/audio-player/index.native.js +0 -163
- package/build/mobile/audio-player/index.native.js.map +0 -1
- package/build/mobile/global-styles-context/index.native.js +0 -68
- package/build/mobile/global-styles-context/index.native.js.map +0 -1
- package/build/mobile/global-styles-context/utils.native.js +0 -405
- package/build/mobile/global-styles-context/utils.native.js.map +0 -1
- package/build/utils/reduce-motion.js +0 -38
- package/build/utils/reduce-motion.js.map +0 -1
- package/build-module/mobile/audio-player/audio-url-parser.native.js +0 -16
- package/build-module/mobile/audio-player/audio-url-parser.native.js.map +0 -1
- package/build-module/mobile/audio-player/index.native.js +0 -155
- package/build-module/mobile/audio-player/index.native.js.map +0 -1
- package/build-module/mobile/global-styles-context/index.native.js +0 -58
- package/build-module/mobile/global-styles-context/index.native.js.map +0 -1
- package/build-module/mobile/global-styles-context/utils.native.js +0 -387
- package/build-module/mobile/global-styles-context/utils.native.js.map +0 -1
- package/build-module/utils/reduce-motion.js +0 -32
- package/build-module/utils/reduce-motion.js.map +0 -1
- package/build-types/utils/reduce-motion.d.ts +0 -12
- package/build-types/utils/reduce-motion.d.ts.map +0 -1
- package/src/mobile/audio-player/audio-url-parser.native.js +0 -20
- package/src/mobile/audio-player/index.native.js +0 -220
- package/src/mobile/audio-player/styles.scss +0 -114
- package/src/mobile/audio-player/test/audio-url-parser.native.js +0 -53
- package/src/mobile/global-styles-context/index.native.js +0 -103
- package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -274
- package/src/mobile/global-styles-context/test/utils.native.js +0 -168
- package/src/mobile/global-styles-context/utils.native.js +0 -510
- package/src/utils/reduce-motion.js +0 -35
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Dimensions","
|
|
1
|
+
{"version":3,"names":["Dimensions","useEffect","useState","useMemo","useCallback","getValueAndUnit","value","unit","regex","splitValue","match","filter","v","valueToConvert","valueUnit","undefined","convertUnitToMobile","containerSize","globalStyles","width","height","fontSize","Number","vw","Math","round","vh","useConvertUnitToMobile","styles","windowSizes","setWindowSizes","get","dimensionsChangeSubscription","addEventListener","onDimensionsChange","remove","window"],"sources":["@wordpress/components/src/mobile/utils/use-unit-converter-to-mobile.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Dimensions } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useState, useMemo, useCallback } from '@wordpress/element';\n\nconst getValueAndUnit = ( value, unit ) => {\n\tconst regex = /(\\d+\\.?\\d*)(.*)/;\n\n\tconst splitValue = `${ value }`\n\t\t?.match( regex )\n\t\t?.filter( ( v ) => v !== '' );\n\n\tif ( splitValue ) {\n\t\treturn {\n\t\t\tvalueToConvert: splitValue[ 1 ],\n\t\t\tvalueUnit: unit || splitValue[ 2 ],\n\t\t};\n\t}\n\treturn undefined;\n};\n\nconst convertUnitToMobile = ( containerSize, globalStyles, value, unit ) => {\n\tconst { width, height } = containerSize;\n\tconst { valueToConvert, valueUnit } = getValueAndUnit( value, unit ) || {};\n\tconst { fontSize = 16 } = globalStyles || {};\n\n\tif ( valueToConvert === undefined ) {\n\t\treturn undefined;\n\t}\n\n\tswitch ( valueUnit ) {\n\t\tcase 'rem':\n\t\tcase 'em':\n\t\t\treturn valueToConvert * fontSize;\n\t\tcase '%':\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t\tcase 'px':\n\t\t\treturn Number( valueToConvert );\n\t\tcase 'vw':\n\t\t\tconst vw = width / 100;\n\t\t\treturn Math.round( valueToConvert * vw );\n\t\tcase 'vh':\n\t\t\tconst vh = height / 100;\n\t\t\treturn Math.round( valueToConvert * vh );\n\t\tdefault:\n\t\t\treturn Number( valueToConvert / 100 ) * width;\n\t}\n};\n\nconst useConvertUnitToMobile = ( value, unit, styles ) => {\n\tconst [ windowSizes, setWindowSizes ] = useState(\n\t\tDimensions.get( 'window' )\n\t);\n\n\tuseEffect( () => {\n\t\tconst dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tonDimensionsChange\n\t\t);\n\n\t\treturn () => {\n\t\t\tdimensionsChangeSubscription.remove();\n\t\t};\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tconst onDimensionsChange = useCallback( ( { window } ) => {\n\t\tsetWindowSizes( window );\n\t}, [] );\n\n\treturn useMemo( () => {\n\t\tconst { valueToConvert, valueUnit } =\n\t\t\tgetValueAndUnit( value, unit ) || {};\n\n\t\treturn convertUnitToMobile(\n\t\t\twindowSizes,\n\t\t\tstyles,\n\t\t\tvalueToConvert,\n\t\t\tvalueUnit\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ windowSizes, value, unit ] );\n};\n\nexport { convertUnitToMobile, useConvertUnitToMobile, getValueAndUnit };\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,SAASC,SAAS,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,WAAW,QAAQ,oBAAoB;AAE9E,MAAMC,eAAe,GAAGA,CAAEC,KAAK,EAAEC,IAAI,KAAM;EAC1C,MAAMC,KAAK,GAAG,iBAAiB;EAE/B,MAAMC,UAAU,GAAI,GAAGH,KAAO,EAAC,EAC5BI,KAAK,CAAEF,KAAM,CAAC,EACdG,MAAM,CAAIC,CAAC,IAAMA,CAAC,KAAK,EAAG,CAAC;EAE9B,IAAKH,UAAU,EAAG;IACjB,OAAO;MACNI,cAAc,EAAEJ,UAAU,CAAE,CAAC,CAAE;MAC/BK,SAAS,EAAEP,IAAI,IAAIE,UAAU,CAAE,CAAC;IACjC,CAAC;EACF;EACA,OAAOM,SAAS;AACjB,CAAC;AAED,MAAMC,mBAAmB,GAAGA,CAAEC,aAAa,EAAEC,YAAY,EAAEZ,KAAK,EAAEC,IAAI,KAAM;EAC3E,MAAM;IAAEY,KAAK;IAAEC;EAAO,CAAC,GAAGH,aAAa;EACvC,MAAM;IAAEJ,cAAc;IAAEC;EAAU,CAAC,GAAGT,eAAe,CAAEC,KAAK,EAAEC,IAAK,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M,MAAO,CAAC;EACzB,CAAC,EAAE,EAAG,CAAC;EAEP,OAAOjC,OAAO,CAAE,MAAM;IACrB,MAAM;MAAEU,cAAc;MAAEC;IAAU,CAAC,GAClCT,eAAe,CAAEC,KAAK,EAAEC,IAAK,CAAC,IAAI,CAAC,CAAC;IAErC,OAAOS,mBAAmB,CACzBa,WAAW,EACXD,MAAM,EACNf,cAAc,EACdC,SACD,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,CAAEe,WAAW,EAAEvB,KAAK,EAAEC,IAAI,CAAG,CAAC;AAClC,CAAC;AAED,SAASS,mBAAmB,EAAEW,sBAAsB,EAAEtB,eAAe","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -21,6 +20,8 @@ import StyleProvider from '../style-provider';
|
|
|
21
20
|
import { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';
|
|
22
21
|
|
|
23
22
|
// Used to track and dismiss the prior modal when another opens unless nested.
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
25
|
const ModalContext = createContext([]);
|
|
25
26
|
|
|
26
27
|
// Used to track body class names applied while modals are open.
|
|
@@ -199,55 +200,66 @@ function UnforwardedModal(props, forwardedRef) {
|
|
|
199
200
|
}
|
|
200
201
|
};
|
|
201
202
|
const modal =
|
|
203
|
+
/*#__PURE__*/
|
|
202
204
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
203
|
-
|
|
205
|
+
_jsx("div", {
|
|
204
206
|
ref: useMergeRefs([ref, forwardedRef]),
|
|
205
207
|
className: clsx('components-modal__screen-overlay', overlayClassName),
|
|
206
208
|
onKeyDown: withIgnoreIMEEvents(handleEscapeKeyDown),
|
|
207
|
-
...(shouldCloseOnClickOutside ? overlayPressHandlers : {})
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
209
|
+
...(shouldCloseOnClickOutside ? overlayPressHandlers : {}),
|
|
210
|
+
children: /*#__PURE__*/_jsx(StyleProvider, {
|
|
211
|
+
document: document,
|
|
212
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
213
|
+
className: clsx('components-modal__frame', sizeClass, className),
|
|
214
|
+
style: style,
|
|
215
|
+
ref: useMergeRefs([constrainedTabbingRef, focusReturnRef, focusOnMount !== 'firstContentElement' ? focusOnMountRef : null]),
|
|
216
|
+
role: role,
|
|
217
|
+
"aria-label": contentLabel,
|
|
218
|
+
"aria-labelledby": contentLabel ? undefined : headingId,
|
|
219
|
+
"aria-describedby": aria.describedby,
|
|
220
|
+
tabIndex: -1,
|
|
221
|
+
onKeyDown: onKeyDown,
|
|
222
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
223
|
+
className: clsx('components-modal__content', {
|
|
224
|
+
'hide-header': __experimentalHideHeader,
|
|
225
|
+
'is-scrollable': hasScrollableContent,
|
|
226
|
+
'has-scrolled-content': hasScrolledContent
|
|
227
|
+
}),
|
|
228
|
+
role: "document",
|
|
229
|
+
onScroll: onContentContainerScroll,
|
|
230
|
+
ref: contentRef,
|
|
231
|
+
"aria-label": hasScrollableContent ? __('Scrollable section') : undefined,
|
|
232
|
+
tabIndex: hasScrollableContent ? 0 : undefined,
|
|
233
|
+
children: [!__experimentalHideHeader && /*#__PURE__*/_jsxs("div", {
|
|
234
|
+
className: "components-modal__header",
|
|
235
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
236
|
+
className: "components-modal__header-heading-container",
|
|
237
|
+
children: [icon && /*#__PURE__*/_jsx("span", {
|
|
238
|
+
className: "components-modal__icon-container",
|
|
239
|
+
"aria-hidden": true,
|
|
240
|
+
children: icon
|
|
241
|
+
}), title && /*#__PURE__*/_jsx("h1", {
|
|
242
|
+
id: headingId,
|
|
243
|
+
className: "components-modal__header-heading",
|
|
244
|
+
children: title
|
|
245
|
+
})]
|
|
246
|
+
}), headerActions, isDismissible && /*#__PURE__*/_jsx(Button, {
|
|
247
|
+
onClick: onRequestClose,
|
|
248
|
+
icon: close,
|
|
249
|
+
label: closeButtonLabel || __('Close')
|
|
250
|
+
})]
|
|
251
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
252
|
+
ref: useMergeRefs([childrenContainerRef, focusOnMount === 'firstContentElement' ? focusOnMountRef : null]),
|
|
253
|
+
children: children
|
|
254
|
+
})]
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
})
|
|
258
|
+
});
|
|
259
|
+
return createPortal( /*#__PURE__*/_jsx(ModalContext.Provider, {
|
|
260
|
+
value: nestedDismissers.current,
|
|
261
|
+
children: modal
|
|
262
|
+
}), document.body);
|
|
251
263
|
}
|
|
252
264
|
|
|
253
265
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","createPortal","useCallback","useEffect","useRef","useState","forwardRef","useLayoutEffect","createContext","useContext","useInstanceId","useFocusReturn","useFocusOnMount","useConstrainedTabbing","useMergeRefs","__","close","getScrollContainer","ariaHelper","Button","StyleProvider","withIgnoreIMEEvents","ModalContext","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","instanceId","Modal","headingId","focusOnMountRef","constrainedTabbingRef","focusReturnRef","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","current","closestScrollContainer","modalize","unmodalize","refOnRequestClose","dismissers","nestedDismissers","push","first","second","nested","shift","_bodyOpenClasses$get","theClass","oneMore","get","set","document","body","classList","add","oneLess","remove","delete","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","e","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","createElement","tabIndex","onScroll","id","onClick","label","Provider","value"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tForwardedRef,\n\tKeyboardEvent,\n\tMutableRefObject,\n\tUIEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nconst ModalContext = createContext<\n\tMutableRefObject< ModalProps[ 'onRequestClose' ] | undefined >[]\n>( [] );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst nestedDismissers = useRef< typeof dismissers >( [] );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\tdismissers.push( refOnRequestClose );\n\t\tconst [ first, second ] = dismissers;\n\t\tif ( second ) {\n\t\t\tfirst?.current?.();\n\t\t}\n\n\t\tconst nested = nestedDismissers.current;\n\t\treturn () => {\n\t\t\tnested[ 0 ]?.current?.();\n\t\t\tdismissers.shift();\n\t\t};\n\t}, [ dismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tonRequestClose();\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers.current }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":";AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAQvB;AACA;AACA;AACA,SACCC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,UAAU,EACVC,eAAe,EACfC,aAAa,EACbC,UAAU,QACJ,oBAAoB;AAC3B,SACCC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,qBAAqB,EACrBC,YAAY,QACN,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,kBAAkB,QAAQ,gBAAgB;;AAEnD;AACA;AACA;AACA,OAAO,KAAKC,UAAU,MAAM,eAAe;AAC3C,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,SAASC,mBAAmB,QAAQ,iCAAiC;;AAErE;AACA,MAAMC,YAAY,GAAGd,aAAa,CAE/B,EAAG,CAAC;;AAEP;AACA,MAAMe,eAAe,GAAG,IAAIC,GAAG,CAAmB,CAAC;AAEnD,SAASC,gBAAgBA,CACxBC,KAAiB,EACjBC,YAA4C,EAC3C;EACD,MAAM;IACLC,iBAAiB,GAAG,YAAY;IAChCC,IAAI,GAAG,QAAQ;IACfC,KAAK,GAAG,IAAI;IACZC,YAAY,GAAG,IAAI;IACnBC,gBAAgB,GAAG,IAAI;IACvBC,yBAAyB,GAAG,IAAI;IAChCC,aAA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KvE,SAAS,EAAC;EAA4C,GACxDL,IAAI,IACL4E,aAAA;IACCvE,SAAS,EAAC,kCAAkC;IAC5C;EAAW,GAETL,IACG,CACN,EACCV,KAAK,IACNsF,aAAA;IACCG,EAAE,EAAGhE,SAAW;IAChBV,SAAS,EAAC;EAAkC,GAE1Cf,KACC,CAED,CAAC,EACJoB,aAAa,EACbhB,aAAa,IACdkF,aAAA,CAACjG,MAAM;IACNqG,OAAO,EAAGjF,cAAgB;IAC1BC,IAAI,EAAGxB,KAAO;IACdyG,KAAK,EACJhF,gBAAgB,IAAI1B,EAAE,CAAE,OAAQ;EAChC,CACD,CAEE,CACL,EAEDqG,aAAA;IACChE,GAAG,EAAGtC,YAAY,CAAE,CACnB8C,oBAAoB,EACpB7B,YAAY,KAAK,qBAAqB,GACnCyB,eAAe,GACf,IAAI,CACN;EAAG,GAEHd,QACE,CACD,CACD,CACS,CACX,CACL;EAED,OAAOzC,YAAY,CAClBmH,aAAA,CAAC9F,YAAY,CAACoG,QAAQ;IAACC,KAAK,EAAGlD,gBAAgB,CAACN;EAAS,GACtDgD,KACoB,CAAC,EACxB/B,QAAQ,CAACC,IACV,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM/B,KAAK,GAAGhD,UAAU,CAAEmB,gBAAiB,CAAC;AAEnD,eAAe6B,KAAK","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["clsx","createPortal","useCallback","useEffect","useRef","useState","forwardRef","useLayoutEffect","createContext","useContext","useInstanceId","useFocusReturn","useFocusOnMount","useConstrainedTabbing","useMergeRefs","__","close","getScrollContainer","ariaHelper","Button","StyleProvider","withIgnoreIMEEvents","jsx","_jsx","jsxs","_jsxs","ModalContext","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","instanceId","Modal","headingId","focusOnMountRef","constrainedTabbingRef","focusReturnRef","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","current","closestScrollContainer","modalize","unmodalize","refOnRequestClose","dismissers","nestedDismissers","push","first","second","nested","shift","_bodyOpenClasses$get","theClass","oneMore","get","set","document","body","classList","add","oneLess","remove","delete","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","e","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","tabIndex","onScroll","id","onClick","label","Provider","value"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type {\n\tForwardedRef,\n\tKeyboardEvent,\n\tMutableRefObject,\n\tUIEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\nconst ModalContext = createContext<\n\tMutableRefObject< ModalProps[ 'onRequestClose' ] | undefined >[]\n>( [] );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst nestedDismissers = useRef< typeof dismissers >( [] );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\tdismissers.push( refOnRequestClose );\n\t\tconst [ first, second ] = dismissers;\n\t\tif ( second ) {\n\t\t\tfirst?.current?.();\n\t\t}\n\n\t\tconst nested = nestedDismissers.current;\n\t\treturn () => {\n\t\t\tnested[ 0 ]?.current?.();\n\t\t\tdismissers.shift();\n\t\t};\n\t}, [ dismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tonRequestClose();\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers.current }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AAQvB;AACA;AACA;AACA,SACCC,YAAY,EACZC,WAAW,EACXC,SAAS,EACTC,MAAM,EACNC,QAAQ,EACRC,UAAU,EACVC,eAAe,EACfC,aAAa,EACbC,UAAU,QACJ,oBAAoB;AAC3B,SACCC,aAAa,EACbC,cAAc,EACdC,eAAe,EACfC,qBAAqB,EACrBC,YAAY,QACN,oBAAoB;AAC3B,SAASC,EAAE,QAAQ,iBAAiB;AACpC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,kBAAkB,QAAQ,gBAAgB;;AAEnD;AACA;AACA;AACA,OAAO,KAAKC,UAAU,MAAM,eAAe;AAC3C,OAAOC,MAAM,MAAM,WAAW;AAC9B,OAAOC,aAAa,MAAM,mBAAmB;AAE7C,SAASC,mBAAmB,QAAQ,iCAAiC;;AAErE;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AACA,MAAMC,YAAY,GAAGlB,aAAa,CAE/B,EAAG,CAAC;;AAEP;AACA,MAAMmB,eAAe,GAAG,IAAIC,GAAG,CAAmB,CAAC;AAEnD,SAASC,gBAAgBA,CACxBC,KAAiB,EACjBC,YAA4C,EAC3C;EACD,MAAM;IACLC,iBAAiB,GAAG,YAAY;IAChCC,IAAI,GAAG,QAAQ;IACfC,KAAK,GAAG,IAAI;IACZC,YAAY,GAAG,IAAI;IACnBC,gBAA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EnD,eAAe6B,KAAK","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -12,7 +11,7 @@ import { focus } from '@wordpress/dom';
|
|
|
12
11
|
/**
|
|
13
12
|
* Internal dependencies
|
|
14
13
|
*/
|
|
15
|
-
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
const noop = () => {};
|
|
17
16
|
const MENU_ITEM_ROLES = ['menuitem', 'menuitemradio', 'menuitemcheckbox'];
|
|
18
17
|
function cycleValue(value, total, offset) {
|
|
@@ -152,14 +151,15 @@ class NavigableContainer extends Component {
|
|
|
152
151
|
forwardedRef,
|
|
153
152
|
...restProps
|
|
154
153
|
} = this.props;
|
|
155
|
-
return
|
|
154
|
+
return /*#__PURE__*/_jsx("div", {
|
|
156
155
|
ref: this.bindContainer,
|
|
157
|
-
...restProps
|
|
158
|
-
|
|
156
|
+
...restProps,
|
|
157
|
+
children: children
|
|
158
|
+
});
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
const forwardedNavigableContainer = (props, ref) => {
|
|
162
|
-
return
|
|
162
|
+
return /*#__PURE__*/_jsx(NavigableContainer, {
|
|
163
163
|
...props,
|
|
164
164
|
forwardedRef: ref
|
|
165
165
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Component","forwardRef","focus","noop","MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","constructor","args","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","tabbable","focusable","focusables","find","index","indexOf","event","cycle","eventToOffset","onNavigate","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","targetHasMenuItemRole","includes","preventDefault","activeElement","ownerDocument","context","nextIndex","length","code","render","children","restProps","createElement","forwardedNavigableContainer","displayName"],"sources":["@wordpress/components/src/navigable-container/container.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport type { NavigableContainerProps } from './types';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value: number, total: number, offset: number ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component< NavigableContainerProps > {\n\tcontainer?: HTMLDivElement;\n\n\tconstructor( args: NavigableContainerProps ) {\n\t\tsuper( args );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tbindContainer( ref: HTMLDivElement ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target: Element ) {\n\t\tif ( ! this.container ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables: Element[], target: Element ) {\n\t\treturn focusables.indexOf( target );\n\t}\n\n\tonKeyDown( event: KeyboardEvent ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = (\n\t\t\t\tevent.target as HTMLDivElement | null\n\t\t\t )?.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\t!! targetRole && MENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\tif ( targetHasMenuItemRole ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = ( event.target as HTMLElement | null )\n\t\t\t?.ownerDocument?.activeElement;\n\t\tif ( ! activeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tif ( event.code === 'Tab' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = (\n\tprops: NavigableContainerProps,\n\tref: ForwardedRef< HTMLDivElement >\n) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,UAAU,QAAQ,oBAAoB;AAC1D,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;;AAGA,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,MAAMC,eAAe,GAAG,CAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,CAAE;AAE3E,SAASC,UA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S;MACTwB,KAAK;MACLT,mBAAmB;MACnBJ,YAAY;MACZ,GAAGgC;IACJ,CAAC,GAAG,IAAI,CAAC/B,KAAK;IACd,OACCgC,aAAA;MAAKlC,GAAG,EAAG,IAAI,CAACR,aAAe;MAAA,GAAMyC;IAAS,GAC3CD,QACE,CAAC;EAER;AACD;AAEA,MAAMG,2BAA2B,GAAGA,CACnCjC,KAA8B,EAC9BF,GAAmC,KAC/B;EACJ,OAAOkC,aAAA,CAAC/C,kBAAkB;IAAA,GAAMe,KAAK;IAAGD,YAAY,EAAGD;EAAK,CAAE,CAAC;AAChE,CAAC;AACDmC,2BAA2B,CAACC,WAAW,GAAG,oBAAoB;AAE9D,eAAe1D,UAAU,CAAEyD,2BAA4B,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Component","forwardRef","focus","jsx","_jsx","noop","MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","constructor","args","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","tabbable","focusable","focusables","find","index","indexOf","event","cycle","eventToOffset","onNavigate","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","targetHasMenuItemRole","includes","preventDefault","activeElement","ownerDocument","context","nextIndex","length","code","render","children","restProps","forwardedNavigableContainer","displayName"],"sources":["@wordpress/components/src/navigable-container/container.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport type { NavigableContainerProps } from './types';\n\nconst noop = () => {};\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value: number, total: number, offset: number ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component< NavigableContainerProps > {\n\tcontainer?: HTMLDivElement;\n\n\tconstructor( args: NavigableContainerProps ) {\n\t\tsuper( args );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tif ( ! this.container ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t}\n\n\tbindContainer( ref: HTMLDivElement ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( typeof forwardedRef === 'function' ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target: Element ) {\n\t\tif ( ! this.container ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables: Element[], target: Element ) {\n\t\treturn focusables.indexOf( target );\n\t}\n\n\tonKeyDown( event: KeyboardEvent ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = (\n\t\t\t\tevent.target as HTMLDivElement | null\n\t\t\t )?.getAttribute( 'role' );\n\t\t\tconst targetHasMenuItemRole =\n\t\t\t\t!! targetRole && MENU_ITEM_ROLES.includes( targetRole );\n\n\t\t\tif ( targetHasMenuItemRole ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = ( event.target as HTMLElement | null )\n\t\t\t?.ownerDocument?.activeElement;\n\t\tif ( ! activeElement ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext( activeElement );\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\n\t\t\t// `preventDefault()` on tab to avoid having the browser move the focus\n\t\t\t// after this component has already moved it.\n\t\t\tif ( event.code === 'Tab' ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tchildren,\n\t\t\tstopNavigationEvents,\n\t\t\teventToOffset,\n\t\t\tonNavigate,\n\t\t\tonKeyDown,\n\t\t\tcycle,\n\t\t\tonlyBrowserTabstops,\n\t\t\tforwardedRef,\n\t\t\t...restProps\n\t\t} = this.props;\n\t\treturn (\n\t\t\t<div ref={ this.bindContainer } { ...restProps }>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = (\n\tprops: NavigableContainerProps,\n\tref: ForwardedRef< HTMLDivElement >\n) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,SAAS,EAAEC,UAAU,QAAQ,oBAAoB;AAC1D,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACrB,MAAMC,eAAe,GAAG,CAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,CAAE;AAE3E,SAASC,UAAUA,CAAEC,KAAa,EAAEC,KAAa,EAAEC,MAAc,EAAG;EACnE,MAAMC,SAAS,GAAGH,KAAK,GAAGE,MAAM;EAChC,IAAKC,SAAS,GAAG,CAAC,EAAG;IACpB,OAAOF,KAAK,GAAGE,SAAS;EACzB,CAAC,MAAM,IAAKA,SAAS,IAAIF,KAAK,EAAG;IAChC,OAAOE,SAAS,GAAGF,KAAK;EACzB;EAEA,OAAOE,SAAS;AACjB;AAEA,MAAMC,kBAAkB,SAASZ,SAAS,CAA4B;EAGrEa,WAAWA,CAAEC,IAA6B,EAAG;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Y,EAAGD;EAAK,CAAE,CAAC;AAChE,CAAC;AACDkC,2BAA2B,CAACC,WAAW,GAAG,oBAAoB;AAE9D,eAAe3D,UAAU,CAAE0D,2BAA4B,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -12,6 +11,7 @@ import { forwardRef } from '@wordpress/element';
|
|
|
12
11
|
* Internal dependencies
|
|
13
12
|
*/
|
|
14
13
|
import NavigableContainer from './container';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
export function UnforwardedNavigableMenu({
|
|
16
16
|
role = 'menu',
|
|
17
17
|
orientation = 'vertical',
|
|
@@ -43,7 +43,7 @@ export function UnforwardedNavigableMenu({
|
|
|
43
43
|
}
|
|
44
44
|
return undefined;
|
|
45
45
|
};
|
|
46
|
-
return
|
|
46
|
+
return /*#__PURE__*/_jsx(NavigableContainer, {
|
|
47
47
|
ref: ref,
|
|
48
48
|
stopNavigationEvents: true,
|
|
49
49
|
onlyBrowserTabstops: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","NavigableContainer","UnforwardedNavigableMenu","role","orientation","rest","ref","eventToOffset","evt","code","next","previous","includes","undefined","
|
|
1
|
+
{"version":3,"names":["forwardRef","NavigableContainer","jsx","_jsx","UnforwardedNavigableMenu","role","orientation","rest","ref","eventToOffset","evt","code","next","previous","includes","undefined","stopNavigationEvents","onlyBrowserTabstops","NavigableMenu"],"sources":["@wordpress/components/src/navigable-container/menu.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { NavigableMenuProps } from './types';\n\nexport function UnforwardedNavigableMenu(\n\t{ role = 'menu', orientation = 'vertical', ...rest }: NavigableMenuProps,\n\tref: ForwardedRef< any >\n) {\n\tconst eventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code } = evt;\n\n\t\tlet next = [ 'ArrowDown' ];\n\t\tlet previous = [ 'ArrowUp' ];\n\n\t\tif ( orientation === 'horizontal' ) {\n\t\t\tnext = [ 'ArrowRight' ];\n\t\t\tprevious = [ 'ArrowLeft' ];\n\t\t}\n\n\t\tif ( orientation === 'both' ) {\n\t\t\tnext = [ 'ArrowRight', 'ArrowDown' ];\n\t\t\tprevious = [ 'ArrowLeft', 'ArrowUp' ];\n\t\t}\n\n\t\tif ( next.includes( code ) ) {\n\t\t\treturn 1;\n\t\t} else if ( previous.includes( code ) ) {\n\t\t\treturn -1;\n\t\t} else if (\n\t\t\t[ 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight' ].includes(\n\t\t\t\tcode\n\t\t\t)\n\t\t) {\n\t\t\t// Key press should be handled, e.g. have event propagation and\n\t\t\t// default behavior handled by NavigableContainer but not result\n\t\t\t// in an offset.\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops={ false }\n\t\t\trole={ role }\n\t\t\taria-orientation={\n\t\t\t\trole !== 'presentation' &&\n\t\t\t\t( orientation === 'vertical' || orientation === 'horizontal' )\n\t\t\t\t\t? orientation\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\teventToOffset={ eventToOffset }\n\t\t\t{ ...rest }\n\t\t/>\n\t);\n}\n\n/**\n * A container for a navigable menu.\n *\n * ```jsx\n * import {\n * NavigableMenu,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyNavigableContainer = () => (\n * <div>\n * <span>Navigable Menu:</span>\n * <NavigableMenu onNavigate={ onNavigate } orientation=\"horizontal\">\n * <Button variant=\"secondary\">Item 1</Button>\n * <Button variant=\"secondary\">Item 2</Button>\n * <Button variant=\"secondary\">Item 3</Button>\n * </NavigableMenu>\n * </div>\n * );\n * ```\n */\nexport const NavigableMenu = forwardRef( UnforwardedNavigableMenu );\n\nexport default NavigableMenu;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG7C,OAAO,SAASC,wBAAwBA,CACvC;EAAEC,IAAI,GAAG,MAAM;EAAEC,WAAW,GAAG,UAAU;EAAE,GAAGC;AAAyB,CAAC,EACxEC,GAAwB,EACvB;EACD,MAAMC,aAAa,GAAKC,GAAkB,IAAM;IAC/C,MAAM;MAAEC;IAAK,CAAC,GAAGD,GAAG;IAEpB,IAAIE,IAAI,GAAG,CAAE,WAAW,CAAE;IAC1B,IAAIC,QAAQ,GAAG,CAAE,SAAS,CAAE;IAE5B,IAAKP,WAAW,KAAK,YAAY,EAAG;MACnCM,IAAI,GAAG,CAAE,YAAY,CAAE;MACvBC,QAAQ,GAAG,CAAE,WAAW,CAAE;IAC3B;IAEA,IAAKP,WAAW,KAAK,MAAM,EAAG;MAC7BM,IAAI,GAAG,CAAE,YAAY,EAAE,WAAW,CAAE;MACpCC,QAAQ,GAAG,CAAE,WAAW,EAAE,SAAS,CAAE;IACtC;IAEA,IAAKD,IAAI,CAACE,QAAQ,CAAEH,IAAK,CAAC,EAAG;MAC5B,OAAO,CAAC;IACT,CAAC,MAAM,IAAKE,QAAQ,CAACC,QAAQ,CAAEH,IAAK,CAAC,EAAG;MACvC,OAAO,CAAC,CAAC;IACV,CAAC,MAAM,IACN,CAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,CAAE,CAACG,QAAQ,CAC7DH,IACD,CAAC,EACA;MACD;MACA;MACA;MACA,OAAO,CAAC;IACT;IAEA,OAAOI,SAAS;EACjB,CAAC;EAED,oBACCZ,IAAA,CAACF,kBAAkB;IAClBO,GAAG,EAAGA,GAAK;IACXQ,oBAAoB;IACpBC,mBAAmB,EAAG,KAAO;IAC7BZ,IAAI,EAAGA,IAAM;IACb,oBACCA,IAAI,KAAK,cAAc,KACrBC,WAAW,KAAK,UAAU,IAAIA,WAAW,KAAK,YAAY,CAAE,GAC3DA,WAAW,GACXS,SACH;IACDN,aAAa,EAAGA,aAAe;IAAA,GAC1BF;EAAI,CACT,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMW,aAAa,GAAGlB,UAAU,CAAEI,wBAAyB,CAAC;AAEnE,eAAec,aAAa","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -12,6 +11,7 @@ import { forwardRef } from '@wordpress/element';
|
|
|
12
11
|
* Internal dependencies
|
|
13
12
|
*/
|
|
14
13
|
import NavigableContainer from './container';
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
export function UnforwardedTabbableContainer({
|
|
16
16
|
eventToOffset,
|
|
17
17
|
...props
|
|
@@ -41,7 +41,7 @@ export function UnforwardedTabbableContainer({
|
|
|
41
41
|
}
|
|
42
42
|
return undefined;
|
|
43
43
|
};
|
|
44
|
-
return
|
|
44
|
+
return /*#__PURE__*/_jsx(NavigableContainer, {
|
|
45
45
|
ref: ref,
|
|
46
46
|
stopNavigationEvents: true,
|
|
47
47
|
onlyBrowserTabstops: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","NavigableContainer","UnforwardedTabbableContainer","eventToOffset","props","ref","innerEventToOffset","evt","code","shiftKey","undefined","
|
|
1
|
+
{"version":3,"names":["forwardRef","NavigableContainer","jsx","_jsx","UnforwardedTabbableContainer","eventToOffset","props","ref","innerEventToOffset","evt","code","shiftKey","undefined","stopNavigationEvents","onlyBrowserTabstops","TabbableContainer"],"sources":["@wordpress/components/src/navigable-container/tabbable.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\nimport type { TabbableContainerProps } from './types';\n\nexport function UnforwardedTabbableContainer(\n\t{ eventToOffset, ...props }: TabbableContainerProps,\n\tref: ForwardedRef< any >\n) {\n\tconst innerEventToOffset = ( evt: KeyboardEvent ) => {\n\t\tconst { code, shiftKey } = evt;\n\t\tif ( 'Tab' === code ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\n\t\treturn undefined;\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\n/**\n * A container for tabbable elements.\n *\n * ```jsx\n * import {\n * TabbableContainer,\n * Button,\n * } from '@wordpress/components';\n *\n * function onNavigate( index, target ) {\n * console.log( `Navigates to ${ index }`, target );\n * }\n *\n * const MyTabbableContainer = () => (\n * <div>\n * <span>Tabbable Container:</span>\n * <TabbableContainer onNavigate={ onNavigate }>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 1\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 2\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 3\n * </Button>\n * <Button variant=\"secondary\" tabIndex=\"0\">\n * Section 4\n * </Button>\n * </TabbableContainer>\n * </div>\n * );\n * ```\n */\nexport const TabbableContainer = forwardRef( UnforwardedTabbableContainer );\n\nexport default TabbableContainer;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,kBAAkB,MAAM,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG7C,OAAO,SAASC,4BAA4BA,CAC3C;EAAEC,aAAa;EAAE,GAAGC;AAA8B,CAAC,EACnDC,GAAwB,EACvB;EACD,MAAMC,kBAAkB,GAAKC,GAAkB,IAAM;IACpD,MAAM;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGF,GAAG;IAC9B,IAAK,KAAK,KAAKC,IAAI,EAAG;MACrB,OAAOC,QAAQ,GAAG,CAAC,CAAC,GAAG,CAAC;IACzB;;IAEA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,IAAKN,aAAa,EAAG;MACpB,OAAOA,aAAa,CAAEI,GAAI,CAAC;IAC5B;IAEA,OAAOG,SAAS;EACjB,CAAC;EAED,oBACCT,IAAA,CAACF,kBAAkB;IAClBM,GAAG,EAAGA,GAAK;IACXM,oBAAoB;IACpBC,mBAAmB;IACnBT,aAAa,EAAGG,kBAAoB;IAAA,GAC/BF;EAAK,CACV,CAAC;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMS,iBAAiB,GAAGf,UAAU,CAAEI,4BAA6B,CAAC;AAE3E,eAAeW,iBAAiB","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -15,6 +14,8 @@ import { Icon, chevronLeft, chevronRight } from '@wordpress/icons';
|
|
|
15
14
|
*/
|
|
16
15
|
import { useNavigationContext } from '../context';
|
|
17
16
|
import { MenuBackButtonUI } from '../styles/navigation-styles';
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
function UnforwardedNavigationBackButton({
|
|
19
20
|
backButtonLabel,
|
|
20
21
|
className,
|
|
@@ -38,15 +39,16 @@ function UnforwardedNavigationBackButton({
|
|
|
38
39
|
}
|
|
39
40
|
};
|
|
40
41
|
const icon = isRTL() ? chevronRight : chevronLeft;
|
|
41
|
-
return
|
|
42
|
+
return /*#__PURE__*/_jsxs(MenuBackButtonUI, {
|
|
42
43
|
className: classes,
|
|
43
44
|
href: href,
|
|
44
45
|
variant: "tertiary",
|
|
45
46
|
ref: ref,
|
|
46
|
-
onClick: handleOnClick
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
onClick: handleOnClick,
|
|
48
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
49
|
+
icon: icon
|
|
50
|
+
}), backButtonLabel || parentMenuTitle || __('Back')]
|
|
51
|
+
});
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","forwardRef","__","isRTL","Icon","chevronLeft","chevronRight","useNavigationContext","MenuBackButtonUI","UnforwardedNavigationBackButton","backButtonLabel","className","href","onClick","parentMenu","ref","setActiveMenu","navigationTree","classes","parentMenuTitle","undefined","getMenu","title","handleOnClick","event","animationDirection","defaultPrevented","icon","
|
|
1
|
+
{"version":3,"names":["clsx","forwardRef","__","isRTL","Icon","chevronLeft","chevronRight","useNavigationContext","MenuBackButtonUI","jsx","_jsx","jsxs","_jsxs","UnforwardedNavigationBackButton","backButtonLabel","className","href","onClick","parentMenu","ref","setActiveMenu","navigationTree","classes","parentMenuTitle","undefined","getMenu","title","handleOnClick","event","animationDirection","defaultPrevented","icon","variant","children","NavigationBackButton"],"sources":["@wordpress/components/src/navigation/back-button/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { __, isRTL } from '@wordpress/i18n';\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { useNavigationContext } from '../context';\nimport { MenuBackButtonUI } from '../styles/navigation-styles';\n\nimport type { NavigationBackButtonProps } from '../types';\n\nfunction UnforwardedNavigationBackButton(\n\t{\n\t\tbackButtonLabel,\n\t\tclassName,\n\t\thref,\n\t\tonClick,\n\t\tparentMenu,\n\t}: NavigationBackButtonProps,\n\tref: React.ForwardedRef< HTMLAnchorElement | HTMLButtonElement >\n) {\n\tconst { setActiveMenu, navigationTree } = useNavigationContext();\n\n\tconst classes = clsx( 'components-navigation__back-button', className );\n\n\tconst parentMenuTitle =\n\t\tparentMenu !== undefined\n\t\t\t? navigationTree.getMenu( parentMenu )?.title\n\t\t\t: undefined;\n\n\tconst handleOnClick: React.MouseEventHandler< HTMLElement > = ( event ) => {\n\t\tif ( typeof onClick === 'function' ) {\n\t\t\tonClick( event );\n\t\t}\n\n\t\tconst animationDirection = isRTL() ? 'left' : 'right';\n\t\tif ( parentMenu && ! event.defaultPrevented ) {\n\t\t\tsetActiveMenu( parentMenu, animationDirection );\n\t\t}\n\t};\n\tconst icon = isRTL() ? chevronRight : chevronLeft;\n\treturn (\n\t\t<MenuBackButtonUI\n\t\t\tclassName={ classes }\n\t\t\thref={ href }\n\t\t\tvariant=\"tertiary\"\n\t\t\tref={ ref }\n\t\t\tonClick={ handleOnClick }\n\t\t>\n\t\t\t<Icon icon={ icon } />\n\t\t\t{ backButtonLabel || parentMenuTitle || __( 'Back' ) }\n\t\t</MenuBackButtonUI>\n\t);\n}\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport const NavigationBackButton = forwardRef(\n\tUnforwardedNavigationBackButton\n);\n\nexport default NavigationBackButton;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;AACvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,EAAE,EAAEC,KAAK,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,EAAEC,WAAW,EAAEC,YAAY,QAAQ,kBAAkB;;AAElE;AACA;AACA;AACA,SAASC,oBAAoB,QAAQ,YAAY;AACjD,SAASC,gBAAgB,QAAQ,6BAA6B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAI/D,SAASC,+BAA+BA,CACvC;EACCC,eAAe;EACfC,SAAS;EACTC,IAAI;EACJC,OAAO;EACPC;AAC0B,CAAC,EAC5BC,GAAgE,EAC/D;EACD,MAAM;IAAEC,aAAa;IAAEC;EAAe,CAAC,GAAGd,oBAAoB,CAAC,CAAC;EAEhE,MAAMe,OAAO,GAAGtB,IAAI,CAAE,oCAAoC,EAAEe,SAAU,CAAC;EAEvE,MAAMQ,eAAe,GACpBL,UAAU,KAAKM,SAAS,GACrBH,cAAc,CAACI,OAAO,CAAEP,UAAW,CAAC,EAAEQ,KAAK,GAC3CF,SAAS;EAEb,MAAMG,aAAqD,GAAKC,KAAK,IAAM;IAC1E,IAAK,OAAOX,OAAO,KAAK,UAAU,EAAG;MACpCA,OAAO,CAAEW,KAAM,CAAC;IACjB;IAEA,MAAMC,kBAAkB,GAAG1B,KAAK,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO;IACrD,IAAKe,UAAU,IAAI,CAAEU,KAAK,CAACE,gBAAgB,EAAG;MAC7CV,aAAa,CAAEF,UAAU,EAAEW,kBAAmB,CAAC;IAChD;EACD,CAAC;EACD,MAAME,IAAI,GAAG5B,KAAK,CAAC,CAAC,GAAGG,YAAY,GAAGD,WAAW;EACjD,oBACCO,KAAA,CAACJ,gBAAgB;IAChBO,SAAS,EAAGO,OAAS;IACrBN,IAAI,EAAGA,IAAM;IACbgB,OAAO,EAAC,UAAU;IAClBb,GAAG,EAAGA,GAAK;IACXF,OAAO,EAAGU,aAAe;IAAAM,QAAA,gBAEzBvB,IAAA,CAACN,IAAI;MAAC2B,IAAI,EAAGA;IAAM,CAAE,CAAC,EACpBjB,eAAe,IAAIS,eAAe,IAAIrB,EAAE,CAAE,MAAO,CAAC;EAAA,CACnC,CAAC;AAErB;;AAEA;AACA;AACA;AACA,OAAO,MAAMgC,oBAAoB,GAAGjC,UAAU,CAC7CY,+BACD,CAAC;AAED,eAAeqB,oBAAoB","ignoreList":[]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement } from "react";
|
|
2
1
|
/**
|
|
3
2
|
* External dependencies
|
|
4
3
|
*/
|
|
@@ -15,6 +14,8 @@ import { useState } from '@wordpress/element';
|
|
|
15
14
|
import { NavigationGroupContext } from './context';
|
|
16
15
|
import { GroupTitleUI } from '../styles/navigation-styles';
|
|
17
16
|
import { useNavigationContext } from '../context';
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
19
|
let uniqueId = 0;
|
|
19
20
|
|
|
20
21
|
/**
|
|
@@ -37,24 +38,29 @@ export function NavigationGroup({
|
|
|
37
38
|
|
|
38
39
|
// Keep the children rendered to make sure invisible items are included in the navigation tree.
|
|
39
40
|
if (!Object.values(items).some(item => item.group === groupId && item._isVisible)) {
|
|
40
|
-
return
|
|
41
|
-
value: context
|
|
42
|
-
|
|
41
|
+
return /*#__PURE__*/_jsx(NavigationGroupContext.Provider, {
|
|
42
|
+
value: context,
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
43
45
|
}
|
|
44
46
|
const groupTitleId = `components-navigation__group-title-${groupId}`;
|
|
45
47
|
const classes = clsx('components-navigation__group', className);
|
|
46
|
-
return
|
|
47
|
-
value: context
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
return /*#__PURE__*/_jsx(NavigationGroupContext.Provider, {
|
|
49
|
+
value: context,
|
|
50
|
+
children: /*#__PURE__*/_jsxs("li", {
|
|
51
|
+
className: classes,
|
|
52
|
+
children: [title && /*#__PURE__*/_jsx(GroupTitleUI, {
|
|
53
|
+
className: "components-navigation__group-title",
|
|
54
|
+
id: groupTitleId,
|
|
55
|
+
level: 3,
|
|
56
|
+
children: title
|
|
57
|
+
}), /*#__PURE__*/_jsx("ul", {
|
|
58
|
+
"aria-labelledby": groupTitleId,
|
|
59
|
+
role: "group",
|
|
60
|
+
children: children
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
});
|
|
58
64
|
}
|
|
59
65
|
export default NavigationGroup;
|
|
60
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["clsx","useState","NavigationGroupContext","GroupTitleUI","useNavigationContext","uniqueId","NavigationGroup","children","className","title","groupId","navigationTree","items","context","group","Object","values","some","item","_isVisible","
|
|
1
|
+
{"version":3,"names":["clsx","useState","NavigationGroupContext","GroupTitleUI","useNavigationContext","jsx","_jsx","jsxs","_jsxs","uniqueId","NavigationGroup","children","className","title","groupId","navigationTree","items","context","group","Object","values","some","item","_isVisible","Provider","value","groupTitleId","classes","id","level","role"],"sources":["@wordpress/components/src/navigation/group/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { NavigationGroupContext } from './context';\nimport { GroupTitleUI } from '../styles/navigation-styles';\nimport { useNavigationContext } from '../context';\n\nimport type { NavigationGroupProps } from '../types';\n\nlet uniqueId = 0;\n\n/**\n * @deprecated Use `Navigator` instead.\n */\nexport function NavigationGroup( {\n\tchildren,\n\tclassName,\n\ttitle,\n}: NavigationGroupProps ) {\n\tconst [ groupId ] = useState( `group-${ ++uniqueId }` );\n\tconst {\n\t\tnavigationTree: { items },\n\t} = useNavigationContext();\n\n\tconst context = { group: groupId };\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif (\n\t\t! Object.values( items ).some(\n\t\t\t( item ) => item.group === groupId && item._isVisible\n\t\t)\n\t) {\n\t\treturn (\n\t\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationGroupContext.Provider>\n\t\t);\n\t}\n\n\tconst groupTitleId = `components-navigation__group-title-${ groupId }`;\n\tconst classes = clsx( 'components-navigation__group', className );\n\n\treturn (\n\t\t<NavigationGroupContext.Provider value={ context }>\n\t\t\t<li className={ classes }>\n\t\t\t\t{ title && (\n\t\t\t\t\t<GroupTitleUI\n\t\t\t\t\t\tclassName=\"components-navigation__group-title\"\n\t\t\t\t\t\tid={ groupTitleId }\n\t\t\t\t\t\tlevel={ 3 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ title }\n\t\t\t\t\t</GroupTitleUI>\n\t\t\t\t) }\n\t\t\t\t<ul aria-labelledby={ groupTitleId } role=\"group\">\n\t\t\t\t\t{ children }\n\t\t\t\t</ul>\n\t\t\t</li>\n\t\t</NavigationGroupContext.Provider>\n\t);\n}\n\nexport default NavigationGroup;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,QAAQ,QAAQ,oBAAoB;;AAE7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