@lax-wp/design-system 0.14.48 → 0.14.50

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,165 +1,178 @@
1
- import { jsxs as i, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as Ne, useState as w, useRef as ke, useEffect as Se } from "react";
3
- import d from "../../../_virtual/index.es.js";
4
- import { HelpIcon as Le } from "../../icons/HelpIcon.es.js";
5
- import { SearchIcon as Ie } from "../../icons/SearchIcon.es.js";
6
- import { Typography as L } from "../typography/Typography.es.js";
7
- import { decodeHTMLEntities as Te, formatCurrency as I, formatBooleanValue as K, formatDate as C, isISODateString as ze } from "../../../utils/formatters.es.js";
1
+ import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as Ie, useState as w, useRef as Ee, useEffect as _e } from "react";
3
+ import p from "../../../_virtual/index.es.js";
4
+ import { HelpIcon as ze } from "../../icons/HelpIcon.es.js";
5
+ import { SearchIcon as De } from "../../icons/SearchIcon.es.js";
6
+ import { Typography as E } from "../typography/Typography.es.js";
7
+ import { decodeHTMLEntities as Me, formatCurrency as _, formatBooleanValue as q, formatDate as N, isISODateString as Re } from "../../../utils/formatters.es.js";
8
8
  import { CURRENCIES as $e } from "../../forms/currency-input/currency.constant.es.js";
9
- import { Label as Me } from "../label/Label.es.js";
10
- import { motion as _e } from "framer-motion";
11
- import { BoltOutlined as De, ArrowUpwardRounded as Ee, ArrowDownwardRounded as je, OpenInNew as Re } from "@mui/icons-material";
12
- import N from "../../tooltip/Tooltip.es.js";
9
+ import { Label as Ae } from "../label/Label.es.js";
10
+ import { motion as je } from "framer-motion";
11
+ import { BoltOutlined as Oe, ArrowUpwardRounded as Ue, ArrowDownwardRounded as Be, OpenInNew as Pe } from "@mui/icons-material";
12
+ import T from "../../tooltip/Tooltip.es.js";
13
13
  import { AIExtractedIndicator as He } from "../../icons/AIExtractedIndicator.es.js";
14
14
  import { AIStarIcon as Ze } from "../../icons/AIStarIcon.es.js";
