@skeletonlabs/skeleton 0.99.5 → 0.132.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.
Files changed (121) hide show
  1. package/README.md +1 -2
  2. package/actions/Filters/filter.js +6 -9
  3. package/components/Accordion/Accordion.svelte +34 -0
  4. package/components/Accordion/Accordion.svelte.d.ts +41 -0
  5. package/components/Accordion/AccordionItem.svelte +84 -39
  6. package/components/Accordion/AccordionItem.svelte.d.ts +24 -7
  7. package/components/AppBar/AppBar.svelte +36 -21
  8. package/components/AppBar/AppBar.svelte.d.ts +20 -1
  9. package/components/AppRail/AppRail.svelte +3 -2
  10. package/components/AppRail/AppRail.svelte.d.ts +13 -1
  11. package/components/AppRail/AppRailTile.svelte +10 -7
  12. package/components/AppRail/AppRailTile.svelte.d.ts +10 -4
  13. package/components/AppShell/AppShell.svelte +3 -2
  14. package/components/AppShell/AppShell.svelte.d.ts +11 -0
  15. package/components/Avatar/Avatar.svelte +9 -9
  16. package/components/Avatar/Avatar.svelte.d.ts +16 -5
  17. package/components/ConicGradient/ConicGradient.svelte +18 -8
  18. package/components/ConicGradient/ConicGradient.svelte.d.ts +11 -0
  19. package/components/ConicGradient/settings.d.ts +1 -5
  20. package/components/ConicGradient/settings.js +1 -2
  21. package/components/FileButton/FileButton.svelte +8 -6
  22. package/components/FileButton/FileButton.svelte.d.ts +3 -1
  23. package/components/FileDropzone/FileDropzone.svelte +43 -63
  24. package/components/FileDropzone/FileDropzone.svelte.d.ts +24 -8
  25. package/components/InputChip/InputChip.svelte +97 -52
  26. package/components/InputChip/InputChip.svelte.d.ts +28 -4
  27. package/components/ListBox/ListBox.svelte +13 -29
  28. package/components/ListBox/ListBox.svelte.d.ts +11 -10
  29. package/components/ListBox/ListBoxItem.svelte +60 -50
  30. package/components/ListBox/ListBoxItem.svelte.d.ts +12 -7
  31. package/components/Paginator/Paginator.svelte +4 -4
  32. package/components/Paginator/Paginator.svelte.d.ts +13 -2
  33. package/components/ProgressBar/ProgressBar.svelte +17 -24
  34. package/components/ProgressBar/ProgressBar.svelte.d.ts +9 -1
  35. package/components/ProgressRadial/ProgressRadial.svelte +6 -8
  36. package/components/ProgressRadial/ProgressRadial.svelte.d.ts +9 -2
  37. package/components/Radio/RadioGroup.svelte +13 -16
  38. package/components/Radio/RadioGroup.svelte.d.ts +15 -7
  39. package/components/Radio/RadioItem.svelte +25 -21
  40. package/components/Radio/RadioItem.svelte.d.ts +12 -7
  41. package/components/RangeSlider/RangeSlider.svelte +9 -17
  42. package/components/RangeSlider/RangeSlider.svelte.d.ts +11 -2
  43. package/components/SlideToggle/SlideToggle.svelte +10 -9
  44. package/components/SlideToggle/SlideToggle.svelte.d.ts +11 -3
  45. package/components/Stepper/Step.svelte +64 -107
  46. package/components/Stepper/Step.svelte.d.ts +17 -18
  47. package/components/Stepper/Stepper.svelte +58 -37
  48. package/components/Stepper/Stepper.svelte.d.ts +28 -14
  49. package/components/Tab/Tab.svelte +40 -38
  50. package/components/Tab/Tab.svelte.d.ts +20 -14
  51. package/components/Tab/TabGroup.svelte +28 -41
  52. package/components/Tab/TabGroup.svelte.d.ts +25 -9
  53. package/components/Table/Table.svelte.d.ts +9 -0
  54. package/components/TableOfContents/TableOfContents.svelte +3 -2
  55. package/components/TableOfContents/TableOfContents.svelte.d.ts +12 -0
  56. package/index.d.ts +5 -4
  57. package/index.js +10 -4
  58. package/package.json +24 -16
  59. package/styles/all.css +0 -3
  60. package/styles/elements/breadcrumbs.css +3 -4
  61. package/styles/elements/buttons.css +2 -4
  62. package/styles/elements/forms.css +265 -0
  63. package/styles/elements/lists.css +1 -1
  64. package/styles/elements/modals.css +15 -0
  65. package/styles/elements/popups.css +16 -0
  66. package/styles/elements.css +3 -2
  67. package/styles/typography.css +5 -5
  68. package/styles/variants.css +7 -7
  69. package/tailwind/core.cjs +1 -1
  70. package/tailwind/generated/intellisense-classes.cjs +1 -1
  71. package/tailwind/generated/intellisense-classes.d.cts +318 -404
  72. package/tailwind/intellisense.cjs +2 -2
  73. package/tailwind/skeleton.cjs +1 -1
  74. package/types/index.d.ts +1 -0
  75. package/types/index.js +1 -0
  76. package/types/tailwind.d.ts +4 -0
  77. package/types/tailwind.js +2 -0
  78. package/utilities/CodeBlock/CodeBlock.svelte +14 -8
  79. package/utilities/CodeBlock/CodeBlock.svelte.d.ts +17 -1
  80. package/utilities/Drawer/Drawer.svelte +50 -37
  81. package/utilities/Drawer/Drawer.svelte.d.ts +20 -1
  82. package/utilities/Drawer/types.d.ts +8 -2
  83. package/utilities/LightSwitch/LightSwitch.svelte +43 -53
  84. package/utilities/LightSwitch/LightSwitch.svelte.d.ts +18 -2
  85. package/utilities/LightSwitch/lightswitch.d.ts +20 -0
  86. package/utilities/LightSwitch/lightswitch.js +71 -0
  87. package/utilities/LocalStorageStore/LocalStorageStore.js +1 -1
  88. package/utilities/Modal/Modal.svelte +96 -64
  89. package/utilities/Modal/Modal.svelte.d.ts +29 -0
  90. package/utilities/Modal/types.d.ts +9 -5
  91. package/utilities/Popup/popup.d.ts +7 -0
  92. package/utilities/Popup/popup.js +218 -0
  93. package/utilities/Popup/types.d.ts +32 -0
  94. package/utilities/Popup/types.js +3 -0
  95. package/utilities/Toast/Toast.svelte +17 -13
  96. package/utilities/Toast/Toast.svelte.d.ts +14 -0
  97. package/utilities/Toast/stores.js +9 -26
  98. package/utilities/Toast/types.d.ts +6 -1
  99. package/components/Accordion/AccordionGroup.svelte +0 -33
  100. package/components/Accordion/AccordionGroup.svelte.d.ts +0 -24
  101. package/components/SvgIcon/SvgIcon.svelte +0 -33
  102. package/components/SvgIcon/SvgIcon.svelte.d.ts +0 -26
  103. package/components/SvgIcon/icons.d.ts +0 -1
  104. package/components/SvgIcon/icons.js +0 -25
  105. package/styles/elements/menus.css +0 -29
  106. package/styles/elements/tooltips.css +0 -83
  107. package/styles/forms.css +0 -195
  108. package/utilities/LightSwitch/stores.d.ts +0 -2
  109. package/utilities/LightSwitch/stores.js +0 -5
  110. package/utilities/Menu/menu.d.ts +0 -18
  111. package/utilities/Menu/menu.js +0 -151
  112. package/utilities/Modal/examples/ModalExampleEmbed.svelte +0 -17
  113. package/utilities/Modal/examples/ModalExampleEmbed.svelte.d.ts +0 -17
  114. package/utilities/Modal/examples/ModalExampleForm.svelte +0 -41
  115. package/utilities/Modal/examples/ModalExampleForm.svelte.d.ts +0 -17
  116. package/utilities/Modal/examples/ModalExampleImage.svelte +0 -19
  117. package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +0 -16
  118. package/utilities/Modal/examples/ModalExampleList.svelte +0 -27
  119. package/utilities/Modal/examples/ModalExampleList.svelte.d.ts +0 -17
  120. package/utilities/Tooltip/tooltip.d.ts +0 -35
  121. package/utilities/Tooltip/tooltip.js +0 -94
