@crispy-seed/data-table 0.13.0 → 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 +62 -27
- package/dist/data-table-recipe.layered.css +65 -24
- package/dist/index.cjs +429 -334
- package/dist/index.d.ts +18 -0
- package/dist/index.js +429 -334
- package/dist/styles.css +65 -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[];
|