@soul-refiner/design-system 2.14.13 → 2.14.14

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 (41) hide show
  1. package/dist/components/custom/help_center/help_center-auth.js +1 -0
  2. package/dist/components/custom/help_center/help_center-customModal.js +7 -0
  3. package/dist/components/custom/help_center/help_center-defaultArticle.js +60 -0
  4. package/dist/components/custom/help_center/help_center-editable-content.js +31 -0
  5. package/dist/components/custom/help_center/help_center-mainPage.js +32 -0
  6. package/dist/components/custom/help_center/help_center-sidebar.js +1 -0
  7. package/dist/components/custom/help_center/help_center.js +1 -0
  8. package/dist/components/custom/help_center/help_center_articlle-list.js +30 -0
  9. package/dist/components/custom/help_center/help_center_categoryList.js +55 -0
  10. package/dist/components/custom/help_center/help_center_dataStore.js +1 -0
  11. package/dist/components/custom/help_center/help_center_layout.js +64 -0
  12. package/dist/components/custom/help_center/help_center_sub-category.js +27 -0
  13. package/dist/components/custom/help_center/types.js +1 -0
  14. package/dist/components/media/audio-player/progress-bar.js +4 -0
  15. package/dist/components/surfaces/post/post.js +1 -1
  16. package/dist/emojis/64-2Q7F4PKG.png +0 -0
  17. package/dist/src/components/custom/help_center/help_center-auth.d.ts +7 -0
  18. package/dist/src/components/custom/help_center/help_center-customModal.d.ts +4 -0
  19. package/dist/src/components/custom/help_center/help_center-defaultArticle.d.ts +15 -0
  20. package/dist/src/components/custom/help_center/help_center-editable-content.d.ts +7 -0
  21. package/dist/src/components/custom/help_center/help_center-mainPage.d.ts +3 -0
  22. package/dist/src/components/custom/help_center/help_center-sidebar.d.ts +3 -0
  23. package/dist/src/components/custom/help_center/help_center.d.ts +13 -0
  24. package/dist/src/components/custom/help_center/help_center_articlle-list.d.ts +7 -0
  25. package/dist/src/components/custom/help_center/help_center_categoryList.d.ts +6 -0
  26. package/dist/src/components/custom/help_center/help_center_dataStore.d.ts +4 -0
  27. package/dist/src/components/custom/help_center/help_center_layout.d.ts +3 -0
  28. package/dist/src/components/custom/help_center/help_center_seedData.d.ts +2 -0
  29. package/dist/src/components/custom/help_center/help_center_sub-category.d.ts +7 -0
  30. package/dist/src/components/custom/help_center/index.d.ts +1 -0
  31. package/dist/src/components/custom/help_center/types.d.ts +124 -0
  32. package/dist/src/components/iconography/EmojiPicker/Reaction.d.ts +9 -0
  33. package/dist/src/components/iconography/EmojiPicker/emoji-picker.d.ts +18 -0
  34. package/dist/src/components/iconography/EmojiPicker/grid-mapper.d.ts +2 -0
  35. package/dist/src/components/media/audio-player/progress-bar.d.ts +14 -0
  36. package/dist/src/emoji/sparkle-emoji.d.ts +15 -0
  37. package/dist/src/emoji/sprite-emoji.d.ts +9 -0
  38. package/dist/src/hooks/useSparkle.d.ts +12 -0
  39. package/dist/src/utils/debounce.d.ts +1 -0
  40. package/dist/styles/output.css +2006 -0
  41. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface SubCategoryListProps {
3
+ categoryId: string;
4
+ children: (subcategoryId: string) => React.ReactNode;
5
+ }
6
+ declare const SubCategoryList: React.FC<SubCategoryListProps>;
7
+ export default SubCategoryList;
@@ -0,0 +1 @@
1
+ export { HelpCenter } from './help_center';
@@ -0,0 +1,124 @@
1
+ /// <reference types="react" />
2
+ import { TElement } from '@udecode/plate';
3
+ import { IStyledComponent } from 'styled-components';
4
+ import { FastOmit } from 'styled-components/dist/types';
5
+ export interface Category {
6
+ id: string;
7
+ name: string;
8
+ subcategories: Subcategory[];
9
+ }
10
+ export interface Subcategory {
11
+ id: string;
12
+ name: string;
13
+ categoryId: string;
14
+ articles: Article[];
15
+ }
16
+ export interface WithPermissionProps {
17
+ role: (typeof USER_ROLES)[keyof typeof USER_ROLES];
18
+ permission: string;
19
+ }
20
+ export declare const USER_ROLES: {
21
+ readonly ADMIN: "admin";
22
+ readonly EDITOR: "editor";
23
+ readonly VIEWER: "viewer";
24
+ };
25
+ export interface User {
26
+ id: string;
27
+ email: string;
28
+ role: (typeof USER_ROLES)[keyof typeof USER_ROLES];
29
+ }
30
+ export interface Category {
31
+ id: string;
32
+ name: string;
33
+ subcategories: Subcategory[];
34
+ }
35
+ export declare enum DropdownOptions {
36
+ RENAME = "Rename",
37
+ CREATE_SUBCATEGORY = "Create Sub-Category",
38
+ DELETE_CATEGORY = "Remove the Category",
39
+ CREATE_ARTICLES = "Create Articles",
40
+ DELETE_SUBCATEGORY = "Remove"
41
+ }
42
+ export interface CustomModalProps {
43
+ title: string;
44
+ isOpen: boolean;
45
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
46
+ initialValue?: string;
47
+ modalType: modalType;
48
+ submitButtonText?: string;
49
+ cancelButtonText?: string;
50
+ mainContent?: React.ReactNode;
51
+ headerContent?: React.ReactNode;
52
+ footerContent?: React.ReactNode;
53
+ onSubmit: (value: string) => void;
54
+ trigger: React.ReactNode;
55
+ }
56
+ export type modalType = 'create' | 'edit' | 'delete' | 'create-article-category' | 'edit-article' | 'edit-article-category' | 'delete-article-category' | 'edit-article-QA' | 'delete-article-QA' | 'articleQuestion';
57
+ export interface Subcategory {
58
+ id: string;
59
+ name: string;
60
+ categoryId: string;
61
+ articles: Article[];
62
+ }
63
+ export interface ArticleCategory {
64
+ id: string;
65
+ title?: string;
66
+ articleId: string;
67
+ description?: string;
68
+ questions?: ArticleQuestion[];
69
+ }
70
+ export interface ArticleQuestion {
71
+ id: string;
72
+ articleCategoryId: string;
73
+ question?: string;
74
+ answer?: TElement[];
75
+ }
76
+ export interface Article {
77
+ id: string;
78
+ title: string;
79
+ content: ArticleCategory[];
80
+ categoryId: string;
81
+ subcategoryId: string;
82
+ }
83
+ export interface HelpCenterContextValue {
84
+ categories: Category[];
85
+ isLoading: boolean;
86
+ selectedArticle: Article | null;
87
+ isNewArticle: boolean;
88
+ selectedSubcategory: Subcategory | null;
89
+ error: string | null;
90
+ userRole: (typeof USER_ROLES)[keyof typeof USER_ROLES];
91
+ breadcrumbTrail: string[];
92
+ setSelectedSubcategory: React.Dispatch<React.SetStateAction<Subcategory | null>>;
93
+ setSelectedArticle: React.Dispatch<React.SetStateAction<Article | null>>;
94
+ setIsNewArticle: React.Dispatch<React.SetStateAction<boolean>>;
95
+ setBreadcrumbTrail: React.Dispatch<React.SetStateAction<string[]>>;
96
+ addCategory: (name: string) => void;
97
+ updateCategory: (id: string, name: string) => void;
98
+ deleteCategory: (id: string) => void;
99
+ addSubcategory: (categoryId: string, name: string) => void;
100
+ addArticleCategory: (categoryId: string, subcategoryId: string, articleId: string, newCategory: Omit<ArticleCategory, 'id'>) => void;
101
+ deleteArticleQuestion: (categoryId: string, subcategoryId: string, articleId: string, articleCategoryId: string, questionId: string) => void;
102
+ deleteArticleCategory: (categoryId: string, subcategoryId: string, articleId: string, articleCategoryId: string) => void;
103
+ updateArticleCategory: (categoryId: string, subcategoryId: string, articleId: string, articleCategoryId: string, updatedCategoryName: string) => void;
104
+ addArticleQuestion: (categoryId: string, subcategoryId: string, articleId: string, articleCategoryId: string, newQuestion: Omit<ArticleQuestion, 'id'>) => void;
105
+ updateArticleQuestion: (categoryId: string, subcategoryId: string, articleId: string, articleCategoryId: string, articleQuestionId: string, updatedQuestion: Omit<ArticleQuestion, 'id'>) => void;
106
+ updateSubcategory: (categoryId: string, subcategoryId: string, name: string) => void;
107
+ deleteSubcategory: (categoryId: string, subcategoryId: string) => void;
108
+ addArticle: (categoryId: string, subcategoryId: string, title: string, content: ArticleCategory[]) => string;
109
+ updateArticle: (categoryId: string, subcategoryId: string, articleId: string, title: string, content: ArticleCategory[]) => void;
110
+ deleteArticle: (categoryId: string, subcategoryId: string, articleId: string) => void;
111
+ }
112
+ export interface HelpCenterProviderProps extends HelpCenterProps {
113
+ children: React.ReactNode;
114
+ }
115
+ export interface HelpCenterProps {
116
+ initialData: {
117
+ categories: Category[];
118
+ userRole: (typeof USER_ROLES)[keyof typeof USER_ROLES];
119
+ };
120
+ onDataChange?: (data: {
121
+ categories: Category[];
122
+ }) => void;
123
+ }
124
+ export type StyledType = IStyledComponent<'web', FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import './reaction-sparkle.css';
3
+ interface RainbowReactionEmojiProps {
4
+ emojiId: string;
5
+ size?: number;
6
+ sparkleOnMount?: boolean;
7
+ }
8
+ export declare const RainbowReactionEmoji: React.FC<RainbowReactionEmojiProps>;
9
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ type NormalizedEmoji = {
3
+ id: string;
4
+ name: string;
5
+ keywords?: string[];
6
+ skins: {
7
+ unified: string;
8
+ native: string;
9
+ }[];
10
+ coordinates?: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ };
15
+ export declare const CustomEmojiPicker: React.FC<{
16
+ onSelect: (emoji: NormalizedEmoji) => void;
17
+ }>;
18
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EmojiGridMapper: React.FC;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface AudioProgressBarProps {
3
+ /**
4
+ * @param duration the total duration of the audio media in seconds
5
+ * */
6
+ duration: number;
7
+ /**
8
+ * @param progress the amount of the audio media listened to
9
+ * */
10
+ progress: number;
11
+ onSeek: (percent: number) => void;
12
+ }
13
+ export declare const AudioProgressBar: ({ duration, progress, onSeek, }: AudioProgressBarProps) => React.JSX.Element;
14
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface ClickUpStyleEmojiButtonProps {
3
+ emojiId: string;
4
+ count?: number;
5
+ size?: number;
6
+ onClick?: () => void;
7
+ }
8
+ interface ClickUpStyleEmojiButtonProps {
9
+ emojiId: string;
10
+ count?: number;
11
+ size?: number;
12
+ onClick?: () => void;
13
+ }
14
+ export declare const ClickUpStyleEmojiButton: React.FC<ClickUpStyleEmojiButtonProps>;
15
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface SpriteEmojiProps {
3
+ emoji: {
4
+ id: string;
5
+ };
6
+ size?: number;
7
+ }
8
+ export declare const SpriteEmoji: React.FC<SpriteEmojiProps>;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ interface SparkleOptions {
3
+ containerRef: React.RefObject<HTMLDivElement>;
4
+ size: number;
5
+ shape?: 'star' | 'dot';
6
+ theme?: 'rainbow' | 'gold';
7
+ ringCount?: number;
8
+ sparkleCount?: number;
9
+ delay?: number;
10
+ }
11
+ export declare const useSparkle: ({ containerRef, size, shape, theme, ringCount, sparkleCount, delay, }: SparkleOptions) => void;
12
+ export {};
@@ -0,0 +1 @@
1
+ export declare const useDebounce: <T extends (...args: any[]) => void>(callback: T, delay: number) => T;