@@ -0,0 +1,265 @@
1
+ /* Stylesheet: forms.css */
2
+
3
+ @layer base {
4
+ /* === Resets === */
5
+
6
+ fieldset,
7
+ legend,
8
+ label {
9
+ @apply block;
10
+ }
11
+
12
+ /* Placeholders */
13
+ ::-moz-placeholder {
14
+ @apply text-surface-500-400-token;
15
+ }
16
+ :-ms-input-placeholder {
17
+ @apply text-surface-500-400-token;
18
+ }
19
+ ::placeholder {
20
+ @apply text-surface-500-400-token;
21
+ }
22
+
23
+ /* Date Calendar Picker (Webkit) */
24
+ ::-webkit-calendar-picker-indicator {
25
+ @apply dark:invert;
26
+ }
27
+
28
+ /* Progress Bar */
29
+ progress {
30
+ webkit-appearance: none;
31
+ -moz-appearance: none;
32
+ appearance: none;
33
+ @apply w-full h-2 overflow-hidden rounded-token;
34
+ @apply bg-surface-400-500-token;
35
+ }
36
+ progress::-webkit-progress-bar {
37
+ @apply bg-surface-400-500-token;
38
+ }
39
+ progress::-webkit-progress-value {
40
+ @apply bg-surface-900-50-token;
41
+ }
42
+ ::-moz-progress-bar {
43
+ @apply bg-surface-900-50-token;
44
+ }
45
+ :indeterminate::-moz-progress-bar {
46
+ width: 0;
47
+ }
48
+
49
+ /* Range Input */
50
+ /* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */
51
+ [type='range'] {
52
+ @apply w-full accent-surface-900 dark:accent-surface-50;
53
+ }
54
+
55
+ /* === Text Labeling === */
56
+
57
+ .legend {
58
+ @apply font-heading-token text-xl md:text-2xl;
59
+ }
60
+
61
+ .label {
62
+ @apply space-y-1;
63
+ }
64
+
65
+ /* === Core Styles === */
66
+
67
+ .input,
68
+ .textarea,
69
+ .select,
70
+ .input-group {
71
+ @apply w-full transition duration-200;
72
+ /* Background */
73
+ @apply bg-surface-200-700-token focus:brightness-105 hover:brightness-105;
74
+ /* Ring */
75
+ @apply !ring-0;
76
+ /* Border */
77
+ @apply border-token border-surface-400-500-token focus-within:border-primary-500;
78
+ }
79
+
80
+ /* Base Inputs */
81
+ .input,
82
+ .input-group {
83
+ @apply rounded-token;
84
+ }
85
+
86
+ /* Container Inputs */
87
+ .textarea,
88
+ .select {
89
+ @apply rounded-container-token;
90
+ }
91
+
92
+ /* Select (size/multiple) */
93
+ .select {
94
+ @apply p-2 pr-8 space-y-1;
95
+ }
96
+ .select[size] {
97
+ @apply bg-none;
98
+ }
99
+ .select optgroup {
100
+ @apply space-y-1 font-bold;
101
+ }
102
+ .select optgroup option {
103
+ @apply ml-0 pl-0;
104
+ }
105
+ .select optgroup option:first-of-type {
106
+ @apply mt-3;
107
+ }
108
+ .select optgroup option:last-child {
109
+ @apply !mb-3;
110
+ }
111
+ .select option {
112
+ @apply px-4 py-2 rounded-token cursor-pointer;
113
+ }
114
+ .select option:checked {
115
+ /* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
116
+ background: rgb(var(--color-primary-500)) linear-gradient(0deg, rgb(var(--color-primary-500)) 0%, rgb(var(--color-primary-500)) 100%);
117
+ @apply text-on-primary-token;
118
+ }
119
+
120
+ /* Checkbox & Radio */
121
+ .checkbox,
122
+ .radio {
123
+ @apply w-5 h-5 !ring-0 rounded cursor-pointer;
124
+ /* Background */
125
+ @apply bg-surface-200-700-token focus:brightness-105 hover:brightness-105;
126
+ /* Border */
127
+ @apply border-token border-surface-400-500-token focus:border-primary-500;
128
+ }
129
+ .checkbox:checked,
130
+ .radio:checked {
131
+ @apply bg-primary-500 hover:bg-primary-500 focus:bg-primary-500 focus:ring-0;
132
+ }
133
+ .radio {
134
+ @apply rounded-token;
135
+ }
136
+
137
+ /* === Specialized === */
138
+
139
+ /* File Inputs */
140
+ .input[type='file'] {
141
+ @apply p-1;
142
+ }
143
+
144
+ /* Color Picker */
145
+ /* https://stackoverflow.com/questions/11167281/webkit-css-to-control-the-box-around-the-color-in-an-inputtype-color */
146
+ .input[type='color'] {
147
+ @apply border-none w-10 h-10 overflow-hidden rounded-token cursor-pointer;
148
+ -webkit-appearance: none; /* WebKit Only */
149
+ }
150
+ .input[type='color']::-webkit-color-swatch-wrapper {
151
+ @apply p-0;
152
+ }
153
+ .input[type='color']::-webkit-color-swatch {
154
+ @apply border-none hover:brightness-110;
155
+ }
156
+ .input[type='color']::-moz-color-swatch {
157
+ @apply border-none;
158
+ }
159
+
160
+ /* === States === */
161
+
162
+ .input:disabled,
163
+ .textarea:disabled,
164
+ .select:disabled {
165
+ @apply !opacity-50 !cursor-not-allowed hover:!brightness-100;
166
+ }
167
+
168
+ .input[readonly],
169
+ .textarea[readonly],
170
+ .select[readonly] {
171
+ @apply !border-0 !cursor-not-allowed hover:!brightness-100;
172
+ }
173
+
174
+ /* === Input Groups === */
175
+
176
+ .input-group {
177
+ @apply grid overflow-hidden;
178
+ }
179
+ .input-group input,
180
+ .input-group select {
181
+ @apply border-0 ring-0 bg-transparent;
182
+ }
183
+ .input-group div,
184
+ .input-group a,
185
+ .input-group button {
186
+ @apply px-4 flex justify-between items-center;
187
+ }
188
+ .input-group-divider input,
189
+ .input-group-divider select,
190
+ .input-group-divider div,
191
+ .input-group-divider a {
192
+ @apply border-l border-surface-400-500-token focus:border-surface-400-500-token;
193
+ /* Disable Ring */
194
+ @apply !ring-0;
195
+ /* Prevent buttons from being squished */
196
+ @apply !min-w-fit;
197
+ }
198
+ .input-group-divider *:first-child {
199
+ @apply !border-l-0;
200
+ }
201
+ .input-group-shim {
202
+ @apply bg-surface-400/10 text-surface-600-300-token;
203
+ }
204
+
205
+ /* === Variants === */
206
+
207
+ /* success */
208
+ .input-success {
209
+ @apply !bg-success-200 !border-success-500 !text-success-700;
210
+ }
211
+ .input-success::-moz-placeholder {
212
+ @apply text-success-700;
213
+ }
214
+ .input-success:-ms-input-placeholder {
215
+ @apply text-success-700;
216
+ }
217
+ .input-success::placeholder {
218
+ @apply text-success-700;
219
+ }
220
+
221
+ /* warning */
222
+ .input-warning {
223
+ @apply !bg-warning-200 !border-warning-500 !text-warning-700;
224
+ }
225
+ .input-warning::-moz-placeholder {
226
+ @apply text-warning-700;
227
+ }
228
+ .input-warning:-ms-input-placeholder {
229
+ @apply text-warning-700;
230
+ }
231
+ .input-warning::placeholder {
232
+ @apply text-warning-700;
233
+ }
234
+
235
+ /* error */
236
+ .input-error {
237
+ @apply !bg-error-200 !border-error-500 !text-error-500;
238
+ }
239
+ .input-error::-moz-placeholder {
240
+ @apply text-error-500;
241
+ }
242
+ .input-error:-ms-input-placeholder {
243
+ @apply text-error-500;
244
+ }
245
+ .input-error::placeholder {
246
+ @apply text-error-500;
247
+ }
248
+
249
+ /* === Variants === */
250
+
251
+ /* Material */
252
+ .variant-form-material {
253
+ /* Border Radius */
254
+ @apply !rounded-tl !rounded-tr !rounded-bl-none !rounded-br-none;
255
+ /* Background */
256
+ @apply bg-surface-500/10 dark:bg-surface-500/20;
257
+ /* Border */
258
+ @apply border-0 border-b-2;
259
+ /* Blur */
260
+ @apply backdrop-blur;
261
+ }
262
+ .variant-form-material[type='file'] {
263
+ @apply !py-1.5;
264
+ }
265
+ }
@@ -37,7 +37,7 @@
37
37
  .list-option {
38
38
  @apply flex items-center space-x-4 whitespace-nowrap;
39
39
  /* Padding */
40
- @apply px-4 py-3;
40
+ @apply px-4 py-2;
41
41
  /* Hover */
42
42
  @apply bg-primary-hover-token;
43
43
  /* Cursor */
@@ -0,0 +1,15 @@
1
+ /* Tailwind Elements: modals.css */
2
+
3
+ /* === Modal (helpers) === */
4
+
5
+ .w-modal-slim {
6
+ @apply w-full max-w-[400px];
7
+ }
8
+
9
+ .w-modal {
10
+ @apply w-full max-w-[640px];
11
+ }
12
+
13
+ .w-modal-wide {
14
+ @apply w-full max-w-[80%];
15
+ }
@@ -0,0 +1,16 @@
1
+ /* Tailwind Elements: popups.css */
2
+
3
+ /* === Popup === */
4
+
5
+ [data-popup] {
6
+ /* https://floating-ui.com/docs/computeposition#usage */
7
+ @apply absolute top-0 left-0; /* max-w-max */
8
+ /* Set hidden on page load */
9
+ @apply hidden;
10
+ /* Transitions */
11
+ @apply transition-opacity duration-200;
12
+ }
13
+
14
+ [data-popup] .arrow {
15
+ @apply absolute rotate-45 w-2 h-2;
16
+ }
@@ -8,11 +8,12 @@
8
8
  @import 'elements/buttons.css';
9
9
  @import 'elements/cards.css';
10
10
  @import 'elements/chips.css';
11
+ @import 'elements/forms.css';
11
12
  @import 'elements/lists.css';
12
13
  @import 'elements/logo-clouds.css';
13
14
  @import 'elements/placeholders.css';
14
15
  @import 'elements/tables.css';
15
16
 
16
17
  /* Utilities */
17
- @import 'elements/menus.css';
18
- @import 'elements/tooltips.css';
18
+ @import 'elements/modals.css';
19
+ @import 'elements/popups.css';
@@ -53,11 +53,11 @@
53
53
  /* For use outside of Skeleton's CodeBlock component */
54
54
 
55
55
  pre:not(.unstyled):not(.code-block pre):is(:not(.prose *)) {
56
- @apply font-mono text-base bg-[#141517] text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
56
+ @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
57
57
  }
58
58
 
59
- code:not(.unstyled):not(.code-block code):not(article pre code):is(:not(.prose *)) {
60
- @apply font-mono text-xs text-primary-700 dark:text-primary-400;
59
+ code:not(.unstyled):is(:not(.prose *)):is(:not(pre *)) {
60
+ @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap;
61
61
  @apply bg-primary-500/30 dark:bg-primary-500/20;
62
62
  @apply py-0.5 px-1 rounded;
63
63
  }
@@ -84,10 +84,10 @@
84
84
  }
85
85
 
86
86
  ins {
87
- @apply bg-error-500 text-on-error-token;
87
+ @apply font-mono bg-success-500 text-on-success-token;
88
88
  }
89
89
  del {
90
- @apply bg-success-500 text-on-success-token;
90
+ @apply font-mono bg-error-500 text-on-error-token;
91
91
  }
92
92
 
93
93
  /* === Date/Time === */
@@ -33,25 +33,25 @@
33
33
  @apply bg-surface-900-50-token text-surface-50-900-token;
34
34
  }
35
35
  .variant-filled-primary {
36
- @apply bg-primary-500 dark:bg-primary-500 text-on-primary-token;
36
+ @apply bg-primary-500 dark:bg-primary-500 text-on-primary-token dark:text-on-primary-token;
37
37
  }
38
38
  .variant-filled-secondary {
39
- @apply bg-secondary-500 dark:bg-secondary-500 text-on-secondary-token;
39
+ @apply bg-secondary-500 dark:bg-secondary-500 text-on-secondary-token dark:text-on-secondary-token;
40
40
  }
41
41
  .variant-filled-tertiary {
42
- @apply bg-tertiary-500 dark:bg-tertiary-500 text-on-tertiary-token;
42
+ @apply bg-tertiary-500 dark:bg-tertiary-500 text-on-tertiary-token dark:text-on-tertiary-token;
43
43
  }
44
44
  .variant-filled-success {
45
- @apply bg-success-500 dark:bg-success-500 text-on-success-token;
45
+ @apply bg-success-500 dark:bg-success-500 text-on-success-token dark:text-on-success-token;
46
46
  }
47
47
  .variant-filled-warning {
48
- @apply bg-warning-500 dark:bg-warning-500 text-on-warning-token;
48
+ @apply bg-warning-500 dark:bg-warning-500 text-on-warning-token dark:text-on-warning-token;
49
49
  }
50
50
  .variant-filled-error {
51
- @apply bg-error-500 dark:bg-error-500 text-on-error-token;
51
+ @apply bg-error-500 dark:bg-error-500 text-on-error-token dark:text-on-error-token;
52
52
  }
53
53
  .variant-filled-surface {
54
- @apply bg-surface-400-500-token text-on-surface-token;
54
+ @apply bg-surface-400-500-token text-on-surface-token dark:text-on-surface-token;
55
55
  }
56
56
 
57
57
  /* Ringed */
package/tailwind/core.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // The Skeleton Tailwind Plugin
2
2
  // Tailwind Docs: https://tailwindcss.com/docs/plugins
3
- // Skeleton Docs: https://www.skeleton.dev/guides/tailwind
3
+ // Skeleton Docs: https://www.skeleton.dev/docs/get-started
4
4
 
5
5
  const plugin = require('tailwindcss/plugin');
6
6