zeus-css 1.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/README.md +81 -0
- package/bin/init.js +89 -0
- package/dist/zeus.css +8456 -0
- package/dist/zeus.min.css +1 -0
- package/package.json +44 -0
- package/scss/.stylelintrc.json +41 -0
- package/scss/API.md +168 -0
- package/scss/CHANGELOG.md +281 -0
- package/scss/LICENSE +21 -0
- package/scss/README.md +160 -0
- package/scss/cheatsheet.md +249 -0
- package/scss/dist/zeus.css +8465 -0
- package/scss/dist/zeus.css.map +1 -0
- package/scss/dist/zeus.min.css +1 -0
- package/scss/dist/zeus.min.css.map +1 -0
- package/scss/foundation/core/_api.scss +10 -0
- package/scss/foundation/core/_design.scss +33 -0
- package/scss/foundation/core/_engine.scss +18 -0
- package/scss/foundation/core/buttons/variants.scss +72 -0
- package/scss/foundation/core/design/_design-system.scss +41 -0
- package/scss/foundation/core/design/_validate.scss +114 -0
- package/scss/foundation/core/design/borders/border-line.scss +29 -0
- package/scss/foundation/core/design/borders/border-radius.scss +31 -0
- package/scss/foundation/core/design/buttons/sizes.scss +32 -0
- package/scss/foundation/core/design/colors/_color-derivation.scss +80 -0
- package/scss/foundation/core/design/colors/base-colors.scss +31 -0
- package/scss/foundation/core/design/colors/semantic-colors.scss +130 -0
- package/scss/foundation/core/design/core/basic.scss +40 -0
- package/scss/foundation/core/design/dimensions/sizes.scss +29 -0
- package/scss/foundation/core/design/dimensions/spaces.scss +42 -0
- package/scss/foundation/core/design/effects/_z-index.scss +30 -0
- package/scss/foundation/core/design/effects/shadows.scss +65 -0
- package/scss/foundation/core/design/layout/grid.scss +86 -0
- package/scss/foundation/core/design/typography/typography.scss +435 -0
- package/scss/foundation/core/engine/_fluid-core.scss +54 -0
- package/scss/foundation/core/engine/animations.scss +91 -0
- package/scss/foundation/core/engine/buttons.scss +226 -0
- package/scss/foundation/core/engine/color-api.scss +37 -0
- package/scss/foundation/core/engine/helpers.scss +39 -0
- package/scss/foundation/core/engine/layout.scss +156 -0
- package/scss/foundation/core/engine/responsive.scss +67 -0
- package/scss/foundation/core/engine/shadows.scss +186 -0
- package/scss/foundation/core/engine/shortcuts.scss +30 -0
- package/scss/foundation/core/engine/sizing.scss +49 -0
- package/scss/foundation/core/engine/theme-builder.scss +83 -0
- package/scss/foundation/core/engine/typographics.scss +44 -0
- package/scss/foundation/core/engine/typography-calc.scss +71 -0
- package/scss/foundation/foundation.scss +29 -0
- package/scss/foundation/views/_render.scss +13 -0
- package/scss/foundation/views/components/_alert.scss +103 -0
- package/scss/foundation/views/components/_avatar.scss +84 -0
- package/scss/foundation/views/components/_badge.scss +100 -0
- package/scss/foundation/views/components/_breadcrumb.scss +70 -0
- package/scss/foundation/views/components/_card.scss +117 -0
- package/scss/foundation/views/components/_dropdown.scss +123 -0
- package/scss/foundation/views/components/_form.scss +209 -0
- package/scss/foundation/views/components/_index.scss +20 -0
- package/scss/foundation/views/components/_modal.scss +138 -0
- package/scss/foundation/views/components/_pagination.scss +82 -0
- package/scss/foundation/views/components/_skeleton.scss +69 -0
- package/scss/foundation/views/components/_table.scss +94 -0
- package/scss/foundation/views/components/_tabs.scss +96 -0
- package/scss/foundation/views/components/_toast.scss +139 -0
- package/scss/foundation/views/components/_tooltip.scss +100 -0
- package/scss/foundation/views/patterns/_hero.scss +121 -0
- package/scss/foundation/views/patterns/_index.scss +8 -0
- package/scss/foundation/views/patterns/_sidebar-layout.scss +83 -0
- package/scss/foundation/views/render/_layer-order.scss +11 -0
- package/scss/foundation/views/render/classes/_animations.scss +233 -0
- package/scss/foundation/views/render/classes/_aspect-ratio.scss +17 -0
- package/scss/foundation/views/render/classes/_borders.scss +31 -0
- package/scss/foundation/views/render/classes/_buttons.scss +40 -0
- package/scss/foundation/views/render/classes/_colors.scss +83 -0
- package/scss/foundation/views/render/classes/_compounds.scss +103 -0
- package/scss/foundation/views/render/classes/_containers.scss +20 -0
- package/scss/foundation/views/render/classes/_misc-utils.scss +51 -0
- package/scss/foundation/views/render/classes/_position.scss +56 -0
- package/scss/foundation/views/render/classes/_sections.scss +30 -0
- package/scss/foundation/views/render/classes/_shadows.scss +198 -0
- package/scss/foundation/views/render/classes/_sizes.scss +39 -0
- package/scss/foundation/views/render/classes/_sizing-utils.scss +53 -0
- package/scss/foundation/views/render/classes/_spacing.scss +91 -0
- package/scss/foundation/views/render/classes/_state-variants.scss +47 -0
- package/scss/foundation/views/render/classes/_typography.scss +32 -0
- package/scss/foundation/views/render/classes/_utilities.scss +103 -0
- package/scss/foundation/views/render/classes/_z-index.scss +22 -0
- package/scss/foundation/views/render/classes/flexbox.scss +56 -0
- package/scss/foundation/views/render/classes/grid.scss +195 -0
- package/scss/foundation/views/render/classes.scss +116 -0
- package/scss/foundation/views/render/html-body.scss +54 -0
- package/scss/foundation/views/render/property-registration.scss +77 -0
- package/scss/foundation/views/render/reset.scss +147 -0
- package/scss/foundation/views/render/root-generator.scss +166 -0
- package/scss/foundation/views/render/root.scss +19 -0
- package/scss/foundation/views/render/typography.scss +129 -0
- package/scss/llms.txt +247 -0
- package/scss/package.json +89 -0
- package/scss/scripts/gen-cheatsheet.mjs +178 -0
- package/scss/scripts/gen-tokens.mjs +91 -0
- package/scss/scripts/test-compile.mjs +474 -0
- package/scss/zeus.config.scss +99 -0
- package/scss/zeus.customize.scss +246 -0
- package/scss/zeus.scss +17 -0
- package/scss/zeus.token.sets.example.scss +176 -0
- package/scss/zeus.tokens.json +687 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Form ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for form controls. ║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@use "../../../zeus.config" as config;
|
|
8
|
+
@use "../../core/engine" as *;
|
|
9
|
+
@use "../../core/design" as *;
|
|
10
|
+
|
|
11
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
12
|
+
// ║ 📝 Form Components ║
|
|
13
|
+
// ║ ║
|
|
14
|
+
// ║ Accessible, token-driven form controls: text input, ║
|
|
15
|
+
// ║ textarea, select, checkbox, and radio — built on the same ║
|
|
16
|
+
// ║ semantic color/spacing/typography tokens as every other ║
|
|
17
|
+
// ║ component. States: default, hover, :focus-visible, disabled, ║
|
|
18
|
+
// ║ and an explicit invalid/error modifier. ║
|
|
19
|
+
// ║ ║
|
|
20
|
+
// ║ Usage: ║
|
|
21
|
+
// ║ <div class="z-field"> ║
|
|
22
|
+
// ║ <label class="z-label" for="email">Email</label> ║
|
|
23
|
+
// ║ <input class="z-input" id="email" type="email" /> ║
|
|
24
|
+
// ║ <p class="z-field__helper">We'll never share it.</p> ║
|
|
25
|
+
// ║ </div> ║
|
|
26
|
+
// ║ ║
|
|
27
|
+
// ║ <div class="z-field z-field--invalid"> ║
|
|
28
|
+
// ║ <label class="z-label" for="pw">Password</label> ║
|
|
29
|
+
// ║ <input class="z-input" id="pw" type="password" /> ║
|
|
30
|
+
// ║ <p class="z-field__error">Must be at least 8 characters.</p>║
|
|
31
|
+
// ║ </div> ║
|
|
32
|
+
// ║ ║
|
|
33
|
+
// ║ <label class="z-checkbox"> ║
|
|
34
|
+
// ║ <input type="checkbox" /> Remember me ║
|
|
35
|
+
// ║ </label> ║
|
|
36
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
37
|
+
|
|
38
|
+
@layer components {
|
|
39
|
+
|
|
40
|
+
// ── Shared control base — input / textarea / select ─────────
|
|
41
|
+
// Private: not emitted on its own, applied via @extend-free @include
|
|
42
|
+
// inside each concrete control below so every one stays a real,
|
|
43
|
+
// independent, overridable class (no forced specificity chains).
|
|
44
|
+
@mixin _z-control-base() {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
@include padding("sm", "y");
|
|
48
|
+
@include padding("md", "x");
|
|
49
|
+
@include border-radius("sm");
|
|
50
|
+
@include text("body-sm");
|
|
51
|
+
background: var(--color-surface);
|
|
52
|
+
color: var(--color-text);
|
|
53
|
+
border: var(--border-line-sm) solid var(--color-border);
|
|
54
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
55
|
+
appearance: none;
|
|
56
|
+
|
|
57
|
+
&::placeholder {
|
|
58
|
+
color: var(--color-text-muted);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:hover:not(:disabled, :focus-visible) {
|
|
62
|
+
border-color: var(--color-border-strong);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:focus-visible {
|
|
66
|
+
// A fully transparent outline is invisible here (box-shadow is the
|
|
67
|
+
// real focus affordance) but browsers still paint outlines with a
|
|
68
|
+
// system color under forced-colors mode regardless of the author
|
|
69
|
+
// color — so keyboard focus stays visible even when box-shadow (which
|
|
70
|
+
// forced-colors strips entirely) disappears.
|
|
71
|
+
outline: 2px solid transparent;
|
|
72
|
+
outline-offset: 2px;
|
|
73
|
+
border-color: var(--color-primary);
|
|
74
|
+
box-shadow: 0 0 0 3px oklch(from var(--color-primary) l c h / 0.15);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&:disabled {
|
|
78
|
+
opacity: 0.55;
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
background: var(--color-border);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ── Field wrapper ─────────────────────────────────────────────
|
|
85
|
+
.z-field {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
gap: var(--space-2xs);
|
|
89
|
+
|
|
90
|
+
&__helper {
|
|
91
|
+
@include text("caption");
|
|
92
|
+
color: var(--color-text-muted);
|
|
93
|
+
margin: 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&__error {
|
|
97
|
+
@include text("caption");
|
|
98
|
+
color: var(--base-system-error);
|
|
99
|
+
margin: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Invalid modifier — recolors whichever control lives inside.
|
|
103
|
+
&--invalid {
|
|
104
|
+
.z-input,
|
|
105
|
+
.z-textarea,
|
|
106
|
+
.z-select {
|
|
107
|
+
border-color: var(--base-system-error);
|
|
108
|
+
|
|
109
|
+
&:focus-visible {
|
|
110
|
+
border-color: var(--base-system-error);
|
|
111
|
+
box-shadow: 0 0 0 3px oklch(from var(--base-system-error) l c h / 0.15);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// ── Label ─────────────────────────────────────────────────────
|
|
118
|
+
.z-label {
|
|
119
|
+
@include text("label");
|
|
120
|
+
color: var(--color-text);
|
|
121
|
+
|
|
122
|
+
&--required::after {
|
|
123
|
+
content: " *";
|
|
124
|
+
color: var(--base-system-error);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ── Text input ────────────────────────────────────────────────
|
|
129
|
+
.z-input {
|
|
130
|
+
@include _z-control-base();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// ── Textarea ──────────────────────────────────────────────────
|
|
134
|
+
.z-textarea {
|
|
135
|
+
@include _z-control-base();
|
|
136
|
+
min-height: 6em;
|
|
137
|
+
resize: vertical;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// ── Select ────────────────────────────────────────────────────
|
|
141
|
+
// appearance: none (from the shared base) removes the native arrow in
|
|
142
|
+
// every evergreen browser; a CSS-only chevron is drawn via background
|
|
143
|
+
// so no icon asset or JS is required.
|
|
144
|
+
.z-select {
|
|
145
|
+
@include _z-control-base();
|
|
146
|
+
padding-inline-end: var(--space-2xl);
|
|
147
|
+
background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
|
|
148
|
+
linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
|
|
149
|
+
// Chevron sits at the inline-end edge. background-position has no logical
|
|
150
|
+
// (inline-end-relative) form yet, so LTR draws from the right and :dir(rtl)
|
|
151
|
+
// flips it to draw from the left — same visual position in both directions.
|
|
152
|
+
background-position: right 20px center, right 15px center;
|
|
153
|
+
background-size: 5px 5px, 5px 5px;
|
|
154
|
+
background-repeat: no-repeat;
|
|
155
|
+
cursor: pointer;
|
|
156
|
+
|
|
157
|
+
&:dir(rtl) {
|
|
158
|
+
background-position: left 20px center, left 15px center;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
&:disabled {
|
|
162
|
+
cursor: not-allowed;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ── Checkbox & Radio ──────────────────────────────────────────
|
|
167
|
+
// Uses the native `accent-color` property to theme the control itself
|
|
168
|
+
// (fully accessible, no pseudo-element re-implementation needed) and
|
|
169
|
+
// only adds layout + label spacing around it.
|
|
170
|
+
.z-checkbox,
|
|
171
|
+
.z-radio {
|
|
172
|
+
display: inline-flex;
|
|
173
|
+
align-items: center;
|
|
174
|
+
gap: var(--space-xs);
|
|
175
|
+
@include text("body-sm");
|
|
176
|
+
color: var(--color-text);
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
|
|
179
|
+
input {
|
|
180
|
+
accent-color: var(--color-primary);
|
|
181
|
+
width: 1.15em;
|
|
182
|
+
height: 1.15em;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
cursor: inherit;
|
|
185
|
+
|
|
186
|
+
&:disabled {
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
opacity: 0.55;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&:focus-visible {
|
|
192
|
+
outline: $focus-ring;
|
|
193
|
+
outline-offset: 2px;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:has(input:disabled) {
|
|
198
|
+
color: var(--color-text-muted);
|
|
199
|
+
cursor: not-allowed;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ── Grouped checkboxes / radios ───────────────────────────────
|
|
204
|
+
.z-field-group {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
gap: var(--space-sm);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Index ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for the index component. ║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@forward "./card";
|
|
8
|
+
@forward "./modal";
|
|
9
|
+
@forward "./form";
|
|
10
|
+
@forward "./badge";
|
|
11
|
+
@forward "./alert";
|
|
12
|
+
@forward "./avatar";
|
|
13
|
+
@forward "./table";
|
|
14
|
+
@forward "./breadcrumb";
|
|
15
|
+
@forward "./pagination";
|
|
16
|
+
@forward "./tabs";
|
|
17
|
+
@forward "./tooltip";
|
|
18
|
+
@forward "./dropdown";
|
|
19
|
+
@forward "./toast";
|
|
20
|
+
@forward "./skeleton";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Modal ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for the modal component. ║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@use "../../../zeus.config" as config;
|
|
8
|
+
@use "../../core/engine" as *;
|
|
9
|
+
|
|
10
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
11
|
+
// ║ 🪟 Modal / Dialog Component ║
|
|
12
|
+
// ║ ║
|
|
13
|
+
// ║ Accessible overlay dialog with backdrop, header, ║
|
|
14
|
+
// ║ scrollable body and sticky footer. ║
|
|
15
|
+
// ║ ║
|
|
16
|
+
// ║ Usage: ║
|
|
17
|
+
// ║ <dialog class="z-modal" open> ║
|
|
18
|
+
// ║ <header class="z-modal__header"> ║
|
|
19
|
+
// ║ <h2 class="z-modal__title">…</h2> ║
|
|
20
|
+
// ║ <button class="z-modal__close">×</button> ║
|
|
21
|
+
// ║ </header> ║
|
|
22
|
+
// ║ <div class="z-modal__body">…</div> ║
|
|
23
|
+
// ║ <footer class="z-modal__footer">…</footer> ║
|
|
24
|
+
// ║ </dialog> ║
|
|
25
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
26
|
+
|
|
27
|
+
@layer components {
|
|
28
|
+
// ── Backdrop ───────────────────────────────────────────────
|
|
29
|
+
// Two paths to the same look, for two ways of opening the modal:
|
|
30
|
+
// .z-modal-backdrop is a manual sibling element (any open/close approach).
|
|
31
|
+
// ::backdrop is painted automatically by the browser when a <dialog> is
|
|
32
|
+
// opened via .showModal() — style it too so that path needs no extra markup.
|
|
33
|
+
.z-modal-backdrop {
|
|
34
|
+
position: fixed;
|
|
35
|
+
inset: 0;
|
|
36
|
+
background: rgba(0, 0, 0, 0.5);
|
|
37
|
+
backdrop-filter: blur(4px);
|
|
38
|
+
z-index: var(--z-modal-backdrop);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.z-modal::backdrop {
|
|
42
|
+
background: rgba(0, 0, 0, 0.5);
|
|
43
|
+
backdrop-filter: blur(4px);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// ── Modal container ────────────────────────────────────────
|
|
47
|
+
.z-modal {
|
|
48
|
+
position: fixed;
|
|
49
|
+
inset: 0;
|
|
50
|
+
margin: auto;
|
|
51
|
+
width: min(90dvw, 560px);
|
|
52
|
+
max-height: 85dvh;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
@include border-radius("lg");
|
|
55
|
+
background: var(--color-surface);
|
|
56
|
+
box-shadow: var(--shadow-xl);
|
|
57
|
+
border: var(--border-line-xs) solid var(--color-border);
|
|
58
|
+
z-index: var(--z-modal);
|
|
59
|
+
|
|
60
|
+
// Reset native dialog styling — display only when open, hidden otherwise
|
|
61
|
+
&[open] {
|
|
62
|
+
display: flex;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:not([open]) {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// ── Header ───────────────────────────────────────────────
|
|
70
|
+
&__header {
|
|
71
|
+
@include padding("lg", "x");
|
|
72
|
+
@include padding("md", "y");
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: space-between;
|
|
76
|
+
border-bottom: var(--border-line-xs) solid var(--color-border);
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ── Title ────────────────────────────────────────────────
|
|
81
|
+
&__title {
|
|
82
|
+
@include text("h4");
|
|
83
|
+
color: var(--color-text);
|
|
84
|
+
margin: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ── Close button ─────────────────────────────────────────
|
|
88
|
+
&__close {
|
|
89
|
+
appearance: none;
|
|
90
|
+
border: none;
|
|
91
|
+
background: transparent;
|
|
92
|
+
@include text("h4");
|
|
93
|
+
color: var(--color-text-muted);
|
|
94
|
+
cursor: pointer;
|
|
95
|
+
padding: 0;
|
|
96
|
+
line-height: 1;
|
|
97
|
+
|
|
98
|
+
&:hover {
|
|
99
|
+
color: var(--color-text);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// ── Body (scrollable) ───────────────────────────────────
|
|
104
|
+
&__body {
|
|
105
|
+
@include padding("lg");
|
|
106
|
+
overflow-y: auto;
|
|
107
|
+
flex: 1 1 auto;
|
|
108
|
+
@include text("body");
|
|
109
|
+
color: var(--color-text);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// ── Footer ───────────────────────────────────────────────
|
|
113
|
+
&__footer {
|
|
114
|
+
@include padding("lg", "x");
|
|
115
|
+
@include padding("md", "y");
|
|
116
|
+
border-top: var(--border-line-xs) solid var(--color-border);
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: flex-end;
|
|
119
|
+
gap: var(--space-sm);
|
|
120
|
+
flex-shrink: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ── Size modifiers ───────────────────────────────────────
|
|
124
|
+
&--sm {
|
|
125
|
+
width: min(90dvw, 400px);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&--lg {
|
|
129
|
+
width: min(90dvw, 800px);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&--fullscreen {
|
|
133
|
+
width: 100dvw;
|
|
134
|
+
max-height: 100dvh;
|
|
135
|
+
border-radius: 0;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Pagination ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for pagination. ║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@use "../../core/engine" as *;
|
|
8
|
+
@use "../../core/design" as *;
|
|
9
|
+
|
|
10
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
11
|
+
// ║ 🔢 Pagination Component ║
|
|
12
|
+
// ║ ║
|
|
13
|
+
// ║ Usage: ║
|
|
14
|
+
// ║ <nav class="z-pagination" aria-label="Pagination"> ║
|
|
15
|
+
// ║ <ul> ║
|
|
16
|
+
// ║ <li><a class="z-pagination__link" href="#p1">1</a></li> ║
|
|
17
|
+
// ║ <li><a class="z-pagination__link z-pagination__link--active"║
|
|
18
|
+
// ║ href="#p2" aria-current="page">2</a></li> ║
|
|
19
|
+
// ║ <li><span class="z-pagination__ellipsis">…</span></li> ║
|
|
20
|
+
// ║ </ul> ║
|
|
21
|
+
// ║ </nav> ║
|
|
22
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
23
|
+
|
|
24
|
+
@layer components {
|
|
25
|
+
.z-pagination {
|
|
26
|
+
ul {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--space-3xs);
|
|
30
|
+
list-style: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__link {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
min-width: 2.25rem;
|
|
40
|
+
height: 2.25rem;
|
|
41
|
+
@include padding("2xs", "x");
|
|
42
|
+
@include border-radius("sm");
|
|
43
|
+
@include text("body-sm");
|
|
44
|
+
color: var(--color-text);
|
|
45
|
+
text-decoration: none;
|
|
46
|
+
border: var(--border-line-xs) solid transparent;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
|
|
49
|
+
&:hover:not(&--active, &--disabled) {
|
|
50
|
+
background: var(--color-surface-subtle);
|
|
51
|
+
border-color: var(--color-border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
outline: $focus-ring;
|
|
56
|
+
outline-offset: 2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--active {
|
|
60
|
+
background: var(--color-primary);
|
|
61
|
+
color: var(--color-text-inverse);
|
|
62
|
+
cursor: default;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&--disabled {
|
|
66
|
+
color: var(--color-text-muted);
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&__ellipsis {
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
min-width: 2.25rem;
|
|
78
|
+
height: 2.25rem;
|
|
79
|
+
color: var(--color-text-muted);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Skeleton ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for the skeleton component.║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@use "../../core/engine" as *;
|
|
8
|
+
|
|
9
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
10
|
+
// ║ 💀 Skeleton Component ║
|
|
11
|
+
// ║ ║
|
|
12
|
+
// ║ Pure CSS — no popover, no positioning, no JS. A loading ║
|
|
13
|
+
// ║ placeholder is static content in normal flow, so there's ║
|
|
14
|
+
// ║ nothing here that the Phase 2 popover decision applies to. ║
|
|
15
|
+
// ║ ║
|
|
16
|
+
// ║ Usage: ║
|
|
17
|
+
// ║ <div class="z-skeleton z-skeleton--text"></div> ║
|
|
18
|
+
// ║ <div class="z-skeleton z-skeleton--title"></div> ║
|
|
19
|
+
// ║ <div class="z-skeleton z-skeleton--avatar"></div> ║
|
|
20
|
+
// ║ <div class="z-skeleton z-skeleton--block" style="height:120px"></div> ║
|
|
21
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
22
|
+
|
|
23
|
+
@layer components {
|
|
24
|
+
.z-skeleton {
|
|
25
|
+
display: block;
|
|
26
|
+
@include border-radius("sm");
|
|
27
|
+
background: linear-gradient(
|
|
28
|
+
90deg,
|
|
29
|
+
var(--color-surface-subtle) 25%,
|
|
30
|
+
var(--color-border) 50%,
|
|
31
|
+
var(--color-surface-subtle) 75%
|
|
32
|
+
);
|
|
33
|
+
background-size: 200% 100%;
|
|
34
|
+
animation: zeus-skeleton-shimmer 1.6s ease-in-out infinite;
|
|
35
|
+
// Every placeholder shape hides its stand-in content from assistive
|
|
36
|
+
// tech the same way — the region announcing "loading" (aria-busy on a
|
|
37
|
+
// shared ancestor) is the consumer's job, not this component's.
|
|
38
|
+
color: transparent;
|
|
39
|
+
user-select: none;
|
|
40
|
+
|
|
41
|
+
&--text {
|
|
42
|
+
height: 0.9em;
|
|
43
|
+
width: 100%;
|
|
44
|
+
@include margin("3xs", "y");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&--title {
|
|
48
|
+
height: 1.4em;
|
|
49
|
+
width: 60%;
|
|
50
|
+
@include margin("2xs", "y");
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&--avatar {
|
|
54
|
+
width: var(--size-icon-lg);
|
|
55
|
+
height: var(--size-icon-lg);
|
|
56
|
+
border-radius: 50%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&--block {
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (prefers-reduced-motion: reduce) {
|
|
65
|
+
animation: none;
|
|
66
|
+
background: var(--color-surface-subtle);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
2
|
+
// ║ ⚡ Zeus CSS — Table ║
|
|
3
|
+
// ║ ║
|
|
4
|
+
// ║ Core structural and visual styles for the table component. ║
|
|
5
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
6
|
+
|
|
7
|
+
@use "../../core/engine" as *;
|
|
8
|
+
|
|
9
|
+
// ╔══════════════════════════════════════════════════════════════╗
|
|
10
|
+
// ║ 📊 Table Component ║
|
|
11
|
+
// ║ ║
|
|
12
|
+
// ║ Pure CSS, zero JS dependency. .z-table-wrap provides the ║
|
|
13
|
+
// ║ horizontal-scroll container — always wrap wide tables in it ║
|
|
14
|
+
// ║ rather than letting them overflow the page. ║
|
|
15
|
+
// ║ ║
|
|
16
|
+
// ║ Usage: ║
|
|
17
|
+
// ║ <div class="z-table-wrap"> ║
|
|
18
|
+
// ║ <table class="z-table z-table--striped"> ║
|
|
19
|
+
// ║ <thead><tr><th>Name</th><th>Status</th></tr></thead> ║
|
|
20
|
+
// ║ <tbody><tr><td>Zeus</td><td>Active</td></tr></tbody> ║
|
|
21
|
+
// ║ </table> ║
|
|
22
|
+
// ║ </div> ║
|
|
23
|
+
// ╚══════════════════════════════════════════════════════════════╝
|
|
24
|
+
|
|
25
|
+
@layer components {
|
|
26
|
+
.z-table-wrap {
|
|
27
|
+
overflow-x: auto;
|
|
28
|
+
@include border-radius("sm");
|
|
29
|
+
border: var(--border-line-xs) solid var(--color-border);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.z-table {
|
|
33
|
+
width: 100%;
|
|
34
|
+
border-collapse: collapse;
|
|
35
|
+
@include text("body-sm");
|
|
36
|
+
color: var(--color-text);
|
|
37
|
+
|
|
38
|
+
caption {
|
|
39
|
+
@include padding("sm");
|
|
40
|
+
@include text("caption");
|
|
41
|
+
color: var(--color-text-muted);
|
|
42
|
+
text-align: start;
|
|
43
|
+
caption-side: bottom;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
th,
|
|
47
|
+
td {
|
|
48
|
+
@include padding("sm", "y");
|
|
49
|
+
@include padding("md", "x");
|
|
50
|
+
text-align: start;
|
|
51
|
+
vertical-align: middle;
|
|
52
|
+
border-bottom: var(--border-line-xs) solid var(--color-border);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
th {
|
|
56
|
+
@include text("caption-bold");
|
|
57
|
+
color: var(--color-text-muted);
|
|
58
|
+
background: var(--color-surface-subtle);
|
|
59
|
+
white-space: nowrap;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
tbody tr:last-child td {
|
|
63
|
+
border-bottom: none;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
tbody tr:hover td {
|
|
67
|
+
background: var(--color-surface-subtle);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ── Modifiers ────────────────────────────────────────────
|
|
71
|
+
&--striped tbody tr:nth-child(even) td {
|
|
72
|
+
background: var(--color-surface-subtle);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&--bordered {
|
|
76
|
+
th,
|
|
77
|
+
td {
|
|
78
|
+
border-inline-end: var(--border-line-xs) solid var(--color-border);
|
|
79
|
+
|
|
80
|
+
&:last-child {
|
|
81
|
+
border-inline-end: none;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&--compact {
|
|
87
|
+
th,
|
|
88
|
+
td {
|
|
89
|
+
@include padding("2xs", "y");
|
|
90
|
+
@include padding("sm", "x");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|