@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,104 +1,104 @@
|
|
|
1
|
-
.s-toggle-switch {
|
|
2
|
-
@ts-bg-image-fill: .set-white()[default];
|
|
3
|
-
@ts-bg-image-fill-dark: .set-white-dark()[default];
|
|
4
|
-
--_ts-bg: var(--black-350);
|
|
5
|
-
--_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill}'/%3e%3c/svg%3e");
|
|
6
|
-
--_ts-bg-ps: left center;
|
|
7
|
-
--_ts-multiple-bg: unset;
|
|
8
|
-
--_ts-multiple-fc: var(--black-400);
|
|
9
|
-
|
|
10
|
-
.dark-mode({
|
|
11
|
-
--_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill-dark}'/%3e%3c/svg%3e");
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
fieldset[disabled] &,
|
|
15
|
-
&[disabled] {
|
|
16
|
-
&,
|
|
17
|
-
& label {
|
|
18
|
-
cursor: not-allowed;
|
|
19
|
-
opacity: var(--_o-disabled-static);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&&__multiple { // TODO split single and multiple toggle into two seperate components
|
|
24
|
-
input[type="radio"] {
|
|
25
|
-
&:checked {
|
|
26
|
-
+ label {
|
|
27
|
-
&.s-toggle-switch--label-off {
|
|
28
|
-
--_ts-multiple-bg: var(--black-400);
|
|
29
|
-
--_ts-multiple-fc: var(--white);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&:not(.s-toggle-switch--label-off) {
|
|
33
|
-
--_ts-multiple-bg: var(--green-400);
|
|
34
|
-
--_ts-multiple-fc: var(--white);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:focus-visible + label {
|
|
41
|
-
.focus-styles(true);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
left: -999em;
|
|
45
|
-
margin: 0;
|
|
46
|
-
opacity: 0;
|
|
47
|
-
position: absolute;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
label {
|
|
51
|
-
background-color: var(--_ts-multiple-bg);
|
|
52
|
-
color: var(--_ts-multiple-fc);
|
|
53
|
-
|
|
54
|
-
border-radius: 1000px;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
font-size: var(--fs-body1);
|
|
57
|
-
font-weight: 400;
|
|
58
|
-
line-height: 1;
|
|
59
|
-
margin: 0;
|
|
60
|
-
padding: 0.5em 0.7em;
|
|
61
|
-
text-align: center;
|
|
62
|
-
white-space: nowrap;
|
|
63
|
-
width: 100%;
|
|
64
|
-
-webkit-touch-callout: none;
|
|
65
|
-
-webkit-user-select: none;
|
|
66
|
-
user-select: none;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
align-items: stretch;
|
|
70
|
-
display: flex;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
input[type="checkbox"], // TODO DEPRECATED: drop support for nested input[type="checkbox"]
|
|
74
|
-
input[type="checkbox"]& {
|
|
75
|
-
&:checked {
|
|
76
|
-
--_ts-bg: var(--green-400);
|
|
77
|
-
--_ts-bg-ps: right center;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:focus-visible {
|
|
81
|
-
.focus-styles();
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&[disabled] {
|
|
85
|
-
cursor: default;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
background-color: var(--_ts-bg);
|
|
89
|
-
background-position: var(--_ts-bg-ps);
|
|
90
|
-
|
|
91
|
-
appearance: none;
|
|
92
|
-
background-image: var(--_ts-bg-image);
|
|
93
|
-
background-size: contain;
|
|
94
|
-
background-repeat: no-repeat;
|
|
95
|
-
border-radius: 1000px;
|
|
96
|
-
cursor: pointer;
|
|
97
|
-
flex-shrink: 0;
|
|
98
|
-
height: var(--su-static24);
|
|
99
|
-
margin: 0; // guard against production adding 5px of margin to these
|
|
100
|
-
transition: background-position 0.2s ease;
|
|
101
|
-
vertical-align: top;
|
|
102
|
-
width: calc(var(--su-static48) - var(--su-static4));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
1
|
+
.s-toggle-switch {
|
|
2
|
+
@ts-bg-image-fill: .set-white()[default];
|
|
3
|
+
@ts-bg-image-fill-dark: .set-white-dark()[default];
|
|
4
|
+
--_ts-bg: var(--black-350);
|
|
5
|
+
--_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill}'/%3e%3c/svg%3e");
|
|
6
|
+
--_ts-bg-ps: left center;
|
|
7
|
+
--_ts-multiple-bg: unset;
|
|
8
|
+
--_ts-multiple-fc: var(--black-400);
|
|
9
|
+
|
|
10
|
+
.dark-mode({
|
|
11
|
+
--_ts-bg-image: url("data:image/svg+xml;,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='@{ts-bg-image-fill-dark}'/%3e%3c/svg%3e");
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
fieldset[disabled] &,
|
|
15
|
+
&[disabled] {
|
|
16
|
+
&,
|
|
17
|
+
& label {
|
|
18
|
+
cursor: not-allowed;
|
|
19
|
+
opacity: var(--_o-disabled-static);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&&__multiple { // TODO split single and multiple toggle into two seperate components
|
|
24
|
+
input[type="radio"] {
|
|
25
|
+
&:checked {
|
|
26
|
+
+ label {
|
|
27
|
+
&.s-toggle-switch--label-off {
|
|
28
|
+
--_ts-multiple-bg: var(--black-400);
|
|
29
|
+
--_ts-multiple-fc: var(--white);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:not(.s-toggle-switch--label-off) {
|
|
33
|
+
--_ts-multiple-bg: var(--green-400);
|
|
34
|
+
--_ts-multiple-fc: var(--white);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:focus-visible + label {
|
|
41
|
+
.focus-styles(true);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
left: -999em;
|
|
45
|
+
margin: 0;
|
|
46
|
+
opacity: 0;
|
|
47
|
+
position: absolute;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
label {
|
|
51
|
+
background-color: var(--_ts-multiple-bg);
|
|
52
|
+
color: var(--_ts-multiple-fc);
|
|
53
|
+
|
|
54
|
+
border-radius: 1000px;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
font-size: var(--fs-body1);
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
line-height: 1;
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0.5em 0.7em;
|
|
61
|
+
text-align: center;
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
width: 100%;
|
|
64
|
+
-webkit-touch-callout: none;
|
|
65
|
+
-webkit-user-select: none;
|
|
66
|
+
user-select: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
align-items: stretch;
|
|
70
|
+
display: flex;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
input[type="checkbox"], // TODO DEPRECATED: drop support for nested input[type="checkbox"]
|
|
74
|
+
input[type="checkbox"]& {
|
|
75
|
+
&:checked {
|
|
76
|
+
--_ts-bg: var(--green-400);
|
|
77
|
+
--_ts-bg-ps: right center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:focus-visible {
|
|
81
|
+
.focus-styles();
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&[disabled] {
|
|
85
|
+
cursor: default;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
background-color: var(--_ts-bg);
|
|
89
|
+
background-position: var(--_ts-bg-ps);
|
|
90
|
+
|
|
91
|
+
appearance: none;
|
|
92
|
+
background-image: var(--_ts-bg-image);
|
|
93
|
+
background-size: contain;
|
|
94
|
+
background-repeat: no-repeat;
|
|
95
|
+
border-radius: 1000px;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
height: var(--su-static24);
|
|
99
|
+
margin: 0; // guard against production adding 5px of margin to these
|
|
100
|
+
transition: background-position 0.2s ease;
|
|
101
|
+
vertical-align: top;
|
|
102
|
+
width: calc(var(--su-static48) - var(--su-static4));
|
|
103
|
+
}
|
|
104
|
+
}
|