@krrli/cm-designsystem 1.34.7 → 1.34.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cm-designsystem.css +32 -12
- package/dist/compositions/post-creator/PostCreator.d.ts +12 -0
- package/dist/compositions/post-creator/PostCreator.d.ts.map +1 -1
- package/dist/compositions/post-creator/PostCreator.js +29 -4
- package/dist/compositions/profile-banner-image/ProfileBannerImage.d.ts.map +1 -1
- package/dist/compositions/profile-banner-image/ProfileBannerImage.js +4 -4
- package/dist/compositions/response/Response.d.ts.map +1 -1
- package/dist/compositions/response/Response.js +9 -2
- package/dist/compositions/response-creator/ResponseCreator.d.ts +6 -0
- package/dist/compositions/response-creator/ResponseCreator.d.ts.map +1 -1
- package/dist/compositions/response-creator/ResponseCreator.js +14 -2
- package/package.json +4 -4
package/dist/cm-designsystem.css
CHANGED
|
@@ -468,10 +468,6 @@
|
|
|
468
468
|
margin-top: calc(var(--spacing) * -.5);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
-
.-ml-3 {
|
|
472
|
-
margin-left: calc(var(--spacing) * -3);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
471
|
.block {
|
|
476
472
|
display: block;
|
|
477
473
|
}
|
|
@@ -536,10 +532,6 @@
|
|
|
536
532
|
height: calc(var(--spacing) * 40);
|
|
537
533
|
}
|
|
538
534
|
|
|
539
|
-
.h-80 {
|
|
540
|
-
height: calc(var(--spacing) * 80);
|
|
541
|
-
}
|
|
542
|
-
|
|
543
535
|
.h-\[\`\<spacing\>\`\] {
|
|
544
536
|
height: ` < spacing> ` ;
|
|
545
537
|
}
|
|
@@ -608,6 +600,10 @@
|
|
|
608
600
|
width: 100%;
|
|
609
601
|
}
|
|
610
602
|
|
|
603
|
+
.max-w-\[680px\] {
|
|
604
|
+
max-width: 680px;
|
|
605
|
+
}
|
|
606
|
+
|
|
611
607
|
.min-w-0 {
|
|
612
608
|
min-width: calc(var(--spacing) * 0);
|
|
613
609
|
}
|
|
@@ -720,10 +716,6 @@
|
|
|
720
716
|
gap: calc(var(--spacing) * 6);
|
|
721
717
|
}
|
|
722
718
|
|
|
723
|
-
.gap-10 {
|
|
724
|
-
gap: calc(var(--spacing) * 10);
|
|
725
|
-
}
|
|
726
|
-
|
|
727
719
|
.gap-12 {
|
|
728
720
|
gap: calc(var(--spacing) * 12);
|
|
729
721
|
}
|
|
@@ -1224,6 +1216,10 @@
|
|
|
1224
1216
|
overflow-wrap: anywhere;
|
|
1225
1217
|
}
|
|
1226
1218
|
|
|
1219
|
+
.whitespace-nowrap {
|
|
1220
|
+
white-space: nowrap;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1227
1223
|
.whitespace-pre-wrap {
|
|
1228
1224
|
white-space: pre-wrap;
|
|
1229
1225
|
}
|
|
@@ -1736,6 +1732,24 @@
|
|
|
1736
1732
|
opacity: .5;
|
|
1737
1733
|
}
|
|
1738
1734
|
|
|
1735
|
+
@media (min-width: 40rem) {
|
|
1736
|
+
.sm\:block {
|
|
1737
|
+
display: block;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
.sm\:hidden {
|
|
1741
|
+
display: none;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
.sm\:min-w-\[320px\] {
|
|
1745
|
+
min-width: 320px;
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
.sm\:flex-row {
|
|
1749
|
+
flex-direction: row;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1739
1753
|
@media (min-width: 48rem) {
|
|
1740
1754
|
.md\:absolute {
|
|
1741
1755
|
position: absolute;
|
|
@@ -1816,6 +1830,12 @@
|
|
|
1816
1830
|
}
|
|
1817
1831
|
}
|
|
1818
1832
|
|
|
1833
|
+
@media (min-width: 64rem) {
|
|
1834
|
+
.lg\:min-w-\[680px\] {
|
|
1835
|
+
min-width: 680px;
|
|
1836
|
+
}
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1819
1839
|
@media (hover: hover) {
|
|
1820
1840
|
.group-hover\:\[\&\>g\]\:\[\&\>path\:first-child\]\:translate-x-0\.5:is(:where(.group):hover *) > g > path:first-child {
|
|
1821
1841
|
--tw-translate-x: calc(var(--spacing) * .5);
|
|
@@ -2,51 +2,63 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
declare const PostCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
3
3
|
[key: string]: {
|
|
4
4
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
5
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
5
6
|
input?: import('tailwind-merge').ClassNameValue;
|
|
6
7
|
title?: import('tailwind-merge').ClassNameValue;
|
|
7
8
|
avatar?: import('tailwind-merge').ClassNameValue;
|
|
8
9
|
action?: import('tailwind-merge').ClassNameValue;
|
|
9
10
|
content?: import('tailwind-merge').ClassNameValue;
|
|
11
|
+
mobileHeader?: import('tailwind-merge').ClassNameValue;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
12
14
|
} | {
|
|
13
15
|
[x: string]: {
|
|
14
16
|
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
17
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
15
18
|
input?: import('tailwind-merge').ClassNameValue;
|
|
16
19
|
title?: import('tailwind-merge').ClassNameValue;
|
|
17
20
|
avatar?: import('tailwind-merge').ClassNameValue;
|
|
18
21
|
action?: import('tailwind-merge').ClassNameValue;
|
|
19
22
|
content?: import('tailwind-merge').ClassNameValue;
|
|
23
|
+
mobileHeader?: import('tailwind-merge').ClassNameValue;
|
|
20
24
|
};
|
|
21
25
|
};
|
|
22
26
|
} | {}, {
|
|
23
27
|
content: string[];
|
|
24
28
|
avatar: string[];
|
|
29
|
+
mobileHeader: string[];
|
|
25
30
|
title: string[];
|
|
26
31
|
input: string[];
|
|
27
32
|
action: string[];
|
|
33
|
+
button: string[];
|
|
28
34
|
}, undefined, {
|
|
29
35
|
[key: string]: {
|
|
30
36
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
37
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
31
38
|
input?: import('tailwind-merge').ClassNameValue;
|
|
32
39
|
title?: import('tailwind-merge').ClassNameValue;
|
|
33
40
|
avatar?: import('tailwind-merge').ClassNameValue;
|
|
34
41
|
action?: import('tailwind-merge').ClassNameValue;
|
|
35
42
|
content?: import('tailwind-merge').ClassNameValue;
|
|
43
|
+
mobileHeader?: import('tailwind-merge').ClassNameValue;
|
|
36
44
|
};
|
|
37
45
|
};
|
|
38
46
|
} | {}, {
|
|
39
47
|
content: string[];
|
|
40
48
|
avatar: string[];
|
|
49
|
+
mobileHeader: string[];
|
|
41
50
|
title: string[];
|
|
42
51
|
input: string[];
|
|
43
52
|
action: string[];
|
|
53
|
+
button: string[];
|
|
44
54
|
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
45
55
|
content: string[];
|
|
46
56
|
avatar: string[];
|
|
57
|
+
mobileHeader: string[];
|
|
47
58
|
title: string[];
|
|
48
59
|
input: string[];
|
|
49
60
|
action: string[];
|
|
61
|
+
button: string[];
|
|
50
62
|
}, undefined, unknown, unknown, undefined>>;
|
|
51
63
|
type PostCreatorVariants = VariantProps<typeof PostCreatorStyles>;
|
|
52
64
|
interface PostCreatorProps extends PostCreatorVariants {
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmBrB,CAAC;AAEH,KAAK,mBAAmB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,UAAU,gBAAiB,SAAQ,mBAAmB;IACpD,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,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,CAqElD,CAAC"}
|
|
@@ -14,14 +14,25 @@ import { Upload } from "../../components/icons/generated/Upload.js";
|
|
|
14
14
|
const PostCreatorStyles = tv({
|
|
15
15
|
slots: {
|
|
16
16
|
content: ["flex", "flex-col", "gap-4", "w-full"],
|
|
17
|
-
avatar: ["absolute", "-left-8", "top-6"],
|
|
18
|
-
|
|
17
|
+
avatar: ["absolute", "-left-8", "top-6", "hidden", "sm:block"],
|
|
18
|
+
mobileHeader: ["flex", "items-center", "gap-3", "sm:hidden"],
|
|
19
|
+
title: ["text-slate-900", "hidden", "sm:block"],
|
|
19
20
|
input: ["w-full", "h-40"],
|
|
20
|
-
action: ["flex", "gap-4"]
|
|
21
|
+
action: ["flex", "flex-col", "sm:flex-row", "gap-4"],
|
|
22
|
+
button: [
|
|
23
|
+
"flex",
|
|
24
|
+
"items-center",
|
|
25
|
+
"justify-center",
|
|
26
|
+
"gap-2",
|
|
27
|
+
"whitespace-nowrap",
|
|
28
|
+
"flex-1",
|
|
29
|
+
"text-sm",
|
|
30
|
+
"sm:text-base"
|
|
31
|
+
]
|
|
21
32
|
}
|
|
22
33
|
});
|
|
23
34
|
const PostCreator = (props) => {
|
|
24
|
-
const { content, avatar, title, input, action } = PostCreatorStyles(props);
|
|
35
|
+
const { content, avatar, mobileHeader, title, input, action, button } = PostCreatorStyles(props);
|
|
25
36
|
const [file, setFile] = useState(null);
|
|
26
37
|
const [text, setText] = useState("");
|
|
27
38
|
const imageUploadModalRef = useRef(null);
|
|
@@ -37,6 +48,18 @@ const PostCreator = (props) => {
|
|
|
37
48
|
}
|
|
38
49
|
) }),
|
|
39
50
|
/* @__PURE__ */ jsxs(Form, { className: content(), children: [
|
|
51
|
+
/* @__PURE__ */ jsxs("div", { className: mobileHeader(), children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
Avatar,
|
|
54
|
+
{
|
|
55
|
+
alt: "Profile",
|
|
56
|
+
size: "sm",
|
|
57
|
+
src: props.src,
|
|
58
|
+
onAvatarClick: props.onAvatarClick
|
|
59
|
+
}
|
|
60
|
+
),
|
|
61
|
+
/* @__PURE__ */ jsx(Heading, { size: "4", as: "h4", className: "text-slate-900", children: "Hey, what's up?" })
|
|
62
|
+
] }),
|
|
40
63
|
/* @__PURE__ */ jsx(Heading, { size: "4", as: "h4", className: title(), children: "Hey, what's up?" }),
|
|
41
64
|
/* @__PURE__ */ jsx("div", { className: input(), children: /* @__PURE__ */ jsx(
|
|
42
65
|
Textarea,
|
|
@@ -54,6 +77,7 @@ const PostCreator = (props) => {
|
|
|
54
77
|
size: "md",
|
|
55
78
|
icon: Upload,
|
|
56
79
|
onClick: () => imageUploadModalRef.current?.openModal(true),
|
|
80
|
+
className: button(),
|
|
57
81
|
children: "Picture upload"
|
|
58
82
|
}
|
|
59
83
|
),
|
|
@@ -64,6 +88,7 @@ const PostCreator = (props) => {
|
|
|
64
88
|
size: "md",
|
|
65
89
|
icon: Send,
|
|
66
90
|
onClick: () => props.onSendClick(text, file),
|
|
91
|
+
className: button(),
|
|
67
92
|
children: "Send"
|
|
68
93
|
}
|
|
69
94
|
)
|
|
@@ -1 +1 @@
|
|
|
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,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;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,
|
|
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,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;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,CA4BhE,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as AspectRatio from "@radix-ui/react-aspect-ratio";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { tv, cn } from "tailwind-variants";
|
|
6
6
|
import { Edit } from "../../components/icons/generated/Edit.js";
|
|
7
7
|
const ProfileBannerImageStyles = tv({
|
|
8
8
|
slots: {
|
|
9
|
-
base: ["w-
|
|
9
|
+
base: ["w-full", "max-w-[680px]", "sm:min-w-[320px]", "lg:min-w-[680px]"],
|
|
10
10
|
image: [
|
|
11
11
|
"h-full",
|
|
12
12
|
"w-full",
|
|
@@ -48,7 +48,7 @@ const ProfileBannerImageStyles = tv({
|
|
|
48
48
|
const ProfileBannerImage = (props) => {
|
|
49
49
|
const { base, image, overlay, icon } = ProfileBannerImageStyles(props);
|
|
50
50
|
const [src, setSrc] = useState(props.src ?? "");
|
|
51
|
-
return /* @__PURE__ */ jsx("div", { className: base(), children:
|
|
51
|
+
return /* @__PURE__ */ jsx("div", { className: base(), children: /* @__PURE__ */ jsx(AspectRatio.Root, { ratio: 17 / 8, children: src ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
52
|
/* @__PURE__ */ jsx(
|
|
53
53
|
"img",
|
|
54
54
|
{
|
|
@@ -59,7 +59,7 @@ const ProfileBannerImage = (props) => {
|
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ jsx("button", { className: cn(image(), overlay()), onClick: props.onClick, children: /* @__PURE__ */ jsx(Edit, { className: icon() }) })
|
|
62
|
-
] }) : /* @__PURE__ */ jsx("div", { className: image({ isFallback: true }) }) });
|
|
62
|
+
] }) : /* @__PURE__ */ jsx("div", { className: image({ isFallback: true }) }) }) });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
65
65
|
ProfileBannerImage
|
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAmBlB,CAAC;AAEH,KAAK,gBAAgB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,UAAU,aAAc,SAAQ,gBAAgB;IAC9C,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,uDAAuD;IACvD,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAExB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,4CAA4C;IAC5C,aAAa,EAAE,MAAM,IAAI,CAAC;IAE1B,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE7B,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B,+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;IAEzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0D5C,CAAC"}
|
|
@@ -13,14 +13,21 @@ import { Share } from "../../components/icons/generated/Share.js";
|
|
|
13
13
|
const ResponseStyles = tv({
|
|
14
14
|
slots: {
|
|
15
15
|
base: [],
|
|
16
|
-
content: ["flex", "flex-col", "gap-4"],
|
|
16
|
+
content: ["flex", "flex-col", "gap-4", "md:gap-6"],
|
|
17
17
|
text: [
|
|
18
18
|
"text-slate-900",
|
|
19
19
|
"text-wrap",
|
|
20
20
|
"wrap-anywhere",
|
|
21
21
|
"whitespace-pre-wrap"
|
|
22
22
|
],
|
|
23
|
-
action: [
|
|
23
|
+
action: [
|
|
24
|
+
"flex",
|
|
25
|
+
"flex-row",
|
|
26
|
+
"gap-4",
|
|
27
|
+
"md:gap-10",
|
|
28
|
+
"justify-start",
|
|
29
|
+
"items-start"
|
|
30
|
+
]
|
|
24
31
|
}
|
|
25
32
|
});
|
|
26
33
|
const Response = ({
|
|
@@ -2,6 +2,7 @@ import { VariantProps } from 'tailwind-variants';
|
|
|
2
2
|
declare const ResponseCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
3
3
|
[key: string]: {
|
|
4
4
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
5
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
5
6
|
input?: import('tailwind-merge').ClassNameValue;
|
|
6
7
|
action?: import('tailwind-merge').ClassNameValue;
|
|
7
8
|
content?: import('tailwind-merge').ClassNameValue;
|
|
@@ -10,6 +11,7 @@ declare const ResponseCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
|
10
11
|
} | {
|
|
11
12
|
[x: string]: {
|
|
12
13
|
[x: string]: import('tailwind-merge').ClassNameValue | {
|
|
14
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
13
15
|
input?: import('tailwind-merge').ClassNameValue;
|
|
14
16
|
action?: import('tailwind-merge').ClassNameValue;
|
|
15
17
|
content?: import('tailwind-merge').ClassNameValue;
|
|
@@ -19,9 +21,11 @@ declare const ResponseCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
|
19
21
|
content: string[];
|
|
20
22
|
input: string[];
|
|
21
23
|
action: string[];
|
|
24
|
+
button: string[];
|
|
22
25
|
}, undefined, {
|
|
23
26
|
[key: string]: {
|
|
24
27
|
[key: string]: import('tailwind-merge').ClassNameValue | {
|
|
28
|
+
button?: import('tailwind-merge').ClassNameValue;
|
|
25
29
|
input?: import('tailwind-merge').ClassNameValue;
|
|
26
30
|
action?: import('tailwind-merge').ClassNameValue;
|
|
27
31
|
content?: import('tailwind-merge').ClassNameValue;
|
|
@@ -31,10 +35,12 @@ declare const ResponseCreatorStyles: import('tailwind-variants').TVReturnType<{
|
|
|
31
35
|
content: string[];
|
|
32
36
|
input: string[];
|
|
33
37
|
action: string[];
|
|
38
|
+
button: string[];
|
|
34
39
|
}, import('tailwind-variants').TVReturnType<unknown, {
|
|
35
40
|
content: string[];
|
|
36
41
|
input: string[];
|
|
37
42
|
action: string[];
|
|
43
|
+
button: string[];
|
|
38
44
|
}, undefined, unknown, unknown, undefined>>;
|
|
39
45
|
type ResponseCreatorVariants = VariantProps<typeof ResponseCreatorStyles>;
|
|
40
46
|
interface ResponseCreatorProps extends ResponseCreatorVariants {
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2CAgBzB,CAAC;AAEH,KAAK,uBAAuB,GAAG,YAAY,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,UAAU,oBAAqB,SAAQ,uBAAuB;IAC5D,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;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,CAoD1D,CAAC"}
|
|
@@ -14,11 +14,21 @@ const ResponseCreatorStyles = tv({
|
|
|
14
14
|
slots: {
|
|
15
15
|
content: ["flex", "flex-col", "gap-4", "w-full"],
|
|
16
16
|
input: ["w-full", "h-40"],
|
|
17
|
-
action: ["flex", "gap-4"]
|
|
17
|
+
action: ["flex", "flex-col", "sm:flex-row", "gap-4"],
|
|
18
|
+
button: [
|
|
19
|
+
"flex",
|
|
20
|
+
"items-center",
|
|
21
|
+
"justify-center",
|
|
22
|
+
"gap-2",
|
|
23
|
+
"whitespace-nowrap",
|
|
24
|
+
"flex-1",
|
|
25
|
+
"text-sm",
|
|
26
|
+
"sm:text-base"
|
|
27
|
+
]
|
|
18
28
|
}
|
|
19
29
|
});
|
|
20
30
|
const ResponseCreator = (props) => {
|
|
21
|
-
const { content, input, action } = ResponseCreatorStyles(props);
|
|
31
|
+
const { content, input, action, button } = ResponseCreatorStyles(props);
|
|
22
32
|
const [file, setFile] = useState(null);
|
|
23
33
|
const [text, setText] = useState("");
|
|
24
34
|
const imageUploadModalRef = useRef(null);
|
|
@@ -50,6 +60,7 @@ const ResponseCreator = (props) => {
|
|
|
50
60
|
size: "md",
|
|
51
61
|
icon: Upload,
|
|
52
62
|
onClick: () => imageUploadModalRef.current?.openModal(true),
|
|
63
|
+
className: button(),
|
|
53
64
|
children: "Picture upload"
|
|
54
65
|
}
|
|
55
66
|
),
|
|
@@ -60,6 +71,7 @@ const ResponseCreator = (props) => {
|
|
|
60
71
|
size: "md",
|
|
61
72
|
icon: Send,
|
|
62
73
|
onClick: () => props.onSendClick(text, file),
|
|
74
|
+
className: button(),
|
|
63
75
|
children: "Send"
|
|
64
76
|
}
|
|
65
77
|
)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krrli/cm-designsystem",
|
|
3
3
|
"repository": "https://github.com/ost-cas-fea-25-26/cm-designsystem",
|
|
4
|
-
"version": "1.34.
|
|
4
|
+
"version": "1.34.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"eslint-plugin-storybook": "10.1.10",
|
|
77
77
|
"eslint-plugin-unused-imports": "4.3.0",
|
|
78
78
|
"globals": "16.5.0",
|
|
79
|
-
"jsdom": "27.
|
|
80
|
-
"knip": "5.
|
|
79
|
+
"jsdom": "27.4.0",
|
|
80
|
+
"knip": "5.78.0",
|
|
81
81
|
"playwright": "1.57.0",
|
|
82
82
|
"prettier": "3.7.4",
|
|
83
83
|
"prettier-plugin-tailwindcss": "0.7.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"tailwind-merge": "3.4.0",
|
|
88
88
|
"tailwindcss": "4.1.18",
|
|
89
89
|
"typescript": "5.9.3",
|
|
90
|
-
"typescript-eslint": "8.50.
|
|
90
|
+
"typescript-eslint": "8.50.1",
|
|
91
91
|
"vite": "7.3.0",
|
|
92
92
|
"vite-plugin-dts": "4.5.4",
|
|
93
93
|
"vite-plugin-svgr": "^4.5.0",
|