@krizaka/ui 3.1.0 → 3.3.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 (269) hide show
  1. package/dist/achievement.js +1 -1
  2. package/dist/action-bar.js +1 -1
  3. package/dist/app-shell.js +1 -1
  4. package/dist/argument-card.js +2 -2
  5. package/dist/card-grid.js +1 -1
  6. package/dist/card.js +1 -1
  7. package/dist/choice-grid.js +1 -1
  8. package/dist/chunk-2FRWNSRO.js +23 -0
  9. package/dist/chunk-2FRWNSRO.js.map +1 -0
  10. package/dist/chunk-4LOMIQVX.js +21 -0
  11. package/dist/chunk-4LOMIQVX.js.map +1 -0
  12. package/dist/chunk-BTMFZ66D.js +135 -0
  13. package/dist/chunk-BTMFZ66D.js.map +1 -0
  14. package/dist/chunk-C2BRIFJG.js +13 -0
  15. package/dist/chunk-C2BRIFJG.js.map +1 -0
  16. package/dist/{chunk-K3SWZXYT.js → chunk-DGQMDJXK.js} +2 -2
  17. package/dist/chunk-G3ETON2A.js +22 -0
  18. package/dist/chunk-G3ETON2A.js.map +1 -0
  19. package/dist/chunk-IZ7MV6HM.js +26 -0
  20. package/dist/chunk-IZ7MV6HM.js.map +1 -0
  21. package/dist/chunk-KDXRYUD3.js +39 -0
  22. package/dist/chunk-KDXRYUD3.js.map +1 -0
  23. package/dist/{chunk-OGJI5X4W.js → chunk-ZKVQGXLD.js} +5 -3
  24. package/dist/{chunk-OGJI5X4W.js.map → chunk-ZKVQGXLD.js.map} +1 -1
  25. package/dist/chunk-ZNMFG62E.js +20 -0
  26. package/dist/chunk-ZNMFG62E.js.map +1 -0
  27. package/dist/cn.d.ts +9 -1
  28. package/dist/cn.js +5 -3
  29. package/dist/code-block.js +1 -1
  30. package/dist/command.js +1 -1
  31. package/dist/confirm-button.js +1 -1
  32. package/dist/continue-prompt.js +1 -1
  33. package/dist/cta-panel.js +1 -1
  34. package/dist/data-table.js +3 -2
  35. package/dist/data-table.js.map +1 -1
  36. package/dist/date-picker.d.ts +652 -61
  37. package/dist/date-picker.js +918 -122
  38. package/dist/date-picker.js.map +1 -1
  39. package/dist/decision-list.js +1 -1
  40. package/dist/dropdown-menu.js +1 -1
  41. package/dist/error-page.js +1 -1
  42. package/dist/field.js +1 -1
  43. package/dist/filter-bar.js +3 -2
  44. package/dist/form.d.ts +23 -12
  45. package/dist/form.js +11 -47
  46. package/dist/form.js.map +1 -1
  47. package/dist/gallery-page.js +1 -1
  48. package/dist/glow-card.js +1 -1
  49. package/dist/goal-gauge.js +1 -1
  50. package/dist/how-it-works-page.js +1 -1
  51. package/dist/image-cropper.js +3 -1
  52. package/dist/image-cropper.js.map +1 -1
  53. package/dist/landscape.js +1 -1
  54. package/dist/link-card.js +1 -1
  55. package/dist/longform-page.js +1 -1
  56. package/dist/marquee.js +1 -1
  57. package/dist/mascot-quote.js +1 -1
  58. package/dist/motion.css +18 -1
  59. package/dist/native/form.d.ts +60 -15
  60. package/dist/native/form.js +103 -42
  61. package/dist/native/form.js.map +1 -1
  62. package/dist/native.d.ts +443 -2
  63. package/dist/native.js +1655 -448
  64. package/dist/native.js.map +1 -1
  65. package/dist/nav-bar.js +1 -1
  66. package/dist/page-hero.js +2 -2
  67. package/dist/page.js +2 -2
  68. package/dist/popover.js +1 -1
  69. package/dist/pricing-page.js +1 -1
  70. package/dist/product-page.js +1 -1
  71. package/dist/profile-card.js +1 -1
  72. package/dist/promise-card.js +1 -1
  73. package/dist/radio-group.d.ts +66 -32
  74. package/dist/radio-group.js +54 -10
  75. package/dist/radio-group.js.map +1 -1
  76. package/dist/scroll-stage.js +1 -1
  77. package/dist/slider.d.ts +96 -35
  78. package/dist/slider.js +67 -13
  79. package/dist/slider.js.map +1 -1
  80. package/dist/stage-banner.js +1 -1
  81. package/dist/terminal-replay.js +34 -60
  82. package/dist/terminal-replay.js.map +1 -1
  83. package/dist/toast.js +1 -1
  84. package/dist/toc.js +1 -1
  85. package/dist/tooltip.js +1 -1
  86. package/dist/video-player.js +3 -1
  87. package/dist/video-player.js.map +1 -1
  88. package/package.json +8 -8
  89. package/registry/cn.json +1 -1
  90. package/registry/combobox.json +225 -3
  91. package/registry/date-picker.json +1739 -288
  92. package/registry/dialog.json +74 -3
  93. package/registry/examples/combobox/native/multiple.d.ts +4 -0
  94. package/registry/examples/combobox/native/multiple.dark.png +0 -0
  95. package/registry/examples/combobox/native/multiple.js +15 -0
  96. package/registry/examples/combobox/native/multiple.light.png +0 -0
  97. package/registry/examples/combobox/native/multiple.tsx +15 -0
  98. package/registry/examples/combobox/native/search.d.ts +4 -0
  99. package/registry/examples/combobox/native/search.dark.png +0 -0
  100. package/registry/examples/combobox/native/search.js +15 -0
  101. package/registry/examples/combobox/native/search.light.png +0 -0
  102. package/registry/examples/combobox/native/search.tsx +15 -0
  103. package/registry/examples/date-picker/birth-date-wheel.d.ts +4 -0
  104. package/registry/examples/date-picker/birth-date-wheel.js +13 -0
  105. package/registry/examples/date-picker/birth-date-wheel.tsx +11 -0
  106. package/registry/examples/date-picker/birth-date.d.ts +4 -0
  107. package/registry/examples/date-picker/birth-date.js +25 -0
  108. package/registry/examples/date-picker/birth-date.tsx +21 -0
  109. package/registry/examples/date-picker/calendar.js +1 -1
  110. package/registry/examples/date-picker/calendar.tsx +2 -6
  111. package/registry/examples/date-picker/day-strip.d.ts +4 -0
  112. package/registry/examples/date-picker/day-strip.js +28 -0
  113. package/registry/examples/date-picker/day-strip.tsx +27 -0
  114. package/registry/examples/date-picker/month-year.d.ts +4 -0
  115. package/registry/examples/date-picker/month-year.js +13 -0
  116. package/registry/examples/date-picker/month-year.tsx +10 -0
  117. package/registry/examples/date-picker/native/birth-date-wheel.d.ts +4 -0
  118. package/registry/examples/date-picker/native/birth-date-wheel.dark.png +0 -0
  119. package/registry/examples/date-picker/native/birth-date-wheel.js +13 -0
  120. package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
  121. package/registry/examples/date-picker/native/birth-date-wheel.tsx +9 -0
  122. package/registry/examples/date-picker/native/calendar.d.ts +4 -0
  123. package/registry/examples/date-picker/native/calendar.dark.png +0 -0
  124. package/registry/examples/date-picker/native/calendar.js +13 -0
  125. package/registry/examples/date-picker/native/calendar.light.png +0 -0
  126. package/registry/examples/date-picker/native/calendar.tsx +8 -0
  127. package/registry/examples/date-picker/native/day-strip.d.ts +4 -0
  128. package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
  129. package/registry/examples/date-picker/native/day-strip.js +29 -0
  130. package/registry/examples/date-picker/native/day-strip.light.png +0 -0
  131. package/registry/examples/date-picker/native/day-strip.tsx +26 -0
  132. package/registry/examples/date-picker/native/month-year.d.ts +4 -0
  133. package/registry/examples/date-picker/native/month-year.dark.png +0 -0
  134. package/registry/examples/date-picker/native/month-year.js +13 -0
  135. package/registry/examples/date-picker/native/month-year.light.png +0 -0
  136. package/registry/examples/date-picker/native/month-year.tsx +8 -0
  137. package/registry/examples/date-picker/native/time-slots.d.ts +4 -0
  138. package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
  139. package/registry/examples/date-picker/native/time-slots.js +15 -0
  140. package/registry/examples/date-picker/native/time-slots.light.png +0 -0
  141. package/registry/examples/date-picker/native/time-slots.tsx +15 -0
  142. package/registry/examples/date-picker/native/time-wheel.d.ts +4 -0
  143. package/registry/examples/date-picker/native/time-wheel.dark.png +0 -0
  144. package/registry/examples/date-picker/native/time-wheel.js +13 -0
  145. package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
  146. package/registry/examples/date-picker/native/time-wheel.tsx +8 -0
  147. package/registry/examples/date-picker/time-slots.d.ts +4 -0
  148. package/registry/examples/date-picker/time-slots.js +26 -0
  149. package/registry/examples/date-picker/time-slots.tsx +25 -0
  150. package/registry/examples/date-picker/time-wheel.d.ts +4 -0
  151. package/registry/examples/date-picker/time-wheel.js +13 -0
  152. package/registry/examples/date-picker/time-wheel.tsx +10 -0
  153. package/registry/examples/date-picker/wheel.d.ts +4 -0
  154. package/registry/examples/date-picker/wheel.js +14 -0
  155. package/registry/examples/date-picker/wheel.tsx +16 -0
  156. package/registry/examples/dialog/native/sheet.d.ts +4 -0
  157. package/registry/examples/dialog/native/sheet.dark.png +0 -0
  158. package/registry/examples/dialog/native/sheet.js +21 -0
  159. package/registry/examples/dialog/native/sheet.light.png +0 -0
  160. package/registry/examples/dialog/native/sheet.tsx +18 -0
  161. package/registry/examples/field/native/select.d.ts +4 -0
  162. package/registry/examples/field/native/select.dark.png +0 -0
  163. package/registry/examples/field/native/select.js +29 -0
  164. package/registry/examples/field/native/select.light.png +0 -0
  165. package/registry/examples/field/native/select.tsx +25 -0
  166. package/registry/examples/form/native/audience.dark.png +0 -0
  167. package/registry/examples/form/native/audience.light.png +0 -0
  168. package/registry/examples/form/native/profile.dark.png +0 -0
  169. package/registry/examples/form/native/profile.light.png +0 -0
  170. package/registry/examples/form/native/settings.dark.png +0 -0
  171. package/registry/examples/form/native/settings.light.png +0 -0
  172. package/registry/examples/form/native/sign-up.dark.png +0 -0
  173. package/registry/examples/form/native/sign-up.light.png +0 -0
  174. package/registry/examples/form/native/upload.dark.png +0 -0
  175. package/registry/examples/form/native/upload.light.png +0 -0
  176. package/registry/examples/radio-group/buttons.d.ts +4 -0
  177. package/registry/examples/radio-group/buttons.js +17 -0
  178. package/registry/examples/radio-group/buttons.tsx +21 -0
  179. package/registry/examples/radio-group/cards.js +1 -1
  180. package/registry/examples/radio-group/cards.tsx +2 -2
  181. package/registry/examples/radio-group/native/buttons.d.ts +4 -0
  182. package/registry/examples/radio-group/native/buttons.dark.png +0 -0
  183. package/registry/examples/radio-group/native/buttons.js +25 -0
  184. package/registry/examples/radio-group/native/buttons.light.png +0 -0
  185. package/registry/examples/radio-group/native/buttons.tsx +21 -0
  186. package/registry/examples/radio-group/native/cards.d.ts +4 -0
  187. package/registry/examples/radio-group/native/cards.dark.png +0 -0
  188. package/registry/examples/radio-group/native/cards.js +23 -0
  189. package/registry/examples/radio-group/native/cards.light.png +0 -0
  190. package/registry/examples/radio-group/native/cards.tsx +19 -0
  191. package/registry/examples/radio-group/native/list.d.ts +4 -0
  192. package/registry/examples/radio-group/native/list.dark.png +0 -0
  193. package/registry/examples/radio-group/native/list.js +24 -0
  194. package/registry/examples/radio-group/native/list.light.png +0 -0
  195. package/registry/examples/radio-group/native/list.tsx +20 -0
  196. package/registry/examples/radio-group/native/segmented.d.ts +4 -0
  197. package/registry/examples/radio-group/native/segmented.dark.png +0 -0
  198. package/registry/examples/radio-group/native/segmented.js +24 -0
  199. package/registry/examples/radio-group/native/segmented.light.png +0 -0
  200. package/registry/examples/radio-group/native/segmented.tsx +20 -0
  201. package/registry/examples/radio-group/segmented.d.ts +4 -0
  202. package/registry/examples/radio-group/segmented.js +15 -0
  203. package/registry/examples/radio-group/segmented.tsx +12 -0
  204. package/registry/examples/slider/floating.d.ts +4 -0
  205. package/registry/examples/slider/floating.js +11 -0
  206. package/registry/examples/slider/floating.tsx +12 -0
  207. package/registry/examples/slider/native/default.d.ts +4 -0
  208. package/registry/examples/slider/native/default.dark.png +0 -0
  209. package/registry/examples/slider/native/default.js +14 -0
  210. package/registry/examples/slider/native/default.light.png +0 -0
  211. package/registry/examples/slider/native/default.tsx +13 -0
  212. package/registry/examples/slider/native/range.d.ts +4 -0
  213. package/registry/examples/slider/native/range.dark.png +0 -0
  214. package/registry/examples/slider/native/range.js +12 -0
  215. package/registry/examples/slider/native/range.light.png +0 -0
  216. package/registry/examples/slider/native/range.tsx +11 -0
  217. package/registry/examples/slider/native/stepped.d.ts +4 -0
  218. package/registry/examples/slider/native/stepped.dark.png +0 -0
  219. package/registry/examples/slider/native/stepped.js +28 -0
  220. package/registry/examples/slider/native/stepped.light.png +0 -0
  221. package/registry/examples/slider/native/stepped.tsx +24 -0
  222. package/registry/examples/slider/native/vertical.d.ts +4 -0
  223. package/registry/examples/slider/native/vertical.dark.png +0 -0
  224. package/registry/examples/slider/native/vertical.js +16 -0
  225. package/registry/examples/slider/native/vertical.light.png +0 -0
  226. package/registry/examples/slider/native/vertical.tsx +13 -0
  227. package/registry/examples/slider/price-range.d.ts +4 -0
  228. package/registry/examples/slider/price-range.js +29 -0
  229. package/registry/examples/slider/price-range.tsx +27 -0
  230. package/registry/examples/slider/stepped.d.ts +4 -0
  231. package/registry/examples/slider/stepped.js +28 -0
  232. package/registry/examples/slider/stepped.tsx +24 -0
  233. package/registry/examples/slider/vertical.d.ts +4 -0
  234. package/registry/examples/slider/vertical.js +15 -0
  235. package/registry/examples/slider/vertical.tsx +14 -0
  236. package/registry/examples/switch/native/default.d.ts +4 -0
  237. package/registry/examples/switch/native/default.dark.png +0 -0
  238. package/registry/examples/switch/native/default.js +16 -0
  239. package/registry/examples/switch/native/default.light.png +0 -0
  240. package/registry/examples/switch/native/default.tsx +13 -0
  241. package/registry/examples/switch/native/settings.d.ts +4 -0
  242. package/registry/examples/switch/native/settings.dark.png +0 -0
  243. package/registry/examples/switch/native/settings.js +20 -0
  244. package/registry/examples/switch/native/settings.light.png +0 -0
  245. package/registry/examples/switch/native/settings.tsx +17 -0
  246. package/registry/field.json +15 -3
  247. package/registry/form.json +250 -42
  248. package/registry/index.json +29 -24
  249. package/registry/radio-group.json +227 -15
  250. package/registry/slider.json +314 -13
  251. package/registry/switch.json +115 -3
  252. package/registry/tabs.json +2 -2
  253. package/registry/theme.json +7 -0
  254. package/skills/choice-controls/SKILL.md +39 -0
  255. package/skills/date-picker/SKILL.md +43 -0
  256. package/skills/form/SKILL.md +3 -0
  257. package/dist/chunk-2USC2YT6.js +0 -17
  258. package/dist/chunk-2USC2YT6.js.map +0 -1
  259. package/dist/chunk-5AXLA4LK.js +0 -13
  260. package/dist/chunk-5AXLA4LK.js.map +0 -1
  261. package/dist/chunk-FJDSLNXK.js +0 -11
  262. package/dist/chunk-FJDSLNXK.js.map +0 -1
  263. package/dist/chunk-KNBYZGSQ.js +0 -11
  264. package/dist/chunk-KNBYZGSQ.js.map +0 -1
  265. package/dist/chunk-RUPRYJ45.js +0 -82
  266. package/dist/chunk-RUPRYJ45.js.map +0 -1
  267. package/dist/chunk-VCAAHCHL.js +0 -17
  268. package/dist/chunk-VCAAHCHL.js.map +0 -1
  269. /package/dist/{chunk-K3SWZXYT.js.map → chunk-DGQMDJXK.js.map} +0 -0
