@duskmoon-dev/core 0.1.0 → 0.2.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 (110) 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 +493 -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 +475 -0
  11. package/dist/components/card.css +220 -0
  12. package/dist/components/cascader.css +418 -0
  13. package/dist/components/checkbox.css +231 -0
  14. package/dist/components/chip.css +211 -0
  15. package/dist/components/collapse.css +454 -0
  16. package/dist/components/datepicker.css +741 -0
  17. package/dist/components/dialog.css +173 -0
  18. package/dist/components/divider.css +284 -0
  19. package/dist/components/drawer.css +371 -0
  20. package/dist/components/file-upload.css +321 -0
  21. package/dist/components/form-group.css +308 -0
  22. package/dist/components/form.css +441 -0
  23. package/dist/components/index.css +14951 -0
  24. package/dist/components/input.css +240 -0
  25. package/dist/components/list.css +188 -0
  26. package/dist/components/markdown-body.css +405 -0
  27. package/dist/components/modal.css +291 -0
  28. package/dist/components/multi-select.css +491 -0
  29. package/dist/components/navigation.css +736 -0
  30. package/dist/components/otp-input.css +195 -0
  31. package/dist/components/pin-input.css +184 -0
  32. package/dist/components/popover.css +392 -0
  33. package/dist/components/progress.css +238 -0
  34. package/dist/components/radio.css +183 -0
  35. package/dist/components/rating.css +230 -0
  36. package/dist/components/segment-control.css +186 -0
  37. package/dist/components/select.css +205 -0
  38. package/dist/components/skeleton.css +216 -0
  39. package/dist/components/slider.css +327 -0
  40. package/dist/components/snackbar.css +311 -0
  41. package/dist/components/stepper.css +313 -0
  42. package/dist/components/switch.css +234 -0
  43. package/dist/components/table.css +199 -0
  44. package/dist/components/textarea.css +398 -0
  45. package/dist/components/time-input.css +252 -0
  46. package/dist/components/timeline.css +353 -0
  47. package/dist/components/toast.css +251 -0
  48. package/dist/components/tooltip.css +284 -0
  49. package/dist/components/tree-select.css +472 -0
  50. package/dist/esm/components/accordion.js +251 -0
  51. package/dist/esm/components/alert.js +206 -0
  52. package/dist/esm/components/appbar.js +500 -0
  53. package/dist/esm/components/autocomplete.js +276 -0
  54. package/dist/esm/components/avatar.js +174 -0
  55. package/dist/esm/components/badge.js +185 -0
  56. package/dist/esm/components/bottom-navigation.js +270 -0
  57. package/dist/esm/components/bottomsheet.js +341 -0
  58. package/dist/esm/components/button.js +482 -0
  59. package/dist/esm/components/card.js +227 -0
  60. package/dist/esm/components/cascader.js +425 -0
  61. package/dist/esm/components/checkbox.js +238 -0
  62. package/dist/esm/components/chip.js +218 -0
  63. package/dist/esm/components/collapse.js +461 -0
  64. package/dist/esm/components/datepicker.js +748 -0
  65. package/dist/esm/components/dialog.js +180 -0
  66. package/dist/esm/components/divider.js +291 -0
  67. package/dist/esm/components/drawer.js +378 -0
  68. package/dist/esm/components/file-upload.js +328 -0
  69. package/dist/esm/components/form-group.js +315 -0
  70. package/dist/esm/components/form.js +448 -0
  71. package/dist/esm/components/input.js +247 -0
  72. package/dist/esm/components/list.js +195 -0
  73. package/dist/esm/components/markdown-body.js +412 -0
  74. package/dist/esm/components/modal.js +298 -0
  75. package/dist/esm/components/multi-select.js +498 -0
  76. package/dist/esm/components/navigation.js +743 -0
  77. package/dist/esm/components/otp-input.js +202 -0
  78. package/dist/esm/components/pin-input.js +191 -0
  79. package/dist/esm/components/popover.js +399 -0
  80. package/dist/esm/components/progress.js +245 -0
  81. package/dist/esm/components/radio.js +190 -0
  82. package/dist/esm/components/rating.js +237 -0
  83. package/dist/esm/components/segment-control.js +193 -0
  84. package/dist/esm/components/select.js +212 -0
  85. package/dist/esm/components/skeleton.js +223 -0
  86. package/dist/esm/components/slider.js +334 -0
  87. package/dist/esm/components/snackbar.js +318 -0
  88. package/dist/esm/components/stepper.js +320 -0
  89. package/dist/esm/components/switch.js +241 -0
  90. package/dist/esm/components/table.js +206 -0
  91. package/dist/esm/components/textarea.js +405 -0
  92. package/dist/esm/components/time-input.js +259 -0
  93. package/dist/esm/components/timeline.js +360 -0
  94. package/dist/esm/components/toast.js +258 -0
  95. package/dist/esm/components/tooltip.js +291 -0
  96. package/dist/esm/components/tree-select.js +479 -0
  97. package/dist/index.css +15866 -0
  98. package/dist/themes/moonlight.css +253 -0
  99. package/dist/themes/sunshine.css +250 -0
  100. package/dist/types/index.d.ts +14 -0
  101. package/dist/types/index.d.ts.map +1 -0
  102. package/dist/types/plugin.d.ts +69 -0
  103. package/dist/types/plugin.d.ts.map +1 -0
  104. package/dist/types/theme.d.ts +202 -0
  105. package/dist/types/theme.d.ts.map +1 -0
  106. package/package.json +262 -18
  107. package/dist/index.cjs +0 -243
  108. package/dist/index.cjs.map +0 -15
  109. package/dist/index.js +0 -211
  110. package/dist/index.js.map +0 -15
