@snowui-design-system/components 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/components/Avatar.d.ts +1 -1
- package/dist/client/components/Avatar.js +32 -16
- package/dist/client/components/Button.d.ts +2 -2
- package/dist/client/components/Button.js +30 -2
- package/dist/client/components/Gradient.d.ts +2 -3
- package/dist/client/components/Gradient.js +10 -36
- package/dist/client/components/OverflowAction.js +6 -3
- package/dist/client/components/OverflowActions.d.ts +6 -6
- package/dist/client/components/OverflowActions.js +284 -132
- package/dist/client/components/SidePanel.js +3 -1
- package/dist/client/components/Skeleton.d.ts +2 -22
- package/dist/client/components/Skeleton.js +63 -391
- package/dist/client/components/Text.d.ts +2 -2
- package/dist/client/logic/gradient-static.d.ts +6 -0
- package/dist/client/logic/gradient-static.js +38 -0
- package/dist/client/logic/skeleton-layouts.d.ts +25 -0
- package/dist/client/logic/skeleton-layouts.js +240 -0
- package/dist/server/components/Avatar.d.ts +1 -1
- package/dist/server/components/Avatar.js +13 -8
- package/dist/server/components/Button.d.ts +2 -2
- package/dist/server/components/Button.js +11 -0
- package/dist/server/components/Gradient.d.ts +2 -3
- package/dist/server/components/Gradient.js +9 -36
- package/dist/server/components/OverflowAction.js +6 -3
- package/dist/server/components/OverflowActions.d.ts +6 -6
- package/dist/server/components/OverflowActions.js +166 -69
- package/dist/server/components/SidePanel.js +3 -1
- package/dist/server/components/Skeleton.d.ts +2 -22
- package/dist/server/components/Skeleton.js +35 -378
- package/dist/server/components/Text.d.ts +2 -2
- package/dist/server/logic/gradient-static.d.ts +6 -0
- package/dist/server/logic/gradient-static.js +38 -0
- package/dist/server/logic/skeleton-layouts.d.ts +25 -0
- package/dist/server/logic/skeleton-layouts.js +240 -0
- package/package.json +1 -1
|
@@ -4,9 +4,6 @@ import { onDestroy, onMount, setContext, tick } from "svelte";
|
|
|
4
4
|
import { ComponentIcon } from "../internal/component-icon/index.js";
|
|
5
5
|
import Frame from "./Frame.js";
|
|
6
6
|
import Button from "./Button.js";
|
|
7
|
-
import SelectButton from "./SelectButton.js";
|
|
8
|
-
import Listbox from "./Listbox.js";
|
|
9
|
-
import MenuItem from "./MenuItem.js";
|
|
10
7
|
import Separator from "./Separator.js";
|
|
11
8
|
import OverflowAction from "./OverflowAction.js";
|
|
12
9
|
import { createOverflowActionsMotion } from "../lib/overflow-actions-motion.js";
|
|
@@ -75,7 +72,8 @@ var rest_excludes = new Set([
|
|
|
75
72
|
var root = $.from_html(`<span data-as="leading"><!></span>`);
|
|
76
73
|
var root_1 = $.from_html(`<!> <span class="snowui-menu-item-label"> </span>`, 1);
|
|
77
74
|
var root_2 = $.from_html(`<span class="snowui-overflow-actions-more-visual"><!></span>`);
|
|
78
|
-
var root_3 = $.from_html(
|
|
75
|
+
var root_3 = $.from_html(`<span class="snowui-overflow-actions-fade-measure" aria-hidden="true" inert=""></span> <span class="snowui-overflow-actions-more-measure" aria-hidden="true" inert=""><span><!></span></span>`, 1);
|
|
76
|
+
var root_4 = $.from_html(`<!> <!> <!>`, 1);
|
|
79
77
|
|
|
80
78
|
const $$css = {
|
|
81
79
|
hash: 'svelte-ewzjdd',
|
|
@@ -120,8 +118,9 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
120
118
|
|
|
121
119
|
const resolvedMoreLabel = $.derived(() => moreLabel() ?? locale.t("overflowActions.more"));
|
|
122
120
|
let rootElement = $.state(undefined);
|
|
121
|
+
let moreVisualElement = $.state(undefined);
|
|
123
122
|
let moreMeasureElement = $.state(undefined);
|
|
124
|
-
let fadeMeasureElement;
|
|
123
|
+
let fadeMeasureElement = $.state(undefined);
|
|
125
124
|
const separatorWidths = new Map();
|
|
126
125
|
const actionWidths = new Map();
|
|
127
126
|
let modes = $.state($.proxy({}));
|
|
@@ -137,11 +136,42 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
137
136
|
let movement;
|
|
138
137
|
let layoutKey;
|
|
139
138
|
let layoutRevision = 0;
|
|
140
|
-
let isMounted = false;
|
|
139
|
+
let isMounted = $.state(false);
|
|
141
140
|
const registrations = new Map();
|
|
142
141
|
const resolvedButtonProps = $.derived(() => mergeComponentPartProps(buttonProps(), parts()?.Button ?? {}));
|
|
143
142
|
const resolvedMoreButtonProps = $.derived(() => mergeComponentPartProps($.get(resolvedButtonProps), parts()?.SelectButton ?? {}));
|
|
144
143
|
|
|
144
|
+
const resolvedMoreMeasureButtonProps = $.derived(() => {
|
|
145
|
+
const {
|
|
146
|
+
value: _value,
|
|
147
|
+
defaultValue: _defaultValue,
|
|
148
|
+
options: _options,
|
|
149
|
+
placeholder: _placeholder,
|
|
150
|
+
name: _name,
|
|
151
|
+
form: _form,
|
|
152
|
+
required: _required,
|
|
153
|
+
readonly: _readonly,
|
|
154
|
+
invalid: _invalid,
|
|
155
|
+
ariaLabel: _ariaLabel,
|
|
156
|
+
showIndicator: _showIndicator,
|
|
157
|
+
search: _search,
|
|
158
|
+
selectionMode: _selectionMode,
|
|
159
|
+
label: _label,
|
|
160
|
+
indicator: _indicator,
|
|
161
|
+
parts: _parts,
|
|
162
|
+
onchange: _onchange,
|
|
163
|
+
onAction: _onAction,
|
|
164
|
+
...restButtonProps
|
|
165
|
+
} = $.get(resolvedMoreButtonProps);
|
|
166
|
+
|
|
167
|
+
return restButtonProps;
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
let OverflowMenuParts = $.state(undefined);
|
|
171
|
+
let overflowMenuLoading = false;
|
|
172
|
+
let pendingMoreFocus = false;
|
|
173
|
+
let pendingMoreOpen = false;
|
|
174
|
+
|
|
145
175
|
const context = {
|
|
146
176
|
register(action) {
|
|
147
177
|
if (registrations.has(action.id) && false) {
|
|
@@ -219,7 +249,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
219
249
|
}
|
|
220
250
|
|
|
221
251
|
function scheduleLayout() {
|
|
222
|
-
if (
|
|
252
|
+
if (!$.get(isMounted) || layoutFrame) return;
|
|
223
253
|
|
|
224
254
|
layoutFrame = requestAnimationFrame(() => {
|
|
225
255
|
void flushLayout();
|
|
@@ -232,7 +262,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
232
262
|
layoutFrame = 0;
|
|
233
263
|
await tick();
|
|
234
264
|
|
|
235
|
-
if (isMounted) updateLayout();
|
|
265
|
+
if ($.get(isMounted)) updateLayout();
|
|
236
266
|
}
|
|
237
267
|
|
|
238
268
|
function directEntries() {
|
|
@@ -393,7 +423,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
393
423
|
|
|
394
424
|
const fadingActions = actions.filter((action) => nextModes[action.id] !== "hidden" && upcoming.nextModes[action.id] === "hidden");
|
|
395
425
|
|
|
396
|
-
const opacity = exit.update(width, required, fadeMeasureElement?.getBoundingClientRect().width ?? 0, fadingActions.length
|
|
426
|
+
const opacity = exit.update(width, required, $.get(fadeMeasureElement)?.getBoundingClientRect().width ?? 0, fadingActions.length
|
|
397
427
|
? JSON.stringify(fadingActions.map((action) => action.id))
|
|
398
428
|
: '');
|
|
399
429
|
|
|
@@ -437,10 +467,17 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
437
467
|
$.set(menuEntries, nextMenuEntries.filter((entry) => entry.type === "action"), true);
|
|
438
468
|
$.set(hasOverflow, $.get(menuEntries).length > 0);
|
|
439
469
|
|
|
470
|
+
if (!$.get(hasOverflow)) {
|
|
471
|
+
pendingMoreFocus = false;
|
|
472
|
+
pendingMoreOpen = false;
|
|
473
|
+
} else if (moveFocus && !$.get(OverflowMenuParts)) {
|
|
474
|
+
pendingMoreFocus = true;
|
|
475
|
+
}
|
|
476
|
+
|
|
440
477
|
if (before || moveFocus) void tick().then(() => {
|
|
441
|
-
if (
|
|
478
|
+
if (!$.get(isMounted) || revision !== layoutRevision) return;
|
|
442
479
|
if (before) movement?.play(before);
|
|
443
|
-
if (moveFocus) $.get(
|
|
480
|
+
if (moveFocus) $.get(moreVisualElement)?.querySelector('button')?.focus({ preventScroll: true });
|
|
444
481
|
});
|
|
445
482
|
}
|
|
446
483
|
|
|
@@ -459,7 +496,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
459
496
|
}
|
|
460
497
|
|
|
461
498
|
onMount(() => {
|
|
462
|
-
isMounted
|
|
499
|
+
$.set(isMounted, true);
|
|
463
500
|
|
|
464
501
|
if ($.get(rootElement)) movement = createOverflowActionsMotion($.get(rootElement));
|
|
465
502
|
|
|
@@ -469,7 +506,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
469
506
|
});
|
|
470
507
|
|
|
471
508
|
onDestroy(() => {
|
|
472
|
-
isMounted
|
|
509
|
+
$.set(isMounted, false);
|
|
473
510
|
|
|
474
511
|
if (typeof window !== 'undefined') window.removeEventListener('resize', handleViewportResize);
|
|
475
512
|
if (typeof document !== 'undefined') document.fonts?.removeEventListener('loadingdone', requestLayout);
|
|
@@ -511,7 +548,49 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
511
548
|
$.get(resolvedAvailableWidth);
|
|
512
549
|
|
|
513
550
|
// 外部列宽也可能逐帧变化;只更新预算,不使固有宽度缓存失效。
|
|
514
|
-
if (isMounted) void flushLayout();
|
|
551
|
+
if ($.get(isMounted)) void flushLayout();
|
|
552
|
+
});
|
|
553
|
+
|
|
554
|
+
$.user_effect(() => {
|
|
555
|
+
if (!$.get(hasOverflow) || $.get(OverflowMenuParts) || overflowMenuLoading) return;
|
|
556
|
+
|
|
557
|
+
overflowMenuLoading = true;
|
|
558
|
+
|
|
559
|
+
void Promise.all([
|
|
560
|
+
import("./SelectButton.js"),
|
|
561
|
+
import("./Listbox.js"),
|
|
562
|
+
import("./MenuItem.js")
|
|
563
|
+
]).then(async ([selectButtonMod, listboxMod, menuItemMod]) => {
|
|
564
|
+
const shouldFocus = pendingMoreFocus || Boolean(typeof document !== "undefined" && $.get(moreVisualElement)?.contains(document.activeElement));
|
|
565
|
+
const shouldOpen = pendingMoreOpen;
|
|
566
|
+
|
|
567
|
+
pendingMoreFocus = false;
|
|
568
|
+
pendingMoreOpen = false;
|
|
569
|
+
|
|
570
|
+
$.set(
|
|
571
|
+
OverflowMenuParts,
|
|
572
|
+
{
|
|
573
|
+
SelectButton: selectButtonMod.default,
|
|
574
|
+
Listbox: listboxMod.default,
|
|
575
|
+
MenuItem: menuItemMod.default
|
|
576
|
+
},
|
|
577
|
+
true
|
|
578
|
+
);
|
|
579
|
+
|
|
580
|
+
if (!$.get(isMounted) || !$.get(hasOverflow) || !shouldFocus && !shouldOpen) return;
|
|
581
|
+
|
|
582
|
+
await tick();
|
|
583
|
+
|
|
584
|
+
if (!$.get(isMounted) || !$.get(hasOverflow)) return;
|
|
585
|
+
|
|
586
|
+
const trigger = $.get(moreVisualElement)?.querySelector("button");
|
|
587
|
+
|
|
588
|
+
if (shouldFocus) trigger?.focus({ preventScroll: true });
|
|
589
|
+
|
|
590
|
+
if (shouldOpen && trigger?.getAttribute("aria-expanded") !== "true") {
|
|
591
|
+
trigger?.click();
|
|
592
|
+
}
|
|
593
|
+
});
|
|
515
594
|
});
|
|
516
595
|
|
|
517
596
|
{
|
|
@@ -548,7 +627,7 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
548
627
|
},
|
|
549
628
|
|
|
550
629
|
children: ($$anchor, $$slotProps) => {
|
|
551
|
-
var fragment_4 =
|
|
630
|
+
var fragment_4 = root_4();
|
|
552
631
|
var node_3 = $.first_child(fragment_4);
|
|
553
632
|
|
|
554
633
|
{
|
|
@@ -636,154 +715,227 @@ export default function OverflowActions($$anchor, $$props) {
|
|
|
636
715
|
var node_7 = $.sibling(node_3, 2);
|
|
637
716
|
|
|
638
717
|
{
|
|
639
|
-
var
|
|
718
|
+
var consequent_6 = ($$anchor) => {
|
|
640
719
|
var span = root_2();
|
|
641
720
|
var node_8 = $.child(span);
|
|
642
721
|
|
|
643
722
|
{
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
get tooltip() {
|
|
665
|
-
return $.get($0);
|
|
666
|
-
},
|
|
667
|
-
|
|
668
|
-
get disabled() {
|
|
669
|
-
return disabled();
|
|
670
|
-
},
|
|
671
|
-
onAction: handleMenuAction,
|
|
672
|
-
get parts() {
|
|
673
|
-
return $.get($1);
|
|
674
|
-
},
|
|
675
|
-
label,
|
|
676
|
-
children: ($$anchor, $$slotProps) => {
|
|
677
|
-
Listbox($$anchor, {
|
|
678
|
-
search: false,
|
|
679
|
-
showCheck: false,
|
|
680
|
-
placementMode: 'bottom',
|
|
681
|
-
get align() {
|
|
682
|
-
return align();
|
|
683
|
-
},
|
|
684
|
-
|
|
685
|
-
children: ($$anchor, $$slotProps) => {
|
|
686
|
-
var fragment_12 = $.comment();
|
|
687
|
-
var node_9 = $.first_child(fragment_12);
|
|
688
|
-
|
|
689
|
-
$.each(node_9, 17, () => $.get(menuEntries), $.index, ($$anchor, entry) => {
|
|
690
|
-
{
|
|
691
|
-
let $0 = $.derived(() => disabled() || $.get(entry).action.disabled);
|
|
692
|
-
|
|
693
|
-
MenuItem($$anchor, {
|
|
694
|
-
as: 'item',
|
|
695
|
-
get value() {
|
|
696
|
-
return $.get(entry).action.id;
|
|
697
|
-
},
|
|
723
|
+
var consequent_5 = ($$anchor) => {
|
|
724
|
+
const OverflowSelectButton = $.derived(() => $.get(OverflowMenuParts).SelectButton);
|
|
725
|
+
const OverflowListbox = $.derived(() => $.get(OverflowMenuParts).Listbox);
|
|
726
|
+
const OverflowMenuItem = $.derived(() => $.get(OverflowMenuParts).MenuItem);
|
|
727
|
+
var fragment_10 = $.comment();
|
|
728
|
+
var node_9 = $.first_child(fragment_10);
|
|
729
|
+
|
|
730
|
+
{
|
|
731
|
+
const label = ($$anchor) => {
|
|
732
|
+
ComponentIcon($$anchor, { name: 'three-dots', 'aria-hidden': 'true' });
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
let $0 = $.derived(() => $.get(resolvedGroupTooltip) ? $.get(resolvedMoreLabel) : false);
|
|
736
|
+
|
|
737
|
+
let $1 = $.derived(() => ({
|
|
738
|
+
Listbox: parts()?.Listbox,
|
|
739
|
+
MenuItem: parts()?.MenuItem,
|
|
740
|
+
Tooltip: parts()?.Tooltip
|
|
741
|
+
}));
|
|
698
742
|
|
|
699
|
-
|
|
700
|
-
|
|
743
|
+
$.component(node_9, () => $.get(OverflowSelectButton), ($$anchor, OverflowSelectButton_1) => {
|
|
744
|
+
OverflowSelectButton_1($$anchor, $.spread_props(() => $.get(resolvedMoreButtonProps), {
|
|
745
|
+
iconOnly: true,
|
|
746
|
+
showIndicator: false,
|
|
747
|
+
selectionMode: 'action',
|
|
748
|
+
get ariaLabel() {
|
|
749
|
+
return $.get(resolvedMoreLabel);
|
|
750
|
+
},
|
|
751
|
+
|
|
752
|
+
get tooltip() {
|
|
753
|
+
return $.get($0);
|
|
754
|
+
},
|
|
755
|
+
|
|
756
|
+
get disabled() {
|
|
757
|
+
return disabled();
|
|
758
|
+
},
|
|
759
|
+
onAction: handleMenuAction,
|
|
760
|
+
get parts() {
|
|
761
|
+
return $.get($1);
|
|
762
|
+
},
|
|
763
|
+
label,
|
|
764
|
+
children: ($$anchor, $$slotProps) => {
|
|
765
|
+
var fragment_12 = $.comment();
|
|
766
|
+
var node_10 = $.first_child(fragment_12);
|
|
767
|
+
|
|
768
|
+
$.component(node_10, () => $.get(OverflowListbox), ($$anchor, OverflowListbox_1) => {
|
|
769
|
+
OverflowListbox_1($$anchor, {
|
|
770
|
+
search: false,
|
|
771
|
+
showCheck: false,
|
|
772
|
+
placementMode: 'bottom',
|
|
773
|
+
get align() {
|
|
774
|
+
return align();
|
|
701
775
|
},
|
|
702
776
|
|
|
703
777
|
children: ($$anchor, $$slotProps) => {
|
|
704
|
-
var
|
|
705
|
-
var
|
|
706
|
-
|
|
707
|
-
{
|
|
708
|
-
var
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
$.
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
778
|
+
var fragment_13 = $.comment();
|
|
779
|
+
var node_11 = $.first_child(fragment_13);
|
|
780
|
+
|
|
781
|
+
$.each(node_11, 17, () => $.get(menuEntries), $.index, ($$anchor, entry) => {
|
|
782
|
+
var fragment_14 = $.comment();
|
|
783
|
+
var node_12 = $.first_child(fragment_14);
|
|
784
|
+
|
|
785
|
+
{
|
|
786
|
+
let $0 = $.derived(() => disabled() || $.get(entry).action.disabled);
|
|
787
|
+
|
|
788
|
+
$.component(node_12, () => $.get(OverflowMenuItem), ($$anchor, OverflowMenuItem_1) => {
|
|
789
|
+
OverflowMenuItem_1($$anchor, {
|
|
790
|
+
as: 'item',
|
|
791
|
+
get value() {
|
|
792
|
+
return $.get(entry).action.id;
|
|
793
|
+
},
|
|
794
|
+
|
|
795
|
+
get disabled() {
|
|
796
|
+
return $.get($0);
|
|
797
|
+
},
|
|
798
|
+
|
|
799
|
+
children: ($$anchor, $$slotProps) => {
|
|
800
|
+
var fragment_15 = root_1();
|
|
801
|
+
var node_13 = $.first_child(fragment_15);
|
|
802
|
+
|
|
803
|
+
{
|
|
804
|
+
var consequent_4 = ($$anchor) => {
|
|
805
|
+
var span_1 = root();
|
|
806
|
+
var node_14 = $.child(span_1);
|
|
807
|
+
|
|
808
|
+
renderMenuIcon(node_14, () => $.get(entry).action.icon);
|
|
809
|
+
$.reset(span_1);
|
|
810
|
+
$.append($$anchor, span_1);
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
$.if(node_13, ($$render) => {
|
|
814
|
+
if ($.get(entry).action.icon) $$render(consequent_4);
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
var span_2 = $.sibling(node_13, 2);
|
|
819
|
+
var text = $.child(span_2, true);
|
|
820
|
+
|
|
821
|
+
$.reset(span_2);
|
|
822
|
+
$.template_effect(() => $.set_text(text, $.get(entry).action.label));
|
|
823
|
+
$.append($$anchor, fragment_15);
|
|
824
|
+
},
|
|
825
|
+
$$slots: { default: true }
|
|
826
|
+
});
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
$.append($$anchor, fragment_14);
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
$.append($$anchor, fragment_13);
|
|
728
834
|
},
|
|
729
835
|
$$slots: { default: true }
|
|
730
836
|
});
|
|
731
|
-
}
|
|
732
|
-
|
|
837
|
+
});
|
|
838
|
+
|
|
839
|
+
$.append($$anchor, fragment_12);
|
|
840
|
+
},
|
|
841
|
+
$$slots: { label: true, default: true }
|
|
842
|
+
}));
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
$.append($$anchor, fragment_10);
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
var alternate_2 = ($$anchor) => {
|
|
850
|
+
{
|
|
851
|
+
let $0 = $.derived(() => $.get(resolvedMoreMeasureButtonProps).scaleOnHover ?? false);
|
|
733
852
|
|
|
734
|
-
|
|
853
|
+
Button($$anchor, $.spread_props(() => $.get(resolvedMoreMeasureButtonProps), {
|
|
854
|
+
get scaleOnHover() {
|
|
855
|
+
return $.get($0);
|
|
856
|
+
},
|
|
857
|
+
iconOnly: true,
|
|
858
|
+
get 'aria-label'() {
|
|
859
|
+
return $.get(resolvedMoreLabel);
|
|
860
|
+
},
|
|
861
|
+
'aria-haspopup': 'listbox',
|
|
862
|
+
'aria-expanded': 'false',
|
|
863
|
+
tooltip: false,
|
|
864
|
+
get disabled() {
|
|
865
|
+
return disabled();
|
|
866
|
+
},
|
|
867
|
+
|
|
868
|
+
onclick: () => {
|
|
869
|
+
pendingMoreOpen = true;
|
|
870
|
+
},
|
|
871
|
+
|
|
872
|
+
children: ($$anchor, $$slotProps) => {
|
|
873
|
+
ComponentIcon($$anchor, { name: 'three-dots', 'aria-hidden': 'true' });
|
|
735
874
|
},
|
|
736
875
|
$$slots: { default: true }
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
|
|
876
|
+
}));
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
$.if(node_8, ($$render) => {
|
|
881
|
+
if ($.get(OverflowMenuParts)) $$render(consequent_5); else $$render(alternate_2, -1);
|
|
882
|
+
});
|
|
741
883
|
}
|
|
742
884
|
|
|
743
885
|
$.reset(span);
|
|
886
|
+
$.bind_this(span, ($$value) => $.set(moreVisualElement, $$value), () => $.get(moreVisualElement));
|
|
744
887
|
$.append($$anchor, span);
|
|
745
888
|
};
|
|
746
889
|
|
|
747
890
|
$.if(node_7, ($$render) => {
|
|
748
|
-
if ($.get(hasOverflow)) $$render(
|
|
891
|
+
if ($.get(hasOverflow)) $$render(consequent_6);
|
|
749
892
|
});
|
|
750
893
|
}
|
|
751
894
|
|
|
752
|
-
var
|
|
895
|
+
var node_15 = $.sibling(node_7, 2);
|
|
753
896
|
|
|
754
|
-
|
|
897
|
+
{
|
|
898
|
+
var consequent_7 = ($$anchor) => {
|
|
899
|
+
var fragment_18 = root_3();
|
|
900
|
+
var span_3 = $.first_child(fragment_18);
|
|
755
901
|
|
|
756
|
-
|
|
757
|
-
var span_5 = $.child(span_4);
|
|
758
|
-
var node_12 = $.child(span_5);
|
|
902
|
+
$.bind_this(span_3, ($$value) => $.set(fadeMeasureElement, $$value), () => $.get(fadeMeasureElement));
|
|
759
903
|
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
904
|
+
var span_4 = $.sibling(span_3, 2);
|
|
905
|
+
var span_5 = $.child(span_4);
|
|
906
|
+
var node_16 = $.child(span_5);
|
|
907
|
+
|
|
908
|
+
{
|
|
909
|
+
let $0 = $.derived(() => $.get(resolvedMoreMeasureButtonProps).scaleOnHover ?? false);
|
|
910
|
+
|
|
911
|
+
Button(node_16, $.spread_props(() => $.get(resolvedMoreMeasureButtonProps), {
|
|
912
|
+
get scaleOnHover() {
|
|
913
|
+
return $.get($0);
|
|
914
|
+
},
|
|
915
|
+
iconOnly: true,
|
|
916
|
+
get 'aria-label'() {
|
|
917
|
+
return $.get(resolvedMoreLabel);
|
|
918
|
+
},
|
|
919
|
+
tooltip: false,
|
|
920
|
+
tabindex: -1,
|
|
921
|
+
children: ($$anchor, $$slotProps) => {
|
|
922
|
+
ComponentIcon($$anchor, { name: 'three-dots', 'aria-hidden': 'true' });
|
|
923
|
+
},
|
|
924
|
+
$$slots: { default: true }
|
|
925
|
+
}));
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
$.reset(span_5);
|
|
929
|
+
$.bind_this(span_5, ($$value) => $.set(moreMeasureElement, $$value), () => $.get(moreMeasureElement));
|
|
930
|
+
$.reset(span_4);
|
|
931
|
+
$.append($$anchor, fragment_18);
|
|
763
932
|
};
|
|
764
933
|
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
iconOnly: true,
|
|
769
|
-
showIndicator: false,
|
|
770
|
-
selectionMode: 'action',
|
|
771
|
-
get ariaLabel() {
|
|
772
|
-
return $.get(resolvedMoreLabel);
|
|
773
|
-
},
|
|
774
|
-
tooltip: false,
|
|
775
|
-
tabindex: -1,
|
|
776
|
-
get parts() {
|
|
777
|
-
return $.get($0);
|
|
778
|
-
},
|
|
779
|
-
label,
|
|
780
|
-
$$slots: { label: true }
|
|
781
|
-
}));
|
|
934
|
+
$.if(node_15, ($$render) => {
|
|
935
|
+
if ($.get(isMounted)) $$render(consequent_7);
|
|
936
|
+
});
|
|
782
937
|
}
|
|
783
938
|
|
|
784
|
-
$.reset(span_5);
|
|
785
|
-
$.bind_this(span_5, ($$value) => $.set(moreMeasureElement, $$value), () => $.get(moreMeasureElement));
|
|
786
|
-
$.reset(span_4);
|
|
787
939
|
$.append($$anchor, fragment_4);
|
|
788
940
|
},
|
|
789
941
|
$$slots: { default: true }
|
|
@@ -786,7 +786,9 @@ export default function SidePanel($$anchor, $$props) {
|
|
|
786
786
|
|
|
787
787
|
function place(nextEnabled) {
|
|
788
788
|
if (nextEnabled) {
|
|
789
|
-
document.body
|
|
789
|
+
const container = marker.parentElement?.closest("[data-snowui-overlay-root]") ?? document.body;
|
|
790
|
+
|
|
791
|
+
container.appendChild(node);
|
|
790
792
|
|
|
791
793
|
return;
|
|
792
794
|
}
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export type SkeletonVariant = "line" | "circle" | "rect" | "text" | "circular" | "rectangular";
|
|
3
|
-
export interface SkeletonItem {
|
|
4
|
-
shape: "line" | "circle" | "rect";
|
|
5
|
-
width?: string;
|
|
6
|
-
height?: string;
|
|
7
|
-
radius?: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface SkeletonLayout {
|
|
11
|
-
key: string;
|
|
12
|
-
known: boolean;
|
|
13
|
-
items: SkeletonItem[];
|
|
14
|
-
}
|
|
15
|
-
export declare function getSkeletonComponentKey(componentClass?: string): string | undefined;
|
|
16
|
-
export declare function resolveSkeletonLayout(options?: {
|
|
17
|
-
componentClass?: string;
|
|
18
|
-
renderHints?: RenderHints;
|
|
19
|
-
variant?: SkeletonVariant;
|
|
20
|
-
width?: string | number;
|
|
21
|
-
height?: string | number;
|
|
22
|
-
}): SkeletonLayout;
|
|
1
|
+
export { getSkeletonComponentKey, resolveSkeletonLayout, type SkeletonItem, type SkeletonLayout, type SkeletonVariant, } from "../logic/skeleton-layouts";
|
|
23
2
|
import type { Snippet } from "svelte";
|
|
24
3
|
import type { RenderHints as FrameRenderHints } from "../logic/frame-types";
|
|
25
4
|
import { type ResponsiveConfig } from "../logic/responsive.js";
|
|
5
|
+
import { type SkeletonVariant } from "../logic/skeleton-layouts";
|
|
26
6
|
interface Props {
|
|
27
7
|
variant?: SkeletonVariant;
|
|
28
8
|
width?: string | number;
|