twico-ui 1.14.0 → 1.14.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +24 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.mjs +24 -13
- package/dist/index.mjs.map +1 -1
- package/llms.txt +3 -0
- 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.14.1](https://github.com/EncryptionL/twico-ui/compare/v1.14.0...v1.14.1) (2026-07-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **styles:** input renders invisibly under React 19 hoist dedup; add Datatable external-search + renderEditCell ([#234](https://github.com/EncryptionL/twico-ui/issues/234), [#235](https://github.com/EncryptionL/twico-ui/issues/235), [#236](https://github.com/EncryptionL/twico-ui/issues/236)) ([f661ea9](https://github.com/EncryptionL/twico-ui/commit/f661ea90dab1bf4b97ee02e8f103fb44ce668f43)), closes [#232](https://github.com/EncryptionL/twico-ui/issues/232)
|
|
11
|
+
|
|
5
12
|
# [1.14.0](https://github.com/EncryptionL/twico-ui/compare/v1.13.0...v1.14.0) (2026-07-13)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.cjs
CHANGED
|
@@ -7091,7 +7091,8 @@ var FIELD_CSS2 = `
|
|
|
7091
7091
|
.twc-field__req { color: var(--color-danger); }
|
|
7092
7092
|
.twc-field__hint { font-size: var(--text-xs); color: var(--color-text-muted); }
|
|
7093
7093
|
.twc-field__error { font-size: var(--text-xs); color: var(--color-danger-subtle-fg); font-weight: var(--font-medium); }
|
|
7094
|
-
|
|
7094
|
+
`;
|
|
7095
|
+
var INPUT_EXTRA_CSS = `
|
|
7095
7096
|
.twc-input {
|
|
7096
7097
|
--_h: var(--control-h-md);
|
|
7097
7098
|
display: flex; align-items: center; gap: var(--space-2);
|
|
@@ -7100,6 +7101,7 @@ var FIELD_CSS2 = `
|
|
|
7100
7101
|
background: var(--color-surface);
|
|
7101
7102
|
border: var(--border-thin) solid var(--color-border);
|
|
7102
7103
|
border-radius: var(--radius-md);
|
|
7104
|
+
overflow: hidden;
|
|
7103
7105
|
transition: border-color var(--duration-fast) var(--ease-standard),
|
|
7104
7106
|
box-shadow var(--duration-fast) var(--ease-standard),
|
|
7105
7107
|
background-color var(--duration-fast) var(--ease-standard);
|
|
@@ -7133,9 +7135,6 @@ var FIELD_CSS2 = `
|
|
|
7133
7135
|
.twc-input__reveal:hover { background: var(--color-surface-sunken); color: var(--color-text); }
|
|
7134
7136
|
.twc-input__reveal:focus-visible { outline: none; box-shadow: var(--ring); }
|
|
7135
7137
|
.twc-input__reveal svg { width: 17px; height: 17px; }
|
|
7136
|
-
`;
|
|
7137
|
-
var INPUT_EXTRA_CSS = `
|
|
7138
|
-
.twc-input { overflow: hidden; }
|
|
7139
7138
|
.twc-input__addon { align-self: stretch; display: inline-flex; align-items: center; padding-inline: var(--space-3);
|
|
7140
7139
|
background: var(--color-surface-sunken); color: var(--color-text-muted); font-size: var(--text-sm);
|
|
7141
7140
|
font-weight: var(--font-semibold); white-space: nowrap; flex: none; }
|
|
@@ -8893,6 +8892,9 @@ function Datatable({
|
|
|
8893
8892
|
rowGrouping = [],
|
|
8894
8893
|
rowNumbers = false,
|
|
8895
8894
|
searchFields = null,
|
|
8895
|
+
searchable = true,
|
|
8896
|
+
quickFilter,
|
|
8897
|
+
onQuickFilterChange,
|
|
8896
8898
|
rowPinning = false,
|
|
8897
8899
|
rowReorder = false,
|
|
8898
8900
|
rowResize = false,
|
|
@@ -8975,7 +8977,13 @@ function Datatable({
|
|
|
8975
8977
|
return { left, right };
|
|
8976
8978
|
});
|
|
8977
8979
|
const [density, setDensity] = React51__namespace.default.useState(densityProp);
|
|
8978
|
-
const [
|
|
8980
|
+
const [internalQuick, setInternalQuick] = React51__namespace.default.useState("");
|
|
8981
|
+
const quick = quickFilter !== void 0 ? quickFilter : internalQuick;
|
|
8982
|
+
const commitQuick = (v) => {
|
|
8983
|
+
onQuickFilterChange?.(v);
|
|
8984
|
+
if (quickFilter === void 0) setInternalQuick(v);
|
|
8985
|
+
commitPage(0);
|
|
8986
|
+
};
|
|
8979
8987
|
const [selected, setSelected] = React51__namespace.default.useState(() => /* @__PURE__ */ new Set());
|
|
8980
8988
|
const [activeRow, setActiveRow] = React51__namespace.default.useState(null);
|
|
8981
8989
|
const [activeCell, setActiveCell] = React51__namespace.default.useState(null);
|
|
@@ -9855,7 +9863,7 @@ function Datatable({
|
|
|
9855
9863
|
setSelected(/* @__PURE__ */ new Set());
|
|
9856
9864
|
}
|
|
9857
9865
|
const [editing, setEditing] = React51__namespace.default.useState(null);
|
|
9858
|
-
const isColEditable = (c) => c.type !== "actions" &&
|
|
9866
|
+
const isColEditable = (c) => c.type !== "actions" && c.editable !== false && (c.editable === true || c.renderEditCell != null || editMode);
|
|
9859
9867
|
function beginEdit(rowK, col, row) {
|
|
9860
9868
|
if (!isColEditable(col)) return;
|
|
9861
9869
|
setEditing({ key: rowK, field: col.field, value: row[col.field] ?? "" });
|
|
@@ -10186,7 +10194,13 @@ function Datatable({
|
|
|
10186
10194
|
!checkboxSelection && reorderable && ci === 0 && !isEditing ? /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: 6, maxWidth: "100%" }, children: [
|
|
10187
10195
|
rowHandle(k, midIdx, row),
|
|
10188
10196
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { overflow: "hidden", textOverflow: "ellipsis" }, children: isActions ? renderActions(c, row) : c.renderCell ? c.renderCell(val, row) : c.valueFormatter ? c.valueFormatter(val, row) : val })
|
|
10189
|
-
] }) : isEditing ?
|
|
10197
|
+
] }) : isEditing ? c.renderEditCell ? (
|
|
10198
|
+
// #236: full escape hatch — the host drops in its own editor (searchable/creatable/
|
|
10199
|
+
// async Combobox, …) and drives the lifecycle via commit/cancel. Wrapped in
|
|
10200
|
+
// .twc-dt__editor-wrap so inline clicks (and any .twc-pop portal dropdown) don't
|
|
10201
|
+
// trip the outside-click auto-cancel.
|
|
10202
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "twc-dt__editor-wrap", children: c.renderEditCell({ value: editing.value, row, field: c.field, commit: (v) => commitEdit(v), cancel: cancelEdit }) })
|
|
10203
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
10190
10204
|
EditCell,
|
|
10191
10205
|
{
|
|
10192
10206
|
col: c,
|
|
@@ -10476,13 +10490,10 @@ function Datatable({
|
|
|
10476
10490
|
}
|
|
10477
10491
|
)
|
|
10478
10492
|
] }) : null,
|
|
10479
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__search", children: [
|
|
10493
|
+
searchable ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__search", children: [
|
|
10480
10494
|
/* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.search }),
|
|
10481
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { placeholder: "Search\u2026", "aria-label": "Search rows", value: quick, onChange: (e) =>
|
|
10482
|
-
|
|
10483
|
-
commitPage(0);
|
|
10484
|
-
} })
|
|
10485
|
-
] })
|
|
10495
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { placeholder: "Search\u2026", "aria-label": "Search rows", value: quick, onChange: (e) => commitQuick(e.target.value) })
|
|
10496
|
+
] }) : null
|
|
10486
10497
|
] }),
|
|
10487
10498
|
!pivotActive && activeGroupBy.length ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "twc-dt__groupbar", children: [
|
|
10488
10499
|
/* @__PURE__ */ jsxRuntime.jsx(Svg, { d: I.group }),
|