tembro 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/components/data-table/data-table-pagination.cjs +1 -1
  2. package/dist/components/data-table/data-table-pagination.js +4 -4
  3. package/dist/components/data-table/data-table.cjs +1 -1
  4. package/dist/components/data-table/data-table.d.ts +2 -2
  5. package/dist/components/data-table/data-table.js +2 -1
  6. package/dist/components/display/carousel.cjs +1 -1
  7. package/dist/components/display/carousel.d.ts +7 -1
  8. package/dist/components/display/carousel.js +44 -44
  9. package/dist/components/display/smart-card.d.ts +1 -1
  10. package/dist/components/display/status-legend.d.ts +1 -1
  11. package/dist/components/form/form-input.cjs +1 -1
  12. package/dist/components/form/form-input.d.ts +3 -4
  13. package/dist/components/form/form-input.js +257 -257
  14. package/dist/components/form/form-select.cjs +1 -1
  15. package/dist/components/form/form-select.d.ts +2 -2
  16. package/dist/components/form/form-select.js +6 -6
  17. package/dist/components/inputs/async-select.d.ts +3 -0
  18. package/dist/components/inputs/search-input.d.ts +3 -0
  19. package/dist/components/inputs/simple-select.cjs +1 -1
  20. package/dist/components/inputs/simple-select.d.ts +10 -32
  21. package/dist/components/inputs/simple-select.js +5 -101
  22. package/dist/components/ui/card/index.cjs +1 -1
  23. package/dist/components/ui/card/index.d.ts +13 -2
  24. package/dist/components/ui/card/index.js +74 -49
  25. package/dist/components/ui/input/index.cjs +1 -1
  26. package/dist/components/ui/input/index.d.ts +8 -0
  27. package/dist/components/ui/input/index.js +63 -30
  28. package/dist/components/ui/select/index.cjs +1 -1
  29. package/dist/components/ui/select/index.d.ts +33 -1
  30. package/dist/components/ui/select/index.js +154 -48
  31. package/dist/showcase/create-demo.cjs +5 -4
  32. package/dist/showcase/create-demo.js +2 -2
  33. package/dist/showcase/premium/data-table/showcase.cjs +1 -1
  34. package/dist/showcase/premium/data-table/showcase.js +1 -1
  35. package/dist/showcase/premium/data-table-parts/showcase.cjs +1 -1
  36. package/dist/showcase/premium/data-table-parts/showcase.js +3 -1
  37. package/dist/showcase/premium/select/mock.cjs +8 -9
  38. package/dist/showcase/premium/select/mock.js +1 -1
  39. package/dist/showcase/premium/select/showcase.cjs +1 -1
  40. package/dist/showcase/premium/select/showcase.js +76 -86
  41. package/dist/showcase/registry-specific.cjs +1 -1
  42. package/dist/showcase/registry-specific.js +78 -74
  43. package/dist/showcase/render-registry-preview.cjs +1 -1
  44. package/dist/showcase/render-registry-preview.js +91 -87
  45. package/dist/showcase/tembro-registry.json.cjs +1 -1
  46. package/dist/showcase/tembro-registry.json.js +1 -1
  47. package/package.json +1 -1
  48. package/packages/cli/dist/index.cjs +1 -1
  49. package/packages/cli/vendor/src/components/data-table/data-table-pagination.tsx +7 -7
  50. package/packages/cli/vendor/src/components/data-table/data-table.tsx +21 -20
  51. package/packages/cli/vendor/src/components/display/carousel.tsx +18 -6
  52. package/packages/cli/vendor/src/components/display/smart-card.tsx +1 -1
  53. package/packages/cli/vendor/src/components/display/status-legend.tsx +1 -1
  54. package/packages/cli/vendor/src/components/form/form-input.tsx +9 -12
  55. package/packages/cli/vendor/src/components/form/form-select.tsx +4 -4
  56. package/packages/cli/vendor/src/components/inputs/async-select.tsx +11 -8
  57. package/packages/cli/vendor/src/components/inputs/search-input.tsx +5 -2
  58. package/packages/cli/vendor/src/components/inputs/simple-select.tsx +20 -190
  59. package/packages/cli/vendor/src/components/ui/card/index.tsx +95 -25
  60. package/packages/cli/vendor/src/components/ui/input/index.tsx +98 -0
  61. package/packages/cli/vendor/src/components/ui/select/index.tsx +227 -34
  62. package/packages/cli/vendor/src/showcase/create-demo.tsx +16 -15
  63. package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +3 -3
  64. package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +3 -3
  65. package/packages/cli/vendor/src/showcase/premium/select/mock.ts +1 -1
  66. package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +13 -21
  67. package/packages/cli/vendor/src/showcase/registry-specific.tsx +7 -8
  68. package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +5 -6
  69. package/packages/cli/vendor/src/showcase/tembro-registry.json +1 -1
  70. package/registry.json +1 -1
