xiod-ui 1.0.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 (224) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +167 -0
  3. package/dist/components/accordion.d.ts +9 -0
  4. package/dist/components/accordion.js +46 -0
  5. package/dist/components/agent-steps.d.ts +47 -0
  6. package/dist/components/agent-steps.js +223 -0
  7. package/dist/components/alert-dialog.d.ts +21 -0
  8. package/dist/components/alert-dialog.js +74 -0
  9. package/dist/components/alert.d.ts +12 -0
  10. package/dist/components/alert.js +45 -0
  11. package/dist/components/aspect-ratio.d.ts +9 -0
  12. package/dist/components/aspect-ratio.js +22 -0
  13. package/dist/components/autocomplete.d.ts +35 -0
  14. package/dist/components/autocomplete.js +160 -0
  15. package/dist/components/avatar.d.ts +17 -0
  16. package/dist/components/avatar.js +65 -0
  17. package/dist/components/badge.d.ts +15 -0
  18. package/dist/components/badge.js +46 -0
  19. package/dist/components/breadcrumb.d.ts +12 -0
  20. package/dist/components/breadcrumb.js +75 -0
  21. package/dist/components/button-group.d.ts +14 -0
  22. package/dist/components/button-group.js +45 -0
  23. package/dist/components/button-split.d.ts +19 -0
  24. package/dist/components/button-split.js +73 -0
  25. package/dist/components/button.d.ts +15 -0
  26. package/dist/components/button.js +54 -0
  27. package/dist/components/calendar.d.ts +63 -0
  28. package/dist/components/calendar.js +425 -0
  29. package/dist/components/card.d.ts +17 -0
  30. package/dist/components/card.js +139 -0
  31. package/dist/components/carousel.d.ts +59 -0
  32. package/dist/components/carousel.js +503 -0
  33. package/dist/components/checkbox.d.ts +16 -0
  34. package/dist/components/checkbox.js +86 -0
  35. package/dist/components/circular-progress.d.ts +28 -0
  36. package/dist/components/circular-progress.js +127 -0
  37. package/dist/components/collapsible.d.ts +8 -0
  38. package/dist/components/collapsible.js +27 -0
  39. package/dist/components/color-picker.d.ts +159 -0
  40. package/dist/components/color-picker.js +1589 -0
  41. package/dist/components/combobox.d.ts +46 -0
  42. package/dist/components/combobox.js +237 -0
  43. package/dist/components/command.d.ts +22 -0
  44. package/dist/components/command.js +129 -0
  45. package/dist/components/context-menu.d.ts +38 -0
  46. package/dist/components/context-menu.js +164 -0
  47. package/dist/components/copy-to-clipboard.d.ts +32 -0
  48. package/dist/components/copy-to-clipboard.js +83 -0
  49. package/dist/components/corner-badge.d.ts +22 -0
  50. package/dist/components/corner-badge.js +84 -0
  51. package/dist/components/dashboard-grid.d.ts +83 -0
  52. package/dist/components/dashboard-grid.js +486 -0
  53. package/dist/components/date-picker.d.ts +29 -0
  54. package/dist/components/date-picker.js +261 -0
  55. package/dist/components/dialog.d.ts +26 -0
  56. package/dist/components/dialog.js +97 -0
  57. package/dist/components/dot-matrix.d.ts +32 -0
  58. package/dist/components/dot-matrix.js +707 -0
  59. package/dist/components/draggable.d.ts +42 -0
  60. package/dist/components/draggable.js +346 -0
  61. package/dist/components/drawer.d.ts +66 -0
  62. package/dist/components/drawer.js +304 -0
  63. package/dist/components/empty.d.ts +14 -0
  64. package/dist/components/empty.js +75 -0
  65. package/dist/components/field.d.ts +12 -0
  66. package/dist/components/field.js +44 -0
  67. package/dist/components/fieldset.d.ts +7 -0
  68. package/dist/components/fieldset.js +21 -0
  69. package/dist/components/file-upload.d.ts +61 -0
  70. package/dist/components/file-upload.js +482 -0
  71. package/dist/components/form.d.ts +6 -0
  72. package/dist/components/form.js +14 -0
  73. package/dist/components/frame.d.ts +10 -0
  74. package/dist/components/frame.js +47 -0
  75. package/dist/components/gauge.d.ts +27 -0
  76. package/dist/components/gauge.js +74 -0
  77. package/dist/components/grid.d.ts +26 -0
  78. package/dist/components/grid.js +204 -0
  79. package/dist/components/group.d.ts +19 -0
  80. package/dist/components/group.js +45 -0
  81. package/dist/components/input-group.d.ts +15 -0
  82. package/dist/components/input-group.js +61 -0
  83. package/dist/components/input-otp.d.ts +24 -0
  84. package/dist/components/input-otp.js +50 -0
  85. package/dist/components/input-payment.d.ts +131 -0
  86. package/dist/components/input-payment.js +1140 -0
  87. package/dist/components/input-phone.d.ts +70 -0
  88. package/dist/components/input-phone.js +657 -0
  89. package/dist/components/input-sensitive.d.ts +12 -0
  90. package/dist/components/input-sensitive.js +169 -0
  91. package/dist/components/input.d.ts +13 -0
  92. package/dist/components/input.js +26 -0
  93. package/dist/components/kbd.d.ts +6 -0
  94. package/dist/components/kbd.js +19 -0
  95. package/dist/components/kinetic-click.d.ts +48 -0
  96. package/dist/components/kinetic-click.js +1184 -0
  97. package/dist/components/label.d.ts +6 -0
  98. package/dist/components/label.js +18 -0
  99. package/dist/components/list-box.d.ts +20 -0
  100. package/dist/components/list-box.js +148 -0
  101. package/dist/components/loader.d.ts +13 -0
  102. package/dist/components/loader.js +430 -0
  103. package/dist/components/marker.d.ts +15 -0
  104. package/dist/components/marker.js +59 -0
  105. package/dist/components/menu.d.ts +42 -0
  106. package/dist/components/menu.js +186 -0
  107. package/dist/components/menubar.d.ts +40 -0
  108. package/dist/components/menubar.js +107 -0
  109. package/dist/components/message.d.ts +33 -0
  110. package/dist/components/message.js +112 -0
  111. package/dist/components/meter.d.ts +10 -0
  112. package/dist/components/meter.js +42 -0
  113. package/dist/components/morphic-toast.d.ts +61 -0
  114. package/dist/components/morphic-toast.js +916 -0
  115. package/dist/components/navigation-menu.d.ts +26 -0
  116. package/dist/components/navigation-menu.js +116 -0
  117. package/dist/components/number-field.d.ts +15 -0
  118. package/dist/components/number-field.js +86 -0
  119. package/dist/components/option-picker.d.ts +18 -0
  120. package/dist/components/option-picker.js +89 -0
  121. package/dist/components/orb.d.ts +38 -0
  122. package/dist/components/orb.js +1413 -0
  123. package/dist/components/pagination.d.ts +25 -0
  124. package/dist/components/pagination.js +147 -0
  125. package/dist/components/popover.d.ts +22 -0
  126. package/dist/components/popover.js +79 -0
  127. package/dist/components/preview-card.d.ts +16 -0
  128. package/dist/components/preview-card.js +60 -0
  129. package/dist/components/progress.d.ts +21 -0
  130. package/dist/components/progress.js +139 -0
  131. package/dist/components/radio.d.ts +16 -0
  132. package/dist/components/radio.js +68 -0
  133. package/dist/components/resizable.d.ts +58 -0
  134. package/dist/components/resizable.js +964 -0
  135. package/dist/components/ruler-picker.d.ts +27 -0
  136. package/dist/components/ruler-picker.js +253 -0
  137. package/dist/components/scroll-area.d.ts +13 -0
  138. package/dist/components/scroll-area.js +34 -0
  139. package/dist/components/scroll-bar.d.ts +13 -0
  140. package/dist/components/scroll-bar.js +47 -0
  141. package/dist/components/select.d.ts +29 -0
  142. package/dist/components/select.js +140 -0
  143. package/dist/components/separator.d.ts +6 -0
  144. package/dist/components/separator.js +15 -0
  145. package/dist/components/sidebar.d.ts +65 -0
  146. package/dist/components/sidebar.js +408 -0
  147. package/dist/components/skeleton.d.ts +5 -0
  148. package/dist/components/skeleton.js +12 -0
  149. package/dist/components/slider.d.ts +12 -0
  150. package/dist/components/slider.js +96 -0
  151. package/dist/components/sortable.d.ts +44 -0
  152. package/dist/components/sortable.js +327 -0
  153. package/dist/components/switch.d.ts +15 -0
  154. package/dist/components/switch.js +63 -0
  155. package/dist/components/table.d.ts +12 -0
  156. package/dist/components/table.js +65 -0
  157. package/dist/components/tabs.d.ts +12 -0
  158. package/dist/components/tabs.js +39 -0
  159. package/dist/components/text.d.ts +14 -0
  160. package/dist/components/text.js +69 -0
  161. package/dist/components/textarea.d.ts +9 -0
  162. package/dist/components/textarea.js +20 -0
  163. package/dist/components/theme-provider.d.ts +52 -0
  164. package/dist/components/theme-provider.js +148 -0
  165. package/dist/components/timeline.d.ts +34 -0
  166. package/dist/components/timeline.js +147 -0
  167. package/dist/components/toast.d.ts +17 -0
  168. package/dist/components/toast.js +161 -0
  169. package/dist/components/toggle-group.d.ts +14 -0
  170. package/dist/components/toggle-group.js +53 -0
  171. package/dist/components/toggle.d.ts +11 -0
  172. package/dist/components/toggle.js +36 -0
  173. package/dist/components/toolbar.d.ts +11 -0
  174. package/dist/components/toolbar.js +49 -0
  175. package/dist/components/tooltip.d.ts +17 -0
  176. package/dist/components/tooltip.js +56 -0
  177. package/dist/components/waveform.d.ts +61 -0
  178. package/dist/components/waveform.js +500 -0
  179. package/dist/components/wheel-picker.d.ts +44 -0
  180. package/dist/components/wheel-picker.js +771 -0
  181. package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
  182. package/dist/hooks/use-copy-to-clipboard.js +36 -0
  183. package/dist/hooks/use-media-query.d.ts +21 -0
  184. package/dist/hooks/use-media-query.js +58 -0
  185. package/dist/styles.css +202 -0
  186. package/dist/themes/afterglow.css +89 -0
  187. package/dist/themes/afterglow.scoped.css +90 -0
  188. package/dist/themes/blacklight.css +89 -0
  189. package/dist/themes/blacklight.scoped.css +90 -0
  190. package/dist/themes/cathode.css +89 -0
  191. package/dist/themes/cathode.scoped.css +90 -0
  192. package/dist/themes/cel.css +89 -0
  193. package/dist/themes/cel.scoped.css +90 -0
  194. package/dist/themes/cinder.css +89 -0
  195. package/dist/themes/cinder.scoped.css +90 -0
  196. package/dist/themes/clay.css +89 -0
  197. package/dist/themes/clay.scoped.css +90 -0
  198. package/dist/themes/cobalt.css +89 -0
  199. package/dist/themes/cobalt.scoped.css +90 -0
  200. package/dist/themes/crimson.css +89 -0
  201. package/dist/themes/crimson.scoped.css +90 -0
  202. package/dist/themes/ion.css +89 -0
  203. package/dist/themes/ion.scoped.css +90 -0
  204. package/dist/themes/iris.css +89 -0
  205. package/dist/themes/iris.scoped.css +90 -0
  206. package/dist/themes/lagoon.css +89 -0
  207. package/dist/themes/lagoon.scoped.css +90 -0
  208. package/dist/themes/mochi.css +89 -0
  209. package/dist/themes/mochi.scoped.css +90 -0
  210. package/dist/themes/riso.css +89 -0
  211. package/dist/themes/riso.scoped.css +90 -0
  212. package/dist/themes/roast.css +89 -0
  213. package/dist/themes/roast.scoped.css +90 -0
  214. package/dist/themes/sage.css +89 -0
  215. package/dist/themes/sage.scoped.css +90 -0
  216. package/dist/themes/sepia.css +89 -0
  217. package/dist/themes/sepia.scoped.css +90 -0
  218. package/dist/themes/sorbet.css +89 -0
  219. package/dist/themes/sorbet.scoped.css +90 -0
  220. package/dist/themes/taffy.css +89 -0
  221. package/dist/themes/taffy.scoped.css +90 -0
  222. package/dist/themes/toxin.css +89 -0
  223. package/dist/themes/toxin.scoped.css +90 -0
  224. package/package.json +140 -0
