@handamade/psi-react 0.9.0 → 0.10.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/README.md +1 -1
- package/dist/Checkbox/Checkbox.d.ts +6 -0
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Pagination/Pagination.d.ts +45 -0
- package/dist/Pagination/Pagination.d.ts.map +1 -0
- package/dist/Table/Table.d.ts +38 -0
- package/dist/Table/Table.d.ts.map +1 -0
- package/dist/Table/TableBody.d.ts +8 -0
- package/dist/Table/TableBody.d.ts.map +1 -0
- package/dist/Table/TableCell.d.ts +11 -0
- package/dist/Table/TableCell.d.ts.map +1 -0
- package/dist/Table/TableContext.d.ts +19 -0
- package/dist/Table/TableContext.d.ts.map +1 -0
- package/dist/Table/TableHead.d.ts +12 -0
- package/dist/Table/TableHead.d.ts.map +1 -0
- package/dist/Table/TableHeaderCell.d.ts +13 -0
- package/dist/Table/TableHeaderCell.d.ts.map +1 -0
- package/dist/Table/TableRow.d.ts +12 -0
- package/dist/Table/TableRow.d.ts.map +1 -0
- package/dist/Table/TableSelectionCell.d.ts +8 -0
- package/dist/Table/TableSelectionCell.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +700 -490
- package/dist/manifest.json +250 -0
- package/dist/patterns.json +80 -16
- package/dist/styles.css +1 -1
- package/docs/Checkbox.md +1 -0
- package/docs/Pagination.md +32 -0
- package/docs/Table.md +36 -0
- package/docs/TableBody.md +27 -0
- package/docs/TableCell.md +28 -0
- package/docs/TableHead.md +27 -0
- package/docs/TableHeaderCell.md +29 -0
- package/docs/TableRow.md +29 -0
- package/llms.txt +10 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @handamade/psi-react
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
25 React 19 components consuming @handamade/psi-tokens. Zero runtime dependencies, CSS Modules, full TypeScript support.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -2,6 +2,12 @@ import type { InputHTMLAttributes, Ref } from "react";
|
|
|
2
2
|
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "placeholder"> {
|
|
3
3
|
/** Label text. */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Accessible name when there is no visible label — a table's row-selection
|
|
7
|
+
* checkbox, say. Optional, unlike IconButton's required form (D60): a
|
|
8
|
+
* labelled checkbox is still the common case.
|
|
9
|
+
*/
|
|
10
|
+
"aria-label"?: string;
|
|
5
11
|
/** Forwarded ref to the underlying `<input type="checkbox">` element. */
|
|
6
12
|
ref?: Ref<HTMLInputElement>;
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAC3E,kBAAkB;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,yEAAyE;IACzE,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,+BAkBf"}
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGtD,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;IAC3E,kBAAkB;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,6EAA6E;AAC7E,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,+BAkBf"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Pages to render, with "ellipsis" marking an elided run. Pure and exported
|
|
2
|
+
* so the truncation math is testable without rendering.
|
|
3
|
+
*
|
|
4
|
+
* Anchored on the real `leftSibling`/`rightSibling` for the current page —
|
|
5
|
+
* not a page-count-independent fixed span. An earlier version's two
|
|
6
|
+
* single-ellipsis branches used a fixed window (`range(1, windowSize)` /
|
|
7
|
+
* `range(pageCount - windowSize + 1, pageCount)`) that didn't move with
|
|
8
|
+
* `page` at all, so `paginationRange(3, 13, 1)` came out as
|
|
9
|
+
* `[1, 2, 3, "ellipsis", 13]`, silently dropping true sibling page 4.
|
|
10
|
+
*
|
|
11
|
+
* Each single-ellipsis branch instead widens only as far as `max(sibling,
|
|
12
|
+
* windowSize)` / `min(sibling, pageCount - windowSize + 1)` — enough to
|
|
13
|
+
* always include the real sibling, while still padding out to a full
|
|
14
|
+
* `2 * siblingCount + 1` run when clamping at an edge would otherwise
|
|
15
|
+
* shrink it (e.g. `paginationRange(13, 13, 1)` needs `11, 12, 13`, not
|
|
16
|
+
* just `12, 13`).
|
|
17
|
+
*
|
|
18
|
+
* An ellipsis is only rendered where it elides at least two pages — a
|
|
19
|
+
* single hidden page is rendered directly instead, since an ellipsis
|
|
20
|
+
* standing in for one number is worse than the number. */
|
|
21
|
+
export declare function paginationRange(page: number, pageCount: number, siblingCount: number): Array<number | "ellipsis">;
|
|
22
|
+
export interface PaginationProps {
|
|
23
|
+
/** Current page, 1-based. */
|
|
24
|
+
page: number;
|
|
25
|
+
/** Total number of pages. */
|
|
26
|
+
pageCount: number;
|
|
27
|
+
/**
|
|
28
|
+
* Called with the requested page. Required — unlike Table's `onSortChange`/
|
|
29
|
+
* `onSelectionChange`, which are optional because `sortable`/`selectable`
|
|
30
|
+
* gate whether they're meaningful, `Pagination` has no such gating boolean:
|
|
31
|
+
* the prop is unconditionally meaningful, so a `Pagination` without it is a
|
|
32
|
+
* dead control (final review finding, D62).
|
|
33
|
+
*/
|
|
34
|
+
onPageChange: (page: number) => void;
|
|
35
|
+
/** Pages shown either side of the current one before truncating. @default 1 */
|
|
36
|
+
siblingCount?: number;
|
|
37
|
+
/** Accessible name for the nav landmark. @default "Pagination" */
|
|
38
|
+
"aria-label"?: string;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Numbered pager with ellipsis truncation (D63). Standalone rather than a
|
|
42
|
+
* Table family member: `table-pagination` composes it as a Toolbar sibling of
|
|
43
|
+
* the page-size Select. */
|
|
44
|
+
export declare function Pagination({ page, pageCount, onPageChange, siblingCount, "aria-label": ariaLabel, className, }: PaginationProps): import("react").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=Pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/Pagination/Pagination.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;;0DAmB0D;AAC1D,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GACnB,KAAK,CAAC,MAAM,GAAG,UAAU,CAAC,CAkC5B;AAED,MAAM,WAAW,eAAe;IAC9B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;OAMG;IACH,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,+EAA+E;IAC/E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;2BAE2B;AAC3B,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,SAAS,EACT,YAAY,EACZ,YAAgB,EAChB,YAAY,EAAE,SAAwB,EACtC,SAAS,GACV,EAAE,eAAe,+BA+CjB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from "react";
|
|
2
|
+
export type TableSize = 32 | 40 | 48;
|
|
3
|
+
/** Controlled sort state. `null` means no column is sorted. */
|
|
4
|
+
export interface TableSortState {
|
|
5
|
+
key: string;
|
|
6
|
+
direction: "asc" | "desc";
|
|
7
|
+
}
|
|
8
|
+
export interface TableProps {
|
|
9
|
+
/** Row height in px. @default 40 */
|
|
10
|
+
size?: TableSize;
|
|
11
|
+
/** Pins the header while the body scrolls. */
|
|
12
|
+
stickyHeader?: boolean;
|
|
13
|
+
/** Enables the sort affordance on header cells that declare a `sortKey`. */
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
/** Controlled sort state; `null` when nothing is sorted. */
|
|
16
|
+
sort?: TableSortState | null;
|
|
17
|
+
/**
|
|
18
|
+
* Called when a header's sort control is activated. Optional in the type
|
|
19
|
+
* because `sortable` may be false; a discriminated union expressing the real
|
|
20
|
+
* contract does not survive docgen's flat prop extraction, which would strip
|
|
21
|
+
* these props from the manifest entirely (D62).
|
|
22
|
+
*/
|
|
23
|
+
onSortChange?: (sort: TableSortState) => void;
|
|
24
|
+
/** Renders the row-selection checkbox column. */
|
|
25
|
+
selectable?: boolean;
|
|
26
|
+
/** Controlled selection, keyed by each `TableRow`'s `rowId`. */
|
|
27
|
+
selected?: ReadonlySet<string>;
|
|
28
|
+
/** Called with the next selection. See `onSortChange` on why it is optional. */
|
|
29
|
+
onSelectionChange?: (selected: ReadonlySet<string>) => void;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Forwarded ref to the underlying `<table>` element. */
|
|
33
|
+
ref?: Ref<HTMLTableElement>;
|
|
34
|
+
}
|
|
35
|
+
/** Data table on native table semantics. Holds no state: sorting, selection
|
|
36
|
+
* and pagination are the consumer's (D62, extending D50/D53). */
|
|
37
|
+
export declare function Table({ size, stickyHeader, sortable, sort, onSortChange, selectable, selected, onSelectionChange, children, className, ref, }: TableProps): import("react").JSX.Element;
|
|
38
|
+
//# sourceMappingURL=Table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../src/Table/Table.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,SAAS,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAErC,+DAA+D;AAC/D,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B;AAiDD,MAAM,WAAW,UAAU;IACzB,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC7B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,iDAAiD;IACjD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC/B,gFAAgF;IAChF,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IAC5D,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED;iEACiE;AACjE,wBAAgB,KAAK,CAAC,EACpB,IAAS,EACT,YAAY,EACZ,QAAgB,EAChB,IAAW,EACX,YAAY,EACZ,UAAkB,EAClB,QAA0B,EAC1B,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,GAAG,GACJ,EAAE,UAAU,+BAkBZ"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface TableBodyProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/** `<tbody>` wrapper. */
|
|
7
|
+
export declare function TableBody({ children, className }: TableBodyProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TableBody.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../src/Table/TableBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,yBAAyB;AACzB,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAEhE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface TableCellProps {
|
|
3
|
+
/** Right-aligns and renders tabular figures (D62). */
|
|
4
|
+
numeric?: boolean;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/** `<td>`. `numeric` means right-aligned *and* tabular — a column that aligns
|
|
9
|
+
* but whose digits jitter between rows defeats the purpose. */
|
|
10
|
+
export declare function TableCell({ numeric, children, className }: TableCellProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=TableCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../src/Table/TableCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,cAAc;IAC7B,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;+DAC+D;AAC/D,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAMzE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TableSize, TableSortState } from "./Table.js";
|
|
2
|
+
/** Shared empty-selection sentinel — the one place an unselected `selected`
|
|
3
|
+
* set is constructed, so `Table`'s default prop and this context's default
|
|
4
|
+
* value can't drift into two different empty sets (D62 review). */
|
|
5
|
+
export declare const EMPTY_SELECTION: ReadonlySet<string>;
|
|
6
|
+
export interface TableContextValue {
|
|
7
|
+
size: TableSize;
|
|
8
|
+
sortable: boolean;
|
|
9
|
+
sort: TableSortState | null;
|
|
10
|
+
onSortChange?: (sort: TableSortState) => void;
|
|
11
|
+
selectable: boolean;
|
|
12
|
+
selected: ReadonlySet<string>;
|
|
13
|
+
onSelectionChange?: (selected: ReadonlySet<string>) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const TableContext: import("react").Context<TableContextValue>;
|
|
16
|
+
/** Row ids in document order, published by Table so the select-all
|
|
17
|
+
* checkbox can compute all/some without the consumer restating them. */
|
|
18
|
+
export declare const TableRowIdsContext: import("react").Context<string[]>;
|
|
19
|
+
//# sourceMappingURL=TableContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableContext.d.ts","sourceRoot":"","sources":["../../src/Table/TableContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5D;;mEAEmE;AACnE,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAAqB,CAAC;AAEtE,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,YAAY,4CAMvB,CAAC;AAEH;wEACwE;AACxE,eAAO,MAAM,kBAAkB,mCAA8B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface TableHeadProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
/** `<thead>`. When the table is selectable, prepends the select-all cell to
|
|
7
|
+
* the FIRST header row so the header's column count matches the body's — the
|
|
8
|
+
* checkbox column is Table's, not the consumer's schema. Clones the row
|
|
9
|
+
* rather than rebuilding it, so the consumer's own props on that `TableRow`
|
|
10
|
+
* survive. */
|
|
11
|
+
export declare function TableHead({ children, className }: TableHeadProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=TableHead.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../src/Table/TableHead.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;cAIc;AACd,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAqBhE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface TableHeaderCellProps {
|
|
3
|
+
/** Sort key this column emits. Enables the sort control when the table is `sortable`. */
|
|
4
|
+
sortKey?: string;
|
|
5
|
+
/** Right-aligns and renders tabular figures (D62). */
|
|
6
|
+
numeric?: boolean;
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** `<th scope="col">`. `aria-sort` belongs on the th, never on the inner
|
|
11
|
+
* button — assistive tech reads the sort state from the column header. */
|
|
12
|
+
export declare function TableHeaderCell({ sortKey, numeric, children, className }: TableHeaderCellProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=TableHeaderCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeaderCell.d.ts","sourceRoot":"","sources":["../../src/Table/TableHeaderCell.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,oBAAoB;IACnC,yFAAyF;IACzF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;0EAC0E;AAC1E,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,+BAsC9F"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export interface TableRowProps {
|
|
3
|
+
/** Stable identity for selection. Required for selectable tables (D62). */
|
|
4
|
+
rowId?: string;
|
|
5
|
+
/** Accessible name for this row's selection checkbox. */
|
|
6
|
+
selectLabel?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** `<tr>`. `rowId` is the key the `selected` set holds. */
|
|
11
|
+
export declare function TableRow({ rowId, selectLabel, children, className }: TableRowProps): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=TableRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../src/Table/TableRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,+BAelF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Per-row selection checkbox. Internal — not exported from index.ts. */
|
|
2
|
+
export declare function TableRowSelectionCell({ rowId, label }: {
|
|
3
|
+
rowId: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
/** Select-all header checkbox, indeterminate on a partial selection. */
|
|
7
|
+
export declare function TableSelectAllCell(): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TableSelectionCell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableSelectionCell.d.ts","sourceRoot":"","sources":["../../src/Table/TableSelectionCell.tsx"],"names":[],"mappings":"AAKA,yEAAyE;AACzE,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,+BAavF;AAED,wEAAwE;AACxE,wBAAgB,kBAAkB,gCA6BjC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -33,5 +33,19 @@ export type { MenuProps, MenuPlacement, MenuContextValue } from "./Menu/Menu.js"
|
|
|
33
33
|
export { MenuItem } from "./Menu/MenuItem.js";
|
|
34
34
|
export type { MenuItemProps } from "./Menu/MenuItem.js";
|
|
35
35
|
export { MenuSeparator } from "./Menu/MenuSeparator.js";
|
|
36
|
+
export { Table } from "./Table/Table.js";
|
|
37
|
+
export type { TableProps, TableSize, TableSortState } from "./Table/Table.js";
|
|
38
|
+
export { TableHead } from "./Table/TableHead.js";
|
|
39
|
+
export type { TableHeadProps } from "./Table/TableHead.js";
|
|
40
|
+
export { TableBody } from "./Table/TableBody.js";
|
|
41
|
+
export type { TableBodyProps } from "./Table/TableBody.js";
|
|
42
|
+
export { TableRow } from "./Table/TableRow.js";
|
|
43
|
+
export type { TableRowProps } from "./Table/TableRow.js";
|
|
44
|
+
export { TableHeaderCell } from "./Table/TableHeaderCell.js";
|
|
45
|
+
export type { TableHeaderCellProps } from "./Table/TableHeaderCell.js";
|
|
46
|
+
export { TableCell } from "./Table/TableCell.js";
|
|
47
|
+
export type { TableCellProps } from "./Table/TableCell.js";
|
|
48
|
+
export { Pagination } from "./Pagination/Pagination.js";
|
|
49
|
+
export type { PaginationProps } from "./Pagination/Pagination.js";
|
|
36
50
|
export { IconPlus, IconMinus, IconClose, IconCheck, IconChevronDown, IconChevronRight, IconSearch, IconSettings, IconUser, IconEdit, IconTrash, IconCopy, IconExternalLink, IconEye, IconEyeOff, IconLoader, IconArrowDown, IconArrowUpRight, IconLinkedIn, IconGitHub, IconX, IconInstagram, } from "./icons/index.js";
|
|
37
51
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,YAAY,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD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