@wordpress/dataviews 14.2.1-next.v.202605131032.0 → 15.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/build/components/dataform-controls/date.cjs.map +3 -3
  3. package/build/components/dataform-controls/datetime.cjs.map +2 -2
  4. package/build/components/dataform-controls/email.cjs.map +3 -3
  5. package/build/components/dataform-controls/telephone.cjs.map +3 -3
  6. package/build/components/dataform-controls/url.cjs.map +3 -3
  7. package/build/components/dataform-layouts/panel/summary-button.cjs +18 -1
  8. package/build/components/dataform-layouts/panel/summary-button.cjs.map +3 -3
  9. package/build/components/dataform-layouts/panel/utils/get-label-content.cjs +17 -4
  10. package/build/components/dataform-layouts/panel/utils/get-label-content.cjs.map +3 -3
  11. package/build/components/dataviews-context/index.cjs.map +2 -2
  12. package/build/components/dataviews-filters/filter.cjs +86 -80
  13. package/build/components/dataviews-filters/filter.cjs.map +3 -3
  14. package/build/components/dataviews-filters/search-widget.cjs.map +3 -3
  15. package/build/components/dataviews-layouts/grid/composite-grid.cjs +10 -2
  16. package/build/components/dataviews-layouts/grid/composite-grid.cjs.map +2 -2
  17. package/build/components/dataviews-layouts/picker-table/index.cjs +8 -0
  18. package/build/components/dataviews-layouts/picker-table/index.cjs.map +2 -2
  19. package/build/components/dataviews-layouts/table/column-header-menu.cjs.map +3 -3
  20. package/build/components/dataviews-layouts/table/use-scroll-state.cjs.map +1 -1
  21. package/build/components/dataviews-layouts/utils/item-click-wrapper.cjs.map +2 -2
  22. package/build/components/dataviews-view-config/properties-section.cjs.map +3 -3
  23. package/build/hooks/use-form-validity.cjs.map +1 -1
  24. package/build-module/components/dataform-controls/date.mjs +2 -2
  25. package/build-module/components/dataform-controls/date.mjs.map +2 -2
  26. package/build-module/components/dataform-controls/datetime.mjs.map +2 -2
  27. package/build-module/components/dataform-controls/email.mjs +2 -2
  28. package/build-module/components/dataform-controls/email.mjs.map +2 -2
  29. package/build-module/components/dataform-controls/telephone.mjs +2 -2
  30. package/build-module/components/dataform-controls/telephone.mjs.map +2 -2
  31. package/build-module/components/dataform-controls/url.mjs +2 -2
  32. package/build-module/components/dataform-controls/url.mjs.map +2 -2
  33. package/build-module/components/dataform-layouts/panel/summary-button.mjs +19 -2
  34. package/build-module/components/dataform-layouts/panel/summary-button.mjs.map +2 -2
  35. package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs +18 -5
  36. package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs.map +2 -2
  37. package/build-module/components/dataviews-context/index.mjs.map +2 -2
  38. package/build-module/components/dataviews-filters/filter.mjs +88 -83
  39. package/build-module/components/dataviews-filters/filter.mjs.map +2 -2
  40. package/build-module/components/dataviews-filters/search-widget.mjs +3 -3
  41. package/build-module/components/dataviews-filters/search-widget.mjs.map +2 -2
  42. package/build-module/components/dataviews-layouts/grid/composite-grid.mjs +11 -4
  43. package/build-module/components/dataviews-layouts/grid/composite-grid.mjs.map +2 -2
  44. package/build-module/components/dataviews-layouts/picker-table/index.mjs +8 -0
  45. package/build-module/components/dataviews-layouts/picker-table/index.mjs.map +2 -2
  46. package/build-module/components/dataviews-layouts/table/column-header-menu.mjs +5 -5
  47. package/build-module/components/dataviews-layouts/table/column-header-menu.mjs.map +2 -2
  48. package/build-module/components/dataviews-layouts/table/use-scroll-state.mjs.map +1 -1
  49. package/build-module/components/dataviews-layouts/utils/item-click-wrapper.mjs.map +2 -2
  50. package/build-module/components/dataviews-view-config/properties-section.mjs +2 -2
  51. package/build-module/components/dataviews-view-config/properties-section.mjs.map +2 -2
  52. package/build-module/hooks/use-form-validity.mjs.map +1 -1
  53. package/build-style/style-rtl.css +395 -377
  54. package/build-style/style.css +395 -377
  55. package/build-types/components/dataform-layouts/panel/summary-button.d.ts.map +1 -1
  56. package/build-types/components/dataform-layouts/panel/utils/get-label-content.d.ts.map +1 -1
  57. package/build-types/components/dataviews-context/index.d.ts +2 -2
  58. package/build-types/components/dataviews-context/index.d.ts.map +1 -1
  59. package/build-types/components/dataviews-filters/filter.d.ts.map +1 -1
  60. package/build-types/components/dataviews-layouts/grid/composite-grid.d.ts.map +1 -1
  61. package/build-types/components/dataviews-layouts/picker-table/index.d.ts.map +1 -1
  62. package/build-types/components/dataviews-layouts/table/use-scroll-state.d.ts +9 -5
  63. package/build-types/components/dataviews-layouts/table/use-scroll-state.d.ts.map +1 -1
  64. package/build-types/components/dataviews-layouts/utils/item-click-wrapper.d.ts.map +1 -1
  65. package/build-types/dataviews/stories/free-composition.d.ts.map +1 -1
  66. package/build-wp/index.js +3298 -1396
  67. package/package.json +18 -18
  68. package/src/components/dataform-controls/date.tsx +2 -2
  69. package/src/components/dataform-controls/datetime.tsx +1 -1
  70. package/src/components/dataform-controls/email.tsx +2 -2
  71. package/src/components/dataform-controls/style.scss +2 -4
  72. package/src/components/dataform-controls/telephone.tsx +2 -2
  73. package/src/components/dataform-controls/url.tsx +2 -2
  74. package/src/components/dataform-layouts/card/style.scss +4 -7
  75. package/src/components/dataform-layouts/details/style.scss +2 -4
  76. package/src/components/dataform-layouts/panel/style.scss +41 -21
  77. package/src/components/dataform-layouts/panel/summary-button.tsx +17 -6
  78. package/src/components/dataform-layouts/panel/utils/get-label-content.tsx +15 -7
  79. package/src/components/dataform-layouts/regular/style.scss +5 -8
  80. package/src/components/dataviews-bulk-actions/style.scss +2 -6
  81. package/src/components/dataviews-context/index.ts +2 -4
  82. package/src/components/dataviews-filters/filter.tsx +93 -77
  83. package/src/components/dataviews-filters/search-widget.tsx +3 -3
  84. package/src/components/dataviews-filters/style.scss +93 -95
  85. package/src/components/dataviews-footer/style.scss +4 -6
  86. package/src/components/dataviews-item-actions/style.scss +1 -3
  87. package/src/components/dataviews-layouts/activity/style.scss +39 -41
  88. package/src/components/dataviews-layouts/grid/composite-grid.tsx +15 -8
  89. package/src/components/dataviews-layouts/grid/style.scss +46 -50
  90. package/src/components/dataviews-layouts/list/style.scss +61 -59
  91. package/src/components/dataviews-layouts/picker-grid/style.scss +33 -37
  92. package/src/components/dataviews-layouts/picker-table/index.tsx +15 -0
  93. package/src/components/dataviews-layouts/picker-table/style.scss +5 -8
  94. package/src/components/dataviews-layouts/table/column-header-menu.tsx +5 -5
  95. package/src/components/dataviews-layouts/table/style.scss +44 -46
  96. package/src/components/dataviews-layouts/table/use-scroll-state.ts +6 -6
  97. package/src/components/dataviews-layouts/utils/grid-items.scss +4 -6
  98. package/src/components/dataviews-layouts/utils/item-click-wrapper.tsx +3 -1
  99. package/src/components/dataviews-pagination/style.scss +2 -3
  100. package/src/components/dataviews-picker-footer/style.scss +1 -3
  101. package/src/components/dataviews-selection-checkbox/style.scss +0 -1
  102. package/src/components/dataviews-view-config/properties-section.tsx +2 -2
  103. package/src/components/dataviews-view-config/style.scss +8 -11
  104. package/src/dataviews/stories/free-composition.tsx +3 -1
  105. package/src/dataviews/style.scss +27 -18
  106. package/src/dataviews-picker/stories/index.story.tsx +2 -0
  107. package/src/field-types/stories/index.story.tsx +2 -2
  108. package/src/hooks/use-form-validity.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/dataviews",
