@rovula/ui 0.1.27 → 0.1.29

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.
Files changed (77) hide show
  1. package/dist/cjs/bundle.css +513 -67
  2. package/dist/cjs/bundle.js +589 -589
  3. package/dist/cjs/bundle.js.map +1 -1
  4. package/dist/cjs/types/components/Avatar/Avatar.d.ts +1 -1
  5. package/dist/cjs/types/components/Avatar/Avatar.stories.d.ts +1 -1
  6. package/dist/cjs/types/components/Avatar/Avatar.styles.d.ts +1 -0
  7. package/dist/cjs/types/components/DataTable/DataTable.d.ts +195 -4
  8. package/dist/cjs/types/components/DataTable/DataTable.editing.d.ts +20 -0
  9. package/dist/cjs/types/components/DataTable/DataTable.editing.types.d.ts +145 -0
  10. package/dist/cjs/types/components/DataTable/DataTable.stories.d.ts +268 -6
  11. package/dist/cjs/types/components/Dropdown/Dropdown.d.ts +22 -0
  12. package/dist/cjs/types/components/Dropdown/Dropdown.stories.d.ts +4 -0
  13. package/dist/cjs/types/components/ScrollArea/ScrollArea.d.ts +3 -3
  14. package/dist/cjs/types/components/ScrollArea/ScrollArea.stories.d.ts +4 -0
  15. package/dist/cjs/types/components/Table/Table.d.ts +33 -3
  16. package/dist/cjs/types/components/Table/Table.stories.d.ts +86 -4
  17. package/dist/cjs/types/components/TextInput/TextInput.stories.d.ts +8 -0
  18. package/dist/cjs/types/components/TextInput/TextInput.styles.d.ts +1 -0
  19. package/dist/components/Avatar/Avatar.js +2 -1
  20. package/dist/components/Avatar/Avatar.styles.js +3 -0
  21. package/dist/components/Avatar/AvatarBase.js +1 -1
  22. package/dist/components/DataTable/DataTable.editing.js +385 -0
  23. package/dist/components/DataTable/DataTable.editing.types.js +1 -0
  24. package/dist/components/DataTable/DataTable.js +983 -50
  25. package/dist/components/DataTable/DataTable.stories.js +1077 -25
  26. package/dist/components/Dropdown/Dropdown.js +8 -6
  27. package/dist/components/ScrollArea/ScrollArea.js +2 -2
  28. package/dist/components/ScrollArea/ScrollArea.stories.js +68 -2
  29. package/dist/components/Table/Table.js +103 -13
  30. package/dist/components/Table/Table.stories.js +226 -9
  31. package/dist/components/TextInput/TextInput.js +6 -4
  32. package/dist/components/TextInput/TextInput.stories.js +8 -0
  33. package/dist/components/TextInput/TextInput.styles.js +7 -1
  34. package/dist/esm/bundle.css +513 -67
  35. package/dist/esm/bundle.js +1545 -1545
  36. package/dist/esm/bundle.js.map +1 -1
  37. package/dist/esm/types/components/Avatar/Avatar.d.ts +1 -1
  38. package/dist/esm/types/components/Avatar/Avatar.stories.d.ts +1 -1
  39. package/dist/esm/types/components/Avatar/Avatar.styles.d.ts +1 -0
  40. package/dist/esm/types/components/DataTable/DataTable.d.ts +195 -4
  41. package/dist/esm/types/components/DataTable/DataTable.editing.d.ts +20 -0
  42. package/dist/esm/types/components/DataTable/DataTable.editing.types.d.ts +145 -0
  43. package/dist/esm/types/components/DataTable/DataTable.stories.d.ts +268 -6
  44. package/dist/esm/types/components/Dropdown/Dropdown.d.ts +22 -0
  45. package/dist/esm/types/components/Dropdown/Dropdown.stories.d.ts +4 -0
  46. package/dist/esm/types/components/ScrollArea/ScrollArea.d.ts +3 -3
  47. package/dist/esm/types/components/ScrollArea/ScrollArea.stories.d.ts +4 -0
  48. package/dist/esm/types/components/Table/Table.d.ts +33 -3
  49. package/dist/esm/types/components/Table/Table.stories.d.ts +86 -4
  50. package/dist/esm/types/components/TextInput/TextInput.stories.d.ts +8 -0
  51. package/dist/esm/types/components/TextInput/TextInput.styles.d.ts +1 -0
  52. package/dist/index.d.ts +493 -122
  53. package/dist/src/theme/global.css +762 -96
  54. package/package.json +14 -2
  55. package/src/components/Avatar/Avatar.styles.ts +4 -1
  56. package/src/components/Avatar/Avatar.tsx +3 -2
  57. package/src/components/Avatar/AvatarBase.tsx +3 -3
  58. package/src/components/DataTable/DataTable.editing.tsx +861 -0
  59. package/src/components/DataTable/DataTable.editing.types.ts +192 -0
  60. package/src/components/DataTable/DataTable.stories.tsx +2169 -31
  61. package/src/components/DataTable/DataTable.test.tsx +696 -0
  62. package/src/components/DataTable/DataTable.tsx +2260 -94
  63. package/src/components/Dropdown/Dropdown.tsx +22 -6
  64. package/src/components/ScrollArea/ScrollArea.stories.tsx +146 -3
  65. package/src/components/ScrollArea/ScrollArea.tsx +6 -6
  66. package/src/components/Table/Table.stories.tsx +789 -44
  67. package/src/components/Table/Table.tsx +294 -28
  68. package/src/components/TextInput/TextInput.stories.tsx +80 -0
  69. package/src/components/TextInput/TextInput.styles.ts +7 -1
  70. package/src/components/TextInput/TextInput.tsx +21 -14
  71. package/src/test/setup.ts +50 -0
  72. package/src/theme/global.css +81 -42
  73. package/src/theme/presets/colors.js +12 -0
  74. package/src/theme/themes/variable.css +27 -28
  75. package/src/theme/tokens/baseline.css +2 -1
  76. package/src/theme/tokens/components/scrollbar.css +9 -4
  77. package/src/theme/tokens/components/table.css +63 -0
