@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
@@ -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/radio-group/segmented.tsx
4
+ import { RadioGroup } from "@krizaka/ui/radio-group";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function RadioGroupSegmented() {
7
+ return /* @__PURE__ */ jsxs(RadioGroup.Root, { label: "Billing", defaultValue: "yearly", variant: "segmented", children: [
8
+ /* @__PURE__ */ jsx(RadioGroup.Segment, { value: "monthly", children: "Monthly" }),
9
+ /* @__PURE__ */ jsx(RadioGroup.Segment, { value: "yearly", children: "Yearly" }),
10
+ /* @__PURE__ */ jsx(RadioGroup.Segment, { value: "lifetime", children: "Lifetime" })
11
+ ] });
12
+ }
13
+ export {
14
+ RadioGroupSegmented as default
15
+ };
@@ -0,0 +1,12 @@
1
+ import { RadioGroup } from "@krizaka/ui/radio-group";
2
+
3
+ // A segmented control that is a choice (a form's value), not a view switch: one light glides to the chosen segment.
4
+ export default function RadioGroupSegmented() {
5
+ return (
6
+ <RadioGroup.Root label="Billing" defaultValue="yearly" variant="segmented">
7
+ <RadioGroup.Segment value="monthly">Monthly</RadioGroup.Segment>
8
+ <RadioGroup.Segment value="yearly">Yearly</RadioGroup.Segment>
9
+ <RadioGroup.Segment value="lifetime">Lifetime</RadioGroup.Segment>
10
+ </RadioGroup.Root>
11
+ );
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,11 @@
1
+ "use client";
2
+
3
+ // registry/examples/slider/floating.tsx
4
+ import { Slider } from "@krizaka/ui/slider";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function SliderFloating() {
7
+ return /* @__PURE__ */ jsx("div", { className: "pt-10", children: /* @__PURE__ */ jsx(Slider, { label: "Creator's share", size: "lg", defaultValue: 70, step: 5, floatingValue: "always", formatValue: (v) => `${v} %` }) });
8
+ }
9
+ export {
10
+ SliderFloating as default
11
+ };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ import { Slider } from "@krizaka/ui/slider";
4
+
5
+ // The value floats over the thumb while it is touched (`"always"` here, to be seen at rest); a thicker track.
6
+ export default function SliderFloating() {
7
+ return (
8
+ <div className="pt-10">
9
+ <Slider label="Creator's share" size="lg" defaultValue={70} step={5} floatingValue="always" formatValue={(v) => `${v} %`} />
10
+ </div>
11
+ );
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,14 @@
1
+ "use client";
2
+
3
+ // registry/examples/slider/native/default.tsx
4
+ import { Slider } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx } from "react/jsx-runtime";
8
+ function NativeSliderDefault() {
9
+ const [share, setShare] = React.useState(70);
10
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(Slider, { label: "Creator's share", showLabel: true, floatingValue: true, value: share, onValueChange: setShare, step: 5, formatValue: (v) => `${v} %` }) });
11
+ }
12
+ export {
13
+ NativeSliderDefault as default
14
+ };
@@ -0,0 +1,13 @@
1
+ import { Slider } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ // One value, its label and value above the track; the value floats over the thumb while it is dragged.
6
+ export default function NativeSliderDefault() {
7
+ const [share, setShare] = React.useState(70);
8
+ return (
9
+ <View style={{ width: 300 }}>
10
+ <Slider label="Creator's share" showLabel floatingValue value={share} onValueChange={setShare} step={5} formatValue={(v) => `${v} %`} />
11
+ </View>
12
+ );
13
+ }
@@ -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,12 @@
1
+ "use client";
2
+
3
+ // registry/examples/slider/native/range.tsx
4
+ import { Slider } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeSliderRange() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 300, paddingTop: 36 }, children: /* @__PURE__ */ jsx(Slider, { label: "Price", thumbLabels: ["Minimum price", "Maximum price"], defaultValue: [40, 160], max: 250, step: 10, floatingValue: "always", formatValue: (v) => `$${v}` }) });
9
+ }
10
+ export {
11
+ NativeSliderRange as default
12
+ };
@@ -0,0 +1,11 @@
1
+ import { Slider } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // A price range in the brand's gradient: two named thumbs, their values floating.
5
+ export default function NativeSliderRange() {
6
+ return (
7
+ <View style={{ width: 300, paddingTop: 36 }}>
8
+ <Slider<[number, number]> label="Price" thumbLabels={["Minimum price", "Maximum price"]} defaultValue={[40, 160]} max={250} step={10} floatingValue="always" formatValue={(v) => `$${v}`} />
9
+ </View>
10
+ );
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,28 @@
1
+ "use client";
2
+
3
+ // registry/examples/slider/native/stepped.tsx
4
+ import { Slider } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeSliderStepped() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(
9
+ Slider,
10
+ {
11
+ label: "Playback speed",
12
+ showLabel: true,
13
+ defaultValue: 1,
14
+ min: 0.5,
15
+ max: 2,
16
+ step: 0.25,
17
+ ticks: true,
18
+ marks: [
19
+ { value: 0.5, label: "0.5\xD7" },
20
+ { value: 2, label: "2\xD7" }
21
+ ],
22
+ formatValue: (v) => `${v}\xD7`
23
+ }
24
+ ) });
25
+ }
26
+ export {
27
+ NativeSliderStepped as default
28
+ };
@@ -0,0 +1,24 @@
1
+ import { Slider } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // Steps you feel: a graduation at each one, a selection haptic as the thumb passes it, words under the track.
5
+ export default function NativeSliderStepped() {
6
+ return (
7
+ <View style={{ width: 300 }}>
8
+ <Slider
9
+ label="Playback speed"
10
+ showLabel
11
+ defaultValue={1}
12
+ min={0.5}
13
+ max={2}
14
+ step={0.25}
15
+ ticks
16
+ marks={[
17
+ { value: 0.5, label: "0.5×" },
18
+ { value: 2, label: "2×" },
19
+ ]}
20
+ formatValue={(v) => `${v}×`}
21
+ />
22
+ </View>
23
+ );
24
+ }
@@ -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/slider/native/vertical.tsx
4
+ import { Slider } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function NativeSliderVertical() {
8
+ return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", gap: 24, height: 180 }, children: [
9
+ /* @__PURE__ */ jsx(Slider, { label: "Voice", orientation: "vertical", tone: "solid", defaultValue: 70, step: 10, ticks: true }),
10
+ /* @__PURE__ */ jsx(Slider, { label: "Music", orientation: "vertical", tone: "solid", defaultValue: 40, step: 10, ticks: true }),
11
+ /* @__PURE__ */ jsx(Slider, { label: "Effects", orientation: "vertical", defaultValue: 55, step: 10, ticks: true })
12
+ ] });
13
+ }
14
+ export {
15
+ NativeSliderVertical as default
16
+ };
@@ -0,0 +1,13 @@
1
+ import { Slider } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // Vertical faders, the accent alone, steps marked.
5
+ export default function NativeSliderVertical() {
6
+ return (
7
+ <View style={{ flexDirection: "row", gap: 24, height: 180 }}>
8
+ <Slider label="Voice" orientation="vertical" tone="solid" defaultValue={70} step={10} ticks />
9
+ <Slider label="Music" orientation="vertical" tone="solid" defaultValue={40} step={10} ticks />
10
+ <Slider label="Effects" orientation="vertical" defaultValue={55} step={10} ticks />
11
+ </View>
12
+ );
13
+ }
@@ -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/slider/price-range.tsx
4
+ import { Slider } from "@krizaka/ui/slider";
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function SliderPriceRange() {
8
+ const [price, setPrice] = React.useState([40, 160]);
9
+ return /* @__PURE__ */ jsx("div", { className: "pt-10", children: /* @__PURE__ */ jsx(
10
+ Slider,
11
+ {
12
+ label: "Price",
13
+ thumbLabels: ["Minimum price", "Maximum price"],
14
+ value: price,
15
+ onValueChange: setPrice,
16
+ max: 250,
17
+ step: 10,
18
+ floatingValue: "always",
19
+ marks: [
20
+ { value: 0, label: "$0" },
21
+ { value: 250, label: "$250+" }
22
+ ],
23
+ formatValue: (v) => `$${v}`
24
+ }
25
+ ) });
26
+ }
27
+ export {
28
+ SliderPriceRange as default
29
+ };
@@ -0,0 +1,27 @@
1
+ "use client";
2
+
3
+ import { Slider } from "@krizaka/ui/slider";
4
+ import * as React from "react";
5
+
6
+ // A price range in the brand's gradient: two floating values, the bounds written under the track.
7
+ export default function SliderPriceRange() {
8
+ const [price, setPrice] = React.useState<[number, number]>([40, 160]);
9
+ return (
10
+ <div className="pt-10">
11
+ <Slider<[number, number]>
12
+ label="Price"
13
+ thumbLabels={["Minimum price", "Maximum price"]}
14
+ value={price}
15
+ onValueChange={setPrice}
16
+ max={250}
17
+ step={10}
18
+ floatingValue="always"
19
+ marks={[
20
+ { value: 0, label: "$0" },
21
+ { value: 250, label: "$250+" },
22
+ ]}
23
+ formatValue={(v) => `$${v}`}
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,28 @@
1
+ "use client";
2
+
3
+ // registry/examples/slider/stepped.tsx
4
+ import { Slider } from "@krizaka/ui/slider";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function SliderStepped() {
7
+ return /* @__PURE__ */ jsx(
8
+ Slider,
9
+ {
10
+ label: "Playback speed",
11
+ showLabel: true,
12
+ defaultValue: 1,
13
+ min: 0.5,
14
+ max: 2,
15
+ step: 0.25,
16
+ ticks: true,
17
+ marks: [
18
+ { value: 0.5, label: "0.5\xD7" },
19
+ { value: 1, label: "1\xD7" },
20
+ { value: 2, label: "2\xD7" }
21
+ ],
22
+ formatValue: (v) => `${v}\xD7`
23
+ }
24
+ );
25
+ }
26
+ export {
27
+ SliderStepped as default
28
+ };
@@ -0,0 +1,24 @@
1
+ "use client";
2
+
3
+ import { Slider } from "@krizaka/ui/slider";
4
+
5
+ // Steps you can feel: a graduation at each one, their words under the track.
6
+ export default function SliderStepped() {
7
+ return (
8
+ <Slider
9
+ label="Playback speed"
10
+ showLabel
11
+ defaultValue={1}
12
+ min={0.5}
13
+ max={2}
14
+ step={0.25}
15
+ ticks
16
+ marks={[
17
+ { value: 0.5, label: "0.5×" },
18
+ { value: 1, label: "1×" },
19
+ { value: 2, label: "2×" },
20
+ ]}
21
+ formatValue={(v) => `${v}×`}
22
+ />
23
+ );
24
+ }
@@ -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/slider/vertical.tsx
4
+ import { Slider } from "@krizaka/ui/slider";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function SliderVertical() {
7
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-48 gap-8", children: [
8
+ /* @__PURE__ */ jsx(Slider, { label: "Voice", orientation: "vertical", tone: "solid", defaultValue: 70, step: 10, ticks: true, formatValue: (v) => `${v} %` }),
9
+ /* @__PURE__ */ jsx(Slider, { label: "Music", orientation: "vertical", tone: "solid", defaultValue: 40, step: 10, ticks: true, formatValue: (v) => `${v} %` }),
10
+ /* @__PURE__ */ jsx(Slider, { label: "Effects", orientation: "vertical", defaultValue: 55, step: 10, ticks: true, formatValue: (v) => `${v} %` })
11
+ ] });
12
+ }
13
+ export {
14
+ SliderVertical as default
15
+ };
@@ -0,0 +1,14 @@
1
+ "use client";
2
+
3
+ import { Slider } from "@krizaka/ui/slider";
4
+
5
+ // Vertical faders: a mixer's channels, the accent alone, steps marked.
6
+ export default function SliderVertical() {
7
+ return (
8
+ <div className="flex h-48 gap-8">
9
+ <Slider label="Voice" orientation="vertical" tone="solid" defaultValue={70} step={10} ticks formatValue={(v) => `${v} %`} />
10
+ <Slider label="Music" orientation="vertical" tone="solid" defaultValue={40} step={10} ticks formatValue={(v) => `${v} %`} />
11
+ <Slider label="Effects" orientation="vertical" defaultValue={55} step={10} ticks formatValue={(v) => `${v} %`} />
12
+ </div>
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,16 @@
1
+ "use client";
2
+
3
+ // registry/examples/switch/native/default.tsx
4
+ import { Switch } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ function NativeSwitchDefault() {
8
+ return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", gap: 16, alignItems: "center" }, children: [
9
+ /* @__PURE__ */ jsx(Switch, { label: "Dark mode", defaultChecked: true }),
10
+ /* @__PURE__ */ jsx(Switch, { label: "Sounds" }),
11
+ /* @__PURE__ */ jsx(Switch, { label: "Compact", size: "sm", defaultChecked: true })
12
+ ] });
13
+ }
14
+ export {
15
+ NativeSwitchDefault as default
16
+ };
@@ -0,0 +1,13 @@
1
+ import { Switch } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // The switch alone, named by `label`: md and sm, on and off.
5
+ export default function NativeSwitchDefault() {
6
+ return (
7
+ <View style={{ flexDirection: "row", gap: 16, alignItems: "center" }}>
8
+ <Switch label="Dark mode" defaultChecked />
9
+ <Switch label="Sounds" />
10
+ <Switch label="Compact" size="sm" defaultChecked />
11
+ </View>
12
+ );
13
+ }
@@ -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/switch/native/settings.tsx
4
+ import { Switch } from "@krizaka/ui/native";
5
+ import * as React from "react";
6
+ import { View } from "react-native";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function NativeSwitchSettings() {
9
+ const [push, setPush] = React.useState(true);
10
+ const [auctions, setAuctions] = React.useState(true);
11
+ const [digest, setDigest] = React.useState(false);
12
+ return /* @__PURE__ */ jsxs(View, { style: { width: 320, gap: 4 }, children: [
13
+ /* @__PURE__ */ jsx(Switch, { label: "Push notifications", description: "On this phone, even when the app is closed.", showLabel: true, checked: push, onCheckedChange: setPush }),
14
+ /* @__PURE__ */ jsx(Switch, { label: "Auctions you follow", description: "Outbid, ending soon, won.", showLabel: true, checked: auctions, onCheckedChange: setAuctions, disabled: !push }),
15
+ /* @__PURE__ */ jsx(Switch, { label: "Weekly digest", description: "One e-mail on Monday morning.", showLabel: true, checked: digest, onCheckedChange: setDigest })
16
+ ] });
17
+ }
18
+ export {
19
+ NativeSwitchSettings as default
20
+ };
@@ -0,0 +1,17 @@
1
+ import { Switch } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ // Notification preferences: settings rows, the whole row pressable, a selection haptic as each one flips.
6
+ export default function NativeSwitchSettings() {
7
+ const [push, setPush] = React.useState(true);
8
+ const [auctions, setAuctions] = React.useState(true);
9
+ const [digest, setDigest] = React.useState(false);
10
+ return (
11
+ <View style={{ width: 320, gap: 4 }}>
12
+ <Switch label="Push notifications" description="On this phone, even when the app is closed." showLabel checked={push} onCheckedChange={setPush} />
13
+ <Switch label="Auctions you follow" description="Outbid, ending soon, won." showLabel checked={auctions} onCheckedChange={setAuctions} disabled={!push} />
14
+ <Switch label="Weekly digest" description="One e-mail on Monday morning." showLabel checked={digest} onCheckedChange={setDigest} />
15
+ </View>
16
+ );
17
+ }
@@ -133,11 +133,11 @@
133
133
  },
