@stackoverflow/stacks 2.0.0-rc.1 → 2.0.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components/code-block/code-block.fixtures.d.ts +2 -0
- package/dist/css/stacks.css +816 -778
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +265 -110
- package/dist/js/stacks.min.js +1 -1
- package/lib/atomic/__snapshots__/color.less.test.ts.snap +246 -0
- package/lib/atomic/typography.less +4 -0
- package/lib/base/body.less +2 -2
- package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +1 -1
- package/lib/components/activity-indicator/activity-indicator.less +17 -4
- package/lib/components/anchor/anchor.less +10 -6
- package/lib/components/anchor/anchor.visual.test.ts +0 -4
- package/lib/components/avatar/avatar.visual.test.ts +0 -3
- package/lib/components/badge/badge.a11y.test.ts +2 -2
- package/lib/components/badge/badge.less +31 -39
- package/lib/components/banner/banner.less +2 -2
- package/lib/components/block-link/block-link.less +5 -4
- package/lib/components/button/button.a11y.test.ts +1 -4
- package/lib/components/button/button.less +48 -78
- package/lib/components/button/button.visual.test.ts +1 -4
- package/lib/components/card/card.less +8 -0
- package/lib/components/code-block/code-block.a11y.test.ts +30 -0
- package/lib/components/code-block/code-block.fixtures.ts +88 -0
- package/lib/components/code-block/code-block.visual.test.ts +20 -0
- package/lib/components/description/description.a11y.test.ts +1 -0
- package/lib/components/description/description.less +1 -1
- package/lib/components/expandable/expandable.a11y.test.ts +27 -0
- package/lib/components/expandable/expandable.visual.test.ts +27 -0
- package/lib/components/input-icon/input-icon.less +1 -1
- package/lib/components/input-message/input-message.less +4 -3
- package/lib/components/input_textarea/input_textarea.a11y.test.ts +112 -0
- package/lib/components/input_textarea/input_textarea.less +1 -1
- package/lib/components/input_textarea/input_textarea.visual.test.ts +98 -0
- package/lib/components/label/label.less +4 -14
- package/lib/components/link/link.less +12 -12
- package/lib/components/link-preview/link-preview.a11y.test.ts +48 -0
- package/lib/components/link-preview/link-preview.less +16 -7
- package/lib/components/link-preview/link-preview.visual.test.ts +52 -0
- package/lib/components/modal/modal.less +1 -0
- package/lib/components/navigation/navigation.a11y.test.ts +78 -0
- package/lib/components/navigation/navigation.visual.test.ts +101 -0
- package/lib/components/notice/notice.a11y.test.ts +17 -0
- package/lib/components/notice/notice.less +45 -82
- package/lib/components/notice/notice.visual.test.ts +26 -0
- package/lib/components/page-title/page-title.a11y.test.ts +29 -0
- package/lib/components/page-title/page-title.less +1 -1
- package/lib/components/page-title/page-title.visual.test.ts +59 -0
- package/lib/components/pagination/pagination.a11y.test.ts +20 -0
- package/lib/components/pagination/pagination.less +2 -2
- package/lib/components/pagination/pagination.visual.test.ts +26 -0
- package/lib/components/post-summary/post-summary.less +16 -16
- package/lib/components/progress-bar/progress-bar.less +2 -2
- package/lib/components/prose/prose.less +2 -2
- package/lib/components/select/select.less +1 -1
- package/lib/components/sidebar-widget/sidebar-widget.less +3 -3
- package/lib/components/spinner/spinner.a11y.test.ts +15 -0
- package/lib/components/spinner/spinner.visual.test.ts +43 -0
- package/lib/components/tag/tag.a11y.test.ts +29 -0
- package/lib/components/tag/tag.less +29 -29
- package/lib/components/tag/tag.visual.test.ts +46 -0
- package/lib/components/toast/toast.a11y.test.ts +30 -0
- package/lib/components/toast/toast.visual.test.ts +10 -6
- package/lib/components/toggle-switch/toggle-switch.less +2 -5
- package/lib/components/topbar/topbar.less +60 -44
- package/lib/components/uploader/uploader.less +19 -13
- package/lib/components/user-card/user-card.less +3 -3
- package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +17 -10
- package/lib/exports/__snapshots__/color.less.test.ts.snap +197 -185
- package/lib/exports/color-mixins.less +1 -1
- package/lib/exports/color-sets.less +130 -81
- package/lib/exports/color.less +14 -6
- package/lib/exports/v1/__snapshots__/constants-colors.less.test.ts.snap +3 -3
- package/lib/exports/v1/constants-colors.less +2 -2
- package/lib/input-utils.less +1 -1
- package/lib/test/axe-apca/README.md +19 -0
- package/lib/test/axe-apca/src/axe-apca.test.ts +77 -1
- package/lib/test/axe-apca/src/axe-apca.ts +16 -8
- package/lib/test/test-utils.ts +8 -6
- package/package.json +14 -14
- package/lib/exports/theme.less +0 -85
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
.construct-notice-component(@baseClass) {
|
|
2
|
-
--_no-bc: var(--
|
|
3
|
-
--_no-bg: var(--black-
|
|
4
|
-
--_no-fc: var(--
|
|
2
|
+
--_no-bc: var(--black-225);
|
|
3
|
+
--_no-bg: var(--black-100);
|
|
4
|
+
--_no-fc: var(--black-500);
|
|
5
5
|
--_no-btn-bg-focus: var(--black-225);
|
|
6
6
|
--_no-btn-bg-active: var(--black-250);
|
|
7
|
+
--_no-btn-fc: var(--_no-fc);
|
|
7
8
|
|
|
8
9
|
// MODIFIERS
|
|
9
10
|
&:not(&__important) {
|
|
@@ -26,137 +27,99 @@
|
|
|
26
27
|
--_no-fc: var(--white);
|
|
27
28
|
--_no-btn-bg-focus: var(--black-600);
|
|
28
29
|
--_no-btn-bg-active: var(--black-600);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--_no-bc: var(--_no-bg);
|
|
32
|
-
});
|
|
30
|
+
--_no-btn-fc: var(--_no-fc);
|
|
31
|
+
--_no-code-bg: var(--black-300);
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// VARIANTS
|
|
36
35
|
&__danger {
|
|
37
36
|
--_no-bc: var(--red-300);
|
|
38
|
-
--_no-bg: var(--red-
|
|
39
|
-
--_no-btn-bg-active: var(--red-
|
|
40
|
-
--_no-btn-bg-focus: var(--red-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.highcontrast-mode({
|
|
44
|
-
--_no-bg: var(--red-300);
|
|
45
|
-
});
|
|
46
|
-
}
|
|
37
|
+
--_no-bg: var(--red-100);
|
|
38
|
+
--_no-btn-bg-active: var(--red-200);
|
|
39
|
+
--_no-btn-bg-focus: var(--red-200);
|
|
40
|
+
--_no-btn-fc: var(--red-500);
|
|
41
|
+
--_no-code-bg: var(--red-300);
|
|
47
42
|
|
|
48
43
|
&.@{baseClass}__important {
|
|
49
44
|
--_no-bc: var(--_no-bg);
|
|
50
45
|
--_no-bg: var(--red-400);
|
|
51
46
|
--_no-btn-bg-active: var(--red-500);
|
|
52
47
|
--_no-btn-bg-focus: var(--red-500);
|
|
48
|
+
--_no-btn-fc: var(--red-100);
|
|
53
49
|
|
|
54
|
-
.
|
|
55
|
-
--_no-bg: var(--red-
|
|
56
|
-
--_no-fc: var(--black-600);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
.highcontrast-dark-mode({
|
|
60
|
-
--_no-bg: var(--red-400);
|
|
61
|
-
--_no-fc: var(--white);
|
|
50
|
+
.highcontrast-mode({
|
|
51
|
+
--_no-bg: var(--red-500);
|
|
62
52
|
});
|
|
63
53
|
}
|
|
64
54
|
}
|
|
65
55
|
|
|
66
56
|
&__info {
|
|
67
57
|
--_no-bc: var(--theme-secondary-300);
|
|
68
|
-
--_no-bg: var(--theme-secondary-
|
|
69
|
-
--_no-btn-bg-focus: var(--theme-secondary-
|
|
70
|
-
--_no-btn-bg-active: var(--theme-secondary-
|
|
58
|
+
--_no-bg: var(--theme-secondary-100);
|
|
59
|
+
--_no-btn-bg-focus: var(--theme-secondary-200);
|
|
60
|
+
--_no-btn-bg-active: var(--theme-secondary-200);
|
|
61
|
+
--_no-btn-fc: var(--theme-secondary-500);
|
|
71
62
|
--_no-code-bg: var(--theme-secondary-300);
|
|
72
63
|
|
|
73
|
-
&:not(.@{baseClass}__important) {
|
|
74
|
-
.highcontrast-mode({
|
|
75
|
-
--_no-bg: var(--theme-secondary-300);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
.highcontrast-dark-mode({
|
|
79
|
-
--_no-bg: var(--theme-secondary-300);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
64
|
&.@{baseClass}__important {
|
|
84
65
|
--_no-bc: var(--_no-bg);
|
|
85
66
|
--_no-bg: var(--theme-secondary-400);
|
|
86
67
|
--_no-btn-bg-active: var(--theme-secondary-500);
|
|
87
|
-
--_no-btn-bg-focus: var(--theme-secondary-
|
|
68
|
+
--_no-btn-bg-focus: var(--theme-secondary-500);
|
|
69
|
+
--_no-btn-fc: var(--theme-secondary-100);
|
|
88
70
|
|
|
89
|
-
.
|
|
90
|
-
--_no-bg: var(--theme-secondary-
|
|
91
|
-
--_no-fc: var(--black-600);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
.highcontrast-dark-mode({
|
|
95
|
-
--_no-bg: var(--theme-secondary-400);
|
|
96
|
-
--_no-fc: var(--white);
|
|
71
|
+
.highcontrast-mode({
|
|
72
|
+
--_no-bg: var(--theme-secondary-500);
|
|
97
73
|
});
|
|
98
74
|
}
|
|
99
75
|
}
|
|
100
76
|
|
|
101
77
|
&__success {
|
|
102
78
|
--_no-bc: var(--green-300);
|
|
103
|
-
--_no-bg: var(--green-
|
|
104
|
-
--_no-btn-bg-active: var(--green-
|
|
105
|
-
--_no-btn-bg-focus: var(--green-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
.highcontrast-mode({
|
|
109
|
-
--_no-bg: var(--green-300);
|
|
110
|
-
});
|
|
111
|
-
}
|
|
79
|
+
--_no-bg: var(--green-100);
|
|
80
|
+
--_no-btn-bg-active: var(--green-200);
|
|
81
|
+
--_no-btn-bg-focus: var(--green-200);
|
|
82
|
+
--_no-btn-fc: var(--green-500);
|
|
83
|
+
--_no-code-bg: var(--green-300);
|
|
112
84
|
|
|
113
85
|
&.@{baseClass}__important {
|
|
114
86
|
--_no-bc: var(--_no-bg);
|
|
115
87
|
--_no-bg: var(--green-400);
|
|
116
|
-
--_no-fc: var(--black-600);
|
|
117
88
|
--_no-btn-bg-active: var(--green-500);
|
|
118
|
-
--_no-btn-bg-focus: var(--green-
|
|
119
|
-
|
|
120
|
-
.dark-mode({
|
|
121
|
-
--_no-bg: var(--green-400);
|
|
122
|
-
--_no-fc: var(--white);
|
|
123
|
-
});
|
|
89
|
+
--_no-btn-bg-focus: var(--green-500);
|
|
90
|
+
--_no-btn-fc: var(--green-100);
|
|
124
91
|
|
|
125
92
|
.highcontrast-mode({
|
|
126
|
-
--_no-bg: var(--green-
|
|
127
|
-
--_no-fc: var(--white);
|
|
93
|
+
--_no-bg: var(--green-500);
|
|
128
94
|
});
|
|
129
95
|
}
|
|
130
96
|
}
|
|
131
97
|
|
|
132
98
|
&__warning {
|
|
133
|
-
--_no-bc: var(--yellow-
|
|
134
|
-
--_no-bg: var(--yellow-
|
|
135
|
-
--_no-btn-bg-active: var(--yellow-
|
|
136
|
-
--_no-btn-bg-focus: var(--yellow-
|
|
99
|
+
--_no-bc: var(--yellow-300);
|
|
100
|
+
--_no-bg: var(--yellow-100);
|
|
101
|
+
--_no-btn-bg-active: var(--yellow-200);
|
|
102
|
+
--_no-btn-bg-focus: var(--yellow-200);
|
|
103
|
+
--_no-btn-fc: var(--yellow-600);
|
|
137
104
|
--_no-code-bg: var(--yellow-300);
|
|
138
105
|
|
|
139
|
-
&:not(.@{baseClass}__important) {
|
|
140
|
-
.highcontrast-mode({
|
|
141
|
-
--_no-bg: var(--yellow-300);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
106
|
&.@{baseClass}__important {
|
|
146
107
|
--_no-bc: var(--_no-bg);
|
|
147
108
|
--_no-bg: var(--yellow-400);
|
|
148
|
-
--_no-fc: var(--black
|
|
149
|
-
--_no-btn-
|
|
150
|
-
--_no-btn-bg-
|
|
109
|
+
--_no-fc: var(--black);
|
|
110
|
+
--_no-btn-fc: var(--_no-fc);
|
|
111
|
+
--_no-btn-bg-active: var(--yellow-300);
|
|
112
|
+
--_no-btn-bg-focus: var(--yellow-300);
|
|
151
113
|
|
|
152
114
|
.dark-mode({
|
|
153
|
-
--_no-
|
|
154
|
-
--_no-fc: var(--white);
|
|
115
|
+
--_no-fc: var(--yellow-200);
|
|
155
116
|
});
|
|
156
117
|
|
|
157
118
|
.highcontrast-mode({
|
|
158
119
|
--_no-bg: var(--yellow-500);
|
|
159
120
|
--_no-fc: var(--white);
|
|
121
|
+
--_no-btn-bg-active: transparent;
|
|
122
|
+
--_no-btn-bg-focus: transparent;
|
|
160
123
|
});
|
|
161
124
|
}
|
|
162
125
|
}
|
|
@@ -173,15 +136,15 @@
|
|
|
173
136
|
}
|
|
174
137
|
|
|
175
138
|
&:active {
|
|
176
|
-
background: var(--_no-btn-bg-active);
|
|
139
|
+
background-color: var(--_no-btn-bg-active, inherit) !important;
|
|
177
140
|
}
|
|
178
141
|
|
|
179
142
|
&:focus,
|
|
180
143
|
&:hover {
|
|
181
|
-
background: var(--_no-btn-bg-focus);
|
|
144
|
+
background-color: var(--_no-btn-bg-focus, inherit) !important;
|
|
182
145
|
}
|
|
183
146
|
|
|
184
|
-
color: inherit;
|
|
147
|
+
color: var(--_no-btn-fc, inherit) !important;
|
|
185
148
|
padding: var(--su8);
|
|
186
149
|
}
|
|
187
150
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import { html } from "@open-wc/testing";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("notice", () => {
|
|
6
|
+
runComponentTests({
|
|
7
|
+
type: "visual",
|
|
8
|
+
baseClass: "s-notice",
|
|
9
|
+
variants: ["info", "success", "warning", "danger"],
|
|
10
|
+
modifiers: {
|
|
11
|
+
primary: ["important"],
|
|
12
|
+
},
|
|
13
|
+
attributes: {
|
|
14
|
+
ariaHidden: "false",
|
|
15
|
+
},
|
|
16
|
+
children: {
|
|
17
|
+
default: `Test notice`,
|
|
18
|
+
},
|
|
19
|
+
tag: "aside",
|
|
20
|
+
template: ({ component, testid }) => html`
|
|
21
|
+
<div class="d-inline-block p8" data-testid="${testid}">
|
|
22
|
+
${component}
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { html } from "@open-wc/testing";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("page title", () => {
|
|
6
|
+
runComponentTests({
|
|
7
|
+
type: "a11y",
|
|
8
|
+
baseClass: "s-page-title",
|
|
9
|
+
children: {
|
|
10
|
+
default: `
|
|
11
|
+
<div class="s-page-title--text">
|
|
12
|
+
<nav class="s-breadcrumbs" aria-label="example-breadcrumbs">…</nav>
|
|
13
|
+
<h1 class="s-page-title--header">Page title</h1>
|
|
14
|
+
<p class="s-page-title--description">
|
|
15
|
+
Optional description de Finibus Bonorum et Malorum
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="s-page-title--actions">
|
|
19
|
+
<button class="s-btn s-btn__filled" type="button">Action</button>
|
|
20
|
+
</div>
|
|
21
|
+
`,
|
|
22
|
+
},
|
|
23
|
+
template: ({ component, testid }) => html`
|
|
24
|
+
<div class="d-block p8 ws6" data-testid="${testid}">
|
|
25
|
+
${component}
|
|
26
|
+
</div>
|
|
27
|
+
`,
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
& &--header {
|
|
32
32
|
color: var(--fc-dark);
|
|
33
33
|
font-size: var(--fs-headline1);
|
|
34
|
-
font-weight:
|
|
34
|
+
font-weight: bold;
|
|
35
35
|
line-height: var(--lh-sm);
|
|
36
36
|
margin: 0;
|
|
37
37
|
margin-bottom: 0; // TODO: investigate why this exists. I assume it's so margin-bottom isn't overridden, but 🤷♂️
|
|
@@ -0,0 +1,59 @@
|
|
|
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 postTitleTemplate = ({ component, testid }: any) => html`
|
|
7
|
+
<div class="d-block p8 ws6" data-testid="${testid}">${component}</div>
|
|
8
|
+
`;
|
|
9
|
+
|
|
10
|
+
const getChildren = ({
|
|
11
|
+
showEverything = false,
|
|
12
|
+
}: {
|
|
13
|
+
showEverything: boolean;
|
|
14
|
+
}) => `
|
|
15
|
+
<div class="s-page-title--text">
|
|
16
|
+
${
|
|
17
|
+
showEverything
|
|
18
|
+
? `
|
|
19
|
+
<nav class="s-breadcrumbs" aria-label="example-breadcrumbs">
|
|
20
|
+
<div class="s-breadcrumbs--item">
|
|
21
|
+
<a class="s-breadcrumbs--link">Stack Overflow</a>
|
|
22
|
+
</div>
|
|
23
|
+
</nav>
|
|
24
|
+
`
|
|
25
|
+
: ""
|
|
26
|
+
}
|
|
27
|
+
<h1 class="s-page-title--header">Page title</h1>
|
|
28
|
+
${
|
|
29
|
+
showEverything
|
|
30
|
+
? `
|
|
31
|
+
<p class="s-page-title--description">
|
|
32
|
+
Optional description de Finibus Bonorum et Malorum
|
|
33
|
+
</p>
|
|
34
|
+
`
|
|
35
|
+
: ""
|
|
36
|
+
}
|
|
37
|
+
</div>
|
|
38
|
+
${
|
|
39
|
+
showEverything
|
|
40
|
+
? `
|
|
41
|
+
<div class="s-page-title--actions">
|
|
42
|
+
<button class="s-btn s-btn__filled" type="button">Action</button>
|
|
43
|
+
</div>
|
|
44
|
+
`
|
|
45
|
+
: ""
|
|
46
|
+
}
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
describe("page title", () => {
|
|
50
|
+
runComponentTests({
|
|
51
|
+
type: "visual",
|
|
52
|
+
baseClass: "s-page-title",
|
|
53
|
+
children: {
|
|
54
|
+
default: getChildren({ showEverything: false }),
|
|
55
|
+
complete: getChildren({ showEverything: true }),
|
|
56
|
+
},
|
|
57
|
+
template: postTitleTemplate,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import "../../index";
|
|
3
|
+
|
|
4
|
+
describe("pagination", () => {
|
|
5
|
+
runComponentTests({
|
|
6
|
+
type: "a11y",
|
|
7
|
+
baseClass: "s-pagination",
|
|
8
|
+
children: {
|
|
9
|
+
default: `
|
|
10
|
+
<a class="s-pagination--item" href="#">Prev</a>
|
|
11
|
+
<a class="s-pagination--item" href="#">1</a>
|
|
12
|
+
<span class="s-pagination--item is-selected" aria-current="page">2</span>
|
|
13
|
+
<a class="s-pagination--item" href="#">3</a>
|
|
14
|
+
<span class="s-pagination--item s-pagination--item__clear">…</span>
|
|
15
|
+
<a class="s-pagination--item" href="#">100</a>
|
|
16
|
+
<a class="s-pagination--item" href="#">Next</a>
|
|
17
|
+
`,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
.s-pagination {
|
|
2
2
|
& &--item {
|
|
3
3
|
--_pa-item-bg: transparent;
|
|
4
|
-
--_pa-item-bc: var(--bc-
|
|
4
|
+
--_pa-item-bc: var(--bc-darker);
|
|
5
5
|
--_pa-item-fc: var(--fc-medium);
|
|
6
6
|
--_pa-item-bg-hover: var(--black-225);
|
|
7
|
-
--_pa-item-bc-hover: var(--bc-
|
|
7
|
+
--_pa-item-bc-hover: var(--bc-darker);
|
|
8
8
|
--_pa-item-fc-hover: var(--fc-dark);
|
|
9
9
|
|
|
10
10
|
// CONTEXTUAL STYLES
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { html } from "@open-wc/testing";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
describe("pagination", () => {
|
|
6
|
+
runComponentTests({
|
|
7
|
+
type: "visual",
|
|
8
|
+
baseClass: "s-pagination",
|
|
9
|
+
children: {
|
|
10
|
+
default: `
|
|
11
|
+
<a class="s-pagination--item" href="#">Prev</a>
|
|
12
|
+
<a class="s-pagination--item" href="#">1</a>
|
|
13
|
+
<span class="s-pagination--item is-selected" aria-current="page">2</span>
|
|
14
|
+
<a class="s-pagination--item" href="#">3</a>
|
|
15
|
+
<span class="s-pagination--item s-pagination--item__clear">…</span>
|
|
16
|
+
<a class="s-pagination--item" href="#">100</a>
|
|
17
|
+
<a class="s-pagination--item" href="#">Next</a>
|
|
18
|
+
`,
|
|
19
|
+
},
|
|
20
|
+
template: ({ component, testid }) => html`
|
|
21
|
+
<div class="d-inline-block p8" data-testid="${testid}">
|
|
22
|
+
${component}
|
|
23
|
+
</div>
|
|
24
|
+
`,
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
--_ps-o: unset;
|
|
6
6
|
// Child components
|
|
7
7
|
--_ps-content-excerpt-fc: var(--_ps-state-fc, var(--fc-medium));
|
|
8
|
-
--_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color));
|
|
9
|
-
--_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover));
|
|
10
|
-
--_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited));
|
|
8
|
+
--_ps-content-title-a-fc: var(--_ps-state-fc, var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary-400))));
|
|
9
|
+
--_ps-content-title-a-fc-hover: var(--_ps-state-fc, var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500))));
|
|
10
|
+
--_ps-content-title-a-fc-visited: var(--_ps-state-fc, var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--theme-secondary-600))));
|
|
11
11
|
--_ps-stats-ai: flex-end;
|
|
12
12
|
--_ps-stats-fc: var(--_ps-state-fc, var(--fc-light));
|
|
13
13
|
--_ps-stats-fd: column;
|
|
14
14
|
--_ps-stats-w: calc(var(--su96) + var(--su12));
|
|
15
15
|
// Stats item modifiers
|
|
16
|
-
--_ps-has-answers-bc: var(--green-
|
|
16
|
+
--_ps-has-answers-bc: var(--green-400);
|
|
17
17
|
--_ps-has-answers-bg: unset;
|
|
18
|
-
--_ps-has-answers-fc: var(--green-
|
|
19
|
-
--_ps-has-accepted-answers-bc: var(--green-
|
|
20
|
-
--_ps-has-accepted-answers-bg: var(--green-
|
|
18
|
+
--_ps-has-answers-fc: var(--green-400);
|
|
19
|
+
--_ps-has-accepted-answers-bc: var(--green-400);
|
|
20
|
+
--_ps-has-accepted-answers-bg: var(--green-400);
|
|
21
21
|
--_ps-has-accepted-answers-fc: var(--white);
|
|
22
22
|
--_ps-stats-item-emphasized-fc: var(--_ps-state-fc, var(--fc-dark));
|
|
23
23
|
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
|
|
116
116
|
&&__watched {
|
|
117
117
|
&:not(.s-post-summary__deleted):not(.s-post-summary__ignored) {
|
|
118
|
-
--_ps-bg: var(--yellow-
|
|
118
|
+
--_ps-bg: var(--yellow-100);
|
|
119
119
|
--_ps-stats-fc: var(--black-400);
|
|
120
|
-
--_ps-content-title-a-fc: var(--theme-post-title-color);
|
|
121
|
-
--_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover);
|
|
122
|
-
--_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited);
|
|
120
|
+
--_ps-content-title-a-fc: var(--theme-post-title-color, var(--theme-link-color, var(--theme-secondary-400)));
|
|
121
|
+
--_ps-content-title-a-fc-hover: var(--theme-post-title-color-hover, var(--theme-link-color-hover, var(--theme-secondary-500)));
|
|
122
|
+
--_ps-content-title-a-fc-visited: var(--theme-post-title-color-visited, var(--theme-link-color-visited, var(--theme-secondary-600)));
|
|
123
123
|
|
|
124
124
|
.s-user-card {
|
|
125
125
|
a {
|
|
@@ -208,7 +208,7 @@
|
|
|
208
208
|
.break-word;
|
|
209
209
|
.v-truncate2;
|
|
210
210
|
color: var( --_ps-content-excerpt-fc);
|
|
211
|
-
font-family: var(--theme-post-body-font-family);
|
|
211
|
+
font-family: var(--theme-post-body-font-family, var(--theme-body-font-family));
|
|
212
212
|
margin-top: calc(var(--su2) * -1);
|
|
213
213
|
margin-bottom: var(--su8);
|
|
214
214
|
}
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
|
|
241
241
|
.break-word;
|
|
242
242
|
color: var(--_ps-content-title-a-fc);
|
|
243
|
-
font-family: var(--theme-post-title-font-family);
|
|
243
|
+
font-family: var(--theme-post-title-font-family, var(--theme-body-font-family));
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
.iconShield {
|
|
@@ -380,15 +380,15 @@
|
|
|
380
380
|
|
|
381
381
|
// Hotness
|
|
382
382
|
&.is-warm {
|
|
383
|
-
color: var(--_ps-state-fc, var(--yellow-
|
|
383
|
+
color: var(--_ps-state-fc, var(--yellow-500));
|
|
384
384
|
}
|
|
385
385
|
|
|
386
386
|
&.is-hot {
|
|
387
|
-
color: var(--_ps-state-fc, var(--orange-
|
|
387
|
+
color: var(--_ps-state-fc, var(--orange-500));
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
&.is-supernova {
|
|
391
|
-
color: var(--_ps-state-fc, var(--red-
|
|
391
|
+
color: var(--_ps-state-fc, var(--red-500));
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
// Status
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
background: var(--black-
|
|
138
|
+
background: var(--black-250);
|
|
139
139
|
border-radius: 0;
|
|
140
140
|
height: var(--su-static6);
|
|
141
141
|
position: absolute;
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
});
|
|
204
204
|
|
|
205
205
|
align-items: center;
|
|
206
|
-
background: var(--black-
|
|
206
|
+
background: var(--black-250);
|
|
207
207
|
border-radius: 100%;
|
|
208
208
|
color: var(--_white-static);
|
|
209
209
|
display: flex;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--_pr-h6-fs: var(--fs-body1);
|
|
19
19
|
--_pr-hr-bg: var(--black-225); // used for both background-color and color properties
|
|
20
20
|
--_pr-img-mb: @pr-spacing;
|
|
21
|
-
--_pr-kbd-bc: var(--black-
|
|
21
|
+
--_pr-kbd-bc: var(--black-300);
|
|
22
22
|
--_pr-kbd-bs: 0 var(--su-static1) var(--su-static1) hsla(210, 8%, 5%, 0.15), inset 0 1px 0 0 var(--_white-static);
|
|
23
23
|
--_pr-spoiler-cursor: pointer;
|
|
24
24
|
--_pr-spoiler-after-t: 1em;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
// CHILD ELEMENTS
|
|
75
75
|
*:not(.s-code-block) {
|
|
76
76
|
> a code {
|
|
77
|
-
color: var(--theme-link-color); // When contained within a link, we want the code to be link-colored
|
|
77
|
+
color: var(--theme-link-color, var(--theme-secondary-400)); // When contained within a link, we want the code to be link-colored
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
> code {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.s-select {
|
|
2
2
|
--_se-arrow-bc: currentColor transparent;
|
|
3
3
|
--_se-arrow-size: var(--su-static4); // Constant
|
|
4
|
-
--_se-select-bc: var(--bc-
|
|
4
|
+
--_se-select-bc: var(--bc-darker);
|
|
5
5
|
--_se-select-bc-focus: var(--theme-secondary-400);
|
|
6
6
|
--_se-select-bs-focus: 0 0 0 var(--su-static4) var(--focus-ring);
|
|
7
7
|
--_se-select-bg: var(--white);
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
&__expanding-control {
|
|
70
70
|
&:before {
|
|
71
71
|
border: calc(var(--su-static4) + var(--su-static1)) solid transparent;
|
|
72
|
-
border-left-color: var(--
|
|
72
|
+
border-left-color: var(--black-400);
|
|
73
73
|
border-right-width: 0;
|
|
74
74
|
content: '';
|
|
75
75
|
float: left;
|
|
@@ -228,11 +228,11 @@
|
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
.s-sidebarwidget--header {
|
|
231
|
-
background-color: var(~"--@{name}-
|
|
231
|
+
background-color: var(~"--@{name}-200");
|
|
232
232
|
color: var(--fc-medium);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
background-color: var(~"--@{name}-
|
|
235
|
+
background-color: var(~"--@{name}-100");
|
|
236
236
|
border-color: var(--_sw-bc);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
2
|
+
import "../../index";
|
|
3
|
+
|
|
4
|
+
describe("spinner", () => {
|
|
5
|
+
runComponentTests({
|
|
6
|
+
type: "a11y",
|
|
7
|
+
baseClass: "s-spinner",
|
|
8
|
+
modifiers: {
|
|
9
|
+
primary: ["xs", "sm", "md", "lg"],
|
|
10
|
+
},
|
|
11
|
+
children: {
|
|
12
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { html } from "@open-wc/testing";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6
|
+
const template = ({ component, testid }: any) => html`
|
|
7
|
+
<div class="d-inline-block p8" data-testid="${testid}">${component}</div>
|
|
8
|
+
`;
|
|
9
|
+
describe("spinner", () => {
|
|
10
|
+
// default, sizes
|
|
11
|
+
runComponentTests({
|
|
12
|
+
type: "visual",
|
|
13
|
+
baseClass: "s-spinner",
|
|
14
|
+
modifiers: {
|
|
15
|
+
primary: ["xs", "sm", "md", "lg"],
|
|
16
|
+
},
|
|
17
|
+
children: {
|
|
18
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
19
|
+
},
|
|
20
|
+
template,
|
|
21
|
+
});
|
|
22
|
+
// applied font color
|
|
23
|
+
runComponentTests({
|
|
24
|
+
type: "visual",
|
|
25
|
+
baseClass: "s-spinner",
|
|
26
|
+
modifiers: {
|
|
27
|
+
global: ["fc-theme-primary"],
|
|
28
|
+
},
|
|
29
|
+
children: {
|
|
30
|
+
default: `<div class="v-visible-sr">Loading…</div>`,
|
|
31
|
+
},
|
|
32
|
+
template,
|
|
33
|
+
});
|
|
34
|
+
// .is-loading
|
|
35
|
+
runComponentTests({
|
|
36
|
+
type: "visual",
|
|
37
|
+
baseClass: "is-loading",
|
|
38
|
+
children: {
|
|
39
|
+
default: `Loading…`,
|
|
40
|
+
},
|
|
41
|
+
template,
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { IconClearSm } from "@stackoverflow/stacks-icons";
|
|
2
|
+
import { runComponentTests } from "../../test/test-utils";
|
|
3
|
+
import "../../index";
|
|
4
|
+
|
|
5
|
+
const children = {
|
|
6
|
+
default: `default`,
|
|
7
|
+
dismiss: `dismiss <span class="s-tag--dismiss">${IconClearSm}</span>`,
|
|
8
|
+
sponsor: `<img class="s-tag--sponsor" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAIAQMAAAD+wSzIAAAABlBMVEX///+/v7+jQ3Y5AAAADklEQVQI12P4AIX8EAgALgAD/aNpbtEAAAAASUVORK5CYII" width="16" height="16" alt="sponsor">sponsor`,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
describe("tag", () => {
|
|
12
|
+
runComponentTests({
|
|
13
|
+
type: "a11y",
|
|
14
|
+
baseClass: "s-tag",
|
|
15
|
+
variants: ["ignored", "watched", "moderator", "muted", "required"],
|
|
16
|
+
modifiers: {
|
|
17
|
+
global: ["is-selected"],
|
|
18
|
+
},
|
|
19
|
+
children,
|
|
20
|
+
// TODO: revisit this after minor tag changes are made
|
|
21
|
+
skippedTestids: [
|
|
22
|
+
/s-tag-highcontrast-light-muted/, // 6.33
|
|
23
|
+
/s-tag-light-is-selected/, // 58.28Lc
|
|
24
|
+
/s-tag-light-ignored-is-selected/, // 58.28Lc
|
|
25
|
+
/s-tag-light-moderator-is-selected/, // 49.14Lc
|
|
26
|
+
/s-tag-light-watched-is-selected/, // 58.28Lc
|
|
27
|
+
],
|
|
28
|
+
});
|
|
29
|
+
});
|