@smwb/ui-styles 1.4.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +4 -2
  2. package/less/_prelude.less +4 -3
  3. package/less/components/accordion/accordion.less +78 -3
  4. package/less/components/avatar/avatar.less +12 -4
  5. package/less/components/chart/chart.entry.less +2 -0
  6. package/less/components/chart/chart.less +51 -0
  7. package/less/components/descriptionList/descriptionList.entry.less +2 -0
  8. package/less/components/descriptionList/descriptionList.less +52 -0
  9. package/less/components/emptyState/emptyState.entry.less +2 -0
  10. package/less/components/emptyState/emptyState.less +105 -0
  11. package/less/components/kanban/kanban.entry.less +2 -0
  12. package/less/components/kanban/kanban.less +162 -0
  13. package/less/components/meter/meter.entry.less +2 -0
  14. package/less/components/meter/meter.less +65 -0
  15. package/less/components/personChip/personChip.entry.less +2 -0
  16. package/less/components/personChip/personChip.less +49 -0
  17. package/less/components/progressIndicator/progressIndicator.less +33 -0
  18. package/less/components/sectionHeader/sectionHeader.entry.less +2 -0
  19. package/less/components/sectionHeader/sectionHeader.less +115 -0
  20. package/less/components/selectField/selectField.less +19 -0
  21. package/less/components/stat/stat.entry.less +2 -0
  22. package/less/components/stat/stat.less +117 -0
  23. package/less/components/stepper/stepper.less +57 -16
  24. package/less/components/table/table.less +73 -0
  25. package/less/components/tabs/tab/tab.less +9 -0
  26. package/less/components/tabs/tabs.less +46 -0
  27. package/less/components/textField/textField.less +7 -1
  28. package/less/components/timeline/timeline.entry.less +2 -0
  29. package/less/components/timeline/timeline.less +141 -0
  30. package/less/components/tooltip/tooltip.less +10 -7
  31. package/less/components/typography/typography.less +14 -0
  32. package/less/components.less +9 -0
  33. package/less/connects/rt/table.entry.less +2 -0
  34. package/less/default/globals/default.variables.less +15 -0
  35. package/less/foundation/typography.less +11 -6
  36. package/less/tokens.entry.less +19 -0
  37. package/less/variables.less +17 -2
  38. package/package.json +2 -2
package/README.md CHANGED
@@ -24,9 +24,11 @@ npm install @smwb/ui-styles
24
24
  | `less/components.less` | Aggregate entry — `@import`s foundation + every component |
25
25
  | `less/foundation/*` | Tokens: palette, spacing, radius, elevation, breakpoints, sizing |
26
26
  | `less/default/globals/default.variables.less` | Semantic colors + per-component LESS variables |
27
- | `less/variables.less` | Emits `:root { --smui-* }` (light) + `[data-theme="dark"]` |
28
- | `less/components/<name>/<name>.entry.less` | Per-component entry (self-contained) |
27
+ | `less/variables.less` | Declares the `--smui-*` tokens and emits them on `:root` (light) + `[data-theme="dark"]` |
28
+ | `less/components/<name>/<name>.entry.less` | Per-component entry (component rules only, no tokens) |
29
+ | `less/tokens.entry.less` | The `--smui-*` tokens at zero specificity (`:where(:root)`) for per-component CSS |
29
30
  | `less/headless-base.less` | Foundation + theme variables only (no component rules) |
31
+ | `less/connects/rt/table.entry.less` | The React TanStack Table adapter's own rules (column resizer) |
30
32
  | `less/themes/*` | Built-in theme packs (`summer`, `material`) |
31
33
  | `normalize.css` | Optional CSS reset |
32
34
 
@@ -1,6 +1,7 @@
1
1
  // Reference-only prelude: exposes foundation + theme variables/mixins
2
- // to a component .less compiled standalone, WITHOUT emitting any CSS
3
- // (the global :root / normalize / foundation base ship once via the
4
- // aggregate summer-ui.css or base.css).
2
+ // to a component .less compiled standalone, WITHOUT emitting any CSS.
3
+ // The :root --smui-* tokens ship once per stylesheet set: in the aggregate
4
+ // components.less (@smwb/ui-css) and headless-base.less, or, for the
5
+ // per-component CSS, in tokens.entry.less.
5
6
  @import (reference) "./foundation.less";
