@skeletonlabs/skeleton 1.2.5 → 1.5.1

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 (45) hide show
  1. package/dist/components/Accordion/Accordion.svelte +2 -1
  2. package/dist/components/Accordion/Accordion.svelte.d.ts +2 -0
  3. package/dist/components/AppRail/AppRail.svelte +1 -1
  4. package/dist/components/AppRail/AppRail.svelte.d.ts +3 -3
  5. package/dist/components/AppRail/AppRailTile.svelte +9 -2
  6. package/dist/components/AppRail/AppRailTile.svelte.d.ts +5 -5
  7. package/dist/components/Autocomplete/Autocomplete.svelte +4 -1
  8. package/dist/components/Autocomplete/Autocomplete.svelte.d.ts +5 -3
  9. package/dist/components/Avatar/Avatar.svelte +10 -1
  10. package/dist/components/Avatar/Avatar.svelte.d.ts +2 -0
  11. package/dist/components/ListBox/ListBoxItem.svelte +1 -1
  12. package/dist/components/Tab/Tab.svelte +33 -1
  13. package/dist/components/Tab/TabGroup.svelte +3 -1
  14. package/dist/utilities/CodeBlock/CodeBlock.svelte +12 -5
  15. package/dist/utilities/CodeBlock/CodeBlock.svelte.d.ts +2 -0
  16. package/dist/utilities/Drawer/Drawer.svelte +3 -2
  17. package/dist/utilities/Drawer/Drawer.svelte.d.ts +1 -1
  18. package/dist/utilities/LightSwitch/LightSwitch.svelte +8 -2
  19. package/dist/utilities/LocalStorageStore/LocalStorageStore.js +4 -4
  20. package/dist/utilities/Popup/popup.d.ts +2 -2
  21. package/dist/utilities/Popup/popup.js +163 -212
  22. package/dist/utilities/Popup/types.d.ts +20 -12
  23. package/dist/utilities/Popup/types.js +0 -1
  24. package/dist/utilities/Toast/Toast.svelte +2 -2
  25. package/dist/utilities/Toast/Toast.svelte.d.ts +1 -1
  26. package/package.json +4 -1
  27. package/src/lib/styles/all.css +21 -9
  28. package/src/lib/styles/elements/breadcrumbs.css +10 -0
  29. package/src/lib/styles/elements/codeblocks.css +16 -0
  30. package/src/lib/styles/elements/forms.css +15 -0
  31. package/src/lib/styles/elements/lists.css +2 -3
  32. package/src/lib/styles/elements/popups.css +2 -2
  33. package/src/lib/styles/partials/elements.css +20 -0
  34. package/src/lib/styles/{typography.css → partials/typography-next.css} +33 -35
  35. package/src/lib/styles/partials/typography-prose.css +51 -0
  36. package/src/lib/styles/partials/typography.css +99 -0
  37. package/src/lib/styles/{variants.css → partials/variants.css} +53 -5
  38. package/src/lib/styles/skeleton-minimal.css +30 -0
  39. package/src/lib/styles/skeleton.css +30 -0
  40. package/src/lib/tailwind/generated/intellisense-classes.cjs +1 -1
  41. package/src/lib/tailwind/intellisense.cjs +2 -2
  42. package/src/lib/styles/elements.css +0 -19
  43. package/src/lib/styles/highlight-js.css +0 -116
  44. /package/src/lib/styles/{core.css → partials/core.css} +0 -0
  45. /package/src/lib/styles/{tailwind.css → partials/tailwind.css} +0 -0
@@ -4,11 +4,11 @@
4
4
 
5
5
  [data-popup] {
6
6
  /* https://floating-ui.com/docs/computeposition#usage */
7
- @apply absolute top-0 left-0; /* max-w-max */
7
+ @apply absolute top-0 left-0;
8
8
  /* Set hidden on page load */
9
9
  @apply hidden;
10
10
  /* Transitions */
11
- @apply transition-opacity duration-200;
11
+ @apply transition-opacity duration-150;
12
12
  }
13
13
 
