@appquality/unguess-design-system 3.1.60 → 3.1.62

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/CHANGELOG.md CHANGED
@@ -1,3 +1,29 @@
1
+ # v3.1.62 (Tue Jan 02 2024)
2
+
3
+ #### 🐛 Bug Fix
4
+
5
+ - [CHAT] Improvements and fixes [#290](https://github.com/AppQuality/unguess-design-system/pull/290) ([@cannarocks](https://github.com/cannarocks))
6
+ - fix(chat): add clear from external save and fix shrinked avat [#289](https://github.com/AppQuality/unguess-design-system/pull/289) ([@cannarocks](https://github.com/cannarocks))
7
+
8
+ #### Authors: 1
9
+
10
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
11
+
12
+ ---
13
+
14
+ # v3.1.61 (Fri Dec 29 2023)
15
+
16
+ #### 🐛 Bug Fix
17
+
18
+ - Improve chat spacing and save behaviour [#288](https://github.com/AppQuality/unguess-design-system/pull/288) ([@cannarocks](https://github.com/cannarocks))
19
+ - Update-chat-spaces [#287](https://github.com/AppQuality/unguess-design-system/pull/287) ([@cannarocks](https://github.com/cannarocks))
20
+
21
+ #### Authors: 1
22
+
23
+ - Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
24
+
25
+ ---
26
+
1
27
  # v3.1.60 (Fri Dec 29 2023)
2
28
 
3
29
  #### 🐛 Bug Fix
package/build/index.js CHANGED
@@ -2289,6 +2289,7 @@ const ChatContextProvider = ({ onSave, children, }) => {
2289
2289
  triggerSave: () => {
2290
2290
  if (editor && onSave) {
2291
2291
  onSave(editor);
2292
+ editor.commands.clearContent();
2292
2293
  }
2293
2294
  },
2294
2295
  }), [comment, setComment, isEditing, setIsEditing, editor, setEditor, onSave]);
@@ -2302,18 +2303,18 @@ const useChatContext = () => {
2302
2303
  };
2303
2304
 
2304
2305
  const ChatContainer = styled__default["default"](Card) `
2305
- padding: ${({ theme }) => theme.space.md};
2306
+ padding: ${({ theme }) => `0 ${theme.space.base * 4}px`};
2306
2307
  &:hover {
2307
2308
  box-shadow: none;
2308
2309
  }
2309
2310
  cursor: default;
2310
2311
  `;
2311
2312
  const MessagesContainer = styled__default["default"].div `
2312
- padding: ${({ theme }) => theme.space.md};
2313
- margin: ${({ theme }) => `0 -${theme.space.md}`};
2313
+ padding: ${({ theme }) => `${theme.space.md} ${theme.space.sm}`};
2314
+ margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
2314
2315
  display: flex;
2315
2316
  flex-direction: column;
2316
- gap: ${({ theme }) => theme.space.sm};
2317
+ gap: ${({ theme }) => theme.space.xs};
2317
2318
  background: ${({ chatBkg }) => chatBkg !== null && chatBkg !== void 0 ? chatBkg : `#fff`};
2318
2319
  overflow-y: auto;
2319
2320
  `;
@@ -2326,7 +2327,7 @@ const Title$1 = (props) => jsxRuntime.jsx(reactNotifications.Title, Object.assig
2326
2327
  const ChatTitle = styled__default["default"](Title$1) `
2327
2328
  color: ${({ theme }) => theme.palette.blue[600]};
2328
2329
  margin: ${({ theme }) => `0 -${theme.space.md}`};
2329
- padding: ${({ theme }) => `0 ${theme.space.md} ${theme.space.sm}`};
2330
+ padding: ${({ theme }) => `${theme.space.sm} ${theme.space.md}`};
2330
2331
  border-bottom: ${({ theme }) => `1px solid ${theme.palette.grey[200]}`};
2331
2332
  `;
2332
2333
 
@@ -2747,13 +2748,13 @@ const FloatingMenu = (props) => {
2747
2748
  const ChatBoxContainer = styled__default["default"].div `
2748
2749
  display: flex;
2749
2750
  border-top: 1px solid ${({ theme }) => theme.palette.grey[200]};
2750
- margin: ${({ theme }) => `0 -${theme.space.md}`};
2751
- padding: ${({ theme }) => theme.space.md};
2751
+ margin: ${({ theme }) => `0 -${theme.space.base * 4}px`};
2752
+ padding: ${({ theme }) => `${theme.space.base * 4}px ${theme.space.sm} 0`};
2752
2753
  `;
2753
2754
  const EditorContainer$1 = styled__default["default"](reactForms.FauxInput) `
2754
2755
  margin-left: ${({ theme }) => theme.space.sm};
2756
+ padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
2755
2757
  .ProseMirror {
2756
- padding: ${({ theme }) => `${theme.space.xxs} ${theme.space.xs}`};
2757
2758
  background-color: #fff;
2758
2759
  min-height: 36px;
2759
2760
  outline: none;
@@ -2779,10 +2780,11 @@ const CommentBox = (_a) => {
2779
2780
  var _b;
2780
2781
  var { placeholderOptions } = _a, props = __rest(_a, ["placeholderOptions"]);
2781
2782
  const { children, hasInlineMenu, bubbleOptions, author } = props;
2782
- const { setEditor, triggerSave } = useChatContext();
2783
+ const { editor, setEditor, triggerSave } = useChatContext();
2783
2784
  const onKeyDown = (event) => {
2784
2785
  if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
2785
2786
  triggerSave();
2787
+ editor === null || editor === void 0 ? void 0 : editor.commands.clearContent();
2786
2788
  }
2787
2789
  };
2788
2790
  const ed = react.useEditor(Object.assign({ extensions: [
@@ -2943,8 +2945,8 @@ const AuthorContainer = styled.styled.div `
2943
2945
  gap: ${({ theme }) => theme.space.sm};
2944
2946
  `;
2945
2947
  const CommentDate = styled.styled.span `
2946
- color: ${({ theme }) => theme.palette.grey[500]};
2947
- font-weight: ${({ theme }) => theme.fontWeights.thin};
2948
+ color: ${({ theme }) => theme.palette.grey[500]};
2949
+ font-weight: ${({ theme }) => theme.fontWeights.thin};
2948
2950
  `;
2949
2951
  const Footer$2 = styled.styled.div `
2950
2952
  display: flex;
@@ -2954,7 +2956,7 @@ const Footer$2 = styled.styled.div `
2954
2956
  `;
2955
2957
  const Comment = ({ author, message, children, date, }) => {
2956
2958
  var _a, _b;
2957
- return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text" }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(Title$1, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(Editor, Object.assign({ editable: false }, { children: message })) })] })] }), jsxRuntime.jsx(Footer$2, { children: children })] }));
2959
+ return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text", style: { flexShrink: 0 } }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(Title$1, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(Editor, Object.assign({ editable: false }, { children: message })) })] })] }), jsxRuntime.jsx(Footer$2, { children: children })] }));
2958
2960
  };
2959
2961
 
2960
2962
  /**
@@ -1,4 +1,4 @@
1
- import { ReactNode } from "react";
1
+ /// <reference types="react" />
2
2
  export declare const ChatTitle: import("styled-components").IStyledComponent<"web", {
3
3
  isRegular?: boolean | undefined;
4
4
  defaultChecked?: boolean | undefined;
@@ -98,7 +98,7 @@ export declare const ChatTitle: import("styled-components").IStyledComponent<"we
98
98
  "aria-valuemin"?: number | undefined;
99
99
  "aria-valuenow"?: number | undefined;
100
100
  "aria-valuetext"?: string | undefined;
101
- children?: ReactNode;
101
+ children?: import("react").ReactNode;
102
102
  dangerouslySetInnerHTML?: {
103
103
  __html: string | TrustedHTML;
104
104
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.60",
3
+ "version": "3.1.62",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1 +0,0 @@
1
- export declare const ChatInput: () => void;