@duskmoon-dev/core 1.0.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 (36) hide show
  1. package/dist/esm/components/accordion.js +251 -0
  2. package/dist/esm/components/alert.js +206 -0
  3. package/dist/esm/components/appbar.js +315 -0
  4. package/dist/esm/components/autocomplete.js +276 -0
  5. package/dist/esm/components/avatar.js +174 -0
  6. package/dist/esm/components/badge.js +185 -0
  7. package/dist/esm/components/bottom-navigation.js +270 -0
  8. package/dist/esm/components/bottomsheet.js +341 -0
  9. package/dist/esm/components/button.js +481 -0
  10. package/dist/esm/components/card.js +227 -0
  11. package/dist/esm/components/chip.js +218 -0
  12. package/dist/esm/components/collapse.js +261 -0
  13. package/dist/esm/components/datepicker.js +354 -0
  14. package/dist/esm/components/dialog.js +180 -0
  15. package/dist/esm/components/divider.js +291 -0
  16. package/dist/esm/components/drawer.js +378 -0
  17. package/dist/esm/components/file-upload.js +328 -0
  18. package/dist/esm/components/form.js +448 -0
  19. package/dist/esm/components/input.js +247 -0
  20. package/dist/esm/components/list.js +195 -0
  21. package/dist/esm/components/markdown-body.js +412 -0
  22. package/dist/esm/components/modal.js +298 -0
  23. package/dist/esm/components/navigation.js +399 -0
  24. package/dist/esm/components/popover.js +333 -0
  25. package/dist/esm/components/progress.js +245 -0
  26. package/dist/esm/components/rating.js +237 -0
  27. package/dist/esm/components/skeleton.js +223 -0
  28. package/dist/esm/components/slider.js +334 -0
  29. package/dist/esm/components/snackbar.js +318 -0
  30. package/dist/esm/components/stepper.js +320 -0
  31. package/dist/esm/components/switch.js +284 -0
  32. package/dist/esm/components/table.js +206 -0
  33. package/dist/esm/components/timeline.js +360 -0
  34. package/dist/esm/components/toast.js +258 -0
  35. package/dist/esm/components/tooltip.js +291 -0
  36. package/package.json +108 -38
