@zeyos/zx 4.3.4 → 5.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 +438 -0
- package/README.md +49 -10
- package/dist/types/components/activity-item/activity-item.d.ts +351 -0
- package/dist/types/components/activity-list/activity-list.d.ts +217 -0
- package/dist/types/components/app-sidebar/app-sidebar.d.ts +33 -3
- package/dist/types/components/avatar/avatar.d.ts +46 -7
- package/dist/types/components/badge/badge.d.ts +21 -1
- package/dist/types/components/button/button.d.ts +23 -0
- package/dist/types/components/calendar/calendar.d.ts +19 -0
- package/dist/types/components/card/card.d.ts +7 -0
- package/dist/types/components/card-view/card-view.d.ts +11 -3
- package/dist/types/components/card-view/record-card.d.ts +7 -1
- package/dist/types/components/chart/chart.d.ts +10 -0
- package/dist/types/components/checklist/checklist.d.ts +9 -0
- package/dist/types/components/code-editor/code-editor.d.ts +149 -0
- package/dist/types/components/code-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +18 -2
- package/dist/types/components/date-picker/date-picker.d.ts +8 -0
- package/dist/types/components/date-picker/time-picker.d.ts +7 -0
- package/dist/types/components/datebox/date-range-box.d.ts +5 -1
- package/dist/types/components/datebox/datebox.d.ts +7 -2
- package/dist/types/components/dialog/dialog.d.ts +75 -6
- package/dist/types/components/dropdown/dropdown.d.ts +2 -2
- package/dist/types/components/entity-ref/entity-ref.d.ts +331 -0
- package/dist/types/components/field/field.d.ts +24 -2
- package/dist/types/components/fieldset/fieldset.d.ts +19 -1
- package/dist/types/components/file-item/file-item.d.ts +262 -0
- package/dist/types/components/file-list/file-list.d.ts +171 -0
- package/dist/types/components/filter/filter.d.ts +91 -36
- package/dist/types/components/filter-panel/filter-panel.d.ts +449 -0
- package/dist/types/components/form/form.d.ts +12 -1
- package/dist/types/components/kanban-view/kanban-card.d.ts +146 -0
- package/dist/types/components/kanban-view/kanban-view.d.ts +170 -4
- package/dist/types/components/launcher/launcher.d.ts +278 -26
- package/dist/types/components/list-toolbar/list-toolbar.d.ts +599 -0
- package/dist/types/components/menu-button/menu-button.d.ts +37 -42
- package/dist/types/components/message/message.d.ts +126 -17
- package/dist/types/components/modal/modal.d.ts +61 -2
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +105 -21
- package/dist/types/components/panel/panel.d.ts +7 -0
- package/dist/types/components/search/search.d.ts +7 -0
- package/dist/types/components/select/color.d.ts +12 -0
- package/dist/types/components/select/glyphs.d.ts +124 -0
- package/dist/types/components/select/select.d.ts +15 -3
- package/dist/types/components/sort-control/sort-control.d.ts +105 -0
- package/dist/types/components/stat-tile/stat-tile.d.ts +288 -0
- package/dist/types/components/tabbox/tabbox.d.ts +16 -0
- package/dist/types/components/table/table.d.ts +190 -1
- package/dist/types/components/table-view/table-view.d.ts +11 -5
- package/dist/types/components/tag-picker/tag-picker.d.ts +21 -4
- package/dist/types/components/timebox/timebox.d.ts +7 -0
- package/dist/types/components/tree/tree.d.ts +13 -0
- package/dist/types/components/value-list/value-list.d.ts +8 -0
- package/dist/types/components/view/record-view.d.ts +96 -5
- package/dist/types/core/breakpoint.d.ts +1 -1
- package/dist/types/core/icons.d.ts +37 -22
- package/dist/types/core/motion.d.ts +59 -0
- package/dist/types/core/overlay-host.d.ts +15 -1
- package/dist/types/index.d.ts +16 -3
- package/dist/types/internal/app-rail.d.ts +10 -0
- package/dist/types/internal/menu-items.d.ts +134 -0
- package/dist/types/zeyos/connect.d.ts +6 -0
- package/dist/types/zeyos/form.d.ts +50 -9
- package/dist/types/zeyos/index.d.ts +1 -1
- package/dist/types/zeyos/query.d.ts +79 -0
- package/dist/types/zeyos/schema.d.ts +24 -1
- package/dist/types/zeyos/table.d.ts +100 -14
- package/dist/types/zeyos/view.d.ts +10 -0
- package/dist/zx-zeyos.esm.js +2206 -489
- package/dist/zx-zeyos.esm.min.js +56 -1
- package/dist/zx.css +3322 -724
- package/dist/zx.esm.js +12244 -5809
- package/dist/zx.esm.min.js +58 -3
- package/dist/zx.global.js +12246 -5811
- package/dist/zx.global.min.js +58 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +1683 -146
- package/docs/llms.md +777 -110
- package/docs/llms.txt +14 -8
- package/package.json +1 -1
- package/src/components/account-menu/account-menu.css +35 -10
- package/src/components/activity-item/activity-item.css +137 -0
- package/src/components/activity-item/activity-item.js +602 -0
- package/src/components/activity-list/activity-list.css +99 -0
- package/src/components/activity-list/activity-list.js +409 -0
- package/src/components/app-icon/app-icon.css +1 -1
- package/src/components/app-rail/app-rail.css +191 -22
- package/src/components/app-sidebar/app-sidebar.css +349 -24
- package/src/components/app-sidebar/app-sidebar.js +86 -11
- package/src/components/aurora/aurora.css +5 -3
- package/src/components/avatar/avatar.css +32 -7
- package/src/components/avatar/avatar.js +72 -8
- package/src/components/badge/badge.css +54 -2
- package/src/components/badge/badge.js +29 -2
- package/src/components/button/button.css +74 -8
- package/src/components/button/button.js +44 -1
- package/src/components/calendar/calendar.css +46 -46
- package/src/components/calendar/calendar.js +33 -3
- package/src/components/card/card.css +2 -2
- package/src/components/card/card.js +12 -1
- package/src/components/card-view/card-view.css +10 -7
- package/src/components/card-view/card-view.js +25 -9
- package/src/components/card-view/record-card.js +7 -3
- package/src/components/chart/chart.css +4 -1
- package/src/components/chart/chart.js +12 -0
- package/src/components/check-button/check-button.css +10 -2
- package/src/components/checklist/checklist.css +9 -2
- package/src/components/checklist/checklist.js +11 -5
- package/src/components/checklist/field-adapter.js +3 -1
- package/src/components/code-editor/code-editor.css +68 -0
- package/src/components/code-editor/code-editor.js +306 -0
- package/src/components/code-editor/field-adapter.js +34 -0
- package/src/components/context-menu/context-menu.css +87 -5
- package/src/components/context-menu/context-menu.js +22 -30
- package/src/components/copy/copy-button.css +6 -0
- package/src/components/copy/copy-input.css +8 -3
- package/src/components/data-filter/data-filter.css +5 -4
- package/src/components/date-picker/date-picker.css +6 -6
- package/src/components/date-picker/date-picker.js +22 -8
- package/src/components/date-picker/date-range-picker.css +3 -3
- package/src/components/date-picker/month-picker.js +3 -3
- package/src/components/date-picker/time-picker.css +1 -1
- package/src/components/date-picker/time-picker.js +20 -8
- package/src/components/datebox/date-range-box.css +79 -2
- package/src/components/datebox/date-range-box.js +13 -2
- package/src/components/datebox/datebox.css +79 -2
- package/src/components/datebox/datebox.js +13 -2
- package/src/components/dialog/dialog.css +26 -0
- package/src/components/dialog/dialog.js +174 -70
- package/src/components/dropdown/dropdown.css +1 -1
- package/src/components/dropdown/dropdown.js +7 -5
- package/src/components/empty-state/empty-state.css +2 -2
- package/src/components/entity-ref/entity-ref.css +182 -0
- package/src/components/entity-ref/entity-ref.js +496 -0
- package/src/components/field/field.css +28 -9
- package/src/components/field/field.js +68 -26
- package/src/components/field-upload/field-upload.css +1 -1
- package/src/components/fieldset/fieldset.css +5 -3
- package/src/components/fieldset/fieldset.js +28 -5
- package/src/components/file-item/file-item.css +88 -0
- package/src/components/file-item/file-item.js +505 -0
- package/src/components/file-list/file-list.css +51 -0
- package/src/components/file-list/file-list.js +320 -0
- package/src/components/filter/filter.css +27 -1
- package/src/components/filter/filter.js +205 -47
- package/src/components/filter-panel/filter-panel.css +104 -0
- package/src/components/filter-panel/filter-panel.js +964 -0
- package/src/components/finder/finder.css +15 -13
- package/src/components/form/form.css +5 -4
- package/src/components/form/form.js +11 -2
- package/src/components/grid/grid.css +1 -1
- package/src/components/groupbox/groupbox.css +1 -1
- package/src/components/kanban-view/kanban-card.js +247 -0
- package/src/components/kanban-view/kanban-view.css +226 -8
- package/src/components/kanban-view/kanban-view.js +255 -12
- package/src/components/launcher/launcher.css +107 -25
- package/src/components/launcher/launcher.js +557 -63
- package/src/components/list-toolbar/list-toolbar.css +194 -0
- package/src/components/list-toolbar/list-toolbar.js +851 -0
- package/src/components/master-panel/master-panel.css +2 -0
- package/src/components/menu-button/menu-button.css +87 -5
- package/src/components/menu-button/menu-button.js +86 -46
- package/src/components/message/message.css +38 -5
- package/src/components/message/message.js +230 -17
- package/src/components/modal/modal.css +15 -0
- package/src/components/modal/modal.js +159 -3
- package/src/components/navigation-bar/navigation-bar.css +95 -11
- package/src/components/navigation-bar/navigation-bar.js +171 -4
- package/src/components/number-field/field-adapter.js +1 -0
- package/src/components/number-field/number-field.css +70 -0
- package/src/components/number-field/number-field.js +2 -0
- package/src/components/pagination/pagination.css +8 -6
- package/src/components/panel/panel.css +1 -1
- package/src/components/panel/panel.js +13 -2
- package/src/components/rating/rating.css +7 -0
- package/src/components/search/search.js +17 -5
- package/src/components/select/color.js +22 -0
- package/src/components/select/field-adapter.js +6 -1
- package/src/components/select/glyphs.js +165 -0
- package/src/components/select/select.css +138 -45
- package/src/components/select/select.js +86 -47
- package/src/components/sheet/sheet.css +11 -8
- package/src/components/slider/slider.css +16 -2
- package/src/components/slider/slider.js +1 -1
- package/src/components/sort-control/sort-control.css +20 -0
- package/src/components/sort-control/sort-control.js +140 -0
- package/src/components/stat-tile/stat-tile.css +208 -0
- package/src/components/stat-tile/stat-tile.js +601 -0
- package/src/components/tabbox/tabbox.css +32 -27
- package/src/components/tabbox/tabbox.js +17 -2
- package/src/components/table/table.css +155 -31
- package/src/components/table/table.js +386 -33
- package/src/components/table-view/table-view.css +8 -2
- package/src/components/table-view/table-view.js +21 -6
- package/src/components/tag-picker/tag-picker.css +86 -6
- package/src/components/tag-picker/tag-picker.js +25 -8
- package/src/components/timebox/timebox.css +22 -2
- package/src/components/timebox/timebox.js +18 -5
- package/src/components/toggle/toggle.css +12 -1
- package/src/components/toolbar/toolbar.js +2 -2
- package/src/components/tooltip/tooltip.css +4 -0
- package/src/components/tooltip/tooltip.js +10 -3
- package/src/components/tree/tree.css +25 -16
- package/src/components/tree/tree.js +31 -0
- package/src/components/value-list/value-list.css +3 -3
- package/src/components/value-list/value-list.js +22 -6
- package/src/components/view/record-view.css +5 -0
- package/src/components/view/record-view.js +100 -7
- package/src/core/breakpoint.js +1 -1
- package/src/core/icons.js +259 -57
- package/src/core/motion.js +147 -0
- package/src/core/overlay-host.js +21 -2
- package/src/index.js +30 -3
- package/src/internal/app-rail.js +18 -1
- package/src/internal/menu-items.js +142 -0
- package/src/zeyos/connect.js +6 -2
- package/src/zeyos/form.js +67 -27
- package/src/zeyos/index.js +1 -1
- package/src/zeyos/query.js +153 -0
- package/src/zeyos/schema.js +144 -27
- package/src/zeyos/table.js +68 -5
- package/src/zeyos/view.js +6 -0
- package/styles/base.css +56 -0
- package/styles/icons.css +11 -1
- package/styles/print.css +192 -0
- package/styles/tokens/dark.css +113 -37
- package/styles/tokens/global.css +121 -27
- package/styles/tokens/semantic.css +100 -31
- package/styles/tokens/themes.css +7 -6
- package/styles/zx.css +11 -1
- package/styles/tokens/density.css +0 -9
package/styles/print.css
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Paper.
|
|
3
|
+
*
|
|
4
|
+
* Imported last from `styles/zx.css`, and everything in it lives inside the one `@media print`
|
|
5
|
+
* block below — so on screen this file contributes nothing at all, and on paper it is the last
|
|
6
|
+
* word. Consumers print invoices, delivery notes and reports out of these components, and until
|
|
7
|
+
* this file existed a printed table took its sticky header, its zebra stripes and whatever row
|
|
8
|
+
* the pointer happened to be over along with it.
|
|
9
|
+
*
|
|
10
|
+
* Paper differs from a screen in four ways, and every rule here answers one of them:
|
|
11
|
+
*
|
|
12
|
+
* - There is no viewport, so nothing may stick and nothing may scroll. A sticky header pins
|
|
13
|
+
* itself to the top of a sheet of paper, and a scroller prints exactly one screenful.
|
|
14
|
+
* - There is no pointer and no focus, so hover fills, focus rings and drag affordances are
|
|
15
|
+
* noise that costs toner.
|
|
16
|
+
* - There is no second page for the half of a card that did not fit, so blocks that read as one
|
|
17
|
+
* thing say where they may be cut, and a table repeats its header on every page.
|
|
18
|
+
* - Ink is not free and a fill is not a colour. Backgrounds come off; the one exception is a
|
|
19
|
+
* status badge, whose fill carries meaning its text alone does not.
|
|
20
|
+
*
|
|
21
|
+
* Semantic tokens only, as everywhere else. The borders are the interesting case: the light
|
|
22
|
+
* theme's `--zx-color-border` is a very pale grey that a printer renders as nothing, so the
|
|
23
|
+
* border roles are repointed — once, at the top — to a mix of the text colour, which prints.
|
|
24
|
+
*/
|
|
25
|
+
@media print {
|
|
26
|
+
/*
|
|
27
|
+
* Hairlines. `--zx-color-text` rather than a fixed grey so the mix follows the theme it is
|
|
28
|
+
* printed from, and both selectors are single-class so this beats the theme block that sets the
|
|
29
|
+
* same roles on the same element: this file is imported last, and on a tie the last one wins.
|
|
30
|
+
*/
|
|
31
|
+
.zx-scope,
|
|
32
|
+
[data-zx-theme] {
|
|
33
|
+
--zx-color-border: color-mix(in srgb, var(--zx-color-text) 45%, transparent);
|
|
34
|
+
--zx-color-border-strong: color-mix(in srgb, var(--zx-color-text) 65%, transparent);
|
|
35
|
+
--zx-color-border-control: color-mix(in srgb, var(--zx-color-text) 45%, transparent);
|
|
36
|
+
--zx-color-overlay-border: color-mix(in srgb, var(--zx-color-text) 45%, transparent);
|
|
37
|
+
--zx-color-overlay-divider: color-mix(in srgb, var(--zx-color-text) 45%, transparent);
|
|
38
|
+
/* The glass rim is a light tint of the page, which on white paper is the paper. */
|
|
39
|
+
--zx-color-glass-border: color-mix(in srgb, var(--zx-color-text) 45%, transparent);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* A fill is a boundary too, and the filled variants drew theirs with one: their border is
|
|
44
|
+
* `transparent` because the surface underneath said where the card ended. With the fill gone
|
|
45
|
+
* they would arrive on paper as loose text, so they take the hairline instead.
|
|
46
|
+
*/
|
|
47
|
+
.zx-scope .zx-card[data-variant="filled"],
|
|
48
|
+
.zx-scope .zx-record-card[data-variant="filled"] {
|
|
49
|
+
border-color: var(--zx-color-border);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* Fills off. A badge is excluded by the selector rather than overridden afterwards, because its
|
|
54
|
+
* eleven kind/variant fills would otherwise have to be restated here one by one, and the copy
|
|
55
|
+
* would rot the first time badge.css gained a kind.
|
|
56
|
+
*/
|
|
57
|
+
.zx-scope,
|
|
58
|
+
.zx-scope *:not(.zx-badge, .zx-badge *),
|
|
59
|
+
.zx-scope *:not(.zx-badge, .zx-badge *)::before,
|
|
60
|
+
.zx-scope *:not(.zx-badge, .zx-badge *)::after {
|
|
61
|
+
background-color: transparent !important;
|
|
62
|
+
background-image: none !important;
|
|
63
|
+
box-shadow: none !important;
|
|
64
|
+
text-shadow: none !important;
|
|
65
|
+
-webkit-backdrop-filter: none !important;
|
|
66
|
+
backdrop-filter: none !important;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* The exception: a badge's colour is half of what it says, so it is asked for explicitly. */
|
|
70
|
+
.zx-scope .zx-badge {
|
|
71
|
+
-webkit-print-color-adjust: exact;
|
|
72
|
+
print-color-adjust: exact;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/*
|
|
76
|
+
* A solid button's label is the colour that reads on its fill — white on the accent. With the
|
|
77
|
+
* fill gone that label is white on white, so the two kinds that have one take the page's text
|
|
78
|
+
* colour and a hairline of their own. Buttons are not hidden: a printed form or an approval
|
|
79
|
+
* sheet is read by someone who needs to see what the screen offered.
|
|
80
|
+
*/
|
|
81
|
+
.zx-scope .zx-btn[data-kind="primary"],
|
|
82
|
+
.zx-scope .zx-btn[data-kind="danger"] {
|
|
83
|
+
border-color: var(--zx-color-border);
|
|
84
|
+
color: var(--zx-color-text);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Nothing sticks to a sheet of paper. Everything below stacks where it was written instead. */
|
|
88
|
+
.zx-scope .zx-table th,
|
|
89
|
+
.zx-scope .zx-table__scroll[data-sticky-header="true"] th,
|
|
90
|
+
.zx-scope .zx-select__group,
|
|
91
|
+
.zx-scope .zx-calendar__agenda-heading,
|
|
92
|
+
.zx-scope .zx-toolbar,
|
|
93
|
+
.zx-scope .zx-list-toolbar {
|
|
94
|
+
position: static;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/*
|
|
98
|
+
* Nothing scrolls either: a scroller prints the rows that happen to be inside it and drops the
|
|
99
|
+
* rest, which on an invoice is a silently short invoice.
|
|
100
|
+
*/
|
|
101
|
+
.zx-scope .zx-table__scroll,
|
|
102
|
+
.zx-scope .zx-tree,
|
|
103
|
+
.zx-scope .zx-card-view,
|
|
104
|
+
.zx-scope .zx-record-view {
|
|
105
|
+
overflow: visible;
|
|
106
|
+
max-block-size: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/* No pointer, no focus, no zebra — three states that only ever existed on a screen. */
|
|
110
|
+
.zx-scope .zx-table__scroll[data-zebra="true"] .zx-table__body tr:nth-child(even),
|
|
111
|
+
.zx-scope .zx-table__body tr[data-row]:hover,
|
|
112
|
+
.zx-scope .zx-table__body tr[aria-selected="true"] {
|
|
113
|
+
background: transparent;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.zx-scope :focus,
|
|
117
|
+
.zx-scope :focus-visible {
|
|
118
|
+
outline: none;
|
|
119
|
+
box-shadow: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* Chrome and overlays: navigation a reader cannot follow, and panels floating over the page. */
|
|
123
|
+
.zx-scope .zx-navigation-bar,
|
|
124
|
+
.zx-scope .zx-app-rail,
|
|
125
|
+
.zx-scope .zx-app-sidebar,
|
|
126
|
+
.zx-modal,
|
|
127
|
+
.zx-dialog,
|
|
128
|
+
.zx-sheet,
|
|
129
|
+
.zx-dropdown,
|
|
130
|
+
.zx-context-menu,
|
|
131
|
+
.zx-tooltip,
|
|
132
|
+
.zx-launcher,
|
|
133
|
+
.zx-message-region,
|
|
134
|
+
[popover]:popover-open {
|
|
135
|
+
display: none !important;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
::backdrop {
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* A table that runs over a page break reintroduces itself on the next one. */
|
|
143
|
+
.zx-scope .zx-table thead {
|
|
144
|
+
display: table-header-group;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.zx-scope .zx-table tfoot {
|
|
148
|
+
display: table-footer-group;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Things that read as one object are not cut in half if they can be moved whole. */
|
|
152
|
+
.zx-scope .zx-card,
|
|
153
|
+
.zx-scope .zx-record-card,
|
|
154
|
+
.zx-scope .zx-stat-tile,
|
|
155
|
+
.zx-scope .zx-table__body tr {
|
|
156
|
+
break-inside: avoid;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/*
|
|
160
|
+
* A link on paper is a dead end unless it says where it goes — in prose. Inside a table cell or
|
|
161
|
+
* on a button the appended URL is not information, it is a wrecked column, so those take it back
|
|
162
|
+
* off. Each of those selectors outranks the one above on specificity rather than on source
|
|
163
|
+
* order, so reordering the list cannot quietly turn one of them back on.
|
|
164
|
+
*/
|
|
165
|
+
.zx-scope a[href^="http"]::after {
|
|
166
|
+
content: " (" attr(href) ")";
|
|
167
|
+
font-size: var(--zx-text-sm);
|
|
168
|
+
font-weight: 400;
|
|
169
|
+
word-break: break-all;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.zx-scope a[href]:empty::after,
|
|
173
|
+
.zx-scope a[href].zx-icon-btn::after,
|
|
174
|
+
.zx-scope a:has(> .zx-icon:only-child)::after,
|
|
175
|
+
.zx-scope th a[href]::after,
|
|
176
|
+
.zx-scope td a[href]::after,
|
|
177
|
+
.zx-scope button a[href]::after,
|
|
178
|
+
.zx-scope a[href].zx-btn::after,
|
|
179
|
+
.zx-scope .zx-btn a[href]::after,
|
|
180
|
+
.zx-scope .zx-table a[href]::after,
|
|
181
|
+
.zx-scope .zx-badge a[href]::after,
|
|
182
|
+
.zx-scope a[href].zx-badge::after,
|
|
183
|
+
.zx-scope a[href].zx-entity-ref::after,
|
|
184
|
+
.zx-scope .zx-entity-ref a[href]::after,
|
|
185
|
+
.zx-scope .zx-breadcrumb a[href]::after,
|
|
186
|
+
.zx-scope a[href].zx-stat-tile::after,
|
|
187
|
+
.zx-scope .zx-tabbox a[href]::after,
|
|
188
|
+
.zx-scope .zx-tree a[href]::after,
|
|
189
|
+
.zx-scope .zx-file-item a[href]::after {
|
|
190
|
+
content: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
package/styles/tokens/dark.css
CHANGED
|
@@ -1,49 +1,92 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Tier-2 semantic tokens — dark theme: a
|
|
3
|
-
* translucent white borders (
|
|
2
|
+
* Tier-2 semantic tokens — dark theme: a charcoal page lifted off black, a chrome tone and four
|
|
3
|
+
* surface steps above it, translucent white borders (9%) and inputs (14%), text softened to about
|
|
4
|
+
* 90% white, and restrained secondary text.
|
|
4
5
|
*
|
|
5
|
-
* The accent roles take the light end of the `--zx-accent-*` ramp (300/400/500)
|
|
6
|
-
* theme takes the dark end, so a preset that repoints the ramp
|
|
6
|
+
* The accent roles take the light end of the `--zx-accent-*` ramp (300/400/500) for text, marks,
|
|
7
|
+
* and the focus ring, where the light theme takes the dark end, so a preset that repoints the ramp
|
|
8
|
+
* lands correctly in both. The solid accent is the exception: the primary button keeps the 600 stop
|
|
9
|
+
* with white ink in both themes rather than turning into a bright 400 slab.
|
|
10
|
+
*
|
|
11
|
+
* Every role that mixes another theme-dependent role (hover and current mix the text colour, tones
|
|
12
|
+
* and status fills mix the surface) is restated here, because a custom property resolves where it
|
|
13
|
+
* is declared: inherited from the light block, it would carry light values into a dark region.
|
|
7
14
|
*
|
|
8
15
|
* The `[data-zx-theme="auto"]` block below repeats these assignments under a
|
|
9
16
|
* `prefers-color-scheme` query; CSS has no way to share a declaration block across a media
|
|
10
|
-
* boundary, so the two lists must be kept in sync.
|
|
17
|
+
* boundary, so the two lists must be kept in sync — `tests/unit/tokens.test.js` fails if they drift.
|
|
11
18
|
*/
|
|
12
19
|
[data-zx-theme="dark"] {
|
|
13
20
|
color-scheme: dark;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--zx-color-bg-
|
|
21
|
+
/* The ramp is lifted off black: page, chrome, surface, raised, and the overlay base ascend in
|
|
22
|
+
that order, each mixed from two Zinc stops so a tinted neutral ramp carries through. */
|
|
23
|
+
--zx-color-bg-page: color-mix(in srgb, var(--zx-gray-900) 80%, var(--zx-gray-800));
|
|
24
|
+
/* Chrome sits just above the page and below the canvas: as in light, the working area is the
|
|
25
|
+
brightest column and the navigation and inspector recede. */
|
|
26
|
+
--zx-color-bg-chrome: color-mix(in srgb, var(--zx-color-bg-page) 75%, var(--zx-color-bg-surface));
|
|
27
|
+
--zx-color-bg-surface: color-mix(in srgb, var(--zx-gray-900) 40%, var(--zx-gray-800));
|
|
28
|
+
--zx-color-bg-raised: color-mix(in srgb, var(--zx-gray-800) 90%, var(--zx-gray-700));
|
|
17
29
|
--zx-color-bg-control: color-mix(in srgb, var(--zx-gray-0) 5%, transparent);
|
|
18
|
-
--zx-color-bg-muted: var(--zx-
|
|
19
|
-
--zx-color-bg-hover: color-mix(in srgb, var(--zx-
|
|
20
|
-
--zx-color-bg-
|
|
30
|
+
--zx-color-bg-muted: var(--zx-color-bg-raised);
|
|
31
|
+
--zx-color-bg-hover: color-mix(in srgb, var(--zx-color-text) 5%, transparent);
|
|
32
|
+
--zx-color-bg-current: color-mix(in srgb, var(--zx-color-text) 9%, transparent);
|
|
33
|
+
/* Picked, not current: a tint light enough that muted text on it keeps 4.5:1 under every preset. */
|
|
34
|
+
--zx-color-bg-selected: color-mix(in srgb, var(--zx-accent-400) 13%, var(--zx-color-bg-surface));
|
|
21
35
|
--zx-color-bg-backdrop: color-mix(in srgb, var(--zx-gray-950) 75%, transparent);
|
|
22
|
-
--zx-color-overlay-base: color-mix(in srgb, var(--zx-
|
|
36
|
+
--zx-color-overlay-base: color-mix(in srgb, var(--zx-gray-800) 60%, var(--zx-gray-700));
|
|
23
37
|
--zx-color-overlay-backdrop: color-mix(in srgb, var(--zx-gray-950) 38%, transparent);
|
|
24
|
-
--zx-color-border: color-mix(in srgb, var(--zx-gray-0)
|
|
25
|
-
--zx-color-border-
|
|
26
|
-
--zx-color-border-
|
|
27
|
-
--zx-color-
|
|
38
|
+
--zx-color-border: color-mix(in srgb, var(--zx-gray-0) 9%, transparent);
|
|
39
|
+
--zx-color-border-subtle: color-mix(in srgb, var(--zx-gray-0) 6%, transparent);
|
|
40
|
+
--zx-color-border-strong: color-mix(in srgb, var(--zx-gray-0) 24%, transparent);
|
|
41
|
+
--zx-color-border-control: color-mix(in srgb, var(--zx-gray-0) 14%, transparent);
|
|
42
|
+
/* Text is softened off pure white (about 90%), secondary text sits near 63%. */
|
|
43
|
+
--zx-color-text: var(--zx-gray-200);
|
|
28
44
|
--zx-color-text-muted: var(--zx-gray-400);
|
|
45
|
+
--zx-color-text-subtle: color-mix(in srgb, var(--zx-gray-500) 50%, var(--zx-gray-400));
|
|
29
46
|
--zx-color-text-placeholder: var(--zx-gray-500);
|
|
30
47
|
--zx-color-text-invert: var(--zx-gray-950);
|
|
31
48
|
--zx-color-accent: var(--zx-accent-400);
|
|
32
49
|
--zx-color-accent-hover: var(--zx-accent-300);
|
|
33
50
|
--zx-color-accent-active: var(--zx-accent-500);
|
|
34
|
-
--zx-color-accent-subtle: color-mix(in srgb, var(--zx-accent-400) 16%, var(--zx-
|
|
51
|
+
--zx-color-accent-subtle: color-mix(in srgb, var(--zx-accent-400) 16%, var(--zx-color-bg-surface));
|
|
35
52
|
--zx-color-on-accent: var(--zx-gray-950);
|
|
53
|
+
/* The primary button does not glow: it keeps the 600 stop and white ink, as in light. */
|
|
54
|
+
--zx-color-accent-solid: var(--zx-accent-600);
|
|
55
|
+
--zx-color-accent-solid-hover: var(--zx-accent-700);
|
|
56
|
+
--zx-color-accent-solid-active: color-mix(in srgb, var(--zx-accent-700) 82%, var(--zx-gray-950));
|
|
57
|
+
--zx-color-on-accent-solid: var(--zx-gray-0);
|
|
58
|
+
/* Danger's tint is a little lighter than the other statuses' so its ink keeps 4.5:1 on it. */
|
|
36
59
|
--zx-color-danger: var(--zx-red-400);
|
|
37
|
-
--zx-color-danger-bg: color-mix(in srgb, var(--zx-red-400)
|
|
60
|
+
--zx-color-danger-bg: color-mix(in srgb, var(--zx-red-400) 13%, var(--zx-color-bg-surface));
|
|
38
61
|
--zx-color-warning: var(--zx-amber-400);
|
|
39
|
-
--zx-color-warning-bg: color-mix(in srgb, var(--zx-amber-400) 16%, var(--zx-
|
|
62
|
+
--zx-color-warning-bg: color-mix(in srgb, var(--zx-amber-400) 16%, var(--zx-color-bg-surface));
|
|
40
63
|
--zx-color-success: var(--zx-green-400);
|
|
41
|
-
--zx-color-success-bg: color-mix(in srgb, var(--zx-green-400) 16%, var(--zx-
|
|
64
|
+
--zx-color-success-bg: color-mix(in srgb, var(--zx-green-400) 16%, var(--zx-color-bg-surface));
|
|
42
65
|
--zx-color-info: var(--zx-blue-400);
|
|
43
|
-
--zx-color-info-bg: color-mix(in srgb, var(--zx-blue-400) 16%, var(--zx-
|
|
66
|
+
--zx-color-info-bg: color-mix(in srgb, var(--zx-blue-400) 16%, var(--zx-color-bg-surface));
|
|
67
|
+
--zx-color-tone-blue-bg: color-mix(in srgb, var(--zx-tone-blue-500) 20%, var(--zx-color-bg-surface));
|
|
68
|
+
--zx-color-tone-blue-fg: var(--zx-tone-blue-300);
|
|
69
|
+
--zx-color-tone-teal-bg: color-mix(in srgb, var(--zx-tone-teal-500) 20%, var(--zx-color-bg-surface));
|
|
70
|
+
--zx-color-tone-teal-fg: var(--zx-tone-teal-300);
|
|
71
|
+
--zx-color-tone-green-bg: color-mix(in srgb, var(--zx-tone-green-500) 20%, var(--zx-color-bg-surface));
|
|
72
|
+
--zx-color-tone-green-fg: var(--zx-tone-green-300);
|
|
73
|
+
--zx-color-tone-amber-bg: color-mix(in srgb, var(--zx-tone-amber-500) 20%, var(--zx-color-bg-surface));
|
|
74
|
+
--zx-color-tone-amber-fg: var(--zx-tone-amber-300);
|
|
75
|
+
--zx-color-tone-orange-bg: color-mix(in srgb, var(--zx-tone-orange-500) 20%, var(--zx-color-bg-surface));
|
|
76
|
+
--zx-color-tone-orange-fg: var(--zx-tone-orange-300);
|
|
77
|
+
--zx-color-tone-red-bg: color-mix(in srgb, var(--zx-tone-red-500) 20%, var(--zx-color-bg-surface));
|
|
78
|
+
--zx-color-tone-red-fg: var(--zx-tone-red-300);
|
|
79
|
+
--zx-color-tone-pink-bg: color-mix(in srgb, var(--zx-tone-pink-500) 20%, var(--zx-color-bg-surface));
|
|
80
|
+
--zx-color-tone-pink-fg: var(--zx-tone-pink-300);
|
|
81
|
+
--zx-color-tone-violet-bg: color-mix(in srgb, var(--zx-tone-violet-500) 20%, var(--zx-color-bg-surface));
|
|
82
|
+
--zx-color-tone-violet-fg: var(--zx-tone-violet-300);
|
|
83
|
+
--zx-color-tone-slate-bg: color-mix(in srgb, var(--zx-tone-slate-500) 20%, var(--zx-color-bg-surface));
|
|
84
|
+
--zx-color-tone-slate-fg: var(--zx-tone-slate-300);
|
|
44
85
|
--zx-color-ring: var(--zx-color-accent);
|
|
45
86
|
--zx-focus-ring: 0 0 0 3px color-mix(in srgb, var(--zx-color-ring) 45%, transparent);
|
|
46
87
|
--zx-overlay-shadow: 0 12px 36px rgb(0 0 0 / 45%);
|
|
88
|
+
/* A shadow alone barely reads on a dark canvas, so the lifted item also gets a faint light rim. */
|
|
89
|
+
--zx-drag-shadow: 0 0 0 1px color-mix(in srgb, var(--zx-gray-0) 7%, transparent), 0 2px 6px -1px rgb(0 0 0 / 40%), 0 14px 32px -6px rgb(0 0 0 / 60%);
|
|
47
90
|
--zx-header-bg: var(--zx-gray-900);
|
|
48
91
|
--zx-header-text: var(--zx-gray-50);
|
|
49
92
|
}
|
|
@@ -51,39 +94,72 @@
|
|
|
51
94
|
@media (prefers-color-scheme: dark) {
|
|
52
95
|
[data-zx-theme="auto"] {
|
|
53
96
|
color-scheme: dark;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
--zx-color-bg-
|
|
97
|
+
/* The ramp is lifted off black: page, chrome, surface, raised, and the overlay base ascend in
|
|
98
|
+
that order, each mixed from two Zinc stops so a tinted neutral ramp carries through. */
|
|
99
|
+
--zx-color-bg-page: color-mix(in srgb, var(--zx-gray-900) 80%, var(--zx-gray-800));
|
|
100
|
+
/* Chrome sits just above the page and below the canvas: as in light, the working area is the
|
|
101
|
+
brightest column and the navigation and inspector recede. */
|
|
102
|
+
--zx-color-bg-chrome: color-mix(in srgb, var(--zx-color-bg-page) 75%, var(--zx-color-bg-surface));
|
|
103
|
+
--zx-color-bg-surface: color-mix(in srgb, var(--zx-gray-900) 40%, var(--zx-gray-800));
|
|
104
|
+
--zx-color-bg-raised: color-mix(in srgb, var(--zx-gray-800) 90%, var(--zx-gray-700));
|
|
57
105
|
--zx-color-bg-control: color-mix(in srgb, var(--zx-gray-0) 5%, transparent);
|
|
58
|
-
--zx-color-bg-muted: var(--zx-
|
|
59
|
-
--zx-color-bg-hover: color-mix(in srgb, var(--zx-
|
|
60
|
-
--zx-color-bg-
|
|
106
|
+
--zx-color-bg-muted: var(--zx-color-bg-raised);
|
|
107
|
+
--zx-color-bg-hover: color-mix(in srgb, var(--zx-color-text) 5%, transparent);
|
|
108
|
+
--zx-color-bg-current: color-mix(in srgb, var(--zx-color-text) 9%, transparent);
|
|
109
|
+
--zx-color-bg-selected: color-mix(in srgb, var(--zx-accent-400) 13%, var(--zx-color-bg-surface));
|
|
61
110
|
--zx-color-bg-backdrop: color-mix(in srgb, var(--zx-gray-950) 75%, transparent);
|
|
62
|
-
--zx-color-overlay-base: color-mix(in srgb, var(--zx-
|
|
111
|
+
--zx-color-overlay-base: color-mix(in srgb, var(--zx-gray-800) 60%, var(--zx-gray-700));
|
|
63
112
|
--zx-color-overlay-backdrop: color-mix(in srgb, var(--zx-gray-950) 38%, transparent);
|
|
64
|
-
--zx-color-border: color-mix(in srgb, var(--zx-gray-0)
|
|
65
|
-
--zx-color-border-
|
|
66
|
-
--zx-color-border-
|
|
67
|
-
--zx-color-
|
|
113
|
+
--zx-color-border: color-mix(in srgb, var(--zx-gray-0) 9%, transparent);
|
|
114
|
+
--zx-color-border-subtle: color-mix(in srgb, var(--zx-gray-0) 6%, transparent);
|
|
115
|
+
--zx-color-border-strong: color-mix(in srgb, var(--zx-gray-0) 24%, transparent);
|
|
116
|
+
--zx-color-border-control: color-mix(in srgb, var(--zx-gray-0) 14%, transparent);
|
|
117
|
+
/* Text is softened off pure white (about 90%), secondary text sits near 63%. */
|
|
118
|
+
--zx-color-text: var(--zx-gray-200);
|
|
68
119
|
--zx-color-text-muted: var(--zx-gray-400);
|
|
120
|
+
--zx-color-text-subtle: color-mix(in srgb, var(--zx-gray-500) 50%, var(--zx-gray-400));
|
|
69
121
|
--zx-color-text-placeholder: var(--zx-gray-500);
|
|
70
122
|
--zx-color-text-invert: var(--zx-gray-950);
|
|
71
123
|
--zx-color-accent: var(--zx-accent-400);
|
|
72
124
|
--zx-color-accent-hover: var(--zx-accent-300);
|
|
73
125
|
--zx-color-accent-active: var(--zx-accent-500);
|
|
74
|
-
--zx-color-accent-subtle: color-mix(in srgb, var(--zx-accent-400) 16%, var(--zx-
|
|
126
|
+
--zx-color-accent-subtle: color-mix(in srgb, var(--zx-accent-400) 16%, var(--zx-color-bg-surface));
|
|
75
127
|
--zx-color-on-accent: var(--zx-gray-950);
|
|
128
|
+
/* The primary button does not glow: it keeps the 600 stop and white ink, as in light. */
|
|
129
|
+
--zx-color-accent-solid: var(--zx-accent-600);
|
|
130
|
+
--zx-color-accent-solid-hover: var(--zx-accent-700);
|
|
131
|
+
--zx-color-accent-solid-active: color-mix(in srgb, var(--zx-accent-700) 82%, var(--zx-gray-950));
|
|
132
|
+
--zx-color-on-accent-solid: var(--zx-gray-0);
|
|
76
133
|
--zx-color-danger: var(--zx-red-400);
|
|
77
|
-
--zx-color-danger-bg: color-mix(in srgb, var(--zx-red-400)
|
|
134
|
+
--zx-color-danger-bg: color-mix(in srgb, var(--zx-red-400) 13%, var(--zx-color-bg-surface));
|
|
78
135
|
--zx-color-warning: var(--zx-amber-400);
|
|
79
|
-
--zx-color-warning-bg: color-mix(in srgb, var(--zx-amber-400) 16%, var(--zx-
|
|
136
|
+
--zx-color-warning-bg: color-mix(in srgb, var(--zx-amber-400) 16%, var(--zx-color-bg-surface));
|
|
80
137
|
--zx-color-success: var(--zx-green-400);
|
|
81
|
-
--zx-color-success-bg: color-mix(in srgb, var(--zx-green-400) 16%, var(--zx-
|
|
138
|
+
--zx-color-success-bg: color-mix(in srgb, var(--zx-green-400) 16%, var(--zx-color-bg-surface));
|
|
82
139
|
--zx-color-info: var(--zx-blue-400);
|
|
83
|
-
--zx-color-info-bg: color-mix(in srgb, var(--zx-blue-400) 16%, var(--zx-
|
|
140
|
+
--zx-color-info-bg: color-mix(in srgb, var(--zx-blue-400) 16%, var(--zx-color-bg-surface));
|
|
141
|
+
--zx-color-tone-blue-bg: color-mix(in srgb, var(--zx-tone-blue-500) 20%, var(--zx-color-bg-surface));
|
|
142
|
+
--zx-color-tone-blue-fg: var(--zx-tone-blue-300);
|
|
143
|
+
--zx-color-tone-teal-bg: color-mix(in srgb, var(--zx-tone-teal-500) 20%, var(--zx-color-bg-surface));
|
|
144
|
+
--zx-color-tone-teal-fg: var(--zx-tone-teal-300);
|
|
145
|
+
--zx-color-tone-green-bg: color-mix(in srgb, var(--zx-tone-green-500) 20%, var(--zx-color-bg-surface));
|
|
146
|
+
--zx-color-tone-green-fg: var(--zx-tone-green-300);
|
|
147
|
+
--zx-color-tone-amber-bg: color-mix(in srgb, var(--zx-tone-amber-500) 20%, var(--zx-color-bg-surface));
|
|
148
|
+
--zx-color-tone-amber-fg: var(--zx-tone-amber-300);
|
|
149
|
+
--zx-color-tone-orange-bg: color-mix(in srgb, var(--zx-tone-orange-500) 20%, var(--zx-color-bg-surface));
|
|
150
|
+
--zx-color-tone-orange-fg: var(--zx-tone-orange-300);
|
|
151
|
+
--zx-color-tone-red-bg: color-mix(in srgb, var(--zx-tone-red-500) 20%, var(--zx-color-bg-surface));
|
|
152
|
+
--zx-color-tone-red-fg: var(--zx-tone-red-300);
|
|
153
|
+
--zx-color-tone-pink-bg: color-mix(in srgb, var(--zx-tone-pink-500) 20%, var(--zx-color-bg-surface));
|
|
154
|
+
--zx-color-tone-pink-fg: var(--zx-tone-pink-300);
|
|
155
|
+
--zx-color-tone-violet-bg: color-mix(in srgb, var(--zx-tone-violet-500) 20%, var(--zx-color-bg-surface));
|
|
156
|
+
--zx-color-tone-violet-fg: var(--zx-tone-violet-300);
|
|
157
|
+
--zx-color-tone-slate-bg: color-mix(in srgb, var(--zx-tone-slate-500) 20%, var(--zx-color-bg-surface));
|
|
158
|
+
--zx-color-tone-slate-fg: var(--zx-tone-slate-300);
|
|
84
159
|
--zx-color-ring: var(--zx-color-accent);
|
|
85
160
|
--zx-focus-ring: 0 0 0 3px color-mix(in srgb, var(--zx-color-ring) 45%, transparent);
|
|
86
161
|
--zx-overlay-shadow: 0 12px 36px rgb(0 0 0 / 45%);
|
|
162
|
+
--zx-drag-shadow: 0 0 0 1px color-mix(in srgb, var(--zx-gray-0) 7%, transparent), 0 2px 6px -1px rgb(0 0 0 / 40%), 0 14px 32px -6px rgb(0 0 0 / 60%);
|
|
87
163
|
--zx-header-bg: var(--zx-gray-900);
|
|
88
164
|
--zx-header-text: var(--zx-gray-50);
|
|
89
165
|
}
|
package/styles/tokens/global.css
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Tier-1 palette and primitives.
|
|
3
3
|
*
|
|
4
4
|
* The neutral ramp uses Zinc-like values; the accent ramp uses an emerald progression anchored at
|
|
5
|
-
* 400 to the ZeyOS brand green #21cc75. Inter
|
|
6
|
-
* interfaces without coupling the token contract to another UI toolkit.
|
|
5
|
+
* 400 to the ZeyOS brand green #21cc75. Inter, one spacing unit, and small proportional radii
|
|
6
|
+
* support dense business interfaces without coupling the token contract to another UI toolkit.
|
|
7
7
|
*
|
|
8
8
|
* Only tier-2 semantic tokens (tokens/semantic.css, tokens/dark.css) may reference these.
|
|
9
9
|
* Component CSS must never use them directly — tests/lint-tokens.js enforces that.
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
--zx-gray-900: #18181b;
|
|
25
25
|
--zx-gray-950: #09090b;
|
|
26
26
|
|
|
27
|
-
/*
|
|
28
|
-
--zx-
|
|
29
|
-
--zx-
|
|
30
|
-
--zx-
|
|
31
|
-
--zx-
|
|
32
|
-
--zx-
|
|
27
|
+
/* Brand — an emerald ramp with the ZeyOS brand green at 400. The accent, never a status. */
|
|
28
|
+
--zx-emerald-300: #5ee9b5;
|
|
29
|
+
--zx-emerald-400: #21cc75;
|
|
30
|
+
--zx-emerald-500: #009966;
|
|
31
|
+
--zx-emerald-600: #007a55;
|
|
32
|
+
--zx-emerald-700: #006045;
|
|
33
33
|
|
|
34
34
|
/*
|
|
35
35
|
* Accent ramp — the indirection the semantic tier reads. It defaults to the Emerald ramp
|
|
@@ -37,13 +37,21 @@
|
|
|
37
37
|
* every semantic mapping: `tokens/themes.css` repoints these, and light, dark, and auto all
|
|
38
38
|
* follow because each of them picks its own stop off the ramp.
|
|
39
39
|
*/
|
|
40
|
-
--zx-accent-300: var(--zx-
|
|
41
|
-
--zx-accent-400: var(--zx-
|
|
42
|
-
--zx-accent-500: var(--zx-
|
|
43
|
-
--zx-accent-600: var(--zx-
|
|
44
|
-
--zx-accent-700: var(--zx-
|
|
40
|
+
--zx-accent-300: var(--zx-emerald-300);
|
|
41
|
+
--zx-accent-400: var(--zx-emerald-400);
|
|
42
|
+
--zx-accent-500: var(--zx-emerald-500);
|
|
43
|
+
--zx-accent-600: var(--zx-emerald-600);
|
|
44
|
+
--zx-accent-700: var(--zx-emerald-700);
|
|
45
45
|
|
|
46
|
-
/*
|
|
46
|
+
/*
|
|
47
|
+
* Status. Green is a yellow-green (OKLCH hue 130) so that "succeeded" never reads as the
|
|
48
|
+
* brand: the default accent sits at hue 155–165, and the two are told apart at a glance.
|
|
49
|
+
*/
|
|
50
|
+
--zx-green-300: #b3e87a;
|
|
51
|
+
--zx-green-400: #90cd40;
|
|
52
|
+
--zx-green-500: #6ba211;
|
|
53
|
+
--zx-green-600: #4d7800;
|
|
54
|
+
--zx-green-700: #3d5e06;
|
|
47
55
|
--zx-red-400: #ff6467;
|
|
48
56
|
--zx-red-500: #e7000b;
|
|
49
57
|
--zx-red-600: #c10007;
|
|
@@ -54,21 +62,67 @@
|
|
|
54
62
|
--zx-blue-500: #2b7fff;
|
|
55
63
|
--zx-blue-600: #155dfc;
|
|
56
64
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
--zx-
|
|
65
|
+
/*
|
|
66
|
+
* Tone ramps — the categorical palette behind tags, chips, icon tiles, avatars, and chart
|
|
67
|
+
* series. It is deliberately neither the accent nor the status set: nine hues built on one
|
|
68
|
+
* recipe in OKLCH (300 at L 0.86, 500 at L 0.60, 700 at L 0.46, moderate chroma), so every
|
|
69
|
+
* tone carries the same visual weight and none of them shouts. The semantic tier mixes 500 into
|
|
70
|
+
* the surface for a tone's fill and takes 700 (light) or 300 (dark) for its ink.
|
|
71
|
+
*/
|
|
72
|
+
--zx-tone-blue-300: #b3d4ff;
|
|
73
|
+
--zx-tone-blue-500: #3a81d7;
|
|
74
|
+
--zx-tone-blue-700: #1d589d;
|
|
75
|
+
--zx-tone-teal-300: #a8ddda;
|
|
76
|
+
--zx-tone-teal-500: #009390;
|
|
77
|
+
--zx-tone-teal-700: #006663;
|
|
78
|
+
--zx-tone-green-300: #b5deb5;
|
|
79
|
+
--zx-tone-green-500: #419547;
|
|
80
|
+
--zx-tone-green-700: #226929;
|
|
81
|
+
--zx-tone-amber-300: #eacc9b;
|
|
82
|
+
--zx-tone-amber-500: #a77600;
|
|
83
|
+
--zx-tone-amber-700: #745100;
|
|
84
|
+
--zx-tone-orange-300: #fbc3a7;
|
|
85
|
+
--zx-tone-orange-500: #c55f1d;
|
|
86
|
+
--zx-tone-orange-700: #8e3c00;
|
|
87
|
+
--zx-tone-red-300: #ffbfb8;
|
|
88
|
+
--zx-tone-red-500: #ca5551;
|
|
89
|
+
--zx-tone-red-700: #923432;
|
|
90
|
+
--zx-tone-pink-300: #f6bfd7;
|
|
91
|
+
--zx-tone-pink-500: #bc598c;
|
|
92
|
+
--zx-tone-pink-700: #873761;
|
|
93
|
+
--zx-tone-violet-300: #d4c8fe;
|
|
94
|
+
--zx-tone-violet-500: #886acf;
|
|
95
|
+
--zx-tone-violet-700: #5e4697;
|
|
96
|
+
--zx-tone-slate-300: #cad2dd;
|
|
97
|
+
--zx-tone-slate-500: #728295;
|
|
98
|
+
--zx-tone-slate-700: #4d5969;
|
|
99
|
+
|
|
100
|
+
/*
|
|
101
|
+
* Spacing — one unit, eight steps. Every step is a multiple of `--zx-space-unit`, so an
|
|
102
|
+
* application tightens or loosens its whole rhythm with one declaration rather than eight.
|
|
103
|
+
* At the default unit the steps are 4 / 8 / 12 / 16 / 20 / 24 / 32 / 40px.
|
|
104
|
+
*/
|
|
105
|
+
--zx-space-unit: 4px;
|
|
106
|
+
--zx-space-1: calc(var(--zx-space-unit) * 1);
|
|
107
|
+
--zx-space-2: calc(var(--zx-space-unit) * 2);
|
|
108
|
+
--zx-space-3: calc(var(--zx-space-unit) * 3);
|
|
109
|
+
--zx-space-4: calc(var(--zx-space-unit) * 4);
|
|
110
|
+
--zx-space-5: calc(var(--zx-space-unit) * 5);
|
|
111
|
+
--zx-space-6: calc(var(--zx-space-unit) * 6);
|
|
112
|
+
--zx-space-7: calc(var(--zx-space-unit) * 8);
|
|
113
|
+
--zx-space-8: calc(var(--zx-space-unit) * 10);
|
|
65
114
|
|
|
66
|
-
/*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
115
|
+
/*
|
|
116
|
+
* Radius — one base, proportional steps, so a theme that scales `--zx-radius` keeps the
|
|
117
|
+
* relationship between a menu item, a control, and the panel around them. At the default base
|
|
118
|
+
* the steps are 2 / 3 / 4 / 6px. `-full` is for shapes whose roundness is the meaning: badges,
|
|
119
|
+
* avatars, toggles, progress tracks.
|
|
120
|
+
*/
|
|
121
|
+
--zx-radius: 4px;
|
|
122
|
+
--zx-radius-sm: calc(var(--zx-radius) * .5);
|
|
123
|
+
--zx-radius-md: calc(var(--zx-radius) * .75);
|
|
70
124
|
--zx-radius-lg: var(--zx-radius);
|
|
71
|
-
--zx-radius-xl: calc(var(--zx-radius)
|
|
125
|
+
--zx-radius-xl: calc(var(--zx-radius) * 1.5);
|
|
72
126
|
--zx-radius-full: 999px;
|
|
73
127
|
|
|
74
128
|
--zx-font-sans: Inter, "Inter Variable", ui-sans-serif, system-ui, -apple-system,
|
|
@@ -81,12 +135,52 @@
|
|
|
81
135
|
--zx-text-lg: 16px;
|
|
82
136
|
--zx-text-xl: 18px;
|
|
83
137
|
--zx-text-2xl: 24px;
|
|
138
|
+
--zx-text-3xl: 30px;
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* Weight and tracking. Interface text sits at the mid weights — medium for labels and rows,
|
|
142
|
+
* semibold for headings and the current item; heavier is for titles and figures only. UI text
|
|
143
|
+
* runs slightly tight (the root sets it), titles a little tighter.
|
|
144
|
+
*/
|
|
145
|
+
--zx-weight-medium: 500;
|
|
146
|
+
--zx-weight-semibold: 600;
|
|
147
|
+
--zx-tracking-tight: -0.01em;
|
|
148
|
+
--zx-tracking-title: -0.015em;
|
|
84
149
|
|
|
85
150
|
--zx-shadow-1: 0 1px 2px 0 rgb(9 9 11 / 5%);
|
|
86
151
|
--zx-shadow-2: 0 1px 3px 0 rgb(9 9 11 / 10%), 0 1px 2px -1px rgb(9 9 11 / 10%);
|
|
87
152
|
--zx-shadow-3: 0 10px 15px -3px rgb(9 9 11 / 10%), 0 4px 6px -4px rgb(9 9 11 / 10%);
|
|
88
153
|
|
|
154
|
+
/*
|
|
155
|
+
* Motion. Two durations and three named curves: `--zx-ease` for state changes (hover, colour,
|
|
156
|
+
* a fade), `--zx-ease-spring` for things that pop in — a small overshoot of about 3%, never a
|
|
157
|
+
* bounce — and `--zx-ease-drawer` for panels that slide: a decisive ease-out that covers most of
|
|
158
|
+
* the distance at once and settles, so a drawer feels like it arrives rather than drifts.
|
|
159
|
+
*/
|
|
89
160
|
--zx-dur-fast: 120ms;
|
|
90
161
|
--zx-dur-base: 180ms;
|
|
91
162
|
--zx-ease: cubic-bezier(.2, .6, .3, 1);
|
|
163
|
+
--zx-ease-spring: cubic-bezier(.34, 1.32, .64, 1);
|
|
164
|
+
--zx-ease-drawer: cubic-bezier(.32, .72, 0, 1);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/*
|
|
168
|
+
* Motion as a setting. `data-zx-motion="reduced"` on any element — usually `<html>`, from an
|
|
169
|
+
* application's own preference — stops movement inside it: every duration becomes 0ms here, and
|
|
170
|
+
* `base.css` stops the CSS animations and transitions that do not read a token. The operating
|
|
171
|
+
* system's reduced-motion preference does the same for the whole page. There is deliberately no
|
|
172
|
+
* value that turns motion back on: a person who asked their system for less motion gets less,
|
|
173
|
+
* whatever an application or a region says. `src/core/motion.js` answers the same question for
|
|
174
|
+
* script (`prefersReducedMotion`, `watchMotion`).
|
|
175
|
+
*/
|
|
176
|
+
[data-zx-motion="reduced"] {
|
|
177
|
+
--zx-dur-fast: 0ms;
|
|
178
|
+
--zx-dur-base: 0ms;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (prefers-reduced-motion: reduce) {
|
|
182
|
+
:root {
|
|
183
|
+
--zx-dur-fast: 0ms;
|
|
184
|
+
--zx-dur-base: 0ms;
|
|
185
|
+
}
|
|
92
186
|
}
|