@stackoverflow/stacks 2.0.2 → 2.0.4

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.
@@ -1,13 +1,7 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`atomic: border v1 > should output all v1 atomic css classes for colors 1`] = `
4
- "@media (prefers-color-scheme: dark) {
5
- }
6
-
7
- @media (prefers-color-scheme: dark) {
8
- }
9
-
10
- .bc-white-legacy-1 {
4
+ ".bc-white-legacy-1 {
11
5
  border-color: var(--black-legacy-500) !important;
12
6
  }
13
7
 
@@ -1,13 +1,7 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`atomic: color v1 > should output all v1 atomic css classes for colors 1`] = `
4
- "@media (prefers-color-scheme: dark) {
5
- }
6
-
7
- @media (prefers-color-scheme: dark) {
8
- }
9
-
10
- .fc-black-legacy-900,
4
+ ".fc-black-legacy-900,
11
5
  .h\\\\:fc-black-legacy-900:hover,
12
6
  .f\\\\:fc-black-legacy-900:focus,
13
7
  .f\\\\:fc-black-legacy-900:focus-within {
@@ -1,13 +1,7 @@
1
1
  // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
2
 
3
3
  exports[`atomic: border v1 > should output all v1 atomic css classes for colors 1`] = `
4
- "@media (prefers-color-scheme: dark) {
5
- }
6
-
7
- @media (prefers-color-scheme: dark) {
8
- }
9
-
10
- .fc-dark-legacy {
4
+ ".fc-dark-legacy {
11
5
  color: var(--fc-dark-legacy) !important;
12
6
  }
13
7
 
@@ -0,0 +1,48 @@
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 labelTemplate = ({ component, testid }: any) => {
7
+ return html`
8
+ <fieldset data-testid="${testid}" class="p8 ws3">${component}</fieldset>
9
+ `;
10
+ };
11
+
12
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
+ const getChildren = (status?: any) => {
14
+ const typeClass =
15
+ status && status !== "base" ? `s-label--status__${status}` : "";
16
+ return `
17
+ Example label
18
+ ${
19
+ status
20
+ ? `
21
+ <span class="s-label--status ${typeClass}">${
22
+ status ?? "no type"
23
+ }</span>
24
+ `
25
+ : ""
26
+ }
27
+ `;
28
+ };
29
+
30
+ describe("label", () => {
31
+ runComponentTests({
32
+ type: "a11y",
33
+ baseClass: `s-label`,
34
+ modifiers: {
35
+ primary: ["sm", "md", "lg", "xl"],
36
+ },
37
+ children: {
38
+ "default": getChildren(),
39
+ "status": getChildren("base"),
40
+ "status-beta": getChildren("beta"),
41
+ "status-new": getChildren("new"),
42
+ "status-required": getChildren("required"),
43
+ },
44
+ tag: "label",
45
+ template: ({ component, testid }) =>
46
+ labelTemplate({ component, testid }),
47
+ });
48
+ });
@@ -79,6 +79,7 @@
79
79
  vertical-align: text-bottom;
80
80
  }
81
81
 
82
+ // TODO we shouldn't support descriptions and messages within labels
82
83
  .s-description,
83
84
  .s-input-message {
84
85
  font-weight: normal;
@@ -0,0 +1,66 @@
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 labelTemplate = ({ component, testid, isDisabled }: any) => {
7
+ return html`
8
+ <fieldset
9
+ data-testid="${testid}"
10
+ class="p8 ws3"
11
+ ?disabled="${isDisabled}"
12
+ >
13
+ ${component}
14
+ </fieldset>
15
+ `;
16
+ };
17
+
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ const getChildren = (text: string, status?: any) => {
20
+ const typeClass =
21
+ status && status !== "base" ? `s-label--status__${status}` : "";
22
+ return `
23
+ ${text}
24
+ ${
25
+ status
26
+ ? `
27
+ <span class="s-label--status ${typeClass}">${
28
+ status ?? "no type"
29
+ }</span>
30
+ `
31
+ : ""
32
+ }
33
+ `;
34
+ };
35
+
36
+ describe("label", () => {
37
+ [true, false].forEach((isDisabled) => {
38
+ const text = isDisabled ? "Disabled label" : "Example label";
39
+
40
+ runComponentTests({
41
+ type: "visual",
42
+ baseClass: `s-label`,
43
+ modifiers: {
44
+ primary: ["sm", "md", "lg", "xl"],
45
+ },
46
+ children: isDisabled
47
+ ? {
48
+ "disabled": getChildren(text),
49
+ "disabled-status": getChildren(text, "base"),
50
+ "disabled-status-beta": getChildren(text, "beta"),
51
+ "disabled-status-new": getChildren(text, "new"),
52
+ "disabled-status-required": getChildren(text, "required"),
53
+ }
54
+ : {
55
+ "default": getChildren(text),
56
+ "status": getChildren(text, "base"),
57
+ "status-beta": getChildren(text, "beta"),
58
+ "status-new": getChildren(text, "new"),
59
+ "status-required": getChildren(text, "required"),
60
+ },
61
+ tag: "label",
62
+ template: ({ component, testid }) =>
63
+ labelTemplate({ component, testid, isDisabled }),
64
+ });
65
+ });
66
+ });
@@ -0,0 +1,40 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ describe("menu", () => {
6
+ runComponentTests({
7
+ type: "a11y",
8
+ baseClass: `s-menu`,
9
+ children: {
10
+ default: `
11
+ <li class="s-menu--title" role="separator">Title 1</li>
12
+ <li role="menuitem">
13
+ <a href="#" class="s-block-link">Example li</a>
14
+ </li>
15
+ <li class="s-menu--title" role="separator">Title 2</li>
16
+ <li role="menuitem">
17
+ <a href="#" class="s-block-link s-block-link__left is-selected">Selected link</a>
18
+ </li>
19
+ <li role="menuitem">
20
+ <a href="#" class="s-block-link">Example li</a>
21
+ </li>
22
+ <li role="menuitem" class="s-menu--label">Example label</li>
23
+ <li role="menuitem">
24
+ <a href="#" class="s-block-link">Block link</a>
25
+ </li>
26
+ <li class="s-menu--divider" role="separator"></li>
27
+ <li role="menuitem">
28
+ <a href="…" class="s-block-link s-block-link__danger">Danger link</a>
29
+ </li>
30
+ `,
31
+ },
32
+ tag: "ul",
33
+ attributes: {
34
+ role: "menu",
35
+ },
36
+ template: ({ component, testid }) => html`
37
+ <div class="ws2" data-testid="${testid}">${component}</div>
38
+ `,
39
+ });
40
+ });
@@ -0,0 +1,40 @@
1
+ import { html } from "@open-wc/testing";
2
+ import { runComponentTests } from "../../test/test-utils";
3
+ import "../../index";
4
+
5
+ describe("menu", () => {
6
+ runComponentTests({
7
+ type: "visual",
8
+ baseClass: `s-menu`,
9
+ children: {
10
+ default: `
11
+ <li class="s-menu--title" role="separator">Title 1</li>
12
+ <li role="menuitem">
13
+ <a href="#" class="s-block-link">Example li</a>
14
+ </li>
15
+ <li class="s-menu--title" role="separator">Title 2</li>
16
+ <li role="menuitem">
17
+ <a href="#" class="s-block-link s-block-link__left is-selected">Selected link</a>
18
+ </li>
19
+ <li role="menuitem">
20
+ <a href="#" class="s-block-link">Example li</a>
21
+ </li>
22
+ <li role="menuitem" class="s-menu--label">Example label</li>
23
+ <li role="menuitem">
24
+ <a href="#" class="s-block-link">Block link</a>
25
+ </li>
26
+ <li class="s-menu--divider" role="separator"></li>
27
+ <li role="menuitem">
28
+ <a href="…" class="s-block-link s-block-link__danger">Danger link</a>
29
+ </li>
30
+ `,
31
+ },
32
+ tag: "ul",
33
+ attributes: {
34
+ role: "menu",
35
+ },
36
+ template: ({ component, testid }) => html`
37
+ <div class="ws2" data-testid="${testid}">${component}</div>
38
+ `,
39
+ });
40
+ });
@@ -22,7 +22,6 @@
22
22
 
23
23
  // MODIFIERS
24
24
  &&__celebration {
25
- --_mo-close-t: var(--su48);
26
25
  --_mo-dialog-pt: var(--su64);
27
26
 
28
27
  .s-modal--dialog {
@@ -109,9 +109,9 @@
109
109
  --_ta-bg-selected: var(--orange-500);
110
110
  });
111
111
 
112
- --_ta-bc: var(--orange-200);
112
+ --_ta-bc: var(--orange-300);
113
113
  --_ta-bg: var(--orange-100);
114
- --_ta-fc: var(--orange-500);
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));
@@ -320,12 +320,12 @@ body .themed {
320
320
  --red-400: hsl(0, 60%, 49%);
321
321
  --red-500: hsl(0, 65%, 37%);
322
322
  --red-600: hsl(0, 65%, 22%);
323
- --yellow-100: hsl(43, 80%, 96%);
324
- --yellow-200: hsl(43, 80%, 88%);
323
+ --yellow-100: hsl(43, 85%, 95%);
324
+ --yellow-200: hsl(43, 85%, 88%);
325
325
  --yellow-300: hsl(43, 85%, 72%);
326
326
  --yellow-400: hsl(43, 85%, 50%);
327
327
  --yellow-500: hsl(43, 85%, 33%);
328
- --yellow-600: hsl(43, 84%, 18%);
328
+ --yellow-600: hsl(43, 85%, 18%);
329
329
  --purple-100: hsl(237, 83%, 98%);
330
330
  --purple-200: hsl(237, 78%, 93%);
331
331
  --purple-300: hsl(237, 60%, 83%);
@@ -108,12 +108,12 @@ body:not(.theme-highcontrast).theme-system .theme-light__forced .themed {
108
108
  --red-400: hsl(0, 60%, 49%);
109
109
  --red-500: hsl(0, 65%, 37%);
110
110
  --red-600: hsl(0, 65%, 22%);
111
- --yellow-100: hsl(43, 80%, 96%);
112
- --yellow-200: hsl(43, 80%, 88%);
111
+ --yellow-100: hsl(43, 85%, 95%);
112
+ --yellow-200: hsl(43, 85%, 88%);
113
113
  --yellow-300: hsl(43, 85%, 72%);
114
114
  --yellow-400: hsl(43, 85%, 50%);
115
115
  --yellow-500: hsl(43, 85%, 33%);
116
- --yellow-600: hsl(43, 84%, 18%);
116
+ --yellow-600: hsl(43, 85%, 18%);
117
117
  --purple-100: hsl(237, 83%, 98%);
118
118
  --purple-200: hsl(237, 78%, 93%);
119
119
  --purple-300: hsl(237, 60%, 83%);
@@ -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, 29%, 19%);
215
- --orange-200: hsl(27, 43%, 31%);
216
- --orange-300: hsl(27, 43%, 47%);
217
- --orange-400: hsl(27, 80%, 72%);
218
- --orange-500: hsl(27, 80%, 83%);
219
- --orange-600: hsl(27, 80%, 93%);
220
- --blue-100: hsl(209, 29%, 19%);
221
- --blue-200: hsl(210, 29%, 35%);
222
- --blue-300: hsl(210, 29%, 50%);
223
- --blue-400: hsl(210, 80%, 75%);
224
- --blue-500: hsl(210, 80%, 83%);
225
- --blue-600: hsl(210, 80%, 93%);
226
- --green-100: hsl(148, 29%, 19%);
227
- --green-200: hsl(148, 29%, 27%);
228
- --green-300: hsl(148, 25%, 40%);
229
- --green-400: hsl(148, 40%, 68%);
230
- --green-500: hsl(148, 40%, 80%);
231
- --green-600: hsl(148, 40%, 93%);
232
- --red-100: hsl(358, 29%, 19%);
233
- --red-200: hsl(0, 29%, 37%);
234
- --red-300: hsl(0, 34%, 54%);
235
- --red-400: hsl(0, 73%, 80%);
236
- --red-500: hsl(0, 73%, 88%);
237
- --red-600: hsl(0, 73%, 95%);
238
- --yellow-100: hsl(43, 29%, 17%);
239
- --yellow-200: hsl(43, 29%, 25%);
240
- --yellow-300: hsl(43, 29%, 40%);
241
- --yellow-400: hsl(43, 75%, 75%);
242
- --yellow-500: hsl(43, 75%, 82%);
243
- --yellow-600: hsl(43, 75%, 91%);
244
- --purple-100: hsl(237, 24%, 23%);
245
- --purple-200: hsl(237, 27%, 34%);
246
- --purple-300: hsl(237, 32%, 56%);
247
- --purple-400: hsl(237, 60%, 82%);
248
- --purple-500: hsl(237, 60%, 88%);
249
- --purple-600: hsl(237, 65%, 96%);
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%, 0%, 0.2);
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, 29%, 19%);
340
- --orange-200: hsl(27, 43%, 31%);
341
- --orange-300: hsl(27, 43%, 47%);
342
- --orange-400: hsl(27, 80%, 72%);
343
- --orange-500: hsl(27, 80%, 83%);
344
- --orange-600: hsl(27, 80%, 93%);
345
- --blue-100: hsl(209, 29%, 19%);
346
- --blue-200: hsl(210, 29%, 35%);
347
- --blue-300: hsl(210, 29%, 50%);
348
- --blue-400: hsl(210, 80%, 75%);
349
- --blue-500: hsl(210, 80%, 83%);
350
- --blue-600: hsl(210, 80%, 93%);
351
- --green-100: hsl(148, 29%, 19%);
352
- --green-200: hsl(148, 29%, 27%);
353
- --green-300: hsl(148, 25%, 40%);
354
- --green-400: hsl(148, 40%, 68%);
355
- --green-500: hsl(148, 40%, 80%);
356
- --green-600: hsl(148, 40%, 93%);
357
- --red-100: hsl(358, 29%, 19%);
358
- --red-200: hsl(0, 29%, 37%);
359
- --red-300: hsl(0, 34%, 54%);
360
- --red-400: hsl(0, 73%, 80%);
361
- --red-500: hsl(0, 73%, 88%);
362
- --red-600: hsl(0, 73%, 95%);
363
- --yellow-100: hsl(43, 29%, 17%);
364
- --yellow-200: hsl(43, 29%, 25%);
365
- --yellow-300: hsl(43, 29%, 40%);
366
- --yellow-400: hsl(43, 75%, 75%);
367
- --yellow-500: hsl(43, 75%, 82%);
368
- --yellow-600: hsl(43, 75%, 91%);
369
- --purple-100: hsl(237, 24%, 23%);
370
- --purple-200: hsl(237, 27%, 34%);
371
- --purple-300: hsl(237, 32%, 56%);
372
- --purple-400: hsl(237, 60%, 82%);
373
- --purple-500: hsl(237, 60%, 88%);
374
- --purple-600: hsl(237, 65%, 96%);
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%, 0%, 0.2);
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));
@@ -485,8 +485,8 @@ body.theme-highcontrast.theme-system .theme-light__forced {
485
485
  --red-400: hsl(0, 65%, 37%);
486
486
  --red-500: hsl(0, 65%, 22%);
487
487
  --red-600: hsl(0, 65%, 22%);
488
- --yellow-100: hsl(41, 80%, 96%);
489
- --yellow-200: hsl(41, 80%, 96%);
488
+ --yellow-100: hsl(41, 85%, 95%);
489
+ --yellow-200: hsl(41, 85%, 95%);
490
490
  --yellow-300: hsl(43, 85%, 50%);
491
491
  --yellow-400: hsl(43, 85%, 50%);
492
492
  --yellow-500: hsl(48, 85%, 18%);