@stackoverflow/stacks 0.76.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 (86) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +47 -47
  3. package/dist/controllers/index.d.ts +7 -7
  4. package/dist/controllers/s-expandable-control.d.ts +17 -17
  5. package/dist/controllers/s-modal.d.ts +97 -97
  6. package/dist/controllers/s-navigation-tablist.d.ts +36 -36
  7. package/dist/controllers/s-popover.d.ts +155 -155
  8. package/dist/controllers/s-table.d.ts +8 -8
  9. package/dist/controllers/s-tooltip.d.ts +82 -82
  10. package/dist/controllers/s-uploader.d.ts +48 -48
  11. package/dist/css/stacks.css +4321 -2635
  12. package/dist/css/stacks.min.css +1 -1
  13. package/dist/index.d.ts +3 -3
  14. package/dist/js/stacks.js +1978 -1978
  15. package/dist/js/stacks.min.js +1 -1
  16. package/dist/stacks.d.ts +21 -21
  17. package/lib/css/atomic/{_stacks-borders.less → borders.less} +378 -378
  18. package/lib/css/atomic/{_stacks-colors.less → colors.less} +209 -209
  19. package/lib/css/atomic/{_stacks-flex.less → flex.less} +375 -374
  20. package/lib/css/atomic/{_stacks-grid.less → grid.less} +174 -174
  21. package/lib/css/atomic/{_stacks-misc.less → misc.less} +343 -343
  22. package/lib/css/atomic/spacing.less +314 -0
  23. package/lib/css/atomic/{_stacks-typography.less → typography.less} +273 -273
  24. package/lib/css/atomic/width-height.less +194 -0
  25. package/lib/css/base/{_stacks-body.less → body.less} +44 -44
  26. package/lib/css/base/{_stacks-configuration-static.less → configuration-static.less} +61 -59
  27. package/lib/css/base/{_stacks-icons.less → icons.less} +20 -20
  28. package/lib/css/base/{_stacks-internals.less → internals.less} +220 -220
  29. package/lib/css/base/{_stacks-reset-meyer.less → reset-meyer.less} +64 -64
  30. package/lib/css/base/{_stacks-reset-normalize.less → reset-normalize.less} +449 -449
  31. package/lib/css/base/{_stacks-reset.less → reset.less} +20 -20
  32. package/lib/css/components/{_stacks-activity-indicator.less → activity-indicator.less} +45 -45
  33. package/lib/css/components/{_stacks-avatars.less → avatars.less} +189 -189
  34. package/lib/css/components/{_stacks-badges.less → badges.less} +209 -209
  35. package/lib/css/components/{_stacks-banners.less → banners.less} +80 -80
  36. package/lib/css/components/{_stacks-blank-states.less → blank-states.less} +26 -26
  37. package/lib/css/components/{_stacks-breadcrumbs.less → breadcrumbs.less} +44 -44
  38. package/lib/css/components/{_stacks-button-groups.less → button-groups.less} +104 -104
  39. package/lib/css/components/{_stacks-buttons.less → buttons.less} +665 -658
  40. package/lib/css/components/{_stacks-cards.less → cards.less} +44 -44
  41. package/lib/css/components/{_stacks-code-blocks.less → code-blocks.less} +130 -130
  42. package/lib/css/components/{_stacks-collapsible.less → collapsible.less} +104 -104
  43. package/lib/css/components/{_stacks-inputs.less → inputs.less} +728 -728
  44. package/lib/css/components/{_stacks-link-previews.less → link-previews.less} +136 -136
  45. package/lib/css/components/{_stacks-links.less → links.less} +218 -218
  46. package/lib/css/components/{_stacks-menu.less → menu.less} +47 -47
  47. package/lib/css/components/{_stacks-modals.less → modals.less} +133 -133
  48. package/lib/css/components/{_stacks-navigation.less → navigation.less} +146 -146
  49. package/lib/css/components/{_stacks-notices.less → notices.less} +233 -233
  50. package/lib/css/components/{_stacks-page-titles.less → page-titles.less} +60 -60
  51. package/lib/css/components/{_stacks-pagination.less → pagination.less} +55 -55
  52. package/lib/css/components/{_stacks-popovers.less → popovers.less} +197 -197
  53. package/lib/css/components/{_stacks-post-summary.less → post-summary.less} +425 -425
  54. package/lib/css/components/{_stacks-progress-bars.less → progress-bars.less} +330 -331
  55. package/lib/css/components/{_stacks-prose.less → prose.less} +503 -503
  56. package/lib/css/components/{_stacks-spinner.less → spinner.less} +107 -107
  57. package/lib/css/components/{_stacks-tables.less → tables.less} +341 -341
  58. package/lib/css/components/{_stacks-tags.less → tags.less} +236 -236
  59. package/lib/css/components/{_stacks-toggle-switches.less → toggle-switches.less} +144 -144
  60. package/lib/css/components/{_stacks-topbar.less → topbar.less} +427 -425
  61. package/lib/css/components/{_stacks-uploader.less → uploader.less} +210 -210
  62. package/lib/css/components/{_stacks-user-cards.less → user-cards.less} +169 -169
  63. package/lib/css/components/{_stacks-widget-dynamic.less → widget-dynamic.less} +33 -33
  64. package/lib/css/components/{_stacks-widget-static.less → widget-static.less} +273 -272
  65. package/lib/css/exports/{_stacks-constants-colors.less → constants-colors.less} +1092 -1112
  66. package/lib/css/exports/constants-helpers.less +108 -0
  67. package/lib/css/exports/{_stacks-constants-type.less → constants-type.less} +153 -152
  68. package/lib/css/exports/{_stacks-exports.less → exports.less} +15 -15
  69. package/lib/css/exports/{_stacks-mixins.less → mixins.less} +237 -220
  70. package/lib/css/stacks-dynamic.less +35 -35
  71. package/lib/css/stacks-static.less +86 -86
  72. package/lib/ts/controllers/index.ts +7 -7
  73. package/lib/ts/controllers/s-expandable-control.ts +188 -188
  74. package/lib/ts/controllers/s-modal.ts +321 -321
  75. package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
  76. package/lib/ts/controllers/s-popover.ts +547 -547
  77. package/lib/ts/controllers/s-table.ts +220 -220
  78. package/lib/ts/controllers/s-tooltip.ts +246 -246
  79. package/lib/ts/controllers/s-uploader.ts +172 -172
  80. package/lib/ts/index.ts +20 -20
  81. package/lib/ts/stacks.ts +88 -88
  82. package/lib/tsconfig.json +13 -13
  83. package/package.json +87 -87
  84. package/lib/css/atomic/_stacks-spacing.less +0 -168
  85. package/lib/css/atomic/_stacks-width-height.less +0 -195
  86. package/lib/css/exports/_stacks-constants-helpers.less +0 -139
