@wordpress/components 19.14.0 → 19.17.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 +138 -12
- package/build/angle-picker-control/index.js +2 -2
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +5 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +5 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/base-control/index.js +6 -3
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/styles/base-control-styles.js +8 -8
- package/build/base-control/styles/base-control-styles.js.map +1 -1
- package/build/border-control/border-control/component.js +38 -25
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/border-control/border-control/hook.js +4 -7
- package/build/border-control/border-control/hook.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +13 -7
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/hook.js +0 -4
- package/build/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build/border-control/styles.js +29 -60
- package/build/border-control/styles.js.map +1 -1
- package/build/box-control/all-input-control.js +2 -27
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +1 -1
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/index.js +11 -6
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/styles/box-control-styles.js +17 -9
- package/build/box-control/styles/box-control-styles.js.map +1 -1
- package/build/box-control/utils.js +37 -8
- package/build/box-control/utils.js.map +1 -1
- package/build/color-palette/index.js +14 -2
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/hex-input.js +7 -5
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/index.native.js +35 -34
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js +6 -3
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/styles.js +33 -50
- package/build/color-picker/styles.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +22 -31
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/combobox-control/index.js +33 -19
- package/build/combobox-control/index.js.map +1 -1
- package/build/combobox-control/styles.js +39 -0
- package/build/combobox-control/styles.js.map +1 -0
- package/build/custom-select-control/index.js +29 -9
- package/build/custom-select-control/index.js.map +1 -1
- package/build/date-time/time/index.js +6 -2
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/time/styles.js +17 -24
- package/build/date-time/time/styles.js.map +1 -1
- package/build/divider/component.js +0 -1
- package/build/divider/component.js.map +1 -1
- package/build/divider/index.js.map +1 -1
- package/build/divider/styles.js +5 -5
- package/build/divider/styles.js.map +1 -1
- package/build/dropdown/dropdown-content-wrapper.js +60 -0
- package/build/dropdown/dropdown-content-wrapper.js.map +1 -0
- package/build/dropdown/styles.js +42 -0
- package/build/dropdown/styles.js.map +1 -0
- package/build/dropdown/types.js +6 -0
- package/build/dropdown/types.js.map +1 -0
- package/build/dropdown-menu/index.js +5 -5
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +5 -5
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/elevation/component.js +15 -15
- package/build/elevation/component.js.map +1 -1
- package/build/elevation/hook.js +6 -18
- package/build/elevation/hook.js.map +1 -1
- package/build/elevation/index.js.map +1 -1
- package/build/elevation/styles.js +1 -1
- package/build/elevation/styles.js.map +1 -1
- package/build/external-link/index.js +7 -3
- package/build/external-link/index.js.map +1 -1
- package/build/flex/flex/component.js +20 -26
- package/build/flex/flex/component.js.map +1 -1
- package/build/flex/flex/hook.js +6 -16
- package/build/flex/flex/hook.js.map +1 -1
- package/build/flex/flex/index.js.map +1 -1
- package/build/flex/flex-block/component.js +18 -12
- package/build/flex/flex-block/component.js.map +1 -1
- package/build/flex/flex-block/hook.js +0 -4
- package/build/flex/flex-block/hook.js.map +1 -1
- package/build/flex/flex-block/index.js.map +1 -1
- package/build/flex/flex-item/component.js +18 -12
- package/build/flex/flex-item/component.js.map +1 -1
- package/build/flex/flex-item/hook.js +1 -5
- package/build/flex/flex-item/hook.js.map +1 -1
- package/build/flex/flex-item/index.js.map +1 -1
- package/build/flex/index.js.map +1 -1
- package/build/flex/styles.js +5 -5
- package/build/flex/styles.js.map +1 -1
- package/build/focal-point-picker/grid.js +2 -7
- package/build/focal-point-picker/grid.js.map +1 -1
- package/build/focal-point-picker/index.native.js +8 -8
- package/build/focal-point-picker/index.native.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +22 -22
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-style.js +5 -5
- package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +11 -12
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/font-size-picker/index.js +15 -6
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +28 -9
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/styles.js +40 -0
- package/build/form-token-field/styles.js.map +1 -0
- package/build/form-token-field/suggestions-list.js +21 -13
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/grid/component.js +7 -8
- package/build/grid/component.js.map +1 -1
- package/build/grid/hook.js +1 -5
- package/build/grid/hook.js.map +1 -1
- package/build/grid/index.js.map +1 -1
- package/build/grid/utils.js +4 -7
- package/build/grid/utils.js.map +1 -1
- package/build/h-stack/component.js +5 -9
- package/build/h-stack/component.js.map +1 -1
- package/build/h-stack/hook.js +8 -10
- package/build/h-stack/hook.js.map +1 -1
- package/build/h-stack/index.js.map +1 -1
- package/build/h-stack/utils.js +7 -18
- package/build/h-stack/utils.js.map +1 -1
- package/build/icon/index.js.map +1 -1
- package/build/index.js +31 -1
- package/build/index.js.map +1 -1
- package/build/input-control/index.js +7 -0
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-base.js +24 -3
- package/build/input-control/input-base.js.map +1 -1
- package/build/input-control/input-prefix-wrapper.js +54 -0
- package/build/input-control/input-prefix-wrapper.js.map +1 -0
- package/build/input-control/input-suffix-wrapper.js +54 -0
- package/build/input-control/input-suffix-wrapper.js.map +1 -0
- package/build/input-control/reducer/actions.js +3 -1
- package/build/input-control/reducer/actions.js.map +1 -1
- package/build/input-control/reducer/reducer.js +28 -11
- package/build/input-control/reducer/reducer.js.map +1 -1
- package/build/input-control/reducer/state.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +61 -42
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/menu-item/index.js +1 -3
- package/build/menu-item/index.js.map +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js +1 -1
- package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +23 -3
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/mobile/image/index.native.js +31 -5
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/link-picker/link-picker-screen.native.js +10 -4
- package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js +1 -7
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/picker/index.ios.js +16 -3
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/modal/index.js +17 -3
- package/build/modal/index.js.map +1 -1
- package/build/navigation/index.js +4 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base.js +3 -0
- package/build/navigation/item/base.js.map +1 -1
- package/build/placeholder/index.js +11 -14
- package/build/placeholder/index.js.map +1 -1
- package/build/placeholder/types.js +6 -0
- package/build/placeholder/types.js.map +1 -0
- package/build/popover/index.js +129 -75
- package/build/popover/index.js.map +1 -1
- package/build/radio-control/index.js +1 -3
- package/build/radio-control/index.js.map +1 -1
- package/build/range-control/index.js +54 -40
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/input-range.js +5 -7
- package/build/range-control/input-range.js.map +1 -1
- package/build/range-control/mark.js +5 -7
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/rail.js +10 -16
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +74 -74
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/range-control/tooltip.js +5 -7
- package/build/range-control/tooltip.js.map +1 -1
- package/build/range-control/types.js +6 -0
- package/build/range-control/types.js.map +1 -0
- package/build/range-control/utils.js +23 -30
- package/build/range-control/utils.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +2 -7
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.native.js +13 -2
- package/build/sandbox/index.native.js.map +1 -1
- package/build/scroll-lock/index.js +35 -6
- package/build/scroll-lock/index.js.map +1 -1
- package/build/scrollable/component.js +7 -8
- package/build/scrollable/component.js.map +1 -1
- package/build/scrollable/hook.js +0 -8
- package/build/scrollable/hook.js.map +1 -1
- package/build/scrollable/index.js.map +1 -1
- package/build/scrollable/styles.js +7 -7
- package/build/scrollable/styles.js.map +1 -1
- package/build/select-control/index.js +1 -3
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +32 -12
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/shortcut/index.js +6 -21
- package/build/shortcut/index.js.map +1 -1
- package/build/shortcut/types.js +6 -0
- package/build/shortcut/types.js.map +1 -0
- package/build/slot-fill/index.native.js +6 -8
- package/build/slot-fill/index.native.js.map +1 -1
- package/build/slot-fill/provider.js +4 -8
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +4 -8
- package/build/slot-fill/slot.js.map +1 -1
- package/build/spacer/component.js +3 -1
- package/build/spacer/component.js.map +1 -1
- package/build/spacer/hook.js +2 -2
- package/build/spacer/hook.js.map +1 -1
- package/build/spacer/index.js.map +1 -1
- package/build/style-provider/index.js +10 -7
- package/build/style-provider/index.js.map +1 -1
- package/build/style-provider/types.js +6 -0
- package/build/style-provider/types.js.map +1 -0
- package/build/swatch/index.js +2 -0
- package/build/swatch/index.js.map +1 -1
- package/build/swatch/types.js +6 -0
- package/build/swatch/types.js.map +1 -0
- package/build/text/hook.js +5 -8
- package/build/text/hook.js.map +1 -1
- package/build/text-highlight/index.js +22 -5
- package/build/text-highlight/index.js.map +1 -1
- package/build/text-highlight/types.js +6 -0
- package/build/text-highlight/types.js.map +1 -0
- package/build/tip/index.js +5 -11
- package/build/tip/index.js.map +1 -1
- package/build/tip/types.js +6 -0
- package/build/tip/types.js.map +1 -0
- package/build/toggle-group-control/toggle-group-control/component.js +4 -1
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +20 -4
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +7 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar-group/index.js +3 -3
- package/build/toolbar-group/index.js.map +1 -1
- package/build/tools-panel/styles.js +13 -10
- package/build/tools-panel/styles.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +1 -1
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tooltip/index.js +51 -14
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-select/index.js +4 -4
- package/build/tree-select/index.js.map +1 -1
- package/build/ui/context/use-context-system.js +7 -2
- package/build/ui/context/use-context-system.js.map +1 -1
- package/build/ui/tooltip/styles.js +4 -4
- package/build/ui/tooltip/styles.js.map +1 -1
- package/build/ui/utils/get-valid-children.js.map +1 -1
- package/build/ui/utils/space.js +7 -1
- package/build/ui/utils/space.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +38 -29
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/base-label.js +24 -0
- package/build/utils/base-label.js.map +1 -0
- package/build/utils/box-sizing.js +22 -0
- package/build/utils/box-sizing.js.map +1 -0
- package/build/utils/style-mixins.js +16 -0
- package/build/utils/style-mixins.js.map +1 -1
- package/build/visually-hidden/component.js +12 -13
- package/build/visually-hidden/component.js.map +1 -1
- package/build/visually-hidden/index.js.map +1 -1
- package/build/visually-hidden/styles.js +3 -1
- package/build/visually-hidden/styles.js.map +1 -1
- package/build/visually-hidden/types.js +6 -0
- package/build/visually-hidden/types.js.map +1 -0
- package/build-module/angle-picker-control/index.js +2 -2
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +3 -2
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +3 -2
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/base-control/index.js +7 -5
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/styles/base-control-styles.js +9 -9
- package/build-module/base-control/styles/base-control-styles.js.map +1 -1
- package/build-module/border-control/border-control/component.js +37 -25
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/border-control/border-control/hook.js +4 -7
- package/build-module/border-control/border-control/hook.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +12 -7
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/hook.js +0 -4
- package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
- package/build-module/border-control/styles.js +30 -54
- package/build-module/border-control/styles.js.map +1 -1
- package/build-module/box-control/all-input-control.js +3 -28
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -1
- package/build-module/box-control/axial-input-controls.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/styles/box-control-styles.js +18 -10
- package/build-module/box-control/styles/box-control-styles.js.map +1 -1
- package/build-module/box-control/utils.js +35 -7
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/color-palette/index.js +10 -1
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/hex-input.js +6 -4
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/index.native.js +36 -35
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +6 -3
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/styles.js +25 -48
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +22 -31
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/combobox-control/index.js +32 -19
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/combobox-control/styles.js +27 -0
- package/build-module/combobox-control/styles.js.map +1 -0
- package/build-module/custom-select-control/index.js +28 -11
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/date-time/time/index.js +6 -3
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time/styles.js +15 -21
- package/build-module/date-time/time/styles.js.map +1 -1
- package/build-module/divider/component.js +0 -1
- package/build-module/divider/component.js.map +1 -1
- package/build-module/divider/index.js.map +1 -1
- package/build-module/divider/styles.js +5 -5
- package/build-module/divider/styles.js.map +1 -1
- package/build-module/dropdown/dropdown-content-wrapper.js +47 -0
- package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -0
- package/build-module/dropdown/styles.js +31 -0
- package/build-module/dropdown/styles.js.map +1 -0
- package/build-module/dropdown/types.js +2 -0
- package/build-module/dropdown/types.js.map +1 -0
- package/build-module/dropdown-menu/index.js +5 -4
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +5 -4
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/elevation/component.js +15 -15
- package/build-module/elevation/component.js.map +1 -1
- package/build-module/elevation/hook.js +6 -18
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/elevation/index.js.map +1 -1
- package/build-module/elevation/styles.js +1 -1
- package/build-module/elevation/styles.js.map +1 -1
- package/build-module/external-link/index.js +7 -2
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/flex/flex/component.js +20 -26
- package/build-module/flex/flex/component.js.map +1 -1
- package/build-module/flex/flex/hook.js +6 -15
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/flex/flex/index.js.map +1 -1
- package/build-module/flex/flex-block/component.js +18 -12
- package/build-module/flex/flex-block/component.js.map +1 -1
- package/build-module/flex/flex-block/hook.js +0 -4
- package/build-module/flex/flex-block/hook.js.map +1 -1
- package/build-module/flex/flex-block/index.js.map +1 -1
- package/build-module/flex/flex-item/component.js +18 -12
- package/build-module/flex/flex-item/component.js.map +1 -1
- package/build-module/flex/flex-item/hook.js +1 -5
- package/build-module/flex/flex-item/hook.js.map +1 -1
- package/build-module/flex/flex-item/index.js.map +1 -1
- package/build-module/flex/index.js.map +1 -1
- package/build-module/flex/styles.js +5 -5
- package/build-module/flex/styles.js.map +1 -1
- package/build-module/focal-point-picker/grid.js +2 -6
- package/build-module/focal-point-picker/grid.js.map +1 -1
- package/build-module/focal-point-picker/index.native.js +8 -8
- package/build-module/focal-point-picker/index.native.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +22 -22
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-style.js +5 -5
- package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +11 -12
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/font-size-picker/index.js +14 -6
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-token-field/index.js +25 -8
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/styles.js +28 -0
- package/build-module/form-token-field/styles.js.map +1 -0
- package/build-module/form-token-field/suggestions-list.js +21 -13
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/grid/component.js +7 -8
- package/build-module/grid/component.js.map +1 -1
- package/build-module/grid/hook.js +1 -5
- package/build-module/grid/hook.js.map +1 -1
- package/build-module/grid/index.js.map +1 -1
- package/build-module/grid/utils.js +3 -8
- package/build-module/grid/utils.js.map +1 -1
- package/build-module/h-stack/component.js +3 -7
- package/build-module/h-stack/component.js.map +1 -1
- package/build-module/h-stack/hook.js +10 -12
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/h-stack/index.js.map +1 -1
- package/build-module/h-stack/utils.js +7 -19
- package/build-module/h-stack/utils.js.map +1 -1
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +4 -1
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/index.js +6 -0
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-base.js +25 -5
- package/build-module/input-control/input-base.js.map +1 -1
- package/build-module/input-control/input-prefix-wrapper.js +41 -0
- package/build-module/input-control/input-prefix-wrapper.js.map +1 -0
- package/build-module/input-control/input-suffix-wrapper.js +41 -0
- package/build-module/input-control/input-suffix-wrapper.js.map +1 -0
- package/build-module/input-control/reducer/actions.js +1 -0
- package/build-module/input-control/reducer/actions.js.map +1 -1
- package/build-module/input-control/reducer/reducer.js +28 -11
- package/build-module/input-control/reducer/reducer.js.map +1 -1
- package/build-module/input-control/reducer/state.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +58 -42
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/menu-item/index.js +1 -2
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/mobile/focal-point-settings-panel/index.native.js +2 -2
- package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +23 -4
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +33 -8
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/link-picker/link-picker-screen.native.js +11 -4
- package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js +1 -6
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js +14 -3
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/modal/index.js +19 -5
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigation/index.js +4 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base.js +3 -0
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/placeholder/index.js +10 -15
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/placeholder/types.js +2 -0
- package/build-module/placeholder/types.js.map +1 -0
- package/build-module/popover/index.js +128 -75
- package/build-module/popover/index.js.map +1 -1
- package/build-module/radio-control/index.js +1 -2
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/range-control/index.js +54 -40
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/input-range.js +5 -6
- package/build-module/range-control/input-range.js.map +1 -1
- package/build-module/range-control/mark.js +5 -6
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/rail.js +10 -15
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +74 -76
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/range-control/tooltip.js +5 -6
- package/build-module/range-control/tooltip.js.map +1 -1
- package/build-module/range-control/types.js +2 -0
- package/build-module/range-control/types.js.map +1 -0
- package/build-module/range-control/utils.js +23 -30
- package/build-module/range-control/utils.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +2 -6
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.native.js +13 -3
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/scroll-lock/index.js +32 -6
- package/build-module/scroll-lock/index.js.map +1 -1
- package/build-module/scrollable/component.js +7 -8
- package/build-module/scrollable/component.js.map +1 -1
- package/build-module/scrollable/hook.js +0 -8
- package/build-module/scrollable/hook.js.map +1 -1
- package/build-module/scrollable/index.js.map +1 -1
- package/build-module/scrollable/styles.js +7 -7
- package/build-module/scrollable/styles.js.map +1 -1
- package/build-module/select-control/index.js +1 -2
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +32 -12
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/shortcut/index.js +6 -20
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/shortcut/types.js +2 -0
- package/build-module/shortcut/types.js.map +1 -0
- package/build-module/slot-fill/index.native.js +6 -7
- package/build-module/slot-fill/index.native.js.map +1 -1
- package/build-module/slot-fill/provider.js +4 -7
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +4 -7
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/spacer/component.js +3 -1
- package/build-module/spacer/component.js.map +1 -1
- package/build-module/spacer/hook.js +2 -2
- package/build-module/spacer/hook.js.map +1 -1
- package/build-module/spacer/index.js.map +1 -1
- package/build-module/style-provider/index.js +10 -5
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/style-provider/types.js +2 -0
- package/build-module/style-provider/types.js.map +1 -0
- package/build-module/swatch/index.js +2 -0
- package/build-module/swatch/index.js.map +1 -1
- package/build-module/swatch/types.js +2 -0
- package/build-module/swatch/types.js.map +1 -0
- package/build-module/text/hook.js +5 -7
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text-highlight/index.js +23 -6
- package/build-module/text-highlight/index.js.map +1 -1
- package/build-module/text-highlight/types.js +2 -0
- package/build-module/text-highlight/types.js.map +1 -0
- package/build-module/tip/index.js +6 -10
- package/build-module/tip/index.js.map +1 -1
- package/build-module/tip/types.js +2 -0
- package/build-module/tip/types.js.map +1 -0
- package/build-module/toggle-group-control/toggle-group-control/component.js +4 -1
- 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 +15 -3
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +6 -7
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar-group/index.js +3 -2
- package/build-module/toolbar-group/index.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/hook.js +1 -1
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tooltip/index.js +53 -16
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-select/index.js +5 -5
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/ui/context/use-context-system.js +7 -2
- package/build-module/ui/context/use-context-system.js.map +1 -1
- package/build-module/ui/tooltip/styles.js +4 -4
- package/build-module/ui/tooltip/styles.js.map +1 -1
- package/build-module/ui/utils/get-valid-children.js.map +1 -1
- package/build-module/ui/utils/space.js +7 -1
- package/build-module/ui/utils/space.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +39 -30
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/base-label.js +18 -0
- package/build-module/utils/base-label.js.map +1 -0
- package/build-module/utils/box-sizing.js +16 -0
- package/build-module/utils/box-sizing.js.map +1 -0
- package/build-module/utils/style-mixins.js +2 -0
- package/build-module/utils/style-mixins.js.map +1 -1
- package/build-module/visually-hidden/component.js +12 -13
- package/build-module/visually-hidden/component.js.map +1 -1
- package/build-module/visually-hidden/index.js.map +1 -1
- package/build-module/visually-hidden/styles.js +3 -1
- package/build-module/visually-hidden/styles.js.map +1 -1
- package/build-module/visually-hidden/types.js +2 -0
- package/build-module/visually-hidden/types.js.map +1 -0
- package/build-style/style-rtl.css +75 -75
- package/build-style/style.css +77 -73
- package/build-types/base-control/index.d.ts +4 -3
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.d.ts +1 -1
- package/build-types/base-control/stories/index.d.ts.map +1 -1
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/base-control/types.d.ts +0 -1
- package/build-types/base-control/types.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +2 -2
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +0 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/stories/index.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +1 -4
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -1
- package/build-types/color-palette/index.d.ts +1 -0
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-picker/color-display.d.ts +13 -0
- package/build-types/color-picker/color-display.d.ts.map +1 -0
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +30 -31
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/date-time/time/index.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +0 -4
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +2 -3
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/index.d.ts +1 -1
- package/build-types/divider/index.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +6 -2
- package/build-types/divider/styles.d.ts.map +1 -1
- package/build-types/divider/test/index.d.ts +2 -0
- package/build-types/divider/test/index.d.ts.map +1 -0
- package/build-types/divider/types.d.ts +18 -10
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts +23 -0
- package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -0
- package/build-types/dropdown/styles.d.ts +7 -0
- package/build-types/dropdown/styles.d.ts.map +1 -0
- package/build-types/dropdown/types.d.ts +9 -0
- package/build-types/dropdown/types.d.ts.map +1 -0
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/elevation/component.d.ts +11 -10
- package/build-types/elevation/component.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +6 -7
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/elevation/index.d.ts +2 -2
- package/build-types/elevation/index.d.ts.map +1 -1
- package/build-types/elevation/stories/index.d.ts +22 -0
- package/build-types/elevation/stories/index.d.ts.map +1 -0
- package/build-types/elevation/styles.d.ts +1 -1
- package/build-types/elevation/styles.d.ts.map +1 -1
- package/build-types/elevation/test/index.d.ts +2 -0
- package/build-types/elevation/test/index.d.ts.map +1 -0
- package/build-types/elevation/types.d.ts +12 -19
- package/build-types/elevation/types.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/flex/flex/component.d.ts +16 -21
- package/build-types/flex/flex/component.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +5 -2
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex/index.d.ts +2 -2
- package/build-types/flex/flex/index.d.ts.map +1 -1
- package/build-types/flex/flex-block/component.d.ts +14 -7
- package/build-types/flex/flex-block/component.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +6 -3
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/index.d.ts +2 -2
- package/build-types/flex/flex-block/index.d.ts.map +1 -1
- package/build-types/flex/flex-item/component.d.ts +14 -7
- package/build-types/flex/flex-item/component.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +6 -3
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/index.d.ts +2 -2
- package/build-types/flex/flex-item/index.d.ts.map +1 -1
- package/build-types/flex/index.d.ts +3 -3
- package/build-types/flex/index.d.ts.map +1 -1
- package/build-types/flex/stories/index.d.ts +13 -0
- package/build-types/flex/stories/index.d.ts.map +1 -0
- package/build-types/flex/styles.d.ts +5 -5
- package/build-types/flex/styles.d.ts.map +1 -1
- package/build-types/flex/test/index.d.ts +2 -0
- package/build-types/flex/test/index.d.ts.map +1 -0
- package/build-types/flex/types.d.ts +17 -10
- package/build-types/flex/types.d.ts.map +1 -1
- package/build-types/flyout/context.d.ts +6 -0
- package/build-types/flyout/context.d.ts.map +1 -0
- package/build-types/flyout/flyout/component.d.ts +21 -0
- package/build-types/flyout/flyout/component.d.ts.map +1 -0
- package/build-types/flyout/flyout/hook.d.ts +270 -0
- package/build-types/flyout/flyout/hook.d.ts.map +1 -0
- package/build-types/flyout/flyout/index.d.ts +3 -0
- package/build-types/flyout/flyout/index.d.ts.map +1 -0
- package/build-types/flyout/flyout-content/component.d.ts +3 -0
- package/build-types/flyout/flyout-content/component.d.ts.map +1 -0
- package/build-types/flyout/flyout-content/index.d.ts +2 -0
- package/build-types/flyout/flyout-content/index.d.ts.map +1 -0
- package/build-types/flyout/index.d.ts +2 -0
- package/build-types/flyout/index.d.ts.map +1 -0
- package/build-types/flyout/styles.d.ts +22 -0
- package/build-types/flyout/styles.d.ts.map +1 -0
- package/build-types/flyout/types.d.ts +80 -0
- package/build-types/flyout/types.d.ts.map +1 -0
- package/build-types/flyout/utils.d.ts +8 -0
- package/build-types/flyout/utils.d.ts.map +1 -0
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.d.ts +6 -0
- package/build-types/form-token-field/stories/index.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +14 -0
- package/build-types/form-token-field/styles.d.ts.map +1 -0
- package/build-types/form-token-field/suggestions-list.d.ts +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +22 -3
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/grid/component.d.ts +3 -3
- package/build-types/grid/component.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +5 -2
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/grid/index.d.ts +2 -2
- package/build-types/grid/index.d.ts.map +1 -1
- package/build-types/grid/stories/index.d.ts +9 -0
- package/build-types/grid/stories/index.d.ts.map +1 -0
- package/build-types/grid/test/grid.d.ts +2 -0
- package/build-types/grid/test/grid.d.ts.map +1 -0
- package/build-types/grid/types.d.ts +16 -15
- package/build-types/grid/types.d.ts.map +1 -1
- package/build-types/grid/utils.d.ts +50 -69
- package/build-types/grid/utils.d.ts.map +1 -1
- package/build-types/h-stack/component.d.ts +3 -2
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +5 -3
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/h-stack/index.d.ts +2 -2
- package/build-types/h-stack/index.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.d.ts +9 -0
- package/build-types/h-stack/stories/index.d.ts.map +1 -0
- package/build-types/h-stack/test/index.d.ts +2 -0
- package/build-types/h-stack/test/index.d.ts.map +1 -0
- package/build-types/h-stack/utils.d.ts +8 -4
- package/build-types/h-stack/utils.d.ts.map +1 -1
- package/build-types/icon/index.d.ts +1 -1
- 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 +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts +19 -0
- package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -0
- package/build-types/input-control/input-suffix-wrapper.d.ts +19 -0
- package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -0
- package/build-types/input-control/reducer/actions.d.ts +3 -1
- package/build-types/input-control/reducer/actions.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts +2 -2
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/reducer/state.d.ts +2 -2
- package/build-types/input-control/reducer/state.d.ts.map +1 -1
- package/build-types/input-control/stories/index.d.ts +10 -0
- package/build-types/input-control/stories/index.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +21 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +45 -3
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/placeholder/index.d.ts +16 -0
- package/build-types/placeholder/index.d.ts.map +1 -0
- package/build-types/placeholder/stories/index.d.ts +12 -0
- package/build-types/placeholder/stories/index.d.ts.map +1 -0
- package/build-types/placeholder/types.d.ts +47 -0
- package/build-types/placeholder/types.d.ts.map +1 -0
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +70 -0
- package/build-types/popover/utils.d.ts.map +1 -0
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +54 -29
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +7 -10
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts +4 -7
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/rail.d.ts +4 -9
- package/build-types/range-control/rail.d.ts.map +1 -1
- package/build-types/range-control/stories/index.d.ts +48 -0
- package/build-types/range-control/stories/index.d.ts.map +1 -0
- package/build-types/range-control/styles/range-control-styles.d.ts +32 -40
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/test/index.d.ts +2 -0
- package/build-types/range-control/test/index.d.ts.map +1 -0
- package/build-types/range-control/tooltip.d.ts +4 -11
- package/build-types/range-control/tooltip.d.ts.map +1 -1
- package/build-types/range-control/types.d.ts +304 -0
- package/build-types/range-control/types.d.ts.map +1 -0
- package/build-types/range-control/utils.d.ts +15 -33
- package/build-types/range-control/utils.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/scroll-lock/index.d.ts +32 -3
- package/build-types/scroll-lock/index.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.d.ts +9 -0
- package/build-types/scroll-lock/stories/index.d.ts.map +1 -0
- package/build-types/scroll-lock/test/index.d.ts +2 -0
- package/build-types/scroll-lock/test/index.d.ts.map +1 -0
- package/build-types/scrollable/component.d.ts +3 -3
- package/build-types/scrollable/component.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +5 -2
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/scrollable/index.d.ts +2 -2
- package/build-types/scrollable/index.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.d.ts +9 -0
- package/build-types/scrollable/stories/index.d.ts.map +1 -0
- package/build-types/scrollable/styles.d.ts +7 -7
- package/build-types/scrollable/styles.d.ts.map +1 -1
- package/build-types/scrollable/test/index.d.ts +2 -0
- package/build-types/scrollable/test/index.d.ts.map +1 -0
- package/build-types/scrollable/types.d.ts +9 -6
- package/build-types/scrollable/types.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
- 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/shortcut/index.d.ts +5 -24
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/shortcut/test/index.d.ts +2 -0
- package/build-types/shortcut/test/index.d.ts.map +1 -0
- package/build-types/shortcut/types.d.ts +14 -0
- package/build-types/shortcut/types.d.ts.map +1 -0
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts +5 -3
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +2 -2
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spacer/index.d.ts +1 -1
- package/build-types/spacer/index.d.ts.map +1 -1
- package/build-types/spacer/test/index.d.ts +2 -0
- package/build-types/spacer/test/index.d.ts.map +1 -0
- package/build-types/spacer/types.d.ts +41 -29
- package/build-types/spacer/types.d.ts.map +1 -1
- package/build-types/style-provider/index.d.ts +7 -4
- package/build-types/style-provider/index.d.ts.map +1 -1
- package/build-types/style-provider/types.d.ts +15 -0
- package/build-types/style-provider/types.d.ts.map +1 -0
- package/build-types/swatch/index.d.ts +5 -0
- package/build-types/swatch/index.d.ts.map +1 -0
- package/build-types/swatch/types.d.ts +11 -0
- package/build-types/swatch/types.d.ts.map +1 -0
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +23 -0
- package/build-types/text-highlight/index.d.ts.map +1 -0
- package/build-types/text-highlight/stories/index.d.ts +12 -0
- package/build-types/text-highlight/stories/index.d.ts.map +1 -0
- package/build-types/text-highlight/test/index.d.ts +2 -0
- package/build-types/text-highlight/test/index.d.ts.map +1 -0
- package/build-types/text-highlight/types.d.ts +17 -0
- package/build-types/text-highlight/types.d.ts.map +1 -0
- package/build-types/tip/index.d.ts +5 -14
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/tip/stories/index.d.ts +12 -0
- package/build-types/tip/stories/index.d.ts.map +1 -0
- package/build-types/tip/types.d.ts +11 -0
- package/build-types/tip/types.d.ts.map +1 -0
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -1
- 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-base/styles.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +6 -0
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts +1 -1
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +1 -0
- package/build-types/tree-select/types.d.ts.map +1 -1
- package/build-types/ui/context/use-context-system.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group.d.ts +1 -1
- package/build-types/ui/form-group/types.d.ts +1 -1
- package/build-types/ui/form-group/types.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +3 -3
- package/build-types/ui/tooltip/styles.d.ts.map +1 -1
- package/build-types/ui/utils/get-valid-children.d.ts +2 -2
- package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
- package/build-types/ui/utils/space.d.ts +7 -1
- package/build-types/ui/utils/space.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +3 -3
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +0 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +2 -8
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/base-label.d.ts +2 -0
- package/build-types/utils/base-label.d.ts.map +1 -0
- package/build-types/utils/box-sizing.d.ts +2 -0
- package/build-types/utils/box-sizing.d.ts.map +1 -0
- package/build-types/utils/hooks/use-combined-ref.d.ts +8 -0
- package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -0
- package/build-types/utils/style-mixins.d.ts +2 -0
- package/build-types/visually-hidden/component.d.ts +8 -10
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/visually-hidden/index.d.ts +1 -1
- package/build-types/visually-hidden/index.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.d.ts +14 -0
- package/build-types/visually-hidden/stories/index.d.ts.map +1 -0
- package/build-types/visually-hidden/styles.d.ts +5 -2
- package/build-types/visually-hidden/styles.d.ts.map +1 -1
- package/build-types/visually-hidden/test/index.d.ts +2 -0
- package/build-types/visually-hidden/test/index.d.ts.map +1 -0
- package/build-types/visually-hidden/types.d.ts +11 -0
- package/build-types/visually-hidden/types.d.ts.map +1 -0
- package/package.json +17 -17
- package/src/angle-picker-control/index.js +1 -2
- package/src/autocomplete/get-default-use-items.js +3 -2
- package/src/autocomplete/index.js +3 -2
- package/src/base-control/index.tsx +5 -3
- package/src/base-control/stories/index.tsx +1 -0
- package/src/base-control/styles/base-control-styles.ts +10 -1
- package/src/base-control/types.ts +0 -1
- package/src/border-control/border-control/component.tsx +41 -32
- package/src/border-control/border-control/hook.ts +5 -10
- package/src/border-control/border-control-dropdown/component.tsx +50 -45
- package/src/border-control/border-control-dropdown/hook.ts +0 -5
- package/src/border-control/stories/index.tsx +3 -0
- package/src/border-control/styles.ts +25 -70
- package/src/border-control/test/index.js +19 -8
- package/src/box-control/all-input-control.js +3 -27
- package/src/box-control/axial-input-controls.js +1 -1
- package/src/box-control/index.js +6 -7
- package/src/box-control/styles/box-control-styles.js +1 -2
- package/src/box-control/utils.js +38 -13
- package/src/button/README.md +1 -1
- package/src/card/test/__snapshots__/index.js.snap +8 -8
- package/src/color-palette/index.js +19 -8
- package/src/color-palette/style.scss +5 -0
- package/src/color-palette/test/utils.ts +19 -1
- package/src/color-picker/hex-input.tsx +5 -3
- package/src/color-picker/index.native.js +20 -27
- package/src/color-picker/input-with-slider.tsx +4 -1
- package/src/color-picker/styles.ts +3 -16
- package/src/color-picker/use-deprecated-props.ts +24 -43
- package/src/combobox-control/README.md +7 -0
- package/src/combobox-control/index.js +34 -17
- package/src/combobox-control/stories/index.js +51 -6
- package/src/combobox-control/style.scss +1 -1
- package/src/combobox-control/styles.ts +27 -0
- package/src/confirm-dialog/README.md +1 -1
- package/src/custom-gradient-picker/style.scss +0 -12
- package/src/custom-select-control/index.js +47 -28
- package/src/custom-select-control/stories/index.js +7 -2
- package/src/custom-select-control/style.scss +5 -34
- package/src/date-time/time/index.tsx +7 -5
- package/src/date-time/time/styles.ts +3 -6
- package/src/divider/README.md +12 -5
- package/src/divider/component.tsx +2 -3
- package/src/divider/index.ts +1 -1
- package/src/divider/stories/index.tsx +4 -4
- package/src/divider/styles.ts +7 -7
- package/src/divider/test/__snapshots__/{index.js.snap → index.tsx.snap} +7 -7
- package/src/divider/test/index.tsx +40 -0
- package/src/divider/types.ts +21 -15
- package/src/draggable/README.md +1 -1
- package/src/dropdown/dropdown-content-wrapper.tsx +59 -0
- package/src/dropdown/stories/index.js +60 -69
- package/src/dropdown/styles.ts +38 -0
- package/src/dropdown/types.ts +8 -0
- package/src/dropdown-menu/index.js +3 -4
- package/src/dropdown-menu/index.native.js +3 -5
- package/src/elevation/README.md +16 -14
- package/src/elevation/component.tsx +48 -0
- package/src/elevation/{hook.js → hook.ts} +23 -20
- package/src/elevation/{index.js → index.ts} +0 -0
- package/src/elevation/stories/index.tsx +85 -0
- package/src/elevation/{styles.js → styles.ts} +0 -0
- package/src/elevation/test/__snapshots__/{index.js.snap → index.tsx.snap} +19 -13
- package/src/elevation/test/index.tsx +64 -0
- package/src/elevation/types.ts +12 -19
- package/src/external-link/index.tsx +20 -4
- package/src/flex/flex/README.md +20 -18
- package/src/flex/flex/component.tsx +59 -0
- package/src/flex/flex/{hook.js → hook.ts} +14 -13
- package/src/flex/flex/{index.js → index.ts} +0 -0
- package/src/flex/flex-block/README.md +3 -7
- package/src/flex/flex-block/component.tsx +41 -0
- package/src/flex/flex-block/{hook.js → hook.ts} +5 -5
- package/src/flex/flex-block/{index.js → index.ts} +0 -0
- package/src/flex/flex-item/README.md +6 -9
- package/src/flex/flex-item/component.tsx +41 -0
- package/src/flex/flex-item/{hook.js → hook.ts} +10 -7
- package/src/flex/flex-item/{index.js → index.ts} +0 -0
- package/src/flex/{index.js → index.ts} +0 -0
- package/src/flex/stories/index.tsx +81 -0
- package/src/flex/{styles.js → styles.ts} +0 -0
- package/src/flex/test/__snapshots__/{index.js.snap → index.tsx.snap} +49 -9
- package/src/flex/test/index.tsx +84 -0
- package/src/flex/types.ts +17 -10
- package/src/focal-point-picker/grid.js +2 -5
- package/src/focal-point-picker/index.native.js +8 -8
- package/src/focal-point-picker/styles/focal-point-picker-style.js +0 -5
- package/src/focal-point-picker/styles/focal-point-style.js +0 -1
- package/src/focal-point-picker/tooltip/index.native.js +10 -11
- package/src/font-size-picker/index.js +18 -7
- package/src/font-size-picker/stories/index.js +6 -0
- package/src/form-token-field/README.md +2 -1
- package/src/form-token-field/index.tsx +50 -26
- package/src/form-token-field/stories/index.tsx +14 -0
- package/src/form-token-field/style.scss +2 -12
- package/src/form-token-field/styles.ts +32 -0
- package/src/form-token-field/suggestions-list.tsx +23 -16
- package/src/form-token-field/test/index.js +1 -1
- package/src/form-token-field/types.ts +23 -2
- package/src/grid/README.md +33 -19
- package/src/grid/{component.js → component.tsx} +13 -9
- package/src/grid/{hook.js → hook.ts} +5 -5
- package/src/grid/{index.js → index.ts} +0 -0
- package/src/grid/stories/index.tsx +72 -0
- package/src/grid/test/{grid.js → grid.tsx} +4 -4
- package/src/grid/types.ts +16 -17
- package/src/grid/{utils.js → utils.ts} +9 -7
- package/src/guide/style.scss +1 -0
- package/src/h-stack/{component.js → component.tsx} +8 -8
- package/src/h-stack/{hook.js → hook.tsx} +21 -16
- package/src/h-stack/{index.js → index.ts} +0 -0
- package/src/h-stack/stories/index.tsx +92 -0
- package/src/h-stack/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/h-stack/test/{index.js → index.tsx} +0 -0
- package/src/h-stack/{utils.js → utils.ts} +14 -14
- package/src/higher-order/navigate-regions/README.md +4 -1
- package/src/icon/index.tsx +1 -1
- package/src/index.js +7 -1
- package/src/input-control/index.tsx +6 -0
- package/src/input-control/input-base.tsx +28 -13
- package/src/input-control/input-prefix-wrapper.tsx +48 -0
- package/src/input-control/input-suffix-wrapper.tsx +48 -0
- package/src/input-control/reducer/actions.ts +3 -1
- package/src/input-control/reducer/reducer.ts +27 -10
- package/src/input-control/reducer/state.ts +7 -2
- package/src/input-control/stories/index.tsx +15 -2
- package/src/input-control/styles/input-control-styles.tsx +28 -12
- package/src/input-control/test/index.js +20 -4
- package/src/input-control/types.ts +52 -3
- package/src/menu-item/index.js +1 -2
- package/src/mobile/focal-point-settings-panel/index.native.js +2 -2
- package/src/mobile/global-styles-context/utils.native.js +21 -4
- package/src/mobile/image/index.native.js +38 -7
- package/src/mobile/link-picker/link-picker-screen.native.js +12 -4
- package/src/mobile/media-edit/index.native.js +2 -7
- package/src/mobile/picker/index.ios.js +16 -0
- package/src/mobile/picker/styles.native.scss +8 -0
- package/src/modal/index.js +21 -2
- package/src/modal/stories/index.js +17 -1
- package/src/modal/style.scss +14 -19
- package/src/navigation/index.js +3 -0
- package/src/navigation/item/base.js +2 -1
- package/src/panel/style.scss +4 -1
- package/src/placeholder/README.md +49 -9
- package/src/placeholder/{index.js → index.tsx} +27 -23
- package/src/placeholder/stories/index.tsx +64 -0
- package/src/placeholder/style.scss +0 -4
- package/src/placeholder/types.ts +48 -0
- package/src/popover/README.md +9 -2
- package/src/popover/index.js +160 -79
- package/src/popover/stories/index.js +199 -96
- package/src/popover/style.scss +61 -7
- package/src/popover/test/index.js +23 -1
- package/src/radio-control/index.tsx +1 -2
- package/src/range-control/README.md +108 -80
- package/src/range-control/{index.js → index.tsx} +78 -48
- package/src/range-control/{input-range.js → input-range.tsx} +11 -7
- package/src/range-control/{mark.js → mark.tsx} +15 -9
- package/src/range-control/{rail.js → rail.tsx} +40 -23
- package/src/range-control/stories/index.tsx +244 -0
- package/src/range-control/styles/{range-control-styles.js → range-control-styles.ts} +28 -36
- package/src/range-control/test/index.tsx +341 -0
- package/src/range-control/{tooltip.js → tooltip.tsx} +19 -14
- package/src/range-control/types.ts +328 -0
- package/src/range-control/utils.ts +135 -0
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +1 -1
- package/src/resizable-box/resize-tooltip/utils.ts +2 -3
- package/src/sandbox/index.native.js +14 -1
- package/src/scroll-lock/README.md +1 -1
- package/src/scroll-lock/{index.js → index.tsx} +34 -7
- package/src/scroll-lock/stories/index.tsx +96 -0
- package/src/scroll-lock/test/index.tsx +26 -0
- package/src/scrollable/README.md +14 -8
- package/src/scrollable/{component.js → component.tsx} +13 -10
- package/src/scrollable/{hook.js → hook.ts} +5 -7
- package/src/scrollable/{index.js → index.ts} +0 -0
- package/src/scrollable/stories/{index.js → index.tsx} +29 -34
- package/src/scrollable/{styles.js → styles.ts} +0 -0
- package/src/scrollable/test/__snapshots__/{index.js.snap → index.tsx.snap} +1 -0
- package/src/scrollable/test/index.tsx +34 -0
- package/src/scrollable/types.ts +10 -5
- package/src/select-control/index.tsx +1 -2
- package/src/select-control/styles/select-control-styles.ts +33 -10
- package/src/select-control/test/select-control.tsx +22 -15
- package/src/select-control/types.ts +1 -0
- package/src/shortcut/index.tsx +32 -0
- package/src/shortcut/test/__snapshots__/index.tsx.snap +15 -0
- package/src/shortcut/test/index.tsx +41 -0
- package/src/shortcut/types.ts +10 -0
- package/src/slot-fill/index.native.js +2 -7
- package/src/slot-fill/provider.js +3 -7
- package/src/slot-fill/slot.js +21 -24
- package/src/spacer/README.md +43 -37
- package/src/spacer/component.tsx +5 -3
- package/src/spacer/hook.ts +4 -2
- package/src/spacer/index.ts +1 -1
- package/src/spacer/test/__snapshots__/{index.js.snap → index.tsx.snap} +1 -0
- package/src/spacer/test/index.tsx +149 -0
- package/src/spacer/types.ts +41 -29
- package/src/style-provider/index.tsx +41 -0
- package/src/style-provider/types.ts +15 -0
- package/src/swatch/{index.js → index.tsx} +4 -1
- package/src/swatch/types.ts +11 -0
- package/src/tab-panel/README.md +1 -1
- package/src/text/hook.js +5 -3
- package/src/text-highlight/README.md +6 -6
- package/src/text-highlight/index.tsx +49 -0
- package/src/text-highlight/stories/index.tsx +33 -0
- package/src/text-highlight/test/index.tsx +93 -0
- package/src/text-highlight/types.ts +16 -0
- package/src/tip/index.tsx +22 -0
- package/src/tip/stories/index.tsx +33 -0
- package/src/tip/types.ts +11 -0
- package/src/toggle-group-control/stories/index.js +19 -3
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +28 -4
- package/src/toggle-group-control/toggle-group-control/component.tsx +3 -3
- package/src/toggle-group-control/toggle-group-control/styles.ts +22 -2
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -4
- package/src/toggle-group-control/types.ts +6 -0
- package/src/toolbar-group/index.js +1 -2
- package/src/tools-panel/styles.ts +7 -16
- package/src/tools-panel/test/__snapshots__/index.js.snap +2 -11
- package/src/tools-panel/tools-panel/README.md +94 -21
- package/src/tools-panel/tools-panel/hook.ts +6 -1
- package/src/tooltip/index.js +56 -10
- package/src/tooltip/stories/index.js +28 -13
- package/src/tooltip/style.scss +1 -1
- package/src/tree-select/index.tsx +7 -6
- package/src/tree-select/types.ts +4 -0
- package/src/ui/context/test/context-system-provider.js +101 -1
- package/src/ui/context/use-context-system.js +7 -2
- package/src/ui/form-group/types.ts +1 -1
- package/src/ui/tooltip/styles.js +1 -0
- package/src/ui/tooltip/test/__snapshots__/index.js.snap +1 -0
- package/src/ui/utils/get-valid-children.ts +4 -2
- package/src/ui/utils/space.ts +7 -1
- package/src/unit-control/stories/index.tsx +16 -23
- package/src/unit-control/styles/unit-control-styles.ts +100 -46
- package/src/unit-control/test/__snapshots__/index.tsx.snap +4 -4
- package/src/unit-control/types.ts +2 -8
- package/src/utils/base-label.ts +13 -0
- package/src/utils/box-sizing.ts +14 -0
- package/src/utils/style-mixins.js +2 -0
- package/src/visually-hidden/{component.js → component.tsx} +23 -15
- package/src/visually-hidden/{index.js → index.ts} +0 -0
- package/src/visually-hidden/stories/index.tsx +66 -0
- package/src/visually-hidden/{styles.js → styles.ts} +6 -2
- package/src/visually-hidden/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- package/src/visually-hidden/test/index.tsx +17 -0
- package/src/visually-hidden/types.ts +11 -0
- package/tsconfig.json +3 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/divider/test/index.js +0 -41
- package/src/elevation/component.js +0 -43
- package/src/elevation/stories/index.js +0 -148
- package/src/elevation/test/index.js +0 -51
- package/src/flex/flex/component.js +0 -60
- package/src/flex/flex-block/component.js +0 -30
- package/src/flex/flex-item/component.js +0 -30
- package/src/flex/stories/index.js +0 -29
- package/src/flex/test/index.js +0 -77
- package/src/grid/stories/index.js +0 -49
- package/src/h-stack/stories/index.js +0 -22
- package/src/placeholder/stories/index.js +0 -44
- package/src/popover/stories/_utils.js +0 -64
- package/src/range-control/stories/index.js +0 -180
- package/src/range-control/test/index.js +0 -320
- package/src/range-control/utils.js +0 -131
- package/src/scroll-lock/stories/index.js +0 -71
- package/src/scroll-lock/test/index.js +0 -53
- package/src/scrollable/test/index.js +0 -31
- package/src/shortcut/index.js +0 -41
- package/src/shortcut/test/index.js +0 -37
- package/src/spacer/test/index.js +0 -146
- package/src/style-provider/index.js +0 -31
- package/src/text-highlight/index.js +0 -28
- package/src/text-highlight/stories/index.js +0 -28
- package/src/text-highlight/test/index.js +0 -120
- package/src/tip/index.js +0 -24
- package/src/tip/stories/index.js +0 -26
- package/src/visually-hidden/stories/index.js +0 -42
- package/src/visually-hidden/test/index.js +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, SerializedStyles } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -12,18 +12,18 @@ import deprecated from '@wordpress/deprecated';
|
|
|
12
12
|
/**
|
|
13
13
|
* Internal dependencies
|
|
14
14
|
*/
|
|
15
|
-
import { useContextSystem } from '../../ui/context';
|
|
15
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
16
16
|
import { useResponsiveValue } from '../../ui/utils/use-responsive-value';
|
|
17
17
|
import { space } from '../../ui/utils/space';
|
|
18
18
|
import * as styles from '../styles';
|
|
19
19
|
import { useCx, rtl } from '../../utils';
|
|
20
|
+
import type { FlexProps } from '../types';
|
|
21
|
+
|
|
22
|
+
function useDeprecatedProps(
|
|
23
|
+
props: WordPressComponentProps< FlexProps, 'div' >
|
|
24
|
+
): WordPressComponentProps< FlexProps, 'div' > {
|
|
25
|
+
const { isReversed, ...otherProps } = props;
|
|
20
26
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexProps, 'div'>} props
|
|
24
|
-
* @return {import('../../ui/context').WordPressComponentProps<import('../types').FlexProps, 'div'>} Props with the deprecated props removed.
|
|
25
|
-
*/
|
|
26
|
-
function useDeprecatedProps( { isReversed, ...otherProps } ) {
|
|
27
27
|
if ( typeof isReversed !== 'undefined' ) {
|
|
28
28
|
deprecated( 'Flex isReversed', {
|
|
29
29
|
alternative: 'Flex direction="row-reverse" or "column-reverse"',
|
|
@@ -38,10 +38,7 @@ function useDeprecatedProps( { isReversed, ...otherProps } ) {
|
|
|
38
38
|
return otherProps;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
* @param {import('../../ui/context').WordPressComponentProps<import('../types').FlexProps, 'div'>} props
|
|
43
|
-
*/
|
|
44
|
-
export function useFlex( props ) {
|
|
41
|
+
export function useFlex( props: WordPressComponentProps< FlexProps, 'div' > ) {
|
|
45
42
|
const {
|
|
46
43
|
align = 'center',
|
|
47
44
|
className,
|
|
@@ -67,7 +64,11 @@ export function useFlex( props ) {
|
|
|
67
64
|
const rtlWatchResult = rtl.watch();
|
|
68
65
|
|
|
69
66
|
const classes = useMemo( () => {
|
|
70
|
-
const sx
|
|
67
|
+
const sx: {
|
|
68
|
+
Base?: SerializedStyles;
|
|
69
|
+
Items?: SerializedStyles;
|
|
70
|
+
WrapItems?: SerializedStyles;
|
|
71
|
+
} = {};
|
|
71
72
|
|
|
72
73
|
sx.Base = css( {
|
|
73
74
|
alignItems: isColumn ? 'normal' : align,
|
|
File without changes
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# FlexBlock
|
|
2
2
|
|
|
3
|
-
<div class="callout callout-alert">
|
|
4
|
-
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
3
|
A layout component to contain items of a fixed width within `Flex`.
|
|
8
4
|
|
|
9
5
|
## Usage
|
|
@@ -12,8 +8,8 @@ See [`flex/README.md#usage`](/packages/components/src/flex/README.md#usage) for
|
|
|
12
8
|
|
|
13
9
|
## Props
|
|
14
10
|
|
|
15
|
-
### display
|
|
16
|
-
|
|
17
|
-
**Type**: `[CSSProperties['display']]`
|
|
11
|
+
### `display`: `CSSProperties['display']`
|
|
18
12
|
|
|
19
13
|
The CSS display property of `FlexBlock`.
|
|
14
|
+
|
|
15
|
+
- Required: No
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
10
|
+
import { View } from '../../view';
|
|
11
|
+
import type { FlexBlockProps } from '../types';
|
|
12
|
+
import { useFlexBlock } from './hook';
|
|
13
|
+
|
|
14
|
+
function UnconnectedFlexBlock(
|
|
15
|
+
props: WordPressComponentProps< FlexBlockProps, 'div' >,
|
|
16
|
+
forwardedRef: ForwardedRef< any >
|
|
17
|
+
) {
|
|
18
|
+
const flexBlockProps = useFlexBlock( props );
|
|
19
|
+
|
|
20
|
+
return <View { ...flexBlockProps } ref={ forwardedRef } />;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `FlexBlock` is a primitive layout component that adaptively resizes content
|
|
25
|
+
* within layout containers like `Flex`.
|
|
26
|
+
*
|
|
27
|
+
* ```jsx
|
|
28
|
+
* import { Flex, FlexBlock } from '@wordpress/components';
|
|
29
|
+
*
|
|
30
|
+
* function Example() {
|
|
31
|
+
* return (
|
|
32
|
+
* <Flex>
|
|
33
|
+
* <FlexBlock>...</FlexBlock>
|
|
34
|
+
* </Flex>
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export const FlexBlock = contextConnect( UnconnectedFlexBlock, 'FlexBlock' );
|
|
40
|
+
|
|
41
|
+
export default FlexBlock;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { useContextSystem } from '../../ui/context';
|
|
4
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
5
5
|
import { useFlexItem } from '../flex-item';
|
|
6
|
+
import type { FlexBlockProps } from '../types';
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export function useFlexBlock( props ) {
|
|
8
|
+
export function useFlexBlock(
|
|
9
|
+
props: WordPressComponentProps< FlexBlockProps, 'div' >
|
|
10
|
+
) {
|
|
11
11
|
const otherProps = useContextSystem( props, 'FlexBlock' );
|
|
12
12
|
const flexItemProps = useFlexItem( { isBlock: true, ...otherProps } );
|
|
13
13
|
|
|
File without changes
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# FlexItem
|
|
2
2
|
|
|
3
|
-
<div class="callout callout-alert">
|
|
4
|
-
This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
3
|
A layout component to contain items of a fixed width within `Flex`.
|
|
8
4
|
|
|
9
5
|
## Usage
|
|
@@ -12,14 +8,15 @@ See [`flex/README.md#usage`](/packages/components/src/flex/flex/README.md#usage)
|
|
|
12
8
|
|
|
13
9
|
## Props
|
|
14
10
|
|
|
15
|
-
### display
|
|
16
|
-
|
|
17
|
-
**Type**: `[CSSProperties['display']]`
|
|
11
|
+
### `display`: `CSSProperties['display']`
|
|
18
12
|
|
|
19
13
|
The CSS display property of `FlexItem`.
|
|
20
14
|
|
|
21
|
-
|
|
15
|
+
- Required: No
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
### `isBlock`: `boolean`
|
|
24
18
|
|
|
25
19
|
Determins if `FlexItem` should render as an adaptive full-width block.
|
|
20
|
+
|
|
21
|
+
- Required: No
|
|
22
|
+
- Default: `false`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ForwardedRef } from 'react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { contextConnect, WordPressComponentProps } from '../../ui/context';
|
|
10
|
+
import { View } from '../../view';
|
|
11
|
+
import { useFlexItem } from './hook';
|
|
12
|
+
import type { FlexItemProps } from '../types';
|
|
13
|
+
|
|
14
|
+
function UnconnectedFlexItem(
|
|
15
|
+
props: WordPressComponentProps< FlexItemProps, 'div' >,
|
|
16
|
+
forwardedRef: ForwardedRef< any >
|
|
17
|
+
) {
|
|
18
|
+
const flexItemProps = useFlexItem( props );
|
|
19
|
+
|
|
20
|
+
return <View { ...flexItemProps } ref={ forwardedRef } />;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* `FlexItem` is a primitive layout component that aligns content within layout
|
|
25
|
+
* containers like `Flex`.
|
|
26
|
+
*
|
|
27
|
+
* ```jsx
|
|
28
|
+
* import { Flex, FlexItem } from '@wordpress/components';
|
|
29
|
+
*
|
|
30
|
+
* function Example() {
|
|
31
|
+
* return (
|
|
32
|
+
* <Flex>
|
|
33
|
+
* <FlexItem>...</FlexItem>
|
|
34
|
+
* </Flex>
|
|
35
|
+
* );
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export const FlexItem = contextConnect( UnconnectedFlexItem, 'FlexItem' );
|
|
40
|
+
|
|
41
|
+
export default FlexItem;
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { css } from '@emotion/react';
|
|
4
|
+
import { css, SerializedStyles } from '@emotion/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { useContextSystem } from '../../ui/context';
|
|
9
|
+
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
|
|
10
10
|
import { useFlexContext } from '../context';
|
|
11
11
|
import * as styles from '../styles';
|
|
12
12
|
import { useCx } from '../../utils/hooks/use-cx';
|
|
13
|
+
import type { FlexItemProps } from '../types';
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export function useFlexItem( props ) {
|
|
15
|
+
export function useFlexItem(
|
|
16
|
+
props: WordPressComponentProps< FlexItemProps, 'div' >
|
|
17
|
+
) {
|
|
18
18
|
const {
|
|
19
19
|
className,
|
|
20
20
|
display: displayProp,
|
|
21
21
|
isBlock = false,
|
|
22
22
|
...otherProps
|
|
23
23
|
} = useContextSystem( props, 'FlexItem' );
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
const sx: {
|
|
26
|
+
Base?: SerializedStyles;
|
|
27
|
+
} = {};
|
|
25
28
|
|
|
26
29
|
const contextDisplay = useFlexContext().flexItemDisplay;
|
|
27
30
|
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { Flex, FlexItem, FlexBlock } from '../';
|
|
10
|
+
import { View } from '../../view';
|
|
11
|
+
|
|
12
|
+
const meta: ComponentMeta< typeof Flex > = {
|
|
13
|
+
component: Flex,
|
|
14
|
+
title: 'Components/Flex',
|
|
15
|
+
subcomponents: { FlexBlock, FlexItem },
|
|
16
|
+
argTypes: {
|
|
17
|
+
align: { control: { type: 'text' } },
|
|
18
|
+
as: { control: { type: 'text' } },
|
|
19
|
+
children: { control: { type: null } },
|
|
20
|
+
gap: { control: { type: 'text' } },
|
|
21
|
+
justify: { control: { type: 'text' } },
|
|
22
|
+
// Disabled isReversed because it's deprecated.
|
|
23
|
+
isReversed: {
|
|
24
|
+
table: {
|
|
25
|
+
disable: true,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
parameters: {
|
|
30
|
+
controls: {
|
|
31
|
+
expanded: true,
|
|
32
|
+
},
|
|
33
|
+
docs: { source: { state: 'open' } },
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
|
|
38
|
+
const GrayBox = ( { children }: { children: string } ) => (
|
|
39
|
+
<View style={ { backgroundColor: '#eee', padding: 10 } }>{ children }</View>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export const Default: ComponentStory< typeof Flex > = ( { ...args } ) => {
|
|
43
|
+
return (
|
|
44
|
+
<Flex { ...args }>
|
|
45
|
+
<FlexItem>
|
|
46
|
+
<GrayBox>Item 1</GrayBox>
|
|
47
|
+
</FlexItem>
|
|
48
|
+
<FlexItem>
|
|
49
|
+
<GrayBox>Item 2</GrayBox>
|
|
50
|
+
</FlexItem>
|
|
51
|
+
<FlexItem>
|
|
52
|
+
<GrayBox>Item 3</GrayBox>
|
|
53
|
+
</FlexItem>
|
|
54
|
+
</Flex>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
Default.args = {};
|
|
58
|
+
|
|
59
|
+
export const ResponsiveDirection: ComponentStory< typeof Flex > = ( {
|
|
60
|
+
...args
|
|
61
|
+
} ) => {
|
|
62
|
+
return (
|
|
63
|
+
<Flex { ...args }>
|
|
64
|
+
<FlexItem>
|
|
65
|
+
<GrayBox>Item 1</GrayBox>
|
|
66
|
+
</FlexItem>
|
|
67
|
+
<FlexBlock>
|
|
68
|
+
<GrayBox>Item 2</GrayBox>
|
|
69
|
+
</FlexBlock>
|
|
70
|
+
<FlexItem>
|
|
71
|
+
<GrayBox>Item 3</GrayBox>
|
|
72
|
+
</FlexItem>
|
|
73
|
+
<FlexItem>
|
|
74
|
+
<GrayBox>Item 4</GrayBox>
|
|
75
|
+
</FlexItem>
|
|
76
|
+
</Flex>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
ResponsiveDirection.args = {
|
|
80
|
+
direction: [ 'column', 'row' ],
|
|
81
|
+
};
|
|
File without changes
|
|
@@ -5,21 +5,30 @@ Snapshot Diff:
|
|
|
5
5
|
- First value
|
|
6
6
|
+ Second value
|
|
7
7
|
|
|
8
|
-
@@ -
|
|
8
|
+
@@ -1,22 +1,18 @@
|
|
9
|
+
<div
|
|
10
|
+
class="components-flex css-1giw1wa-View-Flex-sx-Base-sx-Items-ItemsRow em57xhy0"
|
|
11
|
+
- data-testid="flex"
|
|
12
|
+
+ data-testid="base-flex"
|
|
13
|
+
data-wp-c16t="true"
|
|
14
|
+
data-wp-component="Flex"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
9
17
|
class="components-flex-item css-mw3lhz-View-Item-sx-Base em57xhy0"
|
|
10
18
|
data-wp-c16t="true"
|
|
11
19
|
data-wp-component="FlexItem"
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
>
|
|
21
|
+
Item
|
|
22
|
+
</div>
|
|
23
|
+
- <div
|
|
14
24
|
- class="css-1mm2cvy-View em57xhy0"
|
|
15
25
|
- />
|
|
16
26
|
- <div />
|
|
17
|
-
|
|
27
|
+
<div
|
|
18
28
|
class="components-flex-item components-flex-block css-14wzr73-View-Item-sx-Base-block em57xhy0"
|
|
19
29
|
data-wp-c16t="true"
|
|
20
30
|
data-wp-component="FlexBlock"
|
|
21
|
-
|
|
22
|
-
</div>
|
|
31
|
+
>
|
|
23
32
|
`;
|
|
24
33
|
|
|
25
34
|
exports[`props should render align 1`] = `
|
|
@@ -97,6 +106,7 @@ exports[`props should render correctly 1`] = `
|
|
|
97
106
|
|
|
98
107
|
<div
|
|
99
108
|
class="components-flex emotion-0 emotion-1"
|
|
109
|
+
data-testid="base-flex"
|
|
100
110
|
data-wp-c16t="true"
|
|
101
111
|
data-wp-component="Flex"
|
|
102
112
|
>
|
|
@@ -104,12 +114,16 @@ exports[`props should render correctly 1`] = `
|
|
|
104
114
|
class="components-flex-item emotion-2 emotion-1"
|
|
105
115
|
data-wp-c16t="true"
|
|
106
116
|
data-wp-component="FlexItem"
|
|
107
|
-
|
|
117
|
+
>
|
|
118
|
+
Item
|
|
119
|
+
</div>
|
|
108
120
|
<div
|
|
109
121
|
class="components-flex-item components-flex-block emotion-4 emotion-1"
|
|
110
122
|
data-wp-c16t="true"
|
|
111
123
|
data-wp-component="FlexBlock"
|
|
112
|
-
|
|
124
|
+
>
|
|
125
|
+
Item
|
|
126
|
+
</div>
|
|
113
127
|
</div>
|
|
114
128
|
`;
|
|
115
129
|
|
|
@@ -142,5 +156,31 @@ Snapshot Diff:
|
|
|
142
156
|
|
|
143
157
|
exports[`props should render spacing 1`] = `
|
|
144
158
|
Snapshot Diff:
|
|
145
|
-
|
|
159
|
+
- Received styles
|
|
160
|
+
+ Base styles
|
|
161
|
+
|
|
162
|
+
Array [
|
|
163
|
+
Object {
|
|
164
|
+
- "margin-left": "calc(4px * 2)",
|
|
165
|
+
- },
|
|
166
|
+
- Object {
|
|
167
|
+
- "min-width": "0",
|
|
168
|
+
- },
|
|
169
|
+
- Object {
|
|
170
|
+
"-ms-flex": "1",
|
|
171
|
+
"-webkit-flex": "1",
|
|
172
|
+
"display": "block",
|
|
173
|
+
"flex": "1",
|
|
174
|
+
"max-height": "100%",
|
|
175
|
+
"max-width": "100%",
|
|
176
|
+
"min-height": "0",
|
|
177
|
+
+ "min-width": "0",
|
|
178
|
+
+ },
|
|
179
|
+
+ Object {
|
|
180
|
+
+ "margin-left": "calc(4px * 5)",
|
|
181
|
+
+ },
|
|
182
|
+
+ Object {
|
|
183
|
+
"min-width": "0",
|
|
184
|
+
},
|
|
185
|
+
]
|
|
146
186
|
`;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { render, screen } from '@testing-library/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { View } from '../../view';
|
|
10
|
+
import { Flex, FlexBlock, FlexItem } from '../';
|
|
11
|
+
|
|
12
|
+
describe( 'props', () => {
|
|
13
|
+
beforeEach( () => {
|
|
14
|
+
render(
|
|
15
|
+
<Flex data-testid="base-flex">
|
|
16
|
+
<FlexItem>Item</FlexItem>
|
|
17
|
+
<FlexBlock>Item</FlexBlock>
|
|
18
|
+
</Flex>
|
|
19
|
+
);
|
|
20
|
+
} );
|
|
21
|
+
|
|
22
|
+
test( 'should render correctly', () => {
|
|
23
|
+
expect( screen.getByTestId( 'base-flex' ) ).toMatchSnapshot();
|
|
24
|
+
} );
|
|
25
|
+
|
|
26
|
+
test( 'should render + wrap non Flex children', () => {
|
|
27
|
+
render(
|
|
28
|
+
<Flex data-testid="flex">
|
|
29
|
+
<FlexItem>Item</FlexItem>
|
|
30
|
+
<View />
|
|
31
|
+
<div />
|
|
32
|
+
<FlexBlock>Item</FlexBlock>
|
|
33
|
+
</Flex>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
expect( screen.getByTestId( 'flex' ) ).toMatchDiffSnapshot(
|
|
37
|
+
screen.getByTestId( 'base-flex' )
|
|
38
|
+
);
|
|
39
|
+
} );
|
|
40
|
+
|
|
41
|
+
test( 'should render align', () => {
|
|
42
|
+
render(
|
|
43
|
+
<Flex align="flex-start" data-testid="flex">
|
|
44
|
+
<FlexItem>Item</FlexItem>
|
|
45
|
+
<FlexBlock>Item</FlexBlock>
|
|
46
|
+
</Flex>
|
|
47
|
+
);
|
|
48
|
+
expect( screen.getByTestId( 'flex' ) ).toMatchStyleDiffSnapshot(
|
|
49
|
+
screen.getByTestId( 'base-flex' )
|
|
50
|
+
);
|
|
51
|
+
} );
|
|
52
|
+
|
|
53
|
+
test( 'should render justify', () => {
|
|
54
|
+
render(
|
|
55
|
+
<Flex justify="flex-start" data-testid="flex">
|
|
56
|
+
<FlexItem>Item</FlexItem>
|
|
57
|
+
<FlexBlock>Item</FlexBlock>
|
|
58
|
+
</Flex>
|
|
59
|
+
);
|
|
60
|
+
expect( screen.getByTestId( 'flex' ) ).toMatchStyleDiffSnapshot(
|
|
61
|
+
screen.getByTestId( 'base-flex' )
|
|
62
|
+
);
|
|
63
|
+
} );
|
|
64
|
+
|
|
65
|
+
test( 'should render spacing', () => {
|
|
66
|
+
render(
|
|
67
|
+
<>
|
|
68
|
+
<Flex>
|
|
69
|
+
<FlexItem>Item</FlexItem>
|
|
70
|
+
<FlexBlock data-testid="flex-block">Item</FlexBlock>
|
|
71
|
+
</Flex>
|
|
72
|
+
<Flex gap={ 5 }>
|
|
73
|
+
<FlexItem>Item</FlexItem>
|
|
74
|
+
<FlexBlock data-testid="flex-block-with-gap">
|
|
75
|
+
Item
|
|
76
|
+
</FlexBlock>
|
|
77
|
+
</Flex>
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
expect( screen.getByTestId( 'flex-block' ) ).toMatchStyleDiffSnapshot(
|
|
81
|
+
screen.getByTestId( 'flex-block-with-gap' )
|
|
82
|
+
);
|
|
83
|
+
} );
|
|
84
|
+
} );
|
package/src/flex/types.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type { CSSProperties } from 'react';
|
|
4
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -15,33 +15,40 @@ export type FlexDirection = ResponsiveCSSValue<
|
|
|
15
15
|
|
|
16
16
|
export type FlexProps = {
|
|
17
17
|
/**
|
|
18
|
-
* Aligns children using CSS Flexbox `align-items`. Vertically aligns
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* Aligns children using CSS Flexbox `align-items`. Vertically aligns
|
|
19
|
+
* content if the `direction` is `row`, or horizontally aligns content if
|
|
20
|
+
* the `direction` is `column`.
|
|
21
21
|
*
|
|
22
22
|
* @default 'center'
|
|
23
23
|
*/
|
|
24
24
|
align?: CSSProperties[ 'alignItems' ];
|
|
25
25
|
/**
|
|
26
|
-
* The direction flow of the children content can be adjusted with
|
|
26
|
+
* The direction flow of the children content can be adjusted with
|
|
27
|
+
* `direction`. `column` will align children vertically and `row` will align
|
|
28
|
+
* children horizontally.
|
|
27
29
|
*
|
|
28
30
|
* @default 'row'
|
|
29
31
|
*/
|
|
30
32
|
direction?: FlexDirection;
|
|
31
33
|
/**
|
|
32
|
-
* Expands to the maximum available width (if horizontal) or height (if
|
|
34
|
+
* Expands to the maximum available width (if horizontal) or height (if
|
|
35
|
+
* vertical).
|
|
33
36
|
*
|
|
34
37
|
* @default true
|
|
35
38
|
*/
|
|
36
39
|
expanded?: boolean;
|
|
37
40
|
/**
|
|
38
|
-
* Spacing in between each child can be adjusted by using `gap`.
|
|
41
|
+
* Spacing in between each child can be adjusted by using `gap`.
|
|
42
|
+
*
|
|
43
|
+
* Can either be a number (which will act as a multiplier to the library's
|
|
44
|
+
* grid system base of 4px), or a literal CSS value string.
|
|
39
45
|
*
|
|
40
46
|
* @default 2
|
|
41
47
|
*/
|
|
42
48
|
gap?: SpaceInput;
|
|
43
49
|
/**
|
|
44
|
-
* Horizontally aligns content if the `direction` is `row`, or vertically
|
|
50
|
+
* Horizontally aligns content if the `direction` is `row`, or vertically
|
|
51
|
+
* aligns content if the `direction` is `column`.
|
|
45
52
|
*
|
|
46
53
|
* @default 'space-between'
|
|
47
54
|
*/
|
|
@@ -55,7 +62,7 @@ export type FlexProps = {
|
|
|
55
62
|
/**
|
|
56
63
|
* The children elements.
|
|
57
64
|
*/
|
|
58
|
-
children:
|
|
65
|
+
children: ReactNode;
|
|
59
66
|
/**
|
|
60
67
|
* @deprecated
|
|
61
68
|
*/
|
|
@@ -76,7 +83,7 @@ export type FlexItemProps = {
|
|
|
76
83
|
/**
|
|
77
84
|
* The children elements.
|
|
78
85
|
*/
|
|
79
|
-
children
|
|
86
|
+
children?: ReactNode;
|
|
80
87
|
};
|
|
81
88
|
|
|
82
89
|
export type FlexBlockProps = Omit< FlexItemProps, 'isBlock' >;
|
|
@@ -13,9 +13,6 @@ import {
|
|
|
13
13
|
} from './styles/focal-point-picker-style';
|
|
14
14
|
import { useUpdateEffect } from '../utils/hooks';
|
|
15
15
|
|
|
16
|
-
const { clearTimeout, setTimeout } =
|
|
17
|
-
typeof window !== 'undefined' ? window : {};
|
|
18
|
-
|
|
19
16
|
export default function FocalPointPickerGrid( {
|
|
20
17
|
bounds = {},
|
|
21
18
|
value,
|
|
@@ -52,11 +49,11 @@ function useRevealAnimation( value ) {
|
|
|
52
49
|
|
|
53
50
|
useUpdateEffect( () => {
|
|
54
51
|
setIsActive( true );
|
|
55
|
-
const timeout = setTimeout( () => {
|
|
52
|
+
const timeout = window.setTimeout( () => {
|
|
56
53
|
setIsActive( false );
|
|
57
54
|
}, 600 );
|
|
58
55
|
|
|
59
|
-
return () => clearTimeout( timeout );
|
|
56
|
+
return () => window.clearTimeout( timeout );
|
|
60
57
|
}, [ value ] );
|
|
61
58
|
|
|
62
59
|
return {
|
|
@@ -40,8 +40,8 @@ function FocalPointPicker( props ) {
|
|
|
40
40
|
const [ videoNaturalSize, setVideoNaturalSize ] = useState( null );
|
|
41
41
|
const [ tooltipVisible, setTooltipVisible ] = useState( false );
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
const locationPageOffsetX = useRef();
|
|
44
|
+
const locationPageOffsetY = useRef();
|
|
45
45
|
const videoRef = useRef( null );
|
|
46
46
|
|
|
47
47
|
useEffect( () => {
|
|
@@ -67,7 +67,7 @@ function FocalPointPicker( props ) {
|
|
|
67
67
|
y: focalPoint.y * containerSize.height,
|
|
68
68
|
} );
|
|
69
69
|
}
|
|
70
|
-
}, [ focalPoint, containerSize ] );
|
|
70
|
+
}, [ focalPoint, containerSize, pan ] );
|
|
71
71
|
|
|
72
72
|
// Pan responder to manage drag handle interactivity.
|
|
73
73
|
const panResponder = useMemo(
|
|
@@ -86,8 +86,8 @@ function FocalPointPicker( props ) {
|
|
|
86
86
|
pageX,
|
|
87
87
|
pageY,
|
|
88
88
|
} = event.nativeEvent;
|
|
89
|
-
locationPageOffsetX = pageX - x;
|
|
90
|
-
locationPageOffsetY = pageY - y;
|
|
89
|
+
locationPageOffsetX.current = pageX - x;
|
|
90
|
+
locationPageOffsetY.current = pageY - y;
|
|
91
91
|
pan.setValue( { x, y } ); // Set cursor to tap location.
|
|
92
92
|
pan.extractOffset(); // Set offset to current value.
|
|
93
93
|
},
|
|
@@ -106,8 +106,8 @@ function FocalPointPicker( props ) {
|
|
|
106
106
|
// Specifically, dragging the handle outside the bounds of the image
|
|
107
107
|
// results in inaccurate locationX and locationY coordinates to be
|
|
108
108
|
// reported. https://github.com/facebook/react-native/issues/15290#issuecomment-435494944
|
|
109
|
-
const x = pageX - locationPageOffsetX;
|
|
110
|
-
const y = pageY - locationPageOffsetY;
|
|
109
|
+
const x = pageX - locationPageOffsetX.current;
|
|
110
|
+
const y = pageY - locationPageOffsetY.current;
|
|
111
111
|
onChange( {
|
|
112
112
|
x: clamp( x / containerSize?.width, 0, 1 ).toFixed( 2 ),
|
|
113
113
|
y: clamp( y / containerSize?.height, 0, 1 ).toFixed(
|
|
@@ -120,7 +120,7 @@ function FocalPointPicker( props ) {
|
|
|
120
120
|
setSliderKey( ( prevState ) => prevState + 1 );
|
|
121
121
|
},
|
|
122
122
|
} ),
|
|
123
|
-
[ containerSize ]
|
|
123
|
+
[ containerSize, pan, onChange, shouldEnableBottomSheetScroll ]
|
|
124
124
|
);
|
|
125
125
|
|
|
126
126
|
const mediaBackground = usePreferredColorSchemeStyle(
|