@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
|
@@ -85,7 +85,7 @@ export const _default = () => {
|
|
|
85
85
|
);
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
-
export const
|
|
88
|
+
export const WithNonToolsPanelItems = () => {
|
|
89
89
|
const [ height, setHeight ] = useState();
|
|
90
90
|
const [ width, setWidth ] = useState();
|
|
91
91
|
|
|
@@ -94,13 +94,78 @@ export const WithOptionalItemsPlusIcon = () => {
|
|
|
94
94
|
setWidth( undefined );
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
+
return (
|
|
98
|
+
<PanelWrapperView>
|
|
99
|
+
<Panel>
|
|
100
|
+
<ToolsPanel
|
|
101
|
+
label="ToolsPanel (with non-menu items)"
|
|
102
|
+
resetAll={ resetAll }
|
|
103
|
+
>
|
|
104
|
+
<IntroText>
|
|
105
|
+
This text illustrates not all items must be wrapped in a
|
|
106
|
+
ToolsPanelItem and represented in the panel menu.
|
|
107
|
+
</IntroText>
|
|
108
|
+
<SingleColumnItem
|
|
109
|
+
hasValue={ () => !! width }
|
|
110
|
+
label="Width"
|
|
111
|
+
onDeselect={ () => setWidth( undefined ) }
|
|
112
|
+
isShownByDefault={ true }
|
|
113
|
+
>
|
|
114
|
+
<UnitControl
|
|
115
|
+
label="Width"
|
|
116
|
+
value={ width }
|
|
117
|
+
onChange={ ( next ) => setWidth( next ) }
|
|
118
|
+
/>
|
|
119
|
+
</SingleColumnItem>
|
|
120
|
+
<SingleColumnItem
|
|
121
|
+
hasValue={ () => !! height }
|
|
122
|
+
label="Height"
|
|
123
|
+
onDeselect={ () => setHeight( undefined ) }
|
|
124
|
+
isShownByDefault={ true }
|
|
125
|
+
>
|
|
126
|
+
<UnitControl
|
|
127
|
+
label="Height"
|
|
128
|
+
value={ height }
|
|
129
|
+
onChange={ ( next ) => setHeight( next ) }
|
|
130
|
+
/>
|
|
131
|
+
</SingleColumnItem>
|
|
132
|
+
</ToolsPanel>
|
|
133
|
+
</Panel>
|
|
134
|
+
</PanelWrapperView>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export const WithOptionalItemsPlusIcon = ( { isShownByDefault } ) => {
|
|
139
|
+
const [ height, setHeight ] = useState();
|
|
140
|
+
const [ width, setWidth ] = useState();
|
|
141
|
+
const [ minWidth, setMinWidth ] = useState();
|
|
142
|
+
|
|
143
|
+
const resetAll = () => {
|
|
144
|
+
setHeight( undefined );
|
|
145
|
+
setWidth( undefined );
|
|
146
|
+
setMinWidth( undefined );
|
|
147
|
+
};
|
|
148
|
+
|
|
97
149
|
return (
|
|
98
150
|
<PanelWrapperView>
|
|
99
151
|
<Panel>
|
|
100
152
|
<ToolsPanel
|
|
101
153
|
label="Tools Panel (optional items only)"
|
|
102
154
|
resetAll={ resetAll }
|
|
155
|
+
key={ isShownByDefault }
|
|
103
156
|
>
|
|
157
|
+
<SingleColumnItem
|
|
158
|
+
hasValue={ () => !! minWidth }
|
|
159
|
+
label="Minimum width"
|
|
160
|
+
onDeselect={ () => setMinWidth( undefined ) }
|
|
161
|
+
isShownByDefault={ isShownByDefault }
|
|
162
|
+
>
|
|
163
|
+
<UnitControl
|
|
164
|
+
label="Minimum width"
|
|
165
|
+
value={ minWidth }
|
|
166
|
+
onChange={ ( next ) => setMinWidth( next ) }
|
|
167
|
+
/>
|
|
168
|
+
</SingleColumnItem>
|
|
104
169
|
<SingleColumnItem
|
|
105
170
|
hasValue={ () => !! width }
|
|
106
171
|
label="Width"
|
|
@@ -131,6 +196,10 @@ export const WithOptionalItemsPlusIcon = () => {
|
|
|
131
196
|
);
|
|
132
197
|
};
|
|
133
198
|
|
|
199
|
+
WithOptionalItemsPlusIcon.args = {
|
|
200
|
+
isShownByDefault: false,
|
|
201
|
+
};
|
|
202
|
+
|
|
134
203
|
const { Fill: ToolsPanelItems, Slot } = createSlotFill( 'ToolsPanelSlot' );
|
|
135
204
|
const panelId = 'unique-tools-panel-id';
|
|
136
205
|
|
|
@@ -399,6 +468,7 @@ export const WithConditionallyRenderedControl = () => {
|
|
|
399
468
|
};
|
|
400
469
|
|
|
401
470
|
export { TypographyPanel } from './typography-panel';
|
|
471
|
+
export { ToolsPanelWithItemGroupSlot } from './tools-panel-with-item-group-slot';
|
|
402
472
|
|
|
403
473
|
const PanelWrapperView = styled.div`
|
|
404
474
|
max-width: 280px;
|
|
@@ -412,3 +482,7 @@ const PanelWrapperView = styled.div`
|
|
|
412
482
|
const SingleColumnItem = styled( ToolsPanelItem )`
|
|
413
483
|
grid-column: span 1;
|
|
414
484
|
`;
|
|
485
|
+
|
|
486
|
+
const IntroText = styled.div`
|
|
487
|
+
grid-column: span 2;
|
|
488
|
+
`;
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
|
+
import { css } from '@emotion/react';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* WordPress dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { useContext, useState } from '@wordpress/element';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import Button from '../../button';
|
|
16
|
+
import ColorIndicator from '../../color-indicator';
|
|
17
|
+
import ColorPalette from '../../color-palette';
|
|
18
|
+
import Dropdown from '../../dropdown';
|
|
19
|
+
import Panel from '../../panel';
|
|
20
|
+
import { FlexItem } from '../../flex';
|
|
21
|
+
import { HStack } from '../../h-stack';
|
|
22
|
+
import { Item, ItemGroup } from '../../item-group';
|
|
23
|
+
import { ToolsPanel, ToolsPanelItem, ToolsPanelContext } from '..';
|
|
24
|
+
import { createSlotFill, Provider as SlotFillProvider } from '../../slot-fill';
|
|
25
|
+
import { useCx } from '../../utils';
|
|
26
|
+
|
|
27
|
+
// Available border colors.
|
|
28
|
+
const colors = [
|
|
29
|
+
{ name: 'Gray 0', color: '#f6f7f7' },
|
|
30
|
+
{ name: 'Gray 5', color: '#dcdcde' },
|
|
31
|
+
{ name: 'Gray 20', color: '#a7aaad' },
|
|
32
|
+
{ name: 'Gray 70', color: '#3c434a' },
|
|
33
|
+
{ name: 'Gray 100', color: '#101517' },
|
|
34
|
+
{ name: 'Blue 20', color: '#72aee6' },
|
|
35
|
+
{ name: 'Blue 40', color: '#3582c4' },
|
|
36
|
+
{ name: 'Blue 70', color: '#0a4b78' },
|
|
37
|
+
{ name: 'Red 40', color: '#e65054' },
|
|
38
|
+
{ name: 'Red 70', color: '#8a2424' },
|
|
39
|
+
{ name: 'Green 10', color: '#68de7c' },
|
|
40
|
+
{ name: 'Green 40', color: '#00a32a' },
|
|
41
|
+
{ name: 'Green 60', color: '#007017' },
|
|
42
|
+
{ name: 'Yellow 10', color: '#f2d675' },
|
|
43
|
+
{ name: 'Yellow 40', color: '#bd8600' },
|
|
44
|
+
];
|
|
45
|
+
const panelId = 'unique-tools-panel-id';
|
|
46
|
+
|
|
47
|
+
const { Fill, Slot } = createSlotFill( 'ToolsPanelSlot' );
|
|
48
|
+
|
|
49
|
+
// This storybook example aims to replicate a virtual bubbling SlotFill use case
|
|
50
|
+
// for the `ToolsPanel` when the Slot itself is an `ItemGroup`.
|
|
51
|
+
|
|
52
|
+
// In this scenario the `ToolsPanel` has to render item placeholders so fills
|
|
53
|
+
// maintain their order in the DOM. These placeholders in the DOM prevent the
|
|
54
|
+
// normal styling of the `ItemGroup` in particular the border radii on the first
|
|
55
|
+
// and last items. In case consumers of the ItemGroup and ToolsPanel are
|
|
56
|
+
// applying their own styles to these components, the ToolsPanel needs to assist
|
|
57
|
+
// consumers in identifying which of its visible items are first and last.
|
|
58
|
+
|
|
59
|
+
// This custom fill is required to re-establish the ToolsPanelContext for
|
|
60
|
+
// injected ToolsPanelItem components as they will not have access to the React
|
|
61
|
+
// Context as the Provider is part of the ToolsPanelItems.Slot tree.
|
|
62
|
+
const ToolsPanelItems = ( { children } ) => {
|
|
63
|
+
return (
|
|
64
|
+
<Fill>
|
|
65
|
+
{ ( fillProps ) => (
|
|
66
|
+
<ToolsPanelContext.Provider value={ fillProps }>
|
|
67
|
+
{ children }
|
|
68
|
+
</ToolsPanelContext.Provider>
|
|
69
|
+
) }
|
|
70
|
+
</Fill>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// This fetches the ToolsPanelContext and passes it through `fillProps` so that
|
|
75
|
+
// rendered fills can re-establish the `ToolsPanelContext.Provider`.
|
|
76
|
+
const SlotContainer = ( { Slot: ToolsPanelSlot, ...props } ) => {
|
|
77
|
+
const toolsPanelContext = useContext( ToolsPanelContext );
|
|
78
|
+
|
|
79
|
+
return (
|
|
80
|
+
<ToolsPanelSlot
|
|
81
|
+
{ ...props }
|
|
82
|
+
fillProps={ toolsPanelContext }
|
|
83
|
+
bubblesVirtually
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// This wraps the slot with a `ToolsPanel` mimicking a real-world use case from
|
|
89
|
+
// the block editor.
|
|
90
|
+
ToolsPanelItems.Slot = ( { resetAll, ...props } ) => (
|
|
91
|
+
<ToolsPanel
|
|
92
|
+
label="Tools Panel with Item Group"
|
|
93
|
+
resetAll={ resetAll }
|
|
94
|
+
panelId={ panelId }
|
|
95
|
+
hasInnerWrapper={ true }
|
|
96
|
+
shouldRenderPlaceholderItems={ true }
|
|
97
|
+
__experimentalFirstVisibleItemClass="first"
|
|
98
|
+
__experimentalLastVisibleItemClass="last"
|
|
99
|
+
>
|
|
100
|
+
<SlotContainer { ...props } Slot={ Slot } />
|
|
101
|
+
</ToolsPanel>
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
export const ToolsPanelWithItemGroupSlot = () => {
|
|
105
|
+
const [ attributes, setAttributes ] = useState( {} );
|
|
106
|
+
const { text, background, link } = attributes;
|
|
107
|
+
|
|
108
|
+
const cx = useCx();
|
|
109
|
+
const slotWrapperClassName = cx( SlotWrapper );
|
|
110
|
+
const itemClassName = cx( ToolsPanelItemClass );
|
|
111
|
+
|
|
112
|
+
const resetAll = ( resetFilters = [] ) => {
|
|
113
|
+
let newAttributes = {};
|
|
114
|
+
|
|
115
|
+
resetFilters.forEach( ( resetFilter ) => {
|
|
116
|
+
newAttributes = {
|
|
117
|
+
...newAttributes,
|
|
118
|
+
...resetFilter( newAttributes ),
|
|
119
|
+
};
|
|
120
|
+
} );
|
|
121
|
+
|
|
122
|
+
setAttributes( newAttributes );
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const updateAttribute = ( name, value ) => {
|
|
126
|
+
setAttributes( {
|
|
127
|
+
...attributes,
|
|
128
|
+
[ name ]: value,
|
|
129
|
+
} );
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const ToolsPanelColorDropdown = ( { attribute, label, value } ) => {
|
|
133
|
+
return (
|
|
134
|
+
<ToolsPanelItem
|
|
135
|
+
className={ itemClassName }
|
|
136
|
+
hasValue={ () => !! value }
|
|
137
|
+
label={ label }
|
|
138
|
+
onDeselect={ () => updateAttribute( attribute, undefined ) }
|
|
139
|
+
resetAllFilter={ () => ( { [ attribute ]: undefined } ) }
|
|
140
|
+
panelId={ panelId }
|
|
141
|
+
as={ Item }
|
|
142
|
+
>
|
|
143
|
+
<Dropdown
|
|
144
|
+
renderToggle={ ( { onToggle } ) => (
|
|
145
|
+
<Button onClick={ onToggle }>
|
|
146
|
+
<HStack justify="flex-start">
|
|
147
|
+
<ColorIndicator colorValue={ value } />
|
|
148
|
+
<FlexItem>{ label }</FlexItem>
|
|
149
|
+
</HStack>
|
|
150
|
+
</Button>
|
|
151
|
+
) }
|
|
152
|
+
renderContent={ () => (
|
|
153
|
+
<ColorPalette
|
|
154
|
+
value={ value }
|
|
155
|
+
colors={ colors }
|
|
156
|
+
onChange={ ( newColor ) =>
|
|
157
|
+
updateAttribute( attribute, newColor )
|
|
158
|
+
}
|
|
159
|
+
/>
|
|
160
|
+
) }
|
|
161
|
+
/>
|
|
162
|
+
</ToolsPanelItem>
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// ToolsPanelItems are rendered via two different fills to simulate
|
|
167
|
+
// injection from multiple locations.
|
|
168
|
+
return (
|
|
169
|
+
<SlotFillProvider>
|
|
170
|
+
<PanelWrapperView>
|
|
171
|
+
<Panel>
|
|
172
|
+
<ToolsPanelItems.Slot
|
|
173
|
+
as={ ItemGroup }
|
|
174
|
+
isBordered
|
|
175
|
+
isSeparated
|
|
176
|
+
isRounded={ false }
|
|
177
|
+
className={ slotWrapperClassName }
|
|
178
|
+
resetAll={ resetAll }
|
|
179
|
+
/>
|
|
180
|
+
</Panel>
|
|
181
|
+
</PanelWrapperView>
|
|
182
|
+
<ToolsPanelItems>
|
|
183
|
+
<ToolsPanelColorDropdown
|
|
184
|
+
attribute="text"
|
|
185
|
+
label="Text"
|
|
186
|
+
value={ text }
|
|
187
|
+
/>
|
|
188
|
+
<ToolsPanelColorDropdown
|
|
189
|
+
attribute="background"
|
|
190
|
+
label="Background"
|
|
191
|
+
value={ background }
|
|
192
|
+
/>
|
|
193
|
+
</ToolsPanelItems>
|
|
194
|
+
<ToolsPanelItems>
|
|
195
|
+
<ToolsPanelColorDropdown
|
|
196
|
+
attribute="link"
|
|
197
|
+
label="Link"
|
|
198
|
+
value={ link }
|
|
199
|
+
/>
|
|
200
|
+
</ToolsPanelItems>
|
|
201
|
+
</SlotFillProvider>
|
|
202
|
+
);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
const PanelWrapperView = styled.div`
|
|
206
|
+
max-width: 280px;
|
|
207
|
+
font-size: 13px;
|
|
208
|
+
|
|
209
|
+
.components-dropdown-menu__menu {
|
|
210
|
+
max-width: 220px;
|
|
211
|
+
}
|
|
212
|
+
`;
|
|
213
|
+
|
|
214
|
+
const SlotWrapper = css`
|
|
215
|
+
&&& {
|
|
216
|
+
row-gap: 0;
|
|
217
|
+
border-radius: 20px;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
> div {
|
|
221
|
+
grid-column: span 2;
|
|
222
|
+
border-radius: inherit;
|
|
223
|
+
}
|
|
224
|
+
`;
|
|
225
|
+
|
|
226
|
+
const ToolsPanelItemClass = css`
|
|
227
|
+
padding: 0;
|
|
228
|
+
|
|
229
|
+
&&.first {
|
|
230
|
+
border-top-left-radius: inherit;
|
|
231
|
+
border-top-right-radius: inherit;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&.last {
|
|
235
|
+
border-bottom-left-radius: inherit;
|
|
236
|
+
border-bottom-right-radius: inherit;
|
|
237
|
+
border-bottom-color: transparent;
|
|
238
|
+
}
|
|
239
|
+
&& > div,
|
|
240
|
+
&& > div > button {
|
|
241
|
+
width: 100%;
|
|
242
|
+
border-radius: inherit;
|
|
243
|
+
}
|
|
244
|
+
`;
|
|
@@ -8,8 +8,11 @@ import { css } from '@emotion/react';
|
|
|
8
8
|
*/
|
|
9
9
|
import {
|
|
10
10
|
StyledField as BaseControlField,
|
|
11
|
+
StyledHelp as BaseControlHelp,
|
|
12
|
+
StyledLabel as BaseControlLabel,
|
|
11
13
|
Wrapper as BaseControlWrapper,
|
|
12
14
|
} from '../base-control/styles/base-control-styles';
|
|
15
|
+
import { LabelWrapper } from '../input-control/styles/input-control-styles';
|
|
13
16
|
import { COLORS, CONFIG } from '../utils';
|
|
14
17
|
import { space } from '../ui/utils/space';
|
|
15
18
|
|
|
@@ -28,7 +31,7 @@ const toolsPanelGrid = {
|
|
|
28
31
|
export const ToolsPanel = css`
|
|
29
32
|
${ toolsPanelGrid.spacing };
|
|
30
33
|
|
|
31
|
-
border-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[
|
|
34
|
+
border-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 300 ] };
|
|
32
35
|
margin-top: -1px;
|
|
33
36
|
padding: ${ space( 4 ) };
|
|
34
37
|
`;
|
|
@@ -69,6 +72,7 @@ export const ToolsPanelHeader = css`
|
|
|
69
72
|
*/
|
|
70
73
|
.components-dropdown-menu {
|
|
71
74
|
margin: ${ space( -1 ) } 0;
|
|
75
|
+
line-height: 0;
|
|
72
76
|
}
|
|
73
77
|
&&&& .components-dropdown-menu__toggle {
|
|
74
78
|
padding: 0;
|
|
@@ -103,10 +107,44 @@ export const ToolsPanelItem = css`
|
|
|
103
107
|
&& ${ BaseControlWrapper } {
|
|
104
108
|
margin-bottom: 0;
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
/**
|
|
111
|
+
* To maintain proper spacing within a base control, the field's bottom
|
|
112
|
+
* margin should only be removed when there is no help text included and
|
|
113
|
+
* it is therefore the last-child.
|
|
114
|
+
*/
|
|
115
|
+
${ BaseControlField }:last-child {
|
|
107
116
|
margin-bottom: 0;
|
|
108
117
|
}
|
|
109
118
|
}
|
|
119
|
+
|
|
120
|
+
${ BaseControlHelp } {
|
|
121
|
+
margin-bottom: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Standardize InputControl and BaseControl labels with other labels when
|
|
126
|
+
* inside ToolsPanel.
|
|
127
|
+
*
|
|
128
|
+
* This is a temporary fix until the different control components have their
|
|
129
|
+
* labels normalized.
|
|
130
|
+
*/
|
|
131
|
+
&& ${ LabelWrapper } {
|
|
132
|
+
label {
|
|
133
|
+
line-height: 1.4em;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The targeting of .components-custom-select-control__label here is a
|
|
139
|
+
* temporary measure only.
|
|
140
|
+
*
|
|
141
|
+
* It should be replaced once CustomSelectControl component has been
|
|
142
|
+
* refactored and can be targeted via component interpolation.
|
|
143
|
+
*/
|
|
144
|
+
.components-custom-select-control__label,
|
|
145
|
+
${ BaseControlLabel } {
|
|
146
|
+
line-height: 1.4em;
|
|
147
|
+
}
|
|
110
148
|
`;
|
|
111
149
|
|
|
112
150
|
export const ToolsPanelItemPlaceholder = css`
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ToolsPanel first and last panel items should apply first/last classes to appropriate items 1`] = `
|
|
4
|
+
.emotion-0 {
|
|
5
|
+
display: grid;
|
|
6
|
+
gap: calc( 4px * 3 );
|
|
7
|
+
grid-template-columns: repeat( 2, 1fr );
|
|
8
|
+
-webkit-column-gap: calc(4px * 4);
|
|
9
|
+
column-gap: calc(4px * 4);
|
|
10
|
+
row-gap: calc(4px * 6);
|
|
11
|
+
border-top: 1px solid #ddd;
|
|
12
|
+
margin-top: -1px;
|
|
13
|
+
padding: calc(4px * 4);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.emotion-0>div:not( :first-of-type ) {
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-columns: repeat( 2, 1fr );
|
|
19
|
+
-webkit-column-gap: calc(4px * 4);
|
|
20
|
+
column-gap: calc(4px * 4);
|
|
21
|
+
row-gap: calc(4px * 6);
|
|
22
|
+
grid-column: 1/-1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.emotion-2 {
|
|
26
|
+
display: -webkit-box;
|
|
27
|
+
display: -webkit-flex;
|
|
28
|
+
display: -ms-flexbox;
|
|
29
|
+
display: flex;
|
|
30
|
+
-webkit-align-items: center;
|
|
31
|
+
-webkit-box-align: center;
|
|
32
|
+
-ms-flex-align: center;
|
|
33
|
+
align-items: center;
|
|
34
|
+
-webkit-flex-direction: row;
|
|
35
|
+
-ms-flex-direction: row;
|
|
36
|
+
flex-direction: row;
|
|
37
|
+
-webkit-box-pack: justify;
|
|
38
|
+
-webkit-justify-content: space-between;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
width: 100%;
|
|
41
|
+
grid-column: 1/-1;
|
|
42
|
+
gap: calc(4px * 2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.emotion-2>*+*:not( marquee ) {
|
|
46
|
+
margin-left: calc(4px * 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.emotion-2>* {
|
|
50
|
+
min-width: 0;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.emotion-2 .components-dropdown-menu {
|
|
54
|
+
margin: calc(4px * -1) 0;
|
|
55
|
+
line-height: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.emotion-2.emotion-2.emotion-2.emotion-2 .components-dropdown-menu__toggle {
|
|
59
|
+
padding: 0;
|
|
60
|
+
min-width: calc(4px * 6);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.emotion-4 {
|
|
64
|
+
color: #1e1e1e;
|
|
65
|
+
line-height: 1.2;
|
|
66
|
+
margin: 0;
|
|
67
|
+
color: #050505;
|
|
68
|
+
font-size: calc(1.95 * 13px);
|
|
69
|
+
font-weight: 600;
|
|
70
|
+
display: block;
|
|
71
|
+
font-size: inherit;
|
|
72
|
+
font-weight: 500;
|
|
73
|
+
line-height: normal;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.emotion-4.emotion-4 {
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.emotion-6 {
|
|
81
|
+
grid-column: 1/-1;
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.emotion-6>div,
|
|
86
|
+
.emotion-6>fieldset {
|
|
87
|
+
padding-bottom: 0;
|
|
88
|
+
margin-bottom: 0;
|
|
89
|
+
max-width: 100%;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.emotion-6.emotion-6 .e1puf3u4 {
|
|
93
|
+
margin-bottom: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.emotion-6.emotion-6 .e1puf3u4 .e1puf3u3:last-child {
|
|
97
|
+
margin-bottom: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.emotion-6 .e1puf3u1 {
|
|
101
|
+
margin-bottom: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.emotion-6.emotion-6 .em5sgkm3 label {
|
|
105
|
+
line-height: 1.4em;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.emotion-6 .components-custom-select-control__label,
|
|
109
|
+
.emotion-6 .e1puf3u2 {
|
|
110
|
+
line-height: 1.4em;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.emotion-8 {
|
|
114
|
+
grid-column: 1/-1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.emotion-8>div,
|
|
118
|
+
.emotion-8>fieldset {
|
|
119
|
+
padding-bottom: 0;
|
|
120
|
+
margin-bottom: 0;
|
|
121
|
+
max-width: 100%;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.emotion-8.emotion-8 .e1puf3u4 {
|
|
125
|
+
margin-bottom: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.emotion-8.emotion-8 .e1puf3u4 .e1puf3u3:last-child {
|
|
129
|
+
margin-bottom: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.emotion-8 .e1puf3u1 {
|
|
133
|
+
margin-bottom: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.emotion-8.emotion-8 .em5sgkm3 label {
|
|
137
|
+
line-height: 1.4em;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.emotion-8 .components-custom-select-control__label,
|
|
141
|
+
.emotion-8 .e1puf3u2 {
|
|
142
|
+
line-height: 1.4em;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
<div>
|
|
146
|
+
<div
|
|
147
|
+
class="components-grid components-tools-panel emotion-0 emotion-1"
|
|
148
|
+
data-wp-c16t="true"
|
|
149
|
+
data-wp-component="ToolsPanel"
|
|
150
|
+
>
|
|
151
|
+
<div
|
|
152
|
+
class="components-flex components-h-stack components-tools-panel-header emotion-2 emotion-1"
|
|
153
|
+
data-wp-c16t="true"
|
|
154
|
+
data-wp-component="ToolsPanelHeader"
|
|
155
|
+
>
|
|
156
|
+
<h2
|
|
157
|
+
class="components-truncate components-text components-heading emotion-4 emotion-1"
|
|
158
|
+
data-wp-c16t="true"
|
|
159
|
+
data-wp-component="Heading"
|
|
160
|
+
>
|
|
161
|
+
Panel header
|
|
162
|
+
</h2>
|
|
163
|
+
<div
|
|
164
|
+
class="components-dropdown components-dropdown-menu"
|
|
165
|
+
tabindex="-1"
|
|
166
|
+
>
|
|
167
|
+
<button
|
|
168
|
+
aria-expanded="false"
|
|
169
|
+
aria-haspopup="true"
|
|
170
|
+
aria-label="View options"
|
|
171
|
+
class="components-button components-dropdown-menu__toggle is-small has-icon"
|
|
172
|
+
type="button"
|
|
173
|
+
>
|
|
174
|
+
<svg
|
|
175
|
+
aria-hidden="true"
|
|
176
|
+
focusable="false"
|
|
177
|
+
height="24"
|
|
178
|
+
viewBox="0 0 24 24"
|
|
179
|
+
width="24"
|
|
180
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
181
|
+
>
|
|
182
|
+
<path
|
|
183
|
+
d="M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"
|
|
184
|
+
/>
|
|
185
|
+
</svg>
|
|
186
|
+
</button>
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
<div
|
|
190
|
+
class="components-tools-panel-item emotion-6 emotion-1"
|
|
191
|
+
data-wp-c16t="true"
|
|
192
|
+
data-wp-component="ToolsPanelItem"
|
|
193
|
+
/>
|
|
194
|
+
<div
|
|
195
|
+
class="components-tools-panel-item first emotion-8 emotion-1"
|
|
196
|
+
data-wp-c16t="true"
|
|
197
|
+
data-wp-component="ToolsPanelItem"
|
|
198
|
+
>
|
|
199
|
+
<div>
|
|
200
|
+
Item 2
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
<div
|
|
204
|
+
class="components-tools-panel-item last emotion-8 emotion-1"
|
|
205
|
+
data-wp-c16t="true"
|
|
206
|
+
data-wp-component="ToolsPanelItem"
|
|
207
|
+
>
|
|
208
|
+
<div>
|
|
209
|
+
Item 3
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<div
|
|
213
|
+
class="components-tools-panel-item emotion-6 emotion-1"
|
|
214
|
+
data-wp-c16t="true"
|
|
215
|
+
data-wp-component="ToolsPanelItem"
|
|
216
|
+
/>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
`;
|