@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,341 @@
1
+ // Auto-generated from bottomsheet.css
2
+ export const css = `/**
3
+ * Bottom Sheet Component Styles
4
+ * DuskMoonUI - Material Design 3 inspired bottom sheet system
5
+ */
6
+
7
+ @layer components {
8
+ /* Bottom Sheet Backdrop */
9
+ .bottomsheet-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
+ .bottomsheet-backdrop.show {
20
+ opacity: 1;
21
+ visibility: visible;
22
+ }
23
+
24
+ /* Base Bottom Sheet */
25
+ .bottomsheet {
26
+ position: fixed;
27
+ bottom: 0;
28
+ left: 0;
29
+ right: 0;
30
+ z-index: 1200;
31
+ display: flex;
32
+ flex-direction: column;
33
+ max-height: 90vh;
34
+ background-color: var(--color-surface);
35
+ border-radius: 1.75rem 1.75rem 0 0;
36
+ box-shadow: 0 -25px 50px -12px rgb(0 0 0 / 0.25);
37
+ transform: translateY(100%);
38
+ transition: transform 300ms ease-out;
39
+ padding-bottom: env(safe-area-inset-bottom, 0);
40
+ }
41
+
42
+ .bottomsheet.show {
43
+ transform: translateY(0);
44
+ }
45
+
46
+ /* Drag Handle */
47
+ .bottomsheet-handle {
48
+ display: flex;
49
+ justify-content: center;
50
+ padding: 1rem;
51
+ cursor: grab;
52
+ touch-action: none;
53
+ }
54
+
55
+ .bottomsheet-handle::before {
56
+ content: '';
57
+ width: 2rem;
58
+ height: 0.25rem;
59
+ background-color: var(--color-outline-variant);
60
+ border-radius: 9999px;
61
+ }
62
+
63
+ .bottomsheet-handle:active {
64
+ cursor: grabbing;
65
+ }
66
+
67
+ /* Bottom Sheet Header */
68
+ .bottomsheet-header {
69
+ display: flex;
70
+ align-items: center;
71
+ gap: 0.75rem;
72
+ padding: 0 1.5rem 1rem;
73
+ flex-shrink: 0;
74
+ }
75
+
76
+ .bottomsheet-title {
77
+ flex: 1;
78
+ font-size: 1.25rem;
79
+ font-weight: 500;
80
+ color: var(--color-on-surface);
81
+ }
82
+
83
+ .bottomsheet-close {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ width: 2.5rem;
88
+ height: 2.5rem;
89
+ color: var(--color-on-surface-variant);
90
+ background-color: transparent;
91
+ border: none;
92
+ border-radius: 50%;
93
+ cursor: pointer;
94
+ transition: background-color 150ms ease-in-out;
95
+ }
96
+
97
+ .bottomsheet-close:hover {
98
+ background-color: var(--color-surface-container);
99
+ }
100
+
101
+ .bottomsheet-close:focus-visible {
102
+ outline: 2px solid var(--color-primary);
103
+ outline-offset: 2px;
104
+ }
105
+
106
+ /* Bottom Sheet Content */
107
+ .bottomsheet-content {
108
+ flex: 1;
109
+ overflow-y: auto;
110
+ padding: 0 1.5rem;
111
+ overscroll-behavior: contain;
112
+ }
113
+
114
+ /* Bottom Sheet Footer */
115
+ .bottomsheet-footer {
116
+ display: flex;
117
+ align-items: center;
118
+ gap: 0.75rem;
119
+ padding: 1rem 1.5rem;
120
+ border-top: 1px solid var(--color-outline-variant);
121
+ flex-shrink: 0;
122
+ }
123
+
124
+ /* List Items in Bottom Sheet */
125
+ .bottomsheet-list {
126
+ display: flex;
127
+ flex-direction: column;
128
+ margin: 0 -1.5rem;
129
+ }
130
+
131
+ .bottomsheet-item {
132
+ display: flex;
133
+ align-items: center;
134
+ gap: 1rem;
135
+ width: 100%;
136
+ padding: 1rem 1.5rem;
137
+ font-size: 0.875rem;
138
+ color: var(--color-on-surface);
139
+ background-color: transparent;
140
+ border: none;
141
+ cursor: pointer;
142
+ text-align: left;
143
+ text-decoration: none;
144
+ transition: background-color 150ms ease-in-out;
145
+ }
146
+
147
+ .bottomsheet-item:hover {
148
+ background-color: var(--color-surface-container);
149
+ }
150
+
151
+ .bottomsheet-item:focus-visible {
152
+ outline: none;
153
+ background-color: var(--color-surface-container);
154
+ box-shadow: inset 0 0 0 2px var(--color-primary);
155
+ }
156
+
157
+ .bottomsheet-item-icon {
158
+ display: flex;
159
+ align-items: center;
160
+ justify-content: center;
161
+ width: 1.5rem;
162
+ height: 1.5rem;
163
+ color: var(--color-on-surface-variant);
164
+ font-size: 1.25rem;
165
+ flex-shrink: 0;
166
+ }
167
+
168
+ .bottomsheet-item-content {
169
+ flex: 1;
170
+ min-width: 0;
171
+ }
172
+
173
+ .bottomsheet-item-label {
174
+ font-weight: 500;
175
+ overflow: hidden;
176
+ text-overflow: ellipsis;
177
+ white-space: nowrap;
178
+ }
179
+
180
+ .bottomsheet-item-description {
181
+ font-size: 0.75rem;
182
+ color: var(--color-on-surface-variant);
183
+ margin-top: 0.125rem;
184
+ overflow: hidden;
185
+ text-overflow: ellipsis;
186
+ white-space: nowrap;
187
+ }
188
+
189
+ /* Grid Items */
190
+ .bottomsheet-grid {
191
+ display: grid;
192
+ grid-template-columns: repeat(3, 1fr);
193
+ gap: 0.5rem;
194
+ padding: 0.5rem 0;
195
+ }
196
+
197
+ .bottomsheet-grid-item {
198
+ display: flex;
199
+ flex-direction: column;
200
+ align-items: center;
201
+ gap: 0.5rem;
202
+ padding: 1rem 0.5rem;
203
+ font-size: 0.75rem;
204
+ color: var(--color-on-surface);
205
+ background-color: transparent;
206
+ border: none;
207
+ border-radius: 0.75rem;
208
+ cursor: pointer;
209
+ transition: background-color 150ms ease-in-out;
210
+ }
211
+
212
+ .bottomsheet-grid-item:hover {
213
+ background-color: var(--color-surface-container);
214
+ }
215
+
216
+ .bottomsheet-grid-item-icon {
217
+ display: flex;
218
+ align-items: center;
219
+ justify-content: center;
220
+ width: 3rem;
221
+ height: 3rem;
222
+ font-size: 1.5rem;
223
+ background-color: var(--color-surface-container-high);
224
+ border-radius: 50%;
225
+ color: var(--color-on-surface-variant);
226
+ }
227
+
228
+ /* Size Variants */
229
+ .bottomsheet-sm {
230
+ max-height: 50vh;
231
+ }
232
+
233
+ .bottomsheet-lg {
234
+ max-height: 95vh;
235
+ }
236
+
237
+ .bottomsheet-full {
238
+ max-height: 100vh;
239
+ height: 100vh;
240
+ border-radius: 0;
241
+ }
242
+
243
+ /* Persistent (non-modal) */
244
+ .bottomsheet-persistent {
245
+ position: absolute;
246
+ box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.1);
247
+ }
248
+
249
+ /* Expandable Heights */
250
+ .bottomsheet-peek {
251
+ max-height: 30vh;
252
+ }
253
+
254
+ .bottomsheet-half {
255
+ max-height: 50vh;
256
+ }
257
+
258
+ .bottomsheet-expanded {
259
+ max-height: 90vh;
260
+ }
261
+
262
+ /* Detent Indicators */
263
+ .bottomsheet-detents {
264
+ position: absolute;
265
+ right: 1rem;
266
+ top: 50%;
267
+ transform: translateY(-50%);
268
+ display: flex;
269
+ flex-direction: column;
270
+ gap: 0.25rem;
271
+ }
272
+
273
+ .bottomsheet-detent {
274
+ width: 0.25rem;
275
+ height: 1rem;
276
+ background-color: var(--color-outline-variant);
277
+ border-radius: 9999px;
278
+ cursor: pointer;
279
+ }
280
+
281
+ .bottomsheet-detent.active {
282
+ background-color: var(--color-primary);
283
+ }
284
+
285
+ /* Divider in Bottom Sheet */
286
+ .bottomsheet-divider {
287
+ height: 1px;
288
+ margin: 0.5rem 0;
289
+ background-color: var(--color-outline-variant);
290
+ }
291
+
292
+ /* Section Title */
293
+ .bottomsheet-section-title {
294
+ padding: 0.75rem 0;
295
+ font-size: 0.75rem;
296
+ font-weight: 600;
297
+ text-transform: uppercase;
298
+ letter-spacing: 0.05em;
299
+ color: var(--color-on-surface-variant);
300
+ }
301
+
302
+ /* Desktop Breakpoint - Convert to Side Sheet */
303
+ @media (min-width: 768px) {
304
+ .bottomsheet-responsive {
305
+ left: auto;
306
+ right: 0;
307
+ top: 0;
308
+ bottom: 0;
309
+ width: 24rem;
310
+ max-width: calc(100vw - 3.5rem);
311
+ max-height: 100vh;
312
+ border-radius: 1rem 0 0 1rem;
313
+ transform: translateX(100%);
314
+ }
315
+
316
+ .bottomsheet-responsive.show {
317
+ transform: translateX(0);
318
+ }
319
+
320
+ .bottomsheet-responsive .bottomsheet-handle {
321
+ display: none;
322
+ }
323
+ }
324
+
325
+ /* Reduce Motion */
326
+ @media (prefers-reduced-motion: reduce) {
327
+ .bottomsheet,
328
+ .bottomsheet-backdrop,
329
+ .bottomsheet-close,
330
+ .bottomsheet-item,
331
+ .bottomsheet-grid-item {
332
+ transition: none;
333
+ }
334
+ }
335
+ }
336
+ `;
337
+
338
+ const sheet = new CSSStyleSheet();
339
+ sheet.replaceSync(css);
340
+ export const styles = sheet;
341
+ export default sheet;