@stackoverflow/stacks 0.74.0 → 1.0.0-beta.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 (89) hide show
  1. package/dist/controllers/index.d.ts +7 -0
  2. package/dist/controllers/s-expandable-control.d.ts +17 -0
  3. package/dist/controllers/s-modal.d.ts +97 -0
  4. package/dist/controllers/s-navigation-tablist.d.ts +36 -0
  5. package/dist/controllers/s-popover.d.ts +155 -0
  6. package/dist/controllers/s-table.d.ts +8 -0
  7. package/dist/controllers/s-tooltip.d.ts +82 -0
  8. package/dist/controllers/s-uploader.d.ts +48 -0
  9. package/dist/css/stacks.css +4633 -2703
  10. package/dist/css/stacks.min.css +1 -1
  11. package/dist/index.d.ts +3 -0
  12. package/dist/js/stacks.js +6026 -5403
  13. package/dist/js/stacks.min.js +1 -1
  14. package/dist/stacks.d.ts +21 -0
  15. package/lib/css/atomic/{_stacks-borders.less → borders.less} +30 -30
  16. package/lib/css/atomic/{_stacks-colors.less → colors.less} +0 -0
  17. package/lib/css/atomic/{_stacks-flex.less → flex.less} +14 -13
  18. package/lib/css/atomic/{_stacks-grid.less → grid.less} +12 -11
  19. package/lib/css/atomic/{_stacks-misc.less → misc.less} +23 -22
  20. package/lib/css/atomic/spacing.less +314 -0
  21. package/lib/css/atomic/{_stacks-typography.less → typography.less} +29 -29
  22. package/lib/css/atomic/width-height.less +194 -0
  23. package/lib/css/base/{_stacks-body.less → body.less} +3 -5
  24. package/lib/css/base/{_stacks-configuration-static.less → configuration-static.less} +3 -1
  25. package/lib/css/base/{_stacks-icons.less → icons.less} +0 -0
  26. package/lib/css/base/{_stacks-internals.less → internals.less} +0 -10
  27. package/lib/css/base/{_stacks-reset-meyer.less → reset-meyer.less} +0 -0
  28. package/lib/css/base/{_stacks-reset-normalize.less → reset-normalize.less} +0 -0
  29. package/lib/css/base/{_stacks-reset.less → reset.less} +2 -2
  30. package/lib/css/components/{_stacks-activity-indicator.less → activity-indicator.less} +9 -9
  31. package/lib/css/components/{_stacks-avatars.less → avatars.less} +40 -40
  32. package/lib/css/components/{_stacks-badges.less → badges.less} +11 -11
  33. package/lib/css/components/{_stacks-banners.less → banners.less} +5 -6
  34. package/lib/css/components/{_stacks-blank-states.less → blank-states.less} +2 -2
  35. package/lib/css/components/{_stacks-breadcrumbs.less → breadcrumbs.less} +7 -7
  36. package/lib/css/components/{_stacks-button-groups.less → button-groups.less} +2 -2
  37. package/lib/css/components/{_stacks-buttons.less → buttons.less} +77 -72
  38. package/lib/css/components/{_stacks-cards.less → cards.less} +2 -2
  39. package/lib/css/components/{_stacks-code-blocks.less → code-blocks.less} +8 -8
  40. package/lib/css/components/{_stacks-collapsible.less → collapsible.less} +0 -0
  41. package/lib/css/components/{_stacks-inputs.less → inputs.less} +41 -41
  42. package/lib/css/components/{_stacks-link-previews.less → link-previews.less} +17 -17
  43. package/lib/css/components/{_stacks-links.less → links.less} +4 -4
  44. package/lib/css/components/{_stacks-menu.less → menu.less} +5 -5
  45. package/lib/css/components/{_stacks-modals.less → modals.less} +20 -20
  46. package/lib/css/components/{_stacks-navigation.less → navigation.less} +12 -12
  47. package/lib/css/components/{_stacks-notices.less → notices.less} +12 -12
  48. package/lib/css/components/{_stacks-page-titles.less → page-titles.less} +9 -9
  49. package/lib/css/components/{_stacks-pagination.less → pagination.less} +8 -8
  50. package/lib/css/components/{_stacks-popovers.less → popovers.less} +17 -17
  51. package/lib/css/components/{_stacks-post-summary.less → post-summary.less} +155 -60
  52. package/lib/css/components/{_stacks-progress-bars.less → progress-bars.less} +29 -30
  53. package/lib/css/components/{_stacks-prose.less → prose.less} +31 -31
  54. package/lib/css/components/{_stacks-spinner.less → spinner.less} +14 -14
  55. package/lib/css/components/{_stacks-tables.less → tables.less} +10 -10
  56. package/lib/css/components/{_stacks-tags.less → tags.less} +33 -41
  57. package/lib/css/components/{_stacks-toggle-switches.less → toggle-switches.less} +5 -5
  58. package/lib/css/components/{_stacks-topbar.less → topbar.less} +27 -40
  59. package/lib/css/components/{_stacks-uploader.less → uploader.less} +18 -18
  60. package/lib/css/components/{_stacks-user-cards.less → user-cards.less} +14 -14
  61. package/lib/css/components/{_stacks-widget-dynamic.less → widget-dynamic.less} +1 -1
  62. package/lib/css/components/{_stacks-widget-static.less → widget-static.less} +39 -38
  63. package/lib/css/exports/{_stacks-constants-colors.less → constants-colors.less} +21 -29
  64. package/lib/css/exports/constants-helpers.less +108 -0
  65. package/lib/css/exports/constants-type.less +153 -0
  66. package/lib/css/exports/{_stacks-exports.less → exports.less} +4 -4
  67. package/lib/css/exports/{_stacks-mixins.less → mixins.less} +18 -1
  68. package/lib/css/stacks-dynamic.less +12 -13
  69. package/lib/css/stacks-static.less +38 -38
  70. package/lib/ts/controllers/index.ts +8 -0
  71. package/lib/ts/controllers/s-expandable-control.ts +163 -164
  72. package/lib/ts/controllers/s-modal.ts +259 -261
  73. package/lib/ts/controllers/s-navigation-tablist.ts +96 -97
  74. package/lib/ts/controllers/s-popover.ts +438 -440
  75. package/lib/ts/controllers/s-table.ts +203 -203
  76. package/lib/ts/controllers/s-tooltip.ts +195 -196
  77. package/lib/ts/controllers/s-uploader.ts +162 -164
  78. package/lib/ts/index.ts +20 -0
  79. package/lib/ts/stacks.ts +73 -68
  80. package/lib/tsconfig.json +8 -6
  81. package/package.json +43 -27
  82. package/dist/css/stacks-flexgrid-shim.min.css +0 -1
  83. package/lib/css/atomic/_stacks-spacing.less +0 -162
  84. package/lib/css/atomic/_stacks-width-height.less +0 -189
  85. package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
  86. package/lib/css/exports/_stacks-constants-helpers.less +0 -139
  87. package/lib/css/exports/_stacks-constants-type.less +0 -91
  88. package/lib/ts/finalize.ts +0 -1
  89. package/lib/ts/stimulus.d.ts +0 -4
