@alepha/ui 0.39.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/README.md +4 -2
  2. package/dist/admin/AdminJobExecutionSheet.d.ts.map +1 -1
  3. package/dist/admin/AdminJobExecutionSheet.js +7 -0
  4. package/dist/admin/AdminJobExecutionSheet.js.map +1 -1
  5. package/dist/admin/analytics/RequestDialog.js +1 -1
  6. package/dist/admin/analytics/RequestDialog.js.map +1 -1
  7. package/dist/ai/AiChat.d.ts +6 -3
  8. package/dist/ai/AiChat.d.ts.map +1 -1
  9. package/dist/ai/AiChat.js +34 -5
  10. package/dist/ai/AiChat.js.map +1 -1
  11. package/dist/ai/AiChatConfirmCard.d.ts.map +1 -1
  12. package/dist/ai/AiChatConfirmCard.js +5 -1
  13. package/dist/ai/AiChatConfirmCard.js.map +1 -1
  14. package/dist/ai/AiChatFloat.d.ts +14 -0
  15. package/dist/ai/AiChatFloat.d.ts.map +1 -0
  16. package/dist/ai/AiChatFloat.js +30 -0
  17. package/dist/ai/AiChatFloat.js.map +1 -0
  18. package/dist/ai/AiChatMessage.js +2 -2
  19. package/dist/ai/AiChatMessage.js.map +1 -1
  20. package/dist/ai/AiChatPanel.d.ts +19 -0
  21. package/dist/ai/AiChatPanel.d.ts.map +1 -1
  22. package/dist/ai/AiChatPanel.js +65 -19
  23. package/dist/ai/AiChatPanel.js.map +1 -1
  24. package/dist/ai/AiChatToolStepDetails.d.ts +14 -0
  25. package/dist/ai/AiChatToolStepDetails.d.ts.map +1 -0
  26. package/dist/ai/AiChatToolStepDetails.js +34 -0
  27. package/dist/ai/AiChatToolStepDetails.js.map +1 -0
  28. package/dist/ai/AiChatToolTrace.d.ts +50 -0
  29. package/dist/ai/AiChatToolTrace.d.ts.map +1 -0
  30. package/dist/ai/AiChatToolTrace.js +91 -0
  31. package/dist/ai/AiChatToolTrace.js.map +1 -0
  32. package/dist/ai/index.d.ts +4 -2
  33. package/dist/ai/index.d.ts.map +1 -1
  34. package/dist/ai/index.js +3 -1
  35. package/dist/core/Button.d.ts.map +1 -1
  36. package/dist/core/Button.js +17 -1
  37. package/dist/core/Button.js.map +1 -1
  38. package/dist/core/Dialog.d.ts.map +1 -1
  39. package/dist/core/Dialog.js +1 -1
  40. package/dist/core/Dialog.js.map +1 -1
  41. package/dist/core/TimeAgo.d.ts +3 -4
  42. package/dist/core/TimeAgo.d.ts.map +1 -1
  43. package/dist/core/TimeAgo.js +3 -4
  44. package/dist/core/TimeAgo.js.map +1 -1
  45. package/dist/i18n/en/index.d.ts +22 -0
  46. package/dist/i18n/en/index.d.ts.map +1 -0
  47. package/dist/i18n/en/index.js +1 -0
  48. package/dist/i18n/en/uiEn.d.ts +37 -0
  49. package/dist/i18n/en/uiEn.d.ts.map +1 -0
  50. package/dist/i18n/en/uiEn.js +1468 -0
  51. package/dist/i18n/en/uiEn.js.map +1 -0
  52. package/dist/i18n/fr/uiFr.d.ts +3 -2
  53. package/dist/i18n/fr/uiFr.d.ts.map +1 -1
  54. package/dist/i18n/fr/uiFr.js +7 -2
  55. package/dist/i18n/fr/uiFr.js.map +1 -1
  56. package/dist/markdown/MarkdownView.d.ts +14 -0
  57. package/dist/markdown/MarkdownView.d.ts.map +1 -1
  58. package/dist/markdown/MarkdownView.js +16 -3
  59. package/dist/markdown/MarkdownView.js.map +1 -1
  60. package/dist/markdown/highlightLines.d.ts +27 -0
  61. package/dist/markdown/highlightLines.d.ts.map +1 -0
  62. package/dist/markdown/highlightLines.js +91 -0
  63. package/dist/markdown/highlightLines.js.map +1 -0
  64. package/dist/markdown/index.d.ts +5 -2
  65. package/dist/markdown/index.d.ts.map +1 -1
  66. package/dist/markdown/index.js +2 -1
  67. package/dist/shell/ButtonInbox.d.ts +8 -0
  68. package/dist/shell/ButtonInbox.d.ts.map +1 -1
  69. package/dist/shell/ButtonInbox.js +3 -1
  70. package/dist/shell/ButtonInbox.js.map +1 -1
  71. package/dist/shell/PlateLayout.d.ts.map +1 -1
  72. package/dist/shell/PlateLayout.js +2 -2
  73. package/dist/shell/PlateLayout.js.map +1 -1
  74. package/dist/sortable/index.d.ts +17 -0
  75. package/dist/sortable/index.d.ts.map +1 -0
  76. package/dist/sortable/index.js +4 -0
  77. package/dist/sortable/useSortableItem.d.ts +32 -0
  78. package/dist/sortable/useSortableItem.d.ts.map +1 -0
  79. package/dist/sortable/useSortableItem.js +35 -0
  80. package/dist/sortable/useSortableItem.js.map +1 -0
  81. package/dist/sortable/useSortableList.d.ts +85 -0
  82. package/dist/sortable/useSortableList.d.ts.map +1 -0
  83. package/dist/sortable/useSortableList.js +125 -0
  84. package/dist/sortable/useSortableList.js.map +1 -0
  85. package/dist/table/DataTable.d.ts.map +1 -1
  86. package/dist/table/DataTable.js +9 -6
  87. package/dist/table/DataTable.js.map +1 -1
  88. package/dist/table/DataTableRowActionGroupItem.d.ts +23 -0
  89. package/dist/table/DataTableRowActionGroupItem.d.ts.map +1 -0
  90. package/dist/table/DataTableRowActionGroupItem.js +38 -0
  91. package/dist/table/DataTableRowActionGroupItem.js.map +1 -0
  92. package/dist/table/DataTableRowActionItem.d.ts.map +1 -1
  93. package/dist/table/DataTableRowActionItem.js +15 -2
  94. package/dist/table/DataTableRowActionItem.js.map +1 -1
  95. package/dist/table/DataTableRowActionsInline.d.ts.map +1 -1
  96. package/dist/table/DataTableRowActionsInline.js +2 -1
  97. package/dist/table/DataTableRowActionsInline.js.map +1 -1
  98. package/dist/table/DataTableRowActionsMenu.d.ts +3 -2
  99. package/dist/table/DataTableRowActionsMenu.d.ts.map +1 -1
  100. package/dist/table/DataTableRowActionsMenu.js +12 -14
  101. package/dist/table/DataTableRowActionsMenu.js.map +1 -1
  102. package/dist/table/dataTableBaseProps.d.ts +16 -2
  103. package/dist/table/dataTableBaseProps.d.ts.map +1 -1
  104. package/dist/table/dataTablePersistence.d.ts +53 -11
  105. package/dist/table/dataTablePersistence.d.ts.map +1 -1
  106. package/dist/table/dataTablePersistence.js +66 -29
  107. package/dist/table/dataTablePersistence.js.map +1 -1
  108. package/dist/table/dataTableTypes.d.ts +20 -3
  109. package/dist/table/dataTableTypes.d.ts.map +1 -1
  110. package/dist/table/index.d.ts +8 -1
  111. package/dist/table/index.d.ts.map +1 -1
  112. package/dist/table/index.js +2 -1
  113. package/dist/table/useDataTableColumns.d.ts.map +1 -1
  114. package/dist/table/useDataTableColumns.js +4 -4
  115. package/dist/table/useDataTableColumns.js.map +1 -1
  116. package/dist/table/useDataTableData.d.ts.map +1 -1
  117. package/dist/table/useDataTableData.js +3 -3
  118. package/dist/table/useDataTableData.js.map +1 -1
  119. package/dist/table/useDataTableFilterForm.d.ts.map +1 -1
  120. package/dist/table/useDataTableFilterForm.js +6 -2
  121. package/dist/table/useDataTableFilterForm.js.map +1 -1
  122. package/dist/table/useDataTableFilterVisibility.d.ts +5 -0
  123. package/dist/table/useDataTableFilterVisibility.d.ts.map +1 -1
  124. package/dist/table/useDataTableFilterVisibility.js +16 -8
  125. package/dist/table/useDataTableFilterVisibility.js.map +1 -1
  126. package/dist/table/useDataTableRefresh.d.ts.map +1 -1
  127. package/dist/table/useDataTableRefresh.js +3 -2
  128. package/dist/table/useDataTableRefresh.js.map +1 -1
  129. package/dist/table/useDataTableSummary.d.ts +5 -0
  130. package/dist/table/useDataTableSummary.d.ts.map +1 -1
  131. package/dist/table/useDataTableSummary.js +6 -6
  132. package/dist/table/useDataTableSummary.js.map +1 -1
  133. package/docs/packages-alepha-ui-ai.md +3 -3
  134. package/docs/packages-alepha-ui-i18n-en.md +35 -0
  135. package/docs/packages-alepha-ui-markdown.md +3 -1
  136. package/docs/packages-alepha-ui-overview.md +4 -2
  137. package/docs/packages-alepha-ui-sortable.md +34 -0
  138. package/docs/packages-alepha-ui-table.md +7 -1
  139. package/package.json +21 -3
  140. package/src/admin/AdminJobExecutionSheet.tsx +9 -0
  141. package/src/admin/analytics/RequestDialog.tsx +1 -1
  142. package/src/ai/AiChat.tsx +44 -6
  143. package/src/ai/AiChatConfirmCard.tsx +7 -1
  144. package/src/ai/AiChatFloat.tsx +46 -0
  145. package/src/ai/AiChatMessage.tsx +2 -2
  146. package/src/ai/AiChatPanel.tsx +154 -47
  147. package/src/ai/AiChatToolStepDetails.tsx +42 -0
  148. package/src/ai/AiChatToolTrace.tsx +167 -0
  149. package/src/ai/__tests__/AiChat.browser.spec.tsx +270 -2
  150. package/src/ai/index.ts +4 -2
  151. package/src/core/Button.tsx +26 -1
  152. package/src/core/Dialog.tsx +6 -2
  153. package/src/core/TimeAgo.tsx +3 -4
  154. package/src/core/__tests__/Button.browser.spec.tsx +57 -0
  155. package/src/i18n/en/__tests__/uiEn.spec.ts +110 -0
  156. package/src/i18n/en/index.ts +22 -0
  157. package/src/i18n/en/uiEn.ts +1647 -0
  158. package/src/i18n/fr/uiFr.ts +7 -2
  159. package/src/markdown/MarkdownView.tsx +30 -1
  160. package/src/markdown/__tests__/highlightLines.spec.ts +45 -0
  161. package/src/markdown/highlightLines.ts +120 -0
  162. package/src/markdown/index.ts +14 -2
  163. package/src/shell/ButtonInbox.tsx +11 -1
  164. package/src/shell/PlateLayout.tsx +18 -9
  165. package/src/shell/__tests__/ButtonInbox.browser.spec.tsx +40 -0
  166. package/src/shell/__tests__/PlateLayout.browser.spec.tsx +19 -2
  167. package/src/sortable/__tests__/useSortableList.browser.spec.tsx +157 -0
  168. package/src/sortable/index.ts +22 -0
  169. package/src/sortable/useSortableItem.ts +65 -0
  170. package/src/sortable/useSortableList.ts +231 -0
  171. package/src/table/DataTable.tsx +8 -5
  172. package/src/table/DataTableRowActionGroupItem.tsx +75 -0
  173. package/src/table/DataTableRowActionItem.tsx +6 -0
  174. package/src/table/DataTableRowActionsInline.tsx +3 -1
  175. package/src/table/DataTableRowActionsMenu.tsx +33 -49
  176. package/src/table/__tests__/DataTablePersistenceStorage.browser.spec.tsx +204 -0
  177. package/src/table/__tests__/DataTableRowActionGroup.browser.spec.tsx +118 -1
  178. package/src/table/dataTableBaseProps.ts +16 -2
  179. package/src/table/dataTablePersistence.ts +118 -32
  180. package/src/table/dataTableTypes.ts +20 -3
  181. package/src/table/index.ts +14 -1
  182. package/src/table/useDataTableColumns.ts +9 -4
  183. package/src/table/useDataTableData.ts +8 -3
  184. package/src/table/useDataTableFilterForm.ts +6 -2
  185. package/src/table/useDataTableFilterVisibility.ts +20 -7
  186. package/src/table/useDataTableRefresh.ts +4 -2
  187. package/src/table/useDataTableSummary.ts +25 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":["Link","ButtonPrimitive"],"sources":["../../src/core/Button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { Link } from \"alepha/react/router\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader2Icon } from \"lucide-react\";\n\nimport { textLinkUnderlineClassName } from \"./TextLink.tsx\";\nimport { cn } from \"./utils.ts\";\n\n/*\n * ⚠️ `disabled:cursor-not-allowed`, NOT `disabled:pointer-events-none`, which\n * is what this used to carry and why a disabled button showed a plain arrow:\n * an element with no pointer events is never a hit target, so it can have no\n * cursor of its own.\n *\n * Dropping it costs nothing. Base UI renders a NATIVE `disabled` attribute\n * here, and the browser suppresses click and mousedown on a disabled form\n * control by itself. Every other disabled control in the kit already relies on\n * exactly that - checkbox, switch, textarea, select, command, input-otp - so\n * the button was the outlier rather than the rule.\n *\n * `aria-disabled:pointer-events-none` covers the case the native attribute\n * cannot: a `nativeButton={false}` render, an anchor, where nothing stops a\n * click from navigating.\n *\n * The price is that a disabled button now takes its variant's hover fill under\n * the pointer, at `opacity-50`. That is deliberate, and it is what a disabled\n * `select-trigger` has always done. See the warning below for why the obvious\n * fix is worse than the wart.\n *\n * ⚠️ DO NOT guard the hover utilities with `not-disabled:`. It was tried, and\n * it broke the fill of every caller that overrides one - 94 call sites, of\n * which `useDialog`'s destructive confirm was the loudest: a red delete button\n * that turned near-white the moment you reached for it.\n *\n * The variant's classes and the caller's are reconciled by tailwind-merge,\n * which decides two classes are the same thing by utility group AND modifier\n * prefix. `hover:bg-primary/80` and a caller's `hover:bg-danger/90` match,\n * so the caller's replaces it. Prefix the variant's with `not-disabled:` and\n * they no longer match, both survive into the class list, and the browser\n * breaks the tie on specificity - where `:not(:disabled):hover` outranks a\n * plain `:hover` and the variant wins a fight it is supposed to lose.\n *\n * So: adding a class here is safe. Adding a MODIFIER PREFIX to a class callers\n * override is not. `cursor-*` has no overrides anywhere in the kit, which is\n * what makes the two above safe. `hover:bg-*` is the most overridden class in\n * it.\n *\n * `not-disabled:` on the `active:` nudge is fine for the same reason: the\n * press-down has three call sites and none of them override it. A disabled\n * button that sinks under the pointer is the one part of this worth\n * suppressing, since it promises a click that will not happen.\n *\n * `aria-busy:cursor-progress` wins while `loading`, which sets both attributes:\n * busy and forbidden are different promises. The work is happening, and the\n * button will take clicks again when it finishes.\n *\n * ---\n *\n * ℹ️ A caller that overrides the font size DOES lose the line height with it,\n * and it does NOT move the label. Both halves were measured, because the first\n * one on its own reads like a bug and is the third-most-reported thing about\n * this file.\n *\n * `text-sm` is a PAIR in Tailwind v4: font size and the line height that goes\n * with it. tailwind-merge groups it with a caller's `text-[12.5px]` and keeps\n * only the caller's, so the pair's second half is dropped and the line height\n * becomes the 1.5 default - 18.75px rather than 20px. That much is real, and\n * `size=\"sm\"` does it too, since it is `text-[0.8rem]`, also arbitrary.\n *\n * It cannot decentre anything. Half-leading is symmetric: the inline box sits\n * in the middle of the line box whatever the line height, the line box is\n * centred by `items-center`, and the fixed `h-8` is unaffected either way.\n * Measured on the reported button (Chrome, macOS, the same `-apple-system`\n * stack production resolves), ink centre against button centre:\n *\n * text-sm 20px line box +0.404px\n * text-[12.5px] 18.75px line box -0.050px\n *\n * The override is marginally BETTER centred. What remains is the font's own\n * ascent/descent asymmetry, which is under half a pixel and is the same\n * effect at every size.\n *\n * So: do not add a `leading-*` here to \"fix\" it. It would change nothing\n * visible, at 94 call sites, on a base the notes above already record as the\n * risky place to edit. See #Q2157.\n *\n * ---\n *\n * 🧪 Experimental: Blueprint's two axes, `intent` x `variant`.\n *\n * `intent` is the colour, and says what the action MEANS: none (a neutral\n * grey), `primary`, `success`, `warning` or `danger`. `variant` is the\n * weight, and says how loud it is: `solid`, `minimal`, `outlined`, or\n * `link`, text with an underline on hover. Twenty combinations from nine\n * words, where the old list (`default`, `secondary`, `outline`, `ghost`,\n * `destructive`) mixed the two questions into one prop. The old names are\n * gone, not aliased.\n *\n * An omitted intent depends on the weight: a `solid` or `link` button is\n * `primary`, a `minimal` or `outlined` one is `none`. So a bare `<Button>`\n * is solid primary, and `variant=\"minimal\"` is a quiet grey button without\n * having to say so.\n *\n * A solid button has VOLUME: a white gradient over its fill (a background\n * IMAGE, so a caller's `bg-*` replaces the colour and keeps the light), a\n * one-pixel highlight along the top edge, a border darker than the fill and\n * a short drop shadow. Hover darkens the fill rather than fading it, the way\n * Blueprint steps from its 3 to its 2.\n *\n * Every intent colour is a token (`--primary`, `--success`, `--warning`,\n * `--danger`, each with `-foreground` for text on the fill and `-text` for\n * the intent drawn as text on the page), so a theme retints them without\n * touching this file.\n */\nconst buttonCva = cva(\n \"group/button focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-danger aria-invalid:ring-danger/20 dark:aria-invalid:border-danger/50 dark:aria-invalid:ring-danger/40 inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-3 not-disabled:active:not-aria-[haspopup]:translate-y-px disabled:cursor-not-allowed disabled:opacity-50 aria-busy:cursor-progress aria-disabled:pointer-events-none aria-invalid:ring-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n solid:\n \"bg-linear-to-b from-white/15 to-transparent shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(0_0_0/0.15)]\",\n minimal: \"\",\n outlined: \"bg-transparent\",\n link: textLinkUnderlineClassName,\n },\n intent: {\n none: \"\",\n primary: \"\",\n success: \"\",\n warning: \"\",\n danger: \"\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n compoundVariants: [\n {\n variant: \"solid\",\n intent: \"none\",\n className:\n \"border-border bg-secondary text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_6%)]\",\n },\n {\n variant: \"solid\",\n intent: \"primary\",\n className:\n \"bg-primary text-primary-foreground border-[color-mix(in_oklch,var(--primary),black_25%)] hover:bg-[color-mix(in_oklch,var(--primary),black_12%)]\",\n },\n {\n variant: \"solid\",\n intent: \"success\",\n className:\n \"bg-success text-success-foreground border-[color-mix(in_oklch,var(--success),black_25%)] hover:bg-[color-mix(in_oklch,var(--success),black_12%)]\",\n },\n {\n variant: \"solid\",\n intent: \"warning\",\n className:\n \"bg-warning text-warning-foreground border-[color-mix(in_oklch,var(--warning),black_20%)] hover:bg-[color-mix(in_oklch,var(--warning),black_8%)]\",\n },\n {\n variant: \"solid\",\n intent: \"danger\",\n className:\n \"bg-danger text-danger-foreground border-[color-mix(in_oklch,var(--danger),black_25%)] hover:bg-[color-mix(in_oklch,var(--danger),black_12%)]\",\n },\n {\n variant: \"minimal\",\n intent: \"none\",\n className:\n \"hover:bg-hover hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground\",\n },\n {\n variant: \"minimal\",\n intent: \"primary\",\n className:\n \"text-primary-text hover:bg-primary/10 aria-expanded:bg-primary/15 dark:hover:bg-primary/20\",\n },\n {\n variant: \"minimal\",\n intent: \"success\",\n className:\n \"text-success-text hover:bg-success/10 aria-expanded:bg-success/15 dark:hover:bg-success/20\",\n },\n {\n variant: \"minimal\",\n intent: \"warning\",\n className:\n \"text-warning-text hover:bg-warning/15 aria-expanded:bg-warning/20 dark:hover:bg-warning/20\",\n },\n {\n variant: \"minimal\",\n intent: \"danger\",\n className:\n \"text-danger-text hover:bg-danger/10 aria-expanded:bg-danger/15 dark:hover:bg-danger/20\",\n },\n {\n variant: \"outlined\",\n intent: \"none\",\n className:\n \"border-border bg-background hover:bg-hover hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-border dark:bg-input/30 dark:hover:bg-hover\",\n },\n {\n variant: \"outlined\",\n intent: \"primary\",\n className:\n \"border-primary/60 text-primary-text hover:bg-primary/10 dark:hover:bg-primary/20\",\n },\n {\n variant: \"outlined\",\n intent: \"success\",\n className:\n \"border-success/60 text-success-text hover:bg-success/10 dark:hover:bg-success/20\",\n },\n {\n variant: \"outlined\",\n intent: \"warning\",\n className:\n \"border-warning/70 text-warning-text hover:bg-warning/15 dark:hover:bg-warning/20\",\n },\n {\n variant: \"outlined\",\n intent: \"danger\",\n className:\n \"border-danger/60 text-danger-text hover:bg-danger/10 dark:hover:bg-danger/20\",\n },\n { variant: \"link\", intent: \"none\", className: \"text-foreground\" },\n { variant: \"link\", intent: \"primary\", className: \"text-primary-text\" },\n { variant: \"link\", intent: \"success\", className: \"text-success-text\" },\n { variant: \"link\", intent: \"warning\", className: \"text-warning-text\" },\n { variant: \"link\", intent: \"danger\", className: \"text-danger-text\" },\n ],\n defaultVariants: {\n variant: \"solid\",\n intent: \"primary\",\n size: \"default\",\n },\n },\n);\n\ntype ButtonCvaProps = VariantProps<typeof buttonCva>;\n\nexport type ButtonVariant = NonNullable<ButtonCvaProps[\"variant\"]>;\n\nexport type ButtonIntent = NonNullable<ButtonCvaProps[\"intent\"]>;\n\nexport interface ButtonVariantProps {\n /**\n * How loud the button is: `solid` (the default), `minimal`, `outlined`\n * or `link`.\n */\n variant?: ButtonVariant | null;\n /**\n * What the action means: `none`, `primary`, `success`, `warning` or\n * `danger`. Omitted, a `solid` or `link` button is primary and a\n * `minimal` or `outlined` one is neutral.\n */\n intent?: ButtonIntent | null;\n size?: ButtonCvaProps[\"size\"];\n className?: string;\n}\n\n/**\n * The intent a variant implies when none is given.\n */\nconst resolveButtonProps = (props: ButtonVariantProps) => {\n const variant = props.variant ?? \"solid\";\n const intent: ButtonIntent =\n props.intent ??\n (variant === \"solid\" || variant === \"link\" ? \"primary\" : \"none\");\n return { variant, intent, size: props.size };\n};\n\nconst buttonVariants = (props: ButtonVariantProps = {}) =>\n buttonCva({ ...resolveButtonProps(props), className: props.className });\n\nexport type ButtonProps = Omit<ButtonPrimitive.Props, \"className\"> &\n ButtonVariantProps & {\n /**\n * When true, hides the button's content (icon + label) and shows a single\n * centered spinner in its place, disables the button, and marks it\n * `aria-busy`. The hidden content stays in the layout, so the button keeps\n * its natural width and doesn't resize while busy. Use for form submits and\n * async actions so the click can't be double-fired: every submit in the\n * kit relies on it.\n */\n loading?: boolean;\n /**\n * Makes the button a link to this address, looking exactly as it would\n * as a button: `variant` and `intent` are unchanged by it.\n *\n * An app path renders Alepha's `<Link>`, so a plain click routes in place\n * and a modified click opens a new tab. An absolute URL (`https:`,\n * `mailto:`, `//host`) renders a plain `<a>`, since the router has no\n * route for it. Either way the button stops being a native `<button>`\n * (`nativeButton={false}`) and announces itself as a link\n * (`role=\"link\"`), which is what every hand-written `render={<Link />}`\n * had to spell out.\n */\n href?: string;\n /**\n * The anchor's `target`, with `href` only. `_blank` without a `rel`\n * gets `noreferrer`.\n */\n target?: string;\n /**\n * The anchor's `rel`, with `href` only.\n */\n rel?: string;\n };\n\n/**\n * An address the router cannot route: a scheme (`https:`, `mailto:`) or a\n * protocol-relative `//host`.\n */\nconst EXTERNAL_HREF = /^([a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\nconst Button = (props: ButtonProps) => {\n const {\n className,\n variant,\n intent,\n size = \"default\",\n loading = false,\n disabled,\n children,\n href,\n target,\n rel,\n ...rest\n } = props;\n const anchor =\n href === undefined\n ? undefined\n : {\n render: EXTERNAL_HREF.test(href) ? (\n <a\n href={href}\n target={target}\n rel={rel ?? (target === \"_blank\" ? \"noreferrer\" : undefined)}\n />\n ) : (\n <Link href={href} target={target} rel={rel} />\n ),\n nativeButton: false,\n role: \"link\",\n };\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n disabled={disabled || loading}\n className={cn(buttonVariants({ variant, intent, size, className }), {\n relative: loading,\n })}\n {...rest}\n {...anchor}\n >\n {loading && (\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Loader2Icon aria-hidden className=\"animate-spin\" />\n </span>\n )}\n {/*\n While loading, the label is painted out but stays in the layout AND in\n the accessibility tree: `invisible` (visibility: hidden) also removed\n it from the tree, so a loading button had no name (axe `button-name`,\n WCAG 4.1.2). `opacity` does nothing on a `display: contents` box, so\n the text is made transparent and every element inside it fully\n transparent instead.\n */}\n <span\n className={cn(\"contents\", {\n \"text-transparent [&_*]:opacity-0\": loading,\n })}\n >\n {children}\n </span>\n </ButtonPrimitive>\n );\n};\n\nexport { Button, buttonVariants };\n"],"mappings":";;;;;;;;AAkHA,MAAM,YAAY,IAChB,kpBACA;CACE,U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;;;;AA2BA,MAAM,sBAAsB,UAA8B;CACxD,MAAM,UAAU,MAAM,WAAW;CAIjC,OAAO;EAAE;EAAS,QAFhB,MAAM,WACL,YAAY,WAAW,YAAY,SAAS,YAAY;EACjC,MAAM,MAAM;CAAK;AAC7C;AAEA,MAAM,kBAAkB,QAA4B,CAAC,MACnD,UAAU;CAAE,GAAG,mBAAmB,KAAK;CAAG,WAAW,MAAM;AAAU,CAAC;;;;;AAyCxE,MAAM,gBAAgB;AAEtB,MAAM,UAAU,UAAuB;CACrC,MAAM,EACJ,WACA,SACA,QACA,OAAO,WACP,UAAU,OACV,UACA,UACA,MACA,QACA,KACA,GAAG,SACD;CACJ,MAAM,SACJ,SAAS,KAAA,IACL,KAAA,IACA;EACE,QAAQ,cAAc,KAAK,IAAI,IAC7B,oBAAC,KAAD;GACQ;GACE;GACR,KAAK,QAAQ,WAAW,WAAW,eAAe,KAAA;EACnD,CAAA,IAED,oBAACA,QAAD;GAAY;GAAc;GAAa;EAAM,CAAA;EAE/C,cAAc;EACd,MAAM;CACR;CACN,OACE,qBAACC,UAAD;EACE,aAAU;EACV,gBAAc,WAAW,KAAA;EACzB,aAAW,WAAW,KAAA;EACtB,UAAU,YAAY;EACtB,WAAW,GAAG,eAAe;GAAE;GAAS;GAAQ;GAAM;EAAU,CAAC,GAAG,EAClE,UAAU,QACZ,CAAC;EACD,GAAI;EACJ,GAAI;EATN,UAAA,CAWG,WACC,oBAAC,QAAD;GAAM,WAAU;GACd,UAAA,oBAAC,aAAD;IAAa,eAAA;IAAY,WAAU;GAAgB,CAAA;EAC/C,CAAA,GAUR,oBAAC,QAAD;GACE,WAAW,GAAG,YAAY,EACxB,oCAAoC,QACtC,CAAC;GAEA;EACG,CAAA,CACS;;AAErB"}