3
- "version": "14.2.1-next.v.202605131032.0+f6d6e7149",
3
+ "version": "15.0.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",
@@ -53,20 +53,20 @@
53
53
  "sideEffects": false,
54
54
  "dependencies": {
55
55
  "@ariakit/react": "^0.4.21",
56
- "@wordpress/base-styles": "^8.0.1-next.v.202605131032.0+f6d6e7149",
57
- "@wordpress/components": "^33.1.1-next.v.202605131032.0+f6d6e7149",
58
- "@wordpress/compose": "^7.45.1-next.v.202605131032.0+f6d6e7149",
59
- "@wordpress/data": "^10.45.1-next.v.202605131032.0+f6d6e7149",
60
- "@wordpress/date": "^5.45.1-next.v.202605131032.0+f6d6e7149",
61
- "@wordpress/deprecated": "^4.45.1-next.v.202605131032.0+f6d6e7149",
62
- "@wordpress/element": "^6.45.1-next.v.202605131032.0+f6d6e7149",
63
- "@wordpress/i18n": "^6.18.1-next.v.202605131032.0+f6d6e7149",
64
- "@wordpress/icons": "^13.0.1-next.v.202605131032.0+f6d6e7149",
65
- "@wordpress/keycodes": "^4.45.1-next.v.202605131032.0+f6d6e7149",
66
- "@wordpress/primitives": "^4.45.1-next.v.202605131032.0+f6d6e7149",
67
- "@wordpress/private-apis": "^1.45.1-next.v.202605131032.0+f6d6e7149",
68
- "@wordpress/ui": "^0.13.1-next.v.202605131032.0+f6d6e7149",
69
- "@wordpress/warning": "^3.45.1-next.v.202605131032.0+f6d6e7149",
56
+ "@wordpress/base-styles": "^9.0.0",
57
+ "@wordpress/components": "^34.0.0",
58
+ "@wordpress/compose": "^8.0.0",
59
+ "@wordpress/data": "^10.47.0",
60
+ "@wordpress/date": "^5.47.0",
61
+ "@wordpress/deprecated": "^4.47.0",
62
+ "@wordpress/element": "^7.0.0",
63
+ "@wordpress/i18n": "^6.20.0",
64
+ "@wordpress/icons": "^13.2.0",
65
+ "@wordpress/keycodes": "^4.47.0",
66
+ "@wordpress/primitives": "^4.47.0",
67
+ "@wordpress/private-apis": "^1.47.0",
68
+ "@wordpress/ui": "^0.14.0",
69
+ "@wordpress/warning": "^3.47.0",
70
70
  "clsx": "^2.1.1",
71
71
  "colord": "^2.7.0",
72
72
  "date-fns": "^4.1.0",
@@ -83,8 +83,8 @@
83
83
  "storybook": "^10.2.8"
84
84
  },
