@k2b/ui 0.24.0 → 0.25.0
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/README.md +2 -2
- package/dist/browser/actions/Dropdown.js +67 -52
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +3 -3
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/SpotlightSearch.js +13 -6
- package/dist/browser/actions/SpotlightSearch.js.map +1 -1
- package/dist/browser/actions/Toolbar.js +75 -1
- package/dist/browser/actions/Toolbar.js.map +1 -1
- package/dist/browser/content/Calendar.js +1538 -911
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarDayView.js +1 -1
- package/dist/browser/content/CalendarDayView.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +1 -1
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/Kbd.js +51 -0
- package/dist/browser/content/Kbd.js.map +1 -0
- package/dist/browser/content/LabelChip.js +38 -0
- package/dist/browser/content/LabelChip.js.map +1 -0
- package/dist/browser/content/MarkdownView.js +2 -1
- package/dist/browser/content/MarkdownView.js.map +1 -1
- package/dist/browser/content/Steps.js +34 -0
- package/dist/browser/content/Steps.js.map +1 -0
- package/dist/browser/content/VirtualFeed.js +33 -1
- package/dist/browser/content/VirtualFeed.js.map +1 -1
- package/dist/browser/content/calendar-dialogs.js +32 -60
- package/dist/browser/content/calendar-dialogs.js.map +1 -1
- package/dist/browser/content/calendar-month-scroll.js +80 -0
- package/dist/browser/content/calendar-month-scroll.js.map +1 -0
- package/dist/browser/content/index.js +4 -1
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/content/markdown-info-blocks.js +33 -5
- package/dist/browser/content/markdown-info-blocks.js.map +1 -1
- package/dist/browser/feedback/prompts.js +17 -3
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/intl/index.js +1 -0
- package/dist/browser/intl/index.js.map +1 -1
- package/dist/browser/intl/shortcut-messages.js +77 -0
- package/dist/browser/intl/shortcut-messages.js.map +1 -0
- package/dist/browser/intl/shortcut.js +123 -0
- package/dist/browser/intl/shortcut.js.map +1 -0
- package/dist/browser/layout/AppWorkspace.js +343 -325
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/TableOfContents.js +115 -0
- package/dist/browser/layout/TableOfContents.js.map +1 -0
- package/dist/browser/layout/app-workspace-controller.js +3 -46
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/index.js +1 -0
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/table-of-contents-messages.js +19 -0
- package/dist/browser/layout/table-of-contents-messages.js.map +1 -0
- package/dist/browser/surfaces/LinkCard.js +40 -24
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/actions/Dropdown.js +11 -5
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +3 -3
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/SpotlightSearch.js +9 -3
- package/dist/ssr/actions/SpotlightSearch.js.map +1 -1
- package/dist/ssr/actions/Toolbar.js +67 -1
- package/dist/ssr/actions/Toolbar.js.map +1 -1
- package/dist/ssr/content/Calendar.js +863 -312
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarDayView.js +1 -1
- package/dist/ssr/content/CalendarDayView.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +1 -1
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/Kbd.js +38 -0
- package/dist/ssr/content/Kbd.js.map +1 -0
- package/dist/ssr/content/LabelChip.js +21 -0
- package/dist/ssr/content/LabelChip.js.map +1 -0
- package/dist/ssr/content/MarkdownView.js +2 -1
- package/dist/ssr/content/MarkdownView.js.map +1 -1
- package/dist/ssr/content/Steps.js +14 -0
- package/dist/ssr/content/Steps.js.map +1 -0
- package/dist/ssr/content/VirtualFeed.js +33 -1
- package/dist/ssr/content/VirtualFeed.js.map +1 -1
- package/dist/ssr/content/calendar-dialogs.js +12 -32
- package/dist/ssr/content/calendar-dialogs.js.map +1 -1
- package/dist/ssr/content/calendar-month-scroll.js +80 -0
- package/dist/ssr/content/calendar-month-scroll.js.map +1 -0
- package/dist/ssr/content/index.js +4 -1
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/content/markdown-info-blocks.js +33 -5
- package/dist/ssr/content/markdown-info-blocks.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +17 -3
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/intl/index.js +1 -0
- package/dist/ssr/intl/index.js.map +1 -1
- package/dist/ssr/intl/shortcut-messages.js +77 -0
- package/dist/ssr/intl/shortcut-messages.js.map +1 -0
- package/dist/ssr/intl/shortcut.js +123 -0
- package/dist/ssr/intl/shortcut.js.map +1 -0
- package/dist/ssr/layout/AppWorkspace.js +65 -59
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/TableOfContents.js +79 -0
- package/dist/ssr/layout/TableOfContents.js.map +1 -0
- package/dist/ssr/layout/app-workspace-controller.js +3 -46
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/index.js +1 -0
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/table-of-contents-messages.js +19 -0
- package/dist/ssr/layout/table-of-contents-messages.js.map +1 -0
- package/dist/ssr/surfaces/LinkCard.js +26 -10
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/Dropdown.d.ts +12 -0
- package/dist/types/actions/SpotlightSearch.d.ts +2 -0
- package/dist/types/content/Calendar.d.ts +16 -6
- package/dist/types/content/Kbd.d.ts +16 -0
- package/dist/types/content/LabelChip.d.ts +12 -0
- package/dist/types/content/MarkdownView.d.ts +2 -1
- package/dist/types/content/Steps.d.ts +12 -0
- package/dist/types/content/VirtualFeed.d.ts +8 -0
- package/dist/types/content/calendar-dialogs.d.ts +0 -2
- package/dist/types/content/calendar-month-scroll.d.ts +25 -0
- package/dist/types/content/index.d.ts +7 -1
- package/dist/types/content/markdown-info-blocks.d.ts +21 -4
- package/dist/types/feedback/prompts.d.ts +8 -2
- package/dist/types/intl/index.d.ts +2 -0
- package/dist/types/intl/shortcut-messages.d.ts +35 -0
- package/dist/types/intl/shortcut.d.ts +29 -0
- package/dist/types/layout/AppWorkspace.d.ts +3 -1
- package/dist/types/layout/TableOfContents.d.ts +24 -0
- package/dist/types/layout/index.d.ts +2 -0
- package/dist/types/layout/table-of-contents-messages.d.ts +4 -0
- package/dist/types/surfaces/LinkCard.d.ts +3 -0
- package/package.json +3 -3
|
@@ -27,31 +27,33 @@ var _tmpl$ = ["<button type=\"button\" class=\"k2b-app-workspace__resize\" role=
|
|
|
27
27
|
_tmpl$16 = "<span class=\"k2b-app-workspace__sidebar-status-mention\" aria-hidden=\"true\">@</span>",
|
|
28
28
|
_tmpl$17 = "<span class=\"k2b-app-workspace__sidebar-status-muted\" aria-hidden=\"true\"><i class=\"ti ti-bell-off\"></i></span>",
|
|
29
29
|
_tmpl$18 = ["<span class=\"k2b-app-workspace__sidebar-status-count\"", ">", "</span>"],
|
|
30
|
-
_tmpl$19 = ["<span class=\"k2b-app-workspace__sidebar-status
|
|
31
|
-
_tmpl$20 = "<span class=\"k2b-
|
|
32
|
-
_tmpl$21 = ["<span class=\"k2b-app-workspace__sidebar-
|
|
33
|
-
_tmpl$22 =
|
|
34
|
-
_tmpl$23 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
35
|
-
_tmpl$24 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
36
|
-
_tmpl$25 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
37
|
-
_tmpl$26 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
38
|
-
_tmpl$27 = ["<
|
|
39
|
-
_tmpl$28 = ["<
|
|
40
|
-
_tmpl$29 = ["<
|
|
41
|
-
_tmpl$30 = ["<
|
|
42
|
-
_tmpl$31 = ["<
|
|
43
|
-
_tmpl$32 = ["<span class=\"k2b-app-
|
|
44
|
-
_tmpl$33 = ["<span class=\"
|
|
45
|
-
_tmpl$34 = ["<
|
|
46
|
-
_tmpl$35 = ["<
|
|
47
|
-
_tmpl$36 = ["<div class=\"
|
|
48
|
-
_tmpl$37 = ["<div class=\"k2b-app-
|
|
49
|
-
_tmpl$38 = ["<
|
|
50
|
-
_tmpl$39 = "<
|
|
51
|
-
_tmpl$40 = ["<
|
|
52
|
-
_tmpl$41 =
|
|
53
|
-
_tmpl$42 = ["<div class=\"
|
|
54
|
-
_tmpl$43 = ["<
|
|
30
|
+
_tmpl$19 = ["<span class=\"k2b-app-workspace__sidebar-status-unread\" aria-hidden=\"true\">", "</span>"],
|
|
31
|
+
_tmpl$20 = ["<span class=\"k2b-sr-only\">, ", "</span>"],
|
|
32
|
+
_tmpl$21 = ["<span class=\"k2b-app-workspace__sidebar-status\"", ">", "</span>"],
|
|
33
|
+
_tmpl$22 = "<span class=\"k2b-app-workspace__sidebar-status-dot\"></span>",
|
|
34
|
+
_tmpl$23 = ["<span class=\"k2b-app-workspace__sidebar-item-icon\" aria-hidden=\"true\">", "</span>"],
|
|
35
|
+
_tmpl$24 = ["<span class=\"k2b-app-workspace__sidebar-item-context-meta\">", "</span>"],
|
|
36
|
+
_tmpl$25 = ["<span class=\"k2b-app-workspace__sidebar-item-context\"><span class=\"k2b-app-workspace__sidebar-item-context-label\">", "</span>", "</span>"],
|
|
37
|
+
_tmpl$26 = ["<span class=\"k2b-app-workspace__sidebar-item-description\">", "</span>"],
|
|
38
|
+
_tmpl$27 = ["<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>", "</span>"],
|
|
39
|
+
_tmpl$28 = ["<span class=\"k2b-app-workspace__sidebar-item-meta\"", ">", "</span>"],
|
|
40
|
+
_tmpl$29 = ["<i", "></i>"],
|
|
41
|
+
_tmpl$30 = ["<a", " class=\"k2b-app-workspace__sidebar-item-action\"", ">", "</a>"],
|
|
42
|
+
_tmpl$31 = ["<button type=\"button\" class=\"k2b-app-workspace__sidebar-item-action\"", ">", "</button>"],
|
|
43
|
+
_tmpl$32 = ["<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><span class=\"k2b-app-workspace__sidebar-item-description\">", "</span></span>"],
|
|
44
|
+
_tmpl$33 = ["<span class=\"", "\"", ">", "</span>"],
|
|
45
|
+
_tmpl$34 = ["<span class=\"k2b-app-workspace__nav-tree-toggle\" data-k2b-nav-tree-toggle aria-hidden=\"true\"><i class=\"", "\"></i></span>"],
|
|
46
|
+
_tmpl$35 = ["<span class=\"k2b-app-workspace__sidebar-item-label\"", "><span class=\"k2b-app-workspace__sidebar-item-label-text\">", "</span></span>"],
|
|
47
|
+
_tmpl$36 = ["<div class=\"k2b-app-workspace__nav-tree-group\" role=\"group\">", "</div>"],
|
|
48
|
+
_tmpl$37 = ["<div class=\"k2b-app-workspace__nav-tree-node\" role=\"treeitem\"", " style=\"", "\">", "", "</div>"],
|
|
49
|
+
_tmpl$38 = ["<div class=\"", "\" role=\"tree\"", ">", "</div>"],
|
|
50
|
+
_tmpl$39 = ["<div class=\"k2b-app-workspace__sidebar-icon-grid\"", ">", "</div>"],
|
|
51
|
+
_tmpl$40 = ["<i", " aria-hidden=\"true\"></i>"],
|
|
52
|
+
_tmpl$41 = "<i class=\"ti ti-layout-sidebar\" aria-hidden=\"true\"></i>",
|
|
53
|
+
_tmpl$42 = ["<div class=\"k2b-app-workspace__head\"", ">", "", "</div>"],
|
|
54
|
+
_tmpl$43 = ["<h1 class=\"k2b-app-workspace__head-heading\" data-k2b-page-trail-title", ">", "</h1>"],
|
|
55
|
+
_tmpl$44 = ["<div class=\"", "\" data-k2b-app-workspace", " style=\"", "\">", "", "</div>"],
|
|
56
|
+
_tmpl$45 = ["<div class=\"", "\">", "</div>"];
|
|
55
57
|
import { Link } from "@k2b/ssr/nav";
|
|
56
58
|
import { children, createContext, createEffect, createMemo, createSignal, createUniqueId, For, mergeProps, onCleanup, onMount, Show, useContext } from "solid-js";
|
|
57
59
|
import { isServer } from "solid-js/web";
|
|
@@ -567,26 +569,29 @@ const AppWorkspaceSidebarItemStatus = props => {
|
|
|
567
569
|
}) : dot() ? workspaceMessages().sidebarNewActivity : "", props.mention ? workspaceMessages().sidebarMentioned : "", props.muted ? workspaceMessages().sidebarMuted : ""].filter(Boolean).join(", ");
|
|
568
570
|
// The unread slot stays reserved at the end, and the marks that change most
|
|
569
571
|
// often sit outermost, so new activity or a mention never moves another mark.
|
|
570
|
-
|
|
572
|
+
// The element itself stays when there is nothing to show: empty, it takes no
|
|
573
|
+
// space, and it still keeps the row's label on one line, so the first count
|
|
574
|
+
// never re-wraps the label and moves the rows below.
|
|
575
|
+
return _$ssr(_tmpl$21, _$ssrAttribute("data-unread", waiting() !== null ? _$escape(undefined, true) : count() ? "count" : dot() ? "dot" : _$escape(undefined, true), false) + _$ssrAttribute("data-waiting", waiting() === null ? _$escape(undefined, true) : waiting() ? "count" : "zero", false), _$escape(_$createComponent(Show, {
|
|
571
576
|
get when() {
|
|
572
577
|
return description();
|
|
573
578
|
},
|
|
574
579
|
get children() {
|
|
575
|
-
return _$
|
|
580
|
+
return [_$createComponent(Show, {
|
|
576
581
|
get when() {
|
|
577
582
|
return props.mention;
|
|
578
583
|
},
|
|
579
584
|
get children() {
|
|
580
585
|
return _$ssr(_tmpl$16);
|
|
581
586
|
}
|
|
582
|
-
})
|
|
587
|
+
}), _$createComponent(Show, {
|
|
583
588
|
get when() {
|
|
584
589
|
return props.muted;
|
|
585
590
|
},
|
|
586
591
|
get children() {
|
|
587
592
|
return _$ssr(_tmpl$17);
|
|
588
593
|
}
|
|
589
|
-
})
|
|
594
|
+
}), _$ssr(_tmpl$19, _$escape(_$createComponent(Show, {
|
|
590
595
|
get when() {
|
|
591
596
|
return count() || waiting() === 0;
|
|
592
597
|
},
|
|
@@ -596,16 +601,16 @@ const AppWorkspaceSidebarItemStatus = props => {
|
|
|
596
601
|
return dot();
|
|
597
602
|
},
|
|
598
603
|
get children() {
|
|
599
|
-
return _$ssr(_tmpl$
|
|
604
|
+
return _$ssr(_tmpl$22);
|
|
600
605
|
}
|
|
601
606
|
});
|
|
602
607
|
},
|
|
603
608
|
get children() {
|
|
604
609
|
return _$ssr(_tmpl$18, _$ssrAttribute("data-mention", props.mention ? "true" : _$escape(undefined, true), false), count() > 99 ? "99+" : _$escape(count()));
|
|
605
610
|
}
|
|
606
|
-
})), _$escape(description()));
|
|
611
|
+
}))), _$ssr(_tmpl$20, _$escape(description()))];
|
|
607
612
|
}
|
|
608
|
-
});
|
|
613
|
+
})));
|
|
609
614
|
};
|
|
610
615
|
/** Shared visual and semantic row frame for flat sidebar items and tree items. */
|
|
611
616
|
function AppWorkspaceSidebarRow(props) {
|
|
@@ -726,10 +731,11 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
726
731
|
const actionSlot = createMemo(() => slots().find(slot => slot.kind === SIDEBAR_ITEM_ACTION));
|
|
727
732
|
const legacy = createMemo(() => values().filter(value => !sidebarItemSlot(value)));
|
|
728
733
|
const label = () => labelSlot()?.children ?? (legacy().length === 1 ? legacy()[0] : legacy());
|
|
734
|
+
const oneLine = () => !(labelSlot()?.marquee ?? (props.variant ?? "row") === "row");
|
|
729
735
|
const icon = () => iconSlot()?.icon ?? props.icon;
|
|
730
736
|
const iconContent = () => iconSlot()?.children;
|
|
731
|
-
// Resolved first, so
|
|
732
|
-
//
|
|
737
|
+
// Resolved first, so metadata that renders nothing leaves no empty slot. An
|
|
738
|
+
// empty status still renders its element; the stylesheet hides that slot.
|
|
733
739
|
const meta = children(() => metaSlot()?.children ?? props.meta);
|
|
734
740
|
const hasMeta = () => meta.toArray().some(Boolean);
|
|
735
741
|
const metaId = createUniqueId();
|
|
@@ -742,35 +748,35 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
742
748
|
return iconContent() || icon();
|
|
743
749
|
},
|
|
744
750
|
get children() {
|
|
745
|
-
return _$ssr(_tmpl$
|
|
751
|
+
return _$ssr(_tmpl$23, _$escape(iconContent() ?? _$ssr(_tmpl$29, _$ssrAttribute("class", _$escape(iconClass(icon()), true), false))));
|
|
746
752
|
}
|
|
747
|
-
}), _$ssr(_tmpl$
|
|
753
|
+
}), _$ssr(_tmpl$27, _$escape(_$createComponent(Show, {
|
|
748
754
|
get when() {
|
|
749
755
|
return props.context || props.contextMeta;
|
|
750
756
|
},
|
|
751
757
|
get children() {
|
|
752
|
-
return _$ssr(_tmpl$
|
|
758
|
+
return _$ssr(_tmpl$25, _$escape(props.context), _$escape(_$createComponent(Show, {
|
|
753
759
|
get when() {
|
|
754
760
|
return props.contextMeta;
|
|
755
761
|
},
|
|
756
762
|
get children() {
|
|
757
|
-
return _$ssr(_tmpl$
|
|
763
|
+
return _$ssr(_tmpl$24, _$escape(props.contextMeta));
|
|
758
764
|
}
|
|
759
765
|
})));
|
|
760
766
|
}
|
|
761
|
-
})), _$ssrAttribute("data-
|
|
767
|
+
})), _$ssrAttribute("data-lines", oneLine() ? "1" : _$escape(undefined, true), false) + _$ssrAttribute("data-label", !oneLine() && typeof label() === "string" ? _$escape(label(), true) : _$escape(undefined, true), false), _$escape(label()), _$escape(_$createComponent(Show, {
|
|
762
768
|
get when() {
|
|
763
769
|
return props.description;
|
|
764
770
|
},
|
|
765
771
|
get children() {
|
|
766
|
-
return _$ssr(_tmpl$
|
|
772
|
+
return _$ssr(_tmpl$26, _$escape(props.description));
|
|
767
773
|
}
|
|
768
774
|
}))), _$createComponent(Show, {
|
|
769
775
|
get when() {
|
|
770
776
|
return hasMeta();
|
|
771
777
|
},
|
|
772
778
|
get children() {
|
|
773
|
-
return _$ssr(_tmpl$
|
|
779
|
+
return _$ssr(_tmpl$28, _$ssrAttribute("id", props.preview?.trigger === "row" ? _$escape(metaId, true) : _$escape(undefined, true), false) + _$ssrAttribute("data-visibility", metaVisibility() === "hover" ? "hover" : _$escape(undefined, true), false), _$escape(meta()));
|
|
774
780
|
}
|
|
775
781
|
})];
|
|
776
782
|
const singleAction = () => {
|
|
@@ -785,7 +791,7 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
785
791
|
actionSlot()?.onSelect?.(event);
|
|
786
792
|
props.onActionClick?.(event);
|
|
787
793
|
};
|
|
788
|
-
const content = () => actionSlot()?.children ?? _$ssr(_tmpl$
|
|
794
|
+
const content = () => actionSlot()?.children ?? _$ssr(_tmpl$29, _$ssrAttribute("class", _$escape(iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots"), true), false));
|
|
789
795
|
return _$createComponent(Show, {
|
|
790
796
|
get when() {
|
|
791
797
|
return Boolean(actionSlot() || props.actionIcon);
|
|
@@ -796,10 +802,10 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
796
802
|
return _$memo(() => !!actionSlot()?.href)() && !actionSlot()?.disabled;
|
|
797
803
|
},
|
|
798
804
|
get fallback() {
|
|
799
|
-
return _$ssr(_tmpl$
|
|
805
|
+
return _$ssr(_tmpl$31, _$ssrAttribute("disabled", actionSlot()?.disabled, true) + _$ssrAttribute("data-visibility", actionSlot()?.visibility === "hover" ? "hover" : _$escape(undefined, true), false) + _$ssrAttribute("aria-label", _$escape(label(), true), false), _$escape(content()));
|
|
800
806
|
},
|
|
801
807
|
get children() {
|
|
802
|
-
return _$ssr(_tmpl$
|
|
808
|
+
return _$ssr(_tmpl$30, _$ssrAttribute("href", _$escape(actionSlot()?.href, true), false), _$ssrAttribute("data-visibility", actionSlot()?.visibility === "hover" ? "hover" : _$escape(undefined, true), false) + _$ssrAttribute("aria-label", _$escape(label(), true), false), _$escape(content()));
|
|
803
809
|
}
|
|
804
810
|
});
|
|
805
811
|
}
|
|
@@ -1105,31 +1111,31 @@ const AppWorkspaceNavTree = props => {
|
|
|
1105
1111
|
get ["data-k2b-nav-tree-toggle"]() {
|
|
1106
1112
|
return usesIconDisclosure() ? "" : undefined;
|
|
1107
1113
|
}
|
|
1108
|
-
}, () => iconAccessibility(item.iconLabel)), _$ssr(_tmpl$
|
|
1114
|
+
}, () => iconAccessibility(item.iconLabel)), _$ssr(_tmpl$29, _$ssrAttribute("class", _$escape(iconClass(rowIcon()), true), false)), false);
|
|
1109
1115
|
}
|
|
1110
1116
|
}), _$createComponent(Show, {
|
|
1111
1117
|
get when() {
|
|
1112
1118
|
return item.description !== undefined;
|
|
1113
1119
|
},
|
|
1114
1120
|
get fallback() {
|
|
1115
|
-
return _$ssr(_tmpl$
|
|
1121
|
+
return _$ssr(_tmpl$35, _$ssrAttribute("data-label", typeof item.label === "string" ? _$escape(item.label, true) : _$escape(undefined, true), false), _$escape(item.label));
|
|
1116
1122
|
},
|
|
1117
1123
|
get children() {
|
|
1118
|
-
return _$ssr(_tmpl$
|
|
1124
|
+
return _$ssr(_tmpl$32, _$ssrAttribute("data-label", typeof item.label === "string" ? _$escape(item.label, true) : _$escape(undefined, true), false), _$escape(item.label), _$escape(item.description));
|
|
1119
1125
|
}
|
|
1120
1126
|
}), _$createComponent(Show, {
|
|
1121
1127
|
get when() {
|
|
1122
1128
|
return item.meta !== undefined;
|
|
1123
1129
|
},
|
|
1124
1130
|
get children() {
|
|
1125
|
-
return _$ssr(_tmpl$
|
|
1131
|
+
return _$ssr(_tmpl$33, `k2b-app-workspace__sidebar-item-meta ${hasChildren() ? "" : "k2b-app-workspace__nav-tree-leaf-meta"}`, _$ssrAttribute("data-visibility", item.metaVisibility === "hover" ? "hover" : _$escape(undefined, true), false), _$escape(item.meta));
|
|
1126
1132
|
}
|
|
1127
1133
|
}), _$createComponent(Show, {
|
|
1128
1134
|
get when() {
|
|
1129
1135
|
return _$memo(() => !!hasChildren())() && !usesIconDisclosure();
|
|
1130
1136
|
},
|
|
1131
1137
|
get children() {
|
|
1132
|
-
return _$ssr(_tmpl$
|
|
1138
|
+
return _$ssr(_tmpl$34, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`);
|
|
1133
1139
|
}
|
|
1134
1140
|
})];
|
|
1135
1141
|
const row = () => _$createComponent(AppWorkspaceSidebarRow, {
|
|
@@ -1236,12 +1242,12 @@ const AppWorkspaceNavTree = props => {
|
|
|
1236
1242
|
endDrag();
|
|
1237
1243
|
requestMove(target.move, false);
|
|
1238
1244
|
};
|
|
1239
|
-
return _$ssr(_tmpl$
|
|
1245
|
+
return _$ssr(_tmpl$37, _$ssrAttribute("aria-level", _$escape(depth, true) + 1, false) + _$ssrAttribute("aria-setsize", _$escape(siblings().length, true), false) + _$ssrAttribute("aria-posinset", _$escape(place(), true) + 1, false) + _$ssrAttribute("aria-selected", _$escape(selected(), true), false) + _$ssrAttribute("aria-expanded", hasChildren() ? _$escape(isExpanded(item.id), true) : _$escape(undefined, true), false) + _$ssrAttribute("aria-disabled", item.disabled ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("tabindex", item.disabled ? -1 : tabStopId() === item.id ? 0 : -1, false) + _$ssrAttribute("draggable", movable() ? _$escape(true, true) : _$escape(undefined, true), false) + _$ssrAttribute("data-k2b-nav-tree-id", _$escape(item.id, true), false) + _$ssrAttribute("data-k2b-nav-tree-parent-id", _$escape(parentId, true), false) + _$ssrAttribute("data-k2b-nav-tree-dragging", dragged()?.id === item.id ? "" : _$escape(undefined, true), false) + _$ssrAttribute("data-k2b-nav-tree-drop", dropTarget()?.id === item.id ? _$escape(dropTarget().side, true) : _$escape(undefined, true), false), _$ssrStyleProperty("--k2b-nav-tree-depth:", _$escape(String(props.indented === false ? 0 : depth), true)), _$escape(row()), _$escape(_$createComponent(Show, {
|
|
1240
1246
|
get when() {
|
|
1241
1247
|
return _$memo(() => !!hasChildren())() && isExpanded(item.id);
|
|
1242
1248
|
},
|
|
1243
1249
|
get children() {
|
|
1244
|
-
return _$ssr(_tmpl$
|
|
1250
|
+
return _$ssr(_tmpl$36, _$escape(renderItems(nested, depth + 1, item.id)));
|
|
1245
1251
|
}
|
|
1246
1252
|
})));
|
|
1247
1253
|
}
|
|
@@ -1266,7 +1272,7 @@ const AppWorkspaceNavTree = props => {
|
|
|
1266
1272
|
doc?.removeEventListener("pointermove", forgetDrag, true);
|
|
1267
1273
|
});
|
|
1268
1274
|
});
|
|
1269
|
-
return _$ssr(_tmpl$
|
|
1275
|
+
return _$ssr(_tmpl$38, `k2b-app-workspace__nav-tree ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(renderItems(roots, 0)));
|
|
1270
1276
|
};
|
|
1271
1277
|
AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
|
|
1272
1278
|
const AppWorkspaceSidebarIconGrid = props => _$ssrElement("section", _$mergeProps({
|
|
@@ -1278,9 +1284,9 @@ const AppWorkspaceSidebarIconGrid = props => _$ssrElement("section", _$mergeProp
|
|
|
1278
1284
|
return props.title;
|
|
1279
1285
|
},
|
|
1280
1286
|
children: title => _$ssr(_tmpl$14, _$escape(title()))
|
|
1281
|
-
})), _$ssr(_tmpl$
|
|
1287
|
+
})), _$ssr(_tmpl$39, _$ssrAttribute("data-columns", _$escape(props.columns ?? 2, true), false), _$escape(props.children))], false);
|
|
1282
1288
|
const AppWorkspaceSidebarIconAction = props => {
|
|
1283
|
-
const content = _$ssr(_tmpl$
|
|
1289
|
+
const content = _$ssr(_tmpl$40, _$ssrAttribute("class", _$escape(iconClass(props.icon), true), false));
|
|
1284
1290
|
const attrs = () => ({
|
|
1285
1291
|
class: `k2b-app-workspace__sidebar-icon-action ${props.active ? "is-active" : ""}`,
|
|
1286
1292
|
title: props.label,
|
|
@@ -1338,7 +1344,7 @@ function AppWorkspaceHead(props) {
|
|
|
1338
1344
|
const messages = useWorkspaceMessages();
|
|
1339
1345
|
// A nested workspace is part of a page that already shows its title.
|
|
1340
1346
|
const trail = props.nested ? () => undefined : usePageTrail();
|
|
1341
|
-
return _$ssr(_tmpl$
|
|
1347
|
+
return _$ssr(_tmpl$42, _$ssrAttribute("data-trail", trail()?.ancestors.length ? "up" : trail() ? "title" : _$escape(undefined, true), false), _$escape(_$createComponent(IconButton, {
|
|
1342
1348
|
"class": "k2b-app-workspace__head-toggle",
|
|
1343
1349
|
get label() {
|
|
1344
1350
|
return messages().showNavigation;
|
|
@@ -1349,7 +1355,7 @@ function AppWorkspaceHead(props) {
|
|
|
1349
1355
|
"aria-expanded": "false",
|
|
1350
1356
|
"data-app-workspace-sidebar-toggle": "",
|
|
1351
1357
|
get children() {
|
|
1352
|
-
return _$ssr(_tmpl$
|
|
1358
|
+
return _$ssr(_tmpl$41);
|
|
1353
1359
|
}
|
|
1354
1360
|
})), _$escape(_$createComponent(Show, {
|
|
1355
1361
|
get when() {
|
|
@@ -1361,7 +1367,7 @@ function AppWorkspaceHead(props) {
|
|
|
1361
1367
|
},
|
|
1362
1368
|
as: "p",
|
|
1363
1369
|
fallback: true
|
|
1364
|
-
}), _$ssr(_tmpl$
|
|
1370
|
+
}), _$ssr(_tmpl$43, _$ssrAttribute("data-k2b-server", isServer ? "" : _$escape(undefined, true), false), _$escape(current().title))]
|
|
1365
1371
|
})));
|
|
1366
1372
|
}
|
|
1367
1373
|
const AppWorkspace = props => {
|
|
@@ -1396,7 +1402,7 @@ const AppWorkspace = props => {
|
|
|
1396
1402
|
return _$createComponent(WorkspaceContext.Provider, {
|
|
1397
1403
|
value: workspace,
|
|
1398
1404
|
get children() {
|
|
1399
|
-
return _$ssr(_tmpl$
|
|
1405
|
+
return _$ssr(_tmpl$44, `k2b-app-workspace ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-mobile-surface", _$escape(props.mobileSurface, true), false) + _$ssrAttribute("data-flat", props.flat ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-sidebar-collapsed", initialLayoutState()?.sidebarCollapsed === undefined ? _$escape(undefined, true) : _$escape(String(initialLayoutState()?.sidebarCollapsed), true), false) + _$ssrAttribute("data-workspace-resizable", props.resizable === false ? "false" : "true", false), _$ssrStyle(appWorkspaceLayoutStyle(initialLayoutState())), _$escape(_$createComponent(AppWorkspaceHead, {
|
|
1400
1406
|
sidebarId: sidebarId,
|
|
1401
1407
|
nested: nested
|
|
1402
1408
|
})), _$escape(props.children));
|
|
@@ -1413,7 +1419,7 @@ AppWorkspace.LayoutStateProvider = props => _$createComponent(LayoutStateContext
|
|
|
1413
1419
|
return props.children;
|
|
1414
1420
|
}
|
|
1415
1421
|
});
|
|
1416
|
-
AppWorkspace.Content = props => _$ssr(_tmpl$
|
|
1422
|
+
AppWorkspace.Content = props => _$ssr(_tmpl$45, `k2b-app-workspace__content ${_$escape(props.class ?? "", true)}`, _$escape(props.children));
|
|
1417
1423
|
AppWorkspace.Main = AppWorkspaceMain;
|
|
1418
1424
|
AppWorkspace.MainPane = AppWorkspaceMainPane;
|
|
1419
1425
|
AppWorkspace.Detail = AppWorkspaceDetail;
|