@@ -0,0 +1,169 @@
1
+ "use client";
2
+ import { cn } from "cn";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import * as React$1 from "react";
5
+ import { Check } from "xiod-icons/icons/Check";
6
+ import { Input } from "@base-ui/react/input";
7
+ import { Copy } from "xiod-icons/icons/Copy";
8
+ import { Eye } from "xiod-icons/icons/Eye";
9
+ import { EyeOff } from "xiod-icons/icons/EyeOff";
10
+ //#region src/components/input-sensitive.tsx
11
+ function InputSensitive({ className, size = "default", onCopy, onChange, onBlur, onKeyDown, disabled, readOnly, ...props }) {
12
+ const isControlled = props.value !== void 0;
13
+ const [internalValue, setInternalValue] = React$1.useState(props.defaultValue || "");
14
+ const value = isControlled ? props.value : internalValue;
15
+ const hasValue = value.length > 0;
16
+ const [mode, setMode] = React$1.useState(() => hasValue ? "masked" : "empty");
17
+ const [copied, setCopied] = React$1.useState(false);
18
+ const containerRef = React$1.useRef(null);
19
+ React$1.useEffect(() => {
20
+ if (copied) {
21
+ const timeoutId = setTimeout(() => setCopied(false), 2e3);
22
+ return () => clearTimeout(timeoutId);
23
+ }
24
+ }, [copied]);
25
+ const copyToClipboard = React$1.useCallback(async (e) => {
26
+ e.stopPropagation();
27
+ e.preventDefault();
28
+ try {
29
+ if (typeof navigator !== "undefined" && navigator.clipboard && typeof navigator.clipboard.writeText === "function") {
30
+ await navigator.clipboard.writeText(value);
31
+ setCopied(true);
32
+ onCopy?.();
33
+ return;
34
+ }
35
+ } catch {}
36
+ }, [value, onCopy]);
37
+ const prevHasValueRef = React$1.useRef(hasValue);
38
+ if (prevHasValueRef.current !== hasValue) {
39
+ prevHasValueRef.current = hasValue;
40
+ if (!hasValue && mode === "masked") setMode("empty");
41
+ }
42
+ const handleContainerClick = React$1.useCallback((_e) => {
43
+ if (disabled) return;
44
+ if (mode === "masked" && hasValue) {
45
+ setMode("revealed");
46
+ if (!readOnly) setTimeout(() => {
47
+ containerRef.current?.querySelector("input")?.focus();
48
+ }, 0);
49
+ }
50
+ }, [
51
+ mode,
52
+ hasValue,
53
+ disabled,
54
+ readOnly
55
+ ]);
56
+ const handleToggleVisibility = React$1.useCallback((e) => {
57
+ e.stopPropagation();
58
+ e.preventDefault();
59
+ if (mode === "revealed") setMode("masked");
60
+ else if (mode === "empty" && hasValue) setMode("revealed");
61
+ }, [mode, hasValue]);
62
+ const handleChange = React$1.useCallback((e) => {
63
+ const newValue = e.target.value;
64
+ if (!isControlled) setInternalValue(newValue);
65
+ if (mode === "empty" && newValue.length > 0) setMode("revealed");
66
+ onChange?.(e);
67
+ }, [
68
+ isControlled,
69
+ onChange,
70
+ mode
71
+ ]);
72
+ const handleBlur = React$1.useCallback((e) => {
73
+ if (containerRef.current && e.relatedTarget instanceof Node && containerRef.current.contains(e.relatedTarget)) return;
74
+ if (hasValue) setMode("masked");
75
+ onBlur?.(e);
76
+ }, [hasValue, onBlur]);
77
+ const handleContainerKeyDown = React$1.useCallback((e) => {
78
+ if (disabled) return;
79
+ if (mode === "masked" && hasValue) {
80
+ if (e.key === "Enter" || e.key === " ") {
81
+ e.preventDefault();
82
+ setMode("revealed");
83
+ if (!readOnly) setTimeout(() => {
84
+ containerRef.current?.querySelector("input")?.focus();
85
+ }, 0);
86
+ }
87
+ }
88
+ }, [
89
+ mode,
90
+ hasValue,
91
+ disabled,
92
+ readOnly
93
+ ]);
94
+ const handleInputKeyDown = React$1.useCallback((e) => {
95
+ if (mode === "revealed" && e.key === "Escape") {
96
+ setMode("masked");
97
+ setTimeout(() => containerRef.current?.querySelector("[data-slot=\"input-sensitive-mask\"]")?.focus(), 0);
98
+ }
99
+ onKeyDown?.(e);
100
+ }, [mode, onKeyDown]);
101
+ const isMaskedWithValue = mode === "masked" && hasValue;
102
+ const showEyeButton = !disabled && (mode === "revealed" || mode === "empty" && hasValue);
103
+ const inputClassName = cn("h-8.5 w-full min-w-0 rounded-[inherit] leading-8.5 outline-none placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5 [transition:background-color_5000000s_ease-in-out_0s]", "bg-transparent border-0 ring-0", size === "sm" && "h-7.5 leading-7.5 sm:h-6.5 sm:leading-6.5", size === "lg" && "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5", "px-[calc(--spacing(3)-1px)] pr-[--sensitive-pr]", size === "sm" && "px-[calc(--spacing(2.5)-1px)] pr-[--sensitive-pr]", disabled && "cursor-not-allowed", isMaskedWithValue && "pointer-events-none opacity-0");
104
+ return /* @__PURE__ */ jsxs("span", {
105
+ ref: containerRef,
106
+ className: cn("group/container relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", isMaskedWithValue && !disabled && "cursor-pointer", className) || void 0,
107
+ style: { "--sensitive-pr": "calc(--spacing(18))" },
108
+ "data-size": size,
109
+ "data-slot": "input-control",
110
+ children: [
111
+ /* @__PURE__ */ jsx(Input, {
112
+ "data-slot": "input",
113
+ size: typeof size === "number" ? size : void 0,
114
+ ...props,
115
+ className: inputClassName,
116
+ type: mode === "revealed" ? "text" : "password",
117
+ value,
118
+ onChange: handleChange,
119
+ onBlur: handleBlur,
120
+ onKeyDown: handleInputKeyDown,
121
+ readOnly: readOnly || isMaskedWithValue,
122
+ disabled,
123
+ tabIndex: isMaskedWithValue ? -1 : 0,
124
+ "aria-hidden": isMaskedWithValue
125
+ }),
126
+ /* @__PURE__ */ jsx("span", {
127
+ className: cn("pointer-events-none absolute inset-y-0 left-0 flex items-center overflow-hidden select-none", "px-[calc(--spacing(3)-1px)]", size === "sm" && "px-[calc(--spacing(2.5)-1px)]", "right-[--sensitive-pr]", !isMaskedWithValue && "invisible", isMaskedWithValue && "pointer-events-auto text-foreground group/mask"),
128
+ role: isMaskedWithValue ? "button" : void 0,
129
+ "aria-label": isMaskedWithValue ? props["aria-label"] ?? "Reveal sensitive value" : void 0,
130
+ "aria-hidden": isMaskedWithValue ? void 0 : true,
131
+ tabIndex: isMaskedWithValue && !disabled ? 0 : void 0,
132
+ onClick: isMaskedWithValue ? handleContainerClick : void 0,
133
+ onKeyDown: isMaskedWithValue ? handleContainerKeyDown : void 0,
134
+ "data-slot": "input-sensitive-mask",
135
+ children: /* @__PURE__ */ jsxs("span", {
136
+ className: "relative flex items-center",
137
+ children: [/* @__PURE__ */ jsx("span", {
138
+ className: cn("tracking-widest", isMaskedWithValue && !disabled && "group-focus/container:invisible group-hover/container:invisible"),
139
+ children: "••••••••"
140
+ }), isMaskedWithValue && !disabled && /* @__PURE__ */ jsx("span", {
141
+ className: "invisible absolute left-0 whitespace-nowrap text-muted-foreground group-focus/container:visible group-hover/container:visible",
142
+ children: "Click to reveal"
143
+ })]
144
+ })
145
+ }),
146
+ /* @__PURE__ */ jsxs("div", {
147
+ className: "absolute inset-y-0 right-0 flex items-center gap-0.5 pr-[calc(--spacing(1)-1px)]",
148
+ children: [hasValue && !disabled && /* @__PURE__ */ jsx("button", {
149
+ type: "button",
150
+ onClick: copyToClipboard,
151
+ onKeyDown: (e) => e.stopPropagation(),
152
+ "aria-label": copied ? "Copied" : "Copy to clipboard",
153
+ className: cn("relative flex size-7 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-accent-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:size-6 pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11", "group-focus-within/container:opacity-100 group-hover/container:opacity-100"),
154
+ children: copied ? /* @__PURE__ */ jsx(Check, { className: "size-4 text-success sm:size-3.5" }) : /* @__PURE__ */ jsx(Copy, { className: "size-4 sm:size-3.5" })
155
+ }), /* @__PURE__ */ jsx("button", {
156
+ type: "button",
157
+ onClick: handleToggleVisibility,
158
+ onKeyDown: (e) => e.stopPropagation(),
159
+ "aria-label": mode === "revealed" ? "Hide value" : "Reveal value",
160
+ tabIndex: showEyeButton ? 0 : -1,
161
+ className: cn("relative flex size-7 items-center justify-center rounded-md text-muted-foreground transition-[color,background-color,opacity,box-shadow] hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring sm:size-6 pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11", !showEyeButton && !disabled && "pointer-events-none opacity-0 group-hover/container:pointer-events-auto group-hover/container:opacity-100 group-focus-within/container:pointer-events-auto group-focus-within/container:opacity-100", !showEyeButton && disabled && "pointer-events-none opacity-0"),
162
+ children: mode === "revealed" ? /* @__PURE__ */ jsx(EyeOff, { className: "size-4 sm:size-3.5" }) : /* @__PURE__ */ jsx(Eye, { className: "size-4 sm:size-3.5" })
163
+ })]
164
+ })
165
+ ]
166
+ });
167
+ }
168
+ //#endregion
169
+ export { InputSensitive };
@@ -0,0 +1,13 @@
1
+ import * as React$1 from "react";
2
+ import { Input as Input$1 } from "@base-ui/react/input";
3
+ //#region src/components/input.d.ts
4
+ type InputProps = Omit<Input$1.Props & React$1.RefAttributes<HTMLInputElement>, "size" | "className" | "style"> & {
5
+ size?: "sm" | "default" | "lg" | number;
6
+ unstyled?: boolean;
7
+ nativeInput?: boolean;
8
+ className?: string;
9
+ style?: React$1.CSSProperties;
10
+ };
11
+ declare function Input({ className, size, unstyled, nativeInput, ...props }: InputProps): React$1.JSX.Element;
12
+ //#endregion
13
+ export { Input, type InputProps };
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { cn } from "cn";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Input as Input$1 } from "@base-ui/react/input";
5
+ //#region src/components/input.tsx
6
+ function Input({ className, size = "default", unstyled = false, nativeInput = false, ...props }) {
7
+ const inputClassName = cn("h-8.5 w-full min-w-0 rounded-[inherit] px-[calc(--spacing(3)-1px)] leading-8.5 outline-none placeholder:text-muted-foreground/72 sm:h-7.5 sm:leading-7.5 [transition:background-color_5000000s_ease-in-out_0s]", size === "sm" && "h-7.5 px-[calc(--spacing(2.5)-1px)] leading-7.5 sm:h-6.5 sm:leading-6.5", size === "lg" && "h-9.5 leading-9.5 sm:h-8.5 sm:leading-8.5", props.type === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none", props.type === "file" && "text-muted-foreground file:me-3 file:bg-transparent file:font-medium file:text-foreground file:text-sm");
8
+ return /* @__PURE__ */ jsx("span", {
9
+ className: cn(!unstyled && "relative inline-flex w-full rounded-lg border border-input bg-background not-dark:bg-clip-padding text-base text-foreground shadow-xs/5 ring-ring/24 transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] has-focus-visible:has-aria-invalid:border-destructive/64 has-focus-visible:has-aria-invalid:ring-destructive/16 has-aria-invalid:border-destructive/36 has-focus-visible:border-ring has-autofill:bg-foreground/4 has-disabled:opacity-64 has-[:disabled,:focus-visible,[aria-invalid]]:shadow-none has-focus-visible:ring-[3px] sm:text-sm dark:bg-input/32 dark:has-autofill:bg-foreground/8 dark:has-aria-invalid:ring-destructive/24 dark:not-has-disabled:not-has-focus-visible:not-has-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)]", className) || void 0,
10
+ "data-size": size,
11
+ "data-slot": "input-control",
12
+ children: nativeInput ? /* @__PURE__ */ jsx("input", {
13
+ className: inputClassName,
14
+ "data-slot": "input",
15
+ size: typeof size === "number" ? size : void 0,
16
+ ...props
17
+ }) : /* @__PURE__ */ jsx(Input$1, {
18
+ className: inputClassName,
19
+ "data-slot": "input",
20
+ size: typeof size === "number" ? size : void 0,
21
+ ...props
22
+ })
23
+ });
24
+ }
25
+ //#endregion
26
+ export { Input };
@@ -0,0 +1,6 @@
1
+ import * as React$1 from "react";
2
+ //#region src/components/kbd.d.ts
3
+ declare function Kbd({ className, ...props }: React$1.ComponentProps<"kbd">): React$1.JSX.Element;
4
+ declare function KbdGroup({ className, ...props }: React$1.ComponentProps<"kbd">): React$1.JSX.Element;
5
+ //#endregion
6
+ export { Kbd, KbdGroup };
@@ -0,0 +1,19 @@
1
+ import { cn } from "cn";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/kbd.tsx
4
+ function Kbd({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx("kbd", {
6
+ className: cn("pointer-events-none relative inline-flex h-5 min-w-5 select-none items-center justify-center gap-1 rounded-sm border border-input border-b-2 bg-popover px-1.5 font-medium font-sans text-muted-foreground text-[10px] shadow-xs/5 before:absolute before:inset-0 before:pointer-events-none before:rounded-[inherit] before:shadow-[0_1px_var(--border)] [&_svg:not([class*='size-'])]:size-3", className),
7
+ "data-slot": "kbd",
8
+ ...props
9
+ });
10
+ }
11
+ function KbdGroup({ className, ...props }) {
12
+ return /* @__PURE__ */ jsx("kbd", {
13
+ className: cn("inline-flex items-center gap-1", className),
14
+ "data-slot": "kbd-group",
15
+ ...props
16
+ });
17
+ }
18
+ //#endregion
19
+ export { Kbd, KbdGroup };
@@ -0,0 +1,48 @@
1
+ import * as React$1 from "react";
2
+ import { ReactNode } from "react";
3
+ //#region src/components/kinetic-click.d.ts
4
+ export type KineticClickVariant = "spark" | "ripple" | "embers" | "quantum" | "tesseract" | "blackhole" | "firework" | "shatter" | "warp" | "matrix" | "smoke" | "supernova" | "holosphere" | "flowfield" | "synapse" | "diffusion" | "rain" | "binary" | "fission" | "bullettime";
5
+ export type KineticClickTrigger = "click" | "mousedown";
6
+ export interface KineticClickProps extends React$1.HTMLAttributes<HTMLDivElement> {
7
+ /**
8
+ * The animation variant to trigger on click.
9
+ * @default "spark"
10
+ */
11
+ variant?: KineticClickVariant;
12
+ /**
13
+ * The particle/effect color. Accepts standard hex, rgb, or "currentColor"
14
+ * to automatically inherit computed style colors of the clicked target.
15
+ * @default "currentColor"
16
+ */
17
+ color?: string;
18
+ /**
19
+ * The style property to inherit color from when color is "currentColor".
20
+ * - "text": Inherits from computed text color.
21
+ * - "background": Inherits from computed background color.
22
+ * - "border": Inherits from computed border color.
23
+ * - "auto": Intelligently fallback from text -> background -> border (useful if text is neutral like white/black).
24
+ * @default "auto"
25
+ */
26
+ colorFrom?: "text" | "background" | "border" | "auto";
27
+ /**
28
+ * Number of particles/ripples/structures to spawn.
29
+ */
30
+ count?: number;
31
+ /**
32
+ * Custom scale/size metric for particles/ripples.
33
+ */
34
+ size?: number;
35
+ /**
36
+ * Overall animation duration in milliseconds.
37
+ */
38
+ duration?: number;
39
+ /**
40
+ * Trigger event type.
41
+ * @default "mousedown"
42
+ */
43
+ trigger?: KineticClickTrigger;
44
+ children?: ReactNode;
45
+ }
46
+ declare const KineticClick: React$1.MemoExoticComponent<({ variant, color, colorFrom, count, size, duration, trigger, className, style, children, ...props }: KineticClickProps) => React$1.JSX.Element>;
47
+ //#endregion
48
+ export { KineticClick };