@@ -1,4 +1,4 @@
1
- @import (reference) "./_stacks-mixins.less";
1
+ @import (reference) "./mixins.less";
2
2
 
3
3
  //
4
4
  // STACK OVERFLOW
@@ -145,12 +145,6 @@
145
145
  @bronze-lighter: hsl(@bronze-h, 40%, 92%);
146
146
  @bronze-darker: hsl(@bronze-h, 31%, 52%);
147
147
 
148
- // $ SHADOWS
149
- // ----------------------------------------------------------------------------
150
- @bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
151
- @bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
152
- @bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
153
-
154
148
  // $ SCROLLBARS
155
149
  // ----------------------------------------------------------------------------
156
150
  @scrollbar: hsla(0, 0%, 0%, 0.2);
@@ -197,7 +191,7 @@
197
191
 
198
192
  .component-colors {
199
193
  --theme-body-font-color: var(--black-800);
200
-
194
+ --theme-background-color: var(--white);
201
195
  // Links
202
196
  --theme-link-color: var(--theme-secondary-400);
203
197
  --theme-link-color-hover: var(--theme-secondary-350);
@@ -247,7 +241,7 @@
247
241
  --theme-tag-hover-border-color: transparent;
248
242
 
249
243
  // Topbar
250
- --theme-topbar-height: @su48;
244
+ --theme-topbar-height: var(--su-static48);
251
245
  --theme-topbar-background-color: var(--black-025);
252
246
 
253
247
  // Topbar Search input
@@ -256,7 +250,7 @@
256
250
  --theme-topbar-search-placeholder: var(--black-200);
257
251
  --theme-topbar-search-border: var(--black-200);
258
252
  --theme-topbar-search-border-focus: var(--blue-300);
259
- --theme-topbar-search-shadow-focus: 0 0 0 @su4 var(--focus-ring);
253
+ --theme-topbar-search-shadow-focus: 0 0 0 var(--su-static4) var(--focus-ring);
260
254
 
261
255
  // Topbar Search switcher
262
256
  --theme-topbar-select-color: var(--black-700);
@@ -271,6 +265,13 @@
271
265
 
272
266
  // Topbar themed border accent
273
267
  --theme-topbar-accent-border: 3px solid var(--theme-primary-color);
268
+
269
+ // Post summary
270
+ --theme-post-title-color: var(--theme-link-color);
271
+ --theme-post-title-color-hover: var(--theme-link-color-hover);
272
+ --theme-post-title-color-visited: var(--theme-link-color-visited);
273
+ --theme-post-title-font-family: var(--theme-body-font-family);
274
+ --theme-post-body-font-family: var(--theme-body-font-family);
274
275
  }
