linkedunion-design-kit 0.1.0

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 (45) hide show
  1. package/.eslintrc.json +6 -0
  2. package/.storybook/main.ts +20 -0
  3. package/.storybook/preview.ts +15 -0
  4. package/README.md +36 -0
  5. package/_test_/Color.test.js +42 -0
  6. package/app/favicon.ico +0 -0
  7. package/app/globals.css +27 -0
  8. package/app/layout.tsx +22 -0
  9. package/app/page.tsx +113 -0
  10. package/components/Color/Color.stories.tsx +87 -0
  11. package/components/Color/Color.tsx +19 -0
  12. package/components/Typography/Typography.stories.tsx +59 -0
  13. package/components/Typography/Typography.tsx +8 -0
  14. package/dist/app/layout.d.ts +6 -0
  15. package/dist/app/layout.jsx +13 -0
  16. package/dist/app/page.d.ts +1 -0
  17. package/dist/app/page.jsx +71 -0
  18. package/dist/components/Color/Color.d.ts +3 -0
  19. package/dist/components/Color/Color.jsx +16 -0
  20. package/dist/components/Color/Color.stories.d.ts +10 -0
  21. package/dist/components/Color/Color.stories.jsx +76 -0
  22. package/dist/components/Typography/Typography.d.ts +3 -0
  23. package/dist/components/Typography/Typography.jsx +7 -0
  24. package/dist/components/Typography/Typography.stories.d.ts +5 -0
  25. package/dist/components/Typography/Typography.stories.jsx +51 -0
  26. package/dist/global.css +8806 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.js +3 -0
  29. package/dist/tailwind.config.d.ts +3 -0
  30. package/dist/tailwind.config.js +75 -0
  31. package/dist/utils/index.d.ts +305 -0
  32. package/dist/utils/index.js +413 -0
  33. package/index.ts +3 -0
  34. package/jest.config.js +23 -0
  35. package/jest.setup.js +25 -0
  36. package/next.config.js +4 -0
  37. package/package-lock.json +12682 -0
  38. package/package.json +60 -0
  39. package/postcss.config.js +6 -0
  40. package/public/next.svg +1 -0
  41. package/public/vercel.svg +1 -0
  42. package/tailwind.config.ts +89 -0
  43. package/tsconfig.json +50 -0
  44. package/types/interface.d.ts +18 -0
  45. package/utils/index.ts +439 -0
@@ -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-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
+ };
@@ -0,0 +1,3 @@
1
+ import { TypographyProps } from "@/types/interface";
2
+ import React from "react";
3
+ export declare const Typography: React.FC<TypographyProps>;
@@ -0,0 +1,7 @@
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
+ };
@@ -0,0 +1,5 @@
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>;
@@ -0,0 +1,51 @@
1
+ import { Typography } from "./Typography";
2
+ import { fontSizes, fontWeights, lineHeights, text, textAlignment, textDecorations, textTransform, textWraps } from "../../utils";
3
+ export default {
4
+ title: "Components/Typography",
5
+ component: Typography,
6
+ argTypes: {
7
+ label: { control: "text" },
8
+ },
9
+ };
10
+ var Template = function (args) { return <Typography {...args}/>; };
11
+ export var BasicTypography = Template.bind({});
12
+ BasicTypography.args = {
13
+ label: "".concat(text),
14
+ fontSize: 'lu-base-font-size',
15
+ fontWeight: 'lu-font-weight-thin',
16
+ lineHeight: 'lu-line-height-sm',
17
+ textAlign: 'lu-text-justify',
18
+ textTransform: 'lu-text-lowercase',
19
+ textDecoration: 'lu-text-decoration-none',
20
+ textWrap: 'lu-text-wrap',
21
+ };
22
+ BasicTypography.argTypes = {
23
+ fontSize: {
24
+ control: { type: "select", labels: Object.fromEntries(fontSizes.map(function (size) { return [size.key, size.label]; })) },
25
+ options: fontSizes.map(function (size) { return size.key; }),
26
+ },
27
+ fontWeight: {
28
+ control: { type: "select", labels: Object.fromEntries(fontWeights.map(function (size) { return [size.key, size.label]; })) },
29
+ options: fontWeights.map(function (weight) { return weight.key; }),
30
+ },
31
+ lineHeight: {
32
+ control: { type: "select", labels: Object.fromEntries(lineHeights.map(function (size) { return [size.key, size.label]; })) },
33
+ options: lineHeights.map(function (lineHeight) { return lineHeight.key; }),
34
+ },
35
+ textAlign: {
36
+ control: { type: "select", labels: Object.fromEntries(textAlignment.map(function (size) { return [size.key, size.label]; })) },
37
+ options: textAlignment.map(function (alignment) { return alignment.key; }),
38
+ },
39
+ textTransform: {
40
+ control: { type: "select", labels: Object.fromEntries(textTransform.map(function (size) { return [size.key, size.label]; })) },
41
+ options: textTransform.map(function (transform) { return transform.key; }),
42
+ },
43
+ textDecoration: {
44
+ control: { type: "select", labels: Object.fromEntries(textDecorations.map(function (size) { return [size.key, size.label]; })) },
45
+ options: textDecorations.map(function (decoration) { return decoration.key; }),
46
+ },
47
+ textWrap: {
48
+ control: { type: "select", labels: Object.fromEntries(textWraps.map(function (size) { return [size.key, size.label]; })) },
49
+ options: textWraps.map(function (wrap) { return wrap.key; }),
50
+ },
51
+ };