@hybr1d-tech/charizard 0.7.1 → 0.7.3
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.
- package/dist/hybr1d-ui.js +29 -28
- package/dist/hybr1d-ui.umd.cjs +2 -2
- package/dist/index.d.ts +3 -3
- package/package.json +2 -2
package/dist/hybr1d-ui.js
CHANGED
|
@@ -1996,7 +1996,7 @@ function hs({
|
|
|
1996
1996
|
positioning: { placement: (c == null ? void 0 : c.placement) || "bottom-end" }
|
|
1997
1997
|
})
|
|
1998
1998
|
), [x, b] = f.useState(!1);
|
|
1999
|
-
console.
|
|
1999
|
+
console.warn(x);
|
|
2000
2000
|
const C = f.useRef(null), v = f.useRef(null), y = oe.connect(p, _, w0), A = d == null ? void 0 : d.customMenuStyles, S = d == null ? void 0 : d.customButtonStyles;
|
|
2001
2001
|
f.useEffect(() => {
|
|
2002
2002
|
!u || !(i != null && i.setIsActive) || i.setIsActive(y.open);
|
|
@@ -7283,10 +7283,27 @@ const e4 = "_tabs_hb1nk_1", t4 = "_tabBar_hb1nk_9", n4 = "_tab_hb1nk_1", s4 = "_
|
|
|
7283
7283
|
detailValueAttachments: g4,
|
|
7284
7284
|
detailValueAttachment: v4,
|
|
7285
7285
|
attachmentName: f4
|
|
7286
|
-
}
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7286
|
+
};
|
|
7287
|
+
function b4(e) {
|
|
7288
|
+
switch (e) {
|
|
7289
|
+
case "Pending":
|
|
7290
|
+
return "pending";
|
|
7291
|
+
case "Cancelled":
|
|
7292
|
+
return "cancelled";
|
|
7293
|
+
case "Declined":
|
|
7294
|
+
return "declined";
|
|
7295
|
+
case "Pending second approval":
|
|
7296
|
+
return "pending_second_approval";
|
|
7297
|
+
case "Approved":
|
|
7298
|
+
return "approved";
|
|
7299
|
+
default:
|
|
7300
|
+
return console.warn(`Unknown status: ${e}`), "unknown";
|
|
7301
|
+
}
|
|
7302
|
+
}
|
|
7303
|
+
const x4 = "_box_1edp7_1", C4 = "_icon_1edp7_9", I4 = "_dot_1edp7_14", d2 = {
|
|
7304
|
+
box: x4,
|
|
7305
|
+
icon: C4,
|
|
7306
|
+
dot: I4
|
|
7290
7307
|
};
|
|
7291
7308
|
var q0 = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.NEUTRAL = "neutral", e.POSITIVE = "positive", e.WARNING = "warning", e.NEGATIVE = "negative", e.HIGHLIGHT = "highlight", e))(q0 || {}), y2 = /* @__PURE__ */ ((e) => (e.ICON = "icon", e.DOT = "dot", e.NONE = "none", e))(y2 || {});
|
|
7292
7309
|
function Dn({
|
|
@@ -7345,7 +7362,7 @@ const Be = {
|
|
|
7345
7362
|
highlight: { bg: "var(--status-info-i10)", color: "var(--status-info-i70)" },
|
|
7346
7363
|
warning: { bg: "var(--status-warning-w10)", color: "var(--status-warning-w70)" },
|
|
7347
7364
|
negative: { bg: "var(--status-error-e10)", color: "var(--status-error-e70)" }
|
|
7348
|
-
}, m2 = /* @__PURE__ */ new Map(),
|
|
7365
|
+
}, m2 = /* @__PURE__ */ new Map(), _4 = (e) => {
|
|
7349
7366
|
if (m2.has(e))
|
|
7350
7367
|
return m2.get(e);
|
|
7351
7368
|
let t = 0;
|
|
@@ -7355,23 +7372,7 @@ const Be = {
|
|
|
7355
7372
|
}
|
|
7356
7373
|
const a = Math.abs(t) % 360, o = Math.abs(t * 2) % 100, s = Math.min(Math.abs(t * 3) % 50 + 50, 80), l = `hsl(${a}, ${o}%, ${s - 20}%)`, i = `hsl(${a}, ${o}%, ${s + 20}%)`, c = { darkerColor: l, lighterColor: i };
|
|
7357
7374
|
return m2.set(e, c), c;
|
|
7358
|
-
},
|
|
7359
|
-
function A4(e) {
|
|
7360
|
-
switch (e) {
|
|
7361
|
-
case "Pending":
|
|
7362
|
-
return "pending";
|
|
7363
|
-
case "Cancelled":
|
|
7364
|
-
return "cancelled";
|
|
7365
|
-
case "Declined":
|
|
7366
|
-
return "declined";
|
|
7367
|
-
case "Pending second approval":
|
|
7368
|
-
return "pending_second_approver";
|
|
7369
|
-
case "Approved":
|
|
7370
|
-
return "approved";
|
|
7371
|
-
default:
|
|
7372
|
-
return console.warn(`Unknown status: ${e}`), "unknown";
|
|
7373
|
-
}
|
|
7374
|
-
}
|
|
7375
|
+
}, y4 = (e) => typeof e == "object" && e !== null ? !Array.isArray(e) : !1, A4 = (e) => typeof e == "string";
|
|
7375
7376
|
function w4({ data: e, menuItems: t }) {
|
|
7376
7377
|
var a;
|
|
7377
7378
|
return /* @__PURE__ */ n.jsxs("div", { className: J0.card, children: [
|
|
@@ -7396,16 +7397,16 @@ function w4({ data: e, menuItems: t }) {
|
|
|
7396
7397
|
Array.isArray(o.value) && o.value.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: J0.detailValueAttachments, children: (l = o.value) == null ? void 0 : l.map((i, c) => /* @__PURE__ */ n.jsxs("div", { className: J0.detailValueAttachment, children: [
|
|
7397
7398
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("img", { src: i.details.icon, width: 20, alt: `${i.details.type}` }) }),
|
|
7398
7399
|
/* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx("a", { href: i.doc_link, target: "_blank", className: J0.attachmentName, children: i.file_name }) })
|
|
7399
|
-
] }, c)) }) : o.value &&
|
|
7400
|
+
] }, c)) }) : o.value && y4(o.value) && Object.keys(o.value).length ? /* @__PURE__ */ n.jsx(
|
|
7400
7401
|
K3,
|
|
7401
7402
|
{
|
|
7402
7403
|
username: oo(o.value),
|
|
7403
7404
|
profileImgUrl: o.value.profile_img_url
|
|
7404
7405
|
}
|
|
7405
|
-
) :
|
|
7406
|
+
) : A4(o.value) ? /* @__PURE__ */ n.jsx("div", { className: I(J0.detailValue, "zap-subcontent-medium"), children: o.value }) : /* @__PURE__ */ n.jsx("div", { className: I(J0.detailValueNA, "zap-subcontent-medium"), children: "N/A" })
|
|
7406
7407
|
] }, s);
|
|
7407
7408
|
}) }),
|
|
7408
|
-
/* @__PURE__ */ n.jsx("div", { className: J0.statusSection, children: /* @__PURE__ */ n.jsx(Dn, { highlight: y2.DOT, status: j4[
|
|
7409
|
+
/* @__PURE__ */ n.jsx("div", { className: J0.statusSection, children: /* @__PURE__ */ n.jsx(Dn, { highlight: y2.DOT, status: j4[b4(e.status)], children: e.status }) }),
|
|
7409
7410
|
/* @__PURE__ */ n.jsx("div", { className: J0.actionSection, children: !!(t != null && t.length) && /* @__PURE__ */ n.jsx(
|
|
7410
7411
|
ae.ActionsDropdown,
|
|
7411
7412
|
{
|
|
@@ -7427,7 +7428,7 @@ const N4 = {
|
|
|
7427
7428
|
}, j4 = {
|
|
7428
7429
|
pending: q0.WARNING,
|
|
7429
7430
|
declined: q0.NEGATIVE,
|
|
7430
|
-
|
|
7431
|
+
pending_second_approval: q0.WARNING,
|
|
7431
7432
|
cancelled: q0.NEUTRAL,
|
|
7432
7433
|
approved: q0.POSITIVE,
|
|
7433
7434
|
pending_cancellation: q0.WARNING
|
|
@@ -9395,7 +9396,7 @@ const fo = {
|
|
|
9395
9396
|
errorMsg: Ph
|
|
9396
9397
|
};
|
|
9397
9398
|
function bo(e) {
|
|
9398
|
-
return f.useMemo(() =>
|
|
9399
|
+
return f.useMemo(() => _4(e), [e]);
|
|
9399
9400
|
}
|
|
9400
9401
|
var k0 = /* @__PURE__ */ ((e) => (e.DEFAULT = "default", e.USERS = "users", e.CHECKBOX = "checkbox", e.TAGS = "tags", e))(k0 || {});
|
|
9401
9402
|
function z2({ src: e, alt: t, className: a, ...o }) {
|