linkedunion-design-kit 1.11.6 → 1.11.8
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.js → layout.jsx} +3 -2
- package/dist/app/page.d.ts +1 -1
- package/dist/app/page.jsx +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/src/components/Accordion/Accordion.stories.jsx +33 -0
- package/dist/src/components/Accordion/accordion.d.ts +4 -4
- package/dist/src/components/Accordion/{accordion.js → accordion.jsx} +11 -16
- package/dist/src/components/Alerts/Alert/alert.d.ts +7 -7
- package/dist/src/components/Alerts/Alert/{alert.js → alert.jsx} +21 -25
- package/dist/src/components/Alerts/Alert/alert.stories.d.ts +8 -8
- package/dist/src/components/Alerts/Alert/alert.stories.jsx +344 -0
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.d.ts +11 -11
- package/dist/src/components/Alerts/AlertDialog/{alert-dialog.js → alert-dialog.jsx} +26 -24
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.d.ts +10 -10
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +552 -0
- package/dist/src/components/AppIcons/AndroidIcon.jsx +24 -0
- package/dist/src/components/AppIcons/{AppIcon.js → AppIcon.jsx} +4 -15
- package/dist/src/components/AppIcons/AppleIcon.jsx +31 -0
- package/dist/src/components/AppIcons/PlayStoreIcon.jsx +29 -0
- package/dist/src/components/Avatar/Avatar/{Avatar.js → Avatar.jsx} +13 -18
- package/dist/src/components/Avatar/Avatar/Avatar.stories.d.ts +7 -7
- package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +95 -0
- package/dist/src/components/Avatar/Avatar/{Avatar.test.js → Avatar.test.jsx} +1 -2
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +17 -0
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +32 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +20 -0
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.d.ts +2 -2
- package/dist/src/components/Avatar/StatusIndicator/{StatusIndicator.stories.js → StatusIndicator.stories.jsx} +12 -3
- package/dist/src/components/Badge/Badge.d.ts +1 -1
- package/dist/src/components/Badge/{Badge.js → Badge.jsx} +8 -13
- package/dist/src/components/Badge/Badge.stories.d.ts +10 -10
- package/dist/src/components/Badge/Badge.stories.jsx +201 -0
- package/dist/src/components/Button/Button/Button.d.ts +3 -2
- package/dist/src/components/Button/Button/{Button.js → Button.jsx} +24 -8
- package/dist/src/components/Button/Button/Button.stories.d.ts +5 -3
- package/dist/src/components/Button/Button/{Button.stories.js → Button.stories.jsx} +1 -13
- package/dist/src/components/Button/Button/Button.test.jsx +73 -0
- package/dist/src/components/Button/IconButton/IconButton.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.js → IconButton.jsx} +4 -13
- package/dist/src/components/Button/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/src/components/Button/IconButton/{IconButton.stories.js → IconButton.stories.jsx} +1 -13
- package/dist/src/components/Button/IconButton/{IconButton.test.js → IconButton.test.jsx} +5 -6
- package/dist/src/components/Button/index.d.ts +1 -0
- package/dist/src/components/Button/index.js +3 -2
- package/dist/src/components/Card/MultipleNews/MultiNews.d.ts +1 -1
- package/dist/src/components/Card/MultipleNews/MultiNews.jsx +71 -0
- package/dist/src/components/Card/MultipleNews/{MultiNews.stories.js → MultiNews.stories.jsx} +1 -2
- package/dist/src/components/Card/PostByCategory/PostByCategory.d.ts +1 -1
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +57 -0
- package/dist/src/components/Card/PostByCategory/{PostByCategory.stories.js → PostByCategory.stories.jsx} +1 -2
- package/dist/src/components/Card/SinglePost/SinglePost.d.ts +1 -1
- package/dist/src/components/Card/SinglePost/SinglePost.jsx +26 -0
- package/dist/src/components/Card/card.d.ts +2 -1
- package/dist/src/components/Card/{card.js → card.jsx} +2 -13
- package/dist/src/components/Card/contactProfile/ContactProfile.d.ts +1 -1
- package/dist/src/components/Card/contactProfile/ContactProfile.jsx +76 -0
- package/dist/src/components/Card/contactProfile/{ContactProfile.stories.js → ContactProfile.stories.jsx} +1 -2
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.d.ts +1 -1
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +41 -0
- package/dist/src/components/Card/photoAlbum/{PhotoAlbum.stories.js → PhotoAlbum.stories.jsx} +1 -13
- package/dist/src/components/Card/photoGallery/PhotoGallery.d.ts +1 -1
- package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +17 -0
- package/dist/src/components/Card/photoGallery/{PhotoGallery.stories.js → PhotoGallery.stories.jsx} +1 -13
- package/dist/src/components/Checkbox/checkbox.d.ts +1 -1
- package/dist/src/components/Checkbox/{checkbox.js → checkbox.jsx} +6 -13
- package/dist/src/components/Checkbox/checkbox.stories.jsx +113 -0
- package/dist/src/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/src/components/ColorPicker/{ColorPicker.js → ColorPicker.jsx} +6 -13
- package/dist/src/components/ColorPicker/ColorPicker.stories.d.ts +5 -5
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +138 -0
- package/dist/src/components/Colors/color.d.ts +1 -1
- package/dist/src/components/Colors/{color.js → color.jsx} +1 -2
- package/dist/src/components/Colors/color.stories.jsx +20 -0
- package/dist/src/components/Colors/{color.test.js → color.test.jsx} +3 -4
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/DatePicker/DatePicker.jsx +67 -0
- package/dist/src/components/DatePicker/DatePicker.stories.d.ts +9 -9
- package/dist/src/components/DatePicker/DatePicker.stories.jsx +291 -0
- package/dist/src/components/DateRangePicker/DateRangePicker.d.ts +1 -1
- package/dist/src/components/DateRangePicker/{DateRangePicker.js → DateRangePicker.jsx} +92 -44
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.d.ts +19 -19
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.jsx +582 -0
- package/dist/src/components/Dropdown/Combobox/Combobox.d.ts +1 -1
- package/dist/src/components/Dropdown/Combobox/{Combobox.js → Combobox.jsx} +67 -29
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.d.ts +8 -8
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +289 -0
- package/dist/src/components/Dropdown/Combobox/dialog.d.ts +10 -10
- package/dist/src/components/Dropdown/Combobox/dialog.jsx +66 -0
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +7 -0
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.d.ts +7 -3
- package/dist/src/components/Dropdown/DropdownMenu/{DropdownMenu.js → DropdownMenu.jsx} +29 -22
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.d.ts +19 -12
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +552 -0
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +19 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.d.ts +5 -0
- package/dist/src/components/Dropdown/DropdownMenu/index.js +5 -0
- package/dist/src/components/Dropdown/Select.stories.d.ts +7 -6
- package/dist/src/components/Dropdown/{Select.stories.js → Select.stories.jsx} +71 -8
- package/dist/src/components/Dropdown/select.d.ts +10 -10
- package/dist/src/components/Dropdown/select.jsx +94 -0
- package/dist/src/components/Icons/LUIcon.d.ts +1 -1
- package/dist/src/components/Icons/{LUIcon.js → LUIcon.jsx} +10 -13
- package/dist/src/components/Icons/stories/IconDropdown.jsx +67 -0
- package/dist/src/components/Icons/stories/IconGallery.jsx +77 -0
- package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +86 -0
- package/dist/src/components/Icons/stories/LUIcon.stories.d.ts +5 -5
- package/dist/src/components/Icons/stories/{LUIcon.stories.js → LUIcon.stories.jsx} +23 -8
- package/dist/src/components/ImageUploader/imageUploader.d.ts +1 -1
- package/dist/src/components/ImageUploader/{imageUploader.js → imageUploader.jsx} +28 -13
- package/dist/src/components/Images/LuImage.d.ts +1 -1
- package/dist/src/components/Images/{LuImage.js → LuImage.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.stories.js → LuImage.stories.jsx} +1 -13
- package/dist/src/components/Images/{LuImage.test.js → LuImage.test.jsx} +6 -18
- package/dist/src/components/Input/Input.stories.d.ts +9 -8
- package/dist/src/components/Input/Input.stories.jsx +250 -0
- package/dist/src/components/Input/input.d.ts +1 -1
- package/dist/src/components/Input/{input.js → input.jsx} +10 -13
- package/dist/src/components/Label/Label.d.ts +1 -1
- package/dist/src/components/Label/{Label.js → Label.jsx} +2 -13
- package/dist/src/components/Label/{Label.stories.js → Label.stories.jsx} +1 -13
- package/dist/src/components/Modal/Modal.d.ts +3 -3
- package/dist/src/components/Modal/{Modal.js → Modal.jsx} +20 -19
- package/dist/src/components/Modal/Modal.stories.d.ts +15 -15
- package/dist/src/components/Modal/Modal.stories.jsx +487 -0
- package/dist/src/components/Pagination/pagination.d.ts +5 -5
- package/dist/src/components/Pagination/{pagination.js → pagination.jsx} +18 -21
- package/dist/src/components/Pagination/pagination.stories.d.ts +6 -6
- package/dist/src/components/Pagination/pagination.stories.jsx +301 -0
- package/dist/src/components/RadioGroup/{RadioGroup.stories.js → RadioGroup.stories.jsx} +52 -22
- package/dist/src/components/RadioGroup/radio-group.d.ts +1 -1
- package/dist/src/components/RadioGroup/{radio-group.js → radio-group.jsx} +6 -14
- package/dist/src/components/Separator/Separator.stories.d.ts +15 -0
- package/dist/src/components/Separator/Separator.stories.jsx +94 -0
- package/dist/src/components/Separator/index.d.ts +1 -0
- package/dist/src/components/Separator/index.js +1 -0
- package/dist/src/components/Separator/separator.d.ts +4 -0
- package/dist/src/components/Separator/separator.jsx +20 -0
- package/dist/src/components/Sheet/index.d.ts +1 -0
- package/dist/src/components/Sheet/index.js +1 -0
- package/dist/src/components/Sheet/sheet.d.ts +25 -0
- package/dist/src/components/Sheet/sheet.jsx +73 -0
- package/dist/src/components/Sheet/sheet.stories.d.ts +4 -0
- package/dist/src/components/Sheet/sheet.stories.jsx +34 -0
- package/dist/src/components/Skeleton/skeleton.d.ts +14 -14
- package/dist/src/components/Skeleton/{skeleton.js → skeleton.jsx} +23 -27
- package/dist/src/components/Skeleton/skeleton.stories.d.ts +14 -14
- package/dist/src/components/Skeleton/skeleton.stories.jsx +734 -0
- package/dist/src/components/Slider/slider.d.ts +1 -1
- package/dist/src/components/Slider/slider.jsx +31 -0
- package/dist/src/components/SweetAlert/SweetAlert.d.ts +9 -9
- package/dist/src/components/SweetAlert/{SweetAlert.js → SweetAlert.jsx} +18 -21
- package/dist/src/components/SweetAlert/SweetAlert.stories.d.ts +7 -7
- package/dist/src/components/SweetAlert/{SweetAlert.stories.js → SweetAlert.stories.jsx} +215 -15
- package/dist/src/components/Switch/{Switch.stories.js → Switch.stories.jsx} +1 -13
- package/dist/src/components/Switch/switch.d.ts +1 -1
- package/dist/src/components/Switch/{switch.js → switch.jsx} +4 -13
- package/dist/src/components/Table/{Table.js → Table.jsx} +111 -58
- package/dist/src/components/Table/Table.stories.d.ts +13 -13
- package/dist/src/components/Table/{Table.stories.js → Table.stories.jsx} +299 -45
- package/dist/src/components/Table/{Table.test.js → Table.test.jsx} +39 -7
- package/dist/src/components/Tabs/{Tabs.stories.js → Tabs.stories.jsx} +10 -3
- package/dist/src/components/Tabs/tabs.d.ts +4 -4
- package/dist/src/components/Tabs/tabs.jsx +32 -0
- package/dist/src/components/TimePicker/TimePicker.d.ts +1 -1
- package/dist/src/components/TimePicker/{TimePicker.js → TimePicker.jsx} +54 -30
- package/dist/src/components/TimePicker/TimePicker.stories.d.ts +10 -10
- package/dist/src/components/TimePicker/TimePicker.stories.jsx +298 -0
- package/dist/src/components/Title/Title.d.ts +1 -1
- package/dist/src/components/Title/{Title.js → Title.jsx} +2 -2
- package/dist/src/components/Title/{Title.stories.js → Title.stories.jsx} +1 -13
- package/dist/src/components/Title/{Title.test.js → Title.test.jsx} +4 -5
- package/dist/src/components/ToolTip/Tooltip.d.ts +1 -1
- package/dist/src/components/ToolTip/Tooltip.jsx +18 -0
- package/dist/src/components/ToolTip/{Tooltip.stories.js → Tooltip.stories.jsx} +2 -14
- package/dist/src/components/Typography/Body/{Body.stories.js → Body.stories.jsx} +1 -13
- package/dist/src/components/Typography/Body/body.d.ts +1 -1
- package/dist/src/components/Typography/Body/{body.js → body.jsx} +4 -13
- package/dist/src/components/Typography/Caption/{Caption.stories.js → Caption.stories.jsx} +1 -13
- package/dist/src/components/Typography/Caption/caption.d.ts +1 -1
- package/dist/src/components/Typography/Caption/{caption.js → caption.jsx} +4 -13
- package/dist/src/components/Typography/Display/{Display.stories.js → Display.stories.jsx} +1 -13
- package/dist/src/components/Typography/Display/display.d.ts +1 -1
- package/dist/src/components/Typography/Display/{display.js → display.jsx} +4 -13
- package/dist/src/components/Typography/Heading/Heading.stories.d.ts +6 -6
- package/dist/src/components/Typography/Heading/Heading.stories.jsx +85 -0
- package/dist/src/components/Typography/Heading/{heading.js → heading.jsx} +5 -14
- package/dist/src/components/VerticalTabs/{VerticalTabs.js → VerticalTabs.jsx} +9 -17
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.jsx +154 -0
- package/dist/src/components/VerticalTabs/VerticalTabs.test.jsx +97 -0
- package/dist/src/components/ui/calendar.d.ts +2 -2
- package/dist/src/components/ui/{calendar.js → calendar.jsx} +36 -22
- package/dist/src/components/ui/command.d.ts +9 -9
- package/dist/src/components/ui/command.jsx +67 -0
- package/dist/src/components/ui/popover.d.ts +4 -4
- package/dist/src/components/ui/popover.jsx +33 -0
- package/dist/src/components/ui/tooltip.d.ts +4 -4
- package/dist/src/components/ui/tooltip.jsx +38 -0
- package/dist/src/components/ui/typography.d.ts +1 -1
- package/dist/src/components/ui/{typography.js → typography.jsx} +4 -13
- package/dist/styles/global.css +107 -5
- package/package.json +4 -3
- package/dist/app/page.js +0 -4
- package/dist/src/components/Accordion/Accordion.stories.js +0 -32
- package/dist/src/components/Alerts/Alert/alert.stories.js +0 -166
- package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.js +0 -213
- package/dist/src/components/AppIcons/AndroidIcon.js +0 -28
- package/dist/src/components/AppIcons/AppleIcon.js +0 -28
- package/dist/src/components/AppIcons/PlayStoreIcon.js +0 -28
- package/dist/src/components/Avatar/Avatar/Avatar.stories.js +0 -69
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.js +0 -8
- package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.js +0 -14
- package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.js +0 -18
- package/dist/src/components/Badge/Badge.stories.js +0 -145
- package/dist/src/components/Button/Button/Button.test.js +0 -10
- package/dist/src/components/Card/MultipleNews/MultiNews.js +0 -46
- package/dist/src/components/Card/PostByCategory/PostByCategory.js +0 -37
- package/dist/src/components/Card/SinglePost/SinglePost.js +0 -10
- package/dist/src/components/Card/contactProfile/ContactProfile.js +0 -39
- package/dist/src/components/Card/photoAlbum/PhotoAlbum.js +0 -16
- package/dist/src/components/Card/photoGallery/PhotoGallery.js +0 -8
- package/dist/src/components/Checkbox/checkbox.stories.js +0 -78
- package/dist/src/components/ColorPicker/ColorPicker.stories.js +0 -77
- package/dist/src/components/Colors/color.stories.js +0 -32
- package/dist/src/components/DatePicker/DatePicker.js +0 -64
- package/dist/src/components/DatePicker/DatePicker.stories.js +0 -171
- package/dist/src/components/DateRangePicker/DateRangePicker.stories.js +0 -318
- package/dist/src/components/Dropdown/Combobox/Combobox.stories.js +0 -225
- package/dist/src/components/Dropdown/Combobox/dialog.js +0 -68
- package/dist/src/components/Dropdown/Combobox/utils/renderBadge.js +0 -5
- package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.js +0 -253
- package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.js +0 -9
- package/dist/src/components/Dropdown/select.js +0 -87
- package/dist/src/components/Icons/stories/IconDropdown.js +0 -38
- package/dist/src/components/Icons/stories/IconGallery.js +0 -31
- package/dist/src/components/Icons/stories/InteractiveIconSelector.js +0 -26
- package/dist/src/components/Input/Input.stories.js +0 -133
- package/dist/src/components/Modal/Modal.stories.js +0 -115
- package/dist/src/components/Pagination/pagination.stories.js +0 -168
- package/dist/src/components/Skeleton/skeleton.stories.js +0 -414
- package/dist/src/components/Slider/slider.js +0 -38
- package/dist/src/components/Tabs/tabs.js +0 -43
- package/dist/src/components/TimePicker/TimePicker.stories.js +0 -176
- package/dist/src/components/ToolTip/Tooltip.js +0 -8
- package/dist/src/components/Typography/Heading/Heading.stories.js +0 -67
- package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +0 -100
- package/dist/src/components/VerticalTabs/VerticalTabs.test.js +0 -48
- package/dist/src/components/ui/command.js +0 -65
- package/dist/src/components/ui/popover.js +0 -42
- package/dist/src/components/ui/tooltip.js +0 -42
- /package/dist/src/components/AppIcons/{AppIcon.stories.js → AppIcon.stories.jsx} +0 -0
- /package/dist/src/components/Card/SinglePost/{SinglePost.stories.js → SinglePost.stories.jsx} +0 -0
- /package/dist/src/components/Icons/{LUIcon.test.js → LUIcon.test.jsx} +0 -0
- /package/dist/src/components/ImageUploader/{ImageUploader.stories.js → ImageUploader.stories.jsx} +0 -0
- /package/dist/src/components/Slider/{Slider.stories.js → Slider.stories.jsx} +0 -0
- /package/dist/src/components/ui/{collapsible.js → collapsible.jsx} +0 -0
package/dist/src/components/Card/MultipleNews/{MultiNews.stories.js → MultiNews.stories.jsx}
RENAMED
|
@@ -9,7 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, } from "../../../utils/constants";
|
|
14
13
|
import { OrientationEnum } from "../../../utils/enums";
|
|
15
14
|
import Card from "../card";
|
|
@@ -61,7 +60,7 @@ var meta = {
|
|
|
61
60
|
args.mediaPosition = "top";
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
|
-
return
|
|
63
|
+
return <Story />;
|
|
65
64
|
},
|
|
66
65
|
],
|
|
67
66
|
};
|
|
@@ -2,4 +2,4 @@ import { CardInterface } from "../type";
|
|
|
2
2
|
export interface PostByCategoryProps extends Omit<CardInterface, "href" | "type"> {
|
|
3
3
|
onButtonClick?: () => void;
|
|
4
4
|
}
|
|
5
|
-
export declare const PostByCategory: ({ item, image, btnLabel, onButtonClick, editor, mediaPosition, orientation, }: PostByCategoryProps) => import("react
|
|
5
|
+
export declare const PostByCategory: ({ item, image, btnLabel, onButtonClick, editor, mediaPosition, orientation, }: PostByCategoryProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import LuImage from "../../Images/LuImage";
|
|
2
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
3
|
+
import { Body } from "../../Typography/Body/body";
|
|
4
|
+
import { Button } from "../../Button/Button/Button";
|
|
5
|
+
export var PostByCategory = function (_a) {
|
|
6
|
+
var item = _a.item, image = _a.image, btnLabel = _a.btnLabel, onButtonClick = _a.onButtonClick, editor = _a.editor, mediaPosition = _a.mediaPosition, orientation = _a.orientation;
|
|
7
|
+
// Normalize mediaPosition based on orientation
|
|
8
|
+
var safeMediaPosition = orientation === "horizontal"
|
|
9
|
+
? mediaPosition === "left" || mediaPosition === "right"
|
|
10
|
+
? mediaPosition
|
|
11
|
+
: "right"
|
|
12
|
+
: mediaPosition === "top" || mediaPosition === "bottom"
|
|
13
|
+
? mediaPosition
|
|
14
|
+
: "top";
|
|
15
|
+
// Common card media component to avoid duplication
|
|
16
|
+
var CardMedia = function (_a) {
|
|
17
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
18
|
+
return (<LuImage src={image} width={240} height={240} className={"!rounded-lg ".concat(className, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)} alt="Image"/>);
|
|
19
|
+
};
|
|
20
|
+
// Common content section component
|
|
21
|
+
var CardContent = function (_a) {
|
|
22
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
23
|
+
return (<div className={"flex flex-col !gap-1 ".concat(className, " ")}>
|
|
24
|
+
<Heading variant="h4-600" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle, " capitalize line-clamp-1 !m-0")}>
|
|
25
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
26
|
+
</Heading>
|
|
27
|
+
<Body variant="body-md" className={" ".concat(orientation === "horizontal" ? "line-clamp-1" : "line-clamp-2", " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
|
|
28
|
+
{item === null || item === void 0 ? void 0 : item.description}
|
|
29
|
+
</Body>
|
|
30
|
+
</div>);
|
|
31
|
+
};
|
|
32
|
+
// Common button component
|
|
33
|
+
var CardButton = function (_a) {
|
|
34
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
35
|
+
return (<Button endIcon={"angle-right"} size="sm" className={"w-fit ".concat(className, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn)} onClick={onButtonClick}>
|
|
36
|
+
{btnLabel}
|
|
37
|
+
</Button>);
|
|
38
|
+
};
|
|
39
|
+
// Horizontal layout
|
|
40
|
+
if (orientation === "horizontal") {
|
|
41
|
+
return (<div className={"!p-5 rounded-xl grid grid-cols-1 sm:grid-cols-3 max-w-5xl !gap-5 items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
|
|
42
|
+
<CardMedia className={"".concat(safeMediaPosition === "right" && " order-last", " w-full aspect-5/4 sm:aspect-square object-cover")}/>
|
|
43
|
+
<div className="flex flex-col !gap-2 md:!gap-5 sm:col-span-2 h-full justify-center">
|
|
44
|
+
<CardContent />
|
|
45
|
+
<CardButton />
|
|
46
|
+
</div>
|
|
47
|
+
</div>);
|
|
48
|
+
}
|
|
49
|
+
// Vertical layout
|
|
50
|
+
return (<div className={"!p-5 sm:p-8 rounded-xl flex flex-col !gap-5 max-w-[480px] shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
|
|
51
|
+
<div className={"flex w-full ".concat(safeMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center !gap-5 ")}>
|
|
52
|
+
<CardMedia className="w-full h-full aspect-5/4 object-cover"/>
|
|
53
|
+
<CardContent className="h-20"/>
|
|
54
|
+
</div>
|
|
55
|
+
<CardButton />
|
|
56
|
+
</div>);
|
|
57
|
+
};
|
|
@@ -9,7 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, } from "../../../utils/constants";
|
|
14
13
|
import { OrientationEnum } from "../../../utils/enums";
|
|
15
14
|
import Card from "../card";
|
|
@@ -61,7 +60,7 @@ var meta = {
|
|
|
61
60
|
args.mediaPosition = "top";
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
|
-
return
|
|
63
|
+
return <Story />;
|
|
65
64
|
},
|
|
66
65
|
],
|
|
67
66
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardInterface } from "../type";
|
|
2
|
-
export declare const SinglePost: ({ item, image, href, btnLabel, editor, mediaPosition, }: CardInterface) => import("react
|
|
2
|
+
export declare const SinglePost: ({ item, image, href, btnLabel, editor, mediaPosition, }: CardInterface) => import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import LuImage from "../../Images/LuImage";
|
|
2
|
+
import Link from "next/link";
|
|
3
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
4
|
+
import { Body } from "../../Typography/Body/body";
|
|
5
|
+
import { Button } from "../../Button/Button/Button";
|
|
6
|
+
export var SinglePost = function (_a) {
|
|
7
|
+
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;
|
|
8
|
+
return (<div className={" bg-white rounded-3xl grid grid-cols-1 sm:grid-cols-2 overflow-hidden items-stretch shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
|
|
9
|
+
<LuImage src={image} width={240} height={240} className={"w-full h-full ".concat(mediaPosition === "right" ? "order-1" : "", " aspect-5/4 object-cover ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)} alt="Image"/>
|
|
10
|
+
<div className="p-9 grid grid-rows-[1fr] items-center !gap-2 ">
|
|
11
|
+
<div className="flex flex-col !gap-3 ">
|
|
12
|
+
<Heading variant="h2-500" className={"line-clamp-1 md:line-clamp-2 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle)}>
|
|
13
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
14
|
+
</Heading>
|
|
15
|
+
<Body variant="body-xl" className={"line-clamp-2 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " ")}>
|
|
16
|
+
{item === null || item === void 0 ? void 0 : item.description}
|
|
17
|
+
</Body>
|
|
18
|
+
</div>
|
|
19
|
+
<Link href={href} passHref>
|
|
20
|
+
<Button endIcon={"angle-right"} size="lg" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn)}>
|
|
21
|
+
{btnLabel}
|
|
22
|
+
</Button>
|
|
23
|
+
</Link>
|
|
24
|
+
</div>
|
|
25
|
+
</div>);
|
|
26
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import type { MultiNewsProps } from "./MultipleNews/MultiNews";
|
|
2
3
|
import type { CardInterface } from "./type";
|
|
3
4
|
import { PostByCategoryProps } from "./PostByCategory/PostByCategory";
|
|
@@ -17,5 +18,5 @@ export type CardProps = ({
|
|
|
17
18
|
type: K;
|
|
18
19
|
} & CardInterface;
|
|
19
20
|
}[CardTypesWithCardInterface];
|
|
20
|
-
declare const Card: (props: CardProps) =>
|
|
21
|
+
declare const Card: (props: CardProps) => React.JSX.Element | null;
|
|
21
22
|
export default Card;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
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 } from "react/jsx-runtime";
|
|
1
|
+
import React from "react";
|
|
13
2
|
import { PostByCategory, } from "./PostByCategory/PostByCategory";
|
|
14
3
|
import { MultipleNewsCard } from "./MultipleNews/MultiNews";
|
|
15
4
|
import { SinglePost } from "./SinglePost/SinglePost";
|
|
@@ -26,6 +15,6 @@ var cardComponents = {
|
|
|
26
15
|
};
|
|
27
16
|
var Card = function (props) {
|
|
28
17
|
var Component = cardComponents[props.type];
|
|
29
|
-
return Component ?
|
|
18
|
+
return Component ? <Component {...props}/> : null;
|
|
30
19
|
};
|
|
31
20
|
export default Card;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CardInterface } from "../type";
|
|
2
|
-
export declare const ContactProfile: ({ item, image, href, btnLabel, editor, mediaPosition, orientation, }: CardInterface) => import("react
|
|
2
|
+
export declare const ContactProfile: ({ item, image, href, btnLabel, editor, mediaPosition, orientation, }: CardInterface) => import("react").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import Link from "next/link";
|
|
2
|
+
import LuImage from "../../Images/LuImage";
|
|
3
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
4
|
+
import { Body } from "../../Typography/Body/body";
|
|
5
|
+
import { Button } from "../../Button/Button/Button";
|
|
6
|
+
import LUIcon from "../../../components/Icons/LUIcon";
|
|
7
|
+
export var ContactProfile = function (_a) {
|
|
8
|
+
var item = _a.item, image = _a.image, href = _a.href, btnLabel = _a.btnLabel, editor = _a.editor, mediaPosition = _a.mediaPosition, orientation = _a.orientation;
|
|
9
|
+
// Normalize mediaPosition based on orientation
|
|
10
|
+
var safeMediaPosition = orientation === "horizontal"
|
|
11
|
+
? mediaPosition === "left" || mediaPosition === "right"
|
|
12
|
+
? mediaPosition
|
|
13
|
+
: "right"
|
|
14
|
+
: mediaPosition === "top" || mediaPosition === "bottom"
|
|
15
|
+
? mediaPosition
|
|
16
|
+
: "top";
|
|
17
|
+
// Common card media component to avoid duplication
|
|
18
|
+
var CardMedia = function (_a) {
|
|
19
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
20
|
+
return (<LuImage src={image} width={240} height={240} className={"w-full h-full rounded-full max-w-40 mx-auto aspect-square object-cover ".concat(className, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)} alt="Image"/>);
|
|
21
|
+
};
|
|
22
|
+
// Common content section component
|
|
23
|
+
var CardContent = function (_a) {
|
|
24
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
25
|
+
return (<div className={"flex flex-col !gap-1 ".concat(className, " min-w-0")}>
|
|
26
|
+
{(item === null || item === void 0 ? void 0 : item.designation) && (<Body variant="body-md" className="text-gray-600 capitalize truncate min-w-0">
|
|
27
|
+
{item === null || item === void 0 ? void 0 : item.designation}
|
|
28
|
+
</Body>)}
|
|
29
|
+
<Heading variant="h5-600" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle, " capitalize truncate min-w-0")}>
|
|
30
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
31
|
+
</Heading>
|
|
32
|
+
<Body variant="body-md" className={" ".concat(orientation === "horizontal" ? "line-clamp-1" : "line-clamp-2", " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
|
|
33
|
+
{item === null || item === void 0 ? void 0 : item.description}
|
|
34
|
+
</Body>
|
|
35
|
+
{(item === null || item === void 0 ? void 0 : item.email) && (<div className="flex items-center gap-2 min-w-0">
|
|
36
|
+
<LUIcon icon="envelope" size="lg"/>
|
|
37
|
+
<Body variant="body-md" className="text-gray-600 truncate min-w-0">
|
|
38
|
+
{item === null || item === void 0 ? void 0 : item.email}
|
|
39
|
+
</Body>
|
|
40
|
+
</div>)}
|
|
41
|
+
{(item === null || item === void 0 ? void 0 : item.phone) && (<div className="flex items-center gap-2 min-w-0">
|
|
42
|
+
<LUIcon icon="phone" size="lg"/>
|
|
43
|
+
<Body variant="body-md" className="text-gray-600 truncate min-w-0">
|
|
44
|
+
{item === null || item === void 0 ? void 0 : item.phone}
|
|
45
|
+
</Body>
|
|
46
|
+
</div>)}
|
|
47
|
+
</div>);
|
|
48
|
+
};
|
|
49
|
+
// Common button component
|
|
50
|
+
var CardButton = function (_a) {
|
|
51
|
+
var _b = _a.className, className = _b === void 0 ? "" : _b;
|
|
52
|
+
return btnLabel ? (<Link href={href || "#"} passHref>
|
|
53
|
+
<Button endIcon={"angle-right"} size="sm" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn, " ").concat(className)}>
|
|
54
|
+
{btnLabel}
|
|
55
|
+
</Button>
|
|
56
|
+
</Link>) : null;
|
|
57
|
+
};
|
|
58
|
+
// Horizontal layout
|
|
59
|
+
if (orientation === "horizontal") {
|
|
60
|
+
return (<div className={"!p-5 bg-white rounded-xl flex ".concat(safeMediaPosition === "left" ? "sm:flex-row" : "sm:flex-row-reverse", " max-w-5xl !gap-5 items-center shadow-lg ").concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
|
|
61
|
+
<CardMedia className={"".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover")}/>
|
|
62
|
+
<div className={"flex-1 flex flex-col !gap-1 md:!gap-2.5 sm:!text-left h-full justify-center min-w-0 ".concat(safeMediaPosition === "right" ? "order-1" : "order-2")}>
|
|
63
|
+
<CardContent />
|
|
64
|
+
<CardButton />
|
|
65
|
+
</div>
|
|
66
|
+
</div>);
|
|
67
|
+
}
|
|
68
|
+
// Vertical layout
|
|
69
|
+
return (<div className={"p-8 bg-white rounded-xl flex flex-col gap-6 max-w-md items-center shadow-lg ".concat(editor === null || editor === void 0 ? void 0 : editor.card)}>
|
|
70
|
+
<div className={"flex w-full ".concat(safeMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center !gap-5 text-center")}>
|
|
71
|
+
<CardMedia className="w-full h-full aspect-5/4 object-cover"/>
|
|
72
|
+
<CardContent className="h-20"/>
|
|
73
|
+
</div>
|
|
74
|
+
<CardButton />
|
|
75
|
+
</div>);
|
|
76
|
+
};
|
|
@@ -9,7 +9,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
import { DUMMY_designation, DUMMY_email, Dummy_Image, Dummy_Para, DUMMY_phone, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
|
|
14
13
|
import { OrientationEnum } from "../../../utils/enums";
|
|
15
14
|
import Card from "../card";
|
|
@@ -61,7 +60,7 @@ var meta = {
|
|
|
61
60
|
args.mediaPosition = "top";
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
|
-
return
|
|
63
|
+
return <Story />;
|
|
65
64
|
},
|
|
66
65
|
],
|
|
67
66
|
};
|
|
@@ -4,4 +4,4 @@ export interface PhotoAlbumProps extends Omit<CardInterface, "href" | "orientati
|
|
|
4
4
|
altText?: string;
|
|
5
5
|
theme?: (typeof Themes)[number];
|
|
6
6
|
}
|
|
7
|
-
export declare const PhotoAlbum: ({ image, item, altText, editor, theme, }: PhotoAlbumProps) => import("react
|
|
7
|
+
export declare const PhotoAlbum: ({ image, item, altText, editor, theme, }: PhotoAlbumProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import LuImage from "../../../components/Images/LuImage";
|
|
2
|
+
import { Heading } from "../../../components/Typography/Heading/heading";
|
|
3
|
+
import LUIcon from "../../../components/Icons/LUIcon";
|
|
4
|
+
import { AvatarGroup } from "../../Avatar/AvatarGroup/AvatarGroup";
|
|
5
|
+
export var PhotoAlbum = function (_a) {
|
|
6
|
+
var image = _a.image, item = _a.item, _b = _a.altText, altText = _b === void 0 ? "Photo Album" : _b, editor = _a.editor, _c = _a.theme, theme = _c === void 0 ? "theme1" : _c;
|
|
7
|
+
var hasImages = Array.isArray(item === null || item === void 0 ? void 0 : item.images) && item.images.length > 0;
|
|
8
|
+
return (<div className={"group relative max-w-md cursor-pointer ".concat(editor === null || editor === void 0 ? void 0 : editor.card, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)}>
|
|
9
|
+
<LuImage src={image} width={448} height={448} alt={altText} className={"aspect-square object-cover transition-transform"}/>
|
|
10
|
+
<div className={"absolute inset-0 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardOverlay, " bg-linear-to-t from-black to-transparent")}></div>
|
|
11
|
+
{theme === "theme2" ? (<div className="absolute bottom-0 right-0 w-full bg-black/75 !px-5 !py-3 flex items-center justify-between duration-300
|
|
12
|
+
group-hover:bg-transparent">
|
|
13
|
+
<Heading variant="h4-700" className={"line-clamp-1 text-white uppercase ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
|
|
14
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
15
|
+
</Heading>
|
|
16
|
+
{hasImages && (<div>
|
|
17
|
+
<AvatarGroup images={((item === null || item === void 0 ? void 0 : item.images) || []).map(function (img) { return ({
|
|
18
|
+
id: img.gallery_id,
|
|
19
|
+
image: img.gallery_image,
|
|
20
|
+
}); })}/>
|
|
21
|
+
</div>)}
|
|
22
|
+
</div>) : (<>
|
|
23
|
+
{hasImages && (<div className="absolute top-0 right-0 !px-5 !py-3">
|
|
24
|
+
<AvatarGroup images={((item === null || item === void 0 ? void 0 : item.images) || []).map(function (img) { return ({
|
|
25
|
+
id: img.gallery_id,
|
|
26
|
+
image: img.gallery_image,
|
|
27
|
+
}); })}/>
|
|
28
|
+
</div>)}
|
|
29
|
+
<div className="absolute !px-5 !py-3 bottom-0">
|
|
30
|
+
<Heading variant="h4-700" className={"line-clamp-1 text-white uppercase ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
|
|
31
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
32
|
+
</Heading>
|
|
33
|
+
</div>
|
|
34
|
+
</>)}
|
|
35
|
+
|
|
36
|
+
{/* Search icon - appears on hover */}
|
|
37
|
+
<div className={"absolute inset-0 flex items-center justify-center opacity-0 group-hover:!opacity-100 duration-300 ease-out ".concat(theme === "theme2" ? "bg-black/75 origin-bottom scale-y-0 transition-all group-hover:scale-y-100" : "bg-black/30")}>
|
|
38
|
+
<LUIcon icon="magnifying-glass" size="4xl" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " text-gray-100")}/>
|
|
39
|
+
</div>
|
|
40
|
+
</div>);
|
|
41
|
+
};
|
package/dist/src/components/Card/photoAlbum/{PhotoAlbum.stories.js → PhotoAlbum.stories.jsx}
RENAMED
|
@@ -1,15 +1,3 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
1
|
import { Dummy_Image, Dummy_Title } from "../../../utils/constants";
|
|
14
2
|
import Card from "../card";
|
|
15
3
|
export var Themes = ["theme1", "theme2"];
|
|
@@ -25,7 +13,7 @@ export default {
|
|
|
25
13
|
},
|
|
26
14
|
},
|
|
27
15
|
};
|
|
28
|
-
var Template = function (args) { return
|
|
16
|
+
var Template = function (args) { return <Card {...args}/>; };
|
|
29
17
|
export var Default = Template.bind({});
|
|
30
18
|
Default.args = {
|
|
31
19
|
type: "photoAlbum",
|
|
@@ -2,4 +2,4 @@ import { CardInterface } from "../type";
|
|
|
2
2
|
export interface PhotoGalleryProps extends Omit<CardInterface, "href" | "orientation" | "mediaPosition" | "btnLabel"> {
|
|
3
3
|
altText?: string;
|
|
4
4
|
}
|
|
5
|
-
export declare const PhotoGallery: ({ image, item, altText, editor, }: PhotoGalleryProps) => import("react
|
|
5
|
+
export declare const PhotoGallery: ({ image, item, altText, editor, }: PhotoGalleryProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import LuImage from "../../../components/Images/LuImage";
|
|
2
|
+
import { Heading } from "../../../components/Typography/Heading/heading";
|
|
3
|
+
import LUIcon from "../../../components/Icons/LUIcon";
|
|
4
|
+
export var PhotoGallery = function (_a) {
|
|
5
|
+
var image = _a.image, item = _a.item, _b = _a.altText, altText = _b === void 0 ? "Photo Gallery" : _b, editor = _a.editor;
|
|
6
|
+
return (<div className={"group relative max-w-md cursor-pointer ".concat(editor === null || editor === void 0 ? void 0 : editor.card, " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardImage)}>
|
|
7
|
+
<LuImage src={image} width={448} height={448} alt={altText} className={"aspect-square object-cover transition-transform"}/>
|
|
8
|
+
<div className={"absolute ".concat(editor === null || editor === void 0 ? void 0 : editor.cardOverlay, " inset-0 bg-linear-to-t from-black to-transparent")}></div>
|
|
9
|
+
<Heading variant="h4-700" className={"absolute line-clamp-1 text-white bottom-4 uppercase !px-5 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
|
|
10
|
+
{item === null || item === void 0 ? void 0 : item.title}
|
|
11
|
+
</Heading>
|
|
12
|
+
{/* Search icon - appears on hover */}
|
|
13
|
+
<div className="absolute inset-0 flex items-center justify-center bg-black/30 opacity-0 group-hover:!opacity-100 transition-opacity duration-300 ease-out">
|
|
14
|
+
<LUIcon icon="magnifying-glass" size="4xl" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " text-gray-100")}/>
|
|
15
|
+
</div>
|
|
16
|
+
</div>);
|
|
17
|
+
};
|
package/dist/src/components/Card/photoGallery/{PhotoGallery.stories.js → PhotoGallery.stories.jsx}
RENAMED
|
@@ -1,15 +1,3 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
13
1
|
// import { CardInterface } from "../type";
|
|
14
2
|
import { Dummy_Image, Dummy_Title } from "../../../utils/constants";
|
|
15
3
|
import Card from "../card";
|
|
@@ -28,7 +16,7 @@ export default {
|
|
|
28
16
|
},
|
|
29
17
|
},
|
|
30
18
|
};
|
|
31
|
-
var Template = function (args) { return
|
|
19
|
+
var Template = function (args) { return <Card {...args}/>; };
|
|
32
20
|
export var Default = Template.bind({});
|
|
33
21
|
Default.args = {
|
|
34
22
|
type: "photoGallery",
|
|
@@ -8,5 +8,5 @@ export declare const checkboxSize: {
|
|
|
8
8
|
type CheckboxProps = React.ComponentProps<typeof CheckboxPrimitive.Root> & {
|
|
9
9
|
size?: keyof typeof checkboxSize;
|
|
10
10
|
};
|
|
11
|
-
declare function Checkbox({ className, size, ...props }: CheckboxProps):
|
|
11
|
+
declare function Checkbox({ className, size, ...props }: CheckboxProps): React.JSX.Element;
|
|
12
12
|
export { Checkbox };
|
|
@@ -1,14 +1,3 @@
|
|
|
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
1
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
2
|
var t = {};
|
|
14
3
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -20,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
9
|
}
|
|
21
10
|
return t;
|
|
22
11
|
};
|
|
23
|
-
import
|
|
12
|
+
import * as React from "react";
|
|
24
13
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
25
14
|
import { CheckIcon } from "lucide-react";
|
|
26
15
|
import { cn } from "../../lib/utils";
|
|
@@ -49,6 +38,10 @@ var checkboxCva = cva("peer !border border-input !rounded-xs dark:bg-input/30 da
|
|
|
49
38
|
});
|
|
50
39
|
function Checkbox(_a) {
|
|
51
40
|
var className = _a.className, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "size"]);
|
|
52
|
-
return (
|
|
41
|
+
return (<CheckboxPrimitive.Root data-slot="checkbox" className={cn(checkboxCva({ size: size }), className)} {...props}>
|
|
42
|
+
<CheckboxPrimitive.Indicator data-slot="checkbox-indicator" className="flex items-center justify-center text-current transition-none">
|
|
43
|
+
<CheckIcon className={iconSize[size]}/>
|
|
44
|
+
</CheckboxPrimitive.Indicator>
|
|
45
|
+
</CheckboxPrimitive.Root>);
|
|
53
46
|
}
|
|
54
47
|
export { Checkbox };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Checkbox, checkboxSize } from "./checkbox";
|
|
2
|
+
import { Label } from "../Label/Label";
|
|
3
|
+
import { Button } from "../Button/Button/Button";
|
|
4
|
+
var meta = {
|
|
5
|
+
title: "components/Checkbox",
|
|
6
|
+
component: Checkbox,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "centered",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
argTypes: {
|
|
12
|
+
checked: { control: "boolean" },
|
|
13
|
+
defaultChecked: { control: "boolean" },
|
|
14
|
+
disabled: { control: "boolean" },
|
|
15
|
+
onCheckedChange: { action: "checked changed" },
|
|
16
|
+
size: {
|
|
17
|
+
control: { type: "select" },
|
|
18
|
+
options: Object.keys(checkboxSize),
|
|
19
|
+
description: "Checkbox size",
|
|
20
|
+
table: {
|
|
21
|
+
defaultValue: { summary: "md" },
|
|
22
|
+
type: { summary: Object.keys(checkboxSize).join(" | ") },
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
export var Default = {
|
|
29
|
+
args: {
|
|
30
|
+
id: "default",
|
|
31
|
+
},
|
|
32
|
+
render: function (args) { return (<div className="flex items-center space-x-2">
|
|
33
|
+
<Checkbox {...args}/>
|
|
34
|
+
<Label htmlFor="default" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
35
|
+
Accept terms and conditions
|
|
36
|
+
</Label>
|
|
37
|
+
</div>); },
|
|
38
|
+
};
|
|
39
|
+
export var Checked = {
|
|
40
|
+
args: {
|
|
41
|
+
id: "checked",
|
|
42
|
+
defaultChecked: true,
|
|
43
|
+
},
|
|
44
|
+
render: function (args) { return (<div className="flex items-center space-x-2">
|
|
45
|
+
<Checkbox {...args}/>
|
|
46
|
+
<Label htmlFor="checked" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
47
|
+
Checked option
|
|
48
|
+
</Label>
|
|
49
|
+
</div>); },
|
|
50
|
+
};
|
|
51
|
+
export var Disabled = {
|
|
52
|
+
args: {
|
|
53
|
+
id: "disabled",
|
|
54
|
+
disabled: true,
|
|
55
|
+
},
|
|
56
|
+
render: function (args) { return (<div className="flex items-center space-x-2">
|
|
57
|
+
<Checkbox {...args}/>
|
|
58
|
+
<Label htmlFor="disabled" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
59
|
+
Disabled option
|
|
60
|
+
</Label>
|
|
61
|
+
</div>); },
|
|
62
|
+
};
|
|
63
|
+
export var DisabledChecked = {
|
|
64
|
+
args: {
|
|
65
|
+
id: "disabled-checked",
|
|
66
|
+
disabled: true,
|
|
67
|
+
defaultChecked: true,
|
|
68
|
+
},
|
|
69
|
+
render: function (args) { return (<div className="flex items-center space-x-2">
|
|
70
|
+
<Checkbox {...args}/>
|
|
71
|
+
<Label htmlFor="disabled-checked" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
72
|
+
Disabled checked option
|
|
73
|
+
</Label>
|
|
74
|
+
</div>); },
|
|
75
|
+
};
|
|
76
|
+
export var Form = {
|
|
77
|
+
render: function () { return (<div className="space-y-4">
|
|
78
|
+
<h3 className="text-lg font-medium">Terms of Service</h3>
|
|
79
|
+
<p className="text-sm text-muted-foreground">
|
|
80
|
+
Please read and accept our terms of service to continue.
|
|
81
|
+
</p>
|
|
82
|
+
<form className="space-y-2">
|
|
83
|
+
<div className="flex items-center space-x-2">
|
|
84
|
+
<Checkbox id="terms1"/>
|
|
85
|
+
<label htmlFor="terms1" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
86
|
+
I accept the terms and conditions
|
|
87
|
+
</label>
|
|
88
|
+
</div>
|
|
89
|
+
<div className="flex items-center space-x-2">
|
|
90
|
+
<Checkbox id="terms2"/>
|
|
91
|
+
<Label htmlFor="terms2" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
92
|
+
I agree to receive marketing emails
|
|
93
|
+
</Label>
|
|
94
|
+
</div>
|
|
95
|
+
<Button type="submit" className="mt-4 rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700">
|
|
96
|
+
Submit
|
|
97
|
+
</Button>
|
|
98
|
+
</form>
|
|
99
|
+
</div>); },
|
|
100
|
+
};
|
|
101
|
+
export var WithAlert = {
|
|
102
|
+
args: {
|
|
103
|
+
id: "alert-checkbox",
|
|
104
|
+
},
|
|
105
|
+
render: function (args) { return (<div className="flex items-center space-x-2">
|
|
106
|
+
<Checkbox {...args} onCheckedChange={function (checked) {
|
|
107
|
+
window.alert("Checkbox is now ".concat(checked ? "checked" : "unchecked"));
|
|
108
|
+
}}/>
|
|
109
|
+
<Label htmlFor="alert-checkbox" className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70">
|
|
110
|
+
Click to show alert
|
|
111
|
+
</Label>
|
|
112
|
+
</div>); },
|
|
113
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ColorPickerProps } from "./type";
|
|
2
|
-
declare const ColorPicker: ({ onChange, value, size, variant, color, shape, className, ...props }: ColorPickerProps) => import("react
|
|
2
|
+
declare const ColorPicker: ({ onChange, value, size, variant, color, shape, className, ...props }: ColorPickerProps) => import("react").JSX.Element;
|
|
3
3
|
export default ColorPicker;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
3
|
var t = {};
|
|
15
4
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -21,7 +10,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
10
|
}
|
|
22
11
|
return t;
|
|
23
12
|
};
|
|
24
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
13
|
import { useState, useEffect } from "react";
|
|
26
14
|
import { Input } from "../Input/input";
|
|
27
15
|
import { getColorPickerSizes, getShapeClass } from ".";
|
|
@@ -69,6 +57,11 @@ var ColorPicker = function (_a) {
|
|
|
69
57
|
var handleColorInputChange = function (e) {
|
|
70
58
|
handleColorChange(e.target.value);
|
|
71
59
|
};
|
|
72
|
-
return (
|
|
60
|
+
return (<div className="relative">
|
|
61
|
+
<div className={"".concat(sizes.colorBox, " ").concat(sizes.left, " !border border-gray-200 ").concat(getShapeClass(shape), " top-1/2 -translate-y-1/2 absolute z-10 overflow-hidden")} style={{ backgroundColor: hexColor }}>
|
|
62
|
+
<Input type="color" value={hexColor} onChange={handleColorInputChange} className="h-full w-full opacity-0 cursor-pointer" aria-label="Select color" variant={variant} color={color} shape={shape}/>
|
|
63
|
+
</div>
|
|
64
|
+
<Input type="text" value={hexColor} onChange={handleHexChange} maxLength={7} aria-label="Hex color input" className={"p-1.5 border ".concat(sizes.minWidth, " ").concat(sizes.paddingStart, " ").concat(className || "")} size={size} variant={variant} color={color} shape={shape} {...props}/>
|
|
65
|
+
</div>);
|
|
73
66
|
};
|
|
74
67
|
export default ColorPicker;
|
|
@@ -3,11 +3,11 @@ import { ColorPickerProps } from "./type";
|
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerProps>;
|
|
6
|
-
export declare const Sizes: () => import("react
|
|
7
|
-
export declare const Variants: () => import("react
|
|
8
|
-
export declare const Colors: () => import("react
|
|
9
|
-
export declare const Shapes: () => import("react
|
|
10
|
-
export declare const AllCombinations: () => import("react
|
|
6
|
+
export declare const Sizes: () => import("react").JSX.Element;
|
|
7
|
+
export declare const Variants: () => import("react").JSX.Element;
|
|
8
|
+
export declare const Colors: () => import("react").JSX.Element;
|
|
9
|
+
export declare const Shapes: () => import("react").JSX.Element;
|
|
10
|
+
export declare const AllCombinations: () => import("react").JSX.Element;
|
|
11
11
|
export declare const WithCustomClassName: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerProps>;
|
|
12
12
|
export declare const Disabled: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerProps>;
|
|
13
13
|
export declare const Playground: import("@storybook/core/csf").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, ColorPickerProps>;
|