@ids-group-ltd/ids-design-system 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +151 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +2616 -1759
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.5.1/badge-statuses.md +181 -0
- package/migrations/0.5.1.json +2 -2
- package/migrations/0.6.3.json +50 -0
- package/migrations/README.md +6 -0
- package/package.json +1 -1
- package/styles/_typography.scss +169 -20
- package/types/ids-group-ltd-ids-design-system.d.ts +367 -15
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# Badge & status-dot statuses
|
|
2
|
+
|
|
3
|
+
How status colours work for `ds-badge` and `ds-status-dot`, and how to migrate to the
|
|
4
|
+
consumer-defined status system introduced in **0.5.1**.
|
|
5
|
+
|
|
6
|
+
> TL;DR — the DS ships **no** predefined statuses. You declare your own status vocabulary once
|
|
7
|
+
> (SCSS + an optional TS registry), then set `[status]` on the component. Colour comes from
|
|
8
|
+
> `[data-status]`, never from a status-named CSS class.
|
|
9
|
+
|
|
10
|
+
## The model
|
|
11
|
+
|
|
12
|
+
There are three moving parts:
|
|
13
|
+
|
|
14
|
+
1. **The input.** `ds-badge` / `ds-status-dot` take `[status]` (typed `DsStatusKey`). The component
|
|
15
|
+
reflects the value onto the host as a `data-status` attribute — it does **not** add a
|
|
16
|
+
status-named CSS class, and it has no built-in colour for any value.
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<ds-badge [status]="'in-transit'">In transit</ds-badge>
|
|
20
|
+
<!-- renders: <ds-badge data-status="in-transit" class="...">…</ds-badge> -->
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Unset `[status]` → no `data-status` → the neutral default (`--surface-secondary` /
|
|
24
|
+
`--text-secondary`).
|
|
25
|
+
|
|
26
|
+
2. **The colour wiring (SCSS).** `styles/status` turns a Sass map of status keys into
|
|
27
|
+
`[data-status='…']` rules that set the public component tokens:
|
|
28
|
+
|
|
29
|
+
```scss
|
|
30
|
+
// external consumer of the published package:
|
|
31
|
+
@use '@ids-group-ltd/ids-design-system/styles/status' as status;
|
|
32
|
+
// inside this repo (ds-docs, loadPaths: src/lib): @use 'styles/status' as status;
|
|
33
|
+
|
|
34
|
+
@include status.define(
|
|
35
|
+
(
|
|
36
|
+
'in-transit': (
|
|
37
|
+
bg: var(--warning-subtitle),
|
|
38
|
+
text: var(--warning-text),
|
|
39
|
+
dot: var(--warning),
|
|
40
|
+
),
|
|
41
|
+
'delivered': (
|
|
42
|
+
bg: var(--success-subtitle),
|
|
43
|
+
text: var(--success-text),
|
|
44
|
+
),
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Each generated rule looks like:
|
|
50
|
+
|
|
51
|
+
```css
|
|
52
|
+
ds-badge[data-status='in-transit'] {
|
|
53
|
+
--ds-badge-bg-color: …;
|
|
54
|
+
--ds-badge-label-color: …;
|
|
55
|
+
}
|
|
56
|
+
ds-status-dot[data-status='in-transit'] {
|
|
57
|
+
--ds-status-dot-color: …;
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Map entry shape** — `(bg:, text?:, dot?:)`:
|
|
62
|
+
| key | required | drives |
|
|
63
|
+
|--------|----------|---------------------------------------------------|
|
|
64
|
+
| `bg` | yes | `--ds-badge-bg-color` (badge fill) |
|
|
65
|
+
| `text` | no | `--ds-badge-label-color` (badge label); unset → component `--text-secondary` fallback |
|
|
66
|
+
| `dot` | no | `--ds-status-dot-color`; unset → falls back to `text` |
|
|
67
|
+
|
|
68
|
+
Prefer palette/role tokens (`var(--success-subtitle)`) over raw hex so a theme swap propagates.
|
|
69
|
+
|
|
70
|
+
3. **The type (TS, optional but recommended).** `DsStatusKey` is an open `string` until you augment
|
|
71
|
+
`DsStatusRegistry` via declaration merging — then it narrows to the union of your keys, giving
|
|
72
|
+
autocomplete and compile-time safety on `[status]`:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
// e.g. src/app/core/ds-status-registry.d.ts
|
|
76
|
+
import '@ids-group-ltd/ids-design-system';
|
|
77
|
+
|
|
78
|
+
declare module '@ids-group-ltd/ids-design-system' {
|
|
79
|
+
interface DsStatusRegistry {
|
|
80
|
+
'in-transit': true;
|
|
81
|
+
delivered: true;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Register every key you pass to `[status]`. If some `[status]` bindings are typed `string`
|
|
87
|
+
(generic pass-through components), either tighten those inputs to your status union or leave the
|
|
88
|
+
registry unaugmented (open `string` is a fully supported mode — you just lose autocomplete).
|
|
89
|
+
|
|
90
|
+
### `semantic-preset`
|
|
91
|
+
|
|
92
|
+
If you only need the four canonical semantics plus neutral, skip the custom map and include the
|
|
93
|
+
preset mixin directly:
|
|
94
|
+
|
|
95
|
+
```scss
|
|
96
|
+
@include status.semantic-preset; // wires info / success / warning / error / neutral
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
`semantic-preset` is a ready-made `define(...)` call wiring `info` / `success` / `warning` /
|
|
100
|
+
`error` / `neutral` to the DS semantic token families. Mix it with your own `define(...)` for
|
|
101
|
+
domain keys the presets don't cover.
|
|
102
|
+
|
|
103
|
+
## Recommended file layout
|
|
104
|
+
|
|
105
|
+
Keep the wiring in one place, separate from ad-hoc component overrides:
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
src/styles/_badge-status.scss // @use 'styles/status' + a single @include status.define(...)
|
|
109
|
+
src/app/core/ds-status-registry.d.ts // DsStatusRegistry augmentation (same key list)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Then `@use './styles/badge-status';` from your global stylesheet. The SCSS map and the TS registry
|
|
113
|
+
are two views of the **same** key list — keep them in sync.
|
|
114
|
+
|
|
115
|
+
## Migrating from pre-0.5.1 (the factory-status era)
|
|
116
|
+
|
|
117
|
+
Before 0.5.1 the DS shipped factory statuses: `ds-badge[variant]` (`BadgeVariant`) rendered a
|
|
118
|
+
status-named CSS class (`.badge.completed`, `.badge.error`, …) coloured by factory
|
|
119
|
+
`--status-*` lifecycle tokens. **All of that is gone.** Full migration, per usage:
|
|
120
|
+
|
|
121
|
+
**1. Rename the input on every `ds-badge` / `ds-status-dot`.**
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
before after
|
|
125
|
+
<ds-badge variant="active"> <ds-badge status="active">
|
|
126
|
+
<ds-badge [variant]="s()"> <ds-badge [status]="s()">
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Static `variant="…"` on a badge is a **silent** failure after the rename — Angular ignores the
|
|
130
|
+
unknown attribute rather than erroring, so grep for `variant=` on `ds-badge` specifically.
|
|
131
|
+
(`ds-progress` etc. keep their own `variant` input — only badge/status-dot changed.)
|
|
132
|
+
|
|
133
|
+
**2. Wire the colours via `styles/status`** (replaces the removed factory `--status-*` tokens and
|
|
134
|
+
per-status classes — see `status-lifecycle-tokens-removed` in `../0.5.1.json`):
|
|
135
|
+
|
|
136
|
+
```scss
|
|
137
|
+
@use '@ids-group-ltd/ids-design-system/styles/status' as status;
|
|
138
|
+
@include status.define(
|
|
139
|
+
(
|
|
140
|
+
'active': (
|
|
141
|
+
bg: …,
|
|
142
|
+
text: …,
|
|
143
|
+
),
|
|
144
|
+
'completed': (
|
|
145
|
+
bg: var(--success),
|
|
146
|
+
text: var(--text-on-success),
|
|
147
|
+
),
|
|
148
|
+
// …one entry per status value you pass to [status]
|
|
149
|
+
)
|
|
150
|
+
);
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**3. Augment `DsStatusRegistry`** (TS) with the same keys — see the type section above.
|
|
154
|
+
|
|
155
|
+
**4. Drop the removed exports/tokens.** The types `BadgeVariant` / `BadgeLifecycle` /
|
|
156
|
+
`BadgeSemantic` / `StatusValue` and the factory `--status-planning-*` / `--status-confirmed-*` /
|
|
157
|
+
`--status-active-*` / `--status-completed-*` tokens no longer exist; delete any references.
|
|
158
|
+
|
|
159
|
+
### If you coloured badges with your own CSS class (not the factory statuses)
|
|
160
|
+
|
|
161
|
+
A consumer may have styled badges by a **status-named class** it set itself, e.g.
|
|
162
|
+
`class="chip {{ status }}"` + `ds-badge.chip.completed { --ds-badge-bg-color: … }`, rather than via
|
|
163
|
+
`[variant]`. That keeps working mechanically (the `--ds-badge-*` hooks are unchanged), **but** any
|
|
164
|
+
value that previously fell through to a _factory_ colour (because you had no class rule for it) is
|
|
165
|
+
now uncoloured. The clean fix is to stop keying colour off the class and move to the status API:
|
|
166
|
+
|
|
167
|
+
```html
|
|
168
|
+
<!-- before: colour keyed off the interpolated class -->
|
|
169
|
+
<ds-badge class="chip {{ status }}">{{ label }}</ds-badge>
|
|
170
|
+
<!-- after: class kept for layout only, colour via [data-status] -->
|
|
171
|
+
<ds-badge class="chip" [status]="status">{{ label }}</ds-badge>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
```scss
|
|
175
|
+
// before: colour per class // after: colour per status key, once
|
|
176
|
+
ds-badge.chip.completed { … } @include status.define(( 'completed': (bg: …, text: …), … ));
|
|
177
|
+
ds-badge.chip.in-transit { … } // .chip now carries layout rules only
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
This unifies every badge on one mechanism and restores the values that used to rely on factory
|
|
181
|
+
colours. See the field app's `_badge-status.scss` for a full real-world map.
|
package/migrations/0.5.1.json
CHANGED
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
"kind": "input-rename",
|
|
229
229
|
"old": "ds-badge[variant]",
|
|
230
230
|
"new": "status",
|
|
231
|
-
"note": "ds-badge [variant] (BadgeVariant) renamed to [status] (typed DsStatusKey); the value is
|
|
231
|
+
"note": "ds-badge [variant] (BadgeVariant) renamed to [status] (typed DsStatusKey); the value is emitted as a data-status attribute, NOT a factory/status-named CSS class, and the component ships NO built-in colour for any value. Full migration is THREE coupled steps — the rename alone leaves badges uncoloured: (1) rename the input, keeping the value: variant=\"active\" -> status=\"active\", [variant]=\"expr\" -> [status]=\"expr\" (a static variant=\"x\" left on ds-badge is a SILENT failure — Angular ignores the unknown attribute rather than erroring — so grep variant= scoped to ds-badge). (2) Wire colours via the styles/status SCSS API keyed on [data-status] (see status-lifecycle-tokens-removed for the @use/@include snippet). (3) For TS type-safety, augment DsStatusRegistry with your keys so DsStatusKey narrows from open string to your union. NOTE for consumers who coloured badges via their OWN status-named class (class=\"chip {{ status }}\" + ds-badge.chip.completed{...}) instead of [variant]: that keeps working (the --ds-badge-* hooks are unchanged), BUT any value that previously fell through to a FACTORY colour is now uncoloured — move colour off the class onto [data-status] via styles/status. Full guide + before/after: migrations/0.5.1/badge-statuses.md. [count]/[solid]/[withDot]/[max] and the --ds-badge-* hooks are unchanged.",
|
|
232
232
|
"searchHints": [
|
|
233
233
|
"<ds-badge",
|
|
234
234
|
"variant=\"",
|
|
@@ -264,7 +264,7 @@
|
|
|
264
264
|
"kind": "removed-api",
|
|
265
265
|
"old": "--status-planning-bg-color",
|
|
266
266
|
"new": null,
|
|
267
|
-
"note": "The factory lifecycle status theme tokens --status-planning-bg-color / -text-color, --status-confirmed-*, --status-active-*, --status-completed-* are removed. If you set them to theme lifecycle badges/dots,
|
|
267
|
+
"note": "The factory lifecycle status theme tokens --status-planning-bg-color / -text-color, --status-confirmed-*, --status-active-*, --status-completed-* are removed. If you set them to theme lifecycle badges/dots, declare your statuses instead via the styles/status SCSS API, which writes the public --ds-badge-* / --ds-status-dot-* tokens keyed on [data-status]. Example: `@use '@ids-group-ltd/ids-design-system/styles/status' as status; @include status.define(('completed': (bg: var(--success), text: var(--text-on-success)), 'active': (bg: var(--info-subtitle), text: var(--info-text))));` — one entry per status value you pass to ds-badge/ds-status-dot [status]; entry shape is (bg required, text?, dot?); or use status.semantic-preset for the info/success/warning/error/neutral set. Pair with the DsStatusRegistry TS augmentation (see badge-variant-to-status-rename) so [status] is type-checked. Full guide: migrations/0.5.1/badge-statuses.md. The dimension token --status-dot-size is NOT removed.",
|
|
268
268
|
"searchHints": [
|
|
269
269
|
"--status-planning",
|
|
270
270
|
"--status-confirmed",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.6.3",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"id": "date-picker-default-month-input-rename",
|
|
6
|
+
"kind": "input-rename",
|
|
7
|
+
"old": "ds-date-picker[defaultMonth]",
|
|
8
|
+
"new": "defaultDate",
|
|
9
|
+
"note": "Pure rename, behavior unchanged: the input always took a full Date and the calendar opens on its month with grid focus on its exact day (only when the value is empty; never written to the value). [defaultMonth] -> [defaultDate]. No other component has a defaultMonth input.",
|
|
10
|
+
"searchHints": [
|
|
11
|
+
"[defaultMonth]",
|
|
12
|
+
"defaultMonth"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "table-passive-row-hover-removed",
|
|
17
|
+
"kind": "behavior",
|
|
18
|
+
"old": null,
|
|
19
|
+
"new": null,
|
|
20
|
+
"note": "ds-table row hover tint is now rendered ONLY when rowInteractive is set (clickable rows also gain a pressed :active fill via --ds-table-row-pressed-bg-color). Was: every table tinted rows on hover. No code compiles differently — visual/behavior only. If a passive table must keep the old always-on hover, add consumer CSS: ds-table tbody tr:hover td { background-color: var(--surface-secondary); }. Tables that already set rowInteractive need no action.",
|
|
21
|
+
"searchHints": [
|
|
22
|
+
"<ds-table",
|
|
23
|
+
"rowInteractive"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"informational": [
|
|
28
|
+
"ds-table gains an opt-in rowActions kebab (⋮) column with a rowActionSelected output and new TableRowAction/TableRowActionEvent types — additive, off by default (no rowActions input = no column), no code change.",
|
|
29
|
+
"ds-table gains opt-in activeRowId (current-row highlight + aria-current, --ds-table-row-active-bg-color token) and filterQuery (client-side substring filter; TableColumn.filterable restricts the match set) inputs — additive, off by default, no code change.",
|
|
30
|
+
"TableColumn.width / .truncate / .hidden were declared but ignored — they now take effect (header width px, ellipsis clip at width with title tooltip, column skipped). Consumers who set these fields expecting nothing will see them start working.",
|
|
31
|
+
"TableColumn.hideable now works too: hideable columns surface a header column-picker button (checkbox popover, last visible column locked); new two-way hiddenKeys model (Set<string> | null, null derives from hidden flags) — additive, no picker unless a column sets hideable.",
|
|
32
|
+
"ds-table gains inline cell editing: columns with editable:true become a text input on double-click (Enter/blur commit, Escape cancel); the table emits cellEdited {row,key,value} (new TableCellEditEvent type) and the consumer applies the update — additive, off by default, no code change.",
|
|
33
|
+
"ds-table gains per-column set filters: a column with filter:'set' shows a header funnel with a searchable checkbox list of distinct values; new two-way columnFilters model (Map<key, Set<value>>) combines with filterQuery — additive, off by default, no code change.",
|
|
34
|
+
"ds-table gains opt-in resizableColumns (drag handles on header right edges) and a two-way columnWidths model (Map<key, px>, seeded from column.width) — additive, off by default, no code change.",
|
|
35
|
+
"ds-table gains opt-in reorderableColumns (drag handle + up/down in the column panel, which now lists all columns) and a two-way columnOrder model (string[] | null, null = declaration order); the panel's Reset to default resets all three column models — order, visibility and widths (columnOrder, hiddenKeys, columnWidths) — additive, off by default, no code change.",
|
|
36
|
+
"ds-table gains a public exportCsv(filename?) method — downloads visible columns of the filtered+sorted rows as UTF-8 CSV, wired to a consumer button via template ref — additive, no code change.",
|
|
37
|
+
"ds-table gains opt-in density ('default'|'compact'), zebra (odd-row stripe via new --ds-table-row-stripe-bg-color token) and maxHeight (caps + vertically scrolls the body, pairs with stickyHeader) inputs — additive, off by default, no code change.",
|
|
38
|
+
"ds-table gains an opt-in stickyScrollbar input — the scroll container's native horizontal bar is hidden and a proxy stuck to the bottom of the nearest scroll ancestor mirrors scrollLeft both ways (hides itself when nothing overflows) — additive, off by default, no code change.",
|
|
39
|
+
"ds-table truncate cells: clicking a clipped cell now opens the full value in a popover (title tooltip unchanged; the click is swallowed, never doubling as a row click; unclipped cells pass the click to the row) — behavior only, no code change.",
|
|
40
|
+
"ds-table rowInteractive: a click that finishes a mouse text selection no longer emits rowClicked, so cell text can be drag-selected and copied (only a selection made by that same gesture counts — a stale selection never blocks clicks); keyboard activation unaffected — behavior only, no code change.",
|
|
41
|
+
"ds-select/ds-autocomplete/ds-multi-select/ds-time-picker/ds-color-picker/ds-popover overlay panels are now non-modal (no backdrop): the page behind stays interactive, panels close on outside pointer-down or page scroll, button-style triggers toggle, and focus returns to the trigger only for Escape/selection/in-panel closes — behavior only, no code change.",
|
|
42
|
+
"ds-date-picker no longer strands focus on <body> when the calendar closes via outside click or page scroll — close() now returns focus to the field (preventScroll) when focus was inside the calendar, except a coarse-pointer device with an editable field (allowInput) which is left alone to avoid re-summoning the soft keyboard (allowInput=false always refocuses); Escape/selection/preset closes unchanged — pure bugfix, no code change.",
|
|
43
|
+
"ds-toast enter animation now slides up from below into place (exit unchanged) — visual/motion only, no code change.",
|
|
44
|
+
"Typography utilities .t-* (.t-display/.t-h1…/.t-mono-block) now read each type property as a longhand through a public --ds-t-<name>-<prop> hook (font-weight/font-size/line-height/font-family + letter-spacing/text-transform/color/background-color/border-color/border-radius where set), falling back to the current semantic token — consumers can retune a single axis per utility in a scope without forking. Default rendering unchanged; structural box props stay raw. Additive, no code change.",
|
|
45
|
+
"ds-input/ds-search/ds-textarea now focus the inner input/textarea when the frame chrome is clicked (leading/trailing icon, prefix/suffix add-on, padding); nested controls (projected buttons, clear x, password toggle) keep their own click. New exported FieldClickFocusDirective ([dsFieldClickFocus]) for consumers' own field wrappers. Overlay-trigger fields already focused on click and are unchanged — behavior only, no code change.",
|
|
46
|
+
"New ds-app-shell — a slotted fixed-frame application shell ([sidenav]/[topbar]/default content slots) that pins to the viewport (100dvh, overflow: hidden) so only the content <main> scrolls (scrollbar-gutter: stable + automatic native-scrollbar-width padding compensation via the new --ds-scrollbar-width root variable); topbarSpan input ('content' default full-height rail | 'full' full-width topbar) switches the geometry; scroll-to-top on router navigation via the new exported ShellScrollService (also injectable from routed pages for manual scrollToTop()). Tokens: --ds-app-shell-pad-x/-pad-y/-content-max-width/-height — additive, no code change.",
|
|
47
|
+
"New ds-sidenav-footer — a rail footer brick: Search row with a live grouped-results popover, Alerts row with an unread dot + feed popover, Collapse row, and a user card with an account menu; inputs userName/userRole/alerts/collapsed/searchProvider/alertItems/profileRoute, outputs collapseToggled/alertsOpened/signOutSelected; new exported types SidenavSearchProvider/SidenavSearchResult/SidenavAlertItem. Tokens: --ds-sidenav-footer-popover-width/-popover-max-width/-popover-max-height/-head-tracking/-dot-size — additive, no code change.",
|
|
48
|
+
"ds-sidenav gains an optional logoLetter input (sets the brand-tile glyph when it differs from the brand's first letter) and a [dsBrandName] projection slot (exported marker directive BrandNameDirective) that renders custom wordmark markup inside .brand-name in place of the plain brand text — both optional, omitting them renders exactly as before, additive, no code change."
|
|
49
|
+
]
|
|
50
|
+
}
|
package/migrations/README.md
CHANGED
|
@@ -27,6 +27,12 @@ at release time.
|
|
|
27
27
|
|
|
28
28
|
See `AUTHORING.md` for how to write a good entry.
|
|
29
29
|
|
|
30
|
+
**Prose guides per version.** The `<version>.json` manifest is the terse machine mirror. When a
|
|
31
|
+
release needs a longer human walkthrough (a worked before/after, a mental model, edge cases the
|
|
32
|
+
`note` can't hold), put it in a sibling folder named for that version: `migrations/<version>/*.md`
|
|
33
|
+
(e.g. `migrations/0.5.1/badge-statuses.md`). The folder never matches the `*.json` glob, so tooling
|
|
34
|
+
ignores it; the manifest `note` and the CHANGELOG point at the guide by path.
|
|
35
|
+
|
|
30
36
|
**Authoring:** drafted at release time alongside the CHANGELOG entry (the `/changelog` workflow
|
|
31
37
|
drafts it from the release diff; the release author reviews). The prose changelog stays canonical
|
|
32
38
|
for humans — the manifest is its machine mirror; if they disagree, fix the manifest.
|
package/package.json
CHANGED
package/styles/_typography.scss
CHANGED
|
@@ -1,26 +1,175 @@
|
|
|
1
1
|
// Type utility classes — ported from CLAUDE_DESIGN_DS/tokens.css §Type utilities.
|
|
2
2
|
// These are GLOBAL by design — consumers apply them via class.
|
|
3
|
+
//
|
|
4
|
+
// Consumer-first token contract (same as components): every token-driven
|
|
5
|
+
// property is a longhand read through a public `--ds-t-<name>-*` custom
|
|
6
|
+
// property that FALLS BACK to the current semantic token, so a consumer can
|
|
7
|
+
// retune a single axis in a scope — e.g.
|
|
8
|
+
// `[data-brand] .t-h3 { --ds-t-h3-font-weight: var(--font-weight-bold) }` —
|
|
9
|
+
// without re-declaring the rest or forking the class. Structural box props
|
|
10
|
+
// (padding / margin / border-width / max-width / overflow) stay raw.
|
|
3
11
|
|
|
4
|
-
.t-display
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.t-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.t-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
.t-display {
|
|
13
|
+
font-weight: var(--ds-t-display-font-weight, var(--font-weight-extrabold));
|
|
14
|
+
font-size: var(--ds-t-display-font-size, var(--font-size-display));
|
|
15
|
+
line-height: var(--ds-t-display-line-height, var(--line-height-tight));
|
|
16
|
+
font-family: var(--ds-t-display-font-family, var(--font-display));
|
|
17
|
+
letter-spacing: var(--ds-t-display-letter-spacing, var(--letter-spacing-tight));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.t-h1 {
|
|
21
|
+
font-weight: var(--ds-t-h1-font-weight, var(--font-weight-extrabold));
|
|
22
|
+
font-size: var(--ds-t-h1-font-size, var(--font-size-h1));
|
|
23
|
+
line-height: var(--ds-t-h1-line-height, var(--line-height-tight));
|
|
24
|
+
font-family: var(--ds-t-h1-font-family, var(--font-heading));
|
|
25
|
+
letter-spacing: var(--ds-t-h1-letter-spacing, var(--letter-spacing-tight));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.t-h2 {
|
|
29
|
+
font-weight: var(--ds-t-h2-font-weight, var(--font-weight-extrabold));
|
|
30
|
+
font-size: var(--ds-t-h2-font-size, var(--font-size-h2));
|
|
31
|
+
line-height: var(--ds-t-h2-line-height, var(--line-height-snug));
|
|
32
|
+
font-family: var(--ds-t-h2-font-family, var(--font-heading));
|
|
33
|
+
letter-spacing: var(--ds-t-h2-letter-spacing, var(--letter-spacing-snug));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.t-h3 {
|
|
37
|
+
font-weight: var(--ds-t-h3-font-weight, var(--font-weight-extrabold));
|
|
38
|
+
font-size: var(--ds-t-h3-font-size, var(--font-size-h3));
|
|
39
|
+
line-height: var(--ds-t-h3-line-height, var(--line-height-snug));
|
|
40
|
+
font-family: var(--ds-t-h3-font-family, var(--font-heading));
|
|
41
|
+
letter-spacing: var(--ds-t-h3-letter-spacing, var(--letter-spacing-snug));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.t-h4 {
|
|
45
|
+
font-weight: var(--ds-t-h4-font-weight, var(--font-weight-bold));
|
|
46
|
+
font-size: var(--ds-t-h4-font-size, var(--font-size-h4));
|
|
47
|
+
line-height: var(--ds-t-h4-line-height, var(--line-height-snug));
|
|
48
|
+
font-family: var(--ds-t-h4-font-family, var(--font-heading));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.t-h5 {
|
|
52
|
+
font-weight: var(--ds-t-h5-font-weight, var(--font-weight-bold));
|
|
53
|
+
font-size: var(--ds-t-h5-font-size, var(--font-size-h5));
|
|
54
|
+
line-height: var(--ds-t-h5-line-height, var(--line-height-snug));
|
|
55
|
+
font-family: var(--ds-t-h5-font-family, var(--font-heading));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.t-card-title {
|
|
59
|
+
font-weight: var(--ds-t-card-title-font-weight, var(--font-weight-bold));
|
|
60
|
+
font-size: var(--ds-t-card-title-font-size, var(--card-title-fs));
|
|
61
|
+
line-height: var(--ds-t-card-title-line-height, var(--line-height-snug));
|
|
62
|
+
font-family: var(--ds-t-card-title-font-family, var(--font-heading));
|
|
63
|
+
margin: 0;
|
|
64
|
+
color: var(--ds-t-card-title-color, var(--text-primary));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.t-l {
|
|
68
|
+
font-weight: var(--ds-t-l-font-weight, var(--font-weight-regular));
|
|
69
|
+
font-size: var(--ds-t-l-font-size, var(--font-size-l));
|
|
70
|
+
line-height: var(--ds-t-l-line-height, var(--line-height-base));
|
|
71
|
+
font-family: var(--ds-t-l-font-family, var(--font-sans));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.t-l-bold {
|
|
75
|
+
font-weight: var(--ds-t-l-bold-font-weight, var(--font-weight-bold));
|
|
76
|
+
font-size: var(--ds-t-l-bold-font-size, var(--font-size-l));
|
|
77
|
+
line-height: var(--ds-t-l-bold-line-height, var(--line-height-base));
|
|
78
|
+
font-family: var(--ds-t-l-bold-font-family, var(--font-sans));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.t-m {
|
|
82
|
+
font-weight: var(--ds-t-m-font-weight, var(--font-weight-regular));
|
|
83
|
+
font-size: var(--ds-t-m-font-size, var(--font-size-m));
|
|
84
|
+
line-height: var(--ds-t-m-line-height, var(--line-height-base));
|
|
85
|
+
font-family: var(--ds-t-m-font-family, var(--font-sans));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.t-m-bold {
|
|
89
|
+
font-weight: var(--ds-t-m-bold-font-weight, var(--font-weight-bold));
|
|
90
|
+
font-size: var(--ds-t-m-bold-font-size, var(--font-size-m));
|
|
91
|
+
line-height: var(--ds-t-m-bold-line-height, var(--line-height-base));
|
|
92
|
+
font-family: var(--ds-t-m-bold-font-family, var(--font-sans));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.t-s {
|
|
96
|
+
font-weight: var(--ds-t-s-font-weight, var(--font-weight-regular));
|
|
97
|
+
font-size: var(--ds-t-s-font-size, var(--font-size-s));
|
|
98
|
+
line-height: var(--ds-t-s-line-height, var(--line-height-base));
|
|
99
|
+
font-family: var(--ds-t-s-font-family, var(--font-sans));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.t-s-bold {
|
|
103
|
+
font-weight: var(--ds-t-s-bold-font-weight, var(--font-weight-bold));
|
|
104
|
+
font-size: var(--ds-t-s-bold-font-size, var(--font-size-s));
|
|
105
|
+
line-height: var(--ds-t-s-bold-line-height, var(--line-height-base));
|
|
106
|
+
font-family: var(--ds-t-s-bold-font-family, var(--font-sans));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.t-xs {
|
|
110
|
+
font-weight: var(--ds-t-xs-font-weight, var(--font-weight-regular));
|
|
111
|
+
font-size: var(--ds-t-xs-font-size, var(--font-size-xs));
|
|
112
|
+
line-height: var(--ds-t-xs-line-height, var(--line-height-base));
|
|
113
|
+
font-family: var(--ds-t-xs-font-family, var(--font-sans));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.t-xs-bold {
|
|
117
|
+
font-weight: var(--ds-t-xs-bold-font-weight, var(--font-weight-bold));
|
|
118
|
+
font-size: var(--ds-t-xs-bold-font-size, var(--font-size-xs));
|
|
119
|
+
line-height: var(--ds-t-xs-bold-line-height, var(--line-height-base));
|
|
120
|
+
font-family: var(--ds-t-xs-bold-font-family, var(--font-sans));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.t-overline {
|
|
124
|
+
font-weight: var(--ds-t-overline-font-weight, var(--font-weight-bold));
|
|
125
|
+
font-size: var(--ds-t-overline-font-size, var(--font-size-2xs));
|
|
126
|
+
line-height: var(--ds-t-overline-line-height, var(--line-height-base));
|
|
127
|
+
font-family: var(--ds-t-overline-font-family, var(--font-sans));
|
|
128
|
+
letter-spacing: var(--ds-t-overline-letter-spacing, var(--letter-spacing-wider));
|
|
129
|
+
text-transform: var(--ds-t-overline-text-transform, uppercase);
|
|
130
|
+
color: var(--ds-t-overline-color, var(--text-tertiary));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.t-caption {
|
|
134
|
+
font-weight: var(--ds-t-caption-font-weight, var(--font-weight-regular));
|
|
135
|
+
font-size: var(--ds-t-caption-font-size, var(--font-size-xs));
|
|
136
|
+
line-height: var(--ds-t-caption-line-height, var(--line-height-base));
|
|
137
|
+
font-family: var(--ds-t-caption-font-family, var(--font-sans));
|
|
138
|
+
color: var(--ds-t-caption-color, var(--text-tertiary));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.t-mono {
|
|
142
|
+
font-weight: var(--ds-t-mono-font-weight, var(--font-weight-medium));
|
|
143
|
+
font-size: var(--ds-t-mono-font-size, var(--font-size-mono));
|
|
144
|
+
line-height: var(--ds-t-mono-line-height, var(--line-height-base));
|
|
145
|
+
font-family: var(--ds-t-mono-font-family, var(--font-mono));
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.t-mono-inline {
|
|
149
|
+
font-weight: var(--ds-t-mono-inline-font-weight, var(--font-weight-regular));
|
|
150
|
+
font-size: var(--ds-t-mono-inline-font-size, var(--font-size-mono));
|
|
151
|
+
line-height: var(--ds-t-mono-inline-line-height, 1);
|
|
152
|
+
font-family: var(--ds-t-mono-inline-font-family, var(--font-mono));
|
|
153
|
+
color: var(--ds-t-mono-inline-color, var(--text-primary));
|
|
154
|
+
background-color: var(--ds-t-mono-inline-bg-color, var(--surface-secondary));
|
|
155
|
+
padding: 1px var(--space-1);
|
|
156
|
+
border-radius: var(--ds-t-mono-inline-radius, var(--radius-sm));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.t-mono-block {
|
|
160
|
+
font-weight: var(--ds-t-mono-block-font-weight, var(--font-weight-regular));
|
|
161
|
+
font-size: var(--ds-t-mono-block-font-size, var(--font-size-mono));
|
|
162
|
+
line-height: var(--ds-t-mono-block-line-height, var(--line-height-loose));
|
|
163
|
+
font-family: var(--ds-t-mono-block-font-family, var(--font-mono));
|
|
164
|
+
background-color: var(--ds-t-mono-block-bg-color, var(--surface-secondary));
|
|
165
|
+
border-width: var(--border-width-default);
|
|
166
|
+
border-style: solid;
|
|
167
|
+
border-color: var(--ds-t-mono-block-border-color, var(--border-divider));
|
|
168
|
+
border-radius: var(--ds-t-mono-block-radius, var(--radius-md));
|
|
169
|
+
padding: var(--space-3) var(--space-4);
|
|
170
|
+
max-width: 100%;
|
|
171
|
+
overflow-x: auto;
|
|
172
|
+
}
|
|
24
173
|
|
|
25
174
|
.sr-only {
|
|
26
175
|
position: absolute !important;
|