@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.
Files changed (68) hide show
  1. package/dist/_chunks/chat-panel.js +376 -0
  2. package/dist/_chunks/daily-brief.js +177 -0
  3. package/dist/_chunks/kanban-board.js +597 -0
  4. package/dist/_chunks/project-card.js +121 -0
  5. package/dist/_chunks/render-adjustment-type.js +3596 -0
  6. package/dist/{tasks → _chunks}/task-constants.js +3 -3
  7. package/dist/_chunks/task-detail-panel.js +1305 -0
  8. package/dist/_chunks/use-composed-ref.js +12 -0
  9. package/dist/_chunks/vendor.js +11491 -0
  10. package/dist/admin/index.js +37 -60
  11. package/dist/board/index.js +3 -5
  12. package/dist/chat/index.js +6 -10
  13. package/dist/client/index.js +4 -6
  14. package/dist/dashboard/index.js +3 -4
  15. package/dist/index.js +189 -103
  16. package/dist/tasks/index.js +8 -14
  17. package/package.json +78 -80
  18. package/dist/admin/adjustments/approved-adjustments.js +0 -43
  19. package/dist/admin/break/break-admin-skeleton.js +0 -59
  20. package/dist/admin/break/break-admin.js +0 -373
  21. package/dist/admin/break/break-balance.js +0 -42
  22. package/dist/admin/break/breaks.js +0 -91
  23. package/dist/admin/break/delete-break.js +0 -55
  24. package/dist/admin/break/edit-break-balance.js +0 -113
  25. package/dist/admin/break/edit-break.js +0 -453
  26. package/dist/admin/break/header.js +0 -231
  27. package/dist/admin/break/leave-request.js +0 -162
  28. package/dist/admin/break/use-break-date-picker.js +0 -43
  29. package/dist/admin/dashboard/admin-dashboard.js +0 -337
  30. package/dist/admin/dashboard/associate-detail.js +0 -259
  31. package/dist/admin/dashboard/attendance-overview.js +0 -136
  32. package/dist/admin/dashboard/break-request.js +0 -176
  33. package/dist/admin/dashboard/calendar.js +0 -141
  34. package/dist/admin/dashboard/correction-list.js +0 -102
  35. package/dist/admin/dashboard/dashboard-header.js +0 -155
  36. package/dist/admin/dashboard/dashboard-skeleton.js +0 -109
  37. package/dist/admin/dashboard/leave-requests.js +0 -201
  38. package/dist/admin/dashboard/render-date.js +0 -144
  39. package/dist/admin/dashboard/use-calendar-navigation.js +0 -169
  40. package/dist/admin/dashboard/use-leave-request-interaction.js +0 -34
  41. package/dist/admin/utils/date-range-utils.js +0 -37
  42. package/dist/admin/utils/date-utils.js +0 -119
  43. package/dist/admin/utils/emoji-utils.js +0 -17
  44. package/dist/admin/utils/render-adjustment-type.js +0 -20
  45. package/dist/admin/utils/render-status.js +0 -22
  46. package/dist/board/board-column.js +0 -236
  47. package/dist/board/kanban-board.js +0 -218
  48. package/dist/board/task-card.js +0 -168
  49. package/dist/chat/chat-input.js +0 -54
  50. package/dist/chat/chat-panel.js +0 -151
  51. package/dist/chat/conversation-list.js +0 -99
  52. package/dist/chat/markdown-components.js +0 -35
  53. package/dist/chat/message-list.js +0 -59
  54. package/dist/chat/streaming-text.js +0 -17
  55. package/dist/client/accent-provider.js +0 -22
  56. package/dist/client/client-portal-header.js +0 -48
  57. package/dist/client/project-card.js +0 -60
  58. package/dist/dashboard/attendance-cta.js +0 -115
  59. package/dist/dashboard/daily-brief.js +0 -68
  60. package/dist/page-skeletons.js +0 -130
  61. package/dist/tasks/activity-tab.js +0 -185
  62. package/dist/tasks/conversation-tab.js +0 -138
  63. package/dist/tasks/files-tab.js +0 -186
  64. package/dist/tasks/review-tab.js +0 -170
  65. package/dist/tasks/subtasks-tab.js +0 -154
  66. package/dist/tasks/task-detail-panel.js +0 -210
  67. package/dist/tasks/task-properties.js +0 -324
  68. package/dist/utils/use-composed-ref.js +0 -12
