@thebuoyant-tsdev/mui-ts-library 3.33.1 → 3.35.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.
@@ -4,139 +4,173 @@ import { KanbanBoardCard as n } from "./KanbanBoardCard.js";
4
4
  import { KanbanBoardCardDialog as r } from "./KanbanBoardCardDialog.js";
5
5
  import { KanbanBoardColumn as i } from "./KanbanBoardColumn.js";
6
6
  import { DndContext as a, DragOverlay as o, KeyboardSensor as s, PointerSensor as c, closestCorners as l, useSensor as u, useSensors as d } from "@dnd-kit/core";
7
- import { arrayMove as f, sortableKeyboardCoordinates as p } from "@dnd-kit/sortable";
8
- import { Box as m } from "@mui/material";
9
- import { useEffect as h, useState as g } from "react";
10
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
+ import { arrayMove as ee, sortableKeyboardCoordinates as f } from "@dnd-kit/sortable";
8
+ import p from "@mui/icons-material/Search";
9
+ import { Box as m, InputAdornment as h, TextField as g } from "@mui/material";
10
+ import { useEffect as _, useState as v } from "react";
11
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
11
12
  //#region src/components/kanban-board/KanbanBoard.tsx
12
- function y({ tasks: y, columns: b, onTasksChange: x, onCardClick: S, enableBuiltinDialogs: C = !0, onTaskCreated: w, onTaskUpdated: T, onTaskDeleted: E, onTaskMoved: D, showPriority: O = !0, showAssignee: k = !0, showDueDate: A = !0, showDueDateWarning: j = !0, chipVariant: M = "outlined", filterText: N = "", width: P = "100%", height: F = "100%", translation: I }) {
13
- let L = {
13
+ function x({ tasks: x, columns: S, onTasksChange: C, onCardClick: w, enableBuiltinDialogs: T = !0, onTaskCreated: E, onTaskUpdated: D, onTaskDeleted: O, onTaskMoved: k, showPriority: A = !0, showAssignee: j = !0, showDueDate: M = !0, showDueDateWarning: N = !0, showSubtasks: P = !0, chipVariant: F = "outlined", showSearchField: I = !1, filterText: L = "", width: R = "100%", height: z = "100%", translation: B }) {
14
+ let V = {
14
15
  ...t,
15
- ...I
16
- }, [R, z] = g(y);
17
- h(() => {
18
- z(y);
19
- }, [y]);
20
- let [B, V] = g(null), [H, U] = g(null), W = d(u(c, { activationConstraint: { distance: 8 } }), u(s, { coordinateGetter: p }));
21
- function G({ active: e }) {
22
- V(R.find((t) => t.id === e.id) ?? null);
16
+ ...B
17
+ }, [H, U] = v(x);
18
+ _(() => {
19
+ U(x);
20
+ }, [x]);
21
+ let [W, G] = v(null), [K, q] = v(null), [J, Y] = v(""), X = d(u(c, { activationConstraint: { distance: 8 } }), u(s, { coordinateGetter: f }));
22
+ function Z({ active: e }) {
23
+ G(H.find((t) => t.id === e.id) ?? null);
23
24
  }
24
- function K({ active: e, over: t }) {
25
+ function Q({ active: e, over: t }) {
25
26
  if (!t) return;
26
- let n = e.id, r = t.id, i = R.find((e) => e.id === n);
27
+ let n = e.id, r = t.id, i = H.find((e) => e.id === n);
27
28
  if (!i) return;
28
- let a = b.find((e) => e.id === r), o = R.find((e) => e.id === r), s = a?.id ?? o?.status;
29
- !s || i.status === s || z((e) => e.map((e) => e.id === n ? {
29
+ let a = S.find((e) => e.id === r), o = H.find((e) => e.id === r), s = a?.id ?? o?.status;
30
+ !s || i.status === s || U((e) => e.map((e) => e.id === n ? {
30
31
  ...e,
31
32
  status: s
32
33
  } : e));
33
34
  }
34
- function q({ active: e, over: t }) {
35
- let n = B?.status;
36
- if (V(null), !t) {
37
- z(y);
35
+ function te({ active: e, over: t }) {
36
+ let n = W?.status;
37
+ if (G(null), !t) {
38
+ U(x);
38
39
  return;
39
40
  }
40
- let r = e.id, i = t.id, a = R.findIndex((e) => e.id === r), o = R.findIndex((e) => e.id === i), s;
41
- if (s = a !== -1 && o !== -1 && a !== o ? f(R, a, o) : [...R], z(s), x?.(s), n) {
41
+ let r = e.id, i = t.id, a = H.findIndex((e) => e.id === r), o = H.findIndex((e) => e.id === i), s;
42
+ if (s = a !== -1 && o !== -1 && a !== o ? ee(H, a, o) : [...H], U(s), C?.(s), n) {
42
43
  let e = s.find((e) => e.id === r);
43
- e && e.status !== n && D?.(e, n, e.status);
44
+ e && e.status !== n && k?.(e, n, e.status);
44
45
  }
45
46
  }
46
- function J(e) {
47
- C ? U({
47
+ function ne(e) {
48
+ T ? q({
48
49
  mode: "edit",
49
50
  task: e
50
- }) : S?.(e);
51
+ }) : w?.(e);
51
52
  }
52
- function Y(e) {
53
- U({
53
+ function re(e) {
54
+ q({
54
55
  mode: "add",
55
56
  columnId: e
56
57
  });
57
58
  }
58
- function X(e) {
59
- let t = !R.find((t) => t.id === e.id), n = t ? [...R, e] : R.map((t) => t.id === e.id ? e : t);
60
- z(n), x?.(n), t ? w?.(e) : T?.(e), U(null);
59
+ function ie(e) {
60
+ let t = !H.find((t) => t.id === e.id), n = t ? [...H, e] : H.map((t) => t.id === e.id ? e : t);
61
+ U(n), C?.(n), t ? E?.(e) : D?.(e), q(null);
61
62
  }
62
- function Z(e) {
63
- let t = R.filter((t) => t.id !== e);
64
- z(t), x?.(t), E?.(e), U(null);
63
+ function ae(e) {
64
+ let t = H.filter((t) => t.id !== e);
65
+ U(t), C?.(t), O?.(e), q(null);
65
66
  }
66
- function Q(e) {
67
- U({
67
+ function oe(e) {
68
+ q({
68
69
  mode: "delete",
69
70
  task: e
70
71
  });
71
72
  }
72
- let $ = N.trim().toLowerCase();
73
- function ee(e) {
73
+ let $ = (L || J).trim().toLowerCase();
74
+ function se(e) {
74
75
  return $ ? e.title.toLowerCase().includes($) || (e.assignee?.toLowerCase().includes($) ?? !1) : !0;
75
76
  }
76
- return /* @__PURE__ */ v(m, {
77
+ return /* @__PURE__ */ b(m, {
77
78
  className: e.root,
78
79
  sx: {
79
- width: P,
80
- height: F,
80
+ width: R,
81
+ height: z,
81
82
  display: "flex",
82
83
  flexDirection: "column",
83
84
  overflow: "hidden"
84
85
  },
85
- children: [/* @__PURE__ */ v(a, {
86
- sensors: W,
87
- collisionDetection: l,
88
- onDragStart: G,
89
- onDragOver: K,
90
- onDragEnd: q,
91
- children: [/* @__PURE__ */ _(m, {
92
- className: e.columns,
86
+ children: [
87
+ I && /* @__PURE__ */ y(m, {
88
+ className: e.searchFieldWrapper,
93
89
  sx: {
94
- flex: 1,
95
- display: "flex",
96
- gap: 2,
97
- p: 2,
98
- overflowX: "auto",
99
- overflowY: "hidden",
100
- alignItems: "stretch"
90
+ px: 2,
91
+ pt: 1.5,
92
+ pb: .5
101
93
  },
102
- children: b.map((e) => {
103
- let t = R.filter((t) => t.status === e.id);
104
- return /* @__PURE__ */ _(i, {
105
- column: e,
106
- tasks: t.filter(ee),
107
- totalCount: t.length,
108
- showPriority: O,
109
- showAssignee: k,
110
- showDueDate: A,
111
- showDueDateWarning: j,
112
- chipVariant: M,
113
- t: L,
114
- enableBuiltinDialogs: C,
115
- onCardClick: J,
116
- onAddClick: Y
117
- }, e.id);
94
+ children: /* @__PURE__ */ y(g, {
95
+ className: e.searchField,
96
+ size: "small",
97
+ placeholder: V.searchFieldPlaceholder,
98
+ value: J,
99
+ onChange: (e) => Y(e.target.value),
100
+ slotProps: {
101
+ input: { startAdornment: /* @__PURE__ */ y(h, {
102
+ position: "start",
103
+ children: /* @__PURE__ */ y(p, {
104
+ fontSize: "small",
105
+ sx: { color: "text.disabled" }
106
+ })
107
+ }) },
108
+ htmlInput: { "aria-label": V.searchFieldPlaceholder }
109
+ },
110
+ sx: { width: 280 }
118
111
  })
119
- }), /* @__PURE__ */ _(o, { children: B && /* @__PURE__ */ _(n, {
120
- task: B,
121
- showPriority: O,
122
- showAssignee: k,
123
- showDueDate: A,
124
- showDueDateWarning: j,
125
- chipVariant: M,
126
- t: L,
127
- onCardClick: () => {},
128
- isOverlay: !0
129
- }) })]
130
- }), C && /* @__PURE__ */ _(r, {
131
- state: H,
132
- columns: b,
133
- t: L,
134
- onSave: X,
135
- onDelete: Z,
136
- onRequestDelete: Q,
137
- onClose: () => U(null)
138
- }, H ? `${H.mode}-${H.mode === "add" ? H.columnId : H.task.id}` : "closed")]
112
+ }),
113
+ /* @__PURE__ */ b(a, {
114
+ sensors: X,
115
+ collisionDetection: l,
116
+ onDragStart: Z,
117
+ onDragOver: Q,
118
+ onDragEnd: te,
119
+ children: [/* @__PURE__ */ y(m, {
120
+ className: e.columns,
121
+ sx: {
122
+ flex: 1,
123
+ display: "flex",
124
+ gap: 2,
125
+ p: 2,
126
+ overflowX: "auto",
127
+ overflowY: "hidden",
128
+ alignItems: "stretch"
129
+ },
130
+ children: S.map((e) => {
131
+ let t = H.filter((t) => t.status === e.id);
132
+ return /* @__PURE__ */ y(i, {
133
+ column: e,
134
+ tasks: t.filter(se),
135
+ totalCount: t.length,
136
+ showPriority: A,
137
+ showAssignee: j,
138
+ showDueDate: M,
139
+ showDueDateWarning: N,
140
+ showSubtasks: P,
141
+ chipVariant: F,
142
+ t: V,
143
+ enableBuiltinDialogs: T,
144
+ onCardClick: ne,
145
+ onAddClick: re
146
+ }, e.id);
147
+ })
148
+ }), /* @__PURE__ */ y(o, { children: W && /* @__PURE__ */ y(n, {
149
+ task: W,
150
+ showPriority: A,
151
+ showAssignee: j,
152
+ showDueDate: M,
153
+ showDueDateWarning: N,
154
+ showSubtasks: P,
155
+ enableBuiltinDialogs: !1,
156
+ chipVariant: F,
157
+ t: V,
158
+ onCardClick: () => {},
159
+ isOverlay: !0
160
+ }) })]
161
+ }),
162
+ T && /* @__PURE__ */ y(r, {
163
+ state: K,
164
+ columns: S,
165
+ t: V,
166
+ showSubtasks: P,
167
+ onSave: ie,
168
+ onDelete: ae,
169
+ onRequestDelete: oe,
170
+ onClose: () => q(null)
171
+ }, K ? `${K.mode}-${K.mode === "add" ? K.columnId : K.task.id}` : "closed")
172
+ ]
139
173
  });
140
174
  }
141
175
  //#endregion
142
- export { y as KanbanBoard };
176
+ export { x as KanbanBoard };
@@ -1,4 +1,9 @@
1
1
  export type KanbanTaskPriority = "low" | "medium" | "high" | "critical";
2
+ export type KanbanSubtask = {
3
+ id: string;
4
+ title: string;
5
+ done: boolean;
6
+ };
2
7
  export type KanbanTask = {
3
8
  id: string;
4
9
  title: string;
@@ -11,6 +16,8 @@ export type KanbanTask = {
11
16
  dueDate?: Date;
12
17
  /** Optional priority level — shown as a colored dot next to the card title when `showPriority` is true. */
13
18
  priority?: KanbanTaskPriority;
19
+ /** Optional checklist items — shown as a progress bar on the card and a checklist in the edit dialog. */
20
+ subtasks?: KanbanSubtask[];
14
21
  };
15
22
  export type KanbanColumn = {
16
23
  /** Used as the key — must match `KanbanTask.status` values. */
@@ -37,6 +44,14 @@ export type KanbanBoardTranslation = {
37
44
  dialogFieldDueDate: string;
38
45
  dialogFieldStatus: string;
39
46
  noCardsLabel: string;
47
+ /** Placeholder text for the built-in search field (`showSearchField={true}`). */
48
+ searchFieldPlaceholder: string;
49
+ /** Section label for the subtask checklist in the edit/add dialog. */
50
+ dialogFieldSubtasks: string;
51
+ /** Placeholder for the "add subtask" input in the dialog. */
52
+ dialogSubtaskAdd: string;
53
+ /** Tooltip for the "+" button on the card's subtask progress bar. */
54
+ cardSubtaskAdd: string;
40
55
  };
41
56
  export declare const DEFAULT_KANBAN_BOARD_TRANSLATION: Required<KanbanBoardTranslation>;
42
57
  export type KanbanBoardProps = {
@@ -92,12 +107,28 @@ export type KanbanBoardProps = {
92
107
  * `"filled"` — solid background, more prominent.
93
108
  */
94
109
  chipVariant?: "outlined" | "filled";
110
+ /**
111
+ * Show the subtask progress bar on cards and the subtask checklist in the edit/add dialog (default: true).
112
+ * Has no visual effect when a card has no `subtasks` field set.
113
+ */
114
+ showSubtasks?: boolean;
115
+ /**
116
+ * When `true`, renders a built-in `size="small"` search field above the board columns.
117
+ * The board manages the search state internally — no extra wiring needed.
118
+ * Customize the placeholder via `translation.searchFieldPlaceholder`.
119
+ *
120
+ * For full control over placement, styling, or debouncing, leave this `false` (default)
121
+ * and pass `filterText` instead.
122
+ */
123
+ showSearchField?: boolean;
95
124
  /**
96
125
  * Filters visible cards by title and assignee (case-insensitive substring match).
97
126
  * The consumer is responsible for rendering the search input and passing the string.
98
127
  * An empty string or `undefined` shows all cards.
99
128
  * Column counters reflect the filtered count; WIP-limit checks always use the
100
129
  * unfiltered column total so the over-limit warning is never hidden by a filter.
130
+ *
131
+ * Alternative: set `showSearchField={true}` to let the board render a built-in field.
101
132
  */
102
133
  filterText?: string;
103
134
  /** Width of the board. Default: "100%". */
@@ -13,7 +13,11 @@ var e = {
13
13
  dialogFieldAssignee: "Assignee",
14
14
  dialogFieldDueDate: "Due date",
15
15
  dialogFieldStatus: "Status",
16
- noCardsLabel: "No cards"
16
+ noCardsLabel: "No cards",
17
+ searchFieldPlaceholder: "Search by title or assignee…",
18
+ dialogFieldSubtasks: "Subtasks",
19
+ dialogSubtaskAdd: "Add subtask",
20
+ cardSubtaskAdd: "Add subtask"
17
21
  };
18
22
  //#endregion
19
23
  export { e as DEFAULT_KANBAN_BOARD_TRANSLATION };
@@ -5,11 +5,13 @@ type KanbanBoardCardProps = {
5
5
  showAssignee: boolean;
6
6
  showDueDate: boolean;
7
7
  showDueDateWarning: boolean;
8
+ showSubtasks: boolean;
9
+ enableBuiltinDialogs: boolean;
8
10
  chipVariant: "outlined" | "filled";
9
11
  t: Required<KanbanBoardTranslation>;
10
12
  onCardClick: (task: KanbanTask) => void;
11
13
  /** True when this card is the drag overlay ghost — rendered without transform/listeners. */
12
14
  isOverlay?: boolean;
13
15
  };
14
- export declare function KanbanBoardCard({ task, showPriority, showAssignee, showDueDate, showDueDateWarning, chipVariant, t, onCardClick, isOverlay, }: KanbanBoardCardProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function KanbanBoardCard({ task, showPriority, showAssignee, showDueDate, showDueDateWarning, showSubtasks, enableBuiltinDialogs, chipVariant, t, onCardClick, isOverlay, }: KanbanBoardCardProps): import("react/jsx-runtime").JSX.Element;
15
17
  export {};
@@ -1,19 +1,20 @@
1
1
  import { muiTsStateClasses as e } from "../../utils/muiTsClasses.js";
2
2
  import { kanbanBoardClasses as t } from "./kanbanBoardClasses.js";
3
3
  import { useSortable as n } from "@dnd-kit/sortable";
4
- import { Box as r, Card as i, CardActionArea as a, CardContent as o, Chip as s, Typography as c } from "@mui/material";
5
- import { CSS as l } from "@dnd-kit/utilities";
6
- import u from "@mui/icons-material/CalendarToday";
7
- import d from "@mui/icons-material/Person";
8
- import { alpha as f } from "@mui/material/styles";
9
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
4
+ import { Box as r, Card as i, CardActionArea as a, CardContent as o, Chip as s, IconButton as c, LinearProgress as l, Tooltip as u, Typography as d } from "@mui/material";
5
+ import { CSS as f } from "@dnd-kit/utilities";
6
+ import p from "@mui/icons-material/Add";
7
+ import m from "@mui/icons-material/CalendarToday";
8
+ import h from "@mui/icons-material/Person";
9
+ import { alpha as g } from "@mui/material/styles";
10
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
10
11
  //#region src/components/kanban-board/KanbanBoardCard.tsx
11
- var h = {
12
+ var y = {
12
13
  low: "#4caf50",
13
14
  medium: "#ff9800",
14
15
  high: "#f44336",
15
16
  critical: "#9c27b0"
16
- }, g = {
17
+ }, b = {
17
18
  fontSize: "0.7rem",
18
19
  height: 22,
19
20
  "& .MuiChip-icon": {
@@ -28,116 +29,175 @@ var h = {
28
29
  pr: "10px"
29
30
  }
30
31
  };
31
- function _({ task: _, showPriority: v, showAssignee: y, showDueDate: b, showDueDateWarning: x, chipVariant: S, t: C, onCardClick: w, isOverlay: T = !1 }) {
32
- let { attributes: E, listeners: D, setNodeRef: O, transform: k, transition: A, isDragging: j } = n({
33
- id: _.id,
34
- disabled: T
35
- }), M = T ? void 0 : {
36
- transform: l.Transform.toString(k),
37
- transition: A,
38
- opacity: +!j
39
- }, N = y && !!_.assignee || b && !!_.dueDate, P = _.dueDate ? _.dueDate.toLocaleDateString(void 0, {
32
+ function x({ task: x, showPriority: S, showAssignee: C, showDueDate: w, showDueDateWarning: T, showSubtasks: E, enableBuiltinDialogs: D, chipVariant: O, t: k, onCardClick: A, isOverlay: j = !1 }) {
33
+ let { attributes: M, listeners: N, setNodeRef: P, transform: F, transition: I, isDragging: L } = n({
34
+ id: x.id,
35
+ disabled: j
36
+ }), R = j ? void 0 : {
37
+ transform: f.Transform.toString(F),
38
+ transition: I,
39
+ opacity: +!L
40
+ }, z = C && !!x.assignee || w && !!x.dueDate, B = E && !!x.subtasks?.length, V = x.subtasks?.length ?? 0, H = x.subtasks?.filter((e) => e.done).length ?? 0, U = x.dueDate ? x.dueDate.toLocaleDateString(void 0, {
40
41
  day: "2-digit",
41
42
  month: "short",
42
43
  year: "numeric"
43
- }) : null, F = /* @__PURE__ */ new Date();
44
- F.setHours(0, 0, 0, 0);
45
- let I = x && !!_.dueDate && _.dueDate < F;
46
- return /* @__PURE__ */ p(i, {
47
- ref: T ? void 0 : O,
48
- style: M,
44
+ }) : null, W = /* @__PURE__ */ new Date();
45
+ W.setHours(0, 0, 0, 0);
46
+ let G = T && !!x.dueDate && x.dueDate < W;
47
+ return /* @__PURE__ */ _(i, {
48
+ ref: j ? void 0 : P,
49
+ style: R,
49
50
  elevation: 0,
50
- className: [t.card, j && e.selected].filter(Boolean).join(" "),
51
+ className: [t.card, L && e.selected].filter(Boolean).join(" "),
51
52
  sx: {
52
53
  mb: 1,
53
54
  border: "1px solid",
54
- borderColor: I && !_.color ? "error.light" : "divider",
55
- borderLeft: _.color ? `4px solid ${_.color}` : I ? (e) => `4px solid ${e.palette.error.main}` : void 0,
55
+ borderColor: G && !x.color ? "error.light" : "divider",
56
+ borderLeft: x.color ? `4px solid ${x.color}` : G ? (e) => `4px solid ${e.palette.error.main}` : void 0,
56
57
  userSelect: "none",
57
- cursor: T ? "grabbing" : "grab",
58
- bgcolor: (e) => I ? e.palette.mode === "dark" ? f(e.palette.error.main, .12) : f(e.palette.error.main, .04) : e.palette.mode === "dark" ? e.palette.grey[800] : e.palette.background.paper,
58
+ cursor: j ? "grabbing" : "grab",
59
+ bgcolor: (e) => G ? e.palette.mode === "dark" ? g(e.palette.error.main, .12) : g(e.palette.error.main, .04) : e.palette.mode === "dark" ? e.palette.grey[800] : e.palette.background.paper,
59
60
  boxShadow: (e) => e.palette.mode === "dark" ? "0 1px 3px rgba(0,0,0,0.4)" : "0 1px 3px rgba(0,0,0,0.08)",
60
61
  transition: "box-shadow 0.15s ease, transform 0.15s ease",
61
- ...!j && !T && { "&:hover": {
62
+ ...!L && !j && { "&:hover": {
62
63
  boxShadow: (e) => e.palette.mode === "dark" ? "0 4px 14px rgba(0,0,0,0.5)" : "0 4px 14px rgba(0,0,0,0.12)",
63
64
  transform: "translateY(-1px)"
64
65
  } },
65
66
  "&:active": { cursor: "grabbing" }
66
67
  },
67
- ...T ? {} : {
68
- ...E,
69
- ...D
68
+ ...j ? {} : {
69
+ ...M,
70
+ ...N
70
71
  },
71
- onClick: () => !j && w(_),
72
- "aria-label": _.title,
73
- children: /* @__PURE__ */ p(a, {
72
+ onClick: () => !L && A(x),
73
+ "aria-label": x.title,
74
+ children: /* @__PURE__ */ _(a, {
74
75
  component: "div",
75
76
  sx: { cursor: "inherit" },
76
- children: /* @__PURE__ */ m(o, {
77
+ children: /* @__PURE__ */ v(o, {
77
78
  sx: {
78
79
  p: 1.5,
79
80
  "&:last-child": { pb: 1.5 }
80
81
  },
81
- children: [/* @__PURE__ */ m(r, {
82
- sx: {
83
- display: "flex",
84
- alignItems: "flex-start",
85
- gap: .75,
86
- mb: +!!N
87
- },
88
- children: [v && _.priority && /* @__PURE__ */ p(r, {
89
- className: t.cardPriorityDot,
90
- role: "img",
91
- "aria-label": `Priority: ${_.priority}`,
82
+ children: [
83
+ /* @__PURE__ */ v(r, {
92
84
  sx: {
93
- width: 8,
94
- height: 8,
95
- minWidth: 8,
96
- borderRadius: "50%",
97
- bgcolor: h[_.priority],
98
- mt: "5px",
99
- flexShrink: 0
100
- }
101
- }), /* @__PURE__ */ p(c, {
102
- className: t.cardTitle,
103
- variant: "body2",
85
+ display: "flex",
86
+ alignItems: "flex-start",
87
+ gap: .75,
88
+ mb: z || B ? 1 : 0
89
+ },
90
+ children: [S && x.priority && /* @__PURE__ */ _(r, {
91
+ className: t.cardPriorityDot,
92
+ role: "img",
93
+ "aria-label": `Priority: ${x.priority}`,
94
+ sx: {
95
+ width: 8,
96
+ height: 8,
97
+ minWidth: 8,
98
+ borderRadius: "50%",
99
+ bgcolor: y[x.priority],
100
+ mt: "5px",
101
+ flexShrink: 0
102
+ }
103
+ }), /* @__PURE__ */ _(d, {
104
+ className: t.cardTitle,
105
+ variant: "body2",
106
+ sx: {
107
+ lineHeight: 1.4,
108
+ fontWeight: 700,
109
+ letterSpacing: "-0.01em"
110
+ },
111
+ children: x.title
112
+ })]
113
+ }),
114
+ z && /* @__PURE__ */ v(r, {
115
+ className: t.cardMeta,
116
+ sx: {
117
+ display: "flex",
118
+ gap: 1,
119
+ flexWrap: "wrap",
120
+ alignItems: "center"
121
+ },
122
+ children: [C && x.assignee && /* @__PURE__ */ _(s, {
123
+ className: t.cardAssignee,
124
+ icon: /* @__PURE__ */ _(h, {}),
125
+ label: x.assignee,
126
+ size: "small",
127
+ variant: O,
128
+ "aria-label": `${k.dialogFieldAssignee}: ${x.assignee}`,
129
+ sx: b
130
+ }), w && U && /* @__PURE__ */ _(s, {
131
+ className: t.cardDueDate,
132
+ icon: /* @__PURE__ */ _(m, {}),
133
+ label: U,
134
+ size: "small",
135
+ variant: O,
136
+ color: G ? "error" : "default",
137
+ "aria-label": `${k.dialogFieldDueDate}: ${U}`,
138
+ sx: b
139
+ })]
140
+ }),
141
+ B && /* @__PURE__ */ v(r, {
142
+ className: t.cardSubtasks,
104
143
  sx: {
105
- lineHeight: 1.4,
106
- fontWeight: 700,
107
- letterSpacing: "-0.01em"
144
+ display: "flex",
145
+ alignItems: "center",
146
+ gap: 1,
147
+ mt: z ? .75 : 0
108
148
  },
109
- children: _.title
110
- })]
111
- }), N && /* @__PURE__ */ m(r, {
112
- className: t.cardMeta,
113
- sx: {
114
- display: "flex",
115
- gap: 1,
116
- flexWrap: "wrap",
117
- alignItems: "center"
118
- },
119
- children: [y && _.assignee && /* @__PURE__ */ p(s, {
120
- className: t.cardAssignee,
121
- icon: /* @__PURE__ */ p(d, {}),
122
- label: _.assignee,
123
- size: "small",
124
- variant: S,
125
- "aria-label": `${C.dialogFieldAssignee}: ${_.assignee}`,
126
- sx: g
127
- }), b && P && /* @__PURE__ */ p(s, {
128
- className: t.cardDueDate,
129
- icon: /* @__PURE__ */ p(u, {}),
130
- label: P,
131
- size: "small",
132
- variant: S,
133
- color: I ? "error" : "default",
134
- "aria-label": `${C.dialogFieldDueDate}: ${P}`,
135
- sx: g
136
- })]
137
- })]
149
+ children: [
150
+ /* @__PURE__ */ _(l, {
151
+ className: t.cardSubtasksBar,
152
+ variant: "determinate",
153
+ value: H / V * 100,
154
+ sx: {
155
+ flex: 1,
156
+ height: 4,
157
+ borderRadius: 2
158
+ },
159
+ "aria-label": `${H} of ${V} subtasks done`
160
+ }),
161
+ /* @__PURE__ */ v(d, {
162
+ variant: "caption",
163
+ sx: {
164
+ whiteSpace: "nowrap",
165
+ color: "text.secondary",
166
+ fontSize: "0.65rem",
167
+ lineHeight: 1
168
+ },
169
+ children: [
170
+ H,
171
+ " / ",
172
+ V,
173
+ " "
174
+ ]
175
+ }),
176
+ D && !j && /* @__PURE__ */ _(u, {
177
+ title: k.cardSubtaskAdd,
178
+ placement: "top",
179
+ arrow: !0,
180
+ children: /* @__PURE__ */ _(c, {
181
+ size: "small",
182
+ "aria-label": k.cardSubtaskAdd,
183
+ onClick: (e) => {
184
+ e.stopPropagation(), A(x);
185
+ },
186
+ sx: {
187
+ p: .25,
188
+ opacity: 0,
189
+ transition: "opacity 0.15s",
190
+ [`.${t.card}:hover &`]: { opacity: 1 }
191
+ },
192
+ children: /* @__PURE__ */ _(p, { sx: { fontSize: "0.85rem" } })
193
+ })
194
+ })
195
+ ]
196
+ })
197
+ ]
138
198
  })
139
199
  })
140
200
  });
141
201
  }
142
202
  //#endregion
143
- export { _ as KanbanBoardCard };
203
+ export { x as KanbanBoardCard };