85
85
  "peerDependencies": {
86
- "react": "^18.0.0",
87
- "react-dom": "^18.0.0"
86
+ "react": "^19.2.4",
87
+ "react-dom": "^19.2.4"
88
88
  },
89
89
  "publishConfig": {
90
90
  "access": "public"
@@ -92,5 +92,5 @@
92
92
  "scripts": {
93
93
  "build:wp": "node build.cjs"
94
94
  },
95
- "gitHead": "0e198c7ac7ca634e73ded9220ce048c0302174dd"
95
+ "gitHead": "d653c5fd6161571a0c2ebde28553d6e25624eacc"
96
96
  }
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  BaseControl,
20
20
  Button,
21
- Icon,
21
+ Icon as WCIcon,
22
22
  privateApis as componentsPrivateApis,
23
23
  __experimentalInputControl as InputControl,
24
24
  } from '@wordpress/components';
@@ -269,7 +269,7 @@ function ValidatedDateControl< Item >( {
269
269
  : undefined
270
270
  ) }
271
271
  >
272
- <Icon
272
+ <WCIcon
273
273
  className="components-validated-control__indicator-icon"
274
274
  icon={ errorIcon }
275
275
  size={ 16 }
@@ -54,7 +54,7 @@ function CalendarDateTimeControl< Item >( {
54
54
  const inputControlRef = useRef< HTMLInputElement >( null );
55
55
  const validationTimeoutRef =
56
56
  useRef< ReturnType< typeof setTimeout > >( undefined );
57
- const previousFocusRef = useRef< Element | null >( null );
57
+ const previousFocusRef = useRef< Element >( null );
58
58
 
59
59
  const { minConstraint, maxConstraint, disabledMatchers } =
60
60
  useDisabledDateMatchers( isValid, parseDateTime );
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- Icon,
5
+ Icon as WCIcon,
6
6
  __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
7
7
  } from '@wordpress/components';
8
8
  import { envelope } from '@wordpress/icons';
@@ -33,7 +33,7 @@ export default function Email< Item >( {
33
33
  type: 'email',
34
34
  prefix: (
35
35
  <InputControlPrefixWrapper variant="icon">
36
- <Icon icon={ envelope } />
36
+ <WCIcon icon={ envelope } />
37
37
  </InputControlPrefixWrapper>
38
38
  ),
39
39
  } }
@@ -1,5 +1,3 @@
1
- @use "@wordpress/base-styles/colors" as *;
2
-
3
1
  .dataviews-controls__datetime {
4
2
  border: none;
5
3
  padding: 0;
@@ -28,9 +26,9 @@
28
26
  }
29
27
 
30
28
  .dataviews-controls__date-preset {
31
- border: 1px solid #ddd;
29
+ border: 1px solid var(--wpds-color-stroke-surface-neutral);
32
30
 
33
31
  &:active {
34
- background-color: $black;
32
+ background-color: var(--wpds-color-bg-interactive-neutral-strong-active);
35
33
  }
36
34
  }
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- Icon,
5
+ Icon as WCIcon,
6
6
  __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
7
7
  } from '@wordpress/components';
