@wordpress/components 27.0.0 → 27.1.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 +22 -0
- package/build/base-control/index.native.js.map +1 -1
- package/build/border-box-control/border-box-control/component.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/button/index.js +2 -2
- package/build/button/index.js.map +1 -1
- package/build/button/index.native.js.map +1 -1
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build/custom-select-control-v2/index.js +2 -2
- package/build/custom-select-control-v2/index.js.map +1 -1
- package/build/custom-select-control-v2/types.js.map +1 -1
- package/build/draggable/index.native.js +2 -2
- package/build/draggable/index.native.js.map +1 -1
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/flex/flex/hook.js +1 -1
- package/build/flex/flex/hook.js.map +1 -1
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/h-stack/hook.js +6 -1
- package/build/h-stack/hook.js.map +1 -1
- package/build/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/image/index.native.js +4 -13
- package/build/mobile/image/index.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/palette-edit/index.js.map +1 -1
- package/build/query-controls/index.native.js.map +1 -1
- package/build/range-control/index.js.map +1 -1
- package/build/search-control/index.native.js.map +1 -1
- package/build/snackbar/index.js +3 -2
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +2 -1
- package/build/snackbar/list.js.map +1 -1
- package/build/snackbar/types.js.map +1 -1
- package/build/tabs/index.js +7 -7
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/utils/hooks/index.js +0 -7
- package/build/utils/hooks/index.js.map +1 -1
- package/build-module/base-control/index.native.js.map +1 -1
- package/build-module/border-box-control/border-box-control/component.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/button/index.js +2 -2
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/custom-select-control-v2/default-component/index.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js +1 -1
- package/build-module/custom-select-control-v2/index.js.map +1 -1
- package/build-module/custom-select-control-v2/types.js.map +1 -1
- package/build-module/draggable/index.native.js +2 -2
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/flex/flex/hook.js +1 -1
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/h-stack/hook.js +6 -1
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/mobile/bottom-sheet/button.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/image/index.native.js +6 -15
- package/build-module/mobile/image/index.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/query-controls/index.native.js.map +1 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/snackbar/index.js +3 -2
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +2 -1
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/snackbar/types.js.map +1 -1
- package/build-module/tabs/index.js +7 -7
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/utils/hooks/index.js +0 -1
- package/build-module/utils/hooks/index.js.map +1 -1
- package/build-style/style-rtl.css +8 -1
- package/build-style/style.css +8 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts +2 -1
- 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 -1
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts +2 -0
- package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/stories/default.story.d.ts +4 -3
- 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 +2 -2
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +0 -1
- package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +2 -3
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +2 -4
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +5 -2
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/snackbar/test/index.d.ts +2 -0
- package/build-types/snackbar/test/index.d.ts.map +1 -0
- package/build-types/snackbar/test/list.d.ts +2 -0
- package/build-types/snackbar/test/list.d.ts.map +1 -0
- package/build-types/snackbar/types.d.ts +18 -2
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +1 -1
- package/build-types/tabs/types.d.ts +1 -1
- package/build-types/utils/hooks/index.d.ts +0 -1
- package/build-types/v-stack/hook.d.ts +2 -4
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/package.json +19 -19
- package/src/base-control/index.native.js +1 -1
- package/src/base-control/test/index.tsx +1 -1
- package/src/border-box-control/border-box-control/component.tsx +1 -1
- package/src/border-box-control/border-box-control-split-controls/component.tsx +4 -4
- package/src/border-control/border-control-dropdown/component.tsx +1 -1
- package/src/button/index.native.js +1 -1
- package/src/button/index.tsx +1 -1
- package/src/button/style.scss +1 -3
- package/src/circular-option-picker/test/index.tsx +2 -4
- package/src/combobox-control/test/index.tsx +1 -1
- package/src/confirm-dialog/component.tsx +1 -1
- package/src/confirm-dialog/test/index.tsx +5 -21
- package/src/custom-select-control-v2/default-component/index.tsx +4 -1
- package/src/custom-select-control-v2/index.tsx +1 -1
- package/src/custom-select-control-v2/legacy-component/test/index.tsx +457 -0
- package/src/custom-select-control-v2/stories/legacy.story.tsx +5 -6
- package/src/custom-select-control-v2/test/index.tsx +279 -749
- package/src/custom-select-control-v2/types.ts +0 -1
- package/src/disabled/test/index.tsx +1 -1
- package/src/draggable/index.native.js +2 -2
- package/src/draggable/test/index.native.js +6 -2
- package/src/dropdown-menu/index.native.js +2 -2
- package/src/flex/flex/hook.ts +1 -1
- package/src/font-size-picker/index.native.js +2 -2
- package/src/form-token-field/index.tsx +1 -1
- package/src/h-stack/hook.tsx +2 -1
- package/src/h-stack/test/index.tsx +10 -0
- package/src/item-group/test/index.js +2 -2
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +10 -15
- package/src/mobile/bottom-sheet/button.native.js +1 -5
- package/src/mobile/bottom-sheet/index.native.js +2 -2
- package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -2
- package/src/mobile/bottom-sheet-select-control/index.native.js +1 -1
- package/src/mobile/bottom-sheet-text-control/index.native.js +1 -1
- package/src/mobile/gradient/index.native.js +1 -1
- package/src/mobile/image/index.native.js +8 -23
- package/src/mobile/media-edit/index.native.js +1 -1
- package/src/modal/test/index.tsx +1 -1
- package/src/navigation/stories/utils/hide-if-empty.tsx +2 -6
- package/src/palette-edit/index.tsx +2 -2
- package/src/popover/test/index.tsx +1 -4
- package/src/query-controls/index.native.js +2 -2
- package/src/radio-group/stories/index.story.tsx +1 -0
- package/src/range-control/index.tsx +3 -3
- package/src/range-control/test/index.tsx +2 -2
- package/src/search-control/index.native.js +1 -1
- package/src/snackbar/index.tsx +5 -2
- package/src/snackbar/list.tsx +6 -1
- package/src/snackbar/stories/list.story.tsx +0 -3
- package/src/snackbar/test/index.tsx +267 -0
- package/src/snackbar/test/list.tsx +46 -0
- package/src/snackbar/types.ts +31 -3
- package/src/tabs/README.md +18 -18
- package/src/tabs/index.tsx +7 -7
- package/src/tabs/stories/index.story.tsx +1 -1
- package/src/tabs/test/index.tsx +30 -30
- package/src/tabs/types.ts +1 -1
- package/src/toggle-group-control/test/index.tsx +1 -1
- package/src/tools-panel/stories/index.story.tsx +8 -8
- package/src/tools-panel/test/index.tsx +10 -28
- package/src/tooltip/style.scss +2 -1
- package/src/tooltip/test/index.native.js +3 -3
- package/src/tree-grid/test/index.tsx +1 -1
- package/src/utils/hooks/index.js +0 -1
- package/src/v-stack/test/index.tsx +10 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/build/custom-select-control-v2/legacy-adapter.js +0 -29
- package/build/custom-select-control-v2/legacy-adapter.js.map +0 -1
- package/build/utils/hooks/use-latest-ref.js +0 -33
- package/build/utils/hooks/use-latest-ref.js.map +0 -1
- package/build-module/custom-select-control-v2/legacy-adapter.js +0 -21
- package/build-module/custom-select-control-v2/legacy-adapter.js.map +0 -1
- package/build-module/utils/hooks/use-latest-ref.js +0 -27
- package/build-module/utils/hooks/use-latest-ref.js.map +0 -1
- package/build-types/custom-select-control-v2/legacy-adapter.d.ts +0 -6
- package/build-types/custom-select-control-v2/legacy-adapter.d.ts.map +0 -1
- package/build-types/utils/hooks/use-latest-ref.d.ts +0 -15
- package/build-types/utils/hooks/use-latest-ref.d.ts.map +0 -1
- package/src/custom-select-control-v2/legacy-adapter.tsx +0 -25
- package/src/utils/hooks/test/use-latest-ref.js +0 -119
- package/src/utils/hooks/use-latest-ref.ts +0 -29
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
/**
|
|
2
3
|
* External dependencies
|
|
3
4
|
*/
|
|
@@ -10,7 +11,7 @@ declare const meta: Meta<typeof CustomSelect>;
|
|
|
10
11
|
export default meta;
|
|
11
12
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../types")._CustomSelectProps & Omit<import("../types").CustomSelectButtonProps, "size"> & {
|
|
12
13
|
size?: "default" | "compact" | undefined;
|
|
13
|
-
}
|
|
14
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "onChange" | "size" | "value" | "as" | "defaultValue" | "renderSelectedValue" | keyof import("../types")._CustomSelectProps>>;
|
|
14
15
|
/**
|
|
15
16
|
* Multiple selection can be enabled by using an array for the `value` and
|
|
16
17
|
* `defaultValue` props. The argument type of the `onChange` function will also
|
|
@@ -18,12 +19,12 @@ export declare const Default: import("@storybook/types").AnnotatedStoryFn<import
|
|
|
18
19
|
*/
|
|
19
20
|
export declare const MultipleSelection: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../types")._CustomSelectProps & Omit<import("../types").CustomSelectButtonProps, "size"> & {
|
|
20
21
|
size?: "default" | "compact" | undefined;
|
|
21
|
-
}
|
|
22
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "onChange" | "size" | "value" | "as" | "defaultValue" | "renderSelectedValue" | keyof import("../types")._CustomSelectProps>>;
|
|
22
23
|
/**
|
|
23
24
|
* The `renderSelectedValue` prop can be used to customize how the selected value
|
|
24
25
|
* is rendered in the dropdown trigger.
|
|
25
26
|
*/
|
|
26
27
|
export declare const CustomSelectedValue: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../types")._CustomSelectProps & Omit<import("../types").CustomSelectButtonProps, "size"> & {
|
|
27
28
|
size?: "default" | "compact" | undefined;
|
|
28
|
-
}
|
|
29
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "onChange" | "size" | "value" | "as" | "defaultValue" | "renderSelectedValue" | keyof import("../types")._CustomSelectProps>>;
|
|
29
30
|
//# sourceMappingURL=default.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/default.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAGhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,CA+BpC,CAAC;AACF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO;;
|
|
1
|
+
{"version":3,"file":"default.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/default.story.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAGhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,YAAY,CA+BpC,CAAC;AACF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO;;kUAAsB,CAAC;AAmB3C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;kUAAsB,CAAC;AAoCrD;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;kUAAsB,CAAC"}
|
|
@@ -5,8 +5,8 @@ import type { Meta } from '@storybook/react';
|
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
9
|
-
declare const meta: Meta<typeof
|
|
8
|
+
import CustomSelect from '../legacy-component';
|
|
9
|
+
declare const meta: Meta<typeof CustomSelect>;
|
|
10
10
|
export default meta;
|
|
11
11
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../types").LegacyCustomSelectProps>;
|
|
12
12
|
//# sourceMappingURL=legacy.story.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/legacy.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"legacy.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/legacy.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAE/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nB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAE,QAAQ,EAAE,oBAAoB,KAAM,IAAI,CAAC;IACtD;;;;OAIG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAE,iBAAiB,CAAE,CAAC;IAChD;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAE,iBAAiB,CAAE,CAAC;IACjD;;;;OAIG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAE,iBAAiB,CAAE,CAAC;IACpD;;;;OAIG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAE,iBAAiB,CAAE,CAAC;IACrD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAE,YAAY,CAAE,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,kBAAkB,CAAC;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC"}
|
|
@@ -7,12 +7,11 @@ import type { FlexProps } from '../types';
|
|
|
7
7
|
export declare function useFlex(props: WordPressComponentProps<FlexProps, 'div'>): {
|
|
8
8
|
className: string;
|
|
9
9
|
isColumn: boolean;
|
|
10
|
-
children: import("react").ReactNode;
|
|
11
|
-
isReversed?: boolean | undefined;
|
|
12
10
|
id?: string | undefined;
|
|
13
11
|
prefix?: string | undefined;
|
|
14
12
|
slot?: string | undefined;
|
|
15
13
|
role?: import("react").AriaRole | undefined;
|
|
14
|
+
children: import("react").ReactNode;
|
|
16
15
|
style?: import("react").CSSProperties | undefined;
|
|
17
16
|
title?: string | undefined;
|
|
18
17
|
color?: string | undefined;
|
|
@@ -231,6 +230,7 @@ export declare function useFlex(props: WordPressComponentProps<FlexProps, 'div'>
|
|
|
231
230
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
232
231
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
233
232
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
as?: keyof JSX.IntrinsicElements | undefined;
|
|
234
234
|
key?: import("react").Key | null | undefined;
|
|
235
235
|
defaultChecked?: boolean | undefined;
|
|
236
236
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -264,6 +264,5 @@ export declare function useFlex(props: WordPressComponentProps<FlexProps, 'div'>
|
|
|
264
264
|
unselectable?: "on" | "off" | undefined;
|
|
265
265
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
266
266
|
is?: string | undefined;
|
|
267
|
-
as?: keyof JSX.IntrinsicElements | undefined;
|
|
268
267
|
};
|
|
269
268
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/flex/flex/hook.ts"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAM7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqB1C,wBAAgB,OAAO,CAAE,KAAK,EAAE,uBAAuB,CAAE,SAAS,EAAE,KAAK,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/flex/flex/hook.ts"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAM7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAqB1C,wBAAgB,OAAO,CAAE,KAAK,EAAE,uBAAuB,CAAE,SAAS,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoD1E"}
|
|
@@ -6,13 +6,11 @@ import type { WordPressComponentProps } from '../context';
|
|
|
6
6
|
import type { Props } from './types';
|
|
7
7
|
export declare function useHStack(props: WordPressComponentProps<Props, 'div'>): {
|
|
8
8
|
className: string;
|
|
9
|
-
isColumn: boolean;
|
|
10
|
-
children: import("react").ReactNode;
|
|
11
|
-
isReversed?: boolean | undefined;
|
|
12
9
|
id?: string | undefined;
|
|
13
10
|
prefix?: string | undefined;
|
|
14
11
|
slot?: string | undefined;
|
|
15
12
|
role?: import("react").AriaRole | undefined;
|
|
13
|
+
children: import("react").ReactNode;
|
|
16
14
|
style?: import("react").CSSProperties | undefined;
|
|
17
15
|
title?: string | undefined;
|
|
18
16
|
color?: string | undefined;
|
|
@@ -231,6 +229,7 @@ export declare function useHStack(props: WordPressComponentProps<Props, 'div'>):
|
|
|
231
229
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
232
230
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
233
231
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
as?: keyof JSX.IntrinsicElements | undefined;
|
|
234
233
|
key?: import("react").Key | null | undefined;
|
|
235
234
|
defaultChecked?: boolean | undefined;
|
|
236
235
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -264,6 +263,5 @@ export declare function useHStack(props: WordPressComponentProps<Props, 'div'>):
|
|
|
264
263
|
unselectable?: "on" | "off" | undefined;
|
|
265
264
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
266
265
|
is?: string | undefined;
|
|
267
|
-
as?: keyof JSX.IntrinsicElements | undefined;
|
|
268
266
|
};
|
|
269
267
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/h-stack/hook.tsx"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAgB,SAAS,CAAE,KAAK,EAAE,uBAAuB,CAAE,KAAK,EAAE,KAAK,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/h-stack/hook.tsx"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAK1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAgB,SAAS,CAAE,KAAK,EAAE,uBAAuB,CAAE,KAAK,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hide-if-empty.d.ts","sourceRoot":"","sources":["../../../../src/navigation/stories/utils/hide-if-empty.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAE,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"hide-if-empty.d.ts","sourceRoot":"","sources":["../../../../src/navigation/stories/utils/hide-if-empty.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAInC,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAE,OAAO,UAAU,CAqDxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/radio-group/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAQhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/radio-group/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAQhC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,UAAU,CAgBlC,CAAC;AACF,eAAe,IAAI,CAAC;AAMpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,UAAU,CAAwB,CAAC;AAczE,eAAO,MAAM,QAAQ,EAAE,OAAO,CAAE,OAAO,UAAU,CAAwB,CAAC;AA2B1E,eAAO,MAAM,UAAU,EAAE,OAAO,CAAE,OAAO,UAAU,CAElD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import type { NoticeAction } from '../notice/types';
|
|
2
3
|
/**
|
|
3
4
|
* A Snackbar displays a succinct message that is cleared out after a small delay.
|
|
4
5
|
*
|
|
@@ -11,11 +12,13 @@
|
|
|
11
12
|
* );
|
|
12
13
|
* ```
|
|
13
14
|
*/
|
|
14
|
-
export declare const Snackbar: import("react").ForwardRefExoticComponent<
|
|
15
|
+
export declare const Snackbar: import("react").ForwardRefExoticComponent<Pick<import("../notice/types").NoticeProps, "className" | "children" | "onRemove" | "spokenMessage" | "politeness" | "onDismiss"> & {
|
|
15
16
|
icon?: import("react").ReactNode;
|
|
16
17
|
explicitDismiss?: boolean | undefined;
|
|
17
18
|
listRef?: import("react").MutableRefObject<HTMLDivElement | null> | undefined;
|
|
18
|
-
} &
|
|
19
|
+
} & {
|
|
20
|
+
actions?: Pick<NoticeAction, "label" | "onClick" | "url">[] | undefined;
|
|
21
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "className" | "children" | "as" | "actions" | "onRemove" | "spokenMessage" | "politeness" | "onDismiss" | keyof {
|
|
19
22
|
icon?: import("react").ReactNode;
|
|
20
23
|
explicitDismiss?: boolean | undefined;
|
|
21
24
|
listRef?: import("react").MutableRefObject<HTMLDivElement | null> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snackbar/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/snackbar/index.tsx"],"names":[],"mappings":";AAyBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA+JpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;uCAAoC,CAAC;AAE1D,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/snackbar/list.tsx"],"names":[],"mappings":";AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AA8B1D;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAE,EAC7B,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,GACR,EAAE,uBAAuB,CAAE,iBAAiB,EAAE,KAAK,CAAE,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/snackbar/list.tsx"],"names":[],"mappings":";AAmBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AA8B1D;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAE,EAC7B,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,GACR,EAAE,uBAAuB,CAAE,iBAAiB,EAAE,KAAK,CAAE,eA6CrD;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/snackbar/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/snackbar/test/list.tsx"],"names":[],"mappings":""}
|
|
@@ -5,7 +5,7 @@ import type { MutableRefObject, ReactNode } from 'react';
|
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
|
-
import type { NoticeProps, NoticeChildren } from '../notice/types';
|
|
8
|
+
import type { NoticeProps, NoticeChildren, NoticeAction } from '../notice/types';
|
|
9
9
|
type SnackbarOnlyProps = {
|
|
10
10
|
/**
|
|
11
11
|
* The icon to render in the snackbar.
|
|
@@ -25,7 +25,23 @@ type SnackbarOnlyProps = {
|
|
|
25
25
|
*/
|
|
26
26
|
listRef?: MutableRefObject<HTMLDivElement | null>;
|
|
27
27
|
};
|
|
28
|
-
export type SnackbarProps =
|
|
28
|
+
export type SnackbarProps = Pick<NoticeProps, 'className' | 'children' | 'spokenMessage' | 'onRemove' | 'politeness' | 'onDismiss'> & SnackbarOnlyProps & {
|
|
29
|
+
/**
|
|
30
|
+
* An array of action objects. Each member object should contain:
|
|
31
|
+
*
|
|
32
|
+
* - `label`: `string` containing the text of the button/link
|
|
33
|
+
* - `url`: `string` OR `onClick`: `( event: SyntheticEvent ) => void` to specify
|
|
34
|
+
* what the action does.
|
|
35
|
+
*
|
|
36
|
+
* The default appearance of an action button is inferred based on whether
|
|
37
|
+
* `url` or `onClick` are provided, rendering the button as a link if
|
|
38
|
+
* appropriate. If both props are provided, `url` takes precedence, and the
|
|
39
|
+
* action button will render as an anchor tag.
|
|
40
|
+
*
|
|
41
|
+
* @default []
|
|
42
|
+
*/
|
|
43
|
+
actions?: Pick<NoticeAction, 'label' | 'url' | 'onClick'>[];
|
|
44
|
+
};
|
|
29
45
|
export type SnackbarListProps = {
|
|
30
46
|
notices: Array<Omit<SnackbarProps, 'children'> & {
|
|
31
47
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/snackbar/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD;;GAEG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/snackbar/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzD;;GAEG;AACH,OAAO,KAAK,EACX,WAAW,EACX,cAAc,EACd,YAAY,EACZ,MAAM,iBAAiB,CAAC;AAEzB,KAAK,iBAAiB,GAAG;IACxB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAE,cAAc,GAAG,IAAI,CAAE,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,IAAI,CAC/B,WAAW,EACT,WAAW,GACX,UAAU,GACV,eAAe,GACf,UAAU,GACV,YAAY,GACZ,WAAW,CACb,GACA,iBAAiB,GAAG;IACnB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,IAAI,CAAE,YAAY,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAAE,EAAE,CAAC;CAC9D,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,KAAK,CACb,IAAI,CAAE,aAAa,EAAE,UAAU,CAAE,GAAG;QACnC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;KAChB,CACD,CAAC;IACF,QAAQ,EAAE,CAAE,EAAE,EAAE,MAAM,KAAM,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,cAAc,GAAG,KAAK,CAAE,cAAc,CAAE,CAAC;CACpD,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Internal dependencies
|
|
4
4
|
*/
|
|
5
5
|
import type { TabsProps } from './types';
|
|
6
|
-
declare function Tabs({ selectOnMove,
|
|
6
|
+
declare function Tabs({ selectOnMove, defaultTabId, orientation, onSelect, children, selectedTabId, }: TabsProps): JSX.Element;
|
|
7
7
|
declare namespace Tabs {
|
|
8
8
|
var TabList: import("react").ForwardRefExoticComponent<import("./types").TabListProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>>, "children" | "as"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
9
|
var Tab: import("react").ForwardRefExoticComponent<Omit<import("../context").WordPressComponentProps<import("./types").TabProps, "button", false>, "id"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -39,7 +39,7 @@ export type TabsProps = {
|
|
|
39
39
|
* Note: this prop will be overridden by the `selectedTabId` prop if it is
|
|
40
40
|
* provided. (Controlled Mode)
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
defaultTabId?: string;
|
|
43
43
|
/**
|
|
44
44
|
* The function called when a tab has been selected.
|
|
45
45
|
* It is passed the id of the newly selected tab as an argument.
|
|
@@ -2,5 +2,4 @@ export { default as useControlledState } from "./use-controlled-state";
|
|
|
2
2
|
export { default as useUpdateEffect } from "./use-update-effect";
|
|
3
3
|
export { useControlledValue } from "./use-controlled-value";
|
|
4
4
|
export { useCx } from "./use-cx";
|
|
5
|
-
export { useLatestRef } from "./use-latest-ref";
|
|
6
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,13 +6,11 @@ import type { WordPressComponentProps } from '../context';
|
|
|
6
6
|
import type { VStackProps } from './types';
|
|
7
7
|
export declare function useVStack(props: WordPressComponentProps<VStackProps, 'div'>): {
|
|
8
8
|
className: string;
|
|
9
|
-
isColumn: boolean;
|
|
10
|
-
children: import("react").ReactNode;
|
|
11
|
-
isReversed?: boolean | undefined;
|
|
12
9
|
id?: string | undefined;
|
|
13
10
|
prefix?: string | undefined;
|
|
14
11
|
slot?: string | undefined;
|
|
15
12
|
role?: import("react").AriaRole | undefined;
|
|
13
|
+
children: import("react").ReactNode;
|
|
16
14
|
style?: import("react").CSSProperties | undefined;
|
|
17
15
|
title?: string | undefined;
|
|
18
16
|
color?: string | undefined;
|
|
@@ -231,6 +229,7 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
|
|
|
231
229
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
232
230
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
233
231
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
as?: keyof JSX.IntrinsicElements | undefined;
|
|
234
233
|
key?: import("react").Key | null | undefined;
|
|
235
234
|
defaultChecked?: boolean | undefined;
|
|
236
235
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
@@ -264,6 +263,5 @@ export declare function useVStack(props: WordPressComponentProps<VStackProps, 'd
|
|
|
264
263
|
unselectable?: "on" | "off" | undefined;
|
|
265
264
|
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
266
265
|
is?: string | undefined;
|
|
267
|
-
as?: keyof JSX.IntrinsicElements | undefined;
|
|
268
266
|
};
|
|
269
267
|
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,SAAS,CACxB,KAAK,EAAE,uBAAuB,CAAE,WAAW,EAAE,KAAK,CAAE
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/v-stack/hook.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,SAAS,CACxB,KAAK,EAAE,uBAAuB,CAAE,WAAW,EAAE,KAAK,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBpD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.1.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
"@types/gradient-parser": "0.1.3",
|
|
43
43
|
"@types/highlight-words-core": "1.2.1",
|
|
44
44
|
"@use-gesture/react": "^10.2.24",
|
|
45
|
-
"@wordpress/a11y": "^3.
|
|
46
|
-
"@wordpress/compose": "^6.
|
|
47
|
-
"@wordpress/date": "^4.
|
|
48
|
-
"@wordpress/deprecated": "^3.
|
|
49
|
-
"@wordpress/dom": "^3.
|
|
50
|
-
"@wordpress/element": "^5.
|
|
51
|
-
"@wordpress/escape-html": "^2.
|
|
52
|
-
"@wordpress/hooks": "^3.
|
|
53
|
-
"@wordpress/html-entities": "^3.
|
|
54
|
-
"@wordpress/i18n": "^4.
|
|
55
|
-
"@wordpress/icons": "^9.
|
|
56
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
57
|
-
"@wordpress/keycodes": "^3.
|
|
58
|
-
"@wordpress/primitives": "^3.
|
|
59
|
-
"@wordpress/private-apis": "^0.
|
|
60
|
-
"@wordpress/rich-text": "^6.
|
|
61
|
-
"@wordpress/warning": "^2.
|
|
45
|
+
"@wordpress/a11y": "^3.53.0",
|
|
46
|
+
"@wordpress/compose": "^6.30.0",
|
|
47
|
+
"@wordpress/date": "^4.53.0",
|
|
48
|
+
"@wordpress/deprecated": "^3.53.0",
|
|
49
|
+
"@wordpress/dom": "^3.53.0",
|
|
50
|
+
"@wordpress/element": "^5.30.0",
|
|
51
|
+
"@wordpress/escape-html": "^2.53.0",
|
|
52
|
+
"@wordpress/hooks": "^3.53.0",
|
|
53
|
+
"@wordpress/html-entities": "^3.53.0",
|
|
54
|
+
"@wordpress/i18n": "^4.53.0",
|
|
55
|
+
"@wordpress/icons": "^9.44.0",
|
|
56
|
+
"@wordpress/is-shallow-equal": "^4.53.0",
|
|
57
|
+
"@wordpress/keycodes": "^3.53.0",
|
|
58
|
+
"@wordpress/primitives": "^3.51.0",
|
|
59
|
+
"@wordpress/private-apis": "^0.35.0",
|
|
60
|
+
"@wordpress/rich-text": "^6.30.0",
|
|
61
|
+
"@wordpress/warning": "^2.53.0",
|
|
62
62
|
"change-case": "^4.1.2",
|
|
63
63
|
"classnames": "^2.3.1",
|
|
64
64
|
"colord": "^2.7.0",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "ac3c3e465a083081a86a4da6ee6fb817b41e5130"
|
|
90
90
|
}
|
|
@@ -5,7 +5,7 @@ import { Text, View } from 'react-native';
|
|
|
5
5
|
|
|
6
6
|
export default function BaseControl( { label, help, children } ) {
|
|
7
7
|
return (
|
|
8
|
-
<View accessible
|
|
8
|
+
<View accessible accessibilityLabel={ label }>
|
|
9
9
|
{ label && <Text>{ label }</Text> }
|
|
10
10
|
{ children }
|
|
11
11
|
{ help && <Text>{ help }</Text> }
|
|
@@ -14,7 +14,7 @@ const MyBaseControl = ( props: Omit< BaseControlProps, 'children' > ) => {
|
|
|
14
14
|
const { baseControlProps, controlProps } = useBaseControlProps( props );
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom
|
|
17
|
+
<BaseControl { ...baseControlProps } __nextHasNoMarginBottom>
|
|
18
18
|
<textarea { ...controlProps } />
|
|
19
19
|
</BaseControl>
|
|
20
20
|
);
|
|
@@ -111,7 +111,7 @@ const UnconnectedBorderBoxControl = (
|
|
|
111
111
|
__unstablePopoverProps={ popoverProps }
|
|
112
112
|
shouldSanitizeBorder={ false } // This component will handle that.
|
|
113
113
|
value={ linkedValue }
|
|
114
|
-
withSlider
|
|
114
|
+
withSlider
|
|
115
115
|
width={
|
|
116
116
|
size === '__unstable-large' ? '116px' : '110px'
|
|
117
117
|
}
|
|
@@ -76,7 +76,7 @@ const BorderBoxControlSplitControls = (
|
|
|
76
76
|
<BorderBoxControlVisualizer value={ value } size={ size } />
|
|
77
77
|
<BorderControl
|
|
78
78
|
className={ centeredClassName }
|
|
79
|
-
hideLabelFromVision
|
|
79
|
+
hideLabelFromVision
|
|
80
80
|
label={ __( 'Top border' ) }
|
|
81
81
|
onChange={ ( newBorder ) => onChange( newBorder, 'top' ) }
|
|
82
82
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -84,7 +84,7 @@ const BorderBoxControlSplitControls = (
|
|
|
84
84
|
{ ...sharedBorderControlProps }
|
|
85
85
|
/>
|
|
86
86
|
<BorderControl
|
|
87
|
-
hideLabelFromVision
|
|
87
|
+
hideLabelFromVision
|
|
88
88
|
label={ __( 'Left border' ) }
|
|
89
89
|
onChange={ ( newBorder ) => onChange( newBorder, 'left' ) }
|
|
90
90
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -93,7 +93,7 @@ const BorderBoxControlSplitControls = (
|
|
|
93
93
|
/>
|
|
94
94
|
<BorderControl
|
|
95
95
|
className={ rightAlignedClassName }
|
|
96
|
-
hideLabelFromVision
|
|
96
|
+
hideLabelFromVision
|
|
97
97
|
label={ __( 'Right border' ) }
|
|
98
98
|
onChange={ ( newBorder ) => onChange( newBorder, 'right' ) }
|
|
99
99
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -102,7 +102,7 @@ const BorderBoxControlSplitControls = (
|
|
|
102
102
|
/>
|
|
103
103
|
<BorderControl
|
|
104
104
|
className={ centeredClassName }
|
|
105
|
-
hideLabelFromVision
|
|
105
|
+
hideLabelFromVision
|
|
106
106
|
label={ __( 'Bottom border' ) }
|
|
107
107
|
onChange={ ( newBorder ) => onChange( newBorder, 'bottom' ) }
|
|
108
108
|
__unstablePopoverProps={ popoverProps }
|
|
@@ -179,7 +179,7 @@ const BorderControlDropdown = (
|
|
|
179
179
|
aria-label={ toggleAriaLabel }
|
|
180
180
|
tooltipPosition={ dropdownPosition }
|
|
181
181
|
label={ __( 'Border color and style picker' ) }
|
|
182
|
-
showTooltip
|
|
182
|
+
showTooltip
|
|
183
183
|
__next40pxDefaultSize={ size === '__unstable-large' ? true : false }
|
|
184
184
|
>
|
|
185
185
|
<span className={ indicatorWrapperClassName }>
|
package/src/button/index.tsx
CHANGED
|
@@ -223,10 +223,10 @@ export function UnforwardedButton(
|
|
|
223
223
|
<Icon icon={ icon } size={ iconSize } />
|
|
224
224
|
) }
|
|
225
225
|
{ text && <>{ text }</> }
|
|
226
|
+
{ children }
|
|
226
227
|
{ icon && iconPosition === 'right' && (
|
|
227
228
|
<Icon icon={ icon } size={ iconSize } />
|
|
228
229
|
) }
|
|
229
|
-
{ children }
|
|
230
230
|
</>
|
|
231
231
|
);
|
|
232
232
|
|
package/src/button/style.scss
CHANGED
|
@@ -84,9 +84,7 @@
|
|
|
84
84
|
outline: none;
|
|
85
85
|
|
|
86
86
|
&:focus:enabled {
|
|
87
|
-
box-shadow:
|
|
88
|
-
0 0 0 $border-width $components-color-background,
|
|
89
|
-
0 0 0 3px $components-color-accent;
|
|
87
|
+
box-shadow: inset 0 0 0 1px $components-color-background, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
|
|
@@ -59,9 +59,7 @@ describe( 'CircularOptionPicker', () => {
|
|
|
59
59
|
|
|
60
60
|
describe( 'when `asButtons` is true', () => {
|
|
61
61
|
it( 'should render as buttons', async () => {
|
|
62
|
-
render(
|
|
63
|
-
<CircularOptionPicker { ...DEFAULT_PROPS } asButtons={ true } />
|
|
64
|
-
);
|
|
62
|
+
render( <CircularOptionPicker { ...DEFAULT_PROPS } asButtons /> );
|
|
65
63
|
|
|
66
64
|
expect( screen.queryByRole( 'listbox' ) ).not.toBeInTheDocument();
|
|
67
65
|
expect( screen.queryByRole( 'option' ) ).not.toBeInTheDocument();
|
|
@@ -94,7 +92,7 @@ describe( 'CircularOptionPicker', () => {
|
|
|
94
92
|
<CircularOptionPicker
|
|
95
93
|
{ ...DEFAULT_PROPS }
|
|
96
94
|
options={ MULTIPLE_OPTIONS }
|
|
97
|
-
loop
|
|
95
|
+
loop
|
|
98
96
|
/>
|
|
99
97
|
);
|
|
100
98
|
|
|
@@ -86,7 +86,7 @@ const UnconnectedConfirmDialog = (
|
|
|
86
86
|
onRequestClose={ handleEvent( onCancel ) }
|
|
87
87
|
onKeyDown={ handleEnter }
|
|
88
88
|
closeButtonLabel={ cancelLabel }
|
|
89
|
-
isDismissible
|
|
89
|
+
isDismissible
|
|
90
90
|
ref={ forwardedRef }
|
|
91
91
|
overlayClassName={ wrapperClassName }
|
|
92
92
|
__experimentalHideHeader
|
|
@@ -235,11 +235,7 @@ describe( 'Confirm', () => {
|
|
|
235
235
|
describe( 'When controlled (isOpen is not `undefined`)', () => {
|
|
236
236
|
it( 'should render when `isOpen` is set to `true`', async () => {
|
|
237
237
|
render(
|
|
238
|
-
<ConfirmDialog
|
|
239
|
-
isOpen={ true }
|
|
240
|
-
onConfirm={ noop }
|
|
241
|
-
onCancel={ noop }
|
|
242
|
-
>
|
|
238
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ noop }>
|
|
243
239
|
Are you sure?
|
|
244
240
|
</ConfirmDialog>
|
|
245
241
|
);
|
|
@@ -273,7 +269,7 @@ describe( 'Confirm', () => {
|
|
|
273
269
|
const onConfirm = jest.fn().mockName( 'onConfirm()' );
|
|
274
270
|
|
|
275
271
|
render(
|
|
276
|
-
<ConfirmDialog isOpen
|
|
272
|
+
<ConfirmDialog isOpen onConfirm={ onConfirm }>
|
|
277
273
|
Are you sure?
|
|
278
274
|
</ConfirmDialog>
|
|
279
275
|
);
|
|
@@ -291,11 +287,7 @@ describe( 'Confirm', () => {
|
|
|
291
287
|
const onCancel = jest.fn().mockName( 'onCancel()' );
|
|
292
288
|
|
|
293
289
|
render(
|
|
294
|
-
<ConfirmDialog
|
|
295
|
-
isOpen={ true }
|
|
296
|
-
onConfirm={ noop }
|
|
297
|
-
onCancel={ onCancel }
|
|
298
|
-
>
|
|
290
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ onCancel }>
|
|
299
291
|
Are you sure?
|
|
300
292
|
</ConfirmDialog>
|
|
301
293
|
);
|
|
@@ -312,11 +304,7 @@ describe( 'Confirm', () => {
|
|
|
312
304
|
const onCancel = jest.fn().mockName( 'onCancel()' );
|
|
313
305
|
|
|
314
306
|
render(
|
|
315
|
-
<ConfirmDialog
|
|
316
|
-
isOpen={ true }
|
|
317
|
-
onConfirm={ noop }
|
|
318
|
-
onCancel={ onCancel }
|
|
319
|
-
>
|
|
307
|
+
<ConfirmDialog isOpen onConfirm={ noop } onCancel={ onCancel }>
|
|
320
308
|
Are you sure?
|
|
321
309
|
</ConfirmDialog>
|
|
322
310
|
);
|
|
@@ -352,11 +340,7 @@ describe( 'Confirm', () => {
|
|
|
352
340
|
const onConfirm = jest.fn().mockName( 'onConfirm()' );
|
|
353
341
|
|
|
354
342
|
render(
|
|
355
|
-
<ConfirmDialog
|
|
356
|
-
isOpen={ true }
|
|
357
|
-
onConfirm={ onConfirm }
|
|
358
|
-
onCancel={ noop }
|
|
359
|
-
>
|
|
343
|
+
<ConfirmDialog isOpen onConfirm={ onConfirm } onCancel={ noop }>
|
|
360
344
|
Are you sure?
|
|
361
345
|
</ConfirmDialog>
|
|
362
346
|
);
|
|
@@ -8,8 +8,11 @@ import * as Ariakit from '@ariakit/react';
|
|
|
8
8
|
*/
|
|
9
9
|
import _CustomSelect from '../custom-select';
|
|
10
10
|
import type { CustomSelectProps } from '../types';
|
|
11
|
+
import type { WordPressComponentProps } from '../../context';
|
|
11
12
|
|
|
12
|
-
function CustomSelect(
|
|
13
|
+
function CustomSelect(
|
|
14
|
+
props: WordPressComponentProps< CustomSelectProps, 'button', false >
|
|
15
|
+
) {
|
|
13
16
|
const { defaultValue, onChange, value, ...restProps } = props;
|
|
14
17
|
// Forward props + store from v2 implementation
|
|
15
18
|
const store = Ariakit.useSelectStore( {
|