@skeletonlabs/skeleton 0.92.2 → 0.99.5

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 (88) hide show
  1. package/components/Accordion/AccordionGroup.svelte +22 -35
  2. package/components/Accordion/AccordionItem.svelte +24 -40
  3. package/components/AppBar/AppBar.svelte +22 -38
  4. package/components/AppRail/AppRail.svelte +18 -39
  5. package/components/AppRail/AppRailTile.svelte +23 -37
  6. package/components/AppShell/AppShell.svelte +28 -38
  7. package/components/Avatar/Avatar.svelte +16 -33
  8. package/components/ConicGradient/ConicGradient.svelte +28 -44
  9. package/components/FileButton/FileButton.svelte +14 -11
  10. package/components/FileDropzone/FileDropzone.svelte +26 -46
  11. package/components/InputChip/InputChip.svelte +39 -69
  12. package/components/InputChip/InputChip.svelte.d.ts +0 -1
  13. package/components/ListBox/ListBox.svelte +27 -47
  14. package/components/ListBox/ListBoxItem.svelte +36 -52
  15. package/components/Paginator/Paginator.svelte +25 -41
  16. package/components/ProgressBar/ProgressBar.svelte +18 -30
  17. package/components/ProgressRadial/ProgressRadial.svelte +18 -36
  18. package/components/Radio/RadioGroup.svelte +23 -42
  19. package/components/Radio/RadioItem.svelte +24 -36
  20. package/components/RangeSlider/RangeSlider.svelte +17 -40
  21. package/components/SlideToggle/SlideToggle.svelte +42 -54
  22. package/components/Stepper/Step.svelte +57 -65
  23. package/components/Stepper/Stepper.svelte +30 -51
  24. package/components/SvgIcon/SvgIcon.svelte +11 -23
  25. package/components/Tab/Tab.svelte +30 -45
  26. package/components/Tab/TabGroup.svelte +30 -48
  27. package/components/Table/Table.svelte +20 -36
  28. package/components/TableOfContents/TableOfContents.svelte +62 -94
  29. package/index.d.ts +0 -5
  30. package/index.js +0 -5
  31. package/package.json +26 -25
  32. package/styles/all.css +3 -0
  33. package/styles/core.css +11 -2
  34. package/styles/elements/alerts.css +2 -28
  35. package/styles/elements/badges.css +0 -25
  36. package/styles/elements/breadcrumbs.css +3 -3
  37. package/styles/elements/buttons.css +32 -117
  38. package/styles/elements/cards.css +2 -29
  39. package/styles/elements/chips.css +9 -58
  40. package/styles/elements/lists.css +4 -3
  41. package/styles/elements/logo-clouds.css +2 -4
  42. package/styles/elements/tables.css +14 -10
  43. package/styles/forms.css +130 -113
  44. package/styles/tailwind.css +7 -3
  45. package/styles/typography.css +46 -62
  46. package/styles/variants.css +154 -0
  47. package/tailwind/core.cjs +37 -0
  48. package/tailwind/core.d.cts +5 -0
  49. package/tailwind/generated/intellisense-classes.cjs +1 -0
  50. package/tailwind/generated/{allComponents.d.cts → intellisense-classes.d.cts} +731 -931
  51. package/tailwind/intellisense.cjs +21 -0
  52. package/tailwind/intellisense.d.cts +5 -0
  53. package/tailwind/settings.cjs +16 -16
  54. package/tailwind/skeleton.cjs +13 -44
  55. package/tailwind/skeleton.d.cts +4 -2
  56. package/tailwind/theme/colors.cjs +7 -7
  57. package/tailwind/tokens/backgrounds.cjs +28 -30
  58. package/tailwind/tokens/border-radius.cjs +15 -15
  59. package/tailwind/tokens/borders.cjs +14 -14
  60. package/tailwind/tokens/fills.cjs +14 -14
  61. package/tailwind/tokens/rings.cjs +40 -32
  62. package/tailwind/tokens/rings.d.cts +5 -0
  63. package/tailwind/tokens/text.cjs +24 -26
  64. package/themes/theme-skeleton.css +6 -6
  65. package/utilities/CodeBlock/CodeBlock.svelte +26 -40
  66. package/utilities/DataTable/DataTable.js +1 -1
  67. package/utilities/Drawer/Drawer.svelte +82 -105
  68. package/utilities/LightSwitch/LightSwitch.svelte +32 -50
  69. package/utilities/LightSwitch/LightSwitch.svelte.d.ts +1 -1
  70. package/utilities/Modal/Modal.svelte +57 -92
  71. package/utilities/Modal/examples/ModalExampleEmbed.svelte +3 -6
  72. package/utilities/Modal/examples/ModalExampleForm.svelte +13 -19
  73. package/utilities/Modal/examples/ModalExampleImage.svelte +19 -0
  74. package/utilities/Modal/examples/ModalExampleImage.svelte.d.ts +16 -0
  75. package/utilities/Modal/examples/ModalExampleList.svelte +7 -10
  76. package/utilities/Toast/Toast.svelte +64 -86
  77. package/utilities/Toast/stores.js +13 -4
  78. package/components/Alert/Alert.svelte +0 -65
  79. package/components/Alert/Alert.svelte.d.ts +0 -30
  80. package/components/Breadcrumb/Breadcrumb.svelte +0 -24
  81. package/components/Breadcrumb/Breadcrumb.svelte.d.ts +0 -21
  82. package/components/Breadcrumb/Crumb.svelte +0 -37
  83. package/components/Breadcrumb/Crumb.svelte.d.ts +0 -26
  84. package/components/Divider/Divider.svelte +0 -21
  85. package/components/Divider/Divider.svelte.d.ts +0 -22
  86. package/components/GradientHeading/GradientHeading.svelte +0 -21
  87. package/components/GradientHeading/GradientHeading.svelte.d.ts +0 -22
  88. package/tailwind/generated/allComponents.cjs +0 -1
