@stackoverflow/stacks 1.0.0 → 1.2.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 (74) hide show
  1. package/README.md +47 -47
  2. package/dist/controllers/s-popover.d.ts +11 -2
  3. package/dist/css/stacks.css +257 -8
  4. package/dist/css/stacks.min.css +1 -1
  5. package/dist/js/stacks.js +18 -2
  6. package/dist/js/stacks.min.js +1 -1
  7. package/lib/css/atomic/borders.less +378 -378
  8. package/lib/css/atomic/colors.less +209 -209
  9. package/lib/css/atomic/flex.less +375 -375
  10. package/lib/css/atomic/grid.less +174 -174
  11. package/lib/css/atomic/misc.less +343 -343
  12. package/lib/css/atomic/spacing.less +342 -314
  13. package/lib/css/atomic/typography.less +273 -273
  14. package/lib/css/atomic/width-height.less +194 -194
  15. package/lib/css/base/body.less +44 -44
  16. package/lib/css/base/configuration-static.less +61 -61
  17. package/lib/css/base/icons.less +20 -20
  18. package/lib/css/base/internals.less +220 -220
  19. package/lib/css/base/reset-meyer.less +64 -64
  20. package/lib/css/base/reset-normalize.less +449 -449
  21. package/lib/css/base/reset.less +20 -20
  22. package/lib/css/components/activity-indicator.less +44 -45
  23. package/lib/css/components/avatars.less +189 -189
  24. package/lib/css/components/badges.less +254 -209
  25. package/lib/css/components/banners.less +80 -80
  26. package/lib/css/components/blank-states.less +26 -26
  27. package/lib/css/components/breadcrumbs.less +44 -44
  28. package/lib/css/components/button-groups.less +104 -104
  29. package/lib/css/components/buttons.less +665 -665
  30. package/lib/css/components/cards.less +44 -44
  31. package/lib/css/components/code-blocks.less +130 -130
  32. package/lib/css/components/collapsible.less +104 -104
  33. package/lib/css/components/inputs.less +728 -728
  34. package/lib/css/components/link-previews.less +136 -136
  35. package/lib/css/components/links.less +218 -218
  36. package/lib/css/components/menu.less +47 -47
  37. package/lib/css/components/modals.less +133 -133
  38. package/lib/css/components/navigation.less +146 -146
  39. package/lib/css/components/notices.less +233 -233
  40. package/lib/css/components/page-titles.less +60 -60
  41. package/lib/css/components/pagination.less +55 -55
  42. package/lib/css/components/popovers.less +197 -197
  43. package/lib/css/components/post-summary.less +436 -425
  44. package/lib/css/components/progress-bars.less +330 -330
  45. package/lib/css/components/prose.less +503 -503
  46. package/lib/css/components/spinner.less +107 -107
  47. package/lib/css/components/tables.less +341 -341
  48. package/lib/css/components/tags.less +236 -236
  49. package/lib/css/components/toggle-switches.less +144 -144
  50. package/lib/css/components/topbar.less +427 -427
  51. package/lib/css/components/uploader.less +210 -210
  52. package/lib/css/components/user-cards.less +169 -169
  53. package/lib/css/components/widget-dynamic.less +33 -33
  54. package/lib/css/components/widget-static.less +273 -273
  55. package/lib/css/exports/constants-colors.less +1092 -1092
  56. package/lib/css/exports/constants-helpers.less +108 -108
  57. package/lib/css/exports/constants-type.less +153 -153
  58. package/lib/css/exports/exports.less +15 -15
  59. package/lib/css/exports/mixins.less +237 -237
  60. package/lib/css/stacks-dynamic.less +35 -35
  61. package/lib/css/stacks-static.less +86 -86
  62. package/lib/css/stacks.less +13 -13
  63. package/lib/ts/controllers/index.ts +7 -7
  64. package/lib/ts/controllers/s-expandable-control.ts +188 -188
  65. package/lib/ts/controllers/s-modal.ts +321 -321
  66. package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
  67. package/lib/ts/controllers/s-popover.ts +567 -547
  68. package/lib/ts/controllers/s-table.ts +220 -220
  69. package/lib/ts/controllers/s-tooltip.ts +246 -246
  70. package/lib/ts/controllers/s-uploader.ts +172 -172
  71. package/lib/ts/index.ts +20 -20
  72. package/lib/ts/stacks.ts +88 -88
  73. package/lib/tsconfig.json +13 -13
  74. package/package.json +86 -87
@@ -1,169 +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
- column-gap: var(--su8);
17
- row-gap: var(--su4);
18
- align-items: center;
19
- line-height: 1;
20
- padding: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--su6);
143
-
144
- li {
145
- font-size: var(--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: var(--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
+ //
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: var(--su8);
17
+ row-gap: var(--su4);
18
+ align-items: center;
19
+ line-height: 1;
20
+ padding: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--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: var(--su6);
143
+
144
+ li {
145
+ font-size: var(--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: var(--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 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 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
+ }