@@ -1,5 +1,8 @@
1
+ import React from "react";
2
+ import type { StoryObj } from "@storybook/react";
3
+ import { ColumnDef, Row } from "@tanstack/react-table";
1
4
  import { DataTable } from "./DataTable";
2
- import { ColumnDef } from "@tanstack/react-table";
5
+ import type { EditableColumnDef } from "./DataTable.editing.types";
3
6
  declare const meta: {
4
7
  title: string;
5
8
  component: typeof DataTable;
@@ -7,16 +10,275 @@ declare const meta: {
7
10
  parameters: {
8
11
  layout: string;
9
12
  };
13
+ argTypes: {
14
+ bordered: {
15
+ control: "boolean";
16
+ };
17
+ surface: {
18
+ control: "radio";
19
+ options: string[];
20
+ };
21
+ divided: {
22
+ control: "boolean";
23
+ };
24
+ striped: {
25
+ control: "boolean";
26
+ };
27
+ fetchingMore: {
28
+ control: "boolean";
29
+ };
30
+ loading: {
31
+ control: "boolean";
32
+ };
33
+ };
10
34
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
11
- columns: ColumnDef<unknown, unknown>[];
35
+ columns: (ColumnDef<unknown, unknown> | EditableColumnDef<unknown, unknown>)[];
12
36
  data: unknown[];
13
37
  manualSorting?: boolean | undefined;
14
38
  onSorting?: ((sorting: import("@tanstack/react-table").SortingState) => void) | undefined;
39
+ paginationMode?: import("./DataTable").DataTablePaginationMode | undefined;
40
+ totalCount?: number | undefined;
41
+ pageIndex?: number | undefined;
42
+ pageSize?: number | undefined;
43
+ onPaginationChange?: ((state: import("@tanstack/react-table").PaginationState) => void) | undefined;
44
+ pageSizeOptions?: number[] | undefined;
15
45
  fetchMoreData?: (() => void) | undefined;
46
+ fetchMoreOffset?: number | undefined;
47
+ fetchingMore?: boolean | undefined;
48
+ fetchingMoreLabel?: string | undefined;
49
+ loading?: boolean | undefined;
50
+ loadingLabel?: string | undefined;
51
+ virtualized?: boolean | undefined;
52
+ virtualRowEstimate?: number | undefined;
53
+ highlightRowId?: string | string[] | undefined;
54
+ scrollToHighlightOnMouseLeave?: boolean | undefined;
55
+ selectable?: boolean | undefined;
56
+ onRowSelectionChange?: ((rows: import("@tanstack/react-table").RowSelectionState) => void) | undefined;
57
+ rowActions?: ((row: Row<unknown>) => React.ReactNode) | undefined;
58
+ reorderable?: boolean | undefined;
59
+ getRowId?: ((row: unknown) => string) | undefined;
60
+ onRowReorder?: ((data: unknown[]) => void) | undefined;
61
+ isRowReorderLocked?: ((row: Row<unknown>) => boolean) | undefined;
62
+ onRowClick?: ((row: Row<unknown>, event: React.MouseEvent) => void) | undefined;
63
+ onCellClick?: ((cell: import("@tanstack/react-table").Cell<unknown, unknown>, row: Row<unknown>, event: React.MouseEvent) => void) | undefined;
64
+ getSubRows?: ((row: unknown) => unknown[] | undefined) | undefined;
65
+ defaultExpanded?: (import("@tanstack/react-table").ExpandedState | boolean) | undefined;
66
+ expanded?: import("@tanstack/react-table").ExpandedState | undefined;
67
+ onExpandedChange?: ((expanded: import("@tanstack/react-table").ExpandedState) => void) | undefined;
68
+ bordered?: boolean | undefined;
69
+ surface?: "default" | "panel" | undefined;
70
+ striped?: boolean | undefined;
71
+ divided?: boolean | undefined;
72
+ rowClassName?: ((row: Row<unknown>, index: number) => string | undefined) | undefined;
73
+ cellClassName?: ((cell: import("@tanstack/react-table").Cell<unknown, unknown>, row: Row<unknown>) => string | undefined) | undefined;
74
+ headerCellClassName?: ((header: import("@tanstack/react-table").Header<unknown, unknown>) => string | undefined) | undefined;
75
+ headerClassName?: string | undefined;
76
+ headerRowClassName?: string | undefined;
77
+ sortIndicatorVisibility?: "always" | "hover" | undefined;
78
+ tableLayout?: "auto" | "fixed" | "equal" | undefined;
79
+ columnManagement?: (boolean | import("./DataTable").ColumnManagementOptions) | undefined;
80
+ resizable?: boolean | undefined;
81
+ columnMinSize?: number | undefined;
82
+ columnMaxSize?: number | undefined;
83
+ className?: string | undefined;
84
+ testId?: string | undefined;
85
+ enableEditing?: boolean | undefined;
86
+ editDisplayMode?: import("./DataTable.editing.types").EditDisplayMode | undefined;
87
+ editTrigger?: import("./DataTable.editing.types").EditTrigger | undefined;
88
+ onCellCommit?: ((rowId: string, columnId: string, patch: Partial<unknown>) => void) | undefined;
89
+ alwaysEditing?: ((row: Row<unknown>) => boolean) | undefined;
90
+ enableCellTabTraversal?: boolean | undefined;
91
+ editableColumnIds?: string[] | undefined;
16
92
  }>) => import("react/jsx-runtime").JSX.Element)[];
