@zeyos/zx 2.1.0 → 2.2.1
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 +51 -0
- package/README.md +15 -0
- package/dist/types/compat/base.d.ts +156 -0
- package/dist/types/compat/globals.d.ts +20 -0
- package/dist/types/compat/index.d.ts +128 -0
- package/dist/types/compat/map/basic.d.ts +175 -0
- package/dist/types/compat/map/data.d.ts +102 -0
- package/dist/types/compat/map/date-time.d.ts +80 -0
- package/dist/types/compat/map/factory.d.ts +9 -0
- package/dist/types/compat/map/form.d.ts +98 -0
- package/dist/types/compat/map/helpers.d.ts +12 -0
- package/dist/types/compat/map/http.d.ts +36 -0
- package/dist/types/compat/map/layout.d.ts +106 -0
- package/dist/types/compat/map/options.d.ts +80 -0
- package/dist/types/compat/map/select.d.ts +95 -0
- package/dist/types/compat/map/stubs.d.ts +32 -0
- package/dist/types/compat/map/utilities.d.ts +37 -0
- package/dist/types/compat-entry.d.ts +5 -0
- package/dist/types/components/badge/badge.d.ts +46 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +200 -0
- package/dist/types/components/button/button.d.ts +42 -0
- package/dist/types/components/check-button/check-button.d.ts +98 -0
- package/dist/types/components/checklist/checklist.d.ts +143 -0
- package/dist/types/components/checklist/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +130 -0
- package/dist/types/components/copy/copy-button.d.ts +48 -0
- package/dist/types/components/copy/copy-input.d.ts +91 -0
- package/dist/types/components/data-filter/data-filter.d.ts +250 -0
- package/dist/types/components/data-filter/filter-core.d.ts +52 -0
- package/dist/types/components/date-picker/date-picker.d.ts +137 -0
- package/dist/types/components/date-picker/date-range-picker.d.ts +350 -0
- package/dist/types/components/date-picker/field-adapter.d.ts +6 -0
- package/dist/types/components/date-picker/month-picker.d.ts +75 -0
- package/dist/types/components/date-picker/range-field-adapter.d.ts +7 -0
- package/dist/types/components/date-picker/time-picker.d.ts +127 -0
- package/dist/types/components/datebox/date-range-box.d.ts +218 -0
- package/dist/types/components/datebox/datebox.d.ts +160 -0
- package/dist/types/components/datebox/field-adapter.d.ts +5 -0
- package/dist/types/components/dialog/dialog.d.ts +284 -0
- package/dist/types/components/dropdown/dropdown.d.ts +118 -0
- package/dist/types/components/empty-state/empty-state.d.ts +38 -0
- package/dist/types/components/field/field.d.ts +231 -0
- package/dist/types/components/field-upload/field-adapter.d.ts +5 -0
- package/dist/types/components/field-upload/field-upload.d.ts +213 -0
- package/dist/types/components/fieldset/fieldset.d.ts +125 -0
- package/dist/types/components/finder/finder.d.ts +252 -0
- package/dist/types/components/form/form.d.ts +194 -0
- package/dist/types/components/groupbox/groupbox.d.ts +89 -0
- package/dist/types/components/layout/layout.d.ts +132 -0
- package/dist/types/components/loading/inline-loading.d.ts +86 -0
- package/dist/types/components/loading/progress-bar.d.ts +168 -0
- package/dist/types/components/loading/spinner.d.ts +34 -0
- package/dist/types/components/master-panel/master-panel.d.ts +112 -0
- package/dist/types/components/menu-button/menu-button.d.ts +142 -0
- package/dist/types/components/message/message.d.ts +212 -0
- package/dist/types/components/modal/modal.d.ts +105 -0
- package/dist/types/components/multi-value-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +66 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +229 -0
- package/dist/types/components/number-field/field-adapter.d.ts +5 -0
- package/dist/types/components/number-field/number-field.d.ts +292 -0
- package/dist/types/components/pagination/pagination.d.ts +267 -0
- package/dist/types/components/panel/panel.d.ts +194 -0
- package/dist/types/components/permission/permission.d.ts +93 -0
- package/dist/types/components/rating/field-adapter.d.ts +5 -0
- package/dist/types/components/rating/rating.d.ts +213 -0
- package/dist/types/components/search/search.d.ts +98 -0
- package/dist/types/components/select/field-adapter.d.ts +5 -0
- package/dist/types/components/select/filter.d.ts +11 -0
- package/dist/types/components/select/select.d.ts +235 -0
- package/dist/types/components/skeleton/skeleton.d.ts +97 -0
- package/dist/types/components/slider/field-adapter.d.ts +5 -0
- package/dist/types/components/slider/slider.d.ts +216 -0
- package/dist/types/components/split-view/split-view.d.ts +335 -0
- package/dist/types/components/stepper/stepper.d.ts +314 -0
- package/dist/types/components/stepper/steps.d.ts +131 -0
- package/dist/types/components/tabbox/tabbox.d.ts +230 -0
- package/dist/types/components/table/sort.d.ts +49 -0
- package/dist/types/components/table/table.d.ts +872 -0
- package/dist/types/components/tag-picker/field-adapter.d.ts +5 -0
- package/dist/types/components/tag-picker/tag-picker.d.ts +375 -0
- package/dist/types/components/timebox/field-adapter.d.ts +5 -0
- package/dist/types/components/timebox/timebox.d.ts +121 -0
- package/dist/types/components/toggle/field-adapter.d.ts +5 -0
- package/dist/types/components/toggle/toggle.d.ts +94 -0
- package/dist/types/components/toolbar/toolbar.d.ts +230 -0
- package/dist/types/components/tooltip/tooltip.d.ts +183 -0
- package/dist/types/components/tree/hierarchy.d.ts +113 -0
- package/dist/types/components/tree/tree.d.ts +383 -0
- package/dist/types/components/truncate/truncate.d.ts +61 -0
- package/dist/types/components/value-list/field-adapter.d.ts +5 -0
- package/dist/types/components/value-list/value-list.d.ts +143 -0
- package/dist/types/core/breakpoint.d.ts +68 -0
- package/dist/types/core/component.d.ts +115 -0
- package/dist/types/core/date.d.ts +50 -0
- package/dist/types/core/dom.d.ts +86 -0
- package/dist/types/core/export.d.ts +70 -0
- package/dist/types/core/fontawesome.d.ts +107 -0
- package/dist/types/core/format.d.ts +107 -0
- package/dist/types/core/http.d.ts +122 -0
- package/dist/types/core/i18n.d.ts +35 -0
- package/dist/types/core/icons.d.ts +137 -0
- package/dist/types/core/keyboard.d.ts +72 -0
- package/dist/types/core/position.d.ts +45 -0
- package/dist/types/core/storage.d.ts +46 -0
- package/dist/types/core/util.d.ts +117 -0
- package/dist/types/elements/define.d.ts +73 -0
- package/dist/types/elements/reflect.d.ts +27 -0
- package/dist/types/index.d.ts +79 -0
- package/dist/types/zeyos/connect.d.ts +65 -0
- package/dist/types/zeyos/form.d.ts +140 -0
- package/dist/types/zeyos/icons.d.ts +104 -0
- package/dist/types/zeyos/index.d.ts +12 -0
- package/dist/types/zeyos/modules.d.ts +110 -0
- package/dist/types/zeyos/query.d.ts +157 -0
- package/dist/types/zeyos/schema.d.ts +79 -0
- package/dist/types/zeyos/select.d.ts +167 -0
- package/dist/types/zeyos/table.d.ts +205 -0
- package/dist/zx-compat.esm.js +375 -39
- package/dist/zx-compat.esm.min.js +1 -1
- package/dist/zx-compat.global.js +372 -73
- package/dist/zx-compat.global.min.js +3 -3
- package/dist/zx-zeyos.esm.js +355 -49
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +68 -6
- package/dist/zx.esm.js +359 -73
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +359 -73
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +48 -2
- package/docs/llms.md +31 -0
- package/package.json +37 -9
- package/src/compat/base.js +291 -0
- package/src/compat/globals.js +165 -0
- package/src/compat/index.js +84 -0
- package/src/compat/map/basic.js +464 -0
- package/src/compat/map/data.js +232 -0
- package/src/compat/map/date-time.js +177 -0
- package/src/compat/map/factory.js +45 -0
- package/src/compat/map/form.js +330 -0
- package/src/compat/map/helpers.js +46 -0
- package/src/compat/map/http.js +117 -0
- package/src/compat/map/layout.js +256 -0
- package/src/compat/map/options.js +267 -0
- package/src/compat/map/select.js +198 -0
- package/src/compat/map/stubs.js +26 -0
- package/src/compat/map/utilities.js +113 -0
- package/src/compat-entry.js +11 -0
- package/src/components/badge/badge.css +147 -0
- package/src/components/badge/badge.js +92 -0
- package/src/components/breadcrumb/breadcrumb.css +105 -0
- package/src/components/breadcrumb/breadcrumb.js +331 -0
- package/src/components/button/button.css +104 -0
- package/src/components/button/button.js +76 -0
- package/src/components/check-button/check-button.css +66 -0
- package/src/components/check-button/check-button.js +167 -0
- package/src/components/checklist/checklist.css +65 -0
- package/src/components/checklist/checklist.js +282 -0
- package/src/components/checklist/field-adapter.js +46 -0
- package/src/components/context-menu/context-menu.css +54 -0
- package/src/components/context-menu/context-menu.js +334 -0
- package/src/components/copy/copy-button.css +27 -0
- package/src/components/copy/copy-button.js +78 -0
- package/src/components/copy/copy-input.css +59 -0
- package/src/components/copy/copy-input.js +123 -0
- package/src/components/data-filter/data-filter.css +53 -0
- package/src/components/data-filter/data-filter.js +400 -0
- package/src/components/data-filter/filter-core.js +128 -0
- package/src/components/date-picker/date-picker.css +181 -0
- package/src/components/date-picker/date-picker.js +500 -0
- package/src/components/date-picker/date-range-picker.css +264 -0
- package/src/components/date-picker/date-range-picker.js +990 -0
- package/src/components/date-picker/field-adapter.js +36 -0
- package/src/components/date-picker/month-picker.js +223 -0
- package/src/components/date-picker/range-field-adapter.js +31 -0
- package/src/components/date-picker/time-picker.css +191 -0
- package/src/components/date-picker/time-picker.js +406 -0
- package/src/components/datebox/date-range-box.css +128 -0
- package/src/components/datebox/date-range-box.js +492 -0
- package/src/components/datebox/datebox.css +108 -0
- package/src/components/datebox/datebox.js +358 -0
- package/src/components/datebox/field-adapter.js +34 -0
- package/src/components/dialog/dialog.css +74 -0
- package/src/components/dialog/dialog.js +450 -0
- package/src/components/dropdown/dropdown.css +24 -0
- package/src/components/dropdown/dropdown.js +288 -0
- package/src/components/empty-state/empty-state.css +80 -0
- package/src/components/empty-state/empty-state.js +92 -0
- package/src/components/field/field.css +127 -0
- package/src/components/field/field.js +605 -0
- package/src/components/field-upload/field-adapter.js +21 -0
- package/src/components/field-upload/field-upload.css +108 -0
- package/src/components/field-upload/field-upload.js +475 -0
- package/src/components/fieldset/fieldset.css +37 -0
- package/src/components/fieldset/fieldset.js +307 -0
- package/src/components/finder/finder.css +98 -0
- package/src/components/finder/finder.js +509 -0
- package/src/components/form/form.css +32 -0
- package/src/components/form/form.js +302 -0
- package/src/components/groupbox/groupbox.css +51 -0
- package/src/components/groupbox/groupbox.js +199 -0
- package/src/components/layout/layout.css +117 -0
- package/src/components/layout/layout.js +136 -0
- package/src/components/loading/inline-loading.css +34 -0
- package/src/components/loading/inline-loading.js +140 -0
- package/src/components/loading/progress-bar.css +115 -0
- package/src/components/loading/progress-bar.js +259 -0
- package/src/components/loading/spinner.css +58 -0
- package/src/components/loading/spinner.js +57 -0
- package/src/components/master-panel/master-panel.css +51 -0
- package/src/components/master-panel/master-panel.js +203 -0
- package/src/components/menu-button/menu-button.css +49 -0
- package/src/components/menu-button/menu-button.js +294 -0
- package/src/components/message/message.css +122 -0
- package/src/components/message/message.js +499 -0
- package/src/components/modal/modal.css +47 -0
- package/src/components/modal/modal.js +203 -0
- package/src/components/multi-value-editor/field-adapter.js +44 -0
- package/src/components/multi-value-editor/multi-value-editor.css +56 -0
- package/src/components/multi-value-editor/multi-value-editor.js +170 -0
- package/src/components/navigation-bar/navigation-bar.css +130 -0
- package/src/components/navigation-bar/navigation-bar.js +450 -0
- package/src/components/number-field/field-adapter.js +40 -0
- package/src/components/number-field/number-field.css +77 -0
- package/src/components/number-field/number-field.js +545 -0
- package/src/components/pagination/pagination.css +95 -0
- package/src/components/pagination/pagination.js +481 -0
- package/src/components/panel/panel.css +123 -0
- package/src/components/panel/panel.js +336 -0
- package/src/components/permission/permission.css +47 -0
- package/src/components/permission/permission.js +198 -0
- package/src/components/rating/field-adapter.js +34 -0
- package/src/components/rating/rating.css +97 -0
- package/src/components/rating/rating.js +395 -0
- package/src/components/search/search.css +70 -0
- package/src/components/search/search.js +193 -0
- package/src/components/select/field-adapter.js +24 -0
- package/src/components/select/filter.js +39 -0
- package/src/components/select/select.css +180 -0
- package/src/components/select/select.js +663 -0
- package/src/components/skeleton/skeleton.css +76 -0
- package/src/components/skeleton/skeleton.js +139 -0
- package/src/components/slider/field-adapter.js +36 -0
- package/src/components/slider/slider.css +181 -0
- package/src/components/slider/slider.js +399 -0
- package/src/components/split-view/split-view.css +139 -0
- package/src/components/split-view/split-view.js +806 -0
- package/src/components/stepper/stepper.css +234 -0
- package/src/components/stepper/stepper.js +459 -0
- package/src/components/stepper/steps.js +131 -0
- package/src/components/tabbox/tabbox.css +281 -0
- package/src/components/tabbox/tabbox.js +484 -0
- package/src/components/table/sort.js +85 -0
- package/src/components/table/table.css +364 -0
- package/src/components/table/table.js +1711 -0
- package/src/components/tag-picker/field-adapter.js +35 -0
- package/src/components/tag-picker/tag-picker.css +169 -0
- package/src/components/tag-picker/tag-picker.js +837 -0
- package/src/components/timebox/field-adapter.js +24 -0
- package/src/components/timebox/timebox.css +51 -0
- package/src/components/timebox/timebox.js +276 -0
- package/src/components/toggle/field-adapter.js +24 -0
- package/src/components/toggle/toggle.css +66 -0
- package/src/components/toggle/toggle.js +150 -0
- package/src/components/toolbar/toolbar.css +81 -0
- package/src/components/toolbar/toolbar.js +511 -0
- package/src/components/tooltip/tooltip.css +36 -0
- package/src/components/tooltip/tooltip.js +420 -0
- package/src/components/tree/hierarchy.js +151 -0
- package/src/components/tree/tree.css +99 -0
- package/src/components/tree/tree.js +784 -0
- package/src/components/truncate/truncate.css +20 -0
- package/src/components/truncate/truncate.js +92 -0
- package/src/components/value-list/field-adapter.js +24 -0
- package/src/components/value-list/value-list.css +108 -0
- package/src/components/value-list/value-list.js +336 -0
- package/src/core/breakpoint.js +150 -0
- package/src/core/component.js +292 -0
- package/src/core/date.js +216 -0
- package/src/core/dom.js +260 -0
- package/src/core/export.js +204 -0
- package/src/core/fontawesome.js +177 -0
- package/src/core/format.js +283 -0
- package/src/core/http.js +246 -0
- package/src/core/i18n.js +83 -0
- package/src/core/icons.js +283 -0
- package/src/core/keyboard.js +240 -0
- package/src/core/position.js +177 -0
- package/src/core/storage.js +175 -0
- package/src/core/util.js +336 -0
- package/src/elements/define.js +715 -0
- package/src/elements/reflect.js +79 -0
- package/src/index.js +131 -0
- package/src/zeyos/connect.js +142 -0
- package/src/zeyos/form.js +254 -0
- package/src/zeyos/icons.js +92 -0
- package/src/zeyos/index.js +21 -0
- package/src/zeyos/modules.js +269 -0
- package/src/zeyos/query.js +199 -0
- package/src/zeyos/schema.js +474 -0
- package/src/zeyos/select.js +175 -0
- package/src/zeyos/table.js +272 -0
- package/styles/base.css +124 -0
- package/styles/icons.css +34 -0
- package/styles/tokens/dark.css +84 -0
- package/styles/tokens/density.css +9 -0
- package/styles/tokens/global.css +80 -0
- package/styles/tokens/modules.css +109 -0
- package/styles/tokens/semantic.css +49 -0
- package/styles/zx.css +61 -0
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
.zx-table {
|
|
2
|
+
min-inline-size: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.zx-table__scroll {
|
|
6
|
+
position: relative;
|
|
7
|
+
max-inline-size: 100%;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
border: 1px solid var(--zx-color-border);
|
|
10
|
+
border-radius: var(--zx-radius-md);
|
|
11
|
+
background: var(--zx-color-bg-surface);
|
|
12
|
+
scrollbar-gutter: stable;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/* Loading state (Table.setLoading): dim rows and show an indeterminate top progress bar. */
|
|
16
|
+
.zx-table[data-loading="true"] .zx-table__body {
|
|
17
|
+
opacity: 0.5;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.zx-table[data-loading="true"] .zx-table__scroll::after {
|
|
21
|
+
content: "";
|
|
22
|
+
position: sticky;
|
|
23
|
+
inset-block-start: 0;
|
|
24
|
+
inset-inline: 0;
|
|
25
|
+
display: block;
|
|
26
|
+
block-size: 2px;
|
|
27
|
+
margin-block-end: -2px;
|
|
28
|
+
background: var(--zx-color-accent);
|
|
29
|
+
opacity: 0.85;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
+
.zx-table[data-loading="true"] .zx-table__scroll::after {
|
|
35
|
+
background: linear-gradient(90deg,
|
|
36
|
+
transparent 0%,
|
|
37
|
+
var(--zx-color-accent) 50%,
|
|
38
|
+
transparent 100%);
|
|
39
|
+
background-size: 40% 100%;
|
|
40
|
+
background-repeat: no-repeat;
|
|
41
|
+
animation: zx-table-loading 1.1s var(--zx-ease) infinite;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes zx-table-loading {
|
|
46
|
+
from { background-position: -40% 0; }
|
|
47
|
+
to { background-position: 140% 0; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.zx-table__table {
|
|
51
|
+
inline-size: 100%;
|
|
52
|
+
border-spacing: 0;
|
|
53
|
+
background: var(--zx-color-bg-surface);
|
|
54
|
+
color: var(--zx-color-text);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Auto layout (intrinsic/px columns): let content set the width and scroll horizontally. */
|
|
58
|
+
.zx-table__table[data-layout="auto"] {
|
|
59
|
+
min-inline-size: max-content;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Fixed layout (fr/proportional columns): fill the container. `max-content` must NOT apply here —
|
|
63
|
+
with table-layout:fixed and percentage <col> widths it resolves to a runaway width. */
|
|
64
|
+
.zx-table__table[data-layout="fixed"] {
|
|
65
|
+
table-layout: fixed;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.zx-table__selection-column {
|
|
69
|
+
inline-size: var(--zx-control-height);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.zx-table th,
|
|
73
|
+
.zx-table td {
|
|
74
|
+
border-block-end: 1px solid var(--zx-table-border-color, var(--zx-color-border));
|
|
75
|
+
padding: var(--zx-space-2) var(--zx-space-3);
|
|
76
|
+
text-align: start;
|
|
77
|
+
vertical-align: middle;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.zx-table th {
|
|
81
|
+
background: var(--zx-table-header-bg, var(--zx-color-bg-raised));
|
|
82
|
+
color: var(--zx-color-text-muted);
|
|
83
|
+
font-size: var(--zx-text-sm);
|
|
84
|
+
font-weight: 650;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.zx-table__scroll[data-sticky-header="true"] th {
|
|
88
|
+
position: sticky;
|
|
89
|
+
z-index: 1;
|
|
90
|
+
inset-block-start: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.zx-table th[data-align="center"],
|
|
94
|
+
.zx-table td[data-align="center"] {
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.zx-table th[data-align="end"],
|
|
99
|
+
.zx-table td[data-align="end"],
|
|
100
|
+
.zx-table th[data-align="right"],
|
|
101
|
+
.zx-table td[data-align="right"] {
|
|
102
|
+
text-align: end;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.zx-table th[data-align="left"],
|
|
106
|
+
.zx-table td[data-align="left"] {
|
|
107
|
+
text-align: left;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.zx-table__sort-button {
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
gap: var(--zx-space-2);
|
|
115
|
+
inline-size: 100%;
|
|
116
|
+
min-block-size: auto;
|
|
117
|
+
border: 0;
|
|
118
|
+
border-radius: var(--zx-radius-sm);
|
|
119
|
+
background: inherit;
|
|
120
|
+
color: inherit;
|
|
121
|
+
padding: 0;
|
|
122
|
+
text-align: inherit;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.zx-table__sort-button:hover {
|
|
126
|
+
background: var(--zx-table-row-hover-bg, var(--zx-color-bg-hover));
|
|
127
|
+
color: var(--zx-color-text);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.zx-table__sort-button:focus-visible {
|
|
131
|
+
box-shadow: var(--zx-focus-ring);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.zx-table th[aria-sort="ascending"] .zx-table__sort-button::after {
|
|
135
|
+
content: "↑";
|
|
136
|
+
color: var(--zx-color-accent);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.zx-table th[aria-sort="descending"] .zx-table__sort-button::after {
|
|
140
|
+
content: "↓";
|
|
141
|
+
color: var(--zx-color-accent);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.zx-table__body tr:last-child td {
|
|
145
|
+
border-block-end: 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.zx-table__scroll[data-zebra="true"] .zx-table__body tr:nth-child(even):not([aria-selected="true"]) {
|
|
149
|
+
background: var(--zx-color-bg-page);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.zx-table__body tr[aria-selected="true"] {
|
|
153
|
+
background: var(--zx-table-row-selected-bg, var(--zx-color-bg-selected));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.zx-table__body tr[data-row]:hover {
|
|
157
|
+
background: var(--zx-color-bg-hover);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.zx-table__checkbox {
|
|
161
|
+
inline-size: var(--zx-space-4);
|
|
162
|
+
min-block-size: auto;
|
|
163
|
+
block-size: var(--zx-space-4);
|
|
164
|
+
margin: 0;
|
|
165
|
+
accent-color: var(--zx-color-accent);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.zx-table__selection-header,
|
|
169
|
+
.zx-table__selection-cell {
|
|
170
|
+
inline-size: var(--zx-control-height);
|
|
171
|
+
text-align: center;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.zx-table__empty {
|
|
175
|
+
padding-block: var(--zx-space-6);
|
|
176
|
+
color: var(--zx-color-text-muted);
|
|
177
|
+
text-align: center;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* --- Inline editing (Table editMode) -------------------------------------------------------- */
|
|
181
|
+
|
|
182
|
+
/* Reserve a control-sized content box in every body cell as soon as the table is editable, so
|
|
183
|
+
opening an editor never changes a row's height. On a table cell `block-size` is a minimum, which
|
|
184
|
+
is exactly the wanted behaviour: taller content still grows the row. */
|
|
185
|
+
.zx-table[data-edit-mode] .zx-table__body td {
|
|
186
|
+
block-size: var(--zx-control-height);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.zx-table__body td[data-editable="true"] {
|
|
190
|
+
cursor: cell;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Cells carry a roving tabindex, so their ring must sit inside the cell box — an outer ring would
|
|
194
|
+
be painted over by the neighbouring cell. */
|
|
195
|
+
.zx-table__body td[data-editable="true"]:focus-visible {
|
|
196
|
+
outline: 0;
|
|
197
|
+
box-shadow: inset var(--zx-focus-ring);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.zx-table__body td[data-editing="true"] {
|
|
201
|
+
position: relative;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* The cell keeps its rendered content while editing — invisible, but still contributing its
|
|
205
|
+
intrinsic width, so no column resizes when an editor opens. */
|
|
206
|
+
.zx-table__cell-shadow {
|
|
207
|
+
visibility: hidden;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/* No z-index: the editor must stay below the sticky header, which sets one. */
|
|
211
|
+
.zx-table__editor {
|
|
212
|
+
position: absolute;
|
|
213
|
+
inset: 0;
|
|
214
|
+
display: flex;
|
|
215
|
+
align-items: center;
|
|
216
|
+
gap: var(--zx-space-1);
|
|
217
|
+
padding-inline: var(--zx-space-1);
|
|
218
|
+
background: var(--zx-color-bg-surface);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.zx-table__editor > * {
|
|
222
|
+
inline-size: 100%;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.zx-table__editor[data-editor="checkbox"] {
|
|
226
|
+
justify-content: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.zx-table__editor[data-editor="checkbox"] > * {
|
|
230
|
+
inline-size: auto;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.zx-table__editor-input {
|
|
234
|
+
inline-size: 100%;
|
|
235
|
+
min-block-size: 0;
|
|
236
|
+
block-size: var(--zx-control-height);
|
|
237
|
+
padding-inline: var(--zx-space-2);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.zx-table__editor-textarea {
|
|
241
|
+
block-size: 100%;
|
|
242
|
+
padding-block: var(--zx-space-1);
|
|
243
|
+
resize: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.zx-table__body td[data-invalid="true"] .zx-table__editor {
|
|
247
|
+
box-shadow: inset 0 0 0 1px var(--zx-color-danger);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.zx-table__body td[data-invalid="true"] .zx-table__editor-input {
|
|
251
|
+
border-color: var(--zx-color-danger);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Validation live region: always in the DOM so announcements are not missed, collapsed while it
|
|
255
|
+
holds no message. */
|
|
256
|
+
.zx-table__message {
|
|
257
|
+
padding: var(--zx-space-2) var(--zx-space-3);
|
|
258
|
+
color: var(--zx-color-danger);
|
|
259
|
+
font-size: var(--zx-text-sm);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.zx-table__message:empty {
|
|
263
|
+
display: none;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* ------------------------------------------------------------------ stacked -- */
|
|
267
|
+
|
|
268
|
+
/*
|
|
269
|
+
* Below the `responsive` width each row becomes a card of label/value pairs, because a dense ERP
|
|
270
|
+
* table in a 320px pane is not a table any more — it is a horizontal scrollbar with data hidden
|
|
271
|
+
* behind it. The width is measured on the table's own container rather than the viewport, so this
|
|
272
|
+
* turns on inside a narrow split pane on a wide screen, which is where it is needed most.
|
|
273
|
+
*
|
|
274
|
+
* The layout works by dropping `display: table`, which also drops the implicit ARIA roles — the
|
|
275
|
+
* component states them explicitly for exactly as long as this mode is on. See `_applyStackedRoles`.
|
|
276
|
+
*/
|
|
277
|
+
.zx-table[data-stacked] .zx-table__table,
|
|
278
|
+
.zx-table[data-stacked] .zx-table__body,
|
|
279
|
+
.zx-table[data-stacked] .zx-table__body > tr {
|
|
280
|
+
display: block;
|
|
281
|
+
inline-size: 100%;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* The header is redundant once every cell carries its own label, and its widths would fight the
|
|
285
|
+
card layout. Hidden outright rather than visually: the labels replace it in the a11y tree too. */
|
|
286
|
+
.zx-table[data-stacked] .zx-table__head,
|
|
287
|
+
.zx-table[data-stacked] .zx-table__columns {
|
|
288
|
+
display: none;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.zx-table[data-stacked] .zx-table__body > tr {
|
|
292
|
+
padding-block: var(--zx-space-3);
|
|
293
|
+
padding-inline: var(--zx-space-4);
|
|
294
|
+
border-block-end: 1px solid var(--zx-color-border);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.zx-table[data-stacked] .zx-table__body td {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: baseline;
|
|
300
|
+
justify-content: space-between;
|
|
301
|
+
gap: var(--zx-space-4);
|
|
302
|
+
inline-size: auto;
|
|
303
|
+
padding-block: var(--zx-space-1);
|
|
304
|
+
padding-inline: 0;
|
|
305
|
+
border: 0;
|
|
306
|
+
text-align: start;
|
|
307
|
+
white-space: normal;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/*
|
|
311
|
+
* Matched on the attribute rather than overridden afterwards: the selection checkbox and the empty
|
|
312
|
+
* row carry no `data-label`, and the two `content: none` rules that used to exclude them were less
|
|
313
|
+
* specific than this one, so they never applied — leaving an empty generated box in each.
|
|
314
|
+
*/
|
|
315
|
+
.zx-table[data-stacked] .zx-table__body td[data-label]::before {
|
|
316
|
+
content: attr(data-label);
|
|
317
|
+
flex: none;
|
|
318
|
+
color: var(--zx-color-text-muted);
|
|
319
|
+
font-size: var(--zx-text-sm);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* A column marked `popin: false` is what identifies the row, so it leads the card instead of
|
|
323
|
+
becoming another labelled line. */
|
|
324
|
+
.zx-table[data-stacked] .zx-table__body td[data-popin="false"] {
|
|
325
|
+
display: block;
|
|
326
|
+
padding-block-end: var(--zx-space-2);
|
|
327
|
+
font-size: var(--zx-text-lg);
|
|
328
|
+
font-weight: 600;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.zx-table[data-stacked] .zx-table__body td[data-popin="false"]::before {
|
|
332
|
+
content: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.zx-table[data-stacked] .zx-table__selection-cell {
|
|
336
|
+
justify-content: flex-start;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
.zx-table[data-stacked] .zx-table__empty-row {
|
|
341
|
+
display: block;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
/*
|
|
346
|
+
* The growing control. Outside the table rather than in a `<tfoot>` spanning every column: it is a
|
|
347
|
+
* command, not data, and a button inside the grid would answer the row navigation keys as though
|
|
348
|
+
* it were a cell.
|
|
349
|
+
*/
|
|
350
|
+
.zx-table__more {
|
|
351
|
+
display: block;
|
|
352
|
+
inline-size: 100%;
|
|
353
|
+
margin-block-start: var(--zx-space-2);
|
|
354
|
+
border: 1px dashed var(--zx-color-border);
|
|
355
|
+
background: none;
|
|
356
|
+
color: var(--zx-color-text-muted);
|
|
357
|
+
font-size: var(--zx-control-font-size);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.zx-table__more:hover {
|
|
361
|
+
border-color: var(--zx-color-border-strong);
|
|
362
|
+
background: var(--zx-color-bg-hover);
|
|
363
|
+
color: var(--zx-color-text);
|
|
364
|
+
}
|