@ctlyst.id/internal-ui 5.6.4 → 5.6.6
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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +27 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -29
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -342,8 +342,18 @@ var badge_default = Badge;
|
|
|
342
342
|
import { Box as Box4, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Flex, IconButton, Text } from "@chakra-ui/react";
|
|
343
343
|
import { ChevronLeft, ChevronsRight, Home } from "@ctlyst.id/internal-icon";
|
|
344
344
|
import { Fragment, jsx as jsx14, jsxs } from "react/jsx-runtime";
|
|
345
|
-
var BreadCrumb = (
|
|
346
|
-
|
|
345
|
+
var BreadCrumb = ({
|
|
346
|
+
title,
|
|
347
|
+
children,
|
|
348
|
+
parents,
|
|
349
|
+
className,
|
|
350
|
+
disableHome,
|
|
351
|
+
spacing: spacing2 = 2,
|
|
352
|
+
backButton,
|
|
353
|
+
homeButton,
|
|
354
|
+
hideTitle,
|
|
355
|
+
as
|
|
356
|
+
}) => {
|
|
347
357
|
return /* @__PURE__ */ jsxs(
|
|
348
358
|
Box4,
|
|
349
359
|
{
|
|
@@ -367,7 +377,7 @@ var BreadCrumb = (props) => {
|
|
|
367
377
|
minW: "9",
|
|
368
378
|
bg: "white",
|
|
369
379
|
variant: "ghost",
|
|
370
|
-
"aria-label": "
|
|
380
|
+
"aria-label": "Back",
|
|
371
381
|
icon: /* @__PURE__ */ jsx14(ChevronLeft, { size: 5 }),
|
|
372
382
|
onClick: backButton
|
|
373
383
|
}
|
|
@@ -385,33 +395,19 @@ var BreadCrumb = (props) => {
|
|
|
385
395
|
pr: "4",
|
|
386
396
|
spacing: spacing2,
|
|
387
397
|
children: [
|
|
388
|
-
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(
|
|
389
|
-
|
|
390
|
-
{
|
|
391
|
-
"data-test-id": "",
|
|
392
|
-
alignItems: "center",
|
|
393
|
-
href: homeButton || disableHome ? void 0 : "/",
|
|
394
|
-
style: { ...disableHome && { cursor: "default" } },
|
|
395
|
-
onClick: homeButton,
|
|
396
|
-
children: /* @__PURE__ */ jsx14(Box4, { boxSize: "3.5", children: /* @__PURE__ */ jsx14(Home, { size: 3.5, color: "primary.500" }) })
|
|
397
|
-
}
|
|
398
|
-
) }),
|
|
399
|
-
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(
|
|
398
|
+
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: disableHome ? /* @__PURE__ */ jsx14(BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ jsx14(Box4, { boxSize: "3.5", children: /* @__PURE__ */ jsx14(Home, { size: 3.5, color: "neutral.600" }) }) }) : /* @__PURE__ */ jsx14(BreadcrumbLink, { "data-test-id": "", as, href: "/", onClick: homeButton, children: /* @__PURE__ */ jsx14(Box4, { boxSize: "3.5", children: /* @__PURE__ */ jsx14(Home, { size: 3.5, color: "primary.500" }) }) }) }),
|
|
399
|
+
parents == null ? void 0 : parents.map((parent) => /* @__PURE__ */ jsx14(BreadcrumbItem, { children: parent.disable || !parent.link ? /* @__PURE__ */ jsx14(BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ jsx14(Text, { color: "neutral.600", textStyle: "text.sm", children: parent.name }) }) : /* @__PURE__ */ jsx14(
|
|
400
400
|
BreadcrumbLink,
|
|
401
401
|
{
|
|
402
402
|
"data-test-id": "",
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
...val.disable && {
|
|
407
|
-
cursor: "default"
|
|
408
|
-
}
|
|
409
|
-
},
|
|
403
|
+
as,
|
|
404
|
+
href: parent.link,
|
|
405
|
+
onClick: parent.onClick,
|
|
410
406
|
_hover: { textDecoration: "none" },
|
|
411
|
-
children: /* @__PURE__ */ jsx14(Text, { color:
|
|
407
|
+
children: /* @__PURE__ */ jsx14(Text, { color: "primary.500", textStyle: "text.sm", children: parent.name })
|
|
412
408
|
}
|
|
413
|
-
) },
|
|
414
|
-
/* @__PURE__ */ jsx14(BreadcrumbItem, { children: /* @__PURE__ */ jsx14(BreadcrumbLink, {
|
|
409
|
+
) }, parent.name)),
|
|
410
|
+
/* @__PURE__ */ jsx14(BreadcrumbItem, { isCurrentPage: true, children: /* @__PURE__ */ jsx14(BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ jsx14(Text, { color: "neutral.600", textStyle: "text.sm", children: title }) }) })
|
|
415
411
|
]
|
|
416
412
|
}
|
|
417
413
|
)
|
|
@@ -425,7 +421,7 @@ BreadCrumb.defaultProps = {
|
|
|
425
421
|
children: void 0,
|
|
426
422
|
parents: void 0,
|
|
427
423
|
className: void 0,
|
|
428
|
-
disableHome:
|
|
424
|
+
disableHome: false,
|
|
429
425
|
spacing: 2,
|
|
430
426
|
backButton: void 0,
|
|
431
427
|
hideTitle: false
|
|
@@ -1330,22 +1326,24 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1330
1326
|
colSpan: header.colSpan,
|
|
1331
1327
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1332
1328
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1329
|
+
sx: getCommonPinningStyles(header.column, paddingRowX),
|
|
1333
1330
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
|
1334
1331
|
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
|
1335
1332
|
children: /* @__PURE__ */ jsx24(Flex2, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: flexRender(header.column.columnDef.header, header.getContext()) })
|
|
1336
1333
|
},
|
|
1337
1334
|
header.id
|
|
1338
1335
|
)) }, headerGroup.id)) }),
|
|
1339
|
-
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ jsx24(Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children:
|
|
1336
|
+
/* @__PURE__ */ jsx24(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ jsx24(Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ jsx24(
|
|
1340
1337
|
Td,
|
|
1341
1338
|
{
|
|
1342
1339
|
width: "100%",
|
|
1343
1340
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1344
1341
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1342
|
+
sx: getCommonPinningStyles(column, paddingRowX),
|
|
1345
1343
|
...styles == null ? void 0 : styles.tableCell,
|
|
1346
|
-
children: /* @__PURE__ */ jsx24(Skeleton2, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }
|
|
1344
|
+
children: /* @__PURE__ */ jsx24(Skeleton2, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" })
|
|
1347
1345
|
},
|
|
1348
|
-
|
|
1346
|
+
column.id
|
|
1349
1347
|
)) }, num)) })
|
|
1350
1348
|
] }) : /* @__PURE__ */ jsxs8(Table, { ...styles == null ? void 0 : styles.table, children: [
|
|
1351
1349
|
/* @__PURE__ */ jsx24(
|