@duskmoon-dev/core 1.21.2 → 1.21.4

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.
@@ -17,7 +17,7 @@ export const css = `/**
17
17
  padding: 0.5rem;
18
18
  gap: 0.125rem;
19
19
  font-size: 0.875rem;
20
- color: var(--color-on-surface);
20
+ color: var(--nested-menu-fg, var(--color-on-surface));
21
21
  }
22
22
 
23
23
  /* ============================================
@@ -30,7 +30,7 @@ export const css = `/**
30
30
  font-weight: 600;
31
31
  text-transform: uppercase;
32
32
  letter-spacing: 0.05em;
33
- color: var(--color-on-surface-variant);
33
+ color: var(--nested-menu-muted, var(--color-on-surface-variant));
34
34
  user-select: none;
35
35
  }
36
36
 
@@ -46,7 +46,7 @@ export const css = `/**
46
46
  width: 100%;
47
47
  padding: 0.5rem 0.75rem;
48
48
  font-size: inherit;
49
- color: var(--color-on-surface);
49
+ color: var(--nested-menu-fg, var(--color-on-surface));
50
50
  text-decoration: none;
51
51
  background-color: transparent;
52
52
  border: none;
@@ -57,7 +57,7 @@ export const css = `/**
57
57
 
58
58
  .nested-menu li > a:hover,
59
59
  .nested-menu li > button:hover {
60
- background-color: var(--color-surface-container);
60
+ background-color: var(--nested-menu-hover, var(--color-surface-container));
61
61
  }
62
62
 
63
63
  .nested-menu li > a:focus-visible,
@@ -71,15 +71,15 @@ export const css = `/**
71
71
  .nested-menu li > button.active,
72
72
  .nested-menu li > a[aria-current="page"],
73
73
  .nested-menu li > button[aria-current="page"] {
74
- background-color: var(--color-primary-container);
75
- color: var(--color-on-primary-container);
74
+ background-color: var(--nested-menu-active-bg, var(--color-primary-container));
75
+ color: var(--nested-menu-active-fg, var(--color-on-primary-container));
76
76
  }
77
77
 
78
78
  .nested-menu li > a.active:hover,
79
79
  .nested-menu li > button.active:hover,
80
80
  .nested-menu li > a[aria-current="page"]:hover,
81
81
  .nested-menu li > button[aria-current="page"]:hover {
82
- background-color: color-mix(in oklch, var(--color-primary-container), var(--color-on-primary-container) 8%);
82
+ background-color: color-mix(in oklch, var(--nested-menu-active-bg, var(--color-primary-container)), var(--nested-menu-active-fg, var(--color-on-primary-container)) 8%);
83
83
  }
84
84
 
85
85
  /* Disabled state */
@@ -92,7 +92,7 @@ export const css = `/**
92
92
  .nested-menu li.disabled > button,
93
93
  .nested-menu li > button:disabled,
94
94
  .nested-menu li > a[aria-disabled="true"] {
95
- color: var(--color-on-surface-variant);
95
+ color: var(--nested-menu-muted, var(--color-on-surface-variant));
96
96
  opacity: 0.5;
97
97
  cursor: not-allowed;
98
98
  }
@@ -113,7 +113,7 @@ export const css = `/**
113
113
  width: 100%;
114
114
  padding: 0.5rem 0.75rem;
115
115
  font-size: inherit;
116
- color: var(--color-on-surface);
116
+ color: var(--nested-menu-fg, var(--color-on-surface));
117
117
  background-color: transparent;
118
118
  border: none;
119
119
  border-radius: var(--radius-field, 0.375rem);
@@ -132,7 +132,7 @@ export const css = `/**
132
132
  }
133
133
 
134
134
  .nested-menu summary:hover {
135
- background-color: var(--color-surface-container);
135
+ background-color: var(--nested-menu-hover, var(--color-surface-container));
136
136
  }
137
137
 
138
138
  .nested-menu summary:focus-visible {
@@ -241,12 +241,83 @@ export const css = `/**
241
241
 
242
242
  /* Bordered — sidebar panel look */
243
243
  .nested-menu-bordered {
244
- background-color: var(--color-surface);
244
+ background-color: var(--nested-menu-bg, var(--color-surface));
245
245
  border: 1px solid var(--color-outline-variant);
246
246
  border-radius: var(--radius-card, 0.75rem);
247
247
  box-shadow: var(--shadow-sm);
248
248
  }
249
249
 