275
276
 
276
277
  // -- Light mode
@@ -409,9 +410,10 @@
409
410
  --focus-ring-muted: hsla(@black-h, @black-s, 15%, 10%);
410
411
 
411
412
  // Shadows
412
- --bs-sm: @bs-sm;
413
- --bs-md: @bs-md;
414
- --bs-lg: @bs-lg;
413
+ --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.05), 0 2px 8px hsla(0, 0%, 0%, 0.05);
414
+ --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.06), 0 2px 6px hsla(0, 0%, 0%, 0.06), 0 3px 8px hsla(0, 0%, 0%, 0.09);
415
+ --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.09), 0 3px 8px hsla(0, 0%, 0%, 0.09), 0 4px 13px hsla(0, 0%, 0%, 0.13);
416
+ --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.05), 0 20px 48px hsla(0, 0%, 0%, 0.05), 0 1px 4px hsla(0, 0%, 0%, 0.1);
415
417
 
416
418
  // Scrollbars
417
419
  --scrollbar: hsla(0, 0, 0, 0.2);
@@ -472,9 +474,6 @@
472
474
 
473
475
  // Fades
474
476
  --focus-ring: .native-fade(theme-secondary-color, 15)[];
475
-
476
- // TODO
477
- --theme-body-font-color: var(--black-800);
478
477
  }
479
478
 
480
479
  // -- Dark mode
@@ -610,7 +609,8 @@
610
609
  --bs-sm: 0 1px 2px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.1), 0 2px 8px hsla(0, 0%, 0%, 0.1);
611
610
  --bs-md: 0 1px 3px hsla(0, 0%, 0%, 0.11), 0 2px 6px hsla(0, 0%, 0%, 0.11), 0 3px 8px hsla(0, 0%, 0%, 0.14);
612
611
  --bs-lg: 0 1px 4px hsla(0, 0%, 0%, 0.14), 0 3px 8px hsla(0, 0%, 0%, 0.14), 0 4px 13px hsla(0, 0%, 0%, 0.18);
613
-
612
+ --bs-xl: 0 10px 24px hsla(0, 0%, 0%, 0.1), 0 20px 48px hsla(0, 0%, 0%, 0.1), 0 1px 4px hsla(0, 0%, 0%, 0.15);
613
+
614
614
  // Scrollbars
615
615
  --scrollbar: hsla(0, 0%, 100%, 0.2);
616
616
 
@@ -670,9 +670,6 @@
670
670
 
671
671
  // Fades
672
672
  --focus-ring: .native-fade(theme-secondary-color, 25)[];
673
-
674
- // TODO
675
- --theme-body-font-color: var(--black-800);
676
673
  }
677
674
 
678
675
  // rules shared between .theme-dark and .theme-system w/ prefers-color-scheme: dark
@@ -681,12 +678,10 @@
681
678
 
682
679
  &,
