@soul-refiner/design-system 1.4.2 → 1.6.1-alpha.0
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/components/actions/button/button.d.ts +1 -1
- package/dist/components/actions/dropdown/dropdown.stories.d.ts +5 -0
- package/dist/components/actions/rate/rate.js +4 -3
- package/dist/components/atoms/hide/hide.js +1 -1
- package/dist/components/card/feature/feature.js +1 -1
- package/dist/components/custom/courses_selection/courses_selection.js +5 -7
- package/dist/components/custom/courses_selection/courses_selection.stories.d.ts +5 -0
- package/dist/components/custom/users_selection/users_selection.stories.d.ts +5 -0
- package/dist/components/editor/constants.d.ts +9 -11
- package/dist/components/editor/constants.js +11 -7
- package/dist/components/editor/context.d.ts +1 -0
- package/dist/components/editor/context.js +1 -0
- package/dist/components/editor/editor.d.ts +3 -4
- package/dist/components/editor/editor.js +27 -5
- package/dist/components/editor/editor.stories.d.ts +6 -0
- package/dist/components/editor/icons/border-all.d.ts +3 -0
- package/dist/components/editor/icons/border-all.js +3 -0
- package/dist/components/editor/icons/border-bottom.d.ts +3 -0
- package/dist/components/editor/icons/border-bottom.js +3 -0
- package/dist/components/editor/icons/border-left.d.ts +3 -0
- package/dist/components/editor/icons/border-left.js +3 -0
- package/dist/components/editor/icons/border-none.d.ts +3 -0
- package/dist/components/editor/icons/border-none.js +3 -0
- package/dist/components/editor/icons/border-right.d.ts +3 -0
- package/dist/components/editor/icons/border-right.js +3 -0
- package/dist/components/editor/icons/border-top.d.ts +3 -0
- package/dist/components/editor/icons/border-top.js +3 -0
- package/dist/components/editor/icons/index.d.ts +6 -0
- package/dist/components/editor/icons/index.js +6 -0
- package/dist/components/editor/navbar/index.d.ts +0 -1
- package/dist/components/editor/navbar/navbar.d.ts +1 -4
- package/dist/components/editor/navbar/navbar.js +10 -14
- package/dist/components/editor/plugins/{blockquote.js → blocks/blockquote.js} +1 -1
- package/dist/components/editor/plugins/blocks/blocks.d.ts +1 -0
- package/dist/components/editor/plugins/blocks/blocks.js +50 -0
- package/dist/components/editor/plugins/{buttons.js → blocks/buttons.js} +2 -2
- package/dist/components/editor/plugins/blocks/dropdown-menu.d.ts +29 -0
- package/dist/components/editor/plugins/blocks/dropdown-menu.js +62 -0
- package/dist/components/editor/plugins/blocks/image.d.ts +9 -0
- package/dist/components/editor/plugins/blocks/image.js +36 -0
- package/dist/components/editor/plugins/blocks/index.d.ts +1 -0
- package/dist/components/editor/plugins/blocks/index.js +1 -0
- package/dist/components/editor/plugins/blocks/media-popover.d.ts +6 -0
- package/dist/components/editor/plugins/blocks/media-popover.js +32 -0
- package/dist/components/editor/plugins/blocks/plate-button.d.ts +14 -0
- package/dist/components/editor/plugins/blocks/plate-button.js +37 -0
- package/dist/components/editor/plugins/blocks/popover.d.ts +7 -0
- package/dist/components/editor/plugins/blocks/popover.js +11 -0
- package/dist/components/editor/plugins/{qa.js → blocks/qa.js} +8 -8
- package/dist/components/editor/plugins/blocks/resizable.d.ts +39 -0
- package/dist/components/editor/plugins/blocks/resizable.js +37 -0
- package/dist/components/editor/plugins/blocks/separator.d.ts +5 -0
- package/dist/components/editor/plugins/blocks/separator.js +19 -0
- package/dist/components/editor/plugins/blocks/table-cell.d.ts +23 -0
- package/dist/components/editor/plugins/blocks/table-cell.js +38 -0
- package/dist/components/editor/plugins/blocks/table-row.d.ts +11 -0
- package/dist/components/editor/plugins/blocks/table-row.js +7 -0
- package/dist/components/editor/plugins/blocks/table.d.ts +12 -0
- package/dist/components/editor/plugins/blocks/table.js +82 -0
- package/dist/components/editor/plugins/{text.js → blocks/text.js} +3 -3
- package/dist/components/editor/plugins/{video.js → blocks/video.js} +2 -2
- package/dist/components/editor/plugins/index.d.ts +4 -7
- package/dist/components/editor/plugins/index.js +4 -112
- package/dist/components/editor/plugins/leafs/index.d.ts +1 -0
- package/dist/components/editor/plugins/leafs/index.js +1 -0
- package/dist/components/editor/plugins/leafs/leafs.d.ts +1 -0
- package/dist/components/editor/plugins/leafs/leafs.js +33 -0
- package/dist/components/editor/plugins/{link.js → leafs/link.js} +2 -2
- package/dist/components/editor/plugins/marks/index.d.ts +1 -0
- package/dist/components/editor/plugins/marks/index.js +1 -0
- package/dist/components/editor/plugins/marks/marks.d.ts +1 -0
- package/dist/components/editor/plugins/marks/marks.js +12 -0
- package/dist/components/editor/plugins/plate.d.ts +99 -0
- package/dist/components/editor/plugins/plate.js +37 -0
- package/dist/components/editor/plugins/{exitBreak.js → utils/exitBreak.js} +1 -1
- package/dist/components/editor/plugins/utils/index.d.ts +1 -0
- package/dist/components/editor/plugins/utils/index.js +1 -0
- package/dist/components/editor/plugins/{resetBlockType.js → utils/resetBlockType.js} +1 -1
- package/dist/components/editor/plugins/{selectOnBackspace.js → utils/selectOnBackspace.js} +1 -1
- package/dist/components/editor/plugins/utils/utils.d.ts +1 -0
- package/dist/components/editor/plugins/utils/utils.js +12 -0
- package/dist/components/editor/simple_editor/plugins.js +7 -7
- package/dist/components/iconography/avatar/avatar.d.ts +2 -1
- package/dist/components/iconography/avatar/avatar.js +3 -2
- package/dist/components/iconography/avatar/avatar.stories.d.ts +7 -0
- package/dist/components/iconography/avatar/icons/default.js +2 -3
- package/dist/components/input/text_input/text_input.d.ts +1 -0
- package/dist/components/media/video-player/playlist-item.d.ts +2 -2
- package/dist/components/media/video-player/playlist-item.js +6 -6
- package/dist/components/media/video-player/video.d.ts +13 -3
- package/dist/components/media/video-player/video.js +28 -9
- package/dist/components/media/video-player/video.stories.d.ts +6 -0
- package/dist/components/surfaces/carousel/card/card.js +1 -1
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +129 -0
- package/dist/styles/output.css +1771 -0
- package/package.json +20 -5
- package/dist/components/editor/plate.d.ts +0 -34
- package/dist/components/editor/plate.js +0 -27
- package/dist/components/editor/plugins/image.d.ts +0 -3
- package/dist/components/editor/plugins/image.js +0 -33
- /package/dist/components/editor/plugins/{blockquote.d.ts → blocks/blockquote.d.ts} +0 -0
- /package/dist/components/editor/plugins/{buttons.d.ts → blocks/buttons.d.ts} +0 -0
- /package/dist/components/editor/plugins/{list.d.ts → blocks/list.d.ts} +0 -0
- /package/dist/components/editor/plugins/{list.js → blocks/list.js} +0 -0
- /package/dist/components/editor/plugins/{qa.d.ts → blocks/qa.d.ts} +0 -0
- /package/dist/components/editor/plugins/{text.d.ts → blocks/text.d.ts} +0 -0
- /package/dist/components/editor/plugins/{video.d.ts → blocks/video.d.ts} +0 -0
- /package/dist/components/editor/plugins/{link.d.ts → leafs/link.d.ts} +0 -0
- /package/dist/components/editor/plugins/{exitBreak.d.ts → utils/exitBreak.d.ts} +0 -0
- /package/dist/components/editor/plugins/{resetBlockType.d.ts → utils/resetBlockType.d.ts} +0 -0
- /package/dist/components/editor/plugins/{selectOnBackspace.d.ts → utils/selectOnBackspace.d.ts} +0 -0
- /package/dist/components/editor/plugins/{softBreak.d.ts → utils/softBreak.d.ts} +0 -0
- /package/dist/components/editor/plugins/{softBreak.js → utils/softBreak.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soul-refiner/design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1-alpha.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -21,17 +21,23 @@
|
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"default": "./dist/index.js"
|
|
23
23
|
}
|
|
24
|
+
},
|
|
25
|
+
"./dist/*.css": {
|
|
26
|
+
"import": "./dist/*.css",
|
|
27
|
+
"require": "./dist/*.css"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"devDependencies": {
|
|
27
31
|
"@storybook/addon-essentials": "^7.6.7",
|
|
28
32
|
"@storybook/addon-interactions": "^7.6.7",
|
|
29
33
|
"@storybook/addon-links": "^7.6.7",
|
|
34
|
+
"@storybook/addon-themes": "^7.2.3",
|
|
30
35
|
"@storybook/addons": "^7.6.7",
|
|
31
36
|
"@storybook/blocks": "^7.6.7",
|
|
32
37
|
"@storybook/nextjs": "~7.5.3",
|
|
33
38
|
"@storybook/react": "~7.2.1",
|
|
34
39
|
"@storybook/testing-library": "~0.2.0",
|
|
40
|
+
"@types/react": "^18.2.48",
|
|
35
41
|
"@types/react-dom": "18.2.0",
|
|
36
42
|
"@types/styled-components": "~5.1.26",
|
|
37
43
|
"chromatic": "~6.17.4",
|
|
@@ -40,20 +46,30 @@
|
|
|
40
46
|
"pretty-quick": "~3.1.3",
|
|
41
47
|
"prop-types": "~15.8.1",
|
|
42
48
|
"storybook": "~7.5.3",
|
|
49
|
+
"tailwindcss": "^3.4.1",
|
|
50
|
+
"ts-loader": "^9.5.1",
|
|
43
51
|
"tsconfig-paths-webpack-plugin": "~4.0.1",
|
|
44
52
|
"typescript": "~5.0.4",
|
|
45
|
-
"
|
|
53
|
+
"url-loader": "^4.1.1",
|
|
54
|
+
"webpack": "~5.89.0",
|
|
55
|
+
"webpack-cli": "^5.1.4"
|
|
46
56
|
},
|
|
47
57
|
"scripts": {
|
|
48
|
-
"build": "tsc -p tsconfig.build.json",
|
|
58
|
+
"build": "yarn build:tailwind && tsc -p tsconfig.build.json",
|
|
59
|
+
"build:tailwind": "npx tailwindcss -i ./src/styles/globals.css -o ./dist/styles/output.css",
|
|
49
60
|
"format": "prettier --write .",
|
|
50
61
|
"lint": "yarn eslint ./**/*.{ts,tsx}",
|
|
51
|
-
"storybook": "storybook dev -p 6006",
|
|
62
|
+
"storybook": "yarn build:tailwind && storybook dev -p 6006",
|
|
52
63
|
"build-storybook": "storybook build",
|
|
53
64
|
"prepare": "husky install"
|
|
54
65
|
},
|
|
55
66
|
"dependencies": {
|
|
56
67
|
"@emoji-mart/react": "~1.1.1",
|
|
68
|
+
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
69
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
70
|
+
"@radix-ui/react-separator": "^1.0.3",
|
|
71
|
+
"@radix-ui/react-slot": "^1.0.2",
|
|
72
|
+
"@radix-ui/react-tooltip": "^1.0.7",
|
|
57
73
|
"@udecode/cn": "~29.0.1",
|
|
58
74
|
"@udecode/plate": "~30.0.0",
|
|
59
75
|
"class-variance-authority": "~0.7.0",
|
|
@@ -74,7 +90,6 @@
|
|
|
74
90
|
"slate-react": "~0.101.5",
|
|
75
91
|
"styled-components": "~6.1.8",
|
|
76
92
|
"tailwind-merge": "~2.2.0",
|
|
77
|
-
"tailwindcss": "~3.4.1",
|
|
78
93
|
"tailwindcss-animate": "~1.0.7"
|
|
79
94
|
},
|
|
80
95
|
"peerDependencies": {
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const plateUI: {
|
|
3
|
-
p: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
4
|
-
h1: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
5
|
-
h2: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
6
|
-
h3: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
7
|
-
h4: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
8
|
-
h5: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
9
|
-
h6: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
10
|
-
blockquote: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
11
|
-
a: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps<import("@udecode/slate").Value, import("@udecode/plate-link").TLinkElement>, "ref"> & import("react").RefAttributes<any>>;
|
|
12
|
-
ol: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
13
|
-
element: import("@udecode/slate").TElement;
|
|
14
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
15
|
-
as?: import("react").ElementType<any> | undefined;
|
|
16
|
-
asChild?: boolean | undefined;
|
|
17
|
-
} & import("react").RefAttributes<any> & {
|
|
18
|
-
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
variant: "ol" | "ul";
|
|
21
|
-
}, "ref"> & import("react").RefAttributes<any>>;
|
|
22
|
-
ul: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-core").PlateRenderNodeProps<import("@udecode/slate").Value, import("@udecode/plate-core").PlateEditor<import("@udecode/slate").Value>> & Omit<import("slate-react").RenderElementProps, "element"> & {
|
|
23
|
-
element: import("@udecode/slate").TElement;
|
|
24
|
-
} & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
|
-
as?: import("react").ElementType<any> | undefined;
|
|
26
|
-
asChild?: boolean | undefined;
|
|
27
|
-
} & import("react").RefAttributes<any> & {
|
|
28
|
-
elementToAttributes?: ((element: import("@udecode/slate").TElement) => any) | undefined;
|
|
29
|
-
} & {
|
|
30
|
-
variant: "ol" | "ul";
|
|
31
|
-
}, "ref"> & import("react").RefAttributes<any>>;
|
|
32
|
-
img: ({ ...props }: import("@udecode/plate-utils").PlateElementProps<import("@udecode/slate").Value, import("@udecode/plate-media").TImageElement>) => import("react").JSX.Element;
|
|
33
|
-
button: import("react").ForwardRefExoticComponent<Omit<import("@udecode/plate-utils").PlateElementProps, "ref"> & import("react").RefAttributes<any>>;
|
|
34
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { withProps } from '@udecode/cn';
|
|
2
|
-
import { BlockquoteElement } from './plugins/blockquote';
|
|
3
|
-
import { Button } from './plugins/buttons';
|
|
4
|
-
import { ImageElement } from './plugins/image';
|
|
5
|
-
import { LinkElement } from './plugins/link';
|
|
6
|
-
import { ListElement } from './plugins/list';
|
|
7
|
-
import { ParagraphElement, HOneElement, HTwoElement, HThreeElement, HFourElement, HFiveElement, HSixElement, } from './plugins/text';
|
|
8
|
-
import * as Elements from './constants';
|
|
9
|
-
export const plateUI = {
|
|
10
|
-
[Elements.ELEMENT_PARAGRAPH]: ParagraphElement,
|
|
11
|
-
[Elements.ELEMENT_H1]: HOneElement,
|
|
12
|
-
[Elements.ELEMENT_H2]: HTwoElement,
|
|
13
|
-
[Elements.ELEMENT_H3]: HThreeElement,
|
|
14
|
-
[Elements.ELEMENT_H4]: HFourElement,
|
|
15
|
-
[Elements.ELEMENT_H5]: HFiveElement,
|
|
16
|
-
[Elements.ELEMENT_H6]: HSixElement,
|
|
17
|
-
[Elements.ELEMENT_BLOCKQUOTE]: BlockquoteElement,
|
|
18
|
-
[Elements.ELEMENT_LINK]: LinkElement,
|
|
19
|
-
[Elements.ELEMENT_OL]: withProps(ListElement, {
|
|
20
|
-
variant: Elements.ELEMENT_OL,
|
|
21
|
-
}),
|
|
22
|
-
[Elements.ELEMENT_UL]: withProps(ListElement, {
|
|
23
|
-
variant: Elements.ELEMENT_UL,
|
|
24
|
-
}),
|
|
25
|
-
[Elements.ELEMENT_IMAGE]: ImageElement,
|
|
26
|
-
[Elements.ELEMENT_BUTTON]: Button,
|
|
27
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Image, PlateElement, Resizable, useMediaState, } from '@udecode/plate';
|
|
4
|
-
import { useReadOnly } from 'slate-react';
|
|
5
|
-
const align = 'center';
|
|
6
|
-
export const ImageElement = ({ ...props }) => {
|
|
7
|
-
const { children, nodeProps } = props;
|
|
8
|
-
const readOnly = useReadOnly();
|
|
9
|
-
useMediaState();
|
|
10
|
-
return (React.createElement(PlateElement, { ...props },
|
|
11
|
-
React.createElement(Figure, { className: "group", contentEditable: false },
|
|
12
|
-
React.createElement(Resizable, { style: {
|
|
13
|
-
alignItems: 'center',
|
|
14
|
-
width: '100%',
|
|
15
|
-
maxWidth: '100%',
|
|
16
|
-
marginLeft: 'auto',
|
|
17
|
-
marginRight: 'auto',
|
|
18
|
-
}, options: {
|
|
19
|
-
align,
|
|
20
|
-
readOnly,
|
|
21
|
-
} },
|
|
22
|
-
React.createElement(Image, { ...nodeProps }))),
|
|
23
|
-
children));
|
|
24
|
-
};
|
|
25
|
-
const Figure = styled.figure `
|
|
26
|
-
position: relative;
|
|
27
|
-
margin: 0px;
|
|
28
|
-
width: 100%;
|
|
29
|
-
|
|
30
|
-
img {
|
|
31
|
-
width: 100%;
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/editor/plugins/{selectOnBackspace.d.ts → utils/selectOnBackspace.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|