@wordpress/components 19.2.3 → 19.4.1-next.f435e9e01b.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -5
- package/CONTRIBUTING.md +1 -1
- package/LICENSE.md +1 -1
- package/README.md +8 -4
- package/build/angle-picker-control/index.js +2 -0
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/base-control/index.js +2 -3
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/styles/base-control-styles.js +23 -13
- package/build/base-control/styles/base-control-styles.js.map +1 -1
- package/build/base-field/hook.js +1 -1
- package/build/base-field/hook.js.map +1 -1
- package/build/box-control/styles/box-control-styles.js +9 -9
- package/build/box-control/styles/box-control-styles.js.map +1 -1
- package/build/button/deprecated.js +2 -1
- package/build/button/deprecated.js.map +1 -1
- package/build/button/index.js +2 -1
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js +13 -3
- package/build/button/index.native.js.map +1 -1
- package/build/card/card/component.js +1 -1
- package/build/card/card/component.js.map +1 -1
- package/build/card/card/hook.js +1 -1
- package/build/card/card/hook.js.map +1 -1
- package/build/card/card-body/hook.js +1 -1
- package/build/card/card-body/hook.js.map +1 -1
- package/build/card/card-divider/hook.js +1 -1
- package/build/card/card-divider/hook.js.map +1 -1
- package/build/card/card-footer/hook.js +1 -1
- package/build/card/card-footer/hook.js.map +1 -1
- package/build/card/card-header/hook.js +1 -1
- package/build/card/card-header/hook.js.map +1 -1
- package/build/card/card-media/hook.js +1 -1
- package/build/card/card-media/hook.js.map +1 -1
- package/build/checkbox-control/index.js +1 -1
- package/build/checkbox-control/index.js.map +1 -1
- package/build/circular-option-picker/index.js +2 -0
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/clipboard-button/index.js +1 -2
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-indicator/index.js +2 -0
- package/build/color-indicator/index.js.map +1 -1
- package/build/color-palette/index.js +2 -0
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +4 -2
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-display.js +4 -2
- package/build/color-picker/color-display.js.map +1 -1
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +2 -5
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +3 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/input-with-slider.js +3 -1
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +2 -0
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/confirm-dialog/component.js +107 -0
- package/build/confirm-dialog/component.js.map +1 -0
- package/build/confirm-dialog/index.js +16 -0
- package/build/confirm-dialog/index.js.map +1 -0
- package/build/confirm-dialog/styles.js +30 -0
- package/build/confirm-dialog/styles.js.map +1 -0
- package/build/confirm-dialog/types.js +6 -0
- package/build/confirm-dialog/types.js.map +1 -0
- package/build/custom-gradient-picker/index.js +1 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/date-time/date.js +63 -86
- package/build/date-time/date.js.map +1 -1
- package/build/date-time/time.js +1 -1
- package/build/date-time/time.js.map +1 -1
- package/build/date-time/utils.js +32 -0
- package/build/date-time/utils.js.map +1 -0
- package/build/divider/component.js +8 -7
- package/build/divider/component.js.map +1 -1
- package/build/divider/styles.js +38 -13
- package/build/divider/styles.js.map +1 -1
- package/build/drop-zone/index.js +14 -6
- package/build/drop-zone/index.js.map +1 -1
- package/build/drop-zone/provider.js +1 -0
- package/build/drop-zone/provider.js.map +1 -1
- package/build/dropdown/index.js +3 -3
- package/build/dropdown/index.js.map +1 -1
- package/build/elevation/hook.js +5 -5
- package/build/elevation/hook.js.map +1 -1
- package/build/external-link/styles/external-link-styles.js +5 -5
- package/build/external-link/styles/external-link-styles.js.map +1 -1
- package/build/flex/flex/hook.js +4 -4
- package/build/flex/flex/hook.js.map +1 -1
- package/build/flyout/styles.js +2 -2
- package/build/flyout/styles.js.map +1 -1
- package/build/focusable-iframe/index.js +1 -0
- package/build/focusable-iframe/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +75 -81
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/grid/hook.js +2 -2
- package/build/grid/hook.js.map +1 -1
- package/build/heading/component.js +0 -1
- package/build/heading/component.js.map +1 -1
- package/build/higher-order/with-focus-outside/index.js +2 -0
- package/build/higher-order/with-focus-outside/index.js.map +1 -1
- package/build/icon/index.js +0 -1
- package/build/icon/index.js.map +1 -1
- package/build/index.js +8 -0
- package/build/index.js.map +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +0 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/reducer/actions.js +0 -1
- package/build/input-control/reducer/actions.js.map +1 -1
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/reducer/state.js +0 -1
- package/build/input-control/reducer/state.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +51 -37
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/item-group/item/component.js +0 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item/hook.js +1 -2
- package/build/item-group/item/hook.js.map +1 -1
- package/build/item-group/item-group/component.js +0 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -12
- 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 +23 -5
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +3 -5
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +16 -16
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -3
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-text-input.native.js +2 -3
- package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build/mobile/color-settings/index.native.js +6 -2
- package/build/mobile/color-settings/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +12 -6
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/color-settings/utils.native.js +9 -3
- package/build/mobile/color-settings/utils.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +1 -1
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/gridicons/index.native.js +3 -1
- package/build/mobile/gridicons/index.native.js.map +1 -1
- package/build/mobile/keyboard-avoiding-view/index.ios.js +6 -8
- package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +47 -4
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js +18 -5
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +13 -1
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/mobile/readable-content-view/index.native.js +2 -2
- package/build/mobile/readable-content-view/index.native.js.map +1 -1
- package/build/mobile/utils/use-is-floating-keyboard.native.js +2 -2
- package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -2
- package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build/modal/aria-helper.js +2 -0
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +18 -20
- package/build/modal/index.js.map +1 -1
- package/build/navigator/context.js +5 -1
- package/build/navigator/context.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +42 -22
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +57 -29
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/use-navigator.js +8 -8
- package/build/navigator/use-navigator.js.map +1 -1
- package/build/notice/index.native.js +2 -2
- package/build/notice/index.native.js.map +1 -1
- package/build/palette-edit/index.js +8 -3
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/styles.js +11 -13
- package/build/palette-edit/styles.js.map +1 -1
- package/build/placeholder/index.js +4 -4
- package/build/placeholder/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +29 -29
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +0 -1
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/sandbox/index.native.js +5 -5
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scrollable/hook.js +1 -1
- package/build/scrollable/hook.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +33 -9
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +11 -2
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/spacer/component.js +0 -1
- package/build/spacer/component.js.map +1 -1
- package/build/spinner/index.js +44 -5
- package/build/spinner/index.js.map +1 -1
- package/build/spinner/index.native.js +4 -2
- package/build/spinner/index.native.js.map +1 -1
- package/build/spinner/styles.js +56 -0
- package/build/spinner/styles.js.map +1 -0
- package/build/style-provider/index.js +2 -0
- package/build/style-provider/index.js.map +1 -1
- package/build/surface/hook.js +1 -1
- package/build/surface/hook.js.map +1 -1
- package/build/text/get-line-height.js +0 -1
- package/build/text/get-line-height.js.map +1 -1
- package/build/text/hook.js +5 -5
- package/build/text/hook.js.map +1 -1
- package/build/tip/index.js +4 -8
- package/build/tip/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +9 -14
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +3 -14
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +0 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build/tools-panel/styles.js +12 -10
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +6 -9
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +51 -44
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +0 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/hook.js +3 -3
- package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js +0 -1
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +9 -3
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tree-grid/index.js +13 -6
- package/build/tree-grid/index.js.map +1 -1
- package/build/truncate/hook.js +2 -2
- package/build/truncate/hook.js.map +1 -1
- package/build/ui/shortcut/component.js +0 -1
- package/build/ui/shortcut/component.js.map +1 -1
- package/build/ui/utils/font-size.js +0 -1
- package/build/ui/utils/font-size.js.map +1 -1
- package/build/ui/utils/get-valid-children.js +0 -1
- package/build/ui/utils/get-valid-children.js.map +1 -1
- package/build/unit-control/index.js +0 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +23 -41
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/utils/colors-values.js +6 -3
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/config-values.js +1 -4
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/hooks/use-combined-ref.js.map +1 -1
- package/build/utils/hooks/use-latest-ref.js +0 -1
- package/build/utils/hooks/use-latest-ref.js.map +1 -1
- package/build/z-stack/component.js +0 -1
- package/build/z-stack/component.js.map +1 -1
- package/build/z-stack/styles.js +10 -8
- package/build/z-stack/styles.js.map +1 -1
- package/build-module/angle-picker-control/index.js +2 -0
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/base-control/index.js +3 -4
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/styles/base-control-styles.js +20 -12
- package/build-module/base-control/styles/base-control-styles.js.map +1 -1
- package/build-module/base-field/hook.js +1 -1
- package/build-module/base-field/hook.js.map +1 -1
- package/build-module/box-control/styles/box-control-styles.js +9 -9
- package/build-module/box-control/styles/box-control-styles.js.map +1 -1
- package/build-module/button/deprecated.js +2 -1
- package/build-module/button/deprecated.js.map +1 -1
- package/build-module/button/index.js +2 -1
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +13 -3
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/card/card/component.js +1 -1
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card/hook.js +1 -1
- package/build-module/card/card/hook.js.map +1 -1
- package/build-module/card/card-body/hook.js +1 -1
- package/build-module/card/card-body/hook.js.map +1 -1
- package/build-module/card/card-divider/hook.js +1 -1
- package/build-module/card/card-divider/hook.js.map +1 -1
- package/build-module/card/card-footer/hook.js +1 -1
- package/build-module/card/card-footer/hook.js.map +1 -1
- package/build-module/card/card-header/hook.js +1 -1
- package/build-module/card/card-header/hook.js.map +1 -1
- package/build-module/card/card-media/hook.js +1 -1
- package/build-module/card/card-media/hook.js.map +1 -1
- package/build-module/checkbox-control/index.js +1 -1
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/circular-option-picker/index.js +1 -0
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/clipboard-button/index.js +1 -2
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-indicator/index.js +1 -0
- package/build-module/color-indicator/index.js.map +1 -1
- package/build-module/color-palette/index.js +1 -0
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +4 -2
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-display.js +3 -2
- package/build-module/color-picker/color-display.js.map +1 -1
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +2 -4
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +2 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +2 -1
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +3 -2
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/confirm-dialog/component.js +87 -0
- package/build-module/confirm-dialog/component.js.map +1 -0
- package/build-module/confirm-dialog/index.js +6 -0
- package/build-module/confirm-dialog/index.js.map +1 -0
- package/build-module/confirm-dialog/styles.js +25 -0
- package/build-module/confirm-dialog/styles.js.map +1 -0
- package/build-module/confirm-dialog/types.js +2 -0
- package/build-module/confirm-dialog/types.js.map +1 -0
- package/build-module/custom-gradient-picker/index.js +1 -0
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/date-time/date.js +63 -87
- package/build-module/date-time/date.js.map +1 -1
- package/build-module/date-time/time.js +1 -1
- package/build-module/date-time/time.js.map +1 -1
- package/build-module/date-time/utils.js +20 -0
- package/build-module/date-time/utils.js.map +1 -0
- package/build-module/divider/component.js +9 -8
- package/build-module/divider/component.js.map +1 -1
- package/build-module/divider/styles.js +37 -13
- package/build-module/divider/styles.js.map +1 -1
- package/build-module/drop-zone/index.js +14 -6
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/drop-zone/provider.js +1 -0
- package/build-module/drop-zone/provider.js.map +1 -1
- package/build-module/dropdown/index.js +3 -3
- package/build-module/dropdown/index.js.map +1 -1
- package/build-module/elevation/hook.js +5 -5
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/external-link/styles/external-link-styles.js +5 -5
- package/build-module/external-link/styles/external-link-styles.js.map +1 -1
- package/build-module/flex/flex/hook.js +4 -4
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/flyout/styles.js +2 -2
- package/build-module/flyout/styles.js.map +1 -1
- package/build-module/focusable-iframe/index.js +1 -0
- package/build-module/focusable-iframe/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +73 -79
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/grid/hook.js +2 -2
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/heading/component.js +0 -1
- package/build-module/heading/component.js.map +1 -1
- package/build-module/higher-order/with-focus-outside/index.js +1 -0
- package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
- package/build-module/icon/index.js +0 -1
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +1 -0
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +0 -1
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +1 -1
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/reducer/actions.js +0 -1
- package/build-module/input-control/reducer/actions.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +1 -1
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/reducer/state.js +0 -1
- package/build-module/input-control/reducer/state.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +51 -37
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/item-group/item/component.js +0 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item/hook.js +1 -2
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/item-group/item-group/component.js +0 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +5 -13
- 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 +23 -5
- 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 +3 -3
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +16 -13
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +10 -4
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-text-input.native.js +2 -2
- package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
- package/build-module/mobile/color-settings/index.native.js +6 -2
- package/build-module/mobile/color-settings/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +12 -6
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/color-settings/utils.native.js +7 -3
- package/build-module/mobile/color-settings/utils.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/gridicons/index.native.js +1 -0
- package/build-module/mobile/gridicons/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js +6 -6
- package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +50 -7
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js +13 -5
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +12 -1
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/mobile/readable-content-view/index.native.js +2 -2
- package/build-module/mobile/readable-content-view/index.native.js.map +1 -1
- package/build-module/mobile/utils/use-is-floating-keyboard.native.js +2 -2
- package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -2
- package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
- package/build-module/modal/aria-helper.js +2 -0
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +16 -19
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigator/context.js +5 -1
- package/build-module/navigator/context.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +43 -24
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +57 -32
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/use-navigator.js +8 -8
- package/build-module/navigator/use-navigator.js.map +1 -1
- package/build-module/notice/index.native.js +2 -2
- package/build-module/notice/index.native.js.map +1 -1
- package/build-module/palette-edit/index.js +8 -3
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/styles.js +11 -12
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/placeholder/index.js +4 -4
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +29 -29
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +3 -3
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +0 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/sandbox/index.native.js +5 -5
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scrollable/hook.js +1 -1
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +33 -9
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +11 -2
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/spacer/component.js +0 -1
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spinner/index.js +40 -5
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/spinner/index.native.js +4 -2
- package/build-module/spinner/index.native.js.map +1 -1
- package/build-module/spinner/styles.js +49 -0
- package/build-module/spinner/styles.js.map +1 -0
- package/build-module/style-provider/index.js +1 -0
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/surface/hook.js +1 -1
- package/build-module/surface/hook.js.map +1 -1
- package/build-module/text/get-line-height.js +0 -1
- package/build-module/text/get-line-height.js.map +1 -1
- package/build-module/text/hook.js +5 -5
- package/build-module/text/hook.js.map +1 -1
- package/build-module/tip/index.js +4 -8
- package/build-module/tip/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +10 -13
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +3 -11
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js +0 -1
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build-module/tools-panel/styles.js +12 -11
- package/build-module/tools-panel/styles.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +5 -9
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +52 -45
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +0 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/hook.js +3 -3
- package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js +0 -1
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +9 -3
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tree-grid/index.js +12 -6
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/truncate/hook.js +2 -2
- package/build-module/truncate/hook.js.map +1 -1
- package/build-module/ui/shortcut/component.js +0 -1
- package/build-module/ui/shortcut/component.js.map +1 -1
- package/build-module/ui/utils/font-size.js +0 -1
- package/build-module/ui/utils/font-size.js.map +1 -1
- package/build-module/ui/utils/get-valid-children.js +0 -1
- package/build-module/ui/utils/get-valid-children.js.map +1 -1
- package/build-module/unit-control/index.js +0 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +23 -41
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +1 -2
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/utils/colors-values.js +6 -3
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/config-values.js +1 -4
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/hooks/use-combined-ref.js +0 -1
- package/build-module/utils/hooks/use-combined-ref.js.map +1 -1
- package/build-module/utils/hooks/use-latest-ref.js +0 -1
- package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
- package/build-module/z-stack/component.js +0 -1
- package/build-module/z-stack/component.js.map +1 -1
- package/build-module/z-stack/styles.js +13 -8
- package/build-module/z-stack/styles.js.map +1 -1
- package/build-style/style-rtl.css +36 -15
- package/build-style/style.css +36 -15
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/styles/base-control-styles.d.ts +4 -0
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/base-field/hook.d.ts +16 -16
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +16 -16
- package/build-types/card/card-body/hook.d.ts +16 -16
- package/build-types/card/card-divider/hook.d.ts +18 -18
- package/build-types/card/card-footer/hook.d.ts +17 -17
- package/build-types/card/card-header/hook.d.ts +16 -16
- package/build-types/card/card-media/hook.d.ts +16 -16
- package/build-types/card/types.d.ts.map +1 -1
- package/build-types/color-picker/color-display.d.ts +1 -0
- package/build-types/color-picker/color-display.d.ts.map +1 -1
- package/build-types/color-picker/color-input.d.ts +1 -0
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts +1 -0
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts +1 -0
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts +1 -0
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +1 -0
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +1 -0
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts +1 -0
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +1 -1
- package/build-types/confirm-dialog/component.d.ts +4 -4
- package/build-types/divider/component.d.ts +8 -7
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +2 -2
- package/build-types/divider/styles.d.ts.map +1 -1
- package/build-types/divider/types.d.ts +5 -5
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts +1 -13
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +15 -15
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/elevation/types.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +16 -16
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +16 -16
- package/build-types/flex/flex-item/hook.d.ts +16 -16
- package/build-types/flex/types.d.ts.map +1 -1
- package/build-types/flyout/flyout/hook.d.ts +17 -17
- package/build-types/flyout/styles.d.ts +7 -9
- package/build-types/flyout/styles.d.ts.map +1 -1
- package/build-types/flyout/types.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +16 -16
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/grid/types.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +17 -17
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/h-stack/types.d.ts.map +1 -1
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +16 -16
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/reducer/actions.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/reducer/state.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +1 -2
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +2 -1
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +16 -16
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +16 -16
- package/build-types/navigator/context.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +16 -17
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +16 -16
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +10 -9
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/resizable-box/index.d.ts +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +16 -16
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +1 -1
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +16 -16
- package/build-types/spacer/types.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +18 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +16 -16
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/text/get-line-height.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +16 -16
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +0 -5
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +1 -7
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +24 -20
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +16 -16
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +16 -16
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +14 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +16 -16
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +18 -18
- package/build-types/ui/control-group/types.d.ts.map +1 -1
- package/build-types/ui/control-label/hook.d.ts +16 -16
- package/build-types/ui/form-group/form-group.d.ts +4 -4
- package/build-types/ui/form-group/types.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +55 -55
- package/build-types/ui/shortcut/component.d.ts.map +1 -1
- package/build-types/ui/tooltip/types.d.ts.map +1 -1
- package/build-types/ui/utils/font-size.d.ts.map +1 -1
- package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +3 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -0
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +4 -3
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts +1 -0
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +1 -5
- package/build-types/utils/config-values.d.ts.map +1 -1
- package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -1
- package/build-types/utils/hooks/use-latest-ref.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +16 -16
- package/build-types/v-stack/types.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +23 -22
- package/src/alignment-matrix-control/stories/index.js +1 -1
- package/src/angle-picker-control/index.js +2 -0
- package/src/base-control/index.js +11 -2
- package/src/base-control/stories/index.js +1 -1
- package/src/base-control/styles/base-control-styles.js +10 -1
- package/src/base-field/hook.js +1 -1
- package/src/box-control/styles/box-control-styles.js +1 -1
- package/src/button/deprecated.js +1 -0
- package/src/button/index.js +1 -0
- package/src/button/index.native.js +15 -1
- package/src/button/stories/index.js +1 -1
- package/src/button/style.scss +14 -0
- package/src/card/card/README.md +3 -3
- package/src/card/card/component.js +1 -1
- package/src/card/card/hook.js +1 -1
- package/src/card/card-body/hook.js +1 -1
- package/src/card/card-divider/hook.js +1 -1
- package/src/card/card-footer/hook.js +1 -1
- package/src/card/card-header/hook.js +1 -1
- package/src/card/card-media/hook.js +1 -1
- package/src/card/stories/index.js +1 -1
- package/src/card/test/__snapshots__/index.js.snap +6 -6
- package/src/card/types.ts +0 -1
- package/src/checkbox-control/index.js +1 -1
- package/src/checkbox-control/stories/index.js +1 -1
- package/src/circular-option-picker/index.js +1 -0
- package/src/clipboard-button/index.js +1 -2
- package/src/color-indicator/README.md +28 -0
- package/src/color-indicator/index.js +2 -0
- package/src/color-indicator/stories/index.js +1 -1
- package/src/color-indicator/style.scss +5 -8
- package/src/color-palette/index.js +1 -0
- package/src/color-palette/index.native.js +2 -0
- package/src/color-palette/stories/index.js +1 -1
- package/src/color-palette/test/__snapshots__/index.js.snap +1 -1
- package/src/color-picker/README.md +1 -1
- package/src/color-picker/color-display.tsx +4 -3
- package/src/color-picker/color-input.tsx +1 -1
- package/src/color-picker/component.tsx +3 -4
- package/src/color-picker/hex-input.tsx +2 -1
- package/src/color-picker/input-with-slider.tsx +2 -1
- package/src/color-picker/stories/index.js +1 -1
- package/src/color-picker/use-deprecated-props.ts +2 -1
- package/src/combobox-control/README.md +2 -2
- package/src/combobox-control/stories/index.js +6 -2
- package/src/combobox-control/style.scss +2 -2
- package/src/confirm-dialog/README.md +128 -0
- package/src/confirm-dialog/component.tsx +117 -0
- package/src/confirm-dialog/index.tsx +6 -0
- package/src/confirm-dialog/stories/index.js +123 -0
- package/src/confirm-dialog/styles.ts +18 -0
- package/src/confirm-dialog/test/index.js +302 -0
- package/src/confirm-dialog/types.ts +25 -0
- package/src/custom-gradient-picker/index.js +1 -0
- package/src/custom-gradient-picker/style.scss +0 -5
- package/src/custom-select-control/stories/index.js +27 -0
- package/src/date-time/README.md +9 -2
- package/src/date-time/date.js +67 -84
- package/src/date-time/stories/index.js +1 -1
- package/src/date-time/stories/time.js +1 -1
- package/src/date-time/test/date.js +3 -29
- package/src/date-time/test/time.js +2 -2
- package/src/date-time/test/utils.js +32 -0
- package/src/date-time/time.js +2 -2
- package/src/date-time/utils.js +18 -0
- package/src/dimension-control/README.md +3 -1
- package/src/divider/README.md +33 -5
- package/src/divider/component.tsx +8 -8
- package/src/divider/stories/index.js +43 -17
- package/src/divider/styles.ts +53 -16
- package/src/divider/test/__snapshots__/index.js.snap +11 -11
- package/src/divider/test/index.js +4 -4
- package/src/divider/types.ts +5 -5
- package/src/drop-zone/index.js +14 -6
- package/src/drop-zone/provider.js +1 -0
- package/src/dropdown/index.js +14 -13
- package/src/dropdown-menu/stories/index.js +1 -1
- package/src/duotone-picker/README.md +1 -1
- package/src/elevation/hook.js +1 -0
- package/src/elevation/stories/index.js +1 -1
- package/src/elevation/types.ts +0 -1
- package/src/external-link/stories/index.js +1 -1
- package/src/external-link/styles/external-link-styles.js +3 -3
- package/src/flex/flex/hook.js +1 -0
- package/src/flex/types.ts +0 -1
- package/src/flyout/styles.ts +4 -2
- package/src/flyout/types.ts +0 -1
- package/src/focusable-iframe/index.js +1 -0
- package/src/font-size-picker/stories/index.js +1 -1
- package/src/form-token-field/stories/index.js +1 -1
- package/src/form-token-field/style.scss +1 -1
- package/src/form-token-field/suggestions-list.js +109 -120
- package/src/form-token-field/test/index.js +4 -2
- package/src/gradient-picker/README.md +94 -0
- package/src/gradient-picker/stories/index.js +1 -1
- package/src/grid/hook.js +1 -0
- package/src/grid/stories/index.js +1 -1
- package/src/grid/types.ts +0 -1
- package/src/guide/stories/index.js +1 -1
- package/src/h-stack/types.ts +0 -1
- package/src/heading/component.tsx +0 -1
- package/src/higher-order/with-focus-outside/index.js +2 -0
- package/src/icon/index.tsx +0 -1
- package/src/icon/stories/index.js +1 -1
- package/src/index.js +1 -0
- package/src/input-control/index.tsx +0 -1
- package/src/input-control/input-base.tsx +0 -1
- package/src/input-control/input-field.tsx +0 -1
- package/src/input-control/reducer/actions.ts +0 -1
- package/src/input-control/reducer/reducer.ts +0 -1
- package/src/input-control/reducer/state.ts +0 -1
- package/src/input-control/stories/index.js +2 -1
- package/src/input-control/styles/input-control-styles.tsx +23 -13
- package/src/input-control/types.ts +3 -2
- package/src/item-group/item/component.tsx +0 -1
- package/src/item-group/item/hook.ts +1 -2
- package/src/item-group/item-group/component.tsx +0 -1
- package/src/item-group/stories/index.js +84 -2
- package/src/menu-item/README.md +2 -2
- package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +8 -14
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +33 -3
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +162 -0
- package/src/mobile/bottom-sheet/cell.native.js +8 -6
- package/src/mobile/bottom-sheet/index.native.js +24 -14
- package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +6 -2
- package/src/mobile/bottom-sheet/link-suggestion-styles.native.scss +3 -0
- package/src/mobile/bottom-sheet/range-text-input.native.js +5 -2
- package/src/mobile/bottom-sheet/styles.native.scss +4 -0
- package/src/mobile/bottom-sheet/test/index.native.js +24 -0
- package/src/mobile/color-settings/index.native.js +4 -0
- package/src/mobile/color-settings/palette.screen.native.js +13 -5
- package/src/mobile/color-settings/style.native.scss +1 -1
- package/src/mobile/color-settings/utils.native.js +8 -3
- package/src/mobile/global-styles-context/utils.native.js +1 -1
- package/src/mobile/gridicons/index.native.js +3 -3
- package/src/mobile/html-text-input/test/index.native.js +34 -35
- package/src/mobile/inserter-button/style.native.scss +1 -0
- package/src/mobile/keyboard-avoiding-view/index.ios.js +12 -9
- package/src/mobile/link-picker/index.native.js +41 -6
- package/src/mobile/link-picker/link-picker-screen.native.js +13 -5
- package/src/mobile/link-settings/index.native.js +13 -1
- package/src/mobile/link-settings/test/edit.native.js +368 -0
- package/src/mobile/link-settings/test/link-settings-navigation.native.js +97 -0
- package/src/mobile/readable-content-view/index.native.js +5 -2
- package/src/mobile/utils/use-is-floating-keyboard.native.js +2 -5
- package/src/mobile/utils/use-unit-converter-to-mobile.native.js +5 -2
- package/src/modal/README.md +10 -0
- package/src/modal/aria-helper.js +2 -0
- package/src/modal/index.js +71 -63
- package/src/modal/stories/index.js +6 -1
- package/src/modal/style.scss +9 -0
- package/src/modal/test/index.js +11 -0
- package/src/navigation/README.md +0 -9
- package/src/navigator/context.ts +5 -1
- package/src/navigator/navigator-provider/README.md +30 -20
- package/src/navigator/navigator-provider/component.tsx +69 -25
- package/src/navigator/navigator-screen/component.tsx +71 -34
- package/src/navigator/stories/index.js +26 -13
- package/src/navigator/test/index.js +167 -32
- package/src/navigator/types.ts +11 -11
- package/src/navigator/use-navigator.ts +4 -4
- package/src/notice/index.native.js +5 -2
- package/src/notice/stories/index.js +1 -1
- package/src/number-control/stories/index.js +1 -1
- package/src/palette-edit/index.js +9 -2
- package/src/palette-edit/styles.js +22 -3
- package/src/panel/stories/index.js +1 -1
- package/src/placeholder/index.js +8 -6
- package/src/placeholder/stories/index.js +1 -1
- package/src/placeholder/style.scss +12 -0
- package/src/placeholder/test/index.js +18 -1
- package/src/popover/stories/index.js +1 -1
- package/src/query-controls/README.md +138 -6
- package/src/radio-group/README.md +4 -1
- package/src/range-control/stories/index.js +1 -1
- package/src/range-control/styles/range-control-styles.js +1 -1
- package/src/resizable-box/index.tsx +0 -1
- package/src/resizable-box/resize-tooltip/index.tsx +1 -2
- package/src/resizable-box/resize-tooltip/label.tsx +0 -1
- package/src/resizable-box/stories/index.js +1 -1
- package/src/sandbox/index.native.js +8 -5
- package/src/scrollable/hook.js +1 -1
- package/src/scrollable/stories/index.js +7 -4
- package/src/search-control/stories/index.js +1 -1
- package/src/select-control/stories/index.js +2 -1
- package/src/select-control/styles/select-control-styles.ts +25 -2
- package/src/select-control/types.ts +1 -1
- package/src/slot-fill/bubbles-virtually/fill.js +12 -1
- package/src/slot-fill/stories/index.js +1 -1
- package/src/snackbar/stories/index.js +1 -1
- package/src/spacer/component.tsx +0 -1
- package/src/spacer/stories/index.js +1 -1
- package/src/spacer/types.ts +0 -1
- package/src/spinner/README.md +10 -10
- package/src/spinner/index.js +42 -3
- package/src/spinner/index.native.js +7 -2
- package/src/spinner/stories/index.js +36 -3
- package/src/spinner/styles.js +47 -0
- package/src/style-provider/index.js +2 -0
- package/src/surface/hook.js +1 -0
- package/src/surface/stories/index.js +1 -1
- package/src/tab-panel/stories/index.js +1 -1
- package/src/text/get-line-height.ts +0 -1
- package/src/text/hook.js +1 -0
- package/src/text/types.ts +0 -1
- package/src/text-control/stories/index.js +1 -1
- package/src/text-highlight/stories/index.js +1 -1
- package/src/textarea-control/stories/index.js +1 -1
- package/src/tip/index.js +2 -4
- package/src/tip/stories/index.js +1 -1
- package/src/toggle-control/stories/index.js +1 -1
- package/src/toggle-group-control/stories/index.js +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +25 -27
- package/src/toggle-group-control/toggle-group-control/component.tsx +8 -14
- package/src/toggle-group-control/toggle-group-control/styles.ts +0 -14
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +0 -1
- package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -3
- package/src/toggle-group-control/types.ts +1 -9
- package/src/toolbar-button/stories/index.js +1 -1
- package/src/tools-panel/stories/index.js +75 -1
- package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +244 -0
- package/src/tools-panel/styles.ts +40 -2
- package/src/tools-panel/test/__snapshots__/index.js.snap +219 -0
- package/src/tools-panel/test/index.js +81 -1
- package/src/tools-panel/tools-panel/README.md +9 -0
- package/src/tools-panel/tools-panel/component.tsx +2 -6
- package/src/tools-panel/tools-panel/hook.ts +164 -97
- package/src/tools-panel/tools-panel-header/component.tsx +0 -1
- package/src/tools-panel/tools-panel-header/hook.ts +3 -3
- package/src/tools-panel/tools-panel-item/component.tsx +0 -1
- package/src/tools-panel/tools-panel-item/hook.ts +25 -2
- package/src/tools-panel/types.ts +14 -1
- package/src/tooltip/stories/index.js +1 -1
- package/src/tooltip/test/index.native.js +3 -1
- package/src/tree-grid/index.js +19 -5
- package/src/tree-select/stories/index.js +1 -1
- package/src/truncate/hook.js +1 -1
- package/src/truncate/stories/index.js +1 -1
- package/src/ui/README.md +1 -1
- package/src/ui/context/wordpress-component.ts +0 -1
- package/src/ui/control-group/types.ts +0 -1
- package/src/ui/form-group/types.ts +0 -1
- package/src/ui/shortcut/component.tsx +0 -1
- package/src/ui/tooltip/types.ts +0 -1
- package/src/ui/utils/font-size.ts +0 -1
- package/src/ui/utils/get-valid-children.ts +0 -1
- package/src/unit-control/index.tsx +0 -1
- package/src/unit-control/stories/index.js +19 -1
- package/src/unit-control/styles/unit-control-styles.ts +33 -46
- package/src/unit-control/types.ts +7 -4
- package/src/unit-control/unit-select-control.tsx +0 -1
- package/src/utils/colors-values.js +4 -3
- package/src/utils/config-values.js +1 -5
- package/src/utils/hooks/stories/use-cx.js +121 -44
- package/src/utils/hooks/use-combined-ref.ts +0 -1
- package/src/utils/hooks/use-latest-ref.ts +0 -1
- package/src/v-stack/types.ts +0 -1
- package/src/z-stack/README.md +1 -1
- package/src/z-stack/component.tsx +1 -2
- package/src/z-stack/stories/index.js +1 -1
- package/src/z-stack/styles.ts +7 -2
- package/tsconfig.json +9 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/spinner/styles/spinner-styles.js +0 -40
- package/build/spinner/styles/spinner-styles.js.map +0 -1
- package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -90
- package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
- package/build-module/spinner/styles/spinner-styles.js +0 -28
- package/build-module/spinner/styles/spinner-styles.js.map +0 -1
- package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -86
- package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
- package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
- package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
- package/build-types/toggle-group-control/component.d.ts +0 -4
- package/build-types/toggle-group-control/component.d.ts.map +0 -1
- package/build-types/toggle-group-control/styles.d.ts +0 -25
- package/build-types/toggle-group-control/styles.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
- package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
- package/build-types/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control-button.d.ts +0 -6
- package/build-types/toggle-group-control/toggle-group-control-button.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control-context.d.ts +0 -9
- package/build-types/toggle-group-control/toggle-group-control-context.d.ts.map +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option.d.ts +0 -4
- package/build-types/toggle-group-control/toggle-group-control-option.d.ts.map +0 -1
- package/build-types/ui/color-picker/color-display.d.ts +0 -13
- package/build-types/ui/color-picker/color-display.d.ts.map +0 -1
- package/build-types/ui/color-picker/color-input.d.ts +0 -13
- package/build-types/ui/color-picker/color-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/component.d.ts +0 -12
- package/build-types/ui/color-picker/component.d.ts.map +0 -1
- package/build-types/ui/color-picker/hex-input.d.ts +0 -12
- package/build-types/ui/color-picker/hex-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/hsl-input.d.ts +0 -12
- package/build-types/ui/color-picker/hsl-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/index.d.ts +0 -2
- package/build-types/ui/color-picker/index.d.ts.map +0 -1
- package/build-types/ui/color-picker/input-with-slider.d.ts +0 -11
- package/build-types/ui/color-picker/input-with-slider.d.ts.map +0 -1
- package/build-types/ui/color-picker/legacy-adapter.d.ts +0 -5
- package/build-types/ui/color-picker/legacy-adapter.d.ts.map +0 -1
- package/build-types/ui/color-picker/picker.d.ts +0 -12
- package/build-types/ui/color-picker/picker.d.ts.map +0 -1
- package/build-types/ui/color-picker/rgb-input.d.ts +0 -12
- package/build-types/ui/color-picker/rgb-input.d.ts.map +0 -1
- package/build-types/ui/color-picker/styles.d.ts +0 -76
- package/build-types/ui/color-picker/styles.d.ts.map +0 -1
- package/build-types/ui/color-picker/types.d.ts +0 -2
- package/build-types/ui/color-picker/types.d.ts.map +0 -1
- package/build-types/ui/color-picker/use-deprecated-props.d.ts +0 -50
- package/build-types/ui/color-picker/use-deprecated-props.d.ts.map +0 -1
- package/build-types/ui/utils/create-component.d.ts +0 -21
- package/build-types/ui/utils/create-component.d.ts.map +0 -1
- package/build-types/utils/hooks/use-jump-step.d.ts +0 -25
- package/build-types/utils/hooks/use-jump-step.d.ts.map +0 -1
- package/src/spinner/styles/spinner-styles.js +0 -47
- package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -86
- package/src/ui/visually-hidden/README.md +0 -21
|
@@ -145,9 +145,13 @@ class BottomSheet extends Component {
|
|
|
145
145
|
} );
|
|
146
146
|
this.lastLayoutAnimation = layoutAnimation;
|
|
147
147
|
} else {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with
|
|
149
|
+
// more nuanced `Animated` usage or replacing our custom `BottomSheet`
|
|
150
|
+
// with `@gorhom/bottom-sheet`. This animation was disabled to avoid a
|
|
151
|
+
// preexisting bug: https://git.io/JMPCV
|
|
152
|
+
// this.performRegularLayoutAnimation( {
|
|
153
|
+
// useLastLayoutAnimation: false,
|
|
154
|
+
// } );
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
|
|
@@ -185,7 +189,10 @@ class BottomSheet extends Component {
|
|
|
185
189
|
);
|
|
186
190
|
}
|
|
187
191
|
|
|
188
|
-
Dimensions.addEventListener(
|
|
192
|
+
this.dimensionsChangeSubscription = Dimensions.addEventListener(
|
|
193
|
+
'change',
|
|
194
|
+
this.onDimensionsChange
|
|
195
|
+
);
|
|
189
196
|
|
|
190
197
|
// 'Will' keyboard events are not available on Android.
|
|
191
198
|
// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener
|
|
@@ -206,7 +213,7 @@ class BottomSheet extends Component {
|
|
|
206
213
|
}
|
|
207
214
|
|
|
208
215
|
componentWillUnmount() {
|
|
209
|
-
|
|
216
|
+
this.dimensionsChangeSubscription.remove();
|
|
210
217
|
this.keyboardShowListener.remove();
|
|
211
218
|
this.keyboardHideListener.remove();
|
|
212
219
|
if ( this.androidModalClosedSubscription ) {
|
|
@@ -217,10 +224,6 @@ class BottomSheet extends Component {
|
|
|
217
224
|
}
|
|
218
225
|
this.safeAreaEventSubscription.remove();
|
|
219
226
|
this.safeAreaEventSubscription = null;
|
|
220
|
-
SafeArea.removeEventListener(
|
|
221
|
-
'safeAreaInsetsForRootViewDidChange',
|
|
222
|
-
this.onSafeAreaInsetsUpdate
|
|
223
|
-
);
|
|
224
227
|
}
|
|
225
228
|
|
|
226
229
|
onSafeAreaInsetsUpdate( result ) {
|
|
@@ -254,16 +257,19 @@ class BottomSheet extends Component {
|
|
|
254
257
|
statusBarHeight -
|
|
255
258
|
this.headerHeight );
|
|
256
259
|
|
|
257
|
-
//
|
|
260
|
+
// In landscape orientation, set `maxHeight` to ~96% of the height
|
|
258
261
|
if ( width > height ) {
|
|
259
262
|
this.setState( {
|
|
260
|
-
maxHeight: Math.min(
|
|
263
|
+
maxHeight: Math.min(
|
|
264
|
+
0.96 * height - this.headerHeight,
|
|
265
|
+
maxHeightWithOpenKeyboard
|
|
266
|
+
),
|
|
261
267
|
} );
|
|
262
|
-
//
|
|
268
|
+
// In portrait orientation, set `maxHeight` to ~59% of the height
|
|
263
269
|
} else {
|
|
264
270
|
this.setState( {
|
|
265
271
|
maxHeight: Math.min(
|
|
266
|
-
height
|
|
272
|
+
height * 0.59 - safeAreaBottomInset - this.headerHeight,
|
|
267
273
|
maxHeightWithOpenKeyboard
|
|
268
274
|
),
|
|
269
275
|
} );
|
|
@@ -279,7 +285,10 @@ class BottomSheet extends Component {
|
|
|
279
285
|
const { height } = nativeEvent.layout;
|
|
280
286
|
// The layout animation should only be triggered if the header
|
|
281
287
|
// height has changed after being mounted.
|
|
282
|
-
if (
|
|
288
|
+
if (
|
|
289
|
+
this.headerHeight !== 0 &&
|
|
290
|
+
Math.round( height ) !== Math.round( this.headerHeight )
|
|
291
|
+
) {
|
|
283
292
|
this.performRegularLayoutAnimation( {
|
|
284
293
|
useLastLayoutAnimation: true,
|
|
285
294
|
} );
|
|
@@ -545,6 +554,7 @@ class BottomSheet extends Component {
|
|
|
545
554
|
<View
|
|
546
555
|
style={ styles.header }
|
|
547
556
|
onLayout={ this.onHeaderLayout }
|
|
557
|
+
testID={ `${ rest.testID || 'bottom-sheet' }-header` }
|
|
548
558
|
>
|
|
549
559
|
{ showDragIndicator() && (
|
|
550
560
|
<View style={ styles.dragIndicator } />
|
|
@@ -16,16 +16,19 @@ import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
|
16
16
|
import Cell from './cell';
|
|
17
17
|
import cellStyles from './styles.scss';
|
|
18
18
|
import suggestionStyles from './link-suggestion-styles.scss';
|
|
19
|
-
import { posts, pages, empty } from '../gridicons';
|
|
19
|
+
import { posts, pages, empty, clipboard } from '../gridicons';
|
|
20
20
|
|
|
21
21
|
const icons = {
|
|
22
22
|
URL: globe,
|
|
23
|
+
clipboard,
|
|
23
24
|
post: posts,
|
|
24
25
|
page: pages,
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
const getSummaryForType = ( type ) => {
|
|
28
29
|
switch ( type ) {
|
|
30
|
+
case 'clipboard':
|
|
31
|
+
return __( 'From clipboard' );
|
|
29
32
|
case 'mailto':
|
|
30
33
|
return __( 'Add this email link' );
|
|
31
34
|
case 'tel':
|
|
@@ -36,7 +39,7 @@ const getSummaryForType = ( type ) => {
|
|
|
36
39
|
};
|
|
37
40
|
|
|
38
41
|
// we use some Cell styles here with a column flex-direction
|
|
39
|
-
function LinkSuggestionItemCell( { suggestion, onLinkPicked } ) {
|
|
42
|
+
function LinkSuggestionItemCell( { suggestion, onLinkPicked, ...props } ) {
|
|
40
43
|
const { title: contentTitle, url, type, isDirectEntry } = suggestion;
|
|
41
44
|
const title = isDirectEntry ? url : contentTitle;
|
|
42
45
|
const summary = isDirectEntry ? getSummaryForType( type ) : url;
|
|
@@ -58,6 +61,7 @@ function LinkSuggestionItemCell( { suggestion, onLinkPicked } ) {
|
|
|
58
61
|
|
|
59
62
|
return (
|
|
60
63
|
<Cell
|
|
64
|
+
{ ...props }
|
|
61
65
|
icon={ icons[ type ] || empty }
|
|
62
66
|
onPress={ pickLink }
|
|
63
67
|
separatorType={ 'none' }
|
|
@@ -56,11 +56,14 @@ class RangeTextInput extends Component {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
componentDidMount() {
|
|
59
|
-
AppState.addEventListener(
|
|
59
|
+
this.appStateChangeSubscription = AppState.addEventListener(
|
|
60
|
+
'change',
|
|
61
|
+
this.handleChangePixelRatio
|
|
62
|
+
);
|
|
60
63
|
}
|
|
61
64
|
|
|
62
65
|
componentWillUnmount() {
|
|
63
|
-
|
|
66
|
+
this.appStateChangeSubscription.remove();
|
|
64
67
|
clearTimeout( this.timeoutAnnounceValue );
|
|
65
68
|
}
|
|
66
69
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { fireEvent, render } from 'test/helpers';
|
|
5
|
+
import { LayoutAnimation } from 'react-native';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Internal dependencies
|
|
9
|
+
*/
|
|
10
|
+
import BottomSheet from '../';
|
|
11
|
+
|
|
12
|
+
it( 'does not animate transitions between header heights differing less than 1 pixel', () => {
|
|
13
|
+
const screen = render( <BottomSheet isVisible /> );
|
|
14
|
+
|
|
15
|
+
const bottomSheetHeader = screen.getByTestId( 'bottom-sheet-header' );
|
|
16
|
+
fireEvent( bottomSheetHeader, 'layout', {
|
|
17
|
+
nativeEvent: { layout: { height: 123 } },
|
|
18
|
+
} );
|
|
19
|
+
fireEvent( bottomSheetHeader, 'layout', {
|
|
20
|
+
nativeEvent: { layout: { height: 123.001 } },
|
|
21
|
+
} );
|
|
22
|
+
|
|
23
|
+
expect( LayoutAnimation.configureNext ).not.toHaveBeenCalled();
|
|
24
|
+
} );
|
|
@@ -27,7 +27,9 @@ const ColorSettingsMemo = memo(
|
|
|
27
27
|
colorValue,
|
|
28
28
|
gradientValue,
|
|
29
29
|
onGradientChange,
|
|
30
|
+
onColorCleared,
|
|
30
31
|
label,
|
|
32
|
+
hideNavigation,
|
|
31
33
|
} ) => {
|
|
32
34
|
useEffect( () => {
|
|
33
35
|
shouldEnableBottomSheetMaxHeight( true );
|
|
@@ -43,7 +45,9 @@ const ColorSettingsMemo = memo(
|
|
|
43
45
|
colorValue,
|
|
44
46
|
gradientValue,
|
|
45
47
|
onGradientChange,
|
|
48
|
+
onColorCleared,
|
|
46
49
|
label,
|
|
50
|
+
hideNavigation,
|
|
47
51
|
} }
|
|
48
52
|
>
|
|
49
53
|
<PaletteScreen />
|
|
@@ -26,7 +26,7 @@ import { colorsUtils } from './utils';
|
|
|
26
26
|
|
|
27
27
|
import styles from './style.scss';
|
|
28
28
|
|
|
29
|
-
const HIT_SLOP = { top:
|
|
29
|
+
const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 };
|
|
30
30
|
|
|
31
31
|
const PaletteScreen = () => {
|
|
32
32
|
const route = useRoute();
|
|
@@ -36,8 +36,10 @@ const PaletteScreen = () => {
|
|
|
36
36
|
label,
|
|
37
37
|
onColorChange,
|
|
38
38
|
onGradientChange,
|
|
39
|
+
onColorCleared,
|
|
39
40
|
colorValue,
|
|
40
41
|
defaultSettings,
|
|
42
|
+
hideNavigation = false,
|
|
41
43
|
} = route.params || {};
|
|
42
44
|
const { segments, isGradient } = colorsUtils;
|
|
43
45
|
const [ currentValue, setCurrentValue ] = useState( colorValue );
|
|
@@ -84,6 +86,10 @@ const PaletteScreen = () => {
|
|
|
84
86
|
} else {
|
|
85
87
|
onGradientChange( '' );
|
|
86
88
|
}
|
|
89
|
+
|
|
90
|
+
if ( onColorCleared ) {
|
|
91
|
+
onColorCleared();
|
|
92
|
+
}
|
|
87
93
|
}
|
|
88
94
|
|
|
89
95
|
function onCustomPress() {
|
|
@@ -164,10 +170,12 @@ const PaletteScreen = () => {
|
|
|
164
170
|
}
|
|
165
171
|
return (
|
|
166
172
|
<View>
|
|
167
|
-
|
|
168
|
-
<NavBar
|
|
169
|
-
|
|
170
|
-
|
|
173
|
+
{ ! hideNavigation && (
|
|
174
|
+
<NavBar>
|
|
175
|
+
<NavBar.BackButton onPress={ navigation.goBack } />
|
|
176
|
+
<NavBar.Heading>{ label } </NavBar.Heading>
|
|
177
|
+
</NavBar>
|
|
178
|
+
) }
|
|
171
179
|
<ColorPalette
|
|
172
180
|
setColor={ setColor }
|
|
173
181
|
activeColor={ currentValue }
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
1
6
|
const gradients = {
|
|
2
7
|
linear: 'linear-gradient',
|
|
3
8
|
radial: 'radial-gradient',
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
const gradientOptions = [
|
|
7
|
-
{ label: 'Linear', value: gradients.linear },
|
|
8
|
-
{ label: 'Radial', value: gradients.radial },
|
|
12
|
+
{ label: __( 'Linear' ), value: gradients.linear },
|
|
13
|
+
{ label: __( 'Radial' ), value: gradients.radial },
|
|
9
14
|
];
|
|
10
15
|
|
|
11
16
|
const getGradientType = ( color ) => {
|
|
@@ -23,7 +28,7 @@ export const colorsUtils = {
|
|
|
23
28
|
picker: 'Picker',
|
|
24
29
|
palette: 'Palette',
|
|
25
30
|
},
|
|
26
|
-
segments: [ 'Solid', 'Gradient' ],
|
|
31
|
+
segments: [ __( 'Solid' ), __( 'Gradient' ) ],
|
|
27
32
|
gradients,
|
|
28
33
|
gradientOptions,
|
|
29
34
|
getGradientType,
|
|
@@ -162,7 +162,7 @@ export function getBlockTypography(
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
if ( blockStyleAttributes?.fontSize ) {
|
|
165
|
+
if ( blockStyleAttributes?.fontSize && baseGlobalStyles ) {
|
|
166
166
|
const mappedFontSize = find( fontSizes, {
|
|
167
167
|
slug: blockStyleAttributes?.fontSize,
|
|
168
168
|
} );
|
|
@@ -9,6 +9,9 @@ const fromPathData24x24 = ( pathData ) => (
|
|
|
9
9
|
</SVG>
|
|
10
10
|
);
|
|
11
11
|
|
|
12
|
+
export const clipboard = fromPathData24x24(
|
|
13
|
+
'M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6a2 2 0 00-2 2v15a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2zm-4 2V4a2 2 0 10-4 0v1a2 2 0 00-2 2v1h8V7a2 2 0 00-2-2z'
|
|
14
|
+
);
|
|
12
15
|
export const posts = fromPathData24x24(
|
|
13
16
|
'M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z'
|
|
14
17
|
);
|
|
@@ -21,15 +24,12 @@ export const refresh = fromPathData24x24(
|
|
|
21
24
|
export const noticeOutline = fromPathData24x24(
|
|
22
25
|
'M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z'
|
|
23
26
|
);
|
|
24
|
-
|
|
25
27
|
export const empty = (
|
|
26
28
|
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" />
|
|
27
29
|
);
|
|
28
|
-
|
|
29
30
|
export const search = fromPathData24x24(
|
|
30
31
|
'M21,19l-5.154-5.154C16.574,12.742,17,11.421,17,10c0-3.866-3.134-7-7-7s-7,3.134-7,7c0,3.866,3.134,7,7,7 c1.421,0,2.742-0.426,3.846-1.154L19,21L21,19z M5,10c0-2.757,2.243-5,5-5s5,2.243,5,5s-2.243,5-5,5S5,12.757,5,10z'
|
|
31
32
|
);
|
|
32
|
-
|
|
33
33
|
export default {
|
|
34
34
|
empty,
|
|
35
35
|
posts,
|
|
@@ -1,31 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { render, fireEvent } from 'test/helpers';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { HTMLTextInput } from '..';
|
|
10
10
|
|
|
11
|
-
// Utility to find a TextInput in a ShallowWrapper
|
|
12
|
-
const findTextInputInWrapper = ( wrapper, accessibilityLabel ) => {
|
|
13
|
-
return wrapper
|
|
14
|
-
.dive()
|
|
15
|
-
.findWhere( ( node ) => {
|
|
16
|
-
return node.prop( 'accessibilityLabel' ) === accessibilityLabel;
|
|
17
|
-
} )
|
|
18
|
-
.first();
|
|
19
|
-
};
|
|
20
|
-
|
|
21
11
|
// Finds the Content TextInput in our HTMLInputView
|
|
22
|
-
const findContentTextInput = (
|
|
23
|
-
return
|
|
12
|
+
const findContentTextInput = ( screen ) => {
|
|
13
|
+
return screen.getByA11yLabel( 'html-view-content' );
|
|
24
14
|
};
|
|
25
15
|
|
|
26
16
|
// Finds the Title TextInput in our HTMLInputView
|
|
27
|
-
const findTitleTextInput = (
|
|
28
|
-
return
|
|
17
|
+
const findTitleTextInput = ( screen ) => {
|
|
18
|
+
return screen.getByA11yLabel( 'html-view-title' );
|
|
29
19
|
};
|
|
30
20
|
|
|
31
21
|
const getStylesFromColorScheme = () => {
|
|
@@ -34,42 +24,40 @@ const getStylesFromColorScheme = () => {
|
|
|
34
24
|
|
|
35
25
|
describe( 'HTMLTextInput', () => {
|
|
36
26
|
it( 'HTMLTextInput renders', () => {
|
|
37
|
-
const
|
|
27
|
+
const screen = render(
|
|
38
28
|
<HTMLTextInput
|
|
39
29
|
getStylesFromColorScheme={ getStylesFromColorScheme }
|
|
40
30
|
/>
|
|
41
31
|
);
|
|
42
|
-
expect(
|
|
32
|
+
expect( screen.container ).toBeTruthy();
|
|
43
33
|
} );
|
|
44
34
|
|
|
45
|
-
it( 'HTMLTextInput updates
|
|
35
|
+
it( 'HTMLTextInput updates state on HTML text change', () => {
|
|
46
36
|
const onChange = jest.fn();
|
|
47
37
|
|
|
48
|
-
const
|
|
38
|
+
const screen = render(
|
|
49
39
|
<HTMLTextInput
|
|
50
40
|
onChange={ onChange }
|
|
41
|
+
onPersist={ jest.fn() }
|
|
51
42
|
getStylesFromColorScheme={ getStylesFromColorScheme }
|
|
52
43
|
/>
|
|
53
44
|
);
|
|
54
45
|
|
|
55
|
-
expect( wrapper.instance().state.isDirty ).toBeFalsy();
|
|
56
|
-
|
|
57
46
|
// Simulate user typing text
|
|
58
|
-
const htmlTextInput = findContentTextInput(
|
|
59
|
-
|
|
47
|
+
const htmlTextInput = findContentTextInput( screen );
|
|
48
|
+
fireEvent( htmlTextInput, 'changeText', 'text' );
|
|
60
49
|
|
|
61
50
|
//Check if the onChange is called and the state is updated
|
|
62
51
|
expect( onChange ).toHaveBeenCalledTimes( 1 );
|
|
63
52
|
expect( onChange ).toHaveBeenCalledWith( 'text' );
|
|
64
53
|
|
|
65
|
-
expect(
|
|
66
|
-
expect( wrapper.instance().state.value ).toEqual( 'text' );
|
|
54
|
+
expect( screen.getByDisplayValue( 'text' ) ).toBeDefined();
|
|
67
55
|
} );
|
|
68
56
|
|
|
69
57
|
it( 'HTMLTextInput persists changes in HTML text input on blur', () => {
|
|
70
58
|
const onPersist = jest.fn();
|
|
71
59
|
|
|
72
|
-
const
|
|
60
|
+
const screen = render(
|
|
73
61
|
<HTMLTextInput
|
|
74
62
|
onPersist={ onPersist }
|
|
75
63
|
onChange={ jest.fn() }
|
|
@@ -78,30 +66,41 @@ describe( 'HTMLTextInput', () => {
|
|
|
78
66
|
);
|
|
79
67
|
|
|
80
68
|
// Simulate user typing text
|
|
81
|
-
const htmlTextInput = findContentTextInput(
|
|
82
|
-
|
|
69
|
+
const htmlTextInput = findContentTextInput( screen );
|
|
70
|
+
fireEvent( htmlTextInput, 'changeText', 'text' );
|
|
83
71
|
|
|
84
72
|
//Simulate blur event
|
|
85
|
-
|
|
73
|
+
fireEvent( htmlTextInput, 'blur' );
|
|
86
74
|
|
|
87
75
|
//Normally prop.value is updated with the help of withSelect
|
|
88
76
|
//But we don't have it in tests so we just simulate it
|
|
89
|
-
|
|
77
|
+
screen.update(
|
|
78
|
+
<HTMLTextInput
|
|
79
|
+
onPersist={ onPersist }
|
|
80
|
+
onChange={ jest.fn() }
|
|
81
|
+
getStylesFromColorScheme={ getStylesFromColorScheme }
|
|
82
|
+
value="text"
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
90
85
|
|
|
91
86
|
//Check if the onPersist is called and the state is updated
|
|
92
87
|
expect( onPersist ).toHaveBeenCalledTimes( 1 );
|
|
93
88
|
expect( onPersist ).toHaveBeenCalledWith( 'text' );
|
|
94
89
|
|
|
95
|
-
|
|
90
|
+
//Simulate blur event
|
|
91
|
+
fireEvent( htmlTextInput, 'blur' );
|
|
92
|
+
|
|
93
|
+
// Check that onPersist is not called for non-dirty state
|
|
94
|
+
expect( onPersist ).toHaveBeenCalledTimes( 1 );
|
|
96
95
|
|
|
97
96
|
//We expect state.value is getting propagated from prop.value
|
|
98
|
-
expect(
|
|
97
|
+
expect( screen.getByDisplayValue( 'text' ) ).toBeDefined();
|
|
99
98
|
} );
|
|
100
99
|
|
|
101
100
|
it( 'HTMLTextInput propagates title changes to store', () => {
|
|
102
101
|
const editTitle = jest.fn();
|
|
103
102
|
|
|
104
|
-
const
|
|
103
|
+
const screen = render(
|
|
105
104
|
<HTMLTextInput
|
|
106
105
|
editTitle={ editTitle }
|
|
107
106
|
getStylesFromColorScheme={ getStylesFromColorScheme }
|
|
@@ -109,8 +108,8 @@ describe( 'HTMLTextInput', () => {
|
|
|
109
108
|
);
|
|
110
109
|
|
|
111
110
|
// Simulate user typing text
|
|
112
|
-
const textInput = findTitleTextInput(
|
|
113
|
-
|
|
111
|
+
const textInput = findTitleTextInput( screen );
|
|
112
|
+
fireEvent( textInput, 'changeText', 'text' );
|
|
114
113
|
|
|
115
114
|
//Check if the setTitleAction is called
|
|
116
115
|
expect( editTitle ).toHaveBeenCalledTimes( 1 );
|
|
@@ -51,20 +51,23 @@ export const KeyboardAvoidingView = ( {
|
|
|
51
51
|
setSafeAreaBottomInset( safeAreaInsets.bottom );
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
SafeArea.addEventListener(
|
|
54
|
+
const safeAreaSubscription = SafeArea.addEventListener(
|
|
55
55
|
'safeAreaInsetsForRootViewDidChange',
|
|
56
56
|
onSafeAreaInsetsUpdate
|
|
57
57
|
);
|
|
58
|
-
Keyboard.addListener(
|
|
59
|
-
|
|
58
|
+
const keyboardShowSubscription = Keyboard.addListener(
|
|
59
|
+
'keyboardWillShow',
|
|
60
|
+
onKeyboardWillShow
|
|
61
|
+
);
|
|
62
|
+
const keyboardHideSubscription = Keyboard.addListener(
|
|
63
|
+
'keyboardWillHide',
|
|
64
|
+
onKeyboardWillHide
|
|
65
|
+
);
|
|
60
66
|
|
|
61
67
|
return () => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
);
|
|
66
|
-
Keyboard.removeListener( 'keyboardWillShow', onKeyboardWillShow );
|
|
67
|
-
Keyboard.removeListener( 'keyboardWillHide', onKeyboardWillHide );
|
|
68
|
+
safeAreaSubscription.remove();
|
|
69
|
+
keyboardShowSubscription.remove();
|
|
70
|
+
keyboardHideSubscription.remove();
|
|
68
71
|
};
|
|
69
72
|
}, [] );
|
|
70
73
|
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { SafeAreaView, TouchableOpacity, View } from 'react-native';
|
|
5
|
+
import Clipboard from '@react-native-clipboard/clipboard';
|
|
5
6
|
import { lowerCase, startsWith } from 'lodash';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* WordPress dependencies
|
|
9
10
|
*/
|
|
10
|
-
import { useState } from '@wordpress/element';
|
|
11
|
-
import { __ } from '@wordpress/i18n';
|
|
11
|
+
import { useEffect, useState } from '@wordpress/element';
|
|
12
|
+
import { __, sprintf } from '@wordpress/i18n';
|
|
12
13
|
import { BottomSheet, Icon } from '@wordpress/components';
|
|
13
|
-
import { getProtocol, prependHTTP } from '@wordpress/url';
|
|
14
|
+
import { getProtocol, isURL, prependHTTP } from '@wordpress/url';
|
|
14
15
|
import { link, cancelCircleFilled } from '@wordpress/icons';
|
|
15
16
|
import { usePreferredColorSchemeStyle } from '@wordpress/compose';
|
|
16
17
|
|
|
@@ -47,12 +48,20 @@ export const createDirectEntry = ( value ) => {
|
|
|
47
48
|
};
|
|
48
49
|
};
|
|
49
50
|
|
|
51
|
+
const getURLFromClipboard = async () => {
|
|
52
|
+
const text = await Clipboard.getString();
|
|
53
|
+
return !! text && isURL( text ) ? text : '';
|
|
54
|
+
};
|
|
55
|
+
|
|
50
56
|
export const LinkPicker = ( {
|
|
51
57
|
value: initialValue,
|
|
52
58
|
onLinkPicked,
|
|
53
59
|
onCancel: cancel,
|
|
54
60
|
} ) => {
|
|
55
|
-
const [ value, setValue ] = useState(
|
|
61
|
+
const [ { value, clipboardUrl }, setValue ] = useState( {
|
|
62
|
+
value: initialValue,
|
|
63
|
+
clipboardUrl: '',
|
|
64
|
+
} );
|
|
56
65
|
const directEntry = createDirectEntry( value );
|
|
57
66
|
|
|
58
67
|
// the title of a direct entry is displayed as the raw input value, but if we
|
|
@@ -66,7 +75,7 @@ export const LinkPicker = ( {
|
|
|
66
75
|
};
|
|
67
76
|
|
|
68
77
|
const clear = () => {
|
|
69
|
-
setValue( '' );
|
|
78
|
+
setValue( { value: '', clipboardUrl } );
|
|
70
79
|
};
|
|
71
80
|
|
|
72
81
|
const omniCellStyle = usePreferredColorSchemeStyle(
|
|
@@ -79,6 +88,14 @@ export const LinkPicker = ( {
|
|
|
79
88
|
styles.iconDark
|
|
80
89
|
);
|
|
81
90
|
|
|
91
|
+
useEffect( () => {
|
|
92
|
+
getURLFromClipboard()
|
|
93
|
+
.then( ( url ) => setValue( { value, clipboardUrl: url } ) )
|
|
94
|
+
.catch( () => setValue( { value, clipboardUrl: '' } ) );
|
|
95
|
+
}, [] );
|
|
96
|
+
|
|
97
|
+
// TODO: Localize the accessibility label.
|
|
98
|
+
// TODO: Decide on if `LinkSuggestionItemCell` with `isDirectEntry` makes sense.
|
|
82
99
|
return (
|
|
83
100
|
<SafeAreaView style={ styles.safeArea }>
|
|
84
101
|
<NavBar>
|
|
@@ -96,7 +113,9 @@ export const LinkPicker = ( {
|
|
|
96
113
|
autoCapitalize="none"
|
|
97
114
|
autoCorrect={ false }
|
|
98
115
|
keyboardType="url"
|
|
99
|
-
onChangeValue={
|
|
116
|
+
onChangeValue={ ( newValue ) => {
|
|
117
|
+
setValue( { value: newValue, clipboardUrl } );
|
|
118
|
+
} }
|
|
100
119
|
onSubmit={ onSubmit }
|
|
101
120
|
/* eslint-disable-next-line jsx-a11y/no-autofocus */
|
|
102
121
|
autoFocus
|
|
@@ -115,6 +134,22 @@ export const LinkPicker = ( {
|
|
|
115
134
|
</TouchableOpacity>
|
|
116
135
|
) }
|
|
117
136
|
</BottomSheet.Cell>
|
|
137
|
+
{ !! clipboardUrl && clipboardUrl !== value && (
|
|
138
|
+
<BottomSheet.LinkSuggestionItemCell
|
|
139
|
+
accessible
|
|
140
|
+
accessibilityLabel={ sprintf(
|
|
141
|
+
/* translators: Copy URL from the clipboard, https://sample.url */
|
|
142
|
+
__( 'Copy URL from the clipboard, %s' ),
|
|
143
|
+
clipboardUrl
|
|
144
|
+
) }
|
|
145
|
+
suggestion={ {
|
|
146
|
+
type: 'clipboard',
|
|
147
|
+
url: clipboardUrl,
|
|
148
|
+
isDirectEntry: true,
|
|
149
|
+
} }
|
|
150
|
+
onLinkPicked={ pickLink }
|
|
151
|
+
/>
|
|
152
|
+
) }
|
|
118
153
|
{ !! value && (
|
|
119
154
|
<LinkPickerResults
|
|
120
155
|
query={ value }
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
+
import { Keyboard } from 'react-native';
|
|
4
5
|
import { useNavigation, useRoute } from '@react-navigation/native';
|
|
6
|
+
import { delay } from 'lodash';
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* WordPress dependencies
|
|
@@ -18,14 +20,20 @@ const LinkPickerScreen = ( { returnScreenName } ) => {
|
|
|
18
20
|
const route = useRoute();
|
|
19
21
|
|
|
20
22
|
const onLinkPicked = ( { url, title } ) => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
Keyboard.dismiss();
|
|
24
|
+
delay( () => {
|
|
25
|
+
navigation.navigate( returnScreenName, {
|
|
26
|
+
inputValue: url,
|
|
27
|
+
text: title,
|
|
28
|
+
} );
|
|
29
|
+
}, 100 );
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
const onCancel = () => {
|
|
28
|
-
|
|
33
|
+
Keyboard.dismiss();
|
|
34
|
+
delay( () => {
|
|
35
|
+
navigation.goBack();
|
|
36
|
+
}, 100 );
|
|
29
37
|
};
|
|
30
38
|
|
|
31
39
|
const { inputValue } = route.params;
|