@stackoverflow/stacks 0.69.1 → 0.73.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 (45) hide show
  1. package/README.md +1 -1
  2. package/dist/css/stacks.css +2166 -941
  3. package/dist/css/stacks.min.css +1 -1
  4. package/dist/js/stacks.js +167 -92
  5. package/dist/js/stacks.min.js +1 -1
  6. package/lib/css/atomic/_stacks-borders.less +18 -0
  7. package/lib/css/atomic/_stacks-flex.less +2 -7
  8. package/lib/css/atomic/_stacks-grid.less +2 -0
  9. package/lib/css/atomic/_stacks-misc.less +8 -4
  10. package/lib/css/atomic/_stacks-typography.less +23 -8
  11. package/lib/css/base/_stacks-configuration-dynamic.less +13 -56
  12. package/lib/css/components/_stacks-activity-indicator.less +26 -2
  13. package/lib/css/components/_stacks-avatars.less +9 -0
  14. package/lib/css/components/_stacks-badges.less +21 -9
  15. package/lib/css/components/_stacks-breadcrumbs.less +2 -0
  16. package/lib/css/components/_stacks-button-groups.less +11 -0
  17. package/lib/css/components/_stacks-buttons.less +143 -42
  18. package/lib/css/components/_stacks-cards.less +9 -13
  19. package/lib/css/components/_stacks-code-blocks.less +1 -1
  20. package/lib/css/components/_stacks-inputs.less +78 -9
  21. package/lib/css/components/_stacks-link-previews.less +10 -7
  22. package/lib/css/components/_stacks-links.less +29 -9
  23. package/lib/css/components/_stacks-menu.less +4 -4
  24. package/lib/css/components/_stacks-modals.less +1 -1
  25. package/lib/css/components/_stacks-navigation.less +43 -0
  26. package/lib/css/components/_stacks-notices.less +40 -3
  27. package/lib/css/components/_stacks-page-titles.less +1 -1
  28. package/lib/css/components/_stacks-pagination.less +4 -2
  29. package/lib/css/components/_stacks-popovers.less +26 -6
  30. package/lib/css/components/_stacks-post-summary.less +121 -3
  31. package/lib/css/components/_stacks-progress-bars.less +29 -6
  32. package/lib/css/components/_stacks-prose.less +18 -4
  33. package/lib/css/components/_stacks-tables.less +10 -6
  34. package/lib/css/components/_stacks-tags.less +22 -19
  35. package/lib/css/components/_stacks-toggle-switches.less +12 -0
  36. package/lib/css/components/_stacks-topbar.less +440 -0
  37. package/lib/css/components/_stacks-uploader.less +22 -0
  38. package/lib/css/components/_stacks-widget-static.less +15 -3
  39. package/lib/css/exports/_stacks-constants-colors.less +700 -220
  40. package/lib/css/exports/_stacks-constants-helpers.less +1 -2
  41. package/lib/css/exports/_stacks-mixins.less +26 -0
  42. package/lib/css/stacks-dynamic.less +0 -1
  43. package/lib/css/stacks-static.less +15 -0
  44. package/lib/ts/controllers/s-tooltip.ts +4 -0
  45. package/package.json +15 -12
@@ -52,6 +52,7 @@
52
52
  // ============================================================================
53
53
  // $ SPACING UNITS (su-)
54
54
  // ----------------------------------------------------------------------------
55
+ @su1: 1px;
55
56
  @su2: 2px;
56
57
  @su4: 4px;
57
58
  @su6: 6px;
@@ -126,14 +127,12 @@
126
127
  // Hide focus styles if they're not needed, for example,
127
128
  // when an element receives focus via the mouse.
128
129
  &:focus:not(:focus-visible) {
129
- color: inherit;
130
130
  outline: none;
131
131
  box-shadow: none;
132
132
  }
133
133
 
134
134
  // Show focus styles on keyboard focus.
135
135
  &:focus-visible {
136
- color: inherit;
137
136
  outline: none;
138
137
  box-shadow: 0 0 0 @su4 var(--focus-ring-muted);
139
138
  }
@@ -44,6 +44,32 @@
44
44
  }
45
45
  }
46
46
 
47
+ // ===========================================================================
48
+ // -- HIGHCONTRAST
49
+ // .highcontrast-mode renders a high contrast mode override for .theme-highcontrast
50
+ //
51
+ // Usage example:
52
+ //
53
+ // .highcontrast-mode({ background-color: var(--black-100); });
54
+ //
55
+ // ---------------------------------------------------------------------------
56
+
57
+ .highcontrast-mode(@rules) {
58
+ body.theme-highcontrast & {
59
+ @rules();
60
+ }
61
+ }
62
+
63
+ .highcontrast-dark-mode(@rules) {
64
+ body.theme-highcontrast.theme-system & {
65
+ @media (prefers-color-scheme: dark) {
66
+ @rules();
67
+ }
68
+ }
69
+ body.theme-highcontrast.theme-dark & {
70
+ @rules();
71
+ }
72
+ }
47
73
 
48
74
  // ===========================================================================
49
75
  // -- APPEARANCE
@@ -22,7 +22,6 @@
22
22
  @import "components/_stacks-buttons.less";
23
23
  @import "components/_stacks-links.less";