17
93
  };
18
94
  export default meta;
19
- export declare const Default: {
20
- args: {};
21
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
22
- };
95
+ /** Default striped rows + column dividers, all columns sortable. */
96
+ export declare const Default: StoryObj;
97
+ /** Empty state displayed when `data` is an empty array. */
98
+ export declare const Empty: StoryObj;
99
+ /** Non-striped with column dividers only. */
100
+ export declare const Divided: StoryObj;
101
+ /**
102
+ * DataTable inside a panel — matches modal spec: horizontal row separators only
103
+ * (no vertical column rules), compact height without a stretched empty body.
104
+ */
105
+ export declare const OnPanelSurface: StoryObj;
106
+ /** Panel + client pagination — footer sits in the same surface scope as the table body. */
107
+ export declare const OnPanelSurfaceWithPagination: StoryObj;
108
+ /** Client-side pagination — DataTable manages page index & size internally. */
109
+ export declare const WithClientPagination: StoryObj;
110
+ /**
111
+ * Server-side pagination — the caller controls `pageIndex` / `pageSize` and
112
+ * slices data accordingly. `totalCount` drives the page-count calculation.
113
+ */
114
+ export declare const WithServerPagination: StoryObj;
115
+ /**
116
+ * Infinite mode (default) — no pagination bar; the table body scrolls inside a
117
+ * fixed height. Use when the caller already passes the full (or windowed) dataset.
118
+ */
119
+ export declare const WithInfiniteScrollStatic: StoryObj;
120
+ /**
121
+ * Infinite scroll + load more — DataTable calls{" "}
122
+ * <code className="typography-mono">fetchMoreData</code> when the scroll position
123
+ * is within 10px of the bottom (see <code className="typography-mono">DataTable</code>{" "}
124
+ * <code className="typography-mono">useEffect</code> on <code className="typography-mono">scrollRef</code>).
125
+ * This story simulates an async page append.
126
+ */
127
+ export declare const WithInfiniteScrollLoadMore: StoryObj;
128
+ /**
129
+ * Initial load — pass `loading={true}` with `data={[]}` until the first page
130
+ * arrives; then set `loading={false}` and pass rows. Infinite `fetchMoreData`
131
+ * does not run while `loading` is true.
132
+ */
133
+ export declare const WithInfiniteScrollInitialLoading: StoryObj;
134
+ /**
135
+ * **What this library does *not* do:** `DataTable` has **no built-in row
136
+ * virtualization** — every row in `data` is rendered in the DOM (TanStack
137
+ * `getRowModel`). Very large `data.length` will cost more paint/layout work.
138
+ *
139
+ * **What to use instead:**
140
+ * - `paginationMode="client"` or `"server"` to cap rows per page
141
+ * - `paginationMode="infinite"` + `fetchMoreData` and **slice/window data in the parent**
142
+ * - Or wrap your own virtualizer (e.g. `@tanstack/react-virtual`) if you need
143
+ * millions of rows in one scroll view
144
+ *
145
+ * This story mounts **800** synthetic rows so you can feel scroll/render cost
146
+ * in Storybook (dev builds are slower than production).
147
+ */
148
+ export declare const PerformanceLargeDataset: StoryObj;
149
+ /**
150
+ * Built-in **`virtualized`** — only a vertical window of rows is mounted; the
151
+ * rest are represented by spacer rows. Tune **`virtualRowEstimate`** (px) to
152
+ * match your row height so scroll position stays aligned.
153
+ *
154
+ * Limitations: fixed-height assumption; incompatible with **`reorderable`** in
155
+ * the virtualized path (use non-virtualized mode for drag-reorder).
156
+ */
157
+ export declare const WithVirtualizedRows: StoryObj;
158
+ /** Checkbox selection — header checkbox selects all; row checkboxes select individually. */
159
+ export declare const WithSelection: StoryObj;
160
+ /**
161
+ * Row highlight + scroll — use `highlightRowId` to visually mark important rows
162
+ * (uses the same token as selected rows) and automatically scroll them into view.
163
+ */
164
+ export declare const WithRowHighlightAndScroll: StoryObj;
165
+ /**
166
+ * Censor-style list — large, virtualized table where `highlightRowId` moves
167
+ * automatically over time (e.g. matching the latest event / time).
168
+ */
169
+ export declare const WithVirtualizedCensorTimeline: StoryObj;
170
+ /** Fixed actions column at the far right — rendered via `rowActions` prop. */
171
+ export declare const WithRowActions: StoryObj;
172
+ /**
173
+ * Uncontrolled tree rows — `defaultExpanded={true}` opens all nodes on mount.
174
+ * The user can collapse/expand rows freely; state is managed internally.
175
+ */
176
+ export declare const WithExpandableRows: StoryObj;
177
+ /**
178
+ * Controlled expand — the caller owns `expanded` state via `expanded` +
179
+ * `onExpandedChange`. Collapsing a row in the table calls `onExpandedChange`;
180
+ * if the parent doesn't update the state, the row "springs back" open.
181
+ */
182
+ export declare const WithControlledExpand: StoryObj;
183
+ /**
184
+ * Column management panel — click ⋮ on any column header.
185
+ * - Toggle per-column visibility with the Switch
186
+ * - "Hide all" hides everything except one column
187
+ * - "Show all" restores all columns
188
+ * - Drag the ⠿ grip to reorder columns
189
+ */
190
+ export declare const WithColumnManagement: StoryObj;
191
+ /**
192
+ * Column management with restricted options:
193
+ * - `reorder: false` — drag handle hidden, column order is fixed
194
+ * - `hideAll: false` — "Hide all" button removed
195
+ *
196
+ * Pass any subset of `ColumnManagementOptions` to tailor the panel.
197
+ */
198
+ export declare const WithColumnManagementOptions: StoryObj;
199
+ /**
200
+ * Resizable columns — drag the right edge of any column header.
201
+ *
202
+ * Global bounds via `columnMinSize` / `columnMaxSize`.
203
+ * Per-column overrides in the column def (`minSize`, `maxSize`):
204
+ * - "Asset name": `minSize: 120`
205
+ * - "KPI (%)": `maxSize: 160`
206
+ */
207
+ export declare const WithColumnResize: StoryObj;
208
+ /**
209
+ * All features combined:
210
+ * - Checkbox selection
211
+ * - Sortable columns
212
+ * - Client-side pagination
213
+ * - Column management (visibility + reorder)
214
+ * - Column resize
215
+ * - Row actions
216
+ */
217
+ export declare const KitchenSink: StoryObj;
218
+ /**
219
+ * Drag-to-reorder rows — a grip handle is prepended automatically.
220
+ * `onRowReorder` fires with the new data array after a drop.
221
+ */
222
+ export declare const WithRowReorder: StoryObj;
223
+ /** Row click — clicking any row fires `onRowClick`. Rows show `cursor-pointer`. */
224
+ export declare const WithRowClick: StoryObj;
225
+ /**
226
+ * Cell click — `onCellClick` fires for individual cells.
227
+ * Use `event.stopPropagation()` to prevent `onRowClick` from also firing.
228
+ */
229
+ export declare const WithCellClick: StoryObj;
230
+ /**
231
+ * Sort indicator always visible — `sortIndicatorVisibility="always"` shows the
232
+ * sort icon on every sortable column, not just on hover.
233
+ */
234
+ export declare const SortIndicatorAlwaysVisible: StoryObj;
235
+ /**
236
+ * Side-by-side comparison of `tableLayout="auto"` vs `"fixed"` vs `"equal"`.
237
+ *
238
+ * - **auto** — browser distributes width based on cell content; `size` is ignored.
239
+ * - **fixed** — `size` is used as px per column; the last non-exact column grows
240
+ * so the table stays full-width (here: Status absorbs the remainder).
241
+ * - **equal** — all columns without `meta.exactWidth` share the remaining width equally.
242
+ * With `resizable`, drag handles are off for this row so equal widths are preserved.
243
+ */
244
+ export declare const TableLayoutComparison: StoryObj;
245
+ /**
246
+ * `rowClassName` and `cellClassName` let you style individual rows and cells
247
+ * based on their data.
248
+ *
249
+ * - Rows with status **"Completed"** get a green-tinted background.
250
+ * - Rows with status **"To do"** get a subtle white/opacity background.
251
+ * - The **"Status"** column cells are bold.
252
+ * - The **"Type"** cells for ROV are highlighted with an info tint.
253
+ */
254
+ export declare const WithCustomRowAndCellClassName: StoryObj;
255
+ /**
256
+ * Data management table — Figma **Xspector-New**:
257
+ * [full frame](https://www.figma.com/design/99rq6FbfPx6hgPS0VCvHJh/Xspector-New?node-id=11965-17125),
258
+ * [row / field spec](https://www.figma.com/design/99rq6FbfPx6hgPS0VCvHJh/Xspector-New?node-id=11965-17883).
259
+ *
260
+ * Uses the **DataTable editing API** (`enableEditing` + `editDisplayMode` +
261
+ * `editVariant` per column). Edit scope and trigger are toggleable via the
262
+ * toolbar at the top of the story.
263
+ */
264
+ export declare const DataManagement: StoryObj;
265
+ /** Data Management — empty state when no columns have been configured yet. */
266
+ export declare const DataManagementEmpty: StoryObj;
267
+ /**
268
+ * **Editing Field Showcase** — demonstrates every editing feature:
269
+ *
270
+ * | Feature | Where |
271
+ * |---|---|
272
+ * | `editVariant: "text"` | Product name, Notes |
273
+ * | `editVariant: "select"` | Category |
274
+ * | `editVariant: "number"` | Quantity, Price |
275
+ * | `editVariant: "checkbox"` | Active |
276
+ * | `editVariant: "custom"` + `editCustomCell` | Priority (inline button picker → Badge display) |
277
+ * | `editError` | Name (required + min length), Category (required), Price (> 0) |
278
+ * | `displayCell` | Price (formatted), Active (badge), Notes (italic placeholder) |
279
+ * | `testId` | Root container has `data-testid="edit-showcase"` |
280
+ * | Row / Cell mode toggle | Toolbar radio buttons |
281
+ * | Click / Double-click trigger | Toolbar radio buttons |
282
+ * | Tab traversal | Tab/Shift+Tab moves between editable fields |
283
+ */
284
+ export declare const EditingFieldShowcase: StoryObj;
@@ -41,6 +41,17 @@ export type DropdownProps = {
41
41
  selectedOption: Options | null | undefined;
42
42
  onClick: (option: Options) => void;
43
43
  }) => ReactNode;
