dgz-ui-shared 1.2.22 → 1.2.24

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 (42) hide show
  1. package/dist/chunks/MyInput-BXVrCIS_.cjs.js +2 -0
  2. package/dist/chunks/{MyInput-DOJNbPnV.cjs.js.map → MyInput-BXVrCIS_.cjs.js.map} +1 -1
  3. package/dist/chunks/MyInput-y2xZ3Bb9.es.js +51 -0
  4. package/dist/chunks/{MyInput-VyzguJnO.es.js.map → MyInput-y2xZ3Bb9.es.js.map} +1 -1
  5. package/dist/chunks/MySelect-CUgwH6oV.es.js +56 -0
  6. package/dist/chunks/{MySelect-DzvUAkVs.es.js.map → MySelect-CUgwH6oV.es.js.map} +1 -1
  7. package/dist/chunks/MySelect-DrHeuMYE.cjs.js +2 -0
  8. package/dist/chunks/{MySelect-C7tnOKUF.cjs.js.map → MySelect-DrHeuMYE.cjs.js.map} +1 -1
  9. package/dist/chunks/{PasswordConfirm-CU25xH0G.es.js → PasswordConfirm-B6kl3v24.es.js} +2 -2
  10. package/dist/chunks/{PasswordConfirm-CU25xH0G.es.js.map → PasswordConfirm-B6kl3v24.es.js.map} +1 -1
  11. package/dist/chunks/{PasswordConfirm-C8_4iAeF.cjs.js → PasswordConfirm-CtbStDkd.cjs.js} +2 -2
  12. package/dist/chunks/{PasswordConfirm-C8_4iAeF.cjs.js.map → PasswordConfirm-CtbStDkd.cjs.js.map} +1 -1
  13. package/dist/chunks/{Search-6BG3dnM9.cjs.js → Search-CO-HJ0n9.cjs.js} +2 -2
  14. package/dist/chunks/{Search-6BG3dnM9.cjs.js.map → Search-CO-HJ0n9.cjs.js.map} +1 -1
  15. package/dist/chunks/{Search-Y51oT-uZ.es.js → Search-DVIxJaym.es.js} +3 -3
  16. package/dist/chunks/{Search-Y51oT-uZ.es.js.map → Search-DVIxJaym.es.js.map} +1 -1
  17. package/dist/components/confirm/index.cjs.js +1 -1
  18. package/dist/components/confirm/index.es.js +1 -1
  19. package/dist/components/datatable/index.cjs.js +1 -1
  20. package/dist/components/datatable/index.es.js +1 -1
  21. package/dist/components/filters/index.cjs.js +1 -1
  22. package/dist/components/filters/index.es.js +1 -1
  23. package/dist/components/form/index.cjs.js +1 -1
  24. package/dist/components/form/index.cjs.js.map +1 -1
  25. package/dist/components/form/index.es.js +140 -130
  26. package/dist/components/form/index.es.js.map +1 -1
  27. package/dist/hooks/index.cjs.js +1 -1
  28. package/dist/hooks/index.es.js +1 -1
  29. package/dist/types/App.d.ts.map +1 -1
  30. package/dist/types/components/form/MyDatePicker.d.ts.map +1 -1
  31. package/dist/types/components/form/MyDateRangePicker.d.ts.map +1 -1
  32. package/dist/types/components/form/MyHtmlEditor.d.ts.map +1 -1
  33. package/dist/types/components/form/MyInput.d.ts.map +1 -1
  34. package/dist/types/components/form/MyMaskInput.d.ts.map +1 -1
  35. package/dist/types/components/form/MySelect.d.ts.map +1 -1
  36. package/dist/types/components/form/MyTextarea.d.ts.map +1 -1
  37. package/dist/types/components/form/MyTimePicker.d.ts.map +1 -1
  38. package/package.json +2 -2
  39. package/dist/chunks/MyInput-DOJNbPnV.cjs.js +0 -2
  40. package/dist/chunks/MyInput-VyzguJnO.es.js +0 -51
  41. package/dist/chunks/MySelect-C7tnOKUF.cjs.js +0 -2
  42. package/dist/chunks/MySelect-DzvUAkVs.es.js +0 -56
@@ -1,31 +1,31 @@
1
- import { FormField as h, FormLabel as u, FormItem as N, FormControl as g, Checkbox as I, Input as w, FormMessage as p, HtmlEditor as C, MaskInput as S, RadioGroupItem as T, Switch as D, Textarea as R } from "dgz-ui/form";
1
+ import { FormField as g, FormLabel as N, FormItem as k, FormControl as p, Checkbox as I, Input as w, FormMessage as x, HtmlEditor as M, MaskInput as T, RadioGroupItem as D, Switch as R, Textarea as E } from "dgz-ui/form";
2
2
  export * from "dgz-ui/form";
