@nadicodeai/ui 12.1.103 → 12.1.105
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.
|
@@ -292,8 +292,10 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
|
|
|
292
292
|
}));
|
|
293
293
|
// An entity row keeps its record on one 72 px row on a narrow card: the facts that leave the
|
|
294
294
|
// row join the line under the name, which `RecordIdentity` draws, instead of a row of their own.
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
// The line's provider stays in the tree when the card is wide enough for the columns and only
|
|
296
|
+
// its facts go, so a layout read after hydration never remounts the name a click is landing on.
|
|
297
|
+
const compactLine = entities && compactLayout && detailCells.length > 0
|
|
298
|
+
? { layout: compactLayout, facts: shownLayout === "columns" ? [] : detailFacts() }
|
|
297
299
|
: undefined;
|
|
298
300
|
const detailRowShown = !entities && detailCells.length > 0 && shownLayout !== "columns";
|
|
299
301
|
const menu = rowMenu?.(row.original);
|
|
@@ -320,7 +322,7 @@ function RecordsTable({ kind, columns, data, getRowId, filterColumnId, filterPla
|
|
|
320
322
|
return _jsx(TableCell, { className: className }, cell.id);
|
|
321
323
|
}
|
|
322
324
|
const content = holdsCompactLine ? (_jsx(TableCompactLine, { ...compactLine, children: renderCell(cell) })) : (renderCell(cell));
|
|
323
|
-
const titledWhenCut = cutByEllipsis || holdsCompactLine;
|
|
325
|
+
const titledWhenCut = cutByEllipsis || (holdsCompactLine && compactLine.facts.length > 0);
|
|
324
326
|
return (_jsx(TableCell, { className: className, onFocus: titledWhenCut ? titleWhenCut : undefined, onPointerEnter: titledWhenCut ? titleWhenCut : undefined, children: isPrimaryLink
|
|
325
327
|
? renderRowLink(primaryRowLinkProps({ href, label, wraps, content }))
|
|
326
328
|
: content }, cell.id));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-save.d.ts","sourceRoot":"","sources":["../../src/internal/settings-save.tsx"],"names":[],"mappings":"AAEA,OAAO,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AK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAOtF,MAAM,MAAM,mBAAmB,GAAG;IAChC,OAAO,EAAE,eAAe,CAAC;IACzB,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB;;;;OAIG;IACH,MAAM,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IACpE,aAAa;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe;IACf,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,mIAAmI;IACnI,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3F;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AA4FF,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;CACrB,+BAsFA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,EAAE,EAAE;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,sCAqC1D"}
|
|
@@ -133,6 +133,16 @@ export function SettingsFieldFailure({ id }) {
|
|
|
133
133
|
const invalid = control.getAttribute("aria-invalid");
|
|
134
134
|
control.setAttribute("aria-invalid", "true");
|
|
135
135
|
control.setAttribute("aria-describedby", describedBy ? `${describedBy} ${failureId}` : failureId);
|
|
136
|
+
// The person pressed Save and the save failed about this field: the field takes the focus, now that the
|
|
137
|
+
// failure rendered with the end of the save and the field is enabled again. Focus they moved elsewhere stays.
|
|
138
|
+
const active = document.activeElement;
|
|
139
|
+
const leftOnSave = !active ||
|
|
140
|
+
active === document.body ||
|
|
141
|
+
(active instanceof HTMLButtonElement &&
|
|
142
|
+
active.type === "submit" &&
|
|
143
|
+
active.form === control.closest("form"));
|
|
144
|
+
if (leftOnSave && control instanceof HTMLElement)
|
|
145
|
+
control.focus();
|
|
136
146
|
return () => {
|
|
137
147
|
if (invalid === null)
|
|
138
148
|
control.removeAttribute("aria-invalid");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.105",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@base-ui/react": "^1.9.0",
|
|
81
81
|
"@iconify-icons/logos": "^2.0.2",
|
|
82
82
|
"@iconify/react": "^6.0.2",
|
|
83
|
-
"@nadicodeai/design-system": "12.1.
|
|
83
|
+
"@nadicodeai/design-system": "12.1.105",
|
|
84
84
|
"@tanstack/react-table": "^9.2.8",
|
|
85
85
|
"class-variance-authority": "^0.7.1",
|
|
86
86
|
"clsx": "^2.1.1",
|