@eifi1/ui-kit 0.9.0 → 0.11.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 (243) hide show
  1. package/README.md +37 -23
  2. package/dist/components/alert-banner.d.ts +57 -5
  3. package/dist/components/alert-banner.js +63 -17
  4. package/dist/components/alert-banner.js.map +1 -1
  5. package/dist/components/amount-input.d.ts +6 -0
  6. package/dist/components/breadcrumbs.d.ts +60 -0
  7. package/dist/components/breadcrumbs.js +88 -0
  8. package/dist/components/breadcrumbs.js.map +1 -0
  9. package/dist/components/bulk-action-bar.d.ts +112 -0
  10. package/dist/components/bulk-action-bar.js +196 -0
  11. package/dist/components/bulk-action-bar.js.map +1 -0
  12. package/dist/components/button-group.d.ts +58 -3
  13. package/dist/components/button-group.js +56 -5
  14. package/dist/components/button-group.js.map +1 -1
  15. package/dist/components/calculator.d.ts +6 -0
  16. package/dist/components/calendar-heatmap.d.ts +124 -0
  17. package/dist/components/calendar-heatmap.js +295 -0
  18. package/dist/components/calendar-heatmap.js.map +1 -0
  19. package/dist/components/chip.d.ts +31 -5
  20. package/dist/components/chip.js +85 -5
  21. package/dist/components/chip.js.map +1 -1
  22. package/dist/components/choice-card.d.ts +34 -2
  23. package/dist/components/choice-card.js +49 -0
  24. package/dist/components/choice-card.js.map +1 -1
  25. package/dist/components/copy-button.d.ts +14 -4
  26. package/dist/components/copy-button.js +17 -4
  27. package/dist/components/copy-button.js.map +1 -1
  28. package/dist/components/data-table.js +2 -0
  29. package/dist/components/data-table.js.map +1 -1
  30. package/dist/components/date-picker.d.ts +22 -2
  31. package/dist/components/date-picker.js +11 -3
  32. package/dist/components/date-picker.js.map +1 -1
  33. package/dist/components/description-list.d.ts +43 -6
  34. package/dist/components/description-list.js +91 -11
  35. package/dist/components/description-list.js.map +1 -1
  36. package/dist/components/dialog-frame.d.ts +7 -0
  37. package/dist/components/dialog-frame.js.map +1 -1
  38. package/dist/components/disclosure.d.ts +57 -2
  39. package/dist/components/disclosure.js +24 -12
  40. package/dist/components/disclosure.js.map +1 -1
  41. package/dist/components/field.d.ts +43 -0
  42. package/dist/components/field.js +52 -0
  43. package/dist/components/field.js.map +1 -0
  44. package/dist/components/file-button.d.ts +1 -0
  45. package/dist/components/file-dropzone.d.ts +4 -4
  46. package/dist/components/file-dropzone.js +2 -1
  47. package/dist/components/file-dropzone.js.map +1 -1
  48. package/dist/components/floating-panel.d.ts +147 -4
  49. package/dist/components/floating-panel.js +188 -28
  50. package/dist/components/floating-panel.js.map +1 -1
  51. package/dist/components/full-bleed-dialog.d.ts +23 -4
  52. package/dist/components/full-bleed-dialog.js +11 -2
  53. package/dist/components/full-bleed-dialog.js.map +1 -1
  54. package/dist/components/list.d.ts +187 -0
  55. package/dist/components/list.js +221 -0
  56. package/dist/components/list.js.map +1 -0
  57. package/dist/components/menu-item.d.ts +109 -0
  58. package/dist/components/menu-item.js +88 -0
  59. package/dist/components/menu-item.js.map +1 -0
  60. package/dist/components/mini-calendar.d.ts +70 -5
  61. package/dist/components/mini-calendar.js +166 -62
  62. package/dist/components/mini-calendar.js.map +1 -1
  63. package/dist/components/modal.d.ts +23 -1
  64. package/dist/components/modal.js +36 -10
  65. package/dist/components/modal.js.map +1 -1
  66. package/dist/components/nav-pills.d.ts +66 -0
  67. package/dist/components/nav-pills.js +65 -0
  68. package/dist/components/nav-pills.js.map +1 -0
  69. package/dist/components/number-field.d.ts +6 -0
  70. package/dist/components/number-input.d.ts +6 -0
  71. package/dist/components/numpad-sheet.d.ts +6 -0
  72. package/dist/components/page-contents.js +1 -2
  73. package/dist/components/page-contents.js.map +1 -1
  74. package/dist/components/page-header.d.ts +37 -0
  75. package/dist/components/page-header.js +36 -0
  76. package/dist/components/page-header.js.map +1 -0
  77. package/dist/components/progress-bar.d.ts +31 -2
  78. package/dist/components/progress-bar.js +73 -7
  79. package/dist/components/progress-bar.js.map +1 -1
  80. package/dist/components/series-chart-labels.d.ts +3 -0
  81. package/dist/components/series-chart-labels.js +2 -1
  82. package/dist/components/series-chart-labels.js.map +1 -1
  83. package/dist/components/series-chart.d.ts +32 -0
  84. package/dist/components/series-chart.js +141 -4
  85. package/dist/components/series-chart.js.map +1 -1
  86. package/dist/components/settings-fields.d.ts +1 -0
  87. package/dist/components/status-dot.d.ts +53 -0
  88. package/dist/components/status-dot.js +57 -0
  89. package/dist/components/status-dot.js.map +1 -0
  90. package/dist/components/table.d.ts +78 -13
  91. package/dist/components/table.js +84 -11
  92. package/dist/components/table.js.map +1 -1
  93. package/dist/components/text.d.ts +70 -0
  94. package/dist/components/text.js +24 -0
  95. package/dist/components/text.js.map +1 -0
  96. package/dist/components/time-input.d.ts +1 -0
  97. package/dist/components/toast.d.ts +167 -0
  98. package/dist/components/toast.js +226 -0
  99. package/dist/components/toast.js.map +1 -0
  100. package/dist/components/toggle-group.d.ts +44 -1
  101. package/dist/components/toggle-group.js +73 -4
  102. package/dist/components/toggle-group.js.map +1 -1
  103. package/dist/components/tooltip.d.ts +46 -15
  104. package/dist/components/tooltip.js +87 -47
  105. package/dist/components/tooltip.js.map +1 -1
  106. package/dist/components/ui.d.ts +158 -7
  107. package/dist/components/ui.js +191 -10
  108. package/dist/components/ui.js.map +1 -1
  109. package/dist/components/user-avatar.d.ts +25 -3
  110. package/dist/components/user-avatar.js +32 -3
  111. package/dist/components/user-avatar.js.map +1 -1
  112. package/dist/hooks/use-close-transition.d.ts +7 -1
  113. package/dist/hooks/use-close-transition.js +5 -2
  114. package/dist/hooks/use-close-transition.js.map +1 -1
  115. package/dist/hooks/use-copy-to-clipboard.js +1 -1
  116. package/dist/hooks/use-copy-to-clipboard.js.map +1 -1
  117. package/dist/hooks/use-file-drop.d.ts +1 -0
  118. package/dist/i18n/defaults.d.ts +6 -0
  119. package/dist/i18n/defaults.js +11 -1
  120. package/dist/i18n/defaults.js.map +1 -1
  121. package/dist/i18n/kit-labels.d.ts +11 -0
  122. package/dist/i18n/kit-labels.js.map +1 -1
  123. package/dist/i18n/locales/de-CH-informal.d.ts +6 -0
  124. package/dist/i18n/locales/de-CH.d.ts +6 -0
  125. package/dist/i18n/locales/de-informal.d.ts +6 -0
  126. package/dist/i18n/locales/de.d.ts +6 -0
  127. package/dist/i18n/locales/de.js +30 -2
  128. package/dist/i18n/locales/de.js.map +1 -1
  129. package/dist/i18n/locales/es.d.ts +6 -0
  130. package/dist/i18n/locales/es.js +30 -2
  131. package/dist/i18n/locales/es.js.map +1 -1
  132. package/dist/i18n/locales/fr.d.ts +6 -0
  133. package/dist/i18n/locales/fr.js +30 -2
  134. package/dist/i18n/locales/fr.js.map +1 -1
  135. package/dist/i18n/locales/hu.d.ts +6 -0
  136. package/dist/i18n/locales/hu.js +30 -2
  137. package/dist/i18n/locales/hu.js.map +1 -1
  138. package/dist/i18n/locales/it.d.ts +6 -0
  139. package/dist/i18n/locales/it.js +30 -2
  140. package/dist/i18n/locales/it.js.map +1 -1
  141. package/dist/i18n/locales/zh.d.ts +6 -0
  142. package/dist/i18n/locales/zh.js +30 -2
  143. package/dist/i18n/locales/zh.js.map +1 -1
  144. package/dist/index.d.ts +27 -15
  145. package/dist/index.js +15 -0
  146. package/dist/index.js.map +1 -1
  147. package/dist/lib/clipping.d.ts +25 -0
  148. package/dist/lib/clipping.js +17 -0
  149. package/dist/lib/clipping.js.map +1 -0
  150. package/dist/lib/dates.d.ts +17 -1
  151. package/dist/lib/dates.js +19 -0
  152. package/dist/lib/dates.js.map +1 -1
  153. package/dist/rhf/form.d.ts +1 -0
  154. package/dist/rhf/use-rhf-wizard-step.d.ts +22 -0
  155. package/dist/rhf/use-rhf-wizard-step.js +38 -0
  156. package/dist/rhf/use-rhf-wizard-step.js.map +1 -0
  157. package/dist/rhf.d.ts +2 -0
  158. package/dist/rhf.js +1 -0
  159. package/dist/rhf.js.map +1 -1
  160. package/dist/search/command-palette.d.ts +19 -2
  161. package/dist/search/command-palette.js +16 -5
  162. package/dist/search/command-palette.js.map +1 -1
  163. package/dist/search/global-search.d.ts +26 -1
  164. package/dist/search/global-search.js +29 -13
  165. package/dist/search/global-search.js.map +1 -1
  166. package/dist/search.d.ts +1 -1
  167. package/dist/shell/topbar-action-menu.d.ts +73 -3
  168. package/dist/shell/topbar-action-menu.js +100 -27
  169. package/dist/shell/topbar-action-menu.js.map +1 -1
  170. package/dist/shell.d.ts +2 -1
  171. package/dist/wizard/stepper-nav.d.ts +1 -0
  172. package/dist/wizard/stepper-nav.js +1 -1
  173. package/dist/wizard/stepper-nav.js.map +1 -1
  174. package/dist/wizard/types.d.ts +2 -2
  175. package/dist/wizard/types.js.map +1 -1
  176. package/dist/wizard/use-wizard.js +1 -1
  177. package/dist/wizard/use-wizard.js.map +1 -1
  178. package/dist/wizard/wizard-context.d.ts +7 -1
  179. package/dist/wizard/wizard-context.js +4 -0
  180. package/dist/wizard/wizard-context.js.map +1 -1
  181. package/dist/wizard/wizard-summary.js +3 -3
  182. package/dist/wizard/wizard-summary.js.map +1 -1
  183. package/dist/wizard.d.ts +2 -1
  184. package/package.json +16 -12
  185. package/src/components/alert-banner.tsx +149 -21
  186. package/src/components/breadcrumbs.tsx +168 -0
  187. package/src/components/bulk-action-bar.tsx +362 -0
  188. package/src/components/button-group.tsx +124 -4
  189. package/src/components/calendar-heatmap.tsx +504 -0
  190. package/src/components/chip.tsx +128 -7
  191. package/src/components/choice-card.tsx +97 -1
  192. package/src/components/copy-button.tsx +29 -7
  193. package/src/components/data-table.tsx +7 -0
  194. package/src/components/date-picker.tsx +49 -1
  195. package/src/components/description-list.tsx +168 -15
  196. package/src/components/dialog-frame.tsx +7 -0
  197. package/src/components/disclosure.tsx +93 -21
  198. package/src/components/field.tsx +137 -0
  199. package/src/components/file-dropzone.tsx +9 -10
  200. package/src/components/floating-panel.tsx +366 -15
  201. package/src/components/full-bleed-dialog.tsx +42 -5
  202. package/src/components/list.tsx +443 -0
  203. package/src/components/menu-item.tsx +235 -0
  204. package/src/components/mini-calendar.tsx +245 -54
  205. package/src/components/modal.tsx +80 -17
  206. package/src/components/nav-pills.tsx +145 -0
  207. package/src/components/page-contents.tsx +4 -4
  208. package/src/components/page-header.tsx +68 -0
  209. package/src/components/progress-bar.tsx +129 -11
  210. package/src/components/series-chart-labels.ts +4 -0
  211. package/src/components/series-chart.tsx +274 -3
  212. package/src/components/status-dot.tsx +107 -0
  213. package/src/components/table.tsx +176 -17
  214. package/src/components/text.tsx +97 -0
  215. package/src/components/toast.tsx +441 -0
  216. package/src/components/toggle-group.tsx +128 -4
  217. package/src/components/tooltip.tsx +200 -100
  218. package/src/components/ui.tsx +381 -14
  219. package/src/components/user-avatar.tsx +57 -3
  220. package/src/hooks/use-close-transition.ts +14 -5
  221. package/src/hooks/use-copy-to-clipboard.ts +1 -1
  222. package/src/i18n/defaults.ts +10 -0
  223. package/src/i18n/kit-labels.tsx +10 -0
  224. package/src/i18n/locales/de.ts +29 -0
  225. package/src/i18n/locales/es.ts +29 -0
  226. package/src/i18n/locales/fr.ts +29 -0
  227. package/src/i18n/locales/hu.ts +29 -0
  228. package/src/i18n/locales/it.ts +29 -0
  229. package/src/i18n/locales/zh.ts +29 -0
  230. package/src/index.ts +31 -0
  231. package/src/lib/clipping.ts +34 -0
  232. package/src/lib/dates.ts +37 -0
  233. package/src/rhf/use-rhf-wizard-step.ts +113 -0
  234. package/src/rhf.ts +2 -0
  235. package/src/search/command-palette.tsx +42 -5
  236. package/src/search/global-search.tsx +59 -18
  237. package/src/shell/topbar-action-menu.tsx +239 -49
  238. package/src/wizard/stepper-nav.tsx +2 -1
  239. package/src/wizard/types.ts +2 -2
  240. package/src/wizard/use-wizard.ts +3 -3
  241. package/src/wizard/wizard-context.tsx +9 -0
  242. package/src/wizard/wizard-summary.tsx +14 -10
  243. package/tokens.css +97 -0
