@stackoverflow/stacks 2.4.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/stacks.css +24 -65
- package/dist/css/stacks.min.css +1 -1
- package/lib/components/tag/tag.less +21 -68
- package/lib/exports/color-sets.less +4 -4
- package/package.json +10 -9
- package/lib/atomic/__snapshots__/color-new.less.test.ts.snap +0 -3015
- package/lib/atomic/__snapshots__/color.less.test.ts.snap +0 -3132
- package/lib/atomic/__snapshots__/misc.less.test.ts.snap +0 -893
- package/lib/atomic/__snapshots__/spacing.less.test.ts.snap +0 -1928
- package/lib/atomic/color.less.test.ts +0 -12
- package/lib/atomic/misc.less.test.ts +0 -12
- package/lib/atomic/spacing.less.test.ts +0 -12
- package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +0 -13
- package/lib/components/activity-indicator/activity-indicator.visual.test.ts +0 -22
- package/lib/components/anchor/anchor.a11y.test.ts +0 -35
- package/lib/components/anchor/anchor.visual.test.ts +0 -47
- package/lib/components/avatar/avatar.a11y.test.ts +0 -35
- package/lib/components/avatar/avatar.visual.test.ts +0 -50
- package/lib/components/award-bling/award-bling.a11y.test.ts +0 -15
- package/lib/components/award-bling/award-bling.visual.test.ts +0 -24
- package/lib/components/badge/badge.a11y.test.ts +0 -143
- package/lib/components/badge/badge.visual.test.ts +0 -165
- package/lib/components/banner/banner.a11y.test.ts +0 -36
- package/lib/components/banner/banner.test.ts +0 -73
- package/lib/components/banner/banner.visual.test.ts +0 -36
- package/lib/components/block-link/block-link.a11y.test.ts +0 -57
- package/lib/components/block-link/block-link.visual.test.ts +0 -57
- package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +0 -36
- package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +0 -36
- package/lib/components/button/button.a11y.test.ts +0 -21
- package/lib/components/button/button.test.setup.ts +0 -36
- package/lib/components/button/button.visual.test.ts +0 -18
- package/lib/components/button-group/button-group.a11y.test.ts +0 -12
- package/lib/components/button-group/button-group.test.setup.ts +0 -77
- package/lib/components/button-group/button-group.visual.test.ts +0 -7
- package/lib/components/card/card.a11y.test.ts +0 -12
- package/lib/components/card/card.visual.test.ts +0 -52
- package/lib/components/check-control/check-control.a11y.test.ts +0 -33
- package/lib/components/check-control/check-control.visual.test.ts +0 -36
- package/lib/components/check-group/check-group.a11y.test.ts +0 -49
- package/lib/components/check-group/check-group.visual.test.ts +0 -56
- package/lib/components/checkbox_radio/checkbox_radio.a11y.test.ts +0 -37
- package/lib/components/checkbox_radio/checkbox_radio.visual.test.ts +0 -33
- package/lib/components/code-block/code-block.a11y.test.ts +0 -27
- package/lib/components/code-block/code-block.visual.test.ts +0 -18
- package/lib/components/description/description.a11y.test.ts +0 -28
- package/lib/components/description/description.visual.test.ts +0 -28
- package/lib/components/empty-state/empty-state.a11y.test.ts +0 -16
- package/lib/components/empty-state/empty-state.visual.test.ts +0 -16
- package/lib/components/expandable/expandable.a11y.test.ts +0 -26
- package/lib/components/expandable/expandable.test.ts +0 -51
- package/lib/components/expandable/expandable.visual.test.ts +0 -26
- package/lib/components/input-fill/input-fill.a11y.test.ts +0 -21
- package/lib/components/input-fill/input-fill.visual.test.ts +0 -21
- package/lib/components/input-icon/input-icon.a11y.test.ts +0 -81
- package/lib/components/input-icon/input-icon.visual.test.ts +0 -92
- package/lib/components/input-message/input-message.a11y.test.ts +0 -57
- package/lib/components/input-message/input-message.visual.test.ts +0 -58
- package/lib/components/input_textarea/input_textarea.a11y.test.ts +0 -109
- package/lib/components/input_textarea/input_textarea.visual.test.ts +0 -95
- package/lib/components/label/label.a11y.test.ts +0 -47
- package/lib/components/label/label.visual.test.ts +0 -65
- package/lib/components/link/link.a11y.test.ts +0 -27
- package/lib/components/link/link.visual.test.ts +0 -31
- package/lib/components/link-preview/link-preview.a11y.test.ts +0 -47
- package/lib/components/link-preview/link-preview.visual.test.ts +0 -52
- package/lib/components/menu/menu.a11y.test.ts +0 -39
- package/lib/components/menu/menu.visual.test.ts +0 -39
- package/lib/components/modal/modal.a11y.test.ts +0 -41
- package/lib/components/modal/modal.test.ts +0 -155
- package/lib/components/modal/modal.visual.test.ts +0 -41
- package/lib/components/navigation/navigation.a11y.test.ts +0 -81
- package/lib/components/navigation/navigation.visual.test.ts +0 -98
- package/lib/components/notice/notice.a11y.test.ts +0 -16
- package/lib/components/notice/notice.visual.test.ts +0 -25
- package/lib/components/page-title/page-title.a11y.test.ts +0 -28
- package/lib/components/page-title/page-title.visual.test.ts +0 -58
- package/lib/components/pagination/pagination.a11y.test.ts +0 -21
- package/lib/components/pagination/pagination.visual.test.ts +0 -25
- package/lib/components/popover/tooltip.test.ts +0 -62
- package/lib/components/post-summary/post-summary.a11y.test.ts +0 -25
- package/lib/components/post-summary/post-summary.test.setup.ts +0 -435
- package/lib/components/post-summary/post-summary.visual.test.ts +0 -17
- package/lib/components/progress-bar/progress-bar.a11y.test.ts +0 -189
- package/lib/components/progress-bar/progress-bar.visual.test.ts +0 -188
- package/lib/components/select/select.a11y.test.ts +0 -72
- package/lib/components/select/select.visual.test.ts +0 -72
- package/lib/components/spinner/spinner.a11y.test.ts +0 -14
- package/lib/components/spinner/spinner.visual.test.ts +0 -40
- package/lib/components/table/table.a11y.test.ts +0 -112
- package/lib/components/table/table.test.ts +0 -366
- package/lib/components/table/table.visual.test.ts +0 -104
- package/lib/components/tag/tag.a11y.test.ts +0 -28
- package/lib/components/tag/tag.visual.test.ts +0 -43
- package/lib/components/toast/toast.a11y.test.ts +0 -29
- package/lib/components/toast/toast.test.ts +0 -64
- package/lib/components/toast/toast.visual.test.ts +0 -30
- package/lib/components/toggle-switch/toggle-switch.a11y.test.ts +0 -66
- package/lib/components/toggle-switch/toggle-switch.visual.test.ts +0 -70
- package/lib/components/topbar/topbar.visual.test.ts +0 -217
- package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +0 -558
- package/lib/exports/__snapshots__/color.less.test.ts.snap +0 -819
- package/lib/exports/color-mixins.less.test.ts +0 -150
- package/lib/exports/color.less.test.ts +0 -12
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
.s-tag {
|
|
2
|
-
//
|
|
2
|
+
// Base
|
|
3
3
|
--_ta-bc: var(--theme-tag-border-color, var(--_ta-bg));
|
|
4
|
+
--_ta-bg: var(--theme-tag-background-color, var(--black-150));
|
|
5
|
+
--_ta-fc: var(--theme-tag-color, var(--black-500));
|
|
6
|
+
// Hover
|
|
4
7
|
--_ta-bc-hover: var(--theme-tag-hover-border-color, var(--_ta-bg-hover));
|
|
5
|
-
--_ta-
|
|
6
|
-
|
|
7
|
-
--_ta-bg: var(--theme-tag-background-color, var(--theme-secondary-100));
|
|
8
|
-
--_ta-bg-hover: var(--theme-tag-hover-background-color, var(--theme-secondary-200));
|
|
9
|
-
--_ta-bg-selected: var(--theme-tag-selected-background-color, var(--theme-secondary-300));
|
|
10
|
-
// Color
|
|
11
|
-
--_ta-fc: var(--theme-tag-color, var(--theme-secondary-500));
|
|
12
|
-
--_ta-fc-hover: var(--theme-tag-hover-color, var(--theme-secondary-600));
|
|
13
|
-
--_ta-fc-selected: var(--theme-tag-selected-color, var(--theme-secondary-600));
|
|
8
|
+
--_ta-bg-hover: var(--theme-tag-hover-background-color, var(--black-200));
|
|
9
|
+
--_ta-fc-hover: var(--theme-tag-hover-color, var(--black-600));
|
|
14
10
|
// Other
|
|
15
11
|
--_ta-br: var(--br-sm);
|
|
16
12
|
--_ta-fs: var(--fs-caption);
|
|
@@ -22,27 +18,11 @@
|
|
|
22
18
|
|
|
23
19
|
// CONTEXTUAL STYLES
|
|
24
20
|
.highcontrast-mode({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
text-decoration: none;
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
// STATES
|
|
32
|
-
&.is-selected {
|
|
33
|
-
&,
|
|
34
|
-
a&,
|
|
35
|
-
a&:active,
|
|
36
|
-
a&:hover {
|
|
37
|
-
.highcontrast-mode({
|
|
38
|
-
--_ta-fc-selected: var(--white);
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
background-color: var(--_ta-bg-selected);
|
|
42
|
-
border-color: var(--_ta-bc-selected);
|
|
43
|
-
color: var(--_ta-fc-selected);
|
|
21
|
+
&:not(&__moderator):not(&__required) {
|
|
22
|
+
--_ta-bc: var(--theme-tag-border-color, var(--black-300));
|
|
23
|
+
--_ta-bc-hover: var(--theme-tag-hover-border-color, var(--black-300));
|
|
44
24
|
}
|
|
45
|
-
}
|
|
25
|
+
});
|
|
46
26
|
|
|
47
27
|
// MODIFIERS
|
|
48
28
|
// Sizes
|
|
@@ -102,49 +82,25 @@
|
|
|
102
82
|
--_ta-before-icon: url("data:image/svg+xml;,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.52 7.38 1.58 9.26A12.38 12.38 0 0 1 0 7s2.63-5.14 7.05-5.14c.66 0 1.28.12 1.86.32L7.44 3.6a3.48 3.48 0 0 0-3.92 3.78ZM5.3 9.99c.5.28 1.1.44 1.71.44 1.94 0 3.5-1.53 3.5-3.43 0-.62-.17-1.21-.47-1.72L8.7 6.6a1.73 1.73 0 0 1-2.08 2.07L5.29 10Zm6.23-6.19A12.7 12.7 0 0 1 14 7s-2.63 5.14-6.95 5.14A6.1 6.1 0 0 1 4 11.3L2.27 13l-1.4-1.36L11.9 1l1.23 1.2-1.6 1.6Z'/%3E%3C/svg%3E");
|
|
103
83
|
}
|
|
104
84
|
|
|
105
|
-
// moderator overrides other
|
|
85
|
+
// moderator overrides other required
|
|
106
86
|
&&__moderator {
|
|
107
|
-
.highcontrast-mode({
|
|
108
|
-
--_ta-bg-selected: var(--orange-500);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
87
|
--_ta-bc: var(--orange-300);
|
|
112
88
|
--_ta-bg: var(--orange-100);
|
|
113
|
-
--_ta-fc: var(--orange-
|
|
89
|
+
--_ta-fc: var(--orange-500);
|
|
114
90
|
--_ta-bc-hover: var(--orange-300);
|
|
115
91
|
--_ta-bg-hover: var(--orange-200);
|
|
116
92
|
--_ta-fc-hover: var(--orange-600);
|
|
117
|
-
--_ta-bc-selected: var(--orange-400);
|
|
118
|
-
--_ta-bg-selected: var(--orange-300);
|
|
119
|
-
--_ta-fc-selected: var(--orange-600); // Currently APCA Lc 49 😔
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&&__muted:not(&__moderator):not(&__required) {
|
|
123
|
-
--_ta-bg: var(--black-150);
|
|
124
|
-
--_ta-fc: var(--black-400);
|
|
125
|
-
--_ta-bg-hover: var(--black-200);
|
|
126
|
-
--_ta-fc-hover: var(--black-500);
|
|
127
|
-
--_ta-bg-selected: var(--black-225);
|
|
128
|
-
--_ta-fc-selected: var(--black-600);
|
|
129
|
-
|
|
130
|
-
.highcontrast-mode({ --_ta-bc: currentColor; }); // Specificity has bit us, so we need this override
|
|
131
93
|
}
|
|
132
94
|
|
|
133
95
|
&&__required:not(&__moderator) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
--_ta-
|
|
137
|
-
--_ta-bc-hover: var(--theme-tag-required-hover-border-color, var(--
|
|
138
|
-
--_ta-
|
|
139
|
-
|
|
140
|
-
--_ta-bg: var(--theme-tag-required-background-color, var(--theme-secondary-500));
|
|
141
|
-
--_ta-bg-hover: var(--theme-tag-required-hover-background-color, var(--theme-secondary-400));
|
|
142
|
-
--_ta-bg-selected: var(--theme-tag-required-selected-background-color, var(--theme-secondary-600));
|
|
143
|
-
// Color
|
|
144
|
-
--_ta-fc: var(--theme-tag-required-color, var(--white));
|
|
145
|
-
--_ta-fc-hover: var(--theme-tag-required-hover-color, var(--white));
|
|
146
|
-
--_ta-fc-selected: var(--theme-tag-required-selected-color, var(--white));
|
|
96
|
+
--_ta-bc: var(--theme-tag-required-border-color, var(--theme-tag-border-color, var(--black-400)));
|
|
97
|
+
--_ta-bg: var(--theme-tag-required-background-color, var(--theme-tag-background-color, var(--black-150)));
|
|
98
|
+
--_ta-fc: var(--theme-tag-required-color, var(--theme-tag-color, var(--black-500)));
|
|
99
|
+
--_ta-bc-hover: var(--theme-tag-required-hover-border-color, var(--theme-tag-hover-border-color, var(--black-600)));
|
|
100
|
+
--_ta-bg-hover: var(--theme-tag-required-hover-background-color, var(--theme-tag-hover-background-color, var(--black-200)));
|
|
101
|
+
--_ta-fc-hover: var(--theme-tag-required-hover-color, var(--theme-tag-hover-color, var(--black-600)));
|
|
147
102
|
}
|
|
103
|
+
|
|
148
104
|
&__watched, // TODO: remove all single `&` watched styles once core no longer requires them
|
|
149
105
|
&&__watched {
|
|
150
106
|
--_ta-before-icon: url("data:image/svg+xml;,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7.05 1C2.63 1 0 6.5 0 6.5S2.63 12 7.05 12C11.38 12 14 6.5 14 6.5S11.37 1 7.05 1ZM7 10.17A3.59 3.59 0 0 1 3.5 6.5 3.6 3.6 0 0 1 7 2.83c1.94 0 3.5 1.65 3.5 3.67A3.57 3.57 0 0 1 7 10.17Zm0-1.84c.97 0 1.75-.81 1.75-1.83S7.97 4.67 7 4.67s-1.75.81-1.75 1.83S6.03 8.33 7 8.33Z'/%3E%3C/svg%3E");
|
|
@@ -197,13 +153,9 @@
|
|
|
197
153
|
}
|
|
198
154
|
|
|
199
155
|
// INTERACTION
|
|
200
|
-
a
|
|
156
|
+
a& {
|
|
201
157
|
&:hover,
|
|
202
158
|
&:active {
|
|
203
|
-
.highcontrast-mode({
|
|
204
|
-
border-color: currentColor;
|
|
205
|
-
});
|
|
206
|
-
|
|
207
159
|
background-color: var(--_ta-bg-hover);
|
|
208
160
|
border-color: var(--_ta-bc-hover);
|
|
209
161
|
color: var(--_ta-fc-hover);
|
|
@@ -225,6 +177,7 @@
|
|
|
225
177
|
|
|
226
178
|
align-items: center;
|
|
227
179
|
display: inline-flex;
|
|
180
|
+
font-weight: 700;
|
|
228
181
|
justify-content: center;
|
|
229
182
|
min-width: 0;
|
|
230
183
|
text-decoration: none;
|
|
@@ -506,10 +506,10 @@
|
|
|
506
506
|
comment: hsl(0, 0%, 60%);
|
|
507
507
|
deletion: var(--red-500);
|
|
508
508
|
keyword:var(--blue-400);
|
|
509
|
-
literal: hsl(27,
|
|
510
|
-
namespace: hsl(27,
|
|
509
|
+
literal: hsl(27, 95%, 65%);
|
|
510
|
+
namespace: hsl(27, 95%, 65%);
|
|
511
511
|
punctuation: hsl(0, 0%, 80%);
|
|
512
|
-
symbol: hsl(306,
|
|
512
|
+
symbol: hsl(306, 50%, 75%);
|
|
513
513
|
variable: hsl(65.5, 39%, 57.5%);
|
|
514
514
|
}
|
|
515
515
|
.set-highlight-hc() {
|
|
@@ -524,7 +524,7 @@
|
|
|
524
524
|
namespace: hsl(16, 94%, 31%);
|
|
525
525
|
punctuation: var(--black-500);
|
|
526
526
|
symbol: hsl(309, 45%, 31%);
|
|
527
|
-
variable: hsl(88, 100%,
|
|
527
|
+
variable: hsl(88, 100%, 18%);
|
|
528
528
|
}
|
|
529
529
|
.set-highlight-hc-dark() {
|
|
530
530
|
addition: var(--green-500);
|
package/package.json
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/StackExchange/Stacks.git"
|
|
7
7
|
},
|
|
8
|
-
"version": "2.
|
|
8
|
+
"version": "2.5.1",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
-
"lib"
|
|
11
|
+
"lib",
|
|
12
|
+
"!lib/**/*.test.*"
|
|
12
13
|
],
|
|
13
14
|
"main": "./dist/js/stacks.js",
|
|
14
15
|
"types": "./dist/index.d.ts",
|
|
@@ -47,15 +48,15 @@
|
|
|
47
48
|
"@open-wc/testing": "^4.0.0",
|
|
48
49
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
49
50
|
"@rollup/plugin-replace": "^5.0.5",
|
|
50
|
-
"@stackoverflow/stacks-editor": "^0.10.
|
|
51
|
+
"@stackoverflow/stacks-editor": "^0.10.6",
|
|
51
52
|
"@stackoverflow/stacks-icons": "^6.0.2",
|
|
52
|
-
"@testing-library/dom": "^
|
|
53
|
+
"@testing-library/dom": "^10.0.0",
|
|
53
54
|
"@testing-library/user-event": "^14.5.2",
|
|
54
55
|
"@types/cssbeautify": "^0.3.5",
|
|
55
56
|
"@types/less": "^3.0.6",
|
|
56
57
|
"@types/mocha": "^10.0.6",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
58
|
-
"@typescript-eslint/parser": "^7.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^7.7.1",
|
|
59
|
+
"@typescript-eslint/parser": "^7.7.1",
|
|
59
60
|
"@web/dev-server-esbuild": "^1.0.2",
|
|
60
61
|
"@web/dev-server-rollup": "^0.6.1",
|
|
61
62
|
"@web/test-runner": "^0.18.1",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"apca-check": "^0.1.0",
|
|
65
66
|
"colorjs.io": "^0.5.0",
|
|
66
67
|
"concurrently": "^8.2.2",
|
|
67
|
-
"css-loader": "^
|
|
68
|
+
"css-loader": "^7.1.1",
|
|
68
69
|
"cssbeautify": "^0.3.1",
|
|
69
70
|
"cssnano": "^6.1.2",
|
|
70
71
|
"docsearch.js": "^2.6.3",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"less-loader": "^12.2.0",
|
|
78
79
|
"list.js": "^2.3.1",
|
|
79
80
|
"markdown-it": "^14.1.0",
|
|
80
|
-
"mini-css-extract-plugin": "^2.
|
|
81
|
+
"mini-css-extract-plugin": "^2.9.0",
|
|
81
82
|
"postcss-less": "^6.0.0",
|
|
82
83
|
"postcss-loader": "^8.1.1",
|
|
83
84
|
"prettier": "^3.2.5",
|
|
@@ -88,7 +89,7 @@
|
|
|
88
89
|
"terser-webpack-plugin": "^5.3.10",
|
|
89
90
|
"ts-loader": "^9.5.1",
|
|
90
91
|
"typescript": "^5.4.5",
|
|
91
|
-
"vitest": "^1.5.
|
|
92
|
+
"vitest": "^1.5.2",
|
|
92
93
|
"webpack": "^5.91.0",
|
|
93
94
|
"webpack-cli": "^5.1.4",
|
|
94
95
|
"webpack-merge": "^5.10.0"
|