@stackoverflow/stacks 3.0.0-beta.3 → 3.0.0-beta.30
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/dist/controllers.d.ts +0 -2
- package/dist/css/stacks.css +14245 -15086
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +0 -364
- package/dist/js/stacks.min.js +1 -1
- package/lib/atomic/backgrounds.less +67 -0
- package/lib/atomic/border-radius.less +38 -0
- package/lib/atomic/borders.less +73 -0
- package/lib/atomic/box-shadow.less +29 -0
- package/lib/atomic/box-sizing.less +3 -0
- package/lib/atomic/current-color.less +2 -0
- package/lib/atomic/cursors.less +8 -0
- package/lib/atomic/display.less +15 -0
- package/lib/atomic/flex.less +6 -34
- package/lib/atomic/floats.less +20 -0
- package/lib/atomic/gap.less +2 -0
- package/lib/atomic/grid.less +2 -0
- package/lib/atomic/height.less +22 -0
- package/lib/atomic/interactivity.less +45 -0
- package/lib/atomic/lists.less +29 -0
- package/lib/atomic/margin.less +48 -0
- package/lib/atomic/object-fit.less +9 -0
- package/lib/atomic/opacity.less +54 -0
- package/lib/atomic/outline.less +11 -0
- package/lib/atomic/overflow.less +17 -0
- package/lib/atomic/padding.less +12 -0
- package/lib/atomic/positioning.less +41 -0
- package/lib/atomic/sizing.less +51 -0
- package/lib/atomic/transitions.less +20 -0
- package/lib/atomic/truncation.less +58 -0
- package/lib/atomic/typography.less +71 -137
- package/lib/atomic/vertical-alignment.less +9 -0
- package/lib/atomic/visibility.less +18 -0
- package/lib/atomic/width.less +27 -0
- package/lib/atomic/z-index.less +12 -0
- package/lib/base/body.less +2 -4
- package/lib/base/configuration-static.less +3 -3
- package/lib/base/internal.less +3 -5
- package/lib/base/reset-normalize.less +3 -3
- package/lib/components/activity-indicator/activity-indicator.less +4 -20
- package/lib/components/anchor/anchor.less +28 -39
- package/lib/components/avatar/avatar.less +20 -19
- package/lib/components/badge/badge.less +227 -167
- package/lib/components/banner/banner.less +12 -11
- package/lib/components/bling/bling.less +47 -10
- package/lib/components/button/button.less +300 -380
- package/lib/components/checkbox_radio/checkbox_radio.less +195 -113
- package/lib/components/code-block/code-block.fixtures.ts +2 -2
- package/lib/components/code-block/code-block.less +2 -3
- package/lib/components/description/description.less +17 -2
- package/lib/components/empty-state/empty-state.less +17 -6
- package/lib/components/form-group/form-group.less +38 -0
- package/lib/components/input-fill/input-fill.less +3 -3
- package/lib/components/input-icon/input-icon.less +3 -3
- package/lib/components/input-message/input-message.less +1 -0
- package/lib/components/input_textarea/input_textarea.less +71 -58
- package/lib/components/label/label.less +12 -56
- package/lib/components/link/link.less +44 -98
- package/lib/components/loader/loader.less +88 -0
- package/lib/components/menu/menu.less +89 -19
- package/lib/components/modal/modal.less +10 -10
- package/lib/components/navigation/navigation.less +77 -42
- package/lib/components/notice/notice.less +90 -75
- package/lib/components/pagination/pagination.less +50 -42
- package/lib/components/popover/popover.less +9 -11
- package/lib/components/post-summary/post-summary.less +225 -385
- package/lib/components/prose/prose.less +49 -35
- package/lib/components/select/select.less +46 -41
- package/lib/components/sidebar-widget/sidebar-widget.less +26 -196
- package/lib/components/table/table.less +48 -22
- package/lib/components/tag/tag.less +25 -6
- package/lib/components/toast/toast.less +4 -2
- package/lib/components/toggle-switch/toggle-switch.less +15 -19
- package/lib/components/user-card/user-card.less +129 -92
- package/lib/components/vote/vote.less +134 -0
- package/lib/controllers.ts +0 -2
- package/lib/exports/color-sets.less +108 -81
- package/lib/exports/constants-helpers.less +9 -13
- package/lib/exports/constants-type.less +18 -36
- package/lib/exports/mixins.less +92 -272
- package/lib/index.ts +0 -4
- package/lib/stacks-static.less +44 -30
- package/lib/test/visual-test-utils.ts +42 -10
- package/lib/tsconfig.json +1 -1
- package/package.json +1 -1
- package/dist/components/expandable/expandable.d.ts +0 -17
- package/dist/components/uploader/uploader.d.ts +0 -48
- package/lib/atomic/border.less +0 -121
- package/lib/atomic/misc.less +0 -374
- package/lib/atomic/spacing.less +0 -98
- package/lib/atomic/width-height.less +0 -194
- package/lib/components/block-link/block-link.less +0 -82
- package/lib/components/breadcrumbs/breadcrumbs.less +0 -41
- package/lib/components/button-group/button-group.less +0 -81
- package/lib/components/card/card.less +0 -37
- package/lib/components/check-control/check-control.less +0 -17
- package/lib/components/check-group/check-group.less +0 -19
- package/lib/components/expandable/expandable.less +0 -119
- package/lib/components/expandable/expandable.ts +0 -238
- package/lib/components/link-preview/link-preview.less +0 -148
- package/lib/components/page-title/page-title.less +0 -51
- package/lib/components/progress-bar/progress-bar.less +0 -292
- package/lib/components/skeleton/skeleton.less +0 -73
- package/lib/components/spinner/spinner.less +0 -103
- package/lib/components/topbar/topbar.less +0 -553
- package/lib/components/uploader/uploader.less +0 -205
- package/lib/components/uploader/uploader.ts +0 -207
- package/lib/exports/spacing-mixins.less +0 -67
|
@@ -1,161 +1,243 @@
|
|
|
1
1
|
.s-checkbox,
|
|
2
2
|
.s-radio {
|
|
3
|
-
--_ch-
|
|
4
|
-
--_ch-
|
|
5
|
-
--_ch-
|
|
6
|
-
--_ch-
|
|
3
|
+
--_ch-ai: center;
|
|
4
|
+
--_ch-fc: unset;
|
|
5
|
+
--_ch-after-fc: unset;
|
|
6
|
+
--_ch-cursor: pointer;
|
|
7
|
+
--_ch-label-fc: var(--_ch-fc);
|
|
8
|
+
--_ch-gap: var(--su8);
|
|
9
|
+
|
|
10
|
+
// inputs
|
|
11
|
+
--_ch-input-baw: var(--su1);
|
|
12
|
+
--_ch-input-bc: var(--black-350);
|
|
13
|
+
--_ch-input-bg: var(--white);
|
|
14
|
+
--_ch-input-bg-image: unset;
|
|
15
|
+
--_ch-input-br: var(--su1);
|
|
16
|
+
--_ch-input-cursor: pointer;
|
|
17
|
+
--_ch-input-h: calc(var(--su12) + var(--su2)); // 14px
|
|
18
|
+
|
|
19
|
+
@media (forced-colors: active) { // This is for Windows High Contrast Mode
|
|
20
|
+
&:checked,
|
|
21
|
+
&:indeterminate {
|
|
22
|
+
--_ch-input-bg: ButtonText !important;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
7
25
|
|
|
8
|
-
// CONTEXTUAL STYLES
|
|
9
26
|
fieldset[disabled] &,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
27
|
+
&:has(> input[disabled]) {
|
|
28
|
+
--_ch-fc: var(--black-300);
|
|
29
|
+
--_ch-input-bc: var(--black-300);
|
|
30
|
+
--_ch-input-cursor: not-allowed;
|
|
13
31
|
}
|
|
14
32
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
&:extend(.is-disabled .s-label);
|
|
18
|
-
}
|
|
33
|
+
&:has(> input[disabled]:checked) {
|
|
34
|
+
--_ch-input-bc: var(--theme-secondary-300);
|
|
19
35
|
}
|
|
20
36
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
37
|
+
// MODIFIERS
|
|
38
|
+
&&__checkmark {
|
|
39
|
+
--_ch-fc: var(--theme-secondary);
|
|
40
|
+
--_ch-gap: var(--su4);
|
|
41
|
+
--_ch-after-fc: unset;
|
|
42
|
+
|
|
43
|
+
// CONTEXTUAL STYLES
|
|
44
|
+
&:has(> input:focus-visible) {
|
|
45
|
+
.focus-styles(true, false);
|
|
46
|
+
}
|
|
24
47
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
48
|
+
&:has(> input:checked) {
|
|
49
|
+
--_ch-after-fc: var(--_ch-fc);
|
|
50
|
+
}
|
|
28
51
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
52
|
+
&:has(> input[disabled]) {
|
|
53
|
+
--_ch-cursor: not-allowed;
|
|
54
|
+
}
|
|
33
55
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
appearance: none;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
font-size: inherit;
|
|
40
|
-
height: 1em;
|
|
41
|
-
margin: 0; // A guard against Core's default margins
|
|
42
|
-
outline: 0;
|
|
43
|
-
vertical-align: middle;
|
|
44
|
-
width: 1em;
|
|
45
|
-
}
|
|
56
|
+
&:has(> input:checked[disabled]) {
|
|
57
|
+
--_ch-fc: var(--theme-secondary-300);
|
|
58
|
+
}
|
|
46
59
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
// CHILD ELEMENTS
|
|
61
|
+
input,
|
|
62
|
+
&:after {
|
|
63
|
+
height: var(--su16);
|
|
64
|
+
margin-left: 100%;
|
|
65
|
+
width: var(--su16);
|
|
66
|
+
}
|
|
53
67
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
&:after {
|
|
69
|
+
background-color: var(--_ch-after-fc);
|
|
70
|
+
content: "";
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
margin-left: auto;
|
|
73
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m14 3.88-.44.44-7.34 7.35-.44.44-.44-.44-2.9-2.9L2 8.34l.89-.88.44.44 2.45 2.45 6.9-6.9.44-.44z'/%3E%3C/svg%3E"); // check16
|
|
74
|
+
mask-size: contain;
|
|
75
|
+
mask-repeat: no-repeat;
|
|
58
76
|
}
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
|
|
78
|
+
input {
|
|
79
|
+
appearance: none;
|
|
80
|
+
opacity: 0;
|
|
81
|
+
position: absolute;
|
|
82
|
+
right: 0;
|
|
83
|
+
z-index: -1;
|
|
61
84
|
}
|
|
62
|
-
});
|
|
63
85
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
--_ch-bg: var(--black);
|
|
86
|
+
.s-description {
|
|
87
|
+
margin: var(--su2) 0 0;
|
|
88
|
+
padding: 0;
|
|
68
89
|
}
|
|
69
|
-
});
|
|
70
90
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
&:indeterminate {
|
|
74
|
-
--_ch-bg: ButtonText !important;
|
|
91
|
+
.s-label {
|
|
92
|
+
flex-grow: 1;
|
|
75
93
|
}
|
|
76
|
-
}
|
|
77
94
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--_ch-bg: var(--theme-secondary);
|
|
82
|
-
}
|
|
95
|
+
border-radius: var(--br-md);
|
|
96
|
+
color: var(--_ch-fc);
|
|
97
|
+
cursor: var(--_ch-cursor);
|
|
83
98
|
|
|
84
|
-
|
|
85
|
-
--_ch-bg-image: url("data:image/svg+xml;,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3.41L8.59 2 4 6.59 2.41 5 1 6.41l3 3z' fill='@{ch-bg-image-fill-esc}'/%3E%3C/svg%3E");
|
|
99
|
+
width: 100%;
|
|
86
100
|
}
|
|
87
101
|
|
|
88
|
-
|
|
89
|
-
|
|
102
|
+
// CHILD ELEMENTS
|
|
103
|
+
&:has(> input[disabled]) {
|
|
104
|
+
.s-label {
|
|
105
|
+
--_ch-label-fc: var(--black-300);
|
|
106
|
+
}
|
|
90
107
|
}
|
|
91
108
|
|
|
92
|
-
|
|
109
|
+
&:not(> input[disabled]) {
|
|
110
|
+
&:has(input:checked),
|
|
111
|
+
&:has(input:indeterminate) {
|
|
112
|
+
.s-label {
|
|
113
|
+
--_ch-label-fc: var(--black-600);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
93
117
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
border-radius: var(--br-md);
|
|
98
|
-
}
|
|
118
|
+
&:has(> .s-label .s-description),
|
|
119
|
+
&:has(> .s-label .s-input-message) {
|
|
120
|
+
--_ch-ai: flex-start;
|
|
99
121
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// CONTEXTUAL STYLES
|
|
103
|
-
.highcontrast-dark-mode({
|
|
104
|
-
&:checked {
|
|
105
|
-
--_ch-bc: var(--black);
|
|
106
|
-
outline: var(--su-static1) solid var(--black);
|
|
122
|
+
input {
|
|
123
|
+
margin-top: var(--su2);
|
|
107
124
|
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
// STATES
|
|
111
|
-
&:checked {
|
|
112
|
-
--_ch-baw: 0.30769231em;
|
|
113
|
-
--_ch-bc: var(--theme-secondary);
|
|
114
|
-
--_ch-bg: var(--white);
|
|
115
125
|
}
|
|
116
126
|
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
// Validation states
|
|
128
|
+
&:has(> input:not(:checked)) {
|
|
129
|
+
&.has-error {
|
|
130
|
+
--_ch-input-bc: var(--red-400);
|
|
131
|
+
}
|
|
132
|
+
&.has-success {
|
|
133
|
+
--_ch-input-bc: var(--green-400);
|
|
134
|
+
}
|
|
135
|
+
&.has-warning {
|
|
136
|
+
--_ch-input-bc: var(--yellow-400);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
119
139
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
140
|
+
input {
|
|
141
|
+
&:focus-visible {
|
|
142
|
+
.focus-styles();
|
|
143
|
+
}
|
|
124
144
|
|
|
125
|
-
|
|
126
|
-
|
|
145
|
+
&:not(:checked) {
|
|
146
|
+
.validation-states(ch-input);
|
|
147
|
+
}
|
|
127
148
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
--
|
|
149
|
+
appearance: none;
|
|
150
|
+
background-color: var(--_ch-input-bg);
|
|
151
|
+
border: var(--_ch-input-baw) solid var(--_ch-input-bc);
|
|
152
|
+
border-radius: var(--_ch-input-br);
|
|
153
|
+
cursor: var(--_ch-input-cursor);
|
|
154
|
+
height: var(--_ch-input-h);
|
|
155
|
+
|
|
156
|
+
aspect-ratio: 1 / 1;
|
|
157
|
+
flex-shrink: 0;
|
|
158
|
+
font-size: inherit;
|
|
159
|
+
margin: 0; // A guard against Core's default margins
|
|
160
|
+
outline: 0;
|
|
161
|
+
vertical-align: middle;
|
|
131
162
|
}
|
|
132
163
|
|
|
133
|
-
|
|
164
|
+
|
|
134
165
|
.s-label {
|
|
166
|
+
color: var(--_ch-label-fc);
|
|
167
|
+
font-size: var(--fs-body1);
|
|
135
168
|
font-weight: normal;
|
|
136
169
|
}
|
|
137
170
|
|
|
138
|
-
align-items: var(--
|
|
171
|
+
align-items: var(--_ch-ai);
|
|
139
172
|
display: flex;
|
|
140
|
-
gap: var(--
|
|
173
|
+
gap: var(--_ch-gap);
|
|
141
174
|
}
|
|
142
175
|
|
|
143
|
-
.s-
|
|
144
|
-
|
|
176
|
+
.s-checkbox{
|
|
177
|
+
// Less variables for check svg fill color
|
|
178
|
+
@ch-bg-image-fill: .set-white()[default];
|
|
179
|
+
@ch-bg-image-fill-dark: .set-white-dark()[default];
|
|
180
|
+
@ch-bg-image-fill-esc: escape("@{ch-bg-image-fill}"); // color escaped for URL usage
|
|
181
|
+
@ch-bg-image-fill-dark-esc: escape("@{ch-bg-image-fill-dark}"); // color escaped for URL usage
|
|
145
182
|
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
183
|
+
// CONTEXTUAL STYLES
|
|
184
|
+
.dark-mode({
|
|
185
|
+
input {
|
|
186
|
+
&:checked {
|
|
187
|
+
--_ch-input-bg-image: url("data:image/svg+xml;,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3.41L8.59 2 4 6.59 2.41 5 1 6.41l3 3z' fill='@{ch-bg-image-fill-dark-esc}'/%3E%3C/svg%3E");
|
|
188
|
+
}
|
|
189
|
+
&:indeterminate {
|
|
190
|
+
--_ch-input-bg-image: url("data:image/svg+xml;,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4.5 h7 v2 h-7 z' fill='@{ch-bg-image-fill-dark-esc}'/%3E%3C/svg%3E");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
});
|
|
150
194
|
|
|
151
195
|
// CHILD ELEMENTS
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
196
|
+
input {
|
|
197
|
+
fieldset[disabled] &,
|
|
198
|
+
&[disabled] {
|
|
199
|
+
&:checked, &:indeterminate {
|
|
200
|
+
--_ch-input-bc: var(--theme-secondary-300);
|
|
201
|
+
--_ch-input-bg: var(--theme-secondary-300);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
156
204
|
|
|
157
|
-
|
|
205
|
+
&:checked, &:indeterminate {
|
|
206
|
+
--_ch-input-bc: var(--theme-secondary);
|
|
207
|
+
--_ch-input-bg: var(--theme-secondary);
|
|
208
|
+
}
|
|
158
209
|
|
|
159
|
-
|
|
160
|
-
|
|
210
|
+
&:checked {
|
|
211
|
+
--_ch-input-bg-image: url("data:image/svg+xml;,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3.41L8.59 2 4 6.59 2.41 5 1 6.41l3 3z' fill='@{ch-bg-image-fill-esc}'/%3E%3C/svg%3E");
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&:indeterminate {
|
|
215
|
+
--_ch-input-bg-image: url("data:image/svg+xml;,%3Csvg width='11' height='11' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4.5 h7 v2 h-7 z' fill='@{ch-bg-image-fill-esc}'/%3E%3C/svg%3E");
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
background-image: var(--_ch-input-bg-image);
|
|
219
|
+
|
|
220
|
+
background-position: center center;
|
|
221
|
+
background-repeat: no-repeat;
|
|
222
|
+
background-size: contain;
|
|
223
|
+
}
|
|
161
224
|
}
|
|
225
|
+
|
|
226
|
+
.s-radio {
|
|
227
|
+
input {
|
|
228
|
+
fieldset[disabled] &,
|
|
229
|
+
&[disabled] {
|
|
230
|
+
&:checked {
|
|
231
|
+
--_ch-input-bc: var(--theme-secondary-300);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
--_ch-input-br: var(--br-circle);
|
|
236
|
+
|
|
237
|
+
&:checked {
|
|
238
|
+
--_ch-input-baw: calc(var(--_ch-input-h) / 3); // 14px / 3 = ~4.67px
|
|
239
|
+
--_ch-input-bc: var(--theme-secondary);
|
|
240
|
+
--_ch-input-bg: var(--white);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
@@ -55,9 +55,9 @@ const cssFixture = `
|
|
|
55
55
|
|
|
56
56
|
const htmlFixture = `
|
|
57
57
|
<form class="d-flex gy4 fd-column">
|
|
58
|
-
<label class="
|
|
58
|
+
<label class="s-label" for="question-title">Question title</label>
|
|
59
59
|
<div class="d-flex ps-relative">
|
|
60
|
-
<input class="
|
|
60
|
+
<input class="s-input" type="text" id="question-title" placeholder="e.g. Why doesn’t Stack Overflow use a custom web font?"/>
|
|
61
61
|
</div>
|
|
62
62
|
</form>
|
|
63
63
|
`;
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
|
|
93
93
|
border-color: var(--bc-medium);
|
|
94
94
|
border-style: solid;
|
|
95
|
-
border-width: 0 var(--
|
|
95
|
+
border-width: 0 var(--su1) 0 0;
|
|
96
96
|
color: var(--black-350);
|
|
97
97
|
float: left;
|
|
98
|
-
margin:
|
|
98
|
+
margin: var(--sun12);
|
|
99
99
|
margin-right: var(--su12);
|
|
100
100
|
padding: var(--su12);
|
|
101
101
|
padding-right: var(--su6);
|
|
@@ -104,7 +104,6 @@
|
|
|
104
104
|
|
|
105
105
|
@scrollbar-styles();
|
|
106
106
|
background-color: var(--highlight-bg);
|
|
107
|
-
border-radius: var(--br-md);
|
|
108
107
|
color: var(--highlight-color);
|
|
109
108
|
font-family: var(--ff-mono);
|
|
110
109
|
font-size: var(--fs-body1);
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
.s-description {
|
|
2
|
+
--_de-fc: var(--black-400);
|
|
3
|
+
|
|
2
4
|
.is-disabled & {
|
|
3
5
|
opacity: var(--_o-disabled-static);
|
|
4
6
|
}
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
.has-error & {
|
|
9
|
+
--_de-fc: var(--red-400);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.has-success & {
|
|
13
|
+
--_de-fc: var(--green-400);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.has-warning & {
|
|
17
|
+
--_de-fc: var(--yellow-400);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
color: var(--_de-fc);
|
|
21
|
+
font-size: var(--fs-body1);
|
|
22
|
+
margin-bottom: 0;
|
|
8
23
|
padding: 0 var(--su2); // Helps the label visually line up with inputs
|
|
9
24
|
}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
1
|
.s-empty-state {
|
|
2
2
|
// CHILD ELEMENTS
|
|
3
3
|
p {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
color: var(--black-400);
|
|
5
|
+
margin-bottom: var(--su32);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&--title {
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
font-size: var(--fs-body3);
|
|
11
|
+
margin-bottom: var(--su8);
|
|
12
|
+
color: var(--black-400);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.svg-spot {
|
|
16
|
+
margin-bottom: var(--su24);
|
|
17
|
+
}
|
|
7
18
|
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
// Remove margin from <p> if there are no buttons
|
|
20
|
+
&:last-child {
|
|
21
|
+
margin-bottom: 0;
|
|
10
22
|
}
|
|
11
23
|
|
|
12
|
-
color: var(--fc-light);
|
|
13
24
|
text-align: center;
|
|
14
25
|
margin-left: auto;
|
|
15
26
|
margin-right: auto;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.s-form-group {
|
|
2
|
+
--_fg-fd: column;
|
|
3
|
+
--_fg-gap: var(--su8);
|
|
4
|
+
|
|
5
|
+
// CONTEXTUAL STYLES
|
|
6
|
+
&.s-menu {
|
|
7
|
+
--_fg-gap: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&:has(.s-input__sm, .s-textarea__sm, .s-select__sm) {
|
|
11
|
+
--_fg-gap: var(--su6);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&:has(.s-input__lg, .s-textarea__lg, .s-select__lg) {
|
|
15
|
+
--_fg-gap: calc(var(--su8) + var(--su2));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// MODIFIERS
|
|
19
|
+
&&__horizontal {
|
|
20
|
+
--_fg-fd: row;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// CHILD ELEMENTS
|
|
24
|
+
legend.s-label {
|
|
25
|
+
margin-bottom: var(--su8);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:has(.s-input, .s-textarea, .s-select) {
|
|
29
|
+
.s-label + .s-description {
|
|
30
|
+
margin-top: var(--sun4);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
flex-direction: var(--_fg-fd);
|
|
35
|
+
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: var(--_fg-gap);
|
|
38
|
+
}
|
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&.order-first {
|
|
15
|
-
--_if-blw: var(--
|
|
15
|
+
--_if-blw: var(--su1);
|
|
16
16
|
--_if-blr: var(--br-md);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
&.order-last {
|
|
20
|
-
--_if-brw: var(--
|
|
20
|
+
--_if-brw: var(--su1);
|
|
21
21
|
--_if-brr: var(--br-md);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
background-color: var(--_if-bg);
|
|
25
|
-
border: var(--
|
|
25
|
+
border: var(--su1) solid var(--_if-bc);
|
|
26
26
|
border-left-width: var(--_if-blw);
|
|
27
27
|
border-right-width: var(--_if-brw);
|
|
28
28
|
border-radius: var(--_if-blr) var(--_if-brr) var(--_if-brr) var(--_if-blr);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.s-input-icon {
|
|
2
2
|
--_ii-fc: unset;
|
|
3
|
-
--_ii-r:
|
|
3
|
+
--_ii-r: calc((var(--su8) + var(--su2))); // 10px
|
|
4
4
|
|
|
5
5
|
// MODIFIERS
|
|
6
6
|
.has-error & {
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
--_ii-r: auto;
|
|
33
33
|
|
|
34
34
|
color: var(--black-400);
|
|
35
|
-
left:
|
|
35
|
+
left: calc((var(--su8) + var(--su2))); // 10px
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
color: var(--_ii-fc);
|
|
39
39
|
right: var(--_ii-r);
|
|
40
40
|
|
|
41
|
-
margin-top: calc(
|
|
41
|
+
margin-top: calc(var(--sun8) + var(--sun2)); // -10px - Half the icon's height at 20px for centering
|
|
42
42
|
pointer-events: none;
|
|
43
43
|
position: absolute;
|
|
44
44
|
top: 50%;
|