@krizaka/ui 2.3.0 → 2.4.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 (280) hide show
  1. package/README.md +16 -1
  2. package/dist/audio-player.d.ts +113 -0
  3. package/dist/audio-player.js +207 -0
  4. package/dist/audio-player.js.map +1 -0
  5. package/dist/chunk-2USC2YT6.js +17 -0
  6. package/dist/chunk-2USC2YT6.js.map +1 -0
  7. package/dist/chunk-EUPTXKH7.js +95 -0
  8. package/dist/chunk-EUPTXKH7.js.map +1 -0
  9. package/dist/chunk-RUPRYJ45.js +82 -0
  10. package/dist/chunk-RUPRYJ45.js.map +1 -0
  11. package/dist/chunk-XUMJA5ZI.js +283 -0
  12. package/dist/chunk-XUMJA5ZI.js.map +1 -0
  13. package/dist/chunk-YH4LMWRU.js +92 -0
  14. package/dist/chunk-YH4LMWRU.js.map +1 -0
  15. package/dist/chunk-YX6CNVJA.js +94 -0
  16. package/dist/chunk-YX6CNVJA.js.map +1 -0
  17. package/dist/chunk-ZIXB33X7.js +95 -0
  18. package/dist/chunk-ZIXB33X7.js.map +1 -0
  19. package/dist/combobox.d.ts +188 -0
  20. package/dist/combobox.js +16 -0
  21. package/dist/combobox.js.map +1 -0
  22. package/dist/data-table.d.ts +246 -0
  23. package/dist/data-table.js +290 -0
  24. package/dist/data-table.js.map +1 -0
  25. package/dist/date-picker.d.ts +288 -0
  26. package/dist/date-picker.js +364 -0
  27. package/dist/date-picker.js.map +1 -0
  28. package/dist/file-upload.d.ts +238 -0
  29. package/dist/file-upload.js +437 -0
  30. package/dist/file-upload.js.map +1 -0
  31. package/dist/filter-bar.d.ts +139 -0
  32. package/dist/filter-bar.js +155 -0
  33. package/dist/filter-bar.js.map +1 -0
  34. package/dist/image-cropper.d.ts +115 -0
  35. package/dist/image-cropper.js +166 -0
  36. package/dist/image-cropper.js.map +1 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/media-capture.d.ts +155 -0
  39. package/dist/media-capture.js +242 -0
  40. package/dist/media-capture.js.map +1 -0
  41. package/dist/native/media-capture.d.ts +49 -0
  42. package/dist/native/media-capture.js +113 -0
  43. package/dist/native/media-capture.js.map +1 -0
  44. package/dist/native/video-player.d.ts +50 -0
  45. package/dist/native/video-player.js +69 -0
  46. package/dist/native/video-player.js.map +1 -0
  47. package/dist/native.d.ts +66 -2
  48. package/dist/native.js +166 -68
  49. package/dist/native.js.map +1 -1
  50. package/dist/pagination.d.ts +141 -0
  51. package/dist/pagination.js +165 -0
  52. package/dist/pagination.js.map +1 -0
  53. package/dist/search-field.d.ts +100 -0
  54. package/dist/search-field.js +167 -0
  55. package/dist/search-field.js.map +1 -0
  56. package/dist/tag-input.d.ts +44 -0
  57. package/dist/tag-input.js +67 -0
  58. package/dist/tag-input.js.map +1 -0
  59. package/dist/video-player.d.ts +204 -0
  60. package/dist/video-player.js +371 -0
  61. package/dist/video-player.js.map +1 -0
  62. package/dist/video-trimmer.d.ts +142 -0
  63. package/dist/video-trimmer.js +193 -0
  64. package/dist/video-trimmer.js.map +1 -0
  65. package/package.json +232 -4
  66. package/registry/alert.json +1 -1
  67. package/registry/audio-player.json +282 -0
  68. package/registry/avatar.json +1 -1
  69. package/registry/badge.json +1 -1
  70. package/registry/button.json +1 -1
  71. package/registry/card.json +1 -1
  72. package/registry/checkbox.json +1 -1
  73. package/registry/chip-link.json +1 -1
  74. package/registry/chip.json +1 -1
  75. package/registry/combobox.json +475 -0
  76. package/registry/command.json +1 -1
  77. package/registry/confirm-button.json +1 -1
  78. package/registry/countdown.json +1 -1
  79. package/registry/data-table.json +500 -0
  80. package/registry/date-picker.json +978 -0
  81. package/registry/dialog.json +1 -1
  82. package/registry/dropdown-menu.json +1 -1
  83. package/registry/empty-state.json +1 -1
  84. package/registry/examples/audio-player/podcast.d.ts +4 -0
  85. package/registry/examples/audio-player/podcast.js +22 -0
  86. package/registry/examples/audio-player/podcast.tsx +19 -0
  87. package/registry/examples/audio-player/voice-note.d.ts +4 -0
  88. package/registry/examples/audio-player/voice-note.js +12 -0
  89. package/registry/examples/audio-player/voice-note.tsx +12 -0
  90. package/registry/examples/combobox/async.d.ts +4 -0
  91. package/registry/examples/combobox/async.js +23 -0
  92. package/registry/examples/combobox/async.tsx +22 -0
  93. package/registry/examples/combobox/creatable.d.ts +4 -0
  94. package/registry/examples/combobox/creatable.js +32 -0
  95. package/registry/examples/combobox/creatable.tsx +28 -0
  96. package/registry/examples/combobox/invalid.d.ts +4 -0
  97. package/registry/examples/combobox/invalid.js +23 -0
  98. package/registry/examples/combobox/invalid.tsx +17 -0
  99. package/registry/examples/combobox/multiple.d.ts +4 -0
  100. package/registry/examples/combobox/multiple.js +29 -0
  101. package/registry/examples/combobox/multiple.tsx +26 -0
  102. package/registry/examples/data-table/cards.d.ts +4 -0
  103. package/registry/examples/data-table/cards.js +21 -0
  104. package/registry/examples/data-table/cards.tsx +20 -0
  105. package/registry/examples/data-table/empty.d.ts +4 -0
  106. package/registry/examples/data-table/empty.js +26 -0
  107. package/registry/examples/data-table/empty.tsx +21 -0
  108. package/registry/examples/data-table/error.d.ts +4 -0
  109. package/registry/examples/data-table/error.js +28 -0
  110. package/registry/examples/data-table/error.tsx +29 -0
  111. package/registry/examples/data-table/jobs.d.ts +4 -0
  112. package/registry/examples/data-table/jobs.js +37 -0
  113. package/registry/examples/data-table/jobs.tsx +36 -0
  114. package/registry/examples/data-table/loading.d.ts +4 -0
  115. package/registry/examples/data-table/loading.js +16 -0
  116. package/registry/examples/data-table/loading.tsx +12 -0
  117. package/registry/examples/data-table/virtualized.d.ts +4 -0
  118. package/registry/examples/data-table/virtualized.js +21 -0
  119. package/registry/examples/data-table/virtualized.tsx +20 -0
  120. package/registry/examples/date-picker/calendar.d.ts +4 -0
  121. package/registry/examples/date-picker/calendar.js +14 -0
  122. package/registry/examples/date-picker/calendar.tsx +16 -0
  123. package/registry/examples/date-picker/french.d.ts +4 -0
  124. package/registry/examples/date-picker/french.js +20 -0
  125. package/registry/examples/date-picker/french.tsx +14 -0
  126. package/registry/examples/date-picker/open.d.ts +4 -0
  127. package/registry/examples/date-picker/open.js +11 -0
  128. package/registry/examples/date-picker/open.tsx +8 -0
  129. package/registry/examples/date-picker/range.d.ts +4 -0
  130. package/registry/examples/date-picker/range.js +29 -0
  131. package/registry/examples/date-picker/range.tsx +25 -0
  132. package/registry/examples/date-picker/schedule.d.ts +4 -0
  133. package/registry/examples/date-picker/schedule.js +26 -0
  134. package/registry/examples/date-picker/schedule.tsx +22 -0
  135. package/registry/examples/file-upload/images.d.ts +4 -0
  136. package/registry/examples/file-upload/images.js +32 -0
  137. package/registry/examples/file-upload/images.tsx +25 -0
  138. package/registry/examples/file-upload/states.d.ts +4 -0
  139. package/registry/examples/file-upload/states.js +28 -0
  140. package/registry/examples/file-upload/states.tsx +23 -0
  141. package/registry/examples/file-upload/tus.d.ts +4 -0
  142. package/registry/examples/file-upload/tus.js +23 -0
  143. package/registry/examples/file-upload/tus.tsx +26 -0
  144. package/registry/examples/file-upload/video.d.ts +4 -0
  145. package/registry/examples/file-upload/video.js +39 -0
  146. package/registry/examples/file-upload/video.tsx +36 -0
  147. package/registry/examples/filter-bar/address.d.ts +4 -0
  148. package/registry/examples/filter-bar/address.js +29 -0
  149. package/registry/examples/filter-bar/address.tsx +27 -0
  150. package/registry/examples/filter-bar/jobs.d.ts +4 -0
  151. package/registry/examples/filter-bar/jobs.js +37 -0
  152. package/registry/examples/filter-bar/jobs.tsx +37 -0
  153. package/registry/examples/filter-bar/menu.d.ts +4 -0
  154. package/registry/examples/filter-bar/menu.js +27 -0
  155. package/registry/examples/filter-bar/menu.tsx +23 -0
  156. package/registry/examples/image-cropper/avatar.d.ts +4 -0
  157. package/registry/examples/image-cropper/avatar.js +13 -0
  158. package/registry/examples/image-cropper/avatar.tsx +14 -0
  159. package/registry/examples/image-cropper/banner.d.ts +4 -0
  160. package/registry/examples/image-cropper/banner.js +11 -0
  161. package/registry/examples/image-cropper/banner.tsx +10 -0
  162. package/registry/examples/image-cropper/vertical-video.d.ts +4 -0
  163. package/registry/examples/image-cropper/vertical-video.js +12 -0
  164. package/registry/examples/image-cropper/vertical-video.tsx +16 -0
  165. package/registry/examples/media-capture/clip.d.ts +4 -0
  166. package/registry/examples/media-capture/clip.js +20 -0
  167. package/registry/examples/media-capture/clip.tsx +18 -0
  168. package/registry/examples/media-capture/native/photo.d.ts +4 -0
  169. package/registry/examples/media-capture/native/photo.dark.png +0 -0
  170. package/registry/examples/media-capture/native/photo.js +27 -0
  171. package/registry/examples/media-capture/native/photo.light.png +0 -0
  172. package/registry/examples/media-capture/native/photo.tsx +20 -0
  173. package/registry/examples/media-capture/profile-photo.d.ts +4 -0
  174. package/registry/examples/media-capture/profile-photo.js +24 -0
  175. package/registry/examples/media-capture/profile-photo.tsx +20 -0
  176. package/registry/examples/pagination/cursor.d.ts +4 -0
  177. package/registry/examples/pagination/cursor.js +24 -0
  178. package/registry/examples/pagination/cursor.tsx +20 -0
  179. package/registry/examples/pagination/links.d.ts +4 -0
  180. package/registry/examples/pagination/links.js +11 -0
  181. package/registry/examples/pagination/links.tsx +6 -0
  182. package/registry/examples/pagination/native/cursor.d.ts +4 -0
  183. package/registry/examples/pagination/native/cursor.dark.png +0 -0
  184. package/registry/examples/pagination/native/cursor.js +19 -0
  185. package/registry/examples/pagination/native/cursor.light.png +0 -0
  186. package/registry/examples/pagination/native/cursor.tsx +13 -0
  187. package/registry/examples/pagination/native/pages.d.ts +4 -0
  188. package/registry/examples/pagination/native/pages.dark.png +0 -0
  189. package/registry/examples/pagination/native/pages.js +21 -0
  190. package/registry/examples/pagination/native/pages.light.png +0 -0
  191. package/registry/examples/pagination/native/pages.tsx +14 -0
  192. package/registry/examples/pagination/results.d.ts +4 -0
  193. package/registry/examples/pagination/results.js +23 -0
  194. package/registry/examples/pagination/results.tsx +19 -0
  195. package/registry/examples/pagination/table-footer.d.ts +4 -0
  196. package/registry/examples/pagination/table-footer.js +31 -0
  197. package/registry/examples/pagination/table-footer.tsx +27 -0
  198. package/registry/examples/search-field/global.d.ts +4 -0
  199. package/registry/examples/search-field/global.js +19 -0
  200. package/registry/examples/search-field/global.tsx +15 -0
  201. package/registry/examples/search-field/native/default.d.ts +4 -0
  202. package/registry/examples/search-field/native/default.dark.png +0 -0
  203. package/registry/examples/search-field/native/default.js +13 -0
  204. package/registry/examples/search-field/native/default.light.png +0 -0
  205. package/registry/examples/search-field/native/default.tsx +7 -0
  206. package/registry/examples/search-field/suggestions.d.ts +4 -0
  207. package/registry/examples/search-field/suggestions.js +30 -0
  208. package/registry/examples/search-field/suggestions.tsx +27 -0
  209. package/registry/examples/search-field/toolbar.d.ts +4 -0
  210. package/registry/examples/search-field/toolbar.js +17 -0
  211. package/registry/examples/search-field/toolbar.tsx +21 -0
  212. package/registry/examples/tag-input/recipients.d.ts +4 -0
  213. package/registry/examples/tag-input/recipients.js +23 -0
  214. package/registry/examples/tag-input/recipients.tsx +20 -0
  215. package/registry/examples/tag-input/video-tags.d.ts +4 -0
  216. package/registry/examples/tag-input/video-tags.js +26 -0
  217. package/registry/examples/tag-input/video-tags.tsx +22 -0
  218. package/registry/examples/video-player/default.d.ts +4 -0
  219. package/registry/examples/video-player/default.js +12 -0
  220. package/registry/examples/video-player/default.tsx +8 -0
  221. package/registry/examples/video-player/gated.d.ts +4 -0
  222. package/registry/examples/video-player/gated.js +26 -0
  223. package/registry/examples/video-player/gated.tsx +23 -0
  224. package/registry/examples/video-player/native/default.d.ts +4 -0
  225. package/registry/examples/video-player/native/default.dark.png +0 -0
  226. package/registry/examples/video-player/native/default.js +18 -0
  227. package/registry/examples/video-player/native/default.light.png +0 -0
  228. package/registry/examples/video-player/native/default.tsx +12 -0
  229. package/registry/examples/video-player/signed-source.d.ts +4 -0
  230. package/registry/examples/video-player/signed-source.js +16 -0
  231. package/registry/examples/video-player/signed-source.tsx +15 -0
  232. package/registry/examples/video-player/vertical.d.ts +4 -0
  233. package/registry/examples/video-player/vertical.js +12 -0
  234. package/registry/examples/video-player/vertical.tsx +12 -0
  235. package/registry/examples/video-trimmer/custom.d.ts +4 -0
  236. package/registry/examples/video-trimmer/custom.js +24 -0
  237. package/registry/examples/video-trimmer/custom.tsx +26 -0
  238. package/registry/examples/video-trimmer/filmstrip.d.ts +4 -0
  239. package/registry/examples/video-trimmer/filmstrip.js +15 -0
  240. package/registry/examples/video-trimmer/filmstrip.tsx +13 -0
  241. package/registry/examples/video-trimmer/playhead.d.ts +4 -0
  242. package/registry/examples/video-trimmer/playhead.js +15 -0
  243. package/registry/examples/video-trimmer/playhead.tsx +13 -0
  244. package/registry/field.json +1 -1
  245. package/registry/file-upload.json +471 -0
  246. package/registry/filter-bar.json +347 -0
  247. package/registry/glow-card.json +1 -1
  248. package/registry/image-cropper.json +313 -0
  249. package/registry/index.json +255 -1
  250. package/registry/iso.json +1 -1
  251. package/registry/kbd.json +1 -1
  252. package/registry/loader.json +1 -1
  253. package/registry/marquee.json +1 -1
  254. package/registry/mascots.json +1 -1
  255. package/registry/media-capture.json +347 -0
  256. package/registry/meter.json +3 -3
  257. package/registry/nav-bar.json +1 -1
  258. package/registry/number-ticker.json +1 -1
  259. package/registry/page-header.json +1 -1
  260. package/registry/pagination.json +475 -0
  261. package/registry/popover.json +1 -1
  262. package/registry/progress.json +5 -5
  263. package/registry/radio-group.json +1 -1
  264. package/registry/search-field.json +436 -0
  265. package/registry/section-backdrop.json +1 -1
  266. package/registry/separator.json +1 -1
  267. package/registry/skeleton.json +1 -1
  268. package/registry/slider.json +1 -1
  269. package/registry/slot.json +1 -1
  270. package/registry/spinner.json +1 -1
  271. package/registry/stat.json +1 -1
  272. package/registry/stepper.json +1 -1
  273. package/registry/switch.json +1 -1
  274. package/registry/tabs.json +1 -1
  275. package/registry/tag-input.json +363 -0
  276. package/registry/theme.json +1 -1
  277. package/registry/toast.json +1 -1
  278. package/registry/tooltip.json +1 -1
  279. package/registry/video-player.json +598 -0
  280. package/registry/video-trimmer.json +385 -0
