@jrgermain/stylesheet 0.2.0 → 0.3.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 (50) hide show
  1. package/dist/index.css +2677 -2574
  2. package/dist/index.css.map +1 -1
  3. package/dist/index.min.css +2 -2
  4. package/dist/index.min.css.map +1 -1
  5. package/package.json +12 -12
  6. package/src/styles/components/{_details.scss → accordion.css} +58 -69
  7. package/src/styles/components/alert.css +12 -0
  8. package/src/styles/components/{_app.scss → app.css} +106 -46
  9. package/src/styles/components/banner.css +33 -0
  10. package/src/styles/components/{_button.scss → button.css} +145 -24
  11. package/src/styles/components/{_card.scss → card.css} +15 -19
  12. package/src/styles/components/chip.css +217 -0
  13. package/src/styles/components/{_hr.scss → divider.css} +7 -6
  14. package/src/styles/components/drawer.css +111 -0
  15. package/src/styles/components/{_field.scss → field.css} +22 -21
  16. package/src/styles/components/{_layout.scss → flex.css} +5 -25
  17. package/src/styles/components/heading.css +60 -0
  18. package/src/styles/components/highlight.css +39 -0
  19. package/src/styles/components/link.css +41 -0
  20. package/src/styles/components/meter.css +80 -0
  21. package/src/styles/components/modal.css +39 -0
  22. package/src/styles/components/progress.css +73 -0
  23. package/src/styles/components/quote.css +31 -0
  24. package/src/styles/components/{_skeleton.scss → skeleton.css} +17 -18
  25. package/src/styles/components/skip-link.css +44 -0
  26. package/src/styles/components/slider.css +96 -0
  27. package/src/styles/components/{_switch.scss → switch.css} +24 -12
  28. package/src/styles/components/table.css +86 -0
  29. package/src/styles/components/text.css +120 -0
  30. package/src/styles/components/visually-hidden.css +13 -0
  31. package/src/styles/experimental/dialog-animations.css +6 -6
  32. package/src/styles/index.css +32 -0
  33. package/src/styles/shared/base-alert.css +112 -0
  34. package/src/styles/shared/base-dialog.css +90 -0
  35. package/src/styles/shared/dismiss-button.css +27 -0
  36. package/src/styles/utils/reset.css +29 -0
  37. package/src/styles/{_variables.scss → utils/variables.css} +43 -52
  38. package/src/svg/dropdown-invert-thick.svg +4 -0
  39. package/src/svg/dropdown-invert.svg +4 -0
  40. package/src/svg/dropdown-thick.svg +4 -0
  41. package/src/svg/dropdown.svg +1 -1
  42. package/src/styles/_utils.scss +0 -87
  43. package/src/styles/components/_alert.scss +0 -178
  44. package/src/styles/components/_chip.scss +0 -151
  45. package/src/styles/components/_dialog.scss +0 -234
  46. package/src/styles/components/_progress-meter.scss +0 -149
  47. package/src/styles/components/_range.scss +0 -96
  48. package/src/styles/components/_table.scss +0 -82
  49. package/src/styles/components/_text.scss +0 -295
  50. package/src/styles/index.scss +0 -47
