@stackoverflow/stacks 2.0.8 → 2.1.0-rc.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/LICENSE.MD +1 -1
  2. package/README.md +7 -9
  3. package/dist/css/stacks.css +234 -214
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +1 -1
  6. package/lib/atomic/misc.less +1 -1
  7. package/lib/components/activity-indicator/activity-indicator.a11y.test.ts +2 -3
  8. package/lib/components/activity-indicator/activity-indicator.less +5 -5
  9. package/lib/components/activity-indicator/activity-indicator.visual.test.ts +2 -3
  10. package/lib/components/anchor/anchor.a11y.test.ts +2 -4
  11. package/lib/components/anchor/anchor.visual.test.ts +2 -4
  12. package/lib/components/avatar/avatar.a11y.test.ts +2 -3
  13. package/lib/components/avatar/avatar.visual.test.ts +2 -3
  14. package/lib/components/award-bling/award-bling.a11y.test.ts +2 -4
  15. package/lib/components/award-bling/award-bling.visual.test.ts +2 -4
  16. package/lib/components/badge/badge.a11y.test.ts +7 -16
  17. package/lib/components/badge/badge.visual.test.ts +8 -21
  18. package/lib/components/banner/banner.a11y.test.ts +2 -3
  19. package/lib/components/banner/banner.visual.test.ts +2 -3
  20. package/lib/components/block-link/block-link.a11y.test.ts +4 -9
  21. package/lib/components/block-link/block-link.less +7 -10
  22. package/lib/components/block-link/block-link.visual.test.ts +4 -9
  23. package/lib/components/breadcrumbs/breadcrumbs.a11y.test.ts +2 -3
  24. package/lib/components/breadcrumbs/breadcrumbs.visual.test.ts +2 -3
  25. package/lib/components/button/button.a11y.test.ts +2 -3
  26. package/lib/components/button/button.less +70 -35
  27. package/lib/components/button/button.visual.test.ts +2 -3
  28. package/lib/components/card/card.a11y.test.ts +2 -3
  29. package/lib/components/card/card.visual.test.ts +3 -6
  30. package/lib/components/check-control/check-control.a11y.test.ts +2 -4
  31. package/lib/components/check-control/check-control.visual.test.ts +2 -4
  32. package/lib/components/check-group/check-group.a11y.test.ts +2 -4
  33. package/lib/components/check-group/check-group.visual.test.ts +2 -4
  34. package/lib/components/checkbox_radio/checkbox_radio.a11y.test.ts +2 -4
  35. package/lib/components/checkbox_radio/checkbox_radio.less +1 -13
  36. package/lib/components/checkbox_radio/checkbox_radio.visual.test.ts +2 -4
  37. package/lib/components/code-block/code-block.a11y.test.ts +2 -4
  38. package/lib/components/code-block/code-block.visual.test.ts +2 -4
  39. package/lib/components/description/description.a11y.test.ts +2 -4
  40. package/lib/components/description/description.visual.test.ts +2 -4
  41. package/lib/components/empty-state/empty-state.a11y.test.ts +2 -3
  42. package/lib/components/empty-state/empty-state.visual.test.ts +2 -3
  43. package/lib/components/expandable/expandable.a11y.test.ts +2 -3
  44. package/lib/components/expandable/expandable.visual.test.ts +2 -3
  45. package/lib/components/input-fill/input-fill.a11y.test.ts +2 -3
  46. package/lib/components/input-fill/input-fill.visual.test.ts +2 -3
  47. package/lib/components/input-message/input-message.a11y.test.ts +2 -3
  48. package/lib/components/input-message/input-message.visual.test.ts +2 -3
  49. package/lib/components/input_textarea/input_textarea.a11y.test.ts +4 -7
  50. package/lib/components/input_textarea/input_textarea.less +2 -20
  51. package/lib/components/input_textarea/input_textarea.visual.test.ts +4 -7
  52. package/lib/components/label/label.a11y.test.ts +2 -3
  53. package/lib/components/label/label.visual.test.ts +2 -3
  54. package/lib/components/link/link.a11y.test.ts +2 -3
  55. package/lib/components/link/link.visual.test.ts +2 -3
  56. package/lib/components/link-preview/link-preview.a11y.test.ts +2 -3
  57. package/lib/components/link-preview/link-preview.visual.test.ts +3 -3
  58. package/lib/components/menu/menu.a11y.test.ts +2 -3
  59. package/lib/components/menu/menu.visual.test.ts +2 -3
  60. package/lib/components/modal/modal.a11y.test.ts +2 -3
  61. package/lib/components/modal/modal.visual.test.ts +2 -3
  62. package/lib/components/navigation/navigation.a11y.test.ts +2 -3
  63. package/lib/components/navigation/navigation.less +3 -1
  64. package/lib/components/navigation/navigation.visual.test.ts +3 -6
  65. package/lib/components/notice/notice.a11y.test.ts +2 -3
  66. package/lib/components/notice/notice.visual.test.ts +2 -3
  67. package/lib/components/page-title/page-title.a11y.test.ts +2 -3
  68. package/lib/components/page-title/page-title.visual.test.ts +2 -3
  69. package/lib/components/pagination/pagination.a11y.test.ts +2 -3
  70. package/lib/components/pagination/pagination.less +9 -0
  71. package/lib/components/pagination/pagination.visual.test.ts +2 -3
  72. package/lib/components/progress-bar/progress-bar.a11y.test.ts +7 -18
  73. package/lib/components/progress-bar/progress-bar.less +1 -1
  74. package/lib/components/progress-bar/progress-bar.visual.test.ts +7 -18
  75. package/lib/components/select/select.less +1 -15
  76. package/lib/components/spinner/spinner.a11y.test.ts +2 -3
  77. package/lib/components/spinner/spinner.visual.test.ts +4 -7
  78. package/lib/components/table/table.a11y.test.ts +3 -4
  79. package/lib/components/table/table.visual.test.ts +2 -3
  80. package/lib/components/tag/tag.a11y.test.ts +2 -3
  81. package/lib/components/tag/tag.less +27 -21
  82. package/lib/components/tag/tag.visual.test.ts +3 -6
  83. package/lib/components/toast/toast.a11y.test.ts +2 -3
  84. package/lib/components/toast/toast.visual.test.ts +2 -3
  85. package/lib/components/toggle-switch/toggle-switch.a11y.test.ts +3 -6
  86. package/lib/components/toggle-switch/toggle-switch.less +5 -16
  87. package/lib/components/toggle-switch/toggle-switch.visual.test.ts +3 -7
  88. package/lib/components/topbar/topbar.less +61 -39
  89. package/lib/components/topbar/topbar.visual.test.ts +188 -0
  90. package/lib/components/uploader/uploader.less +1 -1
  91. package/lib/exports/__snapshots__/color-mixins.less.test.ts.snap +12 -0
  92. package/lib/exports/__snapshots__/color.less.test.ts.snap +45 -0
  93. package/lib/exports/color-mixins.less +2 -0
  94. package/lib/exports/color-sets.less +44 -7
  95. package/lib/exports/mixins.less +33 -0
  96. package/lib/input-utils.less +0 -3
  97. package/lib/test/a11y-test-utils.ts +94 -0
  98. package/lib/test/assertions.ts +10 -3
  99. package/lib/test/test-utils.ts +152 -300
  100. package/lib/test/visual-test-utils.ts +58 -0
  101. package/lib/tsconfig.json +3 -3
  102. package/package.json +12 -13
  103. package/lib/components/popover/tooltip.visual.test.ts +0 -31
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "https://github.com/StackExchange/Stacks.git"
7
7
  },
