@attrus-ds/core 0.1.0 → 0.1.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/README.md +19 -1
- package/dist/css/tokens.css +100 -96
- package/dist/tokens/attrus-tokens.flat.json +1 -1
- package/dist/tokens/attrus-tokens.json +1 -1
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -108,8 +108,26 @@ for additive changes, `major` for breaking token/API changes.
|
|
|
108
108
|
|
|
109
109
|
## Local development
|
|
110
110
|
|
|
111
|
+
Source lives under `src/`, organized by concern:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
src/
|
|
115
|
+
├── index.css # dev entry — fonts + tokens + typography + components
|
|
116
|
+
├── tokens/ # design tokens, split by concern (3-layer architecture)
|
|
117
|
+
│ ├── index.css # barrel (cascade order)
|
|
118
|
+
│ ├── palette.css # layer 1 — raw, theme-agnostic primitives
|
|
119
|
+
│ ├── color-semantic.css # layer 2 — semantic color roles (components consume these)
|
|
120
|
+
│ ├── gradients.css · data-viz.css · glass.css
|
|
121
|
+
│ ├── radius.css · elevation.css · spacing.css · iconography.css · motion.css
|
|
122
|
+
│ ├── typography.css # type scale / weights / line-height / tracking tokens
|
|
123
|
+
│ └── theme-dark.css # [data-theme="dark"] semantic overrides
|
|
124
|
+
├── typography/index.css # ready-to-use type classes + text utilities
|
|
125
|
+
└── components/ # one stylesheet per component domain (+ index.css barrel)
|
|
126
|
+
```
|
|
127
|
+
|
|
111
128
|
The published artifact is assembled into `dist/` by a dependency-free Node
|
|
112
|
-
script
|
|
129
|
+
script (`scripts/build.mjs`). The token partials are concatenated into a single
|
|
130
|
+
`dist/css/tokens.css`, so consumer import paths are unchanged.
|
|
113
131
|
|
|
114
132
|
```bash
|
|
115
133
|
npm install
|
package/dist/css/tokens.css
CHANGED
|
@@ -1,19 +1,14 @@
|
|
|
1
|
+
/* @attrus/cabiros — design tokens + type classes (concatenated).
|
|
2
|
+
Generated by scripts/build.mjs from src/tokens/ and src/typography/. */
|
|
3
|
+
|
|
1
4
|
/* ============================================================
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
operations across LATAM. Cool bluish grays. Deep navy.
|
|
7
|
-
Primary brand blue. Liquid-glass-friendly translucency.
|
|
5
|
+
ATTRUS / Cabiros — BASE PALETTE (raw color tokens)
|
|
6
|
+
The primitive layer. Theme-agnostic. Referenced only by the
|
|
7
|
+
semantic layer (color-semantic.css) and effect layers — never
|
|
8
|
+
consumed directly by components.
|
|
8
9
|
============================================================ */
|
|
9
10
|
|
|
10
|
-
/* ---------- Webfont: Lato ---------- */
|
|
11
|
-
|
|
12
11
|
:root {
|
|
13
|
-
/* ============================================================
|
|
14
|
-
1. BASE PALETTE — raw color tokens
|
|
15
|
-
============================================================ */
|
|
16
|
-
|
|
17
12
|
/* --- Brand (from manual: Lato + 4 HEX stops) --- */
|
|
18
13
|
--brand-attrus-ink: #0F0F1A; /* almost-black, blue-tinted */
|
|
19
14
|
--brand-attrus-navy: #002142; /* deep navy */
|
|
@@ -146,13 +141,17 @@
|
|
|
146
141
|
--color-info-700: #144B8C;
|
|
147
142
|
--color-info-800: #0D3A6E;
|
|
148
143
|
--color-info-900: #072951;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* ============================================================
|
|
147
|
+
ATTRUS / Cabiros — SEMANTIC COLOR TOKENS
|
|
148
|
+
Reference the base palette (palette.css). This is the layer
|
|
149
|
+
components consume.
|
|
150
|
+
Roles: default | secondary | muted | accent | placeholder
|
|
151
|
+
Contexts: fg (text/icon), bg (surface), br (border)
|
|
152
|
+
============================================================ */
|
|
149
153
|
|
|
150
|
-
|
|
151
|
-
2. SEMANTIC TOKENS — reference the base palette
|
|
152
|
-
Roles: default | secondary | muted | accent | placeholder
|
|
153
|
-
Contexts: fg (text/icon), bg (surface), br (border)
|
|
154
|
-
============================================================ */
|
|
155
|
-
|
|
154
|
+
:root {
|
|
156
155
|
/* Default (light) theme — the 60% whites/light grays */
|
|
157
156
|
--color-background-canvas: var(--color-neutral-25); /* app background */
|
|
158
157
|
--color-background-surface: var(--color-neutral-0); /* card / container */
|
|
@@ -274,10 +273,13 @@
|
|
|
274
273
|
--color-feedback-danger-foreground-on-inverse-muted: color-mix(in srgb, var(--color-danger-100) 70%, var(--color-foreground-inverse-muted));
|
|
275
274
|
--color-feedback-info-foreground-on-inverse: var(--color-info-100);
|
|
276
275
|
--color-feedback-info-foreground-on-inverse-muted: color-mix(in srgb, var(--color-info-100) 70%, var(--color-foreground-inverse-muted));
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* ============================================================
|
|
279
|
+
ATTRUS / Cabiros — GRADIENTS (primary brand + layers)
|
|
280
|
+
============================================================ */
|
|
277
281
|
|
|
278
|
-
|
|
279
|
-
3. GRADIENTS — primary brand + layers
|
|
280
|
-
============================================================ */
|
|
282
|
+
:root {
|
|
281
283
|
--grad-brand: linear-gradient(135deg, #001A4D 0%, #003399 50%, #3399FF 100%);
|
|
282
284
|
--grad-brand-soft: linear-gradient(135deg, #002A80 0%, #003399 100%);
|
|
283
285
|
--grad-ink: linear-gradient(160deg, #0B1230 0%, #001A4D 55%, #002A80 100%);
|
|
@@ -302,16 +304,19 @@
|
|
|
302
304
|
--grad-data-brand: linear-gradient(180deg,
|
|
303
305
|
color-mix(in srgb, var(--color-brand-accent-500) 30%, transparent) 0%,
|
|
304
306
|
color-mix(in srgb, var(--color-brand-accent-500) 0%, transparent) 100%);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* ============================================================
|
|
310
|
+
ATTRUS / Cabiros — DATA VISUALIZATION (chart palettes & structure)
|
|
311
|
+
Categorical = qualitative series (distinct, on-brand, cool).
|
|
312
|
+
Sequential = single-hue magnitude ramp (Sky).
|
|
313
|
+
Diverging = danger ← neutral → success (variance/heatmap).
|
|
314
|
+
Structure = grid / axis / track / reference (semantic → theme).
|
|
315
|
+
Categorical gets dark-theme overrides (lift the dark hues, in
|
|
316
|
+
theme-dark.css); ramps + structure follow semantic tokens.
|
|
317
|
+
============================================================ */
|
|
305
318
|
|
|
306
|
-
|
|
307
|
-
3b. DATA VISUALIZATION — chart palettes & structure
|
|
308
|
-
Categorical = qualitative series (distinct, on-brand, cool).
|
|
309
|
-
Sequential = single-hue magnitude ramp (Sky).
|
|
310
|
-
Diverging = danger ← neutral → success (variance/heatmap).
|
|
311
|
-
Structure = grid / axis / track / reference (semantic → theme).
|
|
312
|
-
Categorical gets dark-theme overrides (lift the dark hues);
|
|
313
|
-
ramps + structure follow semantic tokens automatically.
|
|
314
|
-
============================================================ */
|
|
319
|
+
:root {
|
|
315
320
|
/* Categorical — order chosen for max adjacent contrast */
|
|
316
321
|
--dataviz-cat-1: #003399; /* Royal — brand-anchored series 1 */
|
|
317
322
|
--dataviz-cat-2: #3399FF; /* Sky */
|
|
@@ -350,11 +355,14 @@
|
|
|
350
355
|
--dataviz-axis-label: var(--color-foreground-muted); /* tick labels */
|
|
351
356
|
--dataviz-track: var(--color-background-subtle); /* empty bar / gauge track */
|
|
352
357
|
--dataviz-reference: var(--color-foreground-muted); /* dashed target/avg line */
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* ============================================================
|
|
361
|
+
ATTRUS / Cabiros — LIQUID GLASS (transparent / frosted layers)
|
|
362
|
+
Use with backdrop-filter: blur().
|
|
363
|
+
============================================================ */
|
|
353
364
|
|
|
354
|
-
|
|
355
|
-
4. LIQUID GLASS — transparent / frosted layers
|
|
356
|
-
Use with backdrop-filter: blur().
|
|
357
|
-
============================================================ */
|
|
365
|
+
:root {
|
|
358
366
|
--glass-white: color-mix(in srgb, var(--color-pure-white) 58%, transparent);
|
|
359
367
|
--glass-white-hi: color-mix(in srgb, var(--color-pure-white) 78%, transparent);
|
|
360
368
|
--glass-white-lo: color-mix(in srgb, var(--color-pure-white) 38%, transparent);
|
|
@@ -367,10 +375,14 @@
|
|
|
367
375
|
--glass-blur-lg: saturate(160%) blur(28px);
|
|
368
376
|
--glass-border: 1px solid color-mix(in srgb, var(--color-pure-white) 45%, transparent);
|
|
369
377
|
--glass-border-dark: 1px solid color-mix(in srgb, var(--color-pure-white) 10%, transparent);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/* ============================================================
|
|
381
|
+
ATTRUS / Cabiros — RADII
|
|
382
|
+
Mostly softly rounded; buttons fully rounded.
|
|
383
|
+
============================================================ */
|
|
370
384
|
|
|
371
|
-
|
|
372
|
-
5. RADII — mostly softly rounded; buttons fully rounded
|
|
373
|
-
============================================================ */
|
|
385
|
+
:root {
|
|
374
386
|
--radius-2xs: 2px; /* never-square minimum — tiny chips, ticks, dividers */
|
|
375
387
|
--radius-xs: 4px;
|
|
376
388
|
--radius-sm: 6px;
|
|
@@ -382,10 +394,13 @@
|
|
|
382
394
|
--radius-xl: 20px; /* hero / large panels */
|
|
383
395
|
--radius-2xl: 28px;
|
|
384
396
|
--radius-pill: 999px; /* BUTTONS — fully rounded */
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* ============================================================
|
|
400
|
+
ATTRUS / Cabiros — SHADOWS (soft, blue-tinted, multi-layer)
|
|
401
|
+
============================================================ */
|
|
385
402
|
|
|
386
|
-
|
|
387
|
-
6. SHADOWS — soft, blue-tinted, multi-layer
|
|
388
|
-
============================================================ */
|
|
403
|
+
:root {
|
|
389
404
|
--shadow-xs: 0 1px 2px color-mix(in srgb, var(--color-shadow-tint) 5%, transparent);
|
|
390
405
|
--shadow-sm: 0 1px 2px color-mix(in srgb, var(--color-shadow-tint) 6%, transparent),
|
|
391
406
|
0 2px 6px color-mix(in srgb, var(--color-shadow-tint) 4%, transparent);
|
|
@@ -427,10 +442,14 @@
|
|
|
427
442
|
0 10px 30px color-mix(in srgb, var(--color-shadow-tint) 12%, transparent);
|
|
428
443
|
--shadow-glass-dark: 0 1px 0 color-mix(in srgb, var(--color-pure-white) 8%, transparent) inset,
|
|
429
444
|
0 10px 40px color-mix(in srgb, var(--color-pure-black) 35%, transparent);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/* ============================================================
|
|
448
|
+
ATTRUS / Cabiros — SPACING
|
|
449
|
+
4px base; dense, data-heavy layouts.
|
|
450
|
+
============================================================ */
|
|
430
451
|
|
|
431
|
-
|
|
432
|
-
7. SPACING — 4px base; dense, data-heavy layouts
|
|
433
|
-
============================================================ */
|
|
452
|
+
:root {
|
|
434
453
|
--space-0: 0;
|
|
435
454
|
--space-1: 2px;
|
|
436
455
|
--space-2: 4px;
|
|
@@ -448,10 +467,13 @@
|
|
|
448
467
|
--space-12: 64px;
|
|
449
468
|
--space-14: 80px;
|
|
450
469
|
--space-16: 96px;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/* ============================================================
|
|
473
|
+
ATTRUS / Cabiros — ICONOGRAPHY (Lucide; sized to pair with type scale)
|
|
474
|
+
============================================================ */
|
|
451
475
|
|
|
452
|
-
|
|
453
|
-
7b. ICONOGRAPHY — Lucide; sized to pair with type scale
|
|
454
|
-
============================================================ */
|
|
476
|
+
:root {
|
|
455
477
|
--icon-xs: 12px; /* helper text, micro caption (paired w/ 11–12px text) */
|
|
456
478
|
--icon-sm: 14px; /* input affix, dense inline (paired w/ 13px text) */
|
|
457
479
|
--icon-md: 16px; /* default — buttons, nav, body (paired w/ 14px text) */
|
|
@@ -462,10 +484,13 @@
|
|
|
462
484
|
--icon-stroke: 1.75; /* default — slightly bolder than 1.5, calmer than 2 */
|
|
463
485
|
--icon-stroke-bold: 2; /* close buttons, X marks, indicators where weight matters */
|
|
464
486
|
--icon-stroke-thin: 1.5; /* decorative / large hero icons where 1.75 looks heavy */
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* ============================================================
|
|
490
|
+
ATTRUS / Cabiros — MOTION (durations + easings for transitions/animations)
|
|
491
|
+
============================================================ */
|
|
465
492
|
|
|
466
|
-
|
|
467
|
-
7c. MOTION — durations + easings for transitions/animations
|
|
468
|
-
============================================================ */
|
|
493
|
+
:root {
|
|
469
494
|
/* Easing — single curve across the system; "out-expo-ish" for snappy UI */
|
|
470
495
|
--ease-standard: cubic-bezier(.2, .8, .2, 1);
|
|
471
496
|
--ease-emphasis: cubic-bezier(.2, .9, .15, 1); /* slightly more overshoot — for entries */
|
|
@@ -483,10 +508,15 @@
|
|
|
483
508
|
--transition-fast: 140ms var(--ease-standard); /* default for buttons/inputs */
|
|
484
509
|
--transition-base: 200ms var(--ease-standard);
|
|
485
510
|
--transition-slow: 320ms var(--ease-standard);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/* ============================================================
|
|
514
|
+
ATTRUS / Cabiros — TYPOGRAPHY TOKENS (Lato family per brand manual)
|
|
515
|
+
Font families, weights, type scale, line heights, letter spacing.
|
|
516
|
+
Ready-to-use type CLASSES live in ../typography/index.css.
|
|
517
|
+
============================================================ */
|
|
486
518
|
|
|
487
|
-
|
|
488
|
-
8. TYPOGRAPHY — Lato family per brand manual
|
|
489
|
-
============================================================ */
|
|
519
|
+
:root {
|
|
490
520
|
--font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
491
521
|
--font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
|
|
492
522
|
--font-display: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
@@ -529,18 +559,20 @@
|
|
|
529
559
|
--ls-body: 0em; /* <16px body */
|
|
530
560
|
--ls-label: 0.02em; /* small caps / labels */
|
|
531
561
|
--ls-caps: 0.08em;
|
|
532
|
-
}
|
|
533
|
-
|
|
562
|
+
}
|
|
563
|
+
|
|
534
564
|
/* ============================================================
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
565
|
+
ATTRUS / Cabiros — DARK THEME
|
|
566
|
+
[data-theme="dark"] remaps the AMBIENT semantic tokens to a dark
|
|
567
|
+
ink ramp. Components consume semantic tokens, so they flip
|
|
568
|
+
automatically — no per-component dark CSS needed.
|
|
538
569
|
Philosophy: the INVERSE layer stays a deliberate, brand-tinted
|
|
539
|
-
dark even here (see note in
|
|
540
|
-
surface. Raw palette + brand/accent scales are theme-agnostic.
|
|
541
|
-
Toggle via JS
|
|
542
|
-
|
|
570
|
+
dark even here (see note in color-semantic.css), distinct from the
|
|
571
|
+
ambient surface. Raw palette + brand/accent scales are theme-agnostic.
|
|
572
|
+
Toggle via JS: set data-theme on <html>, persist to localStorage,
|
|
573
|
+
seed from prefers-color-scheme.
|
|
543
574
|
============================================================ */
|
|
575
|
+
|
|
544
576
|
[data-theme="dark"] {
|
|
545
577
|
color-scheme: dark;
|
|
546
578
|
|
|
@@ -603,10 +635,12 @@
|
|
|
603
635
|
--dataviz-cat-6: #E87BA1; /* Rose, lightened */
|
|
604
636
|
--dataviz-cat-7: #3FC4DC; /* Cyan, lightened */
|
|
605
637
|
--dataviz-cat-8: #A6B0C4; /* Slate, lightened */
|
|
606
|
-
}
|
|
607
|
-
|
|
638
|
+
}
|
|
639
|
+
|
|
608
640
|
/* ============================================================
|
|
609
|
-
|
|
641
|
+
ATTRUS / Cabiros — SEMANTIC TYPE CLASSES (ready-to-use)
|
|
642
|
+
Base document styles + the display/heading/body/utility classes.
|
|
643
|
+
Consumes typography + color tokens (see ../tokens).
|
|
610
644
|
============================================================ */
|
|
611
645
|
|
|
612
646
|
html, body {
|
|
@@ -657,35 +691,5 @@ h6, .h6 { font-weight: var(--w-semibold); font-size: var(--fs-lg); line-height:
|
|
|
657
691
|
}
|
|
658
692
|
.inverse .fg-secondary { color: var(--color-foreground-inverse-secondary); }
|
|
659
693
|
.inverse .color-foreground-muted { color: var(--color-foreground-inverse-muted); }
|
|
660
|
-
.inverse .fg-accent { color: var(--color-foreground-inverse-accent); }
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
/* ---- doc-back link (fixed top-left on every preview page) ---- */
|
|
664
|
-
.doc-back {
|
|
665
|
-
position: fixed;
|
|
666
|
-
top: var(--space-5);
|
|
667
|
-
left: var(--space-5);
|
|
668
|
-
z-index: 1000;
|
|
669
|
-
display: inline-flex;
|
|
670
|
-
align-items: center;
|
|
671
|
-
gap: var(--space-2);
|
|
672
|
-
font-family: var(--font-sans);
|
|
673
|
-
font-size: var(--fs-xs);
|
|
674
|
-
font-weight: var(--w-semibold);
|
|
675
|
-
letter-spacing: 0;
|
|
676
|
-
text-transform: none;
|
|
677
|
-
color: var(--color-foreground-secondary);
|
|
678
|
-
text-decoration: none;
|
|
679
|
-
padding: var(--space-2) var(--space-3);
|
|
680
|
-
border: 1px solid var(--color-border-default);
|
|
681
|
-
border-radius: var(--radius-pill);
|
|
682
|
-
background: var(--color-background-surface);
|
|
683
|
-
box-shadow: var(--shadow-sm);
|
|
684
|
-
transition: var(--transition-fast);
|
|
685
|
-
}
|
|
686
|
-
.doc-back:hover {
|
|
687
|
-
color: var(--color-foreground-default);
|
|
688
|
-
border-color: var(--color-border-strong);
|
|
689
|
-
box-shadow: var(--shadow-md);
|
|
690
|
-
}
|
|
691
|
-
.doc-back svg, .doc-back i { width: 14px; height: 14px; stroke-width: var(--icon-stroke); }
|
|
694
|
+
.inverse .fg-accent { color: var(--color-foreground-inverse-accent); }
|
|
695
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://design-tokens.org (informal)",
|
|
3
3
|
"name": "ATTRUS Design Tokens",
|
|
4
|
-
"description": "Cabiros · ATTRUS Design System — exported design tokens. Light values in `value`; dark-theme overrides in `darkValue`. Source of truth:
|
|
4
|
+
"description": "Cabiros · ATTRUS Design System — exported design tokens. Light values in `value`; dark-theme overrides in `darkValue`. Source of truth: src/tokens/.",
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"generated": "2026-06-03",
|
|
7
7
|
"tokenCount": 333,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://design-tokens.org (informal)",
|
|
3
3
|
"name": "ATTRUS Design Tokens",
|
|
4
|
-
"description": "Cabiros · ATTRUS Design System — exported design tokens. Light values in `value`; dark-theme overrides in `darkValue`. Source of truth:
|
|
4
|
+
"description": "Cabiros · ATTRUS Design System — exported design tokens. Light values in `value`; dark-theme overrides in `darkValue`. Source of truth: src/tokens/.",
|
|
5
5
|
"version": "1.0.0",
|
|
6
6
|
"generated": "2026-06-03",
|
|
7
7
|
"tokenCount": 334,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attrus-ds/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "ATTRUS / Cabiros design system — design tokens, component styles, brand assets and fonts. Visual layer only (no framework components).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -13,6 +13,14 @@
|
|
|
13
13
|
"fintech"
|
|
14
14
|
],
|
|
15
15
|
"license": "SEE LICENSE IN LICENSE",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/FacilitaGPI/attrus-ds.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/FacilitaGPI/attrus-ds#readme",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/FacilitaGPI/attrus-ds/issues"
|
|
23
|
+
},
|
|
16
24
|
"type": "module",
|
|
17
25
|
"publishConfig": {
|
|
18
26
|
"access": "public"
|