@appquality/unguess-design-system 3.1.64 → 3.1.65

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.
@@ -15,5 +15,5 @@ export interface AvatarArgs extends IAvatarProps {
15
15
  /** Sets the badge text and applies active styling */
16
16
  badge?: string | number;
17
17
  /** Sets the avatar type */
18
- avatarType?: 'icon' | 'image' | 'text';
18
+ avatarType?: 'icon' | 'image' | 'text' | 'system';
19
19
  }
@@ -7,7 +7,7 @@ import { AvatarArgs } from "./_types";
7
7
  - To visually represent a person, brand, or product
8
8
  */
9
9
  declare const Avatar: {
10
- (props: AvatarArgs): import("react/jsx-runtime").JSX.Element;
10
+ ({ isSystem, badge, ...props }: AvatarArgs): import("react/jsx-runtime").JSX.Element;
11
11
  Text: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & import("react").RefAttributes<HTMLSpanElement>>;
12
12
  };
13
13
  export { Avatar };
@@ -1,5 +1,6 @@
1
1
  import { AvatarArgs } from "./_types";
2
2
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, AvatarArgs>;
3
3
  export declare const Square: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, AvatarArgs>;
4
+ export declare const Internal: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, AvatarArgs>;
4
5
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, AvatarArgs>;
5
6
  export default _default;
@@ -1,16 +1,28 @@
1
1
  import { PlaceholderOptions } from "@tiptap/extension-placeholder";
2
2
  import { BubbleMenuProps, EditorOptions } from "@tiptap/react";
3
3
  type validationStatus = "success" | "warning" | "error";
4
+ export type SuggestedUser = {
5
+ id: number;
6
+ name: string;
7
+ };
4
8
  export interface ChatEditorArgs extends Partial<EditorOptions> {
5
9
  placeholderOptions?: Partial<PlaceholderOptions>;
6
10
  hasInlineMenu?: boolean;
11
+ hasButtonsMenu?: boolean;
7
12
  bubbleOptions?: any;
8
13
  author: Author;
14
+ i18n?: {
15
+ menu?: {
16
+ bold?: string;
17
+ italic?: string;
18
+ mention?: string;
19
+ };
20
+ };
9
21
  }
10
22
  export interface Author {
11
23
  avatar: string;
12
24
  name?: string;
13
- avatarType?: "icon" | "image" | "text";
25
+ avatarType?: "icon" | "image" | "text" | "system";
14
26
  }
