@object-ui/plugin-kanban 4.0.3 → 4.0.5

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.
@@ -1,398 +0,0 @@
1
- import { r as e, t } from "./plus-CHsXVJSY.js";
2
- import { a as n, c as r, d as i, f as a, i as o, l as s, n as c, o as l, r as u, s as d, t as f, u as p } from "./sortable.esm-LJG1TjKd.js";
3
- import * as m from "react";
4
- import { useDnd as h, useHasDndProvider as g } from "@object-ui/react";
5
- import { Badge as _, Button as v, Card as y, CardContent as b, CardDescription as x, CardHeader as S, CardTitle as C, Input as w, ScrollArea as T, useResizeObserver as E } from "@object-ui/components";
6
- //#region src/KanbanImpl.tsx
7
- var D = e(), O = (...e) => e.filter(Boolean).join(" "), k = "Uncategorized";
8
- function A(e, t) {
9
- if (!t || t.length === 0) return {};
10
- for (let n of t) {
11
- let t = e[n.field];
12
- if (t == null) continue;
13
- let r = !1, i = String(t);
14
- switch (n.operator) {
15
- case "equals":
16
- r = i === String(n.value);
17
- break;
18
- case "not_equals":
19
- r = i !== String(n.value);
20
- break;
21
- case "contains":
22
- r = i.toLowerCase().includes(String(n.value).toLowerCase());
23
- break;
24
- case "in":
25
- r = Array.isArray(n.value) && n.value.includes(i);
26
- break;
27
- }
28
- if (r) return {
29
- ...n.backgroundColor ? { backgroundColor: n.backgroundColor } : {},
30
- ...n.borderColor ? { borderColor: n.borderColor } : {}
31
- };
32
- }
33
- return {};
34
- }
35
- function j({ card: e, onCardClick: t, conditionalFormatting: n }) {
36
- let { attributes: r, listeners: i, setNodeRef: o, transform: s, transition: c, isDragging: l } = u({ id: e.id }), d = {
37
- transform: a.Transform.toString(s),
38
- transition: c,
39
- opacity: l ? .5 : void 0
40
- }, f = A(e, n);
41
- return /* @__PURE__ */ (0, D.jsx)("div", {
42
- ref: o,
43
- style: d,
44
- ...r,
45
- ...i,
46
- role: "listitem",
47
- "aria-label": e.title,
48
- onClick: () => t?.(e),
49
- children: /* @__PURE__ */ (0, D.jsxs)(y, {
50
- className: "mb-2 cursor-grab active:cursor-grabbing border-border border-l-4 border-l-primary/40 bg-card/60 hover:border-primary/40 hover:shadow-lg hover:shadow-primary/10 transition-all duration-300 group touch-manipulation",
51
- style: f,
52
- children: [
53
- e.coverImage && /* @__PURE__ */ (0, D.jsx)("div", {
54
- className: "w-full h-32 overflow-hidden rounded-t-lg",
55
- children: /* @__PURE__ */ (0, D.jsx)("img", {
56
- src: e.coverImage,
57
- alt: "",
58
- className: "w-full h-full object-cover",
59
- loading: "lazy"
60
- })
61
- }),
62
- /* @__PURE__ */ (0, D.jsxs)(S, {
63
- className: "p-2 sm:p-4",
64
- children: [/* @__PURE__ */ (0, D.jsx)(C, {
65
- className: "text-xs sm:text-sm font-medium tracking-tight text-foreground group-hover:text-primary transition-colors",
66
- children: e.title
67
- }), e.description && /* @__PURE__ */ (0, D.jsx)(x, {
68
- className: "text-xs text-muted-foreground line-clamp-2 sm:line-clamp-none",
69
- children: e.description
70
- })]
71
- }),
72
- e.badges && e.badges.length > 0 && /* @__PURE__ */ (0, D.jsx)(b, {
73
- className: "p-2 sm:p-4 pt-0",
74
- children: /* @__PURE__ */ (0, D.jsx)("div", {
75
- className: "flex flex-wrap gap-1",
76
- children: e.badges.map((e, t) => /* @__PURE__ */ (0, D.jsx)(_, {
77
- variant: e.variant || "default",
78
- className: "text-xs",
79
- children: e.label
80
- }, t))
81
- })
82
- })
83
- ]
84
- })
85
- });
86
- }
87
- function M({ columnId: e, onAdd: n }) {
88
- let [r, i] = m.useState(!1), [a, o] = m.useState(""), s = m.useRef(null), c = () => {
89
- let t = a.trim();
90
- t && (n(e, t), o("")), i(!1);
91
- };
92
- return r ? /* @__PURE__ */ (0, D.jsx)("div", {
93
- className: "mt-2 space-y-2",
94
- children: /* @__PURE__ */ (0, D.jsx)(w, {
95
- ref: s,
96
- value: a,
97
- onChange: (e) => o(e.target.value),
98
- onKeyDown: (e) => {
99
- e.key === "Enter" ? (e.preventDefault(), c()) : e.key === "Escape" && (o(""), i(!1));
100
- },
101
- onBlur: c,
102
- placeholder: "Enter card title...",
103
- className: "text-sm",
104
- autoFocus: !0
105
- })
106
- }) : /* @__PURE__ */ (0, D.jsxs)(v, {
107
- variant: "ghost",
108
- size: "sm",
109
- className: "w-full mt-2 text-muted-foreground hover:text-foreground",
110
- onClick: () => {
111
- i(!0), setTimeout(() => s.current?.focus(), 0);
112
- },
113
- children: [/* @__PURE__ */ (0, D.jsx)(t, { className: "h-4 w-4 mr-1" }), "Add Card"]
114
- });
115
- }
116
- function N({ column: e, cards: t, onCardClick: n, quickAdd: r, onQuickAdd: i, conditionalFormatting: a, columnStyle: s }) {
117
- let c = t || [], { setNodeRef: l } = u({
118
- id: e.id,
119
- data: { type: "column" }
120
- }), d = e.limit && c.length >= e.limit, p = s && s.width != null ? "flex-shrink-0" : "w-[85vw] sm:w-80 flex-shrink-0";
121
- return /* @__PURE__ */ (0, D.jsxs)("div", {
122
- ref: l,
123
- role: "group",
124
- "aria-label": e.title,
125
- style: s,
126
- className: O("flex flex-col rounded-lg border border-border bg-card/20 backdrop-blur-sm shadow-xl snap-start max-h-full min-h-0", p, e.className),
127
- children: [/* @__PURE__ */ (0, D.jsx)("div", {
128
- className: "p-3 sm:p-4 border-b border-border/50 bg-muted/30 rounded-t-lg",
129
- children: /* @__PURE__ */ (0, D.jsxs)("div", {
130
- className: "flex items-center justify-between",
131
- children: [/* @__PURE__ */ (0, D.jsx)("h3", {
132
- id: `kanban-col-${e.id}`,
133
- className: " text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase truncate",
134
- children: e.title
135
- }), /* @__PURE__ */ (0, D.jsxs)("div", {
136
- className: "flex items-center gap-2",
137
- children: [/* @__PURE__ */ (0, D.jsxs)(_, {
138
- variant: "secondary",
139
- className: "text-xs tabular-nums",
140
- children: [c.length, e.limit && ` / ${e.limit}`]
141
- }), d && /* @__PURE__ */ (0, D.jsx)(_, {
142
- variant: "destructive",
143
- className: "text-xs",
144
- children: "Full"
145
- })]
146
- })]
147
- })
148
- }), /* @__PURE__ */ (0, D.jsxs)(T, {
149
- className: "flex-1 p-4",
150
- children: [/* @__PURE__ */ (0, D.jsx)(f, {
151
- items: c.map((e) => e.id),
152
- strategy: o,
153
- children: /* @__PURE__ */ (0, D.jsxs)("div", {
154
- className: "space-y-2",
155
- role: "list",
156
- "aria-label": `${e.title} cards`,
157
- children: [c.length === 0 && /* @__PURE__ */ (0, D.jsx)("div", {
158
- className: "flex flex-col items-center justify-center py-8 text-muted-foreground/50",
159
- children: /* @__PURE__ */ (0, D.jsx)("span", {
160
- className: "text-xs",
161
- children: "No cards"
162
- })
163
- }), c.map((e) => /* @__PURE__ */ (0, D.jsx)(j, {
164
- card: e,
165
- onCardClick: n,
166
- conditionalFormatting: a
167
- }, e.id))]
168
- })
169
- }), r && i && /* @__PURE__ */ (0, D.jsx)(M, {
170
- columnId: e.id,
171
- onAdd: i
172
- })]
173
- })]
174
- });
175
- }
176
- function P({ children: e }) {
177
- return /* @__PURE__ */ (0, D.jsx)(D.Fragment, { children: e(h()) });
178
- }
179
- function F({ columns: e, onCardMove: t, onCardClick: n, className: r, quickAdd: i, onQuickAdd: a, coverImageField: o, conditionalFormatting: s, swimlaneField: c }) {
180
- return g() ? /* @__PURE__ */ (0, D.jsx)(P, { children: (l) => /* @__PURE__ */ (0, D.jsx)(I, {
181
- columns: e,
182
- onCardMove: t,
183
- onCardClick: n,
184
- className: r,
185
- dnd: l,
186
- quickAdd: i,
187
- onQuickAdd: a,
188
- coverImageField: o,
189
- conditionalFormatting: s,
190
- swimlaneField: c
191
- }) }) : /* @__PURE__ */ (0, D.jsx)(I, {
192
- columns: e,
193
- onCardMove: t,
194
- onCardClick: n,
195
- className: r,
196
- dnd: null,
197
- quickAdd: i,
198
- onQuickAdd: a,
199
- coverImageField: o,
200
- conditionalFormatting: s,
201
- swimlaneField: c
202
- });
203
- }
204
- function I({ columns: e, onCardMove: t, onCardClick: a, className: u, dnd: h, quickAdd: g, onQuickAdd: _, coverImageField: v, conditionalFormatting: y, swimlaneField: b }) {
205
- let [x, S] = m.useState(null), C = m.useRef(null), { width: w } = E(C), T = m.useMemo(() => w ? w < 480 ? { width: Math.max(w - 32, 220) } : w < 720 ? { width: 280 } : { width: 320 } : {}, [w]), A = b ? `objectui:kanban-collapsed:${b}` : null, [M, P] = m.useState(() => {
206
- if (!A) return /* @__PURE__ */ new Set();
207
- try {
208
- let e = localStorage.getItem(A);
209
- if (e) {
210
- let t = JSON.parse(e);
211
- if (Array.isArray(t)) return new Set(t.filter((e) => typeof e == "string"));
212
- }
213
- } catch {}
214
- return /* @__PURE__ */ new Set();
215
- }), F = m.useMemo(() => (e || []).map((e) => ({
216
- ...e,
217
- cards: e.cards || []
218
- })), [e]), [I, L] = m.useState(F);
219
- m.useEffect(() => {
220
- L(F);
221
- }, [F]);
222
- let R = m.useMemo(() => {
223
- if (!b) return null;
224
- let e = I.flatMap((e) => e.cards), t = /* @__PURE__ */ new Set();
225
- return e.forEach((e) => {
226
- let n = e[b];
227
- t.add(n == null ? k : String(n));
228
- }), Array.from(t).sort();
229
- }, [I, b]), z = m.useCallback((e) => {
230
- P((t) => {
231
- let n = new Set(t);
232
- if (n.has(e) ? n.delete(e) : n.add(e), A) try {
233
- localStorage.setItem(A, JSON.stringify([...n]));
234
- } catch {}
235
- return n;
236
- });
237
- }, [A]), B = i(p(d, { activationConstraint: { distance: 5 } }), p(r, { activationConstraint: {
238
- delay: 200,
239
- tolerance: 5
240
- } })), V = (e) => {
241
- let { active: t } = e, n = U(t.id);
242
- if (S(n), h && n) {
243
- let e = W(n.id);
244
- e && h.startDrag({
245
- id: n.id,
246
- type: "kanban-card",
247
- data: n,
248
- sourceId: e.id
249
- });
250
- }
251
- }, H = (e) => {
252
- let { active: n, over: r } = e;
253
- if (S(null), !r) {
254
- h && h.endDrag();
255
- return;
256
- }
257
- let i = n.id, a = r.id;
258
- if (i === a) {
259
- h && h.endDrag();
260
- return;
261
- }
262
- let o = W(i), s = W(a) || G(a);
263
- if (!o || !s) {
264
- h && h.endDrag();
265
- return;
266
- }
267
- if (o.id === s.id) {
268
- let e = [...o.cards], t = c(e, e.findIndex((e) => e.id === i), e.findIndex((e) => e.id === a));
269
- L((e) => e.map((e) => e.id === o.id ? {
270
- ...e,
271
- cards: t
272
- } : e));
273
- } else {
274
- let e = [...o.cards], n = [...s.cards], r = e.findIndex((e) => e.id === i), c = a === s.id ? n.length : n.findIndex((e) => e.id === a), [l] = e.splice(r, 1);
275
- n.splice(c, 0, l), L((t) => t.map((t) => t.id === o.id ? {
276
- ...t,
277
- cards: e
278
- } : t.id === s.id ? {
279
- ...t,
280
- cards: n
281
- } : t)), t && t(i, o.id, s.id, c);
282
- }
283
- h && h.endDrag(s.id);
284
- }, U = m.useCallback((e) => {
285
- for (let t of I) {
286
- let n = t.cards.find((t) => t.id === e);
287
- if (n) return n;
288
- }
289
- return null;
290
- }, [I]), W = m.useCallback((e) => I.find((t) => t.cards.some((t) => t.id === e)) || null, [I]), G = m.useCallback((e) => I.find((t) => t.id === e) || null, [I]);
291
- return /* @__PURE__ */ (0, D.jsxs)(n, {
292
- sensors: B,
293
- collisionDetection: s,
294
- onDragStart: V,
295
- onDragEnd: H,
296
- children: [/* @__PURE__ */ (0, D.jsxs)("div", {
297
- ref: C,
298
- className: "flex flex-col min-w-0 min-h-0 h-full",
299
- children: [/* @__PURE__ */ (0, D.jsxs)("div", {
300
- className: "flex sm:hidden items-center justify-between px-3 pb-2 text-xs text-muted-foreground",
301
- children: [/* @__PURE__ */ (0, D.jsxs)("span", { children: [I.length, " columns"] }), /* @__PURE__ */ (0, D.jsx)("span", { children: "← Swipe to navigate →" })]
302
- }), R ? /* @__PURE__ */ (0, D.jsxs)("div", {
303
- className: O("flex flex-col gap-1 p-2 sm:p-4 min-w-0 overflow-hidden", u),
304
- role: "region",
305
- "aria-label": "Kanban board with swimlanes",
306
- children: [/* @__PURE__ */ (0, D.jsx)("div", {
307
- className: "flex gap-3 sm:gap-4 pl-36 sm:pl-44 overflow-x-auto",
308
- children: I.map((e) => /* @__PURE__ */ (0, D.jsxs)("div", {
309
- className: "w-[85vw] sm:w-80 flex-shrink-0 text-center",
310
- children: [/* @__PURE__ */ (0, D.jsx)("span", {
311
- className: " text-xs sm:text-sm font-semibold tracking-wider text-primary/90 uppercase",
312
- children: e.title
313
- }), /* @__PURE__ */ (0, D.jsxs)("span", {
314
- className: "ml-2 text-xs text-muted-foreground",
315
- children: [
316
- "(",
317
- e.cards.length,
318
- ")"
319
- ]
320
- })]
321
- }, e.id))
322
- }), R.map((e) => {
323
- let t = M.has(e), n = I.reduce((t, n) => t + n.cards.filter((t) => (t[b] == null ? k : String(t[b])) === e).length, 0);
324
- return /* @__PURE__ */ (0, D.jsxs)("div", {
325
- className: "border rounded-lg bg-muted/10",
326
- children: [/* @__PURE__ */ (0, D.jsxs)("button", {
327
- className: "w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-muted/30 transition-colors",
328
- onClick: () => z(e),
329
- "aria-expanded": !t,
330
- children: [
331
- /* @__PURE__ */ (0, D.jsx)("span", {
332
- className: O("transition-transform text-xs", t ? "" : "rotate-90"),
333
- children: "▶"
334
- }),
335
- /* @__PURE__ */ (0, D.jsx)("span", {
336
- className: " text-xs font-semibold text-muted-foreground uppercase tracking-wider",
337
- children: e
338
- }),
339
- /* @__PURE__ */ (0, D.jsxs)("span", {
340
- className: " text-xs text-muted-foreground",
341
- children: [
342
- "(",
343
- n,
344
- ")"
345
- ]
346
- })
347
- ]
348
- }), !t && /* @__PURE__ */ (0, D.jsx)("div", {
349
- className: "flex gap-3 sm:gap-4 overflow-x-auto px-2 pb-3 pl-36 sm:pl-44",
350
- children: I.map((t) => {
351
- let n = t.cards.filter((t) => (t[b] == null ? k : String(t[b])) === e);
352
- return /* @__PURE__ */ (0, D.jsx)("div", {
353
- className: "w-[85vw] sm:w-80 flex-shrink-0 min-h-[60px] rounded-md bg-card/20 p-2",
354
- children: /* @__PURE__ */ (0, D.jsx)(f, {
355
- items: n.map((e) => e.id),
356
- strategy: o,
357
- children: /* @__PURE__ */ (0, D.jsx)("div", {
358
- className: "space-y-2",
359
- role: "list",
360
- "aria-label": `${t.title} - ${e} cards`,
361
- children: n.map((e) => /* @__PURE__ */ (0, D.jsx)(j, {
362
- card: e,
363
- onCardClick: a,
364
- conditionalFormatting: y
365
- }, e.id))
366
- })
367
- })
368
- }, t.id);
369
- })
370
- })]
371
- }, e);
372
- })]
373
- }) : /* @__PURE__ */ (0, D.jsx)("div", {
374
- className: O("flex gap-3 sm:gap-4 overflow-x-auto snap-x snap-mandatory p-2 sm:p-4 bg-muted/10 rounded-lg [-webkit-overflow-scrolling:touch] min-w-0 min-h-0 h-full", u),
375
- role: "region",
376
- "aria-label": "Kanban board",
377
- children: I.map((e) => /* @__PURE__ */ (0, D.jsx)(N, {
378
- column: e,
379
- cards: e.cards,
380
- onCardClick: a,
381
- quickAdd: g,
382
- onQuickAdd: _,
383
- conditionalFormatting: y,
384
- columnStyle: T
385
- }, e.id))
386
- })]
387
- }), /* @__PURE__ */ (0, D.jsx)(l, { children: /* @__PURE__ */ (0, D.jsx)("div", {
388
- "aria-live": "assertive",
389
- "aria-label": x ? `Dragging ${x.title}` : void 0,
390
- children: x ? /* @__PURE__ */ (0, D.jsx)(j, {
391
- card: x,
392
- conditionalFormatting: y
393
- }) : null
394
- }) })]
395
- });
396
- }
397
- //#endregion
398
- export { F as default };
@@ -1,7 +0,0 @@
1
- import { n as e } from "./plus-CHsXVJSY.js";
2
- var t = e("chevron-down", [["path", {
3
- d: "m6 9 6 6 6-6",
4
- key: "qrunsl"
5
- }]]);
6
- //#endregion
7
- export { t };
@@ -1,226 +0,0 @@
1
- import { createContext as e, createElement as t, forwardRef as n, useContext as r } from "react";
2
- //#region \0rolldown/runtime.js
3
- var i = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), a = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
4
- if (typeof require < "u") return require.apply(this, arguments);
5
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
6
- }), o = /* @__PURE__ */ i(((e) => {
7
- var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
8
- function r(e, n, r) {
9
- var i = null;
10
- if (r !== void 0 && (i = "" + r), n.key !== void 0 && (i = "" + n.key), "key" in n) for (var a in r = {}, n) a !== "key" && (r[a] = n[a]);
11
- else r = n;
12
- return n = r.ref, {
13
- $$typeof: t,
14
- type: e,
15
- key: i,
16
- ref: n === void 0 ? null : n,
17
- props: r
18
- };
19
- }
20
- e.Fragment = n, e.jsx = r, e.jsxs = r;
21
- })), s = /* @__PURE__ */ i(((e) => {
22
- process.env.NODE_ENV !== "production" && (function() {
23
- function t(e) {
24
- if (e == null) return null;
25
- if (typeof e == "function") return e.$$typeof === k ? null : e.displayName || e.name || null;
26
- if (typeof e == "string") return e;
27
- switch (e) {
28
- case v: return "Fragment";
29
- case b: return "Profiler";
30
- case y: return "StrictMode";
31
- case w: return "Suspense";
32
- case T: return "SuspenseList";
33
- case O: return "Activity";
34
- }
35
- if (typeof e == "object") switch (typeof e.tag == "number" && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), e.$$typeof) {
36
- case _: return "Portal";
37
- case S: return e.displayName || "Context";
38
- case x: return (e._context.displayName || "Context") + ".Consumer";
39
- case C:
40
- var n = e.render;
41
- return e = e.displayName, e ||= (e = n.displayName || n.name || "", e === "" ? "ForwardRef" : "ForwardRef(" + e + ")"), e;
42
- case E: return n = e.displayName || null, n === null ? t(e.type) || "Memo" : n;
43
- case D:
44
- n = e._payload, e = e._init;
45
- try {
46
- return t(e(n));
47
- } catch {}
48
- }
49
- return null;
50
- }
51
- function n(e) {
52
- return "" + e;
53
- }
54
- function r(e) {
55
- try {
56
- n(e);
57
- var t = !1;
58
- } catch {
59
- t = !0;
60
- }
61
- if (t) {
62
- t = console;
63
- var r = t.error, i = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
64
- return r.call(t, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", i), n(e);
65
- }
66
- }
67
- function i(e) {
68
- if (e === v) return "<>";
69
- if (typeof e == "object" && e && e.$$typeof === D) return "<...>";
70
- try {
71
- var n = t(e);
72
- return n ? "<" + n + ">" : "<...>";
73
- } catch {
74
- return "<...>";
75
- }
76
- }
77
- function o() {
78
- var e = A.A;
79
- return e === null ? null : e.getOwner();
80
- }
81
- function s() {
82
- return Error("react-stack-top-frame");
83
- }
84
- function c(e) {
85
- if (j.call(e, "key")) {
86
- var t = Object.getOwnPropertyDescriptor(e, "key").get;
87
- if (t && t.isReactWarning) return !1;
88
- }
89
- return e.key !== void 0;
90
- }
91
- function l(e, t) {
92
- function n() {
93
- P || (P = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", t));
94
- }
95
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
96
- get: n,
97
- configurable: !0
98
- });
99
- }
100
- function u() {
101
- var e = t(this.type);
102
- return F[e] || (F[e] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")), e = this.props.ref, e === void 0 ? null : e;
103
- }
104
- function d(e, t, n, r, i, a) {
105
- var o = n.ref;
106
- return e = {
107
- $$typeof: g,
108
- type: e,
109
- key: t,
110
- props: n,
111
- _owner: r
112
- }, (o === void 0 ? null : o) === null ? Object.defineProperty(e, "ref", {
113
- enumerable: !1,
114
- value: null
115
- }) : Object.defineProperty(e, "ref", {
116
- enumerable: !1,
117
- get: u
118
- }), e._store = {}, Object.defineProperty(e._store, "validated", {
119
- configurable: !1,
120
- enumerable: !1,
121
- writable: !0,
122
- value: 0
123
- }), Object.defineProperty(e, "_debugInfo", {
124
- configurable: !1,
125
- enumerable: !1,
126
- writable: !0,
127
- value: null
128
- }), Object.defineProperty(e, "_debugStack", {
129
- configurable: !1,
130
- enumerable: !1,
131
- writable: !0,
132
- value: i
133
- }), Object.defineProperty(e, "_debugTask", {
134
- configurable: !1,
135
- enumerable: !1,
136
- writable: !0,
137
- value: a
138
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
139
- }
140
- function f(e, n, i, a, s, u) {
141
- var f = n.children;
142
- if (f !== void 0) if (a) if (M(f)) {
143
- for (a = 0; a < f.length; a++) p(f[a]);
144
- Object.freeze && Object.freeze(f);
145
- } else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
146
- else p(f);
147
- if (j.call(n, "key")) {
148
- f = t(e);
149
- var m = Object.keys(n).filter(function(e) {
150
- return e !== "key";
151
- });
152
- a = 0 < m.length ? "{key: someKey, " + m.join(": ..., ") + ": ...}" : "{key: someKey}", R[f + a] || (m = 0 < m.length ? "{" + m.join(": ..., ") + ": ...}" : "{}", console.error("A props object containing a \"key\" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />", a, f, m, f), R[f + a] = !0);
153
- }
154
- if (f = null, i !== void 0 && (r(i), f = "" + i), c(n) && (r(n.key), f = "" + n.key), "key" in n) for (var h in i = {}, n) h !== "key" && (i[h] = n[h]);
155
- else i = n;
156
- return f && l(i, typeof e == "function" ? e.displayName || e.name || "Unknown" : e), d(e, f, i, o(), s, u);
157
- }
158
- function p(e) {
159
- m(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e && e.$$typeof === D && (e._payload.status === "fulfilled" ? m(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
160
- }
161
- function m(e) {
162
- return typeof e == "object" && !!e && e.$$typeof === g;
163
- }
164
- var h = a("react"), g = Symbol.for("react.transitional.element"), _ = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), y = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), C = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), O = Symbol.for("react.activity"), k = Symbol.for("react.client.reference"), A = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = Object.prototype.hasOwnProperty, M = Array.isArray, N = console.createTask ? console.createTask : function() {
165
- return null;
166
- };
167
- h = { react_stack_bottom_frame: function(e) {
168
- return e();
169
- } };
170
- var P, F = {}, I = h.react_stack_bottom_frame.bind(h, s)(), L = N(i(s)), R = {};
171
- e.Fragment = v, e.jsx = function(e, t, n) {
172
- var r = 1e4 > A.recentlyCreatedOwnerStacks++;
173
- return f(e, t, n, !1, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
174
- }, e.jsxs = function(e, t, n) {
175
- var r = 1e4 > A.recentlyCreatedOwnerStacks++;
176
- return f(e, t, n, !0, r ? Error("react-stack-top-frame") : I, r ? N(i(e)) : L);
177
- };
178
- })();
179
- })), c = /* @__PURE__ */ i(((e, t) => {
180
- process.env.NODE_ENV === "production" ? t.exports = o() : t.exports = s();
181
- })), l = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), u = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), d = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), f = (e) => {
182
- let t = d(e);
183
- return t.charAt(0).toUpperCase() + t.slice(1);
184
- }, p = {
185
- xmlns: "http://www.w3.org/2000/svg",
186
- width: 24,
187
- height: 24,
188
- viewBox: "0 0 24 24",
189
- fill: "none",
190
- stroke: "currentColor",
191
- strokeWidth: 2,
192
- strokeLinecap: "round",
193
- strokeLinejoin: "round"
194
- }, m = (e) => {
195
- for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
196
- return !1;
197
- }, h = e({}), g = () => r(h), _ = n(({ color: e, size: n, strokeWidth: r, absoluteStrokeWidth: i, className: a = "", children: o, iconNode: s, ...c }, u) => {
198
- let { size: d = 24, strokeWidth: f = 2, absoluteStrokeWidth: h = !1, color: _ = "currentColor", className: v = "" } = g() ?? {}, y = i ?? h ? Number(r ?? f) * 24 / Number(n ?? d) : r ?? f;
199
- return t("svg", {
200
- ref: u,
201
- ...p,
202
- width: n ?? d ?? p.width,
203
- height: n ?? d ?? p.height,
204
- stroke: e ?? _,
205
- strokeWidth: y,
206
- className: l("lucide", v, a),
207
- ...!o && !m(c) && { "aria-hidden": "true" },
208
- ...c
209
- }, [...s.map(([e, n]) => t(e, n)), ...Array.isArray(o) ? o : [o]]);
210
- }), v = (e, r) => {
211
- let i = n(({ className: n, ...i }, a) => t(_, {
212
- ref: a,
213
- iconNode: r,
214
- className: l(`lucide-${u(f(e))}`, `lucide-${e}`, n),
215
- ...i
216
- }));
217
- return i.displayName = f(e), i;
218
- }, y = v("plus", [["path", {
219
- d: "M5 12h14",
220
- key: "1ays0h"
221
- }], ["path", {
222
- d: "M12 5v14",
223
- key: "s699le"
224
- }]]);
225
- //#endregion
226
- export { v as n, c as r, y as t };