@stackoverflow/stacks 2.3.3 → 2.5.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/dist/css/stacks.css +37 -4884
- package/dist/css/stacks.min.css +1 -1
- package/lib/components/button/button.less +0 -18
- package/lib/components/tag/tag.less +16 -68
- package/lib/components/topbar/topbar.less +33 -3
- package/lib/exports/color-mixins.less +0 -2
- package/lib/exports/exports.less +0 -1
- package/lib/stacks-static.less +0 -5
- package/package.json +12 -11
- 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/atomic/v1/__snapshots__/border.less.test.ts.snap +0 -546
- package/lib/atomic/v1/__snapshots__/color.less.test.ts.snap +0 -6750
- package/lib/atomic/v1/__snapshots__/typography.less.test.ts.snap +0 -16
- package/lib/atomic/v1/border.less +0 -210
- package/lib/atomic/v1/border.less.test.ts +0 -14
- package/lib/atomic/v1/color.less +0 -183
- package/lib/atomic/v1/color.less.test.ts +0 -14
- package/lib/atomic/v1/typography.less +0 -8
- package/lib/atomic/v1/typography.less.test.ts +0 -14
- 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 -216
- 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
- package/lib/exports/v1/__snapshots__/constants-colors.less.test.ts.snap +0 -902
- package/lib/exports/v1/constants-colors.less +0 -893
- package/lib/exports/v1/constants-colors.less.test.ts +0 -12
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { renderLess } from "../test/less-test-utils";
|
|
3
|
-
|
|
4
|
-
describe("color-mixins", () => {
|
|
5
|
-
describe("colors", () => {
|
|
6
|
-
describe("generate-colors", () => {
|
|
7
|
-
it("light", async () => {
|
|
8
|
-
const css = await renderLess(`
|
|
9
|
-
@import (reference) "color-mixins.less";
|
|
10
|
-
|
|
11
|
-
// TODO: figure out how to simplify sets to reduce output
|
|
12
|
-
|
|
13
|
-
/* .generate-colors(light) */
|
|
14
|
-
body {
|
|
15
|
-
.generate-colors(light);
|
|
16
|
-
}
|
|
17
|
-
`);
|
|
18
|
-
|
|
19
|
-
expect(css).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
it("create-colors", async () => {
|
|
23
|
-
const css = await renderLess(`
|
|
24
|
-
@import (reference) "color-mixins.less";
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
.set-test-emerald() {
|
|
28
|
-
default: hsl(150, 60%, 55%);
|
|
29
|
-
}
|
|
30
|
-
.set-test-ruby() {
|
|
31
|
-
100: hsl(350, 70%, 97%);
|
|
32
|
-
600: hsl(350, 70%, 29%);
|
|
33
|
-
}
|
|
34
|
-
.sets-test() {
|
|
35
|
-
emerald: .set-test-emerald();
|
|
36
|
-
ruby: .set-test-ruby();
|
|
37
|
-
}
|
|
38
|
-
*/
|
|
39
|
-
.set-test-emerald() {
|
|
40
|
-
default: hsl(150, 60%, 55%);
|
|
41
|
-
}
|
|
42
|
-
.set-test-ruby() {
|
|
43
|
-
100: hsl(350, 70%, 97%);
|
|
44
|
-
600: hsl(350, 70%, 29%);
|
|
45
|
-
}
|
|
46
|
-
.sets-test() {
|
|
47
|
-
emerald: .set-test-emerald();
|
|
48
|
-
ruby: .set-test-ruby();
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/* .create-colors(.sets-test(), variables) */
|
|
52
|
-
body {
|
|
53
|
-
.create-colors(.sets-test(), variables);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* .create-colors(.sets-test(), classes) */
|
|
57
|
-
body {
|
|
58
|
-
.create-colors(.sets-test(), classes);
|
|
59
|
-
}
|
|
60
|
-
`);
|
|
61
|
-
|
|
62
|
-
expect(css).toMatchSnapshot();
|
|
63
|
-
});
|
|
64
|
-
it("create-color-classes", async () => {
|
|
65
|
-
const css = await renderLess(`
|
|
66
|
-
@import (reference) "color-mixins.less";
|
|
67
|
-
/* .create-color-classes(red-500, var(--red-500)) */
|
|
68
|
-
/* .create-color-classes(blue-400, var(--blue-400), dark, color) */
|
|
69
|
-
/* .create-color-classes(green-300, var(--green-300), light, background-color) */
|
|
70
|
-
body {
|
|
71
|
-
.create-color-classes(red-500, var(--red-500));
|
|
72
|
-
.create-color-classes(blue-500, var(--blue-500), dark, color);
|
|
73
|
-
.create-color-classes(green-300, var(--green-300), light, background-color);
|
|
74
|
-
}
|
|
75
|
-
`);
|
|
76
|
-
|
|
77
|
-
expect(css).toMatchSnapshot();
|
|
78
|
-
});
|
|
79
|
-
it(".create-aliased-utility-classes", async () => {
|
|
80
|
-
const css = await renderLess(`
|
|
81
|
-
@import (reference) "color-mixins.less";
|
|
82
|
-
/* .create-aliased-utility-classes() */
|
|
83
|
-
/* .create-aliased-utility-classes(dark) */
|
|
84
|
-
body {
|
|
85
|
-
.create-aliased-utility-classes();
|
|
86
|
-
}
|
|
87
|
-
body.theme-dark {
|
|
88
|
-
.create-aliased-utility-classes(dark);
|
|
89
|
-
}
|
|
90
|
-
`);
|
|
91
|
-
|
|
92
|
-
expect(css).toMatchSnapshot();
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
describe("theming", () => {
|
|
96
|
-
it("create-custom-theme-hsl-rgb-variables", async () => {
|
|
97
|
-
const css = await renderLess(`
|
|
98
|
-
@import (reference) "color-mixins.less";
|
|
99
|
-
create-custom-theme-hsl-rgb-variables(#ff1100, primary, base) {
|
|
100
|
-
.create-custom-theme-hsl-variables(#ff1100, primary, base);
|
|
101
|
-
}
|
|
102
|
-
create-custom-theme-hsl-rgb-variables(#29ff53, secondary, base) {
|
|
103
|
-
.create-custom-theme-hsl-variables(#29ff53, secondary, base);
|
|
104
|
-
}
|
|
105
|
-
create-custom-theme-hsl-rgb-variables(#1c091d, primary, dark) {
|
|
106
|
-
.create-custom-theme-hsl-variables(#1c091d, primary, dark);
|
|
107
|
-
}
|
|
108
|
-
create-custom-theme-hsl-rgb-variables(#49281f, secondary, dark) {
|
|
109
|
-
.create-custom-theme-hsl-variables(#49281f, secondary, dark);
|
|
110
|
-
}
|
|
111
|
-
`);
|
|
112
|
-
|
|
113
|
-
expect(css).toMatchSnapshot();
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it("create-theme-variables", async () => {
|
|
117
|
-
const css = await renderLess(`
|
|
118
|
-
@import (reference) "color-mixins.less";
|
|
119
|
-
body {
|
|
120
|
-
.create-theme-variables();
|
|
121
|
-
}
|
|
122
|
-
body.theme-highcontrast {
|
|
123
|
-
.create-theme-variables(light-highcontrast);
|
|
124
|
-
}
|
|
125
|
-
`);
|
|
126
|
-
|
|
127
|
-
expect(css).toMatchSnapshot();
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it("create-custom-theme-variables", async () => {
|
|
131
|
-
const css = await renderLess(`
|
|
132
|
-
@import (reference) "color-mixins.less";
|
|
133
|
-
create-custom-theme-variables(primary, base) {
|
|
134
|
-
.create-custom-theme-variables(primary, base);
|
|
135
|
-
}
|
|
136
|
-
create-custom-theme-variables(primary, dark) {
|
|
137
|
-
.create-custom-theme-variables(primary, dark);
|
|
138
|
-
}
|
|
139
|
-
create-custom-theme-variables(secondary, base) {
|
|
140
|
-
.create-custom-theme-variables(secondary, base);
|
|
141
|
-
}
|
|
142
|
-
create-custom-theme-variables(secondary, base) {
|
|
143
|
-
.create-custom-theme-variables(secondary, base);
|
|
144
|
-
}
|
|
145
|
-
`);
|
|
146
|
-
|
|
147
|
-
expect(css).toMatchSnapshot();
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { renderLess } from "../test/less-test-utils";
|
|
3
|
-
|
|
4
|
-
describe("colors", () => {
|
|
5
|
-
it("should output all the css generated by the v2 colors/theming generation mixins", async () => {
|
|
6
|
-
const css = await renderLess(`
|
|
7
|
-
@import "./lib/exports/color.less";
|
|
8
|
-
`);
|
|
9
|
-
|
|
10
|
-
expect(css).toMatchSnapshot();
|
|
11
|
-
});
|
|
12
|
-
});
|