@k2b/ui 0.4.0 → 0.4.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/browser/inputs/NumberInput.js +9 -1
- package/dist/browser/inputs/NumberInput.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +261 -245
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/inputs/NumberInput.js +9 -1
- package/dist/ssr/inputs/NumberInput.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +71 -59
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/inputs/NumberInput.d.ts +2 -0
- package/package.json +2 -2
|
@@ -22,37 +22,38 @@ var _tmpl$ = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspac
|
|
|
22
22
|
_tmpl$4 = /*#__PURE__*/_$template(`<section>`),
|
|
23
23
|
_tmpl$5 = /*#__PURE__*/_$template(`<aside>`),
|
|
24
24
|
_tmpl$6 = /*#__PURE__*/_$template(`<aside><div class=k2b-app-workspace__sidebar-desktop>`),
|
|
25
|
-
_tmpl$7 = /*#__PURE__*/_$template(`<
|
|
26
|
-
_tmpl$8 = /*#__PURE__*/_$template(`<
|
|
27
|
-
_tmpl$9 = /*#__PURE__*/_$template(`<span
|
|
28
|
-
_tmpl$0 = /*#__PURE__*/_$template(`<
|
|
29
|
-
_tmpl$1 = /*#__PURE__*/_$template(`<
|
|
30
|
-
_tmpl$10 = /*#__PURE__*/_$template(`<
|
|
31
|
-
_tmpl$11 = /*#__PURE__*/_$template(`<
|
|
32
|
-
_tmpl$12 = /*#__PURE__*/_$template(`<
|
|
33
|
-
_tmpl$13 = /*#__PURE__*/_$template(`<
|
|
34
|
-
_tmpl$14 = /*#__PURE__*/_$template(`<
|
|
35
|
-
_tmpl$15 = /*#__PURE__*/_$template(`<
|
|
36
|
-
_tmpl$16 = /*#__PURE__*/_$template(`<
|
|
37
|
-
_tmpl$17 = /*#__PURE__*/_$template(`<
|
|
38
|
-
_tmpl$18 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
39
|
-
_tmpl$19 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context
|
|
40
|
-
_tmpl$20 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
41
|
-
_tmpl$21 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
42
|
-
_tmpl$22 = /*#__PURE__*/_$template(`<
|
|
43
|
-
_tmpl$23 = /*#__PURE__*/_$template(`<
|
|
44
|
-
_tmpl$24 = /*#__PURE__*/_$template(`<
|
|
45
|
-
_tmpl$25 = /*#__PURE__*/_$template(`<
|
|
46
|
-
_tmpl$26 = /*#__PURE__*/_$template(`<
|
|
47
|
-
_tmpl$27 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-
|
|
48
|
-
_tmpl$28 = /*#__PURE__*/_$template(`<span>`),
|
|
49
|
-
_tmpl$29 = /*#__PURE__*/_$template(`<span
|
|
50
|
-
_tmpl$30 = /*#__PURE__*/_$template(`<
|
|
51
|
-
_tmpl$31 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-
|
|
52
|
-
_tmpl$32 = /*#__PURE__*/_$template(`<div role=
|
|
53
|
-
_tmpl$33 = /*#__PURE__*/_$template(`<
|
|
54
|
-
_tmpl$34 = /*#__PURE__*/_$template(`<
|
|
55
|
-
_tmpl$35 = /*#__PURE__*/_$template(`<
|
|
25
|
+
_tmpl$7 = /*#__PURE__*/_$template(`<script>`),
|
|
26
|
+
_tmpl$8 = /*#__PURE__*/_$template(`<footer>`),
|
|
27
|
+
_tmpl$9 = /*#__PURE__*/_$template(`<span aria-hidden=true><i>`),
|
|
28
|
+
_tmpl$0 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-section-count>`),
|
|
29
|
+
_tmpl$1 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-section-toggle><!$><!/><i aria-hidden=true>`),
|
|
30
|
+
_tmpl$10 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-section-actions>`),
|
|
31
|
+
_tmpl$11 = /*#__PURE__*/_$template(`<header class=k2b-app-workspace__sidebar-section-header><!$><!/><!$><!/>`),
|
|
32
|
+
_tmpl$12 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-section-content>`),
|
|
33
|
+
_tmpl$13 = /*#__PURE__*/_$template(`<h2>`),
|
|
34
|
+
_tmpl$14 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__sidebar-item-actions>`),
|
|
35
|
+
_tmpl$15 = /*#__PURE__*/_$template(`<button type=button>`),
|
|
36
|
+
_tmpl$16 = /*#__PURE__*/_$template(`<a>`),
|
|
37
|
+
_tmpl$17 = /*#__PURE__*/_$template(`<div><!$><!/><!$><!/>`),
|
|
38
|
+
_tmpl$18 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon aria-hidden=true>`),
|
|
39
|
+
_tmpl$19 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context-meta>`),
|
|
40
|
+
_tmpl$20 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-context><span class=k2b-app-workspace__sidebar-item-context-label></span><!$><!/>`),
|
|
41
|
+
_tmpl$21 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-description>`),
|
|
42
|
+
_tmpl$22 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-copy><!$><!/><span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text></span></span><!$><!/>`),
|
|
43
|
+
_tmpl$23 = /*#__PURE__*/_$template(`<i>`),
|
|
44
|
+
_tmpl$24 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-meta>`),
|
|
45
|
+
_tmpl$25 = /*#__PURE__*/_$template(`<a class=k2b-app-workspace__sidebar-item-action>`),
|
|
46
|
+
_tmpl$26 = /*#__PURE__*/_$template(`<button type=button class=k2b-app-workspace__sidebar-item-action>`),
|
|
47
|
+
_tmpl$27 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-icon aria-hidden=true><i>`),
|
|
48
|
+
_tmpl$28 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__sidebar-item-label><span class=k2b-app-workspace__sidebar-item-label-text>`),
|
|
49
|
+
_tmpl$29 = /*#__PURE__*/_$template(`<span>`),
|
|
50
|
+
_tmpl$30 = /*#__PURE__*/_$template(`<span class=k2b-app-workspace__nav-tree-toggle data-k2b-nav-tree-toggle aria-hidden=true><i>`),
|
|
51
|
+
_tmpl$31 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-group role=group>`),
|
|
52
|
+
_tmpl$32 = /*#__PURE__*/_$template(`<div class=k2b-app-workspace__nav-tree-node role=treeitem><!$><!/><!$><!/>`),
|
|
53
|
+
_tmpl$33 = /*#__PURE__*/_$template(`<div role=tree>`),
|
|
54
|
+
_tmpl$34 = /*#__PURE__*/_$template(`<section><!$><!/><div class=k2b-app-workspace__sidebar-icon-grid>`),
|
|
55
|
+
_tmpl$35 = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
|
|
56
|
+
_tmpl$36 = /*#__PURE__*/_$template(`<div data-k2b-app-workspace>`);
|
|
56
57
|
import { Link } from "@k2b/ssr/nav";
|
|
57
58
|
import { children, createContext, createMemo, createSignal, createUniqueId, For, mergeProps, onCleanup, onMount, Show, useContext } from "solid-js";
|
|
58
59
|
import { useUiMessages } from "../intl/messages";
|
|
@@ -563,10 +564,21 @@ const AppWorkspaceSidebarDesktop = props => ({
|
|
|
563
564
|
kind: SIDEBAR_DESKTOP,
|
|
564
565
|
children: props.children
|
|
565
566
|
});
|
|
567
|
+
// Document navigations rebuild the sidebar from the server, so this inline
|
|
568
|
+
// script restores its offset while the document is still parsing: before the
|
|
569
|
+
// first paint, before a view transition can snapshot it, and before any island
|
|
570
|
+
// hydrates. Islands load asynchronously and server-only sidebars never mount,
|
|
571
|
+
// so `onMount` would be too late or never run. The memory is one
|
|
572
|
+
// `sessionStorage` entry per path segment and sidebar position and ends with
|
|
573
|
+
// the tab. A stored offset is applied first; the current item is then kept in
|
|
574
|
+
// view, which is a no-op when the offset already shows it. The frame callback
|
|
575
|
+
// repeats the restore once the whole document is parsed, because content that
|
|
576
|
+
// follows the sidebar can still change its height before the first paint.
|
|
577
|
+
const SIDEBAR_SCROLL_MEMORY_SCRIPT = ["(function(){", "var body=document.currentScript&&document.currentScript.previousElementSibling;if(!body)return;", "var storage;try{storage=window.sessionStorage}catch(_){return}", 'var key="k2b-sidebar-scroll:"+location.pathname.split("/")[1]+":"+document.querySelectorAll(".k2b-app-workspace__sidebar-body").length;', "var restore=function(){", "var stored=storage.getItem(key);if(stored!==null)body.scrollTop=Number(stored);", 'var current=body.querySelector(\'[aria-current="page"]\');if(current)current.scrollIntoView({block:"nearest"});', "};", "restore();requestAnimationFrame(restore);", "var frame=0;", 'body.addEventListener("scroll",function(){if(frame)return;frame=requestAnimationFrame(function(){frame=0;try{storage.setItem(key,String(body.scrollTop))}catch(_){}})},{passive:true});', "})();"].join("");
|
|
566
578
|
const AppWorkspaceSidebarBody = props => {
|
|
567
579
|
let body;
|
|
568
580
|
createScrollFade(() => body, () => props.scrollFade !== false);
|
|
569
|
-
return (() => {
|
|
581
|
+
return [(() => {
|
|
570
582
|
var _el$9 = _$getNextElement(_tmpl$2);
|
|
571
583
|
var _ref$ = body;
|
|
572
584
|
typeof _ref$ === "function" ? _$use(_ref$, _el$9) : body = _el$9;
|
|
@@ -581,18 +593,22 @@ const AppWorkspaceSidebarBody = props => {
|
|
|
581
593
|
_$insert(_el$9, () => props.children);
|
|
582
594
|
_$runHydrationEvents();
|
|
583
595
|
return _el$9;
|
|
584
|
-
})()
|
|
596
|
+
})(), (() => {
|
|
597
|
+
var _el$0 = _$getNextElement(_tmpl$7);
|
|
598
|
+
_$setProperty(_el$0, "innerHTML", SIDEBAR_SCROLL_MEMORY_SCRIPT);
|
|
599
|
+
return _el$0;
|
|
600
|
+
})()];
|
|
585
601
|
};
|
|
586
602
|
const AppWorkspaceSidebarFooter = props => (() => {
|
|
587
|
-
var _el$
|
|
588
|
-
_$spread(_el$
|
|
603
|
+
var _el$1 = _$getNextElement(_tmpl$8);
|
|
604
|
+
_$spread(_el$1, _$mergeProps({
|
|
589
605
|
get ["class"]() {
|
|
590
606
|
return `k2b-app-workspace__sidebar-footer ${props.class ?? ""}`;
|
|
591
607
|
}
|
|
592
608
|
}, () => modeAttrs(props.sidebarMode)), false, true);
|
|
593
|
-
_$insert(_el$
|
|
609
|
+
_$insert(_el$1, () => props.children);
|
|
594
610
|
_$runHydrationEvents();
|
|
595
|
-
return _el$
|
|
611
|
+
return _el$1;
|
|
596
612
|
})();
|
|
597
613
|
const AppWorkspaceSidebarSection = props => {
|
|
598
614
|
const [expanded, setExpanded] = createSignal(props.defaultOpen ?? true);
|
|
@@ -603,27 +619,27 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
603
619
|
return props.icon;
|
|
604
620
|
},
|
|
605
621
|
get children() {
|
|
606
|
-
var _el$
|
|
607
|
-
_el$
|
|
608
|
-
_$effect(() => _$className(_el$
|
|
609
|
-
return _el$
|
|
622
|
+
var _el$10 = _$getNextElement(_tmpl$9),
|
|
623
|
+
_el$11 = _el$10.firstChild;
|
|
624
|
+
_$effect(() => _$className(_el$11, iconClass(props.icon)));
|
|
625
|
+
return _el$10;
|
|
610
626
|
}
|
|
611
627
|
}), _$memo(() => props.title), _$createComponent(Show, {
|
|
612
628
|
get when() {
|
|
613
629
|
return props.count !== undefined;
|
|
614
630
|
},
|
|
615
631
|
get children() {
|
|
616
|
-
var _el$
|
|
617
|
-
_$insert(_el$
|
|
618
|
-
return _el$
|
|
632
|
+
var _el$12 = _$getNextElement(_tmpl$0);
|
|
633
|
+
_$insert(_el$12, () => props.count);
|
|
634
|
+
return _el$12;
|
|
619
635
|
}
|
|
620
636
|
})];
|
|
621
637
|
return (() => {
|
|
622
|
-
var _el$
|
|
623
|
-
_el$
|
|
624
|
-
[_el$
|
|
625
|
-
_el$
|
|
626
|
-
_$spread(_el$
|
|
638
|
+
var _el$13 = _$getNextElement(_tmpl$12),
|
|
639
|
+
_el$25 = _el$13.firstChild,
|
|
640
|
+
[_el$26, _co$4] = _$getNextMarker(_el$25.nextSibling),
|
|
641
|
+
_el$24 = _el$26.nextSibling;
|
|
642
|
+
_$spread(_el$13, _$mergeProps({
|
|
627
643
|
get ["class"]() {
|
|
628
644
|
return `k2b-app-workspace__sidebar-section ${props.class ?? ""}`;
|
|
629
645
|
},
|
|
@@ -631,17 +647,17 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
631
647
|
return props.collapsible ? "true" : undefined;
|
|
632
648
|
}
|
|
633
649
|
}, () => modeAttrs(props.sidebarMode)), false, true);
|
|
634
|
-
_$insert(_el$
|
|
650
|
+
_$insert(_el$13, _$createComponent(Show, {
|
|
635
651
|
get when() {
|
|
636
652
|
return props.title || props.actions;
|
|
637
653
|
},
|
|
638
654
|
get children() {
|
|
639
|
-
var _el$
|
|
640
|
-
_el$
|
|
641
|
-
[_el$
|
|
642
|
-
_el$
|
|
643
|
-
[_el$
|
|
644
|
-
_$insert(_el$
|
|
655
|
+
var _el$14 = _$getNextElement(_tmpl$11),
|
|
656
|
+
_el$20 = _el$14.firstChild,
|
|
657
|
+
[_el$21, _co$2] = _$getNextMarker(_el$20.nextSibling),
|
|
658
|
+
_el$22 = _el$21.nextSibling,
|
|
659
|
+
[_el$23, _co$3] = _$getNextMarker(_el$22.nextSibling);
|
|
660
|
+
_$insert(_el$14, _$createComponent(Show, {
|
|
645
661
|
get when() {
|
|
646
662
|
return props.collapsible;
|
|
647
663
|
},
|
|
@@ -651,56 +667,56 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
651
667
|
return props.title;
|
|
652
668
|
},
|
|
653
669
|
get children() {
|
|
654
|
-
var _el$
|
|
655
|
-
_$insert(_el$
|
|
656
|
-
return _el$
|
|
670
|
+
var _el$27 = _$getNextElement(_tmpl$13);
|
|
671
|
+
_$insert(_el$27, title);
|
|
672
|
+
return _el$27;
|
|
657
673
|
}
|
|
658
674
|
});
|
|
659
675
|
},
|
|
660
676
|
get children() {
|
|
661
|
-
var _el$
|
|
662
|
-
_el$
|
|
663
|
-
[_el$
|
|
664
|
-
_el$
|
|
665
|
-
_el$
|
|
677
|
+
var _el$15 = _$getNextElement(_tmpl$1),
|
|
678
|
+
_el$17 = _el$15.firstChild,
|
|
679
|
+
[_el$18, _co$] = _$getNextMarker(_el$17.nextSibling),
|
|
680
|
+
_el$16 = _el$18.nextSibling;
|
|
681
|
+
_el$15.$$click = () => {
|
|
666
682
|
const next = !open();
|
|
667
683
|
setExpanded(next);
|
|
668
684
|
props.onOpenChange?.(next);
|
|
669
685
|
};
|
|
670
|
-
_$setAttribute(_el$
|
|
671
|
-
_$insert(_el$
|
|
686
|
+
_$setAttribute(_el$15, "aria-controls", id);
|
|
687
|
+
_$insert(_el$15, title, _el$18, _co$);
|
|
672
688
|
_$effect(_p$ => {
|
|
673
689
|
var _v$43 = open(),
|
|
674
690
|
_v$44 = open() ? "ti ti-chevron-down" : "ti ti-chevron-right";
|
|
675
|
-
_v$43 !== _p$.e && _$setAttribute(_el$
|
|
676
|
-
_v$44 !== _p$.t && _$className(_el$
|
|
691
|
+
_v$43 !== _p$.e && _$setAttribute(_el$15, "aria-expanded", _p$.e = _v$43);
|
|
692
|
+
_v$44 !== _p$.t && _$className(_el$16, _p$.t = _v$44);
|
|
677
693
|
return _p$;
|
|
678
694
|
}, {
|
|
679
695
|
e: undefined,
|
|
680
696
|
t: undefined
|
|
681
697
|
});
|
|
682
698
|
_$runHydrationEvents();
|
|
683
|
-
return _el$
|
|
699
|
+
return _el$15;
|
|
684
700
|
}
|
|
685
|
-
}), _el$
|
|
686
|
-
_$insert(_el$
|
|
701
|
+
}), _el$21, _co$2);
|
|
702
|
+
_$insert(_el$14, _$createComponent(Show, {
|
|
687
703
|
get when() {
|
|
688
704
|
return props.actions;
|
|
689
705
|
},
|
|
690
706
|
get children() {
|
|
691
|
-
var _el$
|
|
692
|
-
_$insert(_el$
|
|
693
|
-
return _el$
|
|
707
|
+
var _el$19 = _$getNextElement(_tmpl$10);
|
|
708
|
+
_$insert(_el$19, () => props.actions);
|
|
709
|
+
return _el$19;
|
|
694
710
|
}
|
|
695
|
-
}), _el$
|
|
696
|
-
return _el$
|
|
711
|
+
}), _el$23, _co$3);
|
|
712
|
+
return _el$14;
|
|
697
713
|
}
|
|
698
|
-
}), _el$
|
|
699
|
-
_$setAttribute(_el$
|
|
700
|
-
_$insert(_el$
|
|
701
|
-
_$effect(() => _$setProperty(_el$
|
|
714
|
+
}), _el$26, _co$4);
|
|
715
|
+
_$setAttribute(_el$24, "id", id);
|
|
716
|
+
_$insert(_el$24, () => props.children);
|
|
717
|
+
_$effect(() => _$setProperty(_el$24, "hidden", !open()));
|
|
702
718
|
_$runHydrationEvents();
|
|
703
|
-
return _el$
|
|
719
|
+
return _el$13;
|
|
704
720
|
})();
|
|
705
721
|
};
|
|
706
722
|
const AppWorkspaceSidebarItemIcon = props => mergeProps({
|
|
@@ -716,10 +732,10 @@ const AppWorkspaceSidebarItemAction = props => mergeProps({
|
|
|
716
732
|
kind: SIDEBAR_ITEM_ACTION
|
|
717
733
|
}, props);
|
|
718
734
|
const AppWorkspaceSidebarItemActions = props => (() => {
|
|
719
|
-
var _el$
|
|
720
|
-
_$insert(_el$
|
|
721
|
-
_$effect(() => _$setAttribute(_el$
|
|
722
|
-
return _el$
|
|
735
|
+
var _el$28 = _$getNextElement(_tmpl$14);
|
|
736
|
+
_$insert(_el$28, () => props.children);
|
|
737
|
+
_$effect(() => _$setAttribute(_el$28, "data-visibility", props.visibility === "hover" ? "hover" : undefined));
|
|
738
|
+
return _el$28;
|
|
723
739
|
})();
|
|
724
740
|
/** Shared visual and semantic row frame for flat sidebar items and tree items. */
|
|
725
741
|
function AppWorkspaceSidebarRow(props) {
|
|
@@ -746,8 +762,8 @@ function AppWorkspaceSidebarRow(props) {
|
|
|
746
762
|
},
|
|
747
763
|
get fallback() {
|
|
748
764
|
return (() => {
|
|
749
|
-
var _el$
|
|
750
|
-
_$spread(_el$
|
|
765
|
+
var _el$29 = _$getNextElement(_tmpl$15);
|
|
766
|
+
_$spread(_el$29, _$mergeProps(attrs, {
|
|
751
767
|
get tabIndex() {
|
|
752
768
|
return props.tabIndex;
|
|
753
769
|
},
|
|
@@ -758,9 +774,9 @@ function AppWorkspaceSidebarRow(props) {
|
|
|
758
774
|
return props.onClick;
|
|
759
775
|
}
|
|
760
776
|
}), false, true);
|
|
761
|
-
_$insert(_el$
|
|
777
|
+
_$insert(_el$29, () => props.children);
|
|
762
778
|
_$runHydrationEvents();
|
|
763
|
-
return _el$
|
|
779
|
+
return _el$29;
|
|
764
780
|
})();
|
|
765
781
|
},
|
|
766
782
|
get children() {
|
|
@@ -770,8 +786,8 @@ function AppWorkspaceSidebarRow(props) {
|
|
|
770
786
|
},
|
|
771
787
|
get fallback() {
|
|
772
788
|
return (() => {
|
|
773
|
-
var _el$
|
|
774
|
-
_$spread(_el$
|
|
789
|
+
var _el$30 = _$getNextElement(_tmpl$16);
|
|
790
|
+
_$spread(_el$30, _$mergeProps({
|
|
775
791
|
get href() {
|
|
776
792
|
return props.href;
|
|
777
793
|
}
|
|
@@ -786,9 +802,9 @@ function AppWorkspaceSidebarRow(props) {
|
|
|
786
802
|
return props.onClick;
|
|
787
803
|
}
|
|
788
804
|
}), false, true);
|
|
789
|
-
_$insert(_el$
|
|
805
|
+
_$insert(_el$30, () => props.children);
|
|
790
806
|
_$runHydrationEvents();
|
|
791
|
-
return _el$
|
|
807
|
+
return _el$30;
|
|
792
808
|
})();
|
|
793
809
|
},
|
|
794
810
|
get children() {
|
|
@@ -834,22 +850,22 @@ function AppWorkspaceSidebarRow(props) {
|
|
|
834
850
|
});
|
|
835
851
|
},
|
|
836
852
|
get children() {
|
|
837
|
-
var _el$
|
|
838
|
-
_el$
|
|
839
|
-
[_el$
|
|
840
|
-
_el$
|
|
841
|
-
[_el$
|
|
842
|
-
_$spread(_el$
|
|
853
|
+
var _el$31 = _$getNextElement(_tmpl$17),
|
|
854
|
+
_el$32 = _el$31.firstChild,
|
|
855
|
+
[_el$33, _co$5] = _$getNextMarker(_el$32.nextSibling),
|
|
856
|
+
_el$34 = _el$33.nextSibling,
|
|
857
|
+
[_el$35, _co$6] = _$getNextMarker(_el$34.nextSibling);
|
|
858
|
+
_$spread(_el$31, _$mergeProps(common, {
|
|
843
859
|
get ["data-disabled"]() {
|
|
844
860
|
return props.disabled ? "true" : undefined;
|
|
845
861
|
}
|
|
846
862
|
}), false, true);
|
|
847
|
-
_$insert(_el$
|
|
863
|
+
_$insert(_el$31, _$createComponent(Control, {
|
|
848
864
|
grouped: true
|
|
849
|
-
}), _el$
|
|
850
|
-
_$insert(_el$
|
|
865
|
+
}), _el$33, _co$5);
|
|
866
|
+
_$insert(_el$31, () => props.actions, _el$35, _co$6);
|
|
851
867
|
_$runHydrationEvents();
|
|
852
|
-
return _el$
|
|
868
|
+
return _el$31;
|
|
853
869
|
}
|
|
854
870
|
});
|
|
855
871
|
}
|
|
@@ -877,67 +893,67 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
877
893
|
return iconContent() || icon();
|
|
878
894
|
},
|
|
879
895
|
get children() {
|
|
880
|
-
var _el$
|
|
881
|
-
_$insert(_el$
|
|
882
|
-
var _el$
|
|
883
|
-
_$effect(() => _$className(_el$
|
|
884
|
-
return _el$
|
|
896
|
+
var _el$36 = _$getNextElement(_tmpl$18);
|
|
897
|
+
_$insert(_el$36, () => iconContent() ?? (() => {
|
|
898
|
+
var _el$50 = _$getNextElement(_tmpl$23);
|
|
899
|
+
_$effect(() => _$className(_el$50, iconClass(icon())));
|
|
900
|
+
return _el$50;
|
|
885
901
|
})());
|
|
886
|
-
return _el$
|
|
902
|
+
return _el$36;
|
|
887
903
|
}
|
|
888
904
|
}), (() => {
|
|
889
|
-
var _el$
|
|
890
|
-
_el$
|
|
891
|
-
[_el$
|
|
892
|
-
_el$
|
|
893
|
-
_el$
|
|
894
|
-
_el$
|
|
895
|
-
[_el$
|
|
896
|
-
_$insert(_el$
|
|
905
|
+
var _el$37 = _$getNextElement(_tmpl$22),
|
|
906
|
+
_el$46 = _el$37.firstChild,
|
|
907
|
+
[_el$47, _co$8] = _$getNextMarker(_el$46.nextSibling),
|
|
908
|
+
_el$43 = _el$47.nextSibling,
|
|
909
|
+
_el$44 = _el$43.firstChild,
|
|
910
|
+
_el$48 = _el$43.nextSibling,
|
|
911
|
+
[_el$49, _co$9] = _$getNextMarker(_el$48.nextSibling);
|
|
912
|
+
_$insert(_el$37, _$createComponent(Show, {
|
|
897
913
|
get when() {
|
|
898
914
|
return props.context || props.contextMeta;
|
|
899
915
|
},
|
|
900
916
|
get children() {
|
|
901
|
-
var _el$
|
|
902
|
-
_el$
|
|
903
|
-
_el$
|
|
904
|
-
[_el$
|
|
905
|
-
_$insert(_el$
|
|
906
|
-
_$insert(_el$
|
|
917
|
+
var _el$38 = _$getNextElement(_tmpl$20),
|
|
918
|
+
_el$39 = _el$38.firstChild,
|
|
919
|
+
_el$41 = _el$39.nextSibling,
|
|
920
|
+
[_el$42, _co$7] = _$getNextMarker(_el$41.nextSibling);
|
|
921
|
+
_$insert(_el$39, () => props.context);
|
|
922
|
+
_$insert(_el$38, _$createComponent(Show, {
|
|
907
923
|
get when() {
|
|
908
924
|
return props.contextMeta;
|
|
909
925
|
},
|
|
910
926
|
get children() {
|
|
911
|
-
var _el$
|
|
912
|
-
_$insert(_el$
|
|
913
|
-
return _el$
|
|
927
|
+
var _el$40 = _$getNextElement(_tmpl$19);
|
|
928
|
+
_$insert(_el$40, () => props.contextMeta);
|
|
929
|
+
return _el$40;
|
|
914
930
|
}
|
|
915
|
-
}), _el$
|
|
916
|
-
return _el$
|
|
931
|
+
}), _el$42, _co$7);
|
|
932
|
+
return _el$38;
|
|
917
933
|
}
|
|
918
|
-
}), _el$
|
|
919
|
-
_$insert(_el$
|
|
920
|
-
_$insert(_el$
|
|
934
|
+
}), _el$47, _co$8);
|
|
935
|
+
_$insert(_el$44, () => label());
|
|
936
|
+
_$insert(_el$37, _$createComponent(Show, {
|
|
921
937
|
get when() {
|
|
922
938
|
return props.description;
|
|
923
939
|
},
|
|
924
940
|
get children() {
|
|
925
|
-
var _el$
|
|
926
|
-
_$insert(_el$
|
|
927
|
-
return _el$
|
|
941
|
+
var _el$45 = _$getNextElement(_tmpl$21);
|
|
942
|
+
_$insert(_el$45, () => props.description);
|
|
943
|
+
return _el$45;
|
|
928
944
|
}
|
|
929
|
-
}), _el$
|
|
930
|
-
_$effect(() => _$setAttribute(_el$
|
|
931
|
-
return _el$
|
|
945
|
+
}), _el$49, _co$9);
|
|
946
|
+
_$effect(() => _$setAttribute(_el$43, "data-marquee", labelSlot()?.marquee ?? props.variant !== "card" ? "true" : "false"));
|
|
947
|
+
return _el$37;
|
|
932
948
|
})(), _$createComponent(Show, {
|
|
933
949
|
get when() {
|
|
934
950
|
return meta();
|
|
935
951
|
},
|
|
936
952
|
children: value => (() => {
|
|
937
|
-
var _el$
|
|
938
|
-
_$insert(_el$
|
|
939
|
-
_$effect(() => _$setAttribute(_el$
|
|
940
|
-
return _el$
|
|
953
|
+
var _el$51 = _$getNextElement(_tmpl$24);
|
|
954
|
+
_$insert(_el$51, value);
|
|
955
|
+
_$effect(() => _$setAttribute(_el$51, "data-visibility", metaVisibility() === "hover" ? "hover" : undefined));
|
|
956
|
+
return _el$51;
|
|
941
957
|
})()
|
|
942
958
|
})];
|
|
943
959
|
const singleAction = () => {
|
|
@@ -953,9 +969,9 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
953
969
|
props.onActionClick?.(event);
|
|
954
970
|
};
|
|
955
971
|
const content = () => actionSlot()?.children ?? (() => {
|
|
956
|
-
var _el$
|
|
957
|
-
_$effect(() => _$className(_el$
|
|
958
|
-
return _el$
|
|
972
|
+
var _el$52 = _$getNextElement(_tmpl$23);
|
|
973
|
+
_$effect(() => _$className(_el$52, iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots")));
|
|
974
|
+
return _el$52;
|
|
959
975
|
})();
|
|
960
976
|
return _$createComponent(Show, {
|
|
961
977
|
get when() {
|
|
@@ -968,16 +984,16 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
968
984
|
},
|
|
969
985
|
get fallback() {
|
|
970
986
|
return (() => {
|
|
971
|
-
var _el$
|
|
972
|
-
_el$
|
|
973
|
-
_$insert(_el$
|
|
987
|
+
var _el$54 = _$getNextElement(_tmpl$26);
|
|
988
|
+
_el$54.$$click = select;
|
|
989
|
+
_$insert(_el$54, content);
|
|
974
990
|
_$effect(_p$ => {
|
|
975
991
|
var _v$48 = actionSlot()?.disabled,
|
|
976
992
|
_v$49 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
|
|
977
993
|
_v$50 = label();
|
|
978
|
-
_v$48 !== _p$.e && _$setProperty(_el$
|
|
979
|
-
_v$49 !== _p$.t && _$setAttribute(_el$
|
|
980
|
-
_v$50 !== _p$.a && _$setAttribute(_el$
|
|
994
|
+
_v$48 !== _p$.e && _$setProperty(_el$54, "disabled", _p$.e = _v$48);
|
|
995
|
+
_v$49 !== _p$.t && _$setAttribute(_el$54, "data-visibility", _p$.t = _v$49);
|
|
996
|
+
_v$50 !== _p$.a && _$setAttribute(_el$54, "aria-label", _p$.a = _v$50);
|
|
981
997
|
return _p$;
|
|
982
998
|
}, {
|
|
983
999
|
e: undefined,
|
|
@@ -985,20 +1001,20 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
985
1001
|
a: undefined
|
|
986
1002
|
});
|
|
987
1003
|
_$runHydrationEvents();
|
|
988
|
-
return _el$
|
|
1004
|
+
return _el$54;
|
|
989
1005
|
})();
|
|
990
1006
|
},
|
|
991
1007
|
get children() {
|
|
992
|
-
var _el$
|
|
993
|
-
_el$
|
|
994
|
-
_$insert(_el$
|
|
1008
|
+
var _el$53 = _$getNextElement(_tmpl$25);
|
|
1009
|
+
_el$53.$$click = select;
|
|
1010
|
+
_$insert(_el$53, content);
|
|
995
1011
|
_$effect(_p$ => {
|
|
996
1012
|
var _v$45 = actionSlot()?.href,
|
|
997
1013
|
_v$46 = actionSlot()?.visibility === "hover" ? "hover" : undefined,
|
|
998
1014
|
_v$47 = label();
|
|
999
|
-
_v$45 !== _p$.e && _$setAttribute(_el$
|
|
1000
|
-
_v$46 !== _p$.t && _$setAttribute(_el$
|
|
1001
|
-
_v$47 !== _p$.a && _$setAttribute(_el$
|
|
1015
|
+
_v$45 !== _p$.e && _$setAttribute(_el$53, "href", _p$.e = _v$45);
|
|
1016
|
+
_v$46 !== _p$.t && _$setAttribute(_el$53, "data-visibility", _p$.t = _v$46);
|
|
1017
|
+
_v$47 !== _p$.a && _$setAttribute(_el$53, "aria-label", _p$.a = _v$47);
|
|
1002
1018
|
return _p$;
|
|
1003
1019
|
}, {
|
|
1004
1020
|
e: undefined,
|
|
@@ -1006,7 +1022,7 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
1006
1022
|
a: undefined
|
|
1007
1023
|
});
|
|
1008
1024
|
_$runHydrationEvents();
|
|
1009
|
-
return _el$
|
|
1025
|
+
return _el$53;
|
|
1010
1026
|
}
|
|
1011
1027
|
});
|
|
1012
1028
|
}
|
|
@@ -1242,53 +1258,53 @@ const AppWorkspaceNavTree = props => {
|
|
|
1242
1258
|
return rowIcon();
|
|
1243
1259
|
},
|
|
1244
1260
|
get children() {
|
|
1245
|
-
var _el$
|
|
1246
|
-
_el$
|
|
1261
|
+
var _el$55 = _$getNextElement(_tmpl$27),
|
|
1262
|
+
_el$56 = _el$55.firstChild;
|
|
1247
1263
|
_$effect(_p$ => {
|
|
1248
1264
|
var _v$51 = usesIconDisclosure() ? "" : undefined,
|
|
1249
1265
|
_v$52 = iconClass(rowIcon());
|
|
1250
|
-
_v$51 !== _p$.e && _$setAttribute(_el$
|
|
1251
|
-
_v$52 !== _p$.t && _$className(_el$
|
|
1266
|
+
_v$51 !== _p$.e && _$setAttribute(_el$55, "data-k2b-nav-tree-toggle", _p$.e = _v$51);
|
|
1267
|
+
_v$52 !== _p$.t && _$className(_el$56, _p$.t = _v$52);
|
|
1252
1268
|
return _p$;
|
|
1253
1269
|
}, {
|
|
1254
1270
|
e: undefined,
|
|
1255
1271
|
t: undefined
|
|
1256
1272
|
});
|
|
1257
|
-
return _el$
|
|
1273
|
+
return _el$55;
|
|
1258
1274
|
}
|
|
1259
1275
|
}), (() => {
|
|
1260
|
-
var _el$
|
|
1261
|
-
_el$
|
|
1262
|
-
_$insert(_el$
|
|
1263
|
-
return _el$
|
|
1276
|
+
var _el$57 = _$getNextElement(_tmpl$28),
|
|
1277
|
+
_el$58 = _el$57.firstChild;
|
|
1278
|
+
_$insert(_el$58, () => item.label);
|
|
1279
|
+
return _el$57;
|
|
1264
1280
|
})(), _$createComponent(Show, {
|
|
1265
1281
|
get when() {
|
|
1266
1282
|
return item.meta !== undefined;
|
|
1267
1283
|
},
|
|
1268
1284
|
get children() {
|
|
1269
|
-
var _el$
|
|
1270
|
-
_$insert(_el$
|
|
1285
|
+
var _el$59 = _$getNextElement(_tmpl$29);
|
|
1286
|
+
_$insert(_el$59, () => item.meta);
|
|
1271
1287
|
_$effect(_p$ => {
|
|
1272
1288
|
var _v$53 = `k2b-app-workspace__sidebar-item-meta ${hasChildren() ? "" : "k2b-app-workspace__nav-tree-leaf-meta"}`,
|
|
1273
1289
|
_v$54 = item.metaVisibility === "hover" ? "hover" : undefined;
|
|
1274
|
-
_v$53 !== _p$.e && _$className(_el$
|
|
1275
|
-
_v$54 !== _p$.t && _$setAttribute(_el$
|
|
1290
|
+
_v$53 !== _p$.e && _$className(_el$59, _p$.e = _v$53);
|
|
1291
|
+
_v$54 !== _p$.t && _$setAttribute(_el$59, "data-visibility", _p$.t = _v$54);
|
|
1276
1292
|
return _p$;
|
|
1277
1293
|
}, {
|
|
1278
1294
|
e: undefined,
|
|
1279
1295
|
t: undefined
|
|
1280
1296
|
});
|
|
1281
|
-
return _el$
|
|
1297
|
+
return _el$59;
|
|
1282
1298
|
}
|
|
1283
1299
|
}), _$createComponent(Show, {
|
|
1284
1300
|
get when() {
|
|
1285
1301
|
return _$memo(() => !!hasChildren())() && !usesIconDisclosure();
|
|
1286
1302
|
},
|
|
1287
1303
|
get children() {
|
|
1288
|
-
var _el$
|
|
1289
|
-
_el$
|
|
1290
|
-
_$effect(() => _$className(_el$
|
|
1291
|
-
return _el$
|
|
1304
|
+
var _el$60 = _$getNextElement(_tmpl$30),
|
|
1305
|
+
_el$61 = _el$60.firstChild;
|
|
1306
|
+
_$effect(() => _$className(_el$61, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`));
|
|
1307
|
+
return _el$60;
|
|
1292
1308
|
}
|
|
1293
1309
|
})];
|
|
1294
1310
|
const row = () => _$createComponent(AppWorkspaceSidebarRow, {
|
|
@@ -1344,43 +1360,43 @@ const AppWorkspaceNavTree = props => {
|
|
|
1344
1360
|
children: rowContent
|
|
1345
1361
|
});
|
|
1346
1362
|
return (() => {
|
|
1347
|
-
var _el$
|
|
1348
|
-
_el$
|
|
1349
|
-
[_el$
|
|
1350
|
-
_el$
|
|
1351
|
-
[_el$
|
|
1352
|
-
_$addEventListener(_el$
|
|
1353
|
-
_$addEventListener(_el$
|
|
1354
|
-
_$addEventListener(_el$
|
|
1355
|
-
_$addEventListener(_el$
|
|
1356
|
-
_el$
|
|
1357
|
-
_el$
|
|
1363
|
+
var _el$62 = _$getNextElement(_tmpl$32),
|
|
1364
|
+
_el$64 = _el$62.firstChild,
|
|
1365
|
+
[_el$65, _co$0] = _$getNextMarker(_el$64.nextSibling),
|
|
1366
|
+
_el$66 = _el$65.nextSibling,
|
|
1367
|
+
[_el$67, _co$1] = _$getNextMarker(_el$66.nextSibling);
|
|
1368
|
+
_$addEventListener(_el$62, "drop", item.onDrop);
|
|
1369
|
+
_$addEventListener(_el$62, "dragleave", item.onDragLeave);
|
|
1370
|
+
_$addEventListener(_el$62, "dragover", item.onDragOver);
|
|
1371
|
+
_$addEventListener(_el$62, "dragenter", item.onDragEnter);
|
|
1372
|
+
_el$62.$$keydown = onKeyDown;
|
|
1373
|
+
_el$62.addEventListener("focus", () => setFocusedId(item.id));
|
|
1358
1374
|
var _ref$2 = treeItem;
|
|
1359
|
-
typeof _ref$2 === "function" ? _$use(_ref$2, _el$
|
|
1360
|
-
_$setAttribute(_el$
|
|
1361
|
-
_$setAttribute(_el$
|
|
1362
|
-
_$insert(_el$
|
|
1363
|
-
_$insert(_el$
|
|
1375
|
+
typeof _ref$2 === "function" ? _$use(_ref$2, _el$62) : treeItem = _el$62;
|
|
1376
|
+
_$setAttribute(_el$62, "aria-level", depth + 1);
|
|
1377
|
+
_$setAttribute(_el$62, "data-k2b-nav-tree-parent-id", parentId);
|
|
1378
|
+
_$insert(_el$62, row, _el$65, _co$0);
|
|
1379
|
+
_$insert(_el$62, _$createComponent(Show, {
|
|
1364
1380
|
get when() {
|
|
1365
1381
|
return _$memo(() => !!hasChildren())() && isExpanded(item.id);
|
|
1366
1382
|
},
|
|
1367
1383
|
get children() {
|
|
1368
|
-
var _el$
|
|
1369
|
-
_$insert(_el$
|
|
1370
|
-
return _el$
|
|
1384
|
+
var _el$63 = _$getNextElement(_tmpl$31);
|
|
1385
|
+
_$insert(_el$63, () => renderItems(nested, depth + 1, item.id));
|
|
1386
|
+
return _el$63;
|
|
1371
1387
|
}
|
|
1372
|
-
}), _el$
|
|
1388
|
+
}), _el$67, _co$1);
|
|
1373
1389
|
_$effect(_p$ => {
|
|
1374
1390
|
var _v$55 = selected(),
|
|
1375
1391
|
_v$56 = hasChildren() ? isExpanded(item.id) : undefined,
|
|
1376
1392
|
_v$57 = item.disabled ? "true" : undefined,
|
|
1377
1393
|
_v$58 = item.disabled ? -1 : tabStopId() === item.id ? 0 : -1,
|
|
1378
1394
|
_v$59 = item.id;
|
|
1379
|
-
_v$55 !== _p$.e && _$setAttribute(_el$
|
|
1380
|
-
_v$56 !== _p$.t && _$setAttribute(_el$
|
|
1381
|
-
_v$57 !== _p$.a && _$setAttribute(_el$
|
|
1382
|
-
_v$58 !== _p$.o && _$setAttribute(_el$
|
|
1383
|
-
_v$59 !== _p$.i && _$setAttribute(_el$
|
|
1395
|
+
_v$55 !== _p$.e && _$setAttribute(_el$62, "aria-selected", _p$.e = _v$55);
|
|
1396
|
+
_v$56 !== _p$.t && _$setAttribute(_el$62, "aria-expanded", _p$.t = _v$56);
|
|
1397
|
+
_v$57 !== _p$.a && _$setAttribute(_el$62, "aria-disabled", _p$.a = _v$57);
|
|
1398
|
+
_v$58 !== _p$.o && _$setAttribute(_el$62, "tabindex", _p$.o = _v$58);
|
|
1399
|
+
_v$59 !== _p$.i && _$setAttribute(_el$62, "data-k2b-nav-tree-id", _p$.i = _v$59);
|
|
1384
1400
|
return _p$;
|
|
1385
1401
|
}, {
|
|
1386
1402
|
e: undefined,
|
|
@@ -1390,59 +1406,59 @@ const AppWorkspaceNavTree = props => {
|
|
|
1390
1406
|
i: undefined
|
|
1391
1407
|
});
|
|
1392
1408
|
_$runHydrationEvents();
|
|
1393
|
-
return _el$
|
|
1409
|
+
return _el$62;
|
|
1394
1410
|
})();
|
|
1395
1411
|
}
|
|
1396
1412
|
});
|
|
1397
1413
|
return (() => {
|
|
1398
|
-
var _el$
|
|
1414
|
+
var _el$68 = _$getNextElement(_tmpl$33);
|
|
1399
1415
|
var _ref$3 = root;
|
|
1400
|
-
typeof _ref$3 === "function" ? _$use(_ref$3, _el$
|
|
1401
|
-
_$insert(_el$
|
|
1416
|
+
typeof _ref$3 === "function" ? _$use(_ref$3, _el$68) : root = _el$68;
|
|
1417
|
+
_$insert(_el$68, () => renderItems(roots, 0));
|
|
1402
1418
|
_$effect(_p$ => {
|
|
1403
1419
|
var _v$60 = `k2b-app-workspace__nav-tree ${props.class ?? ""}`,
|
|
1404
1420
|
_v$61 = props.ariaLabel;
|
|
1405
|
-
_v$60 !== _p$.e && _$className(_el$
|
|
1406
|
-
_v$61 !== _p$.t && _$setAttribute(_el$
|
|
1421
|
+
_v$60 !== _p$.e && _$className(_el$68, _p$.e = _v$60);
|
|
1422
|
+
_v$61 !== _p$.t && _$setAttribute(_el$68, "aria-label", _p$.t = _v$61);
|
|
1407
1423
|
return _p$;
|
|
1408
1424
|
}, {
|
|
1409
1425
|
e: undefined,
|
|
1410
1426
|
t: undefined
|
|
1411
1427
|
});
|
|
1412
|
-
return _el$
|
|
1428
|
+
return _el$68;
|
|
1413
1429
|
})();
|
|
1414
1430
|
};
|
|
1415
1431
|
AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
|
|
1416
1432
|
const AppWorkspaceSidebarIconGrid = props => (() => {
|
|
1417
|
-
var _el$
|
|
1418
|
-
_el$
|
|
1419
|
-
[_el$
|
|
1420
|
-
_el$
|
|
1421
|
-
_$spread(_el$
|
|
1433
|
+
var _el$69 = _$getNextElement(_tmpl$34),
|
|
1434
|
+
_el$71 = _el$69.firstChild,
|
|
1435
|
+
[_el$72, _co$10] = _$getNextMarker(_el$71.nextSibling),
|
|
1436
|
+
_el$70 = _el$72.nextSibling;
|
|
1437
|
+
_$spread(_el$69, _$mergeProps({
|
|
1422
1438
|
get ["class"]() {
|
|
1423
1439
|
return `k2b-app-workspace__sidebar-icon-grid-wrap ${props.class ?? ""}`;
|
|
1424
1440
|
}
|
|
1425
1441
|
}, () => modeAttrs(props.sidebarMode)), false, true);
|
|
1426
|
-
_$insert(_el$
|
|
1442
|
+
_$insert(_el$69, _$createComponent(Show, {
|
|
1427
1443
|
get when() {
|
|
1428
1444
|
return props.title;
|
|
1429
1445
|
},
|
|
1430
1446
|
children: title => (() => {
|
|
1431
|
-
var _el$
|
|
1432
|
-
_$insert(_el$
|
|
1433
|
-
return _el$
|
|
1447
|
+
var _el$73 = _$getNextElement(_tmpl$13);
|
|
1448
|
+
_$insert(_el$73, title);
|
|
1449
|
+
return _el$73;
|
|
1434
1450
|
})()
|
|
1435
|
-
}), _el$
|
|
1436
|
-
_$insert(_el$
|
|
1437
|
-
_$effect(() => _$setAttribute(_el$
|
|
1451
|
+
}), _el$72, _co$10);
|
|
1452
|
+
_$insert(_el$70, () => props.children);
|
|
1453
|
+
_$effect(() => _$setAttribute(_el$70, "data-columns", props.columns ?? 2));
|
|
1438
1454
|
_$runHydrationEvents();
|
|
1439
|
-
return _el$
|
|
1455
|
+
return _el$69;
|
|
1440
1456
|
})();
|
|
1441
1457
|
const AppWorkspaceSidebarIconAction = props => {
|
|
1442
1458
|
const content = (() => {
|
|
1443
|
-
var _el$
|
|
1444
|
-
_$effect(() => _$className(_el$
|
|
1445
|
-
return _el$
|
|
1459
|
+
var _el$74 = _$getNextElement(_tmpl$35);
|
|
1460
|
+
_$effect(() => _$className(_el$74, iconClass(props.icon)));
|
|
1461
|
+
return _el$74;
|
|
1446
1462
|
})();
|
|
1447
1463
|
const attrs = () => ({
|
|
1448
1464
|
class: `k2b-app-workspace__sidebar-icon-action ${props.active ? "is-active" : ""}`,
|
|
@@ -1455,8 +1471,8 @@ const AppWorkspaceSidebarIconAction = props => {
|
|
|
1455
1471
|
...modeAttrs(props.sidebarMode)
|
|
1456
1472
|
});
|
|
1457
1473
|
if (!props.href || props.disabled) return (() => {
|
|
1458
|
-
var _el$
|
|
1459
|
-
_$spread(_el$
|
|
1474
|
+
var _el$75 = _$getNextElement(_tmpl$15);
|
|
1475
|
+
_$spread(_el$75, _$mergeProps(attrs, {
|
|
1460
1476
|
get disabled() {
|
|
1461
1477
|
return props.disabled;
|
|
1462
1478
|
},
|
|
@@ -1464,13 +1480,13 @@ const AppWorkspaceSidebarIconAction = props => {
|
|
|
1464
1480
|
return props.onClick;
|
|
1465
1481
|
}
|
|
1466
1482
|
}), false, true);
|
|
1467
|
-
_$insert(_el$
|
|
1483
|
+
_$insert(_el$75, content);
|
|
1468
1484
|
_$runHydrationEvents();
|
|
1469
|
-
return _el$
|
|
1485
|
+
return _el$75;
|
|
1470
1486
|
})();
|
|
1471
1487
|
if (props.navigation !== "enhanced" || !props.onNavigate) return (() => {
|
|
1472
|
-
var _el$
|
|
1473
|
-
_$spread(_el$
|
|
1488
|
+
var _el$76 = _$getNextElement(_tmpl$16);
|
|
1489
|
+
_$spread(_el$76, _$mergeProps({
|
|
1474
1490
|
get href() {
|
|
1475
1491
|
return props.href;
|
|
1476
1492
|
}
|
|
@@ -1479,9 +1495,9 @@ const AppWorkspaceSidebarIconAction = props => {
|
|
|
1479
1495
|
return props.onClick;
|
|
1480
1496
|
}
|
|
1481
1497
|
}), false, true);
|
|
1482
|
-
_$insert(_el$
|
|
1498
|
+
_$insert(_el$76, content);
|
|
1483
1499
|
_$runHydrationEvents();
|
|
1484
|
-
return _el$
|
|
1500
|
+
return _el$76;
|
|
1485
1501
|
})();
|
|
1486
1502
|
return _$createComponent(Link, _$mergeProps({
|
|
1487
1503
|
get href() {
|
|
@@ -1526,21 +1542,21 @@ const AppWorkspace = props => {
|
|
|
1526
1542
|
return props.resizable !== false;
|
|
1527
1543
|
},
|
|
1528
1544
|
get children() {
|
|
1529
|
-
var _el$
|
|
1545
|
+
var _el$77 = _$getNextElement(_tmpl$36);
|
|
1530
1546
|
var _ref$4 = root;
|
|
1531
|
-
typeof _ref$4 === "function" ? _$use(_ref$4, _el$
|
|
1532
|
-
_$insert(_el$
|
|
1547
|
+
typeof _ref$4 === "function" ? _$use(_ref$4, _el$77) : root = _el$77;
|
|
1548
|
+
_$insert(_el$77, () => props.children);
|
|
1533
1549
|
_$effect(_p$ => {
|
|
1534
1550
|
var _v$62 = `k2b-app-workspace ${props.class ?? ""}`,
|
|
1535
1551
|
_v$63 = props.mobileSurface,
|
|
1536
1552
|
_v$64 = initialLayoutState()?.sidebarCollapsed === undefined ? undefined : String(initialLayoutState()?.sidebarCollapsed),
|
|
1537
1553
|
_v$65 = props.resizable === false ? "false" : "true",
|
|
1538
1554
|
_v$66 = appWorkspaceLayoutStyle(initialLayoutState());
|
|
1539
|
-
_v$62 !== _p$.e && _$className(_el$
|
|
1540
|
-
_v$63 !== _p$.t && _$setAttribute(_el$
|
|
1541
|
-
_v$64 !== _p$.a && _$setAttribute(_el$
|
|
1542
|
-
_v$65 !== _p$.o && _$setAttribute(_el$
|
|
1543
|
-
_p$.i = _$style(_el$
|
|
1555
|
+
_v$62 !== _p$.e && _$className(_el$77, _p$.e = _v$62);
|
|
1556
|
+
_v$63 !== _p$.t && _$setAttribute(_el$77, "data-mobile-surface", _p$.t = _v$63);
|
|
1557
|
+
_v$64 !== _p$.a && _$setAttribute(_el$77, "data-sidebar-collapsed", _p$.a = _v$64);
|
|
1558
|
+
_v$65 !== _p$.o && _$setAttribute(_el$77, "data-workspace-resizable", _p$.o = _v$65);
|
|
1559
|
+
_p$.i = _$style(_el$77, _v$66, _p$.i);
|
|
1544
1560
|
return _p$;
|
|
1545
1561
|
}, {
|
|
1546
1562
|
e: undefined,
|
|
@@ -1549,7 +1565,7 @@ const AppWorkspace = props => {
|
|
|
1549
1565
|
o: undefined,
|
|
1550
1566
|
i: undefined
|
|
1551
1567
|
});
|
|
1552
|
-
return _el$
|
|
1568
|
+
return _el$77;
|
|
1553
1569
|
}
|
|
1554
1570
|
});
|
|
1555
1571
|
};
|
|
@@ -1562,10 +1578,10 @@ AppWorkspace.LayoutStateProvider = props => _$createComponent(LayoutStateContext
|
|
|
1562
1578
|
}
|
|
1563
1579
|
});
|
|
1564
1580
|
AppWorkspace.Content = props => (() => {
|
|
1565
|
-
var _el$
|
|
1566
|
-
_$insert(_el$
|
|
1567
|
-
_$effect(() => _$className(_el$
|
|
1568
|
-
return _el$
|
|
1581
|
+
var _el$78 = _$getNextElement(_tmpl$2);
|
|
1582
|
+
_$insert(_el$78, () => props.children);
|
|
1583
|
+
_$effect(() => _$className(_el$78, `k2b-app-workspace__content ${props.class ?? ""}`));
|
|
1584
|
+
return _el$78;
|
|
1569
1585
|
})();
|
|
1570
1586
|
AppWorkspace.Main = AppWorkspaceMain;
|
|
1571
1587
|
AppWorkspace.MainPane = AppWorkspaceMainPane;
|