@ids-group-ltd/ids-design-system 1.1.2 → 1.2.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 +755 -0
- package/agent/INDEX.md +8 -7
- package/agent/charts/ds-scatter-chart.md +1 -1
- package/agent/feedback/ds-badge.md +2 -2
- package/agent/feedback/ds-chat-message.md +1 -1
- package/agent/feedback/ds-chat-step.md +2 -2
- package/agent/feedback/ds-chat-thread.md +1 -1
- package/agent/feedback/ds-stat.md +1 -1
- package/agent/feedback/ds-toast.md +2 -2
- package/agent/feedback/ds-tree.md +1 -1
- package/agent/forms/ds-button.md +3 -3
- package/agent/forms/ds-dropzone.md +1 -1
- package/agent/forms/ds-icon-button.md +3 -3
- package/agent/forms/ds-number-stepper.md +3 -3
- package/agent/forms/ds-search.md +1 -1
- package/agent/forms/ds-split-button.md +1 -1
- package/agent/foundations/tokens.md +4 -3
- package/agent/navigation/ds-app-layout.md +1 -1
- package/agent/navigation/ds-nav-divider.md +6 -0
- package/agent/navigation/{ds-sidenav-footer.md → ds-nav-footer.md} +3 -3
- package/agent/navigation/{ds-sidenav-group.md → ds-nav-group.md} +2 -2
- package/agent/navigation/{ds-sidenav-item.md → ds-nav-item.md} +6 -6
- package/agent/navigation/ds-nav.md +15 -0
- package/agent/overlays/ds-drawer.md +1 -1
- package/agent/platform/toast-service.md +1 -1
- package/components/README.md +24 -24
- package/components.md +51 -45
- package/design-system.md +8 -7
- package/eslint/deprecated-api.json +108 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-accordion.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-alert.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-app-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-auth-layout.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-avatar.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs +182 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge-badge-count-roll.component-BDNXADJZ.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs +37 -8
- package/fesm2022/ids-group-ltd-ids-design-system-components-badge.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-banner.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs +5 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-button-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs +76 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-calendar-day.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-legend.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-chart-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs +77 -18
- package/fesm2022/ids-group-ltd-ids-design-system-components-chat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-color-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-date-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-definition-term.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-description-list.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs +65 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-drawer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs +76 -9
- package/fesm2022/ids-group-ltd-ids-design-system-components-dropzone.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-field-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-funnel-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-heatmap-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs +6 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-icon-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-info-hint.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-inline-edit.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-list.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-menu.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-multi-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs +113 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav-footer.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs +228 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-nav.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs +61 -10
- package/fesm2022/ids-group-ltd-ids-design-system-components-number-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-otp-input.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs +36 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-pie-chart.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-radio-group.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs +56 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-reveal.mjs.map +1 -0
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs +10 -39
- package/fesm2022/ids-group-ltd-ids-design-system-components-scatter-chart.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs +7 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-search.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs +33 -6
- package/fesm2022/ids-group-ltd-ids-design-system-components-segmented.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-select.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs +4 -98
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav-footer.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs +11 -179
- package/fesm2022/ids-group-ltd-ids-design-system-components-sidenav.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-skeleton.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-slider.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs +3 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-split-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs +68 -5
- package/fesm2022/ids-group-ltd-ids-design-system-components-stat.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-stepper.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-switch.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table-columns.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-table.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs +41 -3
- package/fesm2022/ids-group-ltd-ids-design-system-components-tabs.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-tag.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs +6 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-textarea.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs +4 -4
- package/fesm2022/ids-group-ltd-ids-design-system-components-time-picker.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs +27 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-timeline.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs +54 -19
- package/fesm2022/ids-group-ltd-ids-design-system-components-toast.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-toggle-button.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs +8 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-tooltip.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs +21 -11
- package/fesm2022/ids-group-ltd-ids-design-system-components-tree.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs +2 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-w3w.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs +153 -1
- package/fesm2022/ids-group-ltd-ids-design-system-components.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs +11 -0
- package/fesm2022/ids-group-ltd-ids-design-system-core.mjs.map +1 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +4 -1
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/1.1.1.json +14 -4
- package/migrations/1.1.2.json +11 -3
- package/migrations/1.2.0.json +1433 -0
- package/migrations/README.md +8 -1
- package/package.json +25 -1
- package/schematics/check-overrides/index.cjs +28 -3
- package/schematics/check-overrides/scan.cjs +151 -2
- package/schematics/check-overrides/schema.json +4 -0
- package/schematics/check-overrides/surface.json +389 -74
- package/schematics/collection.json +1 -1
- package/stylelint/deprecated-tokens.json +7 -0
- package/styles/_check-box.scss +4 -3
- package/styles/_dropdown-overlay.scss +6 -8
- package/styles/_ds-color.scss +7 -2
- package/styles/_field-state.scss +4 -2
- package/styles/_focus.scss +12 -5
- package/styles/_link.scss +4 -4
- package/styles/_optical-center.scss +29 -0
- package/styles/_reveal.scss +8 -0
- package/styles/_status.scss +17 -7
- package/styles/_step-marker.scss +192 -6
- package/styles/_surface-level.scss +16 -0
- package/styles/_text-shimmer.scss +21 -0
- package/styles/_theme-activation.scss +17 -4
- package/styles/_tokens.scss +26 -7
- package/styles/ds.scss +1 -0
- package/themes/README.md +16 -21
- package/themes/_semantic.scss +129 -64
- package/themes/dark/_theme.scss +17 -25
- package/types/ids-group-ltd-ids-design-system-components-app-layout.d.ts +3 -3
- package/types/ids-group-ltd-ids-design-system-components-auth-layout.d.ts +2 -2
- package/types/ids-group-ltd-ids-design-system-components-badge.d.ts +20 -1
- package/types/ids-group-ltd-ids-design-system-components-button.d.ts +14 -3
- package/types/ids-group-ltd-ids-design-system-components-chat.d.ts +49 -4
- package/types/ids-group-ltd-ids-design-system-components-drawer.d.ts +9 -1
- package/types/ids-group-ltd-ids-design-system-components-dropzone.d.ts +28 -2
- package/types/ids-group-ltd-ids-design-system-components-icon-button.d.ts +8 -5
- package/types/ids-group-ltd-ids-design-system-components-nav-footer.d.ts +88 -0
- package/types/ids-group-ltd-ids-design-system-components-nav.d.ts +152 -0
- package/types/ids-group-ltd-ids-design-system-components-number-stepper.d.ts +21 -3
- package/types/ids-group-ltd-ids-design-system-components-pagination.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-reveal.d.ts +31 -0
- package/types/ids-group-ltd-ids-design-system-components-scatter-chart.d.ts +2 -8
- package/types/ids-group-ltd-ids-design-system-components-search.d.ts +4 -1
- package/types/ids-group-ltd-ids-design-system-components-segmented.d.ts +3 -0
- package/types/ids-group-ltd-ids-design-system-components-sidenav-footer.d.ts +12 -83
- package/types/ids-group-ltd-ids-design-system-components-sidenav.d.ts +21 -131
- package/types/ids-group-ltd-ids-design-system-components-split-button.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-stat.d.ts +10 -1
- package/types/ids-group-ltd-ids-design-system-components-tabs.d.ts +1 -0
- package/types/ids-group-ltd-ids-design-system-components-textarea.d.ts +1 -1
- package/types/ids-group-ltd-ids-design-system-components-timeline.d.ts +3 -1
- package/types/ids-group-ltd-ids-design-system-components-toast.d.ts +27 -6
- package/types/ids-group-ltd-ids-design-system-components-tree.d.ts +9 -5
- package/types/ids-group-ltd-ids-design-system-components.d.ts +26 -1
- package/types/ids-group-ltd-ids-design-system-core.d.ts +19 -1
- package/types/ids-group-ltd-ids-design-system.d.ts +7 -4
- package/agent/navigation/ds-sidenav.md +0 -13
package/styles/_tokens.scss
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
--radius-0: 0;
|
|
29
29
|
--radius-sm: 4px;
|
|
30
|
+
--radius-sm-md: 6px;
|
|
30
31
|
--radius-md: 8px;
|
|
31
32
|
--radius-lg: 12px;
|
|
32
33
|
--radius-xl: 16px;
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
/* Radius roles: components resolve --ds-<comp>-radius -> role -> value. No `field` role; scope
|
|
41
42
|
the control role instead: `ds-input { --ds-radius-control: 4px; }`. */
|
|
42
43
|
--ds-radius-inner: var(--radius-sm);
|
|
43
|
-
--ds-radius-control: var(--radius-md);
|
|
44
|
+
--ds-radius-control: var(--radius-sm-md);
|
|
44
45
|
--ds-radius-panel: var(--radius-lg);
|
|
45
46
|
--ds-radius-pill: var(--radius-pill);
|
|
46
47
|
|
|
@@ -110,6 +111,11 @@
|
|
|
110
111
|
--duration-loop-fast: 700ms;
|
|
111
112
|
--duration-loop-slow: 1400ms;
|
|
112
113
|
|
|
114
|
+
/* Items entering one after another (`dsReveal`): each waits one step more than the one before,
|
|
115
|
+
and items past `--stagger-max` wait no longer, so a long list finishes within max x step. */
|
|
116
|
+
--stagger-step: 40ms;
|
|
117
|
+
--stagger-max: 7;
|
|
118
|
+
|
|
113
119
|
/* Easing: `settle` is a critically damped spring, so a growing mark never overshoots and never shows a value the data does not hold. */
|
|
114
120
|
--ease-standard: cubic-bezier(.2, 0, 0, 1);
|
|
115
121
|
--ease-emphasized: cubic-bezier(.3, 0, .1, 1.4);
|
|
@@ -239,13 +245,17 @@
|
|
|
239
245
|
|
|
240
246
|
--ds-surface-padding: var(--space-6);
|
|
241
247
|
|
|
242
|
-
/*
|
|
248
|
+
/* A field's focus is one more border width outside its border, in the border's own colour, so the two
|
|
249
|
+
read as one crisp ring; a warning field draws its border, and its ring when focused, in the
|
|
250
|
+
opaque warning hue. `data-focus="halo"` draws the soft halo instead. Use the flat tokens, not the
|
|
243
251
|
--accent-focus-* aliases: a `var()` inside a custom property is substituted where it is
|
|
244
252
|
declared, so a ds-color zone could never reach it. */
|
|
245
|
-
--ds-field-focus-shadow: var(--
|
|
246
|
-
--ds-field-focus-shadow-error: var(--
|
|
247
|
-
--ds-field-focus-shadow-warning: var(--
|
|
248
|
-
--ds-field-focus-
|
|
253
|
+
--ds-field-focus-shadow: 0 0 0 var(--border-width-default) var(--primary);
|
|
254
|
+
--ds-field-focus-shadow-error: 0 0 0 var(--border-width-default) var(--error);
|
|
255
|
+
--ds-field-focus-shadow-warning: 0 0 0 var(--border-width-default) hsl(var(--warning-h) var(--warning-s) var(--warning-l));
|
|
256
|
+
--ds-field-focus-border-warning: hsl(var(--warning-h) var(--warning-s) var(--warning-l));
|
|
257
|
+
--ds-field-border-warning: hsl(var(--warning-h) var(--warning-s) var(--warning-l));
|
|
258
|
+
--ds-field-focus-shadow-success: 0 0 0 var(--border-width-default) var(--success);
|
|
249
259
|
--ds-control-focus-shadow: var(--focus-ring);
|
|
250
260
|
--ds-control-focus-shadow-error: var(--focus-ring-error);
|
|
251
261
|
|
|
@@ -307,7 +317,7 @@
|
|
|
307
317
|
--stepper-bar-h: 2px;
|
|
308
318
|
|
|
309
319
|
--segmented-btn-h: var(--hit-sm);
|
|
310
|
-
--segmented-r-inner: var(--radius-
|
|
320
|
+
--segmented-r-inner: var(--ds-radius-control);
|
|
311
321
|
--segmented-pad: 2px;
|
|
312
322
|
|
|
313
323
|
--sidenav-w: 240px;
|
|
@@ -495,6 +505,7 @@
|
|
|
495
505
|
--duration-slow: 0ms;
|
|
496
506
|
--duration-slower: 0ms;
|
|
497
507
|
--duration-slowest: 0ms;
|
|
508
|
+
--stagger-step: 0ms;
|
|
498
509
|
--ds-motion-chart-tooltip-move-duration: 0ms;
|
|
499
510
|
|
|
500
511
|
/* Loops are slowed, never frozen: a stopped spinner reads as "hung". The skeleton sweep is the
|
|
@@ -509,6 +520,14 @@
|
|
|
509
520
|
}
|
|
510
521
|
}
|
|
511
522
|
|
|
523
|
+
/* Tokens derived from --hit-* resolve where they are declared, so a [data-density] below :root
|
|
524
|
+
re-derives them or keeps the :root heights. */
|
|
525
|
+
[data-density] {
|
|
526
|
+
--field-h-sm: var(--hit-min);
|
|
527
|
+
--field-h-md: var(--hit-cozy);
|
|
528
|
+
--sidenav-collapsed-item: var(--hit-cozy);
|
|
529
|
+
--calendar-cell-min: var(--hit-cozy);
|
|
530
|
+
}
|
|
512
531
|
[data-density="ultra-compact"] {
|
|
513
532
|
/* 24px hits sit below WCAG 2.5.5 (44px enhanced) and at the WCAG 2.5.8 minimum. Only for
|
|
514
533
|
keyboard-first, mouse-driven screens the user opted into; never mobile or touch-first. */
|
package/styles/ds.scss
CHANGED
package/themes/README.md
CHANGED
|
@@ -15,14 +15,14 @@ Colour is layered in three concerns: a **base palette** (theme-independent primi
|
|
|
15
15
|
## Files
|
|
16
16
|
|
|
17
17
|
- **`_base-palette.scss`** — theme-independent primitives at `:root`: hue ramps (`--blue/red/green/yellow/sky/orange-*`) + HSL channels, `--cool-gray-*` / `--brand-gray-*` ramps, `--static-ink` (never flips), `--shadow-tint-h/s`, font families. Shared by every theme.
|
|
18
|
-
- **`_semantic.scss`** — `@mixin roles`: the semantic role map (surfaces, text, icons, borders, primary/secondary/tertiary families, status, status-pills, focus). Structure is identical across themes; values resolve through each theme's own `--neutral-*` ramp. Holds the **light-default** values.
|
|
18
|
+
- **`_semantic.scss`** — `@mixin inputs`: the input colours every formula reads (`--primary`, `--primary-on`, the `--primary/secondary/tertiary/error/success/warning-h/s/l` channels, `--secondary`, `--tertiary` and their `-on`), emitted once at `:root` for every theme. `@mixin roles`: the semantic role map (surfaces, text, icons, borders, primary/secondary/tertiary families, status, status-pills, focus). Structure is identical across themes; values resolve through each theme's own `--neutral-*` ramp. Holds the **light-default** values.
|
|
19
19
|
- **`light/_palette.scss` + `light/_theme.scss`** — `@mixin palette` (the `--neutral-*` slot = cool-gray + `--shadow-tint-l: 7%`) and `@mixin theme` (`palette` + `semantic.roles`). Light is the **default** skin and needs no extra overrides.
|
|
20
|
-
- **`dark/_palette.scss` + `dark/_theme.scss`** — `@mixin palette` (dark neutral ramp + `--shadow-tint-l: 3%`) and `@mixin theme` (`palette` + `semantic.roles` + the
|
|
21
|
-
- **`../styles/_theme-activation.scss`** — applies light at `:root` and dark at `:root[data-theme='dark']`, plus the light-context `data-neutrals='brand'` switch.
|
|
20
|
+
- **`dark/_palette.scss` + `dark/_theme.scss`** — `@mixin palette` (dark neutral ramp + `--shadow-tint-l: 3%`) and `@mixin theme` (`palette` + `semantic.roles` + the formula overrides that genuinely differ on dark: tint surfaces, on-tint text, hover/pressed mixed toward white, the overlay surfaces and border, scrim, `--shadow-1..4` alphas, focus-halo alpha, chart tokens).
|
|
21
|
+
- **`../styles/_theme-activation.scss`** — applies the inputs and light at `:root` and dark at `:root[data-theme='dark']`, plus the light-context `data-neutrals='brand'` switch.
|
|
22
22
|
|
|
23
23
|
`styles/ds.scss` forwards `_base-palette` then `theme-activation` (before `tokens`), so `@use 'styles/ds';` renders light out of the box.
|
|
24
24
|
|
|
25
|
-
**
|
|
25
|
+
**One set of inputs, a formula layer per theme:** the inputs are declared once, at `:root`. Each theme block declares its whole formula layer over them (`@include palette` + `@include semantic.roles` + its own overrides), so `:root[data-theme='dark']` fully replaces light's formulas rather than delta-patching them, and declares no input. A brand that sets `--primary` once is read by both themes; a value a brand sets on a derived role overrides that role's formula. The `@mixin roles` in `_semantic.scss` is an authoring-DRY device (the light-default structure both themes share), not a runtime cross-theme dependency.
|
|
26
26
|
|
|
27
27
|
## Theme switching
|
|
28
28
|
|
|
@@ -120,11 +120,11 @@ the parts that are easy to leave out are the ones that fail silently:
|
|
|
120
120
|
## Brand vs theme
|
|
121
121
|
|
|
122
122
|
- **Theme** swaps the whole role map (light ↔ dark). Light is the default; dark is opt-in and, when active, fully replaces light.
|
|
123
|
-
- **Brand** is a thin overlay scoped via attribute (`[data-brand="X"]`),
|
|
123
|
+
- **Brand** is a thin overlay scoped via attribute (`[data-brand="X"]`). Its inputs (`--primary`, the channels, the `-on` colours) reach both themes. A derived role it sets (`--primary-strong`, a tint) is a light value: the dark block declares its own formula for it at higher specificity, so a brand that wants its own dark value adds a separate `[data-theme='dark'][data-brand="X"]` layer.
|
|
124
124
|
|
|
125
125
|
## Adding a new theme
|
|
126
126
|
|
|
127
|
-
1. Create `themes/<name>/_palette.scss` (`@mixin palette` — its `--neutral-*` ramp + `--shadow-tint-l`) and `themes/<name>/_theme.scss` (`@mixin theme` — `@include palette` + `@include semantic.roles` + only the role values that differ for this theme).
|
|
127
|
+
1. Create `themes/<name>/_palette.scss` (`@mixin palette` — its `--neutral-*` ramp + `--shadow-tint-l`) and `themes/<name>/_theme.scss` (`@mixin theme` — `@include palette` + `@include semantic.roles` + only the role values that differ for this theme). Never declare an input there (`@mixin inputs`): a theme block outranks a brand's `:root` or `[data-brand]` and would take the brand away in that theme.
|
|
128
128
|
2. Add a selector block in `styles/_theme-activation.scss` (`:root[data-theme='<name>'] { @include <name>.theme; }`), after the light default.
|
|
129
129
|
|
|
130
130
|
Components never change — they consume semantic roles, which the active theme block defines.
|
|
@@ -149,7 +149,7 @@ theme role.
|
|
|
149
149
|
|
|
150
150
|
| Token | Paints | Light default | Dark default | Must meet |
|
|
151
151
|
| ------------------------ | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------------ | ---------------------------------------------------- |
|
|
152
|
-
| `--primary-strong` | text and icons on a tint: tag, chip, tonal button, selected row, tab, sidenav item, through `--accent-strong` | `hsl(from var(--primary) h calc(s * 0.85) calc(l - 7))` | `h 90%
|
|
152
|
+
| `--primary-strong` | text and icons on a tint: tag, chip, tonal button, selected row, tab, sidenav item, through `--accent-strong` | `hsl(from var(--primary) h calc(s * 0.85) calc(l - 7))` | `h 90% 80%` | 4.5:1 on every tint below and on `--surface-default` |
|
|
153
153
|
| `--surface-tint` | active rows and items (list, tree, empty state), through `--accent-surface-tint` | `hsl(from var(--primary) h 100% 97%)` | `h 45% 16%` | `--text-primary` and `--text-link` 4.5:1 on it |
|
|
154
154
|
| `--primary-subtitle` | dropdown selected option; tonal fills (button, tabs, table, calendar day, sidenav item) through `--accent-subtitle` | `hsl(from var(--primary) h 100% 97%)` | `h 45% 18%` | the text on it 4.5:1 |
|
|
155
155
|
| `--primary-muted` | dropdown selected option on hover; button, tag, avatar, sidenav item through `--accent-muted` | `hsl(from var(--primary) h 95% 94%)` | `h 40% 26%` | the text on it 4.5:1 |
|
|
@@ -161,12 +161,13 @@ Dark defaults are `hsl(from var(--primary) …)` with the hue, saturation and li
|
|
|
161
161
|
a darker step.
|
|
162
162
|
- An achromatic brand (black, gray) has no hue: the tints fall to hue 0, pink in light and dark red
|
|
163
163
|
in dark. Set the tints.
|
|
164
|
+
- The focus ring and the field halo (`--focus-ring`, `--focus-ring-inset`, `--focus-field`) take
|
|
165
|
+
`--primary` itself, at their own alpha.
|
|
164
166
|
- Still read from the channels `--primary-h/s/l`, which follow `--blue-h/s/l` and not `--primary`:
|
|
165
|
-
the
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
`--primary` (and the channels) under `[data-theme='dark'][data-brand="X"]`; every shade follows.
|
|
167
|
+
the `data-neutrals="brand"` grays. Set the three channels to your brand's HSL, or they stay
|
|
168
|
+
blue.
|
|
169
|
+
- Dark: the inputs are declared once at `:root`, so the `--primary` and channels a brand sets reach
|
|
170
|
+
the dark theme too, and every dark shade follows. A derived role set in light only stays light.
|
|
170
171
|
|
|
171
172
|
Green brand, measured in Chrome 2026-10-12:
|
|
172
173
|
|
|
@@ -181,14 +182,8 @@ Green brand, measured in Chrome 2026-10-12:
|
|
|
181
182
|
// (8.33:1 on white, 8.07:1 on the tint). Links stay blue.
|
|
182
183
|
}
|
|
183
184
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
--primary-h: 150;
|
|
187
|
-
--primary-s: 60%;
|
|
188
|
-
--primary-l: 30%;
|
|
189
|
-
// Derived: --surface-tint #163b29, --primary-subtitle #19432e, --primary-muted #285d43,
|
|
190
|
-
// --primary-muted-strong #2f7452, --primary-strong #77f8b8 (9.37:1 on the tint).
|
|
191
|
-
}
|
|
185
|
+
// The same block under data-theme="dark" derives: --primary-subtitle #19432e,
|
|
186
|
+
// --primary-muted #285d43, --primary-muted-strong #2f7452, --primary-strong #9efacc.
|
|
192
187
|
```
|
|
193
188
|
|
|
194
189
|
## Rules summary
|
|
@@ -198,4 +193,4 @@ Green brand, measured in Chrome 2026-10-12:
|
|
|
198
193
|
- Themes are sibling and self-contained; `_semantic.scss`'s `@mixin roles` holds the light-default values, dark overrides the deltas.
|
|
199
194
|
- Brands are theme-authored overlays, and a brand authored on light pairs with the default theme.
|
|
200
195
|
- Overlays take one of two fixed levels: a container (modal, drawer) is painted with `--surface-overlay`, a popover-class overlay (popover, menu, dropdown panel, picker panel, tooltip, toast) with `--surface-overlay-raised`. Each sets `--surface-secondary`, `--surface-muted`, `--surface-tint` and `--accent-surface-tint` on itself to its level's `-secondary` / `-muted` / `-tint` token (`--surface-overlay-secondary`, `--surface-overlay-raised-tint`, ...), so the hovers, fills and selected rows inside it stay a step above it. On dark the levels are `--neutral-100` and `--neutral-150`; in light every overlay token equals the role it replaces. Secondary text inside a popover-class overlay reads `--text-tertiary-overlay`: `--text-tertiary` in light, `--neutral-700` on dark.
|
|
201
|
-
- `--primary-hover`/`--primary-pressed` are auto-derived
|
|
196
|
+
- `--primary-hover`/`--primary-pressed` are auto-derived by `state-step()`: the OKLCH lightness of `--primary` moved 0.05 / 0.12 away from `--primary-on`, toward it when the pressed step would leave 0.3-0.95.
|
package/themes/_semantic.scss
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
@use 'sass:string';
|
|
2
|
+
|
|
3
|
+
// Tier 2 semantic role assignments: the light-default formulas over the inputs below, resolved through the
|
|
4
|
+
// per-theme palette; dark overrides only the deltas. At runtime exactly one theme block matches.
|
|
5
|
+
|
|
6
|
+
$state-step-hover: 0.05;
|
|
7
|
+
$state-step-pressed: 0.12;
|
|
8
|
+
|
|
9
|
+
// A hover or pressed fill: $fill's OKLCH lightness moved by $step away from the label colour $on (darker under
|
|
10
|
+
// a light label, lighter under a dark one), or toward it for both states when the pressed step would leave
|
|
11
|
+
// 0.3-0.95. A relative colour reads one origin only, so the origin is $fill mixed half and half with black or
|
|
12
|
+
// white chosen by $on: its lightness over 0.5 says the label is dark, and the fill's own lightness and chroma
|
|
13
|
+
// are recovered from it. It steps in oklab, doubling a and b back: a near-grey colour read in oklch falls under
|
|
14
|
+
// the browser's achromatic threshold, its hue reads as `none` and renders red.
|
|
15
|
+
@function state-step($fill, $on, $step) {
|
|
16
|
+
$away: 'oklch(from #{$on} clamp(0, (0.5 - l) * 1000, 1) 0 0)';
|
|
17
|
+
$probe: 'color-mix(in oklab, #{$fill}, #{$away})';
|
|
18
|
+
$dark-label: 'clamp(0, (l - 0.5) * 100000, 1)';
|
|
19
|
+
$fill-l: '(2 * l - #{$dark-label})';
|
|
20
|
+
$away-sign: '(2 * #{$dark-label} - 1)';
|
|
21
|
+
$pressed-l: '(#{$fill-l} + #{$away-sign} * #{$state-step-pressed})';
|
|
22
|
+
$flip: '(clamp(0, (0.3 - #{$pressed-l}) * 100000, 1) + clamp(0, (#{$pressed-l} - 0.95) * 100000, 1))';
|
|
23
|
+
|
|
24
|
+
@return string.unquote('oklab(from #{$probe} calc(#{$fill-l} + #{$away-sign} * (1 - 2 * #{$flip}) * #{$step}) calc(a * 2) calc(b * 2))');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// The input colours, declared once at :root for every theme. The theme blocks hold only the formulas
|
|
28
|
+
// over them, so a brand that sets an input once (--primary, a channel, an -on colour) is read by light
|
|
29
|
+
// and dark alike; a dark block that redeclared one would win over the brand by specificity.
|
|
30
|
+
@mixin inputs {
|
|
31
|
+
--primary: var(--blue-600);
|
|
32
|
+
--primary-on: white;
|
|
33
|
+
--primary-h: var(--blue-h);
|
|
34
|
+
--primary-s: var(--blue-s);
|
|
35
|
+
--primary-l: var(--blue-l);
|
|
36
|
+
|
|
37
|
+
/* Override --secondary-h/s/l (or --secondary) to reskin; hover and pressed recompose. */
|
|
38
|
+
--secondary-h: var(--orange-h);
|
|
39
|
+
--secondary-s: var(--orange-s);
|
|
40
|
+
--secondary-l: var(--orange-l);
|
|
41
|
+
--secondary: hsl(var(--secondary-h) var(--secondary-s) var(--secondary-l));
|
|
42
|
+
--secondary-on: var(--primary-on);
|
|
43
|
+
|
|
44
|
+
/* Third brand hue (tertiary button, tonal accents). Override --tertiary-h/s/l (or --tertiary) to reskin. */
|
|
45
|
+
--tertiary-h: var(--violet-h);
|
|
46
|
+
--tertiary-s: var(--violet-s);
|
|
47
|
+
--tertiary-l: var(--violet-l);
|
|
48
|
+
--tertiary: hsl(var(--tertiary-h) var(--tertiary-s) var(--tertiary-l));
|
|
49
|
+
--tertiary-on: var(--primary-on);
|
|
50
|
+
|
|
51
|
+
--error-h: var(--red-h);
|
|
52
|
+
--error-s: var(--red-s);
|
|
53
|
+
--error-l: var(--red-l);
|
|
54
|
+
--success-h: var(--green-h);
|
|
55
|
+
--success-s: var(--green-s);
|
|
56
|
+
--success-l: var(--green-l);
|
|
57
|
+
--warning-h: var(--yellow-h);
|
|
58
|
+
--warning-s: var(--yellow-s);
|
|
59
|
+
--warning-l: var(--yellow-l);
|
|
60
|
+
}
|
|
3
61
|
|
|
4
62
|
@mixin roles {
|
|
5
63
|
/* Surfaces.
|
|
@@ -12,7 +70,10 @@
|
|
|
12
70
|
overlay of that level, which rebinds them so a hover never matches the overlay fill
|
|
13
71
|
· tint : brand-tinted (active rows, sidenav active item)
|
|
14
72
|
· inverted : dark-on-light callouts, toasts
|
|
15
|
-
Hover
|
|
73
|
+
Hover and pressed on any surface: --state-layer-hover / -pressed, the element's own text colour at
|
|
74
|
+
--opacity-state-hover / -pressed over whatever is under it. Ghost and outline buttons lay --state-overlay
|
|
75
|
+
at --opacity-overlay-hover / -pressed instead: their label colour on the page, --state-overlay-tinted
|
|
76
|
+
inside a coloured surface (surface-level.tinted), where a blue layer on a red alert turns purple. */
|
|
16
77
|
--surface-canvas: var(--neutral-50);
|
|
17
78
|
--surface-default: var(--neutral-0);
|
|
18
79
|
--surface-secondary: var(--neutral-100);
|
|
@@ -22,6 +83,12 @@
|
|
|
22
83
|
--surface-tint: hsl(from var(--primary) h 100% 97%);
|
|
23
84
|
--surface-disabled: var(--neutral-100);
|
|
24
85
|
--surface-muted: var(--neutral-150);
|
|
86
|
+
--state-layer-hover: color-mix(in oklab, currentcolor calc(var(--opacity-state-hover) * 100%), transparent);
|
|
87
|
+
--state-layer-pressed: color-mix(in oklab, currentcolor calc(var(--opacity-state-pressed) * 100%), transparent);
|
|
88
|
+
--state-overlay: currentcolor;
|
|
89
|
+
--state-overlay-tinted: black;
|
|
90
|
+
--opacity-overlay-hover: 0.06;
|
|
91
|
+
--opacity-overlay-pressed: 0.12;
|
|
25
92
|
--surface-overlay-secondary: var(--surface-secondary);
|
|
26
93
|
--surface-overlay-muted: var(--surface-muted);
|
|
27
94
|
--surface-overlay-raised: var(--surface-overlay);
|
|
@@ -39,11 +106,21 @@
|
|
|
39
106
|
|
|
40
107
|
--border-default: var(--neutral-200);
|
|
41
108
|
--border-strong: var(--neutral-300);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
--border-field
|
|
109
|
+
|
|
110
|
+
/* Every field and control boundary. Translucent, so it darkens with the surface under it: 3.35-3.45:1
|
|
111
|
+
on the page, a card, an overlay and their secondary and muted fills (measured 2026-11-14). A box
|
|
112
|
+
drawing it clips its fill to the padding box, or the border mixes with the box's own fill. */
|
|
113
|
+
--border-field: rgb(0 0 0 / 46%);
|
|
114
|
+
--border-field-hover: rgb(0 0 0 / 68%);
|
|
115
|
+
|
|
116
|
+
/* Read-only ds-input, ds-select and ds-textarea. Translucent like --border-field, so it reads the
|
|
117
|
+
same on any surface: lighter than a field, stronger than a disabled one, below 3:1. */
|
|
118
|
+
--border-readonly: rgb(0 0 0 / 24%);
|
|
119
|
+
|
|
120
|
+
/* Disabled field and control boundary. Translucent like --border-field, so it stays visible on
|
|
121
|
+
--surface-muted, which equals --neutral-150; below 3:1, as disabled is exempt. */
|
|
122
|
+
--border-disabled: rgb(0 0 0 / 12%);
|
|
123
|
+
|
|
47
124
|
/* Selected segment inside a ds-segmented track, which draws no border: the fill is the boundary, at
|
|
48
125
|
least 3:1 against the track (4.98:1, measured 2026-11-09). Declared with the theme, so a ds-color
|
|
49
126
|
zone does not recolour it. */
|
|
@@ -53,12 +130,14 @@
|
|
|
53
130
|
--border-subtitle: var(--neutral-150);
|
|
54
131
|
--border-divider: var(--neutral-150);
|
|
55
132
|
--border-inverted: var(--neutral-700);
|
|
56
|
-
--border-disabled: var(--neutral-150);
|
|
57
133
|
|
|
58
134
|
--text-primary: var(--neutral-900);
|
|
59
135
|
--text-secondary: var(--neutral-700);
|
|
60
136
|
--text-tertiary: var(--neutral-500);
|
|
61
137
|
--text-tertiary-overlay: var(--text-tertiary);
|
|
138
|
+
|
|
139
|
+
/* Decoration only: a grip, the days of a neighbouring month. 2.53:1 on white is below the 4.5:1 text
|
|
140
|
+
floor; quiet text that must be read is --text-tertiary (4.74:1). */
|
|
62
141
|
--text-muted: var(--neutral-400);
|
|
63
142
|
--text-disabled: var(--neutral-400);
|
|
64
143
|
--text-inverted: var(--neutral-0);
|
|
@@ -67,6 +146,7 @@
|
|
|
67
146
|
--text-on-media-shadow: 0 1px 3px hsl(0deg 0% 0% / 70%);
|
|
68
147
|
--text-link: var(--blue-700);
|
|
69
148
|
--text-link-visited: hsl(var(--blue-h) calc(var(--blue-s) * 0.6) 45%);
|
|
149
|
+
--text-link-state-ink: black;
|
|
70
150
|
--text-on-primary: white;
|
|
71
151
|
--text-on-success: white;
|
|
72
152
|
|
|
@@ -79,85 +159,62 @@
|
|
|
79
159
|
--icon-muted: var(--neutral-400);
|
|
80
160
|
--icon-on-primary: white;
|
|
81
161
|
|
|
82
|
-
/*
|
|
83
|
-
|
|
84
|
-
--primary-
|
|
85
|
-
--primary-
|
|
86
|
-
--primary-
|
|
87
|
-
--error-h: var(--red-h);
|
|
88
|
-
--error-s: var(--red-s);
|
|
89
|
-
--error-l: var(--red-l);
|
|
90
|
-
--success-h: var(--green-h);
|
|
91
|
-
--success-s: var(--green-s);
|
|
92
|
-
--success-l: var(--green-l);
|
|
93
|
-
--warning-h: var(--yellow-h);
|
|
94
|
-
--warning-s: var(--yellow-s);
|
|
95
|
-
--warning-l: var(--yellow-l);
|
|
96
|
-
|
|
97
|
-
/* Hover, pressed and selected-hover derive from --primary via color-mix(), so overriding only --primary
|
|
98
|
-
propagates to every state. Steps (12% / 24% darker) mirror the blue 600, 700, 800 ramp. */
|
|
99
|
-
--primary: var(--blue-600);
|
|
100
|
-
--primary-hover: color-mix(in srgb, var(--primary) 88%, black);
|
|
101
|
-
--primary-pressed: color-mix(in srgb, var(--primary) 76%, black);
|
|
102
|
-
--primary-selected-hover: color-mix(in srgb, var(--primary) 88%, black);
|
|
162
|
+
/* Hover, pressed and selected-hover step the role's lightness (state-step above), so overriding only
|
|
163
|
+
--primary propagates to every state. */
|
|
164
|
+
--primary-hover: #{state-step('var(--primary)', 'var(--primary-on)', $state-step-hover)};
|
|
165
|
+
--primary-pressed: #{state-step('var(--primary)', 'var(--primary-on)', $state-step-pressed)};
|
|
166
|
+
--primary-selected-hover: #{state-step('var(--primary)', 'var(--primary-on)', $state-step-hover)};
|
|
103
167
|
--primary-subtitle: hsl(from var(--primary) h 100% 97%);
|
|
104
168
|
--primary-muted: hsl(from var(--primary) h 95% 94%);
|
|
105
169
|
--primary-muted-strong: hsl(from var(--primary) h 95% 89%);
|
|
106
|
-
--primary-strong: hsl(from var(--primary) h calc(s * 0.85) calc(l - 7));
|
|
107
|
-
--primary-on: white;
|
|
108
170
|
|
|
109
|
-
/*
|
|
110
|
-
--
|
|
111
|
-
--
|
|
112
|
-
--secondary-l: var(--orange-l);
|
|
171
|
+
/* The tonal press: the -muted fill mixed toward the family's base, read by the tonal ds-button. */
|
|
172
|
+
--primary-muted-pressed: color-mix(in srgb, var(--primary-muted) 72%, var(--primary));
|
|
173
|
+
--primary-strong: hsl(from var(--primary) h calc(s * 0.85) calc(l - 7));
|
|
113
174
|
|
|
114
|
-
--secondary:
|
|
115
|
-
--secondary-
|
|
116
|
-
--secondary-pressed: color-mix(in srgb, var(--secondary) 76%, black);
|
|
175
|
+
--secondary-hover: #{state-step('var(--secondary)', 'var(--secondary-on)', $state-step-hover)};
|
|
176
|
+
--secondary-pressed: #{state-step('var(--secondary)', 'var(--secondary-on)', $state-step-pressed)};
|
|
117
177
|
--secondary-strong: hsl(var(--secondary-h) var(--secondary-s) calc(var(--secondary-l) - 11%));
|
|
118
178
|
--secondary-subtitle: hsl(var(--secondary-h) 100% 97%);
|
|
119
179
|
--secondary-muted: hsl(var(--secondary-h) 95% 94%);
|
|
120
180
|
--secondary-muted-strong: hsl(var(--secondary-h) 95% 89%);
|
|
121
|
-
--secondary-
|
|
181
|
+
--secondary-muted-pressed: color-mix(in srgb, var(--secondary-muted) 72%, var(--secondary));
|
|
122
182
|
|
|
123
|
-
|
|
124
|
-
--tertiary-
|
|
125
|
-
--tertiary-s: var(--violet-s);
|
|
126
|
-
--tertiary-l: var(--violet-l);
|
|
127
|
-
|
|
128
|
-
--tertiary: hsl(var(--tertiary-h) var(--tertiary-s) var(--tertiary-l));
|
|
129
|
-
--tertiary-hover: color-mix(in srgb, var(--tertiary) 88%, black);
|
|
130
|
-
--tertiary-pressed: color-mix(in srgb, var(--tertiary) 76%, black);
|
|
183
|
+
--tertiary-hover: #{state-step('var(--tertiary)', 'var(--tertiary-on)', $state-step-hover)};
|
|
184
|
+
--tertiary-pressed: #{state-step('var(--tertiary)', 'var(--tertiary-on)', $state-step-pressed)};
|
|
131
185
|
--tertiary-strong: hsl(var(--tertiary-h) var(--tertiary-s) calc(var(--tertiary-l) - 11%));
|
|
132
186
|
--tertiary-subtitle: hsl(var(--tertiary-h) 100% 97%);
|
|
133
187
|
--tertiary-muted: hsl(var(--tertiary-h) 95% 94%);
|
|
134
188
|
--tertiary-muted-strong: hsl(var(--tertiary-h) 95% 89%);
|
|
135
|
-
--tertiary-
|
|
189
|
+
--tertiary-muted-pressed: color-mix(in srgb, var(--tertiary-muted) 72%, var(--tertiary));
|
|
136
190
|
|
|
137
191
|
/* -hover and -pressed derive from the base role like --primary-hover. -text, -border, -subtitle
|
|
138
192
|
and -muted are ramp picks: their contrast targets are tuned, not procedural. */
|
|
139
193
|
--success: var(--green-500);
|
|
140
|
-
--success-hover:
|
|
194
|
+
--success-hover: #{state-step('var(--success)', 'var(--success-on)', $state-step-hover)};
|
|
141
195
|
--success-subtitle: var(--green-50);
|
|
142
196
|
--success-muted: var(--green-100);
|
|
143
197
|
--success-muted-strong: var(--green-200);
|
|
198
|
+
--success-muted-pressed: color-mix(in srgb, var(--success-muted) 72%, var(--success));
|
|
144
199
|
--success-border: var(--green-200);
|
|
145
200
|
--success-text: var(--green-700);
|
|
146
201
|
|
|
147
202
|
--warning: var(--yellow-400);
|
|
148
|
-
--warning-hover:
|
|
203
|
+
--warning-hover: #{state-step('var(--warning)', 'var(--warning-on)', $state-step-hover)};
|
|
149
204
|
--warning-subtitle: var(--yellow-50);
|
|
150
205
|
--warning-muted: var(--yellow-100);
|
|
151
206
|
--warning-muted-strong: var(--yellow-200);
|
|
207
|
+
--warning-muted-pressed: color-mix(in srgb, var(--warning-muted) 72%, var(--warning));
|
|
152
208
|
--warning-border: var(--yellow-200);
|
|
153
209
|
--warning-text: var(--yellow-700);
|
|
154
210
|
|
|
155
211
|
--error: var(--red-500);
|
|
156
|
-
--error-hover:
|
|
157
|
-
--error-pressed:
|
|
212
|
+
--error-hover: #{state-step('var(--error)', 'var(--error-on)', $state-step-hover)};
|
|
213
|
+
--error-pressed: #{state-step('var(--error)', 'var(--error-on)', $state-step-pressed)};
|
|
158
214
|
--error-subtitle: var(--red-50);
|
|
159
215
|
--error-muted: var(--red-100);
|
|
160
216
|
--error-muted-strong: var(--red-200);
|
|
217
|
+
--error-muted-pressed: color-mix(in srgb, var(--error-muted) 72%, var(--error));
|
|
161
218
|
--error-highlight: var(--red-300);
|
|
162
219
|
--error-border: var(--red-200);
|
|
163
220
|
--error-text: var(--red-600);
|
|
@@ -165,35 +222,42 @@
|
|
|
165
222
|
/* -pressed (success/warning) and -on: roles the --accent-* pointers need from every ds-color
|
|
166
223
|
family. There is no --<status>-strong: for status families -text is the readable on-tint
|
|
167
224
|
colour and --accent-strong asks for it by name; brand families carry it as -strong. */
|
|
168
|
-
--success-pressed:
|
|
169
|
-
--warning-pressed:
|
|
225
|
+
--success-pressed: #{state-step('var(--success)', 'var(--success-on)', $state-step-pressed)};
|
|
226
|
+
--warning-pressed: #{state-step('var(--warning)', 'var(--warning-on)', $state-step-pressed)};
|
|
170
227
|
--error-on: var(--text-on-error);
|
|
171
228
|
--success-on: var(--text-on-success);
|
|
172
229
|
--warning-on: var(--text-on-warning);
|
|
173
230
|
|
|
174
231
|
--info: var(--sky-500);
|
|
175
|
-
--info-hover:
|
|
232
|
+
--info-hover: #{state-step('var(--info)', 'var(--text-on-primary)', $state-step-hover)};
|
|
176
233
|
--info-subtitle: var(--sky-50);
|
|
177
234
|
--info-muted: var(--sky-100);
|
|
178
235
|
--info-border: var(--sky-200);
|
|
179
236
|
--info-text: var(--sky-700);
|
|
180
237
|
|
|
238
|
+
/* The neutral colour of ds-button: a --text-secondary fill under --surface-default, stepped and tinted
|
|
239
|
+
with the same formulas as the brand families. */
|
|
240
|
+
--neutral-fill: var(--text-secondary);
|
|
241
|
+
--neutral-fill-on: var(--surface-default);
|
|
242
|
+
--neutral-fill-hover: #{state-step('var(--neutral-fill)', 'var(--neutral-fill-on)', $state-step-hover)};
|
|
243
|
+
--neutral-fill-pressed: #{state-step('var(--neutral-fill)', 'var(--neutral-fill-on)', $state-step-pressed)};
|
|
244
|
+
--neutral-fill-muted: color-mix(in srgb, var(--neutral-fill) 14%, var(--surface-default));
|
|
245
|
+
--neutral-fill-muted-strong: color-mix(in srgb, var(--neutral-fill) 22%, var(--surface-default));
|
|
246
|
+
--neutral-fill-muted-pressed: color-mix(in srgb, var(--neutral-fill-muted) 72%, var(--neutral-fill));
|
|
247
|
+
|
|
181
248
|
/* Separates the two bands of the field halo. Not `transparent`: a transparent shadow layer is a no-op, so
|
|
182
249
|
the outer band shows as one solid slab. `--surface-default`, not `--surface-canvas`, which draws a dark rim. */
|
|
183
250
|
--focus-ring-inner: var(--surface-default);
|
|
184
|
-
--focus-ring-outer-h: var(--primary-h);
|
|
185
|
-
--focus-ring-outer-s: var(--primary-s);
|
|
186
|
-
--focus-ring-outer-l: var(--primary-l);
|
|
187
251
|
--focus-ring-outer-alpha: 1;
|
|
188
252
|
|
|
189
253
|
/* Flat focus colour for components drawing an `outline` (a row in a clipping list, a swatch grid); it must
|
|
190
|
-
stay defined or `outline-color` falls to `currentColor`. `--accent`, not `--
|
|
254
|
+
stay defined or `outline-color` falls to `currentColor`. `--accent`, not `--primary`, so a
|
|
191
255
|
`ds-color` zone follows the family. */
|
|
192
256
|
--focus-ring-color: var(--accent);
|
|
193
257
|
|
|
194
258
|
--focus-ring:
|
|
195
259
|
0 0 0 2px var(--focus-ring-inner),
|
|
196
|
-
0 0 0 4px
|
|
260
|
+
0 0 0 4px rgb(from var(--primary) r g b / var(--focus-ring-outer-alpha));
|
|
197
261
|
--focus-ring-inverted:
|
|
198
262
|
0 0 0 2px var(--neutral-900),
|
|
199
263
|
0 0 0 4px var(--blue-300);
|
|
@@ -205,7 +269,7 @@
|
|
|
205
269
|
eaten by `overflow: hidden`. Reached through `[data-focus="inset"]`. */
|
|
206
270
|
--focus-ring-inset:
|
|
207
271
|
inset 0 0 0 2px var(--focus-ring-inner),
|
|
208
|
-
inset 0 0 0 4px
|
|
272
|
+
inset 0 0 0 4px rgb(from var(--primary) r g b / var(--focus-ring-outer-alpha));
|
|
209
273
|
--focus-ring-inset-error:
|
|
210
274
|
inset 0 0 0 2px var(--focus-ring-inner),
|
|
211
275
|
inset 0 0 0 4px hsl(var(--error-h) var(--error-s) var(--error-l) / 100%);
|
|
@@ -213,7 +277,7 @@
|
|
|
213
277
|
/* Field focus: coloured halo only. The alpha is a token so dark themes can boost it. */
|
|
214
278
|
--focus-field-alpha: .22;
|
|
215
279
|
--focus-field:
|
|
216
|
-
0 0 0 3px
|
|
280
|
+
0 0 0 3px rgb(from var(--primary) r g b / var(--focus-field-alpha));
|
|
217
281
|
--focus-field-error:
|
|
218
282
|
0 0 0 3px hsl(var(--error-h) var(--error-s) var(--error-l) / var(--focus-field-alpha));
|
|
219
283
|
|
|
@@ -247,8 +311,9 @@
|
|
|
247
311
|
--accent-subtitle: var(--primary-subtitle);
|
|
248
312
|
--accent-muted: var(--primary-muted);
|
|
249
313
|
--accent-muted-strong: var(--primary-muted-strong);
|
|
314
|
+
--accent-muted-pressed: var(--primary-muted-pressed);
|
|
250
315
|
--accent-on: var(--primary-on);
|
|
251
316
|
--accent-focus-ring: var(--focus-ring);
|
|
252
|
-
--accent-focus-field: var(--
|
|
317
|
+
--accent-focus-field: 0 0 0 var(--border-width-default) var(--primary);
|
|
253
318
|
--accent-surface-tint: var(--surface-tint);
|
|
254
319
|
}
|
package/themes/dark/_theme.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Dark theme role overrides. Most roles follow the inverted --neutral-* ramp because custom
|
|
2
2
|
// properties resolve at use time; only roles that cannot follow the flip are overridden: tint
|
|
3
|
-
// surfaces, on-tint text,
|
|
3
|
+
// surfaces, on-tint text, overlay surfaces, scrim, focus halo alpha, and charts.
|
|
4
4
|
|
|
5
5
|
@use 'palette';
|
|
6
6
|
@use '../semantic';
|
|
@@ -9,22 +9,6 @@
|
|
|
9
9
|
@include palette.palette;
|
|
10
10
|
@include semantic.roles;
|
|
11
11
|
|
|
12
|
-
// Hover/pressed must lighten on dark: the light recipe's 88% / 76% steps, mixed toward white.
|
|
13
|
-
--primary-hover: color-mix(in srgb, var(--primary) 88%, white);
|
|
14
|
-
--primary-pressed: color-mix(in srgb, var(--primary) 76%, white);
|
|
15
|
-
--primary-selected-hover: color-mix(in srgb, var(--primary) 88%, white);
|
|
16
|
-
--secondary-hover: color-mix(in srgb, var(--secondary) 88%, white);
|
|
17
|
-
--secondary-pressed: color-mix(in srgb, var(--secondary) 76%, white);
|
|
18
|
-
--tertiary-hover: color-mix(in srgb, var(--tertiary) 88%, white);
|
|
19
|
-
--tertiary-pressed: color-mix(in srgb, var(--tertiary) 76%, white);
|
|
20
|
-
--success-hover: color-mix(in srgb, var(--success) 88%, white);
|
|
21
|
-
--warning-hover: color-mix(in srgb, var(--warning) 88%, white);
|
|
22
|
-
--error-hover: color-mix(in srgb, var(--error) 88%, white);
|
|
23
|
-
--error-pressed: color-mix(in srgb, var(--error) 76%, white);
|
|
24
|
-
--success-pressed: color-mix(in srgb, var(--success) 76%, white);
|
|
25
|
-
--warning-pressed: color-mix(in srgb, var(--warning) 76%, white);
|
|
26
|
-
--info-hover: color-mix(in srgb, var(--info) 88%, white);
|
|
27
|
-
|
|
28
12
|
// A container overlay (modal, drawer) sits one neutral step above the page and a popover-class overlay one
|
|
29
13
|
// above that, so a menu opened in a modal stays separate; what each holds steps up with it.
|
|
30
14
|
--surface-overlay: var(--neutral-100);
|
|
@@ -35,34 +19,42 @@
|
|
|
35
19
|
--surface-overlay-raised-muted: var(--neutral-300);
|
|
36
20
|
--surface-overlay-tint: color-mix(in srgb, var(--primary) 30%, var(--surface-overlay));
|
|
37
21
|
--surface-overlay-raised-tint: color-mix(in srgb, var(--primary) 30%, var(--surface-overlay-raised));
|
|
38
|
-
--accent-strong-overlay: hsl(from var(--primary) h 90% 80%);
|
|
39
22
|
--border-overlay: var(--border-strong);
|
|
40
|
-
|
|
41
|
-
--
|
|
42
|
-
--border-field
|
|
23
|
+
|
|
24
|
+
// Lowest pair --surface-overlay-raised-muted, 3.35:1; highest the page, 4.33:1 (measured 2026-11-14).
|
|
25
|
+
--border-field: rgb(255 255 255 / 44%);
|
|
26
|
+
--border-field-hover: rgb(255 255 255 / 68%);
|
|
27
|
+
--border-readonly: rgb(255 255 255 / 24%);
|
|
28
|
+
--border-disabled: rgb(255 255 255 / 14%);
|
|
29
|
+
|
|
43
30
|
// --accent is 2.86:1 against the dark track; this fill is 7.45:1 (measured 2026-11-09).
|
|
44
31
|
--segmented-selected: var(--accent-strong-overlay);
|
|
45
32
|
--segmented-selected-on: var(--surface-default);
|
|
46
33
|
--text-tertiary-overlay: var(--neutral-700);
|
|
47
34
|
|
|
48
|
-
--
|
|
35
|
+
--state-overlay-tinted: white;
|
|
36
|
+
--opacity-overlay-hover: 0.08;
|
|
37
|
+
--opacity-overlay-pressed: 0.14;
|
|
38
|
+
|
|
39
|
+
--surface-tint: color-mix(in srgb, var(--primary) 30%, var(--surface-default));
|
|
49
40
|
--primary-subtitle: hsl(from var(--primary) h 45% 18%);
|
|
50
41
|
--primary-muted: hsl(from var(--primary) h 40% 26%);
|
|
51
42
|
--primary-muted-strong: hsl(from var(--primary) h 42% 32%);
|
|
52
|
-
--primary-strong: hsl(from var(--primary) h 90%
|
|
43
|
+
--primary-strong: hsl(from var(--primary) h 90% 80%);
|
|
53
44
|
|
|
54
45
|
--secondary-subtitle: hsl(var(--secondary-h) 45% 18%);
|
|
55
46
|
--secondary-muted: hsl(var(--secondary-h) 40% 26%);
|
|
56
47
|
--secondary-muted-strong: hsl(var(--secondary-h) 42% 32%);
|
|
57
|
-
--secondary-strong: hsl(var(--secondary-h) 90%
|
|
48
|
+
--secondary-strong: hsl(var(--secondary-h) 90% 80%);
|
|
58
49
|
|
|
59
50
|
--tertiary-subtitle: hsl(var(--tertiary-h) 45% 18%);
|
|
60
51
|
--tertiary-muted: hsl(var(--tertiary-h) 40% 26%);
|
|
61
52
|
--tertiary-muted-strong: hsl(var(--tertiary-h) 42% 32%);
|
|
62
|
-
--tertiary-strong: hsl(var(--tertiary-h) 90%
|
|
53
|
+
--tertiary-strong: hsl(var(--tertiary-h) 90% 80%);
|
|
63
54
|
|
|
64
55
|
--text-link: hsl(var(--blue-h) 90% 74%);
|
|
65
56
|
--text-link-visited: hsl(var(--blue-h) 50% 70%);
|
|
57
|
+
--text-link-state-ink: white;
|
|
66
58
|
|
|
67
59
|
--success-subtitle: hsl(132deg 38% 14%);
|
|
68
60
|
--success-muted: hsl(132deg 34% 20%);
|
|
@@ -65,12 +65,12 @@ declare class AppLayoutScrollService {
|
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
67
|
* Fixed-frame application layout: the host is pinned to the viewport and ONLY
|
|
68
|
-
* the content region scrolls, so the
|
|
68
|
+
* the content region scrolls, so the nav rail and topbar stay put.
|
|
69
69
|
* Consumers project their own chrome into the slots:
|
|
70
70
|
*
|
|
71
71
|
* ```html
|
|
72
72
|
* <ds-app-layout>
|
|
73
|
-
* <ds-
|
|
73
|
+
* <ds-nav nav>…</ds-nav>
|
|
74
74
|
* <ds-topbar topbar>…</ds-topbar>
|
|
75
75
|
* <router-outlet />
|
|
76
76
|
* </ds-app-layout>
|
|
@@ -122,7 +122,7 @@ declare class AppLayoutComponent {
|
|
|
122
122
|
protected closeRail(): void;
|
|
123
123
|
private watchDesktopBreakpoint;
|
|
124
124
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AppLayoutComponent, never>;
|
|
125
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLayoutComponent, "ds-app-layout", never, { "topbarSpan": { "alias": "topbarSpan"; "required": false; "isSignal": true; }; "railOpen": { "alias": "railOpen"; "required": false; "isSignal": true; }; "railLabel": { "alias": "railLabel"; "required": false; "isSignal": true; }; "restoreScroll": { "alias": "restoreScroll"; "required": false; "isSignal": true; }; "restoreScrollTimeout": { "alias": "restoreScrollTimeout"; "required": false; "isSignal": true; }; "scrollReset": { "alias": "scrollReset"; "required": false; "isSignal": true; }; }, { "railOpen": "railOpenChange"; }, never, ["[sidenav]", "[topbar]", "*"], true, never>;
|
|
125
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AppLayoutComponent, "ds-app-layout", never, { "topbarSpan": { "alias": "topbarSpan"; "required": false; "isSignal": true; }; "railOpen": { "alias": "railOpen"; "required": false; "isSignal": true; }; "railLabel": { "alias": "railLabel"; "required": false; "isSignal": true; }; "restoreScroll": { "alias": "restoreScroll"; "required": false; "isSignal": true; }; "restoreScrollTimeout": { "alias": "restoreScrollTimeout"; "required": false; "isSignal": true; }; "scrollReset": { "alias": "scrollReset"; "required": false; "isSignal": true; }; }, { "railOpen": "railOpenChange"; }, never, ["[nav], [sidenav]", "[topbar]", "*"], true, never>;
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
/**
|