@stackoverflow/stacks 2.0.1 → 2.0.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/dist/css/stacks.css +82 -82
- package/dist/css/stacks.min.css +1 -1
- package/lib/components/empty-state/empty-state.a11y.test.ts +17 -0
- package/lib/components/empty-state/empty-state.visual.test.ts +17 -0
- package/lib/components/label/label.a11y.test.ts +48 -0
- package/lib/components/label/label.less +1 -0
- package/lib/components/label/label.visual.test.ts +66 -0
- package/lib/components/menu/menu.a11y.test.ts +40 -0
- package/lib/components/menu/menu.visual.test.ts +40 -0
- package/lib/components/progress-bar/progress-bar.a11y.test.ts +200 -0
- package/lib/components/progress-bar/progress-bar.visual.test.ts +199 -0
- package/lib/components/table/table.a11y.test.ts +113 -0
- package/lib/components/table/table.visual.test.ts +105 -0
- package/lib/components/tag/tag.less +3 -3
- package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +2 -2
- package/lib/exports/__snapshots__/color.less.test.ts.snap +78 -78
- package/lib/exports/color-sets.less +48 -43
- package/lib/test/test-utils.ts +1 -1
- package/package.json +7 -7
- package/lib/test/axe-apca/README.md +0 -53
- package/lib/test/axe-apca/index.ts +0 -3
- package/lib/test/axe-apca/package.wip.json +0 -30
- package/lib/test/axe-apca/src/apca-w3.d.ts +0 -3
- package/lib/test/axe-apca/src/axe-apca.test.ts +0 -231
- package/lib/test/axe-apca/src/axe-apca.ts +0 -220
|
@@ -0,0 +1,113 @@
|
|
|
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="s-table-container p8" data-testid="${testid}">${component}</div>
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const rows = [
|
|
11
|
+
{
|
|
12
|
+
displayName: "Sponge",
|
|
13
|
+
fullName: "Bobby Geometrislacks",
|
|
14
|
+
progress: 10,
|
|
15
|
+
active: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: "Patty",
|
|
19
|
+
fullName: "Pat Supernova",
|
|
20
|
+
progress: 50,
|
|
21
|
+
active: true,
|
|
22
|
+
// }, {
|
|
23
|
+
// displayName: "Crustoph",
|
|
24
|
+
// fullName: "Eugene Harold K",
|
|
25
|
+
// progress: 75,
|
|
26
|
+
// active: false, // TODO reintroduce once disabled rows pass contrast requirements
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
displayName: "SCheeks",
|
|
30
|
+
fullName: "Sandra C.",
|
|
31
|
+
progress: 100,
|
|
32
|
+
active: true,
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const children = {
|
|
37
|
+
default: `
|
|
38
|
+
<thead>
|
|
39
|
+
<tr>
|
|
40
|
+
<th scope="col" class="s-table--bulk">
|
|
41
|
+
<label class="v-visible-sr" for="check">bulk action</label>
|
|
42
|
+
<input type="checkbox" class="s-checkbox" id="check">
|
|
43
|
+
</th>
|
|
44
|
+
<th scope="col">Display Name</th>
|
|
45
|
+
<th scope="col">Full name</th>
|
|
46
|
+
<th scope="col" colspan="2">Progress</th>
|
|
47
|
+
<th scope="col"><span>class="v-visible-sr">Bar</span></th>
|
|
48
|
+
</tr>
|
|
49
|
+
</thead>
|
|
50
|
+
<tbody>
|
|
51
|
+
${rows
|
|
52
|
+
.map(
|
|
53
|
+
(row, i) => `
|
|
54
|
+
<tr class="${row.active ? "" : "is-disabled"}">
|
|
55
|
+
<th scope="row">
|
|
56
|
+
<label class="v-visible-sr" for="check-${i}">bulk</label>
|
|
57
|
+
<input type="checkbox" class="s-checkbox" id="check-${i}">
|
|
58
|
+
</th>
|
|
59
|
+
<td>${row.displayName}</td>
|
|
60
|
+
<td>${row.fullName}</td>
|
|
61
|
+
<td class="s-table--progress">${row.progress}</td>
|
|
62
|
+
<td class="s-table--progress-bar">
|
|
63
|
+
<div class="s-progress bg-white">
|
|
64
|
+
<div class="s-progress--bar bg-blue-400" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${
|
|
65
|
+
row.progress
|
|
66
|
+
}" aria-label="progressbar" style="width: ${
|
|
67
|
+
row.progress
|
|
68
|
+
}%"></div>
|
|
69
|
+
</div>
|
|
70
|
+
</td>
|
|
71
|
+
<td><a class="s-link" href="#">Add</a></td>
|
|
72
|
+
</tr>
|
|
73
|
+
`
|
|
74
|
+
)
|
|
75
|
+
.join("")}
|
|
76
|
+
</tbody>
|
|
77
|
+
<tfoot class="s-table--totals">
|
|
78
|
+
<tr>
|
|
79
|
+
<td scope="row"><span class="v-visible-sr">Empty</span></td>
|
|
80
|
+
<th scope="row" class="ta-left">Totals</th>
|
|
81
|
+
<td><span class="v-visible-sr">Empty</span></td>
|
|
82
|
+
<td colspan="2">160</td>
|
|
83
|
+
<td><span class="v-visible-sr">Empty</span></td>
|
|
84
|
+
</tr>
|
|
85
|
+
</tfoot>
|
|
86
|
+
`,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
describe("table", () => {
|
|
90
|
+
// default, sizes
|
|
91
|
+
runComponentTests({
|
|
92
|
+
type: "a11y",
|
|
93
|
+
baseClass: "s-table",
|
|
94
|
+
variants: ["stripes"],
|
|
95
|
+
modifiers: {
|
|
96
|
+
primary: ["sm", "lg"],
|
|
97
|
+
secondary: ["b0", "bx", "bx-simple", "sortable"],
|
|
98
|
+
// global: ["ta-center", "ta-left", "ta-justify", "ta-right", "va-bottom", "va-middle", "va-top"], // Removing these modifiers *for now* since they create so many test images and would slow testing
|
|
99
|
+
},
|
|
100
|
+
tag: "table",
|
|
101
|
+
children,
|
|
102
|
+
template,
|
|
103
|
+
// TODO resolve HC contrast issues with `.s-table.s-table__sortable thead th` sortable
|
|
104
|
+
skippedTestids: [
|
|
105
|
+
"s-table-highcontrast-light-lg-sortable",
|
|
106
|
+
"s-table-highcontrast-light-sm-sortable",
|
|
107
|
+
"s-table-highcontrast-light-sortable",
|
|
108
|
+
"s-table-highcontrast-light-stripes-lg-sortable",
|
|
109
|
+
"s-table-highcontrast-light-stripes-sm-sortable",
|
|
110
|
+
"s-table-highcontrast-light-stripes-sortable",
|
|
111
|
+
],
|
|
112
|
+
});
|
|
113
|
+
});
|
|
@@ -0,0 +1,105 @@
|
|
|
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="s-table-container p8" data-testid="${testid}">${component}</div>
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const rows = [
|
|
11
|
+
{
|
|
12
|
+
displayName: "Sponge",
|
|
13
|
+
fullName: "Bobby Geometrislacks",
|
|
14
|
+
progress: 10,
|
|
15
|
+
active: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
displayName: "Patty",
|
|
19
|
+
fullName: "Pat Supernova",
|
|
20
|
+
progress: 50,
|
|
21
|
+
active: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: "Crustoph",
|
|
25
|
+
fullName: "Eugene Harold K",
|
|
26
|
+
progress: 75,
|
|
27
|
+
active: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
displayName: "SCheeks",
|
|
31
|
+
fullName: "Sandra C.",
|
|
32
|
+
progress: 100,
|
|
33
|
+
active: true,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const children = {
|
|
38
|
+
default: `
|
|
39
|
+
<thead>
|
|
40
|
+
<tr>
|
|
41
|
+
<th scope="col" class="s-table--bulk">
|
|
42
|
+
<label class="v-visible-sr" for="check">bulk action</label>
|
|
43
|
+
<input type="checkbox" class="s-checkbox" id="check">
|
|
44
|
+
</th>
|
|
45
|
+
<th scope="col">Display Name</th>
|
|
46
|
+
<th scope="col">Full name</th>
|
|
47
|
+
<th scope="col" colspan="2">Progress</th>
|
|
48
|
+
<th scope="col"><span>class="v-visible-sr">Bar</span></th>
|
|
49
|
+
</tr>
|
|
50
|
+
</thead>
|
|
51
|
+
<tbody>
|
|
52
|
+
${rows
|
|
53
|
+
.map(
|
|
54
|
+
(row, i) => `
|
|
55
|
+
<tr class="${row.active ? "" : "is-disabled"}">
|
|
56
|
+
<th scope="row">
|
|
57
|
+
<label class="v-visible-sr" for="check-${i}">bulk</label>
|
|
58
|
+
<input type="checkbox" class="s-checkbox" id="check-${i}">
|
|
59
|
+
</th>
|
|
60
|
+
<td>${row.displayName}</td>
|
|
61
|
+
<td>${row.fullName}</td>
|
|
62
|
+
<td class="s-table--progress">${row.progress}</td>
|
|
63
|
+
<td class="s-table--progress-bar">
|
|
64
|
+
<div class="s-progress bg-white">
|
|
65
|
+
<div class="s-progress--bar bg-blue-400" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${
|
|
66
|
+
row.progress
|
|
67
|
+
}" aria-label="progressbar" style="width: ${
|
|
68
|
+
row.progress
|
|
69
|
+
}%"></div>
|
|
70
|
+
</div>
|
|
71
|
+
</td>
|
|
72
|
+
<td><a class="s-link" href="#">Add</a></td>
|
|
73
|
+
</tr>
|
|
74
|
+
`
|
|
75
|
+
)
|
|
76
|
+
.join("")}
|
|
77
|
+
</tbody>
|
|
78
|
+
<tfoot class="s-table--totals">
|
|
79
|
+
<tr>
|
|
80
|
+
<td scope="row"><span class="v-visible-sr">Empty</span></td>
|
|
81
|
+
<th scope="row" class="ta-left">Totals</th>
|
|
82
|
+
<td><span class="v-visible-sr">Empty</span></td>
|
|
83
|
+
<td colspan="2">160</td>
|
|
84
|
+
<td><span class="v-visible-sr">Empty</span></td>
|
|
85
|
+
</tr>
|
|
86
|
+
</tfoot>
|
|
87
|
+
`,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
describe("table", () => {
|
|
91
|
+
// default, sizes
|
|
92
|
+
runComponentTests({
|
|
93
|
+
type: "visual",
|
|
94
|
+
baseClass: "s-table",
|
|
95
|
+
variants: ["stripes"],
|
|
96
|
+
modifiers: {
|
|
97
|
+
primary: ["sm", "lg"],
|
|
98
|
+
secondary: ["b0", "bx", "bx-simple", "sortable"],
|
|
99
|
+
// global: ["ta-center", "ta-left", "ta-justify", "ta-right", "va-bottom", "va-middle", "va-top"], // Removing these modifiers *for now* since they create so many test images and would slow testing
|
|
100
|
+
},
|
|
101
|
+
tag: "table",
|
|
102
|
+
children,
|
|
103
|
+
template,
|
|
104
|
+
});
|
|
105
|
+
});
|
|
@@ -109,9 +109,9 @@
|
|
|
109
109
|
--_ta-bg-selected: var(--orange-500);
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
--_ta-bc: var(--orange-
|
|
112
|
+
--_ta-bc: var(--orange-300);
|
|
113
113
|
--_ta-bg: var(--orange-100);
|
|
114
|
-
--_ta-fc: var(--orange-
|
|
114
|
+
--_ta-fc: var(--orange-600);
|
|
115
115
|
--_ta-bc-hover: var(--orange-300);
|
|
116
116
|
--_ta-bg-hover: var(--orange-200);
|
|
117
117
|
--_ta-fc-hover: var(--orange-600);
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
--_ta-bc-selected: var(--theme-tag-required-selected-border-color, transparent);
|
|
143
143
|
// Background color
|
|
144
144
|
--_ta-bg: var(--theme-tag-required-background-color, var(--theme-secondary-500));
|
|
145
|
-
--_ta-bg-hover: var(--theme-tag-required-hover-background-color var(--theme-secondary-400));
|
|
145
|
+
--_ta-bg-hover: var(--theme-tag-required-hover-background-color, var(--theme-secondary-400));
|
|
146
146
|
--_ta-bg-selected: var(--theme-tag-required-selected-background-color, var(--theme-secondary-600));
|
|
147
147
|
// Color
|
|
148
148
|
--_ta-fc: var(--theme-tag-required-color, var(--white));
|
|
@@ -316,10 +316,10 @@ body .themed {
|
|
|
316
316
|
--green-600: hsl(148, 75%, 15%);
|
|
317
317
|
--red-100: hsl(0, 72%, 96%);
|
|
318
318
|
--red-200: hsl(0, 70%, 93%);
|
|
319
|
-
--red-300: hsl(0,
|
|
319
|
+
--red-300: hsl(0, 66%, 80%);
|
|
320
320
|
--red-400: hsl(0, 60%, 49%);
|
|
321
321
|
--red-500: hsl(0, 65%, 37%);
|
|
322
|
-
--red-600: hsl(0, 65%,
|
|
322
|
+
--red-600: hsl(0, 65%, 22%);
|
|
323
323
|
--yellow-100: hsl(43, 80%, 96%);
|
|
324
324
|
--yellow-200: hsl(43, 80%, 88%);
|
|
325
325
|
--yellow-300: hsl(43, 85%, 72%);
|
|
@@ -104,10 +104,10 @@ body:not(.theme-highcontrast).theme-system .theme-light__forced .themed {
|
|
|
104
104
|
--green-600: hsl(148, 75%, 15%);
|
|
105
105
|
--red-100: hsl(0, 72%, 96%);
|
|
106
106
|
--red-200: hsl(0, 70%, 93%);
|
|
107
|
-
--red-300: hsl(0,
|
|
107
|
+
--red-300: hsl(0, 66%, 80%);
|
|
108
108
|
--red-400: hsl(0, 60%, 49%);
|
|
109
109
|
--red-500: hsl(0, 65%, 37%);
|
|
110
|
-
--red-600: hsl(0, 65%,
|
|
110
|
+
--red-600: hsl(0, 65%, 22%);
|
|
111
111
|
--yellow-100: hsl(43, 80%, 96%);
|
|
112
112
|
--yellow-200: hsl(43, 80%, 88%);
|
|
113
113
|
--yellow-300: hsl(43, 85%, 72%);
|
|
@@ -211,42 +211,42 @@ body:not(.theme-highcontrast):not(.theme-dark) .theme-dark__forced .themed {
|
|
|
211
211
|
--black-500: hsl(210, 8%, 90%);
|
|
212
212
|
--black-600: hsl(210, 11%, 98%);
|
|
213
213
|
--black: hsl(0, 0%, 100%);
|
|
214
|
-
--orange-100: hsl(27,
|
|
215
|
-
--orange-200: hsl(27,
|
|
216
|
-
--orange-300: hsl(27,
|
|
217
|
-
--orange-400: hsl(27,
|
|
218
|
-
--orange-500: hsl(27,
|
|
219
|
-
--orange-600: hsl(27,
|
|
220
|
-
--blue-100: hsl(
|
|
221
|
-
--blue-200: hsl(210,
|
|
222
|
-
--blue-300: hsl(210,
|
|
223
|
-
--blue-400: hsl(210,
|
|
224
|
-
--blue-500: hsl(210,
|
|
225
|
-
--blue-600: hsl(210,
|
|
226
|
-
--green-100: hsl(
|
|
227
|
-
--green-200: hsl(
|
|
228
|
-
--green-300: hsl(
|
|
229
|
-
--green-400: hsl(
|
|
230
|
-
--green-500: hsl(
|
|
231
|
-
--green-600: hsl(
|
|
232
|
-
--red-100: hsl(
|
|
233
|
-
--red-200: hsl(0,
|
|
234
|
-
--red-300: hsl(0,
|
|
235
|
-
--red-400: hsl(0,
|
|
236
|
-
--red-500: hsl(0,
|
|
237
|
-
--red-600: hsl(0,
|
|
238
|
-
--yellow-100: hsl(43,
|
|
239
|
-
--yellow-200: hsl(43,
|
|
240
|
-
--yellow-300: hsl(43,
|
|
241
|
-
--yellow-400: hsl(43,
|
|
242
|
-
--yellow-500: hsl(43,
|
|
243
|
-
--yellow-600: hsl(43,
|
|
244
|
-
--purple-100: hsl(237,
|
|
245
|
-
--purple-200: hsl(237,
|
|
246
|
-
--purple-300: hsl(237,
|
|
247
|
-
--purple-400: hsl(237,
|
|
248
|
-
--purple-500: hsl(237,
|
|
249
|
-
--purple-600: hsl(237,
|
|
214
|
+
--orange-100: hsl(27, 55%, 20%);
|
|
215
|
+
--orange-200: hsl(27, 50%, 33%);
|
|
216
|
+
--orange-300: hsl(27, 50%, 43%);
|
|
217
|
+
--orange-400: hsl(27, 90%, 68%);
|
|
218
|
+
--orange-500: hsl(27, 90%, 80%);
|
|
219
|
+
--orange-600: hsl(27, 90%, 90%);
|
|
220
|
+
--blue-100: hsl(210, 50%, 22%);
|
|
221
|
+
--blue-200: hsl(210, 50%, 36%);
|
|
222
|
+
--blue-300: hsl(210, 50%, 48%);
|
|
223
|
+
--blue-400: hsl(210, 89%, 77%);
|
|
224
|
+
--blue-500: hsl(210, 89%, 84%);
|
|
225
|
+
--blue-600: hsl(210, 89%, 92%);
|
|
226
|
+
--green-100: hsl(149, 51%, 15%);
|
|
227
|
+
--green-200: hsl(149, 51%, 25%);
|
|
228
|
+
--green-300: hsl(149, 51%, 36%);
|
|
229
|
+
--green-400: hsl(149, 50%, 62%);
|
|
230
|
+
--green-500: hsl(149, 50%, 74%);
|
|
231
|
+
--green-600: hsl(149, 50%, 88%);
|
|
232
|
+
--red-100: hsl(0, 43%, 22%);
|
|
233
|
+
--red-200: hsl(0, 43%, 41%);
|
|
234
|
+
--red-300: hsl(0, 43%, 56%);
|
|
235
|
+
--red-400: hsl(0, 90%, 81%);
|
|
236
|
+
--red-500: hsl(0, 90%, 88%);
|
|
237
|
+
--red-600: hsl(0, 90%, 94%);
|
|
238
|
+
--yellow-100: hsl(43, 50%, 17%);
|
|
239
|
+
--yellow-200: hsl(43, 50%, 28%);
|
|
240
|
+
--yellow-300: hsl(43, 50%, 39%);
|
|
241
|
+
--yellow-400: hsl(43, 90%, 75%);
|
|
242
|
+
--yellow-500: hsl(43, 90%, 82%);
|
|
243
|
+
--yellow-600: hsl(43, 90%, 91%);
|
|
244
|
+
--purple-100: hsl(237, 43%, 37%);
|
|
245
|
+
--purple-200: hsl(237, 51%, 52%);
|
|
246
|
+
--purple-300: hsl(237, 63%, 62%);
|
|
247
|
+
--purple-400: hsl(237, 89%, 83%);
|
|
248
|
+
--purple-500: hsl(237, 89%, 89%);
|
|
249
|
+
--purple-600: hsl(237, 89%, 94%);
|
|
250
250
|
--gold-100: hsl(45, 29%, 24%);
|
|
251
251
|
--gold-200: hsl(45, 47%, 37%);
|
|
252
252
|
--gold-300: hsl(45, 92%, 62%);
|
|
@@ -286,7 +286,7 @@ body:not(.theme-highcontrast):not(.theme-dark) .theme-dark__forced .themed {
|
|
|
286
286
|
--highlight-punctuation: hsl(0, 0%, 80%);
|
|
287
287
|
--highlight-symbol: hsl(306, 43%, 69%);
|
|
288
288
|
--highlight-variable: hsl(65.5, 39%, 57.5%);
|
|
289
|
-
--scrollbar: hsla(0, 0%,
|
|
289
|
+
--scrollbar: hsla(0, 0%, 100%, 0.2);
|
|
290
290
|
--theme-primary: var(--theme-dark-primary-custom, var(--orange-400));
|
|
291
291
|
--theme-primary-100: var(--theme-dark-primary-custom-100, var(--orange-100));
|
|
292
292
|
--theme-primary-200: var(--theme-dark-primary-custom-200, var(--orange-200));
|
|
@@ -336,42 +336,42 @@ body:not(.theme-highcontrast):not(.theme-dark) .theme-dark__forced .themed {
|
|
|
336
336
|
--black-500: hsl(210, 8%, 90%);
|
|
337
337
|
--black-600: hsl(210, 11%, 98%);
|
|
338
338
|
--black: hsl(0, 0%, 100%);
|
|
339
|
-
--orange-100: hsl(27,
|
|
340
|
-
--orange-200: hsl(27,
|
|
341
|
-
--orange-300: hsl(27,
|
|
342
|
-
--orange-400: hsl(27,
|
|
343
|
-
--orange-500: hsl(27,
|
|
344
|
-
--orange-600: hsl(27,
|
|
345
|
-
--blue-100: hsl(
|
|
346
|
-
--blue-200: hsl(210,
|
|
347
|
-
--blue-300: hsl(210,
|
|
348
|
-
--blue-400: hsl(210,
|
|
349
|
-
--blue-500: hsl(210,
|
|
350
|
-
--blue-600: hsl(210,
|
|
351
|
-
--green-100: hsl(
|
|
352
|
-
--green-200: hsl(
|
|
353
|
-
--green-300: hsl(
|
|
354
|
-
--green-400: hsl(
|
|
355
|
-
--green-500: hsl(
|
|
356
|
-
--green-600: hsl(
|
|
357
|
-
--red-100: hsl(
|
|
358
|
-
--red-200: hsl(0,
|
|
359
|
-
--red-300: hsl(0,
|
|
360
|
-
--red-400: hsl(0,
|
|
361
|
-
--red-500: hsl(0,
|
|
362
|
-
--red-600: hsl(0,
|
|
363
|
-
--yellow-100: hsl(43,
|
|
364
|
-
--yellow-200: hsl(43,
|
|
365
|
-
--yellow-300: hsl(43,
|
|
366
|
-
--yellow-400: hsl(43,
|
|
367
|
-
--yellow-500: hsl(43,
|
|
368
|
-
--yellow-600: hsl(43,
|
|
369
|
-
--purple-100: hsl(237,
|
|
370
|
-
--purple-200: hsl(237,
|
|
371
|
-
--purple-300: hsl(237,
|
|
372
|
-
--purple-400: hsl(237,
|
|
373
|
-
--purple-500: hsl(237,
|
|
374
|
-
--purple-600: hsl(237,
|
|
339
|
+
--orange-100: hsl(27, 55%, 20%);
|
|
340
|
+
--orange-200: hsl(27, 50%, 33%);
|
|
341
|
+
--orange-300: hsl(27, 50%, 43%);
|
|
342
|
+
--orange-400: hsl(27, 90%, 68%);
|
|
343
|
+
--orange-500: hsl(27, 90%, 80%);
|
|
344
|
+
--orange-600: hsl(27, 90%, 90%);
|
|
345
|
+
--blue-100: hsl(210, 50%, 22%);
|
|
346
|
+
--blue-200: hsl(210, 50%, 36%);
|
|
347
|
+
--blue-300: hsl(210, 50%, 48%);
|
|
348
|
+
--blue-400: hsl(210, 89%, 77%);
|
|
349
|
+
--blue-500: hsl(210, 89%, 84%);
|
|
350
|
+
--blue-600: hsl(210, 89%, 92%);
|
|
351
|
+
--green-100: hsl(149, 51%, 15%);
|
|
352
|
+
--green-200: hsl(149, 51%, 25%);
|
|
353
|
+
--green-300: hsl(149, 51%, 36%);
|
|
354
|
+
--green-400: hsl(149, 50%, 62%);
|
|
355
|
+
--green-500: hsl(149, 50%, 74%);
|
|
356
|
+
--green-600: hsl(149, 50%, 88%);
|
|
357
|
+
--red-100: hsl(0, 43%, 22%);
|
|
358
|
+
--red-200: hsl(0, 43%, 41%);
|
|
359
|
+
--red-300: hsl(0, 43%, 56%);
|
|
360
|
+
--red-400: hsl(0, 90%, 81%);
|
|
361
|
+
--red-500: hsl(0, 90%, 88%);
|
|
362
|
+
--red-600: hsl(0, 90%, 94%);
|
|
363
|
+
--yellow-100: hsl(43, 50%, 17%);
|
|
364
|
+
--yellow-200: hsl(43, 50%, 28%);
|
|
365
|
+
--yellow-300: hsl(43, 50%, 39%);
|
|
366
|
+
--yellow-400: hsl(43, 90%, 75%);
|
|
367
|
+
--yellow-500: hsl(43, 90%, 82%);
|
|
368
|
+
--yellow-600: hsl(43, 90%, 91%);
|
|
369
|
+
--purple-100: hsl(237, 43%, 37%);
|
|
370
|
+
--purple-200: hsl(237, 51%, 52%);
|
|
371
|
+
--purple-300: hsl(237, 63%, 62%);
|
|
372
|
+
--purple-400: hsl(237, 89%, 83%);
|
|
373
|
+
--purple-500: hsl(237, 89%, 89%);
|
|
374
|
+
--purple-600: hsl(237, 89%, 94%);
|
|
375
375
|
--gold-100: hsl(45, 29%, 24%);
|
|
376
376
|
--gold-200: hsl(45, 47%, 37%);
|
|
377
377
|
--gold-300: hsl(45, 92%, 62%);
|
|
@@ -411,7 +411,7 @@ body:not(.theme-highcontrast):not(.theme-dark) .theme-dark__forced .themed {
|
|
|
411
411
|
--highlight-punctuation: hsl(0, 0%, 80%);
|
|
412
412
|
--highlight-symbol: hsl(306, 43%, 69%);
|
|
413
413
|
--highlight-variable: hsl(65.5, 39%, 57.5%);
|
|
414
|
-
--scrollbar: hsla(0, 0%,
|
|
414
|
+
--scrollbar: hsla(0, 0%, 100%, 0.2);
|
|
415
415
|
--theme-primary: var(--theme-dark-primary-custom, var(--orange-400));
|
|
416
416
|
--theme-primary-100: var(--theme-dark-primary-custom-100, var(--orange-100));
|
|
417
417
|
--theme-primary-200: var(--theme-dark-primary-custom-200, var(--orange-200));
|
|
@@ -483,8 +483,8 @@ body.theme-highcontrast.theme-system .theme-light__forced {
|
|
|
483
483
|
--red-200: hsl(0, 80%, 96%);
|
|
484
484
|
--red-300: hsl(0, 60%, 49%);
|
|
485
485
|
--red-400: hsl(0, 65%, 37%);
|
|
486
|
-
--red-500: hsl(0,
|
|
487
|
-
--red-600: hsl(0,
|
|
486
|
+
--red-500: hsl(0, 65%, 22%);
|
|
487
|
+
--red-600: hsl(0, 65%, 22%);
|
|
488
488
|
--yellow-100: hsl(41, 80%, 96%);
|
|
489
489
|
--yellow-200: hsl(41, 80%, 96%);
|
|
490
490
|
--yellow-300: hsl(43, 85%, 50%);
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
600: hsl(27, 80%, 29%);
|
|
95
95
|
}
|
|
96
96
|
.set-orange-dark() {
|
|
97
|
-
100: hsl(27,
|
|
98
|
-
200: hsl(27,
|
|
99
|
-
300: hsl(27,
|
|
100
|
-
400: hsl(27,
|
|
101
|
-
500: hsl(27,
|
|
102
|
-
600: hsl(27,
|
|
97
|
+
100: hsl(27, 55%, 20%);
|
|
98
|
+
200: hsl(27, 50%, 33%);
|
|
99
|
+
300: hsl(27, 50%, 43%);
|
|
100
|
+
400: hsl(27, 90%, 68%);
|
|
101
|
+
500: hsl(27, 90%, 80%);
|
|
102
|
+
600: hsl(27, 90%, 90%);
|
|
103
103
|
}
|
|
104
104
|
.set-orange-hc() {
|
|
105
105
|
100: hsl(23, 87%, 97%);
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
600: hsl(210, 80%, 23%);
|
|
129
129
|
}
|
|
130
130
|
.set-blue-dark() {
|
|
131
|
-
100: hsl(
|
|
132
|
-
200: hsl(210,
|
|
133
|
-
300: hsl(210,
|
|
134
|
-
400: hsl(210,
|
|
135
|
-
500: hsl(210,
|
|
136
|
-
600: hsl(210,
|
|
131
|
+
100: hsl(210, 50%, 22%);
|
|
132
|
+
200: hsl(210, 50%, 36%);
|
|
133
|
+
300: hsl(210, 50%, 48%);
|
|
134
|
+
400: hsl(210, 89%, 77%);
|
|
135
|
+
500: hsl(210, 89%, 84%);
|
|
136
|
+
600: hsl(210, 89%, 92%);
|
|
137
137
|
}
|
|
138
138
|
.set-blue-hc() {
|
|
139
139
|
100: hsl(210, 80%, 96%);
|
|
@@ -162,12 +162,12 @@
|
|
|
162
162
|
600: hsl(148, 75%, 15%);
|
|
163
163
|
}
|
|
164
164
|
.set-green-dark() {
|
|
165
|
-
100: hsl(
|
|
166
|
-
200: hsl(
|
|
167
|
-
300: hsl(
|
|
168
|
-
400: hsl(
|
|
169
|
-
500: hsl(
|
|
170
|
-
600: hsl(
|
|
165
|
+
100: hsl(149, 51%, 15%);
|
|
166
|
+
200: hsl(149, 51%, 25%);
|
|
167
|
+
300: hsl(149, 51%, 36%);
|
|
168
|
+
400: hsl(149, 50%, 62%);
|
|
169
|
+
500: hsl(149, 50%, 74%);
|
|
170
|
+
600: hsl(149, 50%, 88%);
|
|
171
171
|
}
|
|
172
172
|
.set-green-hc() {
|
|
173
173
|
100: hsl(147, 36%, 95%);
|
|
@@ -190,26 +190,26 @@
|
|
|
190
190
|
.set-red() {
|
|
191
191
|
100: hsl(0, 72%, 96%);
|
|
192
192
|
200: hsl(0, 70%, 93%);
|
|
193
|
-
300: hsl(0,
|
|
193
|
+
300: hsl(0, 66%, 80%);
|
|
194
194
|
400: hsl(0, 60%, 49%);
|
|
195
195
|
500: hsl(0, 65%, 37%);
|
|
196
|
-
600: hsl(0, 65%,
|
|
196
|
+
600: hsl(0, 65%, 22%);
|
|
197
197
|
}
|
|
198
198
|
.set-red-dark() {
|
|
199
|
-
100: hsl(
|
|
200
|
-
200: hsl(0,
|
|
201
|
-
300: hsl(0,
|
|
202
|
-
400: hsl(0,
|
|
203
|
-
500: hsl(0,
|
|
204
|
-
600: hsl(0,
|
|
199
|
+
100: hsl(0, 43%, 22%);
|
|
200
|
+
200: hsl(0, 43%, 41%);
|
|
201
|
+
300: hsl(0, 43%, 56%);
|
|
202
|
+
400: hsl(0, 90%, 81%);
|
|
203
|
+
500: hsl(0, 90%, 88%);
|
|
204
|
+
600: hsl(0, 90%, 94%);
|
|
205
205
|
}
|
|
206
206
|
.set-red-hc() {
|
|
207
207
|
100: hsl(0, 80%, 96%);
|
|
208
208
|
200: hsl(0, 80%, 96%);
|
|
209
209
|
300: hsl(0, 60%, 49%);
|
|
210
210
|
400: hsl(0, 65%, 37%);
|
|
211
|
-
500: hsl(0,
|
|
212
|
-
600: hsl(0,
|
|
211
|
+
500: hsl(0, 65%, 22%);
|
|
212
|
+
600: hsl(0, 65%, 22%);
|
|
213
213
|
}
|
|
214
214
|
.set-red-hc-dark() {
|
|
215
215
|
100: hsl(358, 30%, 19%);
|
|
@@ -230,12 +230,12 @@
|
|
|
230
230
|
600: hsl(43, 84%, 18%);
|
|
231
231
|
}
|
|
232
232
|
.set-yellow-dark() {
|
|
233
|
-
100: hsl(43,
|
|
234
|
-
200: hsl(43,
|
|
235
|
-
300: hsl(43,
|
|
236
|
-
400: hsl(43,
|
|
237
|
-
500: hsl(43,
|
|
238
|
-
600: hsl(43,
|
|
233
|
+
100: hsl(43, 50%, 17%);
|
|
234
|
+
200: hsl(43, 50%, 28%);
|
|
235
|
+
300: hsl(43, 50%, 39%);
|
|
236
|
+
400: hsl(43, 90%, 75%);
|
|
237
|
+
500: hsl(43, 90%, 82%);
|
|
238
|
+
600: hsl(43, 90%, 91%);
|
|
239
239
|
}
|
|
240
240
|
.set-yellow-hc() {
|
|
241
241
|
100: hsl(41, 80%, 96%);
|
|
@@ -264,12 +264,12 @@
|
|
|
264
264
|
600: hsl(237, 50%, 32%);
|
|
265
265
|
}
|
|
266
266
|
.set-purple-dark() {
|
|
267
|
-
100: hsl(237,
|
|
268
|
-
200: hsl(237,
|
|
269
|
-
300: hsl(237,
|
|
270
|
-
400: hsl(237,
|
|
271
|
-
500: hsl(237,
|
|
272
|
-
600: hsl(237,
|
|
267
|
+
100: hsl(237, 43%, 37%);
|
|
268
|
+
200: hsl(237, 51%, 52%);
|
|
269
|
+
300: hsl(237, 63%, 62%);
|
|
270
|
+
400: hsl(237, 89%, 83%);
|
|
271
|
+
500: hsl(237, 89%, 89%);
|
|
272
|
+
600: hsl(237, 89%, 94%);
|
|
273
273
|
}
|
|
274
274
|
.set-purple-hc() {
|
|
275
275
|
100: hsl(237, 83%, 98%);
|
|
@@ -512,13 +512,18 @@
|
|
|
512
512
|
variable: hsl(62, 71%, 81%);
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
// Scrollbar (sets represents both light and dark mode)
|
|
516
515
|
.set-scrollbar() {
|
|
517
516
|
default: hsla(0, 0%, 0%, 0.2);
|
|
518
517
|
}
|
|
518
|
+
.set-scrollbar-dark() {
|
|
519
|
+
default: hsla(0, 0%, 100%, 0.2);
|
|
520
|
+
}
|
|
519
521
|
.set-scrollbar-hc() {
|
|
520
522
|
default: var(--black);
|
|
521
523
|
}
|
|
524
|
+
.set-scrollbar-hc-dark() {
|
|
525
|
+
default: var(--black);
|
|
526
|
+
}
|
|
522
527
|
|
|
523
528
|
// Color sets
|
|
524
529
|
.sets-mode() {
|
|
@@ -612,7 +617,7 @@
|
|
|
612
617
|
bs: .set-bs-dark();
|
|
613
618
|
focus-ring: .set-focus-dark();
|
|
614
619
|
highlight: .set-highlight-dark();
|
|
615
|
-
scrollbar: .set-scrollbar();
|
|
620
|
+
scrollbar: .set-scrollbar-dark();
|
|
616
621
|
}
|
|
617
622
|
|
|
618
623
|
.sets-utility-hc() {
|
|
@@ -628,7 +633,7 @@
|
|
|
628
633
|
bs: .set-bs-hc-dark();
|
|
629
634
|
focus-ring: .set-focus-hc();
|
|
630
635
|
highlight: .set-highlight-hc-dark();
|
|
631
|
-
scrollbar: .set-scrollbar-hc();
|
|
636
|
+
scrollbar: .set-scrollbar-hc-dark();
|
|
632
637
|
}
|
|
633
638
|
|
|
634
639
|
// Theme values
|
package/lib/test/test-utils.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { screen } from "@testing-library/dom";
|
|
|
3
3
|
import { visualDiff } from "@web/test-runner-visual-regression";
|
|
4
4
|
import type { TemplateResult } from "lit-html";
|
|
5
5
|
import axe from "axe-core";
|
|
6
|
-
import registerAxeAPCA from "
|
|
6
|
+
import registerAxeAPCA from "axe-apca";
|
|
7
7
|
|
|
8
8
|
const customConformanceThresholdFn = (fontSize: string): number | null => {
|
|
9
9
|
return parseFloat(fontSize) >= 32 ? 45 : 60;
|