@kenlo/kdls-design-system 2.0.5 → 2.5.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.
@@ -19,6 +19,13 @@ export interface TableColumn<T = Record<string, unknown>> {
19
19
  ellipsis?: boolean;
20
20
  /** true = sortable, sorting done by the backend (the component only reports state via onSortChange, doesn't reorder `rows`) · function = sorts on the frontend using this comparator — handle dates and numbers inside it, don't let the component guess the type */
21
21
  sortable?: boolean | ((a: T, b: T) => number);
22
+ /**
23
+ * Marks this column as a mobile-only action slot — has no effect above the mobile
24
+ * breakpoint. `'link'` pulls it out of the stack into a final row shared with any other
25
+ * `'link'` columns (one button: left-aligned; more than one: split evenly). `'icon'`
26
+ * (e.g. a chevron or a ••• menu) pins it to the row's top-right corner instead.
27
+ */
28
+ mobileAction?: 'link' | 'icon';
22
29
  /** Custom cell rendering — when omitted, displays row[key] directly */
23
30
  render?: (value: unknown, row: T, index: number) => React.ReactNode;
24
31
  }
@@ -31,6 +38,13 @@ export interface TableProps<T extends Record<string, unknown> = Record<string, u
31
38
  columns: TableColumn<T>[];
32
39
  /** Row data */
33
40
  rows: T[];
41
+ /**
42
+ * Layout of the table. `'default'` is a flush list — rows have no radius, no gap
43
+ * between them, divided by a top border only. `'cardLines'` keeps each row as an
44
+ * individual card instead (own border, radius, gap, plus the container's own padding).
45
+ * Background, the theme's radius and the bordered stroke behave the same in both.
46
+ */
47
+ variant?: 'default' | 'cardLines';
34
48
  /**
35
49
  * Shows a 1px neutral-20 border around the component. `false` by default.
36
50
  * Use `true` when the surrounding background matches the Table's background (--color-neutral-00) —