@wordpress/dataviews 4.19.0 → 4.21.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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 4.21.0 (2025-06-04)
6
+
7
+ ## 4.20.0 (2025-05-22)
8
+
5
9
  ## 4.19.0 (2025-05-07)
6
10
 
7
11
  ## 4.18.0 (2025-04-11)
@@ -1,15 +1,12 @@
1
- /**
2
- * Converts a hex value into the rgb equivalent.
3
- *
4
- * @param {string} hex - the hexadecimal value to convert
5
- * @return {string} comma separated rgb values
6
- */
7
1
  /**
8
2
  * Colors
9
3
  */
10
4
  /**
11
5
  * Breakpoints & Media Queries
12
6
  */
7
+ /**
8
+ * Colors
9
+ */
13
10
  /**
14
11
  * SCSS Variables.
15
12
  *
@@ -17,15 +14,136 @@
17
14
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
18
15
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
19
16
  */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Typography
22
+ */
23
+ /**
24
+ * Grid System.
25
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
+ */
27
+ /**
28
+ * Radius scale.
29
+ */
30
+ /**
31
+ * Elevation scale.
32
+ */
33
+ /**
34
+ * Dimensions.
35
+ */
36
+ /**
37
+ * Mobile specific styles
38
+ */
39
+ /**
40
+ * Editor styles.
41
+ */
42
+ /**
43
+ * Block & Editor UI.
44
+ */
45
+ /**
46
+ * Block paddings.
47
+ */
48
+ /**
49
+ * React Native specific.
50
+ * These variables do not appear to be used anywhere else.
51
+ */
52
+ /**
53
+ * Colors
54
+ */
55
+ /**
56
+ * SCSS Variables.
57
+ *
58
+ * Please use variables from this sheet to ensure consistency across the UI.
59
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
+ */
62
+ /**
63
+ * Fonts & basic variables.
64
+ */
65
+ /**
66
+ * Typography
67
+ */
68
+ /**
69
+ * Grid System.
70
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
71
+ */
72
+ /**
73
+ * Radius scale.
74
+ */
75
+ /**
76
+ * Elevation scale.
77
+ */
78
+ /**
79
+ * Dimensions.
80
+ */
81
+ /**
82
+ * Mobile specific styles
83
+ */
84
+ /**
85
+ * Editor styles.
86
+ */
87
+ /**
88
+ * Block & Editor UI.
89
+ */
90
+ /**
91
+ * Block paddings.
92
+ */
93
+ /**
94
+ * React Native specific.
95
+ * These variables do not appear to be used anywhere else.
96
+ */
97
+ /**
98
+ * Breakpoints & Media Queries
99
+ */
20
100
  /**
21
101
  * Converts a hex value into the rgb equivalent.
22
102
  *
23
103
  * @param {string} hex - the hexadecimal value to convert
24
104
  * @return {string} comma separated rgb values
25
105
  */
106
+ /**
107
+ * Long content fade mixin
108
+ *
109
+ * Creates a fading overlay to signify that the content is longer
110
+ * than the space allows.
111
+ */
112
+ /**
113
+ * Typography
114
+ */
115
+ /**
116
+ * Breakpoint mixins
117
+ */
118
+ /**
119
+ * Focus styles.
120
+ */
121
+ /**
122
+ * Applies editor left position to the selector passed as argument
123
+ */
124
+ /**
125
+ * Styles that are reused verbatim in a few places
126
+ */
127
+ /**
128
+ * Allows users to opt-out of animations via OS-level preferences.
129
+ */
130
+ /**
131
+ * Reset default styles for JavaScript UI based pages.
132
+ * This is a WP-admin agnostic reset
133
+ */
134
+ /**
135
+ * Reset the WP Admin page styles for Gutenberg-like pages.
136
+ */
26
137
  /**
27
138
  * Colors
28
139
  */
140
+ /**
141
+ * SCSS Variables.
142
+ *
143
+ * Please use variables from this sheet to ensure consistency across the UI.
144
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
+ */
29
147
  /**
30
148
  * Fonts & basic variables.
31
149
  */
@@ -61,6 +179,9 @@
61
179
  * React Native specific.
62
180
  * These variables do not appear to be used anywhere else.
63
181
  */
182
+ /**
183
+ * Breakpoints & Media Queries
184
+ */
64
185
  /**
65
186
  * Converts a hex value into the rgb equivalent.
66
187
  *
@@ -99,6 +220,9 @@
99
220
  * Reset the WP Admin page styles for Gutenberg-like pages.
100
221
  */
