@krizaka/ui 3.2.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 (162) hide show
  1. package/dist/{chunk-I5RVM5CW.js → chunk-2FRWNSRO.js} +2 -6
  2. package/dist/chunk-2FRWNSRO.js.map +1 -0
  3. package/dist/chunk-BTMFZ66D.js +135 -0
  4. package/dist/chunk-BTMFZ66D.js.map +1 -0
  5. package/dist/chunk-C2BRIFJG.js +13 -0
  6. package/dist/chunk-C2BRIFJG.js.map +1 -0
  7. package/dist/chunk-KDXRYUD3.js +39 -0
  8. package/dist/chunk-KDXRYUD3.js.map +1 -0
  9. package/dist/{chunk-2PUDI7JS.js → chunk-ZKVQGXLD.js} +5 -3
  10. package/dist/{chunk-2PUDI7JS.js.map → chunk-ZKVQGXLD.js.map} +1 -1
  11. package/dist/command.js +1 -1
  12. package/dist/confirm-button.js +1 -1
  13. package/dist/data-table.js +3 -2
  14. package/dist/data-table.js.map +1 -1
  15. package/dist/date-picker.d.ts +3 -1
  16. package/dist/date-picker.js +13 -13
  17. package/dist/date-picker.js.map +1 -1
  18. package/dist/dropdown-menu.js +1 -1
  19. package/dist/filter-bar.js +3 -2
  20. package/dist/form.d.ts +23 -12
  21. package/dist/form.js +11 -47
  22. package/dist/form.js.map +1 -1
  23. package/dist/glow-card.js +1 -1
  24. package/dist/image-cropper.js +3 -1
  25. package/dist/image-cropper.js.map +1 -1
  26. package/dist/marquee.js +1 -1
  27. package/dist/native/form.d.ts +60 -15
  28. package/dist/native/form.js +103 -42
  29. package/dist/native/form.js.map +1 -1
  30. package/dist/native.d.ts +206 -2
  31. package/dist/native.js +1172 -541
  32. package/dist/native.js.map +1 -1
  33. package/dist/nav-bar.js +1 -1
  34. package/dist/popover.js +1 -1
  35. package/dist/radio-group.d.ts +66 -32
  36. package/dist/radio-group.js +54 -10
  37. package/dist/radio-group.js.map +1 -1
  38. package/dist/slider.d.ts +96 -35
  39. package/dist/slider.js +67 -13
  40. package/dist/slider.js.map +1 -1
  41. package/dist/terminal-replay.js +34 -60
  42. package/dist/terminal-replay.js.map +1 -1
  43. package/dist/toast.js +1 -1
  44. package/dist/tooltip.js +1 -1
  45. package/dist/video-player.js +3 -1
  46. package/dist/video-player.js.map +1 -1
  47. package/package.json +6 -6
  48. package/registry/combobox.json +225 -3
  49. package/registry/date-picker.json +16 -2
  50. package/registry/dialog.json +74 -3
  51. package/registry/examples/combobox/native/multiple.d.ts +4 -0
  52. package/registry/examples/combobox/native/multiple.dark.png +0 -0
  53. package/registry/examples/combobox/native/multiple.js +15 -0
  54. package/registry/examples/combobox/native/multiple.light.png +0 -0
  55. package/registry/examples/combobox/native/multiple.tsx +15 -0
  56. package/registry/examples/combobox/native/search.d.ts +4 -0
  57. package/registry/examples/combobox/native/search.dark.png +0 -0
  58. package/registry/examples/combobox/native/search.js +15 -0
  59. package/registry/examples/combobox/native/search.light.png +0 -0
  60. package/registry/examples/combobox/native/search.tsx +15 -0
  61. package/registry/examples/dialog/native/sheet.d.ts +4 -0
  62. package/registry/examples/dialog/native/sheet.dark.png +0 -0
  63. package/registry/examples/dialog/native/sheet.js +21 -0
  64. package/registry/examples/dialog/native/sheet.light.png +0 -0
  65. package/registry/examples/dialog/native/sheet.tsx +18 -0
  66. package/registry/examples/field/native/select.d.ts +4 -0
  67. package/registry/examples/field/native/select.dark.png +0 -0
  68. package/registry/examples/field/native/select.js +29 -0
  69. package/registry/examples/field/native/select.light.png +0 -0
  70. package/registry/examples/field/native/select.tsx +25 -0
  71. package/registry/examples/form/native/audience.dark.png +0 -0
  72. package/registry/examples/form/native/audience.light.png +0 -0
  73. package/registry/examples/form/native/profile.dark.png +0 -0
  74. package/registry/examples/form/native/profile.light.png +0 -0
  75. package/registry/examples/form/native/settings.dark.png +0 -0
  76. package/registry/examples/form/native/settings.light.png +0 -0
  77. package/registry/examples/form/native/sign-up.dark.png +0 -0
  78. package/registry/examples/form/native/sign-up.light.png +0 -0
  79. package/registry/examples/form/native/upload.dark.png +0 -0
  80. package/registry/examples/form/native/upload.light.png +0 -0
  81. package/registry/examples/radio-group/buttons.d.ts +4 -0
  82. package/registry/examples/radio-group/buttons.js +17 -0
  83. package/registry/examples/radio-group/buttons.tsx +21 -0
  84. package/registry/examples/radio-group/cards.js +1 -1
  85. package/registry/examples/radio-group/cards.tsx +2 -2
  86. package/registry/examples/radio-group/native/buttons.d.ts +4 -0
  87. package/registry/examples/radio-group/native/buttons.dark.png +0 -0
  88. package/registry/examples/radio-group/native/buttons.js +25 -0
  89. package/registry/examples/radio-group/native/buttons.light.png +0 -0
  90. package/registry/examples/radio-group/native/buttons.tsx +21 -0
  91. package/registry/examples/radio-group/native/cards.d.ts +4 -0
  92. package/registry/examples/radio-group/native/cards.dark.png +0 -0
  93. package/registry/examples/radio-group/native/cards.js +23 -0
  94. package/registry/examples/radio-group/native/cards.light.png +0 -0
  95. package/registry/examples/radio-group/native/cards.tsx +19 -0
  96. package/registry/examples/radio-group/native/list.d.ts +4 -0
  97. package/registry/examples/radio-group/native/list.dark.png +0 -0
  98. package/registry/examples/radio-group/native/list.js +24 -0
  99. package/registry/examples/radio-group/native/list.light.png +0 -0
  100. package/registry/examples/radio-group/native/list.tsx +20 -0
  101. package/registry/examples/radio-group/native/segmented.d.ts +4 -0
  102. package/registry/examples/radio-group/native/segmented.dark.png +0 -0
  103. package/registry/examples/radio-group/native/segmented.js +24 -0
  104. package/registry/examples/radio-group/native/segmented.light.png +0 -0
  105. package/registry/examples/radio-group/native/segmented.tsx +20 -0
  106. package/registry/examples/radio-group/segmented.d.ts +4 -0
  107. package/registry/examples/radio-group/segmented.js +15 -0
  108. package/registry/examples/radio-group/segmented.tsx +12 -0
  109. package/registry/examples/slider/floating.d.ts +4 -0
  110. package/registry/examples/slider/floating.js +11 -0
  111. package/registry/examples/slider/floating.tsx +12 -0
  112. package/registry/examples/slider/native/default.d.ts +4 -0
  113. package/registry/examples/slider/native/default.dark.png +0 -0
  114. package/registry/examples/slider/native/default.js +14 -0
  115. package/registry/examples/slider/native/default.light.png +0 -0
  116. package/registry/examples/slider/native/default.tsx +13 -0
  117. package/registry/examples/slider/native/range.d.ts +4 -0
  118. package/registry/examples/slider/native/range.dark.png +0 -0
  119. package/registry/examples/slider/native/range.js +12 -0
  120. package/registry/examples/slider/native/range.light.png +0 -0
  121. package/registry/examples/slider/native/range.tsx +11 -0
  122. package/registry/examples/slider/native/stepped.d.ts +4 -0
  123. package/registry/examples/slider/native/stepped.dark.png +0 -0
  124. package/registry/examples/slider/native/stepped.js +28 -0
  125. package/registry/examples/slider/native/stepped.light.png +0 -0
  126. package/registry/examples/slider/native/stepped.tsx +24 -0
  127. package/registry/examples/slider/native/vertical.d.ts +4 -0
  128. package/registry/examples/slider/native/vertical.dark.png +0 -0
  129. package/registry/examples/slider/native/vertical.js +16 -0
  130. package/registry/examples/slider/native/vertical.light.png +0 -0
  131. package/registry/examples/slider/native/vertical.tsx +13 -0
  132. package/registry/examples/slider/price-range.d.ts +4 -0
  133. package/registry/examples/slider/price-range.js +29 -0
  134. package/registry/examples/slider/price-range.tsx +27 -0
  135. package/registry/examples/slider/stepped.d.ts +4 -0
  136. package/registry/examples/slider/stepped.js +28 -0
  137. package/registry/examples/slider/stepped.tsx +24 -0
  138. package/registry/examples/slider/vertical.d.ts +4 -0
  139. package/registry/examples/slider/vertical.js +15 -0
  140. package/registry/examples/slider/vertical.tsx +14 -0
  141. package/registry/examples/switch/native/default.d.ts +4 -0
  142. package/registry/examples/switch/native/default.dark.png +0 -0
  143. package/registry/examples/switch/native/default.js +16 -0
  144. package/registry/examples/switch/native/default.light.png +0 -0
  145. package/registry/examples/switch/native/default.tsx +13 -0
  146. package/registry/examples/switch/native/settings.d.ts +4 -0
  147. package/registry/examples/switch/native/settings.dark.png +0 -0
  148. package/registry/examples/switch/native/settings.js +20 -0
  149. package/registry/examples/switch/native/settings.light.png +0 -0
  150. package/registry/examples/switch/native/settings.tsx +17 -0
  151. package/registry/field.json +15 -3
  152. package/registry/form.json +250 -42
  153. package/registry/index.json +24 -20
  154. package/registry/radio-group.json +227 -15
  155. package/registry/slider.json +314 -13
  156. package/registry/switch.json +115 -3
  157. package/registry/tabs.json +2 -2
  158. package/skills/choice-controls/SKILL.md +39 -0
  159. package/skills/form/SKILL.md +3 -0
  160. package/dist/chunk-I5RVM5CW.js.map +0 -1
  161. package/dist/chunk-RUPRYJ45.js +0 -82
  162. package/dist/chunk-RUPRYJ45.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ import { Button, Sheet, Txt } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ // A bottom sheet: it rises over the dimmed screen, the scrim or the back button closes it.
