@egose/shadcn-theme 0.0.21 → 0.0.23

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.
Files changed (92) hide show
  1. package/chunk-7SHQOSBJ.js +123 -0
  2. package/chunk-7SHQOSBJ.js.map +1 -0
  3. package/chunk-CEJOC6JT.mjs +123 -0
  4. package/chunk-CEJOC6JT.mjs.map +1 -0
  5. package/chunk-ENHV3QCF.mjs +41 -0
  6. package/chunk-ENHV3QCF.mjs.map +1 -0
  7. package/chunk-JOYUTUGI.mjs +57 -0
  8. package/chunk-JOYUTUGI.mjs.map +1 -0
  9. package/{chunk-4J7ZCWRI.mjs → chunk-LFW2GKN3.mjs} +5 -5
  10. package/chunk-LFW2GKN3.mjs.map +1 -0
  11. package/chunk-PGE7GQZC.js +71 -0
  12. package/chunk-PGE7GQZC.js.map +1 -0
  13. package/chunk-TV4NNZTS.js +57 -0
  14. package/chunk-TV4NNZTS.js.map +1 -0
  15. package/chunk-TYI6YBBZ.js +41 -0
  16. package/chunk-TYI6YBBZ.js.map +1 -0
  17. package/chunk-Y6WBDYJY.mjs +71 -0
  18. package/chunk-Y6WBDYJY.mjs.map +1 -0
  19. package/{chunk-RUACSQT3.js → chunk-ZHHY5JVV.js} +5 -5
  20. package/chunk-ZHHY5JVV.js.map +1 -0
  21. package/components/form/hook-native-select.d.mts +11 -0
  22. package/components/form/hook-native-select.d.ts +11 -0
  23. package/components/form/hook-native-select.js +72 -0
  24. package/components/form/hook-native-select.js.map +1 -0
  25. package/components/form/hook-native-select.mjs +72 -0
  26. package/components/form/hook-native-select.mjs.map +1 -0
  27. package/components/form/hook-select.d.mts +5 -4
  28. package/components/form/hook-select.d.ts +5 -4
  29. package/components/form/hook-select.js +29 -32
  30. package/components/form/hook-select.js.map +1 -1
  31. package/components/form/hook-select.mjs +30 -33
  32. package/components/form/hook-select.mjs.map +1 -1
  33. package/components/form/hook-text-input.d.mts +2 -2
  34. package/components/form/hook-text-input.d.ts +2 -2
  35. package/components/form/hook-text-input.js +3 -3
  36. package/components/form/hook-text-input.js.map +1 -1
  37. package/components/form/hook-text-input.mjs +3 -3
  38. package/components/form/hook-text-input.mjs.map +1 -1
  39. package/components/form/hook-textarea.d.mts +2 -2
  40. package/components/form/hook-textarea.d.ts +2 -2
  41. package/components/form/hook-textarea.js +3 -3
  42. package/components/form/hook-textarea.js.map +1 -1
  43. package/components/form/hook-textarea.mjs +3 -3
  44. package/components/form/hook-textarea.mjs.map +1 -1
  45. package/components/form/hook-time-text-input.d.mts +13 -0
  46. package/components/form/hook-time-text-input.d.ts +13 -0
  47. package/components/form/hook-time-text-input.js +83 -0
  48. package/components/form/hook-time-text-input.js.map +1 -0
  49. package/components/form/hook-time-text-input.mjs +83 -0
  50. package/components/form/hook-time-text-input.mjs.map +1 -0
  51. package/components/form/multi-select.d.mts +2 -0
  52. package/components/form/multi-select.d.ts +2 -0
  53. package/components/form/multi-select.js +1 -0
  54. package/components/form/multi-select.js.map +1 -0
  55. package/components/form/multi-select.mjs +1 -0
  56. package/components/form/multi-select.mjs.map +1 -0
  57. package/components/form/native-select.d.mts +23 -0
  58. package/components/form/native-select.d.ts +23 -0
  59. package/components/form/native-select.js +11 -0
  60. package/components/form/native-select.js.map +1 -0
  61. package/components/form/native-select.mjs +11 -0
  62. package/components/form/native-select.mjs.map +1 -0
  63. package/components/form/select.d.mts +8 -5
  64. package/components/form/select.d.ts +8 -5
  65. package/components/form/select.js +3 -2
  66. package/components/form/select.js.map +1 -1
  67. package/components/form/select.mjs +2 -1
  68. package/components/form/time-text-input.d.mts +10 -0
  69. package/components/form/time-text-input.d.ts +10 -0
  70. package/components/form/time-text-input.js +14 -0
  71. package/components/form/time-text-input.js.map +1 -0
  72. package/components/form/time-text-input.mjs +14 -0
  73. package/components/form/time-text-input.mjs.map +1 -0
  74. package/components/ui/select.js +27 -122
  75. package/components/ui/select.js.map +1 -1
  76. package/components/ui/select.mjs +13 -108
  77. package/components/ui/select.mjs.map +1 -1
  78. package/components/ui/sidebar.js +3 -3
  79. package/components/ui/sidebar.js.map +1 -1
  80. package/components/ui/sidebar.mjs +3 -3
  81. package/components/widgets/dialog-manager/index.js +1 -1
  82. package/components/widgets/dialog-manager/index.js.map +1 -1
  83. package/components/widgets/dialog-manager/index.mjs +1 -1
  84. package/lib/number.d.mts +7 -0
  85. package/lib/number.d.ts +7 -0
  86. package/lib/number.js +12 -0
  87. package/lib/number.js.map +1 -0
  88. package/lib/number.mjs +12 -0
  89. package/lib/number.mjs.map +1 -0
  90. package/package.json +1 -1
  91. package/chunk-4J7ZCWRI.mjs.map +0 -1
  92. package/chunk-RUACSQT3.js.map +0 -1
