linkedunion-design-kit 1.9.6-beta.0 → 1.9.7
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/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.d.ts +17 -0
- package/dist/src/components/Avatar/Avatar/Avatar1.stories.js +68 -0
- package/dist/src/components/Badge/Badge.stories.d.ts +3 -3
- package/dist/src/components/Badge/Badge.stories.js +1 -1
- package/dist/src/components/Button/Button/Button.stories.d.ts +2 -2
- package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +2 -2
- package/dist/src/components/Card/MultipleNews/MultiNews.d.ts +1 -4
- package/dist/src/components/Card/MultipleNews/MultiNews.js +23 -14
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.d.ts +3 -6
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.js +26 -23
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.d.ts +3 -6
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.js +24 -20
- package/dist/src/components/Card/SinglePost/SinglePost.stories.d.ts +3 -6
- package/dist/src/components/Card/SinglePost/SinglePost.stories.js +15 -10
- package/dist/src/components/Card/card.d.ts +2 -17
- package/dist/src/components/Card/card.js +28 -24
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.d.ts +3 -6
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.js +26 -22
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.d.ts +1 -5
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +1 -1
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.d.ts +2 -2
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.js +30 -12
- package/dist/src/components/Card/photoGallery/PhotoGallery.d.ts +1 -4
- package/dist/src/components/Card/photoGallery/PhotoGallery.stories.d.ts +2 -2
- package/dist/src/components/Card/photoGallery/PhotoGallery.stories.js +18 -13
- package/dist/src/components/Card/type.d.ts +2 -0
- package/dist/src/components/Pagination/pagination.js +7 -7
- package/dist/src/components/Skeleton/skeleton.stories.d.ts +3 -1
- package/dist/src/components/Skeleton/skeleton.stories.js +48 -38
- package/dist/src/components/VerticalTabs/VerticalTabs.d.ts +18 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.js +60 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.d.ts +11 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +100 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.test.d.ts +1 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.test.js +48 -0
- package/dist/src/components/ui/avatar.d.ts +10 -3
- package/dist/src/components/ui/avatar.js +27 -12
- package/dist/styles/global.css +111 -8
- package/package.json +2 -2
- package/dist/app/layout.jsx +0 -13
- package/dist/app/page.jsx +0 -5
- package/dist/build/types/app/layout.d.ts +0 -12
- package/dist/build/types/app/layout.js +0 -22
- package/dist/build/types/app/page.d.ts +0 -12
- package/dist/build/types/app/page.js +0 -22
- package/dist/src/components/Accordion/Accordion.stories.jsx +0 -33
- package/dist/src/components/Accordion/accordion.jsx +0 -59
- package/dist/src/components/Alerts/Alert/alert.jsx +0 -152
- package/dist/src/components/Alerts/Alert/alert.stories.jsx +0 -344
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.jsx +0 -170
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +0 -552
- package/dist/src/components/AppIcons/AndroidIcon.jsx +0 -24
- package/dist/src/components/AppIcons/AppIcon.jsx +0 -29
- package/dist/src/components/AppIcons/AppIcon.stories.jsx +0 -223
- package/dist/src/components/AppIcons/AppleIcon.jsx +0 -31
- package/dist/src/components/AppIcons/PlayStoreIcon.jsx +0 -29
- package/dist/src/components/Avatar/Avatar/Avatar.jsx +0 -45
- package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +0 -95
- package/dist/src/components/Avatar/Avatar/Avatar.test.jsx +0 -9
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +0 -17
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +0 -32
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +0 -20
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.jsx +0 -50
- package/dist/src/components/Badge/Badge.jsx +0 -54
- package/dist/src/components/Badge/Badge.stories.jsx +0 -201
- package/dist/src/components/Button/Button/Button.jsx +0 -96
- package/dist/src/components/Button/Button/Button.stories.jsx +0 -283
- package/dist/src/components/Button/Button/Button.test.jsx +0 -73
- package/dist/src/components/Button/IconButton/IconButton.jsx +0 -63
- package/dist/src/components/Button/IconButton/IconButton.stories.jsx +0 -128
- package/dist/src/components/Button/IconButton/IconButton.test.jsx +0 -28
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +0 -70
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.jsx +0 -101
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +0 -60
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +0 -102
- package/dist/src/components/Card/SinglePost/SinglePost.jsx +0 -26
- package/dist/src/components/Card/SinglePost/SinglePost.stories.jsx +0 -63
- package/dist/src/components/Card/card.jsx +0 -20
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +0 -60
- package/dist/src/components/Card/contactProfile/ContactProfile.stories.jsx +0 -99
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +0 -41
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.jsx +0 -51
- package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +0 -17
- package/dist/src/components/Card/photoGallery/PhotoGallery.stories.jsx +0 -34
- package/dist/src/components/Checkbox/checkbox.jsx +0 -47
- package/dist/src/components/Checkbox/checkbox.stories.jsx +0 -113
- package/dist/src/components/ColorPicker/ColorPicker.jsx +0 -67
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +0 -138
- package/dist/src/components/Colors/color.jsx +0 -5
- package/dist/src/components/Colors/color.stories.jsx +0 -20
- package/dist/src/components/Colors/color.test.jsx +0 -23
- package/dist/src/components/Dropdown/Combobox/Combobox.jsx +0 -198
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +0 -289
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +0 -7
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.jsx +0 -102
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +0 -464
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +0 -19
- package/dist/src/components/Dropdown/Select.stories.jsx +0 -201
- package/dist/src/components/Dropdown/select.jsx +0 -93
- package/dist/src/components/Icons/LUIcon.jsx +0 -41
- package/dist/src/components/Icons/LUIcon.test.jsx +0 -308
- package/dist/src/components/Icons/stories/IconDropdown.jsx +0 -67
- package/dist/src/components/Icons/stories/IconGallery.jsx +0 -77
- package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +0 -86
- package/dist/src/components/Icons/stories/LUIcon.stories.jsx +0 -108
- package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +0 -50
- package/dist/src/components/ImageUploader/imageUploader.jsx +0 -94
- package/dist/src/components/Images/LuImage.jsx +0 -19
- package/dist/src/components/Images/LuImage.stories.jsx +0 -154
- package/dist/src/components/Images/LuImage.test.jsx +0 -44
- package/dist/src/components/Input/Input.stories.jsx +0 -250
- package/dist/src/components/Input/input.jsx +0 -110
- package/dist/src/components/Label/Label.jsx +0 -32
- package/dist/src/components/Label/Label.stories.jsx +0 -30
- package/dist/src/components/Pagination/pagination.jsx +0 -65
- package/dist/src/components/Pagination/pagination.stories.jsx +0 -301
- package/dist/src/components/RadioGroup/RadioGroup.stories.jsx +0 -146
- package/dist/src/components/RadioGroup/radio-group.jsx +0 -49
- package/dist/src/components/Slider/Slider.stories.jsx +0 -159
- package/dist/src/components/Slider/slider.jsx +0 -31
- package/dist/src/components/SweetAlert/SweetAlert.jsx +0 -147
- package/dist/src/components/SweetAlert/SweetAlert.stories.jsx +0 -505
- package/dist/src/components/Switch/Switch.stories.jsx +0 -66
- package/dist/src/components/Switch/switch.jsx +0 -61
- package/dist/src/components/Table/Table.jsx +0 -221
- package/dist/src/components/Table/Table.stories.jsx +0 -652
- package/dist/src/components/Tabs/Tabs.stories.jsx +0 -29
- package/dist/src/components/Tabs/tabs.jsx +0 -32
- package/dist/src/components/Title/Title.jsx +0 -8
- package/dist/src/components/Title/Title.stories.jsx +0 -37
- package/dist/src/components/Title/Title.test.jsx +0 -24
- package/dist/src/components/ToolTip/Tooltip.jsx +0 -18
- package/dist/src/components/ToolTip/Tooltip.stories.jsx +0 -25
- package/dist/src/components/Typography/Body/Body.stories.jsx +0 -34
- package/dist/src/components/Typography/Body/body.jsx +0 -52
- package/dist/src/components/Typography/Caption/Caption.stories.jsx +0 -24
- package/dist/src/components/Typography/Caption/caption.jsx +0 -25
- package/dist/src/components/Typography/Display/Display.stories.jsx +0 -24
- package/dist/src/components/Typography/Display/display.jsx +0 -39
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +0 -37
- package/dist/src/components/Typography/Heading/heading.jsx +0 -53
- package/dist/src/components/ui/avatar.jsx +0 -27
- package/dist/src/components/ui/button.d.ts +0 -10
- package/dist/src/components/ui/button.js +0 -56
- package/dist/src/components/ui/button.jsx +0 -45
- package/dist/src/components/ui/collapsible.jsx +0 -5
- package/dist/src/components/ui/command.jsx +0 -67
- package/dist/src/components/ui/dialog.jsx +0 -66
- package/dist/src/components/ui/popover.jsx +0 -33
- package/dist/src/components/ui/tooltip.jsx +0 -38
- package/dist/src/components/ui/typography.jsx +0 -56
package/dist/index.d.ts
CHANGED
|
@@ -29,3 +29,5 @@ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuIte
|
|
|
29
29
|
export { Badge } from "./src/components/Badge/Badge";
|
|
30
30
|
export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox";
|
|
31
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
32
|
+
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
33
|
+
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
package/dist/index.js
CHANGED
|
@@ -29,3 +29,5 @@ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuIte
|
|
|
29
29
|
export { Badge } from "./src/components/Badge/Badge";
|
|
30
30
|
export { default as Combobox } from "./src/components/Dropdown/Combobox/Combobox";
|
|
31
31
|
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./src/components/Pagination/pagination";
|
|
32
|
+
export { Skeleton } from "./src/components/Skeleton/skeleton";
|
|
33
|
+
export { Tabs as VerticalTabs, TabsContent as VerticalTabsContent, TabsList as VerticalTabsList, tabSizes as verticalTabsSize, TabsTrigger as VerticalTabsTrigger, TabsHeading as VerticalTabsHeading, } from "./src/components/VerticalTabs/VerticalTabs";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Avatar } from "../../../components/ui/avatar";
|
|
2
|
+
import { Meta } from "@storybook/react";
|
|
3
|
+
import { avatar1Shape, avatar1Size } from ".";
|
|
4
|
+
declare const _default: Meta<typeof Avatar>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
7
|
+
size?: keyof typeof avatar1Size;
|
|
8
|
+
shape?: keyof typeof avatar1Shape;
|
|
9
|
+
status?: "online" | "offline" | "busy" | "away";
|
|
10
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
export declare const AvatarSize: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const AvatarFallBackValue: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const AvatarShape: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const AvatarWithNoImageAndFallBackValue: () => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const AvatarShapeSizeCombination: () => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const AvatarStatusIndicator: () => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const RoundedAvatarStatusIndicatorSize: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { Avatar, AvatarImage, AvatarFallback } from "../../../components/ui/avatar";
|
|
14
|
+
import { avatar1Shape, avatar1Size } from ".";
|
|
15
|
+
export default {
|
|
16
|
+
title: "Components/Avatar/Avatar1",
|
|
17
|
+
component: Avatar,
|
|
18
|
+
argTypes: {
|
|
19
|
+
size: {
|
|
20
|
+
control: {
|
|
21
|
+
type: "select",
|
|
22
|
+
options: Object.keys(avatar1Size),
|
|
23
|
+
},
|
|
24
|
+
description: "The size of the avatar.",
|
|
25
|
+
table: {
|
|
26
|
+
type: { summary: "string" },
|
|
27
|
+
defaultValue: { summary: "md" },
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
shape: {
|
|
31
|
+
control: {
|
|
32
|
+
type: "select",
|
|
33
|
+
options: Object.keys(avatar1Shape),
|
|
34
|
+
},
|
|
35
|
+
description: "The shape of the avatar.",
|
|
36
|
+
table: {
|
|
37
|
+
type: { summary: "string" },
|
|
38
|
+
defaultValue: { summary: "rounded" },
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
status: {
|
|
42
|
+
control: {
|
|
43
|
+
type: "select",
|
|
44
|
+
options: ["online", "offline", "busy", "away"],
|
|
45
|
+
},
|
|
46
|
+
description: "The status of the avatar.",
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: "string" },
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
var Template = function (args) {
|
|
54
|
+
return (_jsxs(Avatar, __assign({}, args, { children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] })));
|
|
55
|
+
};
|
|
56
|
+
export var Default = Template.bind({});
|
|
57
|
+
export var AvatarSize = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
58
|
+
export var AvatarFallBackValue = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, children: [_jsx(AvatarImage, { src: "", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
59
|
+
export var AvatarShape = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Shape).map(function (shape) { return (_jsxs(Avatar, { shape: shape, size: "massive", status: "online", children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, shape)); }) })); };
|
|
60
|
+
export var AvatarWithNoImageAndFallBackValue = function () {
|
|
61
|
+
var user = { name: "", image: null };
|
|
62
|
+
return (_jsx("div", { className: "flex flex-row space-x-2", children: _jsxs(Avatar, { size: "md", children: [_jsx(AvatarImage, { src: "", alt: "User avatar" }), _jsx(AvatarFallback, { children: (user === null || user === void 0 ? void 0 : user.name) ? user.name.charAt(0) : null })] }) }));
|
|
63
|
+
};
|
|
64
|
+
export var AvatarShapeSizeCombination = function () { return (_jsx("div", { className: "flex flex-col space-y-2", children: Object.keys(avatar1Shape).map(function (shape) {
|
|
65
|
+
return Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { shape: shape, size: size, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, "".concat(shape, "-").concat(size))); });
|
|
66
|
+
}) })); };
|
|
67
|
+
export var AvatarStatusIndicator = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: ["online", "offline", "busy", "away"].map(function (status) { return (_jsxs(Avatar, { size: "massive", shape: "square", status: status, children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, status)); }) })); };
|
|
68
|
+
export var RoundedAvatarStatusIndicatorSize = function () { return (_jsx("div", { className: "flex flex-row space-x-2", children: Object.keys(avatar1Size).map(function (size) { return (_jsxs(Avatar, { size: size, shape: "rounded", status: "online", children: [_jsx(AvatarImage, { src: "https://www.w3schools.com/howto/img_avatar2.png", alt: "Avatar" }), _jsx(AvatarFallback, { children: "AB" })] }, size)); }) })); };
|
|
@@ -56,8 +56,8 @@ declare const meta: {
|
|
|
56
56
|
shape: {
|
|
57
57
|
control: {
|
|
58
58
|
type: "select";
|
|
59
|
-
options: string[];
|
|
60
59
|
};
|
|
60
|
+
options: string[];
|
|
61
61
|
description: string;
|
|
62
62
|
table: {
|
|
63
63
|
type: {
|
|
@@ -130,7 +130,7 @@ declare const meta: {
|
|
|
130
130
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
131
131
|
autoFocus?: boolean | undefined | undefined;
|
|
132
132
|
className?: string | undefined | undefined;
|
|
133
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
133
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
134
134
|
contextMenu?: string | undefined | undefined;
|
|
135
135
|
dir?: string | undefined | undefined;
|
|
136
136
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -422,7 +422,7 @@ declare const meta: {
|
|
|
422
422
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
423
423
|
autoFocus?: boolean | undefined | undefined;
|
|
424
424
|
className?: string | undefined | undefined;
|
|
425
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
425
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
426
426
|
contextMenu?: string | undefined | undefined;
|
|
427
427
|
dir?: string | undefined | undefined;
|
|
428
428
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -118,7 +118,7 @@ declare const meta: {
|
|
|
118
118
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
119
119
|
autoFocus?: boolean | undefined | undefined;
|
|
120
120
|
className?: string | undefined | undefined;
|
|
121
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
121
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
122
122
|
contextMenu?: string | undefined | undefined;
|
|
123
123
|
dir?: string | undefined | undefined;
|
|
124
124
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -418,7 +418,7 @@ declare const meta: {
|
|
|
418
418
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
419
419
|
autoFocus?: boolean | undefined | undefined;
|
|
420
420
|
className?: string | undefined | undefined;
|
|
421
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
421
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
422
422
|
contextMenu?: string | undefined | undefined;
|
|
423
423
|
dir?: string | undefined | undefined;
|
|
424
424
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -129,7 +129,7 @@ declare const meta: {
|
|
|
129
129
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
130
130
|
autoFocus?: boolean | undefined | undefined;
|
|
131
131
|
className?: string | undefined | undefined;
|
|
132
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
132
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
133
133
|
contextMenu?: string | undefined | undefined;
|
|
134
134
|
dir?: string | undefined | undefined;
|
|
135
135
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -428,7 +428,7 @@ declare const meta: {
|
|
|
428
428
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
429
429
|
autoFocus?: boolean | undefined | undefined;
|
|
430
430
|
className?: string | undefined | undefined;
|
|
431
|
-
contentEditable?: (boolean | "true" | "false") | "
|
|
431
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
432
432
|
contextMenu?: string | undefined | undefined;
|
|
433
433
|
dir?: string | undefined | undefined;
|
|
434
434
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
import { CardInterface } from "../type";
|
|
2
|
-
export
|
|
3
|
-
onButtonClick?: () => void;
|
|
4
|
-
}
|
|
5
|
-
export declare const MultipleNewsCard: (props: MultiNewsProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const MultiNews: ({ item, image, href, btnLabel, editor, mediaPosition, orientation, }: CardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,38 +9,47 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import LuImage from "../../Images/LuImage";
|
|
14
|
+
import Link from "next/link";
|
|
14
15
|
import { Button } from "../../Button/Button/Button";
|
|
15
16
|
import { Body } from "../../Typography/Body/body";
|
|
16
17
|
import { Heading } from "../../Typography/Heading/heading";
|
|
17
|
-
export var
|
|
18
|
-
var item =
|
|
18
|
+
export var MultiNews = function (_a) {
|
|
19
|
+
var item = _a.item, image = _a.image, _b = _a.href, href = _b === void 0 ? "https://www.google.com/" : _b, _c = _a.btnLabel, btnLabel = _c === void 0 ? "View More" : _c, editor = _a.editor, _d = _a.mediaPosition, mediaPosition = _d === void 0 ? "right" : _d, orientation = _a.orientation;
|
|
20
|
+
// Use destructuring to create cleaner code
|
|
21
|
+
var modifiedItem = item;
|
|
22
|
+
var modifiedEditor = editor;
|
|
23
|
+
// Only swap for middle position
|
|
24
|
+
if (mediaPosition === "middle") {
|
|
25
|
+
// Swap for item
|
|
26
|
+
modifiedItem = __assign(__assign({}, item), { description: item === null || item === void 0 ? void 0 : item.short_description, short_description: item === null || item === void 0 ? void 0 : item.description });
|
|
27
|
+
// Swap for editor
|
|
28
|
+
modifiedEditor = __assign(__assign({}, editor), { cardText: editor === null || editor === void 0 ? void 0 : editor.shortDescription, shortDescription: editor === null || editor === void 0 ? void 0 : editor.cardText });
|
|
29
|
+
}
|
|
19
30
|
// Common card media component
|
|
20
31
|
var CardMedia = function (_a) {
|
|
21
32
|
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
22
|
-
return (_jsx(LuImage, { src: image, width: 240, height: 240, className: "object-cover w-full ".concat(className, " ").concat(
|
|
33
|
+
return (_jsx(LuImage, { src: image, width: 240, height: 240, className: " object-cover w-full ".concat(className, " ").concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.cardImage), alt: "Image" }));
|
|
23
34
|
};
|
|
24
35
|
// Common content section
|
|
25
36
|
var CardContent = function (_a) {
|
|
26
37
|
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
27
|
-
return (_jsxs("div", { className: "flex flex-col !gap-
|
|
28
|
-
__html: item.description || "",
|
|
29
|
-
} })] }));
|
|
38
|
+
return (_jsxs("div", { className: "flex flex-col !gap-1 ".concat(className), children: [_jsx(Heading, { variant: "h4-600", className: "line-clamp-1 capitalize ".concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.cardTitle), children: modifiedItem === null || modifiedItem === void 0 ? void 0 : modifiedItem.title }), _jsx(Body, { variant: "body-xl", className: "".concat(mediaPosition === "middle" ? "line-clamp-1" : "line-clamp-2 h-16", " ").concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.cardText), children: modifiedItem === null || modifiedItem === void 0 ? void 0 : modifiedItem.description })] }));
|
|
30
39
|
};
|
|
31
40
|
// Common button component with conditional shape
|
|
32
41
|
var ActionButton = function (_a) {
|
|
33
42
|
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
34
|
-
return (_jsx(
|
|
43
|
+
return (_jsx(Link, { href: href, passHref: true, className: className, children: _jsx(Button, __assign({ endIcon: "angle-right", size: mediaPosition === "middle" ? "xl" : "sm" }, (mediaPosition === "middle" && { shape: "rounded-full" }), { className: "".concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.cardBtn), children: btnLabel })) }));
|
|
35
44
|
};
|
|
45
|
+
// Optional subtitle component
|
|
46
|
+
var Subtitle = function () { return (_jsx(_Fragment, { children: mediaPosition === "middle" && (_jsx(Body, { variant: "body-xl", className: "line-clamp-4 h-32 ".concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.shortDescription), dangerouslySetInnerHTML: {
|
|
47
|
+
__html: modifiedItem.short_description || "",
|
|
48
|
+
} })) })); };
|
|
36
49
|
// Horizontal layout
|
|
37
50
|
if (orientation === "horizontal") {
|
|
38
|
-
return (_jsxs("div", { className: "!p-5 bg-white rounded-2xl flex ".concat(mediaPosition === "right" ? "flex-row-reverse" : "", " !gap-5 items-center shadow-lg ").concat(
|
|
51
|
+
return (_jsxs("div", { className: "!p-5 bg-white rounded-2xl flex ".concat(mediaPosition === "right" ? "flex-row-reverse" : "", " !gap-5 items-center shadow-lg ").concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.card), children: [_jsx(CardMedia, { className: "max-w-48 aspect-square rounded-lg" }), _jsxs("div", { className: "flex flex-col !gap-5 w-full", children: [_jsx(CardContent, {}), _jsx(ActionButton, {})] })] }));
|
|
39
52
|
}
|
|
40
53
|
// Vertical layout
|
|
41
|
-
return (_jsxs("div", { className: "
|
|
42
|
-
__html: item.description || "",
|
|
43
|
-
} })), _jsx(CardMedia, { className: "aspect-16/10" }), _jsxs("div", { className: "flex flex-col !gap-1", children: [_jsx(Heading, { variant: "h4-700", className: "line-clamp-1 capitalize ".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle), children: item === null || item === void 0 ? void 0 : item.title }), (item === null || item === void 0 ? void 0 : item.short_description) && (_jsx(Body, { variant: mediaPosition === "middle" ? "body-lg-500" : "body-xl", className: "".concat(item.description ? "line-clamp-1 text-gray-600" : "line-clamp-2 h-14 text-gray-600", " ").concat(editor === null || editor === void 0 ? void 0 : editor.shortDescription), children: item === null || item === void 0 ? void 0 : item.short_description })), mediaPosition !== "middle" && (_jsx(Body, { variant: "body-lg", className: "text-gray-600 line-clamp-2 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText), dangerouslySetInnerHTML: {
|
|
44
|
-
__html: item.description || "",
|
|
45
|
-
} }))] })] }), _jsx(ActionButton, {})] }));
|
|
54
|
+
return (_jsxs("div", { className: "p-8 bg-white rounded-2xl flex flex-col !gap-5 max-w-md shadow-lg ".concat(modifiedEditor === null || modifiedEditor === void 0 ? void 0 : modifiedEditor.card), children: [_jsxs("div", { className: "flex ".concat(mediaPosition === "top" ? "flex-col" : "flex-col-reverse", " !gap-4"), children: [_jsx(Subtitle, {}), _jsx(CardMedia, { className: "aspect-16/10" }), _jsx(CardContent, {})] }), _jsx(ActionButton, {})] }));
|
|
46
55
|
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
type: "multipleNews";
|
|
5
|
-
}>;
|
|
6
|
-
declare const meta: Meta<MultiNewsCardProps>;
|
|
2
|
+
import Card from "../card";
|
|
3
|
+
declare const meta: Meta<typeof Card>;
|
|
7
4
|
export default meta;
|
|
8
|
-
type Story = StoryObj<
|
|
5
|
+
type Story = StoryObj<typeof Card>;
|
|
9
6
|
export declare const CardHorizontalLeft: Story;
|
|
10
7
|
export declare const CardHorizontalRight: Story;
|
|
11
8
|
export declare const CardVerticalTop: Story;
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, } from "../../../utils/constants";
|
|
13
|
+
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
|
|
14
14
|
import { OrientationEnum } from "../../../utils/enums";
|
|
15
15
|
import Card from "../card";
|
|
16
16
|
var meta = {
|
|
@@ -20,12 +20,6 @@ var meta = {
|
|
|
20
20
|
layout: "centered",
|
|
21
21
|
},
|
|
22
22
|
argTypes: {
|
|
23
|
-
type: {
|
|
24
|
-
control: false,
|
|
25
|
-
table: {
|
|
26
|
-
disable: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
23
|
orientation: {
|
|
30
24
|
control: "select",
|
|
31
25
|
options: [OrientationEnum.horizontal, OrientationEnum.vertical],
|
|
@@ -35,20 +29,29 @@ var meta = {
|
|
|
35
29
|
options: ["left", "right", "top", "middle", "bottom"],
|
|
36
30
|
description: "For horizontal: use left/right. For vertical: use top/middle/bottom",
|
|
37
31
|
},
|
|
32
|
+
theme: {
|
|
33
|
+
table: {
|
|
34
|
+
disable: true,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
altText: {
|
|
38
|
+
table: {
|
|
39
|
+
disable: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
38
42
|
},
|
|
39
43
|
decorators: [
|
|
40
44
|
function (Story, context) {
|
|
41
45
|
// Dynamically update mediaPosition options based on orientation
|
|
42
|
-
var
|
|
43
|
-
var orientation = args.orientation;
|
|
46
|
+
var orientation = context.args.orientation;
|
|
44
47
|
if (orientation === OrientationEnum.horizontal) {
|
|
45
48
|
if (context.argTypes.mediaPosition) {
|
|
46
49
|
context.argTypes.mediaPosition.options = ["left", "right"];
|
|
47
50
|
}
|
|
48
51
|
// Reset mediaPosition if it's not valid for horizontal
|
|
49
|
-
if (args.mediaPosition &&
|
|
50
|
-
!["left", "right"].includes(args.mediaPosition)) {
|
|
51
|
-
args.mediaPosition = "left";
|
|
52
|
+
if (context.args.mediaPosition &&
|
|
53
|
+
!["left", "right"].includes(context.args.mediaPosition)) {
|
|
54
|
+
context.args.mediaPosition = "left";
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
else if (orientation === OrientationEnum.vertical) {
|
|
@@ -56,17 +59,18 @@ var meta = {
|
|
|
56
59
|
context.argTypes.mediaPosition.options = ["top", "middle", "bottom"];
|
|
57
60
|
}
|
|
58
61
|
// Reset mediaPosition if it's not valid for vertical
|
|
59
|
-
if (args.mediaPosition &&
|
|
60
|
-
!["top", "middle", "bottom"].includes(args.mediaPosition)) {
|
|
61
|
-
args.mediaPosition = "top";
|
|
62
|
+
if (context.args.mediaPosition &&
|
|
63
|
+
!["top", "middle", "bottom"].includes(context.args.mediaPosition)) {
|
|
64
|
+
context.args.mediaPosition = "top";
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
|
-
return _jsx(Story, {});
|
|
67
|
+
return _jsx(Story, __assign({}, context.args));
|
|
65
68
|
},
|
|
66
69
|
],
|
|
67
70
|
};
|
|
68
71
|
export default meta;
|
|
69
72
|
var baseCardArgs = {
|
|
73
|
+
type: "multipleNews",
|
|
70
74
|
item: {
|
|
71
75
|
image: Dummy_Image,
|
|
72
76
|
title: Dummy_Title,
|
|
@@ -74,7 +78,7 @@ var baseCardArgs = {
|
|
|
74
78
|
short_description: Dummy_Subtitle,
|
|
75
79
|
},
|
|
76
80
|
image: Dummy_Image,
|
|
77
|
-
|
|
81
|
+
href: Dummy_Url,
|
|
78
82
|
btnLabel: "View More",
|
|
79
83
|
editor: {
|
|
80
84
|
card: "",
|
|
@@ -82,21 +86,20 @@ var baseCardArgs = {
|
|
|
82
86
|
cardTitle: "",
|
|
83
87
|
cardText: "",
|
|
84
88
|
cardBtn: "",
|
|
85
|
-
shortDescription: "",
|
|
86
89
|
},
|
|
87
90
|
};
|
|
88
91
|
export var CardHorizontalLeft = {
|
|
89
|
-
args: __assign(__assign({
|
|
92
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "left" }),
|
|
90
93
|
};
|
|
91
94
|
export var CardHorizontalRight = {
|
|
92
|
-
args: __assign(__assign({
|
|
95
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "right" }),
|
|
93
96
|
};
|
|
94
97
|
export var CardVerticalTop = {
|
|
95
|
-
args: __assign(__assign({
|
|
98
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "top" }),
|
|
96
99
|
};
|
|
97
100
|
export var CardVerticalBottom = {
|
|
98
|
-
args: __assign(__assign({
|
|
101
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "bottom" }),
|
|
99
102
|
};
|
|
100
103
|
export var CardVerticalMiddle = {
|
|
101
|
-
args: __assign(__assign({
|
|
104
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "middle" }),
|
|
102
105
|
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
type: "postByCategory";
|
|
5
|
-
}>;
|
|
6
|
-
declare const meta: Meta<PostByCategoryCardProps>;
|
|
2
|
+
import Card from "../card";
|
|
3
|
+
declare const meta: Meta<typeof Card>;
|
|
7
4
|
export default meta;
|
|
8
|
-
type Story = StoryObj<
|
|
5
|
+
type Story = StoryObj<typeof Card>;
|
|
9
6
|
export declare const PostByCategoryHorizontalLeft: Story;
|
|
10
7
|
export declare const PostByCategoryHorizontalRight: Story;
|
|
11
8
|
export declare const PostByCategoryVerticalTop: Story;
|
|
@@ -20,12 +20,6 @@ var meta = {
|
|
|
20
20
|
layout: "centered",
|
|
21
21
|
},
|
|
22
22
|
argTypes: {
|
|
23
|
-
type: {
|
|
24
|
-
control: false,
|
|
25
|
-
table: {
|
|
26
|
-
disable: true,
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
23
|
orientation: {
|
|
30
24
|
control: "select",
|
|
31
25
|
options: [OrientationEnum.horizontal, OrientationEnum.vertical],
|
|
@@ -35,20 +29,29 @@ var meta = {
|
|
|
35
29
|
options: ["left", "right", "top", "middle", "bottom"],
|
|
36
30
|
description: "For horizontal: use left/right. For vertical: use top/middle/bottom",
|
|
37
31
|
},
|
|
32
|
+
theme: {
|
|
33
|
+
table: {
|
|
34
|
+
disable: true,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
altText: {
|
|
38
|
+
table: {
|
|
39
|
+
disable: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
38
42
|
},
|
|
39
43
|
decorators: [
|
|
40
44
|
function (Story, context) {
|
|
41
45
|
// Dynamically update mediaPosition options based on orientation
|
|
42
|
-
var
|
|
43
|
-
var orientation = args.orientation;
|
|
46
|
+
var orientation = context.args.orientation;
|
|
44
47
|
if (orientation === OrientationEnum.horizontal) {
|
|
45
48
|
if (context.argTypes.mediaPosition) {
|
|
46
49
|
context.argTypes.mediaPosition.options = ["left", "right"];
|
|
47
50
|
}
|
|
48
51
|
// Reset mediaPosition if it's not valid for horizontal
|
|
49
|
-
if (args.mediaPosition &&
|
|
50
|
-
!["left", "right"].includes(args.mediaPosition)) {
|
|
51
|
-
args.mediaPosition = "left";
|
|
52
|
+
if (context.args.mediaPosition &&
|
|
53
|
+
!["left", "right"].includes(context.args.mediaPosition)) {
|
|
54
|
+
context.args.mediaPosition = "left";
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
else if (orientation === OrientationEnum.vertical) {
|
|
@@ -56,18 +59,19 @@ var meta = {
|
|
|
56
59
|
context.argTypes.mediaPosition.options = ["top", "bottom"];
|
|
57
60
|
}
|
|
58
61
|
// Reset mediaPosition if it's not valid for vertical
|
|
59
|
-
if (args.mediaPosition &&
|
|
60
|
-
!["top", "middle", "bottom"].includes(args.mediaPosition)) {
|
|
61
|
-
args.mediaPosition = "top";
|
|
62
|
+
if (context.args.mediaPosition &&
|
|
63
|
+
!["top", "middle", "bottom"].includes(context.args.mediaPosition)) {
|
|
64
|
+
context.args.mediaPosition = "top";
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
|
-
return _jsx(Story, {});
|
|
67
|
+
return _jsx(Story, __assign({}, context.args));
|
|
65
68
|
},
|
|
66
69
|
],
|
|
67
70
|
};
|
|
68
71
|
export default meta;
|
|
69
72
|
// Base card args
|
|
70
73
|
var baseCardArgs = {
|
|
74
|
+
type: "postByCategory",
|
|
71
75
|
item: {
|
|
72
76
|
image: Dummy_Image,
|
|
73
77
|
title: Dummy_Title,
|
|
@@ -87,17 +91,17 @@ var baseCardArgs = {
|
|
|
87
91
|
};
|
|
88
92
|
// PostByCategory Card Stories
|
|
89
93
|
export var PostByCategoryHorizontalLeft = {
|
|
90
|
-
args: __assign(__assign({
|
|
94
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "left" }),
|
|
91
95
|
};
|
|
92
96
|
export var PostByCategoryHorizontalRight = {
|
|
93
|
-
args: __assign(__assign({
|
|
97
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "right" }),
|
|
94
98
|
};
|
|
95
99
|
export var PostByCategoryVerticalTop = {
|
|
96
|
-
args: __assign(__assign({
|
|
100
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "top" }),
|
|
97
101
|
};
|
|
98
102
|
export var PostByCategoryVerticalMiddle = {
|
|
99
|
-
args: __assign(__assign({
|
|
103
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "middle" }),
|
|
100
104
|
};
|
|
101
105
|
export var PostByCategoryVerticalBottom = {
|
|
102
|
-
args: __assign(__assign({
|
|
106
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "bottom" }),
|
|
103
107
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type: "singlePost";
|
|
5
|
-
}>;
|
|
6
|
-
declare const meta: Meta<SinglePostCardProps>;
|
|
2
|
+
import { SinglePost } from "./SinglePost";
|
|
3
|
+
declare const meta: Meta<typeof SinglePost>;
|
|
7
4
|
export default meta;
|
|
8
|
-
type Story = StoryObj<
|
|
5
|
+
type Story = StoryObj<typeof SinglePost>;
|
|
9
6
|
export declare const SinglePostHorizontalLeft: Story;
|
|
10
7
|
export declare const SinglePostHorizontalRight: Story;
|
|
@@ -9,21 +9,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import
|
|
12
|
+
import { SinglePost } from "./SinglePost";
|
|
13
13
|
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
|
|
14
14
|
var meta = {
|
|
15
15
|
title: "Components/Cards/SinglePost",
|
|
16
|
-
component:
|
|
16
|
+
component: SinglePost,
|
|
17
17
|
parameters: {
|
|
18
18
|
layout: "centered",
|
|
19
19
|
},
|
|
20
20
|
argTypes: {
|
|
21
|
-
type: {
|
|
22
|
-
control: false,
|
|
23
|
-
table: {
|
|
24
|
-
disable: true,
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
21
|
orientation: {
|
|
28
22
|
table: {
|
|
29
23
|
disable: true,
|
|
@@ -34,10 +28,21 @@ var meta = {
|
|
|
34
28
|
options: ["left", "right"],
|
|
35
29
|
description: "Position of media in horizontal layout",
|
|
36
30
|
},
|
|
31
|
+
theme: {
|
|
32
|
+
table: {
|
|
33
|
+
disable: true,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
altText: {
|
|
37
|
+
table: {
|
|
38
|
+
disable: true,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
37
41
|
},
|
|
38
42
|
};
|
|
39
43
|
export default meta;
|
|
40
44
|
var baseCardArgs = {
|
|
45
|
+
type: "singlePost",
|
|
41
46
|
item: {
|
|
42
47
|
image: Dummy_Image,
|
|
43
48
|
title: Dummy_Title,
|
|
@@ -56,8 +61,8 @@ var baseCardArgs = {
|
|
|
56
61
|
},
|
|
57
62
|
};
|
|
58
63
|
export var SinglePostHorizontalLeft = {
|
|
59
|
-
args: __assign(__assign({
|
|
64
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "left" }),
|
|
60
65
|
};
|
|
61
66
|
export var SinglePostHorizontalRight = {
|
|
62
|
-
args: __assign(__assign({
|
|
67
|
+
args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "right" }),
|
|
63
68
|
};
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { PhotoGalleryProps } from "./photoGallery/PhotoGallery";
|
|
4
|
-
import { PhotoAlbumProps } from "./photoAlbum/PhotoAlbum";
|
|
5
|
-
type CardTypesWithCardInterface = "postByCategory" | "contactProfile" | "singlePost";
|
|
6
|
-
export type CardProps = ({
|
|
7
|
-
type: "multipleNews";
|
|
8
|
-
} & MultiNewsProps) | ({
|
|
9
|
-
type: "photoGallery";
|
|
10
|
-
} & PhotoGalleryProps) | ({
|
|
11
|
-
type: "photoAlbum";
|
|
12
|
-
} & PhotoAlbumProps) | {
|
|
13
|
-
[K in CardTypesWithCardInterface]: {
|
|
14
|
-
type: K;
|
|
15
|
-
} & CardInterface;
|
|
16
|
-
}[CardTypesWithCardInterface];
|
|
17
|
-
declare const Card: (props: CardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
import { CardInterface } from "./type";
|
|
2
|
+
declare const Card: ({ item, image, href, btnLabel, editor, mediaPosition, type, orientation, theme, }: CardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
18
3
|
export default Card;
|