@alfadocs/ui-kit-debug 1.17.0 → 1.18.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.
@@ -1,37 +1,39 @@
1
- import { jsx as o, jsxs as O } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as k } from "react/jsx-runtime";
2
2
  import { useState as x, useEffect as w, useCallback as U, useMemo as z, useRef as X } from "react";
3
3
  import { useGridFilter as A } from "ag-grid-react";
4
4
  import { D as H } from "./date-range-picker-BD8P_rJq.js";
5
- import { useTranslation as D } from "react-i18next";
6
- import { C as Z } from "./checkbox-BuZ1u__2.js";
5
+ import { useTranslation as L } from "react-i18next";
6
+ import { C as J } from "./checkbox-BuZ1u__2.js";
7
7
  import { B as E } from "./button-nJaPh_HC.js";
8
- import { M as J } from "./multi-select-DYOvx2SJ.js";
9
- import { S as Q } from "./scroll-area-BZOvUhwQ.js";
8
+ import { M as Q } from "./multi-select-DYOvx2SJ.js";
9
+ import { S as W } from "./scroll-area-BZOvUhwQ.js";
10
10
  import { A as Y } from "./autocomplete-MpBhz-fG.js";
11
11
  import { N as M } from "./number-input-Cgu2TtA8.js";
12
- import { S as W } from "./select-Bi8zril7.js";
13
- import { B as ee } from "./badge-sTusUqZD.js";
12
+ import { S as ee } from "./select-Bi8zril7.js";
13
+ import { B as te } from "./badge-sTusUqZD.js";
14
14
  import { A as j } from "./avatar-BNQNhoyL.js";
15
15
  import { T as I } from "./tag-3wgkwwDB.js";
16
- import { T as te } from "./tooltip-DvmfrNvB.js";
16
+ import { T as ne } from "./tooltip-DvmfrNvB.js";
17
17
  import { T as B } from "./timestamp-BV2lC-wV.js";
18
- const ne = /^\d{4}-\d{2}-\d{2}$/;
18
+ const G = /^\d{4}-\d{2}-\d{2}$/, ae = /^(\d{4}-\d{2}-\d{2})/;
19
19
  function P(t) {
20
20
  if (!t) return null;
21
21
  const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
22
22
  return `${e}-${n}-${a}`;
23
23
  }
