@jrgermain/stylesheet 0.2.1 → 0.4.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/dist/index.css +2519 -2579
- package/dist/index.css.map +1 -1
- package/dist/index.min.css +2 -2
- package/dist/index.min.css.map +1 -1
- package/package.json +12 -12
- package/src/styles/components/accordion.css +136 -0
- package/src/styles/components/alert.css +12 -0
- package/src/styles/components/{_app.scss → app.css} +108 -57
- package/src/styles/components/banner.css +33 -0
- package/src/styles/components/{_button.scss → button.css} +145 -24
- package/src/styles/components/{_card.scss → card.css} +15 -19
- package/src/styles/components/chip.css +217 -0
- package/src/styles/components/{_hr.scss → divider.css} +7 -6
- package/src/styles/components/drawer.css +111 -0
- package/src/styles/components/{_field.scss → field.css} +25 -29
- package/src/styles/components/{_layout.scss → flex.css} +5 -25
- package/src/styles/components/heading.css +60 -0
- package/src/styles/components/highlight.css +39 -0
- package/src/styles/components/link.css +41 -0
- package/src/styles/components/meter.css +80 -0
- package/src/styles/components/modal.css +39 -0
- package/src/styles/components/progress.css +73 -0
- package/src/styles/components/quote.css +27 -0
- package/src/styles/components/{_skeleton.scss → skeleton.css} +17 -18
- package/src/styles/components/skip-link.css +44 -0
- package/src/styles/components/slider.css +96 -0
- package/src/styles/components/{_switch.scss → switch.css} +27 -23
- package/src/styles/components/table.css +86 -0
- package/src/styles/components/text.css +119 -0
- package/src/styles/components/visually-hidden.css +13 -0
- package/src/styles/experimental/dialog-animations.css +6 -6
- package/src/styles/index.css +32 -0
- package/src/styles/shared/base-alert.css +108 -0
- package/src/styles/shared/base-dialog.css +85 -0
- package/src/styles/shared/dismiss-button.css +27 -0
- package/src/styles/utils/reset.css +29 -0
- package/src/styles/utils/variables.css +204 -0
- package/src/svg/dropdown-invert-thick.svg +4 -0
- package/src/svg/dropdown-invert.svg +4 -0
- package/src/svg/dropdown-thick.svg +4 -0
- package/src/svg/dropdown.svg +1 -1
- package/src/tokens.js +141 -0
- package/src/styles/_utils.scss +0 -87
- package/src/styles/_variables.scss +0 -331
- package/src/styles/components/_alert.scss +0 -178
- package/src/styles/components/_chip.scss +0 -151
- package/src/styles/components/_details.scss +0 -155
- package/src/styles/components/_dialog.scss +0 -234
- package/src/styles/components/_progress-meter.scss +0 -149
- package/src/styles/components/_range.scss +0 -96
- package/src/styles/components/_table.scss +0 -82
- package/src/styles/components/_text.scss +0 -295
- package/src/styles/index.scss +0 -47
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
input[type="range"].slider {
|
|
2
|
+
font-size: 1rem;
|
|
3
|
+
block-size: 1.25em;
|
|
4
|
+
appearance: none;
|
|
5
|
+
background: transparent;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
|
|
8
|
+
@media (pointer: coarse) {
|
|
9
|
+
font-size: 1.5rem;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:disabled {
|
|
13
|
+
opacity: var(--opacity-disabled);
|
|
14
|
+
cursor: not-allowed;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:focus-visible {
|
|
18
|
+
outline: 0;
|
|
19
|
+
|
|
20
|
+
&::-webkit-slider-thumb {
|
|
21
|
+
border-color: var(--color-brand-5);
|
|
22
|
+
box-shadow: 0 0 0 0.2em var(--color-brand-transparent);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&::-moz-range-thumb {
|
|
26
|
+
border-color: var(--color-brand-5);
|
|
27
|
+
box-shadow: 0 0 0 0.2em var(--color-brand-transparent);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:enabled:active {
|
|
32
|
+
&::-webkit-slider-thumb {
|
|
33
|
+
border-color: var(--color-brand-5);
|
|
34
|
+
|
|
35
|
+
&:active {
|
|
36
|
+
@media screen and (resolution >= 2x) {
|
|
37
|
+
transform: scale(0.9);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&::-moz-range-thumb {
|
|
43
|
+
border-color: var(--color-brand-5);
|
|
44
|
+
|
|
45
|
+
&:active {
|
|
46
|
+
@media screen and (resolution >= 2x) {
|
|
47
|
+
transform: scale(0.9);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&::-webkit-slider-runnable-track {
|
|
54
|
+
block-size: 0.25em;
|
|
55
|
+
inline-size: 100%;
|
|
56
|
+
border-radius: var(--radius-full);
|
|
57
|
+
background-color: light-dark(var(--color-gray-8), var(--color-gray-6));
|
|
58
|
+
print-color-adjust: exact;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&::-moz-range-track {
|
|
62
|
+
block-size: 0.25em;
|
|
63
|
+
inline-size: 100%;
|
|
64
|
+
border-radius: var(--radius-full);
|
|
65
|
+
background-color: light-dark(var(--color-gray-8), var(--color-gray-6));
|
|
66
|
+
print-color-adjust: exact;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&::-webkit-slider-thumb {
|
|
70
|
+
height: 1.25em;
|
|
71
|
+
width: 1.25em;
|
|
72
|
+
border-radius: var(--radius-full);
|
|
73
|
+
background-color: white;
|
|
74
|
+
box-shadow: var(--shadow-s);
|
|
75
|
+
border: var(--border-s) solid var(--color-outline);
|
|
76
|
+
transition-property: border-color, box-shadow, transform;
|
|
77
|
+
transition-duration: 200ms;
|
|
78
|
+
transition-timing-function: ease;
|
|
79
|
+
|
|
80
|
+
/* Additional properties needed for webkit */
|
|
81
|
+
appearance: none;
|
|
82
|
+
margin-block-start: -0.5em;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::-moz-range-thumb {
|
|
86
|
+
height: 1.25em;
|
|
87
|
+
width: 1.25em;
|
|
88
|
+
border-radius: var(--radius-full);
|
|
89
|
+
background-color: white;
|
|
90
|
+
box-shadow: var(--shadow-s);
|
|
91
|
+
border: var(--border-s) solid var(--color-outline);
|
|
92
|
+
transition-property: border-color, box-shadow, transform;
|
|
93
|
+
transition-duration: 200ms;
|
|
94
|
+
transition-timing-function: ease;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/* Style the label of a labeled switch, which is also the container that holds the switch itself */
|
|
2
|
+
label.switch {
|
|
3
|
+
inline-size: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
font-weight: var(--font-weight-semibold);
|
|
9
|
+
gap: var(--space-3xs);
|
|
10
|
+
font-size: var(--font-size-m);
|
|
11
|
+
font-family: var(--font-family-body);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* For small labeled switches, set the label text size to font-size-s */
|
|
15
|
+
label.switch.small {
|
|
16
|
+
font-size: var(--font-size-s);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Style the switch itself */
|
|
1
20
|
input[type="checkbox"].switch,
|
|
2
21
|
label.switch input[type="checkbox"] {
|
|
3
22
|
font-size: 1rem;
|
|
@@ -6,7 +25,7 @@ label.switch input[type="checkbox"] {
|
|
|
6
25
|
block-size: 1.8em;
|
|
7
26
|
inline-size: 3em;
|
|
8
27
|
border-radius: var(--radius-full);
|
|
9
|
-
background-color: var(--color-gray-8);
|
|
28
|
+
background-color: light-dark(var(--color-gray-8), var(--color-gray-5));
|
|
10
29
|
position: relative;
|
|
11
30
|
flex: none;
|
|
12
31
|
transition-property: background-color, box-shadow, border-color;
|
|
@@ -15,10 +34,6 @@ label.switch input[type="checkbox"] {
|
|
|
15
34
|
border: 0.1em solid var(--color-gray-7);
|
|
16
35
|
cursor: pointer;
|
|
17
36
|
|
|
18
|
-
&.small {
|
|
19
|
-
font-size: 0.8rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
37
|
&::after {
|
|
23
38
|
content: "";
|
|
24
39
|
position: absolute;
|
|
@@ -36,7 +51,7 @@ label.switch input[type="checkbox"] {
|
|
|
36
51
|
}
|
|
37
52
|
|
|
38
53
|
&:disabled {
|
|
39
|
-
opacity:
|
|
54
|
+
opacity: var(--opacity-disabled);
|
|
40
55
|
cursor: not-allowed;
|
|
41
56
|
}
|
|
42
57
|
|
|
@@ -47,8 +62,8 @@ label.switch input[type="checkbox"] {
|
|
|
47
62
|
}
|
|
48
63
|
|
|
49
64
|
&:checked {
|
|
50
|
-
background-color: var(--color-brand-6);
|
|
51
|
-
border-color: var(--color-brand-5);
|
|
65
|
+
background-color: light-dark(var(--color-brand-6), var(--color-brand-5));
|
|
66
|
+
border-color: light-dark(var(--color-brand-5), var(--color-brand-6));
|
|
52
67
|
|
|
53
68
|
&::after {
|
|
54
69
|
transform: translateX(1.2em);
|
|
@@ -62,21 +77,10 @@ label.switch input[type="checkbox"] {
|
|
|
62
77
|
&:dir(rtl):checked::after {
|
|
63
78
|
transform: translateX(-1.2em);
|
|
64
79
|
}
|
|
65
|
-
|
|
66
|
-
@media (prefers-color-scheme: dark) {
|
|
67
|
-
background-color: var(--color-gray-5);
|
|
68
|
-
|
|
69
|
-
&:checked {
|
|
70
|
-
background-color: var(--color-brand-5);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
80
|
}
|
|
74
81
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
justify-content: space-between;
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
font-weight: var(--font-weight-semibold);
|
|
82
|
+
/* For small switches, scale the switch control to 80% of the normal size */
|
|
83
|
+
input[type="checkbox"].switch.small,
|
|
84
|
+
label.switch.small input[type="checkbox"] {
|
|
85
|
+
font-size: 0.8rem;
|
|
82
86
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
table.table,
|
|
2
|
+
.markdown-output table {
|
|
3
|
+
--table-bg-odd: var(--color-body-alt);
|
|
4
|
+
--table-bg-even: var(--color-body);
|
|
5
|
+
--table-vertical-border: var(--border-s);
|
|
6
|
+
|
|
7
|
+
background-color: var(--color-body-alt);
|
|
8
|
+
border-collapse: separate;
|
|
9
|
+
border-spacing: 0;
|
|
10
|
+
font-size: var(--font-size-m);
|
|
11
|
+
border: var(--border-s) solid var(--color-outline);
|
|
12
|
+
border-radius: var(--radius-s);
|
|
13
|
+
color: var(--color-body-text);
|
|
14
|
+
font-family: var(--font-family-body);
|
|
15
|
+
font-weight: var(--font-weight-normal);
|
|
16
|
+
|
|
17
|
+
&.subtle {
|
|
18
|
+
--table-bg-odd: transparent;
|
|
19
|
+
--table-bg-even: transparent;
|
|
20
|
+
--table-vertical-border: 0;
|
|
21
|
+
|
|
22
|
+
border: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.dense :is(th, td) {
|
|
26
|
+
padding: var(--space-3xs) var(--space-2xs);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.sparse :is(th, td) {
|
|
30
|
+
padding: var(--space-xs) var(--space-s);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
caption {
|
|
34
|
+
font-family: var(--font-family-heading);
|
|
35
|
+
line-height: 1.15;
|
|
36
|
+
font-size: var(--font-size-l);
|
|
37
|
+
font-weight: var(--font-weight-semibold);
|
|
38
|
+
text-align: start;
|
|
39
|
+
margin: 0 0 var(--space-2xs);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
th,
|
|
43
|
+
td {
|
|
44
|
+
padding: var(--space-2xs) var(--space-xs);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
th,
|
|
48
|
+
tfoot td {
|
|
49
|
+
font-weight: var(--font-weight-bold);
|
|
50
|
+
font-family: var(--font-family-heading);
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
th {
|
|
55
|
+
border-block-end: var(--border-m) solid var(--color-outline);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
tfoot td {
|
|
59
|
+
border-block-start: var(--border-m) solid var(--color-outline);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
td {
|
|
63
|
+
text-align: unset;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:is(th, tfoot td):not(:last-of-type) {
|
|
67
|
+
border-inline-end: var(--table-vertical-border) dashed var(--color-outline);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
td:not(tfoot td, :last-of-type) {
|
|
71
|
+
border-inline-end: var(--table-vertical-border) solid var(--color-outline);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
tr:not(:last-of-type) td {
|
|
75
|
+
border-block-end: var(--border-s) solid var(--color-outline);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
tbody tr:nth-child(odd),
|
|
79
|
+
tbody:has(tr:last-of-type:nth-child(even)) + tfoot tr {
|
|
80
|
+
background-color: var(--table-bg-even);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
tbody tr:nth-child(even) {
|
|
84
|
+
background-color: var(--table-bg-odd);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* stylelint-disable declaration-block-no-redundant-longhand-properties -- text-decoration shorthand doesn't work properly for Safari */
|
|
2
|
+
|
|
3
|
+
.paragraph,
|
|
4
|
+
.markdown-output p {
|
|
5
|
+
font-family: var(--font-family-body);
|
|
6
|
+
font-weight: var(--font-weight-normal);
|
|
7
|
+
line-height: 1.6;
|
|
8
|
+
margin: 0.75em 0;
|
|
9
|
+
text-wrap: pretty;
|
|
10
|
+
hanging-punctuation: first;
|
|
11
|
+
overflow-wrap: break-word;
|
|
12
|
+
|
|
13
|
+
&:first-child {
|
|
14
|
+
margin-block-start: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&:last-child {
|
|
18
|
+
margin-block-end: 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.abbreviation,
|
|
23
|
+
.markdown-output abbr[title] {
|
|
24
|
+
display: inline;
|
|
25
|
+
text-decoration-line: underline;
|
|
26
|
+
text-decoration-style: dotted;
|
|
27
|
+
text-decoration-thickness: var(--border-m);
|
|
28
|
+
text-decoration-color: var(--color-gray-6);
|
|
29
|
+
text-underline-offset: 0.1em;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.bold,
|
|
33
|
+
.markdown-output strong,
|
|
34
|
+
.markdown-output b {
|
|
35
|
+
font-weight: var(--font-weight-bold);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.italic,
|
|
39
|
+
.markdown-output em {
|
|
40
|
+
font-style: italic;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.underline {
|
|
44
|
+
text-decoration-line: underline;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.strikethrough,
|
|
48
|
+
.markdown-output s {
|
|
49
|
+
text-decoration-line: line-through;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.underline.strikethrough {
|
|
53
|
+
text-decoration-line: underline line-through;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.small-text,
|
|
57
|
+
.markdown-output small {
|
|
58
|
+
font-size: 0.75em;
|
|
59
|
+
vertical-align: baseline;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.subscript,
|
|
63
|
+
.superscript,
|
|
64
|
+
.markdown-output sub,
|
|
65
|
+
.markdown-output sup {
|
|
66
|
+
font-size: 0.75em;
|
|
67
|
+
line-height: 0;
|
|
68
|
+
position: relative;
|
|
69
|
+
vertical-align: baseline;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.subscript,
|
|
73
|
+
.markdown-output sub {
|
|
74
|
+
inset-block-end: -0.25em;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.superscript,
|
|
78
|
+
.markdown-output sup {
|
|
79
|
+
inset-block-start: -0.5em;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.code,
|
|
83
|
+
.markdown-output code {
|
|
84
|
+
font-family: var(--font-family-mono);
|
|
85
|
+
background-color: var(--color-gray-extra-transparent);
|
|
86
|
+
color: var(--color-gray-1);
|
|
87
|
+
border-radius: var(--radius-s);
|
|
88
|
+
display: inline;
|
|
89
|
+
padding: 0.25ch 0.5ch;
|
|
90
|
+
font-size: 0.9em;
|
|
91
|
+
|
|
92
|
+
&.invert {
|
|
93
|
+
color: var(--color-gray-9);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.link .code,
|
|
98
|
+
.markdown-output a code {
|
|
99
|
+
text-decoration: inherit;
|
|
100
|
+
text-decoration-color: inherit;
|
|
101
|
+
text-decoration-thickness: inherit;
|
|
102
|
+
color: inherit;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.key,
|
|
106
|
+
.skip-link kbd,
|
|
107
|
+
.markdown-output kbd {
|
|
108
|
+
display: inline;
|
|
109
|
+
padding: 0 0.5ch;
|
|
110
|
+
margin: 0 0.25ch;
|
|
111
|
+
font-size: 0.9em;
|
|
112
|
+
border: var(--border-s) solid var(--color-gray-8);
|
|
113
|
+
border-bottom-width: 3px;
|
|
114
|
+
border-radius: var(--radius-m);
|
|
115
|
+
font-weight: var(--font-weight-semibold);
|
|
116
|
+
font-family: var(--font-family-body);
|
|
117
|
+
background-color: var(--color-gray-9);
|
|
118
|
+
color: var(--color-body-text);
|
|
119
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.visually-hidden,
|
|
2
|
+
.sr-only,
|
|
3
|
+
.app-sidebar-toggle input,
|
|
4
|
+
.skip-link:not(:focus, .static) {
|
|
5
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
6
|
+
clip-path: inset(50%);
|
|
7
|
+
height: 1px;
|
|
8
|
+
width: 1px;
|
|
9
|
+
margin: -1px;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
padding: 0;
|
|
12
|
+
position: absolute;
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
dialog[open] {
|
|
1
|
+
dialog:is(.modal, .drawer)[open] {
|
|
2
2
|
display: flex;
|
|
3
3
|
transform: var(--dialog-open-transform);
|
|
4
4
|
opacity: var(--dialog-open-opacity);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
dialog[open]::backdrop {
|
|
7
|
+
dialog:is(.modal, .drawer)[open]::backdrop {
|
|
8
8
|
opacity: var(--dialog-backdrop-open-opacity);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
dialog {
|
|
11
|
+
dialog:is(.modal, .drawer) {
|
|
12
12
|
transform: var(--dialog-ending-transform);
|
|
13
13
|
opacity: var(--dialog-ending-opacity);
|
|
14
14
|
transition:
|
|
@@ -18,7 +18,7 @@ dialog {
|
|
|
18
18
|
overlay 150ms ease allow-discrete;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
dialog::backdrop {
|
|
21
|
+
dialog:is(.modal, .drawer)::backdrop {
|
|
22
22
|
opacity: var(--dialog-backdrop-ending-opacity);
|
|
23
23
|
transition:
|
|
24
24
|
transform 150ms ease,
|
|
@@ -28,12 +28,12 @@ dialog::backdrop {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
@starting-style {
|
|
31
|
-
dialog[open] {
|
|
31
|
+
dialog:is(.modal, .drawer)[open] {
|
|
32
32
|
transform: var(--dialog-starting-transform);
|
|
33
33
|
opacity: var(--dialog-starting-opacity);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
dialog[open]::backdrop {
|
|
36
|
+
dialog:is(.modal, .drawer)[open]::backdrop {
|
|
37
37
|
opacity: var(--dialog-backdrop-starting-opacity);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import url("./utils/reset.css");
|
|
2
|
+
@import url("./utils/variables.css");
|
|
3
|
+
@import url("./shared/base-alert.css");
|
|
4
|
+
@import url("./shared/base-dialog.css");
|
|
5
|
+
@import url("./shared/dismiss-button.css");
|
|
6
|
+
@import url("./components/accordion.css");
|
|
7
|
+
@import url("./components/alert.css");
|
|
8
|
+
@import url("./components/app.css");
|
|
9
|
+
@import url("./components/banner.css");
|
|
10
|
+
@import url("./components/button.css");
|
|
11
|
+
@import url("./components/card.css");
|
|
12
|
+
@import url("./components/chip.css");
|
|
13
|
+
@import url("./components/divider.css");
|
|
14
|
+
@import url("./components/drawer.css");
|
|
15
|
+
@import url("./components/field.css");
|
|
16
|
+
@import url("./components/flex.css");
|
|
17
|
+
@import url("./components/heading.css");
|
|
18
|
+
@import url("./components/highlight.css");
|
|
19
|
+
@import url("./components/link.css");
|
|
20
|
+
@import url("./components/meter.css");
|
|
21
|
+
@import url("./components/modal.css");
|
|
22
|
+
@import url("./components/progress.css");
|
|
23
|
+
@import url("./components/quote.css");
|
|
24
|
+
@import url("./components/skeleton.css");
|
|
25
|
+
@import url("./components/skip-link.css");
|
|
26
|
+
@import url("./components/slider.css");
|
|
27
|
+
@import url("./components/switch.css");
|
|
28
|
+
@import url("./components/table.css");
|
|
29
|
+
@import url("./components/text.css");
|
|
30
|
+
@import url("./components/visually-hidden.css");
|
|
31
|
+
@import url("./experimental/dialog-animations.css");
|
|
32
|
+
@import url("./experimental/mobile-sidebar-fade-out.css");
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
.alert,
|
|
2
|
+
.banner {
|
|
3
|
+
display: block;
|
|
4
|
+
font-family: var(--font-family-body);
|
|
5
|
+
font-size: var(--font-size-m);
|
|
6
|
+
font-weight: var(--font-weight-normal);
|
|
7
|
+
color: var(--color-body-text);
|
|
8
|
+
position: relative;
|
|
9
|
+
background:
|
|
10
|
+
linear-gradient(var(--alert-bg-color), var(--alert-bg-color)) padding-box,
|
|
11
|
+
linear-gradient(
|
|
12
|
+
to right,
|
|
13
|
+
var(--alert-border-start-color),
|
|
14
|
+
var(--alert-border-end-color)
|
|
15
|
+
)
|
|
16
|
+
border-box;
|
|
17
|
+
border: var(--border-m) solid transparent;
|
|
18
|
+
line-height: 1.4;
|
|
19
|
+
|
|
20
|
+
> * {
|
|
21
|
+
line-height: 1.4;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media print {
|
|
25
|
+
& {
|
|
26
|
+
border-color: var(--alert-border-start-color);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::before,
|
|
31
|
+
&::after {
|
|
32
|
+
content: "";
|
|
33
|
+
print-color-adjust: exact;
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset-block: 0;
|
|
36
|
+
margin-block: auto;
|
|
37
|
+
width: 2em;
|
|
38
|
+
height: 2em;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::before {
|
|
42
|
+
z-index: 2;
|
|
43
|
+
mask-image: var(--alert-icon);
|
|
44
|
+
mask-repeat: no-repeat;
|
|
45
|
+
mask-size: contain;
|
|
46
|
+
background-color: var(--alert-border-start-color);
|
|
47
|
+
scale: 0.5;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::after {
|
|
51
|
+
z-index: 1;
|
|
52
|
+
background-color: light-dark(#fffe, #000e);
|
|
53
|
+
border-radius: var(--radius-full);
|
|
54
|
+
border: 3px solid var(--alert-border-start-color);
|
|
55
|
+
scale: 0.75;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&.error {
|
|
59
|
+
--alert-bg-color: var(--color-red-9);
|
|
60
|
+
--alert-border-start-color: var(--color-red-5);
|
|
61
|
+
--alert-border-end-color: var(--color-red-6);
|
|
62
|
+
--alert-dismiss-icon-color: var(--color-red-4);
|
|
63
|
+
--alert-dismiss-hover-bg: var(--color-red-extra-transparent);
|
|
64
|
+
--alert-dismiss-focus-bg: var(--color-red-transparent);
|
|
65
|
+
--alert-icon: url("@/src/svg/x-thick.svg");
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.warning {
|
|
69
|
+
--alert-bg-color: var(--color-yellow-9);
|
|
70
|
+
--alert-border-start-color: var(--color-yellow-5);
|
|
71
|
+
--alert-border-end-color: var(--color-yellow-6);
|
|
72
|
+
--alert-dismiss-icon-color: var(--color-yellow-4);
|
|
73
|
+
--alert-dismiss-hover-bg: var(--color-yellow-extra-transparent);
|
|
74
|
+
--alert-dismiss-focus-bg: var(--color-yellow-transparent);
|
|
75
|
+
--alert-icon: url("@/src/svg/warning-thick.svg");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.success {
|
|
79
|
+
--alert-bg-color: var(--color-green-9);
|
|
80
|
+
--alert-border-start-color: var(--color-green-5);
|
|
81
|
+
--alert-border-end-color: var(--color-green-6);
|
|
82
|
+
--alert-dismiss-icon-color: var(--color-green-4);
|
|
83
|
+
--alert-dismiss-hover-bg: var(--color-green-extra-transparent);
|
|
84
|
+
--alert-dismiss-focus-bg: var(--color-green-transparent);
|
|
85
|
+
--alert-icon: url("@/src/svg/check-thick.svg");
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.info {
|
|
89
|
+
--alert-bg-color: var(--color-sky-9);
|
|
90
|
+
--alert-border-start-color: var(--color-sky-5);
|
|
91
|
+
--alert-border-end-color: var(--color-sky-6);
|
|
92
|
+
--alert-dismiss-icon-color: var(--color-sky-4);
|
|
93
|
+
--alert-dismiss-hover-bg: var(--color-sky-extra-transparent);
|
|
94
|
+
--alert-dismiss-focus-bg: var(--color-sky-transparent);
|
|
95
|
+
--alert-icon: url("@/src/svg/info-thick.svg");
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.alert-title,
|
|
100
|
+
.banner-title {
|
|
101
|
+
font-family: var(--font-family-heading);
|
|
102
|
+
font-weight: var(--font-weight-bold);
|
|
103
|
+
line-height: 1;
|
|
104
|
+
color: var(--alert-border-start-color);
|
|
105
|
+
font-size: 0.85em;
|
|
106
|
+
margin: 0;
|
|
107
|
+
margin-block-end: 0.15em;
|
|
108
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
.modal,
|
|
2
|
+
.drawer,
|
|
3
|
+
.modal::backdrop,
|
|
4
|
+
.drawer::backdrop {
|
|
5
|
+
--dialog-starting-opacity: 0.25;
|
|
6
|
+
--dialog-starting-transform: translateY(8px);
|
|
7
|
+
--dialog-open-opacity: 1;
|
|
8
|
+
--dialog-open-transform: translate(0);
|
|
9
|
+
--dialog-ending-opacity: 0;
|
|
10
|
+
--dialog-ending-transform: translateY(-4px) scale(0.97);
|
|
11
|
+
--dialog-backdrop-starting-opacity: 0;
|
|
12
|
+
--dialog-backdrop-open-opacity: light-dark(0.75, 0.85);
|
|
13
|
+
--dialog-backdrop-ending-opacity: 0;
|
|
14
|
+
--dialog-backdrop-color: light-dark(var(--color-gray-2), var(--color-gray-8));
|
|
15
|
+
|
|
16
|
+
@media (prefers-reduced-motion) {
|
|
17
|
+
--dialog-starting-transform: translate(0);
|
|
18
|
+
--dialog-ending-transform: translate(0);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.modal,
|
|
23
|
+
.drawer {
|
|
24
|
+
box-shadow: var(--shadow-xl);
|
|
25
|
+
border: var(--border-s) solid var(--color-outline);
|
|
26
|
+
border-radius: var(--radius-l);
|
|
27
|
+
background-color: var(--color-body-alt);
|
|
28
|
+
color: var(--color-body-text);
|
|
29
|
+
padding: 0;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 0;
|
|
32
|
+
|
|
33
|
+
&::backdrop {
|
|
34
|
+
background-color: var(--dialog-backdrop-color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[open] {
|
|
38
|
+
display: flex;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.modal-header,
|
|
43
|
+
.drawer-header {
|
|
44
|
+
font-family: var(--font-family-heading);
|
|
45
|
+
font-size: var(--font-size-m);
|
|
46
|
+
font-weight: var(--font-weight-bold);
|
|
47
|
+
line-height: 1;
|
|
48
|
+
padding: var(--space-m);
|
|
49
|
+
padding-block-end: var(--space-xs);
|
|
50
|
+
flex-shrink: 0;
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
color: var(--color-brand-3);
|
|
55
|
+
margin: 0;
|
|
56
|
+
|
|
57
|
+
h1,
|
|
58
|
+
h2,
|
|
59
|
+
h3,
|
|
60
|
+
h4,
|
|
61
|
+
h5,
|
|
62
|
+
h6 {
|
|
63
|
+
color: inherit;
|
|
64
|
+
font-size: inherit;
|
|
65
|
+
font-weight: inherit;
|
|
66
|
+
margin: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.modal-body,
|
|
71
|
+
.drawer-body {
|
|
72
|
+
padding: var(--space-m);
|
|
73
|
+
padding-block-start: var(--space-xs);
|
|
74
|
+
flex-shrink: 1;
|
|
75
|
+
display: block;
|
|
76
|
+
overflow: auto;
|
|
77
|
+
margin: 0;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@supports (transition-behavior: allow-discrete) and (overlay: none) {
|
|
81
|
+
.modal,
|
|
82
|
+
.drawer {
|
|
83
|
+
animation: unset;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.button.dismiss {
|
|
2
|
+
--button-fg-color: var(--color-body-text);
|
|
3
|
+
--button-bg-color: transparent;
|
|
4
|
+
--button-border-color: transparent;
|
|
5
|
+
--button-hover-bg-color: var(--color-gray-extra-transparent);
|
|
6
|
+
--button-focus-ring-color: transparent;
|
|
7
|
+
--button-shadow: none;
|
|
8
|
+
|
|
9
|
+
font-size: 0.75rem;
|
|
10
|
+
width: 3em;
|
|
11
|
+
height: 3em;
|
|
12
|
+
|
|
13
|
+
&:is(:focus-visible, .focus) {
|
|
14
|
+
--button-bg-color: var(--color-gray-transparent);
|
|
15
|
+
--button-hover-bg-color: transparent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&::after {
|
|
19
|
+
content: "";
|
|
20
|
+
width: 1.8em;
|
|
21
|
+
height: 1.8em;
|
|
22
|
+
mask-image: url("@/src/svg/x.svg");
|
|
23
|
+
mask-size: contain;
|
|
24
|
+
mask-repeat: no-repeat;
|
|
25
|
+
background-color: currentcolor;
|
|
26
|
+
}
|
|
27
|
+
}
|