@duskmoon-dev/core 1.19.4 → 1.19.5

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.
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Loading Component Styles
3
+ * CSS-only activity indicators. State, aria-busy, and disabling remain consumer-owned.
4
+ */
5
+
6
+ @layer components {
7
+ .loading {
8
+ --loading-size: 1.25rem;
9
+ display: inline-flex;
10
+ width: var(--loading-size);
11
+ height: var(--loading-size);
12
+ flex: 0 0 var(--loading-size);
13
+ color: currentColor;
14
+ vertical-align: middle;
15
+ }
16
+
17
+ .loading-spinner {
18
+ border: max(2px, calc(var(--loading-size) / 8)) solid color-mix(in oklch, currentColor 25%, transparent);
19
+ border-top-color: currentColor;
20
+ border-radius: var(--radius-full);
21
+ animation: loading-spin 800ms linear infinite;
22
+ }
23
+
24
+ .loading-dots,
25
+ .loading-bars {
26
+ align-items: center;
27
+ justify-content: center;
28
+ gap: max(2px, calc(var(--loading-size) / 8));
29
+ }
30
+
31
+ .loading-dots::before,
32
+ .loading-dots::after,
33
+ .loading-bars::before,
34
+ .loading-bars::after {
35
+ content: "";
36
+ display: block;
37
+ background: currentColor;
38
+ }
39
+
40
+ .loading-dots::before,
41
+ .loading-dots::after {
42
+ width: 25%;
43
+ height: 25%;
44
+ border-radius: var(--radius-full);
45
+ box-shadow: calc(var(--loading-size) / 3) 0 currentColor;
46
+ animation: loading-dots 900ms ease-in-out infinite;
47
+ }
48
+
49
+ .loading-dots::after {
50
+ display: none;
51
+ }
52
+
53
+ .loading-bars {
54
+ padding-inline: 10%;
55
+ }
56
+
57
+ .loading-bars::before,
58
+ .loading-bars::after {
59
+ width: 18%;
60
+ height: 65%;
61
+ border-radius: var(--radius-xs);
62
+ box-shadow: calc(var(--loading-size) / 3) 0 currentColor, calc(var(--loading-size) * 2 / 3) 0 currentColor;
63
+ animation: loading-bars 900ms ease-in-out infinite;
64
+ }
65
+
66
+ .loading-bars::after {
67
+ display: none;
68
+ }
69
+
70
+ .loading-xs { --loading-size: 0.75rem; }
71
+ .loading-sm { --loading-size: 1rem; }
72
+ .loading-md { --loading-size: 1.25rem; }
73
+ .loading-lg { --loading-size: 1.75rem; }
74
+ .loading-xl { --loading-size: 2.5rem; }
75
+
76
+ .loading-primary { color: var(--color-primary); }
77
+ .loading-secondary { color: var(--color-secondary); }
78
+ .loading-tertiary { color: var(--color-tertiary); }
79
+ .loading-info { color: var(--color-info); }
80
+ .loading-success { color: var(--color-success); }
81
+ .loading-warning { color: var(--color-warning); }
82
+ .loading-error { color: var(--color-error); }
83
+
84
+ @keyframes loading-spin {
85
+ to { transform: rotate(360deg); }
86
+ }
87
+
88
+ @keyframes loading-dots {
89
+ 0%, 100% { opacity: 0.35; transform: scale(0.75); }
90
+ 50% { opacity: 1; transform: scale(1); }
91
+ }
92
+
93
+ @keyframes loading-bars {
94
+ 0%, 100% { opacity: 0.35; transform: scaleY(0.65); }
95
+ 50% { opacity: 1; transform: scaleY(1); }
96
+ }
97
+
98
+ @media (prefers-reduced-motion: reduce) {
99
+ .loading-spinner,
100
+ .loading-dots::before,
101
+ .loading-bars::before {
102
+ animation: none;
103
+ }
104
+ }
105
+ }
@@ -62,7 +62,8 @@
62
62
  }
63
63
 
64
64
  /* Modal Action */