44
+ /**
45
+ * When `true`, keep focus on the input after selecting an option so the
46
+ * menu stays open (useful for inline row-editing where the user may Tab
47
+ * to the next field instead of closing the dropdown).
48
+ */
49
+ keepOpenAfterSelect?: boolean;
50
+ /**
51
+ * Render the options list via a React portal so it escapes containers
52
+ * with `overflow: hidden/auto` (e.g. DataTable scroll wrappers).
53
+ */
54
+ portal?: boolean;
44
55
  } & Omit<InputProps, "value" | "onSelect">;
45
56
  declare const Dropdown: React.ForwardRefExoticComponent<{
46
57
  id?: string;
@@ -71,5 +82,16 @@ declare const Dropdown: React.ForwardRefExoticComponent<{
71
82
  selectedOption: Options | null | undefined;
72
83
  onClick: (option: Options) => void;
73
84
  }) => ReactNode;
85
+ /**
86
+ * When `true`, keep focus on the input after selecting an option so the
87
+ * menu stays open (useful for inline row-editing where the user may Tab
88
+ * to the next field instead of closing the dropdown).
89
+ */
90
+ keepOpenAfterSelect?: boolean;
91
+ /**
92
+ * Render the options list via a React portal so it escapes containers
93
+ * with `overflow: hidden/auto` (e.g. DataTable scroll wrappers).
94
+ */
95
+ portal?: boolean;
74
96
  } & Omit<InputProps, "onSelect" | "value"> & React.RefAttributes<HTMLInputElement>>;