6
7
  @import (reference) "./theme.less";
@@ -13,19 +13,40 @@
13
13
  cursor: pointer;
14
14
  gap: @accordionSummaryGap;
15
15
  width: 100%;
16
- arrow-icon {
17
- flex-shrink: 0;
18
- }
16
+ text-align: start;
17
+ }
18
+ &__heading {
19
+ display: flex;
20
+ flex-direction: column;
21
+ min-width: 0;
19
22
  }
20
23
  &__title {
21
24
  white-space: nowrap;
22
25
  }
26
+ &__subtitle {
27
+ font-size: 0.8125rem;
28
+ line-height: 1.4;
29
+ opacity: 0.8;
30
+ }
31
+ // Meta (a date, a badge) after the title: it takes the free space, so the
32
+ // expand icon stays at the end of the row.
33
+ &__end {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ gap: @smui-space-sm;
37
+ flex-shrink: 0;
38
+ margin-left: auto;
39
+ & ~ .smwb-accordion__arrow-icon {
40
+ margin-left: 0;
41
+ }
42
+ }
23
43
 
24
44
  &__content {
25
45
  background-color: var(--smui-surfaceBackground);
26
46
  }
27
47
 
28
48
  &__arrow-icon {
49
+ flex-shrink: 0;
29
50
  transform: rotate(0);
30
51
  transition: transform 0.3s ease-in-out;
31
52
  margin-left: auto;
@@ -33,4 +54,58 @@
33
54
  transform: rotate(-180deg);
34
55
  }
35
56
  }
57
+
58
+ // Flat variants: the panel is a row of a feed or a list, not an app bar. It
59
+ // fills the container's width and its title wraps instead of running out.
60
+ &_outlined,
61
+ &_plain {
62
+ align-self: stretch;
63
+ box-shadow: none;
64
+
65
+ .smwb-accordion__header {
66
+ height: auto;
67
+ min-height: @accordionFlatHeaderMinHeight;
68
+ padding: @smui-space-sm @accordionSummaryPaddingX;
69
+ gap: @smui-space-md;
70
+ background-color: transparent;
71
+ color: var(--smui-onSurfaceColor);
72
+ &:hover:not(:disabled) {
73
+ background-color: var(--smui-onSurfaceHover);
74
+ }
75
+ &:focus-visible {
76
+ outline: 2px solid var(--smui-primaryColor);
77
+ outline-offset: -2px;
78
+ }
79
+ }
80
+ .smwb-accordion__heading {
81
+ flex: 1 1 auto;
82
+ }
83
+ .smwb-accordion__title {
84
+ white-space: normal;
85
+ overflow-wrap: break-word;
86
+ font-weight: 500;
87
+ line-height: 1.4;
88
+ }
89
+ .smwb-accordion__subtitle {
90
+ color: var(--smui-onSurfaceVariant);
91
+ opacity: 1;
92
+ }
93
+ .smwb-accordion__content {
94
+ background-color: transparent;
95
+ }
96
+ .smwb-accordion__arrow-icon {
97
+ color: var(--smui-onSurfaceVariant);
98
+ }
99
+ }
100
+
101
+ &_outlined {
102
+ border: 1px solid var(--smui-dividerColor);
103
+ border-radius: @accordionOutlinedRadius;
104
+ background-color: var(--smui-surfaceBackground);
105
+ overflow: hidden;
106
+ }
107
+
108
+ &_plain {
109
+ border-bottom: 1px solid var(--smui-dividerColor);
110
+ }
36
111
  }
@@ -52,18 +52,26 @@
52
52
  }
53
53
  }
54
54
 