@@ -1,19 +1,17 @@
1
- import { ClearableInput as e } from "../inputs/clearable-input.js";
2
- import { DateInput as t } from "../inputs/date-input.js";
3
- import { DateRangeInput as n } from "../inputs/date-range-input.js";
4
- import { MoneyInput as r } from "../inputs/money-input.js";
5
- import { MaskedInput as i } from "../inputs/masked-input.js";
6
- import { NumberInput as a } from "../inputs/number-input.js";
7
- import { PhoneInput as o, formatPhoneDigits as s } from "../inputs/phone-input.js";
8
- import { QuantityInput as c } from "../inputs/quantity-input.js";
9
- import { SearchInput as l } from "../inputs/search-input.js";
10
- import { Input as u } from "../ui/input/index.js";
11
- import { FormFieldShell as d, resolveFormFieldIds as f } from "./form-field-shell.js";
1
+ import { DateInput as e } from "../inputs/date-input.js";
2
+ import { DateRangeInput as t } from "../inputs/date-range-input.js";
3
+ import { MoneyInput as n } from "../inputs/money-input.js";
4
+ import { MaskedInput as r } from "../inputs/masked-input.js";
5
+ import { NumberInput as i } from "../inputs/number-input.js";
6
+ import { PhoneInput as a, formatPhoneDigits as o } from "../inputs/phone-input.js";
7
+ import { QuantityInput as s } from "../inputs/quantity-input.js";
8
+ import { Input as c } from "../ui/input/index.js";
9
+ import { FormFieldShell as l, resolveFormFieldIds as u } from "./form-field-shell.js";
12
10
  import "react";
13
- import { jsx as p } from "react/jsx-runtime";
14
- import { Controller as m } from "react-hook-form";
11
+ import { jsx as d } from "react/jsx-runtime";
12
+ import { Controller as f } from "react-hook-form";
15
13
  //#region src/components/form/form-input.tsx
