@onesy/ui-react 1.0.100 → 1.0.102
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.
@@ -58,7 +58,7 @@ const useStyle = (0, style_react_1.style)(theme => ({
|
|
58
58
|
minHeight: '20px',
|
59
59
|
width: '100%',
|
60
60
|
'& .onesy-TextField-input': Object.assign({ wordBreak: 'break-word', color: theme.methods.palette.color.value('primary', 10) }, theme.typography.values.b2),
|
61
|
-
'& ul, ol': {
|
61
|
+
'& ul, & ol': {
|
62
62
|
listStylePosition: 'inside'
|
63
63
|
}
|
64
64
|
},
|
@@ -600,14 +600,9 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
|
|
600
600
|
}, 140);
|
601
601
|
}, []);
|
602
602
|
const onMouseDown = react_1.default.useCallback(() => {
|
603
|
-
var _a, _b;
|
604
603
|
if (!refs.edit.current)
|
605
604
|
return;
|
606
605
|
textQueryUpdate();
|
607
|
-
const selection_ = refs.rootWindow.current.getSelection();
|
608
|
-
if (selection_.anchorNode &&
|
609
|
-
!((_b = (_a = selection_.anchorNode) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('TextField')))
|
610
|
-
refs.range.current = selection_.getRangeAt(0);
|
611
606
|
}, []);
|
612
607
|
const onKeyUp = react_1.default.useCallback(() => {
|
613
608
|
if (!refs.edit.current)
|
@@ -807,7 +802,7 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
|
|
807
802
|
'onesy-RichTextEditor-palette'
|
808
803
|
],
|
809
804
|
classes.palette
|
810
|
-
]) }, other_, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5,
|
805
|
+
]) }, other_, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, style: {
|
811
806
|
maxHeight: 136,
|
812
807
|
padding: '10px 10px 0',
|
813
808
|
overflow: 'hidden auto'
|
@@ -55,7 +55,7 @@ const useStyle = styleMethod(theme => ({
|
|
55
55
|
wordBreak: 'break-word',
|
56
56
|
color: theme.methods.palette.color.value('primary', 10)
|
57
57
|
}, theme.typography.values.b2),
|
58
|
-
'& ul, ol': {
|
58
|
+
'& ul, & ol': {
|
59
59
|
listStylePosition: 'inside'
|
60
60
|
}
|
61
61
|
},
|
@@ -646,8 +646,6 @@ const SmartTextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
646
646
|
const onMouseDown = React.useCallback(() => {
|
647
647
|
if (!refs.edit.current) return;
|
648
648
|
textQueryUpdate();
|
649
|
-
const selection_ = refs.rootWindow.current.getSelection();
|
650
|
-
if (selection_.anchorNode && !selection_.anchorNode?.className?.includes('TextField')) refs.range.current = selection_.getRangeAt(0);
|
651
649
|
}, []);
|
652
650
|
const onKeyUp = React.useCallback(() => {
|
653
651
|
if (!refs.edit.current) return;
|
@@ -817,8 +815,6 @@ const SmartTextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
|
|
817
815
|
className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette])
|
818
816
|
}, other_), /*#__PURE__*/React.createElement(Line, {
|
819
817
|
gap: 0.5,
|
820
|
-
onMouseUp: onMouseUp,
|
821
|
-
onMouseDown: onMouseDown,
|
822
818
|
style: {
|
823
819
|
maxHeight: 136,
|
824
820
|
padding: '10px 10px 0',
|
package/esm/index.js
CHANGED