683
680
  & .themed {
681
+ color: var(--theme-body-font-color);
684
682
  .generate-themed-variables(theme-dark);
685
683
  // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
686
684
  .dark-themed-colors();
687
- }
688
-
689
- & .themed {
690
685
  &:extend(.component-colors);
691
686
  }
692
687
  }
@@ -825,6 +820,7 @@
825
820
  --bs-sm: none;
826
821
  --bs-md: none;
827
822
  --bs-lg: none;
823
+ --bs-xl: none;
828
824
 
829
825
  // Scrollbars
830
826
  --scrollbar: var(--black);
@@ -980,6 +976,7 @@
980
976
  --bs-sm: none;
981
977
  --bs-md: none;
982
978
  --bs-lg: none;
979
+ --bs-xl: none;
983
980
 
984
981
  // Scrollbars
985
982
  --scrollbar: var(--black);
@@ -1048,9 +1045,6 @@
1048
1045
  }
1049
1046
 
1050
1047
  // place component-colors on the body directly (instead of :root) so consumers can use the --theme-* variables
1051
- body {
1052
- &:extend(.component-colors);
1053
- }
1054
1048
 
1055
1049
  // Light mode
1056
1050
  body:not(.theme-dark),
@@ -1060,12 +1054,10 @@ body.theme-system .theme-light__forced {
1060
1054
 
1061
1055
  &,
1062
1056
  & .themed {
1057
+ color: var(--theme-body-font-color);
1063
1058
  .generate-themed-variables(theme-light);
1064
1059
  // add in the themed "native mixins", making sure to scope to the child .themed elements so they don't use the parent's values
1065
1060
  .light-themed-colors();
1066
- }
1067
-
1068
- & .themed {
1069
1061
  &:extend(.component-colors);
1070
1062
  }
1071
1063
  }
