twico-ui 1.45.1 → 1.46.0
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 +7 -0
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/llms.txt +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
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.46.0](https://github.com/EncryptionL/twico-ui/compare/v1.45.1...v1.46.0) (2026-10-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **datatable,cardgrid:** selectionSummary slot, and move toolbarActions after the built-ins ([8ddbad9](https://github.com/EncryptionL/twico-ui/commit/8ddbad9c3d3321e585d895115ed4bb0b1a9c0c27)), closes [#492](https://github.com/EncryptionL/twico-ui/issues/492) [#478](https://github.com/EncryptionL/twico-ui/issues/478) [#286](https://github.com/EncryptionL/twico-ui/issues/286)
|
|
11
|
+
|
|
5
12
|
## [1.45.1](https://github.com/EncryptionL/twico-ui/compare/v1.45.0...v1.45.1) (2026-10-21)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.cjs
CHANGED
|
@@ -9558,6 +9558,12 @@ th.twc-dt__rownum .twc-dt__th-inner { padding-inline: 8px; gap: 2px; justify-con
|
|
|
9558
9558
|
.twc-dt__batch-x:hover { background: color-mix(in srgb, var(--color-primary) 20%, transparent); }
|
|
9559
9559
|
.twc-dt__batch-x svg { width: 16px; height: 16px; }
|
|
9560
9560
|
.twc-dt__batch-count { font-size: var(--text-sm); font-weight: var(--font-bold); color: var(--color-primary-subtle-fg); white-space: nowrap; }
|
|
9561
|
+
/* #492: the host's running total, sitting with the count it qualifies. Same colour as the count,
|
|
9562
|
+
differentiated by WEIGHT rather than by a lighter token: this bar is --color-primary-subtle, and
|
|
9563
|
+
--color-text-subtle on that is 4.26:1, under the 4.5:1 needed for normal text. */
|
|
9564
|
+
.twc-dt__batch-summary { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm);
|
|
9565
|
+
color: var(--color-primary-subtle-fg); white-space: nowrap; }
|
|
9566
|
+
.twc-dt__batch-summary::before { content: ""; width: var(--border-thin); height: 14px; background: currentColor; opacity: 0.35; }
|
|
9561
9567
|
.twc-dt__batch-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
|
|
9562
9568
|
.twc-dt__batch-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
|
|
9563
9569
|
border: var(--border-thin) solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface);
|
|
@@ -10058,6 +10064,7 @@ function Datatable({
|
|
|
10058
10064
|
onColumnVisibilityChange,
|
|
10059
10065
|
batchActions = [],
|
|
10060
10066
|
onRowSelectionChange,
|
|
10067
|
+
selectionSummary,
|
|
10061
10068
|
getRowStyle,
|
|
10062
10069
|
getRowClassName,
|
|
10063
10070
|
showExport = false,
|
|
@@ -12927,13 +12934,13 @@ function Datatable({
|
|
|
12927
12934
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `twc-dt ${className}`, ref: rootRef, "data-density": density, "data-resizing": resizing || void 0, "data-editing": editing ? "" : void 0, ...rest, children: [
|
|
12928
12935
|
__twcStyles,
|
|
12929
12936
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__toolbar", "data-compact": compact || void 0, children: [
|
|
12930
|
-
toolbarActions != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "twc-dt__toolbar-actions", children: toolbarActions }) : null,
|
|
12931
12937
|
(batchActions.length || hasBatchEditor) && selected.size > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__batch", children: [
|
|
12932
12938
|
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: "twc-dt__batch-x", onClick: clearSelection, "aria-label": "Clear selection", children: /* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.x }) }),
|
|
12933
12939
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "twc-dt__batch-count", children: [
|
|
12934
12940
|
selected.size,
|
|
12935
12941
|
" selected"
|
|
12936
12942
|
] }),
|
|
12943
|
+
selectionSummary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-dt__batch-summary", children: typeof selectionSummary === "function" ? selectionSummary(selKeys, selectedRows) : selectionSummary }) : null,
|
|
12937
12944
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__batch-actions", children: [
|
|
12938
12945
|
hasBatchEditor ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", className: "twc-dt__batch-btn", onClick: (e) => openBatchEditor(e.currentTarget), children: [
|
|
12939
12946
|
/* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.pencil }),
|
|
@@ -13128,6 +13135,7 @@ function Datatable({
|
|
|
13128
13135
|
}
|
|
13129
13136
|
)
|
|
13130
13137
|
] }) : null,
|
|
13138
|
+
toolbarActions != null ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "twc-dt__toolbar-actions", children: toolbarActions }) : null,
|
|
13131
13139
|
searchable ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__search", children: [
|
|
13132
13140
|
/* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.search }),
|
|
13133
13141
|
/* @__PURE__ */ jsxRuntime.jsx("input", { ref: quickSearchRef, placeholder: "Search\u2026", "aria-label": "Search rows", value: quick, onChange: (e) => commitQuick(e.target.value) }),
|
|
@@ -14416,6 +14424,11 @@ var CARDGRID_CSS = `
|
|
|
14416
14424
|
padding: var(--space-2) var(--space-3); border: var(--border-thin) solid var(--color-primary-border);
|
|
14417
14425
|
background: var(--color-primary-subtle); border-radius: var(--radius-md); }
|
|
14418
14426
|
.twc-cardgrid__batch-count { font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--color-primary-subtle-fg); }
|
|
14427
|
+
/* #492: same slot, same contract as Datatable. Weight, not a lighter token - this bar is
|
|
14428
|
+
--color-primary-subtle, where --color-text-subtle is 4.26:1 and fails normal-text contrast. */
|
|
14429
|
+
.twc-cardgrid__batch-summary { display: inline-flex; align-items: center; gap: var(--space-2);
|
|
14430
|
+
font-size: var(--text-sm); color: var(--color-primary-subtle-fg); }
|
|
14431
|
+
.twc-cardgrid__batch-summary::before { content: ""; width: var(--border-thin); height: 14px; background: currentColor; opacity: 0.35; }
|
|
14419
14432
|
.twc-cardgrid__batch-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-inline-start: auto; }
|
|
14420
14433
|
.twc-cardgrid__batch-btn { display: inline-flex; align-items: center; gap: var(--space-2); height: var(--control-h-sm);
|
|
14421
14434
|
padding-inline: var(--space-3); border: var(--border-thin) solid var(--color-border); background: var(--color-surface);
|
|
@@ -14471,6 +14484,7 @@ function CardGrid({
|
|
|
14471
14484
|
// the whole point, and it was the only Datatable affordance CardGrid lacked.
|
|
14472
14485
|
checkboxSelection = false,
|
|
14473
14486
|
batchActions = [],
|
|
14487
|
+
selectionSummary,
|
|
14474
14488
|
onRowSelectionChange,
|
|
14475
14489
|
selectionPlacement = "top-start",
|
|
14476
14490
|
selectionLabel,
|
|
@@ -14678,6 +14692,7 @@ function CardGrid({
|
|
|
14678
14692
|
selected.size,
|
|
14679
14693
|
" selected"
|
|
14680
14694
|
] }),
|
|
14695
|
+
selectionSummary != null ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "twc-cardgrid__batch-summary", children: typeof selectionSummary === "function" ? selectionSummary(selKeys, selectedRows) : selectionSummary }) : null,
|
|
14681
14696
|
showSelectAll && pageRows.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "twc-cardgrid__selall", children: [
|
|
14682
14697
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14683
14698
|
Checkbox,
|