@forgedevstack/bear 1.1.1 → 1.1.3
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/AlertDialog/AlertDialog.cjs +1 -0
- package/dist/components/AlertDialog/AlertDialog.const.cjs +1 -0
- package/dist/components/AlertDialog/AlertDialog.const.d.ts +5 -0
- package/dist/components/AlertDialog/AlertDialog.const.js +8 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +4 -0
- package/dist/components/AlertDialog/AlertDialog.js +107 -0
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +34 -0
- package/dist/components/AlertDialog/index.d.ts +3 -0
- package/dist/components/AspectRatio/AspectRatio.cjs +1 -0
- package/dist/components/AspectRatio/AspectRatio.d.ts +3 -0
- package/dist/components/AspectRatio/AspectRatio.js +29 -0
- package/dist/components/AspectRatio/AspectRatio.types.d.ts +9 -0
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +2 -2
- package/dist/components/Button/Button.constants.d.ts +1 -0
- package/dist/components/Button/Button.constants.js +10 -3
- package/dist/components/Button/Button.js +92 -84
- package/dist/components/Button/Button.types.d.ts +2 -0
- package/dist/components/FormField/FormField.cjs +1 -0
- package/dist/components/FormField/FormField.const.cjs +1 -0
- package/dist/components/FormField/FormField.const.d.ts +20 -0
- package/dist/components/FormField/FormField.const.js +23 -0
- package/dist/components/FormField/FormField.d.ts +3 -0
- package/dist/components/FormField/FormField.js +127 -0
- package/dist/components/FormField/FormField.types.d.ts +23 -0
- package/dist/components/FormField/index.d.ts +2 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +81 -44
- package/dist/components/Input/Input.types.d.ts +10 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.cjs +1 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.d.ts +7 -0
- package/dist/components/Input/components/ClearIcon/ClearIcon.js +25 -0
- package/dist/components/Input/components/ClearIcon/index.d.ts +1 -0
- package/dist/components/InputGroup/InputGroup.cjs +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +4 -0
- package/dist/components/InputGroup/InputGroup.js +63 -0
- package/dist/components/InputGroup/InputGroup.types.d.ts +23 -0
- package/dist/components/InputGroup/index.d.ts +2 -0
- package/dist/components/PasswordInput/PasswordInput.cjs +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +3 -0
- package/dist/components/PasswordInput/PasswordInput.js +61 -0
- package/dist/components/PasswordInput/PasswordInput.types.d.ts +18 -0
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/ResizableTextarea/ResizableTextarea.cjs +1 -1
- package/dist/components/ResizableTextarea/ResizableTextarea.js +90 -54
- package/dist/components/ResizableTextarea/ResizableTextarea.types.d.ts +10 -0
- package/dist/components/RichEditor/RichEditor.cjs +1 -1
- package/dist/components/RichEditor/RichEditor.js +186 -169
- package/dist/components/RichEditor/RichEditor.types.d.ts +4 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.js +44 -34
- package/dist/index.cjs +1 -1
- package/dist/index.js +126 -116
- package/dist/styles.css +1 -1
- package/dist/types/component.types.d.ts +13 -0
- package/package.json +1 -4
|
@@ -1,60 +1,96 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { DEFAULT_MIN_HEIGHT as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useState as j, useCallback as A } from "react";
|
|
3
|
+
import { cn as c } from "../../utils/cn.js";
|
|
4
|
+
import { DEFAULT_MIN_HEIGHT as U, DEFAULT_MAX_HEIGHT as Y } from "./ResizableTextarea.const.js";
|
|
5
|
+
const O = ({
|
|
6
|
+
label: x,
|
|
7
|
+
helperText: m,
|
|
8
|
+
error: u,
|
|
9
|
+
minHeight: e = U,
|
|
10
|
+
maxHeight: t = Y,
|
|
11
|
+
resizable: n = !0,
|
|
12
|
+
showCharCount: v = !1,
|
|
13
|
+
charCountMax: L,
|
|
14
|
+
className: N,
|
|
15
|
+
style: R,
|
|
16
|
+
testId: B,
|
|
17
|
+
...r
|
|
13
18
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
var
|
|
16
|
-
if (!
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
let o =
|
|
21
|
-
e > 0 && (o = Math.max(e, o)), t > 0 && (o = Math.min(t, o)),
|
|
22
|
-
},
|
|
23
|
-
var
|
|
24
|
-
(
|
|
19
|
+
const f = !!u, i = L ?? r.maxLength, y = typeof r.value == "string" ? r.value.length : typeof r.defaultValue == "string" ? r.defaultValue.length : 0, M = i != null && y > i, z = p(null), [g, D] = j(e), h = p(0), _ = p(e), I = A((a) => {
|
|
20
|
+
var T, E;
|
|
21
|
+
if (!n) return;
|
|
22
|
+
a.preventDefault(), h.current = a.clientY, _.current = g, (E = (T = a.target).setPointerCapture) == null || E.call(T, a.pointerId);
|
|
23
|
+
const w = (l) => {
|
|
24
|
+
const b = l.clientY - h.current;
|
|
25
|
+
let o = _.current + b;
|
|
26
|
+
e > 0 && (o = Math.max(e, o)), t > 0 && (o = Math.min(t, o)), D(o);
|
|
27
|
+
}, k = () => {
|
|
28
|
+
var l, b;
|
|
29
|
+
(b = (l = a.target).releasePointerCapture) == null || b.call(l, a.pointerId), window.removeEventListener("pointermove", w), window.removeEventListener("pointerup", k);
|
|
25
30
|
};
|
|
26
|
-
window.addEventListener("pointermove",
|
|
27
|
-
}, [
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
window.addEventListener("pointermove", w), window.addEventListener("pointerup", k);
|
|
32
|
+
}, [n, g, e, t]);
|
|
33
|
+
return /* @__PURE__ */ d("div", { className: c("Bear-ResizableTextarea bear-flex bear-flex-col bear-gap-1.5", N), "data-testid": B, children: [
|
|
34
|
+
x && /* @__PURE__ */ s("label", { className: "Bear-ResizableTextarea__label bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300", children: x }),
|
|
35
|
+
/* @__PURE__ */ d("div", { className: "bear-relative", children: [
|
|
36
|
+
/* @__PURE__ */ s(
|
|
37
|
+
"textarea",
|
|
38
|
+
{
|
|
39
|
+
ref: z,
|
|
40
|
+
"aria-invalid": f || void 0,
|
|
41
|
+
className: c(
|
|
42
|
+
"bear-w-full bear-rounded-lg bear-border",
|
|
43
|
+
"bear-bg-white dark:bear-bg-gray-900 bear-text-gray-900 dark:bear-text-gray-100",
|
|
44
|
+
"bear-p-3 bear-resize-none focus:bear-outline-none focus:bear-ring-2",
|
|
45
|
+
f ? "bear-border-red-500 focus:bear-ring-red-500" : "bear-border-gray-300 dark:bear-border-gray-600 focus:bear-ring-pink-500/50"
|
|
46
|
+
),
|
|
47
|
+
style: {
|
|
48
|
+
...R,
|
|
49
|
+
minHeight: n ? e : void 0,
|
|
50
|
+
height: n ? g : void 0,
|
|
51
|
+
maxHeight: t > 0 ? t : void 0
|
|
52
|
+
},
|
|
53
|
+
...r
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
n && /* @__PURE__ */ s(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
role: "separator",
|
|
60
|
+
onPointerDown: I,
|
|
61
|
+
className: "Bear-ResizableTextarea__handle bear-absolute bear-right-0 bear-bottom-0 bear-w-4 bear-h-4 bear-cursor-s-resize bear-opacity-50 hover:bear-opacity-100",
|
|
62
|
+
style: { background: "linear-gradient(135deg, transparent 50%, currentColor 50%)" }
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] }),
|
|
66
|
+
/* @__PURE__ */ d("div", { className: "Bear-ResizableTextarea__footer bear-flex bear-items-center bear-justify-between bear-gap-2", children: [
|
|
67
|
+
m || u ? /* @__PURE__ */ s(
|
|
68
|
+
"p",
|
|
69
|
+
{
|
|
70
|
+
className: c(
|
|
71
|
+
"Bear-ResizableTextarea__helper bear-text-sm bear-flex-1",
|
|
72
|
+
f ? "bear-text-red-500" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
73
|
+
),
|
|
74
|
+
children: u || m
|
|
75
|
+
}
|
|
76
|
+
) : v ? /* @__PURE__ */ s("span", {}) : null,
|
|
77
|
+
v && i != null && /* @__PURE__ */ d(
|
|
78
|
+
"span",
|
|
79
|
+
{
|
|
80
|
+
className: c(
|
|
81
|
+
"Bear-ResizableTextarea__char-count bear-text-xs bear-tabular-nums bear-shrink-0",
|
|
82
|
+
M ? "bear-text-red-500" : "bear-text-gray-400 dark:bear-text-gray-500"
|
|
83
|
+
),
|
|
84
|
+
children: [
|
|
85
|
+
y,
|
|
86
|
+
"/",
|
|
87
|
+
i
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] })
|
|
56
92
|
] });
|
|
57
93
|
};
|
|
58
94
|
export {
|
|
59
|
-
|
|
95
|
+
O as ResizableTextarea
|
|
60
96
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { TextareaHTMLAttributes } from 'react';
|
|
2
2
|
export interface ResizableTextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'style'> {
|
|
3
|
+
/** Textarea label */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Helper text below textarea */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
/** Error message (shows red border + text) */
|
|
8
|
+
error?: string;
|
|
3
9
|
/** Minimum height in pixels */
|
|
4
10
|
minHeight?: number;
|
|
5
11
|
/** Maximum height in pixels (0 = unbounded) */
|
|
@@ -12,4 +18,8 @@ export interface ResizableTextareaProps extends Omit<TextareaHTMLAttributes<HTML
|
|
|
12
18
|
style?: React.CSSProperties;
|
|
13
19
|
/** Test ID */
|
|
14
20
|
testId?: string;
|
|
21
|
+
/** Show live character count (requires maxLength or charCountMax) */
|
|
22
|
+
showCharCount?: boolean;
|
|
23
|
+
/** Max chars for counter display (alternative to maxLength when you don't want native enforcement) */
|
|
24
|
+
charCountMax?: number;
|
|
15
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),m=require("../../utils/cn.cjs"),u=require("./helpers/formatHelpers.cjs"),f=require("./RichEditor.const.cjs"),ce=require("../../hooks/useMediaQuery.cjs"),C=require("./components/ToolbarButton/ToolbarButton.cjs"),ue=require("./components/ToolbarDropdown/ToolbarDropdown.cjs"),z=require("./components/ToolbarColorPicker/ToolbarColorPicker.cjs"),de=require("./components/ToolbarMore/ToolbarMore.cjs"),i=require("../Icon/icons/editor.cjs"),ge=6,fe=A=>{const{value:x,defaultValue:k="",onChange:R,placeholder:v="Start typing...",disabled:o=!1,readOnly:r=!1,minHeight:j=f.RICH_EDITOR_MIN_HEIGHT,maxHeight:b,toolbar:D=f.RICH_EDITOR_DEFAULT_TOOLBAR,className:N="",testId:M,id:F,allowImagePaste:L=!0,showCharCount:p=!1,charCountMax:_,...w}=A,l=c.useRef(null),E=ce.useMediaQuery(`(max-width: ${f.RICH_EDITOR_MOBILE_BREAKPOINT}px)`),O=E?f.RICH_EDITOR_MOBILE_TOOLBAR:D,[q,U]=c.useState(new Set),[P,H]=c.useState("p"),[B,V]=c.useState(0),[J,G]=c.useState("#000000"),[$,Q]=c.useState("#fef08a"),[K,Y]=c.useState([]),[W,X]=c.useState([]);c.useEffect(()=>{const e="bear-rich-editor-styles";if(!document.getElementById(e)){const n=document.createElement("style");n.id=e,n.textContent=f.RICH_EDITOR_CONTENT_STYLES,document.head.appendChild(n)}},[]),c.useEffect(()=>{l.current&&x!==void 0&&l.current.innerHTML!==x&&(l.current.innerHTML=x)},[x]),c.useEffect(()=>{l.current&&k&&!x&&(l.current.innerHTML=k)},[]);const I=c.useCallback(()=>{U(u.getActiveFormats());const e=u.queryCommandValue("formatBlock");e&&H(e.toLowerCase().replace(/[<>]/g,""))},[]),a=c.useCallback(()=>{var e;l.current&&(R&&R(l.current.innerHTML),p&&V(((e=l.current.textContent)==null?void 0:e.length)??0)),I()},[R,I,p]),Z=c.useCallback(e=>{var d;if(o||r)return;(d=l.current)==null||d.focus();const n=f.RICH_EDITOR_BUTTON_CONFIG[e];if(!n)return;const g="value"in n?n.value:void 0;g?u.execCommand(n.command,g):u.execCommand(n.command),I(),a()},[o,r,I,a]),ee=c.useCallback(e=>{var n;o||r||((n=l.current)==null||n.focus(),u.execCommand("formatBlock",e),H(e),a())},[o,r,a]),te=c.useCallback(()=>{var d;if(o||r)return;const e=window.getSelection(),n=e&&e.toString().length>0,g=prompt("Enter URL:",n?"":"https://");g&&((d=l.current)==null||d.focus(),u.insertLink(g),a())},[o,r,a]),T=c.useCallback((e,n)=>{if(!e)return;(n==="text"?Y:X)(d=>{const s=d.filter(h=>h!==e);return[e,...s].slice(0,ge)})},[]),ne=c.useCallback(e=>{var n;o||r||((n=l.current)==null||n.focus(),u.setTextColor(e),G(e),T(e,"text"),a())},[o,r,a,T]),oe=c.useCallback(e=>{var n;o||r||((n=l.current)==null||n.focus(),u.setHighlightColor(e),Q(e),T(e,"highlight"),a())},[o,r,a,T]),re=c.useCallback(e=>{var n;o||r||((n=l.current)==null||n.focus(),u.setTextColor(e),a())},[o,r,a]),ie=c.useCallback(e=>{var n;o||r||((n=l.current)==null||n.focus(),u.setHighlightColor(e),a())},[o,r,a]),se=c.useCallback(async e=>{var g;if(!L)return;const n=(g=e.clipboardData)==null?void 0:g.items;if(n)for(let d=0;d<n.length;d++){const s=n[d];if(s.type.startsWith("image/")){e.preventDefault();const h=s.getAsFile();if(h){const y=await u.fileToDataUrl(h);u.insertImage(y),a()}return}}},[L,a]),ae=c.useCallback(()=>{if(o||r)return;const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=async n=>{var d,s;const g=(d=n.target.files)==null?void 0:d[0];if(g){const h=await u.fileToDataUrl(g);(s=l.current)==null||s.focus(),u.insertImage(h),a()}},e.click()},[o,r,a]),le={bold:t.jsx(i.BoldIcon,{size:16}),italic:t.jsx(i.ItalicIcon,{size:16}),underline:t.jsx(i.UnderlineIcon,{size:16}),strikethrough:t.jsx(i.StrikethroughIcon,{size:16}),heading1:t.jsx(i.Heading1Icon,{size:16}),heading2:t.jsx(i.Heading2Icon,{size:16}),heading3:t.jsx(i.Heading3Icon,{size:16}),bulletList:t.jsx(i.ListBulletIcon,{size:16}),orderedList:t.jsx(i.ListNumberedIcon,{size:16}),blockquote:t.jsx(i.QuoteIcon,{size:16}),code:t.jsx(i.CodeIcon,{size:16}),link:t.jsx(i.InsertLinkIcon,{size:16}),alignLeft:t.jsx(i.AlignLeftIcon,{size:16}),alignCenter:t.jsx(i.AlignCenterIcon,{size:16}),alignRight:t.jsx(i.AlignRightIcon,{size:16}),alignJustify:t.jsx(i.AlignJustifyIcon,{size:16}),image:t.jsx(i.InsertPhotoIcon,{size:16}),indent:t.jsx(i.IndentIncreaseIcon,{size:16}),outdent:t.jsx(i.IndentDecreaseIcon,{size:16}),clearFormat:t.jsx(i.FormatClearIcon,{size:16}),table:t.jsx(i.TableIcon,{size:16})},S=(e,n)=>{if(e==="divider")return t.jsx("div",{className:m.cn("Bear-RichEditor__divider",f.RICH_EDITOR_DIVIDER_CLASSES)},`divider-${n}`);if(e==="headingDropdown")return t.jsx(ue.ToolbarDropdown,{options:f.RICH_EDITOR_HEADING_OPTIONS,value:P,onChange:ee,title:"Text Style",disabled:o||r,icon:t.jsx(i.TextIcon,{size:16})},"heading-dropdown");if(e==="textColor")return t.jsx(z.ToolbarColorPicker,{value:J,onChange:ne,title:"Text Color",disabled:o||r,type:"text",recentColors:K,onApplyLast:re},"text-color");if(e==="highlightColor")return t.jsx(z.ToolbarColorPicker,{value:$,onChange:oe,title:"Highlight Color",disabled:o||r,type:"highlight",recentColors:W,onApplyLast:ie},"highlight-color");if(e==="link")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.InsertLinkIcon,{size:16}),title:"Insert Link",onClick:te,disabled:o||r},"link");if(e==="image")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.InsertPhotoIcon,{size:16}),title:"Insert Image",onClick:ae,disabled:o||r},"image");if(e==="alignLeft")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.AlignLeftIcon,{size:16}),title:"Align Left",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("justifyLeft"),a()},disabled:o||r},"alignLeft");if(e==="alignCenter")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.AlignCenterIcon,{size:16}),title:"Align Center",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("justifyCenter"),a()},disabled:o||r},"alignCenter");if(e==="alignRight")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.AlignRightIcon,{size:16}),title:"Align Right",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("justifyRight"),a()},disabled:o||r},"alignRight");if(e==="alignJustify")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.AlignJustifyIcon,{size:16}),title:"Justify",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("justifyFull"),a()},disabled:o||r},"alignJustify");if(e==="indent")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.IndentIncreaseIcon,{size:16}),title:"Increase Indent",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("indent"),a()},disabled:o||r},"indent");if(e==="outdent")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.IndentDecreaseIcon,{size:16}),title:"Decrease Indent",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("outdent"),a()},disabled:o||r},"outdent");if(e==="clearFormat")return t.jsx(C.ToolbarButton,{icon:t.jsx(i.FormatClearIcon,{size:16}),title:"Clear Formatting",onClick:()=>{var s;(s=l.current)==null||s.focus(),u.execCommand("removeFormat"),a()},disabled:o||r},"clearFormat");if(e==="more"){const s=E?f.RICH_EDITOR_MOBILE_MORE_ITEMS:["alignLeft","alignCenter","alignRight","alignJustify","indent","outdent","blockquote","code","clearFormat"];return t.jsx(de.ToolbarMore,{disabled:o||r,isMobile:E,children:s.map((h,y)=>S(h,y+1e3))},"more")}const g=f.RICH_EDITOR_BUTTON_CONFIG[e],d=le[e];return!g||!d?null:t.jsx(C.ToolbarButton,{icon:d,title:g.title,active:q.has(e),onClick:()=>Z(e),disabled:o||r},e)};return t.jsxs("div",{id:F,"data-testid":M,className:m.cn("Bear-RichEditor",f.RICH_EDITOR_ROOT_CLASSES,o&&"Bear-RichEditor--disabled",r&&"Bear-RichEditor--readonly",N),...w,children:[O.length>0&&t.jsx("div",{className:m.cn("Bear-RichEditor__toolbar",f.RICH_EDITOR_TOOLBAR_CLASSES),children:O.map((e,n)=>S(e,n))}),t.jsx("div",{ref:l,contentEditable:!o&&!r,onInput:a,onSelect:I,onKeyUp:I,onMouseUp:I,onPaste:se,"data-placeholder":v,className:m.cn("Bear-RichEditor__content",f.RICH_EDITOR_CONTENT_CLASSES,"[&:empty]:before:bear-content-[attr(data-placeholder)] [&:empty]:before:bear-text-gray-400 [&:empty]:before:bear-pointer-events-none",o&&"Bear-RichEditor__content--disabled bear-opacity-50 bear-cursor-not-allowed"),style:{minHeight:typeof j=="number"?`${j}px`:j,maxHeight:b?typeof b=="number"?`${b}px`:b:void 0,overflowY:b?"auto":void 0}}),p&&_!=null&&t.jsxs("div",{className:m.cn("Bear-RichEditor__char-count bear-text-xs bear-tabular-nums bear-px-3 bear-py-1.5 bear-text-right bear-border-t bear-border-gray-200 dark:bear-border-gray-700",B>_?"bear-text-red-500":"bear-text-gray-400 dark:bear-text-gray-500"),children:[B,"/",_]})]})};exports.RichEditor=fe;
|