75
97
  export default Dropdown;
@@ -31,6 +31,8 @@ declare const meta: {
31
31
  selectedOption: Options | null | undefined;
32
32
  onClick: (option: Options) => void;
33
33
  }) => React.ReactNode;
34
+ keepOpenAfterSelect?: boolean;
35
+ portal?: boolean;
34
36
  } & Omit<import("../..").InputProps, "onSelect" | "value"> & React.RefAttributes<HTMLInputElement>>;
35
37
  tags: string[];
36
38
  parameters: {
@@ -64,6 +66,8 @@ declare const meta: {
64
66
  selectedOption: Options | null | undefined;
65
67
  onClick: (option: Options) => void;
66
68
  }) => React.ReactNode) | undefined;
69
+ keepOpenAfterSelect?: boolean | undefined;
70
+ portal?: boolean | undefined;
67
71
  suppressHydrationWarning?: boolean | undefined | undefined;
68
72
  color?: string | undefined | undefined;
69
73
  height?: number | string | undefined | undefined;
@@ -3,9 +3,9 @@ export type ScrollbarSize = "m" | "s" | "xs";
3
3
  export interface ScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  /**
5
5
  * Scrollbar thickness.
6
- * - `m` — 12 px (shows track border)
7
- * - `s` — 6 px (default, shows no track border)
8
- * - `xs` — 2 px (shows no track border)
6
+ * - `m` — 12 px (default, shows track border + 2px thumb inset)
7
+ * - `s` — 6 px (shows track border + 2px thumb inset)
8
+ * - `xs` — 2 px (no track border, no thumb inset)
9
9
  */