@@ -2,9 +2,9 @@ import React__default from 'react';
2
2
  import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
3
  import { FormTextInputProps } from './text-input.mjs';
4
4
 
5
- declare function HookFormTextInput<T extends FieldValues>({ id, name, options, label, error, classNames, disabled, ...others }: Omit<FormTextInputProps, 'name' | 'inputProps'> & {
5
+ declare function HookFormTextInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...others }: Omit<FormTextInputProps, 'name' | 'inputProps'> & {
6
6
  name: Path<T>;
7
- options?: RegisterOptions<T, Path<T>> | undefined;
7
+ rules?: RegisterOptions<T, Path<T>> | undefined;
8
8
  error?: string;
9
9
  }): React__default.JSX.Element | null;
10
10
 
@@ -2,9 +2,9 @@ import React__default from 'react';
2
2
  import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
3
  import { FormTextInputProps } from './text-input.js';
4
4
 
5
- declare function HookFormTextInput<T extends FieldValues>({ id, name, options, label, error, classNames, disabled, ...others }: Omit<FormTextInputProps, 'name' | 'inputProps'> & {
5
+ declare function HookFormTextInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...others }: Omit<FormTextInputProps, 'name' | 'inputProps'> & {
6
6
  name: Path<T>;
7
- options?: RegisterOptions<T, Path<T>> | undefined;
7
+ rules?: RegisterOptions<T, Path<T>> | undefined;
8
8
  error?: string;
9
9
  }): React__default.JSX.Element | null;
10
10
 
@@ -24,7 +24,7 @@ function HookFormTextInput(_a) {
24
24
  var _b = _a, {
25
25
  id,
26
26
  name,
27
- options,
27
+ rules,
28
28
  label,
29
29
  error,
30
30
  classNames,
@@ -32,7 +32,7 @@ function HookFormTextInput(_a) {
32
32
  } = _b, others = _chunk2NMEKWO5js.__objRest.call(void 0, _b, [
33
33
  "id",
34
34
  "name",
35
- "options",
35
+ "rules",
36
36
  "label",
37
37
  "error",
38
38
  "classNames",
@@ -63,7 +63,7 @@ function HookFormTextInput(_a) {
63
63
  "ring-danger text-danger": showError
64
64
  })
65
65
  },
66
- inputProps: register(name, options)
66
+ inputProps: register(name, rules)
67
67
  })
68
68
  ), showError && /* @__PURE__ */ _react2.default.createElement(_chunkP2BPVQXHjs.FormError, { field: name, className: "mt-1", message: errorMessage }));
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-text-input.js","../../../components/form/hook-text-input.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,4EAAkB;AAClB,gFAAiB;AACjB,gDAAmE;AAM5D,SAAS,iBAAA,CAAyC,EAAA,EAatD;AAbsD,EAAA,IAAA,GAAA,EAAA,EAAA,EACvD;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EAjBF,EAAA,EAUyD,EAAA,EAQpD,OAAA,EAAA,wCAAA,EARoD,EAQpD;AAAA,IAPH,IAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAA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AA,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;ADYA;AACE;AACF,8CAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-text-input.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 './error';\nimport { FormTextInput } from './text-input';\nimport type { FormTextInputProps } from './text-input';\n\nexport function HookFormTextInput<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
+ {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-text-input.js","../../../components/form/hook-text-input.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AAC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;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,KAAK;AAAA,IAAA,CAAA;AAAA,EAClC,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;ADYA;AACE;AACF,8CAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-text-input.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 './error';\nimport { FormTextInput } from './text-input';\nimport type { FormTextInputProps } from './text-input';\n\nexport function HookFormTextInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: 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, rules)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
@@ -24,7 +24,7 @@ function HookFormTextInput(_a) {
24
24
  var _b = _a, {
25
25
  id,
26
26
  name,
27
- options,
27
+ rules,
28
28
  label,
29
29
  error,
30
30
  classNames,
@@ -32,7 +32,7 @@ function HookFormTextInput(_a) {
32
32
  } = _b, others = __objRest(_b, [
33
33
  "id",
34
34
  "name",
35
- "options",
35
+ "rules",
36
36
  "label",
37
37
  "error",
38
38
  "classNames",
@@ -63,7 +63,7 @@ function HookFormTextInput(_a) {
63
63
  "ring-danger text-danger": showError
64
64
  })
65
65
  },
66
- inputProps: register(name, options)
66
+ inputProps: register(name, rules)
67
67
  })
