@ids-group-ltd/ids-design-system 0.5.0 → 0.6.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/CHANGELOG.md +193 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1070 -289
- 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/0.6.0.json +35 -0
- package/migrations/AUTHORING.md +134 -0
- package/migrations/README.md +35 -0
- package/package.json +1 -1
- package/styles/_breakpoints.scss +14 -5
- package/styles/_layout-utils.scss +27 -7
- package/styles/_page-grid.scss +3 -0
- package/styles/_status.scss +57 -0
- package/styles/_tokens.scss +12 -4
- package/styles/_typography.scss +1 -1
- package/styles/ds.scss +2 -0
- 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 +569 -110
|
@@ -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
|
@@ -183,9 +183,9 @@
|
|
|
183
183
|
--opacity-state-active: 0.24; /* deepest pressed layer (e.g. tag close on :active) */
|
|
184
184
|
|
|
185
185
|
/* ============================================================
|
|
186
|
-
Breakpoints —
|
|
187
|
-
the --bp-* custom properties
|
|
188
|
-
|
|
186
|
+
Breakpoints — $bp-* Sass aliases + up()/down() mixins live in
|
|
187
|
+
_breakpoints.scss (pure); the --bp-* custom properties come from
|
|
188
|
+
its emit-vars mixin, included once by styles/ds.
|
|
189
189
|
============================================================ */
|
|
190
190
|
|
|
191
191
|
/* ============================================================
|
|
@@ -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);
|
package/styles/_typography.scss
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
.t-caption { font: var(--font-weight-regular) var(--font-size-xs) / var(--line-height-base) var(--font-sans); color: var(--text-tertiary); }
|
|
21
21
|
.t-mono { font: var(--font-weight-medium) var(--font-size-mono) / var(--line-height-base) var(--font-mono); }
|
|
22
22
|
.t-mono-inline { font: var(--font-weight-regular) var(--font-size-mono) / 1 var(--font-mono); background: var(--surface-secondary); color: var(--text-primary); padding: 1px var(--space-1); border-radius: var(--radius-sm); }
|
|
23
|
-
.t-mono-block { font: var(--font-weight-regular) var(--font-size-mono) / var(--line-height-loose) var(--font-mono); background: var(--surface-secondary); border: var(--border-width-default) solid var(--border-divider); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
|
|
23
|
+
.t-mono-block { font: var(--font-weight-regular) var(--font-size-mono) / var(--line-height-loose) var(--font-mono); background: var(--surface-secondary); border: var(--border-width-default) solid var(--border-divider); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); max-width: 100%; overflow-x: auto; }
|
|
24
24
|
|
|
25
25
|
.sr-only {
|
|
26
26
|
position: absolute !important;
|
package/styles/ds.scss
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
// @use 'themes/base-palette'; @use 'styles/theme-activation'; @use 'styles/tokens';
|
|
14
14
|
// @use 'styles/fonts'; @use 'styles/link'; …
|
|
15
15
|
|
|
16
|
+
@use 'breakpoints' as bp-emit;
|
|
16
17
|
@forward '../themes/base-palette';
|
|
17
18
|
@forward 'theme-activation';
|
|
18
19
|
@forward 'tokens';
|
|
@@ -31,3 +32,4 @@
|
|
|
31
32
|
@forward 'toast-overlay';
|
|
32
33
|
@forward 'overlay-motion';
|
|
33
34
|
@forward 'skeleton-shimmer';
|
|
35
|
+
@include bp-emit.emit-vars;
|
|
@@ -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
|
// -----------------------------------------------------------------------
|
package/themes/_semantic.scss
CHANGED
|
@@ -65,22 +65,22 @@
|
|
|
65
65
|
|
|
66
66
|
/* Text overlaid on arbitrary imagery (camera feeds, photos) — pairs a
|
|
67
67
|
guaranteed-light colour with a contrast shadow. */
|
|
68
|
-
--text-on-media:
|
|
68
|
+
--text-on-media: white;
|
|
69
69
|
--text-on-media-shadow: 0 1px 3px hsl(0deg 0% 0% / 70%);
|
|
70
70
|
--text-link: var(--blue-700);
|
|
71
|
-
--text-on-primary:
|
|
72
|
-
--text-on-success:
|
|
71
|
+
--text-on-primary: white;
|
|
72
|
+
--text-on-success: white;
|
|
73
73
|
|
|
74
74
|
/* Warning fill is yellow (--yellow-400 #F4D43A) — white text on it is only
|
|
75
75
|
~1.5:1 (fails WCAG). On-warning text is the darkest neutral (~10:1). */
|
|
76
76
|
--text-on-warning: var(--static-ink);
|
|
77
|
-
--text-on-error:
|
|
77
|
+
--text-on-error: white;
|
|
78
78
|
|
|
79
79
|
/* Icons */
|
|
80
80
|
--icon-default: var(--neutral-500);
|
|
81
81
|
--icon-strong: var(--neutral-700);
|
|
82
82
|
--icon-muted: var(--neutral-400);
|
|
83
|
-
--icon-on-primary:
|
|
83
|
+
--icon-on-primary: white;
|
|
84
84
|
|
|
85
85
|
/* Semantic → palette bridge. The lib knows colours by PURPOSE; the theme
|
|
86
86
|
(themes/light/_theme.scss) ships the concrete ramps + HSL channels. This
|
|
@@ -115,16 +115,16 @@
|
|
|
115
115
|
--primary-muted: var(--blue-100);
|
|
116
116
|
--primary-muted-strong: var(--blue-200);
|
|
117
117
|
--primary-strong: var(--blue-700);
|
|
118
|
-
--primary-on:
|
|
118
|
+
--primary-on: white;
|
|
119
119
|
|
|
120
|
-
/* Accent / secondary role —
|
|
121
|
-
|
|
122
|
-
--
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
--secondary-h: var(--
|
|
126
|
-
--secondary-s: var(--
|
|
127
|
-
--secondary-l: var(--
|
|
120
|
+
/* Accent / secondary role — maps onto the palette --orange family (Tier-1),
|
|
121
|
+
kept distinct from --primary so the brand slots read apart. Override
|
|
122
|
+
--secondary-h/s/l per-brand (or via the tweaks panel) to reskin it —
|
|
123
|
+
--secondary recomposes automatically. Hover/pressed derive from --secondary
|
|
124
|
+
so any hue change propagates. */
|
|
125
|
+
--secondary-h: var(--orange-h);
|
|
126
|
+
--secondary-s: var(--orange-s);
|
|
127
|
+
--secondary-l: var(--orange-l);
|
|
128
128
|
|
|
129
129
|
--secondary: hsl(var(--secondary-h) var(--secondary-s) var(--secondary-l));
|
|
130
130
|
--secondary-hover: color-mix(in srgb, var(--secondary) 88%, black);
|
|
@@ -139,12 +139,12 @@
|
|
|
139
139
|
tonal accents (decorative chips, hierarchy tones, indicators). Mirrors
|
|
140
140
|
the --primary / --secondary token-family shape: HSL channels for halo
|
|
141
141
|
composition, hover/pressed via color-mix, subtle/muted ramps for tonal
|
|
142
|
-
surfaces.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
--tertiary-h: var(--
|
|
146
|
-
--tertiary-s: var(--
|
|
147
|
-
--tertiary-l: var(--
|
|
142
|
+
surfaces. Maps onto the palette --violet family (Tier-1), distinct from
|
|
143
|
+
--primary / --secondary. Brands override --tertiary-h/s/l (or --tertiary
|
|
144
|
+
directly for non-HSL values) to reskin it. */
|
|
145
|
+
--tertiary-h: var(--violet-h);
|
|
146
|
+
--tertiary-s: var(--violet-s);
|
|
147
|
+
--tertiary-l: var(--violet-l);
|
|
148
148
|
|
|
149
149
|
--tertiary: hsl(var(--tertiary-h) var(--tertiary-s) var(--tertiary-l));
|
|
150
150
|
--tertiary-hover: color-mix(in srgb, var(--tertiary) 88%, black);
|
|
@@ -200,24 +200,6 @@
|
|
|
200
200
|
--info-border: var(--sky-200);
|
|
201
201
|
--info-text: var(--sky-700);
|
|
202
202
|
|
|
203
|
-
/* Status pills (event lifecycle).
|
|
204
|
-
DECISION: --status-confirmed-* chains through --primary-* so a
|
|
205
|
-
brand re-skin moves Confirmed with it. The other lifecycle
|
|
206
|
-
stages are deliberately neutral/green/dark to keep semantic
|
|
207
|
-
distance from brand. */
|
|
208
|
-
|
|
209
|
-
/* Status pills — canonical (single system).
|
|
210
|
-
Legacy classes `.badge--active` (single) and ad-hoc semantic
|
|
211
|
-
pills are unified in the Badge component to consume these tokens. */
|
|
212
|
-
--status-planning-bg-color: var(--neutral-150);
|
|
213
|
-
--status-planning-text-color: var(--neutral-700);
|
|
214
|
-
--status-confirmed-bg-color: var(--primary-subtitle);
|
|
215
|
-
--status-confirmed-text-color: var(--primary-strong);
|
|
216
|
-
--status-active-bg-color: var(--green-50);
|
|
217
|
-
--status-active-text-color: var(--green-700);
|
|
218
|
-
--status-completed-bg-color: var(--neutral-900);
|
|
219
|
-
--status-completed-text-color: var(--neutral-0);
|
|
220
|
-
|
|
221
203
|
/* Focus rings.
|
|
222
204
|
Outer halos use hsla() composed from brand/danger HSL channels
|
|
223
205
|
so re-skinning --primary-h propagates into focus state.
|
package/themes/dark/_theme.scss
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// follow the flip: tint/subtle surfaces (near-white *-50 picks → dark hue
|
|
13
13
|
// tints), on-tint text (*-text / *-strong → lighter stops), hover/pressed
|
|
14
14
|
// direction, scrim (must stay dark), focus halo alpha, and charts.
|
|
15
|
-
// On-fill text
|
|
15
|
+
// On-dark-fill text points at --static-ink; on-light-fill uses literal white.
|
|
16
16
|
// =========================================================================
|
|
17
17
|
|
|
18
18
|
@use 'palette';
|
|
@@ -84,12 +84,6 @@
|
|
|
84
84
|
--info-border: hsl(217deg 38% 32%);
|
|
85
85
|
--info-text: hsl(217deg 90% 74%);
|
|
86
86
|
|
|
87
|
-
// Status pills that referenced palette stops directly (green-50/700) — repoint
|
|
88
|
-
// to the dark status roles so the lifecycle pill reads on dark. (planning →
|
|
89
|
-
// neutral, confirmed → primary-*, completed → neutral all follow flips.)
|
|
90
|
-
--status-active-bg-color: var(--success-subtitle);
|
|
91
|
-
--status-active-text-color: var(--success-text);
|
|
92
|
-
|
|
93
87
|
// Scrim stays dark — must NOT follow --shadow-tint-l: 95%.
|
|
94
88
|
--surface-scrim: hsl(225deg 39% 4% / 70%);
|
|
95
89
|
|