@pibit.ai/cure-design-system 0.6.38 → 0.6.39

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,5 +1,5 @@
1
- import { jsxs as M, jsx as l } from "react/jsx-runtime";
2
- import { useState as ie, useMemo as g, useCallback as G, useEffect as oe, useRef as $e } from "react";
1
+ import { jsxs as I, jsx as l } from "react/jsx-runtime";
2
+ import { useState as ie, useMemo as d, useCallback as G, useEffect as oe, useRef as $e } from "react";
3
3
  import { Trash02 as me } from "@untitledui/icons";
4
4
  import { DatePicker as H } from "../../applications/date-picker/date-picker.js";
5
5
  import { useListData as Me } from "../../node_modules/react-stately/dist/private/data/useListData.js";
@@ -13,24 +13,24 @@ import { Select as C } from "../../primitives/select/select.js";
13
13
  import { ButtonUtility as fe } from "../../primitives/button/button-utility.js";
14
14
  import { EllipsisContentWithTooltip as he } from "../../primitives/tooltip/ellipsis-content.js";
15
15
  import { motion as ke } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
16
- import { Input as j } from "../../primitives/input/input.js";
17
- import { MultiSelect as pe } from "../../primitives/select/multi-select.js";
16
+ import { Input as E } from "../../primitives/input/input.js";
17
+ import { MultiSelect as ve } from "../../primitives/select/multi-select.js";
18
18
  import { SearchableSelect as qe } from "../../primitives/select/searchable-select.js";
19
19
  import { SelectItem as Re } from "../../primitives/select/select-item.js";
20
20
  import { ReorderItem as je } from "../../node_modules/framer-motion/dist/es/components/Reorder/Item.js";
