@ctlyst.id/internal-ui 5.6.1 → 5.6.2
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 +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -976,6 +976,33 @@ declare const getTheme: (foundations: Record<string, any>) => Record<string, any
|
|
|
976
976
|
declare const theme: Record<string, any>;
|
|
977
977
|
type Theme = typeof theme;
|
|
978
978
|
|
|
979
|
+
declare class DragThreshold {
|
|
980
|
+
isDrag: boolean;
|
|
981
|
+
mouseDown: boolean;
|
|
982
|
+
x0: number;
|
|
983
|
+
y0: number;
|
|
984
|
+
/** threshold for dragging behavior in pixel
|
|
985
|
+
* @type {number}
|
|
986
|
+
*/
|
|
987
|
+
threshold: number;
|
|
988
|
+
constructor();
|
|
989
|
+
reset(): void;
|
|
990
|
+
start(x: number, y: number): void;
|
|
991
|
+
move(x: number, y: number): void;
|
|
992
|
+
isDragged(): boolean;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
interface DragOrClickOption {
|
|
996
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
|
997
|
+
onMouseMove?: (e: React.MouseEvent) => void;
|
|
998
|
+
onMouseUp?: (e: React.MouseEvent) => void;
|
|
999
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
1000
|
+
}
|
|
1001
|
+
declare const useDragOrClick: () => {
|
|
1002
|
+
clickOrDragged: DragThreshold;
|
|
1003
|
+
getDragOrClickProps: ({ onClick, onMouseDown, onMouseMove, onMouseUp, }: DragOrClickOption) => Omit<DragOrClickOption, 'onClick'>;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
979
1006
|
declare function useFetcher(): {
|
|
980
1007
|
fetcher: <TResponse = unknown>({ url, data, method, headers, ...config }: AxiosRequestConfig) => Promise<axios.AxiosResponse<TResponse, any>>;
|
|
981
1008
|
};
|
|
@@ -996,4 +1023,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
|
996
1023
|
declare const useInternalUI: () => ProviderContextObject;
|
|
997
1024
|
declare const Provider: FC<ProviderProps>;
|
|
998
1025
|
|
|
999
|
-
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_EXCEL_MIME_TYPE, DEFAULT_IMAGE_MIME_TYPE, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EXCEL_EXT, EmptyState, type Environment, ErrorCode, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, IMG_EXT, 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, ONE_MEGA_BYTE, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, PopoverContent, 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, concatList, createExtendTheme, defaultOnHandleRejections, dimensionValidator, formatValidationMessage, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, messages, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useFetcher, useInternalUI, useSelectTable, useToast };
|
|
1026
|
+
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_EXCEL_MIME_TYPE, DEFAULT_IMAGE_MIME_TYPE, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, type DragOrClickOption, DropdownIndicator, EXCEL_EXT, EmptyState, type Environment, ErrorCode, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, IMG_EXT, 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, ONE_MEGA_BYTE, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, PopoverContent, 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, concatList, createExtendTheme, defaultOnHandleRejections, dimensionValidator, formatValidationMessage, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, messages, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useDragOrClick, useFetcher, useInternalUI, useSelectTable, useToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -976,6 +976,33 @@ declare const getTheme: (foundations: Record<string, any>) => Record<string, any
|
|
|
976
976
|
declare const theme: Record<string, any>;
|
|
977
977
|
type Theme = typeof theme;
|
|
978
978
|
|
|
979
|
+
declare class DragThreshold {
|
|
980
|
+
isDrag: boolean;
|
|
981
|
+
mouseDown: boolean;
|
|
982
|
+
x0: number;
|
|
983
|
+
y0: number;
|
|
984
|
+
/** threshold for dragging behavior in pixel
|
|
985
|
+
* @type {number}
|
|
986
|
+
*/
|
|
987
|
+
threshold: number;
|
|
988
|
+
constructor();
|
|
989
|
+
reset(): void;
|
|
990
|
+
start(x: number, y: number): void;
|
|
991
|
+
move(x: number, y: number): void;
|
|
992
|
+
isDragged(): boolean;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
interface DragOrClickOption {
|
|
996
|
+
onMouseDown?: (e: React.MouseEvent) => void;
|
|
997
|
+
onMouseMove?: (e: React.MouseEvent) => void;
|
|
998
|
+
onMouseUp?: (e: React.MouseEvent) => void;
|
|
999
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
1000
|
+
}
|
|
1001
|
+
declare const useDragOrClick: () => {
|
|
1002
|
+
clickOrDragged: DragThreshold;
|
|
1003
|
+
getDragOrClickProps: ({ onClick, onMouseDown, onMouseMove, onMouseUp, }: DragOrClickOption) => Omit<DragOrClickOption, 'onClick'>;
|
|
1004
|
+
};
|
|
1005
|
+
|
|
979
1006
|
declare function useFetcher(): {
|
|
980
1007
|
fetcher: <TResponse = unknown>({ url, data, method, headers, ...config }: AxiosRequestConfig) => Promise<axios.AxiosResponse<TResponse, any>>;
|
|
981
1008
|
};
|
|
@@ -996,4 +1023,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
|
996
1023
|
declare const useInternalUI: () => ProviderContextObject;
|
|
997
1024
|
declare const Provider: FC<ProviderProps>;
|
|
998
1025
|
|
|
999
|
-
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_EXCEL_MIME_TYPE, DEFAULT_IMAGE_MIME_TYPE, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, DropdownIndicator, EXCEL_EXT, EmptyState, type Environment, ErrorCode, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, IMG_EXT, 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, ONE_MEGA_BYTE, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, PopoverContent, 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, concatList, createExtendTheme, defaultOnHandleRejections, dimensionValidator, formatValidationMessage, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, messages, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useFetcher, useInternalUI, useSelectTable, useToast };
|
|
1026
|
+
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_EXCEL_MIME_TYPE, DEFAULT_IMAGE_MIME_TYPE, _default as DataTable, type DataTableProps, type DataTableRefs, DatePickerMonth, type DatePickerMonthProps, Datepicker, type DatepickerProps, Dialog, type DisabledRowData, type DragOrClickOption, DropdownIndicator, EXCEL_EXT, EmptyState, type Environment, ErrorCode, Field, type FieldProps, Header, type HeaderDataProps, type HeaderProps, IMG_EXT, 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, ONE_MEGA_BYTE, type OptionGroup, type OptionMultiGroup, type OptionsGroup, Pagination, PaginationDetail, type PaginationDetailProps, PaginationFilter, type PaginationFilterProps, type PaginationProps, PopoverContent, 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, concatList, createExtendTheme, defaultOnHandleRejections, dimensionValidator, formatValidationMessage, getSelectAllCheckboxState, getTheme, isCellDisabled, isRatioEqual, messages, selectStyles, theme, themeSelect, timeFromString, useAlertStyles, useDataTable, useDragOrClick, useFetcher, useInternalUI, useSelectTable, useToast };
|
package/dist/index.js
CHANGED
|
@@ -378,6 +378,7 @@ __export(src_exports, {
|
|
|
378
378
|
useDataTable: () => useDataTable,
|
|
379
379
|
useDimensions: () => import_react110.useDimensions,
|
|
380
380
|
useDisclosure: () => import_react110.useDisclosure,
|
|
381
|
+
useDragOrClick: () => useDragOrClick,
|
|
381
382
|
useDrawerContext: () => import_react58.useDrawerContext,
|
|
382
383
|
useFetcher: () => useFetcher,
|
|
383
384
|
useImage: () => import_react98.useImage,
|
|
@@ -1729,17 +1730,17 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
|
1729
1730
|
gap: 2,
|
|
1730
1731
|
children: [
|
|
1731
1732
|
(0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
|
|
1732
|
-
(
|
|
1733
|
-
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
|
1734
|
-
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
|
1735
|
-
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1733
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1736
1734
|
import_react30.Box,
|
|
1737
1735
|
{
|
|
1738
1736
|
as: "span",
|
|
1739
1737
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
|
1740
1738
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
|
1741
1739
|
onClick: header.column.getToggleSortingHandler(),
|
|
1742
|
-
children:
|
|
1740
|
+
children: (_b2 = header.column.getCanSort() && {
|
|
1741
|
+
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
|
1742
|
+
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
|
1743
|
+
}[header.column.getIsSorted()]) != null ? _b2 : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
|
1743
1744
|
}
|
|
1744
1745
|
)
|
|
1745
1746
|
]
|
|
@@ -8579,6 +8580,7 @@ var import_react111 = require("@chakra-ui/react");
|
|
|
8579
8580
|
useDataTable,
|
|
8580
8581
|
useDimensions,
|
|
8581
8582
|
useDisclosure,
|
|
8583
|
+
useDragOrClick,
|
|
8582
8584
|
useDrawerContext,
|
|
8583
8585
|
useFetcher,
|
|
8584
8586
|
useImage,
|