68
68
  ), showError && /* @__PURE__ */ React.createElement(FormError, { field: name, className: "mt-1", message: errorMessage }));
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../components/form/hook-text-input.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 './error';\nimport { FormTextInput } from './text-input';\nimport type { FormTextInputProps } from './text-input';\n\nexport function HookFormTextInput<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;AAM5D,SAAS,kBAAyC,IAatD;AAbsD,eACvD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAUyD,IAQpD,mBARoD,IAQpD;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
+ {"version":3,"sources":["../../../components/form/hook-text-input.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 './error';\nimport { FormTextInput } from './text-input';\nimport type { FormTextInputProps } from './text-input';\n\nexport function HookFormTextInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: 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, rules)}\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;AAM5D,SAAS,kBAAyC,IAatD;AAbsD,eACvD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAUyD,IAQpD,mBARoD,IAQpD;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,KAAK;AAAA;AAAA,EAClC,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
@@ -2,9 +2,9 @@ import React__default from 'react';
2
2
  import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
3
  import { FormTextareaProps } from './textarea.mjs';
4
4
 
5
- declare function HookFormTextarea<T extends FieldValues>({ id, name, options, label, error, classNames, disabled, ...others }: Omit<FormTextareaProps, 'name' | 'inputProps'> & {
5
+ declare function HookFormTextarea<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...others }: Omit<FormTextareaProps, 'name' | 'inputProps'> & {
6
6
  name: Path<T>;
7
- options?: RegisterOptions<T, Path<T>> | undefined;
7
+ rules?: RegisterOptions<T, Path<T>> | undefined;
8
8
  error?: string;
9
9
  }): React__default.JSX.Element | null;
10
10
 
@@ -2,9 +2,9 @@ import React__default from 'react';
2
2
  import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
3
  import { FormTextareaProps } from './textarea.js';
4
4
 
5
- declare function HookFormTextarea<T extends FieldValues>({ id, name, options, label, error, classNames, disabled, ...others }: Omit<FormTextareaProps, 'name' | 'inputProps'> & {
5
+ declare function HookFormTextarea<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...others }: Omit<FormTextareaProps, 'name' | 'inputProps'> & {
6
6
  name: Path<T>;
7
- options?: RegisterOptions<T, Path<T>> | undefined;
7
+ rules?: RegisterOptions<T, Path<T>> | undefined;
8
8
  error?: string;
9
9
  }): React__default.JSX.Element | null;
10
10
 
@@ -24,7 +24,7 @@ function HookFormTextarea(_a) {
24
24
  var _b = _a, {
25
25
  id,
26
26
  name,
27
- options,
27
+ rules,
28
28
  label,
29
29
  error,
30
30
  classNames,
@@ -32,7 +32,7 @@ function HookFormTextarea(_a) {
32
32
  } = _b, others = _chunk2NMEKWO5js.__objRest.call(void 0, _b, [
33
33
  "id",
34
34
  "name",
35
- "options",
35
+ "rules",
36
36
  "label",
37
37
  "error",
38
38
  "classNames",
@@ -63,7 +63,7 @@ function HookFormTextarea(_a) {
63
63
  "ring-danger text-danger": showError
64
64
  })
65
65
  },
66
- inputProps: register(name, options)
66
+ inputProps: register(name, rules)
67
67
  })
68
68
  ), showError && /* @__PURE__ */ _react2.default.createElement(_chunkP2BPVQXHjs.FormError, { field: name, className: "mt-1", message: errorMessage }));
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-textarea.js","../../../components/form/hook-textarea.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,4EAAkB;AAClB,gFAAiB;AACjB,gDAAmE;AAM5D,SAAS,gBAAA,CAAwC,EAAA,EAarD;AAbqD,EAAA,IAAA,GAAA,EAAA,EAAA,EACtD;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;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AA,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;ADYA;AACE;AACF,4CAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-textarea.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 './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\n\nexport 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
+ {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-textarea.js","../../../components/form/hook-textarea.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACA;AACA;AACF,0DAAgC;AAChC;AACA;AChBA,4EAAkB;AAClB,gFAAiB;AACjB,gDAAmE;AAM5D,SAAS,gBAAA,CAAwC,EAAA,EAarD;AAbqD,EAAA,IAAA,GAAA,EAAA,EAAA,EACtD;AAAA,IAAA,EAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,EAjBF,EAAA,EAUwD,EAAA,EAQnD,OAAA,EAAA,wCAAA,EARmD,EAQnD;AAAA,IAPH,IAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,YAAA;AAAA,IACA;AAAA,EAAA,CAAA,CAAA;AAOA,EAAA,MAAM,QAAA,EAAU,2CAAA,CAAkB;AAClC,EAAA,GAAA,CAAI,CAAC,OAAA,EAAS,OAAO,IAAA;AAErB,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA,EAAW,EAAE,OAAO;AAAA,EACtB,EAAA,EAAI,OAAA;AAEJ,EAAA,MAAM,WAAA,EAAa,2BAAA,MAAK,EAAQ,IAAI,CAAA;AACpC,EAAA,MAAM,aAAA,EAAe,MAAA,GAAA,KAAA,EAAA,MAAA,EAAU,WAAA,GAAc,MAAA,CAAO,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,OAAO,CAAA;AACvE,EAAA,MAAM,UAAA,EAAY,CAAC,CAAC,WAAA,GAAc,CAAC,QAAA;AAEnC,EAAA,uBACE,eAAA,CAAA,aAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,QAAA,CAAA,kBAC1B,eAAA,CAAA,aAAA;AAAA,IAAC,6BAAA;AAAA,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,KAAK;AAAA,IAAA,CAAA;AAAA,EAClC,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;ADYA;AACE;AACF,4CAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-textarea.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 './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\n\nexport function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextareaProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: 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, rules)}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
@@ -24,7 +24,7 @@ function HookFormTextarea(_a) {
24
24
  var _b = _a, {
25
25
  id,
26
26
  name,
27
- options,
27
+ rules,
28
28
  label,
29
29
  error,
30
30
  classNames,
@@ -32,7 +32,7 @@ function HookFormTextarea(_a) {
32
32
  } = _b, others = __objRest(_b, [
33
33
  "id",
34
34
  "name",
35
- "options",
35
+ "rules",
36
36
  "label",
37
37
  "error",
38
38
  "classNames",
@@ -63,7 +63,7 @@ function HookFormTextarea(_a) {
63
63
  "ring-danger text-danger": showError
64
64
  })
65
65
  },
66
- inputProps: register(name, options)
66
+ inputProps: register(name, rules)
67
67
  })
68
68
  ), showError && /* @__PURE__ */ React.createElement(FormError, { field: name, className: "mt-1", message: errorMessage }));
