@duskmoon-dev/core 1.20.0 → 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 CHANGED
@@ -31,6 +31,13 @@ npm install @duskmoon-dev/core tailwindcss@^4.0.0
31
31
  pnpm add @duskmoon-dev/core tailwindcss@^4.0.0
32
32
  ```
33
33
 
34
+ ## Native Overlay Principles
35
+
36
+ - Tooltips use only the HTML Popover API: `popover="hint"`, `interestfor`, and browser-owned `:popover-open` state.
37
+ - Modal and Dialog use only HTML `<dialog>`, opened with `command="show-modal"` / `commandfor` or `showModal()`, and closed with native commands, `close()`, or `method="dialog"`. The browser manages the backdrop, inertness, keyboard focus, and Escape.
38
+
39
+ Legacy div-based Modal markup, `.modal-open`, `.modal-toggle`, and URL-target visibility are no longer supported. Migrate the outer element to `<dialog>` and use native opening/closing actions; `.modal-box` and presentation modifiers remain available.
40
+
34
41
  ## Quick Start
35
42
 
36
43
  ### 1. Add DuskMoonUI to your CSS
@@ -107,7 +114,7 @@ Theme switching is instant and uses pure CSS custom properties.
107
114
  | Input | `.input`, `.input-bordered`, `.input-primary` | Text inputs with sizes and states |
108
115
  | Form | `.form-control`, `.label`, `.checkbox`, `.radio`, `.toggle`, `.select`, `.textarea` | Form elements and layouts |
109
116
  | Navigation | `.navbar`, `.megamenu`, `.menu`, `.link`, `.breadcrumbs`, `.tabs`, `.pagination`, `.dropdown` | Navigation patterns |
110
- | Modal | `.modal`, `.modal-box`, `.modal-action` | Dialog overlays |
117
+ | Modal | `dialog.modal`, `.modal-box`, `.modal-action` | Native HTML dialog overlays |
111
118
 
112
119
  ### Data Display (5)
113
120
 
@@ -444,4 +451,4 @@ See [specs/004-oklch-color-system/quickstart.md](./specs/004-oklch-color-system/
444
451
 
445
452
  MIT
446
453
 
447
- <!-- release 36748188490 -->
454
+ <!-- release 36842430702 -->
@@ -58,7 +58,7 @@
58
58
  flex-direction: column;
59
59
  justify-content: center;
60
60
  align-items: center;
61
- gap: var(--chat-scroll-indicator-gap);
61
+ gap: 0;
62
62
  width: calc(
63
63
  var(--chat-scroll-indicator-active-size) * var(--chat-scroll-indicator-hover-scale)
64
64
  );
@@ -77,21 +77,33 @@
77
77
  }
78
78
 
79
79
  .chat-scroll-indicator {
80
- display: block;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
81
83
  flex-shrink: 0;
82
- width: var(--chat-scroll-indicator-size);
83
- height: var(--chat-scroll-indicator-thickness);
84
+ width: 100%;
85
+ height: calc(var(--chat-scroll-indicator-thickness) + var(--chat-scroll-indicator-gap));
84
86
  border: 0;
85
- border-radius: 999px;
86
87
  padding: 0;
88
+ margin: 0;
89
+ box-sizing: border-box;
87
90
  appearance: none;
88
- background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
91
+ background-color: transparent;
89
92
  color: inherit;
90
93
  font: inherit;
91
- opacity: 0.45;
92
94
  pointer-events: auto;
93
95
  text-decoration: none;
94
96
  cursor: pointer;
97
+ }
98
+
99
+ .chat-scroll-indicator::before {
100
+ content: "";
101
+ width: var(--chat-scroll-indicator-size);
102
+ height: var(--chat-scroll-indicator-thickness);
103
+ border-radius: 999px;
104
+ background-color: color-mix(in oklch, var(--color-on-surface) 28%, transparent);
105
+ opacity: 0.45;
106
+ pointer-events: none;
95
107
  transform: scaleX(1);
96
108
  transform-origin: center;
97
109
  transition:
@@ -100,15 +112,17 @@
100
112
  background-color 140ms ease;
101
113
  }
102
114
 
103
- .chat-scroll-indicator:hover,
104
- .chat-scroll-indicator:focus-visible {
115
+ .chat-scroll-indicator:hover::before,
116
+ .chat-scroll-indicator:focus-visible::before {
117
+ animation: none;
105
118
  transform: scaleX(var(--chat-scroll-indicator-hover-scale)) scaleY(1.35);
106
119
  background-color: var(--color-on-surface);
107
120
  opacity: 1;
108
121
  }
109
122
 
110
- .chat-scroll-indicator:hover + .chat-scroll-indicator,
111
- .chat-scroll-indicator:has(+ .chat-scroll-indicator:hover) {
123
+ .chat-scroll-indicator:hover + .chat-scroll-indicator::before,
124
+ .chat-scroll-indicator:has(+ .chat-scroll-indicator:hover)::before {
125
+ animation: none;
112
126
  transform: scaleX(var(--chat-scroll-indicator-neighbor-scale)) scaleY(1.15);
113
127
  background-color: color-mix(in oklch, var(--color-on-surface) 55%, transparent);
114
128
  opacity: 0.75;
@@ -124,7 +138,7 @@
124
138
  }
125
139
 
126
140
  @supports (animation-timeline: --chat-1) {
127
- .chat-scroll-indicator {
141
+ .chat-scroll-indicator::before {
128
142
  animation-name: chat-scroll-indicator-activate;
129
143
  animation-duration: 1ms;
130
144
  animation-timing-function: linear;
@@ -253,99 +267,99 @@
253
267
  view-timeline-axis: block;
254
268
  }
255
269
 
256
- .chat-scroll-indicator[data-chat-tl="1"] {
270
+ .chat-scroll-indicator[data-chat-tl="1"]::before {
257
271
  animation-timeline: --chat-1;
258
272
  }
259
273
 
260
- .chat-scroll-indicator[data-chat-tl="2"] {
274
+ .chat-scroll-indicator[data-chat-tl="2"]::before {
261
275
  animation-timeline: --chat-2;
262
276
  }
263
277
 
264
- .chat-scroll-indicator[data-chat-tl="3"] {
278
+ .chat-scroll-indicator[data-chat-tl="3"]::before {
265
279
  animation-timeline: --chat-3;
266
280
  }
267
281
 
268
- .chat-scroll-indicator[data-chat-tl="4"] {
282
+ .chat-scroll-indicator[data-chat-tl="4"]::before {
269
283
  animation-timeline: --chat-4;
270
284
  }
271
285
 
272
- .chat-scroll-indicator[data-chat-tl="5"] {
286
+ .chat-scroll-indicator[data-chat-tl="5"]::before {
273
287
  animation-timeline: --chat-5;
274
288
  }
275
289
 
276
- .chat-scroll-indicator[data-chat-tl="6"] {
290
+ .chat-scroll-indicator[data-chat-tl="6"]::before {
277
291
  animation-timeline: --chat-6;
278
292
  }
279
293
 
280
- .chat-scroll-indicator[data-chat-tl="7"] {
294
+ .chat-scroll-indicator[data-chat-tl="7"]::before {
281
295
  animation-timeline: --chat-7;
282
296
  }
283
297
 
284
- .chat-scroll-indicator[data-chat-tl="8"] {
298
+ .chat-scroll-indicator[data-chat-tl="8"]::before {
285
299
  animation-timeline: --chat-8;
286
300
  }
287
301
 
288
- .chat-scroll-indicator[data-chat-tl="9"] {
302
+ .chat-scroll-indicator[data-chat-tl="9"]::before {
289
303
  animation-timeline: --chat-9;
290
304
  }
291
305
 
292
- .chat-scroll-indicator[data-chat-tl="10"] {
306
+ .chat-scroll-indicator[data-chat-tl="10"]::before {
293
307
  animation-timeline: --chat-10;
294
308
  }
295
309
 
296
- .chat-scroll-indicator[data-chat-tl="11"] {
310
+ .chat-scroll-indicator[data-chat-tl="11"]::before {
297
311
  animation-timeline: --chat-11;
298
312
  }
299
313
 
300
- .chat-scroll-indicator[data-chat-tl="12"] {
314
+ .chat-scroll-indicator[data-chat-tl="12"]::before {
301
315
  animation-timeline: --chat-12;
302
316
  }
303
317
 
304
- .chat-scroll-indicator[data-chat-tl="13"] {
318
+ .chat-scroll-indicator[data-chat-tl="13"]::before {
305
319
  animation-timeline: --chat-13;
306
320
  }
307
321
 
308
- .chat-scroll-indicator[data-chat-tl="14"] {
322
+ .chat-scroll-indicator[data-chat-tl="14"]::before {
309
323
  animation-timeline: --chat-14;
310
324
  }
311
325
 
312
- .chat-scroll-indicator[data-chat-tl="15"] {
326
+ .chat-scroll-indicator[data-chat-tl="15"]::before {
313
327
  animation-timeline: --chat-15;
314
328
  }
315
329
 
316
- .chat-scroll-indicator[data-chat-tl="16"] {
330
+ .chat-scroll-indicator[data-chat-tl="16"]::before {
317
331
  animation-timeline: --chat-16;
318
332
  }
319
333
 
320
- .chat-scroll-indicator[data-chat-tl="17"] {
334
+ .chat-scroll-indicator[data-chat-tl="17"]::before {
321
335
  animation-timeline: --chat-17;
322
336
  }
323
337
 
324
- .chat-scroll-indicator[data-chat-tl="18"] {
338
+ .chat-scroll-indicator[data-chat-tl="18"]::before {
325
339
  animation-timeline: --chat-18;
326
340
  }
327
341
 
328
- .chat-scroll-indicator[data-chat-tl="19"] {
342
+ .chat-scroll-indicator[data-chat-tl="19"]::before {
329
343
  animation-timeline: --chat-19;
330
344
  }
331
345
 
332
- .chat-scroll-indicator[data-chat-tl="20"] {
346
+ .chat-scroll-indicator[data-chat-tl="20"]::before {
333
347
  animation-timeline: --chat-20;
334
348
  }
335
349
 
336
- .chat-scroll-indicator[data-chat-tl="21"] {
350
+ .chat-scroll-indicator[data-chat-tl="21"]::before {
337
351
  animation-timeline: --chat-21;
338
352
  }
339
353
 
340
- .chat-scroll-indicator[data-chat-tl="22"] {
354
+ .chat-scroll-indicator[data-chat-tl="22"]::before {
341
355
  animation-timeline: --chat-22;
342
356
  }
343
357
 
344
- .chat-scroll-indicator[data-chat-tl="23"] {
358
+ .chat-scroll-indicator[data-chat-tl="23"]::before {
345
359
  animation-timeline: --chat-23;
346
360
  }
347
361
 
348
- .chat-scroll-indicator[data-chat-tl="24"] {
362
+ .chat-scroll-indicator[data-chat-tl="24"]::before {
349
363
  animation-timeline: --chat-24;
350
364
  }
351
365
 
@@ -421,6 +435,54 @@
421
435
  margin-bottom: 0;
422
436
  }
423
437
 
438
+ .chat-status {
439
+ display: flex;
440
+ flex-wrap: wrap;
441
+ align-items: center;
442
+ gap: 0.25rem 0.75rem;
443
+ color: var(--color-on-surface-variant);
444
+ font-size: 0.75rem;
445
+ line-height: 1rem;
446
+ font-variant-numeric: tabular-nums;
447
+ }
448
+
449
+ .chat-status-item {
450
+ display: inline-flex;
451
+ align-items: baseline;
452
+ gap: 0.25rem;
453
+ }
454
+
455
+ .chat-status-value {
456
+ color: var(--color-on-surface);
457
+ font-weight: 500;
458
+ }
459
+
460
+ .chat-actions {
461
+ display: flex;
462
+ flex-wrap: wrap;
463
+ align-items: center;
464
+ gap: 0.25rem;
465
+ }
466
+
467
+ .chat-actions-hover {
468
+ opacity: 0;
469
+ pointer-events: none;
470
+ transition: opacity 140ms ease;
471
+ }
472
+
473
+ .chat:hover .chat-actions-hover,
474
+ .chat:focus-within .chat-actions-hover {
475
+ opacity: 1;
476
+ pointer-events: auto;
477
+ }
478
+
479
+ @media (hover: none) {
480
+ .chat-actions-hover {
481
+ opacity: 1;
482
+ pointer-events: auto;
483
+ }
484
+ }
485
+
424
486
  .chat-bubble {
425
487
  --chat-bubble-bg: var(--color-surface-container-highest);
426
488
  --chat-bubble-fg: var(--color-on-surface);
@@ -437,7 +499,6 @@
437
499
  border-radius: 1rem;
438
500
  background-color: var(--chat-bubble-bg);
439
501
  color: var(--chat-bubble-fg);
440
- box-shadow: inset 0 0 0 1px var(--color-outline-variant);
441
502
  font-size: 0.875rem;
442
503
  line-height: 1.45;
443
504
  overflow-wrap: anywhere;
@@ -454,11 +515,11 @@
454
515
  .chat-end .chat-bubble::before {
455
516
  content: "";
456
517
  position: absolute;
457
- inset-block-start: 0;
518
+ inset-block-end: 0;
458
519
  inline-size: 0.75rem;
459
- block-size: 1rem;
520
+ block-size: 0.75rem;
460
521
  background-color: var(--chat-bubble-bg);
461
- mask-image: radial-gradient(ellipse at 0 100%, transparent 68%, black 72%);
522
+ mask-image: radial-gradient(ellipse at 0 0, transparent 68%, black 72%);
462
523
  pointer-events: none;
463
524
  }
464
525
 
@@ -467,7 +528,7 @@
467
528
  }
468
529
 
469
530
  .chat-start .chat-bubble {
470
- border-start-start-radius: 0;
531
+ border-end-start-radius: 0;
471
532
  }
472
533
 
473
534
  .chat-end .chat-bubble::before {
@@ -476,7 +537,7 @@
476
537
  }
477
538
 
478
539
  .chat-end .chat-bubble {
479
- border-start-end-radius: 0;
540
+ border-end-end-radius: 0;
480
541
  }
481
542
 
482
543
  .chat-start:dir(rtl) .chat-bubble::before { transform: scaleX(-1); }
@@ -817,11 +878,15 @@
817
878
  scroll-behavior: auto;
818
879
  }
819
880
 
820
- .chat-scroll-indicator {
881
+ .chat-scroll-indicator::before {
821
882
  animation: none;
822
883
  transition: none;
823
884
  }
824
885
 
886
+ .chat-actions-hover {
887
+ transition: none;
888
+ }
889
+
825
890
  .chat-typing::before,
826
891
  .chat-typing::after,
827
892
  .chat-typing span,