@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.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, Accord
|
|
|
5
5
|
import * as _chakra_ui_system from '@chakra-ui/system';
|
|
6
6
|
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
|
-
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
|
8
|
+
import React__default, { PropsWithChildren, ElementType, ReactNode, FC } from 'react';
|
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
10
10
|
import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, ColumnPinningState, RowSelectionInstance, Row } from '@tanstack/react-table';
|
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
|
@@ -136,7 +136,7 @@ interface BreadCrumbParentProps {
|
|
|
136
136
|
}
|
|
137
137
|
interface BreadCrumbProps {
|
|
138
138
|
title: string;
|
|
139
|
-
children?:
|
|
139
|
+
children?: React__default.ReactNode;
|
|
140
140
|
parents?: BreadCrumbParentProps[];
|
|
141
141
|
className?: string;
|
|
142
142
|
disableHome?: boolean;
|
|
@@ -144,8 +144,9 @@ interface BreadCrumbProps {
|
|
|
144
144
|
backButton?: () => void;
|
|
145
145
|
hideTitle?: boolean;
|
|
146
146
|
homeButton?: () => void;
|
|
147
|
+
as?: ElementType;
|
|
147
148
|
}
|
|
148
|
-
declare const BreadCrumb:
|
|
149
|
+
declare const BreadCrumb: React__default.FC<BreadCrumbProps>;
|
|
149
150
|
|
|
150
151
|
type ButtonProps = ButtonProps$1;
|
|
151
152
|
declare const Button: _chakra_ui_react.ComponentWithAs<"button", ButtonProps$1>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, Accord
|
|
|
5
5
|
import * as _chakra_ui_system from '@chakra-ui/system';
|
|
6
6
|
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
|
7
7
|
import * as React$1 from 'react';
|
|
8
|
-
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
|
8
|
+
import React__default, { PropsWithChildren, ElementType, ReactNode, FC } from 'react';
|
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
|
10
10
|
import { ColumnDef, RowSelectionState, OnChangeFn, SortingState, ColumnPinningState, RowSelectionInstance, Row } from '@tanstack/react-table';
|
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
|
@@ -136,7 +136,7 @@ interface BreadCrumbParentProps {
|
|
|
136
136
|
}
|
|
137
137
|
interface BreadCrumbProps {
|
|
138
138
|
title: string;
|
|
139
|
-
children?:
|
|
139
|
+
children?: React__default.ReactNode;
|
|
140
140
|
parents?: BreadCrumbParentProps[];
|
|
141
141
|
className?: string;
|
|
142
142
|
disableHome?: boolean;
|
|
@@ -144,8 +144,9 @@ interface BreadCrumbProps {
|
|
|
144
144
|
backButton?: () => void;
|
|
145
145
|
hideTitle?: boolean;
|
|
146
146
|
homeButton?: () => void;
|
|
147
|
+
as?: ElementType;
|
|
147
148
|
}
|
|
148
|
-
declare const BreadCrumb:
|
|
149
|
+
declare const BreadCrumb: React__default.FC<BreadCrumbProps>;
|
|
149
150
|
|
|
150
151
|
type ButtonProps = ButtonProps$1;
|
|
151
152
|
declare const Button: _chakra_ui_react.ComponentWithAs<"button", ButtonProps$1>;
|
package/dist/index.js
CHANGED
|
@@ -738,8 +738,18 @@ var badge_default = Badge;
|
|
|
738
738
|
var import_react9 = require("@chakra-ui/react");
|
|
739
739
|
var import_internal_icon4 = require("@ctlyst.id/internal-icon");
|
|
740
740
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
741
|
-
var BreadCrumb = (
|
|
742
|
-
|
|
741
|
+
var BreadCrumb = ({
|
|
742
|
+
title,
|
|
743
|
+
children,
|
|
744
|
+
parents,
|
|
745
|
+
className,
|
|
746
|
+
disableHome,
|
|
747
|
+
spacing: spacing2 = 2,
|
|
748
|
+
backButton,
|
|
749
|
+
homeButton,
|
|
750
|
+
hideTitle,
|
|
751
|
+
as
|
|
752
|
+
}) => {
|
|
743
753
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
744
754
|
import_react9.Box,
|
|
745
755
|
{
|
|
@@ -763,7 +773,7 @@ var BreadCrumb = (props) => {
|
|
|
763
773
|
minW: "9",
|
|
764
774
|
bg: "white",
|
|
765
775
|
variant: "ghost",
|
|
766
|
-
"aria-label": "
|
|
776
|
+
"aria-label": "Back",
|
|
767
777
|
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.ChevronLeft, { size: 5 }),
|
|
768
778
|
onClick: backButton
|
|
769
779
|
}
|
|
@@ -781,33 +791,19 @@ var BreadCrumb = (props) => {
|
|
|
781
791
|
pr: "4",
|
|
782
792
|
spacing: spacing2,
|
|
783
793
|
children: [
|
|
784
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
785
|
-
|
|
786
|
-
{
|
|
787
|
-
"data-test-id": "",
|
|
788
|
-
alignItems: "center",
|
|
789
|
-
href: homeButton || disableHome ? void 0 : "/",
|
|
790
|
-
style: { ...disableHome && { cursor: "default" } },
|
|
791
|
-
onClick: homeButton,
|
|
792
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Box, { boxSize: "3.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.Home, { size: 3.5, color: "primary.500" }) })
|
|
793
|
-
}
|
|
794
|
-
) }),
|
|
795
|
-
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: disableHome ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Box, { boxSize: "3.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.Home, { size: 3.5, color: "neutral.600" }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbLink, { "data-test-id": "", as, href: "/", onClick: homeButton, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Box, { boxSize: "3.5", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_internal_icon4.Home, { size: 3.5, color: "primary.500" }) }) }) }),
|
|
795
|
+
parents == null ? void 0 : parents.map((parent) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: parent.disable || !parent.link ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Text, { color: "neutral.600", textStyle: "text.sm", children: parent.name }) }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
796
796
|
import_react9.BreadcrumbLink,
|
|
797
797
|
{
|
|
798
798
|
"data-test-id": "",
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
...val.disable && {
|
|
803
|
-
cursor: "default"
|
|
804
|
-
}
|
|
805
|
-
},
|
|
799
|
+
as,
|
|
800
|
+
href: parent.link,
|
|
801
|
+
onClick: parent.onClick,
|
|
806
802
|
_hover: { textDecoration: "none" },
|
|
807
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Text, { color:
|
|
803
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Text, { color: "primary.500", textStyle: "text.sm", children: parent.name })
|
|
808
804
|
}
|
|
809
|
-
) },
|
|
810
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbLink, {
|
|
805
|
+
) }, parent.name)),
|
|
806
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { isCurrentPage: true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbLink, { cursor: "default", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.Text, { color: "neutral.600", textStyle: "text.sm", children: title }) }) })
|
|
811
807
|
]
|
|
812
808
|
}
|
|
813
809
|
)
|
|
@@ -821,7 +817,7 @@ BreadCrumb.defaultProps = {
|
|
|
821
817
|
children: void 0,
|
|
822
818
|
parents: void 0,
|
|
823
819
|
className: void 0,
|
|
824
|
-
disableHome:
|
|
820
|
+
disableHome: false,
|
|
825
821
|
spacing: 2,
|
|
826
822
|
backButton: void 0,
|
|
827
823
|
hideTitle: false
|
|
@@ -1687,22 +1683,24 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1687
1683
|
colSpan: header.colSpan,
|
|
1688
1684
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1689
1685
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1686
|
+
sx: getCommonPinningStyles(header.column, paddingRowX),
|
|
1690
1687
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
|
1691
1688
|
...getTableHeaderSize(header, index, headerGroup.headers.length),
|
|
1692
1689
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Flex, { "data-test-id": "CT_component_data-table_loader", align: "center", gap: 2, children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()) })
|
|
1693
1690
|
},
|
|
1694
1691
|
header.id
|
|
1695
1692
|
)) }, headerGroup.id)) }),
|
|
1696
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children:
|
|
1693
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: table.getAllLeafColumns().map((column) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1697
1694
|
import_react30.Td,
|
|
1698
1695
|
{
|
|
1699
1696
|
width: "100%",
|
|
1700
1697
|
_first: { paddingLeft: `${paddingRowX + 8}px` },
|
|
1701
1698
|
_last: { paddingRight: `${paddingRowX + 8}px` },
|
|
1699
|
+
sx: getCommonPinningStyles(column, paddingRowX),
|
|
1702
1700
|
...styles == null ? void 0 : styles.tableCell,
|
|
1703
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }
|
|
1701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" })
|
|
1704
1702
|
},
|
|
1705
|
-
|
|
1703
|
+
column.id
|
|
1706
1704
|
)) }, num)) })
|
|
1707
1705
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.Table, { ...styles == null ? void 0 : styles.table, children: [
|
|
1708
1706
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|