@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.
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 +9 -4
  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,113 +0,0 @@
1
- "use client";
2
- import { jsxs as a, jsx as t } from "react/jsx-runtime";
3
- import * as y from "react";
4
- import { useState as o, useRef as w, useEffect as g } from "react";
5
- import { useToast as N } from "@devalok/shilp-sutra/hooks/use-toast";
6
- import { Dialog as k, DialogTrigger as D, DialogContent as B, DialogHeader as C, DialogDescription as E } from "@devalok/shilp-sutra/ui/dialog";
7
- import { Button as p } from "@devalok/shilp-sutra/ui/button";
8
- import { NumberInput as j } from "@devalok/shilp-sutra/ui/number-input";
9
- import { IconPencil as F } from "@tabler/icons-react";
10
- const I = y.forwardRef(function({
11
- selectedLeave: r,
12
- onSave: n
13
- }, R) {
14
- var e;
15
- const [s, l] = o(!1), [c, u] = o(
16
- typeof (r == null ? void 0 : r.cashout) == "number" ? r.cashout : 0
17
- ), [m, h] = o(
18
- (r == null ? void 0 : r.carryForward) || 0
19
- ), d = w(null), { toast: f } = N();
20
- g(() => {
21
- u(
22
- typeof (r == null ? void 0 : r.cashout) == "number" ? r.cashout : 0
23
- ), h((r == null ? void 0 : r.carryForward) || 0);
24
- }, [r]);
25
- const b = async (i) => {
26
- i.preventDefault(), l(!0);
27
- try {
28
- n && n({
29
- userId: r.userId,
30
- cashOutDays: c,
31
- carryForward: m,
32
- year: (/* @__PURE__ */ new Date()).getFullYear()
33
- }), f({
34
- description: "Break balance updated successfully",
35
- color: "neutral"
36
- });
37
- } catch (x) {
38
- console.error("Error updating break balance:", x), f({
39
- title: "Error",
40
- description: "Failed to update break balance",
41
- color: "error"
42
- });
43
- } finally {
44
- l(!1);
45
- }
46
- };
47
- return /* @__PURE__ */ a(k, { children: [
48
- /* @__PURE__ */ t(D, { asChild: !0, children: /* @__PURE__ */ a(
49
- p,
50
- {
51
- variant: "outline",
52
- className: "text-ds-base border-border bg-layer-01 px-ds-05 py-ds-04 pr-ds-06 text-text-secondary shadow-02",
53
- children: [
54
- /* @__PURE__ */ t(F, {}),
55
- /* @__PURE__ */ t("span", { children: "Edit" })
56
- ]
57
- }
58
- ) }),
59
- /* @__PURE__ */ t(B, { className: "w-[308px] p-ds-06", children: /* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(E, { children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-start gap-ds-05", children: [
60
- /* @__PURE__ */ a("p", { className: "text-ds-md w-full text-left text-text-tertiary", children: [
61
- "Edit break balance conversion of ",
62
- /* @__PURE__ */ t("br", { className: "mb-ds-02" }),
63
- /* @__PURE__ */ t("span", { className: "font-semibold text-interactive", children: (e = r == null ? void 0 : r.user) == null ? void 0 : e.name })
64
- ] }),
65
- /* @__PURE__ */ a(
66
- "form",
67
- {
68
- ref: d,
69
- onSubmit: b,
70
- id: "updatebreakbalanceform",
71
- className: "flex w-full flex-col gap-ds-05",
72
- children: [
73
- /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
74
- /* @__PURE__ */ t("div", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-placeholder", children: "Cash out" }),
75
- /* @__PURE__ */ t(
76
- j,
77
- {
78
- value: c,
79
- onValueChange: u,
80
- min: 0,
81
- max: 100,
82
- step: 1,
83
- disabled: s
84
- }
85
- )
86
- ] }),
87
- /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
88
- /* @__PURE__ */ t("div", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-placeholder", children: "Carry forward" }),
89
- /* @__PURE__ */ t("div", { className: "flex w-[100px] items-center justify-center", children: /* @__PURE__ */ t("div", { className: "text-ds-base font-semibold text-text-secondary", children: m }) })
90
- ] }),
91
- /* @__PURE__ */ t(
92
- p,
93
- {
94
- variant: "outline",
95
- fullWidth: !0,
96
- onClick: () => {
97
- var i;
98
- return (i = d.current) == null ? void 0 : i.requestSubmit();
99
- },
100
- disabled: s,
101
- children: "Update"
102
- }
103
- )
104
- ]
105
- }
106
- )
107
- ] }) }) }) })
108
- ] });
109
- });
110
- I.displayName = "EditBreakBalance";
111
- export {
112
- I as EditBreakBalance
113
- };
@@ -1,453 +0,0 @@
1
- "use client";
2
- import { jsxs as n, jsx as s } from "react/jsx-runtime";
3
- import * as X from "react";
4
- import { useState as g, useRef as Z, useEffect as j } from "react";
5
- import { IconPencil as $, IconArrowRight as v, IconChevronLeft as L, IconChevronRight as tt, IconChevronDown as et } from "@tabler/icons-react";
6
- import { useToast as rt } from "@devalok/shilp-sutra/hooks/use-toast";
7
- import { Dialog as at, DialogTrigger as st, DialogContent as nt, DialogHeader as ot, DialogDescription as dt } from "@devalok/shilp-sutra/ui/dialog";
8
- import { Button as q } from "@devalok/shilp-sutra/ui/button";
9
- import { DeleteBreak as it } from "./delete-break.js";
10
- import { removeAllEmojis as lt } from "../utils/emoji-utils.js";
11
- import { cn as f } from "@devalok/shilp-sutra/ui/lib/utils";
12
- import { isBreakDay as Y, checkDateOverlap as B, isDateAfter as ct, isDateSameOrAfter as ut, isDateInRange as mt } from "../utils/date-range-utils.js";
13
- import { isSameDay as S } from "../utils/date-utils.js";
14
- import { useBreakDatePicker as ft } from "./use-break-date-picker.js";
15
- import { format as D, endOfMonth as Dt, getDay as J, subDays as pt, getDaysInMonth as xt, addDays as ht } from "date-fns";
16
- const bt = X.forwardRef(function({
17
- selectedLeave: r,
18
- existingBreaks: p,
19
- onFetchMonthBreaks: y,
20
- onSave: C,
21
- onDelete: V
22
- }, yt) {
23
- var T;
24
- const [w, k] = g(!1), [x, M] = g(
25
- p || []
26
- ), [F, I] = g(!1), [o, u] = g({
27
- status: (r == null ? void 0 : r.status) || "",
28
- comment: (r == null ? void 0 : r.adminComment) || "",
29
- startDate: (r == null ? void 0 : r.startDate) || "",
30
- endDate: (r == null ? void 0 : r.endDate) || ""
31
- }), e = ft(), P = Z(null), { toast: m } = rt();
32
- j(() => {
33
- if (r) {
34
- const t = (a) => a ? D(new Date(a), "yyyy-MM-dd") : "";
35
- u({
36
- status: (r == null ? void 0 : r.status) || "",
37
- comment: (r == null ? void 0 : r.adminComment) || "",
38
- startDate: t(r == null ? void 0 : r.startDate),
39
- endDate: t(r == null ? void 0 : r.endDate)
40
- }), e.setSelectedStartDate(t(r == null ? void 0 : r.startDate)), e.setSelectedEndDate(t(r == null ? void 0 : r.endDate));
41
- }
42
- }, [r]), j(() => {
43
- if (p) {
44
- M(p);
45
- return;
46
- }
47
- y && y(e.currentMonth, e.currentYear).then((t) => {
48
- t && M(
49
- t.map((a) => ({
50
- ...a,
51
- startDate: new Date(a.startDate).toISOString(),
52
- endDate: new Date(a.endDate).toISOString()
53
- }))
54
- );
55
- }).catch((t) => {
56
- console.error("Error fetching breaks:", t);
57
- });
58
- }, [e.currentMonth, e.currentYear, p, y]);
59
- const U = (t) => {
60
- const { name: a, value: i } = t.target;
61
- u((d) => ({
62
- ...d,
63
- [a]: i
64
- }));
65
- }, h = (t) => {
66
- u((a) => ({
67
- ...a,
68
- status: t
69
- })), k(!1);
70
- }, R = (t) => {
71
- if (e.setActiveDate(t), t === "start" && o.startDate) {
72
- const a = new Date(o.startDate);
73
- e.setCurrentMonth(a.getMonth()), e.setCurrentYear(a.getFullYear());
74
- } else if (t === "end" && o.endDate) {
75
- const a = new Date(o.endDate);
76
- e.setCurrentMonth(a.getMonth()), e.setCurrentYear(a.getFullYear());
77
- }
78
- e.setShowCalendar(!0);
79
- }, W = async (t) => {
80
- if (t.preventDefault(), o.status === "PENDING") {
81
- m({
82
- title: "Action Required",
83
- description: "Please update the status",
84
- color: "neutral"
85
- });
86
- return;
87
- }
88
- I(!0);
89
- try {
90
- C && C({
91
- requestId: r.id,
92
- userId: r.userId,
93
- status: o.status,
94
- adminComment: o.comment,
95
- startDate: new Date(o.startDate).toISOString(),
96
- endDate: new Date(o.endDate).toISOString(),
97
- isEditing: !0
98
- }), m({
99
- description: "Break request updated successfully",
100
- color: "neutral"
101
- });
102
- } catch (a) {
103
- console.error("Error updating break request:", a), m({
104
- title: "Error",
105
- description: "Failed to update break request",
106
- color: "error"
107
- });
108
- } finally {
109
- I(!1);
110
- }
111
- }, E = (t) => {
112
- const a = {
113
- APPROVED: {
114
- text: "Approved",
115
- className: "bg-success-surface text-text-success"
116
- },
117
- PENDING: {
118
- text: "Pending",
119
- className: "bg-warning-surface text-text-warning"
120
- },
121
- REJECTED: {
122
- text: "Deny",
123
- className: "bg-error-surface text-text-error"
124
- },
125
- CANCELLED: {
126
- text: "Redacted",
127
- className: "bg-error-surface text-text-error"
128
- }
129
- }, { text: i, className: d } = a[t] || a.REJECTED;
130
- return /* @__PURE__ */ s(
131
- "div",
132
- {
133
- className: f("text-ds-sm w-fit rounded-ds-2xl px-ds-02b py-ds-02 capitalize", d),
134
- children: i
135
- }
136
- );
137
- }, O = (t) => t ? D(new Date(t), "EEEE, MMMM d") : "", G = (t, a) => {
138
- const i = [], d = new Date(a, t, 1), A = Dt(d), K = J(d), _ = 6 - J(A), N = /* @__PURE__ */ new Date();
139
- for (let l = K - 1; l >= 0; l--) {
140
- const c = pt(d, l + 1);
141
- i.push({
142
- date: c.getDate(),
143
- fullDate: D(c, "yyyy-MM-dd"),
144
- isPadding: !0,
145
- isToday: S(c, N),
146
- isWeekend: !1
147
- });
148
- }
149
- const Q = xt(d);
150
- for (let l = 1; l <= Q; l++) {
151
- const c = new Date(a, t, l);
152
- i.push({
153
- date: l,
154
- fullDate: D(c, "yyyy-MM-dd"),
155
- isPadding: !1,
156
- isToday: S(c, N),
157
- isWeekend: !1
158
- });
159
- }
160
- for (let l = 1; l <= _; l++) {
161
- const c = ht(A, l);
162
- i.push({
163
- date: c.getDate(),
164
- fullDate: D(c, "yyyy-MM-dd"),
165
- isPadding: !0,
166
- isToday: S(c, N),
167
- isWeekend: !1
168
- });
169
- }
170
- return i;
171
- }, z = (t) => {
172
- if (Y(t.fullDate, x, r.id)) {
173
- m({
174
- title: "Error",
175
- description: "This date is already part of another break request.",
176
- color: "error"
177
- });
178
- return;
179
- }
180
- if (!t.isPadding) {
181
- if (e.activeDate === "start") {
182
- const a = t.fullDate, i = e.selectedEndDate || a;
183
- if (B(a, i, x, r.id)) {
184
- m({
185
- title: "Error",
186
- description: "The selected date range overlaps with an existing break request.",
187
- color: "error"
188
- });
189
- return;
190
- }
191
- e.setSelectedStartDate(a), u((d) => ({
192
- ...d,
193
- startDate: a
194
- })), e.selectedEndDate && ct(a, e.selectedEndDate) && (e.setSelectedEndDate(a), u((d) => ({
195
- ...d,
196
- endDate: a
197
- })));
198
- } else if (e.activeDate === "end") {
199
- const a = t.fullDate, i = e.selectedStartDate || a;
200
- if (B(i, a, x, r.id)) {
201
- m({
202
- title: "Error",
203
- description: "The selected date range overlaps with an existing break request.",
204
- color: "error"
205
- });
206
- return;
207
- }
208
- e.selectedStartDate && ut(a, e.selectedStartDate) ? (e.setSelectedEndDate(a), u((d) => ({
209
- ...d,
210
- endDate: a
211
- }))) : e.selectedStartDate || (e.setSelectedStartDate(a), e.setSelectedEndDate(a), u((d) => ({
212
- ...d,
213
- startDate: a,
214
- endDate: a
215
- })));
216
- }
217
- e.setShowCalendar(!1);
218
- }
219
- }, b = (t) => !e.selectedStartDate || !e.selectedEndDate ? !!(e.showCalendar && (e.activeDate === "start" && o.startDate === t || e.activeDate === "end" && o.endDate === t)) : mt(t, e.selectedStartDate, e.selectedEndDate), H = G(e.currentMonth, e.currentYear);
220
- return /* @__PURE__ */ n(at, { children: [
221
- /* @__PURE__ */ s(st, { asChild: !0, children: /* @__PURE__ */ n(
222
- q,
223
- {
224
- variant: "outline",
225
- className: "text-ds-base border-border bg-layer-01 px-ds-05 py-ds-04 pr-ds-06 text-text-secondary shadow-02",
226
- children: [
227
- /* @__PURE__ */ s($, {}),
228
- /* @__PURE__ */ s("span", { children: "Edit" })
229
- ]
230
- }
231
- ) }),
232
- /* @__PURE__ */ s(nt, { className: "w-[440px] p-ds-06 max-md:w-[90%] max-md:rounded-ds-lg", children: /* @__PURE__ */ s(ot, { children: /* @__PURE__ */ s(dt, { children: /* @__PURE__ */ n("div", { className: "flex w-full flex-col items-center gap-ds-05", children: [
233
- /* @__PURE__ */ n("p", { className: "text-ds-md w-full text-left text-text-tertiary", children: [
234
- "Edit break details of",
235
- " ",
236
- /* @__PURE__ */ s("span", { className: "font-semibold text-interactive", children: (T = r == null ? void 0 : r.user) == null ? void 0 : T.name })
237
- ] }),
238
- /* @__PURE__ */ n(
239
- "form",
240
- {
241
- ref: P,
242
- onSubmit: W,
243
- id: "updateleaveform",
244
- className: "flex w-full flex-col gap-ds-05",
245
- children: [
246
- /* @__PURE__ */ n("div", { className: "flex w-full flex-col gap-ds-02 rounded-ds-lg border border-border-subtle px-ds-05 pb-ds-03 pt-ds-04", children: [
247
- /* @__PURE__ */ s("h2", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Reason" }),
248
- /* @__PURE__ */ s("p", { className: "text-ds-md text-text-primary", children: lt(r == null ? void 0 : r.reason) })
249
- ] }),
250
- /* @__PURE__ */ n("div", { className: "flex w-full items-center justify-center gap-ds-02", children: [
251
- /* @__PURE__ */ s(
252
- "button",
253
- {
254
- type: "button",
255
- onClick: () => R("start"),
256
- className: f(
257
- "text-ds-md flex w-full items-center justify-center gap-ds-03 rounded-ds-full border bg-layer-02 px-ds-03 py-ds-03 text-text-secondary max-md:text-ds-sm",
258
- e.showCalendar && e.activeDate === "start" ? "border-border-strong" : "border-border"
259
- ),
260
- children: O(o.startDate)
261
- }
262
- ),
263
- /* @__PURE__ */ s("div", { className: "flex h-ico-sm w-ico-sm items-center", children: /* @__PURE__ */ s(v, { className: "h-ico-sm w-ico-sm text-icon-secondary" }) }),
264
- /* @__PURE__ */ s(
265
- "button",
266
- {
267
- type: "button",
268
- onClick: () => R("end"),
269
- className: f(
270
- "text-ds-md flex w-full items-center justify-center gap-ds-03 rounded-ds-full border bg-layer-02 px-ds-03 py-ds-03 text-text-secondary max-md:text-ds-sm",
271
- e.showCalendar && e.activeDate === "end" ? "border-border-strong" : "border-border"
272
- ),
273
- children: O(o.endDate)
274
- }
275
- )
276
- ] }),
277
- e.showCalendar && /* @__PURE__ */ n("div", { className: "", children: [
278
- /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
279
- /* @__PURE__ */ s(
280
- "button",
281
- {
282
- type: "button",
283
- className: "rounded-ds-full p-ds-03 hover:bg-field-hover",
284
- onClick: () => e.navigateMonth("prev"),
285
- children: /* @__PURE__ */ s(L, { className: "h-ico-md w-ico-md" })
286
- }
287
- ),
288
- /* @__PURE__ */ n("div", { className: "text-ds-md font-semibold uppercase", children: [
289
- new Date(e.currentYear, e.currentMonth).toLocaleString(
290
- "default",
291
- {
292
- month: "long"
293
- }
294
- ),
295
- " ",
296
- e.currentYear
297
- ] }),
298
- /* @__PURE__ */ s(
299
- "button",
300
- {
301
- type: "button",
302
- className: "rounded-ds-full p-ds-03 hover:bg-field-hover",
303
- onClick: () => e.navigateMonth("next"),
304
- children: /* @__PURE__ */ s(tt, { className: "h-ico-md w-ico-md" })
305
- }
306
- )
307
- ] }),
308
- /* @__PURE__ */ n("div", { className: "calendar grid w-full grid-cols-7 items-center gap-0 overflow-hidden", children: [
309
- ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map(
310
- (t) => /* @__PURE__ */ s("div", { className: "pb-ds-03 pt-ds-05 text-center", children: /* @__PURE__ */ s("span", { className: "text-ds-sm font-semibold uppercase tracking-wider text-text-tertiary", children: t }) }, t)
311
- ),
312
- H.map((t, a) => /* @__PURE__ */ s(
313
- "button",
314
- {
315
- type: "button",
316
- tabIndex: t.isPadding ? -1 : 0,
317
- "aria-label": t.isPadding ? void 0 : D(new Date(t.fullDate), "MMMM d, yyyy"),
318
- className: f(
319
- "flex cursor-pointer flex-col items-center pb-0 pt-0 text-center",
320
- b(t.fullDate) && t.fullDate !== e.selectedStartDate && t.fullDate !== e.selectedEndDate && "bg-layer-accent-subtle",
321
- t.isPadding && "opacity-[0.5]",
322
- t.fullDate === e.selectedStartDate && b(t.fullDate) && "start-date mini",
323
- t.fullDate === e.selectedEndDate && b(t.fullDate) && "end-date mini",
324
- b(t.fullDate) && t.fullDate !== e.selectedStartDate && t.fullDate !== e.selectedEndDate && "in-range-date",
325
- e.selectedStartDate === e.selectedEndDate && "same-date"
326
- ),
327
- onClick: () => z(t),
328
- children: /* @__PURE__ */ s(
329
- "div",
330
- {
331
- className: f(
332
- "mx-ds-02 my-ds-02",
333
- t.isPadding && "opacity-[0.5]"
334
- ),
335
- children: /* @__PURE__ */ s(
336
- "span",
337
- {
338
- className: f(
339
- "text-ds-base flex h-ds-md w-ds-md items-center justify-center rounded-ds-full",
340
- (t.fullDate === e.selectedStartDate || t.fullDate === e.selectedEndDate || Y(t.fullDate, x, r.id)) && "bg-accent ring-2 ring-inset ring-accent",
341
- t.isToday ? "bg-interactive-hover p-ds-03 text-text-on-color" : "text-text-secondary"
342
- ),
343
- children: t.date
344
- }
345
- )
346
- }
347
- )
348
- },
349
- a
350
- ))
351
- ] })
352
- ] }),
353
- /* @__PURE__ */ n("div", { className: "flex w-full items-center justify-between rounded-ds-lg border border-border px-ds-05 py-ds-04", children: [
354
- /* @__PURE__ */ s("p", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "No of Days" }),
355
- /* @__PURE__ */ s("p", { className: "text-ds-xl font-semibold text-text-primary", children: r.numberOfDays })
356
- ] }),
357
- /* @__PURE__ */ n("div", { className: "flex w-full items-center justify-between rounded-ds-lg border border-border px-ds-05 py-ds-04", children: [
358
- /* @__PURE__ */ s("p", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Status" }),
359
- /* @__PURE__ */ n("div", { className: "relative flex items-center gap-ds-02", children: [
360
- /* @__PURE__ */ n(
361
- "button",
362
- {
363
- type: "button",
364
- className: "flex cursor-pointer items-center gap-ds-02",
365
- "aria-label": "Change status",
366
- "aria-haspopup": "listbox",
367
- "aria-expanded": w,
368
- onClick: () => k(!w),
369
- children: [
370
- E(o.status),
371
- /* @__PURE__ */ s(et, {})
372
- ]
373
- }
374
- ),
375
- w && /* @__PURE__ */ n("div", { className: "text-ds-base absolute left-[10px] top-[25px] z-raised flex flex-col overflow-hidden rounded-ds-md border border-border bg-layer-01 shadow-02", role: "listbox", children: [
376
- /* @__PURE__ */ s(
377
- "div",
378
- {
379
- className: "cursor-pointer border-b border-b-border bg-layer-01 px-ds-04 py-ds-03 text-left",
380
- role: "option",
381
- tabIndex: 0,
382
- "aria-selected": o.status === "APPROVED",
383
- onClick: () => h("APPROVED"),
384
- onKeyDown: (t) => {
385
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), h("APPROVED"));
386
- },
387
- children: E("APPROVED")
388
- }
389
- ),
390
- /* @__PURE__ */ s(
391
- "div",
392
- {
393
- className: "cursor-pointer bg-layer-01 px-ds-04 py-ds-03 text-left",
394
- role: "option",
395
- tabIndex: 0,
396
- "aria-selected": o.status === "REJECTED",
397
- onClick: () => h("REJECTED"),
398
- onKeyDown: (t) => {
399
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), h("REJECTED"));
400
- },
401
- children: E("REJECTED")
402
- }
403
- )
404
- ] })
405
- ] })
406
- ] }),
407
- /* @__PURE__ */ n("div", { className: "flex w-full flex-col gap-ds-02 rounded-ds-lg border border-border-subtle px-ds-05 pb-ds-03 pt-ds-04", children: [
408
- /* @__PURE__ */ s("h2", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: "Comment" }),
409
- /* @__PURE__ */ s(
410
- "input",
411
- {
412
- type: "text",
413
- name: "comment",
414
- className: "text-ds-md text-text-primary outline-none",
415
- placeholder: "Enjoy your break, TC",
416
- value: o.comment,
417
- onChange: U
418
- }
419
- )
420
- ] }),
421
- /* @__PURE__ */ n("div", { className: "flex w-full justify-between", children: [
422
- /* @__PURE__ */ s("div", { className: "flex h-ds-md w-ds-md items-center justify-center", children: /* @__PURE__ */ s(
423
- it,
424
- {
425
- id: r.id,
426
- userId: r.userId,
427
- onDelete: V
428
- }
429
- ) }),
430
- /* @__PURE__ */ s(
431
- q,
432
- {
433
- className: "w-fit",
434
- variant: "outline",
435
- disabled: F,
436
- onClick: () => {
437
- var t;
438
- return (t = P.current) == null ? void 0 : t.requestSubmit();
439
- },
440
- children: "Update"
441
- }
442
- )
443
- ] })
444
- ]
445
- }
446
- )
447
- ] }) }) }) })
448
- ] });
449
- });
450
- bt.displayName = "EditBreak";
451
- export {
452
- bt as EditBreak
453
- };