@@ -0,0 +1,206 @@
1
+ // Auto-generated from table.css
2
+ export const css = `/**
3
+ * Table Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired table system
5
+ */
6
+
7
+ @layer components {
8
+ /* Base Table */
9
+ .table {
10
+ width: 100%;
11
+ border-collapse: collapse;
12
+ border-spacing: 0;
13
+ font-size: 0.875rem;
14
+ color: var(--color-on-surface);
15
+ }
16
+
17
+ /* Table Head */
18
+ .table thead,
19
+ .table-header {
20
+ background-color: var(--color-surface-container);
21
+ }
22
+
23
+ .table th,
24
+ .table-header-cell {
25
+ padding: 0.75rem 1rem;
26
+ font-weight: 600;
27
+ text-align: left;
28
+ color: var(--color-on-surface);
29
+ border-bottom: 2px solid var(--color-outline);
30
+ }
31
+
32
+ /* Table Body */
33
+ .table tbody,
34
+ .table-body {
35
+ background-color: var(--color-surface);
36
+ }
37
+
38
+ .table td,
39
+ .table-cell {
40
+ padding: 0.75rem 1rem;
41
+ border-bottom: 1px solid var(--color-outline-variant);
42
+ vertical-align: middle;
43
+ }
44
+
45
+ .table tr:last-child td,
46
+ .table-row:last-child .table-cell {
47
+ border-bottom: none;
48
+ }
49
+
50
+ /* Table Footer */
51
+ .table tfoot,
52
+ .table-footer {
53
+ background-color: var(--color-surface-container);
54
+ font-weight: 500;
55
+ }
56
+
57
+ .table tfoot td {
58
+ border-top: 2px solid var(--color-outline);
59
+ border-bottom: none;
60
+ }
61
+
62
+ /* Zebra Striping */
63
+ .table-zebra tbody tr:nth-child(even),
64
+ .table-zebra .table-row:nth-child(even) {
65
+ background-color: var(--color-surface-container-low);
66
+ }
67
+
68
+ /* Hover Effect */
69
+ .table-hover tbody tr:hover,
70
+ .table-hover .table-row:hover {
71
+ background-color: var(--color-surface-container);
72
+ }
73
+
74
+ /* Bordered Table */
75
+ .table-bordered {
76
+ border: 1px solid var(--color-outline);
77
+ border-radius: 0.5rem;
78
+ overflow: hidden;
79
+ }
80
+
81
+ .table-bordered th,
82
+ .table-bordered td {
83
+ border: 1px solid var(--color-outline-variant);
84
+ }
85
+
86
+ /* Compact Table */
87
+ .table-compact th,
88
+ .table-compact td {
89
+ padding: 0.5rem 0.75rem;
90
+ font-size: 0.8125rem;
91
+ }
92
+
93
+ /* Comfortable Table */
94
+ .table-comfortable th,
95
+ .table-comfortable td {
96
+ padding: 1rem 1.25rem;
97
+ }
98
+
99
+ /* Fixed Layout */
100
+ .table-fixed {
101
+ table-layout: fixed;
102
+ }
103
+
104
+ /* Sortable Header */
105
+ .table-sortable th {
106
+ cursor: pointer;
107
+ user-select: none;
108
+ }
109
+
110
+ .table-sortable th:hover {
111
+ background-color: var(--color-surface-container-high);
112
+ }
113
+
114
+ .table-sort-asc::after {
115
+ content: ' ↑';
116
+ opacity: 0.7;
117
+ }
118
+
119
+ .table-sort-desc::after {
120
+ content: ' ↓';
121
+ opacity: 0.7;
122
+ }
123
+
124
+ /* Selected Row */
125
+ .table-row-selected,
126
+ .table tr.selected {
127
+ background-color: var(--color-primary-container);
128
+ color: var(--color-on-primary-container);
129
+ }
130
+
131
+ /* Clickable Row */
132
+ .table-row-clickable,
133
+ .table tbody tr[data-href] {
134
+ cursor: pointer;
135
+ }
136
+
137
+ /* Responsive Table */
138
+ .table-responsive {
139
+ display: block;
140
+ width: 100%;
141
+ overflow-x: auto;
142
+ -webkit-overflow-scrolling: touch;
143
+ }
144
+
145
+ .table-responsive .table {
146
+ min-width: 100%;
147
+ }
148
+
149
+ /* Table Caption */
150
+ .table caption,
151
+ .table-caption {
152
+ padding: 0.75rem;
153
+ font-size: 0.875rem;
154
+ color: var(--color-on-surface-variant);
155
+ text-align: left;
156
+ caption-side: bottom;
157
+ }
158
+
159
+ /* Empty State */
160
+ .table-empty {
161
+ text-align: center;
162
+ padding: 2rem;
163
+ color: var(--color-on-surface-variant);
164
+ }
165
+
166
+ /* Loading State */
167
+ .table-loading {
168
+ position: relative;
169
+ }
170
+
171
+ .table-loading::after {
172
+ content: '';
173
+ position: absolute;
174
+ inset: 0;
175
+ background-color: var(--color-surface);
176
+ opacity: 0.7;
177
+ }
178
+
179
+ /* Pinned Columns */
180
+ .table-pin-left {
181
+ position: sticky;
182
+ left: 0;
183
+ background-color: inherit;
184
+ z-index: 1;
185
+ }
186
+
187
+ .table-pin-right {
188
+ position: sticky;
189
+ right: 0;
190
+ background-color: inherit;
191
+ z-index: 1;
192
+ }
193
+
194
+ /* Focus State for Interactive Tables */
195
+ .table tr:focus-visible,
196
+ .table-row:focus-visible {
197
+ outline: 2px solid var(--color-primary);
198
+ outline-offset: -2px;
199
+ }
200
+ }
201
+ `;
202
+
203
+ const sheet = new CSSStyleSheet();
204
+ sheet.replaceSync(css);
205
+ export const styles = sheet;
206
+ export default sheet;
@@ -0,0 +1,405 @@
1
+ // Auto-generated from textarea.css
2
+ export const css = `/**
3
+ * Textarea Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired multi-line text input
5
+ */
6
+
7
+ @layer components {
8
+ /* ============================================
9
+ * TEXTAREA CONTAINER
10
+ * ============================================ */
11
+
12
+ .textarea-container {
13
+ position: relative;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: 0.25rem;
17
+ width: 100%;
18
+ }
19
+
20
+ /* ============================================
21
+ * TEXTAREA LABEL
22
+ * ============================================ */
23
+
24
+ .textarea-label {
25
+ display: block;
26
+ font-size: 0.875rem;
27
+ font-weight: 500;
28
+ line-height: 1.25rem;
29
+ color: var(--color-on-surface);
30
+ margin-bottom: 0.25rem;
31
+ }
32
+
33
+ /* Floating Label */
34
+ .textarea-label-floating {
35
+ position: absolute;
36
+ top: 0.75rem;
37
+ left: 1rem;
38
+ font-size: 1rem;
39
+ font-weight: 400;
40
+ color: var(--color-on-surface-variant);
41
+ pointer-events: none;
42
+ transition: all 150ms ease-in-out;
43
+ transform-origin: left top;
44
+ z-index: 1;
45
+ }
46
+
47
+ /* Floating label active state - when textarea has content or focus */
48
+ .textarea:focus ~ .textarea-label-floating,
49
+ .textarea:not(:placeholder-shown) ~ .textarea-label-floating {
50
+ top: -0.5rem;
51
+ left: 0.75rem;
52
+ font-size: 0.75rem;
53
+ font-weight: 500;
54
+ color: var(--color-primary);
55
+ background-color: var(--color-surface);
56
+ padding: 0 0.25rem;
57
+ }
58
+
59
+ /* Floating label for filled variant */
60
+ .textarea-filled ~ .textarea-label-floating {
61
+ background-color: transparent;
62
+ }
63
+
64
+ .textarea-filled:focus ~ .textarea-label-floating,
65
+ .textarea-filled:not(:placeholder-shown) ~ .textarea-label-floating {
66
+ top: 0.25rem;
67
+ left: 0.75rem;
68
+ background-color: transparent;
69
+ }
70
+
71
+ /* ============================================
72
+ * HELPER TEXT
73
+ * ============================================ */
74
+
75
+ .textarea-helper {
76
+ font-size: 0.75rem;
77
+ line-height: 1rem;
78
+ color: var(--color-on-surface-variant);
79
+ margin-top: 0.25rem;
80
+ }
81
+
82
+ /* ============================================
83
+ * BASE TEXTAREA
84
+ * ============================================ */
85
+
86
+ .textarea {
87
+ display: block;
88
+ width: 100%;
89
+ min-height: 6rem;
90
+ padding: 0.75rem 1rem;
91
+ font-size: 1rem;
92
+ line-height: 1.5rem;
93
+ font-family: inherit;
94
+ color: var(--color-on-surface);
95
+ background-color: var(--color-surface);
96
+ border: 1px solid var(--color-outline);
97
+ border-radius: 0.5rem;
98
+ outline: none;
99
+ resize: vertical;
100
+ transition: border-color 150ms ease-in-out, box-shadow 150ms ease-in-out;
101
+ }
102
+
103
+ .textarea::placeholder {
104
+ color: var(--color-on-surface-variant);
105
+ opacity: 0.7;
106
+ }
107
+
108
+ .textarea:hover:not(:disabled) {
109
+ border-color: var(--color-on-surface-variant);
110
+ }
111
+
112
+ .textarea:focus {
113
+ outline: none;
114
+ }
115
+
116
+ .textarea:focus-visible {
117
+ border-color: var(--color-primary);
118
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
119
+ }
120
+
121
+ .textarea:disabled {
122
+ cursor: not-allowed;
123
+ opacity: 0.5;
124
+ background-color: var(--color-surface-container);
125
+ resize: none;
126
+ }
127
+
128
+ .textarea[readonly] {
129
+ background-color: var(--color-surface-container);
130
+ cursor: default;
131
+ }
132
+
133
+ /* Full Width */
134
+ .textarea-full {
135
+ width: 100%;
136
+ }
137
+
138
+ /* ============================================
139
+ * VARIANTS
140
+ * ============================================ */
141
+
142
+ /* Filled Variant */
143
+ .textarea-filled {
144
+ background-color: var(--color-surface-container);
145
+ border: none;
146
+ border-bottom: 2px solid var(--color-outline);
147
+ border-radius: 0.5rem 0.5rem 0 0;
148
+ }
149
+
150
+ .textarea-filled:hover:not(:disabled) {
151
+ background-color: var(--color-surface-container-high);
152
+ border-bottom-color: var(--color-on-surface);
153
+ }
154
+
155
+ .textarea-filled:focus-visible {
156
+ border-bottom-color: var(--color-primary);
157
+ box-shadow: none;
158
+ }
159
+
160
+ /* Outlined Variant (default) */
161
+ .textarea-outlined {
162
+ background-color: transparent;
163
+ border: 1px solid var(--color-outline);
164
+ border-radius: 0.5rem;
165
+ }
166
+
167
+ /* Ghost Variant */
168
+ .textarea-ghost {
169
+ background-color: transparent;
170
+ border-color: transparent;
171
+ }
172
+
173
+ .textarea-ghost:hover:not(:disabled) {
174
+ background-color: var(--color-surface-container);
175
+ border-color: transparent;
176
+ }
177
+
178
+ .textarea-ghost:focus-visible {
179
+ background-color: var(--color-surface-container);
180
+ border-color: transparent;
181
+ box-shadow: none;
182
+ }
183
+
184
+ /* ============================================
185
+ * COLOR VARIANTS
186
+ * ============================================ */
187
+
188
+ /* Primary */
189
+ .textarea-primary {
190
+ border-color: var(--color-primary);
191
+ }
192
+
193
+ .textarea-primary:focus-visible {
194
+ border-color: var(--color-primary);
195
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 10%, transparent);
196
+ }
197
+
198
+ .textarea-filled.textarea-primary {
199
+ border-bottom-color: var(--color-primary);
200
+ }
201
+
202
+ .textarea-filled.textarea-primary:focus-visible {
203
+ border-bottom-color: var(--color-primary);
204
+ }
205
+
206
+ /* Secondary */
207
+ .textarea-secondary {
208
+ border-color: var(--color-secondary);
209
+ }
210
+
211
+ .textarea-secondary:focus-visible {
212
+ border-color: var(--color-secondary);
213
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-secondary) 10%, transparent);
214
+ }
215
+
216
+ .textarea-filled.textarea-secondary {
217
+ border-bottom-color: var(--color-secondary);
218
+ }
219
+
220
+ .textarea-filled.textarea-secondary:focus-visible {
221
+ border-bottom-color: var(--color-secondary);
222
+ }
223
+
224
+ /* Tertiary */
225
+ .textarea-tertiary {
226
+ border-color: var(--color-tertiary);
227
+ }
228
+
229
+ .textarea-tertiary:focus-visible {
230
+ border-color: var(--color-tertiary);
231
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-tertiary) 10%, transparent);
232
+ }
233
+
234
+ .textarea-filled.textarea-tertiary {
235
+ border-bottom-color: var(--color-tertiary);
236
+ }
237
+
238
+ .textarea-filled.textarea-tertiary:focus-visible {
239
+ border-bottom-color: var(--color-tertiary);
240
+ }
241
+
242
+ /* ============================================
243
+ * SEMANTIC COLORS
244
+ * ============================================ */
245
+
246
+ .textarea-error {
247
+ border-color: var(--color-error);
248
+ }
249
+
250
+ .textarea-error:focus-visible {
251
+ border-color: var(--color-error);
252
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-error) 10%, transparent);
253
+ }
254
+
255
+ .textarea-filled.textarea-error {
256
+ border-bottom-color: var(--color-error);
257
+ }
258
+
259
+ .textarea-success {
260
+ border-color: var(--color-success);
261
+ }
262
+
263
+ .textarea-success:focus-visible {
264
+ border-color: var(--color-success);
265
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-success) 10%, transparent);
266
+ }
267
+
268
+ .textarea-filled.textarea-success {
269
+ border-bottom-color: var(--color-success);
270
+ }
271
+
272
+ .textarea-warning {
273
+ border-color: var(--color-warning);
274
+ }
275
+
276
+ .textarea-warning:focus-visible {
277
+ border-color: var(--color-warning);
278
+ box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-warning) 10%, transparent);
279
+ }
280
+
281
+ .textarea-filled.textarea-warning {
282
+ border-bottom-color: var(--color-warning);
283
+ }
284
+
285
+ /* ============================================
286
+ * SIZE VARIANTS
287
+ * ============================================ */
288
+
289
+ .textarea-sm {
290
+ min-height: 4rem;
291
+ padding: 0.5rem 0.75rem;
292
+ font-size: 0.875rem;
293
+ line-height: 1.25rem;
294
+ border-radius: 0.375rem;
295
+ }
296
+
297
+ .textarea-lg {
298
+ min-height: 8rem;
299
+ padding: 1rem 1.25rem;
300
+ font-size: 1.125rem;
301
+ line-height: 1.75rem;
302
+ border-radius: 0.625rem;
303
+ }
304
+
305
+ /* ============================================
306
+ * RESIZE OPTIONS
307
+ * ============================================ */
308
+
309
+ .textarea-resize-none {
310
+ resize: none;
311
+ }
312
+
313
+ .textarea-resize-vertical {
314
+ resize: vertical;
315
+ }
316
+
317
+ .textarea-resize-horizontal {
318
+ resize: horizontal;
319
+ }
320
+
321
+ .textarea-resize-both {
322
+ resize: both;
323
+ }
324
+
325
+ /* ============================================
326
+ * AUTO-RESIZE (requires JS)
327
+ * ============================================ */
328
+
329
+ .textarea-auto-resize,
330
+ .textarea-autosize {
331
+ resize: none;
332
+ overflow: hidden;
333
+ min-height: 3rem;
334
+ field-sizing: content; /* Modern CSS - auto-grows without JS in supported browsers */
335
+ }
336
+
337
+ /* ============================================
338
+ * CHARACTER COUNTER
339
+ * ============================================ */
340
+
341
+ .textarea-counter {
342
+ font-size: 0.75rem;
343
+ line-height: 1rem;
344
+ color: var(--color-on-surface-variant);
345
+ text-align: right;
346
+ }
347
+
348
+ .textarea-counter-error,
349
+ .textarea-counter-exceeded {
350
+ color: var(--color-error);
351
+ }
352
+
353
+ /* ============================================
354
+ * CONTAINER STATES
355
+ * ============================================ */
356
+
357
+ .textarea-container-error .textarea-label {
358
+ color: var(--color-error);
359
+ }
360
+
361
+ .textarea-container-error .textarea-helper {
362
+ color: var(--color-error);
363
+ }
364
+
365
+ .textarea-container-error .textarea-label-floating {
366
+ color: var(--color-error);
367
+ }
368
+
369
+ .textarea-container-error .textarea:focus ~ .textarea-label-floating {
370
+ color: var(--color-error);
371
+ }
372
+
373
+ .textarea-container-success .textarea-label {
374
+ color: var(--color-success);
375
+ }
376
+
377
+ .textarea-container-success .textarea-helper {
378
+ color: var(--color-success);
379
+ }
380
+
381
+ .textarea-container-success .textarea-label-floating {
382
+ color: var(--color-success);
383
+ }
384
+
385
+ .textarea-container-success .textarea:focus ~ .textarea-label-floating {
386
+ color: var(--color-success);
387
+ }
388
+
389
+ /* ============================================
390
+ * REDUCE MOTION
391
+ * ============================================ */
392
+
393
+ @media (prefers-reduced-motion: reduce) {
394
+ .textarea,
395
+ .textarea-label-floating {
396
+ transition: none;
397
+ }
398
+ }
399
+ }
400
+ `;
401
+
402
+ const sheet = new CSSStyleSheet();
403
+ sheet.replaceSync(css);
404
+ export const styles = sheet;
405
+ export default sheet;