@stackoverflow/stacks 2.0.9 → 2.1.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.
- package/LICENSE.MD +1 -1
- package/README.md +7 -9
- package/dist/css/stacks.css +193 -206
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +1 -1
- package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +2 -3
- package/lib/components/activity-indicator/activity-indicator.visual.test.ts +2 -3
- package/lib/components/anchor/anchor.a11y.test.ts +2 -4
- package/lib/components/anchor/anchor.visual.test.ts +2 -4
- package/lib/components/avatar/avatar.a11y.test.ts +2 -3
- package/lib/components/avatar/avatar.visual.test.ts +2 -3
- package/lib/components/award-bling/award-bling.a11y.test.ts +2 -4
- package/lib/components/award-bling/award-bling.visual.test.ts +2 -4
- package/lib/components/badge/badge.a11y.test.ts +7 -16
- package/lib/components/badge/badge.visual.test.ts +8 -21
- package/lib/components/banner/banner.a11y.test.ts +2 -3
- package/lib/components/banner/banner.visual.test.ts +2 -3
- package/lib/components/block-link/block-link.a11y.test.ts +4 -9
- package/lib/components/block-link/block-link.less +7 -10
- package/lib/components/block-link/block-link.visual.test.ts +4 -9
- package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +2 -3
- package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +2 -3
- package/lib/components/button/button.a11y.test.ts +2 -3
- package/lib/components/button/button.less +70 -35
- package/lib/components/button/button.visual.test.ts +2 -3
- package/lib/components/card/card.a11y.test.ts +2 -3
- package/lib/components/card/card.visual.test.ts +3 -6
- package/lib/components/check-control/check-control.a11y.test.ts +2 -4
- package/lib/components/check-control/check-control.visual.test.ts +2 -4
- package/lib/components/check-group/check-group.a11y.test.ts +2 -4
- package/lib/components/check-group/check-group.visual.test.ts +2 -4
- package/lib/components/checkbox_radio/checkbox_radio.a11y.test.ts +2 -4
- package/lib/components/checkbox_radio/checkbox_radio.less +1 -13
- package/lib/components/checkbox_radio/checkbox_radio.visual.test.ts +2 -4
- package/lib/components/code-block/code-block.a11y.test.ts +2 -4
- package/lib/components/code-block/code-block.visual.test.ts +2 -4
- package/lib/components/description/description.a11y.test.ts +2 -4
- package/lib/components/description/description.visual.test.ts +2 -4
- package/lib/components/empty-state/empty-state.a11y.test.ts +2 -3
- package/lib/components/empty-state/empty-state.visual.test.ts +2 -3
- package/lib/components/expandable/expandable.a11y.test.ts +2 -3
- package/lib/components/expandable/expandable.visual.test.ts +2 -3
- package/lib/components/input-fill/input-fill.a11y.test.ts +2 -3
- package/lib/components/input-fill/input-fill.visual.test.ts +2 -3
- package/lib/components/input-message/input-message.a11y.test.ts +2 -3
- package/lib/components/input-message/input-message.visual.test.ts +2 -3
- package/lib/components/input_textarea/input_textarea.a11y.test.ts +4 -7
- package/lib/components/input_textarea/input_textarea.less +2 -20
- package/lib/components/input_textarea/input_textarea.visual.test.ts +4 -7
- package/lib/components/label/label.a11y.test.ts +2 -3
- package/lib/components/label/label.visual.test.ts +2 -3
- package/lib/components/link/link.a11y.test.ts +2 -3
- package/lib/components/link/link.visual.test.ts +2 -3
- package/lib/components/link-preview/link-preview.a11y.test.ts +2 -3
- package/lib/components/link-preview/link-preview.visual.test.ts +3 -3
- package/lib/components/menu/menu.a11y.test.ts +2 -3
- package/lib/components/menu/menu.visual.test.ts +2 -3
- package/lib/components/modal/modal.a11y.test.ts +2 -3
- package/lib/components/modal/modal.visual.test.ts +2 -3
- package/lib/components/navigation/navigation.a11y.test.ts +2 -3
- package/lib/components/navigation/navigation.less +3 -1
- package/lib/components/navigation/navigation.visual.test.ts +3 -6
- package/lib/components/notice/notice.a11y.test.ts +2 -3
- package/lib/components/notice/notice.visual.test.ts +2 -3
- package/lib/components/page-title/page-title.a11y.test.ts +2 -3
- package/lib/components/page-title/page-title.visual.test.ts +2 -3
- package/lib/components/pagination/pagination.a11y.test.ts +2 -3
- package/lib/components/pagination/pagination.less +9 -0
- package/lib/components/pagination/pagination.visual.test.ts +2 -3
- package/lib/components/progress-bar/progress-bar.a11y.test.ts +7 -18
- package/lib/components/progress-bar/progress-bar.visual.test.ts +7 -18
- package/lib/components/select/select.less +1 -15
- package/lib/components/spinner/spinner.a11y.test.ts +2 -3
- package/lib/components/spinner/spinner.visual.test.ts +4 -7
- package/lib/components/table/table.a11y.test.ts +3 -4
- package/lib/components/table/table.visual.test.ts +2 -3
- package/lib/components/tag/tag.a11y.test.ts +2 -3
- package/lib/components/tag/tag.less +27 -21
- package/lib/components/tag/tag.visual.test.ts +3 -6
- package/lib/components/toast/toast.a11y.test.ts +2 -3
- package/lib/components/toast/toast.visual.test.ts +2 -3
- package/lib/components/toggle-switch/toggle-switch.a11y.test.ts +3 -6
- package/lib/components/toggle-switch/toggle-switch.less +5 -16
- package/lib/components/toggle-switch/toggle-switch.visual.test.ts +3 -7
- package/lib/components/topbar/topbar.less +61 -39
- package/lib/components/topbar/topbar.visual.test.ts +188 -0
- package/lib/components/uploader/uploader.less +1 -1
- package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +2 -0
- package/lib/exports/__snapshots__/color.less.test.ts.snap +12 -0
- package/lib/exports/color-sets.less +17 -7
- package/lib/exports/mixins.less +33 -0
- package/lib/input-utils.less +0 -3
- package/lib/test/a11y-test-utils.ts +94 -0
- package/lib/test/assertions.ts +10 -3
- package/lib/test/test-utils.ts +152 -300
- package/lib/test/visual-test-utils.ts +58 -0
- package/package.json +7 -8
- package/lib/components/popover/tooltip.visual.test.ts +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from "@open-wc/testing";
|
|
2
|
-
import {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
8
|
-
type: "visual",
|
|
7
|
+
runVisualTests({
|
|
9
8
|
baseClass: "s-link",
|
|
10
9
|
modifiers: {
|
|
11
10
|
primary: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import { runA11yTests } from "../../test/a11y-test-utils";
|
|
3
3
|
import "../../index";
|
|
4
4
|
|
|
5
5
|
describe("menu", () => {
|
|
6
|
-
|
|
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 {
|
|
2
|
+
import { runVisualTests } from "../../test/visual-test-utils";
|
|
3
3
|
import "../../index";
|
|
4
4
|
|
|
5
5
|
describe("menu", () => {
|
|
6
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
59
|
-
type: "a11y",
|
|
58
|
+
runA11yTests({
|
|
60
59
|
baseClass: "s-navigation",
|
|
61
60
|
variants: ["vertical", "muted"],
|
|
62
61
|
modifiers: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { html } from "@open-wc/testing";
|
|
2
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
1
|
+
import { runA11yTests } from "../../test/a11y-test-utils";
|
|
2
2
|
import "../../index";
|
|
3
3
|
|
|
4
4
|
describe("notice", () => {
|
|
5
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import { runA11yTests } from "../../test/a11y-test-utils";
|
|
3
3
|
import "../../index";
|
|
4
4
|
|
|
5
5
|
describe("page title", () => {
|
|
6
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import { runVisualTests } from "../../test/visual-test-utils";
|
|
3
3
|
import "../../index";
|
|
4
4
|
|
|
5
5
|
describe("pagination", () => {
|
|
6
|
-
|
|
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 {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|