@ctlyst.id/internal-ui 5.6.7 → 5.6.8
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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +39 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5258,6 +5258,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5258
5258
|
const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
|
|
5259
5259
|
return /* @__PURE__ */ jsxs26(Fragment9, { children: [
|
|
5260
5260
|
/* @__PURE__ */ jsx62(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
|
|
5261
|
+
var _a, _b;
|
|
5261
5262
|
const activeOption = isOpen ? "primary.50" : "white";
|
|
5262
5263
|
const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
|
|
5263
5264
|
const activeParent = isActive ? backgroundColor : activeOption;
|
|
@@ -5279,6 +5280,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5279
5280
|
"data-test-id": `CTA_nav-item-${item.title}`,
|
|
5280
5281
|
onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink, true),
|
|
5281
5282
|
position: "relative",
|
|
5283
|
+
...(_a = item.itemProps) != null ? _a : {},
|
|
5282
5284
|
...itemStyles,
|
|
5283
5285
|
children: [
|
|
5284
5286
|
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
|
@@ -5324,22 +5326,26 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5324
5326
|
mappingIcon2.get(item.icon || ""),
|
|
5325
5327
|
/* @__PURE__ */ jsx62(Box28, { as: "span", ml: "2", children: item.title })
|
|
5326
5328
|
] }) }),
|
|
5327
|
-
!!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) =>
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5329
|
+
!!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => {
|
|
5330
|
+
var _a2;
|
|
5331
|
+
return /* @__PURE__ */ jsx62(
|
|
5332
|
+
NavItem,
|
|
5333
|
+
{
|
|
5334
|
+
"data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
|
|
5335
|
+
isChild: true,
|
|
5336
|
+
isActive: active === submenu.navLink,
|
|
5337
|
+
onClick: () => {
|
|
5338
|
+
setActive(submenu.navLink);
|
|
5339
|
+
onClose();
|
|
5340
|
+
},
|
|
5341
|
+
rounded: "none",
|
|
5342
|
+
...(_a2 = submenu.itemProps) != null ? _a2 : {},
|
|
5343
|
+
...itemStyles,
|
|
5344
|
+
children: submenu.title
|
|
5336
5345
|
},
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
},
|
|
5341
|
-
submenu.id
|
|
5342
|
-
)) })
|
|
5346
|
+
submenu.id
|
|
5347
|
+
);
|
|
5348
|
+
}) })
|
|
5343
5349
|
] }) : isCollapse && /* @__PURE__ */ jsx62(PopoverContent6, { w: "174px", borderColor: "neutral.200", bg: "white", rounded: "sm", children: /* @__PURE__ */ jsx62(PopoverBody4, { py: "1", px: "0", children: /* @__PURE__ */ jsxs26(
|
|
5344
5350
|
NavItem,
|
|
5345
5351
|
{
|
|
@@ -5351,6 +5357,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5351
5357
|
onClose();
|
|
5352
5358
|
},
|
|
5353
5359
|
rounded: "none",
|
|
5360
|
+
...(_b = item.itemProps) != null ? _b : {},
|
|
5354
5361
|
...itemStyles,
|
|
5355
5362
|
children: [
|
|
5356
5363
|
mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
|
|
@@ -5368,19 +5375,23 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
|
|
|
5368
5375
|
transition: {
|
|
5369
5376
|
enter: { duration: 0.5 }
|
|
5370
5377
|
},
|
|
5371
|
-
children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) =>
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5378
|
+
children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => {
|
|
5379
|
+
var _a;
|
|
5380
|
+
return /* @__PURE__ */ jsx62(
|
|
5381
|
+
NavItem,
|
|
5382
|
+
{
|
|
5383
|
+
mt: "1",
|
|
5384
|
+
"data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
|
|
5385
|
+
isActive: active === submenu.navLink,
|
|
5386
|
+
isChild: true,
|
|
5387
|
+
...(_a = submenu.itemProps) != null ? _a : {},
|
|
5388
|
+
...itemStyles,
|
|
5389
|
+
onClick: () => setActive(submenu.navLink),
|
|
5390
|
+
children: submenu.title
|
|
5391
|
+
},
|
|
5392
|
+
submenu.id
|
|
5393
|
+
);
|
|
5394
|
+
}) })
|
|
5384
5395
|
}
|
|
5385
5396
|
)
|
|
5386
5397
|
] });
|