linkedunion-design-kit 1.9.2 → 1.9.3

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.
Files changed (141) hide show
  1. package/dist/app/layout.jsx +13 -0
  2. package/dist/app/page.jsx +25 -0
  3. package/dist/build/types/app/layout.d.ts +12 -0
  4. package/dist/build/types/app/layout.js +22 -0
  5. package/dist/build/types/app/page.d.ts +12 -0
  6. package/dist/build/types/app/page.js +22 -0
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.js +3 -0
  9. package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
  10. package/dist/src/components/Accordion/accordion.jsx +59 -0
  11. package/dist/src/components/Alerts/Alert/alert.jsx +152 -0
  12. package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
  13. package/dist/src/components/Alerts/AlertDialog/alert-dialog.jsx +170 -0
  14. package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +552 -0
  15. package/dist/src/components/AppIcons/AndroidIcon.jsx +24 -0
  16. package/dist/src/components/AppIcons/AppIcon.jsx +29 -0
  17. package/dist/src/components/AppIcons/AppIcon.stories.jsx +223 -0
  18. package/dist/src/components/AppIcons/AppleIcon.jsx +31 -0
  19. package/dist/src/components/AppIcons/PlayStoreIcon.jsx +29 -0
  20. package/dist/src/components/Avatar/Avatar/Avatar.jsx +45 -0
  21. package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
  22. package/dist/src/components/Avatar/Avatar/Avatar.test.jsx +9 -0
  23. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +17 -0
  24. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +32 -0
  25. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +20 -0
  26. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.jsx +50 -0
  27. package/dist/src/components/Badge/Badge.jsx +54 -0
  28. package/dist/src/components/Badge/Badge.stories.jsx +201 -0
  29. package/dist/src/components/Button/Button/Button.d.ts +7 -6
  30. package/dist/src/components/Button/Button/Button.js +32 -9
  31. package/dist/src/components/Button/Button/Button.jsx +101 -0
  32. package/dist/src/components/Button/Button/Button.stories.jsx +283 -0
  33. package/dist/src/components/Button/Button/Button.test.jsx +73 -0
  34. package/dist/src/components/Button/IconButton/IconButton.jsx +63 -0
  35. package/dist/src/components/Button/IconButton/IconButton.stories.jsx +128 -0
  36. package/dist/src/components/Button/IconButton/IconButton.test.jsx +28 -0
  37. package/dist/src/components/Button/index.js +1 -1
  38. package/dist/src/components/Card/MultipleNews/MultiNews.jsx +80 -0
  39. package/dist/src/components/Card/MultipleNews/MultiNews.stories.jsx +104 -0
  40. package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +60 -0
  41. package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +106 -0
  42. package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
  43. package/dist/src/components/Card/SinglePost/SinglePost.stories.jsx +68 -0
  44. package/dist/src/components/Card/card.jsx +36 -0
  45. package/dist/src/components/Card/contactProfile/ContactProfile.jsx +60 -0
  46. package/dist/src/components/Card/contactProfile/ContactProfile.stories.jsx +103 -0
  47. package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
  48. package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.jsx +69 -0
  49. package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
  50. package/dist/src/components/Card/photoGallery/PhotoGallery.stories.jsx +39 -0
  51. package/dist/src/components/Checkbox/checkbox.jsx +47 -0
  52. package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
  53. package/dist/src/components/ColorPicker/ColorPicker.jsx +67 -0
  54. package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
  55. package/dist/src/components/Colors/color.jsx +5 -0
  56. package/dist/src/components/Colors/color.stories.jsx +20 -0
  57. package/dist/src/components/Colors/color.test.jsx +23 -0
  58. package/dist/src/components/Dropdown/Combobox/Combobox.jsx +198 -0
  59. package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
  60. package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
  61. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.jsx +102 -0
  62. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +464 -0
  63. package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
  64. package/dist/src/components/Dropdown/Select.stories.jsx +201 -0
  65. package/dist/src/components/Dropdown/select.jsx +93 -0
  66. package/dist/src/components/Icons/LUIcon.jsx +41 -0
  67. package/dist/src/components/Icons/LUIcon.test.jsx +308 -0
  68. package/dist/src/components/Icons/stories/IconDropdown.jsx +67 -0
  69. package/dist/src/components/Icons/stories/IconGallery.jsx +77 -0
  70. package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +86 -0
  71. package/dist/src/components/Icons/stories/LUIcon.stories.jsx +108 -0
  72. package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +50 -0
  73. package/dist/src/components/ImageUploader/imageUploader.jsx +94 -0
  74. package/dist/src/components/Images/LuImage.jsx +19 -0
  75. package/dist/src/components/Images/LuImage.stories.jsx +154 -0
  76. package/dist/src/components/Images/LuImage.test.jsx +44 -0
  77. package/dist/src/components/Input/Input.stories.jsx +250 -0
  78. package/dist/src/components/Input/input.jsx +110 -0
  79. package/dist/src/components/Label/Label.jsx +32 -0
  80. package/dist/src/components/Label/Label.stories.jsx +30 -0
  81. package/dist/src/components/Pagination/pagination.d.ts +33 -0
  82. package/dist/src/components/Pagination/pagination.js +68 -0
  83. package/dist/src/components/Pagination/pagination.jsx +68 -0
  84. package/dist/src/components/Pagination/pagination.stories.d.ts +74 -0
  85. package/dist/src/components/Pagination/pagination.stories.js +168 -0
  86. package/dist/src/components/Pagination/pagination.stories.jsx +114 -0
  87. package/dist/src/components/RadioGroup/RadioGroup.stories.jsx +146 -0
  88. package/dist/src/components/RadioGroup/radio-group.jsx +49 -0
  89. package/dist/src/components/Skeleton/skeleton.d.ts +117 -0
  90. package/dist/src/components/Skeleton/skeleton.js +140 -0
  91. package/dist/src/components/Skeleton/skeleton.stories.d.ts +153 -0
  92. package/dist/src/components/Skeleton/skeleton.stories.js +404 -0
  93. package/dist/src/components/Slider/Slider.stories.jsx +159 -0
  94. package/dist/src/components/Slider/slider.jsx +31 -0
  95. package/dist/src/components/SweetAlert/SweetAlert.jsx +147 -0
  96. package/dist/src/components/SweetAlert/SweetAlert.stories.jsx +505 -0
  97. package/dist/src/components/Switch/Switch.stories.jsx +66 -0
  98. package/dist/src/components/Switch/switch.jsx +61 -0
  99. package/dist/src/components/Table/Table.d.ts +26 -0
  100. package/dist/src/components/Table/Table.js +186 -0
  101. package/dist/src/components/Table/Table.jsx +221 -0
  102. package/dist/src/components/Table/Table.stories.d.ts +51 -0
  103. package/dist/src/components/Table/Table.stories.js +408 -0
  104. package/dist/src/components/Table/Table.stories.jsx +652 -0
  105. package/dist/src/components/Table/index.d.ts +20 -0
  106. package/dist/src/components/Table/index.js +20 -0
  107. package/dist/src/components/Tabs/Tabs.stories.jsx +29 -0
  108. package/dist/src/components/Tabs/tabs.jsx +32 -0
  109. package/dist/src/components/Title/Title.jsx +8 -0
  110. package/dist/src/components/Title/Title.stories.jsx +37 -0
  111. package/dist/src/components/Title/Title.test.jsx +24 -0
  112. package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
  113. package/dist/src/components/ToolTip/Tooltip.stories.jsx +25 -0
  114. package/dist/src/components/Typography/Body/Body.stories.jsx +34 -0
  115. package/dist/src/components/Typography/Body/body.jsx +52 -0
  116. package/dist/src/components/Typography/Caption/Caption.stories.jsx +24 -0
  117. package/dist/src/components/Typography/Caption/caption.jsx +25 -0
  118. package/dist/src/components/Typography/Display/Display.stories.jsx +24 -0
  119. package/dist/src/components/Typography/Display/display.jsx +39 -0
  120. package/dist/src/components/Typography/Heading/Heading.stories.jsx +37 -0
  121. package/dist/src/components/Typography/Heading/heading.jsx +53 -0
  122. package/dist/src/components/ui/avatar.d.ts +3 -10
  123. package/dist/src/components/ui/avatar.js +12 -27
  124. package/dist/src/components/ui/avatar.jsx +27 -0
  125. package/dist/src/components/ui/button.d.ts +10 -0
  126. package/dist/src/components/ui/button.js +56 -0
  127. package/dist/src/components/ui/button.jsx +45 -0
  128. package/dist/src/components/ui/collapsible.d.ts +5 -0
  129. package/dist/src/components/ui/collapsible.js +5 -0
  130. package/dist/src/components/ui/collapsible.jsx +5 -0
  131. package/dist/src/components/ui/command.jsx +67 -0
  132. package/dist/src/components/ui/dialog.jsx +66 -0
  133. package/dist/src/components/ui/popover.jsx +33 -0
  134. package/dist/src/components/ui/tooltip.jsx +38 -0
  135. package/dist/src/components/ui/typography.jsx +56 -0
  136. package/dist/src/utils/iconList.d.ts +4 -0
  137. package/dist/src/utils/iconList.js +4 -0
  138. package/dist/styles/global.css +139 -0
  139. package/package.json +1 -1
  140. package/dist/src/components/Avatar/Avatar/Avatar1.stories.d.ts +0 -17
  141. package/dist/src/components/Avatar/Avatar/Avatar1.stories.js +0 -68
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
3
+ export default {
4
+ title: "Components/Tabs",
5
+ component: Tabs,
6
+ tags: ["autodocs"],
7
+ };
8
+ var Template = function (args) {
9
+ return <>{args.children}</>;
10
+ };
11
+ export var _Tabs = Template.bind({});
12
+ _Tabs.args = {
13
+ children: (<Tabs defaultValue="account">
14
+ <TabsList>
15
+ <TabsTrigger value="account">Account</TabsTrigger>
16
+ <TabsTrigger value="password">Password</TabsTrigger>
17
+ </TabsList>
18
+ <TabsContent value="account">Account Settings</TabsContent>
19
+ <TabsContent value="password">Change Password</TabsContent>
20
+ </Tabs>),
21
+ };
22
+ _Tabs.argTypes = {
23
+ children: {
24
+ 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).",
25
+ table: {
26
+ type: { summary: "React.ReactNode" },
27
+ },
28
+ },
29
+ };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import * as React from "react";
14
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
15
+ import { cn } from "../../lib/utils";
16
+ function Tabs(_a) {
17
+ var className = _a.className, props = __rest(_a, ["className"]);
18
+ return (<TabsPrimitive.Root data-slot="tabs" className={cn("flex flex-col gap-6", className)} {...props}/>);
19
+ }
20
+ function TabsList(_a) {
21
+ var className = _a.className, props = __rest(_a, ["className"]);
22
+ return (<TabsPrimitive.List data-slot="tabs-list" className={cn("bg-blue-100 !p-1 rounded-lg", className)} {...props}/>);
23
+ }
24
+ function TabsTrigger(_a) {
25
+ var className = _a.className, props = __rest(_a, ["className"]);
26
+ return (<TabsPrimitive.Trigger data-slot="tabs-trigger" className={cn("!py-2 !px-3 transition-all !rounded-sm !text-sm !font-normal !leading-5 w-1/2 max-sm:w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-blue-50", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className)} {...props}/>);
27
+ }
28
+ function TabsContent(_a) {
29
+ var className = _a.className, props = __rest(_a, ["className"]);
30
+ return (<TabsPrimitive.Content data-slot="tabs-content" className={cn("flex-1 outline-none", className)} {...props}/>);
31
+ }
32
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Dummy_Title } from "../../utils/constants";
3
+ import TitleStyles from "./Title.module.css";
4
+ var Title = function (_a) {
5
+ var _b = _a.className, className = _b === void 0 ? "" : _b, _c = _a.children, children = _c === void 0 ? Dummy_Title : _c;
6
+ return (<h2 className={"".concat(TitleStyles["main-title"], " ").concat(className)}>{children}</h2>);
7
+ };
8
+ export default Title;
@@ -0,0 +1,37 @@
1
+ import { Dummy_Title } from "../../utils/constants";
2
+ import Title from "./Title";
3
+ export default {
4
+ title: "Components/Title",
5
+ component: Title,
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: "A configurable body text component with design system-approved styling variants",
10
+ },
11
+ },
12
+ },
13
+ argTypes: {
14
+ className: {
15
+ description: "Additional CSS classes",
16
+ control: "text",
17
+ table: {
18
+ type: { summary: "string" },
19
+ defaultValue: { summary: "" },
20
+ },
21
+ },
22
+ children: {
23
+ description: "Text to be displayed",
24
+ control: "text",
25
+ table: {
26
+ type: { summary: "string" },
27
+ defaultValue: { summary: "Title" },
28
+ },
29
+ },
30
+ },
31
+ };
32
+ var Template = function (args) { return <Title {...args}/>; };
33
+ export var _Title = Template.bind({});
34
+ _Title.args = {
35
+ children: Dummy_Title,
36
+ className: "",
37
+ };
@@ -0,0 +1,24 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import { Dummy_Title } from "../../utils/constants";
3
+ import Title from "./Title";
4
+ describe("Title Component", function () {
5
+ it("renders with default props", function () {
6
+ render(<Title />);
7
+ expect(screen.getByText(Dummy_Title)).toBeInTheDocument();
8
+ });
9
+ it("renders with custom children", function () {
10
+ var customText = "Custom Title";
11
+ render(<Title>{customText}</Title>);
12
+ expect(screen.getByText(customText)).toBeInTheDocument();
13
+ });
14
+ it("applies custom className", function () {
15
+ var customClass = "custom-class";
16
+ render(<Title className={customClass}/>);
17
+ var titleElement = screen.getByText(Dummy_Title);
18
+ expect(titleElement).toHaveClass("main-title custom-class");
19
+ });
20
+ it("renders without crashing", function () {
21
+ var container = render(<Title />).container;
22
+ expect(container).toBeDefined();
23
+ });
24
+ });
@@ -0,0 +1,18 @@
1
+ import { Tooltip as ShadTooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "../ui/tooltip";
2
+ import { Body } from "../Typography/Body/body";
3
+ var Tooltip = function (_a) {
4
+ var title = _a.title, className = _a.className, children = _a.children;
5
+ return (<TooltipProvider>
6
+ <ShadTooltip>
7
+ <TooltipTrigger asChild className={className}>
8
+ {children}
9
+ </TooltipTrigger>
10
+ <TooltipContent>
11
+ <Body variant="body-md" className="text-center">
12
+ {title}
13
+ </Body>
14
+ </TooltipContent>
15
+ </ShadTooltip>
16
+ </TooltipProvider>);
17
+ };
18
+ export default Tooltip;
@@ -0,0 +1,25 @@
1
+ import Tooltip from "./Tooltip";
2
+ import { IconButton } from "../Button/IconButton/IconButton";
3
+ export default {
4
+ title: "Components/Tooltip",
5
+ component: Tooltip,
6
+ tags: ["autodocs"],
7
+ };
8
+ var Template = function (args) { return (<Tooltip {...args}></Tooltip>); };
9
+ export var _ToolTip = Template.bind({});
10
+ _ToolTip.args = {
11
+ children: <IconButton icon="volume-high" shape="rounded-full"/>,
12
+ title: "Tooltip",
13
+ };
14
+ _ToolTip.argTypes = {
15
+ children: {
16
+ description: "React component to be wrapped",
17
+ control: false,
18
+ table: {
19
+ type: { summary: "string" },
20
+ defaultValue: {
21
+ summary: '<IconButton icon={<LUIcon icon="volume-high" size="sm"/>} shape="rounded-full"/>',
22
+ },
23
+ },
24
+ },
25
+ };
@@ -0,0 +1,34 @@
1
+ import { Dummy_Para } from "../../../utils/constants";
2
+ import { Body, variant } from "../../../components/Typography/Body/body";
3
+ export default {
4
+ title: "Components/Typography/Body",
5
+ component: Body,
6
+ tags: ["autodocs"],
7
+ };
8
+ var Template = function (args) { return <Body {...args}></Body>; };
9
+ export var _Body = Template.bind({});
10
+ _Body.args = {
11
+ children: Dummy_Para,
12
+ variant: "body-base",
13
+ as: "p",
14
+ };
15
+ _Body.argTypes = {
16
+ variant: {
17
+ control: { type: "select" },
18
+ options: Object.keys(variant),
19
+ description: "Body Variant",
20
+ table: {
21
+ defaultValue: { summary: "body-base" },
22
+ type: { summary: "string" },
23
+ },
24
+ },
25
+ as: {
26
+ control: { type: "select" },
27
+ options: ["p", "span"],
28
+ description: "HTML tag to render",
29
+ table: {
30
+ defaultValue: { summary: "p" },
31
+ type: { summary: '"p" | "span"' },
32
+ },
33
+ },
34
+ };
@@ -0,0 +1,52 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import { cva } from "class-variance-authority";
14
+ import { cn } from "../../../lib/utils";
15
+ export var variant = {
16
+ "body-xl": "text-xl font-normal",
17
+ "body-xl-500": "text-xl font-medium",
18
+ "body-xl-600": "text-xl font-semibold",
19
+ "body-xl-700": "text-xl font-bold",
20
+ "body-lg": "text-lg font-normal",
21
+ "body-lg-500": "text-lg font-medium",
22
+ "body-lg-600": "text-lg font-semibold",
23
+ "body-lg-700": "text-lg font-bold",
24
+ "body-md": "text-base font-normal",
25
+ "body-md-500": "text-base font-medium",
26
+ "body-md-600": "text-base font-semibold",
27
+ "body-md-700": "text-base font-bold",
28
+ "body-sm": "text-sm font-normal",
29
+ "body-sm-500": "text-sm font-medium",
30
+ "body-sm-600": "text-sm font-semibold",
31
+ "body-sm-700": "text-sm font-bold",
32
+ "body-xs": "text-xs font-normal",
33
+ "body-xs-500": "text-xs font-medium",
34
+ "body-xs-600": "text-xs font-semibold",
35
+ "body-xs-700": "text-xs font-bold",
36
+ };
37
+ var bodyVariants = cva("!leading-normal m-0", {
38
+ variants: {
39
+ variant: variant,
40
+ },
41
+ defaultVariants: {
42
+ variant: "body-md",
43
+ },
44
+ });
45
+ function Body(_a) {
46
+ var as = _a.as, className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["as", "className", "variant", "children"]);
47
+ var Tag = as || "p";
48
+ return (<Tag className={cn(bodyVariants({ variant: variant }), className)} {...props}>
49
+ {children}
50
+ </Tag>);
51
+ }
52
+ export { Body, bodyVariants };
@@ -0,0 +1,24 @@
1
+ import { Dummy_Para } from "../../../utils/constants";
2
+ import { Caption, variantClasses, } from "../../../components/Typography/Caption/caption";
3
+ export default {
4
+ title: "Components/Typography/Caption",
5
+ component: Caption,
6
+ tags: ["autodocs"],
7
+ };
8
+ var Template = function (args) { return <Caption {...args}></Caption>; };
9
+ export var _Caption = Template.bind({});
10
+ _Caption.args = {
11
+ children: Dummy_Para,
12
+ variant: "md",
13
+ };
14
+ _Caption.argTypes = {
15
+ variant: {
16
+ control: { type: "select" },
17
+ options: Object.keys(variantClasses),
18
+ description: "Caption Variant",
19
+ table: {
20
+ defaultValue: { summary: "md" },
21
+ type: { summary: "string" },
22
+ },
23
+ },
24
+ };
@@ -0,0 +1,25 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import { cn } from "../../../lib/utils";
14
+ export var variantClasses = {
15
+ sm: "text-xs",
16
+ md: "text-sm",
17
+ lg: "text-base",
18
+ };
19
+ function Caption(_a) {
20
+ var className = _a.className, children = _a.children, _b = _a.variant, variant = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "children", "variant"]);
21
+ return (<p className={cn("!font-normal !leading-normal m-0 inline", variantClasses[variant], className)} {...props}>
22
+ {children}
23
+ </p>);
24
+ }
25
+ export { Caption };
@@ -0,0 +1,24 @@
1
+ import { Dummy_Para } from "../../../utils/constants";
2
+ import { Display, variant } from "../../../components/Typography/Display/display";
3
+ export default {
4
+ title: "Components/Typography/Display",
5
+ component: Display,
6
+ tags: ["autodocs"],
7
+ };
8
+ var Template = function (args) { return <Display {...args}></Display>; };
9
+ export var _Display = Template.bind({});
10
+ _Display.args = {
11
+ children: Dummy_Para,
12
+ variant: "display-md",
13
+ };
14
+ _Display.argTypes = {
15
+ variant: {
16
+ control: { type: "select" },
17
+ options: Object.keys(variant),
18
+ description: "Display Variant",
19
+ table: {
20
+ defaultValue: { summary: "display-md" },
21
+ type: { summary: "string" },
22
+ },
23
+ },
24
+ };
@@ -0,0 +1,39 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import { cva } from "class-variance-authority";
14
+ import { cn } from "../../../lib/utils";
15
+ export var variant = {
16
+ "display-lg": "text-7xl font-bold",
17
+ "display-md": "text-6xl font-bold",
18
+ "display-sm": "text-5xl font-bold",
19
+ };
20
+ var displayVariants = cva("!leading-normal", // Default base class
21
+ {
22
+ variants: {
23
+ variant: variant,
24
+ },
25
+ defaultVariants: {
26
+ variant: "display-md",
27
+ },
28
+ });
29
+ function Display(_a) {
30
+ var className = _a.className, variant = _a.variant, children = _a.children, props = __rest(_a, ["className", "variant", "children"]);
31
+ var Tag = "div";
32
+ if (variant === null || variant === void 0 ? void 0 : variant.startsWith("display")) {
33
+ Tag = "div";
34
+ }
35
+ return (<Tag className={cn(displayVariants({ variant: variant, className: className }))} {...props}>
36
+ {children}
37
+ </Tag>);
38
+ }
39
+ export { Display, displayVariants };
@@ -0,0 +1,37 @@
1
+ import { Dummy_Para } 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
+ export var WithCustomClassName = Template.bind({});
26
+ WithCustomClassName.args = {
27
+ children: "Heading with custom className (red text)",
28
+ variant: "h2",
29
+ className: "text-red-500 underline",
30
+ };
31
+ WithCustomClassName.parameters = {
32
+ docs: {
33
+ description: {
34
+ story: "Demonstrates the usage of the className prop to apply custom styles.",
35
+ },
36
+ },
37
+ };
@@ -0,0 +1,53 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import styles from "./heading.module.css";
14
+ import { cn } from "../../../lib/utils";
15
+ export var variant = {
16
+ h1: styles["h1"],
17
+ "h1-500": styles["h1-500"],
18
+ "h1-600": styles["h1-600"],
19
+ "h1-700": styles["h1-700"],
20
+ h2: styles["h2"],
21
+ "h2-500": styles["h2-500"],
22
+ "h2-600": styles["h2-600"],
23
+ "h2-700": styles["h2-700"],
24
+ h3: styles["h3"],
25
+ "h3-500": styles["h3-500"],
26
+ "h3-600": styles["h3-600"],
27
+ "h3-700": styles["h3-700"],
28
+ h4: styles["h4"],
29
+ "h4-500": styles["h4-500"],
30
+ "h4-600": styles["h4-600"],
31
+ "h4-700": styles["h4-700"],
32
+ h5: styles["h5"],
33
+ "h5-500": styles["h5-500"],
34
+ "h5-600": styles["h5-600"],
35
+ "h5-700": styles["h5-700"],
36
+ h6: styles["h6"],
37
+ "h6-500": styles["h6-500"],
38
+ "h6-600": styles["h6-600"],
39
+ "h6-700": styles["h6-700"],
40
+ };
41
+ var Heading = function (_a) {
42
+ var _b = _a.variant, variant = _b === void 0 ? "h2" : _b, className = _a.className, children = _a.children, props = __rest(_a, ["variant", "className", "children"]);
43
+ var Tag = "span";
44
+ if (variant && typeof variant === "string" && variant.startsWith("h")) {
45
+ Tag = variant.split("-")[0];
46
+ }
47
+ return (<Tag className={cn(styles.heading, typeof variant === "string" && styles["".concat(variant)]
48
+ ? styles["".concat(variant)]
49
+ : styles["h2"], className)} {...props}>
50
+ {children}
51
+ </Tag>);
52
+ };
53
+ export { Heading };
@@ -1,13 +1,6 @@
1
1
  import * as React from "react";
