@wordpress/components 25.1.0 → 25.1.2
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 +29 -1
- package/README.md +1 -1
- package/build/alignment-matrix-control/cell.js +4 -5
- package/build/alignment-matrix-control/cell.js.map +1 -1
- package/build/alignment-matrix-control/icon.js +2 -4
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +6 -7
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +4 -7
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js +2 -4
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +28 -1
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/index.js +0 -20
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/index.js +2 -4
- package/build/base-control/index.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js +4 -6
- 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 +2 -4
- 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 +15 -13
- 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 -6
- package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build/border-control/border-control/component.js +4 -6
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +4 -6
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js +2 -4
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/box-control/all-input-control.js +2 -4
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +2 -4
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/icon.js +4 -7
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js +7 -6
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js +2 -4
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/linked-button.js +2 -4
- package/build/box-control/linked-button.js.map +1 -1
- package/build/box-control/unit-control.js +6 -6
- package/build/box-control/unit-control.js.map +1 -1
- package/build/button/deprecated.js +2 -4
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +20 -7
- package/build/button/index.js.map +1 -1
- package/build/button-group/index.js +4 -5
- package/build/button-group/index.js.map +1 -1
- package/build/card/card/component.js +2 -4
- package/build/card/card/component.js.map +1 -1
- package/build/card/card-body/component.js +4 -8
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-divider/component.js +2 -6
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-footer/component.js +2 -6
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-header/component.js +2 -6
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-media/component.js +2 -6
- package/build/card/card-media/component.js.map +1 -1
- package/build/checkbox-control/index.js +4 -5
- package/build/checkbox-control/index.js.map +1 -1
- package/build/circular-option-picker/index.js +19 -16
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/clipboard-button/index.js +9 -20
- package/build/clipboard-button/index.js.map +1 -1
- package/build/clipboard-button/types.js +6 -0
- package/build/clipboard-button/types.js.map +1 -0
- package/build/color-control/index.native.js +4 -5
- package/build/color-control/index.native.js.map +1 -1
- package/build/color-indicator/index.js +4 -5
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-palette/index.js +11 -11
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/color-input.js +6 -3
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +4 -5
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/legacy-adapter.js +2 -1
- package/build/color-picker/legacy-adapter.js.map +1 -1
- package/build/confirm-dialog/component.js +13 -6
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-select-control/index.js +34 -32
- package/build/custom-select-control/index.js.map +1 -1
- package/build/dashicon/index.js +4 -7
- package/build/dashicon/index.js.map +1 -1
- package/build/dashicon/index.native.js +4 -7
- package/build/dashicon/index.native.js.map +1 -1
- package/build/disabled/index.js +4 -7
- package/build/disabled/index.js.map +1 -1
- package/build/divider/component.js +4 -8
- package/build/divider/component.js.map +1 -1
- package/build/drop-zone/index.js +2 -4
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/dropdown-content-wrapper.js +2 -6
- package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build/dropdown/index.js +29 -24
- package/build/dropdown/index.js.map +1 -1
- package/build/dropdown-menu/index.js +98 -93
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +2 -4
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/dropdown-menu-v2/index.js +14 -12
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js +16 -16
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/elevation/component.js +2 -6
- package/build/elevation/component.js.map +1 -1
- package/build/external-link/index.js +2 -4
- package/build/external-link/index.js.map +1 -1
- package/build/flex/flex/component.js +2 -6
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex-block/component.js +2 -6
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-item/component.js +2 -6
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/focal-point-picker/controls.js +4 -7
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/focal-point.js +2 -4
- package/build/focal-point-picker/focal-point.js.map +1 -1
- package/build/focal-point-picker/grid.js +2 -6
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.js +4 -6
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +2 -4
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/media.js +7 -10
- package/build/focal-point-picker/media.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +2 -4
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/focusable-iframe/index.js +4 -5
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/font-size-picker/index.js +5 -3
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/styles.js +19 -26
- package/build/font-size-picker/styles.js.map +1 -1
- package/build/footer-message-control/index.native.js +2 -1
- package/build/footer-message-control/index.native.js.map +1 -1
- package/build/form-file-upload/index.js +4 -5
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-toggle/index.js +4 -5
- package/build/form-toggle/index.js.map +1 -1
- package/build/form-token-field/index.js +4 -5
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/token-input.js +4 -6
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/gradient-picker/index.js +14 -12
- package/build/gradient-picker/index.js.map +1 -1
- package/build/grid/component.js +2 -4
- package/build/grid/component.js.map +1 -1
- package/build/guide/page.js +2 -1
- package/build/guide/page.js.map +1 -1
- package/build/h-stack/component.js +2 -6
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js +4 -7
- package/build/h-stack/hook.js.map +1 -1
- package/build/heading/component.js +2 -6
- package/build/heading/component.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +3 -1
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js +2 -1
- package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +3 -3
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +2 -1
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.js +5 -7
- package/build/higher-order/with-focus-outside/index.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.native.js +5 -7
- package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build/higher-order/with-focus-return/index.js +2 -1
- package/build/higher-order/with-focus-return/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js +3 -4
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js +2 -6
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/icon/index.js +6 -6
- package/build/icon/index.js.map +1 -1
- package/build/input-control/index.js +5 -5
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +3 -4
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js +3 -6
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js +4 -8
- package/build/input-control/input-prefix-wrapper.js.map +1 -1
- package/build/input-control/input-suffix-wrapper.js +4 -8
- package/build/input-control/input-suffix-wrapper.js.map +1 -1
- package/build/input-control/label.js +4 -7
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +2 -4
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/isolated-event-container/index.js +2 -4
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/item/component.js +2 -6
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js +2 -6
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/item-group/styles.js +10 -10
- package/build/item-group/styles.js.map +1 -1
- package/build/menu-item/index.js +4 -5
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
- 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 +2 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +5 -6
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
- package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +8 -8
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/ripple.native.js +4 -6
- package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js +5 -5
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/cycle-select-control/index.native.js +4 -5
- package/build/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/index.native.js +2 -6
- package/build/mobile/global-styles-context/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +4 -5
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/image/image-editing-button.native.js +4 -5
- package/build/mobile/image/image-editing-button.native.js.map +1 -1
- package/build/mobile/image/index.native.js +15 -15
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +4 -6
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
- package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build/mobile/picker/index.ios.js +4 -6
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +4 -5
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/modal/index.js +4 -6
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +6 -9
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/menu.js +4 -5
- package/build/navigable-container/menu.js.map +1 -1
- package/build/navigable-container/tabbable.js +4 -5
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigation/item/base.js +4 -5
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +3 -4
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +4 -7
- package/build/navigator/navigator-back-button/component.js.map +1 -1
- package/build/navigator/navigator-button/component.js +4 -7
- package/build/navigator/navigator-button/component.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +4 -5
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +9 -10
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/navigator-to-parent-button/component.js +4 -7
- package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build/notice/list.js +2 -4
- package/build/notice/list.js.map +1 -1
- package/build/notice/list.native.js +2 -4
- package/build/notice/list.native.js.map +1 -1
- package/build/number-control/index.js +12 -10
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/styles/number-control-styles.js +9 -15
- package/build/number-control/styles/number-control-styles.js.map +1 -1
- package/build/palette-edit/index.js +11 -12
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/body.js +8 -8
- package/build/panel/body.js.map +1 -1
- package/build/placeholder/index.js +2 -4
- package/build/placeholder/index.js.map +1 -1
- package/build/popover/index.js +11 -12
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +15 -1
- package/build/popover/utils.js.map +1 -1
- package/build/query-controls/category-select.js +4 -6
- package/build/query-controls/category-select.js.map +1 -1
- package/build/radio-control/index.js +4 -5
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js +4 -5
- package/build/radio-control/index.native.js.map +1 -1
- package/build/radio-group/index.js +5 -5
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio/index.js +5 -5
- package/build/radio-group/radio/index.js.map +1 -1
- package/build/range-control/index.js +2 -4
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/index.native.js +4 -5
- package/build/range-control/index.native.js.map +1 -1
- package/build/range-control/input-range.js +2 -6
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/mark.js +2 -4
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +6 -7
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/tooltip.js +2 -4
- package/build/range-control/tooltip.js.map +1 -1
- package/build/resizable-box/index.js +5 -5
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js +4 -5
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +4 -7
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/scrollable/component.js +2 -6
- package/build/scrollable/component.js.map +1 -1
- package/build/search-control/index.js +2 -4
- package/build/search-control/index.js.map +1 -1
- package/build/select-control/index.js +4 -5
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/index.native.js +4 -5
- package/build/select-control/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +4 -5
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/index.js +17 -13
- package/build/slot-fill/index.js.map +1 -1
- package/build/slot-fill/index.native.js +10 -9
- package/build/slot-fill/index.native.js.map +1 -1
- package/build/slot-fill/slot.js +2 -4
- package/build/slot-fill/slot.js.map +1 -1
- package/build/snackbar/list.js +2 -4
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js +2 -6
- package/build/spacer/component.js.map +1 -1
- package/build/spinner/index.js +4 -6
- package/build/spinner/index.js.map +1 -1
- package/build/surface/component.js +2 -6
- package/build/surface/component.js.map +1 -1
- package/build/tab-panel/index.js +4 -5
- package/build/tab-panel/index.js.map +1 -1
- package/build/text/component.js +4 -6
- package/build/text/component.js.map +1 -1
- package/build/text-control/index.js +4 -5
- package/build/text-control/index.js.map +1 -1
- package/build/text-control/index.native.js +4 -5
- package/build/text-control/index.native.js.map +1 -1
- package/build/textarea-control/index.js +4 -5
- package/build/textarea-control/index.js.map +1 -1
- package/build/theme/index.js +4 -7
- package/build/theme/index.js.map +1 -1
- package/build/toggle-control/index.native.js +4 -5
- package/build/toggle-control/index.native.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
- 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 +4 -6
- 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 +2 -4
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
- 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 +6 -7
- 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 +2 -4
- package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build/toolbar/toolbar/index.js +9 -13
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.js +9 -13
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +13 -11
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-context/index.js.map +1 -1
- package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
- package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +11 -10
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
- package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
- package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +13 -11
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/toolbar/toolbar-item/types.js +6 -0
- package/build/toolbar/toolbar-item/types.js.map +1 -0
- package/build/tools-panel/tools-panel/component.js +2 -4
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +2 -4
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js +4 -8
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tooltip/index.js +4 -5
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +2 -1
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tree-grid/cell.js +2 -4
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/index.js +2 -4
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-grid/item.js +4 -5
- package/build/tree-grid/item.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js +2 -1
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/tree-grid/row.js +2 -6
- package/build/tree-grid/row.js.map +1 -1
- package/build/tree-select/index.js +4 -7
- package/build/tree-select/index.js.map +1 -1
- package/build/truncate/component.js +4 -6
- package/build/truncate/component.js.map +1 -1
- package/build/ui/control-group/component.js +8 -12
- package/build/ui/control-group/component.js.map +1 -1
- package/build/ui/control-label/component.js +4 -8
- package/build/ui/control-label/component.js.map +1 -1
- package/build/ui/form-group/form-group-content.js +4 -5
- package/build/ui/form-group/form-group-content.js.map +1 -1
- package/build/ui/form-group/form-group-label.js +2 -1
- package/build/ui/form-group/form-group-label.js.map +1 -1
- package/build/ui/form-group/form-group.js +8 -8
- package/build/ui/form-group/form-group.js.map +1 -1
- package/build/ui/shortcut/component.js +4 -7
- package/build/ui/shortcut/component.js.map +1 -1
- package/build/ui/spinner/component.js +2 -6
- package/build/ui/spinner/component.js.map +1 -1
- package/build/ui/tooltip/component.js +3 -4
- package/build/ui/tooltip/component.js.map +1 -1
- package/build/ui/tooltip/content.js +5 -8
- package/build/ui/tooltip/content.js.map +1 -1
- package/build/unit-control/index.js +31 -94
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +7 -7
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/unit-select-control.js +15 -7
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/v-stack/component.js +2 -6
- package/build/v-stack/component.js.map +1 -1
- package/build/visually-hidden/component.js +4 -8
- package/build/visually-hidden/component.js.map +1 -1
- package/build/z-stack/component.js +7 -9
- package/build/z-stack/component.js.map +1 -1
- package/build/z-stack/styles.js +23 -42
- package/build/z-stack/styles.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js +4 -4
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +2 -3
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +6 -6
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +4 -4
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +2 -3
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +27 -2
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/index.js +1 -19
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/index.js +2 -3
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js +4 -5
- 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 +2 -3
- 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 +15 -12
- 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 -3
- package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build-module/border-control/border-control/component.js +4 -5
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +4 -5
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js +2 -3
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/box-control/all-input-control.js +2 -3
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +2 -3
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/icon.js +4 -4
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +7 -5
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +2 -3
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/linked-button.js +2 -3
- package/build-module/box-control/linked-button.js.map +1 -1
- package/build-module/box-control/unit-control.js +6 -5
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/button/deprecated.js +2 -3
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +20 -6
- package/build-module/button/index.js.map +1 -1
- package/build-module/button-group/index.js +4 -4
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/card/card/component.js +2 -3
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card-body/component.js +4 -5
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-divider/component.js +2 -3
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-footer/component.js +2 -3
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-header/component.js +2 -3
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-media/component.js +2 -3
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/checkbox-control/index.js +4 -4
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/index.js +19 -15
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/clipboard-button/index.js +9 -20
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/clipboard-button/types.js +2 -0
- package/build-module/clipboard-button/types.js.map +1 -0
- package/build-module/color-control/index.native.js +4 -4
- package/build-module/color-control/index.native.js.map +1 -1
- package/build-module/color-indicator/index.js +4 -4
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-palette/index.js +11 -10
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/color-input.js +6 -3
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +4 -4
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/legacy-adapter.js +2 -1
- package/build-module/color-picker/legacy-adapter.js.map +1 -1
- package/build-module/confirm-dialog/component.js +14 -6
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-select-control/index.js +34 -31
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/dashicon/index.js +4 -4
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/dashicon/index.native.js +4 -4
- package/build-module/dashicon/index.native.js.map +1 -1
- package/build-module/disabled/index.js +4 -4
- package/build-module/disabled/index.js.map +1 -1
- package/build-module/divider/component.js +4 -5
- package/build-module/divider/component.js.map +1 -1
- package/build-module/drop-zone/index.js +2 -3
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
- package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
- package/build-module/dropdown/index.js +29 -24
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/dropdown-menu/index.js +95 -91
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +2 -3
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/dropdown-menu-v2/index.js +14 -11
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/styles.js +16 -16
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/elevation/component.js +2 -3
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/external-link/index.js +2 -3
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/flex/flex/component.js +2 -3
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex-block/component.js +2 -3
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-item/component.js +2 -3
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +4 -4
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/focal-point.js +2 -3
- package/build-module/focal-point-picker/focal-point.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +2 -3
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.js +4 -5
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +2 -3
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/media.js +7 -7
- package/build-module/focal-point-picker/media.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/focusable-iframe/index.js +4 -4
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/font-size-picker/index.js +5 -4
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/styles.js +17 -23
- package/build-module/font-size-picker/styles.js.map +1 -1
- package/build-module/footer-message-control/index.native.js +2 -1
- package/build-module/footer-message-control/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js +4 -4
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-toggle/index.js +4 -4
- package/build-module/form-toggle/index.js.map +1 -1
- package/build-module/form-token-field/index.js +4 -4
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/token-input.js +4 -5
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/gradient-picker/index.js +14 -11
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/grid/component.js +2 -3
- package/build-module/grid/component.js.map +1 -1
- package/build-module/guide/page.js +2 -1
- package/build-module/guide/page.js.map +1 -1
- package/build-module/h-stack/component.js +2 -3
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js +4 -4
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/heading/component.js +2 -3
- package/build-module/heading/component.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +3 -1
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +3 -2
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +2 -1
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.js +5 -4
- package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
- package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
- package/build-module/higher-order/with-focus-return/index.js +2 -1
- package/build-module/higher-order/with-focus-return/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +3 -3
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js +2 -3
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/icon/index.js +6 -6
- package/build-module/icon/index.js.map +1 -1
- package/build-module/input-control/index.js +5 -4
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +3 -3
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +3 -3
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js +4 -5
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
- package/build-module/input-control/input-suffix-wrapper.js +4 -5
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
- package/build-module/input-control/label.js +4 -4
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +2 -3
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/isolated-event-container/index.js +2 -3
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/item/component.js +2 -3
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js +2 -3
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/item-group/styles.js +10 -10
- package/build-module/item-group/styles.js.map +1 -1
- package/build-module/menu-item/index.js +4 -4
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
- 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 +2 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
- 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 +2 -3
- package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +8 -7
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
- package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +5 -4
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/cycle-select-control/index.native.js +4 -4
- package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
- package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/index.native.js +2 -3
- package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +4 -4
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/image/image-editing-button.native.js +4 -4
- package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +15 -14
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
- 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 +2 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
- 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 -3
- package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js +4 -5
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +4 -4
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +4 -5
- 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 +4 -4
- package/build-module/navigable-container/menu.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +4 -4
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigation/item/base.js +4 -4
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +3 -3
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +4 -4
- package/build-module/navigator/navigator-back-button/component.js.map +1 -1
- package/build-module/navigator/navigator-button/component.js +4 -4
- package/build-module/navigator/navigator-button/component.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +4 -4
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +9 -7
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
- package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
- package/build-module/notice/list.js +2 -3
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/list.native.js +2 -3
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/number-control/index.js +12 -10
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/styles/number-control-styles.js +7 -14
- package/build-module/number-control/styles/number-control-styles.js.map +1 -1
- package/build-module/palette-edit/index.js +11 -11
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/body.js +8 -7
- package/build-module/panel/body.js.map +1 -1
- package/build-module/placeholder/index.js +2 -3
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/popover/index.js +12 -12
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +11 -0
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/query-controls/category-select.js +4 -5
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/radio-control/index.js +4 -4
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js +4 -4
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/radio-group/index.js +5 -4
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio/index.js +5 -4
- package/build-module/radio-group/radio/index.js.map +1 -1
- package/build-module/range-control/index.js +2 -3
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/index.native.js +4 -4
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/range-control/input-range.js +2 -3
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/mark.js +2 -3
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +6 -6
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/tooltip.js +2 -3
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/resizable-box/index.js +5 -4
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +4 -4
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +4 -4
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/scrollable/component.js +2 -3
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/search-control/index.js +2 -3
- package/build-module/search-control/index.js.map +1 -1
- package/build-module/select-control/index.js +4 -4
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/index.native.js +4 -4
- package/build-module/select-control/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/index.js +17 -12
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/slot-fill/index.native.js +10 -8
- package/build-module/slot-fill/index.native.js.map +1 -1
- package/build-module/slot-fill/slot.js +2 -3
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/snackbar/list.js +2 -3
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js +2 -3
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spinner/index.js +4 -5
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/surface/component.js +2 -3
- package/build-module/surface/component.js.map +1 -1
- package/build-module/tab-panel/index.js +4 -4
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/text/component.js +4 -5
- package/build-module/text/component.js.map +1 -1
- package/build-module/text-control/index.js +4 -4
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/text-control/index.native.js +4 -4
- package/build-module/text-control/index.native.js.map +1 -1
- package/build-module/textarea-control/index.js +4 -4
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/theme/index.js +4 -4
- package/build-module/theme/index.js.map +1 -1
- package/build-module/toggle-control/index.native.js +4 -4
- package/build-module/toggle-control/index.native.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
- 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 +4 -5
- 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 +2 -3
- 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 +2 -3
- 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 +6 -6
- 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 +2 -3
- package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +10 -13
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
- package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +13 -10
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-context/index.js.map +1 -1
- package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
- package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +11 -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 +4 -4
- package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
- package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +13 -10
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/types.js +2 -0
- package/build-module/toolbar/toolbar-item/types.js.map +1 -0
- package/build-module/tools-panel/tools-panel/component.js +2 -3
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +2 -3
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js +4 -5
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tooltip/index.js +4 -4
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +2 -1
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/cell.js +2 -3
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/index.js +2 -3
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-grid/item.js +4 -4
- package/build-module/tree-grid/item.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js +2 -1
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/tree-grid/row.js +2 -3
- package/build-module/tree-grid/row.js.map +1 -1
- package/build-module/tree-select/index.js +4 -4
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/truncate/component.js +4 -5
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/ui/control-group/component.js +8 -9
- package/build-module/ui/control-group/component.js.map +1 -1
- package/build-module/ui/control-label/component.js +4 -5
- package/build-module/ui/control-label/component.js.map +1 -1
- package/build-module/ui/form-group/form-group-content.js +4 -4
- package/build-module/ui/form-group/form-group-content.js.map +1 -1
- package/build-module/ui/form-group/form-group-label.js +2 -1
- package/build-module/ui/form-group/form-group-label.js.map +1 -1
- package/build-module/ui/form-group/form-group.js +8 -7
- package/build-module/ui/form-group/form-group.js.map +1 -1
- package/build-module/ui/shortcut/component.js +4 -4
- package/build-module/ui/shortcut/component.js.map +1 -1
- package/build-module/ui/spinner/component.js +2 -3
- package/build-module/ui/spinner/component.js.map +1 -1
- package/build-module/ui/tooltip/component.js +3 -3
- package/build-module/ui/tooltip/component.js.map +1 -1
- package/build-module/ui/tooltip/content.js +5 -5
- package/build-module/ui/tooltip/content.js.map +1 -1
- package/build-module/unit-control/index.js +31 -88
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +7 -6
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +19 -6
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/v-stack/component.js +2 -3
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/visually-hidden/component.js +4 -5
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/z-stack/component.js +7 -6
- package/build-module/z-stack/component.js.map +1 -1
- package/build-module/z-stack/styles.js +22 -44
- package/build-module/z-stack/styles.js.map +1 -1
- package/build-style/style-rtl.css +16 -21
- package/build-style/style.css +16 -21
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts +6 -6
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.d.ts +1 -0
- package/build-types/button/stories/e2e/index.d.ts.map +1 -1
- package/build-types/button/types.d.ts +16 -9
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/circular-option-picker/types.d.ts +2 -2
- package/build-types/circular-option-picker/types.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts +4 -15
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/clipboard-button/types.d.ts +11 -0
- package/build-types/clipboard-button/types.d.ts.map +1 -0
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts +1 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/types.d.ts +7 -0
- package/build-types/dropdown/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.d.ts +4 -3
- package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/types.d.ts +7 -0
- package/build-types/dropdown-menu/types.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/types.d.ts +2 -2
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +0 -6
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/item-group/styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +5 -3
- package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/index.d.ts +0 -1
- package/build-types/popover/stories/index.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +10 -0
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +6 -0
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +6 -6
- package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
- package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
- package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
- package/build-types/unit-control/index.d.ts +3 -6
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.d.ts.map +1 -1
- package/build-types/unit-control/unit-select-control.d.ts +7 -6
- package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.d.ts.map +1 -1
- package/build-types/z-stack/styles.d.ts +5 -4
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/autocomplete/autocompleter-ui.tsx +44 -2
- package/src/autocomplete/index.tsx +2 -32
- package/src/box-control/test/index.tsx +28 -60
- package/src/button/README.md +15 -0
- package/src/button/index.tsx +11 -4
- package/src/button/stories/e2e/index.tsx +22 -0
- package/src/button/style.scss +18 -25
- package/src/button/test/index.tsx +13 -0
- package/src/button/types.ts +17 -9
- package/src/circular-option-picker/types.ts +2 -5
- package/src/clipboard-button/{index.js → index.tsx} +11 -17
- package/src/clipboard-button/types.ts +11 -0
- package/src/confirm-dialog/component.tsx +12 -2
- package/src/confirm-dialog/stories/index.js +8 -15
- package/src/confirm-dialog/test/index.js +42 -0
- package/src/dropdown/index.tsx +20 -10
- package/src/dropdown/types.ts +8 -0
- package/src/dropdown-menu/index.tsx +101 -85
- package/src/dropdown-menu/stories/index.tsx +1 -1
- package/src/dropdown-menu/types.ts +8 -0
- package/src/dropdown-menu-v2/index.tsx +2 -2
- package/src/dropdown-menu-v2/styles.ts +7 -5
- package/src/dropdown-menu-v2/types.ts +2 -2
- package/src/font-size-picker/index.tsx +9 -5
- package/src/font-size-picker/styles.ts +0 -10
- package/src/item-group/styles.ts +13 -5
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
- package/src/mobile/bottom-sheet/cell.native.js +1 -1
- package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
- package/src/mobile/html-text-input/test/index.native.js +2 -2
- package/src/mobile/image/index.native.js +1 -1
- package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
- package/src/modal/style.scss +2 -2
- package/src/number-control/index.tsx +6 -3
- package/src/number-control/styles/number-control-styles.ts +8 -16
- package/src/popover/index.tsx +3 -2
- package/src/popover/stories/index.tsx +0 -13
- package/src/popover/test/index.tsx +22 -1
- package/src/popover/utils.ts +12 -0
- package/src/search-control/README.md +7 -1
- package/src/select-control/index.tsx +1 -0
- package/src/select-control/types.ts +6 -0
- package/src/toolbar/stories/index.tsx +0 -3
- package/src/toolbar/toolbar/index.tsx +3 -6
- package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
- package/src/toolbar/toolbar-context/index.ts +2 -4
- package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
- package/src/toolbar/toolbar-item/index.tsx +13 -15
- package/src/toolbar/toolbar-item/types.ts +27 -0
- package/src/tooltip/test/index.native.js +1 -3
- package/src/unit-control/index.tsx +29 -95
- package/src/unit-control/stories/index.tsx +0 -4
- package/src/unit-control/test/index.tsx +151 -223
- package/src/unit-control/unit-select-control.tsx +20 -10
- package/src/z-stack/component.tsx +4 -2
- package/src/z-stack/stories/index.tsx +6 -13
- package/src/z-stack/styles.ts +23 -24
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/navigator/navigator-screen/component.tsx"],"names":["animationEnterDelay","animationEnterDuration","animationExitDuration","animationExitDelay","UnconnectedNavigatorScreen","props","forwardedRef","screenId","children","className","path","otherProps","prefersReducedMotion","location","match","addScreen","removeScreen","NavigatorContext","isMatch","wrapperRef","screen","id","cx","classes","locationRef","current","isInitialLocation","isInitial","isBack","hasRestoredFocus","skipFocus","activeElement","ownerDocument","contains","elementToFocus","focusTargetSelector","querySelector","firstTabbable","focus","tabbable","find","mergedWrapperRef","animate","opacity","transition","delay","duration","ease","x","initial","exit","animatedProps","NavigatorScreen"],"mappings":";;;;;;;;;AAYA;;;;AAPA;;AACA;;AAKA;;AAQA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AACA;;;;AAGA,MAAMA,mBAAmB,GAAG,CAA5B;AACA,MAAMC,sBAAsB,GAAG,IAA/B;AACA,MAAMC,qBAAqB,GAAG,IAA9B;AACA,MAAMC,kBAAkB,GAAG,CAA3B,C,CAEA;AACA;;;;;;;;;;;;AAMA,SAASC,0BAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,QAAQ,GAAG,qBAAjB;AACA,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,SAAZ;AAAuBC,IAAAA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M4C,eAAe,GAAG,6BAC9BhD,0BAD8B,EAE9B,iBAF8B,CAAxB;;eAKQgD,e","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, MotionProps } from 'framer-motion';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseId,\n} from '@wordpress/element';\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type { NavigatorScreenProps } from '../types';\n\nconst animationEnterDelay = 0;\nconst animationEnterDuration = 0.14;\nconst animationExitDuration = 0.14;\nconst animationExitDelay = 0;\n\n// Props specific to `framer-motion` can't be currently passed to `NavigatorScreen`,\n// as some of them would overlap with HTML props (e.g. `onAnimationStart`, ...)\ntype Props = Omit<\n\tWordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tExclude< keyof MotionProps, 'style' | 'children' >\n>;\n\nfunction UnconnectedNavigatorScreen(\n\tprops: Props,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst screenId = useId();\n\tconst { children, className, path, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorScreen'\n\t);\n\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst { location, match, addScreen, removeScreen } =\n\t\tuseContext( NavigatorContext );\n\tconst isMatch = match === screenId;\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\n\tuseEffect( () => {\n\t\tconst screen = {\n\t\t\tid: screenId,\n\t\t\tpath: escapeAttribute( path ),\n\t\t};\n\t\taddScreen( screen );\n\t\treturn () => removeScreen( screen );\n\t}, [ screenId, path, addScreen, removeScreen ] );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tcss( {\n\t\t\t\t\t// Ensures horizontal overflow is visually accessible.\n\t\t\t\t\toverflowX: 'auto',\n\t\t\t\t\t// In case the root has a height, it should not be exceeded.\n\t\t\t\t\tmaxHeight: '100%',\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\tconst locationRef = useRef( location );\n\n\tuseEffect( () => {\n\t\tlocationRef.current = location;\n\t}, [ location ] );\n\n\t// Focus restoration\n\tconst isInitialLocation = location.isInitial && ! location.isBack;\n\tuseEffect( () => {\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\t// - if focus hasn't already been restored for the current location\n\t\t// - if the `skipFocus` option is not set to `true`. This is useful when we trigger the navigation outside of NavigatorScreen.\n\t\tif (\n\t\t\tisInitialLocation ||\n\t\t\t! isMatch ||\n\t\t\t! wrapperRef.current ||\n\t\t\tlocationRef.current.hasRestoredFocus ||\n\t\t\tlocation.skipFocus\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = wrapperRef.current.ownerDocument.activeElement;\n\n\t\t// If an element is already focused within the wrapper do not focus the\n\t\t// element. This prevents inputs or buttons from losing focus unnecessarily.\n\t\tif ( wrapperRef.current.contains( activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( location.isBack && location?.focusTargetSelector ) {\n\t\t\telementToFocus = wrapperRef.current.querySelector(\n\t\t\t\tlocation.focusTargetSelector\n\t\t\t);\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst firstTabbable = (\n\t\t\t\tfocus.tabbable.find( wrapperRef.current ) as HTMLElement[]\n\t\t\t )[ 0 ];\n\t\t\telementToFocus = firstTabbable ?? wrapperRef.current;\n\t\t}\n\n\t\tlocationRef.current.hasRestoredFocus = true;\n\t\telementToFocus.focus();\n\t}, [\n\t\tisInitialLocation,\n\t\tisMatch,\n\t\tlocation.isBack,\n\t\tlocation.focusTargetSelector,\n\t\tlocation.skipFocus,\n\t] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\tif ( ! isMatch ) {\n\t\treturn null;\n\t}\n\n\tif ( prefersReducedMotion ) {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tref={ mergedWrapperRef }\n\t\t\t\tclassName={ classes }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst animate = {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\tdelay: animationEnterDelay,\n\t\t\tduration: animationEnterDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t\tx: 0,\n\t};\n\t// Disable the initial animation if the screen is the very first screen to be\n\t// rendered within the current `NavigatorProvider`.\n\tconst initial =\n\t\tlocation.isInitial && ! location.isBack\n\t\t\t? false\n\t\t\t: {\n\t\t\t\t\topacity: 0,\n\t\t\t\t\tx:\n\t\t\t\t\t\t( isRTL() && location.isBack ) ||\n\t\t\t\t\t\t( ! isRTL() && ! location.isBack )\n\t\t\t\t\t\t\t? 50\n\t\t\t\t\t\t\t: -50,\n\t\t\t };\n\tconst exit = {\n\t\tdelay: animationExitDelay,\n\t\topacity: 0,\n\t\tx:\n\t\t\t( ! isRTL() && location.isBack ) || ( isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t\ttransition: {\n\t\t\tduration: animationExitDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t};\n\n\tconst animatedProps = {\n\t\tanimate,\n\t\texit,\n\t\tinitial,\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...animatedProps }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n}\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorButton` and the `NavigatorBackButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorScreen = contextConnect(\n\tUnconnectedNavigatorScreen,\n\t'NavigatorScreen'\n);\n\nexport default NavigatorScreen;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/navigator/navigator-screen/component.tsx"],"names":["animationEnterDelay","animationEnterDuration","animationExitDuration","animationExitDelay","UnconnectedNavigatorScreen","props","forwardedRef","screenId","children","className","path","otherProps","prefersReducedMotion","location","match","addScreen","removeScreen","NavigatorContext","isMatch","wrapperRef","screen","id","cx","classes","locationRef","current","isInitialLocation","isInitial","isBack","hasRestoredFocus","skipFocus","activeElement","ownerDocument","contains","elementToFocus","focusTargetSelector","querySelector","firstTabbable","focus","tabbable","find","mergedWrapperRef","animate","opacity","transition","delay","duration","ease","x","initial","exit","animatedProps","NavigatorScreen"],"mappings":";;;;;;;AAYA;;AAPA;;AACA;;AAKA;;AAQA;;AACA;;AACA;;AAKA;;AAKA;;AACA;;AACA;;;;AAGA,MAAMA,mBAAmB,GAAG,CAA5B;AACA,MAAMC,sBAAsB,GAAG,IAA/B;AACA,MAAMC,qBAAqB,GAAG,IAA9B;AACA,MAAMC,kBAAkB,GAAG,CAA3B,C,CAEA;AACA;;;;;;;;;;;;AAMA,SAASC,0BAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,QAAQ,GAAG,qBAAjB;AACA,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,SAAZ;AAAuBC,IAAAA,IAAvB;AAA6B,OAAGC;AAAhC,MAA+C,+BACpDN,KADoD,EAEpD,iBAFoD,CAArD;AAKA,QAAMO,oBAAoB,GAAG,gCAA7B;AACA,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,KAAZ;AAAmBC,IAAAA,SAAnB;AAA8BC,IAAAA;AAA9B,MACL,yBAAYC,0BAAZ,CADD;AAEA,QAAMC,OAAO,GAAGJ,KAAK,KAAKP,QAA1B;AACA,QAAMY,UAAU,GAAG,qBAA0B,IAA1B,CAAnB;AAEA,0BAAW,MAAM;AAChB,UAAMC,MAAM,GAAG;AACdC,MAAAA,EAAE,EAAEd,QADU;AAEdG,MAAAA,IAAI,EAAE,iCAAiBA,IAAjB;AAFQ,KAAf;AAIAK,IAAAA,SAAS,CAAEK,MAAF,CAAT;AACA,WAAO,MAAMJ,YAAY,CAAEI,MAAF,CAAzB;AACA,GAPD,EAOG,CAAEb,QAAF,EAAYG,IAAZ,EAAkBK,SAAlB,EAA6BC,YAA7B,CAPH;AASA,QAAMM,EAAE,GAAG,mBAAX;AACA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,OAODb,SAPC,CAFY,EAWf,CAAEA,SAAF,EA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,QAAQ,EAAE5C,qBADC;AAEX6C,MAAAA,IAAI,EAAE;AAFK;AAPA,GAAb;AAaA,QAAMI,aAAa,GAAG;AACrBT,IAAAA,OADqB;AAErBQ,IAAAA,IAFqB;AAGrBD,IAAAA;AAHqB,GAAtB;AAMA,SACC,4BAAC,oBAAD,CAAQ,GAAR;AACC,IAAA,GAAG,EAAGR,gBADP;AAEC,IAAA,SAAS,EAAGlB,OAFb;AAAA,OAGMZ,UAHN;AAAA,OAIMwC;AAJN,KAMG3C,QANH,CADD;AAUA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAM4C,eAAe,GAAG,6BAC9BhD,0BAD8B,EAE9B,iBAF8B,CAAxB;;eAKQgD,e","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, MotionProps } from 'framer-motion';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport {\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n\tuseId,\n} from '@wordpress/element';\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type { NavigatorScreenProps } from '../types';\n\nconst animationEnterDelay = 0;\nconst animationEnterDuration = 0.14;\nconst animationExitDuration = 0.14;\nconst animationExitDelay = 0;\n\n// Props specific to `framer-motion` can't be currently passed to `NavigatorScreen`,\n// as some of them would overlap with HTML props (e.g. `onAnimationStart`, ...)\ntype Props = Omit<\n\tWordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tExclude< keyof MotionProps, 'style' | 'children' >\n>;\n\nfunction UnconnectedNavigatorScreen(\n\tprops: Props,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst screenId = useId();\n\tconst { children, className, path, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorScreen'\n\t);\n\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst { location, match, addScreen, removeScreen } =\n\t\tuseContext( NavigatorContext );\n\tconst isMatch = match === screenId;\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\n\tuseEffect( () => {\n\t\tconst screen = {\n\t\t\tid: screenId,\n\t\t\tpath: escapeAttribute( path ),\n\t\t};\n\t\taddScreen( screen );\n\t\treturn () => removeScreen( screen );\n\t}, [ screenId, path, addScreen, removeScreen ] );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tcss( {\n\t\t\t\t\t// Ensures horizontal overflow is visually accessible.\n\t\t\t\t\toverflowX: 'auto',\n\t\t\t\t\t// In case the root has a height, it should not be exceeded.\n\t\t\t\t\tmaxHeight: '100%',\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\tconst locationRef = useRef( location );\n\n\tuseEffect( () => {\n\t\tlocationRef.current = location;\n\t}, [ location ] );\n\n\t// Focus restoration\n\tconst isInitialLocation = location.isInitial && ! location.isBack;\n\tuseEffect( () => {\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\t// - if focus hasn't already been restored for the current location\n\t\t// - if the `skipFocus` option is not set to `true`. This is useful when we trigger the navigation outside of NavigatorScreen.\n\t\tif (\n\t\t\tisInitialLocation ||\n\t\t\t! isMatch ||\n\t\t\t! wrapperRef.current ||\n\t\t\tlocationRef.current.hasRestoredFocus ||\n\t\t\tlocation.skipFocus\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst activeElement = wrapperRef.current.ownerDocument.activeElement;\n\n\t\t// If an element is already focused within the wrapper do not focus the\n\t\t// element. This prevents inputs or buttons from losing focus unnecessarily.\n\t\tif ( wrapperRef.current.contains( activeElement ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( location.isBack && location?.focusTargetSelector ) {\n\t\t\telementToFocus = wrapperRef.current.querySelector(\n\t\t\t\tlocation.focusTargetSelector\n\t\t\t);\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst firstTabbable = (\n\t\t\t\tfocus.tabbable.find( wrapperRef.current ) as HTMLElement[]\n\t\t\t )[ 0 ];\n\t\t\telementToFocus = firstTabbable ?? wrapperRef.current;\n\t\t}\n\n\t\tlocationRef.current.hasRestoredFocus = true;\n\t\telementToFocus.focus();\n\t}, [\n\t\tisInitialLocation,\n\t\tisMatch,\n\t\tlocation.isBack,\n\t\tlocation.focusTargetSelector,\n\t\tlocation.skipFocus,\n\t] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\tif ( ! isMatch ) {\n\t\treturn null;\n\t}\n\n\tif ( prefersReducedMotion ) {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tref={ mergedWrapperRef }\n\t\t\t\tclassName={ classes }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst animate = {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\tdelay: animationEnterDelay,\n\t\t\tduration: animationEnterDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t\tx: 0,\n\t};\n\t// Disable the initial animation if the screen is the very first screen to be\n\t// rendered within the current `NavigatorProvider`.\n\tconst initial =\n\t\tlocation.isInitial && ! location.isBack\n\t\t\t? false\n\t\t\t: {\n\t\t\t\t\topacity: 0,\n\t\t\t\t\tx:\n\t\t\t\t\t\t( isRTL() && location.isBack ) ||\n\t\t\t\t\t\t( ! isRTL() && ! location.isBack )\n\t\t\t\t\t\t\t? 50\n\t\t\t\t\t\t\t: -50,\n\t\t\t };\n\tconst exit = {\n\t\tdelay: animationExitDelay,\n\t\topacity: 0,\n\t\tx:\n\t\t\t( ! isRTL() && location.isBack ) || ( isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t\ttransition: {\n\t\t\tduration: animationExitDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t};\n\n\tconst animatedProps = {\n\t\tanimate,\n\t\texit,\n\t\tinitial,\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...animatedProps }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n}\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorButton` and the `NavigatorBackButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorScreen = contextConnect(\n\tUnconnectedNavigatorScreen,\n\t'NavigatorScreen'\n);\n\nexport default NavigatorScreen;\n"]}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -9,8 +7,6 @@ exports.default = exports.NavigatorToParentButton = void 0;
|
|
|
9
7
|
|
|
10
8
|
var _element = require("@wordpress/element");
|
|
11
9
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
10
|
var _context = require("../../ui/context");
|
|
15
11
|
|
|
16
12
|
var _view = require("../../view");
|
|
@@ -28,9 +24,10 @@ function UnconnectedNavigatorToParentButton(props, forwardedRef) {
|
|
|
28
24
|
const navigatorToParentButtonProps = (0, _hook.useNavigatorBackButton)({ ...props,
|
|
29
25
|
goToParent: true
|
|
30
26
|
});
|
|
31
|
-
return (0, _element.createElement)(_view.View,
|
|
32
|
-
ref: forwardedRef
|
|
33
|
-
|
|
27
|
+
return (0, _element.createElement)(_view.View, {
|
|
28
|
+
ref: forwardedRef,
|
|
29
|
+
...navigatorToParentButtonProps
|
|
30
|
+
});
|
|
34
31
|
}
|
|
35
32
|
/*
|
|
36
33
|
* The `NavigatorToParentButton` component can be used to navigate to a screen and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/navigator/navigator-to-parent-button/component.tsx"],"names":["UnconnectedNavigatorToParentButton","props","forwardedRef","navigatorToParentButtonProps","goToParent","NavigatorToParentButton"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/navigator/navigator-to-parent-button/component.tsx"],"names":["UnconnectedNavigatorToParentButton","props","forwardedRef","navigatorToParentButtonProps","goToParent","NavigatorToParentButton"],"mappings":";;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,kCAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,4BAA4B,GAAG,kCAAwB,EAC5D,GAAGF,KADyD;AAE5DG,IAAAA,UAAU,EAAE;AAFgD,GAAxB,CAArC;AAKA,SAAO,4BAAC,UAAD;AAAM,IAAA,GAAG,EAAGF,YAAZ;AAAA,OAAgCC;AAAhC,IAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,uBAAuB,GAAG,6BACtCL,kCADsC,EAEtC,yBAFsC,CAAhC;;eAKQK,uB","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useNavigatorBackButton } from '../navigator-back-button/hook';\nimport type { NavigatorToParentButtonProps } from '../types';\n\nfunction UnconnectedNavigatorToParentButton(\n\tprops: WordPressComponentProps< NavigatorToParentButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorToParentButtonProps = useNavigatorBackButton( {\n\t\t...props,\n\t\tgoToParent: true,\n\t} );\n\n\treturn <View ref={ forwardedRef } { ...navigatorToParentButtonProps } />;\n}\n\n/*\n * The `NavigatorToParentButton` component can be used to navigate to a screen and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorScreen` and the `NavigatorButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorToParentButton as NavigatorToParentButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorToParentButton>\n * Go to parent\n * </NavigatorToParentButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nexport const NavigatorToParentButton = contextConnect(\n\tUnconnectedNavigatorToParentButton,\n\t'NavigatorToParentButton'\n);\n\nexport default NavigatorToParentButton;\n"]}
|
package/build/notice/list.js
CHANGED
|
@@ -9,8 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
16
14
|
var _ = _interopRequireDefault(require("."));
|
|
@@ -67,10 +65,10 @@ function NoticeList({
|
|
|
67
65
|
content,
|
|
68
66
|
...restNotice
|
|
69
67
|
} = notice;
|
|
70
|
-
return (0, _element.createElement)(_.default,
|
|
68
|
+
return (0, _element.createElement)(_.default, { ...restNotice,
|
|
71
69
|
key: notice.id,
|
|
72
70
|
onRemove: removeNotice(notice.id)
|
|
73
|
-
}
|
|
71
|
+
}, notice.content);
|
|
74
72
|
}));
|
|
75
73
|
}
|
|
76
74
|
|
package/build/notice/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/notice/list.tsx"],"names":["noop","NoticeList","notices","onRemove","className","children","removeNotice","id","reverse","map","notice","content","restNotice"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/notice/list.tsx"],"names":["noop","NoticeList","notices","onRemove","className","children","removeNotice","id","reverse","map","notice","content","restNotice"],"mappings":";;;;;;;;;;;AAGA;;AAKA;;AARA;AACA;AACA;;AAGA;AACA;AACA;AAKA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;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,SAASC,UAAT,CAAqB;AACpBC,EAAAA,OADoB;AAEpBC,EAAAA,QAAQ,GAAGH,IAFS;AAGpBI,EAAAA,SAHoB;AAIpBC,EAAAA;AAJoB,CAArB,EAK8D;AAC7D,QAAMC,YAAY,GACfC,EAAF,IAA0D,MACzDJ,QAAQ,CAAEI,EAAF,CAFV;;AAIAH,EAAAA,SAAS,GAAG,yBAAY,wBAAZ,EAAsCA,SAAtC,CAAZ;AAEA,SACC;AAAK,IAAA,SAAS,EAAGA;AAAjB,KACGC,QADH,EAEG,CAAE,GAAGH,OAAL,EAAeM,OAAf,GAAyBC,GAAzB,CAAgCC,MAAF,IAAc;AAC7C,UAAM;AAAEC,MAAAA,OAAF;AAAW,SAAGC;AAAd,QAA6BF,MAAnC;AACA,WACC,4BAAC,SAAD,OACME,UADN;AAEC,MAAA,GAAG,EAAGF,MAAM,CAACH,EAFd;AAGC,MAAA,QAAQ,EAAGD,YAAY,CAAEI,MAAM,CAACH,EAAT;AAHxB,OAKGG,MAAM,CAACC,OALV,CADD;AASA,GAXC,CAFH,CADD;AAiBA;;eAEcV,U","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * Internal dependencies\n */\nimport Notice from '.';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { NoticeListProps } from './types';\n\nconst noop = () => {};\n\n/**\n * `NoticeList` is a component used to render a collection of notices.\n *\n *```jsx\n * import { Notice, NoticeList } from `@wordpress/components`;\n *\n * const MyNoticeList = () => {\n *\tconst [ notices, setNotices ] = useState( [\n *\t\t{\n *\t\t\tid: 'second-notice',\n *\t\t\tcontent: 'second notice content',\n *\t\t},\n *\t\t{\n *\t\t\tid: 'fist-notice',\n *\t\t\tcontent: 'first notice content',\n *\t\t},\n *\t] );\n *\n *\tconst removeNotice = ( id ) => {\n *\t\tsetNotices( notices.filter( ( notice ) => notice.id !== id ) );\n *\t};\n *\n *\treturn <NoticeList notices={ notices } onRemove={ removeNotice } />;\n *};\n *```\n */\nfunction NoticeList( {\n\tnotices,\n\tonRemove = noop,\n\tclassName,\n\tchildren,\n}: WordPressComponentProps< NoticeListProps, 'div', false > ) {\n\tconst removeNotice =\n\t\t( id: NoticeListProps[ 'notices' ][ number ][ 'id' ] ) => () =>\n\t\t\tonRemove( id );\n\n\tclassName = classnames( 'components-notice-list', className );\n\n\treturn (\n\t\t<div className={ className }>\n\t\t\t{ children }\n\t\t\t{ [ ...notices ].reverse().map( ( notice ) => {\n\t\t\t\tconst { content, ...restNotice } = notice;\n\t\t\t\treturn (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\t{ ...restNotice }\n\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\tonRemove={ removeNotice( notice.id ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ notice.content }\n\t\t\t\t\t</Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</div>\n\t);\n}\n\nexport default NoticeList;\n"]}
|
|
@@ -9,8 +9,6 @@ exports.default = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _reactNative = require("react-native");
|
|
15
13
|
|
|
16
14
|
var _data = require("@wordpress/data");
|
|
@@ -57,10 +55,10 @@ function NoticeList() {
|
|
|
57
55
|
return (0, _element.createElement)(_reactNative.View, {
|
|
58
56
|
style: _style.default.list
|
|
59
57
|
}, notices.map(notice => {
|
|
60
|
-
return (0, _element.createElement)(_.default,
|
|
58
|
+
return (0, _element.createElement)(_.default, { ...notice,
|
|
61
59
|
key: notice.id,
|
|
62
60
|
onNoticeHidden: onRemoveNotice
|
|
63
|
-
})
|
|
61
|
+
});
|
|
64
62
|
}));
|
|
65
63
|
}
|
|
66
64
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/notice/list.native.js"],"names":["NoticeList","notices","select","getNotices","noticesStore","removeNotice","onRemoveNotice","id","length","styles","list","map","notice"],"mappings":";;;;;;;;;AAgBA
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/notice/list.native.js"],"names":["NoticeList","notices","select","getNotices","noticesStore","removeNotice","onRemoveNotice","id","length","styles","list","map","notice"],"mappings":";;;;;;;;;AAgBA;;AAbA;;AAKA;;AACA;;AAKA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;AAKA,SAASA,UAAT,GAAsB;AACrB,QAAM;AAAEC,IAAAA;AAAF,MAAc,qBAAaC,MAAF,IAAc;AAC5C,UAAM;AAAEC,MAAAA;AAAF,QAAiBD,MAAM,CAAEE,cAAF,CAA7B;AACA,WAAO;AACNH,MAAAA,OAAO,EAAEE,UAAU;AADb,KAAP;AAGA,GALmB,EAKjB,EALiB,CAApB;AAOA,QAAM;AAAEE,IAAAA;AAAF,MAAmB,uBAAaD,cAAb,CAAzB;AAEA,QAAME,cAAc,GAAG,0BACpBC,EAAF,IAAU;AACTF,IAAAA,YAAY,CAAEE,EAAF,CAAZ;AACA,GAHqB,EAItB,CAAEF,YAAF,CAJsB,CAAvB;;AAOA,MAAK,CAAEJ,OAAO,CAACO,MAAf,EAAwB;AACvB,WAAO,IAAP;AACA;;AAED,SACC,4BAAC,iBAAD;AAAM,IAAA,KAAK,EAAGC,eAAOC;AAArB,KACGT,OAAO,CAACU,GAAR,CAAeC,MAAF,IAAc;AAC5B,WACC,4BAAC,SAAD,OACMA,MADN;AAEC,MAAA,GAAG,EAAGA,MAAM,CAACL,EAFd;AAGC,MAAA,cAAc,EAAGD;AAHlB,MADD;AAOA,GARC,CADH,CADD;AAaA;;eAEcN,U","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { useSelect, useDispatch } from '@wordpress/data';\nimport { store as noticesStore } from '@wordpress/notices';\n\n/**\n * Internal dependencies\n */\nimport Notice from './';\nimport styles from './style.scss';\nimport { useCallback } from '@wordpress/element';\n\nfunction NoticeList() {\n\tconst { notices } = useSelect( ( select ) => {\n\t\tconst { getNotices } = select( noticesStore );\n\t\treturn {\n\t\t\tnotices: getNotices(),\n\t\t};\n\t}, [] );\n\n\tconst { removeNotice } = useDispatch( noticesStore );\n\n\tconst onRemoveNotice = useCallback(\n\t\t( id ) => {\n\t\t\tremoveNotice( id );\n\t\t},\n\t\t[ removeNotice ]\n\t);\n\n\tif ( ! notices.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<View style={ styles.list }>\n\t\t\t{ notices.map( ( notice ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Notice\n\t\t\t\t\t\t{ ...notice }\n\t\t\t\t\t\tkey={ notice.id }\n\t\t\t\t\t\tonNoticeHidden={ onRemoveNotice }\n\t\t\t\t\t></Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</View>\n\t);\n}\n\nexport default NoticeList;\n"]}
|
|
@@ -9,8 +9,6 @@ exports.default = exports.NumberControl = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _element = require("@wordpress/element");
|
|
11
11
|
|
|
12
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
13
|
-
|
|
14
12
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
13
|
|
|
16
14
|
var _i18n = require("@wordpress/i18n");
|
|
@@ -33,6 +31,8 @@ var _hStack = require("../h-stack");
|
|
|
33
31
|
|
|
34
32
|
var _spacer = require("../spacer");
|
|
35
33
|
|
|
34
|
+
var _utils = require("../utils");
|
|
35
|
+
|
|
36
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
37
|
|
|
38
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -93,6 +93,8 @@ function UnforwardedNumberControl({
|
|
|
93
93
|
|
|
94
94
|
const autoComplete = typeProp === 'number' ? 'off' : undefined;
|
|
95
95
|
const classes = (0, _classnames.default)('components-number-control', className);
|
|
96
|
+
const cx = (0, _utils.useCx)();
|
|
97
|
+
const spinButtonClasses = cx(size === 'small' && _numberControlStyles.styles.smallSpinButtons);
|
|
96
98
|
|
|
97
99
|
const spinValue = (value, direction, event) => {
|
|
98
100
|
event?.preventDefault();
|
|
@@ -199,10 +201,10 @@ function UnforwardedNumberControl({
|
|
|
199
201
|
}
|
|
200
202
|
});
|
|
201
203
|
|
|
202
|
-
return (0, _element.createElement)(_numberControlStyles.Input,
|
|
204
|
+
return (0, _element.createElement)(_numberControlStyles.Input, {
|
|
203
205
|
autoComplete: autoComplete,
|
|
204
|
-
inputMode: "numeric"
|
|
205
|
-
|
|
206
|
+
inputMode: "numeric",
|
|
207
|
+
...props,
|
|
206
208
|
className: classes,
|
|
207
209
|
dragDirection: dragDirection,
|
|
208
210
|
hideHTMLArrows: spinControls !== 'native',
|
|
@@ -229,24 +231,24 @@ function UnforwardedNumberControl({
|
|
|
229
231
|
}, (0, _element.createElement)(_hStack.HStack, {
|
|
230
232
|
spacing: 1
|
|
231
233
|
}, (0, _element.createElement)(_numberControlStyles.SpinButton, {
|
|
234
|
+
className: spinButtonClasses,
|
|
232
235
|
icon: _icons.plus,
|
|
233
236
|
isSmall: true,
|
|
234
237
|
"aria-hidden": "true",
|
|
235
238
|
"aria-label": (0, _i18n.__)('Increment'),
|
|
236
239
|
tabIndex: -1,
|
|
237
|
-
onClick: buildSpinButtonClickHandler('up')
|
|
238
|
-
size: size
|
|
240
|
+
onClick: buildSpinButtonClickHandler('up')
|
|
239
241
|
}), (0, _element.createElement)(_numberControlStyles.SpinButton, {
|
|
242
|
+
className: spinButtonClasses,
|
|
240
243
|
icon: _icons.reset,
|
|
241
244
|
isSmall: true,
|
|
242
245
|
"aria-hidden": "true",
|
|
243
246
|
"aria-label": (0, _i18n.__)('Decrement'),
|
|
244
247
|
tabIndex: -1,
|
|
245
|
-
onClick: buildSpinButtonClickHandler('down')
|
|
246
|
-
size: size
|
|
248
|
+
onClick: buildSpinButtonClickHandler('down')
|
|
247
249
|
})))) : suffix,
|
|
248
250
|
onChange: onChange
|
|
249
|
-
})
|
|
251
|
+
});
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
const NumberControl = (0, _element.forwardRef)(UnforwardedNumberControl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/number-control/index.tsx"],"names":["noop","UnforwardedNumberControl","__unstableStateReducer","stateReducerProp","className","dragDirection","hideHTMLArrows","spinControls","isDragEnabled","isShiftStepEnabled","label","max","Infinity","min","required","shiftStep","step","type","typeProp","value","valueProp","size","suffix","onChange","props","forwardedRef","alternative","since","version","inputRef","mergedRef","isStepAny","baseStep","baseValue","constrainValue","stepOverride","Math","autoComplete","undefined","classes","spinValue","direction","event","preventDefault","shift","shiftKey","delta","nextValue","numberControlStateReducer","state","action","nextState","payload","currentValue","inputControlActionTypes","PRESS_UP","PRESS_DOWN","DRAG","x","y","enableShift","modifier","directionModifier","ceil","abs","sign","distance","PRESS_ENTER","COMMIT","applyEmptyValue","buildSpinButtonClickHandler","String","target","current","baseState","plusIcon","resetIcon","NumberControl"],"mappings":";;;;;;;;;AASA;;;;AANA;;AAOA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAGA;;AACA;;;;;;AAzBA;AACA;AACA;;AAIA;AACA;AACA;;AAOA;AACA;AACA;AAUA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,wBAAT,CACC;AACCC,EAAAA,sBAAsB,EAAEC,gBADzB;AAECC,EAAAA,SAFD;AAGCC,EAAAA,aAAa,GAAG,GAHjB;AAICC,EAAAA,cAAc,GAAG,KAJlB;AAKCC,EAAAA,YAAY,GAAG,QALhB;AAMCC,EAAAA,aAAa,GAAG,IANjB;AAOCC,EAAAA,kBAAkB,GAAG,IAPtB;AAQCC,EAAAA,KARD;AASCC,EAAAA,GAAG,GAAGC,QATP;AAUCC,EAAAA,GAAG,GAAG,CAACD,QAVR;AAWCE,EAAAA,QAAQ,GAAG,KAXZ;AAYCC,EAAAA,SAAS,GAAG,EAZb;AAaCC,EAAAA,IAAI,GAAG,CAbR;AAcCC,EAAAA,IAAI,EAAEC,QAAQ,GAAG,QAdlB;AAeCC,EAAAA,KAAK,EAAEC,SAfR;AAgBCC,EAAAA,IAAI,GAAG,SAhBR;AAiBCC,EAAAA,MAjBD;AAkBCC,EAAAA,QAAQ,GAAGvB,IAlBZ;AAmBC,KAAGwB;AAnBJ,CADD,EAsBCC,YAtBD,EAuBE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,EAEC,4BAAC,cAAD;AAAQ,MAAA,YAAY,EAAG,CAAvB;AAA2B,MAAA,WAAW,EAAG;AAAzC,OACC,4BAAC,cAAD;AAAQ,MAAA,OAAO,EAAG;AAAlB,OACC,4BAAC,+BAAD;AACC,MAAA,IAAI,EAAGqD,WADR;AAEC,MAAA,OAAO,MAFR;AAGC,qBAAY,MAHb;AAIC,oBAAa,cAAI,WAAJ,CAJd;AAKC,MAAA,QAAQ,EAAG,CAAC,CALb;AAMC,MAAA,OAAO,EAAGL,2BAA2B,CACpC,IADoC,CANtC;AASC,MAAA,IAAI,EAAGjD;AATR,MADD,EAYC,4BAAC,+BAAD;AACC,MAAA,IAAI,EAAGuD,YADR;AAEC,MAAA,OAAO,MAFR;AAGC,qBAAY,MAHb;AAIC,oBAAa,cAAI,WAAJ,CAJd;AAKC,MAAA,QAAQ,EAAG,CAAC,CALb;AAMC,MAAA,OAAO,EAAGN,2BAA2B,CACpC,MADoC,CANtC;AASC,MAAA,IAAI,EAAGjD;AATR,MAZD,CADD,CAFD,CADD,GA+BCC,MAtDH;AAyDC,IAAA,QAAQ,EAAGC;AAzDZ,KADD;AA6DA;;AAEM,MAAMsD,aAAa,GAAG,yBAAY5E,wBAAZ,CAAtB;;eAEQ4E,a","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { plus as plusIcon, reset as resetIcon } from '@wordpress/icons';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Input, SpinButton } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type { NumberControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { Spacer } from '../spacer';\n\nconst noop = () => {};\n\nfunction UnforwardedNumberControl(\n\t{\n\t\t__unstableStateReducer: stateReducerProp,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tspinControls = 'native',\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tonChange = noop,\n\t\t...props\n\t}: WordPressComponentProps< NumberControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tif ( hideHTMLArrows ) {\n\t\tdeprecated( 'wp.components.NumberControl hideHTMLArrows prop ', {\n\t\t\talternative: 'spinControls=\"none\"',\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.3',\n\t\t} );\n\t\tspinControls = 'none';\n\t}\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst mergedRef = useMergeRefs( [ inputRef, forwardedRef ] );\n\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : ensureNumber( step );\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = (\n\t\tvalue: number | string,\n\t\tstepOverride?: number\n\t) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it.\n\t\treturn isStepAny\n\t\t\t? Math.min( max, Math.max( min, ensureNumber( value ) ) )\n\t\t\t: roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : undefined;\n\tconst classes = classNames( 'components-number-control', className );\n\n\tconst spinValue = (\n\t\tvalue: string | number | undefined,\n\t\tdirection: 'up' | 'down',\n\t\tevent: KeyboardEvent | MouseEvent | undefined\n\t) => {\n\t\tevent?.preventDefault();\n\t\tconst shift = event?.shiftKey && isShiftStepEnabled;\n\t\tconst delta = shift ? ensureNumber( shiftStep ) * baseStep : baseStep;\n\t\tlet nextValue = isValueEmpty( value ) ? baseValue : value;\n\t\tif ( direction === 'up' ) {\n\t\t\tnextValue = add( nextValue, delta );\n\t\t} else if ( direction === 'down' ) {\n\t\t\tnextValue = subtract( nextValue, delta );\n\t\t}\n\t\treturn constrainValue( nextValue, shift ? delta : undefined );\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer: NumberControlProps[ '__unstableStateReducer' ] =\n\t\t( state, action ) => {\n\t\t\tconst nextState = { ...state };\n\n\t\t\tconst { type, payload } = action;\n\t\t\tconst event = payload.event;\n\t\t\tconst currentValue = nextState.value;\n\n\t\t\t/**\n\t\t\t * Handles custom UP and DOWN Keyboard events\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t\t) {\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = spinValue(\n\t\t\t\t\tcurrentValue,\n\t\t\t\t\ttype === inputControlActionTypes.PRESS_UP ? 'up' : 'down',\n\t\t\t\t\tevent as KeyboardEvent | undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles drag to update events\n\t\t\t */\n\t\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\t\tconst [ x, y ] = payload.delta;\n\t\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\t\tconst modifier = enableShift\n\t\t\t\t\t? ensureNumber( shiftStep ) * baseStep\n\t\t\t\t\t: baseStep;\n\n\t\t\t\tlet directionModifier;\n\t\t\t\tlet delta;\n\n\t\t\t\tswitch ( dragDirection ) {\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 's':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'w':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( delta !== 0 ) {\n\t\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\t\tnextState.value = constrainValue(\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\t\tenableShift ? modifier : undefined\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles commit (ENTER key press or blur)\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t\t) {\n\t\t\t\tconst applyEmptyValue =\n\t\t\t\t\trequired === false && currentValue === '';\n\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = applyEmptyValue\n\t\t\t\t\t? currentValue\n\t\t\t\t\t: // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t constrainValue( currentValue );\n\t\t\t}\n\n\t\t\treturn nextState;\n\t\t};\n\n\tconst buildSpinButtonClickHandler =\n\t\t( direction: 'up' | 'down' ) =>\n\t\t( event: MouseEvent< HTMLButtonElement > ) =>\n\t\t\tonChange( String( spinValue( valueProp, direction, event ) ), {\n\t\t\t\t// Set event.target to the <input> so that consumers can use\n\t\t\t\t// e.g. event.target.validity.\n\t\t\t\tevent: {\n\t\t\t\t\t...event,\n\t\t\t\t\ttarget: inputRef.current!,\n\t\t\t\t},\n\t\t\t} );\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ spinControls !== 'native' }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ mergedRef }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ ( state, action ) => {\n\t\t\t\tconst baseState = numberControlStateReducer( state, action );\n\t\t\t\treturn stateReducerProp?.( baseState, action ) ?? baseState;\n\t\t\t} }\n\t\t\tsize={ size }\n\t\t\tsuffix={\n\t\t\t\tspinControls === 'custom' ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t<Spacer marginBottom={ 0 } marginRight={ 2 }>\n\t\t\t\t\t\t\t<HStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<SpinButton\n\t\t\t\t\t\t\t\t\ticon={ plusIcon }\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\taria-label={ __( 'Increment' ) }\n\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'up'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<SpinButton\n\t\t\t\t\t\t\t\t\ticon={ resetIcon }\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\taria-label={ __( 'Decrement' ) }\n\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'down'\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\tsize={ size }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</HStack>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\tsuffix\n\t\t\t\t)\n\t\t\t}\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\nexport const NumberControl = forwardRef( UnforwardedNumberControl );\n\nexport default NumberControl;\n"]}
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/number-control/index.tsx"],"names":["noop","UnforwardedNumberControl","__unstableStateReducer","stateReducerProp","className","dragDirection","hideHTMLArrows","spinControls","isDragEnabled","isShiftStepEnabled","label","max","Infinity","min","required","shiftStep","step","type","typeProp","value","valueProp","size","suffix","onChange","props","forwardedRef","alternative","since","version","inputRef","mergedRef","isStepAny","baseStep","baseValue","constrainValue","stepOverride","Math","autoComplete","undefined","classes","cx","spinButtonClasses","styles","smallSpinButtons","spinValue","direction","event","preventDefault","shift","shiftKey","delta","nextValue","numberControlStateReducer","state","action","nextState","payload","currentValue","inputControlActionTypes","PRESS_UP","PRESS_DOWN","DRAG","x","y","enableShift","modifier","directionModifier","ceil","abs","sign","distance","PRESS_ENTER","COMMIT","applyEmptyValue","buildSpinButtonClickHandler","String","target","current","baseState","plusIcon","resetIcon","NumberControl"],"mappings":";;;;;;;;;AASA;;AANA;;AAOA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;;;;;AA1BA;AACA;AACA;;AAIA;AACA;AACA;;AAOA;AACA;AACA;AAWA,MAAMA,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,wBAAT,CACC;AACCC,EAAAA,sBAAsB,EAAEC,gBADzB;AAECC,EAAAA,SAFD;AAGCC,EAAAA,aAAa,GAAG,GAHjB;AAICC,EAAAA,cAAc,GAAG,KAJlB;AAKCC,EAAAA,YAAY,GAAG,QALhB;AAMCC,EAAAA,aAAa,GAAG,IANjB;AAOCC,EAAAA,kBAAkB,GAAG,IAPtB;AAQCC,EAAAA,KARD;AASCC,EAAAA,GAAG,GAAGC,QATP;AAUCC,EAAAA,GAAG,GAAG,CAACD,QAVR;AAWCE,EAAAA,QAAQ,GAAG,KAXZ;AAYCC,EAAAA,SAAS,GAAG,EAZb;AAaCC,EAAAA,IAAI,GAAG,CAbR;AAcCC,EAAAA,IAAI,EAAEC,QAAQ,GAAG,QAdlB;AAeCC,EAAAA,KAAK,EAAEC,SAfR;AAgBCC,EAAAA,IAAI,GAAG,SAhBR;AAiBCC,EAAAA,MAjBD;AAkBCC,EAAAA,QAAQ,GAAGvB,IAlBZ;AAmBC,KAAGwB;AAnBJ,CADD,EAsBCC,YAtBD,EAuBE;AACD,MAAKnB,cAAL,EAAsB;AACrB,6BAAY,kDAAZ,EAAgE;AAC/DoB,MAAAA,WAAW,EAAE,qBADkD;AAE/DC,MAAAA,KAAK,EAAE,KAFwD;AAG/DC,MAAAA,OAAO,EAAE;AAHsD,KAAhE;AAKArB,IAAAA,YAAY,GAAG,MAAf;AACA;;AAED,QAAMsB,QAAQ,GAAG,sBAAjB;AACA,QAAMC,SAAS,GAAG,2BAAc,CAAED,QAAF,EAAYJ,YAAZ,CAAd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iBADb;AAEC,MAAA,IAAI,EAAGsC,WAFR;AAGC,MAAA,OAAO,MAHR;AAIC,qBAAY,MAJb;AAKC,oBAAa,cAAI,WAAJ,CALd;AAMC,MAAA,QAAQ,EAAG,CAAC,CANb;AAOC,MAAA,OAAO,EAAGL,2BAA2B,CACpC,IADoC;AAPtC,MADD,EAYC,4BAAC,+BAAD;AACC,MAAA,SAAS,EAAGjC,iBADb;AAEC,MAAA,IAAI,EAAGuC,YAFR;AAGC,MAAA,OAAO,MAHR;AAIC,qBAAY,MAJb;AAKC,oBAAa,cAAI,WAAJ,CALd;AAMC,MAAA,QAAQ,EAAG,CAAC,CANb;AAOC,MAAA,OAAO,EAAGN,2BAA2B,CACpC,MADoC;AAPtC,MAZD,CADD,CAFD,CADD,GA+BCpD,MAtDH;AAyDC,IAAA,QAAQ,EAAGC;AAzDZ,IADD;AA6DA;;AAEM,MAAM0D,aAAa,GAAG,yBAAYhF,wBAAZ,CAAtB;;eAEQgF,a","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef, KeyboardEvent, MouseEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useRef, forwardRef } from '@wordpress/element';\nimport { isRTL, __ } from '@wordpress/i18n';\nimport { plus as plusIcon, reset as resetIcon } from '@wordpress/icons';\nimport { useMergeRefs } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport { Input, SpinButton, styles } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { ensureNumber, isValueEmpty } from '../utils/values';\nimport type { WordPressComponentProps } from '../ui/context/wordpress-component';\nimport type { NumberControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { Spacer } from '../spacer';\nimport { useCx } from '../utils';\n\nconst noop = () => {};\n\nfunction UnforwardedNumberControl(\n\t{\n\t\t__unstableStateReducer: stateReducerProp,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tspinControls = 'native',\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\tonChange = noop,\n\t\t...props\n\t}: WordPressComponentProps< NumberControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tif ( hideHTMLArrows ) {\n\t\tdeprecated( 'wp.components.NumberControl hideHTMLArrows prop ', {\n\t\t\talternative: 'spinControls=\"none\"',\n\t\t\tsince: '6.2',\n\t\t\tversion: '6.3',\n\t\t} );\n\t\tspinControls = 'none';\n\t}\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst mergedRef = useMergeRefs( [ inputRef, forwardedRef ] );\n\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : ensureNumber( step );\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = (\n\t\tvalue: number | string,\n\t\tstepOverride?: number\n\t) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it.\n\t\treturn isStepAny\n\t\t\t? Math.min( max, Math.max( min, ensureNumber( value ) ) )\n\t\t\t: roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : undefined;\n\tconst classes = classNames( 'components-number-control', className );\n\tconst cx = useCx();\n\tconst spinButtonClasses = cx( size === 'small' && styles.smallSpinButtons );\n\n\tconst spinValue = (\n\t\tvalue: string | number | undefined,\n\t\tdirection: 'up' | 'down',\n\t\tevent: KeyboardEvent | MouseEvent | undefined\n\t) => {\n\t\tevent?.preventDefault();\n\t\tconst shift = event?.shiftKey && isShiftStepEnabled;\n\t\tconst delta = shift ? ensureNumber( shiftStep ) * baseStep : baseStep;\n\t\tlet nextValue = isValueEmpty( value ) ? baseValue : value;\n\t\tif ( direction === 'up' ) {\n\t\t\tnextValue = add( nextValue, delta );\n\t\t} else if ( direction === 'down' ) {\n\t\t\tnextValue = subtract( nextValue, delta );\n\t\t}\n\t\treturn constrainValue( nextValue, shift ? delta : undefined );\n\t};\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @return The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer: NumberControlProps[ '__unstableStateReducer' ] =\n\t\t( state, action ) => {\n\t\t\tconst nextState = { ...state };\n\n\t\t\tconst { type, payload } = action;\n\t\t\tconst event = payload.event;\n\t\t\tconst currentValue = nextState.value;\n\n\t\t\t/**\n\t\t\t * Handles custom UP and DOWN Keyboard events\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t\t) {\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = spinValue(\n\t\t\t\t\tcurrentValue,\n\t\t\t\t\ttype === inputControlActionTypes.PRESS_UP ? 'up' : 'down',\n\t\t\t\t\tevent as KeyboardEvent | undefined\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles drag to update events\n\t\t\t */\n\t\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\t\tconst [ x, y ] = payload.delta;\n\t\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\t\tconst modifier = enableShift\n\t\t\t\t\t? ensureNumber( shiftStep ) * baseStep\n\t\t\t\t\t: baseStep;\n\n\t\t\t\tlet directionModifier;\n\t\t\t\tlet delta;\n\n\t\t\t\tswitch ( dragDirection ) {\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 's':\n\t\t\t\t\t\tdelta = y;\n\t\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'w':\n\t\t\t\t\t\tdelta = x;\n\t\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( delta !== 0 ) {\n\t\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\t\tnextState.value = constrainValue(\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\t\tenableShift ? modifier : undefined\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Handles commit (ENTER key press or blur)\n\t\t\t */\n\t\t\tif (\n\t\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t\t) {\n\t\t\t\tconst applyEmptyValue =\n\t\t\t\t\trequired === false && currentValue === '';\n\n\t\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\t\tnextState.value = applyEmptyValue\n\t\t\t\t\t? currentValue\n\t\t\t\t\t: // @ts-expect-error TODO: Investigate if it's ok for currentValue to be undefined\n\t\t\t\t\t constrainValue( currentValue );\n\t\t\t}\n\n\t\t\treturn nextState;\n\t\t};\n\n\tconst buildSpinButtonClickHandler =\n\t\t( direction: 'up' | 'down' ) =>\n\t\t( event: MouseEvent< HTMLButtonElement > ) =>\n\t\t\tonChange( String( spinValue( valueProp, direction, event ) ), {\n\t\t\t\t// Set event.target to the <input> so that consumers can use\n\t\t\t\t// e.g. event.target.validity.\n\t\t\t\tevent: {\n\t\t\t\t\t...event,\n\t\t\t\t\ttarget: inputRef.current!,\n\t\t\t\t},\n\t\t\t} );\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ spinControls !== 'native' }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ mergedRef }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\t// @ts-expect-error TODO: Resolve discrepancy between `value` types in InputControl based components\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ ( state, action ) => {\n\t\t\t\tconst baseState = numberControlStateReducer( state, action );\n\t\t\t\treturn stateReducerProp?.( baseState, action ) ?? baseState;\n\t\t\t} }\n\t\t\tsize={ size }\n\t\t\tsuffix={\n\t\t\t\tspinControls === 'custom' ? (\n\t\t\t\t\t<>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t<Spacer marginBottom={ 0 } marginRight={ 2 }>\n\t\t\t\t\t\t\t<HStack spacing={ 1 }>\n\t\t\t\t\t\t\t\t<SpinButton\n\t\t\t\t\t\t\t\t\tclassName={ spinButtonClasses }\n\t\t\t\t\t\t\t\t\ticon={ plusIcon }\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\taria-label={ __( 'Increment' ) }\n\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'up'\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\t<SpinButton\n\t\t\t\t\t\t\t\t\tclassName={ spinButtonClasses }\n\t\t\t\t\t\t\t\t\ticon={ resetIcon }\n\t\t\t\t\t\t\t\t\tisSmall\n\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\taria-label={ __( 'Decrement' ) }\n\t\t\t\t\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\t\t\t\t\tonClick={ buildSpinButtonClickHandler(\n\t\t\t\t\t\t\t\t\t\t'down'\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</HStack>\n\t\t\t\t\t\t</Spacer>\n\t\t\t\t\t</>\n\t\t\t\t) : (\n\t\t\t\t\tsuffix\n\t\t\t\t)\n\t\t\t}\n\t\t\tonChange={ onChange }\n\t\t/>\n\t);\n}\n\nexport const NumberControl = forwardRef( UnforwardedNumberControl );\n\nexport default NumberControl;\n"]}
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.SpinButton = exports.Input = void 0;
|
|
8
|
+
exports.styles = exports.SpinButton = exports.Input = void 0;
|
|
9
9
|
|
|
10
10
|
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
11
11
|
|
|
@@ -27,7 +27,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
27
27
|
} : {
|
|
28
28
|
name: "jl4rev-htmlArrowStyles",
|
|
29
29
|
styles: "input[type='number']::-webkit-outer-spin-button,input[type='number']::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}input[type='number']{-moz-appearance:textfield;};label:htmlArrowStyles;",
|
|
30
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
30
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvbnVtYmVyLWNvbnRyb2wvc3R5bGVzL251bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtQlciLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9udW1iZXItY29udHJvbC9zdHlsZXMvbnVtYmVyLWNvbnRyb2wtc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgSW5wdXRDb250cm9sIGZyb20gJy4uLy4uL2lucHV0LWNvbnRyb2wnO1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vLi4vdXRpbHMnO1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi8uLi9idXR0b24nO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi8uLi91aS91dGlscy9zcGFjZSc7XG5cbmNvbnN0IGh0bWxBcnJvd1N0eWxlcyA9ICggeyBoaWRlSFRNTEFycm93cyB9OiB7IGhpZGVIVE1MQXJyb3dzOiBib29sZWFuIH0gKSA9PiB7XG5cdGlmICggISBoaWRlSFRNTEFycm93cyApIHtcblx0XHRyZXR1cm4gYGA7XG5cdH1cblxuXHRyZXR1cm4gY3NzYFxuXHRcdGlucHV0W3R5cGU9J251bWJlciddOjotd2Via2l0LW91dGVyLXNwaW4tYnV0dG9uLFxuXHRcdGlucHV0W3R5cGU9J251bWJlciddOjotd2Via2l0LWlubmVyLXNwaW4tYnV0dG9uIHtcblx0XHRcdC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZSAhaW1wb3J0YW50O1xuXHRcdFx0bWFyZ2luOiAwICFpbXBvcnRhbnQ7XG5cdFx0fVxuXG5cdFx0aW5wdXRbdHlwZT0nbnVtYmVyJ10ge1xuXHRcdFx0LW1vei1hcHBlYXJhbmNlOiB0ZXh0ZmllbGQ7XG5cdFx0fVxuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IElucHV0ID0gc3R5bGVkKCBJbnB1dENvbnRyb2wgKWBcblx0JHsgaHRtbEFycm93U3R5bGVzIH07XG5gO1xuXG5leHBvcnQgY29uc3QgU3BpbkJ1dHRvbiA9IHN0eWxlZCggQnV0dG9uIClgXG5cdCYmJiYmIHtcblx0XHRjb2xvcjogJHsgQ09MT1JTLnVpLnRoZW1lIH07XG5cdH1cbmA7XG5cbmNvbnN0IHNtYWxsU3BpbkJ1dHRvbnMgPSBjc3NgXG5cdHdpZHRoOiAkeyBzcGFjZSggNSApIH07XG5cdG1pbi13aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRoZWlnaHQ6ICR7IHNwYWNlKCA1ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBzdHlsZXMgPSB7IHNtYWxsU3BpbkJ1dHRvbnMgfTtcbiJdfQ== */",
|
|
31
31
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
32
32
|
};
|
|
33
33
|
|
|
@@ -46,24 +46,18 @@ const Input = ( /*#__PURE__*/0, _base.default)(_inputControl.default, process.en
|
|
|
46
46
|
} : {
|
|
47
47
|
target: "ep09it41",
|
|
48
48
|
label: "Input"
|
|
49
|
-
})(htmlArrowStyles, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
49
|
+
})(htmlArrowStyles, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# source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1pbm5lci1zcGluLWJ1dHRvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS50aGVtZSB9O1xuXHR9XG5gO1xuXG5jb25zdCBzbWFsbFNwaW5CdXR0b25zID0gY3NzYFxuXHR3aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRtaW4td2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0aGVpZ2h0OiAkeyBzcGFjZSggNSApIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgc3R5bGVzID0geyBzbWFsbFNwaW5CdXR0b25zIH07XG4iXX0= */"));
|
|
50
50
|
exports.Input = Input;
|
|
51
|
-
|
|
52
|
-
const spinButtonSizeStyles = ({
|
|
53
|
-
size
|
|
54
|
-
}) => {
|
|
55
|
-
if (size !== 'small') {
|
|
56
|
-
return ``;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return /*#__PURE__*/(0, _react.css)("width:", (0, _space.space)(5), ";min-width:", (0, _space.space)(5), ";height:", (0, _space.space)(5), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:spinButtonSizeStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIk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Oi13ZWJraXQtaW5uZXItc3Bpbi1idXR0b24ge1xuXHRcdFx0LXdlYmtpdC1hcHBlYXJhbmNlOiBub25lICFpbXBvcnRhbnQ7XG5cdFx0XHRtYXJnaW46IDAgIWltcG9ydGFudDtcblx0XHR9XG5cblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXSB7XG5cdFx0XHQtbW96LWFwcGVhcmFuY2U6IHRleHRmaWVsZDtcblx0XHR9XG5cdGA7XG59O1xuXG5leHBvcnQgY29uc3QgSW5wdXQgPSBzdHlsZWQoIElucHV0Q29udHJvbCApYFxuXHQkeyBodG1sQXJyb3dTdHlsZXMgfTtcbmA7XG5cbmNvbnN0IHNwaW5CdXR0b25TaXplU3R5bGVzID0gKCB7XG5cdHNpemUsXG59OiBQaWNrPCBOdW1iZXJDb250cm9sUHJvcHMsICdzaXplJyA+ICkgPT4ge1xuXHRpZiAoIHNpemUgIT09ICdzbWFsbCcgKSB7XG5cdFx0cmV0dXJuIGBgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHR3aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRcdG1pbi13aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRcdGhlaWdodDogJHsgc3BhY2UoIDUgKSB9O1xuXHRgO1xufTtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS50aGVtZSB9O1xuXHRcdCR7IHNwaW5CdXR0b25TaXplU3R5bGVzIH1cblx0fVxuYDtcbiJdfQ== */");
|
|
60
|
-
};
|
|
61
|
-
|
|
62
51
|
const SpinButton = ( /*#__PURE__*/0, _base.default)(_button.default, process.env.NODE_ENV === "production" ? {
|
|
63
52
|
target: "ep09it40"
|
|
64
53
|
} : {
|
|
65
54
|
target: "ep09it40",
|
|
66
55
|
label: "SpinButton"
|
|
67
|
-
})("&&&&&{color:", _utils.COLORS.ui.theme, ";
|
|
56
|
+
})("&&&&&{color:", _utils.COLORS.ui.theme, ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvbnVtYmVyLWNvbnRyb2wvc3R5bGVzL251bWJlci1jb250cm9sLXN0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQzBDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvbnVtYmVyLWNvbnRyb2wvc3R5bGVzL251bWJlci1jb250cm9sLXN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IElucHV0Q29udHJvbCBmcm9tICcuLi8uLi9pbnB1dC1jb250cm9sJztcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uLy4uL3V0aWxzJztcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vLi4vYnV0dG9uJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vLi4vdWkvdXRpbHMvc3BhY2UnO1xuXG5jb25zdCBodG1sQXJyb3dTdHlsZXMgPSAoIHsgaGlkZUhUTUxBcnJvd3MgfTogeyBoaWRlSFRNTEFycm93czogYm9vbGVhbiB9ICkgPT4ge1xuXHRpZiAoICEgaGlkZUhUTUxBcnJvd3MgKSB7XG5cdFx0cmV0dXJuIGBgO1xuXHR9XG5cblx0cmV0dXJuIGNzc2Bcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1vdXRlci1zcGluLWJ1dHRvbixcblx0XHRpbnB1dFt0eXBlPSdudW1iZXInXTo6LXdlYmtpdC1pbm5lci1zcGluLWJ1dHRvbiB7XG5cdFx0XHQtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmUgIWltcG9ydGFudDtcblx0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS50aGVtZSB9O1xuXHR9XG5gO1xuXG5jb25zdCBzbWFsbFNwaW5CdXR0b25zID0gY3NzYFxuXHR3aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRtaW4td2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0aGVpZ2h0OiAkeyBzcGFjZSggNSApIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgc3R5bGVzID0geyBzbWFsbFNwaW5CdXR0b25zIH07XG4iXX0= */"));
|
|
68
57
|
exports.SpinButton = SpinButton;
|
|
58
|
+
const smallSpinButtons = /*#__PURE__*/(0, _react.css)("width:", (0, _space.space)(5), ";min-width:", (0, _space.space)(5), ";height:", (0, _space.space)(5), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:smallSpinButtons;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50c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x0XHRcdG1hcmdpbjogMCAhaW1wb3J0YW50O1xuXHRcdH1cblxuXHRcdGlucHV0W3R5cGU9J251bWJlciddIHtcblx0XHRcdC1tb3otYXBwZWFyYW5jZTogdGV4dGZpZWxkO1xuXHRcdH1cblx0YDtcbn07XG5cbmV4cG9ydCBjb25zdCBJbnB1dCA9IHN0eWxlZCggSW5wdXRDb250cm9sIClgXG5cdCR7IGh0bWxBcnJvd1N0eWxlcyB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFNwaW5CdXR0b24gPSBzdHlsZWQoIEJ1dHRvbiApYFxuXHQmJiYmJiB7XG5cdFx0Y29sb3I6ICR7IENPTE9SUy51aS50aGVtZSB9O1xuXHR9XG5gO1xuXG5jb25zdCBzbWFsbFNwaW5CdXR0b25zID0gY3NzYFxuXHR3aWR0aDogJHsgc3BhY2UoIDUgKSB9O1xuXHRtaW4td2lkdGg6ICR7IHNwYWNlKCA1ICkgfTtcblx0aGVpZ2h0OiAkeyBzcGFjZSggNSApIH07XG5gO1xuXG5leHBvcnQgY29uc3Qgc3R5bGVzID0geyBzbWFsbFNwaW5CdXR0b25zIH07XG4iXX0= */");
|
|
59
|
+
const styles = {
|
|
60
|
+
smallSpinButtons
|
|
61
|
+
};
|
|
62
|
+
exports.styles = styles;
|
|
69
63
|
//# sourceMappingURL=number-control-styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/components/src/number-control/styles/number-control-styles.ts"],"names":["htmlArrowStyles","hideHTMLArrows","Input","InputControl","
|
|
1
|
+
{"version":3,"sources":["@wordpress/components/src/number-control/styles/number-control-styles.ts"],"names":["htmlArrowStyles","hideHTMLArrows","Input","InputControl","SpinButton","Button","COLORS","ui","theme","smallSpinButtons","css","styles"],"mappings":";;;;;;;;;;;AAGA;;AAMA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,MAAMA,eAAe,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAuD;AAC9E,MAAK,CAAEA,cAAP,EAAwB;AACvB,WAAQ,EAAR;AACA;;AAED;AAWA,CAhBD;;AAkBO,MAAMC,KAAK,GAAG,iCAAQC,qBAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,CACdH,eADc,y2DAAX;;AAIA,MAAMI,UAAU,GAAG,iCAAQC,eAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,iBAEXC,cAAOC,EAAP,CAAUC,KAFC,02DAAhB;;AAMP,MAAMC,gBAAgB,oBAAGC,UAAH,YACX,kBAAO,CAAP,CADW,iBAEP,kBAAO,CAAP,CAFO,cAGV,kBAAO,CAAP,CAHU,k7DAAtB;AAMO,MAAMC,MAAM,GAAG;AAAEF,EAAAA;AAAF,CAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\n\n/**\n * Internal dependencies\n */\nimport InputControl from '../../input-control';\nimport { COLORS } from '../../utils';\nimport Button from '../../button';\nimport { space } from '../../ui/utils/space';\n\nconst htmlArrowStyles = ( { hideHTMLArrows }: { hideHTMLArrows: boolean } ) => {\n\tif ( ! hideHTMLArrows ) {\n\t\treturn ``;\n\t}\n\n\treturn css`\n\t\tinput[type='number']::-webkit-outer-spin-button,\n\t\tinput[type='number']::-webkit-inner-spin-button {\n\t\t\t-webkit-appearance: none !important;\n\t\t\tmargin: 0 !important;\n\t\t}\n\n\t\tinput[type='number'] {\n\t\t\t-moz-appearance: textfield;\n\t\t}\n\t`;\n};\n\nexport const Input = styled( InputControl )`\n\t${ htmlArrowStyles };\n`;\n\nexport const SpinButton = styled( Button )`\n\t&&&&& {\n\t\tcolor: ${ COLORS.ui.theme };\n\t}\n`;\n\nconst smallSpinButtons = css`\n\twidth: ${ space( 5 ) };\n\tmin-width: ${ space( 5 ) };\n\theight: ${ space( 5 ) };\n`;\n\nexport const styles = { smallSpinButtons };\n"]}
|
|
@@ -11,8 +11,6 @@ exports.getNameForPosition = getNameForPosition;
|
|
|
11
11
|
|
|
12
12
|
var _element = require("@wordpress/element");
|
|
13
13
|
|
|
14
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
-
|
|
16
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
15
|
|
|
18
16
|
var _changeCase = require("change-case");
|
|
@@ -125,9 +123,9 @@ function ColorPickerPopover({
|
|
|
125
123
|
...receivedPopoverProps,
|
|
126
124
|
className: (0, _classnames.default)('components-palette-edit__popover', receivedPopoverProps?.className)
|
|
127
125
|
}), [receivedPopoverProps]);
|
|
128
|
-
return (0, _element.createElement)(_popover.default,
|
|
126
|
+
return (0, _element.createElement)(_popover.default, { ...popoverProps,
|
|
129
127
|
onClose: onClose
|
|
130
|
-
}
|
|
128
|
+
}, !isGradient && (0, _element.createElement)(_colorPicker.ColorPicker, {
|
|
131
129
|
color: element.color,
|
|
132
130
|
enableAlpha: true,
|
|
133
131
|
onChange: newColor => {
|
|
@@ -170,17 +168,18 @@ function Option({
|
|
|
170
168
|
// Use the custom palette color item as the popover anchor.
|
|
171
169
|
anchor: popoverAnchor
|
|
172
170
|
}), [popoverAnchor, receivedPopoverProps]);
|
|
173
|
-
return (0, _element.createElement)(_styles.PaletteItem,
|
|
171
|
+
return (0, _element.createElement)(_styles.PaletteItem, {
|
|
174
172
|
className: isEditing ? 'is-selected' : undefined,
|
|
175
173
|
as: "div",
|
|
176
174
|
onClick: onStartEditing,
|
|
177
|
-
ref: setPopoverAnchor
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
175
|
+
ref: setPopoverAnchor,
|
|
176
|
+
...(isEditing ? { ...focusOutsideProps
|
|
177
|
+
} : {
|
|
178
|
+
style: {
|
|
179
|
+
cursor: 'pointer'
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
}, (0, _element.createElement)(_hStack.HStack, {
|
|
184
183
|
justify: "flex-start"
|
|
185
184
|
}, (0, _element.createElement)(_flex.FlexItem, null, (0, _element.createElement)(_styles.IndicatorStyled, {
|
|
186
185
|
style: {
|