@attrus-ds/core 0.1.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/LICENSE +27 -0
- package/README.md +123 -0
- package/dist/assets/flags/Brazil-rounded.svg +16 -0
- package/dist/assets/flags/Brazil-square.svg +17 -0
- package/dist/assets/flags/Chile-rounded.svg +11 -0
- package/dist/assets/flags/Chile-square.svg +11 -0
- package/dist/assets/flags/Colombia-rounded.svg +10 -0
- package/dist/assets/flags/Colombia-square.svg +10 -0
- package/dist/assets/flags/EUA-rounded.svg +11 -0
- package/dist/assets/flags/EUA-square.svg +11 -0
- package/dist/assets/flags/EUR-rounded.svg +9 -0
- package/dist/assets/flags/EUR-square.svg +9 -0
- package/dist/assets/flags/Mexico-rounded.svg +19 -0
- package/dist/assets/flags/Mexico-square.svg +19 -0
- package/dist/assets/icon-attrus-dark.svg +3 -0
- package/dist/assets/icon-attrus-light.svg +3 -0
- package/dist/assets/logo-attrus-dark.svg +8 -0
- package/dist/assets/logo-attrus-light.svg +8 -0
- package/dist/css/components/buttons.css +301 -0
- package/dist/css/components/callout.css +195 -0
- package/dist/css/components/cards.css +272 -0
- package/dist/css/components/combobox.css +303 -0
- package/dist/css/components/empty-states.css +61 -0
- package/dist/css/components/inputs.css +1027 -0
- package/dist/css/components/number-input.css +138 -0
- package/dist/css/components/overlays.css +405 -0
- package/dist/css/components/primitives.css +305 -0
- package/dist/css/components/sidebar.css +179 -0
- package/dist/css/components/status-pills.css +207 -0
- package/dist/css/components/stepper.css +309 -0
- package/dist/css/components/table.css +600 -0
- package/dist/css/components/tabs.css +319 -0
- package/dist/css/components/toast.css +239 -0
- package/dist/css/components/tooltip.css +226 -0
- package/dist/css/components/topbar.css +148 -0
- package/dist/css/fonts.css +91 -0
- package/dist/css/index.css +23 -0
- package/dist/css/tokens.css +691 -0
- package/dist/fonts/LICENSE-JetBrainsMono.txt +93 -0
- package/dist/fonts/LICENSE-Lato.txt +93 -0
- package/dist/fonts/jetbrains-mono-latin-400-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-500-normal.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-latin-600-normal.woff2 +0 -0
- package/dist/fonts/lato-latin-100-normal.woff2 +0 -0
- package/dist/fonts/lato-latin-300-italic.woff2 +0 -0
- package/dist/fonts/lato-latin-300-normal.woff2 +0 -0
- package/dist/fonts/lato-latin-400-italic.woff2 +0 -0
- package/dist/fonts/lato-latin-400-normal.woff2 +0 -0
- package/dist/fonts/lato-latin-700-italic.woff2 +0 -0
- package/dist/fonts/lato-latin-700-normal.woff2 +0 -0
- package/dist/fonts/lato-latin-900-normal.woff2 +0 -0
- package/dist/tokens/attrus-tokens.flat.json +1235 -0
- package/dist/tokens/attrus-tokens.json +1090 -0
- package/package.json +46 -0
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
/* ============================================================
|
|
2
|
+
STEPPER — multi-step flow indicator (navigation)
|
|
3
|
+
Horizontal for wizards (top-of-form), vertical for long
|
|
4
|
+
onboardings (sidebar). Four step states: todo / current /
|
|
5
|
+
done / error. Optional skipped state for non-linear flows.
|
|
6
|
+
|
|
7
|
+
Markup contract:
|
|
8
|
+
<ol class="stepper" aria-label="…">
|
|
9
|
+
<li class="step is-done">
|
|
10
|
+
<a class="step-marker" href="…"><i data-lucide="check"></i></a>
|
|
11
|
+
<div class="step-body">
|
|
12
|
+
<span class="step-label">…</span>
|
|
13
|
+
<span class="step-help">…</span>
|
|
14
|
+
</div>
|
|
15
|
+
</li>
|
|
16
|
+
<li class="step is-current" aria-current="step">…</li>
|
|
17
|
+
<li class="step">…</li>
|
|
18
|
+
</ol>
|
|
19
|
+
|
|
20
|
+
The connector line between steps is drawn with a pseudo-
|
|
21
|
+
element on .step (::after for horizontal, ::after on the
|
|
22
|
+
marker's vertical track for vertical). Last child hides it.
|
|
23
|
+
============================================================ */
|
|
24
|
+
|
|
25
|
+
/* ---------- Container ---------- */
|
|
26
|
+
.stepper {
|
|
27
|
+
list-style: none;
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: 0;
|
|
33
|
+
font-family: var(--font-sans);
|
|
34
|
+
color: var(--color-foreground-default);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* ---------- Step (the row/column unit) ---------- */
|
|
38
|
+
.step {
|
|
39
|
+
flex: 1 1 0;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: flex-start;
|
|
43
|
+
gap: var(--space-3);
|
|
44
|
+
position: relative;
|
|
45
|
+
color: var(--color-foreground-muted);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Connector line — drawn from this step's marker to the next */
|
|
49
|
+
.step::after {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
background: var(--color-border-default);
|
|
53
|
+
z-index: 0;
|
|
54
|
+
}
|
|
55
|
+
.step:last-child::after { display: none; }
|
|
56
|
+
|
|
57
|
+
/* ---------- Marker (the numbered circle) ---------- */
|
|
58
|
+
.step-marker {
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
border-radius: var(--radius-pill);
|
|
66
|
+
background: var(--color-background-surface);
|
|
67
|
+
border: 1.5px solid var(--color-border-default);
|
|
68
|
+
font-family: var(--font-mono);
|
|
69
|
+
font-size: var(--fs-sm);
|
|
70
|
+
font-weight: var(--w-semibold);
|
|
71
|
+
color: var(--color-foreground-muted);
|
|
72
|
+
text-decoration: none;
|
|
73
|
+
transition: var(--transition-fast);
|
|
74
|
+
position: relative;
|
|
75
|
+
z-index: 1;
|
|
76
|
+
}
|
|
77
|
+
.step-marker i, .step-marker svg {
|
|
78
|
+
width: 14px;
|
|
79
|
+
height: 14px;
|
|
80
|
+
stroke-width: 2.4;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Anchor markers (clickable past steps) get a focus ring */
|
|
84
|
+
a.step-marker:hover { border-color: var(--color-border-strong); }
|
|
85
|
+
a.step-marker:focus-visible {
|
|
86
|
+
outline: none;
|
|
87
|
+
box-shadow: var(--shadow-focus);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ---------- Body (label + helper) ---------- */
|
|
91
|
+
.step-body {
|
|
92
|
+
flex: 1;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
padding-top: var(--space-1);
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
gap: 2px;
|
|
98
|
+
}
|
|
99
|
+
.step-label {
|
|
100
|
+
font-size: var(--fs-sm);
|
|
101
|
+
font-weight: var(--w-semibold);
|
|
102
|
+
letter-spacing: var(--ls-title);
|
|
103
|
+
color: var(--color-foreground-secondary);
|
|
104
|
+
line-height: var(--lh-tight);
|
|
105
|
+
}
|
|
106
|
+
.step-help {
|
|
107
|
+
font-size: var(--fs-xs);
|
|
108
|
+
color: var(--color-foreground-muted);
|
|
109
|
+
line-height: var(--lh-snug);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ============================================================
|
|
113
|
+
STATES
|
|
114
|
+
============================================================ */
|
|
115
|
+
|
|
116
|
+
/* --- todo (default, future steps) --- */
|
|
117
|
+
/* No modifier — base styles above. */
|
|
118
|
+
|
|
119
|
+
/* --- current (the active step) ---
|
|
120
|
+
Fill uses accent-700 (#1E6DC4) — NOT accent-500 — because the marker carries
|
|
121
|
+
white text/number: white-on-Sky-500 is only 2.94:1 (fails WCAG AA), while
|
|
122
|
+
white-on-accent-700 is 5.20:1 (passes). Stays in the Sky family; reads as the
|
|
123
|
+
energetic "active" state without the contrast failure. See accent-highlights.html. */
|
|
124
|
+
.step.is-current .step-marker {
|
|
125
|
+
background: var(--color-brand-accent-700);
|
|
126
|
+
border-color: var(--color-brand-accent-700);
|
|
127
|
+
color: var(--color-foreground-on-solid);
|
|
128
|
+
box-shadow: var(--shadow-focus);
|
|
129
|
+
}
|
|
130
|
+
.step.is-current .step-label {
|
|
131
|
+
color: var(--color-foreground-default);
|
|
132
|
+
font-weight: var(--w-bold);
|
|
133
|
+
}
|
|
134
|
+
.step.is-current .step-help {
|
|
135
|
+
color: var(--color-foreground-secondary);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* --- done (completed steps) --- */
|
|
139
|
+
.step.is-done .step-marker {
|
|
140
|
+
background: var(--color-feedback-success-foreground);
|
|
141
|
+
border-color: var(--color-feedback-success-foreground);
|
|
142
|
+
color: var(--color-foreground-on-solid);
|
|
143
|
+
}
|
|
144
|
+
.step.is-done .step-label {
|
|
145
|
+
color: var(--color-foreground-default);
|
|
146
|
+
}
|
|
147
|
+
.step.is-done::after {
|
|
148
|
+
background: var(--color-feedback-success-foreground);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* --- error --- */
|
|
152
|
+
.step.is-error .step-marker {
|
|
153
|
+
background: var(--color-feedback-danger-background);
|
|
154
|
+
border-color: var(--color-feedback-danger-border);
|
|
155
|
+
color: var(--color-feedback-danger-foreground);
|
|
156
|
+
}
|
|
157
|
+
.step.is-error .step-label {
|
|
158
|
+
color: var(--color-feedback-danger-foreground);
|
|
159
|
+
font-weight: var(--w-bold);
|
|
160
|
+
}
|
|
161
|
+
.step.is-error .step-help {
|
|
162
|
+
color: var(--color-feedback-danger-foreground);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* --- skipped (non-linear flows, user jumped past) --- */
|
|
166
|
+
.step.is-skipped .step-marker {
|
|
167
|
+
background: var(--color-background-subtle);
|
|
168
|
+
border-style: dashed;
|
|
169
|
+
color: var(--color-foreground-muted);
|
|
170
|
+
}
|
|
171
|
+
.step.is-skipped .step-label {
|
|
172
|
+
color: var(--color-foreground-muted);
|
|
173
|
+
text-decoration: line-through;
|
|
174
|
+
text-decoration-thickness: 1px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* ============================================================
|
|
178
|
+
ORIENTATION — Horizontal (default)
|
|
179
|
+
============================================================ */
|
|
180
|
+
.stepper {
|
|
181
|
+
flex-direction: row;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.stepper .step {
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
text-align: center;
|
|
188
|
+
gap: var(--space-3);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Horizontal connector — from this marker's right edge to next marker's left */
|
|
192
|
+
.stepper .step::after {
|
|
193
|
+
top: 15px; /* center of 32px marker */
|
|
194
|
+
left: calc(50% + 20px); /* edge of marker + small gap */
|
|
195
|
+
right: calc(-50% + 20px);
|
|
196
|
+
height: 2px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.stepper .step-body {
|
|
200
|
+
align-items: center;
|
|
201
|
+
padding-top: 0;
|
|
202
|
+
max-width: 16ch;
|
|
203
|
+
}
|
|
204
|
+
.stepper .step-label { text-align: center; }
|
|
205
|
+
.stepper .step-help { text-align: center; }
|
|
206
|
+
|
|
207
|
+
/* ============================================================
|
|
208
|
+
ORIENTATION — Vertical
|
|
209
|
+
============================================================ */
|
|
210
|
+
.stepper.is-vertical {
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
align-items: stretch;
|
|
213
|
+
gap: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.stepper.is-vertical .step {
|
|
217
|
+
flex: 0 0 auto;
|
|
218
|
+
flex-direction: row;
|
|
219
|
+
align-items: flex-start;
|
|
220
|
+
text-align: left;
|
|
221
|
+
gap: var(--space-4);
|
|
222
|
+
padding-bottom: var(--space-7);
|
|
223
|
+
}
|
|
224
|
+
.stepper.is-vertical .step:last-child { padding-bottom: 0; }
|
|
225
|
+
|
|
226
|
+
/* Vertical connector — from this marker's bottom to next marker's top */
|
|
227
|
+
.stepper.is-vertical .step::after {
|
|
228
|
+
top: 36px; /* below the marker */
|
|
229
|
+
left: 15px; /* center of marker */
|
|
230
|
+
width: 2px;
|
|
231
|
+
bottom: var(--space-1);
|
|
232
|
+
height: auto;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.stepper.is-vertical .step-body {
|
|
236
|
+
padding-top: var(--space-1);
|
|
237
|
+
max-width: none;
|
|
238
|
+
padding-bottom: 0;
|
|
239
|
+
}
|
|
240
|
+
.stepper.is-vertical .step-label { text-align: left; }
|
|
241
|
+
.stepper.is-vertical .step-help { text-align: left; }
|
|
242
|
+
|
|
243
|
+
/* ============================================================
|
|
244
|
+
SIZE — Compact
|
|
245
|
+
For dense surfaces (drawer headers, table-row mini-flows).
|
|
246
|
+
============================================================ */
|
|
247
|
+
.stepper.is-compact .step-marker {
|
|
248
|
+
width: 24px;
|
|
249
|
+
height: 24px;
|
|
250
|
+
font-size: var(--fs-xs);
|
|
251
|
+
}
|
|
252
|
+
.stepper.is-compact .step-marker i,
|
|
253
|
+
.stepper.is-compact .step-marker svg { width: 11px; height: 11px; }
|
|
254
|
+
.stepper.is-compact .step-label { font-size: var(--fs-xs); }
|
|
255
|
+
.stepper.is-compact .step-help { font-size: var(--fs-xxs); }
|
|
256
|
+
.stepper.is-compact .step::after { top: 11px; }
|
|
257
|
+
.stepper.is-compact.is-vertical .step::after { top: 28px; left: 11px; }
|
|
258
|
+
|
|
259
|
+
/* ============================================================
|
|
260
|
+
VARIANT — Numbered without circles (line-rule style)
|
|
261
|
+
For minimalist top-of-form indicators where vertical space
|
|
262
|
+
is precious. Removes circle; uses a 4px capsule + label.
|
|
263
|
+
============================================================ */
|
|
264
|
+
.stepper.is-rule .step {
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
align-items: stretch;
|
|
267
|
+
gap: var(--space-2);
|
|
268
|
+
padding: 0;
|
|
269
|
+
}
|
|
270
|
+
.stepper.is-rule .step::after { display: none; }
|
|
271
|
+
.stepper.is-rule .step-marker {
|
|
272
|
+
width: auto;
|
|
273
|
+
height: 4px;
|
|
274
|
+
border-radius: var(--radius-pill);
|
|
275
|
+
background: var(--color-border-default);
|
|
276
|
+
border: none;
|
|
277
|
+
font-size: 0;
|
|
278
|
+
}
|
|
279
|
+
.stepper.is-rule .step-marker i,
|
|
280
|
+
.stepper.is-rule .step-marker svg { display: none; }
|
|
281
|
+
.stepper.is-rule .step-body { padding-top: 0; align-items: flex-start; max-width: none; }
|
|
282
|
+
.stepper.is-rule .step-label {
|
|
283
|
+
text-align: left;
|
|
284
|
+
font-family: var(--font-mono);
|
|
285
|
+
font-size: var(--fs-xxs);
|
|
286
|
+
text-transform: uppercase;
|
|
287
|
+
letter-spacing: var(--ls-caps);
|
|
288
|
+
font-weight: var(--w-semibold);
|
|
289
|
+
}
|
|
290
|
+
.stepper.is-rule .step.is-done .step-marker { background: var(--color-feedback-success-foreground); }
|
|
291
|
+
.stepper.is-rule .step.is-current .step-marker { background: var(--color-brand-accent-700); box-shadow: none; }
|
|
292
|
+
.stepper.is-rule .step.is-error .step-marker { background: var(--color-feedback-danger-foreground); }
|
|
293
|
+
|
|
294
|
+
/* ============================================================
|
|
295
|
+
Responsive — Collapse labels at narrow widths
|
|
296
|
+
The wizard pattern: keep markers + connector visible, hide
|
|
297
|
+
labels to save space. Caller opts in with .is-collapse-sm.
|
|
298
|
+
============================================================ */
|
|
299
|
+
@media (max-width: 640px) {
|
|
300
|
+
.stepper.is-collapse-sm .step-body { display: none; }
|
|
301
|
+
.stepper.is-collapse-sm .step { gap: 0; }
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* ============================================================
|
|
305
|
+
Reduced motion
|
|
306
|
+
============================================================ */
|
|
307
|
+
@media (prefers-reduced-motion: reduce) {
|
|
308
|
+
.step-marker { transition: none; }
|
|
309
|
+
}
|