@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.
- package/CHANGELOG.md +33 -0
- package/build/components/dataform-controls/date.cjs.map +3 -3
- package/build/components/dataform-controls/datetime.cjs.map +2 -2
- package/build/components/dataform-controls/email.cjs.map +3 -3
- package/build/components/dataform-controls/telephone.cjs.map +3 -3
- package/build/components/dataform-controls/url.cjs.map +3 -3
- package/build/components/dataform-layouts/panel/summary-button.cjs +18 -1
- package/build/components/dataform-layouts/panel/summary-button.cjs.map +3 -3
- package/build/components/dataform-layouts/panel/utils/get-label-content.cjs +17 -4
- package/build/components/dataform-layouts/panel/utils/get-label-content.cjs.map +3 -3
- package/build/components/dataviews-context/index.cjs.map +2 -2
- package/build/components/dataviews-filters/filter.cjs +86 -80
- package/build/components/dataviews-filters/filter.cjs.map +3 -3
- package/build/components/dataviews-filters/search-widget.cjs.map +3 -3
- package/build/components/dataviews-layouts/grid/composite-grid.cjs +10 -2
- package/build/components/dataviews-layouts/grid/composite-grid.cjs.map +2 -2
- package/build/components/dataviews-layouts/picker-table/index.cjs +8 -0
- package/build/components/dataviews-layouts/picker-table/index.cjs.map +2 -2
- package/build/components/dataviews-layouts/table/column-header-menu.cjs.map +3 -3
- package/build/components/dataviews-layouts/table/use-scroll-state.cjs.map +1 -1
- package/build/components/dataviews-layouts/utils/item-click-wrapper.cjs.map +2 -2
- package/build/components/dataviews-view-config/properties-section.cjs.map +3 -3
- package/build/hooks/use-form-validity.cjs.map +1 -1
- package/build-module/components/dataform-controls/date.mjs +2 -2
- package/build-module/components/dataform-controls/date.mjs.map +2 -2
- package/build-module/components/dataform-controls/datetime.mjs.map +2 -2
- package/build-module/components/dataform-controls/email.mjs +2 -2
- package/build-module/components/dataform-controls/email.mjs.map +2 -2
- package/build-module/components/dataform-controls/telephone.mjs +2 -2
- package/build-module/components/dataform-controls/telephone.mjs.map +2 -2
- package/build-module/components/dataform-controls/url.mjs +2 -2
- package/build-module/components/dataform-controls/url.mjs.map +2 -2
- package/build-module/components/dataform-layouts/panel/summary-button.mjs +19 -2
- package/build-module/components/dataform-layouts/panel/summary-button.mjs.map +2 -2
- package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs +18 -5
- package/build-module/components/dataform-layouts/panel/utils/get-label-content.mjs.map +2 -2
- package/build-module/components/dataviews-context/index.mjs.map +2 -2
- package/build-module/components/dataviews-filters/filter.mjs +88 -83
- package/build-module/components/dataviews-filters/filter.mjs.map +2 -2
- package/build-module/components/dataviews-filters/search-widget.mjs +3 -3
- package/build-module/components/dataviews-filters/search-widget.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/grid/composite-grid.mjs +11 -4
- package/build-module/components/dataviews-layouts/grid/composite-grid.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/picker-table/index.mjs +8 -0
- package/build-module/components/dataviews-layouts/picker-table/index.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/table/column-header-menu.mjs +5 -5
- package/build-module/components/dataviews-layouts/table/column-header-menu.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/table/use-scroll-state.mjs.map +1 -1
- package/build-module/components/dataviews-layouts/utils/item-click-wrapper.mjs.map +2 -2
- package/build-module/components/dataviews-view-config/properties-section.mjs +2 -2
- package/build-module/components/dataviews-view-config/properties-section.mjs.map +2 -2
- package/build-module/hooks/use-form-validity.mjs.map +1 -1
- package/build-style/style-rtl.css +395 -377
- package/build-style/style.css +395 -377
- package/build-types/components/dataform-layouts/panel/summary-button.d.ts.map +1 -1
- package/build-types/components/dataform-layouts/panel/utils/get-label-content.d.ts.map +1 -1
- package/build-types/components/dataviews-context/index.d.ts +2 -2
- package/build-types/components/dataviews-context/index.d.ts.map +1 -1
- package/build-types/components/dataviews-filters/filter.d.ts.map +1 -1
- package/build-types/components/dataviews-layouts/grid/composite-grid.d.ts.map +1 -1
- package/build-types/components/dataviews-layouts/picker-table/index.d.ts.map +1 -1
- package/build-types/components/dataviews-layouts/table/use-scroll-state.d.ts +9 -5
- package/build-types/components/dataviews-layouts/table/use-scroll-state.d.ts.map +1 -1
- package/build-types/components/dataviews-layouts/utils/item-click-wrapper.d.ts.map +1 -1
- package/build-types/dataviews/stories/free-composition.d.ts.map +1 -1
- package/build-wp/index.js +3298 -1396
- package/package.json +18 -18
- package/src/components/dataform-controls/date.tsx +2 -2
- package/src/components/dataform-controls/datetime.tsx +1 -1
- package/src/components/dataform-controls/email.tsx +2 -2
- package/src/components/dataform-controls/style.scss +2 -4
- package/src/components/dataform-controls/telephone.tsx +2 -2
- package/src/components/dataform-controls/url.tsx +2 -2
- package/src/components/dataform-layouts/card/style.scss +4 -7
- package/src/components/dataform-layouts/details/style.scss +2 -4
- package/src/components/dataform-layouts/panel/style.scss +41 -21
- package/src/components/dataform-layouts/panel/summary-button.tsx +17 -6
- package/src/components/dataform-layouts/panel/utils/get-label-content.tsx +15 -7
- package/src/components/dataform-layouts/regular/style.scss +5 -8
- package/src/components/dataviews-bulk-actions/style.scss +2 -6
- package/src/components/dataviews-context/index.ts +2 -4
- package/src/components/dataviews-filters/filter.tsx +93 -77
- package/src/components/dataviews-filters/search-widget.tsx +3 -3
- package/src/components/dataviews-filters/style.scss +93 -95
- package/src/components/dataviews-footer/style.scss +4 -6
- package/src/components/dataviews-item-actions/style.scss +1 -3
- package/src/components/dataviews-layouts/activity/style.scss +39 -41
- package/src/components/dataviews-layouts/grid/composite-grid.tsx +15 -8
- package/src/components/dataviews-layouts/grid/style.scss +46 -50
- package/src/components/dataviews-layouts/list/style.scss +61 -59
- package/src/components/dataviews-layouts/picker-grid/style.scss +33 -37
- package/src/components/dataviews-layouts/picker-table/index.tsx +15 -0
- package/src/components/dataviews-layouts/picker-table/style.scss +5 -8
- package/src/components/dataviews-layouts/table/column-header-menu.tsx +5 -5
- package/src/components/dataviews-layouts/table/style.scss +44 -46
- package/src/components/dataviews-layouts/table/use-scroll-state.ts +6 -6
- package/src/components/dataviews-layouts/utils/grid-items.scss +4 -6
- package/src/components/dataviews-layouts/utils/item-click-wrapper.tsx +3 -1
- package/src/components/dataviews-pagination/style.scss +2 -3
- package/src/components/dataviews-picker-footer/style.scss +1 -3
- package/src/components/dataviews-selection-checkbox/style.scss +0 -1
- package/src/components/dataviews-view-config/properties-section.tsx +2 -2
- package/src/components/dataviews-view-config/style.scss +8 -11
- package/src/dataviews/stories/free-composition.tsx +3 -1
- package/src/dataviews/style.scss +27 -18
- package/src/dataviews-picker/stories/index.story.tsx +2 -0
- package/src/field-types/stories/index.story.tsx +2 -2
- 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": "
|
|
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": "^
|
|
57
|
-
"@wordpress/components": "^
|
|
58
|
-
"@wordpress/compose": "^
|
|
59
|
-
"@wordpress/data": "^10.
|
|
60
|
-
"@wordpress/date": "^5.
|
|
61
|
-
"@wordpress/deprecated": "^4.
|
|
62
|
-
"@wordpress/element": "^
|
|
63
|
-
"@wordpress/i18n": "^6.
|
|
64
|
-
"@wordpress/icons": "^13.
|
|
65
|
-
"@wordpress/keycodes": "^4.
|
|
66
|
-
"@wordpress/primitives": "^4.
|
|
67
|
-
"@wordpress/private-apis": "^1.
|
|
68
|
-
"@wordpress/ui": "^0.
|
|
69
|
-
"@wordpress/warning": "^3.
|
|
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": "^
|
|
87
|
-
"react-dom": "^
|
|
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": "
|
|
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
|
-
<
|
|
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
|
|
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
|
-
<
|
|
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
|
|
29
|
+
border: 1px solid var(--wpds-color-stroke-surface-neutral);
|
|
32
30
|
|
|
33
31
|
&:active {
|
|
34
|
-
background-color:
|
|
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
|
-
<
|
|
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
|
-
<
|
|
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:
|
|
14
|
+
color: var(--wpds-color-fg-content-neutral-weak);
|
|
18
15
|
display: block;
|
|
19
|
-
font-size:
|
|
20
|
-
margin-bottom:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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(--
|
|
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(--
|
|
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:
|
|
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(--
|
|
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(--
|
|
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(--
|
|
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:
|
|
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:
|
|
91
|
+
line-height: var(--wpds-typography-line-height-sm);
|
|
93
92
|
hyphens: auto;
|
|
94
|
-
color:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
155
|
-
padding:
|
|
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:
|
|
175
|
+
margin-bottom: var(--wpds-dimension-gap-lg);
|
|
160
176
|
}
|
|
161
177
|
|
|
162
178
|
.dataforms-layouts-panel__modal-footer {
|
|
163
|
-
margin-top:
|
|
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
|
|
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
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
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
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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;
|