linkedunion-design-kit 1.9.6-beta.0 → 1.9.6-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/build/types/validator.js +12 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +2 -0
  4. package/dist/src/components/Badge/Badge.stories.d.ts +1 -1
  5. package/dist/src/components/Badge/Badge.stories.js +1 -1
  6. package/dist/src/components/Button/Button/Button.module.css +1 -1
  7. package/dist/src/components/Card/MultipleNews/MultiNews.js +2 -2
  8. package/dist/src/components/Pagination/pagination.js +7 -7
  9. package/dist/src/components/Skeleton/skeleton.stories.d.ts +3 -1
  10. package/dist/src/components/Skeleton/skeleton.stories.js +48 -38
  11. package/dist/src/components/Title/Title.module.css +1 -1
  12. package/dist/src/components/Typography/Heading/heading.module.css +1 -1
  13. package/dist/src/components/VerticalTabs/VerticalTabs.d.ts +18 -0
  14. package/dist/src/components/VerticalTabs/VerticalTabs.js +60 -0
  15. package/dist/src/components/VerticalTabs/VerticalTabs.stories.d.ts +11 -0
  16. package/dist/src/components/VerticalTabs/VerticalTabs.stories.js +100 -0
  17. package/dist/src/components/VerticalTabs/VerticalTabs.test.d.ts +1 -0
  18. package/dist/src/components/VerticalTabs/VerticalTabs.test.js +48 -0
  19. package/dist/styles/global.css +118 -6
  20. package/package.json +2 -2
  21. package/dist/app/layout.jsx +0 -13
  22. package/dist/app/page.jsx +0 -5
  23. package/dist/src/components/Accordion/Accordion.stories.jsx +0 -33
  24. package/dist/src/components/Accordion/accordion.jsx +0 -59
  25. package/dist/src/components/Alerts/Alert/alert.jsx +0 -152
  26. package/dist/src/components/Alerts/Alert/alert.stories.jsx +0 -344
  27. package/dist/src/components/Alerts/AlertDialog/alert-dialog.jsx +0 -170
  28. package/dist/src/components/Alerts/AlertDialog/alert-dialog.stories.jsx +0 -552
  29. package/dist/src/components/AppIcons/AndroidIcon.jsx +0 -24
  30. package/dist/src/components/AppIcons/AppIcon.jsx +0 -29
  31. package/dist/src/components/AppIcons/AppIcon.stories.jsx +0 -223
  32. package/dist/src/components/AppIcons/AppleIcon.jsx +0 -31
  33. package/dist/src/components/AppIcons/PlayStoreIcon.jsx +0 -29
  34. package/dist/src/components/Avatar/Avatar/Avatar.jsx +0 -45
  35. package/dist/src/components/Avatar/Avatar/Avatar.stories.jsx +0 -95
  36. package/dist/src/components/Avatar/Avatar/Avatar.test.jsx +0 -9
  37. package/dist/src/components/Avatar/Avatar/type.d.ts +0 -12
  38. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.jsx +0 -17
  39. package/dist/src/components/Avatar/AvatarGroup/AvatarGroup.stories.jsx +0 -32
  40. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.jsx +0 -20
  41. package/dist/src/components/Avatar/StatusIndicator/StatusIndicator.stories.jsx +0 -50
  42. package/dist/src/components/Badge/Badge.jsx +0 -54
  43. package/dist/src/components/Badge/Badge.stories.jsx +0 -201
  44. package/dist/src/components/Button/Button/Button.jsx +0 -96
  45. package/dist/src/components/Button/Button/Button.stories.jsx +0 -283
  46. package/dist/src/components/Button/Button/Button.test.jsx +0 -73
  47. package/dist/src/components/Button/IconButton/IconButton.jsx +0 -63
  48. package/dist/src/components/Button/IconButton/IconButton.stories.jsx +0 -128
  49. package/dist/src/components/Button/IconButton/IconButton.test.jsx +0 -28
  50. package/dist/src/components/Card/MultipleNews/MultiNews.jsx +0 -70
  51. package/dist/src/components/Card/MultipleNews/MultiNews.stories.jsx +0 -101
  52. package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +0 -60
  53. package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +0 -102
  54. package/dist/src/components/Card/SinglePost/SinglePost.jsx +0 -26
  55. package/dist/src/components/Card/SinglePost/SinglePost.stories.jsx +0 -63
  56. package/dist/src/components/Card/card.jsx +0 -20
  57. package/dist/src/components/Card/contactProfile/ContactProfile.jsx +0 -60
  58. package/dist/src/components/Card/contactProfile/ContactProfile.stories.jsx +0 -99
  59. package/dist/src/components/Card/photoAlbum/PhotoAlbum.jsx +0 -41
  60. package/dist/src/components/Card/photoAlbum/PhotoAlbum.stories.jsx +0 -51
  61. package/dist/src/components/Card/photoGallery/PhotoGallery.jsx +0 -17
  62. package/dist/src/components/Card/photoGallery/PhotoGallery.stories.jsx +0 -34
  63. package/dist/src/components/Checkbox/checkbox.jsx +0 -47
  64. package/dist/src/components/Checkbox/checkbox.stories.jsx +0 -113
  65. package/dist/src/components/ColorPicker/ColorPicker.jsx +0 -67
  66. package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +0 -138
  67. package/dist/src/components/Colors/color.jsx +0 -5
  68. package/dist/src/components/Colors/color.stories.jsx +0 -20
  69. package/dist/src/components/Colors/color.test.jsx +0 -23
  70. package/dist/src/components/Dropdown/Combobox/Combobox.jsx +0 -198
  71. package/dist/src/components/Dropdown/Combobox/Combobox.stories.jsx +0 -289
  72. package/dist/src/components/Dropdown/Combobox/utils/renderBadge.jsx +0 -7
  73. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.jsx +0 -102
  74. package/dist/src/components/Dropdown/DropdownMenu/DropdownMenu.stories.jsx +0 -464
  75. package/dist/src/components/Dropdown/DropdownMenu/SelectAllSection.jsx +0 -19
  76. package/dist/src/components/Dropdown/Select.stories.jsx +0 -201
  77. package/dist/src/components/Dropdown/select.jsx +0 -93
  78. package/dist/src/components/Icons/LUIcon.jsx +0 -41
  79. package/dist/src/components/Icons/LUIcon.test.jsx +0 -308
  80. package/dist/src/components/Icons/stories/IconDropdown.jsx +0 -67
  81. package/dist/src/components/Icons/stories/IconGallery.jsx +0 -77
  82. package/dist/src/components/Icons/stories/InteractiveIconSelector.jsx +0 -86
  83. package/dist/src/components/Icons/stories/LUIcon.stories.jsx +0 -108
  84. package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +0 -50
  85. package/dist/src/components/ImageUploader/imageUploader.jsx +0 -94
  86. package/dist/src/components/Images/LuImage.jsx +0 -19
  87. package/dist/src/components/Images/LuImage.stories.jsx +0 -154
  88. package/dist/src/components/Images/LuImage.test.jsx +0 -44
  89. package/dist/src/components/Input/Input.stories.jsx +0 -250
  90. package/dist/src/components/Input/input.jsx +0 -110
  91. package/dist/src/components/Label/Label.jsx +0 -32
  92. package/dist/src/components/Label/Label.stories.jsx +0 -30
  93. package/dist/src/components/Pagination/pagination.jsx +0 -65
  94. package/dist/src/components/Pagination/pagination.stories.jsx +0 -301
  95. package/dist/src/components/RadioGroup/RadioGroup.stories.jsx +0 -146
  96. package/dist/src/components/RadioGroup/radio-group.jsx +0 -49
  97. package/dist/src/components/Slider/Slider.stories.jsx +0 -159
  98. package/dist/src/components/Slider/slider.jsx +0 -31
  99. package/dist/src/components/SweetAlert/SweetAlert.jsx +0 -147
  100. package/dist/src/components/SweetAlert/SweetAlert.stories.jsx +0 -505
  101. package/dist/src/components/Switch/Switch.stories.jsx +0 -66
  102. package/dist/src/components/Switch/switch.jsx +0 -61
  103. package/dist/src/components/Table/Table.jsx +0 -221
  104. package/dist/src/components/Table/Table.stories.jsx +0 -652
  105. package/dist/src/components/Tabs/Tabs.stories.jsx +0 -29
  106. package/dist/src/components/Tabs/tabs.jsx +0 -32
  107. package/dist/src/components/Title/Title.jsx +0 -8
  108. package/dist/src/components/Title/Title.stories.jsx +0 -37
  109. package/dist/src/components/Title/Title.test.jsx +0 -24
  110. package/dist/src/components/ToolTip/Tooltip.jsx +0 -18
  111. package/dist/src/components/ToolTip/Tooltip.stories.jsx +0 -25
  112. package/dist/src/components/Typography/Body/Body.stories.jsx +0 -34
  113. package/dist/src/components/Typography/Body/body.jsx +0 -52
  114. package/dist/src/components/Typography/Caption/Caption.stories.jsx +0 -24
  115. package/dist/src/components/Typography/Caption/caption.jsx +0 -25
  116. package/dist/src/components/Typography/Display/Display.stories.jsx +0 -24
  117. package/dist/src/components/Typography/Display/display.jsx +0 -39
  118. package/dist/src/components/Typography/Heading/Heading.stories.jsx +0 -37
  119. package/dist/src/components/Typography/Heading/heading.jsx +0 -53
  120. package/dist/src/components/ui/avatar.d.ts +0 -6
  121. package/dist/src/components/ui/avatar.js +0 -38
  122. package/dist/src/components/ui/avatar.jsx +0 -27
  123. package/dist/src/components/ui/button.d.ts +0 -10
  124. package/dist/src/components/ui/button.js +0 -56
  125. package/dist/src/components/ui/button.jsx +0 -45
  126. package/dist/src/components/ui/collapsible.jsx +0 -5
  127. package/dist/src/components/ui/command.jsx +0 -67
  128. package/dist/src/components/ui/dialog.jsx +0 -66
  129. package/dist/src/components/ui/popover.jsx +0 -33
  130. package/dist/src/components/ui/tooltip.jsx +0 -38
  131. package/dist/src/components/ui/typography.jsx +0 -56
  132. /package/dist/{src/components/Avatar/Avatar/type.js → build/types/validator.d.ts} +0 -0
