react-hook-form-cloudscape 1.7.4 → 1.7.6

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 (116) hide show
  1. package/chunks/attribute-editor-D_R3yYxI.js +43 -0
  2. package/chunks/attribute-editor-D_R3yYxI.js.map +1 -0
  3. package/chunks/autosuggest-BUuLYkQH.js +52 -0
  4. package/chunks/autosuggest-BUuLYkQH.js.map +1 -0
  5. package/chunks/cards-C8vaDpv2.js +35 -0
  6. package/chunks/cards-C8vaDpv2.js.map +1 -0
  7. package/chunks/checkbox-BLEiMoWo.js +35 -0
  8. package/chunks/checkbox-BLEiMoWo.js.map +1 -0
  9. package/chunks/code-editor-CO-CXW5b.js +35 -0
  10. package/chunks/code-editor-CO-CXW5b.js.map +1 -0
  11. package/chunks/date-picker-EwKV75ek.js +55 -0
  12. package/chunks/date-picker-EwKV75ek.js.map +1 -0
  13. package/chunks/date-range-picker-BIPmrRCt.js +54 -0
  14. package/chunks/date-range-picker-BIPmrRCt.js.map +1 -0
  15. package/chunks/file-upload-D24SwhpK.js +43 -0
  16. package/chunks/file-upload-D24SwhpK.js.map +1 -0
  17. package/chunks/input-C_NAVFVp.js +55 -0
  18. package/chunks/input-C_NAVFVp.js.map +1 -0
  19. package/chunks/jsx-runtime-BFln9wzo.js +634 -0
  20. package/chunks/jsx-runtime-BFln9wzo.js.map +1 -0
  21. package/chunks/multiselect-DSvxGKAc.js +62 -0
  22. package/chunks/multiselect-DSvxGKAc.js.map +1 -0
  23. package/chunks/property-filter-BvTDYnVv.js +34 -0
  24. package/chunks/property-filter-BvTDYnVv.js.map +1 -0
  25. package/chunks/radio-group-DAsz2eKX.js +43 -0
  26. package/chunks/radio-group-DAsz2eKX.js.map +1 -0
  27. package/chunks/s3-resource-selector-b0vS8Pvu.js +43 -0
  28. package/chunks/s3-resource-selector-b0vS8Pvu.js.map +1 -0
  29. package/chunks/select-Cf7jrtl4.js +65 -0
  30. package/chunks/select-Cf7jrtl4.js.map +1 -0
  31. package/chunks/slider-B-NIWZeR.js +44 -0
  32. package/chunks/slider-B-NIWZeR.js.map +1 -0
  33. package/chunks/tag-editor-CBuhtno9.js +43 -0
  34. package/chunks/tag-editor-CBuhtno9.js.map +1 -0
  35. package/chunks/text-filter-jN39H9Rm.js +43 -0
  36. package/chunks/text-filter-jN39H9Rm.js.map +1 -0
  37. package/chunks/textarea-DMR1d9_9.js +51 -0
  38. package/chunks/textarea-DMR1d9_9.js.map +1 -0
  39. package/chunks/tiles-CHvrgSY3.js +35 -0
  40. package/chunks/tiles-CHvrgSY3.js.map +1 -0
  41. package/chunks/time-input-T5R8fO5l.js +51 -0
  42. package/chunks/time-input-T5R8fO5l.js.map +1 -0
  43. package/chunks/toggle-gkdaJrPH.js +44 -0
  44. package/chunks/toggle-gkdaJrPH.js.map +1 -0
  45. package/components/attribute-editor/index.d.ts +1 -0
  46. package/components/attribute-editor/index.js +5 -0
  47. package/components/attribute-editor/index.js.map +1 -0
  48. package/components/autosuggest/index.d.ts +1 -0
  49. package/components/autosuggest/index.js +5 -0
  50. package/components/autosuggest/index.js.map +1 -0
  51. package/components/cards/index.d.ts +1 -0
  52. package/components/cards/index.js +5 -0
  53. package/components/cards/index.js.map +1 -0
  54. package/components/checkbox/index.d.ts +1 -0
  55. package/components/checkbox/index.js +5 -0
  56. package/components/checkbox/index.js.map +1 -0
  57. package/components/code-editor/index.d.ts +1 -0
  58. package/components/code-editor/index.js +5 -0
  59. package/components/code-editor/index.js.map +1 -0
  60. package/components/date-picker/index.d.ts +1 -0
  61. package/components/date-picker/index.js +5 -0
  62. package/components/date-picker/index.js.map +1 -0
  63. package/components/date-range-picker/index.d.ts +1 -0
  64. package/components/date-range-picker/index.js +5 -0
  65. package/components/date-range-picker/index.js.map +1 -0
  66. package/components/file-upload/index.d.ts +1 -0
  67. package/components/file-upload/index.js +5 -0
  68. package/components/file-upload/index.js.map +1 -0
  69. package/components/input/index.d.ts +1 -0
  70. package/components/input/index.js +5 -0
  71. package/components/input/index.js.map +1 -0
  72. package/components/multiselect/index.d.ts +1 -0
  73. package/components/multiselect/index.js +6 -0
  74. package/components/multiselect/index.js.map +1 -0
  75. package/components/property-filter/index.d.ts +1 -0
  76. package/components/property-filter/index.js +5 -0
  77. package/components/property-filter/index.js.map +1 -0
  78. package/components/radio-group/index.d.ts +1 -0
  79. package/components/radio-group/index.js +5 -0
  80. package/components/radio-group/index.js.map +1 -0
  81. package/components/s3-resource-selector/index.d.ts +1 -0
  82. package/components/s3-resource-selector/index.js +5 -0
  83. package/components/s3-resource-selector/index.js.map +1 -0
  84. package/components/select/index.d.ts +1 -0
  85. package/components/select/index.js +6 -0
  86. package/components/select/index.js.map +1 -0
  87. package/components/slider/index.d.ts +1 -0
  88. package/components/slider/index.js +5 -0
  89. package/components/slider/index.js.map +1 -0
  90. package/components/tag-editor/index.d.ts +1 -0
  91. package/components/tag-editor/index.js +5 -0
  92. package/components/tag-editor/index.js.map +1 -0
  93. package/components/text-filter/index.d.ts +1 -0
  94. package/components/text-filter/index.js +5 -0
  95. package/components/text-filter/index.js.map +1 -0
  96. package/components/textarea/index.d.ts +1 -0
  97. package/components/textarea/index.js +5 -0
  98. package/components/textarea/index.js.map +1 -0
  99. package/components/tiles/index.d.ts +1 -0
  100. package/components/tiles/index.js +5 -0
  101. package/components/tiles/index.js.map +1 -0
  102. package/components/time-input/index.d.ts +1 -0
  103. package/components/time-input/index.js +5 -0
  104. package/components/time-input/index.js.map +1 -0
  105. package/components/toggle/index.d.ts +1 -0
  106. package/components/toggle/index.js +5 -0
  107. package/components/toggle/index.js.map +1 -0
  108. package/index.d.ts +21 -1
  109. package/index.js +47 -0
  110. package/index.js.map +1 -0
  111. package/package.json +16 -8
  112. package/components/index.d.ts +0 -21
  113. package/react-hook-form-cloudscape.es.js +0 -1433
  114. package/react-hook-form-cloudscape.es.js.map +0 -1
  115. package/react-hook-form-cloudscape.umd.js +0 -31
  116. package/react-hook-form-cloudscape.umd.js.map +0 -1
