linkedunion-design-kit 0.1.0 → 0.1.2

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 (36) hide show
  1. package/_test_/Color.test.js +1 -1
  2. package/_test_/Size.test.js +21 -0
  3. package/_test_/Typography.test.js +32 -0
  4. package/app/globals.css +31 -0
  5. package/components/Color/Color.stories.tsx +1 -1
  6. package/components/Color/Color.tsx +3 -3
  7. package/components/Size/Resizable.stories.tsx +30 -0
  8. package/components/Size/Resizable.tsx +10 -0
  9. package/components/Size/Size.stories.tsx +30 -0
  10. package/components/Size/Size.tsx +8 -0
  11. package/components/Typography/Typography.tsx +4 -2
  12. package/dist/index.js +2 -0
  13. package/index.ts +2 -0
  14. package/package.json +1 -1
  15. package/tailwind.config.ts +39 -1
  16. package/tsconfig.json +1 -1
  17. package/types/interface.d.ts +10 -1
  18. package/utils/index.ts +49 -0
  19. package/dist/app/layout.d.ts +0 -6
  20. package/dist/app/layout.jsx +0 -13
  21. package/dist/app/page.d.ts +0 -1
  22. package/dist/app/page.jsx +0 -71
  23. package/dist/components/Color/Color.d.ts +0 -3
  24. package/dist/components/Color/Color.jsx +0 -16
  25. package/dist/components/Color/Color.stories.d.ts +0 -10
  26. package/dist/components/Color/Color.stories.jsx +0 -76
  27. package/dist/components/Typography/Typography.d.ts +0 -3
  28. package/dist/components/Typography/Typography.jsx +0 -7
  29. package/dist/components/Typography/Typography.stories.d.ts +0 -5
  30. package/dist/components/Typography/Typography.stories.jsx +0 -51
  31. package/dist/global.css +0 -8806
  32. package/dist/index.d.ts +0 -3
  33. package/dist/tailwind.config.d.ts +0 -3
  34. package/dist/tailwind.config.js +0 -75
  35. package/dist/utils/index.d.ts +0 -305
  36. package/dist/utils/index.js +0 -413