55
+ // In source order, each avatar tucked under the previous one's right edge; the
56
+ // "+N" chip ends the row.
55
57
  .smwb-avatar-group {
56
58
  display: inline-flex;
57
- flex-direction: row-reverse;
59
+ flex-direction: row;
58
60
  align-items: center;
59
61
 
62
+ // Direct children overlap, so an avatar wrapped in a link (a compact
63
+ // PersonChip) tucks in like a bare one.
64
+ > :not(:first-child) {
65
+ margin-left: (-1 * @avatarGroupOverlap);
66
+ }
67
+
60
68
  .smwb-avatar {
61
69
  border: @avatarGroupBorder solid var(--smui-surfaceBackground);
62
70
  box-sizing: content-box;
71
+ }
63
72
 
64
- &:not(:last-child) {
65
- margin-left: (-1 * @avatarGroupOverlap);
66
- }
73
+ &__hidden {
74
+ display: none;
67
75
  }
68
76
 
69
77
  &__surplus {
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./chart.less";
@@ -0,0 +1,51 @@
1
+ // A chart: ECharts draws into __canvas; until it does, a skeleton of the same
2
+ // size stands in, so the page does not jump.
3
+ .smwb-chart {
4
+ // Series colours, in order (read up to 12). The set stays apart with
5
+ // colour-vision deficiencies (Okabe–Ito); a theme may set its own.
6
+ --smwb-chart-series-1: #0072b2;
7
+ --smwb-chart-series-2: #e69f00;
8
+ --smwb-chart-series-3: #009e73;
9
+ --smwb-chart-series-4: #cc79a7;
10
+ --smwb-chart-series-5: #56b4e9;
11
+ --smwb-chart-series-6: #d55e00;
12
+ --smwb-chart-series-7: #7a7a7a;
13
+
14
+ position: relative;
15
+ width: 100%;
16
+ min-width: 0;
17
+
18
+ &__canvas {
19
+ position: absolute;
20
+ inset: 0;
21
+ }
22
+
23
+ // Two classes: the skeleton's own position rule must not win on stylesheet order.
24
+ .smwb-chart__skeleton {
25
+ position: absolute;
26
+ inset: 0;
27
+ }
28
+
29
+ // The chart in words, for screen readers only.
30
+ &__summary {
31
+ position: absolute;
32
+ width: 1px;
33
+ height: 1px;
34
+ margin: -1px;
35
+ padding: 0;
36
+ overflow: hidden;
37
+ clip: rect(0 0 0 0);
38
+ white-space: nowrap;
39
+ border: 0;
40
+ }
41
+ }
42
+
43
+ :root[data-theme="dark"] .smwb-chart {
44
+ --smwb-chart-series-1: #5aa9e6;
45
+ --smwb-chart-series-2: #f0b43a;
46
+ --smwb-chart-series-3: #2fc59b;
47
+ --smwb-chart-series-4: #e08cc0;
48
+ --smwb-chart-series-5: #8fd0f5;
49
+ --smwb-chart-series-6: #f27c3c;
50
+ --smwb-chart-series-7: #a8b0bc;
51
+ }
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./descriptionList.less";
@@ -0,0 +1,52 @@
1
+ // Field–value pairs. In a row the term keeps its column (--smwb-description-term)
2
+ // and the value takes the rest; stacked, the term sits above its value.
3
+ .smwb-description-list {
4
+ display: grid;
5
+ row-gap: @smui-space-sm;
6
+ margin: 0;
7
+ font-size: 0.875rem;
8
+ line-height: 1.45;
9
+ min-width: 0;
10
+
11
+ &__item {
12
+ display: grid;
13
+ grid-template-columns: var(--smwb-description-term, minmax(6rem, 30%)) minmax(0, 1fr);
14
+ column-gap: @smui-space-md;
15
+ row-gap: 2px;
16
+ align-items: baseline;
17
+ min-width: 0;
18
+ }
19
+
20
+ &__term {
21
+ color: var(--smui-onSurfaceVariant);
22
+ overflow-wrap: break-word;
23
+ }
24
+
25
+ &__details {
26
+ margin: 0;
27
+ min-width: 0;
28
+ color: var(--smui-onSurfaceColor);
29
+ overflow-wrap: anywhere;
30
+ }
31
+
32
+ &_dense {
33
+ row-gap: @smui-space-xs;
34
+ font-size: 0.8125rem;
35
+ }
36
+
37
+ &_stacked &__item {
38
+ grid-template-columns: minmax(0, 1fr);
39
+ }
40
+
41
+ // auto: the list is its own query container, so its width — not the
42
+ // window's — decides when the pairs stack.
43
+ &_auto {
44
+ container: smwb-description-list / inline-size;
45
+ }
46
+ }
47
+
48
+ @container smwb-description-list (max-width: (@smui-bp-sm - 0.02px)) {
49
+ .smwb-description-list_auto .smwb-description-list__item {
50
+ grid-template-columns: minmax(0, 1fr);
51
+ }
52
+ }
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./emptyState.less";
@@ -0,0 +1,105 @@
1
+ // What a list, a table or a panel shows when it has nothing: an icon, a title,
2
+ // the message and actions — centred as a block, or as a muted line of text.
3
+ .smwb-empty-state {
4
+ min-width: 0;
5
+ color: var(--smui-onSurfaceVariant);
6
+
7
+ &__title {
8
+ color: var(--smui-onSurfaceColor);
9
+ font-weight: 600;
10
+ }
11
+
12
+ &__description {
13
+ overflow-wrap: break-word;
14
+ }
15
+
16
+ // Centred, for an empty page, panel or card.
17
+ &_block {
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ gap: @smui-space-sm;
22
+ padding: @smui-space-xl @smui-space-lg;
23
+ text-align: center;
24
+
25
+ .smwb-empty-state__icon {
26
+ display: inline-flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ width: 64px;
30
+ height: 64px;
31
+ margin-bottom: @smui-space-xs;
32
+ border-radius: @smui-radius-circle;
33
+ background-color: var(--smui-surfaceVariant);
34
+ }
35
+ .smwb-empty-state__title {
36
+ font-size: 1rem;
37
+ line-height: 1.4;
38
+ }
39
+ .smwb-empty-state__description {
40
+ max-width: 36rem;
41
+ font-size: 0.875rem;
42
+ line-height: 1.5;
43
+ }
44
+ .smwb-empty-state__actions {
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ justify-content: center;
48
+ gap: @smui-space-sm;
49
+ margin-top: @smui-space-sm;
50
+ }
51
+ }
52
+
53
+ &_block&_small {
54
+ gap: @smui-space-xs;
55
+ padding: @smui-space-md;
56
+
57
+ .smwb-empty-state__icon {
58
+ width: 44px;
59
+ height: 44px;
60
+ margin-bottom: 0;
61
+ }
62
+ .smwb-empty-state__title {
63
+ font-size: 0.875rem;
64
+ }
65
+ .smwb-empty-state__description {
66
+ font-size: 0.8125rem;
67
+ }
68
+ .smwb-empty-state__actions {
69
+ margin-top: @smui-space-xs;
70
+ }
71
+ }
72
+
73
+ // A muted line of text, for a list, a table or a column that came out empty.
74
+ // The parts flow as text, so an action follows the last word.
75
+ &_inline {
76
+ margin: @smui-space-sm 0;
77
+ font-size: 0.875rem;
78
+ line-height: 1.5;
79
+
80
+ .smwb-empty-state__title,
81
+ .smwb-empty-state__description {
82
+ display: inline;
83
+ }
84
+ .smwb-empty-state__title {
85
+ margin-right: 0.35em;
86
+ }
87
+ .smwb-empty-state__icon {
88
+ display: inline-flex;
89
+ margin-right: @smui-space-xs;
90
+ vertical-align: middle;
91
+ }
92
+ .smwb-empty-state__actions {
93
+ display: inline-flex;
94
+ flex-wrap: wrap;
95
+ align-items: center;
96
+ gap: @smui-space-xs;
97
+ margin-left: @smui-space-sm;
98
+ vertical-align: middle;
99
+ }
100
+ }
101
+
102
+ &_inline&_small {
103
+ font-size: 0.8125rem;
104
+ }
105
+ }
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./kanban.less";
@@ -0,0 +1,162 @@
1
+ // A board: columns side by side, each at least --smwb-kanban-column-width
2
+ // wide; when they do not fit, the board scrolls sideways and snaps to a column.
3
+ .smwb-kanban {
4
+ display: grid;
5
+ grid-auto-flow: column;
6
+ grid-auto-columns: minmax(var(--smwb-kanban-column-width, 15.5rem), 1fr);
7
+ gap: @smui-space-md;
8
+ align-items: start;
9
+ min-width: 0;
10
+ max-width: 100%;
11
+ overflow-x: auto;
12
+ // Room for the scrollbar under the columns.
13
+ padding-bottom: @smui-space-sm;
14
+ scroll-snap-type: x proximity;
15
+ overscroll-behavior-x: contain;
16
+
17
+ &__column {
18
+ display: flex;
19
+ flex-direction: column;
20
+ min-width: 0;
21
+ min-height: 8rem;
22
+ padding: 10px;
23
+ border: 1px solid var(--smui-dividerColor);
24
+ border-radius: @smui-radius-lg;
25
+ background-color: color-mix(in srgb, var(--smui-onSurfaceColor) 3%, var(--smui-surfaceBackground));
26
+ // The column's colour, a stripe along its top.
27
+ box-shadow: inset 0 3px 0 var(--smwb-kanban-accent, var(--smui-dividerColor));
28
+ scroll-snap-align: start;
29
+ }
30
+
31
+ &__column-header {
32
+ display: flex;
33
+ align-items: center;
34
+ justify-content: space-between;
35
+ gap: @smui-space-sm;
36
+ margin: 2px 0 10px;
37
+ }
38
+
39
+ &__column-title {
40
+ min-width: 0;
41
+ font-size: 0.875rem;
42
+ font-weight: 600;
43
+ color: var(--smui-onSurfaceColor);
44
+ overflow-wrap: break-word;
45
+ }
46
+
47
+ &__count {
48
+ display: inline-flex;
49
+ align-items: center;
50
+ justify-content: center;
51
+ flex-shrink: 0;
52
+ min-width: 1.6em;
53
+ padding: 0 0.45em;
54
+ border-radius: @smui-radius-pill;
55
+ background-color: color-mix(in srgb, var(--smui-onSurfaceColor) 8%, transparent);
56
+ color: var(--smui-onSurfaceVariant);
57
+ font-size: 0.75rem;
58
+ font-weight: 600;
59
+ line-height: 1.7;
60
+ font-variant-numeric: tabular-nums;
61
+ }
62
+
63
+ &__cards {
64
+ display: grid;
65
+ gap: @smui-space-sm;
66
+ margin: 0;
67
+ padding: 0;
68
+ list-style: none;
69
+ }
70
+
71
+ &__empty {
72
+ margin: @smui-space-xs 0;
73
+ font-size: 0.8125rem;
74
+ color: var(--smui-onSurfaceVariant);
75
+ }
76
+
77
+ &__column-footer {
78
+ margin-top: @smui-space-sm;
79
+ font-size: 0.8125rem;
80
+ text-align: center;
81
+ }
82
+
83
+ &__card {
84
+ position: relative;
85
+ display: flex;
86
+ flex-direction: column;
87
+ gap: 6px;
88
+ min-width: 0;
89
+ padding: 10px 12px;
90
+ border: 1px solid var(--smui-dividerColor);
91
+ border-radius: @smui-radius-md;
92
+ background-color: var(--smui-surfaceBackground);
93
+ font-size: 0.875rem;
94
+ transition: border-color 0.12s;
95
+ }
96
+
97
+ &__card-title {
98
+ display: -webkit-box;
99
+ -webkit-box-orient: vertical;
100
+ -webkit-line-clamp: var(--smwb-kanban-title-lines, 3);
101
+ overflow: hidden;
102
+ font-weight: 500;
103
+ line-height: 1.4;
104
+ color: var(--smui-onSurfaceColor);
105
+ overflow-wrap: break-word;
106
+ }
107
+
108
+ &__card-body {
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: 6px;
112
+ min-width: 0;
113
+ font-size: 0.8125rem;
114
+ color: var(--smui-onSurfaceVariant);
115
+ }
116
+
117
+ // With href the title is a link stretched over the whole card; links and
118
+ // buttons in the body stay above it.
119
+ &__card_link {
120
+ &:hover {
121
+ border-color: color-mix(in srgb, var(--smui-primaryColor) 40%, var(--smui-dividerColor));
122
+ }
123
+
124
+ .smwb-kanban__card-title {
125
+ text-decoration: none;
126
+
127
+ &::after {
128
+ content: "";
129
+ position: absolute;
130
+ inset: 0;
131
+ border-radius: @smui-radius-md;
132
+ }
133
+ &:hover {
134
+ color: var(--smui-primaryColor);
135
+ }
136
+ &:focus-visible {
137
+ outline: none;
138
+ }
139
+ &:focus-visible::after {
140
+ outline: 2px solid var(--smui-primaryColor);
141
+ outline-offset: 2px;
142
+ }
143
+ }
144
+
145
+ .smwb-kanban__card-body :is(a, button, input, select, textarea, [tabindex]) {
146
+ position: relative;
147
+ z-index: 1;
148
+ }
149
+ }
150
+ }
151
+
152
+ // Links in a card or under a column take the theme's link colour, not the
153
+ // browser's. Kept to an element selector's weight, so an app's own link styles
154
+ // still apply.
155
+ :where(.smwb-kanban__card-body, .smwb-kanban__column-footer) a {
156
+ color: var(--smui-primaryColor);
157
+ text-decoration: none;
158
+
159
+ &:hover {
160
+ text-decoration: underline;
161
+ }
162
+ }
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./meter.less";
@@ -0,0 +1,65 @@
1
+ // A share of a whole: the bar takes what the "X of Y" text leaves, so in a table
2
+ // cell the figures never run over the neighbouring cell.
3
+ .smwb-meter {
4
+ --smwb-meter-color: var(--smui-infoColor);
5
+ display: grid;
6
+ grid-template-columns: minmax(@meterMinBarWidth, 1fr) auto;
7
+ align-items: center;
8
+ column-gap: @smui-space-sm;
9
+ width: 100%;
10
+ min-width: 0;
11
+ font-size: 0.875rem;
12
+ line-height: 1.4;
13
+
14
+ &__track {
15
+ display: block;
16
+ height: @meterHeight;
17
+ border-radius: 999px;
18
+ background-color: var(--smui-indicatorTrackBg);
19
+ overflow: hidden;
20
+ }
21
+
22
+ &__fill {
23
+ display: block;
24
+ height: 100%;
25
+ border-radius: inherit;
26
+ background-color: var(--smwb-meter-color);
27
+ transition: width 0.2s ease-out;
28
+ }
29
+
30
+ &__text {
31
+ white-space: nowrap;
32
+ font-variant-numeric: tabular-nums;
33
+ }
34
+
35
+ &__value {
36
+ font-weight: 600;
37
+ }
38
+
39
+ &__of {
40
+ color: var(--smui-onSurfaceVariant);
41
+ }
42
+
43
+ &_bar-only {
44
+ grid-template-columns: minmax(@meterMinBarWidth, 1fr);
45
+ }
46
+
47
+ &_color-neutral {
48
+ --smwb-meter-color: var(--smui-onSurfaceVariant);
49
+ }
50
+ &_color-primary {
51
+ --smwb-meter-color: var(--smui-primaryColor);
52
+ }
53
+ &_color-info {
54
+ --smwb-meter-color: var(--smui-infoColor);
55
+ }
56
+ &_color-success {
57
+ --smwb-meter-color: var(--smui-successColor);
58
+ }
59
+ &_color-warning {
60
+ --smwb-meter-color: var(--smui-warningColor);
61
+ }
62
+ &_color-error {
63
+ --smwb-meter-color: var(--smui-errorColor);
64
+ }
65
+ }
@@ -0,0 +1,2 @@
1
+ @import (reference) "../../_prelude.less";
2
+ @import "./personChip.less";
@@ -0,0 +1,49 @@
1
+ // A person: avatar and name. As a link it reads as the text around it until
2
+ // hovered.
3
+ .smwb-person-chip {
4
+ display: inline-flex;
5
+ align-items: center;
6
+ gap: @smui-space-sm;
7
+ max-width: 100%;
8
+ min-width: 0;
9
+ vertical-align: middle;
10
+ color: inherit;
11
+ text-decoration: none;
12
+
13
+ // The derived colours are mid-dark in both themes: white initials read on all of them.
14
+ &__avatar {
15
+ flex-shrink: 0;
16
+ color: #fff;
17
+ }
18
+
19
+ &__text {
20
+ display: inline-flex;
21
+ flex-direction: column;
22
+ min-width: 0;
23
+ line-height: 1.3;
24
+ }
25
+
26
+ &__name {
27
+ overflow: hidden;
28
+ text-overflow: ellipsis;
29
+ white-space: nowrap;
30
+ }
31
+
32
+ &__meta {
33
+ font-size: 0.75rem;
34
+ color: var(--smui-onSurfaceVariant);
35
+ }
36
+
37
+ &_link {
38
+ border-radius: @smui-radius-sm;
39
+ cursor: pointer;
40
+ &:hover .smwb-person-chip__name {
41
+ color: var(--smui-primaryColor);
42
+ text-decoration: underline;
43
+ }
44
+ &:focus-visible {
45
+ outline: 2px solid var(--smui-primaryColor);
46
+ outline-offset: 2px;
47
+ }
48
+ }
49
+ }