@@ -0,0 +1,37 @@
1
+ "use client";
2
+
3
+ // registry/examples/data-table/jobs.tsx
4
+ import { Badge } from "@krizaka/ui/badge";
5
+ import { DataTable } from "@krizaka/ui/data-table";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var jobs = [
8
+ { id: "job-4821", name: "Product shots, autumn", model: "Flux 1.1", status: "done", seconds: 42 },
9
+ { id: "job-4822", name: "Podcast transcript", model: "Whisper large", status: "running", seconds: 318 },
10
+ { id: "job-4823", name: "Trailer voice-over", model: "XTTS v2", status: "failed", seconds: 7 },
11
+ { id: "job-4824", name: "Catalogue summaries", model: "Llama 3.3", status: "done", seconds: 96 }
12
+ ];
13
+ var tone = { done: "success", running: "accent", failed: "danger" };
14
+ var columns = [
15
+ { id: "name", header: "Job", sortable: true, card: "title" },
16
+ { id: "model", header: "Model", sortable: true },
17
+ { id: "status", header: "Status", cell: (job) => /* @__PURE__ */ jsx(Badge, { tone: tone[job.status], children: job.status }) },
18
+ { id: "seconds", header: "Duration", sortable: true, align: "end", cell: (job) => `${job.seconds} s` }
19
+ ];
20
+ function DataTableJobs() {
21
+ return /* @__PURE__ */ jsx(
22
+ DataTable,
23
+ {
24
+ caption: "Jobs",
25
+ rows: jobs,
26
+ columns,
27
+ getRowId: (job) => job.id,
28
+ rowLabel: (job) => job.name,
29
+ defaultSort: { column: "seconds", direction: "descending" },
30
+ selectable: true,
31
+ defaultSelected: ["job-4823"]
32
+ }
33
+ );
34
+ }
35
+ export {
36
+ DataTableJobs as default
37
+ };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+
3
+ import { Badge } from "@krizaka/ui/badge";
4
+ import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
5
+
6
+ type Job = { id: string; name: string; model: string; status: "done" | "running" | "failed"; seconds: number };
7
+ const jobs: Job[] = [
8
+ { id: "job-4821", name: "Product shots, autumn", model: "Flux 1.1", status: "done", seconds: 42 },
9
+ { id: "job-4822", name: "Podcast transcript", model: "Whisper large", status: "running", seconds: 318 },
10
+ { id: "job-4823", name: "Trailer voice-over", model: "XTTS v2", status: "failed", seconds: 7 },
11
+ { id: "job-4824", name: "Catalogue summaries", model: "Llama 3.3", status: "done", seconds: 96 },
12
+ ];
13
+ const tone = { done: "success", running: "accent", failed: "danger" } as const;
14
+
15
+ const columns: DataTableColumn<Job>[] = [
16
+ { id: "name", header: "Job", sortable: true, card: "title" },
17
+ { id: "model", header: "Model", sortable: true },
18
+ { id: "status", header: "Status", cell: (job) => <Badge tone={tone[job.status]}>{job.status}</Badge> },
19
+ { id: "seconds", header: "Duration", sortable: true, align: "end", cell: (job) => `${job.seconds} s` },
20
+ ];
21
+
22
+ // Sort by a header, select rows for a bulk action; cards below 36rem of width.
23
+ export default function DataTableJobs() {
24
+ return (
25
+ <DataTable
26
+ caption="Jobs"
27
+ rows={jobs}
28
+ columns={columns}
29
+ getRowId={(job) => job.id}
30
+ rowLabel={(job) => job.name}
31
+ defaultSort={{ column: "seconds", direction: "descending" }}
32
+ selectable
33
+ defaultSelected={["job-4823"]}
34
+ />
35
+ );
36
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+ // registry/examples/data-table/loading.tsx
4
+ import { DataTable } from "@krizaka/ui/data-table";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var columns = [
7
+ { id: "user", header: "User", card: "title" },
8
+ { id: "role", header: "Role" },
9
+ { id: "joined", header: "Joined", align: "end" }
10
+ ];
11
+ function DataTableLoading() {
12
+ return /* @__PURE__ */ jsx(DataTable, { caption: "Users", rows: [], columns, getRowId: () => "", loading: true, loadingRows: 4 });
13
+ }
14
+ export {
15
+ DataTableLoading as default
16
+ };
@@ -0,0 +1,12 @@
1
+ import { DataTable } from "@krizaka/ui/data-table";
2
+
3
+ const columns = [
4
+ { id: "user", header: "User", card: "title" as const },
5
+ { id: "role", header: "Role" },
6
+ { id: "joined", header: "Joined", align: "end" as const },
7
+ ];
8
+
9
+ // The first page is on its way: skeleton rows, the table busy for screen readers.
10
+ export default function DataTableLoading() {
11
+ return <DataTable caption="Users" rows={[]} columns={columns} getRowId={() => ""} loading loadingRows={4} />;
12
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+
3
+ // registry/examples/data-table/virtualized.tsx
4
+ import { DataTable } from "@krizaka/ui/data-table";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var events = Array.from({ length: 5e3 }, (_, i) => ({
7
+ id: `evt-${i + 1}`,
8
+ kind: ["view", "tip", "follow", "comment"][i % 4],
9
+ at: `2026-10-${String(1 + i % 11).padStart(2, "0")} ${String(i % 24).padStart(2, "0")}:00`
10
+ }));
11
+ var columns = [
12
+ { id: "id", header: "Event", sortable: true },
13
+ { id: "kind", header: "Kind", sortable: true },
14
+ { id: "at", header: "At", align: "end" }
15
+ ];
16
+ function DataTableVirtualized() {
17
+ return /* @__PURE__ */ jsx(DataTable, { caption: "Events", rows: events, columns, getRowId: (e) => e.id, virtualize: { rowHeight: 44, height: 320 }, density: "compact" });
18
+ }
19
+ export {
20
+ DataTableVirtualized as default
21
+ };
@@ -0,0 +1,20 @@
1
+ "use client";
2
+
3
+ import { DataTable, type DataTableColumn } from "@krizaka/ui/data-table";
4
+
5
+ type Event = { id: string; kind: string; at: string };
6
+ const events: Event[] = Array.from({ length: 5000 }, (_, i) => ({
7
+ id: `evt-${i + 1}`,
8
+ kind: ["view", "tip", "follow", "comment"][i % 4]!,
9
+ at: `2026-10-${String(1 + (i % 11)).padStart(2, "0")} ${String(i % 24).padStart(2, "0")}:00`,
10
+ }));
11
+ const columns: DataTableColumn<Event>[] = [
12
+ { id: "id", header: "Event", sortable: true },
13
+ { id: "kind", header: "Kind", sortable: true },
14
+ { id: "at", header: "At", align: "end" },
15
+ ];
16
+
17
+ // 5,000 rows, ~20 rendered: the body scrolls, the header stays.
18
+ export default function DataTableVirtualized() {
19
+ return <DataTable caption="Events" rows={events} columns={columns} getRowId={(e) => e.id} virtualize={{ rowHeight: 44, height: 320 }} density="compact" />;
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/calendar.tsx
4
+ import { Calendar } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var weekend = (iso) => [0, 6].includes((/* @__PURE__ */ new Date(`${iso}T12:00:00`)).getDay());
8
+ function DatePickerCalendar() {
9
+ const [day, setDay] = React.useState("2026-10-15");
10
+ return /* @__PURE__ */ jsx("div", { className: "inline-block rounded-xl border border-border-default bg-surface-1 p-3", children: /* @__PURE__ */ jsx(Calendar, { locale: "en-GB", value: day, onSelect: setDay, isDateDisabled: weekend, min: "2026-10-12", today: "2026-10-11" }) });
11
+ }
12
+ export {
13
+ DatePickerCalendar as default
14
+ };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+ import { Calendar } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ const weekend = (iso: string) => [0, 6].includes(new Date(`${iso}T12:00:00`).getDay());
7
+
8
+ // The month is the interface: pick a day for a call, weekends unavailable.
9
+ export default function DatePickerCalendar() {
10
+ const [day, setDay] = React.useState("2026-10-15");
11
+ return (
12
+ <div className="inline-block rounded-xl border border-border-default bg-surface-1 p-3">
13
+ <Calendar locale="en-GB" value={day} onSelect={setDay} isDateDisabled={weekend} min="2026-10-12" today="2026-10-11" />
14
+ </div>
15
+ );
16
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,20 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/french.tsx
4
+ import { DatePicker } from "@krizaka/ui/date-picker";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function DatePickerFrench() {
7
+ return /* @__PURE__ */ jsx(
8
+ DatePicker,
9
+ {
10
+ label: "Date du rendez-vous",
11
+ locale: "fr-CA",
12
+ defaultValue: "2026-10-11",
13
+ today: "2026-10-11",
14
+ labels: { previousMonth: "Mois pr\xE9c\xE9dent", nextMonth: "Mois suivant", clear: "Effacer la date" }
15
+ }
16
+ );
17
+ }
18
+ export {
19
+ DatePickerFrench as default
20
+ };
@@ -0,0 +1,14 @@
1
+ import { DatePicker } from "@krizaka/ui/date-picker";
2
+
3
+ // fr-CA: “11 oct. 2026”, the months and days in French, the week as Canada counts it.
4
+ export default function DatePickerFrench() {
5
+ return (
6
+ <DatePicker
7
+ label="Date du rendez-vous"
8
+ locale="fr-CA"
9
+ defaultValue="2026-10-11"
10
+ today="2026-10-11"
11
+ labels={{ previousMonth: "Mois précédent", nextMonth: "Mois suivant", clear: "Effacer la date" }}
12
+ />
13
+ );
14
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/open.tsx
4
+ import { DatePicker } from "@krizaka/ui/date-picker";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function DatePickerOpen({ defaultOpen }) {
7
+ return /* @__PURE__ */ jsx(DatePicker, { label: "Auction ends", locale: "en-US", defaultValue: "2026-10-18", min: "2026-10-11", today: "2026-10-11", defaultOpen });
8
+ }
9
+ export {
10
+ DatePickerOpen as default
11
+ };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+
3
+ import { DatePicker } from "@krizaka/ui/date-picker";
4
+
5
+ // The calendar open: today marked, the chosen day filled, the past unavailable.
6
+ export default function DatePickerOpen({ defaultOpen }: { defaultOpen?: boolean }) {
7
+ return <DatePicker label="Auction ends" locale="en-US" defaultValue="2026-10-18" min="2026-10-11" today="2026-10-11" defaultOpen={defaultOpen} />;
8
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,29 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/range.tsx
4
+ import { DateRangePicker } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerRange({ defaultOpen }) {
8
+ const [period, setPeriod] = React.useState({ start: "2026-10-01", end: "2026-10-11" });
9
+ return /* @__PURE__ */ jsx(
10
+ DateRangePicker,
11
+ {
12
+ label: "Period",
13
+ locale: "en-US",
14
+ value: period,
15
+ onValueChange: setPeriod,
16
+ max: "2026-10-11",
17
+ today: "2026-10-11",
18
+ defaultOpen,
19
+ presets: [
20
+ { label: "Last 7 days", start: "2026-10-05", end: "2026-10-11" },
21
+ { label: "This month", start: "2026-10-01", end: "2026-10-11" },
22
+ { label: "Last month", start: "2026-09-01", end: "2026-09-30" }
23
+ ]
24
+ }
25
+ );
26
+ }
27
+ export {
28
+ DatePickerRange as default
29
+ };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ import { DateRangePicker } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // An earnings report: presets for the usual periods, two clicks for any other.
7
+ export default function DatePickerRange({ defaultOpen }: { defaultOpen?: boolean }) {
8
+ const [period, setPeriod] = React.useState<{ start: string; end: string } | null>({ start: "2026-10-01", end: "2026-10-11" });
9
+ return (
10
+ <DateRangePicker
11
+ label="Period"
12
+ locale="en-US"
13
+ value={period}
14
+ onValueChange={setPeriod}
15
+ max="2026-10-11"
16
+ today="2026-10-11"
17
+ defaultOpen={defaultOpen}
18
+ presets={[
19
+ { label: "Last 7 days", start: "2026-10-05", end: "2026-10-11" },
20
+ { label: "This month", start: "2026-10-01", end: "2026-10-11" },
21
+ { label: "Last month", start: "2026-09-01", end: "2026-09-30" },
22
+ ]}
23
+ />
24
+ );
25
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/schedule.tsx
4
+ import { DatePicker } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerSchedule() {
8
+ const [date, setDate] = React.useState("2026-10-14");
9
+ return /* @__PURE__ */ jsx(
10
+ DatePicker,
11
+ {
12
+ label: "Publish on",
13
+ locale: "en-US",
14
+ value: date,
15
+ onValueChange: setDate,
16
+ min: "2026-10-11",
17
+ today: "2026-10-11",
18
+ clearable: true,
19
+ placeholder: "Publish now",
20
+ hint: "Your followers are told when it goes live."
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ DatePickerSchedule as default
26
+ };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+
3
+ import { DatePicker } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // `today` is fixed here for the documentation; leave it out in an app.
7
+ export default function DatePickerSchedule() {
8
+ const [date, setDate] = React.useState<string | null>("2026-10-14");
9
+ return (
10
+ <DatePicker
11
+ label="Publish on"
12
+ locale="en-US"
13
+ value={date}
14
+ onValueChange={setDate}
15
+ min="2026-10-11"
16
+ today="2026-10-11"
17
+ clearable
18
+ placeholder="Publish now"
19
+ hint="Your followers are told when it goes live."
20
+ />
21
+ );
22
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,32 @@
1
+ "use client";
2
+
3
+ // registry/examples/file-upload/images.tsx
4
+ import { Dropzone } from "@krizaka/ui/file-upload";
5
+ import * as React from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function FileUploadImages() {
8
+ const [names, setNames] = React.useState([]);
9
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-2", children: [
10
+ /* @__PURE__ */ jsx(
11
+ Dropzone,
12
+ {
13
+ title: "Add pictures to the gallery",
14
+ browseLabel: "Choose pictures",
15
+ hint: "JPEG, PNG or WebP \u2014 up to 6 pictures of 10 MB",
16
+ accept: "image/jpeg,image/png,image/webp",
17
+ multiple: true,
18
+ maxFiles: 6,
19
+ maxSize: 10 * 1024 ** 2,
20
+ onFiles: (files) => setNames(files.map((f) => f.name)),
21
+ refusalLabel: (r) => `${r.file.name}: ${{ type: "not a JPEG, PNG or WebP", size: "larger than 10 MB", count: "more than 6 pictures" }[r.reason]}`
22
+ }
23
+ ),
24
+ names.length > 0 && /* @__PURE__ */ jsxs("p", { className: "text-sm text-fg-secondary", children: [
25
+ "Ready: ",
26
+ names.join(", ")
27
+ ] })
28
+ ] });
29
+ }
30
+ export {
31
+ FileUploadImages as default
32
+ };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ import { Dropzone } from "@krizaka/ui/file-upload";
4
+ import * as React from "react";
5
+
6
+ // Up to six pictures of 10 MB; each refusal says why.
7
+ export default function FileUploadImages() {
8
+ const [names, setNames] = React.useState<string[]>([]);
9
+ return (
10
+ <div className="flex w-full max-w-lg flex-col gap-2">
11
+ <Dropzone
12
+ title="Add pictures to the gallery"
13
+ browseLabel="Choose pictures"
14
+ hint="JPEG, PNG or WebP — up to 6 pictures of 10 MB"
15
+ accept="image/jpeg,image/png,image/webp"
16
+ multiple
17
+ maxFiles={6}
18
+ maxSize={10 * 1024 ** 2}
19
+ onFiles={(files) => setNames(files.map((f) => f.name))}
20
+ refusalLabel={(r) => `${r.file.name}: ${{ type: "not a JPEG, PNG or WebP", size: "larger than 10 MB", count: "more than 6 pictures" }[r.reason]}`}
21
+ />
22
+ {names.length > 0 && <p className="text-sm text-fg-secondary">Ready: {names.join(", ")}</p>}
23
+ </div>
24
+ );
25
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,28 @@
1
+ "use client";
2
+
3
+ // registry/examples/file-upload/states.tsx
4
+ import { UploadList } from "@krizaka/ui/file-upload";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var noop = () => void 0;
7
+ function FileUploadStates() {
8
+ return /* @__PURE__ */ jsx(
9
+ UploadList,
10
+ {
11
+ className: "max-w-lg",
12
+ items: [
13
+ { id: "a", name: "sunset-timelapse.mp4", size: 184e7, type: "video/mp4", progress: 0.42, status: "uploading", speed: 124e5 },
14
+ { id: "b", name: "behind-the-scenes.mov", size: 62e7, type: "video/quicktime", progress: 0.71, status: "paused" },
15
+ { id: "c", name: "interview.mp4", size: 24e7, type: "video/mp4", progress: 0.1, status: "error", error: "The connection was lost. Your upload resumes where it stopped." },
16
+ { id: "d", name: "cover.jpg", size: 82e4, type: "image/jpeg", progress: 1, status: "done" }
17
+ ],
18
+ onPause: noop,
19
+ onResume: noop,
20
+ onRetry: noop,
21
+ onCancel: noop,
22
+ onRemove: noop
23
+ }
24
+ );
25
+ }
26
+ export {
27
+ FileUploadStates as default
28
+ };
@@ -0,0 +1,23 @@
1
+ import { UploadList } from "@krizaka/ui/file-upload";
2
+
3
+ const noop = () => undefined;
4
+
5
+ // Each state with the actions it allows: pause while it sends, resume, retry, remove.
6
+ export default function FileUploadStates() {
7
+ return (
8
+ <UploadList
9
+ className="max-w-lg"
10
+ items={[
11
+ { id: "a", name: "sunset-timelapse.mp4", size: 1_840_000_000, type: "video/mp4", progress: 0.42, status: "uploading", speed: 12_400_000 },
12
+ { id: "b", name: "behind-the-scenes.mov", size: 620_000_000, type: "video/quicktime", progress: 0.71, status: "paused" },
13
+ { id: "c", name: "interview.mp4", size: 240_000_000, type: "video/mp4", progress: 0.1, status: "error", error: "The connection was lost. Your upload resumes where it stopped." },
14
+ { id: "d", name: "cover.jpg", size: 820_000, type: "image/jpeg", progress: 1, status: "done" },
15
+ ]}
16
+ onPause={noop}
17
+ onResume={noop}
18
+ onRetry={noop}
19
+ onCancel={noop}
20
+ onRemove={noop}
21
+ />
22
+ );
23
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ // registry/examples/file-upload/tus.tsx
4
+ import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function FileUploadTus() {
7
+ const queue = useUploadQueue({
8
+ concurrency: 1,
9
+ // `resumed`: Tus finds the offset by itself (its fingerprint); a multipart client would skip the parts sent.
10
+ upload: (file, { signal, onProgress }) => new Promise((resolve, reject) => {
11
+ const upload = createTusUpload(file, { onProgress, onSuccess: resolve, onError: reject });
12
+ signal.addEventListener("abort", () => upload.abort());
13
+ upload.start();
14
+ })
15
+ });
16
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-3", children: [
17
+ /* @__PURE__ */ jsx(Dropzone, { title: "Drop documents to index", browseLabel: "Choose documents", accept: ".pdf,.docx,.md", multiple: true, onFiles: queue.add }),
18
+ /* @__PURE__ */ jsx(UploadList, { items: queue.items, onPause: queue.pause, onResume: queue.resume, onRetry: queue.retry, onCancel: queue.cancel, onRemove: queue.remove })
19
+ ] });
20
+ }
21
+ export {
22
+ FileUploadTus as default
23
+ };
@@ -0,0 +1,26 @@
1
+ "use client";
2
+
3
+ import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
4
+
5
+ // The shape of a Tus client (tus-js-client: new Upload(file, options), start(), abort()), kept out of the example.
6
+ type Resumable = { start(): void; abort(): void };
7
+ declare function createTusUpload(file: File, events: { onProgress: (sent: number) => void; onSuccess: () => void; onError: (e: Error) => void }): Resumable;
8
+
9
+ export default function FileUploadTus() {
10
+ const queue = useUploadQueue({
11
+ concurrency: 1,
12
+ // `resumed`: Tus finds the offset by itself (its fingerprint); a multipart client would skip the parts sent.
13
+ upload: (file, { signal, onProgress }) =>
14
+ new Promise((resolve, reject) => {
15
+ const upload = createTusUpload(file, { onProgress, onSuccess: resolve, onError: reject });
16
+ signal.addEventListener("abort", () => upload.abort());
17
+ upload.start();
18
+ }),
19
+ });
20
+ return (
21
+ <div className="flex w-full max-w-lg flex-col gap-3">
22
+ <Dropzone title="Drop documents to index" browseLabel="Choose documents" accept=".pdf,.docx,.md" multiple onFiles={queue.add} />
23
+ <UploadList items={queue.items} onPause={queue.pause} onResume={queue.resume} onRetry={queue.retry} onCancel={queue.cancel} onRemove={queue.remove} />
24
+ </div>
25
+ );
26
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,39 @@
1
+ "use client";
2
+
3
+ // registry/examples/file-upload/video.tsx
4
+ import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function fakeUpload(file, { signal, onProgress }) {
7
+ return new Promise((resolve) => {
8
+ let sent = 0;
9
+ const timer = setInterval(() => {
10
+ sent = Math.min(file.size, sent + file.size / 40);
11
+ onProgress(sent);
12
+ if (sent < file.size) return;
13
+ clearInterval(timer);
14
+ resolve();
15
+ }, 150);
16
+ signal.addEventListener("abort", () => clearInterval(timer));
17
+ });
18
+ }
19
+ function FileUploadVideo() {
20
+ const queue = useUploadQueue({ upload: fakeUpload });
21
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-3", children: [
22
+ /* @__PURE__ */ jsx(
23
+ Dropzone,
24
+ {
25
+ title: "Drop your video here",
26
+ browseLabel: "Choose a video",
27
+ hint: "MP4, MOV or WebM, up to 4 GB",
28
+ accept: "video/*",
29
+ maxSize: 4 * 1024 ** 3,
30
+ onFiles: queue.add,
31
+ refusalLabel: (r) => `${r.file.name}: ${r.reason === "size" ? "larger than 4 GB" : "not a video"}`
32
+ }
33
+ ),
34
+ queue.items.length > 0 && /* @__PURE__ */ jsx(UploadList, { items: queue.items, onPause: queue.pause, onResume: queue.resume, onCancel: queue.cancel, onRemove: queue.remove, onRetry: queue.retry })
35
+ ] });
36
+ }
37
+ export {
38
+ FileUploadVideo as default
39
+ };