@wordpress/components 24.0.0 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/CONTRIBUTING.md +10 -0
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -84
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/date-time/styles.js +4 -19
- package/build/date-time/date-time/styles.js.map +1 -1
- package/build/dropdown-menu/index.js +87 -11
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/types.js +6 -0
- package/build/dropdown-menu/types.js.map +1 -0
- package/build/dropdown-menu-v2/index.js +195 -0
- package/build/dropdown-menu-v2/index.js.map +1 -0
- package/build/dropdown-menu-v2/styles.js +176 -0
- package/build/dropdown-menu-v2/styles.js.map +1 -0
- package/build/dropdown-menu-v2/types.js +6 -0
- package/build/dropdown-menu-v2/types.js.map +1 -0
- package/build/index.native.js +0 -9
- package/build/index.native.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +30 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +16 -8
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +8 -2
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/modal/index.js +1 -2
- package/build/modal/index.js.map +1 -1
- package/build/private-apis.js +13 -1
- package/build/private-apis.js.map +1 -1
- package/build/range-control/index.native.js +5 -2
- package/build/range-control/index.native.js.map +1 -1
- package/build/snackbar/list.js +0 -2
- package/build/snackbar/list.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +6 -81
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/date-time/styles.js +3 -17
- package/build-module/date-time/date-time/styles.js.map +1 -1
- package/build-module/dropdown-menu/index.js +87 -10
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/types.js +2 -0
- package/build-module/dropdown-menu/types.js.map +1 -0
- package/build-module/dropdown-menu-v2/index.js +149 -0
- package/build-module/dropdown-menu-v2/index.js.map +1 -0
- package/build-module/dropdown-menu-v2/styles.js +153 -0
- package/build-module/dropdown-menu-v2/styles.js.map +1 -0
- package/build-module/dropdown-menu-v2/types.js +2 -0
- package/build-module/dropdown-menu-v2/types.js.map +1 -0
- package/build-module/index.native.js +0 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +30 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +16 -8
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +7 -2
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +4 -2
- 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 +4 -2
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +1 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/private-apis.js +12 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/range-control/index.native.js +5 -2
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/snackbar/list.js +0 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-style/style-rtl.css +11 -14
- package/build-style/style.css +11 -14
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +3 -4
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +0 -4
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +0 -14
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +83 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/test/index.d.ts +2 -0
- package/build-types/dropdown-menu/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/types.d.ts +134 -0
- package/build-types/dropdown-menu/types.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/index.d.ts +17 -0
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/styles.d.ts +41 -0
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts +2 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/types.d.ts +242 -0
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.d.ts.map +1 -1
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -10
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/button/style.scss +5 -12
- package/src/color-picker/styles.ts +7 -2
- package/src/date-time/README.md +0 -16
- package/src/date-time/date-time/index.tsx +17 -155
- package/src/date-time/date-time/styles.ts +0 -4
- package/src/date-time/stories/date-time.tsx +0 -4
- package/src/date-time/types.ts +0 -16
- package/src/dropdown-menu/README.md +12 -22
- package/src/dropdown-menu/{index.js → index.tsx} +111 -25
- package/src/dropdown-menu/stories/{index.js → index.tsx} +14 -22
- package/src/dropdown-menu/test/{index.js → index.tsx} +6 -5
- package/src/dropdown-menu/types.ts +143 -0
- package/src/dropdown-menu-v2/README.md +392 -0
- package/src/dropdown-menu-v2/index.tsx +241 -0
- package/src/dropdown-menu-v2/stories/index.tsx +193 -0
- package/src/dropdown-menu-v2/styles.ts +263 -0
- package/src/dropdown-menu-v2/test/index.tsx +816 -0
- package/src/dropdown-menu-v2/types.ts +250 -0
- package/src/index.native.js +0 -1
- package/src/input-control/styles/input-control-styles.tsx +7 -0
- package/src/mobile/bottom-sheet/cell.native.js +26 -5
- package/src/mobile/bottom-sheet/range-cell.native.js +2 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -0
- package/src/mobile/bottom-sheet/styles.native.scss +13 -1
- package/src/mobile/bottom-sheet/switch-cell.native.js +10 -2
- package/src/mobile/bottom-sheet-select-control/index.native.js +2 -0
- package/src/mobile/bottom-sheet-text-control/index.native.js +2 -0
- package/src/modal/index.tsx +1 -6
- package/src/private-apis.ts +22 -0
- package/src/range-control/index.native.js +3 -0
- package/src/search-control/style.scss +2 -0
- package/src/snackbar/list.tsx +0 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -2
- package/src/toggle-group-control/toggle-group-control/styles.ts +6 -1
- package/src/toolbar/stories/index.tsx +25 -28
- package/src/tooltip/style.scss +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/mobile/readable-content-view/index.native.js +0 -97
- package/build/mobile/readable-content-view/index.native.js.map +0 -1
- package/build-module/mobile/readable-content-view/index.native.js +0 -81
- package/build-module/mobile/readable-content-view/index.native.js.map +0 -1
- package/src/mobile/readable-content-view/index.native.js +0 -85
- package/src/mobile/readable-content-view/style.native.scss +0 -30
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
6
|
+
export type DropdownMenuProps = {
|
|
7
|
+
/**
|
|
8
|
+
* The open state of the dropdown menu when it is initially rendered. Use when
|
|
9
|
+
* you do not need to control its open state.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
defaultOpen?: DropdownMenuPrimitive.DropdownMenuProps['defaultOpen'];
|
|
13
|
+
/**
|
|
14
|
+
* The controlled open state of the dropdown menu. Must be used in conjunction
|
|
15
|
+
* with `onOpenChange`.
|
|
16
|
+
*/
|
|
17
|
+
open?: DropdownMenuPrimitive.DropdownMenuProps['open'];
|
|
18
|
+
/**
|
|
19
|
+
* Event handler called when the open state of the dropdown menu changes.
|
|
20
|
+
*/
|
|
21
|
+
onOpenChange?: DropdownMenuPrimitive.DropdownMenuProps['onOpenChange'];
|
|
22
|
+
/**
|
|
23
|
+
* The modality of the dropdown menu. When set to true, interaction with
|
|
24
|
+
* outside elements will be disabled and only menu content will be visible to
|
|
25
|
+
* screen readers.
|
|
26
|
+
*
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
modal?: DropdownMenuPrimitive.DropdownMenuProps['modal'];
|
|
30
|
+
/**
|
|
31
|
+
* The preferred side of the trigger to render against when open.
|
|
32
|
+
* Will be reversed when collisions occur and avoidCollisions is enabled.
|
|
33
|
+
*
|
|
34
|
+
* @default 'bottom'
|
|
35
|
+
*/
|
|
36
|
+
side?: DropdownMenuPrimitive.DropdownMenuContentProps['side'];
|
|
37
|
+
/**
|
|
38
|
+
* The distance in pixels from the trigger.
|
|
39
|
+
*
|
|
40
|
+
* @default 0
|
|
41
|
+
*/
|
|
42
|
+
sideOffset?: DropdownMenuPrimitive.DropdownMenuContentProps['sideOffset'];
|
|
43
|
+
/**
|
|
44
|
+
* The preferred alignment against the trigger.
|
|
45
|
+
* May change when collisions occur.
|
|
46
|
+
*
|
|
47
|
+
* @default 'center'
|
|
48
|
+
*/
|
|
49
|
+
align?: DropdownMenuPrimitive.DropdownMenuContentProps['align'];
|
|
50
|
+
/**
|
|
51
|
+
* An offset in pixels from the "start" or "end" alignment options.
|
|
52
|
+
*
|
|
53
|
+
* @default 0
|
|
54
|
+
*/
|
|
55
|
+
alignOffset?: DropdownMenuPrimitive.DropdownMenuContentProps['alignOffset'];
|
|
56
|
+
/**
|
|
57
|
+
* The trigger button.
|
|
58
|
+
*/
|
|
59
|
+
trigger: React.ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* The contents of the dropdown
|
|
62
|
+
*/
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
};
|
|
65
|
+
export type DropdownSubMenuTriggerProps = {
|
|
66
|
+
/**
|
|
67
|
+
* The contents of the item.
|
|
68
|
+
*/
|
|
69
|
+
children: React.ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* The contents of the item's prefix.
|
|
72
|
+
*/
|
|
73
|
+
prefix?: React.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* The contents of the item's suffix.
|
|
76
|
+
*
|
|
77
|
+
* @default The standard chevron icon for a submenu trigger.
|
|
78
|
+
*/
|
|
79
|
+
suffix?: React.ReactNode;
|
|
80
|
+
};
|
|
81
|
+
export type DropdownSubMenuProps = {
|
|
82
|
+
/**
|
|
83
|
+
* The open state of the submenu when it is initially rendered. Use when you
|
|
84
|
+
* do not need to control its open state.
|
|
85
|
+
*/
|
|
86
|
+
defaultOpen?: DropdownMenuPrimitive.DropdownMenuSubProps['defaultOpen'];
|
|
87
|
+
/**
|
|
88
|
+
* The controlled open state of the submenu. Must be used in conjunction with
|
|
89
|
+
* `onOpenChange`.
|
|
90
|
+
*/
|
|
91
|
+
open?: DropdownMenuPrimitive.DropdownMenuSubProps['open'];
|
|
92
|
+
/**
|
|
93
|
+
* Event handler called when the open state of the submenu changes.
|
|
94
|
+
*/
|
|
95
|
+
onOpenChange?: DropdownMenuPrimitive.DropdownMenuSubProps['onOpenChange'];
|
|
96
|
+
/**
|
|
97
|
+
* When `true`, prevents the user from interacting with the item.
|
|
98
|
+
*/
|
|
99
|
+
disabled?: DropdownMenuPrimitive.DropdownMenuSubTriggerProps['disabled'];
|
|
100
|
+
/**
|
|
101
|
+
* Optional text used for typeahead purposes for the trigger. By default the typeahead
|
|
102
|
+
* behavior will use the `.textContent` of the trigger. Use this when the content
|
|
103
|
+
* is complex, or you have non-textual content inside.
|
|
104
|
+
*/
|
|
105
|
+
textValue?: DropdownMenuPrimitive.DropdownMenuSubTriggerProps['textValue'];
|
|
106
|
+
/**
|
|
107
|
+
* The contents rendered inside the trigger. The trigger should be
|
|
108
|
+
* an instance of the `DropdownSubMenuTriggerProps` component.
|
|
109
|
+
*/
|
|
110
|
+
trigger: React.ReactNode;
|
|
111
|
+
/**
|
|
112
|
+
* The contents of the dropdown sub menu
|
|
113
|
+
*/
|
|
114
|
+
children: React.ReactNode;
|
|
115
|
+
};
|
|
116
|
+
export type DropdownMenuItemProps = {
|
|
117
|
+
/**
|
|
118
|
+
* When true, prevents the user from interacting with the item.
|
|
119
|
+
*
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
disabled?: DropdownMenuPrimitive.DropdownMenuItemProps['disabled'];
|
|
123
|
+
/**
|
|
124
|
+
* Event handler called when the user selects an item (via mouse or keyboard).
|
|
125
|
+
* Calling `event.preventDefault` in this handler will prevent the dropdown
|
|
126
|
+
* menu from closing when selecting that item.
|
|
127
|
+
*/
|
|
128
|
+
onSelect?: DropdownMenuPrimitive.DropdownMenuItemProps['onSelect'];
|
|
129
|
+
/**
|
|
130
|
+
* Optional text used for typeahead purposes. By default the typeahead
|
|
131
|
+
* behavior will use the `.textContent` of the item. Use this when the content
|
|
132
|
+
* is complex, or you have non-textual content inside.
|
|
133
|
+
*/
|
|
134
|
+
textValue?: DropdownMenuPrimitive.DropdownMenuItemProps['textValue'];
|
|
135
|
+
/**
|
|
136
|
+
* The contents of the item
|
|
137
|
+
*/
|
|
138
|
+
children: React.ReactNode;
|
|
139
|
+
/**
|
|
140
|
+
* The contents of the item's prefix
|
|
141
|
+
*/
|
|
142
|
+
prefix?: React.ReactNode;
|
|
143
|
+
/**
|
|
144
|
+
* The contents of the item's suffix
|
|
145
|
+
*/
|
|
146
|
+
suffix?: React.ReactNode;
|
|
147
|
+
};
|
|
148
|
+
export type DropdownMenuCheckboxItemProps = {
|
|
149
|
+
/**
|
|
150
|
+
* The controlled checked state of the item.
|
|
151
|
+
* Must be used in conjunction with `onCheckedChange`.
|
|
152
|
+
*
|
|
153
|
+
* @default false
|
|
154
|
+
*/
|
|
155
|
+
checked?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps['checked'];
|
|
156
|
+
/**
|
|
157
|
+
* Event handler called when the checked state changes.
|
|
158
|
+
*/
|
|
159
|
+
onCheckedChange?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps['onCheckedChange'];
|
|
160
|
+
/**
|
|
161
|
+
* When `true`, prevents the user from interacting with the item.
|
|
162
|
+
*/
|
|
163
|
+
disabled?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps['disabled'];
|
|
164
|
+
/**
|
|
165
|
+
* Event handler called when the user selects an item (via mouse or keyboard).
|
|
166
|
+
* Calling `event.preventDefault` in this handler will prevent the dropdown
|
|
167
|
+
* menu from closing when selecting that item.
|
|
168
|
+
*/
|
|
169
|
+
onSelect?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps['onSelect'];
|
|
170
|
+
/**
|
|
171
|
+
* Optional text used for typeahead purposes. By default the typeahead
|
|
172
|
+
* behavior will use the `.textContent` of the item. Use this when the content
|
|
173
|
+
* is complex, or you have non-textual content inside.
|
|
174
|
+
*/
|
|
175
|
+
textValue?: DropdownMenuPrimitive.DropdownMenuCheckboxItemProps['textValue'];
|
|
176
|
+
/**
|
|
177
|
+
* The contents of the checkbox item
|
|
178
|
+
*/
|
|
179
|
+
children: React.ReactNode;
|
|
180
|
+
/**
|
|
181
|
+
* The contents of the checkbox item's suffix
|
|
182
|
+
*/
|
|
183
|
+
suffix?: React.ReactNode;
|
|
184
|
+
};
|
|
185
|
+
export type DropdownMenuRadioGroupProps = {
|
|
186
|
+
/**
|
|
187
|
+
* The value of the selected item in the group.
|
|
188
|
+
*/
|
|
189
|
+
value?: DropdownMenuPrimitive.DropdownMenuRadioGroupProps['value'];
|
|
190
|
+
/**
|
|
191
|
+
* Event handler called when the value changes.
|
|
192
|
+
*/
|
|
193
|
+
onValueChange?: DropdownMenuPrimitive.DropdownMenuRadioGroupProps['onValueChange'];
|
|
194
|
+
/**
|
|
195
|
+
* The contents of the radio group
|
|
196
|
+
*/
|
|
197
|
+
children: React.ReactNode;
|
|
198
|
+
};
|
|
199
|
+
export type DropdownMenuRadioItemProps = {
|
|
200
|
+
/**
|
|
201
|
+
* The unique value of the item.
|
|
202
|
+
*/
|
|
203
|
+
value: DropdownMenuPrimitive.DropdownMenuRadioItemProps['value'];
|
|
204
|
+
/**
|
|
205
|
+
* When `true`, prevents the user from interacting with the item.
|
|
206
|
+
*/
|
|
207
|
+
disabled?: DropdownMenuPrimitive.DropdownMenuRadioItemProps['disabled'];
|
|
208
|
+
/**
|
|
209
|
+
* Event handler called when the user selects an item (via mouse or keyboard).
|
|
210
|
+
* Calling `event.preventDefault` in this handler will prevent the dropdown
|
|
211
|
+
* menu from closing when selecting that item.
|
|
212
|
+
*/
|
|
213
|
+
onSelect?: DropdownMenuPrimitive.DropdownMenuRadioItemProps['onSelect'];
|
|
214
|
+
/**
|
|
215
|
+
* Optional text used for typeahead purposes. By default the typeahead
|
|
216
|
+
* behavior will use the `.textContent` of the item. Use this when the content
|
|
217
|
+
* is complex, or you have non-textual content inside.
|
|
218
|
+
*/
|
|
219
|
+
textValue?: DropdownMenuPrimitive.DropdownMenuRadioItemProps['textValue'];
|
|
220
|
+
/**
|
|
221
|
+
* The contents of the radio item
|
|
222
|
+
*/
|
|
223
|
+
children: React.ReactNode;
|
|
224
|
+
/**
|
|
225
|
+
* The contents of the radio item's suffix
|
|
226
|
+
*/
|
|
227
|
+
suffix?: React.ReactNode;
|
|
228
|
+
};
|
|
229
|
+
export type DropdownMenuLabelProps = {
|
|
230
|
+
/**
|
|
231
|
+
* The contents of the label
|
|
232
|
+
*/
|
|
233
|
+
children: React.ReactNode;
|
|
234
|
+
};
|
|
235
|
+
export type DropdownMenuGroupProps = {
|
|
236
|
+
/**
|
|
237
|
+
* The contents of the group
|
|
238
|
+
*/
|
|
239
|
+
children: React.ReactNode;
|
|
240
|
+
};
|
|
241
|
+
export type DropdownMenuSeparatorProps = {};
|
|
242
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu-v2/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAE5E,MAAM,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;AAmBF,eAAO,MAAM,KAAK,UACV,wBACN;IAAE,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,EACtD,OAAO,EACP,KAAK,CACL,gBACwC,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;UAExB,CAAC;AAEF,KAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"input-control-styles.d.ts","sourceRoot":"","sources":["../../../src/input-control/styles/input-control-styles.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGpD,KAAK,cAAc,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,KAAK,SAAS,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAQF,eAAO,MAAM,IAAI;;;;sBAMhB,CAAC;AA2BF,eAAO,MAAM,SAAS;;;0HAUrB,CAAC;AAEF,KAAK,UAAU,GAAG;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAE,QAAQ,CAAE,CAAC;IACvC,kBAAkB,CAAC,EAAE,aAAa,CAAE,oBAAoB,CAAE,CAAC;IAC3D,gBAAgB,CAAC,EAAE,aAAa,CAAE,kBAAkB,CAAE,CAAC;CACvD,CAAC;AA+BF,eAAO,MAAM,aAAa,gDAGvB,UAAU;;;;;;;;;;;;;;;;;;CAqCZ,CAAC;AA+CF,eAAO,MAAM,KAAK;;;+HAuBjB,CAAC;AAmBF,eAAO,MAAM,KAAK,UACV,wBACN;IAAE,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,EACtD,OAAO,EACP,KAAK,CACL,gBACwC,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;UAExB,CAAC;AAEF,KAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAiCF,eAAO,MAAM,UAAU;;;yHAgBtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAKlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AAoCA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmO1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,KAAK,uGAAiC,CAAC;AAEpD,eAAe,KAAK,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":"AAwBA,eAAO,MAAQ,IAAI,2CAAE,MAAM,sBAIzB,CAAC;AAEH,eAAO,MAAM,WAAW,IAAK,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,eAAe,CAAC;AAsB7D;;;;;;;;;;;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,eAAe,CAAC;AAsB7D;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAE,EAC7B,OAAO,EACP,SAAS,EACT,QAAQ,EACR,QAAQ,GACR,EAAE,uBAAuB,CAAE,iBAAiB,EAAE,KAAK,CAAE,eAuCrD;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,kBAAkB;UAKxB,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE;+CActD,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/toggle-group-control/toggle-group-control/styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAExD,eAAO,MAAM,kBAAkB;UAKxB,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE;+CActD,CAAC;AAyBF,eAAO,MAAM,sBAAsB,SAC5B,YAAa,uBAAuB,CAAE,MAAM,CAAE,CAAE,8CAUtD,CAAC;AAEF,eAAO,MAAM,KAAK,2CAGjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;yGAaxB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;yGAG9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAwBtE;;GAEG;AACH,OAAO,EACN,OAAO,EAKP,MAAM,IAAI,CAAC;AAGZ,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CAgBxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO,6WAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/toolbar/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAwBtE;;GAEG;AACH,OAAO,EACN,OAAO,EAKP,MAAM,IAAI,CAAC;AAGZ,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,OAAO,CAgBxC,CAAC;AAEF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO,6WAAsB,CAAC;AAmG3C,eAAO,MAAM,YAAY,6WAAsB,CAAC"}
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Generates the connected component CSS className based on the namespace.
|
|
4
|
-
*
|
|
5
|
-
* @param namespace The name of the connected component.
|
|
6
|
-
* @return The generated CSS className.
|
|
7
|
-
*/
|
|
8
|
-
declare function getStyledClassName(namespace: string): string;
|
|
9
|
-
export declare const getStyledClassNameFromKey: typeof getStyledClassName & memoize.MemizeMemoizedFunction;
|
|
10
|
-
export {};
|
|
1
|
+
export declare const getStyledClassNameFromKey: ((namespace: string) => string) & import("memize").MemizeMemoizedFunction;
|
|
11
2
|
//# sourceMappingURL=get-styled-class-name-from-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-styled-class-name-from-key.d.ts","sourceRoot":"","sources":["../../../src/ui/context/get-styled-class-name-from-key.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-styled-class-name-from-key.d.ts","sourceRoot":"","sources":["../../../src/ui/context/get-styled-class-name-from-key.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,yBAAyB,2EAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -38,24 +38,25 @@
|
|
|
38
38
|
"@emotion/styled": "^11.6.0",
|
|
39
39
|
"@emotion/utils": "^1.0.0",
|
|
40
40
|
"@floating-ui/react-dom": "1.0.0",
|
|
41
|
+
"@radix-ui/react-dropdown-menu": "^2.0.4",
|
|
41
42
|
"@use-gesture/react": "^10.2.24",
|
|
42
|
-
"@wordpress/a11y": "^3.
|
|
43
|
-
"@wordpress/compose": "^6.
|
|
44
|
-
"@wordpress/date": "^4.
|
|
45
|
-
"@wordpress/deprecated": "^3.
|
|
46
|
-
"@wordpress/dom": "^3.
|
|
47
|
-
"@wordpress/element": "^5.
|
|
48
|
-
"@wordpress/escape-html": "^2.
|
|
49
|
-
"@wordpress/hooks": "^3.
|
|
50
|
-
"@wordpress/html-entities": "^3.
|
|
51
|
-
"@wordpress/i18n": "^4.
|
|
52
|
-
"@wordpress/icons": "^9.
|
|
53
|
-
"@wordpress/is-shallow-equal": "^4.
|
|
54
|
-
"@wordpress/keycodes": "^3.
|
|
55
|
-
"@wordpress/primitives": "^3.
|
|
56
|
-
"@wordpress/private-apis": "^0.
|
|
57
|
-
"@wordpress/rich-text": "^6.
|
|
58
|
-
"@wordpress/warning": "^2.
|
|
43
|
+
"@wordpress/a11y": "^3.34.0",
|
|
44
|
+
"@wordpress/compose": "^6.11.0",
|
|
45
|
+
"@wordpress/date": "^4.34.0",
|
|
46
|
+
"@wordpress/deprecated": "^3.34.0",
|
|
47
|
+
"@wordpress/dom": "^3.34.0",
|
|
48
|
+
"@wordpress/element": "^5.11.0",
|
|
49
|
+
"@wordpress/escape-html": "^2.34.0",
|
|
50
|
+
"@wordpress/hooks": "^3.34.0",
|
|
51
|
+
"@wordpress/html-entities": "^3.34.0",
|
|
52
|
+
"@wordpress/i18n": "^4.34.0",
|
|
53
|
+
"@wordpress/icons": "^9.25.0",
|
|
54
|
+
"@wordpress/is-shallow-equal": "^4.34.0",
|
|
55
|
+
"@wordpress/keycodes": "^3.34.0",
|
|
56
|
+
"@wordpress/primitives": "^3.32.0",
|
|
57
|
+
"@wordpress/private-apis": "^0.16.0",
|
|
58
|
+
"@wordpress/rich-text": "^6.11.0",
|
|
59
|
+
"@wordpress/warning": "^2.34.0",
|
|
59
60
|
"change-case": "^4.1.2",
|
|
60
61
|
"classnames": "^2.3.1",
|
|
61
62
|
"colord": "^2.7.0",
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
"gradient-parser": "^0.1.5",
|
|
69
70
|
"highlight-words-core": "^1.2.2",
|
|
70
71
|
"is-plain-object": "^5.0.0",
|
|
71
|
-
"memize": "^
|
|
72
|
+
"memize": "^2.1.0",
|
|
72
73
|
"path-to-regexp": "^6.2.1",
|
|
73
74
|
"re-resizable": "^6.4.0",
|
|
74
75
|
"react-colorful": "^5.3.1",
|
|
@@ -85,5 +86,5 @@
|
|
|
85
86
|
"publishConfig": {
|
|
86
87
|
"access": "public"
|
|
87
88
|
},
|
|
88
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "c7c79cb11b677adcbf06cf5f8cfb6c5ec1699f19"
|
|
89
90
|
}
|
package/src/button/style.scss
CHANGED
|
@@ -118,21 +118,14 @@
|
|
|
118
118
|
outline: 1px solid transparent;
|
|
119
119
|
|
|
120
120
|
&:active:not(:disabled) {
|
|
121
|
-
background: $components-color-gray-300;
|
|
122
|
-
color: $components-color-accent-darker-10;
|
|
123
121
|
box-shadow: none;
|
|
124
122
|
}
|
|
125
123
|
|
|
126
|
-
&:hover:not(:disabled) {
|
|
127
|
-
color: $components-color-accent-darker-10;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
124
|
&:disabled,
|
|
131
125
|
&[aria-disabled="true"],
|
|
132
126
|
&[aria-disabled="true"]:hover {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
background: lighten($gray-300, 5%);
|
|
127
|
+
color: $gray-600;
|
|
128
|
+
background: transparent;
|
|
136
129
|
transform: none;
|
|
137
130
|
opacity: 1;
|
|
138
131
|
box-shadow: none;
|
|
@@ -165,12 +158,12 @@
|
|
|
165
158
|
color: $components-color-accent;
|
|
166
159
|
background: transparent;
|
|
167
160
|
|
|
168
|
-
&:hover:not(:disabled) {
|
|
161
|
+
&:hover:not(:disabled, [aria-disabled="true"]) {
|
|
169
162
|
// TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
|
|
170
163
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
171
164
|
}
|
|
172
165
|
|
|
173
|
-
&:active:not(:disabled) {
|
|
166
|
+
&:active:not(:disabled, [aria-disabled="true"]) {
|
|
174
167
|
// TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
|
|
175
168
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
176
169
|
}
|
|
@@ -239,7 +232,7 @@
|
|
|
239
232
|
}
|
|
240
233
|
}
|
|
241
234
|
|
|
242
|
-
&:not([aria-disabled="true"]):active {
|
|
235
|
+
&:not(:disabled, [aria-disabled="true"]):active {
|
|
243
236
|
color: $components-color-foreground;
|
|
244
237
|
}
|
|
245
238
|
|
|
@@ -29,8 +29,13 @@ export const NumberControlWrapper = styled( NumberControl )`
|
|
|
29
29
|
export const SelectControl = styled( InnerSelectControl )`
|
|
30
30
|
margin-left: ${ space( -2 ) };
|
|
31
31
|
width: 5em;
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/*
|
|
33
|
+
* Remove border, but preserve focus styles
|
|
34
|
+
* TODO: this override should be removed,
|
|
35
|
+
* see https://github.com/WordPress/gutenberg/pull/50609
|
|
36
|
+
*/
|
|
37
|
+
select:not( :focus ) ~ ${ BackdropUI }${ BackdropUI }${ BackdropUI } {
|
|
38
|
+
border-color: transparent;
|
|
34
39
|
}
|
|
35
40
|
`;
|
|
36
41
|
|
package/src/date-time/README.md
CHANGED
|
@@ -26,8 +26,6 @@ const MyDateTimePicker = () => {
|
|
|
26
26
|
currentDate={ date }
|
|
27
27
|
onChange={ ( newDate ) => setDate( newDate ) }
|
|
28
28
|
is12Hour={ true }
|
|
29
|
-
__nextRemoveHelpButton
|
|
30
|
-
__nextRemoveResetButton
|
|
31
29
|
/>
|
|
32
30
|
);
|
|
33
31
|
};
|
|
@@ -83,17 +81,3 @@ The day that the week should start on. 0 for Sunday, 1 for Monday, etc.
|
|
|
83
81
|
|
|
84
82
|
- Required: No
|
|
85
83
|
- Default: 0
|
|
86
|
-
|
|
87
|
-
### `__nextRemoveHelpButton`: `boolean`
|
|
88
|
-
|
|
89
|
-
Start opting in to not displaying a Help button which will become the default in a future version.
|
|
90
|
-
|
|
91
|
-
- Required: No
|
|
92
|
-
- Default: `false`
|
|
93
|
-
|
|
94
|
-
### `__nextRemoveResetButton`: `boolean`
|
|
95
|
-
|
|
96
|
-
Start opting in to not displaying a Reset button which will become the default in a future version.
|
|
97
|
-
|
|
98
|
-
- Required: No
|
|
99
|
-
- Default: `false`
|
|
@@ -6,21 +6,16 @@ import type { ForwardedRef } from 'react';
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
9
|
+
import { forwardRef } from '@wordpress/element';
|
|
10
10
|
import { __, _x } from '@wordpress/i18n';
|
|
11
|
-
import deprecated from '@wordpress/deprecated';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Internal dependencies
|
|
15
14
|
*/
|
|
16
|
-
import Button from '../../button';
|
|
17
15
|
import { default as DatePicker } from '../date';
|
|
18
16
|
import { default as TimePicker } from '../time';
|
|
19
17
|
import type { DateTimePickerProps } from '../types';
|
|
20
|
-
import { Wrapper
|
|
21
|
-
import { HStack } from '../../h-stack';
|
|
22
|
-
import { Heading } from '../../heading';
|
|
23
|
-
import { Spacer } from '../../spacer';
|
|
18
|
+
import { Wrapper } from './styles';
|
|
24
19
|
|
|
25
20
|
export { DatePicker, TimePicker };
|
|
26
21
|
|
|
@@ -35,157 +30,26 @@ function UnforwardedDateTimePicker(
|
|
|
35
30
|
onChange,
|
|
36
31
|
events,
|
|
37
32
|
startOfWeek,
|
|
38
|
-
__nextRemoveHelpButton = false,
|
|
39
|
-
__nextRemoveResetButton = false,
|
|
40
33
|
}: DateTimePickerProps,
|
|
41
34
|
ref: ForwardedRef< any >
|
|
42
35
|
) {
|
|
43
|
-
if ( ! __nextRemoveHelpButton ) {
|
|
44
|
-
deprecated( 'Help button in wp.components.DateTimePicker', {
|
|
45
|
-
since: '13.4',
|
|
46
|
-
version: '15.8', // One year of plugin releases.
|
|
47
|
-
hint: 'Set the `__nextRemoveHelpButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',
|
|
48
|
-
} );
|
|
49
|
-
}
|
|
50
|
-
if ( ! __nextRemoveResetButton ) {
|
|
51
|
-
deprecated( 'Reset button in wp.components.DateTimePicker', {
|
|
52
|
-
since: '13.4',
|
|
53
|
-
version: '15.8', // One year of plugin releases.
|
|
54
|
-
hint: 'Set the `__nextRemoveResetButton` prop to `true` to remove this warning and opt in to the new behaviour, which will become the default in a future version.',
|
|
55
|
-
} );
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const [ calendarHelpIsVisible, setCalendarHelpIsVisible ] =
|
|
59
|
-
useState( false );
|
|
60
|
-
|
|
61
|
-
function onClickDescriptionToggle() {
|
|
62
|
-
setCalendarHelpIsVisible( ! calendarHelpIsVisible );
|
|
63
|
-
}
|
|
64
|
-
|
|
65
36
|
return (
|
|
66
37
|
<Wrapper ref={ ref } className="components-datetime" spacing={ 4 }>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</>
|
|
83
|
-
) }
|
|
84
|
-
{ calendarHelpIsVisible && (
|
|
85
|
-
<CalendarHelp
|
|
86
|
-
className="components-datetime__calendar-help" // Unused, for backwards compatibility.
|
|
87
|
-
>
|
|
88
|
-
<Heading level={ 4 }>{ __( 'Click to Select' ) }</Heading>
|
|
89
|
-
<ul>
|
|
90
|
-
<li>
|
|
91
|
-
{ __(
|
|
92
|
-
'Click the right or left arrows to select other months in the past or the future.'
|
|
93
|
-
) }
|
|
94
|
-
</li>
|
|
95
|
-
<li>{ __( 'Click the desired day to select it.' ) }</li>
|
|
96
|
-
</ul>
|
|
97
|
-
<Heading level={ 4 }>
|
|
98
|
-
{ __( 'Navigating with a keyboard' ) }
|
|
99
|
-
</Heading>
|
|
100
|
-
<ul>
|
|
101
|
-
<li>
|
|
102
|
-
<abbr
|
|
103
|
-
aria-label={ _x( 'Enter', 'keyboard button' ) }
|
|
104
|
-
>
|
|
105
|
-
↵
|
|
106
|
-
</abbr>
|
|
107
|
-
{
|
|
108
|
-
' ' /* JSX removes whitespace, but a space is required for screen readers. */
|
|
109
|
-
}
|
|
110
|
-
<span>{ __( 'Select the date in focus.' ) }</span>
|
|
111
|
-
</li>
|
|
112
|
-
<li>
|
|
113
|
-
<abbr aria-label={ __( 'Left and Right Arrows' ) }>
|
|
114
|
-
←/→
|
|
115
|
-
</abbr>
|
|
116
|
-
{
|
|
117
|
-
' ' /* JSX removes whitespace, but a space is required for screen readers. */
|
|
118
|
-
}
|
|
119
|
-
{ __(
|
|
120
|
-
'Move backward (left) or forward (right) by one day.'
|
|
121
|
-
) }
|
|
122
|
-
</li>
|
|
123
|
-
<li>
|
|
124
|
-
<abbr aria-label={ __( 'Up and Down Arrows' ) }>
|
|
125
|
-
↑/↓
|
|
126
|
-
</abbr>
|
|
127
|
-
{
|
|
128
|
-
' ' /* JSX removes whitespace, but a space is required for screen readers. */
|
|
129
|
-
}
|
|
130
|
-
{ __(
|
|
131
|
-
'Move backward (up) or forward (down) by one week.'
|
|
132
|
-
) }
|
|
133
|
-
</li>
|
|
134
|
-
<li>
|
|
135
|
-
<abbr aria-label={ __( 'Page Up and Page Down' ) }>
|
|
136
|
-
{ __( 'PgUp/PgDn' ) }
|
|
137
|
-
</abbr>
|
|
138
|
-
{
|
|
139
|
-
' ' /* JSX removes whitespace, but a space is required for screen readers. */
|
|
140
|
-
}
|
|
141
|
-
{ __(
|
|
142
|
-
'Move backward (PgUp) or forward (PgDn) by one month.'
|
|
143
|
-
) }
|
|
144
|
-
</li>
|
|
145
|
-
<li>
|
|
146
|
-
<abbr aria-label={ __( 'Home and End' ) }>
|
|
147
|
-
{ /* Translators: Home/End reffer to the 'Home' and 'End' buttons on the keyboard.*/ }
|
|
148
|
-
{ __( 'Home/End' ) }
|
|
149
|
-
</abbr>
|
|
150
|
-
{
|
|
151
|
-
' ' /* JSX removes whitespace, but a space is required for screen readers. */
|
|
152
|
-
}
|
|
153
|
-
{ __(
|
|
154
|
-
'Go to the first (Home) or last (End) day of a week.'
|
|
155
|
-
) }
|
|
156
|
-
</li>
|
|
157
|
-
</ul>
|
|
158
|
-
</CalendarHelp>
|
|
159
|
-
) }
|
|
160
|
-
{ ( ! __nextRemoveResetButton || ! __nextRemoveHelpButton ) && (
|
|
161
|
-
<HStack
|
|
162
|
-
className="components-datetime__buttons" // Unused, for backwards compatibility.
|
|
163
|
-
>
|
|
164
|
-
{ ! __nextRemoveResetButton &&
|
|
165
|
-
! calendarHelpIsVisible &&
|
|
166
|
-
currentDate && (
|
|
167
|
-
<Button
|
|
168
|
-
className="components-datetime__date-reset-button" // Unused, for backwards compatibility.
|
|
169
|
-
variant="link"
|
|
170
|
-
onClick={ () => onChange?.( null ) }
|
|
171
|
-
>
|
|
172
|
-
{ __( 'Reset' ) }
|
|
173
|
-
</Button>
|
|
174
|
-
) }
|
|
175
|
-
<Spacer />
|
|
176
|
-
{ ! __nextRemoveHelpButton && (
|
|
177
|
-
<Button
|
|
178
|
-
className="components-datetime__date-help-toggle" // Unused, for backwards compatibility.
|
|
179
|
-
variant="link"
|
|
180
|
-
onClick={ onClickDescriptionToggle }
|
|
181
|
-
>
|
|
182
|
-
{ calendarHelpIsVisible
|
|
183
|
-
? __( 'Close' )
|
|
184
|
-
: __( 'Calendar Help' ) }
|
|
185
|
-
</Button>
|
|
186
|
-
) }
|
|
187
|
-
</HStack>
|
|
188
|
-
) }
|
|
38
|
+
<>
|
|
39
|
+
<TimePicker
|
|
40
|
+
currentTime={ currentDate }
|
|
41
|
+
onChange={ onChange }
|
|
42
|
+
is12Hour={ is12Hour }
|
|
43
|
+
/>
|
|
44
|
+
<DatePicker
|
|
45
|
+
currentDate={ currentDate }
|
|
46
|
+
onChange={ onChange }
|
|
47
|
+
isInvalidDate={ isInvalidDate }
|
|
48
|
+
events={ events }
|
|
49
|
+
onMonthPreviewed={ onMonthPreviewed }
|
|
50
|
+
startOfWeek={ startOfWeek }
|
|
51
|
+
/>
|
|
52
|
+
</>
|
|
189
53
|
</Wrapper>
|
|
190
54
|
);
|
|
191
55
|
}
|
|
@@ -207,8 +71,6 @@ function UnforwardedDateTimePicker(
|
|
|
207
71
|
* currentDate={ date }
|
|
208
72
|
* onChange={ ( newDate ) => setDate( newDate ) }
|
|
209
73
|
* is12Hour
|
|
210
|
-
* __nextRemoveHelpButton
|
|
211
|
-
* __nextRemoveResetButton
|
|
212
74
|
* />
|
|
213
75
|
* );
|
|
214
76
|
* };
|