15
- import { shouldShowConfidenceScore as Oe, getConfidenceScoreBadgeFill as Be, getConfidenceScoreBadgeColor as Fe, getConfidenceScoreBadgeHoverClass as Ue } from "../../../utils/confidenceScoreUtils.es.js";
16
- import P from "dayjs";
17
- import { ContentCopyIcon as Ae, CheckFilledIcon as Ke } from "../../icon/icons.generated.es.js";
18
- const Pe = Ne(
15
+ import { APP_DATA_TYPES as m } from "../datatype-icon/DataTypeIcon.es.js";
16
+ import { LabelValueDataTypeIcon as Ye } from "../datatype-icon/LabelValueDataTypeIcon.es.js";
17
+ import { shouldShowConfidenceScore as Fe, getConfidenceScoreBadgeFill as Ke, getConfidenceScoreBadgeColor as Ge, getConfidenceScoreBadgeHoverClass as qe } from "../../../utils/confidenceScoreUtils.es.js";
18
+ import J from "dayjs";
19
+ import { ContentCopyIcon as Je, CheckFilledIcon as Qe } from "../../icon/icons.generated.es.js";
20
+ const We = {
21
+ string: { dataType: m.STRING },
22
+ number: { dataType: m.NUMBER },
23
+ boolean: { dataType: m.BOOLEAN },
24
+ currency: { dataType: m.CURRENCY },
25
+ date: { dataType: m.DATE },
26
+ datetime: { dataType: m.DATETIME },
27
+ percentage: { dataType: m.NUMBER, label: "Percentage" },
28
+ url: { dataType: m.STRING, label: "URL" }
29
+ }, Xe = Ie(
19
30
  ({
20
- id: Y,
31
+ id: Q,
21
32
  label: l,
22
33
  value: e,
23
- className: q,
34
+ className: W,
24
35
  type: o = "string",
25
- tags: G,
26
- tooltip: T,
36
+ tags: X,
37
+ tooltip: z,
27
38
  items: s,
28
- isModified: J = !1,
29
- isChanged: Q = !1,
30
- size: W = "medium",
31
- isHighlighted: X = !1,
39
+ isModified: v = !1,
40
+ isChanged: V = !1,
41
+ size: k = "medium",
42
+ isHighlighted: ee = !1,
32
43
  deletedValue: n,
33
- highlightColor: v = "warning",
34
- isSearchActive: V = !1,
35
- originalValue: z = !1,
36
- showDiff: $ = !1,
37
- isLiveField: ee = !1,
38
- isAiExtracted: re = !1,
39
- confidenceScore: te,
40
- confidenceType: y = "high",
41
- confidenceTooltip: oe,
42
- sourceMeta: ae = [],
43
- onConfidenceScoreClick: ne,
44
- deltaChange: p,
45
- theme: Ye = "light",
46
- onUpload: M,
47
- acceptsUpload: se = !1,
48
- MasterDataModal: _,
49
- riskDetails: f,
50
- isRiskAnalysisOpen: D = !1,
51
- RiskDetailsCard: E,
52
- "aria-label": ie,
53
- decodeEntities: ce = !0,
54
- onAiExtractedIndicatorClick: le,
55
- copyOnHover: me = !1,
56
- urlAlias: j,
57
- allowTimezoneConversion: de = !1
58
- }, pe) => {
59
- const [c, fe] = w(!0), [ue, R] = w(!1), [he, H] = w(null), [Z, k] = w(!1), [x, O] = w(!1), g = ke(null);
60
- Se(() => () => {
44
+ highlightColor: re = "warning",
45
+ isSearchActive: te = !1,
46
+ originalValue: D = !1,
47
+ showDiff: M = !1,
48
+ isLiveField: oe = !1,
49
+ isAiExtracted: ae = !1,
50
+ confidenceScore: ne,
51
+ confidenceType: b = "high",
52
+ confidenceTooltip: se,
53
+ sourceMeta: ie = [],
54
+ onConfidenceScoreClick: ce,
55
+ deltaChange: f,
56
+ theme: ve = "light",
57
+ onUpload: R,
58
+ acceptsUpload: le = !1,
59
+ MasterDataModal: $,
60
+ riskDetails: u,
61
+ isRiskAnalysisOpen: A = !1,
62
+ RiskDetailsCard: j,
63
+ "aria-label": de,
64
+ decodeEntities: me = !0,
65
+ onAiExtractedIndicatorClick: pe,
66
+ copyOnHover: fe = !1,
67
+ urlAlias: O,
68
+ showTypeIcon: ue = !1,
69
+ dataType: U,
70
+ allowTimezoneConversion: he = !1
71
+ }, ye) => {
72
+ const [c, ge] = w(!0), [we, B] = w(!1), [be, P] = w(null), [H, S] = w(!1), [x, Z] = w(!1), g = Ee(null);
73
+ _e(() => () => {
61
74
  g.current && clearTimeout(g.current);
62
75
  }, []);
63
- const m = (r) => ce ? Te(r) : r, u = 100, B = () => {
64
- fe(!c);
65
- }, S = () => /* @__PURE__ */ t(
76
+ const d = (t) => me ? Me(t) : t, h = 100, L = U ? { dataType: U } : We[String(o).toLowerCase()], xe = k === "small" ? 14 : k === "large" ? 18 : 16, Y = () => {
77
+ ge(!c);
78
+ }, I = () => /* @__PURE__ */ r(
66
79
  "button",
67
80
  {
68
81
  id: `btn-label-value-${c ? "Show more" : "Show less"}`,
69
82
  className: "text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",
70
- onClick: B,
71
- onKeyDown: (r) => {
72
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), B());
83
+ onClick: Y,
84
+ onKeyDown: (t) => {
85
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), Y());
73
86
  },
74
87
  "aria-label": c ? "Show more content" : "Show less content",
75
88
  type: "button",
76
89
  children: c ? "Show more" : "Show less"
77
90
  }
78
- ), F = (r) => {
79
- if (j)
91
+ ), F = (t) => {
92
+ if (O)
80
93
  return /* @__PURE__ */ i(
81
94
  "a",
82
95
  {
83
- href: r,
96
+ href: t,
84
97
  target: "_blank",
85
98
  rel: "noopener noreferrer",
86
99
  className: "inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
87
100
  children: [
88
- j,
89
- /* @__PURE__ */ t(Re, { sx: { fontSize: 16 }, className: "text-primary-600 dark:text-primary-400" })
101
+ O,
102
+ /* @__PURE__ */ r(Pe, { sx: { fontSize: 16 }, className: "text-primary-600 dark:text-primary-400" })
90
103
  ]
91
104
  }
92
105
  );
93
- const a = m(r);
94
- return a.length <= u ? /* @__PURE__ */ t("a", { href: r, className: "text-primary-600 truncate", children: a }) : /* @__PURE__ */ i("p", { children: [
95
- /* @__PURE__ */ t("a", { href: r, className: "text-primary-600 break-all", children: a.slice(0, c ? u : a.length) }),
106
+ const a = d(t);
107
+ return a.length <= h ? /* @__PURE__ */ r("a", { href: t, className: "text-primary-600 truncate", children: a }) : /* @__PURE__ */ i("p", { children: [
108
+ /* @__PURE__ */ r("a", { href: t, className: "text-primary-600 break-all", children: a.slice(0, c ? h : a.length) }),
96
109
  c ? "... " : " ",
97
- S()
110
+ I()
98
111
  ] });
99
- }, U = (r) => {
100
- R(!0), H({ ...r, value: e });
101
- }, ge = () => {
102
- R(!1), H(null);
103
- }, we = () => {
104
- const r = e == null || typeof e == "object" ? "" : String(e);
105
- r && navigator.clipboard?.writeText(r).then(() => {
106
- O(!0), g.current && clearTimeout(g.current), g.current = setTimeout(() => O(!1), 1500);
112
+ }, K = (t) => {
113
+ B(!0), P({ ...t, value: e });
114
+ }, Ce = () => {
115
+ B(!1), P(null);
116
+ }, Ne = () => {
117
+ const t = e == null || typeof e == "object" ? "" : String(e);
118
+ t && navigator.clipboard?.writeText(t).then(() => {
119
+ Z(!0), g.current && clearTimeout(g.current), g.current = setTimeout(() => Z(!1), 1500);
107
120
  }).catch(() => {
108
121
  });
109
- }, ye = (r) => {
110
- const a = r.target.files?.[0];
111
- a && M && M(a), r.target.value = "";
112
- }, b = () => {
113
- const r = typeof e == "string" && ze(e);
114
- if (V && typeof e == "object")
122
+ }, Te = (t) => {
123
+ const a = t.target.files?.[0];
124
+ a && R && R(a), t.target.value = "";
125
+ }, C = () => {
126
+ const t = typeof e == "string" && Re(e);
127
+ if (te && typeof e == "object")
115
128
  return e;
116
129
  if (e || o?.toLowerCase() === "boolean" && e === 0 || o?.toLowerCase() === "currency" && Number(e) >= 0) {
117
- if ((e === !0 || e === "True") && !z && o?.toLowerCase() !== "choice")
130
+ if ((e === !0 || e === "True") && !D && o?.toLowerCase() !== "choice")
118
131
  return "Yes";
119
- if ((e === !1 || e === "False") && !z && o?.toLowerCase() !== "choice")
132
+ if ((e === !1 || e === "False") && !D && o?.toLowerCase() !== "choice")
120
133
  return "No";
121
134
  if (o?.toLowerCase() === "url")
122
135
  return F(e);
123
136
  if (o?.toLowerCase() === "boolean")
124
- return K(e);
137
+ return q(e);
125
138
  if (o?.toLowerCase() === "currency") {
126
- const a = I(e, s?.currency_code) || "-", h = s?.currency_code ? $e.find((Ce) => Ce.value === s.currency_code)?.label : void 0, be = h ? `${s.currency_code} — ${h}` : s?.currency_code ?? "";
127
- return h ? /* @__PURE__ */ t(N, { title: be, placement: "top", children: /* @__PURE__ */ t("span", { children: a }) }) : a;
139
+ const a = _(e, s?.currency_code) || "-", y = s?.currency_code ? $e.find((Le) => Le.value === s.currency_code)?.label : void 0, Se = y ? `${s.currency_code} — ${y}` : s?.currency_code ?? "";
140
+ return y ? /* @__PURE__ */ r(T, { title: Se, placement: "top", children: /* @__PURE__ */ r("span", { children: a }) }) : a;
128
141
  } else if (o?.toLowerCase() === "datetime") {
129
142
  const a = typeof e == "string" && e.includes("Z") ? e.replace(/\.000Z$/, "Z") : e;
130
- return C(a, {
131
- skipTimezone: !de,
143
+ return N(a, {
144
+ skipTimezone: !he,
132
145
  withTime: !0
133
146
  });
134
- } else if (o?.toLowerCase() === "date" || r) {
147
+ } else if (o?.toLowerCase() === "date" || t) {
135
148
  let a = e;
136
149
  if (typeof e == "string" && e.includes("Z"))
137
150
  a = e.replace(/\.000Z$/, "Z");
138
151
  else if (typeof e == "string" && !e.includes("Z")) {
139
- const h = P(e);
140
- a = P(h).isValid() ? h.toString() : e;
152
+ const y = J(e);
153
+ a = J(y).isValid() ? y.toString() : e;
141
154
  }
142
- return C(a, {
155
+ return N(a, {
143
156
  skipTimezone: !0,
144
157
  withTime: !1
145
158
  });
146
159
  } else {
147
160
  if (o?.toLowerCase() === "percentage")
148
161
  return `${e}%`;
149
- if (typeof e == "string" && e.length > u) {
150
- const a = m(e);
162
+ if (typeof e == "string" && e.length > h) {
163
+ const a = d(e);
151
164
  return /* @__PURE__ */ i("p", { children: [
152
- a.slice(0, c ? u : a.length),
165
+ a.slice(0, c ? h : a.length),
153
166
  c ? "... " : " ",
154
- S()
167
+ I()
155
168
  ] });
156
169
  } else
157
- return typeof e == "string" ? m(e) : e;
170
+ return typeof e == "string" ? d(e) : e;
158
171
  }
159
172
  }
160
173
  return "-";
161
- }, A = () => {
162
- switch (W) {
174
+ }, G = () => {
175
+ switch (k) {
163
176
  case "small":
164
177
  return "extra-small";
165
178
  case "large":
@@ -167,8 +180,8 @@ const Pe = Ne(
167
180
  default:
168
181
  return "small";
169
182
  }
170
- }, xe = () => {
171
- switch (v) {
183
+ }, ke = () => {
184
+ switch (re) {
172
185
  case "success":
173
186
  return "bg-success-100";
174
187
  case "warning":
@@ -184,94 +197,95 @@ const Pe = Ne(
184
197
  return /* @__PURE__ */ i(
185
198
  "div",
186
199
  {
187
- id: Y || "",
188
- ref: pe,
189
- className: d(
200
+ id: Q || "",
201
+ ref: ye,
202
+ className: p(
190
203
  "font-medium relative",
191
- q
204
+ W
192
205
  ),
193
- onMouseEnter: () => k(!0),
194
- onMouseLeave: () => k(!1),
195
- "aria-label": ie || `Label: ${l}, Value: ${e}`,
206
+ onMouseEnter: () => S(!0),
207
+ onMouseLeave: () => S(!1),
208
+ "aria-label": de || `Label: ${l}, Value: ${e}`,
196
209
  children: [
197
210
  /* @__PURE__ */ i(
198
- L,
211
+ E,
199
212
  {
200
213
  variant: "medium",
201
- size: A(),
214
+ size: G(),
202
215
  className: "flex gap-1 items-center flex-wrap",
203
216
  appearance: "subtitle",
204
217
  children: [
205
- typeof l == "string" ? m(l) : l,
218
+ ue && L && /* @__PURE__ */ r(Ye, { dataType: L.dataType, tooltip: L.label, size: xe }),
219
+ typeof l == "string" ? d(l) : l,
206
220
  " ",
207
- /* @__PURE__ */ t(Me, { labels: G?.map((r) => ({ ...r, color: r.color || "primary" })) }),
208
- ee && /* @__PURE__ */ t(De, { sx: { fontSize: 16, color: "var(--color-primary-600)", rotate: "15deg" } }),
209
- re && (Oe(te) && y ? /* @__PURE__ */ t(
210
- N,
221
+ /* @__PURE__ */ r(Ae, { labels: X?.map((t) => ({ ...t, color: t.color || "primary" })) }),
222
+ oe && /* @__PURE__ */ r(Oe, { sx: { fontSize: 16, color: "var(--color-primary-600)", rotate: "15deg" } }),
223
+ ae && (Fe(ne) && b ? /* @__PURE__ */ r(
224
+ T,
211
225
  {
212
226
  placement: "top",
213
- title: oe || "",
227
+ title: se || "",
214
228
  className: "cursor-pointer",
215
- children: /* @__PURE__ */ t(
229
+ children: /* @__PURE__ */ r(
216
230
  "div",
217
231
  {
218
- className: d("cursor-pointer w-3 h-3 flex items-center justify-center rounded-full", Ue(y)),
219
- onClick: () => ne?.(ae),
220
- children: /* @__PURE__ */ t(
232
+ className: p("cursor-pointer w-3 h-3 flex items-center justify-center rounded-full", qe(b)),
233
+ onClick: () => ce?.(ie),
234
+ children: /* @__PURE__ */ r(
221
235
  Ze,
222
236
  {
223
237
  size: 12,
224
- fill: Fe(y),
225
- fillSecondary: Be(y)
238
+ fill: Ge(b),
239
+ fillSecondary: Ke(b)
226
240
  }
227
241
  )
228
242
  }
229
243
  )
230
244
  }
231
- ) : /* @__PURE__ */ t(He, { onClick: () => le?.(b()) })),
232
- T && /* @__PURE__ */ t(
233
- N,
245
+ ) : /* @__PURE__ */ r(He, { onClick: () => pe?.(C()) })),
246
+ z && /* @__PURE__ */ r(
247
+ T,
234
248
  {
235
249
  placement: "top",
236
- title: T,
250
+ title: z,
237
251
  whiteSpace: "pre-wrap",
238
- children: /* @__PURE__ */ t(
252
+ children: /* @__PURE__ */ r(
239
253
  "div",
240
254
  {
241
255
  className: "cursor-pointer",
242
256
  role: "button",
243
257
  tabIndex: 0,
244
- onKeyDown: (r) => {
245
- (r.key === "Enter" || r.key === " ") && r.preventDefault();
258
+ onKeyDown: (t) => {
259
+ (t.key === "Enter" || t.key === " ") && t.preventDefault();
246
260
  },
247
- children: /* @__PURE__ */ t(Le, { size: 14 })
261
+ children: /* @__PURE__ */ r(ze, { size: 14 })
248
262
  }
249
263
  )
250
264
  }
251
265
  ),
252
- me && Z && /* @__PURE__ */ t(N, { title: x ? "Copied" : `Copy ${l ?? "value"}`, placement: "top", whiteSpace: "pre-wrap", children: /* @__PURE__ */ t(
266
+ fe && H && /* @__PURE__ */ r(T, { title: x ? "Copied" : `Copy ${l ?? "value"}`, placement: "top", whiteSpace: "pre-wrap", children: /* @__PURE__ */ r(
253
267
  "button",
254
268
  {
255
269
  type: "button",
256
- onClick: we,
270
+ onClick: Ne,
257
271
  "aria-label": x ? `Copied ${l ?? "value"}` : `Copy ${l ?? "value"}`,
258
272
  className: "p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer",
259
273
  children: /* @__PURE__ */ i("span", { className: "relative inline-flex h-4 w-4 items-center justify-center", children: [
260
- /* @__PURE__ */ t(
261
- Ae,
274
+ /* @__PURE__ */ r(
275
+ Je,
262
276
  {
263
277
  size: 16,
264
- className: d(
278
+ className: p(
265
279
  "absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out",
266
280
  x ? "opacity-0 scale-50 rotate-[-90deg]" : "opacity-100 scale-100 rotate-0"
267
281
  )
268
282
  }
269
283
  ),
270
- /* @__PURE__ */ t(
271
- Ke,
284
+ /* @__PURE__ */ r(
285
+ Qe,
272
286
  {
273
287
  size: 16,
274
- className: d(
288
+ className: p(
275
289
  "absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out",
276
290
  x ? "opacity-100 scale-100 rotate-0" : "opacity-0 scale-50 rotate-90"
277
291
  )
@@ -284,55 +298,55 @@ const Pe = Ne(
284
298
  }
285
299
  ),
286
300
  /* @__PURE__ */ i(
287
- L,
301
+ E,
288
302
  {
289
303
  variant: "medium",
290
- size: A(),
291
- className: d(
304
+ size: G(),
305
+ className: p(
292
306
  "text-- whitespace-normal break-all flex gap-1 pt-0.5",
293
- J && "bg-neutral-50 dark:bg-black-700 p-1 rounded",
294
- D && f?.color && `bg-${f.color}-50 border-${f.color}-300 px-0.5 rounded-lg`
307
+ v && "bg-neutral-50 dark:bg-black-700 p-1 rounded",
308
+ A && u?.color && `bg-${u.color}-50 border-${u.color}-300 px-0.5 rounded-lg`
295
309
  ),
296
310
  appearance: "body",
297
311
  children: [
298
- $ && n && e ? /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
299
- /* @__PURE__ */ t("span", { className: "line-through", children: m(n) }),
300
- /* @__PURE__ */ t("span", { children: b() })
301
- ] }) : Q || X ? /* @__PURE__ */ t("mark", { className: d("rounded-md py-0.5 px-1", xe()), children: b() }) : b(),
302
- o?.toLowerCase() === "currency" && p !== 0 && p !== void 0 && p !== null && /* @__PURE__ */ i(
303
- _e.span,
312
+ M && n && e ? /* @__PURE__ */ i("div", { className: "flex gap-2", children: [
313
+ /* @__PURE__ */ r("span", { className: "line-through", children: d(n) }),
314
+ /* @__PURE__ */ r("span", { children: C() })
315
+ ] }) : V || ee ? /* @__PURE__ */ r("mark", { className: p("rounded-md py-0.5 px-1", ke()), children: C() }) : C(),
316
+ o?.toLowerCase() === "currency" && f !== 0 && f !== void 0 && f !== null && /* @__PURE__ */ i(
317
+ je.span,
304
318
  {
305
319
  initial: { opacity: 0, y: 2 },
306
320
  animate: { opacity: 1, y: 0 },
307
321
  transition: { duration: 0.25 },
308
- className: d(
322
+ className: p(
309
323
  "inline-flex items-center gap-1 ml-1.5 text-xs font-medium",
310
- p > 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400"
324
+ f > 0 ? "text-emerald-600 dark:text-emerald-400" : "text-red-600 dark:text-red-400"
311
325
  ),
312
326
  children: [
313
- /* @__PURE__ */ t("span", { className: "flex items-center justify-center w-4 h-4", children: p > 0 ? /* @__PURE__ */ t(Ee, { sx: { fontSize: 16 }, className: "text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ t(je, { sx: { fontSize: 16 }, className: "text-red-600 dark:text-red-400" }) }),
314
- /* @__PURE__ */ t("span", { children: I(Math.abs(p), s?.currency_code || "USD") })
327
+ /* @__PURE__ */ r("span", { className: "flex items-center justify-center w-4 h-4", children: f > 0 ? /* @__PURE__ */ r(Ue, { sx: { fontSize: 16 }, className: "text-emerald-600 dark:text-emerald-400" }) : /* @__PURE__ */ r(Be, { sx: { fontSize: 16 }, className: "text-red-600 dark:text-red-400" }) }),
328
+ /* @__PURE__ */ r("span", { children: _(Math.abs(f), s?.currency_code || "USD") })
315
329
  ]
316
330
  }
317
331
  ),
318
- s?.is_master_data && s?.reference && e && /* @__PURE__ */ t(
332
+ s?.is_master_data && s?.reference && e && /* @__PURE__ */ r(
319
333
  "button",
320
334
  {
321
- onClick: () => U(s),
322
- onKeyDown: (r) => {
323
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), U(s));
335
+ onClick: () => K(s),
336
+ onKeyDown: (t) => {
337
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), K(s));
324
338
  },
325
339
  "aria-label": `Search master data for ${l}`,
326
340
  type: "button",
327
341
  className: "cursor-pointer",
328
- children: /* @__PURE__ */ t(Ie, { width: 20, height: 20 })
342
+ children: /* @__PURE__ */ r(De, { width: 20, height: 20 })
329
343
  }
330
344
  ),
331
- se && /* @__PURE__ */ t(
345
+ le && /* @__PURE__ */ r(
332
346
  "input",
333
347
  {
334
348
  type: "file",
335
- onChange: ye,
349
+ onChange: Te,
336
350
  className: "absolute inset-0 w-full h-full opacity-0 cursor-pointer",
337
351
  "aria-label": `Upload file for ${l}`
338
352
  }
@@ -340,49 +354,49 @@ const Pe = Ne(
340
354
  ]
341
355
  }
342
356
  ),
343
- n && !$ && /* @__PURE__ */ t(
344
- L,
357
+ n && !M && /* @__PURE__ */ r(
358
+ E,
345
359
  {
346
360
  variant: "medium",
347
361
  size: "extra-small",
348
362
  className: "pt-0.5",
349
363
  appearance: "body",
350
- children: /* @__PURE__ */ t("mark", { className: "rounded-md py-0.5 px-1 bg-error-100", children: /* @__PURE__ */ t("del", { children: n || o?.toLowerCase() === "boolean" && n === "0" ? n === "True" && o?.toLowerCase() !== "choice" ? "Yes" : n === "False" && o?.toLowerCase() !== "choice" ? "No" : o?.toLowerCase() === "boolean" ? K(n) : o?.toLowerCase() === "currency" ? I(n, s?.currency_code) : o?.toLowerCase() === "date" ? C(n, {
364
+ children: /* @__PURE__ */ r("mark", { className: "rounded-md py-0.5 px-1 bg-error-100", children: /* @__PURE__ */ r("del", { children: n || o?.toLowerCase() === "boolean" && n === "0" ? n === "True" && o?.toLowerCase() !== "choice" ? "Yes" : n === "False" && o?.toLowerCase() !== "choice" ? "No" : o?.toLowerCase() === "boolean" ? q(n) : o?.toLowerCase() === "currency" ? _(n, s?.currency_code) : o?.toLowerCase() === "date" ? N(n, {
351
365
  skipTimezone: !0,
352
366
  withTime: !1
353
- }) : o?.toLowerCase() === "datetime" ? C(n, {
367
+ }) : o?.toLowerCase() === "datetime" ? N(n, {
354
368
  skipTimezone: !0,
355
369
  withTime: !0
356
- }) : o?.toLowerCase() === "percentage" ? `${n}%` : o?.toLowerCase() === "url" ? F(n) : n.length > u ? /* @__PURE__ */ i("p", { children: [
357
- m(n).slice(0, c ? u : m(n).length),
370
+ }) : o?.toLowerCase() === "percentage" ? `${n}%` : o?.toLowerCase() === "url" ? F(n) : n.length > h ? /* @__PURE__ */ i("p", { children: [
371
+ d(n).slice(0, c ? h : d(n).length),
358
372
  c ? "... " : " ",
359
- S()
360
- ] }) : m(n) : "-" }) })
373
+ I()
374
+ ] }) : d(n) : "-" }) })
361
375
  }
362
376
  ),
363
- _ && /* @__PURE__ */ t(
364
- _,
377
+ $ && /* @__PURE__ */ r(
378
+ $,
365
379
  {
366
- isVisible: ue,
367
- onClose: ge,
368
- masterdataInfo: he
380
+ isVisible: we,
381
+ onClose: Ce,
382
+ masterdataInfo: be
369
383
  }
370
384
  ),
371
- Z && f && D && /* @__PURE__ */ t(
385
+ H && u && A && /* @__PURE__ */ r(
372
386
  "div",
373
387
  {
374
388
  className: "absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",
375
- onClick: (r) => r.stopPropagation(),
376
- onMouseDown: (r) => r.preventDefault(),
377
- onKeyDown: (r) => {
378
- r.key === "Escape" && k(!1);
389
+ onClick: (t) => t.stopPropagation(),
390
+ onMouseDown: (t) => t.preventDefault(),
391
+ onKeyDown: (t) => {
392
+ t.key === "Escape" && S(!1);
379
393
  },
380
394
  role: "tooltip",
381
395
  "aria-label": "Risk analysis details",
382
396
  tabIndex: 0,
383
- children: E ? /* @__PURE__ */ t(E, { riskDetails: f }) : /* @__PURE__ */ t("div", { className: "shadow-lg p-4", children: /* @__PURE__ */ i("div", { className: "text-sm", children: [
384
- /* @__PURE__ */ t("h4", { className: "font-semibold mb-2", children: "Risk Details" }),
385
- /* @__PURE__ */ t("p", { className: "text-neutral-600 dark:text-neutral-300", children: f.description || "Risk analysis information" })
397
+ children: j ? /* @__PURE__ */ r(j, { riskDetails: u }) : /* @__PURE__ */ r("div", { className: "shadow-lg p-4", children: /* @__PURE__ */ i("div", { className: "text-sm", children: [
398
+ /* @__PURE__ */ r("h4", { className: "font-semibold mb-2", children: "Risk Details" }),
399
+ /* @__PURE__ */ r("p", { className: "text-neutral-600 dark:text-neutral-300", children: u.description || "Risk analysis information" })
386
400
  ] }) })
387
401
  }
388
402
  )
@@ -391,8 +405,8 @@ const Pe = Ne(
391
405
  );
392
406
  }
393
407
  );
394
- Pe.displayName = "LabelValue";
408
+ Xe.displayName = "LabelValue";
395
409
  export {
396
- Pe as LabelValue
410
+ Xe as LabelValue
397
411
  };
398
412
  //# sourceMappingURL=LabelValue.es.js.map