@wordpress/components 28.8.8 → 28.8.10
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/build/border-control/border-control-dropdown/component.js +12 -12
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/color-palette/index.js +1 -1
- package/build/color-palette/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/font-size-picker/index.native.js +6 -6
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/form-file-upload/index.js +5 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +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 +2 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +12 -12
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/color-palette/index.js +1 -1
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/font-size-picker/index.native.js +7 -7
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/form-file-upload/index.js +5 -1
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +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 +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 +2 -2
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/border-control/border-control-dropdown/component.tsx +24 -12
- package/src/color-palette/index.tsx +1 -1
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
- package/src/font-size-picker/index.native.js +7 -7
- package/src/form-file-upload/index.tsx +7 -1
- package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
- package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control-dropdown/component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/border-control/border-control-dropdown/component.tsx"],"names":[],"mappings":"AAgRA,QAAA,MAAM,8BAA8B;;;;;;wBArJO,CAAC;;;6CAwJ3C,CAAC;AAEF,eAAe,8BAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form-file-upload/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAE,EAC/B,MAAM,EACN,QAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,CAAE,+
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form-file-upload/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAE,EAC/B,MAAM,EACN,QAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACR,EAAE,uBAAuB,CAAE,mBAAmB,EAAE,QAAQ,EAAE,KAAK,CAAE,+BAmCjE;AAED,eAAe,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/components",
|
|
3
|
-
"version": "28.8.
|
|
3
|
+
"version": "28.8.10",
|
|
4
4
|
"description": "UI components for WordPress.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"access": "public"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "c4e8df94ae35ecd06b2a0c86792432b484a3bbac"
|
|
88
88
|
}
|
|
@@ -76,15 +76,19 @@ const getToggleAriaLabel = (
|
|
|
76
76
|
const ariaLabelValue = getAriaLabelColorValue( colorObject.color );
|
|
77
77
|
return style
|
|
78
78
|
? sprintf(
|
|
79
|
-
// translators:
|
|
80
|
-
|
|
79
|
+
// translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:". 3: The current border style selection e.g. "solid".
|
|
80
|
+
__(
|
|
81
|
+
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s". The currently selected style is "%3$s".'
|
|
82
|
+
),
|
|
81
83
|
colorObject.name,
|
|
82
84
|
ariaLabelValue,
|
|
83
85
|
style
|
|
84
86
|
)
|
|
85
87
|
: sprintf(
|
|
86
|
-
// translators:
|
|
87
|
-
|
|
88
|
+
// translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g.: "#f00:".
|
|
89
|
+
__(
|
|
90
|
+
'Border color and style picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
|
|
91
|
+
),
|
|
88
92
|
colorObject.name,
|
|
89
93
|
ariaLabelValue
|
|
90
94
|
);
|
|
@@ -94,14 +98,18 @@ const getToggleAriaLabel = (
|
|
|
94
98
|
const ariaLabelValue = getAriaLabelColorValue( colorValue );
|
|
95
99
|
return style
|
|
96
100
|
? sprintf(
|
|
97
|
-
// translators:
|
|
98
|
-
|
|
101
|
+
// translators: 1: The color's hex code e.g.: "#f00:". 2: The current border style selection e.g. "solid".
|
|
102
|
+
__(
|
|
103
|
+
'Border color and style picker. The currently selected color has a value of "%1$s". The currently selected style is "%2$s".'
|
|
104
|
+
),
|
|
99
105
|
ariaLabelValue,
|
|
100
106
|
style
|
|
101
107
|
)
|
|
102
108
|
: sprintf(
|
|
103
|
-
// translators: %
|
|
104
|
-
|
|
109
|
+
// translators: %s: The color's hex code e.g: "#f00".
|
|
110
|
+
__(
|
|
111
|
+
'Border color and style picker. The currently selected color has a value of "%s".'
|
|
112
|
+
),
|
|
105
113
|
ariaLabelValue
|
|
106
114
|
);
|
|
107
115
|
}
|
|
@@ -111,8 +119,10 @@ const getToggleAriaLabel = (
|
|
|
111
119
|
|
|
112
120
|
if ( colorObject ) {
|
|
113
121
|
return sprintf(
|
|
114
|
-
// translators:
|
|
115
|
-
|
|
122
|
+
// translators: 1: The name of the color e.g. "vivid red". 2: The color's hex code e.g: "#f00".
|
|
123
|
+
__(
|
|
124
|
+
'Border color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
|
|
125
|
+
),
|
|
116
126
|
colorObject.name,
|
|
117
127
|
getAriaLabelColorValue( colorObject.color )
|
|
118
128
|
);
|
|
@@ -120,8 +130,10 @@ const getToggleAriaLabel = (
|
|
|
120
130
|
|
|
121
131
|
if ( colorValue ) {
|
|
122
132
|
return sprintf(
|
|
123
|
-
// translators: %
|
|
124
|
-
|
|
133
|
+
// translators: %s: The color's hex code e.g: "#f00".
|
|
134
|
+
__(
|
|
135
|
+
'Border color picker. The currently selected color has a value of "%s".'
|
|
136
|
+
),
|
|
125
137
|
getAriaLabelColorValue( colorValue )
|
|
126
138
|
);
|
|
127
139
|
}
|
|
@@ -233,7 +233,7 @@ function UnforwardedColorPalette(
|
|
|
233
233
|
const displayValue = value?.replace( /^var\((.+)\)$/, '$1' );
|
|
234
234
|
const customColorAccessibleLabel = !! displayValue
|
|
235
235
|
? sprintf(
|
|
236
|
-
// translators:
|
|
236
|
+
// translators: 1: The name of the color e.g: "vivid red". 2: The color's hex code e.g: "#f00".
|
|
237
237
|
__(
|
|
238
238
|
'Custom color picker. The currently selected color is called "%1$s" and has a value of "%2$s".'
|
|
239
239
|
),
|
|
@@ -56,7 +56,7 @@ function ControlPointButton( {
|
|
|
56
56
|
<>
|
|
57
57
|
<Button
|
|
58
58
|
aria-label={ sprintf(
|
|
59
|
-
// translators:
|
|
59
|
+
// translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).
|
|
60
60
|
__(
|
|
61
61
|
'Gradient control point at position %1$s%% with color code %2$s.'
|
|
62
62
|
),
|
|
@@ -9,7 +9,7 @@ import { View, useWindowDimensions } from 'react-native';
|
|
|
9
9
|
import { useNavigation } from '@react-navigation/native';
|
|
10
10
|
import { useState } from '@wordpress/element';
|
|
11
11
|
import { Icon, chevronRight, check } from '@wordpress/icons';
|
|
12
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
12
|
+
import { __, _x, sprintf } from '@wordpress/i18n';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Internal dependencies
|
|
@@ -63,8 +63,8 @@ function FontSizePicker( {
|
|
|
63
63
|
} );
|
|
64
64
|
|
|
65
65
|
const accessibilityLabel = sprintf(
|
|
66
|
-
// translators: %
|
|
67
|
-
__( 'Font Size, %
|
|
66
|
+
// translators: %s: Font size name e.g. Small
|
|
67
|
+
__( 'Font Size, %s' ),
|
|
68
68
|
selectedOption.name
|
|
69
69
|
);
|
|
70
70
|
|
|
@@ -77,8 +77,8 @@ function FontSizePicker( {
|
|
|
77
77
|
value={
|
|
78
78
|
selectedValue
|
|
79
79
|
? sprintf(
|
|
80
|
-
// translators:
|
|
81
|
-
|
|
80
|
+
// translators: 1: Select control font size name e.g. Small. 2: Select control font size e.g. 12px
|
|
81
|
+
_x( '%1$s (%2$s)', 'font size' ),
|
|
82
82
|
selectedOption.name,
|
|
83
83
|
selectedPxValue
|
|
84
84
|
)
|
|
@@ -88,7 +88,7 @@ function FontSizePicker( {
|
|
|
88
88
|
accessibilityRole="button"
|
|
89
89
|
accessibilityLabel={ accessibilityLabel }
|
|
90
90
|
accessibilityHint={ sprintf(
|
|
91
|
-
// translators: %s: Select control button label e.g.
|
|
91
|
+
// translators: %s: Select control button label e.g. "Button width"
|
|
92
92
|
__( 'Navigates to select %s' ),
|
|
93
93
|
selectedOption.name
|
|
94
94
|
) }
|
|
@@ -143,7 +143,7 @@ function FontSizePicker( {
|
|
|
143
143
|
accessibilityLabel={
|
|
144
144
|
item.sizePx === selectedValue
|
|
145
145
|
? sprintf(
|
|
146
|
-
// translators: %s:
|
|
146
|
+
// translators: %s: The selected option.
|
|
147
147
|
__( 'Selected: %s' ),
|
|
148
148
|
item.name
|
|
149
149
|
)
|
|
@@ -47,6 +47,12 @@ export function FormFileUpload( {
|
|
|
47
47
|
{ children }
|
|
48
48
|
</Button>
|
|
49
49
|
);
|
|
50
|
+
// @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
|
|
51
|
+
// from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
|
|
52
|
+
// This can be removed once the Chromium fix is in the stable channel.
|
|
53
|
+
const compatAccept = !! accept?.includes( 'image/*' )
|
|
54
|
+
? `${ accept }, image/heic, image/heif`
|
|
55
|
+
: accept;
|
|
50
56
|
|
|
51
57
|
return (
|
|
52
58
|
<div className="components-form-file-upload">
|
|
@@ -56,7 +62,7 @@ export function FormFileUpload( {
|
|
|
56
62
|
ref={ ref }
|
|
57
63
|
multiple={ multiple }
|
|
58
64
|
style={ { display: 'none' } }
|
|
59
|
-
accept={
|
|
65
|
+
accept={ compatAccept }
|
|
60
66
|
onChange={ onChange }
|
|
61
67
|
onClick={ onClick }
|
|
62
68
|
data-testid="form-file-upload-input"
|
|
@@ -165,7 +165,7 @@ class BottomSheetRangeCell extends Component {
|
|
|
165
165
|
|
|
166
166
|
const getAccessibilityLabel = () => {
|
|
167
167
|
return sprintf(
|
|
168
|
-
/* translators: accessibility text. Inform about current value.
|
|
168
|
+
/* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
|
|
169
169
|
__( '%1$s. %2$s is %3$s %4$s.' ),
|
|
170
170
|
cellProps.label,
|
|
171
171
|
settingLabel,
|
|
@@ -159,7 +159,7 @@ class BottomSheetStepperCell extends Component {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
const accessibilityLabel = sprintf(
|
|
162
|
-
/* translators: accessibility text. Inform about current value.
|
|
162
|
+
/* translators: accessibility text. Inform about current value. 1: Control label. 2: setting label (example: width). 3: Current value. 4: value measurement unit (example: pixels) */
|
|
163
163
|
__( '%1$s. %2$s is %3$s %4$s.' ),
|
|
164
164
|
label,
|
|
165
165
|
settingLabel,
|
|
@@ -64,7 +64,7 @@ const BottomSheetSelectControl = ( {
|
|
|
64
64
|
onPress={ openSubSheet }
|
|
65
65
|
accessibilityRole="button"
|
|
66
66
|
accessibilityLabel={ sprintf(
|
|
67
|
-
// translators:
|
|
67
|
+
// translators: 1: Select control button label e.g. "Button width". 2: Select control option value e.g: "Auto, 25%".
|
|
68
68
|
__( '%1$s. Currently selected: %2$s' ),
|
|
69
69
|
label,
|
|
70
70
|
selectedOption.label
|
|
@@ -102,7 +102,7 @@ const BottomSheetSelectControl = ( {
|
|
|
102
102
|
accessibilityLabel={
|
|
103
103
|
item.value === selectedValue
|
|
104
104
|
? sprintf(
|
|
105
|
-
// translators: %s:
|
|
105
|
+
// translators: %s: The selected option.
|
|
106
106
|
__( 'Selected: %s' ),
|
|
107
107
|
item.label
|
|
108
108
|
)
|