shadcn-zod-formkit 1.34.0 → 1.34.1

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.
package/dist/index.cjs CHANGED
@@ -205,16 +205,17 @@ var BaseInput = class {
205
205
  this.isSubmitting = isSubmitting;
206
206
  }
207
207
  };
208
- var entityToInputOption = (entitiy, name = "name", description = "description", groupedLabel) => ({
208
+ var entityToInputOption = (entitiy, name = "name", description = "description", groupedLabel, optionLabel = "label") => ({
209
209
  id: entitiy["id"],
210
210
  name: entitiy[name],
211
+ label: entitiy[optionLabel],
211
212
  description: entitiy[description],
212
213
  groupedLabel
213
214
  });
214
- var entitiesToInputOption = (data, optionValue = "name", groupedLabel) => {
215
+ var entitiesToInputOption = (data, optionValue = "name", groupedLabel, optionLabel = "description") => {
215
216
  const entities = [];
216
217
  for (const key of data) {
217
- const entidad = entityToInputOption(key, optionValue, void 0, groupedLabel);
218
+ const entidad = entityToInputOption(key, optionValue, optionLabel, groupedLabel);
218
219
  if (entidad) entities.push(entidad);
219
220
  }
220
221
  return entities;
@@ -1933,7 +1934,7 @@ var GroupedSwitches = ({ options, onChange, input, isSubmitting }) => {
1933
1934
  ] })
1934
1935
  ] }),
1935
1936
  switches.map((opt, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `p-2 rounded-lg flex flex-row w-full items-center justify-between ${!(index % 2) ? "bg-black/5" : "bg-white/5"}`, children: [
1936
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: String(opt.id), children: opt.label || opt.name }),
1937
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: String(opt.id), children: opt.label || opt.description || opt.name }),
1937
1938
  /* @__PURE__ */ jsxRuntime.jsx(
1938
1939
  Switch,
1939
1940
  {