@@ -0,0 +1,51 @@
1
+ import { j as a } from "./jsx-runtime-BFln9wzo.js";
2
+ import { Textarea as u } from "@cloudscape-design/components";
3
+ import { useCallback as i } from "react";
4
+ import { Controller as b } from "react-hook-form";
5
+ const v = ({
6
+ name: s,
7
+ control: o,
8
+ defaultValue: m,
9
+ rules: d,
10
+ shouldUnregister: x = !1,
11
+ onBlur: e,
12
+ onChange: l,
13
+ ...f
14
+ }) => {
15
+ const n = i(
16
+ (t, r) => {
17
+ t(), e == null || e(r);
18
+ },
19
+ [e]
20
+ ), p = i(
21
+ (t, r) => {
22
+ t(r.detail.value), l == null || l(r);
23
+ },
24
+ [l]
25
+ );
26
+ return /* @__PURE__ */ a.jsx(
27
+ b,
28
+ {
29
+ control: o,
30
+ defaultValue: m,
31
+ name: s,
32
+ render: ({ field: { onChange: t, onBlur: r, value: c, ref: j } }) => /* @__PURE__ */ a.jsx(
33
+ u,
34
+ {
35
+ ref: j,
36
+ name: s,
37
+ value: c,
38
+ onBlur: n.bind(null, r),
39
+ onChange: p.bind(null, t),
40
+ ...f
41
+ }
42
+ ),
43
+ rules: d,
44
+ shouldUnregister: x
45
+ }
46
+ );
47
+ };
48
+ export {
49
+ v as C
50
+ };
51
+ //# sourceMappingURL=textarea-DMR1d9_9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textarea-DMR1d9_9.js","sources":["../src/components/textarea/textarea.tsx"],"sourcesContent":["import { NonCancelableCustomEvent, Textarea, TextareaProps } from \"@cloudscape-design/components\";\nimport { useCallback } from \"react\";\nimport {\n Control,\n Controller,\n FieldPath,\n FieldPathValue,\n FieldValues,\n Path,\n RegisterOptions,\n} from \"react-hook-form\";\n\nexport interface CTextareaProps<T extends FieldValues> extends Omit<TextareaProps, \"value\"> {\n name: Path<T>;\n control?: Control<T>;\n defaultValue?: FieldPathValue<T, FieldPath<T>>;\n rules?: Omit<RegisterOptions<T, FieldPath<T>>, \"valueAsNumber\" | \"valueAsDate\" | \"setValueAs\" | \"disabled\">;\n shouldUnregister?: boolean;\n}\n\nconst CTextarea = <TFieldValues extends FieldValues>({\n name,\n control,\n defaultValue,\n rules,\n shouldUnregister = false,\n onBlur,\n onChange,\n ...props\n}: CTextareaProps<TFieldValues>) => {\n const handleOnBlur = useCallback(\n (formOnBlur: () => void, e: NonCancelableCustomEvent<null>) => {\n formOnBlur();\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const handleOnChange = useCallback(\n (formOnChange: (value: string) => void, e: NonCancelableCustomEvent<TextareaProps.ChangeDetail>) => {\n formOnChange(e.detail.value);\n onChange?.(e);\n },\n [onChange],\n );\n\n return (\n <Controller\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field: { onChange, onBlur, value, ref } }) => (\n <Textarea\n ref={ref}\n name={name}\n value={value}\n onBlur={handleOnBlur.bind(null, onBlur)}\n onChange={handleOnChange.bind(null, onChange)}\n {...props}\n />\n )}\n rules={rules}\n shouldUnregister={shouldUnregister}\n />\n );\n};\n\nexport default CTextarea;\n"],"names":["CTextarea","name","control","defaultValue","rules","shouldUnregister","onBlur","onChange","props","handleOnBlur","useCallback","formOnBlur","e","handleOnChange","formOnChange","jsx","Controller","value","ref","Textarea"],"mappings":";;;;AAoBA,MAAMA,IAAY,CAAmC;AAAA,EACnD,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAoC;AAClC,QAAMC,IAAeC;AAAA,IACnB,CAACC,GAAwBC,MAAsC;AAClD,MAAAD,EAAA,GACXL,KAAA,QAAAA,EAASM;AAAA,IACX;AAAA,IACA,CAACN,CAAM;AAAA,EACT,GAEMO,IAAiBH;AAAA,IACrB,CAACI,GAAuCF,MAA4D;AACrF,MAAAE,EAAAF,EAAE,OAAO,KAAK,GAC3BL,KAAA,QAAAA,EAAWK;AAAA,IACb;AAAA,IACA,CAACL,CAAQ;AAAA,EACX;AAGE,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAd;AAAA,MACA,cAAAC;AAAA,MACA,MAAAF;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAM,GAAU,QAAAD,GAAQ,OAAAW,GAAO,KAAAC,EAAI,EAC/C,MAAAH,gBAAAA,EAAA;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,KAAAD;AAAA,UACA,MAAAjB;AAAA,UACA,OAAAgB;AAAA,UACA,QAAQR,EAAa,KAAK,MAAMH,CAAM;AAAA,UACtC,UAAUO,EAAe,KAAK,MAAMN,CAAQ;AAAA,UAC3C,GAAGC;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,OAAAJ;AAAA,MACA,kBAAAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -0,0 +1,35 @@
1
+ import { j as s } from "./jsx-runtime-BFln9wzo.js";
2
+ import { Tiles as n } from "@cloudscape-design/components";
3
+ import { useCallback as u } from "react";
4
+ import { Controller as x } from "react-hook-form";
5
+ const C = ({
6
+ name: i,
7
+ control: m,
8
+ onChange: r,
9
+ defaultValue: o,
10
+ rules: a,
11
+ shouldUnregister: f = !1,
12
+ ...l
13
+ }) => {
14
+ const d = u(
15
+ (e, t) => {
16
+ e(t.detail.value), r == null || r(t);
17
+ },
18
+ [r]
19
+ );
20
+ return /* @__PURE__ */ s.jsx(
21
+ x,
22
+ {
23
+ control: m,
24
+ defaultValue: o,
25
+ name: i,
26
+ render: ({ field: { onChange: e, value: t } }) => /* @__PURE__ */ s.jsx(n, { items: l.items, value: t, onChange: d.bind(null, e), ...l }),
27
+ rules: a,
28
+ shouldUnregister: f
29
+ }
30
+ );
31
+ };
32
+ export {
33
+ C
34
+ };
35
+ //# sourceMappingURL=tiles-CHvrgSY3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tiles-CHvrgSY3.js","sources":["../src/components/tiles/tiles.tsx"],"sourcesContent":["import { NonCancelableCustomEvent, Tiles, TilesProps } from \"@cloudscape-design/components\";\nimport { useCallback } from \"react\";\nimport {\n Control,\n Controller,\n FieldPath,\n FieldPathValue,\n FieldValues,\n Path,\n RegisterOptions,\n} from \"react-hook-form\";\n\nexport interface CTilesProps<T extends FieldValues> extends Omit<TilesProps, \"value\"> {\n name: Path<T>;\n control?: Control<T>;\n defaultValue?: FieldPathValue<T, FieldPath<T>>;\n rules?: Omit<RegisterOptions<T, FieldPath<T>>, \"valueAsNumber\" | \"valueAsDate\" | \"setValueAs\" | \"disabled\">;\n shouldUnregister?: boolean;\n}\n\nconst CTiles = <TFieldValues extends FieldValues>({\n name,\n control,\n onChange,\n defaultValue,\n rules,\n shouldUnregister = false,\n ...props\n}: CTilesProps<TFieldValues>) => {\n const handleOnChange = useCallback(\n (formOnChange: (value: string) => void, e: NonCancelableCustomEvent<TilesProps.ChangeDetail>) => {\n formOnChange(e.detail.value);\n onChange?.(e);\n },\n [onChange],\n );\n\n return (\n <Controller\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field: { onChange, value } }) => (\n <Tiles items={props.items} value={value} onChange={handleOnChange.bind(null, onChange)} {...props} />\n )}\n rules={rules}\n shouldUnregister={shouldUnregister}\n />\n );\n};\n\nexport default CTiles;\n"],"names":["CTiles","name","control","onChange","defaultValue","rules","shouldUnregister","props","handleOnChange","useCallback","formOnChange","e","jsx","Controller","value","Tiles"],"mappings":";;;;AAoBA,MAAMA,IAAS,CAAmC;AAAA,EAChD,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,GAAGC;AACL,MAAiC;AAC/B,QAAMC,IAAiBC;AAAA,IACrB,CAACC,GAAuCC,MAAyD;AAClF,MAAAD,EAAAC,EAAE,OAAO,KAAK,GAC3BR,KAAA,QAAAA,EAAWQ;AAAA,IACb;AAAA,IACA,CAACR,CAAQ;AAAA,EACX;AAGE,SAAAS,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAX;AAAA,MACA,cAAAE;AAAA,MACA,MAAAH;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAE,GAAU,OAAAW,IAC5B,MAAAF,gBAAAA,MAACG,KAAM,OAAOR,EAAM,OAAO,OAAAO,GAAc,UAAUN,EAAe,KAAK,MAAML,CAAQ,GAAI,GAAGI,GAAO;AAAA,MAErG,OAAAF;AAAA,MACA,kBAAAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -0,0 +1,51 @@
1
+ import { j as s } from "./jsx-runtime-BFln9wzo.js";
2
+ import { TimeInput as j } from "@cloudscape-design/components";
3
+ import { useCallback as m } from "react";
4
+ import { Controller as b } from "react-hook-form";
5
+ const k = ({
6
+ name: i,
7
+ control: o,
8
+ defaultValue: n,
9
+ rules: p,
10
+ shouldUnregister: d = !1,
11
+ onBlur: l,
12
+ onChange: e,
13
+ ...a
14
+ }) => {
15
+ const f = m(
16
+ (r, t) => {
17
+ r(), l == null || l(t);
18
+ },
19
+ [l]
20
+ ), u = m(
21
+ (r, t) => {
22
+ r(t.detail.value), e == null || e(t);
23
+ },
24
+ [e]
25
+ );
26
+ return /* @__PURE__ */ s.jsx(
27
+ b,
28
+ {
29
+ control: o,
30
+ defaultValue: n,
31
+ name: i,
32
+ render: ({ field: { ref: r, onChange: t, onBlur: x, value: c } }) => /* @__PURE__ */ s.jsx(
33
+ j,
34
+ {
35
+ ref: r,
36
+ name: i,
37
+ value: c,
38
+ onBlur: f.bind(null, x),
39
+ onChange: u.bind(null, t),
40
+ ...a
41
+ }
42
+ ),
43
+ rules: p,
44
+ shouldUnregister: d
45
+ }
46
+ );
47
+ };
48
+ export {
49
+ k as C
50
+ };
51
+ //# sourceMappingURL=time-input-T5R8fO5l.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-input-T5R8fO5l.js","sources":["../src/components/time-input/time-input.tsx"],"sourcesContent":["import { NonCancelableCustomEvent, TimeInput, TimeInputProps } from \"@cloudscape-design/components\";\nimport { useCallback } from \"react\";\nimport {\n Control,\n Controller,\n FieldPath,\n FieldPathValue,\n FieldValues,\n Path,\n RegisterOptions,\n} from \"react-hook-form\";\n\nexport interface CTimeInputProps<T extends FieldValues> extends Omit<TimeInputProps, \"value\"> {\n name: Path<T>;\n control?: Control<T>;\n defaultValue?: FieldPathValue<T, FieldPath<T>>;\n rules?: Omit<RegisterOptions<T, FieldPath<T>>, \"valueAsNumber\" | \"valueAsDate\" | \"setValueAs\" | \"disabled\">;\n shouldUnregister?: boolean;\n}\n\nconst CTimeInput = <TFieldValues extends FieldValues>({\n name,\n control,\n defaultValue,\n rules,\n shouldUnregister = false,\n onBlur,\n onChange,\n ...props\n}: CTimeInputProps<TFieldValues>) => {\n const handleOnBlur = useCallback(\n (formOnBlur: () => void, e: NonCancelableCustomEvent<null>) => {\n formOnBlur();\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const handleOnChange = useCallback(\n (formOnChange: (value: string) => void, e: NonCancelableCustomEvent<TimeInputProps.ChangeDetail>) => {\n formOnChange(e.detail.value);\n onChange?.(e);\n },\n [onChange],\n );\n return (\n <Controller\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field: { ref, onChange, onBlur, value } }) => (\n <TimeInput\n ref={ref}\n name={name}\n value={value as string}\n onBlur={handleOnBlur.bind(null, onBlur)}\n onChange={handleOnChange.bind(null, onChange)}\n {...props}\n />\n )}\n rules={rules}\n shouldUnregister={shouldUnregister}\n />\n );\n};\n\nexport default CTimeInput;\n"],"names":["CTimeInput","name","control","defaultValue","rules","shouldUnregister","onBlur","onChange","props","handleOnBlur","useCallback","formOnBlur","e","handleOnChange","formOnChange","jsx","Controller","ref","value","TimeInput"],"mappings":";;;;AAoBA,MAAMA,IAAa,CAAmC;AAAA,EACpD,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAqC;AACnC,QAAMC,IAAeC;AAAA,IACnB,CAACC,GAAwBC,MAAsC;AAClD,MAAAD,EAAA,GACXL,KAAA,QAAAA,EAASM;AAAA,IACX;AAAA,IACA,CAACN,CAAM;AAAA,EACT,GAEMO,IAAiBH;AAAA,IACrB,CAACI,GAAuCF,MAA6D;AACtF,MAAAE,EAAAF,EAAE,OAAO,KAAK,GAC3BL,KAAA,QAAAA,EAAWK;AAAA,IACb;AAAA,IACA,CAACL,CAAQ;AAAA,EACX;AAEE,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAd;AAAA,MACA,cAAAC;AAAA,MACA,MAAAF;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAAgB,GAAK,UAAAV,GAAU,QAAAD,GAAQ,OAAAY,EAAM,EAC/C,MAAAH,gBAAAA,EAAA;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,KAAAF;AAAA,UACA,MAAAhB;AAAA,UACA,OAAAiB;AAAA,UACA,QAAQT,EAAa,KAAK,MAAMH,CAAM;AAAA,UACtC,UAAUO,EAAe,KAAK,MAAMN,CAAQ;AAAA,UAC3C,GAAGC;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,OAAAJ;AAAA,MACA,kBAAAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -0,0 +1,44 @@
1
+ import { j as t } from "./jsx-runtime-BFln9wzo.js";
2
+ import { Toggle as a } from "@cloudscape-design/components";
3
+ import { useCallback as x } from "react";
4
+ import { Controller as j } from "react-hook-form";
5
+ const g = ({
6
+ name: o,
7
+ control: s,
8
+ defaultValue: i,
9
+ rules: m,
10
+ shouldUnregister: c = !1,
11
+ onChange: r,
12
+ ...d
13
+ }) => {
14
+ const f = x(
15
+ (l, e) => {
16
+ l(e.detail.checked), r == null || r(e);
17
+ },
18
+ [r]
19
+ );
20
+ return /* @__PURE__ */ t.jsx(
21
+ j,
22
+ {
23
+ control: s,
24
+ defaultValue: i,
25
+ name: o,
26
+ render: ({ field: { ref: l, onChange: e, value: p = !1 } }) => /* @__PURE__ */ t.jsx(
27
+ a,
28
+ {
29
+ ref: l,
30
+ checked: p,
31
+ name: o,
32
+ onChange: f.bind(null, e),
33
+ ...d
34
+ }
35
+ ),
36
+ rules: m,
37
+ shouldUnregister: c
38
+ }
39
+ );
40
+ };
41
+ export {
42
+ g as C
43
+ };
44
+ //# sourceMappingURL=toggle-gkdaJrPH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-gkdaJrPH.js","sources":["../src/components/toggle/toggle.tsx"],"sourcesContent":["import { NonCancelableCustomEvent, Toggle, ToggleProps } from \"@cloudscape-design/components\";\nimport { useCallback } from \"react\";\nimport {\n Control,\n Controller,\n FieldPath,\n FieldPathValue,\n FieldValues,\n Path,\n RegisterOptions,\n} from \"react-hook-form\";\n\nexport interface CToggleProps<T extends FieldValues> extends Omit<ToggleProps, \"checked\"> {\n name: Path<T>;\n control: Control<T>;\n defaultValue?: FieldPathValue<T, FieldPath<T>>;\n rules?: Omit<RegisterOptions<T, FieldPath<T>>, \"valueAsNumber\" | \"valueAsDate\" | \"setValueAs\" | \"disabled\">;\n shouldUnregister?: boolean;\n}\n\nconst CToggle = <TFieldValues extends FieldValues>({\n name,\n control,\n defaultValue,\n rules,\n shouldUnregister = false,\n onChange,\n ...props\n}: CToggleProps<TFieldValues>) => {\n const handleOnChange = useCallback(\n (formOnChange: (value: boolean) => void, e: NonCancelableCustomEvent<ToggleProps.ChangeDetail>) => {\n formOnChange(e.detail.checked);\n onChange?.(e);\n },\n [onChange],\n );\n\n return (\n <Controller\n control={control}\n defaultValue={defaultValue}\n name={name}\n render={({ field: { ref, onChange, value = false } }) => (\n <Toggle\n ref={ref}\n checked={value}\n name={name}\n onChange={handleOnChange.bind(null, onChange)}\n {...props}\n />\n )}\n rules={rules}\n shouldUnregister={shouldUnregister}\n />\n );\n};\n\nexport default CToggle;\n"],"names":["CToggle","name","control","defaultValue","rules","shouldUnregister","onChange","props","handleOnChange","useCallback","formOnChange","jsx","Controller","ref","value","Toggle"],"mappings":";;;;AAoBA,MAAMA,IAAU,CAAmC;AAAA,EACjD,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,kBAAAC,IAAmB;AAAA,EACnB,UAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IAAiBC;AAAA,IACrB,CAACC,GAAwC,MAA0D;AACpF,MAAAA,EAAA,EAAE,OAAO,OAAO,GAC7BJ,KAAA,QAAAA,EAAW;AAAA,IACb;AAAA,IACA,CAACA,CAAQ;AAAA,EACX;AAGE,SAAAK,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAV;AAAA,MACA,cAAAC;AAAA,MACA,MAAAF;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAAY,GAAK,UAAAP,GAAU,OAAAQ,IAAQ,GAAM,EAAA,MAC/CH,gBAAAA,EAAA;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,KAAAF;AAAA,UACA,SAASC;AAAA,UACT,MAAAb;AAAA,UACA,UAAUO,EAAe,KAAK,MAAMF,CAAQ;AAAA,UAC3C,GAAGC;AAAA,QAAA;AAAA,MACN;AAAA,MAEF,OAAAH;AAAA,MACA,kBAAAC;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +1,2 @@
1
1
  export { default as CAttributeEditor } from './attribute-editor';