15
27
  export interface ChatArgs {
16
28
  chatBkg?: string;
@@ -1,17 +1,20 @@
1
1
  import { Editor } from "@tiptap/react";
2
2
  import React from "react";
3
+ import { SuggestedUser } from "../_types";
3
4
  export type ChatContextType = {
4
- isEditing: boolean;
5
- setIsEditing: (isEditing: boolean) => void;
6
- comment: string;
7
- setComment: (comment: string) => void;
8
5
  triggerSave: () => void;
9
6
  editor?: Editor;
10
7
  setEditor: React.Dispatch<React.SetStateAction<Editor | undefined>>;
8
+ mentionableUsers: (props: {
9
+ query: string;
10
+ }) => Promise<SuggestedUser[]>;
11
11
  };
12
12
  export declare const ChatContext: React.Context<ChatContextType | null>;
13
- export declare const ChatContextProvider: ({ onSave, children, }: {
14
- onSave?: ((editor: Editor) => void) | undefined;
13
+ export declare const ChatContextProvider: ({ onSave, setMentionableUsers, children, }: {
14
+ onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
15
15
  children: React.ReactNode;
16
+ setMentionableUsers: (props: {
17
+ query: string;
18
+ }) => Promise<SuggestedUser[]>;
16
19
  }) => import("react/jsx-runtime").JSX.Element;
17
20
  export declare const useChatContext: () => ChatContextType;
@@ -284,8 +284,9 @@ declare const Chat: {
284
284
  }> & ((props: import("../title/_types").TitleArgs) => import("react/jsx-runtime").JSX.Element);
285
285
  Comments: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ChatArgs>>;
286
286
  Input: ({ placeholderOptions, ...props }: PropsWithChildren<import("./_types").ChatEditorArgs>) => import("react/jsx-runtime").JSX.Element | null;
287
- Footer: ({ saveText, children, }: PropsWithChildren<{
287
+ Footer: ({ saveText, children, showShortcut, }: PropsWithChildren<{
288
288
  saveText?: string | undefined;
289
+ showShortcut?: boolean | undefined;
289
290
  }>) => import("react/jsx-runtime").JSX.Element;
290
291
  };
291
292
  export { Chat, ChatContext, ChatProvider, useChatContext, Comment };
@@ -1,24 +1,26 @@
1
1
  import { PlaceholderOptions } from "@tiptap/extension-placeholder";
2
2
  import { Editor as TipTapEditor } from "@tiptap/react";
3
- import { ChatEditorArgs } from "./_types";
3
+ import { ChatEditorArgs, SuggestedUser } from "./_types";
4
4
  interface EditorStoryArgs extends ChatEditorArgs {
5
5
  children?: any;
6
6
  comments?: {
7
7
  author: {
8
8
  name: string;
9
9
  avatar: string;
10
+ avatarType?: "icon" | "image" | "text" | "system";
10
11
  };
11
12
  message: string;
12
13
  date: string;
13
14
  }[];
14
15
  editorText?: string;
15
16
  background?: string;
16
- onSave: (editor: TipTapEditor) => void;
17
+ onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
17
18
  placeholderOptions?: Partial<PlaceholderOptions>;
18
19
  }
19
20
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
20
21
  export declare const Placeholder: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
21
- export declare const BubbleMenu: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
22
+ export declare const Menus: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
23
+ export declare const WithInternals: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
22
24
  export declare const CustomBackground: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
23
25
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./_types").ChatArgs & {
24
26
  children?: import("react").ReactNode;
@@ -0,0 +1,6 @@
1
+ import { ChatEditorArgs } from "../_types";
2
+ import { Editor } from "@tiptap/react";
3
+ declare const CommentBar: ({ editor, i18n, }: Partial<ChatEditorArgs> & {
4
+ editor?: Editor | undefined;
5
+ }) => import("react/jsx-runtime").JSX.Element | null;
6
+ export { CommentBar };
@@ -4,4 +4,4 @@ export declare const Comment: ({ author, message, children, date, }: PropsWithCh
4
4
  author: Author;
5
5
  message: string;
6
6
  date: string;
7
- }>) => import("react/jsx-runtime").JSX.Element;
7
+ }>) => import("react/jsx-runtime").JSX.Element | null;
@@ -10,17 +10,17 @@ export declare const ChatContainer: import("styled-components").IStyledComponent
10
10
  accessKey?: string | undefined;
11
11
  autoFocus?: boolean | undefined;
12
12
  className?: string | undefined;
13
- contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
13
+ contentEditable?: "inherit" | (boolean | "false" | "true") | undefined;
14
14
  contextMenu?: string | undefined;
15
15
  dir?: string | undefined;
16
- draggable?: (boolean | "true" | "false") | undefined;
16
+ draggable?: (boolean | "false" | "true") | undefined;
17
17
  hidden?: boolean | undefined;
18
18
  id?: string | undefined;
19
19
  lang?: string | undefined;
20
20
  nonce?: string | undefined;
21
21
  placeholder?: string | undefined;
22
22
  slot?: string | undefined;
23
- spellCheck?: (boolean | "true" | "false") | undefined;
23
+ spellCheck?: (boolean | "false" | "true") | undefined;
24
24
  style?: import("react").CSSProperties | undefined;
25
25
  tabIndex?: number | undefined;
26
26
  title?: string | undefined;
@@ -53,47 +53,47 @@ export declare const ChatContainer: import("styled-components").IStyledComponent
53
53
  inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
54
54
  is?: string | undefined;
55
55
  "aria-activedescendant"?: string | undefined;
56
- "aria-atomic"?: (boolean | "true" | "false") | undefined;
57
- "aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
58
- "aria-busy"?: (boolean | "true" | "false") | undefined;
59
- "aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
56
+ "aria-atomic"?: (boolean | "false" | "true") | undefined;
57
+ "aria-autocomplete"?: "none" | "both" | "inline" | "list" | undefined;
58
+ "aria-busy"?: (boolean | "false" | "true") | undefined;
59
+ "aria-checked"?: boolean | "mixed" | "false" | "true" | undefined;
60
60
  "aria-colcount"?: number | undefined;
61
61
  "aria-colindex"?: number | undefined;
62
62
  "aria-colspan"?: number | undefined;
63
63
  "aria-controls"?: string | undefined;
64
- "aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
64
+ "aria-current"?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
65
65
  "aria-describedby"?: string | undefined;
66
66
  "aria-details"?: string | undefined;
67
- "aria-disabled"?: (boolean | "true" | "false") | undefined;
68
- "aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
67
+ "aria-disabled"?: (boolean | "false" | "true") | undefined;
68
+ "aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
69
69
  "aria-errormessage"?: string | undefined;
70
- "aria-expanded"?: (boolean | "true" | "false") | undefined;
70
+ "aria-expanded"?: (boolean | "false" | "true") | undefined;
71
71
  "aria-flowto"?: string | undefined;
72
- "aria-grabbed"?: (boolean | "true" | "false") | undefined;
73
- "aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
74
- "aria-hidden"?: (boolean | "true" | "false") | undefined;
75
- "aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
72
+ "aria-grabbed"?: (boolean | "false" | "true") | undefined;
73
+ "aria-haspopup"?: boolean | "dialog" | "menu" | "listbox" | "grid" | "false" | "true" | "tree" | undefined;
74
+ "aria-hidden"?: (boolean | "false" | "true") | undefined;
75
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
76
76
  "aria-keyshortcuts"?: string | undefined;
77
77
  "aria-label"?: string | undefined;
78
78
  "aria-labelledby"?: string | undefined;
79
79
  "aria-level"?: number | undefined;
80
80
  "aria-live"?: "off" | "assertive" | "polite" | undefined;
81
- "aria-modal"?: (boolean | "true" | "false") | undefined;
82
- "aria-multiline"?: (boolean | "true" | "false") | undefined;
83
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
81
+ "aria-modal"?: (boolean | "false" | "true") | undefined;
82
+ "aria-multiline"?: (boolean | "false" | "true") | undefined;
83
+ "aria-multiselectable"?: (boolean | "false" | "true") | undefined;
84
84
  "aria-orientation"?: "horizontal" | "vertical" | undefined;
85
85
  "aria-owns"?: string | undefined;
86
86
  "aria-placeholder"?: string | undefined;
87
87
  "aria-posinset"?: number | undefined;
88
- "aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
89
- "aria-readonly"?: (boolean | "true" | "false") | undefined;
90
- "aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
91
- "aria-required"?: (boolean | "true" | "false") | undefined;
88
+ "aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
89
+ "aria-readonly"?: (boolean | "false" | "true") | undefined;
90
+ "aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
91
+ "aria-required"?: (boolean | "false" | "true") | undefined;
92
92
  "aria-roledescription"?: string | undefined;
93
93
  "aria-rowcount"?: number | undefined;
94
94
  "aria-rowindex"?: number | undefined;
95
95
  "aria-rowspan"?: number | undefined;
96
- "aria-selected"?: (boolean | "true" | "false") | undefined;
96
+ "aria-selected"?: (boolean | "false" | "true") | undefined;
97
97
  "aria-setsize"?: number | undefined;
98
98
  "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
99
99
  "aria-valuemax"?: number | undefined;
@@ -268,3 +268,15 @@ export declare const ChatContainer: import("styled-components").IStyledComponent
268
268
  onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
269
269
  }> & ((props: import("../../cards/_types").CardProps) => import("react/jsx-runtime").JSX.Element);
