geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
47 lines (46 loc) • 1.69 kB
JavaScript
import * as e from "react";
import { OTPInput as l, OTPInputContext as u } from "input-otp";
import { Dot as f } from "lucide-react";
import { cn as n } from "./index.es79.js";
import { OTPInputVariants as d } from "./index.es142.js";
const O = e.forwardRef(({ className: t, containerClassName: a, ...r }, o) => /* @__PURE__ */ e.createElement(
l,
{
ref: o,
containerClassName: n("flex items-center gap-3", a),
className: n(t),
...r,
inputMode: "text"
}
));
O.displayName = "InputOTP";
const P = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement("div", { ref: r, className: n("flex items-center", t), ...a }));
P.displayName = "InputOTPGroup";
const T = e.forwardRef(
({ index: t, className: a, isError: r, ...o }, s) => {
const m = e.useContext(u), { char: p, hasFakeCaret: c, isActive: i } = m.slots[t];
return /* @__PURE__ */ e.createElement(
"div",
{
ref: s,
className: n(
d({ isError: r, isFocused: i }),
a
),
...o
},
p,
c && /* @__PURE__ */ e.createElement("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center" }, /* @__PURE__ */ e.createElement("div", { className: "h-4 w-px animate-caret-blink bg-black duration-1000" }))
);
}
);
T.displayName = "InputOTPSlot";
const I = e.forwardRef(({ ...t }, a) => /* @__PURE__ */ e.createElement("div", { ref: a, role: "separator", ...t }, /* @__PURE__ */ e.createElement(f, null)));
I.displayName = "InputOTPSeparator";
export {
O as InputOTP,
P as InputOTPGroup,
I as InputOTPSeparator,
T as InputOTPSlot
};
//# sourceMappingURL=index.es122.js.map