@@ -0,0 +1,108 @@
1
+ //
2
+ // STACK OVERFLOW
3
+ // CONSTANTS -- HELPERS
4
+ //
5
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
+ // Stack Overflow. For documentation of all these classes and how to contribute,
7
+ // visit https://stackoverflow.design/
8
+ //
9
+ // These are helper variables to quickly set values.
10
+ // These SHOULD NOT be reset.
11
+ //
12
+ // Table of Contents
13
+ // • z-index (zi-)
14
+ // • border-radius (br-)
15
+ // • box-shadow (bs-)
16
+ // • transition easings (te-)
17
+ //
18
+ body {
19
+ // Z-Index
20
+ --zi-hide: -1; // Hide something all the elements
21
+ --zi-base: 0; // Reset to 0
22
+ --zi-selected: 25; // Pop above siblings
23
+ --zi-active: 30; // Pop above selected siblings
24
+ --zi-dropdown: 1000; // Dropdowns
25
+ --zi-popovers: 2000; // Popovers, Popups, Autocompletes
26
+ --zi-tooltips: 3000; // Tooltips
27
+ --zi-banners: 4000; // Banners
28
+ --zi-navigation: 5000; // Navigation Bars
29
+ --zi-navigation-fixed: 5050; // Fixed navigation bars
30
+ --zi-modals-background: 8050; // Modals background
31
+ --zi-modals: 9000; // Modals
32
+
33
+ // Border Radius
34
+ --br-sm: 3px;
35
+ --br-md: 5px;
36
+ --br-lg: 7px;
37
+ --br-circle: 50%;
38
+
39
+ // Transition easings
40
+ --te-smooth-slow: cubic-bezier(0.25, 0.46, 0.45, 0.94); // easeOutQuad
41
+ --te-smooth: cubic-bezier(0.165, 0.84, 0.44, 1); // easeOutQuart
42
+ --te-smooth-quick: cubic-bezier(0.19, 1, 0.22, 1); // easeOutExpo
43
+ --te-back-out: cubic-bezier(0.175, 0.885, 0.32, 1.275); // easeOutBack
44
+ --te-back-in-out: cubic-bezier(0.68, -0.55, 0.265, 1.55); // easeInOutBack
45
+ --te-ease-in: cubic-bezier(0.47, 0, 0.745, 0.715); // easeIn
46
+ --te-ease-in-out: cubic-bezier(0.445, 0.05, 0.55, 0.95); // easeInOut
47
+ --te-ease-out: cubic-bezier(0.39, 0.575, 0.565, 1); // easeOut
48
+
49
+ --default-transition-duration: 0.1s;
50
+ --transition-time: var(--default-transition-duration);
51
+
52
+ // Sizing
53
+ --s-full: 97.2307692rem; // Based on a pixel size of 1264px;
54
+ --s-step: calc(var(--s-full) / 12);
55
+ }
56
+
57
+ // ============================================================================
58
+ // $ RESPONSIVE BREAKPOINTS
59
+ // ----------------------------------------------------------------------------
60
+ @breakpoint-lg: 1264px;
61
+ @breakpoint-md: 980px;
62
+ @breakpoint-sm: 640px;
63
+
64
+ // ============================================================================
65
+ // $ SCROLLBAR STYLING
66
+ // ----------------------------------------------------------------------------
67
+ @scrollbar-styles: {
68
+ &::-webkit-scrollbar {
69
+ width: calc(var(--su-static12) - var(--su-static2));
70
+ height: calc(var(--su-static12) - var(--su-static2));
71
+ background-color: transparent;
72
+ }
73
+
74
+ &::-webkit-scrollbar-track {
75
+ border-radius: calc(var(--su-static12) - var(--su-static2));
76
+ background-color: transparent;
77
+ }
78
+
79
+ &::-webkit-scrollbar-thumb {
80
+ border-radius: calc(var(--su-static12) - var(--su-static2));
81
+ background-color: var(--scrollbar);
82
+ }
83
+
84
+ &::-webkit-scrollbar-corner {
85
+ background-color: transparent;
86
+ border-color: transparent;
87
+ }
88
+
89
+ scrollbar-color: var(--scrollbar) transparent;
90
+ }
91
+
92
+ // ============================================================================
93
+ // $ FOCUS STYLING
94
+ // ----------------------------------------------------------------------------
95
+ @focus-styles: {
96
+ // Hide focus styles if they're not needed, for example,
97
+ // when an element receives focus via the mouse.
98
+ &:focus:not(:focus-visible) {
99
+ outline: none;
100
+ box-shadow: none;
101
+ }
102
+
103
+ // Show focus styles on keyboard focus.
104
+ &:focus-visible {
105
+ outline: none;
106
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-muted);
107
+ }
108
+ }
@@ -0,0 +1,153 @@
1
+ //
2
+ // STACK OVERFLOW
3
+ // CONSTANTS -- TYPOGRAPHY
4
+ //
5
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
+ // Stack Overflow. For documentation of all these classes and how to contribute,
7
+ // visit https://stackoverflow.design/
8
+ //
9
+ // These are the Stacks type variables. These should be used in place of
10
+ // hard-coded values within CSS declarations.
11
+ //
12
+ //
13
+ // ============================================================================
14
+ // $ FONT FAMILY (ff-)
15
+ // ----------------------------------------------------------------------------
16
+
17
+ // Add Segoe UI Adjusted as a font family, and adjust its baseline
18
+ @font-face {
19
+ font-family: "Segoe UI Adjusted";
20
+ src: local(Segoe UI);
21
+ ascent-override: 95%;
22
+ }
23
+
24
+ // Segoe UI is variable, but only in Windows 11, so add all the variants
25
+ @font-face {
26
+ font-family: "Segoe UI Adjusted";
27
+ src: local(Segoe UI Italic);
28
+ ascent-override: 95%;
29
+ font-style: italic;
30
+ }
31
+
32
+ @font-face {
33
+ font-family: "Segoe UI Adjusted";
34
+ src: local(Segoe UI Semibold);
35
+ ascent-override: 95%;
36
+ font-weight: 600;
37
+ }
38
+
39
+ @font-face {
40
+ font-family: "Segoe UI Adjusted";
41
+ src: local(Segoe UI Semibold Italic);
42
+ ascent-override: 95%;
43
+ font-style: italic;
44
+ font-weight: 600;
45
+ }
46
+
47
+ @font-face {
48
+ font-family: "Segoe UI Adjusted";
49
+ src: local(Segoe UI Bold);
50
+ ascent-override: 90%;
51
+ font-weight: 700;
52
+ }
53
+
54
+ @font-face {
55
+ font-family: "Segoe UI Adjusted";
56
+ src: local(Segoe UI Bold Italic);
57
+ ascent-override: 95%;
58
+ font-style: italic;
59
+ font-weight: 700;
60
+ }
61
+
62
+ @font-face {
63
+ font-family: "Segoe UI Adjusted";
64
+ src: local(Segoe UI Black);
65
+ ascent-override: 95%;
66
+ font-weight: 800;
67
+ }
68
+
69
+ @font-face {
70
+ font-family: "Segoe UI Adjusted";
71
+ src: local(Segoe UI Black Italic);
72
+ ascent-override: 95%;
73
+ font-style: italic;
74
+ font-weight: 800;
75
+ }
76
+
77
+ // TODO remove font-family Less variables. Keeping them here for now for comments.
78
+ @ff-sans:
79
+ -apple-system, BlinkMacSystemFont, // San Francisco on macOS and iOS
80
+ "Segoe UI Adjusted", "Segoe UI", // Windows
81
+ "Liberation Sans", // Linux
82
+ sans-serif; // The final fallback for rendering in sans-serif.
83
+ @ff-serif: Georgia, Cambria, "Times New Roman", Times, serif;
84
+ @ff-mono:
85
+ ui-monospace, // San Francisco Mono on macOS and iOS
86
+ "Cascadia Mono", "Segoe UI Mono", // Newer Windows monospace fonts that are optionally installed. Most likely to be rendered in Consolas
87
+ "Liberation Mono", // Linux
88
+ Menlo, Monaco, Consolas, // A few sensible system font choices
89
+ monospace; // The final fallback for rendering in monospace.
90
+
91
+ html,
92
+ body {
93
+ --ff-sans: @ff-sans;
94
+ --ff-serif: @ff-serif;
95
+ --ff-mono: @ff-mono;
96
+ --theme-body-font-family: var(--ff-sans);
97
+
98
+ // ============================================================================
99
+ // $ FONT SIZES (fs-)
100
+ // Base font-size is 13px.
101
+ // ----------------------------------------------------------------------------
102
+ --fs-fine: 11px;
103
+ --fs-caption: 12px;
104
+ --fs-body1: 13px;
105
+
106
+ // Relative to the root element
107
+ --fs-body2: 1.153846154rem;
108
+ --fs-body3: 1.307692308rem;
109
+ --fs-subheading: 1.461538462rem;
110
+ --fs-title: 1.615384615rem;
111
+ --fs-headline1: 2.076923077rem;
112
+ --fs-headline2: 2.615384615rem;
113
+ --fs-display1: 3.307692308rem;
114
+ --fs-display2: 4.230769231rem;
115
+ --fs-display3: 5.307692308rem;
116
+ --fs-display4: 7.615384615rem;
117
+
118
+ // Relative to the parent
119
+ --fs-body2-relative: 1.153846154em;
120
+ --fs-body3-relative: 1.307692308em;
121
+ --fs-subheading-relative: 1.461538462em;
122
+ --fs-title-relative: 1.615384615em;
123
+ --fs-headline1-relative: 2.076923077em;
124
+ --fs-headline2-relative: 2.615384615em;
125
+ --fs-display1-relative: 3.307692308em;
126
+ --fs-display2-relative: 4.230769231em;
127
+ --fs-display3-relative: 5.307692308em;
128
+ --fs-display4-relative: 7.615384615em;
129
+
130
+ --fs-base: 13px;
131
+
132
+ // ============================================================================
133
+ // $ LINE HEIGHT (lh-)
134
+ // ----------------------------------------------------------------------------
135
+ // Need to remove the unit off the font-size to make line-height unitless
136
+ // FIXME this shouldn't be public. Find a way to use unitless `--fs-base`.
137
+ --stacks-internals-lh-unit: 13;
138
+
139
+ // Now the various line-height variables
140
+ --lh-xs: 1;
141
+ --lh-sm: calc((var(--stacks-internals-lh-unit) + 2) / var(--stacks-internals-lh-unit));
142
+ --lh-md: calc((var(--stacks-internals-lh-unit) + 4) / var(--stacks-internals-lh-unit));
143
+ --lh-lg: calc((var(--stacks-internals-lh-unit) + 8) / var(--stacks-internals-lh-unit));
144
+ --lh-xl: calc((var(--stacks-internals-lh-unit) + 12) / var(--stacks-internals-lh-unit));
145
+ --lh-xxl: 2;
146
+
147
+ --lh-base: var(--lh-md);
148
+
149
+ // Holdover line-heights from production. These are NOT to be used and
150
+ // need to be deprecated.
151
+ // ----------------------------------------------------------------------------
152
+ --lh-6: ((var(--stacks-internals-lh-unit) + 6) / var(--stacks-internals-lh-unit));
153
+ }
@@ -9,7 +9,7 @@
9
9
  // Wherein we establish a bunch of values to make our lives a lot easier.