@@ -1,295 +0,0 @@
1
- @use "../utils";
2
- @use "./layout";
3
-
4
- @mixin highlighted-text($color) {
5
- background-color: var(--color-#{$color}-8);
6
- color: var(--color-#{$color}-2);
7
- print-color-adjust: exact;
8
- }
9
-
10
- %heading-any {
11
- font-family: var(--font-family-heading);
12
- margin-block: 0.75em 0.3em;
13
- line-height: 1.15;
14
- text-wrap: balance;
15
- }
16
-
17
- h1,
18
- .h1,
19
- %h1 {
20
- @extend %heading-any;
21
-
22
- font-size: var(--font-size-4xl);
23
- font-weight: var(--font-weight-black);
24
- }
25
-
26
- h2,
27
- .h2,
28
- %h2 {
29
- @extend %heading-any;
30
-
31
- font-size: var(--font-size-3xl);
32
- font-weight: var(--font-weight-bold);
33
- }
34
-
35
- h3,
36
- .h3,
37
- %h3 {
38
- @extend %heading-any;
39
-
40
- font-size: var(--font-size-2xl);
41
- font-weight: var(--font-weight-bold);
42
- }
43
-
44
- h4,
45
- .h4,
46
- %h4 {
47
- @extend %heading-any;
48
-
49
- font-size: var(--font-size-xl);
50
- font-weight: var(--font-weight-semibold);
51
- }
52
-
53
- h5,
54
- .h5,
55
- %h5 {
56
- @extend %heading-any;
57
-
58
- font-size: var(--font-size-l);
59
- font-weight: var(--font-weight-semibold);
60
- }
61
-
62
- h6,
63
- .h6,
64
- %h6 {
65
- @extend %heading-any;
66
-
67
- font-size: var(--font-size-m);
68
- font-weight: var(--font-weight-bold);
69
- }
70
-
71
- p,
72
- .p,
73
- li {
74
- font-family: var(--font-family-body);
75
- font-size: var(--font-size-m);
76
- font-weight: var(--font-weight-normal);
77
- line-height: 1.6;
78
- margin: 0;
79
- text-wrap: pretty;
80
- hanging-punctuation: first;
81
- }
82
-
83
- blockquote,
84
- .blockquote {
85
- display: block;
86
- margin: 0;
87
- color: var(--color-gray-4);
88
- border-inline-start: var(--border-l) solid var(--color-gray-transparent);
89
- padding: var(--space-3xs);
90
- padding-inline-start: var(--space-xs);
91
- position: relative;
92
- font-size: var(--font-size-m);
93
- line-height: 1.25;
94
- font-weight: var(--font-weight-normal);
95
-
96
- @media (prefers-color-scheme: dark) {
97
- color: var(--color-gray-2);
98
- }
99
-
100
- :is(footer, .footer) {
101
- margin-block-start: 0.5em;
102
- font-size: var(--font-size-s);
103
- font-style: initial;
104
- color: var(--color-body-text);
105
- font-weight: var(--font-weight-semibold);
106
-
107
- :is(cite, .cite) {
108
- font-weight: var(--font-weight-normal);
109
- font-style: italic;
110
- }
111
- }
112
- }
113
-
114
- a,
115
- .a {
116
- color: var(--color-sky-4);
117
- font-weight: var(--font-weight-semibold);
118
- text-decoration-line: underline;
119
- text-decoration-color: var(--color-sky-transparent);
120
- text-decoration-skip-ink: all;
121
- text-decoration-thickness: var(--border-m);
122
- text-underline-offset: 0.1em;
123
- cursor: pointer;
124
- transition: text-decoration-color 200ms ease;
125
-
126
- &:is(:hover, .hover) {
127
- text-decoration-color: currentcolor;
128
- }
129
-
130
- &:focus-visible {
131
- outline-offset: 1px;
132
- }
133
-
134
- &[target="_blank"]:not(.no-external-icon, .button.icon)::after {
135
- content: "";
136
- print-color-adjust: exact;
137
- mask-image: #{utils.svg-to-data-url(
138
- '<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6m4-3h6v6m-11 5L21 3"/></svg>'
139
- )};
140
- mask-size: contain;
141
- mask-repeat: no-repeat;
142
- background-color: var(--color-gray-5);
143
- display: inline-block;
144
- height: 0.85em;
145
- width: 0.85em;
146
- vertical-align: baseline;
147
- margin-left: 0.1em;
148
- }
149
-
150
- &[target="_blank"]:not(.no-external-icon, .button.icon).button::after {
151
- background-color: currentcolor;
152
- }
153
- }
154
-
155
- pre,
156
- .pre {
157
- font-family: var(--font-family-mono);
158
- }
159
-
160
- code,
161
- .code,
162
- kbd,
163
- .kbd {
164
- background-color: var(--color-gray-extra-transparent);
165
- color: var(--color-gray-1);
166
- font-family: var(--font-family-mono);
167
- padding: 0 0.5ch;
168
- margin: 0 0.25ch;
169
- border-radius: var(--radius-s);
170
- font-size: 0.9em;
171
- }
172
-
173
- samp,
174
- .samp {
175
- display: block;
176
- font-size: calc(0.9 * var(--font-size-m));
177
- background-color: var(--color-gray-9);
178
- color: var(--color-gray-1);
179
- border: var(--border-s) dashed var(--color-outline);
180
- border-radius: var(--radius-s);
181
- padding: var(--space-3xs);
182
- font-family: var(--font-family-mono);
183
- }
184
-
185
- :is(pre, .pre) > :is(code, .code) {
186
- background-color: unset;
187
- }
188
-
189
- strong,
190
- .strong {
191
- font-weight: var(--font-weight-bold);
192
- }
193
-
194
- em,
195
- .em {
196
- font-style: italic;
197
- }
198
-
199
- ::target-text {
200
- @include highlighted-text("brand");
201
- }
202
-
203
- mark,
204
- .mark {
205
- @include highlighted-text("yellow");
206
- }
207
-
208
- ins,
209
- .ins {
210
- @include highlighted-text("green");
211
-
212
- text-decoration-thickness: var(--border-m);
213
- text-decoration-color: var(--color-green-4);
214
- }
215
-
216
- del,
217
- .del {
218
- @include highlighted-text("red");
219
- @include utils.transition("text-decoration-color", $duration: 150ms);
220
-
221
- text-decoration-line: line-through;
222
- text-decoration-skip-ink: none;
223
- text-decoration-thickness: var(--border-m);
224
- text-decoration-color: var(--color-red-4);
225
-
226
- &:hover {
227
- text-decoration-color: transparent;
228
- }
229
- }
230
-
231
- :is(abbr, .abbr)[title] {
232
- text-decoration-line: underline;
233
- text-decoration-style: dotted;
234
- /* stylelint-disable-next-line declaration-block-no-redundant-longhand-properties -- using the shorthand doesn't work in safari */
235
- text-decoration-color: var(--color-gray-6);
236
- text-decoration-thickness: var(--border-m);
237
- text-underline-offset: 0.1em;
238
- }
239
-
240
- small,
241
- .small {
242
- font-size: 0.75em;
243
- vertical-align: baseline;
244
- }
245
-
246
- sub,
247
- .sub,
248
- sup,
249
- .sup {
250
- font-size: 0.75em;
251
- line-height: 0;
252
- position: relative;
253
- vertical-align: baseline;
254
- }
255
-
256
- sub,
257
- .sub {
258
- inset-block-end: -0.25em;
259
- }
260
-
261
- sup,
262
- .sup {
263
- inset-block-start: -0.5em;
264
- }
265
-
266
- /* Add a gap between consecutive block text elements */
267
- // prettier-ignore
268
- :is(p, .p, blockquote, .blockquote, pre, .pre, samp, .samp, .alert, details):not(.alert-title, .accordion details) +
269
- :is(p, .p, blockquote, .blockquote, pre, .pre, samp, .samp, .alert, details):not(.alert-title, .accordion details) {
270
- margin-block-start: 0.75em;
271
- }
272
-
273
- .skip-link {
274
- position: fixed;
275
- z-index: 100;
276
- top: var(--space-body);
277
- left: var(--space-body);
278
- background-color: var(--color-body-alt);
279
- padding: var(--space-xs);
280
- border-radius: var(--radius-m);
281
- border: var(--border-l) solid currentcolor;
282
- outline: 0;
283
- box-shadow: var(--shadow-m);
284
- text-decoration: none;
285
- vertical-align: middle;
286
-
287
- &:not(:focus) {
288
- @extend %visually-hidden;
289
- }
290
-
291
- kbd {
292
- margin-inline-start: var(--space-3xs);
293
- font-weight: initial;
294
- }
295
- }
@@ -1,47 +0,0 @@
1
- @use "./variables";
2
- @use "./components/alert";
3
- @use "./components/app";
4
- @use "./components/button";
5
- @use "./components/card";
6
- @use "./components/chip";
7
- @use "./components/details";
8
- @use "./components/dialog";
9
- @use "./components/field";
10
- @use "./components/hr";
11
- @use "./components/layout";
12
- @use "./components/progress-meter";
13
- @use "./components/range";
14
- @use "./components/skeleton";
15
- @use "./components/switch";
16
- @use "./components/table";
17
- @use "./components/text";
18
- @import "./experimental/dialog-animations";
19
- @import "./experimental/mobile-sidebar-fade-out";
20
-
21
- *,
22
- *::before,
23
- *::after {
24
- box-sizing: border-box;
25
- }
26
-
27
- :where(:focus-visible) {
28
- outline: var(--border-m) solid var(--color-brand-5);
29
- }
30
-
31
- html {
32
- text-size-adjust: 100%;
33
- color-scheme: light dark;
34
- }
35
-
36
- body {
37
- min-height: 100svh;
38
- margin: 0;
39
- background-color: var(--color-body);
40
- color: var(--color-body-text);
41
- font-family: var(--font-family-body);
42
- font-size: var(--font-size-m);
43
- }
44
-
45
- .sr-only {
46
- @extend %visually-hidden;
47
- }