@stackoverflow/stacks 0.73.1 → 0.76.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 (87) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +47 -47
  3. package/dist/controllers/index.d.ts +7 -0
  4. package/dist/controllers/s-expandable-control.d.ts +17 -0
  5. package/dist/controllers/s-modal.d.ts +97 -0
  6. package/dist/controllers/s-navigation-tablist.d.ts +36 -0
  7. package/dist/controllers/s-popover.d.ts +155 -0
  8. package/dist/controllers/s-table.d.ts +8 -0
  9. package/dist/controllers/s-tooltip.d.ts +82 -0
  10. package/dist/controllers/s-uploader.d.ts +48 -0
  11. package/dist/css/stacks.css +441 -141
  12. package/dist/css/stacks.min.css +1 -1
  13. package/dist/index.d.ts +3 -0
  14. package/dist/js/stacks.js +6130 -5488
  15. package/dist/js/stacks.min.js +1 -1
  16. package/dist/stacks.d.ts +21 -0
  17. package/lib/css/atomic/_stacks-borders.less +378 -378
  18. package/lib/css/atomic/_stacks-colors.less +209 -209
  19. package/lib/css/atomic/_stacks-flex.less +374 -374
  20. package/lib/css/atomic/_stacks-grid.less +174 -173
  21. package/lib/css/atomic/_stacks-misc.less +343 -342
  22. package/lib/css/atomic/_stacks-spacing.less +168 -162
  23. package/lib/css/atomic/_stacks-typography.less +273 -270
  24. package/lib/css/atomic/_stacks-width-height.less +195 -189
  25. package/lib/css/base/_stacks-body.less +44 -46
  26. package/lib/css/base/_stacks-configuration-static.less +59 -59
  27. package/lib/css/base/_stacks-icons.less +20 -20
  28. package/lib/css/base/_stacks-internals.less +220 -230
  29. package/lib/css/base/_stacks-reset-meyer.less +64 -64
  30. package/lib/css/base/_stacks-reset-normalize.less +449 -449
  31. package/lib/css/base/_stacks-reset.less +20 -20
  32. package/lib/css/components/_stacks-activity-indicator.less +45 -45
  33. package/lib/css/components/_stacks-avatars.less +189 -189
  34. package/lib/css/components/_stacks-badges.less +209 -209
  35. package/lib/css/components/_stacks-banners.less +80 -81
  36. package/lib/css/components/_stacks-blank-states.less +26 -26
  37. package/lib/css/components/_stacks-breadcrumbs.less +44 -44
  38. package/lib/css/components/_stacks-button-groups.less +104 -104
  39. package/lib/css/components/_stacks-buttons.less +658 -660
  40. package/lib/css/components/_stacks-cards.less +44 -44
  41. package/lib/css/components/_stacks-code-blocks.less +130 -130
  42. package/lib/css/components/_stacks-collapsible.less +104 -104
  43. package/lib/css/components/_stacks-inputs.less +728 -724
  44. package/lib/css/components/_stacks-link-previews.less +136 -136
  45. package/lib/css/components/_stacks-links.less +218 -218
  46. package/lib/css/components/_stacks-menu.less +47 -47
  47. package/lib/css/components/_stacks-modals.less +133 -133
  48. package/lib/css/components/_stacks-navigation.less +146 -146
  49. package/lib/css/components/_stacks-notices.less +233 -233
  50. package/lib/css/components/_stacks-page-titles.less +60 -60
  51. package/lib/css/components/_stacks-pagination.less +55 -55
  52. package/lib/css/components/_stacks-popovers.less +197 -197
  53. package/lib/css/components/_stacks-post-summary.less +425 -311
  54. package/lib/css/components/_stacks-progress-bars.less +331 -331
  55. package/lib/css/components/_stacks-prose.less +503 -503
  56. package/lib/css/components/_stacks-spinner.less +107 -107
  57. package/lib/css/components/_stacks-tables.less +341 -341
  58. package/lib/css/components/_stacks-tags.less +237 -209
  59. package/lib/css/components/_stacks-toggle-switches.less +144 -137
  60. package/lib/css/components/_stacks-topbar.less +425 -440
  61. package/lib/css/components/_stacks-uploader.less +210 -210
  62. package/lib/css/components/_stacks-user-cards.less +169 -193
  63. package/lib/css/components/_stacks-widget-dynamic.less +33 -33
  64. package/lib/css/components/_stacks-widget-static.less +272 -272
  65. package/lib/css/exports/_stacks-constants-colors.less +1112 -1098
  66. package/lib/css/exports/_stacks-constants-helpers.less +139 -139
  67. package/lib/css/exports/_stacks-constants-type.less +152 -91
  68. package/lib/css/exports/_stacks-exports.less +15 -15
  69. package/lib/css/exports/_stacks-mixins.less +220 -220
  70. package/lib/css/stacks-dynamic.less +35 -36
  71. package/lib/css/stacks-static.less +86 -86
  72. package/lib/ts/controllers/index.ts +8 -0
  73. package/lib/ts/controllers/s-expandable-control.ts +189 -190
  74. package/lib/ts/controllers/s-modal.ts +321 -323
  75. package/lib/ts/controllers/s-navigation-tablist.ts +118 -119
  76. package/lib/ts/controllers/s-popover.ts +547 -549
  77. package/lib/ts/controllers/s-table.ts +220 -220
  78. package/lib/ts/controllers/s-tooltip.ts +246 -247
  79. package/lib/ts/controllers/s-uploader.ts +172 -174
  80. package/lib/ts/index.ts +20 -0
  81. package/lib/ts/stacks.ts +88 -83
  82. package/lib/tsconfig.json +13 -11
  83. package/package.json +87 -71
  84. package/dist/css/stacks-flexgrid-shim.min.css +0 -1
  85. package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
  86. package/lib/ts/finalize.ts +0 -1
  87. package/lib/ts/stimulus.d.ts +0 -4