@@ -25,7 +25,7 @@ describe("Color Component Stories", () => {
25
25
  it("renders the Warning color story correctly", () => {
26
26
  render(<Warning {...Warning.args}/>);
27
27
  const colorBox = screen.getByTestId("color-box");
28
- expect(colorBox).toHaveClass('bg-warning-500');
28
+ expect(colorBox).toHaveClass("bg-warning-500");
29
29
  });
30
30
 
31
31
  it("renders the Danger color story correctly", () => {
@@ -0,0 +1,21 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import "@testing-library/jest-dom";
3
+ import { Size } from "../components/Size/Size";
4
+
5
+ describe("Size Component", () => {
6
+ it("renders the Size component with the correct classes for all props", () => {
7
+ const props = {
8
+ size: 'lu-size-100',
9
+ color: 'bg-primary-500',
10
+ };
11
+
12
+ render(<Size {...props} />);
13
+
14
+ // Select the element
15
+ const sizeElement = screen.getByTestId("size-box");
16
+
17
+ // Assert all classes
18
+ expect(sizeElement).toHaveClass(props.size);
19
+ expect(sizeElement).toHaveClass(props.color);
20
+ });
21
+ });
@@ -0,0 +1,32 @@
1
+ import { render, screen } from "@testing-library/react";
2
+ import "@testing-library/jest-dom";
3
+ import { Typography } from "../components/Typography/Typography";
4
+
5
+ describe("Typography Component", () => {
6
+ it("renders the Typography component with the correct classes for all props", () => {
7
+ const props = {
8
+ label: "Sample Text",
9
+ fontSize: "lu-base-font-size",
10
+ fontWeight: "lu-font-weight-thin",
11
+ lineHeight: "lu-line-height-sm",
12
+ textAlign: "lu-text-justify",
13
+ textTransform: "lu-text-lowercase",
14
+ textDecoration: "lu-text-decoration-none",
15
+ textWrap: "lu-text-wrap",
16
+ };
17
+
18
+ render(<Typography {...props} />);
19
+
20
+ // Select the element
21
+ const typographyElement = screen.getByTestId("basic-typography").firstChild;
22
+
23
+ // Assert all classes
24
+ expect(typographyElement).toHaveClass(props.fontSize);
25
+ expect(typographyElement).toHaveClass(props.fontWeight);
26
+ expect(typographyElement).toHaveClass(props.lineHeight);
27
+ expect(typographyElement).toHaveClass(props.textAlign);
28
+ expect(typographyElement).toHaveClass(props.textTransform);
29
+ expect(typographyElement).toHaveClass(props.textDecoration);
30
+ expect(typographyElement).toHaveClass(props.textWrap);
31
+ });
32
+ });
package/app/globals.css CHANGED
@@ -13,6 +13,22 @@
13
13
  --foreground-rgb: 255, 255, 255;
14
14
  --background-start-rgb: 0, 0, 0;
15
15
  --background-end-rgb: 0, 0, 0;
16
+ --lu-spacing-0: 0px;
17
+ --lu-spacing-050: 4px;
18
+ --lu-spacing-100: 8px;
19
+ --lu-spacing-150: 12px;
20
+ --lu-spacing-200: 16px;
21
+ --lu-spacing-250: 20px;
22
+ --lu-spacing-300: 24px;
23
+ --lu-spacing-400: 32px;
24
+ --lu-spacing-500: 40px;
25
+ --lu-spacing-600: 48px;
26
+ --lu-spacing-800: 64px;
27
+ --lu-spacing-1000: 80px;
28
+ --lu-spacing-1500: 120px;
29
+ --lu-spacing-2000: 160px;
30
+ --lu-spacing-2500: 200px;
31
+ --lu-spacing-3000: 240px;
16
32
  }
17
33
  }
18
34
 
@@ -25,3 +41,18 @@ body {
25
41
  )
26
42
  rgb(var(--background-start-rgb));
27
43
  }
44
+ .pl-1x {
45
+ padding-left: var(--lu-spacing-100);
46
+ }
47
+
48
+ .pr-1x {
49
+ padding-right: var(--lu-spacing-100);
50
+ }
51
+
52
+ .mt-1x {
53
+ margin-top: var(--lu-spacing-100);
54
+ }
55
+
56
+ .mb-1x {
57
+ margin-bottom: var(--lu-spacing-100);
58
+ }
@@ -18,7 +18,7 @@ const Template: StoryFn<ColorProps> = (args) => <Color {...args} />;
18
18
  export const Primary = Template.bind({});
19
19
  Primary.args = {
20
20
  label: "Primary",
21
- color: "bg-primary-600", // Default color
21
+ color: "bg-primary-500", // Default color
22
22
  };
23
23
  Primary.argTypes = {
24
24
  color: {
@@ -1,12 +1,12 @@
1
1
  import { ColorProps } from "@/types/interface";
2
2
  import React from "react";
3
- export const Color: React.FC<ColorProps> = ({ label, color }) => {
3
+ export const Color = ({ label, color }: ColorProps) => {
4
4
  return (
5
- <div data-testid="color-box">
5
+ <div>
6
6
  <h2 className="text-lg font-bold mb-4">{label}</h2>
7
7
  <div className="flex items-center gap-4">
8
8
  {/* Color box */}
9
- <div className={`w-10 h-10 rounded ${color}`}/>
9
+ <div className={`w-10 h-10 rounded ${color}`} data-testid="color-box"/>
10
10
  {/* Color label */}
11
11
  <div>
12
12
  <p className="font-semibold">{color?.replace('bg-', '')}</p>
@@ -0,0 +1,30 @@
1
+
2
+
3
+ import { Meta, StoryFn } from "@storybook/react";
4
+ import { ResizableBar } from "@/components/Size/Resizable";
5
+ import { ResizableBarProps } from "@/types/interface";
6
+ import { heights, widths } from "@/utils";
7
+
8
+ export default {
9
+ title: "Components/Size",
10
+ component: ResizableBar,
11
+ } as Meta;
12
+
13
+ const Template: StoryFn<ResizableBarProps> = (args) => <ResizableBar {...args} />;
14
+
15
+ export const Bar = Template.bind({});
16
+ Bar.args = {
17
+ width: 'lu-width-25',
18
+ height: 'lu-height-25',
19
+ };
20
+ Bar.argTypes = {
21
+ width: {
22
+ control: { type: "select", labels: Object.fromEntries(widths.map(size => [size.key, size.label]))},
23
+ options: widths.map((size) => size.key),
24
+ },
25
+ height: {
26
+ control: { type: "select", labels: Object.fromEntries(heights.map(size => [size.key, size.label]))},
27
+ options: heights.map((size) => size.key),
28
+ }
29
+ };
30
+
@@ -0,0 +1,10 @@
1
+ import { ResizableBarProps } from "@/types/interface";
2
+
3
+ export const ResizableBar = ({ width, height }: ResizableBarProps) => {
4
+ return (<>
5
+ <div className="bg-gray-200 lu-width-50 lu-height-25 relative rounded p-lu-space-200">
6
+ <div className={`absolute right-0 top-0 bg-blue-500 ${width} ${height} rounded`}></div>
7
+ </div>
8
+ </>);
9
+ };
10
+
@@ -0,0 +1,30 @@
1
+
2
+
3
+ import { Meta, StoryFn } from "@storybook/react";
4
+ import { Size } from "@/components/Size/Size";
5
+ import { SizeProps } from "@/types/interface";
6
+ import { colorGroups, sizes } from "@/utils";
7
+
8
+ export default {
9
+ title: "Components/Size",
10
+ component: Size,
11
+ } as Meta;
12
+
13
+ const Template: StoryFn<SizeProps> = (args) => <Size {...args} />;
14
+
15
+ export const SizeStory = Template.bind({});
16
+ SizeStory.args = {
17
+ size: 'lu-size-400',
18
+ color: 'bg-primary-500',
19
+ };
20
+ SizeStory.argTypes = {
21
+ size: {
22
+ control: { type: "select", labels: Object.fromEntries(sizes.map(size => [size.key, size.label]))},
23
+ options: sizes.map((size) => size.key),
24
+ },
25
+ color: {
26
+ control: { type: "select" },
27
+ options: colorGroups.primary,
28
+ },
29
+ };
30
+
@@ -0,0 +1,8 @@
1
+ import { SizeProps } from "@/types/interface";
2
+
3
+ export const Size = ({ size, color }: SizeProps) => {
4
+ return (<>
5
+ <div className={`${size} rounded ${color}`} data-testid="size-box"/>
6
+ </>);
7
+ };
8
+
@@ -1,8 +1,10 @@
1
1
  import { TypographyProps } from "@/types/interface";
2
- import React from "react";
3
- export const Typography: React.FC<TypographyProps> = ({label, className='', fontSize, fontWeight, lineHeight, textAlign, textTransform, textDecoration, textWrap }) => {
2
+
3
+ export const Typography = ({label, className='', fontSize, fontWeight, lineHeight, textAlign, textTransform, textDecoration, textWrap }: TypographyProps) => {
4
4
  return (<>
5
+ <div data-testid="basic-typography">
5
6
  <p className={`${className} ${fontSize} ${fontWeight} ${lineHeight} ${textAlign} ${textTransform} ${textDecoration} ${textWrap}`}>{label}</p>
7
+ </div>
6
8
  </>);
7
9
  };
8
10
 
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
1
  export { Color } from './components/Color/Color';
2
2
  export { Typography } from './components/Typography/Typography';
3
+ export { Size } from './components/Size/Size';
4
+ export { ResizableBar } from './components/Size/Resizable';
3
5
  import './global.css';
package/index.ts CHANGED
@@ -1,3 +1,5 @@
1
1
  export {Color} from './components/Color/Color';
2
2
  export {Typography} from './components/Typography/Typography';
3
+ export {Size} from './components/Size/Size';
4
+ export {ResizableBar} from './components/Size/Resizable';
3
5
  import './global.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linkedunion-design-kit",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,9 @@
1
1
  import type { Config } from 'tailwindcss'
2
- import { colorGroups, customAspectRatio, customBorderRadius, customBorderWidth, customBoxShadow, customColors, customFontSize, customFontWeight, customHeight, customLineHeight, customLogoSize, customMinHeight, customMinWidth, customOpacity, customSize, customSpacing, customTextAlignment, customTextDecoration, customTextTransform, customTextWrap, customWidth, fontSizes, fontWeights, lineHeights, textAlignment, textDecorations, textTransform, textWraps } from './utils'
2
+ import { colorGroups, customAspectRatio, customBorderRadius, customBorderWidth, customBoxShadow, customColors, customFontSize, customFontWeight, customHeight, customLineHeight, customLogoSize, customMinHeight, customMinWidth, customOpacity, customSize, customSpacing, customTextAlignment, customTextDecoration, customTextTransform, customTextWrap, customWidth, fontSizes, fontWeights, heights, lineHeights, sizes, spacings, textAlignment, textDecorations, textTransform, textWraps, widths } from './utils'
3
3
  import generateUtilities from './utils';
4
4
 
5
+
6
+
5
7
  const plugin = require('tailwindcss/plugin');
6
8
 
7
9
  const config: Config = {
@@ -24,6 +26,10 @@ const config: Config = {
24
26
  ...textTransform.map(textTrans => ({ pattern: new RegExp(textTrans.key) })),
25
27
  ...textDecorations.map(textDec => ({ pattern: new RegExp(textDec.key) })),
26
28
  ...textWraps.map(textWrap => ({ pattern: new RegExp(textWrap.key) })),
29
+ ...sizes.map(size => ({ pattern: new RegExp(size.key) })),
30
+ ...widths.map(width => ({ pattern: new RegExp(width.key) })),
31
+ ...heights.map(height => ({ pattern: new RegExp(height.key) })),
32
+ ...spacings.map(spacing => ({ pattern: new RegExp(spacing.key) })),
27
33
  ],
28
34
  theme: {
29
35
  extend: {
@@ -83,6 +89,38 @@ const config: Config = {
83
89
  //Text Wrap plugin
84
90
  const textWrapUtilities = generateUtilities('textWrap', theme);
85
91
  addUtilities(textWrapUtilities, ['responsive'])
92
+
93
+ //Size plugin
94
+ const sizeUtilities = Object.entries(customSize).reduce((acc: Record<string, { width: string, height: string }>, [key, value]) => {
95
+ acc[`.${key}`] = {
96
+ width: value,
97
+ height: value,
98
+ };
99
+ return acc;
100
+ }, {});
101
+ addUtilities(sizeUtilities, ['responsive']);
102
+
103
+ //width plugin
104
+ const widthUtilities = Object.entries(customWidth).reduce((acc: Record<string, { width: string }>, [key, value]) => {
105
+ acc[`.${key}`] = {
106
+ width: value,
107
+ };
108
+ return acc;
109
+ }, {});
110
+ addUtilities(widthUtilities, ['responsive'])
111
+
112
+ //height plugin
113
+ const heightUtilities = Object.entries(customHeight).reduce((acc: Record<string, { height: string }>, [key, value]) => {
114
+ acc[`.${key}`] = {
115
+ height: value,
116
+ };
117
+ return acc;
118
+ }, {});
119
+ addUtilities(heightUtilities, ['responsive'])
120
+
121
+ //Spacing Plugin
122
+ const spacingUtilities = generateUtilities('spacing', theme);
123
+ addUtilities(spacingUtilities, ['responsive'])
86
124
  }),
87
125
  ],
88
126
  }
package/tsconfig.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "index.ts",
43
43
  "jest.setup.js",
44
44
  "jest.config.js"
45
- ],
45
+ , "_test_/Typography.test.js" ],
46
46
  "exclude": [
47
47
  "node_modules",
48
48
  "./dist"
@@ -15,4 +15,13 @@ interface TypographyProps {
15
15
  textWrap?: string
16
16
  className?: string
17
17
  }
18
-
18
+
19
+ interface SizeProps {
20
+ size?: string
21
+ color?: string
22
+ }
23
+
24
+ interface ResizableBarProps {
25
+ width?: string
26
+ height?: string
27
+ }
package/utils/index.ts CHANGED
@@ -140,6 +140,55 @@ export const textWraps = [
140
140
  {key: 'lu-text-nowrap', label: 'lu-text-nowrap: nowrap'},
141
141
  ]
142
142
 
143
+ export const sizes = [
144
+ {key: 'lu-size-050', label: 'lu-size-050: 4px'},
145
+ {key: 'lu-size-100', label: 'lu-size-100: 8px'},
146
+ {key: 'lu-size-200', label: 'lu-size-200: 16px'},
147
+ {key: 'lu-size-300', label: 'lu-size-300: 24px'},
148
+ {key: 'lu-size-400', label: 'lu-size-400: 32px'},
149
+ {key: 'lu-size-500', label: 'lu-size-500: 40px'},
150
+ {key: 'lu-size-600', label: 'lu-size-600: 48px'},
151
+ {key: 'lu-size-800', label: 'lu-size-800: 64px'},
152
+ {key: 'lu-size-1000', label: 'lu-size-1000: 80px'},
153
+ {key: 'lu-size-1500', label: 'lu-size-1500: 120px'},
154
+ {key: 'lu-size-2000', label: 'lu-size-2000: 160px'},
155
+ {key: 'lu-size-2500', label: 'lu-size-2500: 200px'}
156
+ ]
157
+
158
+ export const widths = [
159
+ {key: 'lu-width-10', label: 'lu-width-10: 10%'},
160
+ {key: 'lu-width-25', label: 'lu-width-25: 25%'},
161
+ {key: 'lu-width-50', label: 'lu-width-50: 50%'},
162
+ {key: 'lu-width-75', label: 'lu-width-75: 75%'},
163
+ {key: 'lu-width-100', label: 'lu-width-100: 100%'}
164
+ ]
165
+
166
+ export const heights = [
167
+ {key: 'lu-height-10', label: 'lu-height-10: 10%'},
168
+ {key: 'lu-height-25', label: 'lu-height-25: 25%'},
169
+ {key: 'lu-height-50', label: 'lu-height-50: 50%'},
170
+ {key: 'lu-height-75', label: 'lu-height-75: 75%'},
171
+ {key: 'lu-height-100', label: 'lu-height-100: 100%'}
172
+ ]
173
+
174
+ export const spacings = [
175
+ {key: 'lu-space-0', label: 'lu-space-0: 0px'},
176
+ {key: 'lu-space-050', label: 'lu-space-050: 4px'},
177
+ {key: 'lu-space-100', label: 'lu-space-100: 8px'},
178
+ {key: 'lu-space-150', label: 'lu-space-150: 12px'},
179
+ {key: 'lu-space-200', label: 'lu-space-200: 16px'},
180
+ {key: 'lu-space-250', label: 'lu-space-250: 20px'},
181
+ {key: 'lu-space-300', label: 'lu-space-300: 24px'},
182
+ {key: 'lu-space-400', label: 'lu-space-400: 32px'},
183
+ {key: 'lu-space-500', label: 'lu-space-500: 40px'},
184
+ {key: 'lu-space-600', label: 'lu-space-600: 48px'},
185
+ {key: 'lu-space-800', label: 'lu-space-800: 64px'},
186
+ {key: 'lu-space-1000', label: 'lu-space-1000: 80px'},
187
+ {key: 'lu-space-1500', label: 'lu-space-1500: 120px'},
188
+ {key: 'lu-space-2000', label: 'lu-space-2000: 160px'},
189
+ {key: 'lu-space-2500', label: 'lu-space-2500: 200px'},
190
+ {key: 'lu-space-3000', label: 'lu-space-3000: 240px'}
191
+ ]
143
192
 
144
193
  //Plugin for generating utilities (Used in tailwind.config.js)
145
194
  export default function generateUtilities(property: string, theme: (property: string) => Record<string, string>) {
@@ -1,6 +0,0 @@
1
- import type { Metadata } from 'next';
2
- import './globals.css';
3
- export declare const metadata: Metadata;
4
- export default function RootLayout({ children, }: {
5
- children: React.ReactNode;
6
- }): import("react").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { Inter } from 'next/font/google';
2
- import './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 +0,0 @@
1
- export default function Home(): import("react").JSX.Element;
package/dist/app/page.jsx DELETED
@@ -1,71 +0,0 @@
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,3 +0,0 @@
1
- import { ColorProps } from "@/types/interface";
2
- import React from "react";
3
- export declare const Color: React.FC<ColorProps>;
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- export var Color = function (_a) {
3
- var label = _a.label, color = _a.color;
4
- return (<div data-testid="color-box">
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)}/>
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
- };
@@ -1,10 +0,0 @@
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>;
@@ -1,76 +0,0 @@
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-600", // 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 +0,0 @@
1
- import { TypographyProps } from "@/types/interface";
2
- import React from "react";
3
- export declare const Typography: React.FC<TypographyProps>;
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- export var Typography = function (_a) {
3
- var label = _a.label, _b = _a.className, className = _b === void 0 ? '' : _b, fontSize = _a.fontSize, fontWeight = _a.fontWeight, lineHeight = _a.lineHeight, textAlign = _a.textAlign, textTransform = _a.textTransform, textDecoration = _a.textDecoration, textWrap = _a.textWrap;
4
- return (<>
5
- <p className={"".concat(className, " ").concat(fontSize, " ").concat(fontWeight, " ").concat(lineHeight, " ").concat(textAlign, " ").concat(textTransform, " ").concat(textDecoration, " ").concat(textWrap)}>{label}</p>
6
- </>);
7
- };
@@ -1,5 +0,0 @@
1
- import { Meta } from "@storybook/react";
2
- import { TypographyProps } from "@/types/interface";
3
- declare const _default: Meta;
4
- export default _default;
5
- export declare const BasicTypography: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, TypographyProps>;