@duskmoon-dev/core 0.1.0 → 1.1.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 (86) hide show
  1. package/README.md +366 -78
  2. package/dist/components/accordion.css +244 -0
  3. package/dist/components/alert.css +199 -0
  4. package/dist/components/appbar.css +308 -0
  5. package/dist/components/autocomplete.css +269 -0
  6. package/dist/components/avatar.css +167 -0
  7. package/dist/components/badge.css +178 -0
  8. package/dist/components/bottom-navigation.css +263 -0
  9. package/dist/components/bottomsheet.css +334 -0
  10. package/dist/components/button.css +474 -0
  11. package/dist/components/card.css +220 -0
  12. package/dist/components/chip.css +211 -0
  13. package/dist/components/collapse.css +254 -0
  14. package/dist/components/datepicker.css +347 -0
  15. package/dist/components/dialog.css +173 -0
  16. package/dist/components/divider.css +284 -0
  17. package/dist/components/drawer.css +371 -0
  18. package/dist/components/file-upload.css +321 -0
  19. package/dist/components/form.css +441 -0
  20. package/dist/components/index.css +9994 -0
  21. package/dist/components/input.css +240 -0
  22. package/dist/components/list.css +188 -0
  23. package/dist/components/markdown-body.css +405 -0
  24. package/dist/components/modal.css +291 -0
  25. package/dist/components/navigation.css +392 -0
  26. package/dist/components/popover.css +326 -0
  27. package/dist/components/progress.css +238 -0
  28. package/dist/components/rating.css +230 -0
  29. package/dist/components/skeleton.css +216 -0
  30. package/dist/components/slider.css +327 -0
  31. package/dist/components/snackbar.css +311 -0
  32. package/dist/components/stepper.css +313 -0
  33. package/dist/components/switch.css +277 -0
  34. package/dist/components/table.css +199 -0
  35. package/dist/components/timeline.css +353 -0
  36. package/dist/components/toast.css +251 -0
  37. package/dist/components/tooltip.css +284 -0
  38. package/dist/esm/components/accordion.js +251 -0
  39. package/dist/esm/components/alert.js +206 -0
  40. package/dist/esm/components/appbar.js +315 -0
  41. package/dist/esm/components/autocomplete.js +276 -0
  42. package/dist/esm/components/avatar.js +174 -0
  43. package/dist/esm/components/badge.js +185 -0
  44. package/dist/esm/components/bottom-navigation.js +270 -0
  45. package/dist/esm/components/bottomsheet.js +341 -0
  46. package/dist/esm/components/button.js +481 -0
  47. package/dist/esm/components/card.js +227 -0
  48. package/dist/esm/components/chip.js +218 -0
  49. package/dist/esm/components/collapse.js +261 -0
  50. package/dist/esm/components/datepicker.js +354 -0
  51. package/dist/esm/components/dialog.js +180 -0
  52. package/dist/esm/components/divider.js +291 -0
  53. package/dist/esm/components/drawer.js +378 -0
  54. package/dist/esm/components/file-upload.js +328 -0
  55. package/dist/esm/components/form.js +448 -0
  56. package/dist/esm/components/input.js +247 -0
  57. package/dist/esm/components/list.js +195 -0
  58. package/dist/esm/components/markdown-body.js +412 -0
  59. package/dist/esm/components/modal.js +298 -0
  60. package/dist/esm/components/navigation.js +399 -0
  61. package/dist/esm/components/popover.js +333 -0
  62. package/dist/esm/components/progress.js +245 -0
  63. package/dist/esm/components/rating.js +237 -0
  64. package/dist/esm/components/skeleton.js +223 -0
  65. package/dist/esm/components/slider.js +334 -0
  66. package/dist/esm/components/snackbar.js +318 -0
  67. package/dist/esm/components/stepper.js +320 -0
  68. package/dist/esm/components/switch.js +284 -0
  69. package/dist/esm/components/table.js +206 -0
  70. package/dist/esm/components/timeline.js +360 -0
  71. package/dist/esm/components/toast.js +258 -0
  72. package/dist/esm/components/tooltip.js +291 -0
  73. package/dist/index.css +10699 -0
  74. package/dist/themes/moonlight.css +168 -0
  75. package/dist/themes/sunshine.css +166 -0
  76. package/dist/types/index.d.ts +14 -0
  77. package/dist/types/index.d.ts.map +1 -0
  78. package/dist/types/plugin.d.ts +69 -0
  79. package/dist/types/plugin.d.ts.map +1 -0
  80. package/dist/types/theme.d.ts +202 -0
  81. package/dist/types/theme.d.ts.map +1 -0
  82. package/package.json +207 -18
  83. package/dist/index.cjs +0 -243
  84. package/dist/index.cjs.map +0 -15
  85. package/dist/index.js +0 -211
  86. package/dist/index.js.map +0 -15