65
- .modal-action {
65
+ .modal-action,
66
+ .modal-footer {
66
67
  display: flex;
67
68
  justify-content: flex-end;
68
69
  gap: 0.5rem;
@@ -93,10 +94,18 @@
93
94
  max-width: 20rem;
94
95
  }
95
96
 
97
+ .modal-md .modal-box {
98
+ max-width: 32rem;
99
+ }
100
+
96
101
  .modal-lg .modal-box {
97
102
  max-width: 48rem;
98
103
  }
99
104
 
105
+ .modal-xl .modal-box {
106
+ max-width: 64rem;
107
+ }
108
+
100
109
  .modal-full .modal-box {
101
110
  max-width: calc(100vw - 2rem);
102
111
  max-height: calc(100vh - 2rem);
@@ -119,6 +128,38 @@
119
128
  align-items: center;
120
129
  }
121
130
 
131
+ /* Animation Variants */
132
+ .modal-slide-up .modal-box {
133
+ transform: translateY(6rem) scale(0.95);
134
+ }
135
+
136
+ .modal-slide-down .modal-box {
137
+ transform: translateY(-6rem) scale(0.95);
138
+ }
139
+
140
+ .modal-zoom .modal-box {
141
+ transform: scale(0.75);
142
+ }
143
+
144
+ :is(.modal-slide-up, .modal-slide-down, .modal-zoom).modal-open .modal-box,
145
+ :is(.modal-slide-up, .modal-slide-down, .modal-zoom):target .modal-box {
146
+ transform: translateY(0) scale(1);
147
+ }
148
+
149
+ /* Backdrop Variants */
150
+ .modal-backdrop-light {
151
+ background-color: color-mix(in srgb, white 80%, transparent);
152
+ }
153
+
154
+ .modal-backdrop-blur {
155
+ background-color: color-mix(in srgb, var(--color-scrim) 30%, transparent);
156
+ backdrop-filter: blur(8px);
157
+ }
158
+
159
+ .modal-no-backdrop {
160
+ background-color: transparent;
161
+ }
162
+
122
163
  /* Modal Close Button */
123
164
  .modal-close {
124
165
  position: absolute;
@@ -167,6 +208,22 @@
167
208
  line-height: 1.5;
168
209
  }
169
210
 
211
+ .modal-scrollable .modal-body {
212
+ max-height: 60vh;
213
+ overflow-y: auto;
214
+ }
215
+
216
+ .modal-no-padding .modal-body {
217
+ padding: 0;
218
+ }
219
+
220
+ .modal-centered .modal-body {
221
+ display: flex;
222
+ align-items: center;
223
+ justify-content: center;
224
+ text-align: center;
225
+ }
226
+
170
227
  /* Responsive Modal */
171
228
  @media (max-width: 640px) {
172
229
  .modal-box {
@@ -288,4 +345,8 @@
288
345
  white-space: nowrap;
289
346
  border: 0;
290
347
  }
348
+
349
+ body.modal-open {
350
+ overflow: hidden;
351
+ }
291
352
  }
@@ -14,6 +14,36 @@
14
14
  overflow: hidden;
15
15
  }
16
16
 
17
+ /* Native progress keeps the platform's accessible value/max contract. */
18
+ progress.progress {
19
+ appearance: none;
20
+ border: 0;
21
+ display: block;
22
+ }
23
+
24
+ progress.progress::-webkit-progress-bar {
25
+ background: var(--color-surface-container-highest);
26
+ border-radius: var(--radius-full);
27
+ }
28
+
29
+ progress.progress::-webkit-progress-value {
30
+ background: var(--color-primary);
31
+ border-radius: var(--radius-full);
32
+ transition: width 300ms ease-in-out;
33
+ }
34
+
35
+ progress.progress::-moz-progress-bar {
36
+ background: var(--color-primary);
37
+ border-radius: var(--radius-full);
38
+ transition: width 300ms ease-in-out;
39
+ }
40
+
41
+ progress.progress:indeterminate::-webkit-progress-value,
42
+ progress.progress:indeterminate::-moz-progress-bar {
43
+ width: 30%;
44
+ animation: progress-indeterminate 1.5s infinite ease-in-out;
45
+ }
46
+
17
47
  /* Progress Bar */
18
48
  .progress-bar {
19
49
  position: absolute;
@@ -66,6 +96,21 @@
66
96
  background-color: var(--color-base-content);
67
97
  }
68
98
 
99
+ progress.progress-primary::-webkit-progress-value,
100
+ progress.progress-primary::-moz-progress-bar { background: var(--color-primary); }
101
+ progress.progress-secondary::-webkit-progress-value,
102
+ progress.progress-secondary::-moz-progress-bar { background: var(--color-secondary); }
103
+ progress.progress-tertiary::-webkit-progress-value,
104
+ progress.progress-tertiary::-moz-progress-bar { background: var(--color-tertiary); }
105
+ progress.progress-info::-webkit-progress-value,
106
+ progress.progress-info::-moz-progress-bar { background: var(--color-info); }
107
+ progress.progress-success::-webkit-progress-value,
108
+ progress.progress-success::-moz-progress-bar { background: var(--color-success); }
109
+ progress.progress-warning::-webkit-progress-value,
110
+ progress.progress-warning::-moz-progress-bar { background: var(--color-warning); }
111
+ progress.progress-error::-webkit-progress-value,
112
+ progress.progress-error::-moz-progress-bar { background: var(--color-error); }
113
+
69
114
  /* Size Variants */