2
2
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
- import { avatar1Size, avatar1Shape, avatarFallbackSize } from "../Avatar/Avatar";
4
- declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
5
- size?: keyof typeof avatar1Size;
6
- shape?: keyof typeof avatar1Shape;
7
- status?: "online" | "offline" | "busy" | "away";
8
- } & React.RefAttributes<HTMLSpanElement>>;
9
- declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
10
- declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
11
- size?: keyof typeof avatarFallbackSize;
12
- } & React.RefAttributes<HTMLSpanElement>>;
3
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
13
6
  export { Avatar, AvatarImage, AvatarFallback };
@@ -20,34 +20,19 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  }
21
21
  return t;
22
22
  };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import * as React from "react";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
25
24
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
26
25
  import { cn } from "../../lib/utils";
27
- import { avatar1Size, avatar1Shape, avatarFallbackSize, iconSizeMap, statusIndicatorSize, statusIndicatorOffset, roundedStatusIndicatorOffset, } from "../Avatar/Avatar";
28
- import LUIcon from "../Icons/LUIcon";
29
- import { StatusIndicator } from "../Avatar/StatusIndicator/StatusIndicator";
30
- var AvatarContext = React.createContext({ size: "md", shape: "rounded" });
31
- var Avatar = React.forwardRef(function (_a, ref) {
32
- var _b;
33
- var className = _a.className, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.shape, shape = _d === void 0 ? "rounded" : _d, status = _a.status, children = _a.children, props = __rest(_a, ["className", "size", "shape", "status", "children"]);
34
- return (_jsx(AvatarPrimitive.Root, __assign({ ref: ref, className: cn("relative flex shrink-0", className, avatar1Size[size], typeof avatar1Shape[shape] === "string"
35
- ? avatar1Shape[shape]
36
- : (_b = avatar1Shape[shape]) === null || _b === void 0 ? void 0 : _b[size]), "data-size": size, "data-shape": shape }, props, { children: _jsxs(AvatarContext.Provider, { value: { size: size, shape: shape }, children: [children, status &&
37
- (shape === "rounded" ? (_jsx(StatusIndicator, { status: status, size: statusIndicatorSize[size], className: cn("absolute", roundedStatusIndicatorOffset[size]) })) : (_jsx(StatusIndicator, { status: status, size: statusIndicatorSize[size], className: cn("absolute", statusIndicatorOffset[size]) })))] }) })));
38
- });
39
- Avatar.displayName = AvatarPrimitive.Root.displayName;
40
- var AvatarImage = React.forwardRef(function (_a, ref) {
26
+ function Avatar(_a) {
41
27
  var className = _a.className, props = __rest(_a, ["className"]);
42
- return (_jsx(AvatarPrimitive.Image, __assign({ ref: ref, className: cn("aspect-square h-full w-full bg-blue-100 rounded-[inherit]", className) }, props)));
43
- });
44
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
45
- var AvatarFallback = React.forwardRef(function (_a, ref) {
46
- var className = _a.className, size = _a.size, children = _a.children, props = __rest(_a, ["className", "size", "children"]);
47
- var ctx = React.useContext(AvatarContext);
48
- var finalSize = (size !== null && size !== void 0 ? size : ctx.size);
49
- return (_jsx(AvatarPrimitive.Fallback, __assign({ ref: ref, className: cn("flex h-full w-full items-center justify-center bg-blue-100 font-medium leading-normal rounded-[inherit]", className, avatarFallbackSize[finalSize]) }, props, { children: children ? (children) : (_jsx(LUIcon, { icon: "user", size: iconSizeMap[finalSize] }) // fallback LUIcon
50
- ) })));
51
- });
52
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
28
+ return (_jsx(AvatarPrimitive.Root, __assign({ "data-slot": "avatar", className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className) }, props)));
29
+ }
30
+ function AvatarImage(_a) {
31
+ var className = _a.className, props = __rest(_a, ["className"]);
32
+ return (_jsx(AvatarPrimitive.Image, __assign({ "data-slot": "avatar-image", className: cn("aspect-square size-full", className) }, props)));
33
+ }
34
+ function AvatarFallback(_a) {
35
+ var className = _a.className, props = __rest(_a, ["className"]);
36
+ return (_jsx(AvatarPrimitive.Fallback, __assign({ "data-slot": "avatar-fallback", className: cn("bg-muted flex size-full items-center justify-center rounded-full", className) }, props)));
37
+ }
53
38
  export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,27 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import * as React from "react";
