@appquality/unguess-design-system 3.1.78 → 3.1.80-beta-attachments

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.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ButtonArgs } from "./_types";
3
2
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
4
3
  export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
@@ -8,18 +8,18 @@ export declare const variants: readonly [{}, {
8
8
  readonly disabled: true;
9
9
  }];
10
10
  export declare const Row: import("styled-components").IStyledComponent<"web", {
11
- alignItems?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
12
- alignItemsXs?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
13
- alignItemsSm?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
14
- alignItemsMd?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
15
- alignItemsLg?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
16
- alignItemsXl?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
17
- justifyContent?: "center" | "start" | "end" | "between" | "around" | undefined;
18
- justifyContentXs?: "center" | "start" | "end" | "between" | "around" | undefined;
19
- justifyContentSm?: "center" | "start" | "end" | "between" | "around" | undefined;
20
- justifyContentMd?: "center" | "start" | "end" | "between" | "around" | undefined;
21
- justifyContentLg?: "center" | "start" | "end" | "between" | "around" | undefined;
22
- justifyContentXl?: "center" | "start" | "end" | "between" | "around" | undefined;
11
+ alignItems?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
12
+ alignItemsXs?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
13
+ alignItemsSm?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
14
+ alignItemsMd?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
15
+ alignItemsLg?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
16
+ alignItemsXl?: "start" | "center" | "end" | "baseline" | "stretch" | undefined;
17
+ justifyContent?: "start" | "center" | "end" | "between" | "around" | undefined;
18
+ justifyContentXs?: "start" | "center" | "end" | "between" | "around" | undefined;
19
+ justifyContentSm?: "start" | "center" | "end" | "between" | "around" | undefined;
20
+ justifyContentMd?: "start" | "center" | "end" | "between" | "around" | undefined;
21
+ justifyContentLg?: "start" | "center" | "end" | "between" | "around" | undefined;
22
+ justifyContentXl?: "start" | "center" | "end" | "between" | "around" | undefined;
23
23
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
24
24
  wrapXs?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
25
25
  wrapSm?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
@@ -73,7 +73,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
73
73
  results?: number | undefined;
74
74
  security?: string | undefined;
75
75
  unselectable?: "on" | "off" | undefined;
76
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
76
+ inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
77
77
  is?: string | undefined;
78
78
  "aria-activedescendant"?: string | undefined;
79
79
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -299,18 +299,18 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
299
299
  md?: string | number | boolean | undefined;
300
300
  lg?: string | number | boolean | undefined;
301
301
  xl?: string | number | boolean | undefined;
302
- alignSelf?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
303
- alignSelfXs?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
304
- alignSelfSm?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
305
- alignSelfMd?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
306
- alignSelfLg?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
307
- alignSelfXl?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
308
- textAlign?: "center" | "start" | "end" | "justify" | undefined;
309
- textAlignXs?: "center" | "start" | "end" | "justify" | undefined;
310
- textAlignSm?: "center" | "start" | "end" | "justify" | undefined;
311
- textAlignMd?: "center" | "start" | "end" | "justify" | undefined;
312
- textAlignLg?: "center" | "start" | "end" | "justify" | undefined;
313
- textAlignXl?: "center" | "start" | "end" | "justify" | undefined;
302
+ alignSelf?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
303
+ alignSelfXs?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
304
+ alignSelfSm?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
305
+ alignSelfMd?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
306
+ alignSelfLg?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
307
+ alignSelfXl?: "start" | "center" | "end" | "baseline" | "stretch" | "auto" | undefined;
308
+ textAlign?: "start" | "center" | "end" | "justify" | undefined;
309
+ textAlignXs?: "start" | "center" | "end" | "justify" | undefined;
310
+ textAlignSm?: "start" | "center" | "end" | "justify" | undefined;
311
+ textAlignMd?: "start" | "center" | "end" | "justify" | undefined;
312
+ textAlignLg?: "start" | "center" | "end" | "justify" | undefined;
313
+ textAlignXl?: "start" | "center" | "end" | "justify" | undefined;
314
314
  offset?: string | number | undefined;
315
315
  offsetXs?: string | number | undefined;
316
316
  offsetSm?: string | number | undefined;
@@ -370,7 +370,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
370
370
  results?: number | undefined;
371
371
  security?: string | undefined;
372
372
  unselectable?: "on" | "off" | undefined;
373
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
373
+ inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
374
374
  is?: string | undefined;
375
375
  "aria-activedescendant"?: string | undefined;
376
376
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -640,7 +640,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
640
640
  results?: number | undefined;
641
641
  security?: string | undefined;
642
642
  unselectable?: "on" | "off" | undefined;
643
- inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
643
+ inputMode?: "decimal" | "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | undefined;
644
644
  is?: string | undefined;
645
645
  "aria-activedescendant"?: string | undefined;
646
646
  "aria-atomic"?: (boolean | "true" | "false") | undefined;
@@ -17,6 +17,7 @@ export interface ChatEditorArgs extends Partial<EditorOptions> {
17
17
  bold?: string;
18
18
  italic?: string;
19
19
  mention?: string;
20
+ attachment?: string;
20
21
  };
21
22
  mention?: {
22
23
  noResults?: string;
@@ -5,13 +5,19 @@ export type ChatContextType = {
5
5
  triggerSave: () => void;
6
6
  editor?: Editor;
7
7
  setEditor: React.Dispatch<React.SetStateAction<Editor | undefined>>;
8
+ addThumbnails: (props: {
9
+ files: File[];
10
+ }) => void;
11
+ removeThumbnail: (index: number) => void;
12
+ thumbnails: File[];
8
13
  mentionableUsers: (props: {
9
14
  query: string;
10
15
  }) => SuggestedUser[];
11
16
  };
12
17
  export declare const ChatContext: React.Context<ChatContextType | null>;
13
- export declare const ChatContextProvider: ({ onSave, setMentionableUsers, children, }: {
18
+ export declare const ChatContextProvider: ({ onSave, onFileUpload, setMentionableUsers, children, }: {
14
19
  onSave?: ((editor: Editor, mentions: SuggestedUser[]) => void) | undefined;
20
+ onFileUpload?: ((files: File[]) => Promise<void>) | undefined;
15
21
  children: React.ReactNode;
16
22
  setMentionableUsers: (props: {
17
23
  query: string;
@@ -1,7 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { PlaceholderOptions } from "@tiptap/extension-placeholder";
3
2
  import { Editor as TipTapEditor } from "@tiptap/react";
4
3
  import { ChatEditorArgs, SuggestedUser } from "./_types";
4
+ import { MediaType } from "./parts/comment";
5
5
  interface EditorStoryArgs extends ChatEditorArgs {
6
6
  children?: any;
7
7
  comments?: {
@@ -12,10 +12,12 @@ interface EditorStoryArgs extends ChatEditorArgs {
12
12
  };
13
13
  message: string;
14
14
  date: string;
15
+ media?: MediaType[];
15
16
  }[];
16
17
  editorText?: string;
17
18
  background?: string;
18
19
  onSave: (editor: TipTapEditor, mentions: SuggestedUser[]) => void;
20
+ onFileUpload?: (files: File[]) => Promise<void>;
19
21
  placeholderOptions?: Partial<PlaceholderOptions>;
20
22
  }
21
23
  export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, EditorStoryArgs>;
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ content: string;
3
+ deleteThumbnail: (e: any) => void;
4
+ }
5
+ declare const DeleteThumbnailX: ({ content, deleteThumbnail }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export default DeleteThumbnailX;
@@ -0,0 +1,12 @@
1
+ interface Props {
2
+ src: string;
3
+ label: string;
4
+ index?: number;
5
+ removeThumbnail?: (index: number) => void;
6
+ clickThumbnail: () => void;
7
+ showX?: boolean;
8
+ showLabel?: boolean;
9
+ mediaType: string;
10
+ }
11
+ declare const Thumbnail: ({ clickThumbnail, src, label, index, removeThumbnail, showX, showLabel, mediaType, }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ export default Thumbnail;
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ src: string;
3
+ label: string;
4
+ }
5
+ declare const ThumbnailPost: ({ src, label }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export default ThumbnailPost;
@@ -0,0 +1,5 @@
1
+ interface Props {
2
+ openLightbox: (file: File, index: number) => void;
3
+ }
4
+ declare const ThumbnailContainer: ({ openLightbox, }: Props) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default ThumbnailContainer;
@@ -1,7 +1,13 @@
1
1
  import { PropsWithChildren } from "react";
2
2
  import { Author } from "../_types";
3
- export declare const Comment: ({ author, message, children, date, }: PropsWithChildren<{
3
+ export type MediaType = {
4
+ url: string;
5
+ id: number;
6
+ type: "image" | "video";
7
+ };
8
+ export declare const Comment: ({ author, message, children, date, media, }: PropsWithChildren<{
4
9
  author: Author;
5
10
  message: string;
6
11
  date: string;
12
+ media?: MediaType[] | undefined;
7
13
  }>) => import("react/jsx-runtime").JSX.Element | null;
@@ -5,4 +5,4 @@ export declare const editorExtensions: ({ placeholderOptions, mentionableUsers,
5
5
  query: string;
6
6
  }) => SuggestedUser[];
7
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>)[];
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").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/react").Extension<import("@tiptap/extension-dropcursor").DropcursorOptions, 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,3 @@
1
- /// <reference types="react" />
2
1
  import { DropdownArgs, SelectArgs } from "./_types";
3
2
  import { MenuArgs } from "../menu/_types";
4
3
  interface IItem {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { EditorArgs } from "./_types";
3
2
  interface EditorStoryArgs extends EditorArgs {
4
3
  children?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appquality/unguess-design-system",
3
- "version": "3.1.78",
3
+ "version": "3.1.80-beta-attachments",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -37,6 +37,8 @@
37
37
  "@nivo/waffle": "^0.80.0",
38
38
  "@tiptap/extension-bubble-menu": "2.1.16",
39
39
  "@tiptap/extension-character-count": "2.1.16",
40
+ "@tiptap/extension-dropcursor": "^2.2.4",
41
+ "@tiptap/extension-image": "^2.2.4",
40
42
  "@tiptap/extension-link": "2.1.16",
41
43
  "@tiptap/extension-mention": "2.1.16",
42
44
  "@tiptap/extension-placeholder": "2.1.16",