linkedunion-design-kit 1.2.4 → 1.2.6
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/app/layout.d.ts +1 -1
- package/dist/app/layout.jsx +13 -0
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +71 -0
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Avatar/Avatar.jsx +15 -0
- package/dist/components/Avatar/Avatar.stories.jsx +25 -0
- package/dist/components/Border/BorderRadius/BorderRadius.d.ts +1 -1
- package/dist/components/Border/BorderRadius/BorderRadius.jsx +12 -0
- package/dist/components/Border/BorderRadius/BorderRadius.stories.jsx +17 -0
- package/dist/components/Border/BorderRadius/BorderRadiusTable.d.ts +1 -1
- package/dist/components/Border/BorderRadius/BorderRadiusTable.jsx +61 -0
- package/dist/components/Border/BorderRadius/BorderRadiusView.d.ts +1 -1
- package/dist/components/Border/BorderRadius/BorderRadiusView.jsx +8 -0
- package/dist/components/Border/BorderWidth/BorderWidth.d.ts +1 -1
- package/dist/components/Border/BorderWidth/BorderWidth.jsx +12 -0
- package/dist/components/Border/BorderWidth/BorderWidth.stories.jsx +17 -0
- package/dist/components/Border/BorderWidth/BorderWidthTable.d.ts +1 -1
- package/dist/components/Border/BorderWidth/BorderWidthTable.jsx +36 -0
- package/dist/components/Border/BorderWidth/ViewBorderWidth.d.ts +1 -1
- package/dist/components/Border/BorderWidth/ViewBorderWidth.jsx +8 -0
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.jsx +16 -0
- package/dist/components/Button/Button.stories.jsx +110 -0
- package/dist/components/Color/BackgroundColor/Color.d.ts +2 -1
- package/dist/components/Color/BackgroundColor/Color.jsx +16 -0
- package/dist/components/Color/BackgroundColor/Color.stories.jsx +76 -0
- package/dist/components/Color/TextColor.d.ts +1 -1
- package/dist/components/Color/TextColor.jsx +6 -0
- package/dist/components/Color/TextColor.stories.jsx +17 -0
- package/dist/components/Icons/IconView.d.ts +1 -1
- package/dist/components/Icons/IconView.jsx +23 -0
- package/dist/components/Icons/IconView.stories.jsx +8 -0
- package/dist/components/Icons/LUIcon.d.ts +1 -1
- package/dist/components/Icons/LUIcon.jsx +20 -0
- package/dist/components/Icons/LUIcon.stories.jsx +29 -0
- package/dist/components/Images/LuImage.d.ts +1 -1
- package/dist/components/Images/LuImage.jsx +7 -0
- package/dist/components/Images/LuImage.stories.jsx +39 -0
- package/dist/components/MediaCard/Card.d.ts +1 -1
- package/dist/components/MediaCard/Card.jsx +33 -0
- package/dist/components/MediaCard/Card.stories.js +1 -0
- package/dist/components/MediaCard/Card.stories.jsx +34 -0
- package/dist/components/MediaCard/ContactProfile.d.ts +1 -1
- package/dist/components/MediaCard/ContactProfile.jsx +39 -0
- package/dist/components/MediaCard/PostByCategory.d.ts +1 -1
- package/dist/components/MediaCard/PostByCategory.js +2 -2
- package/dist/components/MediaCard/PostByCategory.jsx +38 -0
- package/dist/components/Navigation/TopNavigation/TopNavigation.d.ts +1 -1
- package/dist/components/Navigation/TopNavigation/TopNavigation.jsx +45 -0
- package/dist/components/Navigation/TopNavigation/TopNavigation.stories.jsx +40 -0
- package/dist/components/Size/MinWidthHeight.d.ts +1 -1
- package/dist/components/Size/MinWidthHeight.jsx +8 -0
- package/dist/components/Size/MinWidthHeight.stories.jsx +22 -0
- package/dist/components/Size/Size.d.ts +1 -1
- package/dist/components/Size/Size.jsx +6 -0
- package/dist/components/Size/Size.stories.jsx +22 -0
- package/dist/components/Size/WidthHeight.d.ts +1 -1
- package/dist/components/Size/WidthHeight.jsx +8 -0
- package/dist/components/Size/WidthHeight.stories.jsx +22 -0
- package/dist/components/Spacing/Margin/Margin.d.ts +1 -1
- package/dist/components/Spacing/Margin/Margin.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginBottom.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginBottom.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginLeft.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginLeft.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginRight.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginRight.jsx +86 -0
- package/dist/components/Spacing/Margin/MarginToken.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginToken.jsx +27 -0
- package/dist/components/Spacing/Margin/MarginToken.stories.jsx +7 -0
- package/dist/components/Spacing/Margin/MarginTop.d.ts +1 -1
- package/dist/components/Spacing/Margin/MarginTop.jsx +87 -0
- package/dist/components/Spacing/Padding/Padding.d.ts +1 -1
- package/dist/components/Spacing/Padding/Padding.jsx +87 -0
- package/dist/components/Spacing/Padding/PaddingBottom.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingBottom.jsx +86 -0
- package/dist/components/Spacing/Padding/PaddingLeft.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingLeft.jsx +86 -0
- package/dist/components/Spacing/Padding/PaddingRight.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingRight.jsx +87 -0
- package/dist/components/Spacing/Padding/PaddingToken.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingToken.jsx +27 -0
- package/dist/components/Spacing/Padding/PaddingToken.stories.jsx +7 -0
- package/dist/components/Spacing/Padding/PaddingTop.d.ts +1 -1
- package/dist/components/Spacing/Padding/PaddingTop.jsx +87 -0
- package/dist/components/Typography/Headings/Headings.d.ts +1 -1
- package/dist/components/Typography/Headings/Headings.jsx +6 -0
- package/dist/components/Typography/Headings/Headings.stories.jsx +19 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.jsx +8 -0
- package/dist/components/Typography/Typography.stories.jsx +51 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const IconView: () => import("react
|
|
1
|
+
export declare const IconView: () => import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { iconList } from "../../utils/iconList";
|
|
2
|
+
export var IconView = function () {
|
|
3
|
+
return (<>
|
|
4
|
+
<div className="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 lg:grid-cols-6 gap-6" data-testid="icons-list">
|
|
5
|
+
{iconList.map(function (icon, index) {
|
|
6
|
+
return (<div key={index} className="flex flex-col items-center justify-center bg-gray-100 lu-border-rounded-lg lu-pd-200 shadow-md hover:bg-gray-200" data-testid="single-icon">
|
|
7
|
+
<svg width="25" height="25" viewBox="0 0 32 32" fill="none" className="mb-2" role="img">
|
|
8
|
+
<g clipPath="url(#clip0_9168_14965)">
|
|
9
|
+
<path d={icon === null || icon === void 0 ? void 0 : icon.path} fill="#070808"/>
|
|
10
|
+
</g>
|
|
11
|
+
<defs>
|
|
12
|
+
<clipPath id="clip0_9168_14965">
|
|
13
|
+
<rect width="32" height="32" fill="black"/>
|
|
14
|
+
</clipPath>
|
|
15
|
+
</defs>
|
|
16
|
+
</svg>
|
|
17
|
+
<p className="lu-font-size-x-small lu-font-weight-regular lu-text-gray text-center">{icon === null || icon === void 0 ? void 0 : icon.label}</p>
|
|
18
|
+
</div>);
|
|
19
|
+
})}
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
</>);
|
|
23
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "@/types/interface";
|
|
2
|
-
export declare const LUIcon: ({ size, fill, icon, className }: IconProps) => import("react
|
|
2
|
+
export declare const LUIcon: ({ size, fill, icon, className }: IconProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { iconList } from "../../utils/iconList";
|
|
2
|
+
export var LUIcon = function (_a) {
|
|
3
|
+
var _b;
|
|
4
|
+
var size = _a.size, fill = _a.fill, icon = _a.icon, className = _a.className;
|
|
5
|
+
var selectedIcon = iconList.find(function (item) { return item.key === icon; });
|
|
6
|
+
return (<>
|
|
7
|
+
{/* <div data-testid="single-icon"> */}
|
|
8
|
+
<svg className={"".concat(size, " ").concat(className)} viewBox="0 0 32 32" fill="none">
|
|
9
|
+
<g clip-path="url(#clip0_9168_14965)">
|
|
10
|
+
<path d={(_b = selectedIcon === null || selectedIcon === void 0 ? void 0 : selectedIcon.path) !== null && _b !== void 0 ? _b : ''} className={"".concat(fill, " icon")}/>
|
|
11
|
+
</g>
|
|
12
|
+
<defs>
|
|
13
|
+
<clipPath id="clip0_9168_14965">
|
|
14
|
+
<rect width="32" height="32" fill="black"/>
|
|
15
|
+
</clipPath>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>
|
|
18
|
+
{/* </div> */}
|
|
19
|
+
</>);
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { LUIcon } from "./LUIcon";
|
|
2
|
+
import { iconColorList, iconSizeList } from "../../utils";
|
|
3
|
+
import { iconList } from "../../utils/iconList";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Icon",
|
|
6
|
+
component: LUIcon,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
};
|
|
9
|
+
var Template = function (args) { return <LUIcon {...args}/>; };
|
|
10
|
+
export var icon = Template.bind({});
|
|
11
|
+
icon.args = {
|
|
12
|
+
size: 'lu-icon-x-small',
|
|
13
|
+
fill: 'lu-primary-icon-default',
|
|
14
|
+
icon: iconList[0].key,
|
|
15
|
+
};
|
|
16
|
+
icon.argTypes = {
|
|
17
|
+
size: {
|
|
18
|
+
control: { type: "select", labels: Object.fromEntries(iconSizeList.map(function (size) { return [size.key, size.label]; })) },
|
|
19
|
+
options: iconSizeList.map(function (size) { return size.key; }),
|
|
20
|
+
},
|
|
21
|
+
fill: {
|
|
22
|
+
control: { type: "select", labels: Object.fromEntries(iconColorList.map(function (color) { return [color.key, color.label]; })) },
|
|
23
|
+
options: iconColorList.map(function (color) { return color.key; }),
|
|
24
|
+
},
|
|
25
|
+
icon: {
|
|
26
|
+
control: { type: "select", labels: Object.fromEntries(iconList.map(function (icon) { return [icon.key, icon.label]; })) },
|
|
27
|
+
options: iconList.map(function (icon) { return icon.key; }),
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { AspectRatioProps } from "@/types/interface";
|
|
2
|
-
export declare const LuImage: ({ image, aspectRatio, width, height, className }: AspectRatioProps) => import("react
|
|
2
|
+
export declare const LuImage: ({ image, aspectRatio, width, height, className }: AspectRatioProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Image from "next/image";
|
|
2
|
+
export var LuImage = function (_a) {
|
|
3
|
+
var image = _a.image, aspectRatio = _a.aspectRatio, _b = _a.width, width = _b === void 0 ? 240 : _b, _c = _a.height, height = _c === void 0 ? 240 : _c, className = _a.className;
|
|
4
|
+
return (<Image src={image || ''} alt="Image" width={width} height={height} // Specify the height to maintain aspect ratio
|
|
5
|
+
className={"".concat(aspectRatio, " ").concat(className)} // Apply aspect ratio and additional classes
|
|
6
|
+
/>);
|
|
7
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LuImage } from "./LuImage";
|
|
2
|
+
import { landscapeaspectRatioList, portraitaspectRatioList } from "../../utils";
|
|
3
|
+
import { orientationEnum } from "../../utils/enum";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Image",
|
|
6
|
+
component: LuImage,
|
|
7
|
+
};
|
|
8
|
+
var Template = function (args, _a) {
|
|
9
|
+
var argTypes = _a.argTypes;
|
|
10
|
+
//Show aspectRatio options based on orientation(landscape)
|
|
11
|
+
var isLandscape = args.orientation === orientationEnum.landscape;
|
|
12
|
+
argTypes.aspectRatio.options = isLandscape ? landscapeaspectRatioList.map(function (ratio) { return ratio.key; }) : portraitaspectRatioList.map(function (ratio) { return ratio.key; });
|
|
13
|
+
argTypes.aspectRatio.control.labels = Object.fromEntries((isLandscape ? landscapeaspectRatioList : portraitaspectRatioList).map(function (ratio) { return [
|
|
14
|
+
ratio.key,
|
|
15
|
+
ratio.label,
|
|
16
|
+
]; }));
|
|
17
|
+
return <LuImage {...args}/>;
|
|
18
|
+
};
|
|
19
|
+
export var image = Template.bind({});
|
|
20
|
+
image.args = {
|
|
21
|
+
image: '/images/demo-image.jpg',
|
|
22
|
+
orientation: orientationEnum.portrait,
|
|
23
|
+
aspectRatio: portraitaspectRatioList[0].key,
|
|
24
|
+
width: 240,
|
|
25
|
+
height: 240,
|
|
26
|
+
className: ''
|
|
27
|
+
};
|
|
28
|
+
image.argTypes = {
|
|
29
|
+
orientation: {
|
|
30
|
+
control: { type: "select" },
|
|
31
|
+
options: [orientationEnum.portrait, orientationEnum.landscape],
|
|
32
|
+
},
|
|
33
|
+
//Show Default aspectRatio options for portrait orientation
|
|
34
|
+
aspectRatio: {
|
|
35
|
+
control: { type: "select" },
|
|
36
|
+
options: portraitaspectRatioList.map(function (ratio) { return ratio.key; }),
|
|
37
|
+
labels: Object.fromEntries(portraitaspectRatioList.map(function (ratio) { return [ratio.key, ratio.label]; })),
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from "@/types/interface";
|
|
2
|
-
export declare const Card: ({ type, ...defaultCardProps }: CardProps) => import("react
|
|
2
|
+
export declare const Card: ({ type, ...defaultCardProps }: CardProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { sectionType } from "../../utils/enum";
|
|
24
|
+
import { PostByCategory } from "./PostByCategory";
|
|
25
|
+
import { ContactProfile } from "./ContactProfile";
|
|
26
|
+
export var Card = function (_a) {
|
|
27
|
+
var _b = _a.type, type = _b === void 0 ? sectionType.postByCategoriesTheme : _b, defaultCardProps = __rest(_a, ["type"]);
|
|
28
|
+
var data = __assign({ type: type }, defaultCardProps);
|
|
29
|
+
return (<>
|
|
30
|
+
{type === sectionType.postByCategoriesTheme && <PostByCategory {...data}/>}
|
|
31
|
+
{type === sectionType.contactsProfileTheme && <ContactProfile {...data}/>}
|
|
32
|
+
</>);
|
|
33
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Card } from "./Card";
|
|
2
|
+
import { cardLayoutEnum, orientationEnum, sectionType } from "../../utils/enum";
|
|
3
|
+
import { sectionTypeList } from "../../utils";
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Card",
|
|
6
|
+
component: Card,
|
|
7
|
+
};
|
|
8
|
+
var Template = function (args) { return <Card {...args}/>; };
|
|
9
|
+
export var card = Template.bind({});
|
|
10
|
+
card.args = {
|
|
11
|
+
type: sectionType.postByCategoriesTheme,
|
|
12
|
+
image: '/images/demo-image.jpg',
|
|
13
|
+
heading: 'Heading Text',
|
|
14
|
+
body: 'The quick brown fox jumps over the lazy dog.',
|
|
15
|
+
mediaPosition: orientationEnum.landscape,
|
|
16
|
+
layout: cardLayoutEnum.horizontal,
|
|
17
|
+
btnLabel: 'View More',
|
|
18
|
+
href: 'https://www.google.com/',
|
|
19
|
+
card_title_color: 'lu-text-default'
|
|
20
|
+
};
|
|
21
|
+
card.argTypes = {
|
|
22
|
+
mediaPosition: {
|
|
23
|
+
control: { type: "select" },
|
|
24
|
+
options: [orientationEnum.portrait, orientationEnum.landscape],
|
|
25
|
+
},
|
|
26
|
+
layout: {
|
|
27
|
+
control: { type: "select" },
|
|
28
|
+
options: [cardLayoutEnum.horizontal, cardLayoutEnum.vertical],
|
|
29
|
+
},
|
|
30
|
+
type: {
|
|
31
|
+
control: { type: "select", labels: Object.fromEntries(sectionTypeList.map(function (type) { return [type.key, type.label]; })) },
|
|
32
|
+
options: sectionTypeList.map(function (type) { return type.key; }),
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from "@/types/interface";
|
|
2
|
-
export declare const ContactProfile: (props: CardProps) => import("react
|
|
2
|
+
export declare const ContactProfile: (props: CardProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cardLayoutEnum, contentTypeEnum } from "../../utils/enum";
|
|
2
|
+
import { LuImage } from "../Images/LuImage";
|
|
3
|
+
import { Button } from "../Button/Button";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
export var ContactProfile = function (props) {
|
|
6
|
+
return (<>
|
|
7
|
+
{props.layout === cardLayoutEnum.horizontal ?
|
|
8
|
+
<div className="lu-pd-250 bg-white lu-border-rounded-xl ${props.className} lu-shadow-md">
|
|
9
|
+
<div className={"flex gap-x-5"}>
|
|
10
|
+
<div className="max-w-[240px] overflow-hidden lu-aspect-square horizontal_card_image">
|
|
11
|
+
<LuImage image={props.image} aspectRatio="" width={160} height={160} className="lu-border-rounded-full lu-height-100 object-cover" orientation={props.mediaPosition}/>
|
|
12
|
+
</div>
|
|
13
|
+
<div className="flex flex-1 flex-col">
|
|
14
|
+
<div className={"flex flex-col justify-center flex-1 h-full"}>
|
|
15
|
+
<div className={"lu-text-default lu-font-size-2x-large lu-font-weight-semibold horizontal_card_heading"}>{props.heading}</div>
|
|
16
|
+
<p className={"lu-base-font-size lu-font-weight-extra-light lu-text-caption horizontal_body_text"}>{props.body}</p>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
<Link href={props.href || ''} className="lu-width-100">
|
|
21
|
+
<Button contentType={contentTypeEnum.text_with_icon} label={props.btnLabel} variant='lu-btn-gray' iconRight="angle-right" rightIconSize="lu-icon-small" size="lu-btn-lg" className="lu-border-rounded-sm justify-between lu-width-100 lu-mt-200 card_button"/>
|
|
22
|
+
</Link>
|
|
23
|
+
</div>
|
|
24
|
+
: (<>
|
|
25
|
+
<div className={"lu-pd-400 bg-white lu-border-rounded-xl ".concat(props.className, " lu-shadow-md flex flex-col items-center")}>
|
|
26
|
+
<div className="max-w-[160px] overflow-hidden lu-aspect-square">
|
|
27
|
+
<LuImage image={props.image} width={160} height={160} className="lu-height-100 object-cover lu-border-rounded-full" orientation={props.mediaPosition}/>
|
|
28
|
+
</div>
|
|
29
|
+
<div className={"flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]"}>
|
|
30
|
+
<div className={"lu-text-default lu-font-size-2x-large lu-font-weight-semibold vertical_card_heading"}>{props.heading}</div>
|
|
31
|
+
<p className="lu-base-font-size lu-font-weight-extra-light lu-text-caption vertical_body_text">{props.body}</p>
|
|
32
|
+
</div>
|
|
33
|
+
<Link href={props.href || ''} className="lu-width-100">
|
|
34
|
+
<Button contentType={contentTypeEnum.text_with_icon} label={props.btnLabel} variant='lu-btn-gray' iconRight="angle-right" rightIconSize="lu-icon-small" size="lu-btn-lg" className="lu-border-rounded-sm justify-between lu-width-100"/>
|
|
35
|
+
</Link>
|
|
36
|
+
</div>
|
|
37
|
+
</>)}
|
|
38
|
+
</>);
|
|
39
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardProps } from "@/types/interface";
|
|
2
|
-
export declare const PostByCategory: (props: CardProps) => import("react
|
|
2
|
+
export declare const PostByCategory: (props: CardProps) => import("react").JSX.Element;
|
|
@@ -5,6 +5,6 @@ import { Button } from "../Button/Button";
|
|
|
5
5
|
import Link from "next/link";
|
|
6
6
|
export var PostByCategory = function (props) {
|
|
7
7
|
return (_jsx(_Fragment, { children: (props === null || props === void 0 ? void 0 : props.layout) === cardLayoutEnum.horizontal ?
|
|
8
|
-
_jsxs("div", { className: "lu-pd-250 bg-white lu-border-rounded-xl ".concat(props === null || props === void 0 ? void 0 : props.className, " lu-shadow-md 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 === null || props === void 0 ? void 0 : props.image, aspectRatio: "", width: 240, height: 240, className: "lu-border-rounded-lg lu-width-100 lu-height-100 object-cover", orientation: props === null || props === void 0 ? void 0 : 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: "
|
|
9
|
-
: (_jsx(_Fragment, { children: _jsxs("div", { className: "lu-pd-400 bg-white lu-border-rounded-xl ".concat(props.className, " lu-shadow-md 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", orientation: props.mediaPosition }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [_jsx("div", { className: "
|
|
8
|
+
_jsxs("div", { className: "lu-pd-250 bg-white lu-border-rounded-xl ".concat(props === null || props === void 0 ? void 0 : props.className, " lu-shadow-md 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 === null || props === void 0 ? void 0 : props.image, aspectRatio: "", width: 240, height: 240, className: "lu-border-rounded-lg lu-width-100 lu-height-100 object-cover", orientation: props === null || props === void 0 ? void 0 : 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: "".concat(props.card_title_color, " lu-font-size-2x-large lu-font-weight-semibold horizontal_card_heading"), children: props === null || props === void 0 ? void 0 : props.heading }), _jsx("p", { className: "lu-base-font-size lu-font-weight-extra-light horizontal_body_text lu-text-caption", children: props === null || props === void 0 ? void 0 : props.body })] }), _jsx(Link, { href: props.href || '', className: "lu-width-100", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: 'lu-btn-gray', iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100 card_button" }) })] })] })
|
|
9
|
+
: (_jsx(_Fragment, { children: _jsxs("div", { className: "lu-pd-400 bg-white lu-border-rounded-xl ".concat(props.className, " lu-shadow-md 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", orientation: props.mediaPosition }) }), _jsxs("div", { className: "flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]", children: [_jsx("div", { className: "".concat(props.card_title_color, " lu-font-size-2x-large lu-font-weight-semibold vertical_card_heading"), children: props.heading }), _jsx("p", { className: "lu-base-font-size lu-font-weight-extra-light lu-text-caption vertical_body_text", children: props.body })] }), _jsx(Link, { href: props.href || '', className: "lu-width-100", children: _jsx(Button, { contentType: contentTypeEnum.text_with_icon, label: props.btnLabel, variant: 'lu-btn-gray', iconRight: "angle-right", rightIconSize: "lu-icon-small", size: "lu-btn-lg", className: "lu-border-rounded-sm justify-between lu-width-100" }) })] }) })) }));
|
|
10
10
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cardLayoutEnum, contentTypeEnum } from "../../utils/enum";
|
|
2
|
+
import { LuImage } from "../Images/LuImage";
|
|
3
|
+
import { Button } from "../Button/Button";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
export var PostByCategory = function (props) {
|
|
6
|
+
var _a;
|
|
7
|
+
return (<>
|
|
8
|
+
{(props === null || props === void 0 ? void 0 : props.layout) === cardLayoutEnum.horizontal ?
|
|
9
|
+
<div className={"lu-pd-250 bg-white lu-border-rounded-xl ".concat(props === null || props === void 0 ? void 0 : props.className, " lu-shadow-md flex gap-x-[20px] lu-width-100")}>
|
|
10
|
+
<div className="lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square horizontal_card_image">
|
|
11
|
+
<LuImage image={props === null || props === void 0 ? void 0 : props.image} aspectRatio="" width={240} height={240} className="lu-border-rounded-lg lu-width-100 lu-height-100 object-cover" orientation={props === null || props === void 0 ? void 0 : props.mediaPosition}/>
|
|
12
|
+
</div>
|
|
13
|
+
<div className="flex flex-1 flex-col">
|
|
14
|
+
<div className={"flex flex-col justify-center flex-1 h-full"}>
|
|
15
|
+
<div className={"".concat((_a = props.card_title_color) !== null && _a !== void 0 ? _a : "text-[".concat(props.card_title_color, "]"), " lu-font-size-2x-large lu-font-weight-semibold horizontal_card_heading")}>{props === null || props === void 0 ? void 0 : props.heading}</div>
|
|
16
|
+
<p className={"lu-base-font-size lu-font-weight-extra-light horizontal_body_text lu-text-caption"}>{props === null || props === void 0 ? void 0 : props.body}</p>
|
|
17
|
+
</div>
|
|
18
|
+
<Link href={props.href || ''} className="lu-width-100">
|
|
19
|
+
<Button contentType={contentTypeEnum.text_with_icon} label={props.btnLabel} variant='lu-btn-gray' iconRight="angle-right" rightIconSize="lu-icon-small" size="lu-btn-lg" className="lu-border-rounded-sm justify-between lu-width-100 card_button"/>
|
|
20
|
+
</Link>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
: (<>
|
|
24
|
+
<div className={"lu-pd-400 bg-white lu-border-rounded-xl ".concat(props.className, " lu-shadow-md flex flex-col items-center lu-width-100")}>
|
|
25
|
+
<div className="lu-width-100 max-w-[240px] overflow-hidden lu-aspect-square">
|
|
26
|
+
<LuImage image={props.image} width={240} height={240} className="lu-width-100 lu-height-100 object-cover" orientation={props.mediaPosition}/>
|
|
27
|
+
</div>
|
|
28
|
+
<div className={"flex flex-col items-center flex-grow lu-m-250 text-center h-[100px]"}>
|
|
29
|
+
<div className={"".concat(props.card_title_color, " lu-font-size-2x-large lu-font-weight-semibold vertical_card_heading")}>{props.heading}</div>
|
|
30
|
+
<p className="lu-base-font-size lu-font-weight-extra-light lu-text-caption vertical_body_text">{props.body}</p>
|
|
31
|
+
</div>
|
|
32
|
+
<Link href={props.href || ''} className="lu-width-100">
|
|
33
|
+
<Button contentType={contentTypeEnum.text_with_icon} label={props.btnLabel} variant='lu-btn-gray' iconRight="angle-right" rightIconSize="lu-icon-small" size="lu-btn-lg" className="lu-border-rounded-sm justify-between lu-width-100"/>
|
|
34
|
+
</Link>
|
|
35
|
+
</div>
|
|
36
|
+
</>)}
|
|
37
|
+
</>);
|
|
38
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { TopNavigationProps } from "@/types/interface";
|
|
2
|
-
export declare const TopNavigation: ({ phoneNumber, phoneNumber2, bannerText, facebookUrl, linkedinUrl, twitterUrl, instagramUrl, onClickPhoneNumber }: TopNavigationProps) => import("react
|
|
2
|
+
export declare const TopNavigation: ({ phoneNumber, phoneNumber2, bannerText, facebookUrl, linkedinUrl, twitterUrl, instagramUrl, onClickPhoneNumber }: TopNavigationProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LUIcon } from "../../../components/Icons/LUIcon";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
export var TopNavigation = function (_a) {
|
|
4
|
+
var phoneNumber = _a.phoneNumber, phoneNumber2 = _a.phoneNumber2, bannerText = _a.bannerText, facebookUrl = _a.facebookUrl, linkedinUrl = _a.linkedinUrl, twitterUrl = _a.twitterUrl, instagramUrl = _a.instagramUrl, onClickPhoneNumber = _a.onClickPhoneNumber;
|
|
5
|
+
return (<>
|
|
6
|
+
{(phoneNumber || phoneNumber2 || bannerText || facebookUrl || linkedinUrl || twitterUrl || instagramUrl) &&
|
|
7
|
+
<div className="lu-pr-050 lu-pl-050 bg-primary-600 lu-text-base">
|
|
8
|
+
{/* Contact number1 */}
|
|
9
|
+
<div className="flex justify-between items-center">
|
|
10
|
+
<div className="flex lu-pt-050 lu-pr-100 lu-pb-050 lu-pl-100 gap-3">
|
|
11
|
+
{phoneNumber && <div className="flex items-center gap-2 cursor-pointer" onClick={onClickPhoneNumber}>
|
|
12
|
+
<LUIcon fill="lu-neutral-icon-light" icon="phone" size="lu-icon-medium"/>
|
|
13
|
+
<div className="lu-font-size-small">{phoneNumber}</div>
|
|
14
|
+
</div>}
|
|
15
|
+
{phoneNumber && phoneNumber2 && <div className={"lu-border-width-0125 contact-border"}></div>}
|
|
16
|
+
|
|
17
|
+
{/* Contact number2 */}
|
|
18
|
+
{phoneNumber2 && <div className="flex items-center gap-2 main-navbar-contact cursor-pointer" onClick={onClickPhoneNumber}>
|
|
19
|
+
<LUIcon fill="lu-neutral-icon-light" icon="phone" size="lu-icon-medium"/>
|
|
20
|
+
<div className="lu-font-size-small">{phoneNumber2}</div>
|
|
21
|
+
</div>}
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
{/* banner text */}
|
|
25
|
+
{bannerText && <div className="lu-text-center lu-text-decoration-underline lu-font-weight-semibold lu-font-size-small promotional-banner-text">{bannerText}</div>}
|
|
26
|
+
|
|
27
|
+
{/* Social media links */}
|
|
28
|
+
<div className="flex gap-2">
|
|
29
|
+
{facebookUrl && <Link href={facebookUrl} target="_blank" aria-label="Facebook">
|
|
30
|
+
<LUIcon fill="lu-info-icon-light" icon={'facebook-f'} size="lu-icon-x-small" className="cursor-pointer"/>
|
|
31
|
+
</Link>}
|
|
32
|
+
{twitterUrl && <Link href={twitterUrl} target="_blank" aria-label="Twitter">
|
|
33
|
+
<LUIcon fill="lu-info-icon-light" icon={'x-twitter'} size="lu-icon-x-small" className="cursor-pointer"/>
|
|
34
|
+
</Link>}
|
|
35
|
+
{instagramUrl && <Link href={instagramUrl} target="_blank" aria-label="Instagram">
|
|
36
|
+
<LUIcon fill="lu-info-icon-light" icon={'instagram'} size="lu-icon-x-small" className="cursor-pointer"/>
|
|
37
|
+
</Link>}
|
|
38
|
+
{linkedinUrl && <Link href={linkedinUrl} target="_blank" aria-label="Linkedin">
|
|
39
|
+
<LUIcon fill="lu-info-icon-light" icon={'linkedin-in'} size="lu-icon-x-small" className="cursor-pointer"/>
|
|
40
|
+
</Link>}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>}
|
|
44
|
+
</>);
|
|
45
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TopNavigation } from "./TopNavigation";
|
|
2
|
+
export default {
|
|
3
|
+
title: "Components/Navigation/TopNavigation",
|
|
4
|
+
component: TopNavigation,
|
|
5
|
+
};
|
|
6
|
+
var Template = function (args) { return <TopNavigation {...args}/>; };
|
|
7
|
+
export var topNavigation = Template.bind({});
|
|
8
|
+
topNavigation.args = {
|
|
9
|
+
phoneNumber: '+1 (XXX) XXX-XXXX',
|
|
10
|
+
phoneNumber2: '+1 (XXX) XXX-XXXXX',
|
|
11
|
+
bannerText: 'Creative ideas often lead to innovative solutions in daily challenges.',
|
|
12
|
+
facebookUrl: 'https://www.facebook.com',
|
|
13
|
+
linkedinUrl: 'https://www.linkedin.com',
|
|
14
|
+
twitterUrl: 'https://www.twitter.com',
|
|
15
|
+
instagramUrl: 'https://www.instagram.com',
|
|
16
|
+
onClickPhoneNumber: function () { alert('clicked'); }
|
|
17
|
+
};
|
|
18
|
+
topNavigation.argTypes = {
|
|
19
|
+
phoneNumber: {
|
|
20
|
+
description: "Phone number 1",
|
|
21
|
+
},
|
|
22
|
+
phoneNumber2: {
|
|
23
|
+
description: "Phone number 2",
|
|
24
|
+
},
|
|
25
|
+
bannerText: {
|
|
26
|
+
description: "Promotional banner text",
|
|
27
|
+
},
|
|
28
|
+
facebookUrl: {
|
|
29
|
+
description: "Facebook URL",
|
|
30
|
+
},
|
|
31
|
+
linkedinUrl: {
|
|
32
|
+
description: "Instagram URL",
|
|
33
|
+
},
|
|
34
|
+
twitterUrl: {
|
|
35
|
+
description: "Twitter URL",
|
|
36
|
+
},
|
|
37
|
+
instagramUrl: {
|
|
38
|
+
description: "Instagram URL",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { MinWidthHeightProps } from "@/types/interface";
|
|
2
|
-
export declare const MinWidthHeight: ({ minWidth, minHeight }: MinWidthHeightProps) => import("react
|
|
2
|
+
export declare const MinWidthHeight: ({ minWidth, minHeight }: MinWidthHeightProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var MinWidthHeight = function (_a) {
|
|
2
|
+
var minWidth = _a.minWidth, minHeight = _a.minHeight;
|
|
3
|
+
return (<>
|
|
4
|
+
<div className="w-fit">
|
|
5
|
+
<div className={"bg-blue-500 ".concat(minWidth, " ").concat(minHeight, " rounded")} data-testid="minWidthHeight-box"></div>
|
|
6
|
+
</div>
|
|
7
|
+
</>);
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MinWidthHeight } from "../../components/Size/MinWidthHeight";
|
|
2
|
+
import { minHeights, minWidths } from "../../utils";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Size",
|
|
5
|
+
component: MinWidthHeight,
|
|
6
|
+
};
|
|
7
|
+
var Template = function (args) { return <MinWidthHeight {...args}/>; };
|
|
8
|
+
export var minWidthAndHeight = Template.bind({});
|
|
9
|
+
minWidthAndHeight.args = {
|
|
10
|
+
minWidth: 'lu-min-width-100',
|
|
11
|
+
minHeight: 'lu-min-height-100',
|
|
12
|
+
};
|
|
13
|
+
minWidthAndHeight.argTypes = {
|
|
14
|
+
minWidth: {
|
|
15
|
+
control: { type: "select", labels: Object.fromEntries(minWidths.map(function (size) { return [size.key, size.label]; })) },
|
|
16
|
+
options: minWidths.map(function (size) { return size.key; }),
|
|
17
|
+
},
|
|
18
|
+
minHeight: {
|
|
19
|
+
control: { type: "select", labels: Object.fromEntries(minHeights.map(function (size) { return [size.key, size.label]; })) },
|
|
20
|
+
options: minHeights.map(function (size) { return size.key; }),
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SizeProps } from "@/types/interface";
|
|
2
|
-
export declare const Size: ({ size, color }: SizeProps) => import("react
|
|
2
|
+
export declare const Size: ({ size, color }: SizeProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Size } from "../../components/Size/Size";
|
|
2
|
+
import { colorGroups, sizes } from "../../utils";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Size",
|
|
5
|
+
component: Size,
|
|
6
|
+
};
|
|
7
|
+
var Template = function (args) { return <Size {...args}/>; };
|
|
8
|
+
export var SizeStory = Template.bind({});
|
|
9
|
+
SizeStory.args = {
|
|
10
|
+
size: 'lu-size-400',
|
|
11
|
+
color: 'bg-primary-500',
|
|
12
|
+
};
|
|
13
|
+
SizeStory.argTypes = {
|
|
14
|
+
size: {
|
|
15
|
+
control: { type: "select", labels: Object.fromEntries(sizes.map(function (size) { return [size.key, size.label]; })) },
|
|
16
|
+
options: sizes.map(function (size) { return size.key; }),
|
|
17
|
+
},
|
|
18
|
+
color: {
|
|
19
|
+
control: { type: "select" },
|
|
20
|
+
options: colorGroups.primary,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { WidthHeightProps } from "@/types/interface";
|
|
2
|
-
export declare const WidthHeight: ({ width, height }: WidthHeightProps) => import("react
|
|
2
|
+
export declare const WidthHeight: ({ width, height }: WidthHeightProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var WidthHeight = function (_a) {
|
|
2
|
+
var width = _a.width, height = _a.height;
|
|
3
|
+
return (<>
|
|
4
|
+
<div className="bg-gray-200 lu-width-50 lu-height-25 relative rounded lu-pd-200">
|
|
5
|
+
<div className={"absolute right-0 top-0 bg-blue-500 ".concat(width, " ").concat(height, " rounded")} data-testid="resizable-box"></div>
|
|
6
|
+
</div>
|
|
7
|
+
</>);
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { WidthHeight } from "../../components/Size/WidthHeight";
|
|
2
|
+
import { heights, widths } from "../../utils";
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Size",
|
|
5
|
+
component: WidthHeight,
|
|
6
|
+
};
|
|
7
|
+
var Template = function (args) { return <WidthHeight {...args}/>; };
|
|
8
|
+
export var widthAndHeight = Template.bind({});
|
|
9
|
+
widthAndHeight.args = {
|
|
10
|
+
width: 'lu-width-50',
|
|
11
|
+
height: 'lu-height-50',
|
|
12
|
+
};
|
|
13
|
+
widthAndHeight.argTypes = {
|
|
14
|
+
width: {
|
|
15
|
+
control: { type: "select", labels: Object.fromEntries(widths.map(function (size) { return [size.key, size.label]; })) },
|
|
16
|
+
options: widths.map(function (size) { return size.key; }),
|
|
17
|
+
},
|
|
18
|
+
height: {
|
|
19
|
+
control: { type: "select", labels: Object.fromEntries(heights.map(function (size) { return [size.key, size.label]; })) },
|
|
20
|
+
options: heights.map(function (size) { return size.key; }),
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const Margin: () => import("react
|
|
1
|
+
export declare const Margin: () => import("react").JSX.Element;
|