@@ -1,63 +0,0 @@
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 Card from "../card";
13
- import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
14
- var meta = {
15
- title: "Components/Cards/SinglePost",
16
- component: Card,
17
- parameters: {
18
- layout: "centered",
19
- },
20
- argTypes: {
21
- type: {
22
- control: false,
23
- table: {
24
- disable: true,
25
- },
26
- },
27
- orientation: {
28
- table: {
29
- disable: true,
30
- },
31
- },
32
- mediaPosition: {
33
- control: "select",
34
- options: ["left", "right"],
35
- description: "Position of media in horizontal layout",
36
- },
37
- },
38
- };
39
- export default meta;
40
- var baseCardArgs = {
41
- item: {
42
- image: Dummy_Image,
43
- title: Dummy_Title,
44
- description: Dummy_Para,
45
- short_description: Dummy_Subtitle,
46
- },
47
- image: Dummy_Image,
48
- href: Dummy_Url,
49
- btnLabel: "View More",
50
- editor: {
51
- card: "",
52
- cardImage: "",
53
- cardTitle: "",
54
- cardText: "",
55
- cardBtn: "",
56
- },
57
- };
58
- export var SinglePostHorizontalLeft = {
59
- args: __assign(__assign({ type: "singlePost" }, baseCardArgs), { orientation: "horizontal", mediaPosition: "left" }),
60
- };
61
- export var SinglePostHorizontalRight = {
62
- args: __assign(__assign({ type: "singlePost" }, baseCardArgs), { orientation: "horizontal", mediaPosition: "right" }),
63
- };
@@ -1,20 +0,0 @@
1
- import React from "react";
2
- import { PostByCategory } from "./PostByCategory/PostByCategory";
3
- import { MultipleNewsCard } from "./MultipleNews/MultiNews";
4
- import { SinglePost } from "./SinglePost/SinglePost";
5
- import { ContactProfile } from "./contactProfile/ContactProfile";
6
- import { PhotoGallery } from "./photoGallery/PhotoGallery";
7
- import { PhotoAlbum } from "./photoAlbum/PhotoAlbum";
8
- var cardComponents = {
9
- postByCategory: PostByCategory,
10
- contactProfile: ContactProfile,
11
- multipleNews: MultipleNewsCard,
12
- singlePost: SinglePost,
13
- photoGallery: PhotoGallery,
14
- photoAlbum: PhotoAlbum,
15
- };
16
- var Card = function (props) {
17
- var Component = cardComponents[props.type];
18
- return Component ? <Component {...props}/> : null;
19
- };
20
- export default Card;
@@ -1,60 +0,0 @@
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
- export var ContactProfile = function (_a) {
7
- var item = _a.item, image = _a.image, href = _a.href, btnLabel = _a.btnLabel, editor = _a.editor, mediaPosition = _a.mediaPosition, orientation = _a.orientation;
8
- // Normalize mediaPosition based on orientation
9
- var safeMediaPosition = orientation === "horizontal"
10
- ? mediaPosition === "left" || mediaPosition === "right"
11
- ? mediaPosition
12
- : "right"
13
- : mediaPosition === "top" || mediaPosition === "bottom"
14
- ? mediaPosition
15
- : "top";
16
- // Common card media component to avoid duplication
17
- var CardMedia = function (_a) {
18
- var _b = _a.className, className = _b === void 0 ? "" : _b;
19
- 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"/>);
20
- };
21
- // Common content section component
22
- var CardContent = function (_a) {
23
- var _b = _a.className, className = _b === void 0 ? "" : _b;
24
- return (<div className={"flex flex-col !gap-1 ".concat(className)}>
25
- <Heading variant="h5-600" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle, " capitalize line-clamp-1 !m-0")}>
26
- {item === null || item === void 0 ? void 0 : item.title}
27
- </Heading>
28
- <Body variant="body-md" className={" ".concat(orientation === "horizontal" ? "line-clamp-1" : "line-clamp-2", " ").concat(editor === null || editor === void 0 ? void 0 : editor.cardText)}>
29
- {item === null || item === void 0 ? void 0 : item.description}
30
- </Body>
31
- </div>);
32
- };
33
- // Common button component
34
- var CardButton = function (_a) {
35
- var _b = _a.className, className = _b === void 0 ? "" : _b;
36
- return (<Link href={href || "#"} passHref>
37
- <Button endIcon={"angle-right"} size="sm" className={"".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn, " ").concat(className)}>
38
- {btnLabel}
39
- </Button>
40
- </Link>);
41
- };
42
- // Horizontal layout
43
- if (orientation === "horizontal") {
44
- 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)}>
45
- <CardMedia className={"".concat(safeMediaPosition === "right" ? "order-3" : "order-1", " w-full max-w-40 aspect-square object-cover")}/>
46
- <div className={"flex-1 flex flex-col !gap-1 md:!gap-2.5 text-center sm:!text-left h-full justify-center ".concat(safeMediaPosition === "right" ? "order-1" : "order-2")}>
47
- <CardContent />
48
- <CardButton />
49
- </div>
50
- </div>);
51
- }
52
- // Vertical layout
53
- 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)}>
54
- <div className={"flex w-full ".concat(safeMediaPosition === "top" ? "flex-col" : "flex-col-reverse", " items-center !gap-5 text-center")}>
55
- <CardMedia className="w-full h-full aspect-5/4 object-cover"/>
56
- <CardContent className="h-20"/>
57
- </div>
58
- <CardButton />
59
- </div>);
60
- };
@@ -1,99 +0,0 @@
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 { Dummy_Image, Dummy_Para, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
13
- import { OrientationEnum } from "../../../utils/enums";
14
- import Card from "../card";
15
- var meta = {
16
- title: "Components/Cards/ContactProfile",
17
- component: Card,
18
- parameters: {
19
- layout: "centered",
20
- },
21
- argTypes: {
22
- type: {
23
- control: false,
24
- table: {
25
- disable: true,
26
- },
27
- },
28
- orientation: {
29
- control: "select",
30
- options: [OrientationEnum.horizontal, OrientationEnum.vertical],
31
- },
32
- mediaPosition: {
33
- control: "select",
34
- options: ["left", "right", "top", "middle", "bottom"],
35
- description: "For horizontal: use left/right. For vertical: use top/middle/bottom",
36
- },
37
- },
38
- decorators: [
39
- function (Story, context) {
40
- // Dynamically update mediaPosition options based on orientation
41
- var args = context.args;
42
- var orientation = args.orientation;
43
- if (orientation === OrientationEnum.horizontal) {
44
- if (context.argTypes.mediaPosition) {
45
- context.argTypes.mediaPosition.options = ["left", "right"];
46
- }
47
- // Reset mediaPosition if it's not valid for horizontal
48
- if (args.mediaPosition &&
49
- !["left", "right"].includes(args.mediaPosition)) {
50
- args.mediaPosition = "left";
51
- }
52
- }
53
- else if (orientation === OrientationEnum.vertical) {
54
- if (context.argTypes.mediaPosition) {
55
- context.argTypes.mediaPosition.options = ["top", "middle", "bottom"];
56
- }
57
- // Reset mediaPosition if it's not valid for vertical
58
- if (args.mediaPosition &&
59
- !["top", "middle", "bottom"].includes(args.mediaPosition)) {
60
- args.mediaPosition = "top";
61
- }
62
- }
63
- return <Story />;
64
- },
65
- ],
66
- };
67
- export default meta;
68
- var baseCardArgs = {
69
- item: {
70
- image: Dummy_Image,
71
- title: Dummy_Title,
72
- description: Dummy_Para,
73
- },
74
- image: Dummy_Image,
75
- href: Dummy_Url,
76
- btnLabel: "View More",
77
- editor: {
78
- card: "",
79
- cardImage: "",
80
- cardTitle: "",
81
- cardText: "",
82
- cardBtn: "",
83
- },
84
- };
85
- export var ContactProfileHorizontalLeft = {
86
- args: __assign(__assign({ type: "contactProfile" }, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "left" }),
87
- };
88
- export var ContactProfileHorizontalRight = {
89
- args: __assign(__assign({ type: "contactProfile" }, baseCardArgs), { orientation: OrientationEnum.horizontal, mediaPosition: "right" }),
90
- };
91
- export var ContactProfileVerticalTop = {
92
- args: __assign(__assign({ type: "contactProfile" }, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "top" }),
93
- };
94
- export var ContactProfileVerticalMiddle = {
95
- args: __assign(__assign({ type: "contactProfile" }, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "middle" }),
96
- };
97
- export var ContactProfileVerticalBottom = {
98
- args: __assign(__assign({ type: "contactProfile" }, baseCardArgs), { orientation: OrientationEnum.vertical, mediaPosition: "bottom" }),
99
- };
@@ -1,41 +0,0 @@
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
- };
@@ -1,51 +0,0 @@
1
- import { Dummy_Image, Dummy_Title } from "../../../utils/constants";
2
- import Card from "../card";
3
- export default {
4
- title: "Components/Cards/PhotoAlbum",
5
- component: Card,
6
- tags: ["autodocs"],
7
- argTypes: {
8
- theme: {
9
- control: "select",
10
- options: ["theme1", "theme2"], // Add all valid theme options here
11
- description: "Select the card theme",
12
- },
13
- },
14
- };
15
- var Template = function (args) { return <Card {...args}/>; };
16
- export var Default = Template.bind({});
17
- Default.args = {
18
- type: "photoAlbum",
19
- theme: "theme1",
20
- altText: "Photo Gallery",
21
- item: {
22
- title: Dummy_Title,
23
- images: [
24
- {
25
- gallery_name: "Sample Gallery",
26
- gallery_image: "https://randomuser.me/api/portraits/men/32.jpg",
27
- gallery_id: 1,
28
- description: "This is a sample image description.",
29
- },
30
- {
31
- gallery_name: "Another Gallery",
32
- gallery_image: "https://randomuser.me/api/portraits/women/44.jpg",
33
- gallery_id: 2,
34
- description: "This is another sample image description.",
35
- },
36
- {
37
- gallery_name: "Third Gallery",
38
- gallery_image: Dummy_Image,
39
- gallery_id: 3,
40
- description: "This is a third sample image description.",
41
- },
42
- ],
43
- },
44
- image: Dummy_Image,
45
- editor: {
46
- card: "",
47
- cardImage: "",
48
- cardOverlay: "",
49
- cardText: "",
50
- },
51
- };
@@ -1,17 +0,0 @@
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
- };
@@ -1,34 +0,0 @@
1
- // import { CardInterface } from "../type";
2
- import { Dummy_Image, Dummy_Title } from "../../../utils/constants";
3
- import Card from "../card";
4
- export default {
5
- title: "Components/Cards/PhotoGallery",
6
- component: Card,
7
- tags: ["autodocs"],
8
- argTypes: {
9
- altText: {
10
- control: { type: "text", disabled: true },
11
- description: 'Alternative text for the image (default: "Photo Gallery")',
12
- table: {
13
- type: { summary: "string" },
14
- defaultValue: { summary: "Photo Gallery" },
15
- },
16
- },
17
- },
18
- };
19
- var Template = function (args) { return <Card {...args}/>; };
20
- export var Default = Template.bind({});
21
- Default.args = {
22
- type: "photoGallery",
23
- item: {
24
- title: Dummy_Title,
25
- },
26
- image: Dummy_Image,
27
- altText: "Photo Gallery",
28
- editor: {
29
- card: "",
30
- cardImage: "",
31
- cardOverlay: "",
32
- cardText: "",
33
- },
34
- };
@@ -1,47 +0,0 @@
1
- var __rest = (this && this.__rest) || function (s, e) {
2
- var t = {};
3
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
- t[p] = s[p];
5
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
- t[p[i]] = s[p[i]];
9
- }
10
- return t;
11
- };
12
- import * as React from "react";
13
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
14
- import { CheckIcon } from "lucide-react";
15
- import { cn } from "../../lib/utils";
16
- import { cva } from "class-variance-authority";
17
- export var checkboxSize = {
18
- sm: "size-3.5", // ~14px
19
- md: "size-4", // ~16px
20
- lg: "size-5", // ~20px
21
- };
22
- var iconSize = {
23
- sm: "size-3", // ~12px
24
- md: "size-3.5", // ~14px
25
- lg: "size-4", // ~16px
26
- };
27
- var checkboxCva = cva("peer !border border-input !rounded-xs dark:bg-input/30 data-[state=checked]:bg-blue-600 data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-blue-600 data-[state=checked]:border-blue-600 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive shrink-0 hover:border-blue-600 shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", {
28
- variants: {
29
- size: {
30
- sm: "size-3.5",
31
- md: "size-4",
32
- lg: "size-5",
33
- },
34
- },
35
- defaultVariants: {
36
- size: "md",
37
- },
38
- });
39
- function Checkbox(_a) {
40
- var className = _a.className, _b = _a.size, size = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "size"]);
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>);
46
- }
47
- export { Checkbox };
@@ -1,113 +0,0 @@
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,67 +0,0 @@
1
- "use client";
2
- var __rest = (this && this.__rest) || function (s, e) {
3
- var t = {};
4
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
- t[p] = s[p];
6
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
- t[p[i]] = s[p[i]];
10
- }
11
- return t;
12
- };
13
- import { useState, useEffect } from "react";
14
- import { Input } from "../Input/input";
15
- import { getColorPickerSizes, getShapeClass } from ".";
16
- var useDebounce = function (value, delay) {
17
- var _a = useState(value), debouncedValue = _a[0], setDebouncedValue = _a[1];
18
- useEffect(function () {
19
- var handler = setTimeout(function () {
20
- setDebouncedValue(value);
21
- }, delay);
22
- return function () {
23
- clearTimeout(handler);
24
- };
25
- }, [value, delay]);
26
- return debouncedValue;
27
- };
28
- var ColorPicker = function (_a) {
29
- var onChange = _a.onChange, _b = _a.value, value = _b === void 0 ? "#000000" : _b, _c = _a.size, size = _c === void 0 ? "md" : _c, _d = _a.variant, variant = _d === void 0 ? "filled" : _d, _e = _a.color, color = _e === void 0 ? "default" : _e, _f = _a.shape, shape = _f === void 0 ? "square" : _f, className = _a.className, props = __rest(_a, ["onChange", "value", "size", "variant", "color", "shape", "className"]);
30
- var _g = useState(value), hexColor = _g[0], setHexColor = _g[1];
31
- var debouncedHexColor = useDebounce(hexColor, 200); // Use prop or default
32
- var sizes = getColorPickerSizes(size || "md");
33
- // Handle input changes (color picker or text field)
34
- var handleColorChange = function (newColor) {
35
- var formattedColor = newColor.startsWith("#") ? newColor : "#".concat(newColor);
36
- setHexColor(formattedColor); // Set the local state immediately
37
- };
38
- useEffect(function () {
39
- if (value !== hexColor) {
40
- setHexColor(value);
41
- }
42
- }, [value]);
43
- // Trigger onChange callback only when debounced value updates
44
- useEffect(function () {
45
- onChange(debouncedHexColor); // Trigger onChange with debounced value
46
- }, [debouncedHexColor]);
47
- // Handle hex input change
48
- var handleHexChange = function (e) {
49
- var inputValue = e.target.value;
50
- // Ensure it starts with #
51
- if (inputValue.length > 7) {
52
- inputValue = inputValue.slice(0, 7); // Limit the input to 7 characters
53
- }
54
- handleColorChange(inputValue);
55
- };
56
- // Handle color input change (from native color picker)
57
- var handleColorInputChange = function (e) {
58
- handleColorChange(e.target.value);
59
- };
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>);
66
- };
67
- export default ColorPicker;