@ids-group-ltd/ids-design-system 0.3.0 → 0.5.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.
@@ -0,0 +1,122 @@
1
+ // =========================================================================
2
+ // Dark theme — Tier 2 role overrides.
3
+ //
4
+ // Composes the dark palette (neutral ramp + shadow-l 95%) with the shared
5
+ // role structure, then overrides only the roles whose VALUES differ from
6
+ // the light defaults. The activation selector (:root[data-theme='dark'])
7
+ // lives in styles/_theme-activation.scss. Dark is opt-in — light is the
8
+ // default; there is no automatic prefers-color-scheme switch.
9
+ //
10
+ // Most roles follow the inverted --neutral-* ramp automatically (custom
11
+ // props resolve at use-time). This file overrides ONLY roles that can't
12
+ // follow the flip: tint/subtle surfaces (near-white *-50 picks → dark hue
13
+ // tints), on-tint text (*-text / *-strong → lighter stops), hover/pressed
14
+ // direction, scrim (must stay dark), focus halo alpha, and charts.
15
+ // On-fill text already points at theme-stable --static-white/--static-ink.
16
+ // =========================================================================
17
+
18
+ @use 'palette';
19
+ @use '../semantic';
20
+
21
+ @mixin theme {
22
+ @include palette.palette;
23
+ @include semantic.roles;
24
+
25
+ // Interaction states: on dark, hover/pressed must LIGHTEN. The default theme
26
+ // derives them as color-mix toward black (darkens) — wrong direction here.
27
+ // Mirror the light recipe's 88% / 76% steps, mixed toward white instead.
28
+ --primary-hover: color-mix(in srgb, var(--primary) 88%, white);
29
+ --primary-pressed: color-mix(in srgb, var(--primary) 76%, white);
30
+ --primary-selected-hover: color-mix(in srgb, var(--primary) 88%, white);
31
+ --secondary-hover: color-mix(in srgb, var(--secondary) 88%, white);
32
+ --secondary-pressed: color-mix(in srgb, var(--secondary) 76%, white);
33
+ --tertiary-hover: color-mix(in srgb, var(--tertiary) 88%, white);
34
+ --tertiary-pressed: color-mix(in srgb, var(--tertiary) 76%, white);
35
+ --success-hover: color-mix(in srgb, var(--success) 88%, white);
36
+ --warning-hover: color-mix(in srgb, var(--warning) 88%, white);
37
+ --error-hover: color-mix(in srgb, var(--error) 88%, white);
38
+ --error-pressed: color-mix(in srgb, var(--error) 76%, white);
39
+ --success-pressed: color-mix(in srgb, var(--success) 76%, white);
40
+ --warning-pressed: color-mix(in srgb, var(--warning) 76%, white);
41
+ --info-hover: color-mix(in srgb, var(--info) 88%, white);
42
+
43
+ // Brand tint surfaces + on-tint text (channel-derived → track rebrand).
44
+ --surface-tint: hsl(var(--primary-h) 45% 16%);
45
+ --primary-subtitle: hsl(var(--primary-h) 45% 18%);
46
+ --primary-muted: hsl(var(--primary-h) 40% 26%);
47
+ --primary-muted-strong: hsl(var(--primary-h) 42% 32%);
48
+ --primary-strong: hsl(var(--primary-h) 90% 72%);
49
+
50
+ --secondary-subtitle: hsl(var(--secondary-h) 45% 18%);
51
+ --secondary-muted: hsl(var(--secondary-h) 40% 26%);
52
+ --secondary-muted-strong: hsl(var(--secondary-h) 42% 32%);
53
+ --secondary-strong: hsl(var(--secondary-h) 90% 72%);
54
+
55
+ --tertiary-subtitle: hsl(var(--tertiary-h) 45% 18%);
56
+ --tertiary-muted: hsl(var(--tertiary-h) 40% 26%);
57
+ --tertiary-muted-strong: hsl(var(--tertiary-h) 42% 32%);
58
+ --tertiary-strong: hsl(var(--tertiary-h) 90% 72%);
59
+
60
+ --text-link: hsl(var(--primary-h) 90% 74%);
61
+ --link-visited: hsl(var(--primary-h) 50% 70%);
62
+
63
+ // Status families: dark tint bg + border, lighter text.
64
+ --success-subtitle: hsl(132deg 38% 14%);
65
+ --success-muted: hsl(132deg 34% 20%);
66
+ --success-muted-strong: hsl(132deg 30% 28%);
67
+ --success-border: hsl(132deg 30% 28%);
68
+ --success-text: hsl(132deg 55% 62%);
69
+
70
+ --warning-subtitle: hsl(45deg 42% 14%);
71
+ --warning-muted: hsl(45deg 38% 22%);
72
+ --warning-muted-strong: hsl(45deg 35% 30%);
73
+ --warning-border: hsl(45deg 35% 30%);
74
+ --warning-text: hsl(45deg 90% 62%);
75
+
76
+ --error-subtitle: hsl(0deg 45% 16%);
77
+ --error-muted: hsl(0deg 40% 24%);
78
+ --error-muted-strong: hsl(0deg 38% 32%);
79
+ --error-border: hsl(0deg 38% 32%);
80
+ --error-text: hsl(0deg 85% 74%);
81
+
82
+ --info-subtitle: hsl(217deg 45% 16%);
83
+ --info-muted: hsl(217deg 40% 24%);
84
+ --info-border: hsl(217deg 38% 32%);
85
+ --info-text: hsl(217deg 90% 74%);
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
+ // Scrim stays dark — must NOT follow --shadow-tint-l: 95%.
94
+ --surface-scrim: hsl(225deg 39% 4% / 70%);
95
+
96
+ // Field focus halo — boost alpha for legibility on dark.
97
+ --focus-field-alpha: .35;
98
+
99
+ // Chart / dataviz overrides. Axis/grid/label/title/cursor already flip via the
100
+ // --neutral-* / --text-* roles; only the light-bg-tuned bits move here.
101
+ --chart-hover-bg-color: hsl(0deg 0% 100% / 6%); // light wash (default dark wash is invisible on dark)
102
+ --chart-tooltip-bg-color: var(--surface-overlay); // native dark tooltip, not an inverted light box
103
+ --chart-tooltip-text-color: var(--text-primary);
104
+ --chart-tooltip-border: var(--border-strong);
105
+
106
+ // Sequential — flip so low → high reads dark → bright on a dark canvas.
107
+ --chart-seq-1: var(--blue-800);
108
+ --chart-seq-2: var(--blue-700);
109
+ --chart-seq-3: var(--blue-600);
110
+ --chart-seq-4: var(--blue-500);
111
+ --chart-seq-5: var(--blue-400);
112
+ --chart-seq-6: var(--blue-300);
113
+
114
+ // Divergent — bright red ← dark-neutral zero → bright green (|value| → brightness).
115
+ --chart-div--3: hsl(0deg 70% 62%);
116
+ --chart-div--2: hsl(0deg 55% 46%);
117
+ --chart-div--1: hsl(0deg 45% 32%);
118
+ --chart-div-0: var(--neutral-150);
119
+ --chart-div-1: hsl(140deg 40% 32%);
120
+ --chart-div-2: hsl(140deg 48% 46%);
121
+ --chart-div-3: hsl(140deg 55% 60%);
122
+ }
@@ -0,0 +1,34 @@
1
+ // =========================================================================
2
+ // Light palette — Tier 1b per-theme primitives.
3
+ //
4
+ // Exposes @mixin palette with ONLY the light-specific primitives:
5
+ // · --neutral-* slot pointed at the cool-gray ramp
6
+ // · --shadow-tint-l: 7% (light shadow substrate lightness)
7
+ //
8
+ // Theme-independent ramps (--cool-gray-*, --brand-gray-*, --blue-*, etc.)
9
+ // and HSL channels live in themes/_base-palette.scss and emit at :root.
10
+ // =========================================================================
11
+
12
+ @mixin palette {
13
+ /* Neutral family slot — semantic pointer at the active gray ramp from the
14
+ palette. Default: hand-drawn cool-gray. <html data-neutrals="brand">
15
+ (ds-docs tweaks panel) repoints it at the brand-derived brand-gray ramp,
16
+ where --primary-h re-tints every gray. Roles below consume --neutral-*
17
+ so the family switch never touches them. */
18
+ --neutral-0: var(--cool-gray-0);
19
+ --neutral-50: var(--cool-gray-50);
20
+ --neutral-100: var(--cool-gray-100);
21
+ --neutral-150: var(--cool-gray-150);
22
+ --neutral-200: var(--cool-gray-200);
23
+ --neutral-300: var(--cool-gray-300);
24
+ --neutral-400: var(--cool-gray-400);
25
+ --neutral-500: var(--cool-gray-500);
26
+ --neutral-600: var(--cool-gray-600);
27
+ --neutral-700: var(--cool-gray-700);
28
+ --neutral-800: var(--cool-gray-800);
29
+ --neutral-900: var(--cool-gray-900);
30
+ --neutral-950: var(--cool-gray-950);
31
+
32
+ // Shadow substrate lightness for light theme.
33
+ --shadow-tint-l: 7%;
34
+ }
@@ -0,0 +1,15 @@
1
+ // =========================================================================
2
+ // Light theme — Tier 2 role assignments (light).
3
+ //
4
+ // Composes the light-specific palette (neutral slot + shadow-l) with the
5
+ // shared role structure. Light needs no extra role overrides — _roles.scss
6
+ // already holds the light-default values.
7
+ // =========================================================================
8
+
9
+ @use 'palette';
10
+ @use '../semantic';
11
+
12
+ @mixin theme {
13
+ @include palette.palette;
14
+ @include semantic.roles;
15
+ }