14
14
  [data-popup] .arrow {
@@ -0,0 +1,20 @@
1
+ /* Stylesheet: elements.css */
2
+ /* Import AFTER your theme, but BEFORE your global stylesheet. */
3
+ /* Recommended as the LAST stylesheet in the set */
4
+
5
+ @import '../elements/alerts.css';
6
+ @import '../elements/badges.css';
7
+ @import '../elements/breadcrumbs.css';
8
+ @import '../elements/buttons.css';
9
+ @import '../elements/cards.css';
10
+ @import '../elements/codeblocks.css';
11
+ @import '../elements/chips.css';
12
+ @import '../elements/forms.css';
13
+ @import '../elements/lists.css';
14
+ @import '../elements/logo-clouds.css';
15
+ @import '../elements/placeholders.css';
16
+ @import '../elements/tables.css';
17
+
18
+ /* Utilities */
19
+ @import '../elements/modals.css';
20
+ @import '../elements/popups.css';
@@ -1,64 +1,69 @@
1
- /* Stylesheet: typography.css */
1
+ /* Stylesheet: typography-next.css */
2
+
3
+ /*
4
+ This represents the OPT-IN typography styles.
5
+ IMPORTANT: take care to maintain parity with typography.css!
6
+ */
2
7
 
3
8
  @layer base {
4
9
  body {
5
- @apply font-token text-token;
10
+ @apply text-base font-token text-token;
6
11
  }
7
12
 
8
13
  /* === Headings === */
9
14
 
10
- h1:not(.unstyled):is(:not(.prose *)) {
15
+ .h1 {
11
16
  @apply font-heading-token text-3xl md:text-5xl;
12
17
  }
13
- h2:not(.unstyled):is(:not(.prose *)) {
18
+ .h2 {
14
19
  @apply font-heading-token text-2xl md:text-4xl;
15
20
  }
16
- h3:not(.unstyled):is(:not(.prose *)) {
21
+ .h3 {
17
22
  @apply font-heading-token text-xl md:text-2xl;
18
23
  }
19
- h4:not(.unstyled):is(:not(.prose *)) {
24
+ .h4 {
20
25
  @apply font-heading-token text-lg md:text-xl;
21
26
  }
22
- h5:not(.unstyled):is(:not(.prose *)) {
27
+ .h5 {
23
28
  @apply font-heading-token text-base md:text-lg;
24
29
  }
25
- h6:not(.unstyled):is(:not(.prose *)) {
30
+ .h6 {
26
31
  @apply font-heading-token text-sm md:text-base;
27
32
  }
28
33
 
29
34
  /* === Elements === */
30
35
 
31
- p:not(.unstyled):is(:not(.prose *)) {
32
- /* NOTE: do not hardcode a text color style here. It makes color overrides difficult. */
33
- @apply text-base;
34
- }
36
+ /* p { ... } */
35
37
 
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
- ) {
38
+ .anchor {
39
39
  @apply text-primary-700 dark:text-primary-500 hover:brightness-110 underline;
40
40
  }
41
41
 
42
- blockquote:not(.unstyled):is(:not(.prose *)) {
42
+ .blockquote {
43
43
  @apply text-token text-base italic border-l-8 border-l-secondary-500 px-4 pl-4;
44
44
  }
45
45
 
46
46
  /* Keyboard */
47
- kbd:not(.unstyled):is(:not(.prose *)) {
47
+ .kbd {
48
48
  @apply font-sans font-bold text-sm;
49
49
  @apply bg-surface-300-600-token px-1.5 py-[3px] rounded;
50
50
  @apply ring-[1px] ring-surface-900 ring-inset;
51
51
  @apply border-b-2 border-surface-900;
52
52
  }
53
53
 
54
- /* === Code Blocks === */
54
+ /* Timestamps */
55
+ .time {
56
+ @apply text-sm text-surface-500 dark:text-surface-400;
57
+ }
58
+
59
+ /* === Preformatted / Code === */
55
60
  /* For use outside of Skeleton's CodeBlock component */
56
61
 
57
- pre:not(.unstyled):not(.code-block pre):is(:not(.prose *)) {
62
+ .pre {
58
63
  @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
59
64
  }
60
65
 
61
- code:not(.unstyled):is(:not(.prose *)):is(:not(pre *)) {
66
+ .code {
62
67
  @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap;
63
68
  @apply bg-primary-500/30 dark:bg-primary-500/20;
64
69
  @apply py-0.5 px-1 rounded;
@@ -68,34 +73,27 @@
68
73
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins */
69
74
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del */
70
75
 
71
- ins:not(.unstyled):is(:not(.prose *)),
72
- del:not(.unstyled):is(:not(.prose *)) {
76
+ .ins,
77
+ .del {
73
78
  @apply block relative p-0.5 pl-5;
74
79
  text-decoration: none;
75
80
  }
76
81
 
77
- ins:not(.unstyled):is(:not(.prose *))::before,
78
- del:not(.unstyled):is(:not(.prose *))::before {
82
+ .ins::before,
83
+ .del::before {
79
84
  @apply absolute left-1 font-mono;
80
85
  }
81
- ins:not(.unstyled):is(:not(.prose *))::before {
86
+ .ins::before {
82
87
  content: '+';
83
88
  }
84
- del:not(.unstyled):is(:not(.prose *))::before {
89
+ .del::before {
85
90
  content: '−';
86
91
  }
87
92
 
88
- ins:not(.unstyled):is(:not(.prose *)) {
93
+ .ins {
89
94
  @apply font-mono bg-success-500 text-on-success-token;
90
95
  }
91
- del:not(.unstyled):is(:not(.prose *)) {
96
+ .del {
92
97
  @apply font-mono bg-error-500 text-on-error-token;
93
98
  }
94
-
95
- /* === Date/Time === */
96
- /* Useful for displaying timestamps */
97
-
98
- time:not(.unstyled):is(:not(.prose *)) {
99
- @apply text-sm text-surface-500 dark:text-surface-400;
100
- }
101
99
  }
@@ -0,0 +1,51 @@
1
+ /* Stylesheet: typography-prose.css */
2
+
3
+ /* Provides default styling for the Tailwind Typography plugin via element modifiers. */
4
+ /* https://tailwindcss.com/docs/typography-plugin */
5
+
6
+ @layer base {
7
+ .prose {
8
+ @apply text-base font-token text-token;
9
+ /* Element Modifiers */
10
+ /* https://tailwindcss.com/docs/typography-plugin#element-modifiers */
11
+ @apply prose-headings:text-token;
12
+ /* @apply prose-lead:{utility}; */
13
+ @apply prose-h1:font-heading-token prose-h1:text-3xl prose-h1:md:text-5xl;
14
+ @apply prose-h2:font-heading-token prose-h1:text-2xl prose-h1:md:text-4xl;
15
+ @apply prose-h3:font-heading-token prose-h1:text-xl prose-h1:md:text-2xl;
16
+ @apply prose-h4:font-heading-token prose-h1:text-lg prose-h1:md:text-xl;
17
+ @apply prose-p:text-base;
18
+ /* @apply prose-a:{utility}; */
19
+ @apply prose-a:text-primary-700 prose-a:dark:text-primary-500 prose-a:hover:brightness-110 prose-a:underline;
20
+ @apply prose-blockquote:text-token prose-blockquote:text-base prose-blockquote:!border-secondary-500;
21
+ /* @apply prose-figure:{utility}; */
22
+ @apply prose-figcaption:text-token prose-figcaption:!text-sm prose-figcaption:italic prose-figcaption:text-center mt-3;
23
+ @apply prose-strong:text-token;
24
+ @apply prose-em:text-token;
25
+ /* @apply prose-ol:{utility}; */
26
+ /* @apply prose-ul:{utility}; */
27
+ @apply prose-li:text-base;
28
+ /* @apply prose-table:{utility}; */
29
+ /* @apply prose-thead:{utility}; */
30
+ /* @apply prose-tr:{utility}; */
31
+ /* @apply prose-th:{utility}; */
32
+ /* @apply prose-td:{utility}; */
33
+ /* @apply prose-img:{utility}; */
34
+ /* @apply prose-video:{utility}; */
35
+ /* @apply prose-hr:{utility}; */
36
+
37
+ /* The following have special use cases and must be handled seperately */
38
+ /* @apply prose-code:{utility}; */
39
+ /* @apply prose-pre:{utility}; */
40
+ }
41
+
42
+ /* NOTE: keep these in sync with typography.css */
43
+ .prose pre:not(.code-block pre) {
44
+ @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
45
+ }
46
+ .prose code:is(:not(pre *)) {
47
+ @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap;
48
+ @apply bg-primary-500/30 dark:bg-primary-500/20;
49
+ @apply py-0.5 px-1 rounded;
50
+ }
51
+ }
@@ -0,0 +1,99 @@
1
+ /* Stylesheet: typography.css */
2
+
3
+ /*
4
+ This represents the ON-BY-DEFAULT typography styles.
5
+ IMPORTANT: take care to maintain parity with typography-next.css!
6
+ */
7
+
8
+ @layer base {
9
+ body {
10
+ @apply text-base font-token text-token;
11
+ }
12
+
13
+ /* === Headings === */
14
+
15
+ h1:not(.unstyled) {
16
+ @apply font-heading-token text-3xl md:text-5xl;
17
+ }
18
+ h2:not(.unstyled) {
19
+ @apply font-heading-token text-2xl md:text-4xl;
20
+ }
21
+ h3:not(.unstyled) {
22
+ @apply font-heading-token text-xl md:text-2xl;
23
+ }
24
+ h4:not(.unstyled) {
25
+ @apply font-heading-token text-lg md:text-xl;
26
+ }
27
+ h5:not(.unstyled) {
28
+ @apply font-heading-token text-base md:text-lg;
29
+ }
30
+ h6:not(.unstyled) {
31
+ @apply font-heading-token text-sm md:text-base;
32
+ }
33
+
34
+ /* === Elements === */
35
+
36
+ /* p { ... } */
37
+
38
+ a:not(.unstyled):not(.permalink):not(.btn):not(.btn-icon):not(.app-bar a):not(.logo-item):not(a.card):not(.list-nav a) {
39
+ @apply text-primary-700 dark:text-primary-500 hover:brightness-110 underline;
40
+ }
41
+
42
+ blockquote:not(.unstyled) {
43
+ @apply text-token text-base italic border-l-8 border-secondary-500 px-4 pl-4;
44
+ }
45
+
46
+ /* Keyboard */
47
+ kbd:not(.unstyled) {
48
+ @apply font-sans font-bold text-sm;
49
+ @apply bg-surface-300-600-token px-1.5 py-[3px] rounded;
50
+ @apply ring-[1px] ring-surface-900 ring-inset;
51
+ @apply border-b-2 border-surface-900;
52
+ }
53
+
54
+ /* Timestamps */
55
+ time:not(.unstyled) {
56
+ @apply text-sm text-surface-500 dark:text-surface-400;
57
+ }
58
+
59
+ /* === Preformatted / Code === */
60
+ /* For use outside of Skeleton's CodeBlock component */
61
+
62
+ pre:not(.unstyled):not(.code-block pre) {
63
+ @apply font-mono text-base bg-neutral-900/90 text-white p-4 whitespace-pre-wrap overflow-x-auto rounded-container-token;
64
+ }
65
+
66
+ code:not(.unstyled):is(:not(pre *)) {
67
+ @apply font-mono text-xs text-primary-700 dark:text-primary-400 whitespace-nowrap;
68
+ @apply bg-primary-500/30 dark:bg-primary-500/20;
69
+ @apply py-0.5 px-1 rounded;
70
+ }
71
+
72
+ /* === Insertions / Deletions ==== */
73
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins */
74
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del */
75
+
76
+ ins:not(.unstyled),
77
+ del:not(.unstyled) {
78
+ @apply block relative p-0.5 pl-5;
79
+ text-decoration: none;
80
+ }
81
+
82
+ ins:not(.unstyled)::before,
83
+ del:not(.unstyled)::before {
84
+ @apply absolute left-1 font-mono;
85
+ }
86
+ ins:not(.unstyled)::before {
87
+ content: '+';
88
+ }
89
+ del:not(.unstyled)::before {
90
+ content: '−';
91
+ }
92
+
93
+ ins:not(.unstyled) {
94
+ @apply font-mono bg-success-500 text-on-success-token;
95
+ }
96
+ del:not(.unstyled) {
97
+ @apply font-mono bg-error-500 text-on-error-token;
98
+ }
99
+ }
@@ -28,7 +28,8 @@
28
28
 
29
29
  /* ------------------------ */
30
30
 
31
- /* Filled */
31
+ /* === Filled === */
32
+
32
33
  .variant-filled {
33
34
  @apply bg-surface-900-50-token text-surface-50-900-token;
34
35
  }
@@ -54,7 +55,8 @@
54
55
  @apply bg-surface-400-500-token text-on-surface-token dark:text-on-surface-token;
55
56
  }
56
57
 
57
- /* Ringed */
58
+ /* === Ringed === */
59
+
58
60
  .variant-ringed {
59
61
  @apply bg-transparent dark:bg-transparent variant-outline;
60
62
  }
@@ -80,7 +82,8 @@
80
82
  @apply bg-transparent dark:bg-transparent variant-outline-surface;
81
83
  }
82
84
 
83
- /* Ghost */
85
+ /* === Ghost === */
86
+
84
87
  .variant-ghost-primary {
85
88
  @apply bg-primary-500/20 dark:bg-primary-500/20 variant-outline-primary;
86
89
  }
@@ -104,7 +107,8 @@
104
107
  @apply bg-surface-500/20 dark:bg-surface-500/20 variant-outline-surface;
105
108
  }
106
109
 
107
- /* Soft */
110
+ /* === Soft === */
111
+
108
112
  .variant-soft-primary {
109
113
  @apply bg-primary-400/20 dark:bg-primary-500/20 text-primary-700-200-token !ring-0;
110
114
  }
@@ -128,7 +132,8 @@
128
132
  @apply bg-surface-400/20 dark:bg-surface-500/20 text-surface-700-200-token !ring-0;
129
133
  }
130
134
 
131
- /* Glass */
135
+ /* === Glass === */
136
+
132
137
  .variant-glass-primary {
133
138
  @apply bg-primary-500/20 dark:bg-primary-500/20 backdrop-blur-lg;
134
139
  }
@@ -153,4 +158,47 @@
153
158
  .variant-glass {
154
159
  @apply bg-surface-50/30 dark:bg-surface-900/30 backdrop-blur-lg;
155
160
  }
161
+
162
+ /* === Gradients === */
163
+
164
+ /* Core Trio */
165
+ .variant-gradient-primary-secondary {
166
+ @apply from-primary-500 to-secondary-500 text-on-primary-token;
167
+ }
168
+ .variant-gradient-secondary-tertiary {
169
+ @apply from-secondary-500 to-tertiary-500 text-on-secondary-token;
170
+ }
171
+ .variant-gradient-tertiary-primary {
172
+ @apply from-tertiary-500 to-primary-500 text-on-tertiary-token;
173
+ }
174
+ /* Core Trio (reversed) */
175
+ .variant-gradient-secondary-primary {
176
+ @apply from-secondary-500 to-primary-500 text-on-secondary-token;
177
+ }
178
+ .variant-gradient-tertiary-secondary {
179
+ @apply from-tertiary-500 to-secondary-500 text-on-tertiary-token;
180
+ }
181
+ .variant-gradient-primary-tertiary {
182
+ @apply from-primary-500 to-tertiary-500 text-on-primary-token;
183
+ }
184
+ /* State Trio */
185
+ .variant-gradient-success-warning {
186
+ @apply from-success-500 to-warning-500 text-on-success-token;
187
+ }
188
+ .variant-gradient-warning-error {
189
+ @apply from-warning-500 to-error-500 text-on-secondary-token;
190
+ }
191
+ .variant-gradient-error-success {
192
+ @apply from-error-500 to-success-500 text-on-error-token;
193
+ }
194
+ /* State Trio (reversed) */
195
+ .variant-gradient-warning-success {
196
+ @apply from-warning-500 to-success-500 text-on-warning-token;
197
+ }
198
+ .variant-gradient-error-warning {
199
+ @apply from-error-500 to-warning-500 text-on-secondary-token;
200
+ }
201
+ .variant-gradient-success-error {
202
+ @apply from-success-500 to-error-500 text-on-success-token;
203
+ }
156
204
  }
@@ -0,0 +1,30 @@
1
+ /* Stylesheet: skeleton-minimal.css */
2
+
3
+ /*
4
+ - Only required stylesheets are provided.
5
+ - Optional stylesheets are not included.
6
+ - Typography using opt-in system
7
+ */
8
+
9
+ /* NOTE: The order shown below is required */
10
+ /* Import AFTER your theme, but BEFORE your global stylesheet. */
11
+
12
+ /* Tailwind Directives */
13
+ @import 'partials/tailwind.css';
14
+
15
+ /* === OPTIONAL STYLESHEETS === */
16
+
17
+ /* Core Styles */
18
+ /* (excluded - supplied by developer) */
19
+
20
+ /* Typography Settings */
21
+ @import 'partials/typography-next.css';
22
+ /* (prose excluded - supplied by developer) */
23
+
24
+ /* === REQUIRED STYLESHEETS === */
25
+
26
+ /* Imports all Tailwind Elements */
27
+ @import 'partials/elements.css';
28
+
29
+ /* Imports all Variant Styles */
30
+ @import 'partials/variants.css';
@@ -0,0 +1,30 @@
1
+ /* Stylesheet: skeleton.css */
2
+
3
+ /*
4
+ - Slated to replace `all.css` in the next major release
5
+ - All available stylesheets are imported
6
+ - Typography using opt-in system
7
+ */
8
+
9
+ /* NOTE: The order shown below is required */
10
+ /* Import AFTER your theme, but BEFORE your global stylesheet. */
11
+
12
+ /* Tailwind Directives */
13
+ @import 'partials/tailwind.css';
14
+
15
+ /* === OPTIONAL STYLESHEETS === */
16
+
17
+ /* Core Styles */
18
+ @import 'partials/core.css';
19
+
20
+ /* Typography Settings */
21
+ @import 'partials/typography-next.css';
22
+ @import 'partials/typography-prose.css';
23
+
24
+ /* === REQUIRED STYLESHEETS === */
25
+
26
+ /* Imports all Tailwind Elements */
27
+ @import 'partials/elements.css';
28
+
29
+ /* Imports all Variant Styles */
30
+ @import 'partials/variants.css';