@k2b/ui 0.28.0 → 0.30.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 +1 -1
- package/dist/base.css +2 -2
- package/dist/browser/actions/ContextMenu.js +5 -0
- package/dist/browser/actions/ContextMenu.js.map +1 -1
- package/dist/browser/actions/DragAndDrop.js +89 -0
- package/dist/browser/actions/DragAndDrop.js.map +1 -0
- package/dist/browser/actions/Dropdown.js +6 -3
- package/dist/browser/actions/Dropdown.js.map +1 -1
- package/dist/browser/actions/FilterChip.js +137 -7
- package/dist/browser/actions/FilterChip.js.map +1 -1
- package/dist/browser/actions/GestureMenu.js +26 -3
- package/dist/browser/actions/GestureMenu.js.map +1 -1
- package/dist/browser/actions/SegmentedControl.js +5 -9
- package/dist/browser/actions/SegmentedControl.js.map +1 -1
- package/dist/browser/actions/SpotlightSearch.js +6 -3
- package/dist/browser/actions/SpotlightSearch.js.map +1 -1
- package/dist/browser/actions/Tabs.js +5 -2
- package/dist/browser/actions/Tabs.js.map +1 -1
- package/dist/browser/actions/ViewTabs.js +294 -0
- package/dist/browser/actions/ViewTabs.js.map +1 -0
- package/dist/browser/actions/drag-and-drop-messages.js +75 -0
- package/dist/browser/actions/drag-and-drop-messages.js.map +1 -0
- package/dist/browser/actions/drag-and-drop.js +692 -0
- package/dist/browser/actions/drag-and-drop.js.map +1 -0
- package/dist/browser/actions/filter-messages.js +6 -2
- package/dist/browser/actions/filter-messages.js.map +1 -1
- package/dist/browser/actions/index.js +3 -1
- package/dist/browser/actions/index.js.map +1 -1
- package/dist/browser/chat/ChatComposer.js +1229 -605
- package/dist/browser/chat/ChatComposer.js.map +1 -1
- package/dist/browser/chat/ChatDecision.js +814 -0
- package/dist/browser/chat/ChatDecision.js.map +1 -0
- package/dist/browser/chat/ChatPrimitives.js +292 -153
- package/dist/browser/chat/ChatPrimitives.js.map +1 -1
- package/dist/browser/chat/ChatTimeline.js.map +1 -1
- package/dist/browser/chat/chat-messages.js +14 -0
- package/dist/browser/chat/chat-messages.js.map +1 -1
- package/dist/browser/chat/command-search.js +35 -17
- package/dist/browser/chat/command-search.js.map +1 -1
- package/dist/browser/chat/index.js +10 -3
- package/dist/browser/chat/index.js.map +1 -1
- package/dist/browser/chat/types.js.map +1 -1
- package/dist/browser/content/Calendar.js +146 -119
- package/dist/browser/content/Calendar.js.map +1 -1
- package/dist/browser/content/CalendarWeekView.js +291 -266
- package/dist/browser/content/CalendarWeekView.js.map +1 -1
- package/dist/browser/content/Chart.js +54 -71
- package/dist/browser/content/Chart.js.map +1 -1
- package/dist/browser/content/DataTable.js +224 -155
- package/dist/browser/content/DataTable.js.map +1 -1
- package/dist/browser/content/FileBrowser.js +2 -2
- package/dist/browser/content/FileBrowser.js.map +1 -1
- package/dist/browser/content/FileTree.js +42 -36
- package/dist/browser/content/FileTree.js.map +1 -1
- package/dist/browser/content/FileTypeIcon.js +72 -0
- package/dist/browser/content/FileTypeIcon.js.map +1 -0
- package/dist/browser/content/FileView.js +2 -2
- package/dist/browser/content/FileView.js.map +1 -1
- package/dist/browser/content/ReferenceChip.js +162 -0
- package/dist/browser/content/ReferenceChip.js.map +1 -0
- package/dist/browser/content/calendar-pointer.js +9 -0
- package/dist/browser/content/calendar-pointer.js.map +1 -1
- package/dist/browser/content/calendar-time-view.js +6 -3
- package/dist/browser/content/calendar-time-view.js.map +1 -1
- package/dist/browser/content/data-table-messages.js +4 -2
- package/dist/browser/content/data-table-messages.js.map +1 -1
- package/dist/browser/content/index.js +2 -0
- package/dist/browser/content/index.js.map +1 -1
- package/dist/browser/feedback/MovedHint.js +197 -0
- package/dist/browser/feedback/MovedHint.js.map +1 -0
- package/dist/browser/feedback/dialog-core.js +66 -9
- package/dist/browser/feedback/dialog-core.js.map +1 -1
- package/dist/browser/feedback/index.js +1 -0
- package/dist/browser/feedback/index.js.map +1 -1
- package/dist/browser/feedback/prompts.js +6 -1
- package/dist/browser/feedback/prompts.js.map +1 -1
- package/dist/browser/inputs/DatePicker.js +337 -212
- package/dist/browser/inputs/DatePicker.js.map +1 -1
- package/dist/browser/inputs/date-picker.js +59 -5
- package/dist/browser/inputs/date-picker.js.map +1 -1
- package/dist/browser/intl/messages.js +12 -0
- package/dist/browser/intl/messages.js.map +1 -1
- package/dist/browser/intl/weekend.js +39 -0
- package/dist/browser/intl/weekend.js.map +1 -0
- package/dist/browser/layout/AppOverview.js +1 -2
- package/dist/browser/layout/AppOverview.js.map +1 -1
- package/dist/browser/layout/AppWorkspace.js +947 -531
- package/dist/browser/layout/AppWorkspace.js.map +1 -1
- package/dist/browser/layout/PageTitle.js +3 -2
- package/dist/browser/layout/PageTitle.js.map +1 -1
- package/dist/browser/layout/PanelDialog.js +88 -86
- package/dist/browser/layout/PanelDialog.js.map +1 -1
- package/dist/browser/layout/ResizeSeparator.js +81 -0
- package/dist/browser/layout/ResizeSeparator.js.map +1 -0
- package/dist/browser/layout/SettingsModal.js +2 -2
- package/dist/browser/layout/SettingsModal.js.map +1 -1
- package/dist/browser/layout/SidebarSwitcher.js +19 -11
- package/dist/browser/layout/SidebarSwitcher.js.map +1 -1
- package/dist/browser/layout/TabBar.js +16 -13
- package/dist/browser/layout/TabBar.js.map +1 -1
- package/dist/browser/layout/app-host-width.js +44 -0
- package/dist/browser/layout/app-host-width.js.map +1 -0
- package/dist/browser/layout/app-workspace-controller.js +337 -44
- package/dist/browser/layout/app-workspace-controller.js.map +1 -1
- package/dist/browser/layout/index.js +4 -1
- package/dist/browser/layout/index.js.map +1 -1
- package/dist/browser/layout/resize-separator.js +90 -0
- package/dist/browser/layout/resize-separator.js.map +1 -0
- package/dist/browser/layout/workspace-messages.js +12 -2
- package/dist/browser/layout/workspace-messages.js.map +1 -1
- package/dist/browser/surfaces/LinkCard.js +1 -1
- package/dist/browser/surfaces/LinkCard.js.map +1 -1
- package/dist/browser/surfaces/Placeholder.js +45 -11
- package/dist/browser/surfaces/Placeholder.js.map +1 -1
- package/dist/browser/surfaces/StatCell.js +23 -0
- package/dist/browser/surfaces/StatCell.js.map +1 -1
- package/dist/browser/widgets/Widget.js +1 -1
- package/dist/browser/widgets/Widget.js.map +1 -1
- package/dist/ssr/actions/ContextMenu.js +5 -0
- package/dist/ssr/actions/ContextMenu.js.map +1 -1
- package/dist/ssr/actions/DragAndDrop.js +63 -0
- package/dist/ssr/actions/DragAndDrop.js.map +1 -0
- package/dist/ssr/actions/Dropdown.js +5 -2
- package/dist/ssr/actions/Dropdown.js.map +1 -1
- package/dist/ssr/actions/FilterChip.js +59 -7
- package/dist/ssr/actions/FilterChip.js.map +1 -1
- package/dist/ssr/actions/GestureMenu.js +26 -3
- package/dist/ssr/actions/GestureMenu.js.map +1 -1
- package/dist/ssr/actions/SegmentedControl.js +1 -2
- package/dist/ssr/actions/SegmentedControl.js.map +1 -1
- package/dist/ssr/actions/SpotlightSearch.js +2 -2
- package/dist/ssr/actions/SpotlightSearch.js.map +1 -1
- package/dist/ssr/actions/Tabs.js +2 -2
- package/dist/ssr/actions/Tabs.js.map +1 -1
- package/dist/ssr/actions/ViewTabs.js +211 -0
- package/dist/ssr/actions/ViewTabs.js.map +1 -0
- package/dist/ssr/actions/drag-and-drop-messages.js +75 -0
- package/dist/ssr/actions/drag-and-drop-messages.js.map +1 -0
- package/dist/ssr/actions/drag-and-drop.js +692 -0
- package/dist/ssr/actions/drag-and-drop.js.map +1 -0
- package/dist/ssr/actions/filter-messages.js +6 -2
- package/dist/ssr/actions/filter-messages.js.map +1 -1
- package/dist/ssr/actions/index.js +3 -1
- package/dist/ssr/actions/index.js.map +1 -1
- package/dist/ssr/chat/ChatComposer.js +668 -136
- package/dist/ssr/chat/ChatComposer.js.map +1 -1
- package/dist/ssr/chat/ChatDecision.js +479 -0
- package/dist/ssr/chat/ChatDecision.js.map +1 -0
- package/dist/ssr/chat/ChatPrimitives.js +95 -24
- package/dist/ssr/chat/ChatPrimitives.js.map +1 -1
- package/dist/ssr/chat/ChatTimeline.js.map +1 -1
- package/dist/ssr/chat/chat-messages.js +14 -0
- package/dist/ssr/chat/chat-messages.js.map +1 -1
- package/dist/ssr/chat/command-search.js +35 -17
- package/dist/ssr/chat/command-search.js.map +1 -1
- package/dist/ssr/chat/index.js +10 -3
- package/dist/ssr/chat/index.js.map +1 -1
- package/dist/ssr/chat/types.js.map +1 -1
- package/dist/ssr/content/Calendar.js +112 -103
- package/dist/ssr/content/Calendar.js.map +1 -1
- package/dist/ssr/content/CalendarWeekView.js +42 -28
- package/dist/ssr/content/CalendarWeekView.js.map +1 -1
- package/dist/ssr/content/Chart.js +19 -23
- package/dist/ssr/content/Chart.js.map +1 -1
- package/dist/ssr/content/DataTable.js +78 -31
- package/dist/ssr/content/DataTable.js.map +1 -1
- package/dist/ssr/content/FileBrowser.js +2 -2
- package/dist/ssr/content/FileBrowser.js.map +1 -1
- package/dist/ssr/content/FileTree.js +21 -14
- package/dist/ssr/content/FileTree.js.map +1 -1
- package/dist/ssr/content/FileTypeIcon.js +50 -0
- package/dist/ssr/content/FileTypeIcon.js.map +1 -0
- package/dist/ssr/content/FileView.js +2 -2
- package/dist/ssr/content/FileView.js.map +1 -1
- package/dist/ssr/content/ReferenceChip.js +121 -0
- package/dist/ssr/content/ReferenceChip.js.map +1 -0
- package/dist/ssr/content/calendar-pointer.js +9 -0
- package/dist/ssr/content/calendar-pointer.js.map +1 -1
- package/dist/ssr/content/calendar-time-view.js +6 -3
- package/dist/ssr/content/calendar-time-view.js.map +1 -1
- package/dist/ssr/content/data-table-messages.js +4 -2
- package/dist/ssr/content/data-table-messages.js.map +1 -1
- package/dist/ssr/content/index.js +2 -0
- package/dist/ssr/content/index.js.map +1 -1
- package/dist/ssr/feedback/MovedHint.js +166 -0
- package/dist/ssr/feedback/MovedHint.js.map +1 -0
- package/dist/ssr/feedback/dialog-core.js +66 -9
- package/dist/ssr/feedback/dialog-core.js.map +1 -1
- package/dist/ssr/feedback/index.js +1 -0
- package/dist/ssr/feedback/index.js.map +1 -1
- package/dist/ssr/feedback/prompts.js +6 -1
- package/dist/ssr/feedback/prompts.js.map +1 -1
- package/dist/ssr/inputs/DatePicker.js +138 -69
- package/dist/ssr/inputs/DatePicker.js.map +1 -1
- package/dist/ssr/inputs/date-picker.js +59 -5
- package/dist/ssr/inputs/date-picker.js.map +1 -1
- package/dist/ssr/intl/messages.js +12 -0
- package/dist/ssr/intl/messages.js.map +1 -1
- package/dist/ssr/intl/weekend.js +39 -0
- package/dist/ssr/intl/weekend.js.map +1 -0
- package/dist/ssr/layout/AppOverview.js +1 -2
- package/dist/ssr/layout/AppOverview.js.map +1 -1
- package/dist/ssr/layout/AppWorkspace.js +457 -116
- package/dist/ssr/layout/AppWorkspace.js.map +1 -1
- package/dist/ssr/layout/PageTitle.js +3 -2
- package/dist/ssr/layout/PageTitle.js.map +1 -1
- package/dist/ssr/layout/PanelDialog.js +7 -6
- package/dist/ssr/layout/PanelDialog.js.map +1 -1
- package/dist/ssr/layout/ResizeSeparator.js +45 -0
- package/dist/ssr/layout/ResizeSeparator.js.map +1 -0
- package/dist/ssr/layout/SettingsModal.js +2 -2
- package/dist/ssr/layout/SettingsModal.js.map +1 -1
- package/dist/ssr/layout/SidebarSwitcher.js +19 -11
- package/dist/ssr/layout/SidebarSwitcher.js.map +1 -1
- package/dist/ssr/layout/TabBar.js +2 -2
- package/dist/ssr/layout/TabBar.js.map +1 -1
- package/dist/ssr/layout/app-host-width.js +44 -0
- package/dist/ssr/layout/app-host-width.js.map +1 -0
- package/dist/ssr/layout/app-workspace-controller.js +337 -44
- package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
- package/dist/ssr/layout/index.js +4 -1
- package/dist/ssr/layout/index.js.map +1 -1
- package/dist/ssr/layout/resize-separator.js +90 -0
- package/dist/ssr/layout/resize-separator.js.map +1 -0
- package/dist/ssr/layout/workspace-messages.js +12 -2
- package/dist/ssr/layout/workspace-messages.js.map +1 -1
- package/dist/ssr/surfaces/LinkCard.js +1 -1
- package/dist/ssr/surfaces/LinkCard.js.map +1 -1
- package/dist/ssr/surfaces/Placeholder.js +25 -6
- package/dist/ssr/surfaces/Placeholder.js.map +1 -1
- package/dist/ssr/surfaces/StatCell.js +23 -0
- package/dist/ssr/surfaces/StatCell.js.map +1 -1
- package/dist/ssr/widgets/Widget.js +1 -1
- package/dist/ssr/widgets/Widget.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/actions/ContextMenu.d.ts +1 -0
- package/dist/types/actions/DragAndDrop.d.ts +29 -0
- package/dist/types/actions/Dropdown.d.ts +4 -0
- package/dist/types/actions/FilterChip.d.ts +22 -0
- package/dist/types/actions/ViewTabs.d.ts +30 -0
- package/dist/types/actions/drag-and-drop-messages.d.ts +35 -0
- package/dist/types/actions/drag-and-drop.d.ts +36 -0
- package/dist/types/actions/filter-messages.d.ts +2 -0
- package/dist/types/actions/index.d.ts +6 -2
- package/dist/types/chat/ChatComposer.d.ts +71 -1
- package/dist/types/chat/ChatDecision.d.ts +149 -0
- package/dist/types/chat/ChatPrimitives.d.ts +14 -1
- package/dist/types/chat/ChatTimeline.d.ts +2 -1
- package/dist/types/chat/chat-messages.d.ts +7 -0
- package/dist/types/chat/command-search.d.ts +5 -0
- package/dist/types/chat/index.d.ts +28 -5
- package/dist/types/chat/types.d.ts +54 -1
- package/dist/types/content/Chart.d.ts +9 -3
- package/dist/types/content/DataTable.d.ts +3 -0
- package/dist/types/content/FileTypeIcon.d.ts +27 -0
- package/dist/types/content/ReferenceChip.d.ts +49 -0
- package/dist/types/content/calendar-pointer.d.ts +6 -0
- package/dist/types/content/data-table-messages.d.ts +1 -0
- package/dist/types/content/index.d.ts +3 -0
- package/dist/types/feedback/MovedHint.d.ts +25 -0
- package/dist/types/feedback/dialog-core.d.ts +5 -2
- package/dist/types/feedback/index.d.ts +2 -0
- package/dist/types/feedback/prompts.d.ts +2 -0
- package/dist/types/inputs/DatePicker.d.ts +7 -0
- package/dist/types/inputs/date-picker.d.ts +25 -1
- package/dist/types/intl/messages.d.ts +6 -0
- package/dist/types/intl/weekend.d.ts +12 -0
- package/dist/types/layout/AppWorkspace.d.ts +48 -10
- package/dist/types/layout/ResizeSeparator.d.ts +9 -0
- package/dist/types/layout/TabBar.d.ts +7 -0
- package/dist/types/layout/app-host-width.d.ts +6 -0
- package/dist/types/layout/app-workspace-controller.d.ts +2 -0
- package/dist/types/layout/index.d.ts +5 -2
- package/dist/types/layout/resize-separator.d.ts +18 -0
- package/dist/types/layout/workspace-messages.d.ts +5 -0
- package/dist/types/surfaces/Placeholder.d.ts +2 -1
- package/dist/types/surfaces/StatCell.d.ts +6 -0
- package/package.json +5 -5
|
@@ -8,63 +8,74 @@ import { ssrStyle as _$ssrStyle } from "solid-js/web";
|
|
|
8
8
|
import { ssrAttribute as _$ssrAttribute } from "solid-js/web";
|
|
9
9
|
import { escape as _$escape } from "solid-js/web";
|
|
10
10
|
var _tmpl$ = ["<button type=\"button\" class=\"k2b-app-workspace__resize\" role=\"separator\"", " style=\"", "\"><span aria-hidden=\"true\"></span></button>"],
|
|
11
|
-
_tmpl$2 = ["<p>", "</p>"],
|
|
11
|
+
_tmpl$2 = ["<p class=\"k2b-truncate-fade\">", "</p>"],
|
|
12
12
|
_tmpl$3 = ["<div class=\"k2b-app-workspace__level-actions\">", "</div>"],
|
|
13
|
-
_tmpl$4 = ["<header class=\"k2b-app-workspace__level-head\">", "<div class=\"k2b-app-workspace__level-title\"><h2 tabindex=\"-1\">", "</h2>", "</div>", "</header>"],
|
|
14
|
-
_tmpl$5 = ["<
|
|
15
|
-
_tmpl$6 = ["<
|
|
16
|
-
_tmpl$7 = "<
|
|
17
|
-
_tmpl$8 =
|
|
18
|
-
_tmpl$9 = ["<
|
|
19
|
-
_tmpl$0 =
|
|
20
|
-
_tmpl$1 = ["<aside", " class=\"", "\"", "", " style=\"", "\">", "</aside>"],
|
|
21
|
-
_tmpl$10 = ["<
|
|
22
|
-
_tmpl$11 = ["<
|
|
23
|
-
_tmpl$12 = ["<
|
|
24
|
-
_tmpl$13 = ["<
|
|
25
|
-
_tmpl$14 = ["<
|
|
26
|
-
_tmpl$15 = ["<
|
|
27
|
-
_tmpl$16 = ["<
|
|
28
|
-
_tmpl$17 = ["<
|
|
29
|
-
_tmpl$18 = ["<div
|
|
30
|
-
_tmpl$19 = ["<
|
|
31
|
-
_tmpl$20 = ["<div class=\"k2b-app-workspace__sidebar-
|
|
32
|
-
_tmpl$21 = "<
|
|
33
|
-
_tmpl$22 = "<
|
|
34
|
-
_tmpl$23 =
|
|
35
|
-
_tmpl$24 =
|
|
36
|
-
_tmpl$25 = ["<span class=\"k2b-
|
|
37
|
-
_tmpl$26 = ["<span class=\"k2b-app-workspace__sidebar-status\"
|
|
38
|
-
_tmpl$27 = "<span class=\"k2b-
|
|
39
|
-
_tmpl$28 = ["<span class=\"k2b-app-workspace__sidebar-
|
|
40
|
-
_tmpl$29 =
|
|
41
|
-
_tmpl$30 = ["<span
|
|
42
|
-
_tmpl$31 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
43
|
-
_tmpl$32 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
44
|
-
_tmpl$33 = ["<span class=\"k2b-app-workspace__sidebar-item-
|
|
45
|
-
_tmpl$34 = ["<
|
|
46
|
-
_tmpl$35 = ["<
|
|
47
|
-
_tmpl$36 = ["<
|
|
48
|
-
_tmpl$37 = ["<
|
|
49
|
-
_tmpl$38 = ["<
|
|
50
|
-
_tmpl$39 = ["<span class=\"k2b-app-
|
|
51
|
-
_tmpl$40 = ["<span class=\"
|
|
52
|
-
_tmpl$41 = ["<
|
|
53
|
-
_tmpl$42 = ["<
|
|
54
|
-
_tmpl$43 = ["<div class=\"
|
|
55
|
-
_tmpl$44 = ["<div class=\"k2b-app-
|
|
56
|
-
_tmpl$45 = ["<
|
|
57
|
-
_tmpl$46 = "<
|
|
58
|
-
_tmpl$47 = ["<
|
|
59
|
-
_tmpl$48 = ["<
|
|
60
|
-
_tmpl$49 =
|
|
61
|
-
_tmpl$50 = ["<div class=\"
|
|
13
|
+
_tmpl$4 = ["<header class=\"k2b-app-workspace__level-head\">", "<div class=\"k2b-app-workspace__level-title\"><h2 tabindex=\"-1\"><span class=\"k2b-truncate-fade\">", "</span></h2>", "</div>", "</header>"],
|
|
14
|
+
_tmpl$5 = ["<style>", "</style>"],
|
|
15
|
+
_tmpl$6 = ["<div class=\"k2b-app-workspace__main-primary\" data-workspace-main-region=\"main\"", ">", "</div>"],
|
|
16
|
+
_tmpl$7 = ["<section", " class=\"", "\"", " style=\"", "\">", "</section>"],
|
|
17
|
+
_tmpl$8 = "<i class=\"ti ti-chevron-left\" aria-hidden=\"true\"></i>",
|
|
18
|
+
_tmpl$9 = ["<div class=\"k2b-app-workspace__level-body\"", ">", "</div>"],
|
|
19
|
+
_tmpl$0 = "<i class=\"ti ti-layout-sidebar-right\" aria-hidden=\"true\"></i>",
|
|
20
|
+
_tmpl$1 = ["<aside", " class=\"", "\"", "", " style=\"", "\"><button type=\"button\" class=\"k2b-app-workspace__detail-grabber\"", " aria-pressed=\"false\"><span aria-hidden=\"true\"></span></button>", "</aside>"],
|
|
21
|
+
_tmpl$10 = ["<aside", " class=\"", "\"", "", " style=\"", "\">", "</aside>"],
|
|
22
|
+
_tmpl$11 = ["<nav class=\"k2b-app-workspace__sidebar-sheet\"", " style=\"", "\">", "</nav>"],
|
|
23
|
+
_tmpl$12 = ["<div class=\"k2b-app-workspace__sidebar-desktop\"", ">", "</div>"],
|
|
24
|
+
_tmpl$13 = ["<button type=\"button\" class=\"k2b-app-workspace__sidebar-all\" aria-haspopup=\"dialog\"", "><span>", "</span><i class=\"ti ti-chevron-down\" aria-hidden=\"true\"></i></button>"],
|
|
25
|
+
_tmpl$14 = ["<script>", "</script>"],
|
|
26
|
+
_tmpl$15 = ["<span aria-hidden=\"true\"><i", "></i></span>"],
|
|
27
|
+
_tmpl$16 = ["<span class=\"k2b-app-workspace__sidebar-section-count\">", "</span>"],
|
|
28
|
+
_tmpl$17 = ["<button type=\"button\" class=\"k2b-app-workspace__sidebar-section-toggle\"", ">", "<i", " aria-hidden=\"true\"></i></button>"],
|
|
29
|
+
_tmpl$18 = ["<div class=\"k2b-app-workspace__sidebar-section-actions\">", "</div>"],
|
|
30
|
+
_tmpl$19 = ["<header class=\"k2b-app-workspace__sidebar-section-header\">", "", "</header>"],
|
|
31
|
+
_tmpl$20 = ["<div", "", " class=\"k2b-app-workspace__sidebar-section-content\">", "</div>"],
|
|
32
|
+
_tmpl$21 = ["<h2>", "</h2>"],
|
|
33
|
+
_tmpl$22 = ["<div class=\"k2b-app-workspace__sidebar-item-actions\"", ">", "</div>"],
|
|
34
|
+
_tmpl$23 = "<span class=\"k2b-app-workspace__sidebar-status-mention\" aria-hidden=\"true\">@</span>",
|
|
35
|
+
_tmpl$24 = "<span class=\"k2b-app-workspace__sidebar-status-muted\" aria-hidden=\"true\"><i class=\"ti ti-bell-off\"></i></span>",
|
|
36
|
+
_tmpl$25 = ["<span class=\"k2b-app-workspace__sidebar-status-count\"", ">", "</span>"],
|
|
37
|
+
_tmpl$26 = ["<span class=\"k2b-app-workspace__sidebar-status-unread\" aria-hidden=\"true\">", "</span>"],
|
|
38
|
+
_tmpl$27 = ["<span class=\"k2b-sr-only\">, ", "</span>"],
|
|
39
|
+
_tmpl$28 = ["<span class=\"k2b-app-workspace__sidebar-status\"", ">", "</span>"],
|
|
40
|
+
_tmpl$29 = "<span class=\"k2b-app-workspace__sidebar-status-dot\"></span>",
|
|
41
|
+
_tmpl$30 = ["<span", " aria-hidden=\"true\">", "</span>"],
|
|
42
|
+
_tmpl$31 = ["<span class=\"k2b-app-workspace__sidebar-item-context-meta\">", "</span>"],
|
|
43
|
+
_tmpl$32 = ["<span class=\"k2b-app-workspace__sidebar-item-context\"><span class=\"k2b-app-workspace__sidebar-item-context-label k2b-truncate-fade\">", "</span>", "</span>"],
|
|
44
|
+
_tmpl$33 = ["<span class=\"k2b-app-workspace__sidebar-item-description k2b-truncate-fade\">", "</span>"],
|
|
45
|
+
_tmpl$34 = ["<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 k2b-truncate-fade-lines\">", "</span></span>", "</span>"],
|
|
46
|
+
_tmpl$35 = ["<span class=\"k2b-app-workspace__sidebar-item-meta\"", ">", "</span>"],
|
|
47
|
+
_tmpl$36 = ["<i", "></i>"],
|
|
48
|
+
_tmpl$37 = ["<a", " class=\"k2b-app-workspace__sidebar-item-action\"", ">", "</a>"],
|
|
49
|
+
_tmpl$38 = ["<button type=\"button\" class=\"k2b-app-workspace__sidebar-item-action\"", ">", "</button>"],
|
|
50
|
+
_tmpl$39 = ["<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 k2b-truncate-fade-lines\">", "</span></span><span class=\"k2b-app-workspace__sidebar-item-description k2b-truncate-fade\">", "</span></span>"],
|
|
51
|
+
_tmpl$40 = ["<span class=\"", "\"", ">", "</span>"],
|
|
52
|
+
_tmpl$41 = ["<span class=\"k2b-app-workspace__nav-tree-toggle\" data-k2b-nav-tree-toggle aria-hidden=\"true\"><i class=\"", "\"></i></span>"],
|
|
53
|
+
_tmpl$42 = ["<span class=\"k2b-app-workspace__sidebar-item-label\"", "><span class=\"k2b-app-workspace__sidebar-item-label-text k2b-truncate-fade-lines\">", "</span></span>"],
|
|
54
|
+
_tmpl$43 = ["<div class=\"k2b-app-workspace__nav-tree-group\" role=\"group\">", "</div>"],
|
|
55
|
+
_tmpl$44 = ["<div class=\"k2b-app-workspace__nav-tree-node\" role=\"treeitem\"", " style=\"", "\">", "", "</div>"],
|
|
56
|
+
_tmpl$45 = ["<div class=\"", "\" role=\"tree\"", ">", "</div>"],
|
|
57
|
+
_tmpl$46 = ["<div class=\"k2b-app-workspace__sidebar-icon-grid\"", ">", "</div>"],
|
|
58
|
+
_tmpl$47 = ["<i", " aria-hidden=\"true\"></i>"],
|
|
59
|
+
_tmpl$48 = ["<span class=\"k2b-app-workspace__head-primary-label\">", "</span>"],
|
|
60
|
+
_tmpl$49 = "<i class=\"ti ti-layout-sidebar\" aria-hidden=\"true\"></i>",
|
|
61
|
+
_tmpl$50 = ["<div class=\"k2b-app-workspace__head-views\">", "</div>"],
|
|
62
|
+
_tmpl$51 = ["<div class=\"k2b-app-workspace__head-filters\" role=\"group\"", ">", "", "</div>"],
|
|
63
|
+
_tmpl$52 = ["<span class=\"k2b-app-workspace__head-count\"><span>", "</span></span>"],
|
|
64
|
+
_tmpl$53 = ["<div class=\"k2b-app-workspace__head-actions\">", "", "</div>"],
|
|
65
|
+
_tmpl$54 = ["<div class=\"k2b-app-workspace__head\"", "><div class=\"k2b-app-workspace__head-lead\">", "", "", "", "", "</div>", "</div>"],
|
|
66
|
+
_tmpl$55 = ["<h1 class=\"k2b-app-workspace__head-heading\" data-k2b-page-trail-title", ">", "</h1>"],
|
|
67
|
+
_tmpl$56 = ["<div class=\"", "\" data-k2b-app-workspace", " style=\"", "\">", "</div>"],
|
|
68
|
+
_tmpl$57 = ["<div class=\"", "\">", "</div>"];
|
|
62
69
|
import { Link } from "@k2b/ssr/nav";
|
|
63
|
-
import { children, createContext, createEffect, createMemo, createSignal, createUniqueId, For, mergeProps, on, onCleanup, onMount, Show, useContext } from "solid-js";
|
|
64
|
-
import { isServer } from "solid-js/web";
|
|
65
|
-
import { IconButton, IconButtonLink } from "../actions/Button";
|
|
70
|
+
import { children, createContext, createEffect, createMemo, createRoot, createSignal, createUniqueId, For, getOwner, mergeProps, on, onCleanup, onMount, Show, useContext } from "solid-js";
|
|
71
|
+
import { Dynamic, isServer } from "solid-js/web";
|
|
72
|
+
import { Button, ButtonLink, IconButton, IconButtonLink } from "../actions/Button";
|
|
73
|
+
import { useFilterMessages } from "../actions/filter-messages";
|
|
74
|
+
import { dialogCore } from "../feedback/dialog-core";
|
|
75
|
+
import { RenderErrorBoundary } from "../internal/render-error";
|
|
66
76
|
import { APP_WORKSPACE_DETAIL_CLOSE_EVENT, APP_WORKSPACE_DETAIL_STEP_EVENT, APP_WORKSPACE_SIDEBAR_HIDE_EVENT, installAppWorkspaceController } from "./app-workspace-controller";
|
|
67
|
-
import { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable } from "./app-workspace-state";
|
|
77
|
+
import { APP_WORKSPACE_DETAIL_DEFAULT, APP_WORKSPACE_DETAIL_MAX, APP_WORKSPACE_DETAIL_MIN, APP_WORKSPACE_DRAWER_DEFAULT, APP_WORKSPACE_DRAWER_MAX, APP_WORKSPACE_DRAWER_MIN, APP_WORKSPACE_MAIN_MIN, APP_WORKSPACE_PANE_DEFAULT, APP_WORKSPACE_PANE_MAX, APP_WORKSPACE_PANE_MIN, APP_WORKSPACE_SIDEBAR_COLLAPSED, APP_WORKSPACE_SIDEBAR_DEFAULT, APP_WORKSPACE_SIDEBAR_MAX, APP_WORKSPACE_SIDEBAR_MIN, appWorkspaceLayoutStyle, appWorkspacePanelVariable } from "./app-workspace-state";
|
|
78
|
+
import BottomSheet, { bottomSheetAdaptiveOptions } from "./BottomSheet";
|
|
68
79
|
import { PageTitle, usePageTrail } from "./PageTitle";
|
|
69
80
|
import { SidebarItemPreview } from "./SidebarItemPreview";
|
|
70
81
|
import { AppWorkspaceSidebarSwitcher } from "./SidebarSwitcher";
|
|
@@ -76,6 +87,8 @@ const ResizeContext = createContext(true);
|
|
|
76
87
|
/** The enclosing workspace: its head names the sidebar, and a nested workspace leaves the page title to it. */
|
|
77
88
|
const WorkspaceContext = createContext();
|
|
78
89
|
const LayoutStateContext = createContext(null);
|
|
90
|
+
const HEAD = Symbol("AppWorkspace.Head");
|
|
91
|
+
const headSlot = value => !!value && typeof value === "object" && "kind" in value && value.kind === HEAD;
|
|
79
92
|
const MAIN_PANE = Symbol("AppWorkspace.MainPane");
|
|
80
93
|
const SIDEBAR_DESKTOP = Symbol("AppWorkspace.SidebarDesktop");
|
|
81
94
|
const SIDEBAR_ITEM_ICON = Symbol("AppWorkspace.SidebarItemIcon");
|
|
@@ -95,6 +108,13 @@ const mainPaneSlot = value => Boolean(value && typeof value === "object" && "kin
|
|
|
95
108
|
const sidebarChildSlot = value => Boolean(value && typeof value === "object" && "kind" in value && value.kind === SIDEBAR_DESKTOP);
|
|
96
109
|
const sidebarItemSlot = value => Boolean(value && typeof value === "object" && "kind" in value && [SIDEBAR_ITEM_ICON, SIDEBAR_ITEM_LABEL, SIDEBAR_ITEM_META, SIDEBAR_ITEM_ACTION].includes(value.kind));
|
|
97
110
|
const navTreeItemSlot = value => Boolean(value && typeof value === "object" && "kind" in value && value.kind === NAV_TREE_ITEM);
|
|
111
|
+
/** Head row slot. Must be a direct child of AppWorkspace; its parts may be islands. */
|
|
112
|
+
function AppWorkspaceHeadSlot(props) {
|
|
113
|
+
return {
|
|
114
|
+
kind: HEAD,
|
|
115
|
+
props
|
|
116
|
+
};
|
|
117
|
+
}
|
|
98
118
|
function ResizeHandle(props) {
|
|
99
119
|
const workspaceMessages = useWorkspaceMessages();
|
|
100
120
|
const workspace = useContext(WorkspaceContext);
|
|
@@ -250,10 +270,29 @@ function AppWorkspaceMain(props) {
|
|
|
250
270
|
// layout. Deriving it from `regions()` made a workspace whose panes are all
|
|
251
271
|
// closed fall back to `resolved()`, which renders the raw slot objects.
|
|
252
272
|
const hasPanes = createMemo(() => paneIds().length > 0);
|
|
253
|
-
|
|
273
|
+
// The workspace's tracks and queries read Main's minimum on the workspace
|
|
274
|
+
// itself, which cannot read Main's own variables, so this rule hands it up,
|
|
275
|
+
// as `AppWorkspace.Detail` does with its width.
|
|
276
|
+
const minWidth = () => {
|
|
277
|
+
const value = props.minWidth;
|
|
278
|
+
return value !== undefined && Number.isFinite(value) && value > APP_WORKSPACE_MAIN_MIN ? Math.round(value) : undefined;
|
|
279
|
+
};
|
|
280
|
+
const minWidthRule = value => {
|
|
281
|
+
const main = `.k2b-app-workspace__main[data-workspace-main-min="${value}"]`;
|
|
282
|
+
return `.k2b-app-workspace:has(> .k2b-app-workspace__content > ${main}, > .k2b-app-workspace__content > :is(solid-island, solid-client) > ${main}){--k2b-workspace-main-min:${value}px}`;
|
|
283
|
+
};
|
|
284
|
+
return [_$createComponent(Show, {
|
|
285
|
+
get when() {
|
|
286
|
+
return minWidth();
|
|
287
|
+
},
|
|
288
|
+
children: value => _$ssr(_tmpl$5, minWidthRule(value()))
|
|
289
|
+
}), _$ssrElement("div", _$mergeProps({
|
|
254
290
|
get ["class"]() {
|
|
255
291
|
return `k2b-app-workspace__main ${hasPanes() ? "has-panes" : ""} ${props.class ?? ""}`;
|
|
256
292
|
},
|
|
293
|
+
get ["data-workspace-main-min"]() {
|
|
294
|
+
return minWidth();
|
|
295
|
+
},
|
|
257
296
|
get ["data-workspace-levels"]() {
|
|
258
297
|
return levelsMode() ? "" : undefined;
|
|
259
298
|
},
|
|
@@ -293,7 +332,7 @@ function AppWorkspaceMain(props) {
|
|
|
293
332
|
return props.mobilePane ?? (anchor?.type === "pane" ? anchor.slot.props.id : "main");
|
|
294
333
|
};
|
|
295
334
|
if (region.type === "primary") {
|
|
296
|
-
return _$ssr(_tmpl$
|
|
335
|
+
return _$ssr(_tmpl$6, _$ssrAttribute("data-workspace-mobile-active", activeMobilePane() === "main" ? "true" : "false", false), _$escape(region.children));
|
|
297
336
|
}
|
|
298
337
|
const pane = region.slot;
|
|
299
338
|
const levelIndex = () => levels().indexOf(pane) + 1;
|
|
@@ -346,7 +385,7 @@ function AppWorkspaceMain(props) {
|
|
|
346
385
|
get children() {
|
|
347
386
|
return handle();
|
|
348
387
|
}
|
|
349
|
-
}), _$ssr(_tmpl$
|
|
388
|
+
}), _$ssr(_tmpl$7, _$ssrAttribute("id", _$escape(pane.domId, true), false), `k2b-app-workspace__main-pane ${isAnchor() ? "is-primary" : ""} ${_$escape(pane.props.class ?? "", true)}`, _$ssrAttribute("aria-label", _$escape(pane.props.label, true), false) + _$ssrAttribute("data-workspace-level", levelsMode() ? _$escape(levelIndex(), true) : _$escape(undefined, true), false) + _$ssrAttribute("data-workspace-level-shown", _$escape(levelAttr("shown"), true), false) + _$ssrAttribute("data-workspace-level-first", _$escape(levelAttr("first"), true), false) + _$ssrAttribute("data-workspace-level-last", _$escape(levelAttr("last"), true), false) + _$ssrAttribute("data-workspace-main-region", _$escape(pane.props.id, true), false) + _$ssrAttribute("data-workspace-mobile-active", (levelsMode() ? levelClasses(levelIndex(), "shown").split(" ").includes("1") : activeMobilePane() === pane.props.id) ? "true" : "false", false) + _$ssrAttribute("data-workspace-panel-id", _$escape(panelId, true), false) + _$ssrAttribute("data-workspace-resizable", resizable() ? "true" : "false", false) + _$ssrAttribute("data-surface", pane.props.surface === "navigation" ? "navigation" : _$escape(undefined, true), false) + _$ssrAttribute("data-scroll", !levelsMode() && pane.props.scroll === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-scroll-fade-mode", !levelsMode() && pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : _$escape(undefined, true), false), _$ssrStyle(isAnchor() ? undefined : {
|
|
350
389
|
// A stored width keeps to this pane's limits before the controller attaches.
|
|
351
390
|
"--k2b-workspace-panel-size": `clamp(${minSize()}px, var(${variable}, ${defaultSize()}px), ${maxSize()}px)`,
|
|
352
391
|
"--k2b-workspace-panel-min": `${minSize()}px`
|
|
@@ -383,13 +422,13 @@ function AppWorkspaceMain(props) {
|
|
|
383
422
|
return props.onLevelNavigate ? navigateBack : undefined;
|
|
384
423
|
},
|
|
385
424
|
get children() {
|
|
386
|
-
return _$ssr(_tmpl$
|
|
425
|
+
return _$ssr(_tmpl$8);
|
|
387
426
|
}
|
|
388
427
|
});
|
|
389
428
|
}
|
|
390
429
|
});
|
|
391
430
|
}
|
|
392
|
-
}), _$ssr(_tmpl$
|
|
431
|
+
}), _$ssr(_tmpl$9, _$ssrAttribute("data-scroll", pane.props.scroll === false ? "false" : _$escape(undefined, true), false) + _$ssrAttribute("data-scroll-fade-mode", pane.props.scroll !== false && pane.props.scrollFade !== false ? "both" : _$escape(undefined, true), false), _$escape(pane.props.children))]) : _$escape(pane.props.children)), _$createComponent(Show, {
|
|
393
432
|
get when() {
|
|
394
433
|
return _$memo(() => !!resizable())() && before();
|
|
395
434
|
},
|
|
@@ -402,7 +441,7 @@ function AppWorkspaceMain(props) {
|
|
|
402
441
|
}
|
|
403
442
|
});
|
|
404
443
|
}
|
|
405
|
-
})), false);
|
|
444
|
+
})), false)];
|
|
406
445
|
}
|
|
407
446
|
function AppWorkspaceDetail(props) {
|
|
408
447
|
const workspaceMessages = useWorkspaceMessages();
|
|
@@ -452,7 +491,19 @@ function AppWorkspaceDetail(props) {
|
|
|
452
491
|
aside?.removeEventListener(APP_WORKSPACE_DETAIL_STEP_EVENT, step);
|
|
453
492
|
});
|
|
454
493
|
});
|
|
455
|
-
return [_$ssr(_tmpl$
|
|
494
|
+
return [_$ssr(_tmpl$5, workspaceRule()), _$createComponent(Button, {
|
|
495
|
+
type: "button",
|
|
496
|
+
variant: "ghost",
|
|
497
|
+
get ["aria-controls"]() {
|
|
498
|
+
return domId();
|
|
499
|
+
},
|
|
500
|
+
"aria-expanded": "false",
|
|
501
|
+
"data-app-workspace-detail-toggle": "",
|
|
502
|
+
"class": "k2b-app-workspace__detail-toggle",
|
|
503
|
+
get children() {
|
|
504
|
+
return [_$ssr(_tmpl$0), workspaceMessages().details];
|
|
505
|
+
}
|
|
506
|
+
}), _$createComponent(Show, {
|
|
456
507
|
get when() {
|
|
457
508
|
return resizable();
|
|
458
509
|
},
|
|
@@ -480,7 +531,7 @@ function AppWorkspaceDetail(props) {
|
|
|
480
531
|
}
|
|
481
532
|
});
|
|
482
533
|
}
|
|
483
|
-
}), _$ssr(_tmpl$
|
|
534
|
+
}), _$ssr(_tmpl$1, _$ssrAttribute("id", _$escape(domId(), true), false), `k2b-app-workspace__detail ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-width", _$escape(props.width ?? "md", true), false) + _$ssrAttribute("data-workspace-detail-phone", props.phone === "page" ? "page" : _$escape(undefined, true), false) + _$ssrAttribute("data-workspace-detail-choice", props.openOnChoice === false ? "request" : _$escape(undefined, true), false) + _$ssrAttribute("data-workspace-panel-id", _$escape(panelId(), true), false) + _$ssrAttribute("data-workspace-resizable", resizable() ? "true" : "false", false) + _$ssrAttribute("data-workspace-detail-closable", props.onClose ? "true" : _$escape(undefined, true), false) + _$ssrAttribute("data-workspace-detail-steppable", props.onStep ? "true" : _$escape(undefined, true), false), _$ssrAttribute("hidden", !props.open, true), _$ssrStyle({
|
|
484
535
|
...sizeStyle(),
|
|
485
536
|
"view-transition-name": props.viewTransitionName
|
|
486
537
|
}), _$ssrAttribute("aria-label", _$escape(workspaceMessages().detailFullHeight, true), false), _$escape(props.children))];
|
|
@@ -531,7 +582,7 @@ function AppWorkspaceBottomDrawer(props) {
|
|
|
531
582
|
}
|
|
532
583
|
});
|
|
533
584
|
}
|
|
534
|
-
}), _$ssr(_tmpl$
|
|
585
|
+
}), _$ssr(_tmpl$10, _$ssrAttribute("id", _$escape(domId(), true), false), `k2b-app-workspace__drawer ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("data-height", _$escape(props.height ?? "md", true), false) + _$ssrAttribute("data-workspace-panel-id", _$escape(panelId(), true), false) + _$ssrAttribute("data-workspace-resizable", resizable() ? "true" : "false", false), _$ssrAttribute("hidden", !props.open, true), _$ssrStyleProperty("--k2b-workspace-panel-size:", `var(${_$escape(variable(), true)}, ${_$escape(defaultHeight(), true)}px)`) + _$ssrStyleProperty(";view-transition-name:", _$escape(props.viewTransitionName, true)), _$escape(props.children))];
|
|
535
586
|
}
|
|
536
587
|
function AppWorkspaceSidebar(props) {
|
|
537
588
|
const rootResizable = useContext(ResizeContext);
|
|
@@ -549,20 +600,154 @@ function AppWorkspaceSidebar(props) {
|
|
|
549
600
|
const resolved = children(() => props.hidden ? undefined : props.children);
|
|
550
601
|
const slots = createMemo(() => flatten(resolved()).filter(sidebarChildSlot));
|
|
551
602
|
const desktop = createMemo(() => slots().find(slot => slot.kind === SIDEBAR_DESKTOP));
|
|
603
|
+
const stacked = () => props.mobile === "stacked";
|
|
604
|
+
const workspaceMessages = useWorkspaceMessages();
|
|
605
|
+
const owner = getOwner();
|
|
606
|
+
const [sheetOpen, setSheetOpen] = createSignal(false);
|
|
552
607
|
let aside;
|
|
608
|
+
let row;
|
|
609
|
+
// Fades mark the row's cut edges; the sidebar column never scrolls sideways, so it never shows one.
|
|
610
|
+
createScrollFade(() => row, () => stacked());
|
|
553
611
|
onMount(() => {
|
|
554
612
|
const requestHide = () => props.onHiddenChange?.(true);
|
|
555
613
|
aside?.addEventListener(APP_WORKSPACE_SIDEBAR_HIDE_EVENT, requestHide);
|
|
556
614
|
onCleanup(() => aside?.removeEventListener(APP_WORKSPACE_SIDEBAR_HIDE_EVENT, requestHide));
|
|
615
|
+
// A client-rendered row settles here; server markup settled in its inline script.
|
|
616
|
+
if (stacked() && row) settleChipRow(row, scrollFadeEdges);
|
|
557
617
|
});
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
618
|
+
/**
|
|
619
|
+
* The complete sidebar for a chip row: a second rendering of the same
|
|
620
|
+
* children in a sheet. It shares the application's state through its
|
|
621
|
+
* signals, inherits this sidebar's context and accent, and is disposed with
|
|
622
|
+
* the sheet. A chosen link runs its own handlers in the sheet and closes it.
|
|
623
|
+
*/
|
|
624
|
+
const openAll = button => {
|
|
625
|
+
if (sheetOpen() || !aside) return;
|
|
626
|
+
setSheetOpen(true);
|
|
627
|
+
const computed = getComputedStyle(aside);
|
|
628
|
+
const accent = Object.fromEntries(["--k2b-app-workspace-active", "--k2b-app-workspace-selected", "--k2b-link-accent", "--k2b-detail-panel-accent"].map(name => [name, computed.getPropertyValue(name).trim()]).filter(([, value]) => value));
|
|
629
|
+
// The sheet belongs to the chip row: when the workspace widens into the sidebar column, All disappears and the sheet closes.
|
|
630
|
+
const leave = new AbortController();
|
|
631
|
+
const watch = new ResizeObserver(() => {
|
|
632
|
+
if (button.getClientRects().length === 0) leave.abort();
|
|
633
|
+
});
|
|
634
|
+
watch.observe(button);
|
|
635
|
+
/** A chosen link closes the sheet once its own handlers ran, an enhanced navigation's included. */
|
|
636
|
+
const choose = (event, close) => {
|
|
637
|
+
const target = event.target;
|
|
638
|
+
if (!target?.closest?.("a[href]")) return;
|
|
639
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
640
|
+
// A tree branch's disclosure inside its link only expands the branch.
|
|
641
|
+
if (target.closest("[data-k2b-nav-tree-toggle]")) return;
|
|
642
|
+
// A task, not a microtask: the document's delegated handlers run later in this dispatch.
|
|
643
|
+
setTimeout(close);
|
|
644
|
+
};
|
|
645
|
+
void dialogCore.open((close, context) => {
|
|
646
|
+
let dispose;
|
|
647
|
+
const view = createRoot(disposeRoot => {
|
|
648
|
+
dispose = disposeRoot;
|
|
649
|
+
return _$createComponent(BottomSheet, {
|
|
650
|
+
get onDismiss() {
|
|
651
|
+
return context.requestDismiss;
|
|
652
|
+
},
|
|
653
|
+
get children() {
|
|
654
|
+
return [_$createComponent(BottomSheet.Header, {
|
|
655
|
+
get title() {
|
|
656
|
+
return props.label;
|
|
657
|
+
},
|
|
658
|
+
close: () => void context.requestDismiss()
|
|
659
|
+
}), _$createComponent(BottomSheet.Body, {
|
|
660
|
+
get children() {
|
|
661
|
+
return _$createComponent(RenderErrorBoundary, {
|
|
662
|
+
onClose: () => void context.requestDismiss(),
|
|
663
|
+
content: () => {
|
|
664
|
+
const resolved = children(() => flatten(props.hidden ? undefined : props.children).filter(sidebarChildSlot).find(slot => slot.kind === SIDEBAR_DESKTOP)?.children);
|
|
665
|
+
// Pre-resolved children belong to the row; inserting them here would move its nodes into the sheet.
|
|
666
|
+
if (resolved.toArray().some(node => node instanceof Node && aside?.contains(node))) {
|
|
667
|
+
console.error("AppWorkspace.Sidebar: write the sidebar children as JSX inside AppWorkspace.Sidebar so they can render a second time in the All sheet; pre-resolved children cannot be reused.");
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
return _$ssr(_tmpl$11, _$ssrAttribute("aria-label", _$escape(props.label, true), false), _$ssrStyle(accent), _$escape(resolved()));
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
})];
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
}, owner);
|
|
678
|
+
onCleanup(() => dispose?.());
|
|
679
|
+
return view;
|
|
680
|
+
},
|
|
681
|
+
// No history entry: an application may replace the URL from inside the sidebar, such as a search, and an
|
|
682
|
+
// entry of the sheet would then outlive it. So Back leaves the page here, unlike other phone sheets.
|
|
683
|
+
{
|
|
684
|
+
...bottomSheetAdaptiveOptions,
|
|
685
|
+
ariaLabel: props.label,
|
|
686
|
+
signal: leave.signal
|
|
687
|
+
}).finally(() => {
|
|
688
|
+
watch.disconnect();
|
|
689
|
+
setSheetOpen(false);
|
|
690
|
+
if (button.isConnected && !aside?.contains(document.activeElement)) {
|
|
691
|
+
if (button.getClientRects().length) button.focus({
|
|
692
|
+
preventScroll: true
|
|
693
|
+
});else {
|
|
694
|
+
const current = aside?.querySelector("[aria-current], .k2b-app-workspace__sidebar-item.is-active");
|
|
695
|
+
const link = current?.matches("a[href]") ? current : current?.querySelector("a[href]");
|
|
696
|
+
(link ?? aside?.querySelector("a[href]"))?.focus({
|
|
697
|
+
preventScroll: true
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
});
|
|
702
|
+
};
|
|
703
|
+
return [_$createComponent(Dynamic, {
|
|
704
|
+
get component() {
|
|
705
|
+
return stacked() ? "nav" : "aside";
|
|
706
|
+
},
|
|
707
|
+
get id() {
|
|
708
|
+
return domId();
|
|
709
|
+
},
|
|
710
|
+
get ["class"]() {
|
|
711
|
+
return `k2b-app-workspace__sidebar ${props.class ?? ""}`;
|
|
712
|
+
},
|
|
713
|
+
get ["aria-label"]() {
|
|
714
|
+
return props.label;
|
|
715
|
+
},
|
|
716
|
+
get hidden() {
|
|
717
|
+
return props.hidden || undefined;
|
|
718
|
+
},
|
|
719
|
+
get ["data-mobile"]() {
|
|
720
|
+
return stacked() ? "stacked" : undefined;
|
|
721
|
+
},
|
|
722
|
+
get ["data-workspace-resizable"]() {
|
|
723
|
+
return resizable() ? "true" : "false";
|
|
724
|
+
},
|
|
725
|
+
get ["data-workspace-collapsible"]() {
|
|
726
|
+
return props.collapsible ? "true" : "false";
|
|
727
|
+
},
|
|
728
|
+
get ["data-workspace-hideable"]() {
|
|
729
|
+
return props.onHiddenChange ? "true" : undefined;
|
|
561
730
|
},
|
|
562
731
|
get children() {
|
|
563
|
-
return _$
|
|
732
|
+
return _$createComponent(Show, {
|
|
733
|
+
get when() {
|
|
734
|
+
return !props.hidden;
|
|
735
|
+
},
|
|
736
|
+
get children() {
|
|
737
|
+
return [_$ssr(_tmpl$12, _$ssrAttribute("data-scroll-fade-mode", stacked() ? "both" : _$escape(undefined, true), false) + _$ssrAttribute("data-scroll-fade-axis", stacked() ? "horizontal" : _$escape(undefined, true), false), _$escape(desktop()?.children)), _$createComponent(Show, {
|
|
738
|
+
get when() {
|
|
739
|
+
return stacked();
|
|
740
|
+
},
|
|
741
|
+
get children() {
|
|
742
|
+
return [_$ssr(_tmpl$13, _$ssrAttribute("aria-expanded", _$escape(sheetOpen(), true), false) + _$ssrAttribute("aria-label", props.label ? _$escape(workspaceMessages().sidebarAllLabel({
|
|
743
|
+
label: props.label
|
|
744
|
+
}), true) : _$escape(undefined, true), false), _$escape(workspaceMessages().sidebarAll)), _$ssr(_tmpl$14, CHIP_ROW_SCRIPT)];
|
|
745
|
+
}
|
|
746
|
+
})];
|
|
747
|
+
}
|
|
748
|
+
});
|
|
564
749
|
}
|
|
565
|
-
})
|
|
750
|
+
}), _$createComponent(Show, {
|
|
566
751
|
get when() {
|
|
567
752
|
return _$memo(() => !!resizable())() && !props.hidden;
|
|
568
753
|
},
|
|
@@ -589,6 +774,29 @@ function AppWorkspaceSidebar(props) {
|
|
|
589
774
|
}
|
|
590
775
|
})];
|
|
591
776
|
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* A chip row that overflows shows the current object, centered when it is
|
|
780
|
+
* not in view from the row's start, and fades its cut edges. Self-contained, because the inline script after server markup
|
|
781
|
+
* embeds its source and runs it before the first paint; at 64 rem the column
|
|
782
|
+
* does not overflow sideways and nothing changes.
|
|
783
|
+
*/
|
|
784
|
+
function settleChipRow(row, edges) {
|
|
785
|
+
if (!(row instanceof HTMLElement) || row.scrollWidth - row.clientWidth <= 1) return;
|
|
786
|
+
const current = row.querySelector(".k2b-app-workspace__sidebar-item.is-active, [aria-current]");
|
|
787
|
+
const chip = current && (current.closest(".k2b-app-workspace__sidebar-item") || current);
|
|
788
|
+
if (chip) {
|
|
789
|
+
// From the row's start, whatever scrolled it before (a body's own restore
|
|
790
|
+
// runs first on the client, last on the server), so both paths agree.
|
|
791
|
+
row.scrollLeft = 0;
|
|
792
|
+
const bounds = row.getBoundingClientRect();
|
|
793
|
+
const item = chip.getBoundingClientRect();
|
|
794
|
+
if (item.left < bounds.left || item.right > bounds.right) row.scrollLeft += item.left - bounds.left - (bounds.width - item.width) / 2;
|
|
795
|
+
}
|
|
796
|
+
const fade = edges(row);
|
|
797
|
+
if (fade) row.setAttribute("data-scroll-fade", fade);
|
|
798
|
+
}
|
|
799
|
+
const CHIP_ROW_SCRIPT = `(${settleChipRow})(document.currentScript&&document.currentScript.parentElement.querySelector(":scope>.k2b-app-workspace__sidebar-desktop"),${scrollFadeEdges})`;
|
|
592
800
|
const AppWorkspaceSidebarDesktop = props => ({
|
|
593
801
|
kind: SIDEBAR_DESKTOP,
|
|
594
802
|
children: props.children
|
|
@@ -613,7 +821,7 @@ const AppWorkspaceSidebarBody = props => {
|
|
|
613
821
|
get ["data-scroll-fade-mode"]() {
|
|
614
822
|
return props.scrollFade !== false ? "both" : undefined;
|
|
615
823
|
}
|
|
616
|
-
}, () => scrollAttrs(props.scrollPreserveKey), () => modeAttrs(props.sidebarMode)), _$escape(props.children), false), _$ssr(_tmpl$
|
|
824
|
+
}, () => scrollAttrs(props.scrollPreserveKey), () => modeAttrs(props.sidebarMode)), _$escape(props.children), false), _$ssr(_tmpl$14, SIDEBAR_SCROLL_MEMORY_SCRIPT)];
|
|
617
825
|
};
|
|
618
826
|
const AppWorkspaceSidebarFooter = props => _$ssrElement("footer", _$mergeProps({
|
|
619
827
|
get ["class"]() {
|
|
@@ -629,14 +837,14 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
629
837
|
return props.icon;
|
|
630
838
|
},
|
|
631
839
|
get children() {
|
|
632
|
-
return _$ssr(_tmpl$
|
|
840
|
+
return _$ssr(_tmpl$15, _$ssrAttribute("class", _$escape(iconClass(props.icon), true), false));
|
|
633
841
|
}
|
|
634
842
|
}), props.title, _$createComponent(Show, {
|
|
635
843
|
get when() {
|
|
636
844
|
return props.count !== undefined;
|
|
637
845
|
},
|
|
638
846
|
get children() {
|
|
639
|
-
return _$ssr(_tmpl$
|
|
847
|
+
return _$ssr(_tmpl$16, _$escape(props.count));
|
|
640
848
|
}
|
|
641
849
|
})];
|
|
642
850
|
return _$ssrElement("section", _$mergeProps({
|
|
@@ -651,7 +859,7 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
651
859
|
return props.title || props.actions;
|
|
652
860
|
},
|
|
653
861
|
get children() {
|
|
654
|
-
return _$ssr(_tmpl$
|
|
862
|
+
return _$ssr(_tmpl$19, _$escape(_$createComponent(Show, {
|
|
655
863
|
get when() {
|
|
656
864
|
return props.collapsible;
|
|
657
865
|
},
|
|
@@ -661,23 +869,23 @@ const AppWorkspaceSidebarSection = props => {
|
|
|
661
869
|
return props.title;
|
|
662
870
|
},
|
|
663
871
|
get children() {
|
|
664
|
-
return _$ssr(_tmpl$
|
|
872
|
+
return _$ssr(_tmpl$21, _$escape(title()));
|
|
665
873
|
}
|
|
666
874
|
});
|
|
667
875
|
},
|
|
668
876
|
get children() {
|
|
669
|
-
return _$ssr(_tmpl$
|
|
877
|
+
return _$ssr(_tmpl$17, _$ssrAttribute("aria-expanded", _$escape(open(), true), false) + _$ssrAttribute("aria-controls", _$escape(id, true), false), _$escape(title()), _$ssrAttribute("class", open() ? "ti ti-chevron-down" : "ti ti-chevron-right", false));
|
|
670
878
|
}
|
|
671
879
|
})), _$escape(_$createComponent(Show, {
|
|
672
880
|
get when() {
|
|
673
881
|
return props.actions;
|
|
674
882
|
},
|
|
675
883
|
get children() {
|
|
676
|
-
return _$ssr(_tmpl$
|
|
884
|
+
return _$ssr(_tmpl$18, _$escape(props.actions));
|
|
677
885
|
}
|
|
678
886
|
})));
|
|
679
887
|
}
|
|
680
|
-
})), _$ssr(_tmpl$
|
|
888
|
+
})), _$ssr(_tmpl$20, _$ssrAttribute("id", _$escape(id, true), false), _$ssrAttribute("hidden", !open(), true), _$escape(props.children))], false);
|
|
681
889
|
};
|
|
682
890
|
const AppWorkspaceSidebarItemIcon = props => mergeProps({
|
|
683
891
|
kind: SIDEBAR_ITEM_ICON
|
|
@@ -691,7 +899,7 @@ const AppWorkspaceSidebarItemMeta = props => mergeProps({
|
|
|
691
899
|
const AppWorkspaceSidebarItemAction = props => mergeProps({
|
|
692
900
|
kind: SIDEBAR_ITEM_ACTION
|
|
693
901
|
}, props);
|
|
694
|
-
const AppWorkspaceSidebarItemActions = props => _$ssr(_tmpl$
|
|
902
|
+
const AppWorkspaceSidebarItemActions = props => _$ssr(_tmpl$22, _$ssrAttribute("data-visibility", props.visibility === "hover" ? "hover" : _$escape(undefined, true), false), _$escape(props.children));
|
|
695
903
|
const AppWorkspaceSidebarItemStatus = props => {
|
|
696
904
|
const workspaceMessages = useWorkspaceMessages();
|
|
697
905
|
const waiting = () => props.waiting && Number.isFinite(props.waiting.count) ? Math.max(0, Math.floor(props.waiting.count)) : null;
|
|
@@ -707,7 +915,7 @@ const AppWorkspaceSidebarItemStatus = props => {
|
|
|
707
915
|
// The element itself stays when there is nothing to show: empty, it takes no
|
|
708
916
|
// space, and it still keeps the row's label on one line, so the first count
|
|
709
917
|
// never re-wraps the label and moves the rows below.
|
|
710
|
-
return _$ssr(_tmpl$
|
|
918
|
+
return _$ssr(_tmpl$28, _$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, {
|
|
711
919
|
get when() {
|
|
712
920
|
return description();
|
|
713
921
|
},
|
|
@@ -717,16 +925,16 @@ const AppWorkspaceSidebarItemStatus = props => {
|
|
|
717
925
|
return props.mention;
|
|
718
926
|
},
|
|
719
927
|
get children() {
|
|
720
|
-
return _$ssr(_tmpl$
|
|
928
|
+
return _$ssr(_tmpl$23);
|
|
721
929
|
}
|
|
722
930
|
}), _$createComponent(Show, {
|
|
723
931
|
get when() {
|
|
724
932
|
return props.muted;
|
|
725
933
|
},
|
|
726
934
|
get children() {
|
|
727
|
-
return _$ssr(_tmpl$
|
|
935
|
+
return _$ssr(_tmpl$24);
|
|
728
936
|
}
|
|
729
|
-
}), _$ssr(_tmpl$
|
|
937
|
+
}), _$ssr(_tmpl$26, _$escape(_$createComponent(Show, {
|
|
730
938
|
get when() {
|
|
731
939
|
return count() || waiting() === 0;
|
|
732
940
|
},
|
|
@@ -736,14 +944,14 @@ const AppWorkspaceSidebarItemStatus = props => {
|
|
|
736
944
|
return dot();
|
|
737
945
|
},
|
|
738
946
|
get children() {
|
|
739
|
-
return _$ssr(_tmpl$
|
|
947
|
+
return _$ssr(_tmpl$29);
|
|
740
948
|
}
|
|
741
949
|
});
|
|
742
950
|
},
|
|
743
951
|
get children() {
|
|
744
|
-
return _$ssr(_tmpl$
|
|
952
|
+
return _$ssr(_tmpl$25, _$ssrAttribute("data-mention", props.mention ? "true" : _$escape(undefined, true), false), count() > 99 ? "99+" : _$escape(count()));
|
|
745
953
|
}
|
|
746
|
-
}))), _$ssr(_tmpl$
|
|
954
|
+
}))), _$ssr(_tmpl$27, _$escape(description()))];
|
|
747
955
|
}
|
|
748
956
|
})));
|
|
749
957
|
};
|
|
@@ -883,19 +1091,22 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
883
1091
|
return iconContent() || icon();
|
|
884
1092
|
},
|
|
885
1093
|
get children() {
|
|
886
|
-
return _$ssr(_tmpl$
|
|
1094
|
+
return _$ssr(_tmpl$30, _$ssrAttribute("class",
|
|
1095
|
+
// An object row's own glyph sits in a soft chip of the app colour; custom content such as an avatar keeps
|
|
1096
|
+
// its own look.
|
|
1097
|
+
props.variant === "object" && !iconContent() ? "k2b-app-workspace__sidebar-item-icon k2b-icon-tile" : "k2b-app-workspace__sidebar-item-icon", false), _$escape(iconContent() ?? _$ssr(_tmpl$36, _$ssrAttribute("class", _$escape(iconClass(icon()), true), false))));
|
|
887
1098
|
}
|
|
888
|
-
}), _$ssr(_tmpl$
|
|
1099
|
+
}), _$ssr(_tmpl$34, _$escape(_$createComponent(Show, {
|
|
889
1100
|
get when() {
|
|
890
1101
|
return props.context || props.contextMeta;
|
|
891
1102
|
},
|
|
892
1103
|
get children() {
|
|
893
|
-
return _$ssr(_tmpl$
|
|
1104
|
+
return _$ssr(_tmpl$32, _$escape(props.context), _$escape(_$createComponent(Show, {
|
|
894
1105
|
get when() {
|
|
895
1106
|
return props.contextMeta;
|
|
896
1107
|
},
|
|
897
1108
|
get children() {
|
|
898
|
-
return _$ssr(_tmpl$
|
|
1109
|
+
return _$ssr(_tmpl$31, _$escape(props.contextMeta));
|
|
899
1110
|
}
|
|
900
1111
|
})));
|
|
901
1112
|
}
|
|
@@ -904,14 +1115,14 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
904
1115
|
return props.description;
|
|
905
1116
|
},
|
|
906
1117
|
get children() {
|
|
907
|
-
return _$ssr(_tmpl$
|
|
1118
|
+
return _$ssr(_tmpl$33, _$escape(props.description));
|
|
908
1119
|
}
|
|
909
1120
|
}))), _$createComponent(Show, {
|
|
910
1121
|
get when() {
|
|
911
1122
|
return hasMeta();
|
|
912
1123
|
},
|
|
913
1124
|
get children() {
|
|
914
|
-
return _$ssr(_tmpl$
|
|
1125
|
+
return _$ssr(_tmpl$35, _$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()));
|
|
915
1126
|
}
|
|
916
1127
|
})];
|
|
917
1128
|
const singleAction = () => {
|
|
@@ -926,7 +1137,7 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
926
1137
|
actionSlot()?.onSelect?.(event);
|
|
927
1138
|
props.onActionClick?.(event);
|
|
928
1139
|
};
|
|
929
|
-
const content = () => actionSlot()?.children ?? _$ssr(_tmpl$
|
|
1140
|
+
const content = () => actionSlot()?.children ?? _$ssr(_tmpl$36, _$ssrAttribute("class", _$escape(iconClass(actionSlot()?.icon ?? props.actionIcon, "ti-dots"), true), false));
|
|
930
1141
|
return _$createComponent(Show, {
|
|
931
1142
|
get when() {
|
|
932
1143
|
return Boolean(actionSlot() || props.actionIcon);
|
|
@@ -937,10 +1148,10 @@ function AppWorkspaceSidebarItem(props) {
|
|
|
937
1148
|
return _$memo(() => !!actionSlot()?.href)() && !actionSlot()?.disabled;
|
|
938
1149
|
},
|
|
939
1150
|
get fallback() {
|
|
940
|
-
return _$ssr(_tmpl$
|
|
1151
|
+
return _$ssr(_tmpl$38, _$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()));
|
|
941
1152
|
},
|
|
942
1153
|
get children() {
|
|
943
|
-
return _$ssr(_tmpl$
|
|
1154
|
+
return _$ssr(_tmpl$37, _$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()));
|
|
944
1155
|
}
|
|
945
1156
|
});
|
|
946
1157
|
}
|
|
@@ -1246,31 +1457,31 @@ const AppWorkspaceNavTree = props => {
|
|
|
1246
1457
|
get ["data-k2b-nav-tree-toggle"]() {
|
|
1247
1458
|
return usesIconDisclosure() ? "" : undefined;
|
|
1248
1459
|
}
|
|
1249
|
-
}, () => iconAccessibility(item.iconLabel)), _$ssr(_tmpl$
|
|
1460
|
+
}, () => iconAccessibility(item.iconLabel)), _$ssr(_tmpl$36, _$ssrAttribute("class", _$escape(iconClass(rowIcon()), true), false)), false);
|
|
1250
1461
|
}
|
|
1251
1462
|
}), _$createComponent(Show, {
|
|
1252
1463
|
get when() {
|
|
1253
1464
|
return item.description !== undefined;
|
|
1254
1465
|
},
|
|
1255
1466
|
get fallback() {
|
|
1256
|
-
return _$ssr(_tmpl$
|
|
1467
|
+
return _$ssr(_tmpl$42, _$ssrAttribute("data-label", typeof item.label === "string" ? _$escape(item.label, true) : _$escape(undefined, true), false), _$escape(item.label));
|
|
1257
1468
|
},
|
|
1258
1469
|
get children() {
|
|
1259
|
-
return _$ssr(_tmpl$
|
|
1470
|
+
return _$ssr(_tmpl$39, _$ssrAttribute("data-label", typeof item.label === "string" ? _$escape(item.label, true) : _$escape(undefined, true), false), _$escape(item.label), _$escape(item.description));
|
|
1260
1471
|
}
|
|
1261
1472
|
}), _$createComponent(Show, {
|
|
1262
1473
|
get when() {
|
|
1263
1474
|
return item.meta !== undefined;
|
|
1264
1475
|
},
|
|
1265
1476
|
get children() {
|
|
1266
|
-
return _$ssr(_tmpl$
|
|
1477
|
+
return _$ssr(_tmpl$40, `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));
|
|
1267
1478
|
}
|
|
1268
1479
|
}), _$createComponent(Show, {
|
|
1269
1480
|
get when() {
|
|
1270
1481
|
return _$memo(() => !!hasChildren())() && !usesIconDisclosure();
|
|
1271
1482
|
},
|
|
1272
1483
|
get children() {
|
|
1273
|
-
return _$ssr(_tmpl$
|
|
1484
|
+
return _$ssr(_tmpl$41, `ti ${isExpanded(item.id) ? "ti-chevron-down" : "ti-chevron-right"}`);
|
|
1274
1485
|
}
|
|
1275
1486
|
})];
|
|
1276
1487
|
const row = () => _$createComponent(AppWorkspaceSidebarRow, {
|
|
@@ -1377,12 +1588,12 @@ const AppWorkspaceNavTree = props => {
|
|
|
1377
1588
|
endDrag();
|
|
1378
1589
|
requestMove(target.move, false);
|
|
1379
1590
|
};
|
|
1380
|
-
return _$ssr(_tmpl$
|
|
1591
|
+
return _$ssr(_tmpl$44, _$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, {
|
|
1381
1592
|
get when() {
|
|
1382
1593
|
return _$memo(() => !!hasChildren())() && isExpanded(item.id);
|
|
1383
1594
|
},
|
|
1384
1595
|
get children() {
|
|
1385
|
-
return _$ssr(_tmpl$
|
|
1596
|
+
return _$ssr(_tmpl$43, _$escape(renderItems(nested, depth + 1, item.id)));
|
|
1386
1597
|
}
|
|
1387
1598
|
})));
|
|
1388
1599
|
}
|
|
@@ -1407,7 +1618,7 @@ const AppWorkspaceNavTree = props => {
|
|
|
1407
1618
|
doc?.removeEventListener("pointermove", forgetDrag, true);
|
|
1408
1619
|
});
|
|
1409
1620
|
});
|
|
1410
|
-
return _$ssr(_tmpl$
|
|
1621
|
+
return _$ssr(_tmpl$45, `k2b-app-workspace__nav-tree ${_$escape(props.class ?? "", true)}`, _$ssrAttribute("aria-label", _$escape(props.ariaLabel, true), false), _$escape(renderItems(roots, 0)));
|
|
1411
1622
|
};
|
|
1412
1623
|
AppWorkspaceNavTree.Item = AppWorkspaceNavTreeItem;
|
|
1413
1624
|
const AppWorkspaceSidebarIconGrid = props => _$ssrElement("section", _$mergeProps({
|
|
@@ -1418,10 +1629,10 @@ const AppWorkspaceSidebarIconGrid = props => _$ssrElement("section", _$mergeProp
|
|
|
1418
1629
|
get when() {
|
|
1419
1630
|
return props.title;
|
|
1420
1631
|
},
|
|
1421
|
-
children: title => _$ssr(_tmpl$
|
|
1422
|
-
})), _$ssr(_tmpl$
|
|
1632
|
+
children: title => _$ssr(_tmpl$21, _$escape(title()))
|
|
1633
|
+
})), _$ssr(_tmpl$46, _$ssrAttribute("data-columns", _$escape(props.columns ?? 2, true), false), _$escape(props.children))], false);
|
|
1423
1634
|
const AppWorkspaceSidebarIconAction = props => {
|
|
1424
|
-
const content = _$ssr(_tmpl$
|
|
1635
|
+
const content = _$ssr(_tmpl$47, _$ssrAttribute("class", _$escape(iconClass(props.icon), true), false));
|
|
1425
1636
|
const attrs = () => ({
|
|
1426
1637
|
class: `k2b-app-workspace__sidebar-icon-action ${props.active ? "is-active" : ""}`,
|
|
1427
1638
|
title: props.label,
|
|
@@ -1470,16 +1681,28 @@ const AppWorkspaceSidebarIconAction = props => {
|
|
|
1470
1681
|
* host's page title with the way up (see `PageTitle`); the page's own
|
|
1471
1682
|
* `PageTitle` takes its place. The visible title is no heading, because many
|
|
1472
1683
|
* pages render their own `h1`. From 64 rem a sidebar that marks the current
|
|
1473
|
-
* page names it already: the
|
|
1474
|
-
* `h1` its heading stays for assistive technology.
|
|
1475
|
-
*
|
|
1476
|
-
*
|
|
1684
|
+
* page names it already: the title and the way up hide, and only on a page
|
|
1685
|
+
* without its own `h1` its heading stays for assistive technology. With an
|
|
1686
|
+
* `AppWorkspace.Head` slot the row is always there and also carries the
|
|
1687
|
+
* views, the filters, the result count, and the actions; only its title
|
|
1688
|
+
* follows the rules above. It draws no line; CSS decides what shows and when
|
|
1689
|
+
* the filters wrap, so the server-rendered page already has its final
|
|
1690
|
+
* geometry.
|
|
1477
1691
|
*/
|
|
1478
1692
|
function AppWorkspaceHead(props) {
|
|
1479
1693
|
const messages = useWorkspaceMessages();
|
|
1694
|
+
const filters = useFilterMessages();
|
|
1695
|
+
// JSX prop getters construct their elements on every read. Share each
|
|
1696
|
+
// resolved slot between its presence check and its rendered content.
|
|
1697
|
+
const resolvedViews = children(() => props.head?.views);
|
|
1698
|
+
const resolvedFilters = children(() => props.head?.filters);
|
|
1699
|
+
const resolvedActions = children(() => props.head?.actions);
|
|
1700
|
+
const resolvedCount = children(() => props.head?.count);
|
|
1480
1701
|
// A nested workspace is part of a page that already shows its title.
|
|
1481
1702
|
const trail = props.nested ? () => undefined : usePageTrail();
|
|
1482
|
-
|
|
1703
|
+
const resetContent = () => filters().reset;
|
|
1704
|
+
const primaryContent = () => [_$ssr(_tmpl$47, _$ssrAttribute("class", _$escape(props.head?.primary?.icon, true), false)), _$ssr(_tmpl$48, _$escape(props.head?.primary?.label))];
|
|
1705
|
+
return _$ssr(_tmpl$54, _$ssrAttribute("data-trail", trail()?.ancestors.length ? "up" : trail() ? "title" : _$escape(undefined, true), false) + _$ssrAttribute("data-row", props.head ? "" : _$escape(undefined, true), false), _$escape(_$createComponent(IconButton, {
|
|
1483
1706
|
"class": "k2b-app-workspace__head-toggle",
|
|
1484
1707
|
get label() {
|
|
1485
1708
|
return messages().showNavigation;
|
|
@@ -1490,7 +1713,7 @@ function AppWorkspaceHead(props) {
|
|
|
1490
1713
|
"aria-expanded": "false",
|
|
1491
1714
|
"data-app-workspace-sidebar-toggle": "",
|
|
1492
1715
|
get children() {
|
|
1493
|
-
return _$ssr(_tmpl$
|
|
1716
|
+
return _$ssr(_tmpl$49);
|
|
1494
1717
|
}
|
|
1495
1718
|
})), _$escape(_$createComponent(Show, {
|
|
1496
1719
|
get when() {
|
|
@@ -1502,7 +1725,113 @@ function AppWorkspaceHead(props) {
|
|
|
1502
1725
|
},
|
|
1503
1726
|
as: "p",
|
|
1504
1727
|
fallback: true
|
|
1505
|
-
}), _$ssr(_tmpl$
|
|
1728
|
+
}), _$ssr(_tmpl$55, _$ssrAttribute("data-k2b-server", isServer ? "" : _$escape(undefined, true), false), _$escape(current().title))]
|
|
1729
|
+
})), _$escape(_$createComponent(Show, {
|
|
1730
|
+
get when() {
|
|
1731
|
+
return resolvedViews.toArray().some(Boolean);
|
|
1732
|
+
},
|
|
1733
|
+
get children() {
|
|
1734
|
+
return _$ssr(_tmpl$50, _$escape(resolvedViews()));
|
|
1735
|
+
}
|
|
1736
|
+
})), _$escape(_$createComponent(Show, {
|
|
1737
|
+
get when() {
|
|
1738
|
+
return resolvedFilters.toArray().some(Boolean) || props.head?.filtered;
|
|
1739
|
+
},
|
|
1740
|
+
get children() {
|
|
1741
|
+
return _$ssr(_tmpl$51, _$ssrAttribute("aria-label", _$escape(filters().filters, true), false), _$escape(resolvedFilters()), _$escape(_$createComponent(Show, {
|
|
1742
|
+
get when() {
|
|
1743
|
+
return props.head?.filtered;
|
|
1744
|
+
},
|
|
1745
|
+
get children() {
|
|
1746
|
+
return _$createComponent(Show, {
|
|
1747
|
+
get when() {
|
|
1748
|
+
return props.head?.resetHref;
|
|
1749
|
+
},
|
|
1750
|
+
get fallback() {
|
|
1751
|
+
return _$createComponent(Button, {
|
|
1752
|
+
variant: "ghost",
|
|
1753
|
+
size: "sm",
|
|
1754
|
+
"class": "k2b-app-workspace__head-reset",
|
|
1755
|
+
onClick: () => props.head?.onReset?.(),
|
|
1756
|
+
get children() {
|
|
1757
|
+
return resetContent();
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1760
|
+
},
|
|
1761
|
+
children: href => _$createComponent(ButtonLink, {
|
|
1762
|
+
variant: "ghost",
|
|
1763
|
+
size: "sm",
|
|
1764
|
+
"class": "k2b-app-workspace__head-reset",
|
|
1765
|
+
get href() {
|
|
1766
|
+
return href();
|
|
1767
|
+
},
|
|
1768
|
+
get onClick() {
|
|
1769
|
+
return props.head?.onReset ? event => {
|
|
1770
|
+
if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;
|
|
1771
|
+
event.preventDefault();
|
|
1772
|
+
props.head?.onReset?.();
|
|
1773
|
+
} : undefined;
|
|
1774
|
+
},
|
|
1775
|
+
get children() {
|
|
1776
|
+
return resetContent();
|
|
1777
|
+
}
|
|
1778
|
+
})
|
|
1779
|
+
});
|
|
1780
|
+
}
|
|
1781
|
+
})));
|
|
1782
|
+
}
|
|
1783
|
+
})), _$escape(_$createComponent(Show, {
|
|
1784
|
+
get when() {
|
|
1785
|
+
return _$memo(() => !!props.head?.filtered)() && resolvedCount.toArray().some(value => value !== undefined && value !== null && value !== false);
|
|
1786
|
+
},
|
|
1787
|
+
get children() {
|
|
1788
|
+
return _$ssr(_tmpl$52, _$escape(resolvedCount()));
|
|
1789
|
+
}
|
|
1790
|
+
})), _$escape(_$createComponent(Show, {
|
|
1791
|
+
get when() {
|
|
1792
|
+
return resolvedActions.toArray().some(Boolean) || props.head?.primary;
|
|
1793
|
+
},
|
|
1794
|
+
get children() {
|
|
1795
|
+
return _$ssr(_tmpl$53, _$escape(resolvedActions()), _$escape(_$createComponent(Show, {
|
|
1796
|
+
get when() {
|
|
1797
|
+
return props.head?.primary;
|
|
1798
|
+
},
|
|
1799
|
+
children: primary => _$createComponent(Show, {
|
|
1800
|
+
get when() {
|
|
1801
|
+
return primary().href;
|
|
1802
|
+
},
|
|
1803
|
+
get fallback() {
|
|
1804
|
+
return _$createComponent(Button, {
|
|
1805
|
+
variant: "primary",
|
|
1806
|
+
size: "sm",
|
|
1807
|
+
"class": "k2b-app-workspace__head-primary",
|
|
1808
|
+
"data-workspace-primary": "",
|
|
1809
|
+
get onClick() {
|
|
1810
|
+
return primary().onClick;
|
|
1811
|
+
},
|
|
1812
|
+
get children() {
|
|
1813
|
+
return primaryContent();
|
|
1814
|
+
}
|
|
1815
|
+
});
|
|
1816
|
+
},
|
|
1817
|
+
children: href => _$createComponent(ButtonLink, {
|
|
1818
|
+
variant: "primary",
|
|
1819
|
+
size: "sm",
|
|
1820
|
+
"class": "k2b-app-workspace__head-primary",
|
|
1821
|
+
"data-workspace-primary": "",
|
|
1822
|
+
get href() {
|
|
1823
|
+
return href();
|
|
1824
|
+
},
|
|
1825
|
+
get onClick() {
|
|
1826
|
+
return primary().onClick;
|
|
1827
|
+
},
|
|
1828
|
+
get children() {
|
|
1829
|
+
return primaryContent();
|
|
1830
|
+
}
|
|
1831
|
+
})
|
|
1832
|
+
})
|
|
1833
|
+
})));
|
|
1834
|
+
}
|
|
1506
1835
|
})));
|
|
1507
1836
|
}
|
|
1508
1837
|
const AppWorkspace = props => {
|
|
@@ -1530,6 +1859,20 @@ const AppWorkspace = props => {
|
|
|
1530
1859
|
writeState: state => props.onLayoutChange?.(state)
|
|
1531
1860
|
}));
|
|
1532
1861
|
});
|
|
1862
|
+
const contents = () => {
|
|
1863
|
+
const resolved = children(() => props.children);
|
|
1864
|
+
const slots = createMemo(() => flatten(resolved()));
|
|
1865
|
+
// Same props object, same memo value: a sibling change must not rebuild the head's slots.
|
|
1866
|
+
const head = createMemo(() => slots().find(headSlot)?.props);
|
|
1867
|
+
const content = () => slots().filter(value => !headSlot(value));
|
|
1868
|
+
return [_$createComponent(AppWorkspaceHead, {
|
|
1869
|
+
sidebarId: sidebarId,
|
|
1870
|
+
nested: nested,
|
|
1871
|
+
get head() {
|
|
1872
|
+
return head();
|
|
1873
|
+
}
|
|
1874
|
+
}), content()];
|
|
1875
|
+
};
|
|
1533
1876
|
return _$createComponent(ResizeContext.Provider, {
|
|
1534
1877
|
get value() {
|
|
1535
1878
|
return props.resizable !== false;
|
|
@@ -1538,10 +1881,7 @@ const AppWorkspace = props => {
|
|
|
1538
1881
|
return _$createComponent(WorkspaceContext.Provider, {
|
|
1539
1882
|
value: workspace,
|
|
1540
1883
|
get children() {
|
|
1541
|
-
return _$ssr(_tmpl$
|
|
1542
|
-
sidebarId: sidebarId,
|
|
1543
|
-
nested: nested
|
|
1544
|
-
})), _$escape(props.children));
|
|
1884
|
+
return _$ssr(_tmpl$56, `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(contents()));
|
|
1545
1885
|
}
|
|
1546
1886
|
});
|
|
1547
1887
|
}
|
|
@@ -1555,7 +1895,8 @@ AppWorkspace.LayoutStateProvider = props => _$createComponent(LayoutStateContext
|
|
|
1555
1895
|
return props.children;
|
|
1556
1896
|
}
|
|
1557
1897
|
});
|
|
1558
|
-
AppWorkspace.
|
|
1898
|
+
AppWorkspace.Head = AppWorkspaceHeadSlot;
|
|
1899
|
+
AppWorkspace.Content = props => _$ssr(_tmpl$57, `k2b-app-workspace__content ${_$escape(props.class ?? "", true)}`, _$escape(props.children));
|
|
1559
1900
|
AppWorkspace.Main = AppWorkspaceMain;
|
|
1560
1901
|
AppWorkspace.MainPane = AppWorkspaceMainPane;
|
|
1561
1902
|
AppWorkspace.Detail = AppWorkspaceDetail;
|