13
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
14
+ import { cn } from "../../lib/utils";
15
+ function Avatar(_a) {
16
+ var className = _a.className, props = __rest(_a, ["className"]);
17
+ return (<AvatarPrimitive.Root data-slot="avatar" className={cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className)} {...props}/>);
18
+ }
19
+ function AvatarImage(_a) {
20
+ var className = _a.className, props = __rest(_a, ["className"]);
21
+ return (<AvatarPrimitive.Image data-slot="avatar-image" className={cn("aspect-square size-full", className)} {...props}/>);
22
+ }
23
+ function AvatarFallback(_a) {
24
+ var className = _a.className, props = __rest(_a, ["className"]);
25
+ return (<AvatarPrimitive.Fallback data-slot="avatar-fallback" className={cn("bg-muted flex size-full items-center justify-center rounded-full", className)} {...props}/>);
26
+ }
27
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "link" | "outline" | "ghost" | "destructive" | "secondary" | null | undefined;
5
+ size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,56 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { Slot } from "@radix-ui/react-slot";
25
+ import { cva } from "class-variance-authority";
26
+ import { cn } from "../../lib/utils";
27
+ var buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
28
+ variants: {
29
+ variant: {
30
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
31
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
32
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
33
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
34
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
35
+ link: "text-primary underline-offset-4 hover:underline",
36
+ },
37
+ size: {
38
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
39
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
40
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
41
+ icon: "size-9",
42
+ "icon-sm": "size-8",
43
+ "icon-lg": "size-10",
44
+ },
45
+ },
46
+ defaultVariants: {
47
+ variant: "default",
48
+ size: "default",
49
+ },
50
+ });
51
+ function Button(_a) {
52
+ var className = _a.className, variant = _a.variant, size = _a.size, _b = _a.asChild, asChild = _b === void 0 ? false : _b, props = __rest(_a, ["className", "variant", "size", "asChild"]);
53
+ var Comp = asChild ? Slot : "button";
54
+ return (_jsx(Comp, __assign({ "data-slot": "button", className: cn(buttonVariants({ variant: variant, size: size, className: className })) }, props)));
55
+ }
56
+ export { Button, buttonVariants };