@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
sm: {
|
|
3
|
+
field: "bear-h-10 bear-text-sm bear-px-3 bear-pt-4 bear-pb-1",
|
|
4
|
+
label: "bear-text-xs",
|
|
5
|
+
labelFloat: "bear-top-1 bear-text-[10px]",
|
|
6
|
+
labelRest: "bear-top-1/2 bear-text-sm"
|
|
7
|
+
},
|
|
8
|
+
md: {
|
|
9
|
+
field: "bear-h-14 bear-text-base bear-px-4 bear-pt-5 bear-pb-2",
|
|
10
|
+
label: "bear-text-sm",
|
|
11
|
+
labelFloat: "bear-top-1.5 bear-text-xs",
|
|
12
|
+
labelRest: "bear-top-1/2 bear-text-base"
|
|
13
|
+
},
|
|
14
|
+
lg: {
|
|
15
|
+
field: "bear-h-16 bear-text-lg bear-px-5 bear-pt-6 bear-pb-2",
|
|
16
|
+
label: "bear-text-base",
|
|
17
|
+
labelFloat: "bear-top-2 bear-text-xs",
|
|
18
|
+
labelRest: "bear-top-1/2 bear-text-lg"
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
e as FORMFIELD_SIZE_CLASSES
|
|
23
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useContext as X, useState as Y, useId as $, useCallback as I } from "react";
|
|
3
|
+
import { cn as e } from "../../utils/cn.js";
|
|
4
|
+
import { FORMFIELD_SIZE_CLASSES as V } from "./FormField.const.js";
|
|
5
|
+
import { BearContext as S } from "../../context/BearProvider.js";
|
|
6
|
+
const A = W(
|
|
7
|
+
({
|
|
8
|
+
label: z,
|
|
9
|
+
helperText: R,
|
|
10
|
+
error: h,
|
|
11
|
+
success: p,
|
|
12
|
+
size: j = "md",
|
|
13
|
+
leftAddon: d,
|
|
14
|
+
rightAddon: n,
|
|
15
|
+
fullWidth: L = !1,
|
|
16
|
+
required: M = !1,
|
|
17
|
+
variant: _ = "outlined",
|
|
18
|
+
className: D,
|
|
19
|
+
disabled: g,
|
|
20
|
+
value: c,
|
|
21
|
+
defaultValue: x,
|
|
22
|
+
placeholder: O,
|
|
23
|
+
onFocus: l,
|
|
24
|
+
onBlur: o,
|
|
25
|
+
...k
|
|
26
|
+
}, Z) => {
|
|
27
|
+
var E;
|
|
28
|
+
const f = _ === "filled", s = _ === "standard", F = X(S), r = (E = F == null ? void 0 : F.components) == null ? void 0 : E.FormField, q = r == null ? void 0 : r.root, G = r == null ? void 0 : r.input, H = r == null ? void 0 : r.label, J = r == null ? void 0 : r.helper, B = r == null ? void 0 : r.addon, K = f ? r == null ? void 0 : r.filled : s ? r == null ? void 0 : r.standard : r == null ? void 0 : r.outlined, [i, N] = Y(!1), P = $(), w = k.id ?? P, Q = c != null && c !== "" || x != null && x !== "", v = i || Q, a = !!h, b = !!p && !a, u = V[j], C = h || p || R, T = I(
|
|
29
|
+
(y) => {
|
|
30
|
+
N(!0), l == null || l(y);
|
|
31
|
+
},
|
|
32
|
+
[l]
|
|
33
|
+
), U = I(
|
|
34
|
+
(y) => {
|
|
35
|
+
N(!1), o == null || o(y);
|
|
36
|
+
},
|
|
37
|
+
[o]
|
|
38
|
+
);
|
|
39
|
+
return /* @__PURE__ */ m("div", { className: e("Bear-FormField bear-flex bear-flex-col bear-gap-1", L && "bear-w-full"), style: q, children: [
|
|
40
|
+
/* @__PURE__ */ m("div", { className: "Bear-FormField__wrapper bear-relative bear-flex bear-items-center", children: [
|
|
41
|
+
d && /* @__PURE__ */ t("div", { className: "Bear-FormField__addon Bear-FormField__addon--left bear-absolute bear-left-3 bear-z-10 bear-text-gray-500 dark:bear-text-gray-400", style: B, children: d }),
|
|
42
|
+
/* @__PURE__ */ t(
|
|
43
|
+
"input",
|
|
44
|
+
{
|
|
45
|
+
ref: Z,
|
|
46
|
+
id: w,
|
|
47
|
+
disabled: g,
|
|
48
|
+
value: c,
|
|
49
|
+
defaultValue: x,
|
|
50
|
+
placeholder: v ? O : void 0,
|
|
51
|
+
"aria-invalid": a || void 0,
|
|
52
|
+
onFocus: T,
|
|
53
|
+
onBlur: U,
|
|
54
|
+
className: e(
|
|
55
|
+
"Bear-FormField__input bear-peer bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200",
|
|
56
|
+
f ? e(
|
|
57
|
+
"bear-bg-gray-100 bear-border-transparent bear-rounded-t-lg bear-rounded-b-none bear-border-b-2",
|
|
58
|
+
"dark:bear-bg-gray-800",
|
|
59
|
+
a ? "bear-border-b-red-500" : b ? "bear-border-b-green-500" : i ? "bear-border-b-bear-500" : "bear-border-b-gray-400 dark:bear-border-b-gray-500"
|
|
60
|
+
) : s ? e(
|
|
61
|
+
"bear-bg-transparent bear-rounded-none bear-border-0 bear-border-b-2",
|
|
62
|
+
a ? "bear-border-b-red-500" : b ? "bear-border-b-green-500" : i ? "bear-border-b-bear-500" : "bear-border-b-gray-300 dark:bear-border-b-gray-600"
|
|
63
|
+
) : e(
|
|
64
|
+
"bear-bg-white dark:bear-bg-gray-900",
|
|
65
|
+
a ? "bear-border-red-500 focus:bear-ring-2 focus:bear-ring-red-500/30" : b ? "bear-border-green-500 focus:bear-ring-2 focus:bear-ring-green-500/30" : e(
|
|
66
|
+
"bear-border-gray-300 dark:bear-border-gray-600",
|
|
67
|
+
"focus:bear-border-bear-500 focus:bear-ring-2 focus:bear-ring-bear-500/30",
|
|
68
|
+
"dark:focus:bear-border-bear-400"
|
|
69
|
+
)
|
|
70
|
+
),
|
|
71
|
+
"bear-text-gray-900 dark:bear-text-white placeholder:bear-text-gray-400 dark:placeholder:bear-text-gray-500",
|
|
72
|
+
g && "bear-opacity-50 bear-cursor-not-allowed",
|
|
73
|
+
d && "bear-pl-10",
|
|
74
|
+
n && "bear-pr-10",
|
|
75
|
+
u.field,
|
|
76
|
+
s && "focus:bear-ring-0",
|
|
77
|
+
D
|
|
78
|
+
),
|
|
79
|
+
style: { ...K, ...G },
|
|
80
|
+
...k
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ m(
|
|
84
|
+
"label",
|
|
85
|
+
{
|
|
86
|
+
htmlFor: w,
|
|
87
|
+
className: e(
|
|
88
|
+
"Bear-FormField__label bear-absolute bear-left-0 bear-pointer-events-none bear-origin-top-left",
|
|
89
|
+
"bear-transition-all bear-duration-200 bear-select-none",
|
|
90
|
+
d ? "bear-ml-10" : "bear-ml-4",
|
|
91
|
+
v ? e(
|
|
92
|
+
f ? u.labelFloat : s ? "bear-top-0 bear--translate-y-1/2 bear-text-xs" : "bear-top-0 bear--translate-y-1/2 bear-text-xs bear-px-1 bear-bg-white dark:bear-bg-gray-900",
|
|
93
|
+
a ? "bear-text-red-500" : b ? "bear-text-green-500" : i ? "bear-text-bear-500 dark:bear-text-bear-400" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
94
|
+
) : e(
|
|
95
|
+
u.labelRest,
|
|
96
|
+
"bear--translate-y-1/2",
|
|
97
|
+
"bear-text-gray-500 dark:bear-text-gray-400"
|
|
98
|
+
),
|
|
99
|
+
g && "bear-opacity-50"
|
|
100
|
+
),
|
|
101
|
+
style: H,
|
|
102
|
+
children: [
|
|
103
|
+
z,
|
|
104
|
+
M && /* @__PURE__ */ t("span", { className: "bear-text-red-500 bear-ml-0.5", children: "*" })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
n && /* @__PURE__ */ t("div", { className: "Bear-FormField__addon Bear-FormField__addon--right bear-absolute bear-right-3 bear-z-10 bear-text-gray-500 dark:bear-text-gray-400", style: B, children: n })
|
|
109
|
+
] }),
|
|
110
|
+
C && /* @__PURE__ */ t(
|
|
111
|
+
"p",
|
|
112
|
+
{
|
|
113
|
+
className: e(
|
|
114
|
+
"Bear-FormField__helper bear-text-xs bear-ml-4",
|
|
115
|
+
a ? "bear-text-red-500" : b ? "bear-text-green-500" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
116
|
+
),
|
|
117
|
+
style: J,
|
|
118
|
+
children: C
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
A.displayName = "FormField";
|
|
125
|
+
export {
|
|
126
|
+
A as FormField
|
|
127
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface FormFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
+
/** Floating label text */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Helper text below the field */
|
|
6
|
+
helperText?: string;
|
|
7
|
+
/** Error message (replaces helperText, turns border red) */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Success message (turns border green) */
|
|
10
|
+
success?: string;
|
|
11
|
+
/** Field size */
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
/** Left addon inside the field */
|
|
14
|
+
leftAddon?: ReactNode;
|
|
15
|
+
/** Right addon inside the field */
|
|
16
|
+
rightAddon?: ReactNode;
|
|
17
|
+
/** Full width mode */
|
|
18
|
+
fullWidth?: boolean;
|
|
19
|
+
/** Whether the field is required (shows asterisk in label) */
|
|
20
|
+
required?: boolean;
|
|
21
|
+
/** Variant of the floating label */
|
|
22
|
+
variant?: 'outlined' | 'filled' | 'standard';
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),j=require("react"),b=require("../../utils/cn.cjs"),G=require("../../context/BearProvider.cjs"),m=require("./components/ClearIcon/ClearIcon.cjs"),H={sm:"bear-h-8 bear-text-sm bear-px-3",md:"bear-h-10 bear-text-base bear-px-4",lg:"bear-h-12 bear-text-lg bear-px-5"},N=j.forwardRef(({label:x,helperText:v,error:g,success:f,size:w="md",leftAddon:n,rightAddon:a,fullWidth:C=!1,clearable:q=!1,onClear:p,showCharCount:_=!1,charCountMax:M,className:R,disabled:l,value:i,defaultValue:c,maxLength:h,...O},P)=>{var k;const o=j.useContext(G.BearContext),e=(k=o==null?void 0:o.components)==null?void 0:k.Input,z=e==null?void 0:e.root,E=e==null?void 0:e.input,L=e==null?void 0:e.label,T=e==null?void 0:e.helper,D=e==null?void 0:e.prefix,y=e==null?void 0:e.suffix,t=!!g,I=!!f&&!t,s=M??h,u=typeof i=="string"?i.length:typeof c=="string"?c.length:0,F=s!=null&&u>s,d=q&&!l&&u>0,B=g||f||v;return r.jsxs("div",{className:b.cn("Bear-Input bear-flex bear-flex-col bear-gap-1.5",C&&"bear-w-full"),style:z,children:[x&&r.jsx("label",{className:"Bear-Input__label bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300",style:L,children:x}),r.jsxs("div",{className:"Bear-Input__wrapper bear-relative bear-flex bear-items-center",children:[n&&r.jsx("div",{className:"Bear-Input__addon Bear-Input__addon--left bear-absolute bear-left-3 bear-text-gray-500 dark:bear-text-gray-400",style:D,children:n}),r.jsx("input",{ref:P,disabled:l,value:i,defaultValue:c,maxLength:h,"aria-invalid":t||void 0,className:b.cn("Bear-Input__field","bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200","bear-bg-white bear-text-gray-900 placeholder:bear-text-gray-400","bear-border-gray-300 focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-white","dark:bear-bg-gray-800 dark:bear-text-white dark:placeholder:bear-text-gray-500 dark:bear-border-gray-600 dark:focus:bear-ring-offset-gray-900",t?"Bear-Input__field--error bear-border-red-500 focus:bear-ring-red-500":I?"Bear-Input__field--success bear-border-green-500 focus:bear-ring-green-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",l&&"Bear-Input__field--disabled bear-opacity-50 bear-cursor-not-allowed",n&&"bear-pl-10",(a||d)&&"bear-pr-10",H[w],R),style:E,...O}),d&&!a&&r.jsx("div",{className:"Bear-Input__addon Bear-Input__addon--right bear-absolute bear-right-3 bear-text-gray-500 dark:bear-text-gray-400",style:y,children:r.jsx(m.ClearIcon,{onClick:p})}),a&&r.jsxs("div",{className:"Bear-Input__addon Bear-Input__addon--right bear-absolute bear-right-3 bear-flex bear-items-center bear-gap-1.5 bear-text-gray-500 dark:bear-text-gray-400",style:y,children:[d&&r.jsx(m.ClearIcon,{onClick:p}),a]})]}),r.jsxs("div",{className:"Bear-Input__footer bear-flex bear-items-center bear-justify-between bear-gap-2",children:[B?r.jsx("p",{className:b.cn("Bear-Input__helper bear-text-sm bear-flex-1",t?"Bear-Input__helper--error bear-text-red-500":I?"Bear-Input__helper--success bear-text-green-500":"bear-text-gray-500 dark:bear-text-gray-400"),style:T,children:B}):_?r.jsx("span",{}):null,_&&s!=null&&r.jsxs("span",{className:b.cn("Bear-Input__char-count bear-text-xs bear-tabular-nums bear-shrink-0",F?"bear-text-red-500":"bear-text-gray-400 dark:bear-text-gray-500"),children:[u,"/",s]})]})]})});N.displayName="Input";exports.Input=N;
|
|
@@ -1,65 +1,102 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useContext as J } from "react";
|
|
3
|
+
import { cn as l } from "../../utils/cn.js";
|
|
4
|
+
import { BearContext as K } from "../../context/BearProvider.js";
|
|
5
|
+
import { ClearIcon as N } from "./components/ClearIcon/ClearIcon.js";
|
|
6
|
+
const P = {
|
|
5
7
|
sm: "bear-h-8 bear-text-sm bear-px-3",
|
|
6
8
|
md: "bear-h-10 bear-text-base bear-px-4",
|
|
7
9
|
lg: "bear-h-12 bear-text-lg bear-px-5"
|
|
8
|
-
},
|
|
10
|
+
}, Q = H(
|
|
9
11
|
({
|
|
10
|
-
label:
|
|
11
|
-
helperText:
|
|
12
|
-
error:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
label: p,
|
|
13
|
+
helperText: w,
|
|
14
|
+
error: g,
|
|
15
|
+
success: x,
|
|
16
|
+
size: v = "md",
|
|
17
|
+
leftAddon: n,
|
|
18
|
+
rightAddon: t,
|
|
19
|
+
fullWidth: C = !1,
|
|
20
|
+
clearable: j = !1,
|
|
21
|
+
onClear: _,
|
|
22
|
+
showCharCount: h = !1,
|
|
23
|
+
charCountMax: M,
|
|
24
|
+
className: z,
|
|
25
|
+
disabled: i,
|
|
26
|
+
value: o,
|
|
27
|
+
defaultValue: c,
|
|
28
|
+
maxLength: y,
|
|
29
|
+
...E
|
|
30
|
+
}, L) => {
|
|
31
|
+
var k;
|
|
32
|
+
const d = J(K), e = (k = d == null ? void 0 : d.components) == null ? void 0 : k.Input, O = e == null ? void 0 : e.root, R = e == null ? void 0 : e.input, q = e == null ? void 0 : e.label, D = e == null ? void 0 : e.helper, F = e == null ? void 0 : e.prefix, m = e == null ? void 0 : e.suffix, b = !!g, I = !!x && !b, s = M ?? y, u = typeof o == "string" ? o.length : typeof c == "string" ? c.length : 0, G = s != null && u > s, f = j && !i && u > 0, B = g || x || w;
|
|
33
|
+
return /* @__PURE__ */ a("div", { className: l("Bear-Input bear-flex bear-flex-col bear-gap-1.5", C && "bear-w-full"), style: O, children: [
|
|
34
|
+
p && /* @__PURE__ */ r("label", { className: "Bear-Input__label bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300", style: q, children: p }),
|
|
35
|
+
/* @__PURE__ */ a("div", { className: "Bear-Input__wrapper bear-relative bear-flex bear-items-center", children: [
|
|
36
|
+
n && /* @__PURE__ */ r("div", { className: "Bear-Input__addon Bear-Input__addon--left bear-absolute bear-left-3 bear-text-gray-500 dark:bear-text-gray-400", style: F, children: n }),
|
|
26
37
|
/* @__PURE__ */ r(
|
|
27
38
|
"input",
|
|
28
39
|
{
|
|
29
|
-
ref:
|
|
30
|
-
disabled:
|
|
31
|
-
|
|
40
|
+
ref: L,
|
|
41
|
+
disabled: i,
|
|
42
|
+
value: o,
|
|
43
|
+
defaultValue: c,
|
|
44
|
+
maxLength: y,
|
|
45
|
+
"aria-invalid": b || void 0,
|
|
46
|
+
className: l(
|
|
32
47
|
"Bear-Input__field",
|
|
33
48
|
"bear-w-full bear-rounded-lg bear-border bear-outline-none bear-transition-all bear-duration-200",
|
|
34
49
|
"bear-bg-white bear-text-gray-900 placeholder:bear-text-gray-400",
|
|
35
50
|
"bear-border-gray-300 focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-white",
|
|
36
51
|
"dark:bear-bg-gray-800 dark:bear-text-white dark:placeholder:bear-text-gray-500 dark:bear-border-gray-600 dark:focus:bear-ring-offset-gray-900",
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
b ? "Bear-Input__field--error bear-border-red-500 focus:bear-ring-red-500" : I ? "Bear-Input__field--success bear-border-green-500 focus:bear-ring-green-500" : "focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",
|
|
53
|
+
i && "Bear-Input__field--disabled bear-opacity-50 bear-cursor-not-allowed",
|
|
54
|
+
n && "bear-pl-10",
|
|
55
|
+
(t || f) && "bear-pr-10",
|
|
56
|
+
P[v],
|
|
57
|
+
z
|
|
43
58
|
),
|
|
44
|
-
|
|
59
|
+
style: R,
|
|
60
|
+
...E
|
|
45
61
|
}
|
|
46
62
|
),
|
|
47
|
-
|
|
63
|
+
f && !t && /* @__PURE__ */ r("div", { className: "Bear-Input__addon Bear-Input__addon--right bear-absolute bear-right-3 bear-text-gray-500 dark:bear-text-gray-400", style: m, children: /* @__PURE__ */ r(N, { onClick: _ }) }),
|
|
64
|
+
t && /* @__PURE__ */ a("div", { className: "Bear-Input__addon Bear-Input__addon--right bear-absolute bear-right-3 bear-flex bear-items-center bear-gap-1.5 bear-text-gray-500 dark:bear-text-gray-400", style: m, children: [
|
|
65
|
+
f && /* @__PURE__ */ r(N, { onClick: _ }),
|
|
66
|
+
t
|
|
67
|
+
] })
|
|
48
68
|
] }),
|
|
49
|
-
(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
/* @__PURE__ */ a("div", { className: "Bear-Input__footer bear-flex bear-items-center bear-justify-between bear-gap-2", children: [
|
|
70
|
+
B ? /* @__PURE__ */ r(
|
|
71
|
+
"p",
|
|
72
|
+
{
|
|
73
|
+
className: l(
|
|
74
|
+
"Bear-Input__helper bear-text-sm bear-flex-1",
|
|
75
|
+
b ? "Bear-Input__helper--error bear-text-red-500" : I ? "Bear-Input__helper--success bear-text-green-500" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
76
|
+
),
|
|
77
|
+
style: D,
|
|
78
|
+
children: B
|
|
79
|
+
}
|
|
80
|
+
) : h ? /* @__PURE__ */ r("span", {}) : null,
|
|
81
|
+
h && s != null && /* @__PURE__ */ a(
|
|
82
|
+
"span",
|
|
83
|
+
{
|
|
84
|
+
className: l(
|
|
85
|
+
"Bear-Input__char-count bear-text-xs bear-tabular-nums bear-shrink-0",
|
|
86
|
+
G ? "bear-text-red-500" : "bear-text-gray-400 dark:bear-text-gray-500"
|
|
87
|
+
),
|
|
88
|
+
children: [
|
|
89
|
+
u,
|
|
90
|
+
"/",
|
|
91
|
+
s
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] })
|
|
59
96
|
] });
|
|
60
97
|
}
|
|
61
98
|
);
|
|
62
|
-
|
|
99
|
+
Q.displayName = "Input";
|
|
63
100
|
export {
|
|
64
|
-
|
|
101
|
+
Q as Input
|
|
65
102
|
};
|
|
@@ -6,6 +6,8 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
6
6
|
helperText?: string;
|
|
7
7
|
/** Error message */
|
|
8
8
|
error?: string;
|
|
9
|
+
/** Success message (green helper text) */
|
|
10
|
+
success?: string;
|
|
9
11
|
/** Input size */
|
|
10
12
|
size?: 'sm' | 'md' | 'lg';
|
|
11
13
|
/** Left addon */
|
|
@@ -14,4 +16,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
14
16
|
rightAddon?: ReactNode;
|
|
15
17
|
/** Whether input is full width */
|
|
16
18
|
fullWidth?: boolean;
|
|
19
|
+
/** Show a clear (X) button when input has value */
|
|
20
|
+
clearable?: boolean;
|
|
21
|
+
/** Callback when clear button is clicked */
|
|
22
|
+
onClear?: () => void;
|
|
23
|
+
/** Show live character count (requires maxLength or charCountMax) */
|
|
24
|
+
showCharCount?: boolean;
|
|
25
|
+
/** Max chars for counter display (alternative to maxLength when you don't want native enforcement) */
|
|
26
|
+
charCountMax?: number;
|
|
17
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("../../../../utils/cn.cjs");require("react");const t=({className:r,onClick:a})=>e.jsx("button",{type:"button",tabIndex:-1,onClick:a,className:n.cn("Bear-Input__clear bear-inline-flex bear-items-center bear-justify-center","bear-rounded-full bear-w-4 bear-h-4 bear-bg-gray-300 dark:bear-bg-gray-600","hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500 bear-transition-colors bear-cursor-pointer",r),"aria-label":"Clear input",children:e.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[e.jsx("line",{x1:"1",y1:"1",x2:"7",y2:"7"}),e.jsx("line",{x1:"7",y1:"1",x2:"1",y2:"7"})]})});exports.ClearIcon=t;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as o } from "../../../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
const l = ({ className: e, onClick: a }) => /* @__PURE__ */ r(
|
|
5
|
+
"button",
|
|
6
|
+
{
|
|
7
|
+
type: "button",
|
|
8
|
+
tabIndex: -1,
|
|
9
|
+
onClick: a,
|
|
10
|
+
className: o(
|
|
11
|
+
"Bear-Input__clear bear-inline-flex bear-items-center bear-justify-center",
|
|
12
|
+
"bear-rounded-full bear-w-4 bear-h-4 bear-bg-gray-300 dark:bear-bg-gray-600",
|
|
13
|
+
"hover:bear-bg-gray-400 dark:hover:bear-bg-gray-500 bear-transition-colors bear-cursor-pointer",
|
|
14
|
+
e
|
|
15
|
+
),
|
|
16
|
+
"aria-label": "Clear input",
|
|
17
|
+
children: /* @__PURE__ */ t("svg", { width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: [
|
|
18
|
+
/* @__PURE__ */ r("line", { x1: "1", y1: "1", x2: "7", y2: "7" }),
|
|
19
|
+
/* @__PURE__ */ r("line", { x1: "7", y1: "1", x2: "1", y2: "7" })
|
|
20
|
+
] })
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
l as ClearIcon
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ClearIcon } from './ClearIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/cn.cjs");require("react");const r=require("../Typography/Typography.cjs"),y=({label:a,description:t,error:n,helperText:u,required:p=!1,fullWidth:c=!1,children:i,className:d,htmlFor:b,testId:x})=>{const s=!!n,o=n||u;return e.jsxs("div",{className:l.cn("Bear-InputGroup bear-flex bear-flex-col bear-gap-1.5",c&&"bear-w-full",d),"data-testid":x,children:[a&&e.jsx("label",{htmlFor:b,className:"Bear-InputGroup__label",children:e.jsxs(r.Typography,{variant:"body2",className:"bear-font-medium bear-text-gray-700 dark:bear-text-gray-300",inline:!0,children:[a,p&&e.jsx("span",{className:"Bear-InputGroup__required bear-text-red-500 bear-ml-0.5","aria-hidden":"true",children:"*"})]})}),t&&e.jsx(r.Typography,{variant:"caption",className:"Bear-InputGroup__description bear-text-gray-500 dark:bear-text-gray-400",children:t}),e.jsx("div",{className:"Bear-InputGroup__content",children:i}),o&&e.jsx(r.Typography,{variant:"body2",className:l.cn("Bear-InputGroup__helper",s?"bear-text-red-500":"bear-text-gray-500 dark:bear-text-gray-400"),role:s?"alert":void 0,children:o})]})};exports.InputGroup=y;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as p } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Typography as r } from "../Typography/Typography.js";
|
|
5
|
+
const g = ({
|
|
6
|
+
label: a,
|
|
7
|
+
description: t,
|
|
8
|
+
error: n,
|
|
9
|
+
helperText: i,
|
|
10
|
+
required: d = !1,
|
|
11
|
+
fullWidth: c = !1,
|
|
12
|
+
children: u,
|
|
13
|
+
className: b,
|
|
14
|
+
htmlFor: m,
|
|
15
|
+
testId: x
|
|
16
|
+
}) => {
|
|
17
|
+
const o = !!n, l = n || i;
|
|
18
|
+
return /* @__PURE__ */ s(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: p("Bear-InputGroup bear-flex bear-flex-col bear-gap-1.5", c && "bear-w-full", b),
|
|
22
|
+
"data-testid": x,
|
|
23
|
+
children: [
|
|
24
|
+
a && /* @__PURE__ */ e("label", { htmlFor: m, className: "Bear-InputGroup__label", children: /* @__PURE__ */ s(
|
|
25
|
+
r,
|
|
26
|
+
{
|
|
27
|
+
variant: "body2",
|
|
28
|
+
className: "bear-font-medium bear-text-gray-700 dark:bear-text-gray-300",
|
|
29
|
+
inline: !0,
|
|
30
|
+
children: [
|
|
31
|
+
a,
|
|
32
|
+
d && /* @__PURE__ */ e("span", { className: "Bear-InputGroup__required bear-text-red-500 bear-ml-0.5", "aria-hidden": "true", children: "*" })
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
) }),
|
|
36
|
+
t && /* @__PURE__ */ e(
|
|
37
|
+
r,
|
|
38
|
+
{
|
|
39
|
+
variant: "caption",
|
|
40
|
+
className: "Bear-InputGroup__description bear-text-gray-500 dark:bear-text-gray-400",
|
|
41
|
+
children: t
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ e("div", { className: "Bear-InputGroup__content", children: u }),
|
|
45
|
+
l && /* @__PURE__ */ e(
|
|
46
|
+
r,
|
|
47
|
+
{
|
|
48
|
+
variant: "body2",
|
|
49
|
+
className: p(
|
|
50
|
+
"Bear-InputGroup__helper",
|
|
51
|
+
o ? "bear-text-red-500" : "bear-text-gray-500 dark:bear-text-gray-400"
|
|
52
|
+
),
|
|
53
|
+
role: o ? "alert" : void 0,
|
|
54
|
+
children: l
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
g as InputGroup
|
|
63
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface InputGroupProps {
|
|
3
|
+
/** Group label */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Description text (below label, above input) */
|
|
6
|
+
description?: string;
|
|
7
|
+
/** Error message (overrides helperText styling) */
|
|
8
|
+
error?: string;
|
|
9
|
+
/** Helper text (below input) */
|
|
10
|
+
helperText?: string;
|
|
11
|
+
/** Whether the field is required (shows asterisk) */
|
|
12
|
+
required?: boolean;
|
|
13
|
+
/** Whether the group takes full width */
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
/** The input element(s) */
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/** Additional class name */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** HTML for attribute linking label to input */
|
|
20
|
+
htmlFor?: string;
|
|
21
|
+
/** Test ID */
|
|
22
|
+
testId?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),L=require("../Input/Input.cjs"),i=require("../Icon/icons/action.cjs"),_=b.cn("Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5","bear-rounded bear-bg-amber-100 bear-text-amber-700","dark:bear-bg-amber-900/40 dark:bear-text-amber-400","bear-select-none bear-whitespace-nowrap"),S=({visible:t,onVisibilityChange:a,hideToggle:d=!1,toggleAriaLabel:u="Toggle password visibility",showShiftIndicator:n=!1,visibleIcon:l,hiddenIcon:p,...w})=>{const[x,m]=s.useState(!1),[f,I]=s.useState(!1),o=t!==void 0,c=o?t:x,g=s.useCallback(()=>{o?a==null||a(!t):m(e=>!e)},[o,t,a]);s.useEffect(()=>{if(!n)return;const e=j=>I(j.getModifierState("CapsLock"));return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}},[n]);const v=r.jsx(i.VisibilityOffIcon,{className:"bear-w-4 bear-h-4"}),k=r.jsx(i.VisibilityIcon,{className:"bear-w-4 bear-h-4"}),y=d?void 0:r.jsxs("span",{className:"Bear-PasswordInput__actions bear-inline-flex bear-items-center bear-gap-1.5",children:[n&&f&&r.jsx("span",{className:_,children:"Caps"}),r.jsx("button",{type:"button",tabIndex:-1,onClick:g,className:b.cn("Bear-PasswordInput__toggle bear-inline-flex bear-items-center bear-justify-center","bear-text-gray-400 hover:bear-text-gray-600 dark:hover:bear-text-gray-300","bear-transition-colors bear-cursor-pointer"),"aria-label":u,children:c?l??v:p??k})]});return r.jsx(L.Input,{type:c?"text":"password",rightAddon:y,autoComplete:"current-password",...w})};exports.PasswordInput=S;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsxs as L, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useCallback as _, useEffect as E } from "react";
|
|
3
|
+
import { cn as c } from "../../utils/cn.js";
|
|
4
|
+
import { Input as N } from "../Input/Input.js";
|
|
5
|
+
import { VisibilityOffIcon as B, VisibilityIcon as C } from "../Icon/icons/action.js";
|
|
6
|
+
const O = c(
|
|
7
|
+
"Bear-PasswordInput__shift bear-text-xs bear-font-medium bear-px-1.5 bear-py-0.5",
|
|
8
|
+
"bear-rounded bear-bg-amber-100 bear-text-amber-700",
|
|
9
|
+
"dark:bear-bg-amber-900/40 dark:bear-text-amber-400",
|
|
10
|
+
"bear-select-none bear-whitespace-nowrap"
|
|
11
|
+
), A = ({
|
|
12
|
+
visible: a,
|
|
13
|
+
onVisibilityChange: t,
|
|
14
|
+
hideToggle: i = !1,
|
|
15
|
+
toggleAriaLabel: d = "Toggle password visibility",
|
|
16
|
+
showShiftIndicator: s = !1,
|
|
17
|
+
visibleIcon: l,
|
|
18
|
+
hiddenIcon: p,
|
|
19
|
+
...m
|
|
20
|
+
}) => {
|
|
21
|
+
const [u, f] = b(!1), [w, x] = b(!1), n = a !== void 0, o = n ? a : u, k = _(() => {
|
|
22
|
+
n ? t == null || t(!a) : f((e) => !e);
|
|
23
|
+
}, [n, a, t]);
|
|
24
|
+
E(() => {
|
|
25
|
+
if (!s) return;
|
|
26
|
+
const e = (y) => x(y.getModifierState("CapsLock"));
|
|
27
|
+
return window.addEventListener("keydown", e), window.addEventListener("keyup", e), () => {
|
|
28
|
+
window.removeEventListener("keydown", e), window.removeEventListener("keyup", e);
|
|
29
|
+
};
|
|
30
|
+
}, [s]);
|
|
31
|
+
const v = /* @__PURE__ */ r(B, { className: "bear-w-4 bear-h-4" }), I = /* @__PURE__ */ r(C, { className: "bear-w-4 bear-h-4" }), g = i ? void 0 : /* @__PURE__ */ L("span", { className: "Bear-PasswordInput__actions bear-inline-flex bear-items-center bear-gap-1.5", children: [
|
|
32
|
+
s && w && /* @__PURE__ */ r("span", { className: O, children: "Caps" }),
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
"button",
|
|
35
|
+
{
|
|
36
|
+
type: "button",
|
|
37
|
+
tabIndex: -1,
|
|
38
|
+
onClick: k,
|
|
39
|
+
className: c(
|
|
40
|
+
"Bear-PasswordInput__toggle bear-inline-flex bear-items-center bear-justify-center",
|
|
41
|
+
"bear-text-gray-400 hover:bear-text-gray-600 dark:hover:bear-text-gray-300",
|
|
42
|
+
"bear-transition-colors bear-cursor-pointer"
|
|
43
|
+
),
|
|
44
|
+
"aria-label": d,
|
|
45
|
+
children: o ? l ?? v : p ?? I
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
return /* @__PURE__ */ r(
|
|
50
|
+
N,
|
|
51
|
+
{
|
|
52
|
+
type: o ? "text" : "password",
|
|
53
|
+
rightAddon: g,
|
|
54
|
+
autoComplete: "current-password",
|
|
55
|
+
...m
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
A as PasswordInput
|
|
61
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { InputProps } from '../Input/Input.types';
|
|
3
|
+
export interface PasswordInputProps extends Omit<InputProps, 'type' | 'rightAddon'> {
|
|
4
|
+
/** Whether password is currently visible */
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
/** Controlled visibility toggle */
|
|
7
|
+
onVisibilityChange?: (visible: boolean) => void;
|
|
8
|
+
/** Hide the toggle button entirely */
|
|
9
|
+
hideToggle?: boolean;
|
|
10
|
+
/** Aria label for the toggle button */
|
|
11
|
+
toggleAriaLabel?: string;
|
|
12
|
+
/** Show Caps Lock / Shift indicator when active */
|
|
13
|
+
showShiftIndicator?: boolean;
|
|
14
|
+
/** Custom icon for "visible" state (replaces default VisibilityOffIcon) */
|
|
15
|
+
visibleIcon?: ReactNode;
|
|
16
|
+
/** Custom icon for "hidden" state (replaces default VisibilityIcon) */
|
|
17
|
+
hiddenIcon?: ReactNode;
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),d=require("../../utils/cn.cjs"),j=require("./ResizableTextarea.const.cjs"),I=({label:f,helperText:v,error:u,minHeight:r=j.DEFAULT_MIN_HEIGHT,maxHeight:n=j.DEFAULT_MAX_HEIGHT,resizable:s=!0,showCharCount:p=!1,charCountMax:k,className:E,style:L,testId:N,...a})=>{const x=!!u,l=k??a.maxLength,y=typeof a.value=="string"?a.value.length:typeof a.defaultValue=="string"?a.defaultValue.length:0,z=l!=null&&y>l,B=i.useRef(null),[g,M]=i.useState(r),h=i.useRef(0),m=i.useRef(r),D=i.useCallback(t=>{var w,T;if(!s)return;t.preventDefault(),h.current=t.clientY,m.current=g,(T=(w=t.target).setPointerCapture)==null||T.call(w,t.pointerId);const R=b=>{const c=b.clientY-h.current;let o=m.current+c;r>0&&(o=Math.max(r,o)),n>0&&(o=Math.min(n,o)),M(o)},_=()=>{var b,c;(c=(b=t.target).releasePointerCapture)==null||c.call(b,t.pointerId),window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",_)};window.addEventListener("pointermove",R),window.addEventListener("pointerup",_)},[s,g,r,n]);return e.jsxs("div",{className:d.cn("Bear-ResizableTextarea bear-flex bear-flex-col bear-gap-1.5",E),"data-testid":N,children:[f&&e.jsx("label",{className:"Bear-ResizableTextarea__label bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300",children:f}),e.jsxs("div",{className:"bear-relative",children:[e.jsx("textarea",{ref:B,"aria-invalid":x||void 0,className:d.cn("bear-w-full bear-rounded-lg bear-border","bear-bg-white dark:bear-bg-gray-900 bear-text-gray-900 dark:bear-text-gray-100","bear-p-3 bear-resize-none focus:bear-outline-none focus:bear-ring-2",x?"bear-border-red-500 focus:bear-ring-red-500":"bear-border-gray-300 dark:bear-border-gray-600 focus:bear-ring-pink-500/50"),style:{...L,minHeight:s?r:void 0,height:s?g:void 0,maxHeight:n>0?n:void 0},...a}),s&&e.jsx("div",{role:"separator",onPointerDown:D,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",style:{background:"linear-gradient(135deg, transparent 50%, currentColor 50%)"}})]}),e.jsxs("div",{className:"Bear-ResizableTextarea__footer bear-flex bear-items-center bear-justify-between bear-gap-2",children:[v||u?e.jsx("p",{className:d.cn("Bear-ResizableTextarea__helper bear-text-sm bear-flex-1",x?"bear-text-red-500":"bear-text-gray-500 dark:bear-text-gray-400"),children:u||v}):p?e.jsx("span",{}):null,p&&l!=null&&e.jsxs("span",{className:d.cn("Bear-ResizableTextarea__char-count bear-text-xs bear-tabular-nums bear-shrink-0",z?"bear-text-red-500":"bear-text-gray-400 dark:bear-text-gray-500"),children:[y,"/",l]})]})]})};exports.ResizableTextarea=I;
|