250
+ /* Filled color variants for sidebar navigation. */
251
+ .nested-menu-primary {
252
+ --nested-menu-bg: var(--color-primary);
253
+ --nested-menu-fg: var(--color-primary-content);
254
+ --nested-menu-muted: var(--color-primary-content);
255
+ --nested-menu-hover: color-mix(in oklch, var(--color-primary-content) 8%, var(--color-primary));
256
+ --nested-menu-active-bg: var(--color-primary-content);
257
+ --nested-menu-active-fg: var(--color-primary);
258
+ background-color: var(--nested-menu-bg);
259
+ }
260
+
261
+ .nested-menu-secondary {
262
+ --nested-menu-bg: var(--color-secondary);
263
+ --nested-menu-fg: var(--color-secondary-content);
264
+ --nested-menu-muted: var(--color-secondary-content);
265
+ --nested-menu-hover: color-mix(in oklch, var(--color-secondary-content) 8%, var(--color-secondary));
266
+ --nested-menu-active-bg: var(--color-secondary-content);
267
+ --nested-menu-active-fg: var(--color-secondary);
268
+ background-color: var(--nested-menu-bg);
269
+ }
270
+
271
+ .nested-menu-tertiary {
272
+ --nested-menu-bg: var(--color-tertiary);
273
+ --nested-menu-fg: var(--color-tertiary-content);
274
+ --nested-menu-muted: var(--color-tertiary-content);
275
+ --nested-menu-hover: color-mix(in oklch, var(--color-tertiary-content) 8%, var(--color-tertiary));
276
+ --nested-menu-active-bg: var(--color-tertiary-content);
277
+ --nested-menu-active-fg: var(--color-tertiary);
278
+ background-color: var(--nested-menu-bg);
279
+ }
280
+
281
+ .nested-menu-info {
282
+ --nested-menu-bg: var(--color-info);
283
+ --nested-menu-fg: var(--color-info-content);
284
+ --nested-menu-muted: var(--color-info-content);
285
+ --nested-menu-hover: color-mix(in oklch, var(--color-info-content) 8%, var(--color-info));
286
+ --nested-menu-active-bg: var(--color-info-content);
287
+ --nested-menu-active-fg: var(--color-info);
288
+ background-color: var(--nested-menu-bg);
289
+ }
290
+
291
+ .nested-menu-success {
292
+ --nested-menu-bg: var(--color-success);
293
+ --nested-menu-fg: var(--color-success-content);
294
+ --nested-menu-muted: var(--color-success-content);
295
+ --nested-menu-hover: color-mix(in oklch, var(--color-success-content) 8%, var(--color-success));
296
+ --nested-menu-active-bg: var(--color-success-content);
297
+ --nested-menu-active-fg: var(--color-success);
298
+ background-color: var(--nested-menu-bg);
299
+ }
300
+
301
+ .nested-menu-warning {
302
+ --nested-menu-bg: var(--color-warning);
303
+ --nested-menu-fg: var(--color-warning-content);
304
+ --nested-menu-muted: var(--color-warning-content);
305
+ --nested-menu-hover: color-mix(in oklch, var(--color-warning-content) 8%, var(--color-warning));
306
+ --nested-menu-active-bg: var(--color-warning-content);
307
+ --nested-menu-active-fg: var(--color-warning);
308
+ background-color: var(--nested-menu-bg);
309
+ }
310
+
311
+ .nested-menu-error {
312
+ --nested-menu-bg: var(--color-error);
313
+ --nested-menu-fg: var(--color-error-content);
314
+ --nested-menu-muted: var(--color-error-content);
315
+ --nested-menu-hover: color-mix(in oklch, var(--color-error-content) 8%, var(--color-error));
316
+ --nested-menu-active-bg: var(--color-error-content);
317
+ --nested-menu-active-fg: var(--color-error);
318
+ background-color: var(--nested-menu-bg);
319
+ }
320
+
250
321
  /* Compact — tighter padding throughout */
