@stackoverflow/stacks 2.7.3 → 2.7.4
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/LICENSE.MD +9 -9
- package/README.md +158 -180
- package/dist/css/stacks.css +6 -0
- package/dist/js/stacks.min.js +1 -1
- package/lib/atomic/border.less +139 -139
- package/lib/atomic/color.less +36 -36
- package/lib/atomic/flex.less +426 -426
- package/lib/atomic/gap.less +44 -44
- package/lib/atomic/grid.less +139 -139
- package/lib/atomic/misc.less +374 -374
- package/lib/atomic/spacing.less +98 -98
- package/lib/atomic/typography.less +266 -264
- package/lib/atomic/width-height.less +194 -194
- package/lib/base/body.less +44 -44
- package/lib/base/configuration-static.less +61 -61
- package/lib/base/fieldset.less +5 -5
- package/lib/base/icon.less +11 -11
- package/lib/base/internal.less +220 -220
- package/lib/base/reset-meyer.less +64 -64
- package/lib/base/reset-normalize.less +449 -449
- package/lib/base/reset.less +20 -20
- package/lib/components/activity-indicator/activity-indicator.less +53 -53
- package/lib/components/avatar/avatar.less +108 -108
- package/lib/components/award-bling/award-bling.less +31 -31
- package/lib/components/banner/banner.less +44 -44
- package/lib/components/banner/banner.ts +149 -149
- package/lib/components/block-link/block-link.less +82 -82
- package/lib/components/breadcrumbs/breadcrumbs.less +41 -41
- package/lib/components/button-group/button-group.less +82 -82
- package/lib/components/card/card.less +37 -37
- package/lib/components/check-control/check-control.less +17 -17
- package/lib/components/check-group/check-group.less +19 -19
- package/lib/components/checkbox_radio/checkbox_radio.less +159 -159
- package/lib/components/code-block/code-block.fixtures.ts +88 -88
- package/lib/components/code-block/code-block.less +116 -116
- package/lib/components/description/description.less +9 -9
- package/lib/components/empty-state/empty-state.less +16 -16
- package/lib/components/expandable/expandable.less +118 -118
- package/lib/components/input-fill/input-fill.less +35 -35
- package/lib/components/input-icon/input-icon.less +45 -45
- package/lib/components/input-message/input-message.less +49 -49
- package/lib/components/label/label.less +110 -110
- package/lib/components/link-preview/link-preview.less +148 -148
- package/lib/components/menu/menu.less +41 -41
- package/lib/components/modal/modal.less +118 -118
- package/lib/components/modal/modal.ts +383 -383
- package/lib/components/navigation/navigation.less +136 -136
- package/lib/components/navigation/navigation.ts +128 -128
- package/lib/components/page-title/page-title.less +51 -51
- package/lib/components/popover/popover.less +159 -159
- package/lib/components/popover/popover.ts +651 -651
- package/lib/components/post-summary/post-summary.less +457 -457
- package/lib/components/progress-bar/progress-bar.less +291 -291
- package/lib/components/prose/prose.less +452 -452
- package/lib/components/select/select.less +138 -138
- package/lib/components/spinner/spinner.less +103 -103
- package/lib/components/table/table.ts +296 -296
- package/lib/components/table-container/table-container.less +4 -4
- package/lib/components/tag/tag.less +186 -186
- package/lib/components/toast/toast.less +35 -35
- package/lib/components/toast/toast.ts +357 -357
- package/lib/components/toggle-switch/toggle-switch.less +104 -104
- package/lib/components/topbar/topbar.less +553 -553
- package/lib/components/uploader/uploader.less +205 -205
- package/lib/components/user-card/user-card.less +129 -129
- package/lib/controllers.ts +33 -33
- package/lib/exports/color-mixins.less +283 -283
- package/lib/exports/constants-helpers.less +108 -108
- package/lib/exports/constants-type.less +155 -155
- package/lib/exports/exports.less +15 -15
- package/lib/exports/mixins.less +334 -333
- package/lib/exports/spacing-mixins.less +67 -67
- package/lib/index.ts +32 -32
- package/lib/input-utils.less +41 -41
- package/lib/stacks-dynamic.less +24 -24
- package/lib/stacks-static.less +93 -93
- package/lib/stacks.less +13 -13
- package/lib/test/assertions.ts +36 -36
- package/lib/test/less-test-utils.ts +28 -28
- package/lib/test/open-wc-testing-patch.d.ts +26 -26
- package/lib/tsconfig.build.json +4 -4
- package/lib/tsconfig.json +17 -17
- package/package.json +26 -22
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
.s-popover {
|
|
2
|
-
--_po-bg: var(--white);
|
|
3
|
-
--_po-bc: var(--bc-medium);
|
|
4
|
-
--_po-bs: var(--bs-md);
|
|
5
|
-
--_po-d: none;
|
|
6
|
-
--_po-wmn: 12rem;
|
|
7
|
-
--_po-w: 100%;
|
|
8
|
-
// arrow
|
|
9
|
-
--_po-arrow-fc: var(--white);
|
|
10
|
-
--_po-arrow-b: unset;
|
|
11
|
-
--_po-arrow-l: unset;
|
|
12
|
-
--_po-arrow-r: unset;
|
|
13
|
-
--_po-arrow-t: unset;
|
|
14
|
-
--_po-arrow-ps: calc(var(--su6) * -1); // ps suffix used for placement, not positioning value
|
|
15
|
-
--_po-arrow-after-b: unset;
|
|
16
|
-
--_po-arrow-after-l: unset;
|
|
17
|
-
--_po-arrow-after-r: unset;
|
|
18
|
-
--_po-arrow-after-t: unset;
|
|
19
|
-
--_po-arrow-after-bs: unset;
|
|
20
|
-
// content
|
|
21
|
-
// --_po-topbar-height assumes the topbar height based on topbar styles
|
|
22
|
-
--_po-topbar-height: var(--theme-topbar-height, calc(var(--su-static48) + var(--su-static8)));
|
|
23
|
-
--_po-content-mxh: calc(100vh - var(--_po-topbar-height) - var(--su48));
|
|
24
|
-
|
|
25
|
-
// CONTEXTUAL STYLES
|
|
26
|
-
.dark-mode({
|
|
27
|
-
--_po-bg: var(--black-200);
|
|
28
|
-
--_po-bc: var(--bc-light);
|
|
29
|
-
--_po-bs: var(--bs-lg);
|
|
30
|
-
--_po-arrow-fc: var(--black-200);
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
// MODIFIERS
|
|
34
|
-
&.is-visible {
|
|
35
|
-
--_po-d: block;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&&__tooltip {
|
|
39
|
-
--_po-wmn: unset;
|
|
40
|
-
--_po-w: auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// CHILD ELEMENTS
|
|
44
|
-
// Arrow
|
|
45
|
-
&[data-popper-placement^="top"] > &--arrow,
|
|
46
|
-
& &--arrow__bc,
|
|
47
|
-
& &--arrow__bl,
|
|
48
|
-
& &--arrow__br {
|
|
49
|
-
--_po-arrow-b: var(--_po-arrow-ps);
|
|
50
|
-
--_po-arrow-after-b: var(--su-static1);
|
|
51
|
-
--_po-arrow-after-bs: 2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
52
|
-
.highcontrast-mode({ --_po-arrow-after-bs: 1px 1px 0 0 var(--bc-medium); });
|
|
53
|
-
}
|
|
54
|
-
&[data-popper-placement^="bottom"] > &--arrow,
|
|
55
|
-
& &--arrow__tc,
|
|
56
|
-
& &--arrow__tl,
|
|
57
|
-
& &--arrow__tr {
|
|
58
|
-
--_po-arrow-t: var(--_po-arrow-ps);
|
|
59
|
-
--_po-arrow-after-t: var(--su-static1);
|
|
60
|
-
--_po-arrow-after-bs: -1px -1px 1px 0 hsla(0, 0%, 0%, 0.12);
|
|
61
|
-
.highcontrast-mode({ --_po-arrow-after-bs: -1px -1px 0 0 var(--bc-medium); });
|
|
62
|
-
}
|
|
63
|
-
&[data-popper-placement^="left"] > &--arrow,
|
|
64
|
-
& &--arrow__rc,
|
|
65
|
-
& &--arrow__rt,
|
|
66
|
-
& &--arrow__rb {
|
|
67
|
-
--_po-arrow-r: var(--_po-arrow-ps);
|
|
68
|
-
--_po-arrow-after-r: var(--su-static1);
|
|
69
|
-
--_po-arrow-after-bs: 2px -2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px -2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
70
|
-
.highcontrast-mode({ --_po-arrow-after-bs: 1px -1px 0 0 var(--bc-medium); });
|
|
71
|
-
}
|
|
72
|
-
&[data-popper-placement^="right"] > &--arrow,
|
|
73
|
-
& &--arrow__lc,
|
|
74
|
-
& &--arrow__lt,
|
|
75
|
-
& &--arrow__lb {
|
|
76
|
-
--_po-arrow-l: var(--_po-arrow-ps);
|
|
77
|
-
--_po-arrow-after-l: var(--su-static1);
|
|
78
|
-
--_po-arrow-after-bs: -2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), -2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
79
|
-
.highcontrast-mode({ --_po-arrow-after-bs: -1px 1px 0 0 var(--bc-medium); });
|
|
80
|
-
}
|
|
81
|
-
& &--arrow__tc,
|
|
82
|
-
& &--arrow__bc {
|
|
83
|
-
--_po-arrow-l: calc(50% - var(--su6));
|
|
84
|
-
}
|
|
85
|
-
& &--arrow__lc,
|
|
86
|
-
& &--arrow__rc {
|
|
87
|
-
--_po-arrow-t: calc(50% - var(--su6));
|
|
88
|
-
}
|
|
89
|
-
& &--arrow__tr,
|
|
90
|
-
.s-popover--arrow__br {
|
|
91
|
-
--_po-arrow-r: var(--su12);
|
|
92
|
-
}
|
|
93
|
-
& &--arrow__rb,
|
|
94
|
-
& &--arrow__lb {
|
|
95
|
-
--_po-arrow-b: var(--su12);
|
|
96
|
-
}
|
|
97
|
-
& &--arrow {
|
|
98
|
-
&,
|
|
99
|
-
&:before,
|
|
100
|
-
&:after {
|
|
101
|
-
display: block;
|
|
102
|
-
height: var(--su12);
|
|
103
|
-
position: absolute;
|
|
104
|
-
width: var(--su12);
|
|
105
|
-
z-index: -1;
|
|
106
|
-
}
|
|
107
|
-
&:before, // This renders our border
|
|
108
|
-
&:after {
|
|
109
|
-
content: '';
|
|
110
|
-
transform: rotate(45deg);
|
|
111
|
-
}
|
|
112
|
-
&:after { // This renders our foreground color
|
|
113
|
-
bottom: var(--_po-arrow-after-b);
|
|
114
|
-
box-shadow: var(--_po-arrow-after-bs);
|
|
115
|
-
left: var(--_po-arrow-after-l);
|
|
116
|
-
right: var(--_po-arrow-after-r);
|
|
117
|
-
top: var(--_po-arrow-after-t);
|
|
118
|
-
|
|
119
|
-
background: currentColor;
|
|
120
|
-
border-radius: calc(var(--su-static1) * 1.5);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
bottom: var(--_po-arrow-b);
|
|
124
|
-
color: var(--_po-arrow-fc);
|
|
125
|
-
left: var(--_po-arrow-l);
|
|
126
|
-
right: var(--_po-arrow-r);
|
|
127
|
-
top: var(--_po-arrow-t);
|
|
128
|
-
}
|
|
129
|
-
// Close btn
|
|
130
|
-
& &--close {
|
|
131
|
-
float: right; // Use floats for title wrapping
|
|
132
|
-
top: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
133
|
-
right: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
134
|
-
padding: var(--su8) !important;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
& &--content {
|
|
138
|
-
max-height: var(--_po-content-mxh);
|
|
139
|
-
overflow-y: auto;
|
|
140
|
-
margin: calc(var(--su12) * -1);
|
|
141
|
-
padding: var(--su12);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
background-color: var(--_po-bg);
|
|
145
|
-
border: 1px solid var(--_po-bc);
|
|
146
|
-
box-shadow: var(--_po-bs);
|
|
147
|
-
display: var(--_po-d);
|
|
148
|
-
min-width: var(--_po-wmn);
|
|
149
|
-
width: var(--_po-w);
|
|
150
|
-
|
|
151
|
-
border-radius: var(--br-md);
|
|
152
|
-
color: var(--fc-dark);
|
|
153
|
-
font-size: var(--fs-body1);
|
|
154
|
-
max-width: 24rem;
|
|
155
|
-
padding: var(--su12);
|
|
156
|
-
position: absolute;
|
|
157
|
-
white-space: normal; // Guard against popovers being in a container with white-space: nowrap. Without this, the content pops *out* of the popover.
|
|
158
|
-
z-index: var(--zi-popovers);
|
|
159
|
-
}
|
|
1
|
+
.s-popover {
|
|
2
|
+
--_po-bg: var(--white);
|
|
3
|
+
--_po-bc: var(--bc-medium);
|
|
4
|
+
--_po-bs: var(--bs-md);
|
|
5
|
+
--_po-d: none;
|
|
6
|
+
--_po-wmn: 12rem;
|
|
7
|
+
--_po-w: 100%;
|
|
8
|
+
// arrow
|
|
9
|
+
--_po-arrow-fc: var(--white);
|
|
10
|
+
--_po-arrow-b: unset;
|
|
11
|
+
--_po-arrow-l: unset;
|
|
12
|
+
--_po-arrow-r: unset;
|
|
13
|
+
--_po-arrow-t: unset;
|
|
14
|
+
--_po-arrow-ps: calc(var(--su6) * -1); // ps suffix used for placement, not positioning value
|
|
15
|
+
--_po-arrow-after-b: unset;
|
|
16
|
+
--_po-arrow-after-l: unset;
|
|
17
|
+
--_po-arrow-after-r: unset;
|
|
18
|
+
--_po-arrow-after-t: unset;
|
|
19
|
+
--_po-arrow-after-bs: unset;
|
|
20
|
+
// content
|
|
21
|
+
// --_po-topbar-height assumes the topbar height based on topbar styles
|
|
22
|
+
--_po-topbar-height: var(--theme-topbar-height, calc(var(--su-static48) + var(--su-static8)));
|
|
23
|
+
--_po-content-mxh: calc(100vh - var(--_po-topbar-height) - var(--su48));
|
|
24
|
+
|
|
25
|
+
// CONTEXTUAL STYLES
|
|
26
|
+
.dark-mode({
|
|
27
|
+
--_po-bg: var(--black-200);
|
|
28
|
+
--_po-bc: var(--bc-light);
|
|
29
|
+
--_po-bs: var(--bs-lg);
|
|
30
|
+
--_po-arrow-fc: var(--black-200);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// MODIFIERS
|
|
34
|
+
&.is-visible {
|
|
35
|
+
--_po-d: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&&__tooltip {
|
|
39
|
+
--_po-wmn: unset;
|
|
40
|
+
--_po-w: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// CHILD ELEMENTS
|
|
44
|
+
// Arrow
|
|
45
|
+
&[data-popper-placement^="top"] > &--arrow,
|
|
46
|
+
& &--arrow__bc,
|
|
47
|
+
& &--arrow__bl,
|
|
48
|
+
& &--arrow__br {
|
|
49
|
+
--_po-arrow-b: var(--_po-arrow-ps);
|
|
50
|
+
--_po-arrow-after-b: var(--su-static1);
|
|
51
|
+
--_po-arrow-after-bs: 2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
52
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px 1px 0 0 var(--bc-medium); });
|
|
53
|
+
}
|
|
54
|
+
&[data-popper-placement^="bottom"] > &--arrow,
|
|
55
|
+
& &--arrow__tc,
|
|
56
|
+
& &--arrow__tl,
|
|
57
|
+
& &--arrow__tr {
|
|
58
|
+
--_po-arrow-t: var(--_po-arrow-ps);
|
|
59
|
+
--_po-arrow-after-t: var(--su-static1);
|
|
60
|
+
--_po-arrow-after-bs: -1px -1px 1px 0 hsla(0, 0%, 0%, 0.12);
|
|
61
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px -1px 0 0 var(--bc-medium); });
|
|
62
|
+
}
|
|
63
|
+
&[data-popper-placement^="left"] > &--arrow,
|
|
64
|
+
& &--arrow__rc,
|
|
65
|
+
& &--arrow__rt,
|
|
66
|
+
& &--arrow__rb {
|
|
67
|
+
--_po-arrow-r: var(--_po-arrow-ps);
|
|
68
|
+
--_po-arrow-after-r: var(--su-static1);
|
|
69
|
+
--_po-arrow-after-bs: 2px -2px 5px 0 hsla(0, 0%, 0%, 0.07), 2px -2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
70
|
+
.highcontrast-mode({ --_po-arrow-after-bs: 1px -1px 0 0 var(--bc-medium); });
|
|
71
|
+
}
|
|
72
|
+
&[data-popper-placement^="right"] > &--arrow,
|
|
73
|
+
& &--arrow__lc,
|
|
74
|
+
& &--arrow__lt,
|
|
75
|
+
& &--arrow__lb {
|
|
76
|
+
--_po-arrow-l: var(--_po-arrow-ps);
|
|
77
|
+
--_po-arrow-after-l: var(--su-static1);
|
|
78
|
+
--_po-arrow-after-bs: -2px 2px 5px 0 hsla(0, 0%, 0%, 0.07), -2px 2px 2px -1px hsla(0, 0%, 0%, 0.1);
|
|
79
|
+
.highcontrast-mode({ --_po-arrow-after-bs: -1px 1px 0 0 var(--bc-medium); });
|
|
80
|
+
}
|
|
81
|
+
& &--arrow__tc,
|
|
82
|
+
& &--arrow__bc {
|
|
83
|
+
--_po-arrow-l: calc(50% - var(--su6));
|
|
84
|
+
}
|
|
85
|
+
& &--arrow__lc,
|
|
86
|
+
& &--arrow__rc {
|
|
87
|
+
--_po-arrow-t: calc(50% - var(--su6));
|
|
88
|
+
}
|
|
89
|
+
& &--arrow__tr,
|
|
90
|
+
.s-popover--arrow__br {
|
|
91
|
+
--_po-arrow-r: var(--su12);
|
|
92
|
+
}
|
|
93
|
+
& &--arrow__rb,
|
|
94
|
+
& &--arrow__lb {
|
|
95
|
+
--_po-arrow-b: var(--su12);
|
|
96
|
+
}
|
|
97
|
+
& &--arrow {
|
|
98
|
+
&,
|
|
99
|
+
&:before,
|
|
100
|
+
&:after {
|
|
101
|
+
display: block;
|
|
102
|
+
height: var(--su12);
|
|
103
|
+
position: absolute;
|
|
104
|
+
width: var(--su12);
|
|
105
|
+
z-index: -1;
|
|
106
|
+
}
|
|
107
|
+
&:before, // This renders our border
|
|
108
|
+
&:after {
|
|
109
|
+
content: '';
|
|
110
|
+
transform: rotate(45deg);
|
|
111
|
+
}
|
|
112
|
+
&:after { // This renders our foreground color
|
|
113
|
+
bottom: var(--_po-arrow-after-b);
|
|
114
|
+
box-shadow: var(--_po-arrow-after-bs);
|
|
115
|
+
left: var(--_po-arrow-after-l);
|
|
116
|
+
right: var(--_po-arrow-after-r);
|
|
117
|
+
top: var(--_po-arrow-after-t);
|
|
118
|
+
|
|
119
|
+
background: currentColor;
|
|
120
|
+
border-radius: calc(var(--su-static1) * 1.5);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
bottom: var(--_po-arrow-b);
|
|
124
|
+
color: var(--_po-arrow-fc);
|
|
125
|
+
left: var(--_po-arrow-l);
|
|
126
|
+
right: var(--_po-arrow-r);
|
|
127
|
+
top: var(--_po-arrow-t);
|
|
128
|
+
}
|
|
129
|
+
// Close btn
|
|
130
|
+
& &--close {
|
|
131
|
+
float: right; // Use floats for title wrapping
|
|
132
|
+
top: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
133
|
+
right: calc(var(--su8) * -1); // Compensate for s-popover's padding
|
|
134
|
+
padding: var(--su8) !important;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
& &--content {
|
|
138
|
+
max-height: var(--_po-content-mxh);
|
|
139
|
+
overflow-y: auto;
|
|
140
|
+
margin: calc(var(--su12) * -1);
|
|
141
|
+
padding: var(--su12);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
background-color: var(--_po-bg);
|
|
145
|
+
border: 1px solid var(--_po-bc);
|
|
146
|
+
box-shadow: var(--_po-bs);
|
|
147
|
+
display: var(--_po-d);
|
|
148
|
+
min-width: var(--_po-wmn);
|
|
149
|
+
width: var(--_po-w);
|
|
150
|
+
|
|
151
|
+
border-radius: var(--br-md);
|
|
152
|
+
color: var(--fc-dark);
|
|
153
|
+
font-size: var(--fs-body1);
|
|
154
|
+
max-width: 24rem;
|
|
155
|
+
padding: var(--su12);
|
|
156
|
+
position: absolute;
|
|
157
|
+
white-space: normal; // Guard against popovers being in a container with white-space: nowrap. Without this, the content pops *out* of the popover.
|
|
158
|
+
z-index: var(--zi-popovers);
|
|
159
|
+
}
|