24
- function R(t) {
24
+ function re(t) {
25
+ return typeof t == "string" && G.test(t);
26
+ }
27
+ function O(t) {
25
28
  if (!t) return;
26
- const e = ne.test(t) ? new Date(
29
+ const e = G.test(t) ? new Date(
27
30
  Number(t.slice(0, 4)),
28
31
  Number(t.slice(5, 7)) - 1,
29
32
  Number(t.slice(8, 10))
30
33
  ) : new Date(t);
31
34
  return Number.isNaN(e.getTime()) ? void 0 : e;
32
35
  }
33
- const ae = /^(\d{4}-\d{2}-\d{2})/;
34
- function re(t) {
36
+ function le(t) {
35
37
  if (t == null || t === "")
36
38
  return null;
37
39
  if (typeof t == "string") {
@@ -41,24 +43,24 @@ function re(t) {
41
43
  const e = t instanceof Date ? t : new Date(String(t));
42
44
  return Number.isNaN(e.getTime()) ? null : P(e);
43
45
  }
44
- function le(t, e, n) {
46
+ function se(t, e, n) {
45
47
  if (!e && !n) return !0;
46
- const a = re(t);
48
+ const a = le(t);
47
49
  return !(!a || e && a < e || n && a > n);
48
50
  }
49
- function Me(t) {
51
+ function Ae(t) {
50
52
  var c;
51
53
  const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, r = ((c = t.colDef) == null ? void 0 : c.filterParams) ?? {}, [s, f] = x(() => ({
52
- from: R(e == null ? void 0 : e.dateFrom),
53
- to: R(e == null ? void 0 : e.dateTo)
54
+ from: O(e == null ? void 0 : e.dateFrom),
55
+ to: O(e == null ? void 0 : e.dateTo)
54
56
  }));
55
57
  w(() => {
56
58
  f({
57
- from: R(e == null ? void 0 : e.dateFrom),
58
- to: R(e == null ? void 0 : e.dateTo)
59
+ from: O(e == null ? void 0 : e.dateFrom),
60
+ to: O(e == null ? void 0 : e.dateTo)
59
61
  });
60
62
  }, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), A({
61
- doesFilterPass: (i) => le(a(i.node), e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo)
63
+ doesFilterPass: (i) => se(a(i.node), e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo)
62
64
  });
63
65
  function u(i) {
64
66
  if (f(i), !i.from && !i.to) {
@@ -88,16 +90,16 @@ function Me(t) {
88
90
  }
89
91
  );
90
92
  }
91
- function Ae(t) {
93
+ function qe(t) {
92
94
  var u, c;
93
95
  const { model: e, onModelChange: n, column: a } = t, l = ((c = (u = a == null ? void 0 : a.getColDef) == null ? void 0 : u.call(a)) == null ? void 0 : c.filterParams) ?? {}, [r, s] = x(() => ({
94
- from: R(e == null ? void 0 : e.dateFrom),
95
- to: R(e == null ? void 0 : e.dateTo)
96
+ from: O(e == null ? void 0 : e.dateFrom),
97
+ to: O(e == null ? void 0 : e.dateTo)
96
98
  }));
97
99
  w(() => {
98
100
  s({
99
- from: R(e == null ? void 0 : e.dateFrom),
100
- to: R(e == null ? void 0 : e.dateTo)
101
+ from: O(e == null ? void 0 : e.dateFrom),
102
+ to: O(e == null ? void 0 : e.dateTo)
101
103
  });
102
104
  }, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
103
105
  function f(i) {
@@ -122,28 +124,28 @@ function Ae(t) {
122
124
  }
123
125
  ) });
124
126
  }
125
- function k(t) {
127
+ function R(t) {
126
128
  return typeof t == "number" ? `n:${t}` : `s:${t}`;
127
129
  }
128
- const se = new Intl.Collator(void 0, { numeric: !0 });
129
- function ie(t, e) {
130
+ const ie = new Intl.Collator(void 0, { numeric: !0 });
131
+ function oe(t, e) {
130
132
  if (!t) return [];
131
133
  const n = /* @__PURE__ */ new Map();
132
134
  return t.forEachNode((a) => {
133
135
  const l = e(a);
134
136
  if (l == null) return;
135
- const r = typeof l == "string" || typeof l == "number" ? l : String(l), s = k(r);
137
+ const r = typeof l == "string" || typeof l == "number" ? l : String(l), s = R(r);
136
138
  n.has(s) || n.set(s, { value: r, label: String(r) });
137
139
  }), Array.from(n.values()).sort(
138
- (a, l) => se.compare(String(a.label), String(l.label))
140
+ (a, l) => ie.compare(String(a.label), String(l.label))
139
141
  );
140
142
  }
141
- function oe(t, e) {
143
+ function ue(t, e) {
142
144
  return t.length !== e.length ? !1 : t.every(
143
- (n, a) => k(n.value) === k(e[a].value) && n.label === e[a].label
145
+ (n, a) => R(n.value) === R(e[a].value) && n.label === e[a].label
144
146
  );
145
147
  }
146
- function G(t, e, n) {
148
+ function Z(t, e, n) {
147
149
  const a = e, l = a !== void 0, [r, s] = x([]), f = X(n);
148
150
  return w(() => {
149
151
  f.current = n;
@@ -151,8 +153,8 @@ function G(t, e, n) {
151
153
  if (l || !t) return;
152
154
  const u = () => {
153
155
  s((c) => {
154
- const i = ie(t, f.current);
155
- return oe(c, i) ? c : i;
156
+ const i = oe(t, f.current);
157
+ return ue(c, i) ? c : i;
156
158
  });
157
159
  };
158
160
  return u(), t.addEventListener("modelUpdated", u), t.addEventListener("cellValueChanged", u), () => {
@@ -160,13 +162,13 @@ function G(t, e, n) {
160
162
  };
161
163
  }, [t, l]), a ?? r;
162
164
  }
163
- function qe(t) {
164
- const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } = D("ui"), u = U(
165
+ function je(t) {
166
+ const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } = L("ui"), u = U(
165
167
  (m) => a(m),
166
168
  [a]
167
- ), c = G(l, r, u), i = z(() => {
169
+ ), c = Z(l, r, u), i = z(() => {
168
170
  const m = /* @__PURE__ */ new Set(), d = (e == null ? void 0 : e.values) ?? [];
169
- for (const h of d) m.add(k(h));
171
+ for (const h of d) m.add(R(h));
170
172
  return m;
171
173
  }, [e]), [p, y] = x(i);
172
174
  w(() => {
@@ -177,8 +179,8 @@ function qe(t) {
177
179
  if (!d || d.length === 0) return !0;
178
180
  const h = a(m.node);
179
181
  if (h == null) return !1;
180
- const g = typeof h == "string" || typeof h == "number" ? h : String(h), S = k(g);
181
- return d.some((F) => k(F) === S);
182
+ const g = typeof h == "string" || typeof h == "number" ? h : String(h), S = R(g);
183
+ return d.some((F) => R(F) === S);
182
184
  }
183
185
  });
184
186
  function C(m) {
@@ -194,7 +196,7 @@ function qe(t) {
194
196
  }
195
197
  const m = [];
196
198
  for (const d of c)
197
- p.has(k(d.value)) && m.push(d.value);
199
+ p.has(R(d.value)) && m.push(d.value);
198
200
  if (m.length === 0) {
199
201
  n(null);
200
202
  return;
@@ -205,22 +207,22 @@ function qe(t) {
205
207
  y(/* @__PURE__ */ new Set()), n(null);
206
208
  }
207
209
  const v = s ?? f("dataTable.selectFilter.all");
208
- return /* @__PURE__ */ O(
210
+ return /* @__PURE__ */ k(
209
211
  "div",
210
212
  {
211
213
  "data-component": "select-filter",
212
214
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
213
215
  children: [
214
- /* @__PURE__ */ o(Q, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ o(
216
+ /* @__PURE__ */ o(W, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ o(
215
217
  "div",
216
218
  {
217
219
  role: "group",
218
220
  "aria-label": v,
219
221
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
220
222
  children: c.length === 0 ? /* @__PURE__ */ o("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: f("dataTable.agGrid.noRowsToShow") }) : c.map((m) => {
221
- const d = k(m.value);
223
+ const d = R(m.value);
222
224
  return /* @__PURE__ */ o(
223
- Z,
225
+ J,
224
226
  {
225
227
  size: "sm",
226
228
  label: m.label,
@@ -232,7 +234,7 @@ function qe(t) {
232
234
  })
233
235
  }
234
236
  ) }),
235
- /* @__PURE__ */ O("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
237
+ /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
236
238
  /* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: b, type: "button", children: f("dataTable.selectFilter.clear") }),
237
239
  /* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: T, type: "button", children: f("dataTable.selectFilter.apply") })
238
240
  ] })
@@ -240,7 +242,7 @@ function qe(t) {
240
242
  }
241
243
  );
242
244
  }
243
- function je(t) {
245
+ function Ie(t) {
244
246
  var T;
245
247
  const { model: e, onModelChange: n, column: a, api: l } = t, r = (T = a == null ? void 0 : a.getColDef) == null ? void 0 : T.call(a), s = (r == null ? void 0 : r.filterParams) ?? {}, f = U(
246
248
  (b) => l && a ? l.getCellValue({
@@ -248,7 +250,7 @@ function je(t) {
248
250
  colKey: a
249
251
  }) : void 0,
250
252
  [l, a]
251
- ), u = G(
253
+ ), u = Z(
252
254
  l,
253
255
  s.options,
254
256
  f
@@ -283,7 +285,7 @@ function je(t) {
283
285
  n({ type: "set", values: v });
284
286
  }
285
287
  return /* @__PURE__ */ o("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
286
- J,
288
+ Q,
287
289
  {
288
290
  size: "sm",
289
291
  options: p,
@@ -295,10 +297,10 @@ function je(t) {
295
297
  }
296
298
  ) });
297
299
  }
298
- function L(t) {
300
+ function D(t) {
299
301
  return t.trim().toLocaleLowerCase();
300
302
  }
301
- function Ie(t) {
303
+ function Be(t) {
302
304
  const {
303
305
  model: e,
304
306
  onModelChange: n,
@@ -308,7 +310,7 @@ function Ie(t) {
308
310
  options: s,
309
311
  loadOptions: f,
310
312
  placeholder: u
311
- } = t, { t: c } = D("ui"), i = z(() => {
313
+ } = t, { t: c } = L("ui"), i = z(() => {
312
314
  if (s && s.length > 0) return s;
313
315
  if (!l || !r) return [];
314
316
  const d = /* @__PURE__ */ new Map();
@@ -323,8 +325,8 @@ function Ie(t) {
323
325
  }, [s, l, r, a]), p = z(() => async (d, h) => {
324
326
  if (f)
325
327
  return (await f(d, h)).map((N) => ({ value: N.value, label: N.label }));
326
- const g = L(d);
327
- return (g ? i.filter((F) => L(F.label).includes(g)) : i).slice(0, 50).map((F) => ({ value: F.value, label: F.label }));
328
+ const g = D(d);
329
+ return (g ? i.filter((F) => D(F.label).includes(g)) : i).slice(0, 50).map((F) => ({ value: F.value, label: F.label }));
328
330
  }, [f, i]), [y, C] = x((e == null ? void 0 : e.value) ?? "");
329
331
  w(() => {
330
332
  C((e == null ? void 0 : e.value) ?? "");
@@ -335,7 +337,7 @@ function Ie(t) {
335
337
  const g = a(d.node);
336
338
  if (g == null) return !1;
337
339
  const S = typeof g == "string" ? g : String(g);
338
- return L(S) === L(h);
340
+ return D(S) === D(h);
339
341
  }
340
342
  });
341
343
  function T(d) {
@@ -348,7 +350,7 @@ function Ie(t) {
348
350
  C(""), n(null);
349
351
  }
350
352
  const m = u ?? c("dataTable.typeaheadFilter.placeholder");
351
- return /* @__PURE__ */ O(
353
+ return /* @__PURE__ */ k(
352
354
  "div",
353
355
  {
354
356
  "data-component": "typeahead-filter",
@@ -371,13 +373,13 @@ function Ie(t) {
371
373
  }
372
374
  );
373
375
  }
374
- function Be(t) {
376
+ function Ve(t) {
375
377
  var T, b;
376
- const { model: e, onModelChange: n, column: a } = t, { t: l } = D("ui"), r = ((b = (T = a == null ? void 0 : a.getColDef) == null ? void 0 : T.call(a)) == null ? void 0 : b.filterParams) ?? {}, s = r.options ?? [], f = r.loadOptions, u = r.placeholder ?? l("dataTable.typeaheadFilter.placeholder"), c = z(() => async (v, m) => {
378
+ const { model: e, onModelChange: n, column: a } = t, { t: l } = L("ui"), r = ((b = (T = a == null ? void 0 : a.getColDef) == null ? void 0 : T.call(a)) == null ? void 0 : b.filterParams) ?? {}, s = r.options ?? [], f = r.loadOptions, u = r.placeholder ?? l("dataTable.typeaheadFilter.placeholder"), c = z(() => async (v, m) => {
377
379
  if (f)
378
380
  return (await f(v, m)).map((S) => ({ value: S.value, label: S.label }));
379
- const d = L(v);
380
- return (d ? s.filter((g) => L(g.label).includes(d)) : s).slice(0, 50).map((g) => ({ value: g.value, label: g.label }));
381
+ const d = D(v);
382
+ return (d ? s.filter((g) => D(g.label).includes(d)) : s).slice(0, 50).map((g) => ({ value: g.value, label: g.label }));
381
383
  }, [f, s]), [i, p] = x((e == null ? void 0 : e.value) ?? "");
382
384
  w(() => {
383
385
  p((e == null ? void 0 : e.value) ?? "");
@@ -401,7 +403,7 @@ function Be(t) {
401
403
  }
402
404
  ) });
403
405
  }
404
- const ue = [
406
+ const ce = [
405
407
  "equals",
406
408
  "notEqual",
407
409
  "greaterThan",
@@ -412,13 +414,13 @@ const ue = [
412
414
  "blank",
413
415
  "notBlank"
414
416
  ];
415
- function _(t) {
417
+ function V(t) {
416
418
  return t !== "blank" && t !== "notBlank";
417
419
  }
418
- function V(t) {
420
+ function _(t) {
419
421
  return t === "inRange";
420
422
  }
421
- function ce(t, e, n, a) {
423
+ function de(t, e, n, a) {
422
424
  if (t === "blank") return e === null;
423
425
  if (t === "notBlank") return e !== null;
424
426
  if (e === null) return !1;
@@ -445,7 +447,7 @@ function ce(t, e, n, a) {
445
447
  return !0;
446
448
  }
447
449
  }
448
- function de(t) {
450
+ function fe(t) {
449
451
  if (t == null || t === "") return null;
450
452
  const e = typeof t == "number" ? t : Number(t);
451
453
  return Number.isNaN(e) ? null : e;
@@ -460,7 +462,7 @@ function _e(t) {
460
462
  max: s,
461
463
  step: f,
462
464
  placeholder: u
463
- } = t, { t: c } = D("ui"), i = (e == null ? void 0 : e.type) ?? l ?? "equals", [p, y] = x(i), [C, T] = x((e == null ? void 0 : e.filter) ?? null), [b, v] = x(
465
+ } = t, { t: c } = L("ui"), i = (e == null ? void 0 : e.type) ?? l ?? "equals", [p, y] = x(i), [C, T] = x((e == null ? void 0 : e.filter) ?? null), [b, v] = x(
464
466
  (e == null ? void 0 : e.filterTo) ?? null
465
467
  );
466
468
  w(() => {
@@ -472,8 +474,8 @@ function _e(t) {
472
474
  }, [e, l]), A({
473
475
  doesFilterPass: (N) => {
474
476
  if (!e) return !0;
475
- const K = de(a(N.node));
476
- return ce(
477
+ const K = fe(a(N.node));
478
+ return de(
477
479
  e.type,
478
480
  K,
479
481
  e.filter ?? null,
@@ -482,14 +484,14 @@ function _e(t) {
482
484
  }
483
485
  });
484
486
  const m = z(
485
- () => ue.map((N) => ({
487
+ () => ce.map((N) => ({
486
488
  value: N,
487
489
  label: c(`dataTable.numberFilter.operators.${N}`)
488
490
  })),
489
491
  [c]
490
492
  ), d = u ?? c("dataTable.numberFilter.placeholder");
491
493
  function h() {
492
- if (!_(p)) {
494
+ if (!V(p)) {
493
495
  n({ type: p, filter: 0 });
494
496
  return;
495
497
  }
@@ -497,7 +499,7 @@ function _e(t) {
497
499
  n(null);
498
500
  return;
499
501
  }
500
- if (V(p)) {
502
+ if (_(p)) {
501
503
  n({
502
504
  type: p,
503
505
  filter: C,
@@ -510,15 +512,15 @@ function _e(t) {
510
512
  function g() {
511
513
  y(l ?? "equals"), T(null), v(null), n(null);
512
514
  }
513
- const S = _(p), F = V(p);
514
- return /* @__PURE__ */ O(
515
+ const S = V(p), F = _(p);
516
+ return /* @__PURE__ */ k(
515
517
  "div",
516
518
  {
517
519
  "data-component": "number-filter",
518
520
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
519
521
  children: [
520
522
  /* @__PURE__ */ o(
521
- W,
523
+ ee,
522
524
  {
523
525
  size: "sm",
524
526
  options: m,
@@ -542,7 +544,7 @@ function _e(t) {
542
544
  "aria-label": d
543
545
  }
544
546
  ),
545
- F && /* @__PURE__ */ O("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
547
+ F && /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
546
548
  /* @__PURE__ */ o(
547
549
  M,
548
550
  {
@@ -570,7 +572,7 @@ function _e(t) {
570
572
  }
571
573
  )
572
574
  ] }),
573
- /* @__PURE__ */ O("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
575
+ /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
574
576
  /* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: g, type: "button", children: c("dataTable.numberFilter.clear") }),
575
577
  /* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.numberFilter.apply") })
576
578
  ] })
@@ -578,9 +580,9 @@ function _e(t) {
578
580
  }
579
581
  );
580
582
  }
581
- function Ve(t) {
583
+ function $e(t) {
582
584
  var i, p;
583
- const { model: e, onModelChange: n, column: a } = t, { t: l } = D("ui"), r = ((p = (i = a == null ? void 0 : a.getColDef) == null ? void 0 : i.call(a)) == null ? void 0 : p.filterParams) ?? {}, s = r.defaultOperator ?? "equals", f = r.placeholder ?? l("dataTable.numberFilter.placeholder"), [u, c] = x((e == null ? void 0 : e.filter) ?? null);
585
+ const { model: e, onModelChange: n, column: a } = t, { t: l } = L("ui"), r = ((p = (i = a == null ? void 0 : a.getColDef) == null ? void 0 : i.call(a)) == null ? void 0 : p.filterParams) ?? {}, s = r.defaultOperator ?? "equals", f = r.placeholder ?? l("dataTable.numberFilter.placeholder"), [u, c] = x((e == null ? void 0 : e.filter) ?? null);
584
586
  return w(() => {
585
587
  c((e == null ? void 0 : e.filter) ?? null);
586
588
  }, [e == null ? void 0 : e.filter]), w(() => {
@@ -607,22 +609,22 @@ function Ve(t) {
607
609
  }
608
610
  ) });
609
611
  }
610
- function $e(t) {
612
+ function Ue(t) {
611
613
  const { value: e, variantMap: n } = t, a = (n == null ? void 0 : n[e]) ?? "neutral";
612
- return /* @__PURE__ */ o(ee, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
614
+ return /* @__PURE__ */ o(te, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
613
615
  }
614
- function Ue(t) {
616
+ function He(t) {
615
617
  const { value: e } = t;
616
- return e ? /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
618
+ return e ? /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
617
619
  /* @__PURE__ */ o(j, { name: e.name, src: e.src, size: "sm" }),
618
620
  /* @__PURE__ */ o("span", { children: e.name })
619
621
  ] }) : null;
620
622
  }
621
- const fe = {
623
+ const pe = {
622
624
  sm: "ds:size-8",
623
625
  md: "ds:size-10",
624
626
  lg: "ds:size-12"
625
- }, pe = {
627
+ }, me = {
626
628
  square: "ds:rounded-none",
627
629
  rounded: "ds:rounded-[var(--radius-md)]",
628
630
  circle: "ds:rounded-[var(--radius-full)]"
@@ -632,14 +634,14 @@ function q(t, e) {
632
634
  const n = t[e];
633
635
  return typeof n == "string" ? n : void 0;
634
636
  }
635
- const me = /^(?:https?:|data:image\/|\/(?!\/))/i;
636
- function ge(t) {
637
+ const ge = /^(?:https?:|data:image\/|\/(?!\/))/i;
638
+ function he(t) {
637
639
  if (!t) return;
638
640
  const e = t.trim();
639
641
  if (e.length !== 0)
640
- return me.test(e) ? e : void 0;
642
+ return ge.test(e) ? e : void 0;
641
643
  }
642
- function He(t) {
644
+ function Ye(t) {
643
645
  const {
644
646
  data: e,
645
647
  srcField: n,
@@ -649,7 +651,7 @@ function He(t) {
649
651
  shape: s = "rounded"
650
652
  } = t;
651
653
  if (!e) return null;
652
- const f = q(e, n), u = ge(f), c = a ? q(e, a) ?? "" : "", i = l ? q(e, l) : void 0;
654
+ const f = q(e, n), u = he(f), c = a ? q(e, a) ?? "" : "", i = l ? q(e, l) : void 0;
653
655
  return s === "circle" && i ? /* @__PURE__ */ o(j, { src: u, name: i, size: r }) : u ? /* @__PURE__ */ o(
654
656
  "img",
655
657
  {
@@ -657,19 +659,19 @@ function He(t) {
657
659
  alt: c,
658
660
  loading: "lazy",
659
661
  decoding: "async",
660
- className: ["ds:object-cover", fe[r], pe[s]].join(
662
+ className: ["ds:object-cover", pe[r], me[s]].join(
661
663
  " "
662
664
  )
663
665
  }
664
666
  ) : i ? /* @__PURE__ */ o(j, { name: i, size: r }) : null;
665
667
  }
666
- function Ye(t) {
667
- const { value: e, maxVisible: n = 3 } = t, { t: a } = D();
668
+ function Ge(t) {
669
+ const { value: e, maxVisible: n = 3 } = t, { t: a } = L();
668
670
  if (!Array.isArray(e) || e.length === 0) return null;
669
671
  const l = e.slice(0, n), r = e.length - n;
670
- return /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
672
+ return /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
671
673
  l.map((s) => /* @__PURE__ */ o(I, { label: s, size: "sm" }, s)),
672
- r > 0 && /* @__PURE__ */ o(te, { label: e.slice(n).join(", "), children: /* @__PURE__ */ o(
674
+ r > 0 && /* @__PURE__ */ o(ne, { label: e.slice(n).join(", "), children: /* @__PURE__ */ o(
673
675
  I,
674
676
  {
675
677
  label: a("inputs.multiSelect.overflow", { count: r }),
@@ -680,7 +682,7 @@ function Ye(t) {
680
682
  ) })
681
683
  ] });
682
684
  }
683
- const he = {
685
+ const ve = {
684
686
  date: { year: "numeric", month: "short", day: "numeric" },
685
687
  time: { hour: "2-digit", minute: "2-digit" },
686
688
  datetime: {
@@ -691,22 +693,29 @@ const he = {
691
693
  minute: "2-digit"
692
694
  }
693
695
  };
694
- function Ge(t) {
696
+ function Ze(t) {
695
697
  const { value: e, format: n = "date", options: a } = t;
696
- return e == null || e === "" ? null : n === "relative" && !a ? /* @__PURE__ */ o(B, { value: e, shape: "bare" }) : /* @__PURE__ */ o(
698
+ if (e == null || e === "") return null;
699
+ const l = re(e);
700
+ if (n === "relative" && !a) {
701
+ const s = l ? O(e) ?? e : e;
702
+ return /* @__PURE__ */ o(B, { value: s, shape: "bare" });
703
+ }
704
+ const r = a ?? ve[n === "relative" ? "date" : n];
705
+ return /* @__PURE__ */ o(
697
706
  B,
698
707
  {
699
708
  value: e,
700
709
  format: "absolute",
701
710
  shape: "bare",
702
- absoluteFormat: a ?? he[n === "relative" ? "date" : n]
711
+ absoluteFormat: l ? { ...r, timeZone: "UTC" } : r
703
712
  }
704
713
  );
705
714
  }
706
715
  function $(t, e) {
707
716
  return typeof t == "function" ? t(e) : t;
708
717
  }
709
- function ve(t) {
718
+ function be(t) {
710
719
  return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
711
720
  }
712
721
  function Ke(t) {
@@ -723,11 +732,11 @@ function Ke(t) {
723
732
  ].join(" "), i = (p) => {
724
733
  l && (s || p.preventDefault(), p.stopPropagation(), l(n));
725
734
  };
726
- return /* @__PURE__ */ O("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
735
+ return /* @__PURE__ */ k("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
727
736
  s ? /* @__PURE__ */ o(
728
737
  "a",
729
738
  {
730
- href: ve(s),
739
+ href: be(s),
731
740
  onClick: i,
732
741
  className: c,
733
742
  children: u
@@ -748,19 +757,20 @@ function Ke(t) {
748
757
  ] });
749
758
  }
750
759
  export {
751
- Ge as D,
752
- He as I,
760
+ Ze as D,
761
+ Ye as I,
753
762
  Ke as L,
754
763
  _e as N,
755
- qe as S,
756
- Ye as T,
757
- Ue as U,
758
- Me as a,
759
- Ae as b,
760
- Ve as c,
761
- je as d,
762
- $e as e,
763
- Ie as f,
764
- Be as g
764
+ je as S,
765
+ Ge as T,
766
+ He as U,
767
+ Ae as a,
768
+ qe as b,
769
+ $e as c,
770
+ Ie as d,
771
+ Ue as e,
772
+ Be as f,
773
+ Ve as g,
774
+ O as h
765
775
  };
766
- //# sourceMappingURL=link-cell-renderer-CIASXsVM.js.map
776
+ //# sourceMappingURL=link-cell-renderer-B-xrUPew.js.map