@duskmoon-dev/core 1.19.11 → 1.20.1
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.
- package/README.md +9 -2
- package/dist/components/chat.css +108 -43
- package/dist/components/index.css +211 -152
- package/dist/components/modal.css +103 -109
- package/dist/esm/components/chat.js +108 -43
- package/dist/esm/components/modal.js +103 -109
- package/dist/index.css +335 -276
- package/dist/index.min.css +1 -1
- package/dist/standalone/duskmoonui-themes.css +125 -125
- package/dist/standalone/duskmoonui.css +337 -278
- package/dist/standalone/duskmoonui.js +7 -7
- package/dist/standalone/duskmoonui.mjs +7 -7
- package/dist/themes/generated/sunshine.css +62 -62
- package/package.json +1 -1
|
@@ -5,33 +5,39 @@ export const css = `/**
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
@layer components {
|
|
8
|
-
/*
|
|
9
|
-
.modal {
|
|
8
|
+
/* Native HTML dialog owns visibility and modal behavior. */
|
|
9
|
+
dialog.modal {
|
|
10
10
|
position: fixed;
|
|
11
11
|
inset: 0;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
margin: auto;
|
|
13
|
+
padding: 0;
|
|
14
|
+
border: none;
|
|
15
|
+
width: calc(100% - 2rem);
|
|
16
|
+
max-width: 32rem;
|
|
17
|
+
max-height: calc(100dvh - 2rem);
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
background-color: transparent;
|
|
20
|
+
color: var(--color-on-surface);
|
|
21
|
+
border-radius: var(--radius-lg);
|
|
22
|
+
overflow: visible;
|
|
18
23
|
opacity: 0;
|
|
19
|
-
transition:
|
|
24
|
+
transition: opacity 200ms ease-out, display 200ms allow-discrete, overlay 200ms allow-discrete;
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
.modal.modal-open,
|
|
24
|
-
.modal:target {
|
|
25
|
-
visibility: visible;
|
|
27
|
+
dialog.modal[open] {
|
|
26
28
|
opacity: 1;
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
dialog.modal:not([open]) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
/* Modal Box */
|
|
30
36
|
.modal-box {
|
|
31
37
|
position: relative;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
max-height: calc(100dvh -
|
|
38
|
+
width: 100%;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
max-height: calc(100dvh - 2rem);
|
|
35
41
|
padding: 1.5rem;
|
|
36
42
|
background-color: var(--color-surface);
|
|
37
43
|
color: var(--color-on-surface);
|
|
@@ -42,24 +48,19 @@ export const css = `/**
|
|
|
42
48
|
transition: transform 200ms ease-out;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
.modal
|
|
46
|
-
.modal:target .modal-box {
|
|
51
|
+
dialog.modal[open] .modal-box {
|
|
47
52
|
transform: scale(1);
|
|
48
53
|
}
|
|
49
54
|
|
|
50
|
-
/*
|
|
51
|
-
.modal
|
|
52
|
-
position: fixed;
|
|
53
|
-
inset: 0;
|
|
54
|
-
z-index: -1;
|
|
55
|
+
/* The browser renders the backdrop in the top layer. */
|
|
56
|
+
dialog.modal::backdrop {
|
|
55
57
|
background-color: color-mix(in srgb, var(--color-scrim) 50%, transparent);
|
|
56
|
-
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transition: opacity 200ms ease-out, display 200ms allow-discrete, overlay 200ms allow-discrete;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
|
-
.modal
|
|
60
|
-
|
|
61
|
-
position: absolute;
|
|
62
|
-
inset: 0;
|
|
62
|
+
dialog.modal[open]::backdrop {
|
|
63
|
+
opacity: 1;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
/* Modal Action */
|
|
@@ -73,61 +74,47 @@ export const css = `/**
|
|
|
73
74
|
padding-top: 1rem;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
/* Modal Toggle (CSS-only) */
|
|
77
|
-
.modal-toggle {
|
|
78
|
-
position: fixed;
|
|
79
|
-
width: 0;
|
|
80
|
-
height: 0;
|
|
81
|
-
appearance: none;
|
|
82
|
-
opacity: 0;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.modal-toggle:checked + .modal {
|
|
86
|
-
visibility: visible;
|
|
87
|
-
opacity: 1;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.modal-toggle:checked + .modal .modal-box {
|
|
91
|
-
transform: scale(1);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
77
|
/* Modal Sizes */
|
|
95
|
-
.modal
|
|
78
|
+
dialog.modal.modal-sm {
|
|
96
79
|
max-width: 20rem;
|
|
97
80
|
}
|
|
98
81
|
|
|
99
|
-
.modal
|
|
82
|
+
dialog.modal.modal-md {
|
|
100
83
|
max-width: 32rem;
|
|
101
84
|
}
|
|
102
85
|
|
|
103
|
-
.modal
|
|
86
|
+
dialog.modal.modal-lg {
|
|
104
87
|
max-width: 48rem;
|
|
105
88
|
}
|
|
106
89
|
|
|
107
|
-
.modal
|
|
90
|
+
dialog.modal.modal-xl {
|
|
108
91
|
max-width: 64rem;
|
|
109
92
|
}
|
|
110
93
|
|
|
111
|
-
.modal
|
|
94
|
+
dialog.modal.modal-full {
|
|
112
95
|
max-width: calc(100vw - 2rem);
|
|
113
|
-
max-height: calc(
|
|
114
|
-
width: 100
|
|
96
|
+
max-height: calc(100dvh - 2rem);
|
|
97
|
+
width: calc(100% - 2rem);
|
|
98
|
+
height: calc(100dvh - 2rem);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
dialog.modal.modal-full .modal-box {
|
|
115
102
|
height: 100%;
|
|
116
103
|
}
|
|
117
104
|
|
|
118
105
|
/* Modal Positions */
|
|
119
|
-
.modal-top {
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
dialog.modal.modal-top {
|
|
107
|
+
margin-top: 2rem;
|
|
108
|
+
margin-bottom: auto;
|
|
122
109
|
}
|
|
123
110
|
|
|
124
|
-
.modal-bottom {
|
|
125
|
-
|
|
126
|
-
|
|
111
|
+
dialog.modal.modal-bottom {
|
|
112
|
+
margin-top: auto;
|
|
113
|
+
margin-bottom: 2rem;
|
|
127
114
|
}
|
|
128
115
|
|
|
129
|
-
.modal-middle {
|
|
130
|
-
|
|
116
|
+
dialog.modal.modal-middle {
|
|
117
|
+
margin: auto;
|
|
131
118
|
}
|
|
132
119
|
|
|
133
120
|
/* Animation Variants */
|
|
@@ -143,22 +130,21 @@ export const css = `/**
|
|
|
143
130
|
transform: scale(0.75);
|
|
144
131
|
}
|
|
145
132
|
|
|
146
|
-
:is(.modal-slide-up, .modal-slide-down, .modal-zoom)
|
|
147
|
-
:is(.modal-slide-up, .modal-slide-down, .modal-zoom):target .modal-box {
|
|
133
|
+
dialog.modal:is(.modal-slide-up, .modal-slide-down, .modal-zoom)[open] .modal-box {
|
|
148
134
|
transform: translateY(0) scale(1);
|
|
149
135
|
}
|
|
150
136
|
|
|
151
137
|
/* Backdrop Variants */
|
|
152
|
-
.modal-backdrop-light {
|
|
138
|
+
dialog.modal.modal-backdrop-light::backdrop {
|
|
153
139
|
background-color: color-mix(in srgb, white 80%, transparent);
|
|
154
140
|
}
|
|
155
141
|
|
|
156
|
-
.modal-backdrop-blur {
|
|
142
|
+
dialog.modal.modal-backdrop-blur::backdrop {
|
|
157
143
|
background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
|
|
158
144
|
backdrop-filter: blur(8px);
|
|
159
145
|
}
|
|
160
146
|
|
|
161
|
-
.modal-no-backdrop {
|
|
147
|
+
dialog.modal.modal-no-backdrop::backdrop {
|
|
162
148
|
background-color: transparent;
|
|
163
149
|
}
|
|
164
150
|
|
|
@@ -228,55 +214,50 @@ export const css = `/**
|
|
|
228
214
|
|
|
229
215
|
/* Responsive Modal */
|
|
230
216
|
@media (max-width: 640px) {
|
|
231
|
-
.modal-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
align-items: flex-end;
|
|
238
|
-
padding: 0;
|
|
217
|
+
dialog.modal.modal-responsive {
|
|
218
|
+
width: 100%;
|
|
219
|
+
max-width: 100%;
|
|
220
|
+
max-height: 90dvh;
|
|
221
|
+
margin: auto 0 0;
|
|
222
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
239
223
|
}
|
|
240
224
|
|
|
241
225
|
.modal-responsive .modal-box {
|
|
242
|
-
max-width: 100%;
|
|
243
226
|
max-height: 90dvh;
|
|
244
|
-
margin: 0;
|
|
245
227
|
border-radius: var(--radius-lg) var(--radius-lg) 0 0;
|
|
246
228
|
}
|
|
247
229
|
}
|
|
248
230
|
|
|
249
231
|
/* Drawer Modal */
|
|
250
|
-
.drawer-modal {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
232
|
+
dialog.modal.drawer-modal {
|
|
233
|
+
width: min(20rem, 100%);
|
|
234
|
+
max-width: 20rem;
|
|
235
|
+
max-height: 100dvh;
|
|
236
|
+
height: 100dvh;
|
|
237
|
+
margin: 0 0 0 auto;
|
|
238
|
+
border-radius: 0;
|
|
254
239
|
}
|
|
255
240
|
|
|
256
241
|
.drawer-modal .modal-box {
|
|
257
|
-
max-width: 20rem;
|
|
258
242
|
max-height: 100dvh;
|
|
259
243
|
height: 100%;
|
|
260
|
-
margin: 0;
|
|
261
244
|
border-radius: 0;
|
|
262
245
|
transform: translateX(100%);
|
|
263
246
|
}
|
|
264
247
|
|
|
265
|
-
.drawer-modal
|
|
266
|
-
.drawer-modal:target .modal-box {
|
|
248
|
+
dialog.modal.drawer-modal[open] .modal-box {
|
|
267
249
|
transform: translateX(0);
|
|
268
250
|
}
|
|
269
251
|
|
|
270
|
-
.drawer-modal-left {
|
|
271
|
-
|
|
252
|
+
dialog.modal.drawer-modal-left {
|
|
253
|
+
margin: 0 auto 0 0;
|
|
272
254
|
}
|
|
273
255
|
|
|
274
256
|
.drawer-modal-left .modal-box {
|
|
275
257
|
transform: translateX(-100%);
|
|
276
258
|
}
|
|
277
259
|
|
|
278
|
-
.drawer-modal-left
|
|
279
|
-
.drawer-modal-left:target .modal-box {
|
|
260
|
+
dialog.modal.drawer-modal-left[open] .modal-box {
|
|
280
261
|
transform: translateX(0);
|
|
281
262
|
}
|
|
282
263
|
|
|
@@ -285,7 +266,7 @@ export const css = `/**
|
|
|
285
266
|
text-align: center;
|
|
286
267
|
}
|
|
287
268
|
|
|
288
|
-
.alert-dialog
|
|
269
|
+
dialog.modal.alert-dialog {
|
|
289
270
|
max-width: 24rem;
|
|
290
271
|
}
|
|
291
272
|
|
|
@@ -324,32 +305,45 @@ export const css = `/**
|
|
|
324
305
|
justify-content: center;
|
|
325
306
|
}
|
|
326
307
|
|
|
327
|
-
/*
|
|
328
|
-
@
|
|
329
|
-
.modal
|
|
330
|
-
|
|
308
|
+
/* Entry styles retain motion without changing native visibility. */
|
|
309
|
+
@starting-style {
|
|
310
|
+
dialog.modal[open],
|
|
311
|
+
dialog.modal[open]::backdrop {
|
|
312
|
+
opacity: 0;
|
|
331
313
|
}
|
|
332
314
|
|
|
333
|
-
.modal-box {
|
|
334
|
-
|
|
315
|
+
dialog.modal[open] .modal-box {
|
|
316
|
+
transform: scale(0.95);
|
|
335
317
|
}
|
|
336
|
-
}
|
|
337
318
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
319
|
+
dialog.modal.modal-slide-up[open] .modal-box {
|
|
320
|
+
transform: translateY(6rem) scale(0.95);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
dialog.modal.modal-slide-down[open] .modal-box {
|
|
324
|
+
transform: translateY(-6rem) scale(0.95);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
dialog.modal.modal-zoom[open] .modal-box {
|
|
328
|
+
transform: scale(0.75);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
dialog.modal.drawer-modal[open] .modal-box {
|
|
332
|
+
transform: translateX(100%);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
dialog.modal.drawer-modal-left[open] .modal-box {
|
|
336
|
+
transform: translateX(-100%);
|
|
337
|
+
}
|
|
349
338
|
}
|
|
350
339
|
|
|
351
|
-
|
|
352
|
-
|
|
340
|
+
/* Reduce Motion */
|
|
341
|
+
@media (prefers-reduced-motion: reduce) {
|
|
342
|
+
dialog.modal,
|
|
343
|
+
dialog.modal::backdrop,
|
|
344
|
+
.modal-box {
|
|
345
|
+
transition: none;
|
|
346
|
+
}
|
|
353
347
|
}
|
|
354
348
|
}
|
|
355
349
|
`;
|