@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,193 +1,169 @@
1
- //
2
- // STACK OVERFLOW
3
- // USER CARDS
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-user-card {
14
- display: grid;
15
- grid-template-columns: auto 1fr;
16
- grid-column-gap: @su8;
17
- align-items: center;
18
- line-height: 1;
19
- padding: @su8;
20
-
21
- // ===========================================================================
22
- // $ STYLE VARIATIONS
23
- // Modify the presentation of the user card
24
- // ===========================================================================
25
- // $$ Highlighted
26
- // ---------------------------------------------------------------------------
27
- &.s-user-card__highlighted {
28
- background-color: var(--theme-secondary-025);
29
- border-radius: @br-md;
30
-
31
- .s-user-card--type {
32
- color: var(--black-700);
33
- }
34
- }
35
-
36
- // $$ Full meta data
37
- // ---------------------------------------------------------------------------
38
- &.s-user-card__full {
39
- align-items: start;
40
-
41
- .s-user-card--info {
42
- grid-gap: @su4;
43
- }
44
-
45
- .s-user-card--link {
46
- font-size: @fs-body2;
47
- }
48
- }
49
-
50
- // $$ Deleted
51
- // ---------------------------------------------------------------------------
52
- &.s-user-card__deleted {
53
- color: var(--black-500);
54
- }
55
-
56
- // $$ Small size
57
- // ---------------------------------------------------------------------------
58
- &.s-user-card__small {
59
- display: flex;
60
- align-items: center;
61
- grid-column-gap: unset; // Firefox flex layouts respect column gaps, so we need to reset this
62
- padding: 0;
63
-
64
- .s-user-card--time {
65
- margin-right: @su6;
66
- margin-bottom: 0;
67
- }
68
-
69
- .s-user-card--link {
70
- margin-right: @su6;
71
- }
72
-
73
- .s-user-card--avatar {
74
- margin-right: @su6;
75
- }
76
-
77
- .s-user-card--info {
78
- display: flex;
79
- align-items: center;
80
- grid-column-gap: unset; // Firefox flex layouts respect column gaps, so we need to reset this
81
- }
82
- }
83
-
84
- // $$ A minimal presentation
85
- // ---------------------------------------------------------------------------
86
- &.s-user-card__minimal {
87
- display: flex;
88
- align-items: center;
89
- grid-column-gap: unset; // Firefox flex layouts respect column gaps, so we need to reset this
90
- padding: 0;
91
-
92
- .s-user-card--time {
93
- margin-right: @su4;
94
- margin-bottom: 0;
95
- white-space: nowrap;
96
- }
97
-
98
- .s-user-card--link {
99
- margin-right: @su4;
100
- white-space: nowrap;
101
- }
102
-
103
- .s-user-card--avatar {
104
- margin-right: @su4;
105
- }
106
-
107
- .s-user-card--rep {
108
- padding: 0;
109
- color: var(--black-600);
110
- }
111
-
112
- .s-user-card--info {
113
- display: flex;
114
- align-items: center;
115
- grid-column-gap: unset; // Firefox flex layouts respect column gaps, so we need to reset this
116
- }
117
- }
118
-
119
- .s-user-card--type {
120
- grid-column: ~"1 / 3";
121
- padding-top: @su4;
122
- font-size: @fs-caption;
123
- color: var(--theme-primary-400);
124
- }
125
- }
126
-
127
- // $ USER CARD TIME
128
- // Optional element used for displaying time since an action happened
129
- // ---------------------------------------------------------------------------
130
- .s-user-card--time {
131
- grid-column: ~"1 / 3";
132
- grid-row: ~"1 / 2";
133
- color: var(--black-500);
134
- font-size: @fs-caption;
135
- margin-bottom: @su4;
136
- }
137
-
138
- // $ USER INFO CONTAINER
139
- // An optional container for extra meta info that applies a
140
- // vertical grid layout
141
- // ---------------------------------------------------------------------------
142
- .s-user-card--info {
143
- display: grid;
144
- grid-gap: @su2;
145
- }
146
-
147
- // $ USER LINK
148
- // Styles the link to the user's profile appropriately
149
- // ---------------------------------------------------------------------------
150
- .s-user-card--link {
151
- min-width: 0; // Allow things to wrap
152
- font-size: @fs-caption;
153
- align-items: center;
154
- flex-wrap: wrap;
155
- overflow-wrap: break-word;
156
- }
157
-
158
- // $ AWARDS CONTAINER
159
- // A container for reputation and various awards
160
- // ---------------------------------------------------------------------------
161
- .s-user-card--awards {
162
- .list-reset;
163
- display: flex;
164
- align-items: center;
165
-
166
- li {
167
- margin-right: @su6;
168
- font-size: @fs-caption;
169
- }
170
- }
171
-
172
- .s-user-card--rep {
173
- font-weight: 700;
174
- }
175
-
176
- // $ USER META DATA
177
- // Add the proper styling to various user data
178
- // ---------------------------------------------------------------------------
179
- .s-user-card--location,
180
- .s-user-card--role {
181
- font-size: @fs-caption;
182
- color: var(--black-500);
183
- }
184
-
185
- // $ TAGS CONTAINER
186
- // Apply layout to a bunch of child tags
187
- // ---------------------------------------------------------------------------
188
- .s-user-card--tags {
189
- padding-top: (@su2 / 2); // Optically align these a bit, but we can't use margin because of `gs[x]` being applied
190
- min-width: 0; // Allow things to wrap
191
- align-items: center;
192
- flex-wrap: wrap;
193
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // USER CARDS
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-user-card {
14
+ display: grid;
15
+ grid-template-columns: auto 1fr;
16
+ column-gap: @su8;
17
+ row-gap: @su4;
18
+ align-items: center;
19
+ line-height: 1;
20
+ padding: @su8;
21
+
22
+ // ===========================================================================
23
+ // $ STYLE VARIATIONS
24
+ // Modify the presentation of the user card
25
+ // ===========================================================================
26
+ // $$ Highlighted
27
+ // ---------------------------------------------------------------------------
28
+ &.s-user-card__highlighted {
29
+ background-color: var(--theme-secondary-050);
30
+ border-radius: @br-md;
31
+
32
+ .s-user-card--type {
33
+ color: var(--black-700);
34
+ }
35
+ }
36
+
37
+ // $$ Full meta data
38
+ // ---------------------------------------------------------------------------
39
+ &.s-user-card__full {
40
+ align-items: start;
41
+
42
+ .s-user-card--link {
43
+ font-size: @fs-body2;
44
+ }
45
+ }
46
+
47
+ // $$ Deleted
48
+ // ---------------------------------------------------------------------------
49
+ &.s-user-card__deleted {
50
+ color: var(--black-500);
51
+ }
52
+
53
+ // $$ Small size
54
+ // ---------------------------------------------------------------------------
55
+ &.s-user-card__small {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: @su4;
59
+ padding: 0;
60
+
61
+ .s-user-card--info {
62
+ flex-direction: row;
63
+ align-items: center;
64
+ }
65
+ }
66
+
67
+ // $$ A minimal presentation
68
+ // ---------------------------------------------------------------------------
69
+ &.s-user-card__minimal {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: @su4;
73
+ padding: 0;
74
+
75
+ .s-user-card--time {
76
+ white-space: nowrap;
77
+ }
78
+
79
+ .s-user-card--link {
80
+ white-space: nowrap;
81
+ }
82
+
83
+ .s-user-card--rep {
84
+ color: var(--black-600);
85
+ }
86
+
87
+ .s-user-card--info {
88
+ flex-direction: row;
89
+ align-items: center;
90
+ }
91
+ }
92
+
93
+ .s-user-card--type {
94
+ grid-column: ~"1 / 3";
95
+ font-size: @fs-caption;
96
+ color: var(--theme-primary-400);
97
+
98
+ a {
99
+ color: inherit;
100
+ }
101
+ }
102
+ }
103
+
104
+ // $ USER CARD TIME
105
+ // Optional element used for displaying time since an action happened
106
+ // ---------------------------------------------------------------------------
107
+ .s-user-card--time {
108
+ grid-column: ~"1 / 3";
109
+ grid-row: ~"1 / 2";
110
+ color: var(--black-500);
111
+ font-size: @fs-caption;
112
+ }
113
+
114
+ // $ USER INFO CONTAINER
115
+ // An optional container for extra meta info that applies a
116
+ // vertical grid layout
117
+ // ---------------------------------------------------------------------------
118
+ .s-user-card--info {
119
+ display: flex;
120
+ flex-direction: column;
121
+ gap: @su4;
122
+ }
123
+
124
+ // $ USER LINK
125
+ // Styles the link to the user's profile appropriately
126
+ // ---------------------------------------------------------------------------
127
+ .s-user-card--link {
128
+ min-width: 0; // Allow things to wrap
129
+ font-size: @fs-caption;
130
+ align-items: center;
131
+ flex-wrap: wrap;
132
+ overflow-wrap: break-word;
133
+ }
134
+
135
+ // $ AWARDS CONTAINER
136
+ // A container for reputation and various awards
137
+ // ---------------------------------------------------------------------------
138
+ .s-user-card--awards {
139
+ .list-reset;
140
+ display: flex;
141
+ align-items: center;
142
+ gap: @su6;
143
+
144
+ li {
145
+ font-size: @fs-caption;
146
+ }
147
+ }
148
+
149
+ .s-user-card--rep {
150
+ font-weight: 700;
151
+ }
152
+
153
+ // $ USER META DATA
154
+ // Add the proper styling to various user data
155
+ // ---------------------------------------------------------------------------
156
+ .s-user-card--location,
157
+ .s-user-card--role {
158
+ font-size: @fs-caption;
159
+ color: var(--black-500);
160
+ }
161
+
162
+ // $ TAGS CONTAINER
163
+ // Apply layout to a bunch of child tags
164
+ // ---------------------------------------------------------------------------
165
+ .s-user-card--tags {
166
+ min-width: 0; // Allow things to wrap
167
+ align-items: center;
168
+ flex-wrap: wrap;
169
+ }
@@ -1,33 +1,33 @@
1
- //
2
- // STACK OVERFLOW
3
- // SIDEBAR WIDGET -- DYNAMIC PARTS
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
- // This file only sets the colors for the "current color" highlight when the
10
- // widget is used for navigation. This is the only part of the widget that is
11
- // dynamically configurable; the rest can be served in the static part of Stacks
12
- // and is in _stacks-widget-static.less.
13
-
14
- .s-sidebarwidget--item {
15
- &,
16
- & > :first-child {
17
- &[aria-current="true"],
18
- &[aria-current="page"] {
19
- &:before {
20
- border-left-color: var(--theme-primary-color);
21
- }
22
- }
23
- }
24
- }
25
-
26
- .s-sidebarwidget--subnav {
27
- li {
28
- &[aria-current="true"],
29
- &[aria-current="page"] {
30
- #stacks-internals #bullet-arrow(var(--theme-primary-color));
31
- }
32
- }
33
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // SIDEBAR WIDGET -- DYNAMIC PARTS
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
+ // This file only sets the colors for the "current color" highlight when the
10
+ // widget is used for navigation. This is the only part of the widget that is
11
+ // dynamically configurable; the rest can be served in the static part of Stacks
12
+ // and is in _stacks-widget-static.less.
13
+
14
+ .s-sidebarwidget--item {
15
+ &,
16
+ & > :first-child {
17
+ &[aria-current="true"],
18
+ &[aria-current="page"] {
19
+ &:before {
20
+ border-left-color: var(--theme-primary-color);
21
+ }
22
+ }
23
+ }
24
+ }
25
+
26
+ .s-sidebarwidget--subnav {
27
+ li {
28
+ &[aria-current="true"],
29
+ &[aria-current="page"] {
30
+ #stacks-internals #bullet-arrow(var(--theme-primary-color));
31
+ }
32
+ }
33
+ }