@adres/adrec-dls 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/README.md +38 -0
- package/dist-lib/components/ApplicationHistory/ApplicationHistory.d.ts +30 -0
- package/dist-lib/components/Badge/Badge.d.ts +27 -0
- package/dist-lib/components/Button/Button.d.ts +34 -0
- package/dist-lib/components/CardTitle/CardTitle.d.ts +39 -0
- package/dist-lib/components/Checkbox/Checkbox.d.ts +20 -0
- package/dist-lib/components/DataTable/DataTable.d.ts +28 -0
- package/dist-lib/components/DescriptionList/DescriptionList.d.ts +21 -0
- package/dist-lib/components/Drawer/Drawer.d.ts +27 -0
- package/dist-lib/components/ImagePlaceholder/ImagePlaceholder.d.ts +16 -0
- package/dist-lib/components/InputField/InputField.d.ts +45 -0
- package/dist-lib/components/LinkRow/LinkRow.d.ts +17 -0
- package/dist-lib/components/Modal/Modal.d.ts +13 -0
- package/dist-lib/components/Notification/Notification.d.ts +16 -0
- package/dist-lib/components/Panel/Panel.d.ts +12 -0
- package/dist-lib/components/Popover/Popover.d.ts +29 -0
- package/dist-lib/components/RadioGroup/RadioGroup.d.ts +25 -0
- package/dist-lib/components/ScreenBottomActions/ScreenBottomActions.d.ts +29 -0
- package/dist-lib/components/SectionHeader/SectionHeader.d.ts +20 -0
- package/dist-lib/components/Select/Select.d.ts +33 -0
- package/dist-lib/components/SidePanel/SidePanel.d.ts +25 -0
- package/dist-lib/components/StatusIndicator/StatusIndicator.d.ts +8 -0
- package/dist-lib/components/Textarea/Textarea.d.ts +28 -0
- package/dist-lib/icons/Aed.d.ts +3 -0
- package/dist-lib/icons/AlertCircle.d.ts +3 -0
- package/dist-lib/icons/Asterisk.d.ts +3 -0
- package/dist-lib/icons/Bell.d.ts +3 -0
- package/dist-lib/icons/Calendar.d.ts +3 -0
- package/dist-lib/icons/CancelSolid.d.ts +4 -0
- package/dist-lib/icons/CheckCircle.d.ts +3 -0
- package/dist-lib/icons/CheckSolid.d.ts +3 -0
- package/dist-lib/icons/ChevronDown.d.ts +3 -0
- package/dist-lib/icons/ChevronRight.d.ts +3 -0
- package/dist-lib/icons/HelpCircle.d.ts +3 -0
- package/dist-lib/icons/Image.d.ts +3 -0
- package/dist-lib/icons/InfoCircle.d.ts +3 -0
- package/dist-lib/icons/Plus.d.ts +3 -0
- package/dist-lib/icons/Question.d.ts +3 -0
- package/dist-lib/icons/User.d.ts +3 -0
- package/dist-lib/icons/WarningTriangle.d.ts +3 -0
- package/dist-lib/icons/index.d.ts +17 -0
- package/dist-lib/index.d.ts +22 -0
- package/dist-lib/index.js +6706 -0
- package/dist-lib/styles/tv.d.ts +1 -0
- package/dist-lib/tokens.css +441 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tv: import("tailwind-variants").TV;
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ADREC Design System tokens, re-based on `docs/buy-and-sell-elms-prototype 2.html`
|
|
3
|
+
* (the ADREC-branded ELMS "Buy and Sell" prototype), which is the authoritative visual
|
|
4
|
+
* design going forward. The previous version of this file was ported from an unrelated
|
|
5
|
+
* Figma file ("Tawtheeq") and used a muted purple/sage/olive palette, Helvetica Neue,
|
|
6
|
+
* and a spacious 12-18px type scale — none of that survives here.
|
|
7
|
+
*
|
|
8
|
+
* Registered as Tailwind v4 theme variables under an "ads" namespace so they stay
|
|
9
|
+
* traceable back to source and never collide with Tailwind's own default palette
|
|
10
|
+
* (its default `black`, `gray`, etc. remain available alongside these).
|
|
11
|
+
*
|
|
12
|
+
* Static, always-the-same colors/sizes should be used as plain Tailwind utilities
|
|
13
|
+
* (e.g. `bg-ads-gold`, `text-ads-label`). A handful of components pick their
|
|
14
|
+
* color from a runtime variant (Badge, InputField, Notification, ...) — those set
|
|
15
|
+
* a local `--ads-*` CSS custom property inline and consume it via Tailwind's
|
|
16
|
+
* arbitrary-value syntax (`bg-[var(--ads-danger-light)]`), so the token stays the
|
|
17
|
+
* single source of truth either way.
|
|
18
|
+
*/
|
|
19
|
+
@import 'tailwindcss';
|
|
20
|
+
|
|
21
|
+
@theme {
|
|
22
|
+
/* Color: neutrals
|
|
23
|
+
* Names and hex values taken directly from the prototype's `:root` block
|
|
24
|
+
* (--cream, --cream-2, --cream-3, --ink, --ink-2, --muted, --muted-2, --line,
|
|
25
|
+
* --line-2, --fld), plus two literal one-off values pulled from specific
|
|
26
|
+
* prototype rules that need a traceable token: input.t[readonly] background
|
|
27
|
+
* (#f6f7f2) and table.gt tr.hi td background (#eaeedb).
|
|
28
|
+
*
|
|
29
|
+
* --line/--line-2/--field-border are gone: every border-color AND background-
|
|
30
|
+
* fill usage they ever had has been migrated to the border/border-strong
|
|
31
|
+
* application aliases below (Neutral scale), and nothing else referenced them,
|
|
32
|
+
* so they were deleted rather than left as dead custom properties. --ink-2/
|
|
33
|
+
* --muted/--muted-2 are gone the same way (text-strong/text-muted/text-base).
|
|
34
|
+
*
|
|
35
|
+
* --ink survives, but its scope has narrowed to one thing: the Transparent/
|
|
36
|
+
* Translucent surface demo's `bg-ads-ink/40`, an exact reproduction of the
|
|
37
|
+
* prototype's modal scrim (rgba(22,41,63,.4) — 22,41,63 is #16293f in
|
|
38
|
+
* decimal). Every text-color and background-fill role it used to serve is
|
|
39
|
+
* on --color-ads-text-strong (Neutral scale) instead — that's a different
|
|
40
|
+
* hue (gray, not navy), so it can't substitute here: the scrim demo is
|
|
41
|
+
* specifically illustrating this exact prototype value, not a general
|
|
42
|
+
* "darkest neutral" role.
|
|
43
|
+
*/
|
|
44
|
+
--color-ads-ink: #16293f;
|
|
45
|
+
--color-ads-field-disabled: #f6f7f2;
|
|
46
|
+
--color-ads-base-background: #ffffff;
|
|
47
|
+
--color-ads-cream: #f2f4e8;
|
|
48
|
+
--color-ads-cream-alt: #f8f9f1;
|
|
49
|
+
--color-ads-cream-deep: #e8ebd8;
|
|
50
|
+
/* Judgment call: not a prototype :root token — the exact value used by
|
|
51
|
+
* `table.gt tr.hi td` for a highlighted/emphasized data-table row. */
|
|
52
|
+
--color-ads-highlight: #eaeedb;
|
|
53
|
+
|
|
54
|
+
/* Color: brand (gold) */
|
|
55
|
+
--color-ads-gold: #a39558;
|
|
56
|
+
--color-ads-gold-dark: #807542;
|
|
57
|
+
--color-ads-gold-light: #c8bd8a;
|
|
58
|
+
|
|
59
|
+
/* Color: primitive scales
|
|
60
|
+
* Three color families — Primary (gold), Secondary (olive), Neutral (gray) —
|
|
61
|
+
* each an 8-step light→dark ramp: Muted (lightest/most subtle) → Weakest →
|
|
62
|
+
* Weaker → Weak → Base (the family's true hue) → Strong → Stronger →
|
|
63
|
+
* Strongest (darkest). Computed with one consistent HSL formula per step
|
|
64
|
+
* (same lightness/saturation pair across all three families, only hue
|
|
65
|
+
* differs: gold H49°, olive H72°, gray desaturated) so the three ramps stay
|
|
66
|
+
* structurally parallel — see scripts used to derive this in the PR that
|
|
67
|
+
* introduced it.
|
|
68
|
+
*
|
|
69
|
+
* Primary's weak/base steps are pinned to the *exact* existing
|
|
70
|
+
* --color-ads-gold-light/-gold hexes (not re-derived) so every already-
|
|
71
|
+
* shipped component keeps its exact current color. strong was later
|
|
72
|
+
* darkened from the original --color-ads-gold-dark (#8b7f47, L41%) to L38%
|
|
73
|
+
* (#807542) — the original only cleared 4.0:1 against white (AA large/UI
|
|
74
|
+
* text only); this step needs to carry small text too (links, RadioGroup's
|
|
75
|
+
* checked label), so it's now tuned to 4.6:1, comfortably past the 4.5:1 AA
|
|
76
|
+
* text threshold while staying the same H49° gold hue. gold-dark was moved
|
|
77
|
+
* to match, so the two stay pinned. Secondary (olive) backs Notification's
|
|
78
|
+
* "system" view directly and the surface-* application aliases below.
|
|
79
|
+
* Neutral (gray) backs the text- and border-role application aliases — see
|
|
80
|
+
* those blocks for exactly which old tokens each step replaces.
|
|
81
|
+
*/
|
|
82
|
+
--color-ads-primary-muted: #f7f6f3;
|
|
83
|
+
--color-ads-primary-weakest: #eeece2;
|
|
84
|
+
--color-ads-primary-weaker: #dcd6bc;
|
|
85
|
+
--color-ads-primary-weak: #c8bd8a;
|
|
86
|
+
--color-ads-primary-base: #a39558;
|
|
87
|
+
--color-ads-primary-strong: #807542;
|
|
88
|
+
--color-ads-primary-stronger: #655c34;
|
|
89
|
+
--color-ads-primary-strongest: #413c25;
|
|
90
|
+
|
|
91
|
+
--color-ads-secondary-muted: #f6f7f3;
|
|
92
|
+
--color-ads-secondary-weakest: #eceee2;
|
|
93
|
+
--color-ads-secondary-weaker: #d6dcbc;
|
|
94
|
+
--color-ads-secondary-weak: #bbc889;
|
|
95
|
+
--color-ads-secondary-base: #93a257;
|
|
96
|
+
/* Darkened from the formula's original #7d8a47 (L41%, 3.75:1 against white — below
|
|
97
|
+
* even AA large/UI) to L36% (#6e793e, 4.7:1) — same accessibility-driven adjustment
|
|
98
|
+
* as Primary's strong step, see its comment above. */
|
|
99
|
+
--color-ads-secondary-strong: #6e793e;
|
|
100
|
+
--color-ads-secondary-stronger: #5b6534;
|
|
101
|
+
--color-ads-secondary-strongest: #3c4125;
|
|
102
|
+
|
|
103
|
+
--color-ads-neutral-muted: #f5f5f5;
|
|
104
|
+
--color-ads-neutral-weakest: #e8e8e8;
|
|
105
|
+
--color-ads-neutral-weaker: #cccccc;
|
|
106
|
+
--color-ads-neutral-weak: #a8a8a8;
|
|
107
|
+
--color-ads-neutral-base: #7d7d7d;
|
|
108
|
+
--color-ads-neutral-strong: #696969;
|
|
109
|
+
--color-ads-neutral-stronger: #4d4d4d;
|
|
110
|
+
--color-ads-neutral-strongest: #333333;
|
|
111
|
+
|
|
112
|
+
/* Accent (maroon), H≈348° — same 8-step formula as Primary/Secondary/Neutral,
|
|
113
|
+
* a fourth family for the maroon this system used to carry as a one-off
|
|
114
|
+
* (--color-ads-maroon, retired when Badge/Button's danger-red usages were
|
|
115
|
+
* consolidated onto danger/danger-light). Accent is deliberately NOT reused for
|
|
116
|
+
* danger — danger stays reserved for error/destructive state (see its own
|
|
117
|
+
* comment below); Accent is for brand-adjacent emphasis that isn't gold and
|
|
118
|
+
* isn't a status color. stronger is pinned to the *exact* original maroon hex
|
|
119
|
+
* (closest lightness match to the formula's stronger step, L32.5% vs L30%) —
|
|
120
|
+
* not base, since maroon's real lightness never matched the formula's L49%
|
|
121
|
+
* base target the way gold's did for Primary.
|
|
122
|
+
*/
|
|
123
|
+
--color-ads-accent-muted: #f7f3f4;
|
|
124
|
+
--color-ads-accent-weakest: #eee2e4;
|
|
125
|
+
--color-ads-accent-weaker: #dcbcc2;
|
|
126
|
+
--color-ads-accent-weak: #c88996;
|
|
127
|
+
--color-ads-accent-base: #a25766;
|
|
128
|
+
--color-ads-accent-strong: #8a4754;
|
|
129
|
+
--color-ads-accent-stronger: #7b2b3b;
|
|
130
|
+
--color-ads-accent-strongest: #41252a;
|
|
131
|
+
|
|
132
|
+
/* Color: application aliases (text & border roles → Neutral scale)
|
|
133
|
+
* ink/ink-2/muted/muted-2 (text) and line/line-2/field-border (borders)
|
|
134
|
+
* measured H≈210-215° and H≈70° respectively — neither hue is part of the
|
|
135
|
+
* Primary/Secondary/Neutral scale, so these are a deliberate consolidation
|
|
136
|
+
* onto Neutral, not a snap-to-nearest-existing-value: text-strong collapses
|
|
137
|
+
* ink+ink-2 (both ~L17%, only a hue difference between them); text-base
|
|
138
|
+
* takes muted-2's slot (~L41%, matches neutral-strong almost exactly);
|
|
139
|
+
* text-muted takes muted's slot (~L59%, nearest is neutral-base); border
|
|
140
|
+
* collapses line+line-2 (~L86-91%, both subtle dividers); border-strong
|
|
141
|
+
* takes field-border's slot (~L70%, form-control borders that need more
|
|
142
|
+
* visible affordance than a plain divider).
|
|
143
|
+
*
|
|
144
|
+
* All six old tokens have since lost every consumer — including their
|
|
145
|
+
* background-fill uses (Badge's solid dark variants, CardTitle's divider,
|
|
146
|
+
* form-control disabled/unit-divider fills), all migrated to these aliases
|
|
147
|
+
* too — so --ink-2/-muted/-muted-2/-line/-line-2/-field-border were deleted
|
|
148
|
+
* outright (see the neutrals block above). --ink alone survives, narrowed to
|
|
149
|
+
* one exact-value use unrelated to this text/border role — see its own
|
|
150
|
+
* comment above.
|
|
151
|
+
*/
|
|
152
|
+
--color-ads-text-strong: var(--color-ads-neutral-strongest);
|
|
153
|
+
--color-ads-text-base: var(--color-ads-neutral-strong);
|
|
154
|
+
--color-ads-text-muted: var(--color-ads-neutral-base);
|
|
155
|
+
--color-ads-border: var(--color-ads-neutral-weakest);
|
|
156
|
+
--color-ads-border-strong: var(--color-ads-neutral-weaker);
|
|
157
|
+
|
|
158
|
+
/* Color: application aliases (surface fills → Secondary scale)
|
|
159
|
+
* cream/cream-alt/highlight/field-disabled measured H≈67-73° — the same hue
|
|
160
|
+
* as Secondary (olive, H72°) — so this consolidation is faithful, not a
|
|
161
|
+
* hue-shift like the text- and border-role aliases above. Roles are assigned to
|
|
162
|
+
* preserve relative distinctness rather than by a strict nearest-lightness
|
|
163
|
+
* snap: cream/cream-alt/field-disabled all sit within 3% lightness of each
|
|
164
|
+
* other (L93-96%), so a pure nearest-match would collapse surface-highlight
|
|
165
|
+
* onto the same step as surface-base — but DataTable's highlighted row needs
|
|
166
|
+
* to visually stand out from its own zebra rows, so surface-highlight is
|
|
167
|
+
* deliberately stepped one notch further (weaker, not weakest).
|
|
168
|
+
* surface-alt and surface-disabled resolve to the same step (secondary-muted)
|
|
169
|
+
* — cream-alt and field-disabled were already near-duplicates in the original
|
|
170
|
+
* hexes — but are named separately since "alternating row" and "disabled
|
|
171
|
+
* control" are different intents in the components that consume them.
|
|
172
|
+
* cream-deep has no current component consumer, so it's left unaliased.
|
|
173
|
+
*/
|
|
174
|
+
--color-ads-surface-base: var(--color-ads-secondary-weakest); /* was cream */
|
|
175
|
+
--color-ads-surface-alt: var(--color-ads-secondary-muted); /* was cream-alt */
|
|
176
|
+
--color-ads-surface-highlight: var(--color-ads-secondary-weaker); /* was highlight */
|
|
177
|
+
--color-ads-surface-disabled: var(--color-ads-secondary-muted); /* was field-disabled */
|
|
178
|
+
|
|
179
|
+
/* Color: semantic
|
|
180
|
+
* success used to map 1:1 to the prototype's --ok token (#2f7d55) — overridden by
|
|
181
|
+
* explicit request to #159553/#f3fffb, no longer a prototype-exact match. Warning
|
|
182
|
+
* originally had no
|
|
183
|
+
* prototype equivalent (the prototype has no warning/alert-amber state distinct
|
|
184
|
+
* from gold) and reused --gold-dark as a judgment call — that's since been
|
|
185
|
+
* overridden by explicit request to a proper amber, #d97706, distinct from every
|
|
186
|
+
* other token in the system. A useful side effect: this also resolves the
|
|
187
|
+
* informative/warning collision noted below (both used to be #8b7f47).
|
|
188
|
+
*
|
|
189
|
+
* link used to map 1:1 to the prototype's own --link (#1b6fe0, blue) — by explicit
|
|
190
|
+
* request it's now aliased to Primary's strong step instead (var(--color-ads-
|
|
191
|
+
* primary-strong), #8b7f47), so every link/action-style text across the library
|
|
192
|
+
* (SectionHeader's action, Notification's link button and "informative" view,
|
|
193
|
+
* ScreenBottomActions' view-selected link, DataTable's action cells, Badge's Blue
|
|
194
|
+
* variants, StatusIndicator's Blue dot) renders gold-dark instead of blue.
|
|
195
|
+
* link-accent is a second option, aliased to Accent's stronger step (var(--color-
|
|
196
|
+
* ads-accent-stronger), maroon) for callers that want the accent look instead of
|
|
197
|
+
* the new default — nothing consumes it yet; no component has a variant prop to
|
|
198
|
+
* select it. link-tint has been removed by explicit request: with link now aliased
|
|
199
|
+
* to Primary, its former consumers (Notification's "informative" view, Badge's
|
|
200
|
+
* Light/Blue) use --color-ads-primary-weakest directly instead — link's own hue
|
|
201
|
+
* family already has a light step, so a dedicated tint token would be redundant.
|
|
202
|
+
*
|
|
203
|
+
* The "-light" background tokens (named that for consistency with Badge's own
|
|
204
|
+
* type="Light" — they were originally called "-tint", a more precise color-theory
|
|
205
|
+
* term for a hue mixed with white, but that read inconsistently against the
|
|
206
|
+
* component vocabulary that actually consumes them) are judgment calls too: the
|
|
207
|
+
* prototype's own success state (`.okmsg`) is bare colored text with no box at all,
|
|
208
|
+
* so these are pale tints mixed by hand at the same hue as their base color
|
|
209
|
+
* (matching how success-light/danger-light were already built). warning-light was
|
|
210
|
+
* briefly a mismatch — still borrowed from --cream after warning moved to amber —
|
|
211
|
+
* but has since been given its own proper pale-amber value, back in line with the
|
|
212
|
+
* rest.
|
|
213
|
+
*
|
|
214
|
+
* danger/danger-light replace what used to be seven separate red/pink/maroon
|
|
215
|
+
* tokens (--alert-red, --alert-bg, --alert-line, --maroon, --badge-bg,
|
|
216
|
+
* --danger-border, --danger-bg-hover) — all measured within H344-356°, i.e. the
|
|
217
|
+
* same red hue family, so consolidating them is faithful, not a hue-shift. The one
|
|
218
|
+
* exception was --alert-bg/--alert-line, which sat at H≈46° (borrowed from a
|
|
219
|
+
* warning/cream palette by historical accident, not actually red) —
|
|
220
|
+
* Notification's error box trades its exact prototype pale-yellow look for a
|
|
221
|
+
* proper pale-red tint as a result, a deliberate simplification, not an
|
|
222
|
+
* oversight. danger originally kept --alert-red's exact value (the more heavily
|
|
223
|
+
* used of the two reds, vs. the rarer --maroon), then was overridden by explicit
|
|
224
|
+
* request to #df2c2c, a brighter, higher-contrast red; danger-light moved with it
|
|
225
|
+
* to #fdf0ed, a matching pale tint rather than being re-derived from the new base.
|
|
226
|
+
*/
|
|
227
|
+
/* Darkened from the original #159553 (3.8:1 against white — below AA text) to
|
|
228
|
+
* #13864b (4.6:1) — same accessibility-driven adjustment as Primary/Secondary's
|
|
229
|
+
* strong steps, same hue (H149°), just less lightness. */
|
|
230
|
+
--color-ads-success: #13864b;
|
|
231
|
+
--color-ads-success-light: #f3fffb;
|
|
232
|
+
--color-ads-link: var(--color-ads-primary-strong);
|
|
233
|
+
--color-ads-link-accent: var(--color-ads-accent-stronger);
|
|
234
|
+
/* Darkened from the original #d97706 (3.2:1 against white — below even AA large/UI
|
|
235
|
+
* at the margin used elsewhere in this file) to #ae5f05 (4.7:1) — same hue (H32°),
|
|
236
|
+
* just less lightness. */
|
|
237
|
+
--color-ads-warning: #ae5f05;
|
|
238
|
+
--color-ads-warning-light: #fff7ed;
|
|
239
|
+
--color-ads-danger: #df2c2c;
|
|
240
|
+
--color-ads-danger-light: #fdf0ed;
|
|
241
|
+
|
|
242
|
+
/* Radius
|
|
243
|
+
* 2px is the prototype's dominant control radius (buttons, chips, inputs — `.b`,
|
|
244
|
+
* `.chip`, `input.t`... well, inputs actually have no radius at all, but chips and
|
|
245
|
+
* buttons do). 4px remains for the one place the prototype uses a slightly larger
|
|
246
|
+
* radius: `.bdg` (the status badge). full is a reintroduction, added by explicit
|
|
247
|
+
* request — the old 16px/20px pill radii were dropped when Badge first moved to
|
|
248
|
+
* the prototype's rectangular `.bdg`, but a true pill shape (9999px, not a fixed
|
|
249
|
+
* pixel value, so it stays fully rounded regardless of the badge's height) is
|
|
250
|
+
* back for Badge specifically.
|
|
251
|
+
*/
|
|
252
|
+
--radius-ads-2: 2px;
|
|
253
|
+
--radius-ads-4: 4px;
|
|
254
|
+
--radius-ads-full: 9999px;
|
|
255
|
+
|
|
256
|
+
/* Shadow
|
|
257
|
+
* Lifted exactly from the prototype's `.modal` box-shadow — the only elevated
|
|
258
|
+
* surface the prototype defines (this is a very flat, 2D-styled UI otherwise).
|
|
259
|
+
* No scale (sm/md/lg): nothing in the source needs more than one elevation.
|
|
260
|
+
*/
|
|
261
|
+
--shadow-ads-elevated: 0 14px 40px rgba(0, 0, 0, 0.24);
|
|
262
|
+
|
|
263
|
+
/* Typography
|
|
264
|
+
* The prototype loads Poppins (English) and Cairo (Arabic) from Google Fonts in
|
|
265
|
+
* its own <head> — that's an app-shell concern, so this library only declares the
|
|
266
|
+
* family with a system fallback stack, the same way it previously did for the
|
|
267
|
+
* (also not-bundled) Helvetica Neue LT Std. Consumers that don't load the webfont
|
|
268
|
+
* will fall back to the system sans stack below.
|
|
269
|
+
*/
|
|
270
|
+
--font-ads-en: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
|
271
|
+
--font-ads-ar: 'Cairo', 'Tajawal', Arial, sans-serif;
|
|
272
|
+
|
|
273
|
+
/* Type scale
|
|
274
|
+
* caption and label share the same size (11px) — a deliberate step, not an
|
|
275
|
+
* oversight. body/subtitle/title (12/14/16px) round out the dense end of the
|
|
276
|
+
* scale; header matches the prototype's `.bnr-h h1` heading (20px); display is
|
|
277
|
+
* an extrapolated hero tier (28px) with no prototype anchor. See
|
|
278
|
+
* Foundation/Typography for the per-step usage notes.
|
|
279
|
+
*/
|
|
280
|
+
--text-ads-caption: 11px;
|
|
281
|
+
--text-ads-caption--line-height: 1.3;
|
|
282
|
+
--text-ads-label: 11px;
|
|
283
|
+
--text-ads-label--line-height: 1.4;
|
|
284
|
+
--text-ads-body: 12px;
|
|
285
|
+
--text-ads-body--line-height: 1.3;
|
|
286
|
+
--text-ads-subtitle: 14px;
|
|
287
|
+
--text-ads-subtitle--line-height: 1.4;
|
|
288
|
+
--text-ads-title: 16px;
|
|
289
|
+
--text-ads-title--line-height: 1.3;
|
|
290
|
+
--text-ads-header: 20px;
|
|
291
|
+
--text-ads-header--line-height: 1.2;
|
|
292
|
+
--text-ads-display: 28px;
|
|
293
|
+
--text-ads-display--line-height: 1.15;
|
|
294
|
+
|
|
295
|
+
/* Sizing: ELMS control heights + a handful of off-grid spacing values
|
|
296
|
+
* Tailwind's default 4px spacing scale does NOT cover this design: the prototype's
|
|
297
|
+
* form-control heights (19px text inputs, 20px selects, 23px buttons) and several
|
|
298
|
+
* of its paddings (3px, 5px, 7px, 11px) fall between default steps. These are
|
|
299
|
+
* named literally by pixel value, the same way the radius tokens above are, and
|
|
300
|
+
* are consumed as `h-ads-19`, `px-ads-11`, `size-ads-13`, etc. 27px is a judgment
|
|
301
|
+
* call: the prototype only defines one button height, so it's extrapolated as a
|
|
302
|
+
* "large" tier at the same proportion Button's existing size scale used before
|
|
303
|
+
* this rework. 34px is expressible via Tailwind's default fractional scale
|
|
304
|
+
* (`px-8.5`) already, but gets a named token anyway for the same traceability
|
|
305
|
+
* reason as the others: it's the prototype's own exact `.elms`/`.bnr-zone`
|
|
306
|
+
* horizontal padding, not an arbitrary App-level choice — consumed as `px-ads-34`.
|
|
307
|
+
* 661px/900px/1015px/1420px are the same story at App-page scale: the prototype's
|
|
308
|
+
* exact `.main`/`.pg-t`/`.main.w`/`.pg-t.w`/`.bnr` widths, previously left as
|
|
309
|
+
* one-off `max-w-[…]`/`w-[…]` arbitrary values in App code — named here instead,
|
|
310
|
+
* consumed as `w-ads-661`, `max-w-ads-900`, `w-ads-1015`, `max-w-ads-1420`.
|
|
311
|
+
*/
|
|
312
|
+
--spacing-ads-3: 3px;
|
|
313
|
+
/* The smallest padding step — InputField/Select's own internal text padding
|
|
314
|
+
* (px-ads-4/ps-ads-4) and DescriptionList/DataTable's per-row vertical padding
|
|
315
|
+
* (py-ads-4). A separate token from the others above (rather than reusing default
|
|
316
|
+
* Tailwind px-1/py-1) purely so the text-size overrides below can grow it
|
|
317
|
+
* independently of the row's height/gap tokens. */
|
|
318
|
+
--spacing-ads-4: 4px;
|
|
319
|
+
--spacing-ads-5: 5px;
|
|
320
|
+
--spacing-ads-7: 7px;
|
|
321
|
+
--spacing-ads-9: 9px;
|
|
322
|
+
--spacing-ads-11: 11px;
|
|
323
|
+
--spacing-ads-13: 13px;
|
|
324
|
+
--spacing-ads-19: 19px;
|
|
325
|
+
--spacing-ads-20: 20px;
|
|
326
|
+
--spacing-ads-23: 23px;
|
|
327
|
+
--spacing-ads-27: 27px;
|
|
328
|
+
--spacing-ads-34: 34px;
|
|
329
|
+
--spacing-ads-661: 661px;
|
|
330
|
+
--spacing-ads-900: 900px;
|
|
331
|
+
--spacing-ads-1015: 1015px;
|
|
332
|
+
--spacing-ads-1420: 1420px;
|
|
333
|
+
|
|
334
|
+
/* Color: data-visualization (categorical)
|
|
335
|
+
* No chart exists in the prototype this system is re-based on, so this is a
|
|
336
|
+
* forward-looking addition rather than something extracted from the source design
|
|
337
|
+
* — validated with the dataviz skill's `validate_palette.js` (WCAG relative
|
|
338
|
+
* luminance + OKLab CVD simulation) against this system's own white surface
|
|
339
|
+
* (--color-ads-base-background), not eyeballed.
|
|
340
|
+
*
|
|
341
|
+
* Slot 1 reuses --color-ads-link exactly (already the system's blue) for brand
|
|
342
|
+
* coherence. Slot 2 is a custom gold-amber tuned to nod to --color-ads-gold while
|
|
343
|
+
* clearing the chroma/CVD floors gold itself is too desaturated to pass as a
|
|
344
|
+
* categorical hue. Slots 3–8 are the dataviz skill's validated reference hues
|
|
345
|
+
* (aqua/yellow/magenta/green/violet/red), left as-is since they already clear
|
|
346
|
+
* every gate and a categorical palette's hue order is the CVD-safety mechanism —
|
|
347
|
+
* don't reorder it.
|
|
348
|
+
*
|
|
349
|
+
* Validated PASS (light, surface #ffffff): lightness band, chroma floor, adjacent
|
|
350
|
+
* CVD separation (worst ΔE 8.4), adjacent normal-vision floor (worst ΔE 17.6).
|
|
351
|
+
* Contrast WARN on chart-3/4/5 (<3:1 vs white) is expected and requires visible
|
|
352
|
+
* direct labels or a legend, never color alone — same rule as any chart consuming
|
|
353
|
+
* this palette. Only chart-1/2/3 clear the stricter all-pairs floor (scatter,
|
|
354
|
+
* bubble, choropleth, small multiples); charts needing more than 3 simultaneous
|
|
355
|
+
* pairwise comparisons should fold extra series into "Other" or facet instead of
|
|
356
|
+
* extending past slot 8.
|
|
357
|
+
*
|
|
358
|
+
* No dark-mode steps are defined: nothing else in this token file has a dark
|
|
359
|
+
* variant, so shipping unused dark chart steps would be speculative. If/when this
|
|
360
|
+
* system adds dark-mode support, re-derive dark steps against that dark surface
|
|
361
|
+
* with the same validator rather than guessing.
|
|
362
|
+
*
|
|
363
|
+
* Sequential/diverging guidance (not shipped as tokens — nothing consumes them
|
|
364
|
+
* yet): sequential magnitude scales should ramp a single hue light→dark, default
|
|
365
|
+
* to blue (chart-1's hue family); diverging/polarity scales should use blue↔red
|
|
366
|
+
* (chart-1 vs chart-8) with a neutral gray midpoint from --color-ads-border, never
|
|
367
|
+
* a rainbow and never a hue at the midpoint.
|
|
368
|
+
*/
|
|
369
|
+
--color-ads-chart-1: #1b6fe0;
|
|
370
|
+
--color-ads-chart-2: #b8862e;
|
|
371
|
+
--color-ads-chart-3: #1baf7a;
|
|
372
|
+
--color-ads-chart-4: #eda100;
|
|
373
|
+
--color-ads-chart-5: #e87ba4;
|
|
374
|
+
--color-ads-chart-6: #008300;
|
|
375
|
+
--color-ads-chart-7: #4a3aa7;
|
|
376
|
+
--color-ads-chart-8: #e34948;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/* Text-size preference — three discrete tiers (default/large/xlarge), switched at
|
|
380
|
+
* runtime via a `data-text-size` attribute on <html> (a page-level user setting, not
|
|
381
|
+
* a per-component prop — see App's useTextSizePreference hook). These overrides live
|
|
382
|
+
* outside @theme on purpose: @theme's job is registering each custom property once so
|
|
383
|
+
* Tailwind can generate a utility for it (text-ads-body, gap-ads-9, ...); it doesn't
|
|
384
|
+
* need to run again here, since every one of those utilities already just resolves to
|
|
385
|
+
* whatever its custom property currently equals. Re-declaring the same properties in a
|
|
386
|
+
* more specific selector is a plain CSS cascade override — the utility classes
|
|
387
|
+
* themselves, and every component using them, don't change at all.
|
|
388
|
+
*
|
|
389
|
+
* Only the type scale and the control-adjacent spacing steps (3-27px: paddings,
|
|
390
|
+
* checkbox/radio size, input/select/button heights) scale up. The larger structural
|
|
391
|
+
* tokens (34/661/900/1015/1420 — page margins and column widths) are deliberately left
|
|
392
|
+
* alone: scaling those the same way would stretch the page's proportions instead of
|
|
393
|
+
* just making its text/controls easier to read, and 34px in particular already does
|
|
394
|
+
* double duty as both a control-ish padding and ScreenLayout's own page margin (see
|
|
395
|
+
* the sizing comment above) — leaving it fixed keeps the page frame stable across all
|
|
396
|
+
* three tiers. Line-heights need no override: they're unitless ratios already, so they
|
|
397
|
+
* scale proportionally with font-size for free.
|
|
398
|
+
*/
|
|
399
|
+
:root[data-text-size='large'] {
|
|
400
|
+
--text-ads-caption: 13px;
|
|
401
|
+
--text-ads-label: 13px;
|
|
402
|
+
--text-ads-body: 14px;
|
|
403
|
+
--text-ads-subtitle: 16px;
|
|
404
|
+
--text-ads-title: 18px;
|
|
405
|
+
--text-ads-header: 23px;
|
|
406
|
+
--text-ads-display: 32px;
|
|
407
|
+
|
|
408
|
+
--spacing-ads-3: 4px;
|
|
409
|
+
--spacing-ads-4: 6px;
|
|
410
|
+
--spacing-ads-5: 6px;
|
|
411
|
+
--spacing-ads-7: 8px;
|
|
412
|
+
--spacing-ads-9: 10px;
|
|
413
|
+
--spacing-ads-11: 13px;
|
|
414
|
+
--spacing-ads-13: 15px;
|
|
415
|
+
--spacing-ads-19: 21px;
|
|
416
|
+
--spacing-ads-20: 22px;
|
|
417
|
+
--spacing-ads-23: 26px;
|
|
418
|
+
--spacing-ads-27: 30px;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
:root[data-text-size='xlarge'] {
|
|
422
|
+
--text-ads-caption: 14px;
|
|
423
|
+
--text-ads-label: 14px;
|
|
424
|
+
--text-ads-body: 16px;
|
|
425
|
+
--text-ads-subtitle: 18px;
|
|
426
|
+
--text-ads-title: 21px;
|
|
427
|
+
--text-ads-header: 26px;
|
|
428
|
+
--text-ads-display: 36px;
|
|
429
|
+
|
|
430
|
+
--spacing-ads-3: 5px;
|
|
431
|
+
--spacing-ads-4: 8px;
|
|
432
|
+
--spacing-ads-5: 7px;
|
|
433
|
+
--spacing-ads-7: 9px;
|
|
434
|
+
--spacing-ads-9: 12px;
|
|
435
|
+
--spacing-ads-11: 14px;
|
|
436
|
+
--spacing-ads-13: 17px;
|
|
437
|
+
--spacing-ads-19: 24px;
|
|
438
|
+
--spacing-ads-20: 25px;
|
|
439
|
+
--spacing-ads-23: 29px;
|
|
440
|
+
--spacing-ads-27: 34px;
|
|
441
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adres/adrec-dls",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist-lib"
|
|
11
|
+
],
|
|
12
|
+
"main": "./dist-lib/index.js",
|
|
13
|
+
"module": "./dist-lib/index.js",
|
|
14
|
+
"types": "./dist-lib/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist-lib/index.d.ts",
|
|
18
|
+
"default": "./dist-lib/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./tokens.css": "./dist-lib/tokens.css"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "tsc -b && vite build",
|
|
25
|
+
"build:lib": "tsc -b tsconfig.build.json && vite build --config vite.lib.config.ts && cp src/styles/tokens.css dist-lib/tokens.css",
|
|
26
|
+
"lint": "oxlint",
|
|
27
|
+
"preview": "vite preview",
|
|
28
|
+
"storybook": "storybook dev -p 6006",
|
|
29
|
+
"build-storybook": "storybook build"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "^19.0.0",
|
|
33
|
+
"react-dom": "^19.0.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@radix-ui/react-collapsible": "^1.1.20",
|
|
37
|
+
"@radix-ui/react-popover": "^1.1.23",
|
|
38
|
+
"tailwind-variants": "^3.3.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@chromatic-com/storybook": "latest",
|
|
42
|
+
"@storybook/addon-a11y": "^10.6.0",
|
|
43
|
+
"@storybook/addon-docs": "^10.6.0",
|
|
44
|
+
"@storybook/addon-vitest": "^10.6.0",
|
|
45
|
+
"@storybook/react-vite": "^10.6.0",
|
|
46
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
47
|
+
"@types/node": "^24.13.3",
|
|
48
|
+
"@types/react": "^19.2.18",
|
|
49
|
+
"@types/react-dom": "^19.2.4",
|
|
50
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
51
|
+
"@vitest/browser-playwright": "latest",
|
|
52
|
+
"@vitest/coverage-v8": "latest",
|
|
53
|
+
"oxlint": "^1.79.0",
|
|
54
|
+
"playwright": "latest",
|
|
55
|
+
"react": "^19.2.8",
|
|
56
|
+
"react-dom": "^19.2.8",
|
|
57
|
+
"storybook": "^10.6.0",
|
|
58
|
+
"tailwindcss": "^4.3.3",
|
|
59
|
+
"typescript": "~6.0.2",
|
|
60
|
+
"vite": "^8.2.2",
|
|
61
|
+
"vitest": "latest"
|
|
62
|
+
}
|
|
63
|
+
}
|