linkedunion-design-kit 1.2.5 → 1.2.7

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 (91) hide show
  1. package/dist/app/layout.d.ts +1 -1
  2. package/dist/app/layout.jsx +13 -0
  3. package/dist/app/page.d.ts +1 -1
  4. package/dist/app/page.jsx +71 -0
  5. package/dist/components/Avatar/Avatar.d.ts +1 -1
  6. package/dist/components/Avatar/Avatar.jsx +15 -0
  7. package/dist/components/Avatar/Avatar.stories.jsx +25 -0
  8. package/dist/components/Border/BorderRadius/BorderRadius.d.ts +1 -1
  9. package/dist/components/Border/BorderRadius/BorderRadius.jsx +12 -0
  10. package/dist/components/Border/BorderRadius/BorderRadius.stories.jsx +17 -0
  11. package/dist/components/Border/BorderRadius/BorderRadiusTable.d.ts +1 -1
  12. package/dist/components/Border/BorderRadius/BorderRadiusTable.jsx +61 -0
  13. package/dist/components/Border/BorderRadius/BorderRadiusView.d.ts +1 -1
  14. package/dist/components/Border/BorderRadius/BorderRadiusView.jsx +8 -0
  15. package/dist/components/Border/BorderWidth/BorderWidth.d.ts +1 -1
  16. package/dist/components/Border/BorderWidth/BorderWidth.jsx +12 -0
  17. package/dist/components/Border/BorderWidth/BorderWidth.stories.jsx +17 -0
  18. package/dist/components/Border/BorderWidth/BorderWidthTable.d.ts +1 -1
  19. package/dist/components/Border/BorderWidth/BorderWidthTable.jsx +36 -0
  20. package/dist/components/Border/BorderWidth/ViewBorderWidth.d.ts +1 -1
  21. package/dist/components/Border/BorderWidth/ViewBorderWidth.jsx +8 -0
  22. package/dist/components/Button/Button.d.ts +1 -1
  23. package/dist/components/Button/Button.jsx +16 -0
  24. package/dist/components/Button/Button.stories.jsx +110 -0
  25. package/dist/components/Color/BackgroundColor/Color.d.ts +2 -1
  26. package/dist/components/Color/BackgroundColor/Color.jsx +16 -0
  27. package/dist/components/Color/BackgroundColor/Color.stories.jsx +76 -0
  28. package/dist/components/Color/TextColor.d.ts +1 -1
  29. package/dist/components/Color/TextColor.jsx +6 -0
  30. package/dist/components/Color/TextColor.stories.jsx +17 -0
  31. package/dist/components/Icons/IconView.d.ts +1 -1
  32. package/dist/components/Icons/IconView.jsx +23 -0
  33. package/dist/components/Icons/IconView.stories.jsx +8 -0
  34. package/dist/components/Icons/LUIcon.d.ts +1 -1
  35. package/dist/components/Icons/LUIcon.jsx +20 -0
  36. package/dist/components/Icons/LUIcon.stories.jsx +29 -0
  37. package/dist/components/Images/LuImage.d.ts +1 -1
  38. package/dist/components/Images/LuImage.jsx +7 -0
  39. package/dist/components/Images/LuImage.stories.jsx +39 -0
  40. package/dist/components/MediaCard/Card.d.ts +1 -1
  41. package/dist/components/MediaCard/Card.jsx +33 -0
  42. package/dist/components/MediaCard/Card.stories.jsx +34 -0
  43. package/dist/components/MediaCard/ContactProfile.d.ts +1 -1
  44. package/dist/components/MediaCard/ContactProfile.jsx +39 -0
  45. package/dist/components/MediaCard/PostByCategory.d.ts +1 -1
  46. package/dist/components/MediaCard/PostByCategory.jsx +40 -0
  47. package/dist/components/Navigation/TopNavigation/TopNavigation.d.ts +1 -1
  48. package/dist/components/Navigation/TopNavigation/TopNavigation.jsx +45 -0
  49. package/dist/components/Navigation/TopNavigation/TopNavigation.stories.jsx +40 -0
  50. package/dist/components/Size/MinWidthHeight.d.ts +1 -1
  51. package/dist/components/Size/MinWidthHeight.jsx +8 -0
  52. package/dist/components/Size/MinWidthHeight.stories.jsx +22 -0
  53. package/dist/components/Size/Size.d.ts +1 -1
  54. package/dist/components/Size/Size.jsx +6 -0
  55. package/dist/components/Size/Size.stories.jsx +22 -0
  56. package/dist/components/Size/WidthHeight.d.ts +1 -1
  57. package/dist/components/Size/WidthHeight.jsx +8 -0
  58. package/dist/components/Size/WidthHeight.stories.jsx +22 -0
  59. package/dist/components/Spacing/Margin/Margin.d.ts +1 -1
  60. package/dist/components/Spacing/Margin/Margin.jsx +86 -0
  61. package/dist/components/Spacing/Margin/MarginBottom.d.ts +1 -1
  62. package/dist/components/Spacing/Margin/MarginBottom.jsx +86 -0
  63. package/dist/components/Spacing/Margin/MarginLeft.d.ts +1 -1
  64. package/dist/components/Spacing/Margin/MarginLeft.jsx +86 -0
  65. package/dist/components/Spacing/Margin/MarginRight.d.ts +1 -1
  66. package/dist/components/Spacing/Margin/MarginRight.jsx +86 -0
  67. package/dist/components/Spacing/Margin/MarginToken.d.ts +1 -1
  68. package/dist/components/Spacing/Margin/MarginToken.jsx +27 -0
  69. package/dist/components/Spacing/Margin/MarginToken.stories.jsx +7 -0
  70. package/dist/components/Spacing/Margin/MarginTop.d.ts +1 -1
  71. package/dist/components/Spacing/Margin/MarginTop.jsx +87 -0
  72. package/dist/components/Spacing/Padding/Padding.d.ts +1 -1
  73. package/dist/components/Spacing/Padding/Padding.jsx +87 -0
  74. package/dist/components/Spacing/Padding/PaddingBottom.d.ts +1 -1
  75. package/dist/components/Spacing/Padding/PaddingBottom.jsx +86 -0
  76. package/dist/components/Spacing/Padding/PaddingLeft.d.ts +1 -1
  77. package/dist/components/Spacing/Padding/PaddingLeft.jsx +86 -0
  78. package/dist/components/Spacing/Padding/PaddingRight.d.ts +1 -1
  79. package/dist/components/Spacing/Padding/PaddingRight.jsx +87 -0
  80. package/dist/components/Spacing/Padding/PaddingToken.d.ts +1 -1
  81. package/dist/components/Spacing/Padding/PaddingToken.jsx +27 -0
  82. package/dist/components/Spacing/Padding/PaddingToken.stories.jsx +7 -0
  83. package/dist/components/Spacing/Padding/PaddingTop.d.ts +1 -1
  84. package/dist/components/Spacing/Padding/PaddingTop.jsx +87 -0
  85. package/dist/components/Typography/Headings/Headings.d.ts +1 -1
  86. package/dist/components/Typography/Headings/Headings.jsx +6 -0
  87. package/dist/components/Typography/Headings/Headings.stories.jsx +19 -0
  88. package/dist/components/Typography/Typography.d.ts +1 -1
  89. package/dist/components/Typography/Typography.jsx +8 -0
  90. package/dist/components/Typography/Typography.stories.jsx +51 -0
  91. package/package.json +1 -1
