@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.
- package/README.md +4 -2
- package/less/_prelude.less +4 -3
- package/less/components/accordion/accordion.less +78 -3
- package/less/components/avatar/avatar.less +12 -4
- package/less/components/chart/chart.entry.less +2 -0
- package/less/components/chart/chart.less +51 -0
- package/less/components/descriptionList/descriptionList.entry.less +2 -0
- package/less/components/descriptionList/descriptionList.less +52 -0
- package/less/components/emptyState/emptyState.entry.less +2 -0
- package/less/components/emptyState/emptyState.less +105 -0
- package/less/components/kanban/kanban.entry.less +2 -0
- package/less/components/kanban/kanban.less +162 -0
- package/less/components/meter/meter.entry.less +2 -0
- package/less/components/meter/meter.less +65 -0
- package/less/components/personChip/personChip.entry.less +2 -0
- package/less/components/personChip/personChip.less +49 -0
- package/less/components/progressIndicator/progressIndicator.less +33 -0
- package/less/components/sectionHeader/sectionHeader.entry.less +2 -0
- package/less/components/sectionHeader/sectionHeader.less +115 -0
- package/less/components/selectField/selectField.less +19 -0
- package/less/components/stat/stat.entry.less +2 -0
- package/less/components/stat/stat.less +117 -0
- package/less/components/stepper/stepper.less +57 -16
- package/less/components/table/table.less +73 -0
- package/less/components/tabs/tab/tab.less +9 -0
- package/less/components/tabs/tabs.less +46 -0
- package/less/components/textField/textField.less +7 -1
- package/less/components/timeline/timeline.entry.less +2 -0
- package/less/components/timeline/timeline.less +141 -0
- package/less/components/tooltip/tooltip.less +10 -7
- package/less/components/typography/typography.less +14 -0
- package/less/components.less +9 -0
- package/less/connects/rt/table.entry.less +2 -0
- package/less/default/globals/default.variables.less +15 -0
- package/less/foundation/typography.less +11 -6
- package/less/tokens.entry.less +19 -0
- package/less/variables.less +17 -2
- package/package.json +2 -2
|
@@ -78,6 +78,39 @@
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
// fullWidth: the track follows its container, and may shrink in a grid track
|
|
82
|
+
// or a table cell instead of stretching it.
|
|
83
|
+
.smwb-indicator_linear.smwb-indicator_full-width {
|
|
84
|
+
width: 100%;
|
|
85
|
+
min-width: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// valueLabel: the bar and its value side by side; the bar takes what the text
|
|
89
|
+
// leaves (its 240px when the wrapper is not sized).
|
|
90
|
+
.smwb-indicator_labeled {
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
gap: @smui-space-sm;
|
|
94
|
+
max-width: 100%;
|
|
95
|
+
vertical-align: middle;
|
|
96
|
+
> .smwb-indicator_linear {
|
|
97
|
+
flex: 1 1 auto;
|
|
98
|
+
min-width: 0;
|
|
99
|
+
}
|
|
100
|
+
&.smwb-indicator_full-width {
|
|
101
|
+
display: flex;
|
|
102
|
+
width: 100%;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.smwb-indicator__value {
|
|
106
|
+
flex: 0 0 auto;
|
|
107
|
+
font-size: 0.875rem;
|
|
108
|
+
line-height: 1.4;
|
|
109
|
+
font-variant-numeric: tabular-nums;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
color: var(--smui-onSurfaceVariant);
|
|
112
|
+
}
|
|
113
|
+
|
|
81
114
|
@keyframes linearLoad {
|
|
82
115
|
0% {
|
|
83
116
|
left: -70%;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// A section's heading row: the title with its count and help hint (a subtitle
|
|
2
|
+
// under them) on the left, the actions at the end. On a narrow screen the
|
|
3
|
+
// actions wrap onto a line of their own and stay at the end.
|
|
4
|
+
.smwb-section-header {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: @smui-space-sm @smui-space-md;
|
|
9
|
+
// Keep its natural height in a height-constrained flex column.
|
|
10
|
+
flex: 0 0 auto;
|
|
11
|
+
margin: 0 0 @smui-space-md;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
|
|
14
|
+
&__titles {
|
|
15
|
+
flex: 1 1 auto;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Text flow, not flex: the count and the "?" follow the title's last word
|
|
20
|
+
// when it wraps. (A wrapped flex item is as wide as the line, which would
|
|
21
|
+
// push them to the far end.)
|
|
22
|
+
&__title-line {
|
|
23
|
+
font-size: @sectionHeaderTitleSize;
|
|
24
|
+
line-height: 1.3;
|
|
25
|
+
overflow-wrap: break-word;
|
|
26
|
+
|
|
27
|
+
> :not(.smwb-section-header__title) {
|
|
28
|
+
margin-left: @smui-space-sm;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// A subsection's heading (h3 and below) is a step smaller.
|
|
34
|
+
&_level-3,
|
|
35
|
+
&_level-4,
|
|
36
|
+
&_level-5,
|
|
37
|
+
&_level-6 {
|
|
38
|
+
.smwb-section-header__title-line {
|
|
39
|
+
font-size: @sectionHeaderMinorTitleSize;
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__title {
|
|
45
|
+
display: inline;
|
|
46
|
+
margin: 0;
|
|
47
|
+
font-size: inherit;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
line-height: inherit;
|
|
50
|
+
letter-spacing: -0.01em;
|
|
51
|
+
color: var(--smui-onSurfaceColor);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__count {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
min-width: 1.6em;
|
|
59
|
+
padding: 0 0.45em;
|
|
60
|
+
border-radius: 999px;
|
|
61
|
+
background-color: var(--smui-surfaceVariant);
|
|
62
|
+
color: var(--smui-onSurfaceVariant);
|
|
63
|
+
font-size: 0.75rem;
|
|
64
|
+
font-weight: 600;
|
|
65
|
+
line-height: 1.7;
|
|
66
|
+
font-variant-numeric: tabular-nums;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__help {
|
|
70
|
+
display: inline-flex;
|
|
71
|
+
border-radius: @smui-radius-circle;
|
|
72
|
+
color: var(--smui-onSurfaceVariant);
|
|
73
|
+
cursor: help;
|
|
74
|
+
|
|
75
|
+
&:hover,
|
|
76
|
+
&:focus-visible {
|
|
77
|
+
color: var(--smui-primaryColor);
|
|
78
|
+
}
|
|
79
|
+
&:focus-visible {
|
|
80
|
+
outline: 2px solid var(--smui-primaryColor);
|
|
81
|
+
outline-offset: 2px;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// The help is a sentence or two, so its tooltip wraps — at its max-width, not
|
|
86
|
+
// at the icon's: it is positioned in the icon's box, which would otherwise
|
|
87
|
+
// squeeze it to a word per line. Two classes: the tooltip's own rule must not
|
|
88
|
+
// win on stylesheet order.
|
|
89
|
+
.smwb-tooltip&__tooltip {
|
|
90
|
+
width: max-content;
|
|
91
|
+
height: auto;
|
|
92
|
+
max-width: 280px;
|
|
93
|
+
padding: @smui-space-xs @smui-space-sm;
|
|
94
|
+
line-height: 1.4;
|
|
95
|
+
white-space: normal;
|
|
96
|
+
text-align: left;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&__subtitle {
|
|
100
|
+
margin-top: @smui-space-xxs;
|
|
101
|
+
font-size: 0.875rem;
|
|
102
|
+
line-height: 1.4;
|
|
103
|
+
color: var(--smui-onSurfaceVariant);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&__actions {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-wrap: wrap;
|
|
109
|
+
justify-content: flex-end;
|
|
110
|
+
align-items: center;
|
|
111
|
+
gap: @smui-space-sm;
|
|
112
|
+
margin-left: auto;
|
|
113
|
+
min-width: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -64,6 +64,12 @@
|
|
|
64
64
|
& + span {
|
|
65
65
|
margin-left: @selectFieldChipMarginLeft;
|
|
66
66
|
}
|
|
67
|
+
|
|
68
|
+
// Chips sit at the top of the line: on the baseline they added half a pixel
|
|
69
|
+
// to the field's height.
|
|
70
|
+
.smwb-chip {
|
|
71
|
+
vertical-align: top;
|
|
72
|
+
}
|
|
67
73
|
}
|
|
68
74
|
|
|
69
75
|
&__search {
|
|
@@ -180,3 +186,16 @@
|
|
|
180
186
|
font-style: italic;
|
|
181
187
|
color: var(--smui-primaryColor);
|
|
182
188
|
}
|
|
189
|
+
|
|
190
|
+
// size, as for TextField: the padding and the font follow the control scale, so
|
|
191
|
+
// a small select stands as tall as a small text field or button in a toolbar.
|
|
192
|
+
.smwb-text-field_size-small .smwb-select-field:not(.smwb-select-field--inline) {
|
|
193
|
+
padding-top: @smui-space-sm;
|
|
194
|
+
padding-bottom: @smui-space-sm;
|
|
195
|
+
font-size: @smui-control-font-sm;
|
|
196
|
+
}
|
|
197
|
+
.smwb-text-field_size-large .smwb-select-field:not(.smwb-select-field--inline) {
|
|
198
|
+
padding-top: @smui-space-lg;
|
|
199
|
+
padding-bottom: @smui-space-lg;
|
|
200
|
+
font-size: @smui-control-font-lg;
|
|
201
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// A figure with its label. The accent (a tile's edge, the icon) follows the tone.
|
|
2
|
+
.smwb-stat {
|
|
3
|
+
--smwb-stat-accent: var(--smui-dividerColor);
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: minmax(0, 1fr);
|
|
6
|
+
align-content: start;
|
|
7
|
+
row-gap: 2px;
|
|
8
|
+
min-width: 0;
|
|
9
|
+
color: var(--smui-onSurfaceColor);
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
|
|
12
|
+
&__label {
|
|
13
|
+
font-size: 0.8125rem;
|
|
14
|
+
line-height: 1.3;
|
|
15
|
+
color: var(--smui-onSurfaceVariant);
|
|
16
|
+
overflow-wrap: break-word;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__value {
|
|
20
|
+
font-size: 1.75rem;
|
|
21
|
+
font-weight: 600;
|
|
22
|
+
line-height: 1.15;
|
|
23
|
+
letter-spacing: -0.01em;
|
|
24
|
+
font-variant-numeric: tabular-nums;
|
|
25
|
+
overflow-wrap: break-word;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__hint {
|
|
29
|
+
font-size: 0.75rem;
|
|
30
|
+
line-height: 1.3;
|
|
31
|
+
color: var(--smui-onSurfaceVariant);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__icon {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
color: var(--smwb-stat-accent);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__extra {
|
|
40
|
+
min-width: 0;
|
|
41
|
+
margin-top: @smui-space-xs;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// With an icon: the icon in its own column, the rest beside it.
|
|
45
|
+
&_with-icon {
|
|
46
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
47
|
+
column-gap: @smui-space-sm;
|
|
48
|
+
|
|
49
|
+
> :not(.smwb-stat__icon) {
|
|
50
|
+
grid-column: 2;
|
|
51
|
+
}
|
|
52
|
+
.smwb-stat__icon {
|
|
53
|
+
grid-row: 1 / span 4;
|
|
54
|
+
align-self: start;
|
|
55
|
+
padding-top: 1px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&_tile {
|
|
60
|
+
padding: @smui-space-md @smui-space-lg;
|
|
61
|
+
border: 1px solid var(--smui-dividerColor);
|
|
62
|
+
border-radius: @smui-radius-md;
|
|
63
|
+
background-color: var(--smui-surfaceBackground);
|
|
64
|
+
box-shadow: inset 3px 0 0 var(--smwb-stat-accent);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&_plain {
|
|
68
|
+
padding: @smui-space-sm @smui-space-md;
|
|
69
|
+
border: 1px solid transparent;
|
|
70
|
+
border-radius: @smui-radius-md;
|
|
71
|
+
|
|
72
|
+
.smwb-stat__value {
|
|
73
|
+
font-size: 1.25rem;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&_link {
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
transition:
|
|
80
|
+
background-color 0.12s,
|
|
81
|
+
border-color 0.12s;
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: var(--smui-onSurfaceHover);
|
|
85
|
+
border-color: var(--smui-dividerColor);
|
|
86
|
+
}
|
|
87
|
+
&:focus-visible {
|
|
88
|
+
outline: 2px solid var(--smui-primaryColor);
|
|
89
|
+
outline-offset: 2px;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&_tone-info {
|
|
94
|
+
--smwb-stat-accent: var(--smui-infoColor);
|
|
95
|
+
}
|
|
96
|
+
&_tone-success {
|
|
97
|
+
--smwb-stat-accent: var(--smui-successColor);
|
|
98
|
+
}
|
|
99
|
+
&_tone-warning {
|
|
100
|
+
--smwb-stat-accent: var(--smui-warningColor);
|
|
101
|
+
}
|
|
102
|
+
&_tone-error {
|
|
103
|
+
--smwb-stat-accent: var(--smui-errorColor);
|
|
104
|
+
}
|
|
105
|
+
&_tone-warning &__value,
|
|
106
|
+
&_tone-error &__value {
|
|
107
|
+
color: var(--smwb-stat-accent);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// A row of stats: as many columns as fit, each at least --smwb-stat-min wide.
|
|
112
|
+
.smwb-stat-group {
|
|
113
|
+
display: grid;
|
|
114
|
+
grid-template-columns: repeat(auto-fit, minmax(min(var(--smwb-stat-min, 9rem), 100%), 1fr));
|
|
115
|
+
gap: @smui-space-sm;
|
|
116
|
+
min-width: 0;
|
|
117
|
+
}
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
// Column layout: the vertical stepper, and `auto` in a narrow container.
|
|
2
|
+
.smwb-stepper-column() {
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: stretch;
|
|
5
|
+
|
|
6
|
+
.smwb-stepper__step {
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
flex: 0 0 auto;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
gap: @stepperLabelGap;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
text-align: start;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.smwb-stepper__text {
|
|
16
|
+
align-items: flex-start;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.smwb-stepper__connector {
|
|
20
|
+
width: 1px;
|
|
21
|
+
height: auto;
|
|
22
|
+
min-width: 0;
|
|
23
|
+
min-height: @smui-space-6;
|
|
24
|
+
margin: @smui-space-xs 0 @smui-space-xs (@stepperIconSize / 2);
|
|
25
|
+
background-color: var(--smui-dividerColor);
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
1
30
|
.smwb-stepper {
|
|
2
31
|
display: flex;
|
|
3
32
|
width: 100%;
|
|
@@ -8,8 +37,7 @@
|
|
|
8
37
|
}
|
|
9
38
|
|
|
10
39
|
&_vertical {
|
|
11
|
-
|
|
12
|
-
align-items: stretch;
|
|
40
|
+
.smwb-stepper-column();
|
|
13
41
|
}
|
|
14
42
|
|
|
15
43
|
&__step {
|
|
@@ -59,10 +87,17 @@
|
|
|
59
87
|
display: flex;
|
|
60
88
|
flex-direction: column;
|
|
61
89
|
line-height: 1.3;
|
|
90
|
+
min-width: 0;
|
|
62
91
|
}
|
|
63
92
|
|
|
93
|
+
// Labels break between words only. A page with `hyphens: auto` would otherwise
|
|
94
|
+
// let a narrow step split them by syllables: hyphenation points count towards
|
|
95
|
+
// the step's minimum width, so steps under the label shrink to a syllable.
|
|
64
96
|
&__label {
|
|
65
97
|
font-size: 0.875rem;
|
|
98
|
+
hyphens: manual;
|
|
99
|
+
overflow-wrap: normal;
|
|
100
|
+
word-break: normal;
|
|
66
101
|
}
|
|
67
102
|
|
|
68
103
|
&__optional {
|
|
@@ -87,20 +122,6 @@
|
|
|
87
122
|
background-color: var(--smui-dividerColor);
|
|
88
123
|
}
|
|
89
124
|
|
|
90
|
-
&_vertical {
|
|
91
|
-
.smwb-stepper__step {
|
|
92
|
-
align-items: flex-start;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.smwb-stepper__connector {
|
|
96
|
-
width: 1px;
|
|
97
|
-
min-height: @smui-space-6;
|
|
98
|
-
margin: @smui-space-xs 0 @smui-space-xs (@stepperIconSize / 2);
|
|
99
|
-
background-color: var(--smui-dividerColor);
|
|
100
|
-
flex: 0 0 auto;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
125
|
&_alt-label {
|
|
105
126
|
align-items: flex-start;
|
|
106
127
|
|
|
@@ -121,6 +142,26 @@
|
|
|
121
142
|
}
|
|
122
143
|
}
|
|
123
144
|
|
|
145
|
+
// `auto`: a row while the container is wide enough for every step, a column when
|
|
146
|
+
// it is not. The container is a wrapper around the stepper (the stepper's own
|
|
147
|
+
// flex direction is what switches); the width it takes is the step count, set
|
|
148
|
+
// as data-steps, times @stepperAutoStepWidth.
|
|
149
|
+
.smwb-stepper-auto {
|
|
150
|
+
container: smwb-stepper / inline-size;
|
|
151
|
+
width: 100%;
|
|
152
|
+
min-width: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.smwb-stepper-auto-steps(@n) when (@n <= @stepperAutoMaxSteps) {
|
|
156
|
+
@container smwb-stepper (max-width: (@n * @stepperAutoStepWidth)) {
|
|
157
|
+
.smwb-stepper_auto[data-steps="@{n}"] {
|
|
158
|
+
.smwb-stepper-column();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
.smwb-stepper-auto-steps(@n + 1);
|
|
162
|
+
}
|
|
163
|
+
.smwb-stepper-auto-steps(1);
|
|
164
|
+
|
|
124
165
|
.smwb-stepper__step_error {
|
|
125
166
|
.smwb-stepper__icon {
|
|
126
167
|
background-color: var(--smui-errorColor);
|
|
@@ -196,3 +196,76 @@
|
|
|
196
196
|
z-index: 2;
|
|
197
197
|
background-color: var(--smui-surfaceBackground);
|
|
198
198
|
}
|
|
199
|
+
|
|
200
|
+
// stackBelow: while the table's container is narrower than the breakpoint, each
|
|
201
|
+
// row is a card — cells one under another, the column's name (data-label) in a
|
|
202
|
+
// column of its own next to the value. A container query on the wrapper: the
|
|
203
|
+
// space the table has decides, not the window's width.
|
|
204
|
+
.smwb-table__wrapper_stack-sm,
|
|
205
|
+
.smwb-table__wrapper_stack-md,
|
|
206
|
+
.smwb-table__wrapper_stack-lg {
|
|
207
|
+
container: smwb-table / inline-size;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.smwb-table-stacked() {
|
|
211
|
+
// As a block the table would show the scrollbars of its overflow: scroll.
|
|
212
|
+
.smwb-table {
|
|
213
|
+
display: block;
|
|
214
|
+
white-space: normal;
|
|
215
|
+
overflow: visible;
|
|
216
|
+
}
|
|
217
|
+
// The column names move into the cells.
|
|
218
|
+
.smwb-table__head {
|
|
219
|
+
display: none;
|
|
220
|
+
}
|
|
221
|
+
.smwb-table__body {
|
|
222
|
+
display: block;
|
|
223
|
+
}
|
|
224
|
+
.smwb-table__row {
|
|
225
|
+
display: block;
|
|
226
|
+
padding: @smui-space-sm 0;
|
|
227
|
+
}
|
|
228
|
+
.smwb-table__cell:not(.smwb-table__loader) {
|
|
229
|
+
display: grid;
|
|
230
|
+
grid-template-columns: minmax(6rem, 35%) minmax(0, 1fr);
|
|
231
|
+
column-gap: @smui-space-md;
|
|
232
|
+
align-items: baseline;
|
|
233
|
+
height: auto;
|
|
234
|
+
padding: @smui-space-xs @tableCellPaddingX;
|
|
235
|
+
white-space: normal;
|
|
236
|
+
overflow: visible;
|
|
237
|
+
overflow-wrap: break-word;
|
|
238
|
+
text-overflow: clip;
|
|
239
|
+
text-align: start;
|
|
240
|
+
|
|
241
|
+
&::before {
|
|
242
|
+
content: attr(data-label);
|
|
243
|
+
font-size: 0.75rem;
|
|
244
|
+
line-height: 1.4;
|
|
245
|
+
color: var(--smui-onSurfaceVariant);
|
|
246
|
+
}
|
|
247
|
+
// A cell without a label (an action, a sub-row) takes the whole line.
|
|
248
|
+
&:not([data-label]) {
|
|
249
|
+
display: block;
|
|
250
|
+
&::before {
|
|
251
|
+
content: none;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
@container smwb-table (max-width: (@smui-bp-sm - 0.02px)) {
|
|
258
|
+
.smwb-table__wrapper_stack-sm {
|
|
259
|
+
.smwb-table-stacked();
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
@container smwb-table (max-width: (@smui-bp-md - 0.02px)) {
|
|
263
|
+
.smwb-table__wrapper_stack-md {
|
|
264
|
+
.smwb-table-stacked();
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
@container smwb-table (max-width: (@smui-bp-lg - 0.02px)) {
|
|
268
|
+
.smwb-table__wrapper_stack-lg {
|
|
269
|
+
.smwb-table-stacked();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -112,3 +112,12 @@
|
|
|
112
112
|
pointer-events: none;
|
|
113
113
|
cursor: default;
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
// Compact tabs (Tabs dense): labels as written — no capitals, no letter spacing —
|
|
117
|
+
// and less padding, so more tabs fit in a row.
|
|
118
|
+
.smwb-tabs--dense .smwb-tab {
|
|
119
|
+
padding: 0 @tabDensePaddingX;
|
|
120
|
+
font-weight: 500;
|
|
121
|
+
letter-spacing: normal;
|
|
122
|
+
text-transform: none;
|
|
123
|
+
}
|
|
@@ -25,6 +25,52 @@
|
|
|
25
25
|
display: flex;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// A scrollable row hides its scrollbar, so the edge beyond which more tabs are
|
|
29
|
+
// hidden fades out instead (the component sets --overflow-start / -end).
|
|
30
|
+
&--overflow-end &__scroller--scrollable {
|
|
31
|
+
-webkit-mask-image: linear-gradient(to right, #000 calc(100% - @tabsFadeWidth), transparent);
|
|
32
|
+
mask-image: linear-gradient(to right, #000 calc(100% - @tabsFadeWidth), transparent);
|
|
33
|
+
}
|
|
34
|
+
&--overflow-start &__scroller--scrollable {
|
|
35
|
+
-webkit-mask-image: linear-gradient(to left, #000 calc(100% - @tabsFadeWidth), transparent);
|
|
36
|
+
mask-image: linear-gradient(to left, #000 calc(100% - @tabsFadeWidth), transparent);
|
|
37
|
+
}
|
|
38
|
+
&--overflow-start&--overflow-end &__scroller--scrollable {
|
|
39
|
+
@fade: linear-gradient(
|
|
40
|
+
to right,
|
|
41
|
+
transparent,
|
|
42
|
+
#000 @tabsFadeWidth,
|
|
43
|
+
#000 calc(100% - @tabsFadeWidth),
|
|
44
|
+
transparent
|
|
45
|
+
);
|
|
46
|
+
-webkit-mask-image: @fade;
|
|
47
|
+
mask-image: @fade;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__scroll-button {
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
flex: 0 0 auto;
|
|
55
|
+
width: @tabsScrollButtonWidth;
|
|
56
|
+
padding: 0;
|
|
57
|
+
border: none;
|
|
58
|
+
background: none;
|
|
59
|
+
color: var(--smui-onSurfaceVariant);
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
&:hover:not(:disabled) {
|
|
62
|
+
background-color: var(--smui-onSurfaceHover);
|
|
63
|
+
}
|
|
64
|
+
&:focus-visible {
|
|
65
|
+
outline: 2px solid var(--smui-primaryColor);
|
|
66
|
+
outline-offset: -2px;
|
|
67
|
+
}
|
|
68
|
+
&:disabled {
|
|
69
|
+
opacity: 0.38;
|
|
70
|
+
cursor: default;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
28
74
|
&__indicator {
|
|
29
75
|
display: flex;
|
|
30
76
|
justify-content: center;
|
|
@@ -361,11 +361,17 @@
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
+
// 8 + 23 + 9 = 40px, the md control height: the extra pixel at the bottom is the
|
|
365
|
+
// same as the medium size's 16/17.
|
|
364
366
|
.smwb-text-field_size-small .smwb-text-field__input:not(.smwb-text-field__input--inline) {
|
|
365
367
|
padding-top: @smui-space-sm;
|
|
366
|
-
padding-bottom: @smui-space-sm;
|
|
368
|
+
padding-bottom: (@smui-space-sm + 1px);
|
|
367
369
|
font-size: @smui-control-font-sm;
|
|
368
370
|
}
|
|
371
|
+
// A resting label sits in the middle of the smaller field, not 16px down.
|
|
372
|
+
.smwb-text-field_size-small:not(.smwb-text-field--filled) .smwb-text-field__label:not(.smwb-text-field__label--shrink) {
|
|
373
|
+
transform: translate(16px, @smui-space-sm);
|
|
374
|
+
}
|
|
369
375
|
.smwb-text-field_size-large .smwb-text-field__input:not(.smwb-text-field__input--inline) {
|
|
370
376
|
padding-top: @smui-space-lg;
|
|
371
377
|
padding-bottom: @smui-space-lg;
|