@ids-group-ltd/ids-design-system 0.11.1 → 0.11.3
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 +342 -31
- package/components.md +27 -12
- package/design-system.md +135 -1
- package/docs/agent/INDEX.md +98 -0
- package/docs/agent/domain/ds-w3w.md +10 -0
- package/docs/agent/feedback/ds-alert.md +9 -0
- package/docs/agent/feedback/ds-avatar-group.md +7 -0
- package/docs/agent/feedback/ds-avatar.md +6 -0
- package/docs/agent/feedback/ds-badge.md +7 -0
- package/docs/agent/feedback/ds-banner.md +10 -0
- package/docs/agent/feedback/ds-empty-state.md +7 -0
- package/docs/agent/feedback/ds-progress.md +7 -0
- package/docs/agent/feedback/ds-skeleton.md +6 -0
- package/docs/agent/feedback/ds-spinner.md +6 -0
- package/docs/agent/feedback/ds-stat.md +7 -0
- package/docs/agent/feedback/ds-status-dot.md +6 -0
- package/docs/agent/feedback/ds-tag.md +8 -0
- package/docs/agent/feedback/ds-toast.md +12 -0
- package/docs/agent/forms/ds-autocomplete.md +9 -0
- package/docs/agent/forms/ds-button.md +14 -0
- package/docs/agent/forms/ds-checkbox.md +6 -0
- package/docs/agent/forms/ds-date-picker.md +7 -0
- package/docs/agent/forms/ds-dropzone.md +10 -0
- package/docs/agent/forms/ds-icon-button.md +10 -0
- package/docs/agent/forms/ds-input.md +22 -0
- package/docs/agent/forms/ds-multi-select.md +6 -0
- package/docs/agent/forms/ds-number-stepper.md +8 -0
- package/docs/agent/forms/ds-radio.md +6 -0
- package/docs/agent/forms/ds-search.md +10 -0
- package/docs/agent/forms/ds-select.md +7 -0
- package/docs/agent/forms/ds-switch.md +6 -0
- package/docs/agent/forms/ds-textarea.md +9 -0
- package/docs/agent/forms/the-picker-family-ds-select-ds-multi-select-ds-autocomplete.md +21 -0
- package/docs/agent/foundations/global-helper-classes.md +18 -0
- package/docs/agent/foundations/grid.md +35 -0
- package/docs/agent/foundations/tokens.md +47 -0
- package/docs/agent/navigation/ds-app-layout.md +10 -0
- package/docs/agent/navigation/ds-auth-layout.md +9 -0
- package/docs/agent/navigation/ds-breadcrumbs.md +7 -0
- package/docs/agent/navigation/ds-divider.md +9 -0
- package/docs/agent/navigation/ds-page-footer.md +7 -0
- package/docs/agent/navigation/ds-page-header.md +8 -0
- package/docs/agent/navigation/ds-pagination.md +7 -0
- package/docs/agent/navigation/ds-sidenav-group.md +8 -0
- package/docs/agent/navigation/ds-sidenav-item.md +9 -0
- package/docs/agent/navigation/ds-sidenav.md +9 -0
- package/docs/agent/navigation/ds-stepper.md +6 -0
- package/docs/agent/navigation/ds-tabs.md +9 -0
- package/docs/agent/navigation/ds-topbar.md +8 -0
- package/docs/agent/overlays/ds-bottom-sheet.md +9 -0
- package/docs/agent/overlays/ds-drawer.md +9 -0
- package/docs/agent/overlays/ds-menu.md +8 -0
- package/docs/agent/overlays/ds-modal-card.md +6 -0
- package/docs/agent/overlays/ds-modal.md +8 -0
- package/docs/agent/overlays/ds-popover.md +6 -0
- package/docs/agent/overlays/ds-tooltip.md +8 -0
- package/docs/agent/platform/breadcrumbs-service.md +30 -0
- package/docs/agent/platform/ds-config.md +60 -0
- package/docs/agent/platform/ds-icon-registry.md +23 -0
- package/docs/agent/platform/toast-service.md +19 -0
- package/docs/agent/surfaces/ds-accordion.md +8 -0
- package/docs/agent/surfaces/ds-card.md +10 -0
- package/docs/agent/tables/ds-table.md +15 -0
- package/fesm2022/ids-group-ltd-ids-design-system.mjs +1530 -865
- package/fesm2022/ids-group-ltd-ids-design-system.mjs.map +1 -1
- package/migrations/0.11.0.json +0 -45
- package/migrations/0.11.1.json +9 -35
- package/migrations/0.11.2.json +158 -0
- package/migrations/0.11.3.json +152 -0
- package/migrations/0.2.0.json +17 -5
- package/migrations/0.4.0.json +1 -1
- package/migrations/0.7.1.json +3 -3
- package/migrations/0.9.0.json +2 -2
- package/package.json +1 -1
- package/styles/_dropdown-overlay.scss +50 -38
- package/styles/_ds-color.scss +31 -12
- package/styles/_tokens-charts.scss +2 -3
- package/styles/_tokens.scss +159 -322
- package/themes/README.md +35 -4
- package/themes/_base-palette.scss +35 -76
- package/themes/_semantic.scss +5 -2
- package/types/ids-group-ltd-ids-design-system.d.ts +424 -188
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
// declares the matching rules so the portaled panel renders styled.
|
|
1
|
+
// GLOBAL because the panel is portaled via CDK Overlay outside the host
|
|
2
|
+
// component's DOM tree, so emulated encapsulation (and any `:host ::ng-deep`
|
|
3
|
+
// selector) cannot reach it. The component sets `panelClass: 'ds-dropdown-panel'`
|
|
4
|
+
// on the overlay config; this partial declares the matching rules.
|
|
6
5
|
|
|
7
6
|
@use 'text-clip' as text-clip;
|
|
7
|
+
@use 'visually-hidden' as visually-hidden;
|
|
8
8
|
|
|
9
9
|
.ds-dropdown-panel {
|
|
10
|
-
/*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
palette still flows through. Panel-level, not per-component: one partial
|
|
15
|
-
paints the rows for select, autocomplete and multi-select alike. */
|
|
10
|
+
/* Every --_* below resolves through a public --ds-* hook and falls back to a
|
|
11
|
+
semantic role or the panel radius role, so an untouched theme is unchanged.
|
|
12
|
+
Panel-level, not per-component: this one partial paints the rows for select,
|
|
13
|
+
autocomplete and multi-select alike. */
|
|
16
14
|
--_option-selected-bg-color: var(--ds-option-selected-bg-color, var(--primary-subtitle));
|
|
17
15
|
--_option-selected-label-color: var(--ds-option-selected-label-color, var(--primary-strong));
|
|
18
16
|
--_option-selected-bg-color-hover: var(--ds-option-selected-bg-color-hover, var(--primary-muted));
|
|
19
17
|
--_option-check-color: var(--ds-option-check-color, var(--primary));
|
|
20
18
|
|
|
21
|
-
/* Panel-level for the same reason as the option hooks above: retuning ONE
|
|
22
|
-
picker's corner is not a thing a design system should encourage, but moving
|
|
23
|
-
every panel — modal, popover, date picker — to reach the dropdowns is too
|
|
24
|
-
blunt. This is the middle lever, and `--ds-radius-panel` stays its default so
|
|
25
|
-
an untouched theme is unchanged. */
|
|
26
19
|
--_dropdown-panel-radius: var(--ds-dropdown-panel-radius, var(--ds-radius-panel));
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
21
|
+
--_option-gap: var(--ds-option-gap, var(--space-2));
|
|
22
|
+
--_option-padding: var(--ds-option-padding, var(--space-2) var(--space-2-5));
|
|
23
|
+
--_option-radius: var(--ds-option-radius, var(--ds-radius-inner));
|
|
24
|
+
--_option-row-gap: var(--ds-option-row-gap, 2px);
|
|
25
|
+
--_option-bg-color-active: var(--ds-option-bg-color-active, var(--surface-secondary));
|
|
26
|
+
|
|
30
27
|
--_dropdown-panel-bg-color: var(--ds-dropdown-panel-bg-color, var(--surface-overlay));
|
|
31
28
|
--_dropdown-panel-maxh: var(--ds-dropdown-panel-maxh, 320px);
|
|
29
|
+
|
|
30
|
+
/* minw/maxw only bite in `content` width mode, where the pane is auto-sized: in
|
|
31
|
+
`fill` the component pins the pane to the trigger width and there is nothing
|
|
32
|
+
left to bound. */
|
|
32
33
|
--_dropdown-panel-minw: var(--ds-dropdown-panel-minw, 0);
|
|
33
34
|
--_dropdown-panel-maxw: var(--ds-dropdown-panel-maxw, none);
|
|
34
35
|
|
|
@@ -45,9 +46,9 @@
|
|
|
45
46
|
max-width: var(--_dropdown-panel-maxw);
|
|
46
47
|
max-height: var(--_dropdown-panel-maxh);
|
|
47
48
|
|
|
48
|
-
// The panel clips and the LIST scrolls, so a filter
|
|
49
|
-
//
|
|
50
|
-
//
|
|
49
|
+
// The panel clips and the LIST scrolls, so a filter or select-all row stays
|
|
50
|
+
// put while the options move under it — a panel that scrolled itself would
|
|
51
|
+
// carry those rows out of view.
|
|
51
52
|
display: flex;
|
|
52
53
|
flex-direction: column;
|
|
53
54
|
overflow: hidden;
|
|
@@ -55,6 +56,9 @@
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.dropdown-list {
|
|
59
|
+
// A cap of its own, separate from the panel's: the difference between the two
|
|
60
|
+
// is what the panel's non-scrolling rows (filter, select-all) can occupy.
|
|
61
|
+
max-height: var(--picker-maxh);
|
|
58
62
|
list-style: none;
|
|
59
63
|
margin: 0;
|
|
60
64
|
padding: 0;
|
|
@@ -65,14 +69,14 @@
|
|
|
65
69
|
// would push the panel past its own max-height instead of scrolling.
|
|
66
70
|
min-height: 0;
|
|
67
71
|
overflow-y: auto;
|
|
68
|
-
gap:
|
|
72
|
+
gap: var(--_option-row-gap);
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
.optgroup {
|
|
72
76
|
list-style: none;
|
|
73
77
|
display: flex;
|
|
74
78
|
flex-direction: column;
|
|
75
|
-
gap:
|
|
79
|
+
gap: var(--_option-row-gap);
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
.optgroup-label {
|
|
@@ -83,7 +87,6 @@
|
|
|
83
87
|
text-transform: uppercase;
|
|
84
88
|
letter-spacing: var(--letter-spacing-wide);
|
|
85
89
|
|
|
86
|
-
// First group sits flush against the panel padding — no extra top space.
|
|
87
90
|
&.is-first {
|
|
88
91
|
padding-top: var(--space-1);
|
|
89
92
|
}
|
|
@@ -95,7 +98,7 @@
|
|
|
95
98
|
padding: 0;
|
|
96
99
|
display: flex;
|
|
97
100
|
flex-direction: column;
|
|
98
|
-
gap:
|
|
101
|
+
gap: var(--_option-row-gap);
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
.empty {
|
|
@@ -107,15 +110,15 @@
|
|
|
107
110
|
.option {
|
|
108
111
|
display: flex;
|
|
109
112
|
align-items: center;
|
|
110
|
-
gap: var(--
|
|
113
|
+
gap: var(--_option-gap);
|
|
111
114
|
width: 100%;
|
|
112
|
-
padding: var(--
|
|
115
|
+
padding: var(--_option-padding);
|
|
113
116
|
border: 0;
|
|
114
117
|
background: transparent;
|
|
115
118
|
font: var(--font-weight-medium) var(--font-size-s) / var(--line-height-flat) var(--font-sans);
|
|
116
119
|
color: var(--text-primary);
|
|
117
120
|
cursor: pointer;
|
|
118
|
-
border-radius: var(--
|
|
121
|
+
border-radius: var(--_option-radius);
|
|
119
122
|
text-align: left;
|
|
120
123
|
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
121
124
|
|
|
@@ -131,24 +134,34 @@
|
|
|
131
134
|
@include text-clip.single-line-ellipsis;
|
|
132
135
|
}
|
|
133
136
|
|
|
137
|
+
// Visually hidden, not display:none — the latter leaves the accessibility
|
|
138
|
+
// tree and the reason would be announced nowhere.
|
|
139
|
+
.option-reason {
|
|
140
|
+
@include visually-hidden.visually-hidden;
|
|
141
|
+
}
|
|
142
|
+
|
|
134
143
|
.option-check {
|
|
135
144
|
color: var(--_option-check-color);
|
|
136
145
|
flex: 0 0 auto;
|
|
137
146
|
}
|
|
138
147
|
|
|
148
|
+
&:disabled {
|
|
149
|
+
color: var(--text-disabled);
|
|
150
|
+
cursor: not-allowed;
|
|
151
|
+
}
|
|
152
|
+
|
|
139
153
|
// `:not(.is-selected)` is load-bearing: this branch outranks `.is-selected`
|
|
140
154
|
// on specificity, so without it a hovered (or keyboard-active) selected row
|
|
141
155
|
// repaints to the neutral surface while KEEPING the selected label colour —
|
|
142
156
|
// unreadable as soon as a brand gives the selected row a dark fill.
|
|
143
|
-
&:hover:not(.is-disabled, .is-selected),
|
|
144
|
-
&.is-active:not(.is-disabled, .is-selected) {
|
|
145
|
-
background: var(--
|
|
157
|
+
&:hover:not(.is-disabled, .is-selected, :disabled),
|
|
158
|
+
&.is-active:not(.is-disabled, .is-selected, :disabled) {
|
|
159
|
+
background: var(--_option-bg-color-active);
|
|
146
160
|
}
|
|
147
161
|
|
|
148
|
-
// A tap on a phone has no hover, so
|
|
149
|
-
// row was hit.
|
|
150
|
-
|
|
151
|
-
&:active:not(.is-disabled) {
|
|
162
|
+
// A tap on a phone has no hover, so the pressed state is the only feedback
|
|
163
|
+
// that the row was hit.
|
|
164
|
+
&:active:not(.is-disabled, :disabled) {
|
|
152
165
|
background: var(--surface-muted);
|
|
153
166
|
}
|
|
154
167
|
|
|
@@ -168,9 +181,8 @@
|
|
|
168
181
|
background: var(--_option-selected-bg-color-hover);
|
|
169
182
|
}
|
|
170
183
|
|
|
171
|
-
//
|
|
172
|
-
//
|
|
173
|
-
// strand the selected label colour on it.
|
|
184
|
+
// Same reason as the hover above: falling back to the neutral pressed fill
|
|
185
|
+
// would strand the selected label colour on it.
|
|
174
186
|
&:active:not(.is-disabled) {
|
|
175
187
|
background: var(--_option-selected-bg-color);
|
|
176
188
|
}
|
package/styles/_ds-color.scss
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
|
|
3
|
+
$families: secondary, tertiary, error, success, warning;
|
|
4
|
+
|
|
1
5
|
// Scoped accent recolour. A `ds-color="<family>"` attribute — on a zone
|
|
2
6
|
// container, on a component host, or applied via the ds.color() mixin in
|
|
3
7
|
// consumer config — flips the --accent-* pointer family to another brand/status
|
|
@@ -7,28 +11,43 @@
|
|
|
7
11
|
// per instance. With no attribute, --accent-* stays the primary family (see
|
|
8
12
|
// themes/_semantic.scss), so the default theme is unchanged.
|
|
9
13
|
|
|
14
|
+
// Each pointer ends in a fallback, because a role a family does not define is not a wrong
|
|
15
|
+
// colour: it is a GUARANTEED-INVALID value, so every declaration reading the pointer becomes
|
|
16
|
+
// invalid at computed-value time and resets to `unset` — a label rendered as body text, a fill
|
|
17
|
+
// rendered transparent, and nothing in the console either way. Where the fallback leads differs
|
|
18
|
+
// by pointer and is deliberate: -hover, -pressed and -strong fall back to the family's own base
|
|
19
|
+
// colour, the tint pointers to the family's -muted, and -on and the two focus pointers to the
|
|
20
|
+
// theme-wide role, since no family-shaped answer exists for them.
|
|
10
21
|
@mixin family-vars($family) {
|
|
11
22
|
--accent: var(--#{$family});
|
|
12
|
-
--accent-hover: var(--#{$family}-hover);
|
|
13
|
-
--accent-pressed: var(--#{$family}-pressed);
|
|
14
|
-
--accent-strong: var(--#{$family}-strong);
|
|
15
|
-
--accent-subtitle: var(--#{$family}-subtitle);
|
|
16
|
-
--accent-muted: var(--#{$family}-muted);
|
|
17
|
-
--accent-muted-strong: var(--#{$family}-muted-strong);
|
|
18
|
-
--accent-on: var(--#{$family}-on);
|
|
19
|
-
--accent-focus-ring: var(--focus-ring-#{$family});
|
|
20
|
-
--accent-focus-field: var(--focus-field-#{$family});
|
|
21
|
-
--accent-surface-tint: var(--#{$family}-subtitle);
|
|
23
|
+
--accent-hover: var(--#{$family}-hover, var(--#{$family}));
|
|
24
|
+
--accent-pressed: var(--#{$family}-pressed, var(--#{$family}));
|
|
25
|
+
--accent-strong: var(--#{$family}-strong, var(--#{$family}-text, var(--#{$family})));
|
|
26
|
+
--accent-subtitle: var(--#{$family}-subtitle, var(--#{$family}-muted));
|
|
27
|
+
--accent-muted: var(--#{$family}-muted, var(--surface-muted));
|
|
28
|
+
--accent-muted-strong: var(--#{$family}-muted-strong, var(--#{$family}-muted));
|
|
29
|
+
--accent-on: var(--#{$family}-on, var(--text-on-primary));
|
|
30
|
+
--accent-focus-ring: var(--focus-ring-#{$family}, var(--focus-ring));
|
|
31
|
+
--accent-focus-field: var(--focus-field-#{$family}, var(--focus-field));
|
|
32
|
+
--accent-surface-tint: var(--#{$family}-subtitle, var(--#{$family}-muted));
|
|
22
33
|
}
|
|
23
34
|
|
|
24
35
|
/// Recolour the DS accent for a type or scope from consumer SCSS, e.g.
|
|
25
36
|
/// `ds-switch { @include ds.color(secondary); }`.
|
|
37
|
+
///
|
|
38
|
+
/// A name outside $families is refused rather than emitted. Without this the mixin accepts any
|
|
39
|
+
/// string and writes `--accent: var(--<whatever>)`, which is guaranteed-invalid — so every rule
|
|
40
|
+
/// reading the accent resets to `unset` and the subtree renders as body text, with nothing in the
|
|
41
|
+
/// console. That is the failure `check-color-families.mjs` exists to prevent, and it is the one
|
|
42
|
+
/// form of it no CSS-side check can see: a consumer's `@include` never reaches our compiled output.
|
|
26
43
|
@mixin color($family) {
|
|
44
|
+
@if not list.index($families, $family) {
|
|
45
|
+
@error 'ds.color(): unknown family "#{$family}". Available: #{$families}.';
|
|
46
|
+
}
|
|
47
|
+
|
|
27
48
|
@include family-vars($family);
|
|
28
49
|
}
|
|
29
50
|
|
|
30
|
-
$families: secondary, tertiary, error, success, warning;
|
|
31
|
-
|
|
32
51
|
@each $family in $families {
|
|
33
52
|
[ds-color='#{$family}'] {
|
|
34
53
|
@include family-vars($family);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
|
|
3
|
-
------------------------------------------------------------
|
|
1
|
+
/* Chart and dataviz tokens.
|
|
2
|
+
|
|
4
3
|
Categorical: 8 hues, ordered by perceptual distance not
|
|
5
4
|
ramp position. First six are AA against both light and
|
|
6
5
|
dark surface-default; the last two are reserved for
|