linkedunion-design-kit 1.4.8 → 1.5.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 (115) hide show
  1. package/dist/.next/types/app/page.js +26 -1
  2. package/dist/app/layout.js +11 -7
  3. package/dist/app/page.js +10 -4
  4. package/dist/app/scripts.js +8 -3
  5. package/dist/components/Avatar/Avatar.d.ts +2 -1
  6. package/dist/components/Avatar/Avatar.js +13 -7
  7. package/dist/components/Avatar/Avatar.stories.js +19 -13
  8. package/dist/components/Border/BorderRadius/BorderRadius.js +9 -5
  9. package/dist/components/Border/BorderRadius/BorderRadius.stories.js +14 -11
  10. package/dist/components/Border/BorderRadius/BorderRadiusTable.js +8 -4
  11. package/dist/components/Border/BorderRadius/BorderRadiusView.js +7 -3
  12. package/dist/components/Border/BorderWidth/BorderWidth.js +9 -5
  13. package/dist/components/Border/BorderWidth/BorderWidth.stories.js +14 -11
  14. package/dist/components/Border/BorderWidth/BorderWidthTable.js +8 -4
  15. package/dist/components/Border/BorderWidth/ViewBorderWidth.js +7 -3
  16. package/dist/components/Button/Button.d.ts +1 -0
  17. package/dist/components/Button/Button.js +17 -8
  18. package/dist/components/Button/Button.stories.js +50 -46
  19. package/dist/components/Button/index.d.ts +4 -0
  20. package/dist/components/Button/index.js +9 -0
  21. package/dist/components/Color/BackgroundColor/BackgroundColor.d.ts +2 -0
  22. package/dist/components/Color/BackgroundColor/BackgroundColor.js +5 -0
  23. package/dist/components/Color/BackgroundColor/BackgroundColor.stories.d.ts +10 -0
  24. package/dist/components/Color/BackgroundColor/BackgroundColor.stories.js +100 -0
  25. package/dist/components/Color/BackgroundColor/Color.js +7 -3
  26. package/dist/components/Color/BackgroundColor/Color.stories.js +33 -30
  27. package/dist/components/Color/BackgroundColor/index.js +7 -4
  28. package/dist/components/Color/TextColor/TextColor.d.ts +3 -0
  29. package/dist/components/Color/TextColor/TextColor.js +5 -0
  30. package/dist/components/Color/TextColor/TextColor.stories.d.ts +6 -0
  31. package/dist/components/Color/TextColor/TextColor.stories.js +32 -0
  32. package/dist/components/Color/TextColor.js +7 -3
  33. package/dist/components/Color/TextColor.stories.js +14 -11
  34. package/dist/components/Icons/IconView.js +9 -5
  35. package/dist/components/Icons/IconView.stories.js +9 -6
  36. package/dist/components/Icons/LUIcon.d.ts +2 -1
  37. package/dist/components/Icons/LUIcon.js +8 -5
  38. package/dist/components/Icons/LUIcon.stories.js +23 -17
  39. package/dist/components/Images/LuImage.d.ts +1 -0
  40. package/dist/components/Images/LuImage.js +13 -5
  41. package/dist/components/Images/LuImage.stories.js +21 -18
  42. package/dist/components/Images/index.d.ts +4 -0
  43. package/dist/components/Images/index.js +6 -0
  44. package/dist/components/MediaCard/Card.d.ts +2 -1
  45. package/dist/components/MediaCard/Card.js +19 -15
  46. package/dist/components/MediaCard/Card.stories.js +28 -26
  47. package/dist/components/MediaCard/ContactProfile/ContactProfile.js +14 -10
  48. package/dist/components/MediaCard/ContactProfile/ContactProfileTheme1.js +15 -8
  49. package/dist/components/MediaCard/ContactProfile/ContactProfileTheme2.js +15 -8
  50. package/dist/components/MediaCard/PostByCategory/PostByCategory.js +14 -10
  51. package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme1.js +15 -8
  52. package/dist/components/MediaCard/PostByCategory/PostByCategoryTheme2.js +15 -8
  53. package/dist/components/MediaCard/index.d.ts +8 -0
  54. package/dist/components/MediaCard/index.js +13 -0
  55. package/dist/components/Size/MinWidthHeight.d.ts +2 -1
  56. package/dist/components/Size/MinWidthHeight.js +6 -3
  57. package/dist/components/Size/MinWidthHeight.stories.js +19 -13
  58. package/dist/components/Size/Size.d.ts +2 -1
  59. package/dist/components/Size/Size.js +6 -3
  60. package/dist/components/Size/Size.stories.js +17 -11
  61. package/dist/components/Size/WidthHeight.d.ts +2 -1
  62. package/dist/components/Size/WidthHeight.js +6 -3
  63. package/dist/components/Size/WidthHeight.stories.js +19 -13
  64. package/dist/components/Spacing/Margin/Margin.js +8 -4
  65. package/dist/components/Spacing/Margin/MarginBottom.js +8 -4
  66. package/dist/components/Spacing/Margin/MarginLeft.js +8 -4
  67. package/dist/components/Spacing/Margin/MarginRight.js +8 -4
  68. package/dist/components/Spacing/Margin/MarginToken.js +15 -11
  69. package/dist/components/Spacing/Margin/MarginToken.stories.js +9 -6
  70. package/dist/components/Spacing/Margin/MarginTop.js +8 -4
  71. package/dist/components/Spacing/Margin/MarginX.js +8 -4
  72. package/dist/components/Spacing/Margin/MarginY.js +8 -4
  73. package/dist/components/Spacing/Padding/Padding.js +8 -4
  74. package/dist/components/Spacing/Padding/PaddingBottom.js +8 -4
  75. package/dist/components/Spacing/Padding/PaddingLeft.js +8 -4
  76. package/dist/components/Spacing/Padding/PaddingRight.js +8 -4
  77. package/dist/components/Spacing/Padding/PaddingToken.js +15 -11
  78. package/dist/components/Spacing/Padding/PaddingToken.stories.js +9 -6
  79. package/dist/components/Spacing/Padding/PaddingTop.js +8 -4
  80. package/dist/components/Spacing/Padding/PaddingX.js +8 -4
  81. package/dist/components/Spacing/Padding/PaddingY.js +8 -4
  82. package/dist/components/Title/Title.d.ts +2 -1
  83. package/dist/components/Title/Title.js +12 -6
  84. package/dist/components/Title/Title.stories.js +15 -9
  85. package/dist/components/Title/Title.test.js +14 -9
  86. package/dist/components/Typography/Body/Body.d.ts +2 -1
  87. package/dist/components/Typography/Body/Body.js +9 -6
  88. package/dist/components/Typography/Body/Body.stories.js +25 -18
  89. package/dist/components/Typography/Body/index.js +27 -24
  90. package/dist/components/Typography/Body/type.js +2 -1
  91. package/dist/components/Typography/Display/Display.d.ts +2 -1
  92. package/dist/components/Typography/Display/Display.js +9 -6
  93. package/dist/components/Typography/Display/Display.stories.js +25 -18
  94. package/dist/components/Typography/Display/index.js +24 -21
  95. package/dist/components/Typography/Display/type.js +2 -1
  96. package/dist/components/Typography/Headings/Heading.test.js +24 -19
  97. package/dist/components/Typography/Headings/Headings.d.ts +2 -1
  98. package/dist/components/Typography/Headings/Headings.js +9 -6
  99. package/dist/components/Typography/Headings/Headings.stories.js +27 -20
  100. package/dist/components/Typography/Headings/index.js +38 -35
  101. package/dist/components/Typography/Headings/type.js +2 -1
  102. package/dist/components/Typography/Typography.js +7 -3
  103. package/dist/components/Typography/Typography.stories.js +27 -24
  104. package/dist/global/components/Table/Table.js +7 -5
  105. package/dist/index.d.ts +12 -12
  106. package/dist/index.js +31 -13
  107. package/dist/tailwind.config.js +72 -67
  108. package/dist/utils/colors.js +4 -1
  109. package/dist/utils/constants.js +5 -2
  110. package/dist/utils/enums.d.ts +9 -0
  111. package/dist/utils/enums.js +23 -10
  112. package/dist/utils/iconList.js +4 -1
  113. package/dist/utils/index.d.ts +4 -4
  114. package/dist/utils/index.js +78 -85
  115. package/package.json +2 -1
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,12 +10,14 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { IconView } from "./IconView";
14
- export default {
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.iconView = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var IconView_1 = require("./IconView");
17
+ exports.default = {
15
18
  title: "Components/Icon",
16
- component: IconView,
19
+ component: IconView_1.IconView,
17
20
  tags: ["!autodocs"],
18
21
  };
19
- var Template = function (args) { return _jsx(IconView, __assign({}, args)); };
20
- export var iconView = Template.bind({});
22
+ var Template = function (args) { return (0, jsx_runtime_1.jsx)(IconView_1.IconView, __assign({}, args)); };
23
+ exports.iconView = Template.bind({});
@@ -1,2 +1,3 @@
1
1
  import { IconProps } from "@/types/interface";
2
- export declare const LUIcon: ({ size, fill, icon, className }: IconProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const LUIcon: ({ size, fill, icon, className }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default LUIcon;
@@ -1,8 +1,11 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { iconList } from "../../utils/iconList";
3
- export var LUIcon = function (_a) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var jsx_runtime_1 = require("react/jsx-runtime");
4
+ var iconList_1 = require("../../utils/iconList");
5
+ var LUIcon = function (_a) {
4
6
  var _b;
5
7
  var size = _a.size, fill = _a.fill, icon = _a.icon, className = _a.className;
6
- var selectedIcon = iconList.find(function (item) { return item.key === icon; });
7
- return (_jsx(_Fragment, { children: _jsxs("svg", { className: "".concat(size, " ").concat(className), viewBox: "0 0 32 32", fill: "none", children: [_jsx("g", { "clip-path": "url(#clip0_9168_14965)", children: _jsx("path", { d: (_b = selectedIcon === null || selectedIcon === void 0 ? void 0 : selectedIcon.path) !== null && _b !== void 0 ? _b : "", className: "".concat(fill, " icon") }) }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_9168_14965", children: _jsx("rect", { width: "32", height: "32", fill: "black" }) }) })] }) }));
8
+ var selectedIcon = iconList_1.iconList.find(function (item) { return item.key === icon; });
9
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("svg", { className: "".concat(size, " ").concat(className), viewBox: "0 0 32 32", fill: "none", children: [(0, jsx_runtime_1.jsx)("g", { "clip-path": "url(#clip0_9168_14965)", children: (0, jsx_runtime_1.jsx)("path", { d: (_b = selectedIcon === null || selectedIcon === void 0 ? void 0 : selectedIcon.path) !== null && _b !== void 0 ? _b : "", className: "".concat(fill, " icon") }) }), (0, jsx_runtime_1.jsx)("defs", { children: (0, jsx_runtime_1.jsx)("clipPath", { id: "clip0_9168_14965", children: (0, jsx_runtime_1.jsx)("rect", { width: "32", height: "32", fill: "black" }) }) })] }) }));
8
10
  };
11
+ exports.default = LUIcon;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,42 +10,47 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { LUIcon } from "./LUIcon";
14
- import { iconColorList, iconSizeList } from "../../utils";
15
- import { iconList } from "../../utils/iconList";
16
- export default {
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.icon = void 0;
18
+ var jsx_runtime_1 = require("react/jsx-runtime");
19
+ var utils_1 = require("../../utils");
20
+ var iconList_1 = require("../../utils/iconList");
21
+ var LUIcon_1 = __importDefault(require("./LUIcon"));
22
+ exports.default = {
17
23
  title: "Components/Icon",
18
- component: LUIcon,
24
+ component: LUIcon_1.default,
19
25
  tags: ["autodocs"],
20
26
  };
21
- var Template = function (args) { return _jsx(LUIcon, __assign({}, args)); };
22
- export var icon = Template.bind({});
23
- icon.args = {
27
+ var Template = function (args) { return (0, jsx_runtime_1.jsx)(LUIcon_1.default, __assign({}, args)); };
28
+ exports.icon = Template.bind({});
29
+ exports.icon.args = {
24
30
  size: "lu-icon-x-small",
25
31
  fill: "lu-primary-icon-default",
26
- icon: iconList[0].key,
32
+ icon: iconList_1.iconList[0].key,
27
33
  };
28
- icon.argTypes = {
34
+ exports.icon.argTypes = {
29
35
  size: {
30
36
  control: {
31
37
  type: "select",
32
- labels: Object.fromEntries(iconSizeList.map(function (size) { return [size.key, size.label]; })),
38
+ labels: Object.fromEntries(utils_1.iconSizeList.map(function (size) { return [size.key, size.label]; })),
33
39
  },
34
- options: iconSizeList.map(function (size) { return size.key; }),
40
+ options: utils_1.iconSizeList.map(function (size) { return size.key; }),
35
41
  },
36
42
  fill: {
37
43
  control: {
38
44
  type: "select",
39
- labels: Object.fromEntries(iconColorList.map(function (color) { return [color.key, color.label]; })),
45
+ labels: Object.fromEntries(utils_1.iconColorList.map(function (color) { return [color.key, color.label]; })),
40
46
  },
41
- options: iconColorList.map(function (color) { return color.key; }),
47
+ options: utils_1.iconColorList.map(function (color) { return color.key; }),
42
48
  },
43
49
  icon: {
44
50
  control: {
45
51
  type: "select",
46
- labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })),
52
+ labels: Object.fromEntries(iconList_1.iconList.map(function (icon) { return [icon.key, icon.label]; })),
47
53
  },
48
- options: iconList.map(function (icon) { return icon.key; }),
54
+ options: iconList_1.iconList.map(function (icon) { return icon.key; }),
49
55
  },
50
56
  };
@@ -1,2 +1,3 @@
1
1
  import { AspectRatioProps } from "@/types/interface";
2
2
  export declare const LuImage: ({ image, aspectRatio, width, height, className, }: AspectRatioProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default LuImage;
@@ -1,6 +1,14 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Image from "next/image";
3
- export var LuImage = function (_a) {
4
- var image = _a.image, _b = _a.aspectRatio, aspectRatio = _b === void 0 ? '' : _b, _c = _a.width, width = _c === void 0 ? 240 : _c, _d = _a.height, height = _d === void 0 ? 240 : _d, _e = _a.className, className = _e === void 0 ? '' : _e;
5
- return (_jsx(Image, { src: image || "", alt: "Image", width: width, height: height, className: "".concat(aspectRatio, " ").concat(className) }));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LuImage = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var image_1 = __importDefault(require("next/image"));
9
+ var LuImage = function (_a) {
10
+ var image = _a.image, _b = _a.aspectRatio, aspectRatio = _b === void 0 ? "" : _b, _c = _a.width, width = _c === void 0 ? 240 : _c, _d = _a.height, height = _d === void 0 ? 240 : _d, _e = _a.className, className = _e === void 0 ? "" : _e;
11
+ return ((0, jsx_runtime_1.jsx)(image_1.default, { src: image || "", alt: "Image", width: width, height: height, className: "".concat(aspectRatio, " ").concat(className) }));
12
+ };
13
+ exports.LuImage = LuImage;
14
+ exports.default = exports.LuImage;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,41 +10,43 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { LuImage } from "./LuImage";
14
- import { landscapeaspectRatioList, portraitaspectRatioList } from "../../utils";
15
- import { orientationEnum } from "../../utils/enum";
16
- export default {
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.image = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var LuImage_1 = require("./LuImage");
17
+ var utils_1 = require("../../utils");
18
+ var enums_1 = require("../../utils/enums");
19
+ exports.default = {
17
20
  title: "Components/Image",
18
- component: LuImage,
21
+ component: LuImage_1.LuImage,
19
22
  };
20
23
  var Template = function (args, _a) {
21
24
  var argTypes = _a.argTypes;
22
25
  //Show aspectRatio options based on orientation(landscape)
23
- var isLandscape = args.orientation === orientationEnum.landscape;
26
+ var isLandscape = args.orientation === enums_1.OrientationEnum.horizontal;
24
27
  argTypes.aspectRatio.options = isLandscape
25
- ? landscapeaspectRatioList.map(function (ratio) { return ratio.key; })
26
- : portraitaspectRatioList.map(function (ratio) { return ratio.key; });
27
- argTypes.aspectRatio.control.labels = Object.fromEntries((isLandscape ? landscapeaspectRatioList : portraitaspectRatioList).map(function (ratio) { return [ratio.key, ratio.label]; }));
28
- return _jsx(LuImage, __assign({}, args));
28
+ ? utils_1.landscapeaspectRatioList.map(function (ratio) { return ratio.key; })
29
+ : utils_1.portraitaspectRatioList.map(function (ratio) { return ratio.key; });
30
+ argTypes.aspectRatio.control.labels = Object.fromEntries((isLandscape ? utils_1.landscapeaspectRatioList : utils_1.portraitaspectRatioList).map(function (ratio) { return [ratio.key, ratio.label]; }));
31
+ return (0, jsx_runtime_1.jsx)(LuImage_1.LuImage, __assign({}, args));
29
32
  };
30
- export var image = Template.bind({});
31
- image.args = {
33
+ exports.image = Template.bind({});
34
+ exports.image.args = {
32
35
  image: "/images/demo-image.jpg",
33
- aspectRatio: portraitaspectRatioList[0].key,
36
+ aspectRatio: utils_1.portraitaspectRatioList[0].key,
34
37
  width: 240,
35
38
  height: 240,
36
39
  className: "",
37
40
  };
38
- image.argTypes = {
41
+ exports.image.argTypes = {
39
42
  orientation: {
40
43
  control: { type: "select" },
41
- options: [orientationEnum.portrait, orientationEnum.landscape],
44
+ options: [enums_1.OrientationEnum.vertical, enums_1.OrientationEnum.horizontal],
42
45
  },
43
46
  //Show Default aspectRatio options for portrait orientation
44
47
  aspectRatio: {
45
48
  control: { type: "select" },
46
- options: portraitaspectRatioList.map(function (ratio) { return ratio.key; }),
47
- labels: Object.fromEntries(portraitaspectRatioList.map(function (ratio) { return [ratio.key, ratio.label]; })),
49
+ options: utils_1.portraitaspectRatioList.map(function (ratio) { return ratio.key; }),
50
+ labels: Object.fromEntries(utils_1.portraitaspectRatioList.map(function (ratio) { return [ratio.key, ratio.label]; })),
48
51
  },
49
52
  };
@@ -0,0 +1,4 @@
1
+ export declare enum OrientationEnum {
2
+ portrait = "Portrait",
3
+ landscape = "Landscape"
4
+ }
@@ -0,0 +1,6 @@
1
+ export var OrientationEnum;
2
+ (function (OrientationEnum) {
3
+ OrientationEnum["portrait"] = "Portrait";
4
+ OrientationEnum["landscape"] = "Landscape";
5
+ })(OrientationEnum || (OrientationEnum = {}));
6
+ ;
@@ -1,2 +1,3 @@
1
1
  import { CardProps } from "@/types/interface";
2
- export declare const Card: ({ type, layout, id, className, image, mediaPosition, heading, body, href, btnLabel, cardStyle, }: CardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Card: ({ type, layout, id, className, image, mediaPosition, heading, body, href, btnLabel, cardStyle, }: CardProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default Card;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,22 +10,24 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { sectionType, cardLayoutEnum } from "../../utils/enum";
14
- import { PostByCategory } from "./PostByCategory/PostByCategory";
15
- import { colors } from "../../utils/colors";
16
- import { defaultCardProps } from "../../utils";
17
- import { ContactProfile } from "./ContactProfile/ContactProfile";
18
- export var Card = function (_a) {
19
- var _b = _a.type, type = _b === void 0 ? sectionType.postByCategoriesTheme : _b, _c = _a.layout, layout = _c === void 0 ? cardLayoutEnum.horizontal : _c, _d = _a.id, id = _d === void 0 ? 1 : _d, _e = _a.className, className = _e === void 0 ? "" : _e, _f = _a.image, image = _f === void 0 ? defaultCardProps.image : _f, _g = _a.mediaPosition, mediaPosition = _g === void 0 ? "" : _g, _h = _a.heading, heading = _h === void 0 ? defaultCardProps.heading : _h, _j = _a.body, body = _j === void 0 ? defaultCardProps.body : _j, _k = _a.href, href = _k === void 0 ? defaultCardProps.href : _k, _l = _a.btnLabel, btnLabel = _l === void 0 ? defaultCardProps.btnLabel : _l, _m = _a.cardStyle, cardStyle = _m === void 0 ? {
20
- card_title_color: colors.default,
21
- card_description_color: colors.caption_color,
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ var jsx_runtime_1 = require("react/jsx-runtime");
15
+ var PostByCategory_1 = require("./PostByCategory/PostByCategory");
16
+ var colors_1 = require("../../utils/colors");
17
+ var utils_1 = require("../../utils");
18
+ var ContactProfile_1 = require("./ContactProfile/ContactProfile");
19
+ var _1 = require(".");
20
+ var enums_1 = require("../../utils/enums");
21
+ var Card = function (_a) {
22
+ var _b = _a.type, type = _b === void 0 ? _1.SectionTypeEnum.postByCategoriesTheme : _b, _c = _a.layout, layout = _c === void 0 ? enums_1.OrientationEnum.horizontal : _c, _d = _a.id, id = _d === void 0 ? 1 : _d, _e = _a.className, className = _e === void 0 ? "" : _e, _f = _a.image, image = _f === void 0 ? utils_1.defaultCardProps.image : _f, _g = _a.mediaPosition, mediaPosition = _g === void 0 ? "" : _g, _h = _a.heading, heading = _h === void 0 ? utils_1.defaultCardProps.heading : _h, _j = _a.body, body = _j === void 0 ? utils_1.defaultCardProps.body : _j, _k = _a.href, href = _k === void 0 ? utils_1.defaultCardProps.href : _k, _l = _a.btnLabel, btnLabel = _l === void 0 ? utils_1.defaultCardProps.btnLabel : _l, _m = _a.cardStyle, cardStyle = _m === void 0 ? {
23
+ card_title_color: colors_1.colors.default,
24
+ card_description_color: colors_1.colors.caption_color,
22
25
  card_shadow_toggle: 1,
23
26
  card_shadow_color: "rgba(52, 52, 52, 0.15)",
24
- card_background_color: colors.white,
25
- card_button_background_color: colors.gray,
26
- card_button_text_color: colors.default,
27
- card_image_border_color: colors === null || colors === void 0 ? void 0 : colors.default,
27
+ card_background_color: colors_1.colors.white,
28
+ card_button_background_color: colors_1.colors.gray,
29
+ card_button_text_color: colors_1.colors.default,
30
+ card_image_border_color: colors_1.colors === null || colors_1.colors === void 0 ? void 0 : colors_1.colors.default,
28
31
  card_image_border_radius: "0",
29
32
  card_image_border: "0",
30
33
  } : _m;
@@ -40,5 +43,6 @@ export var Card = function (_a) {
40
43
  href: href,
41
44
  cardStyle: cardStyle,
42
45
  };
43
- return (_jsxs(_Fragment, { children: [type === sectionType.postByCategoriesTheme && (_jsx(PostByCategory, __assign({}, data))), type === sectionType.contactsProfileTheme && (_jsx(ContactProfile, __assign({}, data)))] }));
46
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [type === _1.SectionTypeEnum.postByCategoriesTheme && ((0, jsx_runtime_1.jsx)(PostByCategory_1.PostByCategory, __assign({}, data))), type === _1.SectionTypeEnum.contactsProfileTheme && ((0, jsx_runtime_1.jsx)(ContactProfile_1.ContactProfile, __assign({}, data)))] }));
44
47
  };
48
+ exports.default = Card;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,51 +10,52 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
- import { Card } from "./Card";
14
- import { cardLayoutEnum, orientationEnum, sectionType } from "../../utils/enum";
15
- import { sectionTypeList } from "../../utils";
16
- import { colors } from "../../utils/colors";
17
- export default {
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.card = void 0;
18
+ var jsx_runtime_1 = require("react/jsx-runtime");
19
+ var Card_1 = __importDefault(require("./Card"));
20
+ var utils_1 = require("../../utils");
21
+ var colors_1 = require("../../utils/colors");
22
+ var _1 = require(".");
23
+ var enums_1 = require("../../utils/enums");
24
+ exports.default = {
18
25
  title: "Components/Card",
19
- component: Card,
26
+ component: Card_1.default,
20
27
  };
21
- var Template = function (args) { return _jsx(Card, __assign({}, args)); };
22
- export var card = Template.bind({});
23
- card.args = {
24
- type: sectionType.postByCategoriesTheme,
28
+ var Template = function (args) { return (0, jsx_runtime_1.jsx)(Card_1.default, __assign({}, args)); };
29
+ exports.card = Template.bind({});
30
+ exports.card.args = {
31
+ type: _1.SectionTypeEnum.postByCategoriesTheme,
25
32
  image: "/images/demo-image.jpg",
26
33
  heading: "Heading Text",
27
34
  body: "The quick brown fox jumps over the lazy dog.",
28
- mediaPosition: orientationEnum.landscape,
29
- layout: cardLayoutEnum.horizontal,
35
+ layout: enums_1.OrientationEnum.horizontal,
30
36
  btnLabel: "View More",
31
37
  href: "https://www.google.com/",
32
38
  cardStyle: {
33
- card_title_color: colors.default,
34
- card_description_color: colors.caption_color,
39
+ card_title_color: colors_1.colors.default,
40
+ card_description_color: colors_1.colors.caption_color,
35
41
  card_shadow_toggle: 1,
36
42
  card_shadow_color: "rgba(52, 52, 52, 0.15)",
37
- card_background_color: colors.white,
38
- card_button_background_color: colors.gray,
39
- card_button_text_color: colors.default,
43
+ card_background_color: colors_1.colors.white,
44
+ card_button_background_color: colors_1.colors.gray,
45
+ card_button_text_color: colors_1.colors.default,
40
46
  },
41
47
  id: 1,
42
48
  };
43
- card.argTypes = {
44
- mediaPosition: {
45
- control: { type: "select" },
46
- options: [orientationEnum.portrait, orientationEnum.landscape],
47
- },
49
+ exports.card.argTypes = {
48
50
  layout: {
49
51
  control: { type: "select" },
50
- options: [cardLayoutEnum.horizontal, cardLayoutEnum.vertical],
52
+ options: [enums_1.OrientationEnum.horizontal, enums_1.OrientationEnum.vertical],
51
53
  },
52
54
  type: {
53
55
  control: {
54
56
  type: "select",
55
- labels: Object.fromEntries(sectionTypeList.map(function (type) { return [type.key, type.label]; })),
57
+ labels: Object.fromEntries(utils_1.sectionTypeList.map(function (type) { return [type.key, type.label]; })),
56
58
  },
57
- options: sectionTypeList.map(function (type) { return type.key; }),
59
+ options: utils_1.sectionTypeList.map(function (type) { return type.key; }),
58
60
  },
59
61
  };
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,15 +10,18 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { cardLayoutEnum } from "../../../utils/enum";
14
- import { ContactProfileTheme1 } from "./ContactProfileTheme1";
15
- import { ContactProfileTheme2 } from "./ContactProfileTheme2";
16
- import { getColor } from "../../../app/scripts";
17
- import { colors } from "../../../utils/colors";
18
- export var ContactProfile = function (props) {
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.ContactProfile = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var ContactProfileTheme1_1 = require("./ContactProfileTheme1");
17
+ var ContactProfileTheme2_1 = require("./ContactProfileTheme2");
18
+ var scripts_1 = require("../../../app/scripts");
19
+ var colors_1 = require("../../../utils/colors");
20
+ var enums_1 = require("../../../utils/enums");
21
+ var ContactProfile = function (props) {
19
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
20
- return (_jsxs("div", { children: [props.layout === cardLayoutEnum.horizontal ? (_jsx(ContactProfileTheme1, __assign({}, props))) : (_jsx(_Fragment, { children: _jsx(ContactProfileTheme2, __assign({}, props)) })), _jsx("style", { jsx: true, global: true, children: "\n .card_ContactProfile_title_color_".concat(props.id, " {\n color: ").concat(getColor((_a = props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color, colors === null || colors === void 0 ? void 0 : colors.default), ";\n }\n .card_ContactProfile_designation_color_").concat(props.id, " {\n color: ").concat(getColor((_b = props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color, colors.caption_color), ";\n }\n .card_shadow_ContactProfile_").concat(props.id, " {\n box-shadow: ").concat(((_c = props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
21
- ? "0px 4px 12px 0px ".concat(getColor((_d = props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color, "rgba(52, 52, 52, 0.15)"))
22
- : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_ContactProfile_").concat(props.id, " {\n background-color: ").concat(getColor((_e = props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color, colors.white), " !important;\n }\n .card_ContactProfile_btn_").concat(props.id, " {\n background-color: ").concat(getColor((_f = props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color, colors.gray), " !important;\n color: ").concat(getColor((_g = props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color, colors.neutral), " !important;\n fill: ").concat(getColor((_h = props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_text_color, colors.neutral), " !important;\n }\n .card_ContactProfile_btn_").concat(props.id, ":hover {\n background-color: ").concat(getColor((_j = props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_background_color, colors.gray), " !important;\n color: ").concat(getColor((_k = props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color, colors.neutral), " !important;\n fill: ").concat(getColor((_l = props.cardStyle) === null || _l === void 0 ? void 0 : _l.card_button_text_color, colors.neutral), " !important;\n }\n ") })] }));
23
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [props.layout === enums_1.OrientationEnum.horizontal ? ((0, jsx_runtime_1.jsx)(ContactProfileTheme1_1.ContactProfileTheme1, __assign({}, props))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(ContactProfileTheme2_1.ContactProfileTheme2, __assign({}, props)) })), (0, jsx_runtime_1.jsx)("style", { jsx: true, global: true, children: "\n .card_ContactProfile_title_color_".concat(props.id, " {\n color: ").concat((0, scripts_1.getColor)((_a = props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color, colors_1.colors === null || colors_1.colors === void 0 ? void 0 : colors_1.colors.default), ";\n }\n .card_ContactProfile_designation_color_").concat(props.id, " {\n color: ").concat((0, scripts_1.getColor)((_b = props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color, colors_1.colors.caption_color), ";\n }\n .card_shadow_ContactProfile_").concat(props.id, " {\n box-shadow: ").concat(((_c = props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
24
+ ? "0px 4px 12px 0px ".concat((0, scripts_1.getColor)((_d = props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color, "rgba(52, 52, 52, 0.15)"))
25
+ : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_ContactProfile_").concat(props.id, " {\n background-color: ").concat((0, scripts_1.getColor)((_e = props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color, colors_1.colors.white), " !important;\n }\n .card_ContactProfile_btn_").concat(props.id, " {\n background-color: ").concat((0, scripts_1.getColor)((_f = props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color, colors_1.colors.gray), " !important;\n color: ").concat((0, scripts_1.getColor)((_g = props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color, colors_1.colors.neutral), " !important;\n fill: ").concat((0, scripts_1.getColor)((_h = props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_text_color, colors_1.colors.neutral), " !important;\n }\n .card_ContactProfile_btn_").concat(props.id, ":hover {\n background-color: ").concat((0, scripts_1.getColor)((_j = props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_background_color, colors_1.colors.gray), " !important;\n color: ").concat((0, scripts_1.getColor)((_k = props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color, colors_1.colors.neutral), " !important;\n fill: ").concat((0, scripts_1.getColor)((_l = props.cardStyle) === null || _l === void 0 ? void 0 : _l.card_button_text_color, colors_1.colors.neutral), " !important;\n }\n ") })] }));
23
26
  };
27
+ exports.ContactProfile = ContactProfile;
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from "../../../components/Button/Button";
3
- import { LuImage } from "../../../components/Images/LuImage";
4
- import { contentTypeEnum } from "../../../utils/enum";
5
- import Link from "next/link";
6
- import styles from "../card.module.css";
7
- export var ContactProfileTheme1 = function (props) {
8
- return (_jsxs("div", { className: "lu-pd-250 card_bg_ContactProfile_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id), children: [_jsxs("div", { className: "flex gap-x-5", children: [_jsx("div", { className: "max-w-[240px] overflow-hidden lu-aspect-square ".concat(styles.horizontal_card_image), children: _jsx(LuImage, { image: props.image, aspectRatio: "", width: 160, height: 160, className: "lu-border-rounded-full lu-height-100 object-cover", orientation: props.mediaPosition }) }), _jsx("div", { className: "flex flex-1 flex-col", children: _jsxs("div", { className: "flex flex-col justify-center flex-1 lu-height-100", children: [_jsx("div", { className: "card_ContactProfile_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(styles.horizontal_card_heading), children: props.heading }), _jsx("p", { className: "lu-base-font-size lu-font-weight-extra-light card_ContactProfile_designation_color_".concat(props.id, " ").concat(styles.horizontal_body_text), children: props.body })] }) })] }), _jsx(Link, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: "card_ContactProfile_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 lu-mt-200 ".concat(styles.card_button, " card_ContactProfile_btn_").concat(props.id) }) })] }));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ContactProfileTheme1 = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var Button_1 = require("../../../components/Button/Button");
9
+ var LuImage_1 = require("../../../components/Images/LuImage");
10
+ var link_1 = __importDefault(require("next/link"));
11
+ var card_module_css_1 = __importDefault(require("../card.module.css"));
12
+ var enums_1 = require("../../../utils/enums");
13
+ var ContactProfileTheme1 = function (props) {
14
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "lu-pd-250 card_bg_ContactProfile_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex gap-x-5", children: [(0, jsx_runtime_1.jsx)("div", { className: "max-w-[240px] overflow-hidden lu-aspect-square ".concat(card_module_css_1.default.horizontal_card_image), children: (0, jsx_runtime_1.jsx)(LuImage_1.LuImage, { image: props.image, aspectRatio: "", width: 160, height: 160, className: "lu-border-rounded-full lu-height-100 object-cover", orientation: props.mediaPosition }) }), (0, jsx_runtime_1.jsx)("div", { className: "flex flex-1 flex-col", children: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-center flex-1 lu-height-100", children: [(0, jsx_runtime_1.jsx)("div", { className: "card_ContactProfile_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(card_module_css_1.default.horizontal_card_heading), children: props.heading }), (0, jsx_runtime_1.jsx)("p", { className: "lu-base-font-size lu-font-weight-extra-light card_ContactProfile_designation_color_".concat(props.id, " ").concat(card_module_css_1.default.horizontal_body_text), children: props.body })] }) })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.text_with_icon, label: props.btnLabel, variant: "card_ContactProfile_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 lu-mt-200 ".concat(card_module_css_1.default.card_button, " card_ContactProfile_btn_").concat(props.id) }) })] }));
15
+ };
16
+ exports.ContactProfileTheme1 = ContactProfileTheme1;
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from "../../../components/Button/Button";
3
- import { LuImage } from "../../../components/Images/LuImage";
4
- import { contentTypeEnum } from "../../../utils/enum";
5
- import Link from "next/link";
6
- import styles from "../card.module.css";
7
- export var ContactProfileTheme2 = function (props) {
8
- return (_jsxs("div", { className: "lu-pd-400 card_bg_ContactProfile_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id, " flex flex-col items-center"), children: [_jsx("div", { className: "max-w-[160px] overflow-hidden lu-aspect-square", children: _jsx(LuImage, { image: props.image, width: 160, height: 160, className: "lu-height-100 object-cover lu-border-rounded-full", orientation: props.mediaPosition }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [_jsx("div", { className: "card_ContactProfile_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(styles.vertical_card_heading), children: props.heading }), _jsx("p", { className: "lu-base-font-size lu-font-weight-extra-light card_ContactProfile_designation_color_".concat(props.id, " ").concat(styles.vertical_body_text), children: props.body })] }), _jsx(Link, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: "card_ContactProfile_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 card_ContactProfile_btn_".concat(props.id) }) })] }));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ContactProfileTheme2 = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var Button_1 = require("../../../components/Button/Button");
9
+ var LuImage_1 = require("../../../components/Images/LuImage");
10
+ var link_1 = __importDefault(require("next/link"));
11
+ var card_module_css_1 = __importDefault(require("../card.module.css"));
12
+ var enums_1 = require("../../../utils/enums");
13
+ var ContactProfileTheme2 = function (props) {
14
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "lu-pd-400 card_bg_ContactProfile_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_ContactProfile_").concat(props.id, " flex flex-col items-center"), children: [(0, jsx_runtime_1.jsx)("div", { className: "max-w-[160px] overflow-hidden lu-aspect-square", children: (0, jsx_runtime_1.jsx)(LuImage_1.LuImage, { image: props.image, width: 160, height: 160, className: "lu-height-100 object-cover lu-border-rounded-full", orientation: props.mediaPosition }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [(0, jsx_runtime_1.jsx)("div", { className: "card_ContactProfile_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(card_module_css_1.default.vertical_card_heading), children: props.heading }), (0, jsx_runtime_1.jsx)("p", { className: "lu-base-font-size lu-font-weight-extra-light card_ContactProfile_designation_color_".concat(props.id, " ").concat(card_module_css_1.default.vertical_body_text), children: props.body })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.text_with_icon, label: props.btnLabel, variant: "card_ContactProfile_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 card_ContactProfile_btn_".concat(props.id) }) })] }));
15
+ };
16
+ exports.ContactProfileTheme2 = ContactProfileTheme2;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -9,15 +10,18 @@ var __assign = (this && this.__assign) || function () {
9
10
  };
10
11
  return __assign.apply(this, arguments);
11
12
  };
12
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
- import { cardLayoutEnum } from "../../../utils/enum";
14
- import { colors } from "../../../utils/colors";
15
- import { ensureValue, getColor } from "../../../app/scripts";
16
- import { PostByCategoryTheme1 } from "./PostByCategoryTheme1";
17
- import { PostByCategoryTheme2 } from "./PostByCategoryTheme2";
18
- export var PostByCategory = function (props) {
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.PostByCategory = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var colors_1 = require("../../../utils/colors");
17
+ var scripts_1 = require("../../../app/scripts");
18
+ var PostByCategoryTheme1_1 = require("./PostByCategoryTheme1");
19
+ var PostByCategoryTheme2_1 = require("./PostByCategoryTheme2");
20
+ var enums_1 = require("../../../utils/enums");
21
+ var PostByCategory = function (props) {
19
22
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
20
- return (_jsxs("div", { children: [props.layout === cardLayoutEnum.horizontal ? (_jsx(PostByCategoryTheme1, __assign({}, props))) : (_jsx(_Fragment, { children: _jsx(PostByCategoryTheme2, __assign({}, props)) })), _jsx("style", { jsx: true, global: true, children: "\n .card_PostByCategory_title_color_".concat(props.id, " {\n color: ").concat(getColor((_a = props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color, colors === null || colors === void 0 ? void 0 : colors.default), ";\n }\n .card_PostByCategory_description_color_").concat(props.id, " {\n color: ").concat(getColor((_b = props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color, colors.caption_color), ";\n }\n .card_shadow_PostByCategory_").concat(props.id, " {\n box-shadow: ").concat(((_c = props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
21
- ? "0px 4px 12px 0px ".concat(getColor((_d = props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color, "rgba(52, 52, 52, 0.15)"))
22
- : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_PostByCategory_").concat(props.id, " {\n background-color: ").concat(getColor((_e = props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color, colors.white), " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, " {\n background-color: ").concat(getColor((_f = props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color, colors.gray), " !important;\n color: ").concat(getColor((_g = props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color, colors.neutral), " !important;\n fill: ").concat(getColor((_h = props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_text_color, colors.neutral), " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, ":hover {\n background-color: ").concat(getColor((_j = props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_background_color, colors.gray), " !important;\n color: ").concat(getColor((_k = props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color, colors.neutral), " !important;\n fill: ").concat(getColor((_l = props.cardStyle) === null || _l === void 0 ? void 0 : _l.card_button_text_color, colors.neutral), " !important;\n }\n .card_PostByCategory_theme2_image_").concat(props === null || props === void 0 ? void 0 : props.id, " {\n border-color: ").concat(getColor((_m = props.cardStyle) === null || _m === void 0 ? void 0 : _m.card_image_border_color, colors === null || colors === void 0 ? void 0 : colors.default), " !important;\n border-radius: ").concat(ensureValue((_o = props.cardStyle) === null || _o === void 0 ? void 0 : _o.card_image_border_radius, "0"), "%;\n border: ").concat(ensureValue((_p = props.cardStyle) === null || _p === void 0 ? void 0 : _p.card_image_border, "0"), "px\n solid;\n }\n ") })] }));
23
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [props.layout === enums_1.OrientationEnum.horizontal ? ((0, jsx_runtime_1.jsx)(PostByCategoryTheme1_1.PostByCategoryTheme1, __assign({}, props))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(PostByCategoryTheme2_1.PostByCategoryTheme2, __assign({}, props)) })), (0, jsx_runtime_1.jsx)("style", { jsx: true, global: true, children: "\n .card_PostByCategory_title_color_".concat(props.id, " {\n color: ").concat((0, scripts_1.getColor)((_a = props.cardStyle) === null || _a === void 0 ? void 0 : _a.card_title_color, colors_1.colors === null || colors_1.colors === void 0 ? void 0 : colors_1.colors.default), ";\n }\n .card_PostByCategory_description_color_").concat(props.id, " {\n color: ").concat((0, scripts_1.getColor)((_b = props.cardStyle) === null || _b === void 0 ? void 0 : _b.card_description_color, colors_1.colors.caption_color), ";\n }\n .card_shadow_PostByCategory_").concat(props.id, " {\n box-shadow: ").concat(((_c = props.cardStyle) === null || _c === void 0 ? void 0 : _c.card_shadow_toggle) === 1
24
+ ? "0px 4px 12px 0px ".concat((0, scripts_1.getColor)((_d = props.cardStyle) === null || _d === void 0 ? void 0 : _d.card_shadow_color, "rgba(52, 52, 52, 0.15)"))
25
+ : "0px 4px 12px 0px rgba(52, 52, 52, 0.15)", ";\n }\n .card_bg_PostByCategory_").concat(props.id, " {\n background-color: ").concat((0, scripts_1.getColor)((_e = props.cardStyle) === null || _e === void 0 ? void 0 : _e.card_background_color, colors_1.colors.white), " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, " {\n background-color: ").concat((0, scripts_1.getColor)((_f = props.cardStyle) === null || _f === void 0 ? void 0 : _f.card_button_background_color, colors_1.colors.gray), " !important;\n color: ").concat((0, scripts_1.getColor)((_g = props.cardStyle) === null || _g === void 0 ? void 0 : _g.card_button_text_color, colors_1.colors.neutral), " !important;\n fill: ").concat((0, scripts_1.getColor)((_h = props.cardStyle) === null || _h === void 0 ? void 0 : _h.card_button_text_color, colors_1.colors.neutral), " !important;\n }\n .card_PostByCategory_btn_").concat(props.id, ":hover {\n background-color: ").concat((0, scripts_1.getColor)((_j = props.cardStyle) === null || _j === void 0 ? void 0 : _j.card_button_background_color, colors_1.colors.gray), " !important;\n color: ").concat((0, scripts_1.getColor)((_k = props.cardStyle) === null || _k === void 0 ? void 0 : _k.card_button_text_color, colors_1.colors.neutral), " !important;\n fill: ").concat((0, scripts_1.getColor)((_l = props.cardStyle) === null || _l === void 0 ? void 0 : _l.card_button_text_color, colors_1.colors.neutral), " !important;\n }\n .card_PostByCategory_theme2_image_").concat(props === null || props === void 0 ? void 0 : props.id, " {\n border-color: ").concat((0, scripts_1.getColor)((_m = props.cardStyle) === null || _m === void 0 ? void 0 : _m.card_image_border_color, colors_1.colors === null || colors_1.colors === void 0 ? void 0 : colors_1.colors.default), " !important;\n border-radius: ").concat((0, scripts_1.ensureValue)((_o = props.cardStyle) === null || _o === void 0 ? void 0 : _o.card_image_border_radius, "0"), "%;\n border: ").concat((0, scripts_1.ensureValue)((_p = props.cardStyle) === null || _p === void 0 ? void 0 : _p.card_image_border, "0"), "px\n solid;\n }\n ") })] }));
23
26
  };
27
+ exports.PostByCategory = PostByCategory;
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LuImage } from "../../../components/Images/LuImage";
3
- import Link from "next/link";
4
- import { Button } from "../../../components/Button/Button";
5
- import { contentTypeEnum } from "../../../utils/enum";
6
- import styles from "../card.module.css";
7
- export var PostByCategoryTheme1 = function (props) {
8
- return (_jsxs("div", { className: "lu-pd-250 card_bg_PostByCategory_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_PostByCategory_").concat(props.id, " flex gap-x-[20px] lu-width-100"), children: [_jsx("div", { className: "lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square horizontal_card_image", children: _jsx(LuImage, { image: props.image, width: 240, height: 240, className: "lu-border-rounded-lg lu-width-100 lu-height-100 object-cover", orientation: props.mediaPosition }) }), _jsxs("div", { className: "flex flex-1 flex-col", children: [_jsxs("div", { className: "flex flex-col justify-center flex-1 h-full", children: [_jsx("div", { className: "card_PostByCategory_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(styles.horizontal_card_heading), children: props.heading }), _jsx("p", { className: "card_PostByCategory_description_color_".concat(props.id, " lu-base-font-size lu-font-weight-extra-light ").concat(styles.horizontal_body_text), children: props.body })] }), _jsx(Link, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: "card_PostByCategory_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 ".concat(styles.card_button, " card_PostByCategory_btn_").concat(props.id) }) })] })] }));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PostByCategoryTheme1 = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var LuImage_1 = require("../../../components/Images/LuImage");
9
+ var link_1 = __importDefault(require("next/link"));
10
+ var Button_1 = require("../../../components/Button/Button");
11
+ var card_module_css_1 = __importDefault(require("../card.module.css"));
12
+ var enums_1 = require("../../../utils/enums");
13
+ var PostByCategoryTheme1 = function (props) {
14
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "lu-pd-250 card_bg_PostByCategory_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_PostByCategory_").concat(props.id, " flex gap-x-[20px] lu-width-100"), children: [(0, jsx_runtime_1.jsx)("div", { className: "lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square horizontal_card_image", children: (0, jsx_runtime_1.jsx)(LuImage_1.LuImage, { image: props.image, width: 240, height: 240, className: "lu-border-rounded-lg lu-width-100 lu-height-100 object-cover", orientation: props.mediaPosition }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-1 flex-col", children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col justify-center flex-1 h-full", children: [(0, jsx_runtime_1.jsx)("div", { className: "card_PostByCategory_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(card_module_css_1.default.horizontal_card_heading), children: props.heading }), (0, jsx_runtime_1.jsx)("p", { className: "card_PostByCategory_description_color_".concat(props.id, " lu-base-font-size lu-font-weight-extra-light ").concat(card_module_css_1.default.horizontal_body_text), children: props.body })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.text_with_icon, label: props.btnLabel, variant: "card_PostByCategory_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 ".concat(card_module_css_1.default.card_button, " card_PostByCategory_btn_").concat(props.id) }) })] })] }));
15
+ };
16
+ exports.PostByCategoryTheme1 = PostByCategoryTheme1;
@@ -1,9 +1,16 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { LuImage } from "../../../components/Images/LuImage";
3
- import Link from "next/link";
4
- import { Button } from "../../../components/Button/Button";
5
- import { contentTypeEnum } from "../../../utils/enum";
6
- import styles from "../card.module.css";
7
- export var PostByCategoryTheme2 = function (props) {
8
- return (_jsxs("div", { className: "lu-pd-400 card_bg_PostByCategory_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_PostByCategory_").concat(props.id, " flex flex-col items-center lu-width-100"), children: [_jsx("div", { className: "lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square", children: _jsx(LuImage, { image: props.image, width: 240, height: 240, className: "lu-width-100 lu-height-100 object-cover card_PostByCategory_theme2_image_".concat(props === null || props === void 0 ? void 0 : props.id), orientation: props.mediaPosition }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [_jsx("div", { className: "card_PostByCategory_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(styles.vertical_card_heading), children: props.heading }), _jsx("p", { className: "card_PostByCategory_description_color_".concat(props.id, " lu-base-font-size lu-font-weight-extra-light ").concat(styles.vertical_body_text), children: props.body })] }), _jsx(Link, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: "card_PostByCategory_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 card_PostByCategory_btn_".concat(props.id) }) })] }));
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
4
  };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PostByCategoryTheme2 = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var LuImage_1 = require("../../../components/Images/LuImage");
9
+ var link_1 = __importDefault(require("next/link"));
10
+ var Button_1 = require("../../../components/Button/Button");
11
+ var card_module_css_1 = __importDefault(require("../card.module.css"));
12
+ var enums_1 = require("../../../utils/enums");
13
+ var PostByCategoryTheme2 = function (props) {
14
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "lu-pd-400 card_bg_PostByCategory_".concat(props.id, " lu-border-rounded-xl ").concat(props.className, " card_shadow_PostByCategory_").concat(props.id, " flex flex-col items-center lu-width-100"), children: [(0, jsx_runtime_1.jsx)("div", { className: "lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square", children: (0, jsx_runtime_1.jsx)(LuImage_1.LuImage, { image: props.image, width: 240, height: 240, className: "lu-width-100 lu-height-100 object-cover card_PostByCategory_theme2_image_".concat(props === null || props === void 0 ? void 0 : props.id), orientation: props.mediaPosition }) }), (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [(0, jsx_runtime_1.jsx)("div", { className: "card_PostByCategory_title_color_".concat(props.id, " lu-font-size-2x-large lu-font-weight-semibold ").concat(card_module_css_1.default.vertical_card_heading), children: props.heading }), (0, jsx_runtime_1.jsx)("p", { className: "card_PostByCategory_description_color_".concat(props.id, " lu-base-font-size lu-font-weight-extra-light ").concat(card_module_css_1.default.vertical_body_text), children: props.body })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: props.href || "", className: "lu-width-100 lu-text-decoration-none", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { contentType: enums_1.ContentType.text_with_icon, label: props.btnLabel, variant: "card_PostByCategory_btn_".concat(props.id), iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 card_PostByCategory_btn_".concat(props.id) }) })] }));
15
+ };
16
+ exports.PostByCategoryTheme2 = PostByCategoryTheme2;