@ctlyst.id/internal-ui 4.2.7 → 4.3.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 +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
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';
|
3
|
+
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, BackgroundProps, 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
6
|
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
@@ -257,6 +257,7 @@ interface DataTableProps<T> {
|
|
257
257
|
onRowClick?: (data: T) => void;
|
258
258
|
disabledRow?: (row: T) => boolean;
|
259
259
|
highlightedRow?: (row: T) => boolean;
|
260
|
+
highlightRowColor?: BackgroundProps['bg'];
|
260
261
|
}
|
261
262
|
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
262
263
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
package/dist/index.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
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';
|
3
|
+
import { LinkProps, BadgeProps as BadgeProps$1, ButtonProps as ButtonProps$1, BoxProps, CheckboxProps, FormControlProps, CheckboxGroupProps, TableProps, TableHeadProps, TableRowProps, TableBodyProps, TableColumnHeaderProps, TableCellProps, BackgroundProps, 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
6
|
import { SystemStyleObject, HTMLChakraProps, ThemingProps, ColorMode } from '@chakra-ui/system';
|
@@ -257,6 +257,7 @@ interface DataTableProps<T> {
|
|
257
257
|
onRowClick?: (data: T) => void;
|
258
258
|
disabledRow?: (row: T) => boolean;
|
259
259
|
highlightedRow?: (row: T) => boolean;
|
260
|
+
highlightRowColor?: BackgroundProps['bg'];
|
260
261
|
}
|
261
262
|
declare const isCellDisabled: (row: DisabledRowData, cellId: string) => boolean;
|
262
263
|
type DataTableRefs<T> = Pick<RowSelectionInstance<T>, 'toggleAllRowsSelected'>;
|
package/dist/index.js
CHANGED
@@ -1288,7 +1288,6 @@ var getCommonPinningStyles = (column) => {
|
|
1288
1288
|
right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
|
1289
1289
|
position: isPinned ? "sticky" : "relative",
|
1290
1290
|
zIndex: isPinned ? 1 : 0,
|
1291
|
-
backgroundColor: "white",
|
1292
1291
|
...isFirstLeftPinnedColumn ? {
|
1293
1292
|
pl: "16px"
|
1294
1293
|
} : { pl: "8px" },
|
@@ -1437,6 +1436,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1437
1436
|
columnPinning,
|
1438
1437
|
disabledRow,
|
1439
1438
|
highlightedRow,
|
1439
|
+
highlightRowColor,
|
1440
1440
|
cellLineClamp = 2
|
1441
1441
|
} = props;
|
1442
1442
|
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
@@ -1453,6 +1453,13 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1453
1453
|
(_e2 = refTable.current) == null ? void 0 : _e2.setAttribute("data-pin-right", "true");
|
1454
1454
|
}
|
1455
1455
|
};
|
1456
|
+
const getTableHighlightStyle = (highlightColor = "primary.50") => {
|
1457
|
+
return {
|
1458
|
+
td: {
|
1459
|
+
background: `${highlightColor} !important`
|
1460
|
+
}
|
1461
|
+
};
|
1462
|
+
};
|
1456
1463
|
let lastPinnedColumn = 0;
|
1457
1464
|
React5.useEffect(() => {
|
1458
1465
|
var _a2;
|
@@ -1570,7 +1577,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1570
1577
|
{
|
1571
1578
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
1572
1579
|
...styles == null ? void 0 : styles.tableRow,
|
1573
|
-
|
1580
|
+
sx: { ...isHighlightedRow && getTableHighlightStyle() },
|
1581
|
+
"aria-disabled": isDisabledRow,
|
1582
|
+
"data-highlight": isHighlightedRow ? "true" : "false",
|
1574
1583
|
css: import_react29.css`
|
1575
1584
|
&:last-child {
|
1576
1585
|
td {
|
@@ -1589,6 +1598,8 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1589
1598
|
var _a2;
|
1590
1599
|
(_a2 = e.currentTarget) == null ? void 0 : _a2.removeAttribute("data-active");
|
1591
1600
|
},
|
1601
|
+
opacity: isDisabledRow ? 0.4 : 1,
|
1602
|
+
pointerEvents: isDisabledRow ? "none" : "auto",
|
1592
1603
|
onClick: () => {
|
1593
1604
|
if (onRowClick) {
|
1594
1605
|
if (isDisabledRow) return;
|
@@ -1603,7 +1614,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1603
1614
|
{
|
1604
1615
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1605
1616
|
fontSize: "text.sm",
|
1606
|
-
sx:
|
1617
|
+
sx: {
|
1618
|
+
...getCommonPinningStyles(cell.column)
|
1619
|
+
},
|
1607
1620
|
...styles == null ? void 0 : styles.tableCell,
|
1608
1621
|
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
1609
1622
|
import_react28.Flex,
|
@@ -7464,7 +7477,7 @@ var baseStyle11 = definePartsStyle10({
|
|
7464
7477
|
backgroundColor: "neutral.50"
|
7465
7478
|
},
|
7466
7479
|
td: {
|
7467
|
-
|
7480
|
+
backgroundColor: "white",
|
7468
7481
|
textAlign: "start",
|
7469
7482
|
minHeight: "56px",
|
7470
7483
|
_disabled: {
|