8
8
  import { mobile } from '@wordpress/icons';
@@ -33,7 +33,7 @@ export default function Telephone< Item >( {
33
33
  type: 'tel',
34
34
  prefix: (
35
35
  <InputControlPrefixWrapper variant="icon">
36
- <Icon icon={ mobile } />
36
+ <WCIcon icon={ mobile } />
37
37
  </InputControlPrefixWrapper>
38
38
  ),
39
39
  } }
@@ -2,7 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import {
5
- Icon,
5
+ Icon as WCIcon,
6
6
  __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
7
7
  } from '@wordpress/components';
8
8
  import { link } from '@wordpress/icons';
@@ -33,7 +33,7 @@ export default function Url< Item >( {
33
33
  type: 'url',
34
34
  prefix: (
35
35
  <InputControlPrefixWrapper variant="icon">
36
- <Icon icon={ link } />
36
+ <WCIcon icon={ link } />
37
37
  </InputControlPrefixWrapper>
38
38
  ),
39
39
  } }
@@ -1,6 +1,3 @@
1
- @use "@wordpress/base-styles/colors" as *;
2
- @use "@wordpress/base-styles/variables" as *;
3
-
4
1
  .dataforms-layouts-card__field {
5
2
  width: 100%;
6
3
  }
@@ -14,15 +11,15 @@
14
11
  }
15
12
 
16
13
  .dataforms-layouts-card__field-description {
17
- color: $gray-700;
14
+ color: var(--wpds-color-fg-content-neutral-weak);
18
15
  display: block;
19
- font-size: $font-size-medium;
20
- margin-bottom: $grid-unit-20;
16
+ font-size: var(--wpds-typography-font-size-md);
17
+ margin-bottom: var(--wpds-dimension-gap-lg);
21
18
  }
22
19
 
23
20
  .dataforms-layouts-card__field-summary {
24
21
  display: flex;
25
22
  flex-direction: row;
26
- gap: $grid-unit-20;
23
+ gap: var(--wpds-dimension-gap-lg);
27
24
  align-items: center;
28
25
  }
@@ -1,10 +1,8 @@
1
- @use "@wordpress/base-styles/variables" as *;
2
-
3
1
  .dataforms-layouts-details__summary-content {
4
2
  display: inline-flex;
5
- min-height: $grid-unit-30;
3
+ min-height: calc(var(--wpds-dimension-base) * 6); // TODO: use size token when available
6
4
  }
7
5
 
8
6
  .dataforms-layouts-details__content {
9
- padding-top: $grid-unit-15;
7
+ padding-top: var(--wpds-dimension-padding-md);
10
8
  }
