UNPKG

@mankindui/core

Version:

- a react component library - you can see how @mankindui/core can be used via examples: [usage examples](https://github.com/clarklindev/mankindui-test)

71 lines (70 loc) 1.61 kB
import { j as s } from "../../_virtual/jsx-runtime.js"; import { forwardRef as i } from "react"; import { cva as f } from "../../node_modules/class-variance-authority/dist/index.js"; import { twMerge as d } from "../../node_modules/tailwind-merge/dist/bundle-mjs.js"; const c = f( `items-center box-border cursor-text focus:outline-none border-none rounded-md h-12 max-h-12 px-2 gap-2 overflow-hidden`, { variants: { variant: { default: `border border-solid flex items-center border border-gray-400/50 `, unstyled: `bg-transparent border-0 border-transparent px-0 rounded-none` } }, defaultVariants: { variant: "default" } } ), a = ({ className: t, variants: r, children: n, ...o }) => { const e = d(c({ ...r }), t); return /* @__PURE__ */ s.jsx("div", { "data-component": a.displayName, className: e, ...o, children: n }); }, u = i(({ onChange: t, value: r, placeholder: n = "", className: o, readOnly: e = !1, type: l = "text", ...p }, m) => /* @__PURE__ */ s.jsx( "input", { ref: m, type: l, onChange: t, value: r, placeholder: n, readOnly: e, className: d( `border-none focus:outline-none flex h-full w-full bg-transparent`, e && `text-neutral-300 cursor-default select-none `, o ), ...p } )); u.displayName = "Input.InputElement"; a.InputElement = u; a.displayName = "Input"; export { a as Input }; //# sourceMappingURL=index.js.map