101
222
  :root {
223
+ --wp-block-synced-color: #7a00df;
224
+ --wp-block-synced-color--rgb: 122, 0, 223;
225
+ --wp-bound-block-color: var(--wp-block-synced-color);
102
226
  --wp-admin-theme-color: #007cba;
103
227
  --wp-admin-theme-color--rgb: 0, 124, 186;
104
228
  --wp-admin-theme-color-darker-10: #006ba1;
@@ -106,9 +230,6 @@
106
230
  --wp-admin-theme-color-darker-20: #005a87;
107
231
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
108
232
  --wp-admin-border-width-focus: 2px;
109
- --wp-block-synced-color: #7a00df;
110
- --wp-block-synced-color--rgb: 122, 0, 223;
111
- --wp-bound-block-color: var(--wp-block-synced-color);
112
233
  }
113
234
  @media (min-resolution: 192dpi) {
114
235
  :root {
@@ -408,13 +529,13 @@
408
529
  .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input {
409
530
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
410
531
  padding: 6px 8px;
411
- box-shadow: 0 0 0 transparent;
412
- border-radius: 2px;
413
- border: 1px solid #949494;
414
532
  /* Fonts smaller than 16px causes mobile safari to zoom. */
415
533
  font-size: 16px;
416
534
  /* Override core line-height. To be reviewed. */
417
535
  line-height: normal;
536
+ box-shadow: 0 0 0 transparent;
537
+ border-radius: 2px;
538
+ border: 1px solid #949494;
418
539
  display: block;
419
540
  padding: 0 8px 0 32px;
420
541
  background: #f0f0f0;
@@ -1,15 +1,12 @@
1
- /**
2
- * Converts a hex value into the rgb equivalent.
3
- *
4
- * @param {string} hex - the hexadecimal value to convert
5
- * @return {string} comma separated rgb values
6
- */
7
1
  /**
8
2
  * Colors
9
3
  */
10
4
  /**
11
5
  * Breakpoints & Media Queries
12
6
  */
7
+ /**
8
+ * Colors
9
+ */
13
10
  /**
14
11
  * SCSS Variables.
15
12
  *
@@ -17,15 +14,136 @@
17
14
  * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
18
15
  * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
19
16
  */
17
+ /**
18
+ * Fonts & basic variables.
19
+ */
20
+ /**
21
+ * Typography
22
+ */
23
+ /**
24
+ * Grid System.
25
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
26
+ */
27
+ /**
28
+ * Radius scale.
29
+ */
30
+ /**
31
+ * Elevation scale.
32
+ */
33
+ /**
34
+ * Dimensions.
35
+ */
36
+ /**
37
+ * Mobile specific styles
38
+ */
39
+ /**
40
+ * Editor styles.
41
+ */
42
+ /**
43
+ * Block & Editor UI.
44
+ */
45
+ /**
46
+ * Block paddings.
47
+ */
48
+ /**
49
+ * React Native specific.
50
+ * These variables do not appear to be used anywhere else.
51
+ */
52
+ /**
53
+ * Colors
54
+ */
55
+ /**
56
+ * SCSS Variables.
57
+ *
58
+ * Please use variables from this sheet to ensure consistency across the UI.
59
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
60
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
61
+ */
62
+ /**
63
+ * Fonts & basic variables.
64
+ */
65
+ /**
66
+ * Typography
67
+ */
68
+ /**
69
+ * Grid System.
70
+ * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
71
+ */
72
+ /**
73
+ * Radius scale.
74
+ */
75
+ /**
76
+ * Elevation scale.
77
+ */
78
+ /**
79
+ * Dimensions.
80
+ */
81
+ /**
82
+ * Mobile specific styles
83
+ */
84
+ /**
85
+ * Editor styles.
86
+ */
87
+ /**
88
+ * Block & Editor UI.
89
+ */
90
+ /**
91
+ * Block paddings.
92
+ */
93
+ /**
94
+ * React Native specific.
95
+ * These variables do not appear to be used anywhere else.
96
+ */
97
+ /**
98
+ * Breakpoints & Media Queries
99
+ */
20
100
  /**
21
101
  * Converts a hex value into the rgb equivalent.
22
102
  *
23
103
  * @param {string} hex - the hexadecimal value to convert
24
104
  * @return {string} comma separated rgb values
25
105
  */
106
+ /**
107
+ * Long content fade mixin
108
+ *
109
+ * Creates a fading overlay to signify that the content is longer
110
+ * than the space allows.
111
+ */
112
+ /**
113
+ * Typography
114
+ */
115
+ /**
116
+ * Breakpoint mixins
117
+ */
118
+ /**
119
+ * Focus styles.
120
+ */
121
+ /**
122
+ * Applies editor left position to the selector passed as argument
123
+ */
124
+ /**
125
+ * Styles that are reused verbatim in a few places
126
+ */
127
+ /**
128
+ * Allows users to opt-out of animations via OS-level preferences.
129
+ */
130
+ /**
131
+ * Reset default styles for JavaScript UI based pages.
132
+ * This is a WP-admin agnostic reset
133
+ */
134
+ /**
135
+ * Reset the WP Admin page styles for Gutenberg-like pages.
136
+ */
26
137
  /**
27
138
  * Colors
28
139
  */
140
+ /**
141
+ * SCSS Variables.
142
+ *
143
+ * Please use variables from this sheet to ensure consistency across the UI.
144
+ * Don't add to this sheet unless you're pretty sure the value will be reused in many places.
145
+ * For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
146
+ */
29
147
  /**
30
148
  * Fonts & basic variables.
31
149
  */
@@ -61,6 +179,9 @@
61
179
  * React Native specific.
62
180
  * These variables do not appear to be used anywhere else.
63
181
  */
182
+ /**
183
+ * Breakpoints & Media Queries
184
+ */
64
185
  /**
65
186
  * Converts a hex value into the rgb equivalent.
66
187
  *
@@ -99,6 +220,9 @@
99
220
  * Reset the WP Admin page styles for Gutenberg-like pages.
100
221
  */
101
222
  :root {
223
+ --wp-block-synced-color: #7a00df;
224
+ --wp-block-synced-color--rgb: 122, 0, 223;
225
+ --wp-bound-block-color: var(--wp-block-synced-color);
102
226
  --wp-admin-theme-color: #007cba;
103
227
  --wp-admin-theme-color--rgb: 0, 124, 186;
104
228
  --wp-admin-theme-color-darker-10: #006ba1;
@@ -106,9 +230,6 @@
106
230
  --wp-admin-theme-color-darker-20: #005a87;
107
231
  --wp-admin-theme-color-darker-20--rgb: 0, 90, 135;
108
232
  --wp-admin-border-width-focus: 2px;
109
- --wp-block-synced-color: #7a00df;
110
- --wp-block-synced-color--rgb: 122, 0, 223;
111
- --wp-bound-block-color: var(--wp-block-synced-color);
112
233
  }
113
234
  @media (min-resolution: 192dpi) {
114
235
  :root {
@@ -408,13 +529,13 @@
408
529
  .dataviews-filters__search-widget-filter-combobox__wrapper .dataviews-filters__search-widget-filter-combobox__input {
409
530
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
410
531
  padding: 6px 8px;
411
- box-shadow: 0 0 0 transparent;
412
- border-radius: 2px;
413
- border: 1px solid #949494;
414
532
  /* Fonts smaller than 16px causes mobile safari to zoom. */
415
533
  font-size: 16px;
416
534
  /* Override core line-height. To be reviewed. */
417
535
  line-height: normal;
536
+ box-shadow: 0 0 0 transparent;
537
+ border-radius: 2px;
538
+ border: 1px solid #949494;
418
539
  display: block;
419
540
  padding: 0 32px 0 8px;
420
541
  background: #f0f0f0;
package/build-wp/index.js CHANGED
@@ -469,7 +469,7 @@ __export(focusable_exports, {
469
469
  find: () => find
470
470
  });
471
471
  function buildSelector(sequential) {
472
- return [sequential ? '[tabindex]:not([tabindex^="-"])' : "[tabindex]", "a[href]", "button:not([disabled])", 'input:not([type="hidden"]):not([disabled])', "select:not([disabled])", "textarea:not([disabled])", 'iframe:not([tabindex^="-"])', "object", "embed", "area[href]", "[contenteditable]:not([contenteditable=false])"].join(",");
472
+ return [sequential ? '[tabindex]:not([tabindex^="-"])' : "[tabindex]", "a[href]", "button:not([disabled])", 'input:not([type="hidden"]):not([disabled])', "select:not([disabled])", "textarea:not([disabled])", 'iframe:not([tabindex^="-"])', "object", "embed", "summary", "area[href]", "[contenteditable]:not([contenteditable=false])"].join(",");
473
473
  }
474
474
  function isVisible(element) {
475
475
  return element.offsetWidth > 0 || element.offsetHeight > 0 || element.getClientRects().length > 0;
@@ -4117,7 +4117,7 @@ function useInputControlStateReducer(stateReducer = initialStateReducer, initial
4117
4117
  }
4118
4118
 
4119
4119
  // ../components/build-module/utils/with-ignore-ime-events.js
4120
- function withIgnoreIMEEvents(keydownHandler) {
4120
+ function withIgnoreIMEEvents(handler) {
4121
4121
  return (event) => {
4122
4122
  const {
4123
4123
  isComposing
@@ -4128,7 +4128,7 @@ function withIgnoreIMEEvents(keydownHandler) {
4128
4128
  event.keyCode === 229) {
4129
4129
  return;
4130
4130
  }
4131
- keydownHandler(event);
4131
+ handler(event);
4132
4132
  };
4133
4133
  }
4134
4134
 
@@ -4264,15 +4264,6 @@ function InputField({
4264
4264
  }
4265
4265
  });
4266
4266
  const dragProps = isDragEnabled ? dragGestureProps() : {};
4267
- let handleOnMouseDown;
4268
- if (type === "number") {
4269
- handleOnMouseDown = (event) => {
4270
- props.onMouseDown?.(event);
4271
- if (event.currentTarget !== event.currentTarget.ownerDocument.activeElement) {
4272
- event.currentTarget.focus();
4273
- }
4274
- };
4275
- }
4276
4267
  return /* @__PURE__ */ _jsx54(Input, {
4277
4268
  ...props,
4278
4269
  ...dragProps,
@@ -4284,7 +4275,6 @@ function InputField({
4284
4275
  onBlur: handleOnBlur,
4285
4276
  onChange: handleOnChange,
4286
4277
  onKeyDown: withIgnoreIMEEvents(handleOnKeyDown),
4287
- onMouseDown: handleOnMouseDown,
4288
4278
  ref,
4289
4279
  inputSize: size3,
4290
4280
  value: value !== null && value !== void 0 ? value : "",
@@ -5257,6 +5247,9 @@ var number_control_default = NumberControl;
5257
5247
  import removeAccents from "remove-accents";
5258
5248
  import { paramCase } from "change-case";
5259
5249
  var ALL_UNICODE_DASH_CHARACTERS = new RegExp(/[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu);
5250
+ var normalizeTextString = (value) => {
5251
+ return removeAccents(value).normalize("NFKC").toLocaleLowerCase().replace(ALL_UNICODE_DASH_CHARACTERS, "-");
5252
+ };
5260
5253
  function kebabCase2(str) {
5261
5254
  var _str$toString;
5262
5255
  let input = (_str$toString = str?.toString?.()) !== null && _str$toString !== void 0 ? _str$toString : "";
@@ -10538,7 +10531,9 @@ lock3(privateApis, {
10538
10531
  Theme: theme_default,
10539
10532
  Menu: Menu2,
10540
10533
  kebabCase: kebabCase2,
10541
- Badge: badge_default
10534
+ withIgnoreIMEEvents,
10535
+ Badge: badge_default,
10536
+ normalizeTextString
10542
10537
  });
10543
10538
 
10544
10539
  // src/constants.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dataviews",
3
- "version": "4.19.0",
3
+ "version": "4.21.0",
4
4
  "description": "DataViews is a component that provides an API to render datasets using different types of layouts (table, grid, list, etc.).",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -46,15 +46,15 @@
46
46
  "dependencies": {
47
47
  "@ariakit/react": "^0.4.15",
48
48
  "@babel/runtime": "7.25.7",
49
- "@wordpress/components": "^29.9.0",
50
- "@wordpress/compose": "^7.23.0",
51
- "@wordpress/data": "^10.23.0",
52
- "@wordpress/element": "^6.23.0",
53
- "@wordpress/i18n": "^5.23.0",
54
- "@wordpress/icons": "^10.23.0",
55
- "@wordpress/primitives": "^4.23.0",
56
- "@wordpress/private-apis": "^1.23.0",
57
- "@wordpress/warning": "^3.23.0",
49
+ "@wordpress/components": "^29.11.0",
50
+ "@wordpress/compose": "^7.25.0",
51
+ "@wordpress/data": "^10.25.0",
52
+ "@wordpress/element": "^6.25.0",
53
+ "@wordpress/i18n": "^5.25.0",
54
+ "@wordpress/icons": "^10.25.0",
55
+ "@wordpress/primitives": "^4.25.0",
56
+ "@wordpress/private-apis": "^1.25.0",
57
+ "@wordpress/warning": "^3.25.0",
58
58
  "clsx": "^2.1.1",
59
59
  "remove-accents": "^0.5.0"
60
60
  },
@@ -67,5 +67,5 @@
67
67
  "scripts": {
68
68
  "build:wp": "node build"
69
69
  },
70
- "gitHead": "ab5c79cd40adbb68898536c50e035b0a734338ea"
70
+ "gitHead": "d1acd76ffff33ab01f0a948d2f51e5e45c95158d"
71
71
  }