twico-ui 1.18.0 → 1.18.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 +14 -0
- package/dist/index.cjs +9 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Twico UI are documented here (newest first). This file is generated automatically on each release by [semantic-release](https://semantic-release.gitbook.io/) from [Conventional Commits](https://www.conventionalcommits.org/) — do not edit it by hand. The same notes appear on each [GitHub Release](https://github.com/EncryptionL/twico-ui/releases).
|
|
4
4
|
|
|
5
|
+
## [1.18.2](https://github.com/EncryptionL/twico-ui/compare/v1.18.1...v1.18.2) (2026-07-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **datatable:** scope the reorder grab cursor to the drag handle ([e6bc6cd](https://github.com/EncryptionL/twico-ui/commit/e6bc6cd71a4295fa25635a8a9467720133e041dd)), closes [#263](https://github.com/EncryptionL/twico-ui/issues/263)
|
|
11
|
+
|
|
12
|
+
## [1.18.1](https://github.com/EncryptionL/twico-ui/compare/v1.18.0...v1.18.1) (2026-07-23)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **datatable:** stop the reorder grip from clipping the selection checkbox ([096f5e8](https://github.com/EncryptionL/twico-ui/commit/096f5e8977949bc664ffcec21931c9062d831522)), closes [#261](https://github.com/EncryptionL/twico-ui/issues/261)
|
|
18
|
+
|
|
5
19
|
# [1.18.0](https://github.com/EncryptionL/twico-ui/compare/v1.17.2...v1.18.0) (2026-07-17)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.cjs
CHANGED
|
@@ -8346,8 +8346,8 @@ var DT_CSS = `
|
|
|
8346
8346
|
.twc-dt__row[data-pinned-row="top"] > .twc-dt__td { border-bottom: var(--border-medium) solid var(--color-primary-border); box-shadow: 0 1px 0 var(--color-primary-border); }
|
|
8347
8347
|
.twc-dt__row[data-pinned-row="bottom"] > .twc-dt__td { border-top: var(--border-medium) solid var(--color-primary-border); }
|
|
8348
8348
|
|
|
8349
|
-
/* Row reordering
|
|
8350
|
-
|
|
8349
|
+
/* Row reordering \u2014 the grab affordance lives on the drag handle only (#263), not the whole row, so
|
|
8350
|
+
hovering a normal data cell isn't presented as draggable (the row stays a drag source for the mouse). */
|
|
8351
8351
|
.twc-dt__row[data-row-dragging] { opacity: 0.4; }
|
|
8352
8352
|
/* #239 diff mode: row op tint + before\u2192after cells (single-line, clipped by the td's own overflow). */
|
|
8353
8353
|
.twc-dt__row[data-op="added"] > .twc-dt__td { background: color-mix(in srgb, var(--color-success) 7%, transparent); }
|
|
@@ -8378,6 +8378,7 @@ var DT_CSS = `
|
|
|
8378
8378
|
.twc-dt__row:hover .twc-dt__row-handle, .twc-dt__row-handle:focus-visible { opacity: 0.7; }
|
|
8379
8379
|
.twc-dt__row-handle:focus-visible { outline: none; box-shadow: var(--ring); color: var(--color-primary); }
|
|
8380
8380
|
.twc-dt__row-handle[data-grabbed="true"] { opacity: 1; color: var(--color-primary); }
|
|
8381
|
+
.twc-dt__row-handle:active, .twc-dt__row-handle[data-grabbed="true"] { cursor: grabbing; }
|
|
8381
8382
|
.twc-dt__row-handle svg { width: 14px; height: 14px; }
|
|
8382
8383
|
/* Visually-hidden aria-live region for reorder announcements */
|
|
8383
8384
|
.twc-dt__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
@@ -9451,7 +9452,8 @@ function Datatable({
|
|
|
9451
9452
|
return [...L, ...mid, ...R];
|
|
9452
9453
|
}, [pins, hidden, visibleCols, colByField, order]);
|
|
9453
9454
|
const NUM_W = 56;
|
|
9454
|
-
const
|
|
9455
|
+
const CHK_W = checkboxSelection ? rowReorder ? 68 : 44 : 0;
|
|
9456
|
+
const numLeft = CHK_W;
|
|
9455
9457
|
const leadW = numLeft + (showRowNum ? NUM_W : 0);
|
|
9456
9458
|
const stickyOf = (field) => {
|
|
9457
9459
|
if (pins.left.includes(field)) {
|
|
@@ -10374,7 +10376,7 @@ function Datatable({
|
|
|
10374
10376
|
onDragEnd: reorderable ? () => setRowDrag({ from: null, over: null, after: false }) : void 0,
|
|
10375
10377
|
onClick: (e) => handleRowClick(e, k, row),
|
|
10376
10378
|
children: [
|
|
10377
|
-
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10379
|
+
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsxs("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W }, children: [
|
|
10378
10380
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 4 }, children: [
|
|
10379
10381
|
reorderable ? rowHandle(k, midIdx, row) : null,
|
|
10380
10382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10782,7 +10784,7 @@ function Datatable({
|
|
|
10782
10784
|
onKeyDown: onGridKeyDown,
|
|
10783
10785
|
children: [
|
|
10784
10786
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { ref: theadRef, children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", "aria-rowindex": 1, children: [
|
|
10785
|
-
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("th", { className: "twc-dt__th", role: "columnheader", "aria-label": "Select", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10787
|
+
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("th", { className: "twc-dt__th", role: "columnheader", "aria-label": "Select", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W, minWidth: CHK_W }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "twc-dt__th-inner", style: { justifyContent: "center", padding: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10786
10788
|
"span",
|
|
10787
10789
|
{
|
|
10788
10790
|
className: "twc-dt__check",
|
|
@@ -10958,7 +10960,7 @@ function Datatable({
|
|
|
10958
10960
|
})
|
|
10959
10961
|
] }) }),
|
|
10960
10962
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: loading ? Array.from({ length: paginated ? Math.min(sizeVal, 8) : 8 }).map((_, ri) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "twc-dt__row", role: "row", children: [
|
|
10961
|
-
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", style: { insetInlineStart: 0, width:
|
|
10963
|
+
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "twc-dt__td", role: "gridcell", "data-pin": "left", style: { insetInlineStart: 0, width: CHK_W }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-dt__sk", "aria-hidden": "true", style: { "--_w": "18px", height: 18, borderRadius: 4 } }) }) : null,
|
|
10962
10964
|
showRowNum ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "twc-dt__td twc-dt__rownum", role: "gridcell", "aria-hidden": "true", "data-pin": "left", style: { insetInlineStart: numLeft, width: NUM_W }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-dt__sk", "aria-hidden": "true", style: { "--_w": "16px", height: 14, borderRadius: 4 } }) }) : null,
|
|
10963
10965
|
ordered.map((c, ci) => {
|
|
10964
10966
|
const st = stickyOf(c.field);
|
|
@@ -10980,7 +10982,7 @@ function Datatable({
|
|
|
10980
10982
|
pinnedBottomRows.map((row) => renderLeaf(row, keyIndex.get(keyOf(row)), "bottom"))
|
|
10981
10983
|
] }) }),
|
|
10982
10984
|
hasAggregation && aggOn && !loading && paged.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("tfoot", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", children: [
|
|
10983
|
-
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("td", { role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width:
|
|
10985
|
+
checkboxSelection ? /* @__PURE__ */ jsxRuntime.jsx("td", { role: "gridcell", "data-pin": "left", "data-pin-edge": pins.left.length || showRowNum ? void 0 : "left", style: { insetInlineStart: 0, width: CHK_W } }) : null,
|
|
10984
10986
|
showRowNum ? /* @__PURE__ */ jsxRuntime.jsx("td", { className: "twc-dt__rownum", role: "gridcell", "aria-hidden": "true", "data-pin": "left", "data-pin-edge": pins.left.length ? void 0 : "left", style: { insetInlineStart: numLeft, width: NUM_W } }) : null,
|
|
10985
10987
|
ordered.map((c) => {
|
|
10986
10988
|
const st = stickyOf(c.field);
|