@stackoverflow/stacks 2.4.0 → 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.
Files changed (103) hide show
  1. package/dist/css/stacks.css +12 -58
  2. package/dist/css/stacks.min.css +1 -1
  3. package/lib/components/tag/tag.less +16 -68
  4. package/package.json +10 -9
  5. package/lib/atomic/__snapshots__/color-new.less.test.ts.snap +0 -3015
  6. package/lib/atomic/__snapshots__/color.less.test.ts.snap +0 -3132
  7. package/lib/atomic/__snapshots__/misc.less.test.ts.snap +0 -893
  8. package/lib/atomic/__snapshots__/spacing.less.test.ts.snap +0 -1928
  9. package/lib/atomic/color.less.test.ts +0 -12
  10. package/lib/atomic/misc.less.test.ts +0 -12
  11. package/lib/atomic/spacing.less.test.ts +0 -12
  12. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +0 -13
  13. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +0 -22
  14. package/lib/components/anchor/anchor.a11y.test.ts +0 -35
  15. package/lib/components/anchor/anchor.visual.test.ts +0 -47
  16. package/lib/components/avatar/avatar.a11y.test.ts +0 -35
  17. package/lib/components/avatar/avatar.visual.test.ts +0 -50
  18. package/lib/components/award-bling/award-bling.a11y.test.ts +0 -15
  19. package/lib/components/award-bling/award-bling.visual.test.ts +0 -24
  20. package/lib/components/badge/badge.a11y.test.ts +0 -143
  21. package/lib/components/badge/badge.visual.test.ts +0 -165
  22. package/lib/components/banner/banner.a11y.test.ts +0 -36
  23. package/lib/components/banner/banner.test.ts +0 -73
  24. package/lib/components/banner/banner.visual.test.ts +0 -36
  25. package/lib/components/block-link/block-link.a11y.test.ts +0 -57
  26. package/lib/components/block-link/block-link.visual.test.ts +0 -57
  27. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +0 -36
  28. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +0 -36
  29. package/lib/components/button/button.a11y.test.ts +0 -21
  30. package/lib/components/button/button.test.setup.ts +0 -36
  31. package/lib/components/button/button.visual.test.ts +0 -18
  32. package/lib/components/button-group/button-group.a11y.test.ts +0 -12
  33. package/lib/components/button-group/button-group.test.setup.ts +0 -77
  34. package/lib/components/button-group/button-group.visual.test.ts +0 -7
  35. package/lib/components/card/card.a11y.test.ts +0 -12
  36. package/lib/components/card/card.visual.test.ts +0 -52
  37. package/lib/components/check-control/check-control.a11y.test.ts +0 -33
  38. package/lib/components/check-control/check-control.visual.test.ts +0 -36
  39. package/lib/components/check-group/check-group.a11y.test.ts +0 -49
  40. package/lib/components/check-group/check-group.visual.test.ts +0 -56
  41. package/lib/components/checkbox_radio/checkbox_radio.a11y.test.ts +0 -37
  42. package/lib/components/checkbox_radio/checkbox_radio.visual.test.ts +0 -33
  43. package/lib/components/code-block/code-block.a11y.test.ts +0 -27
  44. package/lib/components/code-block/code-block.visual.test.ts +0 -18
  45. package/lib/components/description/description.a11y.test.ts +0 -28
  46. package/lib/components/description/description.visual.test.ts +0 -28
  47. package/lib/components/empty-state/empty-state.a11y.test.ts +0 -16
  48. package/lib/components/empty-state/empty-state.visual.test.ts +0 -16
  49. package/lib/components/expandable/expandable.a11y.test.ts +0 -26
  50. package/lib/components/expandable/expandable.test.ts +0 -51
  51. package/lib/components/expandable/expandable.visual.test.ts +0 -26
  52. package/lib/components/input-fill/input-fill.a11y.test.ts +0 -21
  53. package/lib/components/input-fill/input-fill.visual.test.ts +0 -21
  54. package/lib/components/input-icon/input-icon.a11y.test.ts +0 -81
  55. package/lib/components/input-icon/input-icon.visual.test.ts +0 -92
  56. package/lib/components/input-message/input-message.a11y.test.ts +0 -57
  57. package/lib/components/input-message/input-message.visual.test.ts +0 -58
  58. package/lib/components/input_textarea/input_textarea.a11y.test.ts +0 -109
  59. package/lib/components/input_textarea/input_textarea.visual.test.ts +0 -95
  60. package/lib/components/label/label.a11y.test.ts +0 -47
  61. package/lib/components/label/label.visual.test.ts +0 -65
  62. package/lib/components/link/link.a11y.test.ts +0 -27
  63. package/lib/components/link/link.visual.test.ts +0 -31
  64. package/lib/components/link-preview/link-preview.a11y.test.ts +0 -47
  65. package/lib/components/link-preview/link-preview.visual.test.ts +0 -52
  66. package/lib/components/menu/menu.a11y.test.ts +0 -39
  67. package/lib/components/menu/menu.visual.test.ts +0 -39
  68. package/lib/components/modal/modal.a11y.test.ts +0 -41
  69. package/lib/components/modal/modal.test.ts +0 -155
  70. package/lib/components/modal/modal.visual.test.ts +0 -41
  71. package/lib/components/navigation/navigation.a11y.test.ts +0 -81
  72. package/lib/components/navigation/navigation.visual.test.ts +0 -98
  73. package/lib/components/notice/notice.a11y.test.ts +0 -16
  74. package/lib/components/notice/notice.visual.test.ts +0 -25
  75. package/lib/components/page-title/page-title.a11y.test.ts +0 -28
  76. package/lib/components/page-title/page-title.visual.test.ts +0 -58
  77. package/lib/components/pagination/pagination.a11y.test.ts +0 -21
  78. package/lib/components/pagination/pagination.visual.test.ts +0 -25
  79. package/lib/components/popover/tooltip.test.ts +0 -62
  80. package/lib/components/post-summary/post-summary.a11y.test.ts +0 -25
  81. package/lib/components/post-summary/post-summary.test.setup.ts +0 -435
  82. package/lib/components/post-summary/post-summary.visual.test.ts +0 -17
  83. package/lib/components/progress-bar/progress-bar.a11y.test.ts +0 -189
  84. package/lib/components/progress-bar/progress-bar.visual.test.ts +0 -188
  85. package/lib/components/select/select.a11y.test.ts +0 -72
  86. package/lib/components/select/select.visual.test.ts +0 -72
  87. package/lib/components/spinner/spinner.a11y.test.ts +0 -14
  88. package/lib/components/spinner/spinner.visual.test.ts +0 -40
  89. package/lib/components/table/table.a11y.test.ts +0 -112
  90. package/lib/components/table/table.test.ts +0 -366
  91. package/lib/components/table/table.visual.test.ts +0 -104
  92. package/lib/components/tag/tag.a11y.test.ts +0 -28
  93. package/lib/components/tag/tag.visual.test.ts +0 -43
  94. package/lib/components/toast/toast.a11y.test.ts +0 -29
  95. package/lib/components/toast/toast.test.ts +0 -64
  96. package/lib/components/toast/toast.visual.test.ts +0 -30
  97. package/lib/components/toggle-switch/toggle-switch.a11y.test.ts +0 -66
  98. package/lib/components/toggle-switch/toggle-switch.visual.test.ts +0 -70
  99. package/lib/components/topbar/topbar.visual.test.ts +0 -217
  100. package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +0 -558
  101. package/lib/exports/__snapshots__/color.less.test.ts.snap +0 -819
  102. package/lib/exports/color-mixins.less.test.ts +0 -150
  103. package/lib/exports/color.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
- });