@donotdev/components 0.3.4 → 0.3.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.
- package/dist/advanced/ImageGallery/ImageGallery.d.ts +16 -4
- package/dist/advanced/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/dist/advanced/ImageGallery/ImageGallery.js +1 -1
- package/dist/advanced/ImageGallery/snapStrip.d.ts +6 -0
- package/dist/advanced/ImageGallery/snapStrip.d.ts.map +1 -1
- package/dist/advanced/ImageGallery/snapStrip.js +1 -1
- package/dist/atomic/Accordion/AccordionPrimitive.d.ts +7 -0
- package/dist/atomic/Accordion/AccordionPrimitive.d.ts.map +1 -1
- package/dist/atomic/Accordion/AccordionPrimitive.js +1 -1
- package/dist/atomic/Accordion/index.d.ts +18 -2
- package/dist/atomic/Accordion/index.d.ts.map +1 -1
- package/dist/atomic/Accordion/index.js +1 -1
- package/dist/atomic/ActionBar/index.d.ts +66 -0
- package/dist/atomic/ActionBar/index.d.ts.map +1 -0
- package/dist/atomic/ActionBar/index.js +1 -0
- package/dist/atomic/Button/IconBadge.d.ts +18 -0
- package/dist/atomic/Button/IconBadge.d.ts.map +1 -0
- package/dist/atomic/Button/IconBadge.js +1 -0
- package/dist/atomic/Button/index.d.ts +10 -7
- package/dist/atomic/Button/index.d.ts.map +1 -1
- package/dist/atomic/Button/index.js +1 -1
- package/dist/atomic/Card/cover.d.ts +11 -3
- package/dist/atomic/Card/cover.d.ts.map +1 -1
- package/dist/atomic/Card/cover.js +1 -1
- package/dist/atomic/Card/index.d.ts +16 -1
- package/dist/atomic/Card/index.d.ts.map +1 -1
- package/dist/atomic/Card/index.js +1 -1
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts +6 -0
- package/dist/atomic/Collapsible/CollapsiblePrimitive.d.ts.map +1 -1
- package/dist/atomic/Collapsible/CollapsiblePrimitive.js +1 -1
- package/dist/atomic/Collapsible/index.d.ts +3 -1
- package/dist/atomic/Collapsible/index.d.ts.map +1 -1
- package/dist/atomic/Collapsible/index.js +1 -1
- package/dist/atomic/Floating/index.d.ts +67 -0
- package/dist/atomic/Floating/index.d.ts.map +1 -0
- package/dist/atomic/Floating/index.js +1 -0
- package/dist/atomic/Grid/index.d.ts +12 -0
- package/dist/atomic/Grid/index.d.ts.map +1 -1
- package/dist/atomic/Grid/index.js +1 -1
- package/dist/atomic/List/index.d.ts +10 -1
- package/dist/atomic/List/index.d.ts.map +1 -1
- package/dist/atomic/List/index.js +1 -1
- package/dist/atomic/QuantityStepper/index.d.ts +42 -4
- package/dist/atomic/QuantityStepper/index.d.ts.map +1 -1
- package/dist/atomic/QuantityStepper/index.js +1 -1
- package/dist/atomic/Section/index.d.ts +15 -1
- package/dist/atomic/Section/index.d.ts.map +1 -1
- package/dist/atomic/Section/index.js +1 -1
- package/dist/atomic/Text/index.d.ts +15 -2
- package/dist/atomic/Text/index.d.ts.map +1 -1
- package/dist/atomic/Text/index.js +2 -2
- package/dist/atomic/Tooltip/TooltipPrimitive.d.ts +5 -0
- package/dist/atomic/Tooltip/TooltipPrimitive.d.ts.map +1 -1
- package/dist/atomic/Tooltip/TooltipPrimitive.js +1 -1
- package/dist/atomic/index.d.ts +4 -2
- package/dist/atomic/index.d.ts.map +1 -1
- package/dist/atomic/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/index.css +575 -97
- package/dist/symbol-index.json +1 -1
- package/dist/utils/flights.d.ts +30 -0
- package/dist/utils/flights.d.ts.map +1 -0
- package/dist/utils/flights.js +1 -0
- package/dist/utils/flyTo.d.ts +45 -0
- package/dist/utils/flyTo.d.ts.map +1 -0
- package/dist/utils/flyTo.js +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/responsiveImage.d.ts +64 -9
- package/dist/utils/responsiveImage.d.ts.map +1 -1
- package/dist/utils/responsiveImage.js +1 -1
- package/guidelines/API_REFERENCE.md +5 -2
- package/guidelines/COMPONENTS.md +13 -9
- package/guidelines/QUANTITY_STEPPER.md +25 -3
- package/package.json +1 -1
- package/dist/atomic/PortalButton/index.d.ts +0 -32
- package/dist/atomic/PortalButton/index.d.ts.map +0 -1
- package/dist/atomic/PortalButton/index.js +0 -1
package/dist/styles/index.css
CHANGED
|
@@ -464,6 +464,21 @@
|
|
|
464
464
|
[data-density]:where(:not(.dndev-layout)) {
|
|
465
465
|
--font-size-input: max(16px, var(--font-size-base));
|
|
466
466
|
}
|
|
467
|
+
|
|
468
|
+
/* Section content gutter: --gap-md, --gap-lg from 1024px. Section pads its content with
|
|
469
|
+
it, Floating aligns its controls on it; an app element that must line up with the page
|
|
470
|
+
content (a custom header's logo) reads it too. Declared on nested [data-density] too,
|
|
471
|
+
so it resolves their own gaps. */
|
|
472
|
+
:where(:root),
|
|
473
|
+
[data-density]:where(:not(.dndev-layout)) {
|
|
474
|
+
--section-gutter: var(--gap-md);
|
|
475
|
+
}
|
|
476
|
+
@media (width >= 1024px) {
|
|
477
|
+
:where(:root),
|
|
478
|
+
[data-density]:where(:not(.dndev-layout)) {
|
|
479
|
+
--section-gutter: var(--gap-lg);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
467
482
|
/* 2. Theme system - color palette definitions */
|
|
468
483
|
/* packages/components/src/styles/themes.css */
|
|
469
484
|
|
|
@@ -1393,6 +1408,10 @@ em {
|
|
|
1393
1408
|
font-size: var(--font-size-base);
|
|
1394
1409
|
font-weight: var(--font-weight-medium);
|
|
1395
1410
|
text-transform: var(--text-transform-button, none);
|
|
1411
|
+
/* A control rendered as <a> (Button `render`): base.css resets the underline only
|
|
1412
|
+
for a:not(.dndev-interactive), so the UA underline would show. Only
|
|
1413
|
+
variant="link" underlines (its own rule below). */
|
|
1414
|
+
text-decoration: none;
|
|
1396
1415
|
transition:
|
|
1397
1416
|
background var(--dur-fast) var(--ease-in-out),
|
|
1398
1417
|
color var(--dur-fast) var(--ease-in-out),
|
|
@@ -2289,6 +2308,33 @@ em {
|
|
|
2289
2308
|
animation: universal-slide var(--dur-heavy) ease-out forwards;
|
|
2290
2309
|
}
|
|
2291
2310
|
|
|
2311
|
+
/* Step change of a multi-step flow (e.g. the auth EmailSignUpFlow): the entering step
|
|
2312
|
+
fades in, sliding from the end side (forward) or the start side (back), mirrored in
|
|
2313
|
+
RTL. `backwards`: no transform is left once it ends (no containing block for fixed
|
|
2314
|
+
descendants). Reduced motion: no slide (base.css). */
|
|
2315
|
+
.dndev-animate-step-forward,
|
|
2316
|
+
.dndev-animate-step-back {
|
|
2317
|
+
animation: universal-slide var(--dur-normal) var(--ease-in-out) backwards;
|
|
2318
|
+
--transform-end: translateX(0);
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
/* Separate rules: a browser without :dir() drops only the RTL ones. */
|
|
2322
|
+
.dndev-animate-step-forward {
|
|
2323
|
+
--transform-start: translateX(1.5rem);
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
.dndev-animate-step-back {
|
|
2327
|
+
--transform-start: translateX(-1.5rem);
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
.dndev-animate-step-forward:dir(rtl) {
|
|
2331
|
+
--transform-start: translateX(-1.5rem);
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
.dndev-animate-step-back:dir(rtl) {
|
|
2335
|
+
--transform-start: translateX(1.5rem);
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2292
2338
|
.animation-delay-100 {
|
|
2293
2339
|
animation-delay: 100ms;
|
|
2294
2340
|
}
|
|
@@ -2367,33 +2413,18 @@ em {
|
|
|
2367
2413
|
}
|
|
2368
2414
|
|
|
2369
2415
|
.dndev-accordion-content[data-state='open'] {
|
|
2370
|
-
|
|
2416
|
+
/* Fade only (shared fade-in keyframes, animations.css): no height slide, no
|
|
2417
|
+
measured height needed; base.css shortens it under prefers-reduced-motion */
|
|
2418
|
+
animation: fade-in var(--dur-normal) var(--ease-in-out);
|
|
2371
2419
|
}
|
|
2372
2420
|
|
|
2421
|
+
/*
|
|
2422
|
+
* Closed content stays mounted (forceMount: in the server HTML for crawlers)
|
|
2423
|
+
* and is hidden here: display:none = not visible, focusable or announced.
|
|
2424
|
+
* Opening fades in; closing is instant. Same as Tabs inactive panels.
|
|
2425
|
+
*/
|
|
2373
2426
|
.dndev-accordion-content[data-state='closed'] {
|
|
2374
|
-
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
@keyframes slideDown {
|
|
2378
|
-
from {
|
|
2379
|
-
height: 0;
|
|
2380
|
-
opacity: 0;
|
|
2381
|
-
}
|
|
2382
|
-
to {
|
|
2383
|
-
height: var(--radix-collapsible-content-height);
|
|
2384
|
-
opacity: 1;
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
@keyframes slideUp {
|
|
2389
|
-
from {
|
|
2390
|
-
height: var(--radix-collapsible-content-height);
|
|
2391
|
-
opacity: 1;
|
|
2392
|
-
}
|
|
2393
|
-
to {
|
|
2394
|
-
height: 0;
|
|
2395
|
-
opacity: 0;
|
|
2396
|
-
}
|
|
2427
|
+
display: none;
|
|
2397
2428
|
}
|
|
2398
2429
|
|
|
2399
2430
|
.dndev-accordion-content-inner {
|
|
@@ -2405,6 +2436,68 @@ em {
|
|
|
2405
2436
|
word-wrap: break-word;
|
|
2406
2437
|
}
|
|
2407
2438
|
|
|
2439
|
+
/* packages/components/src/atomic/ActionBar/ActionBar.css */
|
|
2440
|
+
|
|
2441
|
+
/* Fixed to the bottom of the viewport (portalled to <body>), over the page. While shown, the
|
|
2442
|
+
component sets its height as --action-bar-height on <html>, and the layout reserves it at
|
|
2443
|
+
the bottom (layout-variables.css, @donotdev/ui), so the end of the page scrolls above it.
|
|
2444
|
+
Hidden: slid below the viewport, and visibility hidden once the slide ends (not focusable,
|
|
2445
|
+
not in the accessibility tree). */
|
|
2446
|
+
.dndev-action-bar {
|
|
2447
|
+
position: fixed;
|
|
2448
|
+
inset-inline: 0;
|
|
2449
|
+
inset-block-end: 0;
|
|
2450
|
+
z-index: var(--z-header);
|
|
2451
|
+
background: var(--background);
|
|
2452
|
+
color: var(--foreground);
|
|
2453
|
+
border-block-start: var(--border-hairline) solid var(--border);
|
|
2454
|
+
padding-block: var(--gap-sm) max(var(--gap-sm), env(safe-area-inset-bottom));
|
|
2455
|
+
padding-inline: max(
|
|
2456
|
+
var(--gap-md),
|
|
2457
|
+
env(safe-area-inset-left),
|
|
2458
|
+
env(safe-area-inset-right)
|
|
2459
|
+
);
|
|
2460
|
+
transform: translateY(100%);
|
|
2461
|
+
visibility: hidden;
|
|
2462
|
+
transition:
|
|
2463
|
+
transform var(--dur-normal) var(--ease-in-out),
|
|
2464
|
+
visibility 0s linear var(--dur-normal);
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
.dndev-action-bar[data-open] {
|
|
2468
|
+
transform: none;
|
|
2469
|
+
visibility: visible;
|
|
2470
|
+
transition:
|
|
2471
|
+
transform var(--dur-normal) var(--ease-in-out),
|
|
2472
|
+
visibility 0s;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2476
|
+
.dndev-action-bar,
|
|
2477
|
+
.dndev-action-bar[data-open] {
|
|
2478
|
+
transition: none;
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
|
|
2482
|
+
/* hideFrom: same thresholds as Grid / BREAKPOINT_THRESHOLDS */
|
|
2483
|
+
@media (min-width: 768px) {
|
|
2484
|
+
.dndev-action-bar[data-hide-from='tablet'] {
|
|
2485
|
+
display: none;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
@media (min-width: 1024px) {
|
|
2490
|
+
.dndev-action-bar[data-hide-from='laptop'] {
|
|
2491
|
+
display: none;
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
@media (min-width: 1440px) {
|
|
2496
|
+
.dndev-action-bar[data-hide-from='desktop'] {
|
|
2497
|
+
display: none;
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2408
2501
|
/* packages/components/src/atomic/Alert/Alert.css */
|
|
2409
2502
|
|
|
2410
2503
|
/**
|
|
@@ -2869,11 +2962,73 @@ em {
|
|
|
2869
2962
|
pointer-events: none;
|
|
2870
2963
|
}
|
|
2871
2964
|
|
|
2965
|
+
/* Disabled / loading Button (a loading Button is disabled): muted, never faded.
|
|
2966
|
+
Filled variants take the --muted background; ghost, link, outline and destructive
|
|
2967
|
+
(drawn outlined) keep a transparent one. Label and spinner (currentColor, below) take
|
|
2968
|
+
--muted-foreground, readable in every theme since both derive from fg/bg.
|
|
2969
|
+
Scoped to Button (.dndev-button): other .dndev-interactive controls (tabs, toggles,
|
|
2970
|
+
menu items) keep the generic fade of patterns.css. The extra class and the
|
|
2971
|
+
[data-variant] / :hover / accent-surface forms outrank every variant, hover and
|
|
2972
|
+
surface rule of patterns.css whatever the load order: a button disabled under the
|
|
2973
|
+
pointer (the click that starts loading) must not keep its hover colour. */
|
|
2974
|
+
.dndev-interactive.dndev-button:disabled,
|
|
2975
|
+
.dndev-interactive.dndev-button[data-variant]:disabled,
|
|
2976
|
+
.dndev-interactive.dndev-button[data-variant]:disabled:hover,
|
|
2977
|
+
.dndev-surface[data-variant='accent'] .dndev-interactive.dndev-button:disabled,
|
|
2978
|
+
.dndev-floating[data-variant='accent'] .dndev-interactive.dndev-button:disabled {
|
|
2979
|
+
opacity: 1;
|
|
2980
|
+
background: var(--muted);
|
|
2981
|
+
color: var(--muted-foreground);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
.dndev-interactive.dndev-button:is(
|
|
2985
|
+
[data-variant='ghost'],
|
|
2986
|
+
[data-variant='link'],
|
|
2987
|
+
[data-variant='outline'],
|
|
2988
|
+
[data-variant='destructive']
|
|
2989
|
+
):disabled,
|
|
2990
|
+
.dndev-interactive.dndev-button:is(
|
|
2991
|
+
[data-variant='ghost'],
|
|
2992
|
+
[data-variant='link'],
|
|
2993
|
+
[data-variant='outline'],
|
|
2994
|
+
[data-variant='destructive']
|
|
2995
|
+
):disabled:hover,
|
|
2996
|
+
.dndev-surface[data-variant='accent']
|
|
2997
|
+
.dndev-interactive.dndev-button:is(
|
|
2998
|
+
[data-variant='ghost'],
|
|
2999
|
+
[data-variant='link'],
|
|
3000
|
+
[data-variant='outline'],
|
|
3001
|
+
[data-variant='destructive']
|
|
3002
|
+
):disabled,
|
|
3003
|
+
.dndev-floating[data-variant='accent']
|
|
3004
|
+
.dndev-interactive.dndev-button:is(
|
|
3005
|
+
[data-variant='ghost'],
|
|
3006
|
+
[data-variant='link'],
|
|
3007
|
+
[data-variant='outline'],
|
|
3008
|
+
[data-variant='destructive']
|
|
3009
|
+
):disabled {
|
|
3010
|
+
background: transparent;
|
|
3011
|
+
color: var(--muted-foreground);
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
/* Outlined variants keep their shape, in the neutral border colour */
|
|
3015
|
+
.dndev-interactive.dndev-button:is([data-variant='outline'], [data-variant='destructive']):disabled {
|
|
3016
|
+
border-color: var(--border);
|
|
3017
|
+
}
|
|
3018
|
+
|
|
2872
3019
|
/* Button spinner - inherits size from button font-size */
|
|
2873
3020
|
.dndev-button-spinner {
|
|
2874
3021
|
flex-shrink: 0;
|
|
2875
3022
|
}
|
|
2876
3023
|
|
|
3024
|
+
/* The spinner replaces the icon and takes the label colour: --muted-foreground while
|
|
3025
|
+
the button is loading (see the disabled rules above).
|
|
3026
|
+
Three classes outrank `.dndev-spinner[data-variant]`. */
|
|
3027
|
+
.dndev-interactive .dndev-spinner.dndev-button-spinner {
|
|
3028
|
+
border-top-color: currentColor;
|
|
3029
|
+
border-inline-end-color: currentColor;
|
|
3030
|
+
}
|
|
3031
|
+
|
|
2877
3032
|
/* Progress ring for upload percentage */
|
|
2878
3033
|
.dndev-button-progress {
|
|
2879
3034
|
display: inline-flex;
|
|
@@ -3596,17 +3751,10 @@ em {
|
|
|
3596
3751
|
align-items: center;
|
|
3597
3752
|
max-width: var(--content-width);
|
|
3598
3753
|
margin-inline: auto;
|
|
3599
|
-
/*
|
|
3600
|
-
padding-inline: var(--
|
|
3754
|
+
/* The Section content gutter: lines up with the page content */
|
|
3755
|
+
padding-inline: var(--section-gutter);
|
|
3601
3756
|
}
|
|
3602
3757
|
|
|
3603
|
-
@media (width >= 1024px) {
|
|
3604
|
-
|
|
3605
|
-
.dndev-cta-content {
|
|
3606
|
-
padding-inline: var(--gap-lg);
|
|
3607
|
-
}
|
|
3608
|
-
}
|
|
3609
|
-
|
|
3610
3758
|
/* Text alignment */
|
|
3611
3759
|
.dndev-cta-content[data-text-align='start'] {
|
|
3612
3760
|
text-align: start;
|
|
@@ -4077,34 +4225,19 @@ em {
|
|
|
4077
4225
|
}
|
|
4078
4226
|
|
|
4079
4227
|
.dndev-collapsible-content[data-state='open'] {
|
|
4080
|
-
|
|
4228
|
+
/* Fade only (shared fade-in keyframes, animations.css): no height slide, no
|
|
4229
|
+
measured height needed; base.css shortens it under prefers-reduced-motion */
|
|
4230
|
+
animation: fade-in var(--dur-normal) var(--ease-in-out);
|
|
4081
4231
|
overflow: visible; /* Allow dropdowns/overlays to escape when open */
|
|
4082
4232
|
}
|
|
4083
4233
|
|
|
4234
|
+
/*
|
|
4235
|
+
* Closed content stays mounted (forceMount: in the server HTML for crawlers)
|
|
4236
|
+
* and is hidden here: display:none = not visible, focusable or announced.
|
|
4237
|
+
* Opening fades in; closing is instant. Same as Tabs inactive panels.
|
|
4238
|
+
*/
|
|
4084
4239
|
.dndev-collapsible-content[data-state='closed'] {
|
|
4085
|
-
|
|
4086
|
-
}
|
|
4087
|
-
|
|
4088
|
-
@keyframes slideDown {
|
|
4089
|
-
from {
|
|
4090
|
-
height: 0;
|
|
4091
|
-
opacity: 0;
|
|
4092
|
-
}
|
|
4093
|
-
to {
|
|
4094
|
-
height: var(--radix-collapsible-content-height);
|
|
4095
|
-
opacity: 1;
|
|
4096
|
-
}
|
|
4097
|
-
}
|
|
4098
|
-
|
|
4099
|
-
@keyframes slideUp {
|
|
4100
|
-
from {
|
|
4101
|
-
height: var(--radix-collapsible-content-height);
|
|
4102
|
-
opacity: 1;
|
|
4103
|
-
}
|
|
4104
|
-
to {
|
|
4105
|
-
height: 0;
|
|
4106
|
-
opacity: 0;
|
|
4107
|
-
}
|
|
4240
|
+
display: none;
|
|
4108
4241
|
}
|
|
4109
4242
|
|
|
4110
4243
|
.dndev-collapsible-trigger {
|
|
@@ -5084,6 +5217,79 @@ em {
|
|
|
5084
5217
|
cursor: pointer;
|
|
5085
5218
|
}
|
|
5086
5219
|
|
|
5220
|
+
/* packages/components/src/atomic/Floating/Floating.css */
|
|
5221
|
+
|
|
5222
|
+
/* One small control at a corner of the page content area, on the header layer; as wide as
|
|
5223
|
+
its content. --floating-control-gutter is the Section content gutter (--section-gutter:
|
|
5224
|
+
--gap-md, --gap-lg from 1024px). */
|
|
5225
|
+
.dndev-floating-control {
|
|
5226
|
+
--floating-control-gutter: var(--section-gutter);
|
|
5227
|
+
z-index: var(--z-header);
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
/* Top placements: in the page flow (first in the page), sticky. At rest: --gap-md, the
|
|
5231
|
+
control, --gap-md, then the page content (a ghost Section right after it drops its own
|
|
5232
|
+
top padding: Section.css). While scrolling: --gap-md below the top of the scroll
|
|
5233
|
+
container (the layout <main>, under the header). Inline: the Section gutter, at the start
|
|
5234
|
+
or end of the content area; fit-content so it never stretches (block or flex parent). */
|
|
5235
|
+
.dndev-floating-control[data-placement^='top'] {
|
|
5236
|
+
--floating-control-inline-offset: var(--floating-control-gutter);
|
|
5237
|
+
position: sticky;
|
|
5238
|
+
inset-block-start: var(--gap-md);
|
|
5239
|
+
inline-size: -moz-fit-content;
|
|
5240
|
+
inline-size: fit-content;
|
|
5241
|
+
margin-block: var(--gap-md);
|
|
5242
|
+
}
|
|
5243
|
+
|
|
5244
|
+
/* PageContainer already pads its content --gap-md inline: add only the rest of the gutter
|
|
5245
|
+
(0 below 1024px), so the control lines up with the Sections' content edge. */
|
|
5246
|
+
.dndev-container > .dndev-floating-control[data-placement^='top'] {
|
|
5247
|
+
--floating-control-inline-offset: calc(
|
|
5248
|
+
var(--floating-control-gutter) - var(--gap-md)
|
|
5249
|
+
);
|
|
5250
|
+
}
|
|
5251
|
+
|
|
5252
|
+
.dndev-floating-control[data-placement='top-start'] {
|
|
5253
|
+
margin-inline: var(--floating-control-inline-offset) auto;
|
|
5254
|
+
}
|
|
5255
|
+
|
|
5256
|
+
.dndev-floating-control[data-placement='top-end'] {
|
|
5257
|
+
margin-inline: auto var(--floating-control-inline-offset);
|
|
5258
|
+
}
|
|
5259
|
+
|
|
5260
|
+
/* Bottom placements: fixed (portalled to <body>), over the page, taking no space. The
|
|
5261
|
+
offsets read the layout tokens declared on <html> (@donotdev/ui layout-variables.css),
|
|
5262
|
+
with fallbacks for a page outside DnDevLayout:
|
|
5263
|
+
- block: --gap-md above the shown ActionBar (--action-bar-height, its safe-area padding
|
|
5264
|
+
included) or above the bottom safe area, whichever is taller;
|
|
5265
|
+
- inline: the Section gutter, after the sidebar on the start side (--sidebar-width),
|
|
5266
|
+
never inside the side safe areas. */
|
|
5267
|
+
.dndev-floating-control[data-placement^='bottom'] {
|
|
5268
|
+
--floating-control-fixed-gutter: max(
|
|
5269
|
+
var(--floating-control-gutter),
|
|
5270
|
+
env(safe-area-inset-left, 0px),
|
|
5271
|
+
env(safe-area-inset-right, 0px)
|
|
5272
|
+
);
|
|
5273
|
+
position: fixed;
|
|
5274
|
+
inset-block-end: calc(
|
|
5275
|
+
var(--gap-md) +
|
|
5276
|
+
max(var(--action-bar-height, 0px), env(safe-area-inset-bottom, 0px))
|
|
5277
|
+
);
|
|
5278
|
+
max-inline-size: calc(
|
|
5279
|
+
100% - var(--sidebar-width, 0px) - 2 * var(--floating-control-fixed-gutter)
|
|
5280
|
+
);
|
|
5281
|
+
}
|
|
5282
|
+
|
|
5283
|
+
.dndev-floating-control[data-placement='bottom-start'] {
|
|
5284
|
+
inset-inline-start: calc(
|
|
5285
|
+
var(--sidebar-width, 0px) + var(--floating-control-fixed-gutter)
|
|
5286
|
+
);
|
|
5287
|
+
}
|
|
5288
|
+
|
|
5289
|
+
.dndev-floating-control[data-placement='bottom-end'] {
|
|
5290
|
+
inset-inline-end: var(--floating-control-fixed-gutter);
|
|
5291
|
+
}
|
|
5292
|
+
|
|
5087
5293
|
/* packages/components/src/atomic/Grid/Grid.css */
|
|
5088
5294
|
|
|
5089
5295
|
.dndev-grid-component {
|
|
@@ -5247,19 +5453,9 @@ em {
|
|
|
5247
5453
|
/* Content constraint + centered */
|
|
5248
5454
|
max-width: var(--content-width);
|
|
5249
5455
|
margin-inline: auto;
|
|
5250
|
-
/* Padding with hero background
|
|
5251
|
-
padding-inline: var(--
|
|
5456
|
+
/* Padding with hero background; inline: the Section content gutter (lines up with the page content) */
|
|
5457
|
+
padding-inline: var(--section-gutter);
|
|
5252
5458
|
padding-block: var(--gap-lg);
|
|
5253
|
-
}
|
|
5254
|
-
|
|
5255
|
-
@media (width >= 1024px) {
|
|
5256
|
-
|
|
5257
|
-
.dndev-hero-section {
|
|
5258
|
-
padding-inline: var(--gap-lg);
|
|
5259
|
-
}
|
|
5260
|
-
}
|
|
5261
|
-
|
|
5262
|
-
.dndev-hero-section {
|
|
5263
5459
|
|
|
5264
5460
|
display: flex;
|
|
5265
5461
|
flex-direction: column;
|
|
@@ -5545,10 +5741,46 @@ em {
|
|
|
5545
5741
|
/* packages/components/src/advanced/ImageGallery/ImageGallery.css */
|
|
5546
5742
|
|
|
5547
5743
|
.image-gallery {
|
|
5744
|
+
/* Height one thumbnail row takes (the strip never wraps: the bound below is exact). */
|
|
5745
|
+
--image-gallery-thumbnail-block: 60px;
|
|
5746
|
+
/* Viewport height the gallery may fill: below the app header, minus the page spacing
|
|
5747
|
+
above and below it. Bounded like the other framework media (VideoPlayer, Crawl). */
|
|
5748
|
+
--image-gallery-viewport: calc(
|
|
5749
|
+
100vh - var(--header-height, 0px) - 2 * var(--gap-lg)
|
|
5750
|
+
);
|
|
5548
5751
|
display: flex;
|
|
5549
5752
|
flex-direction: column;
|
|
5550
5753
|
gap: var(--gap-md);
|
|
5551
5754
|
outline: none;
|
|
5755
|
+
/* Never taller than the viewport: at its ratio (--image-gallery-ratio, the
|
|
5756
|
+
aspectRatio prop) the gallery narrows and centres instead of growing taller. */
|
|
5757
|
+
inline-size: 100%;
|
|
5758
|
+
/* A grid / flex item would otherwise grow to the thumbnail row's full length */
|
|
5759
|
+
min-inline-size: 0;
|
|
5760
|
+
max-inline-size: calc(
|
|
5761
|
+
var(--image-gallery-viewport) * (var(--image-gallery-ratio))
|
|
5762
|
+
);
|
|
5763
|
+
margin-inline: auto;
|
|
5764
|
+
}
|
|
5765
|
+
|
|
5766
|
+
/* svh: the small viewport (mobile browser bars shown), so the bound never jumps on scroll */
|
|
5767
|
+
@supports (height: 100svh) {
|
|
5768
|
+
.image-gallery {
|
|
5769
|
+
--image-gallery-viewport: calc(
|
|
5770
|
+
100svh - var(--header-height, 0px) - 2 * var(--gap-lg)
|
|
5771
|
+
);
|
|
5772
|
+
}
|
|
5773
|
+
}
|
|
5774
|
+
|
|
5775
|
+
/* With thumbnails: the main image gives up one thumbnail row and the gap above it */
|
|
5776
|
+
.image-gallery--thumbnails {
|
|
5777
|
+
max-inline-size: calc(
|
|
5778
|
+
(
|
|
5779
|
+
var(--image-gallery-viewport) - var(--image-gallery-thumbnail-block) -
|
|
5780
|
+
var(--gap-md)
|
|
5781
|
+
) *
|
|
5782
|
+
(var(--image-gallery-ratio))
|
|
5783
|
+
);
|
|
5552
5784
|
}
|
|
5553
5785
|
|
|
5554
5786
|
/* Gallery pictures are always protected (with blockContextMenu + draggable=false):
|
|
@@ -5586,6 +5818,7 @@ em {
|
|
|
5586
5818
|
.image-gallery__main {
|
|
5587
5819
|
position: relative;
|
|
5588
5820
|
width: 100%;
|
|
5821
|
+
aspect-ratio: var(--image-gallery-ratio);
|
|
5589
5822
|
overflow: hidden;
|
|
5590
5823
|
border-radius: var(--radius-surface);
|
|
5591
5824
|
}
|
|
@@ -5613,7 +5846,8 @@ em {
|
|
|
5613
5846
|
|
|
5614
5847
|
/* Arrow / thumbnail / key navigation glides to a neighbour (never a touch swipe) */
|
|
5615
5848
|
@media (prefers-reduced-motion: no-preference) {
|
|
5616
|
-
.image-gallery__strip
|
|
5849
|
+
.image-gallery__strip,
|
|
5850
|
+
.image-gallery__thumbnails {
|
|
5617
5851
|
scroll-behavior: smooth;
|
|
5618
5852
|
}
|
|
5619
5853
|
}
|
|
@@ -5695,17 +5929,25 @@ em {
|
|
|
5695
5929
|
inset-inline-end: var(--gap-md);
|
|
5696
5930
|
}
|
|
5697
5931
|
|
|
5698
|
-
/* Thumbnails
|
|
5932
|
+
/* Thumbnails: one row, native horizontal scroll when it overflows (swipe, trackpad);
|
|
5933
|
+
the selected thumbnail is scrolled into view (revealInStrip). */
|
|
5699
5934
|
.image-gallery__thumbnails {
|
|
5700
5935
|
display: flex;
|
|
5701
|
-
flex-wrap: wrap;
|
|
5702
5936
|
gap: var(--gap-sm);
|
|
5937
|
+
overflow-x: auto;
|
|
5938
|
+
overflow-y: hidden;
|
|
5939
|
+
overscroll-behavior-x: contain;
|
|
5940
|
+
scrollbar-width: none;
|
|
5941
|
+
}
|
|
5942
|
+
|
|
5943
|
+
.image-gallery__thumbnails::-webkit-scrollbar {
|
|
5944
|
+
display: none;
|
|
5703
5945
|
}
|
|
5704
5946
|
|
|
5705
5947
|
.image-gallery__thumbnail {
|
|
5706
5948
|
flex: 0 0 auto;
|
|
5707
|
-
width:
|
|
5708
|
-
height:
|
|
5949
|
+
width: calc(var(--image-gallery-thumbnail-block) * 4 / 3);
|
|
5950
|
+
height: var(--image-gallery-thumbnail-block);
|
|
5709
5951
|
padding: 0;
|
|
5710
5952
|
border: 2px solid transparent;
|
|
5711
5953
|
border-radius: var(--radius-surface);
|
|
@@ -5721,9 +5963,10 @@ em {
|
|
|
5721
5963
|
border-color: var(--muted-foreground);
|
|
5722
5964
|
}
|
|
5723
5965
|
|
|
5966
|
+
/* Inset: the scrolling row clips anything drawn outside a thumbnail */
|
|
5724
5967
|
.image-gallery__thumbnail:focus-visible {
|
|
5725
5968
|
outline: 2px solid var(--primary);
|
|
5726
|
-
outline-offset: 2px;
|
|
5969
|
+
outline-offset: -2px;
|
|
5727
5970
|
}
|
|
5728
5971
|
|
|
5729
5972
|
.image-gallery__thumbnail--selected {
|
|
@@ -5766,9 +6009,8 @@ em {
|
|
|
5766
6009
|
|
|
5767
6010
|
/* Responsive adjustments */
|
|
5768
6011
|
@media (max-width: 640px) {
|
|
5769
|
-
.image-
|
|
5770
|
-
|
|
5771
|
-
height: 45px;
|
|
6012
|
+
.image-gallery {
|
|
6013
|
+
--image-gallery-thumbnail-block: 45px;
|
|
5772
6014
|
}
|
|
5773
6015
|
|
|
5774
6016
|
.image-gallery__nav {
|
|
@@ -6250,8 +6492,11 @@ input[type='number'] {
|
|
|
6250
6492
|
color: var(--muted-foreground);
|
|
6251
6493
|
}
|
|
6252
6494
|
|
|
6253
|
-
/* Help (i) after the label: the label truncates, the button never does
|
|
6495
|
+
/* Help (i) after the label: the label truncates, the button never does. Overflow stays
|
|
6496
|
+
visible so the button's hit area (negative margin) is not clipped by the legend; the
|
|
6497
|
+
label child does the truncation. */
|
|
6254
6498
|
.dndev-floating-legend[data-info] {
|
|
6499
|
+
overflow: visible;
|
|
6255
6500
|
display: flex;
|
|
6256
6501
|
align-items: center;
|
|
6257
6502
|
gap: calc(var(--gap-sm) / 2);
|
|
@@ -6269,7 +6514,13 @@ input[type='number'] {
|
|
|
6269
6514
|
flex-shrink: 0;
|
|
6270
6515
|
align-items: center;
|
|
6271
6516
|
justify-content: center;
|
|
6272
|
-
/* Larger hit area than the icon, without growing the legend
|
|
6517
|
+
/* Larger hit area than the icon, without growing the legend. The area spills past the
|
|
6518
|
+
legend onto its neighbours (the block above, the field's input): its own layer keeps
|
|
6519
|
+
it on top, so the whole area stays clickable (WCAG 2.5.8, 24×24 px minimum). */
|
|
6520
|
+
position: relative;
|
|
6521
|
+
z-index: 1;
|
|
6522
|
+
min-inline-size: 24px;
|
|
6523
|
+
min-block-size: 24px;
|
|
6273
6524
|
padding: calc(var(--gap-sm) / 2);
|
|
6274
6525
|
margin: calc(var(--gap-sm) / -2);
|
|
6275
6526
|
border: none;
|
|
@@ -6336,14 +6587,45 @@ input[type='number'] {
|
|
|
6336
6587
|
gap: var(--gap-lg);
|
|
6337
6588
|
}
|
|
6338
6589
|
|
|
6339
|
-
/*
|
|
6590
|
+
/* Numbers: items are flex (icon alignment) and a flex item gets no ::marker,
|
|
6591
|
+
so an ordered list draws its numbers with a counter (BUGS #31). */
|
|
6340
6592
|
|
|
6341
|
-
.dndev-list[data-ordered='true'] {
|
|
6593
|
+
.dndev-list[data-ordered='true']:not([data-marker='none']) {
|
|
6342
6594
|
list-style-type: decimal;
|
|
6595
|
+
counter-reset: dndev-list-item;
|
|
6343
6596
|
}
|
|
6344
6597
|
|
|
6345
|
-
.dndev-list
|
|
6598
|
+
.dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item {
|
|
6599
|
+
counter-increment: dndev-list-item;
|
|
6600
|
+
}
|
|
6601
|
+
|
|
6602
|
+
:is(.dndev-list[data-ordered='true']:not([data-marker='none']) > .dndev-list-item)::before {
|
|
6603
|
+
content: counter(dndev-list-item) '.';
|
|
6604
|
+
flex-shrink: 0;
|
|
6605
|
+
min-inline-size: 2ch;
|
|
6606
|
+
text-align: end;
|
|
6607
|
+
font-variant-numeric: tabular-nums;
|
|
6608
|
+
}
|
|
6609
|
+
|
|
6610
|
+
.dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) {
|
|
6346
6611
|
list-style-type: disc;
|
|
6612
|
+
|
|
6613
|
+
/* Bullets: same reason as the numbers, an icon-less item (data-plain) draws
|
|
6614
|
+
its own bullet; items with an icon keep the icon as their marker (BUGS #31). */
|
|
6615
|
+
}
|
|
6616
|
+
|
|
6617
|
+
.dndev-list:not([data-ordered='true']):not([data-marker='none']):not([style*='list-style: none']) > .dndev-list-item[data-plain='true']::before {
|
|
6618
|
+
content: '\2022';
|
|
6619
|
+
flex-shrink: 0;
|
|
6620
|
+
min-inline-size: 1ch;
|
|
6621
|
+
text-align: end;
|
|
6622
|
+
}
|
|
6623
|
+
|
|
6624
|
+
/* marker="none": the two rules above are excluded by their :not(), so no counter,
|
|
6625
|
+
bullet or native marker is drawn; items keep their flex alignment and gap. */
|
|
6626
|
+
|
|
6627
|
+
.dndev-list[data-marker='none'] {
|
|
6628
|
+
list-style-type: none;
|
|
6347
6629
|
}
|
|
6348
6630
|
|
|
6349
6631
|
/* Density variants */
|
|
@@ -7386,15 +7668,61 @@ input[type='number'] {
|
|
|
7386
7668
|
margin-inline: auto;
|
|
7387
7669
|
min-width: 0; /* Allow shrinking so max-width wins when content would force wider */
|
|
7388
7670
|
/* Padding with section background - responsive to match PageContainer */
|
|
7389
|
-
padding-inline: var(--
|
|
7671
|
+
padding-inline: var(--section-gutter);
|
|
7390
7672
|
padding-top: var(--gap-lg);
|
|
7391
7673
|
padding-bottom: var(--gap-lg);
|
|
7392
7674
|
}
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
|
|
7675
|
+
|
|
7676
|
+
/*
|
|
7677
|
+
* Nested Section (inside another Section's content): flush. The outer Section
|
|
7678
|
+
* already owns the page band (width, centring, side padding, block padding), so
|
|
7679
|
+
* the inner one takes its container's edge and width; spacing to siblings comes
|
|
7680
|
+
* from the parent layout (Stack / Grid gap). A nested Section with a tone
|
|
7681
|
+
* (base, muted, ...) keeps its padding: its background would otherwise sit on
|
|
7682
|
+
* the text edge. No :has() (Safari 14.1): the default tone is data-tone='ghost'.
|
|
7683
|
+
*/
|
|
7684
|
+
.dndev-section-content .dndev-section-full-width {
|
|
7685
|
+
width: 100%;
|
|
7686
|
+
margin-inline: 0;
|
|
7687
|
+
}
|
|
7688
|
+
|
|
7689
|
+
.dndev-section-content
|
|
7690
|
+
.dndev-section-full-width[data-tone='ghost']
|
|
7691
|
+
> .dndev-section-content {
|
|
7692
|
+
max-width: none;
|
|
7693
|
+
margin-inline: 0;
|
|
7694
|
+
padding-inline: 0;
|
|
7695
|
+
padding-block: 0;
|
|
7696
|
+
}
|
|
7697
|
+
|
|
7698
|
+
/*
|
|
7699
|
+
* Consecutive Sections share one gap. Each page Section pads its content
|
|
7700
|
+
* `--gap-lg` top and bottom, so two in a row were 2 x `--gap-lg` apart. A
|
|
7701
|
+
* ghost Section that directly follows a ghost Section drops its top padding:
|
|
7702
|
+
* the previous one's bottom padding is the only gap. A toned Section (a
|
|
7703
|
+
* background band) on either side of the pair keeps its padding: the band edge
|
|
7704
|
+
* must not touch text. Nested ghost Sections are already flush (above). No
|
|
7705
|
+
* :has() (Safari 14.1): the rule keys on the following Section, and the default
|
|
7706
|
+
* tone is data-tone='ghost'.
|
|
7707
|
+
*/
|
|
7708
|
+
.dndev-section-full-width[data-tone='ghost']
|
|
7709
|
+
+ .dndev-section-full-width[data-tone='ghost']
|
|
7710
|
+
> .dndev-section-content {
|
|
7711
|
+
padding-top: 0;
|
|
7712
|
+
}
|
|
7713
|
+
|
|
7714
|
+
/*
|
|
7715
|
+
* A ghost Section right after a top Floating (back link, first in the page)
|
|
7716
|
+
* drops its top padding: the Floating's own --gap-md bottom margin is the only
|
|
7717
|
+
* gap, so the control sits --gap-md from the header and --gap-md from the
|
|
7718
|
+
* Section's first line, at every width. A toned Section keeps its padding (its
|
|
7719
|
+
* band starts --gap-md below the control). No :has() (Safari 14.1).
|
|
7720
|
+
*/
|
|
7721
|
+
.dndev-floating-control[data-placement^='top']
|
|
7722
|
+
+ .dndev-section-full-width[data-tone='ghost']
|
|
7723
|
+
> .dndev-section-content {
|
|
7724
|
+
padding-top: 0;
|
|
7396
7725
|
}
|
|
7397
|
-
}
|
|
7398
7726
|
|
|
7399
7727
|
/* Content width constraints — background stays full, only inner content narrows */
|
|
7400
7728
|
.dndev-section-content[data-content-width='standard'] {
|
|
@@ -7475,16 +7803,23 @@ input[type='number'] {
|
|
|
7475
7803
|
text-align: end;
|
|
7476
7804
|
}
|
|
7477
7805
|
|
|
7478
|
-
/*
|
|
7806
|
+
/*
|
|
7807
|
+
* Collapsible title: heading > <button> trigger. The heading keeps the title
|
|
7808
|
+
* styles and spacing; the button strips UA chrome and inherits them.
|
|
7809
|
+
*/
|
|
7479
7810
|
.dndev-section-title-trigger {
|
|
7480
7811
|
width: 100%;
|
|
7481
7812
|
cursor: pointer;
|
|
7482
7813
|
transition: opacity var(--dur-fast) var(--ease-in-out);
|
|
7483
|
-
margin
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7814
|
+
margin: 0;
|
|
7815
|
+
padding: 0;
|
|
7816
|
+
border: none;
|
|
7817
|
+
background: none;
|
|
7818
|
+
font: inherit;
|
|
7819
|
+
color: inherit;
|
|
7820
|
+
letter-spacing: inherit;
|
|
7821
|
+
text-transform: inherit;
|
|
7822
|
+
text-align: inherit;
|
|
7488
7823
|
}
|
|
7489
7824
|
|
|
7490
7825
|
.dndev-section-title-trigger:hover {
|
|
@@ -7519,6 +7854,44 @@ input[type='number'] {
|
|
|
7519
7854
|
justify-content: flex-end;
|
|
7520
7855
|
}
|
|
7521
7856
|
|
|
7857
|
+
/*
|
|
7858
|
+
* Title row with actions (only rendered when `actions` is set): heading at the
|
|
7859
|
+
* start, actions at the end, centred on the heading. `space-between` puts a
|
|
7860
|
+
* lone item (actions wrapped under the heading) at the start; with no heading
|
|
7861
|
+
* the actions are the only child and go to the end. The heading keeps its
|
|
7862
|
+
* styles; the row owns the block spacing below.
|
|
7863
|
+
*/
|
|
7864
|
+
.dndev-section-header {
|
|
7865
|
+
display: flex;
|
|
7866
|
+
flex-wrap: wrap;
|
|
7867
|
+
align-items: center;
|
|
7868
|
+
justify-content: space-between;
|
|
7869
|
+
gap: var(--gap-sm) var(--gap-md);
|
|
7870
|
+
margin-block-end: var(--gap-md);
|
|
7871
|
+
}
|
|
7872
|
+
|
|
7873
|
+
.dndev-section-header > .dndev-section-title {
|
|
7874
|
+
margin-block-end: 0;
|
|
7875
|
+
min-width: 0;
|
|
7876
|
+
}
|
|
7877
|
+
|
|
7878
|
+
/* Collapsible: the trigger spans the heading, which takes the free space */
|
|
7879
|
+
.dndev-section-header[data-collapsible] > .dndev-section-title {
|
|
7880
|
+
flex: 1 1 auto;
|
|
7881
|
+
}
|
|
7882
|
+
|
|
7883
|
+
.dndev-section-actions {
|
|
7884
|
+
display: flex;
|
|
7885
|
+
flex-wrap: wrap;
|
|
7886
|
+
align-items: center;
|
|
7887
|
+
gap: var(--gap-sm);
|
|
7888
|
+
min-width: 0;
|
|
7889
|
+
}
|
|
7890
|
+
|
|
7891
|
+
.dndev-section-actions:only-child {
|
|
7892
|
+
margin-inline-start: auto;
|
|
7893
|
+
}
|
|
7894
|
+
|
|
7522
7895
|
/* packages/components/src/atomic/Separator/Separator.css */
|
|
7523
7896
|
|
|
7524
7897
|
.dndev-separator {
|
|
@@ -9245,9 +9618,11 @@ input[type='number'] {
|
|
|
9245
9618
|
display: none;
|
|
9246
9619
|
}
|
|
9247
9620
|
|
|
9248
|
-
/* Collapsed: one square + at the inline end
|
|
9621
|
+
/* Collapsed: one square + at the inline end (or, with `addLabel`, one "+ label" button
|
|
9622
|
+
over the expanded footprint). Expanded: [ − qty + ].
|
|
9249
9623
|
Rows are fixed in both states (no vertical shift); only the inline size animates,
|
|
9250
|
-
growing from the inline end toward the inline start
|
|
9624
|
+
growing from the inline end toward the inline start (labelled: nothing resizes, the
|
|
9625
|
+
content crossfades). */
|
|
9251
9626
|
.dndev-quantity-stepper {
|
|
9252
9627
|
--quantity-target: var(--touch-target);
|
|
9253
9628
|
/* The cell IS the touch target: padding and icons fit inside it. State-independent,
|
|
@@ -9308,6 +9683,11 @@ input[type='number'] {
|
|
|
9308
9683
|
cursor: not-allowed;
|
|
9309
9684
|
opacity: 0.6;
|
|
9310
9685
|
}
|
|
9686
|
+
/* Typed quantity: same input size token as every framework input (no iOS focus zoom).
|
|
9687
|
+
The cell is fixed (--quantity-cell), so the font-size change shifts nothing. */
|
|
9688
|
+
.dndev-quantity-stepper > input {
|
|
9689
|
+
font-size: var(--font-size-input);
|
|
9690
|
+
}
|
|
9311
9691
|
.dndev-quantity-stepper > button {
|
|
9312
9692
|
display: flex;
|
|
9313
9693
|
align-items: center;
|
|
@@ -9381,6 +9761,64 @@ input[type='number'] {
|
|
|
9381
9761
|
.dndev-quantity-stepper[data-vertical][data-collapsed] > .dndev-quantity-stepper-increment {
|
|
9382
9762
|
grid-area: 1 / 1 / -1 / -1;
|
|
9383
9763
|
}
|
|
9764
|
+
/* Labelled add (`addLabel`, never vertical): collapsed, one "+ label" button over the
|
|
9765
|
+
expanded footprint, so nothing changes size. Expanding crossfades the label out and
|
|
9766
|
+
− / quantity / the + icon in (opacity only); the + snaps back to its cell underneath. */
|
|
9767
|
+
.dndev-quantity-stepper[data-add-label] {
|
|
9768
|
+
position: relative;
|
|
9769
|
+
}
|
|
9770
|
+
.dndev-quantity-stepper[data-add-label] > .dndev-quantity-stepper-increment > svg {
|
|
9771
|
+
transition: opacity var(--dur-normal) var(--ease-in-out);
|
|
9772
|
+
}
|
|
9773
|
+
.dndev-quantity-stepper[data-add-label][data-collapsed] {
|
|
9774
|
+
inline-size: var(--quantity-expanded);
|
|
9775
|
+
min-inline-size: var(--quantity-expanded);
|
|
9776
|
+
}
|
|
9777
|
+
.dndev-quantity-stepper[data-add-label][data-collapsed][data-full-width] {
|
|
9778
|
+
inline-size: 100%;
|
|
9779
|
+
}
|
|
9780
|
+
.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment {
|
|
9781
|
+
grid-area: 1 / 1 / -1 / -1;
|
|
9782
|
+
}
|
|
9783
|
+
:is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > svg {
|
|
9784
|
+
opacity: 0;
|
|
9785
|
+
}
|
|
9786
|
+
:is(.dndev-quantity-stepper[data-add-label][data-collapsed] > .dndev-quantity-stepper-increment) > .dndev-quantity-stepper-add {
|
|
9787
|
+
visibility: visible;
|
|
9788
|
+
opacity: 1;
|
|
9789
|
+
}
|
|
9790
|
+
|
|
9791
|
+
/* The label of a labelled add, laid over the whole group (not the + cell) so it can fade out
|
|
9792
|
+
while the + returns to its cell. Decorative: the + keeps `incrementLabel` as its name. */
|
|
9793
|
+
.dndev-quantity-stepper-add {
|
|
9794
|
+
position: absolute;
|
|
9795
|
+
inset: 0;
|
|
9796
|
+
display: flex;
|
|
9797
|
+
align-items: center;
|
|
9798
|
+
justify-content: center;
|
|
9799
|
+
gap: var(--gap-sm);
|
|
9800
|
+
padding-inline: var(--gap-sm);
|
|
9801
|
+
font-weight: var(--font-weight-medium);
|
|
9802
|
+
white-space: nowrap;
|
|
9803
|
+
pointer-events: none;
|
|
9804
|
+
visibility: hidden;
|
|
9805
|
+
opacity: 0;
|
|
9806
|
+
/* Out faster than − / quantity come in, so the two never read as one jumble. */
|
|
9807
|
+
transition:
|
|
9808
|
+
opacity var(--dur-fast) var(--ease-in-out),
|
|
9809
|
+
visibility var(--dur-fast) var(--ease-in-out);
|
|
9810
|
+
}
|
|
9811
|
+
.dndev-quantity-stepper-add > svg {
|
|
9812
|
+
flex-shrink: 0;
|
|
9813
|
+
inline-size: var(--icon-md);
|
|
9814
|
+
block-size: var(--icon-md);
|
|
9815
|
+
}
|
|
9816
|
+
|
|
9817
|
+
.dndev-quantity-stepper-add-text {
|
|
9818
|
+
min-inline-size: 0;
|
|
9819
|
+
overflow: hidden;
|
|
9820
|
+
text-overflow: ellipsis;
|
|
9821
|
+
}
|
|
9384
9822
|
|
|
9385
9823
|
.dndev-quantity-stepper-value {
|
|
9386
9824
|
box-sizing: border-box;
|
|
@@ -9403,7 +9841,9 @@ input[type='number'] {
|
|
|
9403
9841
|
.dndev-quantity-stepper,
|
|
9404
9842
|
.dndev-quantity-stepper > button,
|
|
9405
9843
|
.dndev-quantity-stepper > .dndev-quantity-stepper-decrement,
|
|
9406
|
-
.dndev-quantity-stepper > .dndev-quantity-stepper-value
|
|
9844
|
+
.dndev-quantity-stepper > .dndev-quantity-stepper-value,
|
|
9845
|
+
.dndev-quantity-stepper > .dndev-quantity-stepper-increment > svg,
|
|
9846
|
+
.dndev-quantity-stepper-add {
|
|
9407
9847
|
transition: none;
|
|
9408
9848
|
}
|
|
9409
9849
|
}
|
|
@@ -9550,6 +9990,21 @@ input[type='number'] {
|
|
|
9550
9990
|
font-style: italic;
|
|
9551
9991
|
}
|
|
9552
9992
|
|
|
9993
|
+
.dndev-text-base:is(s) {
|
|
9994
|
+
text-decoration-line: line-through;
|
|
9995
|
+
}
|
|
9996
|
+
|
|
9997
|
+
/* A link in running text must be told apart by more than colour (WCAG 1.4.1).
|
|
9998
|
+
base.css strips the underline from every anchor; framework controls
|
|
9999
|
+
(.dndev-interactive) keep their own look. Same values as Button variant="link".
|
|
10000
|
+
Text levels only (body / small / caption; no data-level = body): a link in a
|
|
10001
|
+
heading (h1-h6, e.g. a card title) is a title, not running text. */
|
|
10002
|
+
|
|
10003
|
+
.dndev-text-base:not([data-level^='h']) a:not(.dndev-interactive) {
|
|
10004
|
+
text-decoration: underline;
|
|
10005
|
+
text-underline-offset: 2px;
|
|
10006
|
+
}
|
|
10007
|
+
|
|
9553
10008
|
.dndev-text-base[data-variant='default'] {
|
|
9554
10009
|
color: inherit;
|
|
9555
10010
|
}
|
|
@@ -9646,6 +10101,15 @@ input[type='number'] {
|
|
|
9646
10101
|
font-size: var(--font-size-sm);
|
|
9647
10102
|
}
|
|
9648
10103
|
|
|
10104
|
+
/* A heading element set at a text level (`<Text as="h2" level="body">`) is text in
|
|
10105
|
+
every respect, not only size: drop base.css's headline font and heading case/tracking. */
|
|
10106
|
+
|
|
10107
|
+
.dndev-text-base:is(h1,h2,h3,h4,h5,h6):is([data-level='body'],[data-level='small'],[data-level='caption']) {
|
|
10108
|
+
font-family: var(--font-family, var(--font-sans));
|
|
10109
|
+
text-transform: none;
|
|
10110
|
+
letter-spacing: normal;
|
|
10111
|
+
}
|
|
10112
|
+
|
|
9649
10113
|
/* Font weight overrides (after level rules, so weight prop overrides level defaults) */
|
|
9650
10114
|
|
|
9651
10115
|
.dndev-text-base[data-font-weight='normal'] {
|
|
@@ -9668,6 +10132,20 @@ input[type='number'] {
|
|
|
9668
10132
|
font-style: italic;
|
|
9669
10133
|
}
|
|
9670
10134
|
|
|
10135
|
+
.dndev-text-base[data-underline] {
|
|
10136
|
+
text-decoration-line: underline;
|
|
10137
|
+
}
|
|
10138
|
+
|
|
10139
|
+
/* lines: clamp to N lines (--text-lines, set by the component) */
|
|
10140
|
+
|
|
10141
|
+
.dndev-text-base[data-lines] {
|
|
10142
|
+
display: -webkit-box;
|
|
10143
|
+
-webkit-box-orient: vertical;
|
|
10144
|
+
-webkit-line-clamp: var(--text-lines);
|
|
10145
|
+
line-clamp: var(--text-lines);
|
|
10146
|
+
overflow: hidden;
|
|
10147
|
+
}
|
|
10148
|
+
|
|
9671
10149
|
/* packages/components/src/atomic/Toaster/Toaster.css */
|
|
9672
10150
|
|
|
9673
10151
|
.dndev-toast-viewport {
|