@levo-so/react 0.1.37 → 0.1.43

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 (191) hide show
  1. package/dist/{Sonner-t6JVKA0a.js → Sonner-BzW9wsXf.js} +11 -11
  2. package/dist/Spinner-DBvVyDMF.js +119 -0
  3. package/dist/Tooltip-BeY_STLA.js +281 -0
  4. package/dist/audience/hooks/useBounce.d.ts.map +1 -1
  5. package/dist/audience/hooks/useCurrentTab.d.ts.map +1 -1
  6. package/dist/audience/hooks/useDownloadSpeed.d.ts.map +1 -1
  7. package/dist/audience/hooks/useIdentifyAudience.d.ts.map +1 -1
  8. package/dist/audience/hooks/useOpenTabs.d.ts.map +1 -1
  9. package/dist/audience/hooks/usePerformanceMetrics.d.ts.map +1 -1
  10. package/dist/audience/index.js +1 -1
  11. package/dist/audience/utils/autocapture.d.ts.map +1 -1
  12. package/dist/components/Dialog.d.ts +2 -0
  13. package/dist/components/Dialog.d.ts.map +1 -1
  14. package/dist/components/DialogWrapper.d.ts +1 -0
  15. package/dist/components/DialogWrapper.d.ts.map +1 -1
  16. package/dist/components/Sonner.d.ts.map +1 -1
  17. package/dist/components/Spinner.d.ts.map +1 -1
  18. package/dist/components/index.js +20 -20
  19. package/dist/index.css +1 -1
  20. package/dist/index.d.ts +0 -1
  21. package/dist/index.js +124 -83
  22. package/dist/isEmptyObject-BoIi0jMB.js +21 -0
  23. package/dist/{jsx-runtime-B6kdoens.js → jsx-runtime-D0AQ1Mn7.js} +216 -217
  24. package/dist/membership/components/Button.d.ts.map +1 -1
  25. package/dist/membership/components/Container.d.ts +1 -0
  26. package/dist/membership/components/Container.d.ts.map +1 -1
  27. package/dist/membership/index.d.ts +2 -1
  28. package/dist/membership/index.d.ts.map +1 -1
  29. package/dist/membership/index.js +155 -81
  30. package/dist/membership/useLevoOAuth.d.ts +17 -0
  31. package/dist/membership/useLevoOAuth.d.ts.map +1 -0
  32. package/dist/{page-BVVduzWl.js → page-DweUjn1K.js} +21 -20
  33. package/dist/providers/index.js +1 -1
  34. package/dist/utils/byteToSize.d.ts.map +1 -1
  35. package/dist/utils/cn.d.ts.map +1 -1
  36. package/dist/utils/errorHandler.d.ts.map +1 -1
  37. package/dist/utils/index.js +10 -12
  38. package/dist/utils/isDateObject.d.ts.map +1 -1
  39. package/dist/utils/isEmptyObject.d.ts.map +1 -1
  40. package/dist/utils/isNullOrUndefined.d.ts.map +1 -1
  41. package/dist/utils/isObject.d.ts.map +1 -1
  42. package/package.json +9 -14
  43. package/dist/Checbox-sq-atGlJ.js +0 -28
  44. package/dist/CheckboxWidget-BR6g2qCr.js +0 -124
  45. package/dist/CollectionFormBuilder-KNHR7ngy.js +0 -1195
  46. package/dist/CurrencyWidget-XHAkyPjV.js +0 -60
  47. package/dist/DateTimeWidget-UaUunQAK.js +0 -80
  48. package/dist/DefaultFormVariant-C8hqkuxx.js +0 -81
  49. package/dist/DropdownWidget-DvObQQMp.js +0 -115
  50. package/dist/EmailWidget-7L0S6tat.js +0 -41
  51. package/dist/FormCaptcha-CgYoGiya.js +0 -187
  52. package/dist/GeocoderWidget-DfghAiuD.js +0 -68
  53. package/dist/Input-Vv7mKQFt.js +0 -54
  54. package/dist/MultiGeocoderWidget-CqwjH855.js +0 -49
  55. package/dist/MultiTextWidget-BMp9xdSv.js +0 -33
  56. package/dist/PhoneWidget-DFP4giY9.js +0 -48
  57. package/dist/RadioWidget-DMWMo2Mj.js +0 -109
  58. package/dist/RichTextWidget-DOCSDDib.js +0 -310
  59. package/dist/Spinner-B4CjY8aw.js +0 -411
  60. package/dist/StepsFormVariant-CUFLCpGE.js +0 -140
  61. package/dist/SwitchWidget-BjpxXOcZ.js +0 -53
  62. package/dist/TextWidget-Cgk_TFqD.js +0 -33
  63. package/dist/TextareaWidget-DGU_Xhrx.js +0 -30
  64. package/dist/ToggleCheckboxWidget-bhmeasG_.js +0 -44
  65. package/dist/Tooltip-DoWyn3Ho.js +0 -37
  66. package/dist/URLWidget-B20QysNc.js +0 -14
  67. package/dist/UploadWidget-SQ1MLpbO.js +0 -656
  68. package/dist/byteToSize-BFKZSBu1.js +0 -8
  69. package/dist/collection/components/Altcha.d.ts +0 -10
  70. package/dist/collection/components/Altcha.d.ts.map +0 -1
  71. package/dist/collection/components/CollectionFormBuilder.d.ts +0 -12
  72. package/dist/collection/components/CollectionFormBuilder.d.ts.map +0 -1
  73. package/dist/collection/components/FieldRenderer.d.ts +0 -9
  74. package/dist/collection/components/FieldRenderer.d.ts.map +0 -1
  75. package/dist/collection/components/FormCaptcha.d.ts +0 -3
  76. package/dist/collection/components/FormCaptcha.d.ts.map +0 -1
  77. package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts +0 -5
  78. package/dist/collection/components/core/AsyncSelectPaginate/AsyncSelectPaginate.d.ts.map +0 -1
  79. package/dist/collection/components/core/Checkbox/Checbox.d.ts +0 -5
  80. package/dist/collection/components/core/Checkbox/Checbox.d.ts.map +0 -1
  81. package/dist/collection/components/core/Input/Input.d.ts +0 -11
  82. package/dist/collection/components/core/Input/Input.d.ts.map +0 -1
  83. package/dist/collection/components/core/Switch/Switch.d.ts +0 -5
  84. package/dist/collection/components/core/Switch/Switch.d.ts.map +0 -1
  85. package/dist/collection/components/renderer/RenderArrayWidget.d.ts +0 -5
  86. package/dist/collection/components/renderer/RenderArrayWidget.d.ts.map +0 -1
  87. package/dist/collection/components/renderer/RenderCommonField.d.ts +0 -5
  88. package/dist/collection/components/renderer/RenderCommonField.d.ts.map +0 -1
  89. package/dist/collection/components/renderer/RenderRecordWidget.d.ts +0 -4
  90. package/dist/collection/components/renderer/RenderRecordWidget.d.ts.map +0 -1
  91. package/dist/collection/components/widgets/ErrorMessage.d.ts +0 -6
  92. package/dist/collection/components/widgets/ErrorMessage.d.ts.map +0 -1
  93. package/dist/collection/components/widgets/FieldWrapper.d.ts +0 -14
  94. package/dist/collection/components/widgets/FieldWrapper.d.ts.map +0 -1
  95. package/dist/collection/components/widgets/FormHelperText.d.ts +0 -6
  96. package/dist/collection/components/widgets/FormHelperText.d.ts.map +0 -1
  97. package/dist/collection/components/widgets/FormLabel.d.ts +0 -8
  98. package/dist/collection/components/widgets/FormLabel.d.ts.map +0 -1
  99. package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts +0 -8
  100. package/dist/collection/components/widgets/checkboxWidget/CheckboxWidget.d.ts.map +0 -1
  101. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts +0 -7
  102. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2M.d.ts.map +0 -1
  103. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2O.d.ts +0 -7
  104. package/dist/collection/components/widgets/collectionWidget/CollectionWidgetM2O.d.ts.map +0 -1
  105. package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts +0 -8
  106. package/dist/collection/components/widgets/collectionWidget/SelectedCollectionItems.d.ts.map +0 -1
  107. package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts +0 -9
  108. package/dist/collection/components/widgets/currencyWidget/CurrencyWidget.d.ts.map +0 -1
  109. package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts +0 -8
  110. package/dist/collection/components/widgets/dateTimeWidget/DateTimeWidget.d.ts.map +0 -1
  111. package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts +0 -9
  112. package/dist/collection/components/widgets/dropdownWidget/DropdownWidget.d.ts.map +0 -1
  113. package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts +0 -8
  114. package/dist/collection/components/widgets/emailWidget/EmailWidget.d.ts.map +0 -1
  115. package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts +0 -8
  116. package/dist/collection/components/widgets/geocoderWidget/GeocoderWidget.d.ts.map +0 -1
  117. package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts +0 -8
  118. package/dist/collection/components/widgets/multiGeocoderWidget/MultiGeocoderWidget.d.ts.map +0 -1
  119. package/dist/collection/components/widgets/multiTextWidget/MultiTextWidget.d.ts +0 -7
  120. package/dist/collection/components/widgets/multiTextWidget/MultiTextWidget.d.ts.map +0 -1
  121. package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts +0 -8
  122. package/dist/collection/components/widgets/phoneWidget/PhoneWidget.d.ts.map +0 -1
  123. package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts +0 -11
  124. package/dist/collection/components/widgets/radioWidget/RadioWidget.d.ts.map +0 -1
  125. package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts +0 -12
  126. package/dist/collection/components/widgets/richTextWidget/RichTextWidget.d.ts.map +0 -1
  127. package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts +0 -8
  128. package/dist/collection/components/widgets/switchWidget/SwitchWidget.d.ts.map +0 -1
  129. package/dist/collection/components/widgets/textWidget/TextWidget.d.ts +0 -9
  130. package/dist/collection/components/widgets/textWidget/TextWidget.d.ts.map +0 -1
  131. package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts +0 -8
  132. package/dist/collection/components/widgets/textareaWidget/TextareaWidget.d.ts.map +0 -1
  133. package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts +0 -8
  134. package/dist/collection/components/widgets/toggleCheckboxWidget/ToggleCheckboxWidget.d.ts.map +0 -1
  135. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts +0 -11
  136. package/dist/collection/components/widgets/uploadWidget/CommonPreview.d.ts.map +0 -1
  137. package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts +0 -11
  138. package/dist/collection/components/widgets/uploadWidget/ExternalURL.d.ts.map +0 -1
  139. package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts +0 -10
  140. package/dist/collection/components/widgets/uploadWidget/FileUploadDropBox.d.ts.map +0 -1
  141. package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts +0 -13
  142. package/dist/collection/components/widgets/uploadWidget/FileUploadModal.d.ts.map +0 -1
  143. package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts +0 -11
  144. package/dist/collection/components/widgets/uploadWidget/ImportFromAssets.d.ts.map +0 -1
  145. package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts +0 -19
  146. package/dist/collection/components/widgets/uploadWidget/UploadWidget.d.ts.map +0 -1
  147. package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts +0 -5
  148. package/dist/collection/components/widgets/urlWidget/URLWidget.d.ts.map +0 -1
  149. package/dist/collection/index.d.ts +0 -5
  150. package/dist/collection/index.d.ts.map +0 -1
  151. package/dist/collection/index.js +0 -20
  152. package/dist/collection/lib/FormBuilder.d.ts +0 -8
  153. package/dist/collection/lib/FormBuilder.d.ts.map +0 -1
  154. package/dist/collection/lib/SaveDraftValues.d.ts +0 -7
  155. package/dist/collection/lib/SaveDraftValues.d.ts.map +0 -1
  156. package/dist/collection/lib/hooks/useLevoForm.d.ts +0 -18
  157. package/dist/collection/lib/hooks/useLevoForm.d.ts.map +0 -1
  158. package/dist/collection/lib/provider/LevoFormProvider.d.ts +0 -9
  159. package/dist/collection/lib/provider/LevoFormProvider.d.ts.map +0 -1
  160. package/dist/collection/lib/variants/DefaultFormVariant.d.ts +0 -3
  161. package/dist/collection/lib/variants/DefaultFormVariant.d.ts.map +0 -1
  162. package/dist/collection/lib/variants/StepsFormVariant.d.ts +0 -4
  163. package/dist/collection/lib/variants/StepsFormVariant.d.ts.map +0 -1
  164. package/dist/collection/types/context.d.ts +0 -34
  165. package/dist/collection/types/context.d.ts.map +0 -1
  166. package/dist/collection/types/errors.d.ts +0 -7
  167. package/dist/collection/types/errors.d.ts.map +0 -1
  168. package/dist/collection/types/formVariant.d.ts +0 -18
  169. package/dist/collection/types/formVariant.d.ts.map +0 -1
  170. package/dist/collection/types/forms.d.ts +0 -31
  171. package/dist/collection/types/forms.d.ts.map +0 -1
  172. package/dist/collection/types/index.d.ts +0 -4
  173. package/dist/collection/types/index.d.ts.map +0 -1
  174. package/dist/collection/types/renderer.d.ts +0 -6
  175. package/dist/collection/types/renderer.d.ts.map +0 -1
  176. package/dist/collection/utils/formHelpers.d.ts +0 -48
  177. package/dist/collection/utils/formHelpers.d.ts.map +0 -1
  178. package/dist/collection/utils/getFieldValidations.d.ts +0 -6
  179. package/dist/collection/utils/getFieldValidations.d.ts.map +0 -1
  180. package/dist/collection/utils/index.d.ts +0 -6
  181. package/dist/collection/utils/index.d.ts.map +0 -1
  182. package/dist/collection/utils/schema.d.ts +0 -3
  183. package/dist/collection/utils/schema.d.ts.map +0 -1
  184. package/dist/collection/utils/setFormErrors.d.ts +0 -4
  185. package/dist/collection/utils/setFormErrors.d.ts.map +0 -1
  186. package/dist/collection/utils/storage.d.ts +0 -11
  187. package/dist/collection/utils/storage.d.ts.map +0 -1
  188. package/dist/errorHandler-_34Yv8wA.js +0 -9
  189. package/dist/isEmptyObject-C5s4GzLE.js +0 -8
  190. package/dist/libs.css +0 -1
  191. package/dist/libs.d.ts +0 -1