@@ -1,5 +1,4 @@
1
- @use "@wordpress/base-styles/variables" as *;
2
- @use "@wordpress/base-styles/colors" as *;
1
+ @use "@wordpress/base-styles/variables" as vars;
3
2
  @use "@wordpress/base-styles/z-index" as *;
4
3
 
5
4
  .dataforms-layouts-panel__field-trigger {
@@ -7,10 +6,10 @@
7
6
  color: inherit;
8
7
  display: flex;
9
8
  width: 100%;
10
- min-height: $grid-unit-30;
9
+ min-height: calc(var(--wpds-dimension-base) * 6); // TODO: use size token when available
11
10
  cursor: var(--wpds-cursor-control);
12
11
  align-items: flex-start;
13
- border-radius: $radius-small;
12
+ border-radius: var(--wpds-border-radius-sm);
14
13
  isolation: isolate;
15
14
 
16
15
  &--label-side {
@@ -28,14 +27,14 @@
28
27
  }
29
28
 
30
29
  &:not(.is-disabled):hover {
31
- color: var(--wp-admin-theme-color);
30
+ color: var(--wpds-color-fg-interactive-brand);
32
31
 
33
32
  .dataforms-layouts-panel__field-trigger-icon {
34
33
  opacity: 1;
35
34
  }
36
35
 
37
36
  .dataforms-layouts-panel__field-label {
38
- color: var(--wp-admin-theme-color);
37
+ color: var(--wpds-color-fg-interactive-brand);
39
38
  }
40
39
  }
41
40
 
@@ -43,7 +42,7 @@
43
42
  cursor: default;
44
43
 
45
44
  .dataforms-layouts-panel__field-control {
46
- color: $gray-700;
45
+ color: var(--wpds-color-fg-content-neutral-weak);
47
46
  font-weight: var(--wpds-typography-font-weight-regular);
48
47
  }
49
48
  }
@@ -56,13 +55,13 @@
56
55
 
57
56
  &:hover,
58
57
  &:focus-visible {
59
- fill: var(--wp-admin-theme-color);
58
+ fill: var(--wpds-color-fg-interactive-brand);
60
59
  }
61
60
  }
62
61
 
63
62
  .dataforms-layouts-panel__field-trigger-icon {
64
63
  padding: 0;
65
- color: var(--wp-admin-theme-color);
64
+ color: var(--wpds-color-fg-interactive-brand);
66
65
  flex: 0 0 auto;
67
66
  opacity: 0;
68
67
  border-radius: var(--wpds-border-radius-xs);
@@ -71,7 +70,7 @@
71
70
  opacity: 1;
72
71
  outline:
73
72
  var(--wpds-border-width-focus) solid
74
- var(--wp-admin-theme-color);
73
+ var(--wpds-color-stroke-focus-brand);
75
74
  }
76
75
  }
77
76
 
@@ -86,12 +85,12 @@
86
85
  .dataforms-layouts-panel__field-label {
87
86
  width: 38%;
88
87
  flex-shrink: 0;
89
- min-height: $grid-unit-30;
88
+ min-height: calc(var(--wpds-dimension-base) * 6); // TODO: use size token when available
90
89
  display: flex;
91
90
  align-items: center;
92
- line-height: $grid-unit-05 * 5;
91
+ line-height: var(--wpds-typography-line-height-sm);
93
92
  hyphens: auto;
94
- color: $gray-700;
93
+ color: var(--wpds-color-fg-content-neutral-weak);
95
94
 
96
95
  .components-base-control__label {
97
96
  display: inline;
@@ -100,7 +99,7 @@
100
99
  }
101
100
 
102
101
  &.has-error {
103
- color: $alert-red;
102
+ color: var(--wpds-color-fg-content-error-weak);
104
103
  }
105
104
  }
106
105
 
@@ -108,11 +107,11 @@
108
107
  position: relative;
109
108
  z-index: 1;
110
109
  cursor: help;
111
- fill: $alert-red;
110
+ fill: var(--wpds-color-fg-content-error-weak);
112
111
  display: inline-flex;
113
112
  flex-direction: row;
114
113
  align-items: center;
115
- gap: $grid-unit-05;
114
+ gap: var(--wpds-dimension-gap-xs);
116
115
  svg {
117
116
  fill: currentColor;
118
117
  }
