@c9up/nebula 0.1.9 → 0.2.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.
Files changed (132) hide show
  1. package/dist/atoms/Avatar.d.ts +36 -9
  2. package/dist/atoms/Avatar.js +66 -27
  3. package/dist/atoms/index.d.ts +1 -1
  4. package/dist/atoms/index.js +1 -1
  5. package/dist/configure.d.ts +6 -0
  6. package/dist/configure.js +4 -22
  7. package/dist/lib/children.d.ts +30 -0
  8. package/dist/lib/id.d.ts +13 -29
  9. package/dist/lib/id.js +13 -39
  10. package/dist/lib/motion.d.ts +10 -0
  11. package/dist/lib/motion.js +10 -0
  12. package/dist/molecules/Accordion.d.ts +36 -15
  13. package/dist/molecules/Accordion.js +68 -45
  14. package/dist/molecules/Breadcrumb.d.ts +29 -11
  15. package/dist/molecules/Breadcrumb.js +52 -52
  16. package/dist/molecules/Collapsible.d.ts +18 -17
  17. package/dist/molecules/Collapsible.js +42 -34
  18. package/dist/molecules/Field.d.ts +66 -30
  19. package/dist/molecules/Field.js +106 -55
  20. package/dist/molecules/InputGroup.d.ts +39 -21
  21. package/dist/molecules/InputGroup.js +43 -27
  22. package/dist/molecules/InputOTP.d.ts +26 -3
  23. package/dist/molecules/InputOTP.js +109 -76
  24. package/dist/molecules/Message.js +5 -4
  25. package/dist/molecules/Pagination.d.ts +36 -11
  26. package/dist/molecules/Pagination.js +58 -74
  27. package/dist/molecules/RadioGroup.d.ts +25 -17
  28. package/dist/molecules/RadioGroup.js +47 -43
  29. package/dist/molecules/Resizable.d.ts +32 -7
  30. package/dist/molecules/Resizable.js +76 -49
  31. package/dist/molecules/Tabs.d.ts +49 -11
  32. package/dist/molecules/Tabs.js +107 -51
  33. package/dist/molecules/ToggleGroup.d.ts +16 -10
  34. package/dist/molecules/ToggleGroup.js +37 -21
  35. package/dist/molecules/index.d.ts +11 -11
  36. package/dist/molecules/index.js +11 -11
  37. package/dist/organisms/AlertDialog.d.ts +80 -28
  38. package/dist/organisms/AlertDialog.js +192 -67
  39. package/dist/organisms/Carousel.d.ts +25 -3
  40. package/dist/organisms/Carousel.js +75 -43
  41. package/dist/organisms/Combobox.d.ts +2 -1
  42. package/dist/organisms/Combobox.js +46 -16
  43. package/dist/organisms/Command.d.ts +73 -32
  44. package/dist/organisms/Command.js +209 -131
  45. package/dist/organisms/CommandDialog.js +5 -5
  46. package/dist/organisms/ContextMenu.d.ts +41 -19
  47. package/dist/organisms/ContextMenu.js +112 -71
  48. package/dist/organisms/DataTable.js +42 -8
  49. package/dist/organisms/Dialog.d.ts +97 -31
  50. package/dist/organisms/Dialog.js +193 -68
  51. package/dist/organisms/Drawer.d.ts +33 -10
  52. package/dist/organisms/Drawer.js +130 -52
  53. package/dist/organisms/DropdownMenu.d.ts +58 -11
  54. package/dist/organisms/DropdownMenu.js +137 -50
  55. package/dist/organisms/Form.js +9 -11
  56. package/dist/organisms/HoverCard.d.ts +39 -19
  57. package/dist/organisms/HoverCard.js +116 -40
  58. package/dist/organisms/Menubar.d.ts +55 -19
  59. package/dist/organisms/Menubar.js +166 -82
  60. package/dist/organisms/NavigationMenu.d.ts +77 -31
  61. package/dist/organisms/NavigationMenu.js +169 -98
  62. package/dist/organisms/Popover.d.ts +72 -12
  63. package/dist/organisms/Popover.js +132 -25
  64. package/dist/organisms/Questionnaire.js +5 -5
  65. package/dist/organisms/Select.d.ts +99 -18
  66. package/dist/organisms/Select.js +253 -111
  67. package/dist/organisms/Sheet.d.ts +57 -13
  68. package/dist/organisms/Sheet.js +141 -54
  69. package/dist/organisms/Sidebar.d.ts +146 -56
  70. package/dist/organisms/Sidebar.js +236 -128
  71. package/dist/organisms/Tooltip.d.ts +88 -14
  72. package/dist/organisms/Tooltip.js +210 -47
  73. package/dist/organisms/index.d.ts +15 -15
  74. package/dist/organisms/index.js +15 -15
  75. package/dist/primitives/floating.js +25 -0
  76. package/dist/primitives/floatingSurface.d.ts +11 -0
  77. package/dist/primitives/floatingSurface.js +8 -0
  78. package/dist/primitives/menu.d.ts +45 -1
  79. package/dist/primitives/menu.js +45 -14
  80. package/dist/primitives/menuParts.d.ts +113 -0
  81. package/dist/primitives/menuParts.js +207 -0
  82. package/dist/stubs.d.ts +13 -0
  83. package/dist/stubs.js +14 -0
  84. package/nebula.css +1 -1
  85. package/package.json +4 -3
  86. package/registry.json +18 -6
  87. package/src/atoms/Avatar.ts +141 -37
  88. package/src/atoms/index.ts +13 -1
  89. package/src/configure.ts +10 -23
  90. package/src/lib/children.ts +31 -0
  91. package/src/lib/id.ts +11 -39
  92. package/src/lib/motion.ts +12 -0
  93. package/src/molecules/Accordion.ts +120 -60
  94. package/src/molecules/Breadcrumb.ts +77 -76
  95. package/src/molecules/Collapsible.ts +77 -41
  96. package/src/molecules/Field.ts +187 -72
  97. package/src/molecules/InputGroup.ts +88 -35
  98. package/src/molecules/InputOTP.ts +150 -86
  99. package/src/molecules/Message.ts +6 -4
  100. package/src/molecules/Pagination.ts +96 -101
  101. package/src/molecules/RadioGroup.ts +70 -59
  102. package/src/molecules/Resizable.ts +138 -75
  103. package/src/molecules/Tabs.ts +187 -74
  104. package/src/molecules/ToggleGroup.ts +77 -38
  105. package/src/molecules/index.ts +85 -8
  106. package/src/organisms/AlertDialog.ts +319 -82
  107. package/src/organisms/Carousel.ts +129 -52
  108. package/src/organisms/Combobox.ts +64 -19
  109. package/src/organisms/Command.ts +342 -159
  110. package/src/organisms/CommandDialog.ts +6 -6
  111. package/src/organisms/ContextMenu.ts +185 -83
  112. package/src/organisms/DataTable.ts +56 -10
  113. package/src/organisms/Dialog.ts +312 -102
  114. package/src/organisms/Drawer.ts +219 -71
  115. package/src/organisms/DropdownMenu.ts +219 -61
  116. package/src/organisms/Form.ts +48 -34
  117. package/src/organisms/HoverCard.ts +187 -53
  118. package/src/organisms/Menubar.ts +247 -87
  119. package/src/organisms/NavigationMenu.ts +306 -128
  120. package/src/organisms/Popover.ts +215 -39
  121. package/src/organisms/Questionnaire.ts +9 -6
  122. package/src/organisms/Select.ts +397 -130
  123. package/src/organisms/Sheet.ts +252 -83
  124. package/src/organisms/Sidebar.ts +438 -185
  125. package/src/organisms/Tooltip.ts +315 -65
  126. package/src/organisms/index.ts +284 -14
  127. package/src/primitives/floating.ts +33 -0
  128. package/src/primitives/floatingSurface.ts +19 -0
  129. package/src/primitives/menu.ts +79 -18
  130. package/src/primitives/menuParts.ts +371 -0
  131. package/src/stubs.ts +16 -0
  132. package/stubs/config/nebula.stub +21 -0
