@ctlyst.id/internal-ui 3.1.6 → 3.1.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.mts +35 -11
- package/dist/index.d.ts +35 -11
- package/dist/index.js +141 -132
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +180 -187
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -3,14 +3,15 @@ import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
3
|
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, ModalProps, InputProps, TextareaProps, FlexProps, HTMLChakraProps as HTMLChakraProps$1, ThemingProps as ThemingProps$1, As, TextProps, RadioProps as RadioProps$1, RadioGroupProps, UseCheckboxProps, SystemProps, TabProps as TabProps$1, TooltipProps as TooltipProps$1, ColorProps, PopoverContentProps, PopoverProps } from '@chakra-ui/react';
|
4
4
|
export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionProvider, AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, AlertDialogProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Box, BoxProps, ButtonGroup, ButtonGroupProps, Center, ChakraProvider, ChakraProviderProps, Table as ChakraTable, CheckboxGroupContext, CheckboxGroupProps, CheckboxIcon, CheckboxIconProps, CheckboxState, CloseButton, CloseButtonProps, Code, CodeProps, Collapse, CollapseProps, ColorMode, ColorModeScript, ColorModeScriptProps, Container, ContainerProps, Divider, DividerProps, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, DrawerContentProps, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormControl, FormControlProps, FormErrorMessage, FormHelperText, FormLabel, FormLabelProps, Grid, GridItem, GridItemProps, GridProps, HStack, Heading, HeadingProps, Hide, HideProps, Icon, IconButton, IconButtonProps, IconProps, Image, ImageProps, Img, ImgProps, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, InputGroup, InputGroupProps, InputLeftAddon, InputLeftAddonProps, InputLeftElement, InputLeftElementProps, InputProps, InputRightAddon, InputRightAddonProps, InputRightElement, InputRightElementProps, Link, LinkProps, List, ListIcon, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalContextProvider, ModalFocusScope, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, PinInput, PinInputContext, PinInputDescendantsProvider, PinInputField, PinInputFieldProps, PinInputProps, PinInputProvider, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, Progress, ProgressFilledTrackProps, ProgressLabel, ProgressLabelProps, ProgressProps, ProgressTrackProps, RadioGroupContext, RequiredIndicator, RequiredIndicatorProps, ScaleFade, ScaleFadeProps, Show, ShowProps, SimpleGrid, Skeleton, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, Stack, StackProps, Step, StepDescription, StepIcon, StepIndicator, StepNumber, StepSeparator, StepStatus, StepTitle, Stepper, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeadProps, TableProps, TableRowProps, Tabs, TabsDescendantsProvider, TabsProps, TabsProvider, Tbody, Td, Text, TextProps, Th, Thead, Tr, UnorderedList, UseAccordionItemProps, UseAccordionItemReturn, UseAccordionProps, UseAccordionReturn, UseBreakpointOptions, UseCheckboxGroupProps, UseCheckboxGroupReturn, UseCheckboxProps, UseCheckboxReturn, UseDisclosureProps, UseImageProps, UseImageReturn, UseMediaQueryOptions, UseModalProps, UseModalReturn, UsePinInputFieldProps, UsePinInputProps, UsePinInputReturn, UseQueryProps, UseRadioGroupReturn, UseRadioProps, UseRadioReturn, UseTabListProps, UseTabListReturn, UseTabOptions, UseTabPanelsProps, UseTabProps, UseTabsProps, UseTabsReturn, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, forwardRef, useAccordion, useAccordionContext, useAccordionItem, useAccordionItemState, useAccordionStyles, useBoolean, useBreakpoint, useCheckbox, useCheckboxGroup, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useConst, useControllableProp, useControllableState, useDimensions, useDisclosure, useDrawerContext, useImage, useMergeRefs, useModal, useModalContext, useModalStyles, useOutsideClick, usePinInput, usePinInputContext, usePinInputField, useProgressStyles, useQuery, useRadio, useRadioGroup, useRadioGroupContext, useSteps, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles, useTheme, useToken } from '@chakra-ui/react';
|
5
5
|
import * as _chakra_ui_system from '@chakra-ui/system';
|
6
|
-
import { SystemStyleObject, HTMLChakraProps, ThemingProps } from '@chakra-ui/system';
|
6
|
+
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
7
7
|
import * as React$1 from 'react';
|
8
8
|
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
10
10
|
import { ColumnDef, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
12
12
|
import { IconType } from 'react-icons/lib';
|
13
|
-
import
|
13
|
+
import * as react_select from 'react-select';
|
14
|
+
import { GroupBase, Props as Props$1, DropdownIndicatorProps, ClearIndicatorProps, MultiValueProps, MultiValueRemoveProps, StylesConfig, Theme as Theme$1 } from 'react-select';
|
14
15
|
import { AsyncPaginateProps } from 'react-select-async-paginate';
|
15
16
|
import { AsyncCreatableProps } from 'react-select/async-creatable';
|
16
17
|
import { CreatableProps } from 'react-select/creatable';
|
@@ -229,9 +230,10 @@ interface TableStyleProps {
|
|
229
230
|
tableColumnHeader?: TableColumnHeaderProps;
|
230
231
|
tableCell?: TableCellProps;
|
231
232
|
}
|
232
|
-
|
233
|
+
type DisabledRowData = {
|
233
234
|
disabled?: Record<string, boolean>;
|
234
|
-
}
|
235
|
+
};
|
236
|
+
interface DataTableProps<T> {
|
235
237
|
container?: BoxProps;
|
236
238
|
styles?: TableStyleProps;
|
237
239
|
columns: ColumnDef<T>[];
|
@@ -247,17 +249,14 @@ interface DataTableProps<T extends {
|
|
247
249
|
columnPinning?: ColumnPinningState;
|
248
250
|
onRowClick?: (data: T) => void;
|
249
251
|
}
|
252
|
+
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
250
253
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
251
|
-
declare const useDataTable: <T
|
252
|
-
disabled?: Record<string, boolean> | undefined;
|
253
|
-
}>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
254
|
+
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
254
255
|
table: _tanstack_react_table.Table<T>;
|
255
256
|
toggleAllRowsSelected: (value?: boolean | undefined) => void;
|
256
257
|
generateColumn: () => ColumnDef<T>[];
|
257
258
|
};
|
258
|
-
declare const _default: <T
|
259
|
-
disabled?: Record<string, boolean> | undefined;
|
260
|
-
}>(props: DataTableProps<T> & {
|
259
|
+
declare const _default: <T>(props: DataTableProps<T> & {
|
261
260
|
ref?: React$1.Ref<DataTableRefs<T>>;
|
262
261
|
}) => JSX.Element;
|
263
262
|
|
@@ -600,6 +599,31 @@ interface SelectWithCheckboxBaseProps<T = OptionGroup<never> | OptionMultiGroup<
|
|
600
599
|
}
|
601
600
|
declare const SelectCheckbox: <T, IsMulti extends boolean = boolean>(props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>) => react_jsx_runtime.JSX.Element;
|
602
601
|
|
602
|
+
declare function selectStyles<OptionType = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<OptionType> = GroupBase<OptionType>>(colorMode: ColorMode, _isError: boolean): StylesConfig<OptionType, IsMulti, Group> | undefined;
|
603
|
+
declare const themeSelect: (theme: Theme$1) => {
|
604
|
+
colors: {
|
605
|
+
primary: string;
|
606
|
+
primary25: string;
|
607
|
+
primary50: string;
|
608
|
+
primary75: string;
|
609
|
+
danger: string;
|
610
|
+
dangerLight: string;
|
611
|
+
neutral0: string;
|
612
|
+
neutral5: string;
|
613
|
+
neutral10: string;
|
614
|
+
neutral20: string;
|
615
|
+
neutral30: string;
|
616
|
+
neutral40: string;
|
617
|
+
neutral50: string;
|
618
|
+
neutral60: string;
|
619
|
+
neutral70: string;
|
620
|
+
neutral80: string;
|
621
|
+
neutral90: string;
|
622
|
+
};
|
623
|
+
borderRadius: number;
|
624
|
+
spacing: react_select.ThemeSpacing;
|
625
|
+
};
|
626
|
+
|
603
627
|
interface SidebarProps extends BoxProps {
|
604
628
|
isCollapse: boolean;
|
605
629
|
}
|
@@ -826,4 +850,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
826
850
|
declare const useInternalUI: () => ProviderContextObject;
|
827
851
|
declare const Provider: FC<ProviderProps>;
|
828
852
|
|
829
|
-
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, 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, 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, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
853
|
+
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, 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 };
|
package/dist/index.d.ts
CHANGED
@@ -3,14 +3,15 @@ import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
3
|
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, ModalProps, InputProps, TextareaProps, FlexProps, HTMLChakraProps as HTMLChakraProps$1, ThemingProps as ThemingProps$1, As, TextProps, RadioProps as RadioProps$1, RadioGroupProps, UseCheckboxProps, SystemProps, TabProps as TabProps$1, TooltipProps as TooltipProps$1, ColorProps, PopoverContentProps, PopoverProps } from '@chakra-ui/react';
|
4
4
|
export { Accordion, AccordionButton, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItem, AccordionItemProps, AccordionPanel, AccordionPanelProps, AccordionProps, AccordionProvider, AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, AlertDialogProps, Avatar, AvatarBadge, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Box, BoxProps, ButtonGroup, ButtonGroupProps, Center, ChakraProvider, ChakraProviderProps, Table as ChakraTable, CheckboxGroupContext, CheckboxGroupProps, CheckboxIcon, CheckboxIconProps, CheckboxState, CloseButton, CloseButtonProps, Code, CodeProps, Collapse, CollapseProps, ColorMode, ColorModeScript, ColorModeScriptProps, Container, ContainerProps, Divider, DividerProps, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, DrawerContentProps, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, DrawerProps, Fade, FadeProps, Flex, FlexProps, FormControl, FormControlProps, FormErrorMessage, FormHelperText, FormLabel, FormLabelProps, Grid, GridItem, GridItemProps, GridProps, HStack, Heading, HeadingProps, Hide, HideProps, Icon, IconButton, IconButtonProps, IconProps, Image, ImageProps, Img, ImgProps, InputLeftElement as InputElementLeft, InputRightElement as InputElementRight, InputGroup, InputGroupProps, InputLeftAddon, InputLeftAddonProps, InputLeftElement, InputLeftElementProps, InputProps, InputRightAddon, InputRightAddonProps, InputRightElement, InputRightElementProps, Link, LinkProps, List, ListIcon, ListItem, ListItemProps, ListProps, Modal, ModalBody, ModalBodyProps, ModalCloseButton, ModalContent, ModalContentProps, ModalContextProvider, ModalFocusScope, ModalFooter, ModalFooterProps, ModalHeader, ModalHeaderProps, ModalOverlay, ModalOverlayProps, ModalProps, OrderedList, PinInput, PinInputContext, PinInputDescendantsProvider, PinInputField, PinInputFieldProps, PinInputProps, PinInputProvider, Popover, PopoverAnchor, PopoverArrow, PopoverArrowProps, PopoverBody, PopoverBodyProps, PopoverCloseButton, PopoverContent, PopoverContentProps, PopoverFooter, PopoverFooterProps, PopoverHeader, PopoverHeaderProps, PopoverProps, PopoverTrigger, Portal, PortalProps, Progress, ProgressFilledTrackProps, ProgressLabel, ProgressLabelProps, ProgressProps, ProgressTrackProps, RadioGroupContext, RequiredIndicator, RequiredIndicatorProps, ScaleFade, ScaleFadeProps, Show, ShowProps, SimpleGrid, Skeleton, Slide, SlideFade, SlideFadeProps, SlideProps, Spacer, Stack, StackProps, Step, StepDescription, StepIcon, StepIndicator, StepNumber, StepSeparator, StepStatus, StepTitle, Stepper, TabIndicator, TabIndicatorProps, TabList, TabListProps, TabPanel, TabPanelProps, TabPanels, TabPanelsProps, TabProps, TableBodyProps, TableCellProps, TableColumnHeaderProps, TableHeadProps, TableProps, TableRowProps, Tabs, TabsDescendantsProvider, TabsProps, TabsProvider, Tbody, Td, Text, TextProps, Th, Thead, Tr, UnorderedList, UseAccordionItemProps, UseAccordionItemReturn, UseAccordionProps, UseAccordionReturn, UseBreakpointOptions, UseCheckboxGroupProps, UseCheckboxGroupReturn, UseCheckboxProps, UseCheckboxReturn, UseDisclosureProps, UseImageProps, UseImageReturn, UseMediaQueryOptions, UseModalProps, UseModalReturn, UsePinInputFieldProps, UsePinInputProps, UsePinInputReturn, UseQueryProps, UseRadioGroupReturn, UseRadioProps, UseRadioReturn, UseTabListProps, UseTabListReturn, UseTabOptions, UseTabPanelsProps, UseTabProps, UseTabsProps, UseTabsReturn, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, WrapItemProps, WrapProps, extendTheme, forwardRef, useAccordion, useAccordionContext, useAccordionItem, useAccordionItemState, useAccordionStyles, useBoolean, useBreakpoint, useCheckbox, useCheckboxGroup, useClipboard, useColorMode, useColorModePreference, useColorModeValue, useConst, useControllableProp, useControllableState, useDimensions, useDisclosure, useDrawerContext, useImage, useMergeRefs, useModal, useModalContext, useModalStyles, useOutsideClick, usePinInput, usePinInputContext, usePinInputField, useProgressStyles, useQuery, useRadio, useRadioGroup, useRadioGroupContext, useSteps, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles, useTheme, useToken } from '@chakra-ui/react';
|
5
5
|
import * as _chakra_ui_system from '@chakra-ui/system';
|
6
|
-
import { SystemStyleObject, HTMLChakraProps, ThemingProps } from '@chakra-ui/system';
|
6
|
+
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
7
7
|
import * as React$1 from 'react';
|
8
8
|
import React__default, { PropsWithChildren, ReactNode, FC } from 'react';
|
9
9
|
import * as _tanstack_react_table from '@tanstack/react-table';
|
10
10
|
import { ColumnDef, SortingState, ColumnPinningState, RowSelectionInstance } from '@tanstack/react-table';
|
11
11
|
import { DatePickerProps } from 'react-datepicker';
|
12
12
|
import { IconType } from 'react-icons/lib';
|
13
|
-
import
|
13
|
+
import * as react_select from 'react-select';
|
14
|
+
import { GroupBase, Props as Props$1, DropdownIndicatorProps, ClearIndicatorProps, MultiValueProps, MultiValueRemoveProps, StylesConfig, Theme as Theme$1 } from 'react-select';
|
14
15
|
import { AsyncPaginateProps } from 'react-select-async-paginate';
|
15
16
|
import { AsyncCreatableProps } from 'react-select/async-creatable';
|
16
17
|
import { CreatableProps } from 'react-select/creatable';
|
@@ -229,9 +230,10 @@ interface TableStyleProps {
|
|
229
230
|
tableColumnHeader?: TableColumnHeaderProps;
|
230
231
|
tableCell?: TableCellProps;
|
231
232
|
}
|
232
|
-
|
233
|
+
type DisabledRowData = {
|
233
234
|
disabled?: Record<string, boolean>;
|
234
|
-
}
|
235
|
+
};
|
236
|
+
interface DataTableProps<T> {
|
235
237
|
container?: BoxProps;
|
236
238
|
styles?: TableStyleProps;
|
237
239
|
columns: ColumnDef<T>[];
|
@@ -247,17 +249,14 @@ interface DataTableProps<T extends {
|
|
247
249
|
columnPinning?: ColumnPinningState;
|
248
250
|
onRowClick?: (data: T) => void;
|
249
251
|
}
|
252
|
+
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
250
253
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
251
|
-
declare const useDataTable: <T
|
252
|
-
disabled?: Record<string, boolean> | undefined;
|
253
|
-
}>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
254
|
+
declare const useDataTable: <T>({ columns, dataSource, withSelectedRow, onSelectedRow, onSort, sortDescFirst, sortingState, manualSorting, columnPinning, }: DataTableProps<T>) => {
|
254
255
|
table: _tanstack_react_table.Table<T>;
|
255
256
|
toggleAllRowsSelected: (value?: boolean | undefined) => void;
|
256
257
|
generateColumn: () => ColumnDef<T>[];
|
257
258
|
};
|
258
|
-
declare const _default: <T
|
259
|
-
disabled?: Record<string, boolean> | undefined;
|
260
|
-
}>(props: DataTableProps<T> & {
|
259
|
+
declare const _default: <T>(props: DataTableProps<T> & {
|
261
260
|
ref?: React$1.Ref<DataTableRefs<T>>;
|
262
261
|
}) => JSX.Element;
|
263
262
|
|
@@ -600,6 +599,31 @@ interface SelectWithCheckboxBaseProps<T = OptionGroup<never> | OptionMultiGroup<
|
|
600
599
|
}
|
601
600
|
declare const SelectCheckbox: <T, IsMulti extends boolean = boolean>(props: SelectWithCheckboxBaseProps<OptionGroup<T>, IsMulti>) => react_jsx_runtime.JSX.Element;
|
602
601
|
|
602
|
+
declare function selectStyles<OptionType = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<OptionType> = GroupBase<OptionType>>(colorMode: ColorMode, _isError: boolean): StylesConfig<OptionType, IsMulti, Group> | undefined;
|
603
|
+
declare const themeSelect: (theme: Theme$1) => {
|
604
|
+
colors: {
|
605
|
+
primary: string;
|
606
|
+
primary25: string;
|
607
|
+
primary50: string;
|
608
|
+
primary75: string;
|
609
|
+
danger: string;
|
610
|
+
dangerLight: string;
|
611
|
+
neutral0: string;
|
612
|
+
neutral5: string;
|
613
|
+
neutral10: string;
|
614
|
+
neutral20: string;
|
615
|
+
neutral30: string;
|
616
|
+
neutral40: string;
|
617
|
+
neutral50: string;
|
618
|
+
neutral60: string;
|
619
|
+
neutral70: string;
|
620
|
+
neutral80: string;
|
621
|
+
neutral90: string;
|
622
|
+
};
|
623
|
+
borderRadius: number;
|
624
|
+
spacing: react_select.ThemeSpacing;
|
625
|
+
};
|
626
|
+
|
603
627
|
interface SidebarProps extends BoxProps {
|
604
628
|
isCollapse: boolean;
|
605
629
|
}
|
@@ -826,4 +850,4 @@ declare const ProviderContext: React__default.Context<ProviderContextObject>;
|
|
826
850
|
declare const useInternalUI: () => ProviderContextObject;
|
827
851
|
declare const Provider: FC<ProviderProps>;
|
828
852
|
|
829
|
-
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, 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, 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, theme, useAlertStyles, useDataTable, useFetcher, useInternalUI, useToast };
|
853
|
+
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, 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 };
|
package/dist/index.js
CHANGED
@@ -343,7 +343,10 @@ __export(src_exports, {
|
|
343
343
|
forwardRef: () => import_react102.forwardRef,
|
344
344
|
getSelectAllCheckboxState: () => getSelectAllCheckboxState,
|
345
345
|
getTheme: () => getTheme,
|
346
|
+
isCellDisabled: () => isCellDisabled,
|
347
|
+
selectStyles: () => selectStyles,
|
346
348
|
theme: () => theme4,
|
349
|
+
themeSelect: () => themeSelect,
|
347
350
|
useAccordion: () => import_react3.useAccordion,
|
348
351
|
useAccordionContext: () => import_react3.useAccordionContext,
|
349
352
|
useAccordionItem: () => import_react3.useAccordionItem,
|
@@ -1266,6 +1269,12 @@ var import_react_table = require("@tanstack/react-table");
|
|
1266
1269
|
var React5 = __toESM(require("react"));
|
1267
1270
|
var import_react30 = require("react");
|
1268
1271
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
1272
|
+
var isCellDisabled = (row, cellId) => {
|
1273
|
+
if (row.disabled) {
|
1274
|
+
return row.disabled[cellId];
|
1275
|
+
}
|
1276
|
+
return false;
|
1277
|
+
};
|
1269
1278
|
var getCommonPinningStyles = (column) => {
|
1270
1279
|
const isPinned = column.getIsPinned();
|
1271
1280
|
const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
|
@@ -1397,148 +1406,145 @@ var useDataTable = ({
|
|
1397
1406
|
generateColumn
|
1398
1407
|
};
|
1399
1408
|
};
|
1400
|
-
var DataTable = React5.forwardRef(
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1409
|
+
var DataTable = React5.forwardRef((props, ref) => {
|
1410
|
+
const { isLoading, styles, headerSticky, onRowClick, container } = props;
|
1411
|
+
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1412
|
+
React5.useImperativeHandle(ref, () => ({
|
1413
|
+
toggleAllRowsSelected
|
1414
|
+
}));
|
1415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Box, { overflowX: "auto", position: "relative", maxW: "100%", w: "full", ...container, children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, "data-loading": "true", children: [
|
1416
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1417
|
+
import_react28.Th,
|
1418
|
+
{
|
1419
|
+
colSpan: header.colSpan,
|
1420
|
+
width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1421
|
+
...styles == null ? void 0 : styles.tableColumnHeader,
|
1422
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1423
|
+
import_react28.Flex,
|
1424
|
+
{
|
1425
|
+
"data-test-id": "CT_component_data-table_loader",
|
1426
|
+
textTransform: "capitalize",
|
1427
|
+
align: "center",
|
1428
|
+
gap: 2,
|
1429
|
+
children: (0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext())
|
1430
|
+
}
|
1431
|
+
)
|
1432
|
+
},
|
1433
|
+
header.id
|
1434
|
+
)) }, headerGroup.id)) }),
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Td, { width: 210, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Skeleton, { startColor: "neutral.100", endColor: "neutral.200", h: "20px", w: "70%" }, i) }, i)) }, num)) })
|
1436
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react28.Table, { ...styles == null ? void 0 : styles.table, children: [
|
1437
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1438
|
+
import_react28.Thead,
|
1439
|
+
{
|
1440
|
+
maxH: "50px",
|
1441
|
+
...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}),
|
1442
|
+
children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tr, { bg: (0, import_react28.useColorModeValue)("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
|
1443
|
+
var _a;
|
1444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1445
|
+
import_react28.Th,
|
1416
1446
|
{
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
children: (0,
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1447
|
+
colSpan: header.colSpan,
|
1448
|
+
sx: getCommonPinningStyles(header.column),
|
1449
|
+
width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1450
|
+
...styles == null ? void 0 : styles.tableColumnHeader,
|
1451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
1452
|
+
import_react28.Flex,
|
1453
|
+
{
|
1454
|
+
backgroundColor: "white",
|
1455
|
+
height: "100%",
|
1456
|
+
"data-test-id": `CT_Container_TableHeader_${header.id}`,
|
1457
|
+
textTransform: "capitalize",
|
1458
|
+
userSelect: "none",
|
1459
|
+
align: "center",
|
1460
|
+
gap: 2,
|
1461
|
+
children: [
|
1462
|
+
(0, import_react_table.flexRender)(header.column.columnDef.header, header.getContext()),
|
1463
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1464
|
+
import_react28.Box,
|
1465
|
+
{
|
1466
|
+
as: "span",
|
1467
|
+
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1468
|
+
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1469
|
+
onClick: header.column.getToggleSortingHandler(),
|
1470
|
+
children: (_a = header.column.getCanSort() && {
|
1471
|
+
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1472
|
+
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1473
|
+
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
1474
|
+
}
|
1475
|
+
)
|
1476
|
+
]
|
1477
|
+
}
|
1478
|
+
)
|
1479
|
+
},
|
1480
|
+
header.id
|
1481
|
+
);
|
1482
|
+
}) }, headerGroup.id))
|
1483
|
+
}
|
1484
|
+
),
|
1485
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1486
|
+
const trRef = (0, import_react30.useRef)();
|
1487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1488
|
+
import_react28.Tr,
|
1431
1489
|
{
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1490
|
+
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1491
|
+
tabindex: "0",
|
1492
|
+
ref: trRef,
|
1493
|
+
...styles == null ? void 0 : styles.tableRow,
|
1494
|
+
css: import_react29.css`
|
1495
|
+
&:last-child {
|
1496
|
+
td {
|
1497
|
+
border-bottom: none;
|
1498
|
+
}
|
1499
|
+
}
|
1500
|
+
`,
|
1501
|
+
onMouseDown: () => {
|
1435
1502
|
var _a;
|
1503
|
+
(_a = trRef.current) == null ? void 0 : _a.setAttribute("data-active", "true");
|
1504
|
+
},
|
1505
|
+
onMouseUp: () => {
|
1506
|
+
var _a;
|
1507
|
+
(_a = trRef.current) == null ? void 0 : _a.removeAttribute("data-active");
|
1508
|
+
},
|
1509
|
+
onClick: () => {
|
1510
|
+
if (onRowClick) {
|
1511
|
+
onRowClick(row.original);
|
1512
|
+
}
|
1513
|
+
},
|
1514
|
+
children: row.getVisibleCells().map((cell) => {
|
1515
|
+
const isDisabled = isCellDisabled(row.original, cell.column.id);
|
1436
1516
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1437
|
-
import_react28.
|
1517
|
+
import_react28.Td,
|
1438
1518
|
{
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
...styles == null ? void 0 : styles.
|
1443
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.
|
1519
|
+
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1520
|
+
fontSize: "text.sm",
|
1521
|
+
sx: getCommonPinningStyles(cell.column),
|
1522
|
+
...styles == null ? void 0 : styles.tableCell,
|
1523
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Flex, { height: "100%", align: "center", opacity: isDisabled ? 0.5 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1444
1524
|
import_react28.Flex,
|
1445
1525
|
{
|
1446
|
-
|
1447
|
-
|
1448
|
-
"
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
|
1454
|
-
|
1455
|
-
|
1456
|
-
import_react28.Box,
|
1457
|
-
{
|
1458
|
-
as: "span",
|
1459
|
-
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1460
|
-
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1461
|
-
onClick: header.column.getToggleSortingHandler(),
|
1462
|
-
children: (_a = header.column.getCanSort() && {
|
1463
|
-
asc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronUpIcon, { h: 4, w: 4, color: "neutral.500" }),
|
1464
|
-
desc: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.ChevronDownIcon, { h: 4, w: 4, color: "neutral.500" })
|
1465
|
-
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Box, { display: "flex", justifyContent: "center", alignItems: "center", boxSize: 4, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons2.UpDownIcon, { color: "neutral.500" }) })
|
1466
|
-
}
|
1467
|
-
)
|
1468
|
-
]
|
1526
|
+
tabIndex: 0,
|
1527
|
+
display: "inline-flex",
|
1528
|
+
cursor: "auto",
|
1529
|
+
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1530
|
+
onMouseUp: (e) => e.stopPropagation(),
|
1531
|
+
onMouseDown: (e) => e.stopPropagation(),
|
1532
|
+
onClick: (e) => {
|
1533
|
+
e.stopPropagation();
|
1534
|
+
},
|
1535
|
+
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1469
1536
|
}
|
1470
|
-
)
|
1537
|
+
) })
|
1471
1538
|
},
|
1472
|
-
|
1539
|
+
cell.id
|
1473
1540
|
);
|
1474
|
-
})
|
1475
|
-
}
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
{
|
1482
|
-
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1483
|
-
tabindex: "0",
|
1484
|
-
ref: trRef,
|
1485
|
-
...styles == null ? void 0 : styles.tableRow,
|
1486
|
-
css: import_react29.css`
|
1487
|
-
&:last-child {
|
1488
|
-
td {
|
1489
|
-
border-bottom: none;
|
1490
|
-
}
|
1491
|
-
}
|
1492
|
-
`,
|
1493
|
-
onMouseDown: () => {
|
1494
|
-
var _a;
|
1495
|
-
(_a = trRef.current) == null ? void 0 : _a.setAttribute("data-active", "true");
|
1496
|
-
},
|
1497
|
-
onMouseUp: () => {
|
1498
|
-
var _a;
|
1499
|
-
(_a = trRef.current) == null ? void 0 : _a.removeAttribute("data-active");
|
1500
|
-
},
|
1501
|
-
onClick: () => {
|
1502
|
-
if (onRowClick) {
|
1503
|
-
onRowClick(row.original);
|
1504
|
-
}
|
1505
|
-
},
|
1506
|
-
children: row.getVisibleCells().map((cell) => {
|
1507
|
-
var _a, _b;
|
1508
|
-
const isDisabled = (_b = (_a = cell.row.original) == null ? void 0 : _a.disabled) == null ? void 0 : _b[cell.column.id];
|
1509
|
-
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1510
|
-
import_react28.Td,
|
1511
|
-
{
|
1512
|
-
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1513
|
-
fontSize: "text.sm",
|
1514
|
-
sx: getCommonPinningStyles(cell.column),
|
1515
|
-
...styles == null ? void 0 : styles.tableCell,
|
1516
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react28.Flex, { height: "100%", align: "center", opacity: isDisabled ? 0.5 : 1, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1517
|
-
import_react28.Flex,
|
1518
|
-
{
|
1519
|
-
tabIndex: 0,
|
1520
|
-
display: "inline-flex",
|
1521
|
-
cursor: "auto",
|
1522
|
-
"data-test-id": `CT_Component_TableCell_Content-${cell.id}`,
|
1523
|
-
onMouseUp: (e) => e.stopPropagation(),
|
1524
|
-
onMouseDown: (e) => e.stopPropagation(),
|
1525
|
-
onClick: (e) => {
|
1526
|
-
e.stopPropagation();
|
1527
|
-
},
|
1528
|
-
children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
|
1529
|
-
}
|
1530
|
-
) })
|
1531
|
-
},
|
1532
|
-
cell.id
|
1533
|
-
);
|
1534
|
-
})
|
1535
|
-
},
|
1536
|
-
row.id
|
1537
|
-
);
|
1538
|
-
}) })
|
1539
|
-
] }) });
|
1540
|
-
}
|
1541
|
-
);
|
1541
|
+
})
|
1542
|
+
},
|
1543
|
+
row.id
|
1544
|
+
);
|
1545
|
+
}) })
|
1546
|
+
] }) });
|
1547
|
+
});
|
1542
1548
|
var data_table_default = DataTable;
|
1543
1549
|
|
1544
1550
|
// src/components/datepicker/components/datepicker.tsx
|
@@ -7131,7 +7137,10 @@ var import_react102 = require("@chakra-ui/react");
|
|
7131
7137
|
forwardRef,
|
7132
7138
|
getSelectAllCheckboxState,
|
7133
7139
|
getTheme,
|
7140
|
+
isCellDisabled,
|
7141
|
+
selectStyles,
|
7134
7142
|
theme,
|
7143
|
+
themeSelect,
|
7135
7144
|
useAccordion,
|
7136
7145
|
useAccordionContext,
|
7137
7146
|
useAccordionItem,
|