@krrli/cm-designsystem 1.32.1 → 1.32.3
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/assets/fallback.png.js +4 -0
- package/dist/cm-designsystem.css +1944 -1
- package/dist/components/accessible-button/AccessibleButton.d.ts +1 -0
- package/dist/components/accessible-button/AccessibleButton.d.ts.map +1 -0
- package/dist/components/accessible-button/AccessibleButton.js +29 -11
- package/dist/components/avatar/Avatar.d.ts +4 -3
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.js +91 -65
- package/dist/components/branding/BrandingGallery.d.ts +1 -0
- package/dist/components/branding/BrandingGallery.d.ts.map +1 -0
- package/dist/components/branding/BrandingGallery.js +212 -145
- package/dist/components/branding/app-icon-gradient.svg.js +4 -0
- package/dist/components/branding/app-icon-white.svg.js +4 -0
- package/dist/components/branding/hover-logo-default.svg.js +4 -0
- package/dist/components/branding/hover-logo-hovered.svg.js +4 -0
- package/dist/components/branding/logo-inline-gradient.svg.js +4 -0
- package/dist/components/branding/logo-inline-violet.svg.js +4 -0
- package/dist/components/branding/logo-inline-white.svg.js +4 -0
- package/dist/components/branding/logo-stacked-gradient.svg.js +4 -0
- package/dist/components/branding/logo-stacked-violet.svg.js +4 -0
- package/dist/components/branding/logo-stacked-white.svg.js +4 -0
- package/dist/components/branding/superzeichen.svg.js +4 -0
- package/dist/components/button/Button.d.ts +6 -5
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/Button.js +61 -55
- package/dist/components/color/ColorDoc.d.ts +1 -0
- package/dist/components/color/ColorDoc.d.ts.map +1 -0
- package/dist/components/color/ColorDoc.js +26 -7
- package/dist/components/file-upload/FileUpload.d.ts +34 -33
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.js +129 -66
- package/dist/components/form/Form.d.ts +14 -13
- package/dist/components/form/Form.d.ts.map +1 -0
- package/dist/components/form/Form.js +33 -26
- package/dist/components/icon-button/IconButton.d.ts +7 -6
- package/dist/components/icon-button/IconButton.d.ts.map +1 -0
- package/dist/components/icon-button/IconButton.js +33 -29
- package/dist/components/icons/IconBase.d.ts +1 -0
- package/dist/components/icons/IconBase.d.ts.map +1 -0
- package/dist/components/icons/IconBase.js +21 -6
- package/dist/components/icons/generated/ArrowDown.d.ts +2 -1
- package/dist/components/icons/generated/ArrowDown.d.ts.map +1 -0
- package/dist/components/icons/generated/ArrowDown.js +15 -4
- package/dist/components/icons/generated/ArrowLeft.d.ts +2 -1
- package/dist/components/icons/generated/ArrowLeft.d.ts.map +1 -0
- package/dist/components/icons/generated/ArrowLeft.js +15 -4
- package/dist/components/icons/generated/ArrowRight.d.ts +2 -1
- package/dist/components/icons/generated/ArrowRight.d.ts.map +1 -0
- package/dist/components/icons/generated/ArrowRight.js +15 -4
- package/dist/components/icons/generated/ArrowUp.d.ts +2 -1
- package/dist/components/icons/generated/ArrowUp.d.ts.map +1 -0
- package/dist/components/icons/generated/ArrowUp.js +15 -4
- package/dist/components/icons/generated/Calendar.d.ts +2 -1
- package/dist/components/icons/generated/Calendar.d.ts.map +1 -0
- package/dist/components/icons/generated/Calendar.js +15 -4
- package/dist/components/icons/generated/Cancel.d.ts +2 -1
- package/dist/components/icons/generated/Cancel.d.ts.map +1 -0
- package/dist/components/icons/generated/Cancel.js +12 -4
- package/dist/components/icons/generated/Checkmark.d.ts +2 -1
- package/dist/components/icons/generated/Checkmark.d.ts.map +1 -0
- package/dist/components/icons/generated/Checkmark.js +12 -4
- package/dist/components/icons/generated/Edit.d.ts +2 -1
- package/dist/components/icons/generated/Edit.d.ts.map +1 -0
- package/dist/components/icons/generated/Edit.js +9 -4
- package/dist/components/icons/generated/Eye.d.ts +2 -1
- package/dist/components/icons/generated/Eye.d.ts.map +1 -0
- package/dist/components/icons/generated/Eye.js +15 -4
- package/dist/components/icons/generated/Fullscreen.d.ts +2 -1
- package/dist/components/icons/generated/Fullscreen.d.ts.map +1 -0
- package/dist/components/icons/generated/Fullscreen.js +9 -4
- package/dist/components/icons/generated/HeartFilled.d.ts +2 -1
- package/dist/components/icons/generated/HeartFilled.d.ts.map +1 -0
- package/dist/components/icons/generated/HeartFilled.js +15 -4
- package/dist/components/icons/generated/HeartOutline.d.ts +2 -1
- package/dist/components/icons/generated/HeartOutline.d.ts.map +1 -0
- package/dist/components/icons/generated/HeartOutline.js +15 -4
- package/dist/components/icons/generated/Location.d.ts +2 -1
- package/dist/components/icons/generated/Location.d.ts.map +1 -0
- package/dist/components/icons/generated/Location.js +15 -4
- package/dist/components/icons/generated/LogOut.d.ts +2 -1
- package/dist/components/icons/generated/LogOut.d.ts.map +1 -0
- package/dist/components/icons/generated/LogOut.js +12 -4
- package/dist/components/icons/generated/Mumble.d.ts +2 -1
- package/dist/components/icons/generated/Mumble.d.ts.map +1 -0
- package/dist/components/icons/generated/Mumble.js +13 -4
- package/dist/components/icons/generated/Profile.d.ts +2 -1
- package/dist/components/icons/generated/Profile.d.ts.map +1 -0
- package/dist/components/icons/generated/Profile.js +12 -4
- package/dist/components/icons/generated/ReplyFilled.d.ts +2 -1
- package/dist/components/icons/generated/ReplyFilled.d.ts.map +1 -0
- package/dist/components/icons/generated/ReplyFilled.js +15 -4
- package/dist/components/icons/generated/ReplyOutline.d.ts +2 -1
- package/dist/components/icons/generated/ReplyOutline.d.ts.map +1 -0
- package/dist/components/icons/generated/ReplyOutline.js +15 -4
- package/dist/components/icons/generated/Repost.d.ts +2 -1
- package/dist/components/icons/generated/Repost.d.ts.map +1 -0
- package/dist/components/icons/generated/Repost.js +15 -4
- package/dist/components/icons/generated/Send.d.ts +2 -1
- package/dist/components/icons/generated/Send.d.ts.map +1 -0
- package/dist/components/icons/generated/Send.js +15 -4
- package/dist/components/icons/generated/Settings.d.ts +2 -1
- package/dist/components/icons/generated/Settings.d.ts.map +1 -0
- package/dist/components/icons/generated/Settings.js +15 -4
- package/dist/components/icons/generated/Share.d.ts +2 -1
- package/dist/components/icons/generated/Share.d.ts.map +1 -0
- package/dist/components/icons/generated/Share.js +12 -4
- package/dist/components/icons/generated/Time.d.ts +2 -1
- package/dist/components/icons/generated/Time.d.ts.map +1 -0
- package/dist/components/icons/generated/Time.js +12 -4
- package/dist/components/icons/generated/Upload.d.ts +2 -1
- package/dist/components/icons/generated/Upload.d.ts.map +1 -0
- package/dist/components/icons/generated/Upload.js +21 -4
- package/dist/components/icons/generated/index.d.ts +25 -24
- package/dist/components/icons/generated/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +28 -27
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/input/Input.d.ts +6 -5
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/Input.js +67 -41
- package/dist/components/like-toggle/LikeToggle.d.ts +4 -3
- package/dist/components/like-toggle/LikeToggle.d.ts.map +1 -0
- package/dist/components/like-toggle/LikeToggle.js +203 -176
- package/dist/components/logo-link/LogoLink.d.ts +1 -0
- package/dist/components/logo-link/LogoLink.d.ts.map +1 -0
- package/dist/components/logo-link/LogoLink.js +56 -34
- package/dist/components/modal/Modal.d.ts +23 -22
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/modal/Modal.js +66 -50
- package/dist/components/navi-button/NaviButton.d.ts +7 -6
- package/dist/components/navi-button/NaviButton.d.ts.map +1 -0
- package/dist/components/navi-button/NaviButton.js +42 -30
- package/dist/components/navi-user-button/NaviUserButton.d.ts +5 -4
- package/dist/components/navi-user-button/NaviUserButton.d.ts.map +1 -0
- package/dist/components/navi-user-button/NaviUserButton.js +39 -29
- package/dist/components/round-button/RoundButton.d.ts +6 -5
- package/dist/components/round-button/RoundButton.d.ts.map +1 -0
- package/dist/components/round-button/RoundButton.js +39 -29
- package/dist/components/tabs/TabItem.d.ts +4 -3
- package/dist/components/tabs/TabItem.d.ts.map +1 -0
- package/dist/components/tabs/TabItem.js +11 -8
- package/dist/components/tabs/Tabs.d.ts +6 -5
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +74 -59
- package/dist/components/text-link/TextLink.d.ts +3 -2
- package/dist/components/text-link/TextLink.d.ts.map +1 -0
- package/dist/components/text-link/TextLink.js +14 -11
- package/dist/components/textarea/Textarea.d.ts +16 -15
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +57 -41
- package/dist/components/timed-button/TimedButton.d.ts +6 -5
- package/dist/components/timed-button/TimedButton.d.ts.map +1 -0
- package/dist/components/timed-button/TimedButton.js +116 -102
- package/dist/components/toggle/Toggle.d.ts +4 -3
- package/dist/components/toggle/Toggle.d.ts.map +1 -0
- package/dist/components/toggle/Toggle.js +91 -62
- package/dist/components/typography/AccessibleTypography.d.ts +2 -1
- package/dist/components/typography/AccessibleTypography.d.ts.map +1 -0
- package/dist/components/typography/AccessibleTypography.js +12 -9
- package/dist/components/typography/Heading.d.ts +5 -4
- package/dist/components/typography/Heading.d.ts.map +1 -0
- package/dist/components/typography/Heading.js +13 -9
- package/dist/components/typography/Label.d.ts +4 -3
- package/dist/components/typography/Label.d.ts.map +1 -0
- package/dist/components/typography/Label.js +13 -9
- package/dist/components/typography/Paragraph.d.ts +4 -3
- package/dist/components/typography/Paragraph.d.ts.map +1 -0
- package/dist/components/typography/Paragraph.js +13 -9
- package/dist/components/typography/Placeholder.d.ts +4 -3
- package/dist/components/typography/Placeholder.d.ts.map +1 -0
- package/dist/components/typography/Placeholder.js +13 -9
- package/dist/components/typography/ValidationMessage.d.ts +4 -3
- package/dist/components/typography/ValidationMessage.d.ts.map +1 -0
- package/dist/components/typography/ValidationMessage.js +14 -9
- package/dist/components/typography/styles.d.ts +10 -9
- package/dist/components/typography/styles.d.ts.map +1 -0
- package/dist/components/typography/styles.js +53 -46
- package/dist/compositions/image-banner/ImageBanner.d.ts +4 -3
- package/dist/compositions/image-banner/ImageBanner.d.ts.map +1 -0
- package/dist/compositions/image-banner/ImageBanner.js +53 -45
- package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts +2 -1
- package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts.map +1 -0
- package/dist/compositions/image-upload-modal/ImageUploadModal.js +44 -20
- package/dist/compositions/index.d.ts +12 -11
- package/dist/compositions/index.d.ts.map +1 -0
- package/dist/compositions/post/Post.d.ts +4 -3
- package/dist/compositions/post/Post.d.ts.map +1 -0
- package/dist/compositions/post/Post.js +81 -26
- package/dist/compositions/post-base/PostBase.d.ts +10 -9
- package/dist/compositions/post-base/PostBase.d.ts.map +1 -0
- package/dist/compositions/post-base/PostBase.js +23 -24
- package/dist/compositions/post-creator/PostCreator.d.ts +22 -21
- package/dist/compositions/post-creator/PostCreator.d.ts.map +1 -0
- package/dist/compositions/post-creator/PostCreator.js +72 -24
- package/dist/compositions/profile-banner/ProfileBanner.d.ts +19 -18
- package/dist/compositions/profile-banner/ProfileBanner.d.ts.map +1 -0
- package/dist/compositions/profile-banner/ProfileBanner.js +71 -21
- package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts +4 -3
- package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts.map +1 -0
- package/dist/compositions/profile-banner-image/ProfileBannerImage.js +60 -52
- package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts +25 -24
- package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts.map +1 -0
- package/dist/compositions/profile-banner-info/ProfileBannerInfo.js +72 -40
- package/dist/compositions/response/Response.d.ts +19 -18
- package/dist/compositions/response/Response.d.ts.map +1 -0
- package/dist/compositions/response/Response.js +63 -19
- package/dist/compositions/response-creator/ResponseCreator.d.ts +16 -15
- package/dist/compositions/response-creator/ResponseCreator.d.ts.map +1 -0
- package/dist/compositions/response-creator/ResponseCreator.js +67 -23
- package/dist/compositions/user-info/UserInfo.d.ts +22 -21
- package/dist/compositions/user-info/UserInfo.d.ts.map +1 -0
- package/dist/compositions/user-info/UserInfo.js +71 -52
- package/dist/compositions/user-recommendation/UserRecommendation.d.ts +16 -15
- package/dist/compositions/user-recommendation/UserRecommendation.d.ts.map +1 -0
- package/dist/compositions/user-recommendation/UserRecommendation.js +58 -30
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +129 -4
- package/dist/setupTests.d.ts +1 -1
- package/dist/setupTests.d.ts.map +1 -0
- package/package.json +16 -14
- package/dist/components/accessible-button/AccessibleButton.test.d.ts +0 -1
- package/dist/components/accessible-button/AccessibleButton.test.js +0 -28
- package/dist/components/button/Button.test.d.ts +0 -1
- package/dist/components/button/Button.test.js +0 -30
- package/dist/components/icon-button/IconButton.test.d.ts +0 -1
- package/dist/components/icon-button/IconButton.test.js +0 -22
- package/dist/components/icons/generated/index.js +0 -24
- package/dist/components/index.js +0 -27
- package/dist/components/like-toggle/LikeToggle.test.d.ts +0 -1
- package/dist/components/like-toggle/LikeToggle.test.js +0 -35
- package/dist/components/modal/Modal.test.d.ts +0 -1
- package/dist/components/modal/Modal.test.js +0 -24
- package/dist/components/navi-button/NaviButton.test.d.ts +0 -1
- package/dist/components/navi-button/NaviButton.test.js +0 -22
- package/dist/components/round-button/RoundButton.test.d.ts +0 -1
- package/dist/components/round-button/RoundButton.test.js +0 -22
- package/dist/components/tabs/Tabs.test.d.ts +0 -1
- package/dist/components/tabs/Tabs.test.js +0 -61
- package/dist/components/text-link/TextLink.test.d.ts +0 -1
- package/dist/components/text-link/TextLink.test.js +0 -14
- package/dist/components/timed-button/TimedButton.test.d.ts +0 -1
- package/dist/components/timed-button/TimedButton.test.js +0 -36
- package/dist/components/toggle/Toggle.test.d.ts +0 -1
- package/dist/components/toggle/Toggle.test.js +0 -93
- package/dist/compositions/index.js +0 -11
- package/dist/favicon.svg +0 -18
- package/dist/index.cjs.js +0 -50
- package/dist/index.es.js +0 -8343
- package/dist/logo-inline-gradient.svg +0 -43
- package/dist/setupTests.js +0 -7
|
@@ -1,23 +1,67 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { ImageBanner } from "../image-banner/ImageBanner.js";
|
|
4
|
+
import { PostBase } from "../post-base/PostBase.js";
|
|
5
|
+
import { UserInfo } from "../user-info/UserInfo.js";
|
|
6
|
+
import { Paragraph } from "../../components/typography/Paragraph.js";
|
|
7
|
+
import { Toggle } from "../../components/toggle/Toggle.js";
|
|
8
|
+
import { LikeToggle } from "../../components/like-toggle/LikeToggle.js";
|
|
9
|
+
import { TimedButton } from "../../components/timed-button/TimedButton.js";
|
|
10
|
+
import { Share } from "../../components/icons/generated/Share.js";
|
|
8
11
|
const ResponseStyles = tv({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
slots: {
|
|
13
|
+
base: [],
|
|
14
|
+
content: ["flex", "flex-col", "gap-4"],
|
|
15
|
+
text: ["text-slate-900"],
|
|
16
|
+
action: ["flex", "gap-10", "justify-start", "-ml-3"]
|
|
17
|
+
}
|
|
15
18
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const Response = (props) => {
|
|
20
|
+
const { base, content, text, action } = ResponseStyles(props);
|
|
21
|
+
return /* @__PURE__ */ jsx(PostBase, { className: base(), children: /* @__PURE__ */ jsxs("div", { className: content(), children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
UserInfo,
|
|
24
|
+
{
|
|
25
|
+
size: "sm",
|
|
26
|
+
src: props.src,
|
|
27
|
+
displayName: props.displayName,
|
|
28
|
+
userName: props.userName,
|
|
29
|
+
timestamp: props.timestamp,
|
|
30
|
+
onClick: props.onAvatarClick
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ jsx(Paragraph, { size: "md", className: text(), children: props.text }),
|
|
34
|
+
props.imageSrc && /* @__PURE__ */ jsx(
|
|
35
|
+
ImageBanner,
|
|
36
|
+
{
|
|
37
|
+
src: props.imageSrc,
|
|
38
|
+
alt: props.imageAlt ?? "",
|
|
39
|
+
onClick: () => {
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: action(), children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Toggle,
|
|
46
|
+
{
|
|
47
|
+
ariaLabel: "Comment",
|
|
48
|
+
labelText: "Comment",
|
|
49
|
+
onToggle: props.onCommentClick
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsx(LikeToggle, { onLikeChange: props.onLikeClick }),
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
TimedButton,
|
|
55
|
+
{
|
|
56
|
+
icon: Share,
|
|
57
|
+
label: "Copy Link",
|
|
58
|
+
labelActive: "Link copied",
|
|
59
|
+
onClick: props.onShareClick
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] })
|
|
63
|
+
] }) });
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
Response
|
|
23
67
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const ResponseCreatorStyles: import(
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
2
|
+
declare const ResponseCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
3
3
|
[key: string]: {
|
|
4
|
-
[key: string]: import(
|
|
5
|
-
input?: import(
|
|
6
|
-
action?: import(
|
|
7
|
-
content?: import(
|
|
4
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
5
|
+
input?: import('tailwind-merge').ClassNameValue;
|
|
6
|
+
action?: import('tailwind-merge').ClassNameValue;
|
|
7
|
+
content?: import('tailwind-merge').ClassNameValue;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
} | {
|
|
11
11
|
[x: string]: {
|
|
12
|
-
[x: string]: import(
|
|
13
|
-
input?: import(
|
|
14
|
-
action?: import(
|
|
15
|
-
content?: import(
|
|
12
|
+
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
13
|
+
input?: import('tailwind-merge').ClassNameValue;
|
|
14
|
+
action?: import('tailwind-merge').ClassNameValue;
|
|
15
|
+
content?: import('tailwind-merge').ClassNameValue;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
} | {}, {
|
|
@@ -21,17 +21,17 @@ declare const ResponseCreatorStyles: import("tailwind-variants").TVReturnType<{
|
|
|
21
21
|
action: string[];
|
|
22
22
|
}, undefined, {
|
|
23
23
|
[key: string]: {
|
|
24
|
-
[key: string]: import(
|
|
25
|
-
input?: import(
|
|
26
|
-
action?: import(
|
|
27
|
-
content?: import(
|
|
24
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
25
|
+
input?: import('tailwind-merge').ClassNameValue;
|
|
26
|
+
action?: import('tailwind-merge').ClassNameValue;
|
|
27
|
+
content?: import('tailwind-merge').ClassNameValue;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
} | {}, {
|
|
31
31
|
content: string[];
|
|
32
32
|
input: string[];
|
|
33
33
|
action: string[];
|
|
34
|
-
}, import(
|
|
34
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
35
35
|
content: string[];
|
|
36
36
|
input: string[];
|
|
37
37
|
action: string[];
|
|
@@ -61,3 +61,4 @@ interface ResponseCreatorProps extends ResponseCreatorVariants {
|
|
|
61
61
|
*/
|
|
62
62
|
export declare const ResponseCreator: React.FC<ResponseCreatorProps>;
|
|
63
63
|
export {};
|
|
64
|
+
//# sourceMappingURL=ResponseCreator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponseCreator.d.ts","sourceRoot":"","sources":["../../../src/compositions/response-creator/ResponseCreator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAU1D,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAMzB,CAAC;AAEH,KAAK,uBAAuB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IAEpB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEvD;;OAEG;IACH,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkD1D,CAAC"}
|
|
@@ -1,28 +1,72 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Form } from "@radix-ui/react-form";
|
|
3
|
-
import {
|
|
3
|
+
import { useState, useRef } from "react";
|
|
4
4
|
import { tv } from "tailwind-variants";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { ImageUploadModal } from "../image-upload-modal/ImageUploadModal.js";
|
|
6
|
+
import { PostBase } from "../post-base/PostBase.js";
|
|
7
|
+
import { UserInfo } from "../user-info/UserInfo.js";
|
|
8
|
+
import { Textarea } from "../../components/textarea/Textarea.js";
|
|
9
|
+
import { Button } from "../../components/button/Button.js";
|
|
10
|
+
import { Upload } from "../../components/icons/generated/Upload.js";
|
|
11
|
+
import { Send } from "../../components/icons/generated/Send.js";
|
|
10
12
|
const ResponseCreatorStyles = tv({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
slots: {
|
|
14
|
+
content: ["flex", "flex-col", "gap-4", "w-full"],
|
|
15
|
+
input: ["w-full", "h-40"],
|
|
16
|
+
action: ["flex", "gap-4"]
|
|
17
|
+
}
|
|
16
18
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
const ResponseCreator = (props) => {
|
|
20
|
+
const { content, input, action } = ResponseCreatorStyles(props);
|
|
21
|
+
const [file, setFile] = useState(null);
|
|
22
|
+
const [text, setText] = useState("");
|
|
23
|
+
const imageUploadModalRef = useRef(null);
|
|
24
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(PostBase, { children: /* @__PURE__ */ jsxs(Form, { className: content(), children: [
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
UserInfo,
|
|
28
|
+
{
|
|
29
|
+
displayName: props.displayName,
|
|
30
|
+
onClick: props.onAvatarClick,
|
|
31
|
+
size: "sm",
|
|
32
|
+
src: props.src,
|
|
33
|
+
userName: props.userName
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: input(), children: /* @__PURE__ */ jsx(
|
|
37
|
+
Textarea,
|
|
38
|
+
{
|
|
39
|
+
name: "post",
|
|
40
|
+
placeholder: "Your opinion matters!",
|
|
41
|
+
onChange: setText
|
|
42
|
+
}
|
|
43
|
+
) }),
|
|
44
|
+
/* @__PURE__ */ jsxs("div", { className: action(), children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Button,
|
|
47
|
+
{
|
|
48
|
+
intent: "primary",
|
|
49
|
+
size: "md",
|
|
50
|
+
icon: Upload,
|
|
51
|
+
onClick: () => imageUploadModalRef.current?.openModal(true),
|
|
52
|
+
children: "Picture upload"
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx(
|
|
56
|
+
Button,
|
|
57
|
+
{
|
|
58
|
+
intent: "secondary",
|
|
59
|
+
size: "md",
|
|
60
|
+
icon: Send,
|
|
61
|
+
onClick: () => props.onSendClick(text, file),
|
|
62
|
+
children: "Send"
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
] }) }),
|
|
67
|
+
/* @__PURE__ */ jsx(ImageUploadModal, { ref: imageUploadModalRef, onFileChange: setFile })
|
|
68
|
+
] });
|
|
69
|
+
};
|
|
70
|
+
export {
|
|
71
|
+
ResponseCreator
|
|
28
72
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const userInfoStyles: import(
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
2
|
+
declare const userInfoStyles: import('tailwind-variants').TVReturnType<{
|
|
3
3
|
[key: string]: {
|
|
4
|
-
[key: string]: import(
|
|
5
|
-
displayName?: import(
|
|
6
|
-
base?: import(
|
|
7
|
-
userInfo?: import(
|
|
8
|
-
detailInfo?: import(
|
|
9
|
-
timeInfo?: import(
|
|
4
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
5
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
6
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
7
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
8
|
+
detailInfo?: import('tailwind-merge').ClassNameValue;
|
|
9
|
+
timeInfo?: import('tailwind-merge').ClassNameValue;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
} | {
|
|
13
13
|
[x: string]: {
|
|
14
|
-
[x: string]: import(
|
|
15
|
-
displayName?: import(
|
|
16
|
-
base?: import(
|
|
17
|
-
userInfo?: import(
|
|
18
|
-
detailInfo?: import(
|
|
19
|
-
timeInfo?: import(
|
|
14
|
+
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
15
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
16
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
17
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
18
|
+
detailInfo?: import('tailwind-merge').ClassNameValue;
|
|
19
|
+
timeInfo?: import('tailwind-merge').ClassNameValue;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
} | {}, {
|
|
@@ -27,12 +27,12 @@ declare const userInfoStyles: import("tailwind-variants").TVReturnType<{
|
|
|
27
27
|
timeInfo: string[];
|
|
28
28
|
}, undefined, {
|
|
29
29
|
[key: string]: {
|
|
30
|
-
[key: string]: import(
|
|
31
|
-
displayName?: import(
|
|
32
|
-
base?: import(
|
|
33
|
-
userInfo?: import(
|
|
34
|
-
detailInfo?: import(
|
|
35
|
-
timeInfo?: import(
|
|
30
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
31
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
32
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
33
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
34
|
+
detailInfo?: import('tailwind-merge').ClassNameValue;
|
|
35
|
+
timeInfo?: import('tailwind-merge').ClassNameValue;
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
} | {}, {
|
|
@@ -41,7 +41,7 @@ declare const userInfoStyles: import("tailwind-variants").TVReturnType<{
|
|
|
41
41
|
displayName: string[];
|
|
42
42
|
detailInfo: string[];
|
|
43
43
|
timeInfo: string[];
|
|
44
|
-
}, import(
|
|
44
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
45
45
|
base: string[];
|
|
46
46
|
userInfo: string[];
|
|
47
47
|
displayName: string[];
|
|
@@ -73,3 +73,4 @@ interface UserInfoProps extends UserInfoVariants {
|
|
|
73
73
|
*/
|
|
74
74
|
export declare const UserInfo: React.FC<UserInfoProps>;
|
|
75
75
|
export {};
|
|
76
|
+
//# sourceMappingURL=UserInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../src/compositions/user-info/UserInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAQlB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,KAAK,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvC,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,qDAAqD;IACrD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAoCD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAqC5C,CAAC"}
|
|
@@ -1,60 +1,79 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import { Avatar } from "../../components/avatar/Avatar";
|
|
4
|
-
import { IconButton } from "../../components/icon-button/IconButton";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { Avatar } from "../../components/avatar/Avatar.js";
|
|
4
|
+
import { IconButton } from "../../components/icon-button/IconButton.js";
|
|
5
|
+
import { Label } from "../../components/typography/Label.js";
|
|
6
|
+
import { Profile } from "../../components/icons/generated/Profile.js";
|
|
7
|
+
import { Time } from "../../components/icons/generated/Time.js";
|
|
7
8
|
const userInfoStyles = tv({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
slots: {
|
|
10
|
+
base: ["flex", "gap-2", "items-center"],
|
|
11
|
+
userInfo: ["flex", "flex-col", "gap-2", "justify-center", "items-start"],
|
|
12
|
+
displayName: ["text-slate-900", "**:cursor-pointer"],
|
|
13
|
+
detailInfo: ["flex", "flex", "gap-4"],
|
|
14
|
+
timeInfo: ["text-slate-500"]
|
|
15
|
+
}
|
|
15
16
|
});
|
|
16
17
|
function timeSince(timestamp) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return hours === 1 ? "1 hour ago" : `${hours} hours ago`;
|
|
34
|
-
if (minutes > 0)
|
|
35
|
-
return minutes === 1 ? "1 minute ago" : `${minutes} minutes ago`;
|
|
36
|
-
return seconds <= 1 ? "just now" : `${seconds} seconds ago`;
|
|
18
|
+
const now = /* @__PURE__ */ new Date();
|
|
19
|
+
const past = timestamp instanceof Date ? timestamp : new Date(timestamp);
|
|
20
|
+
const diffMs = now.getTime() - past.getTime();
|
|
21
|
+
const seconds = Math.floor(diffMs / 1e3);
|
|
22
|
+
const minutes = Math.floor(seconds / 60);
|
|
23
|
+
const hours = Math.floor(minutes / 60);
|
|
24
|
+
const days = Math.floor(hours / 24);
|
|
25
|
+
const months = Math.floor(days / 30);
|
|
26
|
+
const years = Math.floor(days / 365);
|
|
27
|
+
if (years > 0) return years === 1 ? "1 year ago" : `${years} years ago`;
|
|
28
|
+
if (months > 0) return months === 1 ? "1 month ago" : `${months} months ago`;
|
|
29
|
+
if (days > 0) return days === 1 ? "1 day ago" : `${days} days ago`;
|
|
30
|
+
if (hours > 0) return hours === 1 ? "1 hour ago" : `${hours} hours ago`;
|
|
31
|
+
if (minutes > 0)
|
|
32
|
+
return minutes === 1 ? "1 minute ago" : `${minutes} minutes ago`;
|
|
33
|
+
return seconds <= 1 ? "just now" : `${seconds} seconds ago`;
|
|
37
34
|
}
|
|
38
35
|
function getLabelSize(size) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
switch (size) {
|
|
37
|
+
case "sm":
|
|
38
|
+
return "md";
|
|
39
|
+
case "md":
|
|
40
|
+
return "lg";
|
|
41
|
+
case "lg":
|
|
42
|
+
return "xl";
|
|
43
|
+
default:
|
|
44
|
+
return "md";
|
|
45
|
+
}
|
|
49
46
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
const UserInfo = (props) => {
|
|
48
|
+
const { base, userInfo, displayName, detailInfo, timeInfo } = userInfoStyles(props);
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", { className: base(), children: [
|
|
50
|
+
props.src && /* @__PURE__ */ jsx(
|
|
51
|
+
Avatar,
|
|
52
|
+
{
|
|
53
|
+
alt: "Profile",
|
|
54
|
+
size: "sm",
|
|
55
|
+
src: props.src,
|
|
56
|
+
onAvatarClick: props.onClick
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ jsxs("div", { className: userInfo(), children: [
|
|
60
|
+
/* @__PURE__ */ jsx("button", { onClick: props.onClick, className: displayName(), children: /* @__PURE__ */ jsx(Label, { size: getLabelSize(props.size), children: props.displayName }) }),
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: detailInfo(), children: [
|
|
62
|
+
/* @__PURE__ */ jsx(IconButton, { intent: "secondary", icon: Profile, onClick: props.onClick, children: props.userName }),
|
|
63
|
+
props.timestamp && /* @__PURE__ */ jsx(
|
|
64
|
+
IconButton,
|
|
65
|
+
{
|
|
66
|
+
intent: "primary",
|
|
67
|
+
icon: Time,
|
|
68
|
+
className: timeInfo(),
|
|
69
|
+
onClick: props.onClick,
|
|
70
|
+
children: timeSince(props.timestamp)
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
] })
|
|
74
|
+
] })
|
|
75
|
+
] });
|
|
76
|
+
};
|
|
77
|
+
export {
|
|
78
|
+
UserInfo
|
|
60
79
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const userRecommendationStyles: import(
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
2
|
+
declare const userRecommendationStyles: import('tailwind-variants').TVReturnType<{
|
|
3
3
|
[key: string]: {
|
|
4
|
-
[key: string]: import(
|
|
5
|
-
displayName?: import(
|
|
6
|
-
base?: import(
|
|
7
|
-
userInfo?: import(
|
|
4
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
5
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
6
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
7
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
} | {
|
|
11
11
|
[x: string]: {
|
|
12
|
-
[x: string]: import(
|
|
13
|
-
displayName?: import(
|
|
14
|
-
base?: import(
|
|
15
|
-
userInfo?: import(
|
|
12
|
+
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
13
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
14
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
15
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
16
16
|
};
|
|
17
17
|
};
|
|
18
18
|
} | {}, {
|
|
@@ -21,17 +21,17 @@ declare const userRecommendationStyles: import("tailwind-variants").TVReturnType
|
|
|
21
21
|
displayName: string[];
|
|
22
22
|
}, undefined, {
|
|
23
23
|
[key: string]: {
|
|
24
|
-
[key: string]: import(
|
|
25
|
-
displayName?: import(
|
|
26
|
-
base?: import(
|
|
27
|
-
userInfo?: import(
|
|
24
|
+
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
25
|
+
displayName?: import('tailwind-merge').ClassNameValue;
|
|
26
|
+
base?: import('tailwind-merge').ClassNameValue;
|
|
27
|
+
userInfo?: import('tailwind-merge').ClassNameValue;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
} | {}, {
|
|
31
31
|
base: string[];
|
|
32
32
|
userInfo: string[];
|
|
33
33
|
displayName: string[];
|
|
34
|
-
}, import(
|
|
34
|
+
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
35
35
|
base: string[];
|
|
36
36
|
userInfo: string[];
|
|
37
37
|
displayName: string[];
|
|
@@ -61,3 +61,4 @@ interface UserRecommendationProps extends UserRecommendationVariants {
|
|
|
61
61
|
*/
|
|
62
62
|
export declare const UserRecommendation: React.FC<UserRecommendationProps>;
|
|
63
63
|
export {};
|
|
64
|
+
//# sourceMappingURL=UserRecommendation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserRecommendation.d.ts","sourceRoot":"","sources":["../../../src/compositions/user-recommendation/UserRecommendation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAO1D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAc5B,CAAC;AAEH,KAAK,0BAA0B,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,UAAU,uBAAwB,SAAQ,0BAA0B;IAClE,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,mFAAmF;IACnF,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAmChE,CAAC"}
|
|
@@ -1,34 +1,62 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tv } from "tailwind-variants";
|
|
3
|
-
import { Avatar } from "../../components/avatar/Avatar";
|
|
4
|
-
import { Button } from "../../components/button/Button";
|
|
5
|
-
import { IconButton } from "../../components/icon-button/IconButton";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { Avatar } from "../../components/avatar/Avatar.js";
|
|
4
|
+
import { Button } from "../../components/button/Button.js";
|
|
5
|
+
import { IconButton } from "../../components/icon-button/IconButton.js";
|
|
6
|
+
import { Label } from "../../components/typography/Label.js";
|
|
7
|
+
import { Mumble } from "../../components/icons/generated/Mumble.js";
|
|
8
|
+
import { Profile } from "../../components/icons/generated/Profile.js";
|
|
8
9
|
const userRecommendationStyles = tv({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
slots: {
|
|
11
|
+
base: [
|
|
12
|
+
"flex",
|
|
13
|
+
"flex-col",
|
|
14
|
+
"gap-4",
|
|
15
|
+
"items-center",
|
|
16
|
+
"p-4",
|
|
17
|
+
"bg-white",
|
|
18
|
+
"rounded-2xl"
|
|
19
|
+
],
|
|
20
|
+
userInfo: ["flex", "flex-col", "gap-2", "items-center"],
|
|
21
|
+
displayName: ["text-slate-900", "**:cursor-pointer"]
|
|
22
|
+
}
|
|
22
23
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
const UserRecommendation = (props) => {
|
|
25
|
+
const { base, userInfo, displayName } = userRecommendationStyles(props);
|
|
26
|
+
return /* @__PURE__ */ jsxs("div", { className: base(), children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
Avatar,
|
|
29
|
+
{
|
|
30
|
+
alt: "Profile",
|
|
31
|
+
size: "lg",
|
|
32
|
+
src: props.src,
|
|
33
|
+
onAvatarClick: props.onProfileClick
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { className: userInfo(), children: [
|
|
37
|
+
/* @__PURE__ */ jsx("button", { onClick: props.onProfileClick, className: displayName(), children: /* @__PURE__ */ jsx(Label, { size: "lg", children: props.displayName }) }),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
IconButton,
|
|
40
|
+
{
|
|
41
|
+
icon: Profile,
|
|
42
|
+
intent: "secondary",
|
|
43
|
+
onClick: props.onProfileClick,
|
|
44
|
+
children: props.userName
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Button,
|
|
50
|
+
{
|
|
51
|
+
icon: Mumble,
|
|
52
|
+
intent: "secondary",
|
|
53
|
+
onClick: props.onFollowClick,
|
|
54
|
+
size: "md",
|
|
55
|
+
children: props.label
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
] });
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
UserRecommendation
|
|
34
62
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export * from
|
|
3
|
-
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './compositions';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAErB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
|