8
- "version": "2.0.8",
8
+ "version": "2.1.0-rc.0",
9
9
  "files": [
10
10
  "dist",
11
11
  "lib"
@@ -27,7 +27,6 @@
27
27
  "test:unit": "web-test-runner --group=unit",
28
28
  "test:unit:watch": "web-test-runner --group=unit --watch",
29
29
  "test:visual": "pwsh run-test-visual.ps1 npx web-test-runner --group=visual",
30
- "test:visual:update": "pwsh run-test-visual.ps1 npx web-test-runner --group=visual --update-visual-baseline",
31
30
  "test:less": "vitest run .less.test.ts",
32
31
  "test:less:update": "npm run test:less -- -u",
33
32
  "prepublishOnly": "npm run build",
@@ -50,13 +49,13 @@
50
49
  "@rollup/plugin-replace": "^5.0.5",
51
50
  "@stackoverflow/stacks-editor": "^0.9.1",
52
51
  "@stackoverflow/stacks-icons": "^6.0.0",
53
- "@testing-library/dom": "^9.3.3",
52
+ "@testing-library/dom": "^9.3.4",
54
53
  "@testing-library/user-event": "^14.5.2",
55
54
  "@types/cssbeautify": "^0.3.5",
56
55
  "@types/less": "^3.0.6",
57
56
  "@types/mocha": "^10.0.6",
58
- "@typescript-eslint/eslint-plugin": "^6.18.0",
59
- "@typescript-eslint/parser": "^6.18.0",
57
+ "@typescript-eslint/eslint-plugin": "^6.20.0",
58
+ "@typescript-eslint/parser": "^6.21.0",
60
59
  "@web/dev-server-esbuild": "^1.0.1",
61
60
  "@web/dev-server-rollup": "^0.6.1",
62
61
  "@web/test-runner": "^0.18.0",
@@ -65,7 +64,7 @@
65
64
  "apca-check": "^0.1.0",
66
65
  "colorjs.io": "^0.4.5",
67
66
  "concurrently": "^8.2.2",
68
- "css-loader": "^6.8.1",
67
+ "css-loader": "^6.10.0",
69
68
  "cssbeautify": "^0.3.1",
70
69
  "cssnano": "^6.0.3",
71
70
  "docsearch.js": "^2.6.3",
@@ -75,22 +74,22 @@
75
74
  "eslint-config-prettier": "^9.1.0",
76
75
  "eslint-plugin-no-unsanitized": "^4.0.2",
77
76
  "jquery": "^3.7.1",
78
- "less-loader": "^11.1.4",
77
+ "less-loader": "^12.2.0",
79
78
  "list.js": "^2.3.1",
80
79
  "markdown-it": "^14.0.0",
81
- "mini-css-extract-plugin": "^2.7.6",
80
+ "mini-css-extract-plugin": "^2.7.7",
82
81
  "postcss-less": "^6.0.0",
83
- "postcss-loader": "^7.3.4",
84
- "prettier": "^3.1.1",
82
+ "postcss-loader": "^8.0.0",
83
+ "prettier": "^3.2.4",
85
84
  "rollup-plugin-postcss": "^4.0.2",
86
- "stylelint": "^16.1.0",
85
+ "stylelint": "^16.2.0",
87
86
  "stylelint-config-recommended": "^14.0.0",
88
87
  "stylelint-config-standard": "^36.0.0",
89
88
  "terser-webpack-plugin": "^5.3.10",
90
89
  "ts-loader": "^9.5.1",
91
90
  "typescript": "^5.3.3",
92
- "vitest": "^1.1.3",
93
- "webpack": "^5.89.0",
91
+ "vitest": "^1.2.2",
92
+ "webpack": "^5.90.1",
94
93
  "webpack-cli": "^5.1.4",
95
94
  "webpack-merge": "^5.10.0"
96
95
  },
@@ -1,31 +0,0 @@
1
- import { html, fixture } from "@open-wc/testing";
2
- import { screen } from "@testing-library/dom";
3
- import userEvent from "@testing-library/user-event";
4
- import { visualDiff } from "@web/test-runner-visual-regression";
5
- import "../../index";
6
-
7
- const user = userEvent.setup();
8
-
9
- describe("tooltip", () => {
10
- it("should not introduce visual regressions", async () => {
11
- const wrapper = await fixture(html`
12
- <div style="height: 100px; width: 160px; display: inline-block;">
13
- <button
14
- class="s-btn s-btn__filled"
15
- role="button"
16
- data-controller="s-tooltip"
17
- title="tooltip content"
18
- data-s-tooltip-placement="bottom-start"
19
- >
20
- Hover tooltip popover
21
- </button>
22
- </div>
23
- `);
24
-
25
- const trigger = screen.getByRole("button");
26
- await user.hover(trigger);
27
- await screen.findByRole("tooltip");
28
-
29
- await visualDiff(wrapper, "s-tooltip");
30
- });
31
- });