linkedunion-design-kit 1.7.3 → 1.7.5
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/src/components/Button/Button.js +4 -4
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.d.ts +7 -7
- package/dist/src/components/Card/MultipleNews/MultiNews.stories.js +6 -6
- package/dist/src/components/Card/PhotoGallery.css +11 -0
- package/dist/src/components/Card/{SinglePost.d.ts → SinglePost/SinglePost.d.ts} +1 -1
- package/dist/src/components/Card/SinglePost/SinglePost.js +10 -0
- package/dist/src/components/Card/{SinglePost.stories.js → SinglePost/SinglePost.stories.js} +1 -1
- package/dist/src/components/Card/card.js +1 -1
- package/dist/src/components/ImageUploader/imageUploader.js +1 -1
- package/dist/src/components/Label/Label.js +5 -5
- package/dist/src/components/Typography/Heading/heading.js +6 -6
- package/dist/src/components/ui/accordion.js +1 -1
- package/dist/src/components/ui/caption.js +1 -1
- package/dist/src/components/ui/switch.js +4 -4
- package/dist/src/components/ui/tabs.js +2 -2
- package/dist/src/utils/iconList.js +1 -1
- package/dist/styles/global.css +46 -30
- package/package.json +1 -1
- package/dist/app/layout.jsx +0 -13
- package/dist/app/page.jsx +0 -5
- package/dist/src/components/Accordion/Accordion.stories.jsx +0 -25
- package/dist/src/components/Avatar/Avatar.jsx +0 -17
- package/dist/src/components/Avatar/Avatar.stories.jsx +0 -31
- package/dist/src/components/Avatar/Avatar.test.jsx +0 -51
- package/dist/src/components/Button/Button.jsx +0 -93
- package/dist/src/components/Button/Button.stories.jsx +0 -248
- package/dist/src/components/Button/Button.test.jsx +0 -73
- package/dist/src/components/Button/IconButton.jsx +0 -70
- package/dist/src/components/Button/IconButton.stories.jsx +0 -53
- package/dist/src/components/Button/IconButton.test.jsx +0 -27
- package/dist/src/components/Card/ContactProfile.d.ts +0 -2
- package/dist/src/components/Card/ContactProfile.js +0 -35
- package/dist/src/components/Card/ContactProfile.jsx +0 -57
- package/dist/src/components/Card/ContactProfile.stories.d.ts +0 -9
- package/dist/src/components/Card/ContactProfile.stories.js +0 -52
- package/dist/src/components/Card/ContactProfile.stories.jsx +0 -52
- package/dist/src/components/Card/MultiNews.d.ts +0 -2
- package/dist/src/components/Card/MultiNews.js +0 -43
- package/dist/src/components/Card/MultiNews.jsx +0 -59
- package/dist/src/components/Card/MultiNews.stories.d.ts +0 -9
- package/dist/src/components/Card/MultiNews.stories.js +0 -52
- package/dist/src/components/Card/MultiNews.stories.jsx +0 -52
- package/dist/src/components/Card/PostByCategory/PostByCategory.jsx +0 -60
- package/dist/src/components/Card/PostByCategory/PostByCategory.stories.jsx +0 -54
- package/dist/src/components/Card/PostByCategory.d.ts +0 -2
- package/dist/src/components/Card/PostByCategory.js +0 -38
- package/dist/src/components/Card/PostByCategory.stories.d.ts +0 -9
- package/dist/src/components/Card/PostByCategory.stories.js +0 -54
- package/dist/src/components/Card/SinglePost.js +0 -10
- package/dist/src/components/Card/SinglePost.jsx +0 -27
- package/dist/src/components/Card/SinglePost.stories.jsx +0 -46
- package/dist/src/components/Card/card.jsx +0 -31
- package/dist/src/components/Checkbox/checkbox.stories.jsx +0 -91
- package/dist/src/components/ColorPicker/ColorPicker.jsx +0 -65
- package/dist/src/components/ColorPicker/ColorPicker.stories.jsx +0 -14
- 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/EditorTooltip/EditorTooltip.d.ts +0 -5
- package/dist/src/components/EditorTooltip/EditorTooltip.js +0 -8
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.d.ts +0 -6
- package/dist/src/components/EditorTooltip/EditorTooltip.stories.js +0 -24
- package/dist/src/components/Icons/IconList.test.jsx +0 -57
- package/dist/src/components/Icons/IconView.jsx +0 -25
- package/dist/src/components/Icons/IconView.stories.jsx +0 -8
- package/dist/src/components/Icons/LUIcon.jsx +0 -37
- package/dist/src/components/Icons/LUIcon.stories.jsx +0 -63
- package/dist/src/components/Icons/SingleIcon.test.jsx +0 -56
- package/dist/src/components/ImageUploader/ImageUploader.stories.jsx +0 -18
- package/dist/src/components/ImageUploader/imageUploader.jsx +0 -81
- 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 -34
- package/dist/src/components/Label/Label.jsx +0 -32
- package/dist/src/components/Label/Label.stories.jsx +0 -30
- package/dist/src/components/Label/type.d.ts +0 -9
- package/dist/src/components/Label/type.js +0 -1
- package/dist/src/components/MediaCard/Card.jsx +0 -36
- package/dist/src/components/MediaCard/Card.stories.jsx +0 -56
- package/dist/src/components/MediaCard/Card.test.jsx +0 -27
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.jsx +0 -22
- package/dist/src/components/MediaCard/ContactProfile/ContactProfile.test.jsx +0 -60
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.jsx +0 -27
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme1.test.jsx +0 -87
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.jsx +0 -23
- package/dist/src/components/MediaCard/ContactProfile/ContactProfileTheme2.test.jsx +0 -87
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.jsx +0 -24
- package/dist/src/components/MediaCard/PostByCategory/PostByCategory.test.jsx +0 -61
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.jsx +0 -25
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme1.test.jsx +0 -87
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.jsx +0 -23
- package/dist/src/components/MediaCard/PostByCategory/PostByCategoryTheme2.test.jsx +0 -87
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.jsx +0 -30
- package/dist/src/components/MediaCard/VerticalCard/VerticalCard.stories.jsx +0 -65
- package/dist/src/components/RadioButton/RadioButton.stories.jsx +0 -40
- package/dist/src/components/RadioButton/radio-button.jsx +0 -30
- package/dist/src/components/Switch/Switch.stories.jsx +0 -66
- package/dist/src/components/Tabs/Tabs.stories.jsx +0 -29
- 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/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 -24
- package/dist/src/components/Typography/Heading/heading.jsx +0 -60
- package/dist/src/components/ui/accordion.jsx +0 -39
- package/dist/src/components/ui/body.d.ts +0 -0
- package/dist/src/components/ui/body.js +0 -1
- package/dist/src/components/ui/caption.jsx +0 -25
- package/dist/src/components/ui/checkbox.jsx +0 -24
- package/dist/src/components/ui/input.jsx +0 -18
- package/dist/src/components/ui/label.d.ts +0 -12
- package/dist/src/components/ui/label.js +0 -41
- package/dist/src/components/ui/radio-button.d.ts +0 -3
- package/dist/src/components/ui/radio-button.js +0 -42
- package/dist/src/components/ui/switch.jsx +0 -61
- package/dist/src/components/ui/tabs.jsx +0 -32
- package/dist/src/components/ui/tooltip.jsx +0 -38
- package/dist/src/components/ui/typography.jsx +0 -56
- /package/dist/src/components/Card/{SinglePost.stories.d.ts → SinglePost/SinglePost.stories.d.ts} +0 -0
|
@@ -34,10 +34,10 @@ export var color = {
|
|
|
34
34
|
gray: "bg-gray-600 text-white hover:bg-gray-700 focus-visible:ring-gray-300 active:bg-gray-800 disabled:bg-gray-100 disabled:text-gray-400",
|
|
35
35
|
};
|
|
36
36
|
export var size = {
|
|
37
|
-
xl: "!py-3.5 !px-6 text-base font-normal leading-normal",
|
|
38
|
-
lg: "!py-3 !px-5 text-base font-normal leading-normal",
|
|
39
|
-
md: "!py-2.5 !px-5 text-sm font-normal leading-5",
|
|
40
|
-
sm: "!py-2 !px-3 text-sm font-normal leading-5",
|
|
37
|
+
xl: "!py-3.5 !px-6 !text-base !font-normal !leading-normal",
|
|
38
|
+
lg: "!py-3 !px-5 !text-base !font-normal !leading-normal",
|
|
39
|
+
md: "!py-2.5 !px-5 !text-sm !font-normal !leading-5",
|
|
40
|
+
sm: "!py-2 !px-3 !text-sm !font-normal !leading-5",
|
|
41
41
|
};
|
|
42
42
|
export var shape = {
|
|
43
43
|
"rounded-sm": "!rounded-sm",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import Card from "../card";
|
|
3
|
+
declare const meta: Meta<typeof Card>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
5
|
+
type Story = StoryObj<typeof Card>;
|
|
6
|
+
export declare const CardHorizontalLeft: Story;
|
|
7
|
+
export declare const CardHorizontalRight: Story;
|
|
8
|
+
export declare const CardVerticalTop: Story;
|
|
9
|
+
export declare const CardVerticalBottom: Story;
|
|
@@ -9,11 +9,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { MultiNews } from "./MultiNews";
|
|
13
12
|
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
|
|
13
|
+
import Card from "../card";
|
|
14
14
|
var meta = {
|
|
15
15
|
title: "Components/NewCard/MultiNews",
|
|
16
|
-
component:
|
|
16
|
+
component: Card,
|
|
17
17
|
parameters: {
|
|
18
18
|
layout: "centered",
|
|
19
19
|
},
|
|
@@ -38,15 +38,15 @@ var baseCardArgs = {
|
|
|
38
38
|
cardBtn: "",
|
|
39
39
|
},
|
|
40
40
|
};
|
|
41
|
-
export var
|
|
41
|
+
export var CardHorizontalLeft = {
|
|
42
42
|
args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "left" }),
|
|
43
43
|
};
|
|
44
|
-
export var
|
|
44
|
+
export var CardHorizontalRight = {
|
|
45
45
|
args: __assign(__assign({}, baseCardArgs), { orientation: "horizontal", mediaPosition: "right" }),
|
|
46
46
|
};
|
|
47
|
-
export var
|
|
47
|
+
export var CardVerticalTop = {
|
|
48
48
|
args: __assign(__assign({}, baseCardArgs), { orientation: "vertical", mediaPosition: "top" }),
|
|
49
49
|
};
|
|
50
|
-
export var
|
|
50
|
+
export var CardVerticalBottom = {
|
|
51
51
|
args: __assign(__assign({}, baseCardArgs), { orientation: "vertical", mediaPosition: "bottom" }),
|
|
52
52
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CardInterface } from "
|
|
1
|
+
import { CardInterface } from "../type";
|
|
2
2
|
export declare const SinglePost: ({ item, image, href, btnLabel, editor, mediaPosition, }: CardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import LuImage from "../../Images/LuImage";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Heading } from "../../Typography/Heading/heading";
|
|
5
|
+
import { Body } from "../../Typography/Body/body";
|
|
6
|
+
import { Button } from "../../Button/Button";
|
|
7
|
+
export var SinglePost = function (_a) {
|
|
8
|
+
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;
|
|
9
|
+
return (_jsxs("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), children: [_jsx(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" }), _jsxs("div", { className: "p-9 grid grid-rows-[1fr] items-center !gap-2 ", children: [_jsxs("div", { className: "flex flex-col !gap-3 ", children: [_jsx(Heading, { variant: "h2", className: "line-clamp-1 md:line-clamp-2 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardTitle), children: item === null || item === void 0 ? void 0 : item.title }), _jsx(Body, { variant: "body-xl", className: "line-clamp-2 ".concat(editor === null || editor === void 0 ? void 0 : editor.cardText, " "), children: item === null || item === void 0 ? void 0 : item.description })] }), _jsx(Link, { href: href, passHref: true, children: _jsx(Button, { endIcon: "angle-right", size: "lg", className: "".concat(editor === null || editor === void 0 ? void 0 : editor.cardBtn), children: btnLabel }) })] })] }));
|
|
10
|
+
};
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { SinglePost } from "./SinglePost";
|
|
13
|
-
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "
|
|
13
|
+
import { Dummy_Image, Dummy_Para, Dummy_Subtitle, Dummy_Title, Dummy_Url, } from "../../../utils/constants";
|
|
14
14
|
var meta = {
|
|
15
15
|
title: "Components/NewCard/SinglePost",
|
|
16
16
|
component: SinglePost,
|
|
@@ -2,7 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { PostByCategory } from "./PostByCategory/PostByCategory";
|
|
4
4
|
import { MultiNews } from "./MultipleNews/MultiNews";
|
|
5
|
-
import { SinglePost } from "./SinglePost";
|
|
5
|
+
import { SinglePost } from "./SinglePost/SinglePost";
|
|
6
6
|
import { Dummy_Url } from "../../utils/constants";
|
|
7
7
|
import { PhotoGallery } from "./PhotoGallery";
|
|
8
8
|
import { ContactProfile } from "./contactProfile/ContactProfile";
|
|
@@ -63,6 +63,6 @@ var ImageUploader = function (_a) {
|
|
|
63
63
|
"image/*": acceptedTypes,
|
|
64
64
|
},
|
|
65
65
|
}), getRootProps = _f.getRootProps, getInputProps = _f.getInputProps;
|
|
66
|
-
return (_jsxs("div", { className: cn("flex flex-col items-center", className), children: [_jsx("div", __assign({}, getRootProps(), { className: cn("!border !border-dashed !border-gray-300 !rounded-lg cursor-pointer w-64 !p-2"), children: _jsxs("div", { className: "min-h-40 flex items-center justify-center bg-gray-100 !rounded-lg", children: [_jsx("input", __assign({}, getInputProps())), preview ? (_jsx("div", { className: "relative w-full h-40 !mx-auto overflow-hidden", children: _jsx(LuImage, { src: preview, alt: "Uploaded", className: "aspect-square object-contain", fill: true }) })) : (_jsxs("div", { className: "text-center text-sm text-muted-foreground", children: [_jsx(LUIcon, { icon: "upload", size: "lg", className: "!mx-auto !mb-4" }), _jsx(Body, { variant: "body-xs-600", className: "!px-1", children: "Choose a file or drag & drop it here" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "JPEG, PNG, and SVG formats" })] }))] }) })), fileError && (_jsx("p", { className: "text-sm text-red-500 text-center mt-2", children: fileError })), required && !preview && !fileError && (_jsx("p", { className: "text-sm text-red-500 text-center", children: "Image is required." })), preview && (_jsx(Button, { variant: "link", color: "
|
|
66
|
+
return (_jsxs("div", { className: cn("flex flex-col items-center", className), children: [_jsx("div", __assign({}, getRootProps(), { className: cn("!border !border-dashed !border-gray-300 !rounded-lg cursor-pointer w-64 !p-2"), children: _jsxs("div", { className: "min-h-40 flex items-center justify-center bg-gray-100 !rounded-lg", children: [_jsx("input", __assign({}, getInputProps())), preview ? (_jsx("div", { className: "relative w-full h-40 !mx-auto overflow-hidden", children: _jsx(LuImage, { src: preview, alt: "Uploaded", className: "aspect-square object-contain", fill: true }) })) : (_jsxs("div", { className: "text-center text-sm text-muted-foreground", children: [_jsx(LUIcon, { icon: "upload", size: "lg", className: "!mx-auto !mb-4" }), _jsx(Body, { variant: "body-xs-600", className: "!px-1", children: "Choose a file or drag & drop it here" }), _jsx("p", { className: "text-xs text-muted-foreground", children: "JPEG, PNG, and SVG formats" })] }))] }) })), fileError && (_jsx("p", { className: "text-sm text-red-500 text-center mt-2", children: fileError })), required && !preview && !fileError && (_jsx("p", { className: "text-sm text-red-500 text-center !mt-2", children: "Image is required." })), preview && (_jsx(Button, { variant: "link", color: "red", onClick: removeFile, className: "!mt-2", children: "Remove Image" }))] }));
|
|
67
67
|
};
|
|
68
68
|
export default ImageUploader;
|
|
@@ -25,12 +25,12 @@ import * as LabelPrimitive from "@radix-ui/react-label";
|
|
|
25
25
|
import { cva } from "class-variance-authority";
|
|
26
26
|
import { cn } from "../../lib/utils";
|
|
27
27
|
export var variant = {
|
|
28
|
-
"label-xl": "!text-xl",
|
|
29
|
-
"label-lg": "!text-lg",
|
|
30
|
-
"label-md": "!text-base",
|
|
31
|
-
"label-sm": "!text-sm !
|
|
28
|
+
"label-xl": "!text-xl !leading-normal",
|
|
29
|
+
"label-lg": "!text-lg !leading-normal",
|
|
30
|
+
"label-md": "!text-base !leading-normal",
|
|
31
|
+
"label-sm": "!text-sm !leading-normal",
|
|
32
32
|
};
|
|
33
|
-
var labelVariants = cva("
|
|
33
|
+
var labelVariants = cva("select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 !font-normal m-0", {
|
|
34
34
|
variants: { variant: variant },
|
|
35
35
|
defaultVariants: {
|
|
36
36
|
variant: "label-sm",
|
|
@@ -24,23 +24,23 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
24
24
|
import { cva } from "class-variance-authority";
|
|
25
25
|
import { cn } from "../../../lib/utils";
|
|
26
26
|
export var variant = {
|
|
27
|
-
h1: "text-5xl font-normal",
|
|
27
|
+
h1: "!text-5xl !font-normal",
|
|
28
28
|
"h1-500": "!text-5xl !font-medium",
|
|
29
29
|
"h1-600": "!text-5xl !font-semibold",
|
|
30
30
|
"h1-700": "!text-5xl !font-bold",
|
|
31
|
-
h2: "text-4xl font-normal",
|
|
31
|
+
h2: "!text-4xl !font-normal",
|
|
32
32
|
"h2-500": "!text-4xl !font-medium",
|
|
33
33
|
"h2-600": "!text-4xl !font-semibold",
|
|
34
34
|
"h2-700": "!text-4xl !font-bold",
|
|
35
|
-
h3: "text-3xl font-normal",
|
|
35
|
+
h3: "!text-3xl !font-normal",
|
|
36
36
|
"h3-500": "!text-3xl !font-medium",
|
|
37
37
|
"h3-600": "!text-3xl !font-semibold",
|
|
38
38
|
"h3-700": "!text-3xl !font-bold",
|
|
39
|
-
h4: "text-2xl font-normal",
|
|
39
|
+
h4: "!text-2xl !font-normal",
|
|
40
40
|
"h4-500": "!text-2xl !font-medium",
|
|
41
41
|
"h4-600": "!text-2xl !font-semibold",
|
|
42
42
|
"h4-700": "!text-2xl !font-bold",
|
|
43
|
-
h5: "text-xl font-normal",
|
|
43
|
+
h5: "!text-xl !font-normal",
|
|
44
44
|
"h5-500": "!text-xl !font-medium",
|
|
45
45
|
"h5-600": "!text-xl !font-semibold",
|
|
46
46
|
"h5-700": "!text-xl !font-bold",
|
|
@@ -64,6 +64,6 @@ function Heading(_a) {
|
|
|
64
64
|
if (variant === null || variant === void 0 ? void 0 : variant.startsWith("h")) {
|
|
65
65
|
Tag = variant.split("-")[0];
|
|
66
66
|
}
|
|
67
|
-
return (_jsx(Tag, __assign({ className: cn(headingVariants({ variant: variant, className: className }), "m-0") }, props, { children: children })));
|
|
67
|
+
return (_jsx(Tag, __assign({ className: cn(headingVariants({ variant: variant, className: className }), "m-0 !leading-normal") }, props, { children: children })));
|
|
68
68
|
}
|
|
69
69
|
export { Heading, headingVariants };
|
|
@@ -38,6 +38,6 @@ function AccordionTrigger(_a) {
|
|
|
38
38
|
}
|
|
39
39
|
function AccordionContent(_a) {
|
|
40
40
|
var className = _a.className, children = _a.children, props = __rest(_a, ["className", "children"]);
|
|
41
|
-
return (_jsx(AccordionPrimitive.Content, __assign({ "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-
|
|
41
|
+
return (_jsx(AccordionPrimitive.Content, __assign({ "data-slot": "accordion-content", className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down !overflow-visible text-sm" }, props, { children: _jsx("div", { className: cn("!pt-0 !pb-4", className), children: children }) })));
|
|
42
42
|
}
|
|
43
43
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -29,6 +29,6 @@ export var variantClasses = {
|
|
|
29
29
|
};
|
|
30
30
|
function Caption(_a) {
|
|
31
31
|
var className = _a.className, children = _a.children, _b = _a.variant, variant = _b === void 0 ? "md" : _b, props = __rest(_a, ["className", "children", "variant"]);
|
|
32
|
-
return (_jsx("p", __assign({ className: cn("font-normal leading-normal inline", variantClasses[variant], className) }, props, { children: children })));
|
|
32
|
+
return (_jsx("p", __assign({ className: cn("!font-normal !leading-normal inline", variantClasses[variant], className) }, props, { children: children })));
|
|
33
33
|
}
|
|
34
34
|
export { Caption };
|
|
@@ -59,12 +59,12 @@ var thumbVariants = cva("pointer-events-none block !rounded-full ring-0 transiti
|
|
|
59
59
|
});
|
|
60
60
|
// Define translate distance for each size
|
|
61
61
|
var thumbTranslateVariants = {
|
|
62
|
-
sm: "data-[state=checked]:translate-x-
|
|
63
|
-
md: "data-[state=checked]:translate-x-7",
|
|
64
|
-
lg: "data-[state=checked]:translate-x-
|
|
62
|
+
sm: "data-[state=unchecked]:translate-x-0 data-[state=checked]:translate-x-2",
|
|
63
|
+
md: "data-[state=unchecked]:translate-x-0.5 data-[state=checked]:translate-x-7",
|
|
64
|
+
lg: "data-[state=unchecked]:translate-x-0.5 data-[state=checked]:translate-x-8",
|
|
65
65
|
};
|
|
66
66
|
function Switch(_a) {
|
|
67
67
|
var className = _a.className, size = _a.size, variant = _a.variant, props = __rest(_a, ["className", "size", "variant"]);
|
|
68
|
-
return (_jsx(SwitchPrimitive.Root, __assign({ "data-slot": "switch", className: cn(switchVariants({ size: size, variant: variant }), className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "
|
|
68
|
+
return (_jsx(SwitchPrimitive.Root, __assign({ "data-slot": "switch", className: cn(switchVariants({ size: size, variant: variant }), className) }, props, { children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn(thumbVariants({ size: size }), size ? thumbTranslateVariants[size] : "", "bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground") }) })));
|
|
69
69
|
}
|
|
70
70
|
export { Switch };
|
|
@@ -30,11 +30,11 @@ function Tabs(_a) {
|
|
|
30
30
|
}
|
|
31
31
|
function TabsList(_a) {
|
|
32
32
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
33
|
-
return (_jsx(TabsPrimitive.List, __assign({ "data-slot": "tabs-list", className: cn("bg-blue-100 !p-1
|
|
33
|
+
return (_jsx(TabsPrimitive.List, __assign({ "data-slot": "tabs-list", className: cn("bg-blue-100 !p-1 sm:!p-2 rounded-lg", className) }, props)));
|
|
34
34
|
}
|
|
35
35
|
function TabsTrigger(_a) {
|
|
36
36
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
37
|
-
return (_jsx(TabsPrimitive.Trigger, __assign({ "data-slot": "tabs-trigger", className: cn("!py-2.5 !px-5 transition-all !rounded-sm text-sm font-normal w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className) }, props)));
|
|
37
|
+
return (_jsx(TabsPrimitive.Trigger, __assign({ "data-slot": "tabs-trigger", className: cn("!py-2.5 !px-5 transition-all !rounded-sm text-sm font-normal w-1/2 max-sm:w-full", "data-[state=active]:bg-blue-600 data-[state=active]:text-white", "data-[state=inactive]:bg-blue-100 data-[state=inactive]:text-blue-600", className) }, props)));
|
|
38
38
|
}
|
|
39
39
|
function TabsContent(_a) {
|
|
40
40
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
@@ -541,7 +541,7 @@ export var iconList = [
|
|
|
541
541
|
},
|
|
542
542
|
{
|
|
543
543
|
key: "xMark",
|
|
544
|
-
path: "
|
|
544
|
+
path: "M28.0991 0.66939C28.9917 -0.223089 30.4379 -0.223155 31.3305 0.66939C32.2231 1.56199 32.223 3.00817 31.3305 3.90084L19.2309 15.9995L31.3305 28.0981L31.4877 28.271C32.2202 29.1687 32.1675 30.4936 31.3305 31.3305C30.4936 32.1675 29.1687 32.2202 28.271 31.4877L28.0981 31.3305L15.9995 19.2309L3.90084 31.3305C3.00817 32.223 1.56199 32.2231 0.66939 31.3305C-0.223155 30.4379 -0.223089 28.9917 0.66939 28.0991L12.768 15.9995L0.66939 3.90084C-0.223069 3.00818 -0.223191 1.56197 0.66939 0.66939C1.56197 -0.223191 3.00818 -0.223069 3.90084 0.66939L15.9995 12.768L28.0991 0.66939Z",
|
|
545
545
|
label: "xMark",
|
|
546
546
|
},
|
|
547
547
|
{
|
package/dist/styles/global.css
CHANGED
|
@@ -500,6 +500,9 @@
|
|
|
500
500
|
.\!w-fit {
|
|
501
501
|
width: fit-content !important;
|
|
502
502
|
}
|
|
503
|
+
.w-1\/2 {
|
|
504
|
+
width: calc(1/2 * 100%);
|
|
505
|
+
}
|
|
503
506
|
.w-6 {
|
|
504
507
|
width: calc(var(--spacing) * 6);
|
|
505
508
|
}
|
|
@@ -613,9 +616,6 @@
|
|
|
613
616
|
.grid-cols-1 {
|
|
614
617
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
615
618
|
}
|
|
616
|
-
.grid-cols-2 {
|
|
617
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
618
|
-
}
|
|
619
619
|
.grid-cols-3 {
|
|
620
620
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
621
621
|
}
|
|
@@ -652,6 +652,9 @@
|
|
|
652
652
|
.\!gap-2 {
|
|
653
653
|
gap: calc(var(--spacing) * 2) !important;
|
|
654
654
|
}
|
|
655
|
+
.\!gap-3 {
|
|
656
|
+
gap: calc(var(--spacing) * 3) !important;
|
|
657
|
+
}
|
|
655
658
|
.\!gap-5 {
|
|
656
659
|
gap: calc(var(--spacing) * 5) !important;
|
|
657
660
|
}
|
|
@@ -664,9 +667,6 @@
|
|
|
664
667
|
.gap-2 {
|
|
665
668
|
gap: calc(var(--spacing) * 2);
|
|
666
669
|
}
|
|
667
|
-
.gap-3 {
|
|
668
|
-
gap: calc(var(--spacing) * 3);
|
|
669
|
-
}
|
|
670
670
|
.gap-5 {
|
|
671
671
|
gap: calc(var(--spacing) * 5);
|
|
672
672
|
}
|
|
@@ -700,6 +700,9 @@
|
|
|
700
700
|
margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
+
.\!overflow-visible {
|
|
704
|
+
overflow: visible !important;
|
|
705
|
+
}
|
|
703
706
|
.overflow-hidden {
|
|
704
707
|
overflow: hidden;
|
|
705
708
|
}
|
|
@@ -751,18 +754,6 @@
|
|
|
751
754
|
.rounded-xs {
|
|
752
755
|
border-radius: var(--radius-xs);
|
|
753
756
|
}
|
|
754
|
-
.rounded-tl-3xl {
|
|
755
|
-
border-top-left-radius: var(--radius-3xl);
|
|
756
|
-
}
|
|
757
|
-
.rounded-tr-3xl {
|
|
758
|
-
border-top-right-radius: var(--radius-3xl);
|
|
759
|
-
}
|
|
760
|
-
.rounded-br-3xl {
|
|
761
|
-
border-bottom-right-radius: var(--radius-3xl);
|
|
762
|
-
}
|
|
763
|
-
.rounded-bl-3xl {
|
|
764
|
-
border-bottom-left-radius: var(--radius-3xl);
|
|
765
|
-
}
|
|
766
757
|
.\!border {
|
|
767
758
|
border-style: var(--tw-border-style) !important;
|
|
768
759
|
border-width: 1px !important;
|
|
@@ -1218,22 +1209,18 @@
|
|
|
1218
1209
|
font-size: var(--text-xs);
|
|
1219
1210
|
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
1220
1211
|
}
|
|
1212
|
+
.\!leading-5 {
|
|
1213
|
+
--tw-leading: calc(var(--spacing) * 5) !important;
|
|
1214
|
+
line-height: calc(var(--spacing) * 5) !important;
|
|
1215
|
+
}
|
|
1221
1216
|
.\!leading-normal {
|
|
1222
1217
|
--tw-leading: var(--leading-normal) !important;
|
|
1223
1218
|
line-height: var(--leading-normal) !important;
|
|
1224
1219
|
}
|
|
1225
|
-
.leading-5 {
|
|
1226
|
-
--tw-leading: calc(var(--spacing) * 5);
|
|
1227
|
-
line-height: calc(var(--spacing) * 5);
|
|
1228
|
-
}
|
|
1229
1220
|
.leading-none {
|
|
1230
1221
|
--tw-leading: 1;
|
|
1231
1222
|
line-height: 1;
|
|
1232
1223
|
}
|
|
1233
|
-
.leading-normal {
|
|
1234
|
-
--tw-leading: var(--leading-normal);
|
|
1235
|
-
line-height: var(--leading-normal);
|
|
1236
|
-
}
|
|
1237
1224
|
.\!font-bold {
|
|
1238
1225
|
--tw-font-weight: var(--font-weight-bold) !important;
|
|
1239
1226
|
font-weight: var(--font-weight-bold) !important;
|
|
@@ -2941,9 +2928,9 @@
|
|
|
2941
2928
|
color: #fefefe;
|
|
2942
2929
|
}
|
|
2943
2930
|
}
|
|
2944
|
-
.data-\[state\=checked\]\:translate-x-
|
|
2931
|
+
.data-\[state\=checked\]\:translate-x-2 {
|
|
2945
2932
|
&[data-state="checked"] {
|
|
2946
|
-
--tw-translate-x: calc(var(--spacing) *
|
|
2933
|
+
--tw-translate-x: calc(var(--spacing) * 2);
|
|
2947
2934
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2948
2935
|
}
|
|
2949
2936
|
}
|
|
@@ -2953,9 +2940,9 @@
|
|
|
2953
2940
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2954
2941
|
}
|
|
2955
2942
|
}
|
|
2956
|
-
.data-\[state\=checked\]\:translate-x-
|
|
2943
|
+
.data-\[state\=checked\]\:translate-x-8 {
|
|
2957
2944
|
&[data-state="checked"] {
|
|
2958
|
-
--tw-translate-x: calc(var(--spacing) *
|
|
2945
|
+
--tw-translate-x: calc(var(--spacing) * 8);
|
|
2959
2946
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2960
2947
|
}
|
|
2961
2948
|
}
|
|
@@ -3027,6 +3014,12 @@
|
|
|
3027
3014
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3028
3015
|
}
|
|
3029
3016
|
}
|
|
3017
|
+
.data-\[state\=unchecked\]\:translate-x-0\.5 {
|
|
3018
|
+
&[data-state="unchecked"] {
|
|
3019
|
+
--tw-translate-x: calc(var(--spacing) * 0.5);
|
|
3020
|
+
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3030
3023
|
.data-\[state\=unchecked\]\:bg-input {
|
|
3031
3024
|
&[data-state="unchecked"] {
|
|
3032
3025
|
background-color: var(--input);
|
|
@@ -3060,6 +3053,11 @@
|
|
|
3060
3053
|
margin-top: 7px;
|
|
3061
3054
|
}
|
|
3062
3055
|
}
|
|
3056
|
+
.max-sm\:w-full {
|
|
3057
|
+
@media (width < 40rem) {
|
|
3058
|
+
width: 100%;
|
|
3059
|
+
}
|
|
3060
|
+
}
|
|
3063
3061
|
.sm\:col-span-2 {
|
|
3064
3062
|
@media (width >= 40rem) {
|
|
3065
3063
|
grid-column: span 2 / span 2;
|
|
@@ -3070,6 +3068,11 @@
|
|
|
3070
3068
|
aspect-ratio: 1 / 1;
|
|
3071
3069
|
}
|
|
3072
3070
|
}
|
|
3071
|
+
.sm\:grid-cols-2 {
|
|
3072
|
+
@media (width >= 40rem) {
|
|
3073
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3073
3076
|
.sm\:grid-cols-3 {
|
|
3074
3077
|
@media (width >= 40rem) {
|
|
3075
3078
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -3090,11 +3093,24 @@
|
|
|
3090
3093
|
grid-template-columns: auto 1fr;
|
|
3091
3094
|
}
|
|
3092
3095
|
}
|
|
3096
|
+
.sm\:\!p-2 {
|
|
3097
|
+
@media (width >= 40rem) {
|
|
3098
|
+
padding: calc(var(--spacing) * 2) !important;
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3093
3101
|
.sm\:\!text-left {
|
|
3094
3102
|
@media (width >= 40rem) {
|
|
3095
3103
|
text-align: left !important;
|
|
3096
3104
|
}
|
|
3097
3105
|
}
|
|
3106
|
+
.md\:line-clamp-2 {
|
|
3107
|
+
@media (width >= 48rem) {
|
|
3108
|
+
overflow: hidden;
|
|
3109
|
+
display: -webkit-box;
|
|
3110
|
+
-webkit-box-orient: vertical;
|
|
3111
|
+
-webkit-line-clamp: 2;
|
|
3112
|
+
}
|
|
3113
|
+
}
|
|
3098
3114
|
.md\:grid-cols-6 {
|
|
3099
3115
|
@media (width >= 48rem) {
|
|
3100
3116
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
package/package.json
CHANGED
package/dist/app/layout.jsx
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Inter } from "next/font/google";
|
|
2
|
-
import "@/styles/globals.css";
|
|
3
|
-
var inter = Inter({ subsets: ["latin"] });
|
|
4
|
-
export var metadata = {
|
|
5
|
-
title: "Create Next App",
|
|
6
|
-
description: "Generated by create next app",
|
|
7
|
-
};
|
|
8
|
-
export default function RootLayout(_a) {
|
|
9
|
-
var children = _a.children;
|
|
10
|
-
return (<html lang="en">
|
|
11
|
-
<body className={inter.className}>{children}</body>
|
|
12
|
-
</html>);
|
|
13
|
-
}
|
package/dist/app/page.jsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "../ui/accordion";
|
|
2
|
-
import ColorPicker from "../ColorPicker/ColorPicker";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Accordion",
|
|
5
|
-
component: Accordion,
|
|
6
|
-
tags: ["autodocs"],
|
|
7
|
-
};
|
|
8
|
-
var Template = function (args) { return (<Accordion type="single" collapsible defaultValue="menus" {...args}></Accordion>); };
|
|
9
|
-
export var _Accordion = Template.bind({});
|
|
10
|
-
_Accordion.args = {
|
|
11
|
-
children: (<AccordionItem value="menus">
|
|
12
|
-
<AccordionTrigger>Menus</AccordionTrigger>
|
|
13
|
-
<AccordionContent>
|
|
14
|
-
<ColorPicker value="#000000" onChange={function () { return console.log("color"); }}/>
|
|
15
|
-
</AccordionContent>
|
|
16
|
-
</AccordionItem>),
|
|
17
|
-
};
|
|
18
|
-
_Accordion.argTypes = {
|
|
19
|
-
children: {
|
|
20
|
-
description: "Pass `AccordionItem` components as children. Each item includes an `AccordionTrigger` (the clickable label) and `AccordionContent` (collapsible body). You can customize both with any valid React nodes \n\nFor more details and usage examples, refer to the [ShadCN Accordion documentation](https://ui.shadcn.com/docs/components/accordion).",
|
|
21
|
-
table: {
|
|
22
|
-
type: { summary: "React.ReactNode" },
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import LUIcon from "../Icons/LUIcon";
|
|
2
|
-
import Image from "next/image";
|
|
3
|
-
import { avatarPadding, avatarShape, avatarSize } from ".";
|
|
4
|
-
var Avatar = function (_a) {
|
|
5
|
-
var image = _a.image, _b = _a.icon, icon = _b === void 0 ? "user" : _b, _c = _a.shape, shape = _c === void 0 ? "square" : _c, _d = _a.size, size = _d === void 0 ? "md" : _d, className = _a.className;
|
|
6
|
-
var sizeClasses = avatarSize[size];
|
|
7
|
-
var paddingClass = avatarPadding[size];
|
|
8
|
-
return (<>
|
|
9
|
-
{image ? (<div className={"relative overflow-hidden bg-blue-200 ".concat(avatarShape[shape], " ").concat(className, " ").concat(sizeClasses)} data-testid="lu-avatar">
|
|
10
|
-
<Image src={image} alt="avatar" className={"object-cover w-full h-full"} width={0} height={0} sizes="100%" //Image takes 100% of the parent container
|
|
11
|
-
/>
|
|
12
|
-
</div>) : (<div className={"bg-gray-100 ".concat(paddingClass, " ").concat(avatarShape[shape], " ").concat(className, " ").concat(sizeClasses)} data-testid="lu-icon">
|
|
13
|
-
<LUIcon data-testid="lu-icon" size={size} icon={icon} className={"text-gray-950 w-full h-full"}/>
|
|
14
|
-
</div>)}
|
|
15
|
-
</>);
|
|
16
|
-
};
|
|
17
|
-
export default Avatar;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Avatar from "./Avatar";
|
|
2
|
-
import { avatarShape, avatarSize } from ".";
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Avatar",
|
|
5
|
-
component: Avatar,
|
|
6
|
-
};
|
|
7
|
-
var Template = function (args) { return <Avatar {...args}/>; };
|
|
8
|
-
export var _Avatar = Template.bind({});
|
|
9
|
-
_Avatar.args = {
|
|
10
|
-
image: "/images/avatar.png",
|
|
11
|
-
shape: "square",
|
|
12
|
-
size: "md",
|
|
13
|
-
className: "",
|
|
14
|
-
icon: "user",
|
|
15
|
-
};
|
|
16
|
-
_Avatar.argTypes = {
|
|
17
|
-
shape: {
|
|
18
|
-
control: {
|
|
19
|
-
type: "select",
|
|
20
|
-
labels: Object.keys(avatarShape),
|
|
21
|
-
},
|
|
22
|
-
options: Object.keys(avatarShape),
|
|
23
|
-
},
|
|
24
|
-
size: {
|
|
25
|
-
control: {
|
|
26
|
-
type: "select",
|
|
27
|
-
labels: Object.keys(avatarSize),
|
|
28
|
-
},
|
|
29
|
-
options: Object.keys(avatarSize),
|
|
30
|
-
},
|
|
31
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { render, screen } from "@testing-library/react";
|
|
2
|
-
import Avatar from "./Avatar";
|
|
3
|
-
jest.mock("../Icons/LUIcon", function () { return ({
|
|
4
|
-
__esModule: true,
|
|
5
|
-
default: jest.fn(function (_a) {
|
|
6
|
-
var icon = _a.icon, className = _a.className;
|
|
7
|
-
return (<div data-testid="mock-luIcon" className={className}>
|
|
8
|
-
{icon || "user"}
|
|
9
|
-
</div>);
|
|
10
|
-
}),
|
|
11
|
-
}); });
|
|
12
|
-
// Mock Next.js Image component
|
|
13
|
-
jest.mock("next/image", function () { return ({
|
|
14
|
-
__esModule: true,
|
|
15
|
-
default: function (_a) {
|
|
16
|
-
var src = _a.src, alt = _a.alt;
|
|
17
|
-
return (
|
|
18
|
-
// eslint-disable-next-line @next/next/no-img-element
|
|
19
|
-
<img src={src} alt={alt}/>);
|
|
20
|
-
},
|
|
21
|
-
}); });
|
|
22
|
-
describe("Avatar Component", function () {
|
|
23
|
-
it("renders image when image prop is provided", function () {
|
|
24
|
-
render(<Avatar image="/images/avatar.png"/>);
|
|
25
|
-
var avatarImage = screen.getByRole("img", { name: /avatar/i });
|
|
26
|
-
expect(avatarImage).toBeInTheDocument();
|
|
27
|
-
expect(avatarImage).toHaveAttribute("src", "/images/avatar.png");
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
it("renders icon when no image is provided", function () {
|
|
31
|
-
render(<Avatar />);
|
|
32
|
-
var icon = screen.getByTestId("lu-icon");
|
|
33
|
-
expect(icon).toBeInTheDocument();
|
|
34
|
-
});
|
|
35
|
-
it("applies shape and size class names correctly", function () {
|
|
36
|
-
render(<Avatar image="/images/avatar.png" shape="square" size="lg"/>);
|
|
37
|
-
var avatarWrapper = screen.getByTestId("lu-avatar");
|
|
38
|
-
expect(avatarWrapper).toHaveClass("rounded-none");
|
|
39
|
-
expect(avatarWrapper).toHaveClass("w-[42px]");
|
|
40
|
-
expect(avatarWrapper).toHaveClass("h-[42px]");
|
|
41
|
-
});
|
|
42
|
-
it("applies additional class names", function () {
|
|
43
|
-
render(<Avatar image="/images/avatar.png" className="custom-class"/>);
|
|
44
|
-
var avatarWrapper = screen.getByTestId("lu-avatar");
|
|
45
|
-
expect(avatarWrapper).toHaveClass("custom-class");
|
|
46
|
-
});
|
|
47
|
-
it("renders the correct icon when image is not provided", function () {
|
|
48
|
-
render(<Avatar icon="user"/>);
|
|
49
|
-
var icon = screen.getByTestId("lu-icon");
|
|
50
|
-
expect(icon).toBeInTheDocument();
|
|
51
|
-
});
|