@@ -6,7 +6,7 @@
6
6
  "description": "A window over the page — centred, a bottom sheet or a side panel — and `AlertDialog` for a confirmation.",
7
7
  "status": "stable",
8
8
  "category": "overlays",
9
- "platforms": "web",
9
+ "platforms": "both",
10
10
  "whenToUse": [
11
11
  "For a short task that must be finished or cancelled before going back: invite someone, edit a title.",
12
12
  "`AlertDialog` to confirm a destructive or irreversible action, with an async `onConfirm`.",
@@ -308,7 +308,78 @@
308
308
  }
309
309
  ]
310
310
  },
311
- "native": null,
311
+ "native": {
312
+ "entry": "@krizaka/ui/native",
313
+ "import": "import { Sheet } from \"@krizaka/ui/native\";",
314
+ "differences": [
315
+ "One component, `Sheet`: a bottom sheet on React Native's `Modal` (focus kept inside, the back button and the scrim close it), its grip on top, rising with the theme's ease.",
316
+ "It holds what a phone shows over a screen: a choice (`Select`, `Combobox` use it), the details of a pin on a map, a short form."
317
+ ],
318
+ "props": [
319
+ {
320
+ "component": "Sheet",
321
+ "description": "A bottom sheet: it rises over a dimmed screen, its grip on top, the scrim closes it. The web `Dialog` on a phone —\na choice (`Select`, `Combobox`), the details of a pin on a map, a short form. React Native's `Modal`: focus stays\ninside, the back button closes it. Rises with the theme's ease; still under reduced motion.",
322
+ "props": [
323
+ {
324
+ "name": "children",
325
+ "type": "ReactNode",
326
+ "default": null,
327
+ "description": "The content: a list, details, a form.",
328
+ "required": true
329
+ },
330
+ {
331
+ "name": "onOpenChange",
332
+ "type": "(open: boolean) => void",
333
+ "default": null,
334
+ "description": "Called to close it: the scrim pressed, the back button, a choice made.",
335
+ "required": true
336
+ },
337
+ {
338
+ "name": "open",
339
+ "type": "boolean",
340
+ "default": null,
341
+ "description": "Open (controlled).",
342
+ "required": true
343
+ },
344
+ {
345
+ "name": "closeLabel",
346
+ "type": "string",
347
+ "default": "Close",
348
+ "description": "The name of the close action read by screen readers (\"Close\"), passed translated.",
349
+ "required": false
350
+ },
351
+ {
352
+ "name": "style",
353
+ "type": "StyleProp<ViewStyle>",
354
+ "default": null,
355
+ "description": "Styles merged last, on the sheet.",
356
+ "required": false
357
+ },
358
+ {
359
+ "name": "title",
360
+ "type": "string",
361
+ "default": null,
362
+ "description": "The title at the top of the sheet (its accessible name), passed translated.",
363
+ "required": false
364
+ }
365
+ ]
366
+ }
367
+ ],
368
+ "examples": [
369
+ {
370
+ "name": "sheet",
371
+ "title": "Bottom sheet",
372
+ "description": "The details of a pick-up point over the dimmed screen.",
373
+ "path": "examples/dialog/native/sheet.tsx",
374
+ "module": "@krizaka/ui/registry/examples/dialog/native/sheet",
375
+ "code": "import { Button, Sheet, Txt } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\nimport { View } from \"react-native\";\n\n// A bottom sheet: it rises over the dimmed screen, the scrim or the back button closes it.\nexport default function NativeDialogSheet({ defaultOpen }: { defaultOpen?: boolean }) {\n const [open, setOpen] = React.useState(Boolean(defaultOpen));\n return (\n <View>\n <Button label=\"Show the pick-up point\" onPress={() => setOpen(true)} />\n <Sheet open={open} onOpenChange={setOpen} title=\"Café Olimpico\">\n <Txt tone=\"secondary\">124 Rue Saint-Viateur O, Montréal · 350 m away</Txt>\n <Txt>Open until 10 pm. Ask for the order under your name at the counter.</Txt>\n <Button label=\"Get directions\" variant=\"primary\" onPress={() => setOpen(false)} />\n </Sheet>\n </View>\n );\n}\n",
376
+ "screenshots": {
377
+ "dark": "examples/dialog/native/sheet.dark.png",
378
+ "light": "examples/dialog/native/sheet.light.png"
379
+ }
380
+ }
381
+ ]
382
+ },
312
383
  "files": [
313
384
  {
314
385
  "path": "dialog/alert-dialog.tsx",
@@ -324,7 +395,7 @@
324
395
  },
325
396
  {
326
397
  "path": "dialog/meta.ts",
327
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Dialog\",\n summary: \"A window over the page — centred, a bottom sheet or a side panel — and `AlertDialog` for a confirmation.\",\n status: \"stable\",\n category: \"overlays\",\n platforms: \"web\",\n whenToUse: [\n \"For a short task that must be finished or cancelled before going back: invite someone, edit a title.\",\n \"`AlertDialog` to confirm a destructive or irreversible action, with an async `onConfirm`.\",\n \"`Sheet` (bottom) on phones, `placement=\\\"right\\\"` for a side panel of details.\",\n \"A gate the user must answer (age, terms): `hideClose` and `dismissible={false}`.\",\n ],\n whenNotToUse: [\n { when: \"For information next to an element, without blocking the page.\", use: \"popover\" },\n { when: \"For a message that needs no answer.\", use: \"toast\" },\n { when: \"For a long form or a flow of several steps: give it its own page.\" },\n { when: \"To confirm the deletion of one item in place.\", use: \"confirm-button\" },\n ],\n bestPractices: [\n \"Always a `Dialog.Title`; a `Dialog.Description` when the title is not enough.\",\n \"Name the buttons by what they do (“Send the invitation”), the cancel one by what it keeps (“Keep it”).\",\n \"Pass `closeLabel` translated: it names the close button.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Esc\", action: \"Closes the dialog (unless `dismissible={false}`).\" },\n { keys: \"Tab / Shift+Tab\", action: \"Move within the dialog: the focus is trapped while it is open.\" },\n ],\n notes: [\n \"Radix Dialog: `role=\\\"dialog\\\"` (or `alertdialog`), `aria-modal`, named by its title and described by its description.\",\n \"The focus moves into the dialog when it opens and returns to the trigger when it closes; the page behind does not scroll.\",\n \"`AlertDialog` keeps the focus on the cancel button first.\",\n ],\n },\n related: [\"popover\", \"confirm-button\", \"command\", \"toast\"],\n web: {\n imports: [\"Dialog\", \"Sheet\", \"AlertDialog\"],\n examples: [\n { name: \"center\", title: \"Centred\", description: \"A short form, `size=\\\"md\\\"`.\" },\n { name: \"bottom\", title: \"Bottom sheet\", description: \"`placement=\\\"bottom\\\"`: a sheet on a phone, centred from `sm` up.\" },\n { name: \"right\", title: \"Side panel\", description: \"`placement=\\\"right\\\"`: full height, for details.\" },\n { name: \"left\", title: \"Navigation drawer\", description: \"`placement=\\\"left\\\"`: full height from the left, for an app's navigation on a phone.\" },\n { name: \"sheet-form\", title: \"Sheet with a form\", description: \"`Sheet`, `size=\\\"lg\\\"`.\" },\n { name: \"alert-destructive\", title: \"Alert dialog\", description: \"`AlertDialog tone=\\\"danger\\\"` with an async `onConfirm`.\" },\n { name: \"gate\", title: \"Gate\", description: \"No close button: it closes only through its actions.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
398
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Dialog\",\n summary: \"A window over the page — centred, a bottom sheet or a side panel — and `AlertDialog` for a confirmation.\",\n status: \"stable\",\n category: \"overlays\",\n platforms: \"both\",\n whenToUse: [\n \"For a short task that must be finished or cancelled before going back: invite someone, edit a title.\",\n \"`AlertDialog` to confirm a destructive or irreversible action, with an async `onConfirm`.\",\n \"`Sheet` (bottom) on phones, `placement=\\\"right\\\"` for a side panel of details.\",\n \"A gate the user must answer (age, terms): `hideClose` and `dismissible={false}`.\",\n ],\n whenNotToUse: [\n { when: \"For information next to an element, without blocking the page.\", use: \"popover\" },\n { when: \"For a message that needs no answer.\", use: \"toast\" },\n { when: \"For a long form or a flow of several steps: give it its own page.\" },\n { when: \"To confirm the deletion of one item in place.\", use: \"confirm-button\" },\n ],\n bestPractices: [\n \"Always a `Dialog.Title`; a `Dialog.Description` when the title is not enough.\",\n \"Name the buttons by what they do (“Send the invitation”), the cancel one by what it keeps (“Keep it”).\",\n \"Pass `closeLabel` translated: it names the close button.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Esc\", action: \"Closes the dialog (unless `dismissible={false}`).\" },\n { keys: \"Tab / Shift+Tab\", action: \"Move within the dialog: the focus is trapped while it is open.\" },\n ],\n notes: [\n \"Radix Dialog: `role=\\\"dialog\\\"` (or `alertdialog`), `aria-modal`, named by its title and described by its description.\",\n \"The focus moves into the dialog when it opens and returns to the trigger when it closes; the page behind does not scroll.\",\n \"`AlertDialog` keeps the focus on the cancel button first.\",\n ],\n },\n related: [\"popover\", \"confirm-button\", \"command\", \"toast\"],\n web: {\n imports: [\"Dialog\", \"Sheet\", \"AlertDialog\"],\n examples: [\n { name: \"center\", title: \"Centred\", description: \"A short form, `size=\\\"md\\\"`.\" },\n { name: \"bottom\", title: \"Bottom sheet\", description: \"`placement=\\\"bottom\\\"`: a sheet on a phone, centred from `sm` up.\" },\n { name: \"right\", title: \"Side panel\", description: \"`placement=\\\"right\\\"`: full height, for details.\" },\n { name: \"left\", title: \"Navigation drawer\", description: \"`placement=\\\"left\\\"`: full height from the left, for an app's navigation on a phone.\" },\n { name: \"sheet-form\", title: \"Sheet with a form\", description: \"`Sheet`, `size=\\\"lg\\\"`.\" },\n { name: \"alert-destructive\", title: \"Alert dialog\", description: \"`AlertDialog tone=\\\"danger\\\"` with an async `onConfirm`.\" },\n { name: \"gate\", title: \"Gate\", description: \"No close button: it closes only through its actions.\" },\n ],\n },\n native: {\n imports: [\"Sheet\"],\n differences: [\n \"One component, `Sheet`: a bottom sheet on React Native's `Modal` (focus kept inside, the back button and the scrim close it), its grip on top, rising with the theme's ease.\",\n \"It holds what a phone shows over a screen: a choice (`Select`, `Combobox` use it), the details of a pin on a map, a short form.\",\n ],\n examples: [{ name: \"sheet\", title: \"Bottom sheet\", description: \"The details of a pick-up point over the dimmed screen.\" }],\n },\n} satisfies ComponentMeta;\n"
328
399
  },
329
400
  {
330
401
  "path": "meta.ts",
@@ -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,15 @@
1
+ "use client";
2
+
3
+ // registry/examples/combobox/native/multiple.tsx
4
+ import { Combobox } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var TOPICS = ["Music", "Sport", "Art", "Cooking", "Gaming", "Travel"].map((t) => ({ value: t.toLowerCase(), label: t }));
9
+ function NativeComboboxMultiple() {
10
+ const [topics, setTopics] = React.useState(["music", "travel"]);
11
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(Combobox, { label: "Interests", multiple: true, options: TOPICS, value: topics, onValueChange: (v) => setTopics(Array.isArray(v) ? v : [v]) }) });
12
+ }
13
+ export {
14
+ NativeComboboxMultiple as default
15
+ };
@@ -0,0 +1,15 @@
1
+ import { Combobox } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ const TOPICS = ["Music", "Sport", "Art", "Cooking", "Gaming", "Travel"].map((t) => ({ value: t.toLowerCase(), label: t }));
6
+
7
+ // Several values: checkboxes in the sheet, Done closes it; the field lists the choices.
8
+ export default function NativeComboboxMultiple() {
9
+ const [topics, setTopics] = React.useState<string[]>(["music", "travel"]);
10
+ return (
11
+ <View style={{ width: 300 }}>
12
+ <Combobox label="Interests" multiple options={TOPICS} value={topics} onValueChange={(v) => setTopics(Array.isArray(v) ? v : [v])} />
13
+ </View>
14
+ );
15
+ }
@@ -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,15 @@
1
+ "use client";
2
+
3
+ // registry/examples/combobox/native/search.tsx
4
+ import { Combobox } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var CITIES = ["Montr\xE9al", "Qu\xE9bec", "Laval", "Gatineau", "Sherbrooke", "Trois-Rivi\xE8res"].map((c) => ({ value: c.toLowerCase(), label: c }));
9
+ function NativeComboboxSearch() {
10
+ const [city, setCity] = React.useState("montr\xE9al");
11
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(Combobox, { label: "City", placeholder: "Choose a city", options: CITIES, value: city, onValueChange: (v) => setCity(String(v)) }) });
12
+ }
13
+ export {
14
+ NativeComboboxSearch as default
15
+ };
@@ -0,0 +1,15 @@
1
+ import { Combobox } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ const CITIES = ["Montréal", "Québec", "Laval", "Gatineau", "Sherbrooke", "Trois-Rivières"].map((c) => ({ value: c.toLowerCase(), label: c }));
6
+
7
+ // A choice among many, searched in a sheet: what is typed filters the options.
8
+ export default function NativeComboboxSearch() {
9
+ const [city, setCity] = React.useState<string>("montréal");
10
+ return (
11
+ <View style={{ width: 300 }}>
12
+ <Combobox label="City" placeholder="Choose a city" options={CITIES} value={city} onValueChange={(v) => setCity(String(v))} />
13
+ </View>
14
+ );
15
+ }
@@ -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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/birth-date-wheel.tsx
4
+ import { DateWheel } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerBirthDateWheel() {
8
+ const [birth, setBirth] = React.useState("1994-06-18");
9
+ return /* @__PURE__ */ jsx(DateWheel, { label: "Date of birth", locale: "en-US", value: birth, onValueChange: setBirth, max: "2008-10-11", hint: "You must be 18 or older." });
10
+ }
11
+ export {
12
+ DatePickerBirthDateWheel as default
13
+ };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ import { DateWheel } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // The wheels of a date of birth, in the locale's order, ending at the 18th birthday: an under-18 date cannot be chosen.
7
+ // `max` is fixed here for the documentation; in an app, `max={latestBirthDate(18)}`.
8
+ export default function DatePickerBirthDateWheel() {
9
+ const [birth, setBirth] = React.useState<string | null>("1994-06-18");
10
+ return <DateWheel label="Date of birth" locale="en-US" value={birth} onValueChange={setBirth} max="2008-10-11" hint="You must be 18 or older." />;
11
+ }
@@ -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,25 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/birth-date.tsx
4
+ import { DateField, isRealDate, latestBirthDate } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerBirthDate() {
8
+ const [birth, setBirth] = React.useState("2015-03-27");
9
+ const minor = isRealDate(birth) && birth > latestBirthDate(18);
10
+ return /* @__PURE__ */ jsx(
11
+ DateField,
12
+ {
13
+ label: "Date of birth",
14
+ locale: "en-GB",
15
+ autoComplete: "bday",
16
+ value: birth,
17
+ onValueChange: setBirth,
18
+ hint: "Private, never shown. For example, 27 3 1990.",
19
+ error: minor ? "You must be 18 or older to create an account." : void 0
20
+ }
21
+ );
22
+ }
23
+ export {
24
+ DatePickerBirthDate as default
25
+ };
@@ -0,0 +1,21 @@
1
+ "use client";
2
+
3
+ import { DateField, isRealDate, latestBirthDate } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // A date of birth typed as day, month and year (the browser can fill it); an under-18 date is refused at once.
7
+ export default function DatePickerBirthDate() {
8
+ const [birth, setBirth] = React.useState("2015-03-27");
9
+ const minor = isRealDate(birth) && birth > latestBirthDate(18);
10
+ return (
11
+ <DateField
12
+ label="Date of birth"
13
+ locale="en-GB"
14
+ autoComplete="bday"
15
+ value={birth}
16
+ onValueChange={setBirth}
17
+ hint="Private, never shown. For example, 27 3 1990."
18
+ error={minor ? "You must be 18 or older to create an account." : undefined}
19
+ />
20
+ );
21
+ }
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
7
7
  var weekend = (iso) => [0, 6].includes((/* @__PURE__ */ new Date(`${iso}T12:00:00`)).getDay());
