@12-apps/ui 1.21.0 → 1.21.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/package.json
CHANGED
|
@@ -7,6 +7,24 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { BaseCard } from "./base-card";
|
|
9
9
|
export { BaseListCard, type BaseListCardProps } from "./base-list-card";
|
|
10
|
+
// THE LIST'S HALF OF THE CARD API. `BaseListCard` alone is not usable as
|
|
11
|
+
// designed: its cells are declared by the GROUP and typed by
|
|
12
|
+
// `ListCardCellConfig`, and without these a consumer can only fall back to the
|
|
13
|
+
// named slots and standalone rails — which is the layout the cell config
|
|
14
|
+
// replaced, and gives up the alignment that was the point.
|
|
15
|
+
export {
|
|
16
|
+
ListCardGroup,
|
|
17
|
+
DEFAULT_RAILS,
|
|
18
|
+
RAIL_COUNT,
|
|
19
|
+
type ListRails,
|
|
20
|
+
} from "./list-card-rails";
|
|
21
|
+
export {
|
|
22
|
+
type ListCardCellConfig,
|
|
23
|
+
DEFAULT_CELL_WIDTH,
|
|
24
|
+
} from "./list-card-cells";
|
|
25
|
+
// Published by a drag container so a row can draw the marker; a consumer wiring
|
|
26
|
+
// its own DnD needs the type to build the value.
|
|
27
|
+
export { DropIndicator } from "./data-views-drag";
|
|
10
28
|
export {
|
|
11
29
|
DragContainerProvider,
|
|
12
30
|
useDragItem,
|
|
@@ -190,6 +190,7 @@ export const Select = React.forwardRef<HTMLDivElement, SelectProps>(
|
|
|
190
190
|
pulse,
|
|
191
191
|
'data-testid': dataTestId,
|
|
192
192
|
value,
|
|
193
|
+
'aria-label': ariaLabel,
|
|
193
194
|
...props
|
|
194
195
|
},
|
|
195
196
|
ref,
|
|
@@ -223,6 +224,24 @@ export const Select = React.forwardRef<HTMLDivElement, SelectProps>(
|
|
|
223
224
|
data-testid={dataTestId ? `${dataTestId}-select` : 'select'}
|
|
224
225
|
value={value ?? ''}
|
|
225
226
|
{...props}
|
|
227
|
+
/*
|
|
228
|
+
* `role="combobox"` sits on MUI's display DIV, not on the hidden
|
|
229
|
+
* native input that `{...props}` reaches — so an `aria-label` passed
|
|
230
|
+
* to this component never landed on the element carrying the role,
|
|
231
|
+
* and MUI's `aria-labelledby` then fell back to that div's OWN id.
|
|
232
|
+
* The control announced as its current value: a filter's field
|
|
233
|
+
* select read "Status" instead of "Filtro 1 — campo".
|
|
234
|
+
*
|
|
235
|
+
* Forwarding it here names the right element. The explicit
|
|
236
|
+
* `undefined` clears that self-referential `aria-labelledby`, which
|
|
237
|
+
* would otherwise win — a labelledby always beats a label in the
|
|
238
|
+
* accessible-name computation.
|
|
239
|
+
*/
|
|
240
|
+
SelectDisplayProps={
|
|
241
|
+
ariaLabel === undefined
|
|
242
|
+
? undefined
|
|
243
|
+
: { 'aria-label': ariaLabel, 'aria-labelledby': undefined }
|
|
244
|
+
}
|
|
226
245
|
>
|
|
227
246
|
{renderMenuItems(options, placeholder, dataTestId)}
|
|
228
247
|
</MuiSelect>
|