@ids-group-ltd/ids-design-system 0.5.0 → 0.5.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/CHANGELOG.md +116 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +283 -180
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.1.0.json +9 -0
- package/migrations/0.2.0.json +73 -0
- package/migrations/0.2.1.json +7 -0
- package/migrations/0.2.2.json +8 -0
- package/migrations/0.3.0.json +49 -0
- package/migrations/0.4.0.json +149 -0
- package/migrations/0.5.0.json +256 -0
- package/migrations/0.5.1.json +307 -0
- package/migrations/AUTHORING.md +134 -0
- package/migrations/README.md +35 -0
- package/package.json +1 -1
- package/styles/_status.scss +57 -0
- package/styles/_tokens.scss +9 -1
- package/themes/_base-palette.scss +14 -3
- package/themes/_semantic.scss +20 -38
- package/themes/dark/_theme.scss +1 -7
- package/types/ids-group-ltd-ids-design-system.d.ts +148 -101
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.5.1",
|
|
3
|
+
"items": [
|
|
4
|
+
{
|
|
5
|
+
"id": "modal-danger-input-rename",
|
|
6
|
+
"kind": "input-rename",
|
|
7
|
+
"old": "ds-modal[danger]",
|
|
8
|
+
"new": "error",
|
|
9
|
+
"note": "Status vocab unified to DsStatus (info|success|warning|error). Boolean input [danger] -> [error] (also static danger=\"...\" -> error=\"...\"). Default value unchanged.",
|
|
10
|
+
"searchHints": [
|
|
11
|
+
"<ds-modal",
|
|
12
|
+
"[danger]",
|
|
13
|
+
"danger="
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "modal-card-danger-input-rename",
|
|
18
|
+
"kind": "input-rename",
|
|
19
|
+
"old": "ds-modal-card[danger]",
|
|
20
|
+
"new": "error",
|
|
21
|
+
"note": "Same danger -> error boolean-input rename on ds-modal-card.",
|
|
22
|
+
"searchHints": [
|
|
23
|
+
"<ds-modal-card",
|
|
24
|
+
"[danger]",
|
|
25
|
+
"danger="
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "menu-item-danger-input-rename",
|
|
30
|
+
"kind": "input-rename",
|
|
31
|
+
"old": "ds-menu-item[danger]",
|
|
32
|
+
"new": "error",
|
|
33
|
+
"note": "Same danger -> error boolean-input rename on ds-menu-item.",
|
|
34
|
+
"searchHints": [
|
|
35
|
+
"<ds-menu-item",
|
|
36
|
+
"[danger]",
|
|
37
|
+
"danger="
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "stat-variant-danger-remap",
|
|
42
|
+
"kind": "value-remap",
|
|
43
|
+
"old": "ds-stat[variant]",
|
|
44
|
+
"new": null,
|
|
45
|
+
"note": "ds-stat variant value 'danger' -> 'error'. Other variant values unchanged (absent from map — leave them).",
|
|
46
|
+
"searchHints": [
|
|
47
|
+
"<ds-stat",
|
|
48
|
+
"variant=\"",
|
|
49
|
+
"[variant]="
|
|
50
|
+
],
|
|
51
|
+
"map": {
|
|
52
|
+
"danger": "variant=\"error\""
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "progress-variant-remap",
|
|
57
|
+
"kind": "value-remap",
|
|
58
|
+
"old": "ds-progress[variant]",
|
|
59
|
+
"new": null,
|
|
60
|
+
"note": "Two changes on ds-progress[variant]: 'warn' -> 'warning'; and 'indeterminate' is no longer a variant value — it becomes the boolean [indeterminate] input, so variant=\"indeterminate\" -> the bare indeterminate attribute (a bar can now be e.g. success-coloured AND indeterminate). ProgressVariant is now 'default' | 'success' | 'warning' | 'error' — TS references to the removed 'warn'/'indeterminate' members update accordingly. 'success'/'error'/'default' unchanged (absent from map).",
|
|
61
|
+
"searchHints": [
|
|
62
|
+
"<ds-progress",
|
|
63
|
+
"variant=\"",
|
|
64
|
+
"[variant]=",
|
|
65
|
+
"ProgressVariant"
|
|
66
|
+
],
|
|
67
|
+
"map": {
|
|
68
|
+
"warn": "variant=\"warning\"",
|
|
69
|
+
"indeterminate": "indeterminate"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"id": "modal-confirm-tone-danger-remap",
|
|
74
|
+
"kind": "behavior",
|
|
75
|
+
"old": "ModalConfirmTone",
|
|
76
|
+
"new": null,
|
|
77
|
+
"note": "ModalConfirmTone value 'danger' -> 'error'. Update ModalService.confirm({ tone: 'danger' }) -> { tone: 'error' } and any TS typed with ModalConfirmTone.",
|
|
78
|
+
"searchHints": [
|
|
79
|
+
"ModalConfirmTone",
|
|
80
|
+
"tone:",
|
|
81
|
+
"tone="
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "split-button-item-danger-property",
|
|
86
|
+
"kind": "behavior",
|
|
87
|
+
"old": "SplitButtonItem",
|
|
88
|
+
"new": null,
|
|
89
|
+
"note": "SplitButtonItem object property `danger` renamed to `error`. Update item literals ({ danger: true } -> { error: true }) and any TS typed with SplitButtonItem.",
|
|
90
|
+
"searchHints": [
|
|
91
|
+
"SplitButtonItem",
|
|
92
|
+
"danger:"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "menu-item-danger-label-token-rename",
|
|
97
|
+
"kind": "token-rename",
|
|
98
|
+
"old": "--ds-menu-item-danger-label-color",
|
|
99
|
+
"new": "--ds-menu-item-error-label-color",
|
|
100
|
+
"note": "Public token renamed in lockstep with [danger] -> [error]. CSS property and default unchanged.",
|
|
101
|
+
"searchHints": [
|
|
102
|
+
"--ds-menu-item-danger-label-color"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "progress-bar-warn-token-rename",
|
|
107
|
+
"kind": "token-rename",
|
|
108
|
+
"old": "--ds-progress-bar-color-warn",
|
|
109
|
+
"new": "--ds-progress-bar-color-warning",
|
|
110
|
+
"note": "Public token renamed in lockstep with the 'warn' -> 'warning' value. CSS property and default unchanged.",
|
|
111
|
+
"searchHints": [
|
|
112
|
+
"--ds-progress-bar-color-warn"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "alert-dismissed-output-rename",
|
|
117
|
+
"kind": "output-rename",
|
|
118
|
+
"old": "ds-alert[dismissed]",
|
|
119
|
+
"new": "closed",
|
|
120
|
+
"note": "Dismissal event unified to (closed): (dismissed) -> (closed) on ds-alert.",
|
|
121
|
+
"searchHints": [
|
|
122
|
+
"<ds-alert",
|
|
123
|
+
"(dismissed)"
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"id": "banner-dismissed-output-rename",
|
|
128
|
+
"kind": "output-rename",
|
|
129
|
+
"old": "ds-banner[dismissed]",
|
|
130
|
+
"new": "closed",
|
|
131
|
+
"note": "(dismissed) -> (closed) on ds-banner.",
|
|
132
|
+
"searchHints": [
|
|
133
|
+
"<ds-banner",
|
|
134
|
+
"(dismissed)"
|
|
135
|
+
]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "toast-dismissed-output-rename",
|
|
139
|
+
"kind": "output-rename",
|
|
140
|
+
"old": "ds-toast[dismissed]",
|
|
141
|
+
"new": "closed",
|
|
142
|
+
"note": "(dismissed) -> (closed) on ds-toast.",
|
|
143
|
+
"searchHints": [
|
|
144
|
+
"<ds-toast",
|
|
145
|
+
"(dismissed)"
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "table-rowclick-output-rename",
|
|
150
|
+
"kind": "output-rename",
|
|
151
|
+
"old": "ds-table[rowClick]",
|
|
152
|
+
"new": "rowClicked",
|
|
153
|
+
"note": "Action event made past-tense: (rowClick) -> (rowClicked) on ds-table.",
|
|
154
|
+
"searchHints": [
|
|
155
|
+
"<ds-table",
|
|
156
|
+
"(rowClick)"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "stepper-stepclick-output-rename",
|
|
161
|
+
"kind": "output-rename",
|
|
162
|
+
"old": "ds-stepper[stepClick]",
|
|
163
|
+
"new": "stepClicked",
|
|
164
|
+
"note": "(stepClick) -> (stepClicked) on ds-stepper.",
|
|
165
|
+
"searchHints": [
|
|
166
|
+
"<ds-stepper",
|
|
167
|
+
"(stepClick)"
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "calendar-day-dayselect-output-rename",
|
|
172
|
+
"kind": "output-rename",
|
|
173
|
+
"old": "ds-calendar-day[daySelect]",
|
|
174
|
+
"new": "daySelected",
|
|
175
|
+
"note": "(daySelect) -> (daySelected) on ds-calendar-day.",
|
|
176
|
+
"searchHints": [
|
|
177
|
+
"<ds-calendar-day",
|
|
178
|
+
"(daySelect)"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"id": "tabs-tabclose-output-rename",
|
|
183
|
+
"kind": "output-rename",
|
|
184
|
+
"old": "ds-tabs[tabClose]",
|
|
185
|
+
"new": "tabClosed",
|
|
186
|
+
"note": "(tabClose) -> (tabClosed) on ds-tabs.",
|
|
187
|
+
"searchHints": [
|
|
188
|
+
"<ds-tabs",
|
|
189
|
+
"(tabClose)"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"id": "tree-nodeselect-output-rename",
|
|
194
|
+
"kind": "output-rename",
|
|
195
|
+
"old": "ds-tree[nodeSelect]",
|
|
196
|
+
"new": "nodeSelected",
|
|
197
|
+
"note": "(nodeSelect) -> (nodeSelected) on ds-tree.",
|
|
198
|
+
"searchHints": [
|
|
199
|
+
"<ds-tree",
|
|
200
|
+
"(nodeSelect)"
|
|
201
|
+
]
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "split-button-itemselect-output-rename",
|
|
205
|
+
"kind": "output-rename",
|
|
206
|
+
"old": "ds-split-button[itemSelect]",
|
|
207
|
+
"new": "itemSelected",
|
|
208
|
+
"note": "(itemSelect) -> (itemSelected) on ds-split-button.",
|
|
209
|
+
"searchHints": [
|
|
210
|
+
"<ds-split-button",
|
|
211
|
+
"(itemSelect)"
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "title-required-name-bearing",
|
|
216
|
+
"kind": "behavior",
|
|
217
|
+
"old": "ds-drawer",
|
|
218
|
+
"new": null,
|
|
219
|
+
"note": "title is now REQUIRED on ds-drawer, ds-bottom-sheet, and ds-accordion-item (it is the component's accessible name / disclosure-button label). Add a [title]/title if any instance is missing one. ds-page-header title is now OPTIONAL (plain <h1>) — no action there.",
|
|
220
|
+
"searchHints": [
|
|
221
|
+
"<ds-drawer",
|
|
222
|
+
"<ds-bottom-sheet",
|
|
223
|
+
"<ds-accordion-item"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "badge-variant-to-status-rename",
|
|
228
|
+
"kind": "input-rename",
|
|
229
|
+
"old": "ds-badge[variant]",
|
|
230
|
+
"new": "status",
|
|
231
|
+
"note": "ds-badge [variant] (BadgeVariant) renamed to [status] (typed DsStatusKey); the value is now emitted as a data-status attribute, not a factory CSS class. Keep your value (variant=\"active\" -> status=\"active\"), BUT the built-in per-status colours are GONE — you must define your status colours via the new styles/status SCSS API keyed on [data-status] (see status-lifecycle-tokens-removed). [count]/[solid]/[withDot]/[max] and the --ds-badge-* hooks are unchanged.",
|
|
232
|
+
"searchHints": [
|
|
233
|
+
"<ds-badge",
|
|
234
|
+
"variant=\"",
|
|
235
|
+
"[variant]="
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"id": "status-dot-status-retype",
|
|
240
|
+
"kind": "behavior",
|
|
241
|
+
"old": "ds-status-dot",
|
|
242
|
+
"new": null,
|
|
243
|
+
"note": "ds-status-dot [status] keeps its name but is retyped StatusValue -> DsStatusKey and no longer defaults to 'planning'; the value is now emitted as a data-status attribute, not a `.status-dot <value>` CSS class. Any custom CSS targeting .status-dot.active / .planning / .confirmed / .completed / .warning / .error / .secondary must switch to [data-status='...']. Define status colours via the styles/status SCSS API.",
|
|
244
|
+
"searchHints": [
|
|
245
|
+
"<ds-status-dot",
|
|
246
|
+
".status-dot"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "badge-status-dot-types-removed",
|
|
251
|
+
"kind": "removed-api",
|
|
252
|
+
"old": "BadgeVariant",
|
|
253
|
+
"new": null,
|
|
254
|
+
"note": "The exported types BadgeVariant, BadgeLifecycle, BadgeSemantic (badge) and StatusValue (status-dot) are no longer exported. Type badge/status-dot status with DsStatusKey (or your own registered union via DsStatusRegistry augmentation).",
|
|
255
|
+
"searchHints": [
|
|
256
|
+
"BadgeVariant",
|
|
257
|
+
"BadgeLifecycle",
|
|
258
|
+
"BadgeSemantic",
|
|
259
|
+
"StatusValue"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"id": "status-lifecycle-tokens-removed",
|
|
264
|
+
"kind": "removed-api",
|
|
265
|
+
"old": "--status-planning-bg-color",
|
|
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, define your statuses instead via `@use '@ids-group-ltd/ids-design-system/styles/status' as status; @include status.define((...))` (or status.semantic-preset), which writes the public --ds-badge-* / --ds-status-dot-* tokens keyed on [data-status]. The dimension token --status-dot-size is NOT removed.",
|
|
268
|
+
"searchHints": [
|
|
269
|
+
"--status-planning",
|
|
270
|
+
"--status-confirmed",
|
|
271
|
+
"--status-active",
|
|
272
|
+
"--status-completed"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "default-secondary-tertiary-hues",
|
|
277
|
+
"kind": "behavior",
|
|
278
|
+
"old": "--secondary-h",
|
|
279
|
+
"new": null,
|
|
280
|
+
"note": "Default secondary/tertiary hues changed: --secondary-h/s/l now default to the --orange palette family (warm orange) and --tertiary-h/s/l to --violet (cool violet), where they previously both defaulted to --primary channels (blue). Consumers who never set --secondary-h/s/l or --tertiary-h/s/l now render orange/violet where they saw blue — VISUAL REVIEW (usually no code change). To keep the old single-hue look, set --secondary-h/s/l and --tertiary-h/s/l back to var(--primary-h/s/l).",
|
|
281
|
+
"searchHints": [
|
|
282
|
+
"--secondary-h",
|
|
283
|
+
"--tertiary-h",
|
|
284
|
+
"--secondary",
|
|
285
|
+
"--tertiary"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"id": "static-white-token-removed",
|
|
290
|
+
"kind": "removed-api",
|
|
291
|
+
"old": "--static-white",
|
|
292
|
+
"new": "white",
|
|
293
|
+
"note": "The fixed-value --static-white custom property is removed; replace any var(--static-white) with the literal keyword white (identical value, no visual change). --static-ink is retained.",
|
|
294
|
+
"searchHints": [
|
|
295
|
+
"--static-white",
|
|
296
|
+
"var(--static-white)"
|
|
297
|
+
]
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"informational": [
|
|
301
|
+
"New extensible status system: DsStatusRegistry / DsStatusKey type exports + styles/status SCSS API (define($map) / semantic-preset) — the additive half of the badge/status-dot status redesign.",
|
|
302
|
+
"Additive: DsStatus type export ('info'|'success'|'warning'|'error'); ds-progress [indeterminate] boolean input; DividerSpacing now re-exported from the public API.",
|
|
303
|
+
"Visual/behavioral only, no code change: press-feedback reworked (no button-style press on non-buttons; list/menu rows and color-picker trigger get a flat :active tint; small icon action buttons — close/dismiss/clear/remove x and the ds-tag chip close — get the button press-scale); booleanAttribute coercion on ~54 boolean inputs; ds-button tonal :active now darkens past hover.",
|
|
304
|
+
"Fixes, no action required: overlay panel --ds-* overrides now reach the portaled pane (ds-autocomplete/ds-multi-select/ds-date-picker/ds-color-picker/ds-popover/ds-time-picker); ds-autocomplete/ds-multi-select panels no longer render transparent; ds-tabs secondary variant now applies; ds-date-picker range mask no longer clips the second date + tighter value-to-icon gap; the ultra-compact density tier now scales avatar/sidenav/badge/status-dot/switch geometry.",
|
|
305
|
+
"Visual/behavioral only, no code change: ds-date-picker keeps the format mask visible while typing — the unfilled tail of the mask stays on-screen as a muted ghost (e.g. \"12/DD/YYYY\") and the typed value renders in the monospace font for exact glyph alignment."
|
|
306
|
+
]
|
|
307
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# Authoring migration manifests
|
|
2
|
+
|
|
3
|
+
How to write a `migrations/<version>.json` entry so it is complete, unambiguous, and safely
|
|
4
|
+
executable by **both** consumers of these files: a machine transform / grep, and an LLM agent whose
|
|
5
|
+
work a human then reviews. (Nx's `--agentic` runner — which delegates judgment migrations to an
|
|
6
|
+
installed AI agent, Claude Code included — is the closest industry precedent; this is a real pattern,
|
|
7
|
+
not a bespoke one.) Schema and field reference live in `README.md`; this file is the *how to write it
|
|
8
|
+
well* companion. The prose `CHANGELOG.md` stays the human source of truth — a manifest is its machine
|
|
9
|
+
mirror; if they disagree, fix the manifest.
|
|
10
|
+
|
|
11
|
+
## The one rule everything else serves
|
|
12
|
+
|
|
13
|
+
**A reader (machine or agent) must be able to act on an entry without seeing the prose changelog,
|
|
14
|
+
and know exactly where it does and does NOT apply.** Every rule below is in service of that.
|
|
15
|
+
|
|
16
|
+
## Granularity & ordering
|
|
17
|
+
|
|
18
|
+
- **One entry per mechanical unit, not per changelog bullet.** A bullet that renames a component AND
|
|
19
|
+
its types AND its tokens becomes several entries (one selector-rename, N type-renames, one
|
|
20
|
+
token-rename). A finder/applier acts on one unit; a reviewer rejects one unit.
|
|
21
|
+
- **Split a compound behavioral bullet only where the sub-changes migrate differently.** Keep one
|
|
22
|
+
`behavior` entry when the steps are one coherent action.
|
|
23
|
+
- **Substring-collision ordering.** We match by grep + token boundary + LLM, NOT by AST — so a naive
|
|
24
|
+
replace of a short identifier can corrupt a longer one that contains it (`DropdownOption` inside
|
|
25
|
+
`DropdownOptionGroup`). No industry manifest has a "longer-first" field (real engines match whole
|
|
26
|
+
AST nodes). Our mitigation: give the longer identifier its **own entry**, and in the shorter one's
|
|
27
|
+
`note` say *"rename the longer identifier first"*. Never rely on replace order alone.
|
|
28
|
+
|
|
29
|
+
## Precision
|
|
30
|
+
|
|
31
|
+
- **Exact identifiers, never a paraphrase.** `old`/`new` and `searchHints` carry the string exactly
|
|
32
|
+
as it appears in consumer code (`--ds-pagehdr-title-fs`, not "the page-header title token").
|
|
33
|
+
- **Closed enumerated lists for removals.** Name every removed symbol; "some deprecated tokens" is a
|
|
34
|
+
defect.
|
|
35
|
+
- **Bound every pattern.** If `old` is a prefix/pattern (`--ds-*-bg`), state the boundary in `note`:
|
|
36
|
+
what it covers AND what it excludes (e.g. "DS tokens only — a consumer's own `-bg` variable is not
|
|
37
|
+
affected; confirm the new name exists in the installed package when unsure").
|
|
38
|
+
- **State what is NOT affected** whenever an attribute/class/type name is shared with other
|
|
39
|
+
components — this is the same instinct as element-scoping, written for the human reviewer.
|
|
40
|
+
|
|
41
|
+
## Scope (the false-positive guard)
|
|
42
|
+
|
|
43
|
+
- **Element-scope in `old` itself**, never in prose: `element[attr]` (e.g. `ds-button[variant]`).
|
|
44
|
+
This is our lightweight `limitedTo` — it tells the finder/recheck to count matches only on that
|
|
45
|
+
element, so a shared attribute name (`variant` on `ds-badge`, `ds-select`, …) never false-positives.
|
|
46
|
+
- A plain identifier / selector / token / type has no element scope → it matches everywhere; don't
|
|
47
|
+
add a fake scope.
|
|
48
|
+
|
|
49
|
+
## `searchHints` are broad recall seeds — do NOT over-anchor them
|
|
50
|
+
|
|
51
|
+
`searchHints` exist to help the finder *locate candidates*; precision comes from the `old` field
|
|
52
|
+
(`element[attr]` scope) plus the finder confirming each hit's enclosing element and the recheck's
|
|
53
|
+
scoped grep — NOT from a narrow hint. So keep hints broad enough for recall, even if they match
|
|
54
|
+
non-target occurrences the finder will later drop:
|
|
55
|
+
|
|
56
|
+
- **Attribute-value items**: hint the bare attribute (`variant="`, `size="`), NOT the element+attribute
|
|
57
|
+
together. Angular tags routinely span lines (`<ds-button⏎ variant="…">`), so an element-anchored
|
|
58
|
+
hint like `ds-button variant=` would MISS the multi-line cases the bare hint catches. The
|
|
59
|
+
element scope lives in `old`, and the finder walks up to confirm the enclosing element.
|
|
60
|
+
- **Token-pattern items**: don't anchor to `--ds-` when non-`--ds-` DS-owned globals are in scope.
|
|
61
|
+
(The `--*-bg` rename also renames `--select-bg` / `--chart-*-bg` / `--status-*-bg`, which have no
|
|
62
|
+
`--ds-` prefix — a `--ds-`-anchored hint would silently miss them.) Carry the precision in the
|
|
63
|
+
`note` (what's DS-owned vs the consumer's own vars), not in a narrowed hint.
|
|
64
|
+
|
|
65
|
+
Rule of thumb: a hint that risks a false *negative* (missed usage) is worse than one that risks a
|
|
66
|
+
false *positive* (the finder/recheck discard those cheaply).
|
|
67
|
+
|
|
68
|
+
## `value-remap` map conventions
|
|
69
|
+
|
|
70
|
+
- **Key = old VALUE. Value = the FULL replacement of the whole `attr="oldValue"` token** (or `null`
|
|
71
|
+
to drop the attribute). Never a bare value — that makes the applier guess.
|
|
72
|
+
- value→value: `{ "secondary": "variant=\"tonal\"" }`
|
|
73
|
+
- value→different attribute: `{ "outline": "color=\"neutral\" variant=\"outline\"" }`
|
|
74
|
+
- value→becomes default (drop): `{ "primary": null }`
|
|
75
|
+
- value→becomes a bare boolean attribute: `{ "indeterminate": "indeterminate" }`
|
|
76
|
+
- **Passthrough-by-omission (the universal convention).** A value the changelog does NOT change is
|
|
77
|
+
simply ABSENT from the map — the applier and recheck leave it untouched, never guess. Only
|
|
78
|
+
enumerate values the changelog actually addresses.
|
|
79
|
+
- **Identity = still valid.** A value that stays valid maps to its own full token
|
|
80
|
+
(`{ "text": "variant=\"text\"" }`); the recheck treats it as valid, not as "old to remove".
|
|
81
|
+
- **Dynamic bindings.** If the changelog moves values to a different attribute, say in `note` that
|
|
82
|
+
`[attr]="expr"` bindings and any method/field/type supplying old values must be rebound/retyped too.
|
|
83
|
+
|
|
84
|
+
## Default-value changes get their OWN entry
|
|
85
|
+
|
|
86
|
+
A changed default is invisible in a diff, so it hides. Give it a dedicated item (usually `behavior`),
|
|
87
|
+
worded **"was X, now Y, restore via Z"** with the literal restore snippet. Do NOT bury it inside a
|
|
88
|
+
rename entry. (E.g. a button size default moving `l`→`md`, or a hue default moving to a new palette
|
|
89
|
+
family with "point the channel back at `--primary-h/s/l` to keep the old look".)
|
|
90
|
+
|
|
91
|
+
## Changes that aren't a clean find/replace
|
|
92
|
+
|
|
93
|
+
- **One-old-maps-to-many-new** (a semantic rename where the replacement depends on context): classify
|
|
94
|
+
`behavior`, and in `note` give the **decision rule the agent should follow**, not "review your
|
|
95
|
+
usage". Point it at the version's real sources for the exact new name
|
|
96
|
+
(`-fg` → resolve to `-text-color` / `-label-color` / `-icon-color` by reading the component's SCSS).
|
|
97
|
+
- **Genuinely un-mechanizable residue** stays a `behavior` item with a precise `note`; the workflow
|
|
98
|
+
attempts it and escalates to manual review only if it can't be verified — and that escalation is
|
|
99
|
+
greppable (the old `old` still present), never silent.
|
|
100
|
+
|
|
101
|
+
## Kind selection (quick map)
|
|
102
|
+
|
|
103
|
+
| The change is… | kind |
|
|
104
|
+
|---|---|
|
|
105
|
+
| identifier → identifier (selector/type/input/output/token/class) | the matching `*-rename` |
|
|
106
|
+
| same attribute, values change | `value-remap` (+ `map`) |
|
|
107
|
+
| Sass `@use` path / mixin / function moved | `scss-api` |
|
|
108
|
+
| new code the consumer must ADD | `code-add` (snippet in `new`, site in `note`, `searchHints` locate it) |
|
|
109
|
+
| API removed WITH a replacement path | `removed-api` |
|
|
110
|
+
| needs a code edit but not a find/replace (wrap, restructure, changed default/timing/event payload) | `behavior` |
|
|
111
|
+
| documented but needs NO consumer code edit (additive / visual-only / internal) | NOT an item → `informational` |
|
|
112
|
+
|
|
113
|
+
**Catch-all:** if you can't confidently fit a breaking/changed entry to a mechanical kind, make it
|
|
114
|
+
`behavior` (never drop it). Reading the changelog completely matters more than perfect kinds.
|
|
115
|
+
|
|
116
|
+
## actionable vs informational
|
|
117
|
+
|
|
118
|
+
Decide by CONTENT, not by which `###` section it sits in — an actionable change can hide in
|
|
119
|
+
Added/Changed/Fixed prose, and an "additive" bullet can carry a behavioral default change.
|
|
120
|
+
Actionable = existing consumer code stops working or *behaving as before*. Everything else (new
|
|
121
|
+
components, new optional inputs, additive tokens whose defaults equal the old role token, pure
|
|
122
|
+
bugfixes, visual polish) → `informational`, so a reader knows silence = safe.
|
|
123
|
+
|
|
124
|
+
## Per-entry checklist
|
|
125
|
+
|
|
126
|
+
- [ ] `id` is a stable, unique kebab slug.
|
|
127
|
+
- [ ] `old`/`new`/`searchHints` are exact code strings; element-scoped as `element[attr]` where shared.
|
|
128
|
+
- [ ] `kind` correct; `map` present iff `value-remap`; `new: null` for removals & `behavior`.
|
|
129
|
+
- [ ] `value-remap` map: full-token replacements, only changed values listed, identities map to self.
|
|
130
|
+
- [ ] Pattern/prefix items state coverage AND exclusions in `note`.
|
|
131
|
+
- [ ] Default-value / timing / event-payload changes are their own `behavior` entry with restore info.
|
|
132
|
+
- [ ] Substring-colliding renames: longer has its own entry; shorter's `note` says "rename longer first".
|
|
133
|
+
- [ ] Non-mechanical entries carry the decision rule + where to read the real new name, not "review".
|
|
134
|
+
- [ ] Nothing documented in the block is silently dropped (actionable → item; else → `informational`).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Machine-readable migration manifests
|
|
2
|
+
|
|
3
|
+
One file per released version — `migrations/<version>.json` — mirroring that version's
|
|
4
|
+
`CHANGELOG.md` block as a structured **MigrationPlan** (the exact schema the
|
|
5
|
+
`/design-system:auto-update-package` plugin's planner produces from prose):
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{ "version": "X.Y.Z",
|
|
9
|
+
"items": [ { "id": "<stable-kebab-slug>", "kind": "<kind>", "old": "...", "new": "... | null",
|
|
10
|
+
"note": "<concrete consumer migration steps>", "searchHints": ["..."],
|
|
11
|
+
"map": { "<oldValue>": "<full replacement token | null>" } } ],
|
|
12
|
+
"informational": [ "<one-line FYI per non-actionable change group>" ] }
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
- `kind` ∈ `selector-rename | type-rename | input-rename | output-rename | token-rename |
|
|
16
|
+
class-rename | value-remap | scss-api | code-add | removed-api | behavior`.
|
|
17
|
+
- `map` (value-remap only) is keyed by old VALUE; each entry is the FULL replacement for the whole
|
|
18
|
+
`attr="oldValue"` token, `null` to drop the attribute; a value mapping to itself is still valid;
|
|
19
|
+
a value absent from the map is undocumented-as-changed and must be left untouched.
|
|
20
|
+
- `old` of an element-scoped item is `element[attr]`.
|
|
21
|
+
|
|
22
|
+
**Why:** the auto-update plugin reads the prose changelog with an LLM planner — correct, but
|
|
23
|
+
re-derived on every consumer run. A shipped manifest makes the plan deterministic: the planner
|
|
24
|
+
validates and prefers it, falling back to prose only when a version has no manifest. Every published
|
|
25
|
+
version `0.1.0`–`0.5.0` ships a manifest (older ones authored retroactively); new versions add theirs
|
|
26
|
+
at release time.
|
|
27
|
+
|
|
28
|
+
See `AUTHORING.md` for how to write a good entry.
|
|
29
|
+
|
|
30
|
+
**Authoring:** drafted at release time alongside the CHANGELOG entry (the `/changelog` workflow
|
|
31
|
+
drafts it from the release diff; the release author reviews). The prose changelog stays canonical
|
|
32
|
+
for humans — the manifest is its machine mirror; if they disagree, fix the manifest.
|
|
33
|
+
|
|
34
|
+
**Shipping:** `tools/build-schematics.mjs` copies `migrations/` into `dist/ds/migrations/`, so
|
|
35
|
+
consumers get manifests in `node_modules` and the plugin also reads them from the repo clone.
|
package/package.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// =========================================================================
|
|
2
|
+
// Status colour wiring for ds-badge / ds-status-dot.
|
|
3
|
+
//
|
|
4
|
+
// The DS ships NO statuses — a consumer declares their own vocabulary here and
|
|
5
|
+
// wires each to a colour (a palette token, recommended, or a raw value). The
|
|
6
|
+
// component keys off [data-status]; these rules set the public --ds-badge-* /
|
|
7
|
+
// --ds-status-dot-* tokens the components already read.
|
|
8
|
+
//
|
|
9
|
+
// @use 'styles/status' as status; // ds-docs (loadPaths: src/lib)
|
|
10
|
+
// // @use '@ids-group-ltd/ids-design-system/styles/status' as status; // external consumer
|
|
11
|
+
// @include status.semantic-preset; // optional universal set
|
|
12
|
+
// @include status.define((
|
|
13
|
+
// confirmed: (bg: var(--primary-subtitle), text: var(--primary-strong), dot: var(--accent)),
|
|
14
|
+
// shipped: (bg: #E1EFFF, text: #0A6DB3),
|
|
15
|
+
// ));
|
|
16
|
+
//
|
|
17
|
+
// Map entry shape: (bg:, text?:, dot?:). `bg` required (badge fill). `text`
|
|
18
|
+
// optional (badge label; unset → component's --text-secondary fallback). `dot`
|
|
19
|
+
// optional (ds-status-dot colour; unset → falls back to `text`).
|
|
20
|
+
// =========================================================================
|
|
21
|
+
|
|
22
|
+
@use 'sass:map';
|
|
23
|
+
|
|
24
|
+
@mixin define($statuses) {
|
|
25
|
+
@each $name, $spec in $statuses {
|
|
26
|
+
$bg: map.get($spec, bg);
|
|
27
|
+
$text: map.get($spec, text);
|
|
28
|
+
$dot: map.get($spec, dot);
|
|
29
|
+
|
|
30
|
+
ds-badge[data-status='#{$name}'] {
|
|
31
|
+
--ds-badge-bg-color: #{$bg};
|
|
32
|
+
@if $text {
|
|
33
|
+
--ds-badge-label-color: #{$text};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ds-status-dot[data-status='#{$name}'] {
|
|
38
|
+
@if $dot {
|
|
39
|
+
--ds-status-dot-color: #{$dot};
|
|
40
|
+
} @else if $text {
|
|
41
|
+
--ds-status-dot-color: #{$text};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Opt-in: the universal semantics wired to the DS semantic token families.
|
|
48
|
+
// Not emitted unless called — nothing is predefined at the factory.
|
|
49
|
+
@mixin semantic-preset {
|
|
50
|
+
@include define((
|
|
51
|
+
info: (bg: var(--info-subtitle), text: var(--info-text), dot: var(--info)),
|
|
52
|
+
success: (bg: var(--success-subtitle), text: var(--success-text), dot: var(--success)),
|
|
53
|
+
warning: (bg: var(--warning-subtitle), text: var(--warning-text), dot: var(--warning)),
|
|
54
|
+
error: (bg: var(--error-subtitle), text: var(--error-text), dot: var(--error)),
|
|
55
|
+
neutral: (bg: var(--surface-secondary), text: var(--text-secondary),dot: var(--icon-muted)),
|
|
56
|
+
));
|
|
57
|
+
}
|
package/styles/_tokens.scss
CHANGED
|
@@ -639,8 +639,16 @@
|
|
|
639
639
|
--hit-min: 24px;
|
|
640
640
|
--check-size: 14px;
|
|
641
641
|
--switch-track-w: 24px;
|
|
642
|
-
--switch-
|
|
642
|
+
--switch-track-h: 14px;
|
|
643
|
+
--switch-thumb-size: 10px;
|
|
644
|
+
--switch-thumb-travel: 10px;
|
|
645
|
+
--avatar-md: 20px;
|
|
646
|
+
--badge-dot-size: 4px;
|
|
647
|
+
--status-dot-size: 5px;
|
|
648
|
+
--sidenav-w: 200px;
|
|
649
|
+
--field-floating-label-top: 4px;
|
|
643
650
|
--segmented-btn-h: 20px;
|
|
651
|
+
/* Ultra also compresses field + table padding (tighter than compact/comfy). */
|
|
644
652
|
--field-pad-x: var(--space-2);
|
|
645
653
|
--field-pad-y: var(--space-1);
|
|
646
654
|
--table-cell-pad-x: var(--space-2);
|
|
@@ -77,6 +77,9 @@
|
|
|
77
77
|
// -----------------------------------------------------------------------
|
|
78
78
|
// Orange — focus / secondary signal
|
|
79
79
|
// -----------------------------------------------------------------------
|
|
80
|
+
// HSL channels (additive — --secondary composes its fill + tints from these).
|
|
81
|
+
// Reproduce --orange-500 ≈ #FF7A2E; ramp stops below stay hand-picked hex.
|
|
82
|
+
--orange-h: 22; --orange-s: 100%; --orange-l: 59%;
|
|
80
83
|
--orange-50: #FFF7F0;
|
|
81
84
|
--orange-100: #FFEEDF;
|
|
82
85
|
--orange-200: #FFD9B8;
|
|
@@ -148,6 +151,13 @@
|
|
|
148
151
|
--sky-600: #2563EB;
|
|
149
152
|
--sky-700: #1D4ED8;
|
|
150
153
|
|
|
154
|
+
// -----------------------------------------------------------------------
|
|
155
|
+
// Violet — tertiary brand hue. Channel-split only (--tertiary composes its
|
|
156
|
+
// fill + tints from these); no discrete ramp stops yet — add hand-picked hex
|
|
157
|
+
// if a component ever needs stepped violet swatches.
|
|
158
|
+
// -----------------------------------------------------------------------
|
|
159
|
+
--violet-h: 262; --violet-s: 70%; --violet-l: 56%;
|
|
160
|
+
|
|
151
161
|
// -----------------------------------------------------------------------
|
|
152
162
|
// Shadow tint — channel-split substrate h/s only. The lightness (-l) is
|
|
153
163
|
// per-theme: light uses 7%, dark uses 95% (so the same alphas read as soft
|
|
@@ -157,10 +167,11 @@
|
|
|
157
167
|
--shadow-tint-s: 39%;
|
|
158
168
|
|
|
159
169
|
// -----------------------------------------------------------------------
|
|
160
|
-
// Theme-stable
|
|
161
|
-
//
|
|
170
|
+
// Theme-stable ink anchor — never flips with the theme. On-DARK-fill text
|
|
171
|
+
// (e.g. text on the yellow warning fill) points here so it stays dark in
|
|
172
|
+
// both themes. On-LIGHT-fill text uses the literal `white` keyword directly
|
|
173
|
+
// (a token would be pure indirection — var(--x) === white for a constant).
|
|
162
174
|
// -----------------------------------------------------------------------
|
|
163
|
-
--static-white: #FFF;
|
|
164
175
|
--static-ink: #161A28;
|
|
165
176
|
|
|
166
177
|
// -----------------------------------------------------------------------
|