@asteby/metacore-runtime-react 13.8.0 → 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 +12 -0
- package/dist/dynamic-select-field.js +1 -1
- package/package.json +1 -1
- package/src/dynamic-select-field.tsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
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
|
+
|
|
9
|
+
## 13.8.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- efac939: fix(dynamic-select): the inline-create "+" no longer overlaps the combobox. The trigger used `w-full` which, in the flex row beside the "+", forced 100% width and overlapped the button in narrow (2-column) modal grids. Use `flex-1 min-w-0` so it grows to fill the space left for the "+".
|
|
14
|
+
|
|
3
15
|
## 13.8.0
|
|
4
16
|
|
|
5
17
|
### Minor 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: "w-
|
|
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
|
@@ -120,10 +120,10 @@ export function DynamicSelectField({ field, value, onChange }: DynamicSelectFiel
|
|
|
120
120
|
role="combobox"
|
|
121
121
|
aria-expanded={open}
|
|
122
122
|
id={field.key}
|
|
123
|
-
className="w-
|
|
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" />
|