69
69
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../components/form/hook-textarea.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 './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\n\nexport 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;AAM5D,SAAS,iBAAwC,IAarD;AAbqD,eACtD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAUwD,IAQnD,mBARmD,IAQnD;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
+ {"version":3,"sources":["../../../components/form/hook-textarea.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 './error';\nimport { FormTextarea } from './textarea';\nimport type { FormTextareaProps } from './textarea';\n\nexport function HookFormTextarea<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...others\n}: Omit<FormTextareaProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: 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, rules)}\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;AAM5D,SAAS,iBAAwC,IAarD;AAbqD,eACtD;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAjBF,IAUwD,IAQnD,mBARmD,IAQnD;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,KAAK;AAAA;AAAA,EAClC,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
+ import { FormTimeTextInputProps } from './time-text-input.mjs';
4
+ import './text-input.mjs';
5
+
6
+ type HookFormTimeTextInputProps<T extends FieldValues> = Omit<FormTimeTextInputProps, 'name' | 'inputProps'> & {
7
+ name: Path<T>;
8
+ rules?: RegisterOptions<T, Path<T>>;
9
+ error?: string;
10
+ };
11
+ declare function HookFormTimeTextInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...rest }: HookFormTimeTextInputProps<T>): React__default.JSX.Element | null;
12
+
13
+ export { HookFormTimeTextInput };
@@ -0,0 +1,13 @@
1
+ import React__default from 'react';
2
+ import { FieldValues, Path, RegisterOptions } from 'react-hook-form';
3
+ import { FormTimeTextInputProps } from './time-text-input.js';
4
+ import './text-input.js';
5
+
6
+ type HookFormTimeTextInputProps<T extends FieldValues> = Omit<FormTimeTextInputProps, 'name' | 'inputProps'> & {
7
+ name: Path<T>;
8
+ rules?: RegisterOptions<T, Path<T>>;
9
+ error?: string;
10
+ };
11
+ declare function HookFormTimeTextInput<T extends FieldValues>({ id, name, rules, label, error, classNames, disabled, ...rest }: HookFormTimeTextInputProps<T>): React__default.JSX.Element | null;
12
+
13
+ export { HookFormTimeTextInput };
@@ -0,0 +1,83 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
2
+
3
+
4
+ var _chunkTYI6YBBZjs = require('../../chunk-TYI6YBBZ.js');
5
+ require('../../chunk-KRSIQ2CB.js');
6
+ require('../../chunk-GJJM336N.js');
7
+ require('../../chunk-TV4NNZTS.js');
8
+ require('../../chunk-AXZDZXCY.js');
9
+
10
+
11
+ var _chunkP2BPVQXHjs = require('../../chunk-P2BPVQXH.js');
12
+
13
+
14
+ var _chunkB2G2EZ4Pjs = require('../../chunk-B2G2EZ4P.js');
15
+
16
+
17
+
18
+
19
+ var _chunk2NMEKWO5js = require('../../chunk-2NMEKWO5.js');
20
+
21
+ // components/form/hook-time-text-input.tsx
22
+ var _react = require('react'); var _react2 = _interopRequireDefault(_react);
23
+ var _get2 = require('lodash-es/get'); var _get3 = _interopRequireDefault(_get2);
24
+ var _reacthookform = require('react-hook-form');
25
+ function HookFormTimeTextInput(_a) {
26
+ var _b = _a, {
27
+ id,
28
+ name,
29
+ rules,
30
+ label,
31
+ error,
32
+ classNames,
33
+ disabled
34
+ } = _b, rest = _chunk2NMEKWO5js.__objRest.call(void 0, _b, [
35
+ "id",
36
+ "name",
37
+ "rules",
38
+ "label",
39
+ "error",
40
+ "classNames",
41
+ "disabled"
42
+ ]);
43
+ const methods = _reacthookform.useFormContext.call(void 0, );
44
+ if (!methods) return null;
45
+ const {
46
+ control,
47
+ formState: { errors }
48
+ } = methods;
49
+ const fieldError = _get3.default.call(void 0, errors, name);
50
+ const errorMessage = error != null ? error : fieldError == null ? void 0 : fieldError.message;
51
+ const showError = !!fieldError && !disabled;
52
+ return /* @__PURE__ */ _react2.default.createElement("div", { className: classNames == null ? void 0 : classNames.wrapper }, /* @__PURE__ */ _react2.default.createElement(
53
+ _reacthookform.Controller,
54
+ {
55
+ name,
56
+ control,
57
+ rules,
58
+ render: ({ field: { onChange, onBlur, value } }) => /* @__PURE__ */ _react2.default.createElement(
59
+ _chunkTYI6YBBZjs.FormTimeTextInput,
60
+ _chunk2NMEKWO5js.__spreadProps.call(void 0, _chunk2NMEKWO5js.__spreadValues.call(void 0, {}, rest), {
61
+ name,
62
+ label,
63
+ value,
64
+ onChange,
65
+ onBlur,
66
+ disabled,
67
+ classNames: {
68
+ label: _chunkB2G2EZ4Pjs.cn.call(void 0, classNames == null ? void 0 : classNames.label, {
69
+ "text-danger": showError
70
+ }),
71
+ input: _chunkB2G2EZ4Pjs.cn.call(void 0, classNames == null ? void 0 : classNames.input, {
72
+ "ring-danger text-danger": showError
73
+ })
74
+ }
75
+ })
76
+ )
77
+ }
78
+ ), showError && /* @__PURE__ */ _react2.default.createElement(_chunkP2BPVQXHjs.FormError, { field: name, className: "mt-1", message: errorMessage }));
79
+ }
80
+
81
+
82
+ exports.HookFormTimeTextInput = HookFormTimeTextInput;
83
+ //# sourceMappingURL=hook-time-text-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-time-text-input.js","../../../components/form/hook-time-text-input.tsx"],"names":[],"mappings":"AAAA,qLAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,0DAAgC;AAChC;AACE;AACF,0DAA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AC,EAAE,KAAA,EAAO,EAAE,QAAA,EAAU,MAAA,EAAQ,MAAM,EAAE,CAAA,EAAA,mBAC5C,eAAA,CAAA,aAAA;AAAA,QAAC,kCAAA;AAAA,QAAA,4CAAA,6CAAA,CAAA,CAAA,EACK,IAAA,CAAA,EADL;AAAA,UAEC,IAAA;AAAA,UACA,KAAA;AAAA,UACA,KAAA;AAAA,UACA,QAAA;AAAA,UACA,MAAA;AAAA,UACA,QAAA;AAAA,UACA,UAAA,EAAY;AAAA,YACV,KAAA,EAAO,iCAAA,WAAG,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO;AAAA,cAC3B,aAAA,EAAe;AAAA,YACjB,CAAC,CAAA;AAAA,YACD,KAAA,EAAO,iCAAA,WAAG,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAO;AAAA,cAC3B,yBAAA,EAA2B;AAAA,YAC7B,CAAC;AAAA,UACH;AAAA,QAAA,CAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAEJ,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;ADYA;AACE;AACF,sDAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/hook-time-text-input.js","sourcesContent":[null,"'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { Controller, FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport { FormError } from './error';\nimport { FormTimeTextInput } from './time-text-input';\nimport type { FormTimeTextInputProps } from './time-text-input';\n\ntype HookFormTimeTextInputProps<T extends FieldValues> = Omit<FormTimeTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: RegisterOptions<T, Path<T>>;\n error?: string;\n};\n\nexport function HookFormTimeTextInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...rest\n}: HookFormTimeTextInputProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n control,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError?.message as string);\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { onChange, onBlur, value } }) => (\n <FormTimeTextInput\n {...rest}\n name={name}\n label={label}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n disabled={disabled}\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 />\n )}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"]}
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ import {
3
+ FormTimeTextInput
4
+ } from "../../chunk-ENHV3QCF.mjs";
5
+ import "../../chunk-ASPYSRE6.mjs";
6
+ import "../../chunk-KBUB4CRW.mjs";
7
+ import "../../chunk-JOYUTUGI.mjs";
8
+ import "../../chunk-7W42BHVK.mjs";
9
+ import {
10
+ FormError
11
+ } from "../../chunk-WGV3SHLF.mjs";
12
+ import {
13
+ cn
14
+ } from "../../chunk-3ONILUYO.mjs";
15
+ import {
16
+ __objRest,
17
+ __spreadProps,
18
+ __spreadValues
19
+ } from "../../chunk-YOSPWY5K.mjs";
20
+
21
+ // components/form/hook-time-text-input.tsx
22
+ import React from "react";
23
+ import _get from "lodash-es/get";
24
+ import { Controller, useFormContext } from "react-hook-form";
25
+ function HookFormTimeTextInput(_a) {
26
+ var _b = _a, {
27
+ id,
28
+ name,
29
+ rules,
30
+ label,
31
+ error,
32
+ classNames,
33
+ disabled
34
+ } = _b, rest = __objRest(_b, [
35
+ "id",
36
+ "name",
37
+ "rules",
38
+ "label",
39
+ "error",
40
+ "classNames",
41
+ "disabled"
42
+ ]);
43
+ const methods = useFormContext();
44
+ if (!methods) return null;
45
+ const {
46
+ control,
47
+ formState: { errors }
48
+ } = methods;
49
+ const fieldError = _get(errors, name);
50
+ const errorMessage = error != null ? error : fieldError == null ? void 0 : fieldError.message;
51
+ const showError = !!fieldError && !disabled;
52
+ return /* @__PURE__ */ React.createElement("div", { className: classNames == null ? void 0 : classNames.wrapper }, /* @__PURE__ */ React.createElement(
53
+ Controller,
54
+ {
55
+ name,
56
+ control,
57
+ rules,
58
+ render: ({ field: { onChange, onBlur, value } }) => /* @__PURE__ */ React.createElement(
59
+ FormTimeTextInput,
60
+ __spreadProps(__spreadValues({}, rest), {
61
+ name,
62
+ label,
63
+ value,
64
+ onChange,
65
+ onBlur,
66
+ disabled,
67
+ classNames: {
68
+ label: cn(classNames == null ? void 0 : classNames.label, {
69
+ "text-danger": showError
70
+ }),
71
+ input: cn(classNames == null ? void 0 : classNames.input, {
72
+ "ring-danger text-danger": showError
73
+ })
74
+ }
75
+ })
76
+ )
77
+ }
78
+ ), showError && /* @__PURE__ */ React.createElement(FormError, { field: name, className: "mt-1", message: errorMessage }));
79
+ }
80
+ export {
81
+ HookFormTimeTextInput
82
+ };
83
+ //# sourceMappingURL=hook-time-text-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../components/form/hook-time-text-input.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport _get from 'lodash-es/get';\nimport { Controller, FieldValues, RegisterOptions, Path, useFormContext } from 'react-hook-form';\nimport { cn } from '../../lib/utils';\nimport { FormError } from './error';\nimport { FormTimeTextInput } from './time-text-input';\nimport type { FormTimeTextInputProps } from './time-text-input';\n\ntype HookFormTimeTextInputProps<T extends FieldValues> = Omit<FormTimeTextInputProps, 'name' | 'inputProps'> & {\n name: Path<T>;\n rules?: RegisterOptions<T, Path<T>>;\n error?: string;\n};\n\nexport function HookFormTimeTextInput<T extends FieldValues>({\n id,\n name,\n rules,\n label,\n error,\n classNames,\n disabled,\n ...rest\n}: HookFormTimeTextInputProps<T>) {\n const methods = useFormContext<T>();\n if (!methods) return null;\n\n const {\n control,\n formState: { errors },\n } = methods;\n\n const fieldError = _get(errors, name);\n const errorMessage = error ?? (fieldError?.message as string);\n const showError = !!fieldError && !disabled;\n\n return (\n <div className={classNames?.wrapper}>\n <Controller\n name={name}\n control={control}\n rules={rules}\n render={({ field: { onChange, onBlur, value } }) => (\n <FormTimeTextInput\n {...rest}\n name={name}\n label={label}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n disabled={disabled}\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 />\n )}\n />\n {showError && <FormError field={name} className=\"mt-1\" message={errorMessage} />}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,YAAgD,sBAAsB;AAYxE,SAAS,sBAA6C,IAS3B;AAT2B,eAC3D;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAvBF,IAgB6D,IAQxD,iBARwD,IAQxD;AAAA,IAPH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAGA,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,yCAAY;AAC3C,QAAM,YAAY,CAAC,CAAC,cAAc,CAAC;AAEnC,SACE,oCAAC,SAAI,WAAW,yCAAY,WAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAU,QAAQ,MAAM,EAAE,MAC5C;AAAA,QAAC;AAAA,yCACK,OADL;AAAA,UAEC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,YAAY;AAAA,YACV,OAAO,GAAG,yCAAY,OAAO;AAAA,cAC3B,eAAe;AAAA,YACjB,CAAC;AAAA,YACD,OAAO,GAAG,yCAAY,OAAO;AAAA,cAC3B,2BAA2B;AAAA,YAC7B,CAAC;AAAA,UACH;AAAA;AAAA,MACF;AAAA;AAAA,EAEJ,GACC,aAAa,oCAAC,aAAU,OAAO,MAAM,WAAU,QAAO,SAAS,cAAc,CAChF;AAEJ;","names":[]}
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1 @@
1
+ "use strict";//# sourceMappingURL=multi-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/multi-select.js"],"names":[],"mappings":"AAAA","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/multi-select.js"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=multi-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,23 @@
1
+ import React__default, { SelectHTMLAttributes } from 'react';
2
+
3
+ type NativeSelectProps = SelectHTMLAttributes<HTMLSelectElement>;
4
+ interface SelectOption {
5
+ label: string;
6
+ value: string;
7
+ }
8
+ interface FormNativeSelectProps extends NativeSelectProps {
9
+ id?: string;
10
+ name: string;
11
+ label: string;
12
+ selectProps: NativeSelectProps;
13
+ data: SelectOption[] | string[];
14
+ defaultValue?: string;
15
+ classNames?: {
16
+ wrapper?: string;
17
+ label?: string;
18
+ input?: string;
19
+ };
20
+ }
21
+ declare function FormNativeSelect({ id, name, label, selectProps, data, defaultValue, classNames, required, disabled, ...others }: FormNativeSelectProps): React__default.JSX.Element;
22
+
23
+ export { FormNativeSelect, type FormNativeSelectProps, type SelectOption };
@@ -0,0 +1,23 @@
1
+ import React__default, { SelectHTMLAttributes } from 'react';
2
+
3
+ type NativeSelectProps = SelectHTMLAttributes<HTMLSelectElement>;
4
+ interface SelectOption {
5
+ label: string;
6
+ value: string;
7
+ }
8
+ interface FormNativeSelectProps extends NativeSelectProps {
9
+ id?: string;
10
+ name: string;
11
+ label: string;
12
+ selectProps: NativeSelectProps;
13
+ data: SelectOption[] | string[];
14
+ defaultValue?: string;
15
+ classNames?: {
16
+ wrapper?: string;
17
+ label?: string;
18
+ input?: string;
19
+ };
20
+ }
21
+ declare function FormNativeSelect({ id, name, label, selectProps, data, defaultValue, classNames, required, disabled, ...others }: FormNativeSelectProps): React__default.JSX.Element;
22
+
23
+ export { FormNativeSelect, type FormNativeSelectProps, type SelectOption };
@@ -0,0 +1,11 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
+
3
+
4
+ var _chunkZHHY5JVVjs = require('../../chunk-ZHHY5JVV.js');
5
+ require('../../chunk-AXZDZXCY.js');
6
+ require('../../chunk-B2G2EZ4P.js');
7
+ require('../../chunk-2NMEKWO5.js');
8
+
9
+
10
+ exports.FormNativeSelect = _chunkZHHY5JVVjs.FormNativeSelect;
11
+ //# sourceMappingURL=native-select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/ahnjun/projects/egose-shadcn/package/dist/components/form/native-select.js"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACF,0DAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC,mCAAgC;AAChC;AACE;AACF,6DAAC","file":"/home/ahnjun/projects/egose-shadcn/package/dist/components/form/native-select.js"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import {
3
+ FormNativeSelect
4
+ } from "../../chunk-LFW2GKN3.mjs";
5
+ import "../../chunk-7W42BHVK.mjs";
6
+ import "../../chunk-3ONILUYO.mjs";
7
+ import "../../chunk-YOSPWY5K.mjs";
8
+ export {
9
+ FormNativeSelect
10
+ };
11
+ //# sourceMappingURL=native-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,23 +1,26 @@
1
- import React__default, { SelectHTMLAttributes } from 'react';
1
+ import React__default from 'react';
2
2
 
