twico-ui 1.47.0 → 1.48.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/icons.d.cts +2 -1
- package/dist/icons.d.ts +2 -1
- package/dist/index.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -1
- package/dist/index.d.ts +41 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/llms.txt +3 -0
- package/package.json +2 -2
package/llms.txt
CHANGED
|
@@ -1715,6 +1715,8 @@ Props:
|
|
|
1715
1715
|
- `rowHeight` — `number` — Estimated/fixed row height in px used to compute the virtualization window. Set if rows have a custom height so the scrollbar stays accurate.
|
|
1716
1716
|
- `rowNumbers` — `boolean` · default `false` — Render a leading auto-numbered row column (1, 2, 3…). The number reflects each row's position in the current sorted/filtered order and continues across pages (page 2 starts where page 1 ended; in server mode it uses the current page × pageSize). Sits after the checkbox column, sticky-left. This prop is the initial state — when enabled, users can hide/show the column from the toolbar's **Columns** panel ("Row number").
|
|
1717
1717
|
- `getRowStyle` — `(row: T, index: number) => React.CSSProperties | undefined` — Inline style for a WHOLE row from its own state — the row-level counterpart to a column's cellStyle, so marking a row no longer means repeating cellStyle on every column. A background (or backgroundColor) reaches the row's cells through the --twc-dt-row-bg custom property, since each cell paints its own opaque surface; every other declaration lands on the <tr>. Sticky positioning and measured row height are applied after yours, so it cannot break row pinning or row resizing. Layering is one rule: the tint is the bottom layer above the cell's plain surface and every built-in state covers it — hover, selection, activeRowId, a pinned or grabbed row, the diff washes, cell selection/editing, and an inline cellStyle over all of them — because a data-derived wash should never hide an interaction state. (So a row pinned from the ⋮ menu loses its background tint while pinned, like a selected one; use getRowClassName with a rule outranking (0,3,0) if you need a tint that beats hover — and note .twc-dt__row.my-row .twc-dt__td is itself (0,3,0), a tie, so add an element: tr.twc-dt__row.my-row .twc-dt__td.) Applies to every data row, pinned ones included — not to group-header or pivot aggregate rows, which have no row to pass. No stripe in that stack: Datatable does not zebra-stripe data rows at all, only the pivot grid does.
|
|
1718
|
+
- `verticalAlign` — `"top" | "middle" | "bottom"` — Default vertical alignment for every body cell. The transpose of a column's align: align decides where content sits across the column's width, this decides where it sits down the row's height. Only visible once rows vary in height — a wrapText column, a multi-line renderCell, or a drag-resized row. Precedence, lowest first: this → getRowVerticalAlign → the column's verticalAlign. Resolved in one place and emitted as a single data-valign on the cell rather than as three competing CSS rules, so the order cannot be changed by an unrelated stylesheet edit.
|
|
1719
|
+
- `getRowVerticalAlign` — `(row: T, index: number) => "top" | "middle" | "bottom" | undefined` — Vertical alignment for one row's cells, called (row, index) like getRowStyle; return undefined to leave a row on the table default. Overrides verticalAlign but NOT a column's own verticalAlign — an explicit column value is a property of that column's content type and is almost always a deliberate exemption (the actions column stays centred while the rest of the row moves). To move every cell in a row, leave the columns' values unset. index is page-relative, like getRowStyle.
|
|
1718
1720
|
- `getRowClassName` — `(row: T, index: number) => string | undefined` — Class appended to the row's twc-dt__row (never replacing it), called (row, index) like getRowStyle. Which to reach for: getRowStyle is the default, because its background is routed through --twc-dt-row-bg and read by the (0,1,0) base rule, making it the LOWEST layer that every built-in state covers — the reverse of what "inline wins" would suggest. Use getRowClassName when you deliberately want the tint to outrank hover/selection, since your own rule picks its specificity (beat (0,3,0), e.g. tr.twc-dt__row.my-row .twc-dt__td). Same scope: every data row, pinned ones included; not group headers or pivot aggregates.
|
|
1719
1721
|
- `searchFields` — `string[]` — Restrict the toolbar quick-search to these column `field`s (client mode); defaults to every visible column. Mirrors `runDatatableQuery`'s `options.searchFields`.
|
|
1720
1722
|
- `searchable` — `boolean` · default `true` — Render the built-in toolbar quick-search box; set false to externalize search with your own input wired to quickFilter (CardGrid parity).
|
|
@@ -2051,6 +2053,7 @@ Props:
|
|
|
2051
2053
|
- `renderCell (column)` — `(value: any, row: T, index: number) => React.ReactNode` — Alias for render (Datatable vocabulary); render wins when both are set.
|
|
2052
2054
|
- `cellClassName (column)` — `(value: any, row: T) => string | undefined` — Class applied to the whole cell (.twc-dt__td, pinned included) — value/row-based tinting via your own stylesheet; a plain class may lose to the hover/selection background (specificity).
|
|
2053
2055
|
- `cellStyle (column)` — `(value: any, row: T) => React.CSSProperties | undefined` — Inline style applied to the whole cell (.twc-dt__td, pinned included) — the simplest full-cell tint from value/row; wins over hover/selection/diff backgrounds (use cellClassName if those cues must stay visible), pin positioning preserved. On a pinned column keep the background opaque (composite over var(--color-surface)).
|
|
2056
|
+
- `verticalAlign (column)` — `"top" | "middle" | "bottom"` — Vertical alignment of this column's body cells. Wins over the row and table values: a per-column setting is a statement about the column's content type — an actions column or a status badge that should stay centred however tall the row gets — so it survives a row-level or table-wide sweep. To move a whole row including this column, leave this unset. Defaults to top for wrapText columns, otherwise to the table's verticalAlign.
|
|
2054
2057
|
|
|
2055
2058
|
```jsx
|
|
2056
2059
|
import { Table } from "twico-ui";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twico-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"description": "Twico UI — a free, modern, themeable React + Tailwind-friendly component library. 61 components with dark mode, motion, and accessibility built in.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Twico UI",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"lucide-react": "^1.31.0",
|
|
121
121
|
"semantic-release": "^25.0.9",
|
|
122
122
|
"size-limit": "^14.0.0",
|
|
123
|
-
"tsup": "^
|
|
123
|
+
"tsup": "^9.0.0",
|
|
124
124
|
"typescript": "^5.9.3",
|
|
125
125
|
"vitest": "^5.0.0",
|
|
126
126
|
"wawoff2": "^2.0.1"
|