134
134
  "native": {
135
135
  "entry": "@krizaka/ui/native",
136
- "import": "import { TextField } from \"@krizaka/ui/native\";",
136
+ "import": "import { TextField, Select } from \"@krizaka/ui/native\";",
137
137
  "differences": [
138
138
  "One component, `TextField`: the label, the input, the hint or the error together (no `Field.*` parts, no `htmlFor`).",
139
139
  "Every `TextInput` prop passes through (`secureTextEntry`, `keyboardType`, `autoComplete`, `returnKeyType`); `multiline` is the text area; `onValueChange` gives the text.",
140
- "`end` holds an adornment (a spinner, a check, a show-password button); `inputRef` focuses the input. No `Select`: a choice is a `Chip.Group` or a screen."
140
+ "`end` holds an adornment (a spinner, a check, a show-password button); `inputRef` focuses the input. A choice among many is `Select`: a field that opens a `Sheet` of options."
141
141
  ],
142
142
  "props": [
143
143
  {
@@ -229,6 +229,18 @@
229
229
  "dark": "examples/field/native/default.dark.png",
230
230
  "light": "examples/field/native/default.light.png"
231
231
  }
232
+ },
233
+ {
234
+ "name": "select",
235
+ "title": "Select",
236
+ "description": "One choice among many: the field opens a sheet of options, picking one closes it.",
237
+ "path": "examples/field/native/select.tsx",
238
+ "module": "@krizaka/ui/registry/examples/field/native/select",
239
+ "code": "import { Select } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\nimport { View } from \"react-native\";\n\n// One choice among many: the field opens a sheet of options; picking one closes it.\nexport default function NativeFieldSelect() {\n const [category, setCategory] = React.useState<string | null>(null);\n return (\n <View style={{ width: 300 }}>\n <Select\n label=\"Category\"\n placeholder=\"Choose a category\"\n value={category}\n onValueChange={setCategory}\n hint=\"Where your video is listed.\"\n options={[\n { value: \"music\", label: \"Music\" },\n { value: \"sport\", label: \"Sport\", description: \"Training, matches, challenges\" },\n { value: \"art\", label: \"Art\" },\n { value: \"talk\", label: \"Talk\" },\n ]}\n />\n </View>\n );\n}\n",
240
+ "screenshots": {
241
+ "dark": "examples/field/native/select.dark.png",
242
+ "light": "examples/field/native/select.light.png"
243
+ }
232
244
  }
233
245
  ]