@@ -1,141 +0,0 @@
1
- "use client";
2
- import { jsxs as r, jsx as a } from "react/jsx-runtime";
3
- import * as v from "react";
4
- import { DropdownMenu as g, DropdownMenuTrigger as y, DropdownMenuContent as b, DropdownMenuItem as w } from "@devalok/shilp-sutra/ui/dropdown-menu";
5
- import { SegmentedControl as D } from "@devalok/shilp-sutra/ui/segmented-control";
6
- import { cn as s } from "@devalok/shilp-sutra/ui/lib/utils";
7
- import { isSameDay as N } from "../utils/date-utils.js";
8
- import { useCalendarNavigation as M } from "./use-calendar-navigation.js";
9
- import { format as o } from "date-fns";
10
- import { IconChevronDown as T, IconChevronLeft as C, IconChevronRight as k } from "@tabler/icons-react";
11
- const F = v.forwardRef(
12
- function({ onDateSelect: m, hasCorrection: i }, u) {
13
- const t = M(), d = (e) => {
14
- t.navigateDate(e);
15
- }, f = (e) => {
16
- t.selectMonth(e);
17
- }, p = () => {
18
- const e = [], c = new Date(t.currentDate).getFullYear();
19
- for (let n = 0; n < 12; n++) {
20
- const x = new Date(c, n, 1);
21
- e.push(`${o(x, "MMMM")} ${c}`);
22
- }
23
- return e;
24
- }, h = (e, l) => {
25
- t.activeTimeFrame === "weekly" ? t.selectDate(e, l) : t.selectDayMonthly(l), m(l);
26
- };
27
- return /* @__PURE__ */ r("div", { ref: u, className: "w-full", children: [
28
- /* @__PURE__ */ r("div", { className: "mb-ds-06 flex w-full items-center justify-start", children: [
29
- /* @__PURE__ */ r(g, { children: [
30
- /* @__PURE__ */ r(y, { className: "text-ds-xl flex items-center gap-ds-03 text-text-secondary", children: [
31
- t.selectedMonth,
32
- /* @__PURE__ */ a(T, {})
33
- ] }),
34
- /* @__PURE__ */ a(b, { children: p().map((e) => /* @__PURE__ */ a(
35
- w,
36
- {
37
- onSelect: () => f(e),
38
- children: e
39
- },
40
- e
41
- )) })
42
- ] }),
43
- /* @__PURE__ */ r("div", { className: "ml-auto flex items-center gap-ds-05", children: [
44
- /* @__PURE__ */ a(
45
- D,
46
- {
47
- size: "md",
48
- variant: "tonal",
49
- options: [
50
- { id: "weekly", text: "Weekly" },
51
- { id: "monthly", text: "Monthly" }
52
- ],
53
- selectedId: t.activeTimeFrame,
54
- onSelect: (e) => t.setActiveTimeFrame(e)
55
- }
56
- ),
57
- /* @__PURE__ */ r("div", { className: "flex gap-0", children: [
58
- /* @__PURE__ */ a(
59
- "button",
60
- {
61
- "aria-label": "Previous",
62
- onClick: () => d("prev"),
63
- className: "rounded-ds-full p-ds-02 hover:bg-layer-02",
64
- children: /* @__PURE__ */ a(C, { className: "h-ico-md w-ico-md text-text-secondary" })
65
- }
66
- ),
67
- /* @__PURE__ */ a(
68
- "button",
69
- {
70
- "aria-label": "Next",
71
- onClick: () => d("next"),
72
- className: "rounded-ds-full p-ds-02 hover:bg-layer-02",
73
- children: /* @__PURE__ */ a(k, { className: "h-ico-md w-ico-md text-text-secondary" })
74
- }
75
- )
76
- ] })
77
- ] })
78
- ] }),
79
- /* @__PURE__ */ r(
80
- "div",
81
- {
82
- className: s(
83
- "calendar",
84
- t.activeTimeFrame === "weekly" ? "flex" : "grid grid-cols-7 gap-0",
85
- "w-full items-center overflow-hidden"
86
- ),
87
- children: [
88
- t.activeTimeFrame === "monthly" && ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((e) => /* @__PURE__ */ a("div", { className: "pb-ds-03 pt-ds-05 text-center", children: /* @__PURE__ */ a("span", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-tertiary", children: e }) }, e)),
89
- t.days.map((e, l) => /* @__PURE__ */ r(
90
- "button",
91
- {
92
- type: "button",
93
- tabIndex: e.isPadding ? -1 : 0,
94
- "aria-label": e.isPadding ? void 0 : o(e.fullDate, "MMMM d, yyyy"),
95
- className: s(
96
- t.activeTimeFrame === "weekly" ? "w-full rounded-t-ds-lg pb-ds-04 pt-ds-05" : "pb-0 pt-0",
97
- "flex cursor-pointer flex-col items-center text-center",
98
- t.activeTimeFrame === "weekly" && t.activeIndex === l && "bg-layer-02",
99
- e.isPadding && "opacity-[0.5]"
100
- ),
101
- onClick: () => h(l, e.fullDate),
102
- children: [
103
- t.activeTimeFrame === "weekly" && /* @__PURE__ */ a("span", { className: "text-ds-sm font-semibold uppercase tracking-wider mb-ds-03 text-text-tertiary", children: e.day }),
104
- /* @__PURE__ */ r(
105
- "div",
106
- {
107
- className: s(
108
- "mx-ds-02 my-ds-02 flex-col",
109
- "flex h-ds-md w-ds-md items-center justify-center",
110
- t.activeTimeFrame === "monthly" && N(e.fullDate, new Date(t.selectedDate)) && "rounded-ds-full bg-interactive-subtle ring-2 ring-inset ring-interactive"
111
- ),
112
- children: [
113
- /* @__PURE__ */ a(
114
- "span",
115
- {
116
- className: s(
117
- "text-ds-base flex h-ds-md w-ds-md items-center justify-center rounded-ds-full",
118
- e.isToday ? "bg-interactive-hover p-ds-03 text-text-on-color" : "text-text-secondary",
119
- e.isActive && !e.isToday && "bg-field"
120
- ),
121
- children: e.date
122
- }
123
- ),
124
- i && i(e.fullDate) && /* @__PURE__ */ a("div", { className: "absolute z-raised mt-ds-06 h-ds-02b w-ds-02b translate-y-[5px] rounded-ds-full bg-text-error" })
125
- ]
126
- }
127
- )
128
- ]
129
- },
130
- l
131
- ))
132
- ]
133
- }
134
- )
135
- ] });
136
- }
137
- );
138
- F.displayName = "Calendar";
139
- export {
140
- F as Calendar
141
- };
@@ -1,102 +0,0 @@
1
- "use client";
2
- import { jsx as s, jsxs as d } from "react/jsx-runtime";
3
- import * as A from "react";
4
- import { Fragment as C } from "react";
5
- import { Avatar as L, AvatarImage as q, AvatarFallback as O } from "@devalok/shilp-sutra/ui/avatar";
6
- import { Tooltip as k, TooltipTrigger as E, TooltipContent as F } from "@devalok/shilp-sutra/ui/tooltip";
7
- import { cn as P } from "@devalok/shilp-sutra/ui/lib/utils";
8
- import { formatDateWithWeekday as R } from "../utils/date-utils.js";
9
- import { IconX as V, IconCheck as W } from "@tabler/icons-react";
10
- const Y = A.forwardRef(
11
- function({
12
- corrections: p,
13
- currentUserId: l,
14
- userImages: j,
15
- assetsBaseUrl: J,
16
- activeTimeFrame: X,
17
- onApproveCorrection: x,
18
- onRejectCorrection: h
19
- }, u) {
20
- const f = async (a, e) => {
21
- e === "APPROVED" ? await (x == null ? void 0 : x(a.id)) : await (h == null ? void 0 : h(a.id));
22
- };
23
- return p.length === 0 ? /* @__PURE__ */ s("div", { ref: u, className: "p-ds-05 text-center", children: "No pending corrections" }) : /* @__PURE__ */ s(
24
- "div",
25
- {
26
- ref: u,
27
- className: "flex max-h-[200px] w-full flex-col overflow-y-auto bg-layer-01 px-ds-06 max-md:flex-1 max-md:max-h-none max-md:min-h-[372px] max-md:p-0",
28
- children: p.map((a) => {
29
- var e, t, i, y, N, b, g, w, v, D, T;
30
- return /* @__PURE__ */ s(C, { children: /* @__PURE__ */ d("div", { className: "max-md:border flex items-center justify-between px-ds-03 py-ds-04 max-md:rounded-ds-lg max-md:border-border", children: [
31
- /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-04", children: [
32
- /* @__PURE__ */ d(L, { className: "h-ds-md w-ds-md border-2 max-md:mb-[auto]", children: [
33
- /* @__PURE__ */ s(
34
- q,
35
- {
36
- src: j[((e = a == null ? void 0 : a.user) == null ? void 0 : e.id) || ""] || "",
37
- alt: `${(t = a == null ? void 0 : a.user) == null ? void 0 : t.name}'s Icon`
38
- }
39
- ),
40
- /* @__PURE__ */ s(O, { children: ((y = (i = a == null ? void 0 : a.user) == null ? void 0 : i.name) == null ? void 0 : y[0]) || "U" })
41
- ] }),
42
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-ds-02", children: [
43
- /* @__PURE__ */ s("p", { className: "text-ds-sm text-text-secondary", children: (N = a == null ? void 0 : a.user) == null ? void 0 : N.name }),
44
- /* @__PURE__ */ d("div", { className: "flex w-full flex-wrap items-center gap-ds-03", children: [
45
- /* @__PURE__ */ s("p", { className: "text-ds-base font-semibold text-text-primary", children: a == null ? void 0 : a.reason }),
46
- a != null && a.reason ? /* @__PURE__ */ s("p", { className: "text-ds-base font-semibold text-text-tertiary", children: "•" }) : null,
47
- /* @__PURE__ */ s("p", { className: "text-ds-base text-text-tertiary", children: R(
48
- new Date(a == null ? void 0 : a.date)
49
- ) })
50
- ] })
51
- ] })
52
- ] }),
53
- /* @__PURE__ */ d("div", { className: "ml-auto flex items-center gap-ds-04 max-md:flex-col max-md:justify-center max-md:gap-0", children: [
54
- /* @__PURE__ */ s("div", { className: "p-ds-02", children: /* @__PURE__ */ d(k, { delayDuration: 0, children: [
55
- /* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(
56
- "button",
57
- {
58
- "aria-label": "Reject correction",
59
- className: P("rounded-ds-full p-ds-03 text-text-tertiary hover:text-text-secondary", ((b = a == null ? void 0 : a.user) == null ? void 0 : b.id) === l ? "cursor-not-allowed opacity-[0.38]" : ""),
60
- onClick: () => {
61
- var m;
62
- return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l && f(
63
- a,
64
- "REJECTED"
65
- );
66
- },
67
- disabled: ((g = a == null ? void 0 : a.user) == null ? void 0 : g.id) === l,
68
- children: /* @__PURE__ */ s(V, { className: "h-ico-lg w-ico-lg" })
69
- }
70
- ) }),
71
- ((w = a == null ? void 0 : a.user) == null ? void 0 : w.id) === l && /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s("p", { children: "You cannot approve/reject your own correction request" }) })
72
- ] }) }),
73
- /* @__PURE__ */ s("div", { className: "p-ds-02", children: /* @__PURE__ */ d(k, { delayDuration: 0, children: [
74
- /* @__PURE__ */ s(E, { asChild: !0, children: /* @__PURE__ */ s(
75
- "button",
76
- {
77
- "aria-label": "Approve correction",
78
- className: P("rounded-ds-full p-ds-03", ((v = a == null ? void 0 : a.user) == null ? void 0 : v.id) === l ? "cursor-not-allowed opacity-[0.38]" : ""),
79
- onClick: () => {
80
- var m;
81
- return ((m = a == null ? void 0 : a.user) == null ? void 0 : m.id) !== l && f(
82
- a,
83
- "APPROVED"
84
- );
85
- },
86
- disabled: ((D = a == null ? void 0 : a.user) == null ? void 0 : D.id) === l,
87
- children: /* @__PURE__ */ s(W, { className: "h-ico-lg w-ico-lg text-text-success" })
88
- }
89
- ) }),
90
- ((T = a == null ? void 0 : a.user) == null ? void 0 : T.id) === l && /* @__PURE__ */ s(F, { children: /* @__PURE__ */ s("p", { children: "You cannot approve/reject your own correction request" }) })
91
- ] }) })
92
- ] })
93
- ] }) }, a.id);
94
- })
95
- }
96
- );
97
- }
98
- );
99
- Y.displayName = "CorrectionList";
100
- export {
101
- Y as CorrectionList
102
- };
@@ -1,155 +0,0 @@
1
- "use client";
2
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
3
- import * as C from "react";
4
- import { DropdownMenu as x, DropdownMenuTrigger as h, DropdownMenuContent as f, DropdownMenuItem as o } from "@devalok/shilp-sutra/ui/dropdown-menu";
5
- import { Button as D } from "@devalok/shilp-sutra/ui/button";
6
- import { IconButton as p } from "@devalok/shilp-sutra/ui/icon-button";
7
- import { SegmentedControl as k } from "@devalok/shilp-sutra/ui/segmented-control";
8
- import { cn as b } from "@devalok/shilp-sutra/ui/lib/utils";
9
- import { IconChevronDown as N, IconX as I, IconUser as M, IconChevronLeft as z, IconChevronRight as H } from "@tabler/icons-react";
10
- const R = C.forwardRef(
11
- function({
12
- selectedMonth: m,
13
- yearsList: s,
14
- isTodaySelected: u,
15
- selectedAssociate: a,
16
- users: l,
17
- userImages: n,
18
- activeTimeFrame: w,
19
- onMonthSelection: v,
20
- onTodayClick: y,
21
- onSelectAssociate: i,
22
- onTimeFrameChange: g,
23
- onDateChange: c
24
- }, j) {
25
- return /* @__PURE__ */ d("div", { ref: j, className: "mb-ds-06 flex w-full flex-col items-start justify-between md:flex-row md:items-center", children: [
26
- /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-ds-05 md:w-auto md:justify-start", children: [
27
- /* @__PURE__ */ d(x, { children: [
28
- /* @__PURE__ */ d(h, { className: "text-ds-xl flex items-center gap-ds-03 text-text-secondary", children: [
29
- m,
30
- /* @__PURE__ */ e(N, {})
31
- ] }),
32
- /* @__PURE__ */ e(f, { className: "custom-scrollbar absolute ml-ds-08 max-h-[300px] overflow-y-auto rounded-ds-md border border-0 border-border p-0 shadow-brand", children: s.map((t, r) => /* @__PURE__ */ e(
33
- o,
34
- {
35
- onSelect: () => {
36
- v(t);
37
- },
38
- className: b("p-0", r !== s.length - 1 ? "border-b border-b-border" : ""),
39
- children: /* @__PURE__ */ e(
40
- "span",
41
- {
42
- className: b("w-full py-ds-04 pl-ds-05 pr-ds-06", m === t ? "text-ds-md font-semibold bg-interactive text-text-on-color" : "text-ds-md text-text-secondary hover:bg-layer-02", r === 0 ? "rounded-t-[7px]" : r === s.length - 1 ? "rounded-b-[7px]" : ""),
43
- children: t.split(" ")[1]
44
- }
45
- )
46
- },
47
- t
48
- )) })
49
- ] }),
50
- !u && /* @__PURE__ */ e(
51
- D,
52
- {
53
- variant: "outline",
54
- onClick: y,
55
- children: "Today"
56
- }
57
- )
58
- ] }),
59
- /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-ds-05 md:mt-0 md:w-auto md:justify-start max-md:mt-[17px] max-lg:gap-[0.5rem]", children: [
60
- /* @__PURE__ */ e("div", { className: "hidden md:flex", children: a ? /* @__PURE__ */ d("div", { className: "text-ds-md flex items-center justify-start rounded-ds-md bg-interactive px-ds-03 py-ds-02b text-text-on-color", children: [
61
- /* @__PURE__ */ d("div", { className: "flex items-center justify-start gap-0", children: [
62
- n[a.id] ? /* @__PURE__ */ e(
63
- "img",
64
- {
65
- src: n[a.id],
66
- alt: `${a.name}'s avatar`,
67
- className: "h-ico-md w-ico-md rounded-ds-full"
68
- }
69
- ) : /* @__PURE__ */ e("div", { className: "flex h-ico-md w-ico-md flex-shrink-0 items-center justify-center rounded-ds-full bg-layer-03", children: /* @__PURE__ */ e("span", { className: "text-interactive", children: a.name.charAt(0) }) }),
70
- /* @__PURE__ */ e("span", { className: "text-ds-md ml-ds-01 mr-ds-02 text-text-on-color", children: a.name })
71
- ] }),
72
- /* @__PURE__ */ e(
73
- "button",
74
- {
75
- "aria-label": "Clear filter",
76
- onClick: () => i(null),
77
- className: "border-0 bg-transparent p-0",
78
- children: /* @__PURE__ */ e(I, { className: "h-ico-sm w-ico-sm text-text-on-color" })
79
- }
80
- )
81
- ] }) : /* @__PURE__ */ d(x, { children: [
82
- /* @__PURE__ */ d(h, { className: "text-ds-md hidden items-center justify-between rounded-ds-md border border-border-subtle bg-layer-01 px-ds-03 py-ds-02b md:flex", children: [
83
- /* @__PURE__ */ d("div", { className: "flex items-center", children: [
84
- /* @__PURE__ */ e(M, { className: "h-ico-md w-ico-md" }),
85
- /* @__PURE__ */ e("span", { className: "text-ds-md ml-ds-01 mr-ds-02 text-text-secondary max-lg:mx-0 max-lg:text-ds-sm", children: "Associate" })
86
- ] }),
87
- /* @__PURE__ */ e(N, { className: "h-ico-sm w-ico-sm" })
88
- ] }),
89
- /* @__PURE__ */ e(f, { className: "custom-scrollbar max-h-[400px] w-64 overflow-y-auto p-ds-03", children: (l == null ? void 0 : l.length) === 0 ? /* @__PURE__ */ e(o, { disabled: !0, children: "No users available" }) : l == null ? void 0 : l.map((t) => /* @__PURE__ */ d(
90
- o,
91
- {
92
- onSelect: () => {
93
- const r = {
94
- ...t,
95
- createdAt: new Date(t.createdAt)
96
- };
97
- i(r);
98
- },
99
- className: "flex items-center gap-ds-03 p-ds-03",
100
- children: [
101
- n[t.id] ? /* @__PURE__ */ e(
102
- "img",
103
- {
104
- src: n[t.id],
105
- alt: `${t.name}'s avatar`,
106
- className: "h-ds-xs w-ds-xs rounded-ds-full"
107
- }
108
- ) : /* @__PURE__ */ e("div", { className: "flex h-ds-xs w-ds-xs items-center justify-center rounded-ds-full bg-layer-03", children: /* @__PURE__ */ e("span", { className: "text-ds-md text-interactive", children: t.name.charAt(0) }) }),
109
- /* @__PURE__ */ e("span", { className: "text-ds-md text-text-secondary", children: t.name })
110
- ]
111
- },
112
- t.id
113
- )) })
114
- ] }) }),
115
- /* @__PURE__ */ e(
116
- k,
117
- {
118
- size: "md",
119
- variant: "tonal",
120
- options: [
121
- { id: "weekly", text: "Weekly" },
122
- { id: "monthly", text: "Monthly" }
123
- ],
124
- selectedId: w,
125
- onSelect: g
126
- }
127
- ),
128
- /* @__PURE__ */ d("div", { className: "flex gap-0", children: [
129
- /* @__PURE__ */ e(
130
- p,
131
- {
132
- icon: /* @__PURE__ */ e(z, {}),
133
- size: "sm",
134
- "aria-label": "Previous",
135
- onClick: () => c("prev")
136
- }
137
- ),
138
- /* @__PURE__ */ e(
139
- p,
140
- {
141
- icon: /* @__PURE__ */ e(H, {}),
142
- size: "sm",
143
- "aria-label": "Next",
144
- onClick: () => c("next")
145
- }
146
- )
147
- ] })
148
- ] })
149
- ] });
150
- }
151
- );
152
- R.displayName = "DashboardHeader";
153
- export {
154
- R as DashboardHeader
155
- };
@@ -1,109 +0,0 @@
1
- "use client";
2
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
- import * as o from "react";
4
- import { cn as m } from "@devalok/shilp-sutra/ui/lib/utils";
5
- import { Skeleton as s } from "@devalok/shilp-sutra/ui/skeleton";
6
- import { DropdownMenu as n, DropdownMenuTrigger as c } from "@devalok/shilp-sutra/ui/dropdown-menu";
7
- import { IconButton as t } from "@devalok/shilp-sutra/ui/icon-button";
8
- import { IconChevronDown as x, IconChevronLeft as f, IconChevronRight as p } from "@tabler/icons-react";
9
- const b = o.forwardRef(
10
- function(h, i) {
11
- return /* @__PURE__ */ e("div", { ref: i, className: "flex w-full max-w-layout flex-col items-center justify-center max-md:h-[100%] max-md:justify-start", children: /* @__PURE__ */ d("div", { className: "z-raised flex w-full flex-col items-start justify-start rounded-ds-lg border border-border bg-layer-02 p-ds-05 shadow-05 max-md:flex-1 max-md:min-h-0 max-md:overflow-y-auto max-md:border-0 max-md:px-ds-05 max-md:pb-0 max-md:pt-ds-06", children: [
12
- /* @__PURE__ */ d("div", { className: "mb-ds-06 flex w-full flex-col items-start justify-between md:flex-row md:items-center", children: [
13
- /* @__PURE__ */ e(n, { children: /* @__PURE__ */ d(c, { className: "text-ds-xl flex items-center gap-ds-03 text-text-secondary", "aria-label": "Select period", children: [
14
- /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-03", children: [
15
- /* @__PURE__ */ e(s, { className: "h-[25px] w-[50px] rounded-ds-md bg-field" }),
16
- /* @__PURE__ */ e(s, { className: "h-[25px] w-[50px] rounded-ds-md bg-field" })
17
- ] }),
18
- /* @__PURE__ */ e(x, {})
19
- ] }) }),
20
- /* @__PURE__ */ d("div", { className: "flex w-full items-center justify-between gap-ds-05 md:mt-0 md:w-auto md:justify-start max-md:mt-[17px] max-lg:gap-[0.5rem]", children: [
21
- /* @__PURE__ */ e("div", { className: "hidden md:flex", children: /* @__PURE__ */ e(s, { className: "h-ds-sm w-[180px] rounded-ds-md" }) }),
22
- /* @__PURE__ */ d("div", { className: "flex w-[200px] items-center justify-between overflow-clip rounded-ds-full border border-layer-03", children: [
23
- /* @__PURE__ */ e("div", { className: "flex h-ds-sm w-[100px] items-center justify-center rounded-r-none bg-field", children: /* @__PURE__ */ e(s, { className: "h-[20px] w-[40px] rounded-r-none bg-layer-03" }) }),
24
- /* @__PURE__ */ e("div", { className: "flex h-ds-sm w-[100px] items-center justify-center", children: /* @__PURE__ */ e(s, { className: "h-[20px] w-[40px] bg-layer-03" }) })
25
- ] }),
26
- /* @__PURE__ */ d("div", { className: "flex gap-0", children: [
27
- /* @__PURE__ */ e(t, { icon: /* @__PURE__ */ e(f, {}), size: "sm", "aria-label": "Previous" }),
28
- /* @__PURE__ */ e(
29
- t,
30
- {
31
- icon: /* @__PURE__ */ e(p, {}),
32
- size: "sm",
33
- "aria-label": "Next",
34
- onClick: () => {
35
- }
36
- }
37
- )
38
- ] })
39
- ] })
40
- ] }),
41
- /* @__PURE__ */ e("div", { className: "flex w-full items-center", children: Array.from({ length: 7 }).map((l, r) => /* @__PURE__ */ d(
42
- "div",
43
- {
44
- className: "flex w-full flex-col items-center rounded-t-ds-lg pb-ds-04 pt-ds-05 max-md:rounded-ds-lg",
45
- children: [
46
- /* @__PURE__ */ e(s, { className: "mb-ds-03 h-[10px] w-[10px] rounded-ds-lg bg-field" }),
47
- /* @__PURE__ */ e("div", { className: "mx-ds-02 my-ds-02 flex items-center justify-center", children: /* @__PURE__ */ e(s, { className: "h-ds-md w-ds-md rounded-ds-full bg-field" }) })
48
- ]
49
- },
50
- r
51
- )) }),
52
- /* @__PURE__ */ d("div", { className: "flex w-full flex-col rounded-ds-lg bg-layer-02 md:p-ds-06 max-md:bg-transparent", children: [
53
- /* @__PURE__ */ e("div", { className: "no-scrollbar w-full cursor-grab overflow-x-auto active:cursor-grabbing max-md:pb-ds-05", children: /* @__PURE__ */ e(
54
- "div",
55
- {
56
- className: "flex items-start justify-start gap-ds-04 px-0 pt-ds-03 md:gap-0 md:px-ds-06 min-w-max",
57
- children: Array.from({ length: 3 }).map((l, r) => /* @__PURE__ */ d(
58
- "div",
59
- {
60
- className: m("flex w-full flex-col gap-ds-04 rounded-ds-md bg-layer-02 p-ds-06 md:rounded-ds-lg md:p-ds-05", r !== 2 ? "border-r border-border" : "", "max-md:border-0 max-md:p-ds-05", "min-w-[200px]"),
61
- children: [
62
- /* @__PURE__ */ e(s, { className: "h-[20px] w-[120px] rounded-ds-md bg-field" }),
63
- /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-ds-03", children: Array.from({ length: 4 }).map((w, a) => /* @__PURE__ */ e(
64
- s,
65
- {
66
- className: m("h-ds-md w-ds-md rounded-ds-full bg-field", a > 0 ? "ml-[-5px]" : "")
67
- },
68
- a
69
- )) })
70
- ]
71
- },
72
- r
73
- ))
74
- }
75
- ) }),
76
- /* @__PURE__ */ e("div", { className: "w-full p-0 md:p-ds-06", children: /* @__PURE__ */ d("div", { className: "max-md:pt-[16px] flex flex-col items-start overflow-hidden rounded-ds-lg border-0 border-border-subtle bg-layer-01 shadow-01 pt-ds-03 md:border max-md:pb-0", children: [
77
- /* @__PURE__ */ d("div", { className: "flex w-full items-start border-b-[1px] border-b-border px-ds-06 md:border-b max-md:border-0 max-md:px-0", children: [
78
- /* @__PURE__ */ e("div", { className: "text-ds-sm font-semibold uppercase tracking-wider cursor-pointer border-b-[1.5px] border-b-interactive-hover px-ds-03 py-ds-04 font-semibold text-text-primary", children: "REQUESTS(1)" }),
79
- /* @__PURE__ */ e("div", { className: "text-ds-sm font-semibold uppercase tracking-wider cursor-pointer px-ds-03 py-ds-04 text-text-tertiary", children: "ATTENDANCE CORRECTION(1)" })
80
- ] }),
81
- /* @__PURE__ */ e("div", { className: "flex max-h-[200px] w-full flex-col overflow-y-auto bg-layer-01 px-ds-06 max-md:flex-1 max-md:max-h-none max-md:min-h-[372px] max-md:p-0", children: Array.from({ length: 2 }).map((l, r) => /* @__PURE__ */ d(
82
- "div",
83
- {
84
- className: "flex items-center justify-between px-ds-03 py-ds-04",
85
- children: [
86
- /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-04", children: [
87
- /* @__PURE__ */ e(s, { className: "h-ds-md w-ds-md rounded-ds-full bg-field" }),
88
- /* @__PURE__ */ d("div", { className: "flex flex-col gap-ds-02", children: [
89
- /* @__PURE__ */ e(s, { className: "h-[20px] w-[120px] rounded-ds-md bg-field" }),
90
- /* @__PURE__ */ e(s, { className: "h-[20px] w-[200px] rounded-ds-md bg-field" })
91
- ] })
92
- ] }),
93
- /* @__PURE__ */ d("div", { className: "flex items-center gap-ds-04", children: [
94
- /* @__PURE__ */ e(s, { className: "h-ds-sm w-ds-sm rounded-ds-full bg-field" }),
95
- /* @__PURE__ */ e(s, { className: "h-ds-sm w-ds-sm rounded-ds-full bg-field" })
96
- ] })
97
- ]
98
- },
99
- r
100
- )) })
101
- ] }) })
102
- ] })
103
- ] }) });
104
- }
105
- );
106
- b.displayName = "DashboardSkeleton";
107
- export {
108
- b as DashboardSkeleton
109
- };