@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,233 +1,233 @@
1
- //
2
- // STACK OVERFLOW
3
- // NOTICES
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
- // TABLE OF CONTENTS
10
- // • BASE STYLE
11
- // • LAYOUT TRANSITIONS
12
- //
13
- // ============================================================================
14
- // $ BASE STYLES
15
- // ----------------------------------------------------------------------------
16
- // $$ FILLED, MUTED
17
- .s-notice {
18
- padding: @su16;
19
- border: 1px solid transparent;
20
- border-radius: @br-sm;
21
- color: var(--fc-medium);
22
- font-size: @fs-body1;
23
-
24
- .s-toast & {
25
- max-width: 44rem;
26
- width: 100%;
27
- padding-top: @su8;
28
- padding-bottom: @su8;
29
- box-shadow: var(--bs-sm);
30
- pointer-events: all;
31
- }
32
-
33
- .s-notice--btn {
34
- color: var(--fc-dark);
35
- padding: @su8;
36
- }
37
- }
38
-
39
- // ============================================================================
40
- // $ VISUAL STYLES
41
- // ============================================================================
42
- // $$ INFO
43
- // ----------------------------------------------------------------------------
44
- .s-notice__info,
45
- .s-banner__info {
46
- border-color: var(--theme-secondary-150);
47
- background-color: var(--theme-secondary-050);
48
-
49
- &.s-notice__important,
50
- &.s-banner__important {
51
- background-color: var(--theme-secondary-400);
52
- }
53
-
54
- // Improve the presentation of buttons
55
- .s-notice--btn {
56
- &:focus,
57
- &:hover {
58
- background-color: var(--theme-secondary-300);
59
- }
60
-
61
- &:active {
62
- background-color: var(--theme-secondary-400);
63
- }
64
- }
65
-
66
- code {
67
- background-color: var(--theme-secondary-150);
68
- }
69
- }
70
-
71
- // $$ SUCCESS
72
- // ----------------------------------------------------------------------------
73
- .s-notice__success,
74
- .s-banner__success {
75
- border-color: var(--green-200);
76
- background-color: var(--green-050);
77
-
78
- // Bump up the border contrast in high contrast mode
79
- .highcontrast-mode({
80
- background-color: var(--green-200);
81
- border-color: var(--green-400);
82
- });
83
-
84
- &.s-notice__important,
85
- &.s-banner__important {
86
- background-color: var(--green-400);
87
- color: var(--black-900);
88
-
89
- // Bump up the text in high contrast
90
- .highcontrast-mode({
91
- background-color: var(--green-500);
92
- color: var(--white);
93
- border-color: transparent;
94
- });
95
- }
96
-
97
- // Improve the presentation of buttons
98
- .s-notice--btn {
99
- &:focus,
100
- &:hover {
101
- background-color: var(--green-100);
102
- }
103
-
104
- &:active {
105
- background-color: var(--green-200);
106
- }
107
- }
108
- }
109
-
110
- // $$ WARNING
111
- // ----------------------------------------------------------------------------
112
- .s-notice__warning,
113
- .s-banner__warning {
114
- border-color: var(--yellow-300);
115
- background-color: var(--yellow-050);
116
-
117
- // Bump up the border contrast in high contrast mode
118
- .highcontrast-mode({
119
- background-color: var(--yellow-200);
120
- border-color: var(--yellow-700);
121
- });
122
-
123
- &.s-notice__important,
124
- &.s-banner__important {
125
- background-color: var(--yellow-400);
126
- color: var(--black-900);
127
-
128
- // Bump up the text in high contrast
129
- .highcontrast-mode({
130
- background-color: var(--yellow-500);
131
- color: var(--white);
132
- border-color: transparent;
133
- });
134
- }
135
-
136
- // Improve the presentation of buttons
137
- .s-notice--btn {
138
- &:focus,
139
- &:hover {
140
- background-color: var(--yellow-200);
141
- }
142
-
143
- &:active {
144
- background-color: var(--yellow-300);
145
- }
146
- }
147
-
148
- code {
149
- background-color: var(--yellow-200);
150
- }
151
- }
152
-
153
- // $$ DANGER
154
- // ----------------------------------------------------------------------------
155
- .s-notice__danger,
156
- .s-banner__danger {
157
- border-color: var(--red-200);
158
- background-color: var(--red-050);
159
-
160
- // Bump up the border contrast in high contrast mode
161
- .highcontrast-mode({
162
- background-color: var(--red-200);
163
- border-color: var(--red-500);
164
-
165
- &.s-notice__important,
166
- &.s-banner__important {
167
- background-color: var(--red-500);
168
- }
169
- });
170
-
171
- &.s-notice__important,
172
- &.s-banner__important {
173
- background-color: var(--red-400);
174
- }
175
-
176
- // Improve the presentation of buttons
177
- .s-notice--btn {
178
- &:focus,
179
- &:hover {
180
- background-color: var(--red-100);
181
- }
182
-
183
- &:active {
184
- background-color: var(--red-200);
185
- }
186
- }
187
- }
188
-
189
- // $$ IMPORTANT
190
- // ----------------------------------------------------------------------------
191
- .s-notice__important {
192
- border-color: transparent;
193
- background-color: var(--black-700);
194
- color: var(--white);
195
- }
196
-
197
- .s-notice__info,
198
- .s-notice__success,
199
- .s-notice__warning,
200
- .s-notice__danger {
201
- .dark-mode({ border-color: transparent; });
202
- .highcontrast-mode({ border-color: currentColor; });
203
-
204
- }
205
-
206
- // ============================================================================
207
- // $ TOASTS
208
- // ----------------------------------------------------------------------------
209
- .s-toast {
210
- visibility: hidden;
211
- position: fixed;
212
- display: flex;
213
- justify-content: center;
214
- top: @su16;
215
- left: @su8;
216
- right: @su8;
217
- opacity: 0;
218
- z-index: @zi-modals + 1; // Toasts should appear above modals
219
- transform: translate3d(0, -66px, 0);
220
- transition: transform 100ms @te-smooth-slow 0s, opacity 60ms @te-smooth-slow 0ms, visibility 0s 150ms;
221
- pointer-events: none;
222
-
223
- &[aria-hidden="false"] {
224
- visibility: visible;
225
- opacity: 1;
226
- transform: translate3d(0, 0, 0);
227
- transition: visibility 0s 0s, opacity 100ms @te-smooth 0s, transform 100ms @te-smooth 0s;
228
- }
229
-
230
- @media (prefers-reduced-motion) {
231
- transform: none;
232
- }
233
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // NOTICES
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
+ // TABLE OF CONTENTS
10
+ // • BASE STYLE
11
+ // • LAYOUT TRANSITIONS
12
+ //
13
+ // ============================================================================
14
+ // $ BASE STYLES
15
+ // ----------------------------------------------------------------------------
16
+ // $$ FILLED, MUTED
17
+ .s-notice {
18
+ padding: @su16;
19
+ border: 1px solid transparent;
20
+ border-radius: @br-sm;
21
+ color: var(--fc-medium);
22
+ font-size: @fs-body1;
23
+
24
+ .s-toast & {
25
+ max-width: 44rem;
26
+ width: 100%;
27
+ padding-top: @su8;
28
+ padding-bottom: @su8;
29
+ box-shadow: var(--bs-sm);
30
+ pointer-events: all;
31
+ }
32
+
33
+ .s-notice--btn {
34
+ color: var(--fc-dark);
35
+ padding: @su8;
36
+ }
37
+ }
38
+
39
+ // ============================================================================
40
+ // $ VISUAL STYLES
41
+ // ============================================================================
42
+ // $$ INFO
43
+ // ----------------------------------------------------------------------------
44
+ .s-notice__info,
45
+ .s-banner__info {
46
+ border-color: var(--theme-secondary-150);
47
+ background-color: var(--theme-secondary-050);
48
+
49
+ &.s-notice__important,
50
+ &.s-banner__important {
51
+ background-color: var(--theme-secondary-400);
52
+ }
53
+
54
+ // Improve the presentation of buttons
55
+ .s-notice--btn {
56
+ &:focus,
57
+ &:hover {
58
+ background-color: var(--theme-secondary-300);
59
+ }
60
+
61
+ &:active {
62
+ background-color: var(--theme-secondary-400);
63
+ }
64
+ }
65
+
66
+ code {
67
+ background-color: var(--theme-secondary-150);
68
+ }
69
+ }
70
+
71
+ // $$ SUCCESS
72
+ // ----------------------------------------------------------------------------
73
+ .s-notice__success,
74
+ .s-banner__success {
75
+ border-color: var(--green-200);
76
+ background-color: var(--green-050);
77
+
78
+ // Bump up the border contrast in high contrast mode
79
+ .highcontrast-mode({
80
+ background-color: var(--green-200);
81
+ border-color: var(--green-400);
82
+ });
83
+
84
+ &.s-notice__important,
85
+ &.s-banner__important {
86
+ background-color: var(--green-400);
87
+ color: var(--black-900);
88
+
89
+ // Bump up the text in high contrast
90
+ .highcontrast-mode({
91
+ background-color: var(--green-500);
92
+ color: var(--white);
93
+ border-color: transparent;
94
+ });
95
+ }
96
+
97
+ // Improve the presentation of buttons
98
+ .s-notice--btn {
99
+ &:focus,
100
+ &:hover {
101
+ background-color: var(--green-100);
102
+ }
103
+
104
+ &:active {
105
+ background-color: var(--green-200);
106
+ }
107
+ }
108
+ }
109
+
110
+ // $$ WARNING
111
+ // ----------------------------------------------------------------------------
112
+ .s-notice__warning,
113
+ .s-banner__warning {
114
+ border-color: var(--yellow-300);
115
+ background-color: var(--yellow-050);
116
+
117
+ // Bump up the border contrast in high contrast mode
118
+ .highcontrast-mode({
119
+ background-color: var(--yellow-200);
120
+ border-color: var(--yellow-700);
121
+ });
122
+
123
+ &.s-notice__important,
124
+ &.s-banner__important {
125
+ background-color: var(--yellow-400);
126
+ color: var(--black-900);
127
+
128
+ // Bump up the text in high contrast
129
+ .highcontrast-mode({
130
+ background-color: var(--yellow-500);
131
+ color: var(--white);
132
+ border-color: transparent;
133
+ });
134
+ }
135
+
136
+ // Improve the presentation of buttons
137
+ .s-notice--btn {
138
+ &:focus,
139
+ &:hover {
140
+ background-color: var(--yellow-200);
141
+ }
142
+
143
+ &:active {
144
+ background-color: var(--yellow-300);
145
+ }
146
+ }
147
+
148
+ code {
149
+ background-color: var(--yellow-200);
150
+ }
151
+ }
152
+
153
+ // $$ DANGER
154
+ // ----------------------------------------------------------------------------
155
+ .s-notice__danger,
156
+ .s-banner__danger {
157
+ border-color: var(--red-200);
158
+ background-color: var(--red-050);
159
+
160
+ // Bump up the border contrast in high contrast mode
161
+ .highcontrast-mode({
162
+ background-color: var(--red-200);
163
+ border-color: var(--red-500);
164
+
165
+ &.s-notice__important,
166
+ &.s-banner__important {
167
+ background-color: var(--red-500);
168
+ }
169
+ });
170
+
171
+ &.s-notice__important,
172
+ &.s-banner__important {
173
+ background-color: var(--red-400);
174
+ }
175
+
176
+ // Improve the presentation of buttons
177
+ .s-notice--btn {
178
+ &:focus,
179
+ &:hover {
180
+ background-color: var(--red-100);
181
+ }
182
+
183
+ &:active {
184
+ background-color: var(--red-200);
185
+ }
186
+ }
187
+ }
188
+
189
+ // $$ IMPORTANT
190
+ // ----------------------------------------------------------------------------
191
+ .s-notice__important {
192
+ border-color: transparent;
193
+ background-color: var(--black-700);
194
+ color: var(--white);
195
+ }
196
+
197
+ .s-notice__info,
198
+ .s-notice__success,
199
+ .s-notice__warning,
200
+ .s-notice__danger {
201
+ .dark-mode({ border-color: transparent; });
202
+ .highcontrast-mode({ border-color: currentColor; });
203
+
204
+ }
205
+
206
+ // ============================================================================
207
+ // $ TOASTS
208
+ // ----------------------------------------------------------------------------
209
+ .s-toast {
210
+ visibility: hidden;
211
+ position: fixed;
212
+ display: flex;
213
+ justify-content: center;
214
+ top: @su16;
215
+ left: @su8;
216
+ right: @su8;
217
+ opacity: 0;
218
+ z-index: @zi-modals + 1; // Toasts should appear above modals
219
+ transform: translate3d(0, -66px, 0);
220
+ transition: transform 100ms @te-smooth-slow 0s, opacity 60ms @te-smooth-slow 0ms, visibility 0s 150ms;
221
+ pointer-events: none;
222
+
223
+ &[aria-hidden="false"] {
224
+ visibility: visible;
225
+ opacity: 1;
226
+ transform: translate3d(0, 0, 0);
227
+ transition: visibility 0s 0s, opacity 100ms @te-smooth 0s, transform 100ms @te-smooth 0s;
228
+ }
229
+
230
+ @media (prefers-reduced-motion) {
231
+ transform: none;
232
+ }
233
+ }
@@ -1,60 +1,60 @@
1
- //
2
- // STACK OVERFLOW
3
- // PAGE TITLES
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
- // ============================================================================
10
- // $ BASE
11
- // ----------------------------------------------------------------------------
12
-
13
- .s-page-title {
14
- display: flex;
15
- flex-direction: row;
16
- justify-content: space-between;
17
- align-items: flex-end;
18
- width: 100%;
19
- padding-bottom: @su16;
20
- border-bottom: 1px solid var(--bc-medium);
21
-
22
- #stacks-internals #screen-md({
23
- flex-direction: column;
24
- align-items: flex-start;
25
- });
26
-
27
- .s-page-title--header {
28
- margin: 0;
29
- margin-bottom: 0;
30
- font-size: @fs-headline1;
31
- color: var(--fc-dark);
32
- line-height: @lh-sm;
33
- font-weight: normal;
34
- }
35
-
36
- .s-page-title--description {
37
- color: var(--fc-light);
38
- margin-top: @su4;
39
- margin-bottom: 0;
40
- font-size: @fs-body2;
41
- }
42
-
43
- .s-page-title--actions {
44
- margin-left: @su8;
45
- flex-shrink: 0;
46
-
47
- #stacks-internals #screen-md({
48
- margin-top: @su8;
49
- margin-left: 0;
50
- });
51
- }
52
-
53
- .s-breadcrumbs {
54
- margin-bottom: @su8;
55
-
56
- #stacks-internals #screen-sm({
57
- margin-bottom: @su2;
58
- });
59
- }
60
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // PAGE TITLES
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
+ // ============================================================================
10
+ // $ BASE
11
+ // ----------------------------------------------------------------------------
12
+
13
+ .s-page-title {
14
+ display: flex;
15
+ flex-direction: row;
16
+ justify-content: space-between;
17
+ align-items: flex-end;
18
+ width: 100%;
19
+ padding-bottom: @su16;
20
+ border-bottom: 1px solid var(--bc-medium);
21
+
22
+ #stacks-internals #screen-md({
23
+ flex-direction: column;
24
+ align-items: flex-start;
25
+ });
26
+
27
+ .s-page-title--header {
28
+ margin: 0;
29
+ margin-bottom: 0;
30
+ font-size: @fs-headline1;
31
+ color: var(--fc-dark);
32
+ line-height: @lh-sm;
33
+ font-weight: normal;
34
+ }
35
+
36
+ .s-page-title--description {
37
+ color: var(--fc-light);
38
+ margin-top: @su4;
39
+ margin-bottom: 0;
40
+ font-size: @fs-body2;
41
+ }
42
+
43
+ .s-page-title--actions {
44
+ margin-left: @su8;
45
+ flex-shrink: 0;
46
+
47
+ #stacks-internals #screen-md({
48
+ margin-top: @su8;
49
+ margin-left: 0;
50
+ });
51
+ }
52
+
53
+ .s-breadcrumbs {
54
+ margin-bottom: @su8;
55
+
56
+ #stacks-internals #screen-sm({
57
+ margin-bottom: @su2;
58
+ });
59
+ }
60
+ }