10
10
  //
11
11
  // ============================================================================
12
- @import "_stacks-constants-type.less"; // Type styles, sizes, and line-heights
13
- @import "_stacks-constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
14
- @import "_stacks-constants-colors.less"; // Colors
15
- @import "_stacks-mixins.less";
12
+ @import "constants-type.less"; // Type styles, sizes, and line-heights
13
+ @import "constants-helpers.less"; // Border radius, z-index, spacing, transitions, etc
14
+ @import "constants-colors.less"; // Colors
15
+ @import "mixins.less";
@@ -19,6 +19,22 @@
19
19
  &:after { clear: both; }
20
20
  }
21
21
 
22
+ // ============================================================================
23
+ // -- LIGHTMODE
24
+ // .light-mode-forced ensures light color scheme is used in .theme-light__forced
25
+ //
26
+ // .light-mode-forced({ color: var(--black-900) });
27
+ //
28
+ // ---------------------------------------------------------------------------
29
+
30
+ .light-mode-forced(@rules) {
31
+ .theme-light__forced &,
32
+ body.theme-system .theme-light__forced &,
33
+ body.theme-dark .theme-light__forced & {
34
+ @rules();
35
+ }
36
+ }
37
+
22
38
  // ===========================================================================
23
39
  // -- DARKMODE
