@devalok/shilp-sutra-karm 0.8.1 → 0.9.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/chat-panel.js +376 -0
- package/dist/_chunks/daily-brief.js +177 -0
- package/dist/_chunks/kanban-board.js +597 -0
- package/dist/_chunks/project-card.js +121 -0
- package/dist/_chunks/render-adjustment-type.js +3596 -0
- package/dist/{tasks → _chunks}/task-constants.js +3 -3
- package/dist/_chunks/task-detail-panel.js +1305 -0
- package/dist/_chunks/use-composed-ref.js +12 -0
- package/dist/_chunks/vendor.js +11491 -0
- package/dist/admin/index.js +37 -60
- package/dist/board/index.js +3 -5
- package/dist/chat/index.js +6 -10
- package/dist/client/index.js +4 -6
- package/dist/dashboard/index.js +3 -4
- package/dist/index.js +189 -103
- package/dist/tasks/index.js +8 -14
- package/package.json +9 -4
- package/dist/admin/adjustments/approved-adjustments.js +0 -43
- package/dist/admin/break/break-admin-skeleton.js +0 -59
- package/dist/admin/break/break-admin.js +0 -373
- package/dist/admin/break/break-balance.js +0 -42
- package/dist/admin/break/breaks.js +0 -91
- package/dist/admin/break/delete-break.js +0 -55
- package/dist/admin/break/edit-break-balance.js +0 -113
- package/dist/admin/break/edit-break.js +0 -453
- package/dist/admin/break/header.js +0 -231
- package/dist/admin/break/leave-request.js +0 -162
- package/dist/admin/break/use-break-date-picker.js +0 -43
- package/dist/admin/dashboard/admin-dashboard.js +0 -337
- package/dist/admin/dashboard/associate-detail.js +0 -259
- package/dist/admin/dashboard/attendance-overview.js +0 -136
- package/dist/admin/dashboard/break-request.js +0 -176
- package/dist/admin/dashboard/calendar.js +0 -141
- package/dist/admin/dashboard/correction-list.js +0 -102
- package/dist/admin/dashboard/dashboard-header.js +0 -155
- package/dist/admin/dashboard/dashboard-skeleton.js +0 -109
- package/dist/admin/dashboard/leave-requests.js +0 -201
- package/dist/admin/dashboard/render-date.js +0 -144
- package/dist/admin/dashboard/use-calendar-navigation.js +0 -169
- package/dist/admin/dashboard/use-leave-request-interaction.js +0 -34
- package/dist/admin/utils/date-range-utils.js +0 -37
- package/dist/admin/utils/date-utils.js +0 -119
- package/dist/admin/utils/emoji-utils.js +0 -17
- package/dist/admin/utils/render-adjustment-type.js +0 -20
- package/dist/admin/utils/render-status.js +0 -22
- package/dist/board/board-column.js +0 -236
- package/dist/board/kanban-board.js +0 -218
- package/dist/board/task-card.js +0 -168
- package/dist/chat/chat-input.js +0 -54
- package/dist/chat/chat-panel.js +0 -151
- package/dist/chat/conversation-list.js +0 -99
- package/dist/chat/markdown-components.js +0 -35
- package/dist/chat/message-list.js +0 -59
- package/dist/chat/streaming-text.js +0 -17
- package/dist/client/accent-provider.js +0 -22
- package/dist/client/client-portal-header.js +0 -48
- package/dist/client/project-card.js +0 -60
- package/dist/dashboard/attendance-cta.js +0 -115
- package/dist/dashboard/daily-brief.js +0 -68
- package/dist/page-skeletons.js +0 -130
- package/dist/tasks/activity-tab.js +0 -185
- package/dist/tasks/conversation-tab.js +0 -138
- package/dist/tasks/files-tab.js +0 -186
- package/dist/tasks/review-tab.js +0 -170
- package/dist/tasks/subtasks-tab.js +0 -154
- package/dist/tasks/task-detail-panel.js +0 -210
- package/dist/tasks/task-properties.js +0 -324
- package/dist/utils/use-composed-ref.js +0 -12
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
3
|
-
const l = {
|
|
4
|
-
p: ({ children: e }) => /* @__PURE__ */ s("p", { className: "mb-ds-03 last:mb-0", children: e }),
|
|
5
|
-
code: ({
|
|
6
|
-
children: e,
|
|
7
|
-
className: t
|
|
8
|
-
}) => (t == null ? void 0 : t.includes("language-")) ? /* @__PURE__ */ s("code", { className: t, children: e }) : /* @__PURE__ */ s("code", { className: "rounded bg-field px-ds-02 py-ds-01 text-ds-md", children: e }),
|
|
9
|
-
pre: ({ children: e }) => /* @__PURE__ */ s("pre", { className: "mb-ds-03 overflow-x-auto rounded-ds-lg bg-field p-ds-04 text-ds-md", children: e }),
|
|
10
|
-
ul: ({ children: e }) => /* @__PURE__ */ s("ul", { className: "mb-ds-03 list-disc pl-ds-05", children: e }),
|
|
11
|
-
ol: ({ children: e }) => /* @__PURE__ */ s("ol", { className: "mb-ds-03 list-decimal pl-ds-05", children: e }),
|
|
12
|
-
li: ({ children: e }) => /* @__PURE__ */ s("li", { className: "mb-ds-02", children: e }),
|
|
13
|
-
strong: ({ children: e }) => /* @__PURE__ */ s("strong", { className: "font-semibold", children: e }),
|
|
14
|
-
a: ({
|
|
15
|
-
href: e,
|
|
16
|
-
children: t,
|
|
17
|
-
...o
|
|
18
|
-
}) => {
|
|
19
|
-
const d = e && /^(https?:\/\/|mailto:)/i.test(e) ? e : "#";
|
|
20
|
-
return /* @__PURE__ */ s(
|
|
21
|
-
"a",
|
|
22
|
-
{
|
|
23
|
-
href: d,
|
|
24
|
-
target: "_blank",
|
|
25
|
-
rel: "noopener noreferrer",
|
|
26
|
-
className: "text-interactive underline hover:text-interactive-hover",
|
|
27
|
-
...o,
|
|
28
|
-
children: t
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
export {
|
|
34
|
-
l as markdownComponents
|
|
35
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
3
|
-
import * as f from "react";
|
|
4
|
-
import { useRef as h, useEffect as u } from "react";
|
|
5
|
-
import { useComposedRef as p } from "../utils/use-composed-ref.js";
|
|
6
|
-
import { StreamingText as N } from "./streaming-text.js";
|
|
7
|
-
import { IconRobot as l, IconAlertCircle as v, IconUser as y } from "@tabler/icons-react";
|
|
8
|
-
import b from "react-markdown";
|
|
9
|
-
import { markdownComponents as g } from "./markdown-components.js";
|
|
10
|
-
const w = f.forwardRef(
|
|
11
|
-
function({
|
|
12
|
-
messages: r,
|
|
13
|
-
isStreaming: a = !1,
|
|
14
|
-
streamingText: t = "",
|
|
15
|
-
isLoadingMessages: n = !1,
|
|
16
|
-
emptyTitle: o = "Karm AI",
|
|
17
|
-
emptyDescription: m = "Ask me about tasks, projects, attendance, or anything else."
|
|
18
|
-
}, i) {
|
|
19
|
-
const c = h(null), x = p(c, i);
|
|
20
|
-
return u(() => {
|
|
21
|
-
const s = c.current;
|
|
22
|
-
s && (s.scrollTop = s.scrollHeight);
|
|
23
|
-
}, [r, t]), n ? /* @__PURE__ */ e("div", { ref: i, className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-03", children: [
|
|
24
|
-
/* @__PURE__ */ e("div", { className: "h-ds-xs w-ds-xs animate-spin rounded-ds-full border-2 border-text-secondary border-t-transparent" }),
|
|
25
|
-
/* @__PURE__ */ e("p", { className: "text-ds-sm text-text-placeholder", children: "Loading messages..." })
|
|
26
|
-
] }) }) : r.length === 0 && !a ? /* @__PURE__ */ e("div", { ref: i, className: "flex flex-1 items-center justify-center p-ds-06", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-ds-04 text-center", children: [
|
|
27
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-lg w-ds-lg items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(l, { className: "h-ico-lg w-ico-lg text-text-secondary" }) }),
|
|
28
|
-
/* @__PURE__ */ e("h3", { className: "text-ds-base text-text-primary", children: o }),
|
|
29
|
-
/* @__PURE__ */ e("p", { className: "text-ds-sm max-w-[280px] text-text-placeholder", children: m })
|
|
30
|
-
] }) }) : /* @__PURE__ */ e("div", { ref: x, className: "no-scrollbar flex-1 overflow-y-auto p-ds-05", children: /* @__PURE__ */ d("div", { className: "flex flex-col gap-ds-05", role: "log", "aria-label": "Chat messages", children: [
|
|
31
|
-
r.map((s) => s.role === "SYSTEM" ? /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03 rounded-ds-lg bg-error-surface px-ds-04 py-ds-03", children: [
|
|
32
|
-
/* @__PURE__ */ e(v, { className: "h-ico-sm w-ico-sm shrink-0 text-text-error" }),
|
|
33
|
-
/* @__PURE__ */ e("p", { className: "text-ds-sm text-text-error", children: s.content })
|
|
34
|
-
] }) }, s.id) : s.role === "USER" ? /* @__PURE__ */ e("div", { className: "flex justify-end", children: /* @__PURE__ */ d("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-br-ds-sm bg-interactive px-ds-04 py-ds-03 text-text-on-color", children: /* @__PURE__ */ e("p", { className: "text-ds-md whitespace-pre-wrap", children: s.content }) }),
|
|
36
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(y, { className: "h-ico-sm w-ico-sm text-text-secondary" }) })
|
|
37
|
-
] }) }, s.id) : /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ d("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(l, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
|
|
39
|
-
/* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-text-primary", children: /* @__PURE__ */ e(b, { components: g, children: s.content }) }) })
|
|
40
|
-
] }) }, s.id)),
|
|
41
|
-
a && t && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ d("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
|
|
42
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(l, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
|
|
43
|
-
/* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ e("div", { className: "text-ds-md text-text-primary", children: /* @__PURE__ */ e(N, { text: t }) }) })
|
|
44
|
-
] }) }),
|
|
45
|
-
a && !t && /* @__PURE__ */ e("div", { className: "flex justify-start", children: /* @__PURE__ */ d("div", { className: "flex max-w-[85%] items-start gap-ds-03", children: [
|
|
46
|
-
/* @__PURE__ */ e("div", { className: "flex h-ds-xs-plus w-ds-xs-plus shrink-0 items-center justify-center rounded-ds-full bg-field", children: /* @__PURE__ */ e(l, { className: "h-ico-sm w-ico-sm text-text-secondary" }) }),
|
|
47
|
-
/* @__PURE__ */ e("div", { className: "rounded-ds-2xl rounded-bl-ds-sm bg-field px-ds-04 py-ds-03", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-02b py-ds-02", children: [
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:0ms]" }),
|
|
49
|
-
/* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:150ms]" }),
|
|
50
|
-
/* @__PURE__ */ e("div", { className: "h-2 w-2 animate-bounce rounded-ds-full bg-text-placeholder [animation-delay:300ms]" })
|
|
51
|
-
] }) })
|
|
52
|
-
] }) })
|
|
53
|
-
] }) });
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
w.displayName = "MessageList";
|
|
57
|
-
export {
|
|
58
|
-
w as MessageList
|
|
59
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import a from "react-markdown";
|
|
5
|
-
import { markdownComponents as i } from "./markdown-components.js";
|
|
6
|
-
const m = n.forwardRef(
|
|
7
|
-
function({ text: r }, t) {
|
|
8
|
-
return /* @__PURE__ */ o("div", { ref: t, "aria-live": "polite", children: [
|
|
9
|
-
/* @__PURE__ */ e(a, { components: i, children: r }),
|
|
10
|
-
/* @__PURE__ */ e("span", { className: "inline-block h-4 w-2 animate-pulse bg-text-secondary ml-ds-01" })
|
|
11
|
-
] });
|
|
12
|
-
}
|
|
13
|
-
);
|
|
14
|
-
m.displayName = "StreamingText";
|
|
15
|
-
export {
|
|
16
|
-
m as StreamingText
|
|
17
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect as p } from "react";
|
|
3
|
-
function s({ accentCss: o }) {
|
|
4
|
-
return p(() => {
|
|
5
|
-
if (!o) return;
|
|
6
|
-
const n = document.documentElement, l = o.split(";").map((e) => e.trim()).filter(Boolean), i = [];
|
|
7
|
-
for (const e of l) {
|
|
8
|
-
const t = e.indexOf(":");
|
|
9
|
-
if (t === -1) continue;
|
|
10
|
-
const r = e.slice(0, t).trim(), c = e.slice(t + 1).trim();
|
|
11
|
-
r && c && (n.style.setProperty(r, c), i.push(r));
|
|
12
|
-
}
|
|
13
|
-
return () => {
|
|
14
|
-
for (const e of i)
|
|
15
|
-
n.style.removeProperty(e);
|
|
16
|
-
};
|
|
17
|
-
}, [o]), null;
|
|
18
|
-
}
|
|
19
|
-
s.displayName = "AccentProvider";
|
|
20
|
-
export {
|
|
21
|
-
s as AccentProvider
|
|
22
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as x from "react";
|
|
4
|
-
import { cn as f } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
-
import { Avatar as b, AvatarImage as h, AvatarFallback as v } from "@devalok/shilp-sutra/ui/avatar";
|
|
6
|
-
const j = x.forwardRef(
|
|
7
|
-
({ className: l, orgName: t, orgLogo: d, userName: i, userAvatar: r, children: m, ...n }, c) => {
|
|
8
|
-
const o = t.split(" ").map((a) => a[0]).join("").slice(0, 2).toUpperCase(), p = i.split(" ").map((a) => a[0]).join("").slice(0, 2).toUpperCase();
|
|
9
|
-
return /* @__PURE__ */ s(
|
|
10
|
-
"header",
|
|
11
|
-
{
|
|
12
|
-
ref: c,
|
|
13
|
-
className: f(
|
|
14
|
-
"flex h-ds-lg items-center justify-between border-b border-border-subtle bg-layer-01 px-ds-06",
|
|
15
|
-
l
|
|
16
|
-
),
|
|
17
|
-
...n,
|
|
18
|
-
children: [
|
|
19
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: [
|
|
20
|
-
d ? /* @__PURE__ */ e(
|
|
21
|
-
"img",
|
|
22
|
-
{
|
|
23
|
-
src: d,
|
|
24
|
-
alt: t,
|
|
25
|
-
className: "h-ds-sm w-ds-sm rounded-ds-md object-cover"
|
|
26
|
-
}
|
|
27
|
-
) : /* @__PURE__ */ e("div", { className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-md bg-interactive text-ds-sm font-semibold text-text-on-color", children: o }),
|
|
28
|
-
/* @__PURE__ */ e("span", { className: "font-display text-ds-base font-semibold text-text-primary", children: t })
|
|
29
|
-
] }),
|
|
30
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: [
|
|
31
|
-
m,
|
|
32
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
33
|
-
/* @__PURE__ */ s(b, { className: "h-ds-sm w-ds-sm", children: [
|
|
34
|
-
r && /* @__PURE__ */ e(h, { src: r, alt: i }),
|
|
35
|
-
/* @__PURE__ */ e(v, { className: "bg-interactive-subtle text-ds-sm font-medium text-interactive", children: p })
|
|
36
|
-
] }),
|
|
37
|
-
/* @__PURE__ */ e("span", { className: "hidden text-ds-md font-medium text-text-primary sm:inline", children: i })
|
|
38
|
-
] })
|
|
39
|
-
] })
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
j.displayName = "ClientPortalHeader";
|
|
46
|
-
export {
|
|
47
|
-
j as ClientPortalHeader
|
|
48
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import * as n from "react";
|
|
4
|
-
import { cn as p } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
-
import { Badge as h } from "@devalok/shilp-sutra/ui/badge";
|
|
6
|
-
import { Progress as b } from "@devalok/shilp-sutra/ui/progress";
|
|
7
|
-
const f = {
|
|
8
|
-
active: "success",
|
|
9
|
-
completed: "info",
|
|
10
|
-
paused: "warning"
|
|
11
|
-
}, x = n.forwardRef(
|
|
12
|
-
({
|
|
13
|
-
className: i,
|
|
14
|
-
name: c,
|
|
15
|
-
description: t,
|
|
16
|
-
status: a,
|
|
17
|
-
taskCount: s = 0,
|
|
18
|
-
completedTasks: d = 0,
|
|
19
|
-
...l
|
|
20
|
-
}, m) => {
|
|
21
|
-
const o = s > 0 ? Math.round(d / s * 100) : 0;
|
|
22
|
-
return /* @__PURE__ */ e(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
ref: m,
|
|
26
|
-
className: p(
|
|
27
|
-
"group cursor-pointer rounded-ds-lg border border-border-subtle bg-layer-01 p-ds-05b shadow-01 transition-shadow duration-moderate-02 hover:shadow-02",
|
|
28
|
-
i
|
|
29
|
-
),
|
|
30
|
-
...l,
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ e("div", { className: "mb-ds-04 flex items-start justify-between", children: [
|
|
33
|
-
/* @__PURE__ */ r("h3", { className: "font-display text-ds-base font-semibold text-text-primary", children: c }),
|
|
34
|
-
/* @__PURE__ */ r(h, { color: f[a], size: "sm", children: a })
|
|
35
|
-
] }),
|
|
36
|
-
t && /* @__PURE__ */ r("p", { className: "mb-ds-05 line-clamp-2 text-ds-md text-text-secondary", children: t }),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: "space-y-ds-03", children: [
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between text-ds-sm text-text-helper", children: [
|
|
39
|
-
/* @__PURE__ */ e("span", { children: [
|
|
40
|
-
d,
|
|
41
|
-
" / ",
|
|
42
|
-
s,
|
|
43
|
-
" tasks"
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ e("span", { children: [
|
|
46
|
-
o,
|
|
47
|
-
"%"
|
|
48
|
-
] })
|
|
49
|
-
] }),
|
|
50
|
-
/* @__PURE__ */ r(b, { value: o, className: "h-ds-02b", "aria-label": "Project progress" })
|
|
51
|
-
] })
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
x.displayName = "ProjectCard";
|
|
58
|
-
export {
|
|
59
|
-
x as ProjectCard
|
|
60
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
-
import * as v from "react";
|
|
4
|
-
import { IconCheck as g, IconCoffee as y, IconClock as w, IconArrowRight as k } from "@tabler/icons-react";
|
|
5
|
-
function A() {
|
|
6
|
-
const r = (/* @__PURE__ */ new Date()).getHours();
|
|
7
|
-
return r < 12 ? "Good morning" : r < 17 ? "Good afternoon" : "Good evening";
|
|
8
|
-
}
|
|
9
|
-
function C() {
|
|
10
|
-
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-IN", {
|
|
11
|
-
weekday: "long",
|
|
12
|
-
day: "numeric",
|
|
13
|
-
month: "long",
|
|
14
|
-
year: "numeric",
|
|
15
|
-
timeZone: "Asia/Kolkata"
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
function I(r) {
|
|
19
|
-
return new Date(r).toLocaleTimeString("en-IN", {
|
|
20
|
-
hour: "2-digit",
|
|
21
|
-
minute: "2-digit",
|
|
22
|
-
hour12: !0,
|
|
23
|
-
timeZone: "Asia/Kolkata"
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
const j = v.forwardRef(
|
|
27
|
-
function({
|
|
28
|
-
userName: n,
|
|
29
|
-
attendance: s,
|
|
30
|
-
canMarkAttendance: p,
|
|
31
|
-
onMarkAttendance: u,
|
|
32
|
-
isSubmitting: d = !1,
|
|
33
|
-
formatTime: b = I
|
|
34
|
-
}, a) {
|
|
35
|
-
var h, f;
|
|
36
|
-
const o = ((h = s == null ? void 0 : s.attendance) == null ? void 0 : h.status) ?? "Not_Marked", N = o === "PRESENT" || d, m = o === "BREAK", x = (f = s == null ? void 0 : s.attendance) == null ? void 0 : f.timeIn, i = A(), l = (n == null ? void 0 : n.split(" ")[0]) || "there", c = C();
|
|
37
|
-
return N && !m ? /* @__PURE__ */ e("div", { ref: a, className: "relative overflow-hidden rounded-ds-2xl border border-border bg-layer-01 shadow-01", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
38
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02", children: [
|
|
39
|
-
/* @__PURE__ */ t("h2", { className: "text-ds-2xl text-text-primary", children: [
|
|
40
|
-
i,
|
|
41
|
-
",",
|
|
42
|
-
" ",
|
|
43
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-interactive", children: l })
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-text-tertiary", children: c })
|
|
46
|
-
] }),
|
|
47
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-success-surface px-ds-05 py-ds-03", children: [
|
|
48
|
-
/* @__PURE__ */ e("div", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-text-success", children: /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm text-text-on-color" }) }),
|
|
49
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-text-success", children: [
|
|
50
|
-
"Marked at",
|
|
51
|
-
" ",
|
|
52
|
-
x ? b(x) : "--:--"
|
|
53
|
-
] })
|
|
54
|
-
] })
|
|
55
|
-
] }) }) : m ? /* @__PURE__ */ e("div", { ref: a, className: "relative overflow-hidden rounded-ds-2xl border border-border bg-layer-01 shadow-01", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
56
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02", children: [
|
|
57
|
-
/* @__PURE__ */ t("h2", { className: "text-ds-2xl text-text-primary", children: [
|
|
58
|
-
i,
|
|
59
|
-
",",
|
|
60
|
-
" ",
|
|
61
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-interactive", children: l })
|
|
62
|
-
] }),
|
|
63
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-text-tertiary", children: c })
|
|
64
|
-
] }),
|
|
65
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-warning-surface px-ds-05 py-ds-03", children: [
|
|
66
|
-
/* @__PURE__ */ e(y, { className: "h-ico-sm w-ico-sm text-text-warning" }),
|
|
67
|
-
/* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-text-warning", children: [
|
|
68
|
-
"On break",
|
|
69
|
-
s != null && s.breakReason ? ` — ${s.breakReason}` : ""
|
|
70
|
-
] })
|
|
71
|
-
] })
|
|
72
|
-
] }) }) : p ? /* @__PURE__ */ e("div", { ref: a, className: "relative overflow-hidden rounded-ds-2xl border border-border bg-gradient-to-br from-interactive-subtle via-background to-success-surface", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-07 sm:px-ds-07 sm:py-ds-08", children: [
|
|
73
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
74
|
-
/* @__PURE__ */ t("h2", { className: "text-ds-3xl text-text-primary", children: [
|
|
75
|
-
i,
|
|
76
|
-
",",
|
|
77
|
-
" ",
|
|
78
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-interactive", children: l })
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-text-tertiary", children: c }) })
|
|
81
|
-
] }),
|
|
82
|
-
/* @__PURE__ */ t(
|
|
83
|
-
"button",
|
|
84
|
-
{
|
|
85
|
-
type: "button",
|
|
86
|
-
onClick: u,
|
|
87
|
-
disabled: d,
|
|
88
|
-
className: "flex items-center gap-ds-03 rounded-ds-xl bg-interactive px-ds-06 py-ds-04 font-semibold text-text-on-color shadow-02 transition-all duration-moderate-01 ease-expressive-standard hover:-translate-y-0.5 hover:shadow-03 active:translate-y-0 active:scale-[0.98] disabled:opacity-[0.38]",
|
|
89
|
-
children: [
|
|
90
|
-
d ? "Marking..." : "Mark Attendance",
|
|
91
|
-
!d && /* @__PURE__ */ e(k, { className: "h-ico-sm w-ico-sm" })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
] }) }) : /* @__PURE__ */ e("div", { ref: a, className: "relative overflow-hidden rounded-ds-2xl border border-border bg-layer-01 shadow-01", children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-06 sm:px-ds-07 sm:py-ds-07", children: [
|
|
96
|
-
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
97
|
-
/* @__PURE__ */ t("h2", { className: "text-ds-3xl text-text-primary", children: [
|
|
98
|
-
i,
|
|
99
|
-
",",
|
|
100
|
-
" ",
|
|
101
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-interactive", children: l })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ e("p", { className: "text-ds-base text-text-tertiary", children: c })
|
|
104
|
-
] }),
|
|
105
|
-
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-layer-02 px-ds-05 py-ds-03", children: [
|
|
106
|
-
/* @__PURE__ */ e(w, { className: "h-ico-sm w-ico-sm text-text-placeholder" }),
|
|
107
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-text-placeholder", children: "Attendance window closed" })
|
|
108
|
-
] })
|
|
109
|
-
] }) });
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
j.displayName = "AttendanceCTA";
|
|
113
|
-
export {
|
|
114
|
-
j as AttendanceCTA
|
|
115
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as b from "react";
|
|
4
|
-
import { useState as p } from "react";
|
|
5
|
-
import f from "react-markdown";
|
|
6
|
-
import { IconSparkles as h, IconChevronDown as x, IconChevronUp as g } from "@tabler/icons-react";
|
|
7
|
-
import { cn as d } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
8
|
-
const c = [
|
|
9
|
-
"bg-category-amber",
|
|
10
|
-
"bg-category-teal",
|
|
11
|
-
"bg-category-cyan",
|
|
12
|
-
"bg-interactive",
|
|
13
|
-
"bg-accent"
|
|
14
|
-
], u = b.forwardRef(
|
|
15
|
-
function({
|
|
16
|
-
data: a,
|
|
17
|
-
loading: n = !1,
|
|
18
|
-
className: l
|
|
19
|
-
}, o) {
|
|
20
|
-
const [t, m] = p(!1);
|
|
21
|
-
return n ? /* @__PURE__ */ s("div", { ref: o, className: d("flex flex-col gap-ds-04 rounded-ds-2xl border border-border bg-layer-01 shadow-01 p-ds-05b", l), children: [
|
|
22
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
23
|
-
/* @__PURE__ */ e("div", { className: "h-ico-sm w-ico-sm animate-pulse rounded bg-layer-02" }),
|
|
24
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse rounded bg-layer-02" })
|
|
25
|
-
] }),
|
|
26
|
-
[1, 2, 3].map((r) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
27
|
-
/* @__PURE__ */ e("div", { className: "mt-ds-02b h-2 w-2 shrink-0 animate-pulse rounded-ds-full bg-layer-02" }),
|
|
28
|
-
/* @__PURE__ */ e(
|
|
29
|
-
"div",
|
|
30
|
-
{
|
|
31
|
-
className: "h-4 animate-pulse rounded bg-layer-02",
|
|
32
|
-
style: { width: `${60 + r * 10}%` }
|
|
33
|
-
}
|
|
34
|
-
)
|
|
35
|
-
] }, r))
|
|
36
|
-
] }) : !a || a.brief.length === 0 ? null : /* @__PURE__ */ s("div", { ref: o, className: d("flex flex-col rounded-ds-2xl border border-border bg-layer-01 shadow-01", l), children: [
|
|
37
|
-
/* @__PURE__ */ s(
|
|
38
|
-
"button",
|
|
39
|
-
{
|
|
40
|
-
type: "button",
|
|
41
|
-
"aria-label": "Toggle brief",
|
|
42
|
-
onClick: () => m(!t),
|
|
43
|
-
className: "flex items-center justify-between px-ds-05b py-ds-05 transition-colors hover:bg-layer-02",
|
|
44
|
-
children: [
|
|
45
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
46
|
-
/* @__PURE__ */ e(h, { className: "h-ico-sm w-ico-sm text-interactive" }),
|
|
47
|
-
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-text-primary", children: "Morning Brief" })
|
|
48
|
-
] }),
|
|
49
|
-
t ? /* @__PURE__ */ e(x, { className: "h-ico-sm w-ico-sm text-text-placeholder" }) : /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm text-text-placeholder" })
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
!t && /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-03 border-t border-border px-ds-05b pb-ds-05b pt-ds-05", children: a.brief.map((r, i) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
54
|
-
/* @__PURE__ */ e(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: d("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", c[i % c.length])
|
|
58
|
-
}
|
|
59
|
-
),
|
|
60
|
-
/* @__PURE__ */ e("div", { className: "text-ds-md text-text-secondary [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-field [&_code]:px-1 [&_code]:py-ds-01 [&_code]:text-ds-sm [&_a]:text-interactive [&_a]:underline", children: /* @__PURE__ */ e(f, { children: r }) })
|
|
61
|
-
] }, i)) })
|
|
62
|
-
] });
|
|
63
|
-
}
|
|
64
|
-
);
|
|
65
|
-
u.displayName = "DailyBrief";
|
|
66
|
-
export {
|
|
67
|
-
u as DailyBrief
|
|
68
|
-
};
|
package/dist/page-skeletons.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as m from "react";
|
|
4
|
-
import { Skeleton as l } from "@devalok/shilp-sutra/ui/skeleton";
|
|
5
|
-
import { cn as s } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
6
|
-
const d = "bg-field", f = m.forwardRef(
|
|
7
|
-
function(n, o) {
|
|
8
|
-
return /* @__PURE__ */ a("div", { ref: o, className: "flex flex-col gap-ds-06", children: [
|
|
9
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-03", children: [
|
|
10
|
-
/* @__PURE__ */ e(l, { className: s("h-6 w-32", d) }),
|
|
11
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-04 w-56", d) })
|
|
12
|
-
] }),
|
|
13
|
-
/* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-ds-05 lg:grid-cols-3", children: [
|
|
14
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-2", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-05 rounded-ds-xl border border-border bg-layer-01 p-ds-06", children: [
|
|
15
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-40", d) }),
|
|
16
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-04", children: Array.from({ length: 4 }).map((c, r) => /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-04", children: [
|
|
17
|
-
/* @__PURE__ */ e(l, { className: s("h-ico-sm w-ico-sm rounded", d) }),
|
|
18
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-04 flex-1", d) }),
|
|
19
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-16 rounded-ds-full", d) })
|
|
20
|
-
] }, `ds-main-${r}`)) })
|
|
21
|
-
] }) }),
|
|
22
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-05 rounded-ds-xl border border-border bg-layer-01 p-ds-06", children: [
|
|
23
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-28", d) }),
|
|
24
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-04", children: Array.from({ length: 3 }).map((c, r) => /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-04", children: [
|
|
25
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-sm w-ds-sm rounded-ds-full", d) }),
|
|
26
|
-
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-ds-02", children: [
|
|
27
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-24", d) }),
|
|
28
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-03 w-16", d) })
|
|
29
|
-
] })
|
|
30
|
-
] }, `ds-side-${r}`)) })
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-3", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-05 rounded-ds-xl border border-border bg-layer-01 p-ds-06", children: [
|
|
33
|
-
/* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
|
|
34
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-36", d) }),
|
|
35
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-sm w-24 rounded-ds-lg", d) })
|
|
36
|
-
] }),
|
|
37
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-ds-04 sm:grid-cols-2 lg:grid-cols-3", children: Array.from({ length: 3 }).map((c, r) => /* @__PURE__ */ a(
|
|
38
|
-
"div",
|
|
39
|
-
{
|
|
40
|
-
className: "flex flex-col gap-ds-03 rounded-ds-lg border border-border p-ds-05",
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-04 w-3/4", d) }),
|
|
43
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-full", d) }),
|
|
44
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-1/2", d) })
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
`ds-card-${r}`
|
|
48
|
-
)) })
|
|
49
|
-
] }) }),
|
|
50
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-2", children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-05 rounded-ds-xl border border-border bg-layer-01 p-ds-06", children: [
|
|
51
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-24", d) }),
|
|
52
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-2 gap-ds-05 sm:grid-cols-4", children: Array.from({ length: 4 }).map((c, r) => /* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-03", children: [
|
|
53
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-16", d) }),
|
|
54
|
-
/* @__PURE__ */ e(l, { className: s("h-6 w-ds-lg", d) })
|
|
55
|
-
] }, `ds-stat-${r}`)) })
|
|
56
|
-
] }) }),
|
|
57
|
-
/* @__PURE__ */ a("div", { className: "flex flex-col gap-ds-05 rounded-ds-xl border border-border bg-layer-01 p-ds-06", children: [
|
|
58
|
-
/* @__PURE__ */ e(l, { className: s("h-5 w-20", d) }),
|
|
59
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-05", children: Array.from({ length: 3 }).map((c, r) => /* @__PURE__ */ a("div", { className: "flex gap-ds-04", children: [
|
|
60
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-3 shrink-0 rounded-ds-full", d) }),
|
|
61
|
-
/* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-ds-02", children: [
|
|
62
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-full", d) }),
|
|
63
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-03 w-20", d) })
|
|
64
|
-
] })
|
|
65
|
-
] }, `ds-time-${r}`)) })
|
|
66
|
-
] })
|
|
67
|
-
] })
|
|
68
|
-
] });
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
f.displayName = "DevsabhaSkeleton";
|
|
72
|
-
const g = m.forwardRef(
|
|
73
|
-
function(n, o) {
|
|
74
|
-
return /* @__PURE__ */ a("div", { ref: o, className: "flex flex-col gap-ds-06", children: [
|
|
75
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-ds-05 sm:grid-cols-3", children: Array.from({ length: 3 }).map((c, r) => /* @__PURE__ */ a(
|
|
76
|
-
"div",
|
|
77
|
-
{
|
|
78
|
-
className: "flex flex-col gap-ds-04 rounded-ds-xl border border-border bg-layer-01 p-ds-05b",
|
|
79
|
-
children: [
|
|
80
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-24", d) }),
|
|
81
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-xs-plus w-16", d) }),
|
|
82
|
-
/* @__PURE__ */ e(l, { className: s("h-2 w-full rounded-ds-full", d) })
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
`bw-card-${r}`
|
|
86
|
-
)) }),
|
|
87
|
-
/* @__PURE__ */ a("div", { className: "overflow-hidden rounded-ds-xl border border-border", children: [
|
|
88
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-05 border-b border-border bg-layer-02 px-ds-05b py-ds-04", children: Array.from({ length: 5 }).map((c, r) => /* @__PURE__ */ e(
|
|
89
|
-
l,
|
|
90
|
-
{
|
|
91
|
-
className: s(
|
|
92
|
-
"h-3",
|
|
93
|
-
d,
|
|
94
|
-
r === 0 ? "w-40" : "flex-1"
|
|
95
|
-
)
|
|
96
|
-
},
|
|
97
|
-
`bw-th-${r}`
|
|
98
|
-
)) }),
|
|
99
|
-
Array.from({ length: 6 }).map((c, r) => /* @__PURE__ */ a(
|
|
100
|
-
"div",
|
|
101
|
-
{
|
|
102
|
-
className: s(
|
|
103
|
-
"flex items-center gap-ds-05 px-ds-05b py-ds-04",
|
|
104
|
-
r < 5 && "border-b border-border"
|
|
105
|
-
),
|
|
106
|
-
children: [
|
|
107
|
-
/* @__PURE__ */ a("div", { className: "flex w-40 items-center gap-ds-03", children: [
|
|
108
|
-
/* @__PURE__ */ e(l, { className: s("h-ds-xs-plus w-ds-xs-plus shrink-0 rounded-ds-full", d) }),
|
|
109
|
-
/* @__PURE__ */ e(l, { className: s("h-3 w-24", d) })
|
|
110
|
-
] }),
|
|
111
|
-
Array.from({ length: 4 }).map((p, h) => /* @__PURE__ */ e(
|
|
112
|
-
l,
|
|
113
|
-
{
|
|
114
|
-
className: s("h-3 flex-1", d)
|
|
115
|
-
},
|
|
116
|
-
`bw-cell-${r}-${h}`
|
|
117
|
-
))
|
|
118
|
-
]
|
|
119
|
-
},
|
|
120
|
-
`bw-row-${r}`
|
|
121
|
-
))
|
|
122
|
-
] })
|
|
123
|
-
] });
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
g.displayName = "BandwidthSkeleton";
|
|
127
|
-
export {
|
|
128
|
-
g as BandwidthSkeleton,
|
|
129
|
-
f as DevsabhaSkeleton
|
|
130
|
-
};
|