@@ -3,4 +3,4 @@ import '../styles/globals.css';
3
3
  export declare const metadata: Metadata;
4
4
  export default function RootLayout({ children, }: {
5
5
  children: React.ReactNode;
6
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { Inter } from 'next/font/google';
2
+ import '../styles/globals.css';
3
+ var inter = Inter({ subsets: ['latin'] });
4
+ export var metadata = {
5
+ title: 'Create Next App',
6
+ description: 'Generated by create next app',
7
+ };
8
+ export default function RootLayout(_a) {
9
+ var children = _a.children;
10
+ return (<html lang="en">
11
+ <body className={inter.className}>{children}</body>
12
+ </html>);
13
+ }
@@ -1 +1 @@
1
- export default function Home(): import("react/jsx-runtime").JSX.Element;
1
+ export default function Home(): import("react").JSX.Element;
@@ -0,0 +1,71 @@
1
+ import Image from 'next/image';
2
+ export default function Home() {
3
+ return (<main className="flex min-h-screen flex-col items-center justify-between p-24">
4
+ <div className="z-10 max-w-5xl w-full items-center justify-between font-mono text-sm lg:flex">
5
+ <p className="fixed left-0 top-0 flex w-full justify-center border-b border-gray-300 bg-gradient-to-b from-zinc-200 pb-6 pt-8 backdrop-blur-2xl dark:border-neutral-800 dark:bg-zinc-800/30 dark:from-inherit lg:static lg:w-auto lg:rounded-xl lg:border lg:bg-gray-200 lg:p-4 lg:dark:bg-zinc-800/30">
6
+ Get started by editing&nbsp;
7
+ <code className="font-mono font-bold">app/page.tsx</code>
8
+ </p>
9
+ <div className="fixed bottom-0 left-0 flex h-48 w-full items-end justify-center bg-gradient-to-t from-white via-white dark:from-black dark:via-black lg:static lg:h-auto lg:w-auto lg:bg-none">
10
+ <a className="pointer-events-none flex place-items-center gap-2 p-8 lg:pointer-events-auto lg:p-0" href="https://vercel.com?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" target="_blank" rel="noopener noreferrer">
11
+ By{' '}
12
+ <Image src="/vercel.svg" alt="Vercel Logo" className="dark:invert" width={100} height={24} priority/>
13
+ </a>
14
+ </div>
15
+ </div>
16
+
17
+ <div className="relative flex place-items-center before:absolute before:h-[300px] before:w-[480px] before:-translate-x-1/2 before:rounded-full before:bg-gradient-radial before:from-white before:to-transparent before:blur-2xl before:content-[''] after:absolute after:-z-20 after:h-[180px] after:w-[240px] after:translate-x-1/3 after:bg-gradient-conic after:from-sky-200 after:via-blue-200 after:blur-2xl after:content-[''] before:dark:bg-gradient-to-br before:dark:from-transparent before:dark:to-blue-700 before:dark:opacity-10 after:dark:from-sky-900 after:dark:via-[#0141ff] after:dark:opacity-40 before:lg:h-[360px] z-[-1]">
18
+ <Image className="relative dark:drop-shadow-[0_0_0.3rem_#ffffff70] dark:invert" src="/next.svg" alt="Next.js Logo" width={180} height={37} priority/>
19
+ </div>
20
+
21
+ <div className="mb-32 grid text-center lg:max-w-5xl lg:w-full lg:mb-0 lg:grid-cols-4 lg:text-left">
22
+ <a href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" target="_blank" rel="noopener noreferrer">
23
+ <h2 className={"mb-3 text-2xl font-semibold"}>
24
+ Docs{' '}
25
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
26
+ -&gt;
27
+ </span>
28
+ </h2>
29
+ <p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
30
+ Find in-depth information about Next.js features and API.
31
+ </p>
32
+ </a>
33
+
34
+ <a href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" target="_blank" rel="noopener noreferrer">
35
+ <h2 className={"mb-3 text-2xl font-semibold"}>
36
+ Learn{' '}
37
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
38
+ -&gt;
39
+ </span>
40
+ </h2>
41
+ <p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
42
+ Learn about Next.js in an interactive course with&nbsp;quizzes!
43
+ </p>
44
+ </a>
45
+
46
+ <a href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" target="_blank" rel="noopener noreferrer">
47
+ <h2 className={"mb-3 text-2xl font-semibold"}>
48
+ Templates{' '}
49
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
50
+ -&gt;
51
+ </span>
52
+ </h2>
53
+ <p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
54
+ Explore the Next.js 13 playground.
55
+ </p>
56
+ </a>
57
+
58
+ <a href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template&utm_campaign=create-next-app" className="group rounded-lg border border-transparent px-5 py-4 transition-colors hover:border-gray-300 hover:bg-gray-100 hover:dark:border-neutral-700 hover:dark:bg-neutral-800/30" target="_blank" rel="noopener noreferrer">
59
+ <h2 className={"mb-3 text-2xl font-semibold"}>
60
+ Deploy{' '}
61
+ <span className="inline-block transition-transform group-hover:translate-x-1 motion-reduce:transform-none">
62
+ -&gt;
63
+ </span>
64
+ </h2>
65
+ <p className={"m-0 max-w-[30ch] text-sm opacity-50"}>
66
+ Instantly deploy your Next.js site to a shareable URL with Vercel.
67
+ </p>
68
+ </a>
69
+ </div>
70
+ </main>);
71
+ }
@@ -1,2 +1,2 @@
1
1
  import { AvatarProps } from "@/types/interface";
2
- export declare const Avatar: ({ image, icon, shape, size, className }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Avatar: ({ image, icon, shape, size, className }: AvatarProps) => import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { LUIcon } from "../Icons/LUIcon";
2
+ import { iconList } from "../../utils/iconList";
3
+ import { avtarBackgroundSize } from "../../utils";
4
+ export var Avatar = function (_a) {
5
+ var image = _a.image, _b = _a.icon, icon = _b === void 0 ? 'user' : _b, shape = _a.shape, size = _a.size, className = _a.className;
6
+ var defaultIcon = iconList.find(function (item) { return item.key === (icon || "user"); });
7
+ return (<>
8
+ <div className={"".concat(image ? 'bg-primary-200' : 'bg-gray-100', " flex items-center justify-center ").concat(shape, " overflow-hidden ").concat(className)} style={avtarBackgroundSize(size)} data-testid="lu-avatar">
9
+ {image ?
10
+ <img src={image} alt="image" className={"w-full h-full object-cover"}/>
11
+ :
12
+ <LUIcon size={size} icon={defaultIcon === null || defaultIcon === void 0 ? void 0 : defaultIcon.key} fill="lu-neutral-icon-dark" className={""}/>}
13
+ </div>
14
+ </>);
15
+ };
@@ -0,0 +1,25 @@
1
+ import { Avatar } from "./Avatar";
2
+ import { avatarShapeList, avatarSizesList } from "../../utils";
3
+ export default {
4
+ title: "Components/Avatar",
5
+ component: Avatar,
6
+ };
7
+ var Template = function (args) { return <Avatar {...args}/>; };
8
+ export var avatar = Template.bind({});
9
+ avatar.args = {
10
+ image: '/images/avatar.png',
11
+ shape: 'square',
12
+ size: 'lu-avatar-massive',
13
+ className: '',
14
+ icon: "user",
15
+ };
16
+ avatar.argTypes = {
17
+ shape: {
18
+ control: { type: "select", labels: Object.fromEntries(avatarShapeList.map(function (borderRadius) { return [borderRadius.key, borderRadius.label]; })) },
19
+ options: avatarShapeList.map(function (borderRadius) { return borderRadius.key; }),
20
+ },
21
+ size: {
22
+ control: { type: "select", labels: Object.fromEntries(avatarSizesList.map(function (size) { return [size.key, size.label]; })) },
23
+ options: avatarSizesList.map(function (size) { return size.key; }),
24
+ },
25
+ };
@@ -1,2 +1,2 @@
1
1
  import { BorderRadiusProps } from "@/types/interface";
2
- export declare const BorderRadius: ({ borderRadius }: BorderRadiusProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BorderRadius: ({ borderRadius }: BorderRadiusProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { BorderRadiusTable } from "./BorderRadiusTable";
2
+ import { BorderRadiusView } from "./BorderRadiusView";
3
+ export var BorderRadius = function (_a) {
4
+ var borderRadius = _a.borderRadius;
5
+ return (<>
6
+ <div className="lu-font-size-large lu-font-weight-semibold lu-text-center lu-text-uppercase lu-text-decoration-underline lu-mb-100">Border Radius</div>
7
+ <BorderRadiusTable />
8
+ <div className="lu-mt-150">
9
+ <BorderRadiusView borderRadius={borderRadius}/>
10
+ </div>
11
+ </>);
12
+ };
@@ -0,0 +1,17 @@
1
+ import { BorderRadius } from "./BorderRadius";
2
+ import { borderRadiusList } from "../../../utils";
3
+ export default {
4
+ title: "Components/Border",
5
+ component: BorderRadius,
6
+ };
7
+ var Template = function (args) { return <BorderRadius {...args}/>; };
8
+ export var borderRadius = Template.bind({});
9
+ borderRadius.args = {
10
+ borderRadius: 'lu-border-rounded-xs',
11
+ };
12
+ borderRadius.argTypes = {
13
+ borderRadius: {
14
+ control: { type: "select", labels: Object.fromEntries(borderRadiusList.map(function (borderRadius) { return [borderRadius.key, borderRadius.label]; })) },
15
+ options: borderRadiusList.map(function (borderRadius) { return borderRadius.key; }),
16
+ },
17
+ };
@@ -1 +1 @@
1
- export declare const BorderRadiusTable: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const BorderRadiusTable: () => import("react").JSX.Element;
@@ -0,0 +1,61 @@
1
+ import { table_data_className, table_header_className, table_row_className } from "../../../utils";
2
+ export var BorderRadiusTable = function () {
3
+ return (<>
4
+ <table className="lu-width-100 lu-font-size-x-small lu-font-weight-medium">
5
+ <thead className="bg-primary-100">
6
+ <tr>
7
+ <th className={"".concat(table_header_className)}>Alias Token Name</th>
8
+ <th className={"".concat(table_header_className)}>Base unit Multiplier of 8</th>
9
+ <th className={"".concat(table_header_className)}>Value(PX)(REM)</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <tr>
14
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-none</span></td>
15
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0x</span></td>
16
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0px = 0rem</span></td>
17
+ </tr>
18
+ <tr>
19
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-xs</span></td>
20
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.25x</span></td>
21
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>2px = 0.125rem</span></td>
22
+ </tr>
23
+ <tr>
24
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-sm</span></td>
25
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.5x</span></td>
26
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>4px = 0.25rem</span></td>
27
+ </tr>
28
+ <tr>
29
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-md</span></td>
30
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.75x</span></td>
31
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>6px = 0.375rem</span></td>
32
+ </tr>
33
+ <tr>
34
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-lg</span></td>
35
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>1x</span></td>
36
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>8px = 0.5rem</span></td>
37
+ </tr>
38
+ <tr>
39
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-xl</span></td>
40
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>1.5x</span></td>
41
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>12px = 0.75rem</span></td>
42
+ </tr>
43
+ <tr>
44
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-2xl</span></td>
45
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>2x</span></td>
46
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>16px = 1rem</span></td>
47
+ </tr>
48
+ <tr>
49
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-3xl</span></td>
50
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>3x</span></td>
51
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>24px = 1.5rem</span></td>
52
+ </tr>
53
+ <tr>
54
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-rounded-full</span></td>
55
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>100x</span></td>
56
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>9999px</span></td>
57
+ </tr>
58
+ </tbody>
59
+ </table>
60
+ </>);
61
+ };
@@ -1,2 +1,2 @@
1
1
  import { BorderRadiusProps } from "@/types/interface";
2
- export declare const BorderRadiusView: ({ borderRadius }: BorderRadiusProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BorderRadiusView: ({ borderRadius }: BorderRadiusProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export var BorderRadiusView = function (_a) {
2
+ var borderRadius = _a.borderRadius;
3
+ return (<>
4
+ <div className={"border-primary-600 lu-pd-200 lu-size-2500 lu-border-width-125 ".concat(borderRadius)} data-testid="border-radius">
5
+ <p className="bg-gray-100 lu-pt-050 lu-pr-100 lu-pb-050 lu-pl-100 rounded lu-font-size-x-small">{borderRadius}</p>
6
+ </div>
7
+ </>);
8
+ };
@@ -1,2 +1,2 @@
1
1
  import { BorderWidthProps } from "@/types/interface";
2
- export declare const BorderWidth: ({ border }: BorderWidthProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const BorderWidth: ({ border }: BorderWidthProps) => import("react").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { BorderWidthTable } from "./BorderWidthTable";
2
+ import { ViewBorderWidth } from "./ViewBorderWidth";
3
+ export var BorderWidth = function (_a) {
4
+ var border = _a.border;
5
+ return (<>
6
+ <div className="lu-font-size-large lu-font-weight-semibold lu-text-center lu-text-uppercase lu-text-decoration-underline lu-mb-100">Border Width</div>
7
+ <BorderWidthTable />
8
+ <div className="lu-mt-150">
9
+ <ViewBorderWidth border={border}/>
10
+ </div>
11
+ </>);
12
+ };
@@ -0,0 +1,17 @@
1
+ import { BorderWidth } from "./BorderWidth";
2
+ import { borderWidthList } from "../../../utils";
3
+ export default {
4
+ title: "Components/Border",
5
+ component: BorderWidth,
6
+ };
7
+ var Template = function (args) { return <BorderWidth {...args}/>; };
8
+ export var borderWidth = Template.bind({});
9
+ borderWidth.args = {
10
+ border: 'lu-border-width-125',
11
+ };
12
+ borderWidth.argTypes = {
13
+ border: {
14
+ control: { type: "select", labels: Object.fromEntries(borderWidthList.map(function (borderWidth) { return [borderWidth.key, borderWidth.label]; })) },
15
+ options: borderWidthList.map(function (borderWidth) { return borderWidth.key; }),
16
+ },
17
+ };
@@ -1 +1 @@
1
- export declare const BorderWidthTable: () => import("react/jsx-runtime").JSX.Element;
1
+ export declare const BorderWidthTable: () => import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { table_data_className, table_header_className, table_row_className } from "../../../utils";
2
+ export var BorderWidthTable = function () {
3
+ return (<>
4
+ <table className="lu-width-100 lu-font-size-x-small lu-font-weight-medium">
5
+ <thead className="bg-primary-100">
6
+ <tr>
7
+ <th className={"".concat(table_header_className)}>Alias Token Name</th>
8
+ <th className={"".concat(table_header_className)}>Base unit Multiplier of 8</th>
9
+ <th className={"".concat(table_header_className)}>Value(PX)(REM)</th>
10
+ </tr>
11
+ </thead>
12
+ <tbody>
13
+ <tr>
14
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-width-125</span></td>
15
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.125x</span></td>
16
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>1px = 0.063rem</span></td>
17
+ </tr>
18
+ <tr>
19
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-width-025</span></td>
20
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.25x</span></td>
21
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>2px = 0.125rem</span></td>
22
+ </tr>
23
+ <tr>
24
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-width-050</span></td>
25
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>0.50x</span></td>
26
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>4px = 0.25rem</span></td>
27
+ </tr>
28
+ <tr>
29
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>lu-border-width-100</span></td>
30
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>1x</span></td>
31
+ <td className={"".concat(table_row_className)}><span className={"".concat(table_data_className)}>8px = 0.5rem</span></td>
32
+ </tr>
33
+ </tbody>
34
+ </table>
35
+ </>);
36
+ };
@@ -1,2 +1,2 @@
1
1
  import { BorderWidthProps } from "@/types/interface";
2
- export declare const ViewBorderWidth: ({ border }: BorderWidthProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const ViewBorderWidth: ({ border }: BorderWidthProps) => import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export var ViewBorderWidth = function (_a) {
2
+ var border = _a.border;
3
+ return (<>
4
+ <div className={"border-primary-600 lu-border-rounded-2xl lu-pd-200 lu-size-2500 ".concat(border)} data-testid="border-width">
5
+ <p className="bg-gray-100 lu-pt-050 lu-pr-100 lu-pb-050 lu-pl-100 rounded lu-font-size-x-small lu-text-center">{border}</p>
6
+ </div>
7
+ </>);
8
+ };
@@ -1,2 +1,2 @@
1
1
  import { ButtonProps } from "@/types/interface";
2
- export declare const Button: ({ contentType, variant, label, iconLeft, iconRight, onClick, shape, size, leftIconSize, rightIconSize, className, icon, iconSize, type }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Button: ({ contentType, variant, label, iconLeft, iconRight, onClick, shape, size, leftIconSize, rightIconSize, className, icon, iconSize, type }: ButtonProps) => import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { LUIcon } from "../Icons/LUIcon";
2
+ import { buttonTypeEnum, contentTypeEnum } from "../../utils/enum";
3
+ export var Button = function (_a) {
4
+ var _b = _a.contentType, contentType = _b === void 0 ? contentTypeEnum.text_with_icon : _b, _c = _a.variant, variant = _c === void 0 ? 'lu-btn-primary' : _c, _d = _a.label, label = _d === void 0 ? 'Button Text' : _d, iconLeft = _a.iconLeft, iconRight = _a.iconRight, onClick = _a.onClick, shape = _a.shape, _e = _a.size, size = _e === void 0 ? 'lu-btn-md' : _e, leftIconSize = _a.leftIconSize, rightIconSize = _a.rightIconSize, className = _a.className, icon = _a.icon, iconSize = _a.iconSize, type = _a.type;
5
+ return (<>
6
+ <button className={"flex items-center ".concat(shape, " ").concat(type === buttonTypeEnum.outline ? "outline-button ".concat(variant) : variant, " ").concat(className, " ").concat(contentType === contentTypeEnum.icon_only ? "icon-only ".concat(size) : size)} onClick={onClick}>
7
+ {contentType === contentTypeEnum.none && label}
8
+ {contentType === contentTypeEnum.icon_only && icon && (<LUIcon size={iconSize} icon={icon} fill={type === buttonTypeEnum.outline ? "outline-button ".concat(variant) : variant}/>)}
9
+ {contentType === contentTypeEnum.text_with_icon && (<>
10
+ {iconLeft && iconLeft !== 'none' && (<LUIcon size={leftIconSize} icon={iconLeft} fill={type === buttonTypeEnum.outline ? "outline-button ".concat(variant) : variant} className="lu-mr-100"/>)}
11
+ {label}
12
+ {iconRight && iconRight !== 'none' && (<LUIcon size={rightIconSize} icon={iconRight} fill={type === buttonTypeEnum.outline ? "outline-button ".concat(variant) : variant} className="lu-ml-100"/>)}
13
+ </>)}
14
+ </button>
15
+ </>);
16
+ };
@@ -0,0 +1,110 @@
1
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
2
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
3
+ if (ar || !(i in from)) {
4
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
5
+ ar[i] = from[i];
6
+ }
7
+ }
8
+ return to.concat(ar || Array.prototype.slice.call(from));
9
+ };
10
+ import { Button } from "./Button";
11
+ import { borderRadiusList, buttonColorsList, buttonIconSizeList, buttonWithIconList, butttonSizeList } from "../../utils";
12
+ import { iconList } from "../../utils/iconList";
13
+ import { buttonTypeEnum, contentTypeEnum } from "../../utils/enum";
14
+ export default {
15
+ title: "Components/Button",
16
+ component: Button,
17
+ tags: ['autodocs'],
18
+ };
19
+ var Template = function (args) { return <Button {...args}/>; };
20
+ export var button = Template.bind({});
21
+ button.args = {
22
+ contentType: contentTypeEnum.none,
23
+ variant: 'lu-btn-primary',
24
+ label: 'Button Text',
25
+ onClick: function () { return alert('Button Clicked'); },
26
+ shape: 'lu-border-rounded-sm',
27
+ size: 'lu-btn-md',
28
+ iconLeft: 'chart-simple',
29
+ leftIconSize: 'lu-icon-small',
30
+ icon: 'chart-simple',
31
+ iconSize: 'lu-icon-small',
32
+ type: buttonTypeEnum.fill,
33
+ className: '',
34
+ };
35
+ button.argTypes = {
36
+ contentType: {
37
+ control: { type: "select" },
38
+ options: [contentTypeEnum.none, contentTypeEnum.text_with_icon, contentTypeEnum.icon_only],
39
+ description: "Determines the content of the button",
40
+ },
41
+ label: {
42
+ control: { type: "text" },
43
+ description: "Button label text",
44
+ if: { arg: "contentType", neq: contentTypeEnum.icon_only },
45
+ },
46
+ variant: {
47
+ control: { type: "select", labels: Object.fromEntries(buttonColorsList.map(function (btnColor) { return [btnColor.key, btnColor.label]; })) },
48
+ options: buttonColorsList.map(function (btnColor) { return btnColor.key; }),
49
+ },
50
+ iconLeft: {
51
+ control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
52
+ options: __spreadArray(["none"], iconList.map(function (icon) { return icon.key; }), true),
53
+ if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
54
+ },
55
+ iconRight: {
56
+ control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
57
+ options: __spreadArray(["none"], iconList.map(function (icon) { return icon.key; }), true),
58
+ if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
59
+ },
60
+ shape: {
61
+ control: { type: "select", labels: Object.fromEntries(borderRadiusList.map(function (borderRadius) { return [borderRadius.key, borderRadius.label]; })) },
62
+ options: borderRadiusList.map(function (borderRadius) { return borderRadius.key; }),
63
+ },
64
+ size: {
65
+ control: { type: "select", labels: Object.fromEntries(butttonSizeList.map(function (size) { return [size.key, size.label]; })) },
66
+ options: butttonSizeList.map(function (size) { return size.key; }),
67
+ description: "Select the size of the button",
68
+ update: function (args) {
69
+ var isIconOnly = args.contentType === contentTypeEnum.icon_only;
70
+ // Dynamically update options and labels based on contentType
71
+ return {
72
+ options: isIconOnly
73
+ ? buttonWithIconList.map(function (size) { return size.key; })
74
+ : butttonSizeList.map(function (size) { return size.key; }),
75
+ control: {
76
+ type: "select",
77
+ labels: Object.fromEntries((isIconOnly ? buttonWithIconList : butttonSizeList).map(function (size) { return [
78
+ size.key,
79
+ size.label,
80
+ ]; })),
81
+ },
82
+ };
83
+ },
84
+ },
85
+ leftIconSize: {
86
+ control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
87
+ options: buttonIconSizeList.map(function (size) { return size.key; }),
88
+ if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
89
+ },
90
+ rightIconSize: {
91
+ control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
92
+ options: buttonIconSizeList.map(function (size) { return size.key; }),
93
+ if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
94
+ },
95
+ icon: {
96
+ control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
97
+ options: iconList.map(function (icon) { return icon.key; }),
98
+ if: { arg: "contentType", eq: contentTypeEnum.icon_only },
99
+ },
100
+ iconSize: {
101
+ control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
102
+ options: buttonIconSizeList.map(function (size) { return size.key; }),
103
+ if: { arg: "contentType", eq: contentTypeEnum.icon_only },
104
+ },
105
+ type: {
106
+ control: { type: "select" },
107
+ options: [buttonTypeEnum.fill, buttonTypeEnum.outline],
108
+ description: "Determines the type of the button",
109
+ },
110
+ };
@@ -1,2 +1,3 @@
1
1
  import { ColorProps } from "@/types/interface";
2
- export declare const Color: ({ label, color }: ColorProps) => import("react/jsx-runtime").JSX.Element;
2
+ import React from "react";
3
+ export declare const Color: ({ label, color }: ColorProps) => React.JSX.Element;
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ export var Color = function (_a) {
3
+ var label = _a.label, color = _a.color;
4
+ return (<div>
5
+ <h2 className="text-lg font-bold mb-4">{label}</h2>
6
+ <div className="flex items-center gap-4">
7
+ {/* Color box */}
8
+ <div className={"w-10 h-10 rounded ".concat(color)} data-testid="color-box"/>
9
+ {/* Color label */}
10
+ <div>
11
+ <p className="font-semibold">{color === null || color === void 0 ? void 0 : color.replace('bg-', '')}</p>
12
+ <code className="text-sm">{color}</code>
13
+ </div>
14
+ </div>
15
+ </div>);
16
+ };
@@ -0,0 +1,76 @@
1
+ import { Color } from "../../../components/Color/BackgroundColor/Color";
2
+ import { colorGroups } from "../../../utils";
3
+ export default {
4
+ title: "Components/Color/BackgroundColor",
5
+ component: Color,
6
+ argTypes: {
7
+ label: { control: "text" },
8
+ },
9
+ };
10
+ var Template = function (args) { return <Color {...args}/>; };
11
+ export var Primary = Template.bind({});
12
+ Primary.args = {
13
+ label: "Primary",
14
+ color: "bg-primary-500", // Default color
15
+ };
16
+ Primary.argTypes = {
17
+ color: {
18
+ control: { type: "select" },
19
+ options: colorGroups.primary,
20
+ },
21
+ };
22
+ export var Gray = Template.bind({});
23
+ Gray.argTypes = {
24
+ color: {
25
+ control: { type: "select" },
26
+ options: colorGroups.gray,
27
+ },
28
+ };
29
+ Gray.args = {
30
+ label: "Gray",
31
+ color: "bg-gray-500",
32
+ };
33
+ export var Success = Template.bind({});
34
+ Success.argTypes = {
35
+ color: {
36
+ control: { type: "select" },
37
+ options: colorGroups.success,
38
+ },
39
+ };
40
+ Success.args = {
41
+ label: "Success",
42
+ color: "bg-success-500",
43
+ };
44
+ export var Warning = Template.bind({});
45
+ Warning.argTypes = {
46
+ color: {
47
+ control: { type: "select" },
48
+ options: colorGroups.warning,
49
+ },
50
+ };
51
+ Warning.args = {
52
+ label: "Warning",
53
+ color: "bg-warning-500",
54
+ };
55
+ export var Danger = Template.bind({});
56
+ Danger.argTypes = {
57
+ color: {
58
+ control: { type: "select" },
59
+ options: colorGroups.danger,
60
+ },
61
+ };
62
+ Danger.args = {
63
+ label: "Danger",
64
+ color: "bg-danger-500",
65
+ };
66
+ export var Info = Template.bind({});
67
+ Info.argTypes = {
68
+ color: {
69
+ control: { type: "select" },
70
+ options: colorGroups.info,
71
+ },
72
+ };
73
+ Info.args = {
74
+ label: "Info",
75
+ color: "bg-info-500",
76
+ };
@@ -1,3 +1,3 @@
1
1
  export declare const TextColor: ({ color }: {
2
2
  color?: string;
3
- }) => import("react/jsx-runtime").JSX.Element;
3
+ }) => import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export var TextColor = function (_a) {
2
+ var _b = _a.color, color = _b === void 0 ? 'lu-text-default' : _b;
3
+ return (<div className={"".concat(color)}>
4
+ .{color}
5
+ </div>);
6
+ };
@@ -0,0 +1,17 @@
1
+ import { TextColor } from "./TextColor";
2
+ import { textColorList } from "../../utils";
3
+ export default {
4
+ title: "Components/Color",
5
+ component: TextColor,
6
+ };
7
+ var Template = function (args) { return <TextColor {...args}/>; };
8
+ export var textColor = Template.bind({});
9
+ textColor.args = {
10
+ color: "lu-text-default", // Default color
11
+ };
12
+ textColor.argTypes = {
13
+ color: {
14
+ control: { type: "select", labels: Object.fromEntries(textColorList.map(function (color) { return [color.key, color.label]; })) },
15
+ options: textColorList.map(function (color) { return color.key; }),
16
+ },
17
+ };