@crispy-seed/data-table 0.12.1 → 0.14.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/dist/data-table-recipe.css +68 -27
- package/dist/data-table-recipe.layered.css +73 -24
- package/dist/index.cjs +480 -349
- package/dist/index.d.ts +22 -2
- package/dist/index.js +480 -349
- package/dist/styles.css +73 -24
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -128,6 +128,15 @@ interface DataTableCellContextMenuContext<TRow> {
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
type DataTableCellType = "text" | "entity" | "url" | "email" | "tags" | "status" | "number" | "currency" | "date" | "datetime" | "rating" | "checkbox" | "chip" | "chip-list";
|
|
131
|
+
/** A `type: "chip-list"` column's selectable tag (`DataTableColumn.chipOptions`) --
|
|
132
|
+
* `value` is what the row stores/commits, `label` what the chip reads (default
|
|
133
|
+
* `value`), `color` an optional CSS background (default: the value-hashed swatch,
|
|
134
|
+
* the same one the closed cell uses). */
|
|
135
|
+
interface DataTableChipOption {
|
|
136
|
+
value: string;
|
|
137
|
+
label?: string;
|
|
138
|
+
color?: string;
|
|
139
|
+
}
|
|
131
140
|
|
|
132
141
|
/** A `select`/`reference`/`actor` editor's own choice list -- `value`/`label` are
|
|
133
142
|
* required (the committed string and what the row reads), `avatar` is read only by
|
|
@@ -241,6 +250,15 @@ interface DataTableColumn<TRow> {
|
|
|
241
250
|
editor?: "select" | "switch" | "reference" | "actor";
|
|
242
251
|
/** `editor: "select"`의 선택지입니다. */
|
|
243
252
|
options?: DataTableEditOption[];
|
|
253
|
+
/** `type: "chip-list"` + `editable`: the selectable tags of the Attio-style
|
|
254
|
+
* multi-select popover (search on top, one colored chip per option with a checkbox
|
|
255
|
+
* on the right, click toggles, stays open). Tags already on a row but absent here
|
|
256
|
+
* are still listed (so they can be unchecked). Omit it and the list falls back to
|
|
257
|
+
* the distinct tags present across `data`. */
|
|
258
|
+
chipOptions?: DataTableChipOption[];
|
|
259
|
+
/** `chip-list` popover: offer a "Create '<text>'" row for text matching no option
|
|
260
|
+
* (default `true` -- freeform tag columns). `false` limits tags to `chipOptions`. */
|
|
261
|
+
chipCreatable?: boolean;
|
|
244
262
|
/** `editor: "reference"`/`"actor"`의 선택지입니다 (`avatar`가 있으면 아바타로,
|
|
245
263
|
* 없으면 기본 사람 아이콘으로 표시). */
|
|
246
264
|
refOptions?: DataTableEditOption[];
|
|
@@ -546,7 +564,7 @@ interface DataTableProps<TRow extends {
|
|
|
546
564
|
/** `virtualized`일 때 한 행의 높이(px)입니다. 레시피의 행 높이(36px)와 일치해야 합니다.
|
|
547
565
|
* @default 36 */
|
|
548
566
|
rowHeight?: number;
|
|
549
|
-
/** `virtualized`일 때 뷰포트 위/아래로 추가 렌더링할 행 수입니다. @default
|
|
567
|
+
/** `virtualized`일 때 뷰포트 위/아래로 추가 렌더링할 행 수입니다. @default 16 */
|
|
550
568
|
overscan?: number;
|
|
551
569
|
}
|
|
552
570
|
/**
|
|
@@ -602,6 +620,8 @@ declare namespace DataTableViewsControl {
|
|
|
602
620
|
interface DataTableBulkBarProps {
|
|
603
621
|
/** The clear ("x") button's accessible name. @default "Clear selection" */
|
|
604
622
|
clearLabel?: string;
|
|
623
|
+
/** Lift the pill above a sticky footer (calc row / add-row) instead of overlapping it. */
|
|
624
|
+
aboveFooter?: boolean;
|
|
605
625
|
/**
|
|
606
626
|
* The consumer's own bulk-action buttons, as a render prop receiving the current
|
|
607
627
|
* selected row ids -- e.g. `<DataTableBulkBar>{(ids) => <ActionButton
|
|
@@ -619,7 +639,7 @@ interface DataTableBulkBarProps {
|
|
|
619
639
|
* geometry borrows `contextual-floating-button`'s already-measured vars rather than a
|
|
620
640
|
* guessed literal.
|
|
621
641
|
*/
|
|
622
|
-
declare function DataTableBulkBar({ clearLabel, children, }: DataTableBulkBarProps): react_jsx_runtime.JSX.Element | null;
|
|
642
|
+
declare function DataTableBulkBar({ clearLabel, aboveFooter, children, }: DataTableBulkBarProps): react_jsx_runtime.JSX.Element | null;
|
|
623
643
|
|
|
624
644
|
type ResizablePanelSide = "left" | "right";
|
|
625
645
|
|