forstok-ui-lib 8.10.0 → 8.10.1
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/textarea/ref.tsx +8 -2
package/dist/index.js
CHANGED
|
@@ -4562,7 +4562,7 @@ function O(e,t){if(!1===e||null==e)throw new Error(t)}function M(e,t){if(!e){"un
|
|
|
4562
4562
|
${({$isError:e})=>{if(e)return t.css`
|
|
4563
4563
|
border:1px solid var(--err-clr-ln);
|
|
4564
4564
|
`}}
|
|
4565
|
-
`,Da=r.forwardRef(((t,i)=>{var{$isError:n,$isEmoji:a,$emojiStyles:o}=t,
|
|
4565
|
+
`,Da=r.forwardRef(((t,i)=>{var{$isError:n,$isEmoji:a,$emojiStyles:o,disabled:l}=t,s=b(t,["$isError","$isEmoji","$emojiStyles","disabled"]);const d=r.useRef(null);r.useImperativeHandle(i,(()=>d.current));return e.jsxs("div",{style:{position:"relative"},children:[e.jsx(ba,Object.assign({ref:d,$isError:n,disabled:l},s)),a?e.jsx(Aa,Object.assign({$mode:"textarea",evChange:e=>{var t,r,i;const n=d.current;if(!n)return;const a=null!==(t=n.selectionStart)&&void 0!==t?t:n.value.length,o=null!==(r=n.selectionEnd)&&void 0!==r?r:n.value.length,l=`${n.value.slice(0,a)}${e}${n.value.slice(o)}`,s=a+e.length,c=null===(i=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value"))||void 0===i?void 0:i.set;null==c||c.call(n,l),n.focus(),n.setSelectionRange(s,s),n.dispatchEvent(new Event("input",{bubbles:!0}))},isDisabled:l},o&&{$emojiStyles:o})):null]})})),Ea=t.css`
|
|
4566
4566
|
align-items: center;
|
|
4567
4567
|
display: flex;
|
|
4568
4568
|
flex: 1;
|