@wordpress/components 29.11.0 → 29.13.1-next.719a03cbe.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.
Files changed (169) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/box-control/input-control.js +2 -2
  3. package/build/box-control/input-control.js.map +1 -1
  4. package/build/calendar/date-calendar/index.js +60 -0
  5. package/build/calendar/date-calendar/index.js.map +1 -0
  6. package/build/calendar/date-range-calendar/index.js +168 -0
  7. package/build/calendar/date-range-calendar/index.js.map +1 -0
  8. package/build/calendar/index.js +27 -0
  9. package/build/calendar/index.js.map +1 -0
  10. package/build/calendar/types.js +6 -0
  11. package/build/calendar/types.js.map +1 -0
  12. package/build/calendar/utils/constants.js +68 -0
  13. package/build/calendar/utils/constants.js.map +1 -0
  14. package/build/calendar/utils/day-cell.js +137 -0
  15. package/build/calendar/utils/day-cell.js.map +1 -0
  16. package/build/calendar/utils/misc.js +10 -0
  17. package/build/calendar/utils/misc.js.map +1 -0
  18. package/build/calendar/utils/use-controlled-value.js +58 -0
  19. package/build/calendar/utils/use-controlled-value.js.map +1 -0
  20. package/build/calendar/utils/use-localization-props.js +162 -0
  21. package/build/calendar/utils/use-localization-props.js.map +1 -0
  22. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  23. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  24. package/build/custom-select-control-v2/custom-select.js +3 -3
  25. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  26. package/build/date-time/date/index.js +1 -1
  27. package/build/date-time/date/index.js.map +1 -1
  28. package/build/form-file-upload/index.js +4 -6
  29. package/build/form-file-upload/index.js.map +1 -1
  30. package/build/form-token-field/index.js +11 -1
  31. package/build/form-token-field/index.js.map +1 -1
  32. package/build/form-token-field/token.js +1 -1
  33. package/build/form-token-field/token.js.map +1 -1
  34. package/build/index.js +19 -0
  35. package/build/index.js.map +1 -1
  36. package/build/mobile/bottom-sheet/cell.native.js +2 -2
  37. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  38. package/build/mobile/image/index.native.js +1 -1
  39. package/build/mobile/image/index.native.js.map +1 -1
  40. package/build/mobile/link-picker/index.native.js +1 -1
  41. package/build/mobile/link-picker/index.native.js.map +1 -1
  42. package/build/navigation/menu/menu-title-search.js +1 -1
  43. package/build/navigation/menu/menu-title-search.js.map +1 -1
  44. package/build/palette-edit/index.js +4 -4
  45. package/build/palette-edit/index.js.map +1 -1
  46. package/build-module/box-control/input-control.js +2 -2
  47. package/build-module/box-control/input-control.js.map +1 -1
  48. package/build-module/calendar/date-calendar/index.js +51 -0
  49. package/build-module/calendar/date-calendar/index.js.map +1 -0
  50. package/build-module/calendar/date-range-calendar/index.js +157 -0
  51. package/build-module/calendar/date-range-calendar/index.js.map +1 -0
  52. package/build-module/calendar/index.js +4 -0
  53. package/build-module/calendar/index.js.map +1 -0
  54. package/build-module/calendar/types.js +2 -0
  55. package/build-module/calendar/types.js.map +1 -0
  56. package/build-module/calendar/utils/constants.js +61 -0
  57. package/build-module/calendar/utils/constants.js.map +1 -0
  58. package/build-module/calendar/utils/day-cell.js +131 -0
  59. package/build-module/calendar/utils/day-cell.js.map +1 -0
  60. package/build-module/calendar/utils/misc.js +4 -0
  61. package/build-module/calendar/utils/misc.js.map +1 -0
  62. package/build-module/calendar/utils/use-controlled-value.js +51 -0
  63. package/build-module/calendar/utils/use-controlled-value.js.map +1 -0
  64. package/build-module/calendar/utils/use-localization-props.js +154 -0
  65. package/build-module/calendar/utils/use-localization-props.js.map +1 -0
  66. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  67. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  68. package/build-module/custom-select-control-v2/custom-select.js +4 -4
  69. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  70. package/build-module/date-time/date/index.js +1 -1
  71. package/build-module/date-time/date/index.js.map +1 -1
  72. package/build-module/form-file-upload/index.js +4 -6
  73. package/build-module/form-file-upload/index.js.map +1 -1
  74. package/build-module/form-token-field/index.js +11 -1
  75. package/build-module/form-token-field/index.js.map +1 -1
  76. package/build-module/form-token-field/token.js +1 -1
  77. package/build-module/form-token-field/token.js.map +1 -1
  78. package/build-module/index.js +1 -0
  79. package/build-module/index.js.map +1 -1
  80. package/build-module/mobile/bottom-sheet/cell.native.js +2 -2
  81. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  82. package/build-module/mobile/image/index.native.js +1 -1
  83. package/build-module/mobile/image/index.native.js.map +1 -1
  84. package/build-module/mobile/link-picker/index.native.js +1 -1
  85. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  86. package/build-module/navigation/menu/menu-title-search.js +1 -1
  87. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  88. package/build-module/palette-edit/index.js +4 -4
  89. package/build-module/palette-edit/index.js.map +1 -1
  90. package/build-style/style-rtl.css +358 -5
  91. package/build-style/style.css +358 -5
  92. package/build-types/box-control/input-control.d.ts.map +1 -1
  93. package/build-types/box-control/utils.d.ts +7 -7
  94. package/build-types/calendar/date-calendar/index.d.ts +11 -0
  95. package/build-types/calendar/date-calendar/index.d.ts.map +1 -0
  96. package/build-types/calendar/date-range-calendar/index.d.ts +14 -0
  97. package/build-types/calendar/date-range-calendar/index.d.ts.map +1 -0
  98. package/build-types/calendar/index.d.ts +4 -0
  99. package/build-types/calendar/index.d.ts.map +1 -0
  100. package/build-types/calendar/stories/date-calendar.story.d.ts +16 -0
  101. package/build-types/calendar/stories/date-calendar.story.d.ts.map +1 -0
  102. package/build-types/calendar/stories/date-range-calendar.story.d.ts +16 -0
  103. package/build-types/calendar/stories/date-range-calendar.story.d.ts.map +1 -0
  104. package/build-types/calendar/test/__utils__/index.d.ts +10 -0
  105. package/build-types/calendar/test/__utils__/index.d.ts.map +1 -0
  106. package/build-types/calendar/test/date-calendar.d.ts +2 -0
  107. package/build-types/calendar/test/date-calendar.d.ts.map +1 -0
  108. package/build-types/calendar/test/date-range-calendar.d.ts +2 -0
  109. package/build-types/calendar/test/date-range-calendar.d.ts.map +1 -0
  110. package/build-types/calendar/types.d.ts +317 -0
  111. package/build-types/calendar/types.d.ts.map +1 -0
  112. package/build-types/calendar/utils/constants.d.ts +52 -0
  113. package/build-types/calendar/utils/constants.d.ts.map +1 -0
  114. package/build-types/calendar/utils/day-cell.d.ts +21 -0
  115. package/build-types/calendar/utils/day-cell.d.ts.map +1 -0
  116. package/build-types/calendar/utils/misc.d.ts +2 -0
  117. package/build-types/calendar/utils/misc.d.ts.map +1 -0
  118. package/build-types/calendar/utils/use-controlled-value.d.ts +27 -0
  119. package/build-types/calendar/utils/use-controlled-value.d.ts.map +1 -0
  120. package/build-types/calendar/utils/use-localization-props.d.ts +64 -0
  121. package/build-types/calendar/utils/use-localization-props.d.ts.map +1 -0
  122. package/build-types/custom-gradient-picker/constants.d.ts +6 -3
  123. package/build-types/custom-gradient-picker/constants.d.ts.map +1 -1
  124. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  125. package/build-types/dimension-control/sizes.d.ts +15 -3
  126. package/build-types/dimension-control/sizes.d.ts.map +1 -1
  127. package/build-types/font-size-picker/constants.d.ts +2 -2
  128. package/build-types/font-size-picker/constants.d.ts.map +1 -1
  129. package/build-types/form-file-upload/index.d.ts.map +1 -1
  130. package/build-types/form-token-field/index.d.ts.map +1 -1
  131. package/build-types/index.d.ts +1 -0
  132. package/build-types/index.d.ts.map +1 -1
  133. package/build-types/popover/overlay-middlewares.d.ts +6 -1
  134. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  135. package/package.json +21 -20
  136. package/src/box-control/input-control.tsx +14 -5
  137. package/src/calendar/date-calendar/README.md +250 -0
  138. package/src/calendar/date-calendar/index.tsx +55 -0
  139. package/src/calendar/date-range-calendar/README.md +287 -0
  140. package/src/calendar/date-range-calendar/index.tsx +203 -0
  141. package/src/calendar/index.tsx +3 -0
  142. package/src/calendar/stories/date-calendar.story.tsx +221 -0
  143. package/src/calendar/stories/date-range-calendar.story.tsx +230 -0
  144. package/src/calendar/style.scss +431 -0
  145. package/src/calendar/test/__utils__/index.ts +56 -0
  146. package/src/calendar/test/date-calendar.tsx +975 -0
  147. package/src/calendar/test/date-range-calendar.tsx +1701 -0
  148. package/src/calendar/types.ts +342 -0
  149. package/src/calendar/utils/constants.ts +62 -0
  150. package/src/calendar/utils/day-cell.tsx +133 -0
  151. package/src/calendar/utils/misc.ts +3 -0
  152. package/src/calendar/utils/use-controlled-value.ts +61 -0
  153. package/src/calendar/utils/use-localization-props.ts +169 -0
  154. package/src/circular-option-picker/stories/index.story.tsx +2 -2
  155. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  156. package/src/custom-select-control-v2/custom-select.tsx +6 -3
  157. package/src/date-time/date/index.tsx +1 -1
  158. package/src/form-file-upload/index.tsx +6 -12
  159. package/src/form-token-field/index.tsx +12 -1
  160. package/src/form-token-field/token.tsx +1 -1
  161. package/src/index.ts +1 -0
  162. package/src/mobile/bottom-sheet/cell.native.js +2 -2
  163. package/src/mobile/image/index.native.js +1 -1
  164. package/src/mobile/link-picker/index.native.js +1 -1
  165. package/src/navigation/menu/menu-title-search.tsx +1 -1
  166. package/src/palette-edit/index.tsx +4 -4
  167. package/src/select-control/style.scss +0 -6
  168. package/src/style.scss +1 -0
  169. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,169 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { __, sprintf } from '@wordpress/i18n';
