linkedunion-design-kit 1.11.6 → 1.11.8
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/app/layout.d.ts +1 -1
- package/dist/app/{layout.js → layout.jsx} +3 -2
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
- package/dist/src/components/Accordion/accordion.d.ts +4 -4
- package/dist/src/components/Accordion/{accordion.js → accordion.jsx} +11 -16
- package/dist/src/components/Alerts/Alert/alert.d.ts +7 -7
- package/dist/src/components/Alerts/Alert/{alert.js → alert.jsx} +21 -25
- package/dist/src/components/Alerts/Alert/alert.stories.d.ts +8 -8
- package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.d.ts +11 -11
- package/dist/src/components/Alerts/AlertDialog/{alert-dialog.js → alert-dialog.jsx} +26 -24
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.d.ts +10 -10
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +552 -0
- package/dist/src/components/AppIcons/AndroidIcon.jsx +24 -0
- package/dist/src/components/AppIcons/{AppIcon.js → AppIcon.jsx} +4 -15
- package/dist/src/components/AppIcons/AppleIcon.jsx +31 -0
- package/dist/src/components/AppIcons/PlayStoreIcon.jsx +29 -0
- package/dist/src/components/Avatar/Avatar/{Avatar.js → Avatar.jsx} +13 -18
- package/dist/src/components/Avatar/Avatar/Avatar.stories.d.ts +7 -7
- package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
- package/dist/src/components/Avatar/Avatar/{Avatar.test.js → Avatar.test.jsx} +1 -2
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +17 -0
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +32 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +20 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.d.ts +2 -2
- package/dist/src/components/Avatar/StatusIndicator/{StatusIndicator.stories.js → StatusIndicator.stories.jsx} +12 -3
- package/dist/src/components/Badge/Badge.d.ts +1 -1
- package/dist/src/components/Badge/{Badge.js → Badge.jsx} +8 -13
- package/dist/src/components/Badge/Badge.stories.d.ts +10 -10
- package/dist/src/components/Badge/Badge.stories.jsx +201 -0
- package/dist/src/components/Button/Button/Button.d.ts +3 -2
- package/dist/src/components/Button/Button/{Button.js → Button.jsx} +24 -8
- package/dist/src/components/Button/Button/Button.stories.d.ts +5 -3
- package/dist/src/components/Button/Button/{Button.stories.js → Button.stories.jsx} +1 -13
- package/dist/src/components/Button/Button/Button.test.jsx +73 -0
- package/dist/src/components/Button/IconButton/IconButton.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.js → IconButton.jsx} +4 -13
- package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.stories.js → IconButton.stories.jsx} +1 -13
- package/dist/src/components/Button/IconButton/{IconButton.test.js → IconButton.test.jsx} +5 -6
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Button/index.js +3 -2
- package/dist/src/components/Card/MultipleNews/MultiNews.d.ts +1 -1
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +71 -0
- package/dist/src/components/Card/MultipleNews/{MultiNews.stories.js → MultiNews.stories.jsx} +1 -2
- package/dist/src/components/Card/PostByCategory/PostByCategory.d.ts +1 -1
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +57 -0
- package/dist/src/components/Card/PostByCategory/{PostByCategory.stories.js → PostByCategory.stories.jsx} +1 -2
- package/dist/src/components/Card/SinglePost/SinglePost.d.ts +1 -1
- package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
- package/dist/src/components/Card/card.d.ts +2 -1
- package/dist/src/components/Card/{card.js → card.jsx} +2 -13
- package/dist/src/components/Card/contactProfile/ContactProfile.d.ts +1 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +76 -0
- package/dist/src/components/Card/contactProfile/{ContactProfile.stories.js → ContactProfile.stories.jsx} +1 -2
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.d.ts +1 -1
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
- package/dist/src/components/Card/photoAlbum/{PhotoAlbum.stories.js → PhotoAlbum.stories.jsx} +1 -13
- package/dist/src/components/Card/photoGallery/PhotoGallery.d.ts +1 -1
- package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
- package/dist/src/components/Card/photoGallery/{PhotoGallery.stories.js → PhotoGallery.stories.jsx} +1 -13
- package/dist/src/components/Checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/Checkbox/{checkbox.js → checkbox.jsx} +6 -13
- package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/src/components/ColorPicker/{ColorPicker.js → ColorPicker.jsx} +6 -13
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
- package/dist/src/components/Colors/color.d.ts +1 -1
- package/dist/src/components/Colors/{color.js → color.jsx} +1 -2
- package/dist/src/components/Colors/color.stories.jsx +20 -0
- package/dist/src/components/Colors/{color.test.js → color.test.jsx} +3 -4
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.jsx +67 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +9 -9
- package/dist/src/components/DatePicker/DatePicker.stories.jsx +291 -0
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/src/components/DateRangePicker/{DateRangePicker.js → DateRangePicker.jsx} +92 -44
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.d.ts +19 -19
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.jsx +582 -0
- package/dist/src/components/Dropdown/Combobox/Combobox.d.ts +1 -1
- package/dist/src/components/Dropdown/Combobox/{Combobox.js → Combobox.jsx} +67 -29
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.d.ts +8 -8
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
- package/dist/src/components/Dropdown/Combobox/dialog.d.ts +10 -10
- package/dist/src/components/Dropdown/Combobox/dialog.jsx +66 -0
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.d.ts +7 -3
- package/dist/src/components/Dropdown/DropdownMenu/{DropdownMenu.js → DropdownMenu.jsx} +29 -22
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.d.ts +19 -12
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +552 -0
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.d.ts +5 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.js +5 -0
- package/dist/src/components/Dropdown/Select.stories.d.ts +7 -6
- package/dist/src/components/Dropdown/{Select.stories.js → Select.stories.jsx} +71 -8
- package/dist/src/components/Dropdown/select.d.ts +10 -10
- package/dist/src/components/Dropdown/select.jsx +94 -0
- package/dist/src/components/Icons/LUIcon.d.ts +1 -1
- package/dist/src/components/Icons/{LUIcon.js → LUIcon.jsx} +10 -13
- package/dist/src/components/Icons/stories/IconDropdown.jsx +67 -0
- package/dist/src/components/Icons/stories/IconGallery.jsx +77 -0
- package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +86 -0
- package/dist/src/components/Icons/stories/LUIcon.stories.d.ts +5 -5
- package/dist/src/components/Icons/stories/{LUIcon.stories.js → LUIcon.stories.jsx} +23 -8
- package/dist/src/components/ImageUploader/imageUploader.d.ts +1 -1
- package/dist/src/components/ImageUploader/{imageUploader.js → imageUploader.jsx} +28 -13
- package/dist/src/components/Images/LuImage.d.ts +1 -1
- package/dist/src/components/Images/{LuImage.js → LuImage.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.stories.js → LuImage.stories.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.test.js → LuImage.test.jsx} +6 -18
- package/dist/src/components/Input/Input.stories.d.ts +9 -8
- package/dist/src/components/Input/Input.stories.jsx +250 -0
- package/dist/src/components/Input/input.d.ts +1 -1
- package/dist/src/components/Input/{input.js → input.jsx} +10 -13
- package/dist/src/components/Label/Label.d.ts +1 -1
- package/dist/src/components/Label/{Label.js → Label.jsx} +2 -13
- package/dist/src/components/Label/{Label.stories.js → Label.stories.jsx} +1 -13
- package/dist/src/components/Modal/Modal.d.ts +3 -3
- package/dist/src/components/Modal/{Modal.js → Modal.jsx} +20 -19
- package/dist/src/components/Modal/Modal.stories.d.ts +15 -15
- package/dist/src/components/Modal/Modal.stories.jsx +487 -0
- package/dist/src/components/Pagination/pagination.d.ts +5 -5
- package/dist/src/components/Pagination/{pagination.js → pagination.jsx} +18 -21
- package/dist/src/components/Pagination/pagination.stories.d.ts +6 -6
- package/dist/src/components/Pagination/pagination.stories.jsx +301 -0
- package/dist/src/components/RadioGroup/{RadioGroup.stories.js → RadioGroup.stories.jsx} +52 -22
- package/dist/src/components/RadioGroup/radio-group.d.ts +1 -1
- package/dist/src/components/RadioGroup/{radio-group.js → radio-group.jsx} +6 -14
- package/dist/src/components/Separator/Separator.stories.d.ts +15 -0
- package/dist/src/components/Separator/Separator.stories.jsx +94 -0
- package/dist/src/components/Separator/index.d.ts +1 -0
- package/dist/src/components/Separator/index.js +1 -0
- package/dist/src/components/Separator/separator.d.ts +4 -0
- package/dist/src/components/Separator/separator.jsx +20 -0
- package/dist/src/components/Sheet/index.d.ts +1 -0
- package/dist/src/components/Sheet/index.js +1 -0
- package/dist/src/components/Sheet/sheet.d.ts +25 -0
- package/dist/src/components/Sheet/sheet.jsx +73 -0
- package/dist/src/components/Sheet/sheet.stories.d.ts +4 -0
- package/dist/src/components/Sheet/sheet.stories.jsx +34 -0
- package/dist/src/components/Skeleton/skeleton.d.ts +14 -14
- package/dist/src/components/Skeleton/{skeleton.js → skeleton.jsx} +23 -27
- package/dist/src/components/Skeleton/skeleton.stories.d.ts +14 -14
- package/dist/src/components/Skeleton/skeleton.stories.jsx +734 -0
- package/dist/src/components/Slider/slider.d.ts +1 -1
- package/dist/src/components/Slider/slider.jsx +31 -0
- package/dist/src/components/SweetAlert/SweetAlert.d.ts +9 -9
- package/dist/src/components/SweetAlert/{SweetAlert.js → SweetAlert.jsx} +18 -21
- package/dist/src/components/SweetAlert/SweetAlert.stories.d.ts +7 -7
- package/dist/src/components/SweetAlert/{SweetAlert.stories.js → SweetAlert.stories.jsx} +215 -15
- package/dist/src/components/Switch/{Switch.stories.js → Switch.stories.jsx} +1 -13
- package/dist/src/components/Switch/switch.d.ts +1 -1
- package/dist/src/components/Switch/{switch.js → switch.jsx} +4 -13
- package/dist/src/components/Table/{Table.js → Table.jsx} +111 -58
- package/dist/src/components/Table/Table.stories.d.ts +13 -13
- package/dist/src/components/Table/{Table.stories.js → Table.stories.jsx} +299 -45
- package/dist/src/components/Table/{Table.test.js → Table.test.jsx} +39 -7
- package/dist/src/components/Tabs/{Tabs.stories.js → Tabs.stories.jsx} +10 -3
- package/dist/src/components/Tabs/tabs.d.ts +4 -4
- package/dist/src/components/Tabs/tabs.jsx +32 -0
- package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
- package/dist/src/components/TimePicker/{TimePicker.js → TimePicker.jsx} +54 -30
- package/dist/src/components/TimePicker/TimePicker.stories.d.ts +10 -10
- package/dist/src/components/TimePicker/TimePicker.stories.jsx +298 -0
- package/dist/src/components/Title/Title.d.ts +1 -1
- package/dist/src/components/Title/{Title.js → Title.jsx} +2 -2
- package/dist/src/components/Title/{Title.stories.js → Title.stories.jsx} +1 -13
- package/dist/src/components/Title/{Title.test.js → Title.test.jsx} +4 -5
- package/dist/src/components/ToolTip/Tooltip.d.ts +1 -1
- package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
- package/dist/src/components/ToolTip/{Tooltip.stories.js → Tooltip.stories.jsx} +2 -14
- package/dist/src/components/Typography/Body/{Body.stories.js → Body.stories.jsx} +1 -13
- package/dist/src/components/Typography/Body/body.d.ts +1 -1
- package/dist/src/components/Typography/Body/{body.js → body.jsx} +4 -13
- package/dist/src/components/Typography/Caption/{Caption.stories.js → Caption.stories.jsx} +1 -13
- package/dist/src/components/Typography/Caption/caption.d.ts +1 -1
- package/dist/src/components/Typography/Caption/{caption.js → caption.jsx} +4 -13
- package/dist/src/components/Typography/Display/{Display.stories.js → Display.stories.jsx} +1 -13
- package/dist/src/components/Typography/Display/display.d.ts +1 -1
- package/dist/src/components/Typography/Display/{display.js → display.jsx} +4 -13
- package/dist/src/components/Typography/Heading/Heading.stories.d.ts +6 -6
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +85 -0
- package/dist/src/components/Typography/Heading/{heading.js → heading.jsx} +5 -14
- package/dist/src/components/VerticalTabs/{VerticalTabs.js → VerticalTabs.jsx} +9 -17
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.jsx +154 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.test.jsx +97 -0
- package/dist/src/components/ui/calendar.d.ts +2 -2
- package/dist/src/components/ui/{calendar.js → calendar.jsx} +36 -22
- package/dist/src/components/ui/command.d.ts +9 -9
- package/dist/src/components/ui/command.jsx +67 -0
- package/dist/src/components/ui/popover.d.ts +4 -4
- package/dist/src/components/ui/popover.jsx +33 -0
- package/dist/src/components/ui/tooltip.d.ts +4 -4
- package/dist/src/components/ui/tooltip.jsx +38 -0
- package/dist/src/components/ui/typography.d.ts +1 -1
- package/dist/src/components/ui/{typography.js → typography.jsx} +4 -13
- package/dist/styles/global.css +107 -5
- package/package.json +4 -3
- package/dist/app/page.js +0 -4
- package/dist/src/components/Accordion/Accordion.stories.js +0 -32
- package/dist/src/components/Alerts/Alert/alert.stories.js +0 -166
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.js +0 -213
- package/dist/src/components/AppIcons/AndroidIcon.js +0 -28
- package/dist/src/components/AppIcons/AppleIcon.js +0 -28
- package/dist/src/components/AppIcons/PlayStoreIcon.js +0 -28
- package/dist/src/components/Avatar/Avatar/Avatar.stories.js +0 -69
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.js +0 -8
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.js +0 -14
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.js +0 -18
- package/dist/src/components/Badge/Badge.stories.js +0 -145
- package/dist/src/components/Button/Button/Button.test.js +0 -10
- package/dist/src/components/Card/MultipleNews/MultiNews.js +0 -46
- package/dist/src/components/Card/PostByCategory/PostByCategory.js +0 -37
- package/dist/src/components/Card/SinglePost/SinglePost.js +0 -10
- package/dist/src/components/Card/contactProfile/ContactProfile.js +0 -39
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +0 -16
- package/dist/src/components/Card/photoGallery/PhotoGallery.js +0 -8
- package/dist/src/components/Checkbox/checkbox.stories.js +0 -78
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +0 -77
- package/dist/src/components/Colors/color.stories.js +0 -32
- package/dist/src/components/DatePicker/DatePicker.js +0 -64
- package/dist/src/components/DatePicker/DatePicker.stories.js +0 -171
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.js +0 -318
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.js +0 -225
- package/dist/src/components/Dropdown/Combobox/dialog.js +0 -68
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.js +0 -5
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.js +0 -253
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.js +0 -9
- package/dist/src/components/Dropdown/select.js +0 -87
- package/dist/src/components/Icons/stories/IconDropdown.js +0 -38
- package/dist/src/components/Icons/stories/IconGallery.js +0 -31
- package/dist/src/components/Icons/stories/InteractiveIconSelector.js +0 -26
- package/dist/src/components/Input/Input.stories.js +0 -133
- package/dist/src/components/Modal/Modal.stories.js +0 -115
- package/dist/src/components/Pagination/pagination.stories.js +0 -168
- package/dist/src/components/Skeleton/skeleton.stories.js +0 -414
- package/dist/src/components/Slider/slider.js +0 -38
- package/dist/src/components/Tabs/tabs.js +0 -43
- package/dist/src/components/TimePicker/TimePicker.stories.js +0 -176
- package/dist/src/components/ToolTip/Tooltip.js +0 -8
- package/dist/src/components/Typography/Heading/Heading.stories.js +0 -67
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +0 -100
- package/dist/src/components/VerticalTabs/VerticalTabs.test.js +0 -48
- package/dist/src/components/ui/command.js +0 -65
- package/dist/src/components/ui/popover.js +0 -42
- package/dist/src/components/ui/tooltip.js +0 -42
- /package/dist/src/components/AppIcons/{AppIcon.stories.js → AppIcon.stories.jsx} +0 -0
- /package/dist/src/components/Card/SinglePost/{SinglePost.stories.js → SinglePost.stories.jsx} +0 -0
- /package/dist/src/components/Icons/{LUIcon.test.js → LUIcon.test.jsx} +0 -0
- /package/dist/src/components/ImageUploader/{ImageUploader.stories.js → ImageUploader.stories.jsx} +0 -0
- /package/dist/src/components/Slider/{Slider.stories.js → Slider.stories.jsx} +0 -0
- /package/dist/src/components/ui/{collapsible.js → collapsible.jsx} +0 -0
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -29,7 +18,6 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
29
18
|
}
|
|
30
19
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
20
|
};
|
|
32
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
33
21
|
import * as React from "react";
|
|
34
22
|
import { cn } from "../../lib/utils";
|
|
35
23
|
import { tableSize, tableBodySize, tableFooterSize, collapsibleIconSize, tableVariants, Default_Table_Size, Default_Table_Variant, Default_Table_Section, } from "./index";
|
|
@@ -81,52 +69,77 @@ var Table = React.forwardRef(function (_a, ref) {
|
|
|
81
69
|
window.addEventListener("resize", calculate);
|
|
82
70
|
return function () { return window.removeEventListener("resize", calculate); };
|
|
83
71
|
}, [isResponsive, totalColumns, columnMinWidth]);
|
|
84
|
-
return (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
72
|
+
return (<TableSizeContext.Provider value={size}>
|
|
73
|
+
<TableVariantContext.Provider value={variant}>
|
|
74
|
+
<TableResponsiveContext.Provider value={{
|
|
75
|
+
visibleCount: visibleCount,
|
|
76
|
+
totalColumns: totalColumns,
|
|
77
|
+
columnMinWidth: columnMinWidth,
|
|
78
|
+
isResponsive: isResponsive,
|
|
79
|
+
columns: columns,
|
|
80
|
+
hasActionColumn: hasActionColumn,
|
|
81
|
+
}}>
|
|
82
|
+
<div className="relative w-full overflow-auto">
|
|
83
|
+
<table ref={ref} className={cn("w-full caption-bottom", tableVariants[variant], className)} data-slot={Reset_BS} {...props}/>
|
|
84
|
+
</div>
|
|
85
|
+
</TableResponsiveContext.Provider>
|
|
86
|
+
</TableVariantContext.Provider>
|
|
87
|
+
</TableSizeContext.Provider>);
|
|
92
88
|
});
|
|
93
89
|
Table.displayName = "Table";
|
|
94
90
|
var TableHeader = React.forwardRef(function (_a, ref) {
|
|
95
91
|
var _b;
|
|
96
92
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
97
93
|
var headerSize = (_b = React.useContext(TableSizeContext)) !== null && _b !== void 0 ? _b : "sm";
|
|
98
|
-
return (
|
|
94
|
+
return (<TableSectionContext.Provider value="header">
|
|
95
|
+
<thead ref={ref} className={cn("[&_tr]:border-b bg-gray-100 overflow-hidden", className)} data-table-size={headerSize} data-slot={Reset_BS} {...props}/>
|
|
96
|
+
</TableSectionContext.Provider>);
|
|
99
97
|
});
|
|
100
98
|
TableHeader.displayName = "TableHeader";
|
|
101
99
|
var TableBody = React.forwardRef(function (_a, ref) {
|
|
102
100
|
var _b;
|
|
103
101
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
104
102
|
var contextSize = (_b = React.useContext(TableSizeContext)) !== null && _b !== void 0 ? _b : "sm";
|
|
105
|
-
return (
|
|
103
|
+
return (<TableSectionContext.Provider value="body">
|
|
104
|
+
<tbody ref={ref} className={cn(tableBodySize[contextSize], "[&_tr:last-child]:border-0 text-black", className)} data-table-body-size={contextSize} data-slot={Reset_BS} {...props}/>
|
|
105
|
+
</TableSectionContext.Provider>);
|
|
106
106
|
});
|
|
107
107
|
TableBody.displayName = "TableBody";
|
|
108
108
|
var TableFooter = React.forwardRef(function (_a, ref) {
|
|
109
109
|
var _b;
|
|
110
110
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
111
111
|
var footerSize = (_b = React.useContext(TableSizeContext)) !== null && _b !== void 0 ? _b : "sm";
|
|
112
|
-
return (
|
|
112
|
+
return (<TableSectionContext.Provider value="footer">
|
|
113
|
+
<tfoot ref={ref} className={cn(tableFooterSize[footerSize], "border-t bg-gray-100 font-medium [&>tr]:last:border-b-0", className)} data-table-footer-size={footerSize} data-slot={Reset_BS} {...props}/>
|
|
114
|
+
</TableSectionContext.Provider>);
|
|
113
115
|
});
|
|
114
116
|
TableFooter.displayName = "TableFooter";
|
|
115
117
|
var PaddedCollapsibleContent = function (_a) {
|
|
116
118
|
var hiddenColumns = _a.hiddenColumns, data = _a.data, childrenArray = _a.childrenArray, columns = _a.columns, _b = _a.disableClick, disableClick = _b === void 0 ? false : _b;
|
|
117
|
-
return (
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
})
|
|
119
|
+
return (<div className="border-1 !border-t-0 border-gray-200 rounded-b-2xl -mt-5 overflow-hidden">
|
|
120
|
+
<Table className="w-full">
|
|
121
|
+
<TableBody>
|
|
122
|
+
{hiddenColumns.map(function (col) {
|
|
123
|
+
var colIndex = columns.findIndex(function (c) { return c.key === col.key; });
|
|
124
|
+
var value = colIndex >= 0 && childrenArray[colIndex]
|
|
125
|
+
? childrenArray[colIndex]
|
|
126
|
+
: String(data[col.key]);
|
|
127
|
+
// Clone the value element and add border-0 class if it's a valid React element
|
|
128
|
+
var clonedValue = React.isValidElement(value) && value.type === TableCellPadded
|
|
129
|
+
? React.cloneElement(value, {
|
|
130
|
+
className: cn(value.props.className, "w-2/3 border-0 last:border-r-0"),
|
|
131
|
+
})
|
|
132
|
+
: value;
|
|
133
|
+
return (<TableRow key={col.key} disableClick={disableClick} className="even:bg-white first:!border-t">
|
|
134
|
+
<TableCellPadded className="font-medium border-0 !border-r !border-gray-200">
|
|
135
|
+
{col.header}
|
|
136
|
+
</TableCellPadded>
|
|
137
|
+
{clonedValue}
|
|
138
|
+
</TableRow>);
|
|
139
|
+
})}
|
|
140
|
+
</TableBody>
|
|
141
|
+
</Table>
|
|
142
|
+
</div>);
|
|
130
143
|
};
|
|
131
144
|
var TableRow = React.forwardRef(function (_a, ref) {
|
|
132
145
|
var className = _a.className, children = _a.children, collapsibleContent = _a.collapsibleContent, showTrigger = _a.showTrigger, data = _a.data, _b = _a.disableClick, disableClick = _b === void 0 ? false : _b, props = __rest(_a, ["className", "children", "collapsibleContent", "showTrigger", "data", "disableClick"]);
|
|
@@ -175,15 +188,26 @@ var TableRow = React.forwardRef(function (_a, ref) {
|
|
|
175
188
|
if (hiddenColumns.length === 0)
|
|
176
189
|
return null;
|
|
177
190
|
if (isPaddedVariant) {
|
|
178
|
-
return (
|
|
191
|
+
return (<PaddedCollapsibleContent hiddenColumns={hiddenColumns} data={data} childrenArray={childrenArray} columns={columns} disableClick={disableClick}/>);
|
|
179
192
|
}
|
|
180
|
-
return (
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
193
|
+
return (<Table className="w-full">
|
|
194
|
+
<TableBody>
|
|
195
|
+
{hiddenColumns.map(function (col) {
|
|
196
|
+
var colIndex = columns.findIndex(function (c) { return c.key === col.key; });
|
|
197
|
+
var value = colIndex >= 0 && childrenArray[colIndex]
|
|
198
|
+
? childrenArray[colIndex]
|
|
199
|
+
: String(data[col.key]);
|
|
200
|
+
return (<TableRow key={col.key} disableClick={disableClick}>
|
|
201
|
+
<TableCell className="font-medium w-1/3 border-r border-gray-200 !border-l-none !border-l-transparent">
|
|
202
|
+
{col.header}
|
|
203
|
+
</TableCell>
|
|
204
|
+
<TableCell className="w-2/3 !border-l-none !border-l-transparent">
|
|
205
|
+
{value}
|
|
206
|
+
</TableCell>
|
|
207
|
+
</TableRow>);
|
|
208
|
+
})}
|
|
209
|
+
</TableBody>
|
|
210
|
+
</Table>);
|
|
187
211
|
}, [
|
|
188
212
|
isResponsive,
|
|
189
213
|
data,
|
|
@@ -312,16 +336,43 @@ var TableRow = React.forwardRef(function (_a, ref) {
|
|
|
312
336
|
visibleCount,
|
|
313
337
|
]);
|
|
314
338
|
if (section === "header") {
|
|
315
|
-
return (
|
|
339
|
+
return (<tr ref={ref} className={cn(tableBodySize[bodySize !== null && bodySize !== void 0 ? bodySize : "sm"], "border-b border-gray-200", className)} data-slot={Reset_BS} {...props}>
|
|
340
|
+
{isResponsive && hasHiddenColumns && (<th data-slot={Reset_BS} className="p-2 align-middle w-12 bg-gray-100"/>)}
|
|
341
|
+
{headerChildren}
|
|
342
|
+
</tr>);
|
|
316
343
|
}
|
|
317
344
|
if (finalCollapsibleContent) {
|
|
318
|
-
return (
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
345
|
+
return (<TableRowStateContext.Provider value={{ isOpen: isOpen, isPaddedVariant: isPaddedVariant }}>
|
|
346
|
+
<Collapsible asChild onOpenChange={setIsOpen}>
|
|
347
|
+
<>
|
|
348
|
+
<tr ref={ref} className={getTableRowClassNames()} data-slot={Reset_BS} {...props}>
|
|
349
|
+
{isResponsive && (<td data-slot={Reset_BS} className={cn("py-2 px-3 align-middle w-12", isPaddedVariant
|
|
350
|
+
? cn("border-y border-gray-200", isOpen
|
|
351
|
+
? "border-b-0 first:border-l last:border-r first:rounded-tl-2xl last:rounded-tr-2xl"
|
|
352
|
+
: "first:border first:border-r-0 last:border last:border-l-0 first:rounded-l-2xl last:rounded-r-2xl")
|
|
353
|
+
: "first-of-type:border-l-2 first-of-type:border-l-transparent group-hover:first-of-type:border-l-blue-600 group-data-[state=selected]:first-of-type:border-l-blue-600")}>
|
|
354
|
+
{finalShowTrigger && (<CollapsibleTrigger asChild>
|
|
355
|
+
<LUIcon icon={isOpen ? "angle-up" : "angle-right"} size={collapsibleIconSize[bodySize]} color="blue"/>
|
|
356
|
+
</CollapsibleTrigger>)}
|
|
357
|
+
</td>)}
|
|
358
|
+
{expandedChildren}
|
|
359
|
+
</tr>
|
|
360
|
+
|
|
361
|
+
<CollapsibleContent asChild>
|
|
362
|
+
<tr data-slot={Reset_BS} className={cn(!isPaddedVariant && "bg-gray-50")}>
|
|
363
|
+
<td data-slot={Reset_BS} colSpan={isResponsive ? totalColumns + 1 : slicedChildren.length} className="p-0">
|
|
364
|
+
{finalCollapsibleContent}
|
|
365
|
+
</td>
|
|
366
|
+
</tr>
|
|
367
|
+
</CollapsibleContent>
|
|
368
|
+
</>
|
|
369
|
+
</Collapsible>
|
|
370
|
+
</TableRowStateContext.Provider>);
|
|
323
371
|
}
|
|
324
|
-
return (
|
|
372
|
+
return (<tr data-slot={Reset_BS} ref={ref} className={getTableRowClassNames()} {...props}>
|
|
373
|
+
{isResponsive && hasHiddenColumns && section === "footer" && (<td data-slot={Reset_BS} className="py-2 px-3 align-middle w-12"/>)}
|
|
374
|
+
{slicedChildren}
|
|
375
|
+
</tr>);
|
|
325
376
|
});
|
|
326
377
|
TableRow.displayName = "TableRow";
|
|
327
378
|
var TableHead = React.forwardRef(function (_a, ref) {
|
|
@@ -329,33 +380,35 @@ var TableHead = React.forwardRef(function (_a, ref) {
|
|
|
329
380
|
var className = _a.className, size = _a.size, children = _a.children, props = __rest(_a, ["className", "size", "children"]);
|
|
330
381
|
var contextSize = React.useContext(TableSizeContext);
|
|
331
382
|
var headSize = (_b = size !== null && size !== void 0 ? size : contextSize) !== null && _b !== void 0 ? _b : "sm";
|
|
332
|
-
return (
|
|
383
|
+
return (<th ref={ref} data-slot={Reset_BS} className={cn(tableSize[headSize], "py-0 px-3 text-left align-middle font-semibold text-gray-950 bg-gray-100 first:rounded-tl-lg last:rounded-tr-lg [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className)} {...props}>
|
|
384
|
+
{children}
|
|
385
|
+
</th>);
|
|
333
386
|
});
|
|
334
387
|
TableHead.displayName = "TableHead";
|
|
335
388
|
var TableCell = React.forwardRef(function (_a, ref) {
|
|
336
389
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
337
|
-
return (
|
|
390
|
+
return (<td ref={ref} className={cn(!useTableResponsive().isResponsive
|
|
338
391
|
? ""
|
|
339
|
-
: "group-hover:first-of-type:border-l-blue-600 group-data-[state=selected]:first-of-type:border-l-blue-600", "py-2 px-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] first-of-type:border-l-2 first-of-type:border-l-transparent", className)
|
|
392
|
+
: "group-hover:first-of-type:border-l-blue-600 group-data-[state=selected]:first-of-type:border-l-blue-600", "py-2 px-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] first-of-type:border-l-2 first-of-type:border-l-transparent", className)} data-slot={Reset_BS} {...props}/>);
|
|
340
393
|
});
|
|
341
394
|
TableCell.displayName = "TableCell";
|
|
342
395
|
var TableCellPadded = React.forwardRef(function (_a, ref) {
|
|
343
396
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
344
397
|
var rowState = React.useContext(TableRowStateContext);
|
|
345
398
|
var isOpen = rowState.isOpen;
|
|
346
|
-
return (
|
|
399
|
+
return (<td ref={ref} data-slot={Reset_BS} className={cn("py-2 px-3 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] border-y border-gray-200", isOpen
|
|
347
400
|
? "border-b-0 last:border-r first:rounded-tl-2xl last:rounded-tr-2xl"
|
|
348
|
-
: "first:border first:border-r-0 last:border last:border-l-0 first:rounded-l-2xl last:rounded-r-2xl", className)
|
|
401
|
+
: "first:border first:border-r-0 last:border last:border-l-0 first:rounded-l-2xl last:rounded-r-2xl", className)} {...props}/>);
|
|
349
402
|
});
|
|
350
403
|
TableCellPadded.displayName = "TableCellPadded";
|
|
351
404
|
var TableCaption = React.forwardRef(function (_a, ref) {
|
|
352
405
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
353
|
-
return (
|
|
406
|
+
return (<caption ref={ref} data-slot={Reset_BS} className={cn("mt-4 text-sm text-muted-foreground", className)} {...props}/>);
|
|
354
407
|
});
|
|
355
408
|
TableCaption.displayName = "TableCaption";
|
|
356
409
|
var TableButton = React.forwardRef(function (_a, ref) {
|
|
357
410
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
358
|
-
return (
|
|
411
|
+
return (<div ref={ref} data-slot={Reset_BS} className={cn("flex gap-2 justify-center", className)} {...props}/>);
|
|
359
412
|
});
|
|
360
413
|
TableButton.displayName = "TableButton";
|
|
361
414
|
var useTableResponsive = function () {
|
|
@@ -10,14 +10,14 @@ export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<imp
|
|
|
10
10
|
hasActionColumn?: boolean;
|
|
11
11
|
variant?: import("./types").TableVariant;
|
|
12
12
|
} & React.RefAttributes<HTMLTableElement>>;
|
|
13
|
-
export declare const TableSizes: () =>
|
|
14
|
-
export declare const DisabledRowClickTable: () =>
|
|
15
|
-
export declare const CheckBoxInSmallTable: () =>
|
|
16
|
-
export declare const CheckBoxInMediumTable: () =>
|
|
17
|
-
export declare const CheckBoxInLargeTable: () =>
|
|
18
|
-
export declare const SortingTable: () =>
|
|
13
|
+
export declare const TableSizes: () => React.JSX.Element;
|
|
14
|
+
export declare const DisabledRowClickTable: () => React.JSX.Element;
|
|
15
|
+
export declare const CheckBoxInSmallTable: () => React.JSX.Element;
|
|
16
|
+
export declare const CheckBoxInMediumTable: () => React.JSX.Element;
|
|
17
|
+
export declare const CheckBoxInLargeTable: () => React.JSX.Element;
|
|
18
|
+
export declare const SortingTable: () => React.JSX.Element;
|
|
19
19
|
export declare const BadgesInTable: {
|
|
20
|
-
():
|
|
20
|
+
(): React.JSX.Element;
|
|
21
21
|
parameters: {
|
|
22
22
|
docs: {
|
|
23
23
|
description: {
|
|
@@ -27,7 +27,7 @@ export declare const BadgesInTable: {
|
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
29
|
export declare const DropdownInTable: {
|
|
30
|
-
():
|
|
30
|
+
(): React.JSX.Element;
|
|
31
31
|
parameters: {
|
|
32
32
|
docs: {
|
|
33
33
|
description: {
|
|
@@ -37,7 +37,7 @@ export declare const DropdownInTable: {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
export declare const ActionButtonInTable: {
|
|
40
|
-
():
|
|
40
|
+
(): React.JSX.Element;
|
|
41
41
|
parameters: {
|
|
42
42
|
docs: {
|
|
43
43
|
description: {
|
|
@@ -46,7 +46,7 @@ export declare const ActionButtonInTable: {
|
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
|
-
export declare const AvatarInTable: () =>
|
|
50
|
-
export declare const ResponsiveTable: () =>
|
|
51
|
-
export declare const ResponsiveTableWithBadgeAndButton: () =>
|
|
52
|
-
export declare const PaddedTableWithFooter: () =>
|
|
49
|
+
export declare const AvatarInTable: () => React.JSX.Element;
|
|
50
|
+
export declare const ResponsiveTable: () => React.JSX.Element;
|
|
51
|
+
export declare const ResponsiveTableWithBadgeAndButton: () => React.JSX.Element;
|
|
52
|
+
export declare const PaddedTableWithFooter: () => React.JSX.Element;
|