@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.
- package/README.md +47 -47
- package/dist/controllers/s-popover.d.ts +11 -2
- package/dist/css/stacks.css +257 -8
- package/dist/css/stacks.min.css +1 -1
- package/dist/js/stacks.js +18 -2
- package/dist/js/stacks.min.js +1 -1
- package/lib/css/atomic/borders.less +378 -378
- package/lib/css/atomic/colors.less +209 -209
- package/lib/css/atomic/flex.less +375 -375
- package/lib/css/atomic/grid.less +174 -174
- package/lib/css/atomic/misc.less +343 -343
- package/lib/css/atomic/spacing.less +342 -314
- package/lib/css/atomic/typography.less +273 -273
- package/lib/css/atomic/width-height.less +194 -194
- package/lib/css/base/body.less +44 -44
- package/lib/css/base/configuration-static.less +61 -61
- package/lib/css/base/icons.less +20 -20
- package/lib/css/base/internals.less +220 -220
- package/lib/css/base/reset-meyer.less +64 -64
- package/lib/css/base/reset-normalize.less +449 -449
- package/lib/css/base/reset.less +20 -20
- package/lib/css/components/activity-indicator.less +44 -45
- package/lib/css/components/avatars.less +189 -189
- package/lib/css/components/badges.less +254 -209
- package/lib/css/components/banners.less +80 -80
- package/lib/css/components/blank-states.less +26 -26
- package/lib/css/components/breadcrumbs.less +44 -44
- package/lib/css/components/button-groups.less +104 -104
- package/lib/css/components/buttons.less +665 -665
- package/lib/css/components/cards.less +44 -44
- package/lib/css/components/code-blocks.less +130 -130
- package/lib/css/components/collapsible.less +104 -104
- package/lib/css/components/inputs.less +728 -728
- package/lib/css/components/link-previews.less +136 -136
- package/lib/css/components/links.less +218 -218
- package/lib/css/components/menu.less +47 -47
- package/lib/css/components/modals.less +133 -133
- package/lib/css/components/navigation.less +146 -146
- package/lib/css/components/notices.less +233 -233
- package/lib/css/components/page-titles.less +60 -60
- package/lib/css/components/pagination.less +55 -55
- package/lib/css/components/popovers.less +197 -197
- package/lib/css/components/post-summary.less +436 -425
- package/lib/css/components/progress-bars.less +330 -330
- package/lib/css/components/prose.less +503 -503
- package/lib/css/components/spinner.less +107 -107
- package/lib/css/components/tables.less +341 -341
- package/lib/css/components/tags.less +236 -236
- package/lib/css/components/toggle-switches.less +144 -144
- package/lib/css/components/topbar.less +427 -427
- package/lib/css/components/uploader.less +210 -210
- package/lib/css/components/user-cards.less +169 -169
- package/lib/css/components/widget-dynamic.less +33 -33
- package/lib/css/components/widget-static.less +273 -273
- package/lib/css/exports/constants-colors.less +1092 -1092
- package/lib/css/exports/constants-helpers.less +108 -108
- package/lib/css/exports/constants-type.less +153 -153
- package/lib/css/exports/exports.less +15 -15
- package/lib/css/exports/mixins.less +237 -237
- package/lib/css/stacks-dynamic.less +35 -35
- package/lib/css/stacks-static.less +86 -86
- package/lib/css/stacks.less +13 -13
- package/lib/ts/controllers/index.ts +7 -7
- package/lib/ts/controllers/s-expandable-control.ts +188 -188
- package/lib/ts/controllers/s-modal.ts +321 -321
- package/lib/ts/controllers/s-navigation-tablist.ts +117 -117
- package/lib/ts/controllers/s-popover.ts +567 -547
- package/lib/ts/controllers/s-table.ts +220 -220
- package/lib/ts/controllers/s-tooltip.ts +246 -246
- package/lib/ts/controllers/s-uploader.ts +172 -172
- package/lib/ts/index.ts +20 -20
- package/lib/ts/stacks.ts +88 -88
- package/lib/tsconfig.json +13 -13
- package/package.json +86 -87
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// EMPTY STATES
|
|
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 STYLE
|
|
11
|
-
// ----------------------------------------------------------------------------
|
|
12
|
-
.s-empty-state {
|
|
13
|
-
color: var(--fc-light);
|
|
14
|
-
text-align: center;
|
|
15
|
-
margin-left: auto;
|
|
16
|
-
margin-right: auto;
|
|
17
|
-
|
|
18
|
-
p {
|
|
19
|
-
font-size: var(--fs-body1);
|
|
20
|
-
margin-bottom: var(--su12);
|
|
21
|
-
|
|
22
|
-
strong {
|
|
23
|
-
color: var(--fc-dark);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// EMPTY STATES
|
|
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 STYLE
|
|
11
|
+
// ----------------------------------------------------------------------------
|
|
12
|
+
.s-empty-state {
|
|
13
|
+
color: var(--fc-light);
|
|
14
|
+
text-align: center;
|
|
15
|
+
margin-left: auto;
|
|
16
|
+
margin-right: auto;
|
|
17
|
+
|
|
18
|
+
p {
|
|
19
|
+
font-size: var(--fs-body1);
|
|
20
|
+
margin-bottom: var(--su12);
|
|
21
|
+
|
|
22
|
+
strong {
|
|
23
|
+
color: var(--fc-dark);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// BREADCRUMBS
|
|
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
|
-
.s-breadcrumbs {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-wrap: wrap;
|
|
13
|
-
align-items: start;
|
|
14
|
-
color: var(--black-150);
|
|
15
|
-
font-size: var(--fs-caption);
|
|
16
|
-
|
|
17
|
-
.s-breadcrumbs--item {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-wrap: nowrap;
|
|
20
|
-
align-items: center;
|
|
21
|
-
margin-top: var(--su2);
|
|
22
|
-
margin-bottom: var(--su2);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.s-breadcrumbs--divider {
|
|
26
|
-
margin-right: var(--su4);
|
|
27
|
-
margin-left: var(--su4);
|
|
28
|
-
|
|
29
|
-
.highcontrast-mode({ color: var(--black-350); });
|
|
30
|
-
|
|
31
|
-
#stacks-internals #screen-sm({
|
|
32
|
-
margin-right: var(--su2);
|
|
33
|
-
margin-left: var(--su2);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.s-breadcrumbs--link {
|
|
38
|
-
color: var(--black-350);
|
|
39
|
-
|
|
40
|
-
&:hover {
|
|
41
|
-
color: var(--black-600);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// BREADCRUMBS
|
|
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
|
+
.s-breadcrumbs {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
align-items: start;
|
|
14
|
+
color: var(--black-150);
|
|
15
|
+
font-size: var(--fs-caption);
|
|
16
|
+
|
|
17
|
+
.s-breadcrumbs--item {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: nowrap;
|
|
20
|
+
align-items: center;
|
|
21
|
+
margin-top: var(--su2);
|
|
22
|
+
margin-bottom: var(--su2);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.s-breadcrumbs--divider {
|
|
26
|
+
margin-right: var(--su4);
|
|
27
|
+
margin-left: var(--su4);
|
|
28
|
+
|
|
29
|
+
.highcontrast-mode({ color: var(--black-350); });
|
|
30
|
+
|
|
31
|
+
#stacks-internals #screen-sm({
|
|
32
|
+
margin-right: var(--su2);
|
|
33
|
+
margin-left: var(--su2);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.s-breadcrumbs--link {
|
|
38
|
+
color: var(--black-350);
|
|
39
|
+
|
|
40
|
+
&:hover {
|
|
41
|
+
color: var(--black-600);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
//
|
|
2
|
-
// STACK OVERFLOW
|
|
3
|
-
// BUTTON GROUPS
|
|
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
|
-
// • BUTTON GROUP CONTAINER
|
|
11
|
-
|
|
12
|
-
// ============================================================================
|
|
13
|
-
// $ CONTAINER
|
|
14
|
-
// ----------------------------------------------------------------------------
|
|
15
|
-
.s-btn-group {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex-wrap: wrap;
|
|
18
|
-
margin-bottom: 1px; // Compensate for buttons having a margin bottom of -1px to account for row wrapping
|
|
19
|
-
|
|
20
|
-
.s-btn {
|
|
21
|
-
margin-bottom: -1px; // When wrapping we need to account for the border
|
|
22
|
-
white-space: nowrap; // When the buttons wrap, they get super tall and mess up the whole layout
|
|
23
|
-
|
|
24
|
-
// If it isn't the last button, we should slide the button over to account for border thickness
|
|
25
|
-
&:not(:last-child) {
|
|
26
|
-
margin-right: -1px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// We don't want border-radii on interior buttons
|
|
30
|
-
&:not(:first-child):not(:last-child) {
|
|
31
|
-
border-radius: 0;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Kill the right border radius on the first button
|
|
35
|
-
&:first-child:not(:only-child) {
|
|
36
|
-
border-top-right-radius: 0;
|
|
37
|
-
border-bottom-right-radius: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Kill the left border radius on the last button
|
|
41
|
-
&:last-child:not(:only-child) {
|
|
42
|
-
border-top-left-radius: 0;
|
|
43
|
-
border-bottom-left-radius: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// When the button is active or selected, it should pop above its siblings
|
|
47
|
-
&.is-selected {
|
|
48
|
-
z-index: var(--zi-selected);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.highcontrast-mode({
|
|
52
|
-
&.is-selected {
|
|
53
|
-
background-color: var(--black-400);
|
|
54
|
-
color: var(--white);
|
|
55
|
-
|
|
56
|
-
.s-btn--number {
|
|
57
|
-
color: var(--black);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
&:active {
|
|
63
|
-
z-index: var(--zi-active);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
#stacks-internals #screen-sm({
|
|
67
|
-
padding-left: 0.4em;
|
|
68
|
-
padding-right: 0.4em;
|
|
69
|
-
}, @force-selector: true);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
#stacks-internals #screen-sm({
|
|
73
|
-
.s-btn.s-btn__dropdown {
|
|
74
|
-
padding-right: 1.2em;
|
|
75
|
-
|
|
76
|
-
&:after {
|
|
77
|
-
right: 0.4em;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}, @force-selector: true);
|
|
81
|
-
|
|
82
|
-
.s-btn-group--container {
|
|
83
|
-
display: flex;
|
|
84
|
-
|
|
85
|
-
.s-btn {
|
|
86
|
-
margin-right: -1px; // We should slide buttons over to account for border thickness
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
&:not(:first-child):not(:last-child) .s-btn {
|
|
90
|
-
border-radius: 0;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
&:first-child .s-btn {
|
|
94
|
-
border-top-right-radius: 0;
|
|
95
|
-
border-bottom-right-radius: 0;
|
|
96
|
-
margin-left: 0;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
&:last-child .s-btn {
|
|
100
|
-
border-top-left-radius: 0;
|
|
101
|
-
border-bottom-left-radius: 0;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
1
|
+
//
|
|
2
|
+
// STACK OVERFLOW
|
|
3
|
+
// BUTTON GROUPS
|
|
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
|
+
// • BUTTON GROUP CONTAINER
|
|
11
|
+
|
|
12
|
+
// ============================================================================
|
|
13
|
+
// $ CONTAINER
|
|
14
|
+
// ----------------------------------------------------------------------------
|
|
15
|
+
.s-btn-group {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
margin-bottom: 1px; // Compensate for buttons having a margin bottom of -1px to account for row wrapping
|
|
19
|
+
|
|
20
|
+
.s-btn {
|
|
21
|
+
margin-bottom: -1px; // When wrapping we need to account for the border
|
|
22
|
+
white-space: nowrap; // When the buttons wrap, they get super tall and mess up the whole layout
|
|
23
|
+
|
|
24
|
+
// If it isn't the last button, we should slide the button over to account for border thickness
|
|
25
|
+
&:not(:last-child) {
|
|
26
|
+
margin-right: -1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// We don't want border-radii on interior buttons
|
|
30
|
+
&:not(:first-child):not(:last-child) {
|
|
31
|
+
border-radius: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Kill the right border radius on the first button
|
|
35
|
+
&:first-child:not(:only-child) {
|
|
36
|
+
border-top-right-radius: 0;
|
|
37
|
+
border-bottom-right-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Kill the left border radius on the last button
|
|
41
|
+
&:last-child:not(:only-child) {
|
|
42
|
+
border-top-left-radius: 0;
|
|
43
|
+
border-bottom-left-radius: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// When the button is active or selected, it should pop above its siblings
|
|
47
|
+
&.is-selected {
|
|
48
|
+
z-index: var(--zi-selected);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.highcontrast-mode({
|
|
52
|
+
&.is-selected {
|
|
53
|
+
background-color: var(--black-400);
|
|
54
|
+
color: var(--white);
|
|
55
|
+
|
|
56
|
+
.s-btn--number {
|
|
57
|
+
color: var(--black);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
&:active {
|
|
63
|
+
z-index: var(--zi-active);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
#stacks-internals #screen-sm({
|
|
67
|
+
padding-left: 0.4em;
|
|
68
|
+
padding-right: 0.4em;
|
|
69
|
+
}, @force-selector: true);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
#stacks-internals #screen-sm({
|
|
73
|
+
.s-btn.s-btn__dropdown {
|
|
74
|
+
padding-right: 1.2em;
|
|
75
|
+
|
|
76
|
+
&:after {
|
|
77
|
+
right: 0.4em;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}, @force-selector: true);
|
|
81
|
+
|
|
82
|
+
.s-btn-group--container {
|
|
83
|
+
display: flex;
|
|
84
|
+
|
|
85
|
+
.s-btn {
|
|
86
|
+
margin-right: -1px; // We should slide buttons over to account for border thickness
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:not(:first-child):not(:last-child) .s-btn {
|
|
90
|
+
border-radius: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:first-child .s-btn {
|
|
94
|
+
border-top-right-radius: 0;
|
|
95
|
+
border-bottom-right-radius: 0;
|
|
96
|
+
margin-left: 0;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:last-child .s-btn {
|
|
100
|
+
border-top-left-radius: 0;
|
|
101
|
+
border-bottom-left-radius: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|