@open-mercato/ui 0.6.5-develop.4734.1.dd8285dd2e → 0.6.5-develop.4772.1.d517a085d1

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.
@@ -1,3 +1,3 @@
1
- Generated lucide registry with 139 icons -> /home/runner/work/open-mercato/open-mercato/packages/ui/src/backend/icons/lucideRegistry.generated.tsx
1
+ Generated lucide registry with 140 icons -> /home/runner/work/open-mercato/open-mercato/packages/ui/src/backend/icons/lucideRegistry.generated.tsx
2
2
  [build:ui] found 381 entry points
3
3
  [build:ui] built successfully
@@ -3334,6 +3334,12 @@ const FieldControl = React.memo(
3334
3334
  const placeholder = builtin?.placeholder;
3335
3335
  const rootClassName = wrapperClassName ? `space-y-1 ${wrapperClassName}` : "space-y-1";
3336
3336
  const validateOnWrapperBlur = supportsWrapperBlurValidation(field);
3337
+ const singleSelectValue = Array.isArray(value) ? String(value[0] ?? "") : value == null ? "" : String(value);
3338
+ const singleSelectOptionsKey = React.useMemo(
3339
+ () => options.map((opt) => `${opt.value}:${opt.label}`).join("\0"),
3340
+ [options]
3341
+ );
3342
+ const singleSelectLabel = singleSelectValue ? options.find((option) => option.value === singleSelectValue)?.label : void 0;
3337
3343
  return /* @__PURE__ */ jsxs(
3338
3344
  "div",
3339
3345
  {
@@ -3519,7 +3525,7 @@ const FieldControl = React.memo(
3519
3525
  field.type === "select" && !builtin?.multiple && /* @__PURE__ */ jsxs(
3520
3526
  Select,
3521
3527
  {
3522
- value: Array.isArray(value) ? String(value[0] ?? "") : value == null ? "" : String(value),
3528
+ value: singleSelectValue,
3523
3529
  onValueChange: (next) => {
3524
3530
  if (!next || next === SELECT_CLEAR_SENTINEL) {
3525
3531
  const isCustomField = field.id.startsWith("cf_") || field.id.startsWith("cf:");
@@ -3530,13 +3536,14 @@ const FieldControl = React.memo(
3530
3536
  },
3531
3537
  disabled,
3532
3538
  children: [
3533
- /* @__PURE__ */ jsx(SelectTrigger, { "data-crud-focus-target": "", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("ui.forms.select.emptyOption", "\u2014") }) }),
3539
+ /* @__PURE__ */ jsx(SelectTrigger, { "data-crud-focus-target": "", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: t("ui.forms.select.emptyOption", "\u2014"), children: singleSelectLabel }) }),
3534
3540
  /* @__PURE__ */ jsxs(SelectContent, { children: [
3535
3541
  !field.required && value != null && value !== "" && /* @__PURE__ */ jsx(SelectItem, { value: SELECT_CLEAR_SENTINEL, children: t("ui.forms.select.clearOption", "\u2014 Clear \u2014") }),
3536
3542
  options.filter((opt) => opt.value !== "").map((opt) => /* @__PURE__ */ jsx(SelectItem, { value: opt.value, children: opt.label }, opt.value))
3537
3543
  ] })
3538
3544
  ]
3539
- }
3545
+ },
3546
+ `${field.id}:${singleSelectValue}:${singleSelectOptionsKey}`
3540
3547
  ),
3541
3548
  field.type === "select" && builtin?.multiple && builtin.listbox === true && /* @__PURE__ */ jsx(
3542
3549
  ListboxMultiSelect,