@donotdev/components 0.2.1 → 0.2.3
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/dist/{CarouselContent-F4JSFIQD.js → CarouselContent-MQPZBYOS.js} +1 -1
- package/dist/CodeContent-64D4U3NM.js +2 -0
- package/dist/{CrawlContent-6LR66N57.js → CrawlContent-5Z6AVDDW.js} +1 -1
- package/dist/{MarqueeContent-NBXB2YLR.js → MarqueeContent-KAYCOUNM.js} +1 -1
- package/dist/advanced/Bento/Bento.d.ts.map +1 -1
- package/dist/advanced/Carousel/CarouselContent.d.ts.map +1 -1
- package/dist/advanced/Carousel/CarouselContent.js +7 -4
- package/dist/advanced/Code/CodeContent.js +3 -5
- package/dist/advanced/Crawl/utils/parseHtml.d.ts.map +1 -1
- package/dist/advanced/Crawl/utils/parseHtml.js +9 -2
- package/dist/advanced/ImageGallery/GalleryArrows.d.ts +24 -0
- package/dist/advanced/ImageGallery/GalleryArrows.d.ts.map +1 -0
- package/dist/advanced/ImageGallery/GalleryArrows.js +13 -0
- package/dist/advanced/ImageGallery/ImageGallery.d.ts +6 -4
- package/dist/advanced/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/dist/advanced/ImageGallery/ImageGallery.js +116 -147
- package/dist/advanced/ImageGallery/LightboxViewer.d.ts +39 -0
- package/dist/advanced/ImageGallery/LightboxViewer.d.ts.map +1 -0
- package/dist/advanced/ImageGallery/LightboxViewer.js +138 -0
- package/dist/advanced/ImageGallery/lightboxGestures.d.ts +28 -0
- package/dist/advanced/ImageGallery/lightboxGestures.d.ts.map +1 -0
- package/dist/advanced/ImageGallery/lightboxGestures.js +425 -0
- package/dist/advanced/ImageGallery/protectImages.d.ts +19 -0
- package/dist/advanced/ImageGallery/protectImages.d.ts.map +1 -0
- package/dist/advanced/ImageGallery/protectImages.js +10 -0
- package/dist/advanced/ImageGallery/snapStrip.d.ts +29 -0
- package/dist/advanced/ImageGallery/snapStrip.d.ts.map +1 -0
- package/dist/advanced/ImageGallery/snapStrip.js +74 -0
- package/dist/advanced/Marquee/MarqueeContent.d.ts.map +1 -1
- package/dist/advanced/Marquee/MarqueeContent.js +7 -6
- package/dist/advanced/Reveal/Reveal.d.ts.map +1 -1
- package/dist/advanced/Reveal/Reveal.js +3 -2
- package/dist/advanced/Roadmap/RoadmapContent.d.ts.map +1 -1
- package/dist/advanced/Roadmap/RoadmapContent.js +2 -1
- package/dist/atomic/ActionButton/index.d.ts +7 -3
- package/dist/atomic/ActionButton/index.d.ts.map +1 -1
- package/dist/atomic/ActionButton/index.js +2 -2
- package/dist/atomic/Button/index.d.ts +1 -1
- package/dist/atomic/Calendar/index.d.ts.map +1 -1
- package/dist/atomic/Calendar/index.js +1 -0
- package/dist/atomic/Card/cover.d.ts +13 -8
- package/dist/atomic/Card/cover.d.ts.map +1 -1
- package/dist/atomic/Card/cover.js +13 -6
- package/dist/atomic/Card/index.d.ts +17 -8
- package/dist/atomic/Card/index.d.ts.map +1 -1
- package/dist/atomic/Card/index.js +8 -4
- package/dist/atomic/ColorPicker/index.d.ts.map +1 -1
- package/dist/atomic/ColorPicker/index.js +3 -2
- package/dist/atomic/Combobox/index.d.ts.map +1 -1
- package/dist/atomic/Combobox/index.js +3 -2
- package/dist/atomic/Grid/index.d.ts.map +1 -1
- package/dist/atomic/Grid/index.js +11 -6
- package/dist/atomic/Icons/Partner/InstagramIcon.d.ts +13 -0
- package/dist/atomic/Icons/Partner/InstagramIcon.d.ts.map +1 -0
- package/dist/atomic/Icons/Partner/InstagramIcon.js +29 -0
- package/dist/atomic/Icons/Partner/index.d.ts +1 -0
- package/dist/atomic/Icons/Partner/index.d.ts.map +1 -1
- package/dist/atomic/Icons/Partner/index.js +1 -0
- package/dist/atomic/Icons/Partner/providerIcons.d.ts.map +1 -1
- package/dist/atomic/Icons/Partner/providerIcons.js +6 -1
- package/dist/atomic/NavigationMenu/index.d.ts.map +1 -1
- package/dist/atomic/NavigationMenu/index.js +2 -2
- package/dist/atomic/PasswordInput/index.d.ts +1 -1
- package/dist/atomic/PasswordInput/index.d.ts.map +1 -1
- package/dist/atomic/PasswordInput/index.js +4 -2
- package/dist/atomic/Switch/index.d.ts +14 -11
- package/dist/atomic/Switch/index.d.ts.map +1 -1
- package/dist/atomic/Switch/index.js +21 -10
- package/dist/atomic/Table/editing.d.ts +109 -0
- package/dist/atomic/Table/editing.d.ts.map +1 -0
- package/dist/atomic/Table/editing.js +170 -0
- package/dist/atomic/Table/index.d.ts +42 -1
- package/dist/atomic/Table/index.d.ts.map +1 -1
- package/dist/atomic/Table/index.js +159 -54
- package/dist/atomic/Text/index.d.ts +0 -9
- package/dist/atomic/Text/index.d.ts.map +1 -1
- package/dist/atomic/Text/index.js +14 -7
- package/dist/atomic/index.d.ts +3 -2
- package/dist/atomic/index.d.ts.map +1 -1
- package/dist/atomic/index.js +1 -0
- package/dist/chunk-3WHSDDVJ.js +1 -0
- package/dist/chunk-CIBFOOWV.js +1 -0
- package/dist/chunk-JAV36ZQC.js +3 -0
- package/dist/hooks/useSwipeToClose.d.ts.map +1 -1
- package/dist/hooks/useSwipeToClose.js +9 -2
- package/dist/index.js +9 -6
- package/dist/styles/index.css +431 -119
- package/dist/symbol-index.json +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/cssVars.d.ts +22 -0
- package/dist/utils/cssVars.d.ts.map +1 -0
- package/dist/utils/cssVars.js +10 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -0
- package/dist/utils/intersectionObserver.d.ts.map +1 -1
- package/dist/utils/intersectionObserver.js +4 -1
- package/dist/utils/linkComponent.d.ts +26 -0
- package/dist/utils/linkComponent.d.ts.map +1 -0
- package/dist/utils/linkComponent.js +37 -0
- package/dist/utils/responsiveImage.d.ts +55 -0
- package/dist/utils/responsiveImage.d.ts.map +1 -0
- package/dist/utils/responsiveImage.js +45 -0
- package/guidelines/COMPONENTS.md +2 -1
- package/package.json +1 -1
- package/dist/CarouselContent-OQEW3MTR.css +0 -1
- package/dist/CarouselContent-UJARFDSE.js +0 -1
- package/dist/CodeContent-7KN6DQT2.js +0 -2
- package/dist/CodeContent-ENVN76NP.css +0 -1
- package/dist/CodeContent-JLL6BLG2.js +0 -2
- package/dist/CodeContent-S3BDX46F.js +0 -2
- package/dist/MarqueeContent-AL2RBZAP.css +0 -1
- package/dist/MarqueeContent-EKASHCRG.js +0 -1
- package/dist/chunk-2CNNVCFI.js +0 -1
- package/dist/chunk-6UB4NXNR.js +0 -3
- package/dist/chunk-E7SJFHOC.js +0 -3
- package/dist/chunk-EOCKFSHC.js +0 -1
- package/dist/chunk-FA4BDD6N.js +0 -1
- package/dist/chunk-RIB7YURO.js +0 -3
package/dist/styles/index.css
CHANGED
|
@@ -51,9 +51,7 @@
|
|
|
51
51
|
* applies regardless of density tier.
|
|
52
52
|
*/
|
|
53
53
|
--gap-none: 0;
|
|
54
|
-
--gap-sm
|
|
55
|
-
--gap-md: min(1rem, 2vw); /* 16px or 2vw */
|
|
56
|
-
--gap-lg: min(2rem, 2vw); /* 32px or 2vw */
|
|
54
|
+
/* --gap-sm / --gap-md / --gap-lg: see DENSITY SYSTEM below */
|
|
57
55
|
|
|
58
56
|
/* ===========================
|
|
59
57
|
DIALOG SIZE VARIANTS
|
|
@@ -180,14 +178,7 @@
|
|
|
180
178
|
/* Typography Scale - Musical Scale System (STANDARD density defaults - Major Third 1.25×) */
|
|
181
179
|
--font-size-xs: 0.75rem; /* 12px - captions, shortcuts, meta */
|
|
182
180
|
--font-size-sm: 0.875rem; /* 14px - small text, captions */
|
|
183
|
-
--font-size-base
|
|
184
|
-
--font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
|
|
185
|
-
--font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
|
|
186
|
-
--font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
|
|
187
|
-
--font-size-3xl: 2.441rem; /* 39px - base × 1.25⁴ - hero text */
|
|
188
|
-
|
|
189
|
-
/* Line Height - Musical Scale System (matches font scale ratio) */
|
|
190
|
-
--line-height: 1.25; /* Major Third - Standard density default */
|
|
181
|
+
/* --font-size-base…3xl and --line-height: see DENSITY SYSTEM below */
|
|
191
182
|
|
|
192
183
|
/* Font Weight - Semantic weights */
|
|
193
184
|
--font-weight-normal: 400;
|
|
@@ -319,12 +310,36 @@
|
|
|
319
310
|
|
|
320
311
|
/* ===========================
|
|
321
312
|
DENSITY SYSTEM
|
|
322
|
-
Semantic spacing and typography presets based on context
|
|
323
|
-
|
|
313
|
+
Semantic spacing and typography presets based on context.
|
|
314
|
+
|
|
315
|
+
App density: the layout wrapper (.dndev-layout) carries data-density in the
|
|
316
|
+
server HTML, and the tokens are declared on <html> from it (:has), so they
|
|
317
|
+
resolve on the first paint, before and without hydration.
|
|
318
|
+
Nested density: PageContainer / List set data-density on their own element.
|
|
319
|
+
|
|
320
|
+
The tokens are never declared on .dndev-layout itself: every element of the
|
|
321
|
+
app sits under it, so a declaration there would shadow the app's :root
|
|
322
|
+
overrides (themes.css). The <html> rules carry zero specificity (:where), so
|
|
323
|
+
an app :root override wins whatever the stylesheet order.
|
|
324
324
|
=========================== */
|
|
325
325
|
|
|
326
|
+
/* Base values (standard density), used until a density applies */
|
|
327
|
+
:where(:root) {
|
|
328
|
+
--gap-sm: min(0.5rem, 2vw); /* 8px or 2vw, whichever is smaller */
|
|
329
|
+
--gap-md: min(1rem, 2vw); /* 16px or 2vw */
|
|
330
|
+
--gap-lg: min(2rem, 2vw); /* 32px or 2vw */
|
|
331
|
+
--font-size-base: 1rem; /* 16px - body text, DEFAULT */
|
|
332
|
+
--font-size-lg: 1.25rem; /* 20px - base × 1.25¹ - emphasized text */
|
|
333
|
+
--font-size-xl: 1.563rem; /* 25px - base × 1.25² - headings */
|
|
334
|
+
--font-size-2xl: 1.953rem; /* 31px - base × 1.25³ - large headings */
|
|
335
|
+
--font-size-3xl: 2.441rem; /* 39px - base × 1.25⁴ - hero text */
|
|
336
|
+
/* Line Height - Musical Scale System (matches font scale ratio) */
|
|
337
|
+
--line-height: 1.25; /* Major Third - Standard density default */
|
|
338
|
+
}
|
|
339
|
+
|
|
326
340
|
/* Compact (Admin/Data) - Dense, information-dense layouts - Minor Third (1.2×) */
|
|
327
|
-
[data-density='compact']
|
|
341
|
+
:where(:root:has(.dndev-layout[data-density='compact'])),
|
|
342
|
+
[data-density='compact']:where(:not(.dndev-layout)) {
|
|
328
343
|
/* Base sizes: Fluid responsiveness for all text, zoom-safe */
|
|
329
344
|
--font-size-base: clamp(
|
|
330
345
|
0.875rem,
|
|
@@ -364,7 +379,8 @@
|
|
|
364
379
|
}
|
|
365
380
|
|
|
366
381
|
/* Standard (Docs/SaaS) - DEFAULT, balanced for readability */
|
|
367
|
-
[data-density='standard']
|
|
382
|
+
:where(:root:has(.dndev-layout[data-density='standard'])),
|
|
383
|
+
[data-density='standard']:where(:not(.dndev-layout)) {
|
|
368
384
|
/* Base sizes: Fluid responsiveness for all text, zoom-safe */
|
|
369
385
|
--font-size-base: clamp(
|
|
370
386
|
1rem,
|
|
@@ -404,7 +420,8 @@
|
|
|
404
420
|
}
|
|
405
421
|
|
|
406
422
|
/* Expressive (Marketing) - Perfect Fourth (1.333×) + Fluid typography (2025 best practice) */
|
|
407
|
-
[data-density='expressive']
|
|
423
|
+
:where(:root:has(.dndev-layout[data-density='expressive'])),
|
|
424
|
+
[data-density='expressive']:where(:not(.dndev-layout)) {
|
|
408
425
|
/* Base sizes: Fluid responsiveness for all text, zoom-safe */
|
|
409
426
|
--font-size-base: clamp(1rem, 0.875rem + 0.5vw, 1.125rem); /* 16-18px fluid */
|
|
410
427
|
--font-size-lg: clamp(1.25rem, 1rem + 0.75vw, 1.5rem); /* 20-24px fluid */
|
|
@@ -436,9 +453,9 @@
|
|
|
436
453
|
}
|
|
437
454
|
|
|
438
455
|
/* Form field text: follows density, never below 16px (iOS focus zoom).
|
|
439
|
-
Declared on [data-density] too, so
|
|
440
|
-
:root,
|
|
441
|
-
[data-density] {
|
|
456
|
+
Declared on nested [data-density] too, so they resolve their own base. */
|
|
457
|
+
:where(:root),
|
|
458
|
+
[data-density]:where(:not(.dndev-layout)) {
|
|
442
459
|
--font-size-input: max(16px, var(--font-size-base));
|
|
443
460
|
}
|
|
444
461
|
/* 2. Theme system - color palette definitions */
|
|
@@ -3702,6 +3719,50 @@ em {
|
|
|
3702
3719
|
background: var(--card);
|
|
3703
3720
|
}
|
|
3704
3721
|
|
|
3722
|
+
/* href: stretched link. The title is the <a href>; its ::after covers the whole
|
|
3723
|
+
card so the tile is clickable, while controls inside stay above it. The body
|
|
3724
|
+
must not be the containing block, or the hit area would stop at the cover. */
|
|
3725
|
+
.dndev-card[data-has-link='true'] > .dndev-card-body {
|
|
3726
|
+
position: static;
|
|
3727
|
+
}
|
|
3728
|
+
|
|
3729
|
+
.dndev-card-link {
|
|
3730
|
+
color: inherit;
|
|
3731
|
+
text-decoration: none;
|
|
3732
|
+
}
|
|
3733
|
+
|
|
3734
|
+
.dndev-card-link::after {
|
|
3735
|
+
content: '';
|
|
3736
|
+
position: absolute;
|
|
3737
|
+
inset: 0;
|
|
3738
|
+
z-index: 1;
|
|
3739
|
+
border-radius: inherit;
|
|
3740
|
+
}
|
|
3741
|
+
|
|
3742
|
+
.dndev-card-link:focus-visible {
|
|
3743
|
+
outline: none;
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
.dndev-card[data-has-link='true']:has(.dndev-card-link:focus-visible) {
|
|
3747
|
+
outline: 2px solid var(--ring);
|
|
3748
|
+
outline-offset: 2px;
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
.dndev-card[data-has-link='true']
|
|
3752
|
+
:is(
|
|
3753
|
+
a,
|
|
3754
|
+
button,
|
|
3755
|
+
input,
|
|
3756
|
+
select,
|
|
3757
|
+
textarea,
|
|
3758
|
+
label,
|
|
3759
|
+
[role='button'],
|
|
3760
|
+
[tabindex]
|
|
3761
|
+
):not(.dndev-card-link) {
|
|
3762
|
+
position: relative;
|
|
3763
|
+
z-index: 2;
|
|
3764
|
+
}
|
|
3765
|
+
|
|
3705
3766
|
/* Card body children spacing */
|
|
3706
3767
|
.dndev-card-header {
|
|
3707
3768
|
display: flex;
|
|
@@ -3766,7 +3827,8 @@ em {
|
|
|
3766
3827
|
|
|
3767
3828
|
/* Contain: whole image visible on the muted cover background (cut-outs), inset
|
|
3768
3829
|
proportionally so a packshot never touches the frame. */
|
|
3769
|
-
.dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover)
|
|
3830
|
+
.dndev-card-cover[data-fit='contain'] > img:not(.dndev-card-cover-hover),
|
|
3831
|
+
.dndev-card-cover[data-fit='contain'] > picture > img:not(.dndev-card-cover-hover) {
|
|
3770
3832
|
-o-object-fit: contain;
|
|
3771
3833
|
object-fit: contain;
|
|
3772
3834
|
box-sizing: border-box;
|
|
@@ -3774,7 +3836,9 @@ em {
|
|
|
3774
3836
|
}
|
|
3775
3837
|
|
|
3776
3838
|
/* Hover view: stacked over the cover, crossfades in on hover / keyboard focus. */
|
|
3777
|
-
|
|
3839
|
+
/* An image pair renders <picture><img>: the <img> carries the class either way. */
|
|
3840
|
+
.dndev-card-cover > img.dndev-card-cover-hover,
|
|
3841
|
+
.dndev-card-cover > picture > img.dndev-card-cover-hover {
|
|
3778
3842
|
position: absolute;
|
|
3779
3843
|
inset: 0;
|
|
3780
3844
|
-o-object-fit: cover;
|
|
@@ -3797,7 +3861,8 @@ em {
|
|
|
3797
3861
|
}
|
|
3798
3862
|
|
|
3799
3863
|
@media (prefers-reduced-motion: reduce) {
|
|
3800
|
-
.dndev-card-cover > img.dndev-card-cover-hover
|
|
3864
|
+
.dndev-card-cover > img.dndev-card-cover-hover,
|
|
3865
|
+
.dndev-card-cover > picture > img.dndev-card-cover-hover {
|
|
3801
3866
|
transition: none;
|
|
3802
3867
|
}
|
|
3803
3868
|
}
|
|
@@ -5427,6 +5492,17 @@ em {
|
|
|
5427
5492
|
outline: none;
|
|
5428
5493
|
}
|
|
5429
5494
|
|
|
5495
|
+
/* Gallery pictures are always protected (with blockContextMenu + draggable=false):
|
|
5496
|
+
no drag, no iOS long-press "Save image" callout, no selection. */
|
|
5497
|
+
.image-gallery img,
|
|
5498
|
+
.image-gallery__lightbox-stage img {
|
|
5499
|
+
-webkit-touch-callout: none;
|
|
5500
|
+
-webkit-user-drag: none;
|
|
5501
|
+
-webkit-user-select: none;
|
|
5502
|
+
-moz-user-select: none;
|
|
5503
|
+
user-select: none;
|
|
5504
|
+
}
|
|
5505
|
+
|
|
5430
5506
|
.image-gallery:focus-visible {
|
|
5431
5507
|
outline: 2px solid var(--primary);
|
|
5432
5508
|
outline-offset: 2px;
|
|
@@ -5460,13 +5536,57 @@ em {
|
|
|
5460
5536
|
cursor: zoom-in;
|
|
5461
5537
|
}
|
|
5462
5538
|
|
|
5463
|
-
|
|
5539
|
+
/* Swipeable strip (main view and lightbox): native scrolling, one slide per snap point */
|
|
5540
|
+
.image-gallery__strip {
|
|
5541
|
+
/* Offset parent of the slides: a slide's offsetLeft is its scroll offset */
|
|
5542
|
+
position: relative;
|
|
5543
|
+
display: flex;
|
|
5544
|
+
height: 100%;
|
|
5545
|
+
overflow-x: auto;
|
|
5546
|
+
overflow-y: hidden;
|
|
5547
|
+
scroll-snap-type: x mandatory;
|
|
5548
|
+
overscroll-behavior-x: contain;
|
|
5549
|
+
scrollbar-width: none;
|
|
5550
|
+
}
|
|
5551
|
+
|
|
5552
|
+
.image-gallery__strip::-webkit-scrollbar {
|
|
5553
|
+
display: none;
|
|
5554
|
+
}
|
|
5555
|
+
|
|
5556
|
+
/* Arrow / thumbnail / key navigation glides to a neighbour (never a touch swipe) */
|
|
5557
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
5558
|
+
.image-gallery__strip {
|
|
5559
|
+
scroll-behavior: smooth;
|
|
5560
|
+
}
|
|
5561
|
+
}
|
|
5562
|
+
|
|
5563
|
+
.image-gallery__slide {
|
|
5564
|
+
position: relative;
|
|
5565
|
+
flex: 0 0 100%;
|
|
5566
|
+
height: 100%;
|
|
5567
|
+
scroll-snap-align: start;
|
|
5568
|
+
scroll-snap-stop: always;
|
|
5569
|
+
}
|
|
5570
|
+
|
|
5571
|
+
.image-gallery__slide-img {
|
|
5572
|
+
position: absolute;
|
|
5573
|
+
inset: 0;
|
|
5574
|
+
display: block;
|
|
5464
5575
|
width: 100%;
|
|
5465
5576
|
height: 100%;
|
|
5466
5577
|
-o-object-fit: cover;
|
|
5467
5578
|
object-fit: cover;
|
|
5468
|
-
|
|
5469
|
-
|
|
5579
|
+
-webkit-user-select: none;
|
|
5580
|
+
-moz-user-select: none;
|
|
5581
|
+
user-select: none;
|
|
5582
|
+
-webkit-user-drag: none;
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5585
|
+
.image-gallery__slide-img[data-fit='contain'] {
|
|
5586
|
+
-o-object-fit: contain;
|
|
5587
|
+
object-fit: contain;
|
|
5588
|
+
box-sizing: border-box;
|
|
5589
|
+
padding: 6%;
|
|
5470
5590
|
}
|
|
5471
5591
|
|
|
5472
5592
|
/* Navigation arrows */
|
|
@@ -5585,38 +5705,186 @@ em {
|
|
|
5585
5705
|
}
|
|
5586
5706
|
}
|
|
5587
5707
|
|
|
5588
|
-
/* Lightbox
|
|
5708
|
+
/* Lightbox: full-screen dialog, the viewer owns every gesture */
|
|
5589
5709
|
.image-gallery__lightbox.dndev-modal-content {
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5710
|
+
inset: 0;
|
|
5711
|
+
transform: none;
|
|
5712
|
+
width: 100vw;
|
|
5713
|
+
height: 100dvh;
|
|
5714
|
+
max-width: none;
|
|
5715
|
+
max-height: none;
|
|
5716
|
+
display: block;
|
|
5717
|
+
padding: 0;
|
|
5718
|
+
border: none;
|
|
5719
|
+
border-radius: 0;
|
|
5720
|
+
box-shadow: none;
|
|
5721
|
+
background: transparent;
|
|
5722
|
+
/* Fade only: the dialog keyframes translate a centred box */
|
|
5723
|
+
animation-name: overlay-in;
|
|
5593
5724
|
}
|
|
5725
|
+
.image-gallery__lightbox.dndev-modal-content[data-state='closed'] {
|
|
5726
|
+
animation-name: overlay-out;
|
|
5727
|
+
}
|
|
5728
|
+
.image-gallery__lightbox.dndev-modal-content .dndev-modal-close {
|
|
5729
|
+
z-index: 4;
|
|
5730
|
+
opacity: 1;
|
|
5731
|
+
}
|
|
5594
5732
|
|
|
5595
5733
|
.image-gallery__lightbox .dndev-modal-body {
|
|
5734
|
+
position: absolute;
|
|
5735
|
+
inset: 0;
|
|
5596
5736
|
padding: 0;
|
|
5597
|
-
display: flex;
|
|
5598
|
-
align-items: center;
|
|
5599
|
-
justify-content: center;
|
|
5600
5737
|
overflow: hidden;
|
|
5601
|
-
min-height: 40dvh;
|
|
5602
5738
|
}
|
|
5603
5739
|
|
|
5604
|
-
.image-gallery__lightbox-
|
|
5605
|
-
position:
|
|
5740
|
+
.image-gallery__lightbox-stage {
|
|
5741
|
+
position: absolute;
|
|
5742
|
+
inset: 0;
|
|
5743
|
+
overflow: hidden;
|
|
5744
|
+
outline: none;
|
|
5745
|
+
-webkit-user-select: none;
|
|
5746
|
+
-moz-user-select: none;
|
|
5747
|
+
user-select: none;
|
|
5748
|
+
}
|
|
5749
|
+
|
|
5750
|
+
/* Opaque layer behind the slides. The close drag fades it with opacity (composited);
|
|
5751
|
+
never animate its colour, that repaints the whole screen every frame. */
|
|
5752
|
+
.image-gallery__lightbox-backdrop {
|
|
5753
|
+
position: absolute;
|
|
5754
|
+
inset: 0;
|
|
5755
|
+
background-color: var(--background);
|
|
5756
|
+
will-change: opacity;
|
|
5757
|
+
}
|
|
5758
|
+
|
|
5759
|
+
/* pan-x: the browser pages; vertical drags and pinches reach the gesture code */
|
|
5760
|
+
.image-gallery__lightbox-strip {
|
|
5761
|
+
touch-action: pan-x;
|
|
5762
|
+
}
|
|
5763
|
+
|
|
5764
|
+
/* Zoomed: no paging, a drag pans the image */
|
|
5765
|
+
.image-gallery__lightbox-stage[data-zoomed] .image-gallery__lightbox-strip {
|
|
5766
|
+
touch-action: none;
|
|
5767
|
+
}
|
|
5768
|
+
|
|
5769
|
+
.image-gallery__lightbox-slide {
|
|
5606
5770
|
display: flex;
|
|
5607
5771
|
align-items: center;
|
|
5608
5772
|
justify-content: center;
|
|
5773
|
+
box-sizing: border-box;
|
|
5774
|
+
padding: var(--gap-md);
|
|
5775
|
+
/* The frame sizes itself against the slide's content box (cq units) */
|
|
5776
|
+
container-type: size;
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
/* Box of one image. Until its aspect ratio is known it fills the slide (the images are
|
|
5780
|
+
`contain`, so they look the same); then it is exactly the fitted image: the zoom, pan,
|
|
5781
|
+
hit-test and open / close morph target. */
|
|
5782
|
+
.image-gallery__lightbox-frame {
|
|
5783
|
+
position: relative;
|
|
5784
|
+
flex: none;
|
|
5609
5785
|
width: 100%;
|
|
5610
|
-
|
|
5786
|
+
height: 100%;
|
|
5787
|
+
cursor: zoom-in;
|
|
5611
5788
|
}
|
|
5612
5789
|
|
|
5613
|
-
.image-gallery__lightbox-
|
|
5614
|
-
|
|
5615
|
-
max-height: 85dvh;
|
|
5616
|
-
width: auto;
|
|
5790
|
+
.image-gallery__lightbox-frame[data-sized] {
|
|
5791
|
+
width: min(100cqw, 100cqh * var(--image-ratio));
|
|
5617
5792
|
height: auto;
|
|
5793
|
+
aspect-ratio: var(--image-ratio);
|
|
5794
|
+
}
|
|
5795
|
+
|
|
5796
|
+
/* Full image over its cached thumbnail: never an empty slide while it downloads */
|
|
5797
|
+
.image-gallery__lightbox-frame > img {
|
|
5798
|
+
position: absolute;
|
|
5799
|
+
inset: 0;
|
|
5800
|
+
display: block;
|
|
5801
|
+
width: 100%;
|
|
5802
|
+
height: 100%;
|
|
5618
5803
|
-o-object-fit: contain;
|
|
5619
5804
|
object-fit: contain;
|
|
5805
|
+
-webkit-user-drag: none;
|
|
5806
|
+
}
|
|
5807
|
+
|
|
5808
|
+
.image-gallery__lightbox-frame[data-loaded] > .image-gallery__lightbox-placeholder {
|
|
5809
|
+
visibility: hidden;
|
|
5810
|
+
}
|
|
5811
|
+
|
|
5812
|
+
/* Own layer only for what a gesture moves: the dragged slide, the zoomed image */
|
|
5813
|
+
.image-gallery__lightbox-stage[data-closing]
|
|
5814
|
+
.image-gallery__lightbox-slide:not([aria-hidden]) {
|
|
5815
|
+
will-change: translate;
|
|
5816
|
+
}
|
|
5817
|
+
|
|
5818
|
+
.image-gallery__lightbox-stage[data-zoomed]
|
|
5819
|
+
.image-gallery__lightbox-slide:not([aria-hidden])
|
|
5820
|
+
> .image-gallery__lightbox-frame {
|
|
5821
|
+
will-change: transform;
|
|
5822
|
+
cursor: grab;
|
|
5823
|
+
}
|
|
5824
|
+
|
|
5825
|
+
.image-gallery__lightbox-stage[data-zoomed]:active
|
|
5826
|
+
.image-gallery__lightbox-frame {
|
|
5827
|
+
cursor: grabbing;
|
|
5828
|
+
}
|
|
5829
|
+
|
|
5830
|
+
/* Settles (snap back, double-tap / click zoom) are transitions, off during a gesture */
|
|
5831
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
5832
|
+
.image-gallery__lightbox-stage[data-settle]
|
|
5833
|
+
:is(
|
|
5834
|
+
.image-gallery__lightbox-backdrop,
|
|
5835
|
+
.image-gallery__lightbox-slide,
|
|
5836
|
+
.image-gallery__lightbox-frame
|
|
5837
|
+
) {
|
|
5838
|
+
transition-property: opacity, translate, transform;
|
|
5839
|
+
transition-duration: var(--dur-normal);
|
|
5840
|
+
transition-timing-function: var(--ease-heavy);
|
|
5841
|
+
}
|
|
5842
|
+
|
|
5843
|
+
/* Pan glide after a fling: a long deceleration. GLIDE_MS in lightboxGestures.ts
|
|
5844
|
+
projects the end point from these two tokens; keep them in step. */
|
|
5845
|
+
.image-gallery__lightbox-stage[data-settle='momentum']
|
|
5846
|
+
.image-gallery__lightbox-frame {
|
|
5847
|
+
transition-duration: var(--dur-slow);
|
|
5848
|
+
}
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5851
|
+
/* Open / close morph: the tapped image grows into the lightbox and shrinks back
|
|
5852
|
+
(same-document view transition, run by the browser on the compositor). */
|
|
5853
|
+
::view-transition-group(image-gallery-image) {
|
|
5854
|
+
animation-duration: var(--dur-normal);
|
|
5855
|
+
animation-timing-function: var(--ease-heavy);
|
|
5856
|
+
}
|
|
5857
|
+
|
|
5858
|
+
::view-transition-old(image-gallery-image),
|
|
5859
|
+
::view-transition-new(image-gallery-image) {
|
|
5860
|
+
height: 100%;
|
|
5861
|
+
-o-object-fit: cover;
|
|
5862
|
+
object-fit: cover;
|
|
5863
|
+
overflow: clip;
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5866
|
+
/* With the morph, the view transition animates open / close: the dialog's own
|
|
5867
|
+
fade would run on top of it. Same conditions as `canMorph` in ImageGallery.tsx. */
|
|
5868
|
+
@supports (view-transition-name: none) {
|
|
5869
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
5870
|
+
.image-gallery__lightbox.dndev-modal-content[data-state],
|
|
5871
|
+
.dndev-overlay[data-state]:has(+ .image-gallery__lightbox) {
|
|
5872
|
+
animation: none;
|
|
5873
|
+
}
|
|
5874
|
+
}
|
|
5875
|
+
}
|
|
5876
|
+
|
|
5877
|
+
.image-gallery__lightbox-counter {
|
|
5878
|
+
position: absolute;
|
|
5879
|
+
top: var(--gap-md);
|
|
5880
|
+
inset-inline-start: var(--gap-md);
|
|
5881
|
+
z-index: 3;
|
|
5882
|
+
padding: calc(var(--gap-sm) / 2) var(--gap-sm);
|
|
5883
|
+
border-radius: var(--radius-full);
|
|
5884
|
+
background-color: var(--card);
|
|
5885
|
+
color: var(--foreground);
|
|
5886
|
+
font-size: var(--font-size-sm);
|
|
5887
|
+
font-variant-numeric: tabular-nums;
|
|
5620
5888
|
}
|
|
5621
5889
|
|
|
5622
5890
|
.image-gallery__lightbox-nav {
|
|
@@ -5624,6 +5892,12 @@ em {
|
|
|
5624
5892
|
z-index: 3;
|
|
5625
5893
|
}
|
|
5626
5894
|
|
|
5895
|
+
/* Touch: swipe pages, so arrows are noise */
|
|
5896
|
+
@media (pointer: coarse) {
|
|
5897
|
+
.image-gallery__lightbox-nav {
|
|
5898
|
+
display: none;
|
|
5899
|
+
}
|
|
5900
|
+
}
|
|
5627
5901
|
/* packages/components/src/atomic/Input/Input.css */
|
|
5628
5902
|
|
|
5629
5903
|
/* Hide number input spinners - cleaner UI for price/range inputs */
|
|
@@ -8188,6 +8462,11 @@ input[type='number'] {
|
|
|
8188
8462
|
will-change: transform;
|
|
8189
8463
|
}
|
|
8190
8464
|
|
|
8465
|
+
/* Primary while on: thumb in the primary foreground (as Checkbox), readable on the track */
|
|
8466
|
+
.dndev-switch[data-variant='primary'][data-state='checked'] .dndev-switch-thumb {
|
|
8467
|
+
background-color: var(--primary-foreground);
|
|
8468
|
+
}
|
|
8469
|
+
|
|
8191
8470
|
.dndev-switch[data-state='checked'] .dndev-switch-thumb {
|
|
8192
8471
|
transform: translateX(calc(2.75rem - 1.25rem - 0.125rem));
|
|
8193
8472
|
}
|
|
@@ -8243,6 +8522,10 @@ input[type='number'] {
|
|
|
8243
8522
|
font-weight: var(--font-weight-normal);
|
|
8244
8523
|
}
|
|
8245
8524
|
|
|
8525
|
+
/* Switch with a label after it: the switch keeps its size, the label wraps */
|
|
8526
|
+
.dndev-switch-field > .dndev-switch {
|
|
8527
|
+
flex-shrink: 0;
|
|
8528
|
+
}
|
|
8246
8529
|
/* packages/components/src/atomic/Table/Table.css */
|
|
8247
8530
|
|
|
8248
8531
|
.dndev-table-wrapper {
|
|
@@ -8477,6 +8760,84 @@ input[type='number'] {
|
|
|
8477
8760
|
opacity: var(--opacity-muted);
|
|
8478
8761
|
}
|
|
8479
8762
|
}
|
|
8763
|
+
|
|
8764
|
+
/* Editable DataTable --------------------------------------------------- */
|
|
8765
|
+
|
|
8766
|
+
/* Scope for editor lookup (keyboard navigation); adds no box. */
|
|
8767
|
+
.dndev-table-edit-scope {
|
|
8768
|
+
display: contents;
|
|
8769
|
+
}
|
|
8770
|
+
|
|
8771
|
+
.dndev-table-bulk-bar {
|
|
8772
|
+
padding: var(--gap-xs) var(--gap-sm);
|
|
8773
|
+
border: 1px solid var(--border);
|
|
8774
|
+
background-color: var(--muted);
|
|
8775
|
+
}
|
|
8776
|
+
|
|
8777
|
+
/* Cell editor: fills the cell, reads as text until focused. */
|
|
8778
|
+
.dndev-table-cell-editor {
|
|
8779
|
+
width: 100%;
|
|
8780
|
+
min-width: 6rem;
|
|
8781
|
+
font: inherit;
|
|
8782
|
+
color: inherit;
|
|
8783
|
+
background-color: transparent;
|
|
8784
|
+
border: 1px solid transparent;
|
|
8785
|
+
border-radius: var(--radius-sm);
|
|
8786
|
+
padding: var(--gap-xs);
|
|
8787
|
+
}
|
|
8788
|
+
|
|
8789
|
+
.dndev-table-cell-editor:hover {
|
|
8790
|
+
border-color: var(--border);
|
|
8791
|
+
}
|
|
8792
|
+
|
|
8793
|
+
.dndev-table-cell-editor:focus-visible,
|
|
8794
|
+
.dndev-table-cell-editor:focus {
|
|
8795
|
+
outline: 2px solid var(--ring);
|
|
8796
|
+
outline-offset: -1px;
|
|
8797
|
+
background-color: var(--background);
|
|
8798
|
+
}
|
|
8799
|
+
|
|
8800
|
+
.dndev-table-bulk-bar .dndev-table-cell-editor {
|
|
8801
|
+
width: auto;
|
|
8802
|
+
border-color: var(--border);
|
|
8803
|
+
background-color: var(--background);
|
|
8804
|
+
}
|
|
8805
|
+
|
|
8806
|
+
.dndev-table-cell[data-editable='true'] {
|
|
8807
|
+
padding-block: 0;
|
|
8808
|
+
}
|
|
8809
|
+
|
|
8810
|
+
/* Changed, not saved yet */
|
|
8811
|
+
.dndev-table-cell[data-dirty='true'] {
|
|
8812
|
+
background-color: color-mix(in oklab, var(--primary) 12%, transparent);
|
|
8813
|
+
}
|
|
8814
|
+
|
|
8815
|
+
/* Value that does not parse: the save will reject it */
|
|
8816
|
+
.dndev-table-cell[data-invalid='true'] .dndev-table-cell-editor {
|
|
8817
|
+
border-color: var(--destructive);
|
|
8818
|
+
}
|
|
8819
|
+
|
|
8820
|
+
/* Open cell: icon link to the row's record (touch-sized hit area) */
|
|
8821
|
+
.dndev-table-open-link {
|
|
8822
|
+
display: inline-flex;
|
|
8823
|
+
align-items: center;
|
|
8824
|
+
justify-content: center;
|
|
8825
|
+
min-width: var(--touch-target);
|
|
8826
|
+
min-height: var(--touch-target);
|
|
8827
|
+
color: var(--muted-foreground);
|
|
8828
|
+
border-radius: var(--radius-sm);
|
|
8829
|
+
}
|
|
8830
|
+
|
|
8831
|
+
.dndev-table-open-link:hover {
|
|
8832
|
+
color: var(--foreground);
|
|
8833
|
+
background-color: var(--muted);
|
|
8834
|
+
}
|
|
8835
|
+
|
|
8836
|
+
.dndev-table-open-link:focus-visible {
|
|
8837
|
+
outline: 2px solid var(--ring);
|
|
8838
|
+
outline-offset: -1px;
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8480
8841
|
/* packages/components/src/atomic/Tabs/Tabs.css */
|
|
8481
8842
|
|
|
8482
8843
|
/* Tabs list: use flexbox for natural wrapping, not grid */
|
|
@@ -8496,100 +8857,51 @@ input[type='number'] {
|
|
|
8496
8857
|
word-break: break-word;
|
|
8497
8858
|
border: var(--border-hairline) solid var(--line-2); /* Show clickable area */
|
|
8498
8859
|
|
|
8499
|
-
/*
|
|
8500
|
-
|
|
8501
|
-
|
|
8860
|
+
/*
|
|
8861
|
+
* Inactive = neutral surface, active = filled with the variant colour, so the
|
|
8862
|
+
* selected tab is the one that stands out (the panel sits below with a gap, it
|
|
8863
|
+
* is not a folder tab joined to its content). --card not --background: the tab
|
|
8864
|
+
* surface must be opaque (--background can be transparent in some themes).
|
|
8865
|
+
*/
|
|
8866
|
+
background-color: var(--card);
|
|
8867
|
+
color: var(--muted-foreground);
|
|
8868
|
+
--tab-active-bg: var(--primary);
|
|
8869
|
+
--tab-active-fg: var(--primary-foreground);
|
|
8502
8870
|
}
|
|
8503
|
-
.dndev-interactive[data-role='tab-trigger'][data-state='active'] {
|
|
8504
|
-
/* --card not --background: active tab surface must be opaque (--background can be transparent in some themes) */
|
|
8505
|
-
background-color: var(--card);
|
|
8871
|
+
.dndev-interactive[data-role='tab-trigger']:hover:not([data-state='active']):not(:disabled) {
|
|
8506
8872
|
color: var(--foreground);
|
|
8507
|
-
box-shadow: var(--shadow-sm);
|
|
8508
|
-
border-color: var(--primary);
|
|
8509
|
-
}
|
|
8510
|
-
/* Default/Primary variant: inactive = primary, active = foreground/card */
|
|
8511
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='default'],.dndev-interactive[data-role='tab-trigger'][data-variant='primary'] {
|
|
8512
|
-
background-color: var(--primary);
|
|
8513
|
-
color: var(--primary-foreground);
|
|
8514
8873
|
}
|
|
8515
|
-
[data-state='active']:is(.dndev-interactive[data-role='tab-trigger'][data-variant='default'],.dndev-interactive[data-role='tab-trigger'][data-variant='primary']) {
|
|
8516
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8517
|
-
background-color: var(--card);
|
|
8518
|
-
color: var(--foreground);
|
|
8519
|
-
box-shadow: var(--shadow-sm);
|
|
8520
|
-
border-color: var(--primary);
|
|
8521
|
-
}
|
|
8522
|
-
/* Secondary variant: inactive = secondary, active = foreground/card */
|
|
8523
8874
|
.dndev-interactive[data-role='tab-trigger'][data-variant='secondary'] {
|
|
8524
|
-
|
|
8525
|
-
|
|
8875
|
+
--tab-active-bg: var(--secondary);
|
|
8876
|
+
--tab-active-fg: var(--secondary-foreground);
|
|
8526
8877
|
}
|
|
8527
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='secondary'][data-state='active'] {
|
|
8528
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8529
|
-
background-color: var(--card);
|
|
8530
|
-
color: var(--foreground);
|
|
8531
|
-
box-shadow: var(--shadow-sm);
|
|
8532
|
-
border-color: var(--secondary);
|
|
8533
|
-
}
|
|
8534
|
-
/* Accent variant: inactive = accent, active = foreground/card */
|
|
8535
8878
|
.dndev-interactive[data-role='tab-trigger'][data-variant='accent'] {
|
|
8536
|
-
|
|
8537
|
-
|
|
8879
|
+
--tab-active-bg: var(--accent);
|
|
8880
|
+
--tab-active-fg: var(--accent-foreground);
|
|
8538
8881
|
}
|
|
8539
|
-
|
|
8540
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8541
|
-
background-color: var(--card);
|
|
8542
|
-
color: var(--foreground);
|
|
8543
|
-
box-shadow: var(--shadow-sm);
|
|
8544
|
-
border-color: var(--accent);
|
|
8545
|
-
}
|
|
8546
|
-
/* Muted variant: inactive = muted, active = primary (to contrast) */
|
|
8882
|
+
/* Muted: the muted fill would not stand out as the selection, so primary */
|
|
8547
8883
|
.dndev-interactive[data-role='tab-trigger'][data-variant='muted'] {
|
|
8548
|
-
|
|
8549
|
-
|
|
8884
|
+
--tab-active-bg: var(--primary);
|
|
8885
|
+
--tab-active-fg: var(--primary-foreground);
|
|
8550
8886
|
}
|
|
8551
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='muted'][data-state='active'] {
|
|
8552
|
-
background-color: var(--primary);
|
|
8553
|
-
color: var(--primary-foreground);
|
|
8554
|
-
box-shadow: var(--shadow-sm);
|
|
8555
|
-
border-color: var(--primary);
|
|
8556
|
-
}
|
|
8557
|
-
/* Warning variant: inactive = warning, active = foreground/card */
|
|
8558
8887
|
.dndev-interactive[data-role='tab-trigger'][data-variant='warning'] {
|
|
8559
|
-
|
|
8560
|
-
|
|
8888
|
+
--tab-active-bg: var(--warning);
|
|
8889
|
+
--tab-active-fg: var(--warning-foreground);
|
|
8561
8890
|
}
|
|
8562
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='warning'][data-state='active'] {
|
|
8563
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8564
|
-
background-color: var(--card);
|
|
8565
|
-
color: var(--foreground);
|
|
8566
|
-
box-shadow: var(--shadow-sm);
|
|
8567
|
-
border-color: var(--warning);
|
|
8568
|
-
}
|
|
8569
|
-
/* Success variant: inactive = success, active = foreground/card */
|
|
8570
8891
|
.dndev-interactive[data-role='tab-trigger'][data-variant='success'] {
|
|
8571
|
-
|
|
8572
|
-
|
|
8892
|
+
--tab-active-bg: var(--success);
|
|
8893
|
+
--tab-active-fg: var(--success-foreground);
|
|
8573
8894
|
}
|
|
8574
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='success'][data-state='active'] {
|
|
8575
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8576
|
-
background-color: var(--card);
|
|
8577
|
-
color: var(--foreground);
|
|
8578
|
-
box-shadow: var(--shadow-sm);
|
|
8579
|
-
border-color: var(--success);
|
|
8580
|
-
}
|
|
8581
|
-
/* Destructive variant: inactive = destructive, active = foreground/card */
|
|
8582
8895
|
.dndev-interactive[data-role='tab-trigger'][data-variant='destructive'] {
|
|
8583
|
-
|
|
8584
|
-
|
|
8896
|
+
--tab-active-bg: var(--destructive);
|
|
8897
|
+
--tab-active-fg: var(--destructive-foreground);
|
|
8898
|
+
}
|
|
8899
|
+
.dndev-interactive[data-role='tab-trigger'][data-state='active'] {
|
|
8900
|
+
background-color: var(--tab-active-bg);
|
|
8901
|
+
color: var(--tab-active-fg);
|
|
8902
|
+
border-color: var(--tab-active-bg);
|
|
8903
|
+
box-shadow: var(--shadow-sm);
|
|
8585
8904
|
}
|
|
8586
|
-
.dndev-interactive[data-role='tab-trigger'][data-variant='destructive'][data-state='active'] {
|
|
8587
|
-
/* --card not --background: active tab surface must be opaque */
|
|
8588
|
-
background-color: var(--card);
|
|
8589
|
-
color: var(--foreground);
|
|
8590
|
-
box-shadow: var(--shadow-sm);
|
|
8591
|
-
border-color: var(--destructive);
|
|
8592
|
-
}
|
|
8593
8905
|
|
|
8594
8906
|
.dndev-tabs-content {
|
|
8595
8907
|
margin-top: var(--gap-md);
|