@wordpress/components 27.4.0 → 27.5.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 +27 -1
- package/build/alignment-matrix-control/index.js +3 -1
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +8 -8
- package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build/alignment-matrix-control/utils.js +6 -2
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +3 -1
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/index.js +21 -7
- package/build/autocomplete/index.js.map +1 -1
- package/build/checkbox-control/index.js +9 -2
- package/build/checkbox-control/index.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/hue-picker.native.js +6 -2
- package/build/color-picker/hue-picker.native.js.map +1 -1
- package/build/color-picker/index.native.js +9 -3
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +6 -2
- package/build/color-picker/saturation-picker.native.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js +9 -3
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/context/context-connect.js +6 -2
- package/build/context/context-connect.js.map +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js +3 -1
- package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build/drop-zone/index.js +72 -64
- package/build/drop-zone/index.js.map +1 -1
- package/build/dropdown/styles.js +5 -3
- package/build/dropdown/styles.js.map +1 -1
- package/build/duotone-picker/utils.js +3 -1
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/elevation/hook.js +5 -6
- package/build/elevation/hook.js.map +1 -1
- package/build/focal-point-picker/controls.js +3 -1
- package/build/focal-point-picker/controls.js.map +1 -1
- package/build/focal-point-picker/index.js +21 -7
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/focal-point-picker/styles/focal-point-picker-style.js +12 -12
- package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build/focal-point-picker/tooltip/index.native.js +3 -8
- package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build/focal-point-picker/utils.js +3 -1
- package/build/focal-point-picker/utils.js.map +1 -1
- package/build/font-size-picker/index.js +3 -2
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/types.js.map +1 -1
- package/build/input-control/input-field.js +3 -1
- package/build/input-control/input-field.js.map +1 -1
- package/build/input-control/label.js +3 -1
- package/build/input-control/label.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +31 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/input-control/utils.js +8 -4
- package/build/input-control/utils.js.map +1 -1
- package/build/item-group/item/hook.js +0 -4
- package/build/item-group/item/hook.js.map +1 -1
- package/build/mobile/gradient/index.native.js +3 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.android.js +9 -3
- package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/index.ios.js +15 -13
- package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build/mobile/keyboard-aware-flat-list/shared.native.js +33 -0
- package/build/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
- package/build/modal/aria-helper.js +9 -3
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +6 -2
- package/build/modal/index.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +12 -12
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/panel/body.js +3 -1
- package/build/panel/body.js.map +1 -1
- package/build/popover/index.js +3 -1
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js +3 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/query-controls/author-select.js +3 -1
- package/build/query-controls/author-select.js.map +1 -1
- package/build/range-control/rail.js +1 -1
- package/build/range-control/rail.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/resize-tooltip/index.js +3 -1
- package/build/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/label.js +3 -1
- package/build/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +12 -4
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/select-control/index.js +3 -1
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +8 -6
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -3
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +3 -3
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot.js +2 -2
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/text/get-line-height.js +6 -2
- package/build/text/get-line-height.js.map +1 -1
- package/build/text/utils.js +6 -2
- package/build/text/utils.js.map +1 -1
- package/build/theme/color-algorithms.js +6 -2
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/tree-grid/roving-tab-index-item.js +3 -1
- package/build/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build/unit-control/index.js +3 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/colors.js +21 -7
- package/build/utils/colors.js.map +1 -1
- package/build/utils/font-size.js +3 -1
- package/build/utils/font-size.js.map +1 -1
- package/build/utils/get-valid-children.js +3 -1
- package/build/utils/get-valid-children.js.map +1 -1
- package/build/utils/input/base.js +2 -3
- package/build/utils/input/base.js.map +1 -1
- package/build/utils/strings.js +11 -57
- package/build/utils/strings.js.map +1 -1
- package/build/utils/use-responsive-value.js +3 -1
- package/build/utils/use-responsive-value.js.map +1 -1
- package/build/view/component.js +26 -8
- package/build/view/component.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +3 -1
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
- package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +6 -2
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +3 -1
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/index.js +21 -7
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/checkbox-control/index.js +9 -2
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/color-picker/hex-input.js +3 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hue-picker.native.js +6 -2
- package/build-module/color-picker/hue-picker.native.js.map +1 -1
- package/build-module/color-picker/index.native.js +9 -3
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +6 -2
- package/build-module/color-picker/saturation-picker.native.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js +9 -3
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/context/context-connect.js +6 -2
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js +3 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build-module/drop-zone/index.js +72 -64
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/dropdown/styles.js +5 -3
- package/build-module/dropdown/styles.js.map +1 -1
- package/build-module/duotone-picker/utils.js +3 -1
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/elevation/hook.js +6 -7
- package/build-module/elevation/hook.js.map +1 -1
- package/build-module/focal-point-picker/controls.js +3 -1
- package/build-module/focal-point-picker/controls.js.map +1 -1
- package/build-module/focal-point-picker/index.js +21 -7
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -13
- package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
- package/build-module/focal-point-picker/tooltip/index.native.js +3 -8
- package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
- package/build-module/focal-point-picker/utils.js +3 -1
- package/build-module/focal-point-picker/utils.js.map +1 -1
- package/build-module/font-size-picker/index.js +3 -2
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/types.js.map +1 -1
- package/build-module/input-control/input-field.js +3 -1
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/input-control/label.js +3 -1
- package/build-module/input-control/label.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +31 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/input-control/utils.js +8 -4
- package/build-module/input-control/utils.js.map +1 -1
- package/build-module/item-group/item/hook.js +0 -4
- package/build-module/item-group/item/hook.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +3 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js +9 -3
- package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
- package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
- package/build-module/mobile/keyboard-aware-flat-list/shared.native.js +27 -0
- package/build-module/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
- package/build-module/modal/aria-helper.js +9 -3
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +6 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +13 -13
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/panel/body.js +3 -1
- package/build-module/panel/body.js.map +1 -1
- package/build-module/popover/index.js +3 -1
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js +3 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/query-controls/author-select.js +3 -1
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/range-control/rail.js +1 -1
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +30 -30
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/index.js +3 -1
- package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/label.js +3 -1
- package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +12 -4
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/select-control/index.js +3 -1
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +8 -6
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +2 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/text/get-line-height.js +6 -2
- package/build-module/text/get-line-height.js.map +1 -1
- package/build-module/text/utils.js +6 -2
- package/build-module/text/utils.js.map +1 -1
- package/build-module/theme/color-algorithms.js +6 -2
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +10 -10
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/tree-grid/roving-tab-index-item.js +3 -1
- package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
- package/build-module/unit-control/index.js +3 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/colors.js +21 -7
- package/build-module/utils/colors.js.map +1 -1
- package/build-module/utils/font-size.js +3 -1
- package/build-module/utils/font-size.js.map +1 -1
- package/build-module/utils/get-valid-children.js +3 -1
- package/build-module/utils/get-valid-children.js.map +1 -1
- package/build-module/utils/input/base.js +2 -3
- package/build-module/utils/input/base.js.map +1 -1
- package/build-module/utils/strings.js +12 -57
- package/build-module/utils/strings.js.map +1 -1
- package/build-module/utils/use-responsive-value.js +3 -1
- package/build-module/utils/use-responsive-value.js.map +1 -1
- package/build-module/view/component.js +26 -8
- package/build-module/view/component.js.map +1 -1
- package/build-style/style-rtl.css +39 -36
- package/build-style/style.css +39 -36
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/utils.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
- package/build-types/border-control/border-control/hook.d.ts +4 -4
- package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -4
- package/build-types/box-control/stories/index.story.d.ts +24 -24
- package/build-types/card/card/hook.d.ts +4 -4
- package/build-types/card/card-body/hook.d.ts +4 -4
- package/build-types/card/card-divider/hook.d.ts +4 -4
- package/build-types/card/card-footer/hook.d.ts +4 -4
- package/build-types/card/card-header/hook.d.ts +4 -4
- package/build-types/card/card-media/hook.d.ts +4 -4
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/context/context-connect.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/dropdown/styles.d.ts.map +1 -1
- package/build-types/duotone-picker/utils.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +4 -4
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +4 -4
- package/build-types/flex/flex-block/hook.d.ts +4 -4
- package/build-types/flex/flex-item/hook.d.ts +4 -4
- package/build-types/focal-point-picker/controls.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/focal-point-picker/utils.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/types.d.ts +2 -0
- package/build-types/font-size-picker/types.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +4 -4
- package/build-types/h-stack/hook.d.ts +4 -4
- package/build-types/heading/hook.d.ts +4 -4
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/label.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +2 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/utils.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +5 -5
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +4 -4
- package/build-types/modal/aria-helper.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +4 -4
- package/build-types/navigator/navigator-button/hook.d.ts +4 -4
- package/build-types/palette-edit/styles.d.ts +749 -10
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +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/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +4 -4
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +2 -2
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +4 -4
- package/build-types/surface/hook.d.ts +4 -4
- package/build-types/text/get-line-height.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +4 -4
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/theme/color-algorithms.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +4 -4
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +4 -4
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +4 -4
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/utils/colors.d.ts.map +1 -1
- package/build-types/utils/font-size.d.ts.map +1 -1
- package/build-types/utils/get-valid-children.d.ts.map +1 -1
- package/build-types/utils/input/base.d.ts.map +1 -1
- package/build-types/utils/strings.d.ts.map +1 -1
- package/build-types/utils/use-responsive-value.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +4 -4
- package/build-types/view/component.d.ts +253 -7
- package/build-types/view/component.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/alignment-matrix-control/index.tsx +3 -1
- package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +4 -3
- package/src/alignment-matrix-control/utils.tsx +6 -2
- package/src/autocomplete/autocompleter-ui.tsx +3 -1
- package/src/autocomplete/index.tsx +21 -7
- package/src/autocomplete/style.scss +10 -4
- package/src/box-control/test/index.tsx +22 -0
- package/src/card/test/__snapshots__/index.tsx.snap +44 -47
- package/src/checkbox-control/index.tsx +44 -35
- package/src/checkbox-control/style.scss +12 -1
- package/src/checkbox-control/test/__snapshots__/index.tsx.snap +27 -26
- package/src/checkbox-control/test/index.tsx +5 -0
- package/src/color-picker/hex-input.tsx +3 -1
- package/src/color-picker/hue-picker.native.js +6 -2
- package/src/color-picker/index.native.js +9 -3
- package/src/color-picker/saturation-picker.native.js +6 -2
- package/src/color-picker/use-deprecated-props.ts +9 -3
- package/src/context/context-connect.ts +6 -2
- package/src/custom-select-control-v2/README.md +0 -4
- package/src/custom-select-control-v2/legacy-component/index.tsx +3 -1
- package/src/custom-select-control-v2/stories/default.story.tsx +1 -1
- package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
- package/src/drop-zone/index.tsx +66 -66
- package/src/dropdown/styles.ts +3 -1
- package/src/duotone-picker/utils.ts +3 -1
- package/src/elevation/hook.ts +6 -3
- package/src/elevation/test/__snapshots__/index.tsx.snap +18 -24
- package/src/flex/test/__snapshots__/index.tsx.snap +4 -4
- package/src/focal-point-picker/controls.tsx +3 -1
- package/src/focal-point-picker/index.tsx +20 -7
- package/src/focal-point-picker/styles/focal-point-picker-style.ts +4 -3
- package/src/focal-point-picker/tooltip/index.native.js +1 -7
- package/src/focal-point-picker/utils.ts +3 -1
- package/src/font-size-picker/README.md +1 -0
- package/src/font-size-picker/index.tsx +4 -2
- package/src/font-size-picker/stories/index.story.tsx +0 -1
- package/src/font-size-picker/types.ts +2 -0
- package/src/higher-order/navigate-regions/style.scss +3 -3
- package/src/input-control/input-field.tsx +3 -1
- package/src/input-control/label.tsx +3 -1
- package/src/input-control/stories/index.story.tsx +31 -1
- package/src/input-control/styles/input-control-styles.tsx +12 -4
- package/src/input-control/test/index.js +8 -4
- package/src/input-control/utils.ts +3 -2
- package/src/item-group/item/hook.ts +1 -10
- package/src/item-group/test/__snapshots__/index.js.snap +16 -16
- package/src/mobile/gradient/index.native.js +3 -1
- package/src/mobile/keyboard-aware-flat-list/index.android.js +11 -2
- package/src/mobile/keyboard-aware-flat-list/index.ios.js +30 -19
- package/src/mobile/keyboard-aware-flat-list/shared.native.js +26 -0
- package/src/mobile/keyboard-aware-flat-list/styles.native.scss +8 -0
- package/src/modal/aria-helper.ts +8 -3
- package/src/modal/index.tsx +6 -2
- package/src/modal/test/index.tsx +11 -4
- package/src/navigation/styles/navigation-styles.tsx +4 -3
- package/src/panel/body.tsx +3 -1
- package/src/panel/style.scss +1 -0
- package/src/placeholder/style.scss +12 -34
- package/src/popover/index.tsx +2 -1
- package/src/popover/overlay-middlewares.tsx +3 -1
- package/src/popover/stories/index.story.tsx +0 -2
- package/src/query-controls/author-select.tsx +3 -1
- package/src/range-control/rail.tsx +1 -1
- package/src/range-control/styles/range-control-styles.ts +5 -3
- package/src/resizable-box/resize-tooltip/index.tsx +3 -1
- package/src/resizable-box/resize-tooltip/label.tsx +3 -1
- package/src/resizable-box/resize-tooltip/utils.ts +12 -4
- package/src/select-control/index.tsx +3 -1
- package/src/select-control/styles/select-control-styles.ts +3 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +2 -1
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +1 -1
- package/src/slot-fill/bubbles-virtually/use-slot.ts +1 -1
- package/src/slot-fill/types.ts +2 -2
- package/src/surface/test/__snapshots__/index.tsx.snap +10 -10
- package/src/text/get-line-height.ts +6 -2
- package/src/text/utils.ts +6 -2
- package/src/theme/color-algorithms.ts +6 -2
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +18 -24
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +7 -6
- package/src/toolbar/toolbar/style.scss +2 -2
- package/src/tree-grid/roving-tab-index-item.tsx +3 -1
- package/src/unit-control/index.tsx +5 -1
- package/src/utils/colors.js +21 -7
- package/src/utils/font-size.ts +3 -1
- package/src/utils/get-valid-children.ts +3 -1
- package/src/utils/input/base.js +4 -3
- package/src/utils/strings.ts +11 -59
- package/src/utils/test/strings.js +62 -0
- package/src/utils/use-responsive-value.ts +2 -1
- package/src/view/component.tsx +18 -11
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/slot-fill/bubbles-virtually/observable-map.js +0 -68
- package/build/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
- package/build/view/types.js +0 -6
- package/build/view/types.js.map +0 -1
- package/build-module/slot-fill/bubbles-virtually/observable-map.js +0 -60
- package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
- package/build-module/view/types.js +0 -2
- package/build-module/view/types.js.map +0 -1
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +0 -19
- package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +0 -1
- package/build-types/view/types.d.ts +0 -8
- package/build-types/view/types.d.ts.map +0 -1
- package/src/slot-fill/bubbles-virtually/observable-map.ts +0 -79
- package/src/slot-fill/test/observable-map.js +0 -83
- package/src/utils/hooks/stories/use-cx.js +0 -157
- package/src/view/types.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/view/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/view/component.tsx"],"names":[],"mappings":";;AAwBA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEd,CAAC;AAEJ,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.5.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
"@types/gradient-parser": "0.1.3",
|
|
43
43
|
"@types/highlight-words-core": "1.2.1",
|
|
44
44
|
"@use-gesture/react": "^10.2.24",
|
|
45
|
-
"@wordpress/a11y": "^3.
|
|
46
|
-
"@wordpress/compose": "^6.
|
|
47
|
-
"@wordpress/date": "^4.
|
|
48
|
-
"@wordpress/deprecated": "^3.
|
|
49
|
-
"@wordpress/dom": "^3.
|
|
50
|
-
"@wordpress/element": "^5.
|
|
51
|
-
"@wordpress/escape-html": "^2.
|
|
52
|
-
"@wordpress/hooks": "^3.
|
|
53
|
-
"@wordpress/html-entities": "^3.
|
|
54
|
-
"@wordpress/i18n": "^4.
|
|
55
|
-
"@wordpress/icons": "^9.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/primitives": "^3.
|
|
59
|
-
"@wordpress/private-apis": "^0.
|
|
60
|
-
"@wordpress/rich-text": "^6.
|
|
61
|
-
"@wordpress/warning": "^2.
|
|
45
|
+
"@wordpress/a11y": "^3.57.0",
|
|
46
|
+
"@wordpress/compose": "^6.34.0",
|
|
47
|
+
"@wordpress/date": "^4.57.0",
|
|
48
|
+
"@wordpress/deprecated": "^3.57.0",
|
|
49
|
+
"@wordpress/dom": "^3.57.0",
|
|
50
|
+
"@wordpress/element": "^5.34.0",
|
|
51
|
+
"@wordpress/escape-html": "^2.57.0",
|
|
52
|
+
"@wordpress/hooks": "^3.57.0",
|
|
53
|
+
"@wordpress/html-entities": "^3.57.0",
|
|
54
|
+
"@wordpress/i18n": "^4.57.0",
|
|
55
|
+
"@wordpress/icons": "^9.48.0",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^4.57.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.57.0",
|
|
58
|
+
"@wordpress/primitives": "^3.55.0",
|
|
59
|
+
"@wordpress/private-apis": "^0.39.0",
|
|
60
|
+
"@wordpress/rich-text": "^6.34.0",
|
|
61
|
+
"@wordpress/warning": "^2.57.0",
|
|
62
62
|
"change-case": "^4.1.2",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "581d8a5580dba8f600b7268d51eb554771ae482c"
|
|
89
89
|
}
|
|
@@ -61,7 +61,9 @@ export function AlignmentMatrixControl( {
|
|
|
61
61
|
activeId: getItemId( baseId, value ),
|
|
62
62
|
setActiveId: ( nextActiveId ) => {
|
|
63
63
|
const nextValue = getItemValue( baseId, nextActiveId );
|
|
64
|
-
if ( nextValue )
|
|
64
|
+
if ( nextValue ) {
|
|
65
|
+
onChange?.( nextValue );
|
|
66
|
+
}
|
|
65
67
|
},
|
|
66
68
|
rtl: isRTL(),
|
|
67
69
|
} );
|
|
@@ -7,7 +7,7 @@ import { css } from '@emotion/react';
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { COLORS
|
|
10
|
+
import { COLORS } from '../../utils';
|
|
11
11
|
import type {
|
|
12
12
|
AlignmentMatrixControlProps,
|
|
13
13
|
AlignmentMatrixControlCellProps,
|
|
@@ -74,9 +74,10 @@ export const pointBase = (
|
|
|
74
74
|
box-sizing: border-box;
|
|
75
75
|
display: grid;
|
|
76
76
|
margin: auto;
|
|
77
|
-
|
|
77
|
+
@media not ( prefers-reduced-motion ) {
|
|
78
|
+
transition: all 120ms linear;
|
|
79
|
+
}
|
|
78
80
|
|
|
79
|
-
${ reduceMotion( 'transition' ) }
|
|
80
81
|
${ pointActive( props ) }
|
|
81
82
|
`;
|
|
82
83
|
};
|
|
@@ -65,7 +65,9 @@ export function getItemId(
|
|
|
65
65
|
value?: AlignmentMatrixControlValue
|
|
66
66
|
) {
|
|
67
67
|
const normalized = normalize( value );
|
|
68
|
-
if ( ! normalized )
|
|
68
|
+
if ( ! normalized ) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
69
71
|
|
|
70
72
|
const id = normalized.replace( ' ', '-' );
|
|
71
73
|
return `${ prefixId }-${ id }`;
|
|
@@ -94,7 +96,9 @@ export function getAlignmentIndex(
|
|
|
94
96
|
alignment: AlignmentMatrixControlValue = 'center'
|
|
95
97
|
) {
|
|
96
98
|
const normalized = normalize( alignment );
|
|
97
|
-
if ( ! normalized )
|
|
99
|
+
if ( ! normalized ) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
98
102
|
|
|
99
103
|
const index = ALIGNMENTS.indexOf( normalized );
|
|
100
104
|
return index > -1 ? index : undefined;
|
|
@@ -55,7 +55,9 @@ export function getAutoCompleterUI( autocompleter: WPCompleter ) {
|
|
|
55
55
|
popoverRef,
|
|
56
56
|
useRefEffect(
|
|
57
57
|
( node ) => {
|
|
58
|
-
if ( ! contentRef.current )
|
|
58
|
+
if ( ! contentRef.current ) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
59
61
|
|
|
60
62
|
// If the popover is rendered in a different document than
|
|
61
63
|
// the content, we need to duplicate the options list in the
|
|
@@ -253,7 +253,9 @@ export function useAutocomplete( {
|
|
|
253
253
|
|
|
254
254
|
useEffect( () => {
|
|
255
255
|
if ( ! textContent ) {
|
|
256
|
-
if ( autocompleter )
|
|
256
|
+
if ( autocompleter ) {
|
|
257
|
+
reset();
|
|
258
|
+
}
|
|
257
259
|
return;
|
|
258
260
|
}
|
|
259
261
|
|
|
@@ -277,7 +279,9 @@ export function useAutocomplete( {
|
|
|
277
279
|
);
|
|
278
280
|
|
|
279
281
|
if ( ! completer ) {
|
|
280
|
-
if ( autocompleter )
|
|
282
|
+
if ( autocompleter ) {
|
|
283
|
+
reset();
|
|
284
|
+
}
|
|
281
285
|
return;
|
|
282
286
|
}
|
|
283
287
|
|
|
@@ -293,7 +297,9 @@ export function useAutocomplete( {
|
|
|
293
297
|
// significantly. This could happen, for example, if `matchingWhileBackspacing`
|
|
294
298
|
// is true and one of the "words" end up being too long. If that's the case,
|
|
295
299
|
// it will be caught by this guard.
|
|
296
|
-
if ( tooDistantFromTrigger )
|
|
300
|
+
if ( tooDistantFromTrigger ) {
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
297
303
|
|
|
298
304
|
const mismatch = filteredOptions.length === 0;
|
|
299
305
|
const wordsFromTrigger = textWithoutTrigger.split( /\s/ );
|
|
@@ -318,7 +324,9 @@ export function useAutocomplete( {
|
|
|
318
324
|
backspacing.current && wordsFromTrigger.length <= 3;
|
|
319
325
|
|
|
320
326
|
if ( mismatch && ! ( matchingWhileBackspacing || hasOneTriggerWord ) ) {
|
|
321
|
-
if ( autocompleter )
|
|
327
|
+
if ( autocompleter ) {
|
|
328
|
+
reset();
|
|
329
|
+
}
|
|
322
330
|
return;
|
|
323
331
|
}
|
|
324
332
|
|
|
@@ -333,7 +341,9 @@ export function useAutocomplete( {
|
|
|
333
341
|
textAfterSelection
|
|
334
342
|
)
|
|
335
343
|
) {
|
|
336
|
-
if ( autocompleter )
|
|
344
|
+
if ( autocompleter ) {
|
|
345
|
+
reset();
|
|
346
|
+
}
|
|
337
347
|
return;
|
|
338
348
|
}
|
|
339
349
|
|
|
@@ -341,12 +351,16 @@ export function useAutocomplete( {
|
|
|
341
351
|
/^\s/.test( textWithoutTrigger ) ||
|
|
342
352
|
/\s\s+$/.test( textWithoutTrigger )
|
|
343
353
|
) {
|
|
344
|
-
if ( autocompleter )
|
|
354
|
+
if ( autocompleter ) {
|
|
355
|
+
reset();
|
|
356
|
+
}
|
|
345
357
|
return;
|
|
346
358
|
}
|
|
347
359
|
|
|
348
360
|
if ( ! /[\u0000-\uFFFF]*$/.test( textWithoutTrigger ) ) {
|
|
349
|
-
if ( autocompleter )
|
|
361
|
+
if ( autocompleter ) {
|
|
362
|
+
reset();
|
|
363
|
+
}
|
|
350
364
|
return;
|
|
351
365
|
}
|
|
352
366
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.components-autocomplete__popover .components-popover__content {
|
|
2
|
-
padding: $grid-unit-
|
|
3
|
-
min-width:
|
|
2
|
+
padding: $grid-unit-10;
|
|
3
|
+
min-width: 200px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.components-autocomplete__result.components-button {
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
text-align: left;
|
|
11
11
|
width: 100%;
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
&:focus:not(:disabled) {
|
|
14
|
+
@include block-toolbar-button-style__focus();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.is-selected,
|
|
18
|
+
&:not(:disabled,[aria-disabled="true"]):active {
|
|
19
|
+
background: $components-color-accent;
|
|
20
|
+
color: $white;
|
|
15
21
|
}
|
|
16
22
|
}
|
|
@@ -80,6 +80,28 @@ describe( 'BoxControl', () => {
|
|
|
80
80
|
expect( input ).toHaveValue( '50' );
|
|
81
81
|
expect( screen.getByRole( 'slider' ) ).toHaveValue( '50' );
|
|
82
82
|
} );
|
|
83
|
+
|
|
84
|
+
it( 'should render the number input with a default min value of 0', () => {
|
|
85
|
+
render( <BoxControl onChange={ () => {} } /> );
|
|
86
|
+
|
|
87
|
+
const input = screen.getByRole( 'textbox', { name: 'All sides' } );
|
|
88
|
+
|
|
89
|
+
expect( input ).toHaveAttribute( 'min', '0' );
|
|
90
|
+
} );
|
|
91
|
+
|
|
92
|
+
it( 'should pass down `inputProps` to the underlying number input', () => {
|
|
93
|
+
render(
|
|
94
|
+
<BoxControl
|
|
95
|
+
onChange={ () => {} }
|
|
96
|
+
inputProps={ { min: 10, max: 50 } }
|
|
97
|
+
/>
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const input = screen.getByRole( 'textbox', { name: 'All sides' } );
|
|
101
|
+
|
|
102
|
+
expect( input ).toHaveAttribute( 'min', '10' );
|
|
103
|
+
expect( input ).toHaveAttribute( 'max', '50' );
|
|
104
|
+
} );
|
|
83
105
|
} );
|
|
84
106
|
|
|
85
107
|
describe( 'Reset', () => {
|
|
@@ -8,8 +8,8 @@ Snapshot Diff:
|
|
|
8
8
|
@@ -1,8 +1,8 @@
|
|
9
9
|
<div>
|
|
10
10
|
<div
|
|
11
|
-
- class="components-card__body components-card-body css-
|
|
12
|
-
+ class="components-scrollable components-card__body components-card-body css-
|
|
11
|
+
- class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
|
|
12
|
+
+ class="components-scrollable components-card__body components-card-body css-vpf7zs-PolymorphicDiv-Scrollable-scrollableScrollbar-scrollY-Body-borderRadius-medium e19lxcc00"
|
|
13
13
|
data-wp-c16t="true"
|
|
14
14
|
data-wp-component="CardBody"
|
|
15
15
|
>
|
|
@@ -25,8 +25,8 @@ Snapshot Diff:
|
|
|
25
25
|
@@ -1,8 +1,8 @@
|
|
26
26
|
<div>
|
|
27
27
|
<div
|
|
28
|
-
- class="components-card__body components-card-body css-
|
|
29
|
-
+ class="components-card__body components-card-body css-
|
|
28
|
+
- class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
|
|
29
|
+
+ class="components-card__body components-card-body css-4zm8r0-PolymorphicDiv-Body-borderRadius-medium-shady e19lxcc00"
|
|
30
30
|
data-wp-c16t="true"
|
|
31
31
|
data-wp-component="CardBody"
|
|
32
32
|
>
|
|
@@ -42,8 +42,8 @@ Snapshot Diff:
|
|
|
42
42
|
@@ -1,8 +1,8 @@
|
|
43
43
|
<div>
|
|
44
44
|
<div
|
|
45
|
-
- class="components-flex components-card__footer components-card-footer css-
|
|
46
|
-
+ class="components-flex components-card__footer components-card-footer css-
|
|
45
|
+
- class="components-flex components-card__footer components-card-footer css-1l4bmbt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
|
|
46
|
+
+ class="components-flex components-card__footer components-card-footer css-8pv7rj-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium-shady e19lxcc00"
|
|
47
47
|
data-wp-c16t="true"
|
|
48
48
|
data-wp-component="CardFooter"
|
|
49
49
|
>
|
|
@@ -59,8 +59,8 @@ Snapshot Diff:
|
|
|
59
59
|
@@ -1,8 +1,8 @@
|
|
60
60
|
<div>
|
|
61
61
|
<div
|
|
62
|
-
- class="components-flex components-card__footer components-card-footer css-
|
|
63
|
-
+ class="components-flex components-card__footer components-card-footer css-
|
|
62
|
+
- class="components-flex components-card__footer components-card-footer css-1l4bmbt-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
|
|
63
|
+
+ class="components-flex components-card__footer components-card-footer css-1hguscv-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-medium e19lxcc00"
|
|
64
64
|
data-wp-c16t="true"
|
|
65
65
|
data-wp-component="CardFooter"
|
|
66
66
|
>
|
|
@@ -76,8 +76,8 @@ Snapshot Diff:
|
|
|
76
76
|
@@ -1,8 +1,8 @@
|
|
77
77
|
<div>
|
|
78
78
|
<div
|
|
79
|
-
- class="components-flex components-card__header components-card-header css-
|
|
80
|
-
+ class="components-flex components-card__header components-card-header css-
|
|
79
|
+
- class="components-flex components-card__header components-card-header css-1tfuk0d-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
|
|
80
|
+
+ class="components-flex components-card__header components-card-header css-10qs2ur-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium-shady e19lxcc00"
|
|
81
81
|
data-wp-c16t="true"
|
|
82
82
|
data-wp-component="CardHeader"
|
|
83
83
|
>
|
|
@@ -93,19 +93,19 @@ Snapshot Diff:
|
|
|
93
93
|
@@ -6,18 +6,18 @@
|
|
94
94
|
>
|
|
95
95
|
<div
|
|
96
|
-
class="css-
|
|
96
|
+
class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
|
|
97
97
|
>
|
|
98
98
|
<div
|
|
99
|
-
- class="components-flex components-card__header components-card-header css-
|
|
100
|
-
+ class="components-flex components-card__header components-card-header css-
|
|
99
|
+
- class="components-flex components-card__header components-card-header css-1tfuk0d-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-medium e19lxcc00"
|
|
100
|
+
+ class="components-flex components-card__header components-card-header css-d1c2bv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large e19lxcc00"
|
|
101
101
|
data-wp-c16t="true"
|
|
102
102
|
data-wp-component="CardHeader"
|
|
103
103
|
>
|
|
104
104
|
Header
|
|
105
105
|
</div>
|
|
106
106
|
<div
|
|
107
|
-
- class="components-card__body components-card-body css-
|
|
108
|
-
+ class="components-card__body components-card-body css-
|
|
107
|
+
- class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
|
|
108
|
+
+ class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
|
|
109
109
|
data-wp-c16t="true"
|
|
110
110
|
data-wp-component="CardBody"
|
|
111
111
|
>
|
|
@@ -138,27 +138,27 @@ Snapshot Diff:
|
|
|
138
138
|
@@ -6,25 +6,25 @@
|
|
139
139
|
>
|
|
140
140
|
<div
|
|
141
|
-
class="css-
|
|
141
|
+
class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
|
|
142
142
|
>
|
|
143
143
|
<div
|
|
144
|
-
- class="components-flex components-card__header components-card-header css-
|
|
145
|
-
+ class="components-flex components-card__header components-card-header css-
|
|
144
|
+
- class="components-flex components-card__header components-card-header css-1xfrxuu-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
|
|
145
|
+
+ class="components-flex components-card__header components-card-header css-1mitrbv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
|
|
146
146
|
data-wp-c16t="true"
|
|
147
147
|
data-wp-component="CardHeader"
|
|
148
148
|
>
|
|
149
149
|
Header
|
|
150
150
|
</div>
|
|
151
151
|
<div
|
|
152
|
-
- class="components-card__body components-card-body css-
|
|
153
|
-
+ class="components-card__body components-card-body css-
|
|
152
|
+
- class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
|
|
153
|
+
+ class="components-card__body components-card-body css-d0qyo2-PolymorphicDiv-Body-borderRadius-medium e19lxcc00"
|
|
154
154
|
data-wp-c16t="true"
|
|
155
155
|
data-wp-component="CardBody"
|
|
156
156
|
>
|
|
157
157
|
Body
|
|
158
158
|
</div>
|
|
159
159
|
<div
|
|
160
|
-
- class="components-flex components-card__footer components-card-footer css-
|
|
161
|
-
+ class="components-flex components-card__footer components-card-footer css-
|
|
160
|
+
- class="components-flex components-card__footer components-card-footer css-8o7z5w-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
|
|
161
|
+
+ class="components-flex components-card__footer components-card-footer css-1umuqb4-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-xSmallCardPadding e19lxcc00"
|
|
162
162
|
data-wp-c16t="true"
|
|
163
163
|
data-wp-component="CardFooter"
|
|
164
164
|
>
|
|
@@ -174,33 +174,33 @@ Snapshot Diff:
|
|
|
174
174
|
@@ -1,30 +1,30 @@
|
|
175
175
|
<div>
|
|
176
176
|
<div
|
|
177
|
-
- class="components-surface components-card css-
|
|
178
|
-
+ class="components-surface components-card css-
|
|
177
|
+
- class="components-surface components-card css-5ubhkm-PolymorphicDiv-Surface-getBorders-primary-Card-boxShadowless-rounded e19lxcc00"
|
|
178
|
+
+ class="components-surface components-card css-1lc0qq8-PolymorphicDiv-Surface-getBorders-primary-Card-rounded e19lxcc00"
|
|
179
179
|
data-wp-c16t="true"
|
|
180
180
|
data-wp-component="Card"
|
|
181
181
|
>
|
|
182
182
|
<div
|
|
183
|
-
class="css-
|
|
183
|
+
class="css-76dw7d-PolymorphicDiv-Content e19lxcc00"
|
|
184
184
|
>
|
|
185
185
|
<div
|
|
186
|
-
- class="components-flex components-card__header components-card-header css-
|
|
187
|
-
+ class="components-flex components-card__header components-card-header css-
|
|
186
|
+
- class="components-flex components-card__header components-card-header css-1xfrxuu-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-large-borderless e19lxcc00"
|
|
187
|
+
+ class="components-flex components-card__header components-card-header css-1mitrbv-PolymorphicDiv-Flex-base-ItemsRow-Header-borderRadius-borderColor-small e19lxcc00"
|
|
188
188
|
data-wp-c16t="true"
|
|
189
189
|
data-wp-component="CardHeader"
|
|
190
190
|
>
|
|
191
191
|
Header
|
|
192
192
|
</div>
|
|
193
193
|
<div
|
|
194
|
-
- class="components-card__body components-card-body css-
|
|
195
|
-
+ class="components-card__body components-card-body css-
|
|
194
|
+
- class="components-card__body components-card-body css-kub9fa-PolymorphicDiv-Body-borderRadius-large e19lxcc00"
|
|
195
|
+
+ class="components-card__body components-card-body css-1djcdvu-PolymorphicDiv-Body-borderRadius-small e19lxcc00"
|
|
196
196
|
data-wp-c16t="true"
|
|
197
197
|
data-wp-component="CardBody"
|
|
198
198
|
>
|
|
199
199
|
Body
|
|
200
200
|
</div>
|
|
201
201
|
<div
|
|
202
|
-
- class="components-flex components-card__footer components-card-footer css-
|
|
203
|
-
+ class="components-flex components-card__footer components-card-footer css-
|
|
202
|
+
- class="components-flex components-card__footer components-card-footer css-8o7z5w-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-large-borderless e19lxcc00"
|
|
203
|
+
+ class="components-flex components-card__footer components-card-footer css-1awxp6o-PolymorphicDiv-Flex-base-ItemsRow-Footer-borderRadius-borderColor-small e19lxcc00"
|
|
204
204
|
data-wp-c16t="true"
|
|
205
205
|
data-wp-component="CardFooter"
|
|
206
206
|
>
|
|
@@ -370,14 +370,13 @@ exports[`Card Card component should render correctly 1`] = `
|
|
|
370
370
|
left: 0;
|
|
371
371
|
right: 0;
|
|
372
372
|
top: 0;
|
|
373
|
-
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
374
|
-
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
375
373
|
border-radius: 2px;
|
|
376
374
|
}
|
|
377
375
|
|
|
378
|
-
@media ( prefers-reduced-motion
|
|
376
|
+
@media not ( prefers-reduced-motion ) {
|
|
379
377
|
.emotion-18 {
|
|
380
|
-
transition
|
|
378
|
+
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
379
|
+
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
381
380
|
}
|
|
382
381
|
}
|
|
383
382
|
|
|
@@ -470,15 +469,15 @@ Snapshot Diff:
|
|
|
470
469
|
</div>
|
|
471
470
|
<div
|
|
472
471
|
aria-hidden="true"
|
|
473
|
-
- class="components-elevation css-
|
|
474
|
-
+ class="components-elevation css-
|
|
472
|
+
- class="components-elevation css-1dd80bh-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
|
|
473
|
+
+ class="components-elevation css-1jg41yu-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
|
|
475
474
|
data-wp-c16t="true"
|
|
476
475
|
data-wp-component="Elevation"
|
|
477
476
|
/>
|
|
478
477
|
<div
|
|
479
478
|
aria-hidden="true"
|
|
480
|
-
- class="components-elevation css-
|
|
481
|
-
+ class="components-elevation css-
|
|
479
|
+
- class="components-elevation css-iuptql-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
|
|
480
|
+
+ class="components-elevation css-1jg41yu-PolymorphicDiv-Elevation-sx-Base-sx-Base-elevationClassName e19lxcc00"
|
|
482
481
|
data-wp-c16t="true"
|
|
483
482
|
data-wp-component="Elevation"
|
|
484
483
|
/>
|
|
@@ -519,14 +518,13 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
|
|
|
519
518
|
left: 0;
|
|
520
519
|
right: 0;
|
|
521
520
|
top: 0;
|
|
522
|
-
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
523
|
-
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
524
521
|
border-radius: 2px;
|
|
525
522
|
}
|
|
526
523
|
|
|
527
|
-
@media ( prefers-reduced-motion
|
|
524
|
+
@media not ( prefers-reduced-motion ) {
|
|
528
525
|
.emotion-4 {
|
|
529
|
-
transition
|
|
526
|
+
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
527
|
+
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
530
528
|
}
|
|
531
529
|
}
|
|
532
530
|
|
|
@@ -544,14 +542,13 @@ exports[`Card Card component should warn when the isElevated prop is passed 1`]
|
|
|
544
542
|
left: 0;
|
|
545
543
|
right: 0;
|
|
546
544
|
top: 0;
|
|
547
|
-
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
548
|
-
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
549
545
|
border-radius: 2px;
|
|
550
546
|
}
|
|
551
547
|
|
|
552
|
-
@media ( prefers-reduced-motion
|
|
548
|
+
@media not ( prefers-reduced-motion ) {
|
|
553
549
|
.emotion-6 {
|
|
554
|
-
transition
|
|
550
|
+
-webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
551
|
+
transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
|
|
555
552
|
}
|
|
556
553
|
}
|
|
557
554
|
|
|
@@ -16,6 +16,7 @@ import { Icon, check, reset } from '@wordpress/icons';
|
|
|
16
16
|
* Internal dependencies
|
|
17
17
|
*/
|
|
18
18
|
import BaseControl from '../base-control';
|
|
19
|
+
import { HStack } from '../h-stack';
|
|
19
20
|
import type { CheckboxControlProps } from './types';
|
|
20
21
|
import type { WordPressComponentProps } from '../context';
|
|
21
22
|
|
|
@@ -95,44 +96,52 @@ export function CheckboxControl(
|
|
|
95
96
|
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
|
|
96
97
|
label={ heading }
|
|
97
98
|
id={ id }
|
|
98
|
-
help={
|
|
99
|
+
help={
|
|
100
|
+
help && (
|
|
101
|
+
<span className="components-checkbox-control__help">
|
|
102
|
+
{ help }
|
|
103
|
+
</span>
|
|
104
|
+
)
|
|
105
|
+
}
|
|
99
106
|
className={ classnames( 'components-checkbox-control', className ) }
|
|
100
107
|
>
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
{ showIndeterminateIcon ? (
|
|
114
|
-
<Icon
|
|
115
|
-
icon={ reset }
|
|
116
|
-
className="components-checkbox-control__indeterminate"
|
|
117
|
-
role="presentation"
|
|
118
|
-
/>
|
|
119
|
-
) : null }
|
|
120
|
-
{ showCheckedIcon ? (
|
|
121
|
-
<Icon
|
|
122
|
-
icon={ check }
|
|
123
|
-
className="components-checkbox-control__checked"
|
|
124
|
-
role="presentation"
|
|
108
|
+
<HStack spacing={ 0 } justify="start" alignment="top">
|
|
109
|
+
<span className="components-checkbox-control__input-container">
|
|
110
|
+
<input
|
|
111
|
+
ref={ ref }
|
|
112
|
+
id={ id }
|
|
113
|
+
className="components-checkbox-control__input"
|
|
114
|
+
type="checkbox"
|
|
115
|
+
value="1"
|
|
116
|
+
onChange={ onChangeValue }
|
|
117
|
+
checked={ checked }
|
|
118
|
+
aria-describedby={ !! help ? id + '__help' : undefined }
|
|
119
|
+
{ ...additionalProps }
|
|
125
120
|
/>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{
|
|
134
|
-
|
|
135
|
-
|
|
121
|
+
{ showIndeterminateIcon ? (
|
|
122
|
+
<Icon
|
|
123
|
+
icon={ reset }
|
|
124
|
+
className="components-checkbox-control__indeterminate"
|
|
125
|
+
role="presentation"
|
|
126
|
+
/>
|
|
127
|
+
) : null }
|
|
128
|
+
{ showCheckedIcon ? (
|
|
129
|
+
<Icon
|
|
130
|
+
icon={ check }
|
|
131
|
+
className="components-checkbox-control__checked"
|
|
132
|
+
role="presentation"
|
|
133
|
+
/>
|
|
134
|
+
) : null }
|
|
135
|
+
</span>
|
|
136
|
+
{ label && (
|
|
137
|
+
<label
|
|
138
|
+
className="components-checkbox-control__label"
|
|
139
|
+
htmlFor={ id }
|
|
140
|
+
>
|
|
141
|
+
{ label }
|
|
142
|
+
</label>
|
|
143
|
+
) }
|
|
144
|
+
</HStack>
|
|
136
145
|
</BaseControl>
|
|
137
146
|
);
|
|
138
147
|
}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
.components-checkbox-control__label {
|
|
11
|
+
// Ensure label is aligned with checkbox along X axis
|
|
12
|
+
line-height: var(--checkbox-input-size);
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
.components-checkbox-control__input[type="checkbox"] {
|
|
11
16
|
@include checkbox-control;
|
|
12
17
|
background: $white;
|
|
@@ -50,10 +55,11 @@
|
|
|
50
55
|
.components-checkbox-control__input-container {
|
|
51
56
|
position: relative;
|
|
52
57
|
display: inline-block;
|
|
53
|
-
margin-right:
|
|
58
|
+
margin-right: $grid-unit-15;
|
|
54
59
|
vertical-align: middle;
|
|
55
60
|
width: var(--checkbox-input-size);
|
|
56
61
|
aspect-ratio: 1;
|
|
62
|
+
flex-shrink: 0;
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
svg.components-checkbox-control__checked,
|
|
@@ -75,3 +81,8 @@ svg.components-checkbox-control__indeterminate {
|
|
|
75
81
|
--checkmark-size: calc(var(--checkbox-input-size) + 4px);
|
|
76
82
|
}
|
|
77
83
|
}
|
|
84
|
+
|
|
85
|
+
.components-checkbox-control__help {
|
|
86
|
+
display: inline-block;
|
|
87
|
+
margin-inline-start: calc(var(--checkbox-input-size) + #{$grid-unit-15});
|
|
88
|
+
}
|