10
10
  scrollbarSize?: ScrollbarSize;
11
11
  /**
@@ -299,3 +299,7 @@ export declare const WithDropdownMenu: {
299
299
  name: string;
300
300
  render: () => import("react/jsx-runtime").JSX.Element;
301
301
  };
302
+ export declare const BothAxes: {
303
+ name: string;
304
+ render: () => import("react/jsx-runtime").JSX.Element;
305
+ };
@@ -2,12 +2,42 @@ import * as React from "react";
2
2
  declare const Table: React.ForwardRefExoticComponent<{
3
3
  rootClassName?: string;
4
4
  rootRef?: React.LegacyRef<HTMLDivElement>;
5
+ /**
6
+ * Wraps the table in a rounded frame (`rounded-md` + `border-table-c-border`).
7
+ * Uses an outer `overflow-hidden` shell and an inner scroll area so corners clip
8
+ * cleanly (same pattern as scrollable bordered tables elsewhere in the system).
9
+ * For pagination in the same frame, wrap `Table` + `TablePagination` in your own
10
+ * bordered div instead of relying on this prop alone.
11
+ */
12
+ bordered?: boolean;
13
+ /**
14
+ * When false, render only `<table>` (no inner `overflow-auto` wrapper).
15
+ * Use when a parent already provides the scrollport — e.g. `DataTable` — so
16
+ * `sticky` header rows stick to the correct ancestor.
17
+ * Ignored when `bordered` is true (bordered tables always use the inner scroll shell).
18
+ */
19
+ scrollableWrapper?: boolean;
5
20
  } & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