3
3
  import { jsx as e, jsxs as i } from "react/jsx-runtime";
4
4
  import { useId as y } from "react";
5
- import { DATE as E, Calendar as $, TimePicker as f } from "dgz-ui/calendar";
6
- import { Popover as j, PopoverTrigger as z, PopoverContent as A } from "dgz-ui/popover";
7
- import { cn as m, dayjs as H } from "dgz-ui/utils";
8
- import { l as v } from "../../chunks/lodash-CRDOWzbs.es.js";
5
+ import { DATE as $, Calendar as j, TimePicker as f } from "dgz-ui/calendar";
6
+ import { Popover as S, PopoverTrigger as z, PopoverContent as A } from "dgz-ui/popover";
7
+ import { cn as u, dayjs as H } from "dgz-ui/utils";
8
+ import { l as m } from "../../chunks/lodash-CRDOWzbs.es.js";
9
9
  import { Calendar1 as G } from "lucide-react";
10
10
  import { D as L } from "../../chunks/DateRangePicker-DeoV3xqL.es.js";
11
- import { M as oe } from "../../chunks/MyInput-VyzguJnO.es.js";
12
- import { M as de } from "../../chunks/MySelect-DzvUAkVs.es.js";
11
+ import { M as oe } from "../../chunks/MyInput-y2xZ3Bb9.es.js";
12
+ import { M as de } from "../../chunks/MySelect-CUgwH6oV.es.js";
13
13
  const W = ({
14
- control: a,
14
+ control: s,
15
15
  name: r,
16
- label: s,
16
+ label: a,
17
17
  rules: n,
18
18
  ...t
19
19
  }) => {
20
20
  const c = y();
21
- return r && a && /* @__PURE__ */ e(
22
- h,
21
+ return r && s && /* @__PURE__ */ e(
22
+ g,
23
23
  {
24
- control: a,
24
+ control: s,
25
25
  name: r,
26
26
  rules: n,
27
- render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
28
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
27
+ render: ({ field: l }) => /* @__PURE__ */ e(N, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(k, { className: "flex flex-row items-start gap-3", children: [
28
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
29
29
  I,
30
30
  {
31
31
  id: t.id || c,
@@ -34,55 +34,55 @@ const W = ({
34
34
  ...t
35
35
  }
36
36
  ) }),
37
- /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: s && /* @__PURE__ */ e("div", { children: s }) })
37
+ /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: a && /* @__PURE__ */ e("div", { children: a }) })
38
38
  ] }) })
39
39
  }
40
40
  ) || null;
