@wordpress/components 23.6.0 → 23.7.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 +32 -4
- package/build/angle-picker-control/angle-circle.js +1 -4
- package/build/angle-picker-control/angle-circle.js.map +1 -1
- package/build/angle-picker-control/index.js +10 -22
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +24 -15
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build/animate/index.js +27 -19
- package/build/animate/index.js.map +1 -1
- package/build/animate/types.js.map +1 -0
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/color-picker/color-input.js +0 -4
- package/build/color-picker/color-input.js.map +1 -1
- package/build/color-picker/component.js +5 -4
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/hex-input.js.map +1 -1
- package/build/color-picker/hsl-input.js.map +1 -1
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/color-picker/legacy-adapter.js.map +1 -1
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/rgb-input.js.map +1 -1
- package/build/color-picker/use-deprecated-props.js.map +1 -1
- package/build/custom-gradient-picker/constants.js +1 -1
- package/build/custom-gradient-picker/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +9 -5
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +14 -9
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +34 -54
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +45 -16
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +14 -4
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build/custom-gradient-picker/types.js +6 -0
- package/build/custom-gradient-picker/types.js.map +1 -0
- package/build/custom-gradient-picker/utils.js +17 -12
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
- package/build/duotone-picker/color-list-picker/index.js.map +1 -0
- package/build/duotone-picker/color-list-picker/types.js +6 -0
- package/build/duotone-picker/color-list-picker/types.js.map +1 -0
- package/build/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +39 -2
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/duotone-swatch.js.map +1 -1
- package/build/duotone-picker/index.js.map +1 -1
- package/build/duotone-picker/types.js +6 -0
- package/build/duotone-picker/types.js.map +1 -0
- package/build/duotone-picker/utils.js +13 -11
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/form-token-field/index.js +9 -3
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +61 -9
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js +6 -0
- package/build/gradient-picker/types.js.map +1 -0
- package/build/palette-edit/index.js +1 -2
- package/build/palette-edit/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.native.js +80 -67
- package/build/sandbox/index.native.js.map +1 -1
- package/build/tab-panel/index.js +1 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +45 -6
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/utils/input/input-control.js +1 -1
- package/build/utils/input/input-control.js.map +1 -1
- package/build-module/angle-picker-control/angle-circle.js +1 -4
- package/build-module/angle-picker-control/angle-circle.js.map +1 -1
- package/build-module/angle-picker-control/index.js +12 -21
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +20 -13
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
- package/build-module/animate/index.js +25 -17
- package/build-module/animate/index.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/color-picker/color-input.js +0 -4
- package/build-module/color-picker/color-input.js.map +1 -1
- package/build-module/color-picker/component.js +3 -3
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/hex-input.js.map +1 -1
- package/build-module/color-picker/hsl-input.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/color-picker/legacy-adapter.js.map +1 -1
- package/build-module/color-picker/picker.js +4 -0
- package/build-module/color-picker/picker.js.map +1 -1
- package/build-module/color-picker/rgb-input.js.map +1 -1
- package/build-module/color-picker/use-deprecated-props.js.map +1 -1
- package/build-module/custom-gradient-picker/constants.js +1 -1
- package/build-module/custom-gradient-picker/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/constants.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +9 -4
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +14 -8
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js +34 -54
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +44 -17
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js +14 -4
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js +6 -6
- package/build-module/custom-gradient-picker/styles/custom-gradient-picker-styles.js.map +1 -1
- package/build-module/custom-gradient-picker/types.js +2 -0
- package/build-module/custom-gradient-picker/utils.js +17 -12
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/{color-list-picker → duotone-picker/color-list-picker}/index.js +5 -5
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -0
- package/build-module/duotone-picker/color-list-picker/types.js +2 -0
- package/build-module/duotone-picker/color-list-picker/types.js.map +1 -0
- package/build-module/duotone-picker/custom-duotone-bar.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +38 -2
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/duotone-swatch.js.map +1 -1
- package/build-module/duotone-picker/index.js.map +1 -1
- package/build-module/duotone-picker/types.js +2 -0
- package/build-module/duotone-picker/types.js.map +1 -0
- package/build-module/duotone-picker/utils.js +17 -11
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/form-token-field/index.js +9 -4
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/gradient-picker/index.js +61 -10
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js +2 -0
- package/build-module/gradient-picker/types.js.map +1 -0
- package/build-module/palette-edit/index.js +1 -2
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.native.js +70 -58
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/tab-panel/index.js +2 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +45 -6
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/utils/input/input-control.js +1 -1
- package/build-module/utils/input/input-control.js.map +1 -1
- package/build-style/style-rtl.css +40 -28
- package/build-style/style.css +42 -28
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +5 -0
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animate/index.d.ts +27 -22
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/animate/stories/index.d.ts +18 -0
- package/build-types/animate/stories/index.d.ts.map +1 -0
- package/build-types/animate/types.d.ts +30 -0
- package/build-types/animate/types.d.ts.map +1 -0
- package/build-types/color-picker/color-input.d.ts +1 -11
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts +8 -9
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts +1 -10
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts +1 -10
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts +1 -9
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +1 -3
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +4 -7
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts +1 -10
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.d.ts +19 -0
- package/build-types/color-picker/stories/index.d.ts.map +1 -0
- package/build-types/color-picker/test/index.d.ts +2 -0
- package/build-types/color-picker/test/index.d.ts.map +1 -0
- package/build-types/color-picker/types.d.ts +105 -1
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts +1 -44
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/constants.d.ts +8 -8
- package/build-types/custom-gradient-picker/constants.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts +7 -7
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +5 -22
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +3 -9
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts +2 -0
- package/build-types/custom-gradient-picker/gradient-bar/test/utils.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts +44 -92
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +27 -6
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/serializer.d.ts +13 -16
- package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.d.ts +12 -0
- package/build-types/custom-gradient-picker/stories/index.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +3 -2
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/test/serializer.d.ts +2 -0
- package/build-types/custom-gradient-picker/test/serializer.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/types.d.ts +120 -0
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/utils.d.ts +12 -4
- package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -0
- package/build-types/{color-list-picker → duotone-picker/color-list-picker}/types.d.ts +2 -2
- package/build-types/duotone-picker/color-list-picker/types.d.ts.map +1 -0
- package/build-types/duotone-picker/custom-duotone-bar.d.ts +6 -0
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -0
- package/build-types/duotone-picker/duotone-picker.d.ts +38 -0
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -0
- package/build-types/duotone-picker/duotone-swatch.d.ts +5 -0
- package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -0
- package/build-types/duotone-picker/index.d.ts +3 -0
- package/build-types/duotone-picker/index.d.ts.map +1 -0
- package/build-types/duotone-picker/stories/duotone-picker.d.ts +12 -0
- package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +1 -0
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts +14 -0
- package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +1 -0
- package/build-types/duotone-picker/types.d.ts +60 -0
- package/build-types/duotone-picker/types.d.ts.map +1 -0
- package/build-types/duotone-picker/utils.d.ts +52 -0
- package/build-types/duotone-picker/utils.d.ts.map +1 -0
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +6 -0
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +49 -11
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.d.ts +14 -0
- package/build-types/gradient-picker/stories/index.d.ts.map +1 -0
- package/build-types/gradient-picker/types.d.ts +87 -0
- package/build-types/gradient-picker/types.d.ts.map +1 -0
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +1 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/utils/input/input-control.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/angle-picker-control/angle-circle.tsx +0 -1
- package/src/angle-picker-control/index.tsx +14 -27
- package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +16 -9
- package/src/animate/index.tsx +75 -0
- package/src/animate/stories/index.tsx +102 -0
- package/src/animate/types.ts +32 -0
- package/src/border-box-control/stories/index.tsx +1 -1
- package/src/box-control/axial-input-controls.tsx +1 -1
- package/src/circular-option-picker/style.scss +10 -0
- package/src/color-indicator/style.scss +1 -0
- package/src/color-picker/README.md +2 -2
- package/src/color-picker/color-input.tsx +1 -12
- package/src/color-picker/component.tsx +9 -18
- package/src/color-picker/hex-input.tsx +2 -7
- package/src/color-picker/hsl-input.tsx +2 -7
- package/src/color-picker/input-with-slider.tsx +1 -9
- package/src/color-picker/legacy-adapter.tsx +1 -2
- package/src/color-picker/picker.tsx +5 -6
- package/src/color-picker/rgb-input.tsx +2 -7
- package/src/color-picker/stories/index.tsx +51 -0
- package/src/color-picker/test/{index.js → index.tsx} +36 -18
- package/src/color-picker/types.ts +128 -1
- package/src/color-picker/use-deprecated-props.ts +2 -53
- package/src/combobox-control/stories/index.tsx +1 -1
- package/src/custom-gradient-picker/{constants.js → constants.ts} +2 -2
- package/src/custom-gradient-picker/gradient-bar/{control-points.js → control-points.tsx} +171 -134
- package/src/custom-gradient-picker/gradient-bar/{index.js → index.tsx} +32 -10
- package/src/custom-gradient-picker/gradient-bar/test/{utils.js → utils.ts} +58 -31
- package/src/custom-gradient-picker/gradient-bar/utils.ts +193 -0
- package/src/custom-gradient-picker/{index.js → index.tsx} +63 -22
- package/src/custom-gradient-picker/serializer.ts +82 -0
- package/src/custom-gradient-picker/stories/index.tsx +45 -0
- package/src/custom-gradient-picker/style.scss +25 -4
- package/src/custom-gradient-picker/test/{serializer.js → serializer.ts} +39 -33
- package/src/custom-gradient-picker/types.ts +137 -0
- package/src/custom-gradient-picker/{utils.js → utils.ts} +37 -22
- package/src/custom-select-control/test/index.js +6 -4
- package/src/{color-list-picker → duotone-picker/color-list-picker}/index.tsx +7 -6
- package/src/{color-list-picker → duotone-picker/color-list-picker}/types.ts +2 -2
- package/src/duotone-picker/{custom-duotone-bar.js → custom-duotone-bar.tsx} +7 -1
- package/src/duotone-picker/{duotone-picker.js → duotone-picker.tsx} +39 -2
- package/src/duotone-picker/{duotone-swatch.js → duotone-swatch.tsx} +2 -1
- package/src/duotone-picker/stories/{duotone-picker.js → duotone-picker.tsx} +15 -8
- package/src/duotone-picker/stories/{duotone-swatch.js → duotone-swatch.tsx} +9 -3
- package/src/duotone-picker/types.ts +61 -0
- package/src/duotone-picker/{utils.js → utils.ts} +29 -14
- package/src/flex/flex-item/README.md +1 -1
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/index.tsx +10 -3
- package/src/form-token-field/style.scss +0 -7
- package/src/form-token-field/test/index.tsx +1 -0
- package/src/form-token-field/types.ts +6 -0
- package/src/gradient-picker/README.md +16 -23
- package/src/gradient-picker/{index.js → index.tsx} +70 -16
- package/src/gradient-picker/stories/{index.js → index.tsx} +19 -8
- package/src/gradient-picker/types.ts +89 -0
- package/src/item-group/test/index.js +5 -3
- package/src/palette-edit/index.tsx +4 -5
- package/src/resizable-box/resize-tooltip/utils.ts +1 -1
- package/src/sandbox/index.native.js +71 -78
- package/src/slot-fill/test/slot.js +8 -6
- package/src/style.scss +1 -1
- package/src/tab-panel/index.tsx +7 -2
- package/src/tools-panel/test/index.tsx +86 -0
- package/src/tools-panel/tools-panel/hook.ts +44 -4
- package/src/tools-panel/types.ts +1 -0
- package/src/tooltip/test/index.js +251 -301
- package/src/utils/input/input-control.js +1 -0
- package/tsconfig.json +1 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/color-list-picker/index.js.map +0 -1
- package/build-module/color-list-picker/index.js.map +0 -1
- package/build-types/color-list-picker/index.d.ts.map +0 -1
- package/build-types/color-list-picker/types.d.ts.map +0 -1
- package/src/animate/index.js +0 -60
- package/src/animate/stories/index.js +0 -53
- package/src/color-picker/stories/index.js +0 -41
- package/src/custom-gradient-picker/gradient-bar/utils.js +0 -189
- package/src/custom-gradient-picker/serializer.js +0 -48
- package/src/custom-gradient-picker/stories/index.js +0 -33
- /package/build/{color-list-picker → animate}/types.js +0 -0
- /package/build-module/{color-list-picker → animate}/types.js +0 -0
- /package/build-module/{color-list-picker → animate}/types.js.map +0 -0
- /package/{build/color-list-picker → build-module/custom-gradient-picker}/types.js.map +0 -0
- /package/build-types/{color-list-picker → duotone-picker/color-list-picker}/index.d.ts +0 -0
- /package/src/custom-gradient-picker/gradient-bar/{constants.js → constants.ts} +0 -0
- /package/src/custom-gradient-picker/styles/{custom-gradient-picker-styles.js → custom-gradient-picker-styles.tsx} +0 -0
- /package/src/{color-list-picker → duotone-picker/color-list-picker}/style.scss +0 -0
- /package/src/duotone-picker/{index.js → index.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/resize-tooltip/utils.ts"],"names":[],"mappings":";AAQA,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,SAAS,CAAE,MAAM,OAAO,SAAS,CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/resizable-box/resize-tooltip/utils.ts"],"names":[],"mappings":";AAQA,MAAM,MAAM,IAAI,GAAG,GAAG,GAAG,GAAG,CAAC;AAE7B,eAAO,MAAM,SAAS;;;CAGZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAE,OAAO,SAAS,CAAE,CAAE,MAAM,OAAO,SAAS,CAAE,CAAC;AAEtE,UAAU,mBAAmB;IAC5B,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0DAA0D;IAC1D,cAAc,EAAE,GAAG,CAAC,OAAO,CAAC;CAC5B;AAED,UAAU,kBAAkB;IAC3B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAI,IAAI,CAAC;IACxE,QAAQ,EAAE,QAAQ,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAE,EAC/B,IAAI,EACJ,WAAiB,EACjB,QAAe,EACf,QAA2B,EAC3B,MAAc,GACd,EAAE,kBAAkB,GAAI,mBAAmB,CA8G3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tab-panel/index.tsx"],"names":[],"mappings":";AAqBA,OAAO,KAAK,EAAkB,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAoB7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,QAAQ,CAAE,EACzB,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,YAAmB,EACnB,cAAc,EACd,WAA0B,EAC1B,WAAyB,EACzB,QAAQ,GACR,EAAE,uBAAuB,CAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAE,eA+GxD;AAED,eAAe,QAAQ,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,cAAc,EACd,MAAM,UAAU,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,cAAc,EACd,MAAM,UAAU,CAAC;AAwDlB,wBAAgB,aAAa,CAC5B,KAAK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AAM,CAAC;IACvB,KAAK,EAAE,CAAE,MAAM,EAAE,OAAO,CAAE,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,WAAW,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,mBAAmB,CAAC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../../src/utils/input/input-control.js"],"names":[],"mappings":"AAaA,
|
|
1
|
+
{"version":3,"file":"input-control.d.ts","sourceRoot":"","sources":["../../../src/utils/input/input-control.js"],"names":[],"mappings":"AAaA,qEAiDE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.7.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
"@emotion/utils": "^1.0.0",
|
|
39
39
|
"@floating-ui/react-dom": "1.0.0",
|
|
40
40
|
"@use-gesture/react": "^10.2.24",
|
|
41
|
-
"@wordpress/a11y": "^3.
|
|
42
|
-
"@wordpress/compose": "^6.
|
|
43
|
-
"@wordpress/date": "^4.
|
|
44
|
-
"@wordpress/deprecated": "^3.
|
|
45
|
-
"@wordpress/dom": "^3.
|
|
46
|
-
"@wordpress/element": "^5.
|
|
47
|
-
"@wordpress/escape-html": "^2.
|
|
48
|
-
"@wordpress/hooks": "^3.
|
|
49
|
-
"@wordpress/html-entities": "^3.
|
|
50
|
-
"@wordpress/i18n": "^4.
|
|
51
|
-
"@wordpress/icons": "^9.
|
|
52
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
53
|
-
"@wordpress/keycodes": "^3.
|
|
54
|
-
"@wordpress/primitives": "^3.
|
|
55
|
-
"@wordpress/private-apis": "^0.
|
|
56
|
-
"@wordpress/rich-text": "^6.
|
|
57
|
-
"@wordpress/warning": "^2.
|
|
41
|
+
"@wordpress/a11y": "^3.30.0",
|
|
42
|
+
"@wordpress/compose": "^6.7.0",
|
|
43
|
+
"@wordpress/date": "^4.30.0",
|
|
44
|
+
"@wordpress/deprecated": "^3.30.0",
|
|
45
|
+
"@wordpress/dom": "^3.30.0",
|
|
46
|
+
"@wordpress/element": "^5.7.0",
|
|
47
|
+
"@wordpress/escape-html": "^2.30.0",
|
|
48
|
+
"@wordpress/hooks": "^3.30.0",
|
|
49
|
+
"@wordpress/html-entities": "^3.30.0",
|
|
50
|
+
"@wordpress/i18n": "^4.30.0",
|
|
51
|
+
"@wordpress/icons": "^9.21.0",
|
|
52
|
+
"@wordpress/is-shallow-equal": "^4.30.0",
|
|
53
|
+
"@wordpress/keycodes": "^3.30.0",
|
|
54
|
+
"@wordpress/primitives": "^3.28.0",
|
|
55
|
+
"@wordpress/private-apis": "^0.12.0",
|
|
56
|
+
"@wordpress/rich-text": "^6.7.0",
|
|
57
|
+
"@wordpress/warning": "^2.30.0",
|
|
58
58
|
"change-case": "^4.1.2",
|
|
59
59
|
"classnames": "^2.3.1",
|
|
60
60
|
"colord": "^2.7.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"publishConfig": {
|
|
86
86
|
"access": "public"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "d5c28a67b11e91e3e4b8e90346bfcb90909364d6"
|
|
89
89
|
}
|
|
@@ -9,19 +9,16 @@ import classnames from 'classnames';
|
|
|
9
9
|
*/
|
|
10
10
|
import deprecated from '@wordpress/deprecated';
|
|
11
11
|
import { forwardRef } from '@wordpress/element';
|
|
12
|
-
import { __ } from '@wordpress/i18n';
|
|
12
|
+
import { isRTL, __ } from '@wordpress/i18n';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
16
16
|
*/
|
|
17
|
-
import { FlexBlock
|
|
17
|
+
import { FlexBlock } from '../flex';
|
|
18
|
+
import { Spacer } from '../spacer';
|
|
18
19
|
import NumberControl from '../number-control';
|
|
19
20
|
import AngleCircle from './angle-circle';
|
|
20
|
-
import { Root } from './styles/angle-picker-control-styles';
|
|
21
|
-
import { space } from '../ui/utils/space';
|
|
22
|
-
import { Text } from '../text';
|
|
23
|
-
import { Spacer } from '../spacer';
|
|
24
|
-
import { COLORS } from '../utils/colors-values';
|
|
21
|
+
import { Root, UnitText } from './styles/angle-picker-control-styles';
|
|
25
22
|
|
|
26
23
|
import type { WordPressComponentProps } from '../ui/context';
|
|
27
24
|
import type { AnglePickerControlProps } from './types';
|
|
@@ -64,13 +61,18 @@ function UnforwardedAnglePickerControl(
|
|
|
64
61
|
|
|
65
62
|
const classes = classnames( 'components-angle-picker-control', className );
|
|
66
63
|
|
|
64
|
+
const unitText = <UnitText>°</UnitText>;
|
|
65
|
+
const [ prefixedUnitText, suffixedUnitText ] = isRTL()
|
|
66
|
+
? [ unitText, null ]
|
|
67
|
+
: [ null, unitText ];
|
|
68
|
+
|
|
67
69
|
return (
|
|
68
70
|
<Root
|
|
69
71
|
{ ...restProps }
|
|
70
72
|
ref={ ref }
|
|
71
73
|
__nextHasNoMarginBottom={ __nextHasNoMarginBottom }
|
|
72
74
|
className={ classes }
|
|
73
|
-
gap={
|
|
75
|
+
gap={ 2 }
|
|
74
76
|
>
|
|
75
77
|
<FlexBlock>
|
|
76
78
|
<NumberControl
|
|
@@ -83,32 +85,17 @@ function UnforwardedAnglePickerControl(
|
|
|
83
85
|
step="1"
|
|
84
86
|
value={ value }
|
|
85
87
|
spinControls="none"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
as={ Text }
|
|
89
|
-
marginBottom={ 0 }
|
|
90
|
-
marginRight={ space( 3 ) }
|
|
91
|
-
style={ {
|
|
92
|
-
color: COLORS.ui.theme,
|
|
93
|
-
} }
|
|
94
|
-
>
|
|
95
|
-
°
|
|
96
|
-
</Spacer>
|
|
97
|
-
}
|
|
88
|
+
prefix={ prefixedUnitText }
|
|
89
|
+
suffix={ suffixedUnitText }
|
|
98
90
|
/>
|
|
99
91
|
</FlexBlock>
|
|
100
|
-
<
|
|
101
|
-
style={ {
|
|
102
|
-
marginBottom: space( 1 ),
|
|
103
|
-
marginTop: 'auto',
|
|
104
|
-
} }
|
|
105
|
-
>
|
|
92
|
+
<Spacer marginBottom="1" marginTop="auto">
|
|
106
93
|
<AngleCircle
|
|
107
94
|
aria-hidden="true"
|
|
108
95
|
value={ value }
|
|
109
96
|
onChange={ onChange }
|
|
110
97
|
/>
|
|
111
|
-
</
|
|
98
|
+
</Spacer>
|
|
112
99
|
</Root>
|
|
113
100
|
);
|
|
114
101
|
}
|
|
@@ -10,12 +10,13 @@ import styled from '@emotion/styled';
|
|
|
10
10
|
import { Flex } from '../../flex';
|
|
11
11
|
import { COLORS } from '../../utils';
|
|
12
12
|
import { space } from '../../ui/utils/space';
|
|
13
|
+
import { Text } from '../../text';
|
|
13
14
|
import CONFIG from '../../utils/config-values';
|
|
14
15
|
|
|
15
16
|
import type { AnglePickerControlProps } from '../types';
|
|
16
17
|
|
|
17
18
|
const CIRCLE_SIZE = 32;
|
|
18
|
-
const INNER_CIRCLE_SIZE =
|
|
19
|
+
const INNER_CIRCLE_SIZE = 6;
|
|
19
20
|
|
|
20
21
|
const deprecatedBottomMargin = ( {
|
|
21
22
|
__nextHasNoMarginBottom,
|
|
@@ -39,6 +40,10 @@ export const CircleRoot = styled.div`
|
|
|
39
40
|
height: ${ CIRCLE_SIZE }px;
|
|
40
41
|
overflow: hidden;
|
|
41
42
|
width: ${ CIRCLE_SIZE }px;
|
|
43
|
+
|
|
44
|
+
:active {
|
|
45
|
+
cursor: grabbing;
|
|
46
|
+
}
|
|
42
47
|
`;
|
|
43
48
|
|
|
44
49
|
export const CircleIndicatorWrapper = styled.div`
|
|
@@ -55,15 +60,17 @@ export const CircleIndicatorWrapper = styled.div`
|
|
|
55
60
|
export const CircleIndicator = styled.div`
|
|
56
61
|
background: ${ COLORS.ui.theme };
|
|
57
62
|
border-radius: 50%;
|
|
58
|
-
border: ${ INNER_CIRCLE_SIZE }px solid ${ COLORS.ui.theme };
|
|
59
|
-
bottom: 0;
|
|
60
63
|
box-sizing: border-box;
|
|
61
64
|
display: block;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
left: 50%;
|
|
66
|
+
top: 4px;
|
|
67
|
+
transform: translateX( -50% );
|
|
65
68
|
position: absolute;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
width: ${ INNER_CIRCLE_SIZE }px;
|
|
70
|
+
height: ${ INNER_CIRCLE_SIZE }px;
|
|
71
|
+
`;
|
|
72
|
+
|
|
73
|
+
export const UnitText = styled( Text )`
|
|
74
|
+
color: ${ COLORS.ui.theme };
|
|
75
|
+
margin-right: ${ space( 3 ) };
|
|
69
76
|
`;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import type { AnimateProps, GetAnimateOptions } from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param type The animation type
|
|
13
|
+
* @return Default origin
|
|
14
|
+
*/
|
|
15
|
+
function getDefaultOrigin( type?: GetAnimateOptions[ 'type' ] ) {
|
|
16
|
+
return type === 'appear' ? 'top' : 'left';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param options
|
|
21
|
+
*
|
|
22
|
+
* @return ClassName that applies the animations
|
|
23
|
+
*/
|
|
24
|
+
export function getAnimateClassName( options: GetAnimateOptions ) {
|
|
25
|
+
if ( options.type === 'loading' ) {
|
|
26
|
+
return classnames( 'components-animate__loading' );
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const { type, origin = getDefaultOrigin( type ) } = options;
|
|
30
|
+
|
|
31
|
+
if ( type === 'appear' ) {
|
|
32
|
+
const [ yAxis, xAxis = 'center' ] = origin.split( ' ' );
|
|
33
|
+
return classnames( 'components-animate__appear', {
|
|
34
|
+
[ 'is-from-' + xAxis ]: xAxis !== 'center',
|
|
35
|
+
[ 'is-from-' + yAxis ]: yAxis !== 'middle',
|
|
36
|
+
} );
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if ( type === 'slide-in' ) {
|
|
40
|
+
return classnames(
|
|
41
|
+
'components-animate__slide-in',
|
|
42
|
+
'is-from-' + origin
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Simple interface to introduce animations to components.
|
|
51
|
+
*
|
|
52
|
+
* ```jsx
|
|
53
|
+
* import { Animate, Notice } from '@wordpress/components';
|
|
54
|
+
*
|
|
55
|
+
* const MyAnimatedNotice = () => (
|
|
56
|
+
* <Animate type="slide-in" options={ { origin: 'top' } }>
|
|
57
|
+
* { ( { className } ) => (
|
|
58
|
+
* <Notice className={ className } status="success">
|
|
59
|
+
* <p>Animation finished.</p>
|
|
60
|
+
* </Notice>
|
|
61
|
+
* ) }
|
|
62
|
+
* </Animate>
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
export function Animate( { type, options = {}, children }: AnimateProps ) {
|
|
67
|
+
return children( {
|
|
68
|
+
className: getAnimateClassName( {
|
|
69
|
+
type,
|
|
70
|
+
...options,
|
|
71
|
+
} as GetAnimateOptions ),
|
|
72
|
+
} );
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default Animate;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { Animate } from '..';
|
|
10
|
+
import Notice from '../../notice';
|
|
11
|
+
|
|
12
|
+
const meta: ComponentMeta< typeof Animate > = {
|
|
13
|
+
title: 'Components/Animate',
|
|
14
|
+
component: Animate,
|
|
15
|
+
parameters: {
|
|
16
|
+
controls: { expanded: true },
|
|
17
|
+
docs: { source: { state: 'open' } },
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
|
|
22
|
+
const Template: ComponentStory< typeof Animate > = ( props ) => (
|
|
23
|
+
<Animate { ...props } />
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export const Default: ComponentStory< typeof Animate > = Template.bind( {} );
|
|
27
|
+
Default.args = {
|
|
28
|
+
children: ( { className } ) => (
|
|
29
|
+
<Notice className={ className } status="success">
|
|
30
|
+
<p>{ `No default animation. Use one of type = "appear", "slide-in", or "loading".` }</p>
|
|
31
|
+
</Notice>
|
|
32
|
+
),
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const AppearTopLeft: ComponentStory< typeof Animate > = Template.bind(
|
|
36
|
+
{}
|
|
37
|
+
);
|
|
38
|
+
AppearTopLeft.args = {
|
|
39
|
+
type: 'appear',
|
|
40
|
+
options: { origin: 'top left' },
|
|
41
|
+
children: ( { className } ) => (
|
|
42
|
+
<Notice className={ className } status="success">
|
|
43
|
+
<p>Appear animation. Origin: top left.</p>
|
|
44
|
+
</Notice>
|
|
45
|
+
),
|
|
46
|
+
};
|
|
47
|
+
export const AppearTopRight: ComponentStory< typeof Animate > = Template.bind(
|
|
48
|
+
{}
|
|
49
|
+
);
|
|
50
|
+
AppearTopRight.args = {
|
|
51
|
+
type: 'appear',
|
|
52
|
+
options: { origin: 'top right' },
|
|
53
|
+
children: ( { className } ) => (
|
|
54
|
+
<Notice className={ className } status="success">
|
|
55
|
+
<p>Appear animation. Origin: top right.</p>
|
|
56
|
+
</Notice>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
export const AppearBottomLeft: ComponentStory< typeof Animate > = Template.bind(
|
|
60
|
+
{}
|
|
61
|
+
);
|
|
62
|
+
AppearBottomLeft.args = {
|
|
63
|
+
type: 'appear',
|
|
64
|
+
options: { origin: 'bottom left' },
|
|
65
|
+
children: ( { className } ) => (
|
|
66
|
+
<Notice className={ className } status="success">
|
|
67
|
+
<p>Appear animation. Origin: bottom left.</p>
|
|
68
|
+
</Notice>
|
|
69
|
+
),
|
|
70
|
+
};
|
|
71
|
+
export const AppearBottomRight: ComponentStory< typeof Animate > =
|
|
72
|
+
Template.bind( {} );
|
|
73
|
+
AppearBottomRight.args = {
|
|
74
|
+
type: 'appear',
|
|
75
|
+
options: { origin: 'bottom right' },
|
|
76
|
+
children: ( { className } ) => (
|
|
77
|
+
<Notice className={ className } status="success">
|
|
78
|
+
<p>Appear animation. Origin: bottom right.</p>
|
|
79
|
+
</Notice>
|
|
80
|
+
),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export const Loading: ComponentStory< typeof Animate > = Template.bind( {} );
|
|
84
|
+
Loading.args = {
|
|
85
|
+
type: 'loading',
|
|
86
|
+
children: ( { className } ) => (
|
|
87
|
+
<Notice className={ className } status="success">
|
|
88
|
+
<p>Loading animation.</p>
|
|
89
|
+
</Notice>
|
|
90
|
+
),
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export const SlideIn: ComponentStory< typeof Animate > = Template.bind( {} );
|
|
94
|
+
SlideIn.args = {
|
|
95
|
+
type: 'slide-in',
|
|
96
|
+
options: { origin: 'left' },
|
|
97
|
+
children: ( { className } ) => (
|
|
98
|
+
<Notice className={ className } status="success">
|
|
99
|
+
<p>Slide-in animation.</p>
|
|
100
|
+
</Notice>
|
|
101
|
+
),
|
|
102
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type AppearOptions = {
|
|
2
|
+
type: 'appear';
|
|
3
|
+
origin?:
|
|
4
|
+
| 'top'
|
|
5
|
+
| 'top left'
|
|
6
|
+
| 'top right'
|
|
7
|
+
| 'middle'
|
|
8
|
+
| 'middle left'
|
|
9
|
+
| 'middle right'
|
|
10
|
+
| 'bottom'
|
|
11
|
+
| 'bottom left'
|
|
12
|
+
| 'bottom right';
|
|
13
|
+
};
|
|
14
|
+
type SlideInOptions = { type: 'slide-in'; origin?: 'left' | 'right' };
|
|
15
|
+
type LoadingOptions = { type: 'loading'; origin?: never };
|
|
16
|
+
type NoAnimationOptions = { type?: never; origin?: never };
|
|
17
|
+
|
|
18
|
+
export type GetAnimateOptions =
|
|
19
|
+
| AppearOptions
|
|
20
|
+
| SlideInOptions
|
|
21
|
+
| LoadingOptions
|
|
22
|
+
| NoAnimationOptions;
|
|
23
|
+
|
|
24
|
+
// Create a new type that and distributes the `Pick` operator separately to
|
|
25
|
+
// every individual type of a union, thus preserving that same union.
|
|
26
|
+
type DistributiveTypeAndOptions< T extends { type?: any } > = T extends any
|
|
27
|
+
? Pick< T, 'type' > & { options?: Omit< T, 'type' > }
|
|
28
|
+
: never;
|
|
29
|
+
|
|
30
|
+
export type AnimateProps = DistributiveTypeAndOptions< GetAnimateOptions > & {
|
|
31
|
+
children: ( props: { className?: string } ) => JSX.Element;
|
|
32
|
+
};
|
|
@@ -43,7 +43,7 @@ const colors = [
|
|
|
43
43
|
|
|
44
44
|
const Template: ComponentStory< typeof BorderBoxControl > = ( props ) => {
|
|
45
45
|
const { onChange, ...otherProps } = props;
|
|
46
|
-
const [ borders, setBorders ] = useState< typeof props[ 'value' ] >();
|
|
46
|
+
const [ borders, setBorders ] = useState< ( typeof props )[ 'value' ] >();
|
|
47
47
|
|
|
48
48
|
const onChangeMerged: ComponentProps<
|
|
49
49
|
typeof BorderBoxControl
|
|
@@ -8,7 +8,7 @@ import { Layout } from './styles/box-control-styles';
|
|
|
8
8
|
import type { BoxControlInputControlProps } from './types';
|
|
9
9
|
|
|
10
10
|
const groupedSides = [ 'vertical', 'horizontal' ] as const;
|
|
11
|
-
type GroupedSide = typeof groupedSides[ number ];
|
|
11
|
+
type GroupedSide = ( typeof groupedSides )[ number ];
|
|
12
12
|
|
|
13
13
|
export default function AxialInputControls( {
|
|
14
14
|
onChange,
|
|
@@ -16,6 +16,16 @@ $color-palette-circle-spacing: 12px;
|
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-wrap: wrap;
|
|
18
18
|
gap: $color-palette-circle-spacing;
|
|
19
|
+
position: relative;
|
|
20
|
+
z-index: z-index(".components-circular-option-picker__swatches");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Make sure that the .components-circular-option-picker__swatches element
|
|
24
|
+
// renders visually on top of its siblings. This is necessary to make sure
|
|
25
|
+
// that the tooltip rendered when hovering an `Option` always appears on top.
|
|
26
|
+
> *:not(.components-circular-option-picker__swatches) {
|
|
27
|
+
position: relative;
|
|
28
|
+
z-index: z-index("> *:not(.components-circular-option-picker__swatches)");
|
|
19
29
|
}
|
|
20
30
|
}
|
|
21
31
|
|
|
@@ -31,13 +31,13 @@ The current color value to display in the picker. Must be a hex or hex8 string.
|
|
|
31
31
|
|
|
32
32
|
### `onChange`: `(hex8Color: string) => void`
|
|
33
33
|
|
|
34
|
-
Fired when the color changes. Always passes a hex8 color string.
|
|
34
|
+
Fired when the color changes. Always passes a hex or hex8 color string.
|
|
35
35
|
|
|
36
36
|
- Required: No
|
|
37
37
|
|
|
38
38
|
### `enableAlpha`: `boolean`
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
When `true` the color picker will display the alpha channel both in the bottom inputs as well as in the color picker itself.
|
|
41
41
|
|
|
42
42
|
- Required: No
|
|
43
43
|
- Default: `false`
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { Colord } from 'colord';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
9
4
|
import { RgbInput } from './rgb-input';
|
|
10
5
|
import { HslInput } from './hsl-input';
|
|
11
6
|
import { HexInput } from './hex-input';
|
|
12
|
-
|
|
13
|
-
interface ColorInputProps {
|
|
14
|
-
colorType: 'hsl' | 'hex' | 'rgb';
|
|
15
|
-
color: Colord;
|
|
16
|
-
onChange: ( nextColor: Colord ) => void;
|
|
17
|
-
enableAlpha: boolean;
|
|
18
|
-
}
|
|
7
|
+
import type { ColorInputProps } from './types';
|
|
19
8
|
|
|
20
9
|
export const ColorInput = ( {
|
|
21
10
|
colorType,
|
|
@@ -15,11 +15,7 @@ import { __ } from '@wordpress/i18n';
|
|
|
15
15
|
/**
|
|
16
16
|
* Internal dependencies
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
19
|
-
useContextSystem,
|
|
20
|
-
contextConnect,
|
|
21
|
-
WordPressComponentProps,
|
|
22
|
-
} from '../ui/context';
|
|
18
|
+
import { useContextSystem, contextConnect } from '../ui/context';
|
|
23
19
|
import {
|
|
24
20
|
ColorfulWrapper,
|
|
25
21
|
SelectControl,
|
|
@@ -32,26 +28,18 @@ import { ColorInput } from './color-input';
|
|
|
32
28
|
import { Picker } from './picker';
|
|
33
29
|
import { useControlledValue } from '../utils/hooks';
|
|
34
30
|
|
|
35
|
-
import type { ColorType } from './types';
|
|
31
|
+
import type { ColorPickerProps, ColorType } from './types';
|
|
36
32
|
|
|
37
33
|
extend( [ namesPlugin ] );
|
|
38
34
|
|
|
39
|
-
export interface ColorPickerProps {
|
|
40
|
-
enableAlpha?: boolean;
|
|
41
|
-
color?: string;
|
|
42
|
-
onChange?: ( color: string ) => void;
|
|
43
|
-
defaultValue?: string;
|
|
44
|
-
copyFormat?: ColorType;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
const options = [
|
|
48
36
|
{ label: 'RGB', value: 'rgb' as const },
|
|
49
37
|
{ label: 'HSL', value: 'hsl' as const },
|
|
50
38
|
{ label: 'Hex', value: 'hex' as const },
|
|
51
39
|
];
|
|
52
40
|
|
|
53
|
-
const
|
|
54
|
-
props:
|
|
41
|
+
const UnconnectedColorPicker = (
|
|
42
|
+
props: ColorPickerProps,
|
|
55
43
|
forwardedRef: ForwardedRef< any >
|
|
56
44
|
) => {
|
|
57
45
|
const {
|
|
@@ -124,6 +112,9 @@ const ColorPicker = (
|
|
|
124
112
|
);
|
|
125
113
|
};
|
|
126
114
|
|
|
127
|
-
const
|
|
115
|
+
export const ColorPicker = contextConnect(
|
|
116
|
+
UnconnectedColorPicker,
|
|
117
|
+
'ColorPicker'
|
|
118
|
+
);
|
|
128
119
|
|
|
129
|
-
export default
|
|
120
|
+
export default ColorPicker;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { colord
|
|
4
|
+
import { colord } from 'colord';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -17,12 +17,7 @@ import { Spacer } from '../spacer';
|
|
|
17
17
|
import { space } from '../ui/utils/space';
|
|
18
18
|
import { COLORS } from '../utils/colors-values';
|
|
19
19
|
import type { StateReducer } from '../input-control/reducer/state';
|
|
20
|
-
|
|
21
|
-
interface HexInputProps {
|
|
22
|
-
color: Colord;
|
|
23
|
-
onChange: ( nextColor: Colord ) => void;
|
|
24
|
-
enableAlpha: boolean;
|
|
25
|
-
}
|
|
20
|
+
import type { HexInputProps } from './types';
|
|
26
21
|
|
|
27
22
|
export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
|
|
28
23
|
const handleChange = ( nextValue: string | undefined ) => {
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import { colord
|
|
4
|
+
import { colord } from 'colord';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { InputWithSlider } from './input-with-slider';
|
|
10
|
-
|
|
11
|
-
interface HslInputProps {
|
|
12
|
-
color: Colord;
|
|
13
|
-
onChange: ( nextColor: Colord ) => void;
|
|
14
|
-
enableAlpha: boolean;
|
|
15
|
-
}
|
|
10
|
+
import type { HslInputProps } from './types';
|
|
16
11
|
|
|
17
12
|
export const HslInput = ( { color, onChange, enableAlpha }: HslInputProps ) => {
|
|
18
13
|
const { h, s, l, a } = color.toHsl();
|
|
@@ -7,15 +7,7 @@ import { Spacer } from '../spacer';
|
|
|
7
7
|
import { space } from '../ui/utils/space';
|
|
8
8
|
import { RangeControl, NumberControlWrapper } from './styles';
|
|
9
9
|
import { COLORS } from '../utils/colors-values';
|
|
10
|
-
|
|
11
|
-
interface InputWithSliderProps {
|
|
12
|
-
min: number;
|
|
13
|
-
max: number;
|
|
14
|
-
value: number;
|
|
15
|
-
label: string;
|
|
16
|
-
abbreviation: string;
|
|
17
|
-
onChange: ( value: number ) => void;
|
|
18
|
-
}
|
|
10
|
+
import type { InputWithSliderProps } from './types';
|
|
19
11
|
|
|
20
12
|
export const InputWithSlider = ( {
|
|
21
13
|
min,
|