@skeletonlabs/skeleton 0.132.5 → 1.0.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 (65) hide show
  1. package/README.md +7 -6
  2. package/components/Accordion/Accordion.svelte.d.ts +3 -3
  3. package/components/Accordion/AccordionItem.svelte +1 -1
  4. package/components/AppBar/AppBar.svelte.d.ts +2 -2
  5. package/components/AppRail/AppRailTile.svelte +1 -1
  6. package/components/AppRail/AppRailTile.svelte.d.ts +4 -4
  7. package/components/AppShell/AppShell.svelte +1 -1
  8. package/components/AppShell/AppShell.svelte.d.ts +8 -8
  9. package/components/Avatar/Avatar.svelte +1 -1
  10. package/components/ConicGradient/ConicGradient.svelte +2 -2
  11. package/components/ConicGradient/ConicGradient.svelte.d.ts +6 -6
  12. package/components/FileButton/FileButton.svelte +9 -3
  13. package/components/FileButton/FileButton.svelte.d.ts +2 -0
  14. package/components/FileDropzone/FileDropzone.svelte +5 -2
  15. package/components/FileDropzone/FileDropzone.svelte.d.ts +7 -5
  16. package/components/InputChip/InputChip.svelte +1 -0
  17. package/components/ListBox/ListBox.svelte +1 -1
  18. package/components/ListBox/ListBox.svelte.d.ts +1 -0
  19. package/components/ProgressBar/ProgressBar.svelte +1 -1
  20. package/components/ProgressRadial/ProgressRadial.svelte +3 -2
  21. package/components/ProgressRadial/ProgressRadial.svelte.d.ts +2 -0
  22. package/components/Radio/RadioGroup.svelte.d.ts +1 -0
  23. package/components/Radio/RadioItem.svelte +3 -1
  24. package/components/Radio/RadioItem.svelte.d.ts +2 -0
  25. package/components/RangeSlider/RangeSlider.svelte +1 -1
  26. package/components/Stepper/Step.svelte +10 -3
  27. package/components/Stepper/Step.svelte.d.ts +3 -0
  28. package/components/Stepper/Stepper.svelte +8 -1
  29. package/components/Stepper/Stepper.svelte.d.ts +11 -3
  30. package/components/Tab/Tab.svelte +2 -1
  31. package/components/Tab/Tab.svelte.d.ts +2 -0
  32. package/components/Tab/TabGroup.svelte +4 -2
  33. package/components/Tab/TabGroup.svelte.d.ts +2 -0
  34. package/components/Table/Table.svelte +2 -0
  35. package/components/Table/Table.svelte.d.ts +2 -0
  36. package/components/TableOfContents/TableOfContents.svelte +25 -18
  37. package/package.json +1 -1
  38. package/styles/elements/buttons.css +4 -0
  39. package/styles/elements/forms.css +4 -1
  40. package/styles/elements/logo-clouds.css +1 -1
  41. package/styles/elements/tables.css +4 -3
  42. package/styles/tailwind.css +1 -1
  43. package/styles/typography.css +12 -10
  44. package/styles/variants.css +3 -1
  45. package/tailwind/generated/intellisense-classes.cjs +1 -1
  46. package/tailwind/generated/intellisense-classes.d.cts +230 -121
  47. package/tailwind/tokens/backgrounds.cjs +1 -1
  48. package/tailwind/tokens/border-radius.cjs +1 -1
  49. package/tailwind/tokens/borders.cjs +1 -1
  50. package/tailwind/tokens/fills.cjs +1 -1
  51. package/tailwind/tokens/rings.cjs +1 -1
  52. package/tailwind/tokens/text.cjs +1 -1
  53. package/themes/theme-gold-nouveau.css +3 -10
  54. package/themes/theme-rocket.css +5 -5
  55. package/themes/theme-skeleton.css +3 -14
  56. package/types/tailwind.d.ts +1 -1
  57. package/types/tailwind.js +1 -1
  58. package/utilities/CodeBlock/CodeBlock.svelte.d.ts +9 -9
  59. package/utilities/Drawer/Drawer.svelte.d.ts +2 -2
  60. package/utilities/Drawer/types.d.ts +3 -3
  61. package/utilities/LightSwitch/LightSwitch.svelte +2 -2
  62. package/utilities/Modal/Modal.svelte.d.ts +1 -1
  63. package/utilities/Modal/types.d.ts +5 -5
  64. package/utilities/Popup/popup.js +10 -6
  65. package/utilities/Toast/types.d.ts +1 -4
@@ -8,6 +8,7 @@ export let text = "";
8
8
  export let color = "";
9
9
  export let regionHead = "";
10
10
  export let regionBody = "";
11
+ export let regionCell = "";
11
12
  export let regionFoot = "";
