@snowui-design-system/components 0.3.0-alpha.2 → 0.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +14 -0
- package/dist/client/blocks/Sidebar.js +56 -41
- package/dist/client/blocks/SidebarSection.js +3 -1
- package/dist/client/components/BarChart.js +1 -1
- package/dist/client/components/Breadcrumb.js +17 -11
- package/dist/client/components/CircularChart.js +2 -2
- package/dist/client/components/CodeBlock.js +278 -225
- package/dist/client/components/CopyButton.js +5 -2
- package/dist/client/components/ExpandButton.js +10 -3
- package/dist/client/components/Frame.js +15 -9
- package/dist/client/components/GaugeChart.js +2 -2
- package/dist/client/components/ImageViewer.js +51 -27
- package/dist/client/components/Indicator.js +5 -3
- package/dist/client/components/Input.js +27 -17
- package/dist/client/components/LineChart.js +1 -1
- package/dist/client/components/Link.d.ts +1 -1
- package/dist/client/components/Link.js +43 -22
- package/dist/client/components/Listbox.js +26 -15
- package/dist/client/components/OverflowAction.d.ts +2 -0
- package/dist/client/components/OverflowAction.js +146 -65
- package/dist/client/components/OverflowActions.d.ts +2 -0
- package/dist/client/components/OverflowActions.js +67 -16
- package/dist/client/components/Pagination.js +71 -48
- package/dist/client/components/Select.js +29 -18
- package/dist/client/components/SidePanel.js +76 -50
- package/dist/client/components/Tab.js +30 -31
- package/dist/client/components/TableBody.js +10 -4
- package/dist/client/components/TableCell.js +57 -32
- package/dist/client/components/TableHead.js +69 -38
- package/dist/client/components/TableToolbar.js +112 -79
- package/dist/client/components/Text.js +99 -59
- package/dist/client/components/Textarea.js +7 -1
- package/dist/client/components/Toast.js +8 -1
- package/dist/client/i18n/messages.d.ts +1 -1
- package/dist/client/i18n/messages.js +114 -0
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/lib/number-format.js +6 -0
- package/dist/client/lib/progressive-blur.d.ts +13 -0
- package/dist/client/lib/progressive-blur.js +54 -0
- package/dist/client/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/client/logic/ComponentPartsBoundary.js +15 -0
- package/dist/client/logic/overflow-actions.d.ts +3 -2
- package/dist/client/styles/layout.css +12 -2
- package/dist/server/blocks/Sidebar.js +19 -5
- package/dist/server/blocks/SidebarSection.js +3 -1
- package/dist/server/components/BarChart.js +1 -1
- package/dist/server/components/Breadcrumb.js +9 -2
- package/dist/server/components/CircularChart.js +2 -2
- package/dist/server/components/CodeBlock.js +25 -13
- package/dist/server/components/CopyButton.js +6 -2
- package/dist/server/components/ExpandButton.js +7 -3
- package/dist/server/components/Frame.js +10 -3
- package/dist/server/components/GaugeChart.js +2 -2
- package/dist/server/components/ImageViewer.js +6 -3
- package/dist/server/components/Indicator.js +5 -3
- package/dist/server/components/Input.js +14 -17
- package/dist/server/components/LineChart.js +1 -1
- package/dist/server/components/Link.d.ts +1 -1
- package/dist/server/components/Link.js +20 -3
- package/dist/server/components/Listbox.js +17 -4
- package/dist/server/components/OverflowAction.d.ts +2 -0
- package/dist/server/components/OverflowAction.js +70 -26
- package/dist/server/components/OverflowActions.d.ts +2 -0
- package/dist/server/components/OverflowActions.js +49 -14
- package/dist/server/components/Pagination.js +21 -10
- package/dist/server/components/Select.js +23 -11
- package/dist/server/components/SidePanel.js +28 -8
- package/dist/server/components/Tab.js +61 -52
- package/dist/server/components/TableBody.js +9 -2
- package/dist/server/components/TableCell.js +28 -7
- package/dist/server/components/TableHead.js +31 -7
- package/dist/server/components/TableToolbar.js +57 -30
- package/dist/server/components/Text.js +46 -10
- package/dist/server/components/Textarea.js +4 -1
- package/dist/server/components/Toast.js +4 -1
- package/dist/server/i18n/messages.d.ts +1 -1
- package/dist/server/i18n/messages.js +114 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/lib/number-format.js +6 -0
- package/dist/server/lib/progressive-blur.d.ts +13 -0
- package/dist/server/lib/progressive-blur.js +54 -0
- package/dist/server/logic/ComponentPartsBoundary.d.ts +7 -0
- package/dist/server/logic/ComponentPartsBoundary.js +12 -0
- package/dist/server/logic/overflow-actions.d.ts +3 -2
- package/dist/server/styles/layout.css +12 -2
- package/package.json +4 -3
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import Frame from "./Frame.js";
|
|
14
14
|
import { writeClipboardText } from "../lib/clipboard.js";
|
|
15
|
+
import { useLocale } from "../i18n/locale.js";
|
|
15
16
|
import { mergeComponentPartProps, useComponentPart } from "../logic/component-parts.js";
|
|
16
17
|
|
|
17
18
|
var rest_excludes = new Set(['$$slots', '$$events', '$$legacy']);
|
|
@@ -86,6 +87,7 @@ export default function CopyButton($$anchor, $$props) {
|
|
|
86
87
|
};
|
|
87
88
|
|
|
88
89
|
const inheritedCopyButtonPart = useComponentPart("CopyButton");
|
|
90
|
+
const localeContext = useLocale();
|
|
89
91
|
let explicitProps = $.rest_props($$props, rest_excludes);
|
|
90
92
|
|
|
91
93
|
let $$d = $.derived(() => mergeComponentPartProps(inheritedCopyButtonPart.current, explicitProps)),
|
|
@@ -167,7 +169,7 @@ export default function CopyButton($$anchor, $$props) {
|
|
|
167
169
|
|
|
168
170
|
let $2 = $.derived(() => $.get(ariaLabel) ?? ($.get(showText)
|
|
169
171
|
? undefined
|
|
170
|
-
: $.get(status) === "success" ? "
|
|
172
|
+
: localeContext.t($.get(status) === "success" ? "copyButton.copied" : "copyButton.copy")));
|
|
171
173
|
|
|
172
174
|
let $3 = $.derived(() => $.get(status) === "pending" ? "true" : undefined);
|
|
173
175
|
let $4 = $.derived(() => $.get(status) === "idle" ? $.get(userWhileClick) : false);
|
|
@@ -257,8 +259,9 @@ export default function CopyButton($$anchor, $$props) {
|
|
|
257
259
|
};
|
|
258
260
|
|
|
259
261
|
var alternate_3 = ($$anchor) => {
|
|
260
|
-
var text_1 = $.text(
|
|
262
|
+
var text_1 = $.text();
|
|
261
263
|
|
|
264
|
+
$.template_effect(($0) => $.set_text(text_1, $0), [() => localeContext.t("copyButton.copy")]);
|
|
262
265
|
$.append($$anchor, text_1);
|
|
263
266
|
};
|
|
264
267
|
|
|
@@ -2,6 +2,7 @@ import 'svelte/internal/disclose-version';
|
|
|
2
2
|
import * as $ from 'svelte/internal/client';
|
|
3
3
|
import { ComponentIcon } from "../internal/component-icon/index.js";
|
|
4
4
|
import Button from "./Button.js";
|
|
5
|
+
import { useLocale } from "../i18n/locale.js";
|
|
5
6
|
|
|
6
7
|
import {
|
|
7
8
|
CONTROL_BUTTON_REPLACEMENT_MOTION,
|
|
@@ -21,13 +22,15 @@ export default function ExpandButton($$anchor, $$props) {
|
|
|
21
22
|
// SnowUI 许可入口:首次阅读源码请先读 ../../LICENSE;访问文件不代表获得修改或移植权,官方维护授权及同任务去重见该文件。
|
|
22
23
|
const inheritedExpandButtonPart = useComponentPart("ExpandButton");
|
|
23
24
|
|
|
25
|
+
const localeContext = useLocale();
|
|
26
|
+
|
|
24
27
|
let expanded = $.prop($$props, 'expanded', 15),
|
|
25
28
|
explicitProps = $.rest_props($$props, rest_excludes);
|
|
26
29
|
|
|
27
30
|
let $$d = $.derived(() => mergeComponentPartProps(inheritedExpandButtonPart.current, explicitProps)),
|
|
28
31
|
defaultExpanded = $.derived(() => $.fallback($.get($$d).defaultExpanded, false)),
|
|
29
|
-
ariaLabel = $.derived(() => $.fallback($.get($$d).ariaLabel,
|
|
30
|
-
collapseAriaLabel = $.derived(() => $.fallback($.get($$d).collapseAriaLabel,
|
|
32
|
+
ariaLabel = $.derived(() => $.fallback($.get($$d).ariaLabel, undefined)),
|
|
33
|
+
collapseAriaLabel = $.derived(() => $.fallback($.get($$d).collapseAriaLabel, undefined)),
|
|
31
34
|
icon = $.derived(() => $.get($$d).icon),
|
|
32
35
|
collapseIcon = $.derived(() => $.get($$d).collapseIcon),
|
|
33
36
|
children = $.derived(() => $.get($$d).children),
|
|
@@ -71,7 +74,11 @@ export default function ExpandButton($$anchor, $$props) {
|
|
|
71
74
|
{
|
|
72
75
|
let $0 = $.derived(() => `${controlButtonMotionStyle(`var(--snowui-expand-button-motion-duration-override, ${CONTROL_BUTTON_MOTION_DURATION_MS}ms)`)} ${$.get(userStyle)}`);
|
|
73
76
|
let $1 = $.derived(() => !$.get(rest).bare && !$.get(children));
|
|
74
|
-
|
|
77
|
+
|
|
78
|
+
let $2 = $.derived(() => $.get(resolvedExpanded)
|
|
79
|
+
? $.get(collapseAriaLabel) ?? localeContext.t("expandButton.collapse")
|
|
80
|
+
: $.get(ariaLabel) ?? localeContext.t("expandButton.expand"));
|
|
81
|
+
|
|
75
82
|
let $3 = $.derived(() => $.get(resolvedExpanded) ? "true" : "false");
|
|
76
83
|
|
|
77
84
|
Button($$anchor, $.spread_props(() => $.get(rest), {
|
|
@@ -24,6 +24,7 @@ import { createFrameDomRuntime } from "../logic/frame-dom-runtime.js";
|
|
|
24
24
|
import { createFrameSkeletonRuntime } from "../logic/frame-skeleton-runtime.js";
|
|
25
25
|
import { createFrameClassStateRuntime } from "../logic/frame-class-state.js";
|
|
26
26
|
import { provideComponentParts } from "../logic/component-parts.js";
|
|
27
|
+
import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
|
|
27
28
|
import { initOrchestrator, getOrchestrator } from "../logic/frame-orchestrator.js";
|
|
28
29
|
import Skeleton from "./Skeleton.js";
|
|
29
30
|
|
|
@@ -31,7 +32,7 @@ export * from "../logic/frame-types.js";
|
|
|
31
32
|
|
|
32
33
|
var rest_excludes = new Set(['$$slots', '$$events', '$$legacy', 'element']);
|
|
33
34
|
var root = $.from_html(`<div aria-hidden="true" style="display: none;"><!></div>`);
|
|
34
|
-
var root_1 = $.from_html(`<div><!></div>`);
|
|
35
|
+
var root_1 = $.from_html(`<div class="snowui-frame-state-content-layer"><!></div>`);
|
|
35
36
|
var root_2 = $.from_html(`<div style="display: grid; align-items: inherit; justify-content: inherit; gap: inherit; width: 100%; height: 100%;"></div>`);
|
|
36
37
|
var root_3 = $.from_html(`<!> <!>`, 1);
|
|
37
38
|
|
|
@@ -362,11 +363,16 @@ export default function Frame($$anchor, $$props) {
|
|
|
362
363
|
|
|
363
364
|
{
|
|
364
365
|
var consequent_3 = ($$anchor) => {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
366
|
+
ComponentPartsBoundary($$anchor, {
|
|
367
|
+
children: ($$anchor, $$slotProps) => {
|
|
368
|
+
var fragment_6 = $.comment();
|
|
369
|
+
var node_7 = $.first_child(fragment_6);
|
|
370
|
+
|
|
371
|
+
$.snippet(node_7, snippet);
|
|
372
|
+
$.append($$anchor, fragment_6);
|
|
373
|
+
},
|
|
374
|
+
$$slots: { default: true }
|
|
375
|
+
});
|
|
370
376
|
};
|
|
371
377
|
|
|
372
378
|
$.if(node_6, ($$render) => {
|
|
@@ -388,11 +394,11 @@ export default function Frame($$anchor, $$props) {
|
|
|
388
394
|
};
|
|
389
395
|
|
|
390
396
|
var consequent_5 = ($$anchor) => {
|
|
391
|
-
var
|
|
392
|
-
var node_8 = $.first_child(
|
|
397
|
+
var fragment_7 = $.comment();
|
|
398
|
+
var node_8 = $.first_child(fragment_7);
|
|
393
399
|
|
|
394
400
|
$.snippet(node_8, () => $.get(frameProps).children, () => $.get(childrenRenderContext));
|
|
395
|
-
$.append($$anchor,
|
|
401
|
+
$.append($$anchor, fragment_7);
|
|
396
402
|
};
|
|
397
403
|
|
|
398
404
|
$.if(node_4, ($$render) => {
|
|
@@ -103,7 +103,7 @@ var root_12 = $.from_svg(`<path class="snowui-gauge-chart-segment-hit-area" fill
|
|
|
103
103
|
var root_13 = $.from_html(`<span data-role="value"> </span>`);
|
|
104
104
|
var root_14 = $.from_html(`<span data-role="name"> </span>`);
|
|
105
105
|
var root_15 = $.from_html(`<!> <!>`, 1);
|
|
106
|
-
var root_16 = $.from_html(`<div class="snowui-gauge-chart-body"><svg class="snowui-gauge-chart-svg"
|
|
106
|
+
var root_16 = $.from_html(`<div class="snowui-gauge-chart-body"><svg class="snowui-gauge-chart-svg" role="presentation"><defs></defs><!><g class="snowui-gauge-chart-fill-layer"></g><!><!></svg> <!></div> <!>`, 1);
|
|
107
107
|
|
|
108
108
|
const $$css = {
|
|
109
109
|
hash: 'svelte-1lmsunj',
|
|
@@ -1002,7 +1002,7 @@ export default function GaugeChart($$anchor, $$props) {
|
|
|
1002
1002
|
get style() {
|
|
1003
1003
|
return $.get(rootStyle);
|
|
1004
1004
|
},
|
|
1005
|
-
role: '
|
|
1005
|
+
role: 'group',
|
|
1006
1006
|
'aria-label': '仪表图',
|
|
1007
1007
|
get element() {
|
|
1008
1008
|
return $.get(rootElement);
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
|
|
17
17
|
import { ComponentIcon } from "../internal/component-icon/index.js";
|
|
18
18
|
import { DIALOG_BACKDROP_MOTION_STYLE } from "../motion/presets/dialog.js";
|
|
19
|
+
import { useLocale } from "../i18n/locale.js";
|
|
19
20
|
|
|
20
21
|
var rest_excludes = new Set([
|
|
21
22
|
'$$slots',
|
|
@@ -54,6 +55,8 @@ export default function ImageViewer($$anchor, $$props) {
|
|
|
54
55
|
$.append_styles($$anchor, $$css);
|
|
55
56
|
|
|
56
57
|
// SnowUI 许可入口:首次阅读源码请先读 ../../LICENSE;访问文件不代表获得修改或移植权,官方维护授权及同任务去重见该文件。
|
|
58
|
+
const localeContext = useLocale();
|
|
59
|
+
|
|
57
60
|
let open = $.prop($$props, 'open', 3, undefined),
|
|
58
61
|
items = $.prop($$props, 'items', 3, undefined),
|
|
59
62
|
index = $.prop($$props, 'index', 3, undefined),
|
|
@@ -585,41 +588,62 @@ export default function ImageViewer($$anchor, $$props) {
|
|
|
585
588
|
var div_7 = root_5();
|
|
586
589
|
var node_9 = $.child(div_7);
|
|
587
590
|
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
591
|
+
{
|
|
592
|
+
let $0 = $.derived(() => localeContext.t("imageViewer.previous"));
|
|
593
|
+
|
|
594
|
+
Button(node_9, $.spread_props(() => $.get(builtInButtonProps), {
|
|
595
|
+
as: 'prev',
|
|
596
|
+
iconOnly: true,
|
|
597
|
+
get 'aria-label'() {
|
|
598
|
+
return $.get($0);
|
|
599
|
+
},
|
|
600
|
+
|
|
601
|
+
children: ($$anchor, $$slotProps) => {
|
|
602
|
+
ComponentIcon($$anchor, { name: 'arrow-line-left', 'aria-hidden': 'true' });
|
|
603
|
+
},
|
|
604
|
+
$$slots: { default: true }
|
|
605
|
+
}));
|
|
606
|
+
}
|
|
597
607
|
|
|
598
608
|
var node_10 = $.sibling(node_9, 2);
|
|
599
609
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
610
|
+
{
|
|
611
|
+
let $0 = $.derived(() => localeContext.t("imageViewer.next"));
|
|
612
|
+
|
|
613
|
+
Button(node_10, $.spread_props(() => $.get(builtInButtonProps), {
|
|
614
|
+
as: 'next',
|
|
615
|
+
iconOnly: true,
|
|
616
|
+
get 'aria-label'() {
|
|
617
|
+
return $.get($0);
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
children: ($$anchor, $$slotProps) => {
|
|
621
|
+
ComponentIcon($$anchor, { name: 'arrow-line-right', 'aria-hidden': 'true' });
|
|
622
|
+
},
|
|
623
|
+
$$slots: { default: true }
|
|
624
|
+
}));
|
|
625
|
+
}
|
|
609
626
|
|
|
610
627
|
var node_11 = $.sibling(node_10, 2);
|
|
611
628
|
|
|
612
629
|
{
|
|
613
630
|
var consequent_5 = ($$anchor) => {
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
631
|
+
{
|
|
632
|
+
let $0 = $.derived(() => localeContext.t("imageViewer.close"));
|
|
633
|
+
|
|
634
|
+
Button($$anchor, $.spread_props(() => $.get(builtInButtonProps), {
|
|
635
|
+
as: 'close',
|
|
636
|
+
iconOnly: true,
|
|
637
|
+
get 'aria-label'() {
|
|
638
|
+
return $.get($0);
|
|
639
|
+
},
|
|
640
|
+
|
|
641
|
+
children: ($$anchor, $$slotProps) => {
|
|
642
|
+
ComponentIcon($$anchor, { name: 'close', 'aria-hidden': 'true' });
|
|
643
|
+
},
|
|
644
|
+
$$slots: { default: true }
|
|
645
|
+
}));
|
|
646
|
+
}
|
|
623
647
|
};
|
|
624
648
|
|
|
625
649
|
$.if(node_11, ($$render) => {
|
|
@@ -4,6 +4,7 @@ import ComponentIcon from "../internal/component-icon/ComponentIcon.js";
|
|
|
4
4
|
import Frame from "./Frame.js";
|
|
5
5
|
import { resizable } from "../lib/resizable.js";
|
|
6
6
|
import { untrack } from "svelte";
|
|
7
|
+
import { useLocale } from "../i18n/locale.js";
|
|
7
8
|
import { mergeComponentPartProps, useComponentPart } from "../logic/component-parts.js";
|
|
8
9
|
|
|
9
10
|
let indicatorSeed = 0;
|
|
@@ -21,6 +22,7 @@ export default function Indicator($$anchor, $$props) {
|
|
|
21
22
|
$.append_styles($$anchor, $$css);
|
|
22
23
|
|
|
23
24
|
const inheritedIndicatorPart = useComponentPart("Indicator");
|
|
25
|
+
const localeContext = useLocale();
|
|
24
26
|
let explicitProps = $.rest_props($$props, rest_excludes);
|
|
25
27
|
|
|
26
28
|
let $$d = $.derived(() => mergeComponentPartProps(inheritedIndicatorPart.current, explicitProps)),
|
|
@@ -113,9 +115,9 @@ export default function Indicator($$anchor, $$props) {
|
|
|
113
115
|
const resolvedRevealTarget = $.derived(() => $.get(revealTarget) ?? $.get(resolvedTarget));
|
|
114
116
|
const isVisible = $.derived(() => $.get(hostHovered) || $.get(focused) || $.get(dragging));
|
|
115
117
|
|
|
116
|
-
const resolvedAriaLabel = $.derived(() => $.get(ariaLabel) ?? ($.get(resolvedAxis) === "width"
|
|
117
|
-
? "
|
|
118
|
-
: $.get(resolvedAxis) === "height" ? "
|
|
118
|
+
const resolvedAriaLabel = $.derived(() => $.get(ariaLabel) ?? localeContext.t($.get(resolvedAxis) === "width"
|
|
119
|
+
? "indicator.resizeWidth"
|
|
120
|
+
: $.get(resolvedAxis) === "height" ? "indicator.resizeHeight" : "indicator.resizeBoth"));
|
|
119
121
|
|
|
120
122
|
const rootClass = $.derived(() => [
|
|
121
123
|
"snowui-indicator",
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import { splitFrameHostProps } from "../logic/frame-prop-filter.js";
|
|
16
16
|
import { mergeComponentPartProps, useComponentPart } from "../logic/component-parts.js";
|
|
17
17
|
import { resizeManager } from "../logic/observer.js";
|
|
18
|
+
import { useLocale } from "../i18n/locale.js";
|
|
18
19
|
|
|
19
20
|
var rest_excludes = new Set(['$$slots', '$$events', '$$legacy', 'value', 'element']);
|
|
20
21
|
var root = $.from_html(`<span class="snowui-input-warning-icon snowui-role-trailing text-secondary-red" aria-hidden="true"><!></span>`);
|
|
@@ -134,6 +135,7 @@ export default function Input($$anchor, $$props) {
|
|
|
134
135
|
var consequent = ($$anchor) => {
|
|
135
136
|
{
|
|
136
137
|
let $0 = $.derived(() => `snowui-clear-icon-btn snowui-input-clear-btn${$.get(parts)?.Button?.class ? ` ${$.get(parts).Button.class}` : ""}`);
|
|
138
|
+
let $1 = $.derived(() => localeContext.t("input.clear"));
|
|
137
139
|
|
|
138
140
|
Button($$anchor, $.spread_props({ bare: true, emphasis: 'muted', size: 'sm' }, () => $.get(parts)?.Button, {
|
|
139
141
|
type: 'button',
|
|
@@ -141,7 +143,9 @@ export default function Input($$anchor, $$props) {
|
|
|
141
143
|
return $.get($0);
|
|
142
144
|
},
|
|
143
145
|
as: 'trailing',
|
|
144
|
-
'aria-label'
|
|
146
|
+
get 'aria-label'() {
|
|
147
|
+
return $.get($1);
|
|
148
|
+
},
|
|
145
149
|
onclick: handleClear,
|
|
146
150
|
onmousedown: (e) => e.preventDefault(),
|
|
147
151
|
tabindex: -1,
|
|
@@ -634,6 +638,7 @@ export default function Input($$anchor, $$props) {
|
|
|
634
638
|
var consequent_7 = ($$anchor) => {
|
|
635
639
|
{
|
|
636
640
|
let $0 = $.derived(() => `snowui-input-stepper-btn${$.get(parts)?.Button?.class ? ` ${$.get(parts).Button.class}` : ""}`);
|
|
641
|
+
let $1 = $.derived(() => localeContext.t("input.increment"));
|
|
637
642
|
|
|
638
643
|
Button($$anchor, $.spread_props({ bare: true, emphasis: 'muted', size: 'sm' }, () => $.get(parts)?.Button, {
|
|
639
644
|
type: 'button',
|
|
@@ -641,7 +646,10 @@ export default function Input($$anchor, $$props) {
|
|
|
641
646
|
return $.get($0);
|
|
642
647
|
},
|
|
643
648
|
as: 'up',
|
|
644
|
-
'aria-label'
|
|
649
|
+
get 'aria-label'() {
|
|
650
|
+
return $.get($1);
|
|
651
|
+
},
|
|
652
|
+
|
|
645
653
|
get disabled() {
|
|
646
654
|
return $.get(stepUpDisabled);
|
|
647
655
|
},
|
|
@@ -666,6 +674,7 @@ export default function Input($$anchor, $$props) {
|
|
|
666
674
|
var consequent_8 = ($$anchor) => {
|
|
667
675
|
{
|
|
668
676
|
let $0 = $.derived(() => `snowui-input-stepper-btn${$.get(parts)?.Button?.class ? ` ${$.get(parts).Button.class}` : ""}`);
|
|
677
|
+
let $1 = $.derived(() => localeContext.t("input.decrement"));
|
|
669
678
|
|
|
670
679
|
Button($$anchor, $.spread_props({ bare: true, emphasis: 'muted', size: 'sm' }, () => $.get(parts)?.Button, {
|
|
671
680
|
type: 'button',
|
|
@@ -673,7 +682,10 @@ export default function Input($$anchor, $$props) {
|
|
|
673
682
|
return $.get($0);
|
|
674
683
|
},
|
|
675
684
|
as: 'down',
|
|
676
|
-
'aria-label'
|
|
685
|
+
get 'aria-label'() {
|
|
686
|
+
return $.get($1);
|
|
687
|
+
},
|
|
688
|
+
|
|
677
689
|
get disabled() {
|
|
678
690
|
return $.get(stepDownDisabled);
|
|
679
691
|
},
|
|
@@ -735,6 +747,7 @@ export default function Input($$anchor, $$props) {
|
|
|
735
747
|
var consequent_11 = ($$anchor) => {
|
|
736
748
|
{
|
|
737
749
|
let $0 = $.derived(() => `snowui-clear-icon-btn snowui-input-clear-btn${$.get(parts)?.Button?.class ? ` ${$.get(parts).Button.class}` : ""}`);
|
|
750
|
+
let $1 = $.derived(() => localeContext.t("input.clear"));
|
|
738
751
|
|
|
739
752
|
Button($$anchor, $.spread_props({ bare: true, emphasis: 'muted', size: 'sm' }, () => $.get(parts)?.Button, {
|
|
740
753
|
type: 'button',
|
|
@@ -742,7 +755,9 @@ export default function Input($$anchor, $$props) {
|
|
|
742
755
|
return $.get($0);
|
|
743
756
|
},
|
|
744
757
|
as: 'trailing',
|
|
745
|
-
'aria-label'
|
|
758
|
+
get 'aria-label'() {
|
|
759
|
+
return $.get($1);
|
|
760
|
+
},
|
|
746
761
|
onclick: handleClear,
|
|
747
762
|
onmousedown: (e) => e.preventDefault(),
|
|
748
763
|
tabindex: -1,
|
|
@@ -805,6 +820,7 @@ export default function Input($$anchor, $$props) {
|
|
|
805
820
|
$.append($$anchor, fragment);
|
|
806
821
|
};
|
|
807
822
|
|
|
823
|
+
const localeContext = useLocale();
|
|
808
824
|
const inheritedInputPart = useComponentPart("Input");
|
|
809
825
|
|
|
810
826
|
let value = $.prop($$props, 'value', 15),
|
|
@@ -1206,27 +1222,21 @@ export default function Input($$anchor, $$props) {
|
|
|
1206
1222
|
}
|
|
1207
1223
|
|
|
1208
1224
|
function getTemporalTriggerLabel(inputType) {
|
|
1209
|
-
return inputType === "time" ? "
|
|
1225
|
+
return localeContext.t(inputType === "time" ? "input.openTime" : "input.openDate");
|
|
1210
1226
|
}
|
|
1211
1227
|
|
|
1212
1228
|
function getTemporalAriaLabel(segment) {
|
|
1213
|
-
return segment
|
|
1214
|
-
? "年"
|
|
1215
|
-
: segment === "month"
|
|
1216
|
-
? "月"
|
|
1217
|
-
: segment === "day"
|
|
1218
|
-
? "日"
|
|
1219
|
-
: segment === "week"
|
|
1220
|
-
? "周"
|
|
1221
|
-
: segment === "hour" ? "时" : segment === "minute" ? "分" : "秒";
|
|
1229
|
+
return localeContext.t(`input.${segment}`);
|
|
1222
1230
|
}
|
|
1223
1231
|
|
|
1224
1232
|
function getTemporalPlaceholder(segment) {
|
|
1225
1233
|
return segment === "year"
|
|
1226
|
-
? "
|
|
1234
|
+
? localeContext.t("input.yearPlaceholder")
|
|
1227
1235
|
: segment === "month"
|
|
1228
|
-
? "
|
|
1229
|
-
: segment === "day"
|
|
1236
|
+
? localeContext.t("input.monthPlaceholder")
|
|
1237
|
+
: segment === "day"
|
|
1238
|
+
? localeContext.t("input.dayPlaceholder")
|
|
1239
|
+
: segment === "week" ? localeContext.t("input.weekPlaceholder") : "00";
|
|
1230
1240
|
}
|
|
1231
1241
|
|
|
1232
1242
|
function getTemporalSegmentLength(segment) {
|
|
@@ -4,7 +4,7 @@ import Tooltip from "./Tooltip.js";
|
|
|
4
4
|
import { type SnowUIColor } from "../lib/color";
|
|
5
5
|
import type { ComponentPartsOf } from "../logic/component-parts.js";
|
|
6
6
|
type LinkVariant = "default" | "arrow" | "external";
|
|
7
|
-
type LinkUnderline = "none" | "always" | "hover";
|
|
7
|
+
type LinkUnderline = "none" | "always" | "hover" | "until-hover";
|
|
8
8
|
type TooltipProp = boolean | string | Snippet | Record<string, any>;
|
|
9
9
|
interface Props extends Omit<FrameProps, "children" | "tag"> {
|
|
10
10
|
variant?: LinkVariant;
|
|
@@ -6,6 +6,7 @@ import Tooltip from "./Tooltip.js";
|
|
|
6
6
|
import { resolveSnowUIColor } from "../lib/color.js";
|
|
7
7
|
import { fitTextToElement, measureTextForElement } from "../lib/truncate.js";
|
|
8
8
|
import { TruncationController } from "../logic/frame-truncation.js";
|
|
9
|
+
import ComponentPartsBoundary from "../logic/ComponentPartsBoundary.js";
|
|
9
10
|
|
|
10
11
|
var rest_excludes = new Set([
|
|
11
12
|
'$$slots',
|
|
@@ -43,7 +44,7 @@ var root_4 = $.from_html(`<span class="snowui-link-content"><span class="snowui-
|
|
|
43
44
|
|
|
44
45
|
const $$css = {
|
|
45
46
|
hash: 'svelte-96nnl8',
|
|
46
|
-
code: ':where(.snowui-link) {--snowui-link-font-size: var(--text-14);--snowui-link-line-height: var(--leading-14);--snowui-link-gap: calc(var(--gap-1) / 2);--snowui-link-icon-size: var(--size-3);--snowui-link-color: var(--black-40, #00000066);--snowui-link-hover-color: var(--black-100, #000000ff);--snowui-link-decoration-opacity: var(--snowui-state-opacity, 0.4);--snowui-link-decoration-hover-opacity: var(--snowui-state-opacity, 1);color:var(--snowui-link-color-override, var(--snowui-link-color));text-decoration:none;width:fit-content;max-width:100%;gap:var(--snowui-link-gap-override, var(--snowui-link-gap));font-size:var(\n --snowui-link-font-size-override,\n var(--snowui-link-font-size)\n );line-height:var(\n --snowui-link-line-height-override,\n var(--snowui-link-line-height)\n );cursor:var(--snowui-state-cursor, pointer);--snowui-frame-component-transition:\n color var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link)[data-auto-layout] {gap:var(--snowui-link-gap-override, var(--snowui-link-gap));}:where(.snowui-link):hover:not(.snowui-disabled),\n :where(.snowui-link):active:not(.snowui-disabled) {color:var(--snowui-link-hover-color);}:where(.snowui-link):focus-visible {outline:var(--border-1) solid currentColor;outline-offset:var(--border-2);}:where(.snowui-link-content) {min-width:0;max-width:100%;}:where(.snowui-link)[data-lines="1"] > .snowui-link-content {width:var(--snowui-link-truncated-content-width, auto);overflow:hidden;}:where(.snowui-link)[data-lines="1"] {width:fit-content;}:where(.snowui-link-label) {min-width:0;max-width:100%;}:where(.snowui-link-label)[data-lines="1"] {display:grid;grid-template-columns:minmax(0, 1fr);}:where(.snowui-link-label-text) {display:block;min-width:0;max-width:100%;text-decoration-line:none;text-decoration-color:currentColor;}:where(.snowui-link-label)[data-lines="1"] > .snowui-link-label-text {grid-column:1;grid-row:1;overflow:hidden;text-overflow:clip;white-space:nowrap;}:where(.snowui-link-label-measure) {visibility:hidden;}:where(.snowui-link-label-visible) {grid-column:1;grid-row:1;min-width:0;overflow:hidden;white-space:nowrap;}:where(.snowui-link-ellipsis) {text-decoration:none;}:where(.snowui-link)[data-underline="always"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="always"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible,\n :where(.snowui-link)[data-underline="hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible {text-decoration-line:underline;}:where(.snowui-link > [data-as="leading"]),\n :where(.snowui-link > [data-as="trailing"]) {display:inline-flex;align-items:inherit;text-decoration:none;}:where(.snowui-link > [data-as="trailing"]:not(.snowui-link-default-trailing)) {color:currentColor;opacity:var(\n --snowui-link-decoration-opacity-override,\n var(--snowui-link-decoration-opacity)\n );text-decoration:none;transition:opacity var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link-default-trailing) {display:inline-flex;flex-shrink:0;color:currentColor;opacity:var(\n --snowui-link-decoration-opacity-override,\n var(--snowui-link-decoration-opacity)\n );text-decoration:none;transition:opacity var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link):hover:not(.snowui-disabled) > .snowui-link-default-trailing,\n :where(.snowui-link):active:not(.snowui-disabled) > .snowui-link-default-trailing,\n :where(.snowui-link):hover:not(.snowui-disabled) > [data-as="trailing"]:not(.snowui-link-default-trailing),\n :where(.snowui-link):active:not(.snowui-disabled) > [data-as="trailing"]:not(.snowui-link-default-trailing) {opacity:var(\n --snowui-link-decoration-hover-opacity-override,\n var(--snowui-link-decoration-hover-opacity)\n );}:where(.snowui-link-default-icon) {--snowui-icon-size-override: var(\n --snowui-link-icon-size-override,\n var(--snowui-link-icon-size)\n );}'
|
|
47
|
+
code: ':where(.snowui-link) {--snowui-link-font-size: var(--text-14);--snowui-link-line-height: var(--leading-14);--snowui-link-gap: calc(var(--gap-1) / 2);--snowui-link-icon-size: var(--size-3);--snowui-link-color: var(--black-40, #00000066);--snowui-link-hover-color: var(--black-100, #000000ff);--snowui-link-decoration-opacity: var(--snowui-state-opacity, 0.4);--snowui-link-decoration-hover-opacity: var(--snowui-state-opacity, 1);color:var(--snowui-link-color-override, var(--snowui-link-color));text-decoration:none;width:fit-content;max-width:100%;gap:var(--snowui-link-gap-override, var(--snowui-link-gap));font-size:var(\n --snowui-link-font-size-override,\n var(--snowui-link-font-size)\n );line-height:var(\n --snowui-link-line-height-override,\n var(--snowui-link-line-height)\n );cursor:var(--snowui-state-cursor, pointer);--snowui-frame-component-transition:\n color var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link)[data-auto-layout] {gap:var(--snowui-link-gap-override, var(--snowui-link-gap));}:where(.snowui-link):hover:not(.snowui-disabled),\n :where(.snowui-link):active:not(.snowui-disabled) {color:var(--snowui-link-hover-color);}:where(.snowui-link):focus-visible {outline:var(--border-1) solid currentColor;outline-offset:var(--border-2);}:where(.snowui-link-content) {min-width:0;max-width:100%;}:where(.snowui-link)[data-lines="1"] > .snowui-link-content {width:var(--snowui-link-truncated-content-width, auto);overflow:hidden;}:where(.snowui-link)[data-lines="1"] {width:fit-content;}:where(.snowui-link-label) {min-width:0;max-width:100%;}:where(.snowui-link-label)[data-lines="1"] {display:grid;grid-template-columns:minmax(0, 1fr);}:where(.snowui-link-label-text) {display:block;min-width:0;max-width:100%;text-decoration-line:none;text-decoration-color:currentColor;}:where(.snowui-link-label)[data-lines="1"] > .snowui-link-label-text {grid-column:1;grid-row:1;overflow:hidden;text-overflow:clip;white-space:nowrap;}:where(.snowui-link-label-measure) {visibility:hidden;}:where(.snowui-link-label-visible) {grid-column:1;grid-row:1;min-width:0;overflow:hidden;white-space:nowrap;}:where(.snowui-link-ellipsis) {text-decoration:none;}:where(.snowui-link)[data-underline="always"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="always"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible,\n :where(.snowui-link)[data-underline="until-hover"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="until-hover"] > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible,\n :where(.snowui-link)[data-underline="hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible {text-decoration-line:underline;}:where(.snowui-link)[data-underline="until-hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-text,\n :where(.snowui-link)[data-underline="until-hover"]:hover:not(.snowui-disabled) > .snowui-link-content > .snowui-link-label > .snowui-link-label-visible {text-decoration-line:none;}:where(.snowui-link > [data-as="leading"]),\n :where(.snowui-link > [data-as="trailing"]) {display:inline-flex;align-items:inherit;text-decoration:none;}:where(.snowui-link > [data-as="trailing"]:not(.snowui-link-default-trailing)) {color:currentColor;opacity:var(\n --snowui-link-decoration-opacity-override,\n var(--snowui-link-decoration-opacity)\n );text-decoration:none;transition:opacity var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link-default-trailing) {display:inline-flex;flex-shrink:0;color:currentColor;opacity:var(\n --snowui-link-decoration-opacity-override,\n var(--snowui-link-decoration-opacity)\n );text-decoration:none;transition:opacity var(--snowui-frame-color-motion-duration, 0.15s)\n var(--snowui-frame-color-motion-easing, ease-out);}:where(.snowui-link):hover:not(.snowui-disabled) > .snowui-link-default-trailing,\n :where(.snowui-link):active:not(.snowui-disabled) > .snowui-link-default-trailing,\n :where(.snowui-link):hover:not(.snowui-disabled) > [data-as="trailing"]:not(.snowui-link-default-trailing),\n :where(.snowui-link):active:not(.snowui-disabled) > [data-as="trailing"]:not(.snowui-link-default-trailing) {opacity:var(\n --snowui-link-decoration-hover-opacity-override,\n var(--snowui-link-decoration-hover-opacity)\n );}:where(.snowui-link-default-icon) {--snowui-icon-size-override: var(\n --snowui-link-icon-size-override,\n var(--snowui-link-icon-size)\n );}'
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
export default function Link($$anchor, $$props) {
|
|
@@ -322,13 +323,23 @@ export default function Link($$anchor, $$props) {
|
|
|
322
323
|
var span_2 = $.first_child(fragment_2);
|
|
323
324
|
var node_1 = $.child(span_2);
|
|
324
325
|
|
|
325
|
-
|
|
326
|
+
ComponentPartsBoundary(node_1, {
|
|
327
|
+
children: ($$anchor, $$slotProps) => {
|
|
328
|
+
var fragment_3 = $.comment();
|
|
329
|
+
var node_2 = $.first_child(fragment_3);
|
|
330
|
+
|
|
331
|
+
$.snippet(node_2, () => $$props.children ?? $.noop);
|
|
332
|
+
$.append($$anchor, fragment_3);
|
|
333
|
+
},
|
|
334
|
+
$$slots: { default: true }
|
|
335
|
+
});
|
|
336
|
+
|
|
326
337
|
$.reset(span_2);
|
|
327
338
|
$.bind_this(span_2, ($$value) => $.set(contentElement, $$value), () => $.get(contentElement));
|
|
328
339
|
|
|
329
340
|
var span_3 = $.sibling(span_2, 2);
|
|
330
341
|
var text = $.child(span_3, true);
|
|
331
|
-
var
|
|
342
|
+
var node_3 = $.sibling(text);
|
|
332
343
|
|
|
333
344
|
{
|
|
334
345
|
var consequent = ($$anchor) => {
|
|
@@ -337,7 +348,7 @@ export default function Link($$anchor, $$props) {
|
|
|
337
348
|
$.append($$anchor, span_4);
|
|
338
349
|
};
|
|
339
350
|
|
|
340
|
-
$.if(
|
|
351
|
+
$.if(node_3, ($$render) => {
|
|
341
352
|
if (truncation.isTruncated) $$render(consequent);
|
|
342
353
|
});
|
|
343
354
|
}
|
|
@@ -349,9 +360,19 @@ export default function Link($$anchor, $$props) {
|
|
|
349
360
|
|
|
350
361
|
var alternate = ($$anchor) => {
|
|
351
362
|
var span_5 = root_2();
|
|
352
|
-
var
|
|
363
|
+
var node_4 = $.child(span_5);
|
|
364
|
+
|
|
365
|
+
ComponentPartsBoundary(node_4, {
|
|
366
|
+
children: ($$anchor, $$slotProps) => {
|
|
367
|
+
var fragment_4 = $.comment();
|
|
368
|
+
var node_5 = $.first_child(fragment_4);
|
|
369
|
+
|
|
370
|
+
$.snippet(node_5, () => $$props.children ?? $.noop);
|
|
371
|
+
$.append($$anchor, fragment_4);
|
|
372
|
+
},
|
|
373
|
+
$$slots: { default: true }
|
|
374
|
+
});
|
|
353
375
|
|
|
354
|
-
$.snippet(node_3, () => $$props.children ?? $.noop);
|
|
355
376
|
$.reset(span_5);
|
|
356
377
|
$.bind_this(span_5, ($$value) => $.set(contentElement, $$value), () => $.get(contentElement));
|
|
357
378
|
$.append($$anchor, span_5);
|
|
@@ -364,14 +385,14 @@ export default function Link($$anchor, $$props) {
|
|
|
364
385
|
|
|
365
386
|
$.reset(span_1);
|
|
366
387
|
|
|
367
|
-
var
|
|
388
|
+
var node_6 = $.sibling(span_1, 2);
|
|
368
389
|
|
|
369
390
|
{
|
|
370
391
|
var consequent_4 = ($$anchor) => {
|
|
371
392
|
Tooltip($$anchor, $.spread_props(() => $.get(tooltipConfig), {
|
|
372
393
|
children: ($$anchor, $$slotProps) => {
|
|
373
|
-
var
|
|
374
|
-
var
|
|
394
|
+
var fragment_6 = $.comment();
|
|
395
|
+
var node_7 = $.first_child(fragment_6);
|
|
375
396
|
|
|
376
397
|
{
|
|
377
398
|
var consequent_2 = ($$anchor) => {
|
|
@@ -382,39 +403,39 @@ export default function Link($$anchor, $$props) {
|
|
|
382
403
|
};
|
|
383
404
|
|
|
384
405
|
var consequent_3 = ($$anchor) => {
|
|
385
|
-
var
|
|
386
|
-
var
|
|
406
|
+
var fragment_8 = $.comment();
|
|
407
|
+
var node_8 = $.first_child(fragment_8);
|
|
387
408
|
|
|
388
|
-
$.snippet(
|
|
389
|
-
$.append($$anchor,
|
|
409
|
+
$.snippet(node_8, () => $.get(tooltipContent));
|
|
410
|
+
$.append($$anchor, fragment_8);
|
|
390
411
|
};
|
|
391
412
|
|
|
392
|
-
$.if(
|
|
413
|
+
$.if(node_7, ($$render) => {
|
|
393
414
|
if (typeof $.get(tooltipContent) === "string") $$render(consequent_2); else if (typeof $.get(tooltipContent) === "function") $$render(consequent_3, 1);
|
|
394
415
|
});
|
|
395
416
|
}
|
|
396
417
|
|
|
397
|
-
$.append($$anchor,
|
|
418
|
+
$.append($$anchor, fragment_6);
|
|
398
419
|
},
|
|
399
420
|
$$slots: { default: true }
|
|
400
421
|
}));
|
|
401
422
|
};
|
|
402
423
|
|
|
403
|
-
$.if(
|
|
424
|
+
$.if(node_6, ($$render) => {
|
|
404
425
|
if ($.get(needTooltip)) $$render(consequent_4);
|
|
405
426
|
});
|
|
406
427
|
}
|
|
407
428
|
|
|
408
429
|
$.reset(span);
|
|
409
430
|
|
|
410
|
-
var
|
|
431
|
+
var node_9 = $.sibling(span, 2);
|
|
411
432
|
|
|
412
433
|
{
|
|
413
434
|
var consequent_5 = ($$anchor) => {
|
|
414
435
|
var span_6 = root_3();
|
|
415
|
-
var
|
|
436
|
+
var node_10 = $.child(span_6);
|
|
416
437
|
|
|
417
|
-
ComponentIcon(
|
|
438
|
+
ComponentIcon(node_10, {
|
|
418
439
|
name: 'arrow-up-right',
|
|
419
440
|
class: 'snowui-link-default-icon',
|
|
420
441
|
size: 'var(--snowui-link-icon-size-override, var(--snowui-link-icon-size))',
|
|
@@ -427,9 +448,9 @@ export default function Link($$anchor, $$props) {
|
|
|
427
448
|
|
|
428
449
|
var consequent_6 = ($$anchor) => {
|
|
429
450
|
var span_7 = root_3();
|
|
430
|
-
var
|
|
451
|
+
var node_11 = $.child(span_7);
|
|
431
452
|
|
|
432
|
-
ComponentIcon(
|
|
453
|
+
ComponentIcon(node_11, {
|
|
433
454
|
name: 'arrow-square-out',
|
|
434
455
|
class: 'snowui-link-default-icon',
|
|
435
456
|
size: 'var(--snowui-link-icon-size-override, var(--snowui-link-icon-size))',
|
|
@@ -440,7 +461,7 @@ export default function Link($$anchor, $$props) {
|
|
|
440
461
|
$.append($$anchor, span_7);
|
|
441
462
|
};
|
|
442
463
|
|
|
443
|
-
$.if(
|
|
464
|
+
$.if(node_9, ($$render) => {
|
|
444
465
|
if (variant() === "arrow" && !$.get(hasCustomTrailing)) $$render(consequent_5); else if (variant() === "external" && !$.get(hasCustomTrailing)) $$render(consequent_6, 1);
|
|
445
466
|
});
|
|
446
467
|
}
|