@stackoverflow/stacks 2.0.0-rc.0 → 2.0.0-rc.2
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 +5 -0
- package/dist/css/stacks.css +582 -532
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +265 -110
- package/dist/js/stacks.min.js +1 -1
- package/lib/atomic/typography.less +4 -0
- package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +1 -1
- package/lib/components/activity-indicator/activity-indicator.less +17 -4
- package/lib/components/anchor/anchor.visual.test.ts +1 -5
- package/lib/components/avatar/avatar.visual.test.ts +1 -4
- package/lib/components/badge/badge.a11y.test.ts +2 -2
- package/lib/components/badge/badge.less +15 -23
- package/lib/components/block-link/block-link.less +5 -4
- package/lib/components/button/button.a11y.test.ts +2 -5
- package/lib/components/button/button.less +28 -58
- package/lib/components/button/button.visual.test.ts +2 -5
- package/lib/components/card/card.less +8 -0
- package/lib/components/description/description.a11y.test.ts +1 -0
- package/lib/components/expandable/expandable.a11y.test.ts +27 -0
- package/lib/components/expandable/expandable.visual.test.ts +27 -0
- package/lib/components/input-icon/input-icon.less +1 -1
- package/lib/components/input-message/input-message.less +4 -3
- package/lib/components/label/label.less +3 -13
- package/lib/components/link-preview/link-preview.a11y.test.ts +48 -0
- package/lib/components/link-preview/link-preview.less +13 -4
- package/lib/components/link-preview/link-preview.visual.test.ts +52 -0
- package/lib/components/notice/notice.a11y.test.ts +17 -0
- package/lib/components/notice/notice.less +44 -81
- package/lib/components/notice/notice.visual.test.ts +26 -0
- package/lib/components/pagination/pagination.a11y.test.ts +20 -0
- package/lib/components/pagination/pagination.visual.test.ts +26 -0
- package/lib/components/post-summary/post-summary.less +3 -3
- package/lib/components/sidebar-widget/sidebar-widget.less +2 -2
- package/lib/components/spinner/spinner.a11y.test.ts +15 -0
- package/lib/components/spinner/spinner.visual.test.ts +43 -0
- package/lib/components/toast/toast.a11y.test.ts +30 -0
- package/lib/components/toast/toast.visual.test.ts +10 -6
- package/lib/components/toggle-switch/toggle-switch.less +2 -5
- package/lib/components/uploader/uploader.less +19 -13
- package/lib/exports/color-sets.less +127 -78
- package/lib/exports/theme.less +3 -3
- package/lib/input-utils.less +1 -1
- package/lib/test/axe-apca/README.md +19 -0
- package/lib/test/axe-apca/src/axe-apca.test.ts +77 -1
- package/lib/test/axe-apca/src/axe-apca.ts +16 -8
- package/lib/test/test-utils.ts +7 -3
- package/package.json +12 -12
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.construct-notice-component(@baseClass) {
|
|
2
|
-
--_no-bc: var(--
|
|
2
|
+
--_no-bc: var(--black-225);
|
|
3
3
|
--_no-bg: var(--black-150);
|
|
4
|
-
--_no-fc: var(--
|
|
4
|
+
--_no-fc: var(--black-500);
|
|
5
5
|
--_no-btn-bg-focus: var(--black-225);
|
|
6
6
|
--_no-btn-bg-active: var(--black-250);
|
|
7
|
+
--_no-btn-fc: var(--_no-fc);
|
|
7
8
|
|
|
8
9
|
// MODIFIERS
|
|
9
10
|
&:not(&__important) {
|
|
@@ -26,137 +27,99 @@
|
|
|
26
27
|
--_no-fc: var(--white);
|
|
27
28
|
--_no-btn-bg-focus: var(--black-600);
|
|
28
29
|
--_no-btn-bg-active: var(--black-600);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--_no-bc: var(--_no-bg);
|
|
32
|
-
});
|
|
30
|
+
--_no-btn-fc: var(--_no-fc);
|
|
31
|
+
--_no-code-bg: var(--black-300);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// VARIANTS
|
|
36
35
|
&__danger {
|
|
37
36
|
--_no-bc: var(--red-300);
|
|
38
|
-
--_no-bg: var(--red-
|
|
39
|
-
--_no-btn-bg-active: var(--red-
|
|
40
|
-
--_no-btn-bg-focus: var(--red-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.highcontrast-mode({
|
|
44
|
-
--_no-bg: var(--red-300);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
37
|
+
--_no-bg: var(--red-100);
|
|
38
|
+
--_no-btn-bg-active: var(--red-200);
|
|
39
|
+
--_no-btn-bg-focus: var(--red-200);
|
|
40
|
+
--_no-btn-fc: var(--red-500);
|
|
41
|
+
--_no-code-bg: var(--red-300);
|
|
47
42
|
|
|
48
43
|
&.@{baseClass}__important {
|
|
49
44
|
--_no-bc: var(--_no-bg);
|
|
50
45
|
--_no-bg: var(--red-400);
|
|
51
46
|
--_no-btn-bg-active: var(--red-500);
|
|
52
47
|
--_no-btn-bg-focus: var(--red-500);
|
|
48
|
+
--_no-btn-fc: var(--red-100);
|
|
53
49
|
|
|
54
|
-
.
|
|
55
|
-
--_no-bg: var(--red-
|
|
56
|
-
--_no-fc: var(--black-600);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
.highcontrast-dark-mode({
|
|
60
|
-
--_no-bg: var(--red-400);
|
|
61
|
-
--_no-fc: var(--white);
|
|
50
|
+
.highcontrast-mode({
|
|
51
|
+
--_no-bg: var(--red-500);
|
|
62
52
|
});
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
55
|
|
|
66
56
|
&__info {
|
|
67
57
|
--_no-bc: var(--theme-secondary-300);
|
|
68
|
-
--_no-bg: var(--theme-secondary-
|
|
69
|
-
--_no-btn-bg-focus: var(--theme-secondary-
|
|
70
|
-
--_no-btn-bg-active: var(--theme-secondary-
|
|
58
|
+
--_no-bg: var(--theme-secondary-100);
|
|
59
|
+
--_no-btn-bg-focus: var(--theme-secondary-200);
|
|
60
|
+
--_no-btn-bg-active: var(--theme-secondary-200);
|
|
61
|
+
--_no-btn-fc: var(--theme-secondary-500);
|
|
71
62
|
--_no-code-bg: var(--theme-secondary-300);
|
|
72
63
|
|
|
73
|
-
&:not(.@{baseClass}__important) {
|
|
74
|
-
.highcontrast-mode({
|
|
75
|
-
--_no-bg: var(--theme-secondary-300);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
.highcontrast-dark-mode({
|
|
79
|
-
--_no-bg: var(--theme-secondary-300);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
64
|
&.@{baseClass}__important {
|
|
84
65
|
--_no-bc: var(--_no-bg);
|
|
85
66
|
--_no-bg: var(--theme-secondary-400);
|
|
86
67
|
--_no-btn-bg-active: var(--theme-secondary-500);
|
|
87
|
-
--_no-btn-bg-focus: var(--theme-secondary-
|
|
68
|
+
--_no-btn-bg-focus: var(--theme-secondary-500);
|
|
69
|
+
--_no-btn-fc: var(--theme-secondary-100);
|
|
88
70
|
|
|
89
|
-
.
|
|
90
|
-
--_no-bg: var(--theme-secondary-
|
|
91
|
-
--_no-fc: var(--black-600);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
.highcontrast-dark-mode({
|
|
95
|
-
--_no-bg: var(--theme-secondary-400);
|
|
96
|
-
--_no-fc: var(--white);
|
|
71
|
+
.highcontrast-mode({
|
|
72
|
+
--_no-bg: var(--theme-secondary-500);
|
|
97
73
|
});
|
|
98
74
|
}
|
|
99
75
|
}
|
|
100
76
|
|
|
101
77
|
&__success {
|
|
102
78
|
--_no-bc: var(--green-300);
|
|
103
|
-
--_no-bg: var(--green-
|
|
104
|
-
--_no-btn-bg-active: var(--green-
|
|
105
|
-
--_no-btn-bg-focus: var(--green-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.highcontrast-mode({
|
|
109
|
-
--_no-bg: var(--green-300);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
79
|
+
--_no-bg: var(--green-100);
|
|
80
|
+
--_no-btn-bg-active: var(--green-200);
|
|
81
|
+
--_no-btn-bg-focus: var(--green-200);
|
|
82
|
+
--_no-btn-fc: var(--green-500);
|
|
83
|
+
--_no-code-bg: var(--green-300);
|
|
112
84
|
|
|
113
85
|
&.@{baseClass}__important {
|
|
114
86
|
--_no-bc: var(--_no-bg);
|
|
115
87
|
--_no-bg: var(--green-400);
|
|
116
|
-
--_no-fc: var(--black-600);
|
|
117
88
|
--_no-btn-bg-active: var(--green-500);
|
|
118
|
-
--_no-btn-bg-focus: var(--green-
|
|
119
|
-
|
|
120
|
-
.dark-mode({
|
|
121
|
-
--_no-bg: var(--green-400);
|
|
122
|
-
--_no-fc: var(--white);
|
|
123
|
-
});
|
|
89
|
+
--_no-btn-bg-focus: var(--green-500);
|
|
90
|
+
--_no-btn-fc: var(--green-100);
|
|
124
91
|
|
|
125
92
|
.highcontrast-mode({
|
|
126
|
-
--_no-bg: var(--green-
|
|
127
|
-
--_no-fc: var(--white);
|
|
93
|
+
--_no-bg: var(--green-500);
|
|
128
94
|
});
|
|
129
95
|
}
|
|
130
96
|
}
|
|
131
97
|
|
|
132
98
|
&__warning {
|
|
133
|
-
--_no-bc: var(--yellow-
|
|
134
|
-
--_no-bg: var(--yellow-
|
|
135
|
-
--_no-btn-bg-active: var(--yellow-
|
|
136
|
-
--_no-btn-bg-focus: var(--yellow-
|
|
99
|
+
--_no-bc: var(--yellow-300);
|
|
100
|
+
--_no-bg: var(--yellow-100);
|
|
101
|
+
--_no-btn-bg-active: var(--yellow-200);
|
|
102
|
+
--_no-btn-bg-focus: var(--yellow-200);
|
|
103
|
+
--_no-btn-fc: var(--yellow-600);
|
|
137
104
|
--_no-code-bg: var(--yellow-300);
|
|
138
105
|
|
|
139
|
-
&:not(.@{baseClass}__important) {
|
|
140
|
-
.highcontrast-mode({
|
|
141
|
-
--_no-bg: var(--yellow-300);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
106
|
&.@{baseClass}__important {
|
|
146
107
|
--_no-bc: var(--_no-bg);
|
|
147
108
|
--_no-bg: var(--yellow-400);
|
|
148
|
-
--_no-fc: var(--black
|
|
149
|
-
--_no-btn-
|
|
150
|
-
--_no-btn-bg-
|
|
109
|
+
--_no-fc: var(--black);
|
|
110
|
+
--_no-btn-fc: var(--_no-fc);
|
|
111
|
+
--_no-btn-bg-active: var(--yellow-300);
|
|
112
|
+
--_no-btn-bg-focus: var(--yellow-300);
|
|
151
113
|
|
|
152
114
|
.dark-mode({
|
|
153
|
-
--_no-
|
|
154
|
-
--_no-fc: var(--white);
|
|
115
|
+
--_no-fc: var(--yellow-200);
|
|
155
116
|
});
|
|
156
117
|
|
|
157
118
|
.highcontrast-mode({
|
|
158
119
|
--_no-bg: var(--yellow-500);
|
|
159
120
|
--_no-fc: var(--white);
|
|
121
|
+
--_no-btn-bg-active: transparent;
|
|
122
|
+
--_no-btn-bg-focus: transparent;
|
|
160
123
|
});
|
|
161
124
|
}
|
|
162
125
|
}
|
|
@@ -173,15 +136,15 @@
|
|
|
173
136
|
}
|
|
174
137
|
|
|
175
138
|
&:active {
|
|
176
|
-
background: var(--_no-btn-bg-active);
|
|
139
|
+
background-color: var(--_no-btn-bg-active, inherit) !important;
|
|
177
140
|
}
|
|
178
141
|
|
|
179
142
|
&:focus,
|
|
180
143
|
&:hover {
|
|
181
|
-
background: var(--_no-btn-bg-focus);
|
|
144
|
+
background-color: var(--_no-btn-bg-focus, inherit) !important;
|
|
182
145
|
}
|
|
183
146
|
|
|
184
|
-
color: inherit;
|
|
147
|
+
color: var(--_no-btn-fc, inherit) !important;
|
|
185
148
|
padding: var(--su8);
|
|
186
149
|
}
|
|
187
150
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import { html } from "@open-wc/testing";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("notice", () => {
|
|
6
|
+
runComponentTests({
|
|
7
|
+
type: "visual",
|
|
8
|
+
baseClass: "s-notice",
|
|
9
|
+
variants: ["info", "success", "warning", "danger"],
|
|
10
|
+
modifiers: {
|
|
11
|
+
primary: ["important"],
|
|
12
|
+
},
|
|
13
|
+
attributes: {
|
|
14
|
+
ariaHidden: "false",
|
|
15
|
+
},
|
|
16
|
+
children: {
|
|
17
|
+
default: `Test notice`,
|
|
18
|
+
},
|
|
19
|
+
tag: "aside",
|
|
20
|
+
template: ({ component, testid }) => html`
|
|
21
|
+
<div class="d-inline-block p8" data-testid="${testid}">
|
|
22
|
+
${component}
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import "../../index";
|
|
3
|
+
|
|
4
|
+
describe("pagination", () => {
|
|
5
|
+
runComponentTests({
|
|
6
|
+
type: "a11y",
|
|
7
|
+
baseClass: "s-pagination",
|
|
8
|
+
children: {
|
|
9
|
+
default: `
|
|
10
|
+
<a class="s-pagination--item" href="#">Prev</a>
|
|
11
|
+
<a class="s-pagination--item" href="#">1</a>
|
|
12
|
+
<span class="s-pagination--item is-selected" aria-current="page">2</span>
|
|
13
|
+
<a class="s-pagination--item" href="#">3</a>
|
|
14
|
+
<span class="s-pagination--item s-pagination--item__clear">…</span>
|
|
15
|
+
<a class="s-pagination--item" href="#">100</a>
|
|
16
|
+
<a class="s-pagination--item" href="#">Next</a>
|
|
17
|
+
`,
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from "@open-wc/testing";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("pagination", () => {
|
|
6
|
+
runComponentTests({
|
|
7
|
+
type: "visual",
|
|
8
|
+
baseClass: "s-pagination",
|
|
9
|
+
children: {
|
|
10
|
+
default: `
|
|
11
|
+
<a class="s-pagination--item" href="#">Prev</a>
|
|
12
|
+
<a class="s-pagination--item" href="#">1</a>
|
|
13
|
+
<span class="s-pagination--item is-selected" aria-current="page">2</span>
|
|
14
|
+
<a class="s-pagination--item" href="#">3</a>
|
|
15
|
+
<span class="s-pagination--item s-pagination--item__clear">…</span>
|
|
16
|
+
<a class="s-pagination--item" href="#">100</a>
|
|
17
|
+
<a class="s-pagination--item" href="#">Next</a>
|
|
18
|
+
`,
|
|
19
|
+
},
|
|
20
|
+
template: ({ component, testid }) => html`
|
|
21
|
+
<div class="d-inline-block p8" data-testid="${testid}">
|
|
22
|
+
${component}
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -380,15 +380,15 @@
|
|
|
380
380
|
|
|
381
381
|
// Hotness
|
|
382
382
|
&.is-warm {
|
|
383
|
-
color: var(--_ps-state-fc, var(--yellow-
|
|
383
|
+
color: var(--_ps-state-fc, var(--yellow-500));
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
&.is-hot {
|
|
387
|
-
color: var(--_ps-state-fc, var(--orange-
|
|
387
|
+
color: var(--_ps-state-fc, var(--orange-500));
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
&.is-supernova {
|
|
391
|
-
color: var(--_ps-state-fc, var(--red-
|
|
391
|
+
color: var(--_ps-state-fc, var(--red-500));
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
// Status
|
|
@@ -228,11 +228,11 @@
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.s-sidebarwidget--header {
|
|
231
|
-
background-color: var(~"--@{name}-
|
|
231
|
+
background-color: var(~"--@{name}-200");
|
|
232
232
|
color: var(--fc-medium);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
background-color: var(~"--@{name}-
|
|
235
|
+
background-color: var(~"--@{name}-100");
|
|
236
236
|
border-color: var(--_sw-bc);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import "../../index";
|
|
3
|
+
|
|
4
|
+
describe("spinner", () => {
|
|
5
|
+
runComponentTests({
|
|
6
|
+
type: "a11y",
|
|
7
|
+
baseClass: "s-spinner",
|
|
8
|
+
modifiers: {
|
|
9
|
+
primary: ["xs", "sm", "md", "lg"],
|
|
10
|
+
},
|
|
11
|
+
children: {
|
|
12
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { html } from "@open-wc/testing";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
const template = ({ component, testid }: any) => html`
|
|
7
|
+
<div class="d-inline-block p8" data-testid="${testid}">${component}</div>
|
|
8
|
+
`;
|
|
9
|
+
describe("spinner", () => {
|
|
10
|
+
// default, sizes
|
|
11
|
+
runComponentTests({
|
|
12
|
+
type: "visual",
|
|
13
|
+
baseClass: "s-spinner",
|
|
14
|
+
modifiers: {
|
|
15
|
+
primary: ["xs", "sm", "md", "lg"],
|
|
16
|
+
},
|
|
17
|
+
children: {
|
|
18
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
19
|
+
},
|
|
20
|
+
template,
|
|
21
|
+
});
|
|
22
|
+
// applied font color
|
|
23
|
+
runComponentTests({
|
|
24
|
+
type: "visual",
|
|
25
|
+
baseClass: "s-spinner",
|
|
26
|
+
modifiers: {
|
|
27
|
+
global: ["fc-theme-primary"],
|
|
28
|
+
},
|
|
29
|
+
children: {
|
|
30
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
31
|
+
},
|
|
32
|
+
template,
|
|
33
|
+
});
|
|
34
|
+
// .is-loading
|
|
35
|
+
runComponentTests({
|
|
36
|
+
type: "visual",
|
|
37
|
+
baseClass: "is-loading",
|
|
38
|
+
children: {
|
|
39
|
+
default: `Loading…`,
|
|
40
|
+
},
|
|
41
|
+
template,
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import { html } from "@open-wc/testing";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("toast > notice", () => {
|
|
6
|
+
// This is a test of notice component wrapped in a toast component
|
|
7
|
+
runComponentTests({
|
|
8
|
+
type: "a11y",
|
|
9
|
+
baseClass: "s-notice", // s-toast is a wrapper around s-notice
|
|
10
|
+
variants: ["info", "success", "warning", "danger"],
|
|
11
|
+
modifiers: {
|
|
12
|
+
primary: ["important"],
|
|
13
|
+
},
|
|
14
|
+
children: {
|
|
15
|
+
toast: `<span id="message">Test toast</span>`,
|
|
16
|
+
},
|
|
17
|
+
tag: "aside",
|
|
18
|
+
template: ({ component, testid }) => html`
|
|
19
|
+
<div
|
|
20
|
+
class="s-toast ps-static t0 l0"
|
|
21
|
+
role="alertdialog"
|
|
22
|
+
aria-hidden="false"
|
|
23
|
+
aria-labelledby="message"
|
|
24
|
+
data-testid="${testid}"
|
|
25
|
+
>
|
|
26
|
+
${component}
|
|
27
|
+
</div>
|
|
28
|
+
`
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -11,16 +11,20 @@ describe("toast > notice", () => {
|
|
|
11
11
|
modifiers: {
|
|
12
12
|
primary: ["important"],
|
|
13
13
|
},
|
|
14
|
-
attributes: {
|
|
15
|
-
ariaHidden: "false",
|
|
16
|
-
},
|
|
17
14
|
children: {
|
|
18
|
-
toast: "Test toast
|
|
15
|
+
toast: `<span id="message">Test toast</span>`,
|
|
19
16
|
},
|
|
20
17
|
tag: "aside",
|
|
21
18
|
template: ({ component, testid }) => html`
|
|
22
|
-
<div data-testid="${testid}"
|
|
23
|
-
|
|
19
|
+
<div class="d-inline-block p8" data-testid="${testid}">
|
|
20
|
+
<div
|
|
21
|
+
class="s-toast ps-static t0 l0"
|
|
22
|
+
role="alertdialog"
|
|
23
|
+
aria-hidden="false"
|
|
24
|
+
aria-labelledby="message"
|
|
25
|
+
>
|
|
26
|
+
${component}
|
|
27
|
+
</div>
|
|
24
28
|
</div>
|
|
25
29
|
`,
|
|
26
30
|
});
|
|
@@ -21,15 +21,11 @@
|
|
|
21
21
|
&.s-toggle-switch--label-off {
|
|
22
22
|
--_ts-multiple-bg: var(--black-400);
|
|
23
23
|
--_ts-multiple-fc: var(--white);
|
|
24
|
-
|
|
25
|
-
.dark-mode({ --_ts-multiple-bg: var(--black-350); });
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
&:not(.s-toggle-switch--label-off) {
|
|
29
27
|
--_ts-multiple-bg: var(--green-400);
|
|
30
|
-
--_ts-multiple-fc: var(--
|
|
31
|
-
|
|
32
|
-
.highcontrast-mode({ --_ts-multiple-fc: var(--white); });
|
|
28
|
+
--_ts-multiple-fc: var(--white);
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
|
|
@@ -102,6 +98,7 @@
|
|
|
102
98
|
background-repeat: no-repeat;
|
|
103
99
|
border-radius: 1000px;
|
|
104
100
|
cursor: pointer;
|
|
101
|
+
flex-shrink: 0;
|
|
105
102
|
height: var(--su-static24);
|
|
106
103
|
margin: 0; // guard against production adding 5px of margin to these
|
|
107
104
|
transition: background-position 0.2s ease;
|
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
// CONTEXTUAL STYLES
|
|
11
11
|
.highcontrast-mode({
|
|
12
12
|
--_up-bg-bc-hc: var(--black-400);
|
|
13
|
+
&.has-error {
|
|
14
|
+
--_up-bg-bc-hc-state: var(--red-500);
|
|
15
|
+
}
|
|
16
|
+
&.has-success {
|
|
17
|
+
--_up-bg-bc-hc-state: var(--green-400);
|
|
18
|
+
}
|
|
19
|
+
&.has-warning {
|
|
20
|
+
--_up-bg-bc-hc-state: var(--yellow-500);
|
|
21
|
+
}
|
|
13
22
|
});
|
|
14
23
|
|
|
15
24
|
// STATES
|
|
@@ -22,30 +31,27 @@
|
|
|
22
31
|
}
|
|
23
32
|
|
|
24
33
|
&.has-error {
|
|
25
|
-
--_up-bg: var(--red-
|
|
26
|
-
--_up-bg-focus: var(--red-
|
|
27
|
-
--_up-bg-bc: var(--red-
|
|
28
|
-
--_up-bg-bc-hc-state: var(--red-400);
|
|
34
|
+
--_up-bg: var(--red-100);
|
|
35
|
+
--_up-bg-focus: var(--red-200);
|
|
36
|
+
--_up-bg-bc: var(--red-300);
|
|
29
37
|
--_up-focus-ring-color: var(--focus-ring-error);
|
|
30
|
-
--_up-link-fc: var(--red-
|
|
38
|
+
--_up-link-fc: var(--red-500);
|
|
31
39
|
}
|
|
32
40
|
|
|
33
41
|
&.has-success {
|
|
34
42
|
--_up-bg: var(--green-100);
|
|
35
43
|
--_up-bg-focus: var(--green-200);
|
|
36
|
-
--_up-bg-bc: var(--green-
|
|
37
|
-
--_up-bg-bc-hc-state: var(--green-400);
|
|
44
|
+
--_up-bg-bc: var(--green-300);
|
|
38
45
|
--_up-focus-ring-color: var(--focus-ring-success);
|
|
39
|
-
--_up-link-fc: var(--green-
|
|
46
|
+
--_up-link-fc: var(--green-400);
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
&.has-warning {
|
|
43
|
-
--_up-bg: var(--yellow-
|
|
44
|
-
--_up-bg-focus: var(--yellow-
|
|
45
|
-
--_up-bg-bc: var(--yellow-
|
|
46
|
-
--_up-bg-bc-hc-state: var(--yellow-400);
|
|
50
|
+
--_up-bg: var(--yellow-100);
|
|
51
|
+
--_up-bg-focus: var(--yellow-200);
|
|
52
|
+
--_up-bg-bc: var(--yellow-300);
|
|
47
53
|
--_up-focus-ring-color: var(--focus-ring-warning);
|
|
48
|
-
--_up-link-fc: var(--yellow-
|
|
54
|
+
--_up-link-fc: var(--yellow-500);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
&.is-active {
|