@atom-learning/components 8.0.0 → 8.0.1
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/components/accordion/AccordionContent.d.ts +1 -3
- package/dist/components/accordion/AccordionItem.d.ts +1 -3
- package/dist/components/accordion/AccordionTrigger.d.ts +1 -3
- package/dist/components/action-icon/ActionIcon.d.ts +1 -3
- package/dist/components/alert-dialog/AlertDialog.d.ts +1 -3
- package/dist/components/alert-dialog/AlertDialogContent.d.ts +1 -3
- package/dist/components/avatar/Avatar.d.ts +2 -6
- package/dist/components/badge/Badge.d.ts +3 -9
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/badge/BadgeText.d.ts +2 -6
- package/dist/components/banner/BannerContainer.d.ts +1 -3
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +73 -61
- package/dist/components/banner/banner-regular/BannerRegularContent.d.ts +1 -3
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +2 -6
- package/dist/components/banner/banner-regular/BannerRegularText.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +74 -64
- package/dist/components/banner/banner-slim/BannerSlimActions.d.ts +1 -3
- package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +1 -3
- package/dist/components/banner/banner-slim/BannerSlimContent.d.ts +1 -3
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +2 -6
- package/dist/components/banner/banner-slim/BannerSlimImage.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlimText.js.map +1 -1
- package/dist/components/box/Box.d.ts +1 -3
- package/dist/components/button/Button.d.ts +1 -3
- package/dist/components/calendar/Calendar.d.ts +2 -2
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/calendar/Day.d.ts +1 -3
- package/dist/components/carousel/Carousel.d.ts +2 -6
- package/dist/components/carousel/CarouselArrows.d.ts +1 -3
- package/dist/components/checkbox/Checkbox.d.ts +1 -3
- package/dist/components/checkbox-group/CheckboxGroup.d.ts +73 -61
- package/dist/components/checkbox-tree/CheckboxTree.d.ts +1 -1
- package/dist/components/checkbox-tree/CheckboxTree.js.map +1 -1
- package/dist/components/checkbox-tree/CheckboxTreeItemContent.d.ts +1 -3
- package/dist/components/checkbox-tree/CheckboxTreeItemContent.js.map +1 -1
- package/dist/components/chip/Chip.d.ts +4 -12
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/chip/ChipGroup.d.ts +1 -3
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupItem.d.ts +2 -6
- package/dist/components/chip-toggle-group/ChipToggleGroupItem.d.ts +2 -6
- package/dist/components/chip-toggle-group/ChipToggleGroupRoot.d.ts +2 -6
- package/dist/components/combobox/Combobox.d.ts +4 -12
- package/dist/components/combobox/ComboboxInput.d.ts +2 -6
- package/dist/components/combobox/ComboboxList.d.ts +1 -3
- package/dist/components/combobox/ComboboxOption.d.ts +1 -3
- package/dist/components/combobox/ComboboxPopover.d.ts +1 -3
- package/dist/components/data-table/DataTable.d.ts +20 -40
- package/dist/components/data-table/DataTableBulkActions.d.ts +4 -4
- package/dist/components/data-table/DataTableBulkActions.js.map +1 -1
- package/dist/components/data-table/DataTableBulkActionsFloating.d.ts +1 -3
- package/dist/components/data-table/DataTableError.d.ts +2 -2
- package/dist/components/data-table/DataTableError.js.map +1 -1
- package/dist/components/data-table/DataTableHead.d.ts +1 -1
- package/dist/components/data-table/DataTableHead.js.map +1 -1
- package/dist/components/data-table/DataTableLoading.d.ts +1 -3
- package/dist/components/data-table/DataTableRowSelectionCheckbox.d.ts +1 -1
- package/dist/components/data-table/DataTableRowSelectionCheckbox.js.map +1 -1
- package/dist/components/data-table/pagination/Pagination.d.ts +1 -3
- package/dist/components/dialog/Dialog.d.ts +6 -18
- package/dist/components/dialog/DialogActionBar.d.ts +1 -3
- package/dist/components/dialog/DialogBackground.d.ts +1 -3
- package/dist/components/dialog/DialogContent.d.ts +1 -3
- package/dist/components/dialog/DialogContent.js.map +1 -1
- package/dist/components/dialog/DialogFooter.d.ts +1 -3
- package/dist/components/dialog/DialogNavigationBar.d.ts +1 -3
- package/dist/components/dialog/DialogScrollableContent.d.ts +1 -3
- package/dist/components/divider/Divider.d.ts +2 -6
- package/dist/components/drawer/Drawer.d.ts +3 -9
- package/dist/components/drawer/DrawerContent.d.ts +1 -3
- package/dist/components/drawer/DrawerFooter.d.ts +1 -3
- package/dist/components/drawer/DrawerHeader.d.ts +1 -3
- package/dist/components/drawer/DrawerMain.d.ts +1 -3
- package/dist/components/drawer/DrawerOverlay.d.ts +1 -3
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +4 -12
- package/dist/components/dropdown-menu/DropdownMenuContent.d.ts +1 -3
- package/dist/components/dropdown-menu/DropdownMenuItem.d.ts +1 -3
- package/dist/components/dropdown-menu/DropdownMenuSeparator.d.ts +1 -3
- package/dist/components/dropdown-menu/DropdownMenuTrigger.d.ts +1 -3
- package/dist/components/empty-state/EmptyState.d.ts +6 -18
- package/dist/components/empty-state/EmptyStateBody.d.ts +2 -6
- package/dist/components/empty-state/EmptyStateImage.d.ts +2 -6
- package/dist/components/empty-state/EmptyStateTitle.d.ts +1 -3
- package/dist/components/flex/Flex.d.ts +1 -3
- package/dist/components/grid/Grid.d.ts +1 -3
- package/dist/components/heading/Heading.d.ts +1 -3
- package/dist/components/icon/Icon.d.ts +1 -3
- package/dist/components/image/Image.d.ts +1 -3
- package/dist/components/inline-message/InlineMessage.d.ts +1 -3
- package/dist/components/input/Input.d.ts +3 -9
- package/dist/components/keyboard-shortcut/KeyboardShortcut.d.ts +2 -6
- package/dist/components/keyboard-shortcut/index.d.ts +2 -6
- package/dist/components/label/Label.d.ts +1 -3
- package/dist/components/link/Link.d.ts +1 -3
- package/dist/components/list/List.d.ts +2 -6
- package/dist/components/markdown-content/MarkdownContent.d.ts +1 -3
- package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.d.ts +2 -4
- package/dist/components/markdown-content/components/MarkdownEmphasis.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownList.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.d.ts +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.d.ts +9 -27
- package/dist/components/navigation/NavigationMenuDropdownContent.d.ts +1 -3
- package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +4 -12
- package/dist/components/navigation/NavigationMenuDropdownTrigger.d.ts +1 -3
- package/dist/components/navigation/NavigationMenuLink.d.ts +2 -6
- package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +125 -113
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.d.ts +1 -3
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.d.ts +3 -7
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalIcon.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +1 -3
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalList.d.ts +1 -3
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.d.ts +2 -6
- package/dist/components/number-input/NumberInputStepper.d.ts +2 -6
- package/dist/components/pagination/PaginationNextButton.d.ts +2 -6
- package/dist/components/pagination/PaginationPreviousButton.d.ts +2 -6
- package/dist/components/popover/Popover.d.ts +1 -3
- package/dist/components/popover/PopoverContent.d.ts +1 -3
- package/dist/components/progress-bar/ProgressBar.d.ts +1 -3
- package/dist/components/radio-button/RadioButton.d.ts +1 -3
- package/dist/components/radio-button/RadioButtonGroup.d.ts +1 -3
- package/dist/components/radio-button-field/RadioButtonField.d.ts +2 -4
- package/dist/components/radio-card/RadioCard.d.ts +1 -3
- package/dist/components/section-message/SectionMessage.d.ts +3 -7
- package/dist/components/section-message/SectionMessageLayout.d.ts +1 -3
- package/dist/components/segmented-control/SegmentedControl.d.ts +7 -21
- package/dist/components/segmented-control/SegmentedControlContent.d.ts +1 -3
- package/dist/components/segmented-control/SegmentedControlDescription.d.ts +2 -6
- package/dist/components/segmented-control/SegmentedControlHeading.d.ts +2 -6
- package/dist/components/segmented-control/SegmentedControlItem.d.ts +1 -3
- package/dist/components/segmented-control/SegmentedControlRoot.d.ts +1 -3
- package/dist/components/select/Select.d.ts +1 -3
- package/dist/components/select-menu/SelectMenu.d.ts +4 -12
- package/dist/components/select-menu/SelectMenuContent.d.ts +1 -3
- package/dist/components/select-menu/SelectMenuItem.d.ts +1 -3
- package/dist/components/select-menu/SelectMenuSeparator.d.ts +1 -3
- package/dist/components/side-bar/SideBar.d.ts +8 -24
- package/dist/components/side-bar/SideBarComponents.d.ts +6 -18
- package/dist/components/skeleton-loader/Skeleton.d.ts +1 -3
- package/dist/components/slider/Slider.d.ts +2 -6
- package/dist/components/sortable/Handle.d.ts +2 -6
- package/dist/components/spacer/Spacer.d.ts +1 -3
- package/dist/components/stepper/StepperStepBullet.d.ts +2 -4
- package/dist/components/stepper/StepperStepContainer.d.ts +3 -5
- package/dist/components/stepper/StepperStepLabel.d.ts +3 -7
- package/dist/components/switch/Switch.d.ts +1 -3
- package/dist/components/table/Table.d.ts +8 -24
- package/dist/components/table/TableBody.d.ts +1 -3
- package/dist/components/table/TableCell.d.ts +1 -3
- package/dist/components/table/TableFooter.d.ts +1 -3
- package/dist/components/table/TableFooterCell.d.ts +1 -3
- package/dist/components/table/TableHeader.d.ts +1 -3
- package/dist/components/table/TableHeaderCell.d.ts +1 -3
- package/dist/components/table/TableRow.d.ts +1 -3
- package/dist/components/table/useStickyColumnsCss.d.ts +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +4 -12
- package/dist/components/tabs/TabsContent.d.ts +1 -3
- package/dist/components/tabs/TabsTrigger.d.ts +1 -3
- package/dist/components/tabs/TabsTriggerList.d.ts +1 -3
- package/dist/components/text/Text.d.ts +1 -3
- package/dist/components/textarea/Textarea.d.ts +2 -6
- package/dist/components/tile/Tile.d.ts +1 -3
- package/dist/components/tile-interactive/TileInteractive.d.ts +2 -6
- package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +3 -9
- package/dist/components/toast/Toast.d.ts +2 -4
- package/dist/components/toast/ToastIcon.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.d.ts +2 -6
- package/dist/components/toggle-group/ToggleGroupButton.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupItem.d.ts +1 -3
- package/dist/components/toggle-group/ToggleGroupRoot.d.ts +6 -14
- package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
- package/dist/components/toggle-group/index.d.ts +5 -13
- package/dist/components/tooltip/Tooltip.d.ts +1 -3
- package/dist/components/tooltip/TooltipContent.d.ts +1 -3
- package/dist/components/top-bar/TopBar.d.ts +6 -18
- package/dist/components/top-bar/TopBarBrand.d.ts +3 -9
- package/dist/components/tree/Tree.d.ts +7 -21
- package/dist/components/tree/TreeCollapsible.d.ts +1 -3
- package/dist/components/tree/TreeItem.js.map +1 -1
- package/dist/components/tree/TreeItemContent.d.ts +1 -3
- package/dist/components/tree/TreeItemContent.js.map +1 -1
- package/dist/components/tree/TreeList.d.ts +1 -3
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/styled.js.map +1 -1
- package/dist/utilities/css-wrapper/CSSWrapper.d.ts +1 -1
- package/dist/utilities/css-wrapper/CSSWrapper.js.map +1 -1
- package/dist/utilities/hooks/useIsMountedRef.d.ts +1 -1
- package/package.json +4 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTree.js","names":[],"sources":["../../../src/components/checkbox-tree/CheckboxTree.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = Object.assign(CheckboxTreeRoot, {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n})\n"],"mappings":";;;;;;;;;AAeA,IAAa,oBAAoB,EAC/B,SACA,gBACA,iBACA,GAAG,
|
|
1
|
+
{"version":3,"file":"CheckboxTree.js","names":[],"sources":["../../../src/components/checkbox-tree/CheckboxTree.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CheckboxGroup } from '../checkbox-group/CheckboxGroup'\nimport { Tree } from '../tree/Tree'\nimport { CheckboxTreeCollapsible } from './CheckboxTreeCollapsible'\nimport { CheckboxTreeCollapsibleContent } from './CheckboxTreeCollapsibleContent'\nimport { CheckboxTreeCollapsibleTrigger } from './CheckboxTreeCollapsibleTrigger'\nimport { CheckboxTreeItem } from './CheckboxTreeItem'\n\ntype CheckboxTreeRootProps = Omit<\n React.ComponentProps<typeof CheckboxGroup> &\n React.ComponentProps<typeof Tree>,\n 'asChild'\n>\n\nexport const CheckboxTreeRoot = ({\n checked,\n defaultChecked,\n onCheckedChange,\n ...rest\n}: CheckboxTreeRootProps): React.ReactElement<unknown> => {\n const checkboxGroupProps = { checked, defaultChecked, onCheckedChange }\n return (\n <CheckboxGroup {...checkboxGroupProps} asChild>\n <Tree {...rest} />\n </CheckboxGroup>\n )\n}\n\ntype CheckboxTreeType = typeof CheckboxTreeRoot & {\n Collapsible: typeof CheckboxTreeCollapsible\n CollapsibleContent: typeof CheckboxTreeCollapsibleContent\n CollapsibleTrigger: typeof CheckboxTreeCollapsibleTrigger\n Item: typeof CheckboxTreeItem\n}\n\nexport const CheckboxTree: CheckboxTreeType = Object.assign(CheckboxTreeRoot, {\n Collapsible: CheckboxTreeCollapsible,\n CollapsibleContent: CheckboxTreeCollapsibleContent,\n CollapsibleTrigger: CheckboxTreeCollapsibleTrigger,\n Item: CheckboxTreeItem\n})\n"],"mappings":";;;;;;;;;AAeA,IAAa,oBAAoB,EAC/B,SACA,gBACA,iBACA,GAAG,WACqD;AAExD,QACE,oBAAC,eAAD;EAF2B;EAAS;EAAgB;EAEb,SAAA;YACrC,oBAAC,MAAD,EAAM,GAAI,MAAQ,CAAA;EACJ,CAAA;;AAWpB,IAAa,eAAiC,OAAO,OAAO,kBAAkB;CAC5E,aAAa;CACb,oBAAoB;CACpB,oBAAoB;CACpB,MAAM;CACP,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const StyledItemContent: React.ForwardRefExoticComponent<Omit<
|
|
3
|
-
ref?: ((instance: HTMLLabelElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLLabelElement> | null | undefined;
|
|
4
|
-
}, never> & {
|
|
2
|
+
declare const StyledItemContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, never> & {
|
|
5
3
|
as?: React.ElementType;
|
|
6
4
|
}>;
|
|
7
5
|
type CheckboxTreeItemContentProps = React.ComponentProps<typeof StyledItemContent>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTreeItemContent.js","names":[],"sources":["../../../src/components/checkbox-tree/CheckboxTreeItemContent.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { Tree } from '~/components/tree/Tree'\nimport { styled } from '~/styled'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps): React.JSX.Element => {\n return (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(child) &&\n child.type === Icon\n ) {\n return <Tree.Icon {...child.props} />\n }\n return child\n }) as React.ReactElement[]\n }\n </StyledItemContent>\n )\n}\n"],"mappings":";;;;;;AAMA,IAAM,oBAAoB,OAAO,SAAS,EACxC,MAAM;CAAC;CAAc;CAAQ;CAAgB;CAAQ,EACtD,CAAC;AAMF,IAAa,2BAA2B,EACtC,UACA,GAAG,WACkD;AACrD,QACE,oBAAC,mBAAD;EAAmB,GAAI;YAEnB,QAAM,SAAS,IAAI,WAAW,UAAU;AACtC,OAAI,OAAO,UAAU,YAAY,OAAO,UAAU,SAChD,QAAO,oBAAC,KAAK,MAAN,EAAA,UAAY,OAAkB,CAAA;AAEvC,OACE,QAAM,
|
|
1
|
+
{"version":3,"file":"CheckboxTreeItemContent.js","names":[],"sources":["../../../src/components/checkbox-tree/CheckboxTreeItemContent.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { Tree } from '~/components/tree/Tree'\nimport { styled } from '~/styled'\n\nconst StyledItemContent = styled('label', {\n base: ['max-w-full', 'flex', 'items-center', 'gap-2']\n})\n\ntype CheckboxTreeItemContentProps = React.ComponentProps<\n typeof StyledItemContent\n>\n\nexport const CheckboxTreeItemContent = ({\n children,\n ...rest\n}: CheckboxTreeItemContentProps): React.JSX.Element => {\n return (\n <StyledItemContent {...rest}>\n {\n React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <Tree.Text>{child}</Tree.Text>\n }\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <Tree.Icon {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledItemContent>\n )\n}\n"],"mappings":";;;;;;AAMA,IAAM,oBAAoB,OAAO,SAAS,EACxC,MAAM;CAAC;CAAc;CAAQ;CAAgB;CAAQ,EACtD,CAAC;AAMF,IAAa,2BAA2B,EACtC,UACA,GAAG,WACkD;AACrD,QACE,oBAAC,mBAAD;EAAmB,GAAI;YAEnB,QAAM,SAAS,IAAI,WAAW,UAAU;AACtC,OAAI,OAAO,UAAU,YAAY,OAAO,UAAU,SAChD,QAAO,oBAAC,KAAK,MAAN,EAAA,UAAY,OAAkB,CAAA;AAEvC,OACE,QAAM,eACJ,MACD,IACD,MAAM,SAAS,KAEf,QAAO,oBAAC,KAAK,MAAN,EAAW,GAAI,MAAM,OAAS,CAAA;AAEvC,UAAO;IACP;EAEc,CAAA"}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Icon } from '../../components/icon/Icon';
|
|
3
|
-
export declare const StyledChipContent: React.ForwardRefExoticComponent<Omit<
|
|
4
|
-
ref?: ((instance: HTMLSpanElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLSpanElement> | null | undefined;
|
|
5
|
-
}, never> & {
|
|
3
|
+
export declare const StyledChipContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & {
|
|
6
4
|
as?: React.ElementType;
|
|
7
5
|
}>;
|
|
8
6
|
export declare const ChipIcon: (props: React.ComponentProps<typeof Icon>) => React.JSX.Element;
|
|
9
|
-
export declare const StyledRoot: React.ForwardRefExoticComponent<Omit<
|
|
10
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
11
|
-
}, "appearance" | "size"> & {
|
|
7
|
+
export declare const StyledRoot: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "appearance" | "size"> & {
|
|
12
8
|
size?: "sm" | "md" | "lg" | undefined;
|
|
13
9
|
appearance?: "standard" | "modern" | undefined;
|
|
14
10
|
} & {
|
|
@@ -16,9 +12,7 @@ export declare const StyledRoot: React.ForwardRefExoticComponent<Omit<Omit<React
|
|
|
16
12
|
}>;
|
|
17
13
|
export type TChipRootContext = React.ComponentProps<typeof StyledRoot>;
|
|
18
14
|
export type TChipRootProviderProps = TChipRootContext;
|
|
19
|
-
export declare const ChipRootContext: React.Context<Omit<
|
|
20
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
21
|
-
}, "appearance" | "size"> & {
|
|
15
|
+
export declare const ChipRootContext: React.Context<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "appearance" | "size"> & {
|
|
22
16
|
size?: "sm" | "md" | "lg" | undefined;
|
|
23
17
|
appearance?: "standard" | "modern" | undefined;
|
|
24
18
|
} & {
|
|
@@ -26,9 +20,7 @@ export declare const ChipRootContext: React.Context<Omit<Omit<React.DetailedHTML
|
|
|
26
20
|
}>;
|
|
27
21
|
export declare const ChipRootProvider: ({ size, children }: TChipRootProviderProps) => React.JSX.Element;
|
|
28
22
|
export type TChipRootProps = TChipRootProviderProps;
|
|
29
|
-
export declare const Chip: React.ForwardRefExoticComponent<Omit<Omit<
|
|
30
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
31
|
-
}, "appearance" | "size"> & {
|
|
23
|
+
export declare const Chip: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "appearance" | "size"> & {
|
|
32
24
|
size?: "sm" | "md" | "lg" | undefined;
|
|
33
25
|
appearance?: "standard" | "modern" | undefined;
|
|
34
26
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chip.js","names":[],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.useContext(ChipRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child, index) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(child) &&\n child.type === Icon\n ) {\n return <ChipIcon key={`icon-${index}`} {...child.props} />\n }\n return child\n }) as React.ReactElement[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type TChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type TChipRootProviderProps = TChipRootContext\n\nexport const ChipRootContext = React.createContext<TChipRootContext>({})\n\nexport const ChipRootProvider = ({\n size,\n children\n}: TChipRootProviderProps) => {\n const value = React.useMemo<TChipRootContext>(() => ({ size }), [size])\n return (\n <ChipRootContext.Provider value={value}>\n {children}\n </ChipRootContext.Provider>\n )\n}\n\nexport type TChipRootProps = TChipRootProviderProps\n\nconst ChipRoot = React.forwardRef<HTMLDivElement, TChipRootProps>(\n ({ size = 'md', ...rest }, ref) => {\n return (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n )\n }\n)\n\nexport const Chip = Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n\nChipRoot.displayName = 'Chip'\n"],"mappings":";;;;;;AAMA,IAAa,oBAAoB,OAAO,QAAQ,EAC9C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,aAAa;CAAE,IAAI;CAAM,IAAI;CAAM,IAAI;CAAM;AAEnD,IAAa,YAAY,UAA6C;CAEpE,MAAM,EAAE,SADY,QAAM,WAAW,gBAAgB;CAErD,MAAM,WAAW,QAAM,cACf,2BAA2B,OAAO,MAAM,WAAW,GAAG,EAC5D,CAAC,KAAK,CACP;AACD,QAAO,oBAAC,MAAD;EAAM,GAAI;EAAO,MAAM;EAAY,CAAA;;AAG5C,IAAM,eAAe,EAAE,UAAU,GAAG,WAAW;CAC7C,MAAM,gBAAgB,QAAM,SAAS,QAAQ,SAAS;CACtD,MAAM,gBAAgB,cAAc,UAAU;AAC9C,QACE,oBAAC,mBAAD;EAAmB,GAAI;YAEnB,cAAc,KAAK,OAAO,UAAU;AAClC,OAAI,CAAC,iBAAiB,OAAO,UAAU,SACrC,QACE,oBAAC,QAAD;IAEE,WAAU;cAET;IACI,EAJA,MAIA;AAEX,OACE,QAAM,
|
|
1
|
+
{"version":3,"file":"Chip.js","names":[],"sources":["../../../src/components/chip/Chip.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { styled } from '~/styled'\nimport { overrideStyledVariantValue } from '~/utilities/override-styled-variant-value/overrideStyledVariantValue'\n\nexport const StyledChipContent = styled('span', {\n base: [\n 'inline-flex',\n 'items-center',\n 'px-1',\n 'grow',\n 'overflow-hidden',\n 'text-ellipsis',\n 'whitespace-nowrap',\n '*:not-last:mr-1'\n ]\n})\n\nconst toIconSize = { sm: 'sm', md: 'sm', lg: 'md' }\n\nexport const ChipIcon = (props: React.ComponentProps<typeof Icon>) => {\n const rootContext = React.useContext(ChipRootContext)\n const { size } = rootContext\n const iconSize = React.useMemo(\n () => overrideStyledVariantValue(size, (s) => toIconSize[s]),\n [size]\n )\n return <Icon {...props} size={iconSize} />\n}\n\nconst ChipContent = ({ children, ...rest }) => {\n const childrenArray = React.Children.toArray(children)\n const isSingleChild = childrenArray.length <= 1\n return (\n <StyledChipContent {...rest}>\n {\n childrenArray.map((child, index) => {\n if (!isSingleChild && typeof child === 'string')\n return (\n <span\n key={child}\n className=\"overflow-hidden text-ellipsis whitespace-nowrap\"\n >\n {child}\n </span>\n )\n if (\n React.isValidElement<React.ComponentPropsWithoutRef<typeof Icon>>(\n child\n ) &&\n child.type === Icon\n ) {\n return <ChipIcon key={`icon-${index}`} {...child.props} />\n }\n return child\n }) as React.ReactElement<unknown>[]\n }\n </StyledChipContent>\n )\n}\n\nexport const StyledRoot = styled('div', {\n base: [\n 'flex',\n 'px-2',\n 'border',\n 'rounded-md',\n 'items-center',\n 'font-body',\n 'max-w-full',\n 'border-primary-800',\n 'text-primary-900',\n 'bg-primary-100',\n 'disabled:opacity-30',\n 'disabled:pointer-events-none'\n ],\n variants: {\n size: {\n sm: ['h-6', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n md: ['h-8', 'text-sm', 'leading-[1.53]', 'capsize-[0.4056]'],\n lg: ['h-10', 'text-md', 'leading-normal', 'capsize-[0.3864]']\n },\n appearance: {\n standard: [],\n modern: ['border-grey-900', 'text-grey-900', 'bg-grey-100']\n }\n }\n})\n\nexport type TChipRootContext = React.ComponentProps<typeof StyledRoot>\nexport type TChipRootProviderProps = TChipRootContext\n\nexport const ChipRootContext = React.createContext<TChipRootContext>({})\n\nexport const ChipRootProvider = ({\n size,\n children\n}: TChipRootProviderProps) => {\n const value = React.useMemo<TChipRootContext>(() => ({ size }), [size])\n return (\n <ChipRootContext.Provider value={value}>\n {children}\n </ChipRootContext.Provider>\n )\n}\n\nexport type TChipRootProps = TChipRootProviderProps\n\nconst ChipRoot = React.forwardRef<HTMLDivElement, TChipRootProps>(\n ({ size = 'md', ...rest }, ref) => {\n return (\n <ChipRootProvider size={size}>\n <StyledRoot ref={ref} size={size} {...rest} />\n </ChipRootProvider>\n )\n }\n)\n\nexport const Chip = Object.assign(ChipRoot, {\n Content: ChipContent,\n Icon: ChipIcon\n})\n\nChipRoot.displayName = 'Chip'\n"],"mappings":";;;;;;AAMA,IAAa,oBAAoB,OAAO,QAAQ,EAC9C,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,aAAa;CAAE,IAAI;CAAM,IAAI;CAAM,IAAI;CAAM;AAEnD,IAAa,YAAY,UAA6C;CAEpE,MAAM,EAAE,SADY,QAAM,WAAW,gBAAgB;CAErD,MAAM,WAAW,QAAM,cACf,2BAA2B,OAAO,MAAM,WAAW,GAAG,EAC5D,CAAC,KAAK,CACP;AACD,QAAO,oBAAC,MAAD;EAAM,GAAI;EAAO,MAAM;EAAY,CAAA;;AAG5C,IAAM,eAAe,EAAE,UAAU,GAAG,WAAW;CAC7C,MAAM,gBAAgB,QAAM,SAAS,QAAQ,SAAS;CACtD,MAAM,gBAAgB,cAAc,UAAU;AAC9C,QACE,oBAAC,mBAAD;EAAmB,GAAI;YAEnB,cAAc,KAAK,OAAO,UAAU;AAClC,OAAI,CAAC,iBAAiB,OAAO,UAAU,SACrC,QACE,oBAAC,QAAD;IAEE,WAAU;cAET;IACI,EAJA,MAIA;AAEX,OACE,QAAM,eACJ,MACD,IACD,MAAM,SAAS,KAEf,QAAO,oBAAC,UAAD,EAAgC,GAAI,MAAM,OAAS,EAApC,QAAQ,QAA4B;AAE5D,UAAO;IACP;EAEc,CAAA;;AAIxB,IAAa,aAAa,OAAO,OAAO;CACtC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAO;IAAW;IAAkB;IAAmB;GAC5D,IAAI;IAAC;IAAO;IAAW;IAAkB;IAAmB;GAC5D,IAAI;IAAC;IAAQ;IAAW;IAAkB;IAAmB;GAC9D;EACD,YAAY;GACV,UAAU,EAAE;GACZ,QAAQ;IAAC;IAAmB;IAAiB;IAAc;GAC5D;EACF;CACF,CAAC;AAKF,IAAa,kBAAkB,QAAM,cAAgC,EAAE,CAAC;AAExE,IAAa,oBAAoB,EAC/B,MACA,eAC4B;CAC5B,MAAM,QAAQ,QAAM,eAAiC,EAAE,MAAM,GAAG,CAAC,KAAK,CAAC;AACvE,QACE,oBAAC,gBAAgB,UAAjB;EAAiC;EAC9B;EACwB,CAAA;;AAM/B,IAAM,WAAW,QAAM,YACpB,EAAE,OAAO,MAAM,GAAG,QAAQ,QAAQ;AACjC,QACE,oBAAC,kBAAD;EAAwB;YACtB,oBAAC,YAAD;GAAiB;GAAW;GAAM,GAAI;GAAQ,CAAA;EAC7B,CAAA;EAGxB;AAED,IAAa,OAAO,OAAO,OAAO,UAAU;CAC1C,SAAS;CACT,MAAM;CACP,CAAC;AAEF,SAAS,cAAc"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export declare const ChipGroup: import("react").ForwardRefExoticComponent<Omit<
|
|
2
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, never> & {
|
|
1
|
+
export declare const ChipGroup: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & {
|
|
4
2
|
as?: import("react").ElementType;
|
|
5
3
|
}>;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DismissibleGroup } from '../../components/dismissible-group';
|
|
3
|
-
declare const StyledChipDismissibleGroupItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "appearance" | "size"> & {
|
|
3
|
+
declare const StyledChipDismissibleGroupItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "appearance" | "size"> & {
|
|
6
4
|
size?: "sm" | "md" | "lg" | undefined;
|
|
7
5
|
appearance?: "standard" | "modern" | undefined;
|
|
8
6
|
} & {
|
|
9
7
|
as?: React.ElementType;
|
|
10
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>,
|
|
11
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
-
}, never> & {
|
|
8
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>, never> & {
|
|
13
9
|
as?: React.ElementType;
|
|
14
10
|
}>;
|
|
15
11
|
export type TChipDismissibleGroupItem = React.ComponentProps<typeof DismissibleGroup.Item> & React.ComponentProps<typeof StyledChipDismissibleGroupItem> & {
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as ToggleGroup from '@radix-ui/react-toggle-group';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
declare const StyledChipToggleGroupItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
4
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
5
|
-
}, "appearance" | "size"> & {
|
|
3
|
+
declare const StyledChipToggleGroupItem: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "appearance" | "size"> & {
|
|
6
4
|
size?: "sm" | "md" | "lg" | undefined;
|
|
7
5
|
appearance?: "standard" | "modern" | undefined;
|
|
8
6
|
} & {
|
|
9
7
|
as?: React.ElementType;
|
|
10
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>, "
|
|
11
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
-
}, "appearance"> & {
|
|
8
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>, "appearance"> & {
|
|
13
9
|
appearance?: "standard" | "modern" | undefined;
|
|
14
10
|
} & {
|
|
15
11
|
as?: React.ElementType;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const ChipToggleGroupRoot: React.ForwardRefExoticComponent<(Omit<Omit<
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, never> & {
|
|
2
|
+
export declare const ChipToggleGroupRoot: React.ForwardRefExoticComponent<(Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & {
|
|
5
3
|
as?: React.ElementType;
|
|
6
4
|
} & Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
|
|
7
5
|
disableDeselect?: boolean;
|
|
8
|
-
}, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<
|
|
9
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
10
|
-
}, never> & {
|
|
6
|
+
}, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & {
|
|
11
7
|
as?: React.ElementType;
|
|
12
8
|
} & Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement> & {
|
|
13
9
|
disableDeselect?: boolean;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { ComboboxOptionText } from '@reach/combobox';
|
|
2
2
|
export declare const Combobox: import("@reach/utils/polymorphic").ForwardRefComponent<"div", import("@reach/combobox").ComboboxProps> & {
|
|
3
3
|
displayName: string;
|
|
4
|
-
Option: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
5
|
-
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
6
|
-
}, "as" | keyof import("@reach/combobox").ComboboxOptionProps> & import("@reach/combobox").ComboboxOptionProps & {
|
|
4
|
+
Option: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "as" | keyof import("@reach/combobox").ComboboxOptionProps> & import("@reach/combobox").ComboboxOptionProps & {
|
|
7
5
|
as?: "li" | undefined;
|
|
8
6
|
}, never> & {
|
|
9
7
|
as?: import("react").ElementType;
|
|
10
8
|
}>;
|
|
11
|
-
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
12
|
-
ref?: ((instance: HTMLInputElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLInputElement> | null | undefined;
|
|
13
|
-
}, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
9
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
14
10
|
as?: "input" | undefined;
|
|
15
11
|
}, "appearance" | "size" | "theme" | "state"> & {
|
|
16
12
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -20,16 +16,12 @@ export declare const Combobox: import("@reach/utils/polymorphic").ForwardRefComp
|
|
|
20
16
|
} & {
|
|
21
17
|
as?: import("react").ElementType;
|
|
22
18
|
}, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
|
-
Popover: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
24
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
25
|
-
}, "as" | keyof import("@reach/popover").PopoverProps | "portal"> & import("@reach/combobox").ComboboxPopoverProps & Partial<import("@reach/popover").PopoverProps> & {
|
|
19
|
+
Popover: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | keyof import("@reach/popover").PopoverProps | "portal"> & import("@reach/combobox").ComboboxPopoverProps & Partial<import("@reach/popover").PopoverProps> & {
|
|
26
20
|
as?: "div" | undefined;
|
|
27
21
|
}, never> & {
|
|
28
22
|
as?: import("react").ElementType;
|
|
29
23
|
}>;
|
|
30
|
-
List: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
31
|
-
ref?: ((instance: HTMLUListElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLUListElement> | null | undefined;
|
|
32
|
-
}, "as" | "persistSelection"> & import("@reach/combobox").ComboboxListProps & {
|
|
24
|
+
List: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "as" | "persistSelection"> & import("@reach/combobox").ComboboxListProps & {
|
|
33
25
|
as?: "ul" | undefined;
|
|
34
26
|
}, never> & {
|
|
35
27
|
as?: import("react").ElementType;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const StyledComboboxInput: React.ForwardRefExoticComponent<Omit<Omit<
|
|
3
|
-
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
4
|
-
}, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
2
|
+
export declare const StyledComboboxInput: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
5
3
|
as?: "input" | undefined;
|
|
6
4
|
}, "appearance" | "size" | "theme" | "state"> & {
|
|
7
5
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -12,9 +10,7 @@ export declare const StyledComboboxInput: React.ForwardRefExoticComponent<Omit<O
|
|
|
12
10
|
as?: React.ElementType;
|
|
13
11
|
}>;
|
|
14
12
|
export type ComboboxInputProps = React.ComponentProps<typeof StyledComboboxInput>;
|
|
15
|
-
export declare const ComboboxInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<
|
|
16
|
-
ref?: ((instance: HTMLInputElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLInputElement> | null | undefined;
|
|
17
|
-
}, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
13
|
+
export declare const ComboboxInput: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "as" | keyof import("@reach/combobox").ComboboxInputProps> & import("@reach/combobox").ComboboxInputProps & {
|
|
18
14
|
as?: "input" | undefined;
|
|
19
15
|
}, "appearance" | "size" | "theme" | "state"> & {
|
|
20
16
|
size?: "sm" | "md" | "lg" | undefined;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const ComboboxList: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
2
|
-
ref?: ((instance: HTMLUListElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLUListElement> | null | undefined;
|
|
3
|
-
}, "as" | "persistSelection"> & import("@reach/combobox").ComboboxListProps & {
|
|
1
|
+
export declare const ComboboxList: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "as" | "persistSelection"> & import("@reach/combobox").ComboboxListProps & {
|
|
4
2
|
as?: "ul" | undefined;
|
|
5
3
|
}, never> & {
|
|
6
4
|
as?: import("react").ElementType;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const ComboboxOption: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
2
|
-
ref?: ((instance: HTMLLIElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLLIElement> | null | undefined;
|
|
3
|
-
}, "as" | keyof import("@reach/combobox").ComboboxOptionProps> & import("@reach/combobox").ComboboxOptionProps & {
|
|
1
|
+
export declare const ComboboxOption: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "as" | keyof import("@reach/combobox").ComboboxOptionProps> & import("@reach/combobox").ComboboxOptionProps & {
|
|
4
2
|
as?: "li" | undefined;
|
|
5
3
|
}, never> & {
|
|
6
4
|
as?: import("react").ElementType;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export declare const ComboboxPopover: import("react").ForwardRefExoticComponent<Omit<Omit<
|
|
2
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, "as" | keyof import("@reach/popover").PopoverProps | "portal"> & import("@reach/combobox").ComboboxPopoverProps & Partial<import("@reach/popover").PopoverProps> & {
|
|
1
|
+
export declare const ComboboxPopover: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "as" | keyof import("@reach/popover").PopoverProps | "portal"> & import("@reach/combobox").ComboboxPopoverProps & Partial<import("@reach/popover").PopoverProps> & {
|
|
4
2
|
as?: "div" | undefined;
|
|
5
3
|
}, never> & {
|
|
6
4
|
as?: import("react").ElementType;
|
|
@@ -23,9 +23,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
23
23
|
* Can be configured with alternating colours of rows. If you need more customisation options,
|
|
24
24
|
* you can build your own implementation with `useDataTable()` and the UI-only `Table` components.
|
|
25
25
|
*/
|
|
26
|
-
Body: ({ striped, rowAction, ...props }: Omit<Omit<
|
|
27
|
-
ref?: ((instance: HTMLTableSectionElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
28
|
-
}, "striped"> & {
|
|
26
|
+
Body: ({ striped, rowAction, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "striped"> & {
|
|
29
27
|
striped?: boolean | undefined;
|
|
30
28
|
} & {
|
|
31
29
|
as?: import("react").ElementType;
|
|
@@ -42,9 +40,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
42
40
|
/**
|
|
43
41
|
* Used in place of `DataTable.Table` to render a table with rows that the user can sort by drag-and-drop
|
|
44
42
|
*/
|
|
45
|
-
DragAndDropTable: ({ idColumn, onDragAndDrop, sortable, striped, theme, className, ...props }: Omit<Omit<Omit<
|
|
46
|
-
ref?: ((instance: HTMLTableElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableElement> | null | undefined;
|
|
47
|
-
}, "size" | "corners"> & {
|
|
43
|
+
DragAndDropTable: ({ idColumn, onDragAndDrop, sortable, striped, theme, className, ...props }: Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, "size" | "corners"> & {
|
|
48
44
|
size?: "md" | "lg" | "xl" | undefined;
|
|
49
45
|
corners?: "round" | "square" | undefined;
|
|
50
46
|
} & {
|
|
@@ -54,9 +50,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
54
50
|
scrollContainerCls?: string | string[];
|
|
55
51
|
scrollContainerkey?: string;
|
|
56
52
|
maxRowDepth?: number;
|
|
57
|
-
}, "ref"> & import("react").RefAttributes<HTMLTableElement>, "children" | "numberOfStickyColumns"> & Partial<Pick<Omit<Omit<
|
|
58
|
-
ref?: ((instance: HTMLTableSectionElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
59
|
-
}, "theme" | "isSticky"> & {
|
|
53
|
+
}, "ref"> & import("react").RefAttributes<HTMLTableElement>, "children" | "numberOfStickyColumns"> & Partial<Pick<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "theme" | "isSticky"> & {
|
|
60
54
|
theme?: "primary" | "white" | "primaryDark" | "light" | "primaryLight" | undefined;
|
|
61
55
|
isSticky?: boolean | undefined;
|
|
62
56
|
} & {
|
|
@@ -67,9 +61,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
67
61
|
stickyOffset?: number;
|
|
68
62
|
showTotalInFirstColumn?: boolean;
|
|
69
63
|
totalSuffix?: string;
|
|
70
|
-
}, "theme" | "sortable">> & Partial<Pick<Omit<
|
|
71
|
-
ref?: ((instance: HTMLTableSectionElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
72
|
-
}, "striped"> & {
|
|
64
|
+
}, "theme" | "sortable">> & Partial<Pick<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "striped"> & {
|
|
73
65
|
striped?: boolean | undefined;
|
|
74
66
|
} & {
|
|
75
67
|
as?: import("react").ElementType;
|
|
@@ -108,9 +100,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
108
100
|
* If you need more customisation options, you can build your own implementation
|
|
109
101
|
* with `useDataTable` and the UI-only `Table` components.
|
|
110
102
|
*/
|
|
111
|
-
Head: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: Omit<Omit<
|
|
112
|
-
ref?: ((instance: HTMLTableSectionElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableSectionElement> | null | undefined;
|
|
113
|
-
}, "theme" | "isSticky"> & {
|
|
103
|
+
Head: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "theme" | "isSticky"> & {
|
|
114
104
|
theme?: "primary" | "white" | "primaryDark" | "light" | "primaryLight" | undefined;
|
|
115
105
|
isSticky?: boolean | undefined;
|
|
116
106
|
} & {
|
|
@@ -121,15 +111,13 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
121
111
|
stickyOffset?: number;
|
|
122
112
|
showTotalInFirstColumn?: boolean;
|
|
123
113
|
totalSuffix?: string;
|
|
124
|
-
}) => React.ReactElement
|
|
114
|
+
}) => React.ReactElement<unknown>;
|
|
125
115
|
/** Default header implementation for `DataTable`
|
|
126
116
|
*
|
|
127
117
|
* Can be configured to make the column sortable. If you need more customisation options,
|
|
128
118
|
* you can build your own implementation with the UI-only `Table` components.
|
|
129
119
|
*/
|
|
130
|
-
HeaderCell: ({ header, includeTotal, totalSuffix, children, className, ...props }: Omit<
|
|
131
|
-
ref?: ((instance: HTMLTableHeaderCellElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLTableHeaderCellElement> | null | undefined;
|
|
132
|
-
}, never> & {
|
|
120
|
+
HeaderCell: ({ header, includeTotal, totalSuffix, children, className, ...props }: Omit<import("react").DetailedHTMLProps<import("react").ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>, never> & {
|
|
133
121
|
as?: import("react").ElementType;
|
|
134
122
|
} & {
|
|
135
123
|
header: import("@tanstack/table-core").Header<Record<string, unknown>, unknown>;
|
|
@@ -155,9 +143,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
155
143
|
*
|
|
156
144
|
*/
|
|
157
145
|
Pagination: {
|
|
158
|
-
({ colorScheme, ...props }: Omit<
|
|
159
|
-
ref?: ((instance: HTMLElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLElement> | null | undefined;
|
|
160
|
-
}, never> & {
|
|
146
|
+
({ colorScheme, ...props }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never> & {
|
|
161
147
|
as?: import("react").ElementType;
|
|
162
148
|
} & {
|
|
163
149
|
colorScheme?: import("../..").TcolorScheme;
|
|
@@ -187,11 +173,9 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
187
173
|
* If you need more customisation, you can compose your own implentation, `asyncDataState`
|
|
188
174
|
* can be retrieved from `useDataTable`
|
|
189
175
|
*/
|
|
190
|
-
Loading: (props: React.ComponentProps<import("react").ForwardRefExoticComponent<Omit<
|
|
176
|
+
Loading: (props: React.ComponentProps<import("react").ForwardRefExoticComponent<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
|
191
177
|
message?: string;
|
|
192
178
|
size?: "sm" | "md" | "lg";
|
|
193
|
-
}, "ref"> & {
|
|
194
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
195
179
|
}, never> & {
|
|
196
180
|
as?: import("react").ElementType;
|
|
197
181
|
}>>) => import("react").JSX.Element | null;
|
|
@@ -207,15 +191,13 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
207
191
|
*
|
|
208
192
|
*/
|
|
209
193
|
Error: ({ children }: {
|
|
210
|
-
children: (retry?: import("./DataTable.types").DataTableContextType["runAsyncData"]) => React.ReactElement
|
|
211
|
-
}) => import("react").ReactElement<
|
|
194
|
+
children: (retry?: import("./DataTable.types").DataTableContextType["runAsyncData"]) => React.ReactElement<unknown>;
|
|
195
|
+
}) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
212
196
|
/** Empty state implementation for `DataTable`.
|
|
213
197
|
*
|
|
214
198
|
* Extends the EmptyState component
|
|
215
199
|
*/
|
|
216
|
-
EmptyState: ({ children, ...rest }: Omit<
|
|
217
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
218
|
-
}, "size"> & {
|
|
200
|
+
EmptyState: ({ children, ...rest }: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "size"> & {
|
|
219
201
|
size?: ("sm" | "md" | "lg" | "xs" | "xl" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg" | "xs" | "xl">>) | undefined;
|
|
220
202
|
} & {
|
|
221
203
|
as?: import("react").ElementType;
|
|
@@ -236,27 +218,27 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
236
218
|
checked: boolean | "indeterminate";
|
|
237
219
|
onCheckedChange: (value: boolean) => void;
|
|
238
220
|
label?: string;
|
|
239
|
-
}) => React.ReactElement
|
|
221
|
+
}) => React.ReactElement<unknown>;
|
|
240
222
|
/** Bulk actions for selected rows.
|
|
241
223
|
*
|
|
242
224
|
* Renders a toolbar with actions that can be applied to all selected rows
|
|
243
225
|
*/
|
|
244
226
|
BulkActions: (({ children, ...rest }: {
|
|
245
227
|
children: React.ReactElement<React.ComponentProps<({ children }: {
|
|
246
|
-
children: React.ReactElement
|
|
247
|
-
}) => React.ReactElement | null>> | React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
228
|
+
children: React.ReactElement<unknown>;
|
|
229
|
+
}) => React.ReactElement<unknown> | null>> | React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
248
230
|
cancelLabel?: string;
|
|
249
231
|
children: React.ReactNode;
|
|
250
232
|
}) => import("react").JSX.Element | null>> | [React.ReactElement<React.ComponentProps<({ children }: {
|
|
251
|
-
children: React.ReactElement
|
|
252
|
-
}) => React.ReactElement | null>>, React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
233
|
+
children: React.ReactElement<unknown>;
|
|
234
|
+
}) => React.ReactElement<unknown> | null>>, React.ReactElement<React.ComponentProps<({ cancelLabel, children }: {
|
|
253
235
|
cancelLabel?: string;
|
|
254
236
|
children: React.ReactNode;
|
|
255
237
|
}) => import("react").JSX.Element | null>>];
|
|
256
238
|
}) => import("react").JSX.Element) & {
|
|
257
239
|
DefaultActions: ({ children }: {
|
|
258
|
-
children: React.ReactElement
|
|
259
|
-
}) => React.ReactElement | null;
|
|
240
|
+
children: React.ReactElement<unknown>;
|
|
241
|
+
}) => React.ReactElement<unknown> | null;
|
|
260
242
|
SelectedRowActions: ({ cancelLabel, children }: {
|
|
261
243
|
cancelLabel?: string;
|
|
262
244
|
children: React.ReactNode;
|
|
@@ -266,9 +248,7 @@ export declare const DataTable: (({ columns, data: dataProp, getAsyncData, defau
|
|
|
266
248
|
*
|
|
267
249
|
* Renders a toolbar with actions that can be applied to all selected rows
|
|
268
250
|
*/
|
|
269
|
-
BulkActionsFloating: (({ children, ...rest }: React.PropsWithChildren<React.ComponentProps<import("react").ForwardRefExoticComponent<Omit<
|
|
270
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
271
|
-
}, never> & {
|
|
251
|
+
BulkActionsFloating: (({ children, ...rest }: React.PropsWithChildren<React.ComponentProps<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & {
|
|
272
252
|
as?: import("react").ElementType;
|
|
273
253
|
}>>>) => import("react").JSX.Element | null) & {
|
|
274
254
|
SelectedRowActions: ({ cancelLabel, showDividers, children }: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const BulkActionsDefaultActions: ({ children }: {
|
|
3
|
-
children: React.ReactElement
|
|
4
|
-
}) => React.ReactElement | null;
|
|
3
|
+
children: React.ReactElement<unknown>;
|
|
4
|
+
}) => React.ReactElement<unknown> | null;
|
|
5
5
|
declare const BulkActionsSelectedRowActions: ({ cancelLabel, children }: {
|
|
6
6
|
cancelLabel?: string;
|
|
7
7
|
children: React.ReactNode;
|
|
@@ -10,8 +10,8 @@ export declare const DataTableBulkActions: (({ children, ...rest }: {
|
|
|
10
10
|
children: React.ReactElement<React.ComponentProps<typeof BulkActionsDefaultActions>> | React.ReactElement<React.ComponentProps<typeof BulkActionsSelectedRowActions>> | [React.ReactElement<React.ComponentProps<typeof BulkActionsDefaultActions>>, React.ReactElement<React.ComponentProps<typeof BulkActionsSelectedRowActions>>];
|
|
11
11
|
}) => React.JSX.Element) & {
|
|
12
12
|
DefaultActions: ({ children }: {
|
|
13
|
-
children: React.ReactElement
|
|
14
|
-
}) => React.ReactElement | null;
|
|
13
|
+
children: React.ReactElement<unknown>;
|
|
14
|
+
}) => React.ReactElement<unknown> | null;
|
|
15
15
|
SelectedRowActions: ({ cancelLabel, children }: {
|
|
16
16
|
cancelLabel?: string;
|
|
17
17
|
children: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableBulkActions.js","names":[],"sources":["../../../src/components/data-table/DataTableBulkActions.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Button } from '~/components/button/Button'\nimport { Divider } from '~/components/divider/Divider'\nimport { styled } from '~/styled'\n\nimport { useDataTable } from './DataTableContext'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement
|
|
1
|
+
{"version":3,"file":"DataTableBulkActions.js","names":[],"sources":["../../../src/components/data-table/DataTableBulkActions.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Button } from '~/components/button/Button'\nimport { Divider } from '~/components/divider/Divider'\nimport { styled } from '~/styled'\n\nimport { useDataTable } from './DataTableContext'\nimport { DataTableMetaData } from './DataTableMetaData'\n\nconst StyledContainer = styled('div', {\n base: [\n 'flex',\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement<unknown>\n}): React.ReactElement<unknown> | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTableMetaData />\n <div className=\"flex items-center justify-end\">{children}</div>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n"],"mappings":";;;;;;;;AASA,IAAM,kBAAkB,OAAO,OAAO;CACpC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,eAAe,EACb,MAAM,CAAC,iBAAiB,EACzB,EACF;CACF,CAAC;AAEF,IAAM,6BAA6B,EACjC,eAGwC;CACxC,MAAM,EAAE,iBAAiB,cAAc;AAEvC,KAAI,OAAO,KAAK,gBAAgB,EAAE,CAAC,CAAC,SAAS,EAAG,QAAO;AAEvD,QAAO;;AAGT,IAAM,iCAAiC,EACrC,cAAc,UACd,eAII;CACJ,MAAM,EAAE,2BAA2B,iBAAiB,cAAc;CAElE,MAAM,kCAAkC,0BAA0B,MAAM;AAExE,KAAI,OAAO,KAAK,gBAAgB,EAAE,CAAC,CAAC,WAAW,EAAG,QAAO;AAEzD,QACE,qBAAA,UAAA,EAAA,UAAA;EACG;EACA,QAAM,SAAS,MAAM,SAAS,GAAG,KAChC,oBAAC,SAAD;GAAS,aAAY;GAAW,WAAU;GAAS,CAAA;EAErD,oBAAC,QAAD;GAAQ,OAAM;GAAU,SAAS;aAC9B;GACM,CAAA;EACR,EAAA,CAAA;;AAIP,IAAa,uBAAuB,OAAO,QACxC,EACC,UACA,GAAG,WAiBC;CACJ,MAAM,EAAE,iBAAiB,cAAc;AAIvC,QACE,qBAAC,iBAAD;EAAgC,eAHZ,OAAO,KAAK,gBAAgB,EAAE,CAAC,CAAC,SAAS;EAGd,GAAI;YAAnD,CACE,oBAAC,mBAAD,EAAqB,CAAA,EACrB,oBAAC,OAAD;GAAK,WAAU;GAAiC;GAAe,CAAA,CAC/C;;GAGtB;CACE,gBAAgB;CAChB,oBAAoB;CACrB,CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const StyledContainer: React.ForwardRefExoticComponent<Omit<
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
4
|
-
}, never> & {
|
|
2
|
+
declare const StyledContainer: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & {
|
|
5
3
|
as?: React.ElementType;
|
|
6
4
|
}>;
|
|
7
5
|
export declare const DataTableBulkActionsFloating: (({ children, ...rest }: React.PropsWithChildren<React.ComponentProps<typeof StyledContainer>>) => React.JSX.Element | null) & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DataTableContextType } from './DataTable.types';
|
|
3
3
|
export declare const DataTableError: ({ children }: {
|
|
4
|
-
children: (retry?: DataTableContextType["runAsyncData"]) => React.ReactElement
|
|
5
|
-
}) => React.ReactElement<
|
|
4
|
+
children: (retry?: DataTableContextType["runAsyncData"]) => React.ReactElement<unknown>;
|
|
5
|
+
}) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableError.js","names":[],"sources":["../../../src/components/data-table/DataTableError.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { AsyncDataState, DataTableContextType } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableError = ({\n children\n}: {\n children: (retry?: DataTableContextType['runAsyncData']) => React.ReactElement
|
|
1
|
+
{"version":3,"file":"DataTableError.js","names":[],"sources":["../../../src/components/data-table/DataTableError.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { AsyncDataState, DataTableContextType } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableError = ({\n children\n}: {\n children: (\n retry?: DataTableContextType['runAsyncData']\n ) => React.ReactElement<unknown>\n}) => {\n const { asyncDataState, runAsyncData } = useDataTable()\n\n if (asyncDataState !== AsyncDataState.REJECTED) return null\n\n return children(runAsyncData)\n}\n"],"mappings":";;;AAKA,IAAa,kBAAkB,EAC7B,eAKI;CACJ,MAAM,EAAE,gBAAgB,iBAAiB,cAAc;AAEvD,KAAI,mBAAmB,eAAe,SAAU,QAAO;AAEvD,QAAO,SAAS,aAAa"}
|
|
@@ -7,5 +7,5 @@ type DataTableHeadProps = Omit<React.ComponentProps<typeof Table.Header>, 'child
|
|
|
7
7
|
showTotalInFirstColumn?: boolean;
|
|
8
8
|
totalSuffix?: string;
|
|
9
9
|
};
|
|
10
|
-
export declare const DataTableHead: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: DataTableHeadProps) => React.ReactElement
|
|
10
|
+
export declare const DataTableHead: ({ sortable, theme, isSticky, stickyOffset, showTotalInFirstColumn, totalSuffix, style, className, ...props }: DataTableHeadProps) => React.ReactElement<unknown>;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableHead.js","names":[],"sources":["../../../src/components/data-table/DataTableHead.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...props\n}: DataTableHeadProps): React.ReactElement => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...props}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n"],"mappings":";;;;;;;;AAoBA,IAAa,iBAAiB,EAC5B,WAAW,MACX,QAAQ,SACR,WAAW,OACX,eAAe,GACf,wBACA,aACA,OACA,WACA,GAAG,
|
|
1
|
+
{"version":3,"file":"DataTableHead.js","names":[],"sources":["../../../src/components/data-table/DataTableHead.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableHeaderCell } from './DataTableHeaderCell'\nimport { DataTableSelectAllRowsCheckbox } from './DataTableSelectAllRowsCheckbox'\n\ntype DataTableHeadProps = Omit<\n React.ComponentProps<typeof Table.Header>,\n 'children'\n> & {\n sortable?: boolean\n isSticky?: boolean\n stickyOffset?: number\n showTotalInFirstColumn?: boolean\n totalSuffix?: string\n}\n\nexport const DataTableHead = ({\n sortable = true,\n theme = 'light',\n isSticky = false,\n stickyOffset = 0,\n showTotalInFirstColumn,\n totalSuffix,\n style,\n className,\n ...props\n}: DataTableHeadProps): React.ReactElement<unknown> => {\n const {\n getHeaderGroups,\n setIsSortable,\n enableRowSelection,\n getCanSomeRowsExpand,\n tablePosition,\n setTablePosition\n } = useDataTable()\n\n React.useEffect(() => {\n setIsSortable(sortable)\n }, [sortable, setIsSortable])\n\n const tableHeaderRowRef = React.useRef<HTMLTableRowElement>(null)\n const tableRef = React.useRef<HTMLTableElement | null>(null)\n const headerOffsetRef = React.useRef(0)\n\n const [headerOffset, setHeaderOffset] = React.useState<number>(0)\n const [headerHide, setHeaderHide] = React.useState<boolean>(false)\n\n const tableHeadElement = tableHeaderRowRef?.current?.closest('thead')\n\n if (tableHeadElement && tablePosition?.offsetTop === null) {\n const tableHeadHeight = tableHeadElement.getBoundingClientRect().height\n const intersectionOffset = stickyOffset + tableHeadHeight\n if (tablePosition) {\n setTablePosition({ ...tablePosition, offsetTop: intersectionOffset || 0 })\n }\n }\n\n React.useEffect(() => {\n if (!isSticky) return\n\n if (!tableRef.current && tableHeaderRowRef.current) {\n tableRef.current = tableHeaderRowRef.current.closest(\n 'table'\n ) as HTMLTableElement | null\n }\n\n if (tableRef.current) {\n if (tablePosition?.top !== null && tablePosition?.bottom !== null) {\n const newOffset =\n tablePosition?.top != null &&\n tablePosition?.bottom != null &&\n tablePosition.top < stickyOffset &&\n tablePosition.bottom > 100\n ? -tablePosition.top + stickyOffset\n : 0\n\n if (newOffset !== 0) setHeaderHide(true)\n\n headerOffsetRef.current = newOffset\n setHeaderOffset(newOffset)\n\n requestAnimationFrame(() => {\n setHeaderHide(false)\n })\n }\n }\n }, [isSticky, stickyOffset, tablePosition])\n\n return (\n <Table.Header\n theme={theme}\n style={{\n ...style,\n '--header-offset': `${headerOffset}px`\n }}\n {...props}\n className={cn(\n 'relative',\n 'z-3',\n '[&_tr:not(:last-child)>th]:border-b-none',\n '[&_tr:not(:first-child)>th]:rounded-none!',\n className\n )}\n >\n {getHeaderGroups().map((headerGroup) => {\n return (\n <Table.Row\n key={headerGroup.id}\n ref={tableHeaderRowRef}\n className={\n isSticky && headerOffset !== 0\n ? cn(\n 'translate-y-(--header-offset)',\n headerHide\n ? 'delay-0ms opacity-0 transition-none'\n : 'delay-150ms opacity-100 transition-opacity duration-100',\n '[&_th]:last:before:absolute',\n '[&_th]:last:before:bottom-0',\n '[&_th]:last:before:pointer-events-none',\n '[&_th]:last:before:right-0',\n '[&_th]:last:before:shadow-sm',\n '[&_th]:last:before:top-0',\n '[&_th]:last:before:w-full'\n )\n : undefined\n }\n >\n {getCanSomeRowsExpand() && <Table.HeaderCell className=\"w-10\" />}\n {enableRowSelection && (\n <Table.HeaderCell className=\"w-10\">\n <DataTableSelectAllRowsCheckbox />\n </Table.HeaderCell>\n )}\n {headerGroup.headers.map((header, index) => (\n <DataTableHeaderCell\n header={header}\n key={header.id}\n includeTotal={index === 0 && showTotalInFirstColumn}\n totalSuffix={totalSuffix}\n />\n ))}\n </Table.Row>\n )\n })}\n </Table.Header>\n )\n}\n"],"mappings":";;;;;;;;AAoBA,IAAa,iBAAiB,EAC5B,WAAW,MACX,QAAQ,SACR,WAAW,OACX,eAAe,GACf,wBACA,aACA,OACA,WACA,GAAG,YACkD;CACrD,MAAM,EACJ,iBACA,eACA,oBACA,sBACA,eACA,qBACE,cAAc;AAElB,SAAM,gBAAgB;AACpB,gBAAc,SAAS;IACtB,CAAC,UAAU,cAAc,CAAC;CAE7B,MAAM,oBAAoB,QAAM,OAA4B,KAAK;CACjE,MAAM,WAAW,QAAM,OAAgC,KAAK;CAC5D,MAAM,kBAAkB,QAAM,OAAO,EAAE;CAEvC,MAAM,CAAC,cAAc,mBAAmB,QAAM,SAAiB,EAAE;CACjE,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAkB,MAAM;CAElE,MAAM,mBAAmB,mBAAmB,SAAS,QAAQ,QAAQ;AAErE,KAAI,oBAAoB,eAAe,cAAc,MAAM;EAEzD,MAAM,qBAAqB,eADH,iBAAiB,uBAAuB,CAAC;AAEjE,MAAI,cACF,kBAAiB;GAAE,GAAG;GAAe,WAAW,sBAAsB;GAAG,CAAC;;AAI9E,SAAM,gBAAgB;AACpB,MAAI,CAAC,SAAU;AAEf,MAAI,CAAC,SAAS,WAAW,kBAAkB,QACzC,UAAS,UAAU,kBAAkB,QAAQ,QAC3C,QACD;AAGH,MAAI,SAAS;OACP,eAAe,QAAQ,QAAQ,eAAe,WAAW,MAAM;IACjE,MAAM,YACJ,eAAe,OAAO,QACtB,eAAe,UAAU,QACzB,cAAc,MAAM,gBACpB,cAAc,SAAS,MACnB,CAAC,cAAc,MAAM,eACrB;AAEN,QAAI,cAAc,EAAG,eAAc,KAAK;AAExC,oBAAgB,UAAU;AAC1B,oBAAgB,UAAU;AAE1B,gCAA4B;AAC1B,mBAAc,MAAM;MACpB;;;IAGL;EAAC;EAAU;EAAc;EAAc,CAAC;AAE3C,QACE,oBAAC,MAAM,QAAP;EACS;EACP,OAAO;GACL,GAAG;GACH,mBAAmB,GAAG,aAAa;GACpC;EACD,GAAI;EACJ,WAAW,GACT,YACA,OACA,4CACA,6CACA,UACD;YAEA,iBAAiB,CAAC,KAAK,gBAAgB;AACtC,UACE,qBAAC,MAAM,KAAP;IAEE,KAAK;IACL,WACE,YAAY,iBAAiB,IACzB,GACE,iCACA,aACI,wCACA,2DACJ,+BACA,+BACA,0CACA,8BACA,gCACA,4BACA,4BACD,GACD,KAAA;cAlBR;KAqBG,sBAAsB,IAAI,oBAAC,MAAM,YAAP,EAAkB,WAAU,QAAS,CAAA;KAC/D,sBACC,oBAAC,MAAM,YAAP;MAAkB,WAAU;gBAC1B,oBAAC,gCAAD,EAAkC,CAAA;MACjB,CAAA;KAEpB,YAAY,QAAQ,KAAK,QAAQ,UAChC,oBAAC,qBAAD;MACU;MAER,cAAc,UAAU,KAAK;MAChB;MACb,EAHK,OAAO,GAGZ,CACF;KACQ;MAlCL,YAAY,GAkCP;IAEd;EACW,CAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const PendingState: React.ForwardRefExoticComponent<Omit<
|
|
2
|
+
declare const PendingState: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
message?: string;
|
|
4
4
|
size?: "sm" | "md" | "lg";
|
|
5
|
-
}, "ref"> & {
|
|
6
|
-
ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
7
5
|
}, never> & {
|
|
8
6
|
as?: React.ElementType;
|
|
9
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableRowSelectionCheckbox.js","names":[],"sources":["../../../src/components/data-table/DataTableRowSelectionCheckbox.tsx"],"sourcesContent":["import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n"],"mappings":";;;;;AAMA,IAAa,iCAAiC,EAC5C,KACA,SACA,iBACA,QAAQ,OAAO,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"DataTableRowSelectionCheckbox.js","names":[],"sources":["../../../src/components/data-table/DataTableRowSelectionCheckbox.tsx"],"sourcesContent":["import type { Row } from '@tanstack/react-table'\nimport * as React from 'react'\n\nimport { Checkbox } from '../checkbox/Checkbox'\nimport { useDataTable } from './DataTableContext'\n\nexport const DataTableRowSelectionCheckbox = ({\n row,\n checked,\n onCheckedChange,\n label = `Row ${row.id} selection`\n}: {\n row: Row<Record<string, unknown>>\n checked: boolean | 'indeterminate'\n onCheckedChange: (value: boolean) => void\n label?: string\n}): React.ReactElement<unknown> => {\n const { tableId } = useDataTable()\n\n return (\n <>\n <label htmlFor={`${tableId}_row_${row.id}_selection`} className=\"sr-only\">\n {label}\n </label>\n <Checkbox\n size=\"lg\"\n style={{ '--depth': row.depth }}\n checked={checked}\n onCheckedChange={onCheckedChange}\n name={`${tableId}_row_${row.id}_selection`}\n disabled={!row.getCanSelect()}\n className=\"mr-3 ml-[calc((var(--depth,0)*2)*4px)]\"\n />\n </>\n )\n}\n"],"mappings":";;;;;AAMA,IAAa,iCAAiC,EAC5C,KACA,SACA,iBACA,QAAQ,OAAO,IAAI,GAAG,kBAMW;CACjC,MAAM,EAAE,YAAY,cAAc;AAElC,QACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,SAAD;EAAO,SAAS,GAAG,QAAQ,OAAO,IAAI,GAAG;EAAa,WAAU;YAC7D;EACK,CAAA,EACR,oBAAC,UAAD;EACE,MAAK;EACL,OAAO,EAAE,WAAW,IAAI,OAAO;EACtB;EACQ;EACjB,MAAM,GAAG,QAAQ,OAAO,IAAI,GAAG;EAC/B,UAAU,CAAC,IAAI,cAAc;EAC7B,WAAU;EACV,CAAA,CACD,EAAA,CAAA"}
|