@krizaka/ui 3.1.0 → 3.2.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 (135) 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-OGJI5X4W.js → chunk-2PUDI7JS.js} +2 -2
  9. package/dist/chunk-4LOMIQVX.js +21 -0
  10. package/dist/chunk-4LOMIQVX.js.map +1 -0
  11. package/dist/{chunk-K3SWZXYT.js → chunk-DGQMDJXK.js} +2 -2
  12. package/dist/chunk-G3ETON2A.js +22 -0
  13. package/dist/chunk-G3ETON2A.js.map +1 -0
  14. package/dist/chunk-I5RVM5CW.js +27 -0
  15. package/dist/chunk-I5RVM5CW.js.map +1 -0
  16. package/dist/chunk-IZ7MV6HM.js +26 -0
  17. package/dist/chunk-IZ7MV6HM.js.map +1 -0
  18. package/dist/chunk-ZNMFG62E.js +20 -0
  19. package/dist/chunk-ZNMFG62E.js.map +1 -0
  20. package/dist/cn.d.ts +9 -1
  21. package/dist/cn.js +5 -3
  22. package/dist/code-block.js +1 -1
  23. package/dist/command.js +1 -1
  24. package/dist/confirm-button.js +1 -1
  25. package/dist/continue-prompt.js +1 -1
  26. package/dist/cta-panel.js +1 -1
  27. package/dist/data-table.js +2 -2
  28. package/dist/date-picker.d.ts +650 -61
  29. package/dist/date-picker.js +918 -122
  30. package/dist/date-picker.js.map +1 -1
  31. package/dist/decision-list.js +1 -1
  32. package/dist/dropdown-menu.js +1 -1
  33. package/dist/error-page.js +1 -1
  34. package/dist/field.js +1 -1
  35. package/dist/filter-bar.js +2 -2
  36. package/dist/form.js.map +1 -1
  37. package/dist/gallery-page.js +1 -1
  38. package/dist/glow-card.js +1 -1
  39. package/dist/goal-gauge.js +1 -1
  40. package/dist/how-it-works-page.js +1 -1
  41. package/dist/landscape.js +1 -1
  42. package/dist/link-card.js +1 -1
  43. package/dist/longform-page.js +1 -1
  44. package/dist/marquee.js +1 -1
  45. package/dist/mascot-quote.js +1 -1
  46. package/dist/motion.css +18 -1
  47. package/dist/native/form.js.map +1 -1
  48. package/dist/native.d.ts +239 -2
  49. package/dist/native.js +955 -379
  50. package/dist/native.js.map +1 -1
  51. package/dist/nav-bar.js +1 -1
  52. package/dist/page-hero.js +2 -2
  53. package/dist/page.js +2 -2
  54. package/dist/popover.js +1 -1
  55. package/dist/pricing-page.js +1 -1
  56. package/dist/product-page.js +1 -1
  57. package/dist/profile-card.js +1 -1
  58. package/dist/promise-card.js +1 -1
  59. package/dist/scroll-stage.js +1 -1
  60. package/dist/stage-banner.js +1 -1
  61. package/dist/terminal-replay.js +1 -1
  62. package/dist/toast.js +1 -1
  63. package/dist/toc.js +1 -1
  64. package/dist/tooltip.js +1 -1
  65. package/package.json +7 -7
  66. package/registry/cn.json +1 -1
  67. package/registry/date-picker.json +1721 -284
  68. package/registry/examples/date-picker/birth-date-wheel.d.ts +4 -0
  69. package/registry/examples/date-picker/birth-date-wheel.js +13 -0
  70. package/registry/examples/date-picker/birth-date-wheel.tsx +11 -0
  71. package/registry/examples/date-picker/birth-date.d.ts +4 -0
  72. package/registry/examples/date-picker/birth-date.js +25 -0
  73. package/registry/examples/date-picker/birth-date.tsx +21 -0
  74. package/registry/examples/date-picker/calendar.js +1 -1
  75. package/registry/examples/date-picker/calendar.tsx +2 -6
  76. package/registry/examples/date-picker/day-strip.d.ts +4 -0
  77. package/registry/examples/date-picker/day-strip.js +28 -0
  78. package/registry/examples/date-picker/day-strip.tsx +27 -0
  79. package/registry/examples/date-picker/month-year.d.ts +4 -0
  80. package/registry/examples/date-picker/month-year.js +13 -0
  81. package/registry/examples/date-picker/month-year.tsx +10 -0
  82. package/registry/examples/date-picker/native/birth-date-wheel.d.ts +4 -0
  83. package/registry/examples/date-picker/native/birth-date-wheel.dark.png +0 -0
  84. package/registry/examples/date-picker/native/birth-date-wheel.js +13 -0
  85. package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
  86. package/registry/examples/date-picker/native/birth-date-wheel.tsx +9 -0
  87. package/registry/examples/date-picker/native/calendar.d.ts +4 -0
  88. package/registry/examples/date-picker/native/calendar.dark.png +0 -0
  89. package/registry/examples/date-picker/native/calendar.js +13 -0
  90. package/registry/examples/date-picker/native/calendar.light.png +0 -0
  91. package/registry/examples/date-picker/native/calendar.tsx +8 -0
  92. package/registry/examples/date-picker/native/day-strip.d.ts +4 -0
  93. package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
  94. package/registry/examples/date-picker/native/day-strip.js +29 -0
  95. package/registry/examples/date-picker/native/day-strip.light.png +0 -0
  96. package/registry/examples/date-picker/native/day-strip.tsx +26 -0
  97. package/registry/examples/date-picker/native/month-year.d.ts +4 -0
  98. package/registry/examples/date-picker/native/month-year.dark.png +0 -0
  99. package/registry/examples/date-picker/native/month-year.js +13 -0
  100. package/registry/examples/date-picker/native/month-year.light.png +0 -0
  101. package/registry/examples/date-picker/native/month-year.tsx +8 -0
  102. package/registry/examples/date-picker/native/time-slots.d.ts +4 -0
  103. package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
  104. package/registry/examples/date-picker/native/time-slots.js +15 -0
  105. package/registry/examples/date-picker/native/time-slots.light.png +0 -0
  106. package/registry/examples/date-picker/native/time-slots.tsx +15 -0
  107. package/registry/examples/date-picker/native/time-wheel.d.ts +4 -0
  108. package/registry/examples/date-picker/native/time-wheel.dark.png +0 -0
  109. package/registry/examples/date-picker/native/time-wheel.js +13 -0
  110. package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
  111. package/registry/examples/date-picker/native/time-wheel.tsx +8 -0
  112. package/registry/examples/date-picker/time-slots.d.ts +4 -0
  113. package/registry/examples/date-picker/time-slots.js +26 -0
  114. package/registry/examples/date-picker/time-slots.tsx +25 -0
  115. package/registry/examples/date-picker/time-wheel.d.ts +4 -0
  116. package/registry/examples/date-picker/time-wheel.js +13 -0
  117. package/registry/examples/date-picker/time-wheel.tsx +10 -0
  118. package/registry/examples/date-picker/wheel.d.ts +4 -0
  119. package/registry/examples/date-picker/wheel.js +14 -0
  120. package/registry/examples/date-picker/wheel.tsx +16 -0
  121. package/registry/index.json +6 -5
  122. package/registry/theme.json +7 -0
  123. package/skills/date-picker/SKILL.md +43 -0
  124. package/dist/chunk-2USC2YT6.js +0 -17
  125. package/dist/chunk-2USC2YT6.js.map +0 -1
  126. package/dist/chunk-5AXLA4LK.js +0 -13
  127. package/dist/chunk-5AXLA4LK.js.map +0 -1
  128. package/dist/chunk-FJDSLNXK.js +0 -11
  129. package/dist/chunk-FJDSLNXK.js.map +0 -1
  130. package/dist/chunk-KNBYZGSQ.js +0 -11
  131. package/dist/chunk-KNBYZGSQ.js.map +0 -1
  132. package/dist/chunk-VCAAHCHL.js +0 -17
  133. package/dist/chunk-VCAAHCHL.js.map +0 -1
  134. /package/dist/{chunk-OGJI5X4W.js.map → chunk-2PUDI7JS.js.map} +0 -0
  135. /package/dist/{chunk-K3SWZXYT.js.map → chunk-DGQMDJXK.js.map} +0 -0
