@krizaka/ui 2.0.0-beta.2 → 2.0.0-beta.4

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 (187) hide show
  1. package/README.md +98 -6
  2. package/dist/alert.d.ts +2 -0
  3. package/dist/alert.js.map +1 -1
  4. package/dist/avatar.d.ts +5 -0
  5. package/dist/avatar.js.map +1 -1
  6. package/dist/badge.d.ts +12 -0
  7. package/dist/badge.js.map +1 -1
  8. package/dist/{button-G5qY4qSY.d.ts → button-8La7l0V4.d.ts} +15 -0
  9. package/dist/button.d.ts +19 -0
  10. package/dist/button.js.map +1 -1
  11. package/dist/card.d.ts +24 -1
  12. package/dist/card.js.map +1 -1
  13. package/dist/chip.d.ts +23 -0
  14. package/dist/chip.js.map +1 -1
  15. package/dist/{chunk-5FRYKFTO.js → chunk-3X5MVH54.js} +2 -2
  16. package/dist/chunk-3X5MVH54.js.map +1 -0
  17. package/dist/{chunk-QRG5RYEI.js → chunk-ZUD4U22H.js} +1 -1
  18. package/dist/chunk-ZUD4U22H.js.map +1 -0
  19. package/dist/command.d.ts +4 -1
  20. package/dist/command.js +2 -2
  21. package/dist/command.js.map +1 -1
  22. package/dist/confirm-button.d.ts +1 -1
  23. package/dist/confirm-button.js +1 -1
  24. package/dist/countdown.d.ts +3 -0
  25. package/dist/countdown.js.map +1 -1
  26. package/dist/{dialog-DGBY2grk.d.ts → dialog-GQ4Nvuyf.d.ts} +10 -0
  27. package/dist/dialog.d.ts +9 -1
  28. package/dist/dialog.js +2 -2
  29. package/dist/dialog.js.map +1 -1
  30. package/dist/dropdown-menu.d.ts +1 -0
  31. package/dist/dropdown-menu.js.map +1 -1
  32. package/dist/empty-state.d.ts +2 -0
  33. package/dist/empty-state.js.map +1 -1
  34. package/dist/kbd.d.ts +7 -1
  35. package/dist/kbd.js.map +1 -1
  36. package/dist/native.d.ts +471 -3
  37. package/dist/native.js +1005 -36
  38. package/dist/native.js.map +1 -1
  39. package/dist/page-header.d.ts +2 -0
  40. package/dist/page-header.js.map +1 -1
  41. package/dist/progress.d.ts +5 -0
  42. package/dist/progress.js.map +1 -1
  43. package/dist/skeleton.d.ts +7 -1
  44. package/dist/skeleton.js.map +1 -1
  45. package/dist/slider.d.ts +2 -0
  46. package/dist/slider.js.map +1 -1
  47. package/dist/spinner.d.ts +5 -0
  48. package/dist/spinner.js.map +1 -1
  49. package/dist/stat.d.ts +2 -0
  50. package/dist/stat.js.map +1 -1
  51. package/dist/switch.d.ts +7 -3
  52. package/dist/switch.js.map +1 -1
  53. package/dist/tabs.d.ts +4 -1
  54. package/dist/tabs.js.map +1 -1
  55. package/dist/theme.d.ts +10 -2
  56. package/dist/theme.js +4 -2
  57. package/dist/theme.js.map +1 -1
  58. package/dist/tooltip.d.ts +3 -0
  59. package/dist/tooltip.js.map +1 -1
  60. package/package.json +31 -8
  61. package/registry/alert.json +59 -0
  62. package/registry/avatar.json +114 -0
  63. package/registry/badge.json +59 -0
  64. package/registry/button.json +115 -0
  65. package/registry/card.json +154 -0
  66. package/registry/checkbox.json +46 -0
  67. package/registry/chip.json +164 -0
  68. package/registry/cn.json +21 -0
  69. package/registry/command.json +162 -0
  70. package/registry/confirm-button.json +104 -0
  71. package/registry/countdown.json +84 -0
  72. package/registry/demos/alert.d.ts +5 -0
  73. package/registry/demos/alert.js +12 -0
  74. package/registry/demos/alert.tsx +15 -0
  75. package/registry/demos/avatar.d.ts +5 -0
  76. package/registry/demos/avatar.js +14 -0
  77. package/registry/demos/avatar.tsx +13 -0
  78. package/registry/demos/badge.d.ts +5 -0
  79. package/registry/demos/badge.js +11 -0
  80. package/registry/demos/badge.tsx +5 -0
  81. package/registry/demos/button.d.ts +5 -0
  82. package/registry/demos/button.js +11 -0
  83. package/registry/demos/button.tsx +5 -0
  84. package/registry/demos/card.d.ts +5 -0
  85. package/registry/demos/card.js +30 -0
  86. package/registry/demos/card.tsx +37 -0
  87. package/registry/demos/checkbox.d.ts +5 -0
  88. package/registry/demos/checkbox.js +11 -0
  89. package/registry/demos/checkbox.tsx +5 -0
  90. package/registry/demos/chip.d.ts +5 -0
  91. package/registry/demos/chip.js +15 -0
  92. package/registry/demos/chip.tsx +11 -0
  93. package/registry/demos/cn.d.ts +7 -0
  94. package/registry/demos/cn.js +17 -0
  95. package/registry/demos/cn.tsx +9 -0
  96. package/registry/demos/command.d.ts +5 -0
  97. package/registry/demos/command.js +32 -0
  98. package/registry/demos/command.tsx +28 -0
  99. package/registry/demos/confirm-button.d.ts +5 -0
  100. package/registry/demos/confirm-button.js +12 -0
  101. package/registry/demos/confirm-button.tsx +13 -0
  102. package/registry/demos/countdown.d.ts +5 -0
  103. package/registry/demos/countdown.js +13 -0
  104. package/registry/demos/countdown.tsx +10 -0
  105. package/registry/demos/dialog.d.ts +7 -0
  106. package/registry/demos/dialog.js +29 -0
  107. package/registry/demos/dialog.tsx +31 -0
  108. package/registry/demos/dropdown-menu.d.ts +7 -0
  109. package/registry/demos/dropdown-menu.js +36 -0
  110. package/registry/demos/dropdown-menu.tsx +27 -0
  111. package/registry/demos/empty-state.d.ts +5 -0
  112. package/registry/demos/empty-state.js +15 -0
  113. package/registry/demos/empty-state.tsx +12 -0
  114. package/registry/demos/field.d.ts +5 -0
  115. package/registry/demos/field.js +15 -0
  116. package/registry/demos/field.tsx +11 -0
  117. package/registry/demos/kbd.d.ts +5 -0
  118. package/registry/demos/kbd.js +11 -0
  119. package/registry/demos/kbd.tsx +5 -0
  120. package/registry/demos/page-header.d.ts +5 -0
  121. package/registry/demos/page-header.js +11 -0
  122. package/registry/demos/page-header.tsx +5 -0
  123. package/registry/demos/popover.d.ts +7 -0
  124. package/registry/demos/popover.js +25 -0
  125. package/registry/demos/popover.tsx +31 -0
  126. package/registry/demos/progress.d.ts +5 -0
  127. package/registry/demos/progress.js +11 -0
  128. package/registry/demos/progress.tsx +5 -0
  129. package/registry/demos/radio-group.d.ts +5 -0
  130. package/registry/demos/radio-group.js +16 -0
  131. package/registry/demos/radio-group.tsx +14 -0
  132. package/registry/demos/separator.d.ts +5 -0
  133. package/registry/demos/separator.js +15 -0
  134. package/registry/demos/separator.tsx +11 -0
  135. package/registry/demos/skeleton.d.ts +5 -0
  136. package/registry/demos/skeleton.js +20 -0
  137. package/registry/demos/skeleton.tsx +16 -0
  138. package/registry/demos/slider.d.ts +5 -0
  139. package/registry/demos/slider.js +11 -0
  140. package/registry/demos/slider.tsx +5 -0
  141. package/registry/demos/slot.d.ts +5 -0
  142. package/registry/demos/slot.js +14 -0
  143. package/registry/demos/slot.tsx +13 -0
  144. package/registry/demos/spinner.d.ts +5 -0
  145. package/registry/demos/spinner.js +11 -0
  146. package/registry/demos/spinner.tsx +5 -0
  147. package/registry/demos/stat.d.ts +5 -0
  148. package/registry/demos/stat.js +11 -0
  149. package/registry/demos/stat.tsx +5 -0
  150. package/registry/demos/switch.d.ts +5 -0
  151. package/registry/demos/switch.js +11 -0
  152. package/registry/demos/switch.tsx +5 -0
  153. package/registry/demos/tabs.d.ts +5 -0
  154. package/registry/demos/tabs.js +22 -0
  155. package/registry/demos/tabs.tsx +28 -0
  156. package/registry/demos/theme.d.ts +5 -0
  157. package/registry/demos/theme.js +11 -0
  158. package/registry/demos/theme.tsx +9 -0
  159. package/registry/demos/toast.d.ts +8 -0
  160. package/registry/demos/toast.js +29 -0
  161. package/registry/demos/toast.tsx +31 -0
  162. package/registry/demos/tooltip.d.ts +7 -0
  163. package/registry/demos/tooltip.js +15 -0
  164. package/registry/demos/tooltip.tsx +15 -0
  165. package/registry/dialog.json +218 -0
  166. package/registry/dropdown-menu.json +63 -0
  167. package/registry/empty-state.json +59 -0
  168. package/registry/field.json +66 -0
  169. package/registry/index.json +320 -0
  170. package/registry/kbd.json +38 -0
  171. package/registry/page-header.json +66 -0
  172. package/registry/popover.json +44 -0
  173. package/registry/progress.json +80 -0
  174. package/registry/radio-group.json +64 -0
  175. package/registry/separator.json +25 -0
  176. package/registry/skeleton.json +38 -0
  177. package/registry/slider.json +95 -0
  178. package/registry/slot.json +31 -0
  179. package/registry/spinner.json +45 -0
  180. package/registry/stat.json +66 -0
  181. package/registry/switch.json +53 -0
  182. package/registry/tabs.json +44 -0
  183. package/registry/theme.json +78 -0
  184. package/registry/toast.json +54 -0
  185. package/registry/tooltip.json +91 -0
  186. package/dist/chunk-5FRYKFTO.js.map +0 -1
  187. package/dist/chunk-QRG5RYEI.js.map +0 -1
