@eifi1/ui-kit 0.46.0 → 0.46.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 (75) hide show
  1. package/README.md +10 -9
  2. package/dist/admin/user-roster.d.ts +6 -2
  3. package/dist/admin/user-roster.js +7 -3
  4. package/dist/admin/user-roster.js.map +1 -1
  5. package/dist/components/data-table-row-actions.d.ts +22 -5
  6. package/dist/components/data-table-row-actions.js +14 -5
  7. package/dist/components/data-table-row-actions.js.map +1 -1
  8. package/dist/components/data-table.d.ts +16 -1
  9. package/dist/components/data-table.js +2 -0
  10. package/dist/components/data-table.js.map +1 -1
  11. package/dist/components/row-actions.d.ts +12 -5
  12. package/dist/components/row-actions.js +11 -4
  13. package/dist/components/row-actions.js.map +1 -1
  14. package/dist/components/translation-review.js +3 -1
  15. package/dist/components/translation-review.js.map +1 -1
  16. package/dist/data-table.d.ts +1 -0
  17. package/dist/data-table.js +2 -0
  18. package/dist/data-table.js.map +1 -1
  19. package/dist/eslint/index.js +1 -1
  20. package/dist/i18n/locales/en.js.map +2 -2
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +4 -2
  23. package/dist/index.js.map +1 -1
  24. package/dist/notifications/device-zone-report.d.ts +7 -0
  25. package/dist/notifications/device-zone-report.js +8 -1
  26. package/dist/notifications/device-zone-report.js.map +1 -1
  27. package/dist/notifications/feedback-notification-types.d.ts +14 -1
  28. package/dist/notifications/feedback-notification-types.js +5 -1
  29. package/dist/notifications/feedback-notification-types.js.map +1 -1
  30. package/dist/notifications/notification-bell.d.ts +1 -1
  31. package/dist/notifications/notification-bell.js.map +1 -1
  32. package/dist/notifications/notification-inbox.d.ts +12 -3
  33. package/dist/notifications/notification-inbox.js +2 -2
  34. package/dist/notifications/notification-inbox.js.map +1 -1
  35. package/dist/notifications/notifications-labels.d.ts +3 -1
  36. package/dist/notifications/notifications-labels.js.map +1 -1
  37. package/dist/notifications/time-zone-select.d.ts +5 -4
  38. package/dist/notifications/time-zone-select.js +2 -7
  39. package/dist/notifications/time-zone-select.js.map +1 -1
  40. package/dist/offline/local-first.d.ts +9 -0
  41. package/dist/offline/local-first.js +14 -0
  42. package/dist/offline/local-first.js.map +1 -1
  43. package/dist/offline.d.ts +1 -1
  44. package/dist/offline.js +2 -1
  45. package/dist/offline.js.map +1 -1
  46. package/dist/sync/db.d.ts +17 -0
  47. package/dist/sync/db.js +10 -1
  48. package/dist/sync/db.js.map +1 -1
  49. package/dist/sync/engine.d.ts +11 -9
  50. package/dist/sync/engine.js.map +1 -1
  51. package/dist/sync/hooks.d.ts +5 -0
  52. package/dist/sync/hooks.js.map +1 -1
  53. package/dist/sync.d.ts +2 -2
  54. package/dist/sync.js +5 -2
  55. package/dist/sync.js.map +1 -1
  56. package/package.json +1 -1
  57. package/src/admin/user-roster.tsx +12 -3
  58. package/src/components/data-table-row-actions.tsx +33 -9
  59. package/src/components/data-table.tsx +17 -0
  60. package/src/components/row-actions.tsx +33 -9
  61. package/src/components/translation-review.tsx +3 -1
  62. package/src/data-table.ts +3 -0
  63. package/src/index.ts +10 -3
  64. package/src/notifications/device-zone-report.ts +14 -1
  65. package/src/notifications/feedback-notification-types.ts +19 -1
  66. package/src/notifications/notification-bell.tsx +1 -1
  67. package/src/notifications/notification-inbox.tsx +15 -5
  68. package/src/notifications/notifications-labels.ts +3 -1
  69. package/src/notifications/time-zone-select.tsx +6 -10
  70. package/src/offline/local-first.ts +24 -0
  71. package/src/offline.ts +1 -1
  72. package/src/sync/db.ts +22 -0
  73. package/src/sync/engine.ts +11 -9
  74. package/src/sync/hooks.ts +5 -0
  75. package/src/sync.ts +2 -2
