@wordpress/dataviews 0.6.0 → 0.8.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 +9 -0
- package/README.md +48 -15
- package/build/add-filter.js +0 -2
- package/build/add-filter.js.map +1 -1
- package/build/bulk-actions.js +41 -3
- package/build/bulk-actions.js.map +1 -1
- package/build/constants.js +28 -7
- package/build/constants.js.map +1 -1
- package/build/dataviews.js +34 -21
- package/build/dataviews.js.map +1 -1
- package/build/filter-summary.js +33 -12
- package/build/filter-summary.js.map +1 -1
- package/build/filters.js +10 -2
- package/build/filters.js.map +1 -1
- package/build/item-actions.js +20 -39
- package/build/item-actions.js.map +1 -1
- package/build/pagination.js +4 -3
- package/build/pagination.js.map +1 -1
- package/build/reset-filters.js +2 -1
- package/build/reset-filters.js.map +1 -1
- package/build/search-widget.js +117 -8
- package/build/search-widget.js.map +1 -1
- package/build/single-selection-checkbox.js +7 -2
- package/build/single-selection-checkbox.js.map +1 -1
- package/build/utils.js +24 -2
- package/build/utils.js.map +1 -1
- package/build/view-actions.js.map +1 -1
- package/build/view-grid.js +12 -13
- package/build/view-grid.js.map +1 -1
- package/build/view-list.js +1 -1
- package/build/view-list.js.map +1 -1
- package/build/view-table.js +111 -47
- package/build/view-table.js.map +1 -1
- package/build-module/add-filter.js +0 -2
- package/build-module/add-filter.js.map +1 -1
- package/build-module/bulk-actions.js +40 -4
- package/build-module/bulk-actions.js.map +1 -1
- package/build-module/constants.js +27 -6
- package/build-module/constants.js.map +1 -1
- package/build-module/dataviews.js +35 -22
- package/build-module/dataviews.js.map +1 -1
- package/build-module/filter-summary.js +34 -13
- package/build-module/filter-summary.js.map +1 -1
- package/build-module/filters.js +11 -3
- package/build-module/filters.js.map +1 -1
- package/build-module/item-actions.js +20 -39
- package/build-module/item-actions.js.map +1 -1
- package/build-module/pagination.js +4 -3
- package/build-module/pagination.js.map +1 -1
- package/build-module/reset-filters.js +2 -1
- package/build-module/reset-filters.js.map +1 -1
- package/build-module/search-widget.js +120 -11
- package/build-module/search-widget.js.map +1 -1
- package/build-module/single-selection-checkbox.js +7 -2
- package/build-module/single-selection-checkbox.js.map +1 -1
- package/build-module/utils.js +25 -3
- package/build-module/utils.js.map +1 -1
- package/build-module/view-actions.js.map +1 -1
- package/build-module/view-grid.js +13 -14
- package/build-module/view-grid.js.map +1 -1
- package/build-module/view-list.js +2 -2
- package/build-module/view-list.js.map +1 -1
- package/build-module/view-table.js +113 -49
- package/build-module/view-table.js.map +1 -1
- package/build-style/style-rtl.css +76 -46
- package/build-style/style.css +76 -46
- package/package.json +11 -11
- package/src/add-filter.js +0 -2
- package/src/bulk-actions.js +54 -4
- package/src/constants.js +35 -6
- package/src/dataviews.js +66 -49
- package/src/filter-summary.js +76 -23
- package/src/filters.js +16 -5
- package/src/item-actions.js +19 -55
- package/src/pagination.js +8 -3
- package/src/reset-filters.js +2 -1
- package/src/search-widget.js +182 -15
- package/src/single-selection-checkbox.js +7 -1
- package/src/stories/fixtures.js +12 -1
- package/src/stories/index.story.js +43 -4
- package/src/style.scss +108 -73
- package/src/utils.js +38 -4
- package/src/view-actions.js +1 -1
- package/src/view-grid.js +13 -12
- package/src/view-list.js +2 -1
- package/src/view-table.js +162 -81
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
--wp-admin-border-width-focus: 2px;
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
|
+
--wp-bound-block-color: #9747ff;
|
|
99
100
|
}
|
|
100
101
|
@media (min-resolution: 192dpi) {
|
|
101
102
|
:root {
|
|
@@ -104,32 +105,32 @@
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
.dataviews-wrapper {
|
|
107
|
-
width: 100%;
|
|
108
108
|
height: 100%;
|
|
109
109
|
overflow: auto;
|
|
110
110
|
box-sizing: border-box;
|
|
111
111
|
scroll-padding-bottom: 64px;
|
|
112
112
|
}
|
|
113
|
-
.dataviews-wrapper > div {
|
|
114
|
-
min-height: 100%;
|
|
115
|
-
}
|
|
116
113
|
|
|
117
114
|
.dataviews-filters__view-actions {
|
|
115
|
+
box-sizing: border-box;
|
|
118
116
|
padding: 12px 32px 0;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
margin-bottom: 12px;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
position: sticky;
|
|
120
|
+
right: 0;
|
|
122
121
|
}
|
|
123
122
|
.dataviews-filters__view-actions .components-search-control .components-base-control__field {
|
|
124
123
|
max-width: 240px;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
.dataviews-filters__container {
|
|
128
|
-
padding:
|
|
127
|
+
padding-left: 32px;
|
|
129
128
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
.dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true], .dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true]:hover {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
.dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true]:focus {
|
|
133
|
+
opacity: 1;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
.dataviews-filters-button {
|
|
@@ -137,23 +138,25 @@
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
.dataviews-pagination {
|
|
140
|
-
margin-top: auto;
|
|
141
141
|
position: sticky;
|
|
142
142
|
bottom: 0;
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
backdrop-filter: blur(6px);
|
|
143
|
+
right: 0;
|
|
144
|
+
background-color: #fff;
|
|
146
145
|
padding: 12px 32px;
|
|
147
146
|
border-top: 1px solid #f0f0f0;
|
|
148
147
|
color: #757575;
|
|
148
|
+
flex-shrink: 0;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
.dataviews-
|
|
152
|
-
|
|
151
|
+
.dataviews-pagination__page-selection {
|
|
152
|
+
font-size: 11px;
|
|
153
|
+
text-transform: uppercase;
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
color: #1e1e1e;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
|
-
.dataviews-
|
|
156
|
-
|
|
158
|
+
.dataviews-filters-options {
|
|
159
|
+
margin: 32px 0 16px;
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
.dataviews-view-table {
|
|
@@ -215,16 +218,22 @@
|
|
|
215
218
|
.dataviews-view-table tr:last-child {
|
|
216
219
|
border-bottom: 0;
|
|
217
220
|
}
|
|
218
|
-
.dataviews-view-table tr
|
|
221
|
+
.dataviews-view-table tr.is-hovered {
|
|
219
222
|
background-color: #f8f8f8;
|
|
220
223
|
}
|
|
221
|
-
.dataviews-view-table tr .components-checkbox-control__input {
|
|
224
|
+
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input {
|
|
222
225
|
opacity: 0;
|
|
223
226
|
}
|
|
224
|
-
.dataviews-view-table tr .components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input:focus {
|
|
227
|
+
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus {
|
|
225
228
|
opacity: 1;
|
|
226
229
|
}
|
|
227
|
-
.dataviews-view-table tr
|
|
230
|
+
.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
|
|
231
|
+
opacity: 0;
|
|
232
|
+
}
|
|
233
|
+
.dataviews-view-table tr:focus-within .components-checkbox-control__input,
|
|
234
|
+
.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button), .dataviews-view-table tr.is-hovered .components-checkbox-control__input,
|
|
235
|
+
.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button), .dataviews-view-table tr:hover .components-checkbox-control__input,
|
|
236
|
+
.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
|
|
228
237
|
opacity: 1;
|
|
229
238
|
}
|
|
230
239
|
.dataviews-view-table tr.is-selected {
|
|
@@ -234,17 +243,19 @@
|
|
|
234
243
|
.dataviews-view-table tr.is-selected:hover {
|
|
235
244
|
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
236
245
|
}
|
|
246
|
+
.dataviews-view-table thead {
|
|
247
|
+
position: sticky;
|
|
248
|
+
inset-block-start: 0;
|
|
249
|
+
z-index: 1;
|
|
250
|
+
}
|
|
237
251
|
.dataviews-view-table thead tr {
|
|
238
252
|
border: 0;
|
|
239
253
|
}
|
|
240
254
|
.dataviews-view-table thead th {
|
|
241
|
-
position: sticky;
|
|
242
|
-
top: -1px;
|
|
243
255
|
background-color: #fff;
|
|
244
256
|
box-shadow: inset 0 -1px 0 #f0f0f0;
|
|
245
257
|
padding-top: 8px;
|
|
246
258
|
padding-bottom: 8px;
|
|
247
|
-
z-index: 1;
|
|
248
259
|
font-size: 11px;
|
|
249
260
|
text-transform: uppercase;
|
|
250
261
|
font-weight: 500;
|
|
@@ -282,6 +293,9 @@
|
|
|
282
293
|
.dataviews-view-table .dataviews-view-table__actions-column {
|
|
283
294
|
width: 1%;
|
|
284
295
|
}
|
|
296
|
+
.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
|
|
297
|
+
opacity: 1;
|
|
298
|
+
}
|
|
285
299
|
|
|
286
300
|
.dataviews-view-list__primary-field,
|
|
287
301
|
.dataviews-view-grid__primary-field,
|
|
@@ -291,7 +305,6 @@
|
|
|
291
305
|
color: #1e1e1e;
|
|
292
306
|
text-overflow: ellipsis;
|
|
293
307
|
white-space: nowrap;
|
|
294
|
-
overflow: hidden;
|
|
295
308
|
display: block;
|
|
296
309
|
width: 100%;
|
|
297
310
|
}
|
|
@@ -311,6 +324,13 @@
|
|
|
311
324
|
.dataviews-view-table__primary-field a:hover {
|
|
312
325
|
color: #1e1e1e;
|
|
313
326
|
}
|
|
327
|
+
.dataviews-view-list__primary-field a:focus,
|
|
328
|
+
.dataviews-view-grid__primary-field a:focus,
|
|
329
|
+
.dataviews-view-table__primary-field a:focus {
|
|
330
|
+
color: var(--wp-admin-theme-color--rgb);
|
|
331
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba);
|
|
332
|
+
border-radius: 2px;
|
|
333
|
+
}
|
|
314
334
|
.dataviews-view-list__primary-field button.components-button.is-link,
|
|
315
335
|
.dataviews-view-grid__primary-field button.components-button.is-link,
|
|
316
336
|
.dataviews-view-table__primary-field button.components-button.is-link {
|
|
@@ -512,6 +532,10 @@
|
|
|
512
532
|
.dataviews-no-results,
|
|
513
533
|
.dataviews-loading {
|
|
514
534
|
padding: 0 32px;
|
|
535
|
+
flex-grow: 1;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
515
539
|
}
|
|
516
540
|
|
|
517
541
|
.dataviews-view-table-selection-checkbox label {
|
|
@@ -539,10 +563,6 @@
|
|
|
539
563
|
margin-right: 8px;
|
|
540
564
|
}
|
|
541
565
|
|
|
542
|
-
.dataviews-view-grid__card.has-no-pointer-events * {
|
|
543
|
-
pointer-events: none;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
566
|
.dataviews-filter-summary__popover .components-popover__content {
|
|
547
567
|
width: 230px;
|
|
548
568
|
padding: 0;
|
|
@@ -555,7 +575,17 @@
|
|
|
555
575
|
overflow: auto;
|
|
556
576
|
border-top: 1px solid #e0e0e0;
|
|
557
577
|
}
|
|
558
|
-
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item {
|
|
578
|
+
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item-value [data-user-value] {
|
|
579
|
+
font-weight: 600;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.dataviews-search-widget-listbox {
|
|
583
|
+
max-height: 184px;
|
|
584
|
+
padding: 4px;
|
|
585
|
+
overflow: auto;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.dataviews-search-widget-listitem {
|
|
559
589
|
display: flex;
|
|
560
590
|
align-items: center;
|
|
561
591
|
gap: 8px;
|
|
@@ -565,28 +595,25 @@
|
|
|
565
595
|
cursor: default;
|
|
566
596
|
margin-block-end: 2px;
|
|
567
597
|
}
|
|
568
|
-
.dataviews-search-widget-
|
|
598
|
+
.dataviews-search-widget-listitem:last-child {
|
|
569
599
|
margin-block-end: 0;
|
|
570
600
|
}
|
|
571
|
-
.dataviews-search-widget-
|
|
601
|
+
.dataviews-search-widget-listitem:hover, .dataviews-search-widget-listitem[data-active-item], .dataviews-search-widget-listitem:focus {
|
|
572
602
|
background-color: var(--wp-admin-theme-color);
|
|
573
603
|
color: #fff;
|
|
574
604
|
}
|
|
575
|
-
.dataviews-search-widget-
|
|
605
|
+
.dataviews-search-widget-listitem:hover .dataviews-search-widget-listitem-check, .dataviews-search-widget-listitem[data-active-item] .dataviews-search-widget-listitem-check, .dataviews-search-widget-listitem:focus .dataviews-search-widget-listitem-check {
|
|
576
606
|
fill: #fff;
|
|
577
607
|
}
|
|
578
|
-
.dataviews-search-widget-
|
|
608
|
+
.dataviews-search-widget-listitem:hover .dataviews-search-widget-listitem-description, .dataviews-search-widget-listitem[data-active-item] .dataviews-search-widget-listitem-description, .dataviews-search-widget-listitem:focus .dataviews-search-widget-listitem-description {
|
|
579
609
|
color: #fff;
|
|
580
610
|
}
|
|
581
|
-
.dataviews-search-widget-
|
|
611
|
+
.dataviews-search-widget-listitem .dataviews-search-widget-listitem-check {
|
|
582
612
|
width: 24px;
|
|
583
613
|
height: 24px;
|
|
584
614
|
flex-shrink: 0;
|
|
585
615
|
}
|
|
586
|
-
.dataviews-search-widget-
|
|
587
|
-
font-weight: 600;
|
|
588
|
-
}
|
|
589
|
-
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item .dataviews-search-widget-filter-combobox-item-description {
|
|
616
|
+
.dataviews-search-widget-listitem .dataviews-search-widget-listitem-description {
|
|
590
617
|
display: block;
|
|
591
618
|
overflow: hidden;
|
|
592
619
|
text-overflow: ellipsis;
|
|
@@ -676,8 +703,11 @@
|
|
|
676
703
|
}
|
|
677
704
|
|
|
678
705
|
.dataviews-filter-summary__operators-container {
|
|
679
|
-
padding: 8px 8px
|
|
680
|
-
|
|
706
|
+
padding: 8px 8px 0;
|
|
707
|
+
}
|
|
708
|
+
.dataviews-filter-summary__operators-container:has(+ .dataviews-search-widget-listbox) {
|
|
709
|
+
border-bottom: 1px solid #e0e0e0;
|
|
710
|
+
padding-bottom: 8px;
|
|
681
711
|
}
|
|
682
712
|
.dataviews-filter-summary__operators-container:empty {
|
|
683
713
|
display: none;
|
|
@@ -705,7 +735,7 @@
|
|
|
705
735
|
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset {
|
|
706
736
|
padding-inline-end: 28px;
|
|
707
737
|
}
|
|
708
|
-
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
|
|
738
|
+
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true] {
|
|
709
739
|
background: #e0e0e0;
|
|
710
740
|
color: #1e1e1e;
|
|
711
741
|
}
|
|
@@ -713,8 +743,8 @@
|
|
|
713
743
|
color: var(--wp-admin-theme-color);
|
|
714
744
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
715
745
|
}
|
|
716
|
-
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover {
|
|
717
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.
|
|
746
|
+
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true] {
|
|
747
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.12);
|
|
718
748
|
}
|
|
719
749
|
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
|
|
720
750
|
outline: none;
|
package/build-style/style.css
CHANGED
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
--wp-admin-border-width-focus: 2px;
|
|
97
97
|
--wp-block-synced-color: #7a00df;
|
|
98
98
|
--wp-block-synced-color--rgb: 122, 0, 223;
|
|
99
|
+
--wp-bound-block-color: #9747ff;
|
|
99
100
|
}
|
|
100
101
|
@media (min-resolution: 192dpi) {
|
|
101
102
|
:root {
|
|
@@ -104,32 +105,32 @@
|
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
.dataviews-wrapper {
|
|
107
|
-
width: 100%;
|
|
108
108
|
height: 100%;
|
|
109
109
|
overflow: auto;
|
|
110
110
|
box-sizing: border-box;
|
|
111
111
|
scroll-padding-bottom: 64px;
|
|
112
112
|
}
|
|
113
|
-
.dataviews-wrapper > div {
|
|
114
|
-
min-height: 100%;
|
|
115
|
-
}
|
|
116
113
|
|
|
117
114
|
.dataviews-filters__view-actions {
|
|
115
|
+
box-sizing: border-box;
|
|
118
116
|
padding: 12px 32px 0;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
margin-bottom: 12px;
|
|
118
|
+
flex-shrink: 0;
|
|
119
|
+
position: sticky;
|
|
120
|
+
left: 0;
|
|
122
121
|
}
|
|
123
122
|
.dataviews-filters__view-actions .components-search-control .components-base-control__field {
|
|
124
123
|
max-width: 240px;
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
.dataviews-filters__container {
|
|
128
|
-
padding:
|
|
127
|
+
padding-right: 32px;
|
|
129
128
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
129
|
+
.dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true], .dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true]:hover {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
}
|
|
132
|
+
.dataviews-filters__container .dataviews-filters__reset-button[aria-disabled=true]:focus {
|
|
133
|
+
opacity: 1;
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
.dataviews-filters-button {
|
|
@@ -137,23 +138,25 @@
|
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
.dataviews-pagination {
|
|
140
|
-
margin-top: auto;
|
|
141
141
|
position: sticky;
|
|
142
142
|
bottom: 0;
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
backdrop-filter: blur(6px);
|
|
143
|
+
left: 0;
|
|
144
|
+
background-color: #fff;
|
|
146
145
|
padding: 12px 32px;
|
|
147
146
|
border-top: 1px solid #f0f0f0;
|
|
148
147
|
color: #757575;
|
|
148
|
+
flex-shrink: 0;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
.dataviews-
|
|
152
|
-
|
|
151
|
+
.dataviews-pagination__page-selection {
|
|
152
|
+
font-size: 11px;
|
|
153
|
+
text-transform: uppercase;
|
|
154
|
+
font-weight: 500;
|
|
155
|
+
color: #1e1e1e;
|
|
153
156
|
}
|
|
154
157
|
|
|
155
|
-
.dataviews-
|
|
156
|
-
|
|
158
|
+
.dataviews-filters-options {
|
|
159
|
+
margin: 32px 0 16px;
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
.dataviews-view-table {
|
|
@@ -215,16 +218,22 @@
|
|
|
215
218
|
.dataviews-view-table tr:last-child {
|
|
216
219
|
border-bottom: 0;
|
|
217
220
|
}
|
|
218
|
-
.dataviews-view-table tr
|
|
221
|
+
.dataviews-view-table tr.is-hovered {
|
|
219
222
|
background-color: #f8f8f8;
|
|
220
223
|
}
|
|
221
|
-
.dataviews-view-table tr .components-checkbox-control__input {
|
|
224
|
+
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input {
|
|
222
225
|
opacity: 0;
|
|
223
226
|
}
|
|
224
|
-
.dataviews-view-table tr .components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input:focus {
|
|
227
|
+
.dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:checked, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:indeterminate, .dataviews-view-table tr .components-checkbox-control__input.components-checkbox-control__input:focus {
|
|
225
228
|
opacity: 1;
|
|
226
229
|
}
|
|
227
|
-
.dataviews-view-table tr
|
|
230
|
+
.dataviews-view-table tr .dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
|
|
231
|
+
opacity: 0;
|
|
232
|
+
}
|
|
233
|
+
.dataviews-view-table tr:focus-within .components-checkbox-control__input,
|
|
234
|
+
.dataviews-view-table tr:focus-within .dataviews-item-actions .components-button:not(.dataviews-all-actions-button), .dataviews-view-table tr.is-hovered .components-checkbox-control__input,
|
|
235
|
+
.dataviews-view-table tr.is-hovered .dataviews-item-actions .components-button:not(.dataviews-all-actions-button), .dataviews-view-table tr:hover .components-checkbox-control__input,
|
|
236
|
+
.dataviews-view-table tr:hover .dataviews-item-actions .components-button:not(.dataviews-all-actions-button) {
|
|
228
237
|
opacity: 1;
|
|
229
238
|
}
|
|
230
239
|
.dataviews-view-table tr.is-selected {
|
|
@@ -234,17 +243,19 @@
|
|
|
234
243
|
.dataviews-view-table tr.is-selected:hover {
|
|
235
244
|
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
236
245
|
}
|
|
246
|
+
.dataviews-view-table thead {
|
|
247
|
+
position: sticky;
|
|
248
|
+
inset-block-start: 0;
|
|
249
|
+
z-index: 1;
|
|
250
|
+
}
|
|
237
251
|
.dataviews-view-table thead tr {
|
|
238
252
|
border: 0;
|
|
239
253
|
}
|
|
240
254
|
.dataviews-view-table thead th {
|
|
241
|
-
position: sticky;
|
|
242
|
-
top: -1px;
|
|
243
255
|
background-color: #fff;
|
|
244
256
|
box-shadow: inset 0 -1px 0 #f0f0f0;
|
|
245
257
|
padding-top: 8px;
|
|
246
258
|
padding-bottom: 8px;
|
|
247
|
-
z-index: 1;
|
|
248
259
|
font-size: 11px;
|
|
249
260
|
text-transform: uppercase;
|
|
250
261
|
font-weight: 500;
|
|
@@ -282,6 +293,9 @@
|
|
|
282
293
|
.dataviews-view-table .dataviews-view-table__actions-column {
|
|
283
294
|
width: 1%;
|
|
284
295
|
}
|
|
296
|
+
.dataviews-view-table:has(tr.is-selected) .components-checkbox-control__input {
|
|
297
|
+
opacity: 1;
|
|
298
|
+
}
|
|
285
299
|
|
|
286
300
|
.dataviews-view-list__primary-field,
|
|
287
301
|
.dataviews-view-grid__primary-field,
|
|
@@ -291,7 +305,6 @@
|
|
|
291
305
|
color: #1e1e1e;
|
|
292
306
|
text-overflow: ellipsis;
|
|
293
307
|
white-space: nowrap;
|
|
294
|
-
overflow: hidden;
|
|
295
308
|
display: block;
|
|
296
309
|
width: 100%;
|
|
297
310
|
}
|
|
@@ -311,6 +324,13 @@
|
|
|
311
324
|
.dataviews-view-table__primary-field a:hover {
|
|
312
325
|
color: #1e1e1e;
|
|
313
326
|
}
|
|
327
|
+
.dataviews-view-list__primary-field a:focus,
|
|
328
|
+
.dataviews-view-grid__primary-field a:focus,
|
|
329
|
+
.dataviews-view-table__primary-field a:focus {
|
|
330
|
+
color: var(--wp-admin-theme-color--rgb);
|
|
331
|
+
box-shadow: 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color, #007cba);
|
|
332
|
+
border-radius: 2px;
|
|
333
|
+
}
|
|
314
334
|
.dataviews-view-list__primary-field button.components-button.is-link,
|
|
315
335
|
.dataviews-view-grid__primary-field button.components-button.is-link,
|
|
316
336
|
.dataviews-view-table__primary-field button.components-button.is-link {
|
|
@@ -512,6 +532,10 @@
|
|
|
512
532
|
.dataviews-no-results,
|
|
513
533
|
.dataviews-loading {
|
|
514
534
|
padding: 0 32px;
|
|
535
|
+
flex-grow: 1;
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
515
539
|
}
|
|
516
540
|
|
|
517
541
|
.dataviews-view-table-selection-checkbox label {
|
|
@@ -539,10 +563,6 @@
|
|
|
539
563
|
margin-left: 8px;
|
|
540
564
|
}
|
|
541
565
|
|
|
542
|
-
.dataviews-view-grid__card.has-no-pointer-events * {
|
|
543
|
-
pointer-events: none;
|
|
544
|
-
}
|
|
545
|
-
|
|
546
566
|
.dataviews-filter-summary__popover .components-popover__content {
|
|
547
567
|
width: 230px;
|
|
548
568
|
padding: 0;
|
|
@@ -555,7 +575,17 @@
|
|
|
555
575
|
overflow: auto;
|
|
556
576
|
border-top: 1px solid #e0e0e0;
|
|
557
577
|
}
|
|
558
|
-
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item {
|
|
578
|
+
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item-value [data-user-value] {
|
|
579
|
+
font-weight: 600;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.dataviews-search-widget-listbox {
|
|
583
|
+
max-height: 184px;
|
|
584
|
+
padding: 4px;
|
|
585
|
+
overflow: auto;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.dataviews-search-widget-listitem {
|
|
559
589
|
display: flex;
|
|
560
590
|
align-items: center;
|
|
561
591
|
gap: 8px;
|
|
@@ -565,28 +595,25 @@
|
|
|
565
595
|
cursor: default;
|
|
566
596
|
margin-block-end: 2px;
|
|
567
597
|
}
|
|
568
|
-
.dataviews-search-widget-
|
|
598
|
+
.dataviews-search-widget-listitem:last-child {
|
|
569
599
|
margin-block-end: 0;
|
|
570
600
|
}
|
|
571
|
-
.dataviews-search-widget-
|
|
601
|
+
.dataviews-search-widget-listitem:hover, .dataviews-search-widget-listitem[data-active-item], .dataviews-search-widget-listitem:focus {
|
|
572
602
|
background-color: var(--wp-admin-theme-color);
|
|
573
603
|
color: #fff;
|
|
574
604
|
}
|
|
575
|
-
.dataviews-search-widget-
|
|
605
|
+
.dataviews-search-widget-listitem:hover .dataviews-search-widget-listitem-check, .dataviews-search-widget-listitem[data-active-item] .dataviews-search-widget-listitem-check, .dataviews-search-widget-listitem:focus .dataviews-search-widget-listitem-check {
|
|
576
606
|
fill: #fff;
|
|
577
607
|
}
|
|
578
|
-
.dataviews-search-widget-
|
|
608
|
+
.dataviews-search-widget-listitem:hover .dataviews-search-widget-listitem-description, .dataviews-search-widget-listitem[data-active-item] .dataviews-search-widget-listitem-description, .dataviews-search-widget-listitem:focus .dataviews-search-widget-listitem-description {
|
|
579
609
|
color: #fff;
|
|
580
610
|
}
|
|
581
|
-
.dataviews-search-widget-
|
|
611
|
+
.dataviews-search-widget-listitem .dataviews-search-widget-listitem-check {
|
|
582
612
|
width: 24px;
|
|
583
613
|
height: 24px;
|
|
584
614
|
flex-shrink: 0;
|
|
585
615
|
}
|
|
586
|
-
.dataviews-search-widget-
|
|
587
|
-
font-weight: 600;
|
|
588
|
-
}
|
|
589
|
-
.dataviews-search-widget-filter-combobox-list .dataviews-search-widget-filter-combobox-item .dataviews-search-widget-filter-combobox-item-description {
|
|
616
|
+
.dataviews-search-widget-listitem .dataviews-search-widget-listitem-description {
|
|
590
617
|
display: block;
|
|
591
618
|
overflow: hidden;
|
|
592
619
|
text-overflow: ellipsis;
|
|
@@ -676,8 +703,11 @@
|
|
|
676
703
|
}
|
|
677
704
|
|
|
678
705
|
.dataviews-filter-summary__operators-container {
|
|
679
|
-
padding: 8px 8px
|
|
680
|
-
|
|
706
|
+
padding: 8px 8px 0;
|
|
707
|
+
}
|
|
708
|
+
.dataviews-filter-summary__operators-container:has(+ .dataviews-search-widget-listbox) {
|
|
709
|
+
border-bottom: 1px solid #e0e0e0;
|
|
710
|
+
padding-bottom: 8px;
|
|
681
711
|
}
|
|
682
712
|
.dataviews-filter-summary__operators-container:empty {
|
|
683
713
|
display: none;
|
|
@@ -705,7 +735,7 @@
|
|
|
705
735
|
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-reset {
|
|
706
736
|
padding-inline-end: 28px;
|
|
707
737
|
}
|
|
708
|
-
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
|
|
738
|
+
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip[aria-expanded=true] {
|
|
709
739
|
background: #e0e0e0;
|
|
710
740
|
color: #1e1e1e;
|
|
711
741
|
}
|
|
@@ -713,8 +743,8 @@
|
|
|
713
743
|
color: var(--wp-admin-theme-color);
|
|
714
744
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
715
745
|
}
|
|
716
|
-
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover {
|
|
717
|
-
background: rgba(var(--wp-admin-theme-color--rgb), 0.
|
|
746
|
+
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values:hover, .dataviews-filter-summary__chip-container .dataviews-filter-summary__chip.has-values[aria-expanded=true] {
|
|
747
|
+
background: rgba(var(--wp-admin-theme-color--rgb), 0.12);
|
|
718
748
|
}
|
|
719
749
|
.dataviews-filter-summary__chip-container .dataviews-filter-summary__chip:focus-visible {
|
|
720
750
|
outline: none;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/dataviews",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.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",
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ariakit/react": "^0.3.12",
|
|
31
31
|
"@babel/runtime": "^7.16.0",
|
|
32
|
-
"@wordpress/a11y": "^3.
|
|
33
|
-
"@wordpress/components": "^27.
|
|
34
|
-
"@wordpress/compose": "^6.
|
|
35
|
-
"@wordpress/element": "^5.
|
|
36
|
-
"@wordpress/i18n": "^4.
|
|
37
|
-
"@wordpress/icons": "^9.
|
|
38
|
-
"@wordpress/keycodes": "^3.
|
|
39
|
-
"@wordpress/primitives": "^3.
|
|
40
|
-
"@wordpress/private-apis": "^0.
|
|
32
|
+
"@wordpress/a11y": "^3.54.0",
|
|
33
|
+
"@wordpress/components": "^27.2.0",
|
|
34
|
+
"@wordpress/compose": "^6.31.0",
|
|
35
|
+
"@wordpress/element": "^5.31.0",
|
|
36
|
+
"@wordpress/i18n": "^4.54.0",
|
|
37
|
+
"@wordpress/icons": "^9.45.0",
|
|
38
|
+
"@wordpress/keycodes": "^3.54.0",
|
|
39
|
+
"@wordpress/primitives": "^3.52.0",
|
|
40
|
+
"@wordpress/private-apis": "^0.36.0",
|
|
41
41
|
"classnames": "^2.3.1",
|
|
42
42
|
"remove-accents": "^0.5.0"
|
|
43
43
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "ffc07735d0abfb3f69e91d48f25b7fe8d1ef92d2"
|
|
51
51
|
}
|
package/src/add-filter.js
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
privateApis as componentsPrivateApis,
|
|
6
6
|
Button,
|
|
7
7
|
} from '@wordpress/components';
|
|
8
|
-
import { plus } from '@wordpress/icons';
|
|
9
8
|
import { __ } from '@wordpress/i18n';
|
|
10
9
|
import { forwardRef } from '@wordpress/element';
|
|
11
10
|
|
|
@@ -31,7 +30,6 @@ function AddFilter( { filters, view, onChangeView, setOpenedFilter }, ref ) {
|
|
|
31
30
|
<Button
|
|
32
31
|
__experimentalIsFocusable
|
|
33
32
|
size="compact"
|
|
34
|
-
icon={ plus }
|
|
35
33
|
className="dataviews-filters-button"
|
|
36
34
|
variant="tertiary"
|
|
37
35
|
disabled={ ! inactiveFilters.length }
|