234
246
  },
@@ -243,7 +255,7 @@
243
255
  },
244
256
  {
245
257
  "path": "field/meta.ts",
246
- "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Field\",\n summary: \"A form field: a label, a hint and an error around an `Input`, a `Textarea` or a native `Select`.\",\n status: \"stable\",\n category: \"forms\",\n platforms: \"both\",\n whenToUse: [\n \"For every text entry of a form: email, title, description, amount.\",\n \"`Select` for a choice among many options (a country): the platform's own menu, right on phones.\",\n ],\n whenNotToUse: [\n { when: \"To turn a setting on or off.\", use: \"switch\" },\n { when: \"To choose among two to five options that should all be visible.\", use: \"radio-group\" },\n { when: \"To pick a number in a range by feel.\", use: \"slider\" },\n ],\n bestPractices: [\n \"Always a visible `Field.Label`: a placeholder is an example, never the label.\",\n \"Put the hint before the error is possible (“We never share it”), the error after it is: what is wrong and how to fix it.\",\n \"Use the right `type` (`email`, `url`, `number`) and `autoComplete`: phones show the right keyboard.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"Plain HTML wiring: `Field.Label htmlFor` = the control's `id`; hint and error ids in `aria-describedby`.\",\n \"`invalid` sets `aria-invalid` and `data-invalid` on the control.\",\n \"A disabled control is skipped by Tab: if the value matters, prefer `readOnly`.\",\n ],\n },\n related: [\"checkbox\", \"switch\", \"radio-group\", \"slider\"],\n web: {\n imports: [\"Field\", \"Input\", \"Textarea\", \"Select\"],\n examples: [\n { name: \"default\", title: \"Default\", description: \"A label, an input and a hint.\" },\n { name: \"invalid\", title: \"Invalid\", description: \"`invalid` and its error, read through `aria-describedby`.\" },\n { name: \"disabled\", title: \"Disabled\", description: \"Not editable.\" },\n { name: \"textarea\", title: \"Textarea\", description: \"A longer text.\" },\n { name: \"select\", title: \"Select\", description: \"A native select.\" },\n ],\n },\n native: {\n imports: [\"TextField\"],\n differences: [\n \"One component, `TextField`: the label, the input, the hint or the error together (no `Field.*` parts, no `htmlFor`).\",\n \"Every `TextInput` prop passes through (`secureTextEntry`, `keyboardType`, `autoComplete`, `returnKeyType`); `multiline` is the text area; `onValueChange` gives the text.\",\n \"`end` holds an adornment (a spinner, a check, a show-password button); `inputRef` focuses the input. No `Select`: a choice is a `Chip.Group` or a screen.\",\n ],\n examples: [\n { name: \"default\", title: \"Sign-up fields\", description: \"E-mail and password: the right keyboards, autofill, a hint, then an error in place of the hint.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
258
+ "content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Field\",\n summary: \"A form field: a label, a hint and an error around an `Input`, a `Textarea` or a native `Select`.\",\n status: \"stable\",\n category: \"forms\",\n platforms: \"both\",\n whenToUse: [\n \"For every text entry of a form: email, title, description, amount.\",\n \"`Select` for a choice among many options (a country): the platform's own menu, right on phones.\",\n ],\n whenNotToUse: [\n { when: \"To turn a setting on or off.\", use: \"switch\" },\n { when: \"To choose among two to five options that should all be visible.\", use: \"radio-group\" },\n { when: \"To pick a number in a range by feel.\", use: \"slider\" },\n ],\n bestPractices: [\n \"Always a visible `Field.Label`: a placeholder is an example, never the label.\",\n \"Put the hint before the error is possible (“We never share it”), the error after it is: what is wrong and how to fix it.\",\n \"Use the right `type` (`email`, `url`, `number`) and `autoComplete`: phones show the right keyboard.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"Plain HTML wiring: `Field.Label htmlFor` = the control's `id`; hint and error ids in `aria-describedby`.\",\n \"`invalid` sets `aria-invalid` and `data-invalid` on the control.\",\n \"A disabled control is skipped by Tab: if the value matters, prefer `readOnly`.\",\n ],\n },\n related: [\"checkbox\", \"switch\", \"radio-group\", \"slider\"],\n web: {\n imports: [\"Field\", \"Input\", \"Textarea\", \"Select\"],\n examples: [\n { name: \"default\", title: \"Default\", description: \"A label, an input and a hint.\" },\n { name: \"invalid\", title: \"Invalid\", description: \"`invalid` and its error, read through `aria-describedby`.\" },\n { name: \"disabled\", title: \"Disabled\", description: \"Not editable.\" },\n { name: \"textarea\", title: \"Textarea\", description: \"A longer text.\" },\n { name: \"select\", title: \"Select\", description: \"A native select.\" },\n ],\n },\n native: {\n imports: [\"TextField\", \"Select\"],\n differences: [\n \"One component, `TextField`: the label, the input, the hint or the error together (no `Field.*` parts, no `htmlFor`).\",\n \"Every `TextInput` prop passes through (`secureTextEntry`, `keyboardType`, `autoComplete`, `returnKeyType`); `multiline` is the text area; `onValueChange` gives the text.\",\n \"`end` holds an adornment (a spinner, a check, a show-password button); `inputRef` focuses the input. A choice among many is `Select`: a field that opens a `Sheet` of options.\",\n ],\n examples: [\n { name: \"default\", title: \"Sign-up fields\", description: \"E-mail and password: the right keyboards, autofill, a hint, then an error in place of the hint.\" },\n { name: \"select\", title: \"Select\", description: \"One choice among many: the field opens a sheet of options, picking one closes it.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
247
259
  },
248
260
  {
249
261
  "path": "meta.ts",