@asteby/metacore-runtime-react 13.8.1 → 13.8.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 13.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 9bc3870: fix(dynamic-select): truncate the placeholder/value so it never overlaps the inline-create "+". The label span lacked `min-w-0`, so a long empty-state placeholder ("Buscar categoría (opcional)…") grew past the trigger and overlapped the "+". Add `min-w-0 flex-1 truncate`.
8
+
3
9
  ## 13.8.1
4
10
 
5
11
  ### Patch Changes
@@ -84,7 +84,7 @@ export function DynamicSelectField({ field, value, onChange }) {
84
84
  },
85
85
  }));
86
86
  };
87
- return (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, id: field.key, className: "min-w-0 flex-1 justify-between font-normal", "data-empty": !value, children: [_jsx("span", { className: 'truncate ' + (selectedLabel ? '' : 'text-muted-foreground'), children: selectedLabel || field.placeholder || 'Buscar…' }), _jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "p-0", align: "start",
87
+ return (_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { type: "button", variant: "outline", role: "combobox", "aria-expanded": open, id: field.key, className: "min-w-0 flex-1 justify-between font-normal", "data-empty": !value, children: [_jsx("span", { className: 'min-w-0 flex-1 truncate text-left ' + (selectedLabel ? '' : 'text-muted-foreground'), children: selectedLabel || field.placeholder || 'Buscar…' }), _jsx(ChevronsUpDown, { className: "ml-2 size-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "p-0", align: "start",
88
88
  // Match the trigger width without an arbitrary Tailwind class
89
89
  // (those don't always survive a consuming app's Tailwind scan).
90
90
  style: { width: 'var(--radix-popover-trigger-width)' }, children: _jsxs(Command, { shouldFilter: false, children: [_jsx(CommandInput, { placeholder: field.placeholder || 'Buscar…', value: search, onValueChange: setSearch }), _jsxs(CommandList, { children: [loading && (_jsxs("div", { className: "text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm", children: [_jsx(Loader2, { className: "size-4 animate-spin" }), "Buscando\u2026"] })), !loading && options.length === 0 && (_jsx(CommandEmpty, { children: debounced ? 'Sin resultados' : 'Escribí para buscar…' })), !loading && options.length > 0 && (_jsx(CommandGroup, { className: "max-h-64 overflow-auto", children: options.map((opt) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "13.8.1",
3
+ "version": "13.8.2",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,8 +61,8 @@
61
61
  "typescript": "^6.0.0",
62
62
  "vitest": "^4.0.0",
63
63
  "zustand": "^5.0.0",
64
- "@asteby/metacore-ui": "2.1.1",
65
- "@asteby/metacore-sdk": "3.1.0"
64
+ "@asteby/metacore-sdk": "3.1.0",
65
+ "@asteby/metacore-ui": "2.1.1"
66
66
  },
67
67
  "scripts": {
68
68
  "build": "tsc -p tsconfig.json",
@@ -123,7 +123,7 @@ export function DynamicSelectField({ field, value, onChange }: DynamicSelectFiel
123
123
  className="min-w-0 flex-1 justify-between font-normal"
124
124
  data-empty={!value}
125
125
  >
126
- <span className={'truncate ' + (selectedLabel ? '' : 'text-muted-foreground')}>
126
+ <span className={'min-w-0 flex-1 truncate text-left ' + (selectedLabel ? '' : 'text-muted-foreground')}>
127
127
  {selectedLabel || field.placeholder || 'Buscar…'}
128
128
  </span>
129
129
  <ChevronsUpDown className="ml-2 size-4 shrink-0 opacity-50" />