270
270
  export declare const MessagesContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ChatArgs>>;
271
+ export declare const EditorContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("@zendeskgarden/react-forms").IFauxInputProps & import("react").RefAttributes<HTMLDivElement>, {
272
+ editable: boolean;
273
+ }>> & import("react").ForwardRefExoticComponent<import("@zendeskgarden/react-forms").IFauxInputProps & import("react").RefAttributes<HTMLDivElement>> & {
274
+ EndIcon: {
275
+ (props: import("@zendeskgarden/react-forms").IFauxInputStartIconProps): JSX.Element;
276
+ displayName: string;
277
+ };
278
+ StartIcon: {
279
+ (props: import("@zendeskgarden/react-forms").IFauxInputStartIconProps): JSX.Element;
280
+ displayName: string;
281
+ };
282
+ };
@@ -0,0 +1,5 @@
1
+ import { Editor } from "@tiptap/react";
2
+ export declare const EditorButton: ({ editor, type, }: {
3
+ editor: Editor;
4
+ type: "bold" | "italic" | "mention";
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { PlaceholderOptions } from "@tiptap/extension-placeholder";
2
+ import { SuggestedUser } from "../_types";
3
+ export declare const editorExtensions: ({ placeholderOptions, mentionableUsers, }: {
4
+ mentionableUsers: (props: {
5
+ query: string;
6
+ }) => Promise<SuggestedUser[]>;
7
+ placeholderOptions?: Partial<PlaceholderOptions> | undefined;
8
+ }) => (import("@tiptap/react").Extension<import("@tiptap/extension-typography").TypographyOptions, any> | import("@tiptap/react").Mark<import("@tiptap/extension-link").LinkOptions, any> | import("@tiptap/react").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/react").Extension<PlaceholderOptions, any> | import("@tiptap/react").Extension<import("@tiptap/extension-character-count").CharacterCountOptions, import("@tiptap/extension-character-count").CharacterCountStorage> | import("@tiptap/react").Node<import("@tiptap/extension-mention").MentionOptions, any>)[];
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from "react";
2
- export declare const ChatFooter: ({ saveText, children, }: PropsWithChildren<{
2
+ export declare const ChatFooter: ({ saveText, children, showShortcut, }: PropsWithChildren<{
3
3
  saveText?: string | undefined;
4
+ showShortcut?: boolean | undefined;
4
5
  }>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const CustomMention: import("@tiptap/core").Node<import("@tiptap/extension-mention").MentionOptions, any>;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { SuggestionOptions, SuggestionProps } from "@tiptap/suggestion";
3
+ import { SuggestedUser } from "../_types";
4
+ export type MentionListRef = {
5
+ onKeyDown: NonNullable<ReturnType<NonNullable<SuggestionOptions<SuggestedUser>["render"]>>["onKeyDown"]>;
6
+ };
7
+ type MentionListProps = SuggestionProps<SuggestedUser>;
8
+ export declare const MentionList: import("react").ForwardRefExoticComponent<MentionListProps & import("react").RefAttributes<MentionListRef>>;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare const SendShortcut: ({ saveText }: {
2
+ saveText?: string | undefined;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,2 @@
1
1
  export declare const editorStyle: import("styled-components").RuleSet<object>;
2
+ export declare const readOnlyStyle: import("styled-components").RuleSet<object>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.64",
3
+ "version": "3.1.65",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -35,14 +35,16 @@
35
35
  "@nivo/sunburst": "^0.80.0",
36
36
  "@nivo/tooltip": "^0.80.0",
37
37
  "@nivo/waffle": "^0.80.0",
38
- "@tiptap/extension-bubble-menu": "^2.0.0-beta.61",
39
- "@tiptap/extension-character-count": "^2.0.0-beta.31",
40
- "@tiptap/extension-link": "^2.0.4",
41
- "@tiptap/extension-placeholder": "^2.0.0-beta.53",
42
- "@tiptap/extension-typography": "^2.0.0-beta.22",
43
- "@tiptap/pm": "^2.0.3",
44
- "@tiptap/react": "^2.0.0-beta.114",
45
- "@tiptap/starter-kit": "^2.0.0-beta.191",
38
+ "@tiptap/extension-bubble-menu": "2.1.16",
39
+ "@tiptap/extension-character-count": "2.1.16",
40
+ "@tiptap/extension-link": "2.1.16",
41
+ "@tiptap/extension-mention": "2.1.16",
42
+ "@tiptap/extension-placeholder": "2.1.16",
43
+ "@tiptap/extension-typography": "2.1.16",
44
+ "@tiptap/pm": "2.1.16",
45
+ "@tiptap/react": "2.1.16",
46
+ "@tiptap/starter-kit": "2.1.16",
47
+ "@tiptap/suggestion": "2.1.16",
46
48
  "@types/react-slick": "^0.23.10",
47
49
  "@zendeskgarden/css-bedrock": "^9.0.0",
48
50
  "@zendeskgarden/react-accordions": "^8.49.0",
@@ -63,6 +65,7 @@
63
65
  "@zendeskgarden/react-typography": "^8.49.0",
64
66
  "react-slick": "^0.29.0",
65
67
  "react-window": "^1.8.6",
68
+ "tippy.js": "^6.3.7",
66
69
  "ua-parser-js": "^1.0.2"
67
70
  },
68
71
  "devDependencies": {