8
8
  function DatePickerCalendar() {
9
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" }) });
10
+ return /* @__PURE__ */ jsx(Calendar, { variant: "card", locale: "en-GB", value: day, onSelect: setDay, isDateDisabled: weekend, min: "2026-10-12", today: "2026-10-11" });
11
11
  }
12
12
  export {
13
13
  DatePickerCalendar as default
@@ -5,12 +5,8 @@ import * as React from "react";
5
5
 
6
6
  const weekend = (iso: string) => [0, 6].includes(new Date(`${iso}T12:00:00`).getDay());
7
7
 
8
- // The month is the interface: pick a day for a call, weekends unavailable.
8
+ // The month is the interface: a card of its own, weekends unavailable, today marked by the node.
9
9
  export default function DatePickerCalendar() {
10
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
- );
11
+ return <Calendar variant="card" locale="en-GB" value={day} onSelect={setDay} isDateDisabled={weekend} min="2026-10-12" today="2026-10-11" />;
16
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,28 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/day-strip.tsx
4
+ import { DayStrip } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var closed = (iso) => (/* @__PURE__ */ new Date(`${iso}T12:00:00`)).getDay() === 0;
8
+ var sessions = /* @__PURE__ */ new Set(["2026-10-14", "2026-10-17", "2026-10-21"]);
9
+ function DatePickerDayStrip() {
10
+ const [day, setDay] = React.useState("2026-10-14");
11
+ return /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
12
+ DayStrip,
13
+ {
14
+ label: "Session day",
15
+ locale: "en-US",
16
+ value: day,
17
+ onValueChange: setDay,
18
+ start: "2026-10-11",
19
+ today: "2026-10-11",
20
+ isDateDisabled: closed,
21
+ isDateMarked: (d) => sessions.has(d),
22
+ labels: { marked: "has a session" }
23
+ }
24
+ ) });
25
+ }
26
+ export {
27
+ DatePickerDayStrip as default
28
+ };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import { DayStrip } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ const closed = (iso: string) => new Date(`${iso}T12:00:00`).getDay() === 0;
7
+ const sessions = new Set(["2026-10-14", "2026-10-17", "2026-10-21"]);
8
+
9
+ // The next two weeks in a row: Sundays closed, the days with a session marked.
10
+ export default function DatePickerDayStrip() {
11
+ const [day, setDay] = React.useState<string | null>("2026-10-14");
12
+ return (
13
+ <div className="w-full max-w-md">
14
+ <DayStrip
15
+ label="Session day"
16
+ locale="en-US"
17
+ value={day}
18
+ onValueChange={setDay}
19
+ start="2026-10-11"
20
+ today="2026-10-11"
21
+ isDateDisabled={closed}
22
+ isDateMarked={(d) => sessions.has(d)}
23
+ labels={{ marked: "has a session" }}
24
+ />
25
+ </div>
26
+ );
27
+ }
@@ -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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/month-year.tsx
4
+ import { MonthPicker } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerMonthYear() {
8
+ const [month, setMonth] = React.useState("2026-09");
9
+ return /* @__PURE__ */ jsx(MonthPicker, { variant: "card", locale: "en-US", value: month, onValueChange: setMonth, max: "2026-10", current: "2026-10" });
10
+ }
11
+ export {
12
+ DatePickerMonthYear as default
13
+ };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+
3
+ import { MonthPicker } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // A billing month: twelve months at a glance, the year above them, nothing later than this month.
7
+ export default function DatePickerMonthYear() {
8
+ const [month, setMonth] = React.useState<string | null>("2026-09");
9
+ return <MonthPicker variant="card" locale="en-US" value={month} onValueChange={setMonth} max="2026-10" current="2026-10" />;
10
+ }
@@ -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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/native/birth-date-wheel.tsx
4
+ import { DateWheel } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeDatePickerBirthDateWheel() {
8
+ const [birth, setBirth] = React.useState("1994-06-18");
9
+ return /* @__PURE__ */ jsx(DateWheel, { label: "Date of birth", locale: "en-US", value: birth, onValueChange: setBirth, max: "2008-10-11", hint: "You must be 18 or older." });
10
+ }
11
+ export {
12
+ NativeDatePickerBirthDateWheel as default
13
+ };
@@ -0,0 +1,9 @@
1
+ import { DateWheel } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+
4
+ // The wheels of a date of birth in the locale's order, ending at the 18th birthday; each value passed ticks under the
5
+ // thumb (the app's `haptics`). `max` is fixed here for the documentation; in an app, `max={latestBirthDate(18)}`.
6
+ export default function NativeDatePickerBirthDateWheel() {
7
+ const [birth, setBirth] = React.useState<string | null>("1994-06-18");
8
+ return <DateWheel label="Date of birth" locale="en-US" value={birth} onValueChange={setBirth} max="2008-10-11" hint="You must be 18 or older." />;
9
+ }
@@ -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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/native/calendar.tsx
4
+ import { Calendar } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeDatePickerCalendar() {
8
+ const [day, setDay] = React.useState("2026-10-15");
9
+ return /* @__PURE__ */ jsx(Calendar, { locale: "en-US", value: day, onSelect: setDay, min: "2026-10-11", today: "2026-10-11" });
10
+ }
11
+ export {
12
+ NativeDatePickerCalendar as default
13
+ };
@@ -0,0 +1,8 @@
1
+ import { Calendar } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+
4
+ // A month to book a day: 44-pt days, today's node, the past unavailable.
5
+ export default function NativeDatePickerCalendar() {
6
+ const [day, setDay] = React.useState("2026-10-15");
7
+ return <Calendar locale="en-US" value={day} onSelect={setDay} min="2026-10-11" today="2026-10-11" />;
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/native/day-strip.tsx
4
+ import { DayStrip } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var sessions = /* @__PURE__ */ new Set(["2026-10-14", "2026-10-17"]);
9
+ function NativeDatePickerDayStrip() {
10
+ const [day, setDay] = React.useState("2026-10-14");
11
+ return /* @__PURE__ */ jsx(View, { style: { width: 320 }, children: /* @__PURE__ */ jsx(
12
+ DayStrip,
13
+ {
14
+ label: "Session day",
15
+ locale: "en-US",
16
+ value: day,
17
+ onValueChange: setDay,
18
+ start: "2026-10-11",
19
+ today: "2026-10-11",
20
+ days: 10,
21
+ isDateDisabled: (d) => (/* @__PURE__ */ new Date(`${d}T12:00:00`)).getDay() === 0,
22
+ isDateMarked: (d) => sessions.has(d),
23
+ markedLabel: "has a session"
24
+ }
25
+ ) });
26
+ }
27
+ export {
28
+ NativeDatePickerDayStrip as default
29
+ };
@@ -0,0 +1,26 @@
1
+ import { DayStrip } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ const sessions = new Set(["2026-10-14", "2026-10-17"]);
6
+
7
+ // The days ahead, swiped sideways: Sundays closed, the days with a session marked.
8
+ export default function NativeDatePickerDayStrip() {
9
+ const [day, setDay] = React.useState<string | null>("2026-10-14");
10
+ return (
11
+ <View style={{ width: 320 }}>
12
+ <DayStrip
13
+ label="Session day"
14
+ locale="en-US"
15
+ value={day}
16
+ onValueChange={setDay}
17
+ start="2026-10-11"
18
+ today="2026-10-11"
19
+ days={10}
20
+ isDateDisabled={(d) => new Date(`${d}T12:00:00`).getDay() === 0}
21
+ isDateMarked={(d) => sessions.has(d)}
22
+ markedLabel="has a session"
23
+ />
24
+ </View>
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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/native/month-year.tsx
4
+ import { MonthPicker } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeDatePickerMonthYear() {
8
+ const [month, setMonth] = React.useState("2026-09");
9
+ return /* @__PURE__ */ jsx(MonthPicker, { locale: "en-US", value: month, onValueChange: setMonth, max: "2026-10" });
10
+ }
11
+ export {
12
+ NativeDatePickerMonthYear as default
13
+ };
@@ -0,0 +1,8 @@
1
+ import { MonthPicker } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+
4
+ // A billing month: the twelve months of the year, nothing later than this month.
5
+ export default function NativeDatePickerMonthYear() {
6
+ const [month, setMonth] = React.useState<string | null>("2026-09");
7
+ return <MonthPicker locale="en-US" value={month} onValueChange={setMonth} max="2026-10" />;
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,15 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/native/time-slots.tsx
4
+ import { TimePicker, timeSlots } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var taken = /* @__PURE__ */ new Set(["10:00", "11:30"]);
9
+ function NativeDatePickerTimeSlots() {
10
+ const [time, setTime] = React.useState("10:30");
11
+ return /* @__PURE__ */ jsx(View, { style: { width: 320 }, children: /* @__PURE__ */ jsx(TimePicker, { variant: "slots", label: "Appointment time", locale: "en-US", slots: timeSlots("09:00", "12:00", 30), isTimeDisabled: (t) => taken.has(t), value: time, onValueChange: setTime }) });
12
+ }
13
+ export {
14
+ NativeDatePickerTimeSlots as default
15
+ };