2
+ export type { CAttributeEditorProps } from './attribute-editor';
@@ -0,0 +1,5 @@
1
+ import { C as o } from "../../chunks/attribute-editor-D_R3yYxI.js";
2
+ export {
3
+ o as CAttributeEditor
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CAutosuggest } from './autosuggest';
2
+ export type { CAutosuggestProps } from './autosuggest';
@@ -0,0 +1,5 @@
1
+ import { C as t } from "../../chunks/autosuggest-BUuLYkQH.js";
2
+ export {
3
+ t as CAutosuggest
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CCards } from './cards';
2
+ export type { ControlledCardsProps } from './cards';
@@ -0,0 +1,5 @@
1
+ import { C as a } from "../../chunks/cards-C8vaDpv2.js";
2
+ export {
3
+ a as CCards
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CCheckbox } from './checkbox';
2
+ export type { CCheckboxProps } from './checkbox';
@@ -0,0 +1,5 @@
1
+ import { C as e } from "../../chunks/checkbox-BLEiMoWo.js";
2
+ export {
3
+ e as CCheckbox
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CCodeEditor } from './code-editor';
2
+ export type { CCodeEditorProps } from './code-editor';
@@ -0,0 +1,5 @@
1
+ import { C } from "../../chunks/code-editor-CO-CXW5b.js";
2
+ export {
3
+ C as CCodeEditor
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CDatePicker } from './date-picker';
2
+ export type { CDatePickerProps } from './date-picker';
@@ -0,0 +1,5 @@
1
+ import { C as a } from "../../chunks/date-picker-EwKV75ek.js";
2
+ export {
3
+ a as CDatePicker
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CDateRangePicker } from './date-range-picker';
2
+ export type { CDateRangePickerProps } from './date-range-picker';
@@ -0,0 +1,5 @@
1
+ import { C as r } from "../../chunks/date-range-picker-BIPmrRCt.js";
2
+ export {
3
+ r as CDateRangePicker
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CFileUpload } from './file-upload';
2
+ export type { ControlledFileUploadProps } from './file-upload';
@@ -0,0 +1,5 @@
1
+ import { C as e } from "../../chunks/file-upload-D24SwhpK.js";
2
+ export {
3
+ e as CFileUpload
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CInput } from './input';
2
+ export type { CInputProps } from './input';
@@ -0,0 +1,5 @@
1
+ import { C as r } from "../../chunks/input-C_NAVFVp.js";
2
+ export {
3
+ r as CInput
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +1,3 @@
1
1
  export { default as CMultiselect } from './multiselect';
2
+ export type { ControlledMultiselectProps } from './multiselect';
2
3
  export { default as MultiSelectUtils } from './utils';
@@ -0,0 +1,6 @@
1
+ import { C as l, M as s } from "../../chunks/multiselect-DSvxGKAc.js";
2
+ export {
3
+ l as CMultiselect,
4
+ s as MultiSelectUtils
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CPropertyFilter } from './property-filter';
2
+ export type { ControlledPropertyFilterProps } from './property-filter';
@@ -0,0 +1,5 @@
1
+ import { C as o } from "../../chunks/property-filter-BvTDYnVv.js";
2
+ export {
3
+ o as CPropertyFilter
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CRadioGroup } from './radio-group';
2
+ export type { CRadioGroupProps } from './radio-group';
@@ -0,0 +1,5 @@
1
+ import { C as a } from "../../chunks/radio-group-DAsz2eKX.js";
2
+ export {
3
+ a as CRadioGroup
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CS3ResourceSelector } from './s3-resource-selector';
2
+ export type { ControlledS3ResourceSelectorProps } from './s3-resource-selector';
@@ -0,0 +1,5 @@
1
+ import { C as r } from "../../chunks/s3-resource-selector-b0vS8Pvu.js";
2
+ export {
3
+ r as CS3ResourceSelector
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +1,3 @@
1
1
  export { default as CSelect } from './select';
2
+ export type { CSelectProps } from './select';
2
3
  export { default as SelectUtils } from './utils';
@@ -0,0 +1,6 @@
1
+ import { C as l, S as s } from "../../chunks/select-Cf7jrtl4.js";
2
+ export {
3
+ l as CSelect,
4
+ s as SelectUtils
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CSlider } from './slider';
2
+ export type { CSliderProps } from './slider';
@@ -0,0 +1,5 @@
1
+ import { C as o } from "../../chunks/slider-B-NIWZeR.js";
2
+ export {
3
+ o as CSlider
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CTagEditor } from './tag-editor';
2
+ export type { CTagEditorProps } from './tag-editor';
@@ -0,0 +1,5 @@
1
+ import { C as a } from "../../chunks/tag-editor-CBuhtno9.js";
2
+ export {
3
+ a as CTagEditor
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CTextFilter } from './text-filter';
2
+ export type { CTextFilterProps } from './text-filter';
@@ -0,0 +1,5 @@
1
+ import { C as t } from "../../chunks/text-filter-jN39H9Rm.js";
2
+ export {
3
+ t as CTextFilter
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CTextarea } from './textarea';
2
+ export type { CTextareaProps } from './textarea';
@@ -0,0 +1,5 @@
1
+ import { C as r } from "../../chunks/textarea-DMR1d9_9.js";
2
+ export {
3
+ r as CTextarea
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CTiles } from './tiles';
2
+ export type { CTilesProps } from './tiles';
@@ -0,0 +1,5 @@
1
+ import { C as r } from "../../chunks/tiles-CHvrgSY3.js";
2
+ export {
3
+ r as CTiles
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CTimeInput } from './time-input';
2
+ export type { CTimeInputProps } from './time-input';
@@ -0,0 +1,5 @@
1
+ import { C as o } from "../../chunks/time-input-T5R8fO5l.js";
2
+ export {
3
+ o as CTimeInput
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +1,2 @@
1
1
  export { default as CToggle } from './toggle';
2
+ export type { CToggleProps } from './toggle';
@@ -0,0 +1,5 @@
1
+ import { C as g } from "../../chunks/toggle-gkdaJrPH.js";
2
+ export {
3
+ g as CToggle
4
+ };
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/index.d.ts CHANGED
@@ -1 +1,21 @@
1
- export * from './components/index';
1
+ export * from './components/input';
2
+ export * from './components/checkbox';
3
+ export * from './components/select';
4
+ export * from './components/textarea';
5
+ export * from './components/date-picker';
6
+ export * from './components/date-range-picker';
7
+ export * from './components/file-upload';
8
+ export * from './components/multiselect';
9
+ export * from './components/property-filter';
10
+ export * from './components/radio-group';
11
+ export * from './components/s3-resource-selector';
12
+ export * from './components/slider';
13
+ export * from './components/tag-editor';
14
+ export * from './components/text-filter';
15
+ export * from './components/time-input';
16
+ export * from './components/toggle';
17
+ export * from './components/autosuggest';
18
+ export * from './components/cards';
19
+ export * from './components/code-editor';
20
+ export * from './components/attribute-editor';
21
+ export * from './components/tiles';
package/index.js ADDED
@@ -0,0 +1,47 @@
1
+ import { C as e } from "./chunks/input-C_NAVFVp.js";
2
+ import { C } from "./chunks/checkbox-BLEiMoWo.js";
3
+ import { C as s, S as p } from "./chunks/select-Cf7jrtl4.js";
4
+ import { C as m } from "./chunks/textarea-DMR1d9_9.js";
5
+ import { C as i } from "./chunks/date-picker-EwKV75ek.js";
6
+ import { C as c } from "./chunks/date-range-picker-BIPmrRCt.js";
7
+ import { C as d } from "./chunks/file-upload-D24SwhpK.js";
8
+ import { C as g, M as T } from "./chunks/multiselect-DSvxGKAc.js";
9
+ import { C as n } from "./chunks/property-filter-BvTDYnVv.js";
10
+ import { C as F } from "./chunks/radio-group-DAsz2eKX.js";
11
+ import { C as P } from "./chunks/s3-resource-selector-b0vS8Pvu.js";
12
+ import { C as U } from "./chunks/slider-B-NIWZeR.js";
13
+ import { C as A } from "./chunks/tag-editor-CBuhtno9.js";
14
+ import { C as I } from "./chunks/text-filter-jN39H9Rm.js";
15
+ import { C as y } from "./chunks/time-input-T5R8fO5l.js";
16
+ import { C as j } from "./chunks/toggle-gkdaJrPH.js";
17
+ import { C as v } from "./chunks/autosuggest-BUuLYkQH.js";
18
+ import { C as z } from "./chunks/cards-C8vaDpv2.js";
19
+ import { C as H } from "./chunks/code-editor-CO-CXW5b.js";
20
+ import { C as K } from "./chunks/attribute-editor-D_R3yYxI.js";
21
+ import { C as N } from "./chunks/tiles-CHvrgSY3.js";
22
+ export {
23
+ K as CAttributeEditor,
24
+ v as CAutosuggest,
25
+ z as CCards,
26
+ C as CCheckbox,
27
+ H as CCodeEditor,
28
+ i as CDatePicker,
29
+ c as CDateRangePicker,
30
+ d as CFileUpload,
31
+ e as CInput,
32
+ g as CMultiselect,
33
+ n as CPropertyFilter,
34
+ F as CRadioGroup,
35
+ P as CS3ResourceSelector,
36
+ s as CSelect,
37
+ U as CSlider,
38
+ A as CTagEditor,
39
+ I as CTextFilter,
40
+ m as CTextarea,
41
+ N as CTiles,
42
+ y as CTimeInput,
43
+ j as CToggle,
44
+ T as MultiSelectUtils,
45
+ p as SelectUtils
46
+ };
47
+ //# sourceMappingURL=index.js.map
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}