@@ -121,7 +120,7 @@
121
120
  .dataforms-layouts-panel__field-control {
122
121
  flex-grow: 1;
123
122
  min-width: 0;
124
- min-height: $grid-unit-30;
123
+ min-height: calc(var(--wpds-dimension-base) * 6); // TODO: use size token when available
125
124
  line-height: var(--wpds-typography-line-height-md);
126
125
  display: flex;
127
126
  align-items: center;
@@ -132,6 +131,23 @@
132
131
  > * {
133
132
  min-width: 0;
134
133
  }
134
+
135
+ .components-button {
136
+ max-width: 100%;
137
+ text-align: left;
138
+ white-space: normal;
139
+ text-wrap: balance; // Fallback for Safari.
140
+ text-wrap: pretty;
141
+ min-height: vars.$button-size-compact;
142
+ }
143
+
144
+ &.components-button.is-link[aria-disabled="true"] {
145
+ text-decoration: none;
146
+ }
147
+
148
+ .components-dropdown {
149
+ max-width: 100%;
150
+ }
135
151
  }
136
152
 
137
153
  .dataforms-layouts-panel__field-trigger--label-top
@@ -151,18 +167,22 @@
151
167
  }
152
168
 
153
169
  .dataforms-layouts-panel__field-dropdown .components-popover__content {
154
- min-width: 256px;
155
- padding: $grid-unit-20;
170
+ min-width: 320px;
171
+ padding: var(--wpds-dimension-padding-lg);
156
172
  }
157
173
 
158
174
  .dataforms-layouts-panel__dropdown-header {
159
- margin-bottom: $grid-unit-20;
175
+ margin-bottom: var(--wpds-dimension-gap-lg);
160
176
  }
161
177
 
162
178
  .dataforms-layouts-panel__modal-footer {
163
- margin-top: $grid-unit-20;
179
+ margin-top: var(--wpds-dimension-gap-lg);
164
180
  }
165
181
 
166
182
  .components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown {
167
183
  z-index: z-index(".components-popover.components-dropdown__content.dataforms-layouts-panel__field-dropdown");
168
184
  }
185
+
186
+ .dataforms-layouts-panel__summary-button:empty {
187
+ min-width: vars.$admin-sidebar-width;
188
+ }
@@ -6,10 +6,12 @@ import clsx from 'clsx';
6
6
  /**
7
7
  * WordPress dependencies
8
8
  */
9
- import { Button, Icon, Tooltip } from '@wordpress/components';
9
+ import { Button, Icon as WCIcon } from '@wordpress/components';
10
10
  import { sprintf, _x } from '@wordpress/i18n';
11
11
  import { error as errorIcon, pencil } from '@wordpress/icons';
12
12
  import { useInstanceId } from '@wordpress/compose';
13
+ // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
14
+ import { Tooltip } from '@wordpress/ui';
13
15
  import { useRef } from '@wordpress/element';
14
16
 
15
17
  /**
@@ -111,11 +113,20 @@ export default function SummaryButton< Item >( {
111
113
  <span className={ labelClassName }>{ labelContent }</span>
112
114
  ) }
113
115
  { labelPosition === 'none' && showError && (
114
- <Tooltip text={ errorMessage } placement="top">
115
- <span className="dataforms-layouts-panel__field-label-error-content">
116
- <Icon icon={ errorIcon } size={ 16 } />
117
- </span>
118
- </Tooltip>
116
+ <Tooltip.Root>
117
+ <Tooltip.Trigger
118
+ render={
119
+ <span
120
+ className="dataforms-layouts-panel__field-label-error-content"
121
+ role="img"
122
+ aria-label={ errorMessage }
123
+ >
124
+ <WCIcon icon={ errorIcon } size={ 16 } />
125
+ </span>
126
+ }
127
+ />
128
+ <Tooltip.Popup>{ errorMessage }</Tooltip.Popup>
129
+ </Tooltip.Root>
119
130
  ) }
120
131
  <span
121
132
  id={ `${ controlId }` }
@@ -1,8 +1,10 @@
1
1
  /**
2
2
  * WordPress dependencies
3
3
  */
4
- import { Icon, Tooltip } from '@wordpress/components';
4
+ import { Icon as WCIcon } from '@wordpress/components';
5
5
  import { error as errorIcon } from '@wordpress/icons';