6
21
  declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
7
- declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
22
+ declare const TableBody: React.ForwardRefExoticComponent<{
23
+ striped?: boolean;
24
+ } & React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
8
25
  declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
9
- declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
26
+ declare const TableRow: React.ForwardRefExoticComponent<{
27
+ divided?: boolean;
28
+ colDivided?: boolean;
29
+ } & React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
10
30
  declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
11
31
  declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
12
32
  declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
13
- export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
33
+ export interface TablePaginationProps {
34
+ pageIndex: number;
35
+ pageSize: number;
36
+ totalCount: number;
37
+ pageSizeOptions?: number[];
38
+ onPageChange: (pageIndex: number) => void;
39
+ onPageSizeChange: (pageSize: number) => void;
40
+ className?: string;
41
+ }
42
+ declare const TablePagination: React.ForwardRefExoticComponent<TablePaginationProps & React.RefAttributes<HTMLDivElement>>;
43
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, TablePagination, };
@@ -1,17 +1,28 @@
1
1
  import React from "react";
2
+ import type { StoryObj } from "@storybook/react";
2
3
  declare const meta: {
3
4
  title: string;
4
5
  component: React.ForwardRefExoticComponent<{
5
6
  rootClassName?: string;
6
7
  rootRef?: React.LegacyRef<HTMLDivElement>;
8
+ bordered?: boolean;
9
+ scrollableWrapper?: boolean;
7
10
  } & React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
8
11
  tags: string[];
9
12
  parameters: {
10
13
  layout: string;
11
14
  };
15
+ argTypes: {
16
+ bordered: {
17
+ control: "boolean";
18
+ description: string;
19
+ };
20
+ };
12
21
  decorators: ((Story: import("@storybook/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
13
22
  rootClassName?: string | undefined;
14
23
  rootRef?: React.LegacyRef<HTMLDivElement> | undefined;
24
+ bordered?: boolean | undefined;
25
+ scrollableWrapper?: boolean | undefined;
15
26
  defaultChecked?: boolean | undefined | undefined;
16
27
  defaultValue?: string | number | readonly string[] | undefined;
17
28
  suppressContentEditableWarning?: boolean | undefined | undefined;
@@ -283,7 +294,78 @@ declare const meta: {
283
294
  }>) => import("react/jsx-runtime").JSX.Element)[];
284
295
  };
285
296
  export default meta;
286
- export declare const Default: {
287
- args: {};
288
- render: (args: {}) => import("react/jsx-runtime").JSX.Element;
289
- };
297
+ /** NON-STRIPED horizontal row strokes, no column dividers */
298
+ export declare const Default: StoryObj;
299
+ /** NON-STRIPED + COL DIVIDED — horizontal row strokes + vertical column dividers */
300
+ export declare const NonStripedDivided: StoryObj;
301
+ /** STRIPED — alternating bg-a / bg-b, NO row strokes, NO column dividers */
302
+ export declare const Striped: StoryObj;
303
+ /**
304
+ * STRIPED + COL DIVIDED — alternating bg, NO row strokes, WITH column dividers.
305
+ * Primary Xspector table style.
306
+ */
307
+ export declare const StripedAndDivided: StoryObj;
308
+ /** SELECTED ROW — data-[state=selected] applies transparent-primary-12. Row 1 pre-selected. */
309
+ export declare const WithSelectedRow: StoryObj;
310
+ /**
311
+ * WITH FOOTER — tfoot summary row with bg-table-bg-main + top border.
312
+ * TableFooter is inside Table so bordered works naturally.
313
+ */
314
+ export declare const WithFooter: StoryObj;
315
+ /**
316
+ * WITH PAGINATION — TablePagination is a sibling of Table so needs an explicit
317
+ * outer wrapper (not covered by Table's bordered prop).
318
+ */
319
+ export declare const WithPagination: StoryObj;
320
+ /** EMPTY STATE — single full-width row with centered message */
321
+ export declare const Empty: StoryObj;
322
+ /** ALL STATES SIDE-BY-SIDE — reference sheet for design review */
323
+ export declare const AllStates: StoryObj;
324
+ /**
325
+ * WITH SCROLL (Figma 9637-10817)
326
+ *
327
+ * Demonstrates both axes of overflow:
328
+ * - Vertical: fixed-height container → body rows overflow and scroll vertically
329
+ * - Horizontal: 10 columns wider than the viewport → native h-scroll bar appears
330
+ *
331
+ * Implementation notes:
332
+ * - Outer div sets the fixed height and owns the rounded border
333
+ * (TablePagination must sit outside the scrollable Table)
334
+ * - Table gets rootClassName="flex-1 min-h-0" so it grows to fill flex space
335
+ * and allows overflow-auto to kick in
336
+ * - TableHeader gets className="sticky top-0 z-10" for a frozen header row
337
+ */
338
+ export declare const WithScroll: StoryObj;
339
+ /**
340
+ * SCROLLBAR SIZES — per-axis demo
341
+ *
342
+ * Combine ui-scrollbar-x-{size} + ui-scrollbar-y-{size} independently.
343
+ * CSS: height → horizontal bar thickness | width → vertical bar thickness
344
+ */
345
+ export declare const ScrollbarSizes: StoryObj;
346
+ /** PANEL DEFAULT — transparent rows + panel-sub-line row dividers */
347
+ export declare const PanelDefault: StoryObj;
348
+ /** PANEL NON-STRIPED DIVIDED — row dividers + vertical column dividers */
349
+ export declare const PanelNonStripedDivided: StoryObj;
350
+ /** PANEL STRIPED — alternating rows (both transparent in panel mode), no row strokes */
351
+ export declare const PanelStriped: StoryObj;
352
+ /** PANEL STRIPED + COL DIVIDED */
353
+ export declare const PanelStripedAndDivided: StoryObj;
354
+ /** PANEL SELECTED ROW — table-panel-selected (yellow/olive) */
355
+ export declare const PanelWithSelectedRow: StoryObj;
356
+ /** PANEL WITH FOOTER */
357
+ export declare const PanelWithFooter: StoryObj;
358
+ /**
359
+ * PANEL WITH PAGINATION
360
+ * TablePagination sits inside the same data-surface="panel" scope so it
361
+ * automatically picks up the panel tokens — no variant prop needed.
362
+ */
363
+ export declare const PanelWithPagination: StoryObj;
364
+ /** PANEL EMPTY STATE */
365
+ export declare const PanelEmpty: StoryObj;
366
+ /**
367
+ * PANEL WITH SCROLL — sticky header + both scroll axes inside a fixed-height panel.
368
+ */
369
+ export declare const PanelWithScroll: StoryObj;
370
+ /** PANEL ALL STATES — all variants side-by-side for design review */
371
+ export declare const PanelAllStates: StoryObj;
@@ -390,6 +390,14 @@ export declare const Default: {
390
390
  };
391
391
  render: (args: {}) => import("react/jsx-runtime").JSX.Element;
392
392
  };
393
+ /**
394
+ * `isFloatingLabel={false}` — visible **`placeholder`**, no floating animation,
395
+ * and no inner `<label>` when `label` is empty (e.g. table cells, compact filters).
396
+ * Pair with `required={false}` + `hasClearIcon={false}` when mimicking inline fields.
397
+ */
398
+ export declare const NonFloatingLabel: {
399
+ render: () => import("react/jsx-runtime").JSX.Element;
400
+ };
393
401
  export declare const CustomLabel: {
394
402
  args: {
395
403
  label: string;
@@ -1,4 +1,5 @@
1
1
  export declare const inputVariant: (props?: ({
2
+ floatingLabelPlaceholder?: boolean | null | undefined;
2
3
  size?: "sm" | "md" | "lg" | null | undefined;
3
4
  rounded?: "none" | "normal" | "full" | null | undefined;
4
5
  variant?: "outline" | "flat" | "underline" | null | undefined;