@ctlyst.id/internal-ui 4.0.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +31 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -727,6 +727,7 @@ declare class Time {
|
|
727
727
|
constructor(hours?: number, minutes?: number, seconds?: number);
|
728
728
|
toString(): string;
|
729
729
|
}
|
730
|
+
declare const timeFromString: (timeString: string) => Time;
|
730
731
|
interface TimeInputProps {
|
731
732
|
config?: TimeOptions;
|
732
733
|
value?: Time;
|
@@ -916,4 +917,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
916
917
|
declare const useInternalUI: () => ProviderContextObject;
|
917
918
|
declare const Provider: FC<ProviderProps>;
|
918
919
|
|
919
|
-
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, ErrorCode, 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, Time, TimeInput, type TimeInputProps, type TimeOptions, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, defaultOnHandleRejections, dimensionValidator, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
920
|
+
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, ErrorCode, 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, Time, TimeInput, type TimeInputProps, type TimeOptions, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, defaultOnHandleRejections, dimensionValidator, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
package/dist/index.d.ts
CHANGED
@@ -727,6 +727,7 @@ declare class Time {
|
|
727
727
|
constructor(hours?: number, minutes?: number, seconds?: number);
|
728
728
|
toString(): string;
|
729
729
|
}
|
730
|
+
declare const timeFromString: (timeString: string) => Time;
|
730
731
|
interface TimeInputProps {
|
731
732
|
config?: TimeOptions;
|
732
733
|
value?: Time;
|
@@ -916,4 +917,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
916
917
|
declare const useInternalUI: () => ProviderContextObject;
|
917
918
|
declare const Provider: FC<ProviderProps>;
|
918
919
|
|
919
|
-
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, ErrorCode, 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, Time, TimeInput, type TimeInputProps, type TimeOptions, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, defaultOnHandleRejections, dimensionValidator, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, selectStyles, theme, themeSelect, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
920
|
+
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, ErrorCode, 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, Time, TimeInput, type TimeInputProps, type TimeOptions, Tooltip, type TooltipProps, Uploader, type UploaderProps, Version, type VersionProps, VoilaLogo, XMSLogo, createExtendTheme, defaultOnHandleRejections, dimensionValidator, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
package/dist/index.js
CHANGED
@@ -349,6 +349,7 @@ __export(src_exports, {
|
|
349
349
|
selectStyles: () => selectStyles,
|
350
350
|
theme: () => theme4,
|
351
351
|
themeSelect: () => themeSelect,
|
352
|
+
timeFromString: () => timeFromString,
|
352
353
|
useAccordion: () => import_react3.useAccordion,
|
353
354
|
useAccordionContext: () => import_react3.useAccordionContext,
|
354
355
|
useAccordionItem: () => import_react3.useAccordionItem,
|
@@ -4934,12 +4935,20 @@ var InputOption = ({
|
|
4934
4935
|
(data == null ? void 0 : data.selectAllCheckbox) ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4935
4936
|
import_react74.Checkbox,
|
4936
4937
|
{
|
4938
|
+
onClick: (e) => e.stopPropagation(),
|
4937
4939
|
isChecked: checkedState === CHECKBOX_STATE.CHECKED,
|
4938
4940
|
isIndeterminate: checkedState === CHECKBOX_STATE.INDETERMINATE,
|
4939
4941
|
isDisabled,
|
4940
4942
|
"data-test-id": "CT_component_select-checkbox_select-all-option"
|
4941
4943
|
}
|
4942
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4944
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
4945
|
+
import_react74.Checkbox,
|
4946
|
+
{
|
4947
|
+
onClick: (e) => e.stopPropagation(),
|
4948
|
+
isChecked: isSelected,
|
4949
|
+
"data-test-id": "CT_component_select-checkbox_option-checkbox"
|
4950
|
+
}
|
4951
|
+
),
|
4943
4952
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react74.Text, { textStyle: "text.sm", "data-test-id": `select-checkbox-option-label-${data.value}`, children })
|
4944
4953
|
]
|
4945
4954
|
}
|
@@ -5474,6 +5483,12 @@ var useTimescape = (options = {}) => {
|
|
5474
5483
|
|
5475
5484
|
// src/components/time-input/components/index.tsx
|
5476
5485
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
5486
|
+
var timeDigitFormat = (number) => {
|
5487
|
+
if (number.toString().length === 1) {
|
5488
|
+
return `0${number}`;
|
5489
|
+
}
|
5490
|
+
return number;
|
5491
|
+
};
|
5477
5492
|
var Time = class {
|
5478
5493
|
constructor(hours, minutes, seconds) {
|
5479
5494
|
__publicField(this, "hours");
|
@@ -5484,9 +5499,13 @@ var Time = class {
|
|
5484
5499
|
this.seconds = seconds != null ? seconds : 0;
|
5485
5500
|
}
|
5486
5501
|
toString() {
|
5487
|
-
return `${this.hours}:${this.minutes}:${this.seconds}`;
|
5502
|
+
return `${timeDigitFormat(this.hours)}:${timeDigitFormat(this.minutes)}:${timeDigitFormat(this.seconds)}`;
|
5488
5503
|
}
|
5489
5504
|
};
|
5505
|
+
var timeFromString = (timeString) => {
|
5506
|
+
const [hours, minutes, seconds] = timeString.split(":");
|
5507
|
+
return new Time(Number(hours), Number(minutes), Number(seconds));
|
5508
|
+
};
|
5490
5509
|
var InputTimeArea = (0, import_react85.forwardRef)((props, ref) => {
|
5491
5510
|
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
5492
5511
|
import_react85.Input,
|
@@ -5616,6 +5635,7 @@ var TimeInput2 = (0, import_react85.forwardRef)(
|
|
5616
5635
|
|
5617
5636
|
// src/components/toast/components/toast.tsx
|
5618
5637
|
var import_react88 = require("@chakra-ui/react");
|
5638
|
+
var import_internal_icon11 = require("@ctlyst.id/internal-icon");
|
5619
5639
|
var import_react_toastify = require("react-toastify");
|
5620
5640
|
|
5621
5641
|
// src/components/toast/components/styles.tsx
|
@@ -5655,6 +5675,10 @@ var styles_default2 = Styles2;
|
|
5655
5675
|
|
5656
5676
|
// src/components/toast/components/toast.tsx
|
5657
5677
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
5678
|
+
var CustomCloseButton = (props) => {
|
5679
|
+
const { closeToast } = props;
|
5680
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react88.Box, { p: 2, alignItems: "center", display: "flex", "data-test-id": "", cursor: "pointer", onClick: closeToast, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_internal_icon11.Close, { size: 4, color: "white" }) });
|
5681
|
+
};
|
5658
5682
|
var DEFAULT_OPTIONS = {
|
5659
5683
|
position: "top-right",
|
5660
5684
|
autoClose: 5e3,
|
@@ -5664,7 +5688,7 @@ var DEFAULT_OPTIONS = {
|
|
5664
5688
|
draggable: true,
|
5665
5689
|
icon: false,
|
5666
5690
|
theme: "colored",
|
5667
|
-
closeButton:
|
5691
|
+
closeButton: CustomCloseButton,
|
5668
5692
|
className: "container-toast",
|
5669
5693
|
transition: import_react_toastify.Bounce
|
5670
5694
|
};
|
@@ -5773,7 +5797,7 @@ var import_react_toastify2 = require("react-toastify");
|
|
5773
5797
|
|
5774
5798
|
// src/components/uploader/components/uploader.tsx
|
5775
5799
|
var import_react89 = require("@chakra-ui/react");
|
5776
|
-
var
|
5800
|
+
var import_internal_icon12 = require("@ctlyst.id/internal-icon");
|
5777
5801
|
var import_react90 = require("react");
|
5778
5802
|
var import_react_dropzone = require("react-dropzone");
|
5779
5803
|
|
@@ -6020,7 +6044,7 @@ var Uploader = ({
|
|
6020
6044
|
border: "none",
|
6021
6045
|
zIndex: 1,
|
6022
6046
|
onClick: handleRemove,
|
6023
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6047
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Close, { size: 3, color: "white" })
|
6024
6048
|
}
|
6025
6049
|
) }),
|
6026
6050
|
filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Box, { w: "full", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
@@ -6042,7 +6066,7 @@ var Uploader = ({
|
|
6042
6066
|
}
|
6043
6067
|
) }),
|
6044
6068
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: isDragActive ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react89.Text, { children: dragActiveText != null ? dragActiveText : messages.dragActive }) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.Flex, { gap: 2, flexDirection: "column", alignItems: "center", color: isError ? "danger.500" : color, children: [
|
6045
|
-
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6069
|
+
size2 === "sm" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_internal_icon12.Plus, { size: 6, color }),
|
6046
6070
|
/* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_react89.Box, { children: [
|
6047
6071
|
!filePreview && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
6048
6072
|
import_react89.Heading,
|
@@ -8138,6 +8162,7 @@ var import_react104 = require("@chakra-ui/react");
|
|
8138
8162
|
selectStyles,
|
8139
8163
|
theme,
|
8140
8164
|
themeSelect,
|
8165
|
+
timeFromString,
|
8141
8166
|
useAccordion,
|
8142
8167
|
useAccordionContext,
|
8143
8168
|
useAccordionItem,
|