41
41
  }, X = ({
42
- control: a,
42
+ control: s,
43
43
  name: r,
44
- label: s,
44
+ label: a,
45
45
  required: n,
46
46
  rules: t,
47
- format: c = E,
47
+ format: c = $,
48
48
  floatingError: l,
49
49
  placeholder: o,
50
50
  disabled: d,
51
- register: k,
52
- className: M,
53
- inputProps: b,
54
- ...F
55
- }) => r && a && /* @__PURE__ */ e(
56
- h,
51
+ register: h,
52
+ className: b,
53
+ inputProps: F,
54
+ ...P
55
+ }) => r && s && /* @__PURE__ */ e(
56
+ g,
57
57
  {
58
- control: a,
58
+ control: s,
59
59
  name: r,
60
60
  rules: t,
61
- render: ({ field: x, formState: P }) => /* @__PURE__ */ i(N, { children: [
62
- s && /* @__PURE__ */ i(u, { className: "block", children: [
63
- s,
61
+ render: ({ field: v, formState: C }) => /* @__PURE__ */ i(k, { children: [
62
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
63
+ a,
64
64
  " ",
65
65
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
66
66
  ] }),
67
- /* @__PURE__ */ i(j, { children: [
68
- /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ i("div", { className: "relative", children: [
67
+ /* @__PURE__ */ i(S, { children: [
68
+ /* @__PURE__ */ e(z, { asChild: !0, children: /* @__PURE__ */ e(p, { children: /* @__PURE__ */ i("div", { className: "relative", children: [
69
69
  /* @__PURE__ */ e(
70
70
  w,
71
71
  {
72
- ...b,
73
- variant: v.get(P.errors, `${r}.message`) ? "failure" : "default",
72
+ ...F,
73
+ variant: m.get(C.errors, `${r}.message`) ? "failure" : "default",
74
74
  disabled: d,
75
- ...x,
75
+ ...v,
76
76
  readOnly: !0,
77
77
  placeholder: o || "Pick a date",
78
- value: H(x.value).format(c),
79
- className: m("m-0 text-start", M)
78
+ value: H(v.value).format(c),
79
+ className: u("m-0 text-start", b)
80
80
  }
81
81
  ),
82
82
  /* @__PURE__ */ e(
83
83
  G,
84
84
  {
85
- className: m(
85
+ className: u(
86
86
  "text-secondary absolute top-2.5 right-2 size-5",
87
87
  d && "pointer-events-none opacity-50"
88
88
  )
@@ -90,108 +90,113 @@ const W = ({
90
90
  )
91
91
  ] }) }) }),
92
92
  !d && /* @__PURE__ */ e(A, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ e(
93
- $,
93
+ j,
94
94
  {
95
- ...F,
95
+ ...P,
96
96
  mode: "single",
97
- selected: x.value,
98
- onSelect: x.onChange
97
+ selected: v.value,
98
+ onSelect: v.onChange
99
99
  }
100
100
  ) })
101
101
  ] }),
102
- /* @__PURE__ */ e(
103
- p,
102
+ m.get(C.errors, r, "") && /* @__PURE__ */ e(
103
+ x,
104
104
  {
105
- className: m(l && "absolute -bottom-5")
105
+ className: u(l && "absolute -bottom-5")
106
106
  }
107
107
  )
108
108
  ] })
109
109
  }
110
110
  ) || null, Y = ({
111
- control: a,
111
+ control: s,
112
112
  name: r,
113
- label: s,
113
+ label: a,
114
114
  required: n,
115
115
  rules: t,
116
116
  placeholder: c,
117
117
  floatingError: l,
118
118
  ...o
119
- }) => r && a && /* @__PURE__ */ e(
120
- h,
119
+ }) => r && s && /* @__PURE__ */ e(
120
+ g,
121
121
  {
122
- control: a,
122
+ control: s,
123
123
  name: r,
124
124
  rules: t,
125
- render: ({ field: d, formState: k }) => /* @__PURE__ */ i(N, { children: [
126
- s && /* @__PURE__ */ i(u, { className: "block", children: [
127
- s,
125
+ render: ({ field: d, formState: h }) => /* @__PURE__ */ i(k, { children: [
126
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
127
+ a,
128
128
  " ",
129
129
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
130
130
  ] }),
131
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
131
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
132
132
  L,
133
133
  {
134
134
  ...o,
135
- error: `${v.get(k.errors, r, "")}`,
135
+ error: `${m.get(h.errors, r, "")}`,
136
136
  selected: d.value,
137
137
  onRangeSelected: d.onChange,
138
138
  placeholder: c
139
139
  }
140
- ) }),
141
- /* @__PURE__ */ e(
142
- p,
140
+ ) }) }),
141
+ m.get(h.errors, r, "") && /* @__PURE__ */ e(
142
+ x,
143
143
  {
144
- className: m(l && "absolute -bottom-5")
144
+ className: u(l && "absolute -bottom-5")
145
145
  }
146
146
  )
147
147
  ] })
148
148
  }
149
149
  ) || null, Z = ({
150
- control: a,
150
+ control: s,
151
151
  name: r,
152
- label: s,
152
+ label: a,
153
153
  rules: n,
154
154
  required: t,
155
155
  floatingError: c,
156
156
  ...l
157
- }) => r && a ? /* @__PURE__ */ e(
158
- h,
157
+ }) => r && s ? /* @__PURE__ */ e(
158
+ g,
159
159
  {
160
- control: a,
160
+ control: s,
161
161
  name: r,
162
162
  rules: n,
163
- render: ({ field: o }) => /* @__PURE__ */ i(N, { children: [
164
- s && /* @__PURE__ */ i(u, { className: "block", children: [
165
- s,
163
+ render: ({ field: o }) => /* @__PURE__ */ i(k, { children: [
164
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
165
+ a,
166
166
  " ",
167
167
  t && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
168
168
  ] }),
169
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...o, ...l }) }),
170
- /* @__PURE__ */ e(p, { className: m(c && "absolute -bottom-5") })
169
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(M, { ...o, ...l }) }),
170
+ m.get(formState.errors, r, "") && /* @__PURE__ */ e(
171
+ x,
172
+ {
173
+ className: u(c && "absolute -bottom-5")
174
+ }
175
+ )
171
176
  ] })
172
177
  }
173
- ) : /* @__PURE__ */ e(C, { ...l }), ee = ({
174
- control: a,
178
+ ) : /* @__PURE__ */ e(M, { ...l }), ee = ({
179
+ control: s,
175
180
  name: r,
176
- label: s,
181
+ label: a,
177
182
  rules: n,
178
183
  required: t,
179
184
  floatingError: c,
180
185
  ...l
181
- }) => r && a && /* @__PURE__ */ e(
182
- h,
186
+ }) => r && s && /* @__PURE__ */ e(
187
+ g,
183
188
  {
184
- control: a,
189
+ control: s,
185
190
  name: r,
186
191
  rules: n,
187
- render: ({ field: o, formState: d }) => /* @__PURE__ */ i(N, { children: [
188
- s && /* @__PURE__ */ i(u, { className: "block", children: [
189
- s,
192
+ render: ({ field: o, formState: d }) => /* @__PURE__ */ i(k, { children: [
193
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
194
+ a,
190
195
  " ",
191
196
  t && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
192
197
  ] }),
193
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
194
- S,
198
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
199
+ T,
195
200
  {
196
201
  thousandsSeparator: " ",
197
202
  lazy: !1,
@@ -199,36 +204,36 @@ const W = ({
199
204
  unmask: !0,
200
205
  ...o,
201
206
  ...l,
202
- variant: v.get(d.errors, `${r}.message`) ? "failure" : "default",
203
- onAccept: (k) => o.onChange(k)
207
+ variant: m.get(d.errors, `${r}.message`) ? "failure" : "default",
208
+ onAccept: (h) => o.onChange(h)
204
209
  }
205
210
  ) }),
206
- /* @__PURE__ */ e(
207
- p,
211
+ m.get(d.errors, r, "") && /* @__PURE__ */ e(
212
+ x,
208
213
  {
209
- className: m(c && "absolute -bottom-5")
214
+ className: u(c && "absolute -bottom-5")
210
215
  }
211
216
  )
212
217
  ] })
213
218
  }
214
219
  ) || null, re = ({
215
- control: a,
220
+ control: s,
216
221
  name: r,
217
- label: s,
222
+ label: a,
218
223
  rules: n,
219
224
  value: t,
220
225
  ...c
221
226
  }) => {
222
227
  const l = y();
223
- return r && a && /* @__PURE__ */ e(
224
- h,
228
+ return r && s && /* @__PURE__ */ e(
229
+ g,
225
230
  {
226
- control: a,
231
+ control: s,
227
232
  name: r,
228
233
  rules: n,
229
- render: ({ field: o }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: c.id || l, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
230
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
231
- T,
234
+ render: ({ field: o }) => /* @__PURE__ */ e(N, { className: "block", htmlFor: c.id || l, children: /* @__PURE__ */ i(k, { className: "flex flex-row items-start gap-3", children: [
235
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
236
+ D,
232
237
  {
233
238
  id: c.id || l,
234
239
  value: t,
@@ -239,27 +244,27 @@ const W = ({
239
244
  ...c
240
245
  }
241
246
  ) }),
242
- /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: s && /* @__PURE__ */ e("div", { children: s }) })
247
+ /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: a && /* @__PURE__ */ e("div", { children: a }) })
243
248
  ] }) })
244
249
  }
245
250
  ) || null;
246
- }, ae = ({
247
- control: a,
251
+ }, se = ({
252
+ control: s,
248
253
  name: r,
249
- label: s,
254
+ label: a,
250
255
  rules: n,
251
256
  ...t
252
257
  }) => {
253
258
  const c = y();
254
- return r && a && /* @__PURE__ */ e(
255
- h,
259
+ return r && s && /* @__PURE__ */ e(
260
+ g,
256
261
  {
257
- control: a,
262
+ control: s,
258
263
  name: r,
259
264
  rules: n,
260
- render: ({ field: l }) => /* @__PURE__ */ e(u, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(N, { className: "flex flex-row items-start gap-3", children: [
261
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
262
- D,
265
+ render: ({ field: l }) => /* @__PURE__ */ e(N, { className: "block", htmlFor: t.id || c, children: /* @__PURE__ */ i(k, { className: "flex flex-row items-start gap-3", children: [
266
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
267
+ R,
263
268
  {
264
269
  id: t.id || c,
265
270
  className: "m-0",
@@ -268,71 +273,76 @@ const W = ({
268
273
  ...t
269
274
  }
270
275
  ) }),
271
- /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: s && /* @__PURE__ */ e("div", { children: s }) })
276
+ /* @__PURE__ */ e("div", { className: "space-y-1 leading-none", children: a && /* @__PURE__ */ e("div", { children: a }) })
272
277
  ] }) })
273
278
  }
274
279
  ) || null;
275
- }, se = ({
276
- control: a,
280
+ }, ae = ({
281
+ control: s,
277
282
  name: r,
278
- label: s,
283
+ label: a,
279
284
  required: n,
280
285
  rules: t,
281
286
  className: c,
282
287
  floatingError: l,
283
288
  ...o
284
- }) => r && a && /* @__PURE__ */ e(
285
- h,
289
+ }) => r && s && /* @__PURE__ */ e(
290
+ g,
286
291
  {
287
- control: a,
292
+ control: s,
288
293
  name: r,
289
294
  rules: t,
290
- render: ({ field: d, formState: k }) => /* @__PURE__ */ i(N, { children: [
291
- s && /* @__PURE__ */ i(u, { className: "block", children: [
292
- s,
295
+ render: ({ field: d, formState: h }) => /* @__PURE__ */ i(k, { children: [
296
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
297
+ a,
293
298
  " ",
294
299
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
295
300
  ] }),
296
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(
297
- R,
301
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
302
+ E,
298
303
  {
299
- variant: v.get(k.errors, `${r}.message`) ? "failure" : "default",
304
+ variant: m.get(h.errors, `${r}.message`) ? "failure" : "default",
300
305
  ...o,
301
306
  ...d,
302
- className: m(c)
307
+ className: u(c)
303
308
  }
304
309
  ) }),
305
- /* @__PURE__ */ e(
306
- p,
310
+ m.get(h.errors, r, "") && /* @__PURE__ */ e(
311
+ x,
307
312
  {
308
- className: m(l && "absolute -bottom-5")
313
+ className: u(l && "absolute -bottom-5")
309
314
  }
310
315
  )
311
316
  ] })
312
317
  }
313
318
  ) || null, te = ({
314
- control: a,
319
+ control: s,
315
320
  name: r,
316
- label: s,
321
+ label: a,
317
322
  required: n,
318
323
  className: t,
319
324
  rules: c,
320
325
  floatingError: l,
321
326
  ...o
322
- }) => r && a ? /* @__PURE__ */ e(
323
- h,
327
+ }) => r && s ? /* @__PURE__ */ e(
328
+ g,
324
329
  {
325
- control: a,
330
+ control: s,
326
331
  name: r,
327
332
  rules: c,
328
- render: ({ field: d }) => /* @__PURE__ */ i(N, { children: [
329
- s && /* @__PURE__ */ i(u, { className: "block", children: [
330
- s,
333
+ render: ({ field: d, formState: h }) => /* @__PURE__ */ i(k, { children: [
334
+ a && /* @__PURE__ */ i(N, { className: "block", children: [
335
+ a,
331
336
  " ",
332
337
  n && /* @__PURE__ */ e("span", { className: "text-red-600", children: "*" })
333
338
  ] }),
334
- /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(f, { ...d, ...o }) }),
335
- /* @__PURE__ */ e(p, { className: m(l && "absolute -bottom-5") })
339
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(f, { ...d, ...o }) }),
340
+ m.get(h.errors, r, "") && /* @__PURE__ */ e(
341
+ x,
342
+ {
343
+ className: u(l && "absolute -bottom-5")
344
+ }
345
+ )
336
346
  ] })
337
347
  }
338
348
  ) : /* @__PURE__ */ e(f, { className: "mt-2", ...o });
@@ -345,8 +355,8 @@ export {
345
355
  ee as MyMaskInput,
346
356
  re as MyRadio,
347
357
  de as MySelect,
348
- ae as MySwitch,
349
- se as MyTextarea,
358
+ se as MySwitch,
359
+ ae as MyTextarea,
350
360
  te as MyTimePicker
351
361
  };
352
362
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../src/components/form/MyCheckbox.tsx","../../../src/components/form/MyDatePicker.tsx","../../../src/components/form/MyDateRangePicker.tsx","../../../src/components/form/MyHtmlEditor.tsx","../../../src/components/form/MyMaskInput.tsx","../../../src/components/form/MyRadio.tsx","../../../src/components/form/MySwitch.tsx","../../../src/components/form/MyTextarea.tsx","../../../src/components/form/MyTimePicker.tsx"],"sourcesContent":["import {\n Checkbox,\n type CheckboxProps,\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyCheckbox component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyCheckboxProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & CheckboxProps;\n\n/**\n * MyCheckbox is a checkbox component with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the checkbox.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Checkbox and form item props.\n * @returns A checkbox component wrapped with form handling logic.\n */\nexport const MyCheckbox = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MyCheckboxProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Checkbox\n id={props.id || id}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import { Calendar, type CalendarProps, DATE } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Input,\n type InputProps,\n} from 'dgz-ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from 'dgz-ui/popover';\nimport { cn, dayjs } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport { Calendar1 } from 'lucide-react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyDatePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDatePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<CalendarProps, 'mode' | 'disabled'> & {\n /** Date format string for display. */\n format?: string;\n inputProps?: Omit<InputProps, 'onSelect'>;\n placeholder?: string;\n disabled?: boolean;\n };\n\n/**\n * MyDatePicker shows a calendar popover to pick a single date, integrated with react-hook-form.\n * Can also be used standalone when no control/name are provided.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date selected.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param register - The `react-hook-form` register function.\n * @param disabled - Whether the date picker is disabled.\n * @param className - Additional CSS classes.\n * @param inputProps - Props passed to the underlying Input component.\n * @param props - Calendar, button and form item props.\n * @returns A date picker component integrated with react-hook-form.\n */\nexport const MyDatePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n format = DATE,\n floatingError,\n placeholder,\n disabled,\n register,\n className,\n inputProps,\n ...props\n}: MyDatePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <Popover>\n <PopoverTrigger asChild>\n <FormControl>\n <div className={'relative'}>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n </div>\n </FormControl>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n </PopoverContent>\n )}\n </Popover>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <HtmlEditor {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\n </FormItem>\n )}\n />\n ) : (\n <HtmlEditor {...props} />\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n </FormControl>\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <TimePicker {...field} {...props} />\n </FormControl>\n <FormMessage className={cn(floatingError && 'absolute -bottom-5')} />\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","PopoverContent","Calendar","FormMessage","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":";;;;;;;;;;;;AA8BO,MAAMA,IAAa,CAAmC;AAAA,EAC3D,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAqC;AACnC,QAAMC,IAAKC,EAAA;AACX,SACGL,KAAQD,KACP,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,MAAAC;AAAA,MACA,OAAAE;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAM,0BACRC,GAAA,EAAU,WAAW,SAAS,SAASN,EAAM,MAAMC,GAClD,UAAA,gBAAAM,EAACC,GAAA,EAAS,WAAU,mCAClB,UAAA;AAAA,QAAA,gBAAAL,EAACM,GAAA,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A,UACC,WAAWJ,EAAGZ,KAAiB,oBAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IACrD,EAAA,CACF;AAAA,EAAA;AAAA,KAIN,MCvCS8B,KAAe,CAAmC;AAAA,EAC7D,SAAAjD;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAc;AAAA,EACA,WAAAO;AAAA,EACA,OAAApB;AAAA,EACA,eAAAgB;AAAA,EACA,GAAGf;AACL,MACSH,KAAQD,IACb,gBAAAO;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,SAAAR;AAAA,IACA,MAAAC;AAAA,IACA,OAAAE;AAAA,IACA,QAAQ,CAAC,EAAE,OAAAM,EAAA,wBACRG,GAAA,EACE,UAAA;AAAA,MAAAV,KACC,gBAAAS,EAACD,GAAA,EAAU,WAAW,SACnB,UAAA;AAAA,QAAAR;AAAA,QAAM;AAAA,QAAEc,KAAY,gBAAAT,EAAC,QAAA,EAAK,WAAW,gBAAgB,UAAA,IAAA,CAAC;AAAA,MAAA,GACzD;AAAA,MAEF,gBAAAA,EAACM,KACC,UAAA,gBAAAN,EAAC2C,GAAA,EAAY,GAAGzC,GAAQ,GAAGL,GAAO,GACpC;AAAA,wBACC+B,GAAA,EAAY,WAAWJ,EAAGZ,KAAiB,oBAAoB,EAAA,CAAG;AAAA,IAAA,EAAA,CACrE;AAAA,EAAA;AAAA,IAIJ,gBAAAZ,EAAC2C,GAAA,EAAW,WAAW,QAAS,GAAG9C,GAAO;"}
1
+ {"version":3,"file":"index.es.js","sources":["../../../src/components/form/MyCheckbox.tsx","../../../src/components/form/MyDatePicker.tsx","../../../src/components/form/MyDateRangePicker.tsx","../../../src/components/form/MyHtmlEditor.tsx","../../../src/components/form/MyMaskInput.tsx","../../../src/components/form/MyRadio.tsx","../../../src/components/form/MySwitch.tsx","../../../src/components/form/MyTextarea.tsx","../../../src/components/form/MyTimePicker.tsx"],"sourcesContent":["import {\n Checkbox,\n type CheckboxProps,\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyCheckbox component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyCheckboxProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & CheckboxProps;\n\n/**\n * MyCheckbox is a checkbox component with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the checkbox.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Checkbox and form item props.\n * @returns A checkbox component wrapped with form handling logic.\n */\nexport const MyCheckbox = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MyCheckboxProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Checkbox\n id={props.id || id}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import { Calendar, type CalendarProps, DATE } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Input,\n type InputProps,\n} from 'dgz-ui/form';\nimport { Popover, PopoverContent, PopoverTrigger } from 'dgz-ui/popover';\nimport { cn, dayjs } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport { Calendar1 } from 'lucide-react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyDatePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDatePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<CalendarProps, 'mode' | 'disabled'> & {\n /** Date format string for display. */\n format?: string;\n inputProps?: Omit<InputProps, 'onSelect'>;\n placeholder?: string;\n disabled?: boolean;\n };\n\n/**\n * MyDatePicker shows a calendar popover to pick a single date, integrated with react-hook-form.\n * Can also be used standalone when no control/name are provided.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date selected.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param register - The `react-hook-form` register function.\n * @param disabled - Whether the date picker is disabled.\n * @param className - Additional CSS classes.\n * @param inputProps - Props passed to the underlying Input component.\n * @param props - Calendar, button and form item props.\n * @returns A date picker component integrated with react-hook-form.\n */\nexport const MyDatePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n format = DATE,\n floatingError,\n placeholder,\n disabled,\n register,\n className,\n inputProps,\n ...props\n}: MyDatePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <Popover>\n <PopoverTrigger asChild>\n <FormControl>\n <div className={'relative'}>\n <Input\n {...inputProps}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n disabled={disabled}\n {...field}\n readOnly\n placeholder={placeholder || 'Pick a date'}\n value={dayjs(field.value).format(format)}\n className={cn('m-0 text-start', className)}\n />\n <Calendar1\n className={cn(\n 'text-secondary absolute top-2.5 right-2 size-5',\n disabled && 'pointer-events-none opacity-50'\n )}\n />\n </div>\n </FormControl>\n </PopoverTrigger>\n {!disabled && (\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n {...props}\n mode=\"single\"\n selected={field.value}\n onSelect={field.onChange}\n />\n </PopoverContent>\n )}\n </Popover>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\nimport { DateRangePicker, type DateRangePickerProps } from '../datepicker';\n\n/**\n * Props for the MyDateRangePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyDateRangePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n Omit<DateRangePickerProps, 'required'> & {\n required?: boolean;\n };\n\n/**\n * MyDateRangePicker renders a date range selector integrated with react-hook-form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the date range picker.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param format - The date format for display.\n * @param placeholder - The placeholder text when no date is selected.\n * @param props - DateRangePicker props and form item props.\n * @returns A date range picker integrated with react-hook-form.\n */\nexport const MyDateRangePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n placeholder,\n floatingError,\n ...props\n}: MyDateRangePickerProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <div>\n <DateRangePicker\n {...props}\n error={`${get(formState.errors, name, '')}`}\n selected={field.value}\n onRangeSelected={field.onChange}\n placeholder={placeholder}\n />\n </div>\n </FormControl>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n HtmlEditor,\n type HtmlEditorProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyHtmlEditor component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyHtmlEditorProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n HtmlEditorProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyHtmlEditor is a rich-text HTML editor with optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the HTML editor.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - HtmlEditor and form item props.\n * @returns React element rendering an HtmlEditor with label, helper text, and validation message.\n */\nexport const MyHtmlEditor = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyHtmlEditorProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <HtmlEditor {...field} {...props} />\n </FormControl>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n ) : (\n <HtmlEditor {...props} />\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n MaskInput,\n type MaskInputProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyMaskInput component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyMaskInputProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n MaskInputProps & {\n /** Whether the field is required. */\n required?: boolean;\n };\n\n/**\n * MyMaskInput is an input component with masking support and optional react-hook-form integration.\n * Works in both controlled (with control/name) and uncontrolled modes. By default it uses a space as\n * thousands separator, underscores as placeholder characters, lazy formatting disabled, and returns\n * unmasked value on change.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the mask input.\n * @param rules - The `react-hook-form` validation rules.\n * @param required - Whether the field is required.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - MaskInput and form item props.\n * @returns React element rendering a masked input with label, helper text, and validation message.\n */\nexport const MyMaskInput = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n required,\n floatingError,\n ...props\n}: MyMaskInputProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <MaskInput\n thousandsSeparator={' '}\n lazy={false}\n placeholderChar=\"_\"\n unmask\n {...field}\n {...props}\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n onAccept={(value) => field.onChange(value)}\n />\n </FormControl>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n RadioGroupItem,\n} from 'dgz-ui/form';\nimport React, { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\ntype RadioItemProps = React.ComponentPropsWithoutRef<typeof RadioGroupItem>;\n\n/**\n * Props for the MyRadio component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyRadioProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & RadioItemProps;\n\n/**\n * MyRadio is a radio input that can integrate with react-hook-form when control and name are provided.\n * Falls back to an uncontrolled radio item when not used inside a form.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the radio input.\n * @param rules - The `react-hook-form` validation rules.\n * @param value - The value of the radio input.\n * @param props - Radio item and form item props.\n * @returns A radio button item.\n */\nconst MyRadio = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n value,\n ...props\n}: MyRadioProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <RadioGroupItem\n id={props.id || id}\n value={value}\n checked={field.value === value}\n onClick={() => {\n if (field.value !== value) {\n field.onChange(value);\n }\n }}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n\nexport { MyRadio };\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n Switch,\n type SwitchProps,\n} from 'dgz-ui/form';\nimport { useId } from 'react';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MySwitch component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MySwitchProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & SwitchProps;\n\n/**\n * MySwitch is a toggle switch with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the switch.\n * @param rules - The `react-hook-form` validation rules.\n * @param props - Switch and form item props.\n * @returns A toggle switch component, or null if name or control are missing.\n */\nexport const MySwitch = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n rules,\n ...props\n}: MySwitchProps<TFieldValues>) => {\n const id = useId();\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field }) => (\n <FormLabel className={'block'} htmlFor={props.id || id}>\n <FormItem className=\"flex flex-row items-start gap-3\">\n <FormControl>\n <Switch\n id={props.id || id}\n className={'m-0'}\n checked={field.value}\n onCheckedChange={field.onChange}\n {...props}\n />\n </FormControl>\n <div className=\"space-y-1 leading-none\">\n {label && <div>{label}</div>}\n </div>\n </FormItem>\n </FormLabel>\n )}\n />\n )) ||\n null\n );\n};\n","import {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n Textarea,\n type TextareaProps,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTextarea component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTextareaProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> & TextareaProps;\n\n/**\n * MyTextarea is a textarea component with optional react-hook-form integration.\n * Supports floating error message styling.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the textarea.\n * @param required - Whether the field is required.\n * @param rules - The `react-hook-form` validation rules.\n * @param className - Custom CSS class name.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - Textarea and form item props.\n * @returns A textarea component integrated with react-hook-form.\n */\nexport const MyTextarea = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n rules,\n className,\n floatingError,\n ...props\n}: MyTextareaProps<TFieldValues>) => {\n return (\n (name && control && (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <Textarea\n variant={\n get(formState.errors, `${name}.message`)\n ? 'failure'\n : 'default'\n }\n {...props}\n {...field}\n className={cn(className)}\n />\n </FormControl>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n )) ||\n null\n );\n};\n","import { TimePicker, type TimePickerProps } from 'dgz-ui/calendar';\nimport {\n FormControl,\n FormField,\n FormItem,\n type FormItemProps,\n FormLabel,\n FormMessage,\n} from 'dgz-ui/form';\nimport { cn } from 'dgz-ui/utils';\nimport { get } from 'lodash';\nimport type { FieldPath, FieldValues } from 'react-hook-form';\n\n/**\n * Props for the MyTimePicker component.\n * @template TFieldValues - The type of the form values.\n */\nexport type MyTimePickerProps<TFieldValues extends FieldValues> =\n FormItemProps<TFieldValues> &\n TimePickerProps & {\n /** Whether the field is required. */\n required?: boolean;\n /** Custom CSS class name. */\n className?: string;\n };\n\n/**\n * MyTimePicker is a time selection input with optional react-hook-form integration.\n *\n * @template TFieldValues - Form values type used by react-hook-form.\n * @param control - The `react-hook-form` control object.\n * @param name - The name of the field in `react-hook-form`.\n * @param label - The label to display for the time picker.\n * @param required - Whether the field is required.\n * @param className - Custom CSS class name.\n * @param rules - The `react-hook-form` validation rules.\n * @param floatingError - Whether to show the error message in a floating container.\n * @param props - TimePicker and form item props.\n * @returns A time picker component integrated with react-hook-form.\n */\nexport const MyTimePicker = <TFieldValues extends FieldValues>({\n control,\n name,\n label,\n required,\n className,\n rules,\n floatingError,\n ...props\n}: MyTimePickerProps<TFieldValues>) => {\n return name && control ? (\n <FormField<TFieldValues, FieldPath<TFieldValues>>\n control={control}\n name={name}\n rules={rules}\n render={({ field, formState }) => (\n <FormItem>\n {label && (\n <FormLabel className={'block'}>\n {label} {required && <span className={'text-red-600'}>*</span>}\n </FormLabel>\n )}\n <FormControl>\n <TimePicker {...field} {...props} />\n </FormControl>\n {get(formState.errors, name, '') && (\n <FormMessage\n className={cn(floatingError && 'absolute -bottom-5')}\n />\n )}\n </FormItem>\n )}\n />\n ) : (\n <TimePicker className={'mt-2'} {...props} />\n );\n};\n"],"names":["MyCheckbox","control","name","label","rules","props","id","useId","jsx","FormField","field","FormLabel","jsxs","FormItem","FormControl","Checkbox","MyDatePicker","required","format","DATE","floatingError","placeholder","disabled","register","className","inputProps","formState","Popover","PopoverTrigger","Input","get","dayjs","cn","Calendar1","PopoverContent","Calendar","FormMessage","MyDateRangePicker","DateRangePicker","MyHtmlEditor","HtmlEditor","MyMaskInput","MaskInput","value","MyRadio","RadioGroupItem","MySwitch","Switch","MyTextarea","Textarea","MyTimePicker","TimePicker"],"mappings":";;;;;;;;;;;;AA8BO,MAAMA,IAAa,CAAmC;AAAA,EAC3D,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAqC;AACnC,QAAMC,IAAKC,EAAA;AACX,SACGL,KAAQD,KACP,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAAR;AAAA,MACA,MAAAC;AAAA,MACA,OAAAE;AAAA,MACA,QAAQ,CAAC,EAAE,OAAAM,0BACRC,GAAA,EAAU,WAAW,SAAS,SAASN,EAAM,MAAMC,GAClD,UAAA,gBAAAM,EAACC,GAAA,EAAS,WAAU,mC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