UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

51 lines (50 loc) 1.68 kB
import * as e from "react"; import { cn as u } from "./index.es79.js"; import { Typography as n } from "./index.es17.js"; import "lucide-react"; import "./index.es52.js"; import "./index.es80.js"; import "./index.es26.js"; import "./index.es32.js"; import "react-konva"; import { TextAreaVariants as m } from "./index.es107.js"; const p = e.forwardRef( ({ className: o, inputLabel: i, showTextCount: l, maximumTextCount: a, id: d, ...t }, f) => { const [r, s] = e.useState(!1), c = e.useRef(null); return e.useEffect(() => { r && c.current?.focus(); }, [r]), /* @__PURE__ */ e.createElement("div", { id: d }, i && /* @__PURE__ */ e.createElement(n, { variant: "body4", className: "text-light-3" }, i), /* @__PURE__ */ e.createElement( "textarea", { className: u( "flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", o, m({ isFocused: r, disabled: t.disabled, className: o }) ), onFocus: () => s(!0), onBlur: () => s(!1), ref: f, maxLength: a, ...t } ), l && /* @__PURE__ */ e.createElement( n, { variant: "body4", className: "text-light-4 mt-1.5 flex justify-end" }, t.value?.toString().length, "/", a )); } ); p.displayName = "Textarea"; export { p as Textarea }; //# sourceMappingURL=index.es14.js.map