@devalok/shilp-sutra-karm 0.8.2 → 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 +78 -80
- 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,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
|
-
};
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
3
|
-
import * as p from "react";
|
|
4
|
-
import { cn as d } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
5
|
-
import { EmptyState as m } from "@devalok/shilp-sutra/composed/empty-state";
|
|
6
|
-
import { IconActivity as l, IconCalendarEvent as f, IconTag as x, IconFlag as h, IconEye as y, IconCircleCheck as b, IconGitPullRequest as w, IconPaperclip as v, IconMessage as k, IconUserMinus as N, IconUserPlus as D, IconArrowRight as C, IconEdit as I, IconPlus as A } from "@tabler/icons-react";
|
|
7
|
-
const T = {
|
|
8
|
-
"task.created": {
|
|
9
|
-
icon: A,
|
|
10
|
-
color: "text-success-text",
|
|
11
|
-
dotColor: "bg-success",
|
|
12
|
-
getDescription: () => "created this task"
|
|
13
|
-
},
|
|
14
|
-
"task.updated": {
|
|
15
|
-
icon: I,
|
|
16
|
-
color: "text-category-slate-text",
|
|
17
|
-
dotColor: "bg-category-slate",
|
|
18
|
-
getDescription: (e) => {
|
|
19
|
-
const t = e.metadata;
|
|
20
|
-
return (t == null ? void 0 : t.field) === "title" ? "updated the title" : (t == null ? void 0 : t.field) === "description" ? "updated the description" : (t == null ? void 0 : t.field) === "priority" ? `changed priority to ${(t == null ? void 0 : t.newValue) || "unknown"}` : (t == null ? void 0 : t.field) === "dueDate" ? "updated the due date" : (t == null ? void 0 : t.field) === "labels" ? "updated labels" : "updated this task";
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"task.moved": {
|
|
24
|
-
icon: C,
|
|
25
|
-
color: "text-warning-text",
|
|
26
|
-
dotColor: "bg-warning",
|
|
27
|
-
getDescription: (e) => {
|
|
28
|
-
const t = e.metadata, c = (t == null ? void 0 : t.fromColumn) || "unknown", n = (t == null ? void 0 : t.toColumn) || "unknown";
|
|
29
|
-
return `moved from ${c} to ${n}`;
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"task.assigned": {
|
|
33
|
-
icon: D,
|
|
34
|
-
color: "text-category-cyan-text",
|
|
35
|
-
dotColor: "bg-category-cyan",
|
|
36
|
-
getDescription: (e) => {
|
|
37
|
-
const t = e.metadata;
|
|
38
|
-
return `assigned ${(t == null ? void 0 : t.assigneeName) || "a user"}`;
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"task.unassigned": {
|
|
42
|
-
icon: N,
|
|
43
|
-
color: "text-text-secondary",
|
|
44
|
-
dotColor: "bg-icon-disabled",
|
|
45
|
-
getDescription: (e) => {
|
|
46
|
-
const t = e.metadata;
|
|
47
|
-
return `removed ${(t == null ? void 0 : t.assigneeName) || "a user"}`;
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
"task.commented": {
|
|
51
|
-
icon: k,
|
|
52
|
-
color: "text-interactive",
|
|
53
|
-
dotColor: "bg-interactive",
|
|
54
|
-
getDescription: () => "added a comment"
|
|
55
|
-
},
|
|
56
|
-
"task.file_uploaded": {
|
|
57
|
-
icon: v,
|
|
58
|
-
color: "text-category-indigo-text",
|
|
59
|
-
dotColor: "bg-category-indigo",
|
|
60
|
-
getDescription: (e) => {
|
|
61
|
-
const t = e.metadata;
|
|
62
|
-
return `uploaded ${(t == null ? void 0 : t.fileName) || "a file"}`;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"task.review_requested": {
|
|
66
|
-
icon: w,
|
|
67
|
-
color: "text-warning-text",
|
|
68
|
-
dotColor: "bg-warning",
|
|
69
|
-
getDescription: (e) => {
|
|
70
|
-
const t = e.metadata;
|
|
71
|
-
return `requested review from ${(t == null ? void 0 : t.reviewerName) || "a reviewer"}`;
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"task.review_completed": {
|
|
75
|
-
icon: b,
|
|
76
|
-
color: "text-success-text",
|
|
77
|
-
dotColor: "bg-success",
|
|
78
|
-
getDescription: (e) => {
|
|
79
|
-
const t = e.metadata;
|
|
80
|
-
return `${(t == null ? void 0 : t.status) || "reviewed"} the task`;
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"task.visibility_changed": {
|
|
84
|
-
icon: y,
|
|
85
|
-
color: "text-text-tertiary",
|
|
86
|
-
dotColor: "bg-icon-secondary",
|
|
87
|
-
getDescription: (e) => {
|
|
88
|
-
const t = e.metadata;
|
|
89
|
-
return `changed visibility to ${(t == null ? void 0 : t.visibility) || "unknown"}`;
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"task.priority_changed": {
|
|
93
|
-
icon: h,
|
|
94
|
-
color: "text-error-text",
|
|
95
|
-
dotColor: "bg-error",
|
|
96
|
-
getDescription: (e) => {
|
|
97
|
-
const t = e.metadata;
|
|
98
|
-
return `changed priority to ${(t == null ? void 0 : t.priority) || "unknown"}`;
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
"task.labels_changed": {
|
|
102
|
-
icon: x,
|
|
103
|
-
color: "text-category-amber-text",
|
|
104
|
-
dotColor: "bg-category-amber",
|
|
105
|
-
getDescription: () => "updated labels"
|
|
106
|
-
},
|
|
107
|
-
"task.due_date_changed": {
|
|
108
|
-
icon: f,
|
|
109
|
-
color: "text-warning-text",
|
|
110
|
-
dotColor: "bg-warning",
|
|
111
|
-
getDescription: (e) => {
|
|
112
|
-
const t = e.metadata;
|
|
113
|
-
return t != null && t.dueDate ? `set due date to ${t.dueDate}` : "updated the due date";
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}, $ = {
|
|
117
|
-
icon: l,
|
|
118
|
-
color: "text-text-placeholder",
|
|
119
|
-
dotColor: "bg-icon-disabled",
|
|
120
|
-
getDescription: (e) => e.action
|
|
121
|
-
};
|
|
122
|
-
function _(e) {
|
|
123
|
-
const t = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), o = Math.floor(n / 6e4), i = Math.floor(o / 60), s = Math.floor(i / 24);
|
|
124
|
-
return o < 1 ? "Just now" : o < 60 ? `${o}m ago` : i < 24 ? `${i}h ago` : s < 7 ? `${s}d ago` : t.toLocaleDateString("en-IN", {
|
|
125
|
-
month: "short",
|
|
126
|
-
day: "numeric",
|
|
127
|
-
hour: "numeric",
|
|
128
|
-
minute: "2-digit"
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
function M(e) {
|
|
132
|
-
const t = e.metadata;
|
|
133
|
-
return t != null && t.actorName ? t.actorName : e.actorType === "SYSTEM" ? "System" : e.actorType === "AGENT" ? "AI Agent" : "Someone";
|
|
134
|
-
}
|
|
135
|
-
const E = p.forwardRef(
|
|
136
|
-
function({ activities: t, className: c }, n) {
|
|
137
|
-
return t.length === 0 ? /* @__PURE__ */ r(
|
|
138
|
-
m,
|
|
139
|
-
{
|
|
140
|
-
ref: n,
|
|
141
|
-
icon: /* @__PURE__ */ r(l, {}),
|
|
142
|
-
title: "No activity yet",
|
|
143
|
-
description: "Actions on this task will appear here",
|
|
144
|
-
compact: !0,
|
|
145
|
-
className: c
|
|
146
|
-
}
|
|
147
|
-
) : /* @__PURE__ */ a("div", { ref: n, className: d("relative", c), children: [
|
|
148
|
-
/* @__PURE__ */ r("div", { className: "absolute left-[11px] top-2 bottom-2 w-px bg-border" }),
|
|
149
|
-
/* @__PURE__ */ r("div", { className: "space-y-ds-05", children: t.map((o) => {
|
|
150
|
-
const i = T[o.action] || $, s = i.icon, u = M(o), g = i.getDescription(o);
|
|
151
|
-
return /* @__PURE__ */ a("div", { className: "relative flex gap-ds-04 pl-0", children: [
|
|
152
|
-
/* @__PURE__ */ r("div", { className: "relative z-raised flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-ds-full bg-layer-01", children: /* @__PURE__ */ r(
|
|
153
|
-
"div",
|
|
154
|
-
{
|
|
155
|
-
className: d(
|
|
156
|
-
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-layer-02"
|
|
157
|
-
),
|
|
158
|
-
children: /* @__PURE__ */ r(
|
|
159
|
-
s,
|
|
160
|
-
{
|
|
161
|
-
className: d("h-3 w-3", i.color),
|
|
162
|
-
stroke: 2
|
|
163
|
-
}
|
|
164
|
-
)
|
|
165
|
-
}
|
|
166
|
-
) }),
|
|
167
|
-
/* @__PURE__ */ a("div", { className: "flex-1 min-w-0 pt-ds-01", children: [
|
|
168
|
-
/* @__PURE__ */ a("p", { className: "text-ds-sm", children: [
|
|
169
|
-
/* @__PURE__ */ r("span", { className: "font-medium text-text-primary", children: u }),
|
|
170
|
-
/* @__PURE__ */ a("span", { className: "text-text-tertiary", children: [
|
|
171
|
-
" ",
|
|
172
|
-
g
|
|
173
|
-
] })
|
|
174
|
-
] }),
|
|
175
|
-
/* @__PURE__ */ r("p", { className: "mt-ds-01 text-ds-xs text-text-placeholder", children: _(o.timestamp) })
|
|
176
|
-
] })
|
|
177
|
-
] }, o.id);
|
|
178
|
-
}) })
|
|
179
|
-
] });
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
E.displayName = "ActivityTab";
|
|
183
|
-
export {
|
|
184
|
-
E as ActivityTab
|
|
185
|
-
};
|