@@ -1,209 +1,237 @@
1
- //
2
- // TAGS
3
- //
4
- // TABLE OF CONTENTS
5
- // • BASE STYLE
6
- // • STYLE VARIATIONS
7
- // • LAYOUTS & SIZES
8
- //
9
- // ===========================================================================
10
- // $ MIXIN
11
- // Any tag we use will always modify the same items, so to save time,
12
- // here's a mixin to state all that CSS.
13
- // ---------------------------------------------------------------------------
14
-
15
- .s-tag-styles(@border: transparent, @background: transparent, @color: inherit) {
16
- border-color: @border;
17
- background-color: @background;
18
- color: @color;
19
-
20
- .highcontrast-mode({
21
- border-color: currentColor;
22
- });
23
-
24
- .s-tag--dismiss {
25
- color: inherit;
26
- background-color: transparent;
27
-
28
- &:hover {
29
- color: @background;
30
- background-color: @color;
31
-
32
- .highcontrast-mode({
33
- color: var(--white); // We do not want this color to remain fixed
34
- });
35
- }
36
- }
37
- }
38
-
39
- .s-tag-selected-styles(@border: transparent, @background: transparent, @color: inherit) {
40
- border-color: @border;
41
- background-color: @background;
42
- color: @color;
43
-
44
- .highcontrast-mode({
45
- border-color: currentColor;
46
- });
47
- }
48
-
49
- .s-tag-hover-styles(@border-hover: transparent, @background-hover: transparent, @color-hover: inherit) {
50
- &:hover,
51
- &:focus,
52
- &:active {
53
- border-color: @border-hover;
54
- background-color: @background-hover;
55
- color: @color-hover;
56
-
57
- .highcontrast-mode({
58
- border-color: currentColor;
59
- });
60
- }
61
- }
62
-
63
-
64
- // ===========================================================================
65
- // $ BASE STYLE
66
- // The same style is applied to all tags. Do not modify the core style.
67
- // ---------------------------------------------------------------------------
68
- .s-tag {
69
- #stacks-internals #load-config();
70
- display: inline-flex;
71
- align-content: center;
72
- justify-content: center;
73
- min-width: 0;
74
- padding-left: @su4;
75
- padding-right: @su4;
76
- border-style: solid;
77
- border-width: 1px;
78
- border-radius: @br-sm;
79
- font-size: @fs-caption;
80
- line-height: 1.846153846;
81
- text-decoration: none;
82
- vertical-align: middle;
83
- white-space: nowrap;
84
-
85
- .s-tag-styles(var(--theme-tag-border-color), var(--theme-tag-background-color), var(--theme-tag-color));
86
-
87
- .highcontrast-mode({ text-decoration: none; });
88
-
89
- &.is-selected {
90
- .s-tag-selected-styles(transparent, var(--theme-secondary-200), var(--theme-secondary-900));
91
- }
92
-
93
- // -- SIZES
94
- &.s-tag__xs {
95
- font-size: @fs-fine;
96
- line-height: 1.4;
97
- padding-left: @su2;
98
- padding-right: @su2;
99
- }
100
- &.s-tag__sm {
101
- font-size: @fs-caption;
102
- line-height: 1.5;
103
- }
104
- &.s-tag__md {
105
- padding-left: @su6;
106
- padding-right: @su6;
107
- font-size: @fs-body2;
108
- line-height: 1.733333333;
109
- }
110
- &.s-tag__lg {
111
- padding-left: @su6;
112
- padding-right: @su6;
113
- border-radius: @br-sm + 1;
114
- font-size: @fs-subheading;
115
- line-height: 1.684210526;
116
- }
117
- }
118
-
119
- a.s-tag:not(.is-selected) {
120
- #stacks-internals #load-config();
121
- .s-tag-hover-styles(var(--theme-tag-hover-border-color), var(--theme-tag-hover-background-color), var(--theme-tag-hover-color));
122
- }
123
-
124
- // $$ DISMISS ICON
125
- // Style adjustment to @Svg.ClearSm
126
- // ---------------------------------------------------------------------------
127
- .s-tag--dismiss {
128
- display: flex;
129
- align-content: center;
130
- align-self: center;
131
- justify-content: center;
132
- width: @su16;
133
- height: @su16;
134
- margin-left: @su4;
135
- padding: (@su2 / 2);
136
- border-radius: @br-sm;
137
- cursor: pointer;
138
-
139
- &:hover {
140
- color: var(--white);
141
- }
142
- }
143
-
144
- // $$ SPONSOR IMAGE
145
- // The small sponsor favicon displayed within a tag
146
- // ---------------------------------------------------------------------------
147
- .s-tag--sponsor {
148
- display: inline-flex;
149
- align-self: center;
150
- margin: -(@su2 + 1) @su4 -(@su2) -(@su2);
151
- max-width: 18px;
152
- border-radius: @br-sm - 1;
153
-
154
- .svg-icon,
155
- img {
156
- width: 100%;
157
- height: 100%;
158
- }
159
- }
160
-
161
-
162
- // ===========================================================================
163
- // $ STYLE VARIATIONS
164
- // This is what can be modified on each community (for the most part).
165
- // ===========================================================================
166
- // $$ Required Tag
167
- // ---------------------------------------------------------------------------
168
- .s-tag__required {
169
- #stacks-internals #load-config();
170
- .s-tag-styles(@tags-required-border, @tags-required-background, @tags-required-color);
171
-
172
- &.is-selected {
173
- .s-tag-selected-styles(@tags-required-selected-border, @tags-required-selected-background, @tags-required-selected-color);
174
- }
175
- }
176
- a.s-tag__required:not(.is-selected) {
177
- #stacks-internals #load-config();
178
- .s-tag-hover-styles(@tags-required-hover-border, @tags-required-hover-background, @tags-required-hover-color);
179
- }
180
-
181
- // $$ Moderator Tag
182
- // ---------------------------------------------------------------------------
183
- .s-tag__moderator {
184
- #stacks-internals #load-config();
185
- .s-tag-styles(@tags-moderator-border, @tags-moderator-background, @tags-moderator-color);
186
-
187
- &.is-selected {
188
- .s-tag-selected-styles(@tags-moderator-selected-border, @tags-moderator-selected-background, @tags-moderator-selected-color);
189
- }
190
- }
191
- a.s-tag__moderator:not(.is-selected) {
192
- #stacks-internals #load-config();
193
- .s-tag-hover-styles(@tags-moderator-hover-border, @tags-moderator-hover-background, @tags-moderator-hover-color);
194
- }
195
-
196
- // $$ Muted Tag
197
- // ---------------------------------------------------------------------------
198
- .s-tag__muted {
199
- #stacks-internals #load-config();
200
- .s-tag-styles(@tags-muted-border, @tags-muted-background, @tags-muted-color);
201
-
202
- &.is-selected {
203
- .s-tag-selected-styles(@tags-muted-selected-border, @tags-muted-selected-background, @tags-muted-selected-color);
204
- }
205
- }
206
- a.s-tag__muted:not(.is-selected) {
207
- #stacks-internals #load-config();
208
- .s-tag-hover-styles(@tags-muted-hover-border, @tags-muted-hover-background, @tags-muted-hover-color);
209
- }
1
+ //
2
+ // TAGS
3
+ //
4
+ // TABLE OF CONTENTS
5
+ // • BASE STYLE
6
+ // • STYLE VARIATIONS
7
+ // • LAYOUTS & SIZES
8
+ //
9
+ // ===========================================================================
10
+ // $ MIXIN
11
+ // Any tag we use will always modify the same items, so to save time,
12
+ // here's a mixin to state all that CSS.
13
+ // ---------------------------------------------------------------------------
14
+
15
+ .s-tag-styles(@border: transparent, @background: transparent, @color: inherit) {
16
+ border-color: @border;
17
+ background-color: @background;
18
+ color: @color;
19
+
20
+ .highcontrast-mode({
21
+ border-color: currentColor;
22
+ });
23
+
24
+ .s-tag--dismiss {
25
+ color: inherit;
26
+ background-color: transparent;
27
+
28
+ &:hover {
29
+ color: @background;
30
+ background-color: @color;
31
+
32
+ .highcontrast-mode({
33
+ color: var(--white); // We do not want this color to remain fixed
34
+ });
35
+ }
36
+ }
37
+ }
38
+
39
+ .s-tag-selected-styles(@border: transparent, @background: transparent, @color: inherit) {
40
+ border-color: @border;
41
+ background-color: @background;
42
+ color: @color;
43
+
44
+ .highcontrast-mode({
45
+ border-color: currentColor;
46
+ });
47
+ }
48
+
49
+ .s-tag-hover-styles(@border-hover: transparent, @background-hover: transparent, @color-hover: inherit) {
50
+ &:hover,
51
+ &:focus,
52
+ &:active {
53
+ border-color: @border-hover;
54
+ background-color: @background-hover;
55
+ color: @color-hover;
56
+
57
+ .highcontrast-mode({
58
+ border-color: currentColor;
59
+ });
60
+ }
61
+ }
62
+
63
+
64
+ // ===========================================================================
65
+ // $ BASE STYLE
66
+ // The same style is applied to all tags. Do not modify the core style.
67
+ // ---------------------------------------------------------------------------
68
+ .s-tag {
69
+ display: inline-flex;
70
+ align-items: center;
71
+ justify-content: center;
72
+ min-width: 0;
73
+ padding-left: @su4;
74
+ padding-right: @su4;
75
+ border-style: solid;
76
+ border-width: 1px;
77
+ border-radius: @br-sm;
78
+ font-size: @fs-caption;
79
+ line-height: 1.846153846;
80
+ text-decoration: none;
81
+ vertical-align: middle;
82
+ white-space: nowrap;
83
+
84
+ .s-tag-styles(var(--theme-tag-border-color), var(--theme-tag-background-color), var(--theme-tag-color));
85
+
86
+ .highcontrast-mode({ text-decoration: none; });
87
+
88
+ &.is-selected {
89
+ .s-tag-selected-styles(transparent, var(--theme-secondary-200), var(--theme-secondary-900));
90
+ }
91
+
92
+ // -- SIZES
93
+ &.s-tag__xs {
94
+ font-size: @fs-fine;
95
+ line-height: 1.4;
96
+ padding-left: @su2;
97
+ padding-right: @su2;
98
+ }
99
+ &.s-tag__sm {
100
+ font-size: @fs-caption;
101
+ line-height: 1.5;
102
+ }
103
+ &.s-tag__md {
104
+ padding-left: @su6;
105
+ padding-right: @su6;
106
+ font-size: @fs-body2;
107
+ line-height: 1.733333333;
108
+ }
109
+ &.s-tag__lg {
110
+ padding-left: @su6;
111
+ padding-right: @su6;
112
+ border-radius: @br-sm + 1;
113
+ font-size: @fs-subheading;
114
+ line-height: 1.684210526;
115
+ }
116
+ }
117
+
118
+ a.s-tag:not(.is-selected) {
119
+ .s-tag-hover-styles(var(--theme-tag-hover-border-color), var(--theme-tag-hover-background-color), var(--theme-tag-hover-color));
120
+ }
121
+
122
+ // $$ DISMISS ICON
123
+ // Style adjustment to @Svg.ClearSm
124
+ // ---------------------------------------------------------------------------
125
+ .s-tag--dismiss {
126
+ display: flex;
127
+ align-content: center;
128
+ align-self: center;
129
+ justify-content: center;
130
+ width: @su16;
131
+ height: @su16;
132
+ margin-left: @su4;
133
+ padding: (@su2 / 2);
134
+ border-radius: @br-sm;
135
+ cursor: pointer;
136
+
137
+ &:hover {
138
+ color: var(--white);
139
+ }
140
+ }
141
+
142
+ // $$ SPONSOR IMAGE
143
+ // The small sponsor favicon displayed within a tag
144
+ // ---------------------------------------------------------------------------
145
+ .s-tag--sponsor {
146
+ display: inline-flex;
147
+ align-self: center;
148
+ margin: -(@su2 + 1) @su4 -(@su2) -(@su2);
149
+ max-width: 18px;
150
+ border-radius: @br-sm - 1;
151
+
152
+ .svg-icon,
153
+ img {
154
+ width: 100%;
155
+ height: 100%;
156
+ }
157
+ }
158
+
159
+
160
+ // ===========================================================================
161
+ // $ STYLE VARIATIONS
162
+ // This is what can be modified on each community (for the most part).
163
+ // ===========================================================================
164
+ // $$ Required Tag
165
+ // ---------------------------------------------------------------------------
166
+ .s-tag__required {
167
+ .s-tag-styles(var(--bc-darker), var(--black-075), var(--black-700));
168
+
169
+ &.is-selected {
170
+ .s-tag-selected-styles(var(--black-500), var(--black-200), var(--black-900));
171
+ }
172
+ }
173
+ a.s-tag__required:not(.is-selected) {
174
+ .s-tag-hover-styles(var(--black-300), var(--black-100), var(--black-800));
175
+ }
176
+
177
+ // $$ Moderator Tag
178
+ // ---------------------------------------------------------------------------
179
+ .s-tag__moderator {
180
+ .s-tag-styles(var(--red-200), var(--red-050), var(--red-800));
181
+
182
+ &.is-selected {
183
+ .s-tag-selected-styles(var(--red-400), var(--red-200), var(--red-800));
184
+ }
185
+ }
186
+ a.s-tag__moderator:not(.is-selected) {
187
+ .s-tag-hover-styles(var(--red-300), var(--red-100), var(--red-900));
188
+ }
189
+
190
+ // $$ Muted Tag
191
+ // ---------------------------------------------------------------------------
192
+ .s-tag__muted {
193
+ .s-tag-styles(transparent, var(--black-075), var(--black-700));
194
+
195
+ &.is-selected {
196
+ .s-tag-selected-styles(transparent, var(--black-200), var(--black-900));
197
+ }
198
+ }
199
+ a.s-tag__muted:not(.is-selected) {
200
+ .s-tag-hover-styles(transparent, var(--black-100), var(--black-800));
201
+ }
202
+
203
+ // $$ Tag with Icons (watched, ignored)
204
+ // ---------------------------------------------------------------------------
205
+ .s-tag__watched,
206
+ .s-tag__ignored {
207
+ position: relative;
208
+ padding-left: 22px;
209
+
210
+ &:before {
211
+ content: "";
212
+ display: block;
213
+ width: 14px;
214
+ height: 14px;
215
+ margin-right: @su2;
216
+ background-color: currentColor;
217
+ position: absolute;
218
+ left: 4px;
219
+ top: calc(50% - 7px);
220
+ -webkit-mask: var(--s-tag-icon) no-repeat center;
221
+ mask: var(--s-tag-icon) no-repeat center;
222
+ -webkit-mask-size: contain;
223
+ mask-size: contain;
224
+ }
225
+ }
226
+
227
+ // $$ Watched Tag
228
+ // ---------------------------------------------------------------------------
229
+ .s-tag__watched {
230
+ --s-tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M7.05 1C2.63 1 0 6.5 0 6.5S2.63 12 7.05 12C11.38 12 14 6.5 14 6.5S11.37 1 7.05 1ZM7 10.17A3.59 3.59 0 0 1 3.5 6.5 3.6 3.6 0 0 1 7 2.83c1.94 0 3.5 1.65 3.5 3.67A3.57 3.57 0 0 1 7 10.17Zm0-1.84c.97 0 1.75-.81 1.75-1.83S7.97 4.67 7 4.67s-1.75.81-1.75 1.83S6.03 8.33 7 8.33Z'/%3E%3C/svg%3E");
231
+ }
232
+
233
+ // $$ Ignored Tag
234
+ // ---------------------------------------------------------------------------
235
+ .s-tag__ignored {
236
+ --s-tag-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3.52 7.38 1.58 9.26A12.38 12.38 0 0 1 0 7s2.63-5.14 7.05-5.14c.66 0 1.28.12 1.86.32L7.44 3.6a3.48 3.48 0 0 0-3.92 3.78ZM5.3 9.99c.5.28 1.1.44 1.71.44 1.94 0 3.5-1.53 3.5-3.43 0-.62-.17-1.21-.47-1.72L8.7 6.6a1.73 1.73 0 0 1-2.08 2.07L5.29 10Zm6.23-6.19A12.7 12.7 0 0 1 14 7s-2.63 5.14-6.95 5.14A6.1 6.1 0 0 1 4 11.3L2.27 13l-1.4-1.36L11.9 1l1.23 1.2-1.6 1.6Z'/%3E%3C/svg%3E");
237
+ }