linkedunion-design-kit 0.1.2 → 0.1.4
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/.next/types/app/page.d.ts +8 -0
- package/dist/.next/types/app/page.js +22 -0
- package/dist/app/layout.d.ts +6 -0
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.d.ts +1 -0
- package/dist/app/page.jsx +71 -0
- package/dist/components/Border/BorderRadius/BorderRadius.d.ts +2 -0
- package/dist/components/Border/BorderRadius/BorderRadius.jsx +12 -0
- package/dist/components/Border/BorderRadius/BorderRadius.stories.d.ts +4 -0
- package/dist/components/Border/BorderRadius/BorderRadius.stories.jsx +17 -0
- package/dist/components/Border/BorderRadius/BorderRadiusTable.d.ts +1 -0
- package/dist/components/Border/BorderRadius/BorderRadiusTable.jsx +61 -0
- package/dist/components/Border/BorderRadius/BorderRadiusView.d.ts +2 -0
- package/dist/components/Border/BorderRadius/BorderRadiusView.jsx +8 -0
- package/dist/components/Border/BorderWidth/BorderWidth.d.ts +2 -0
- package/dist/components/Border/BorderWidth/BorderWidth.jsx +12 -0
- package/dist/components/Border/BorderWidth/BorderWidth.stories.d.ts +4 -0
- package/dist/components/Border/BorderWidth/BorderWidth.stories.jsx +17 -0
- package/dist/components/Border/BorderWidth/BorderWidthTable.d.ts +1 -0
- package/dist/components/Border/BorderWidth/BorderWidthTable.jsx +36 -0
- package/dist/components/Border/BorderWidth/ViewBorderWidth.d.ts +2 -0
- package/dist/components/Border/BorderWidth/ViewBorderWidth.jsx +8 -0
- package/dist/components/Button/Button.d.ts +2 -0
- package/dist/components/Button/Button.jsx +16 -0
- package/dist/components/Button/Button.stories.d.ts +4 -0
- package/dist/components/Button/Button.stories.jsx +109 -0
- package/dist/components/Color/Color.d.ts +3 -0
- package/dist/components/Color/Color.jsx +16 -0
- package/dist/components/Color/Color.stories.d.ts +10 -0
- package/dist/components/Color/Color.stories.jsx +76 -0
- package/dist/components/Icons/IconView.d.ts +1 -0
- package/dist/components/Icons/IconView.jsx +23 -0
- package/dist/components/Icons/IconView.stories.d.ts +4 -0
- package/dist/components/Icons/IconView.stories.jsx +8 -0
- package/dist/components/Icons/LUIcon.d.ts +2 -0
- package/dist/components/Icons/LUIcon.jsx +20 -0
- package/dist/components/Icons/LUIcon.stories.d.ts +4 -0
- package/dist/components/Icons/LUIcon.stories.jsx +29 -0
- package/dist/components/Images/LuImage.d.ts +2 -0
- package/dist/components/Images/LuImage.jsx +6 -0
- package/dist/components/Images/LuImage.stories.d.ts +4 -0
- package/dist/components/Images/LuImage.stories.jsx +37 -0
- package/dist/components/Size/MinWidthHeight.d.ts +2 -0
- package/dist/components/Size/MinWidthHeight.jsx +8 -0
- package/dist/components/Size/MinWidthHeight.stories.d.ts +5 -0
- package/dist/components/Size/MinWidthHeight.stories.jsx +22 -0
- package/dist/components/Size/Size.d.ts +2 -0
- package/dist/components/Size/Size.jsx +6 -0
- package/dist/components/Size/Size.stories.d.ts +5 -0
- package/dist/components/Size/Size.stories.jsx +22 -0
- package/dist/components/Size/WidthHeight.d.ts +2 -0
- package/dist/components/Size/WidthHeight.jsx +8 -0
- package/dist/components/Size/WidthHeight.stories.d.ts +5 -0
- package/dist/components/Size/WidthHeight.stories.jsx +22 -0
- package/dist/components/Spacing/Margin/Margin.d.ts +1 -0
- package/dist/components/Spacing/Margin/Margin.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginBottom.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginBottom.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginLeft.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginLeft.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginRight.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginRight.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginToken.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginToken.jsx +27 -0
- package/dist/components/Spacing/Margin/MarginToken.stories.d.ts +4 -0
- package/dist/components/Spacing/Margin/MarginToken.stories.jsx +7 -0
- package/dist/components/Spacing/Margin/MarginTop.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginTop.jsx +87 -0
- package/dist/components/Spacing/Padding/Padding.d.ts +1 -0
- package/dist/components/Spacing/Padding/Padding.jsx +87 -0
- package/dist/components/Spacing/Padding/PaddingBottom.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingBottom.jsx +86 -0
- package/dist/components/Spacing/Padding/PaddingLeft.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingLeft.jsx +86 -0
- package/dist/components/Spacing/Padding/PaddingRight.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingRight.jsx +87 -0
- package/dist/components/Spacing/Padding/PaddingToken.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingToken.jsx +27 -0
- package/dist/components/Spacing/Padding/PaddingToken.stories.d.ts +4 -0
- package/dist/components/Spacing/Padding/PaddingToken.stories.jsx +7 -0
- package/dist/components/Spacing/Padding/PaddingTop.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingTop.jsx +87 -0
- package/dist/components/Typography/Typography.d.ts +2 -0
- package/dist/components/Typography/Typography.jsx +8 -0
- package/dist/components/Typography/Typography.stories.d.ts +5 -0
- package/dist/components/Typography/Typography.stories.jsx +51 -0
- package/dist/global.css +10817 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -2
- package/dist/tailwind.config.d.ts +3 -0
- package/dist/tailwind.config.js +138 -0
- package/dist/utils/enum.d.ts +13 -0
- package/dist/utils/enum.js +13 -0
- package/dist/utils/iconList.d.ts +5 -0
- package/dist/utils/iconList.js +807 -0
- package/dist/utils/index.d.ts +1358 -0
- package/dist/utils/index.js +1496 -0
- package/package.json +9 -3
- package/.eslintrc.json +0 -6
- package/.storybook/main.ts +0 -20
- package/.storybook/preview.ts +0 -15
- package/_test_/Color.test.js +0 -42
- package/_test_/Size.test.js +0 -21
- package/_test_/Typography.test.js +0 -32
- package/app/favicon.ico +0 -0
- package/app/globals.css +0 -58
- package/app/layout.tsx +0 -22
- package/app/page.tsx +0 -113
- package/components/Color/Color.stories.tsx +0 -87
- package/components/Color/Color.tsx +0 -19
- package/components/Size/Resizable.stories.tsx +0 -30
- package/components/Size/Resizable.tsx +0 -10
- package/components/Size/Size.stories.tsx +0 -30
- package/components/Size/Size.tsx +0 -8
- package/components/Typography/Typography.stories.tsx +0 -59
- package/components/Typography/Typography.tsx +0 -10
- package/index.ts +0 -5
- package/jest.config.js +0 -23
- package/jest.setup.js +0 -25
- package/next.config.js +0 -4
- package/package-lock.json +0 -12682
- package/postcss.config.js +0 -6
- package/public/next.svg +0 -1
- package/public/vercel.svg +0 -1
- package/tailwind.config.ts +0 -127
- package/tsconfig.json +0 -50
- package/types/interface.d.ts +0 -27
- package/utils/index.ts +0 -488
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// File: /Users/avialdosolutions/linkedunion-design-kit/linkedunion-design-kit/app/page.tsx
|
|
2
|
+
import * as entry from '../../../app/page.js';
|
|
3
|
+
// Check that the entry is a valid entry
|
|
4
|
+
checkFields();
|
|
5
|
+
// Check the prop type of the entry function
|
|
6
|
+
checkFields();
|
|
7
|
+
// Check the arguments and return type of the generateMetadata function
|
|
8
|
+
if ('generateMetadata' in entry) {
|
|
9
|
+
checkFields();
|
|
10
|
+
checkFields();
|
|
11
|
+
}
|
|
12
|
+
// Check the arguments and return type of the generateViewport function
|
|
13
|
+
if ('generateViewport' in entry) {
|
|
14
|
+
checkFields();
|
|
15
|
+
checkFields();
|
|
16
|
+
}
|
|
17
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
18
|
+
if ('generateStaticParams' in entry) {
|
|
19
|
+
checkFields();
|
|
20
|
+
checkFields();
|
|
21
|
+
}
|
|
22
|
+
function checkFields() { }
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
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
|
|
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
|
+
->
|
|
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
|
+
->
|
|
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 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
|
+
->
|
|
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
|
+
->
|
|
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
|
+
}
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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
|
+
};
|
|
@@ -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
|
+
};
|
|
@@ -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 contentType = _a.contentType, variant = _a.variant, label = _a.label, iconLeft = _a.iconLeft, iconRight = _a.iconRight, onClick = _a.onClick, shape = _a.shape, size = _a.size, 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,109 @@
|
|
|
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
|
+
};
|
|
34
|
+
button.argTypes = {
|
|
35
|
+
contentType: {
|
|
36
|
+
control: { type: "select" },
|
|
37
|
+
options: [contentTypeEnum.none, contentTypeEnum.text_with_icon, contentTypeEnum.icon_only],
|
|
38
|
+
description: "Determines the content of the button",
|
|
39
|
+
},
|
|
40
|
+
label: {
|
|
41
|
+
control: { type: "text" },
|
|
42
|
+
description: "Button label text",
|
|
43
|
+
if: { arg: "contentType", neq: contentTypeEnum.icon_only },
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
control: { type: "select", labels: Object.fromEntries(buttonColorsList.map(function (btnColor) { return [btnColor.key, btnColor.label]; })) },
|
|
47
|
+
options: buttonColorsList.map(function (btnColor) { return btnColor.key; }),
|
|
48
|
+
},
|
|
49
|
+
iconLeft: {
|
|
50
|
+
control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
|
|
51
|
+
options: __spreadArray(["none"], iconList.map(function (icon) { return icon.key; }), true),
|
|
52
|
+
if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
|
|
53
|
+
},
|
|
54
|
+
iconRight: {
|
|
55
|
+
control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
|
|
56
|
+
options: __spreadArray(["none"], iconList.map(function (icon) { return icon.key; }), true),
|
|
57
|
+
if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
|
|
58
|
+
},
|
|
59
|
+
shape: {
|
|
60
|
+
control: { type: "select", labels: Object.fromEntries(borderRadiusList.map(function (borderRadius) { return [borderRadius.key, borderRadius.label]; })) },
|
|
61
|
+
options: borderRadiusList.map(function (borderRadius) { return borderRadius.key; }),
|
|
62
|
+
},
|
|
63
|
+
size: {
|
|
64
|
+
control: { type: "select", labels: Object.fromEntries(butttonSizeList.map(function (size) { return [size.key, size.label]; })) },
|
|
65
|
+
options: butttonSizeList.map(function (size) { return size.key; }),
|
|
66
|
+
description: "Select the size of the button",
|
|
67
|
+
update: function (args) {
|
|
68
|
+
var isIconOnly = args.contentType === contentTypeEnum.icon_only;
|
|
69
|
+
// Dynamically update options and labels based on contentType
|
|
70
|
+
return {
|
|
71
|
+
options: isIconOnly
|
|
72
|
+
? buttonWithIconList.map(function (size) { return size.key; })
|
|
73
|
+
: butttonSizeList.map(function (size) { return size.key; }),
|
|
74
|
+
control: {
|
|
75
|
+
type: "select",
|
|
76
|
+
labels: Object.fromEntries((isIconOnly ? buttonWithIconList : butttonSizeList).map(function (size) { return [
|
|
77
|
+
size.key,
|
|
78
|
+
size.label,
|
|
79
|
+
]; })),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
leftIconSize: {
|
|
85
|
+
control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
|
|
86
|
+
options: buttonIconSizeList.map(function (size) { return size.key; }),
|
|
87
|
+
if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
|
|
88
|
+
},
|
|
89
|
+
rightIconSize: {
|
|
90
|
+
control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
|
|
91
|
+
options: buttonIconSizeList.map(function (size) { return size.key; }),
|
|
92
|
+
if: { arg: "contentType", eq: contentTypeEnum.text_with_icon },
|
|
93
|
+
},
|
|
94
|
+
icon: {
|
|
95
|
+
control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
|
|
96
|
+
options: iconList.map(function (icon) { return icon.key; }),
|
|
97
|
+
if: { arg: "contentType", eq: contentTypeEnum.icon_only },
|
|
98
|
+
},
|
|
99
|
+
iconSize: {
|
|
100
|
+
control: { type: "select", labels: Object.fromEntries(buttonIconSizeList.map(function (size) { return [size.key, size.label]; })) },
|
|
101
|
+
options: buttonIconSizeList.map(function (size) { return size.key; }),
|
|
102
|
+
if: { arg: "contentType", eq: contentTypeEnum.icon_only },
|
|
103
|
+
},
|
|
104
|
+
type: {
|
|
105
|
+
control: { type: "select" },
|
|
106
|
+
options: [buttonTypeEnum.fill, buttonTypeEnum.outline],
|
|
107
|
+
description: "Determines the type of the button",
|
|
108
|
+
},
|
|
109
|
+
};
|
|
@@ -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,10 @@
|
|
|
1
|
+
import { Meta } from "@storybook/react";
|
|
2
|
+
import { ColorProps } from "@/types/interface";
|
|
3
|
+
declare const _default: Meta;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Primary: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
6
|
+
export declare const Gray: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
7
|
+
export declare const Success: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
8
|
+
export declare const Warning: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
9
|
+
export declare const Danger: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
10
|
+
export declare const Info: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorProps>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Color } from "../../components/Color/Color";
|
|
2
|
+
import { colorGroups } from "../../utils";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Color",
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IconView: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { iconList } from "../../utils/iconList";
|
|
2
|
+
export var IconView = function () {
|
|
3
|
+
return (<>
|
|
4
|
+
<div className="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-6 gap-6" data-testid="icons-list">
|
|
5
|
+
{iconList.map(function (icon, index) {
|
|
6
|
+
return (<div key={index} className="flex flex-col items-center justify-center bg-gray-100 lu-border-rounded-lg lu-pd-200 shadow-md hover:bg-gray-200" data-testid="single-icon">
|
|
7
|
+
<svg width="25" height="25" viewBox="0 0 32 32" fill="none" className="mb-2" role="img">
|
|
8
|
+
<g clipPath="url(#clip0_9168_14965)">
|
|
9
|
+
<path d={icon === null || icon === void 0 ? void 0 : icon.path} fill="#070808"/>
|
|
10
|
+
</g>
|
|
11
|
+
<defs>
|
|
12
|
+
<clipPath id="clip0_9168_14965">
|
|
13
|
+
<rect width="32" height="32" fill="black"/>
|
|
14
|
+
</clipPath>
|
|
15
|
+
</defs>
|
|
16
|
+
</svg>
|
|
17
|
+
<p className="lu-font-size-x-small lu-font-weight-regular text-gray-700 text-center">{icon === null || icon === void 0 ? void 0 : icon.label}</p>
|
|
18
|
+
</div>);
|
|
19
|
+
})}
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
</>);
|
|
23
|
+
};
|