@@ -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
+ };
@@ -0,0 +1,15 @@
1
+ import { TimePicker, timeSlots } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ const taken = new Set(["10:00", "11:30"]);
6
+
7
+ // The free times of an agenda as buttons; taken ones dashed and struck through.
8
+ export default function NativeDatePickerTimeSlots() {
9
+ const [time, setTime] = React.useState<string | null>("10:30");
10
+ return (
11
+ <View style={{ width: 320 }}>
12
+ <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} />
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/native/time-wheel.tsx
4
+ import { TimePicker } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeDatePickerTimeWheel() {
8
+ const [time, setTime] = React.useState("19:30");
9
+ return /* @__PURE__ */ jsx(TimePicker, { label: "Remind me at", locale: "en-US", value: time, onValueChange: setTime });
10
+ }
11
+ export {
12
+ NativeDatePickerTimeWheel as default
13
+ };
@@ -0,0 +1,8 @@
1
+ import { TimePicker } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+
4
+ // A reminder set by the thumb: hours, minutes by 5, the period of a 12-hour locale. The value is "HH:mm".
5
+ export default function NativeDatePickerTimeWheel() {
6
+ const [time, setTime] = React.useState<string | null>("19:30");
7
+ return <TimePicker label="Remind me at" locale="en-US" value={time} onValueChange={setTime} />;
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,26 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/time-slots.tsx
4
+ import { TimePicker, timeSlots } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var taken = /* @__PURE__ */ new Set(["10:00", "13:30", "14:00"]);
8
+ function DatePickerTimeSlots() {
9
+ const [time, setTime] = React.useState("11:00");
10
+ return /* @__PURE__ */ jsx("div", { className: "w-full max-w-md", children: /* @__PURE__ */ jsx(
11
+ TimePicker,
12
+ {
13
+ variant: "slots",
14
+ label: "Appointment time",
15
+ locale: "en-US",
16
+ slots: timeSlots("09:00", "17:00", 30),
17
+ isTimeDisabled: (t) => taken.has(t),
18
+ groupLabels: { morning: "Morning", afternoon: "Afternoon", evening: "Evening" },
19
+ value: time,
20
+ onValueChange: setTime
21
+ }
22
+ ) });
23
+ }
24
+ export {
25
+ DatePickerTimeSlots as default
26
+ };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ import { TimePicker, timeSlots } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ const taken = new Set(["10:00", "13:30", "14:00"]);
7
+
8
+ // The free times of an agenda, by part of the day; taken slots are struck through and skipped by the arrows.
9
+ export default function DatePickerTimeSlots() {
10
+ const [time, setTime] = React.useState<string | null>("11:00");
11
+ return (
12
+ <div className="w-full max-w-md">
13
+ <TimePicker
14
+ variant="slots"
15
+ label="Appointment time"
16
+ locale="en-US"
17
+ slots={timeSlots("09:00", "17:00", 30)}
18
+ isTimeDisabled={(t) => taken.has(t)}
19
+ groupLabels={{ morning: "Morning", afternoon: "Afternoon", evening: "Evening" }}
20
+ value={time}
21
+ onValueChange={setTime}
22
+ />
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,13 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/time-wheel.tsx
4
+ import { TimePicker } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function DatePickerTimeWheel() {
8
+ const [time, setTime] = React.useState("19:30");
9
+ return /* @__PURE__ */ jsx(TimePicker, { label: "Remind me at", locale: "en-US", value: time, onValueChange: setTime, minuteStep: 5 });
10
+ }
11
+ export {
12
+ DatePickerTimeWheel as default
13
+ };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+
3
+ import { TimePicker } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ // A reminder set by the thumb: hours, minutes by 5 and the period, as the locale writes them. The value is "HH:mm".
7
+ export default function DatePickerTimeWheel() {
8
+ const [time, setTime] = React.useState<string | null>("19:30");
9
+ return <TimePicker label="Remind me at" locale="en-US" value={time} onValueChange={setTime} minuteStep={5} />;
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,14 @@
1
+ "use client";
2
+
3
+ // registry/examples/date-picker/wheel.tsx
4
+ import { Wheel, WheelPicker } from "@krizaka/ui/date-picker";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var sizes = Array.from({ length: 12 }, (_, i) => ({ value: String(i + 1), label: i === 0 ? "1 guest" : `${i + 1} guests` }));
8
+ function DatePickerWheel() {
9
+ const [size, setSize] = React.useState("4");
10
+ return /* @__PURE__ */ jsx(WheelPicker, { label: "Party size", children: /* @__PURE__ */ jsx(Wheel, { label: "Guests", options: sizes, value: size, onValueChange: setSize, className: "w-36" }) });
11
+ }
12
+ export {
13
+ DatePickerWheel as default
14
+ };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+ import { Wheel, WheelPicker } from "@krizaka/ui/date-picker";
4
+ import * as React from "react";
5
+
6
+ const sizes = Array.from({ length: 12 }, (_, i) => ({ value: String(i + 1), label: i === 0 ? "1 guest" : `${i + 1} guests` }));
7
+
8
+ // Any short list turned by the thumb: a party size. The keyboard moves it too (↑ ↓, Page Up / Down, Home / End).
9
+ export default function DatePickerWheel() {
10
+ const [size, setSize] = React.useState("4");
11
+ return (
12
+ <WheelPicker label="Party size">
13
+ <Wheel label="Guests" options={sizes} value={size} onValueChange={setSize} className="w-36" />
14
+ </WheelPicker>
15
+ );
16
+ }