6
+ export default function NativeDialogSheet({ defaultOpen }: { defaultOpen?: boolean }) {
7
+ const [open, setOpen] = React.useState(Boolean(defaultOpen));
8
+ return (
9
+ <View>
10
+ <Button label="Show the pick-up point" onPress={() => setOpen(true)} />
11
+ <Sheet open={open} onOpenChange={setOpen} title="Café Olimpico">
12
+ <Txt tone="secondary">124 Rue Saint-Viateur O, Montréal · 350 m away</Txt>
13
+ <Txt>Open until 10 pm. Ask for the order under your name at the counter.</Txt>
14
+ <Button label="Get directions" variant="primary" onPress={() => setOpen(false)} />
15
+ </Sheet>
16
+ </View>
17
+ );
18
+ }
@@ -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/field/native/select.tsx
4
+ import { Select } 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 NativeFieldSelect() {
9
+ const [category, setCategory] = React.useState(null);
10
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(
11
+ Select,
12
+ {
13
+ label: "Category",
14
+ placeholder: "Choose a category",
15
+ value: category,
16
+ onValueChange: setCategory,
17
+ hint: "Where your video is listed.",
18
+ options: [
19
+ { value: "music", label: "Music" },
20
+ { value: "sport", label: "Sport", description: "Training, matches, challenges" },
21
+ { value: "art", label: "Art" },
22
+ { value: "talk", label: "Talk" }
23
+ ]
24
+ }
25
+ ) });
26
+ }
27
+ export {
28
+ NativeFieldSelect as default
29
+ };
@@ -0,0 +1,25 @@
1
+ import { Select } from "@krizaka/ui/native";
2
+ import * as React from "react";
3
+ import { View } from "react-native";
4
+
5
+ // One choice among many: the field opens a sheet of options; picking one closes it.
6
+ export default function NativeFieldSelect() {
7
+ const [category, setCategory] = React.useState<string | null>(null);
8
+ return (
9
+ <View style={{ width: 300 }}>
10
+ <Select
11
+ label="Category"
12
+ placeholder="Choose a category"
13
+ value={category}
14
+ onValueChange={setCategory}
15
+ hint="Where your video is listed."
16
+ options={[
17
+ { value: "music", label: "Music" },
18
+ { value: "sport", label: "Sport", description: "Training, matches, challenges" },
19
+ { value: "art", label: "Art" },
20
+ { value: "talk", label: "Talk" },
21
+ ]}
22
+ />
23
+ </View>
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,17 @@
1
+ "use client";
2
+
3
+ // registry/examples/radio-group/buttons.tsx
4
+ import { RadioGroup } from "@krizaka/ui/radio-group";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var TIPS = [
7
+ ["10", "10 %", "$4.20"],
8
+ ["15", "15 %", "$6.30"],
9
+ ["20", "20 %", "$8.40"],
10
+ ["0", "No tip", "\u2014"]
11
+ ];
12
+ function RadioGroupButtons() {
13
+ return /* @__PURE__ */ jsx(RadioGroup.Root, { label: "Tip", defaultValue: "15", variant: "buttons", children: TIPS.map(([value, label, amount]) => /* @__PURE__ */ jsx(RadioGroup.Button, { value, hint: amount, className: "w-24", children: label }, value)) });
14
+ }
15
+ export {
16
+ RadioGroupButtons as default
17
+ };
@@ -0,0 +1,21 @@
1
+ import { RadioGroup } from "@krizaka/ui/radio-group";
2
+
3
+ const TIPS = [
4
+ ["10", "10 %", "$4.20"],
5
+ ["15", "15 %", "$6.30"],
6
+ ["20", "20 %", "$8.40"],
7
+ ["0", "No tip", "—"],
8
+ ];
9
+
10
+ // Tactile keys: raised on their ledge, pressed in while held — the chosen one stays sunk, lit in the accent.
11
+ export default function RadioGroupButtons() {
12
+ return (
13
+ <RadioGroup.Root label="Tip" defaultValue="15" variant="buttons">
14
+ {TIPS.map(([value, label, amount]) => (
15
+ <RadioGroup.Button key={value} value={value} hint={amount} className="w-24">
16
+ {label}
17
+ </RadioGroup.Button>
18
+ ))}
19
+ </RadioGroup.Root>
20
+ );
21
+ }
@@ -9,7 +9,7 @@ var AMOUNTS = [
9
9
  ["50", "$50", "A night out"]
10
10
  ];
11
11
  function RadioGroupCards() {
12
- return /* @__PURE__ */ jsx(RadioGroup.Root, { label: "Amount", defaultValue: "20", className: "grid w-[30rem] max-w-full grid-cols-3 gap-3", children: AMOUNTS.map(([value, amount, hint]) => /* @__PURE__ */ jsxs(RadioGroup.Card, { value, children: [
12
+ return /* @__PURE__ */ jsx(RadioGroup.Root, { label: "Amount", defaultValue: "20", variant: "cards", className: "w-[30rem] max-w-full grid-cols-3", children: AMOUNTS.map(([value, amount, hint]) => /* @__PURE__ */ jsxs(RadioGroup.Card, { value, children: [
13
13
  /* @__PURE__ */ jsx("span", { className: "font-display text-lg font-bold", children: amount }),
14
14
  /* @__PURE__ */ jsx("span", { className: "text-xs text-fg-secondary", children: hint })
15
15
  ] }, value)) });
@@ -6,10 +6,10 @@ const AMOUNTS = [
6
6
  ["50", "$50", "A night out"],
7
7
  ];
8
8
 
9
- // Whole cards: the chosen one carries the accent border and tint.
9
+ // Whole cards: the chosen one carries the accent border, its tint and its lit check.
10
10
  export default function RadioGroupCards() {
11
11
  return (
12
- <RadioGroup.Root label="Amount" defaultValue="20" className="grid w-[30rem] max-w-full grid-cols-3 gap-3">
12
+ <RadioGroup.Root label="Amount" defaultValue="20" variant="cards" className="w-[30rem] max-w-full grid-cols-3">
13
13
  {AMOUNTS.map(([value, amount, hint]) => (
14
14
  <RadioGroup.Card key={value} value={value}>
15
15
  <span className="font-display text-lg font-bold">{amount}</span>
@@ -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/radio-group/native/buttons.tsx
4
+ import { RadioGroup } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeRadioGroupButtons() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 340 }, children: /* @__PURE__ */ jsx(
9
+ RadioGroup,
10
+ {
11
+ label: "Tip",
12
+ variant: "buttons",
13
+ defaultValue: "15",
14
+ options: [
15
+ { value: "10", label: "10 %", hint: "$4.20" },
16
+ { value: "15", label: "15 %", hint: "$6.30" },
17
+ { value: "20", label: "20 %", hint: "$8.40" },
18
+ { value: "0", label: "None" }
19
+ ]
20
+ }
21
+ ) });
22
+ }
23
+ export {
24
+ NativeRadioGroupButtons as default
25
+ };
@@ -0,0 +1,21 @@
1
+ import { RadioGroup } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // Tactile keys: raised on their ledge, sunk while pressed and once chosen — an impact haptic under the thumb.
5
+ export default function NativeRadioGroupButtons() {
6
+ return (
7
+ <View style={{ width: 340 }}>
8
+ <RadioGroup
9
+ label="Tip"
10
+ variant="buttons"
11
+ defaultValue="15"
12
+ options={[
13
+ { value: "10", label: "10 %", hint: "$4.20" },
14
+ { value: "15", label: "15 %", hint: "$6.30" },
15
+ { value: "20", label: "20 %", hint: "$8.40" },
16
+ { value: "0", label: "None" },
17
+ ]}
18
+ />
19
+ </View>
20
+ );
21
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ // registry/examples/radio-group/native/cards.tsx
4
+ import { RadioGroup } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeRadioGroupCards() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 340 }, children: /* @__PURE__ */ jsx(
9
+ RadioGroup,
10
+ {
11
+ label: "Credit pack",
12
+ variant: "cards",
13
+ defaultValue: "pro",
14
+ options: [
15
+ { value: "starter", label: "100 credits", description: "$4.99" },
16
+ { value: "pro", label: "500 credits", description: "$19.99 \xB7 save 20 %" }
17
+ ]
18
+ }
19
+ ) });
20
+ }
21
+ export {
22
+ NativeRadioGroupCards as default
23
+ };
@@ -0,0 +1,19 @@
1
+ import { RadioGroup } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // Whole cards: the chosen one tinted, its check lit.
5
+ export default function NativeRadioGroupCards() {
6
+ return (
7
+ <View style={{ width: 340 }}>
8
+ <RadioGroup
9
+ label="Credit pack"
10
+ variant="cards"
11
+ defaultValue="pro"
12
+ options={[
13
+ { value: "starter", label: "100 credits", description: "$4.99" },
14
+ { value: "pro", label: "500 credits", description: "$19.99 · save 20 %" },
15
+ ]}
16
+ />
17
+ </View>
18
+ );
19
+ }
@@ -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,24 @@
1
+ "use client";
2
+
3
+ // registry/examples/radio-group/native/list.tsx
4
+ import { RadioGroup } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeRadioGroupList() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(
9
+ RadioGroup,
10
+ {
11
+ label: "Notification frequency",
12
+ defaultValue: "daily",
13
+ options: [
14
+ { value: "instant", label: "Instantly" },
15
+ { value: "daily", label: "Once a day", description: "At 6 pm, a summary." },
16
+ { value: "weekly", label: "Once a week" },
17
+ { value: "never", label: "Never", disabled: true }
18
+ ]
19
+ }
20
+ ) });
21
+ }
22
+ export {
23
+ NativeRadioGroupList as default
24
+ };
@@ -0,0 +1,20 @@
1
+ import { RadioGroup } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // Dots and their words in 44-pt rows; one option disabled.
5
+ export default function NativeRadioGroupList() {
6
+ return (
7
+ <View style={{ width: 300 }}>
8
+ <RadioGroup
9
+ label="Notification frequency"
10
+ defaultValue="daily"
11
+ options={[
12
+ { value: "instant", label: "Instantly" },
13
+ { value: "daily", label: "Once a day", description: "At 6 pm, a summary." },
14
+ { value: "weekly", label: "Once a week" },
15
+ { value: "never", label: "Never", disabled: true },
16
+ ]}
17
+ />
18
+ </View>
19
+ );
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,24 @@
1
+ "use client";
2
+
3
+ // registry/examples/radio-group/native/segmented.tsx
4
+ import { RadioGroup } from "@krizaka/ui/native";
5
+ import { View } from "react-native";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function NativeRadioGroupSegmented() {
8
+ return /* @__PURE__ */ jsx(View, { style: { width: 300 }, children: /* @__PURE__ */ jsx(
9
+ RadioGroup,
10
+ {
11
+ label: "Billing",
12
+ variant: "segmented",
13
+ defaultValue: "yearly",
14
+ options: [
15
+ { value: "monthly", label: "Monthly" },
16
+ { value: "yearly", label: "Yearly" },
17
+ { value: "lifetime", label: "Lifetime" }
18
+ ]
19
+ }
20
+ ) });
21
+ }
22
+ export {
23
+ NativeRadioGroupSegmented as default
24
+ };
@@ -0,0 +1,20 @@
1
+ import { RadioGroup } from "@krizaka/ui/native";
2
+ import { View } from "react-native";
3
+
4
+ // A segmented control that is a form's choice (a radio group), not a view switch.
5
+ export default function NativeRadioGroupSegmented() {
6
+ return (
7
+ <View style={{ width: 300 }}>
8
+ <RadioGroup
9
+ label="Billing"
10
+ variant="segmented"
11
+ defaultValue="yearly"
12
+ options={[
13
+ { value: "monthly", label: "Monthly" },
14
+ { value: "yearly", label: "Yearly" },
15
+ { value: "lifetime", label: "Lifetime" },
16
+ ]}
17
+ />
18
+ </View>
19
+ );
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { ComponentType } from "react";
2
+ /** A named example of the @krizaka/ui registry; `defaultOpen` opens what it opens (a dialog, a menu, toasts) at load. */
3
+ declare const Example: ComponentType<{ defaultOpen?: boolean }>;
4
+ export default Example;
@@ -0,0 +1,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
+ }