16
- function h(e) {
14
+ function p(e) {
17
15
  return {
18
16
  label: e.label,
19
17
  description: e.description,
@@ -35,305 +33,307 @@ function h(e) {
35
33
  contentClassName: e.contentClassName
36
34
  };
37
35
  }
38
- function g(g) {
39
- let _ = g.id ?? g.name, v = h(g), y = g.kind ?? "text", b = g.fieldClassName ?? "w-full";
40
- return /* @__PURE__ */ p(m, {
41
- control: g.control,
42
- name: g.name,
43
- rules: g.rules,
44
- render: ({ field: m, fieldState: h }) => {
45
- let x = h.error?.message, S = f(_, {
46
- description: g.description,
47
- error: x
36
+ function m(m) {
37
+ let h = m.id ?? m.name, g = p(m), _ = m.kind ?? "text", v = m.fieldClassName ?? "w-full";
38
+ return /* @__PURE__ */ d(f, {
39
+ control: m.control,
40
+ name: m.name,
41
+ rules: m.rules,
42
+ render: ({ field: f, fieldState: p }) => {
43
+ let y = p.error?.message, b = u(h, {
44
+ description: m.description,
45
+ error: y
48
46
  });
49
- if (y === "search") {
50
- let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: c, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, onValueChange: N, onBlur: P, ...F } = g;
51
- return /* @__PURE__ */ p(d, {
52
- ...v,
53
- labelId: S.labelId,
54
- descriptionId: S.descriptionId,
55
- errorId: S.errorId,
56
- error: x,
57
- htmlFor: j ?? _,
58
- children: /* @__PURE__ */ p(l, {
47
+ if (_ === "search") {
48
+ let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, onValueChange: N, onBlur: P, ...F } = m;
49
+ return /* @__PURE__ */ d(l, {
50
+ ...g,
51
+ labelId: b.labelId,
52
+ descriptionId: b.descriptionId,
53
+ errorId: b.errorId,
54
+ error: y,
55
+ htmlFor: j ?? h,
56
+ children: /* @__PURE__ */ d(c, {
59
57
  ...F,
60
- id: j ?? _,
61
- name: m.name,
62
- ref: m.ref,
63
- value: m.value ?? "",
58
+ type: "search",
59
+ id: j ?? h,
60
+ name: f.name,
61
+ ref: f.ref,
62
+ value: f.value ?? "",
64
63
  disabled: C,
65
- readOnly: g.readOnly,
66
- inputClassName: A ?? b,
67
- "aria-invalid": h.invalid || void 0,
68
- "aria-describedby": S.describedBy,
69
- "aria-errormessage": x ? S.errorId : void 0,
64
+ readOnly: m.readOnly,
65
+ inputClassName: A ?? v,
66
+ "aria-invalid": p.invalid || void 0,
67
+ "aria-describedby": b.describedBy,
68
+ "aria-errormessage": y ? b.errorId : void 0,
70
69
  onBlur: (e) => {
71
- m.onBlur(), P?.(e);
70
+ f.onBlur(), P?.(e);
72
71
  },
73
72
  onValueChange: (e) => {
74
- m.onChange(e), N?.(e);
73
+ f.onChange(e), N?.(e);
75
74
  }
76
75
  })
77
76
  });
78
77
  }
79
- if (y === "password") {
80
- let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: c, requiredIndicator: l, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, onValueChange: N, onBlur: P, ...F } = g;
81
- return /* @__PURE__ */ p(d, {
82
- ...v,
83
- labelId: S.labelId,
84
- descriptionId: S.descriptionId,
85
- errorId: S.errorId,
86
- error: x,
87
- htmlFor: j ?? _,
88
- children: /* @__PURE__ */ p(u, {
78
+ if (_ === "password") {
79
+ let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, onValueChange: N, onBlur: P, ...F } = m;
80
+ return /* @__PURE__ */ d(l, {
81
+ ...g,
82
+ labelId: b.labelId,
83
+ descriptionId: b.descriptionId,
84
+ errorId: b.errorId,
85
+ error: y,
86
+ htmlFor: j ?? h,
87
+ children: /* @__PURE__ */ d(c, {
89
88
  ...F,
90
89
  type: "password",
91
- id: j ?? _,
92
- ref: m.ref,
93
- name: m.name,
94
- value: m.value ?? "",
90
+ id: j ?? h,
91
+ ref: f.ref,
92
+ name: f.name,
93
+ value: f.value ?? "",
95
94
  disabled: C,
96
- readOnly: g.readOnly,
97
- inputClassName: A ?? b,
98
- "aria-describedby": S.describedBy,
99
- "aria-errormessage": x ? S.errorId : void 0,
95
+ readOnly: m.readOnly,
96
+ inputClassName: A ?? v,
97
+ "aria-describedby": b.describedBy,
98
+ "aria-errormessage": y ? b.errorId : void 0,
100
99
  onBlur: (e) => {
101
- m.onBlur(), P?.(e);
100
+ f.onBlur(), P?.(e);
102
101
  },
103
102
  onChange: (e) => {
104
103
  let t = e.currentTarget.value;
105
- m.onChange(t), N?.(t);
104
+ f.onChange(t), N?.(t);
106
105
  },
107
- "aria-invalid": h.invalid || void 0
106
+ "aria-invalid": p.invalid || void 0
108
107
  })
109
108
  });
110
109
  }
111
- if (y === "number") {
112
- let { control: e, name: t, label: n, description: r, required: i, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onNumberChange: P, onBlur: F, ...I } = g;
113
- return /* @__PURE__ */ p(d, {
114
- ...v,
115
- labelId: S.labelId,
116
- descriptionId: S.descriptionId,
117
- errorId: S.errorId,
118
- error: x,
119
- htmlFor: j ?? _,
120
- children: /* @__PURE__ */ p(a, {
110
+ if (_ === "number") {
111
+ let { control: e, name: t, label: n, description: r, required: a, className: o, layout: s, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onNumberChange: P, onBlur: F, ...I } = m;
112
+ return /* @__PURE__ */ d(l, {
113
+ ...g,
114
+ labelId: b.labelId,
115
+ descriptionId: b.descriptionId,
116
+ errorId: b.errorId,
117
+ error: y,
118
+ htmlFor: j ?? h,
119
+ children: /* @__PURE__ */ d(i, {
121
120
  ...I,
122
- id: j ?? _,
123
- name: m.name,
124
- ref: m.ref,
125
- value: m.value ?? "",
121
+ id: j ?? h,
122
+ name: f.name,
123
+ ref: f.ref,
124
+ value: f.value ?? "",
126
125
  disabled: C,
127
- readOnly: g.readOnly,
128
- className: A ?? b,
129
- "aria-invalid": h.invalid || void 0,
130
- "aria-describedby": S.describedBy,
131
- "aria-errormessage": x ? S.errorId : void 0,
126
+ readOnly: m.readOnly,
127
+ className: A ?? v,
128
+ "aria-invalid": p.invalid || void 0,
129
+ "aria-describedby": b.describedBy,
130
+ "aria-errormessage": y ? b.errorId : void 0,
132
131
  onBlur: (e) => {
133
- m.onBlur(), F?.(e);
132
+ f.onBlur(), F?.(e);
134
133
  },
135
134
  onNumberChange: (e) => {
136
- m.onChange(e ?? N), P?.(e);
135
+ f.onChange(e ?? N), P?.(e);
137
136
  }
138
137
  })
139
138
  });
140
139
  }
141
- if (y === "phone") {
142
- let { control: e, name: t, label: n, description: r, required: i, className: a, layout: c, descriptionPosition: l, labelAction: u, requiredIndicator: f, errorIcon: y, showErrorIcon: C, disabled: w, readOnly: T, labelClassName: E, labelRowClassName: D, descriptionClassName: O, errorClassName: k, contentClassName: A, fieldClassName: j, id: M, kind: N, valueMode: P = "raw", countryCode: F = "+998", maxDigits: I = 12, onValueChange: L, onBlur: R, ...z } = g, B = m.value == null ? "" : String(m.value), V = P === "raw" ? s(B, F, I) : B;
143
- return /* @__PURE__ */ p(d, {
144
- ...v,
145
- labelId: S.labelId,
146
- descriptionId: S.descriptionId,
147
- errorId: S.errorId,
148
- error: x,
149
- htmlFor: M ?? _,
150
- children: /* @__PURE__ */ p(o, {
140
+ if (_ === "phone") {
141
+ let { control: e, name: t, label: n, description: r, required: i, className: s, layout: c, descriptionPosition: u, labelAction: _, requiredIndicator: x, errorIcon: S, showErrorIcon: C, disabled: w, readOnly: T, labelClassName: E, labelRowClassName: D, descriptionClassName: O, errorClassName: k, contentClassName: A, fieldClassName: j, id: M, kind: N, valueMode: P = "raw", countryCode: F = "+998", maxDigits: I = 12, onValueChange: L, onBlur: R, ...z } = m, B = f.value == null ? "" : String(f.value), V = P === "raw" ? o(B, F, I) : B;
142
+ return /* @__PURE__ */ d(l, {
143
+ ...g,
144
+ labelId: b.labelId,
145
+ descriptionId: b.descriptionId,
146
+ errorId: b.errorId,
147
+ error: y,
148
+ htmlFor: M ?? h,
149
+ children: /* @__PURE__ */ d(a, {
151
150
  ...z,
152
- id: M ?? _,
153
- name: m.name,
154
- ref: m.ref,
151
+ id: M ?? h,
152
+ name: f.name,
153
+ ref: f.ref,
155
154
  value: V,
156
155
  disabled: w,
157
- readOnly: g.readOnly,
156
+ readOnly: m.readOnly,
158
157
  countryCode: F,
159
158
  maxDigits: I,
160
- className: j ?? b,
161
- "aria-invalid": h.invalid || void 0,
162
- "aria-describedby": S.describedBy,
163
- "aria-errormessage": x ? S.errorId : void 0,
159
+ className: j ?? v,
160
+ "aria-invalid": p.invalid || void 0,
161
+ "aria-describedby": b.describedBy,
162
+ "aria-errormessage": y ? b.errorId : void 0,
164
163
  onBlur: (e) => {
165
- m.onBlur(), R?.(e);
164
+ f.onBlur(), R?.(e);
166
165
  },
167
166
  onValueChange: (e, t) => {
168
167
  let n = P === "raw" ? t : e;
169
- m.onChange(n), L?.(n, t, e);
168
+ f.onChange(n), L?.(n, t, e);
170
169
  }
171
170
  })
172
171
  });
173
172
  }
174
- if (y === "date") {
175
- let { control: e, name: n, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = "", onValueChange: P, onBlur: F, ...I } = g;
176
- return /* @__PURE__ */ p(d, {
177
- ...v,
178
- labelId: S.labelId,
179
- descriptionId: S.descriptionId,
180
- errorId: S.errorId,
181
- error: x,
182
- htmlFor: j ?? _,
183
- children: /* @__PURE__ */ p(t, {
173
+ if (_ === "date") {
174
+ let { control: t, name: n, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = "", onValueChange: P, onBlur: F, ...I } = m;
175
+ return /* @__PURE__ */ d(l, {
176
+ ...g,
177
+ labelId: b.labelId,
178
+ descriptionId: b.descriptionId,
179
+ errorId: b.errorId,
180
+ error: y,
181
+ htmlFor: j ?? h,
182
+ children: /* @__PURE__ */ d(e, {
184
183
  ...I,
185
- id: j ?? _,
186
- name: m.name,
187
- ref: m.ref,
188
- value: m.value ?? "",
184
+ id: j ?? h,
185
+ name: f.name,
186
+ ref: f.ref,
187
+ value: f.value ?? "",
189
188
  disabled: C,
190
- readOnly: g.readOnly,
191
- className: A ?? b,
192
- "aria-invalid": h.invalid || void 0,
193
- "aria-describedby": S.describedBy,
194
- "aria-errormessage": x ? S.errorId : void 0,
189
+ readOnly: m.readOnly,
190
+ className: A ?? v,
191
+ "aria-invalid": p.invalid || void 0,
192
+ "aria-describedby": b.describedBy,
193
+ "aria-errormessage": y ? b.errorId : void 0,
195
194
  onBlur: (e) => {
196
- m.onBlur(), F?.(e);
195
+ f.onBlur(), F?.(e);
197
196
  },
198
197
  onValueChange: (e) => {
199
- m.onChange(e || N), P?.(e);
198
+ f.onChange(e || N), P?.(e);
200
199
  }
201
200
  })
202
201
  });
203
202
  }
204
- if (y === "clearable") {
205
- let { control: t, name: n, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = "", onValueChange: P, onBlur: F, ...I } = g;
206
- return /* @__PURE__ */ p(d, {
207
- ...v,
208
- labelId: S.labelId,
209
- descriptionId: S.descriptionId,
210
- errorId: S.errorId,
211
- error: x,
212
- htmlFor: j ?? _,
213
- children: /* @__PURE__ */ p(e, {
203
+ if (_ === "clearable") {
204
+ let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = "", onValueChange: P, onBlur: F, ...I } = m;
205
+ return /* @__PURE__ */ d(l, {
206
+ ...g,
207
+ labelId: b.labelId,
208
+ descriptionId: b.descriptionId,
209
+ errorId: b.errorId,
210
+ error: y,
211
+ htmlFor: j ?? h,
212
+ children: /* @__PURE__ */ d(c, {
214
213
  ...I,
215
- id: j ?? _,
216
- name: m.name,
217
- ref: m.ref,
218
- value: m.value ?? "",
214
+ clearable: !0,
215
+ id: j ?? h,
216
+ name: f.name,
217
+ ref: f.ref,
218
+ value: f.value ?? "",
219
219
  disabled: C,
220
- readOnly: g.readOnly,
221
- className: A ?? b,
222
- "aria-invalid": h.invalid || void 0,
223
- "aria-describedby": S.describedBy,
224
- "aria-errormessage": x ? S.errorId : void 0,
220
+ readOnly: m.readOnly,
221
+ className: A ?? v,
222
+ "aria-invalid": p.invalid || void 0,
223
+ "aria-describedby": b.describedBy,
224
+ "aria-errormessage": y ? b.errorId : void 0,
225
225
  onBlur: (e) => {
226
- m.onBlur(), F?.(e);
226
+ f.onBlur(), F?.(e);
227
227
  },
228
228
  onValueChange: (e) => {
229
- m.onChange(e || N), P?.(e);
229
+ f.onChange(e || N), P?.(e);
230
230
  }
231
231
  })
232
232
  });
233
233
  }
234
- if (y === "masked") {
235
- let { control: e, name: t, label: n, description: r, required: a, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, valueMode: N = "raw", onValueChange: P, onBlur: F, ...I } = g;
236
- return /* @__PURE__ */ p(d, {
237
- ...v,
238
- labelId: S.labelId,
239
- descriptionId: S.descriptionId,
240
- errorId: S.errorId,
241
- error: x,
242
- htmlFor: j ?? _,
243
- children: /* @__PURE__ */ p(i, {
234
+ if (_ === "masked") {
235
+ let { control: e, name: t, label: n, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, valueMode: N = "raw", onValueChange: P, onBlur: F, ...I } = m;
236
+ return /* @__PURE__ */ d(l, {
237
+ ...g,
238
+ labelId: b.labelId,
239
+ descriptionId: b.descriptionId,
240
+ errorId: b.errorId,
241
+ error: y,
242
+ htmlFor: j ?? h,
243
+ children: /* @__PURE__ */ d(r, {
244
244
  ...I,
245
- id: j ?? _,
246
- name: m.name,
247
- ref: m.ref,
248
- value: String(m.value ?? ""),
245
+ id: j ?? h,
246
+ name: f.name,
247
+ ref: f.ref,
248
+ value: String(f.value ?? ""),
249
249
  disabled: C,
250
- readOnly: g.readOnly,
251
- className: A ?? b,
252
- "aria-invalid": h.invalid || void 0,
253
- "aria-describedby": S.describedBy,
254
- "aria-errormessage": x ? S.errorId : void 0,
250
+ readOnly: m.readOnly,
251
+ className: A ?? v,
252
+ "aria-invalid": p.invalid || void 0,
253
+ "aria-describedby": b.describedBy,
254
+ "aria-errormessage": y ? b.errorId : void 0,
255
255
  onBlur: (e) => {
256
- m.onBlur(), F?.(e);
256
+ f.onBlur(), F?.(e);
257
257
  },
258
258
  onValueChange: (e, t) => {
259
259
  let n = N === "raw" ? t : e;
260
- m.onChange(n), P?.(e, t);
260
+ f.onChange(n), P?.(e, t);
261
261
  }
262
262
  })
263
263
  });
264
264
  }
265
- if (y === "money") {
266
- let { control: e, name: t, label: n, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onValueChange: P, onBlur: F, ...I } = g;
267
- return /* @__PURE__ */ p(d, {
268
- ...v,
269
- labelId: S.labelId,
270
- descriptionId: S.descriptionId,
271
- errorId: S.errorId,
272
- error: x,
273
- htmlFor: j ?? _,
274
- children: /* @__PURE__ */ p(r, {
265
+ if (_ === "money") {
266
+ let { control: e, name: t, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onValueChange: P, onBlur: F, ...I } = m;
267
+ return /* @__PURE__ */ d(l, {
268
+ ...g,
269
+ labelId: b.labelId,
270
+ descriptionId: b.descriptionId,
271
+ errorId: b.errorId,
272
+ error: y,
273
+ htmlFor: j ?? h,
274
+ children: /* @__PURE__ */ d(n, {
275
275
  ...I,
276
- id: j ?? _,
277
- name: m.name,
278
- ref: m.ref,
279
- value: m.value ?? null,
276
+ id: j ?? h,
277
+ name: f.name,
278
+ ref: f.ref,
279
+ value: f.value ?? null,
280
280
  disabled: C,
281
- readOnly: g.readOnly,
282
- className: A ?? b,
283
- "aria-invalid": h.invalid || void 0,
284
- "aria-describedby": S.describedBy,
285
- "aria-errormessage": x ? S.errorId : void 0,
281
+ readOnly: m.readOnly,
282
+ className: A ?? v,
283
+ "aria-invalid": p.invalid || void 0,
284
+ "aria-describedby": b.describedBy,
285
+ "aria-errormessage": y ? b.errorId : void 0,
286
286
  onBlur: (e) => {
287
- m.onBlur(), F?.(e);
287
+ f.onBlur(), F?.(e);
288
288
  },
289
289
  onValueChange: (e, t) => {
290
- m.onChange(e ?? N), P?.(e, t);
290
+ f.onChange(e ?? N), P?.(e, t);
291
291
  }
292
292
  })
293
293
  });
294
294
  }
295
- if (y === "quantity") {
296
- let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: s, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onValueChange: P, onBlur: F, ...I } = g;
297
- return /* @__PURE__ */ p(d, {
298
- ...v,
299
- labelId: S.labelId,
300
- descriptionId: S.descriptionId,
301
- errorId: S.errorId,
302
- error: x,
303
- htmlFor: j ?? _,
304
- children: /* @__PURE__ */ p(c, {
295
+ if (_ === "quantity") {
296
+ let { control: e, name: t, label: n, description: r, required: i, className: a, layout: o, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: x, showErrorIcon: S, disabled: C, readOnly: w, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, fieldClassName: A, id: j, kind: M, emptyValue: N = null, onValueChange: P, onBlur: F, ...I } = m;
297
+ return /* @__PURE__ */ d(l, {
298
+ ...g,
299
+ labelId: b.labelId,
300
+ descriptionId: b.descriptionId,
301
+ errorId: b.errorId,
302
+ error: y,
303
+ htmlFor: j ?? h,
304
+ children: /* @__PURE__ */ d(s, {
305
305
  ...I,
306
- id: j ?? _,
307
- name: m.name,
308
- ref: m.ref,
309
- value: m.value,
306
+ id: j ?? h,
307
+ name: f.name,
308
+ ref: f.ref,
309
+ value: f.value,
310
310
  disabled: C,
311
- readOnly: g.readOnly,
312
- className: A ?? b,
313
- "aria-invalid": h.invalid || void 0,
314
- "aria-describedby": S.describedBy,
315
- "aria-errormessage": x ? S.errorId : void 0,
311
+ readOnly: m.readOnly,
312
+ className: A ?? v,
313
+ "aria-invalid": p.invalid || void 0,
314
+ "aria-describedby": b.describedBy,
315
+ "aria-errormessage": y ? b.errorId : void 0,
316
316
  onBlur: (e) => {
317
- m.onBlur(), F?.(e);
317
+ f.onBlur(), F?.(e);
318
318
  },
319
319
  onValueChange: (e) => {
320
- m.onChange(e ?? N), P?.(e);
320
+ f.onChange(e ?? N), P?.(e);
321
321
  }
322
322
  })
323
323
  });
324
324
  }
325
- if (y === "date-range") {
326
- let { control: e, name: t, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: l, requiredIndicator: u, errorIcon: f, showErrorIcon: y, disabled: b, labelClassName: C, labelRowClassName: w, descriptionClassName: T, errorClassName: E, contentClassName: D, fieldClassName: O, id: k, kind: A, onValueChange: j, onBlur: M, ...N } = g, P = m.value;
327
- return /* @__PURE__ */ p(d, {
328
- ...v,
329
- labelId: S.labelId,
330
- descriptionId: S.descriptionId,
331
- errorId: S.errorId,
332
- error: x,
333
- htmlFor: k ?? _,
334
- children: /* @__PURE__ */ p(n, {
325
+ if (_ === "date-range") {
326
+ let { control: e, name: n, label: r, description: i, required: a, className: o, layout: s, descriptionPosition: c, labelAction: u, requiredIndicator: _, errorIcon: v, showErrorIcon: x, disabled: S, labelClassName: C, labelRowClassName: w, descriptionClassName: T, errorClassName: E, contentClassName: D, fieldClassName: O, id: k, kind: A, onValueChange: j, onBlur: M, ...N } = m, P = f.value;
327
+ return /* @__PURE__ */ d(l, {
328
+ ...g,
329
+ labelId: b.labelId,
330
+ descriptionId: b.descriptionId,
331
+ errorId: b.errorId,
332
+ error: y,
333
+ htmlFor: k ?? h,
334
+ children: /* @__PURE__ */ d(t, {
335
335
  ...N,
336
- id: k ?? _,
336
+ id: k ?? h,
337
337
  value: P && typeof P == "object" ? {
338
338
  from: P.from,
339
339
  to: P.to
@@ -343,58 +343,58 @@ function g(g) {
343
343
  },
344
344
  fromInputProps: {
345
345
  ...N.fromInputProps ?? {},
346
- disabled: b,
347
- readOnly: g.readOnly,
348
- "aria-describedby": S.describedBy,
349
- "aria-errormessage": x ? S.errorId : void 0
346
+ disabled: S,
347
+ readOnly: m.readOnly,
348
+ "aria-describedby": b.describedBy,
349
+ "aria-errormessage": y ? b.errorId : void 0
350
350
  },
351
351
  toInputProps: {
352
352
  ...N.toInputProps ?? {},
353
- disabled: b,
354
- readOnly: g.readOnly,
355
- "aria-describedby": S.describedBy,
356
- "aria-errormessage": x ? S.errorId : void 0
353
+ disabled: S,
354
+ readOnly: m.readOnly,
355
+ "aria-describedby": b.describedBy,
356
+ "aria-errormessage": y ? b.errorId : void 0
357
357
  },
358
358
  onValueChange: (e) => {
359
- m.onChange(e), j?.(e);
359
+ f.onChange(e), j?.(e);
360
360
  },
361
- "aria-invalid": h.invalid || void 0,
361
+ "aria-invalid": p.invalid || void 0,
362
362
  onBlur: (e) => {
363
- m.onBlur(), M?.(e);
363
+ f.onBlur(), M?.(e);
364
364
  }
365
365
  })
366
366
  });
367
367
  }
368
- let { control: C, name: w, label: T, description: E, required: D, className: O, layout: k, descriptionPosition: A, labelAction: j, requiredIndicator: M, errorIcon: N, showErrorIcon: P, disabled: F, readOnly: I, labelClassName: L, labelRowClassName: R, descriptionClassName: z, errorClassName: B, contentClassName: V, fieldClassName: H, transformIn: U, transformOut: W, id: G, kind: K, onChange: q, onBlur: J, ...Y } = g;
369
- return /* @__PURE__ */ p(d, {
370
- ...v,
371
- labelId: S.labelId,
372
- descriptionId: S.descriptionId,
373
- errorId: S.errorId,
374
- error: x,
375
- htmlFor: G ?? _,
376
- children: /* @__PURE__ */ p(u, {
377
- ...Y,
378
- id: G ?? _,
379
- ref: m.ref,
380
- name: m.name,
381
- value: U ? U(m.value) : m.value ?? "",
382
- disabled: F,
383
- readOnly: I,
368
+ let { control: x, name: S, label: C, description: w, required: T, className: E, layout: D, descriptionPosition: O, labelAction: k, requiredIndicator: A, errorIcon: j, showErrorIcon: M, disabled: N, readOnly: P, labelClassName: F, labelRowClassName: I, descriptionClassName: L, errorClassName: R, contentClassName: z, fieldClassName: B, transformIn: V, transformOut: H, id: U, kind: W, onChange: G, onBlur: K, ...q } = m;
369
+ return /* @__PURE__ */ d(l, {
370
+ ...g,
371
+ labelId: b.labelId,
372
+ descriptionId: b.descriptionId,
373
+ errorId: b.errorId,
374
+ error: y,
375
+ htmlFor: U ?? h,
376
+ children: /* @__PURE__ */ d(c, {
377
+ ...q,
378
+ id: U ?? h,
379
+ ref: f.ref,
380
+ name: f.name,
381
+ value: V ? V(f.value) : f.value ?? "",
382
+ disabled: N,
383
+ readOnly: P,
384
384
  onBlur: (e) => {
385
- m.onBlur(), J?.(e);
385
+ f.onBlur(), K?.(e);
386
386
  },
387
387
  onChange: (e) => {
388
- m.onChange(W ? W(e) : e.target.value), q?.(e);
388
+ f.onChange(H ? H(e) : e.target.value), G?.(e);
389
389
  },
390
- "aria-invalid": h.invalid || void 0,
391
- "aria-describedby": S.describedBy,
392
- "aria-errormessage": x ? S.errorId : void 0,
393
- className: H ?? b
390
+ "aria-invalid": p.invalid || void 0,
391
+ "aria-describedby": b.describedBy,
392
+ "aria-errormessage": y ? b.errorId : void 0,
393
+ className: B ?? v
394
394
  })
395
395
  });
396
396
  }
397
397
  });
398
398
  }
399
399
  //#endregion
400
- export { g as FormInput };
400
+ export { m as FormInput };