1
+ {"version":3,"file":"Button.js","names":["Link","ButtonPrimitive"],"sources":["../../src/core/Button.tsx"],"sourcesContent":["import { Button as ButtonPrimitive } from \"@base-ui/react/button\";\nimport { Link } from \"alepha/react/router\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Loader2Icon } from \"lucide-react\";\nimport { Children, type ReactNode } from \"react\";\n\nimport { textLinkUnderlineClassName } from \"./TextLink.tsx\";\nimport { cn } from \"./utils.ts\";\n\n/*\n * ⚠️ `disabled:cursor-not-allowed`, NOT `disabled:pointer-events-none`, which\n * is what this used to carry and why a disabled button showed a plain arrow:\n * an element with no pointer events is never a hit target, so it can have no\n * cursor of its own.\n *\n * Dropping it costs nothing. Base UI renders a NATIVE `disabled` attribute\n * here, and the browser suppresses click and mousedown on a disabled form\n * control by itself. Every other disabled control in the kit already relies on\n * exactly that - checkbox, switch, textarea, select, command, input-otp - so\n * the button was the outlier rather than the rule.\n *\n * `aria-disabled:pointer-events-none` covers the case the native attribute\n * cannot: a `nativeButton={false}` render, an anchor, where nothing stops a\n * click from navigating.\n *\n * The price is that a disabled button now takes its variant's hover fill under\n * the pointer, at `opacity-50`. That is deliberate, and it is what a disabled\n * `select-trigger` has always done. See the warning below for why the obvious\n * fix is worse than the wart.\n *\n * ⚠️ DO NOT guard the hover utilities with `not-disabled:`. It was tried, and\n * it broke the fill of every caller that overrides one - 94 call sites, of\n * which `useDialog`'s destructive confirm was the loudest: a red delete button\n * that turned near-white the moment you reached for it.\n *\n * The variant's classes and the caller's are reconciled by tailwind-merge,\n * which decides two classes are the same thing by utility group AND modifier\n * prefix. `hover:bg-primary/80` and a caller's `hover:bg-danger/90` match,\n * so the caller's replaces it. Prefix the variant's with `not-disabled:` and\n * they no longer match, both survive into the class list, and the browser\n * breaks the tie on specificity - where `:not(:disabled):hover` outranks a\n * plain `:hover` and the variant wins a fight it is supposed to lose.\n *\n * So: adding a class here is safe. Adding a MODIFIER PREFIX to a class callers\n * override is not. `cursor-*` has no overrides anywhere in the kit, which is\n * what makes the two above safe. `hover:bg-*` is the most overridden class in\n * it.\n *\n * `not-disabled:` on the `active:` nudge is fine for the same reason: the\n * press-down has three call sites and none of them override it. A disabled\n * button that sinks under the pointer is the one part of this worth\n * suppressing, since it promises a click that will not happen.\n *\n * `aria-busy:cursor-progress` wins while `loading`, which sets both attributes:\n * busy and forbidden are different promises. The work is happening, and the\n * button will take clicks again when it finishes.\n *\n * ---\n *\n * ℹ️ A caller that overrides the font size DOES lose the line height with it,\n * and it does NOT move the label. Both halves were measured, because the first\n * one on its own reads like a bug and is the third-most-reported thing about\n * this file.\n *\n * `text-sm` is a PAIR in Tailwind v4: font size and the line height that goes\n * with it. tailwind-merge groups it with a caller's `text-[12.5px]` and keeps\n * only the caller's, so the pair's second half is dropped and the line height\n * becomes the 1.5 default - 18.75px rather than 20px. That much is real, and\n * `size=\"sm\"` does it too, since it is `text-[0.8rem]`, also arbitrary.\n *\n * It cannot decentre anything. Half-leading is symmetric: the inline box sits\n * in the middle of the line box whatever the line height, the line box is\n * centred by `items-center`, and the fixed `h-8` is unaffected either way.\n * Measured on the reported button (Chrome, macOS, the same `-apple-system`\n * stack production resolves), ink centre against button centre:\n *\n * text-sm 20px line box +0.404px\n * text-[12.5px] 18.75px line box -0.050px\n *\n * The override is marginally BETTER centred. What remains is the font's own\n * ascent/descent asymmetry, which is under half a pixel and is the same\n * effect at every size.\n *\n * So: do not add a `leading-*` here to \"fix\" it. It would change nothing\n * visible, at 94 call sites, on a base the notes above already record as the\n * risky place to edit. See #Q2157.\n *\n * ---\n *\n * 🧪 Experimental: Blueprint's two axes, `intent` x `variant`.\n *\n * `intent` is the colour, and says what the action MEANS: none (a neutral\n * grey), `primary`, `success`, `warning` or `danger`. `variant` is the\n * weight, and says how loud it is: `solid`, `minimal`, `outlined`, or\n * `link`, text with an underline on hover. Twenty combinations from nine\n * words, where the old list (`default`, `secondary`, `outline`, `ghost`,\n * `destructive`) mixed the two questions into one prop. The old names are\n * gone, not aliased.\n *\n * An omitted intent depends on the weight: a `solid` or `link` button is\n * `primary`, a `minimal` or `outlined` one is `none`. So a bare `<Button>`\n * is solid primary, and `variant=\"minimal\"` is a quiet grey button without\n * having to say so.\n *\n * A solid button has VOLUME: a white gradient over its fill (a background\n * IMAGE, so a caller's `bg-*` replaces the colour and keeps the light), a\n * one-pixel highlight along the top edge, a border darker than the fill and\n * a short drop shadow. Hover darkens the fill rather than fading it, the way\n * Blueprint steps from its 3 to its 2.\n *\n * Every intent colour is a token (`--primary`, `--success`, `--warning`,\n * `--danger`, each with `-foreground` for text on the fill and `-text` for\n * the intent drawn as text on the page), so a theme retints them without\n * touching this file.\n */\nconst buttonCva = cva(\n \"group/button focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-danger aria-invalid:ring-danger/20 dark:aria-invalid:border-danger/50 dark:aria-invalid:ring-danger/40 inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:ring-3 not-disabled:active:not-aria-[haspopup]:translate-y-px disabled:cursor-not-allowed disabled:opacity-50 aria-busy:cursor-progress aria-disabled:pointer-events-none aria-invalid:ring-3 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n solid:\n \"bg-linear-to-b from-white/15 to-transparent shadow-[inset_0_1px_0_rgb(255_255_255/0.2),0_1px_2px_rgb(0_0_0/0.15)]\",\n minimal: \"\",\n outlined: \"bg-transparent\",\n link: textLinkUnderlineClassName,\n },\n intent: {\n none: \"\",\n primary: \"\",\n success: \"\",\n warning: \"\",\n danger: \"\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n compoundVariants: [\n {\n variant: \"solid\",\n intent: \"none\",\n className:\n \"border-border bg-secondary text-secondary-foreground aria-expanded:bg-secondary aria-expanded:text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_6%)]\",\n },\n {\n variant: \"solid\",\n intent: \"primary\",\n className:\n \"bg-primary text-primary-foreground border-[color-mix(in_oklch,var(--primary),black_25%)] hover:bg-[color-mix(in_oklch,var(--primary),black_12%)]\",\n },\n {\n variant: \"solid\",\n intent: \"success\",\n className:\n \"bg-success text-success-foreground border-[color-mix(in_oklch,var(--success),black_25%)] hover:bg-[color-mix(in_oklch,var(--success),black_12%)]\",\n },\n {\n variant: \"solid\",\n intent: \"warning\",\n className:\n \"bg-warning text-warning-foreground border-[color-mix(in_oklch,var(--warning),black_20%)] hover:bg-[color-mix(in_oklch,var(--warning),black_8%)]\",\n },\n {\n variant: \"solid\",\n intent: \"danger\",\n className:\n \"bg-danger text-danger-foreground border-[color-mix(in_oklch,var(--danger),black_25%)] hover:bg-[color-mix(in_oklch,var(--danger),black_12%)]\",\n },\n {\n variant: \"minimal\",\n intent: \"none\",\n className:\n \"hover:bg-hover hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground\",\n },\n {\n variant: \"minimal\",\n intent: \"primary\",\n className:\n \"text-primary-text hover:bg-primary/10 aria-expanded:bg-primary/15 dark:hover:bg-primary/20\",\n },\n {\n variant: \"minimal\",\n intent: \"success\",\n className:\n \"text-success-text hover:bg-success/10 aria-expanded:bg-success/15 dark:hover:bg-success/20\",\n },\n {\n variant: \"minimal\",\n intent: \"warning\",\n className:\n \"text-warning-text hover:bg-warning/15 aria-expanded:bg-warning/20 dark:hover:bg-warning/20\",\n },\n {\n variant: \"minimal\",\n intent: \"danger\",\n className:\n \"text-danger-text hover:bg-danger/10 aria-expanded:bg-danger/15 dark:hover:bg-danger/20\",\n },\n {\n variant: \"outlined\",\n intent: \"none\",\n className:\n \"border-border bg-background hover:bg-hover hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-border dark:bg-input/30 dark:hover:bg-hover\",\n },\n {\n variant: \"outlined\",\n intent: \"primary\",\n className:\n \"border-primary/60 text-primary-text hover:bg-primary/10 dark:hover:bg-primary/20\",\n },\n {\n variant: \"outlined\",\n intent: \"success\",\n className:\n \"border-success/60 text-success-text hover:bg-success/10 dark:hover:bg-success/20\",\n },\n {\n variant: \"outlined\",\n intent: \"warning\",\n className:\n \"border-warning/70 text-warning-text hover:bg-warning/15 dark:hover:bg-warning/20\",\n },\n {\n variant: \"outlined\",\n intent: \"danger\",\n className:\n \"border-danger/60 text-danger-text hover:bg-danger/10 dark:hover:bg-danger/20\",\n },\n { variant: \"link\", intent: \"none\", className: \"text-foreground\" },\n { variant: \"link\", intent: \"primary\", className: \"text-primary-text\" },\n { variant: \"link\", intent: \"success\", className: \"text-success-text\" },\n { variant: \"link\", intent: \"warning\", className: \"text-warning-text\" },\n { variant: \"link\", intent: \"danger\", className: \"text-danger-text\" },\n ],\n defaultVariants: {\n variant: \"solid\",\n intent: \"primary\",\n size: \"default\",\n },\n },\n);\n\ntype ButtonCvaProps = VariantProps<typeof buttonCva>;\n\nexport type ButtonVariant = NonNullable<ButtonCvaProps[\"variant\"]>;\n\nexport type ButtonIntent = NonNullable<ButtonCvaProps[\"intent\"]>;\n\nexport interface ButtonVariantProps {\n /**\n * How loud the button is: `solid` (the default), `minimal`, `outlined`\n * or `link`.\n */\n variant?: ButtonVariant | null;\n /**\n * What the action means: `none`, `primary`, `success`, `warning` or\n * `danger`. Omitted, a `solid` or `link` button is primary and a\n * `minimal` or `outlined` one is neutral.\n */\n intent?: ButtonIntent | null;\n size?: ButtonCvaProps[\"size\"];\n className?: string;\n}\n\n/**\n * The intent a variant implies when none is given.\n */\nconst resolveButtonProps = (props: ButtonVariantProps) => {\n const variant = props.variant ?? \"solid\";\n const intent: ButtonIntent =\n props.intent ??\n (variant === \"solid\" || variant === \"link\" ? \"primary\" : \"none\");\n return { variant, intent, size: props.size };\n};\n\nconst buttonVariants = (props: ButtonVariantProps = {}) =>\n buttonCva({ ...resolveButtonProps(props), className: props.className });\n\nexport type ButtonProps = Omit<ButtonPrimitive.Props, \"className\"> &\n ButtonVariantProps & {\n /**\n * When true, hides the button's content (icon + label) and shows a single\n * centered spinner in its place, disables the button, and marks it\n * `aria-busy`. The hidden content stays in the layout, so the button keeps\n * its natural width and doesn't resize while busy. Use for form submits and\n * async actions so the click can't be double-fired: every submit in the\n * kit relies on it.\n */\n loading?: boolean;\n /**\n * Makes the button a link to this address, looking exactly as it would\n * as a button: `variant` and `intent` are unchanged by it.\n *\n * An app path renders Alepha's `<Link>`, so a plain click routes in place\n * and a modified click opens a new tab. An absolute URL (`https:`,\n * `mailto:`, `//host`) renders a plain `<a>`, since the router has no\n * route for it. Either way the button stops being a native `<button>`\n * (`nativeButton={false}`) and announces itself as a link\n * (`role=\"link\"`), which is what every hand-written `render={<Link />}`\n * had to spell out.\n */\n href?: string;\n /**\n * The anchor's `target`, with `href` only. `_blank` without a `rel`\n * gets `noreferrer`.\n */\n target?: string;\n /**\n * The anchor's `rel`, with `href` only.\n */\n rel?: string;\n };\n\n/**\n * An address the router cannot route: a scheme (`https:`, `mailto:`) or a\n * protocol-relative `//host`.\n */\nconst EXTERNAL_HREF = /^([a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\nconst Button = (props: ButtonProps) => {\n const {\n className,\n variant,\n intent,\n size = \"default\",\n loading = false,\n disabled,\n children,\n href,\n target,\n rel,\n ...rest\n } = props;\n const anchor =\n href === undefined\n ? undefined\n : {\n render: EXTERNAL_HREF.test(href) ? (\n <a\n href={href}\n target={target}\n rel={rel ?? (target === \"_blank\" ? \"noreferrer\" : undefined)}\n />\n ) : (\n <Link href={href} target={target} rel={rel} />\n ),\n nativeButton: false,\n role: \"link\",\n };\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n disabled={disabled || loading}\n className={cn(buttonVariants({ variant, intent, size, className }), {\n relative: loading,\n })}\n {...rest}\n {...anchor}\n >\n {loading && (\n <span className=\"absolute inset-0 flex items-center justify-center\">\n <Loader2Icon aria-hidden className=\"animate-spin\" />\n </span>\n )}\n {/*\n While loading, the label is painted out but stays in the layout AND in\n the accessibility tree: `invisible` (visibility: hidden) also removed\n it from the tree, so a loading button had no name (axe `button-name`,\n WCAG 4.1.2). `opacity` does nothing on a `display: contents` box, so\n the text is made transparent and every element inside it fully\n transparent instead.\n */}\n <span\n className={cn(\"contents\", {\n \"text-transparent [&_*]:opacity-0\": loading,\n })}\n >\n {Children.count(children) > 1\n ? Children.map(children, wrapLabelText)\n : children}\n </span>\n </ButtonPrimitive>\n );\n};\n\n/**\n * Gives a label that sits beside other children an element of its own.\n *\n * A page translator (Chrome's \"Translate this page\") replaces each text node\n * it translates with `<font>` elements, while React keeps the original node.\n * The next icon swap beside it, `{busy ? <Loader2 /> : <Paperclip />}`, calls\n * `insertBefore(newIcon, textNode)` with a node that is no longer a child, and\n * the whole tree throws `NotFoundError` (#Q4189). Inside a `<span>` the label\n * is replaced in place and the span stays the reference node.\n *\n * A lone label is left bare: with no sibling there is no insert against it.\n * Whitespace stays bare too, since a flex container ignores it and a span of\n * it would add a gap.\n */\nconst wrapLabelText = (child: ReactNode): ReactNode =>\n (typeof child === \"string\" && child.trim() !== \"\") ||\n typeof child === \"number\" ? (\n <span>{child}</span>\n ) : (\n child\n );\n\nexport { Button, buttonVariants };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E3C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC;AAEhE,QAAA,MAAM,aAAa,UAAW,kBAAkB,sBAY/C,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG;IAC7D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,aAAa,UAAW,kBAAkB,sBAsC/C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE5D,QAAA,MAAM,YAAY,UAAW,iBAAiB,sBAS7C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,QAAA,MAAM,YAAY,UAAW,iBAAiB,sBAmB7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;AAE3D,QAAA,MAAM,WAAW,UAAW,gBAAgB,sBAY3C,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC;AAEvE,QAAA,MAAM,iBAAiB,UAAW,sBAAsB,sBAYvD,CAAC;AAEF,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
@@ -41,7 +41,7 @@ const DialogContent = (props) => {
41
41
  const { className, children, showCloseButton = true, ...rest } = props;
42
42
  return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
43
43
  "data-slot": "dialog-content",
44
- className: cn("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm", className),
44
+ className: cn("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm", className),
45
45
  ...rest,
46
46
  children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
47
47
  "data-slot": "dialog-close",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["DialogPrimitive"],"sources":["../../src/core/Dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"./Button.tsx\";\nimport { cn } from \"./utils.ts\";\n\nexport type DialogProps = DialogPrimitive.Root.Props;\n\nconst Dialog = (props: DialogProps) => {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n};\n\nexport type DialogTriggerProps = DialogPrimitive.Trigger.Props;\n\nconst DialogTrigger = (props: DialogTriggerProps) => {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n};\n\nexport type DialogPortalProps = DialogPrimitive.Portal.Props;\n\nconst DialogPortal = (props: DialogPortalProps) => {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n};\n\nexport type DialogCloseProps = DialogPrimitive.Close.Props;\n\nconst DialogClose = (props: DialogCloseProps) => {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n};\n\nexport type DialogOverlayProps = DialogPrimitive.Backdrop.Props;\n\nconst DialogOverlay = (props: DialogOverlayProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport type DialogContentProps = DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n};\n\nconst DialogContent = (props: DialogContentProps) => {\n const { className, children, showCloseButton = true, ...rest } = props;\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n // `left-1/2` with `-translate-x-1/2` is physical on purpose: centring\n // lands on the same point in either reading direction.\n \"bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm\",\n className,\n )}\n {...rest}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"minimal\"\n className=\"absolute end-2 top-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n};\n\nexport type DialogHeaderProps = React.ComponentProps<\"div\">;\n\nconst DialogHeader = (props: DialogHeaderProps) => {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...rest}\n />\n );\n};\n\nexport type DialogFooterProps = React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n};\n\nconst DialogFooter = (props: DialogFooterProps) => {\n const { className, showCloseButton = false, children, ...rest } = props;\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...rest}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outlined\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n );\n};\n\nexport type DialogTitleProps = DialogPrimitive.Title.Props;\n\nconst DialogTitle = (props: DialogTitleProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport type DialogDescriptionProps = DialogPrimitive.Description.Props;\n\nconst DialogDescription = (props: DialogDescriptionProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:decoration-current/40 *:[a]:decoration-[0.5px] *:[a]:underline-offset-4 *:[a]:transition-colors *:[a]:hover:decoration-current *:[a]:hover:decoration-1\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;AASA,MAAM,UAAU,UAAuB;CACrC,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAIA,MAAM,iBAAiB,UAA8B;CACnD,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAIA,MAAM,gBAAgB,UAA6B;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uB,QAAQ,oBAAC,QAAD,EAAQ,SAAQ,WAAY,CAAA;GAAG,UAAA;EAEvC,CAAA,CAEtB;;AAET;AAIA,MAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GACT,mDACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAIA,MAAM,qBAAqB,UAAkC;CAC3D,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GACT,2OACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"Dialog.js","names":["DialogPrimitive"],"sources":["../../src/core/Dialog.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\nimport { XIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"./Button.tsx\";\nimport { cn } from \"./utils.ts\";\n\nexport type DialogProps = DialogPrimitive.Root.Props;\n\nconst Dialog = (props: DialogProps) => {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n};\n\nexport type DialogTriggerProps = DialogPrimitive.Trigger.Props;\n\nconst DialogTrigger = (props: DialogTriggerProps) => {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n};\n\nexport type DialogPortalProps = DialogPrimitive.Portal.Props;\n\nconst DialogPortal = (props: DialogPortalProps) => {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n};\n\nexport type DialogCloseProps = DialogPrimitive.Close.Props;\n\nconst DialogClose = (props: DialogCloseProps) => {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n};\n\nexport type DialogOverlayProps = DialogPrimitive.Backdrop.Props;\n\nconst DialogOverlay = (props: DialogOverlayProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport type DialogContentProps = DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean;\n};\n\nconst DialogContent = (props: DialogContentProps) => {\n const { className, children, showCloseButton = true, ...rest } = props;\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n // `left-1/2` with `-translate-x-1/2` is physical on purpose: centring\n // lands on the same point in either reading direction. The height is\n // bound to the viewport and the popup scrolls, so a tall body never\n // pushes the footer's buttons out of reach. A dialog that sizes and\n // scrolls itself overrides both (`overflow-visible` keeps what it\n // had before the cap).\n \"bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm\",\n className,\n )}\n {...rest}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"minimal\"\n className=\"absolute end-2 top-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n};\n\nexport type DialogHeaderProps = React.ComponentProps<\"div\">;\n\nconst DialogHeader = (props: DialogHeaderProps) => {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...rest}\n />\n );\n};\n\nexport type DialogFooterProps = React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean;\n};\n\nconst DialogFooter = (props: DialogFooterProps) => {\n const { className, showCloseButton = false, children, ...rest } = props;\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end\",\n className,\n )}\n {...rest}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outlined\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n );\n};\n\nexport type DialogTitleProps = DialogPrimitive.Title.Props;\n\nconst DialogTitle = (props: DialogTitleProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport type DialogDescriptionProps = DialogPrimitive.Description.Props;\n\nconst DialogDescription = (props: DialogDescriptionProps) => {\n const { className, ...rest } = props;\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:decoration-current/40 *:[a]:decoration-[0.5px] *:[a]:underline-offset-4 *:[a]:transition-colors *:[a]:hover:decoration-current *:[a]:hover:decoration-1\",\n className,\n )}\n {...rest}\n />\n );\n};\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"mappings":";;;;;;;AASA,MAAM,UAAU,UAAuB;CACrC,OAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;CAAQ,CAAA;AAC9D;AAIA,MAAM,iBAAiB,UAA8B;CACnD,OAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;CAAQ,CAAA;AACzE;AAIA,MAAM,gBAAgB,UAA6B;CACjD,OAAO,oBAACA,SAAgB,QAAjB;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AAQ,WAAY,CAAA;GAAG,UAAA;EAEvC,CAAA,CAEtB;;AAET;AAIA,MAAM,eAAe,UAA4B;CAC/C,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GACT,mDACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAIA,MAAM,qBAAqB,UAAkC;CAC3D,MAAM,EAAE,WAAW,GAAG,SAAS;CAC/B,OACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GACT,2OACA,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -39,10 +39,9 @@ export interface TimeAgoProps {
39
39
  *
40
40
  * The server renders the EXACT datetime rather than nothing. A crawler, a
41
41
  * reader with no JavaScript and the first paint all get a true answer instead
42
- * of a blank, which matters on `/:projectSlug/roadmap` - the one page Lore
43
- * server-renders for an audience that may never run the client. The visible
44
- * swap on hydration is the price, and it is a swap from correct to more
45
- * readable.
42
+ * of a blank, which matters on a page server-rendered for an audience that
43
+ * may never run the client. The visible swap on hydration is the price, and
44
+ * it is a swap from correct to more readable.
46
45
  *
47
46
  * ## Where NOT to use it
48
47
  *
@@ -1 +1 @@
1
- {"version":3,"file":"TimeAgo.d.ts","sourceRoot":"","sources":["../../src/core/TimeAgo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IAEzC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,QAAA,MAAM,OAAO,UAAW,YAAY,gCAiBnC,CAAC;eAEa,OAAO"}
1
+ {"version":3,"file":"TimeAgo.d.ts","sourceRoot":"","sources":["../../src/core/TimeAgo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIhD,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,CAAC;IAEzC;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,OAAO,UAAW,YAAY,gCAiBnC,CAAC;eAEa,OAAO"}
@@ -25,10 +25,9 @@ import { jsx } from "react/jsx-runtime";
25
25
  *
26
26
  * The server renders the EXACT datetime rather than nothing. A crawler, a
27
27
  * reader with no JavaScript and the first paint all get a true answer instead
28
- * of a blank, which matters on `/:projectSlug/roadmap` - the one page Lore
29
- * server-renders for an audience that may never run the client. The visible
30
- * swap on hydration is the price, and it is a swap from correct to more
31
- * readable.
28
+ * of a blank, which matters on a page server-rendered for an audience that
29
+ * may never run the client. The visible swap on hydration is the price, and
30
+ * it is a swap from correct to more readable.
32
31
  *
33
32
  * ## Where NOT to use it
34
33
  *
@@ -1 +1 @@
1
- {"version":3,"file":"TimeAgo.js","names":[],"sources":["../../src/core/TimeAgo.tsx"],"sourcesContent":["import type { DateTime } from \"alepha/datetime\";\nimport { ClientOnly } from \"alepha/react\";\nimport { useI18n } from \"alepha/react/i18n\";\n\nexport interface TimeAgoProps {\n /**\n * The instant. The same set `useI18n().l()` takes, `DateTime` included -\n * `DateTimeProvider.now()` returns one, so a narrower type here would make\n * the component unusable from exactly the place that owns the clock.\n */\n value: string | number | Date | DateTime;\n\n /**\n * The exact form, shown on hover and rendered on the server.\n *\n * ⚠️ A dayjs format string, not an `Intl` options bag.\n * `I18nLocalizeOptions` has `date` and `number` only - there is no `time` -\n * so `lll` is how a date AND a time are asked for.\n */\n format?: string;\n\n className?: string;\n}\n\n/**\n * An instant, read as \"2 hours ago\", with the exact datetime on hover.\n *\n * ## Why a component and not a fifth spelling\n *\n * There were four ways to write this - `dt.of(x).fromNow()`,\n * `dateFormatter.of(x).fromNow()`, `l(x, { date: \"fromNow\" })` and\n * `<Localize value={x} date=\"fromNow\" />` - and **none of them carried the\n * exact date**. A tooltip added by hand is a tooltip added to some call sites\n * and forgotten on the rest, which is what the Apps table's Last seen column\n * demonstrated by rendering four rows of `Sep 9, 2026 7:00 PM` and making the\n * reader subtract dates to see whether a copy was alive (feedback #P2174).\n *\n * ## ⚠️ The SSR guard is built in, and that is the point\n *\n * A `fromNow()` string is computed from the clock, so it differs between the\n * server render and hydration and trips React #418. Before this component\n * there were 11 `ClientOnly` guards against 42 relative-time call sites: most\n * were simply unguarded. Putting the guard inside means the next call site\n * cannot forget it.\n *\n * The server renders the EXACT datetime rather than nothing. A crawler, a\n * reader with no JavaScript and the first paint all get a true answer instead\n * of a blank, which matters on `/:projectSlug/roadmap` - the one page Lore\n * server-renders for an audience that may never run the client. The visible\n * swap on hydration is the price, and it is a swap from correct to more\n * readable.\n *\n * ## Where NOT to use it\n *\n * A date somebody CHOSE, rather than one that happened: a release target\n * date, a quest due date. \"in 3 months\" is not a deadline anyone can plan\n * against, and the relative form actively destroys the information. Relative\n * time is for events - created, updated, last seen, last reported - where the\n * question is \"how stale is this\" and the answer is the gap, not the date.\n */\nconst TimeAgo = (props: TimeAgoProps) => {\n const { l } = useI18n();\n const exact = l(props.value, { date: props.format ?? \"lll\" });\n\n return (\n <ClientOnly\n fallback={\n <span className={props.className} title={exact}>\n {exact}\n </span>\n }\n >\n <span className={props.className} title={exact}>\n {l(props.value, { date: \"fromNow\" })}\n </span>\n </ClientOnly>\n );\n};\n\nexport default TimeAgo;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAM,WAAW,UAAwB;CACvC,MAAM,EAAE,MAAM,QAAQ;CACtB,MAAM,QAAQ,EAAE,MAAM,OAAO,EAAE,MAAM,MAAM,UAAU,MAAM,CAAC;CAE5D,OACE,oBAAC,YAAD;EACE,UACE,oBAAC,QAAD;GAAM,WAAW,MAAM;GAAW,OAAO;GACtC,UAAA;EACG,CAAA;EAGR,UAAA,oBAAC,QAAD;GAAM,WAAW,MAAM;GAAW,OAAO;GACtC,UAAA,EAAE,MAAM,OAAO,EAAE,MAAM,UAAU,CAAC;EAC/B,CAAA;CACI,CAAA;AAEhB"}
1
+ {"version":3,"file":"TimeAgo.js","names":[],"sources":["../../src/core/TimeAgo.tsx"],"sourcesContent":["import type { DateTime } from \"alepha/datetime\";\nimport { ClientOnly } from \"alepha/react\";\nimport { useI18n } from \"alepha/react/i18n\";\n\nexport interface TimeAgoProps {\n /**\n * The instant. The same set `useI18n().l()` takes, `DateTime` included -\n * `DateTimeProvider.now()` returns one, so a narrower type here would make\n * the component unusable from exactly the place that owns the clock.\n */\n value: string | number | Date | DateTime;\n\n /**\n * The exact form, shown on hover and rendered on the server.\n *\n * ⚠️ A dayjs format string, not an `Intl` options bag.\n * `I18nLocalizeOptions` has `date` and `number` only - there is no `time` -\n * so `lll` is how a date AND a time are asked for.\n */\n format?: string;\n\n className?: string;\n}\n\n/**\n * An instant, read as \"2 hours ago\", with the exact datetime on hover.\n *\n * ## Why a component and not a fifth spelling\n *\n * There were four ways to write this - `dt.of(x).fromNow()`,\n * `dateFormatter.of(x).fromNow()`, `l(x, { date: \"fromNow\" })` and\n * `<Localize value={x} date=\"fromNow\" />` - and **none of them carried the\n * exact date**. A tooltip added by hand is a tooltip added to some call sites\n * and forgotten on the rest, which is what the Apps table's Last seen column\n * demonstrated by rendering four rows of `Sep 9, 2026 7:00 PM` and making the\n * reader subtract dates to see whether a copy was alive (feedback #P2174).\n *\n * ## ⚠️ The SSR guard is built in, and that is the point\n *\n * A `fromNow()` string is computed from the clock, so it differs between the\n * server render and hydration and trips React #418. Before this component\n * there were 11 `ClientOnly` guards against 42 relative-time call sites: most\n * were simply unguarded. Putting the guard inside means the next call site\n * cannot forget it.\n *\n * The server renders the EXACT datetime rather than nothing. A crawler, a\n * reader with no JavaScript and the first paint all get a true answer instead\n * of a blank, which matters on a page server-rendered for an audience that\n * may never run the client. The visible swap on hydration is the price, and\n * it is a swap from correct to more readable.\n *\n * ## Where NOT to use it\n *\n * A date somebody CHOSE, rather than one that happened: a release target\n * date, a quest due date. \"in 3 months\" is not a deadline anyone can plan\n * against, and the relative form actively destroys the information. Relative\n * time is for events - created, updated, last seen, last reported - where the\n * question is \"how stale is this\" and the answer is the gap, not the date.\n */\nconst TimeAgo = (props: TimeAgoProps) => {\n const { l } = useI18n();\n const exact = l(props.value, { date: props.format ?? \"lll\" });\n\n return (\n <ClientOnly\n fallback={\n <span className={props.className} title={exact}>\n {exact}\n </span>\n }\n >\n <span className={props.className} title={exact}>\n {l(props.value, { date: \"fromNow\" })}\n </span>\n </ClientOnly>\n );\n};\n\nexport default TimeAgo;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,MAAM,WAAW,UAAwB;CACvC,MAAM,EAAE,MAAM,QAAQ;CACtB,MAAM,QAAQ,EAAE,MAAM,OAAO,EAAE,MAAM,MAAM,UAAU,MAAM,CAAC;CAE5D,OACE,oBAAC,YAAD;EACE,UACE,oBAAC,QAAD;GAAM,WAAW,MAAM;GAAW,OAAO;GACtC,UAAA;EACG,CAAA;EAGR,UAAA,oBAAC,QAAD;GAAM,WAAW,MAAM;GAAW,OAAO;GACtC,UAAA,EAAE,MAAM,OAAO,EAAE,MAAM,UAAU,CAAC;EAC/B,CAAA;CACI,CAAA;AAEhB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The English catalogue for every key `@alepha/ui` asks for.
3
+ *
4
+ * The components default to English already; this record is for an application
5
+ * whose fallback language is not English, where a key missing from the `en`
6
+ * catalogue would otherwise be read in the fallback language. A plain record
7
+ * the application spreads into its own catalogue, and a subpath of its own so
8
+ * that catalogue can load it lazily:
9
+ *
10
+ * ```ts
11
+ * en = $dictionary({
12
+ * lazy: async () => {
13
+ * const { uiEn } = await import("@alepha/ui/i18n/en");
14
+ * return { default: { ...uiEn, "nav.home": "Home" } };
15
+ * },
16
+ * });
17
+ * ```
18
+ *
19
+ * @module alepha.ui.i18n.en
20
+ */
21
+ export { uiEn } from "./uiEn.ts";
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export { uiEn } from "./uiEn.js";
@@ -0,0 +1,37 @@
1
+ import type { DictionaryEntry } from "alepha/react/i18n";
2
+ /**
3
+ * English strings for every component in this package.
4
+ *
5
+ * ### Why it exists when the components already speak English
6
+ *
7
+ * Every component calls `tr("…", { default: "English" })`, and the default is
8
+ * the last thing `tr()` tries: the active language first, then `fallbackLang`,
9
+ * and only then the default. In an application whose `fallbackLang` is `fr` and
10
+ * which spreads `uiFr` into its French catalogue, an English visitor's lookup
11
+ * misses in `en`, finds the key in `fr`, and gets a French interface; the
12
+ * English default is never reached. Spreading this record into the `en`
13
+ * catalogue makes the first lookup hit:
14
+ *
15
+ * ```ts
16
+ * export class AppI18n {
17
+ * en = $dictionary({
18
+ * lazy: async () => ({ default: { ...uiEn, ...myKeys } }),
19
+ * });
20
+ * fr = $dictionary({
21
+ * lazy: async () => ({ default: { ...uiFr, ...mesClés } }),
22
+ * });
23
+ * }
24
+ * ```
25
+ *
26
+ * Spread first so the application always wins on a key it also defines. An
27
+ * application whose `fallbackLang` is `en` does not need it.
28
+ *
29
+ * ### Coverage
30
+ *
31
+ * The same keys as `uiFr`, and each value is the English default its component
32
+ * passes, so spreading it changes nothing an English visitor saw before. Keys
33
+ * interpolate with `$1`, `$2` … positionally, matching the `args` each call site
34
+ * passes.
35
+ */
36
+ export declare const uiEn: Record<string, DictionaryEntry>;
37
+ //# sourceMappingURL=uiEn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uiEn.d.ts","sourceRoot":"","sources":["../../../src/i18n/en/uiEn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CA0kDhD,CAAC"}