package/styles/forms.css CHANGED
@@ -1,178 +1,195 @@
1
1
  /* Stylesheet: forms.css */
2
2
 
3
3
  @layer base {
4
- /* === Fieldset === */
5
-
6
- fieldset:not(.unstyled) {
4
+ fieldset {
7
5
  @apply block;
8
6
  }
9
7
 
10
8
  /* === Labels === */
11
9
 
12
- label:not(.unstyled) {
10
+ legend {
11
+ @apply font-heading-token text-xl md:text-2xl;
12
+ }
13
+
14
+ label {
13
15
  @apply block overflow-visible;
14
16
  }
15
- label:not(.unstyled) span,
16
- legend:not(.unstyled) {
17
- @apply block text-surface-700 dark:text-surface-300 text-sm mb-2;
17
+ .input-label {
18
+ @apply space-y-2;
18
19
  }
19
20
 
20
21
  /* === Inputs === */
21
22
 
22
- input:disabled,
23
- textarea:disabled,
24
- select:disabled {
25
- @apply !opacity-50 !cursor-not-allowed active:scale-100 hover:brightness-100;
26
- }
27
-
28
- /* Inputs */
29
- [type='text']:not(.unstyled),
30
- [type='email']:not(.unstyled),
31
- [type='url']:not(.unstyled),
32
- [type='password']:not(.unstyled),
33
- [type='number']:not(.unstyled),
34
- [type='date']:not(.unstyled),
35
- [type='datetime-local']:not(.unstyled),
36
- [type='month']:not(.unstyled),
37
- [type='search']:not(.unstyled),
38
- [type='tel']:not(.unstyled),
39
- [type='time']:not(.unstyled),
40
- [type='week']:not(.unstyled),
41
- [type='file']:not(.unstyled),
42
- [multiple]:not(.unstyled),
43
- textarea:not(.unstyled),
44
- select:not(.unstyled),
45
- .input-chip {
46
- /* Base */
47
- @apply w-full caret-secondary-500 transition duration-200;
48
- /* Text */
49
- @apply text-black dark:text-white;
23
+ .input-cell {
24
+ @apply w-full rounded-token;
50
25
  /* Background */
51
- @apply bg-surface-200-700-token hover:brightness-110;
26
+ @apply bg-surface-200-700-token focus:brightness-105 hover:brightness-105;
52
27
  /* Border */
53
- @apply border-token border-surface-400-500-token focus:border-secondary-500;
54
- /* Ring - NOTE: we use border instead */
55
- @apply ring-0;
56
- /* Shadow */
57
- @apply shadow-sm;
58
- /* Theme: Rounded */
59
- @apply rounded-token;
28
+ @apply ring-0 border-token border-surface-400-500-token focus:border-primary-500;
29
+ /* Transition */
30
+ @apply transition;
31
+ }
32
+
33
+ /* Input Groups */
34
+ .input-group {
35
+ @apply input-cell;
36
+ @apply overflow-hidden grid focus-within:border-primary-500;
37
+ }
38
+ .input-group input,
39
+ .input-group select {
40
+ @apply bg-transparent border-0 !ring-0;
41
+ }
42
+ .input-group div,
43
+ .input-group button,
44
+ .input-group a {
45
+ @apply p-4 py-2 place-self-center;
46
+ }
47
+ .input-group-divider * + * {
48
+ @apply !border-l border-surface-400-500-token focus:border-surface-400-500-token;
49
+ }
50
+ .input-group-shim {
51
+ @apply bg-surface-400/10 text-surface-600-300-token;
52
+ }
53
+
54
+ /* Apply the input styles by default, but exclude if wrapped in `.input-group` */
55
+ input:not([type='checkbox']):not([type='radio']):not([type='color']):not(.unstyled):is(:not(.input-group *)),
56
+ select[multiple]:not(.unstyled):is(:not(.input-group *)),
57
+ textarea:not(.unstyled):is(:not(.input-group *)),
58
+ select:not(.unstyled):is(:not(.input-group *)) {
59
+ @apply input-cell;
60
60
  }
61
61
 
62
- [multiple]:not(.unstyled),
63
- textarea:not(.unstyled) {
64
- /* Theme: Rounded */
62
+ /* Container Inputs */
63
+ select[multiple]:not(.unstyled):is(:not(.input-group *)),
64
+ textarea:not(.unstyled):is(:not(.input-group *)) {
65
65
  @apply rounded-container-token;
66
66
  }
67
67
 
68
- /* File */
69
- [type='file']:not(.unstyled) {
70
- @apply p-2;
68
+ /* Select (multipe) */
69
+ /* https://stackoverflow.com/questions/50618602/change-color-of-selected-option-in-select-multiple */
70
+ select[multiple]:not(.unstyled):is(:not(.input-group *)) {
71
+ @apply p-2 space-y-1;
72
+ }
73
+ select[multiple]:not(.unstyled):is(:not(.input-group *)) option {
74
+ @apply p-2 rounded-token;
75
+ }
76
+ select[multiple]:not(.unstyled):is(:not(.input-group *)) option:checked {
77
+ background: rgb(var(--color-primary-500)) linear-gradient(0deg, rgb(var(--color-primary-500)) 0%, rgb(var(--color-primary-500)) 100%);
78
+ @apply text-on-primary-token;
71
79
  }
72
80
 
73
- /* Date Calendar Picker (Webkit) */
74
- ::-webkit-calendar-picker-indicator {
75
- @apply dark:invert;
81
+ /* File Input */
82
+ [type='file']:not(.unstyled):is(:not(.input-group *)) {
83
+ @apply p-1;
76
84
  }
77
85
 
78
- /* Checkbox */
79
- [type='checkbox']:not(.unstyled),
80
- [type='radio']:not(.unstyled) {
81
- @apply border-surface-500 rounded text-secondary-600 focus:ring-secondary-500 w-5 h-5;
86
+ /* Checkbox & Radio */
87
+ [type='checkbox']:not(.unstyled):is(:not(.input-group *)),
88
+ [type='radio']:not(.unstyled):is(:not(.input-group *)) {
89
+ @apply rounded text-secondary-600 focus:ring-secondary-500 w-5 h-5 cursor-pointer;
82
90
  }
83
- /* Checkbox */
84
- [type='radio']:not(.unstyled) {
91
+ [type='radio']:not(.unstyled):is(:not(.input-group *)) {
85
92
  @apply rounded-token;
86
93
  }
87
94
 
88
95
  /* Color Picker */
89
96
  /* https://stackoverflow.com/questions/11167281/webkit-css-to-control-the-box-around-the-color-in-an-inputtype-color */
90
- input[type='color'] {
97
+ input[type='color']:not(.unstyled):is(:not(.input-group *)) {
91
98
  @apply border-none w-10 h-10 overflow-hidden rounded-token cursor-pointer;
92
- /* WebKit */
99
+ /* WebKit Only */
93
100
  -webkit-appearance: none;
94
101
  }
95
- input[type='color']::-webkit-color-swatch-wrapper {
102
+ input[type='color']:not(.unstyled):is(:not(.input-group *))::-webkit-color-swatch-wrapper {
96
103
  @apply p-0;
97
104
  }
98
- input[type='color']::-webkit-color-swatch {
99
- @apply border-none;
105
+ input[type='color']:not(.unstyled):is(:not(.input-group *))::-webkit-color-swatch {
106
+ @apply border-none hover:brightness-110;
100
107
  }
101
- input[type='color']::-moz-color-swatch {
108
+ input[type='color']:not(.unstyled):is(:not(.input-group *))::-moz-color-swatch {
102
109
  @apply border-none;
103
110
  }
104
111
 
105
- /* Placeholder */
106
- ::-moz-placeholder,
107
- textarea::-moz-placeholder {
108
- @apply text-surface-600 dark:text-surface-300;
112
+ /* === Placeholder === */
113
+
114
+ ::-moz-placeholder {
115
+ @apply text-surface-500-400-token;
109
116
  }
110
- :-ms-input-placeholder,
111
- textarea:-ms-input-placeholder {
112
- @apply text-surface-600 dark:text-surface-300;
117
+ :-ms-input-placeholder {
118
+ @apply text-surface-500-400-token;
113
119
  }
114
- ::placeholder,
115
- textarea::placeholder {
116
- @apply text-surface-600 dark:text-surface-300;
120
+ ::placeholder {
121
+ @apply text-surface-500-400-token;
122
+ }
123
+
124
+ /* === Accent Color === */
125
+ /* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */
126
+
127
+ [type='range']:not(.range-input) {
128
+ @apply w-full accent-secondary-500;
117
129
  }
118
130
 
119
131
  /* === States === */
120
- /* These are not required to use, merely an option */
121
132
 
122
- /* Valid */
123
- .input-valid {
133
+ input:disabled,
134
+ textarea:disabled,
135
+ select:disabled {
136
+ @apply !opacity-50 !cursor-not-allowed hover:!brightness-100;
137
+ }
138
+
139
+ input[readonly],
140
+ textarea[readonly],
141
+ select[readonly] {
142
+ @apply !border-0 !cursor-not-allowed hover:!brightness-100;
143
+ }
144
+
145
+ /* === Vendor-Specific === */
146
+
147
+ /* Date Calendar Picker (Webkit) */
148
+ ::-webkit-calendar-picker-indicator {
149
+ @apply dark:invert;
150
+ }
151
+
152
+ /* === Utility Classes === */
153
+
154
+ /* success */
155
+ .input-success {
124
156
  @apply !bg-success-200 !border-success-500 !text-success-700;
125
157
  }
126
- .input-valid::-moz-placeholder,
127
- textarea::-moz-placeholder {
158
+ .input-success::-moz-placeholder {
128
159
  @apply text-success-700;
129
160
  }
130
- .input-valid:-ms-input-placeholder,
131
- textarea:-ms-input-placeholder {
161
+ .input-success:-ms-input-placeholder {
132
162
  @apply text-success-700;
133
163
  }
134
- .input-valid::placeholder,
135
- textarea::placeholder {
164
+ .input-success::placeholder {
136
165
  @apply text-success-700;
137
166
  }
138
167
 
139
- /* Invalid */
140
- .input-invalid {
141
- @apply !bg-error-200 !border-error-500 !text-error-500;
168
+ /* warning */
169
+ .input-warning {
170
+ @apply !bg-warning-200 !border-warning-500 !text-warning-700;
142
171
  }
143
- .input-invalid::-moz-placeholder,
144
- textarea::-moz-placeholder {
145
- @apply text-error-500;
172
+ .input-warning::-moz-placeholder {
173
+ @apply text-warning-700;
146
174
  }
147
- .input-invalid:-ms-input-placeholder,
148
- textarea:-ms-input-placeholder {
149
- @apply text-error-500;
175
+ .input-warning:-ms-input-placeholder {
176
+ @apply text-warning-700;
150
177
  }
151
- .input-invalid::placeholder,
152
- textarea::placeholder {
153
- @apply text-error-500;
178
+ .input-warning::placeholder {
179
+ @apply text-warning-700;
154
180
  }
155
181
 
156
- /* === Placeholders === */
157
- /* Input `placeholder="x"` attribute text color. */
158
-
159
- input::-moz-placeholder,
160
- textarea::-moz-placeholder {
161
- @apply text-surface-400;
182
+ /* error */
183
+ .input-error {
184
+ @apply !bg-error-200 !border-error-500 !text-error-500;
162
185
  }
163
- input:-ms-input-placeholder,
164
- textarea:-ms-input-placeholder {
165
- @apply text-surface-400;
186
+ .input-error::-moz-placeholder {
187
+ @apply text-error-500;
166
188
  }
167
- input::placeholder,
168
- textarea::placeholder {
169
- @apply text-surface-400;
189
+ .input-error:-ms-input-placeholder {
190
+ @apply text-error-500;
170
191
  }
171
-
172
- /* === Accent Color === */
173
- /* https://developer.mozilla.org/en-US/docs/Web/CSS/accent-color */
174
-
175
- [type='range']:not(.range-input) {
176
- @apply w-full accent-secondary-500;
192
+ .input-error::placeholder {
193
+ @apply text-error-500;
177
194
  }
178
195
  }
@@ -1,9 +1,13 @@
1
1
  /* Stylesheet: tailwind.css */
2
2
 
3
- /*
3
+ /*
4
+ https://tailwindcss.com/docs/functions-and-directives
5
+
6
+ IMPORTANT:
7
+ Be sure to remove these directives from your global CSS stylesheet.
8
+
4
9
  Tailwind directives should only be included ONCE per project.
5
- These directives should proceed all Skeleton Tailwind Element stylesheets.
6
- Remove these directives from your global CSS file if you use this stylesheet.
10
+ These directives should proceed ALL Skeleton stylesheets.
7
11
  */
8
12
 
9
13
  @tailwind base;
@@ -1,115 +1,99 @@
1
1
  /* Stylesheet: typography.css */
2
2
 
3
- body {
4
- /* Theme: Font Family */
5
- @apply font-token;
6
- /* Theme: Font Color */
7
- @apply text-token;
8
- }
9
-
10
3
  @layer base {
11
- /* === Headings === */
12
-
13
- h1,
14
- h2,
15
- h3,
16
- h4,
17
- h5,
18
- h6 {
19
- /* Theme: Font Family */
20
- @apply font-heading-token;
4
+ body {
5
+ @apply font-token text-token;
21
6
  }
22
7
 
23
- h1 {
24
- @apply text-3xl md:text-5xl;
8
+ /* === Headings === */
9
+
10
+ h1:not(.unstyled):is(:not(.prose *)) {
11
+ @apply font-heading-token text-3xl md:text-5xl;
25
12
  }
26
- h2 {
27
- @apply text-2xl md:text-3xl;
13
+ h2:not(.unstyled):is(:not(.prose *)) {
14
+ @apply font-heading-token text-2xl md:text-3xl;
28
15
  }
29
- h3 {
30
- @apply text-xl md:text-2xl;
16
+ h3:not(.unstyled):is(:not(.prose *)) {
17
+ @apply font-heading-token text-xl md:text-2xl;
31
18
  }
32
- h4 {
33
- @apply text-lg md:text-xl;
19
+ h4:not(.unstyled):is(:not(.prose *)) {
20
+ @apply font-heading-token text-lg md:text-xl;
34
21
  }
35
- h5 {
36
- @apply text-base md:text-lg;
22
+ h5:not(.unstyled):is(:not(.prose *)) {
23
+ @apply font-heading-token text-base md:text-lg;
37
24
  }
38
- h6 {
39
- @apply text-sm md:text-base;
25
+ h6:not(.unstyled):is(:not(.prose *)) {
26
+ @apply font-heading-token text-sm md:text-base;
40
27
  }
41
28
 
42
29
  /* === Elements === */
43
30
 
44
- p:not(.unstyled) {
31
+ p:not(.unstyled):is(:not(.prose *)) {
32
+ /* NOTE: do not hardcode a text color style here. It makes color overrides difficult. */
45
33
  @apply text-base;
46
- /* Theme: Font Color */
47
- @apply text-token;
48
34
  }
49
35
 
50
- a:not(.unstyled):not(.btn):not(.btn-icon):not(.app-bar a):not(.logo-item):not(.card):not(.list-nav a) {
51
- @apply text-primary-700 dark:text-primary-500 underline underline-offset-4 decoration-dotted decoration-primary-500/20 hover:decoration-primary-500;
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) {
37
+ @apply text-primary-700 dark:text-primary-500 hover:brightness-110 underline;
52
38
  }
53
39
 
54
- blockquote:not(.unstyled) {
55
- @apply text-base border-l-4 border-l-secondary-500 px-4 pl-4;
56
- /* Theme: Font Color */
57
- @apply text-token;
40
+ blockquote:not(.unstyled):is(:not(.prose *)) {
41
+ @apply text-token text-base italic border-l-8 border-l-secondary-500 px-4 pl-4;
58
42
  }
59
43
 
60
44
  /* Keyboard */
61
- kbd:not(.unstyled) {
62
- @apply !font-sans font-bold text-xs bg-surface-200-700-token border-b-[2px] border-surface-400-500-token ring-[1px] ring-surface-400-500-token px-1.5 py-0.5 rounded;
45
+ kbd:not(.unstyled):is(:not(.prose *)) {
46
+ @apply font-sans font-bold text-sm;
47
+ @apply bg-surface-300-600-token px-1.5 py-[3px] rounded;
48
+ @apply ring-[1px] ring-surface-900 ring-inset;
49
+ @apply border-b-2 border-surface-900;
63
50
  }
64
51
 
65
52
  /* === Code Blocks === */
66
53
  /* For use outside of Skeleton's CodeBlock component */
67
54
 
68
- pre:not(.unstyled):not(.code-block pre) {
69
- @apply font-mono text-base bg-[#141517] text-white p-4 whitespace-pre-wrap overflow-x-auto;
70
- /* Theme: Rounded */
71
- @apply rounded-container-token;
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;
72
57
  }
73
58
 
74
- code:not(.unstyled):not(.code-block code):not(article pre code) {
75
- @apply !font-mono text-black dark:text-primary-400 bg-primary-500/20 dark:bg-primary-500/10 text-xs md:text-[13px] py-1 px-2;
76
- /* Theme: Font Family */
77
- @apply font-token;
78
- /* Theme: Rounded */
79
- @apply rounded;
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;
61
+ @apply bg-primary-500/30 dark:bg-primary-500/20;
62
+ @apply py-0.5 px-1 rounded;
80
63
  }
81
64
 
82
65
  /* === Insertions / Deletions ==== */
83
66
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins */
84
67
  /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del */
85
68
 
86
- del,
87
- ins {
88
- @apply block relative pl-5;
69
+ ins,
70
+ del {
71
+ @apply block relative p-0.5 pl-5;
89
72
  text-decoration: none;
90
73
  }
91
- del::before,
92
- ins::before {
93
- @apply absolute left-1 font-mono;
94
- }
95
74
 
75
+ ins::before,
96
76
  del::before {
97
- content: '−';
77
+ @apply absolute left-1 font-mono;
98
78
  }
99
79
  ins::before {
100
80
  content: '+';
101
81
  }
102
-
103
- del {
104
- @apply bg-success-500 text-on-success-token;
82
+ del::before {
83
+ content: '−';
105
84
  }
85
+
106
86
  ins {
107
87
  @apply bg-error-500 text-on-error-token;
108
88
  }
89
+ del {
90
+ @apply bg-success-500 text-on-success-token;
91
+ }
109
92
 
110
93
  /* === Date/Time === */
94
+ /* Useful for displaying timestamps */
111
95
 
112
- time {
96
+ time:not(.unstyled):is(:not(.prose *)) {
113
97
  @apply text-sm text-surface-500 dark:text-surface-400;
114
98
  }
115
99
  }
@@ -0,0 +1,154 @@
1
+ /* === Variants === */
2
+ /* A canned set of reusabled variant styles. */
3
+
4
+ @layer components {
5
+ /* Outline -- supports ringed and host variants */
6
+ .variant-outline-primary {
7
+ @apply ring-[1px] ring-primary-500 dark:ring-primary-500 ring-inset;
8
+ }
9
+ .variant-outline-secondary {
10
+ @apply ring-[1px] ring-secondary-500 dark:ring-secondary-500 ring-inset;
11
+ }
12
+ .variant-outline-tertiary {
13
+ @apply ring-[1px] ring-tertiary-500 dark:ring-tertiary-500 ring-inset;
14
+ }
15
+ .variant-outline-success {
16
+ @apply ring-[1px] ring-success-500 dark:ring-success-500 ring-inset;
17
+ }
18
+ .variant-outline-warning {
19
+ @apply ring-[1px] ring-warning-500 dark:ring-warning-500 ring-inset;
20
+ }
21
+ .variant-outline-error {
22
+ @apply ring-[1px] ring-error-500 dark:ring-error-500 ring-inset;
23
+ }
24
+ .variant-outline,
25
+ .variant-outline-surface {
26
+ @apply ring-[1px] ring-surface-500 dark:ring-surface-500 ring-inset;
27
+ }
28
+
29
+ /* ------------------------ */
30
+
31
+ /* Filled */
32
+ .variant-filled {
33
+ @apply bg-surface-900-50-token text-surface-50-900-token;
34
+ }
35
+ .variant-filled-primary {
36
+ @apply bg-primary-500 dark:bg-primary-500 text-on-primary-token;
37
+ }
38
+ .variant-filled-secondary {
39
+ @apply bg-secondary-500 dark:bg-secondary-500 text-on-secondary-token;
40
+ }
41
+ .variant-filled-tertiary {
42
+ @apply bg-tertiary-500 dark:bg-tertiary-500 text-on-tertiary-token;
43
+ }
44
+ .variant-filled-success {
45
+ @apply bg-success-500 dark:bg-success-500 text-on-success-token;
46
+ }
47
+ .variant-filled-warning {
48
+ @apply bg-warning-500 dark:bg-warning-500 text-on-warning-token;
49
+ }
50
+ .variant-filled-error {
51
+ @apply bg-error-500 dark:bg-error-500 text-on-error-token;
52
+ }
53
+ .variant-filled-surface {
54
+ @apply bg-surface-400-500-token text-on-surface-token;
55
+ }
56
+
57
+ /* Ringed */
58
+ .variant-ringed {
59
+ @apply bg-transparent dark:bg-transparent variant-outline;
60
+ }
61
+ .variant-ringed-primary {
62
+ @apply bg-transparent dark:bg-transparent variant-outline-primary;
63
+ }
64
+ .variant-ringed-secondary {
65
+ @apply bg-transparent dark:bg-transparent variant-outline-secondary;
66
+ }
67
+ .variant-ringed-tertiary {
68
+ @apply bg-transparent dark:bg-transparent variant-outline-tertiary;
69
+ }
70
+ .variant-ringed-success {
71
+ @apply bg-transparent dark:bg-transparent variant-outline-success;
72
+ }
73
+ .variant-ringed-warning {
74
+ @apply bg-transparent dark:bg-transparent variant-outline-warning;
75
+ }
76
+ .variant-ringed-error {
77
+ @apply bg-transparent dark:bg-transparent variant-outline-error;
78
+ }
79
+ .variant-ringed-surface {
80
+ @apply bg-transparent dark:bg-transparent variant-outline-surface;
81
+ }
82
+
83
+ /* Ghost */
84
+ .variant-ghost-primary {
85
+ @apply bg-primary-500/20 dark:bg-primary-500/20 variant-outline-primary;
86
+ }
87
+ .variant-ghost-secondary {
88
+ @apply bg-secondary-500/20 dark:bg-secondary-500/20 variant-outline-secondary;
89
+ }
90
+ .variant-ghost-tertiary {
91
+ @apply bg-tertiary-500/20 dark:bg-tertiary-500/20 variant-outline-tertiary;
92
+ }
93
+ .variant-ghost-success {
94
+ @apply bg-success-500/20 dark:bg-success-500/20 variant-outline-success;
95
+ }
96
+ .variant-ghost-warning {
97
+ @apply bg-warning-500/20 dark:bg-warning-500/20 variant-outline-warning;
98
+ }
99
+ .variant-ghost-error {
100
+ @apply bg-error-500/20 dark:bg-error-500/20 variant-outline-error;
101
+ }
102
+ .variant-ghost,
103
+ .variant-ghost-surface {
104
+ @apply bg-surface-500/20 dark:bg-surface-500/20 variant-outline-surface;
105
+ }
106
+
107
+ /* Soft */
108
+ .variant-soft-primary {
109
+ @apply bg-primary-400/20 dark:bg-primary-500/20 text-primary-700-200-token !ring-0;
110
+ }
111
+ .variant-soft-secondary {
112
+ @apply bg-secondary-400/20 dark:bg-secondary-500/20 text-secondary-700-200-token !ring-0;
113
+ }
114
+ .variant-soft-tertiary {
115
+ @apply bg-tertiary-400/20 dark:bg-tertiary-500/20 text-tertiary-700-200-token !ring-0;
116
+ }
117
+ .variant-soft-success {
118
+ @apply bg-success-400/20 dark:bg-success-500/20 text-success-700-200-token !ring-0;
119
+ }
120
+ .variant-soft-warning {
121
+ @apply bg-warning-400/20 dark:bg-warning-500/20 text-warning-700-200-token !ring-0;
122
+ }
123
+ .variant-soft-error {
124
+ @apply bg-error-400/20 dark:bg-error-500/20 text-error-700-200-token !ring-0;
125
+ }
126
+ .variant-soft,
127
+ .variant-soft-surface {
128
+ @apply bg-surface-400/20 dark:bg-surface-500/20 text-surface-700-200-token !ring-0;
129
+ }
130
+
131
+ /* Glass */
132
+ .variant-glass-primary {
133
+ @apply bg-primary-500/20 dark:bg-primary-500/20 backdrop-blur-lg;
134
+ }
135
+ .variant-glass-secondary {
136
+ @apply bg-secondary-500/20 dark:bg-secondary-500/20 backdrop-blur-lg;
137
+ }
138
+ .variant-glass-tertiary {
139
+ @apply bg-tertiary-500/20 dark:bg-tertiary-500/20 backdrop-blur-lg;
140
+ }
141
+ .variant-glass-success {
142
+ @apply bg-success-500/20 dark:bg-success-500/20 backdrop-blur-lg;
143
+ }
144
+ .variant-glass-warning {
145
+ @apply bg-warning-500/20 dark:bg-warning-500/20 backdrop-blur-lg;
146
+ }
147
+ .variant-glass-error {
148
+ @apply bg-error-500/20 dark:bg-error-500/20 backdrop-blur-lg;
149
+ }
150
+ .variant-glass,
151
+ .variant-glass-surface {
152
+ @apply bg-surface-500/20 dark:bg-surface-500/20 backdrop-blur-lg;
153
+ }
154
+ }
@@ -0,0 +1,37 @@
1
+ // The Skeleton Tailwind Plugin
2
+ // Tailwind Docs: https://tailwindcss.com/docs/plugins
3
+ // Skeleton Docs: https://www.skeleton.dev/guides/tailwind
4
+
5
+ const plugin = require('tailwindcss/plugin');
6
+
7
+ // Skeleton Theme Modules
8
+ const themeColors = require('./theme/colors.cjs');
9
+ // Skeleton Design Token Modules
10
+ const tokensBackgrounds = require('./tokens/backgrounds.cjs');
11
+ const tokensBorders = require('./tokens/borders.cjs');
12
+ const tokensBorderRadius = require('./tokens/border-radius.cjs');
13
+ const tokensFills = require('./tokens/fills.cjs');
14
+ const tokensText = require('./tokens/text.cjs');
15
+ const tokensRings = require('./tokens/rings.cjs');
16
+
17
+ module.exports = plugin(
18
+ ({ addUtilities }) => {
19
+ addUtilities({
20
+ // Implement Skeleton design token classes
21
+ ...tokensBackgrounds(),
22
+ ...tokensBorders(),
23
+ ...tokensBorderRadius(),
24
+ ...tokensFills(),
25
+ ...tokensText(),
26
+ ...tokensRings()
27
+ });
28
+ },
29
+ {
30
+ theme: {
31
+ extend: {
32
+ // Implement Skeleton theme colors
33
+ colors: themeColors()
34
+ }
35
+ }
36
+ }
37
+ );
@@ -0,0 +1,5 @@
1
+ declare const _exports: {
2
+ handler: import("tailwindcss/types/config.js").PluginCreator;
3
+ config?: Partial<import("tailwindcss/types/config.js").Config> | undefined;
4
+ };
5
+ export = _exports;