@@ -1,20 +1,20 @@
1
- // the default CSS reset is normalize.css; other possibilities are the Eric Meyer reset, and no reset at all.
2
-
3
- #stacks-internals() {
4
- #include-css-reset(meyer) {
5
- @import "_stacks-reset-meyer.less";
6
- }
7
- #include-css-reset(normalize) {
8
- @import "_stacks-reset-normalize.less";
9
- }
10
- /* stylelint-disable block-no-empty */
11
- #include-css-reset(none) {
12
- }
13
- /* stylelint-enable */
14
- }
15
-
16
- & {
17
- #stacks-internals #load-static-config();
18
- #stacks-internals #include-css-reset(@css-reset);
19
- }
20
-
1
+ // the default CSS reset is normalize.css; other possibilities are the Eric Meyer reset, and no reset at all.
2
+
3
+ #stacks-internals() {
4
+ #include-css-reset(meyer) {
5
+ @import "reset-meyer.less";
6
+ }
7
+ #include-css-reset(normalize) {
8
+ @import "reset-normalize.less";
9
+ }
10
+ /* stylelint-disable block-no-empty */
11
+ #include-css-reset(none) {
12
+ }
13
+ /* stylelint-enable */
14
+ }
15
+
16
+ & {
17
+ #stacks-internals #load-static-config();
18
+ #stacks-internals #include-css-reset(@css-reset);
19
+ }
20
+
@@ -1,45 +1,45 @@
1
- //
2
- // STACK OVERFLOW
3
- // ACTIVITY INDICATOR
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
- // ============================================================================
11
- // $ ACTIVITY INDICATOR
12
- // ----------------------------------------------------------------------------
13
-
14
- .s-activity-indicator {
15
- display: inline-block;
16
- min-width: @su12;
17
- height: @su12;
18
- padding-left: @su4;
19
- padding-right: @su4;
20
- line-height: 1.1; // Custom line-height to satisfy 1x screens
21
- background-color: var(--theme-secondary-400);
22
- box-shadow: 0 0 0 @su4 var(--focus-ring);
23
- border-radius: 1000px;
24
- font-size: @fs-fine;
25
- font-weight: 600;
26
- color: @white;
27
- text-transform: uppercase;
28
-
29
- .highcontrast-mode({ color: var(--white); });
30
- }
31
-
32
- .s-activity-indicator__success {
33
- background-color: var(--green-500);
34
- box-shadow: 0 0 0 @su4 var(--focus-ring-success);
35
- }
36
-
37
- .s-activity-indicator__warning {
38
- background-color: var(--yellow-600);
39
- box-shadow: 0 0 0 @su4 var(--focus-ring-warning);
40
- }
41
-
42
- .s-activity-indicator__danger {
43
- background-color: var(--red-500);
44
- box-shadow: 0 0 0 @su4 var(--focus-ring-error);
45
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // ACTIVITY INDICATOR
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
+ // ============================================================================
11
+ // $ ACTIVITY INDICATOR
12
+ // ----------------------------------------------------------------------------
13
+
14
+ .s-activity-indicator {
15
+ display: inline-block;
16
+ min-width: var(--su-static12);
17
+ height: var(--su-static12);
18
+ padding-left: var(--su4);
19
+ padding-right: var(--su4);
20
+ line-height: 1.1; // Custom line-height to satisfy 1x screens
21
+ background-color: var(--theme-secondary-400);
22
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring);
23
+ border-radius: 1000px;
24
+ font-size: var(--fs-fine);
25
+ font-weight: 600;
26
+ color: @white;
27
+ text-transform: uppercase;
28
+
29
+ .highcontrast-mode({ color: var(--white); });
30
+ }
31
+
32
+ .s-activity-indicator__success {
33
+ background-color: var(--green-500);
34
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-success);
35
+ }
36
+
37
+ .s-activity-indicator__warning {
38
+ background-color: var(--yellow-600);
39
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-warning);
40
+ }
41
+
42
+ .s-activity-indicator__danger {
43
+ background-color: var(--red-500);
44
+ box-shadow: 0 0 0 var(--su-static4) var(--focus-ring-error);
45
+ }
@@ -1,189 +1,189 @@
1
- //
2
- // STACK OVERFLOW
3
- // AVATARS
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
- // • AVATARS
11
- // • TEAM AVATARS
12
- //
13
-
14
- // ============================================================================
15
- // $ TEAM AVATARS
16
- // ----------------------------------------------------------------------------
17
-
18
- .s-avatar {
19
- display: inline-block; // Make sure the avatar has structure regardless of the element eg. span vs. div
20
- position: relative;
21
- width: @su16;
22
- height: @su16;
23
- border-radius: @br-sm;
24
- background-color: @white; // Force a white background color for when we have transparent avatars
25
- background-repeat: no-repeat;
26
- background-size: 100%;
27
- vertical-align: bottom; // Make our avatars play more nicely with text next to it.
28
-
29
- .highcontrast-mode({
30
- background-color: var(--black);
31
- box-shadow: 0 0 0 1px var(--black);
32
-
33
- .s-avatar--letter {
34
- color: var(--white);
35
- }
36
- });
37
-
38
- .s-avatar--letter {
39
- display: block; // Make sure we're treating the letter as a block-level element
40
- color: @white; // Force a light appearance of text rendering
41
- font-size: 11px; // Force a font size so the avatar text doesn't get smaller as the window resizes
42
- font-weight: bold;
43
- line-height: 1.4; // Guards against some line-height trolling from the parent
44
- text-align: center;
45
- text-transform: uppercase; // Force uppercase in avatars when team name is lowercase
46
- // We don't need text selection on our letter
47
- -webkit-user-select: none;
48
- -moz-user-select: none;
49
- -ms-user-select: none;
50
- user-select: none;
51
- }
52
-
53
- .s-avatar--badge {
54
- position: absolute;
55
- right: -4px;
56
- bottom: -4px;
57
- }
58
-
59
- .s-avatar--image {
60
- width: @su16;
61
- height: @su16;
62
- border-radius: @br-sm;
63
- display: block;
64
- }
65
-
66
- &.s-avatar__24 {
67
- width: @su24;
68
- height: @su24;
69
-
70
- .s-avatar--letter {
71
- font-size: 16px; // Force the font size regardless of the parent
72
- }
73
-
74
- .s-avatar--badge {
75
- -webkit-transform: scale(1.1);
76
- transform: scale(1.1);
77
- }
78
-
79
- .s-avatar--image {
80
- width: @su24;
81
- height: @su24;
82
- }
83
- }
84
-
85
- &.s-avatar__32 {
86
- width: @su32;
87
- height: @su32;
88
- border-radius: @br-md;
89
-
90
- .s-avatar--letter {
91
- font-size: 22px; // Force the font size regardless of the parent
92
- }
93
-
94
- .s-avatar--badge {
95
- -webkit-transform: scale(1.3);
96
- transform: scale(1.3);
97
- }
98
-
99
- .s-avatar--image {
100
- width: @su32;
101
- height: @su32;
102
- border-radius: @br-md;
103
- }
104
- }
105
-
106
- &.s-avatar__48 {
107
- width: @su48;
108
- height: @su48;
109
- border-radius: @br-md;
110
-
111
- .s-avatar--letter {
112
- font-size: 34px; // Force the font size regardless of the parent
113
- }
114
-
115
- .s-avatar--badge {
116
- -webkit-transform: scale(1.6);
117
- transform: scale(1.6);
118
- }
119
-
120
- .s-avatar--image {
121
- width: @su48;
122
- height: @su48;
123
- border-radius: @br-md;
124
- }
125
- }
126
-
127
- &.s-avatar__64 {
128
- width: @su64;
129
- height: @su64;
130
- border-radius: @br-lg;
131
-
132
- .s-avatar--letter {
133
- font-size: 44px; // Force the font size regardless of the parent
134
- }
135
-
136
- .s-avatar--badge {
137
- -webkit-transform: scale(2.4);
138
- transform: scale(2.4);
139
- }
140
-
141
- .s-avatar--image {
142
- width: @su64;
143
- height: @su64;
144
- border-radius: @br-lg;
145
- }
146
- }
147
-
148
- &.s-avatar__96 {
149
- width: @su96;
150
- height: @su96;
151
- border-radius: @br-lg + @br-sm;
152
-
153
- .s-avatar--letter {
154
- font-size: 66px; // Force the font size regardless of the parent
155
- }
156
-
157
- .s-avatar--badge {
158
- -webkit-transform: scale(3);
159
- transform: scale(3);
160
- }
161
-
162
- .s-avatar--image {
163
- width: @su96;
164
- height: @su96;
165
- border-radius: @br-lg + @br-sm;
166
- }
167
- }
168
-
169
- &.s-avatar__128 {
170
- width: @su128;
171
- height: @su128;
172
- border-radius: @br-lg + @br-lg;
173
-
174
- .s-avatar--letter {
175
- font-size: 88px; // Force the font size regardless of the parent
176
- }
177
-
178
- .s-avatar--badge {
179
- -webkit-transform: scale(3);
180
- transform: scale(3);
181
- }
182
-
183
- .s-avatar--image {
184
- width: @su128;
185
- height: @su128;
186
- border-radius: @br-lg + @br-lg;
187
- }
188
- }
189
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // AVATARS
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
+ // • AVATARS
11
+ // • TEAM AVATARS
12
+ //
13
+
14
+ // ============================================================================
15
+ // $ TEAM AVATARS
16
+ // ----------------------------------------------------------------------------
17
+
18
+ .s-avatar {
19
+ display: inline-block; // Make sure the avatar has structure regardless of the element eg. span vs. div
20
+ position: relative;
21
+ width: var(--su-static16);
22
+ height: var(--su-static16);
23
+ border-radius: var(--br-sm);
24
+ background-color: @white; // Force a white background color for when we have transparent avatars
25
+ background-repeat: no-repeat;
26
+ background-size: 100%;
27
+ vertical-align: bottom; // Make our avatars play more nicely with text next to it.
28
+
29
+ .highcontrast-mode({
30
+ background-color: var(--black);
31
+ box-shadow: 0 0 0 1px var(--black);
32
+
33
+ .s-avatar--letter {
34
+ color: var(--white);
35
+ }
36
+ });
37
+
38
+ .s-avatar--letter {
39
+ display: block; // Make sure we're treating the letter as a block-level element
40
+ color: @white; // Force a light appearance of text rendering
41
+ font-size: 11px; // Force a font size so the avatar text doesn't get smaller as the window resizes
42
+ font-weight: bold;
43
+ line-height: 1.4; // Guards against some line-height trolling from the parent
44
+ text-align: center;
45
+ text-transform: uppercase; // Force uppercase in avatars when team name is lowercase
46
+ // We don't need text selection on our letter
47
+ -webkit-user-select: none;
48
+ -moz-user-select: none;
49
+ -ms-user-select: none;
50
+ user-select: none;
51
+ }
52
+
53
+ .s-avatar--badge {
54
+ position: absolute;
55
+ right: -4px;
56
+ bottom: -4px;
57
+ }
58
+
59
+ .s-avatar--image {
60
+ width: var(--su-static16);
61
+ height: var(--su-static16);
62
+ border-radius: var(--br-sm);
63
+ display: block;
64
+ }
65
+
66
+ &.s-avatar__24 {
67
+ width: var(--su-static24);
68
+ height: var(--su-static24);
69
+
70
+ .s-avatar--letter {
71
+ font-size: 16px; // Force the font size regardless of the parent
72
+ }
73
+
74
+ .s-avatar--badge {
75
+ -webkit-transform: scale(1.1);
76
+ transform: scale(1.1);
77
+ }
78
+
79
+ .s-avatar--image {
80
+ width: var(--su-static24);
81
+ height: var(--su-static24);
82
+ }
83
+ }
84
+
85
+ &.s-avatar__32 {
86
+ width: var(--su-static32);
87
+ height: var(--su-static32);
88
+ border-radius: var(--br-md);
89
+
90
+ .s-avatar--letter {
91
+ font-size: 22px; // Force the font size regardless of the parent
92
+ }
93
+
94
+ .s-avatar--badge {
95
+ -webkit-transform: scale(1.3);
96
+ transform: scale(1.3);
97
+ }
98
+
99
+ .s-avatar--image {
100
+ width: var(--su-static32);
101
+ height: var(--su-static32);
102
+ border-radius: var(--br-md);
103
+ }
104
+ }
105
+
106
+ &.s-avatar__48 {
107
+ width: var(--su-static48);
108
+ height: var(--su-static48);
109
+ border-radius: var(--br-md);
110
+
111
+ .s-avatar--letter {
112
+ font-size: 34px; // Force the font size regardless of the parent
113
+ }
114
+
115
+ .s-avatar--badge {
116
+ -webkit-transform: scale(1.6);
117
+ transform: scale(1.6);
118
+ }
119
+
120
+ .s-avatar--image {
121
+ width: var(--su-static48);
122
+ height: var(--su-static48);
123
+ border-radius: var(--br-md);
124
+ }
125
+ }
126
+
127
+ &.s-avatar__64 {
128
+ width: var(--su-static64);
129
+ height: var(--su-static64);
130
+ border-radius: var(--br-lg);
131
+
132
+ .s-avatar--letter {
133
+ font-size: 44px; // Force the font size regardless of the parent
134
+ }
135
+
136
+ .s-avatar--badge {
137
+ -webkit-transform: scale(2.4);
138
+ transform: scale(2.4);
139
+ }
140
+
141
+ .s-avatar--image {
142
+ width: var(--su-static64);
143
+ height: var(--su-static64);
144
+ border-radius: var(--br-lg);
145
+ }
146
+ }
147
+
148
+ &.s-avatar__96 {
149
+ width: var(--su-static96);
150
+ height: var(--su-static96);
151
+ border-radius: calc(var(--br-lg) + var(--br-sm));
152
+
153
+ .s-avatar--letter {
154
+ font-size: 66px; // Force the font size regardless of the parent
155
+ }
156
+
157
+ .s-avatar--badge {
158
+ -webkit-transform: scale(3);
159
+ transform: scale(3);
160
+ }
161
+
162
+ .s-avatar--image {
163
+ width: var(--su-static96);
164
+ height: var(--su-static96);
165
+ border-radius: calc(var(--br-lg) + var(--br-sm));
166
+ }
167
+ }
168
+
169
+ &.s-avatar__128 {
170
+ width: var(--su-static128);
171
+ height: var(--su-static128);
172
+ border-radius: calc(var(--br-lg) + var(--br-lg));
173
+
174
+ .s-avatar--letter {
175
+ font-size: 88px; // Force the font size regardless of the parent
176
+ }
177
+
178
+ .s-avatar--badge {
179
+ -webkit-transform: scale(3);
180
+ transform: scale(3);
181
+ }
182
+
183
+ .s-avatar--image {
184
+ width: var(--su-static128);
185
+ height: var(--su-static128);
186
+ border-radius: calc(var(--br-lg) + var(--br-lg));
187
+ }
188
+ }
189
+ }