@ctlyst.id/internal-ui 3.1.23 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +39 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -130,7 +130,7 @@ interface BreadCrumbParentProps {
|
|
130
130
|
name: string;
|
131
131
|
onClick?: () => void;
|
132
132
|
disable?: boolean;
|
133
|
-
link
|
133
|
+
link?: string;
|
134
134
|
}
|
135
135
|
interface BreadCrumbProps {
|
136
136
|
title: string;
|
@@ -141,6 +141,7 @@ interface BreadCrumbProps {
|
|
141
141
|
spacing?: number;
|
142
142
|
backButton?: () => void;
|
143
143
|
hideTitle?: boolean;
|
144
|
+
homeButton?: () => void;
|
144
145
|
}
|
145
146
|
declare const BreadCrumb: React$1.FC<BreadCrumbProps>;
|
146
147
|
|
@@ -828,6 +829,7 @@ type UploaderProps = FlexProps & {
|
|
828
829
|
};
|
829
830
|
declare const Uploader: React__default.FC<UploaderProps>;
|
830
831
|
|
832
|
+
declare const createExtendTheme: (theme: Record<string, any>) => (...extensions: Array<Record<string, any> | ((theme: Record<string, any>) => Record<string, any>)>) => Record<string, any>;
|
831
833
|
declare const getTheme: (foundations: Record<string, any>) => Record<string, any>;
|
832
834
|
declare const theme: Record<string, any>;
|
833
835
|
type Theme = typeof theme;
|
@@ -852,4 +854,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
852
854
|
declare const useInternalUI: () => ProviderContextObject;
|
853
855
|
declare const Provider: FC<ProviderProps>;
|
854
856
|
|
855
|
-
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, ClearIndicator, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EmptyState, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Logo, type LogoProps, Navigation as MainMenu, ModalBackButton, MultiDatePickerMonth, type MultiDatePickerMonthProps, MultiValue, MultiValueRemove, NavItem, type NavItemProps, Navbar, type NavbarProps, NavigationBar, type NavigationBarProps, type NavigationProps, NoOptionsMessage, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, Profile, type ProfileProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCheckbox as SelectCheckBox, SelectCreatable, type SelectCreatableProps, type SelectProps, type SelectWithCheckboxBaseProps, Sidebar, SidebarHeader, type SidebarHeaderProps, SidebarMenu, type SidebarMenuProps, type SidebarProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, getSelectAllCheckboxState, getTheme, isCellDisabled, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
857
|
+
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, ClearIndicator, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EmptyState, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Logo, type LogoProps, Navigation as MainMenu, ModalBackButton, MultiDatePickerMonth, type MultiDatePickerMonthProps, MultiValue, MultiValueRemove, NavItem, type NavItemProps, Navbar, type NavbarProps, NavigationBar, type NavigationBarProps, type NavigationProps, NoOptionsMessage, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, Profile, type ProfileProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCheckbox as SelectCheckBox, SelectCreatable, type SelectCreatableProps, type SelectProps, type SelectWithCheckboxBaseProps, Sidebar, SidebarHeader, type SidebarHeaderProps, SidebarMenu, type SidebarMenuProps, type SidebarProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, getSelectAllCheckboxState, getTheme, isCellDisabled, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
package/dist/index.d.ts
CHANGED
@@ -130,7 +130,7 @@ interface BreadCrumbParentProps {
|
|
130
130
|
name: string;
|
131
131
|
onClick?: () => void;
|
132
132
|
disable?: boolean;
|
133
|
-
link
|
133
|
+
link?: string;
|
134
134
|
}
|
135
135
|
interface BreadCrumbProps {
|
136
136
|
title: string;
|
@@ -141,6 +141,7 @@ interface BreadCrumbProps {
|
|
141
141
|
spacing?: number;
|
142
142
|
backButton?: () => void;
|
143
143
|
hideTitle?: boolean;
|
144
|
+
homeButton?: () => void;
|
144
145
|
}
|
145
146
|
declare const BreadCrumb: React$1.FC<BreadCrumbProps>;
|
146
147
|
|
@@ -828,6 +829,7 @@ type UploaderProps = FlexProps & {
|
|
828
829
|
};
|
829
830
|
declare const Uploader: React__default.FC<UploaderProps>;
|
830
831
|
|
832
|
+
declare const createExtendTheme: (theme: Record<string, any>) => (...extensions: Array<Record<string, any> | ((theme: Record<string, any>) => Record<string, any>)>) => Record<string, any>;
|
831
833
|
declare const getTheme: (foundations: Record<string, any>) => Record<string, any>;
|
832
834
|
declare const theme: Record<string, any>;
|
833
835
|
type Theme = typeof theme;
|
@@ -852,4 +854,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
852
854
|
declare const useInternalUI: () => ProviderContextObject;
|
853
855
|
declare const Provider: FC<ProviderProps>;
|
854
856
|
|
855
|
-
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, ClearIndicator, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EmptyState, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Logo, type LogoProps, Navigation as MainMenu, ModalBackButton, MultiDatePickerMonth, type MultiDatePickerMonthProps, MultiValue, MultiValueRemove, NavItem, type NavItemProps, Navbar, type NavbarProps, NavigationBar, type NavigationBarProps, type NavigationProps, NoOptionsMessage, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, Profile, type ProfileProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCheckbox as SelectCheckBox, SelectCreatable, type SelectCreatableProps, type SelectProps, type SelectWithCheckboxBaseProps, Sidebar, SidebarHeader, type SidebarHeaderProps, SidebarMenu, type SidebarMenuProps, type SidebarProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, getSelectAllCheckboxState, getTheme, isCellDisabled, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
857
|
+
export { AccordionEye, AccordionIndicator, Alert, AlertAction, type AlertActionProps, AlertClose, type AlertCloseProps, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertStatus, AlertTitle, type AlertTitleProps, Anchor, type AnchorProps, Badge, type BadgeProps, BreadCrumb, type BreadCrumbParentProps, type BreadCrumbProps, Button, type ButtonProps, CHECKBOX_STATE, CardCustom as Card, type CardProps, CheckboxComponent as Checkbox, type CheckboxComponentProps, CheckboxGroupComponent as CheckboxGroup, type CheckboxGroupComponentProps, Chips, type ChipsProps, ClearIndicator, Counter, type CustomLoaderProps, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EmptyState, type Environment, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, InputAddonLeft, InputAddonRight, InputField, type InputFieldProps, Loader, type LoaderProps, Logo, type LogoProps, Navigation as MainMenu, ModalBackButton, MultiDatePickerMonth, type MultiDatePickerMonthProps, MultiValue, MultiValueRemove, NavItem, type NavItemProps, Navbar, type NavbarProps, NavigationBar, type NavigationBarProps, type NavigationProps, NoOptionsMessage, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, Profile, type ProfileProps, type Props, Provider, ProviderContext, Radio, RadioGroup, type RadioGroupComponentProps, type RadioProps, Rating, type RatingProps, Select, SelectAsync, SelectAsyncCreatable, type SelectAsyncCreatableProps, type SelectAsyncProps, SelectCheckbox as SelectCheckBox, SelectCreatable, type SelectCreatableProps, type SelectProps, type SelectWithCheckboxBaseProps, Sidebar, SidebarHeader, type SidebarHeaderProps, SidebarMenu, type SidebarMenuProps, type SidebarProps, Switch, type SwitchProps, Tab, type TableStyleProps, type TextAreaProps, TextareaField, type Theme, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, getSelectAllCheckboxState, getTheme, isCellDisabled, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
package/dist/index.js
CHANGED
@@ -340,6 +340,7 @@ __export(src_exports, {
|
|
340
340
|
WrapItemProps: () => import_react50.WrapItemProps,
|
341
341
|
WrapProps: () => import_react50.WrapProps,
|
342
342
|
XMSLogo: () => XMSLogo,
|
343
|
+
createExtendTheme: () => createExtendTheme,
|
343
344
|
extendTheme: () => import_react101.extendTheme,
|
344
345
|
forwardRef: () => import_react101.forwardRef,
|
345
346
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
@@ -727,7 +728,7 @@ var import_react9 = require("@chakra-ui/react");
|
|
727
728
|
var import_internal_icon4 = require("@ctlyst.id/internal-icon");
|
728
729
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
729
730
|
var BreadCrumb = (props) => {
|
730
|
-
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton, hideTitle } = props;
|
731
|
+
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton, homeButton, hideTitle } = props;
|
731
732
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
732
733
|
import_react9.Box,
|
733
734
|
{
|
@@ -772,9 +773,11 @@ var BreadCrumb = (props) => {
|
|
772
773
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react9.BreadcrumbItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
773
774
|
import_react9.BreadcrumbLink,
|
774
775
|
{
|
776
|
+
"data-test-id": "",
|
775
777
|
alignItems: "center",
|
776
|
-
href:
|
778
|
+
href: homeButton || disableHome ? void 0 : "/",
|
777
779
|
style: { ...disableHome && { cursor: "default" } },
|
780
|
+
onClick: homeButton,
|
778
781
|
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" }) })
|
779
782
|
}
|
780
783
|
) }),
|
@@ -782,7 +785,7 @@ var BreadCrumb = (props) => {
|
|
782
785
|
import_react9.BreadcrumbLink,
|
783
786
|
{
|
784
787
|
"data-test-id": "",
|
785
|
-
href: !val.disable ? val.link : void 0,
|
788
|
+
href: !val.disable && val.link ? val.link : void 0,
|
786
789
|
onClick: val.onClick,
|
787
790
|
style: {
|
788
791
|
...val.disable && {
|
@@ -6786,6 +6789,30 @@ var config = {
|
|
6786
6789
|
initialColorMode: "light",
|
6787
6790
|
useSystemColorMode: false
|
6788
6791
|
};
|
6792
|
+
function isFunction(value) {
|
6793
|
+
return typeof value === "function";
|
6794
|
+
}
|
6795
|
+
function pipe(...fns) {
|
6796
|
+
return (v) => fns.reduce((a, b) => b(a), v);
|
6797
|
+
}
|
6798
|
+
var createExtendTheme = (theme5) => {
|
6799
|
+
return function extendTheme2(...extensions) {
|
6800
|
+
let overrides = [...extensions];
|
6801
|
+
let activeTheme = extensions[extensions.length - 1];
|
6802
|
+
if ((0, import_react96.isChakraTheme)(activeTheme) && // this ensures backward compatibility
|
6803
|
+
// previously only `extendTheme(override, activeTheme?)` was allowed
|
6804
|
+
overrides.length > 1) {
|
6805
|
+
overrides = overrides.slice(0, overrides.length - 1);
|
6806
|
+
} else {
|
6807
|
+
activeTheme = theme5;
|
6808
|
+
}
|
6809
|
+
return pipe(
|
6810
|
+
...overrides.map(
|
6811
|
+
(extension) => (prevTheme) => isFunction(extension) ? extension(prevTheme) : (0, import_react96.mergeThemeOverride)(prevTheme, extension)
|
6812
|
+
)
|
6813
|
+
)(activeTheme);
|
6814
|
+
};
|
6815
|
+
};
|
6789
6816
|
var getTheme = (foundations) => {
|
6790
6817
|
return (0, import_react96.extendTheme)({
|
6791
6818
|
...foundations,
|
@@ -7198,6 +7225,7 @@ var import_react101 = require("@chakra-ui/react");
|
|
7198
7225
|
WrapItemProps,
|
7199
7226
|
WrapProps,
|
7200
7227
|
XMSLogo,
|
7228
|
+
createExtendTheme,
|
7201
7229
|
extendTheme,
|
7202
7230
|
forwardRef,
|
7203
7231
|
getSelectAllCheckboxState,
|