70
115
  .progress-xs {
71
116
  height: 0.25rem;
@@ -141,6 +186,25 @@
141
186
  }
142
187
  }
143
188
 
189
+ /* Buffer tracks belong to custom markup, not native <progress>. */
190
+ .progress-buffer {
191
+ position: relative;
192
+ }
193
+
194
+ .progress-buffer-bar {
195
+ position: absolute;
196
+ inset-block: 0;
197
+ inset-inline-start: 0;
198
+ width: 0;
199
+ background: color-mix(in oklch, var(--color-primary) 30%, transparent);
200
+ border-radius: var(--radius-full);
201
+ transition: width 300ms ease-in-out;
202
+ }
203
+
204
+ .progress-buffer .progress-bar {
205
+ z-index: 1;
206
+ }
207
+
144
208
  /* Circular Progress */
145
209
  .progress-circular {
146
210
  position: relative;
@@ -240,7 +304,17 @@
240
304
 
241
305
  /* Reduce Motion */
242
306
  @media (prefers-reduced-motion: reduce) {
307
+ .progress-bar,
308
+ progress.progress::-webkit-progress-value,
309
+ progress.progress::-moz-progress-bar,
310
+ .progress-circular-bar,
311
+ .progress-buffer-bar {
312
+ transition: none;
313
+ }
314
+
243
315
  .progress-indeterminate .progress-bar,
316
+ progress.progress:indeterminate::-webkit-progress-value,
317
+ progress.progress:indeterminate::-moz-progress-bar,
244
318
  .progress-striped.progress-animated .progress-bar,
245
319
  .progress-circular-indeterminate svg,
246
320
  .progress-circular-indeterminate .progress-circular-bar {
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Radial Progress Component Styles
3
+ * Determinate percentage progress without circumference arithmetic.
4
+ */
5
+
6
+ @layer components {
7
+ .radial-progress {
8
+ --radial-progress-value: 0;
9
+ --radial-progress-size: 3rem;
10
+ --radial-progress-thickness: 0.375rem;
11
+ --radial-progress-track: var(--color-surface-container-highest);
12
+ position: relative;
13
+ display: inline-grid;
14
+ width: var(--radial-progress-size);
15
+ height: var(--radial-progress-size);
16
+ place-items: center;
17
+ color: var(--color-primary);
18
+ border-radius: var(--radius-full);
19
+ background: conic-gradient(currentColor calc(clamp(0, var(--radial-progress-value), 100) * 1%), var(--radial-progress-track) 0);
20
+ isolation: isolate;
21
+ }
22
+
23
+ .radial-progress::before {
24
+ content: "";
25
+ position: absolute;
26
+ inset: var(--radial-progress-thickness);
27
+ z-index: 0;
28
+ border-radius: inherit;
29
+ background: var(--color-surface);
30
+ }
31
+
32
+ .radial-progress-primary { color: var(--color-primary); }
33
+ .radial-progress-secondary { color: var(--color-secondary); }
34
+ .radial-progress-tertiary { color: var(--color-tertiary); }
35
+ .radial-progress-info { color: var(--color-info); }
36
+ .radial-progress-success { color: var(--color-success); }
37
+ .radial-progress-warning { color: var(--color-warning); }
38
+ .radial-progress-error { color: var(--color-error); }
39
+
40
+ .radial-progress-sm { --radial-progress-size: 2rem; --radial-progress-thickness: 0.25rem; }
41
+ .radial-progress-lg { --radial-progress-size: 4rem; --radial-progress-thickness: 0.5rem; }
42
+ .radial-progress-xl { --radial-progress-size: 6rem; --radial-progress-thickness: 0.625rem; }
43
+
44
+ @media (prefers-reduced-motion: reduce) {
45
+ .radial-progress { transition: none; }
46
+ }
47
+ }
@@ -31,6 +31,10 @@
31
31
  border-radius: var(--radius-sm);
32
32
  }
33
33
 
34
+ .skeleton-static {
35
+ animation: none;
36
+ }
37
+
34
38
  /* Size Variants */
35
39
  .skeleton-xs {
36
40
  height: 0.5rem;
@@ -133,7 +137,7 @@
133
137
  background: linear-gradient(
134
138
  90deg,
135
139
  transparent,
136
- rgba(255, 255, 255, 0.3),
140
+ color-mix(in oklch, var(--color-surface-bright) 35%, transparent),
137
141
  transparent
138
142
  );
139
143
  animation: skeleton-wave 1.5s infinite;
@@ -211,6 +215,14 @@
211
215
 
212
216
  .skeleton-wave::after {
213
217
  animation: none;
218
+ transform: translateX(0);
219
+ opacity: 0.35;
220
+ }
221
+
222
+ .skeleton-static::after {
223
+ animation: none;
224
+ transform: translateX(0);
225
+ opacity: 0.35;
214
226
  }
215
227
  }
216
228
  }
@@ -210,49 +210,49 @@
210
210
 
211
211
  /* Color Variants */
212
212
  .snackbar-info {
213
- background-color: var(--color-info-container);
214
- color: var(--color-on-info-container);
213
+ background-color: var(--color-info);
214
+ color: var(--color-info-content);
215
215
  }
216
216
 
217
217
  .snackbar-success {
218
- background-color: var(--color-success-container);
219
- color: var(--color-on-success-container);
218
+ background-color: var(--color-success);
219
+ color: var(--color-success-content);
220
220
  }
221
221
 
222
222
  .snackbar-warning {
223
- background-color: var(--color-warning-container);
224
- color: var(--color-on-warning-container);
223
+ background-color: var(--color-warning);
224
+ color: var(--color-warning-content);
225
225
  }
226
226
 
227
227
  .snackbar-error {
228
- background-color: var(--color-error-container);
229
- color: var(--color-on-error-container);
228
+ background-color: var(--color-error);
229
+ color: var(--color-error-content);
230
230
  }
231
231
 
232
232
  /* Brand Color Variants */
233
233
  .snackbar-primary {
234
- background-color: var(--color-primary-container);
235
- color: var(--color-on-primary-container);
234
+ background-color: var(--color-primary);
235
+ color: var(--color-primary-content);
236
236
  }
237
237
 
238
238
  .snackbar-secondary {
239
- background-color: var(--color-secondary-container);
240
- color: var(--color-on-secondary-container);
239
+ background-color: var(--color-secondary);
240
+ color: var(--color-secondary-content);
241
241
  }
242
242
 
243
243
  .snackbar-tertiary {
244
- background-color: var(--color-tertiary-container);
245
- color: var(--color-on-tertiary-container);
244
+ background-color: var(--color-tertiary);
245
+ color: var(--color-tertiary-content);
246
246
  }
247
247
 
248
248
  .snackbar-accent {
249
- background-color: color-mix(in oklch, var(--color-accent) 15%, var(--color-surface));
250
- color: var(--color-on-surface);
249
+ background-color: var(--color-accent);
250
+ color: var(--color-accent-content);
251
251
  }
252
252
 
253
253
  .snackbar-neutral {
254
- background-color: color-mix(in oklch, var(--color-neutral) 15%, var(--color-surface));
255
- color: var(--color-on-surface);
254
+ background-color: var(--color-neutral);
255
+ color: var(--color-neutral-content);
256
256
  }
257
257
 
258
258
  .snackbar-base {
@@ -260,6 +260,36 @@
260
260
  color: var(--color-base-content);
261
261
  }
262
262
 
263
+ :is(
264
+ .snackbar-info,
265
+ .snackbar-success,
266
+ .snackbar-warning,
267
+ .snackbar-error,
268
+ .snackbar-primary,
269
+ .snackbar-secondary,
270
+ .snackbar-tertiary,
271
+ .snackbar-accent,
272
+ .snackbar-neutral,
273
+ .snackbar-base
274
+ ) :is(.snackbar-action, .snackbar-close) {
275
+ color: inherit;
276
+ }
277
+
278
+ :is(
279
+ .snackbar-info,
280
+ .snackbar-success,
281
+ .snackbar-warning,
282
+ .snackbar-error,
283
+ .snackbar-primary,
284
+ .snackbar-secondary,
285
+ .snackbar-tertiary,
286
+ .snackbar-accent,
287
+ .snackbar-neutral,
288
+ .snackbar-base
289
+ ) :is(.snackbar-action, .snackbar-close):hover {
290
+ background-color: color-mix(in oklch, currentColor 12%, transparent);
291
+ }
292
+
263
293
  /* Dark Snackbar (default MD3 style) */
264
294
  .snackbar-dark {
265
295
  background-color: var(--color-on-surface);