@ctlyst.id/internal-ui 5.6.7 → 5.7.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.
package/dist/index.mjs CHANGED
@@ -1410,12 +1410,13 @@ var DataTable = React6.forwardRef((props, ref) => {
1410
1410
  /* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, animation: `${fadeIn} 0.15s ease-out`, children: table.getRowModel().rows.map((row, index) => {
1411
1411
  const isDisabledRow = disabledRow && disabledRow(row.original);
1412
1412
  const isHighlightedRow = Object.keys(selectedRow != null ? selectedRow : {}).filter((key) => selectedRow == null ? void 0 : selectedRow[key]).includes(row.id) || highlightedRow && highlightedRow(row.original);
1413
+ const hgColor = typeof highlightRowColor === "function" ? highlightRowColor(row.original) : highlightRowColor;
1413
1414
  return /* @__PURE__ */ jsx24(
1414
1415
  Tr,
1415
1416
  {
1416
1417
  "data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
1417
1418
  ...styles == null ? void 0 : styles.tableRow,
1418
- sx: { ...isHighlightedRow && getTableHighlightStyle(highlightRowColor) },
1419
+ sx: { ...isHighlightedRow && getTableHighlightStyle(hgColor) },
1419
1420
  "aria-disabled": isDisabledRow,
1420
1421
  "data-highlight": isHighlightedRow ? "true" : "false",
1421
1422
  css: css`
@@ -5258,6 +5259,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
5258
5259
  const offsetStyle = isCollapse ? noChild ? [-5, 16] : [-1, 16] : [-1, 8];
5259
5260
  return /* @__PURE__ */ jsxs26(Fragment9, { children: [
5260
5261
  /* @__PURE__ */ jsx62(Popover6, { trigger: "hover", placement: "right-start", offset: offsetStyle, children: ({ isOpen, onClose }) => {
5262
+ var _a, _b;
5261
5263
  const activeOption = isOpen ? "primary.50" : "white";
5262
5264
  const backgroundColor = isOpen && !isActive ? "primary.50" : "primary.100";
5263
5265
  const activeParent = isActive ? backgroundColor : activeOption;
@@ -5279,6 +5281,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
5279
5281
  "data-test-id": `CTA_nav-item-${item.title}`,
5280
5282
  onClick: () => setActive(item.children.length > 0 ? item.children[0].navLink : item.navLink, true),
5281
5283
  position: "relative",
5284
+ ...(_a = item.itemProps) != null ? _a : {},
5282
5285
  ...itemStyles,
5283
5286
  children: [
5284
5287
  mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
@@ -5324,22 +5327,26 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
5324
5327
  mappingIcon2.get(item.icon || ""),
5325
5328
  /* @__PURE__ */ jsx62(Box28, { as: "span", ml: "2", children: item.title })
5326
5329
  ] }) }),
5327
- !!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
5328
- NavItem,
5329
- {
5330
- "data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
5331
- isChild: true,
5332
- isActive: active === submenu.navLink,
5333
- onClick: () => {
5334
- setActive(submenu.navLink);
5335
- onClose();
5330
+ !!item.children.length && /* @__PURE__ */ jsx62(PopoverBody4, { pb: "1", px: "0", pt: "0", children: item.children.map((submenu) => {
5331
+ var _a2;
5332
+ return /* @__PURE__ */ jsx62(
5333
+ NavItem,
5334
+ {
5335
+ "data-test-id": `CTA_Sidebar-popover-item-${submenu.id}`,
5336
+ isChild: true,
5337
+ isActive: active === submenu.navLink,
5338
+ onClick: () => {
5339
+ setActive(submenu.navLink);
5340
+ onClose();
5341
+ },
5342
+ rounded: "none",
5343
+ ...(_a2 = submenu.itemProps) != null ? _a2 : {},
5344
+ ...itemStyles,
5345
+ children: submenu.title
5336
5346
  },
5337
- rounded: "none",
5338
- ...itemStyles,
5339
- children: submenu.title
5340
- },
5341
- submenu.id
5342
- )) })
5347
+ submenu.id
5348
+ );
5349
+ }) })
5343
5350
  ] }) : 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
5351
  NavItem,
5345
5352
  {
@@ -5351,6 +5358,7 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
5351
5358
  onClose();
5352
5359
  },
5353
5360
  rounded: "none",
5361
+ ...(_b = item.itemProps) != null ? _b : {},
5354
5362
  ...itemStyles,
5355
5363
  children: [
5356
5364
  mappingIcon2 && /* @__PURE__ */ jsx62(Box28, { display: "flex", boxSize: "3", transition: "50ms linear", children: mappingIcon2.get(item.icon || "") }),
@@ -5368,19 +5376,23 @@ var SidebarMenu = ({ menu, isCollapse, mappingIcon: mappingIcon2, itemStyles, se
5368
5376
  transition: {
5369
5377
  enter: { duration: 0.5 }
5370
5378
  },
5371
- children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => /* @__PURE__ */ jsx62(
5372
- NavItem,
5373
- {
5374
- mt: "1",
5375
- "data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
5376
- isActive: active === submenu.navLink,
5377
- isChild: true,
5378
- ...itemStyles,
5379
- onClick: () => setActive(submenu.navLink),
5380
- children: submenu.title
5381
- },
5382
- submenu.id
5383
- )) })
5379
+ children: /* @__PURE__ */ jsx62(AccordionPanel2, { mt: "1", p: "0", children: item.children.map((submenu) => {
5380
+ var _a;
5381
+ return /* @__PURE__ */ jsx62(
5382
+ NavItem,
5383
+ {
5384
+ mt: "1",
5385
+ "data-test-id": `CTA_Sidebar-accordion-item-${submenu.id}`,
5386
+ isActive: active === submenu.navLink,
5387
+ isChild: true,
5388
+ ...(_a = submenu.itemProps) != null ? _a : {},
5389
+ ...itemStyles,
5390
+ onClick: () => setActive(submenu.navLink),
5391
+ children: submenu.title
5392
+ },
5393
+ submenu.id
5394
+ );
5395
+ }) })
5384
5396
  }
5385
5397
  )
5386
5398
  ] });