12
13
  function onRowClick(event, rowIndex) {
13
14
  if (!interactive)
@@ -59,6 +60,7 @@ $:
59
60
  <!-- Cell -->
60
61
  <!-- prettier-ignore -->
61
62
  <td
63
+ class="{regionCell}"
62
64
  role="gridcell"
63
65
  aria-colindex={cellIndex + 1}
64
66
  tabindex={cellIndex === 0 ? 0 : -1}
@@ -17,6 +17,8 @@ declare const __propDef: {
17
17
  regionHead?: string | undefined;
18
18
  /** Provide arbitrary classes for the table body.*/
19
19
  regionBody?: string | undefined;
20
+ /** Provide arbitrary classes for the table cells.*/
21
+ regionCell?: string | undefined;
20
22
  /** Provide arbitrary classes for the table foot.*/
21
23
  regionFoot?: string | undefined;
22
24
  };
@@ -1,4 +1,5 @@
1
1
  <script>import { onDestroy, onMount } from "svelte";
2
+ import { fade } from "svelte/transition";
2
3
  export let scrollParent = "#page";
3
4
  export let target = "#page";
4
5
  export let allowedHeadings = "h2, h3";
@@ -23,13 +24,16 @@ function queryAllowedHeadingsList() {
23
24
  allowedHeadingsList = elemTarget?.querySelectorAll(allowedHeadings);
24
25
  }
25
26
  function generateHeadingList() {
26
- allowedHeadingsList?.forEach((elem, i) => {
27
+ allowedHeadingsList?.forEach((elem) => {
27
28
  if (elem.hasAttribute("data-toc-ignore"))
28
29
  return;
29
30
  if (!elem.id) {
30
31
  let newId = elem.innerText.replaceAll(/[^a-zA-Z0-9 ]/g, "").replaceAll(" ", "-").toLowerCase();
31
- elem.id = `${newId}-${i}`;
32
+ elem.id = `${newId}`;
32
33
  }
34
+ if (elem.querySelector(".permalink"))
35
+ return;
36
+ elem.innerHTML += `<a href="#${elem.id}" class="permalink">\u{1F517}</a>`;
33
37
  filteredHeadingsList.push(elem);
34
38
  });
35
39
  filteredHeadingsList = [...filteredHeadingsList];
@@ -83,19 +87,22 @@ $:
83
87
 
84
88
  <!-- @component Allows you to quickly navigate the hierarchy of headings for the current page. -->
85
89
 
86
- <div class="toc {classesBase}">
87
- <nav class="toc-list {classesList}">
88
- <div class="toc-label {classesLabel}">{label}</div>
89
- {#each filteredHeadingsList as headingElem, i}
90
- <!-- prettier-ignore -->
91
- <li
92
- class="toc-list-item {classesListItem} {setHeadingClasses(headingElem)} {headingElem.id === activeHeaderId ? active : ''}"
93
- on:click={() => { scrollToHeading(headingElem); }}
94
- on:click
95
- on:keypress
96
- >
97
- {headingElem.innerText}
98
- </li>
99
- {/each}
100
- </nav>
101
- </div>
90
+ {#if filteredHeadingsList.length > 0}
91
+ <div class="toc {classesBase}" transition:fade|local={{ duration: 100 }}>
92
+ <nav class="toc-list {classesList}">
93
+ <div class="toc-label {classesLabel}">{label}</div>
94
+ {#each filteredHeadingsList as headingElem, i}
95
+ <!-- prettier-ignore -->
96
+ <li
97
+ class="toc-list-item {classesListItem} {setHeadingClasses(headingElem)} {headingElem.id === activeHeaderId ? active : ''}"
98
+ on:click={() => { scrollToHeading(headingElem); }}
99
+ on:click
100
+ on:keypress
101
+ >
102
+ <!-- {headingElem.innerText} -->
103
+ {headingElem.firstChild?.nodeValue}
104
+ </li>
105
+ {/each}
106
+ </nav>
107
+ </div>
108
+ {/if}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "v0.132.5",
3
+ "version": "v1.0.0",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {
@@ -74,9 +74,13 @@
74
74
 
75
75
  .btn-group {
76
76
  @apply inline-flex flex-row space-x-0 overflow-hidden rounded-token;
77
+ /* Safari: hover overflow fix for border radius */
78
+ isolation: isolate;
77
79
  }
78
80
  .btn-group-vertical {
79
81
  @apply btn-group flex-col space-y-0 rounded-container-token;
82
+ /* Safari: hover overflow fix for border radius */
83
+ isolation: isolate;
80
84
  }
81
85
 
82
86
  /* Button / Anchors */
@@ -109,7 +109,7 @@
109
109
  @apply !mb-3;
110
110
  }
111
111
  .select option {
112
- @apply px-4 py-2 rounded-token cursor-pointer;
112
+ @apply bg-surface-200-700-token px-4 py-2 rounded-token cursor-pointer;
113
113
  }
114
114
  .select option:checked {
115
115
  /* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
@@ -180,6 +180,9 @@
180
180
  .input-group select {
181
181
  @apply border-0 ring-0 bg-transparent;
182
182
  }
183
+ .input-group select option {
184
+ @apply bg-surface-200-700-token;
185
+ }
183
186
  .input-group div,
184
187
  .input-group a,
185
188
  .input-group button {
@@ -14,7 +14,7 @@
14
14
  /* Center Contents */
15
15
  @apply flex justify-center items-center space-x-4;
16
16
  /* Background */
17
- @apply bg-surface-500/10 dark:bg-surface-500/20;
17
+ @apply bg-surface-100-800-token;
18
18
  /* Text */
19
19
  @apply text-base font-bold text-black dark:text-white;
20
20
  /* Padding */
@@ -60,15 +60,16 @@
60
60
  }
61
61
 
62
62
  .table tbody td {
63
- @apply text-sm px-4 py-2 md:py-3 xl:py-4 whitespace-nowrap;
63
+ /* NOTE: removed this to allow wrapping */
64
+ @apply text-sm px-3 py-4 align-top whitespace-nowrap lg:whitespace-normal;
64
65
  }
65
66
 
66
67
  .table-compact tbody td {
67
- @apply py-1 md:py-2 xl:py-3;
68
+ @apply !py-3;
68
69
  }
69
70
 
70
71
  .table-comfortable tbody td {
71
- @apply py-3 md:py-4 xl:py-8;
72
+ @apply !py-5;
72
73
  }
73
74
 
74
75
  /* === Table Foot === */
@@ -7,7 +7,7 @@ IMPORTANT:
7
7
  Be sure to remove these directives from your global CSS stylesheet.
8
8
 
9
9
  Tailwind directives should only be included ONCE per project.
10
- These directives should proceed ALL Skeleton stylesheets.
10
+ These directives should preceed ALL Skeleton stylesheets.
11
11
  */
12
12
 
13
13
  @tailwind base;
@@ -11,7 +11,7 @@
11
11
  @apply font-heading-token text-3xl md:text-5xl;
12
12
  }
13
13
  h2:not(.unstyled):is(:not(.prose *)) {
14
- @apply font-heading-token text-2xl md:text-3xl;
14
+ @apply font-heading-token text-2xl md:text-4xl;
15
15
  }
16
16
  h3:not(.unstyled):is(:not(.prose *)) {
17
17
  @apply font-heading-token text-xl md:text-2xl;
@@ -33,7 +33,9 @@
33
33
  @apply text-base;
34
34
  }
35
35
 
36
- a:not(.unstyled):is(:not(.prose *)):not(.btn):not(.btn-icon):not(.app-bar a):not(.logo-item):not(a.card):not(.list-nav a) {
36
+ a:not(.unstyled):not(.permalink):is(:not(.prose *)):not(.btn):not(.btn-icon):not(.app-bar a):not(.logo-item):not(a.card):not(
37
+ .list-nav a
38
+ ) {
37
39
  @apply text-primary-700 dark:text-primary-500 hover:brightness-110 underline;
38
40
  }
39
41
 
@@ -66,27 +68,27 @@
66
68
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins */
67
69
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del */
68
70
 
69
- ins,
70
- del {
71
+ ins:not(.unstyled):is(:not(.prose *)),
72
+ del:not(.unstyled):is(:not(.prose *)) {
71
73
  @apply block relative p-0.5 pl-5;
72
74
  text-decoration: none;
73
75
  }
74
76
 
75
- ins::before,
76
- del::before {
77
+ ins:not(.unstyled):is(:not(.prose *))::before,
78
+ del:not(.unstyled):is(:not(.prose *))::before {
77
79
  @apply absolute left-1 font-mono;
78
80
  }
79
- ins::before {
81
+ ins:not(.unstyled):is(:not(.prose *))::before {
80
82
  content: '+';
81
83
  }
82
- del::before {
84
+ del:not(.unstyled):is(:not(.prose *))::before {
83
85
  content: '−';
84
86
  }
85
87
 
86
- ins {
88
+ ins:not(.unstyled):is(:not(.prose *)) {
87
89
  @apply font-mono bg-success-500 text-on-success-token;
88
90
  }
89
- del {
91
+ del:not(.unstyled):is(:not(.prose *)) {
90
92
  @apply font-mono bg-error-500 text-on-error-token;
91
93
  }
92
94
 
@@ -147,8 +147,10 @@
147
147
  .variant-glass-error {
148
148
  @apply bg-error-500/20 dark:bg-error-500/20 backdrop-blur-lg;
149
149
  }
150
- .variant-glass,
151
150
  .variant-glass-surface {
152
151
  @apply bg-surface-500/20 dark:bg-surface-500/20 backdrop-blur-lg;
153
152
  }
153
+ .variant-glass {
154
+ @apply bg-surface-50/30 dark:bg-surface-900/30 backdrop-blur-lg;
155
+ }
154
156
  }