@@ -0,0 +1,11 @@
1
+ import { Chip } from "@krizaka/ui/chip";
2
+
3
+ export default function ChipDemo() {
4
+ return (
5
+ <div className="flex gap-2">
6
+ <Chip>Subtitles</Chip>
7
+ <Chip defaultSelected>HD</Chip>
8
+ <Chip disabled>4K</Chip>
9
+ </div>
10
+ );
11
+ }
@@ -0,0 +1,7 @@
1
+ import * as react from 'react';
2
+
3
+ declare function CnDemo({ selected }: {
4
+ selected?: boolean;
5
+ }): react.JSX.Element;
6
+
7
+ export { CnDemo as default };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+
3
+ // registry/demos/cn.tsx
4
+ import { cn } from "@krizaka/ui/cn";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function CnDemo({ selected = true }) {
7
+ return /* @__PURE__ */ jsxs("p", { className: cn("rounded-lg border border-border-default px-3 py-2 text-sm text-fg-secondary", selected && "border-accent text-fg", "px-4"), children: [
8
+ "The last class wins: ",
9
+ /* @__PURE__ */ jsx("code", { children: "px-4" }),
10
+ " replaces ",
11
+ /* @__PURE__ */ jsx("code", { children: "px-3" }),
12
+ ", and the selected colours replace the idle ones."
13
+ ] });
14
+ }
15
+ export {
16
+ CnDemo as default
17
+ };
@@ -0,0 +1,9 @@
1
+ import { cn } from "@krizaka/ui/cn";
2
+
3
+ export default function CnDemo({ selected = true }: { selected?: boolean }) {
4
+ return (
5
+ <p className={cn("rounded-lg border border-border-default px-3 py-2 text-sm text-fg-secondary", selected && "border-accent text-fg", "px-4")}>
6
+ The last class wins: <code>px-4</code> replaces <code>px-3</code>, and the selected colours replace the idle ones.
7
+ </p>
8
+ );
9
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function CommandDemo(): react.JSX.Element;
4
+
5
+ export { CommandDemo as default };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+
3
+ // registry/demos/command.tsx
4
+ import { Command } from "@krizaka/ui/command";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function CommandDemo() {
7
+ return /* @__PURE__ */ jsxs(Command.Root, { label: "Commands", className: "w-[28rem] max-w-full rounded-xl border border-border-default shadow-lg", children: [
8
+ /* @__PURE__ */ jsx(Command.Input, { placeholder: "Type a command or search" }),
9
+ /* @__PURE__ */ jsxs(Command.List, { label: "Suggestions", children: [
10
+ /* @__PURE__ */ jsx(Command.Empty, { emptyLabel: "Nothing matches." }),
11
+ /* @__PURE__ */ jsxs(Command.Group, { heading: "Pages", children: [
12
+ /* @__PURE__ */ jsxs(Command.Item, { children: [
13
+ "Home",
14
+ /* @__PURE__ */ jsx(Command.Shortcut, { children: "G H" })
15
+ ] }),
16
+ /* @__PURE__ */ jsxs(Command.Item, { children: [
17
+ "Wallet",
18
+ /* @__PURE__ */ jsx(Command.Shortcut, { children: "G W" })
19
+ ] }),
20
+ /* @__PURE__ */ jsx(Command.Item, { disabled: true, children: "Studio" })
21
+ ] }),
22
+ /* @__PURE__ */ jsx(Command.Separator, {}),
23
+ /* @__PURE__ */ jsxs(Command.Group, { heading: "Actions", children: [
24
+ /* @__PURE__ */ jsx(Command.Item, { keywords: ["video", "new"], children: "Upload a video" }),
25
+ /* @__PURE__ */ jsx(Command.Item, { children: "Switch the theme" })
26
+ ] })
27
+ ] })
28
+ ] });
29
+ }
30
+ export {
31
+ CommandDemo as default
32
+ };
@@ -0,0 +1,28 @@
1
+ import { Command } from "@krizaka/ui/command";
2
+
3
+ export default function CommandDemo() {
4
+ return (
5
+ <Command.Root label="Commands" className="w-[28rem] max-w-full rounded-xl border border-border-default shadow-lg">
6
+ <Command.Input placeholder="Type a command or search" />
7
+ <Command.List label="Suggestions">
8
+ <Command.Empty emptyLabel="Nothing matches." />
9
+ <Command.Group heading="Pages">
10
+ <Command.Item>
11
+ Home
12
+ <Command.Shortcut>G H</Command.Shortcut>
13
+ </Command.Item>
14
+ <Command.Item>
15
+ Wallet
16
+ <Command.Shortcut>G W</Command.Shortcut>
17
+ </Command.Item>
18
+ <Command.Item disabled>Studio</Command.Item>
19
+ </Command.Group>
20
+ <Command.Separator />
21
+ <Command.Group heading="Actions">
22
+ <Command.Item keywords={["video", "new"]}>Upload a video</Command.Item>
23
+ <Command.Item>Switch the theme</Command.Item>
24
+ </Command.Group>
25
+ </Command.List>
26
+ </Command.Root>
27
+ );
28
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function ConfirmButtonDemo(): react.JSX.Element;
4
+
5
+ export { ConfirmButtonDemo as default };
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ // registry/demos/confirm-button.tsx
4
+ import { ConfirmButton } from "@krizaka/ui/confirm-button";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function ConfirmButtonDemo() {
7
+ return /* @__PURE__ */ jsx(ConfirmButton, { label: "Delete the comment", confirmLabel: "Delete?", size: "sm", onConfirm: () => {
8
+ }, children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6" }) }) });
9
+ }
10
+ export {
11
+ ConfirmButtonDemo as default
12
+ };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+
3
+ import { ConfirmButton } from "@krizaka/ui/confirm-button";
4
+
5
+ export default function ConfirmButtonDemo() {
6
+ return (
7
+ <ConfirmButton label="Delete the comment" confirmLabel="Delete?" size="sm" onConfirm={() => {}}>
8
+ <svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden>
9
+ <path d="M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6" />
10
+ </svg>
11
+ </ConfirmButton>
12
+ );
13
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function CountdownDemo(): react.JSX.Element;
4
+
5
+ export { CountdownDemo as default };
@@ -0,0 +1,13 @@
1
+ "use client";
2
+
3
+ // registry/demos/countdown.tsx
4
+ import { Countdown } from "@krizaka/ui/countdown";
5
+ import { useState } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function CountdownDemo() {
8
+ const [target] = useState(() => Date.now() + 3723e3);
9
+ return /* @__PURE__ */ jsx(Countdown, { target, units: { d: "d", h: "h", m: "m", s: "s" }, label: "Ends in" });
10
+ }
11
+ export {
12
+ CountdownDemo as default
13
+ };
@@ -0,0 +1,10 @@
1
+ "use client";
2
+
3
+ import { Countdown } from "@krizaka/ui/countdown";
4
+ import { useState } from "react";
5
+
6
+ export default function CountdownDemo() {
7
+ // One hour, two minutes and three seconds from the first render.
8
+ const [target] = useState(() => Date.now() + 3_723_000);
9
+ return <Countdown target={target} units={{ d: "d", h: "h", m: "m", s: "s" }} label="Ends in" />;
10
+ }
@@ -0,0 +1,7 @@
1
+ import * as react from 'react';
2
+
3
+ declare function DialogDemo({ defaultOpen }: {
4
+ defaultOpen?: boolean;
5
+ }): react.JSX.Element;
6
+
7
+ export { DialogDemo as default };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+
3
+ // registry/demos/dialog.tsx
4
+ import { Button } from "@krizaka/ui/button";
5
+ import { Dialog } from "@krizaka/ui/dialog";
6
+ import { Field, Input } from "@krizaka/ui/field";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function DialogDemo({ defaultOpen = false }) {
9
+ return /* @__PURE__ */ jsxs(Dialog.Root, { defaultOpen, children: [
10
+ /* @__PURE__ */ jsx(Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { children: "Open" }) }),
11
+ /* @__PURE__ */ jsxs(Dialog.Content, { closeLabel: "Close", children: [
12
+ /* @__PURE__ */ jsxs(Dialog.Header, { children: [
13
+ /* @__PURE__ */ jsx(Dialog.Title, { children: "Invite a collaborator" }),
14
+ /* @__PURE__ */ jsx(Dialog.Description, { children: "They get access to the drafts of this channel." })
15
+ ] }),
16
+ /* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsxs(Field.Root, { children: [
17
+ /* @__PURE__ */ jsx(Field.Label, { htmlFor: "invite-email", children: "Email" }),
18
+ /* @__PURE__ */ jsx(Input, { id: "invite-email", type: "email", placeholder: "name@example.com" })
19
+ ] }) }),
20
+ /* @__PURE__ */ jsxs(Dialog.Footer, { children: [
21
+ /* @__PURE__ */ jsx(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "ghost", children: "Cancel" }) }),
22
+ /* @__PURE__ */ jsx(Button, { variant: "primary", children: "Send the invitation" })
23
+ ] })
24
+ ] })
25
+ ] });
26
+ }
27
+ export {
28
+ DialogDemo as default
29
+ };
@@ -0,0 +1,31 @@
1
+ import { Button } from "@krizaka/ui/button";
2
+ import { Dialog } from "@krizaka/ui/dialog";
3
+ import { Field, Input } from "@krizaka/ui/field";
4
+
5
+ export default function DialogDemo({ defaultOpen = false }: { defaultOpen?: boolean }) {
6
+ return (
7
+ <Dialog.Root defaultOpen={defaultOpen}>
8
+ <Dialog.Trigger asChild>
9
+ <Button>Open</Button>
10
+ </Dialog.Trigger>
11
+ <Dialog.Content closeLabel="Close">
12
+ <Dialog.Header>
13
+ <Dialog.Title>Invite a collaborator</Dialog.Title>
14
+ <Dialog.Description>They get access to the drafts of this channel.</Dialog.Description>
15
+ </Dialog.Header>
16
+ <Dialog.Body>
17
+ <Field.Root>
18
+ <Field.Label htmlFor="invite-email">Email</Field.Label>
19
+ <Input id="invite-email" type="email" placeholder="name@example.com" />
20
+ </Field.Root>
21
+ </Dialog.Body>
22
+ <Dialog.Footer>
23
+ <Dialog.Close asChild>
24
+ <Button variant="ghost">Cancel</Button>
25
+ </Dialog.Close>
26
+ <Button variant="primary">Send the invitation</Button>
27
+ </Dialog.Footer>
28
+ </Dialog.Content>
29
+ </Dialog.Root>
30
+ );
31
+ }
@@ -0,0 +1,7 @@
1
+ import * as react from 'react';
2
+
3
+ declare function DropdownMenuDemo({ defaultOpen }: {
4
+ defaultOpen?: boolean;
5
+ }): react.JSX.Element;
6
+
7
+ export { DropdownMenuDemo as default };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+
3
+ // registry/demos/dropdown-menu.tsx
4
+ import { Button } from "@krizaka/ui/button";
5
+ import { DropdownMenu } from "@krizaka/ui/dropdown-menu";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ var icon = (d) => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d }) });
8
+ function DropdownMenuDemo({ defaultOpen = false }) {
9
+ return /* @__PURE__ */ jsxs(DropdownMenu.Root, { defaultOpen, modal: false, children: [
10
+ /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Actions" }) }),
11
+ /* @__PURE__ */ jsxs(DropdownMenu.Content, { align: "center", children: [
12
+ /* @__PURE__ */ jsx(DropdownMenu.Label, { children: "Video" }),
13
+ /* @__PURE__ */ jsxs(DropdownMenu.Item, { children: [
14
+ icon("M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"),
15
+ "Edit"
16
+ ] }),
17
+ /* @__PURE__ */ jsxs(DropdownMenu.Item, { children: [
18
+ icon("M4 12v8h16v-8M16 6l-4-4-4 4M12 2v13"),
19
+ "Share"
20
+ ] }),
21
+ /* @__PURE__ */ jsxs(DropdownMenu.Item, { disabled: true, children: [
22
+ icon("M12 3v12M7 10l5 5 5-5M5 21h14"),
23
+ "Download"
24
+ ] }),
25
+ /* @__PURE__ */ jsx(DropdownMenu.CheckboxItem, { checked: true, children: "Pinned to the profile" }),
26
+ /* @__PURE__ */ jsx(DropdownMenu.Separator, {}),
27
+ /* @__PURE__ */ jsxs(DropdownMenu.Item, { tone: "danger", children: [
28
+ icon("M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6"),
29
+ "Delete"
30
+ ] })
31
+ ] })
32
+ ] });
33
+ }
34
+ export {
35
+ DropdownMenuDemo as default
36
+ };
@@ -0,0 +1,27 @@
1
+ import { Button } from "@krizaka/ui/button";
2
+ import { DropdownMenu } from "@krizaka/ui/dropdown-menu";
3
+
4
+ const icon = (d: string) => (
5
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden>
6
+ <path d={d} />
7
+ </svg>
8
+ );
9
+
10
+ export default function DropdownMenuDemo({ defaultOpen = false }: { defaultOpen?: boolean }) {
11
+ return (
12
+ <DropdownMenu.Root defaultOpen={defaultOpen} modal={false}>
13
+ <DropdownMenu.Trigger asChild>
14
+ <Button variant="outline">Actions</Button>
15
+ </DropdownMenu.Trigger>
16
+ <DropdownMenu.Content align="center">
17
+ <DropdownMenu.Label>Video</DropdownMenu.Label>
18
+ <DropdownMenu.Item>{icon("M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z")}Edit</DropdownMenu.Item>
19
+ <DropdownMenu.Item>{icon("M4 12v8h16v-8M16 6l-4-4-4 4M12 2v13")}Share</DropdownMenu.Item>
20
+ <DropdownMenu.Item disabled>{icon("M12 3v12M7 10l5 5 5-5M5 21h14")}Download</DropdownMenu.Item>
21
+ <DropdownMenu.CheckboxItem checked>Pinned to the profile</DropdownMenu.CheckboxItem>
22
+ <DropdownMenu.Separator />
23
+ <DropdownMenu.Item tone="danger">{icon("M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6")}Delete</DropdownMenu.Item>
24
+ </DropdownMenu.Content>
25
+ </DropdownMenu.Root>
26
+ );
27
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function EmptyStateDemo(): react.JSX.Element;
4
+
5
+ export { EmptyStateDemo as default };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+
3
+ // registry/demos/empty-state.tsx
4
+ import { EmptyState } from "@krizaka/ui/empty-state";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ var ICON = /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
7
+ /* @__PURE__ */ jsx("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
8
+ /* @__PURE__ */ jsx("path", { d: "m10 9 5 3-5 3z" })
9
+ ] });
10
+ function EmptyStateDemo() {
11
+ return /* @__PURE__ */ jsx(EmptyState, { icon: ICON, title: "No videos yet", description: "The videos you publish appear here." });
12
+ }
13
+ export {
14
+ EmptyStateDemo as default
15
+ };
@@ -0,0 +1,12 @@
1
+ import { EmptyState } from "@krizaka/ui/empty-state";
2
+
3
+ const ICON = (
4
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
5
+ <rect x="3" y="5" width="18" height="14" rx="2" />
6
+ <path d="m10 9 5 3-5 3z" />
7
+ </svg>
8
+ );
9
+
10
+ export default function EmptyStateDemo() {
11
+ return <EmptyState icon={ICON} title="No videos yet" description="The videos you publish appear here." />;
12
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function FieldDemo(): react.JSX.Element;
4
+
5
+ export { FieldDemo as default };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+
3
+ // registry/demos/field.tsx
4
+ import { Field, Input } from "@krizaka/ui/field";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function FieldDemo() {
7
+ return /* @__PURE__ */ jsxs(Field.Root, { children: [
8
+ /* @__PURE__ */ jsx(Field.Label, { htmlFor: "email", children: "Email" }),
9
+ /* @__PURE__ */ jsx(Input, { id: "email", type: "email", "aria-describedby": "email-hint", placeholder: "you@example.com" }),
10
+ /* @__PURE__ */ jsx(Field.Hint, { id: "email-hint", children: "We never share it." })
11
+ ] });
12
+ }
13
+ export {
14
+ FieldDemo as default
15
+ };
@@ -0,0 +1,11 @@
1
+ import { Field, Input } from "@krizaka/ui/field";
2
+
3
+ export default function FieldDemo() {
4
+ return (
5
+ <Field.Root>
6
+ <Field.Label htmlFor="email">Email</Field.Label>
7
+ <Input id="email" type="email" aria-describedby="email-hint" placeholder="you@example.com" />
8
+ <Field.Hint id="email-hint">We never share it.</Field.Hint>
9
+ </Field.Root>
10
+ );
11
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function KbdDemo(): react.JSX.Element;
4
+
5
+ export { KbdDemo as default };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ // registry/demos/kbd.tsx
4
+ import { Kbd } from "@krizaka/ui/kbd";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function KbdDemo() {
7
+ return /* @__PURE__ */ jsx(Kbd, { children: "Esc" });
8
+ }
9
+ export {
10
+ KbdDemo as default
11
+ };
@@ -0,0 +1,5 @@
1
+ import { Kbd } from "@krizaka/ui/kbd";
2
+
3
+ export default function KbdDemo() {
4
+ return <Kbd>Esc</Kbd>;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function PageHeaderDemo(): react.JSX.Element;
4
+
5
+ export { PageHeaderDemo as default };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ // registry/demos/page-header.tsx
4
+ import { PageHeader } from "@krizaka/ui/page-header";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function PageHeaderDemo() {
7
+ return /* @__PURE__ */ jsx(PageHeader, { title: "Payouts", description: "Your earnings are paid every Monday to the account on file." });
8
+ }
9
+ export {
10
+ PageHeaderDemo as default
11
+ };
@@ -0,0 +1,5 @@
1
+ import { PageHeader } from "@krizaka/ui/page-header";
2
+
3
+ export default function PageHeaderDemo() {
4
+ return <PageHeader title="Payouts" description="Your earnings are paid every Monday to the account on file." />;
5
+ }
@@ -0,0 +1,7 @@
1
+ import * as react from 'react';
2
+
3
+ declare function PopoverDemo({ defaultOpen }: {
4
+ defaultOpen?: boolean;
5
+ }): react.JSX.Element;
6
+
7
+ export { PopoverDemo as default };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+
3
+ // registry/demos/popover.tsx
4
+ import { Button } from "@krizaka/ui/button";
5
+ import { Field, Input } from "@krizaka/ui/field";
6
+ import { Popover } from "@krizaka/ui/popover";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function PopoverDemo({ defaultOpen = false }) {
9
+ return /* @__PURE__ */ jsxs(Popover.Root, { defaultOpen, children: [
10
+ /* @__PURE__ */ jsx(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Set a goal" }) }),
11
+ /* @__PURE__ */ jsx(Popover.Content, { "aria-label": "Set a goal", align: "center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
12
+ /* @__PURE__ */ jsxs(Field.Root, { children: [
13
+ /* @__PURE__ */ jsx(Field.Label, { htmlFor: "goal-amount", children: "Amount" }),
14
+ /* @__PURE__ */ jsx(Input, { id: "goal-amount", defaultValue: "250" })
15
+ ] }),
16
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
17
+ /* @__PURE__ */ jsx(Popover.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", children: "Cancel" }) }),
18
+ /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", children: "Save" })
19
+ ] })
20
+ ] }) })
21
+ ] });
22
+ }
23
+ export {
24
+ PopoverDemo as default
25
+ };
@@ -0,0 +1,31 @@
1
+ import { Button } from "@krizaka/ui/button";
2
+ import { Field, Input } from "@krizaka/ui/field";
3
+ import { Popover } from "@krizaka/ui/popover";
4
+
5
+ export default function PopoverDemo({ defaultOpen = false }: { defaultOpen?: boolean }) {
6
+ return (
7
+ <Popover.Root defaultOpen={defaultOpen}>
8
+ <Popover.Trigger asChild>
9
+ <Button variant="outline">Set a goal</Button>
10
+ </Popover.Trigger>
11
+ <Popover.Content aria-label="Set a goal" align="center">
12
+ <div className="flex flex-col gap-3">
13
+ <Field.Root>
14
+ <Field.Label htmlFor="goal-amount">Amount</Field.Label>
15
+ <Input id="goal-amount" defaultValue="250" />
16
+ </Field.Root>
17
+ <div className="flex justify-end gap-2">
18
+ <Popover.Close asChild>
19
+ <Button size="sm" variant="ghost">
20
+ Cancel
21
+ </Button>
22
+ </Popover.Close>
23
+ <Button size="sm" variant="primary">
24
+ Save
25
+ </Button>
26
+ </div>
27
+ </div>
28
+ </Popover.Content>
29
+ </Popover.Root>
30
+ );
31
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function ProgressDemo(): react.JSX.Element;
4
+
5
+ export { ProgressDemo as default };
@@ -0,0 +1,11 @@
1
+ "use client";
2
+
3
+ // registry/demos/progress.tsx
4
+ import { Progress } from "@krizaka/ui/progress";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function ProgressDemo() {
7
+ return /* @__PURE__ */ jsx(Progress, { label: "Upload", value: 64 });
8
+ }
9
+ export {
10
+ ProgressDemo as default
11
+ };
@@ -0,0 +1,5 @@
1
+ import { Progress } from "@krizaka/ui/progress";
2
+
3
+ export default function ProgressDemo() {
4
+ return <Progress label="Upload" value={64} />;
5
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function RadioGroupDemo(): react.JSX.Element;
4
+
5
+ export { RadioGroupDemo as default };
@@ -0,0 +1,16 @@
1
+ "use client";
2
+
3
+ // registry/demos/radio-group.tsx
4
+ import { RadioGroup } from "@krizaka/ui/radio-group";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function RadioGroupDemo() {
7
+ return /* @__PURE__ */ jsxs(RadioGroup.Root, { label: "Notification frequency", defaultValue: "daily", children: [
8
+ /* @__PURE__ */ jsx(RadioGroup.Item, { value: "instant", children: "Instantly" }),
9
+ /* @__PURE__ */ jsx(RadioGroup.Item, { value: "daily", children: "Once a day" }),
10
+ /* @__PURE__ */ jsx(RadioGroup.Item, { value: "weekly", children: "Once a week" }),
11
+ /* @__PURE__ */ jsx(RadioGroup.Item, { value: "never", disabled: true, children: "Never" })
12
+ ] });
13
+ }
14
+ export {
15
+ RadioGroupDemo as default
16
+ };
@@ -0,0 +1,14 @@
1
+ import { RadioGroup } from "@krizaka/ui/radio-group";
2
+
3
+ export default function RadioGroupDemo() {
4
+ return (
5
+ <RadioGroup.Root label="Notification frequency" defaultValue="daily">
6
+ <RadioGroup.Item value="instant">Instantly</RadioGroup.Item>
7
+ <RadioGroup.Item value="daily">Once a day</RadioGroup.Item>
8
+ <RadioGroup.Item value="weekly">Once a week</RadioGroup.Item>
9
+ <RadioGroup.Item value="never" disabled>
10
+ Never
11
+ </RadioGroup.Item>
12
+ </RadioGroup.Root>
13
+ );
14
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function SeparatorDemo(): react.JSX.Element;
4
+
5
+ export { SeparatorDemo as default };
@@ -0,0 +1,15 @@
1
+ "use client";
2
+
3
+ // registry/demos/separator.tsx
4
+ import { Separator } from "@krizaka/ui/separator";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ function SeparatorDemo() {
7
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-72 flex-col gap-3 text-sm text-fg", children: [
8
+ /* @__PURE__ */ jsx("p", { children: "Account" }),
9
+ /* @__PURE__ */ jsx(Separator, {}),
10
+ /* @__PURE__ */ jsx("p", { className: "text-fg-secondary", children: "Notifications" })
11
+ ] });
12
+ }
13
+ export {
14
+ SeparatorDemo as default
15
+ };
@@ -0,0 +1,11 @@
1
+ import { Separator } from "@krizaka/ui/separator";
2
+
3
+ export default function SeparatorDemo() {
4
+ return (
5
+ <div className="flex w-72 flex-col gap-3 text-sm text-fg">
6
+ <p>Account</p>
7
+ <Separator />
8
+ <p className="text-fg-secondary">Notifications</p>
9
+ </div>
10
+ );
11
+ }
@@ -0,0 +1,5 @@
1
+ import * as react from 'react';
2
+
3
+ declare function SkeletonDemo(): react.JSX.Element;
4
+
5
+ export { SkeletonDemo as default };