@wordpress/components 27.1.0 → 27.3.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 +53 -3
- package/README.md +13 -0
- package/build/button/index.js +3 -4
- package/build/button/index.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/color-picker/component.js +2 -12
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/picker.js +18 -77
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/types.js.map +1 -1
- package/build/custom-select-control-v2/default-component/index.js +4 -2
- package/build/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build/custom-select-control-v2/index.js +1 -8
- package/build/custom-select-control-v2/index.js.map +1 -1
- package/build/custom-select-control-v2/{custom-select-item.js → item.js} +2 -1
- package/build/custom-select-control-v2/{custom-select-item.js.map → item.js.map} +1 -1
- package/build/custom-select-control-v2/legacy-component/index.js +5 -5
- package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build/date-time/date/styles.js +7 -7
- package/build/date-time/date/styles.js.map +1 -1
- package/build/form-token-field/index.js +1 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/input-control/index.js +1 -1
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/input-field.js +2 -1
- package/build/input-control/input-field.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +1 -0
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +162 -120
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +2 -2
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/palette-edit/index.js +18 -12
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +7 -34
- package/build/popover/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +29 -29
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/text-control/types.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +5 -2
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/utils/config-values.js +1 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/input/base.js +2 -2
- package/build/utils/input/base.js.map +1 -1
- package/build-module/button/index.js +3 -4
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/color-picker/component.js +3 -13
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/picker.js +19 -78
- package/build-module/color-picker/picker.js.map +1 -1
- package/build-module/color-picker/types.js.map +1 -1
- package/build-module/custom-select-control-v2/default-component/index.js +4 -2
- package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js +1 -2
- package/build-module/custom-select-control-v2/index.js.map +1 -1
- package/build-module/custom-select-control-v2/{custom-select-item.js → item.js} +2 -1
- package/build-module/custom-select-control-v2/{custom-select-item.js.map → item.js.map} +1 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js +4 -4
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
- package/build-module/date-time/date/styles.js +7 -7
- package/build-module/date-time/date/styles.js.map +1 -1
- package/build-module/form-token-field/index.js +1 -1
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/input-control/index.js +1 -1
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/input-field.js +2 -1
- package/build-module/input-control/input-field.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +163 -121
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +2 -2
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/palette-edit/index.js +17 -11
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/popover/index.js +9 -36
- package/build-module/popover/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +29 -29
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/text-control/types.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -3
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/utils/config-values.js +1 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/input/base.js +2 -2
- package/build-module/utils/input/base.js.map +1 -1
- package/build-style/style-rtl.css +26 -29
- package/build-style/style.css +26 -29
- package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
- package/build-types/button/deprecated.d.ts +4 -10
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts +3 -3
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +7 -7
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +37 -8
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +1 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +1 -1
- package/build-types/color-picker/types.d.ts +0 -3
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +35 -0
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/default-component/index.d.ts +5 -2
- package/build-types/custom-select-control-v2/default-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/index.d.ts +1 -2
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/{custom-select-item.d.ts → item.d.ts} +4 -1
- package/build-types/custom-select-control-v2/item.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts +2 -2
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +2 -2
- package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +4 -2
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +1 -0
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +1 -1
- package/build-types/form-token-field/index.d.ts +1 -1
- package/build-types/input-control/index.d.ts +1 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -2
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -2
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +0 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
- package/build-types/palette-edit/index.d.ts +6 -3
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +2 -2
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +1 -1
- package/build-types/text-control/types.d.ts +1 -1
- package/build-types/text-control/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +4 -10
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/package.json +21 -21
- package/src/button/index.tsx +3 -4
- package/src/button/test/index.tsx +6 -6
- package/src/button/types.ts +37 -9
- package/src/color-picker/component.tsx +3 -25
- package/src/color-picker/picker.tsx +12 -96
- package/src/color-picker/types.ts +0 -3
- package/src/confirm-dialog/README.md +7 -0
- package/src/custom-select-control/stories/{index.story.js → index.story.tsx} +8 -3
- package/src/custom-select-control/test/index.js +24 -0
- package/src/custom-select-control-v2/README.md +27 -27
- package/src/custom-select-control-v2/default-component/index.tsx +5 -2
- package/src/custom-select-control-v2/index.tsx +1 -2
- package/src/custom-select-control-v2/{custom-select-item.tsx → item.tsx} +2 -0
- package/src/custom-select-control-v2/legacy-component/index.tsx +4 -6
- package/src/custom-select-control-v2/legacy-component/test/index.tsx +13 -10
- package/src/custom-select-control-v2/stories/default.story.tsx +16 -17
- package/src/custom-select-control-v2/stories/legacy.story.tsx +20 -35
- package/src/custom-select-control-v2/test/index.tsx +26 -16
- package/src/date-time/date/styles.ts +2 -2
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
- package/src/dropdown/stories/index.story.tsx +19 -0
- package/src/dropdown/style.scss +26 -0
- package/src/dropdown-menu/style.scss +0 -25
- package/src/flex/flex/README.md +2 -2
- package/src/form-token-field/README.md +1 -1
- package/src/form-token-field/index.tsx +1 -1
- package/src/grid/README.md +11 -11
- package/src/h-stack/README.md +6 -6
- package/src/heading/README.md +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +3 -3
- package/src/input-control/README.md +1 -1
- package/src/input-control/index.tsx +1 -1
- package/src/input-control/input-field.tsx +2 -1
- package/src/input-control/stories/index.story.tsx +1 -0
- package/src/item-group/test/__snapshots__/index.js.snap +11 -11
- package/src/mobile/bottom-sheet-select-control/README.md +1 -1
- package/src/mobile/color-settings/palette.screen.native.js +5 -1
- package/src/navigable-container/container.tsx +1 -1
- package/src/navigator/navigator-provider/component.tsx +187 -188
- package/src/navigator/navigator-screen/component.tsx +2 -4
- package/src/palette-edit/index.tsx +21 -21
- package/src/palette-edit/test/index.tsx +21 -17
- package/src/placeholder/style.scss +5 -1
- package/src/popover/index.tsx +59 -99
- package/src/popover/style.scss +0 -9
- package/src/progress-bar/README.md +1 -1
- package/src/radio-control/README.md +3 -3
- package/src/range-control/styles/range-control-styles.ts +1 -1
- package/src/resizable-box/resize-tooltip/README.md +2 -2
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/text-control/style.scss +2 -0
- package/src/text-control/types.ts +12 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +14 -10
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +14 -12
- package/src/toolbar/toolbar/style.scss +1 -1
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/truncate/README.md +5 -5
- package/src/utils/config-values.js +1 -1
- package/src/utils/input/base.js +1 -1
- package/src/v-stack/README.md +6 -6
- package/tsconfig.json +1 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build-types/custom-select-control-v2/custom-select-item.d.ts.map +0 -1
|
@@ -14,7 +14,6 @@ export declare function useNavigatorBackButton(props: WordPressComponentProps<Na
|
|
|
14
14
|
isBusy?: boolean | undefined;
|
|
15
15
|
isDestructive?: boolean | undefined;
|
|
16
16
|
isPressed?: boolean | undefined;
|
|
17
|
-
isSmall?: boolean | undefined;
|
|
18
17
|
label?: string | undefined;
|
|
19
18
|
shortcut?: string | {
|
|
20
19
|
display: string;
|
|
@@ -292,7 +291,7 @@ export declare function useNavigatorBackButton(props: WordPressComponentProps<Na
|
|
|
292
291
|
formMethod?: string | undefined;
|
|
293
292
|
formNoValidate?: boolean | undefined;
|
|
294
293
|
formTarget?: string | undefined;
|
|
295
|
-
as: keyof JSX.IntrinsicElements | import("react").ForwardRefExoticComponent<import("../../button/types").ButtonProps & import("react").RefAttributes<any>>;
|
|
294
|
+
as: keyof JSX.IntrinsicElements | import("react").ForwardRefExoticComponent<(import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>>;
|
|
296
295
|
onClick: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
297
296
|
};
|
|
298
297
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/hook.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,uBAAuB,CAAE,4BAA4B,EAAE,QAAQ,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-back-button/hook.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAE7D,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,uBAAuB,CAAE,4BAA4B,EAAE,QAAQ,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BxE"}
|
|
@@ -42,7 +42,6 @@ export declare const NavigatorButton: import("../../context").WordPressComponent
|
|
|
42
42
|
isBusy?: boolean | undefined;
|
|
43
43
|
isDestructive?: boolean | undefined;
|
|
44
44
|
isPressed?: boolean | undefined;
|
|
45
|
-
isSmall?: boolean | undefined;
|
|
46
45
|
label?: string | undefined;
|
|
47
46
|
shortcut?: string | {
|
|
48
47
|
display: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/component.tsx"],"names":[],"mappings":";AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/component.tsx"],"names":[],"mappings":";AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;6CAG3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -14,7 +14,6 @@ export declare function useNavigatorButton(props: WordPressComponentProps<Naviga
|
|
|
14
14
|
isBusy?: boolean | undefined;
|
|
15
15
|
isDestructive?: boolean | undefined;
|
|
16
16
|
isPressed?: boolean | undefined;
|
|
17
|
-
isSmall?: boolean | undefined;
|
|
18
17
|
label?: string | undefined;
|
|
19
18
|
shortcut?: string | {
|
|
20
19
|
display: string;
|
|
@@ -292,7 +291,7 @@ export declare function useNavigatorButton(props: WordPressComponentProps<Naviga
|
|
|
292
291
|
formMethod?: string | undefined;
|
|
293
292
|
formNoValidate?: boolean | undefined;
|
|
294
293
|
formTarget?: string | undefined;
|
|
295
|
-
as: keyof JSX.IntrinsicElements | import("react").ForwardRefExoticComponent<import("../../button/types").ButtonProps & import("react").RefAttributes<any>>;
|
|
294
|
+
as: keyof JSX.IntrinsicElements | import("react").ForwardRefExoticComponent<(import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>>;
|
|
296
295
|
onClick: import("react").MouseEventHandler<HTMLButtonElement>;
|
|
297
296
|
};
|
|
298
297
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/hook.ts"],"names":[],"mappings":";AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,uBAAuB,CAAE,oBAAoB,EAAE,QAAQ,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-button/hook.ts"],"names":[],"mappings":";AAMA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAKrD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,uBAAuB,CAAE,oBAAoB,EAAE,QAAQ,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkChE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-provider/component.tsx"],"names":[],"mappings":";AAqBA,OAAO,KAAK,EACX,sBAAsB,EAMtB,MAAM,UAAU,CAAC;AA0OlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,iBAAiB,sHAG7B,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/component.tsx"],"names":[],"mappings":";AA6BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-screen/component.tsx"],"names":[],"mappings":";AA6BA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AA+GrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,eAAe,qHAG3B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -9,7 +9,6 @@ export declare const NavigatorToParentButton: import("../../context").WordPressC
|
|
|
9
9
|
isBusy?: boolean | undefined;
|
|
10
10
|
isDestructive?: boolean | undefined;
|
|
11
11
|
isPressed?: boolean | undefined;
|
|
12
|
-
isSmall?: boolean | undefined;
|
|
13
12
|
label?: string | undefined;
|
|
14
13
|
shortcut?: string | {
|
|
15
14
|
display: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-to-parent-button/component.tsx"],"names":[],"mappings":";AA4DA,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/navigator/navigator-to-parent-button/component.tsx"],"names":[],"mappings":";AA4DA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;6CAGnC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export declare const Input: import("@emotion/styled").StyledComponent<import("..
|
|
|
4
4
|
} & {
|
|
5
5
|
hideHTMLArrows: boolean;
|
|
6
6
|
}, {}, {}>;
|
|
7
|
-
export declare const SpinButton: import("@emotion/styled").StyledComponent<(import("../../button/types").ButtonProps & import("react").RefAttributes<any>) & {
|
|
7
|
+
export declare const SpinButton: import("@emotion/styled").StyledComponent<((import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
9
|
}, {}, {}>;
|
|
10
10
|
export declare const styles: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PaletteEditProps, PaletteElement } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* Returns a name for a palette item
|
|
4
|
+
* Returns a name and slug for a palette item. The name takes the format "Color + id".
|
|
5
5
|
* To ensure there are no duplicate ids, this function checks all slugs.
|
|
6
6
|
* It expects slugs to be in the format: slugPrefix + color- + number.
|
|
7
7
|
* It then sets the id component of the new name based on the incremented id of the highest existing slug id.
|
|
@@ -9,9 +9,12 @@ import type { PaletteEditProps, PaletteElement } from './types';
|
|
|
9
9
|
* @param elements An array of color palette items.
|
|
10
10
|
* @param slugPrefix The slug prefix used to match the element slug.
|
|
11
11
|
*
|
|
12
|
-
* @return A
|
|
12
|
+
* @return A name and slug for the new palette item.
|
|
13
13
|
*/
|
|
14
|
-
export declare function
|
|
14
|
+
export declare function getNameAndSlugForPosition(elements: PaletteElement[], slugPrefix: string): {
|
|
15
|
+
name: string;
|
|
16
|
+
slug: string;
|
|
17
|
+
};
|
|
15
18
|
/**
|
|
16
19
|
* Allows editing a palette of colors or gradients.
|
|
17
20
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":";AAmDA,OAAO,KAAK,EAOX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;GAUG;AACH,wBAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":";AAmDA,OAAO,KAAK,EAOX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACxC,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,MAAM;;;EAwBlB;AAwOD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAE,EAC5B,SAAS,EACT,MAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,wBAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,UAAe,EACf,YAAY,GACZ,EAAE,gBAAgB,eA0OlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -45,10 +45,10 @@ export declare const PaletteEditStyles: import("@emotion/styled").StyledComponen
|
|
|
45
45
|
} & {
|
|
46
46
|
theme?: import("@emotion/react").Theme | undefined;
|
|
47
47
|
}, {}, {}>;
|
|
48
|
-
export declare const DoneButton: import("@emotion/styled").StyledComponent<(import("../button/types").ButtonProps & import("react").RefAttributes<any>) & {
|
|
48
|
+
export declare const DoneButton: import("@emotion/styled").StyledComponent<((import("../button/types").ButtonProps & import("../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
49
49
|
theme?: import("@emotion/react").Theme | undefined;
|
|
50
50
|
}, {}, {}>;
|
|
51
|
-
export declare const RemoveButton: import("@emotion/styled").StyledComponent<(import("../button/types").ButtonProps & import("react").RefAttributes<any>) & {
|
|
51
|
+
export declare const RemoveButton: import("@emotion/styled").StyledComponent<((import("../button/types").ButtonProps & import("../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
52
52
|
theme?: import("@emotion/react").Theme | undefined;
|
|
53
53
|
}, {}, {}>;
|
|
54
54
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":";AAyDA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;AAiZnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO,knCAAkD,CAAC;AAqBvE,eAAe,OAAO,CAAC"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
export declare const TextControl: import("react").ForwardRefExoticComponent<Pick<import("../base-control/types").BaseControlProps, "className" | "label" | "help" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & {
|
|
23
23
|
onChange: (value: string) => void;
|
|
24
24
|
value: string | number;
|
|
25
|
-
type?: "number" | "search" | "text" | "tel" | "url" | "email" | "password" | undefined;
|
|
25
|
+
type?: "number" | "search" | "time" | "text" | "tel" | "url" | "email" | "date" | "datetime-local" | "password" | undefined;
|
|
26
26
|
__next40pxDefaultSize?: boolean | undefined;
|
|
27
27
|
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "className" | "children" | "label" | "help" | "type" | "onChange" | "value" | "as" | "__next40pxDefaultSize" | "hideLabelFromVision" | "__nextHasNoMarginBottom"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
28
28
|
export default TextControl;
|
|
@@ -16,7 +16,7 @@ export type TextControlProps = Pick<BaseControlProps, 'className' | 'hideLabelFr
|
|
|
16
16
|
*
|
|
17
17
|
* @default 'text'
|
|
18
18
|
*/
|
|
19
|
-
type?: 'email' | 'number' | 'password' | 'tel' | 'text' | 'search' | 'url';
|
|
19
|
+
type?: 'date' | 'datetime-local' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'time' | 'search' | 'url';
|
|
20
20
|
/**
|
|
21
21
|
* Start opting into the larger default height that will become the default size in a future version.
|
|
22
22
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/text-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAClC,gBAAgB,EACd,WAAW,GACX,qBAAqB,GACrB,MAAM,GACN,OAAO,GACP,yBAAyB,CAC3B,GAAG;IACH;;OAEG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/text-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAClC,gBAAgB,EACd,WAAW,GACX,qBAAqB,GACrB,MAAM,GACN,OAAO,GACP,yBAAyB,CAC3B,GAAG;IACH;;OAEG;IACH,QAAQ,EAAE,CAAE,KAAK,EAAE,MAAM,KAAM,IAAI,CAAC;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;;OAIG;IACH,IAAI,CAAC,EACF,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,KAAK,GACL,MAAM,GACN,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;IAET;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC"}
|
package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option-base/component.tsx"],"names":[],"mappings":";AAeA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EACX,iCAAiC,EAEjC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control-option-base/component.tsx"],"names":[],"mappings":";AAeA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,KAAK,EACX,iCAAiC,EAEjC,MAAM,UAAU,CAAC;AA4JlB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,qCAAqC,4NAG1C,CAAC;AAEF,eAAe,qCAAqC,CAAC"}
|
|
@@ -31,7 +31,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
31
31
|
isBusy?: boolean | undefined;
|
|
32
32
|
isDestructive?: boolean | undefined;
|
|
33
33
|
isPressed?: boolean | undefined;
|
|
34
|
-
isSmall?: boolean | undefined;
|
|
35
34
|
label?: string | undefined;
|
|
36
35
|
shortcut?: string | {
|
|
37
36
|
display: string;
|
|
@@ -55,7 +54,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
55
54
|
isBusy?: boolean | undefined;
|
|
56
55
|
isDestructive?: boolean | undefined;
|
|
57
56
|
isPressed?: boolean | undefined;
|
|
58
|
-
isSmall?: boolean | undefined;
|
|
59
57
|
label?: string | undefined;
|
|
60
58
|
shortcut?: string | {
|
|
61
59
|
display: string;
|
|
@@ -67,7 +65,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
67
65
|
tooltipPosition?: ("top" | "middle" | "bottom") | "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right" | "top left top" | "top left bottom" | "top left left" | "top left right" | "top center top" | "top center bottom" | "top center left" | "top center right" | "top right top" | "top right bottom" | "top right left" | "top right right" | "middle left top" | "middle left bottom" | "middle left left" | "middle left right" | "middle center top" | "middle center bottom" | "middle center left" | "middle center right" | "middle right top" | "middle right bottom" | "middle right left" | "middle right right" | "bottom left top" | "bottom left bottom" | "bottom left left" | "bottom left right" | "bottom center top" | "bottom center bottom" | "bottom center left" | "bottom center right" | "bottom right top" | "bottom right bottom" | "bottom right left" | "bottom right right" | undefined;
|
|
68
66
|
variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
|
|
69
67
|
__experimentalIsFocusable?: boolean | undefined;
|
|
70
|
-
}> & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "form" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "name" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof {
|
|
68
|
+
}> & import("../../button/types").DeprecatedButtonProps & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "form" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "name" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof {
|
|
71
69
|
__next40pxDefaultSize?: boolean | undefined;
|
|
72
70
|
children?: import("react").ReactNode;
|
|
73
71
|
describedBy?: string | undefined;
|
|
@@ -77,7 +75,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
77
75
|
isBusy?: boolean | undefined;
|
|
78
76
|
isDestructive?: boolean | undefined;
|
|
79
77
|
isPressed?: boolean | undefined;
|
|
80
|
-
isSmall?: boolean | undefined;
|
|
81
78
|
label?: string | undefined;
|
|
82
79
|
shortcut?: string | {
|
|
83
80
|
display: string;
|
|
@@ -89,7 +86,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
89
86
|
tooltipPosition?: ("top" | "middle" | "bottom") | "top left" | "top center" | "top right" | "middle left" | "middle center" | "middle right" | "bottom left" | "bottom center" | "bottom right" | "top left top" | "top left bottom" | "top left left" | "top left right" | "top center top" | "top center bottom" | "top center left" | "top center right" | "top right top" | "top right bottom" | "top right left" | "top right right" | "middle left top" | "middle left bottom" | "middle left left" | "middle left right" | "middle center top" | "middle center bottom" | "middle center left" | "middle center right" | "middle right top" | "middle right bottom" | "middle right left" | "middle right right" | "bottom left top" | "bottom left bottom" | "bottom left left" | "bottom left right" | "bottom center top" | "bottom center bottom" | "bottom center left" | "bottom center right" | "bottom right top" | "bottom right bottom" | "bottom right left" | "bottom right right" | undefined;
|
|
90
87
|
variant?: "link" | "primary" | "secondary" | "tertiary" | undefined;
|
|
91
88
|
__experimentalIsFocusable?: boolean | undefined;
|
|
92
|
-
}> | Pick<{
|
|
89
|
+
} | keyof import("../../button/types").DeprecatedButtonProps> | Pick<{
|
|
93
90
|
__next40pxDefaultSize?: boolean | undefined;
|
|
94
91
|
children?: import("react").ReactNode;
|
|
95
92
|
describedBy?: string | undefined;
|
|
@@ -99,7 +96,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
99
96
|
isBusy?: boolean | undefined;
|
|
100
97
|
isDestructive?: boolean | undefined;
|
|
101
98
|
isPressed?: boolean | undefined;
|
|
102
|
-
isSmall?: boolean | undefined;
|
|
103
99
|
label?: string | undefined;
|
|
104
100
|
shortcut?: string | {
|
|
105
101
|
display: string;
|
|
@@ -125,7 +121,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
125
121
|
isBusy?: boolean | undefined;
|
|
126
122
|
isDestructive?: boolean | undefined;
|
|
127
123
|
isPressed?: boolean | undefined;
|
|
128
|
-
isSmall?: boolean | undefined;
|
|
129
124
|
label?: string | undefined;
|
|
130
125
|
shortcut?: string | {
|
|
131
126
|
display: string;
|
|
@@ -141,7 +136,7 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
141
136
|
disabled?: false | undefined;
|
|
142
137
|
href: string;
|
|
143
138
|
target?: string | undefined;
|
|
144
|
-
}> & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "media" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "hrefLang" | "referrerPolicy" | "rel" | "download" | "ping" | keyof {
|
|
139
|
+
}> & import("../../button/types").DeprecatedButtonProps & import("react").RefAttributes<any>, "className" | "id" | "prefix" | "slot" | "role" | "style" | "title" | "color" | "translate" | "hidden" | "lang" | "media" | "type" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "hrefLang" | "referrerPolicy" | "rel" | "download" | "ping" | keyof {
|
|
145
140
|
__next40pxDefaultSize?: boolean | undefined;
|
|
146
141
|
children?: import("react").ReactNode;
|
|
147
142
|
describedBy?: string | undefined;
|
|
@@ -151,7 +146,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
151
146
|
isBusy?: boolean | undefined;
|
|
152
147
|
isDestructive?: boolean | undefined;
|
|
153
148
|
isPressed?: boolean | undefined;
|
|
154
|
-
isSmall?: boolean | undefined;
|
|
155
149
|
label?: string | undefined;
|
|
156
150
|
shortcut?: string | {
|
|
157
151
|
display: string;
|
|
@@ -167,6 +161,6 @@ export declare const ToolbarButton: import("react").ForwardRefExoticComponent<To
|
|
|
167
161
|
disabled?: false | undefined;
|
|
168
162
|
href: string;
|
|
169
163
|
target?: string | undefined;
|
|
170
|
-
}>, "as" | keyof ToolbarButtonProps> & import("react").RefAttributes<any>>;
|
|
164
|
+
} | keyof import("../../button/types").DeprecatedButtonProps>, "as" | keyof ToolbarButtonProps> & import("react").RefAttributes<any>>;
|
|
171
165
|
export default ToolbarButton;
|
|
172
166
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-button/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+ElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/toolbar-button/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AA+ElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qIAAyC,CAAC;AACpE,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.3.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,27 +42,27 @@
|
|
|
42
42
|
"@types/gradient-parser": "0.1.3",
|
|
43
43
|
"@types/highlight-words-core": "1.2.1",
|
|
44
44
|
"@use-gesture/react": "^10.2.24",
|
|
45
|
-
"@wordpress/a11y": "^3.
|
|
46
|
-
"@wordpress/compose": "^6.
|
|
47
|
-
"@wordpress/date": "^4.
|
|
48
|
-
"@wordpress/deprecated": "^3.
|
|
49
|
-
"@wordpress/dom": "^3.
|
|
50
|
-
"@wordpress/element": "^5.
|
|
51
|
-
"@wordpress/escape-html": "^2.
|
|
52
|
-
"@wordpress/hooks": "^3.
|
|
53
|
-
"@wordpress/html-entities": "^3.
|
|
54
|
-
"@wordpress/i18n": "^4.
|
|
55
|
-
"@wordpress/icons": "^9.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/primitives": "^3.
|
|
59
|
-
"@wordpress/private-apis": "^0.
|
|
60
|
-
"@wordpress/rich-text": "^6.
|
|
61
|
-
"@wordpress/warning": "^2.
|
|
45
|
+
"@wordpress/a11y": "^3.55.0",
|
|
46
|
+
"@wordpress/compose": "^6.32.0",
|
|
47
|
+
"@wordpress/date": "^4.55.0",
|
|
48
|
+
"@wordpress/deprecated": "^3.55.0",
|
|
49
|
+
"@wordpress/dom": "^3.55.0",
|
|
50
|
+
"@wordpress/element": "^5.32.0",
|
|
51
|
+
"@wordpress/escape-html": "^2.55.0",
|
|
52
|
+
"@wordpress/hooks": "^3.55.0",
|
|
53
|
+
"@wordpress/html-entities": "^3.55.0",
|
|
54
|
+
"@wordpress/i18n": "^4.55.0",
|
|
55
|
+
"@wordpress/icons": "^9.46.0",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^4.55.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.55.0",
|
|
58
|
+
"@wordpress/primitives": "^3.53.0",
|
|
59
|
+
"@wordpress/private-apis": "^0.37.0",
|
|
60
|
+
"@wordpress/rich-text": "^6.32.0",
|
|
61
|
+
"@wordpress/warning": "^2.55.0",
|
|
62
62
|
"change-case": "^4.1.2",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
65
|
-
"date-fns": "^
|
|
65
|
+
"date-fns": "^3.6.0",
|
|
66
66
|
"deepmerge": "^4.3.0",
|
|
67
67
|
"downshift": "^6.0.15",
|
|
68
68
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"re-resizable": "^6.4.0",
|
|
76
76
|
"react-colorful": "^5.3.1",
|
|
77
77
|
"remove-accents": "^0.5.0",
|
|
78
|
-
"use-lilius": "^2.0.
|
|
78
|
+
"use-lilius": "^2.0.5",
|
|
79
79
|
"uuid": "^9.0.1",
|
|
80
80
|
"valtio": "1.7.0"
|
|
81
81
|
},
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ac2b13783c28f959770cf029a797a712f59e1958"
|
|
90
90
|
}
|
package/src/button/index.tsx
CHANGED
|
@@ -44,7 +44,7 @@ function useDeprecatedProps( {
|
|
|
44
44
|
let computedVariant = variant;
|
|
45
45
|
|
|
46
46
|
const newProps: { 'aria-pressed'?: boolean } = {
|
|
47
|
-
// @
|
|
47
|
+
// @todo Mark `isPressed` as deprecated
|
|
48
48
|
'aria-pressed': isPressed,
|
|
49
49
|
};
|
|
50
50
|
|
|
@@ -65,10 +65,9 @@ function useDeprecatedProps( {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
if ( isDefault ) {
|
|
68
|
-
deprecated( 'Button isDefault prop', {
|
|
68
|
+
deprecated( 'wp.components.Button `isDefault` prop', {
|
|
69
69
|
since: '5.4',
|
|
70
70
|
alternative: 'variant="secondary"',
|
|
71
|
-
version: '6.2',
|
|
72
71
|
} );
|
|
73
72
|
|
|
74
73
|
computedVariant ??= 'secondary';
|
|
@@ -87,7 +86,7 @@ function useDeprecatedProps( {
|
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
export function UnforwardedButton(
|
|
90
|
-
props: ButtonProps,
|
|
89
|
+
props: ButtonProps & DeprecatedButtonProps,
|
|
91
90
|
ref: ForwardedRef< any >
|
|
92
91
|
) {
|
|
93
92
|
const {
|
|
@@ -43,7 +43,7 @@ describe( 'Button', () => {
|
|
|
43
43
|
} );
|
|
44
44
|
|
|
45
45
|
it( 'should render a button element with is-secondary and is-small class', () => {
|
|
46
|
-
render( <Button variant="secondary"
|
|
46
|
+
render( <Button variant="secondary" size="small" /> );
|
|
47
47
|
const button = screen.getByRole( 'button' );
|
|
48
48
|
|
|
49
49
|
expect( button ).toHaveClass( 'is-secondary' );
|
|
@@ -554,13 +554,11 @@ describe( 'Button', () => {
|
|
|
554
554
|
|
|
555
555
|
describe( 'deprecated props', () => {
|
|
556
556
|
it( 'should not break when the legacy isPrimary prop is passed', () => {
|
|
557
|
-
// @ts-expect-error
|
|
558
557
|
render( <Button isPrimary /> );
|
|
559
558
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-primary' );
|
|
560
559
|
} );
|
|
561
560
|
|
|
562
561
|
it( 'should not break when the legacy isSecondary prop is passed', () => {
|
|
563
|
-
// @ts-expect-error
|
|
564
562
|
render( <Button isSecondary /> );
|
|
565
563
|
expect( screen.getByRole( 'button' ) ).toHaveClass(
|
|
566
564
|
'is-secondary'
|
|
@@ -568,19 +566,16 @@ describe( 'Button', () => {
|
|
|
568
566
|
} );
|
|
569
567
|
|
|
570
568
|
it( 'should not break when the legacy isTertiary prop is passed', () => {
|
|
571
|
-
// @ts-expect-error
|
|
572
569
|
render( <Button isTertiary /> );
|
|
573
570
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-tertiary' );
|
|
574
571
|
} );
|
|
575
572
|
|
|
576
573
|
it( 'should not break when the legacy isLink prop is passed', () => {
|
|
577
|
-
// @ts-expect-error
|
|
578
574
|
render( <Button isLink /> );
|
|
579
575
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-link' );
|
|
580
576
|
} );
|
|
581
577
|
|
|
582
578
|
it( 'should warn when the isDefault prop is passed', () => {
|
|
583
|
-
// @ts-expect-error
|
|
584
579
|
render( <Button isDefault /> );
|
|
585
580
|
expect( screen.getByRole( 'button' ) ).toHaveClass(
|
|
586
581
|
'is-secondary'
|
|
@@ -593,6 +588,11 @@ describe( 'Button', () => {
|
|
|
593
588
|
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
|
|
594
589
|
} );
|
|
595
590
|
|
|
591
|
+
it( 'should have the is-small class when small class prop is passed', () => {
|
|
592
|
+
render( <Button size="small" /> );
|
|
593
|
+
expect( screen.getByRole( 'button' ) ).toHaveClass( 'is-small' );
|
|
594
|
+
} );
|
|
595
|
+
|
|
596
596
|
it( 'should prioritize the `size` prop over `isSmall`', () => {
|
|
597
597
|
render( <Button size="compact" isSmall /> );
|
|
598
598
|
expect( screen.getByRole( 'button' ) ).not.toHaveClass(
|
package/src/button/types.ts
CHANGED
|
@@ -61,15 +61,6 @@ type BaseButtonProps = {
|
|
|
61
61
|
* Renders a pressed button style.
|
|
62
62
|
*/
|
|
63
63
|
isPressed?: boolean;
|
|
64
|
-
// TODO: Deprecate officially (add console warning and move to DeprecatedButtonProps).
|
|
65
|
-
/**
|
|
66
|
-
* Decreases the size of the button.
|
|
67
|
-
*
|
|
68
|
-
* Deprecated in favor of the `size` prop. If both props are defined, the `size` prop will take precedence.
|
|
69
|
-
*
|
|
70
|
-
* @deprecated Use the `'small'` value on the `size` prop instead.
|
|
71
|
-
*/
|
|
72
|
-
isSmall?: boolean;
|
|
73
64
|
/**
|
|
74
65
|
* Sets the `aria-label` of the component, if none is provided.
|
|
75
66
|
* Sets the Tooltip content if `showTooltip` is provided.
|
|
@@ -149,11 +140,48 @@ type AnchorProps = {
|
|
|
149
140
|
};
|
|
150
141
|
|
|
151
142
|
export type DeprecatedButtonProps = {
|
|
143
|
+
/**
|
|
144
|
+
* Gives the button a default style.
|
|
145
|
+
*
|
|
146
|
+
* @deprecated Use the `'secondary'` value on the `variant` prop instead.
|
|
147
|
+
* @ignore
|
|
148
|
+
*/
|
|
152
149
|
isDefault?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Gives the button a link style.
|
|
152
|
+
*
|
|
153
|
+
* @deprecated Use the `'link'` value on the `variant` prop instead.
|
|
154
|
+
* @ignore
|
|
155
|
+
*/
|
|
153
156
|
isLink?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Gives the button a primary style.
|
|
159
|
+
*
|
|
160
|
+
* @deprecated Use the `'primary'` value on the `variant` prop instead.
|
|
161
|
+
* @ignore
|
|
162
|
+
*/
|
|
154
163
|
isPrimary?: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Gives the button a default style.
|
|
166
|
+
*
|
|
167
|
+
* @deprecated Use the `'secondary'` value on the `variant` prop instead.
|
|
168
|
+
* @ignore
|
|
169
|
+
*/
|
|
155
170
|
isSecondary?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Gives the button a text-based style.
|
|
173
|
+
*
|
|
174
|
+
* @deprecated Use the `'tertiary'` value on the `variant` prop instead.
|
|
175
|
+
* @ignore
|
|
176
|
+
*/
|
|
156
177
|
isTertiary?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Decreases the size of the button.
|
|
180
|
+
*
|
|
181
|
+
* @deprecated Use the `'small'` value on the `size` prop instead.
|
|
182
|
+
* @ignore
|
|
183
|
+
*/
|
|
184
|
+
isSmall?: boolean;
|
|
157
185
|
};
|
|
158
186
|
|
|
159
187
|
export type DeprecatedIconButtonProps = {
|
|
@@ -10,7 +10,7 @@ import namesPlugin from 'colord/plugins/names';
|
|
|
10
10
|
* WordPress dependencies
|
|
11
11
|
*/
|
|
12
12
|
import { useCallback, useState, useMemo } from '@wordpress/element';
|
|
13
|
-
import { useDebounce
|
|
13
|
+
import { useDebounce } from '@wordpress/compose';
|
|
14
14
|
import { __ } from '@wordpress/i18n';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -56,24 +56,8 @@ const UnconnectedColorPicker = (
|
|
|
56
56
|
onChange,
|
|
57
57
|
defaultValue = '#fff',
|
|
58
58
|
copyFormat,
|
|
59
|
-
|
|
60
|
-
// Context
|
|
61
|
-
onPickerDragStart,
|
|
62
|
-
onPickerDragEnd,
|
|
63
59
|
...divProps
|
|
64
|
-
} = useContextSystem
|
|
65
|
-
ColorPickerProps & {
|
|
66
|
-
onPickerDragStart?: ( event: MouseEvent ) => void;
|
|
67
|
-
onPickerDragEnd?: ( event: MouseEvent ) => void;
|
|
68
|
-
}
|
|
69
|
-
>( props, 'ColorPicker' );
|
|
70
|
-
|
|
71
|
-
const [ containerEl, setContainerEl ] = useState< HTMLElement | null >(
|
|
72
|
-
null
|
|
73
|
-
);
|
|
74
|
-
const containerRef = ( node: HTMLElement | null ) => {
|
|
75
|
-
setContainerEl( node );
|
|
76
|
-
};
|
|
60
|
+
} = useContextSystem( props, 'ColorPicker' );
|
|
77
61
|
|
|
78
62
|
// Use a safe default value for the color and remove the possibility of `undefined`.
|
|
79
63
|
const [ color, setColor ] = useControlledValue( {
|
|
@@ -100,17 +84,11 @@ const UnconnectedColorPicker = (
|
|
|
100
84
|
);
|
|
101
85
|
|
|
102
86
|
return (
|
|
103
|
-
<ColorfulWrapper
|
|
104
|
-
ref={ useMergeRefs( [ containerRef, forwardedRef ] ) }
|
|
105
|
-
{ ...divProps }
|
|
106
|
-
>
|
|
87
|
+
<ColorfulWrapper ref={ forwardedRef } { ...divProps }>
|
|
107
88
|
<Picker
|
|
108
|
-
containerEl={ containerEl }
|
|
109
89
|
onChange={ handleChange }
|
|
110
90
|
color={ safeColordColor }
|
|
111
91
|
enableAlpha={ enableAlpha }
|
|
112
|
-
onDragStart={ onPickerDragStart }
|
|
113
|
-
onDragEnd={ onPickerDragEnd }
|
|
114
92
|
/>
|
|
115
93
|
<AuxiliaryColorArtefactWrapper>
|
|
116
94
|
<AuxiliaryColorArtefactHStackHeader justify="space-between">
|