@wordpress/dataviews 16.0.1 → 17.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 +27 -0
- package/README.md +2 -2
- package/build/components/dataform-layouts/panel/dropdown.cjs +2 -2
- package/build/components/dataform-layouts/panel/dropdown.cjs.map +2 -2
- package/build/components/dataform-layouts/panel/modal.cjs +1 -1
- package/build/components/dataform-layouts/panel/modal.cjs.map +2 -2
- package/build/components/dataform-layouts/panel/summary-button.cjs +7 -6
- package/build/components/dataform-layouts/panel/summary-button.cjs.map +2 -2
- package/build/components/dataform-layouts/panel/utils/get-label-content.cjs.map +2 -2
- package/build/components/dataviews-filters/filter.cjs.map +2 -2
- package/build/components/dataviews-layouts/grid/composite-grid.cjs.map +2 -2
- package/build/components/dataviews-layouts/list/index.cjs.map +1 -1
- package/build/components/dataviews-layouts/table/column-primary.cjs +2 -2
- package/build/components/dataviews-layouts/table/column-primary.cjs.map +2 -2
- package/build/components/dataviews-pagination/index.cjs.map +1 -1
- package/build/components/dataviews-picker-footer/index.cjs +72 -33
- package/build/components/dataviews-picker-footer/index.cjs.map +2 -2
- package/build/constants.cjs +1 -1
- package/build/constants.cjs.map +2 -2
- package/build/dataviews-picker/index.cjs +2 -1
- package/build/dataviews-picker/index.cjs.map +2 -2
- package/build/field-types/password.cjs +1 -1
- package/build/field-types/password.cjs.map +2 -2
- package/build/hooks/use-form-validity.cjs +2 -2
- package/build/hooks/use-form-validity.cjs.map +2 -2
- package/build-module/components/dataform-layouts/panel/dropdown.mjs +2 -2
- package/build-module/components/dataform-layouts/panel/dropdown.mjs.map +2 -2
- package/build-module/components/dataform-layouts/panel/modal.mjs +1 -1
- package/build-module/components/dataform-layouts/panel/modal.mjs.map +2 -2
- package/build-module/components/dataform-layouts/panel/summary-button.mjs +7 -6
- 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.map +2 -2
- package/build-module/components/dataviews-filters/filter.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/grid/composite-grid.mjs.map +2 -2
- package/build-module/components/dataviews-layouts/list/index.mjs.map +1 -1
- package/build-module/components/dataviews-layouts/table/column-primary.mjs +2 -2
- package/build-module/components/dataviews-layouts/table/column-primary.mjs.map +2 -2
- package/build-module/components/dataviews-pagination/index.mjs.map +1 -1
- package/build-module/components/dataviews-picker-footer/index.mjs +71 -33
- package/build-module/components/dataviews-picker-footer/index.mjs.map +2 -2
- package/build-module/constants.mjs +1 -1
- package/build-module/constants.mjs.map +2 -2
- package/build-module/dataviews-picker/index.mjs +6 -2
- package/build-module/dataviews-picker/index.mjs.map +2 -2
- package/build-module/field-types/password.mjs +1 -1
- package/build-module/field-types/password.mjs.map +2 -2
- package/build-module/hooks/use-form-validity.mjs +2 -2
- package/build-module/hooks/use-form-validity.mjs.map +2 -2
- package/build-style/style-rtl.css +192 -207
- package/build-style/style.css +192 -207
- package/build-types/components/dataform-layouts/panel/summary-button.d.ts +2 -2
- 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-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-picker-footer/index.d.ts +3 -2
- package/build-types/components/dataviews-picker-footer/index.d.ts.map +1 -1
- package/build-types/dataviews-picker/index.d.ts +3 -2
- package/build-types/dataviews-picker/index.d.ts.map +1 -1
- package/build-wp/index.js +712 -668
- package/package.json +26 -21
- package/src/components/dataform-controls/style.scss +1 -1
- package/src/components/dataform-layouts/card/style.scss +1 -1
- package/src/components/dataform-layouts/details/style.scss +1 -1
- package/src/components/dataform-layouts/panel/dropdown.tsx +1 -1
- package/src/components/dataform-layouts/panel/modal.tsx +1 -1
- package/src/components/dataform-layouts/panel/style.scss +18 -34
- package/src/components/dataform-layouts/panel/summary-button.tsx +17 -8
- package/src/components/dataform-layouts/panel/utils/get-label-content.tsx +0 -1
- package/src/components/dataform-layouts/regular/style.scss +4 -4
- package/src/components/dataviews-bulk-actions/style.scss +2 -2
- package/src/components/dataviews-filters/filter.tsx +0 -1
- package/src/components/dataviews-filters/style.scss +45 -46
- package/src/components/dataviews-layouts/activity/style.scss +19 -19
- package/src/components/dataviews-layouts/grid/composite-grid.tsx +0 -1
- package/src/components/dataviews-layouts/grid/style.scss +19 -13
- package/src/components/dataviews-layouts/list/style.scss +35 -27
- package/src/components/dataviews-layouts/picker-activity/style.scss +18 -18
- package/src/components/dataviews-layouts/picker-grid/style.scss +18 -12
- package/src/components/dataviews-layouts/picker-table/style.scss +7 -5
- package/src/components/dataviews-layouts/table/style.scss +17 -17
- package/src/components/dataviews-picker-footer/index.tsx +94 -31
- package/src/components/dataviews-picker-footer/style.scss +1 -1
- package/src/components/dataviews-view-config/style.scss +1 -1
- package/src/dataviews/style.scss +9 -9
- package/src/dataviews-picker/index.tsx +9 -3
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.dataviews-filters__summary-operators-filter-name {
|
|
55
|
-
color: var(--wpds-color-
|
|
55
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
56
56
|
white-space: nowrap;
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
text-overflow: ellipsis;
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
border: var(--wpds-border-width-xs) solid var(--wpds-color-stroke-interactive-neutral);
|
|
77
77
|
cursor: var(--wpds-cursor-control);
|
|
78
78
|
padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-md);
|
|
79
|
-
min-height:
|
|
80
|
-
color: var(--wpds-color-
|
|
79
|
+
min-height: var(--wpds-dimension-size-md);
|
|
80
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
81
81
|
position: relative;
|
|
82
82
|
display: flex;
|
|
83
83
|
align-items: center;
|
|
@@ -88,26 +88,26 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
&.has-reset {
|
|
91
|
-
padding-inline-end: calc(
|
|
91
|
+
padding-inline-end: calc(var(--wpds-dimension-size-sm) + var(--wpds-dimension-padding-xs));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&:hover:not(&.is-not-clickable),
|
|
95
95
|
&:focus-visible,
|
|
96
96
|
&[aria-expanded="true"] {
|
|
97
|
-
color: var(--wpds-color-
|
|
97
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
98
98
|
border-color: var(--wpds-color-stroke-interactive-neutral-active);
|
|
99
|
-
background-color: var(--wpds-color-
|
|
99
|
+
background-color: var(--wpds-color-background-interactive-neutral-weak-active);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
&.has-values {
|
|
103
|
-
color: var(--wpds-color-
|
|
104
|
-
background: var(--wpds-color-
|
|
103
|
+
color: var(--wpds-color-foreground-interactive-brand);
|
|
104
|
+
background: var(--wpds-color-background-interactive-brand-weak);
|
|
105
105
|
border-color: var(--wpds-color-stroke-interactive-brand);
|
|
106
106
|
|
|
107
107
|
&:hover:not(&.is-not-clickable),
|
|
108
108
|
&[aria-expanded="true"] {
|
|
109
|
-
color: var(--wpds-color-
|
|
110
|
-
background: var(--wpds-color-
|
|
109
|
+
color: var(--wpds-color-foreground-interactive-brand-active);
|
|
110
|
+
background: var(--wpds-color-background-interactive-brand-weak-active);
|
|
111
111
|
border-color: var(--wpds-color-stroke-interactive-brand-active);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
outline: none;
|
|
117
117
|
box-shadow:
|
|
118
118
|
0 0 0 var(--wpds-border-width-focus)
|
|
119
|
-
var(--wpds-color-stroke-focus
|
|
119
|
+
var(--wpds-color-stroke-focus);
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.dataviews-filters-__summary-filter-text-name {
|
|
@@ -125,9 +125,8 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
.dataviews-filters__summary-chip-remove {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
height: vars.$icon-size;
|
|
128
|
+
width: var(--wpds-dimension-size-sm);
|
|
129
|
+
height: var(--wpds-dimension-size-sm);
|
|
131
130
|
border-radius: var(--wpds-border-radius-md);
|
|
132
131
|
border: 0;
|
|
133
132
|
padding: 0;
|
|
@@ -142,23 +141,23 @@
|
|
|
142
141
|
cursor: var(--wpds-cursor-control);
|
|
143
142
|
|
|
144
143
|
svg {
|
|
145
|
-
fill: var(--wpds-color-
|
|
144
|
+
fill: var(--wpds-color-foreground-interactive-neutral);
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
&:hover,
|
|
149
148
|
&:focus {
|
|
150
|
-
background: var(--wpds-color-
|
|
149
|
+
background: var(--wpds-color-background-interactive-neutral-weak-active);
|
|
151
150
|
svg {
|
|
152
|
-
fill: var(--wpds-color-
|
|
151
|
+
fill: var(--wpds-color-foreground-interactive-neutral-active);
|
|
153
152
|
}
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
&.has-values {
|
|
157
156
|
svg {
|
|
158
|
-
fill: var(--wpds-color-
|
|
157
|
+
fill: var(--wpds-color-foreground-interactive-brand);
|
|
159
158
|
}
|
|
160
159
|
&:hover {
|
|
161
|
-
background: var(--wpds-color-
|
|
160
|
+
background: var(--wpds-color-background-interactive-brand-weak-active);
|
|
162
161
|
}
|
|
163
162
|
}
|
|
164
163
|
|
|
@@ -166,13 +165,13 @@
|
|
|
166
165
|
outline: none;
|
|
167
166
|
box-shadow:
|
|
168
167
|
0 0 0 var(--wpds-border-width-focus)
|
|
169
|
-
var(--wpds-color-stroke-focus
|
|
168
|
+
var(--wpds-color-stroke-focus);
|
|
170
169
|
}
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
.dataviews-filters__search-widget-filter-combobox-list {
|
|
175
|
-
max-height:
|
|
174
|
+
max-height: 184px;
|
|
176
175
|
padding: var(--wpds-dimension-padding-xs);
|
|
177
176
|
overflow: auto;
|
|
178
177
|
border-top: 1px solid var(--wpds-color-stroke-surface-neutral);
|
|
@@ -197,7 +196,7 @@
|
|
|
197
196
|
box-sizing: border-box;
|
|
198
197
|
padding: var(--wpds-dimension-padding-xs) var(--wpds-dimension-padding-md);
|
|
199
198
|
cursor: default;
|
|
200
|
-
min-height:
|
|
199
|
+
min-height: var(--wpds-dimension-size-md);
|
|
201
200
|
@include body-medium();
|
|
202
201
|
|
|
203
202
|
&:last-child {
|
|
@@ -207,24 +206,24 @@
|
|
|
207
206
|
&:hover,
|
|
208
207
|
&[data-active-item],
|
|
209
208
|
&:focus {
|
|
210
|
-
background-color: var(--wpds-color-
|
|
209
|
+
background-color: var(--wpds-color-background-interactive-brand-weak-active);
|
|
211
210
|
|
|
212
211
|
.dataviews-filters__search-widget-listitem-single-selection {
|
|
213
212
|
border-color: var(--wpds-color-stroke-interactive-brand-active);
|
|
214
|
-
background: var(--wpds-color-
|
|
213
|
+
background: var(--wpds-color-background-surface-neutral-strong);
|
|
215
214
|
&.is-selected {
|
|
216
215
|
border-color: var(--wpds-color-stroke-interactive-brand-active);
|
|
217
|
-
background: var(--wpds-color-
|
|
216
|
+
background: var(--wpds-color-background-interactive-brand-strong-active);
|
|
218
217
|
}
|
|
219
218
|
}
|
|
220
219
|
|
|
221
220
|
.dataviews-filters__search-widget-listitem-multi-selection {
|
|
222
221
|
border-color: var(--wpds-color-stroke-interactive-brand-active);
|
|
223
|
-
background: var(--wpds-color-
|
|
222
|
+
background: var(--wpds-color-background-surface-neutral-strong);
|
|
224
223
|
|
|
225
224
|
&.is-selected {
|
|
226
225
|
border-color: var(--wpds-color-stroke-interactive-brand-active);
|
|
227
|
-
background: var(--wpds-color-
|
|
226
|
+
background: var(--wpds-color-background-interactive-brand-strong-active);
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
}
|
|
@@ -242,7 +241,7 @@
|
|
|
242
241
|
text-overflow: ellipsis;
|
|
243
242
|
font-size: var(--wpds-typography-font-size-sm);
|
|
244
243
|
line-height: 16px;
|
|
245
|
-
color: var(--wpds-color-
|
|
244
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
246
245
|
}
|
|
247
246
|
|
|
248
247
|
.dataviews-filters__search-widget-listitem-single-selection {
|
|
@@ -251,7 +250,7 @@
|
|
|
251
250
|
padding: 0;
|
|
252
251
|
|
|
253
252
|
&.is-selected {
|
|
254
|
-
background: var(--wpds-color-
|
|
253
|
+
background: var(--wpds-color-background-interactive-brand-strong);
|
|
255
254
|
border-color: var(--wpds-color-stroke-interactive-brand);
|
|
256
255
|
|
|
257
256
|
&::before {
|
|
@@ -265,10 +264,10 @@
|
|
|
265
264
|
left: 50%;
|
|
266
265
|
transform: translate(-50%, -50%);
|
|
267
266
|
margin: 0;
|
|
268
|
-
background-color: var(--wpds-color-
|
|
267
|
+
background-color: var(--wpds-color-foreground-interactive-brand-strong);
|
|
269
268
|
|
|
270
269
|
// This border serves as a background color in Windows High Contrast mode.
|
|
271
|
-
border: 4px solid var(--wpds-color-
|
|
270
|
+
border: 4px solid var(--wpds-color-foreground-interactive-brand-strong);
|
|
272
271
|
|
|
273
272
|
@include break-small() {
|
|
274
273
|
width: vars.$radio-input-size * 0.5;
|
|
@@ -284,8 +283,8 @@
|
|
|
284
283
|
|
|
285
284
|
@include checkbox-control;
|
|
286
285
|
position: relative;
|
|
287
|
-
background: var(--wpds-color-
|
|
288
|
-
color: var(--wpds-color-
|
|
286
|
+
background: var(--wpds-color-background-interactive-neutral-weak);
|
|
287
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
289
288
|
margin: 0;
|
|
290
289
|
padding: 0;
|
|
291
290
|
width: var(--checkbox-size);
|
|
@@ -300,13 +299,13 @@
|
|
|
300
299
|
}
|
|
301
300
|
|
|
302
301
|
&.is-selected {
|
|
303
|
-
background: var(--wpds-color-
|
|
302
|
+
background: var(--wpds-color-background-interactive-brand-strong);
|
|
304
303
|
border-color: var(--wpds-color-stroke-interactive-brand);
|
|
305
304
|
|
|
306
305
|
svg {
|
|
307
306
|
--checkmark-size: var(--checkbox-size);
|
|
308
307
|
|
|
309
|
-
fill: var(--wpds-color-
|
|
308
|
+
fill: var(--wpds-color-foreground-interactive-neutral-strong);
|
|
310
309
|
position: absolute;
|
|
311
310
|
left: 50%;
|
|
312
311
|
top: 50%;
|
|
@@ -329,9 +328,9 @@
|
|
|
329
328
|
.dataviews-filters__search-widget-filter-combobox__input {
|
|
330
329
|
@include input-control;
|
|
331
330
|
display: block;
|
|
332
|
-
padding: 0 var(--wpds-dimension-padding-sm) 0
|
|
331
|
+
padding: 0 var(--wpds-dimension-padding-sm) 0 var(--wpds-dimension-size-md);
|
|
333
332
|
width: 100%;
|
|
334
|
-
height:
|
|
333
|
+
height: var(--wpds-dimension-size-md);
|
|
335
334
|
|
|
336
335
|
// Unset inherited values.
|
|
337
336
|
margin-left: 0;
|
|
@@ -344,14 +343,14 @@
|
|
|
344
343
|
}
|
|
345
344
|
|
|
346
345
|
&:focus {
|
|
347
|
-
background: var(--wpds-color-
|
|
346
|
+
background: var(--wpds-color-background-surface-neutral-strong);
|
|
348
347
|
box-shadow:
|
|
349
348
|
inset 0 0 0 var(--wpds-border-width-focus)
|
|
350
|
-
var(--wpds-color-stroke-focus
|
|
349
|
+
var(--wpds-color-stroke-focus);
|
|
351
350
|
}
|
|
352
351
|
|
|
353
352
|
&::placeholder {
|
|
354
|
-
color: var(--wpds-color-
|
|
353
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
355
354
|
}
|
|
356
355
|
|
|
357
356
|
&::-webkit-search-decoration,
|
|
@@ -370,7 +369,7 @@
|
|
|
370
369
|
display: flex;
|
|
371
370
|
align-items: center;
|
|
372
371
|
justify-content: center;
|
|
373
|
-
width:
|
|
372
|
+
width: var(--wpds-dimension-size-sm);
|
|
374
373
|
|
|
375
374
|
&:dir(ltr) {
|
|
376
375
|
transform: scaleX(-1);
|
|
@@ -388,16 +387,16 @@
|
|
|
388
387
|
top: 0;
|
|
389
388
|
right: 0;
|
|
390
389
|
transform: translate(50%, -50%);
|
|
391
|
-
background: var(--wpds-color-
|
|
392
|
-
height:
|
|
393
|
-
min-width:
|
|
390
|
+
background: var(--wpds-color-background-interactive-brand-strong);
|
|
391
|
+
height: var(--wpds-dimension-size-2xs);
|
|
392
|
+
min-width: var(--wpds-dimension-size-2xs);
|
|
394
393
|
line-height: var(--wpds-typography-line-height-xs);
|
|
395
394
|
padding: 0 var(--wpds-dimension-padding-xs);
|
|
396
395
|
text-align: center;
|
|
397
396
|
border-radius: var(--wpds-border-radius-lg);
|
|
398
397
|
font-size: 11px;
|
|
399
|
-
outline: var(--wpds-border-width-focus) solid var(--wpds-color-
|
|
400
|
-
color: var(--wpds-color-
|
|
398
|
+
outline: var(--wpds-border-width-focus) solid var(--wpds-color-background-surface-neutral-strong);
|
|
399
|
+
color: var(--wpds-color-foreground-interactive-neutral-strong);
|
|
401
400
|
box-sizing: border-box;
|
|
402
401
|
}
|
|
403
402
|
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
.dataviews-view-activity__group-header {
|
|
8
8
|
font-size: var(--wpds-typography-font-size-lg);
|
|
9
9
|
font-weight: var(--wpds-typography-font-weight-medium);
|
|
10
|
-
color: var(--wpds-color-
|
|
10
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
11
11
|
margin: 0 0 var(--wpds-dimension-gap-sm) 0;
|
|
12
12
|
padding: 0;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.dataviews-view-activity__item-actions {
|
|
16
|
-
min-width:
|
|
16
|
+
min-width: var(--wpds-dimension-size-sm);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.dataviews-view-activity__item-content {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
.dataviews-view-activity__item-title,
|
|
23
23
|
.dataviews-view-activity__item-description,
|
|
24
24
|
.dataviews-view-activity__item-fields {
|
|
25
|
-
min-height:
|
|
25
|
+
min-height: var(--wpds-dimension-size-2xs);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.dataviews-view-activity__item-title {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
cursor: var(--wpds-cursor-control);
|
|
37
37
|
|
|
38
38
|
&:focus-visible {
|
|
39
|
-
outline: var(--wp-admin-border-width-focus) solid var(--wpds-color-stroke-focus
|
|
39
|
+
outline: var(--wp-admin-border-width-focus) solid var(--wpds-color-stroke-focus);
|
|
40
40
|
outline-offset: var(--wp-admin-border-width-focus);
|
|
41
41
|
border-radius: var(--wpds-border-radius-sm);
|
|
42
42
|
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.dataviews-view-activity__item-fields {
|
|
58
|
-
color: var(--wpds-color-
|
|
58
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
59
59
|
display: flex;
|
|
60
60
|
gap: var(--wpds-dimension-gap-md);
|
|
61
61
|
row-gap: var(--wpds-dimension-gap-xs);
|
|
@@ -105,12 +105,12 @@
|
|
|
105
105
|
width: var(--wpds-dimension-padding-md);
|
|
106
106
|
|
|
107
107
|
&::before {
|
|
108
|
-
height:
|
|
108
|
+
height: var(--wpds-dimension-size-3xs);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
.dataviews-view-activity__item-type-icon {
|
|
112
|
-
width: calc(var(--wpds-dimension-
|
|
113
|
-
height: calc(var(--wpds-dimension-
|
|
112
|
+
width: calc(var(--wpds-dimension-size-3xs) - 1px);
|
|
113
|
+
height: calc(var(--wpds-dimension-size-3xs) - 1px);
|
|
114
114
|
}
|
|
115
115
|
.dataviews-view-activity__item-content {
|
|
116
116
|
margin: var(--wpds-dimension-gap-md) 0;
|
|
@@ -119,15 +119,15 @@
|
|
|
119
119
|
|
|
120
120
|
&.is-balanced {
|
|
121
121
|
.dataviews-view-activity__item-type {
|
|
122
|
-
width:
|
|
122
|
+
width: var(--wpds-dimension-size-sm);
|
|
123
123
|
|
|
124
124
|
&::before {
|
|
125
|
-
height:
|
|
125
|
+
height: var(--wpds-dimension-size-3xs);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
.dataviews-view-activity__item-type-icon {
|
|
129
|
-
width: calc(var(--wpds-dimension-
|
|
130
|
-
height: calc(var(--wpds-dimension-
|
|
129
|
+
width: calc(var(--wpds-dimension-size-sm) + 1px);
|
|
130
|
+
height: calc(var(--wpds-dimension-size-sm) + 1px);
|
|
131
131
|
}
|
|
132
132
|
.dataviews-view-activity__item-content {
|
|
133
133
|
margin: var(--wpds-dimension-gap-md) 0;
|
|
@@ -137,15 +137,15 @@
|
|
|
137
137
|
|
|
138
138
|
&.is-comfortable {
|
|
139
139
|
.dataviews-view-activity__item-type {
|
|
140
|
-
width:
|
|
140
|
+
width: var(--wpds-dimension-size-md);
|
|
141
141
|
|
|
142
142
|
&::before {
|
|
143
|
-
height:
|
|
143
|
+
height: var(--wpds-dimension-size-4xs);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
.dataviews-view-activity__item-type-icon {
|
|
147
|
-
width: calc(var(--wpds-dimension-
|
|
148
|
-
height: calc(var(--wpds-dimension-
|
|
147
|
+
width: calc(var(--wpds-dimension-size-md) + 1px);
|
|
148
|
+
height: calc(var(--wpds-dimension-size-md) + 1px);
|
|
149
149
|
}
|
|
150
150
|
.dataviews-view-activity__item-content {
|
|
151
151
|
margin: var(--wpds-dimension-gap-sm) 0 var(--wpds-dimension-gap-lg);
|
|
@@ -156,8 +156,8 @@
|
|
|
156
156
|
&.is-comfortable,
|
|
157
157
|
&.is-balanced {
|
|
158
158
|
.dataviews-view-activity__item-bullet {
|
|
159
|
-
width: calc(var(--wpds-dimension-
|
|
160
|
-
height: calc(var(--wpds-dimension-
|
|
159
|
+
width: calc(var(--wpds-dimension-size-4xs) + 1px);
|
|
160
|
+
height: calc(var(--wpds-dimension-size-4xs) + 1px);
|
|
161
161
|
position: relative;
|
|
162
162
|
top: 50%;
|
|
163
163
|
transform: translateY(-50%);
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
.dataviews-view-activity__item-type-icon {
|
|
186
186
|
overflow: hidden;
|
|
187
187
|
flex-shrink: 0;
|
|
188
|
-
background-color: var(--wpds-color-
|
|
188
|
+
background-color: var(--wpds-color-background-surface-neutral-strong);
|
|
189
189
|
|
|
190
190
|
img,
|
|
191
191
|
svg,
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
Composite,
|
|
14
14
|
privateApis as componentsPrivateApis,
|
|
15
15
|
} from '@wordpress/components';
|
|
16
|
-
// 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.
|
|
17
16
|
import { Stack, Tooltip } from '@wordpress/ui';
|
|
18
17
|
import { __, sprintf } from '@wordpress/i18n';
|
|
19
18
|
import { useInstanceId } from '@wordpress/compose';
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
left: 0;
|
|
45
45
|
width: 100%;
|
|
46
46
|
height: 100%;
|
|
47
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus
|
|
47
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus);
|
|
48
48
|
border-radius: var(--wpds-border-radius-md);
|
|
49
49
|
pointer-events: none;
|
|
50
50
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.dataviews-view-grid__title-field {
|
|
72
|
-
min-height:
|
|
72
|
+
min-height: var(--wpds-dimension-size-sm); // TODO: Preserve layout when there is no ellipsis button
|
|
73
73
|
overflow: hidden;
|
|
74
74
|
align-content: center;
|
|
75
75
|
text-align: start;
|
|
@@ -82,23 +82,23 @@
|
|
|
82
82
|
|
|
83
83
|
&.is-selected {
|
|
84
84
|
.dataviews-view-grid__fields .dataviews-view-grid__field .dataviews-view-grid__field-value {
|
|
85
|
-
color: var(--wpds-color-
|
|
85
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
&.is-selected .dataviews-view-grid__media::after {
|
|
89
89
|
box-shadow:
|
|
90
90
|
inset 0 0 0 var(--wpds-border-width-xs) var(--wpds-color-stroke-interactive-brand),
|
|
91
|
-
inset 0 0 0 var(--wpds-border-width-sm) var(--wpds-color-
|
|
91
|
+
inset 0 0 0 var(--wpds-border-width-sm) var(--wpds-color-background-surface-neutral-strong);
|
|
92
92
|
}
|
|
93
93
|
.dataviews-view-grid__media:focus::after {
|
|
94
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus
|
|
94
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.dataviews-view-grid__media {
|
|
99
99
|
width: 100%;
|
|
100
100
|
aspect-ratio: 1/1;
|
|
101
|
-
background-color: var(--wpds-color-
|
|
101
|
+
background-color: var(--wpds-color-background-surface-neutral-strong);
|
|
102
102
|
border-radius: var(--wpds-border-radius-md);
|
|
103
103
|
overflow: hidden;
|
|
104
104
|
position: relative;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
display: block;
|
|
132
132
|
border-radius: var(--wpds-border-radius-md);
|
|
133
133
|
box-shadow: none;
|
|
134
|
-
background: var(--wpds-color-
|
|
134
|
+
background: var(--wpds-color-background-surface-neutral);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
@@ -145,18 +145,24 @@
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
.dataviews-view-grid__field-value:not(:empty) {
|
|
148
|
-
min-height:
|
|
148
|
+
min-height: var(--wpds-dimension-size-sm);
|
|
149
149
|
line-height: var(--wpds-typography-line-height-sm);
|
|
150
|
-
|
|
150
|
+
// Top half of the slack between the row height and the line box,
|
|
151
|
+
// optically centering a single line within the row.
|
|
152
|
+
padding-top:
|
|
153
|
+
calc((
|
|
154
|
+
var(--wpds-dimension-size-sm) -
|
|
155
|
+
var(--wpds-typography-line-height-sm)
|
|
156
|
+
) / 2);
|
|
151
157
|
}
|
|
152
158
|
|
|
153
159
|
.dataviews-view-grid__field {
|
|
154
|
-
min-height:
|
|
160
|
+
min-height: var(--wpds-dimension-size-sm);
|
|
155
161
|
align-items: center;
|
|
156
162
|
|
|
157
163
|
.dataviews-view-grid__field-name {
|
|
158
164
|
width: 35%;
|
|
159
|
-
color: var(--wpds-color-
|
|
165
|
+
color: var(--wpds-color-foreground-content-neutral-weak);
|
|
160
166
|
overflow: hidden;
|
|
161
167
|
text-overflow: ellipsis;
|
|
162
168
|
white-space: nowrap;
|
|
@@ -225,7 +231,7 @@
|
|
|
225
231
|
right: var(--wpds-dimension-padding-xs);
|
|
226
232
|
|
|
227
233
|
.dataviews-all-actions-button {
|
|
228
|
-
background-color: var(--wpds-color-
|
|
234
|
+
background-color: var(--wpds-color-background-surface-neutral-strong);
|
|
229
235
|
}
|
|
230
236
|
|
|
231
237
|
@media not (prefers-reduced-motion) {
|
|
@@ -252,7 +258,7 @@
|
|
|
252
258
|
.dataviews-view-grid__group-header {
|
|
253
259
|
font-size: var(--wpds-typography-font-size-lg);
|
|
254
260
|
font-weight: var(--wpds-typography-font-weight-medium);
|
|
255
|
-
color: var(--wpds-color-
|
|
261
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
256
262
|
margin: 0 0 var(--wpds-dimension-gap-sm) 0;
|
|
257
263
|
padding: 0 var(--wpds-dimension-padding-2xl);
|
|
258
264
|
container-type: inline-size;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/variables" as vars;
|
|
2
1
|
@use "../../../dataviews/style" as *;
|
|
3
2
|
|
|
3
|
+
// Square media (thumbnail) size per density. The compact density uses the
|
|
4
|
+
// `--wpds-dimension-size-md` token; these larger densities have no matching
|
|
5
|
+
// token, so they're kept as local constants. The field wrapper reuses the
|
|
6
|
+
// same value as its `min-height` to keep the title centered against the media.
|
|
7
|
+
// TODO: Replace with `--wpds-dimension-size-*` tokens if 48px and 64px are
|
|
8
|
+
// added to the WPDS element size scale.
|
|
9
|
+
$media-size: 48px;
|
|
10
|
+
$media-size-comfortable: 64px;
|
|
11
|
+
|
|
4
12
|
div.dataviews-view-list {
|
|
5
13
|
list-style-type: none;
|
|
6
14
|
}
|
|
@@ -32,7 +40,7 @@ div.dataviews-view-list {
|
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
> div {
|
|
35
|
-
height:
|
|
43
|
+
height: var(--wpds-dimension-size-sm);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
> :not(:last-child) {
|
|
@@ -72,12 +80,12 @@ div.dataviews-view-list {
|
|
|
72
80
|
&:hover,
|
|
73
81
|
&.is-hovered,
|
|
74
82
|
&:focus-within {
|
|
75
|
-
color: var(--wpds-color-
|
|
76
|
-
background-color: var(--wpds-color-
|
|
83
|
+
color: var(--wpds-color-foreground-interactive-brand);
|
|
84
|
+
background-color: var(--wpds-color-background-interactive-brand-weak);
|
|
77
85
|
|
|
78
86
|
.dataviews-title-field,
|
|
79
87
|
.dataviews-view-list__field {
|
|
80
|
-
color: var(--wpds-color-
|
|
88
|
+
color: var(--wpds-color-foreground-interactive-brand);
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
}
|
|
@@ -89,12 +97,12 @@ div.dataviews-view-list {
|
|
|
89
97
|
div[role="article"].is-selected,
|
|
90
98
|
div[role="article"].is-selected:focus-within {
|
|
91
99
|
.dataviews-view-list__item-wrapper {
|
|
92
|
-
background-color: var(--wpds-color-
|
|
93
|
-
color: var(--wpds-color-
|
|
100
|
+
background-color: var(--wpds-color-background-interactive-brand-weak-active);
|
|
101
|
+
color: var(--wpds-color-foreground-interactive-neutral);
|
|
94
102
|
|
|
95
103
|
.dataviews-title-field,
|
|
96
104
|
.dataviews-view-list__field {
|
|
97
|
-
color: var(--wpds-color-
|
|
105
|
+
color: var(--wpds-color-foreground-interactive-neutral-active);
|
|
98
106
|
}
|
|
99
107
|
}
|
|
100
108
|
}
|
|
@@ -117,7 +125,7 @@ div.dataviews-view-list {
|
|
|
117
125
|
position: absolute;
|
|
118
126
|
content: "";
|
|
119
127
|
inset: var(--wp-admin-border-width-focus);
|
|
120
|
-
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus
|
|
128
|
+
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wpds-color-stroke-focus);
|
|
121
129
|
border-radius: var(--wpds-border-radius-sm);
|
|
122
130
|
// Windows High Contrast mode will show this outline, but not the box-shadow.
|
|
123
131
|
outline: 2px solid transparent;
|
|
@@ -126,7 +134,7 @@ div.dataviews-view-list {
|
|
|
126
134
|
}
|
|
127
135
|
.dataviews-view-list__title-field {
|
|
128
136
|
flex: 1;
|
|
129
|
-
min-height:
|
|
137
|
+
min-height: var(--wpds-dimension-size-sm);
|
|
130
138
|
line-height: var(--wpds-typography-line-height-md);
|
|
131
139
|
overflow: hidden;
|
|
132
140
|
// The field should be in front of the main button in case it has a link/button.
|
|
@@ -136,12 +144,12 @@ div.dataviews-view-list {
|
|
|
136
144
|
}
|
|
137
145
|
|
|
138
146
|
.dataviews-view-list__media-wrapper {
|
|
139
|
-
width:
|
|
140
|
-
height:
|
|
147
|
+
width: $media-size;
|
|
148
|
+
height: $media-size;
|
|
141
149
|
overflow: hidden;
|
|
142
150
|
position: relative;
|
|
143
151
|
flex-shrink: 0;
|
|
144
|
-
background-color: var(--wpds-color-
|
|
152
|
+
background-color: var(--wpds-color-background-surface-neutral-strong);
|
|
145
153
|
border-radius: var(--wpds-border-radius-md);
|
|
146
154
|
|
|
147
155
|
img {
|
|
@@ -163,13 +171,13 @@ div.dataviews-view-list {
|
|
|
163
171
|
}
|
|
164
172
|
|
|
165
173
|
.dataviews-view-list__field-wrapper {
|
|
166
|
-
min-height:
|
|
174
|
+
min-height: $media-size; // Ensures title is centrally aligned when all fields are hidden
|
|
167
175
|
flex-grow: 1;
|
|
168
176
|
min-width: 0;
|
|
169
177
|
}
|
|
170
178
|
|
|
171
179
|
.dataviews-view-list__field {
|
|
172
|
-
color: var(--wpds-color-
|
|
180
|
+
color: var(--wpds-color-foreground-interactive-neutral-weak);
|
|
173
181
|
}
|
|
174
182
|
|
|
175
183
|
.dataviews-view-list__fields {
|
|
@@ -190,7 +198,7 @@ div.dataviews-view-list {
|
|
|
190
198
|
}
|
|
191
199
|
|
|
192
200
|
.dataviews-view-list__field-value {
|
|
193
|
-
min-height:
|
|
201
|
+
min-height: var(--wpds-dimension-size-sm);
|
|
194
202
|
line-height: var(--wpds-typography-line-height-sm);
|
|
195
203
|
display: flex;
|
|
196
204
|
align-items: center;
|
|
@@ -209,17 +217,17 @@ div.dataviews-view-list {
|
|
|
209
217
|
}
|
|
210
218
|
|
|
211
219
|
.dataviews-view-list__title-field {
|
|
212
|
-
min-height:
|
|
220
|
+
min-height: var(--wpds-dimension-size-2xs);
|
|
213
221
|
line-height: var(--wpds-typography-line-height-xs);
|
|
214
222
|
}
|
|
215
223
|
|
|
216
224
|
.dataviews-view-list__media-wrapper {
|
|
217
|
-
width:
|
|
218
|
-
height:
|
|
225
|
+
width: var(--wpds-dimension-size-md);
|
|
226
|
+
height: var(--wpds-dimension-size-md);
|
|
219
227
|
}
|
|
220
228
|
|
|
221
229
|
.dataviews-view-list__field-wrapper {
|
|
222
|
-
min-height:
|
|
230
|
+
min-height: var(--wpds-dimension-size-md);
|
|
223
231
|
}
|
|
224
232
|
|
|
225
233
|
.dataviews-view-list__fields {
|
|
@@ -227,7 +235,7 @@ div.dataviews-view-list {
|
|
|
227
235
|
row-gap: var(--wpds-dimension-gap-xs);
|
|
228
236
|
|
|
229
237
|
.dataviews-view-list__field-value {
|
|
230
|
-
min-height:
|
|
238
|
+
min-height: var(--wpds-dimension-size-2xs);
|
|
231
239
|
line-height: var(--wpds-typography-line-height-xs);
|
|
232
240
|
}
|
|
233
241
|
}
|
|
@@ -241,17 +249,17 @@ div.dataviews-view-list {
|
|
|
241
249
|
}
|
|
242
250
|
|
|
243
251
|
.dataviews-view-list__title-field {
|
|
244
|
-
min-height:
|
|
252
|
+
min-height: var(--wpds-dimension-size-md);
|
|
245
253
|
line-height: var(--wpds-typography-line-height-xl);
|
|
246
254
|
}
|
|
247
255
|
|
|
248
256
|
.dataviews-view-list__media-wrapper {
|
|
249
|
-
width:
|
|
250
|
-
height:
|
|
257
|
+
width: $media-size-comfortable;
|
|
258
|
+
height: $media-size-comfortable;
|
|
251
259
|
}
|
|
252
260
|
|
|
253
261
|
.dataviews-view-list__field-wrapper {
|
|
254
|
-
min-height:
|
|
262
|
+
min-height: $media-size-comfortable;
|
|
255
263
|
}
|
|
256
264
|
|
|
257
265
|
.dataviews-view-list__fields {
|
|
@@ -259,7 +267,7 @@ div.dataviews-view-list {
|
|
|
259
267
|
row-gap: var(--wpds-dimension-gap-sm);
|
|
260
268
|
|
|
261
269
|
.dataviews-view-list__field-value {
|
|
262
|
-
min-height:
|
|
270
|
+
min-height: var(--wpds-dimension-size-md);
|
|
263
271
|
line-height: var(--wpds-typography-line-height-md);
|
|
264
272
|
}
|
|
265
273
|
}
|
|
@@ -274,7 +282,7 @@ div.dataviews-view-list {
|
|
|
274
282
|
.dataviews-view-list__group-header {
|
|
275
283
|
font-size: var(--wpds-typography-font-size-lg);
|
|
276
284
|
font-weight: var(--wpds-typography-font-weight-medium);
|
|
277
|
-
color: var(--wpds-color-
|
|
285
|
+
color: var(--wpds-color-foreground-content-neutral);
|
|
278
286
|
margin: 0 0 var(--wpds-dimension-gap-sm) 0;
|
|
279
287
|
padding: 0 var(--wpds-dimension-padding-2xl);
|
|
280
288
|
}
|