251
322
  .nested-menu-compact {
252
323
  padding: 0.25rem;
@@ -100,7 +100,7 @@ export const css = `/** Opt-in native presentation. Applications own errors, mes
100
100
  appearance: none;
101
101
  background-color: transparent;
102
102
  border: 2px solid var(--radio-border-color);
103
- border-radius: var(--radius-full);
103
+ border-radius: var(--radius-full, 9999px);
104
104
  transition: border-color 150ms ease-in-out;
105
105
  }
106
106
 
@@ -109,7 +109,7 @@ export const css = `/** Opt-in native presentation. Applications own errors, mes
109
109
  content: "";
110
110
  width: 0.5em;
111
111
  height: 0.5em;
112
- border-radius: var(--radius-full);
112
+ border-radius: var(--radius-full, 9999px);
113
113
  background-color: var(--radio-color);
114
114
  transform: scale(0);
115
115
  transition: transform 150ms ease-in-out;
package/dist/index.css CHANGED
@@ -627,7 +627,7 @@ html {
627
627
  --color-warning-container: oklch(35% 0.06 80);
628
628
  --color-on-warning-container: oklch(90% 0.06 80);
629
629
  --color-error: oklch(46.38% 0.1898 29.17);
630
- --color-error-content: oklch(86.38% 0.298 39.17);
630
+ --color-error-content: oklch(97% 0.01 15);
631
631
  --color-error-container: oklch(30% 0.08 25);
632
632
  --color-on-error-container: oklch(88% 0.06 25);
633
633
 
@@ -794,7 +794,7 @@ html {
794
794
  --color-warning-container: oklch(35% 0.06 80);
795
795
  --color-on-warning-container: oklch(90% 0.06 80);
796
796
  --color-error: oklch(46.38% 0.1898 29.17);
797
- --color-error-content: oklch(86.38% 0.298 39.17);
797
+ --color-error-content: oklch(97% 0.01 15);
798
798
  --color-error-container: oklch(30% 0.08 25);
799
799
  --color-on-error-container: oklch(88% 0.06 25);
800
800
 
@@ -1035,6 +1035,7 @@ html {
1035
1035
  @layer components {
1036
1036
  /* Base Button */
1037
1037
  .btn {
1038
+ --btn-size: 2.5rem;
1038
1039
  --btn-p: 1.25rem;
1039
1040
  --btn-py: 0.625rem;
1040
1041
  --btn-text-color: var(--color-on-surface);
@@ -1569,6 +1570,7 @@ html {
1569
1570
 
1570
1571
  /* Size Variants */
1571
1572
  .btn-xs {
1573
+ --btn-size: 1.5rem;
1572
1574
  --btn-p: 0.5rem;
1573
1575
  --btn-py: 0.25rem;
1574
1576
  font-size: 0.75rem;
@@ -1577,6 +1579,7 @@ html {
1577
1579
  }
1578
1580
 
1579
1581
  .btn-sm {
1582
+ --btn-size: 2rem;
1580
1583
  --btn-p: 0.75rem;
1581
1584
  --btn-py: 0.375rem;
1582
1585
  font-size: 0.8125rem;
@@ -1585,6 +1588,7 @@ html {
1585
1588
  }
1586
1589
 
1587
1590
  .btn-md {
1591
+ --btn-size: 2.5rem;
1588
1592
  --btn-p: 1.25rem;
1589
1593
  --btn-py: 0.625rem;
1590
1594
  font-size: 0.875rem;
@@ -1593,6 +1597,7 @@ html {
1593
1597
  }
1594
1598
 
1595
1599
  .btn-lg {
1600
+ --btn-size: 3rem;
1596
1601
  --btn-p: 1.75rem;
1597
1602
  --btn-py: 0.875rem;
1598
1603
  font-size: 1rem;
@@ -1673,17 +1678,19 @@ html {
1673
1678
  height: 3rem;
1674
1679
  }
1675
1680
 
1676
- .btn-circle {
1677
- --btn-p: 0.625rem;
1678
- --btn-py: 0.625rem;
1679
- border-radius: var(--radius-full);
1681
+ .btn-circle,
1682
+ .btn-square {
1683
+ --btn-p: 0;
1684
+ --btn-py: 0;
1685
+ box-sizing: border-box;
1686
+ width: var(--btn-size);
1687
+ height: var(--btn-size);
1688
+ flex-shrink: 0;
1680
1689
  aspect-ratio: 1;
1681
1690
  }
1682
1691
 
1683
- .btn-square {
1684
- --btn-p: 0.625rem;
1685
- --btn-py: 0.625rem;
1686
- aspect-ratio: 1;
1692
+ .btn-circle {
1693
+ border-radius: var(--radius-full, 9999px);
1687
1694
  }
1688
1695
 
1689
1696
  /* Reduce Motion */
@@ -2916,7 +2923,7 @@ html {
2916
2923
  appearance: none;
2917
2924
  background-color: transparent;
2918
2925
  border: 2px solid var(--radio-border-color);
2919
- border-radius: var(--radius-full);
2926
+ border-radius: var(--radius-full, 9999px);
2920
2927
  transition: border-color 150ms ease-in-out;
2921
2928
  }
2922
2929
 
@@ -2925,7 +2932,7 @@ html {
2925
2932
  content: "";
2926
2933
  width: 0.5em;
2927
2934
  height: 0.5em;
2928
- border-radius: var(--radius-full);
2935
+ border-radius: var(--radius-full, 9999px);
2929
2936
  background-color: var(--radio-color);
2930
2937
  transform: scale(0);
2931
2938
  transition: transform 150ms ease-in-out;
@@ -20397,7 +20404,7 @@ html {
20397
20404
  padding: 0.5rem;
20398
20405
  gap: 0.125rem;
20399
20406
  font-size: 0.875rem;
20400
- color: var(--color-on-surface);
20407
+ color: var(--nested-menu-fg, var(--color-on-surface));
20401
20408
  }
20402
20409
 
20403
20410
  /* ============================================
@@ -20410,7 +20417,7 @@ html {
20410
20417
  font-weight: 600;
20411
20418
  text-transform: uppercase;
20412
20419
  letter-spacing: 0.05em;
20413
- color: var(--color-on-surface-variant);
20420
+ color: var(--nested-menu-muted, var(--color-on-surface-variant));
20414
20421
  user-select: none;
20415
20422
  }
20416
20423
 
@@ -20426,7 +20433,7 @@ html {
20426
20433
  width: 100%;
20427
20434
  padding: 0.5rem 0.75rem;
20428
20435
  font-size: inherit;
20429
- color: var(--color-on-surface);
20436
+ color: var(--nested-menu-fg, var(--color-on-surface));
20430
20437
  text-decoration: none;
20431
20438
  background-color: transparent;
20432
20439
  border: none;
@@ -20437,7 +20444,7 @@ html {
20437
20444
 
20438
20445
  .nested-menu li > a:hover,
20439
20446
  .nested-menu li > button:hover {
20440
- background-color: var(--color-surface-container);
20447
+ background-color: var(--nested-menu-hover, var(--color-surface-container));
20441
20448
  }
20442
20449
 
20443
20450
  .nested-menu li > a:focus-visible,
@@ -20451,15 +20458,15 @@ html {
20451
20458
  .nested-menu li > button.active,
20452
20459
  .nested-menu li > a[aria-current="page"],
20453
20460
  .nested-menu li > button[aria-current="page"] {
20454
- background-color: var(--color-primary-container);
20455
- color: var(--color-on-primary-container);
20461
+ background-color: var(--nested-menu-active-bg, var(--color-primary-container));
20462
+ color: var(--nested-menu-active-fg, var(--color-on-primary-container));
20456
20463
  }
20457
20464
 
20458
20465
  .nested-menu li > a.active:hover,
20459
20466
  .nested-menu li > button.active:hover,
20460
20467
  .nested-menu li > a[aria-current="page"]:hover,
20461
20468
  .nested-menu li > button[aria-current="page"]:hover {
20462
- background-color: color-mix(in oklch, var(--color-primary-container), var(--color-on-primary-container) 8%);
20469
+ background-color: color-mix(in oklch, var(--nested-menu-active-bg, var(--color-primary-container)), var(--nested-menu-active-fg, var(--color-on-primary-container)) 8%);
20463
20470
  }
20464
20471
 
20465
20472
  /* Disabled state */
@@ -20472,7 +20479,7 @@ html {
20472
20479
  .nested-menu li.disabled > button,
20473
20480
  .nested-menu li > button:disabled,
20474
20481
  .nested-menu li > a[aria-disabled="true"] {
20475
- color: var(--color-on-surface-variant);
20482
+ color: var(--nested-menu-muted, var(--color-on-surface-variant));
20476
20483
  opacity: 0.5;
20477
20484
  cursor: not-allowed;
20478
20485
  }
@@ -20493,7 +20500,7 @@ html {
20493
20500
  width: 100%;
20494
20501
  padding: 0.5rem 0.75rem;
20495
20502
  font-size: inherit;
20496
- color: var(--color-on-surface);
20503
+ color: var(--nested-menu-fg, var(--color-on-surface));
20497
20504
  background-color: transparent;
20498
20505
  border: none;
20499
20506
  border-radius: var(--radius-field, 0.375rem);
@@ -20512,7 +20519,7 @@ html {
20512
20519
  }
20513
20520
 
20514
20521
  .nested-menu summary:hover {
20515
- background-color: var(--color-surface-container);
20522
+ background-color: var(--nested-menu-hover, var(--color-surface-container));
20516
20523
  }
20517
20524
 
20518
20525
  .nested-menu summary:focus-visible {
@@ -20621,12 +20628,83 @@ html {
20621
20628
 
20622
20629
  /* Bordered — sidebar panel look */
20623
20630
  .nested-menu-bordered {
20624
- background-color: var(--color-surface);
20631
+ background-color: var(--nested-menu-bg, var(--color-surface));
20625
20632
  border: 1px solid var(--color-outline-variant);
20626
20633
  border-radius: var(--radius-card, 0.75rem);
20627
20634
  box-shadow: var(--shadow-sm);
20628
20635
  }
20629
20636
 
20637
+ /* Filled color variants for sidebar navigation. */
20638
+ .nested-menu-primary {
20639
+ --nested-menu-bg: var(--color-primary);
20640
+ --nested-menu-fg: var(--color-primary-content);
20641
+ --nested-menu-muted: var(--color-primary-content);
20642
+ --nested-menu-hover: color-mix(in oklch, var(--color-primary-content) 8%, var(--color-primary));
20643
+ --nested-menu-active-bg: var(--color-primary-content);
20644
+ --nested-menu-active-fg: var(--color-primary);
20645
+ background-color: var(--nested-menu-bg);
20646
+ }
20647
+
20648
+ .nested-menu-secondary {
20649
+ --nested-menu-bg: var(--color-secondary);
20650
+ --nested-menu-fg: var(--color-secondary-content);
20651
+ --nested-menu-muted: var(--color-secondary-content);
20652
+ --nested-menu-hover: color-mix(in oklch, var(--color-secondary-content) 8%, var(--color-secondary));
20653
+ --nested-menu-active-bg: var(--color-secondary-content);
20654
+ --nested-menu-active-fg: var(--color-secondary);
20655
+ background-color: var(--nested-menu-bg);
20656
+ }
20657
+
20658
+ .nested-menu-tertiary {
20659
+ --nested-menu-bg: var(--color-tertiary);
20660
+ --nested-menu-fg: var(--color-tertiary-content);
20661
+ --nested-menu-muted: var(--color-tertiary-content);
20662
+ --nested-menu-hover: color-mix(in oklch, var(--color-tertiary-content) 8%, var(--color-tertiary));
20663
+ --nested-menu-active-bg: var(--color-tertiary-content);
20664
+ --nested-menu-active-fg: var(--color-tertiary);
20665
+ background-color: var(--nested-menu-bg);
20666
+ }
20667
+
20668
+ .nested-menu-info {
20669
+ --nested-menu-bg: var(--color-info);
20670
+ --nested-menu-fg: var(--color-info-content);
20671
+ --nested-menu-muted: var(--color-info-content);
20672
+ --nested-menu-hover: color-mix(in oklch, var(--color-info-content) 8%, var(--color-info));
20673
+ --nested-menu-active-bg: var(--color-info-content);
20674
+ --nested-menu-active-fg: var(--color-info);
20675
+ background-color: var(--nested-menu-bg);
20676
+ }
20677
+
20678
+ .nested-menu-success {
20679
+ --nested-menu-bg: var(--color-success);
20680
+ --nested-menu-fg: var(--color-success-content);
20681
+ --nested-menu-muted: var(--color-success-content);
20682
+ --nested-menu-hover: color-mix(in oklch, var(--color-success-content) 8%, var(--color-success));
20683
+ --nested-menu-active-bg: var(--color-success-content);
20684
+ --nested-menu-active-fg: var(--color-success);
20685
+ background-color: var(--nested-menu-bg);
20686
+ }
20687
+
20688
+ .nested-menu-warning {
20689
+ --nested-menu-bg: var(--color-warning);
20690
+ --nested-menu-fg: var(--color-warning-content);
20691
+ --nested-menu-muted: var(--color-warning-content);
20692
+ --nested-menu-hover: color-mix(in oklch, var(--color-warning-content) 8%, var(--color-warning));
20693
+ --nested-menu-active-bg: var(--color-warning-content);
20694
+ --nested-menu-active-fg: var(--color-warning);
20695
+ background-color: var(--nested-menu-bg);
20696
+ }
20697
+
20698
+ .nested-menu-error {
20699
+ --nested-menu-bg: var(--color-error);
20700
+ --nested-menu-fg: var(--color-error-content);
20701
+ --nested-menu-muted: var(--color-error-content);
20702
+ --nested-menu-hover: color-mix(in oklch, var(--color-error-content) 8%, var(--color-error));
20703
+ --nested-menu-active-bg: var(--color-error-content);
20704
+ --nested-menu-active-fg: var(--color-error);
20705
+ background-color: var(--nested-menu-bg);
20706
+ }
20707
+
20630
20708
  /* Compact — tighter padding throughout */
20631
20709
  .nested-menu-compact {
20632
20710
  padding: 0.25rem;