@@ -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,360 @@
1
+ // Auto-generated from timeline.css
2
+ export const css = `/**
3
+ * Timeline Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired timeline system
5
+ */
6
+
7
+ @layer components {
8
+ /* Base Timeline */
9
+ .timeline {
10
+ position: relative;
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: 0;
14
+ }
15
+
16
+ /* Timeline Line */
17
+ .timeline::before {
18
+ content: '';
19
+ position: absolute;
20
+ top: 0;
21
+ left: 1.25rem;
22
+ width: 2px;
23
+ height: 100%;
24
+ background-color: var(--color-outline-variant);
25
+ }
26
+
27
+ /* Timeline Item */
28
+ .timeline-item {
29
+ position: relative;
30
+ display: flex;
31
+ gap: 1rem;
32
+ padding-bottom: 1.5rem;
33
+ }
34
+
35
+ .timeline-item:last-child {
36
+ padding-bottom: 0;
37
+ }
38
+
39
+ /* Timeline Marker */
40
+ .timeline-marker {
41
+ position: relative;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ width: 2.5rem;
46
+ height: 2.5rem;
47
+ background-color: var(--color-surface);
48
+ border: 2px solid var(--color-outline-variant);
49
+ border-radius: 50%;
50
+ flex-shrink: 0;
51
+ z-index: 1;
52
+ }
53
+
54
+ .timeline-marker-icon {
55
+ font-size: 1rem;
56
+ color: var(--color-on-surface-variant);
57
+ }
58
+
59
+ .timeline-marker-dot {
60
+ width: 0.75rem;
61
+ height: 0.75rem;
62
+ background-color: var(--color-outline-variant);
63
+ border-radius: 50%;
64
+ }
65
+
66
+ /* Timeline Content */
67
+ .timeline-content {
68
+ flex: 1;
69
+ padding-top: 0.375rem;
70
+ min-width: 0;
71
+ }
72
+
73
+ .timeline-title {
74
+ font-size: 0.875rem;
75
+ font-weight: 600;
76
+ color: var(--color-on-surface);
77
+ margin-bottom: 0.25rem;
78
+ }
79
+
80
+ .timeline-time {
81
+ font-size: 0.75rem;
82
+ color: var(--color-on-surface-variant);
83
+ margin-bottom: 0.5rem;
84
+ }
85
+
86
+ .timeline-description {
87
+ font-size: 0.875rem;
88
+ color: var(--color-on-surface-variant);
89
+ line-height: 1.5;
90
+ }
91
+
92
+ /* Timeline Card */
93
+ .timeline-card {
94
+ padding: 1rem;
95
+ background-color: var(--color-surface-container);
96
+ border-radius: 0.75rem;
97
+ margin-top: 0.5rem;
98
+ }
99
+
100
+ /* Color Variants */
101
+ .timeline-item-primary .timeline-marker {
102
+ border-color: var(--color-primary);
103
+ background-color: var(--color-primary-container);
104
+ }
105
+
106
+ .timeline-item-primary .timeline-marker-icon,
107
+ .timeline-item-primary .timeline-marker-dot {
108
+ color: var(--color-on-primary-container);
109
+ background-color: var(--color-primary);
110
+ }
111
+
112
+ .timeline-item-secondary .timeline-marker {
113
+ border-color: var(--color-secondary);
114
+ background-color: var(--color-secondary-container);
115
+ }
116
+
117
+ .timeline-item-success .timeline-marker {
118
+ border-color: var(--color-success);
119
+ background-color: var(--color-success-container);
120
+ }
121
+
122
+ .timeline-item-success .timeline-marker-dot {
123
+ background-color: var(--color-success);
124
+ }
125
+
126
+ .timeline-item-warning .timeline-marker {
127
+ border-color: var(--color-warning);
128
+ background-color: var(--color-warning-container);
129
+ }
130
+
131
+ .timeline-item-warning .timeline-marker-dot {
132
+ background-color: var(--color-warning);
133
+ }
134
+
135
+ .timeline-item-error .timeline-marker {
136
+ border-color: var(--color-error);
137
+ background-color: var(--color-error-container);
138
+ }
139
+
140
+ .timeline-item-error .timeline-marker-dot {
141
+ background-color: var(--color-error);
142
+ }
143
+
144
+ /* Completed State */
145
+ .timeline-item.completed .timeline-marker {
146
+ border-color: var(--color-primary);
147
+ background-color: var(--color-primary);
148
+ }
149
+
150
+ .timeline-item.completed .timeline-marker-icon {
151
+ color: var(--color-on-primary);
152
+ }
153
+
154
+ /* Active State */
155
+ .timeline-item.active .timeline-marker {
156
+ border-color: var(--color-primary);
157
+ background-color: var(--color-primary);
158
+ box-shadow: 0 0 0 4px var(--color-primary-container);
159
+ }
160
+
161
+ .timeline-item.active .timeline-marker-icon,
162
+ .timeline-item.active .timeline-marker-dot {
163
+ color: var(--color-on-primary);
164
+ background-color: var(--color-on-primary);
165
+ }
166
+
167
+ /* Size Variants */
168
+ .timeline-sm::before {
169
+ left: 0.75rem;
170
+ }
171
+
172
+ .timeline-sm .timeline-marker {
173
+ width: 1.5rem;
174
+ height: 1.5rem;
175
+ }
176
+
177
+ .timeline-sm .timeline-marker-icon {
178
+ font-size: 0.75rem;
179
+ }
180
+
181
+ .timeline-sm .timeline-marker-dot {
182
+ width: 0.5rem;
183
+ height: 0.5rem;
184
+ }
185
+
186
+ .timeline-lg::before {
187
+ left: 1.5rem;
188
+ }
189
+
190
+ .timeline-lg .timeline-marker {
191
+ width: 3rem;
192
+ height: 3rem;
193
+ }
194
+
195
+ .timeline-lg .timeline-marker-icon {
196
+ font-size: 1.25rem;
197
+ }
198
+
199
+ /* Alternate Layout (zigzag) */
200
+ .timeline-alternate {
201
+ padding-left: 0;
202
+ }
203
+
204
+ .timeline-alternate::before {
205
+ left: 50%;
206
+ transform: translateX(-50%);
207
+ }
208
+
209
+ .timeline-alternate .timeline-item {
210
+ width: 50%;
211
+ padding-right: 2rem;
212
+ }
213
+
214
+ .timeline-alternate .timeline-item:nth-child(even) {
215
+ margin-left: 50%;
216
+ padding-right: 0;
217
+ padding-left: 2rem;
218
+ flex-direction: row-reverse;
219
+ }
220
+
221
+ .timeline-alternate .timeline-item:nth-child(even) .timeline-content {
222
+ text-align: right;
223
+ }
224
+
225
+ .timeline-alternate .timeline-marker {
226
+ position: absolute;
227
+ left: 100%;
228
+ transform: translateX(-50%);
229
+ }
230
+
231
+ .timeline-alternate .timeline-item:nth-child(even) .timeline-marker {
232
+ left: 0;
233
+ transform: translateX(-50%);
234
+ }
235
+
236
+ /* Right-aligned Timeline */
237
+ .timeline-right {
238
+ align-items: flex-end;
239
+ }
240
+
241
+ .timeline-right::before {
242
+ left: auto;
243
+ right: 1.25rem;
244
+ }
245
+
246
+ .timeline-right .timeline-item {
247
+ flex-direction: row-reverse;
248
+ }
249
+
250
+ .timeline-right .timeline-content {
251
+ text-align: right;
252
+ }
253
+
254
+ /* Horizontal Timeline */
255
+ .timeline-horizontal {
256
+ flex-direction: row;
257
+ overflow-x: auto;
258
+ padding-bottom: 1rem;
259
+ }
260
+
261
+ .timeline-horizontal::before {
262
+ top: 1.25rem;
263
+ left: 0;
264
+ width: 100%;
265
+ height: 2px;
266
+ }
267
+
268
+ .timeline-horizontal .timeline-item {
269
+ flex-direction: column;
270
+ padding-bottom: 0;
271
+ padding-right: 2rem;
272
+ min-width: 10rem;
273
+ }
274
+
275
+ .timeline-horizontal .timeline-item:last-child {
276
+ padding-right: 0;
277
+ }
278
+
279
+ .timeline-horizontal .timeline-content {
280
+ padding-top: 1rem;
281
+ text-align: center;
282
+ }
283
+
284
+ /* Collapsible Timeline */
285
+ .timeline-collapsible .timeline-item {
286
+ cursor: pointer;
287
+ }
288
+
289
+ .timeline-collapsible .timeline-description {
290
+ display: none;
291
+ }
292
+
293
+ .timeline-collapsible .timeline-item.expanded .timeline-description {
294
+ display: block;
295
+ }
296
+
297
+ /* Loading State */
298
+ .timeline-item.loading .timeline-marker {
299
+ animation: timeline-pulse 1.5s ease-in-out infinite;
300
+ }
301
+
302
+ @keyframes timeline-pulse {
303
+ 0%, 100% {
304
+ opacity: 1;
305
+ }
306
+ 50% {
307
+ opacity: 0.5;
308
+ }
309
+ }
310
+
311
+ /* Connected Line Progress */
312
+ .timeline-progress::before {
313
+ background: linear-gradient(
314
+ to bottom,
315
+ var(--color-primary) var(--timeline-progress, 0%),
316
+ var(--color-outline-variant) var(--timeline-progress, 0%)
317
+ );
318
+ }
319
+
320
+ /* Responsive */
321
+ @media (max-width: 640px) {
322
+ .timeline-alternate::before {
323
+ left: 1.25rem;
324
+ transform: none;
325
+ }
326
+
327
+ .timeline-alternate .timeline-item,
328
+ .timeline-alternate .timeline-item:nth-child(even) {
329
+ width: 100%;
330
+ margin-left: 0;
331
+ padding-left: 0;
332
+ padding-right: 0;
333
+ flex-direction: row;
334
+ }
335
+
336
+ .timeline-alternate .timeline-item:nth-child(even) .timeline-content {
337
+ text-align: left;
338
+ }
339
+
340
+ .timeline-alternate .timeline-marker,
341
+ .timeline-alternate .timeline-item:nth-child(even) .timeline-marker {
342
+ position: relative;
343
+ left: 0;
344
+ transform: none;
345
+ }
346
+ }
347
+
348
+ /* Reduce Motion */
349
+ @media (prefers-reduced-motion: reduce) {
350
+ .timeline-item.loading .timeline-marker {
351
+ animation: none;
352
+ }
353
+ }
354
+ }
355
+ `;
356
+
357
+ const sheet = new CSSStyleSheet();
358
+ sheet.replaceSync(css);
359
+ export const styles = sheet;
360
+ export default sheet;