@wordpress/components 19.4.1-next.f435e9e01b.0 → 19.6.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 +37 -4
- package/CONTRIBUTING.md +69 -2
- package/build/alignment-matrix-control/utils.js +1 -1
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/angle-picker-control/angle-circle.js +1 -1
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/animation/index.js +0 -6
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +3 -3
- package/build/autocomplete/get-default-use-items.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/icon.js +1 -1
- package/build/box-control/icon.js.map +1 -1
- package/build/box-control/index.js +4 -4
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/unit-control.js +2 -2
- package/build/box-control/unit-control.js.map +1 -1
- package/build/box-control/utils.js +12 -8
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.js +5 -5
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js +7 -7
- package/build/button/index.native.js.map +1 -1
- package/build/card/card/component.js +2 -2
- package/build/card/card/component.js.map +1 -1
- package/build/card/card-body/component.js +1 -1
- package/build/card/card-body/component.js.map +1 -1
- package/build/card/card-divider/component.js +1 -1
- package/build/card/card-divider/component.js.map +1 -1
- package/build/card/card-footer/component.js +1 -1
- package/build/card/card-footer/component.js.map +1 -1
- package/build/card/card-header/component.js +1 -1
- package/build/card/card-header/component.js.map +1 -1
- package/build/card/card-media/component.js +1 -1
- package/build/card/card-media/component.js.map +1 -1
- package/build/color-palette/index.native.js +35 -30
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/color-display.js +1 -1
- package/build/color-picker/color-display.js.map +1 -1
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js +6 -9
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +1 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/confirm-dialog/component.js +4 -2
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/date-time/time.js +7 -4
- package/build/date-time/time.js.map +1 -1
- package/build/divider/component.js +5 -4
- package/build/divider/component.js.map +1 -1
- package/build/draggable/index.js +3 -3
- package/build/draggable/index.js.map +1 -1
- package/build/elevation/component.js +1 -1
- package/build/elevation/component.js.map +1 -1
- package/build/flex/flex/component.js +1 -1
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex-block/component.js +1 -1
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-item/component.js +1 -1
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/flyout/flyout/component.js +1 -1
- package/build/flyout/flyout/component.js.map +1 -1
- package/build/flyout/flyout-content/component.js +1 -1
- package/build/flyout/flyout-content/component.js.map +1 -1
- package/build/focal-point-picker/index.js +18 -12
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/index.native.js +7 -7
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +1 -1
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/font-size-picker/index.js +1 -2
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +6 -6
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +2 -2
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/grid/component.js +1 -1
- package/build/grid/component.js.map +1 -1
- package/build/h-stack/component.js +1 -1
- package/build/h-stack/component.js.map +1 -1
- package/build/heading/component.js +6 -5
- package/build/heading/component.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/higher-order/with-notices/index.js +1 -1
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/index.js +14 -2
- package/build/index.js.map +1 -1
- package/build/index.native.js +15 -1
- package/build/index.native.js.map +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +1 -1
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-field.js +19 -17
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/reducer/reducer.js +3 -0
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +25 -25
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/isolated-event-container/index.js +1 -1
- package/build/isolated-event-container/index.js.map +1 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- 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 +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +1 -1
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js +11 -11
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
- package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +26 -9
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +73 -19
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +2 -2
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/html-text-input/container.ios.js +3 -3
- package/build/mobile/html-text-input/container.ios.js.map +1 -1
- package/build/mobile/html-text-input/index.native.js +1 -1
- package/build/mobile/html-text-input/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +1 -1
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/inserter-button/index.native.js +3 -3
- package/build/mobile/inserter-button/index.native.js.map +1 -1
- package/build/mobile/inserter-button/sparkles.js +25 -0
- package/build/mobile/inserter-button/sparkles.js.map +1 -0
- package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/link-picker/index.native.js +3 -3
- package/build/mobile/link-picker/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-results.native.js +8 -8
- package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build/mobile/link-settings/index.native.js +1 -1
- package/build/mobile/link-settings/index.native.js.map +1 -1
- package/build/modal/aria-helper.js +1 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +2 -2
- package/build/modal/index.js.map +1 -1
- package/build/navigable-container/container.js +2 -2
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigable-container/tabbable.js +1 -1
- package/build/navigable-container/tabbable.js.map +1 -1
- package/build/navigation/item/index.js +1 -1
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/menu/index.js +1 -1
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigator/index.js +16 -0
- package/build/navigator/index.js.map +1 -1
- package/build/navigator/navigator-back-button/component.js +72 -0
- package/build/navigator/navigator-back-button/component.js.map +1 -0
- package/build/navigator/navigator-back-button/hook.js +49 -0
- package/build/navigator/navigator-back-button/hook.js.map +1 -0
- package/build/navigator/navigator-back-button/index.js +16 -0
- package/build/navigator/navigator-back-button/index.js.map +1 -0
- package/build/navigator/navigator-button/component.js +71 -0
- package/build/navigator/navigator-button/component.js.map +1 -0
- package/build/navigator/navigator-button/hook.js +59 -0
- package/build/navigator/navigator-button/hook.js.map +1 -0
- package/build/navigator/navigator-button/index.js +16 -0
- package/build/navigator/navigator-button/index.js.map +1 -0
- package/build/navigator/navigator-provider/component.js +12 -22
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +14 -22
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/number-control/index.js +1 -1
- package/build/number-control/index.js.map +1 -1
- package/build/panel/body.js +2 -2
- package/build/panel/body.js.map +1 -1
- package/build/popover/index.js +3 -3
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +6 -6
- package/build/popover/utils.js.map +1 -1
- package/build/radio-group/index.js +1 -1
- package/build/radio-group/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.map +1 -1
- package/build/sandbox/index.js +5 -5
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scrollable/component.js +1 -1
- package/build/scrollable/component.js.map +1 -1
- package/build/select-control/index.js +1 -1
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +5 -5
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/fill.js +1 -1
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/provider.js +1 -1
- package/build/slot-fill/provider.js.map +1 -1
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +1 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/spacer/component.js.map +1 -1
- package/build/style-provider/index.js +2 -2
- package/build/style-provider/index.js.map +1 -1
- package/build/surface/component.js +1 -1
- package/build/surface/component.js.map +1 -1
- package/build/text/component.js +1 -1
- package/build/text/component.js.map +1 -1
- package/build/text-control/index.js +2 -2
- package/build/text-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +2 -2
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option/component.js +1 -4
- 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 +12 -19
- package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build/toolbar/index.js +1 -1
- package/build/toolbar/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build/tooltip/index.js +3 -3
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/index.native.js +7 -7
- package/build/tooltip/index.native.js.map +1 -1
- package/build/tree-grid/index.js +54 -7
- package/build/tree-grid/index.js.map +1 -1
- package/build/truncate/component.js +1 -1
- package/build/truncate/component.js.map +1 -1
- package/build/truncate/utils.js +1 -1
- package/build/truncate/utils.js.map +1 -1
- package/build/ui/context/context-connect.js +8 -15
- package/build/ui/context/context-connect.js.map +1 -1
- package/build/ui/context/context-system-provider.js +2 -2
- package/build/ui/context/context-system-provider.js.map +1 -1
- package/build/ui/context/index.js.map +1 -1
- package/build/ui/control-group/component.js +1 -1
- package/build/ui/control-group/component.js.map +1 -1
- package/build/ui/control-label/component.js +1 -1
- package/build/ui/control-label/component.js.map +1 -1
- package/build/ui/form-group/form-group.js +1 -1
- package/build/ui/form-group/form-group.js.map +1 -1
- package/build/ui/shortcut/component.js.map +1 -1
- package/build/ui/spinner/component.js +1 -1
- package/build/ui/spinner/component.js.map +1 -1
- package/build/ui/tooltip/component.js +1 -1
- package/build/ui/tooltip/component.js.map +1 -1
- package/build/ui/tooltip/content.js +1 -1
- package/build/ui/tooltip/content.js.map +1 -1
- package/build/ui/utils/colors.js +2 -2
- package/build/ui/utils/colors.js.map +1 -1
- package/build/ui/utils/space.js +2 -2
- package/build/ui/utils/space.js.map +1 -1
- package/build/unit-control/index.js +38 -29
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +4 -2
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/unit-select-control.js +1 -1
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +96 -104
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/breakpoint-values.js +1 -1
- package/build/utils/breakpoint-values.js.map +1 -1
- package/build/utils/colors-values.js +1 -1
- package/build/utils/colors-values.js.map +1 -1
- package/build/v-stack/component.js +1 -1
- package/build/v-stack/component.js.map +1 -1
- package/build/visually-hidden/component.js +1 -1
- package/build/visually-hidden/component.js.map +1 -1
- package/build/z-stack/component.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +1 -1
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +1 -1
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/animation/index.js +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +3 -3
- package/build-module/autocomplete/get-default-use-items.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/icon.js +1 -1
- package/build-module/box-control/icon.js.map +1 -1
- package/build-module/box-control/index.js +5 -5
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/unit-control.js +1 -1
- package/build-module/box-control/unit-control.js.map +1 -1
- package/build-module/box-control/utils.js +13 -9
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.js +5 -5
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js +7 -7
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/card/card/component.js +2 -2
- package/build-module/card/card/component.js.map +1 -1
- package/build-module/card/card-body/component.js +1 -1
- package/build-module/card/card-body/component.js.map +1 -1
- package/build-module/card/card-divider/component.js +1 -1
- package/build-module/card/card-divider/component.js.map +1 -1
- package/build-module/card/card-footer/component.js +1 -1
- package/build-module/card/card-footer/component.js.map +1 -1
- package/build-module/card/card-header/component.js +1 -1
- package/build-module/card/card-header/component.js.map +1 -1
- package/build-module/card/card-media/component.js +1 -1
- package/build-module/card/card-media/component.js.map +1 -1
- package/build-module/color-palette/index.native.js +36 -31
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/color-display.js +1 -1
- package/build-module/color-picker/color-display.js.map +1 -1
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js +6 -9
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +1 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/confirm-dialog/component.js +4 -5
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/date-time/time.js +7 -4
- package/build-module/date-time/time.js.map +1 -1
- package/build-module/divider/component.js +3 -3
- package/build-module/divider/component.js.map +1 -1
- package/build-module/draggable/index.js +3 -3
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/elevation/component.js +1 -1
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/flex/flex/component.js +1 -1
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex-block/component.js +1 -1
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-item/component.js +1 -1
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/flyout/flyout/component.js +1 -1
- package/build-module/flyout/flyout/component.js.map +1 -1
- package/build-module/flyout/flyout-content/component.js +1 -1
- package/build-module/flyout/flyout-content/component.js.map +1 -1
- package/build-module/focal-point-picker/index.js +18 -12
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +7 -7
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/font-size-picker/index.js +1 -2
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-token-field/index.js +6 -6
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +2 -2
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/grid/component.js +1 -1
- package/build-module/grid/component.js.map +1 -1
- package/build-module/h-stack/component.js +1 -1
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/heading/component.js +4 -4
- package/build-module/heading/component.js.map +1 -1
- package/build-module/heading/hook.js +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +1 -1
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/index.js +5 -5
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +5 -5
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -1
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-field.js +19 -16
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +3 -0
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +25 -25
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/isolated-event-container/index.js +1 -1
- package/build-module/isolated-event-container/index.js.map +1 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- 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 +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -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 +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js +11 -11
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
- package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +70 -20
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +2 -2
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/html-text-input/container.ios.js +3 -3
- package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
- package/build-module/mobile/html-text-input/index.native.js +1 -1
- package/build-module/mobile/html-text-input/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +1 -1
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/index.native.js +1 -1
- package/build-module/mobile/inserter-button/index.native.js.map +1 -1
- package/build-module/mobile/inserter-button/sparkles.js +16 -0
- package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/link-picker/index.native.js +3 -3
- package/build-module/mobile/link-picker/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
- package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
- package/build-module/mobile/link-settings/index.native.js +1 -1
- package/build-module/mobile/link-settings/index.native.js.map +1 -1
- package/build-module/modal/aria-helper.js +1 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +2 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigable-container/container.js +2 -2
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigable-container/tabbable.js +1 -1
- package/build-module/navigable-container/tabbable.js.map +1 -1
- package/build-module/navigation/item/index.js +1 -1
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/index.js +1 -1
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigator/index.js +2 -0
- package/build-module/navigator/index.js.map +1 -1
- package/build-module/navigator/navigator-back-button/component.js +59 -0
- package/build-module/navigator/navigator-back-button/component.js.map +1 -0
- package/build-module/navigator/navigator-back-button/hook.js +36 -0
- package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
- package/build-module/navigator/navigator-back-button/index.js +2 -0
- package/build-module/navigator/navigator-back-button/index.js.map +1 -0
- package/build-module/navigator/navigator-button/component.js +58 -0
- package/build-module/navigator/navigator-button/component.js.map +1 -0
- package/build-module/navigator/navigator-button/hook.js +46 -0
- package/build-module/navigator/navigator-button/hook.js.map +1 -0
- package/build-module/navigator/navigator-button/index.js +2 -0
- package/build-module/navigator/navigator-button/index.js.map +1 -0
- package/build-module/navigator/navigator-provider/component.js +12 -22
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +13 -22
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/number-control/index.js +1 -1
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/panel/body.js +2 -2
- package/build-module/panel/body.js.map +1 -1
- package/build-module/popover/index.js +3 -3
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +6 -6
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/radio-group/index.js +1 -1
- package/build-module/radio-group/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.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/sandbox/index.js +5 -5
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scrollable/component.js +1 -1
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/select-control/index.js +2 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +5 -5
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/fill.js +1 -1
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/provider.js +1 -1
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +1 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/style-provider/index.js +2 -2
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/surface/component.js +1 -1
- package/build-module/surface/component.js.map +1 -1
- package/build-module/text/component.js +1 -1
- package/build-module/text/component.js.map +1 -1
- package/build-module/text-control/index.js +2 -2
- package/build-module/text-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
- 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 +1 -4
- package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js +11 -17
- package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
- package/build-module/toolbar/index.js +1 -1
- package/build-module/toolbar/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
- package/build-module/tooltip/index.js +3 -3
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/index.native.js +7 -7
- package/build-module/tooltip/index.native.js.map +1 -1
- package/build-module/tree-grid/index.js +55 -8
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/truncate/component.js +1 -1
- package/build-module/truncate/component.js.map +1 -1
- package/build-module/truncate/utils.js +1 -1
- package/build-module/truncate/utils.js.map +1 -1
- package/build-module/ui/context/context-connect.js +9 -16
- package/build-module/ui/context/context-connect.js.map +1 -1
- package/build-module/ui/context/context-system-provider.js +2 -2
- package/build-module/ui/context/context-system-provider.js.map +1 -1
- package/build-module/ui/context/index.js.map +1 -1
- package/build-module/ui/control-group/component.js +1 -1
- package/build-module/ui/control-group/component.js.map +1 -1
- package/build-module/ui/control-label/component.js +1 -1
- package/build-module/ui/control-label/component.js.map +1 -1
- package/build-module/ui/form-group/form-group.js +1 -1
- package/build-module/ui/form-group/form-group.js.map +1 -1
- package/build-module/ui/shortcut/component.js.map +1 -1
- package/build-module/ui/spinner/component.js +1 -1
- package/build-module/ui/spinner/component.js.map +1 -1
- package/build-module/ui/tooltip/component.js +1 -1
- package/build-module/ui/tooltip/component.js.map +1 -1
- package/build-module/ui/tooltip/content.js +1 -1
- package/build-module/ui/tooltip/content.js.map +1 -1
- package/build-module/ui/utils/colors.js +2 -2
- package/build-module/ui/utils/colors.js.map +1 -1
- package/build-module/ui/utils/space.js +2 -2
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/unit-control/index.js +39 -30
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +5 -3
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +1 -1
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js +92 -100
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/breakpoint-values.js +1 -1
- package/build-module/utils/breakpoint-values.js.map +1 -1
- package/build-module/utils/colors-values.js +1 -1
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/v-stack/component.js +1 -1
- package/build-module/v-stack/component.js.map +1 -1
- package/build-module/visually-hidden/component.js +1 -1
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +8 -0
- package/build-style/style.css +8 -0
- package/build-types/base-field/hook.d.ts +2 -1
- package/build-types/base-field/hook.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +2 -1
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +2 -1
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +2 -3
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +2 -1
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +2 -1
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +2 -1
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -4
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts +10 -6
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/types.d.ts +2 -0
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +2 -2
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/stories/index.d.ts +10 -0
- package/build-types/divider/stories/index.d.ts.map +1 -0
- package/build-types/divider/types.d.ts +1 -1
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +2 -1
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +2 -1
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +2 -1
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +2 -1
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/flyout/flyout/hook.d.ts +2 -2
- package/build-types/grid/hook.d.ts +2 -1
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +3 -2
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +3 -3
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +2 -1
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/heading/stories/index.d.ts +12 -0
- package/build-types/heading/stories/index.d.ts.map +1 -0
- package/build-types/input-control/index.d.ts +3 -3
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +2 -2
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +1 -3
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +1 -1
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +2 -1
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +2 -1
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/navigator/index.d.ts +2 -0
- package/build-types/navigator/index.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts +283 -0
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
- package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/component.d.ts +37 -0
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/hook.d.ts +283 -0
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
- package/build-types/navigator/navigator-button/index.d.ts +2 -0
- package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
- package/build-types/navigator/navigator-provider/component.d.ts +10 -20
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +10 -20
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/types.d.ts +21 -0
- 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 +2 -2
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +2 -1
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -3
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +2 -1
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +2 -1
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +2 -1
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/types.d.ts +1 -2
- package/build-types/text/types.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 +0 -4
- package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +2 -1
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/ui/context/context-connect.d.ts +18 -16
- package/build-types/ui/context/context-connect.d.ts.map +1 -1
- package/build-types/ui/context/index.d.ts +4 -4
- package/build-types/ui/context/index.d.ts.map +1 -1
- package/build-types/ui/context/wordpress-component.d.ts +3 -6
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
- package/build-types/ui/control-group/hook.d.ts +2 -1
- package/build-types/ui/control-group/hook.d.ts.map +1 -1
- package/build-types/ui/control-label/hook.d.ts +2 -1
- package/build-types/ui/control-label/hook.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +6 -4
- package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +3 -5
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +4 -6
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts +47 -38
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +2 -1
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/alignment-matrix-control/README.md +4 -0
- package/src/alignment-matrix-control/stories/index.js +1 -1
- package/src/alignment-matrix-control/utils.js +1 -1
- package/src/angle-picker-control/angle-circle.js +1 -1
- package/src/animation/index.js +0 -1
- package/src/autocomplete/get-default-use-items.js +3 -3
- package/src/base-control/stories/index.js +65 -22
- package/src/base-field/hook.js +1 -1
- package/src/box-control/icon.js +1 -1
- package/src/box-control/index.js +5 -5
- package/src/box-control/stories/index.js +4 -1
- package/src/box-control/test/index.js +27 -7
- package/src/box-control/unit-control.js +1 -1
- package/src/box-control/utils.js +13 -9
- package/src/button/index.js +5 -5
- package/src/button/index.native.js +7 -7
- package/src/button/style.scss +1 -0
- package/src/card/card/component.js +1 -1
- package/src/card/card-body/component.js +1 -1
- package/src/card/card-divider/component.js +1 -1
- package/src/card/card-footer/component.js +1 -1
- package/src/card/card-header/component.js +1 -1
- package/src/card/card-media/component.js +1 -1
- package/src/color-palette/index.native.js +92 -75
- package/src/color-palette/style.native.scss +10 -5
- package/src/color-palette/style.scss +1 -0
- package/src/color-picker/color-display.tsx +1 -1
- package/src/color-picker/component.tsx +2 -2
- package/src/color-picker/hex-input.tsx +9 -9
- package/src/color-picker/styles.ts +1 -1
- package/src/color-picker/test/index.js +1 -1
- package/src/combobox-control/index.js +1 -1
- package/src/combobox-control/style.scss +1 -0
- package/src/confirm-dialog/README.md +56 -45
- package/src/confirm-dialog/component.tsx +6 -4
- package/src/confirm-dialog/stories/index.js +19 -0
- package/src/confirm-dialog/test/index.js +28 -0
- package/src/confirm-dialog/types.ts +2 -0
- package/src/date-time/style.scss +4 -0
- package/src/date-time/time.js +16 -5
- package/src/dimension-control/test/index.test.js +1 -1
- package/src/disabled/test/index.js +1 -1
- package/src/divider/component.tsx +5 -5
- package/src/divider/stories/index.tsx +70 -0
- package/src/divider/types.ts +3 -1
- package/src/draggable/index.js +3 -3
- package/src/draggable/stories/index.js +1 -1
- package/src/elevation/component.js +1 -1
- package/src/flex/flex/component.js +1 -1
- package/src/flex/flex-block/component.js +1 -1
- package/src/flex/flex-item/component.js +1 -1
- package/src/flyout/flyout/README.md +1 -1
- package/src/flyout/flyout/component.js +1 -1
- package/src/flyout/flyout-content/component.js +1 -1
- package/src/flyout/test/index.js +1 -1
- package/src/focal-point-picker/README.md +7 -0
- package/src/focal-point-picker/index.js +12 -7
- package/src/focal-point-picker/index.native.js +7 -7
- package/src/focal-point-picker/stories/index.js +30 -0
- package/src/focal-point-picker/test/index.js +44 -0
- package/src/focal-point-picker/tooltip/index.native.js +1 -1
- package/src/font-size-picker/README.md +1 -2
- package/src/font-size-picker/index.js +1 -2
- package/src/font-size-picker/stories/index.js +87 -108
- package/src/font-size-picker/test/index.js +0 -2
- package/src/form-file-upload/README.md +1 -1
- package/src/form-file-upload/stories/index.js +51 -0
- package/src/form-token-field/index.js +6 -6
- package/src/form-token-field/style.scss +1 -0
- package/src/form-token-field/suggestions-list.js +2 -2
- package/src/form-token-field/test/index.js +6 -6
- package/src/grid/component.js +1 -1
- package/src/h-stack/component.js +1 -1
- package/src/heading/component.tsx +6 -6
- package/src/heading/hook.ts +1 -1
- package/src/heading/stories/index.tsx +37 -0
- package/src/higher-order/with-filters/test/index.js +1 -1
- package/src/higher-order/with-focus-outside/test/index.js +1 -1
- package/src/higher-order/with-notices/index.js +1 -1
- package/src/higher-order/with-notices/test/index.js +3 -3
- package/src/index.js +6 -4
- package/src/index.native.js +9 -5
- package/src/input-control/index.tsx +2 -2
- package/src/input-control/input-base.tsx +3 -3
- package/src/input-control/input-field.tsx +16 -15
- package/src/input-control/reducer/reducer.ts +3 -0
- package/src/input-control/stories/index.js +1 -1
- package/src/input-control/styles/input-control-styles.tsx +1 -0
- package/src/input-control/test/index.js +4 -4
- package/src/input-control/types.ts +1 -1
- package/src/isolated-event-container/index.js +1 -1
- package/src/item-group/item/component.tsx +2 -2
- package/src/item-group/item-group/component.tsx +2 -2
- package/src/item-group/test/index.js +0 -1
- package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
- package/src/mobile/bottom-sheet/cell.native.js +1 -1
- package/src/mobile/bottom-sheet/index.native.js +11 -11
- package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
- package/src/mobile/color-settings/palette.screen.native.js +39 -9
- package/src/mobile/color-settings/style.native.scss +4 -0
- package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
- package/src/mobile/global-styles-context/test/utils.native.js +2 -2
- package/src/mobile/global-styles-context/utils.native.js +85 -16
- package/src/mobile/gradient/index.native.js +2 -2
- package/src/mobile/html-text-input/container.ios.js +3 -3
- package/src/mobile/html-text-input/index.native.js +1 -1
- package/src/mobile/html-text-input/test/index.native.js +14 -14
- package/src/mobile/image/index.native.js +1 -1
- package/src/mobile/image/style.native.scss +1 -0
- package/src/mobile/inserter-button/index.native.js +1 -2
- package/src/mobile/inserter-button/sparkles.js +15 -0
- package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
- package/src/mobile/link-picker/index.native.js +3 -3
- package/src/mobile/link-picker/link-picker-results.native.js +8 -8
- package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
- package/src/mobile/link-settings/index.native.js +1 -2
- package/src/mobile/link-settings/test/edit.native.js +15 -15
- package/src/modal/aria-helper.js +1 -1
- package/src/modal/index.js +2 -2
- package/src/navigable-container/container.js +2 -2
- package/src/navigable-container/tabbable.js +1 -1
- package/src/navigable-container/test/menu.js +5 -5
- package/src/navigable-container/test/tabbable.js +2 -2
- package/src/navigation/item/index.js +1 -1
- package/src/navigation/menu/index.js +1 -1
- package/src/navigation/stories/controlled-state.js +2 -2
- package/src/navigation/stories/index.js +1 -1
- package/src/navigator/index.ts +2 -0
- package/src/navigator/navigator-back-button/README.md +31 -0
- package/src/navigator/navigator-back-button/component.tsx +62 -0
- package/src/navigator/navigator-back-button/hook.ts +40 -0
- package/src/navigator/navigator-back-button/index.ts +1 -0
- package/src/navigator/navigator-button/README.md +38 -0
- package/src/navigator/navigator-button/component.tsx +61 -0
- package/src/navigator/navigator-button/hook.ts +55 -0
- package/src/navigator/navigator-button/index.ts +1 -0
- package/src/navigator/navigator-provider/README.md +20 -33
- package/src/navigator/navigator-provider/component.tsx +13 -23
- package/src/navigator/navigator-screen/README.md +1 -1
- package/src/navigator/navigator-screen/component.tsx +16 -25
- package/src/navigator/stories/index.js +24 -37
- package/src/navigator/test/index.js +105 -51
- package/src/navigator/types.ts +27 -1
- package/src/number-control/index.js +1 -1
- package/src/number-control/stories/index.js +1 -1
- package/src/panel/body.js +2 -2
- package/src/popover/index.js +3 -3
- package/src/popover/utils.js +6 -6
- package/src/radio/stories/index.js +1 -1
- package/src/radio-group/index.js +1 -1
- package/src/radio-group/stories/index.js +4 -1
- package/src/range-control/stories/index.js +1 -1
- package/src/range-control/styles/range-control-styles.js +1 -1
- package/src/range-control/test/index.js +2 -2
- package/src/resizable-box/index.tsx +2 -2
- package/src/resizable-box/resize-tooltip/index.tsx +2 -2
- package/src/resizable-box/resize-tooltip/label.tsx +2 -2
- package/src/sandbox/index.js +5 -5
- package/src/sandbox/index.native.js +1 -1
- package/src/scrollable/component.js +1 -1
- package/src/select-control/index.tsx +3 -4
- package/src/select-control/styles/select-control-styles.ts +1 -0
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/src/slot-fill/bubbles-virtually/slot.js +1 -2
- package/src/slot-fill/fill.js +1 -1
- package/src/slot-fill/provider.js +1 -1
- package/src/snackbar/index.js +1 -1
- package/src/snackbar/list.js +1 -1
- package/src/spacer/component.tsx +2 -2
- package/src/style-provider/index.js +2 -2
- package/src/surface/component.js +1 -1
- package/src/tab-panel/test/index.js +1 -1
- package/src/text/component.js +1 -1
- package/src/text/test/index.js +2 -2
- package/src/text/types.ts +6 -8
- package/src/text-control/index.js +2 -2
- package/src/text-highlight/test/index.js +4 -4
- package/src/toggle-control/test/index.js +3 -3
- package/src/toggle-group-control/stories/index.js +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -27
- package/src/toggle-group-control/toggle-group-control/component.tsx +4 -4
- package/src/toggle-group-control/toggle-group-control-option/component.tsx +3 -6
- package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -12
- package/src/toolbar/index.js +1 -1
- package/src/toolbar-group/test/index.js +2 -2
- package/src/tools-panel/stories/index.js +0 -1
- package/src/tools-panel/tools-panel/component.tsx +2 -2
- package/src/tools-panel/tools-panel-header/component.tsx +2 -2
- package/src/tools-panel/tools-panel-item/component.tsx +2 -2
- package/src/tooltip/index.js +3 -3
- package/src/tooltip/index.native.js +7 -7
- package/src/tooltip/test/index.js +2 -2
- package/src/tooltip/test/index.native.js +2 -2
- package/src/tree-grid/README.md +24 -1
- package/src/tree-grid/index.js +70 -7
- package/src/tree-grid/stories/index.js +4 -1
- package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
- package/src/tree-grid/test/index.js +303 -8
- package/src/truncate/component.js +1 -1
- package/src/truncate/utils.js +1 -1
- package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
- package/src/ui/context/context-system-provider.js +2 -2
- package/src/ui/context/{index.js → index.ts} +0 -0
- package/src/ui/context/wordpress-component.ts +3 -2
- package/src/ui/control-group/component.js +1 -1
- package/src/ui/control-label/component.js +1 -1
- package/src/ui/form-group/form-group.js +1 -1
- package/src/ui/shortcut/component.tsx +2 -2
- package/src/ui/spinner/component.js +1 -1
- package/src/ui/tooltip/component.js +1 -1
- package/src/ui/tooltip/content.js +1 -1
- package/src/ui/tooltip/test/index.js +4 -4
- package/src/ui/utils/colors.js +2 -2
- package/src/ui/utils/space.ts +2 -2
- package/src/unit-control/README.md +1 -1
- package/src/unit-control/index.native.js +5 -3
- package/src/unit-control/index.tsx +66 -37
- package/src/unit-control/stories/index.js +1 -1
- package/src/unit-control/test/index.js +102 -3
- package/src/unit-control/test/utils.js +56 -15
- package/src/unit-control/types.ts +5 -8
- package/src/unit-control/unit-select-control.tsx +1 -1
- package/src/unit-control/utils.ts +128 -125
- package/src/utils/breakpoint-values.js +1 -1
- package/src/utils/colors-values.js +1 -1
- package/src/utils/hooks/test/use-controlled-state.js +1 -1
- package/src/utils/hooks/test/use-controlled-value.js +3 -3
- package/src/utils/hooks/test/use-latest-ref.js +1 -1
- package/src/utils/test/math.js +2 -2
- package/src/utils/test/rtl.js +12 -12
- package/src/v-stack/component.js +1 -1
- package/src/visually-hidden/component.js +1 -1
- package/src/z-stack/component.tsx +2 -2
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/divider/stories/index.js +0 -64
- package/src/heading/stories/index.js +0 -24
- package/src/tools-panel/stories/typography-panel.js +0 -215
|
@@ -121,9 +121,9 @@ class BottomSheet extends Component {
|
|
|
121
121
|
|
|
122
122
|
if ( duration && easing ) {
|
|
123
123
|
// This layout animation is the same as the React Native's KeyboardAvoidingView component.
|
|
124
|
-
// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128
|
|
124
|
+
// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.
|
|
125
125
|
const animationConfig = {
|
|
126
|
-
// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m
|
|
126
|
+
// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.
|
|
127
127
|
duration: duration > 10 ? duration : 10,
|
|
128
128
|
type: LayoutAnimation.Types[ easing ] || 'keyboard',
|
|
129
129
|
};
|
|
@@ -151,7 +151,7 @@ class BottomSheet extends Component {
|
|
|
151
151
|
// preexisting bug: https://git.io/JMPCV
|
|
152
152
|
// this.performRegularLayoutAnimation( {
|
|
153
153
|
// useLastLayoutAnimation: false,
|
|
154
|
-
// } )
|
|
154
|
+
// } );.
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -195,7 +195,7 @@ class BottomSheet extends Component {
|
|
|
195
195
|
);
|
|
196
196
|
|
|
197
197
|
// 'Will' keyboard events are not available on Android.
|
|
198
|
-
// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener
|
|
198
|
+
// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.
|
|
199
199
|
this.keyboardShowListener = Keyboard.addListener(
|
|
200
200
|
Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',
|
|
201
201
|
this.keyboardShow
|
|
@@ -249,7 +249,7 @@ class BottomSheet extends Component {
|
|
|
249
249
|
const statusBarHeight =
|
|
250
250
|
Platform.OS === 'android' ? StatusBar.currentHeight : 0;
|
|
251
251
|
|
|
252
|
-
// `maxHeight` when modal is opened along with a keyboard
|
|
252
|
+
// `maxHeight` when modal is opened along with a keyboard.
|
|
253
253
|
const maxHeightWithOpenKeyboard =
|
|
254
254
|
0.95 *
|
|
255
255
|
( Dimensions.get( 'window' ).height -
|
|
@@ -257,7 +257,7 @@ class BottomSheet extends Component {
|
|
|
257
257
|
statusBarHeight -
|
|
258
258
|
this.headerHeight );
|
|
259
259
|
|
|
260
|
-
// In landscape orientation, set `maxHeight` to ~96% of the height
|
|
260
|
+
// In landscape orientation, set `maxHeight` to ~96% of the height.
|
|
261
261
|
if ( width > height ) {
|
|
262
262
|
this.setState( {
|
|
263
263
|
maxHeight: Math.min(
|
|
@@ -265,7 +265,7 @@ class BottomSheet extends Component {
|
|
|
265
265
|
maxHeightWithOpenKeyboard
|
|
266
266
|
),
|
|
267
267
|
} );
|
|
268
|
-
// In portrait orientation, set `maxHeight` to ~59% of the height
|
|
268
|
+
// In portrait orientation, set `maxHeight` to ~59% of the height.
|
|
269
269
|
} else {
|
|
270
270
|
this.setState( {
|
|
271
271
|
maxHeight: Math.min(
|
|
@@ -419,7 +419,7 @@ class BottomSheet extends Component {
|
|
|
419
419
|
const panResponder = PanResponder.create( {
|
|
420
420
|
onMoveShouldSetPanResponder: ( evt, gestureState ) => {
|
|
421
421
|
// 'swiping-to-close' option is temporarily and partially disabled
|
|
422
|
-
//
|
|
422
|
+
// on Android ( swipe / drag is still available in the top most area - near drag indicator).
|
|
423
423
|
if ( Platform.OS === 'ios' ) {
|
|
424
424
|
// Activates swipe down over child Touchables if the swipe is long enough.
|
|
425
425
|
// With this we can adjust sensibility on the swipe vs tap gestures.
|
|
@@ -449,7 +449,7 @@ class BottomSheet extends Component {
|
|
|
449
449
|
listStyle = { maxHeight };
|
|
450
450
|
|
|
451
451
|
// Allow setting a "static" height of the bottom sheet
|
|
452
|
-
// by
|
|
452
|
+
// by setting the min height to the max height.
|
|
453
453
|
if ( this.props.setMinHeightToMaxHeight ) {
|
|
454
454
|
listStyle.minHeight = maxHeight;
|
|
455
455
|
}
|
|
@@ -495,12 +495,12 @@ class BottomSheet extends Component {
|
|
|
495
495
|
);
|
|
496
496
|
|
|
497
497
|
const showDragIndicator = () => {
|
|
498
|
-
//
|
|
498
|
+
// If iOS or not fullscreen show the drag indicator.
|
|
499
499
|
if ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {
|
|
500
500
|
return true;
|
|
501
501
|
}
|
|
502
502
|
|
|
503
|
-
// Otherwise check the allowDragIndicator
|
|
503
|
+
// Otherwise check the allowDragIndicator.
|
|
504
504
|
return this.props.allowDragIndicator;
|
|
505
505
|
};
|
|
506
506
|
|
|
@@ -22,7 +22,7 @@ export default function LinkCell( {
|
|
|
22
22
|
<Cell
|
|
23
23
|
icon={ showIcon && link }
|
|
24
24
|
label={ __( 'Link to' ) }
|
|
25
|
-
//
|
|
25
|
+
// Since this is not actually editable, we treat value as a placeholder.
|
|
26
26
|
value={ valueMask || value || __( 'Search or type URL' ) }
|
|
27
27
|
valueStyle={
|
|
28
28
|
!! ( value || valueMask ) ? undefined : placeholderColor
|
|
@@ -38,7 +38,7 @@ const getSummaryForType = ( type ) => {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
//
|
|
41
|
+
// We use some Cell styles here with a column flex-direction.
|
|
42
42
|
function LinkSuggestionItemCell( { suggestion, onLinkPicked, ...props } ) {
|
|
43
43
|
const { title: contentTitle, url, type, isDirectEntry } = suggestion;
|
|
44
44
|
const title = isDirectEntry ? url : contentTitle;
|
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
ColorControl,
|
|
14
14
|
PanelBody,
|
|
15
15
|
BottomSheetContext,
|
|
16
|
+
useMobileGlobalStylesColors,
|
|
16
17
|
} from '@wordpress/components';
|
|
17
18
|
import { useRoute, useNavigation } from '@react-navigation/native';
|
|
19
|
+
|
|
18
20
|
/**
|
|
19
21
|
* Internal dependencies
|
|
20
22
|
*/
|
|
@@ -27,6 +29,7 @@ import { colorsUtils } from './utils';
|
|
|
27
29
|
import styles from './style.scss';
|
|
28
30
|
|
|
29
31
|
const HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 };
|
|
32
|
+
const THEME_PALETTE_NAME = 'Theme';
|
|
30
33
|
|
|
31
34
|
const PaletteScreen = () => {
|
|
32
35
|
const route = useRoute();
|
|
@@ -45,10 +48,15 @@ const PaletteScreen = () => {
|
|
|
45
48
|
const [ currentValue, setCurrentValue ] = useState( colorValue );
|
|
46
49
|
const isGradientColor = isGradient( currentValue );
|
|
47
50
|
const selectedSegmentIndex = isGradientColor ? 1 : 0;
|
|
51
|
+
const allAvailableColors = useMobileGlobalStylesColors();
|
|
48
52
|
|
|
49
53
|
const [ currentSegment, setCurrentSegment ] = useState(
|
|
50
54
|
segments[ selectedSegmentIndex ]
|
|
51
55
|
);
|
|
56
|
+
const isGradientSegment = currentSegment === colorsUtils.segments[ 1 ];
|
|
57
|
+
const currentSegmentColors = ! isGradientSegment
|
|
58
|
+
? defaultSettings.colors
|
|
59
|
+
: defaultSettings.gradients;
|
|
52
60
|
|
|
53
61
|
const horizontalSeparatorStyle = usePreferredColorSchemeStyle(
|
|
54
62
|
styles.horizontalSeparator,
|
|
@@ -176,15 +184,37 @@ const PaletteScreen = () => {
|
|
|
176
184
|
<NavBar.Heading>{ label } </NavBar.Heading>
|
|
177
185
|
</NavBar>
|
|
178
186
|
) }
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
|
|
188
|
+
<View style={ styles.colorPalettes }>
|
|
189
|
+
{ currentSegmentColors.map( ( palette, paletteKey ) => {
|
|
190
|
+
const paletteSettings = {
|
|
191
|
+
colors: palette.colors,
|
|
192
|
+
gradients: palette.gradients,
|
|
193
|
+
allColors: allAvailableColors,
|
|
194
|
+
};
|
|
195
|
+
const enableCustomColor =
|
|
196
|
+
! isGradientSegment &&
|
|
197
|
+
palette.name === THEME_PALETTE_NAME;
|
|
198
|
+
|
|
199
|
+
return (
|
|
200
|
+
<ColorPalette
|
|
201
|
+
enableCustomColor={ enableCustomColor }
|
|
202
|
+
label={ palette.name }
|
|
203
|
+
key={ paletteKey }
|
|
204
|
+
setColor={ setColor }
|
|
205
|
+
activeColor={ currentValue }
|
|
206
|
+
isGradientColor={ isGradientColor }
|
|
207
|
+
currentSegment={ currentSegment }
|
|
208
|
+
onCustomPress={ onCustomPress }
|
|
209
|
+
shouldEnableBottomSheetScroll={
|
|
210
|
+
shouldEnableBottomSheetScroll
|
|
211
|
+
}
|
|
212
|
+
defaultSettings={ paletteSettings }
|
|
213
|
+
/>
|
|
214
|
+
);
|
|
215
|
+
} ) }
|
|
216
|
+
</View>
|
|
217
|
+
|
|
188
218
|
{ isCustomGadientShown && (
|
|
189
219
|
<>
|
|
190
220
|
<View style={ horizontalSeparatorStyle } />
|
|
@@ -20,6 +20,11 @@ export const GLOBAL_STYLES_PALETTE = [
|
|
|
20
20
|
color: '#D1D1E4',
|
|
21
21
|
name: 'Purple',
|
|
22
22
|
},
|
|
23
|
+
{
|
|
24
|
+
color: '#cf1594',
|
|
25
|
+
name: 'Color 2 ',
|
|
26
|
+
slug: 'custom-color-2',
|
|
27
|
+
},
|
|
23
28
|
];
|
|
24
29
|
|
|
25
30
|
export const GLOBAL_STYLES_GRADIENTS = {
|
|
@@ -91,6 +96,11 @@ export const DEFAULT_GLOBAL_STYLES = {
|
|
|
91
96
|
fontSize: 'var(--wp--preset--font-size--normal)',
|
|
92
97
|
},
|
|
93
98
|
},
|
|
99
|
+
'core/separator': {
|
|
100
|
+
color: {
|
|
101
|
+
text: 'var:preset|color|custom-color-2',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
94
104
|
},
|
|
95
105
|
};
|
|
96
106
|
|
|
@@ -132,6 +142,11 @@ export const PARSED_GLOBAL_STYLES = {
|
|
|
132
142
|
fontSize: '18px',
|
|
133
143
|
},
|
|
134
144
|
},
|
|
145
|
+
'core/separator': {
|
|
146
|
+
color: {
|
|
147
|
+
text: '#cf1594',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
135
150
|
},
|
|
136
151
|
};
|
|
137
152
|
|
|
@@ -172,6 +187,18 @@ export const RAW_FEATURES = {
|
|
|
172
187
|
name: 'Purple',
|
|
173
188
|
},
|
|
174
189
|
],
|
|
190
|
+
custom: [
|
|
191
|
+
{
|
|
192
|
+
color: '#1bf5c1',
|
|
193
|
+
name: 'Color 1 ',
|
|
194
|
+
slug: 'custom-color-1',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
color: '#cf1594',
|
|
198
|
+
name: 'Color 2 ',
|
|
199
|
+
slug: 'custom-color-2',
|
|
200
|
+
},
|
|
201
|
+
],
|
|
175
202
|
},
|
|
176
203
|
gradients: {
|
|
177
204
|
default: [
|
|
@@ -125,14 +125,14 @@ describe( 'getGlobalStyles', () => {
|
|
|
125
125
|
|
|
126
126
|
expect( globalStyles ).toEqual(
|
|
127
127
|
expect.objectContaining( {
|
|
128
|
-
colors: RAW_FEATURES.color,
|
|
129
|
-
gradients,
|
|
130
128
|
__experimentalFeatures: {
|
|
131
129
|
color: {
|
|
132
130
|
palette: RAW_FEATURES.color.palette,
|
|
133
131
|
gradients,
|
|
134
132
|
text: true,
|
|
135
133
|
background: true,
|
|
134
|
+
defaultPalette: true,
|
|
135
|
+
defaultGradients: true,
|
|
136
136
|
},
|
|
137
137
|
typography: {
|
|
138
138
|
fontSizes: RAW_FEATURES.typography.fontSizes,
|
|
@@ -7,7 +7,11 @@ import { Dimensions } from 'react-native';
|
|
|
7
7
|
/**
|
|
8
8
|
* WordPress dependencies
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
getPxFromCssUnit,
|
|
12
|
+
useSetting,
|
|
13
|
+
useMultipleOriginColorsAndGradients,
|
|
14
|
+
} from '@wordpress/block-editor';
|
|
11
15
|
|
|
12
16
|
export const BLOCK_STYLE_ATTRIBUTES = [
|
|
13
17
|
'textColor',
|
|
@@ -17,7 +21,7 @@ export const BLOCK_STYLE_ATTRIBUTES = [
|
|
|
17
21
|
'fontSize',
|
|
18
22
|
];
|
|
19
23
|
|
|
20
|
-
// Mapping style properties name to native
|
|
24
|
+
// Mapping style properties name to native.
|
|
21
25
|
const BLOCK_STYLE_ATTRIBUTES_MAPPING = {
|
|
22
26
|
textColor: 'color',
|
|
23
27
|
text: 'color',
|
|
@@ -47,7 +51,7 @@ export function getBlockPaddings(
|
|
|
47
51
|
return blockPaddings;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
// Prevent adding extra paddings to inner blocks without background colors
|
|
54
|
+
// Prevent adding extra paddings to inner blocks without background colors.
|
|
51
55
|
if (
|
|
52
56
|
mergedStyle?.padding &&
|
|
53
57
|
! wrapperPropsStyle?.backgroundColor &&
|
|
@@ -70,7 +74,7 @@ export function getBlockColors(
|
|
|
70
74
|
const customBlockStyles = blockStyleAttributes?.style?.color || {};
|
|
71
75
|
const blockGlobalStyles = baseGlobalStyles?.blocks?.[ blockName ];
|
|
72
76
|
|
|
73
|
-
// Global styles colors
|
|
77
|
+
// Global styles colors.
|
|
74
78
|
if ( blockGlobalStyles?.color ) {
|
|
75
79
|
Object.entries( blockGlobalStyles.color ).forEach(
|
|
76
80
|
( [ key, value ] ) => {
|
|
@@ -87,7 +91,7 @@ export function getBlockColors(
|
|
|
87
91
|
baseGlobalStyles?.styles?.color?.text;
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
// Global styles elements
|
|
94
|
+
// Global styles elements.
|
|
91
95
|
if ( blockGlobalStyles?.elements ) {
|
|
92
96
|
const linkColor = blockGlobalStyles.elements?.link?.color?.text;
|
|
93
97
|
const styleKey = BLOCK_STYLE_ATTRIBUTES_MAPPING.link;
|
|
@@ -97,7 +101,7 @@ export function getBlockColors(
|
|
|
97
101
|
}
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
// Custom colors
|
|
104
|
+
// Custom colors.
|
|
101
105
|
Object.entries( blockStyleAttributes ).forEach( ( [ key, value ] ) => {
|
|
102
106
|
const isCustomColor = startsWith( value, '#' );
|
|
103
107
|
let styleKey = key;
|
|
@@ -119,7 +123,7 @@ export function getBlockColors(
|
|
|
119
123
|
}
|
|
120
124
|
} );
|
|
121
125
|
|
|
122
|
-
// Color placeholder
|
|
126
|
+
// Color placeholder.
|
|
123
127
|
if ( blockStyles?.color ) {
|
|
124
128
|
blockStyles[ BLOCK_STYLE_ATTRIBUTES_MAPPING.placeholder ] =
|
|
125
129
|
blockStyles.color;
|
|
@@ -138,7 +142,7 @@ export function getBlockTypography(
|
|
|
138
142
|
const customBlockStyles = blockStyleAttributes?.style?.typography || {};
|
|
139
143
|
const blockGlobalStyles = baseGlobalStyles?.blocks?.[ blockName ];
|
|
140
144
|
|
|
141
|
-
// Global styles
|
|
145
|
+
// Global styles.
|
|
142
146
|
if ( blockGlobalStyles?.typography ) {
|
|
143
147
|
const fontSize = blockGlobalStyles?.typography?.fontSize;
|
|
144
148
|
const lineHeight = blockGlobalStyles?.typography?.lineHeight;
|
|
@@ -172,7 +176,7 @@ export function getBlockTypography(
|
|
|
172
176
|
}
|
|
173
177
|
}
|
|
174
178
|
|
|
175
|
-
// Custom styles
|
|
179
|
+
// Custom styles.
|
|
176
180
|
if ( customBlockStyles?.fontSize ) {
|
|
177
181
|
typographyStyles.fontSize = customBlockStyles?.fontSize;
|
|
178
182
|
}
|
|
@@ -186,7 +190,7 @@ export function getBlockTypography(
|
|
|
186
190
|
|
|
187
191
|
export function parseStylesVariables( styles, mappedValues, customValues ) {
|
|
188
192
|
let stylesBase = styles;
|
|
189
|
-
const variables = [ 'preset', 'custom' ];
|
|
193
|
+
const variables = [ 'preset', 'custom', 'var' ];
|
|
190
194
|
|
|
191
195
|
if ( ! stylesBase ) {
|
|
192
196
|
return styles;
|
|
@@ -196,7 +200,9 @@ export function parseStylesVariables( styles, mappedValues, customValues ) {
|
|
|
196
200
|
// Examples
|
|
197
201
|
// var(--wp--preset--color--gray)
|
|
198
202
|
// var(--wp--custom--body--typography--font-family)
|
|
203
|
+
// var:preset|color|custom-color-2
|
|
199
204
|
const regex = new RegExp( `var\\(--wp--${ variable }--(.*?)\\)`, 'g' );
|
|
205
|
+
const varRegex = /\"var:preset\|color\|(.*?)\"/gm;
|
|
200
206
|
|
|
201
207
|
if ( variable === 'preset' ) {
|
|
202
208
|
stylesBase = stylesBase.replace( regex, ( _$1, $2 ) => {
|
|
@@ -219,13 +225,25 @@ export function parseStylesVariables( styles, mappedValues, customValues ) {
|
|
|
219
225
|
return get( customValuesData, path );
|
|
220
226
|
}
|
|
221
227
|
|
|
222
|
-
// Check for camelcase properties
|
|
228
|
+
// Check for camelcase properties.
|
|
223
229
|
return get( customValuesData, [
|
|
224
230
|
...path.slice( 0, path.length - 1 ),
|
|
225
231
|
camelCase( path[ path.length - 1 ] ),
|
|
226
232
|
] );
|
|
227
233
|
} );
|
|
228
234
|
}
|
|
235
|
+
|
|
236
|
+
if ( variable === 'var' ) {
|
|
237
|
+
stylesBase = stylesBase.replace( varRegex, ( _$1, $2 ) => {
|
|
238
|
+
if ( mappedValues?.color ) {
|
|
239
|
+
const matchedValue = find( mappedValues.color?.values, {
|
|
240
|
+
slug: $2,
|
|
241
|
+
} );
|
|
242
|
+
return `"${ matchedValue?.color }"`;
|
|
243
|
+
}
|
|
244
|
+
return UNKNOWN_VALUE;
|
|
245
|
+
} );
|
|
246
|
+
}
|
|
229
247
|
} );
|
|
230
248
|
|
|
231
249
|
return JSON.parse( stylesBase );
|
|
@@ -233,7 +251,12 @@ export function parseStylesVariables( styles, mappedValues, customValues ) {
|
|
|
233
251
|
|
|
234
252
|
export function getMappedValues( features, palette ) {
|
|
235
253
|
const typography = features?.typography;
|
|
236
|
-
const colors =
|
|
254
|
+
const colors = [
|
|
255
|
+
...( palette?.theme || [] ),
|
|
256
|
+
...( palette?.custom || [] ),
|
|
257
|
+
...( palette?.default || [] ),
|
|
258
|
+
];
|
|
259
|
+
|
|
237
260
|
const fontSizes = {
|
|
238
261
|
...typography?.fontSizes?.theme,
|
|
239
262
|
...typography?.fontSizes?.custom,
|
|
@@ -258,14 +281,14 @@ export function getMappedValues( features, palette ) {
|
|
|
258
281
|
* @return {Object} normalized sizes.
|
|
259
282
|
*/
|
|
260
283
|
function normalizeFontSizes( fontSizes ) {
|
|
261
|
-
// Adds normalized PX values for each of the different keys
|
|
284
|
+
// Adds normalized PX values for each of the different keys.
|
|
262
285
|
if ( ! fontSizes ) {
|
|
263
286
|
return fontSizes;
|
|
264
287
|
}
|
|
265
288
|
const normalizedFontSizes = {};
|
|
266
289
|
const dimensions = Dimensions.get( 'window' );
|
|
267
290
|
|
|
268
|
-
[ 'default', 'theme', '
|
|
291
|
+
[ 'default', 'theme', 'custom' ].forEach( ( key ) => {
|
|
269
292
|
if ( fontSizes[ key ] ) {
|
|
270
293
|
normalizedFontSizes[ key ] = fontSizes[ key ]?.map(
|
|
271
294
|
( fontSizeObject ) => {
|
|
@@ -286,6 +309,52 @@ function normalizeFontSizes( fontSizes ) {
|
|
|
286
309
|
return normalizedFontSizes;
|
|
287
310
|
}
|
|
288
311
|
|
|
312
|
+
export function useMobileGlobalStylesColors( type = 'colors' ) {
|
|
313
|
+
const colorGradientSettings = useMultipleOriginColorsAndGradients();
|
|
314
|
+
const availableThemeColors = colorGradientSettings?.[ type ]?.reduce(
|
|
315
|
+
( colors, origin ) => colors.concat( origin?.[ type ] ),
|
|
316
|
+
[]
|
|
317
|
+
);
|
|
318
|
+
// Default editor colors/gradients if it's not a block-based theme.
|
|
319
|
+
const colorPalette =
|
|
320
|
+
type === 'colors' ? 'color.palette' : 'color.gradients';
|
|
321
|
+
const editorDefaultPalette = useSetting( colorPalette );
|
|
322
|
+
|
|
323
|
+
return availableThemeColors.length >= 1
|
|
324
|
+
? availableThemeColors
|
|
325
|
+
: editorDefaultPalette;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export function getColorsAndGradients(
|
|
329
|
+
defaultEditorColors = [],
|
|
330
|
+
defaultEditorGradients = [],
|
|
331
|
+
rawFeatures
|
|
332
|
+
) {
|
|
333
|
+
const features = rawFeatures ? JSON.parse( rawFeatures ) : {};
|
|
334
|
+
|
|
335
|
+
return {
|
|
336
|
+
__experimentalGlobalStylesBaseStyles: null,
|
|
337
|
+
__experimentalFeatures: {
|
|
338
|
+
color: {
|
|
339
|
+
...( ! features?.color
|
|
340
|
+
? {
|
|
341
|
+
text: true,
|
|
342
|
+
background: true,
|
|
343
|
+
palette: {
|
|
344
|
+
default: defaultEditorColors,
|
|
345
|
+
},
|
|
346
|
+
gradients: {
|
|
347
|
+
default: defaultEditorGradients,
|
|
348
|
+
},
|
|
349
|
+
}
|
|
350
|
+
: features?.color ),
|
|
351
|
+
defaultPalette: defaultEditorColors?.length > 0,
|
|
352
|
+
defaultGradients: defaultEditorGradients?.length > 0,
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
|
|
289
358
|
export function getGlobalStyles( rawStyles, rawFeatures ) {
|
|
290
359
|
const features = rawFeatures ? JSON.parse( rawFeatures ) : {};
|
|
291
360
|
const mappedValues = getMappedValues( features, features?.color?.palette );
|
|
@@ -310,14 +379,14 @@ export function getGlobalStyles( rawStyles, rawFeatures ) {
|
|
|
310
379
|
const fontSizes = normalizeFontSizes( features?.typography?.fontSizes );
|
|
311
380
|
|
|
312
381
|
return {
|
|
313
|
-
colors,
|
|
314
|
-
gradients,
|
|
315
382
|
__experimentalFeatures: {
|
|
316
383
|
color: {
|
|
317
384
|
palette: colors?.palette,
|
|
318
385
|
gradients,
|
|
319
386
|
text: features?.color?.text ?? true,
|
|
320
387
|
background: features?.color?.background ?? true,
|
|
388
|
+
defaultPalette: features?.color?.defaultPalette ?? true,
|
|
389
|
+
defaultGradients: features?.color?.defaultGradients ?? true,
|
|
321
390
|
},
|
|
322
391
|
typography: {
|
|
323
392
|
fontSizes,
|
|
@@ -60,7 +60,7 @@ export function getGradientColorGroup( gradientValue ) {
|
|
|
60
60
|
const excludeSideOrCorner = /linear-gradient\(to\s+([a-z\s]+,)/;
|
|
61
61
|
|
|
62
62
|
// Parser has some difficulties with angle defined as a side or corner (e.g. `to left`)
|
|
63
|
-
// so it's going to be excluded in order to matching color groups
|
|
63
|
+
// so it's going to be excluded in order to matching color groups.
|
|
64
64
|
const modifiedGradientValue = gradientValue.replace(
|
|
65
65
|
excludeSideOrCorner,
|
|
66
66
|
'linear-gradient('
|
|
@@ -151,7 +151,7 @@ function Gradient( {
|
|
|
151
151
|
<SVG>
|
|
152
152
|
<Defs>
|
|
153
153
|
<RadialGradient
|
|
154
|
-
//eslint-disable-next-line no-restricted-syntax
|
|
154
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
155
155
|
id="radialGradient"
|
|
156
156
|
gradientUnits="userSpaceOnUse"
|
|
157
157
|
rx="70%"
|
|
@@ -23,9 +23,9 @@ class HTMLInputContainer extends Component {
|
|
|
23
23
|
|
|
24
24
|
onPanResponderMove: ( e, gestureState ) => {
|
|
25
25
|
if ( gestureState.dy > 100 && gestureState.dy < 110 ) {
|
|
26
|
-
//Keyboard.dismiss() and this.textInput.blur() are not working here
|
|
27
|
-
//They require to know the currentlyFocusedID under the hood but
|
|
28
|
-
//during this gesture there's no currentlyFocusedID
|
|
26
|
+
// Keyboard.dismiss() and this.textInput.blur() are not working here
|
|
27
|
+
// They require to know the currentlyFocusedID under the hood but
|
|
28
|
+
// during this gesture there's no currentlyFocusedID.
|
|
29
29
|
UIManager.blur( e.target );
|
|
30
30
|
}
|
|
31
31
|
},
|
|
@@ -8,12 +8,12 @@ import { render, fireEvent } from 'test/helpers';
|
|
|
8
8
|
*/
|
|
9
9
|
import { HTMLTextInput } from '..';
|
|
10
10
|
|
|
11
|
-
// Finds the Content TextInput in our HTMLInputView
|
|
11
|
+
// Finds the Content TextInput in our HTMLInputView.
|
|
12
12
|
const findContentTextInput = ( screen ) => {
|
|
13
13
|
return screen.getByA11yLabel( 'html-view-content' );
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
// Finds the Title TextInput in our HTMLInputView
|
|
16
|
+
// Finds the Title TextInput in our HTMLInputView.
|
|
17
17
|
const findTitleTextInput = ( screen ) => {
|
|
18
18
|
return screen.getByA11yLabel( 'html-view-title' );
|
|
19
19
|
};
|
|
@@ -43,11 +43,11 @@ describe( 'HTMLTextInput', () => {
|
|
|
43
43
|
/>
|
|
44
44
|
);
|
|
45
45
|
|
|
46
|
-
// Simulate user typing text
|
|
46
|
+
// Simulate user typing text.
|
|
47
47
|
const htmlTextInput = findContentTextInput( screen );
|
|
48
48
|
fireEvent( htmlTextInput, 'changeText', 'text' );
|
|
49
49
|
|
|
50
|
-
//Check if the onChange is called and the state is updated
|
|
50
|
+
// Check if the onChange is called and the state is updated.
|
|
51
51
|
expect( onChange ).toHaveBeenCalledTimes( 1 );
|
|
52
52
|
expect( onChange ).toHaveBeenCalledWith( 'text' );
|
|
53
53
|
|
|
@@ -65,15 +65,15 @@ describe( 'HTMLTextInput', () => {
|
|
|
65
65
|
/>
|
|
66
66
|
);
|
|
67
67
|
|
|
68
|
-
// Simulate user typing text
|
|
68
|
+
// Simulate user typing text.
|
|
69
69
|
const htmlTextInput = findContentTextInput( screen );
|
|
70
70
|
fireEvent( htmlTextInput, 'changeText', 'text' );
|
|
71
71
|
|
|
72
|
-
//Simulate blur event
|
|
72
|
+
//Simulate blur event.
|
|
73
73
|
fireEvent( htmlTextInput, 'blur' );
|
|
74
74
|
|
|
75
|
-
//Normally prop.value is updated with the help of withSelect
|
|
76
|
-
//
|
|
75
|
+
// Normally prop.value is updated with the help of withSelect
|
|
76
|
+
// but we don't have it in tests so we just simulate it.
|
|
77
77
|
screen.update(
|
|
78
78
|
<HTMLTextInput
|
|
79
79
|
onPersist={ onPersist }
|
|
@@ -83,17 +83,17 @@ describe( 'HTMLTextInput', () => {
|
|
|
83
83
|
/>
|
|
84
84
|
);
|
|
85
85
|
|
|
86
|
-
//Check if the onPersist is called and the state is updated
|
|
86
|
+
// Check if the onPersist is called and the state is updated.
|
|
87
87
|
expect( onPersist ).toHaveBeenCalledTimes( 1 );
|
|
88
88
|
expect( onPersist ).toHaveBeenCalledWith( 'text' );
|
|
89
89
|
|
|
90
|
-
//Simulate blur event
|
|
90
|
+
//Simulate blur event.
|
|
91
91
|
fireEvent( htmlTextInput, 'blur' );
|
|
92
92
|
|
|
93
|
-
// Check that onPersist is not called for non-dirty state
|
|
93
|
+
// Check that onPersist is not called for non-dirty state.
|
|
94
94
|
expect( onPersist ).toHaveBeenCalledTimes( 1 );
|
|
95
95
|
|
|
96
|
-
//We expect state.value is getting propagated from prop.value
|
|
96
|
+
// We expect state.value is getting propagated from prop.value.
|
|
97
97
|
expect( screen.getByDisplayValue( 'text' ) ).toBeDefined();
|
|
98
98
|
} );
|
|
99
99
|
|
|
@@ -107,11 +107,11 @@ describe( 'HTMLTextInput', () => {
|
|
|
107
107
|
/>
|
|
108
108
|
);
|
|
109
109
|
|
|
110
|
-
// Simulate user typing text
|
|
110
|
+
// Simulate user typing text.
|
|
111
111
|
const textInput = findTitleTextInput( screen );
|
|
112
112
|
fireEvent( textInput, 'changeText', 'text' );
|
|
113
113
|
|
|
114
|
-
//Check if the setTitleAction is called
|
|
114
|
+
// Check if the setTitleAction is called.
|
|
115
115
|
expect( editTitle ).toHaveBeenCalledTimes( 1 );
|
|
116
116
|
expect( editTitle ).toHaveBeenCalledWith( 'text' );
|
|
117
117
|
} );
|
|
@@ -174,7 +174,7 @@ const ImageComponent = ( {
|
|
|
174
174
|
<View
|
|
175
175
|
style={ [
|
|
176
176
|
styles.container,
|
|
177
|
-
//
|
|
177
|
+
// Only set alignItems if an image exists because alignItems causes the placeholder
|
|
178
178
|
// to disappear when an aligned image can't be downloaded
|
|
179
179
|
// https://github.com/wordpress-mobile/gutenberg-mobile/issues/1592
|
|
180
180
|
imageData && align && { alignItems: align },
|
|
@@ -10,14 +10,13 @@ import { Component } from '@wordpress/element';
|
|
|
10
10
|
import { Icon } from '@wordpress/components';
|
|
11
11
|
import { withPreferredColorScheme } from '@wordpress/compose';
|
|
12
12
|
import { __, sprintf } from '@wordpress/i18n';
|
|
13
|
-
import { sparkles } from '@wordpress/icons';
|
|
14
13
|
import { BlockIcon } from '@wordpress/block-editor';
|
|
15
14
|
|
|
16
15
|
/**
|
|
17
16
|
* Internal dependencies
|
|
18
17
|
*/
|
|
19
18
|
import styles from './style.scss';
|
|
20
|
-
|
|
19
|
+
import sparkles from './sparkles';
|
|
21
20
|
class MenuItem extends Component {
|
|
22
21
|
constructor() {
|
|
23
22
|
super( ...arguments );
|