24
24
  @import "components/_stacks-link-previews.less";
25
- @import "components/_stacks-navigation.less";
26
25
  @import "components/_stacks-notices.less";
27
26
  @import "components/_stacks-tags.less";
28
27
  @import "components/_stacks-pagination.less";
@@ -29,6 +29,7 @@
29
29
  @import "components/_stacks-inputs.less";
30
30
  @import "components/_stacks-menu.less";
31
31
  @import "components/_stacks-modals.less";
32
+ @import "components/_stacks-navigation.less";
32
33
  @import "components/_stacks-page-titles.less";
33
34
  @import "components/_stacks-popovers.less";
34
35
  @import "components/_stacks-post-summary.less";
@@ -37,6 +38,7 @@
37
38
  @import "components/_stacks-spinner.less";
38
39
  @import "components/_stacks-tables.less";
39
40
  @import "components/_stacks-toggle-switches.less";
41
+ @import "components/_stacks-topbar.less";
40
42
  @import "components/_stacks-uploader.less";
41
43
  @import "components/_stacks-user-cards.less";
42
44
  @import "components/_stacks-widget-static.less";
@@ -64,6 +66,19 @@
64
66
  #stacks-internals #screen-sm({
65
67
  #stacks-internals-collect-small();
66
68
  });
69
+
70
+ // We need printing styles to be last so they can override all other styles.
71
+ .print\:d-block {
72
+ @media print {
73
+ display: block !important;
74
+ }
75
+ }
76
+
77
+ .print\:d-none {
78
+ @media print {
79
+ display: none !important;
80
+ }
81
+ }
67
82
  /* stylelint-enable */
68
83
 
69
84
  // -- CONFIG
@@ -176,6 +176,8 @@ namespace Stacks {
176
176
 
177
177
  this.referenceElement.addEventListener("mouseover", this.boundScheduleShow);
178
178
  this.referenceElement.addEventListener("mouseout", this.boundHide);
179
+ this.referenceElement.addEventListener("focus", this.boundScheduleShow);
180
+ this.referenceElement.addEventListener("blur", this.boundHide);
179
181
  }
180
182
 
181
183
  /**
@@ -184,6 +186,8 @@ namespace Stacks {
184
186
  private unbindMouseEvents() {
185
187
  this.referenceElement.removeEventListener("mouseover", this.boundScheduleShow);
186
188
  this.referenceElement.removeEventListener("mouseout", this.boundHide);
189
+ this.referenceElement.removeEventListener("focus", this.boundScheduleShow);
190
+ this.referenceElement.removeEventListener("blur", this.boundHide);
187
191
  }
188
192
 
189
193
  /**
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": "0.69.1",
8
+ "version": "0.73.0",
9
9
  "files": [
10
10
  "dist",
11
11
  "lib"
@@ -19,24 +19,24 @@
19
19
  },
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@popperjs/core": "^2.9.2",
22
+ "@popperjs/core": "^2.11.0",
23
23
  "stimulus": "^2.0.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@11ty/eleventy": "^0.12.1",
27
- "@highlightjs/cdn-assets": "^11.0.1",
27
+ "@highlightjs/cdn-assets": "^11.3.1",
28
28
  "@stackoverflow/stacks-editor": "^0.4.1",
29
- "@stackoverflow/stacks-icons": "^2.22.0",
30
- "backstopjs": "^5.3.0",
29
+ "@stackoverflow/stacks-icons": "^2.25.1",
30
+ "backstopjs": "^6.0.4",
31
31
  "docsearch.js": "^2.6.3",
32
32
  "eleventy-plugin-highlightjs": "^0.3.0",
33
33
  "eleventy-plugin-markdown-shortcode": "^1.1.0",
34
- "eleventy-plugin-nesting-toc": "^1.2.0",
35
- "grunt": "^1.3.0",
36
- "grunt-cli": "^1.4.1",
34
+ "eleventy-plugin-nesting-toc": "^1.3.0",
35
+ "grunt": "^1.4.1",
36
+ "grunt-cli": "^1.4.3",
37
37
  "grunt-concurrent": "^3.0.0",
38
38
  "grunt-contrib-clean": "^2.0.0",
39
- "grunt-contrib-concat": "^1.0.1",
39
+ "grunt-contrib-concat": "^2.0.0",
40
40
  "grunt-contrib-copy": "^1.0.0",
41
41
  "grunt-contrib-cssmin": "^4.0.0",
42
42
  "grunt-contrib-less": "^3.0.0",
@@ -46,9 +46,12 @@
46
46
  "grunt-ts": "^6.0.0-beta.22",
47
47
  "jquery": "^3.6.0",
48
48
  "list.js": "^2.3.1",
49
- "stylelint": "^13.13.1",
50
- "stylelint-config-standard": "^22.0.0",
51
- "typescript": "^4.2.3"
49
+ "postcss-less": "^5.0.0",
50
+ "stylelint": "^14.2.0",
51
+ "stylelint-config-recommended-less": "^1.0.1",
52
+ "stylelint-config-standard": "^24.0.0",
53
+ "stylelint-less": "^1.0.1",
54
+ "typescript": "^4.5.4"
52
55
  },
53
56
  "browserslist": [
54
57
  "last 2 versions",