@@ -1,5 +1,6 @@
1
1
  import { DEFAULT_DATA_TABLE_LABELS } from "../components/data-table-labels";
2
2
  import { DEFAULT_MINI_CALENDAR_LABELS } from "../components/mini-calendar";
3
+ import { DEFAULT_CALENDAR_HEATMAP_LABELS } from "../components/calendar-heatmap";
3
4
  import { DEFAULT_MONTH_PICKER_LABELS } from "../components/month-picker";
4
5
  import { DEFAULT_PAGE_CONTENTS_LABELS } from "../components/page-contents";
5
6
  import { DEFAULT_POPOVER_LABELS } from "../components/popover";
@@ -25,6 +26,10 @@ import { DEFAULT_CONFIRM_DIALOG_LABELS } from "../components/confirm-dialog";
25
26
  import { DEFAULT_FLOATING_PANEL_LABELS } from "../components/floating-panel";
26
27
  import { DEFAULT_FEEDBACK_ATTACHMENT_LABELS } from "../feedback/feedback-attachment";
27
28
  import { DEFAULT_COPY_BUTTON_LABELS } from "../components/copy-button";
29
+ import { DEFAULT_BULK_ACTION_BAR_LABELS } from "../components/bulk-action-bar";
30
+ import { DEFAULT_LIST_LABELS } from "../components/list";
31
+ import { DEFAULT_BREADCRUMBS_LABELS } from "../components/breadcrumbs";
32
+ import { DEFAULT_TOAST_LABELS } from "../components/toast";
28
33
  import {
29
34
  DEFAULT_APP_SHELL_LABELS,
30
35
  DEFAULT_CALCULATOR_LABELS,
@@ -52,6 +57,7 @@ export const DEFAULT_UI_KIT_LABELS: UiKitLabels = {
52
57
  common: DEFAULT_COMMON_LABELS,
53
58
  dataTable: DEFAULT_DATA_TABLE_LABELS,
54
59
  miniCalendar: DEFAULT_MINI_CALENDAR_LABELS,
60
+ calendarHeatmap: DEFAULT_CALENDAR_HEATMAP_LABELS,
55
61
  datePicker: DEFAULT_DATE_PICKER_LABELS,
56
62
  monthPicker: DEFAULT_MONTH_PICKER_LABELS,
57
63
  popover: DEFAULT_POPOVER_LABELS,
@@ -88,4 +94,8 @@ export const DEFAULT_UI_KIT_LABELS: UiKitLabels = {
88
94
  confirmDialog: DEFAULT_CONFIRM_DIALOG_LABELS,
89
95
  floatingPanel: DEFAULT_FLOATING_PANEL_LABELS,
90
96
  copyButton: DEFAULT_COPY_BUTTON_LABELS,
97
+ bulkActionBar: DEFAULT_BULK_ACTION_BAR_LABELS,
98
+ list: DEFAULT_LIST_LABELS,
99
+ breadcrumbs: DEFAULT_BREADCRUMBS_LABELS,
100
+ toast: DEFAULT_TOAST_LABELS,
91
101
  };
@@ -2,6 +2,7 @@ import { createContext, useContext, useMemo } from "react";
2
2
  import type { ReactNode } from "react";
3
3
  import type { DataTableLabels } from "../components/data-table-labels";
4
4
  import type { MiniCalendarLabels, WeekDay } from "../components/mini-calendar";
5
+ import type { CalendarHeatmapLabels } from "../components/calendar-heatmap";
5
6
  import type { PopoverLabels } from "../components/popover";
6
7
  import type { ChipInputLabels } from "../components/chip";
7
8
  import type { FieldSyncLabels } from "../components/field-sync";
@@ -27,6 +28,10 @@ import type { FeedbackAttachmentFieldLabels } from "../feedback/feedback-attachm
27
28
  import type { ConfirmDialogLabels } from "../components/confirm-dialog";
28
29
  import type { FloatingPanelLabels } from "../components/floating-panel";
29
30
  import type { CopyButtonLabels } from "../components/copy-button";
31
+ import type { BulkActionBarLabels } from "../components/bulk-action-bar";
32
+ import type { ListLabels } from "../components/list";
33
+ import type { BreadcrumbsLabels } from "../components/breadcrumbs";
34
+ import type { ToastLabels } from "../components/toast";
30
35
 
31
36
  /**
32
37
  * EVERY string the kit renders, as one typed tree — and an optional provider that
@@ -193,6 +198,7 @@ export interface UiKitLabels {
193
198
  common: CommonLabels;
194
199
  dataTable: DataTableLabels;
195
200
  miniCalendar: MiniCalendarLabels;
201
+ calendarHeatmap: CalendarHeatmapLabels;
196
202
  datePicker: DatePickerLabels;
197
203
  monthPicker: MonthPickerLabels;
198
204
  popover: PopoverLabels;
@@ -229,6 +235,10 @@ export interface UiKitLabels {
229
235
  confirmDialog: ConfirmDialogLabels;
230
236
  floatingPanel: FloatingPanelLabels;
231
237
  copyButton: CopyButtonLabels;
238
+ bulkActionBar: BulkActionBarLabels;
239
+ list: ListLabels;
240
+ breadcrumbs: BreadcrumbsLabels;
241
+ toast: ToastLabels;
232
242
  }
233
243
 
234
244
  /** Any subset of the tree, one level deep — each namespace may be partial, and a
@@ -118,6 +118,14 @@ export function uiKitLabelsDe(numberLocale = "de-DE"): UiKitLabels {
118
118
  rangeSelected: (from, to) =>
119
119
  `Zeitraum ${from} bis ${to} gewählt. Wählen Sie ein Startdatum, um neu zu beginnen.`,
120
120
  },
121
+ calendarHeatmap: {
122
+ grid: "Tageswerte",
123
+ day: (date, value) => `${date}: ${value}`,
124
+ less: "Weniger",
125
+ more: "Mehr",
126
+ truncated: (count) =>
127
+ `Die neuesten Tage werden angezeigt; ${n(count)} ${count === 1 ? "früherer Tag wird" : "frühere Tage werden"} nicht angezeigt.`,
128
+ },
121
129
  datePicker: {
122
130
  apply: "Übernehmen",
123
131
  cancel: "Abbrechen",
@@ -239,6 +247,11 @@ export function uiKitLabelsDe(numberLocale = "de-DE"): UiKitLabels {
239
247
  dialogFrame: {
240
248
  close: "Schließen",
241
249
  },
250
+ bulkActionBar: {
251
+ selected: (count) => `${n(count)} ausgewählt`,
252
+ clear: "Auswahl aufheben",
253
+ cleared: "Auswahl aufgehoben",
254
+ },
242
255
  swipeableRow: {
243
256
  actions: "Zeilenaktionen",
244
257
  },
@@ -379,6 +392,7 @@ export function uiKitLabelsDe(numberLocale = "de-DE"): UiKitLabels {
379
392
  "Zum Zoomen ziehen: Eine annähernd quadratische Auswahl zoomt beide Achsen, eine lange, schmale nur ihre eigene. Doppelklick setzt zurück.",
380
393
  empty: "Keine Daten",
381
394
  legend: "Datenreihen",
395
+ points: "Diagrammwerte",
382
396
  },
383
397
  confirmDialog: {
384
398
  confirm: "Bestätigen",
@@ -386,6 +400,7 @@ export function uiKitLabelsDe(numberLocale = "de-DE"): UiKitLabels {
386
400
  },
387
401
  floatingPanel: {
388
402
  close: "Schließen",
403
+ badge: (count) => `${n(count)} neu`,
389
404
  },
390
405
  copyButton: {
391
406
  copy: "Kopieren",
@@ -394,6 +409,20 @@ export function uiKitLabelsDe(numberLocale = "de-DE"): UiKitLabels {
394
409
  copiedAnnouncement: "In die Zwischenablage kopiert",
395
410
  failedAnnouncement: "Kopieren in die Zwischenablage fehlgeschlagen",
396
411
  },
412
+ list: {
413
+ unread: "Ungelesen",
414
+ opensInNewTab: "öffnet in einem neuen Tab",
415
+ },
416
+ breadcrumbs: {
417
+ label: "Brotkrümelnavigation",
418
+ showAll: "Vollständigen Pfad anzeigen",
419
+ },
420
+ toast: {
421
+ close: "Benachrichtigung schließen",
422
+ notifications: "Benachrichtigungen",
423
+ undo: "Rückgängig",
424
+ redo: "Wiederholen",
425
+ },
397
426
  };
398
427
  }
399
428
 
@@ -125,6 +125,14 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
125
125
  panel: "Elegir un mes",
126
126
  month: (monthYear) => monthYear,
127
127
  },
128
+ calendarHeatmap: {
129
+ grid: "Valores diarios",
130
+ day: (date, value) => `${date}: ${value}`,
131
+ less: "Menos",
132
+ more: "Más",
133
+ truncated: (count) =>
134
+ `Se muestran los días más recientes; ${count === 1 ? "no se muestra 1 día anterior" : `no se muestran ${n(count)} días anteriores`}.`,
135
+ },
128
136
  datePicker: {
129
137
  apply: "Aplicar",
130
138
  cancel: "Cancelar",
@@ -236,6 +244,11 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
236
244
  dialogFrame: {
237
245
  close: "Cerrar",
238
246
  },
247
+ bulkActionBar: {
248
+ selected: (count) => `${n(count)} ${count === 1 ? "seleccionado" : "seleccionados"}`,
249
+ clear: "Borrar selección",
250
+ cleared: "Selección borrada",
251
+ },
239
252
  swipeableRow: {
240
253
  actions: "Acciones de la fila",
241
254
  },
@@ -372,6 +385,7 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
372
385
  "Arrastra para ampliar: una selección más o menos cuadrada amplía ambos ejes; una larga y estrecha, solo el suyo. Haz doble clic para restablecer.",
373
386
  empty: "Sin datos",
374
387
  legend: "Series",
388
+ points: "Valores del gráfico",
375
389
  },
376
390
  confirmDialog: {
377
391
  confirm: "Confirmar",
@@ -379,6 +393,7 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
379
393
  },
380
394
  floatingPanel: {
381
395
  close: "Cerrar",
396
+ badge: (count) => `${n(count)} ${plural(count, "nuevo", "nuevos")}`,
382
397
  },
383
398
  copyButton: {
384
399
  copy: "Copiar",
@@ -387,6 +402,20 @@ export function uiKitLabelsEs(numberLocale = "es-ES"): UiKitLabels {
387
402
  copiedAnnouncement: "Copiado al portapapeles",
388
403
  failedAnnouncement: "No se pudo copiar al portapapeles",
389
404
  },
405
+ list: {
406
+ unread: "No leído",
407
+ opensInNewTab: "se abre en una pestaña nueva",
408
+ },
409
+ breadcrumbs: {
410
+ label: "Ruta de navegación",
411
+ showAll: "Mostrar la ruta completa",
412
+ },
413
+ toast: {
414
+ close: "Cerrar notificación",
415
+ notifications: "Notificaciones",
416
+ undo: "Deshacer",
417
+ redo: "Rehacer",
418
+ },
390
419
  };
391
420
  }
392
421
 
@@ -122,6 +122,14 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
122
122
  rangeSelected: (from, to) =>
123
123
  `Période du ${from} au ${to} sélectionnée. Choisissez une date de début pour recommencer.`,
124
124
  },
125
+ calendarHeatmap: {
126
+ grid: "Valeurs quotidiennes",
127
+ day: (date, value) => `${date} : ${value}`,
128
+ less: "Moins",
129
+ more: "Plus",
130
+ truncated: (count) =>
131
+ `Affichage des jours les plus récents ; ${n(count)} ${count === 1 ? "jour antérieur n’est pas affiché" : "jours antérieurs ne sont pas affichés"}.`,
132
+ },
125
133
  datePicker: {
126
134
  apply: "Appliquer",
127
135
  cancel: "Annuler",
@@ -241,6 +249,11 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
241
249
  dialogFrame: {
242
250
  close: "Fermer",
243
251
  },
252
+ bulkActionBar: {
253
+ selected: (count) => `${n(count)} ${count === 1 ? "sélectionné" : "sélectionnés"}`,
254
+ clear: "Effacer la sélection",
255
+ cleared: "Sélection effacée",
256
+ },
244
257
  swipeableRow: {
245
258
  actions: "Actions de la ligne",
246
259
  },
@@ -385,6 +398,7 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
385
398
  "Faites glisser pour zoomer\u00a0: une sélection à peu près carrée zoome sur les deux axes, une sélection longue et étroite sur son seul axe. Double-cliquez pour réinitialiser.",
386
399
  empty: "Aucune donnée",
387
400
  legend: "Séries",
401
+ points: "Valeurs du graphique",
388
402
  },
389
403
  confirmDialog: {
390
404
  confirm: "Confirmer",
@@ -392,6 +406,7 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
392
406
  },
393
407
  floatingPanel: {
394
408
  close: "Fermer",
409
+ badge: (count) => `${n(count)} ${plural(count, "nouveau", "nouveaux")}`,
395
410
  },
396
411
  copyButton: {
397
412
  copy: "Copier",
@@ -400,6 +415,20 @@ export function uiKitLabelsFr(numberLocale = "fr-FR"): UiKitLabels {
400
415
  copiedAnnouncement: "Copié dans le presse-papiers",
401
416
  failedAnnouncement: "Impossible de copier dans le presse-papiers",
402
417
  },
418
+ list: {
419
+ unread: "Non lu",
420
+ opensInNewTab: "s’ouvre dans un nouvel onglet",
421
+ },
422
+ breadcrumbs: {
423
+ label: "Fil d’Ariane",
424
+ showAll: "Afficher le chemin complet",
425
+ },
426
+ toast: {
427
+ close: "Fermer la notification",
428
+ notifications: "Notifications",
429
+ undo: "Annuler",
430
+ redo: "Rétablir",
431
+ },
403
432
  };
404
433
  }
405
434
 
@@ -121,6 +121,14 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
121
121
  panel: "Hónap kiválasztása",
122
122
  month: (monthYear) => monthYear,
123
123
  },
124
+ calendarHeatmap: {
125
+ grid: "Napi értékek",
126
+ day: (date, value) => `${date}: ${value}`,
127
+ less: "Kevesebb",
128
+ more: "Több",
129
+ truncated: (count) =>
130
+ `A legutóbbi napok láthatók; ${n(count)} korábbi nap nem látható.`,
131
+ },
124
132
  datePicker: {
125
133
  apply: "Alkalmaz",
126
134
  cancel: "Mégse",
@@ -234,6 +242,11 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
234
242
  dialogFrame: {
235
243
  close: "Bezárás",
236
244
  },
245
+ bulkActionBar: {
246
+ selected: (count) => `${n(count)} kijelölve`,
247
+ clear: "Kijelölés törlése",
248
+ cleared: "Kijelölés törölve",
249
+ },
237
250
  swipeableRow: {
238
251
  actions: "Sorműveletek",
239
252
  },
@@ -373,6 +386,7 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
373
386
  "Húzással nagyíthat: a nagyjából négyzetes kijelölés mindkét tengelyt nagyítja, a hosszú, keskeny csak a saját tengelyét. Dupla kattintással visszaállíthatja.",
374
387
  empty: "Nincs adat",
375
388
  legend: "Adatsorok",
389
+ points: "Diagramértékek",
376
390
  },
377
391
  confirmDialog: {
378
392
  confirm: "Megerősítés",
@@ -380,6 +394,7 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
380
394
  },
381
395
  floatingPanel: {
382
396
  close: "Bezárás",
397
+ badge: (count) => `${n(count)} új`,
383
398
  },
384
399
  copyButton: {
385
400
  copy: "Másolás",
@@ -388,6 +403,20 @@ export function uiKitLabelsHu(numberLocale = "hu-HU"): UiKitLabels {
388
403
  copiedAnnouncement: "Vágólapra másolva",
389
404
  failedAnnouncement: "Nem sikerült a vágólapra másolni",
390
405
  },
406
+ list: {
407
+ unread: "Olvasatlan",
408
+ opensInNewTab: "új lapon nyílik meg",
409
+ },
410
+ breadcrumbs: {
411
+ label: "Morzsamenü",
412
+ showAll: "Teljes útvonal megjelenítése",
413
+ },
414
+ toast: {
415
+ close: "Értesítés bezárása",
416
+ notifications: "Értesítések",
417
+ undo: "Visszavonás",
418
+ redo: "Újra",
419
+ },
391
420
  };
392
421
  }
393
422
 
@@ -125,6 +125,14 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
125
125
  panel: "Scegli un mese",
126
126
  month: (monthYear) => monthYear,
127
127
  },
128
+ calendarHeatmap: {
129
+ grid: "Valori giornalieri",
130
+ day: (date, value) => `${date}: ${value}`,
131
+ less: "Meno",
132
+ more: "Più",
133
+ truncated: (count) =>
134
+ `Vengono mostrati i giorni più recenti; ${count === 1 ? "1 giorno precedente non è mostrato" : `${n(count)} giorni precedenti non sono mostrati`}.`,
135
+ },
128
136
  datePicker: {
129
137
  apply: "Applica",
130
138
  cancel: "Annulla",
@@ -237,6 +245,11 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
237
245
  dialogFrame: {
238
246
  close: "Chiudi",
239
247
  },
248
+ bulkActionBar: {
249
+ selected: (count) => `${n(count)} ${count === 1 ? "selezionato" : "selezionati"}`,
250
+ clear: "Annulla selezione",
251
+ cleared: "Selezione annullata",
252
+ },
240
253
  swipeableRow: {
241
254
  actions: "Azioni della riga",
242
255
  },
@@ -374,6 +387,7 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
374
387
  "Trascina per ingrandire: una selezione più o meno quadrata ingrandisce entrambi gli assi, una lunga e sottile solo il proprio. Fai doppio clic per ripristinare.",
375
388
  empty: "Nessun dato",
376
389
  legend: "Serie",
390
+ points: "Valori del grafico",
377
391
  },
378
392
  confirmDialog: {
379
393
  confirm: "Conferma",
@@ -381,6 +395,7 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
381
395
  },
382
396
  floatingPanel: {
383
397
  close: "Chiudi",
398
+ badge: (count) => `${n(count)} ${plural(count, "nuovo", "nuovi")}`,
384
399
  },
385
400
  copyButton: {
386
401
  copy: "Copia",
@@ -389,6 +404,20 @@ export function uiKitLabelsIt(numberLocale = "it-IT"): UiKitLabels {
389
404
  copiedAnnouncement: "Copiato negli appunti",
390
405
  failedAnnouncement: "Impossibile copiare negli appunti",
391
406
  },
407
+ list: {
408
+ unread: "Non letto",
409
+ opensInNewTab: "si apre in una nuova scheda",
410
+ },
411
+ breadcrumbs: {
412
+ label: "Percorso di navigazione",
413
+ showAll: "Mostra percorso completo",
414
+ },
415
+ toast: {
416
+ close: "Chiudi notifica",
417
+ notifications: "Notifiche",
418
+ undo: "Annulla",
419
+ redo: "Ripeti",
420
+ },
392
421
  };
393
422
  }
394
423
 
@@ -120,6 +120,14 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
120
120
  panel: "选择月份",
121
121
  month: (monthYear) => monthYear,
122
122
  },
123
+ calendarHeatmap: {
124
+ grid: "每日数值",
125
+ day: (date, value) => `${date}:${value}`,
126
+ less: "较少",
127
+ more: "较多",
128
+ truncated: (count) =>
129
+ `仅显示最近的日期;另有 ${n(count)} 天未显示。`,
130
+ },
123
131
  datePicker: {
124
132
  apply: "应用",
125
133
  cancel: "取消",
@@ -231,6 +239,11 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
231
239
  dialogFrame: {
232
240
  close: "关闭",
233
241
  },
242
+ bulkActionBar: {
243
+ selected: (count) => `已选择 ${n(count)} 项`,
244
+ clear: "清除选择",
245
+ cleared: "已清除选择",
246
+ },
234
247
  swipeableRow: {
235
248
  actions: "行操作",
236
249
  },
@@ -362,6 +375,7 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
362
375
  "拖动以缩放:近似正方形的选区同时缩放两条坐标轴,细长的选区只缩放其所沿的那条轴。双击可重置。",
363
376
  empty: "无数据",
364
377
  legend: "数据系列",
378
+ points: "图表数值",
365
379
  },
366
380
  confirmDialog: {
367
381
  confirm: "确认",
@@ -369,6 +383,7 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
369
383
  },
370
384
  floatingPanel: {
371
385
  close: "关闭",
386
+ badge: (count) => `${n(count)} 条新内容`,
372
387
  },
373
388
  copyButton: {
374
389
  copy: "复制",
@@ -377,6 +392,20 @@ export function uiKitLabelsZh(numberLocale = "zh-CN"): UiKitLabels {
377
392
  copiedAnnouncement: "已复制到剪贴板",
378
393
  failedAnnouncement: "无法复制到剪贴板",
379
394
  },
395
+ list: {
396
+ unread: "未读",
397
+ opensInNewTab: "在新标签页中打开",
398
+ },
399
+ breadcrumbs: {
400
+ label: "面包屑导航",
401
+ showAll: "显示完整路径",
402
+ },
403
+ toast: {
404
+ close: "关闭通知",
405
+ notifications: "通知",
406
+ undo: "撤销",
407
+ redo: "重做",
408
+ },
380
409
  };
381
410
  }
382
411
 
package/src/index.ts CHANGED
@@ -56,6 +56,8 @@ export * from "./theme/palette-store";
56
56
 
57
57
  // ── components ───────────────────────────────────────────────────────────────
58
58
  export * from "./components/ui";
59
+ // The label-ABOVE field group (label, hint, error, required), inside wizards or out.
60
+ export * from "./components/field";
59
61
  export * from "./components/search-field";
60
62
  export * from "./components/dropdown";
61
63
  export * from "./components/popover";
@@ -96,6 +98,8 @@ export * from "./components/danger-confirm";
96
98
  export * from "./components/confirm-dialog";
97
99
  // A non-modal corner panel and its round trigger (keksdose's assistant launcher).
98
100
  export * from "./components/floating-panel";
101
+ // The count / clear / actions bar a selection brings up (keksdose's three copies).
102
+ export * from "./components/bulk-action-bar";
99
103
  export * from "./components/swatch-picker";
100
104
  export * from "./components/icon-picker";
101
105
  export * from "./components/choice-card";
@@ -124,6 +128,8 @@ export * from "./components/series-chart-labels";
124
128
  export * from "./components/account-settings";
125
129
  export * from "./components/alert-banner";
126
130
  export * from "./components/toggle-group";
131
+ // A wrapping set of links/buttons marked `aria-current` — Tabs-like looks, not tabs.
132
+ export * from "./components/nav-pills";
127
133
  // A pill carrying one VALUE — inert, a link, or a toggle, depending on which prop it is
128
134
  // given — and the list field built from it. Distinct from Button on purpose: a row of
129
135
  // buttons reads as "choose an action", a row of chips as "here are the things".
@@ -135,6 +141,7 @@ export * from "./components/full-bleed-dialog";
135
141
  export * from "./components/grouped-picker";
136
142
  export * from "./components/file-dropzone";
137
143
  export * from "./components/mini-calendar";
144
+ export * from "./components/calendar-heatmap";
138
145
  export * from "./components/date-picker";
139
146
  export * from "./components/tree-view";
140
147
  export * from "./components/chart";
@@ -151,6 +158,30 @@ export * from "./components/separator";
151
158
  // Named: scroll-area.tsx also holds the overflow hook and scrollbar class Table shares.
152
159
  export { ScrollArea } from "./components/scroll-area";
153
160
  export type { ScrollAreaProps } from "./components/scroll-area";
161
+ // 0.10.0 rows, menu rows, text primitives and page chrome the apps drew by hand.
162
+ export * from "./components/list";
163
+ export * from "./components/menu-item";
164
+ export * from "./components/text";
165
+ export * from "./components/status-dot";
166
+ export * from "./components/page-header";
167
+ export * from "./components/breadcrumbs";
168
+ // The toast layer over sonner (an OPTIONAL peer, loaded lazily): `toast` mirrors sonner's
169
+ // API so apps migrate by swapping the import; `<Toaster>` carries the placement, theme,
170
+ // tones and z-index both apps had wired by hand.
171
+ export { toast, Toaster, DEFAULT_TOAST_LABELS, TOAST_ACTION_DURATION } from "./components/toast";
172
+ export type {
173
+ ToastId,
174
+ ToastAction,
175
+ ToastOptions,
176
+ ToastPromiseOptions,
177
+ ToastUndoOptions,
178
+ ToastRedoOptions,
179
+ ToastLabels,
180
+ ToastPosition,
181
+ ToastSwipeDirection,
182
+ ToasterOffset,
183
+ ToasterProps,
184
+ } from "./components/toast";
154
185
 
155
186
  // ── data-table suite ─────────────────────────────────────────────────────────
156
187
  export * from "./components/data-table-labels";
@@ -0,0 +1,34 @@
1
+ /** Internal (not exported from the package): the Tooltip's auto-portal check. The
2
+ * attribute name itself IS exported, as `CLIPS_ATTRIBUTE` from the tooltip module. */
3
+
4
+ /**
5
+ * The explicit "this element clips or scrolls" marker. A container carrying it counts
6
+ * as clipping whatever its computed `overflow` says.
7
+ *
8
+ * Why a marker as well as the computed style: the kit's containers get their
9
+ * `overflow` from Tailwind classes, and jsdom computes no stylesheet — so under test
10
+ * every scroller reads `overflow: visible`, the Tooltip stays in place, and its always-
11
+ * mounted bubble shows up in the cell's text (keksdose 0.10: "CheckingChecking"). The
12
+ * browser and the test then disagreed about where the bubble lives, and apps pinned
13
+ * `portal` on every tooltip in a table to make them agree. The kit's own scrollers
14
+ * (DataTable's body, Table's wrapper) carry the marker, so the answer is the same in
15
+ * both; an app marks its own with `{ [CLIPS_ATTRIBUTE]: "" }` or a literal `data-clips`.
16
+ */
17
+ export const CLIPS_ATTRIBUTE = "data-clips";
18
+
19
+ /** Whether anything between `el` and `<body>` clips or scrolls its content — the
20
+ * containers an absolutely positioned bubble would be cut off by, or would widen.
21
+ * Either the computed `overflow` says so or the element carries
22
+ * {@link CLIPS_ATTRIBUTE}. `<body>` and `<html>` are not counted: their `overflow`
23
+ * belongs to the viewport (a dialog's scroll lock sets it), and the viewport clips a
24
+ * portalled bubble just the same. */
25
+ export function hasClippingAncestor(el: Element | null): boolean {
26
+ if (typeof window === "undefined" || !el) return false;
27
+ for (let node = el.parentElement; node; node = node.parentElement) {
28
+ if (node === document.body || node === document.documentElement) return false;
29
+ if (node.hasAttribute(CLIPS_ATTRIBUTE)) return true;
30
+ const style = window.getComputedStyle(node);
31
+ if (style.overflowX !== "visible" || style.overflowY !== "visible") return true;
32
+ }
33
+ return false;
34
+ }
package/src/lib/dates.ts CHANGED
@@ -149,6 +149,43 @@ export function addDaysIso(iso: string, days: number): string {
149
149
  return toLocalIso(d);
150
150
  }
151
151
 
152
+ /**
153
+ * `d` moved by whole months, keeping the day of the month where the target has one.
154
+ * `setMonth` alone ROLLS OVER — 31 January + 1 month is 3 March — which would skip
155
+ * February entirely for anyone paging through the year with PageDown. Returns a new
156
+ * Date; `d` is not touched.
157
+ */
158
+ export function addMonthsClamped(d: Date, months: number): Date {
159
+ const day = d.getDate();
160
+ const out = new Date(d.getFullYear(), d.getMonth() + months, 1);
161
+ const lastOfTarget = new Date(out.getFullYear(), out.getMonth() + 1, 0).getDate();
162
+ out.setDate(Math.min(day, lastOfTarget));
163
+ return out;
164
+ }
165
+
166
+ /**
167
+ * The first day of the week in `locale`, as a `Date#getDay` index (0 = Sunday).
168
+ *
169
+ * `Intl.Locale#getWeekInfo()` is the standard spelling; V8 shipped it first as the
170
+ * `weekInfo` accessor, and Firefox has neither yet — hence both reads and a Monday
171
+ * fallback, which is ISO 8601. Its `firstDay` counts 1 = Monday … 7 = Sunday, so `% 7`
172
+ * maps it onto `getDay`. `undefined` asks for the runtime's default locale.
173
+ */
174
+ export function localeWeekStart(locale: string | undefined): 0 | 1 | 2 | 3 | 4 | 5 | 6 {
175
+ try {
176
+ const tag = locale ?? new Intl.DateTimeFormat().resolvedOptions().locale;
177
+ const loc = new Intl.Locale(tag) as Intl.Locale & {
178
+ getWeekInfo?: () => { firstDay: number };
179
+ weekInfo?: { firstDay: number };
180
+ };
181
+ const firstDay = (loc.getWeekInfo?.() ?? loc.weekInfo)?.firstDay;
182
+ if (typeof firstDay === "number") return (firstDay % 7) as 0 | 1 | 2 | 3 | 4 | 5 | 6;
183
+ } catch {
184
+ // A malformed tag throws from `Intl.Locale`; a calendar still has to render.
185
+ }
186
+ return 1;
187
+ }
188
+
152
189
  /** Whether two Dates fall on the same local calendar day. */
153
190
  export function sameYmd(a: Date, b: Date): boolean {
154
191
  return (