@ids-group-ltd/ids-design-system 1.1.1 → 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 +869 -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-empty-state.md +2 -1
- package/agent/feedback/ds-stat.md +1 -1
- package/agent/feedback/ds-toast.md +2 -2
- package/agent/feedback/ds-tree.md +4 -2
- package/agent/forms/ds-button.md +3 -3
- package/agent/forms/ds-chat-input.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/navigation/ds-splitter.md +1 -1
- 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 +60 -51
- 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 +122 -21
- 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-empty-state.mjs +14 -7
- package/fesm2022/ids-group-ltd-ids-design-system-components-empty-state.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-popover.mjs +9 -2
- package/fesm2022/ids-group-ltd-ids-design-system-components-popover.mjs.map +1 -1
- 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 +58 -9
- 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 +25 -1
- 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 +143 -0
- package/migrations/1.2.0.json +1433 -0
- package/migrations/README.md +11 -2
- package/package.json +28 -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 +397 -73
- package/schematics/collection.json +1 -1
- package/stylelint/deprecated-tokens.json +7 -0
- package/stylelint/index.mjs +17 -3
- package/stylelint/known-tokens.mjs +139 -0
- package/stylelint/report.mjs +185 -0
- package/stylelint/tokens.mjs +160 -0
- package/stylelint/use-tokens.mjs +397 -0
- package/styles/_check-box.scss +6 -5
- 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 +34 -7
- package/styles/ds.scss +1 -0
- package/themes/README.md +16 -21
- package/themes/_semantic.scss +134 -61
- package/themes/dark/_theme.scss +20 -24
- 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 +67 -6
- 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-empty-state.d.ts +7 -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 +26 -4
- package/types/ids-group-ltd-ids-design-system-components.d.ts +26 -1
- package/types/ids-group-ltd-ids-design-system-core.d.ts +38 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +10 -7
- package/agent/navigation/ds-sidenav.md +0 -13
package/styles/_status.scss
CHANGED
|
@@ -8,8 +8,9 @@
|
|
|
8
8
|
// shipped: (bg: #E1EFFF, text: #0A6DB3),
|
|
9
9
|
// ));
|
|
10
10
|
//
|
|
11
|
-
// Map entry: (bg:, text?:, dot?:). `bg` is the badge fill, `text` the badge label (unset:
|
|
12
|
-
// --text-secondary), `dot` the ds-status-dot colour (unset: `text`)
|
|
11
|
+
// Map entry: (bg:, text?:, dot?:, border?:). `bg` is the badge fill, `text` the badge label (unset:
|
|
12
|
+
// --text-secondary), `dot` the ds-status-dot colour and the badge icon colour (unset: `text`),
|
|
13
|
+
// `border` the border of a `lozenge` badge (unset: --border-default).
|
|
13
14
|
|
|
14
15
|
@use 'sass:map';
|
|
15
16
|
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
$bg: map.get($spec, bg);
|
|
19
20
|
$text: map.get($spec, text);
|
|
20
21
|
$dot: map.get($spec, dot);
|
|
22
|
+
$border: map.get($spec, border);
|
|
21
23
|
|
|
22
24
|
ds-badge[data-status='#{$name}'] {
|
|
23
25
|
--ds-badge-bg-color: #{$bg};
|
|
@@ -25,6 +27,14 @@
|
|
|
25
27
|
@if $text {
|
|
26
28
|
--ds-badge-label-color: #{$text};
|
|
27
29
|
}
|
|
30
|
+
|
|
31
|
+
@if $dot {
|
|
32
|
+
--ds-badge-icon-color: #{$dot};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@if $border {
|
|
36
|
+
--ds-badge-border-color: #{$border};
|
|
37
|
+
}
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
ds-status-dot[data-status='#{$name}'] {
|
|
@@ -40,10 +50,10 @@
|
|
|
40
50
|
// Opt-in: emitted only when called.
|
|
41
51
|
@mixin semantic-preset {
|
|
42
52
|
@include define((
|
|
43
|
-
info: (bg: var(--info-subtitle), text: var(--info-text), dot: var(--info)),
|
|
44
|
-
success: (bg: var(--success-subtitle), text: var(--success-text), dot: var(--success)),
|
|
45
|
-
warning: (bg: var(--warning-subtitle), text: var(--warning-text), dot: var(--warning)),
|
|
46
|
-
error: (bg: var(--error-subtitle), text: var(--error-text), dot: var(--error)),
|
|
47
|
-
neutral: (bg: var(--surface-secondary), text: var(--text-secondary),dot: var(--icon-muted)),
|
|
53
|
+
info: (bg: var(--info-subtitle), text: var(--info-text), dot: var(--info), border: var(--info-border)),
|
|
54
|
+
success: (bg: var(--success-subtitle), text: var(--success-text), dot: var(--success), border: var(--success-border)),
|
|
55
|
+
warning: (bg: var(--warning-subtitle), text: var(--warning-text), dot: var(--warning), border: var(--warning-border)),
|
|
56
|
+
error: (bg: var(--error-subtitle), text: var(--error-text), dot: var(--error), border: var(--error-border)),
|
|
57
|
+
neutral: (bg: var(--surface-secondary), text: var(--text-secondary),dot: var(--icon-muted), border: var(--border-default)),
|
|
48
58
|
));
|
|
49
59
|
}
|
package/styles/_step-marker.scss
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
// The step marker shared by ds-timeline-item and ds-chat-step, read from the host's `--_<prefix>-node-*`
|
|
2
|
-
// properties: the ring, its fill and the centred glyph.
|
|
3
|
-
|
|
2
|
+
// properties: the ring, its fill and the centred glyph. A status change fades the colours and
|
|
3
|
+
// cross-fades the dashed ring of a planned step. The spinner arrives as an arc growing to its length;
|
|
4
|
+
// a glyph arriving closes the arc into a ring, grows the fill out of it and draws the glyph stroke by
|
|
5
|
+
// stroke (`prepareMarkerStrokes` splits the strokes). Every one-shot duration is zero under
|
|
6
|
+
// `prefers-reduced-motion: reduce`.
|
|
7
|
+
@property --_step-arc-sweep {
|
|
8
|
+
syntax: '<angle>';
|
|
9
|
+
inherits: true;
|
|
10
|
+
initial-value: 90deg;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin node($prefix, $border-width, $spinner-size) {
|
|
4
14
|
.node {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-grid;
|
|
17
|
+
place-items: center;
|
|
8
18
|
flex: none;
|
|
9
19
|
width: var(--_#{$prefix}-node-size);
|
|
10
20
|
height: var(--_#{$prefix}-node-size);
|
|
@@ -12,6 +22,178 @@
|
|
|
12
22
|
background-color: var(--_#{$prefix}-node-bg-color);
|
|
13
23
|
color: var(--_#{$prefix}-node-color);
|
|
14
24
|
border: $border-width solid var(--_#{$prefix}-node-border-color);
|
|
25
|
+
transition-property: background-color, border-color, color;
|
|
26
|
+
transition-duration: var(--duration-base);
|
|
27
|
+
transition-timing-function: var(--ease-standard);
|
|
28
|
+
|
|
29
|
+
// A dashed border cannot fade into a solid one, so the dashes are a layer of their own.
|
|
30
|
+
&::before {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: calc(-1 * #{$border-width});
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
border: $border-width dashed var(--_#{$prefix}-node-border-color);
|
|
36
|
+
border-radius: inherit;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transition: opacity var(--duration-base) var(--ease-standard);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mark {
|
|
43
|
+
grid-area: 1 / 1;
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host(.is-settled) {
|
|
48
|
+
--_step-arc-close: var(--duration-slow);
|
|
49
|
+
--_step-fill-delay: calc(var(--duration-slow) * 0.75);
|
|
50
|
+
--_step-draw-delay: calc(var(--_step-fill-delay) + var(--duration-base) * 0.6);
|
|
51
|
+
--_step-draw-stagger: calc(var(--duration-fast) * 0.6);
|
|
52
|
+
|
|
53
|
+
.mark-in:has(> ds-spinner) {
|
|
54
|
+
animation: ds-step-arc-grow var(--duration-slow) var(--ease-standard) both;
|
|
55
|
+
|
|
56
|
+
ds-spinner {
|
|
57
|
+
mask: conic-gradient(
|
|
58
|
+
from -45deg,
|
|
59
|
+
var(--surface-default) var(--_step-arc-sweep),
|
|
60
|
+
transparent 0 90deg,
|
|
61
|
+
var(--surface-default) 0
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mark-out {
|
|
67
|
+
animation: ds-step-mark-out var(--ds-motion-check-exit-duration)
|
|
68
|
+
var(--ds-motion-check-exit-easing) both;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// A glyph arriving takes the spinner's arc over where it stands, so the spinner goes at once.
|
|
72
|
+
.node:has(> .mark > ds-icon) > .mark-out:has(> ds-spinner) {
|
|
73
|
+
display: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Angular keeps the enter class while the element's own animation runs, so the glyph's mark holds
|
|
77
|
+
// one as long as the fill and the strokes it carries.
|
|
78
|
+
.mark-in:has(> ds-icon) {
|
|
79
|
+
animation: ds-step-mark-hold
|
|
80
|
+
calc(var(--_step-draw-delay) + var(--duration-base) + var(--_step-draw-stagger)) linear both;
|
|
81
|
+
|
|
82
|
+
&::before {
|
|
83
|
+
content: '';
|
|
84
|
+
position: absolute;
|
|
85
|
+
inset: calc(-1 * #{$border-width});
|
|
86
|
+
border-radius: var(--radius-pill);
|
|
87
|
+
background-color: var(--_#{$prefix}-node-bg-color);
|
|
88
|
+
animation: ds-step-fill var(--duration-base) var(--ease-decelerate) var(--_step-fill-delay) both;
|
|
89
|
+
--_step-fill-from: calc((var(--_#{$prefix}-node-size) - #{$spinner-size}) / 2 - #{$border-width});
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// The spinner's arc in the new colour, from the angle and length `holdMarkerArc` read off the
|
|
93
|
+
// spinner: its tail keeps the spinner's turn while its head runs on round to a full ring.
|
|
94
|
+
&::after {
|
|
95
|
+
content: '';
|
|
96
|
+
position: absolute;
|
|
97
|
+
top: 50%;
|
|
98
|
+
left: 50%;
|
|
99
|
+
width: #{$spinner-size};
|
|
100
|
+
height: #{$spinner-size};
|
|
101
|
+
box-sizing: border-box;
|
|
102
|
+
translate: -50% -50%;
|
|
103
|
+
border: #{$border-width} solid var(--_#{$prefix}-node-border-color);
|
|
104
|
+
border-radius: var(--radius-pill);
|
|
105
|
+
mask: conic-gradient(
|
|
106
|
+
from -45deg,
|
|
107
|
+
var(--surface-default) var(--_step-arc-sweep),
|
|
108
|
+
transparent 0
|
|
109
|
+
);
|
|
110
|
+
animation:
|
|
111
|
+
ds-step-arc-close var(--_step-arc-close) var(--ease-standard) both,
|
|
112
|
+
ds-step-arc-turn var(--duration-loop-fast) linear both;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
ds-icon {
|
|
116
|
+
position: relative;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
::ng-deep svg > * {
|
|
120
|
+
stroke-dasharray: 1 2;
|
|
121
|
+
animation: ds-step-stroke var(--duration-base) var(--ease-standard) var(--_step-draw-delay) both;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
::ng-deep svg > * + * {
|
|
125
|
+
animation-delay: calc(var(--_step-draw-delay) + var(--_step-draw-stagger));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// The ring stays unfilled until the growing fill reaches its edge. Keyed on the glyph, not on the
|
|
130
|
+
// enter class, which Angular adds a task after the status changes.
|
|
131
|
+
.node:has(> .mark > ds-icon) {
|
|
132
|
+
transition-delay: calc(var(--_step-fill-delay) + var(--duration-base)), 0s, 0s;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@at-root {
|
|
137
|
+
@keyframes ds-step-arc-grow {
|
|
138
|
+
from {
|
|
139
|
+
opacity: 0;
|
|
140
|
+
--_step-arc-sweep: 0deg;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@keyframes ds-step-mark-out {
|
|
145
|
+
to {
|
|
146
|
+
opacity: 0;
|
|
147
|
+
scale: 0.4;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@keyframes ds-step-mark-hold {
|
|
152
|
+
to {
|
|
153
|
+
opacity: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes ds-step-arc-close {
|
|
158
|
+
from {
|
|
159
|
+
--_step-arc-sweep: var(--_step-arc-length, 90deg);
|
|
160
|
+
}
|
|
161
|
+
to {
|
|
162
|
+
--_step-arc-sweep: 360deg;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@keyframes ds-step-arc-turn {
|
|
167
|
+
from {
|
|
168
|
+
rotate: var(--_step-arc-from, 0deg);
|
|
169
|
+
}
|
|
170
|
+
to {
|
|
171
|
+
rotate: calc(var(--_step-arc-from, 0deg) + 1turn);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@keyframes ds-step-fill {
|
|
176
|
+
0% {
|
|
177
|
+
opacity: 0;
|
|
178
|
+
inset: var(--_step-fill-from);
|
|
179
|
+
}
|
|
180
|
+
0.1% {
|
|
181
|
+
opacity: 1;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@keyframes ds-step-stroke {
|
|
186
|
+
0% {
|
|
187
|
+
opacity: 0;
|
|
188
|
+
stroke-dashoffset: 1;
|
|
189
|
+
}
|
|
190
|
+
0.1% {
|
|
191
|
+
opacity: 1;
|
|
192
|
+
}
|
|
193
|
+
100% {
|
|
194
|
+
stroke-dashoffset: 0;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
15
197
|
}
|
|
16
198
|
}
|
|
17
199
|
|
|
@@ -40,7 +222,11 @@
|
|
|
40
222
|
|
|
41
223
|
:host([data-status='pending']) {
|
|
42
224
|
.node {
|
|
43
|
-
border-
|
|
225
|
+
border-color: transparent;
|
|
226
|
+
|
|
227
|
+
&::before {
|
|
228
|
+
opacity: 1;
|
|
229
|
+
}
|
|
44
230
|
}
|
|
45
231
|
|
|
46
232
|
.heading {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// The one list of roles an overlay rebinds to its level, so a row inside it keeps its hover, muted
|
|
2
|
+
// and selected fills one step off the overlay's own fill. Every overlay includes it; a role added here
|
|
3
|
+
// reaches all of them.
|
|
4
|
+
@mixin overlay($level: 'overlay') {
|
|
5
|
+
--surface-secondary: var(--surface-#{$level}-secondary);
|
|
6
|
+
--surface-muted: var(--surface-#{$level}-muted);
|
|
7
|
+
--surface-tint: var(--surface-#{$level}-tint);
|
|
8
|
+
--accent-surface-tint: var(--surface-#{$level}-tint);
|
|
9
|
+
--accent-strong: var(--accent-strong-overlay);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// A coloured surface (an alert, a banner) turns the ghost and outline state overlay from the control's
|
|
13
|
+
// own colour to the theme's neutral one, so hover shades the surface instead of mixing two hues.
|
|
14
|
+
@mixin tinted {
|
|
15
|
+
--state-overlay: var(--state-overlay-tinted);
|
|
16
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// A highlight that sweeps across a line of text in a loop, for the line that says work is under way.
|
|
2
|
+
// The keyframes are emitted where the mixin is included: emulated encapsulation renames an animation
|
|
3
|
+
// and its keyframes together only inside one component stylesheet. Under
|
|
4
|
+
// `prefers-reduced-motion: reduce` nothing is drawn and the text keeps its own colour.
|
|
5
|
+
@mixin sweep($base, $highlight) {
|
|
6
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
7
|
+
background: linear-gradient(90deg, $base 40%, $highlight 50%, $base 60%) 100% 0 / 300% 100%
|
|
8
|
+
no-repeat;
|
|
9
|
+
background-clip: text;
|
|
10
|
+
color: transparent;
|
|
11
|
+
animation: ds-text-shimmer var(--duration-loop-slow) linear infinite;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@at-root {
|
|
15
|
+
@keyframes ds-text-shimmer {
|
|
16
|
+
to {
|
|
17
|
+
background-position: 0 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
1
|
+
// The input colours (--primary, the channels, the -on colours) and light apply at bare :root. Dark is
|
|
2
|
+
// opt-in via <html data-theme="dark">; its block declares every formula again, so it replaces light
|
|
3
|
+
// rather than patching it, and never an input, so a brand that sets --primary once is read by both. No
|
|
4
|
+
// automatic prefers-color-scheme switch: opt in with provideDsTheme({ followSystem: true }). The dark
|
|
5
|
+
// block comes last so it wins over the light-context overrides (brand-gray neutrals) at equal specificity.
|
|
5
6
|
|
|
7
|
+
@use '../themes/semantic';
|
|
6
8
|
@use '../themes/light/theme' as light;
|
|
7
9
|
@use '../themes/dark/theme' as dark;
|
|
8
10
|
|
|
9
11
|
:root {
|
|
10
12
|
color-scheme: light; // opts out of UA force-dark
|
|
11
13
|
|
|
14
|
+
@include semantic.inputs;
|
|
12
15
|
@include light.theme;
|
|
13
16
|
}
|
|
14
17
|
|
|
@@ -34,3 +37,13 @@
|
|
|
34
37
|
|
|
35
38
|
@include dark.theme;
|
|
36
39
|
}
|
|
40
|
+
|
|
41
|
+
// Forced colours paint every field border CanvasText, so a disabled field would read as an enabled
|
|
42
|
+
// one; a system colour is kept by the browser where an author colour is not.
|
|
43
|
+
@media (forced-colors: active) {
|
|
44
|
+
:root,
|
|
45
|
+
:root[data-theme='dark'] {
|
|
46
|
+
--border-disabled: GrayText;
|
|
47
|
+
--text-disabled: GrayText;
|
|
48
|
+
}
|
|
49
|
+
}
|
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;
|
|
@@ -398,6 +408,7 @@
|
|
|
398
408
|
--tooltip-border-color: var(--border-overlay);
|
|
399
409
|
|
|
400
410
|
--popover-maxw: 320px;
|
|
411
|
+
--popover-pad: var(--space-3);
|
|
401
412
|
|
|
402
413
|
--toast-minw: 320px;
|
|
403
414
|
--toast-maxw: 480px;
|
|
@@ -494,6 +505,7 @@
|
|
|
494
505
|
--duration-slow: 0ms;
|
|
495
506
|
--duration-slower: 0ms;
|
|
496
507
|
--duration-slowest: 0ms;
|
|
508
|
+
--stagger-step: 0ms;
|
|
497
509
|
--ds-motion-chart-tooltip-move-duration: 0ms;
|
|
498
510
|
|
|
499
511
|
/* Loops are slowed, never frozen: a stopped spinner reads as "hung". The skeleton sweep is the
|
|
@@ -508,6 +520,14 @@
|
|
|
508
520
|
}
|
|
509
521
|
}
|
|
510
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
|
+
}
|
|
511
531
|
[data-density="ultra-compact"] {
|
|
512
532
|
/* 24px hits sit below WCAG 2.5.5 (44px enhanced) and at the WCAG 2.5.8 minimum. Only for
|
|
513
533
|
keyboard-first, mouse-driven screens the user opted into; never mobile or touch-first. */
|
|
@@ -529,6 +549,10 @@
|
|
|
529
549
|
--table-cell-pad-x: var(--space-2);
|
|
530
550
|
--table-cell-pad-y: var(--space-1);
|
|
531
551
|
--table-head-pad-y: var(--space-1);
|
|
552
|
+
--tree-row-pad-y: var(--space-1);
|
|
553
|
+
--tree-row-pad-x: var(--space-2);
|
|
554
|
+
--tree-indent: var(--space-4);
|
|
555
|
+
--popover-pad: var(--space-2);
|
|
532
556
|
|
|
533
557
|
/* One rung only: a card's frame reads as lost padding before its cells do (24 to 16, cells 16 to 8). */
|
|
534
558
|
--ds-surface-padding: var(--space-4);
|
|
@@ -545,6 +569,9 @@
|
|
|
545
569
|
--status-dot-size: 6px;
|
|
546
570
|
--sidenav-w: 220px;
|
|
547
571
|
--segmented-btn-h: 24px;
|
|
572
|
+
--tree-row-pad-y: var(--space-1);
|
|
573
|
+
--tree-row-pad-x: var(--space-2);
|
|
574
|
+
--tree-indent: var(--space-4);
|
|
548
575
|
}
|
|
549
576
|
[data-density="cozy"] {
|
|
550
577
|
--hit-cozy: 40px;
|
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.
|