24
40
  // .darkmode renders a dark mode override behind the
@@ -39,7 +55,8 @@
39
55
  }
40
56
 
41
57
  body.theme-dark &,
42
- .theme-dark__forced & {
58
+ .theme-dark__forced &,
59
+ body.theme-system .theme-dark__forced & {
43
60
  @rules();
44
61
  }
45
62
  }
@@ -15,22 +15,21 @@
15
15
  // via variables.
16
16
  // ----------------------------------------------------------------------------
17
17
  // -- SET BASIC STYLES FOR BODY
18
- @import "base/_stacks-body.less";
18
+ @import "base/body.less";
19
19
 
20
20
  // -- COMPONENTS
21
- @import "components/_stacks-banners.less";
22
- @import "components/_stacks-buttons.less";
23
- @import "components/_stacks-links.less";
24
- @import "components/_stacks-link-previews.less";
25
- @import "components/_stacks-notices.less";
26
- @import "components/_stacks-tags.less";
27
- @import "components/_stacks-pagination.less";
28
- @import "components/_stacks-widget-dynamic.less";
21
+ @import "components/banners.less";
22
+ @import "components/buttons.less";
23
+ @import "components/links.less";
24
+ @import "components/link-previews.less";
25
+ @import "components/notices.less";
26
+ @import "components/tags.less";
27
+ @import "components/pagination.less";
28
+ @import "components/widget-dynamic.less";
29
29
 
30
30
  // -- LESS CONSTANTS AND MIXINS
31
- @import "exports/_stacks-exports.less";
31
+ @import "exports/exports.less";
32
32
 
33
33
  // -- CONFIG
34
- @import "base/_stacks-configuration-static.less";
35
- @import "base/_stacks-configuration-dynamic.less";
36
- @import "base/_stacks-internals.less";
34
+ @import "base/configuration-static.less";
35
+ @import "base/internals.less";
@@ -13,48 +13,48 @@
13
13
  // The following items are elements which we DO NOT allow communities
14
14
  // to modify via variables.
15
15
  // ----------------------------------------------------------------------------
16
- @import "base/_stacks-reset.less";
17
- @import "base/_stacks-icons.less";
16
+ @import "base/reset.less";
17
+ @import "base/icons.less";
18
18
 
19
19
  // -- COMPONENTS
