@skeletonlabs/skeleton 5.0.0-next.1 → 5.0.0-next.11

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 (46) hide show
  1. package/package.json +1 -1
  2. package/src/base/globals.css +19 -42
  3. package/src/base/theme.css +122 -52
  4. package/src/index.css +5 -0
  5. package/src/themes/catppuccin.css +6 -6
  6. package/src/themes/cerberus.css +12 -12
  7. package/src/themes/concord.css +6 -6
  8. package/src/themes/crimson.css +6 -6
  9. package/src/themes/fennec.css +6 -6
  10. package/src/themes/hamlindigo.css +6 -6
  11. package/src/themes/legacy.css +6 -6
  12. package/src/themes/mint.css +6 -6
  13. package/src/themes/modern.css +6 -6
  14. package/src/themes/mona.css +6 -6
  15. package/src/themes/nosh.css +6 -6
  16. package/src/themes/nouveau.css +6 -6
  17. package/src/themes/pine.css +6 -6
  18. package/src/themes/reign.css +6 -6
  19. package/src/themes/rocket.css +6 -6
  20. package/src/themes/rose.css +6 -6
  21. package/src/themes/sahara.css +6 -6
  22. package/src/themes/seafoam.css +6 -6
  23. package/src/themes/terminus.css +6 -6
  24. package/src/themes/vintage.css +6 -6
  25. package/src/themes/vox.css +6 -6
  26. package/src/themes/wintry.css +6 -6
  27. package/src/utilities/badges.css +47 -12
  28. package/src/utilities/buttons.css +97 -57
  29. package/src/utilities/cards.css +3 -16
  30. package/src/utilities/chips.css +44 -19
  31. package/src/utilities/corner-shapes.css +541 -0
  32. package/src/utilities/dialogs.css +88 -0
  33. package/src/utilities/disclosures.css +62 -0
  34. package/src/utilities/dividers.css +3 -2
  35. package/src/utilities/form-core.css +49 -2
  36. package/src/utilities/form-groups.css +15 -126
  37. package/src/utilities/form-inputs.css +18 -10
  38. package/src/utilities/form-meter.css +58 -0
  39. package/src/utilities/form-progress.css +1 -1
  40. package/src/utilities/form-radios-checks.css +20 -22
  41. package/src/utilities/form-selects.css +8 -38
  42. package/src/utilities/form-textareas.css +15 -7
  43. package/src/utilities/masks.css +69 -0
  44. package/src/utilities/presets.css +25 -5
  45. package/src/utilities/tables.css +20 -12
  46. package/src/utilities/typography.css +103 -13
@@ -1,25 +1,33 @@
1
1
  /* Components: Forms > Textarea */
2
2
 