@@ -1,411 +0,0 @@
1
- "use client";
2
- import { j as i } from "./jsx-runtime-B6kdoens.js";
3
- import * as f from "@radix-ui/react-tabs";
4
- import * as u from "react";
5
- import g from "react";
6
- import { c } from "./cn-C9QoOYNG.js";
7
- import { Slot as D } from "@radix-ui/react-slot";
8
- import { twMerge as M } from "tailwind-merge";
9
- import { cva as L } from "class-variance-authority";
10
- import * as o from "@radix-ui/react-dialog";
11
- import { X as R } from "lucide-react";
12
- var y = {
13
- color: void 0,
14
- size: void 0,
15
- className: void 0,
16
- style: void 0,
17
- attr: void 0
18
- }, b = g.createContext && /* @__PURE__ */ g.createContext(y), T = ["attr", "size", "title"];
19
- function E(t, e) {
20
- if (t == null) return {};
21
- var a = S(t, e), r, s;
22
- if (Object.getOwnPropertySymbols) {
23
- var l = Object.getOwnPropertySymbols(t);
24
- for (s = 0; s < l.length; s++)
25
- r = l[s], !(e.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(t, r) && (a[r] = t[r]);
26
- }
27
- return a;
28
- }
29
- function S(t, e) {
30
- if (t == null) return {};
31
- var a = {};
32
- for (var r in t)
33
- if (Object.prototype.hasOwnProperty.call(t, r)) {
34
- if (e.indexOf(r) >= 0) continue;
35
- a[r] = t[r];
36
- }
37
- return a;
38
- }
39
- function v() {
40
- return v = Object.assign ? Object.assign.bind() : function(t) {
41
- for (var e = 1; e < arguments.length; e++) {
42
- var a = arguments[e];
43
- for (var r in a)
44
- Object.prototype.hasOwnProperty.call(a, r) && (t[r] = a[r]);
45
- }
46
- return t;
47
- }, v.apply(this, arguments);
48
- }
49
- function x(t, e) {
50
- var a = Object.keys(t);
51
- if (Object.getOwnPropertySymbols) {
52
- var r = Object.getOwnPropertySymbols(t);
53
- e && (r = r.filter(function(s) {
54
- return Object.getOwnPropertyDescriptor(t, s).enumerable;
55
- })), a.push.apply(a, r);
56
- }
57
- return a;
58
- }
59
- function p(t) {
60
- for (var e = 1; e < arguments.length; e++) {
61
- var a = arguments[e] != null ? arguments[e] : {};
62
- e % 2 ? x(Object(a), !0).forEach(function(r) {
63
- k(t, r, a[r]);
64
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(a)) : x(Object(a)).forEach(function(r) {
65
- Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(a, r));
66
- });
67
- }
68
- return t;
69
- }
70
- function k(t, e, a) {
71
- return e = _(e), e in t ? Object.defineProperty(t, e, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = a, t;
72
- }
73
- function _(t) {
74
- var e = A(t, "string");
75
- return typeof e == "symbol" ? e : e + "";
76
- }
77
- function A(t, e) {
78
- if (typeof t != "object" || !t) return t;
79
- var a = t[Symbol.toPrimitive];
80
- if (a !== void 0) {
81
- var r = a.call(t, e || "default");
82
- if (typeof r != "object") return r;
83
- throw new TypeError("@@toPrimitive must return a primitive value.");
84
- }
85
- return (e === "string" ? String : Number)(t);
86
- }
87
- function w(t) {
88
- return t && t.map((e, a) => /* @__PURE__ */ g.createElement(e.tag, p({
89
- key: a
90
- }, e.attr), w(e.child)));
91
- }
92
- function n(t) {
93
- return (e) => /* @__PURE__ */ g.createElement(V, v({
94
- attr: p({}, t.attr)
95
- }, e), w(t.child));
96
- }
97
- function V(t) {
98
- var e = (a) => {
99
- var {
100
- attr: r,
101
- size: s,
102
- title: l
103
- } = t, m = E(t, T), h = s || a.size || "1em", d;
104
- return a.className && (d = a.className), t.className && (d = (d ? d + " " : "") + t.className), /* @__PURE__ */ g.createElement("svg", v({
105
- stroke: "currentColor",
106
- fill: "currentColor",
107
- strokeWidth: "0"
108
- }, a.attr, r, m, {
109
- className: d,
110
- style: p(p({
111
- color: t.color || a.color
112
- }, a.style), t.style),
113
- height: h,
114
- width: h,
115
- xmlns: "http://www.w3.org/2000/svg"
116
- }), l && /* @__PURE__ */ g.createElement("title", null, l), t.children);
117
- };
118
- return b !== void 0 ? /* @__PURE__ */ g.createElement(b.Consumer, null, (a) => e(a)) : e(y);
119
- }
120
- function at(t) {
121
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 7h16v2H4zm0-4h16v2H4zm0 8h16v2H4zm0 4h16v2H4zm2 4h12v2H6z" }, child: [] }] })(t);
122
- }
123
- function rt(t) {
124
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm0-4h11v2H4zm0-4h16v2H4zm0-8h16v2H4zm0 4h11v2H4z" }, child: [] }] })(t);
125
- }
126
- function it(t) {
127
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm3-4h10v2H7zm-3-4h16v2H4zm0-8h16v2H4zm3 4h10v2H7z" }, child: [] }] })(t);
128
- }
129
- function nt(t) {
130
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 19h16v2H4zm5-4h11v2H9zm-5-4h16v2H4zm0-8h16v2H4zm5 4h11v2H9z" }, child: [] }] })(t);
131
- }
132
- function st(t) {
133
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M17.061 11.22A4.46 4.46 0 0 0 18 8.5C18 6.019 15.981 4 13.5 4H6v15h8c2.481 0 4.5-2.019 4.5-4.5a4.48 4.48 0 0 0-1.439-3.28zM13.5 7c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5H9V7h4.5zm.5 9H9v-3h5c.827 0 1.5.673 1.5 1.5S14.827 16 14 16z" }, child: [] }] })(t);
134
- }
135
- function ot(t) {
136
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M13.293 6.293 7.586 12l5.707 5.707 1.414-1.414L10.414 12l4.293-4.293z" }, child: [] }] })(t);
137
- }
138
- function lt(t) {
139
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M10.707 17.707 16.414 12l-5.707-5.707-1.414 1.414L13.586 12l-4.293 4.293z" }, child: [] }] })(t);
140
- }
141
- function ct(t) {
142
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M19 7V4H9v3h2.868L9.012 17H5v3h10v-3h-2.868l2.856-10z" }, child: [] }] })(t);
143
- }
144
- function dt(t) {
145
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M8.465 11.293c1.133-1.133 3.109-1.133 4.242 0l.707.707 1.414-1.414-.707-.707c-.943-.944-2.199-1.465-3.535-1.465s-2.592.521-3.535 1.465L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l2.122-2.121z" }, child: [] }, { tag: "path", attr: { d: "m12 4.929-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121c-1.133 1.133-3.109 1.133-4.242 0L10.586 12l-1.414 1.414.707.707c.943.944 2.199 1.465 3.535 1.465s2.592-.521 3.535-1.465L19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0z" }, child: [] }] })(t);
146
- }
147
- function ut(t) {
148
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5.282 12.064c-.428.328-.72.609-.875.851-.155.24-.249.498-.279.768h2.679v-.748H5.413c.081-.081.152-.151.212-.201.062-.05.182-.142.361-.27.303-.218.511-.42.626-.604.116-.186.173-.375.173-.578a.898.898 0 0 0-.151-.512.892.892 0 0 0-.412-.341c-.174-.076-.419-.111-.733-.111-.3 0-.537.038-.706.114a.889.889 0 0 0-.396.338c-.094.143-.159.346-.194.604l.894.076c.025-.188.074-.317.147-.394a.375.375 0 0 1 .279-.108c.11 0 .2.035.272.108a.344.344 0 0 1 .108.258.55.55 0 0 1-.108.297c-.074.102-.241.254-.503.453zm.055 6.386a.398.398 0 0 1-.282-.105c-.074-.07-.128-.195-.162-.378L4 18.085c.059.204.142.372.251.506.109.133.248.235.417.306.168.069.399.103.692.103.3 0 .541-.047.725-.14a1 1 0 0 0 .424-.403c.098-.175.146-.354.146-.544a.823.823 0 0 0-.088-.393.708.708 0 0 0-.249-.261 1.015 1.015 0 0 0-.286-.11.943.943 0 0 0 .345-.299.673.673 0 0 0 .113-.383.747.747 0 0 0-.281-.596c-.187-.159-.49-.238-.909-.238-.365 0-.648.072-.847.219-.2.143-.334.353-.404.626l.844.151c.023-.162.067-.274.133-.338s.151-.098.257-.098a.33.33 0 0 1 .241.089c.059.06.087.139.087.238 0 .104-.038.193-.117.27s-.177.112-.293.112a.907.907 0 0 1-.116-.011l-.045.649a1.13 1.13 0 0 1 .289-.056c.132 0 .237.041.313.126.077.082.115.199.115.352 0 .146-.04.266-.119.354a.394.394 0 0 1-.301.134zm.948-10.083V5h-.739a1.47 1.47 0 0 1-.394.523c-.168.142-.404.262-.708.365v.754a2.595 2.595 0 0 0 .937-.48v2.206h.904zM9 6h11v2H9zm0 5h11v2H9zm0 5h11v2H9z" }, child: [] }] })(t);
149
- }
150
- function gt(t) {
151
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 6h2v2H4zm0 5h2v2H4zm0 5h2v2H4zm16-8V6H8.023v2H18.8zM8 11h12v2H8zm0 5h12v2H8z" }, child: [] }] })(t);
152
- }
153
- function z(t) {
154
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M12 22c5.421 0 10-4.579 10-10h-2c0 4.337-3.663 8-8 8s-8-3.663-8-8c0-4.336 3.663-8 8-8V2C6.579 2 2 6.58 2 12c0 5.421 4.579 10 10 10z" }, child: [] }] })(t);
155
- }
156
- function ft(t) {
157
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M20 11h-8c-4 0-4-1.816-4-2.5C8 7.882 8 6 12 6c2.8 0 2.99 1.678 3 2.014L16 8h1c0-1.384-1.045-4-5-4-5.416 0-6 3.147-6 4.5 0 .728.148 1.667.736 2.5H4v2h16v-2zm-8 7c-3.793 0-3.99-1.815-4-2H6c0 .04.069 4 6 4 5.221 0 6-2.819 6-4.5 0-.146-.009-.317-.028-.5h-2.006c.032.2.034.376.034.5 0 .684 0 2.5-4 2.5z" }, child: [] }] })(t);
158
- }
159
- function mt(t) {
160
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5 18h14v2H5zM6 4v6c0 3.309 2.691 6 6 6s6-2.691 6-6V4h-2v6c0 2.206-1.794 4-4 4s-4-1.794-4-4V4H6z" }, child: [] }] })(t);
161
- }
162
- function ht(t) {
163
- return n({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M16.949 14.121 19.071 12a5.008 5.008 0 0 0 0-7.071 5.006 5.006 0 0 0-7.071 0l-.707.707 1.414 1.414.707-.707a3.007 3.007 0 0 1 4.243 0 3.005 3.005 0 0 1 0 4.243l-2.122 2.121a2.723 2.723 0 0 1-.844.57L13.414 12l1.414-1.414-.707-.707a4.965 4.965 0 0 0-3.535-1.465c-.235 0-.464.032-.691.066L3.707 2.293 2.293 3.707l18 18 1.414-1.414-5.536-5.536c.277-.184.538-.396.778-.636zm-6.363 3.536a3.007 3.007 0 0 1-4.243 0 3.005 3.005 0 0 1 0-4.243l1.476-1.475-1.414-1.414L4.929 12a5.008 5.008 0 0 0 0 7.071 4.983 4.983 0 0 0 3.535 1.462A4.982 4.982 0 0 0 12 19.071l.707-.707-1.414-1.414-.707.707z" }, child: [] }] })(t);
164
- }
165
- const vt = f.Root, I = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
166
- f.List,
167
- {
168
- ref: a,
169
- className: c(
170
- "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
171
- t
172
- ),
173
- ...e
174
- }
175
- ));
176
- I.displayName = f.List.displayName;
177
- const W = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
178
- f.Trigger,
179
- {
180
- ref: a,
181
- className: c(
182
- "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
183
- t
184
- ),
185
- "data-levo-studio-interactive": "true",
186
- ...e
187
- }
188
- ));
189
- W.displayName = f.Trigger.displayName;
190
- const F = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
191
- f.Content,
192
- {
193
- ref: a,
194
- className: c(
195
- "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
196
- t
197
- ),
198
- ...e
199
- }
200
- ));
201
- F.displayName = f.Content.displayName;
202
- const U = L(
203
- "inline-flex items-center justify-center text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
204
- {
205
- variants: {
206
- variant: {
207
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
208
- destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
209
- destructiveOutline: "border border-red-500 text-destructive bg-transparent shadow-sm hover:bg-destructive hover:text-destructive-foreground",
210
- outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
211
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
212
- secondaryOutline: "bg-transparent border-[1px] border-solid border-white hover:bg-white hover:border-input",
213
- ghost: "hover:bg-accent hover:text-accent-foreground",
214
- link: "text-primary underline-offset-4 hover:underline"
215
- },
216
- size: {
217
- default: "h-10 px-4 py-2",
218
- xs: "h-8 px-3 text-xs",
219
- sm: "h-9 px-3",
220
- lg: "h-11 px-8",
221
- icon: "h-10 w-10",
222
- "icon-small": "h-8 w-8"
223
- },
224
- rounded: {
225
- small: "rounded",
226
- default: "rounded-md",
227
- large: "rounded-lg",
228
- full: "rounded-full"
229
- }
230
- },
231
- defaultVariants: {
232
- variant: "default",
233
- size: "default",
234
- rounded: "default"
235
- }
236
- }
237
- ), G = u.forwardRef(
238
- ({
239
- className: t,
240
- variant: e,
241
- size: a,
242
- rounded: r,
243
- asChild: s = !1,
244
- isLoading: l = !1,
245
- loadingText: m,
246
- disabled: h,
247
- ...d
248
- }, C) => {
249
- const P = s ? D : "button";
250
- return /* @__PURE__ */ i.jsx(
251
- P,
252
- {
253
- className: c(U({ variant: e, size: a, rounded: r, className: t })),
254
- ref: C,
255
- disabled: h || l,
256
- type: "button",
257
- ...d,
258
- children: l ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
259
- /* @__PURE__ */ i.jsx(
260
- z,
261
- {
262
- className: M(
263
- "h-4 w-4 animate-spin",
264
- m ? "mr-2" : ""
265
- )
266
- }
267
- ),
268
- m
269
- ] }) : d.children
270
- }
271
- );
272
- }
273
- );
274
- G.displayName = "Button";
275
- const q = o.Root, pt = o.Trigger, J = o.Portal, bt = o.Close, j = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
276
- o.Overlay,
277
- {
278
- ref: a,
279
- className: c(
280
- "fixed inset-0 z-50 grid max-h-screen place-items-center overflow-y-auto bg-background/80 py-10 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
281
- t
282
- ),
283
- ...e
284
- }
285
- ));
286
- j.displayName = o.Overlay.displayName;
287
- const N = u.forwardRef(({ className: t, children: e, hideCloseButton: a, overlayStyles: r, ...s }, l) => /* @__PURE__ */ i.jsx(J, { children: /* @__PURE__ */ i.jsx(j, { className: r, children: /* @__PURE__ */ i.jsxs(
288
- o.Content,
289
- {
290
- ref: l,
291
- className: c(
292
- "relative z-50 grid w-full max-w-lg gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
293
- t
294
- ),
295
- ...s,
296
- children: [
297
- e,
298
- !a && /* @__PURE__ */ i.jsxs(
299
- o.Close,
300
- {
301
- type: "button",
302
- className: "absolute right-4 top-4 rounded-sm p-1 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
303
- children: [
304
- /* @__PURE__ */ i.jsx(R, { className: "h-4 w-4" }),
305
- /* @__PURE__ */ i.jsx("span", { className: "sr-only", children: "Close" })
306
- ]
307
- }
308
- )
309
- ]
310
- }
311
- ) }) }));
312
- N.displayName = o.Content.displayName;
313
- const H = ({
314
- className: t,
315
- ...e
316
- }) => /* @__PURE__ */ i.jsx(
317
- "div",
318
- {
319
- className: c(
320
- "flex flex-col space-y-1.5 text-center sm:text-left",
321
- t
322
- ),
323
- ...e
324
- }
325
- );
326
- H.displayName = "DialogHeader";
327
- const K = ({
328
- className: t,
329
- ...e
330
- }) => /* @__PURE__ */ i.jsx(
331
- "div",
332
- {
333
- className: c(
334
- "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
335
- t
336
- ),
337
- ...e
338
- }
339
- );
340
- K.displayName = "DialogFooter";
341
- const O = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
342
- o.Title,
343
- {
344
- ref: a,
345
- className: c(
346
- "text-lg font-semibold leading-none tracking-tight",
347
- t
348
- ),
349
- ...e
350
- }
351
- ));
352
- O.displayName = o.Title.displayName;
353
- const B = u.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
354
- o.Description,
355
- {
356
- ref: a,
357
- className: c("text-sm text-muted-foreground", t),
358
- ...e
359
- }
360
- ));
361
- B.displayName = o.Description.displayName;
362
- const xt = ({
363
- isOpen: t,
364
- onClose: e,
365
- children: a,
366
- title: r,
367
- contentClassName: s,
368
- modal: l = !0
369
- }) => /* @__PURE__ */ i.jsx(q, { open: t, onOpenChange: e, modal: l, children: /* @__PURE__ */ i.jsxs(N, { className: s, children: [
370
- r && /* @__PURE__ */ i.jsxs(H, { className: "flex-1 font-medium", children: [
371
- /* @__PURE__ */ i.jsx(O, { children: r }),
372
- /* @__PURE__ */ i.jsx(B, {})
373
- ] }),
374
- /* @__PURE__ */ i.jsx("div", { className: "w-full", children: a })
375
- ] }) }), yt = ({ className: t }) => /* @__PURE__ */ i.jsx(z, { className: c("h-8 w-8 animate-spin font-light", t) });
376
- export {
377
- at as A,
378
- G as B,
379
- ot as C,
380
- q as D,
381
- lt as E,
382
- n as G,
383
- yt as S,
384
- vt as T,
385
- J as a,
386
- U as b,
387
- j as c,
388
- pt as d,
389
- N as e,
390
- H as f,
391
- K as g,
392
- O as h,
393
- B as i,
394
- bt as j,
395
- xt as k,
396
- I as l,
397
- W as m,
398
- F as n,
399
- z as o,
400
- st as p,
401
- ct as q,
402
- mt as r,
403
- ft as s,
404
- gt as t,
405
- ut as u,
406
- dt as v,
407
- ht as w,
408
- rt as x,
409
- it as y,
410
- nt as z
411
- };
@@ -1,140 +0,0 @@
1
- "use client";
2
- import { j as t } from "./jsx-runtime-B6kdoens.js";
3
- import { useState as I, useMemo as y } from "react";
4
- import { FormProvider as T } from "react-hook-form";
5
- import { c as F } from "./cn-C9QoOYNG.js";
6
- import { D as N, F as _ } from "./CollectionFormBuilder-KNHR7ngy.js";
7
- import { u as C, S as H, F as M } from "./FormCaptcha-CgYoGiya.js";
8
- import { B as g } from "./Spinner-B4CjY8aw.js";
9
- const Y = () => {
10
- const [n, a] = I(0), { containerStyles: m } = N(), l = () => {
11
- a((o) => o - 1);
12
- }, s = () => {
13
- a((o) => o + 1);
14
- }, c = (o) => {
15
- a(o);
16
- };
17
- return /* @__PURE__ */ t.jsx("div", { className: F("w-full", m), children: /* @__PURE__ */ t.jsx(
18
- q,
19
- {
20
- currentSectionIndex: n,
21
- handleNext: s,
22
- handlePrev: l,
23
- goToIndex: c
24
- }
25
- ) });
26
- }, q = ({ currentSectionIndex: n, handleNext: a, handlePrev: m, goToIndex: l }) => {
27
- var h, j, v;
28
- const { schema: s, isInternal: c, isDisabled: o, submitButtonConfig: i, uiConfig: d } = N(), r = y(
29
- () => {
30
- var e;
31
- return (e = s == null ? void 0 : s.sections) == null ? void 0 : e[n];
32
- },
33
- [n]
34
- ), w = y(() => {
35
- if (s) {
36
- const e = { ...s };
37
- return r && e && (e.sections = [r]), e;
38
- }
39
- return null;
40
- }, [r]), x = n === Number((h = s == null ? void 0 : s.sections) == null ? void 0 : h.length) - 1, {
41
- methods: u,
42
- handleSubmit: E,
43
- isLoading: L,
44
- handleContentId: D,
45
- isError: P,
46
- allFormValues: V
47
- } = C({
48
- schema: w,
49
- saveToRemote: x,
50
- onSubmit: () => {
51
- a();
52
- },
53
- onSubmitSuccess: () => {
54
- l(0);
55
- },
56
- onSubmitError: (e) => {
57
- var S;
58
- if (Array.isArray(e) && (e != null && e[0])) {
59
- const R = e == null ? void 0 : e[0];
60
- (S = s == null ? void 0 : s.sections) == null || S.forEach((p, z) => {
61
- var b;
62
- ((b = p == null ? void 0 : p.fields) == null ? void 0 : b.find((A) => A.key === R.param)) && l(z);
63
- });
64
- }
65
- }
66
- }), {
67
- formState: { isSubmitting: k }
68
- } = u, f = u.watch("__captcha");
69
- return /* @__PURE__ */ t.jsxs(T, { ...u, children: [
70
- /* @__PURE__ */ t.jsx(
71
- H,
72
- {
73
- getContentId: (e) => D(e),
74
- isError: P,
75
- currentValues: V
76
- }
77
- ),
78
- /* @__PURE__ */ t.jsxs(
79
- "form",
80
- {
81
- className: F(
82
- "border-[rgb(229, 231, 235)] min-h-12 w-full rounded-md border px-4 py-6 text-text-1 md:px-8",
83
- L && "pointer-events-none opacity-50"
84
- ),
85
- id: "collection-form",
86
- onSubmit: E,
87
- children: [
88
- !(d != null && d.hideSectionHeadings) && /* @__PURE__ */ t.jsxs("div", { className: "mb-6 flex items-center justify-between", children: [
89
- /* @__PURE__ */ t.jsx("p", { className: "text-xl font-medium", children: (r == null ? void 0 : r.label) || "Details" }),
90
- /* @__PURE__ */ t.jsxs("p", { children: [
91
- "Step ",
92
- n + 1,
93
- "/",
94
- ((j = s == null ? void 0 : s.sections) == null ? void 0 : j.length) || 1
95
- ] })
96
- ] }),
97
- /* @__PURE__ */ t.jsxs("div", { className: "flex w-full flex-col gap-6", children: [
98
- (v = r == null ? void 0 : r.fields) == null ? void 0 : v.map((e) => e && !e.hidden ? /* @__PURE__ */ t.jsx(
99
- _,
100
- {
101
- field: e,
102
- isInternal: c
103
- },
104
- e == null ? void 0 : e.key
105
- ) : null),
106
- !c && x && /* @__PURE__ */ t.jsx(M, {})
107
- ] }),
108
- /* @__PURE__ */ t.jsxs("div", { className: "mt-8 flex justify-between", children: [
109
- n !== 0 ? /* @__PURE__ */ t.jsx(
110
- g,
111
- {
112
- type: "button",
113
- size: "sm",
114
- onClick: () => {
115
- m();
116
- },
117
- children: "Prev"
118
- }
119
- ) : /* @__PURE__ */ t.jsx("div", {}),
120
- /* @__PURE__ */ t.jsx(
121
- g,
122
- {
123
- type: "submit",
124
- loadingText: "Saving",
125
- size: "sm",
126
- isLoading: k || f === "verifying",
127
- disabled: o,
128
- className: i == null ? void 0 : i.styles,
129
- children: x ? f === "verifying" ? "Verifying..." : (i == null ? void 0 : i.text) || "Save" : "Next"
130
- }
131
- )
132
- ] })
133
- ]
134
- }
135
- )
136
- ] });
137
- };
138
- export {
139
- Y as default
140
- };
@@ -1,53 +0,0 @@
1
- "use client";
2
- import { j as r } from "./jsx-runtime-B6kdoens.js";
3
- import { useController as k } from "react-hook-form";
4
- import { z as w, A as j, B as v } from "./CollectionFormBuilder-KNHR7ngy.js";
5
- import * as c from "@radix-ui/react-switch";
6
- import * as y from "react";
7
- import { c as d } from "./cn-C9QoOYNG.js";
8
- const m = y.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ r.jsx(
9
- c.Root,
10
- {
11
- className: d(
12
- "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
13
- e
14
- ),
15
- ...t,
16
- ref: s,
17
- children: /* @__PURE__ */ r.jsx(
18
- c.Thumb,
19
- {
20
- className: d(
21
- "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
22
- )
23
- }
24
- )
25
- }
26
- ));
27
- m.displayName = c.Root.displayName;
28
- const C = ({ field: e }) => {
29
- var l;
30
- const { key: t = "", label: s = "", helper_text: u = "", readonly: p = !1 } = e, o = t, {
31
- field: { value: h, onBlur: a, onChange: i, ...b },
32
- fieldState: n
33
- } = k({
34
- name: o,
35
- rules: w(e)
36
- }), f = !!(e != null && e.required), x = (l = n == null ? void 0 : n.error) == null ? void 0 : l.message;
37
- return /* @__PURE__ */ r.jsx(j, { error: x, helperText: u, readOnly: p, children: /* @__PURE__ */ r.jsxs("div", { className: "flex w-full max-w-[300px] items-center justify-between", children: [
38
- s && /* @__PURE__ */ r.jsx(v, { htmlFor: o, isRequired: f, className: "!mb-0", children: s }),
39
- /* @__PURE__ */ r.jsx(
40
- m,
41
- {
42
- id: o,
43
- checked: h,
44
- onCheckedChange: (g) => i == null ? void 0 : i(g),
45
- onBlur: () => a == null ? void 0 : a(),
46
- ...b
47
- }
48
- )
49
- ] }) });
50
- };
51
- export {
52
- C as default
53
- };
@@ -1,33 +0,0 @@
1
- import { j as t } from "./jsx-runtime-B6kdoens.js";
2
- import { useFormContext as g, get as h } from "react-hook-form";
3
- import { c as j } from "./cn-C9QoOYNG.js";
4
- import { A as F, B as b, z as y } from "./CollectionFormBuilder-KNHR7ngy.js";
5
- import { I as f } from "./Input-Vv7mKQFt.js";
6
- const k = ({
7
- field: r,
8
- inputStyles: a,
9
- ...m
10
- }) => {
11
- var o;
12
- const {
13
- register: n,
14
- formState: { errors: i, disabled: p }
15
- } = g(), { key: c = "", label: s = "", helper_text: l = "", readonly: x = !1 } = r, e = c, d = !!(r != null && r.required), u = (o = h(i, e)) == null ? void 0 : o.message;
16
- return /* @__PURE__ */ t.jsxs(F, { error: u, helperText: l, children: [
17
- s && /* @__PURE__ */ t.jsx(b, { htmlFor: e, isRequired: d, children: s }),
18
- /* @__PURE__ */ t.jsx(
19
- f,
20
- {
21
- id: e,
22
- className: j(a),
23
- readOnly: x,
24
- disabled: p,
25
- ...n(e, { ...y(r) }),
26
- ...m
27
- }
28
- )
29
- ] });
30
- };
31
- export {
32
- k as default
33
- };
@@ -1,30 +0,0 @@
1
- import { j as s } from "./jsx-runtime-B6kdoens.js";
2
- import { useFormContext as u, get as x } from "react-hook-form";
3
- import { c as b } from "./cn-C9QoOYNG.js";
4
- import { A as g, B as f, z as h } from "./CollectionFormBuilder-KNHR7ngy.js";
5
- const w = ({ field: e }) => {
6
- var a;
7
- const {
8
- register: i,
9
- formState: { errors: n, disabled: l }
10
- } = u(), { key: d = "", label: o = "", helper_text: m = "", readonly: t = !1 } = e, r = d, c = !!(e != null && e.required), p = (a = x(n, r)) == null ? void 0 : a.message;
11
- return /* @__PURE__ */ s.jsxs(g, { error: p, helperText: m, children: [
12
- o && /* @__PURE__ */ s.jsx(f, { htmlFor: r, isRequired: c, children: o }),
13
- /* @__PURE__ */ s.jsx(
14
- "textarea",
15
- {
16
- id: r,
17
- className: b(
18
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
19
- t && "focus-visible:ring-0"
20
- ),
21
- readOnly: t,
22
- disabled: l,
23
- ...i(r, h(e))
24
- }
25
- )
26
- ] });
27
- };
28
- export {
29
- w as default
30
- };