@krrli/cm-designsystem 1.32.3 → 1.33.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 (38) hide show
  1. package/dist/cm-designsystem.css +13 -1
  2. package/dist/components/avatar/Avatar.d.ts +1 -1
  3. package/dist/components/avatar/Avatar.d.ts.map +1 -1
  4. package/dist/components/icon-button/IconButton.d.ts.map +1 -1
  5. package/dist/components/icon-button/IconButton.js +1 -0
  6. package/dist/compositions/image-banner/ImageBanner.d.ts.map +1 -1
  7. package/dist/compositions/image-banner/ImageBanner.js +1 -0
  8. package/dist/compositions/image-upload-modal/ImageUploadModal.d.ts.map +1 -1
  9. package/dist/compositions/image-upload-modal/ImageUploadModal.js +1 -0
  10. package/dist/compositions/keyword/Keyword.d.ts +40 -0
  11. package/dist/compositions/keyword/Keyword.d.ts.map +1 -0
  12. package/dist/compositions/keyword/Keyword.js +15 -0
  13. package/dist/compositions/post/Post.d.ts +10 -6
  14. package/dist/compositions/post/Post.d.ts.map +1 -1
  15. package/dist/compositions/post/Post.js +19 -5
  16. package/dist/compositions/post-creator/PostCreator.d.ts +1 -1
  17. package/dist/compositions/post-creator/PostCreator.d.ts.map +1 -1
  18. package/dist/compositions/post-creator/PostCreator.js +1 -0
  19. package/dist/compositions/profile-banner/ProfileBanner.d.ts.map +1 -1
  20. package/dist/compositions/profile-banner/ProfileBanner.js +1 -0
  21. package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts.map +1 -1
  22. package/dist/compositions/profile-banner-image/ProfileBannerImage.js +1 -0
  23. package/dist/compositions/profile-banner-info/ProfileBannerInfo.d.ts.map +1 -1
  24. package/dist/compositions/profile-banner-info/ProfileBannerInfo.js +1 -0
  25. package/dist/compositions/response/Response.d.ts +4 -0
  26. package/dist/compositions/response/Response.d.ts.map +1 -1
  27. package/dist/compositions/response/Response.js +18 -4
  28. package/dist/compositions/response-creator/ResponseCreator.d.ts.map +1 -1
  29. package/dist/compositions/response-creator/ResponseCreator.js +1 -0
  30. package/dist/compositions/user-info/UserInfo.d.ts +2 -2
  31. package/dist/compositions/user-info/UserInfo.d.ts.map +1 -1
  32. package/dist/compositions/user-info/UserInfo.js +11 -2
  33. package/dist/compositions/user-recommendation/UserRecommendation.d.ts.map +1 -1
  34. package/dist/compositions/user-recommendation/UserRecommendation.js +1 -0
  35. package/dist/compositions/utils/keyword.utils.d.ts +13 -0
  36. package/dist/compositions/utils/keyword.utils.d.ts.map +1 -0
  37. package/dist/compositions/utils/keyword.utils.js +23 -0
  38. package/package.json +20 -19
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
2
2
  @layer properties {
3
3
  @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
4
  *, :before, :after, ::backdrop {
@@ -1208,6 +1208,18 @@
1208
1208
  letter-spacing: var(--tracking-normal);
1209
1209
  }
1210
1210
 
1211
+ .text-wrap {
1212
+ text-wrap: wrap;
1213
+ }
1214
+
1215
+ .wrap-anywhere {
1216
+ overflow-wrap: anywhere;
1217
+ }
1218
+
1219
+ .whitespace-pre-wrap {
1220
+ white-space: pre-wrap;
1221
+ }
1222
+
1211
1223
  .text-black {
1212
1224
  color: var(--color-black);
1213
1225
  }
@@ -89,7 +89,7 @@ interface AvatarProps extends AvatarVariants {
89
89
  /**
90
90
  * The URL source of the avatar image.
91
91
  */
92
- src: string;
92
+ src: string | undefined;
93
93
  /**
94
94
  * Accessible label for the action button that appears on extra-large (`xl`)
95
95
  * avatars when `onActionClick` is provided.
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK1D,QAAA,MAAM,YAAY;;;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AAM,GAAG,SAAS,CAAC;IAExB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAE3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6BxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAkBpB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,KAAK,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhD;;;;;GAKG;AACH,UAAU,eACR,SAAQ,kBAAkB,EAAE,yBAAyB;IACrD;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAE1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAchD,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/components/icon-button/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmBpB,CAAC;AAEH,KAAK,kBAAkB,GAAG,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,KAAK,gBAAgB,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhD;;;;;GAKG;AACH,UAAU,eACR,SAAQ,kBAAkB,EAAE,yBAAyB;IACrD;;OAEG;IACH,MAAM,EAAE,gBAAgB,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;IAE1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAchD,CAAC"}
@@ -7,6 +7,7 @@ const iconButtonStyles = tv({
7
7
  base: [
8
8
  "flex",
9
9
  "gap-1",
10
+ "items-center",
10
11
  "transition",
11
12
  "duration-350",
12
13
  "ease-in-out",
@@ -1 +1 @@
1
- {"version":3,"file":"ImageBanner.d.ts","sourceRoot":"","sources":["../../../src/compositions/image-banner/ImageBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG9D,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAiCrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,wDAAwD;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0BlD,CAAC"}
1
+ {"version":3,"file":"ImageBanner.d.ts","sourceRoot":"","sources":["../../../src/compositions/image-banner/ImageBanner.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG9D,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAiCrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,wDAAwD;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA0BlD,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as AspectRatio from "@radix-ui/react-aspect-ratio";
3
4
  import { useState } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"ImageUploadModal.d.ts","sourceRoot":"","sources":["../../../src/compositions/image-upload-modal/ImageUploadModal.tsx"],"names":[],"mappings":"AAIA,UAAU,qBAAqB;IAC7B,4FAA4F;IAC5F,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,sFAAsF;IACtF,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,uHAwC3B,CAAC"}
1
+ {"version":3,"file":"ImageUploadModal.d.ts","sourceRoot":"","sources":["../../../src/compositions/image-upload-modal/ImageUploadModal.tsx"],"names":[],"mappings":"AAMA,UAAU,qBAAqB;IAC7B,4FAA4F;IAC5F,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,sFAAsF;IACtF,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,uHAwC3B,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, jsx } from "react/jsx-runtime";
2
3
  import { forwardRef, useState, useImperativeHandle } from "react";
3
4
  import { Modal } from "../../components/modal/Modal.js";
@@ -0,0 +1,40 @@
1
+ import { ReactNode } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ declare const keywordStyles: import('tailwind-variants').TVReturnType<{
4
+ [key: string]: {
5
+ [key: string]: import('tailwind-merge').ClassNameValue | {
6
+ base?: import('tailwind-merge').ClassNameValue;
7
+ };
8
+ };
9
+ } | {
10
+ [x: string]: {
11
+ [x: string]: import('tailwind-merge').ClassNameValue | {
12
+ base?: import('tailwind-merge').ClassNameValue;
13
+ };
14
+ };
15
+ } | {}, {
16
+ base: string[];
17
+ }, undefined, {
18
+ [key: string]: {
19
+ [key: string]: import('tailwind-merge').ClassNameValue | {
20
+ base?: import('tailwind-merge').ClassNameValue;
21
+ };
22
+ };
23
+ } | {}, {
24
+ base: string[];
25
+ }, import('tailwind-variants').TVReturnType<unknown, {
26
+ base: string[];
27
+ }, undefined, unknown, unknown, undefined>>;
28
+ type KeywordVariants = VariantProps<typeof keywordStyles>;
29
+ interface KeywordProps extends KeywordVariants {
30
+ /**
31
+ * The text content displayed as keyword.
32
+ */
33
+ children: ReactNode;
34
+ }
35
+ /**
36
+ * Renders a styled keyword element.
37
+ */
38
+ export declare const Keyword: React.FC<KeywordProps>;
39
+ export {};
40
+ //# sourceMappingURL=Keyword.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Keyword.d.ts","sourceRoot":"","sources":["../../../src/compositions/keyword/Keyword.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1D,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;2CAIjB,CAAC;AAEH,KAAK,eAAe,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D,UAAU,YAAa,SAAQ,eAAe;IAC5C;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAQ1C,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { tv } from "tailwind-variants";
3
+ import { Paragraph } from "../../components/typography/Paragraph.js";
4
+ const keywordStyles = tv({
5
+ slots: {
6
+ base: ["text-violet-600"]
7
+ }
8
+ });
9
+ const Keyword = (props) => {
10
+ const { base } = keywordStyles(props);
11
+ return /* @__PURE__ */ jsx(Paragraph, { as: "span", size: "lg", className: base(), children: props.children });
12
+ };
13
+ export {
14
+ Keyword
15
+ };
@@ -45,19 +45,23 @@ interface PostProps extends PostVariants {
45
45
  /** Size of the post, affecting layout and styling. */
46
46
  size: PostSize;
47
47
  /** The display name of the user who created the post. */
48
- displayName: string;
48
+ displayName: string | undefined;
49
49
  /** The username or handle associated with the post. */
50
- userName: string;
50
+ userName: string | undefined;
51
51
  /** The date and time when the post was created. */
52
- timestamp: Date;
52
+ timestamp: Date | undefined;
53
53
  /** The main text content of the post. */
54
- text: string;
54
+ text: string | undefined;
55
55
  /** Avatar image URL */
56
- src: string;
56
+ src: string | undefined;
57
57
  /** Triggered when the avatar is clicked. */
58
58
  onAvatarClick: () => void;
59
+ /** Number of likes the post has received. */
60
+ nbrOfLikes: number;
61
+ /** Number of comments the post has received. */
62
+ nbrOfComments: number;
59
63
  /** Optional image source URL displayed within the post. */
60
- imageSrc?: string;
64
+ imageSrc?: string | undefined;
61
65
  /** Optional alt text for the post image, used for accessibility. */
62
66
  imageAlt?: string;
63
67
  /** Callback fired when the comment button is clicked. */
@@ -1 +1 @@
1
- {"version":3,"file":"Post.d.ts","sourceRoot":"","sources":["../../../src/compositions/post/Post.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAa1D,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAcd,CAAC;AAEH,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5B,UAAU,SAAU,SAAQ,YAAY;IACtC,sDAAsD;IACtD,IAAI,EAAE,QAAQ,CAAC;IAEf,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;IAEpB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAC;IAEjB,mDAAmD;IACnD,SAAS,EAAE,IAAI,CAAC;IAEhB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IAEb,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,yDAAyD;IACzD,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,sDAAsD;IACtD,WAAW,EAAE,MA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DAAuD;IACvD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA2DpC,CAAC"}
@@ -1,20 +1,27 @@
1
+ "use client";
1
2
  import { jsxs, jsx } from "react/jsx-runtime";
2
3
  import { tv } from "tailwind-variants";
3
4
  import { ImageBanner } from "../image-banner/ImageBanner.js";
4
5
  import { PostBase } from "../post-base/PostBase.js";
5
6
  import { UserInfo } from "../user-info/UserInfo.js";
7
+ import { renderWithHashtags } from "../utils/keyword.utils.js";
6
8
  import { Avatar } from "../../components/avatar/Avatar.js";
7
- import { Paragraph } from "../../components/typography/Paragraph.js";
8
9
  import { Toggle } from "../../components/toggle/Toggle.js";
9
10
  import { LikeToggle } from "../../components/like-toggle/LikeToggle.js";
10
11
  import { TimedButton } from "../../components/timed-button/TimedButton.js";
11
12
  import { Share } from "../../components/icons/generated/Share.js";
13
+ import { Paragraph } from "../../components/typography/Paragraph.js";
12
14
  const PostStyles = tv({
13
15
  slots: {
14
16
  base: [],
15
17
  avatar: ["absolute", "-left-8", "top-6"],
16
18
  content: ["flex", "flex-col", "gap-6"],
17
- text: ["text-slate-900"],
19
+ text: [
20
+ "text-slate-900",
21
+ "text-wrap",
22
+ "wrap-anywhere",
23
+ "whitespace-pre-wrap"
24
+ ],
18
25
  action: ["flex", "gap-10", "justify-start", "-ml-3"]
19
26
  },
20
27
  variants: {
@@ -47,7 +54,7 @@ const Post = (props) => {
47
54
  onClick: props.onAvatarClick
48
55
  }
49
56
  ),
50
- /* @__PURE__ */ jsx(Paragraph, { size: props.size, className: text(), children: props.text }),
57
+ /* @__PURE__ */ jsx(Paragraph, { size: props.size, className: text(), children: renderWithHashtags(props.text) }),
51
58
  props.imageSrc && /* @__PURE__ */ jsx(
52
59
  ImageBanner,
53
60
  {
@@ -62,11 +69,18 @@ const Post = (props) => {
62
69
  Toggle,
63
70
  {
64
71
  ariaLabel: "Comment",
65
- labelText: "Comment",
72
+ labelText: props.nbrOfComments === 0 ? "Comment" : props.nbrOfComments === 1 ? "1 Comment" : `${props.nbrOfComments} Comments`,
73
+ pressed: props.nbrOfComments !== 0,
66
74
  onToggle: props.onCommentClick
67
75
  }
68
76
  ),
69
- /* @__PURE__ */ jsx(LikeToggle, { onLikeChange: props.onLikeClick }),
77
+ /* @__PURE__ */ jsx(
78
+ LikeToggle,
79
+ {
80
+ likes: props.nbrOfLikes,
81
+ onLikeChange: props.onLikeClick
82
+ }
83
+ ),
70
84
  /* @__PURE__ */ jsx(
71
85
  TimedButton,
72
86
  {
@@ -51,7 +51,7 @@ declare const PostCreatorStyles: import('tailwind-variants').TVReturnType<{
51
51
  type PostCreatorVariants = VariantProps<typeof PostCreatorStyles>;
52
52
  interface PostCreatorProps extends PostCreatorVariants {
53
53
  /** Avatar image URL */
54
- src: string;
54
+ src: string | undefined;
55
55
  /** Triggered when the avatar is clicked. */
56
56
  onAvatarClick: () => void;
57
57
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PostCreator.d.ts","sourceRoot":"","sources":["../../../src/compositions/post-creator/PostCreator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAS1D,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAQrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;;OAGG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxD;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuDlD,CAAC"}
1
+ {"version":3,"file":"PostCreator.d.ts","sourceRoot":"","sources":["../../../src/compositions/post-creator/PostCreator.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAS1D,QAAA,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAQrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,uBAAuB;IACvB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;IAExB,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B;;;OAGG;IACH,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACxD;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAuDlD,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
3
  import { Form } from "@radix-ui/react-form";
3
4
  import { useState, useRef } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileBanner.d.ts","sourceRoot":"","sources":["../../../src/compositions/profile-banner/ProfileBanner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAS1D,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAOvB,CAAC;AAEH,KAAK,qBAAqB,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,UAAU,kBAAmB,SAAQ,qBAAqB;IACxD,sCAAsC;IACtC,SAAS,EAAE,MAAM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CAAC;IAEjB,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IAEpB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IAEjB,iCAAiC;IACjC,eAAe,EAAE,IAAI,CAAC;IAEtB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IAEpB,sEAAsE;IACtE,aAAa,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAEnD;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoDtD,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
3
  import { useRef } from "react";
3
4
  import { tv } from "tailwind-variants";
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileBannerImage.d.ts","sourceRoot":"","sources":["../../../src/compositions/profile-banner-image/ProfileBannerImage.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG9D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAwC5B,CAAC;AAEH,KAAK,0BAA0B,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,UAAU,uBAAwB,SAAQ,0BAA0B;IAClE,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0BhE,CAAC"}
1
+ {"version":3,"file":"ProfileBannerImage.d.ts","sourceRoot":"","sources":["../../../src/compositions/profile-banner-image/ProfileBannerImage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAU,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG9D,QAAA,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAwC5B,CAAC;AAEH,KAAK,0BAA0B,GAAG,YAAY,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,UAAU,uBAAwB,SAAQ,0BAA0B;IAClE,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ,+DAA+D;IAC/D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA0BhE,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as AspectRatio from "@radix-ui/react-aspect-ratio";
3
4
  import { useState } from "react";
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileBannerInfo.d.ts","sourceRoot":"","sources":["../../../src/compositions/profile-banner-info/ProfileBannerInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAU1D,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAS3B,CAAC;AAEH,KAAK,yBAAyB,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,UAAU,sBAAuB,SAAQ,yBAAyB;IAChE,sEAAsE;IACtE,aAAa,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,EAAE,IAAI,CAAC;IAEtB;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAwBD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAgD9D,CAAC"}
1
+ {"version":3,"file":"ProfileBannerInfo.d.ts","sourceRoot":"","sources":["../../../src/compositions/profile-banner-info/ProfileBannerInfo.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAU1D,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAS3B,CAAC;AAEH,KAAK,yBAAyB,GAAG,YAAY,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E,UAAU,sBAAuB,SAAQ,yBAAyB;IAChE,sEAAsE;IACtE,aAAa,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,eAAe,EAAE,IAAI,CAAC;IAEtB;;;OAGG;IACH,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,6DAA6D;IAC7D,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;CAC9B;AAwBD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAgD9D,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, jsx } from "react/jsx-runtime";
2
3
  import { tv } from "tailwind-variants";
3
4
  import { IconButton } from "../../components/icon-button/IconButton.js";
@@ -56,6 +56,10 @@ interface ResponseProps extends ResponseVariants {
56
56
  src: string;
57
57
  /** Triggered when the avatar is clicked. */
58
58
  onAvatarClick: () => void;
59
+ /** Number of likes the post has received. */
60
+ nbrOfLikes: number;
61
+ /** Number of comments the post has received. */
62
+ nbrOfComments: number;
59
63
  /** Optional image source URL displayed within the Response. */
60
64
  imageSrc?: string;
61
65
  /** Optional alt text for the Response image, used for accessibility. */
@@ -1 +1 @@
1
- {"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../../src/compositions/response/Response.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAO1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAOlB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IAEpB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IAEjB,uDAAuD;IACvD,SAAS,EAAE,IAAI,CAAC;IAEhB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IAEb,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,yDAAyD;IACzD,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,sDAAsD;IACtD,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,uDAAuD;IACvD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyC5C,CAAC"}
1
+ {"version":3,"file":"Response.d.ts","sourceRoot":"","sources":["../../../src/compositions/response/Response.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAYlB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IAEpB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IAEjB,uDAAuD;IACvD,SAAS,EAAE,IAAI,CAAC;IAEhB,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IAEb,uBAAuB;IACvB,GAAG,EAAE,MAAM,CAAC;IAEZ,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,6CAA6C;IAC7C,UAAU,EAAE,MAAM,CAAC;IAEnB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IAEtB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,yDAAyD;IACzD,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,sDAAsD;IACtD,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB,uDAAuD;IACvD,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmD5C,CAAC"}
@@ -1,8 +1,10 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from "react/jsx-runtime";
2
3
  import { tv } from "tailwind-variants";
3
4
  import { ImageBanner } from "../image-banner/ImageBanner.js";
4
5
  import { PostBase } from "../post-base/PostBase.js";
5
6
  import { UserInfo } from "../user-info/UserInfo.js";
7
+ import { renderWithHashtags } from "../utils/keyword.utils.js";
6
8
  import { Paragraph } from "../../components/typography/Paragraph.js";
7
9
  import { Toggle } from "../../components/toggle/Toggle.js";
8
10
  import { LikeToggle } from "../../components/like-toggle/LikeToggle.js";
@@ -12,7 +14,12 @@ const ResponseStyles = tv({
12
14
  slots: {
13
15
  base: [],
14
16
  content: ["flex", "flex-col", "gap-4"],
15
- text: ["text-slate-900"],
17
+ text: [
18
+ "text-slate-900",
19
+ "text-wrap",
20
+ "wrap-anywhere",
21
+ "whitespace-pre-wrap"
22
+ ],
16
23
  action: ["flex", "gap-10", "justify-start", "-ml-3"]
17
24
  }
18
25
  });
@@ -30,7 +37,7 @@ const Response = (props) => {
30
37
  onClick: props.onAvatarClick
31
38
  }
32
39
  ),
33
- /* @__PURE__ */ jsx(Paragraph, { size: "md", className: text(), children: props.text }),
40
+ /* @__PURE__ */ jsx(Paragraph, { size: "md", className: text(), children: renderWithHashtags(props.text) }),
34
41
  props.imageSrc && /* @__PURE__ */ jsx(
35
42
  ImageBanner,
36
43
  {
@@ -45,11 +52,18 @@ const Response = (props) => {
45
52
  Toggle,
46
53
  {
47
54
  ariaLabel: "Comment",
48
- labelText: "Comment",
55
+ labelText: props.nbrOfComments === 0 ? "Comment" : props.nbrOfComments === 1 ? "1 Comment" : `${props.nbrOfComments} Comments`,
56
+ pressed: props.nbrOfComments !== 0,
49
57
  onToggle: props.onCommentClick
50
58
  }
51
59
  ),
52
- /* @__PURE__ */ jsx(LikeToggle, { onLikeChange: props.onLikeClick }),
60
+ /* @__PURE__ */ jsx(
61
+ LikeToggle,
62
+ {
63
+ likes: props.nbrOfLikes,
64
+ onLikeChange: props.onLikeClick
65
+ }
66
+ ),
53
67
  /* @__PURE__ */ jsx(
54
68
  TimedButton,
55
69
  {
@@ -1 +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
+ {"version":3,"file":"ResponseCreator.d.ts","sourceRoot":"","sources":["../../../src/compositions/response-creator/ResponseCreator.tsx"],"names":[],"mappings":"AAIA,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,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
3
  import { Form } from "@radix-ui/react-form";
3
4
  import { useState, useRef } from "react";
@@ -56,9 +56,9 @@ interface UserInfoProps extends UserInfoVariants {
56
56
  /** Size variant of the component */
57
57
  size: UserInfoSize;
58
58
  /** Display name of the user */
59
- displayName: string;
59
+ displayName: string | undefined;
60
60
  /** Username of the user */
61
- userName: string;
61
+ userName: string | undefined;
62
62
  /** Timestamp for the user activity */
63
63
  timestamp?: Date;
64
64
  /** Click handler for the whole UserInfo component */
@@ -1 +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
+ {"version":3,"file":"UserInfo.d.ts","sourceRoot":"","sources":["../../../src/compositions/user-info/UserInfo.tsx"],"names":[],"mappings":"AAEA,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,GAAG,SAAS,CAAC;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,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,CA6C5C,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, jsx } from "react/jsx-runtime";
2
3
  import { tv } from "tailwind-variants";
3
4
  import { Avatar } from "../../components/avatar/Avatar.js";
@@ -57,9 +58,17 @@ const UserInfo = (props) => {
57
58
  }
58
59
  ),
59
60
  /* @__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__ */ jsx("button", { onClick: props.onClick, className: displayName(), children: props.displayName && /* @__PURE__ */ jsx(Label, { size: getLabelSize(props.size), children: props.displayName }) }),
61
62
  /* @__PURE__ */ jsxs("div", { className: detailInfo(), children: [
62
- /* @__PURE__ */ jsx(IconButton, { intent: "secondary", icon: Profile, onClick: props.onClick, children: props.userName }),
63
+ props.userName && /* @__PURE__ */ jsx(
64
+ IconButton,
65
+ {
66
+ intent: "secondary",
67
+ icon: Profile,
68
+ onClick: props.onClick,
69
+ children: props.userName
70
+ }
71
+ ),
63
72
  props.timestamp && /* @__PURE__ */ jsx(
64
73
  IconButton,
65
74
  {
@@ -1 +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
+ {"version":3,"file":"UserRecommendation.d.ts","sourceRoot":"","sources":["../../../src/compositions/user-recommendation/UserRecommendation.tsx"],"names":[],"mappings":"AAEA,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,3 +1,4 @@
1
+ "use client";
1
2
  import { jsxs, jsx } from "react/jsx-runtime";
2
3
  import { tv } from "tailwind-variants";
3
4
  import { Avatar } from "../../components/avatar/Avatar.js";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Splits a text string into normal text and hashtag elements,
3
+ * replacing each hashtag (`#word`) with a `<Keyword>` component.
4
+ *
5
+ * This function preserves the original text layout and returns
6
+ * an array of strings and React nodes suitable for direct rendering.
7
+ *
8
+ * @function renderWithHashtags
9
+ * @param {string} text - The input text that may contain hashtags.
10
+ * @returns {(string | React.ReactNode)[]} A list of text segments and `<Keyword>` components.
11
+ */
12
+ export declare function renderWithHashtags(text?: string): (string | import("react/jsx-runtime").JSX.Element)[];
13
+ //# sourceMappingURL=keyword.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyword.utils.d.ts","sourceRoot":"","sources":["../../../src/compositions/utils/keyword.utils.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,MAAW,wDA0BnD"}
@@ -0,0 +1,23 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Keyword } from "../keyword/Keyword.js";
3
+ function renderWithHashtags(text = "") {
4
+ const regex = /#\w+/g;
5
+ const parts = [];
6
+ let lastIndex = 0;
7
+ let match;
8
+ while ((match = regex.exec(text)) !== null) {
9
+ const { index } = match;
10
+ if (index > lastIndex) {
11
+ parts.push(text.substring(lastIndex, index));
12
+ }
13
+ parts.push(/* @__PURE__ */ jsx(Keyword, { children: match[0] }, index));
14
+ lastIndex = index + match[0].length;
15
+ }
16
+ if (lastIndex < text.length) {
17
+ parts.push(text.substring(lastIndex));
18
+ }
19
+ return parts;
20
+ }
21
+ export {
22
+ renderWithHashtags
23
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@krrli/cm-designsystem",
3
- "version": "1.32.3",
3
+ "repository": "https://github.com/ost-cas-fea-25-26/cm-designsystem",
4
+ "version": "1.33.1",
4
5
  "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "module": "dist/index.js",
@@ -41,53 +42,53 @@
41
42
  "@radix-ui/react-form": "0.1.8",
42
43
  "@radix-ui/react-tabs": "1.1.13",
43
44
  "@radix-ui/react-toggle": "1.1.10",
44
- "react": "19.2.1",
45
- "react-dom": "19.2.1"
45
+ "react": "19.2.3",
46
+ "react-dom": "19.2.3"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@chromatic-com/storybook": "4.1.3",
49
- "@eslint/js": "9.39.1",
50
+ "@eslint/js": "9.39.2",
50
51
  "@playwright/test": "1.57.0",
51
- "@storybook/addon-a11y": "10.1.4",
52
- "@storybook/addon-docs": "10.1.4",
53
- "@storybook/addon-vitest": "10.1.4",
54
- "@storybook/react-vite": "10.1.4",
55
- "@tailwindcss/vite": "4.1.17",
52
+ "@storybook/addon-a11y": "10.1.9",
53
+ "@storybook/addon-docs": "10.1.9",
54
+ "@storybook/addon-vitest": "10.1.9",
55
+ "@storybook/react-vite": "10.1.9",
56
+ "@tailwindcss/vite": "4.1.18",
56
57
  "@testing-library/dom": "10.4.1",
57
58
  "@testing-library/jest-dom": "6.9.1",
58
- "@testing-library/react": "16.3.0",
59
+ "@testing-library/react": "16.3.1",
59
60
  "@testing-library/user-event": "14.6.1",
60
- "@types/node": "24.10.1",
61
+ "@types/node": "24.10.4",
61
62
  "@types/react": "19.2.7",
62
63
  "@types/react-dom": "19.2.3",
63
64
  "@vitejs/plugin-react": "5.1.2",
64
65
  "@vitest/browser": "4.0.15",
65
66
  "@vitest/browser-playwright": "4.0.15",
66
67
  "@vitest/coverage-v8": "4.0.15",
67
- "eslint": "9.39.1",
68
+ "eslint": "9.39.2",
68
69
  "eslint-config-prettier": "10.1.8",
69
70
  "eslint-import-resolver-typescript": "4.4.4",
70
71
  "eslint-plugin-import": "2.32.0",
71
72
  "eslint-plugin-jsx-a11y": "6.10.2",
72
73
  "eslint-plugin-react": "7.37.5",
73
74
  "eslint-plugin-react-hooks": "7.0.1",
74
- "eslint-plugin-react-refresh": "0.4.24",
75
- "eslint-plugin-storybook": "10.1.4",
75
+ "eslint-plugin-react-refresh": "0.4.25",
76
+ "eslint-plugin-storybook": "10.1.9",
76
77
  "eslint-plugin-unused-imports": "4.3.0",
77
78
  "globals": "16.5.0",
78
79
  "jsdom": "27.3.0",
79
- "knip": "5.72.0",
80
+ "knip": "5.74.0",
80
81
  "playwright": "1.57.0",
81
82
  "prettier": "3.7.4",
82
83
  "prettier-plugin-tailwindcss": "0.7.2",
83
84
  "rollup-preserve-directives": "1.1.3",
84
85
  "semantic-release": "25.0.2",
85
- "storybook": "10.1.4",
86
+ "storybook": "10.1.9",
86
87
  "tailwind-merge": "3.4.0",
87
- "tailwindcss": "4.1.17",
88
+ "tailwindcss": "4.1.18",
88
89
  "typescript": "5.9.3",
89
- "typescript-eslint": "8.48.1",
90
- "vite": "7.2.7",
90
+ "typescript-eslint": "8.50.0",
91
+ "vite": "7.3.0",
91
92
  "vite-plugin-dts": "4.5.4",
92
93
  "vite-plugin-svgr": "^4.5.0",
93
94
  "vitest": "4.0.15"