@wordpress/components 30.9.0 → 31.0.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 +26 -4
- package/build/alignment-matrix-control/cell.js +131 -3
- package/build/alignment-matrix-control/cell.js.map +4 -4
- package/build/alignment-matrix-control/index.js +134 -6
- package/build/alignment-matrix-control/index.js.map +3 -3
- package/build/angle-picker-control/angle-circle.js +119 -15
- package/build/angle-picker-control/angle-circle.js.map +4 -4
- package/build/angle-picker-control/index.js +12 -7
- package/build/angle-picker-control/index.js.map +3 -3
- package/build/dropdown-menu/index.js +1 -1
- package/build/dropdown-menu/index.js.map +2 -2
- package/build/form-token-field/index.js +1 -13
- package/build/form-token-field/index.js.map +3 -3
- package/build/menu/styles.js +17 -17
- package/build/menu/styles.js.map +2 -2
- package/build/menu-item/index.js +1 -1
- package/build/menu-item/index.js.map +2 -2
- package/build/notice/index.js +1 -1
- package/build/notice/index.js.map +2 -2
- package/build/query-controls/index.js +0 -1
- package/build/query-controls/index.js.map +2 -2
- package/build/snackbar/index.js +1 -1
- package/build/snackbar/index.js.map +1 -1
- package/build/validated-form-controls/components/checkbox-control.js +0 -10
- package/build/validated-form-controls/components/checkbox-control.js.map +2 -2
- package/build/validated-form-controls/components/combobox-control.js +1 -11
- package/build/validated-form-controls/components/combobox-control.js.map +2 -2
- package/build/validated-form-controls/components/custom-select-control.js +0 -10
- package/build/validated-form-controls/components/custom-select-control.js.map +2 -2
- package/build/validated-form-controls/components/form-token-field.js +2 -13
- package/build/validated-form-controls/components/form-token-field.js.map +2 -2
- package/build/validated-form-controls/components/input-control.js +0 -10
- package/build/validated-form-controls/components/input-control.js.map +2 -2
- package/build/validated-form-controls/components/number-control.js +0 -10
- package/build/validated-form-controls/components/number-control.js.map +2 -2
- package/build/validated-form-controls/components/radio-control.js +0 -10
- package/build/validated-form-controls/components/radio-control.js.map +2 -2
- package/build/validated-form-controls/components/range-control.js +0 -10
- package/build/validated-form-controls/components/range-control.js.map +2 -2
- package/build/validated-form-controls/components/select-control.js +0 -10
- package/build/validated-form-controls/components/select-control.js.map +2 -2
- package/build/validated-form-controls/components/text-control.js +0 -10
- package/build/validated-form-controls/components/text-control.js.map +2 -2
- package/build/validated-form-controls/components/textarea-control.js +0 -10
- package/build/validated-form-controls/components/textarea-control.js.map +2 -2
- package/build/validated-form-controls/components/toggle-control.js +0 -10
- package/build/validated-form-controls/components/toggle-control.js.map +2 -2
- package/build/validated-form-controls/components/toggle-group-control.js +0 -10
- package/build/validated-form-controls/components/toggle-group-control.js.map +2 -2
- package/build/validated-form-controls/control-with-error.js +53 -58
- package/build/validated-form-controls/control-with-error.js.map +2 -2
- package/build-module/alignment-matrix-control/cell.js +131 -3
- package/build-module/alignment-matrix-control/cell.js.map +3 -3
- package/build-module/alignment-matrix-control/index.js +134 -6
- package/build-module/alignment-matrix-control/index.js.map +3 -3
- package/build-module/angle-picker-control/angle-circle.js +109 -15
- package/build-module/angle-picker-control/angle-circle.js.map +3 -3
- package/build-module/angle-picker-control/index.js +12 -7
- package/build-module/angle-picker-control/index.js.map +2 -2
- package/build-module/dropdown-menu/index.js +1 -1
- package/build-module/dropdown-menu/index.js.map +2 -2
- package/build-module/form-token-field/index.js +1 -13
- package/build-module/form-token-field/index.js.map +2 -2
- package/build-module/menu/styles.js +17 -17
- package/build-module/menu/styles.js.map +2 -2
- package/build-module/menu-item/index.js +1 -1
- package/build-module/menu-item/index.js.map +2 -2
- package/build-module/notice/index.js +1 -1
- package/build-module/notice/index.js.map +2 -2
- package/build-module/query-controls/index.js +0 -1
- package/build-module/query-controls/index.js.map +2 -2
- package/build-module/snackbar/index.js +1 -1
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/validated-form-controls/components/checkbox-control.js +0 -10
- package/build-module/validated-form-controls/components/checkbox-control.js.map +2 -2
- package/build-module/validated-form-controls/components/combobox-control.js +1 -11
- package/build-module/validated-form-controls/components/combobox-control.js.map +2 -2
- package/build-module/validated-form-controls/components/custom-select-control.js +0 -10
- package/build-module/validated-form-controls/components/custom-select-control.js.map +2 -2
- package/build-module/validated-form-controls/components/form-token-field.js +2 -13
- package/build-module/validated-form-controls/components/form-token-field.js.map +2 -2
- package/build-module/validated-form-controls/components/input-control.js +0 -10
- package/build-module/validated-form-controls/components/input-control.js.map +2 -2
- package/build-module/validated-form-controls/components/number-control.js +0 -10
- package/build-module/validated-form-controls/components/number-control.js.map +2 -2
- package/build-module/validated-form-controls/components/radio-control.js +0 -10
- package/build-module/validated-form-controls/components/radio-control.js.map +2 -2
- package/build-module/validated-form-controls/components/range-control.js +0 -10
- package/build-module/validated-form-controls/components/range-control.js.map +2 -2
- package/build-module/validated-form-controls/components/select-control.js +0 -10
- package/build-module/validated-form-controls/components/select-control.js.map +2 -2
- package/build-module/validated-form-controls/components/text-control.js +0 -10
- package/build-module/validated-form-controls/components/text-control.js.map +2 -2
- package/build-module/validated-form-controls/components/textarea-control.js +0 -10
- package/build-module/validated-form-controls/components/textarea-control.js.map +2 -2
- package/build-module/validated-form-controls/components/toggle-control.js +0 -10
- package/build-module/validated-form-controls/components/toggle-control.js.map +2 -2
- package/build-module/validated-form-controls/components/toggle-group-control.js +0 -10
- package/build-module/validated-form-controls/components/toggle-group-control.js.map +2 -2
- package/build-module/validated-form-controls/control-with-error.js +53 -58
- package/build-module/validated-form-controls/control-with-error.js.map +2 -2
- package/build-style/style-rtl.css +21 -33
- package/build-style/style.css +21 -33
- package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts +1 -1
- 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/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +0 -6
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/checkbox-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/combobox-control.d.ts +2 -3
- package/build-types/validated-form-controls/components/combobox-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/custom-select-control.d.ts +1 -2
- package/build-types/validated-form-controls/components/custom-select-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/form-token-field.d.ts +1 -2
- package/build-types/validated-form-controls/components/form-token-field.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/input-control.d.ts +1 -2
- package/build-types/validated-form-controls/components/input-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/number-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/number-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/radio-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/range-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/select-control.d.ts +2 -3
- package/build-types/validated-form-controls/components/select-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/checkbox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/combobox-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/custom-select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/form-token-field.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/input-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts +7 -0
- package/build-types/validated-form-controls/components/stories/overview.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/radio-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/range-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/text-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/text-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/text-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/textarea-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/textarea-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/toggle-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/toggle-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts +1 -1
- package/build-types/validated-form-controls/components/toggle-group-control.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/types.d.ts +1 -9
- package/build-types/validated-form-controls/components/types.d.ts.map +1 -1
- package/build-types/validated-form-controls/control-with-error.d.ts +4 -5
- package/build-types/validated-form-controls/control-with-error.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/alignment-matrix-control/cell.tsx +14 -3
- package/src/alignment-matrix-control/index.tsx +15 -6
- package/src/alignment-matrix-control/style.module.scss +84 -0
- package/src/angle-picker-control/angle-circle.tsx +27 -12
- package/src/angle-picker-control/index.tsx +8 -7
- package/src/angle-picker-control/style.module.scss +40 -0
- package/src/button/style.scss +1 -1
- package/src/dropdown-menu/index.tsx +1 -1
- package/src/dropdown-menu/style.scss +1 -1
- package/src/form-token-field/README.md +0 -2
- package/src/form-token-field/index.tsx +1 -13
- package/src/form-token-field/stories/index.story.tsx +0 -2
- package/src/form-token-field/test/index.tsx +0 -1
- package/src/form-token-field/types.ts +0 -6
- package/src/guide/style.scss +3 -3
- package/src/menu/styles.ts +2 -2
- package/src/menu-item/index.tsx +1 -1
- package/src/menu-item/test/__snapshots__/index.js.snap +4 -4
- package/src/modal/style.scss +5 -5
- package/src/notice/index.tsx +53 -46
- package/src/notice/stories/index.story.tsx +17 -1
- package/src/notice/style.scss +3 -20
- package/src/query-controls/index.tsx +0 -1
- package/src/snackbar/index.tsx +1 -1
- package/src/validated-form-controls/components/checkbox-control.tsx +1 -14
- package/src/validated-form-controls/components/combobox-control.tsx +1 -14
- package/src/validated-form-controls/components/custom-select-control.tsx +1 -19
- package/src/validated-form-controls/components/form-token-field.tsx +4 -21
- package/src/validated-form-controls/components/input-control.tsx +1 -14
- package/src/validated-form-controls/components/number-control.tsx +1 -16
- package/src/validated-form-controls/components/radio-control.tsx +2 -18
- package/src/validated-form-controls/components/range-control.tsx +1 -14
- package/src/validated-form-controls/components/select-control.tsx +1 -23
- package/src/validated-form-controls/components/stories/checkbox-control.story.tsx +11 -20
- package/src/validated-form-controls/components/stories/combobox-control.story.tsx +8 -17
- package/src/validated-form-controls/components/stories/custom-select-control.story.tsx +8 -17
- package/src/validated-form-controls/components/stories/form-token-field.story.tsx +14 -26
- package/src/validated-form-controls/components/stories/input-control.story.tsx +25 -50
- package/src/validated-form-controls/components/stories/number-control.story.tsx +10 -19
- package/src/validated-form-controls/components/stories/overview.mdx +3 -3
- package/src/validated-form-controls/components/stories/overview.story.tsx +94 -79
- package/src/validated-form-controls/components/stories/radio-control.story.tsx +11 -20
- package/src/validated-form-controls/components/stories/range-control.story.tsx +8 -17
- package/src/validated-form-controls/components/stories/select-control.story.tsx +9 -18
- package/src/validated-form-controls/components/stories/text-control.story.tsx +11 -17
- package/src/validated-form-controls/components/stories/textarea-control.story.tsx +12 -16
- package/src/validated-form-controls/components/stories/toggle-control.story.tsx +11 -20
- package/src/validated-form-controls/components/stories/toggle-group-control.story.tsx +8 -17
- package/src/validated-form-controls/components/text-control.tsx +1 -14
- package/src/validated-form-controls/components/textarea-control.tsx +1 -14
- package/src/validated-form-controls/components/toggle-control.tsx +1 -14
- package/src/validated-form-controls/components/toggle-group-control.tsx +1 -14
- package/src/validated-form-controls/components/types.ts +1 -9
- package/src/validated-form-controls/control-with-error.tsx +57 -84
- package/src/validated-form-controls/style.scss +7 -7
- package/src/validated-form-controls/test/control-with-error.tsx +66 -5
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/alignment-matrix-control/styles.js +0 -105
- package/build/alignment-matrix-control/styles.js.map +0 -7
- package/build/angle-picker-control/styles/angle-picker-control-styles.js +0 -88
- package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +0 -7
- package/build-module/alignment-matrix-control/styles.js +0 -67
- package/build-module/alignment-matrix-control/styles.js.map +0 -7
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +0 -50
- package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +0 -7
- package/build-types/alignment-matrix-control/styles.d.ts +0 -21
- package/build-types/alignment-matrix-control/styles.d.ts.map +0 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +0 -18
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +0 -1
- package/src/alignment-matrix-control/styles.ts +0 -113
- package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +0 -58
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/input-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAOvD;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAKzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAgB7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,
|
|
1
|
+
{"version":3,"file":"input-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/input-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAOvD;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAKzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAgB7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAuB3D,CAAC;AAOF;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CAqD5D,CAAC"}
|
package/build-types/validated-form-controls/components/stories/number-control.story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/number-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAc9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,
|
|
1
|
+
{"version":3,"file":"number-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/number-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAc9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,CA0B5D,CAAC"}
|
|
@@ -29,4 +29,11 @@ export declare const WithHelpTextReplacement: Story;
|
|
|
29
29
|
* They may be unnecessary when responses are generally quick.
|
|
30
30
|
*/
|
|
31
31
|
export declare const AsyncValidation: StoryObj<typeof ValidatedInputControl>;
|
|
32
|
+
/**
|
|
33
|
+
* Custom validity errors are effective immediately, even when they are not yet visible
|
|
34
|
+
* to the user. For example, in this form where the initial value is already invalid,
|
|
35
|
+
* the error message will be shown to the user once the submit button is clicked,
|
|
36
|
+
* even if the input has never been interacted with.
|
|
37
|
+
*/
|
|
38
|
+
export declare const CustomErrorsOnSubmit: StoryObj<typeof ValidatedInputControl>;
|
|
32
39
|
//# sourceMappingURL=overview.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/overview.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"overview.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/overview.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAUvD;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,IAAI,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,gBAAgB,CAIxC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,gBAAgB,CAAE,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAwClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA0CrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA4DnE,CAAC;AAgFF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA2BxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/radio-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAU7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,
|
|
1
|
+
{"version":3,"file":"radio-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/radio-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAU7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA4B3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/range-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAU7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,
|
|
1
|
+
{"version":3,"file":"range-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/range-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CAU7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,qBAAqB,CA0B3D,CAAC"}
|
package/build-types/validated-form-controls/components/stories/select-control.story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/select-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAU9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,
|
|
1
|
+
{"version":3,"file":"select-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/select-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAU9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,CAuB5D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/text-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,oBAAoB,CAU5C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,oBAAoB,
|
|
1
|
+
{"version":3,"file":"text-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/text-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,oBAAoB,CAU5C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,oBAAoB,CA0B1D,CAAC"}
|
package/build-types/validated-form-controls/components/stories/textarea-control.story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/textarea-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,wBAAwB,CAQhD,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,wBAAwB,
|
|
1
|
+
{"version":3,"file":"textarea-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/textarea-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,wBAAwB,CAQhD,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,wBAAwB,CA4B9D,CAAC"}
|
package/build-types/validated-form-controls/components/stories/toggle-control.story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/toggle-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAU9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,
|
|
1
|
+
{"version":3,"file":"toggle-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/toggle-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,sBAAsB,CAU9C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,sBAAsB,CAuB5D,CAAC"}
|
package/build-types/validated-form-controls/components/stories/toggle-group-control.story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/toggle-group-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAGtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,2BAA2B,CAUnD,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,2BAA2B,
|
|
1
|
+
{"version":3,"file":"toggle-group-control.story.d.ts","sourceRoot":"","sources":["../../../../src/validated-form-controls/components/stories/toggle-group-control.story.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAGtE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,2BAA2B,CAUnD,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAE,OAAO,2BAA2B,CA4BjE,CAAC"}
|
|
@@ -4,5 +4,5 @@ export declare const ValidatedTextControl: import("react").ForwardRefExoticCompo
|
|
|
4
4
|
value: string | number;
|
|
5
5
|
type?: "date" | "datetime-local" | "email" | "number" | "password" | "tel" | "text" | "time" | "search" | "url";
|
|
6
6
|
__next40pxDefaultSize?: boolean;
|
|
7
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "help" | "label" | "className" | "type" | "children" | "onChange" | "value" | "as" | "__next40pxDefaultSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>, "__next40pxDefaultSize" | "__nextHasNoMarginBottom"> & ValidatedControlProps
|
|
7
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "help" | "label" | "className" | "type" | "children" | "onChange" | "value" | "as" | "__next40pxDefaultSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>, "__next40pxDefaultSize" | "__nextHasNoMarginBottom"> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
8
8
|
//# sourceMappingURL=text-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/text-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"text-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/text-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAoCrD,eAAO,MAAM,oBAAoB;;;;;8dAEhC,CAAC"}
|
|
@@ -3,5 +3,5 @@ export declare const ValidatedTextareaControl: import("react").ForwardRefExoticC
|
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
value: string;
|
|
5
5
|
rows?: import("react").TextareaHTMLAttributes<HTMLTextAreaElement>["rows"];
|
|
6
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "help" | "label" | "children" | "onChange" | "value" | "rows" | "as" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLTextAreaElement>, "__nextHasNoMarginBottom"> & ValidatedControlProps
|
|
6
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "help" | "label" | "children" | "onChange" | "value" | "rows" | "as" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLTextAreaElement>, "__nextHasNoMarginBottom"> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
//# sourceMappingURL=textarea-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/textarea-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"textarea-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/textarea-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAmCrD,eAAO,MAAM,wBAAwB;;;;2aAEpC,CAAC"}
|
|
@@ -3,5 +3,5 @@ export declare const ValidatedToggleControl: import("react").ForwardRefExoticCom
|
|
|
3
3
|
help?: import("react").ReactNode | ((checked: boolean) => import("react").ReactNode);
|
|
4
4
|
label: import("react").ReactNode;
|
|
5
5
|
onChange: (value: boolean) => void;
|
|
6
|
-
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "help" | "disabled" | "label" | "className" | "children" | "onChange" | "checked" | "as" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>, "__nextHasNoMarginBottom"> & ValidatedControlProps
|
|
6
|
+
} & Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "help" | "disabled" | "label" | "className" | "children" | "onChange" | "checked" | "as" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>, "__nextHasNoMarginBottom"> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
7
|
//# sourceMappingURL=toggle-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"toggle-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-control.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA6CrD,eAAO,MAAM,sBAAsB;;;;wZAElC,CAAC"}
|
|
@@ -11,5 +11,5 @@ export declare const ValidatedToggleGroupControl: import("react").ForwardRefExot
|
|
|
11
11
|
size?: "default" | "__unstable-large";
|
|
12
12
|
__next40pxDefaultSize?: boolean;
|
|
13
13
|
__shouldNotWarnDeprecated36pxSize?: boolean;
|
|
14
|
-
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size" | "help" | "label" | "children" | "onChange" | "value" | "as" | keyof import("react").RefAttributes<any> | "isBlock" | "__next40pxDefaultSize" | "__shouldNotWarnDeprecated36pxSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom" | "isAdaptiveWidth" | "isDeselectable">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom"> & ValidatedControlProps
|
|
14
|
+
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "size" | "help" | "label" | "children" | "onChange" | "value" | "as" | keyof import("react").RefAttributes<any> | "isBlock" | "__next40pxDefaultSize" | "__shouldNotWarnDeprecated36pxSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom" | "isAdaptiveWidth" | "isDeselectable">, "__next40pxDefaultSize" | "__nextHasNoMarginBottom"> & ValidatedControlProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
15
|
//# sourceMappingURL=toggle-group-control.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-group-control.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"toggle-group-control.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/toggle-group-control.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAyDrD,eAAO,MAAM,2BAA2B;;;;;;;;;;;;8jBAEvC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type ValidatedControlProps
|
|
1
|
+
export type ValidatedControlProps = {
|
|
2
2
|
/**
|
|
3
3
|
* Whether the control is required.
|
|
4
4
|
* @default false
|
|
@@ -9,14 +9,6 @@ export type ValidatedControlProps<V> = {
|
|
|
9
9
|
* @default false
|
|
10
10
|
*/
|
|
11
11
|
markWhenOptional?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Optional callback to run when the input should be validated. Use this to set
|
|
14
|
-
* a `customValidity` as necessary.
|
|
15
|
-
*
|
|
16
|
-
* Always prefer using standard HTML attributes like `required` and `min`/`max` over
|
|
17
|
-
* custom validators when possible, as they are simpler and have localized error messages built in.
|
|
18
|
-
*/
|
|
19
|
-
onValidate?: (currentValue: V) => void;
|
|
20
12
|
/**
|
|
21
13
|
* Show a custom message based on the validation status.
|
|
22
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/validated-form-controls/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;;;;OAYG;IACH,cAAc,CAAC,EAAE;QAChB,IAAI,EAAE,YAAY,GAAG,OAAO,GAAG,SAAS,CAAC;QACzC,OAAO,EAAE,MAAM,CAAC;KAChB,CAAC;CACF,CAAC"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
1
4
|
import type { ValidatedControlProps } from './components/types';
|
|
2
5
|
/**
|
|
3
6
|
* HTML elements that support the Constraint Validation API.
|
|
@@ -17,11 +20,7 @@ export declare const ControlWithError: import("react").ForwardRefExoticComponent
|
|
|
17
20
|
* Label the control as "optional" when _not_ `required`, instead of the inverse.
|
|
18
21
|
*/
|
|
19
22
|
markWhenOptional?: boolean;
|
|
20
|
-
|
|
21
|
-
* The callback to run when the input should be validated.
|
|
22
|
-
*/
|
|
23
|
-
onValidate?: () => void;
|
|
24
|
-
customValidity?: ValidatedControlProps<unknown>["customValidity"];
|
|
23
|
+
customValidity?: ValidatedControlProps["customValidity"];
|
|
25
24
|
/**
|
|
26
25
|
* A function that returns the actual element on which the validity data should be applied.
|
|
27
26
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-with-error.d.ts","sourceRoot":"","sources":["../../src/validated-form-controls/control-with-error.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control-with-error.d.ts","sourceRoot":"","sources":["../../src/validated-form-controls/control-with-error.tsx"],"names":[],"mappings":"AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AA0BhE;;;;;;;GAOG;AACH,KAAK,cAAc,GAChB,mBAAmB,GACnB,gBAAgB,GAChB,iBAAiB,GACjB,mBAAmB,CAAC;AA+KvB,eAAO,MAAM,gBAAgB;IArK3B;;OAEG;eACQ,OAAO;IAClB;;OAEG;uBACgB,OAAO;qBACT,qBAAqB,CAAE,gBAAgB,CAAE;IAC1D;;OAEG;uBACgB,MAAM,cAAc,GAAG,IAAI,GAAG,SAAS;IAC1D;;;;;;;OAOG;;kDAiJoE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "31.0.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -55,24 +55,24 @@
|
|
|
55
55
|
"@types/gradient-parser": "1.1.0",
|
|
56
56
|
"@types/highlight-words-core": "1.2.1",
|
|
57
57
|
"@use-gesture/react": "^10.3.1",
|
|
58
|
-
"@wordpress/a11y": "^4.
|
|
59
|
-
"@wordpress/base-styles": "^6.
|
|
60
|
-
"@wordpress/compose": "^7.
|
|
61
|
-
"@wordpress/date": "^5.
|
|
62
|
-
"@wordpress/deprecated": "^4.
|
|
63
|
-
"@wordpress/dom": "^4.
|
|
64
|
-
"@wordpress/element": "^6.
|
|
65
|
-
"@wordpress/escape-html": "^3.
|
|
66
|
-
"@wordpress/hooks": "^4.
|
|
67
|
-
"@wordpress/html-entities": "^4.
|
|
68
|
-
"@wordpress/i18n": "^6.
|
|
69
|
-
"@wordpress/icons": "^11.
|
|
70
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
71
|
-
"@wordpress/keycodes": "^4.
|
|
72
|
-
"@wordpress/primitives": "^4.
|
|
73
|
-
"@wordpress/private-apis": "^1.
|
|
74
|
-
"@wordpress/rich-text": "^7.
|
|
75
|
-
"@wordpress/warning": "^3.
|
|
58
|
+
"@wordpress/a11y": "^4.37.0",
|
|
59
|
+
"@wordpress/base-styles": "^6.13.0",
|
|
60
|
+
"@wordpress/compose": "^7.37.0",
|
|
61
|
+
"@wordpress/date": "^5.37.0",
|
|
62
|
+
"@wordpress/deprecated": "^4.37.0",
|
|
63
|
+
"@wordpress/dom": "^4.37.0",
|
|
64
|
+
"@wordpress/element": "^6.37.0",
|
|
65
|
+
"@wordpress/escape-html": "^3.37.0",
|
|
66
|
+
"@wordpress/hooks": "^4.37.0",
|
|
67
|
+
"@wordpress/html-entities": "^4.37.0",
|
|
68
|
+
"@wordpress/i18n": "^6.10.0",
|
|
69
|
+
"@wordpress/icons": "^11.4.0",
|
|
70
|
+
"@wordpress/is-shallow-equal": "^5.37.0",
|
|
71
|
+
"@wordpress/keycodes": "^4.37.0",
|
|
72
|
+
"@wordpress/primitives": "^4.37.0",
|
|
73
|
+
"@wordpress/private-apis": "^1.37.0",
|
|
74
|
+
"@wordpress/rich-text": "^7.37.0",
|
|
75
|
+
"@wordpress/warning": "^3.37.0",
|
|
76
76
|
"change-case": "^4.1.2",
|
|
77
77
|
"clsx": "^2.1.1",
|
|
78
78
|
"colord": "^2.7.0",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"publishConfig": {
|
|
102
102
|
"access": "public"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "2cf13ec6cf86153c9b3cf369bf5c59046f5cd950"
|
|
105
105
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
@@ -9,9 +14,9 @@ import { VisuallyHidden } from '../visually-hidden';
|
|
|
9
14
|
* Internal dependencies
|
|
10
15
|
*/
|
|
11
16
|
import { ALIGNMENT_LABEL } from './utils';
|
|
12
|
-
import { Cell as CellView, Point } from './styles';
|
|
13
17
|
import type { AlignmentMatrixControlCellProps } from './types';
|
|
14
18
|
import type { WordPressComponentProps } from '../context';
|
|
19
|
+
import styles from './style.module.scss';
|
|
15
20
|
|
|
16
21
|
export default function Cell( {
|
|
17
22
|
id,
|
|
@@ -22,13 +27,19 @@ export default function Cell( {
|
|
|
22
27
|
<Tooltip text={ ALIGNMENT_LABEL[ value ] }>
|
|
23
28
|
<Composite.Item
|
|
24
29
|
id={ id }
|
|
25
|
-
render={
|
|
30
|
+
render={
|
|
31
|
+
<span
|
|
32
|
+
{ ...props }
|
|
33
|
+
className={ clsx( styles.cell, props.className ) }
|
|
34
|
+
role="gridcell"
|
|
35
|
+
/>
|
|
36
|
+
}
|
|
26
37
|
>
|
|
27
38
|
{ /* VoiceOver needs a text content to be rendered within grid cell,
|
|
28
39
|
otherwise it'll announce the content as "blank". So we use a visually
|
|
29
40
|
hidden element instead of aria-label. */ }
|
|
30
41
|
<VisuallyHidden>{ value }</VisuallyHidden>
|
|
31
|
-
<
|
|
42
|
+
<span className={ styles.point } role="presentation" />
|
|
32
43
|
</Composite.Item>
|
|
33
44
|
</Tooltip>
|
|
34
45
|
);
|
|
@@ -15,11 +15,11 @@ import { useCallback } from '@wordpress/element';
|
|
|
15
15
|
*/
|
|
16
16
|
import Cell from './cell';
|
|
17
17
|
import { Composite } from '../composite';
|
|
18
|
-
import { GridContainer, GridRow } from './styles';
|
|
19
18
|
import AlignmentMatrixControlIcon from './icon';
|
|
20
19
|
import { GRID, getItemId, getItemValue } from './utils';
|
|
21
20
|
import type { WordPressComponentProps } from '../context';
|
|
22
21
|
import type { AlignmentMatrixControlProps } from './types';
|
|
22
|
+
import styles from './style.module.scss';
|
|
23
23
|
|
|
24
24
|
function UnforwardedAlignmentMatrixControl( {
|
|
25
25
|
className,
|
|
@@ -49,7 +49,11 @@ function UnforwardedAlignmentMatrixControl( {
|
|
|
49
49
|
[ baseId, onChange ]
|
|
50
50
|
);
|
|
51
51
|
|
|
52
|
-
const classes = clsx(
|
|
52
|
+
const classes = clsx(
|
|
53
|
+
'component-alignment-matrix-control',
|
|
54
|
+
styles[ 'grid-container' ],
|
|
55
|
+
className
|
|
56
|
+
);
|
|
53
57
|
|
|
54
58
|
return (
|
|
55
59
|
<Composite
|
|
@@ -58,18 +62,23 @@ function UnforwardedAlignmentMatrixControl( {
|
|
|
58
62
|
setActiveId={ setActiveId }
|
|
59
63
|
rtl={ isRTL() }
|
|
60
64
|
render={
|
|
61
|
-
<
|
|
65
|
+
<div
|
|
62
66
|
{ ...props }
|
|
63
|
-
aria-label={ label }
|
|
64
67
|
className={ classes }
|
|
68
|
+
aria-label={ label }
|
|
65
69
|
id={ baseId }
|
|
66
70
|
role="grid"
|
|
67
|
-
|
|
71
|
+
style={ { width: `${ width }px` } }
|
|
68
72
|
/>
|
|
69
73
|
}
|
|
70
74
|
>
|
|
71
75
|
{ GRID.map( ( cells, index ) => (
|
|
72
|
-
<Composite.Row
|
|
76
|
+
<Composite.Row
|
|
77
|
+
render={
|
|
78
|
+
<div className={ styles[ 'grid-row' ] } role="row" />
|
|
79
|
+
}
|
|
80
|
+
key={ index }
|
|
81
|
+
>
|
|
73
82
|
{ cells.map( ( cell ) => (
|
|
74
83
|
<Cell
|
|
75
84
|
id={ getItemId( baseId, cell ) }
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use "@wordpress/base-styles/variables" as *;
|
|
2
|
+
@use "../utils/theme-variables" as *;
|
|
3
|
+
|
|
4
|
+
.grid-container {
|
|
5
|
+
direction: ltr;
|
|
6
|
+
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-columns: repeat(3, 1fr);
|
|
9
|
+
grid-template-rows: repeat(3, 1fr);
|
|
10
|
+
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
aspect-ratio: 1;
|
|
13
|
+
|
|
14
|
+
border: 1px solid transparent;
|
|
15
|
+
border-radius: $radius-medium;
|
|
16
|
+
outline: none;
|
|
17
|
+
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.grid-row {
|
|
22
|
+
grid-column: 1 / -1;
|
|
23
|
+
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
display: grid;
|
|
26
|
+
grid-template-columns: repeat(3, 1fr);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.cell {
|
|
30
|
+
position: relative;
|
|
31
|
+
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
|
|
40
|
+
appearance: none;
|
|
41
|
+
border: none;
|
|
42
|
+
outline: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.point {
|
|
46
|
+
display: block;
|
|
47
|
+
contain: strict;
|
|
48
|
+
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
width: 6px;
|
|
51
|
+
aspect-ratio: 1;
|
|
52
|
+
|
|
53
|
+
margin: auto;
|
|
54
|
+
|
|
55
|
+
color: $components-color-gray-400;
|
|
56
|
+
|
|
57
|
+
/* Use border instead of background color so that the point shows
|
|
58
|
+
in Windows High Contrast Mode */
|
|
59
|
+
border: 3px solid currentColor;
|
|
60
|
+
|
|
61
|
+
/* Highlight active item */
|
|
62
|
+
.cell[data-active-item] & {
|
|
63
|
+
color: $components-color-foreground;
|
|
64
|
+
transform: scale(calc(5 / 3));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* Hover styles for non-active items */
|
|
68
|
+
.cell:not([data-active-item]):hover & {
|
|
69
|
+
color: $components-color-accent;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Show an outline only when interacting with keyboard */
|
|
73
|
+
.cell[data-focus-visible] & {
|
|
74
|
+
outline: 1px solid $components-color-accent;
|
|
75
|
+
outline-offset: 1px;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@media not (prefers-reduced-motion) {
|
|
79
|
+
transition-property: color, transform;
|
|
80
|
+
transition-duration: 120ms;
|
|
81
|
+
transition-timing-function: linear;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -7,11 +12,7 @@ import { __experimentalUseDragging as useDragging } from '@wordpress/compose';
|
|
|
7
12
|
/**
|
|
8
13
|
* Internal dependencies
|
|
9
14
|
*/
|
|
10
|
-
import
|
|
11
|
-
CircleRoot,
|
|
12
|
-
CircleIndicatorWrapper,
|
|
13
|
-
CircleIndicator,
|
|
14
|
-
} from './styles/angle-picker-control-styles';
|
|
15
|
+
import styles from './style.module.scss';
|
|
15
16
|
|
|
16
17
|
import type { WordPressComponentProps } from '../context';
|
|
17
18
|
import type { AngleCircleProps } from './types';
|
|
@@ -25,6 +26,7 @@ type UseDraggingCallbackEvent =
|
|
|
25
26
|
function AngleCircle( {
|
|
26
27
|
value,
|
|
27
28
|
onChange,
|
|
29
|
+
className,
|
|
28
30
|
...props
|
|
29
31
|
}: WordPressComponentProps< AngleCircleProps, 'div' > ) {
|
|
30
32
|
const angleCircleRef = useRef< HTMLDivElement | null >( null );
|
|
@@ -89,22 +91,35 @@ function AngleCircle( {
|
|
|
89
91
|
}, [ isDragging ] );
|
|
90
92
|
|
|
91
93
|
return (
|
|
92
|
-
|
|
94
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
95
|
+
<div
|
|
93
96
|
ref={ angleCircleRef }
|
|
94
97
|
onMouseDown={ startDrag }
|
|
95
|
-
className=
|
|
98
|
+
className={ clsx(
|
|
99
|
+
'components-angle-picker-control__angle-circle',
|
|
100
|
+
styles[ 'circle-root' ],
|
|
101
|
+
className
|
|
102
|
+
) }
|
|
96
103
|
{ ...props }
|
|
97
104
|
>
|
|
98
|
-
<
|
|
105
|
+
<div
|
|
99
106
|
style={
|
|
100
107
|
value ? { transform: `rotate(${ value }deg)` } : undefined
|
|
101
108
|
}
|
|
102
|
-
className=
|
|
109
|
+
className={ clsx(
|
|
110
|
+
'components-angle-picker-control__angle-circle-indicator-wrapper',
|
|
111
|
+
styles[ 'circle-indicator-wrapper' ]
|
|
112
|
+
) }
|
|
103
113
|
tabIndex={ -1 }
|
|
104
114
|
>
|
|
105
|
-
<
|
|
106
|
-
|
|
107
|
-
|
|
115
|
+
<div
|
|
116
|
+
className={ clsx(
|
|
117
|
+
'components-angle-picker-control__angle-circle-indicator',
|
|
118
|
+
styles[ 'circle-indicator' ]
|
|
119
|
+
) }
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
108
123
|
);
|
|
109
124
|
}
|
|
110
125
|
|
|
@@ -16,8 +16,9 @@ import { isRTL, __ } from '@wordpress/i18n';
|
|
|
16
16
|
import { Flex, FlexBlock } from '../flex';
|
|
17
17
|
import { Spacer } from '../spacer';
|
|
18
18
|
import NumberControl from '../number-control';
|
|
19
|
+
import InputControlPrefixWrapper from '../input-control/input-prefix-wrapper';
|
|
20
|
+
import InputControlSuffixWrapper from '../input-control/input-suffix-wrapper';
|
|
19
21
|
import AngleCircle from './angle-circle';
|
|
20
|
-
import { UnitText } from './styles/angle-picker-control-styles';
|
|
21
22
|
|
|
22
23
|
import type { WordPressComponentProps } from '../context';
|
|
23
24
|
import type { AnglePickerControlProps } from './types';
|
|
@@ -48,10 +49,11 @@ function UnforwardedAnglePickerControl(
|
|
|
48
49
|
|
|
49
50
|
const classes = clsx( 'components-angle-picker-control', className );
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
// Override the default behavior and position the degree symbol to the
|
|
53
|
+
// right of the number, regardless of the language direction.
|
|
54
|
+
const prefixOrSuffixProp = isRTL()
|
|
55
|
+
? { prefix: <InputControlPrefixWrapper>°</InputControlPrefixWrapper> }
|
|
56
|
+
: { suffix: <InputControlSuffixWrapper>°</InputControlSuffixWrapper> };
|
|
55
57
|
|
|
56
58
|
return (
|
|
57
59
|
<Flex { ...restProps } ref={ ref } className={ classes } gap={ 2 }>
|
|
@@ -66,8 +68,7 @@ function UnforwardedAnglePickerControl(
|
|
|
66
68
|
step="1"
|
|
67
69
|
value={ value }
|
|
68
70
|
spinControls="none"
|
|
69
|
-
|
|
70
|
-
suffix={ suffixedUnitText }
|
|
71
|
+
{ ...prefixOrSuffixProp }
|
|
71
72
|
/>
|
|
72
73
|
</FlexBlock>
|
|
73
74
|
<Spacer marginBottom="1" marginTop="auto">
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@use "@wordpress/base-styles/variables" as *;
|
|
2
|
+
@use "../utils/theme-variables" as *;
|
|
3
|
+
|
|
4
|
+
.circle-root {
|
|
5
|
+
border-radius: $radius-round;
|
|
6
|
+
border: $border-width solid $components-color-border;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
cursor: grab;
|
|
9
|
+
height: 32px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
width: 32px;
|
|
12
|
+
|
|
13
|
+
&:active {
|
|
14
|
+
cursor: grabbing;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.circle-indicator-wrapper {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
position: relative;
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
|
|
24
|
+
&:focus-visible {
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.circle-indicator {
|
|
30
|
+
background: $components-color-accent;
|
|
31
|
+
border-radius: $radius-round;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
display: block;
|
|
34
|
+
left: 50%;
|
|
35
|
+
top: 4px;
|
|
36
|
+
transform: translateX(-50%);
|
|
37
|
+
position: absolute;
|
|
38
|
+
width: 6px;
|
|
39
|
+
height: 6px;
|
|
40
|
+
}
|
package/src/button/style.scss
CHANGED
|
@@ -164,7 +164,7 @@ function UnconnectedDropdownMenu( dropdownMenuProps: DropdownMenuProps ) {
|
|
|
164
164
|
{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>
|
|
165
165
|
controlSet.map( ( control, indexOfControl ) => (
|
|
166
166
|
<Button
|
|
167
|
-
|
|
167
|
+
size="compact"
|
|
168
168
|
key={ [
|
|
169
169
|
indexOfSet,
|
|
170
170
|
indexOfControl,
|
|
@@ -62,7 +62,6 @@ The `value` property is handled in a manner similar to controlled form component
|
|
|
62
62
|
- `__experimentalValidateInput` - If passed, all introduced values will be validated before being added as tokens.
|
|
63
63
|
- `__experimentalAutoSelectFirstMatch` - If true, the select the first matching suggestion when the user presses the Enter key (or space when tokenizeOnSpace is true).
|
|
64
64
|
- `__next40pxDefaultSize` - Start opting into the larger default height that will become the default size in a future version.
|
|
65
|
-
- `__nextHasNoMarginBottom` - Start opting into the new margin-free styles that will become the default in a future version, currently scheduled to be WordPress 7.0. (The prop can be safely removed once this happens.)
|
|
66
65
|
- `tokenizeOnBlur` - If true, add any incompleteTokenValue as a new token when the field loses focus.
|
|
67
66
|
|
|
68
67
|
## Usage
|
|
@@ -89,7 +88,6 @@ const MyFormTokenField = () => {
|
|
|
89
88
|
value={ selectedContinents }
|
|
90
89
|
suggestions={ continents }
|
|
91
90
|
onChange={ ( tokens ) => setSelectedContinents( tokens ) }
|
|
92
|
-
__nextHasNoMarginBottom
|
|
93
91
|
/>
|
|
94
92
|
);
|
|
95
93
|
};
|