3
3
  @utility textarea {
4
- background-color: transparent;
5
- border-radius: var(--radius-base);
4
+ --field-size: var(--text-base);
5
+
6
+ background-color: var(--color-surface-50-950);
7
+ color: var(--color-surface-950-50);
8
+ border-radius: var(--radius-container);
6
9
  display: block;
7
10
  width: 100%;
8
11
 
9
12
  /* Size */
10
- font-size: var(--text-base);
11
- line-height: var(--text-base--line-height);
12
- padding-block: --spacing(1);
13
- padding-inline: --spacing(3);
13
+ font-size: var(--field-size);
14
+ line-height: var(--field-size);
15
+ padding-block: calc((var(--field-size) - --spacing(0.5)) / 2);
16
+ padding-inline: calc((var(--field-size) - --spacing(0.5)) / 2 + var(--spacing));
14
17
 
15
18
  /* Edges */
16
19
  outline-color: transparent;
17
20
  border-width: 0;
18
21
  --tw-ring-inset: inset;
19
- --tw-ring-color: var(--color-surface-200-800);
22
+ --tw-ring-color: var(--color-surface-300-700);
20
23
  --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 var(--default-ring-width) var(--tw-ring-color, currentColor);
21
24
  box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
22
25
 
26
+ /* Placeholder */
27
+ &::placeholder {
28
+ color: var(--field-placeholder);
29
+ }
30
+
23
31
  @variant active {
24
32
  --tw-ring-color: var(--color-primary-500);
25
33
  }
@@ -0,0 +1,69 @@
1
+ /* Utiilties: Masks */
2
+
3
+ @utility mask {
4
+ display: inline-block;
5
+ vertical-align: middle;
6
+ mask-size: contain;
7
+ mask-repeat: no-repeat;
8
+ mask-position: center;
9
+ }
10
+
11
+ @utility mask-circle {
12
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='100' cy='100' r='100'/%3e%3c/svg%3e");
13
+ }
14
+
15
+ @utility mask-squircle {
16
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M100 0C20 0 0 20 0 100s20 100 100 100 100-20 100-100S180 0 100 0Z'/%3e%3c/svg%3e");
17
+ }
18
+
19
+ @utility mask-triangle-up {
20
+ mask-image: url("data:image/svg+xml,%3csvg width='174' height='149' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m87 148.476-86.603.185L43.86 74.423 87 0l43.14 74.423 43.463 74.238z'/%3e%3c/svg%3e");
21
+ }
22
+
23
+ @utility mask-triangle-down {
24
+ mask-image: url("data:image/svg+xml,%3csvg width='174' height='150' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m87 .738 86.603-.184-43.463 74.238L87 149.214 43.86 74.792.397.554z'/%3e%3c/svg%3e");
25
+ }
26
+
27
+ @utility mask-triangle-right {
28
+ mask-image: url("data:image/svg+xml,%3csvg width='150' height='174' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M.631 87.107.446.505l74.239 43.462 74.422 43.14-74.422 43.14L.446 173.71z'/%3e%3c/svg%3e");
29
+ }
30
+
31
+ @utility mask-triangle-left {
32
+ mask-image: url("data:image/svg+xml,%3csvg width='150' height='174' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m149.369 87.107.185 86.603-74.239-43.463L.893 87.107l74.422-43.14L149.554.505z'/%3e%3c/svg%3e");
33
+ }
34
+
35
+ @utility mask-diamond {
36
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m100 0 100 100-100 100L0 100z'/%3e%3c/svg%3e");
37
+ }
38
+
39
+ @utility mask-pentagon {
40
+ mask-image: url("data:image/svg+xml,%3csvg width='192' height='181' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m96 0 95.106 69.098-36.327 111.804H37.22L.894 69.098z'/%3e%3c/svg%3e");
41
+ }
42
+
43
+ @utility mask-hexagon {
44
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='182' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M64.786 181.4c-9.196 0-20.063-6.687-25.079-14.21L3.762 105.33c-5.016-8.36-5.016-20.9 0-29.259l35.945-61.86C44.723 5.851 55.59 0 64.786 0h71.055c9.196 0 20.063 6.688 25.079 14.211l35.945 61.86c4.18 8.36 4.18 20.899 0 29.258l-35.945 61.86c-4.18 8.36-15.883 14.211-25.079 14.211H64.786Z'/%3e%3c/svg%3e");
45
+ }
46
+
47
+ @utility mask-cube {
48
+ mask-image: url("data:image/svg+xml,%3csvg width='182' height='201' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M.3 65.486c0-9.196 6.687-20.063 14.211-25.078l61.86-35.946c8.36-5.016 20.899-5.016 29.258 0l61.86 35.946c8.36 5.015 14.211 15.882 14.211 25.078v71.055c0 9.196-6.687 20.063-14.211 25.079l-61.86 35.945c-8.36 4.18-20.899 4.18-29.258 0L14.51 161.62C6.151 157.44.3 145.737.3 136.54V65.486Z'/%3e%3c/svg%3e");
49
+ }
50
+
51
+ @utility mask-octagon {
52
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3cpolygon points='59,0 141,0 200,59 200,141 141,200 59,200 0,141 0,59'/%3e%3c/svg%3e");
53
+ }
54
+
55
+ @utility mask-decagon {
56
+ mask-image: url("data:image/svg+xml,%3csvg width='192' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m96 0 58.779 19.098 36.327 50v61.804l-36.327 50L96 200l-58.779-19.098-36.327-50V69.098l36.327-50z'/%3e%3c/svg%3e");
57
+ }
58
+
59
+ @utility mask-star {
60
+ mask-image: url("data:image/svg+xml,%3csvg width='192' height='180' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='m96 153.044-58.779 26.243 7.02-63.513L.894 68.481l63.117-13.01L96 0l31.989 55.472 63.117 13.01-43.347 47.292 7.02 63.513z'/%3e%3c/svg%3e");
61
+ }
62
+
63
+ @utility mask-heart {
64
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='185' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M100 184.606a15.384 15.384 0 0 1-8.653-2.678C53.565 156.28 37.205 138.695 28.182 127.7 8.952 104.264-.254 80.202.005 54.146.308 24.287 24.264 0 53.406 0c21.192 0 35.869 11.937 44.416 21.879a2.884 2.884 0 0 0 4.356 0C110.725 11.927 125.402 0 146.594 0c29.142 0 53.098 24.287 53.4 54.151.26 26.061-8.956 50.122-28.176 73.554-9.023 10.994-25.383 28.58-63.165 54.228a15.384 15.384 0 0 1-8.653 2.673Z'/%3e%3c/svg%3e");
65
+ }
66
+
67
+ @utility mask-cross {
68
+ mask-image: url("data:image/svg+xml,%3csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3e%3cpolygon points='60,0 140,0 140,60 200,60 200,140 140,140 140,200 60,200 60,140 0,140 0,60 60,60'/%3e%3c/svg%3e");
69
+ }
@@ -1,9 +1,16 @@
1
- /* filled */
1
+ /* Filled --- */
2
+
2
3
  @utility preset-filled {
3
4
  background-color: var(--color-surface-950-50);
4
5
  color: var(--color-surface-50-950);
5
6
  }
6
7
 
8
+ /* filled - brand */
9
+ @utility preset-filled-brand {
10
+ background-color: light-dark(var(--color-brand-light), var(--color-brand-dark));
11
+ color: light-dark(var(--color-brand-contrast-light), var(--color-brand-contrast-dark));
12
+ }
13
+
7
14
  /* filled - primary */
8
15
  @utility preset-filled-primary-500 {
9
16
  background-color: var(--color-primary-500);
@@ -326,10 +333,16 @@
326
333
  color: var(--color-surface-contrast-950-50);
327
334
  }
328
335
 
329
- /* tonal */
336
+ /* Tonal --- */
337
+
330
338
  @utility preset-tonal {
331
- background-color: color-mix(in oklab, light-dark(var(--color-surface-950), var(--color-surface-50)) 5%, transparent);
332
- color: var(--color-primary-950-50);
339
+ background-color: color-mix(in oklab, light-dark(var(--color-surface-950), var(--color-surface-50)) 10%, transparent);
340
+ color: var(--color-surface-950-50);
341
+ }
342
+
343
+ @utility preset-tonal-brand {
344
+ background-color: color-mix(in oklab, light-dark(var(--color-brand-light), var(--color-brand-dark)) 25%, transparent);
345
+ color: var(--color-surface-950-50);
333
346
  }
334
347
 
335
348
  @utility preset-tonal-primary {
@@ -361,12 +374,19 @@
361
374
  color: var(--color-surface-950-50);
362
375
  }
363
376
 
364
- /* outlined */
377
+ /* Outlined --- */
378
+
365
379
  @utility preset-outlined {
366
380
  border-width: 1px;
367
381
  border-color: var(--color-surface-950-50);
368
382
  }
369
383
 
384
+ /* outlined - brand */
385
+ @utility preset-outlined-brand {
386
+ border-width: 1px;
387
+ border-color: light-dark(var(--color-brand-light), var(--color-brand-dark));
388
+ }
389
+
370
390
  /* outlined - primary */
371
391
  @utility preset-outlined-primary-500 {
372
392
  border-width: 1px;
@@ -1,5 +1,7 @@
1
1
  /* Components: Tables */
2
2
 
3
+ /* IMPORTANT: :where() is used to give user-land styles precedence. */
4
+
3
5
  @utility table-wrap {
4
6
  width: 100%;
5
7
  overflow: auto;
@@ -14,24 +16,24 @@
14
16
 
15
17
  /* Head --- */
16
18
 
17
- & thead {
19
+ & :where(thead) {
18
20
  color: var(--color-surface-700-300);
19
21
  border-bottom-width: 1px;
20
- border-color: var(--color-surface-200-800);
22
+ border-color: var(--color-surface-300-700);
21
23
  }
22
24
 
23
- & th {
25
+ & :where(th) {
24
26
  text-align: left;
25
27
  font-weight: 400;
26
28
  }
27
29
 
28
30
  /* Body --- */
29
31
 
30
- & tbody {
31
- & > :not(:last-child) {
32
- border-color: var(--color-surface-200-800);
32
+ & :where(tbody) {
33
+ & > :where(:not(:last-child)) {
34
+ border-color: var(--color-surface-300-700);
33
35
  }
34
- & > :not(:last-child) {
36
+ & > :where(:not(:last-child)) {
35
37
  border-top-width: 0px;
36
38
  border-bottom-width: 1px;
37
39
  }
@@ -39,27 +41,33 @@
39
41
 
40
42
  /* Foot --- */
41
43
 
42
- & tfoot {
44
+ & :where(tfoot) {
43
45
  border-top-width: 1px;
44
- border-color: var(--color-surface-200-800);
46
+ border-color: var(--color-surface-300-700);
45
47
  background-color: var(--color-surface-100-900);
46
48
  }
47
49
 
48
50
  /* Cells */
49
51
 
50
- & th {
52
+ & :where(th) {
51
53
  padding: --spacing(2);
52
54
  }
53
55
 
54
- & td {
56
+ & :where(td) {
55
57
  padding: --spacing(2);
56
58
  }
57
59
 
58
60
  /* Caption */
59
61
 
60
- & caption {
62
+ & :where(caption) {
61
63
  color: var(--color-surface-600-400);
62
64
  font-size: var(--text-xs);
63
65
  line-height: var(--text-xs--line-height);
64
66
  }
65
67
  }
68
+
69
+ @utility table-zebra {
70
+ & :where(tbody tr:nth-child(odd)) {
71
+ background-color: color-mix(in oklab, var(--color-surface-100-900) 25%, transparent);
72
+ }
73
+ }
@@ -1,5 +1,8 @@
1
1
  /* Components: Typography */
2
2
 
3
+ /* Headings --- */
4
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements */
5
+
3
6
  @utility h1 {
4
7
  color: var(--typo-heading--color-light);
5
8
  font-family: var(--typo-heading--font-family);
@@ -151,6 +154,9 @@
151
154
  }
152
155
  }
153
156
 
157
+ /* Anchor --- */
158
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a */
159
+
154
160
  @utility anchor {
155
161
  color: var(--typo-anchor--color-light);
156
162
  font-family: var(--typo-anchor--font-family);
@@ -201,27 +207,43 @@
201
207
  }
202
208
  }
203
209
 
210
+ /* Blockquote --- */
211
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote */
212
+
204
213
  @utility blockquote {
205
- border-left-width: 3px;
206
- border-left-color: var(--color-primary-500);
214
+ border-left-width: 2px;
215
+ border-left-color: light-dark(var(--color-brand-light), var(--color-brand-dark));
216
+ display: flex;
217
+ flex-direction: column;
218
+ gap: --spacing(4);
207
219
  padding-left: --spacing(4);
208
220
  font-style: italic;
209
221
  }
210
222
 
223
+ /* Keyboard Input --- */
224
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd */
225
+
211
226
  @utility kbd {
212
- background-color: var(--color-surface-300-700);
227
+ background-color: var(--color-surface-100-900);
213
228
  border-width: 1px;
229
+ border-right-width: 2px;
230
+ border-bottom-width: 3px;
214
231
  border-color: var(--color-surface-600-400);
215
- border-radius: var(--radius-base);
216
- color: var(--color-surface-contrast-500);
232
+ border-radius: 4px;
233
+ color: var(--color-surface-contrast-100);
217
234
  font-family: var(--font-mono);
218
235
  font-size: var(--text-sm);
219
236
  white-space: nowrap;
220
- overflow-x: auto;
221
- padding-inline: --spacing(1.5);
222
- padding-block: --spacing(0.25);
237
+ padding-inline: --spacing(1.25);
238
+
239
+ @variant dark {
240
+ color: var(--color-surface-contrast-900);
241
+ }
223
242
  }
224
243
 
244
+ /* Preformatted Text --- */
245
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre */
246
+
225
247
  @utility pre {
226
248
  background-color: rgba(0, 0, 0, 0.85);
227
249
  backdrop-filter: blur(var(--blur-sm));
@@ -233,17 +255,35 @@
233
255
  overflow-x: auto;
234
256
  }
235
257
 
236
- @utility code {
237
- &:not(pre &, .ec-line &) {
238
- background-color: var(--color-primary-100-900);
258
+ /* Code --- */
259
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code */
260
+
261
+ /* Affects <code>, but not <pre><code></code></pre> */
262
+ /* This enables the use of presets-* styling for standalone <code> */
263
+ @layer base {
264
+ code {
265
+ background-color: color-mix(in oklab, light-dark(var(--color-brand-light), var(--color-brand-dark)) 25%, transparent);
266
+ color: var(--color-surface-950-50);
239
267
  border-radius: var(--radius-base);
240
- color: var(--color-primary-contrast-50-950);
241
268
  font-family: var(--font-mono);
242
269
  font-size: var(--text-xs);
243
270
  white-space: nowrap;
244
271
  padding-inline: --spacing(1.5);
245
272
  padding-block: --spacing(0.75);
246
- overflow-x: auto;
273
+ }
274
+
275
+ /* Reset when code is inside pre or .ec-line */
276
+ pre code,
277
+ .ec-line code {
278
+ background-color: unset;
279
+ border-radius: unset;
280
+ color: unset;
281
+ font-family: unset;
282
+ font-size: unset;
283
+ white-space: unset;
284
+ padding-inline: unset;
285
+ padding-block: unset;
286
+ overflow-x: unset;
247
287
  }
248
288
  }
249
289
 
@@ -291,9 +331,59 @@
291
331
  }
292
332
  }
293
333
 
334
+ /* Mark --- */
335
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark */
336
+
294
337
  @utility mark {
295
338
  color: var(--color-tertiary-contrast-500);
296
339
  background-color: var(--color-tertiary-500);
297
340
  border-radius: var(--radius-sm);
298
341
  padding-inline: --spacing(1);
299
342
  }
343
+
344
+ /* Abbreviation --- */
345
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr */
346
+
347
+ @utility abbr {
348
+ font-weight: bold;
349
+ text-decoration: underline dotted;
350
+ text-decoration-color: var(--color-surface-600-400);
351
+ text-underline-offset: --spacing(1);
352
+ }
353
+
354
+ /* Citation --- */
355
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite */
356
+
357
+ @utility cite {
358
+ font-style: italic;
359
+ }
360
+
361
+ /* Quote --- */
362
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q */
363
+
364
+ @utility quote {
365
+ font-style: italic;
366
+ }
367
+
368
+ /* Subscript / Superscript --- */
369
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub */
370
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup */
371
+
372
+ @utility sub {
373
+ font-size: var(--text-xs);
374
+ line-height: 0;
375
+ vertical-align: sub;
376
+ }
377
+
378
+ @utility sup {
379
+ font-size: var(--text-xs);
380
+ line-height: 0;
381
+ vertical-align: super;
382
+ }
383
+
384
+ /* Time --- */
385
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time */
386
+
387
+ @utility time {
388
+ font-weight: bold;
389
+ }