21
- const Ae = ({
21
+ const Ee = ({
22
22
  searchable: r = !1,
23
23
  size: x = "sm",
24
24
  className: S,
25
- placeholder: _,
26
- selectedKey: A,
27
- onSelectionChange: E,
25
+ placeholder: K,
26
+ selectedKey: L,
27
+ onSelectionChange: B,
28
28
  items: n,
29
- isInvalid: K,
29
+ isInvalid: k,
30
30
  isDisabled: T,
31
- isLoading: k,
32
- selectedDisplayValue: d,
33
- searchPlaceholder: L = "Search..."
31
+ isLoading: q,
32
+ selectedDisplayValue: g,
33
+ searchPlaceholder: A = "Search..."
34
34
  }) => {
35
35
  const y = (s) => /* @__PURE__ */ l(Re, { id: s.id, label: s.label, children: s.label }, s.id);
36
36
  return r ? /* @__PURE__ */ l(
@@ -38,15 +38,15 @@ const Ae = ({
38
38
  {
39
39
  size: x,
40
40
  className: S,
41
- placeholder: _,
42
- selectedKey: A || null,
43
- onSelectionChange: (s) => E(s ?? ""),
41
+ placeholder: K,
42
+ selectedKey: L || null,
43
+ onSelectionChange: (s) => B(s ?? ""),
44
44
  items: n,
45
- isInvalid: K,
45
+ isInvalid: k,
46
46
  isDisabled: T,
47
- isLoading: k,
48
- selectedDisplayValue: d,
49
- searchPlaceholder: L,
47
+ isLoading: q,
48
+ selectedDisplayValue: g,
49
+ searchPlaceholder: A,
50
50
  renderItem: y
51
51
  }
52
52
  ) : /* @__PURE__ */ l(
@@ -54,98 +54,98 @@ const Ae = ({
54
54
  {
55
55
  size: x,
56
56
  className: S,
57
- placeholder: _,
58
- selectedKey: A,
59
- onSelectionChange: (s) => E(s),
57
+ placeholder: K,
58
+ selectedKey: L,
59
+ onSelectionChange: (s) => B(s),
60
60
  items: n,
61
- isInvalid: K,
61
+ isInvalid: k,
62
62
  isDisabled: T,
63
63
  children: (s) => /* @__PURE__ */ l(C.Item, { id: s.id, children: s.label })
64
64
  }
65
65
  );
66
- }, Ee = [
66
+ }, Le = [
67
67
  { id: "and", label: "And" },
68
68
  { id: "or", label: "Or" }
69
69
  ], b = "flex-1 w-[154px] h-8 [&>button]:h-8 [&>div]:h-full", sr = ({
70
70
  condition: r,
71
71
  fields: x,
72
72
  operators: S = _e,
73
- logicalOperator: _,
74
- isFirst: A,
75
- showLogicalOperator: E,
73
+ logicalOperator: K,
74
+ isFirst: L,
75
+ showLogicalOperator: B,
76
76
  onUpdate: n,
77
- onDelete: K,
77
+ onDelete: k,
78
78
  useFixedPositioning: T = !1,
79
- onLogicalOperatorChange: k,
80
- size: d = "sm",
81
- dragEnabled: L = !0,
79
+ onLogicalOperatorChange: q,
80
+ size: g = "sm",
81
+ dragEnabled: A = !0,
82
82
  documentFields: y,
83
83
  isInvalid: s = !1,
84
- allowFlexCol: p = !1,
85
- forceTextInput: B = !1,
86
- hideLabels: ve = !1,
84
+ allowFlexCol: v = !1,
85
+ forceTextInput: P = !1,
86
+ hideLabels: pe = !1,
87
87
  multiselectOptions: z,
88
88
  searchable: U = !1,
89
- testIdPrefix: P,
90
- rowIndex: de,
91
- dateAdapter: W = Ie
89
+ testIdPrefix: W,
90
+ rowIndex: ge,
91
+ dateAdapter: $ = Ie
92
92
  }) => {
93
- const Q = Ke(), V = (e) => P ? `${P}-${e}` : void 0, [F, I] = ie(null), [ee, X] = ie(null), re = g(() => F ?? (r.value && typeof r.value == "string" && r.value.trim() ? W.parseDate(r.value) : null), [F, r.value]), ge = g(() => ee ?? (r.value2 && typeof r.value2 == "string" && r.value2.trim() ? W.parseDate(r.value2) : null), [ee, r.value2]), Y = G(
93
+ const Q = Ke(), V = (e) => W ? `${W}-${e}` : void 0, [F, _] = ie(null), [ee, X] = ie(null), re = d(() => F ?? (r.value && typeof r.value == "string" && r.value.trim() ? $.parseDate(r.value) : null), [F, r.value, $]), de = d(() => ee ?? (r.value2 && typeof r.value2 == "string" && r.value2.trim() ? $.parseDate(r.value2) : null), [ee, r.value2, $]), Y = G(
94
94
  (e, a, i = []) => {
95
95
  if (a.length === 0) return null;
96
- const [o, ...f] = a, v = e.find((N) => N.key === o);
97
- if (!v) return null;
96
+ const [o, ...f] = a, p = e.find((N) => N.key === o);
97
+ if (!p) return null;
98
98
  if (f.length === 0)
99
- return { field: v, ancestorLabels: i };
100
- if (v.children) {
101
- const N = Y(v.children, f, [...i, v.label]);
99
+ return { field: p, ancestorLabels: i };
100
+ if (p.children) {
101
+ const N = Y(p.children, f, [...i, p.label]);
102
102
  if (N) return N;
103
103
  }
104
104
  return null;
105
105
  },
106
106
  []
107
- ), t = g(() => {
107
+ ), t = d(() => {
108
108
  const e = x.find((a) => a.id === r.fieldId);
109
109
  if (e) return e;
110
110
  if (y && r.fieldId) {
111
111
  const a = r.fieldId.split("."), i = a[0], o = y[i];
112
112
  if (o) {
113
- const f = a.slice(1), v = Y(o.fields, f);
114
- if (v && v.field.type) {
115
- const $ = [o.label, ...v.ancestorLabels, v.field.label].join(" > ");
113
+ const f = a.slice(1), p = Y(o.fields, f);
114
+ if (p && p.field.type) {
115
+ const M = [o.label, ...p.ancestorLabels, p.field.label].join(" > ");
116
116
  return {
117
117
  id: r.fieldId,
118
- label: $,
119
- type: v.field.type,
120
- options: v.field.options
118
+ label: M,
119
+ type: p.field.type,
120
+ options: p.field.options
121
121
  };
122
122
  }
123
123
  }
124
124
  }
125
- }, [x, r.fieldId, y]), te = g(() => t ? S.filter((e) => e.applicableTo.includes(t.type)) : S, [S, t]), c = g(
125
+ }, [x, r.fieldId, y]), te = d(() => t ? S.filter((e) => e.applicableTo.includes(t.type)) : S, [S, t]), c = d(
126
126
  () => S.find((e) => e.id === r.operatorId),
127
127
  [S, r.operatorId]
128
- ), ye = g(() => x.map((e) => ({ id: e.id, label: e.label })), [x]), be = g(() => te.map((e) => ({ id: e.id, label: e.label })), [te]), q = g(() => (t == null ? void 0 : t.type) === "select" && t.options ? t.options.map((e) => ({
128
+ ), ye = d(() => x.map((e) => ({ id: e.id, label: e.label })), [x]), be = d(() => te.map((e) => ({ id: e.id, label: e.label })), [te]), R = d(() => (t == null ? void 0 : t.type) === "select" && t.options ? t.options.map((e) => ({
129
129
  id: e.id,
130
130
  label: e.label
131
- })) : [], [t]), Se = g(() => {
131
+ })) : [], [t]), Se = d(() => {
132
132
  var e;
133
133
  if (r.value)
134
- return (e = q.find((a) => a.id === r.value)) == null ? void 0 : e.label;
135
- }, [r.value, q]), R = g(() => !r.value || typeof r.value != "string" ? [] : r.value.split(",").map((e) => e.trim()).filter(Boolean), [r.value]), le = g(
136
- () => z ?? q,
137
- [z, q]
138
- ), w = g(() => le.map((e) => ({ id: e.id, label: e.label })), [le]), Ne = g(
134
+ return (e = R.find((a) => a.id === r.value)) == null ? void 0 : e.label;
135
+ }, [r.value, R]), j = d(() => !r.value || typeof r.value != "string" ? [] : r.value.split(",").map((e) => e.trim()).filter(Boolean), [r.value]), le = d(
136
+ () => z ?? R,
137
+ [z, R]
138
+ ), w = d(() => le.map((e) => ({ id: e.id, label: e.label })), [le]), Ne = d(
139
139
  () => `ms-${r.fieldId}-${r.operatorId}-${w.length}-${r.value}`,
140
140
  [r.fieldId, r.operatorId, w.length, r.value]
141
141
  ), D = Me({
142
- initialItems: R.map((e) => w.find((a) => a.id === e)).filter((e) => e !== void 0),
142
+ initialItems: j.map((e) => w.find((a) => a.id === e)).filter((e) => e !== void 0),
143
143
  getKey: (e) => e.id
144
144
  });
145
145
  oe(() => {
146
146
  if (w.length === 0) return;
147
147
  const e = new Set(D.items.map((a) => a.id));
148
- for (const a of R)
148
+ for (const a of j)
149
149
  if (!e.has(a)) {
150
150
  const i = w.find((o) => o.id === a);
151
151
  i && D.append(i);
@@ -155,15 +155,15 @@ const Ae = ({
155
155
  oe(() => {
156
156
  if (ae.current === r.value) return;
157
157
  ae.current = r.value;
158
- const e = new Set(D.items.map((i) => i.id)), a = new Set(R);
158
+ const e = new Set(D.items.map((i) => i.id)), a = new Set(j);
159
159
  for (const i of D.items)
160
160
  a.has(i.id) || D.remove(i.id);
161
- for (const i of R)
161
+ for (const i of j)
162
162
  if (!e.has(i)) {
163
163
  const o = w.find((f) => f.id === i);
164
164
  o && D.append(o);
165
165
  }
166
- }, [r.value, R, w, D]);
166
+ }, [r.value, j, w, D]);
167
167
  const we = G(
168
168
  (e) => {
169
169
  const a = String(e), i = r.value ? r.value.split(",").map((o) => o.trim()).filter(Boolean) : [];
@@ -196,10 +196,10 @@ const Ae = ({
196
196
  const u = e.split(".").slice(1), h = Y(o.fields, u);
197
197
  h && h.field.type && (f = h.field.type);
198
198
  }
199
- const v = S.filter(($) => $.applicableTo.includes(f));
199
+ const p = S.filter((M) => M.applicableTo.includes(f));
200
200
  n({
201
201
  fieldId: e,
202
- operatorId: ((N = v[0]) == null ? void 0 : N.id) || "",
202
+ operatorId: ((N = p[0]) == null ? void 0 : N.id) || "",
203
203
  value: "",
204
204
  value2: void 0
205
205
  });
@@ -211,17 +211,17 @@ const Ae = ({
211
211
  n(i !== o ? { operatorId: e, value: "", value2: void 0 } : { operatorId: e });
212
212
  },
213
213
  [S, c, n]
214
- ), Z = g(() => (t == null ? void 0 : t.dataType) === "TIMESTAMP", [t]), Te = g(
215
- () => Z ? W.parseTimestamp(r.value) : null,
216
- [Z, r.value]
214
+ ), Z = d(() => (t == null ? void 0 : t.dataType) === "TIMESTAMP", [t]), Te = d(
215
+ () => Z ? $.parseTimestamp(r.value) : null,
216
+ [Z, r.value, $]
217
217
  ), ue = () => {
218
- var i, o, f, v, N, $;
218
+ var i, o, f, p, N, M;
219
219
  if (!(c != null && c.requiresValue))
220
220
  return /* @__PURE__ */ l(
221
- j,
221
+ E,
222
222
  {
223
- size: d,
224
- wrapperClassName: m(p && "w-full"),
223
+ size: g,
224
+ wrapperClassName: m(v && "w-full"),
225
225
  className: b,
226
226
  placeholder: "No value needed",
227
227
  value: "",
@@ -241,13 +241,13 @@ const Ae = ({
241
241
  // Prevent tags from wrapping to new lines - keep single row with horizontal scroll
242
242
  "h-full [&_[role='group']>div]:flex-nowrap [&_[role='group']>div]:overflow-x-auto [&_[role='group']>div]:scrollbar-hide",
243
243
  s && "[&>div]:ring-1 [&>div]:ring-error",
244
- p && "w-full"
244
+ v && "w-full"
245
245
  ),
246
246
  children: /* @__PURE__ */ l(
247
- pe,
247
+ ve,
248
248
  {
249
249
  placeholder: u ? "Loading options..." : "Select values",
250
- size: d,
250
+ size: g,
251
251
  selectedItems: D,
252
252
  items: u ? [] : w,
253
253
  onItemInserted: we,
@@ -256,7 +256,7 @@ const Ae = ({
256
256
  isDisabled: u,
257
257
  searchable: U,
258
258
  searchPlaceholder: "Search values...",
259
- children: (h) => /* @__PURE__ */ l(pe.Item, { id: h.id, children: h.label })
259
+ children: (h) => /* @__PURE__ */ l(ve.Item, { id: h.id, children: h.label })
260
260
  },
261
261
  Ne
262
262
  )
@@ -264,13 +264,13 @@ const Ae = ({
264
264
  );
265
265
  }
266
266
  return /* @__PURE__ */ l(
267
- j,
267
+ E,
268
268
  {
269
269
  mode: "tag",
270
- size: d,
270
+ size: g,
271
271
  wrapperClassName: m(
272
272
  s && "!ring-error_subtle !ring-2 !ring-error",
273
- p && "w-full"
273
+ v && "w-full"
274
274
  ),
275
275
  className: b,
276
276
  placeholder: "Type and press Enter",
@@ -280,27 +280,27 @@ const Ae = ({
280
280
  }
281
281
  );
282
282
  }
283
- if (Z && !B)
283
+ if (Z && !P)
284
284
  return /* @__PURE__ */ l(
285
285
  H,
286
286
  {
287
287
  granularity: "minute",
288
288
  value: Te,
289
- onChange: (u) => n({ value: W.formatTimestamp(u) }),
289
+ onChange: (u) => n({ value: $.formatTimestamp(u) }),
290
290
  showFooter: !1,
291
- className: m("w-auto", p && "w-full"),
291
+ className: m("w-auto", v && "w-full"),
292
292
  "aria-label": (t == null ? void 0 : t.label) || "Date and time"
293
293
  }
294
294
  );
295
295
  if (y)
296
- return c != null && c.requiresTwoValues ? /* @__PURE__ */ M("div", { className: m("flex items-center gap-2 flex-1 min-w-[200px]", p && "w-full"), children: [
296
+ return c != null && c.requiresTwoValues ? /* @__PURE__ */ I("div", { className: m("flex items-center gap-2 flex-1 min-w-[200px]", v && "w-full"), children: [
297
297
  /* @__PURE__ */ l(
298
298
  J,
299
299
  {
300
300
  documentFields: y,
301
301
  selectedFieldId: (i = r.value) != null && i.includes(".") ? r.value : "",
302
302
  onFieldSelect: se,
303
- size: d,
303
+ size: g,
304
304
  placeholder: "Min",
305
305
  className: m(
306
306
  b,
@@ -319,14 +319,14 @@ const Ae = ({
319
319
  documentFields: y,
320
320
  selectedFieldId: (f = r.value2) != null && f.includes(".") ? r.value2 : "",
321
321
  onFieldSelect: (u) => n({ value2: u }),
322
- size: d,
322
+ size: g,
323
323
  placeholder: "Max",
324
324
  className: m(
325
325
  b,
326
326
  s && "[&>div]:ring-2 [&>div]:ring-error [&>button]:ring-2 [&>button]:ring-error"
327
327
  ),
328
328
  allowCustomValue: !0,
329
- customValue: (v = r.value2) != null && v.includes(".") ? "" : r.value2 || "",
329
+ customValue: (p = r.value2) != null && p.includes(".") ? "" : r.value2 || "",
330
330
  onCustomValueChange: (u) => n({ value2: u }),
331
331
  useFixedPositioning: T
332
332
  }
@@ -337,15 +337,15 @@ const Ae = ({
337
337
  documentFields: y,
338
338
  selectedFieldId: (N = r.value) != null && N.includes(".") ? r.value : "",
339
339
  onFieldSelect: se,
340
- size: d,
340
+ size: g,
341
341
  placeholder: "Enter value",
342
342
  className: m(
343
343
  b,
344
344
  s && "[&>div]:ring-2 [&>div]:ring-error [&>button]:ring-2 [&>button]:ring-error",
345
- p && "w-full"
345
+ v && "w-full"
346
346
  ),
347
347
  allowCustomValue: !0,
348
- customValue: ($ = r.value) != null && $.includes(".") ? "" : r.value,
348
+ customValue: (M = r.value) != null && M.includes(".") ? "" : r.value,
349
349
  onCustomValueChange: (u) => n({ value: u }),
350
350
  useFixedPositioning: T
351
351
  }
@@ -353,19 +353,19 @@ const Ae = ({
353
353
  if ((t == null ? void 0 : t.type) === "select") {
354
354
  const u = !!t.isLoading;
355
355
  return /* @__PURE__ */ l(
356
- Ae,
356
+ Ee,
357
357
  {
358
358
  searchable: U,
359
- size: d,
359
+ size: g,
360
360
  className: m(
361
361
  b,
362
362
  s && "[&>button]:ring-2 [&>button]:ring-error",
363
- p && "w-full"
363
+ v && "w-full"
364
364
  ),
365
365
  placeholder: u ? "Loading options..." : "Select",
366
366
  selectedKey: r.value,
367
367
  onSelectionChange: (h) => n({ value: h }),
368
- items: u ? [] : q,
368
+ items: u ? [] : R,
369
369
  isInvalid: s,
370
370
  isDisabled: u,
371
371
  isLoading: u,
@@ -376,19 +376,19 @@ const Ae = ({
376
376
  }
377
377
  if (c != null && c.requiresTwoValues) {
378
378
  if ((t == null ? void 0 : t.type) === "date")
379
- return /* @__PURE__ */ M("div", { className: m("flex items-center gap-2 flex-1 min-w-[200px] ", p && "w-full"), children: [
379
+ return /* @__PURE__ */ I("div", { className: m("flex items-center gap-2 flex-1 min-w-[200px] ", v && "w-full"), children: [
380
380
  /* @__PURE__ */ l("div", { className: m("flex-1", s && "ring-2 ring-error rounded-lg"), children: /* @__PURE__ */ l(
381
381
  H,
382
382
  {
383
383
  value: re,
384
- onChange: I,
384
+ onChange: _,
385
385
  onApply: (h) => {
386
386
  n(h ? {
387
387
  value: `${h.month}/${h.day}/${h.year}`
388
- } : { value: "" }), I(null);
388
+ } : { value: "" }), _(null);
389
389
  },
390
390
  onCancel: () => {
391
- I(null);
391
+ _(null);
392
392
  },
393
393
  showFooter: !0,
394
394
  className: "w-full"
@@ -398,7 +398,7 @@ const Ae = ({
398
398
  /* @__PURE__ */ l("div", { className: m("flex-1", s && "ring-2 ring-error rounded-lg"), children: /* @__PURE__ */ l(
399
399
  H,
400
400
  {
401
- value: ge,
401
+ value: de,
402
402
  onChange: X,
403
403
  onApply: (h) => {
404
404
  n(h ? {
@@ -413,12 +413,12 @@ const Ae = ({
413
413
  }
414
414
  ) })
415
415
  ] });
416
- const u = () => (t == null ? void 0 : t.type) === "number" ? "number" : (t == null ? void 0 : t.type) === "date" && B ? "date" : "text";
417
- return /* @__PURE__ */ M("div", { className: "flex items-center gap-2 flex-1 min-w-[200px]", children: [
416
+ const u = () => (t == null ? void 0 : t.type) === "number" ? "number" : (t == null ? void 0 : t.type) === "date" && P ? "date" : "text";
417
+ return /* @__PURE__ */ I("div", { className: "flex items-center gap-2 flex-1 min-w-[200px]", children: [
418
418
  /* @__PURE__ */ l(
419
- j,
419
+ E,
420
420
  {
421
- size: d,
421
+ size: g,
422
422
  wrapperClassName: m(s && "!ring-error_subtle !ring-2 !ring-error"),
423
423
  className: b,
424
424
  placeholder: "Min",
@@ -430,9 +430,9 @@ const Ae = ({
430
430
  ),
431
431
  /* @__PURE__ */ l("span", { className: "text-sm text-tertiary", children: "and" }),
432
432
  /* @__PURE__ */ l(
433
- j,
433
+ E,
434
434
  {
435
- size: d,
435
+ size: g,
436
436
  wrapperClassName: m(s && "!ring-error_subtle !ring-2 !ring-error"),
437
437
  className: b,
438
438
  placeholder: "Max",
@@ -444,27 +444,27 @@ const Ae = ({
444
444
  )
445
445
  ] });
446
446
  }
447
- if ((t == null ? void 0 : t.type) === "date" && !B)
447
+ if ((t == null ? void 0 : t.type) === "date" && !P)
448
448
  return /* @__PURE__ */ l(
449
449
  "div",
450
450
  {
451
451
  className: m(
452
452
  "min-w-[140px] flex-1",
453
453
  s && "ring-2 ring-error rounded-lg",
454
- p && "w-full"
454
+ v && "w-full"
455
455
  ),
456
456
  children: /* @__PURE__ */ l(
457
457
  H,
458
458
  {
459
459
  value: re,
460
- onChange: I,
460
+ onChange: _,
461
461
  onApply: (u) => {
462
462
  n(u ? {
463
463
  value: `${u.month}/${u.day}/${u.year}`
464
- } : { value: "" }), I(null);
464
+ } : { value: "" }), _(null);
465
465
  },
466
466
  onCancel: () => {
467
- I(null);
467
+ _(null);
468
468
  },
469
469
  showFooter: !0,
470
470
  className: "w-full"
@@ -472,12 +472,12 @@ const Ae = ({
472
472
  )
473
473
  }
474
474
  );
475
- const a = () => (t == null ? void 0 : t.type) === "number" ? "number" : (t == null ? void 0 : t.type) === "date" && B ? "date" : "text";
475
+ const a = () => (t == null ? void 0 : t.type) === "number" ? "number" : (t == null ? void 0 : t.type) === "date" && P ? "date" : "text";
476
476
  return /* @__PURE__ */ l(
477
- j,
477
+ E,
478
478
  {
479
- size: d,
480
- wrapperClassName: m(s && "!ring-error_subtle !ring-2 !ring-error", p && "w-full"),
479
+ size: g,
480
+ wrapperClassName: m(s && "!ring-error_subtle !ring-2 !ring-error", v && "w-full"),
481
481
  className: b,
482
482
  placeholder: (t == null ? void 0 : t.type) === "date" ? "Select date" : "Enter value",
483
483
  inputType: a(),
@@ -486,14 +486,14 @@ const Ae = ({
486
486
  isInvalid: s
487
487
  }
488
488
  );
489
- }, O = !!(c != null && c.requiresMultipleValues), ne = (e) => P ? /* @__PURE__ */ l("div", { className: "contents", "data-testid": V("value-input"), children: e }) : e;
490
- return /* @__PURE__ */ M(
489
+ }, O = !!(c != null && c.requiresMultipleValues), ne = (e) => W ? /* @__PURE__ */ l("div", { className: "contents", "data-testid": V("value-input"), children: e }) : e;
490
+ return /* @__PURE__ */ I(
491
491
  je,
492
492
  {
493
493
  value: r,
494
494
  id: r.id,
495
495
  "data-testid": V("row"),
496
- "data-row-index": P ? de : void 0,
496
+ "data-row-index": W ? ge : void 0,
497
497
  dragListener: !1,
498
498
  dragControls: Q,
499
499
  layout: O ? "position" : !0,
@@ -502,52 +502,52 @@ const Ae = ({
502
502
  },
503
503
  className: m(
504
504
  "flex items-center gap-2 py-2 group select-none",
505
- p && "flex-col items-start",
505
+ v && "flex-col items-start",
506
506
  O && "items-start"
507
507
  ),
508
508
  initial: !1,
509
509
  animate: !1,
510
510
  style: { position: "relative" },
511
511
  children: [
512
- !ve && /* @__PURE__ */ M("div", { className: m("w-[72px] shrink-0", p && "w-full flex justify-between items-center"), children: [
513
- A ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-secondary pl-1", children: "Where" }) : E ? /* @__PURE__ */ l(
512
+ !pe && /* @__PURE__ */ I("div", { className: m("w-[72px] shrink-0", v && "w-full flex justify-between items-center"), children: [
513
+ L ? /* @__PURE__ */ l("span", { className: "text-sm font-medium text-secondary pl-1", children: "Where" }) : B ? /* @__PURE__ */ l(
514
514
  C,
515
515
  {
516
- size: d,
517
- className: m("h-8 w-full [&>button]:h-8 [&>div]:h-full", p && "w-auto"),
516
+ size: g,
517
+ className: m("h-8 w-full [&>button]:h-8 [&>div]:h-full", v && "w-auto"),
518
518
  popoverClassName: "w-auto min-w-max",
519
- selectedKey: _,
520
- onSelectionChange: (e) => k == null ? void 0 : k(e),
521
- items: Ee,
519
+ selectedKey: K,
520
+ onSelectionChange: (e) => q == null ? void 0 : q(e),
521
+ items: Le,
522
522
  children: (e) => /* @__PURE__ */ l(C.Item, { id: e.id, children: e.label })
523
523
  }
524
- ) : /* @__PURE__ */ l("span", { className: "text-sm font-medium text-secondary pl-3", children: _ === "or" ? "Or" : "And" }),
525
- p && /* @__PURE__ */ l(
524
+ ) : /* @__PURE__ */ l("span", { className: "text-sm font-medium text-secondary pl-3", children: K === "or" ? "Or" : "And" }),
525
+ v && /* @__PURE__ */ l(
526
526
  fe,
527
527
  {
528
528
  color: "tertiary",
529
529
  size: "xs",
530
530
  icon: /* @__PURE__ */ l(me, { size: 18 }),
531
531
  "aria-label": "Remove condition",
532
- onClick: K,
532
+ onClick: k,
533
533
  "data-testid": V("remove-button"),
534
534
  className: "text-quaternary hover:bg-secondary_hover hover:text-secondary"
535
535
  }
536
536
  )
537
537
  ] }),
538
- /* @__PURE__ */ M("div", { className: m("flex relative", p ? "w-full" : "shrink-0"), children: [
538
+ /* @__PURE__ */ I("div", { className: m("flex relative", v ? "w-full" : "shrink-0"), children: [
539
539
  y ? /* @__PURE__ */ l(
540
540
  J,
541
541
  {
542
542
  documentFields: y,
543
543
  selectedFieldId: r.fieldId,
544
544
  onFieldSelect: De,
545
- size: d,
545
+ size: g,
546
546
  placeholder: "Select field",
547
547
  className: m(
548
548
  b,
549
549
  s && "[&>button]:ring-2 [&>button]:ring-error",
550
- p && "w-full max-w-none!"
550
+ v && "w-full max-w-none!"
551
551
  ),
552
552
  useFixedPositioning: T
553
553
  }
@@ -555,11 +555,11 @@ const Ae = ({
555
555
  C,
556
556
  {
557
557
  "data-testid": V("field-select"),
558
- size: d,
558
+ size: g,
559
559
  className: m(
560
560
  b,
561
561
  s && "[&>button]:ring-2 [&>button]:ring-error",
562
- p && "w-full flex-1 max-w-none!"
562
+ v && "w-full flex-1 max-w-none!"
563
563
  ),
564
564
  placeholder: "Select field",
565
565
  selectedKey: r.fieldId,
@@ -576,7 +576,7 @@ const Ae = ({
576
576
  ) })
577
577
  }
578
578
  ),
579
- L && p && /* @__PURE__ */ l(
579
+ A && v && /* @__PURE__ */ l(
580
580
  "div",
581
581
  {
582
582
  className: "flex opacity-0 group-hover:opacity-100 hover:visible absolute right-[-23px] bottom-1 items-center justify-center cursor-grab active:cursor-grabbing p-1.5 rounded-md transition-colors text-quaternary hover:text-secondary touch-none",
@@ -591,11 +591,11 @@ const Ae = ({
591
591
  C,
592
592
  {
593
593
  "data-testid": V("operator-select"),
594
- size: d,
594
+ size: g,
595
595
  className: m(
596
596
  b,
597
597
  s && "[&>button]:ring-2 [&>button]:ring-error",
598
- p && "w-full",
598
+ v && "w-full",
599
599
  !(c != null && c.requiresValue) && "flex-1"
600
600
  ),
601
601
  placeholder: "Select operator",
@@ -607,8 +607,8 @@ const Ae = ({
607
607
  },
608
608
  `operator-${r.fieldId}-${t == null ? void 0 : t.type}`
609
609
  ),
610
- O ? /* @__PURE__ */ l(ke.div, { layoutRoot: !0, className: m("min-w-0 flex-1", p && "w-full"), children: ne(ue()) }) : ne(ue()),
611
- !p && /* @__PURE__ */ M("div", { className: "flex items-center gap-1 shrink-0", children: [
610
+ O ? /* @__PURE__ */ l(ke.div, { layoutRoot: !0, className: m("min-w-0 flex-1", v && "w-full"), children: ne(ue()) }) : ne(ue()),
611
+ !v && /* @__PURE__ */ I("div", { className: "flex items-center gap-1 shrink-0", children: [
612
612
  /* @__PURE__ */ l(
613
613
  fe,
614
614
  {
@@ -616,12 +616,12 @@ const Ae = ({
616
616
  size: "3xs",
617
617
  icon: /* @__PURE__ */ l(me, { size: 16 }),
618
618
  "aria-label": "Remove condition",
619
- onClick: K,
619
+ onClick: k,
620
620
  "data-testid": V("remove-button"),
621
621
  className: "text-quaternary hover:bg-secondary_hover hover:text-secondary"
622
622
  }
623
623
  ),
624
- L && /* @__PURE__ */ l(
624
+ A && /* @__PURE__ */ l(
625
625
  "div",
626
626
  {
627
627
  className: "flex items-center justify-center cursor-grab active:cursor-grabbing p-1 hover:bg-secondary_hover rounded-md transition-colors text-quaternary hover:text-secondary touch-none",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pibit.ai/cure-design-system",
3
- "version": "0.6.38",
3
+ "version": "0.6.39",
4
4
  "description": "CURE Design System - React component library",
5
5
  "author": "Pibit",
6
6
  "license": "MIT",