5
+ import { useMemo } from '@wordpress/element';
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import type { Modifiers, BaseProps } from '../types';
10
+
11
+ function isLocaleRTL( localeCode: string ) {
12
+ const localeObj = new Intl.Locale( localeCode );
13
+ if ( 'getTextInfo' in localeObj ) {
14
+ // @ts-expect-error - getTextInfo is not typed yet
15
+ // see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
16
+ return localeObj.getTextInfo().direction === 'rtl';
17
+ }
18
+ return [
19
+ 'ar', // Arabic
20
+ 'he', // Hebrew
21
+ 'fa', // Persian (Farsi)
22
+ 'ur', // Urdu
23
+ 'ps', // Pashto
24
+ 'syr', // Syriac
25
+ 'dv', // Divehi
26
+ 'ku', // Kurdish (Sorani)
27
+ 'yi', // Yiddish
28
+ ].includes( localeObj.language );
29
+ }
30
+
31
+ /**
32
+ * Returns localization props for the calendar components.
33
+ *
34
+ * Notes:
35
+ * - the following props should be intended as defaults, and should
36
+ * be overridden by consumer props if listed as public props.
37
+ * - It is possible for the translated strings to use a different locale
38
+ * than the formatted dates and the computed `dir`. This is because the
39
+ * translation function doesn't expose the locale used for the translated
40
+ * strings, meaning that the dates are formatted using the `locale` prop.
41
+ * For a correct localized experience, consumers should make sure that
42
+ * translation context and `locale` prop are consistent.
43
+ * @param props
44
+ * @param props.locale
45
+ * @param props.timeZone
46
+ * @param props.mode
47
+ */
48
+ export const useLocalizationProps = ( {
49
+ locale,
50
+ timeZone,
51
+ mode,
52
+ }: {
53
+ locale: NonNullable< BaseProps[ 'locale' ] >;
54
+ timeZone: BaseProps[ 'timeZone' ];
55
+ mode: 'single' | 'range';
56
+ } ) => {
57
+ return useMemo( () => {
58
+ // ie. April 2025
59
+ const monthNameFormatter = new Intl.DateTimeFormat( locale.code, {
60
+ year: 'numeric',
61
+ month: 'long',
62
+ timeZone,
63
+ } );
64
+ // ie. M, T, W, T, F, S, S
65
+ const weekdayNarrowFormatter = new Intl.DateTimeFormat( locale.code, {
66
+ weekday: 'narrow',
67
+ timeZone,
68
+ } );
69
+ // ie. Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
70
+ const weekdayLongFormatter = new Intl.DateTimeFormat( locale.code, {
71
+ weekday: 'long',
72
+ timeZone,
73
+ } );
74
+ // ie. Monday, April 29, 2025
75
+ const fullDateFormatter = new Intl.DateTimeFormat( locale.code, {
76
+ weekday: 'long',
77
+ year: 'numeric',
78
+ month: 'long',
79
+ day: 'numeric',
80
+ timeZone,
81
+ } );
82
+
83
+ // Note: the following props should be intended as defaults, and should
84
+ // be overridden by consumer props if listed as public props.
85
+ return {
86
+ 'aria-label':
87
+ mode === 'single'
88
+ ? __( 'Date calendar' )
89
+ : __( 'Date range calendar' ),
90
+ labels: {
91
+ /**
92
+ * The label for the month grid.
93
+ * @param date
94
+ */
95
+ labelGrid: ( date: Date ) => monthNameFormatter.format( date ),
96
+ /**
97
+ * The label for the gridcell, when the calendar is not interactive.
98
+ * @param date
99
+ * @param modifiers
100
+ */
101
+ labelGridcell: (
102
+ date: Date,
103
+ /** The modifiers for the day. */
104
+ modifiers?: Modifiers
105
+ ) => {
106
+ const formattedDate = fullDateFormatter.format( date );
107
+ let label = formattedDate;
108
+ if ( modifiers?.today ) {
109
+ label = sprintf(
110
+ // translators: %s is the full date (e.g. "Monday, April 29, 2025")
111
+ __( 'Today, %s' ),
112
+ formattedDate
113
+ );
114
+ }
115
+ return label;
116
+ },
117
+ /** The label for the "next month" button. */
118
+ labelNext: () => __( 'Go to the Next Month' ),
119
+ /** The label for the "previous month" button. */
120
+ labelPrevious: () => __( 'Go to the Previous Month' ),
121
+ /**
122
+ * The label for the day button.
123
+ * @param date
124
+ * @param modifiers
125
+ */
126
+ labelDayButton: (
127
+ date: Date,
128
+ /** The modifiers for the day. */
129
+ modifiers?: Modifiers
130
+ ) => {
131
+ const formattedDate = fullDateFormatter.format( date );
132
+ let label = formattedDate;
133
+ if ( modifiers?.today ) {
134
+ label = sprintf(
135
+ // translators: %s is the full date (e.g. "Monday, April 29, 2025")
136
+ __( 'Today, %s' ),
137
+ formattedDate
138
+ );
139
+ }
140
+ if ( modifiers?.selected ) {
141
+ label = sprintf(
142
+ // translators: %s is the full date (e.g. "Monday, April 29, 2025")
143
+ __( '%s, selected' ),
144
+ formattedDate
145
+ );
146
+ }
147
+ return label;
148
+ },
149
+ /**
150
+ * The label for the weekday.
151
+ * @param date
152
+ */
153
+ labelWeekday: ( date: Date ) =>
154
+ weekdayLongFormatter.format( date ),
155
+ },
156
+ locale,
157
+ dir: isLocaleRTL( locale.code ) ? 'rtl' : 'ltr',
158
+ formatters: {
159
+ formatWeekdayName: ( date: Date ) => {
160
+ return weekdayNarrowFormatter.format( date );
161
+ },
162
+ formatCaption: ( date: Date ) => {
163
+ return monthNameFormatter.format( date );
164
+ },
165
+ },
166
+ timeZone,
167
+ } as const;
168
+ }, [ locale, timeZone, mode ] );
169
+ };
@@ -5,7 +5,7 @@ import type { Meta, StoryFn } from '@storybook/react';
5
5
  /**
6
6
  * WordPress dependencies
7
7
  */