@@ -0,0 +1,291 @@
1
+ // Auto-generated from divider.css
2
+ export const css = `/**
3
+ * Divider Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired divider system
5
+ */
6
+
7
+ @layer components {
8
+ /* Base Divider (Horizontal) */
9
+ .divider {
10
+ width: 100%;
11
+ height: 1px;
12
+ margin: 1rem 0;
13
+ background-color: var(--color-outline-variant);
14
+ border: none;
15
+ }
16
+
17
+ /* Vertical Divider */
18
+ .divider-vertical {
19
+ width: 1px;
20
+ height: auto;
21
+ min-height: 1rem;
22
+ margin: 0 1rem;
23
+ align-self: stretch;
24
+ }
25
+
26
+ /* Divider Thickness */
27
+ .divider-thin {
28
+ height: 1px;
29
+ }
30
+
31
+ .divider-thin.divider-vertical {
32
+ width: 1px;
33
+ height: auto;
34
+ }
35
+
36
+ .divider-medium {
37
+ height: 2px;
38
+ }
39
+
40
+ .divider-medium.divider-vertical {
41
+ width: 2px;
42
+ height: auto;
43
+ }
44
+
45
+ .divider-thick {
46
+ height: 4px;
47
+ }
48
+
49
+ .divider-thick.divider-vertical {
50
+ width: 4px;
51
+ height: auto;
52
+ }
53
+
54
+ /* Divider Styles */
55
+ .divider-dashed {
56
+ background-color: transparent;
57
+ background-image: linear-gradient(
58
+ to right,
59
+ var(--color-outline-variant) 50%,
60
+ transparent 50%
61
+ );
62
+ background-size: 8px 1px;
63
+ background-repeat: repeat-x;
64
+ }
65
+
66
+ .divider-dashed.divider-vertical {
67
+ background-image: linear-gradient(
68
+ to bottom,
69
+ var(--color-outline-variant) 50%,
70
+ transparent 50%
71
+ );
72
+ background-size: 1px 8px;
73
+ background-repeat: repeat-y;
74
+ }
75
+
76
+ .divider-dotted {
77
+ background-color: transparent;
78
+ background-image: linear-gradient(
79
+ to right,
80
+ var(--color-outline-variant) 25%,
81
+ transparent 25%
82
+ );
83
+ background-size: 4px 1px;
84
+ background-repeat: repeat-x;
85
+ }
86
+
87
+ .divider-dotted.divider-vertical {
88
+ background-image: linear-gradient(
89
+ to bottom,
90
+ var(--color-outline-variant) 25%,
91
+ transparent 25%
92
+ );
93
+ background-size: 1px 4px;
94
+ background-repeat: repeat-y;
95
+ }
96
+
97
+ /* Color Variants */
98
+ .divider-primary {
99
+ background-color: var(--color-primary);
100
+ }
101
+
102
+ .divider-primary.divider-dashed {
103
+ background-image: linear-gradient(
104
+ to right,
105
+ var(--color-primary) 50%,
106
+ transparent 50%
107
+ );
108
+ }
109
+
110
+ .divider-primary.divider-dashed.divider-vertical {
111
+ background-image: linear-gradient(
112
+ to bottom,
113
+ var(--color-primary) 50%,
114
+ transparent 50%
115
+ );
116
+ }
117
+
118
+ .divider-secondary {
119
+ background-color: var(--color-secondary);
120
+ }
121
+
122
+ .divider-light {
123
+ background-color: var(--color-outline-variant);
124
+ opacity: 0.5;
125
+ }
126
+
127
+ .divider-dark {
128
+ background-color: var(--color-outline);
129
+ }
130
+
131
+ /* Spacing Variants */
132
+ .divider-none {
133
+ margin: 0;
134
+ }
135
+
136
+ .divider-xs {
137
+ margin: 0.25rem 0;
138
+ }
139
+
140
+ .divider-xs.divider-vertical {
141
+ margin: 0 0.25rem;
142
+ }
143
+
144
+ .divider-sm {
145
+ margin: 0.5rem 0;
146
+ }
147
+
148
+ .divider-sm.divider-vertical {
149
+ margin: 0 0.5rem;
150
+ }
151
+
152
+ .divider-lg {
153
+ margin: 1.5rem 0;
154
+ }
155
+
156
+ .divider-lg.divider-vertical {
157
+ margin: 0 1.5rem;
158
+ }
159
+
160
+ .divider-xl {
161
+ margin: 2rem 0;
162
+ }
163
+
164
+ .divider-xl.divider-vertical {
165
+ margin: 0 2rem;
166
+ }
167
+
168
+ /* Divider with Text (Horizontal) */
169
+ .divider-text {
170
+ display: flex;
171
+ align-items: center;
172
+ gap: 1rem;
173
+ height: auto;
174
+ background-color: transparent;
175
+ }
176
+
177
+ .divider-text::before,
178
+ .divider-text::after {
179
+ content: '';
180
+ flex: 1;
181
+ height: 1px;
182
+ background-color: var(--color-outline-variant);
183
+ }
184
+
185
+ .divider-text-content {
186
+ font-size: 0.75rem;
187
+ font-weight: 500;
188
+ color: var(--color-on-surface-variant);
189
+ text-transform: uppercase;
190
+ letter-spacing: 0.025em;
191
+ white-space: nowrap;
192
+ }
193
+
194
+ /* Text Position */
195
+ .divider-text-left::before {
196
+ flex: 0 0 2rem;
197
+ }
198
+
199
+ .divider-text-right::after {
200
+ flex: 0 0 2rem;
201
+ }
202
+
203
+ /* Inset Divider */
204
+ .divider-inset {
205
+ margin-left: 4rem;
206
+ width: calc(100% - 4rem);
207
+ }
208
+
209
+ .divider-inset-right {
210
+ margin-right: 4rem;
211
+ width: calc(100% - 4rem);
212
+ }
213
+
214
+ .divider-inset-both {
215
+ margin-left: 4rem;
216
+ margin-right: 4rem;
217
+ width: calc(100% - 8rem);
218
+ }
219
+
220
+ /* List Divider (for use between list items) */
221
+ .divider-list {
222
+ margin: 0;
223
+ margin-left: 1rem;
224
+ width: calc(100% - 1rem);
225
+ }
226
+
227
+ /* Card Divider */
228
+ .divider-card {
229
+ margin: 0;
230
+ margin-left: -1rem;
231
+ margin-right: -1rem;
232
+ width: calc(100% + 2rem);
233
+ }
234
+
235
+ /* Gradient Divider */
236
+ .divider-gradient {
237
+ background: linear-gradient(
238
+ to right,
239
+ transparent,
240
+ var(--color-outline-variant) 20%,
241
+ var(--color-outline-variant) 80%,
242
+ transparent
243
+ );
244
+ }
245
+
246
+ .divider-gradient.divider-vertical {
247
+ background: linear-gradient(
248
+ to bottom,
249
+ transparent,
250
+ var(--color-outline-variant) 20%,
251
+ var(--color-outline-variant) 80%,
252
+ transparent
253
+ );
254
+ }
255
+
256
+ /* Decorative Divider */
257
+ .divider-decorative {
258
+ position: relative;
259
+ height: auto;
260
+ padding: 1rem 0;
261
+ background-color: transparent;
262
+ text-align: center;
263
+ }
264
+
265
+ .divider-decorative::before {
266
+ content: '';
267
+ position: absolute;
268
+ top: 50%;
269
+ left: 0;
270
+ right: 0;
271
+ height: 1px;
272
+ background-color: var(--color-outline-variant);
273
+ }
274
+
275
+ .divider-decorative-icon {
276
+ position: relative;
277
+ display: inline-flex;
278
+ align-items: center;
279
+ justify-content: center;
280
+ width: 2rem;
281
+ height: 2rem;
282
+ background-color: var(--color-surface);
283
+ color: var(--color-on-surface-variant);
284
+ }
285
+ }
286
+ `;
287
+
288
+ const sheet = new CSSStyleSheet();
289
+ sheet.replaceSync(css);
290
+ export const styles = sheet;
291
+ export default sheet;
@@ -0,0 +1,378 @@
1
+ // Auto-generated from drawer.css
2
+ export const css = `/**
3
+ * Drawer Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired navigation drawer system
5
+ */
6
+
7
+ @layer components {
8
+ /* Drawer Backdrop */
9
+ .drawer-backdrop {
10
+ position: fixed;
11
+ inset: 0;
12
+ z-index: 1100;
13
+ background-color: rgb(0 0 0 / 0.5);
14
+ opacity: 0;
15
+ visibility: hidden;
16
+ transition: opacity 300ms ease-out, visibility 300ms ease-out;
17
+ }
18
+
19
+ .drawer-backdrop-show {
20
+ opacity: 1;
21
+ visibility: visible;
22
+ }
23
+
24
+ /* Base Drawer */
25
+ .drawer {
26
+ position: fixed;
27
+ z-index: 1200;
28
+ display: flex;
29
+ flex-direction: column;
30
+ background-color: var(--color-surface-container-low);
31
+ box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
32
+ transition: transform 300ms ease-out;
33
+ }
34
+
35
+ /* Surface Variants */
36
+ .drawer-surface {
37
+ background-color: var(--color-surface);
38
+ }
39
+
40
+ .drawer-surface-container {
41
+ background-color: var(--color-surface-container);
42
+ }
43
+
44
+ .drawer-surface-container-low {
45
+ background-color: var(--color-surface-container-low);
46
+ }
47
+
48
+ .drawer-surface-container-high {
49
+ background-color: var(--color-surface-container-high);
50
+ }
51
+
52
+ /* Drawer Positions */
53
+ .drawer-left {
54
+ top: 0;
55
+ left: 0;
56
+ bottom: 0;
57
+ width: 20rem;
58
+ max-width: calc(100vw - 3.5rem);
59
+ transform: translateX(-100%);
60
+ border-radius: 0 1rem 1rem 0;
61
+ }
62
+
63
+ .drawer-left.drawer-open {
64
+ transform: translateX(0);
65
+ }
66
+
67
+ .drawer-right {
68
+ top: 0;
69
+ right: 0;
70
+ bottom: 0;
71
+ width: 20rem;
72
+ max-width: calc(100vw - 3.5rem);
73
+ transform: translateX(100%);
74
+ border-radius: 1rem 0 0 1rem;
75
+ }
76
+
77
+ .drawer-right.drawer-open {
78
+ transform: translateX(0);
79
+ }
80
+
81
+ .drawer-top {
82
+ top: 0;
83
+ left: 0;
84
+ right: 0;
85
+ height: auto;
86
+ max-height: 80vh;
87
+ transform: translateY(-100%);
88
+ border-radius: 0 0 1rem 1rem;
89
+ }
90
+
91
+ .drawer-top.drawer-open {
92
+ transform: translateY(0);
93
+ }
94
+
95
+ .drawer-bottom {
96
+ bottom: 0;
97
+ left: 0;
98
+ right: 0;
99
+ height: auto;
100
+ max-height: 80vh;
101
+ transform: translateY(100%);
102
+ border-radius: 1rem 1rem 0 0;
103
+ }
104
+
105
+ .drawer-bottom.drawer-open {
106
+ transform: translateY(0);
107
+ }
108
+
109
+ /* Drawer Header */
110
+ .drawer-header {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 0.75rem;
114
+ padding: 1rem;
115
+ border-bottom: 1px solid var(--color-outline-variant);
116
+ flex-shrink: 0;
117
+ }
118
+
119
+ .drawer-title {
120
+ flex: 1;
121
+ font-size: 1.125rem;
122
+ font-weight: 500;
123
+ color: var(--color-on-surface);
124
+ }
125
+
126
+ .drawer-close {
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ width: 2.5rem;
131
+ height: 2.5rem;
132
+ color: var(--color-on-surface-variant);
133
+ background-color: transparent;
134
+ border: none;
135
+ border-radius: 50%;
136
+ cursor: pointer;
137
+ transition: background-color 150ms ease-in-out;
138
+ }
139
+
140
+ .drawer-close:hover {
141
+ background-color: var(--color-surface-container);
142
+ }
143
+
144
+ .drawer-close:focus-visible {
145
+ outline: 2px solid var(--color-primary);
146
+ outline-offset: 2px;
147
+ }
148
+
149
+ /* Drawer Body (main content area) */
150
+ .drawer-body {
151
+ flex: 1;
152
+ overflow-y: auto;
153
+ padding: 0.5rem 0.75rem;
154
+ }
155
+
156
+ /* Drawer Footer */
157
+ .drawer-footer {
158
+ display: flex;
159
+ align-items: center;
160
+ gap: 0.75rem;
161
+ padding: 1rem;
162
+ border-top: 1px solid var(--color-outline-variant);
163
+ flex-shrink: 0;
164
+ }
165
+
166
+ /* Drawer Item */
167
+ .drawer-item {
168
+ display: flex;
169
+ align-items: center;
170
+ gap: 0.75rem;
171
+ padding: 0.75rem 1rem;
172
+ font-size: 0.875rem;
173
+ font-weight: 500;
174
+ color: var(--color-on-surface-variant);
175
+ background-color: transparent;
176
+ border: none;
177
+ border-radius: 1.75rem;
178
+ cursor: pointer;
179
+ text-decoration: none;
180
+ transition: background-color 150ms ease-in-out, color 150ms ease-in-out;
181
+ width: 100%;
182
+ }
183
+
184
+ .drawer-item:hover {
185
+ background-color: var(--color-surface-container);
186
+ color: var(--color-on-surface);
187
+ }
188
+
189
+ .drawer-item:focus-visible {
190
+ outline: 2px solid var(--color-primary);
191
+ outline-offset: 2px;
192
+ }
193
+
194
+ /* Active Item States */
195
+ .drawer-item-active,
196
+ .drawer-item-active-primary {
197
+ background-color: var(--color-secondary-container);
198
+ color: var(--color-on-secondary-container);
199
+ }
200
+
201
+ .drawer-item-active-secondary {
202
+ background-color: var(--color-secondary-container);
203
+ color: var(--color-on-secondary-container);
204
+ }
205
+
206
+ .drawer-item-active-tertiary {
207
+ background-color: var(--color-tertiary-container);
208
+ color: var(--color-on-tertiary-container);
209
+ }
210
+
211
+ /* Drawer Item Icon */
212
+ .drawer-item-icon {
213
+ display: flex;
214
+ align-items: center;
215
+ justify-content: center;
216
+ width: 1.5rem;
217
+ height: 1.5rem;
218
+ font-size: 1.25rem;
219
+ flex-shrink: 0;
220
+ }
221
+
222
+ /* Drawer Item Badge */
223
+ .drawer-item-badge {
224
+ padding: 0.125rem 0.5rem;
225
+ font-size: 0.75rem;
226
+ font-weight: 500;
227
+ background-color: var(--color-error-container);
228
+ color: var(--color-on-error-container);
229
+ border-radius: 9999px;
230
+ margin-left: auto;
231
+ }
232
+
233
+ /* Nested Items */
234
+ .drawer-item-nested {
235
+ padding-left: 3rem;
236
+ }
237
+
238
+ .drawer-item-nested-2 {
239
+ padding-left: 4.5rem;
240
+ }
241
+
242
+ /* Drawer Label (Section title) */
243
+ .drawer-label {
244
+ padding: 0.75rem 1rem 0.5rem;
245
+ font-size: 0.6875rem;
246
+ font-weight: 600;
247
+ text-transform: uppercase;
248
+ letter-spacing: 0.05em;
249
+ color: var(--color-on-surface-variant);
250
+ }
251
+
252
+ /* Drawer Divider */
253
+ .drawer-divider {
254
+ height: 1px;
255
+ margin: 0.5rem 1rem;
256
+ background-color: var(--color-outline-variant);
257
+ }
258
+
259
+ /* User Profile in Drawer */
260
+ .drawer-profile {
261
+ display: flex;
262
+ align-items: center;
263
+ gap: 0.75rem;
264
+ padding: 1rem;
265
+ border-bottom: 1px solid var(--color-outline-variant);
266
+ }
267
+
268
+ .drawer-profile-avatar {
269
+ width: 2.5rem;
270
+ height: 2.5rem;
271
+ border-radius: 50%;
272
+ background-color: var(--color-primary-container);
273
+ display: flex;
274
+ align-items: center;
275
+ justify-content: center;
276
+ font-weight: 600;
277
+ color: var(--color-on-primary-container);
278
+ flex-shrink: 0;
279
+ }
280
+
281
+ .drawer-profile-info {
282
+ flex: 1;
283
+ min-width: 0;
284
+ }
285
+
286
+ .drawer-profile-name {
287
+ font-size: 0.875rem;
288
+ font-weight: 500;
289
+ color: var(--color-on-surface);
290
+ overflow: hidden;
291
+ text-overflow: ellipsis;
292
+ white-space: nowrap;
293
+ }
294
+
295
+ .drawer-profile-email {
296
+ font-size: 0.75rem;
297
+ color: var(--color-on-surface-variant);
298
+ overflow: hidden;
299
+ text-overflow: ellipsis;
300
+ white-space: nowrap;
301
+ }
302
+
303
+ /* Permanent/Persistent Drawer */
304
+ .drawer-permanent {
305
+ position: relative;
306
+ transform: none;
307
+ box-shadow: none;
308
+ border-radius: 0;
309
+ border-right: 1px solid var(--color-outline-variant);
310
+ }
311
+
312
+ .drawer-permanent.drawer-right {
313
+ border-right: none;
314
+ border-left: 1px solid var(--color-outline-variant);
315
+ }
316
+
317
+ /* Rail Drawer (Icon-only collapsed) */
318
+ .drawer-rail {
319
+ width: 5rem;
320
+ overflow: hidden;
321
+ transition: width 300ms ease-out;
322
+ }
323
+
324
+ .drawer-rail:hover,
325
+ .drawer-rail.expanded {
326
+ width: 20rem;
327
+ }
328
+
329
+ .drawer-rail .drawer-item span:not(.drawer-item-icon) {
330
+ opacity: 0;
331
+ transition: opacity 150ms ease-out;
332
+ }
333
+
334
+ .drawer-rail:hover .drawer-item span:not(.drawer-item-icon),
335
+ .drawer-rail.expanded .drawer-item span:not(.drawer-item-icon) {
336
+ opacity: 1;
337
+ }
338
+
339
+ /* Size Variants */
340
+ .drawer-sm {
341
+ width: 12rem;
342
+ }
343
+
344
+ .drawer-md {
345
+ width: 16rem;
346
+ }
347
+
348
+ .drawer-lg {
349
+ width: 20rem;
350
+ }
351
+
352
+ .drawer-xl {
353
+ width: 24rem;
354
+ }
355
+
356
+ .drawer-full {
357
+ width: 100%;
358
+ max-width: 100%;
359
+ border-radius: 0;
360
+ }
361
+
362
+ /* Reduce Motion */
363
+ @media (prefers-reduced-motion: reduce) {
364
+ .drawer,
365
+ .drawer-backdrop,
366
+ .drawer-close,
367
+ .drawer-item,
368
+ .drawer-rail {
369
+ transition: none;
370
+ }
371
+ }
372
+ }
373
+ `;
374
+
375
+ const sheet = new CSSStyleSheet();
376
+ sheet.replaceSync(css);
377
+ export const styles = sheet;
378
+ export default sheet;