@egose/shadcn-theme 0.0.2 → 0.0.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/{chunk-44EDWDHY.js → chunk-2N2ED2H7.js} +3 -2
- package/chunk-2N2ED2H7.js.map +1 -0
- package/{chunk-7M4CHPRA.mjs → chunk-BBQHZ4QS.mjs} +2 -1
- package/chunk-BBQHZ4QS.mjs.map +1 -0
- package/{chunk-KW4OLCGW.js → chunk-CX43H4PD.js} +3 -2
- package/chunk-CX43H4PD.js.map +1 -0
- package/{chunk-LT3WL2W3.js → chunk-JI377F6F.js} +4 -3
- package/chunk-JI377F6F.js.map +1 -0
- package/{chunk-VXIIBN2D.mjs → chunk-LKETVFHL.mjs} +2 -1
- package/chunk-LKETVFHL.mjs.map +1 -0
- package/{chunk-7OK7ZIDG.mjs → chunk-U2WALG7C.mjs} +2 -1
- package/chunk-U2WALG7C.mjs.map +1 -0
- package/components/form/FormError.d.mts +2 -2
- package/components/form/FormError.d.ts +2 -2
- package/components/form/FormError.js +2 -2
- package/components/form/FormError.mjs +1 -1
- package/components/form/FormTextInput.d.mts +2 -3
- package/components/form/FormTextInput.d.ts +2 -3
- package/components/form/FormTextInput.js +2 -2
- package/components/form/FormTextInput.mjs +1 -1
- package/components/form/FormTextarea.d.mts +2 -3
- package/components/form/FormTextarea.d.ts +2 -3
- package/components/form/FormTextarea.js +2 -2
- package/components/form/FormTextarea.mjs +1 -1
- package/components/form/HookFormTextInput.d.mts +2 -2
- package/components/form/HookFormTextInput.d.ts +2 -2
- package/components/form/HookFormTextInput.js +6 -5
- package/components/form/HookFormTextInput.js.map +1 -1
- package/components/form/HookFormTextInput.mjs +3 -2
- package/components/form/HookFormTextInput.mjs.map +1 -1
- package/components/form/HookFormTextarea.d.mts +2 -2
- package/components/form/HookFormTextarea.d.ts +2 -2
- package/components/form/HookFormTextarea.js +6 -5
- package/components/form/HookFormTextarea.js.map +1 -1
- package/components/form/HookFormTextarea.mjs +3 -2
- package/components/form/HookFormTextarea.mjs.map +1 -1
- package/package.json +1 -1
- package/chunk-44EDWDHY.js.map +0 -1
- package/chunk-7M4CHPRA.mjs.map +0 -1
- package/chunk-7OK7ZIDG.mjs.map +0 -1
- package/chunk-KW4OLCGW.js.map +0 -1
- package/chunk-LT3WL2W3.js.map +0 -1
- package/chunk-VXIIBN2D.mjs.map +0 -1
|
@@ -14,6 +14,7 @@ var _chunkB2G2EZ4Pjs = require('./chunk-B2G2EZ4P.js');
|
|
|
14
14
|
var _chunk2NMEKWO5js = require('./chunk-2NMEKWO5.js');
|
|
15
15
|
|
|
16
16
|
// components/form/FormTextInput.tsx
|
|
17
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
17
18
|
var _kebabCase2 = require('lodash-es/kebabCase'); var _kebabCase3 = _interopRequireDefault(_kebabCase2);
|
|
18
19
|
var inputClass = "";
|
|
19
20
|
function TextInput(_a) {
|
|
@@ -37,7 +38,7 @@ function TextInput(_a) {
|
|
|
37
38
|
"inputProps"
|
|
38
39
|
]);
|
|
39
40
|
if (!id) id = _kebabCase3.default.call(void 0, name);
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: _chunkB2G2EZ4Pjs.cn.call(void 0, "text-input", classNames == null ? void 0 : classNames.wrapper) }, label && /* @__PURE__ */ _react2.default.createElement(_chunkAXZDZXCYjs.Label, { htmlFor: id, className: classNames == null ? void 0 : classNames.label, required }, label), /* @__PURE__ */ _react2.default.createElement(
|
|
41
42
|
_chunkGJJM336Njs.Input,
|
|
42
43
|
_chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {
|
|
43
44
|
type,
|
|
@@ -54,4 +55,4 @@ function TextInput(_a) {
|
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
exports.TextInput = TextInput;
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-2N2ED2H7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-2N2ED2H7.js","../components/form/FormTextInput.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACbA,4EAAkB;AAClB,wGAAuB;AAQvB,IAAM,WAAA,EAAa,EAAA;AAcJ,SAAR,SAAA,CAA2B,EAAA,EAUX;AAVW,EAAA,IAAA,GAAA,EAAA,EAAA,EAChC;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,EAAO,MAAA;AAAA,IACP,UAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA,EAAa,CAAC;AAAA,EAjChB,EAAA,EAyBkC,EAAA,EAS7B,OAAA,EAAA,wCAAA,EAT6B,EAS7B;AAAA,IARH,IAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EAAA,CAAA,CAAA;AAGA,EAAA,GAAA,CAAI,CAAC,EAAA,EAAI,GAAA,EAAK,iCAAA,IAAe,CAAA;AAE7B,EAAA,uBACE,eAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,iCAAA,YAAG,EAAc,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,OAAO,EAAA,CAAA,EACjD,MAAA,mBACC,eAAA,CAAA,aAAA,CAAC,sBAAA,EAAA,EAAM,OAAA,EAAS,EAAA,EAAI,SAAA,EAAW,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO,SAAA,CAAA,EAC/C,KACH,CAAA,kBAEF,eAAA,CAAA,aAAA;AAAA,IAAC,sBAAA;AAAA,IAAA,4CAAA,6CAAA,6CAAA;AAAA,MACC,IAAA;AAAA,MACA,EAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA,EAAa;AAAA,IAAA,CAAA,EACT,UAAA,CAAA,EACA,MAAA,CAAA,EAPL;AAAA,MAQC,SAAA,EAAW,iCAAA,UAAG,EAAY,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAK;AAAA,IAAA,CAAA;AAAA,EAC7C,CACF,CAAA;AAEJ;ADJA;AACA;AACE;AACF,8BAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-2N2ED2H7.js","sourcesContent":[null,"'use client';\n\nimport React from 'react';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { InputHTMLAttributes } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Input } from '../ui/input';\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextInputProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps;\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function TextInput({\n id,\n name,\n label,\n type = 'text',\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextInputProps) {\n if (!id) id = _kebabCase(name);\n\n return (\n <div className={cn('text-input', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"]}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-YOSPWY5K.mjs";
|
|
15
15
|
|
|
16
16
|
// components/form/FormTextInput.tsx
|
|
17
|
+
import React from "react";
|
|
17
18
|
import _kebabCase from "lodash-es/kebabCase";
|
|
18
19
|
var inputClass = "";
|
|
19
20
|
function TextInput(_a) {
|
|
@@ -54,4 +55,4 @@ function TextInput(_a) {
|
|
|
54
55
|
export {
|
|
55
56
|
TextInput
|
|
56
57
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
58
|
+
//# sourceMappingURL=chunk-BBQHZ4QS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../components/form/FormTextInput.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { InputHTMLAttributes } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Input } from '../ui/input';\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextInputProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps;\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function TextInput({\n id,\n name,\n label,\n type = 'text',\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextInputProps) {\n if (!id) id = _kebabCase(name);\n\n return (\n <div className={cn('text-input', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,OAAO,gBAAgB;AAQvB,IAAM,aAAa;AAcJ,SAAR,UAA2B,IAUX;AAVW,eAChC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,CAAC;AAAA,EAjChB,IAyBkC,IAS7B,mBAT6B,IAS7B;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,MAAI,CAAC,GAAI,MAAK,WAAW,IAAI;AAE7B,SACE,oCAAC,SAAI,WAAW,GAAG,cAAc,yCAAY,OAAO,KACjD,SACC,oCAAC,SAAM,SAAS,IAAI,WAAW,yCAAY,OAAO,YAC/C,KACH,GAEF;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAa;AAAA,OACT,aACA,SAPL;AAAA,MAQC,WAAW,GAAG,YAAY,yCAAY,KAAK;AAAA;AAAA,EAC7C,CACF;AAEJ;","names":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _chunkB2G2EZ4Pjs = require('./chunk-B2G2EZ4P.js');
|
|
4
4
|
|
|
5
5
|
// components/form/FormError.tsx
|
|
6
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
6
7
|
var _get2 = require('lodash-es/get'); var _get3 = _interopRequireDefault(_get2);
|
|
7
8
|
var _reacthookform = require('react-hook-form');
|
|
8
9
|
function FormError({
|
|
@@ -15,10 +16,10 @@ function FormError({
|
|
|
15
16
|
} = _reacthookform.useFormContext.call(void 0, );
|
|
16
17
|
const fieldError = _get3.default.call(void 0, errors, field);
|
|
17
18
|
if (!fieldError) return null;
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: _chunkB2G2EZ4Pjs.cn.call(void 0, "text-sm text-danger mb-2", className) }, message || String(fieldError.message));
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
exports.FormError = FormError;
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-CX43H4PD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-CX43H4PD.js","../components/form/FormError.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACJA,4EAAkB;AAClB,gFAAiB;AAEjB,gDAA+B;AAGhB,SAAR,SAAA,CAA2B;AAAA,EAChC,KAAA;AAAA,EACA,UAAA,EAAY,EAAA;AAAA,EACZ,QAAA,EAAU;AACZ,CAAA,EAIG;AACD,EAAA,MAAM;AAAA,IACJ,SAAA,EAAW,EAAE,OAAO;AAAA,EACtB,EAAA,EAAI,2CAAA,CAAe;AAEnB,EAAA,MAAM,WAAA,EAAa,2BAAA,MAAK,EAAQ,KAAK,CAAA;AACrC,EAAA,GAAA,CAAI,CAAC,UAAA,EAAY,OAAO,IAAA;AACxB,EAAA,uBAAO,eAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,iCAAA,0BAAG,EAA4B,SAAS,EAAA,CAAA,EAAI,QAAA,GAAW,MAAA,CAAO,UAAA,CAAW,OAAO,CAAE,CAAA;AAC3G;ADFA;AACA;AACE;AACF,8BAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-CX43H4PD.js","sourcesContent":[null,"import React from 'react';\nimport _get from 'lodash-es/get';\nimport _startCase from 'lodash-es/startCase';\nimport { useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\n\nexport default function FormError({\n field,\n className = '',\n message = '',\n}: {\n field: string;\n className?: string;\n message?: string;\n}) {\n const {\n formState: { errors },\n } = useFormContext();\n\n const fieldError = _get(errors, field);\n if (!fieldError) return null;\n return <div className={cn('text-sm text-danger mb-2', className)}>{message || String(fieldError.message)}</div>;\n}\n"]}
|
|
@@ -14,9 +14,10 @@ var _chunkB2G2EZ4Pjs = require('./chunk-B2G2EZ4P.js');
|
|
|
14
14
|
var _chunk2NMEKWO5js = require('./chunk-2NMEKWO5.js');
|
|
15
15
|
|
|
16
16
|
// components/form/FormTextarea.tsx
|
|
17
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
17
18
|
var _isFunction2 = require('lodash-es/isFunction'); var _isFunction3 = _interopRequireDefault(_isFunction2);
|
|
18
19
|
var _kebabCase2 = require('lodash-es/kebabCase'); var _kebabCase3 = _interopRequireDefault(_kebabCase2);
|
|
19
|
-
|
|
20
|
+
|
|
20
21
|
var inputClass = "";
|
|
21
22
|
function FormTextarea(_a) {
|
|
22
23
|
var _b = _a, {
|
|
@@ -40,7 +41,7 @@ function FormTextarea(_a) {
|
|
|
40
41
|
]);
|
|
41
42
|
if (!id) id = _kebabCase3.default.call(void 0, name);
|
|
42
43
|
const _ref = _react.useRef.call(void 0, null);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: _chunkB2G2EZ4Pjs.cn.call(void 0, "textarea", classNames == null ? void 0 : classNames.wrapper) }, label && /* @__PURE__ */ _react2.default.createElement(_chunkAXZDZXCYjs.Label, { htmlFor: id, className: classNames == null ? void 0 : classNames.label, required }, label), /* @__PURE__ */ _react2.default.createElement(
|
|
44
45
|
_chunkIQP24H6Djs.Textarea,
|
|
45
46
|
_chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {
|
|
46
47
|
id,
|
|
@@ -68,4 +69,4 @@ function FormTextarea(_a) {
|
|
|
68
69
|
|
|
69
70
|
|
|
70
71
|
exports.FormTextarea = FormTextarea;
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-JI377F6F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-JI377F6F.js","../components/form/FormTextarea.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AAC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AAAA,MACA,YAAA,EAAa;AAAA,IAAA,CAAA,EACT,UAAA,CAAA,EACA,MAAA,CAAA,EAPL;AAAA,MAWC,GAAA,EAAK,CAAC,EAAA,EAAA,GAAO;AACX,QAAA,GAAA,CAAI,CAAC,EAAA,EAAI,MAAA;AAET,QAAA,CAAC,IAAA,EAAM,UAAA,CAAW,GAAG,CAAA,CAAE,OAAA,CAAQ,CAAC,EAAA,EAAA,GAAO;AACrC,UAAA,GAAA,CAAI,CAAC,EAAA,EAAI,MAAA;AAET,UAAA,GAAA,CAAI,kCAAA,EAAc,CAAA,EAAG;AACnB,YAAA,EAAA,CAAG,EAAE,CAAA;AAAA,UACP,EAAA,KAAO;AACL,YAAA,EAAA,CAAG,QAAA,EAAU,EAAA;AAAA,UACf;AAAA,QACF,CAAC,CAAA;AAAA,MACH,CAAA;AAAA,MACA,SAAA,EAAW,iCAAA,UAAG,EAAY,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAK;AAAA,IAAA,CAAA;AAAA,EAC7C,CACF,CAAA;AAEJ;ADRA;AACA;AACE;AACF,oCAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-JI377F6F.js","sourcesContent":[null,"'use client';\n\nimport React from 'react';\nimport _isFunction from 'lodash-es/isFunction';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { TextareaHTMLAttributes, useRef } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Textarea } from '../ui/textarea';\n\ninterface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextareaProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps & { ref?: any };\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function FormTextarea({\n id,\n name,\n label,\n rows = 5,\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextareaProps) {\n if (!id) id = _kebabCase(name);\n const _ref = useRef<HTMLTextAreaElement>(null);\n\n return (\n <div className={cn('textarea', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Textarea\n id={id}\n name={name}\n rows={rows}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n // Required to bind three potential refs:\n // 1. From the inputProps ex) react-hook-form.\n // 2. From the this component instance itself.\n ref={(el) => {\n if (!el) return;\n\n [_ref, inputProps.ref].forEach((rf) => {\n if (!rf) return;\n\n if (_isFunction(rf)) {\n rf(el);\n } else {\n rf.current = el;\n }\n });\n }}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"]}
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-3ONILUYO.mjs";
|
|
4
4
|
|
|
5
5
|
// components/form/FormError.tsx
|
|
6
|
+
import React from "react";
|
|
6
7
|
import _get from "lodash-es/get";
|
|
7
8
|
import { useFormContext } from "react-hook-form";
|
|
8
9
|
function FormError({
|
|
@@ -21,4 +22,4 @@ function FormError({
|
|
|
21
22
|
export {
|
|
22
23
|
FormError
|
|
23
24
|
};
|
|
24
|
-
//# sourceMappingURL=chunk-
|
|
25
|
+
//# sourceMappingURL=chunk-LKETVFHL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../components/form/FormError.tsx"],"sourcesContent":["import React from 'react';\nimport _get from 'lodash-es/get';\nimport _startCase from 'lodash-es/startCase';\nimport { useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\n\nexport default function FormError({\n field,\n className = '',\n message = '',\n}: {\n field: string;\n className?: string;\n message?: string;\n}) {\n const {\n formState: { errors },\n } = useFormContext();\n\n const fieldError = _get(errors, field);\n if (!fieldError) return null;\n return <div className={cn('text-sm text-danger mb-2', className)}>{message || String(fieldError.message)}</div>;\n}\n"],"mappings":";;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AAEjB,SAAS,sBAAsB;AAGhB,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,YAAY;AAAA,EACZ,UAAU;AACZ,GAIG;AACD,QAAM;AAAA,IACJ,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI,eAAe;AAEnB,QAAM,aAAa,KAAK,QAAQ,KAAK;AACrC,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO,oCAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,KAAI,WAAW,OAAO,WAAW,OAAO,CAAE;AAC3G;","names":[]}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-YOSPWY5K.mjs";
|
|
15
15
|
|
|
16
16
|
// components/form/FormTextarea.tsx
|
|
17
|
+
import React from "react";
|
|
17
18
|
import _isFunction from "lodash-es/isFunction";
|
|
18
19
|
import _kebabCase from "lodash-es/kebabCase";
|
|
19
20
|
import { useRef } from "react";
|
|
@@ -68,4 +69,4 @@ function FormTextarea(_a) {
|
|
|
68
69
|
export {
|
|
69
70
|
FormTextarea
|
|
70
71
|
};
|
|
71
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-U2WALG7C.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../components/form/FormTextarea.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport _isFunction from 'lodash-es/isFunction';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { TextareaHTMLAttributes, useRef } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Textarea } from '../ui/textarea';\n\ninterface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextareaProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps & { ref?: any };\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function FormTextarea({\n id,\n name,\n label,\n rows = 5,\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextareaProps) {\n if (!id) id = _kebabCase(name);\n const _ref = useRef<HTMLTextAreaElement>(null);\n\n return (\n <div className={cn('textarea', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Textarea\n id={id}\n name={name}\n rows={rows}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n // Required to bind three potential refs:\n // 1. From the inputProps ex) react-hook-form.\n // 2. From the this component instance itself.\n ref={(el) => {\n if (!el) return;\n\n [_ref, inputProps.ref].forEach((rf) => {\n if (!rf) return;\n\n if (_isFunction(rf)) {\n rf(el);\n } else {\n rf.current = el;\n }\n });\n }}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,SAAiC,cAAc;AAO/C,IAAM,aAAa;AAcJ,SAAR,aAA8B,IAUf;AAVe,eACnC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,CAAC;AAAA,EAlChB,IA0BqC,IAShC,mBATgC,IAShC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,MAAI,CAAC,GAAI,MAAK,WAAW,IAAI;AAC7B,QAAM,OAAO,OAA4B,IAAI;AAE7C,SACE,oCAAC,SAAI,WAAW,GAAG,YAAY,yCAAY,OAAO,KAC/C,SACC,oCAAC,SAAM,SAAS,IAAI,WAAW,yCAAY,OAAO,YAC/C,KACH,GAEF;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAa;AAAA,OACT,aACA,SAPL;AAAA,MAWC,KAAK,CAAC,OAAO;AACX,YAAI,CAAC,GAAI;AAET,SAAC,MAAM,WAAW,GAAG,EAAE,QAAQ,CAAC,OAAO;AACrC,cAAI,CAAC,GAAI;AAET,cAAI,YAAY,EAAE,GAAG;AACnB,eAAG,EAAE;AAAA,UACP,OAAO;AACL,eAAG,UAAU;AAAA,UACf;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MACA,WAAW,GAAG,YAAY,yCAAY,KAAK;AAAA;AAAA,EAC7C,CACF;AAEJ;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
declare function FormError({ field, className, message, }: {
|
|
4
4
|
field: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
message?: string;
|
|
7
|
-
}):
|
|
7
|
+
}): React__default.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { FormError as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
declare function FormError({ field, className, message, }: {
|
|
4
4
|
field: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
message?: string;
|
|
7
|
-
}):
|
|
7
|
+
}): React__default.JSX.Element | null;
|
|
8
8
|
|
|
9
9
|
export { FormError as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkCX43H4PDjs = require('../../chunk-CX43H4PD.js');
|
|
4
4
|
require('../../chunk-B2G2EZ4P.js');
|
|
5
5
|
require('../../chunk-2NMEKWO5.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = _chunkCX43H4PDjs.FormError;
|
|
9
9
|
//# sourceMappingURL=FormError.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InputHTMLAttributes } from 'react';
|
|
1
|
+
import React__default, { InputHTMLAttributes } from 'react';
|
|
3
2
|
|
|
4
3
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
4
|
}
|
|
@@ -14,6 +13,6 @@ interface FormTextInputProps extends InputProps {
|
|
|
14
13
|
input?: string;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
|
-
declare function TextInput({ id, name, label, type, classNames, required, disabled, inputProps, ...others }: FormTextInputProps):
|
|
16
|
+
declare function TextInput({ id, name, label, type, classNames, required, disabled, inputProps, ...others }: FormTextInputProps): React__default.JSX.Element;
|
|
18
17
|
|
|
19
18
|
export { type FormTextInputProps, TextInput as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { InputHTMLAttributes } from 'react';
|
|
1
|
+
import React__default, { InputHTMLAttributes } from 'react';
|
|
3
2
|
|
|
4
3
|
interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
5
4
|
}
|
|
@@ -14,6 +13,6 @@ interface FormTextInputProps extends InputProps {
|
|
|
14
13
|
input?: string;
|
|
15
14
|
};
|
|
16
15
|
}
|
|
17
|
-
declare function TextInput({ id, name, label, type, classNames, required, disabled, inputProps, ...others }: FormTextInputProps):
|
|
16
|
+
declare function TextInput({ id, name, label, type, classNames, required, disabled, inputProps, ...others }: FormTextInputProps): React__default.JSX.Element;
|
|
18
17
|
|
|
19
18
|
export { type FormTextInputProps, TextInput as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2N2ED2H7js = require('../../chunk-2N2ED2H7.js');
|
|
5
5
|
require('../../chunk-GJJM336N.js');
|
|
6
6
|
require('../../chunk-AXZDZXCY.js');
|
|
7
7
|
require('../../chunk-B2G2EZ4P.js');
|
|
8
8
|
require('../../chunk-2NMEKWO5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunk2N2ED2H7js.TextInput;
|
|
12
12
|
//# sourceMappingURL=FormTextInput.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
1
|
+
import React__default, { TextareaHTMLAttributes } from 'react';
|
|
3
2
|
|
|
4
3
|
interface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
4
|
}
|
|
@@ -16,6 +15,6 @@ interface FormTextareaProps extends InputProps {
|
|
|
16
15
|
input?: string;
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
declare function FormTextarea({ id, name, label, rows, classNames, required, disabled, inputProps, ...others }: FormTextareaProps):
|
|
18
|
+
declare function FormTextarea({ id, name, label, rows, classNames, required, disabled, inputProps, ...others }: FormTextareaProps): React__default.JSX.Element;
|
|
20
19
|
|
|
21
20
|
export { type FormTextareaProps, FormTextarea as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TextareaHTMLAttributes } from 'react';
|
|
1
|
+
import React__default, { TextareaHTMLAttributes } from 'react';
|
|
3
2
|
|
|
4
3
|
interface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
4
|
}
|
|
@@ -16,6 +15,6 @@ interface FormTextareaProps extends InputProps {
|
|
|
16
15
|
input?: string;
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
|
-
declare function FormTextarea({ id, name, label, rows, classNames, required, disabled, inputProps, ...others }: FormTextareaProps):
|
|
18
|
+
declare function FormTextarea({ id, name, label, rows, classNames, required, disabled, inputProps, ...others }: FormTextareaProps): React__default.JSX.Element;
|
|
20
19
|
|
|
21
20
|
export { type FormTextareaProps, FormTextarea as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJI377F6Fjs = require('../../chunk-JI377F6F.js');
|
|
5
5
|
require('../../chunk-IQP24H6D.js');
|
|
6
6
|
require('../../chunk-AXZDZXCY.js');
|
|
7
7
|
require('../../chunk-B2G2EZ4P.js');
|
|
8
8
|
require('../../chunk-2NMEKWO5.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.default =
|
|
11
|
+
exports.default = _chunkJI377F6Fjs.FormTextarea;
|
|
12
12
|
//# sourceMappingURL=FormTextarea.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { FormTextInputProps } from './FormTextInput.mjs';
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ declare function HookTextInput<T extends FieldValues>({ id, name, options, label
|
|
|
6
6
|
name: Path<T>;
|
|
7
7
|
options?: RegisterOptions<T, Path<T>> | undefined;
|
|
8
8
|
error?: string;
|
|
9
|
-
}):
|
|
9
|
+
}): React__default.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { HookTextInput as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { FormTextInputProps } from './FormTextInput.js';
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ declare function HookTextInput<T extends FieldValues>({ id, name, options, label
|
|
|
6
6
|
name: Path<T>;
|
|
7
7
|
options?: RegisterOptions<T, Path<T>> | undefined;
|
|
8
8
|
error?: string;
|
|
9
|
-
}):
|
|
9
|
+
}): React__default.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { HookTextInput as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2N2ED2H7js = require('../../chunk-2N2ED2H7.js');
|
|
5
5
|
require('../../chunk-GJJM336N.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkCX43H4PDjs = require('../../chunk-CX43H4PD.js');
|
|
9
9
|
require('../../chunk-AXZDZXCY.js');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,6 +17,7 @@ var _chunkB2G2EZ4Pjs = require('../../chunk-B2G2EZ4P.js');
|
|
|
17
17
|
var _chunk2NMEKWO5js = require('../../chunk-2NMEKWO5.js');
|
|
18
18
|
|
|
19
19
|
// components/form/HookFormTextInput.tsx
|
|
20
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
20
21
|
var _get2 = require('lodash-es/get'); var _get3 = _interopRequireDefault(_get2);
|
|
21
22
|
var _reacthookform = require('react-hook-form');
|
|
22
23
|
function HookTextInput(_a) {
|
|
@@ -46,8 +47,8 @@ function HookTextInput(_a) {
|
|
|
46
47
|
const fieldError = _get3.default.call(void 0, errors, name);
|
|
47
48
|
const errorMessage = error != null ? error : fieldError && String(fieldError == null ? void 0 : fieldError.message);
|
|
48
49
|
const showError = !!fieldError && !disabled;
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
50
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: classNames == null ? void 0 : classNames.wrapper }, /* @__PURE__ */ _react2.default.createElement(
|
|
51
|
+
_chunk2N2ED2H7js.TextInput,
|
|
51
52
|
_chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {
|
|
52
53
|
id,
|
|
53
54
|
name,
|
|
@@ -64,7 +65,7 @@ function HookTextInput(_a) {
|
|
|
64
65
|
},
|
|
65
66
|
inputProps: register(name, options)
|
|
66
67
|
})
|
|
67
|
-
), showError && /* @__PURE__ */
|
|
68
|
+
), showError && /* @__PURE__ */ _react2.default.createElement(_chunkCX43H4PDjs.FormError, { field: name, className: "mt-1", message: errorMessage }));
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextInput.js","../../../components/form/HookFormTextInput.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,gFAAiB;AACjB,gDAAmE;AAKpD,SAAR,aAAA,CAAsD,EAAA,EAa1D;AAb0D,EAAA,IAAA,GAAA,EAAA,EAAA,EAC3D;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextInput.js","../../../components/form/HookFormTextInput.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,4EAAkB;AAClB,gFAAiB;AACjB,gDAAmE;AAKpD,SAAR,aAAA,CAAsD,EAAA,EAa1D;AAb0D,EAAA,IAAA,GAAA,EAAA,EAAA,EAC3D;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EAhBF,EAAA,EAS6D,EAAA,EAQxD,OAAA,EAAA,wCAAA,EARwD,EAQxD;AAAA,IAPH,IAAA;AAAA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MACH,CAAA;AAAA,MACA,UAAA,EAAY,QAAA,CAAS,IAAA,EAAM,OAAO;AAAA,IAAA,CAAA;AAAA,EACpC,CAAA,EACC,UAAA,mBAAa,eAAA,CAAA,aAAA,CAAC,0BAAA,EAAA,EAAU,KAAA,EAAO,IAAA,EAAM,SAAA,EAAU,MAAA,EAAO,OAAA,EAAS,aAAA,CAAc,CAChF,CAAA;AAEJ;ADaA;AACE;AACF,gCAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextInput.js","sourcesContent":[null,"'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextInput, { FormTextInputProps } from './FormTextInput';\n\nexport default function HookTextInput<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextInput\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
TextInput
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-BBQHZ4QS.mjs";
|
|
5
5
|
import "../../chunk-KBUB4CRW.mjs";
|
|
6
6
|
import {
|
|
7
7
|
FormError
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-LKETVFHL.mjs";
|
|
9
9
|
import "../../chunk-7W42BHVK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "../../chunk-YOSPWY5K.mjs";
|
|
18
18
|
|
|
19
19
|
// components/form/HookFormTextInput.tsx
|
|
20
|
+
import React from "react";
|
|
20
21
|
import _get from "lodash-es/get";
|
|
21
22
|
import { useFormContext } from "react-hook-form";
|
|
22
23
|
function HookTextInput(_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/form/HookFormTextInput.tsx"],"sourcesContent":["'use client';\n\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextInput, { FormTextInputProps } from './FormTextInput';\n\nexport default function HookTextInput<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextInput\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,OAAO,UAAU;AACjB,SAA6C,sBAAsB;AAKpD,SAAR,cAAsD,IAa1D;AAb0D,eAC3D;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../components/form/HookFormTextInput.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextInput, { FormTextInputProps } from './FormTextInput';\n\nexport default function HookTextInput<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextInput\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAA6C,sBAAsB;AAKpD,SAAR,cAAsD,IAa1D;AAb0D,eAC3D;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAhBF,IAS6D,IAQxD,mBARwD,IAQxD;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAOA,QAAM,UAAU,eAAkB;AAClC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI;AAEJ,QAAM,aAAa,KAAK,QAAQ,IAAI;AACpC,QAAM,eAAe,wBAAU,cAAc,OAAO,yCAAY,OAAO;AACvE,QAAM,YAAY,CAAC,CAAC,cAAc,CAAC;AAEnC,SACE,oCAAC,SAAI,WAAW,yCAAY,WAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,OACI,SALL;AAAA,MAMC,YAAY;AAAA,QACV,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,2BAA2B;AAAA,QAC7B,CAAC;AAAA,MACH;AAAA,MACA,YAAY,SAAS,MAAM,OAAO;AAAA;AAAA,EACpC,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { FormTextareaProps } from './FormTextarea.mjs';
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ declare function HookFormTextarea<T extends FieldValues>({ id, name, options, la
|
|
|
6
6
|
name: Path<T>;
|
|
7
7
|
options?: RegisterOptions<T, Path<T>> | undefined;
|
|
8
8
|
error?: string;
|
|
9
|
-
}):
|
|
9
|
+
}): React__default.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { HookFormTextarea as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
|
|
3
3
|
import { FormTextareaProps } from './FormTextarea.js';
|
|
4
4
|
|
|
@@ -6,6 +6,6 @@ declare function HookFormTextarea<T extends FieldValues>({ id, name, options, la
|
|
|
6
6
|
name: Path<T>;
|
|
7
7
|
options?: RegisterOptions<T, Path<T>> | undefined;
|
|
8
8
|
error?: string;
|
|
9
|
-
}):
|
|
9
|
+
}): React__default.JSX.Element | null;
|
|
10
10
|
|
|
11
11
|
export { HookFormTextarea as default };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkJI377F6Fjs = require('../../chunk-JI377F6F.js');
|
|
5
5
|
require('../../chunk-IQP24H6D.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkCX43H4PDjs = require('../../chunk-CX43H4PD.js');
|
|
9
9
|
require('../../chunk-AXZDZXCY.js');
|
|
10
10
|
|
|
11
11
|
|
|
@@ -17,6 +17,7 @@ var _chunkB2G2EZ4Pjs = require('../../chunk-B2G2EZ4P.js');
|
|
|
17
17
|
var _chunk2NMEKWO5js = require('../../chunk-2NMEKWO5.js');
|
|
18
18
|
|
|
19
19
|
// components/form/HookFormTextarea.tsx
|
|
20
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
20
21
|
var _get2 = require('lodash-es/get'); var _get3 = _interopRequireDefault(_get2);
|
|
21
22
|
var _reacthookform = require('react-hook-form');
|
|
22
23
|
function HookFormTextarea(_a) {
|
|
@@ -46,8 +47,8 @@ function HookFormTextarea(_a) {
|
|
|
46
47
|
const fieldError = _get3.default.call(void 0, errors, name);
|
|
47
48
|
const errorMessage = error != null ? error : fieldError && String(fieldError == null ? void 0 : fieldError.message);
|
|
48
49
|
const showError = !!fieldError && !disabled;
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
|
|
50
|
+
return /* @__PURE__ */ _react2.default.createElement("div", { className: classNames == null ? void 0 : classNames.wrapper }, /* @__PURE__ */ _react2.default.createElement(
|
|
51
|
+
_chunkJI377F6Fjs.FormTextarea,
|
|
51
52
|
_chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {
|
|
52
53
|
id,
|
|
53
54
|
name,
|
|
@@ -64,7 +65,7 @@ function HookFormTextarea(_a) {
|
|
|
64
65
|
},
|
|
65
66
|
inputProps: register(name, options)
|
|
66
67
|
})
|
|
67
|
-
), showError && /* @__PURE__ */
|
|
68
|
+
), showError && /* @__PURE__ */ _react2.default.createElement(_chunkCX43H4PDjs.FormError, { field: name, className: "mt-1", message: errorMessage }));
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextarea.js","../../../components/form/HookFormTextarea.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,gFAAiB;AACjB,gDAAmE;AAKpD,SAAR,gBAAA,CAAyD,EAAA,EAa7D;AAb6D,EAAA,IAAA,GAAA,EAAA,EAAA,EAC9D;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextarea.js","../../../components/form/HookFormTextarea.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AACh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A,IAAA,4CAAA,6CAAA;AAAA,MACC,EAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA;AAAA,IAAA,CAAA,EACI,MAAA,CAAA,EALL;AAAA,MAMC,UAAA,EAAY;AAAA,QACV,KAAA,EAAO,iCAAA,WAAG,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO;AAAA,UAC3B,aAAA,EAAe;AAAA,QACjB,CAAC,CAAA;AAAA,QACD,KAAA,EAAO,iCAAA,WAAG,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO;AAAA,UAC3B,yBAAA,EAA2B;AAAA,QAC7B,CAAC;AAAA,MACH,CAAA;AAAA,MACA,UAAA,EAAY,QAAA,CAAS,IAAA,EAAM,OAAO;AAAA,IAAA,CAAA;AAAA,EACpC,CAAA,EACC,UAAA,mBAAa,eAAA,CAAA,aAAA,CAAC,0BAAA,EAAA,EAAU,KAAA,EAAO,IAAA,EAAM,SAAA,EAAU,MAAA,EAAO,OAAA,EAAS,aAAA,CAAc,CAChF,CAAA;AAEJ;ADaA;AACE;AACF,mCAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/HookFormTextarea.js","sourcesContent":[null,"'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextarea, { FormTextareaProps } from './FormTextarea';\n\nexport default function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextareaProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextarea\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
FormTextarea
|
|
4
|
-
} from "../../chunk-
|
|
4
|
+
} from "../../chunk-U2WALG7C.mjs";
|
|
5
5
|
import "../../chunk-PEKKKPKP.mjs";
|
|
6
6
|
import {
|
|
7
7
|
FormError
|
|
8
|
-
} from "../../chunk-
|
|
8
|
+
} from "../../chunk-LKETVFHL.mjs";
|
|
9
9
|
import "../../chunk-7W42BHVK.mjs";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from "../../chunk-YOSPWY5K.mjs";
|
|
18
18
|
|
|
19
19
|
// components/form/HookFormTextarea.tsx
|
|
20
|
+
import React from "react";
|
|
20
21
|
import _get from "lodash-es/get";
|
|
21
22
|
import { useFormContext } from "react-hook-form";
|
|
22
23
|
function HookFormTextarea(_a) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../components/form/HookFormTextarea.tsx"],"sourcesContent":["'use client';\n\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextarea, { FormTextareaProps } from './FormTextarea';\n\nexport default function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextareaProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextarea\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,OAAO,UAAU;AACjB,SAA6C,sBAAsB;AAKpD,SAAR,iBAAyD,IAa7D;AAb6D,eAC9D;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../components/form/HookFormTextarea.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport FormError from './FormError';\nimport FormTextarea, { FormTextareaProps } from './FormTextarea';\n\nexport default function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n options,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextareaProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n options?: RegisterOptions<T, Path<T>> | undefined;\n error?: string;\n}) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n register,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError && String(fieldError?.message));\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <FormTextarea\n id={id}\n name={name}\n label={label}\n disabled={disabled}\n {...others}\n classNames={{\n label: cn(classNames?.label, {\n 'text-danger': showError,\n }),\n input: cn(classNames?.input, {\n 'ring-danger text-danger': showError,\n }),\n }}\n inputProps={register(name, options)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAA6C,sBAAsB;AAKpD,SAAR,iBAAyD,IAa7D;AAb6D,eAC9D;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAhBF,IASgE,IAQ3D,mBAR2D,IAQ3D;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAOA,QAAM,UAAU,eAAkB;AAClC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM;AAAA,IACJ;AAAA,IACA,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI;AAEJ,QAAM,aAAa,KAAK,QAAQ,IAAI;AACpC,QAAM,eAAe,wBAAU,cAAc,OAAO,yCAAY,OAAO;AACvE,QAAM,YAAY,CAAC,CAAC,cAAc,CAAC;AAEnC,SACE,oCAAC,SAAI,WAAW,yCAAY,WAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,OACI,SALL;AAAA,MAMC,YAAY;AAAA,QACV,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,eAAe;AAAA,QACjB,CAAC;AAAA,QACD,OAAO,GAAG,yCAAY,OAAO;AAAA,UAC3B,2BAA2B;AAAA,QAC7B,CAAC;AAAA,MACH;AAAA,MACA,YAAY,SAAS,MAAM,OAAO;AAAA;AAAA,EACpC,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
|
package/package.json
CHANGED
package/chunk-44EDWDHY.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-44EDWDHY.js","../components/form/FormTextInput.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACbA,wGAAuB;AAQvB,IAAM,WAAA,EAAa,EAAA;AAcJ,SAAR,SAAA,CAA2B,EAAA,EAUX;AAVW,EAAA,IAAA,GAAA,EAAA,EAAA,EAChC;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,EAAO,MAAA;AAAA,IACP,UAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA,EAAa,CAAC;AAAA,EAhChB,EAAA,EAwBkC,EAAA,EAS7B,OAAA,EAAA,wCAAA,EAT6B,EAS7B;AAAA,IARH,IAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EAAA,CAAA,CAAA;AAGA,EAAA,GAAA,CAAI,CAAC,EAAA,EAAI,GAAA,EAAK,iCAAA,IAAe,CAAA;AAE7B,EAAA,uBACE,KAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,iCAAA,YAAG,EAAc,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,OAAO,EAAA,CAAA,EACjD,MAAA,mBACC,KAAA,CAAA,aAAA,CAAC,sBAAA,EAAA,EAAM,OAAA,EAAS,EAAA,EAAI,SAAA,EAAW,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO,SAAA,CAAA,EAC/C,KACH,CAAA,kBAEF,KAAA,CAAA,aAAA;AAAA,IAAC,sBAAA;AAAA,IAAA,4CAAA,6CAAA,6CAAA;AAAA,MACC,IAAA;AAAA,MACA,EAAA;AAAA,MACA,IAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA,EAAa;AAAA,IAAA,CAAA,EACT,UAAA,CAAA,EACA,MAAA,CAAA,EAPL;AAAA,MAQC,SAAA,EAAW,iCAAA,UAAG,EAAY,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAK;AAAA,IAAA,CAAA;AAAA,EAC7C,CACF,CAAA;AAEJ;ADJA;AACA;AACE;AACF,8BAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-44EDWDHY.js","sourcesContent":[null,"'use client';\n\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { InputHTMLAttributes } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Input } from '../ui/input';\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextInputProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps;\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function TextInput({\n id,\n name,\n label,\n type = 'text',\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextInputProps) {\n if (!id) id = _kebabCase(name);\n\n return (\n <div className={cn('text-input', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"]}
|
package/chunk-7M4CHPRA.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../components/form/FormTextInput.tsx"],"sourcesContent":["'use client';\n\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { InputHTMLAttributes } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Input } from '../ui/input';\n\ninterface InputProps extends InputHTMLAttributes<HTMLInputElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextInputProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps;\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function TextInput({\n id,\n name,\n label,\n type = 'text',\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextInputProps) {\n if (!id) id = _kebabCase(name);\n\n return (\n <div className={cn('text-input', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Input\n type={type}\n id={id}\n name={name}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,gBAAgB;AAQvB,IAAM,aAAa;AAcJ,SAAR,UAA2B,IAUX;AAVW,eAChC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,CAAC;AAAA,EAhChB,IAwBkC,IAS7B,mBAT6B,IAS7B;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,MAAI,CAAC,GAAI,MAAK,WAAW,IAAI;AAE7B,SACE,oCAAC,SAAI,WAAW,GAAG,cAAc,yCAAY,OAAO,KACjD,SACC,oCAAC,SAAM,SAAS,IAAI,WAAW,yCAAY,OAAO,YAC/C,KACH,GAEF;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAa;AAAA,OACT,aACA,SAPL;AAAA,MAQC,WAAW,GAAG,YAAY,yCAAY,KAAK;AAAA;AAAA,EAC7C,CACF;AAEJ;","names":[]}
|
package/chunk-7OK7ZIDG.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../components/form/FormTextarea.tsx"],"sourcesContent":["'use client';\n\nimport _isFunction from 'lodash-es/isFunction';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { TextareaHTMLAttributes, useRef } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Textarea } from '../ui/textarea';\n\ninterface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextareaProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps & { ref?: any };\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function FormTextarea({\n id,\n name,\n label,\n rows = 5,\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextareaProps) {\n if (!id) id = _kebabCase(name);\n const _ref = useRef<HTMLTextAreaElement>(null);\n\n return (\n <div className={cn('textarea', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Textarea\n id={id}\n name={name}\n rows={rows}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n // Required to bind three potential refs:\n // 1. From the inputProps ex) react-hook-form.\n // 2. From the this component instance itself.\n ref={(el) => {\n if (!el) return;\n\n [_ref, inputProps.ref].forEach((rf) => {\n if (!rf) return;\n\n if (_isFunction(rf)) {\n rf(el);\n } else {\n rf.current = el;\n }\n });\n }}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAEA,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,SAAiC,cAAc;AAO/C,IAAM,aAAa;AAcJ,SAAR,aAA8B,IAUf;AAVe,eACnC;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,CAAC;AAAA,EAjChB,IAyBqC,IAShC,mBATgC,IAShC;AAAA,IARH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,MAAI,CAAC,GAAI,MAAK,WAAW,IAAI;AAC7B,QAAM,OAAO,OAA4B,IAAI;AAE7C,SACE,oCAAC,SAAI,WAAW,GAAG,YAAY,yCAAY,OAAO,KAC/C,SACC,oCAAC,SAAM,SAAS,IAAI,WAAW,yCAAY,OAAO,YAC/C,KACH,GAEF;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,cAAa;AAAA,OACT,aACA,SAPL;AAAA,MAWC,KAAK,CAAC,OAAO;AACX,YAAI,CAAC,GAAI;AAET,SAAC,MAAM,WAAW,GAAG,EAAE,QAAQ,CAAC,OAAO;AACrC,cAAI,CAAC,GAAI;AAET,cAAI,YAAY,EAAE,GAAG;AACnB,eAAG,EAAE;AAAA,UACP,OAAO;AACL,eAAG,UAAU;AAAA,UACf;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MACA,WAAW,GAAG,YAAY,yCAAY,KAAK;AAAA;AAAA,EAC7C,CACF;AAEJ;","names":[]}
|
package/chunk-KW4OLCGW.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-KW4OLCGW.js","../components/form/FormError.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACA;ACJA,gFAAiB;AAEjB,gDAA+B;AAGhB,SAAR,SAAA,CAA2B;AAAA,EAChC,KAAA;AAAA,EACA,UAAA,EAAY,EAAA;AAAA,EACZ,QAAA,EAAU;AACZ,CAAA,EAIG;AACD,EAAA,MAAM;AAAA,IACJ,SAAA,EAAW,EAAE,OAAO;AAAA,EACtB,EAAA,EAAI,2CAAA,CAAe;AAEnB,EAAA,MAAM,WAAA,EAAa,2BAAA,MAAK,EAAQ,KAAK,CAAA;AACrC,EAAA,GAAA,CAAI,CAAC,UAAA,EAAY,OAAO,IAAA;AACxB,EAAA,uBAAO,KAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,iCAAA,0BAAG,EAA4B,SAAS,EAAA,CAAA,EAAI,QAAA,GAAW,MAAA,CAAO,UAAA,CAAW,OAAO,CAAE,CAAA;AAC3G;ADFA;AACA;AACE;AACF,8BAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-KW4OLCGW.js","sourcesContent":[null,"import _get from 'lodash-es/get';\nimport _startCase from 'lodash-es/startCase';\nimport { useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\n\nexport default function FormError({\n field,\n className = '',\n message = '',\n}: {\n field: string;\n className?: string;\n message?: string;\n}) {\n const {\n formState: { errors },\n } = useFormContext();\n\n const fieldError = _get(errors, field);\n if (!fieldError) return null;\n return <div className={cn('text-sm text-danger mb-2', className)}>{message || String(fieldError.message)}</div>;\n}\n"]}
|
package/chunk-LT3WL2W3.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/chunk-LT3WL2W3.js","../components/form/FormTextarea.tsx"],"names":[],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACA;ACbA,4GAAwB;AACxB,wGAAuB;AACvB,8BAA+C;AAO/C,IAAM,WAAA,EAAa,EAAA;AAcJ,SAAR,YAAA,CAA8B,EAAA,EAUf;AAVe,EAAA,IAAA,GAAA,EAAA,EAAA,EACnC;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA,EAAO,CAAA;AAAA,IACP,UAAA;AAAA,I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ET,UAAA,GAAA,CAAI,kCAAA,EAAc,CAAA,EAAG;AACnB,YAAA,EAAA,CAAG,EAAE,CAAA;AAAA,UACP,EAAA,KAAO;AACL,YAAA,EAAA,CAAG,QAAA,EAAU,EAAA;AAAA,UACf;AAAA,QACF,CAAC,CAAA;AAAA,MACH,CAAA;AAAA,MACA,SAAA,EAAW,iCAAA,UAAG,EAAY,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAK;AAAA,IAAA,CAAA;AAAA,EAC7C,CACF,CAAA;AAEJ;ADRA;AACA;AACE;AACF,oCAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/chunk-LT3WL2W3.js","sourcesContent":[null,"'use client';\n\nimport _isFunction from 'lodash-es/isFunction';\nimport _kebabCase from 'lodash-es/kebabCase';\nimport { TextareaHTMLAttributes, useRef } from 'react';\nimport { cn } from '../../lib/utils';\nimport { Label } from '../ui/label';\nimport { Textarea } from '../ui/textarea';\n\ninterface InputProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst inputClass = '';\n\nexport interface FormTextareaProps extends InputProps {\n id?: string;\n name: string;\n label?: string;\n inputProps?: InputProps & { ref?: any };\n classNames?: {\n wrapper?: string;\n label?: string;\n input?: string;\n };\n}\n\nexport default function FormTextarea({\n id,\n name,\n label,\n rows = 5,\n classNames,\n required,\n disabled,\n inputProps = {},\n ...others\n}: FormTextareaProps) {\n if (!id) id = _kebabCase(name);\n const _ref = useRef<HTMLTextAreaElement>(null);\n\n return (\n <div className={cn('textarea', classNames?.wrapper)}>\n {label && (\n <Label htmlFor={id} className={classNames?.label} required={required}>\n {label}\n </Label>\n )}\n <Textarea\n id={id}\n name={name}\n rows={rows}\n disabled={disabled}\n autoComplete=\"off\"\n {...inputProps}\n {...others}\n // Required to bind three potential refs:\n // 1. From the inputProps ex) react-hook-form.\n // 2. From the this component instance itself.\n ref={(el) => {\n if (!el) return;\n\n [_ref, inputProps.ref].forEach((rf) => {\n if (!rf) return;\n\n if (_isFunction(rf)) {\n rf(el);\n } else {\n rf.current = el;\n }\n });\n }}\n className={cn(inputClass, classNames?.input)}\n />\n </div>\n );\n}\n"]}
|
package/chunk-VXIIBN2D.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../components/form/FormError.tsx"],"sourcesContent":["import _get from 'lodash-es/get';\nimport _startCase from 'lodash-es/startCase';\nimport { useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\n\nexport default function FormError({\n field,\n className = '',\n message = '',\n}: {\n field: string;\n className?: string;\n message?: string;\n}) {\n const {\n formState: { errors },\n } = useFormContext();\n\n const fieldError = _get(errors, field);\n if (!fieldError) return null;\n return <div className={cn('text-sm text-danger mb-2', className)}>{message || String(fieldError.message)}</div>;\n}\n"],"mappings":";;;;;AAAA,OAAO,UAAU;AAEjB,SAAS,sBAAsB;AAGhB,SAAR,UAA2B;AAAA,EAChC;AAAA,EACA,YAAY;AAAA,EACZ,UAAU;AACZ,GAIG;AACD,QAAM;AAAA,IACJ,WAAW,EAAE,OAAO;AAAA,EACtB,IAAI,eAAe;AAEnB,QAAM,aAAa,KAAK,QAAQ,KAAK;AACrC,MAAI,CAAC,WAAY,QAAO;AACxB,SAAO,oCAAC,SAAI,WAAW,GAAG,4BAA4B,SAAS,KAAI,WAAW,OAAO,WAAW,OAAO,CAAE;AAC3G;","names":[]}
|