@ds-gn/ui 0.11.2 → 0.11.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.
|
@@ -1160,7 +1160,7 @@ class Modal extends Base {
|
|
|
1160
1160
|
<div class=${bodyClasses()}>
|
|
1161
1161
|
<slot></slot>
|
|
1162
1162
|
</div>
|
|
1163
|
-
<footer class=${footerClasses(this._hasFooter)}>
|
|
1163
|
+
<footer role="presentation" class=${footerClasses(this._hasFooter)}>
|
|
1164
1164
|
<slot name="footer" @slotchange=${this._handleSlotChange}></slot>
|
|
1165
1165
|
</footer>
|
|
1166
1166
|
</div>
|
|
@@ -227,6 +227,8 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
227
227
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
|
228
228
|
monospace;
|
|
229
229
|
--spacing: 0.25rem;
|
|
230
|
+
--text-xs: 0.75rem;
|
|
231
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
230
232
|
--text-sm: 0.875rem;
|
|
231
233
|
--text-sm--line-height: calc(1.25 / 0.875);
|
|
232
234
|
--font-weight-semibold: 600;
|
|
@@ -235,8 +237,11 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
235
237
|
--default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
236
238
|
--duration-quick: var(--dsgn-src-duration-quick, 180ms);
|
|
237
239
|
--ease-standard: var(--dsgn-src-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
240
|
+
--color-button-inline-text: inherit;
|
|
241
|
+
--color-button-inline-text-hover: inherit;
|
|
238
242
|
--color-error: inherit;
|
|
239
243
|
--color-error-strong: inherit;
|
|
244
|
+
--color-focus: inherit;
|
|
240
245
|
--color-info: inherit;
|
|
241
246
|
--color-outline-strong: inherit;
|
|
242
247
|
--color-popover-bg: inherit;
|
|
@@ -346,6 +351,9 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
346
351
|
.inline {
|
|
347
352
|
display: inline;
|
|
348
353
|
}
|
|
354
|
+
.inline-flex {
|
|
355
|
+
display: inline-flex;
|
|
356
|
+
}
|
|
349
357
|
.size-5 {
|
|
350
358
|
width: calc(var(--spacing) * 5);
|
|
351
359
|
height: calc(var(--spacing) * 5);
|
|
@@ -472,9 +480,15 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
472
480
|
.p-0 {
|
|
473
481
|
padding: calc(var(--spacing) * 0);
|
|
474
482
|
}
|
|
483
|
+
.px-1 {
|
|
484
|
+
padding-inline: calc(var(--spacing) * 1);
|
|
485
|
+
}
|
|
475
486
|
.px-2\\.5 {
|
|
476
487
|
padding-inline: calc(var(--spacing) * 2.5);
|
|
477
488
|
}
|
|
489
|
+
.py-0\\.5 {
|
|
490
|
+
padding-block: calc(var(--spacing) * 0.5);
|
|
491
|
+
}
|
|
478
492
|
.py-2\\.5 {
|
|
479
493
|
padding-block: calc(var(--spacing) * 2.5);
|
|
480
494
|
}
|
|
@@ -500,6 +514,10 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
500
514
|
font-size: var(--text-sm);
|
|
501
515
|
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
502
516
|
}
|
|
517
|
+
.text-xs {
|
|
518
|
+
font-size: var(--text-xs);
|
|
519
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
520
|
+
}
|
|
503
521
|
.text-\\[11px\\] {
|
|
504
522
|
font-size: 11px;
|
|
505
523
|
}
|
|
@@ -519,6 +537,12 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
519
537
|
--tw-tracking: 0.02em;
|
|
520
538
|
letter-spacing: 0.02em;
|
|
521
539
|
}
|
|
540
|
+
.whitespace-pre-line {
|
|
541
|
+
white-space: pre-line;
|
|
542
|
+
}
|
|
543
|
+
.text-button-inline-text {
|
|
544
|
+
color: var(--color-button-inline-text);
|
|
545
|
+
}
|
|
522
546
|
.text-error-strong {
|
|
523
547
|
color: var(--color-error-strong);
|
|
524
548
|
}
|
|
@@ -537,6 +561,18 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
537
561
|
.text-warning-strong {
|
|
538
562
|
color: var(--color-warning-strong);
|
|
539
563
|
}
|
|
564
|
+
.underline {
|
|
565
|
+
text-decoration-line: underline;
|
|
566
|
+
}
|
|
567
|
+
.decoration-transparent {
|
|
568
|
+
text-decoration-color: transparent;
|
|
569
|
+
}
|
|
570
|
+
.decoration-2 {
|
|
571
|
+
text-decoration-thickness: 2px;
|
|
572
|
+
}
|
|
573
|
+
.underline-offset-4 {
|
|
574
|
+
text-underline-offset: 4px;
|
|
575
|
+
}
|
|
540
576
|
.shadow-popover {
|
|
541
577
|
--tw-shadow: inherit;
|
|
542
578
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -571,6 +607,42 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
571
607
|
opacity: 0%;
|
|
572
608
|
}
|
|
573
609
|
}
|
|
610
|
+
.hover\\:text-button-inline-text-hover {
|
|
611
|
+
&:hover {
|
|
612
|
+
@media (hover: hover) {
|
|
613
|
+
color: var(--color-button-inline-text-hover);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
.hover\\:decoration-current {
|
|
618
|
+
&:hover {
|
|
619
|
+
@media (hover: hover) {
|
|
620
|
+
text-decoration-color: currentcolor;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
.focus-visible\\:outline {
|
|
625
|
+
&:focus-visible {
|
|
626
|
+
outline-style: var(--tw-outline-style);
|
|
627
|
+
outline-width: 1px;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
.focus-visible\\:outline-2 {
|
|
631
|
+
&:focus-visible {
|
|
632
|
+
outline-style: var(--tw-outline-style);
|
|
633
|
+
outline-width: 2px;
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
.focus-visible\\:outline-offset-2 {
|
|
637
|
+
&:focus-visible {
|
|
638
|
+
outline-offset: 2px;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
.focus-visible\\:outline-focus {
|
|
642
|
+
&:focus-visible {
|
|
643
|
+
outline-color: var(--color-focus);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
574
646
|
.data-\\[behind\\]\\:overflow-hidden {
|
|
575
647
|
&[data-behind] {
|
|
576
648
|
overflow: hidden;
|
|
@@ -751,6 +823,11 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
751
823
|
syntax: "*";
|
|
752
824
|
inherits: false;
|
|
753
825
|
}
|
|
826
|
+
@property --tw-outline-style {
|
|
827
|
+
syntax: "*";
|
|
828
|
+
inherits: false;
|
|
829
|
+
initial-value: solid;
|
|
830
|
+
}
|
|
754
831
|
@property --tw-content {
|
|
755
832
|
syntax: "*";
|
|
756
833
|
initial-value: "";
|
|
@@ -784,6 +861,7 @@ var styles2 = css2`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.co
|
|
|
784
861
|
--tw-ring-offset-shadow: 0 0 #0000;
|
|
785
862
|
--tw-duration: initial;
|
|
786
863
|
--tw-ease: initial;
|
|
864
|
+
--tw-outline-style: solid;
|
|
787
865
|
--tw-content: "";
|
|
788
866
|
--dsgn-border-sweep-angle: 0deg;
|
|
789
867
|
}
|
|
@@ -859,8 +937,9 @@ var iconColorClasses = {
|
|
|
859
937
|
var iconClasses = (variant, compact) => clsx_default("size-5", "shrink-0", "fill-none", "stroke-current", "stroke-[1.75]", !compact && "mt-px", iconColorClasses[variant], behindHidden);
|
|
860
938
|
var bodyClasses = () => clsx_default("flex-1", "min-w-0", "flex", "flex-col", "gap-0.5", behindHidden);
|
|
861
939
|
var titleClasses = () => clsx_default("text-sm", "leading-5", "font-semibold", "text-text-primary");
|
|
862
|
-
var descriptionClasses = () => clsx_default("text-sm", "leading-5", "text-text-secondary");
|
|
940
|
+
var descriptionClasses = () => clsx_default("text-sm", "leading-5", "text-text-secondary", "whitespace-pre-line");
|
|
863
941
|
var linksClasses = () => clsx_default("flex", "flex-wrap", "gap-x-4", "gap-y-1", "mt-1");
|
|
942
|
+
var linkClasses = () => clsx_default(touchTargetClasses(), "inline-flex", "items-center", "px-1", "py-0.5", "text-xs", "font-semibold", "text-button-inline-text", "hover:text-button-inline-text-hover", "underline", "decoration-2", "underline-offset-4", "decoration-transparent", "hover:decoration-current", "focus-visible:outline", "focus-visible:outline-2", "focus-visible:outline-offset-2", "focus-visible:outline-focus");
|
|
864
943
|
var actionsClasses = (inline) => clsx_default("flex", "flex-wrap", "gap-2", inline ? ["shrink-0", behindHidden] : "mt-2.5");
|
|
865
944
|
var touchTargetClasses = () => clsx_default("relative", "pointer-coarse:after:content-['']", "pointer-coarse:after:absolute", "pointer-coarse:after:-inset-1.5");
|
|
866
945
|
var dismissClasses = (compact) => clsx_default(touchTargetClasses(), "shrink-0", !compact && "-mt-1.5", behindHidden);
|
|
@@ -1305,7 +1384,7 @@ class Toaster extends Base {
|
|
|
1305
1384
|
if (queued > 0) {
|
|
1306
1385
|
parts.push(this.queuedLabel ? this.queuedLabel.replaceAll(QUEUED_COUNT_TOKEN, String(queued)) : `+${queued}`);
|
|
1307
1386
|
}
|
|
1308
|
-
if (this._paused && this.pausedLabel && this._stack().
|
|
1387
|
+
if (this._paused && this.pausedLabel && this._stack().some((record) => record.phase === "shown" && record.duration > 0)) {
|
|
1309
1388
|
parts.push(this.pausedLabel);
|
|
1310
1389
|
}
|
|
1311
1390
|
return parts.join(" · ");
|
|
@@ -1440,12 +1519,20 @@ class Toaster extends Base {
|
|
|
1440
1519
|
</div>`;
|
|
1441
1520
|
}
|
|
1442
1521
|
_linkTemplate(link) {
|
|
1522
|
+
if (link.href)
|
|
1523
|
+
return html2`<a
|
|
1524
|
+
class=${linkClasses()}
|
|
1525
|
+
href=${link.href}
|
|
1526
|
+
target=${link.target ?? nothing}
|
|
1527
|
+
rel=${link.target === "_blank" ? "noopener" : nothing}
|
|
1528
|
+
@click=${() => link.onClick?.()}
|
|
1529
|
+
>${link.label}</a
|
|
1530
|
+
>`;
|
|
1443
1531
|
return html2`<dsgn-button
|
|
1444
1532
|
class=${touchTargetClasses()}
|
|
1445
1533
|
.surface=${this.surface}
|
|
1446
1534
|
.size=${buttonSizeValues.SM}
|
|
1447
1535
|
.appearance=${buttonAppearanceValues.INLINE}
|
|
1448
|
-
.href=${link.href ?? ""}
|
|
1449
1536
|
@click=${() => link.onClick?.()}
|
|
1450
1537
|
>${link.label}</dsgn-button
|
|
1451
1538
|
>`;
|
|
@@ -37,8 +37,11 @@ export declare const toastClasses: (compact: boolean) => string;
|
|
|
37
37
|
export declare const iconClasses: (variant: ToastVariantType, compact: boolean) => string;
|
|
38
38
|
export declare const bodyClasses: () => string;
|
|
39
39
|
export declare const titleClasses: () => string;
|
|
40
|
+
/** `pre-line` keeps paragraph breaks authored as newlines. */
|
|
40
41
|
export declare const descriptionClasses: () => string;
|
|
41
42
|
export declare const linksClasses: () => string;
|
|
43
|
+
/** Native links keep touch-target hits on the anchor and preserve navigation. */
|
|
44
|
+
export declare const linkClasses: () => string;
|
|
42
45
|
/** The action row: 10px under the text, or inline in a title-only toast. */
|
|
43
46
|
export declare const actionsClasses: (inline: boolean) => string;
|
|
44
47
|
/**
|
|
@@ -46,6 +46,8 @@ export interface ToastAction {
|
|
|
46
46
|
export interface ToastLink {
|
|
47
47
|
label: string;
|
|
48
48
|
href?: string;
|
|
49
|
+
/** With `href`, `_blank` opens a new tab (with `rel="noopener"`). */
|
|
50
|
+
target?: '_blank' | '_self';
|
|
49
51
|
onClick?: () => void;
|
|
50
52
|
}
|
|
51
53
|
export interface ToastOptions {
|