@soul-refiner/design-system 0.2.76 → 0.2.78
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.
|
@@ -2,6 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { insertImage, useLinkToolbarButton, useLinkToolbarButtonState, useListToolbarButton, useListToolbarButtonState, useMarkToolbarButton, useMarkToolbarButtonState, usePlateEditorRef, } from '@udecode/plate';
|
|
4
4
|
import { Tooltip } from '../../';
|
|
5
|
+
import { AlignmentDropdown } from '../navbar/alignment_dropdown';
|
|
6
|
+
import { StyleDropdown } from '../navbar/style_dropdown';
|
|
5
7
|
import { Bold, Image, Italic, Link, ListOrdered, ListUnordered, Redo, Underline, Undo, } from '../../../icons';
|
|
6
8
|
import { ELEMENT_OL, ELEMENT_UL, MARK_BOLD, MARK_ITALIC, MARK_UNDERLINE, } from '../constants';
|
|
7
9
|
export const EditorBar = ({ handleUploadImage }) => {
|
|
@@ -43,6 +45,13 @@ export const EditorBar = ({ handleUploadImage }) => {
|
|
|
43
45
|
React.createElement(MenuButton, { "$active": false, onClick: handleRedo },
|
|
44
46
|
React.createElement(Redo, { size: 24, color: "grey-5" })))),
|
|
45
47
|
React.createElement(Divider, null),
|
|
48
|
+
React.createElement(MenuSection, null,
|
|
49
|
+
React.createElement(StyleDropdown, { editorRef: editorRef })),
|
|
50
|
+
React.createElement(Divider, null),
|
|
51
|
+
React.createElement(MenuSection, null,
|
|
52
|
+
React.createElement(MenuButton, { "$active": false, as: "div" },
|
|
53
|
+
React.createElement(AlignmentDropdown, { editorRef: editorRef }))),
|
|
54
|
+
React.createElement(Divider, null),
|
|
46
55
|
React.createElement(MenuSection, null,
|
|
47
56
|
React.createElement(Tooltip, { content: "Bold", place: "top" },
|
|
48
57
|
React.createElement(MenuButton, { "$active": currBold, onClick: handleBold },
|
|
@@ -26,9 +26,15 @@ export const SimpleEditor = ({ editable, handleUploadImage, onChange, placeholde
|
|
|
26
26
|
} })))));
|
|
27
27
|
};
|
|
28
28
|
const InnerWrapper = styled.div `
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
& > div {
|
|
30
|
+
padding: 24px;
|
|
31
|
+
min-height: 224px;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
|
|
34
|
+
& > div {
|
|
35
|
+
margin: 24px 0px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
32
38
|
`;
|
|
33
39
|
const Wrapper = styled.div `
|
|
34
40
|
position: relative;
|
|
@@ -61,6 +67,7 @@ const Wrapper = styled.div `
|
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
li {
|
|
70
|
+
margin: 8px 0px;
|
|
64
71
|
color: var(--color-grey-3);
|
|
65
72
|
}
|
|
66
73
|
|
|
@@ -17,9 +17,10 @@ export interface FilterProps {
|
|
|
17
17
|
optionOnChange?: (event: React.MouseEvent) => void;
|
|
18
18
|
checkbox?: boolean;
|
|
19
19
|
applyOnClick?: (event: React.MouseEvent) => void;
|
|
20
|
+
resetOnClick?: (event: React.MouseEvent) => void;
|
|
20
21
|
}
|
|
21
22
|
declare const Filter: {
|
|
22
|
-
({ closeOnBlur, disabled, graphic, label, sx, triggerType, options, defaultValue, closeOnChange, optionOnChange, checkbox, applyOnClick, }: FilterProps): React.JSX.Element;
|
|
23
|
+
({ closeOnBlur, disabled, graphic, label, sx, triggerType, options, defaultValue, closeOnChange, optionOnChange, checkbox, applyOnClick, resetOnClick, }: FilterProps): React.JSX.Element;
|
|
23
24
|
Trigger: {
|
|
24
25
|
({ disabled, graphic, label, onClick, open, type, value, }: FilterTriggerProps): React.JSX.Element;
|
|
25
26
|
displayName: string;
|
|
@@ -5,7 +5,7 @@ import { Box, Button, P } from '../../';
|
|
|
5
5
|
import { ChevronDown, ChevronUp } from '../../../icons';
|
|
6
6
|
import { Styles } from '../../../common';
|
|
7
7
|
import { Spacer, Option } from './filter_option';
|
|
8
|
-
const Filter = ({ closeOnBlur = true, disabled, graphic, label = '', sx, triggerType, options, defaultValue = '', closeOnChange = true, optionOnChange, checkbox, applyOnClick, }) => {
|
|
8
|
+
const Filter = ({ closeOnBlur = true, disabled, graphic, label = '', sx, triggerType, options, defaultValue = '', closeOnChange = true, optionOnChange, checkbox, applyOnClick, resetOnClick, }) => {
|
|
9
9
|
const multiple = !!checkbox;
|
|
10
10
|
const wrapperRef = React.useRef(null);
|
|
11
11
|
const optionsRef = React.useRef(null);
|
|
@@ -102,7 +102,8 @@ const Filter = ({ closeOnBlur = true, disabled, graphic, label = '', sx, trigger
|
|
|
102
102
|
React.createElement(React.Fragment, null,
|
|
103
103
|
dropdownOptions,
|
|
104
104
|
triggerType === 'pill' && (React.createElement(Box, { "$display": "flex", "$dir": "row", "$align": "center", "$justify": "flex-end", "$gap": 8, sx: "margin-top: 8px; padding-right: 8px; padding-bottom: 8px" },
|
|
105
|
-
React.createElement(Button, { onClick: () => {
|
|
105
|
+
React.createElement(Button, { onClick: (event) => {
|
|
106
|
+
resetOnClick && resetOnClick(event);
|
|
106
107
|
setSelected(multiple ? [] : '');
|
|
107
108
|
setOpen(false);
|
|
108
109
|
}, size: "small", type: "text" }, "Reset"),
|