@@ -29,7 +29,7 @@ import { fadeInOut, zoomInOut } from "../lib/motion.js";
29
29
  import { type Reactive, read } from "../lib/props.js";
30
30
  import { controllable } from "../primitives/controllable.js";
31
31
  import { modalSurface } from "../primitives/modalSurface.js";
32
- import { Command, type CommandItem, type CommandProps } from "./Command.js";
32
+ import { Command, type CommandProps } from "./Command.js";
33
33
  import { dialogBackdropClasses } from "./Dialog.js";
34
34
 
35
35
  export interface CommandDialogProps extends Omit<CommandProps, "class"> {
@@ -85,8 +85,8 @@ export const CommandDialog = component<CommandDialogProps>((props) => {
85
85
  state.set(false);
86
86
  }
87
87
 
88
- function runAndClose(item: CommandItem): void {
89
- props.onSelect?.(item);
88
+ function runAndClose(value: string): void {
89
+ props.onSelect?.(value);
90
90
  // Closing after the action, not before: a handler that opens another
91
91
  // surface should not have this one tearing down focus underneath it.
92
92
  close();
@@ -132,11 +132,11 @@ export const CommandDialog = component<CommandDialogProps>((props) => {
132
132
  : html`<p id="${descriptionId}" class="sr-only">${props.description}</p>`
133
133
  }
134
134
  ${Command({
135
- items: props.items,
136
- placeholder: props.placeholder,
137
- emptyMessage: props.emptyMessage,
138
135
  filter: props.filter,
139
136
  onSelect: runAndClose,
137
+ // Passed straight through: `Command` calls it inside its own
138
+ // setup, which is where the parts find its context.
139
+ children: props.children,
140
140
  })}
141
141
  </div>
142
142
  </div>`,
@@ -1,46 +1,71 @@
1
1
  /**
2
- * ContextMenu — a menu opened by right-clicking a region.
2
+ * ContextMenu — the menu a right-click opens.
3
3
  *
4
- * Same panel as DropdownMenu; the difference is the anchor. There is no
5
- * trigger element to position against — the menu belongs at the pointer, which
6
- * could be anywhere inside the region.
4
+ * ContextMenu({ children: () => html`
5
+ * ${ContextMenuTrigger({ children: "Right-click me" })}
6
+ * ${ContextMenuContent({ children: () => html`
7
+ * ${ContextMenuItem({ children: "Cut", onSelect: cut })}
8
+ * ` })}
9
+ * ` })
7
10
  *
8
- * So a zero-size element is parked at the click coordinates and used as the
9
- * anchor. It is a real element on purpose: `autoPosition` measures its rect,
10
- * and that rect flips and shifts exactly like a button's would, which is what
11
- * gets a menu opened near the bottom of the window to open upwards instead of
12
- * off screen.
11
+ * The rows come from `createMenuParts`, so a context menu and a dropdown menu
12
+ * cannot drift apart. What is specific here is the anchor: a context menu
13
+ * opens at the POINTER, not against a control, so a zero-size element is moved
14
+ * to the click coordinates and the surface is positioned against that.
13
15
  *
14
- * Long-press opens it on touch, where there is no right button. The 500ms
15
- * threshold matches the platform convention, and any movement cancels it so a
16
- * scroll gesture does not surface a menu.
16
+ * Touch gets a long press, because there is no right button. It is cancelled
17
+ * by movement, so a scroll that starts on the region does not open a menu
18
+ * under the thumb.
17
19
  */
18
20
 
19
- import { component, html, onUnmount, signal } from "@c9up/aurora";
20
- import { type Slot, slot } from "../lib/children.js";
21
+ import {
22
+ component,
23
+ createContext,
24
+ html,
25
+ inject,
26
+ onUnmount,
27
+ provide,
28
+ signal,
29
+ type TemplateResult,
30
+ } from "@c9up/aurora";
31
+ import type { Child, Parts, Slot } from "../lib/children.js";
32
+ import { slot } from "../lib/children.js";
21
33
  import { cn } from "../lib/cn.js";
22
34
  import { uid } from "../lib/id.js";
35
+ import { slideInFromSide, zoomInOut } from "../lib/motion.js";
23
36
  import { type Reactive, read } from "../lib/props.js";
24
37
  import { floatingSurface } from "../primitives/floatingSurface.js";
25
- import { type MenuEntry, menuPanel, wireMenu } from "../primitives/menu.js";
38
+ import { menuPanelClasses, wireMenu } from "../primitives/menu.js";
39
+ import { createMenuParts, type MenuOwner } from "../primitives/menuParts.js";
26
40
 
27
41
  const LONG_PRESS_MS = 500;
28
42
 
43
+ interface RegisteredContent {
44
+ readonly body: Child;
45
+ readonly class?: Reactive<string>;
46
+ }
47
+
48
+ interface ContextMenuApi extends MenuOwner {
49
+ readonly anchorId: string;
50
+ readonly open: () => boolean;
51
+ openAt(x: number, y: number): void;
52
+ startLongPress(event: PointerEvent): void;
53
+ cancelLongPress(): void;
54
+ register(content: RegisteredContent): void;
55
+ }
56
+
57
+ const ContextMenuContext = createContext<ContextMenuApi>("ContextMenu");
58
+
29
59
  export interface ContextMenuProps {
30
- /** The region that answers to right-click. */
31
- children?: Slot;
32
- entries: readonly MenuEntry[];
33
60
  onOpenChange?: (open: boolean) => void;
34
- class?: Reactive<string>;
35
- contentClass?: Reactive<string>;
61
+ children?: Parts;
36
62
  }
37
63
 
38
64
  export const ContextMenu = component<ContextMenuProps>((props) => {
39
- const regionId = uid("context-menu-region");
40
65
  const anchorId = uid("context-menu-anchor");
41
66
  const contentId = uid("context-menu-content");
42
67
  const open = signal(false);
43
-
68
+ let content: RegisteredContent | undefined;
44
69
  let unwire: (() => void) | null = null;
45
70
  let pressTimer: ReturnType<typeof setTimeout> | undefined;
46
71
 
@@ -49,77 +74,154 @@ export const ContextMenu = component<ContextMenuProps>((props) => {
49
74
  props.onOpenChange?.(next);
50
75
  }
51
76
 
52
- function moveAnchorTo(x: number, y: number): void {
53
- const anchor = document.getElementById(anchorId);
54
- if (anchor === null) return;
55
- anchor.style.left = `${x}px`;
56
- anchor.style.top = `${y}px`;
77
+ function cancelLongPress(): void {
78
+ if (pressTimer !== undefined) clearTimeout(pressTimer);
79
+ pressTimer = undefined;
57
80
  }
58
81
 
59
82
  function openAt(x: number, y: number): void {
60
- moveAnchorTo(x, y);
83
+ const anchor = document.getElementById(anchorId);
84
+ if (anchor !== null) {
85
+ anchor.style.left = `${x}px`;
86
+ anchor.style.top = `${y}px`;
87
+ }
61
88
  setOpen(true);
62
89
  }
63
90
 
64
- function onContextMenu(event: MouseEvent): void {
65
- event.preventDefault();
66
- openAt(event.clientX, event.clientY);
67
- }
68
-
69
- function onPointerDown(event: PointerEvent): void {
70
- if (event.pointerType !== "touch") return;
71
- cancelPress();
72
- pressTimer = setTimeout(
73
- () => openAt(event.clientX, event.clientY),
74
- LONG_PRESS_MS,
75
- );
76
- }
77
-
78
- function cancelPress(): void {
79
- if (pressTimer !== undefined) clearTimeout(pressTimer);
80
- pressTimer = undefined;
81
- }
82
-
83
- onUnmount(cancelPress);
91
+ onUnmount(cancelLongPress);
84
92
 
85
- floatingSurface({
86
- anchor: () => document.getElementById(anchorId),
93
+ provide<ContextMenuApi>(ContextMenuContext, {
94
+ anchorId,
87
95
  open: () => open(),
88
- onClose: () => setOpen(false),
89
- placement: "bottom-start",
90
- offset: 2,
91
- content: () =>
92
- menuPanel({
93
- id: contentId,
94
- entries: props.entries,
95
- onCloseAll: () => setOpen(false),
96
- class: read(props.contentClass),
97
- }),
98
- onOpened: (panel) => {
99
- unwire = wireMenu(panel, { onCloseAll: () => setOpen(false) });
100
- panel.focus({ preventScroll: true });
96
+ openAt,
97
+ startLongPress(event) {
98
+ if (event.pointerType !== "touch") return;
99
+ cancelLongPress();
100
+ pressTimer = setTimeout(
101
+ () => openAt(event.clientX, event.clientY),
102
+ LONG_PRESS_MS,
103
+ );
101
104
  },
102
- onClosed: () => {
103
- unwire?.();
104
- unwire = null;
105
+ cancelLongPress,
106
+ closeAll: () => setOpen(false),
107
+ register(registered) {
108
+ content = registered;
105
109
  },
106
110
  });
107
111
 
108
- return html`<div
109
- data-slot="context-menu"
110
- id="${regionId}"
111
- class="${() => cn(read(props.class))}"
112
- @contextmenu="${onContextMenu}"
113
- @pointerdown="${onPointerDown}"
114
- @pointerup="${cancelPress}"
115
- @pointermove="${cancelPress}"
116
- @pointercancel="${cancelPress}"
117
- >
118
- ${slot(props.children)}
119
- <span
120
- id="${anchorId}"
121
- aria-hidden="true"
122
- class="pointer-events-none fixed size-0"
123
- ></span>
124
- </div>`;
112
+ const parts = props.children?.();
113
+
114
+ if (content !== undefined) {
115
+ const registered = content;
116
+ floatingSurface({
117
+ anchor: () => document.getElementById(anchorId),
118
+ open: () => open(),
119
+ onClose: () => setOpen(false),
120
+ placement: "bottom-start",
121
+ offset: 2,
122
+ content: () => renderPanel(registered, contentId),
123
+ onOpened: (panel) => {
124
+ unwire = wireMenu(panel, { onCloseAll: () => setOpen(false) });
125
+ panel.focus({ preventScroll: true });
126
+ },
127
+ onClosed: () => {
128
+ unwire?.();
129
+ unwire = null;
130
+ },
131
+ });
132
+ }
133
+
134
+ return html`${parts}`;
125
135
  });
136
+
137
+ export interface ContextMenuTriggerProps {
138
+ children?: Slot;
139
+ class?: Reactive<string>;
140
+ }
141
+
142
+ /** The region that answers to right-click, and the anchor the menu opens at. */
143
+ export const ContextMenuTrigger = component<ContextMenuTriggerProps>(
144
+ (props) => {
145
+ const menu = inject(ContextMenuContext);
146
+ function onContextMenu(event: MouseEvent): void {
147
+ event.preventDefault();
148
+ menu.openAt(event.clientX, event.clientY);
149
+ }
150
+ return html`<div
151
+ data-slot="context-menu-trigger"
152
+ data-state="${() => (menu.open() ? "open" : "closed")}"
153
+ class="${() => cn(read(props.class))}"
154
+ @contextmenu="${onContextMenu}"
155
+ @pointerdown="${(event: PointerEvent) => menu.startLongPress(event)}"
156
+ @pointerup="${() => menu.cancelLongPress()}"
157
+ @pointermove="${() => menu.cancelLongPress()}"
158
+ @pointercancel="${() => menu.cancelLongPress()}"
159
+ >${slot(props.children)}<span
160
+ id="${menu.anchorId}"
161
+ aria-hidden="true"
162
+ class="pointer-events-none fixed size-0"
163
+ ></span></div>`;
164
+ },
165
+ );
166
+
167
+ export interface ContextMenuContentProps {
168
+ children?: Parts;
169
+ class?: Reactive<string>;
170
+ }
171
+
172
+ export const ContextMenuContent = component<ContextMenuContentProps>(
173
+ (props) => {
174
+ const menu = inject(ContextMenuContext);
175
+ menu.register({ body: props.children?.(), class: props.class });
176
+ return html``;
177
+ },
178
+ );
179
+
180
+ const parts = createMenuParts("context-menu", ContextMenuContext);
181
+
182
+ export const ContextMenuGroup = parts.Group;
183
+ export const ContextMenuItem = parts.Item;
184
+ export const ContextMenuCheckboxItem = parts.CheckboxItem;
185
+ export const ContextMenuRadioGroup = parts.RadioGroup;
186
+ export const ContextMenuRadioItem = parts.RadioItem;
187
+ export const ContextMenuLabel = parts.Label;
188
+ export const ContextMenuSeparator = parts.Separator;
189
+ export const ContextMenuShortcut = parts.Shortcut;
190
+ export const ContextMenuSub = parts.Sub;
191
+ export const ContextMenuSubTrigger = parts.SubTrigger;
192
+ export const ContextMenuSubContent = parts.SubContent;
193
+ export const ContextMenuPortal = parts.Portal;
194
+
195
+ export type {
196
+ MenuCheckboxItemProps as ContextMenuCheckboxItemProps,
197
+ MenuGroupProps as ContextMenuGroupProps,
198
+ MenuItemProps as ContextMenuItemProps,
199
+ MenuLabelProps as ContextMenuLabelProps,
200
+ MenuPortalProps as ContextMenuPortalProps,
201
+ MenuRadioGroupProps as ContextMenuRadioGroupProps,
202
+ MenuRadioItemProps as ContextMenuRadioItemProps,
203
+ MenuSeparatorProps as ContextMenuSeparatorProps,
204
+ MenuShortcutProps as ContextMenuShortcutProps,
205
+ MenuSubContentProps as ContextMenuSubContentProps,
206
+ MenuSubProps as ContextMenuSubProps,
207
+ MenuSubTriggerProps as ContextMenuSubTriggerProps,
208
+ } from "../primitives/menuParts.js";
209
+
210
+ function renderPanel(
211
+ registered: RegisteredContent,
212
+ contentId: string,
213
+ ): TemplateResult {
214
+ return html`<div
215
+ data-slot="context-menu-content"
216
+ id="${contentId}"
217
+ role="menu"
218
+ aria-orientation="vertical"
219
+ tabindex="-1"
220
+ class="${cn(
221
+ menuPanelClasses,
222
+ zoomInOut,
223
+ slideInFromSide,
224
+ read(registered.class),
225
+ )}"
226
+ >${registered.body}</div>`;
227
+ }
@@ -30,7 +30,16 @@ import {
30
30
  ChevronsUpDownIcon,
31
31
  ChevronUpIcon,
32
32
  } from "../lib/icons.js";
33
- import { Pagination } from "../molecules/Pagination.js";
33
+ import {
34
+ Pagination,
35
+ PaginationContent,
36
+ PaginationEllipsis,
37
+ PaginationItem,
38
+ PaginationLink,
39
+ PaginationNext,
40
+ PaginationPrevious,
41
+ pageWindow,
42
+ } from "../molecules/Pagination.js";
34
43
  import {
35
44
  Table,
36
45
  TableBody,
@@ -271,17 +280,54 @@ export function DataTable<Row>(props: DataTableProps<Row>): TemplateResult {
271
280
  }),
272
281
  ],
273
282
  })}
274
- ${
275
- props.pageSize === undefined
276
- ? null
277
- : Pagination({
278
- page: () => Math.min(page(), pageCount()),
279
- pageCount,
280
- onPageChange: (next) => page(next),
281
- })
282
- }
283
+ ${props.pageSize === undefined ? null : renderPagination()}
283
284
  </div>`;
284
285
 
286
+ /**
287
+ * The page links.
288
+ *
289
+ * Composed from `Pagination`'s parts rather than described: `pageWindow`
290
+ * still decides WHICH pages are shown — first, last, a run around the
291
+ * current one and the gaps between — and the parts render that list.
292
+ */
293
+ function renderPagination(): Child {
294
+ const current = (): number => Math.min(page(), pageCount());
295
+ const go = (target: number) => (): void => {
296
+ page(Math.min(Math.max(target, 1), pageCount()));
297
+ };
298
+ return Pagination({
299
+ children: () =>
300
+ PaginationContent({
301
+ children: [
302
+ PaginationItem({
303
+ children: PaginationPrevious({
304
+ disabled: () => current() <= 1,
305
+ onSelect: go(current() - 1),
306
+ }),
307
+ }),
308
+ ...pageWindow(current(), pageCount()).map((entry) =>
309
+ PaginationItem({
310
+ children:
311
+ entry === null
312
+ ? PaginationEllipsis({})
313
+ : PaginationLink({
314
+ children: String(entry),
315
+ isActive: () => current() === entry,
316
+ onSelect: go(entry),
317
+ }),
318
+ }),
319
+ ),
320
+ PaginationItem({
321
+ children: PaginationNext({
322
+ disabled: () => current() >= pageCount(),
323
+ onSelect: go(current() + 1),
324
+ }),
325
+ }),
326
+ ],
327
+ }),
328
+ });
329
+ }
330
+
285
331
  function renderRow(row: Row): Child {
286
332
  const key = props.rowKey(row);
287
333
  return TableRow({