8
- import { useState, createContext, useContext } from '@wordpress/element';
8
+ import { createContext, useContext, useState } from '@wordpress/element';
9
9
  /**
10
10
  * Internal dependencies
11
11
  */
@@ -152,7 +152,7 @@ WithDropdownLinkAction.args = {
152
152
  actions: (
153
153
  <CircularOptionPicker.DropdownLinkAction
154
154
  dropdownProps={ {
155
- popoverProps: { position: 'top right' },
155
+ popoverProps: { placement: 'top-end' },
156
156
  renderContent: () => (
157
157
  <div>This is an example of a DropdownLinkAction.</div>
158
158
  ),
@@ -58,7 +58,7 @@ function ControlPointButton( {
58
58
  aria-label={ sprintf(
59
59
  // translators: 1: gradient position e.g: 70. 2: gradient color code e.g: rgb(52,121,151).
60
60
  __(
61
- 'Gradient control point at position %1$s%% with color code %2$s.'
61
+ 'Gradient control point at position %1$d%% with color code %2$s.'
62
62
  ),
63
63
  position,
64
64
  color
@@ -7,7 +7,7 @@ import * as Ariakit from '@ariakit/react';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { createContext, useCallback, useMemo } from '@wordpress/element';
10
- import { __, sprintf } from '@wordpress/i18n';
10
+ import { __, _n, sprintf } from '@wordpress/i18n';
11
11
 
12
12
  /**
13
13
  * Internal dependencies
@@ -43,8 +43,11 @@ function defaultRenderSelectedValue(
43
43
  if ( Array.isArray( value ) ) {
44
44
  return value.length === 1
45
45
  ? value[ 0 ]
46
- : // translators: %s: number of items selected (it will always be 2 or more items)
47
- sprintf( __( '%s items selected' ), value.length );
46
+ : sprintf(
47
+ // translators: %d: number of items selected (it will always be 2 or more items)
48
+ _n( '%d item selected', '%d items selected', value.length ),
49
+ value.length
50
+ );
48
51
  }
49
52
 
50
53
  return value;
@@ -344,7 +344,7 @@ function getDayLabel( date: Date, isSelected: boolean, numEvents: number ) {
344
344
  );
345
345
  } else if ( isSelected ) {
346
346
  return sprintf(
347
- // translators: %s: The calendar date.
347
+ // translators: 1: The calendar date.
348
348
  __( '%1$s. Selected' ),
349
349
  localizedDate
350
350
  );
@@ -58,18 +58,12 @@ export function FormFileUpload( {
58
58
  { children }
59
59
  </Button>
60
60
  );
61
- // @todo: Temporary fix a bug that prevents Chromium browsers from selecting ".heic" files
62
- // from the file upload. See https://core.trac.wordpress.org/ticket/62268#comment:4.
63
- // This can be removed once the Chromium fix is in the stable channel.
64
- // Prevent Safari from adding "image/heic" and "image/heif" to the accept attribute.
65
- const isSafari =
66
- globalThis.window?.navigator.userAgent.includes( 'Safari' ) &&
67
- ! globalThis.window?.navigator.userAgent.includes( 'Chrome' ) &&
68
- ! globalThis.window?.navigator.userAgent.includes( 'Chromium' );
69
- const compatAccept =
70
- ! isSafari && !! accept?.includes( 'image/*' )
71
- ? `${ accept }, image/heic, image/heif`
72
- : accept;
61
+
62
+ // iOS browsers may not reliably handle 'audio/*' in the accept attribute.
63
+ // Adding explicit audio MIME types improves compatibility across all devices.
64
+ const compatAccept = accept?.includes( 'audio/*' )
65
+ ? `${ accept }, audio/mp3, audio/x-m4a, audio/x-m4b, audio/x-m4p, audio/x-wav, audio/webm`
66
+ : accept;
73
67
 
74
68
  return (
75
69
  <div className="components-form-file-upload">
@@ -241,6 +241,9 @@ export function FormTokenField( props: FormTokenFieldProps ) {
241
241
  case 'Escape':
242
242
  preventDefault = handleEscapeKey( event );
243
243
  break;
244
+ case 'Tab':
245
+ preventDefault = handleTabKey( event );
246
+ break;
244
247
  default:
245
248
  break;
246
249
  }
@@ -372,17 +375,25 @@ export function FormTokenField( props: FormTokenFieldProps ) {
372
375
  return true; // PreventDefault.
373
376
  }
374
377
 
375
- function handleEscapeKey( event: KeyboardEvent ) {
378
+ function collapseSuggestionsList( event: KeyboardEvent ) {
376
379
  if ( event.target instanceof HTMLInputElement ) {
377
380
  setIncompleteTokenValue( event.target.value );
378
381
  setIsExpanded( false );
379
382
  setSelectedSuggestionIndex( -1 );
380
383
  setSelectedSuggestionScroll( false );
381
384
  }
385
+ }
382
386
 
387
+ function handleEscapeKey( event: KeyboardEvent ) {
388
+ collapseSuggestionsList( event );
383
389
  return true; // PreventDefault.
384
390
  }
385
391
 
392
+ function handleTabKey( event: KeyboardEvent ) {
393
+ collapseSuggestionsList( event );
394
+ return false; // Do not prevent the default behavior.
395
+ }
396
+
386
397
  function handleCommaKey() {
387
398
  if ( inputHasValidValue() ) {
388
399
  addNewToken( incompleteTokenValue );
@@ -47,7 +47,7 @@ export default function Token( {
47
47
  const transformedValue = displayTransform( value );
48
48
  const termPositionAndCount = sprintf(
49
49
  /* translators: 1: term name, 2: term position in a set of terms, 3: total term set count. */
50
- __( '%1$s (%2$s of %3$s)' ),
50
+ __( '%1$s (%2$d of %3$d)' ),
51
51
  transformedValue,
52
52
  termPosition,
53
53
  termsCount
package/src/index.ts CHANGED
@@ -57,6 +57,7 @@ export {
57
57
  CardHeader,
58
58
  CardMedia,
59
59
  } from './card';
60
+ export { DateCalendar, DateRangeCalendar, TZDate } from './calendar';
60
61
  export { default as CheckboxControl } from './checkbox-control';
61
62
  export { default as ClipboardButton } from './clipboard-button';
62
63
  export { default as __experimentalPaletteEdit } from './palette-edit';
@@ -304,13 +304,13 @@ class BottomSheetCell extends Component {
304
304
  }
305
305
  return ! help
306
306
  ? sprintf(
307
- /* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */
307
+ /* translators: accessibility text. Inline textinput title and value. %1: Cell title, %2: cell value. */
308
308
  _x( '%1$s, %2$s', 'inline textinput cell' ),
309
309
  label,
310
310
  value
311
311
  ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)
312
312
  : sprintf(
313
- /* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */
313
+ /* translators: accessibility text. Inline textinput title, value and help text. %1: Cell title, %2: cell value, , %3: cell help. */
314
314
  _x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),
315
315
  label,
316
316
  value,
@@ -282,7 +282,7 @@ const ImageComponent = ( {
282
282
  accessible
283
283
  disabled={ ! isSelected }
284
284
  accessibilityLabel={ alt }
285
- accessibilityHint={ __( 'Double tap and hold to edit' ) }
285
+ accessibilityHint={ __( 'Double tap to view larger.' ) }
286
286
  accessibilityRole="imagebutton"
287
287
  key={ url }
288
288
  style={ imageContainerStyles }
@@ -135,7 +135,7 @@ export const LinkPicker = ( {
135
135
  <BottomSheet.LinkSuggestionItemCell
136
136
  accessible
137
137
  accessibilityLabel={ sprintf(
138
- /* translators: Copy URL from the clipboard, https://sample.url */
138
+ /* translators: %s: Copy URL from the clipboard, https://sample.url */
139
139
  __( 'Copy URL from the clipboard, %s' ),
140
140
  clipboardUrl
141
141
  ) }
@@ -77,7 +77,7 @@ function MenuTitleSearch( {
77
77
  const placeholder = sprintf(
78
78
  /* translators: placeholder for menu search box. %s: menu title */
79
79
  __( 'Search %s' ),
80
- title?.toLowerCase()
80
+ title?.toLowerCase() || ''
81
81
  ).trim();
82
82
 
83
83
  return (
@@ -122,8 +122,8 @@ export function getNameAndSlugForPosition(
122
122
 
123
123
  return {
124
124
  name: sprintf(
125
- /* translators: %s: is an id for a custom color */
126
- __( 'Color %s' ),
125
+ /* translators: %d: is an id for a custom color */
126
+ __( 'Color %d' ),
127
127
  position
128
128
  ),
129
129
  slug: `${ slugPrefix }color-${ position }`,
@@ -223,7 +223,7 @@ function Option< T extends PaletteElement >( {
223
223
  aria-label={ sprintf(
224
224
  // translators: %s is a color or gradient name, e.g. "Red".
225
225
  __( 'Edit: %s' ),
226
- element.name.trim().length ? element.name : value
226
+ element.name.trim().length ? element.name : value || ''
227
227
  ) }
228
228
  style={ { padding: 0 } }
229
229
  >
@@ -267,7 +267,7 @@ function Option< T extends PaletteElement >( {
267
267
  __( 'Remove color: %s' ),
268
268
  element.name.trim().length
269
269
  ? element.name
270
- : value
270
+ : value || ''
271
271
  ) }
272
272
  onClick={ onRemove }
273
273
  />
@@ -2,9 +2,3 @@
2
2
  outline: 0;
3
3
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
4
4
  }
5
-
6
- @media (max-width: #{ ($break-medium) }) {
7
- .components-base-control .components-base-control__field .components-select-control__input {
8
- font-size: 16px;
9
- }
10
- }
package/src/style.scss CHANGED
@@ -13,6 +13,7 @@
13
13
  @import "./badge/styles.scss";
14
14
  @import "./button-group/style.scss";
15
15
  @import "./button/style.scss";
16
+ @import "./calendar/style.scss";
16
17
  @import "./checkbox-control/style.scss";
17
18
  @import "./circular-option-picker/style.scss";
18
19
  @import "./palette-edit/style.scss";