@@ -201,10 +201,17 @@ export interface RowActionsColumnOptions<T> {
201
201
  /**
202
202
  * The column's name as plain text — the column-settings checklist and the phone
203
203
  * card's label read it (`DataTableColumn.headerText`). Pass the app's own word; left
204
- * out, the header shows the provider's `rowActions.actions` to a screen reader and
205
- * the plain-text places fall back to the column's `key`.
204
+ * out, the heading shows the provider's `rowActions.actions` and the plain-text
205
+ * places fall back to the column's `key`.
206
206
  */
207
207
  headerText?: string;
208
+ /**
209
+ * The heading (0.46.1, keksdose dev#598 rework — Marcel: a VISIBLE "Actions" heading on
210
+ * every table with an actions column). Default: `headerText`, else the provider's
211
+ * `rowActions.actions` ("Actions"), shown, end-aligned over the buttons. A node
212
+ * replaces it; `false` keeps the pre-0.46.1 heading, named for a screen reader only.
213
+ */
214
+ header?: ReactNode | false;
208
215
  labels?: LabelOverride<RowActionsLabels>;
209
216
  /** Anything else for the column (`mobileHidden`, `cellProps`…), merged last. */
210
217
  column?: Partial<DataTableColumn<T>>;
@@ -215,10 +222,10 @@ export interface RowActionsColumnOptions<T> {
215
222
  *
216
223
  * columns={[...columns, rowActionsColumn({ actions: (r) => [...], name: (r) => r.name })]}
217
224
  *
218
- * The header is visually hidden (the icons say what the column is), the column hugs its
219
- * content at the row's end, and `noRowLink` keeps a `rowHref` anchor off it, so the
225
+ * The heading says "Actions" on screen (0.46.1; `header` changes or hides it), the
226
+ * column hugs its content at the row's end, and `noRowLink` keeps a `rowHref` anchor off it, so the
220
227
  * buttons keep their own clicks. On a phone it is a line of the card like any column;
221
228
  * set `column: { mobileHidden: true }` to drop it there (with `mobileDetailsInRow` it
222
229
  * then shows in the opened row instead).
223
230
  */
224
- export declare function rowActionsColumn<T>({ key, actions, name, collapse, size, glyphSize, tooltipSide, headerText, labels, column, }: RowActionsColumnOptions<T>): DataTableColumn<T>;
231
+ export declare function rowActionsColumn<T>({ key, actions, name, collapse, size, glyphSize, tooltipSide, headerText, header, labels, column, }: RowActionsColumnOptions<T>): DataTableColumn<T>;
@@ -276,9 +276,14 @@ function InlineAction({
276
276
  }
277
277
  );
278
278
  }
279
- function RowActionsHeader({ text, labels }) {
279
+ function RowActionsHeader({
280
+ text,
281
+ labels,
282
+ hidden
283
+ }) {
280
284
  const resolved = useKitLabels("rowActions", DEFAULT_ROW_ACTIONS_LABELS, labels);
281
- return /* @__PURE__ */ jsx("span", { className: "sr-only", children: text ?? resolved.actions });
285
+ const word = text ?? resolved.actions;
286
+ return hidden ? /* @__PURE__ */ jsx("span", { className: "sr-only", children: word }) : /* @__PURE__ */ jsx(Fragment, { children: word });
282
287
  }
283
288
  function rowActionsColumn({
284
289
  key = "actions",
@@ -289,12 +294,13 @@ function rowActionsColumn({
289
294
  glyphSize,
290
295
  tooltipSide,
291
296
  headerText,
297
+ header,
292
298
  labels,
293
299
  column
294
300
  }) {
295
301
  return {
296
302
  key,
297
- header: /* @__PURE__ */ jsx(RowActionsHeader, { text: headerText, labels }),
303
+ header: header === false || header == null ? /* @__PURE__ */ jsx(RowActionsHeader, { text: headerText, labels, hidden: header === false }) : header,
298
304
  headerText,
299
305
  cell: (row) => /* @__PURE__ */ jsx(
300
306
  RowActions,
@@ -309,7 +315,8 @@ function rowActionsColumn({
309
315
  }
310
316
  ),
311
317
  className: "w-px whitespace-nowrap text-end",
312
- headClassName: "w-px",
318
+ // The heading over the buttons, at the row's end (0.46.1).
319
+ headClassName: "w-px text-end",
313
320
  noRowLink: true,
314
321
  ...column
315
322
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/row-actions.tsx"],"sourcesContent":["import { isValidElement } from \"react\";\nimport type { KeyboardEvent, MouseEvent, ReactElement, ReactNode } from \"react\";\nimport { MoreHorizontal } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useLargeText } from \"../hooks/use-large-text\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { Popover } from \"./popover\";\nimport { Button } from \"./button\";\nimport { CompactControls } from \"./field-parts\";\nimport { IconButton } from \"./icon-button\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\nimport type { IconButtonGlyphSize, IconButtonSize } from \"./icon-button\";\nimport type { TooltipSide } from \"./tooltip\";\nimport type { DataTableColumn } from \"./data-table\";\nimport { DEFAULT_ROW_ACTIONS_LABELS } from \"./row-actions-labels\";\n\n/**\n * A row's actions — inline icons at Normal, one \"⋯\" menu at Large and above\n * (docs/text-size-harmonization.md §10.8).\n *\n * At Large an IconButton shows its label as text (§4). In a dense row — a register's\n * action column, a list row's end — every label at once does not fit: Kurvenschmiede\n * has 44 IconButtons in rows, kastlan 119. So a row's actions collapse instead, into\n * the menu the user roster has used since 0.31 (`UserRowActions`, now built on this):\n * one \"⋯\" button, and a menu with each action's icon AND words, where a locked one stays\n * listed and says why.\n *\n * The data is the roster's `UserRowActionList`, generalised: entries, and `false` /\n * `null` for the ones a condition left out (`row.locked || {…}`).\n *\n * 0.33 (§10.16): an action carries its state at both sizes — a toggle (`pressed`), a\n * disclosure (`expanded`, `controls`), a tone, a tour anchor (`dataTour`) — so a row\n * with an \"on\" share button or a tour step no longer keeps hand-rolled IconButtons at\n * Normal and this only at Large (keksdose k15).\n */\n\n/** An action's colour: IconButton's tone inline; in the menu the glyph takes it and the\n * words keep the text colour, except `danger`, whose words are the danger text. */\nexport type RowActionTone = \"default\" | \"muted\" | \"info\" | \"warning\" | \"danger\";\n\n/** One action of a row. */\nexport interface RowAction {\n /** React key. Default: the label. */\n key?: string;\n /** The action's name: the inline icon's name and tooltip, the menu entry's words. */\n label: string;\n /**\n * Runs it. The kit sends nothing — the app opens its confirmation or calls its API.\n * Optional only beside `href`; an action has one or the other (or both: `onSelect`\n * then runs as the link is followed).\n */\n onSelect?: () => void;\n /**\n * The action NAVIGATES — an edit page, a mail to compose (0.32.1, kastlan's 0.32\n * report): a real link inline and in the menu, so open in a new tab, a middle click\n * and the URL on hover work, which `onSelect` + `navigate` lost. The kit's link rule\n * applies ({@link Button}'s `href`): in-app through the provider's `linkComponent`, an\n * external or `#anchor` one a plain `<a>`, `mailto:` included.\n *\n * A link cannot carry a reason or a spinner, so an action with a `disabledReason`\n * (or under a write lock, with `commit`) or `pending` stays a button and says why.\n */\n href?: string;\n /** With `href`: leaves the app — a new tab, and a screen reader is told so. */\n external?: boolean;\n /**\n * The glyph: a Lucide icon (`Pencil`), or an element (`<Pencil />`, an app's own\n * svg) — DataTable's `rowActions` hand their `icon` node through. Inline, an action\n * without one is a small text button; in the menu it is the words alone.\n */\n icon?: LucideIcon | ReactElement;\n /**\n * `danger` for delete, revoke, erase: the quiet red of IconButton's `tone=\"danger\"`\n * inline, the danger text tone in the menu. `muted` (an open or add that should not\n * compete), `info` (a notice-worthy, harmless action: keksdose's reconcile) and\n * `warning` (a flag that wants attention): IconButton's tone inline; in the menu the\n * glyph takes it and the words keep the text colour, so `muted` looks like `default`\n * there (0.33).\n */\n tone?: RowActionTone;\n /** Why it is not available for this row. It stays listed, focusable, and says so — an\n * action that silently vanished would leave the reader looking for it. */\n disabledReason?: ReactNode;\n /**\n * This action COMMITS — it saves, sends, deletes: under a locked\n * {@link WriteLockProvider} it is refused with the lock's reason, as {@link Button}'s\n * `commit` is, inline and in the menu alike. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /**\n * In flight — the request it started has not answered. Inline, the icon turns into\n * IconButton's spinner (`pending`); collapsed, the \"⋯\" button does, since the menu\n * closed when the action was chosen. Either way nothing in the row can be pressed again\n * until it settles: the \"⋯\" opens no menu while busy.\n */\n pending?: boolean;\n /**\n * Not available for a moment, with nothing to explain — another action of the list\n * is in flight (an admin panel's `busy`). The plain `disabled`; a lasting refusal is a\n * `disabledReason`, which says why.\n */\n disabled?: boolean;\n /** Leave it out for this row. */\n hidden?: boolean;\n /**\n * A toggle (0.33): `aria-pressed` and IconButton's \"on\" look inline, `aria-pressed` on\n * the menu entry. Keep the label the same in both states (\"Share budget\"): the pressed\n * state already says whether it is on. Not on an `href` action — a link is not a\n * toggle — nor with `expanded`.\n */\n pressed?: boolean;\n /**\n * Opens or closes something IN THE PAGE (0.33) — a share card under the row, an\n * add-category row: `aria-expanded`, inline and on the menu entry. Not with `pressed`:\n * a disclosure says open, not on. Not on an `href` action.\n */\n expanded?: boolean;\n /** The `id` of what `expanded` opens: `aria-controls`, inline and on the menu entry. */\n controls?: string;\n /**\n * A tour anchor (0.33, §10.18): `data-tour` on ONE element per action at a time.\n * Inline, on the action's own control (the IconButton, the small text button, the\n * link). Collapsed, on an `aria-hidden` box laid over the \"⋯\" button — `[data-tour=x]`\n * resolves to a box the size of the \"⋯\", whose `data-slot=\"row-actions\"` box holds the\n * button, two anchored actions in one row don't fight over one attribute, and a tap\n * still reaches the button. Never on the entry in the open menu: the kit's tour takes\n * the first visible match and the menu is portalled after the row, so a copy there\n * would never be found, only make the selector match twice. The kit's name for it, as\n * `AppShellNavItem.dataTour`.\n */\n dataTour?: string;\n}\n\n/** What a row's actions may be: entries, and `false` / `null` / `undefined` for the ones\n * a condition left out. */\nexport type RowActionList = readonly (RowAction | false | null | undefined)[];\n\nexport interface RowActionsLabels {\n /** The menu button's name when the row has no name of its own; also the actions\n * column's (hidden) header in {@link rowActionsColumn}. */\n actions: string;\n /** The menu button's name, given the row's: \"Actions for Ada Example\". */\n actionsFor: (name: string) => string;\n}\n\n// Defined in ./row-actions-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_ROW_ACTIONS_LABELS };\n\n/**\n * - `\"auto\"` (default): the icons inline at Normal; the \"⋯\" menu at Large and Extra\n * large once there are two or more (§10.8). A single action stays inline at every\n * size, with its label as text at Large — one label fits a row, and a menu of one is\n * a detour.\n * - `\"menu\"`: the menu at every size — the roster's choice, whose actions grow (§2.4\n * there) and do not fit a phone card as a strip.\n * - `\"inline\"`: the icons at every size — for a row the app knows has room; at Large\n * each then shows its label (IconButton's `labelVisible`).\n */\nexport type RowActionsCollapse = \"auto\" | \"menu\" | \"inline\";\n\n/** The sizes a row action comes in: IconButton's row steps. `2xs` is DataTable's\n * compact density. At Large every one is at least a 48 px target (IconButton). */\nexport type RowActionsSize = Extract<IconButtonSize, \"md\" | \"sm\" | \"xs\" | \"2xs\">;\n\nexport interface RowActionsProps {\n actions: RowActionList;\n /** The row's name, for the menu button's name — \"Actions for Ada Example\". Without it\n * (or `null`, as API fields often are) the button is \"Actions\". */\n name?: string | null;\n /** When the actions collapse into the menu — see {@link RowActionsCollapse}. */\n collapse?: RowActionsCollapse;\n /** The inline icons' and the \"⋯\" button's size. Default `xs`, a list row's action. */\n size?: RowActionsSize;\n /** The menu's width. Default `\"15rem\"`, in rem so it grows with the words (§3.2). */\n menuWidth?: `${number}rem`;\n /** On the wrapper: the inline strip, or the box round the \"⋯\" button. */\n className?: string;\n /** The inline glyphs' size, IconButton's `glyphSize` — e.g. 14 in a dense header strip\n * (keksdose's category group header). The \"⋯\" button keeps its box's own. */\n glyphSize?: IconButtonGlyphSize;\n /** The inline tooltips' side, IconButton's `tooltipSide` — `\"start\"` for a table's last\n * column, so a bubble does not run off the row's end. Per row: every inline action. */\n tooltipSide?: TooltipSide;\n labels?: LabelOverride<RowActionsLabels>;\n}\n\nfunction visibleActions(actions: RowActionList): RowAction[] {\n return actions.filter((a): a is RowAction => Boolean(a) && !(a as RowAction).hidden);\n}\n\n/** An action's glyph as a node: a component is rendered, an element is used as is. */\nfunction glyphOf(icon: RowAction[\"icon\"]): ReactNode {\n if (icon === undefined) return null;\n if (isValidElement(icon)) return icon;\n const Icon = icon as LucideIcon;\n return <Icon />;\n}\n\n/** The menu glyph's tint per tone (0.33): the words keep the text colour, so the glyph\n * carries `info` and `warning` — IconButton's toned colours. `danger` colours the words\n * through Button's tone, and `muted` is the default look in a menu. */\nconst MENU_GLYPH_TONE: Partial<Record<RowActionTone, string>> = {\n info: \"text-info\",\n warning: \"text-warning\",\n};\n\n/** The state an action's control says, inline and in the menu alike: `aria-expanded` and\n * `aria-controls` for a disclosure (a toggle's `aria-pressed` goes through the button's\n * own `pressed`, which also draws the \"on\" look). */\nfunction stateAttrs(action: RowAction) {\n return {\n \"aria-expanded\": action.expanded,\n \"aria-controls\": action.expanded === undefined ? undefined : action.controls,\n };\n}\n\n/** An action's tone on its inline control, for a caller's CSS and a test: `data-tone`,\n * left off for the default look. */\nfunction toneAttr(tone: RowActionTone | undefined) {\n return { \"data-tone\": tone === undefined || tone === \"default\" ? undefined : tone };\n}\n\n/**\n * A row's actions, inline or as a \"⋯\" menu — see {@link RowActionsCollapse}. Every\n * control stops its click (and the Enter/Space it stands for) from reaching the row, so\n * a clickable row or a DataTable `rowLink` does not open as well; in a DataTable column\n * also set `noRowLink: true`, as {@link rowActionsColumn} does.\n *\n * Inline, the icons sit in a {@link CompactControls} region at Normal: their labels\n * stay the names and the tooltips, and a locked one keeps its reason in the tooltip — a\n * line under one icon of a row would break the row. In the menu a locked action's\n * reason is a line under its words at Large and on touch (Button's\n * `disabledReasonDisplay`).\n *\n * The menu is portalled, so a table's scroller cannot clip it; Escape and an outside\n * press close it, and focus goes back to the \"⋯\" button, which is where a confirmation\n * dialog then returns it.\n */\nexport function RowActions({\n actions,\n name,\n collapse = \"auto\",\n size = \"xs\",\n menuWidth = \"15rem\",\n className,\n glyphSize,\n tooltipSide,\n labels: labelsProp,\n}: RowActionsProps) {\n const labels = useKitLabels(\"rowActions\", DEFAULT_ROW_ACTIONS_LABELS, labelsProp);\n const large = useLargeText();\n const entries = visibleActions(actions);\n if (entries.length === 0) return null;\n const asMenu = collapse === \"menu\" || (collapse === \"auto\" && large && entries.length > 1);\n if (!asMenu) {\n const strip = (\n <div data-slot=\"row-actions\" className={cn(\"inline-flex items-center gap-0.5\", className)}>\n {entries.map((action) => (\n <InlineAction\n key={action.key ?? action.label}\n action={action}\n size={size}\n glyphSize={glyphSize}\n tooltipSide={tooltipSide}\n />\n ))}\n </div>\n );\n // Compact at Normal (no room for a reason line in a row); at Large an inline action\n // is the app's choice (\"inline\") or the row's only one, and shows its words.\n return large ? strip : <CompactControls>{strip}</CompactControls>;\n }\n const title = name ? labels.actionsFor(name) : labels.actions;\n // The menu closed when the action was chosen, so what is in flight shows on \"⋯\".\n const busy = entries.some((action) => action.pending);\n const anchored = entries.filter((action) => action.dataTour);\n return (\n // The \"⋯\" in a box of its own, the inline strip's slot: the tour anchors of the\n // collapsed actions lie over the button in it (see `dataTour`), and `className`\n // places the box as it places the strip.\n <div data-slot=\"row-actions\" className={cn(\"relative inline-flex\", className)}>\n <Popover\n width={menuWidth}\n aria-label={title}\n className=\"p-1\"\n trigger={({ open, toggle, ref }) => (\n <IconButton\n ref={ref}\n size={size}\n label={title}\n // \"⋯\" is read by everyone as \"more actions\"; the menu it opens is the words.\n labelVisible={false}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n pending={busy}\n stopPropagation\n onClick={toggle}\n >\n <MoreHorizontal />\n </IconButton>\n )}\n // React carries an event out of a portal along the COMPONENT tree, so a click in\n // the menu reached a clickable row or a DataTable `onRowClick` the menu was opened\n // from, though the panel is nowhere near it in the page — only the \"⋯\" trigger\n // stopped its own (keksdose's 0.32 report). Stopped on the PANEL itself, its padding\n // and border included (0.32.2: 0.32.1 stopped it on an inner box, and a click on\n // the panel's `p-1` still went through): clicks, and the Enter / Space a row also\n // listens for. Escape goes on, to the popover's own handler that closes it.\n onClick={stopClick}\n onKeyDown={stopActivationKeys}\n >\n {(close) => (\n <ul data-slot=\"row-actions-menu\" className=\"space-y-0.5\">\n {entries.map((action) => (\n <li key={action.key ?? action.label}>\n <MenuAction action={action} close={close} />\n </li>\n ))}\n </ul>\n )}\n </Popover>\n {anchored.map((action) => (\n // The More cell's TourAnchor: decoration over the button, which keeps every tap.\n <span\n key={action.key ?? action.label}\n aria-hidden\n data-tour={action.dataTour}\n className=\"pointer-events-none absolute inset-0\"\n />\n ))}\n </div>\n );\n}\n\nfunction stopClick(e: MouseEvent) {\n e.stopPropagation();\n}\n\nfunction stopActivationKeys(e: KeyboardEvent) {\n if (e.key === \"Enter\" || e.key === \" \") e.stopPropagation();\n}\n\n/**\n * The `href` an action renders as a link with, or `undefined` for a button: a link\n * cannot carry a reason or a spinner (Button's link form has neither), so a refused\n * action — its own `disabledReason`, or a write lock on a `commit` — and a pending one\n * stay buttons and say so.\n */\nfunction useActionHref(action: RowAction): string | undefined {\n const reason = useCommitReason(action.commit, action.disabledReason);\n const refused = reason !== undefined && reason !== null && reason !== false && reason !== \"\";\n return action.href !== undefined && !action.pending && !refused ? action.href : undefined;\n}\n\n/** One entry of the \"⋯\" menu: the words, as a link for an `href`, else a button. */\nfunction MenuAction({ action, close }: { action: RowAction; close: () => void }) {\n const href = useActionHref(action);\n const glyph = glyphOf(action.icon);\n const glyphTone = action.tone === undefined ? undefined : MENU_GLYPH_TONE[action.tone];\n const words = (\n <>\n {glyph && (\n <span\n aria-hidden\n data-tone={glyphTone ? action.tone : undefined}\n className={cn(\"flex shrink-0 [&_svg]:size-4\", glyphTone)}\n >\n {glyph}\n </span>\n )}\n {action.label}\n </>\n );\n const tone = action.tone === \"danger\" ? \"danger\" : undefined;\n const select = () => {\n close();\n action.onSelect?.();\n };\n if (href !== undefined) {\n return (\n <Button\n href={href}\n external={action.external}\n variant=\"ghost\"\n size=\"sm\"\n stretch\n tone={tone}\n disabled={action.disabled}\n className=\"w-full justify-start text-start\"\n onClick={select}\n >\n {words}\n </Button>\n );\n }\n return (\n <Button\n {...stateAttrs(action)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n stretch\n tone={tone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n className=\"w-full justify-start text-start\"\n onClick={select}\n >\n {words}\n </Button>\n );\n}\n\n/** One inline action: an IconButton with its icon, else a small text button — each a\n * link for an `href` (see {@link useActionHref}). The control carries the action's\n * state, its tone and its tour anchor. */\nfunction InlineAction({\n action,\n size,\n glyphSize,\n tooltipSide,\n}: {\n action: RowAction;\n size: RowActionsSize;\n glyphSize?: IconButtonGlyphSize;\n tooltipSide?: TooltipSide;\n}) {\n const href = useActionHref(action);\n const glyph = glyphOf(action.icon);\n const iconTone = action.tone === \"default\" ? undefined : action.tone;\n // A text button has Button's two tones; `info` and `warning` are a glyph's colours.\n const textTone = action.tone === \"danger\" || action.tone === \"muted\" ? action.tone : undefined;\n const marks = { \"data-tour\": action.dataTour, ...toneAttr(action.tone) };\n if (glyph) {\n if (href !== undefined) {\n return (\n <IconButton\n {...marks}\n href={href}\n external={action.external}\n size={size}\n glyphSize={glyphSize}\n label={action.label}\n tooltipSide={tooltipSide}\n tone={iconTone}\n disabled={action.disabled}\n stopPropagation\n onClick={() => action.onSelect?.()}\n >\n {glyph}\n </IconButton>\n );\n }\n return (\n <IconButton\n {...marks}\n {...stateAttrs(action)}\n size={size}\n glyphSize={glyphSize}\n label={action.label}\n tooltipSide={tooltipSide}\n tone={iconTone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n stopPropagation\n onClick={() => action.onSelect?.()}\n >\n {glyph}\n </IconButton>\n );\n }\n // A row listening for clicks must not open as well (IconButton's stopPropagation).\n const stop = {\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n action.onSelect?.();\n },\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") e.stopPropagation();\n },\n };\n if (href !== undefined) {\n return (\n <Button\n {...marks}\n href={href}\n external={action.external}\n variant=\"ghost\"\n size=\"sm\"\n tone={textTone}\n disabled={action.disabled}\n {...stop}\n >\n {action.label}\n </Button>\n );\n }\n return (\n <Button\n {...marks}\n {...stateAttrs(action)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n tone={textTone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n {...stop}\n >\n {action.label}\n </Button>\n );\n}\n\n/** The actions column's hidden header, in the provider's words. */\nfunction RowActionsHeader({ text, labels }: { text?: string; labels?: LabelOverride<RowActionsLabels> }) {\n const resolved = useKitLabels(\"rowActions\", DEFAULT_ROW_ACTIONS_LABELS, labels);\n return <span className=\"sr-only\">{text ?? resolved.actions}</span>;\n}\n\nexport interface RowActionsColumnOptions<T> {\n /** The column's key. Default `\"actions\"`. */\n key?: string;\n /** The row's actions — `false` / `null` for the ones a condition leaves out. */\n actions: (row: T) => RowActionList;\n /** The row's name, for the \"⋯\" button's name (\"Actions for Ada Example\"). `null` and\n * `undefined` both mean \"Actions\". */\n name?: (row: T) => string | null | undefined;\n collapse?: RowActionsCollapse;\n /** Default `xs`. */\n size?: RowActionsSize;\n /** See {@link RowActionsProps.glyphSize}. */\n glyphSize?: IconButtonGlyphSize;\n /** See {@link RowActionsProps.tooltipSide} — `\"start\"` in a table's last column. */\n tooltipSide?: TooltipSide;\n /**\n * The column's name as plain text — the column-settings checklist and the phone\n * card's label read it (`DataTableColumn.headerText`). Pass the app's own word; left\n * out, the header shows the provider's `rowActions.actions` to a screen reader and\n * the plain-text places fall back to the column's `key`.\n */\n headerText?: string;\n labels?: LabelOverride<RowActionsLabels>;\n /** Anything else for the column (`mobileHidden`, `cellProps`…), merged last. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A DataTable column of {@link RowActions} — an app's action column in one line\n * (§10.8): inline icons at Normal, the \"⋯\" menu at Large with two or more actions.\n *\n * columns={[...columns, rowActionsColumn({ actions: (r) => [...], name: (r) => r.name })]}\n *\n * The header is visually hidden (the icons say what the column is), the column hugs its\n * content at the row's end, and `noRowLink` keeps a `rowHref` anchor off it, so the\n * buttons keep their own clicks. On a phone it is a line of the card like any column;\n * set `column: { mobileHidden: true }` to drop it there (with `mobileDetailsInRow` it\n * then shows in the opened row instead).\n */\nexport function rowActionsColumn<T>({\n key = \"actions\",\n actions,\n name,\n collapse,\n size,\n glyphSize,\n tooltipSide,\n headerText,\n labels,\n column,\n}: RowActionsColumnOptions<T>): DataTableColumn<T> {\n return {\n key,\n header: <RowActionsHeader text={headerText} labels={labels} />,\n headerText,\n cell: (row) => (\n <RowActions\n actions={actions(row)}\n name={name?.(row)}\n collapse={collapse}\n size={size}\n glyphSize={glyphSize}\n tooltipSide={tooltipSide}\n labels={labels}\n />\n ),\n className: \"w-px whitespace-nowrap text-end\",\n headClassName: \"w-px\",\n noRowLink: true,\n ...column,\n };\n}\n"],"mappings":";AAoMS,SAqKL,UAr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AAS,QAAQ,GAAG;AAAA,QACpB,MAAM,OAAO,GAAG;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAEF,WAAW;AAAA,IACX,eAAe;AAAA,IACf,WAAW;AAAA,IACX,GAAG;AAAA,EACL;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/row-actions.tsx"],"sourcesContent":["import { isValidElement } from \"react\";\nimport type { KeyboardEvent, MouseEvent, ReactElement, ReactNode } from \"react\";\nimport { MoreHorizontal } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { cn } from \"../lib/cn\";\nimport { useLargeText } from \"../hooks/use-large-text\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { Popover } from \"./popover\";\nimport { Button } from \"./button\";\nimport { CompactControls } from \"./field-parts\";\nimport { IconButton } from \"./icon-button\";\nimport { useCommitReason, type CommitScope } from \"./write-lock\";\nimport type { IconButtonGlyphSize, IconButtonSize } from \"./icon-button\";\nimport type { TooltipSide } from \"./tooltip\";\nimport type { DataTableColumn } from \"./data-table\";\nimport { DEFAULT_ROW_ACTIONS_LABELS } from \"./row-actions-labels\";\n\n/**\n * A row's actions — inline icons at Normal, one \"⋯\" menu at Large and above\n * (docs/text-size-harmonization.md §10.8).\n *\n * At Large an IconButton shows its label as text (§4). In a dense row — a register's\n * action column, a list row's end — every label at once does not fit: Kurvenschmiede\n * has 44 IconButtons in rows, kastlan 119. So a row's actions collapse instead, into\n * the menu the user roster has used since 0.31 (`UserRowActions`, now built on this):\n * one \"⋯\" button, and a menu with each action's icon AND words, where a locked one stays\n * listed and says why.\n *\n * The data is the roster's `UserRowActionList`, generalised: entries, and `false` /\n * `null` for the ones a condition left out (`row.locked || {…}`).\n *\n * 0.33 (§10.16): an action carries its state at both sizes — a toggle (`pressed`), a\n * disclosure (`expanded`, `controls`), a tone, a tour anchor (`dataTour`) — so a row\n * with an \"on\" share button or a tour step no longer keeps hand-rolled IconButtons at\n * Normal and this only at Large (keksdose k15).\n */\n\n/** An action's colour: IconButton's tone inline; in the menu the glyph takes it and the\n * words keep the text colour, except `danger`, whose words are the danger text. */\nexport type RowActionTone = \"default\" | \"muted\" | \"info\" | \"warning\" | \"danger\";\n\n/** One action of a row. */\nexport interface RowAction {\n /** React key. Default: the label. */\n key?: string;\n /** The action's name: the inline icon's name and tooltip, the menu entry's words. */\n label: string;\n /**\n * Runs it. The kit sends nothing — the app opens its confirmation or calls its API.\n * Optional only beside `href`; an action has one or the other (or both: `onSelect`\n * then runs as the link is followed).\n */\n onSelect?: () => void;\n /**\n * The action NAVIGATES — an edit page, a mail to compose (0.32.1, kastlan's 0.32\n * report): a real link inline and in the menu, so open in a new tab, a middle click\n * and the URL on hover work, which `onSelect` + `navigate` lost. The kit's link rule\n * applies ({@link Button}'s `href`): in-app through the provider's `linkComponent`, an\n * external or `#anchor` one a plain `<a>`, `mailto:` included.\n *\n * A link cannot carry a reason or a spinner, so an action with a `disabledReason`\n * (or under a write lock, with `commit`) or `pending` stays a button and says why.\n */\n href?: string;\n /** With `href`: leaves the app — a new tab, and a screen reader is told so. */\n external?: boolean;\n /**\n * The glyph: a Lucide icon (`Pencil`), or an element (`<Pencil />`, an app's own\n * svg) — DataTable's `rowActions` hand their `icon` node through. Inline, an action\n * without one is a small text button; in the menu it is the words alone.\n */\n icon?: LucideIcon | ReactElement;\n /**\n * `danger` for delete, revoke, erase: the quiet red of IconButton's `tone=\"danger\"`\n * inline, the danger text tone in the menu. `muted` (an open or add that should not\n * compete), `info` (a notice-worthy, harmless action: keksdose's reconcile) and\n * `warning` (a flag that wants attention): IconButton's tone inline; in the menu the\n * glyph takes it and the words keep the text colour, so `muted` looks like `default`\n * there (0.33).\n */\n tone?: RowActionTone;\n /** Why it is not available for this row. It stays listed, focusable, and says so — an\n * action that silently vanished would leave the reader looking for it. */\n disabledReason?: ReactNode;\n /**\n * This action COMMITS — it saves, sends, deletes: under a locked\n * {@link WriteLockProvider} it is refused with the lock's reason, as {@link Button}'s\n * `commit` is, inline and in the menu alike. No provider, or an unlocked one: no effect.\n */\n commit?: CommitScope;\n /**\n * In flight — the request it started has not answered. Inline, the icon turns into\n * IconButton's spinner (`pending`); collapsed, the \"⋯\" button does, since the menu\n * closed when the action was chosen. Either way nothing in the row can be pressed again\n * until it settles: the \"⋯\" opens no menu while busy.\n */\n pending?: boolean;\n /**\n * Not available for a moment, with nothing to explain — another action of the list\n * is in flight (an admin panel's `busy`). The plain `disabled`; a lasting refusal is a\n * `disabledReason`, which says why.\n */\n disabled?: boolean;\n /** Leave it out for this row. */\n hidden?: boolean;\n /**\n * A toggle (0.33): `aria-pressed` and IconButton's \"on\" look inline, `aria-pressed` on\n * the menu entry. Keep the label the same in both states (\"Share budget\"): the pressed\n * state already says whether it is on. Not on an `href` action — a link is not a\n * toggle — nor with `expanded`.\n */\n pressed?: boolean;\n /**\n * Opens or closes something IN THE PAGE (0.33) — a share card under the row, an\n * add-category row: `aria-expanded`, inline and on the menu entry. Not with `pressed`:\n * a disclosure says open, not on. Not on an `href` action.\n */\n expanded?: boolean;\n /** The `id` of what `expanded` opens: `aria-controls`, inline and on the menu entry. */\n controls?: string;\n /**\n * A tour anchor (0.33, §10.18): `data-tour` on ONE element per action at a time.\n * Inline, on the action's own control (the IconButton, the small text button, the\n * link). Collapsed, on an `aria-hidden` box laid over the \"⋯\" button — `[data-tour=x]`\n * resolves to a box the size of the \"⋯\", whose `data-slot=\"row-actions\"` box holds the\n * button, two anchored actions in one row don't fight over one attribute, and a tap\n * still reaches the button. Never on the entry in the open menu: the kit's tour takes\n * the first visible match and the menu is portalled after the row, so a copy there\n * would never be found, only make the selector match twice. The kit's name for it, as\n * `AppShellNavItem.dataTour`.\n */\n dataTour?: string;\n}\n\n/** What a row's actions may be: entries, and `false` / `null` / `undefined` for the ones\n * a condition left out. */\nexport type RowActionList = readonly (RowAction | false | null | undefined)[];\n\nexport interface RowActionsLabels {\n /** The menu button's name when the row has no name of its own; also the actions\n * column's (hidden) header in {@link rowActionsColumn}. */\n actions: string;\n /** The menu button's name, given the row's: \"Actions for Ada Example\". */\n actionsFor: (name: string) => string;\n}\n\n// Defined in ./row-actions-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_ROW_ACTIONS_LABELS };\n\n/**\n * - `\"auto\"` (default): the icons inline at Normal; the \"⋯\" menu at Large and Extra\n * large once there are two or more (§10.8). A single action stays inline at every\n * size, with its label as text at Large — one label fits a row, and a menu of one is\n * a detour.\n * - `\"menu\"`: the menu at every size — the roster's choice, whose actions grow (§2.4\n * there) and do not fit a phone card as a strip.\n * - `\"inline\"`: the icons at every size — for a row the app knows has room; at Large\n * each then shows its label (IconButton's `labelVisible`).\n */\nexport type RowActionsCollapse = \"auto\" | \"menu\" | \"inline\";\n\n/** The sizes a row action comes in: IconButton's row steps. `2xs` is DataTable's\n * compact density. At Large every one is at least a 48 px target (IconButton). */\nexport type RowActionsSize = Extract<IconButtonSize, \"md\" | \"sm\" | \"xs\" | \"2xs\">;\n\nexport interface RowActionsProps {\n actions: RowActionList;\n /** The row's name, for the menu button's name — \"Actions for Ada Example\". Without it\n * (or `null`, as API fields often are) the button is \"Actions\". */\n name?: string | null;\n /** When the actions collapse into the menu — see {@link RowActionsCollapse}. */\n collapse?: RowActionsCollapse;\n /** The inline icons' and the \"⋯\" button's size. Default `xs`, a list row's action. */\n size?: RowActionsSize;\n /** The menu's width. Default `\"15rem\"`, in rem so it grows with the words (§3.2). */\n menuWidth?: `${number}rem`;\n /** On the wrapper: the inline strip, or the box round the \"⋯\" button. */\n className?: string;\n /** The inline glyphs' size, IconButton's `glyphSize` — e.g. 14 in a dense header strip\n * (keksdose's category group header). The \"⋯\" button keeps its box's own. */\n glyphSize?: IconButtonGlyphSize;\n /** The inline tooltips' side, IconButton's `tooltipSide` — `\"start\"` for a table's last\n * column, so a bubble does not run off the row's end. Per row: every inline action. */\n tooltipSide?: TooltipSide;\n labels?: LabelOverride<RowActionsLabels>;\n}\n\nfunction visibleActions(actions: RowActionList): RowAction[] {\n return actions.filter((a): a is RowAction => Boolean(a) && !(a as RowAction).hidden);\n}\n\n/** An action's glyph as a node: a component is rendered, an element is used as is. */\nfunction glyphOf(icon: RowAction[\"icon\"]): ReactNode {\n if (icon === undefined) return null;\n if (isValidElement(icon)) return icon;\n const Icon = icon as LucideIcon;\n return <Icon />;\n}\n\n/** The menu glyph's tint per tone (0.33): the words keep the text colour, so the glyph\n * carries `info` and `warning` — IconButton's toned colours. `danger` colours the words\n * through Button's tone, and `muted` is the default look in a menu. */\nconst MENU_GLYPH_TONE: Partial<Record<RowActionTone, string>> = {\n info: \"text-info\",\n warning: \"text-warning\",\n};\n\n/** The state an action's control says, inline and in the menu alike: `aria-expanded` and\n * `aria-controls` for a disclosure (a toggle's `aria-pressed` goes through the button's\n * own `pressed`, which also draws the \"on\" look). */\nfunction stateAttrs(action: RowAction) {\n return {\n \"aria-expanded\": action.expanded,\n \"aria-controls\": action.expanded === undefined ? undefined : action.controls,\n };\n}\n\n/** An action's tone on its inline control, for a caller's CSS and a test: `data-tone`,\n * left off for the default look. */\nfunction toneAttr(tone: RowActionTone | undefined) {\n return { \"data-tone\": tone === undefined || tone === \"default\" ? undefined : tone };\n}\n\n/**\n * A row's actions, inline or as a \"⋯\" menu — see {@link RowActionsCollapse}. Every\n * control stops its click (and the Enter/Space it stands for) from reaching the row, so\n * a clickable row or a DataTable `rowLink` does not open as well; in a DataTable column\n * also set `noRowLink: true`, as {@link rowActionsColumn} does.\n *\n * Inline, the icons sit in a {@link CompactControls} region at Normal: their labels\n * stay the names and the tooltips, and a locked one keeps its reason in the tooltip — a\n * line under one icon of a row would break the row. In the menu a locked action's\n * reason is a line under its words at Large and on touch (Button's\n * `disabledReasonDisplay`).\n *\n * The menu is portalled, so a table's scroller cannot clip it; Escape and an outside\n * press close it, and focus goes back to the \"⋯\" button, which is where a confirmation\n * dialog then returns it.\n */\nexport function RowActions({\n actions,\n name,\n collapse = \"auto\",\n size = \"xs\",\n menuWidth = \"15rem\",\n className,\n glyphSize,\n tooltipSide,\n labels: labelsProp,\n}: RowActionsProps) {\n const labels = useKitLabels(\"rowActions\", DEFAULT_ROW_ACTIONS_LABELS, labelsProp);\n const large = useLargeText();\n const entries = visibleActions(actions);\n if (entries.length === 0) return null;\n const asMenu = collapse === \"menu\" || (collapse === \"auto\" && large && entries.length > 1);\n if (!asMenu) {\n const strip = (\n <div data-slot=\"row-actions\" className={cn(\"inline-flex items-center gap-0.5\", className)}>\n {entries.map((action) => (\n <InlineAction\n key={action.key ?? action.label}\n action={action}\n size={size}\n glyphSize={glyphSize}\n tooltipSide={tooltipSide}\n />\n ))}\n </div>\n );\n // Compact at Normal (no room for a reason line in a row); at Large an inline action\n // is the app's choice (\"inline\") or the row's only one, and shows its words.\n return large ? strip : <CompactControls>{strip}</CompactControls>;\n }\n const title = name ? labels.actionsFor(name) : labels.actions;\n // The menu closed when the action was chosen, so what is in flight shows on \"⋯\".\n const busy = entries.some((action) => action.pending);\n const anchored = entries.filter((action) => action.dataTour);\n return (\n // The \"⋯\" in a box of its own, the inline strip's slot: the tour anchors of the\n // collapsed actions lie over the button in it (see `dataTour`), and `className`\n // places the box as it places the strip.\n <div data-slot=\"row-actions\" className={cn(\"relative inline-flex\", className)}>\n <Popover\n width={menuWidth}\n aria-label={title}\n className=\"p-1\"\n trigger={({ open, toggle, ref }) => (\n <IconButton\n ref={ref}\n size={size}\n label={title}\n // \"⋯\" is read by everyone as \"more actions\"; the menu it opens is the words.\n labelVisible={false}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n pending={busy}\n stopPropagation\n onClick={toggle}\n >\n <MoreHorizontal />\n </IconButton>\n )}\n // React carries an event out of a portal along the COMPONENT tree, so a click in\n // the menu reached a clickable row or a DataTable `onRowClick` the menu was opened\n // from, though the panel is nowhere near it in the page — only the \"⋯\" trigger\n // stopped its own (keksdose's 0.32 report). Stopped on the PANEL itself, its padding\n // and border included (0.32.2: 0.32.1 stopped it on an inner box, and a click on\n // the panel's `p-1` still went through): clicks, and the Enter / Space a row also\n // listens for. Escape goes on, to the popover's own handler that closes it.\n onClick={stopClick}\n onKeyDown={stopActivationKeys}\n >\n {(close) => (\n <ul data-slot=\"row-actions-menu\" className=\"space-y-0.5\">\n {entries.map((action) => (\n <li key={action.key ?? action.label}>\n <MenuAction action={action} close={close} />\n </li>\n ))}\n </ul>\n )}\n </Popover>\n {anchored.map((action) => (\n // The More cell's TourAnchor: decoration over the button, which keeps every tap.\n <span\n key={action.key ?? action.label}\n aria-hidden\n data-tour={action.dataTour}\n className=\"pointer-events-none absolute inset-0\"\n />\n ))}\n </div>\n );\n}\n\nfunction stopClick(e: MouseEvent) {\n e.stopPropagation();\n}\n\nfunction stopActivationKeys(e: KeyboardEvent) {\n if (e.key === \"Enter\" || e.key === \" \") e.stopPropagation();\n}\n\n/**\n * The `href` an action renders as a link with, or `undefined` for a button: a link\n * cannot carry a reason or a spinner (Button's link form has neither), so a refused\n * action — its own `disabledReason`, or a write lock on a `commit` — and a pending one\n * stay buttons and say so.\n */\nfunction useActionHref(action: RowAction): string | undefined {\n const reason = useCommitReason(action.commit, action.disabledReason);\n const refused = reason !== undefined && reason !== null && reason !== false && reason !== \"\";\n return action.href !== undefined && !action.pending && !refused ? action.href : undefined;\n}\n\n/** One entry of the \"⋯\" menu: the words, as a link for an `href`, else a button. */\nfunction MenuAction({ action, close }: { action: RowAction; close: () => void }) {\n const href = useActionHref(action);\n const glyph = glyphOf(action.icon);\n const glyphTone = action.tone === undefined ? undefined : MENU_GLYPH_TONE[action.tone];\n const words = (\n <>\n {glyph && (\n <span\n aria-hidden\n data-tone={glyphTone ? action.tone : undefined}\n className={cn(\"flex shrink-0 [&_svg]:size-4\", glyphTone)}\n >\n {glyph}\n </span>\n )}\n {action.label}\n </>\n );\n const tone = action.tone === \"danger\" ? \"danger\" : undefined;\n const select = () => {\n close();\n action.onSelect?.();\n };\n if (href !== undefined) {\n return (\n <Button\n href={href}\n external={action.external}\n variant=\"ghost\"\n size=\"sm\"\n stretch\n tone={tone}\n disabled={action.disabled}\n className=\"w-full justify-start text-start\"\n onClick={select}\n >\n {words}\n </Button>\n );\n }\n return (\n <Button\n {...stateAttrs(action)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n stretch\n tone={tone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n className=\"w-full justify-start text-start\"\n onClick={select}\n >\n {words}\n </Button>\n );\n}\n\n/** One inline action: an IconButton with its icon, else a small text button — each a\n * link for an `href` (see {@link useActionHref}). The control carries the action's\n * state, its tone and its tour anchor. */\nfunction InlineAction({\n action,\n size,\n glyphSize,\n tooltipSide,\n}: {\n action: RowAction;\n size: RowActionsSize;\n glyphSize?: IconButtonGlyphSize;\n tooltipSide?: TooltipSide;\n}) {\n const href = useActionHref(action);\n const glyph = glyphOf(action.icon);\n const iconTone = action.tone === \"default\" ? undefined : action.tone;\n // A text button has Button's two tones; `info` and `warning` are a glyph's colours.\n const textTone = action.tone === \"danger\" || action.tone === \"muted\" ? action.tone : undefined;\n const marks = { \"data-tour\": action.dataTour, ...toneAttr(action.tone) };\n if (glyph) {\n if (href !== undefined) {\n return (\n <IconButton\n {...marks}\n href={href}\n external={action.external}\n size={size}\n glyphSize={glyphSize}\n label={action.label}\n tooltipSide={tooltipSide}\n tone={iconTone}\n disabled={action.disabled}\n stopPropagation\n onClick={() => action.onSelect?.()}\n >\n {glyph}\n </IconButton>\n );\n }\n return (\n <IconButton\n {...marks}\n {...stateAttrs(action)}\n size={size}\n glyphSize={glyphSize}\n label={action.label}\n tooltipSide={tooltipSide}\n tone={iconTone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n stopPropagation\n onClick={() => action.onSelect?.()}\n >\n {glyph}\n </IconButton>\n );\n }\n // A row listening for clicks must not open as well (IconButton's stopPropagation).\n const stop = {\n onClick: (e: MouseEvent) => {\n e.stopPropagation();\n action.onSelect?.();\n },\n onKeyDown: (e: KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") e.stopPropagation();\n },\n };\n if (href !== undefined) {\n return (\n <Button\n {...marks}\n href={href}\n external={action.external}\n variant=\"ghost\"\n size=\"sm\"\n tone={textTone}\n disabled={action.disabled}\n {...stop}\n >\n {action.label}\n </Button>\n );\n }\n return (\n <Button\n {...marks}\n {...stateAttrs(action)}\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n tone={textTone}\n pressed={action.pressed}\n disabledReason={action.disabledReason}\n commit={action.commit}\n pending={action.pending}\n disabled={action.disabled}\n {...stop}\n >\n {action.label}\n </Button>\n );\n}\n\n/** The actions column's heading, in the provider's words: on screen since 0.46.1 (keksdose\n * dev#598 rework), a screen reader's name only with `hidden`. */\nfunction RowActionsHeader({\n text,\n labels,\n hidden,\n}: {\n text?: string;\n labels?: LabelOverride<RowActionsLabels>;\n hidden?: boolean;\n}) {\n const resolved = useKitLabels(\"rowActions\", DEFAULT_ROW_ACTIONS_LABELS, labels);\n const word = text ?? resolved.actions;\n return hidden ? <span className=\"sr-only\">{word}</span> : <>{word}</>;\n}\n\nexport interface RowActionsColumnOptions<T> {\n /** The column's key. Default `\"actions\"`. */\n key?: string;\n /** The row's actions — `false` / `null` for the ones a condition leaves out. */\n actions: (row: T) => RowActionList;\n /** The row's name, for the \"⋯\" button's name (\"Actions for Ada Example\"). `null` and\n * `undefined` both mean \"Actions\". */\n name?: (row: T) => string | null | undefined;\n collapse?: RowActionsCollapse;\n /** Default `xs`. */\n size?: RowActionsSize;\n /** See {@link RowActionsProps.glyphSize}. */\n glyphSize?: IconButtonGlyphSize;\n /** See {@link RowActionsProps.tooltipSide} — `\"start\"` in a table's last column. */\n tooltipSide?: TooltipSide;\n /**\n * The column's name as plain text — the column-settings checklist and the phone\n * card's label read it (`DataTableColumn.headerText`). Pass the app's own word; left\n * out, the heading shows the provider's `rowActions.actions` and the plain-text\n * places fall back to the column's `key`.\n */\n headerText?: string;\n /**\n * The heading (0.46.1, keksdose dev#598 rework — Marcel: a VISIBLE \"Actions\" heading on\n * every table with an actions column). Default: `headerText`, else the provider's\n * `rowActions.actions` (\"Actions\"), shown, end-aligned over the buttons. A node\n * replaces it; `false` keeps the pre-0.46.1 heading, named for a screen reader only.\n */\n header?: ReactNode | false;\n labels?: LabelOverride<RowActionsLabels>;\n /** Anything else for the column (`mobileHidden`, `cellProps`…), merged last. */\n column?: Partial<DataTableColumn<T>>;\n}\n\n/**\n * A DataTable column of {@link RowActions} — an app's action column in one line\n * (§10.8): inline icons at Normal, the \"⋯\" menu at Large with two or more actions.\n *\n * columns={[...columns, rowActionsColumn({ actions: (r) => [...], name: (r) => r.name })]}\n *\n * The heading says \"Actions\" on screen (0.46.1; `header` changes or hides it), the\n * column hugs its content at the row's end, and `noRowLink` keeps a `rowHref` anchor off it, so the\n * buttons keep their own clicks. On a phone it is a line of the card like any column;\n * set `column: { mobileHidden: true }` to drop it there (with `mobileDetailsInRow` it\n * then shows in the opened row instead).\n */\nexport function rowActionsColumn<T>({\n key = \"actions\",\n actions,\n name,\n collapse,\n size,\n glyphSize,\n tooltipSide,\n headerText,\n header,\n labels,\n column,\n}: RowActionsColumnOptions<T>): DataTableColumn<T> {\n return {\n key,\n header:\n header === false || header == null ? (\n <RowActionsHeader text={headerText} labels={labels} hidden={header === false} />\n ) : (\n header\n ),\n headerText,\n cell: (row) => (\n <RowActions\n actions={actions(row)}\n name={name?.(row)}\n collapse={collapse}\n size={size}\n glyphSize={glyphSize}\n tooltipSide={tooltipSide}\n labels={labels}\n />\n ),\n className: \"w-px whitespace-nowrap text-end\",\n // The heading over the buttons, at the row's end (0.46.1).\n headClassName: \"w-px text-end\",\n noRowLink: true,\n ...column,\n };\n}\n"],"mappings":";AAoMS,SAqKL,UArKK,KAqFL,YArFK;AApMT,SAAS,sBAAsB;AAE/B,SAAS,sBAAsB;AAE/B,SAAS,UAAU;AACnB,SAAS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L;AAAA,MAAC;AAAA;AAAA,QACC,SAAS,QAAQ,GAAG;AAAA,QACpB,MAAM,OAAO,GAAG;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,IACF;AAAA,IAEF,WAAW;AAAA;AAAA,IAEX,eAAe;AAAA,IACf,WAAW;AAAA,IACX,GAAG;AAAA,EACL;AACF;","names":[]}
@@ -375,7 +375,9 @@ function TranslationReviewPanel({
375
375
  } else if (editable) {
376
376
  columns.push({
377
377
  key: "approve",
378
- header: /* @__PURE__ */ jsx("span", { className: "sr-only", children: labels.approve }),
378
+ // On screen, as every actions column's heading is (0.46.1, keksdose dev#598 rework).
379
+ header: rowActionLabels.actions,
380
+ headerText: rowActionLabels.actions,
379
381
  cell: (r) => r.status === "approved" || r.text === "" ? null : /* @__PURE__ */ jsx(
380
382
  IconButton,
381
383
  {