@wordpress/components 19.16.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 +40 -4
- 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/styles.js +17 -25
- 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/index.js +10 -5
- 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 +35 -0
- package/build/box-control/utils.js.map +1 -1
- package/build/color-picker/styles.js +10 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/combobox-control/index.js +14 -6
- package/build/combobox-control/index.js.map +1 -1
- package/build/custom-select-control/index.js +3 -1
- 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/external-link/index.js +6 -0
- package/build/external-link/index.js.map +1 -1
- package/build/flex/flex/component.js +9 -9
- 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 +9 -9
- 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 +9 -9
- 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/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/font-size-picker/index.js +15 -6
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +6 -2
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +19 -6
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/index.js +7 -1
- package/build/index.js.map +1 -1
- package/build/input-control/input-base.js +1 -2
- package/build/input-control/input-base.js.map +1 -1
- 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 +26 -26
- package/build/input-control/styles/input-control-styles.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 +23 -2
- 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/picker/index.ios.js +16 -3
- package/build/mobile/picker/index.ios.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 +113 -62
- package/build/popover/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +40 -40
- package/build/range-control/styles/range-control-styles.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/select-control/styles/select-control-styles.js +6 -6
- package/build/select-control/styles/select-control-styles.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/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/ui/tooltip/styles.js +4 -4
- package/build/ui/tooltip/styles.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +34 -9
- 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-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/styles.js +18 -26
- 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/index.js +4 -4
- 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 +33 -0
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/color-picker/styles.js +9 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/combobox-control/index.js +13 -6
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +2 -1
- 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/external-link/index.js +6 -0
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/flex/flex/component.js +9 -9
- 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 +9 -9
- 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 +9 -9
- 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/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/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 +5 -2
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +19 -6
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/input-control/input-base.js +1 -2
- package/build-module/input-control/input-base.js.map +1 -1
- 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 +27 -27
- package/build-module/input-control/styles/input-control-styles.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 +25 -4
- 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/picker/index.ios.js +14 -3
- package/build-module/mobile/picker/index.ios.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 +112 -62
- package/build-module/popover/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +40 -40
- package/build-module/range-control/styles/range-control-styles.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/select-control/styles/select-control-styles.js +6 -6
- package/build-module/select-control/styles/select-control-styles.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/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/ui/tooltip/styles.js +4 -4
- package/build-module/ui/tooltip/styles.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +35 -9
- 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-style/style-rtl.css +50 -30
- package/build-style/style.css +52 -30
- 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/styles.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/styles.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/external-link/index.d.ts.map +1 -1
- package/build-types/flex/flex/component.d.ts +5 -4
- 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 +5 -4
- 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 +5 -4
- 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 +15 -11
- 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/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 +15 -3
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- 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/styles/input-control-styles.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/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.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/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/ui/tooltip/styles.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +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.map +1 -1
- package/build-types/unit-control/types.d.ts +1 -7
- 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/package.json +17 -17
- 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 +9 -5
- package/src/base-control/types.ts +0 -1
- package/src/border-control/styles.ts +2 -1
- package/src/box-control/all-input-control.js +3 -27
- package/src/box-control/index.js +5 -6
- package/src/box-control/styles/box-control-styles.js +1 -2
- package/src/box-control/utils.js +32 -0
- package/src/color-picker/styles.ts +3 -0
- package/src/combobox-control/README.md +7 -0
- package/src/combobox-control/index.js +14 -4
- package/src/combobox-control/stories/index.js +49 -5
- package/src/custom-gradient-picker/style.scss +0 -12
- package/src/custom-select-control/index.js +3 -2
- package/src/custom-select-control/style.scss +1 -5
- package/src/date-time/time/index.tsx +7 -5
- package/src/date-time/time/styles.ts +3 -6
- package/src/external-link/index.tsx +10 -0
- package/src/flex/flex/README.md +19 -13
- package/src/flex/flex/{component.js → component.tsx} +15 -10
- 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 -3
- package/src/flex/flex-block/{component.js → component.tsx} +15 -10
- 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 -5
- package/src/flex/flex-item/{component.js → component.tsx} +15 -10
- 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 +15 -11
- 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/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 +5 -2
- package/src/form-token-field/stories/index.tsx +14 -0
- package/src/form-token-field/style.scss +0 -5
- package/src/form-token-field/suggestions-list.tsx +21 -12
- package/src/form-token-field/types.ts +16 -2
- package/src/index.js +4 -1
- package/src/input-control/input-base.tsx +0 -1
- 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/styles/input-control-styles.tsx +3 -1
- package/src/input-control/test/index.js +20 -4
- package/src/mobile/global-styles-context/utils.native.js +21 -4
- package/src/mobile/image/index.native.js +27 -2
- package/src/mobile/link-picker/link-picker-screen.native.js +12 -4
- package/src/mobile/picker/index.ios.js +16 -0
- package/src/mobile/picker/styles.native.scss +8 -0
- 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 +7 -0
- package/src/popover/index.js +144 -70
- package/src/popover/stories/index.js +199 -98
- package/src/popover/style.scss +60 -6
- package/src/popover/test/index.js +23 -1
- package/src/range-control/styles/range-control-styles.ts +0 -12
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +1 -1
- package/src/select-control/styles/select-control-styles.ts +0 -1
- 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/text/hook.js +5 -3
- package/src/toggle-group-control/test/__snapshots__/index.js.snap +24 -0
- 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/hook.ts +6 -1
- package/src/ui/tooltip/styles.js +1 -0
- package/src/ui/tooltip/test/__snapshots__/index.js.snap +1 -0
- package/src/unit-control/stories/index.tsx +16 -23
- package/src/unit-control/styles/unit-control-styles.ts +93 -41
- package/src/unit-control/types.ts +1 -7
- 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/tsconfig.json +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/src/flex/stories/index.js +0 -29
- package/src/flex/test/index.js +0 -77
- package/src/placeholder/stories/index.js +0 -44
- package/src/popover/stories/_utils.js +0 -64
- package/src/style-provider/index.js +0 -31
|
@@ -5,7 +5,7 @@ import type { Reducer, SyntheticEvent } from 'react';
|
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
|
-
import type { InputAction } from './actions';
|
|
8
|
+
import type { Action, InputAction } from './actions';
|
|
9
9
|
export interface InputState {
|
|
10
10
|
_event?: SyntheticEvent;
|
|
11
11
|
error: unknown;
|
|
@@ -16,7 +16,7 @@ export interface InputState {
|
|
|
16
16
|
isPressEnterToChange: boolean;
|
|
17
17
|
value?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare type StateReducer = Reducer<InputState, InputAction>;
|
|
19
|
+
export declare type StateReducer<SpecializedAction = {}> = Reducer<InputState, SpecializedAction extends Action ? InputAction | SpecializedAction : InputAction>;
|
|
20
20
|
export declare const initialStateReducer: StateReducer;
|
|
21
21
|
export declare const initialInputControlState: InputState;
|
|
22
22
|
//# sourceMappingURL=state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/input-control/reducer/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAErD;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/input-control/reducer/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAErD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,WAAW,UAAU;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,YAAY,CAAE,iBAAiB,GAAG,EAAE,IAAK,OAAO,CAC3D,UAAU,EACV,iBAAiB,SAAS,MAAM,GAC7B,WAAW,GAAG,iBAAiB,GAC/B,WAAW,CACd,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAA6C,CAAC;AAEhF,eAAO,MAAM,wBAAwB,EAAE,UAQtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-control-styles.d.ts","sourceRoot":"","sources":["../../../src/input-control/styles/input-control-styles.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGpD,aAAK,cAAc,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,aAAK,SAAS,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AA6BF,eAAO,MAAM,IAAI;;;;;;sBAMhB,CAAC;AAgCF,eAAO,MAAM,SAAS;;;0HAWrB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAE,QAAQ,CAAE,CAAC;IACvC,kBAAkB,CAAC,EAAE,aAAa,CAAE,oBAAoB,CAAE,CAAC;IAC3D,gBAAgB,CAAC,EAAE,aAAa,CAAE,kBAAkB,CAAE,CAAC;CACvD,CAAC;AA+BF,eAAO,MAAM,aAAa,gDAGvB,UAAU;;;;;;;;;;;;;;;;;;CAqCZ,CAAC;AA+CF,eAAO,MAAM,KAAK;;;+HAuBjB,CAAC;
|
|
1
|
+
{"version":3,"file":"input-control-styles.d.ts","sourceRoot":"","sources":["../../../src/input-control/styles/input-control-styles.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGpD,aAAK,cAAc,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,aAAK,SAAS,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AA6BF,eAAO,MAAM,IAAI;;;;;;sBAMhB,CAAC;AAgCF,eAAO,MAAM,SAAS;;;0HAWrB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAE,QAAQ,CAAE,CAAC;IACvC,kBAAkB,CAAC,EAAE,aAAa,CAAE,oBAAoB,CAAE,CAAC;IAC3D,gBAAgB,CAAC,EAAE,aAAa,CAAE,kBAAkB,CAAE,CAAC;CACvD,CAAC;AA+BF,eAAO,MAAM,aAAa,gDAGvB,UAAU;;;;;;;;;;;;;;;;;;CAqCZ,CAAC;AA+CF,eAAO,MAAM,KAAK;;;+HAuBjB,CAAC;AAkCF,eAAO,MAAM,KAAK,UACV,wBACN;IAAE,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,EACtD,OAAO,EACP,KAAK,CACL,gBACwC,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;;UAExB,CAAC;AAEF,aAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA0BF,eAAO,MAAM,UAAU;;;yHAgBtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAKlB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PlaceholderProps } from './types';
|
|
3
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
4
|
+
/**
|
|
5
|
+
* Renders a placeholder. Normally used by blocks to render their empty state.
|
|
6
|
+
*
|
|
7
|
+
* ```jsx
|
|
8
|
+
* import { Placeholder } from '@wordpress/components';
|
|
9
|
+
* import { more } from '@wordpress/icons';
|
|
10
|
+
*
|
|
11
|
+
* const MyPlaceholder = () => <Placeholder icon={ more } label="Placeholder" />;
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare function Placeholder<IconProps = unknown>(props: Omit<WordPressComponentProps<PlaceholderProps<IconProps>, 'div', false>, 'ref'>): JSX.Element;
|
|
15
|
+
export default Placeholder;
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/placeholder/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAc7D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAE,SAAS,GAAG,OAAO,EAG/C,KAAK,EAAE,IAAI,CACV,uBAAuB,CAAE,gBAAgB,CAAE,SAAS,CAAE,EAAE,KAAK,EAAE,KAAK,CAAE,EACtE,KAAK,CACL,eA4DD;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import Placeholder from '../';
|
|
9
|
+
declare const meta: ComponentMeta<typeof Placeholder>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof Placeholder>;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/placeholder/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQtE;;GAEG;AACH,OAAO,WAAW,MAAM,KAAK,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAiB5C,CAAC;AACF,eAAe,IAAI,CAAC;AAmBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAEvD,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { IconType } from '../icon';
|
|
9
|
+
export declare type PlaceholderProps<IconProps = unknown> = {
|
|
10
|
+
/**
|
|
11
|
+
* The children elements.
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Class to set on the container div.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* If provided, renders an icon next to the label.
|
|
20
|
+
*/
|
|
21
|
+
icon?: IconType<IconProps>;
|
|
22
|
+
/**
|
|
23
|
+
* Instructions of the placeholder.
|
|
24
|
+
*/
|
|
25
|
+
instructions?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Changes placeholder children layout from flex-row to flex-column.
|
|
28
|
+
*/
|
|
29
|
+
isColumnLayout?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Title of the placeholder.
|
|
32
|
+
*/
|
|
33
|
+
label?: string;
|
|
34
|
+
/**
|
|
35
|
+
* A rendered notices list
|
|
36
|
+
*/
|
|
37
|
+
notices?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Preview to be rendered in the placeholder.
|
|
40
|
+
*/
|
|
41
|
+
preview?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Outputs a placeholder illustration.
|
|
44
|
+
*/
|
|
45
|
+
withIllustration?: boolean;
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/placeholder/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,oBAAY,gBAAgB,CAAE,SAAS,GAAG,OAAO,IAAK;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAE,SAAS,CAAE,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
|
|
@@ -20,7 +20,7 @@ declare const PopoverContainer: import("react").ForwardRefExoticComponent<Pick<{
|
|
|
20
20
|
onFocusOutside: any;
|
|
21
21
|
__unstableSlotName?: string | undefined;
|
|
22
22
|
__unstableObserveElement: any;
|
|
23
|
-
__unstableForcePosition
|
|
23
|
+
__unstableForcePosition?: boolean | undefined;
|
|
24
24
|
__unstableShift?: boolean | undefined;
|
|
25
25
|
}, string | number> & import("react").RefAttributes<any>>;
|
|
26
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";AA4eA;;;;;;;;;;;;;;;;;;;;;;;0DAA+C"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility used to compute the popover position over the xAxis
|
|
3
|
+
*
|
|
4
|
+
* @param {Object} anchorRect Anchor Rect.
|
|
5
|
+
* @param {Object} contentSize Content Size.
|
|
6
|
+
* @param {string} xAxis Desired xAxis.
|
|
7
|
+
* @param {string} corner Desired corner.
|
|
8
|
+
* @param {boolean} stickyBoundaryElement The boundary element to use when
|
|
9
|
+
* switching between sticky and normal
|
|
10
|
+
* position.
|
|
11
|
+
* @param {string} chosenYAxis yAxis to be used.
|
|
12
|
+
* @param {Element} boundaryElement Boundary element.
|
|
13
|
+
* @param {boolean} forcePosition Don't adjust position based on anchor.
|
|
14
|
+
* @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
|
|
15
|
+
*
|
|
16
|
+
* @return {Object} Popover xAxis position and constraints.
|
|
17
|
+
*/
|
|
18
|
+
export function computePopoverXAxisPosition(anchorRect: Object, contentSize: Object, xAxis: string, corner: string, stickyBoundaryElement: boolean, chosenYAxis: string, boundaryElement: Element, forcePosition: boolean, forceXAlignment: boolean): Object;
|
|
19
|
+
/**
|
|
20
|
+
* Utility used to compute the popover position over the yAxis
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} anchorRect Anchor Rect.
|
|
23
|
+
* @param {Object} contentSize Content Size.
|
|
24
|
+
* @param {string} yAxis Desired yAxis.
|
|
25
|
+
* @param {string} corner Desired corner.
|
|
26
|
+
* @param {boolean} stickyBoundaryElement The boundary element to use when switching between sticky
|
|
27
|
+
* and normal position.
|
|
28
|
+
* @param {Element} anchorRef The anchor element.
|
|
29
|
+
* @param {Element} relativeOffsetTop If applicable, top offset of the relative positioned
|
|
30
|
+
* parent container.
|
|
31
|
+
* @param {boolean} forcePosition Don't adjust position based on anchor.
|
|
32
|
+
* @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
|
|
33
|
+
* scroll position to determine sticky behavior.
|
|
34
|
+
* @return {Object} Popover xAxis position and constraints.
|
|
35
|
+
*/
|
|
36
|
+
export function computePopoverYAxisPosition(anchorRect: Object, contentSize: Object, yAxis: string, corner: string, stickyBoundaryElement: boolean, anchorRef: Element, relativeOffsetTop: Element, forcePosition: boolean, editorWrapper: Element | null): Object;
|
|
37
|
+
/**
|
|
38
|
+
* Utility used to compute the popover position and the content max width/height for a popover given
|
|
39
|
+
* its anchor rect and its content size.
|
|
40
|
+
*
|
|
41
|
+
* @param {Object} anchorRect Anchor Rect.
|
|
42
|
+
* @param {Object} contentSize Content Size.
|
|
43
|
+
* @param {string} position Position.
|
|
44
|
+
* @param {boolean} stickyBoundaryElement The boundary element to use when switching between
|
|
45
|
+
* sticky and normal position.
|
|
46
|
+
* @param {Element} anchorRef The anchor element.
|
|
47
|
+
* @param {number} relativeOffsetTop If applicable, top offset of the relative positioned
|
|
48
|
+
* parent container.
|
|
49
|
+
* @param {Element} boundaryElement Boundary element.
|
|
50
|
+
* @param {boolean} forcePosition Don't adjust position based on anchor.
|
|
51
|
+
* @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
|
|
52
|
+
* @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
|
|
53
|
+
* scroll position to determine sticky behavior.
|
|
54
|
+
* @return {Object} Popover position and constraints.
|
|
55
|
+
*/
|
|
56
|
+
export function computePopoverPosition(anchorRect: Object, contentSize: Object, position: string | undefined, stickyBoundaryElement: boolean, anchorRef: Element, relativeOffsetTop: number, boundaryElement: Element, forcePosition: boolean, forceXAlignment: boolean, editorWrapper: Element | null): Object;
|
|
57
|
+
/**
|
|
58
|
+
* Offsets the given rect by the position of the iframe that contains the
|
|
59
|
+
* element. If the owner document is not in an iframe then it returns with the
|
|
60
|
+
* original rect. If the popover container document and the anchor document are
|
|
61
|
+
* the same, the original rect will also be returned.
|
|
62
|
+
*
|
|
63
|
+
* @param {DOMRect} rect bounds of the element
|
|
64
|
+
* @param {Document} ownerDocument document of the element
|
|
65
|
+
* @param {Element} container The popover container to position.
|
|
66
|
+
*
|
|
67
|
+
* @return {DOMRect} offsetted bounds
|
|
68
|
+
*/
|
|
69
|
+
export function offsetIframe(rect: DOMRect, ownerDocument: Document, container: Element): DOMRect;
|
|
70
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/popover/utils.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;GAgBG;AACH,wDAdW,MAAM,eACN,MAAM,SACN,MAAM,UACN,MAAM,yBACN,OAAO,eAGP,MAAM,mBACN,OAAO,iBACP,OAAO,mBACP,OAAO,GAEN,MAAM,CAoIjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wDAdW,MAAM,eACN,MAAM,SACN,MAAM,UACN,MAAM,yBACN,OAAO,aAEP,OAAO,qBACP,OAAO,iBAEP,OAAO,iBACP,OAAO,GAAC,IAAI,GAEX,MAAM,CAiIjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,mDAfW,MAAM,eACN,MAAM,uDAEN,OAAO,aAEP,OAAO,qBACP,MAAM,mBAEN,OAAO,iBACP,OAAO,mBACP,OAAO,iBACP,OAAO,GAAC,IAAI,GAEX,MAAM,CA2CjB;AAED;;;;;;;;;;;GAWG;AACH,mCANW,OAAO,iBACP,QAAQ,aACR,OAAO,GAEN,OAAO,CAiBlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-control-styles.d.ts","sourceRoot":"","sources":["../../../src/range-control/styles/range-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EACX,cAAc,EAEd,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,IAAI;;;
|
|
1
|
+
{"version":3,"file":"range-control-styles.d.ts","sourceRoot":"","sources":["../../../src/range-control/styles/range-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EACX,cAAc,EAEd,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,IAAI;;;yGAShB,CAAC;AAQF,eAAO,MAAM,OAAO;;;wHAUnB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;2GAI7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;2GAI5B,CAAC;AAYF,eAAO,MAAM,IAAI;;;;;;;;;;;;2GAahB,CAAC;AAYF,eAAO,MAAM,KAAK;;;wHAWjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;2GAMxB,CAAC;AAcF,eAAO,MAAM,IAAI;;;4HAQhB,CAAC;AAQF,eAAO,MAAM,SAAS;;;4HAUrB,CAAC;AAWF,eAAO,MAAM,YAAY;;;wHAoBxB,CAAC;AAoBF,eAAO,MAAM,KAAK;;;wHAWjB,CAAC;AAEF,eAAO,MAAM,UAAU;;;kHAatB,CAAC;AAsBF,eAAO,MAAM,OAAO;;;0HAuBnB,CAAC;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;UAWvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;2GAW9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,UAAU,WACT,SAAQ,IAAI,CAAE,kBAAkB,EAAE,uBAAuB,GAAG,UAAU,CAAE;IAGxE,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAsGD,eAAO,MAAM,MAAM;;;mIAkBlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;
|
|
1
|
+
{"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,UAAU,WACT,SAAQ,IAAI,CAAE,kBAAkB,EAAE,uBAAuB,GAAG,UAAU,CAAE;IAGxE,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAsGD,eAAO,MAAM,MAAM;;;mIAkBlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAc5B,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { StyleProviderProps } from './types';
|
|
6
|
+
export declare function StyleProvider(props: StyleProviderProps): JSX.Element | null;
|
|
7
|
+
export default StyleProvider;
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-provider/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-provider/index.tsx"],"names":[],"mappings":";AAQA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiBlD,wBAAgB,aAAa,CAAE,KAAK,EAAE,kBAAkB,sBAUvD;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
export declare type StyleProviderProps = {
|
|
6
|
+
/**
|
|
7
|
+
* The children elements.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Current document.
|
|
12
|
+
*/
|
|
13
|
+
document: Document;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/style-provider/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,kBAAkB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/swatch/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,EAAE,WAAW,eAMrC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/swatch/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oBAAY,WAAW,GAAG;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,CAAC;CACrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/text/hook.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/text/hook.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH,uCAFW,OAAO,eAAe,EAAE,uBAAuB,CAAC,OAAO,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuK1F"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ToolsPanel: import("@emotion/utils").SerializedStyles;
|
|
1
|
+
export declare const ToolsPanel: (columns: number) => import("@emotion/utils").SerializedStyles;
|
|
2
2
|
/**
|
|
3
3
|
* Items injected into a ToolsPanel via a virtual bubbling slot will require
|
|
4
4
|
* an inner dom element to be injected. The following rule allows for the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,UAAU,YAAc,MAAM,8CAO1C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,0BAA0B,YAAc,MAAM,8CAS1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,2CAIxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAmB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,2CAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,2CA0C1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,2CAErC,CAAC;AAEF,eAAO,MAAM,YAAY,2CAExB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA+BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,EACf,MAAM,UAAU,CAAC;AA+BlB,wBAAgB,aAAa,CAC5B,KAAK,EAAE,uBAAuB,CAAE,eAAe,EAAE,KAAK,CAAE;;;qCAmD9C,MAAM;;uCA0CN,MAAM,UAAS,qBAAqB;;;;;;kCA/DrC,cAAc;;;;;;wBA4Hb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgHhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/styles.js"],"names":[],"mappings":"AAeA,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/styles.js"],"names":[],"mappings":"AAeA,uEAYE;AAEF;;;0GAME;AAEF,kEAEE;AAEF;;;;;;WAGE"}
|
|
@@ -21,7 +21,7 @@ import type { StateReducer } from '../input-control/reducer/state';
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export declare const UnitControl: import("react").ForwardRefExoticComponent<Pick<Omit<import("./types").UnitSelectControlProps, "unit"> & Pick<import("../input-control/types").InputControlProps, "prefix" | "hideLabelFromVision" | "__next36pxDefaultSize"> & {
|
|
24
|
-
__unstableStateReducer?: StateReducer | undefined;
|
|
24
|
+
__unstableStateReducer?: StateReducer<{}> | undefined;
|
|
25
25
|
__unstableInputWidth?: import("csstype").Property.Width<string | number> | undefined;
|
|
26
26
|
disableUnits?: boolean | undefined;
|
|
27
27
|
isPressEnterToChange?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unit-control/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unit-control/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CA2B5C,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAC7B,CAAC;AAK5B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAE,OAAO,WAAW,CACxC,CAAC;AAU5B;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAE,OAAO,WAAW,CAC5C,CAAC;AAS5B;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,WAAW,CACpC,CAAC;AAM5B;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAE,OAAO,WAAW,CAgB/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-control-styles.d.ts","sourceRoot":"","sources":["../../../src/unit-control/styles/unit-control-styles.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"unit-control-styles.d.ts","sourceRoot":"","sources":["../../../src/unit-control/styles/unit-control-styles.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,aAAK,WAAW,GAAG;IAClB,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI;;;yGAQhB,CAAC;AAiBF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;uBAWtB,CAAC;AAmCF,eAAO,MAAM,SAAS;;;uHAQrB,CAAC;AA+CF,eAAO,MAAM,UAAU;;;mIAqBtB,CAAC"}
|
|
@@ -33,7 +33,7 @@ export declare type WPUnitControlUnit = {
|
|
|
33
33
|
export declare type UnitControlOnChangeCallback = InputChangeCallback<SyntheticEvent<HTMLSelectElement | HTMLInputElement>, {
|
|
34
34
|
data?: WPUnitControlUnit;
|
|
35
35
|
}>;
|
|
36
|
-
export declare type UnitSelectControlProps = {
|
|
36
|
+
export declare type UnitSelectControlProps = Pick<InputControlProps, 'size'> & {
|
|
37
37
|
/**
|
|
38
38
|
* Whether the control can be focused via keyboard navigation.
|
|
39
39
|
*
|
|
@@ -44,12 +44,6 @@ export declare type UnitSelectControlProps = {
|
|
|
44
44
|
* A callback function invoked when the value is changed.
|
|
45
45
|
*/
|
|
46
46
|
onChange?: UnitControlOnChangeCallback;
|
|
47
|
-
/**
|
|
48
|
-
* Size of the control option. Supports "default" and "small".
|
|
49
|
-
*
|
|
50
|
-
* @default 'default'
|
|
51
|
-
*/
|
|
52
|
-
size?: SelectSize;
|
|
53
47
|
/**
|
|
54
48
|
* Current unit.
|
|
55
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9E;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,IAAI,IAAI,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,UAAU,GAAG,SAAS,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,2BAA2B,GAAG,mBAAmB,CAC5D,cAAc,CAAE,iBAAiB,GAAG,gBAAgB,CAAE,EACtD;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAC5B,CAAC;AAEF,oBAAY,sBAAsB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE9E;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,KAAK,EACX,mBAAmB,EACnB,iBAAiB,EACjB,IAAI,IAAI,SAAS,EACjB,MAAM,wBAAwB,CAAC;AAEhC,oBAAY,UAAU,GAAG,SAAS,CAAC;AAEnC,oBAAY,iBAAiB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,oBAAY,2BAA2B,GAAG,mBAAmB,CAC5D,cAAc,CAAE,iBAAiB,GAAG,gBAAgB,CAAE,EACtD;IAAE,IAAI,CAAC,EAAE,iBAAiB,CAAA;CAAE,CAC5B,CAAC;AAEF,oBAAY,sBAAsB,GAAG,IAAI,CAAE,iBAAiB,EAAE,MAAM,CAAE,GAAG;IACxE;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,EAAE,2BAA2B,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC5B,CAAC;AAGF,oBAAY,gBAAgB,GAAG,IAAI,CAAE,sBAAsB,EAAE,MAAM,CAAE,GACpE,IAAI,CACH,iBAAiB,EACjB,qBAAqB,GAAG,QAAQ,GAAG,uBAAuB,CAC1D,GAAG;IACH,sBAAsB,CAAC,EAAE,YAAY,CAAC;IACtC,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,2BAA2B,CAAC;IAC3C;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAE,gBAAgB,GAAG,iBAAiB,CAAE,CAAC;CACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-label.d.ts","sourceRoot":"","sources":["../../src/utils/base-label.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,2CAK/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"box-sizing.d.ts","sourceRoot":"","sources":["../../src/utils/box-sizing.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,2CAQ1B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { MutableRefObject, RefCallback } from 'react';
|
|
5
|
+
declare type Ref<T> = MutableRefObject<T | null> | RefCallback<T | null>;
|
|
6
|
+
export declare function useCombinedRef<T extends HTMLElement>(...refs: Ref<T>[]): MutableRefObject<null>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=use-combined-ref.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-combined-ref.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-combined-ref.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3D,aAAK,GAAG,CAAE,CAAC,IAAK,gBAAgB,CAAE,CAAC,GAAG,IAAI,CAAE,GAAG,WAAW,CAAE,CAAC,GAAG,IAAI,CAAE,CAAC;AAEvE,wBAAgB,cAAc,CAAE,CAAC,SAAS,WAAW,EAAI,GAAG,IAAI,EAAE,GAAG,CAAE,CAAC,CAAE,EAAE,0BAgB3E"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { boxSizingReset } from "./box-sizing";
|
|
1
2
|
export { rgba } from "./colors";
|
|
2
3
|
export { reduceMotion } from "./reduce-motion";
|
|
3
4
|
export { rtl } from "./rtl";
|
|
@@ -5,4 +6,5 @@ export { font } from "./font";
|
|
|
5
6
|
export { breakpoint } from "./breakpoint";
|
|
6
7
|
export { default as CONFIG } from "./config-values";
|
|
7
8
|
export { COLORS } from "./colors-values";
|
|
9
|
+
export { baseLabelTypography } from "./base-label";
|
|
8
10
|
//# sourceMappingURL=style-mixins.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.17.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,21 +38,21 @@
|
|
|
38
38
|
"@emotion/utils": "1.0.0",
|
|
39
39
|
"@floating-ui/react-dom": "0.6.3",
|
|
40
40
|
"@use-gesture/react": "^10.2.6",
|
|
41
|
-
"@wordpress/a11y": "^3.
|
|
42
|
-
"@wordpress/compose": "^5.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^4.
|
|
47
|
-
"@wordpress/escape-html": "^2.
|
|
48
|
-
"@wordpress/hooks": "^3.
|
|
49
|
-
"@wordpress/i18n": "^4.
|
|
50
|
-
"@wordpress/icons": "^9.
|
|
51
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
52
|
-
"@wordpress/keycodes": "^3.
|
|
53
|
-
"@wordpress/primitives": "^3.
|
|
54
|
-
"@wordpress/rich-text": "^5.
|
|
55
|
-
"@wordpress/warning": "^2.
|
|
41
|
+
"@wordpress/a11y": "^3.15.0",
|
|
42
|
+
"@wordpress/compose": "^5.13.0",
|
|
43
|
+
"@wordpress/date": "^4.15.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.15.0",
|
|
45
|
+
"@wordpress/dom": "^3.15.0",
|
|
46
|
+
"@wordpress/element": "^4.13.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.15.0",
|
|
48
|
+
"@wordpress/hooks": "^3.15.0",
|
|
49
|
+
"@wordpress/i18n": "^4.15.0",
|
|
50
|
+
"@wordpress/icons": "^9.6.0",
|
|
51
|
+
"@wordpress/is-shallow-equal": "^4.15.0",
|
|
52
|
+
"@wordpress/keycodes": "^3.15.0",
|
|
53
|
+
"@wordpress/primitives": "^3.13.0",
|
|
54
|
+
"@wordpress/rich-text": "^5.13.0",
|
|
55
|
+
"@wordpress/warning": "^2.15.0",
|
|
56
56
|
"classnames": "^2.3.1",
|
|
57
57
|
"colord": "^2.7.0",
|
|
58
58
|
"dom-scroll-into-view": "^1.2.1",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "08358f53b627a15148c3a3e433cdf58cf8714aa4"
|
|
81
81
|
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classnames from 'classnames';
|
|
5
|
-
import type { FunctionComponent } from 'react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Internal dependencies
|
|
@@ -16,6 +15,7 @@ import {
|
|
|
16
15
|
StyledHelp,
|
|
17
16
|
StyledVisualLabel,
|
|
18
17
|
} from './styles/base-control-styles';
|
|
18
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* `BaseControl` is a component used to generate labels and help text for components handling user inputs.
|
|
@@ -104,12 +104,14 @@ export const BaseControl = ( {
|
|
|
104
104
|
* </BaseControl>
|
|
105
105
|
* );
|
|
106
106
|
*/
|
|
107
|
-
export const VisualLabel
|
|
107
|
+
export const VisualLabel = ( {
|
|
108
108
|
className,
|
|
109
109
|
children,
|
|
110
|
-
|
|
110
|
+
...props
|
|
111
|
+
}: WordPressComponentProps< BaseControlVisualLabelProps, 'span' > ) => {
|
|
111
112
|
return (
|
|
112
113
|
<StyledVisualLabel
|
|
114
|
+
{ ...props }
|
|
113
115
|
className={ classnames(
|
|
114
116
|
'components-base-control__label',
|
|
115
117
|
className
|
|
@@ -60,6 +60,7 @@ WithHelpText.args = {
|
|
|
60
60
|
export const WithVisualLabel: ComponentStory< typeof BaseControl > = (
|
|
61
61
|
props
|
|
62
62
|
) => {
|
|
63
|
+
// @ts-expect-error - Unclear how to fix, see also https://github.com/WordPress/gutenberg/pull/39468#discussion_r827150516
|
|
63
64
|
BaseControl.VisualLabel.displayName = 'BaseControl.VisualLabel';
|
|
64
65
|
|
|
65
66
|
return (
|
|
@@ -7,12 +7,14 @@ import { css } from '@emotion/react';
|
|
|
7
7
|
/**
|
|
8
8
|
* Internal dependencies
|
|
9
9
|
*/
|
|
10
|
-
import { font, COLORS } from '../../utils';
|
|
10
|
+
import { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';
|
|
11
11
|
import { space } from '../../ui/utils/space';
|
|
12
12
|
|
|
13
13
|
export const Wrapper = styled.div`
|
|
14
14
|
font-family: ${ font( 'default.fontFamily' ) };
|
|
15
15
|
font-size: ${ font( 'default.fontSize' ) };
|
|
16
|
+
|
|
17
|
+
${ boxSizingReset }
|
|
16
18
|
`;
|
|
17
19
|
|
|
18
20
|
const deprecatedMarginField = ( { __nextHasNoMarginBottom = false } ) => {
|
|
@@ -33,12 +35,10 @@ export const StyledField = styled.div`
|
|
|
33
35
|
`;
|
|
34
36
|
|
|
35
37
|
const labelStyles = css`
|
|
38
|
+
${ baseLabelTypography };
|
|
39
|
+
|
|
36
40
|
display: inline-block;
|
|
37
41
|
margin-bottom: ${ space( 2 ) };
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
export const StyledLabel = styled.label`
|
|
41
|
-
${ labelStyles }
|
|
42
42
|
/**
|
|
43
43
|
* Removes Chrome/Safari/Firefox user agent stylesheet padding from
|
|
44
44
|
* StyledLabel when it is rendered as a legend.
|
|
@@ -46,6 +46,10 @@ export const StyledLabel = styled.label`
|
|
|
46
46
|
padding: 0;
|
|
47
47
|
`;
|
|
48
48
|
|
|
49
|
+
export const StyledLabel = styled.label`
|
|
50
|
+
${ labelStyles }
|
|
51
|
+
`;
|
|
52
|
+
|
|
49
53
|
const deprecatedMarginHelp = ( { __nextHasNoMarginBottom = false } ) => {
|
|
50
54
|
return (
|
|
51
55
|
! __nextHasNoMarginBottom &&
|
|
@@ -6,7 +6,7 @@ import { css } from '@emotion/react';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { COLORS, CONFIG, rtl } from '../utils';
|
|
9
|
+
import { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';
|
|
10
10
|
import { space } from '../ui/utils/space';
|
|
11
11
|
import {
|
|
12
12
|
StyledField,
|
|
@@ -31,6 +31,7 @@ export const borderControl = css`
|
|
|
31
31
|
border: 0;
|
|
32
32
|
padding: 0;
|
|
33
33
|
margin: 0;
|
|
34
|
+
${ boxSizingReset }
|
|
34
35
|
`;
|
|
35
36
|
|
|
36
37
|
export const innerWrapper = () => css`
|