@devalok/shilp-sutra 0.27.2 → 0.29.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/dist/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +977 -814
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +64 -64
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.d.ts +19 -5
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +371 -79
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +30 -30
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/radio.js +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +40 -26
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.js +41 -41
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/color-input.md +58 -4
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +724 -44
- package/llms.txt +38 -19
- package/package.json +8 -2
|
@@ -1,114 +1,114 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { useCallback as
|
|
5
|
-
import { IconLayoutDashboard as
|
|
6
|
-
import { CommandPalette as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import * as z from "react";
|
|
4
|
+
import { useCallback as T, useMemo as p } from "react";
|
|
5
|
+
import { IconLayoutDashboard as G, IconCalendarCheck as M, IconUmbrella as N, IconLayoutKanban as $, IconListCheck as w, IconBook as H, IconAdjustmentsHorizontal as q, IconUserCircle as Q, IconShieldCheck as W, IconClipboardList as X, IconUserPlus as Z, IconSettings as R, IconFileText as ee, IconPackage as ne, IconLink as oe, IconVideo as te, IconMessage as ae, IconUsers as ie } from "@tabler/icons-react";
|
|
6
|
+
import { CommandPalette as ce } from "../composed/command-palette.js";
|
|
7
|
+
import { Icon as t } from "../ui/icon.js";
|
|
8
|
+
import { cn as de } from "../ui/lib/utils.js";
|
|
9
|
+
import { useCommandRegistry as se } from "./command-registry.js";
|
|
9
10
|
const le = {
|
|
10
|
-
TASK: /* @__PURE__ */ n(
|
|
11
|
-
PROJECT: /* @__PURE__ */ n(
|
|
12
|
-
USER: /* @__PURE__ */ n(
|
|
13
|
-
COMMENT: /* @__PURE__ */ n(
|
|
14
|
-
MEETING: /* @__PURE__ */ n(
|
|
15
|
-
LINK: /* @__PURE__ */ n(
|
|
16
|
-
DELIVERABLE: /* @__PURE__ */ n(
|
|
11
|
+
TASK: /* @__PURE__ */ n(t, { icon: w }),
|
|
12
|
+
PROJECT: /* @__PURE__ */ n(t, { icon: $ }),
|
|
13
|
+
USER: /* @__PURE__ */ n(t, { icon: ie }),
|
|
14
|
+
COMMENT: /* @__PURE__ */ n(t, { icon: ae }),
|
|
15
|
+
MEETING: /* @__PURE__ */ n(t, { icon: te }),
|
|
16
|
+
LINK: /* @__PURE__ */ n(t, { icon: oe }),
|
|
17
|
+
DELIVERABLE: /* @__PURE__ */ n(t, { icon: ne })
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
+
function re(e) {
|
|
19
20
|
return [
|
|
20
21
|
{
|
|
21
22
|
id: "nav-dashboard",
|
|
22
23
|
label: "Dashboard",
|
|
23
|
-
icon: /* @__PURE__ */ n(
|
|
24
|
+
icon: /* @__PURE__ */ n(t, { icon: G }),
|
|
24
25
|
onSelect: () => e("/")
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
id: "nav-attendance",
|
|
28
29
|
label: "Attendance",
|
|
29
|
-
icon: /* @__PURE__ */ n(
|
|
30
|
+
icon: /* @__PURE__ */ n(t, { icon: M }),
|
|
30
31
|
onSelect: () => e("/attendance")
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
id: "nav-breaks",
|
|
34
35
|
label: "Breaks",
|
|
35
|
-
icon: /* @__PURE__ */ n(
|
|
36
|
+
icon: /* @__PURE__ */ n(t, { icon: N }),
|
|
36
37
|
onSelect: () => e("/breaks")
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
id: "nav-projects",
|
|
40
41
|
label: "Projects",
|
|
41
|
-
icon: /* @__PURE__ */ n(
|
|
42
|
+
icon: /* @__PURE__ */ n(t, { icon: $ }),
|
|
42
43
|
onSelect: () => e("/projects")
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
id: "nav-my-tasks",
|
|
46
47
|
label: "My Tasks",
|
|
47
|
-
icon: /* @__PURE__ */ n(
|
|
48
|
+
icon: /* @__PURE__ */ n(t, { icon: w }),
|
|
48
49
|
onSelect: () => e("/my-tasks")
|
|
49
50
|
},
|
|
50
51
|
{
|
|
51
52
|
id: "nav-devsabha",
|
|
52
53
|
label: "Devsabha",
|
|
53
|
-
icon: /* @__PURE__ */ n(
|
|
54
|
+
icon: /* @__PURE__ */ n(t, { icon: H }),
|
|
54
55
|
onSelect: () => e("/devsabha")
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
id: "nav-adjustments",
|
|
58
59
|
label: "Adjustments",
|
|
59
|
-
icon: /* @__PURE__ */ n(
|
|
60
|
+
icon: /* @__PURE__ */ n(t, { icon: q }),
|
|
60
61
|
onSelect: () => e("/adjustments")
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
id: "nav-profile",
|
|
64
65
|
label: "Profile",
|
|
65
|
-
icon: /* @__PURE__ */ n(
|
|
66
|
+
icon: /* @__PURE__ */ n(t, { icon: Q }),
|
|
66
67
|
onSelect: () => e("/profile")
|
|
67
68
|
}
|
|
68
69
|
];
|
|
69
70
|
}
|
|
70
|
-
function
|
|
71
|
+
function me(e) {
|
|
71
72
|
return [
|
|
72
73
|
{
|
|
73
74
|
id: "nav-admin-dashboard",
|
|
74
75
|
label: "Admin Dashboard",
|
|
75
|
-
icon: /* @__PURE__ */ n(
|
|
76
|
+
icon: /* @__PURE__ */ n(t, { icon: W }),
|
|
76
77
|
onSelect: () => e("/admin")
|
|
77
78
|
},
|
|
78
79
|
{
|
|
79
80
|
id: "nav-admin-breaks",
|
|
80
81
|
label: "Manage Breaks",
|
|
81
|
-
icon: /* @__PURE__ */ n(
|
|
82
|
+
icon: /* @__PURE__ */ n(t, { icon: N }),
|
|
82
83
|
onSelect: () => e("/admin/breaks")
|
|
83
84
|
},
|
|
84
85
|
{
|
|
85
86
|
id: "nav-admin-attendance",
|
|
86
87
|
label: "Manage Attendance",
|
|
87
|
-
icon: /* @__PURE__ */ n(
|
|
88
|
+
icon: /* @__PURE__ */ n(t, { icon: M }),
|
|
88
89
|
onSelect: () => e("/admin/attendance")
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
92
|
id: "nav-admin-lokwasi",
|
|
92
93
|
label: "Lokwasi",
|
|
93
|
-
icon: /* @__PURE__ */ n(
|
|
94
|
+
icon: /* @__PURE__ */ n(t, { icon: X }),
|
|
94
95
|
onSelect: () => e("/admin/lokwasi")
|
|
95
96
|
},
|
|
96
97
|
{
|
|
97
98
|
id: "nav-admin-onboarding",
|
|
98
99
|
label: "Onboarding",
|
|
99
|
-
icon: /* @__PURE__ */ n(
|
|
100
|
+
icon: /* @__PURE__ */ n(t, { icon: Z }),
|
|
100
101
|
onSelect: () => e("/admin/onboarding")
|
|
101
102
|
},
|
|
102
103
|
{
|
|
103
104
|
id: "nav-admin-config",
|
|
104
105
|
label: "System Config",
|
|
105
|
-
icon: /* @__PURE__ */ n(
|
|
106
|
+
icon: /* @__PURE__ */ n(t, { icon: R }),
|
|
106
107
|
onSelect: () => e("/admin/system-config")
|
|
107
108
|
}
|
|
108
109
|
];
|
|
109
110
|
}
|
|
110
|
-
function
|
|
111
|
-
var o;
|
|
111
|
+
function pe(e) {
|
|
112
112
|
switch (e.entityType) {
|
|
113
113
|
case "TASK":
|
|
114
114
|
return e.projectId ? `/projects/${e.projectId}?taskId=${e.id}` : "/";
|
|
@@ -117,7 +117,7 @@ function me(e) {
|
|
|
117
117
|
case "USER":
|
|
118
118
|
return "/teammates";
|
|
119
119
|
case "COMMENT":
|
|
120
|
-
return e.projectId &&
|
|
120
|
+
return e.projectId && e.metadata?.taskId ? `/projects/${e.projectId}?taskId=${e.metadata.taskId}` : "/";
|
|
121
121
|
case "MEETING":
|
|
122
122
|
return e.projectId ? `/projects/${e.projectId}?tab=meetings` : "/";
|
|
123
123
|
case "LINK":
|
|
@@ -128,114 +128,114 @@ function me(e) {
|
|
|
128
128
|
return "/";
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function P(e, d, b) {
|
|
132
132
|
return {
|
|
133
133
|
id: `search-${e.entityType}-${e.id}`,
|
|
134
134
|
label: e.title,
|
|
135
135
|
filterValue: e.title,
|
|
136
136
|
description: e.snippet,
|
|
137
|
-
icon: e.icon ?? le[e.entityType] ?? /* @__PURE__ */ n(
|
|
137
|
+
icon: e.icon ?? le[e.entityType] ?? /* @__PURE__ */ n(t, { icon: ee }),
|
|
138
138
|
shortcut: e.shortcut,
|
|
139
139
|
onSelect: () => {
|
|
140
|
-
|
|
140
|
+
d ? d(e) : b(pe(e));
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
const
|
|
144
|
+
const be = z.forwardRef(
|
|
145
145
|
function({
|
|
146
|
-
user:
|
|
147
|
-
isAdmin:
|
|
148
|
-
extraGroups:
|
|
149
|
-
onNavigate:
|
|
150
|
-
onSearch:
|
|
151
|
-
searchResults:
|
|
152
|
-
searchResultGroups:
|
|
153
|
-
isSearching:
|
|
154
|
-
onSearchResultSelect:
|
|
146
|
+
user: d,
|
|
147
|
+
isAdmin: b,
|
|
148
|
+
extraGroups: k = [],
|
|
149
|
+
onNavigate: j,
|
|
150
|
+
onSearch: y,
|
|
151
|
+
searchResults: s = [],
|
|
152
|
+
searchResultGroups: m,
|
|
153
|
+
isSearching: S = !1,
|
|
154
|
+
onSearchResultSelect: I,
|
|
155
155
|
searchResultsLabel: l,
|
|
156
156
|
open: D,
|
|
157
157
|
defaultOpen: L,
|
|
158
|
-
onOpenChange:
|
|
158
|
+
onOpenChange: v,
|
|
159
159
|
keybinding: O,
|
|
160
160
|
maxHeight: U,
|
|
161
161
|
emptyState: B,
|
|
162
162
|
footerHints: K,
|
|
163
163
|
className: V,
|
|
164
|
-
...
|
|
165
|
-
},
|
|
166
|
-
const
|
|
167
|
-
(
|
|
168
|
-
|
|
164
|
+
...x
|
|
165
|
+
}, F) {
|
|
166
|
+
const g = b ?? (d?.role === "Admin" || d?.role === "SuperAdmin"), c = se(), i = T(
|
|
167
|
+
(o) => {
|
|
168
|
+
j?.(o);
|
|
169
169
|
},
|
|
170
|
-
[
|
|
171
|
-
),
|
|
170
|
+
[j]
|
|
171
|
+
), h = p(
|
|
172
172
|
() => ({
|
|
173
173
|
label: "Pages",
|
|
174
|
-
items: c ? c.pages.map((
|
|
175
|
-
id:
|
|
176
|
-
label:
|
|
177
|
-
icon:
|
|
178
|
-
keywords:
|
|
179
|
-
onSelect: () => i(
|
|
180
|
-
})) :
|
|
174
|
+
items: c ? c.pages.map((o) => ({
|
|
175
|
+
id: o.id,
|
|
176
|
+
label: o.label,
|
|
177
|
+
icon: o.icon,
|
|
178
|
+
keywords: o.keywords,
|
|
179
|
+
onSelect: () => i(o.path)
|
|
180
|
+
})) : re(i)
|
|
181
181
|
}),
|
|
182
182
|
[i, c]
|
|
183
|
-
),
|
|
183
|
+
), C = p(
|
|
184
184
|
() => ({
|
|
185
185
|
label: "Admin",
|
|
186
|
-
items: c ? c.adminPages.map((
|
|
187
|
-
id:
|
|
188
|
-
label:
|
|
189
|
-
icon:
|
|
190
|
-
keywords:
|
|
191
|
-
onSelect: () => i(
|
|
192
|
-
})) :
|
|
186
|
+
items: c ? c.adminPages.map((o) => ({
|
|
187
|
+
id: o.id,
|
|
188
|
+
label: o.label,
|
|
189
|
+
icon: o.icon,
|
|
190
|
+
keywords: o.keywords,
|
|
191
|
+
onSelect: () => i(o.path)
|
|
192
|
+
})) : me(i)
|
|
193
193
|
}),
|
|
194
194
|
[i, c]
|
|
195
|
-
),
|
|
196
|
-
if (
|
|
197
|
-
return
|
|
198
|
-
const
|
|
195
|
+
), A = p(() => {
|
|
196
|
+
if (m && m.length > 0)
|
|
197
|
+
return m.map((a) => {
|
|
198
|
+
const f = a.results.some((r) => r.rank != null) ? [...a.results].sort((r, _) => (_.rank ?? 0) - (r.rank ?? 0)) : a.results;
|
|
199
199
|
return {
|
|
200
200
|
label: a.label,
|
|
201
|
-
items:
|
|
201
|
+
items: f.map((r) => P(r, I, i))
|
|
202
202
|
};
|
|
203
203
|
});
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
206
|
-
let
|
|
207
|
-
return l ?
|
|
208
|
-
}, [
|
|
209
|
-
const
|
|
210
|
-
return
|
|
211
|
-
}, [
|
|
212
|
-
(
|
|
213
|
-
|
|
204
|
+
if (s.length === 0) return [];
|
|
205
|
+
const E = (s.some((a) => a.rank != null) ? [...s].sort((a, f) => (f.rank ?? 0) - (a.rank ?? 0)) : s).map((a) => P(a, I, i));
|
|
206
|
+
let u;
|
|
207
|
+
return l ? u = typeof l == "function" ? l(E.length) : l : u = S ? "Searching..." : "Search Results", [{ label: u, items: E }];
|
|
208
|
+
}, [s, m, S, i, I, l]), J = p(() => {
|
|
209
|
+
const o = [];
|
|
210
|
+
return o.push(...A), o.push(h), g && o.push(C), o.push(...k), o;
|
|
211
|
+
}, [A, h, g, C, k]), Y = T(
|
|
212
|
+
(o) => {
|
|
213
|
+
y?.(o);
|
|
214
214
|
},
|
|
215
|
-
[
|
|
215
|
+
[y]
|
|
216
216
|
);
|
|
217
217
|
return /* @__PURE__ */ n(
|
|
218
|
-
|
|
218
|
+
ce,
|
|
219
219
|
{
|
|
220
|
-
ref:
|
|
221
|
-
groups:
|
|
220
|
+
ref: F,
|
|
221
|
+
groups: J,
|
|
222
222
|
placeholder: "Search or jump to...",
|
|
223
|
-
onSearch:
|
|
223
|
+
onSearch: Y,
|
|
224
224
|
emptyMessage: "No results found. Try a different search term.",
|
|
225
225
|
open: D,
|
|
226
226
|
defaultOpen: L,
|
|
227
|
-
onOpenChange:
|
|
227
|
+
onOpenChange: v,
|
|
228
228
|
keybinding: O,
|
|
229
229
|
maxHeight: U,
|
|
230
230
|
emptyState: B,
|
|
231
231
|
footerHints: K,
|
|
232
|
-
className:
|
|
233
|
-
...
|
|
232
|
+
className: de(V),
|
|
233
|
+
...x
|
|
234
234
|
}
|
|
235
235
|
);
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
|
|
238
|
+
be.displayName = "AppCommandPalette";
|
|
239
239
|
export {
|
|
240
|
-
|
|
240
|
+
be as AppCommandPalette
|
|
241
241
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-navbar.d.ts","sourceRoot":"","sources":["../../src/shell/bottom-navbar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"bottom-navbar.d.ts","sourceRoot":"","sources":["../../src/shell/bottom-navbar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC9B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,aAAa,EAAE,CAAA;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,aAAa,EAAE,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA2ED,QAAA,MAAM,YAAY,uFA2IjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as t, Fragment as
|
|
2
|
+
import { jsxs as t, Fragment as y, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import * as w from "react";
|
|
4
|
-
import { useState as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useState as k } from "react";
|
|
5
|
+
import { IconX as M, IconDots as j } from "@tabler/icons-react";
|
|
6
|
+
import { Icon as u } from "../ui/icon.js";
|
|
7
7
|
import { cn as l } from "../ui/lib/utils.js";
|
|
8
8
|
import { springs as d } from "../ui/lib/motion.js";
|
|
9
|
-
import {
|
|
10
|
-
|
|
9
|
+
import { u as h } from "../_chunks/link-context.js";
|
|
10
|
+
import { A as C, m as c } from "../_chunks/framer.js";
|
|
11
|
+
function z({ count: a }) {
|
|
11
12
|
if (!a || a <= 0) return null;
|
|
12
13
|
const r = a > 99 ? "99+" : String(a), i = a >= 10;
|
|
13
14
|
return /* @__PURE__ */ s(
|
|
@@ -27,7 +28,7 @@ function B({
|
|
|
27
28
|
isActive: r,
|
|
28
29
|
onClick: i
|
|
29
30
|
}) {
|
|
30
|
-
const n =
|
|
31
|
+
const n = h();
|
|
31
32
|
return /* @__PURE__ */ s(c.div, { whileTap: { y: -2 }, transition: d.snappy, className: "flex max-w-[70px] flex-1", children: /* @__PURE__ */ s(
|
|
32
33
|
n,
|
|
33
34
|
{
|
|
@@ -51,7 +52,7 @@ function B({
|
|
|
51
52
|
),
|
|
52
53
|
/* @__PURE__ */ t("div", { className: "relative p-ds-03", children: [
|
|
53
54
|
/* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: a.icon }),
|
|
54
|
-
a.badge != null && /* @__PURE__ */ s(
|
|
55
|
+
a.badge != null && /* @__PURE__ */ s(z, { count: a.badge })
|
|
55
56
|
] }),
|
|
56
57
|
/* @__PURE__ */ s("span", { className: "text-center", children: a.title })
|
|
57
58
|
] })
|
|
@@ -64,14 +65,14 @@ const L = w.forwardRef(
|
|
|
64
65
|
user: r,
|
|
65
66
|
primaryItems: i = [],
|
|
66
67
|
moreItems: n = [],
|
|
67
|
-
className:
|
|
68
|
-
...
|
|
69
|
-
},
|
|
70
|
-
const
|
|
68
|
+
className: x,
|
|
69
|
+
...b
|
|
70
|
+
}, g) => {
|
|
71
|
+
const v = h(), [o, f] = k(!1), m = (e, N = !1) => N || e === "/" ? a === e : a.startsWith(e), p = n.some(
|
|
71
72
|
(e) => m(e.href, e.exact)
|
|
72
73
|
);
|
|
73
|
-
return /* @__PURE__ */ t(
|
|
74
|
-
/* @__PURE__ */ s(
|
|
74
|
+
return /* @__PURE__ */ t(y, { children: [
|
|
75
|
+
/* @__PURE__ */ s(C, { children: o && // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events -- backdrop overlay, dismiss via mouse only; keyboard users close via Escape
|
|
75
76
|
/* @__PURE__ */ t(
|
|
76
77
|
"div",
|
|
77
78
|
{
|
|
@@ -98,12 +99,12 @@ const L = w.forwardRef(
|
|
|
98
99
|
onClick: () => f(!1),
|
|
99
100
|
"aria-label": "Close more menu",
|
|
100
101
|
className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-surface-raised-hover",
|
|
101
|
-
children: /* @__PURE__ */ s(
|
|
102
|
+
children: /* @__PURE__ */ s(u, { icon: M, size: "sm", className: "text-surface-fg-muted" })
|
|
102
103
|
}
|
|
103
104
|
)
|
|
104
105
|
] }),
|
|
105
106
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-4 gap-ds-03", children: n.map((e) => /* @__PURE__ */ t(
|
|
106
|
-
|
|
107
|
+
v,
|
|
107
108
|
{
|
|
108
109
|
href: e.href,
|
|
109
110
|
onClick: () => f(!1),
|
|
@@ -127,12 +128,12 @@ const L = w.forwardRef(
|
|
|
127
128
|
/* @__PURE__ */ t(
|
|
128
129
|
"nav",
|
|
129
130
|
{
|
|
130
|
-
...
|
|
131
|
-
ref:
|
|
131
|
+
...b,
|
|
132
|
+
ref: g,
|
|
132
133
|
"aria-label": "Mobile navigation",
|
|
133
134
|
className: l(
|
|
134
135
|
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-raised px-ds-05 pb-ds-05b pt-0 md:hidden",
|
|
135
|
-
|
|
136
|
+
x
|
|
136
137
|
),
|
|
137
138
|
children: [
|
|
138
139
|
i.map((e) => /* @__PURE__ */ s(
|
|
@@ -166,7 +167,7 @@ const L = w.forwardRef(
|
|
|
166
167
|
transition: d.snappy
|
|
167
168
|
}
|
|
168
169
|
),
|
|
169
|
-
/* @__PURE__ */ s("div", { className: "p-ds-03", children: /* @__PURE__ */ s(
|
|
170
|
+
/* @__PURE__ */ s("div", { className: "p-ds-03", children: /* @__PURE__ */ s(u, { icon: j }) }),
|
|
170
171
|
/* @__PURE__ */ s("span", { className: "text-center", children: "More" })
|
|
171
172
|
] })
|
|
172
173
|
}
|
package/dist/shell/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
2
|
+
import { AppSidebar as e } from "./sidebar.js";
|
|
3
|
+
import { TopBar as m } from "./top-bar.js";
|
|
4
|
+
import { BottomNavbar as p } from "./bottom-navbar.js";
|
|
5
|
+
import { NotificationCenter as f } from "./notification-center.js";
|
|
6
|
+
import { NotificationPreferences as x } from "./notification-preferences.js";
|
|
7
|
+
import { AppCommandPalette as d } from "./app-command-palette.js";
|
|
8
|
+
import { CommandRegistryProvider as P, useCommandRegistry as c } from "./command-registry.js";
|
|
9
|
+
import { L as v, u as L } from "../_chunks/link-context.js";
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
11
|
+
d as AppCommandPalette,
|
|
12
|
+
e as AppSidebar,
|
|
13
|
+
p as BottomNavbar,
|
|
14
|
+
P as CommandRegistryProvider,
|
|
15
|
+
v as LinkProvider,
|
|
16
|
+
f as NotificationCenter,
|
|
17
|
+
x as NotificationPreferences,
|
|
18
|
+
m as TopBar,
|
|
19
|
+
c as useCommandRegistry,
|
|
20
|
+
L as useLink
|
|
21
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"notification-center.d.ts","sourceRoot":"","sources":["../../src/shell/notification-center.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAuB9B,MAAM,WAAW,kBAAkB;IACjC,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,oFAAoF;IACpF,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;IAC1C,8EAA8E;IAC9E,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9B;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,UAAU,CAAA;IACvC,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAClC,wEAAwE;IACxE,OAAO,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAC/B;AAED,MAAM,WAAW,uBACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,uCAAuC;IACvC,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,mDAAmD;IACnD,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,+CAA+C;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,iFAAiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,MAAM,GAAG,IAAI,CAAA;IACpE,wEAAwE;IACxE,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,oEAAoE;IACpE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,+DAA+D;IAC/D,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,gGAAgG;IAChG,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4KD,QAAA,MAAM,kBAAkB,mGA0MvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
|