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,15 +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
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
1
|
import { Dummy_Para } from "../../../utils/constants";
|
|
14
2
|
import { Caption, variantClasses, } from "../../../components/Typography/Caption/caption";
|
|
15
3
|
export default {
|
|
@@ -17,7 +5,7 @@ export default {
|
|
|
17
5
|
component: Caption,
|
|
18
6
|
tags: ["autodocs"],
|
|
19
7
|
};
|
|
20
|
-
var Template = function (args) { return
|
|
8
|
+
var Template = function (args) { return <Caption {...args}></Caption>; };
|
|
21
9
|
export var _Caption = Template.bind({});
|
|
22
10
|
_Caption.args = {
|
|
23
11
|
children: Dummy_Para,
|
|
@@ -4,5 +4,5 @@ type CaptionProps = React.HTMLAttributes<HTMLTableCaptionElement> & {
|
|
|
4
4
|
variant?: CaptionVariant;
|
|
5
5
|
};
|
|
6
6
|
export declare const variantClasses: Record<CaptionVariant, string>;
|
|
7
|
-
declare function Caption({ className, children, variant, ...props }: CaptionProps):
|
|
7
|
+
declare function Caption({ className, children, variant, ...props }: CaptionProps): React.JSX.Element;
|
|
8
8
|
export { Caption };
|
|
@@ -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)
|
|
@@ -20,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import
|
|
12
|
+
import * as React from "react";
|
|
24
13
|
import { cn } from "../../../lib/utils";
|
|
25
14
|
export var variantClasses = {
|
|
26
15
|
sm: "text-xs",
|
|
@@ -29,6 +18,8 @@ export var variantClasses = {
|
|
|
29
18
|
};
|
|
30
19
|
function Caption(_a) {
|
|
31
20
|
var className = _a.className, children = _a.children, _b = _a.variant, variant = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "children", "variant"]);
|
|
32
|
-
return (
|
|
21
|
+
return (<p className={cn("!font-normal !leading-normal m-0 inline", variantClasses[variant], className)} {...props}>
|
|
22
|
+
{children}
|
|
23
|
+
</p>);
|
|
33
24
|
}
|
|
34
25
|
export { Caption };
|
|
@@ -1,15 +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
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
1
|
import { Dummy_Para } from "../../../utils/constants";
|
|
14
2
|
import { Display, variant } from "../../../components/Typography/Display/display";
|
|
15
3
|
export default {
|
|
@@ -17,7 +5,7 @@ export default {
|
|
|
17
5
|
component: Display,
|
|
18
6
|
tags: ["autodocs"],
|
|
19
7
|
};
|
|
20
|
-
var Template = function (args) { return
|
|
8
|
+
var Template = function (args) { return <Display {...args}></Display>; };
|
|
21
9
|
export var _Display = Template.bind({});
|
|
22
10
|
_Display.args = {
|
|
23
11
|
children: Dummy_Para,
|
|
@@ -11,5 +11,5 @@ declare const displayVariants: (props?: ({
|
|
|
11
11
|
type DisplayProps = React.HTMLProps<HTMLDivElement> & VariantProps<typeof displayVariants> & {
|
|
12
12
|
variant?: keyof typeof variant;
|
|
13
13
|
};
|
|
14
|
-
declare function Display({ className, variant, children, ...props }: DisplayProps):
|
|
14
|
+
declare function Display({ className, variant, children, ...props }: DisplayProps): React.JSX.Element;
|
|
15
15
|
export { Display, displayVariants };
|
|
@@ -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)
|
|
@@ -20,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import
|
|
12
|
+
import * as React from "react";
|
|
24
13
|
import { cva } from "class-variance-authority";
|
|
25
14
|
import { cn } from "../../../lib/utils";
|
|
26
15
|
export var variant = {
|
|
@@ -43,6 +32,8 @@ function Display(_a) {
|
|
|
43
32
|
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("display")) {
|
|
44
33
|
Tag = "div";
|
|
45
34
|
}
|
|
46
|
-
return (
|
|
35
|
+
return (<Tag className={cn(displayVariants({ variant: variant, className: className }))} {...props}>
|
|
36
|
+
{children}
|
|
37
|
+
</Tag>);
|
|
47
38
|
}
|
|
48
39
|
export { Display, displayVariants };
|
|
@@ -3,27 +3,27 @@ declare const _default: Meta;
|
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const _Heading: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
|
|
5
5
|
export declare const H1Variants: {
|
|
6
|
-
(): import("react
|
|
6
|
+
(): import("react").JSX.Element;
|
|
7
7
|
storyName: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const H2Variants: {
|
|
10
|
-
(): import("react
|
|
10
|
+
(): import("react").JSX.Element;
|
|
11
11
|
storyName: string;
|
|
12
12
|
};
|
|
13
13
|
export declare const H3Variants: {
|
|
14
|
-
(): import("react
|
|
14
|
+
(): import("react").JSX.Element;
|
|
15
15
|
storyName: string;
|
|
16
16
|
};
|
|
17
17
|
export declare const H4Variants: {
|
|
18
|
-
(): import("react
|
|
18
|
+
(): import("react").JSX.Element;
|
|
19
19
|
storyName: string;
|
|
20
20
|
};
|
|
21
21
|
export declare const H5Variants: {
|
|
22
|
-
(): import("react
|
|
22
|
+
(): import("react").JSX.Element;
|
|
23
23
|
storyName: string;
|
|
24
24
|
};
|
|
25
25
|
export declare const H6Variants: {
|
|
26
|
-
(): import("react
|
|
26
|
+
(): import("react").JSX.Element;
|
|
27
27
|
storyName: string;
|
|
28
28
|
};
|
|
29
29
|
export declare const WithCustomClassName: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("@storybook/react").Args>;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Dummy_Para, Dummy_Title } from "../../../utils/constants";
|
|
2
|
+
import { Heading, variant } from "./heading";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Typography/Heading",
|
|
5
|
+
component: Heading,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
};
|
|
8
|
+
var Template = function (args) { return <Heading {...args}></Heading>; };
|
|
9
|
+
export var _Heading = Template.bind({});
|
|
10
|
+
_Heading.args = {
|
|
11
|
+
children: Dummy_Para,
|
|
12
|
+
variant: "h2",
|
|
13
|
+
};
|
|
14
|
+
_Heading.argTypes = {
|
|
15
|
+
variant: {
|
|
16
|
+
control: { type: "select" },
|
|
17
|
+
options: Object.keys(variant),
|
|
18
|
+
description: "Heading Variant",
|
|
19
|
+
table: {
|
|
20
|
+
defaultValue: { summary: "h2" },
|
|
21
|
+
type: { summary: "string" },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
// Single story for h1 and all h1 variants
|
|
26
|
+
export var H1Variants = function () { return (<div className="flex flex-col gap-4">
|
|
27
|
+
<Heading variant="h1">{"".concat(Dummy_Title, " (h1)")}</Heading>
|
|
28
|
+
<Heading variant="h1-500">{"".concat(Dummy_Title, " (h1-500)")}</Heading>
|
|
29
|
+
<Heading variant="h1-600">{"".concat(Dummy_Title, " (h1-600)")}</Heading>
|
|
30
|
+
<Heading variant="h1-700">{"".concat(Dummy_Title, " (h1-700)")}</Heading>
|
|
31
|
+
</div>); };
|
|
32
|
+
H1Variants.storyName = "H1 & All H1 Variants";
|
|
33
|
+
// Single story for h2 and all h2 variants
|
|
34
|
+
export var H2Variants = function () { return (<div className="flex flex-col gap-4">
|
|
35
|
+
<Heading variant="h2">{"".concat(Dummy_Title, " (h2)")}</Heading>
|
|
36
|
+
<Heading variant="h2-500">{"".concat(Dummy_Title, " (h2-500)")}</Heading>
|
|
37
|
+
<Heading variant="h2-600">{"".concat(Dummy_Title, " (h2-600)")}</Heading>
|
|
38
|
+
<Heading variant="h2-700">{"".concat(Dummy_Title, " (h2-700)")}</Heading>
|
|
39
|
+
</div>); };
|
|
40
|
+
H2Variants.storyName = "H2 & All H2 Variants";
|
|
41
|
+
// Single story for h3 and all h3 variants
|
|
42
|
+
export var H3Variants = function () { return (<div className="flex flex-col gap-4">
|
|
43
|
+
<Heading variant="h3">{"".concat(Dummy_Title, " (h3)")}</Heading>
|
|
44
|
+
<Heading variant="h3-500">{"".concat(Dummy_Title, " (h3-500)")}</Heading>
|
|
45
|
+
<Heading variant="h3-600">{"".concat(Dummy_Title, " (h3-600)")}</Heading>
|
|
46
|
+
<Heading variant="h3-700">{"".concat(Dummy_Title, " (h3-700)")}</Heading>
|
|
47
|
+
</div>); };
|
|
48
|
+
H3Variants.storyName = "H3 & All H3 Variants";
|
|
49
|
+
// Single story for h4 and all h4 variants
|
|
50
|
+
export var H4Variants = function () { return (<div className="flex flex-col gap-4">
|
|
51
|
+
<Heading variant="h4">{"".concat(Dummy_Title, " (h4)")}</Heading>
|
|
52
|
+
<Heading variant="h4-500">{"".concat(Dummy_Title, " (h4-500)")}</Heading>
|
|
53
|
+
<Heading variant="h4-600">{"".concat(Dummy_Title, " (h4-600)")}</Heading>
|
|
54
|
+
<Heading variant="h4-700">{"".concat(Dummy_Title, " (h4-700)")}</Heading>
|
|
55
|
+
</div>); };
|
|
56
|
+
H4Variants.storyName = "H4 & All H4 Variants";
|
|
57
|
+
// Single story for h5 and all h5 variants
|
|
58
|
+
export var H5Variants = function () { return (<div className="flex flex-col gap-4">
|
|
59
|
+
<Heading variant="h5">{"".concat(Dummy_Title, " (h5)")}</Heading>
|
|
60
|
+
<Heading variant="h5-500">{"".concat(Dummy_Title, " (h5-500)")}</Heading>
|
|
61
|
+
<Heading variant="h5-600">{"".concat(Dummy_Title, " (h5-600)")}</Heading>
|
|
62
|
+
<Heading variant="h5-700">{"".concat(Dummy_Title, " (h5-700)")}</Heading>
|
|
63
|
+
</div>); };
|
|
64
|
+
H5Variants.storyName = "H5 & All H5 Variants";
|
|
65
|
+
// Single story for h6 and all h6 variants
|
|
66
|
+
export var H6Variants = function () { return (<div className="flex flex-col gap-4">
|
|
67
|
+
<Heading variant="h6">{"".concat(Dummy_Title, " (h6)")}</Heading>
|
|
68
|
+
<Heading variant="h6-500">{"".concat(Dummy_Title, " (h6-500)")}</Heading>
|
|
69
|
+
<Heading variant="h6-600">{"".concat(Dummy_Title, " (h6-600)")}</Heading>
|
|
70
|
+
<Heading variant="h6-700">{"".concat(Dummy_Title, " (h6-700)")}</Heading>
|
|
71
|
+
</div>); };
|
|
72
|
+
H6Variants.storyName = "H6 & All H6 Variants";
|
|
73
|
+
export var WithCustomClassName = Template.bind({});
|
|
74
|
+
WithCustomClassName.args = {
|
|
75
|
+
children: "Heading with custom className (red text)",
|
|
76
|
+
variant: "h2",
|
|
77
|
+
className: "text-red-500 underline",
|
|
78
|
+
};
|
|
79
|
+
WithCustomClassName.parameters = {
|
|
80
|
+
docs: {
|
|
81
|
+
description: {
|
|
82
|
+
story: "Demonstrates the usage of the className prop to apply custom styles.",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -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)
|
|
@@ -20,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import
|
|
12
|
+
import * as React from "react";
|
|
24
13
|
import styles from "./heading.module.css";
|
|
25
14
|
import { cn } from "../../../lib/utils";
|
|
26
15
|
export var variant = {
|
|
@@ -55,8 +44,10 @@ var Heading = function (_a) {
|
|
|
55
44
|
if (variant && typeof variant === "string" && variant.startsWith("h")) {
|
|
56
45
|
Tag = variant.split("-")[0];
|
|
57
46
|
}
|
|
58
|
-
return (
|
|
47
|
+
return (<Tag className={cn(styles.heading, typeof variant === "string" && styles["".concat(variant)]
|
|
59
48
|
? styles["".concat(variant)]
|
|
60
|
-
: styles["h2"], className)
|
|
49
|
+
: styles["h2"], className)} {...props}>
|
|
50
|
+
{children}
|
|
51
|
+
</Tag>);
|
|
61
52
|
};
|
|
62
53
|
export { Heading };
|
|
@@ -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)
|
|
@@ -20,7 +9,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
12
|
import * as React from "react";
|
|
25
13
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
26
14
|
import { cn } from "../../lib/utils";
|
|
@@ -35,26 +23,30 @@ var TabsContext = React.createContext({
|
|
|
35
23
|
});
|
|
36
24
|
var Tabs = function (_a) {
|
|
37
25
|
var _b = _a.size, size = _b === void 0 ? "md" : _b, children = _a.children, props = __rest(_a, ["size", "children"]);
|
|
38
|
-
return (
|
|
26
|
+
return (<TabsContext.Provider value={{ size: size }}>
|
|
27
|
+
<TabsPrimitive.Root {...props}>{children}</TabsPrimitive.Root>
|
|
28
|
+
</TabsContext.Provider>);
|
|
39
29
|
};
|
|
40
30
|
var TabsHeading = function (_a) {
|
|
41
31
|
var children = _a.children;
|
|
42
|
-
return (
|
|
32
|
+
return (<Heading variant="h6-500" className="bg-gray-900 !px-5 !py-3 rounded-t-md !text-gray-50 shadow-lg">
|
|
33
|
+
{children}
|
|
34
|
+
</Heading>);
|
|
43
35
|
};
|
|
44
36
|
var TabsList = React.forwardRef(function (_a, ref) {
|
|
45
37
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
46
|
-
return (
|
|
38
|
+
return (<TabsPrimitive.List ref={ref} className={cn("flex flex-col h-full items-start justify-start bg-gray-50 text-gray-950 !p-1 shadow-lg", className)} {...props}/>);
|
|
47
39
|
});
|
|
48
40
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
49
41
|
var TabsTrigger = React.forwardRef(function (_a, ref) {
|
|
50
42
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
51
43
|
var size = React.useContext(TabsContext).size;
|
|
52
|
-
return (
|
|
44
|
+
return (<TabsPrimitive.Trigger ref={ref} className={cn("inline-flex items-center justify-start whitespace-nowrap !rounded-md font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 w-full text-left !text-gray-950 hover:bg-gray-50 data-[state=active]:!text-gray-50 data-[state=active]:bg-gray-950", tabSizes[size], className)} {...props}/>);
|
|
53
45
|
});
|
|
54
46
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
55
47
|
var TabsContent = React.forwardRef(function (_a, ref) {
|
|
56
48
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
57
|
-
return (
|
|
49
|
+
return (<TabsPrimitive.Content ref={ref} className={cn("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", className)} {...props}/>);
|
|
58
50
|
});
|
|
59
51
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
60
52
|
export { Tabs, TabsList, TabsTrigger, TabsContent, TabsHeading };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Tabs, TabsContent, TabsList, tabSizes, TabsTrigger, TabsHeading, } from "./VerticalTabs";
|
|
2
|
+
import LUIcon from "../Icons/LUIcon";
|
|
3
|
+
import { Badge } from "../Badge/Badge";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/VerticalTabs",
|
|
6
|
+
component: Tabs,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
children: {
|
|
10
|
+
description: "Pass `TabList` components as children. Each item includes an `TabsTrigger` (the clickable label) and `TabsContent`. You can customize both with any valid React nodes \n\nFor more details and usage examples, refer to the [ShadCN Tabs documentation](https://ui.shadcn.com/docs/components/tabs).",
|
|
11
|
+
table: {
|
|
12
|
+
type: { summary: "React.ReactNode" },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
heading: {
|
|
16
|
+
description: "Optional heading displayed at the top of the Tabs.",
|
|
17
|
+
table: {
|
|
18
|
+
type: { summary: "string" },
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
control: { type: "select" },
|
|
23
|
+
options: Object.keys(tabSizes),
|
|
24
|
+
description: "Size of the Tabs component",
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: Object.keys(tabSizes).join(" | ") },
|
|
27
|
+
defaultValue: { summary: "md" },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
var Template = function (args) { return (<Tabs defaultValue="account" size={args.size}>
|
|
33
|
+
{args.heading && <TabsHeading>{args.heading}</TabsHeading>}
|
|
34
|
+
<TabsList>{args.triggers}</TabsList>
|
|
35
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
36
|
+
<TabsContent value="password">Change Password</TabsContent>
|
|
37
|
+
</Tabs>); };
|
|
38
|
+
export var _VerticalTabs = Template.bind({});
|
|
39
|
+
_VerticalTabs.args = {
|
|
40
|
+
heading: "Tab Title",
|
|
41
|
+
triggers: [
|
|
42
|
+
<TabsTrigger key="account" value="account">
|
|
43
|
+
Account
|
|
44
|
+
</TabsTrigger>,
|
|
45
|
+
<TabsTrigger key="password" value="password">
|
|
46
|
+
Password
|
|
47
|
+
</TabsTrigger>,
|
|
48
|
+
],
|
|
49
|
+
size: "md",
|
|
50
|
+
};
|
|
51
|
+
export var VerticalTabsSmall = Template.bind({});
|
|
52
|
+
VerticalTabsSmall.args = {
|
|
53
|
+
heading: "Sm Tabs",
|
|
54
|
+
triggers: [
|
|
55
|
+
<TabsTrigger key="account" value="account">
|
|
56
|
+
Account
|
|
57
|
+
</TabsTrigger>,
|
|
58
|
+
<TabsTrigger key="password" value="password">
|
|
59
|
+
Password
|
|
60
|
+
</TabsTrigger>,
|
|
61
|
+
],
|
|
62
|
+
size: "sm",
|
|
63
|
+
};
|
|
64
|
+
export var VerticalTabsMedium = Template.bind({});
|
|
65
|
+
VerticalTabsMedium.args = {
|
|
66
|
+
heading: "Md Tabs",
|
|
67
|
+
triggers: [
|
|
68
|
+
<TabsTrigger key="account" value="account">
|
|
69
|
+
Account
|
|
70
|
+
</TabsTrigger>,
|
|
71
|
+
<TabsTrigger key="password" value="password">
|
|
72
|
+
Password
|
|
73
|
+
</TabsTrigger>,
|
|
74
|
+
],
|
|
75
|
+
size: "md",
|
|
76
|
+
};
|
|
77
|
+
export var VerticalTabsLarge = Template.bind({});
|
|
78
|
+
VerticalTabsLarge.args = {
|
|
79
|
+
heading: "Lg Tabs",
|
|
80
|
+
triggers: [
|
|
81
|
+
<TabsTrigger key="account" value="account">
|
|
82
|
+
Account
|
|
83
|
+
</TabsTrigger>,
|
|
84
|
+
<TabsTrigger key="password" value="password">
|
|
85
|
+
Password
|
|
86
|
+
</TabsTrigger>,
|
|
87
|
+
],
|
|
88
|
+
size: "lg",
|
|
89
|
+
};
|
|
90
|
+
export var VerticalTabsWithoutHeading = Template.bind({});
|
|
91
|
+
VerticalTabsWithoutHeading.args = {
|
|
92
|
+
triggers: [
|
|
93
|
+
<TabsTrigger key="account" value="account">
|
|
94
|
+
<LUIcon icon="user" size="md" className="mr-1"/>
|
|
95
|
+
Account
|
|
96
|
+
</TabsTrigger>,
|
|
97
|
+
<TabsTrigger key="password" value="password">
|
|
98
|
+
<LUIcon icon="lock" size="md" className="mr-1"/>
|
|
99
|
+
Password
|
|
100
|
+
</TabsTrigger>,
|
|
101
|
+
],
|
|
102
|
+
};
|
|
103
|
+
export var VerticalTabsWithIcon = Template.bind({});
|
|
104
|
+
VerticalTabsWithIcon.args = {
|
|
105
|
+
heading: "Tab Title",
|
|
106
|
+
triggers: [
|
|
107
|
+
<TabsTrigger key="account" value="account">
|
|
108
|
+
<LUIcon icon="user" size="md" className="mr-1"/>
|
|
109
|
+
Account
|
|
110
|
+
</TabsTrigger>,
|
|
111
|
+
<TabsTrigger key="password" value="password">
|
|
112
|
+
<LUIcon icon="lock" size="md" className="mr-1"/>
|
|
113
|
+
Password
|
|
114
|
+
</TabsTrigger>,
|
|
115
|
+
],
|
|
116
|
+
};
|
|
117
|
+
export var VerticalTabsWithBadge = Template.bind({});
|
|
118
|
+
VerticalTabsWithBadge.args = {
|
|
119
|
+
heading: "Tab Title",
|
|
120
|
+
triggers: [
|
|
121
|
+
<TabsTrigger key="account" value="account">
|
|
122
|
+
Account
|
|
123
|
+
<Badge size="sm" color="gray" className="ms-auto">
|
|
124
|
+
03
|
|
125
|
+
</Badge>
|
|
126
|
+
</TabsTrigger>,
|
|
127
|
+
<TabsTrigger key="password" value="password">
|
|
128
|
+
Password
|
|
129
|
+
<Badge size="sm" color="gray" className="ms-auto">
|
|
130
|
+
01
|
|
131
|
+
</Badge>
|
|
132
|
+
</TabsTrigger>,
|
|
133
|
+
],
|
|
134
|
+
};
|
|
135
|
+
export var VerticalTabsWithIconAndBadge = Template.bind({});
|
|
136
|
+
VerticalTabsWithIconAndBadge.args = {
|
|
137
|
+
heading: "Tab Title",
|
|
138
|
+
triggers: [
|
|
139
|
+
<TabsTrigger key="account" value="account">
|
|
140
|
+
<LUIcon icon="user" size="md" className="mr-1"/>
|
|
141
|
+
Account
|
|
142
|
+
<Badge size="sm" color="gray" className="ms-auto">
|
|
143
|
+
03
|
|
144
|
+
</Badge>
|
|
145
|
+
</TabsTrigger>,
|
|
146
|
+
<TabsTrigger key="password" value="password">
|
|
147
|
+
<LUIcon icon="lock" size="md" className="mr-1"/>
|
|
148
|
+
Password
|
|
149
|
+
<Badge size="sm" color="gray" className="ms-auto">
|
|
150
|
+
01
|
|
151
|
+
</Badge>
|
|
152
|
+
</TabsTrigger>,
|
|
153
|
+
],
|
|
154
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { Tabs, TabsList, TabsTrigger, TabsContent, TabsHeading, tabSizes, } from "./VerticalTabs";
|
|
3
|
+
var Dummy_label = "Account";
|
|
4
|
+
describe("VerticalTabs Component", function () {
|
|
5
|
+
it("renders Tabs with TabsHeading", function () {
|
|
6
|
+
render(<Tabs defaultValue="account">
|
|
7
|
+
<TabsHeading>Test Heading</TabsHeading>
|
|
8
|
+
<TabsList>
|
|
9
|
+
<TabsTrigger value="account">{Dummy_label}</TabsTrigger>
|
|
10
|
+
</TabsList>
|
|
11
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
12
|
+
</Tabs>);
|
|
13
|
+
expect(screen.getByText("Test Heading")).toBeInTheDocument();
|
|
14
|
+
});
|
|
15
|
+
it("renders TabsHeading with children", function () {
|
|
16
|
+
render(<TabsHeading>Custom Heading</TabsHeading>);
|
|
17
|
+
expect(screen.getByText("Custom Heading")).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
it("renders Tabs with different sizes", function () {
|
|
20
|
+
Object.keys(tabSizes).forEach(function (size) {
|
|
21
|
+
render(<Tabs defaultValue="account" size={size}>
|
|
22
|
+
<TabsHeading>{size} Tabs</TabsHeading>
|
|
23
|
+
<TabsList>
|
|
24
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
25
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
26
|
+
</TabsList>
|
|
27
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
28
|
+
<TabsContent value="password">Change Password</TabsContent>
|
|
29
|
+
</Tabs>);
|
|
30
|
+
expect(screen.getByText("".concat(size, " Tabs"))).toBeInTheDocument();
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
it("renders TabsList and TabsTrigger", function () {
|
|
34
|
+
render(<Tabs defaultValue="account">
|
|
35
|
+
<TabsList>
|
|
36
|
+
<TabsTrigger value="account">{Dummy_label}</TabsTrigger>
|
|
37
|
+
</TabsList>
|
|
38
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
39
|
+
</Tabs>);
|
|
40
|
+
expect(screen.getByText(Dummy_label)).toBeInTheDocument();
|
|
41
|
+
});
|
|
42
|
+
it("renders TabsContent when trigger is active", function () {
|
|
43
|
+
render(<Tabs defaultValue="account">
|
|
44
|
+
<TabsList>
|
|
45
|
+
<TabsTrigger value="account">{Dummy_label}</TabsTrigger>
|
|
46
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
47
|
+
</TabsList>
|
|
48
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
49
|
+
<TabsContent value="password">Change Password</TabsContent>
|
|
50
|
+
</Tabs>);
|
|
51
|
+
expect(screen.getByText("Account Settings")).toBeInTheDocument();
|
|
52
|
+
expect(screen.queryByText("Change Password")).not.toBeInTheDocument();
|
|
53
|
+
});
|
|
54
|
+
it("renders without heading prop", function () {
|
|
55
|
+
render(<Tabs defaultValue="account">
|
|
56
|
+
<TabsList>
|
|
57
|
+
<TabsTrigger value="account">{Dummy_label}</TabsTrigger>
|
|
58
|
+
</TabsList>
|
|
59
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
60
|
+
</Tabs>);
|
|
61
|
+
expect(screen.queryByText("Test Heading")).not.toBeInTheDocument();
|
|
62
|
+
});
|
|
63
|
+
it("renders only active tab content", function () {
|
|
64
|
+
render(<Tabs defaultValue="account">
|
|
65
|
+
<TabsList>
|
|
66
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
67
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
68
|
+
</TabsList>
|
|
69
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
70
|
+
<TabsContent value="password">Change Password</TabsContent>
|
|
71
|
+
</Tabs>);
|
|
72
|
+
expect(screen.getByText("Account Settings")).toBeInTheDocument();
|
|
73
|
+
expect(screen.queryByText("Change Password")).not.toBeInTheDocument();
|
|
74
|
+
});
|
|
75
|
+
it("applies additional className to TabsTrigger", function () {
|
|
76
|
+
render(<Tabs defaultValue="account">
|
|
77
|
+
<TabsList>
|
|
78
|
+
<TabsTrigger value="account" className="custom-class">
|
|
79
|
+
{Dummy_label}
|
|
80
|
+
</TabsTrigger>
|
|
81
|
+
</TabsList>
|
|
82
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
83
|
+
</Tabs>);
|
|
84
|
+
var trigger = screen.getByText(Dummy_label);
|
|
85
|
+
expect(trigger).toHaveClass("custom-class");
|
|
86
|
+
});
|
|
87
|
+
it("renders correctly without a className prop", function () {
|
|
88
|
+
render(<Tabs defaultValue="account">
|
|
89
|
+
<TabsList>
|
|
90
|
+
<TabsTrigger value="account">{Dummy_label}</TabsTrigger>
|
|
91
|
+
</TabsList>
|
|
92
|
+
<TabsContent value="account">Account Settings</TabsContent>
|
|
93
|
+
</Tabs>);
|
|
94
|
+
var trigger = screen.getByText(Dummy_label);
|
|
95
|
+
expect(trigger.className).not.toMatch(/custom-class/);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -3,8 +3,8 @@ import { CalendarSize } from "@/types/calendar";
|
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, calendarSize, ...props }: Omit<DayPickerProps, "captionLayout"> & {
|
|
5
5
|
calendarSize?: CalendarSize;
|
|
6
|
-
}): import("react
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
7
|
declare function CalendarDayButton({ className, day, modifiers, calendarSize, ...props }: Omit<ComponentProps<typeof DayButton>, "color" | "variant" | "size" | "shape"> & {
|
|
8
8
|
calendarSize: CalendarSize;
|
|
9
|
-
}): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
10
|
export { Calendar, CalendarDayButton };
|