frst-components 0.22.60 → 0.22.61
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/index.js
CHANGED
|
@@ -3647,6 +3647,7 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
|
|
|
3647
3647
|
}
|
|
3648
3648
|
else {
|
|
3649
3649
|
if (areChildrenEmpty()) {
|
|
3650
|
+
resizeDiv();
|
|
3650
3651
|
divPlaceholder.current?.style.setProperty('display', 'block');
|
|
3651
3652
|
divInputRef.current?.style.setProperty('display', 'none');
|
|
3652
3653
|
setPlaceholder(true);
|
|
@@ -3798,7 +3799,6 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
|
|
|
3798
3799
|
divInputRef.current.innerHTML = '<p><br /></p>';
|
|
3799
3800
|
setPlaceholder(true);
|
|
3800
3801
|
countChars();
|
|
3801
|
-
resizeDiv();
|
|
3802
3802
|
}
|
|
3803
3803
|
}, [value]);
|
|
3804
3804
|
return {
|
|
@@ -4005,9 +4005,9 @@ function InputComment$1({ placeholder, onChange, limit, users, showCharacterCoun
|
|
|
4005
4005
|
replyMentionedUser,
|
|
4006
4006
|
initialText
|
|
4007
4007
|
});
|
|
4008
|
-
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs("div", { style: { minHeight: '48px', ...styles }, tabIndex: 0, children: [jsxRuntime.jsxs(InputWrapper$2, { tabIndex: 1, isPlaceholder: isPlaceholder, isInputLimit: styleLimitExceeded, children: [jsxRuntime.jsx(InputText$4, { id: "input-comment-component", tabIndex: 2, contentEditable: true, ref: divInputRef, onKeyUpCapture: (event) => {
|
|
4008
|
+
return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsxs("div", { style: { minHeight: '48px', ...styles }, tabIndex: 0, onMouseDown: () => divInputRef.current.focus(), children: [jsxRuntime.jsxs(InputWrapper$2, { tabIndex: 1, isPlaceholder: isPlaceholder, isInputLimit: styleLimitExceeded, onMouseDown: () => divInputRef.current.focus(), children: [jsxRuntime.jsx(InputText$4, { id: "input-comment-component", tabIndex: 2, contentEditable: true, ref: divInputRef, onKeyUpCapture: (event) => {
|
|
4009
4009
|
handleInput(event);
|
|
4010
|
-
}, "data-text": "enter", suppressContentEditableWarning: true, children: jsxRuntime.jsx("p", { children: jsxRuntime.jsx("br", {}) }) }), jsxRuntime.jsx(InputPlaceholder, { style: { display: 'none' }, contentEditable: true, ref: divPlaceholder, children: placeholder }), showMention && users && users.length > 0 && (jsxRuntime.jsx(Mentions, { users: users, top: mentionTopPosition, onSelect: (user) => {
|
|
4010
|
+
}, "data-text": "enter", suppressContentEditableWarning: true, children: jsxRuntime.jsx("p", { children: jsxRuntime.jsx("br", {}) }) }), jsxRuntime.jsx(InputPlaceholder, { style: { display: 'none' }, contentEditable: true, ref: divPlaceholder, onMouseDown: () => divInputRef.current.focus(), children: placeholder }), showMention && users && users.length > 0 && (jsxRuntime.jsx(Mentions, { users: users, top: mentionTopPosition, onSelect: (user) => {
|
|
4011
4011
|
setShowMention(false);
|
|
4012
4012
|
handleMentionUser(user);
|
|
4013
4013
|
} }))] }), jsxRuntime.jsx(HelperContainer, { children: !isPlaceholder ? (jsxRuntime.jsxs(HelperText$2, { isInputLimit: styleLimitExceeded, children: [textLength, "/", limit] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, {})) }), styleLimitExceeded && (jsxRuntime.jsxs(LimitCharsContainer, { children: [jsxRuntime.jsx(TagAlert, {}), jsxRuntime.jsx(LimitCharsExceededMessage, { children: limitMessageExceeded })] }))] }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputHook.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/useInputHook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,UAA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