6
+ // eslint-disable-next-line @wordpress/use-recommended-components -- `Tooltip` is not yet on the recommended `@wordpress/ui` allow-list; landing as a migration step ahead of the wider rollout.
7
+ import { Tooltip, VisuallyHidden } from '@wordpress/ui';
6
8
 
7
9
  function getLabelContent(
8
10
  showError?: boolean,
@@ -10,12 +12,18 @@ function getLabelContent(
10
12
  fieldLabel?: string
11
13
  ) {
12
14
  return showError ? (
13
- <Tooltip text={ errorMessage } placement="top">
14
- <span className="dataforms-layouts-panel__field-label-error-content">
15
- <Icon icon={ errorIcon } size={ 16 } />
16
- { fieldLabel }
17
- </span>
18
- </Tooltip>
15
+ <Tooltip.Root>
16
+ <Tooltip.Trigger
17
+ render={
18
+ <span className="dataforms-layouts-panel__field-label-error-content">
19
+ <WCIcon icon={ errorIcon } size={ 16 } />
20
+ <VisuallyHidden>{ errorMessage }: </VisuallyHidden>
21
+ { fieldLabel }
22
+ </span>
23
+ }
24
+ />
25
+ <Tooltip.Popup>{ errorMessage }</Tooltip.Popup>
26
+ </Tooltip.Root>
19
27
  ) : (
20
28
  fieldLabel
21
29
  );
@@ -1,26 +1,23 @@
1
- @use "@wordpress/base-styles/colors" as *;
2
- @use "@wordpress/base-styles/variables" as *;
3
-
4
1
  .dataforms-layouts-regular__field {
5
2
  width: 100%;
6
- min-height: $grid-unit-40;
3
+ min-height: calc(var(--wpds-dimension-base) * 8); // TODO: use size token when available
7
4
  justify-content: flex-start !important;
8
5
  align-items: flex-start !important;
9
6
 
10
7
  .components-base-control__label,
11
8
  .components-input-control__label,
12
9
  .components-form-token-field__label {
13
- color: $gray-900;
10
+ color: var(--wpds-color-fg-content-neutral);
14
11
  }
15
12
  }
16
13
 
17
14
  .dataforms-layouts-regular__field-label {
18
15
  width: 38%;
19
16
  flex-shrink: 0;
20
- min-height: $grid-unit-40;
17
+ min-height: calc(var(--wpds-dimension-base) * 8); // TODO: use size token when available
21
18
  display: flex;
22
19
  align-items: center;
23
- line-height: $grid-unit-05 * 5;
20
+ line-height: var(--wpds-typography-line-height-sm);
24
21
  hyphens: auto;
25
22
 
26
23
  &--label-position-side {
@@ -34,7 +31,7 @@
34
31
 
35
32
  .dataforms-layouts-regular__field-control {
36
33
  flex-grow: 1;
37
- min-height: $grid-unit-40;
34
+ min-height: calc(var(--wpds-dimension-base) * 8); // TODO: use size token when available
38
35
  display: flex;
39
36
  align-items: center;
40
37
  }
@@ -1,12 +1,8 @@
1
- @use "@wordpress/base-styles/colors" as *;
2
- @use "@wordpress/base-styles/variables" as *;
3
-
4
-
5
1
  .dataviews-bulk-actions-footer__item-count {
6
- color: $gray-900;
2
+ color: var(--wpds-color-fg-content-neutral);
7
3
  }
8
4
 
9
5
  .dataviews-bulk-actions-footer__container {
10
6
  margin-right: auto;
11
- min-height: $grid-unit-40;
7
+ min-height: calc(var(--wpds-dimension-base) * 8); // TODO: use size token when available
12
8
  }
@@ -46,10 +46,8 @@ type DataViewsContextType< Item > = {
46
46
  ) => ReactElement;
47
47
  isItemClickable: ( item: Item ) => boolean;
48
48
  containerWidth: number;
49
- containerRef: React.MutableRefObject< HTMLDivElement | null >;
50
- resizeObserverRef:
51
- | ( ( element?: HTMLDivElement | null ) => void )
52
- | React.RefObject< HTMLDivElement >;
49
+ containerRef: React.RefObject< HTMLDivElement | null >;
50
+ resizeObserverRef: React.Ref< HTMLDivElement | null >;
53
51
  defaultLayouts: NormalizedSupportedLayouts;
54
52
  filters: NormalizedFilter[];
55
53
  isShowingFilter: boolean;