linkedunion-design-kit 1.5.0 → 1.5.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.
- package/dist/.next/types/app/page.js +17 -7
- package/dist/components/Avatar/Avatar.js +1 -1
- package/dist/components/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/components/Avatar/Avatar.stories.js +4 -4
- package/dist/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/components/Avatar/Avatar.test.js +54 -0
- package/dist/components/Border/BorderRadius/BorderRadius.stories.d.ts +1 -1
- package/dist/components/Border/BorderRadius/BorderRadius.stories.js +4 -4
- package/dist/components/Border/BorderRadius/BorderRadius.test.d.ts +1 -0
- package/dist/components/Border/BorderRadius/BorderRadius.test.js +25 -0
- package/dist/components/Border/BorderWidth/BorderWidth.stories.d.ts +1 -1
- package/dist/components/Border/BorderWidth/BorderWidth.stories.js +4 -4
- package/dist/components/Border/BorderWidth/BorderWidth.test.d.ts +1 -0
- package/dist/components/Border/BorderWidth/BorderWidth.test.js +25 -0
- package/dist/components/Button/Button.js +5 -5
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Button/Button.stories.js +8 -8
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/Button.test.js +54 -0
- package/dist/components/Button/index.js +0 -1
- package/dist/components/Color/BackgroundColor/BackgroundColor.js +7 -3
- package/dist/components/Color/BackgroundColor/BackgroundColor.stories.d.ts +6 -6
- package/dist/components/Color/BackgroundColor/BackgroundColor.stories.js +33 -30
- package/dist/components/Color/BackgroundColor/BackgroundColor.test.d.ts +1 -0
- package/dist/components/Color/BackgroundColor/BackgroundColor.test.js +17 -0
- package/dist/components/Color/Color.test.d.ts +1 -0
- package/dist/components/Color/Color.test.js +38 -0
- package/dist/components/Color/TextColor/TextColor.js +7 -3
- package/dist/components/Color/TextColor/TextColor.stories.d.ts +1 -1
- package/dist/components/Color/TextColor/TextColor.stories.js +14 -11
- package/dist/components/Color/TextColor/TextColor.test.d.ts +1 -0
- package/dist/components/Color/TextColor/TextColor.test.js +43 -0
- package/dist/components/Icons/IconList.test.d.ts +1 -0
- package/dist/components/Icons/IconList.test.js +60 -0
- package/dist/components/Icons/IconView.js +1 -1
- package/dist/components/Icons/IconView.stories.d.ts +1 -1
- package/dist/components/Icons/IconView.stories.js +2 -2
- package/dist/components/Icons/LUIcon.js +1 -1
- package/dist/components/Icons/LUIcon.stories.d.ts +1 -1
- package/dist/components/Icons/LUIcon.stories.js +4 -4
- package/dist/components/Icons/SingleIcon.test.d.ts +1 -0
- package/dist/components/Icons/SingleIcon.test.js +53 -0
- package/dist/components/Images/LuImage.js +1 -1
- package/dist/components/Images/LuImage.stories.d.ts +1 -1
- package/dist/components/Images/LuImage.stories.js +11 -10
- package/dist/components/Images/LuImage.test.d.ts +1 -0
- package/dist/components/Images/LuImage.test.js +68 -0
- package/dist/components/MediaCard/Card.js +3 -3
- package/dist/components/MediaCard/Card.stories.d.ts +1 -1
- package/dist/components/MediaCard/Card.stories.js +4 -4
- package/dist/components/MediaCard/Card.test.d.ts +1 -0
- package/dist/components/MediaCard/Card.test.js +33 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfile.test.d.ts +1 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfile.test.js +57 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.js +1 -1
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.test.d.ts +1 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.test.js +122 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.js +1 -1
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.test.d.ts +1 -0
- package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.test.js +122 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategory.js +1 -1
- package/dist/components/MediaCard/PostByCategory/PostByCategory.test.d.ts +1 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategory.test.js +57 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +1 -1
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.test.d.ts +1 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.test.js +122 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +1 -1
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.test.d.ts +1 -0
- package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.test.js +122 -0
- package/dist/components/MediaCard/index.js +0 -1
- package/dist/components/Size/MinWidthHeight.d.ts +1 -1
- package/dist/components/Size/MinWidthHeight.stories.d.ts +1 -1
- package/dist/components/Size/MinWidthHeight.stories.js +4 -4
- package/dist/components/Size/MinWidthHeight.test.d.ts +1 -0
- package/dist/components/Size/MinWidthHeight.test.js +34 -0
- package/dist/components/Size/Size.d.ts +3 -2
- package/dist/components/Size/Size.js +5 -3
- package/dist/components/Size/Size.stories.d.ts +3 -2
- package/dist/components/Size/Size.stories.js +3 -6
- package/dist/components/Size/Size.test.d.ts +1 -0
- package/dist/components/Size/Size.test.js +73 -0
- package/dist/components/Size/WidthAndHeight.test.d.ts +1 -0
- package/dist/components/Size/WidthAndHeight.test.js +34 -0
- package/dist/components/Size/WidthHeight.stories.d.ts +1 -1
- package/dist/components/Size/WidthHeight.stories.js +4 -4
- package/dist/components/Spacing/Margin/MarginToken.stories.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginToken.stories.js +2 -2
- package/dist/components/Spacing/Margin/MarginToken.test.d.ts +1 -0
- package/dist/components/Spacing/Margin/MarginToken.test.js +22 -0
- package/dist/components/Spacing/Padding/PaddingToken.stories.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingToken.stories.js +2 -2
- package/dist/components/Spacing/Padding/PaddingToken.test.d.ts +1 -0
- package/dist/components/Spacing/Padding/PaddingToken.test.js +22 -0
- package/dist/components/Title/Title.d.ts +1 -1
- package/dist/components/Title/Title.stories.d.ts +1 -1
- package/dist/components/Title/Title.test.js +7 -6
- package/dist/components/Typography/Body/Body.stories.d.ts +1 -1
- package/dist/components/Typography/Body/body.test.js +24 -19
- package/dist/components/Typography/Display/Display.stories.d.ts +1 -1
- package/dist/components/Typography/Display/Display.test.js +24 -19
- package/dist/components/Typography/Headings/Headings.stories.d.ts +1 -1
- package/dist/components/Typography/Typography.css +16 -2
- package/dist/components/Typography/Typography.js +1 -1
- package/dist/components/Typography/Typography.stories.d.ts +1 -1
- package/dist/components/Typography/Typography.test.d.ts +1 -0
- package/dist/components/Typography/Typography.test.js +42 -0
- package/dist/global/components/Table/Table.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/jest.config.d.ts +1 -0
- package/dist/jest.config.js +33 -0
- package/dist/jest.setup.d.ts +4 -0
- package/dist/jest.setup.js +35 -0
- package/dist/styles/global.css +16 -2
- package/dist/tailwind.config.js +14 -15
- package/dist/utils/iconList.js +8 -8
- package/dist/utils/index.d.ts +8 -8
- package/dist/utils/index.js +15 -19
- package/package.json +40 -14
- package/dist/components/Color/BackgroundColor/Color.d.ts +0 -2
- package/dist/components/Color/BackgroundColor/Color.js +0 -9
- package/dist/components/Color/BackgroundColor/Color.stories.d.ts +0 -10
- package/dist/components/Color/BackgroundColor/Color.stories.js +0 -103
- package/dist/components/Color/TextColor.d.ts +0 -3
- package/dist/components/Color/TextColor.js +0 -9
- package/dist/components/Color/TextColor.stories.d.ts +0 -6
- package/dist/components/Color/TextColor.stories.js +0 -35
- package/dist/components/Images/index.d.ts +0 -4
- package/dist/components/Images/index.js +0 -6
- package/dist/utils/enum.d.ts +0 -25
- package/dist/utils/enum.js +0 -25
package/dist/utils/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.customAspectRatio = exports.customBorderRadius = exports.customBorderWidth = exports.customOpacity = exports.customButtonIconSize = exports.customIconSize = exports.customLogoSize = exports.customMinHeight = exports.customMinWidth = exports.customHeight = exports.customWidth = exports.customSize = exports.customTextWrap = exports.customTextDecoration = exports.customTextTransform = exports.customTextAlignment = exports.customLineHeight = exports.customFontWeight = exports.customFontSize = exports.sectionTypeList = exports.
|
|
4
|
-
exports.table_row_className = exports.table_sub_heading_className = exports.table_header_className = exports.table_data_className = exports.customHeadings = exports.customizeTextColors = exports.
|
|
5
|
-
exports.
|
|
3
|
+
exports.customAspectRatio = exports.customBorderRadius = exports.customBorderWidth = exports.customOpacity = exports.customButtonIconSize = exports.customIconSize = exports.customLogoSize = exports.customMinHeight = exports.customMinWidth = exports.customHeight = exports.customWidth = exports.customSize = exports.customTextWrap = exports.customTextDecoration = exports.customTextTransform = exports.customTextAlignment = exports.customLineHeight = exports.customFontWeight = exports.customFontSize = exports.sectionTypeList = exports.avatarBackgroundSize = exports.headingsList = exports.avatarShapeList = exports.textColorList = exports.avatarSizesList = exports.landscapeAspectRatioList = exports.portraitAspectRatioList = exports.buttonWithIconList = exports.buttonSizeList = exports.buttonColorsList = exports.iconColorList = exports.buttonIconSizeList = exports.iconSizeList = exports.borderWidthList = exports.borderRadiusList = exports.spacings = exports.minHeights = exports.minWidths = exports.heights = exports.widths = exports.sizes = exports.textWraps = exports.textDecorations = exports.textTransform = exports.textAlignment = exports.lineHeights = exports.fontWeights = exports.fontSizes = exports.defaultCardProps = exports.text = void 0;
|
|
4
|
+
exports.table_row_className = exports.table_sub_heading_className = exports.table_header_className = exports.table_data_className = exports.customHeadings = exports.customizeTextColors = exports.customizeAvatarShape = exports.customAvatarSize = exports.customIconButtonSize = exports.customButtonSize = exports.customButtonOutlineColors = exports.customButtonColors = exports.customIconColors = exports.customBoxShadow = void 0;
|
|
5
|
+
exports.generateUtilities = generateUtilities;
|
|
6
6
|
var index_1 = require("../components/MediaCard/index");
|
|
7
7
|
var enums_1 = require("./enums");
|
|
8
8
|
//************Used for typography and color utilities Storybook************
|
|
9
|
-
exports.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was
|
|
9
|
+
exports.text = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popular in the 1960s with the release of Let set sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Ald PageMaker including versions of Lorem Ipsum.";
|
|
10
10
|
exports.defaultCardProps = {
|
|
11
11
|
type: index_1.SectionTypeEnum.postByCategoriesTheme,
|
|
12
12
|
image: "/images/demo-image.jpg",
|
|
@@ -76,8 +76,8 @@ exports.textDecorations = [
|
|
|
76
76
|
label: "lu-text-decoration-underline: underline",
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
|
-
key: "lu-text-decoration-
|
|
80
|
-
label: "lu-text-decoration-
|
|
79
|
+
key: "lu-text-decoration-line-through",
|
|
80
|
+
label: "lu-text-decoration-line-through: line-through",
|
|
81
81
|
},
|
|
82
82
|
];
|
|
83
83
|
exports.textWraps = [
|
|
@@ -237,7 +237,7 @@ exports.buttonColorsList = [
|
|
|
237
237
|
{ key: "lu-btn-gray-light", label: "lu-btn-gray-light" },
|
|
238
238
|
{ key: "lu-btn-disabled", label: "lu-btn-disabled" },
|
|
239
239
|
];
|
|
240
|
-
exports.
|
|
240
|
+
exports.buttonSizeList = [
|
|
241
241
|
{ key: "lu-btn-sm", label: "lu-btn-sm" },
|
|
242
242
|
{ key: "lu-btn-md", label: "lu-btn-md" },
|
|
243
243
|
{ key: "lu-btn-lg", label: "lu-btn-lg" },
|
|
@@ -249,7 +249,7 @@ exports.buttonWithIconList = [
|
|
|
249
249
|
{ key: "lu-btn-lg", label: "lu-btn-lg" },
|
|
250
250
|
{ key: "lu-btn-xl", label: "lu-btn-xl" },
|
|
251
251
|
];
|
|
252
|
-
exports.
|
|
252
|
+
exports.portraitAspectRatioList = [
|
|
253
253
|
{ key: "lu-aspect-square", label: "lu-aspect-square: 1/1" },
|
|
254
254
|
{ key: "lu-aspect-1-2-por", label: "lu-aspect-1-2-por: 1/2" },
|
|
255
255
|
{ key: "lu-aspect-2-3-por", label: "lu-aspect-2-3-por: 2/3" },
|
|
@@ -259,7 +259,7 @@ exports.portraitaspectRatioList = [
|
|
|
259
259
|
{ key: "lu-aspect-9-16-por", label: "lu-aspect-9-16-por: 9/16" },
|
|
260
260
|
{ key: "lu-aspect-9-21-por", label: "lu-aspect-9-21-por: 9/21" },
|
|
261
261
|
];
|
|
262
|
-
exports.
|
|
262
|
+
exports.landscapeAspectRatioList = [
|
|
263
263
|
{ key: "lu-aspect-square", label: "lu-aspect-square: 1/1" },
|
|
264
264
|
{ key: "lu-aspect-2-1-landsc", label: "lu-aspect-2-1-landsc: 2/1" },
|
|
265
265
|
{ key: "lu-aspect-3-2-landsc", label: "lu-aspect-3-2-landsc: 3/2" },
|
|
@@ -311,7 +311,7 @@ exports.headingsList = [
|
|
|
311
311
|
{ key: "lu-heading-h5", label: "lu-heading-h5" },
|
|
312
312
|
{ key: "lu-heading-h6", label: "lu-heading-h6" },
|
|
313
313
|
];
|
|
314
|
-
var
|
|
314
|
+
var avatarBackgroundSize = function (size) {
|
|
315
315
|
if (size === "lu-avatar-massive") {
|
|
316
316
|
return {
|
|
317
317
|
width: "200px",
|
|
@@ -348,12 +348,6 @@ var avtarBackgroundSize = function (size) {
|
|
|
348
348
|
height: "96px",
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
else if (size === "lu-avatar-4x-large") {
|
|
352
|
-
return {
|
|
353
|
-
width: "96px",
|
|
354
|
-
height: "96px",
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
351
|
else if (size === "lu-avatar-3x-large") {
|
|
358
352
|
return {
|
|
359
353
|
width: "76px",
|
|
@@ -391,7 +385,7 @@ var avtarBackgroundSize = function (size) {
|
|
|
391
385
|
};
|
|
392
386
|
}
|
|
393
387
|
};
|
|
394
|
-
exports.
|
|
388
|
+
exports.avatarBackgroundSize = avatarBackgroundSize;
|
|
395
389
|
exports.sectionTypeList = Object.values(index_1.SectionTypeEnum).map(function (type) { return ({
|
|
396
390
|
key: type,
|
|
397
391
|
label: type,
|
|
@@ -454,7 +448,7 @@ exports.customTextTransform = {
|
|
|
454
448
|
exports.customTextDecoration = {
|
|
455
449
|
"lu-text-decoration-none": "none",
|
|
456
450
|
"lu-text-decoration-underline": "underline",
|
|
457
|
-
"lu-text-decoration-
|
|
451
|
+
"lu-text-decoration-line-through": "line-through",
|
|
458
452
|
};
|
|
459
453
|
exports.customTextWrap = {
|
|
460
454
|
"lu-text-wrap": "normal",
|
|
@@ -643,6 +637,7 @@ exports.customBorderRadius = {
|
|
|
643
637
|
".lu-border-rounded-3xl": { borderRadius: "var(--core-300)" },
|
|
644
638
|
".lu-border-rounded-full": { borderRadius: "9999px" },
|
|
645
639
|
};
|
|
640
|
+
// TODO: fix this name class name keep simple and short and remove landsc from cspell list
|
|
646
641
|
exports.customAspectRatio = {
|
|
647
642
|
".lu-aspect-square": { aspectRatio: "1 / 1" },
|
|
648
643
|
".lu-aspect-2-1-landsc": { aspectRatio: "2 / 1" },
|
|
@@ -667,6 +662,7 @@ exports.customBoxShadow = {
|
|
|
667
662
|
"lu-shadow-lg": "0px 4px 18px 0 rgba(52, 52, 52, 0.15)",
|
|
668
663
|
"lu-shadow-xl": "0px 8px 24px 0 rgba(52, 52, 52, 0.15)",
|
|
669
664
|
};
|
|
665
|
+
// TODO: fix this name midtone to to other and remove landsc from cspell list
|
|
670
666
|
exports.customIconColors = {
|
|
671
667
|
".lu-disabled-icon-light": { fill: "#D2D3D5" },
|
|
672
668
|
".lu-disabled-icon-dark": { fill: "var(--neutral-400)" },
|
|
@@ -1536,7 +1532,7 @@ exports.customAvatarSize = {
|
|
|
1536
1532
|
height: "var(--core-175)",
|
|
1537
1533
|
},
|
|
1538
1534
|
};
|
|
1539
|
-
exports.
|
|
1535
|
+
exports.customizeAvatarShape = {
|
|
1540
1536
|
".square": { borderRadius: "0px" },
|
|
1541
1537
|
".circle": { borderRadius: "9999px" },
|
|
1542
1538
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linkedunion-design-kit",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -20,7 +20,20 @@
|
|
|
20
20
|
"build-storybook": "storybook build",
|
|
21
21
|
"test": "jest",
|
|
22
22
|
"coverage": "jest --coverage",
|
|
23
|
-
"test:watch": "jest --watch"
|
|
23
|
+
"test:watch": "jest --watch",
|
|
24
|
+
"spellcheck": "cspell \"**/*.{js,ts,tsx,md,json}\"",
|
|
25
|
+
"prepare": "husky"
|
|
26
|
+
},
|
|
27
|
+
"lint-staged": {
|
|
28
|
+
"**/*.{js,ts,tsx,mjs,cjs}": [
|
|
29
|
+
"prettier --write",
|
|
30
|
+
"eslint --fix",
|
|
31
|
+
"npx cspell"
|
|
32
|
+
],
|
|
33
|
+
"**/*.{md,json}": [
|
|
34
|
+
"prettier --write",
|
|
35
|
+
"npx cspell"
|
|
36
|
+
]
|
|
24
37
|
},
|
|
25
38
|
"author": "linkedunion",
|
|
26
39
|
"license": "MIT",
|
|
@@ -30,10 +43,11 @@
|
|
|
30
43
|
"dependencies": {
|
|
31
44
|
"@storybook/testing-library": "^0.2.2",
|
|
32
45
|
"@testing-library/jest-dom": "^6.6.3",
|
|
33
|
-
"@testing-library/react": "^16.0
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"react
|
|
46
|
+
"@testing-library/react": "^16.2.0",
|
|
47
|
+
"eslint-plugin-testing-library": "^7.1.1",
|
|
48
|
+
"next": "^15.2.0",
|
|
49
|
+
"react": "^19.0.0",
|
|
50
|
+
"react-dom": "^19.0.0",
|
|
37
51
|
"tsc-alias": "^1.8.10"
|
|
38
52
|
},
|
|
39
53
|
"devDependencies": {
|
|
@@ -44,29 +58,41 @@
|
|
|
44
58
|
"@storybook/blocks": "^8.4.3",
|
|
45
59
|
"@storybook/client-logger": "^8.4.4",
|
|
46
60
|
"@storybook/nextjs": "^8.4.3",
|
|
47
|
-
"@storybook/react": "^8.
|
|
61
|
+
"@storybook/react": "^8.6.2",
|
|
48
62
|
"@storybook/test": "^8.4.3",
|
|
49
63
|
"@storybook/testing-react": "^2.0.1",
|
|
64
|
+
"@testing-library/dom": "^10.4.0",
|
|
50
65
|
"@testing-library/user-event": "^14.5.2",
|
|
51
66
|
"@types/jest": "^29.5.14",
|
|
52
|
-
"@types/node": "^
|
|
53
|
-
"@types/react": "^
|
|
54
|
-
"@types/react-dom": "^
|
|
67
|
+
"@types/node": "^22.13.5",
|
|
68
|
+
"@types/react": "^19.0.10",
|
|
69
|
+
"@types/react-dom": "^19.0.4",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^8.25.0",
|
|
71
|
+
"@typescript-eslint/parser": "^8.25.0",
|
|
55
72
|
"autoprefixer": "^10",
|
|
56
|
-
"
|
|
57
|
-
"eslint
|
|
73
|
+
"cspell": "^8.17.5",
|
|
74
|
+
"eslint": "^9.21.0",
|
|
75
|
+
"eslint-config-next": "^15.2.0",
|
|
58
76
|
"eslint-config-prettier": "^10.0.1",
|
|
59
|
-
"eslint-
|
|
77
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
78
|
+
"eslint-import-resolver-typescript": "^3.8.3",
|
|
79
|
+
"eslint-plugin-import": "^2.31.0",
|
|
80
|
+
"eslint-plugin-jest": "^28.11.0",
|
|
81
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
82
|
+
"eslint-plugin-storybook": "^0.11.3",
|
|
83
|
+
"husky": "^9.1.7",
|
|
60
84
|
"jest": "^29.7.0",
|
|
61
85
|
"jest-canvas-mock": "^2.5.2",
|
|
62
86
|
"jest-environment-jsdom": "^29.7.0",
|
|
63
87
|
"jest-fetch-mock": "^3.0.3",
|
|
88
|
+
"lint-staged": "^15.4.3",
|
|
64
89
|
"matchmedia-polyfill": "^0.3.2",
|
|
65
90
|
"postcss": "^8.4.49",
|
|
66
91
|
"postcss-cli": "^11.0.0",
|
|
67
|
-
"prettier": "^3.
|
|
92
|
+
"prettier": "^3.5.2",
|
|
68
93
|
"storybook": "^8.4.3",
|
|
69
94
|
"tailwindcss": "^3",
|
|
95
|
+
"ts-node": "^10.9.2",
|
|
70
96
|
"typescript": "^5"
|
|
71
97
|
}
|
|
72
98
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Color = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var Color = function (_a) {
|
|
6
|
-
var label = _a.label, color = _a.color;
|
|
7
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h2", { className: "lu-font-size-large lu-font-weight-bold lu-mb-200", children: label }), (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center gap-4", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-10 h-10 rounded ".concat(color), "data-testid": "color-box" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "lu-font-weight-semibold", children: color === null || color === void 0 ? void 0 : color.replace("bg-", "") }), (0, jsx_runtime_1.jsx)("code", { className: "lu-font-size-small", children: color })] })] })] }));
|
|
8
|
-
};
|
|
9
|
-
exports.Color = Color;
|
|
@@ -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,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.Info = exports.Danger = exports.Warning = exports.Success = exports.Gray = exports.Primary = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var Color_1 = require("../../../components/Color/BackgroundColor/Color");
|
|
17
|
-
var _1 = require(".");
|
|
18
|
-
exports.default = {
|
|
19
|
-
title: "Components/Color/BackgroundColor",
|
|
20
|
-
component: Color_1.Color,
|
|
21
|
-
argTypes: {
|
|
22
|
-
label: { control: "text" },
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(Color_1.Color, __assign({}, args)); };
|
|
26
|
-
exports.Primary = Template.bind({});
|
|
27
|
-
exports.Primary.args = {
|
|
28
|
-
label: "Primary",
|
|
29
|
-
color: "lu-bg-primary-500", // Default color
|
|
30
|
-
};
|
|
31
|
-
exports.Primary.argTypes = {
|
|
32
|
-
color: {
|
|
33
|
-
control: { type: "select" },
|
|
34
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
35
|
-
.filter(function (key) { return key.startsWith(".lu-bg-primary-"); })
|
|
36
|
-
.map(function (key) { return key.slice(1); }),
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
exports.Gray = Template.bind({});
|
|
40
|
-
exports.Gray.argTypes = {
|
|
41
|
-
color: {
|
|
42
|
-
control: { type: "select" },
|
|
43
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
44
|
-
.filter(function (key) { return key.startsWith(".lu-bg-neutral-"); })
|
|
45
|
-
.map(function (key) { return key.slice(1); }),
|
|
46
|
-
},
|
|
47
|
-
};
|
|
48
|
-
exports.Gray.args = {
|
|
49
|
-
label: "Gray",
|
|
50
|
-
color: "lu-bg-neutral-500",
|
|
51
|
-
};
|
|
52
|
-
exports.Success = Template.bind({});
|
|
53
|
-
exports.Success.argTypes = {
|
|
54
|
-
color: {
|
|
55
|
-
control: { type: "select" },
|
|
56
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
57
|
-
.filter(function (key) { return key.startsWith(".lu-bg-success-"); })
|
|
58
|
-
.map(function (key) { return key.slice(1); }),
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
exports.Success.args = {
|
|
62
|
-
label: "Success",
|
|
63
|
-
color: "lu-bg-success-500",
|
|
64
|
-
};
|
|
65
|
-
exports.Warning = Template.bind({});
|
|
66
|
-
exports.Warning.argTypes = {
|
|
67
|
-
color: {
|
|
68
|
-
control: { type: "select" },
|
|
69
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
70
|
-
.filter(function (key) { return key.startsWith(".lu-bg-warning-"); })
|
|
71
|
-
.map(function (key) { return key.slice(1); }),
|
|
72
|
-
},
|
|
73
|
-
};
|
|
74
|
-
exports.Warning.args = {
|
|
75
|
-
label: "Warning",
|
|
76
|
-
color: "lu-bg-warning-500",
|
|
77
|
-
};
|
|
78
|
-
exports.Danger = Template.bind({});
|
|
79
|
-
exports.Danger.argTypes = {
|
|
80
|
-
color: {
|
|
81
|
-
control: { type: "select" },
|
|
82
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
83
|
-
.filter(function (key) { return key.startsWith(".lu-bg-danger-"); })
|
|
84
|
-
.map(function (key) { return key.slice(1); }),
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
exports.Danger.args = {
|
|
88
|
-
label: "Danger",
|
|
89
|
-
color: "lu-bg-danger-500",
|
|
90
|
-
};
|
|
91
|
-
exports.Info = Template.bind({});
|
|
92
|
-
exports.Info.argTypes = {
|
|
93
|
-
color: {
|
|
94
|
-
control: { type: "select" },
|
|
95
|
-
options: Object.keys(_1.customBackgroundColor)
|
|
96
|
-
.filter(function (key) { return key.startsWith(".lu-bg-info-"); })
|
|
97
|
-
.map(function (key) { return key.slice(1); }),
|
|
98
|
-
},
|
|
99
|
-
};
|
|
100
|
-
exports.Info.args = {
|
|
101
|
-
label: "Info",
|
|
102
|
-
color: "lu-bg-info-500",
|
|
103
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextColor = void 0;
|
|
4
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
var TextColor = function (_a) {
|
|
6
|
-
var _b = _a.color, color = _b === void 0 ? "lu-text-default" : _b;
|
|
7
|
-
return (0, jsx_runtime_1.jsxs)("div", { className: "".concat(color), children: [".", color] });
|
|
8
|
-
};
|
|
9
|
-
exports.TextColor = TextColor;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.textColor = void 0;
|
|
15
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
-
var TextColor_1 = require("./TextColor");
|
|
17
|
-
var utils_1 = require("../../utils");
|
|
18
|
-
exports.default = {
|
|
19
|
-
title: "Components/Color",
|
|
20
|
-
component: TextColor_1.TextColor,
|
|
21
|
-
};
|
|
22
|
-
var Template = function (args) { return (0, jsx_runtime_1.jsx)(TextColor_1.TextColor, __assign({}, args)); };
|
|
23
|
-
exports.textColor = Template.bind({});
|
|
24
|
-
exports.textColor.args = {
|
|
25
|
-
color: "lu-text-default", // Default color
|
|
26
|
-
};
|
|
27
|
-
exports.textColor.argTypes = {
|
|
28
|
-
color: {
|
|
29
|
-
control: {
|
|
30
|
-
type: "select",
|
|
31
|
-
labels: Object.fromEntries(utils_1.textColorList.map(function (color) { return [color.key, color.label]; })),
|
|
32
|
-
},
|
|
33
|
-
options: utils_1.textColorList.map(function (color) { return color.key; }),
|
|
34
|
-
},
|
|
35
|
-
};
|
package/dist/utils/enum.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const contentTypeEnum: {
|
|
2
|
-
none: string;
|
|
3
|
-
text_with_icon: string;
|
|
4
|
-
icon_only: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const buttonTypeEnum: {
|
|
7
|
-
fill: string;
|
|
8
|
-
outline: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const orientationEnum: {
|
|
11
|
-
portrait: string;
|
|
12
|
-
landscape: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const cardLayoutEnum: {
|
|
15
|
-
horizontal: string;
|
|
16
|
-
vertical: string;
|
|
17
|
-
};
|
|
18
|
-
export declare const sectionType: {
|
|
19
|
-
multiplePostsTheme: string;
|
|
20
|
-
singlePostTheme: string;
|
|
21
|
-
postByCategoriesTheme: string;
|
|
22
|
-
contactsProfileTheme: string;
|
|
23
|
-
galleryTheme: string;
|
|
24
|
-
albumTheme: string;
|
|
25
|
-
};
|
package/dist/utils/enum.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export var contentTypeEnum = {
|
|
2
|
-
none: "None",
|
|
3
|
-
text_with_icon: "Text with Icon",
|
|
4
|
-
icon_only: "Icon Only",
|
|
5
|
-
};
|
|
6
|
-
export var buttonTypeEnum = {
|
|
7
|
-
fill: "Fill",
|
|
8
|
-
outline: "Outline",
|
|
9
|
-
};
|
|
10
|
-
export var orientationEnum = {
|
|
11
|
-
portrait: "Portrait",
|
|
12
|
-
landscape: "Landscape",
|
|
13
|
-
};
|
|
14
|
-
export var cardLayoutEnum = {
|
|
15
|
-
horizontal: "Horizontal",
|
|
16
|
-
vertical: "Vertical",
|
|
17
|
-
};
|
|
18
|
-
export var sectionType = {
|
|
19
|
-
multiplePostsTheme: "Multiple Posts",
|
|
20
|
-
singlePostTheme: "Single Post",
|
|
21
|
-
postByCategoriesTheme: "Post By Categories",
|
|
22
|
-
contactsProfileTheme: "Contacts Profile",
|
|
23
|
-
galleryTheme: "Gallery",
|
|
24
|
-
albumTheme: "Album",
|
|
25
|
-
};
|