3
- type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
4
3
  interface SelectOption {
5
4
  label: string;
6
5
  value: string;
7
6
  }
8
- interface FormSelectProps extends SelectProps {
7
+ interface FormSelectProps {
9
8
  id?: string;
10
9
  name: string;
11
10
  label: string;
12
- selectProps: SelectProps;
11
+ placeholder?: string;
13
12
  data: SelectOption[] | string[];
14
13
  defaultValue?: string;
14
+ value?: string;
15
+ onChange: (value?: string) => void;
15
16
  classNames?: {
16
17
  wrapper?: string;
17
18
  label?: string;
18
19
  input?: string;
19
20
  };
21
+ required?: boolean;
22
+ disabled?: boolean;
20
23
  }
21
- declare function FormSelect({ id, name, label, selectProps, data, defaultValue, classNames, required, disabled, ...others }: FormSelectProps): React__default.JSX.Element;
24
+ declare function FormSelect({ id, name, label, placeholder, data, defaultValue, value, onChange, classNames, required, disabled, ...others }: FormSelectProps): React__default.JSX.Element;
22
25
 
23
26
  export { FormSelect, type FormSelectProps, type SelectOption };
@@ -1,23 +1,26 @@
1
- import React__default, { SelectHTMLAttributes } from 'react';
1
+ import React__default from 'react';
2
2
 
3
- type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
4
3
  interface SelectOption {
5
4
  label: string;
6
5
  value: string;
7
6
  }
8
- interface FormSelectProps extends SelectProps {
7
+ interface FormSelectProps {
9
8
  id?: string;
10
9
  name: string;
11
10
  label: string;
12
- selectProps: SelectProps;
11
+ placeholder?: string;
13
12
  data: SelectOption[] | string[];
14
13
  defaultValue?: string;
14
+ value?: string;
15
+ onChange: (value?: string) => void;
15
16
  classNames?: {
16
17
  wrapper?: string;
17
18
  label?: string;
18
19
  input?: string;
19
20
  };
21
+ required?: boolean;
22
+ disabled?: boolean;
20
23
  }
21
- declare function FormSelect({ id, name, label, selectProps, data, defaultValue, classNames, required, disabled, ...others }: FormSelectProps): React__default.JSX.Element;
24
+ declare function FormSelect({ id, name, label, placeholder, data, defaultValue, value, onChange, classNames, required, disabled, ...others }: FormSelectProps): React__default.JSX.Element;
22
25
 
23
26
  export { FormSelect, type FormSelectProps, type SelectOption };
@@ -1,11 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
2
 
3
3
 
4
- var _chunkRUACSQT3js = require('../../chunk-RUACSQT3.js');
4
+ var _chunkPGE7GQZCjs = require('../../chunk-PGE7GQZC.js');
5
+ require('../../chunk-7SHQOSBJ.js');
5
6
  require('../../chunk-AXZDZXCY.js');
6
7
  require('../../chunk-B2G2EZ4P.js');
7
8
  require('../../chunk-2NMEKWO5.js');
8
9
 
9
10
 
10
- exports.FormSelect = _chunkRUACSQT3js.FormSelect;
11
+ exports.FormSelect = _chunkPGE7GQZCjs.FormSelect;
11
12
  //# sourceMappingURL=select.js.map