@wordpress/components 32.3.1-next.v.202602241322.0 → 32.4.1-next.v.202603102151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/build/alignment-matrix-control/cell.cjs +2 -2
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +2 -2
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/angle-picker-control/angle-circle.cjs +2 -2
- package/build/angle-picker-control/angle-circle.cjs.map +2 -2
- package/build/calendar/utils/constants.cjs +1 -0
- package/build/calendar/utils/constants.cjs.map +2 -2
- package/build/date-time/date/styles.cjs +9 -9
- package/build/date-time/date/styles.cjs.map +2 -2
- package/build/menu/radio-item.cjs +1 -1
- package/build/menu/radio-item.cjs.map +2 -2
- package/build/private-apis.cjs +0 -4
- package/build/private-apis.cjs.map +3 -3
- package/build/select-control/styles/select-control-styles.cjs +8 -8
- package/build/select-control/styles/select-control-styles.cjs.map +2 -2
- package/build/tooltip/index.cjs +1 -1
- package/build/tooltip/index.cjs.map +1 -1
- package/build/visually-hidden/styles.cjs +2 -1
- package/build/visually-hidden/styles.cjs.map +2 -2
- package/build-module/alignment-matrix-control/cell.mjs +2 -2
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +2 -2
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/angle-picker-control/angle-circle.mjs +2 -2
- package/build-module/angle-picker-control/angle-circle.mjs.map +2 -2
- package/build-module/calendar/utils/constants.mjs +1 -0
- package/build-module/calendar/utils/constants.mjs.map +2 -2
- package/build-module/date-time/date/styles.mjs +9 -9
- package/build-module/date-time/date/styles.mjs.map +2 -2
- package/build-module/menu/radio-item.mjs +1 -1
- package/build-module/menu/radio-item.mjs.map +2 -2
- package/build-module/private-apis.mjs +0 -4
- package/build-module/private-apis.mjs.map +2 -2
- package/build-module/select-control/styles/select-control-styles.mjs +8 -8
- package/build-module/select-control/styles/select-control-styles.mjs.map +2 -2
- package/build-module/tooltip/index.mjs +1 -1
- package/build-module/tooltip/index.mjs.map +1 -1
- package/build-module/visually-hidden/styles.mjs +2 -1
- package/build-module/visually-hidden/styles.mjs.map +2 -2
- package/build-style/style-rtl.css +5 -180
- package/build-style/style.css +5 -180
- package/build-types/calendar/stories/date-calendar.story.d.ts +5 -0
- package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/stories/date-range-calendar.story.d.ts +5 -0
- package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -1
- package/build-types/calendar/types.d.ts +12 -0
- package/build-types/calendar/types.d.ts.map +1 -1
- package/build-types/calendar/utils/constants.d.ts +1 -0
- package/build-types/calendar/utils/constants.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/dropdown/types.d.ts +9 -13
- package/build-types/dropdown/types.d.ts.map +1 -1
- package/build-types/menu/radio-item.d.ts.map +1 -1
- package/build-types/modal/types.d.ts +9 -3
- package/build-types/modal/types.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +10 -10
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +1 -1
- package/build-types/tools-panel/types.d.ts +1 -1
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tooltip/types.d.ts +2 -2
- package/build-types/visually-hidden/styles.d.ts.map +1 -1
- package/package.json +22 -22
- package/src/calendar/stories/date-calendar.story.tsx +11 -0
- package/src/calendar/stories/date-range-calendar.story.tsx +11 -0
- package/src/calendar/style.scss +5 -0
- package/src/calendar/types.ts +12 -0
- package/src/calendar/utils/constants.ts +1 -0
- package/src/date-time/date/styles.ts +1 -0
- package/src/dropdown/types.ts +9 -14
- package/src/form-token-field/style.scss +1 -0
- package/src/menu/radio-item.tsx +1 -1
- package/src/modal/types.ts +9 -5
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
- package/src/popover/types.ts +10 -10
- package/src/private-apis.ts +0 -4
- package/src/select-control/styles/select-control-styles.ts +1 -0
- package/src/style.scss +0 -2
- package/src/tools-panel/types.ts +4 -1
- package/src/tooltip/README.md +2 -2
- package/src/tooltip/index.tsx +2 -2
- package/src/tooltip/types.ts +2 -2
- package/src/visually-hidden/styles.ts +1 -0
- package/src/visually-hidden/test/__snapshots__/index.tsx.snap +1 -1
- package/build/avatar/component.cjs +0 -99
- package/build/avatar/component.cjs.map +0 -7
- package/build/avatar/index.cjs +0 -37
- package/build/avatar/index.cjs.map +0 -7
- package/build/avatar/types.cjs +0 -19
- package/build/avatar/types.cjs.map +0 -7
- package/build/avatar-group/component.cjs +0 -60
- package/build/avatar-group/component.cjs.map +0 -7
- package/build/avatar-group/index.cjs +0 -37
- package/build/avatar-group/index.cjs.map +0 -7
- package/build/avatar-group/types.cjs +0 -19
- package/build/avatar-group/types.cjs.map +0 -7
- package/build-module/avatar/component.mjs +0 -68
- package/build-module/avatar/component.mjs.map +0 -7
- package/build-module/avatar/index.mjs +0 -6
- package/build-module/avatar/index.mjs.map +0 -7
- package/build-module/avatar/types.mjs +0 -1
- package/build-module/avatar/types.mjs.map +0 -7
- package/build-module/avatar-group/component.mjs +0 -29
- package/build-module/avatar-group/component.mjs.map +0 -7
- package/build-module/avatar-group/index.mjs +0 -6
- package/build-module/avatar-group/index.mjs.map +0 -7
- package/build-module/avatar-group/types.mjs +0 -1
- package/build-module/avatar-group/types.mjs.map +0 -7
- package/build-types/avatar/component.d.ts +0 -5
- package/build-types/avatar/component.d.ts.map +0 -1
- package/build-types/avatar/index.d.ts +0 -3
- package/build-types/avatar/index.d.ts.map +0 -1
- package/build-types/avatar/types.d.ts +0 -59
- package/build-types/avatar/types.d.ts.map +0 -1
- package/build-types/avatar-group/component.d.ts +0 -8
- package/build-types/avatar-group/component.d.ts.map +0 -1
- package/build-types/avatar-group/index.d.ts +0 -3
- package/build-types/avatar-group/index.d.ts.map +0 -1
- package/build-types/avatar-group/types.d.ts +0 -14
- package/build-types/avatar-group/types.d.ts.map +0 -1
- package/src/avatar/component.tsx +0 -82
- package/src/avatar/index.ts +0 -2
- package/src/avatar/styles.scss +0 -152
- package/src/avatar/types.ts +0 -59
- package/src/avatar-group/component.tsx +0 -46
- package/src/avatar-group/index.ts +0 -2
- package/src/avatar-group/styles.scss +0 -32
- package/src/avatar-group/types.ts +0 -13
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { ReactNode, MutableRefObject, SyntheticEvent } from 'react';
|
|
5
1
|
import type { Placement } from '@floating-ui/react-dom';
|
|
2
|
+
import type { useFocusOnMount } from '@wordpress/compose';
|
|
3
|
+
import type { MutableRefObject, ReactNode, SyntheticEvent } from 'react';
|
|
6
4
|
type PositionYAxis = 'top' | 'middle' | 'bottom';
|
|
7
5
|
type PositionXAxis = 'left' | 'center' | 'right';
|
|
8
6
|
type PositionCorner = 'top' | 'right' | 'bottom' | 'left';
|
|
@@ -70,15 +68,17 @@ export type PopoverProps = {
|
|
|
70
68
|
*/
|
|
71
69
|
constrainTabbing?: boolean;
|
|
72
70
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
71
|
+
* Determines focus behavior when the popover mounts.
|
|
72
|
+
*
|
|
73
|
+
* - `"firstElement"` focuses the first tabbable element within.
|
|
74
|
+
* - `"firstInputElement"` focuses the first value control within.
|
|
75
|
+
* - `true` focuses the element itself.
|
|
76
|
+
* - `false` does nothing and _should not be used unless an accessible
|
|
77
|
+
* substitute behavior is implemented_.
|
|
78
78
|
*
|
|
79
79
|
* @default 'firstElement'
|
|
80
80
|
*/
|
|
81
|
-
focusOnMount?:
|
|
81
|
+
focusOnMount?: useFocusOnMount.Mode;
|
|
82
82
|
/**
|
|
83
83
|
* A callback invoked when the focus leaves the opened popover. This should
|
|
84
84
|
* only be provided in advanced use-cases when a popover should close under
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/popover/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/popover/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEzE,KAAK,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjD,KAAK,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACjD,KAAK,cAAc,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D,KAAK,wBAAwB,GAAG,OAAO,GAAG;IACzC,aAAa,CAAC,EAAE,QAAQ,CAAC;CACzB,CAAC;AAEF,KAAK,gBAAgB,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9C,MAAM,MAAM,yBAAyB,GAAG,gBAAgB,CACvD,OAAO,GAAG,IAAI,GAAG,SAAS,CAC1B,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1E,MAAM,MAAM,cAAc,GAAG,IAAI,CAAE,OAAO,EAAE,uBAAuB,CAAE,GAAG;IACvE,aAAa,CAAC,EAAE,QAAQ,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;;;;;OAOG;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H,SAAS,CAAC,EACP,OAAO,GACP,yBAAyB,GACzB,yBAAyB,GACzB,KAAK,CAAC;IACT;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CACf,wBAAwB,EAAE,OAAO,GAAG,IAAI,KACpC,wBAAwB,CAAC;IAC9B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"AAiCA,eAAO,MAAM,WAAW,IAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnD,UAAU,WACT,SAAQ,IAAI,CACX,kBAAkB,EAClB,uBAAuB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAC7D;IAGD,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAuBD,eAAO,MAAM,eAAe;;;;wBAM3B,CAAC;AAiDF,eAAO,MAAM,eAAe,KAAK,CAAC;AAmDlC,eAAO,MAAM,MAAM;;;
|
|
1
|
+
{"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnD,UAAU,WACT,SAAQ,IAAI,CACX,kBAAkB,EAClB,uBAAuB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAC7D;IAGD,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAuBD,eAAO,MAAM,eAAe;;;;wBAM3B,CAAC;AAiDF,eAAO,MAAM,eAAe,KAAK,CAAC;AAmDlC,eAAO,MAAM,MAAM;;;mIAwBlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAO5B,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;UAOrD,CAAC"}
|
|
@@ -23,7 +23,7 @@ export declare function useToolsPanel(props: WordPressComponentProps<ToolsPanelP
|
|
|
23
23
|
toggleItem: (label: string) => void;
|
|
24
24
|
className: string;
|
|
25
25
|
children: import("react").ReactNode;
|
|
26
|
-
dropdownMenuProps?: React.ComponentProps<typeof import("../..").DropdownMenu>;
|
|
26
|
+
dropdownMenuProps?: Omit<React.ComponentProps<typeof import("../..").DropdownMenu>, "label">;
|
|
27
27
|
label: string;
|
|
28
28
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
29
29
|
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -17,7 +17,7 @@ export type ToolsPanelProps = {
|
|
|
17
17
|
/**
|
|
18
18
|
* The dropdown menu props to configure the panel's `DropdownMenu`.
|
|
19
19
|
*/
|
|
20
|
-
dropdownMenuProps?: React.ComponentProps<typeof DropdownMenu>;
|
|
20
|
+
dropdownMenuProps?: Omit<React.ComponentProps<typeof DropdownMenu>, 'label'>;
|
|
21
21
|
/**
|
|
22
22
|
* Flags that the items in this ToolsPanel will be contained within an inner
|
|
23
23
|
* wrapper element allowing the panel to lay them out accordingly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tools-panel/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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EAAE,CAAC;CACxB,CAAC"}
|
|
@@ -33,7 +33,7 @@ export type TooltipProps = {
|
|
|
33
33
|
/**
|
|
34
34
|
* Where the tooltip should be positioned relative to its parent.
|
|
35
35
|
*
|
|
36
|
-
* @default
|
|
36
|
+
* @default top
|
|
37
37
|
*/
|
|
38
38
|
placement?: Placement;
|
|
39
39
|
/**
|
|
@@ -45,7 +45,7 @@ export type TooltipProps = {
|
|
|
45
45
|
* `"bottom"` y axis, and `"left"`, `"center"`, `"right"` x axis.
|
|
46
46
|
*
|
|
47
47
|
* @deprecated
|
|
48
|
-
* @default
|
|
48
|
+
* @default top
|
|
49
49
|
*/
|
|
50
50
|
position?: PopoverProps['position'];
|
|
51
51
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/visually-hidden/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/visually-hidden/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,cAAc,EAAE,aAa5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.4.1-next.v.202603102151.0+59e17f9ec",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"src/**/*.scss"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@ariakit/react": "^0.4.
|
|
54
|
+
"@ariakit/react": "^0.4.22",
|
|
55
55
|
"@date-fns/utc": "^2.1.1",
|
|
56
56
|
"@emotion/cache": "^11.14.0",
|
|
57
57
|
"@emotion/css": "^11.13.5",
|
|
@@ -64,24 +64,24 @@
|
|
|
64
64
|
"@types/highlight-words-core": "1.2.1",
|
|
65
65
|
"@types/react": "^18.3.27",
|
|
66
66
|
"@use-gesture/react": "^10.3.1",
|
|
67
|
-
"@wordpress/a11y": "^4.
|
|
68
|
-
"@wordpress/base-styles": "^6.
|
|
69
|
-
"@wordpress/compose": "^7.
|
|
70
|
-
"@wordpress/date": "^5.
|
|
71
|
-
"@wordpress/deprecated": "^4.
|
|
72
|
-
"@wordpress/dom": "^4.
|
|
73
|
-
"@wordpress/element": "^6.
|
|
74
|
-
"@wordpress/escape-html": "^3.
|
|
75
|
-
"@wordpress/hooks": "^4.
|
|
76
|
-
"@wordpress/html-entities": "^4.
|
|
77
|
-
"@wordpress/i18n": "^6.
|
|
78
|
-
"@wordpress/icons": "^
|
|
79
|
-
"@wordpress/is-shallow-equal": "^5.
|
|
80
|
-
"@wordpress/keycodes": "^4.
|
|
81
|
-
"@wordpress/primitives": "^4.
|
|
82
|
-
"@wordpress/private-apis": "^1.
|
|
83
|
-
"@wordpress/rich-text": "^7.
|
|
84
|
-
"@wordpress/warning": "^3.
|
|
67
|
+
"@wordpress/a11y": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
68
|
+
"@wordpress/base-styles": "^6.17.1-next.v.202603102151.0+59e17f9ec",
|
|
69
|
+
"@wordpress/compose": "^7.41.1-next.v.202603102151.0+59e17f9ec",
|
|
70
|
+
"@wordpress/date": "^5.41.1-next.v.202603102151.0+59e17f9ec",
|
|
71
|
+
"@wordpress/deprecated": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
72
|
+
"@wordpress/dom": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
73
|
+
"@wordpress/element": "^6.41.1-next.v.202603102151.0+59e17f9ec",
|
|
74
|
+
"@wordpress/escape-html": "^3.41.1-next.v.202603102151.0+59e17f9ec",
|
|
75
|
+
"@wordpress/hooks": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
76
|
+
"@wordpress/html-entities": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
77
|
+
"@wordpress/i18n": "^6.14.1-next.v.202603102151.0+59e17f9ec",
|
|
78
|
+
"@wordpress/icons": "^12.0.1-next.v.202603102151.0+59e17f9ec",
|
|
79
|
+
"@wordpress/is-shallow-equal": "^5.41.1-next.v.202603102151.0+59e17f9ec",
|
|
80
|
+
"@wordpress/keycodes": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
81
|
+
"@wordpress/primitives": "^4.41.1-next.v.202603102151.0+59e17f9ec",
|
|
82
|
+
"@wordpress/private-apis": "^1.41.1-next.v.202603102151.0+59e17f9ec",
|
|
83
|
+
"@wordpress/rich-text": "^7.41.1-next.v.202603102151.0+59e17f9ec",
|
|
84
|
+
"@wordpress/warning": "^3.41.1-next.v.202603102151.0+59e17f9ec",
|
|
85
85
|
"change-case": "^4.1.2",
|
|
86
86
|
"clsx": "^2.1.1",
|
|
87
87
|
"colord": "^2.7.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"@storybook/react-vite": "^10.1.11",
|
|
108
108
|
"@testing-library/jest-dom": "^6.9.1",
|
|
109
109
|
"@types/jest": "^29.5.14",
|
|
110
|
-
"@wordpress/jest-console": "^8.
|
|
110
|
+
"@wordpress/jest-console": "^8.41.1-next.v.202603102151.0+59e17f9ec",
|
|
111
111
|
"snapshot-diff": "^0.10.0",
|
|
112
112
|
"storybook": "^10.1.11",
|
|
113
113
|
"timezone-mock": "^1.3.6"
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"publishConfig": {
|
|
120
120
|
"access": "public"
|
|
121
121
|
},
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "86db21e727d89e8f0dbba9300d2f97fd22b08693"
|
|
123
123
|
}
|
|
@@ -159,6 +159,17 @@ export const WithSelectedDateAndMonth: Story = {
|
|
|
159
159
|
},
|
|
160
160
|
};
|
|
161
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Shows days from adjacent months in the grid. Outside days use a lighter style
|
|
164
|
+
* and are still interactive. Use `fixedWeeks` to keep the grid height constant.
|
|
165
|
+
*/
|
|
166
|
+
export const WithOutsideDays: Story = {
|
|
167
|
+
args: {
|
|
168
|
+
showOutsideDays: true,
|
|
169
|
+
fixedWeeks: true,
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
|
|
162
173
|
/**
|
|
163
174
|
* When working with time zones, use the `TZDate` object exported by this package instead of the native `Date` object.
|
|
164
175
|
*/
|
|
@@ -162,6 +162,17 @@ export const WithSelectedRangeAndMonth: Story = {
|
|
|
162
162
|
},
|
|
163
163
|
};
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Shows days from adjacent months in the grid. Outside days use a lighter style
|
|
167
|
+
* and are still interactive. Use `fixedWeeks` to keep the grid height constant.
|
|
168
|
+
*/
|
|
169
|
+
export const WithOutsideDays: Story = {
|
|
170
|
+
args: {
|
|
171
|
+
showOutsideDays: true,
|
|
172
|
+
fixedWeeks: true,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
165
176
|
/**
|
|
166
177
|
* When working with time zones, use the `TZDate` object exported by this package instead of the native `Date` object.
|
|
167
178
|
*/
|
package/src/calendar/style.scss
CHANGED
|
@@ -253,6 +253,11 @@ $wp-components-calendar-preview-border-color: color-mix(in srgb, $components-col
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
// Outside month days (visible when showOutsideDays is true): use a lighter text color.
|
|
257
|
+
.components-calendar__day--outside {
|
|
258
|
+
color: $components-color-gray-600;
|
|
259
|
+
}
|
|
260
|
+
|
|
256
261
|
// Hidden button (ie. outside current month but still rendered)
|
|
257
262
|
.components-calendar__day--hidden {
|
|
258
263
|
visibility: hidden;
|
package/src/calendar/types.ts
CHANGED
|
@@ -187,6 +187,18 @@ export interface BaseProps
|
|
|
187
187
|
* @default 1
|
|
188
188
|
*/
|
|
189
189
|
numberOfMonths?: number;
|
|
190
|
+
/**
|
|
191
|
+
* When `true`, days from adjacent months are shown in the grid and receive
|
|
192
|
+
* the `outside` modifier and the class.
|
|
193
|
+
* @default false
|
|
194
|
+
*/
|
|
195
|
+
showOutsideDays?: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* When `true`, the calendar always shows a fixed number of weeks (e.g. 6)
|
|
198
|
+
* so the grid height does not change between months.
|
|
199
|
+
* @default false
|
|
200
|
+
*/
|
|
201
|
+
fixedWeeks?: boolean;
|
|
190
202
|
/**
|
|
191
203
|
* The earliest month to start the month navigation.
|
|
192
204
|
*/
|
|
@@ -7,6 +7,7 @@ const CLASSNAMES = {
|
|
|
7
7
|
root: 'components-calendar',
|
|
8
8
|
day: 'components-calendar__day',
|
|
9
9
|
day_button: 'components-calendar__day-button',
|
|
10
|
+
outside: 'components-calendar__day--outside',
|
|
10
11
|
caption_label: 'components-calendar__caption-label',
|
|
11
12
|
button_next: 'components-calendar__button-next',
|
|
12
13
|
button_previous: 'components-calendar__button-previous',
|
package/src/dropdown/types.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
1
|
+
import type { useFocusOnMount } from '@wordpress/compose';
|
|
4
2
|
import type { ComponentPropsWithoutRef, CSSProperties, ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
3
|
import type Popover from '../popover';
|
|
10
4
|
import type { PopoverProps } from '../popover/types';
|
|
11
5
|
|
|
@@ -42,16 +36,17 @@ export type DropdownProps = {
|
|
|
42
36
|
*/
|
|
43
37
|
expandOnMobile?: boolean;
|
|
44
38
|
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
39
|
+
* Determines focus behavior when the dialog mounts.
|
|
40
|
+
*
|
|
41
|
+
* - `"firstElement"` focuses the first tabbable element within.
|
|
42
|
+
* - `"firstInputElement"` focuses the first value control within.
|
|
43
|
+
* - `true` focuses the element itself.
|
|
44
|
+
* - `false` does nothing and _should not be used unless an accessible
|
|
45
|
+
* substitute behavior is implemented_.
|
|
51
46
|
*
|
|
52
47
|
* @default 'firstElement'
|
|
53
48
|
*/
|
|
54
|
-
focusOnMount?:
|
|
49
|
+
focusOnMount?: useFocusOnMount.Mode;
|
|
55
50
|
/**
|
|
56
51
|
* Set this to customize the text that is shown in the dropdown's header
|
|
57
52
|
* when it is fullscreen on mobile.
|
package/src/menu/radio-item.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import * as Ariakit from '@ariakit/react';
|
|
|
8
8
|
*/
|
|
9
9
|
import { forwardRef, useContext } from '@wordpress/element';
|
|
10
10
|
import { Icon } from '@wordpress/icons';
|
|
11
|
+
import { SVG, Circle } from '@wordpress/primitives';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Internal dependencies
|
|
@@ -16,7 +17,6 @@ import type { WordPressComponentProps } from '../context';
|
|
|
16
17
|
import { Context } from './context';
|
|
17
18
|
import type { RadioItemProps } from './types';
|
|
18
19
|
import * as Styled from './styles';
|
|
19
|
-
import { SVG, Circle } from '@wordpress/primitives';
|
|
20
20
|
|
|
21
21
|
const radioCheck = (
|
|
22
22
|
<SVG xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
package/src/modal/types.ts
CHANGED
|
@@ -51,14 +51,18 @@ export type ModalProps = {
|
|
|
51
51
|
*/
|
|
52
52
|
contentLabel?: string;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
54
|
+
* Determines focus behavior when the modal opens.
|
|
55
|
+
*
|
|
56
|
+
* - `"firstElement"` focuses the first tabbable element within.
|
|
57
|
+
* - `"firstInputElement"` focuses the first value control within.
|
|
58
|
+
* - `"firstContentElement"` focuses the first tabbable element within the modal’s content element.
|
|
59
|
+
* - `true` focuses the element itself.
|
|
60
|
+
* - `false` does nothing and _should not be used unless an accessible
|
|
61
|
+
* substitute behavior is implemented_.
|
|
56
62
|
*
|
|
57
63
|
* @default true
|
|
58
64
|
*/
|
|
59
|
-
focusOnMount?:
|
|
60
|
-
| Parameters< typeof useFocusOnMount >[ 0 ]
|
|
61
|
-
| 'firstContentElement';
|
|
65
|
+
focusOnMount?: useFocusOnMount.Mode | 'firstContentElement';
|
|
62
66
|
/**
|
|
63
67
|
* Elements that are injected into the modal header to the left of the close button (if rendered).
|
|
64
68
|
* Hidden if `__experimentalHideHeader` is `true`.
|
|
@@ -9,7 +9,7 @@ exports[`Notice should match snapshot 1`] = `
|
|
|
9
9
|
class="components-visually-hidden css-1ragr82-PolymorphicDiv emotion-0"
|
|
10
10
|
data-wp-c16t="true"
|
|
11
11
|
data-wp-component="VisuallyHidden"
|
|
12
|
-
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
|
|
12
|
+
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal; word-break: normal;"
|
|
13
13
|
>
|
|
14
14
|
Notice
|
|
15
15
|
</div>
|
package/src/popover/types.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { ReactNode, MutableRefObject, SyntheticEvent } from 'react';
|
|
5
1
|
import type { Placement } from '@floating-ui/react-dom';
|
|
2
|
+
import type { useFocusOnMount } from '@wordpress/compose';
|
|
3
|
+
import type { MutableRefObject, ReactNode, SyntheticEvent } from 'react';
|
|
6
4
|
|
|
7
5
|
type PositionYAxis = 'top' | 'middle' | 'bottom';
|
|
8
6
|
type PositionXAxis = 'left' | 'center' | 'right';
|
|
@@ -75,15 +73,17 @@ export type PopoverProps = {
|
|
|
75
73
|
*/
|
|
76
74
|
constrainTabbing?: boolean;
|
|
77
75
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
76
|
+
* Determines focus behavior when the popover mounts.
|
|
77
|
+
*
|
|
78
|
+
* - `"firstElement"` focuses the first tabbable element within.
|
|
79
|
+
* - `"firstInputElement"` focuses the first value control within.
|
|
80
|
+
* - `true` focuses the element itself.
|
|
81
|
+
* - `false` does nothing and _should not be used unless an accessible
|
|
82
|
+
* substitute behavior is implemented_.
|
|
83
83
|
*
|
|
84
84
|
* @default 'firstElement'
|
|
85
85
|
*/
|
|
86
|
-
focusOnMount?:
|
|
86
|
+
focusOnMount?: useFocusOnMount.Mode;
|
|
87
87
|
/**
|
|
88
88
|
* A callback invoked when the focus leaves the opened popover. This should
|
|
89
89
|
* only be provided in advanced use-cases when a popover should close under
|
package/src/private-apis.ts
CHANGED
|
@@ -14,8 +14,6 @@ import { Tabs } from './tabs';
|
|
|
14
14
|
import { kebabCase, normalizeTextString } from './utils/strings';
|
|
15
15
|
import { withIgnoreIMEEvents } from './utils/with-ignore-ime-events';
|
|
16
16
|
import { lock } from './lock-unlock';
|
|
17
|
-
import Avatar from './avatar';
|
|
18
|
-
import AvatarGroup from './avatar-group';
|
|
19
17
|
import Badge from './badge';
|
|
20
18
|
|
|
21
19
|
import { DateCalendar, DateRangeCalendar, TZDate } from './calendar';
|
|
@@ -36,8 +34,6 @@ import { ValidatedFormTokenField } from './validated-form-controls/components/fo
|
|
|
36
34
|
export const privateApis = {};
|
|
37
35
|
lock( privateApis, {
|
|
38
36
|
__experimentalPopoverLegacyPositionToPlacement,
|
|
39
|
-
Avatar,
|
|
40
|
-
AvatarGroup,
|
|
41
37
|
ComponentsContext,
|
|
42
38
|
Tabs,
|
|
43
39
|
Theme,
|
|
@@ -162,6 +162,7 @@ export const Select = styled.select< SelectProps >`
|
|
|
162
162
|
cursor: inherit;
|
|
163
163
|
display: block;
|
|
164
164
|
font-family: inherit;
|
|
165
|
+
line-height: 1.3; // Override forms.css styles, large enough value to prevent descender clipping without affecting height
|
|
165
166
|
margin: 0;
|
|
166
167
|
width: 100%;
|
|
167
168
|
max-width: none;
|
package/src/style.scss
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
@use "@wordpress/base-styles/mixins" as *;
|
|
2
2
|
@use "./animate/style.scss" as *;
|
|
3
3
|
@use "./autocomplete/style.scss" as *;
|
|
4
|
-
@use "./avatar/styles.scss" as *;
|
|
5
|
-
@use "./avatar-group/styles.scss" as *;
|
|
6
4
|
@use "./badge/styles.scss" as *;
|
|
7
5
|
@use "./button-group/style.scss" as *;
|
|
8
6
|
@use "./button/style.scss" as *;
|
package/src/tools-panel/types.ts
CHANGED
|
@@ -20,7 +20,10 @@ export type ToolsPanelProps = {
|
|
|
20
20
|
/**
|
|
21
21
|
* The dropdown menu props to configure the panel's `DropdownMenu`.
|
|
22
22
|
*/
|
|
23
|
-
dropdownMenuProps?:
|
|
23
|
+
dropdownMenuProps?: Omit<
|
|
24
|
+
React.ComponentProps< typeof DropdownMenu >,
|
|
25
|
+
'label'
|
|
26
|
+
>;
|
|
24
27
|
/**
|
|
25
28
|
* Flags that the items in this ToolsPanel will be contained within an inner
|
|
26
29
|
* wrapper element allowing the panel to lay them out accordingly.
|
package/src/tooltip/README.md
CHANGED
|
@@ -51,7 +51,7 @@ Option to hide the tooltip when the anchor is clicked.
|
|
|
51
51
|
Used to specify the tooltip's placement with respect to its anchor.
|
|
52
52
|
|
|
53
53
|
- Required: No
|
|
54
|
-
- Default: `'
|
|
54
|
+
- Default: `'top'`
|
|
55
55
|
|
|
56
56
|
#### `position`: `string`
|
|
57
57
|
|
|
@@ -60,7 +60,7 @@ _Note: use the `placement` prop instead when possible._
|
|
|
60
60
|
Legacy way to specify the popover's position with respect to its anchor. Specify y- and x-axis as a space-separated string. Supports `'top'`, `'middle'`, `'bottom'` y axis, and `'left'`, `'center'`, `'right'` x axis.
|
|
61
61
|
|
|
62
62
|
- Required: No
|
|
63
|
-
- Default: `'
|
|
63
|
+
- Default: `'top'`
|
|
64
64
|
|
|
65
65
|
#### `shortcut`: `string` | `object`
|
|
66
66
|
|
package/src/tooltip/index.tsx
CHANGED
|
@@ -58,7 +58,7 @@ function UnforwardedTooltip(
|
|
|
58
58
|
// Compute tooltip's placement:
|
|
59
59
|
// - give priority to `placement` prop, if defined
|
|
60
60
|
// - otherwise, compute it from the legacy `position` prop (if defined)
|
|
61
|
-
// - finally, fallback to the default placement: '
|
|
61
|
+
// - finally, fallback to the default placement: 'top'
|
|
62
62
|
let computedPlacement;
|
|
63
63
|
if ( placement !== undefined ) {
|
|
64
64
|
computedPlacement = placement;
|
|
@@ -69,7 +69,7 @@ function UnforwardedTooltip(
|
|
|
69
69
|
alternative: '`placement` prop',
|
|
70
70
|
} );
|
|
71
71
|
}
|
|
72
|
-
computedPlacement = computedPlacement || '
|
|
72
|
+
computedPlacement = computedPlacement || 'top';
|
|
73
73
|
|
|
74
74
|
const tooltipStore = Ariakit.useTooltipStore( {
|
|
75
75
|
placement: computedPlacement,
|
package/src/tooltip/types.ts
CHANGED
|
@@ -35,7 +35,7 @@ export type TooltipProps = {
|
|
|
35
35
|
/**
|
|
36
36
|
* Where the tooltip should be positioned relative to its parent.
|
|
37
37
|
*
|
|
38
|
-
* @default
|
|
38
|
+
* @default top
|
|
39
39
|
*/
|
|
40
40
|
placement?: Placement;
|
|
41
41
|
/**
|
|
@@ -47,7 +47,7 @@ export type TooltipProps = {
|
|
|
47
47
|
* `"bottom"` y axis, and `"left"`, `"center"`, `"right"` x axis.
|
|
48
48
|
*
|
|
49
49
|
* @deprecated
|
|
50
|
-
* @default
|
|
50
|
+
* @default top
|
|
51
51
|
*/
|
|
52
52
|
position?: PopoverProps[ 'position' ];
|
|
53
53
|
/**
|
|
@@ -5,7 +5,7 @@ exports[`VisuallyHidden should render correctly 1`] = `
|
|
|
5
5
|
class="components-visually-hidden css-1ragr82-PolymorphicDiv emotion-0"
|
|
6
6
|
data-wp-c16t="true"
|
|
7
7
|
data-wp-component="VisuallyHidden"
|
|
8
|
-
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal;"
|
|
8
|
+
style="border: 0px; clip: rect(1px, 1px, 1px, 1px); clip-path: inset( 50% ); height: 1px; margin: -1px; overflow: hidden; padding: 0px; position: absolute; width: 1px; word-wrap: normal; word-break: normal;"
|
|
9
9
|
>
|
|
10
10
|
This is hidden
|
|
11
11
|
</div>
|