20
- @import "components/_stacks-activity-indicator.less";
21
- @import "components/_stacks-avatars.less";
22
- @import "components/_stacks-badges.less";
23
- @import "components/_stacks-blank-states.less";
24
- @import "components/_stacks-breadcrumbs.less";
25
- @import "components/_stacks-button-groups.less";
26
- @import "components/_stacks-cards.less";
27
- @import "components/_stacks-code-blocks.less";
28
- @import "components/_stacks-collapsible.less";
29
- @import "components/_stacks-inputs.less";
30
- @import "components/_stacks-menu.less";
31
- @import "components/_stacks-modals.less";
32
- @import "components/_stacks-navigation.less";
33
- @import "components/_stacks-page-titles.less";
34
- @import "components/_stacks-popovers.less";
35
- @import "components/_stacks-post-summary.less";
36
- @import "components/_stacks-progress-bars.less";
37
- @import "components/_stacks-prose.less";
38
- @import "components/_stacks-spinner.less";
39
- @import "components/_stacks-tables.less";
40
- @import "components/_stacks-toggle-switches.less";
41
- @import "components/_stacks-topbar.less";
42
- @import "components/_stacks-uploader.less";
43
- @import "components/_stacks-user-cards.less";
44
- @import "components/_stacks-widget-static.less";
20
+ @import "components/activity-indicator.less";
21
+ @import "components/avatars.less";
22
+ @import "components/badges.less";
23
+ @import "components/blank-states.less";
24
+ @import "components/breadcrumbs.less";
25
+ @import "components/button-groups.less";
26
+ @import "components/cards.less";
27
+ @import "components/code-blocks.less";
28
+ @import "components/collapsible.less";
29
+ @import "components/inputs.less";
30
+ @import "components/menu.less";
31
+ @import "components/modals.less";
32
+ @import "components/navigation.less";
33
+ @import "components/page-titles.less";
34
+ @import "components/popovers.less";
35
+ @import "components/post-summary.less";
36
+ @import "components/progress-bars.less";
37
+ @import "components/prose.less";
38
+ @import "components/spinner.less";
39
+ @import "components/tables.less";
40
+ @import "components/toggle-switches.less";
41
+ @import "components/topbar.less";
42
+ @import "components/uploader.less";
43
+ @import "components/user-cards.less";
44
+ @import "components/widget-static.less";
45
45
 
46
46
  // -- LESS CONSTANTS AND MIXINS
47
- @import "exports/_stacks-exports.less";
47
+ @import "exports/exports.less";
48
48
 
49
49
  // -- ATOMIC CLASSES
50
- @import "atomic/_stacks-borders.less";
51
- @import "atomic/_stacks-colors.less";
52
- @import "atomic/_stacks-flex.less";
53
- @import "atomic/_stacks-grid.less";
54
- @import "atomic/_stacks-spacing.less";
55
- @import "atomic/_stacks-typography.less";
56
- @import "atomic/_stacks-misc.less";
57
- @import "atomic/_stacks-width-height.less";
50
+ @import "atomic/borders.less";
51
+ @import "atomic/colors.less";
52
+ @import "atomic/flex.less";
53
+ @import "atomic/grid.less";
54
+ @import "atomic/spacing.less";
55
+ @import "atomic/typography.less";
56
+ @import "atomic/misc.less";
57
+ @import "atomic/width-height.less";
58
58
 
59
59
  /* stylelint-disable */
60
60
  #stacks-internals #screen-lg({
@@ -82,5 +82,5 @@
82
82
  /* stylelint-enable */
83
83
 
84
84
  // -- CONFIG
85
- @import "base/_stacks-configuration-static.less";
86
- @import "base/_stacks-internals.less";
85
+ @import "base/configuration-static.less";
86
+ @import "base/internals.less";
@@ -0,0 +1,8 @@
1
+ // export all controllers *with helpers* so they can be bulk re-exported by the package entry point
2
+ export { ExpandableController } from './s-expandable-control';
3
+ export { hideModal, ModalController, showModal } from './s-modal';
4
+ export { TabListController } from './s-navigation-tablist';
5
+ export { attachPopover, detachPopover, hidePopover, BasePopoverController, PopoverController, showPopover } from './s-popover';
6
+ export { TableController } from './s-table';
7
+ export { setTooltipHtml, setTooltipText, TooltipController } from './s-tooltip';
8
+ export { UploaderController } from './s-uploader';