@stackoverflow/stacks 2.0.8 → 2.1.0-rc.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.
Files changed (103) hide show
  1. package/LICENSE.MD +1 -1
  2. package/README.md +7 -9
  3. package/dist/css/stacks.css +234 -214
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +1 -1
  6. package/lib/atomic/misc.less +1 -1
  7. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +2 -3
  8. package/lib/components/activity-indicator/activity-indicator.less +5 -5
  9. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +2 -3
  10. package/lib/components/anchor/anchor.a11y.test.ts +2 -4
  11. package/lib/components/anchor/anchor.visual.test.ts +2 -4
  12. package/lib/components/avatar/avatar.a11y.test.ts +2 -3
  13. package/lib/components/avatar/avatar.visual.test.ts +2 -3
  14. package/lib/components/award-bling/award-bling.a11y.test.ts +2 -4
  15. package/lib/components/award-bling/award-bling.visual.test.ts +2 -4
  16. package/lib/components/badge/badge.a11y.test.ts +7 -16
  17. package/lib/components/badge/badge.visual.test.ts +8 -21
  18. package/lib/components/banner/banner.a11y.test.ts +2 -3
  19. package/lib/components/banner/banner.visual.test.ts +2 -3
  20. package/lib/components/block-link/block-link.a11y.test.ts +4 -9
  21. package/lib/components/block-link/block-link.less +7 -10
  22. package/lib/components/block-link/block-link.visual.test.ts +4 -9
  23. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +2 -3
  24. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +2 -3
  25. package/lib/components/button/button.a11y.test.ts +2 -3
  26. package/lib/components/button/button.less +70 -35
  27. package/lib/components/button/button.visual.test.ts +2 -3
  28. package/lib/components/card/card.a11y.test.ts +2 -3
  29. package/lib/components/card/card.visual.test.ts +3 -6
  30. package/lib/components/check-control/check-control.a11y.test.ts +2 -4
  31. package/lib/components/check-control/check-control.visual.test.ts +2 -4
  32. package/lib/components/check-group/check-group.a11y.test.ts +2 -4
  33. package/lib/components/check-group/check-group.visual.test.ts +2 -4
  34. package/lib/components/checkbox_radio/checkbox_radio.a11y.test.ts +2 -4
  35. package/lib/components/checkbox_radio/checkbox_radio.less +1 -13
  36. package/lib/components/checkbox_radio/checkbox_radio.visual.test.ts +2 -4
  37. package/lib/components/code-block/code-block.a11y.test.ts +2 -4
  38. package/lib/components/code-block/code-block.visual.test.ts +2 -4
  39. package/lib/components/description/description.a11y.test.ts +2 -4
  40. package/lib/components/description/description.visual.test.ts +2 -4
  41. package/lib/components/empty-state/empty-state.a11y.test.ts +2 -3
  42. package/lib/components/empty-state/empty-state.visual.test.ts +2 -3
  43. package/lib/components/expandable/expandable.a11y.test.ts +2 -3
  44. package/lib/components/expandable/expandable.visual.test.ts +2 -3
  45. package/lib/components/input-fill/input-fill.a11y.test.ts +2 -3
  46. package/lib/components/input-fill/input-fill.visual.test.ts +2 -3
  47. package/lib/components/input-message/input-message.a11y.test.ts +2 -3
  48. package/lib/components/input-message/input-message.visual.test.ts +2 -3
  49. package/lib/components/input_textarea/input_textarea.a11y.test.ts +4 -7
  50. package/lib/components/input_textarea/input_textarea.less +2 -20
  51. package/lib/components/input_textarea/input_textarea.visual.test.ts +4 -7
  52. package/lib/components/label/label.a11y.test.ts +2 -3
  53. package/lib/components/label/label.visual.test.ts +2 -3
  54. package/lib/components/link/link.a11y.test.ts +2 -3
  55. package/lib/components/link/link.visual.test.ts +2 -3
  56. package/lib/components/link-preview/link-preview.a11y.test.ts +2 -3
  57. package/lib/components/link-preview/link-preview.visual.test.ts +3 -3
  58. package/lib/components/menu/menu.a11y.test.ts +2 -3
  59. package/lib/components/menu/menu.visual.test.ts +2 -3
  60. package/lib/components/modal/modal.a11y.test.ts +2 -3
  61. package/lib/components/modal/modal.visual.test.ts +2 -3
  62. package/lib/components/navigation/navigation.a11y.test.ts +2 -3
  63. package/lib/components/navigation/navigation.less +3 -1
  64. package/lib/components/navigation/navigation.visual.test.ts +3 -6
  65. package/lib/components/notice/notice.a11y.test.ts +2 -3
  66. package/lib/components/notice/notice.visual.test.ts +2 -3
  67. package/lib/components/page-title/page-title.a11y.test.ts +2 -3
  68. package/lib/components/page-title/page-title.visual.test.ts +2 -3
  69. package/lib/components/pagination/pagination.a11y.test.ts +2 -3
  70. package/lib/components/pagination/pagination.less +9 -0
  71. package/lib/components/pagination/pagination.visual.test.ts +2 -3
  72. package/lib/components/progress-bar/progress-bar.a11y.test.ts +7 -18
  73. package/lib/components/progress-bar/progress-bar.less +1 -1
  74. package/lib/components/progress-bar/progress-bar.visual.test.ts +7 -18
  75. package/lib/components/select/select.less +1 -15
  76. package/lib/components/spinner/spinner.a11y.test.ts +2 -3
  77. package/lib/components/spinner/spinner.visual.test.ts +4 -7
  78. package/lib/components/table/table.a11y.test.ts +3 -4
  79. package/lib/components/table/table.visual.test.ts +2 -3
  80. package/lib/components/tag/tag.a11y.test.ts +2 -3
  81. package/lib/components/tag/tag.less +27 -21
  82. package/lib/components/tag/tag.visual.test.ts +3 -6
  83. package/lib/components/toast/toast.a11y.test.ts +2 -3
  84. package/lib/components/toast/toast.visual.test.ts +2 -3
  85. package/lib/components/toggle-switch/toggle-switch.a11y.test.ts +3 -6
  86. package/lib/components/toggle-switch/toggle-switch.less +5 -16
  87. package/lib/components/toggle-switch/toggle-switch.visual.test.ts +3 -7
  88. package/lib/components/topbar/topbar.less +61 -39
  89. package/lib/components/topbar/topbar.visual.test.ts +188 -0
  90. package/lib/components/uploader/uploader.less +1 -1
  91. package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +12 -0
  92. package/lib/exports/__snapshots__/color.less.test.ts.snap +45 -0
  93. package/lib/exports/color-mixins.less +2 -0
  94. package/lib/exports/color-sets.less +44 -7
  95. package/lib/exports/mixins.less +33 -0
  96. package/lib/input-utils.less +0 -3
  97. package/lib/test/a11y-test-utils.ts +94 -0
  98. package/lib/test/assertions.ts +10 -3
  99. package/lib/test/test-utils.ts +152 -300
  100. package/lib/test/visual-test-utils.ts +58 -0
  101. package/lib/tsconfig.json +3 -3
  102. package/package.json +12 -13
  103. package/lib/components/popover/tooltip.visual.test.ts +0 -31
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  const states = [
@@ -28,8 +28,7 @@ const states = [
28
28
 
29
29
  describe("input-message", () => {
30
30
  states.forEach((state) => {
31
- runComponentTests({
32
- type: "a11y",
31
+ runA11yTests({
33
32
  baseClass: `s-input-message ${
34
33
  state.class ? `state-${state.class}` : ""
35
34
  }`,
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  const states = [
@@ -29,8 +29,7 @@ const states = [
29
29
 
30
30
  describe("input-message", () => {
31
31
  states.forEach((state) => {
32
- runComponentTests({
33
- type: "visual",
32
+ runVisualTests({
34
33
  baseClass: `s-input-message ${
35
34
  state.class ? `state-${state.class}` : ""
36
35
  }`,
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // TODO note: all accessibility tests here are skipped currently. Revisit in Stacks v2
@@ -34,8 +34,7 @@ const otherModifiers = ["creditcard", "search"];
34
34
 
35
35
  describe(type, () => {
36
36
  // Base styles w/ value, modifiers
37
- runComponentTests({
38
- type: "a11y",
37
+ runA11yTests({
39
38
  baseClass: `s-${type}`,
40
39
  modifiers: {
41
40
  primary: [...sizes, ...otherModifiers],
@@ -59,8 +58,7 @@ const otherModifiers = ["creditcard", "search"];
59
58
  customAttributes.forEach((attributes) => {
60
59
  const attrString = Object.keys(attributes).sort().join("-");
61
60
 
62
- runComponentTests({
63
- type: "a11y",
61
+ runA11yTests({
64
62
  baseClass: `s-${type} ${attrString}`,
65
63
  tag: type,
66
64
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -88,8 +86,7 @@ const otherModifiers = ["creditcard", "search"];
88
86
 
89
87
  // w/ state classes
90
88
  states.forEach((state) => {
91
- runComponentTests({
92
- type: "a11y",
89
+ runA11yTests({
93
90
  baseClass: `s-${type} state-${state}`,
94
91
  tag: type,
95
92
  attributes:
@@ -1,13 +1,10 @@
1
1
  .s-input,
2
2
  .s-textarea {
3
3
  --_in-bc: var(--bc-darker);
4
- --_in-bc-focus: var(--theme-secondary-400);
5
4
  --_in-bg: var(--white);
6
5
  --_in-br: var(--br-md);
7
- --_in-bs-focus: 0 0 0 var(--su-static4) var(--focus-ring);
8
6
  --_in-c: unset;
9
7
  --_in-fc: var(--fc-dark);
10
- --_in-fc-focus: var(--black);
11
8
  --_in-fs: var(--fs-body1);
12
9
  --_in-o: unset;
13
10
  --_in-px: 0.7em;
@@ -52,7 +49,6 @@
52
49
  --_in-bg: var(--black-150);
53
50
  --_in-bc: var(--bc-light);
54
51
  --_in-fc: var(--black-300);
55
- --_in-fc-focus: var(--_in-fc);
56
52
  }
57
53
 
58
54
  .validation-states(
@@ -106,11 +102,8 @@
106
102
  }
107
103
 
108
104
  // INTERACTION
109
- &:focus{
110
- border-color: var(--_in-bc-focus);
111
- box-shadow: var(--_in-bs-focus);
112
- color: var(--_in-fc-focus);
113
- outline: 0;
105
+ &:focus {
106
+ .focus-styles();
114
107
  }
115
108
 
116
109
  @scrollbar-styles();
@@ -134,17 +127,6 @@
134
127
  padding-right: var(--su32);
135
128
  });
136
129
 
137
- &:focus-within {
138
- .highcontrast-mode({
139
- --_in-bc-focus: var(--black);
140
- });
141
-
142
- border-color: var(--_in-bc-focus);
143
- box-shadow: var(--_in-bs-focus);
144
- color: var(--_in-fc-focus);
145
- outline: 0;
146
- }
147
-
148
130
  &&__md {
149
131
  --_in-py: 0.5em;
150
132
  }
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -31,8 +31,7 @@ const otherModifiers = ["creditcard", "search"];
31
31
 
32
32
  describe(type, () => {
33
33
  // Base styles w/ value, modifiers
34
- runComponentTests({
35
- type: "visual",
34
+ runVisualTests({
36
35
  baseClass: `s-${type}`,
37
36
  modifiers: {
38
37
  primary: [...sizes, ...otherModifiers],
@@ -65,8 +64,7 @@ const otherModifiers = ["creditcard", "search"];
65
64
  };
66
65
  }
67
66
  }
68
- runComponentTests({
69
- type: "visual",
67
+ runVisualTests({
70
68
  baseClass: `s-${type} ${attrString}`,
71
69
  tag: type,
72
70
  attributes: attr,
@@ -77,8 +75,7 @@ const otherModifiers = ["creditcard", "search"];
77
75
 
78
76
  // w/ state classes; .is-readonly
79
77
  states.forEach((state) => {
80
- runComponentTests({
81
- type: "visual",
78
+ runVisualTests({
82
79
  baseClass: `s-${type} state-${state}`,
83
80
  tag: type,
84
81
  attributes:
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -28,8 +28,7 @@ const getChildren = (status?: any) => {
28
28
  };
29
29
 
30
30
  describe("label", () => {
31
- runComponentTests({
32
- type: "a11y",
31
+ runA11yTests({
33
32
  baseClass: `s-label`,
34
33
  modifiers: {
35
34
  primary: ["sm", "md", "lg", "xl"],
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -37,8 +37,7 @@ describe("label", () => {
37
37
  [true, false].forEach((isDisabled) => {
38
38
  const text = isDisabled ? "Disabled label" : "Example label";
39
39
 
40
- runComponentTests({
41
- type: "visual",
40
+ runVisualTests({
42
41
  baseClass: `s-label`,
43
42
  modifiers: {
44
43
  primary: ["sm", "md", "lg", "xl"],
@@ -1,10 +1,9 @@
1
- import { runComponentTests } from "../../test/test-utils";
1
+ import { runA11yTests } from "../../test/a11y-test-utils";
2
2
  import "../../index";
3
3
 
4
4
  describe("link", () => {
5
5
  // TODO check for visited styling
6
- runComponentTests({
7
- type: "a11y",
6
+ runA11yTests({
8
7
  baseClass: "s-link",
9
8
  modifiers: {
10
9
  primary: [
@@ -1,11 +1,10 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  describe("link", () => {
6
6
  // TODO check for visited styling
7
- runComponentTests({
8
- type: "visual",
7
+ runVisualTests({
9
8
  baseClass: "s-link",
10
9
  modifiers: {
11
10
  primary: [
@@ -1,4 +1,4 @@
1
- import { runComponentTests } from "../../test/test-utils";
1
+ import { runA11yTests } from "../../test/a11y-test-utils";
2
2
  import "../../index";
3
3
 
4
4
  const getChild = (child?: string): string => {
@@ -33,8 +33,7 @@ const getChild = (child?: string): string => {
33
33
  `;
34
34
  };
35
35
  describe("link preview", () => {
36
- runComponentTests({
37
- type: "a11y",
36
+ runA11yTests({
38
37
  baseClass: "s-link-preview",
39
38
  children: {
40
39
  default: getChild(),
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  const getChild = (child?: string): string => {
@@ -33,9 +33,9 @@ const getChild = (child?: string): string => {
33
33
  </div>
34
34
  `;
35
35
  };
36
+
36
37
  describe("link preview", () => {
37
- runComponentTests({
38
- type: "visual",
38
+ runVisualTests({
39
39
  baseClass: "s-link-preview",
40
40
  children: {
41
41
  default: getChild(),
@@ -1,10 +1,9 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  describe("menu", () => {
6
- runComponentTests({
7
- type: "a11y",
6
+ runA11yTests({
8
7
  baseClass: `s-menu`,
9
8
  children: {
10
9
  default: `
@@ -1,10 +1,9 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  describe("menu", () => {
6
- runComponentTests({
7
- type: "visual",
6
+ runVisualTests({
8
7
  baseClass: `s-menu`,
9
8
  children: {
10
9
  default: `
@@ -1,11 +1,10 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import { IconClearSm } from "@stackoverflow/stacks-icons/icons";
4
4
  import "../../index";
5
5
 
6
6
  describe("modal", () => {
7
- runComponentTests({
8
- type: "a11y",
7
+ runA11yTests({
9
8
  baseClass: `s-modal`,
10
9
  variants: ["danger"],
11
10
  modifiers: {
@@ -1,11 +1,10 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import { IconClearSm } from "@stackoverflow/stacks-icons/icons";
4
4
  import "../../index";
5
5
 
6
6
  describe("modal", () => {
7
- runComponentTests({
8
- type: "visual",
7
+ runVisualTests({
9
8
  baseClass: `s-modal`,
10
9
  variants: ["danger"],
11
10
  modifiers: {
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import { WCAGNonTextContrast } from "../../test/assertions";
4
4
  import "../../index";
5
5
 
@@ -55,8 +55,7 @@ const getChildren = (includeTitles = false): string =>
55
55
  .join("");
56
56
 
57
57
  describe("navigation", () => {
58
- runComponentTests({
59
- type: "a11y",
58
+ runA11yTests({
60
59
  baseClass: "s-navigation",
61
60
  variants: ["vertical", "muted"],
62
61
  modifiers: {
@@ -91,7 +91,9 @@
91
91
  color: var(--_na-item-fc-hover);
92
92
  }
93
93
 
94
- @focus-styles();
94
+ &:focus-visible {
95
+ .focus-styles(true);
96
+ }
95
97
 
96
98
  background-color: var(--_na-item-bg);
97
99
  color: var(--_na-item-fc);
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { defaultOptions, runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  const items = [
@@ -54,8 +54,7 @@ const getChildren = (includeTitles = false): string =>
54
54
  .join("");
55
55
 
56
56
  describe("navigation", () => {
57
- runComponentTests({
58
- type: "visual",
57
+ runVisualTests({
59
58
  baseClass: "s-navigation",
60
59
  variants: ["muted"],
61
60
  modifiers: {
@@ -76,8 +75,7 @@ describe("navigation", () => {
76
75
  `,
77
76
  });
78
77
 
79
- runComponentTests({
80
- type: "visual",
78
+ runVisualTests({
81
79
  baseClass: "s-navigation",
82
80
  variants: ["vertical"],
83
81
  tag: "ul",
@@ -94,7 +92,6 @@ describe("navigation", () => {
94
92
  </nav>
95
93
  `,
96
94
  options: {
97
- ...defaultOptions,
98
95
  includeNullVariant: false,
99
96
  },
100
97
  });
@@ -1,9 +1,8 @@
1
- import { runComponentTests } from "../../test/test-utils";
1
+ import { runA11yTests } from "../../test/a11y-test-utils";
2
2
  import "../../index";
3
3
 
4
4
  describe("notice", () => {
5
- runComponentTests({
6
- type: "a11y",
5
+ runA11yTests({
7
6
  baseClass: "s-notice",
8
7
  variants: ["info", "success", "warning", "danger"],
9
8
  modifiers: {
@@ -1,10 +1,9 @@
1
- import { runComponentTests } from "../../test/test-utils";
1
+ import { runVisualTests } from "../../test/visual-test-utils";
2
2
  import { html } from "@open-wc/testing";
3
3
  import "../../index";
4
4
 
5
5
  describe("notice", () => {
6
- runComponentTests({
7
- type: "visual",
6
+ runVisualTests({
8
7
  baseClass: "s-notice",
9
8
  variants: ["info", "success", "warning", "danger"],
10
9
  modifiers: {
@@ -1,10 +1,9 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runA11yTests } from "../../test/a11y-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  describe("page title", () => {
6
- runComponentTests({
7
- type: "a11y",
6
+ runA11yTests({
8
7
  baseClass: "s-page-title",
9
8
  children: {
10
9
  default: `
@@ -1,5 +1,5 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -47,8 +47,7 @@ const getChildren = ({
47
47
  `;
48
48
 
49
49
  describe("page title", () => {
50
- runComponentTests({
51
- type: "visual",
50
+ runVisualTests({
52
51
  baseClass: "s-page-title",
53
52
  children: {
54
53
  default: getChildren({ showEverything: false }),
@@ -1,10 +1,9 @@
1
- import { runComponentTests } from "../../test/test-utils";
1
+ import { runA11yTests } from "../../test/a11y-test-utils";
2
2
  import { WCAGNonTextContrast } from "../../test/assertions";
3
3
  import "../../index";
4
4
 
5
5
  describe("pagination", () => {
6
- runComponentTests({
7
- type: "a11y",
6
+ runA11yTests({
8
7
  baseClass: "s-pagination",
9
8
  children: {
10
9
  default: `
@@ -3,6 +3,8 @@
3
3
  --_pa-item-bg: transparent;
4
4
  --_pa-item-bc: var(--bc-darker);
5
5
  --_pa-item-fc: var(--fc-medium);
6
+ --_pa-item-bg-focus: var(--black-400);
7
+ --_pa-item-fc-focus: var(--white);
6
8
  --_pa-item-bg-hover: var(--black-225);
7
9
  --_pa-item-bc-hover: var(--bc-darker);
8
10
  --_pa-item-fc-hover: var(--fc-dark);
@@ -15,6 +17,7 @@
15
17
  --_pa-item-bg: var(--theme-primary);
16
18
  --_pa-item-bc: transparent;
17
19
  --_pa-item-fc: var(--white);
20
+ --_pa-item-bg-focus: var(--theme-primary-400);
18
21
  }
19
22
  &.s-pagination--item__clear {
20
23
  --_pa-item-bg: transparent;
@@ -36,6 +39,12 @@
36
39
  color: var(--_pa-item-fc-hover);
37
40
  }
38
41
 
42
+ &:focus-visible {
43
+ background-color: var(--_pa-item-bg-focus);
44
+ color: var(--_pa-item-fc-focus);
45
+ .focus-styles(true, true);
46
+ }
47
+
39
48
  background-color: var(--_pa-item-bg);
40
49
  border: 1px solid var(--_pa-item-bc);
41
50
  color: var(--_pa-item-fc);
@@ -1,10 +1,9 @@
1
1
  import { html } from "@open-wc/testing";
2
- import { runComponentTests } from "../../test/test-utils";
2
+ import { runVisualTests } from "../../test/visual-test-utils";
3
3
  import "../../index";
4
4
 
5
5
  describe("pagination", () => {
6
- runComponentTests({
7
- type: "visual",
6
+ runVisualTests({
8
7
  baseClass: "s-pagination",
9
8
  children: {
10
9
  default: `
@@ -3,7 +3,7 @@ import {
3
3
  IconAchievementsSm,
4
4
  IconCheckmarkSm,
5
5
  } from "@stackoverflow/stacks-icons/icons";
6
- import { defaultOptions, runComponentTests } from "../../test/test-utils";
6
+ import { runA11yTests } from "../../test/a11y-test-utils";
7
7
  import "../../index";
8
8
 
9
9
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -97,8 +97,7 @@ const getChildren = (type: string) => {
97
97
  };
98
98
  describe("progress-bar", () => {
99
99
  // Base
100
- runComponentTests({
101
- type: "a11y",
100
+ runA11yTests({
102
101
  baseClass: "s-progress",
103
102
  variants: ["brand", "info"],
104
103
  children: {
@@ -108,8 +107,7 @@ describe("progress-bar", () => {
108
107
  });
109
108
 
110
109
  // Badge
111
- runComponentTests({
112
- type: "a11y",
110
+ runA11yTests({
113
111
  baseClass: "s-progress",
114
112
  variants: ["badge"],
115
113
  modifiers: {
@@ -120,15 +118,13 @@ describe("progress-bar", () => {
120
118
  },
121
119
  template,
122
120
  options: {
123
- ...defaultOptions,
124
121
  includeNullVariant: false,
125
122
  includeNullModifier: false,
126
123
  },
127
124
  });
128
125
 
129
126
  // Circular
130
- runComponentTests({
131
- type: "a11y",
127
+ runA11yTests({
132
128
  baseClass: "s-progress",
133
129
  variants: ["circular"],
134
130
  modifiers: {
@@ -142,15 +138,13 @@ describe("progress-bar", () => {
142
138
  style: "--s-progress-value: .75",
143
139
  },
144
140
  options: {
145
- ...defaultOptions,
146
141
  includeNullVariant: false,
147
142
  includeNullModifier: false,
148
143
  },
149
144
  });
150
145
 
151
146
  // Privilege
152
- runComponentTests({
153
- type: "a11y",
147
+ runA11yTests({
154
148
  baseClass: "s-progress",
155
149
  variants: ["privilege"],
156
150
  children: {
@@ -158,14 +152,12 @@ describe("progress-bar", () => {
158
152
  },
159
153
  template,
160
154
  options: {
161
- ...defaultOptions,
162
155
  includeNullVariant: false,
163
156
  },
164
157
  });
165
158
 
166
159
  // Segmented
167
- runComponentTests({
168
- type: "a11y",
160
+ runA11yTests({
169
161
  baseClass: "s-progress",
170
162
  variants: ["segmented"],
171
163
  children: {
@@ -173,14 +165,12 @@ describe("progress-bar", () => {
173
165
  },
174
166
  template,
175
167
  options: {
176
- ...defaultOptions,
177
168
  includeNullVariant: false,
178
169
  },
179
170
  });
180
171
 
181
172
  // Stepped
182
- runComponentTests({
183
- type: "a11y",
173
+ runA11yTests({
184
174
  baseClass: "s-progress",
185
175
  variants: ["stepped"],
186
176
  children: {
@@ -192,7 +182,6 @@ describe("progress-bar", () => {
192
182
  </div>
193
183
  `,
194
184
  options: {
195
- ...defaultOptions,
196
185
  includeNullVariant: false,
197
186
  },
198
187
  // TODO add skipped test ids
@@ -170,7 +170,7 @@
170
170
 
171
171
  &--stop {
172
172
  background: var(--theme-secondary-400);
173
- box-shadow: 0 0 0 var(--su-static6) var(--focus-ring);
173
+ box-shadow: 0 0 0 var(--su-static6) var(--translucent-secondary);
174
174
  }
175
175
  }
176
176
  }