@codefast/ui 0.3.9 → 0.3.10

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 (245) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/components/accordion.cjs +97 -1
  3. package/dist/components/accordion.d.ts +4 -4
  4. package/dist/components/accordion.js +51 -1
  5. package/dist/components/alert-dialog.cjs +155 -1
  6. package/dist/components/alert-dialog.d.ts +11 -11
  7. package/dist/components/alert-dialog.js +94 -1
  8. package/dist/components/alert.cjs +84 -1
  9. package/dist/components/alert.d.ts +5 -5
  10. package/dist/components/alert.js +41 -1
  11. package/dist/components/aspect-ratio.cjs +43 -1
  12. package/dist/components/aspect-ratio.d.ts +2 -2
  13. package/dist/components/aspect-ratio.js +9 -1
  14. package/dist/components/avatar.cjs +65 -1
  15. package/dist/components/avatar.d.ts +2 -2
  16. package/dist/components/avatar.js +25 -1
  17. package/dist/components/badge.cjs +66 -1
  18. package/dist/components/badge.d.ts +3 -3
  19. package/dist/components/badge.js +29 -1
  20. package/dist/components/breadcrumb.cjs +126 -1
  21. package/dist/components/breadcrumb.d.ts +8 -8
  22. package/dist/components/breadcrumb.js +74 -1
  23. package/dist/components/button-group.cjs +86 -1
  24. package/dist/components/button-group.d.ts +5 -5
  25. package/dist/components/button-group.js +43 -1
  26. package/dist/components/button.cjs +92 -1
  27. package/dist/components/button.d.ts +6 -6
  28. package/dist/components/button.js +55 -1
  29. package/dist/components/calendar.cjs +150 -1
  30. package/dist/components/calendar.d.ts +12 -19
  31. package/dist/components/calendar.js +113 -1
  32. package/dist/components/card.cjs +105 -1
  33. package/dist/components/card.d.ts +8 -8
  34. package/dist/components/card.js +53 -1
  35. package/dist/components/carousel.cjs +210 -1
  36. package/dist/components/carousel.d.ts +10 -10
  37. package/dist/components/carousel.js +151 -1
  38. package/dist/components/chart.cjs +250 -3
  39. package/dist/components/chart.d.ts +9 -9
  40. package/dist/components/chart.js +198 -3
  41. package/dist/components/checkbox-cards.cjs +69 -1
  42. package/dist/components/checkbox-cards.d.ts +2 -2
  43. package/dist/components/checkbox-cards.js +32 -1
  44. package/dist/components/checkbox-group.cjs +63 -1
  45. package/dist/components/checkbox-group.d.ts +2 -2
  46. package/dist/components/checkbox-group.js +26 -1
  47. package/dist/components/checkbox.cjs +53 -1
  48. package/dist/components/checkbox.d.ts +2 -2
  49. package/dist/components/checkbox.js +19 -1
  50. package/dist/components/collapsible.cjs +61 -1
  51. package/dist/components/collapsible.d.ts +2 -2
  52. package/dist/components/collapsible.js +21 -1
  53. package/dist/components/command.cjs +167 -1
  54. package/dist/components/command.d.ts +4 -4
  55. package/dist/components/command.js +106 -1
  56. package/dist/components/context-menu.cjs +218 -1
  57. package/dist/components/context-menu.d.ts +4 -4
  58. package/dist/components/context-menu.js +142 -1
  59. package/dist/components/dialog.cjs +164 -1
  60. package/dist/components/dialog.d.ts +10 -10
  61. package/dist/components/dialog.js +106 -1
  62. package/dist/components/drawer.cjs +143 -1
  63. package/dist/components/drawer.d.ts +9 -9
  64. package/dist/components/drawer.js +85 -1
  65. package/dist/components/dropdown-menu.cjs +221 -1
  66. package/dist/components/dropdown-menu.d.ts +4 -4
  67. package/dist/components/dropdown-menu.js +145 -1
  68. package/dist/components/empty.cjs +113 -1
  69. package/dist/components/empty.d.ts +9 -9
  70. package/dist/components/empty.js +61 -1
  71. package/dist/components/field.cjs +193 -1
  72. package/dist/components/field.d.ts +14 -14
  73. package/dist/components/field.js +129 -1
  74. package/dist/components/form.cjs +151 -1
  75. package/dist/components/form.d.ts +10 -10
  76. package/dist/components/form.js +96 -1
  77. package/dist/components/hover-card.cjs +77 -1
  78. package/dist/components/hover-card.d.ts +2 -2
  79. package/dist/components/hover-card.js +34 -1
  80. package/dist/components/input-group.cjs +155 -1
  81. package/dist/components/input-group.d.ts +15 -15
  82. package/dist/components/input-group.js +97 -1
  83. package/dist/components/input-number.cjs +98 -1
  84. package/dist/components/input-number.d.ts +2 -2
  85. package/dist/components/input-number.js +64 -1
  86. package/dist/components/input-otp.cjs +101 -1
  87. package/dist/components/input-otp.d.ts +6 -6
  88. package/dist/components/input-otp.js +49 -1
  89. package/dist/components/input-password.cjs +71 -1
  90. package/dist/components/input-password.d.ts +3 -3
  91. package/dist/components/input-password.js +37 -1
  92. package/dist/components/input-search.cjs +80 -1
  93. package/dist/components/input-search.d.ts +3 -3
  94. package/dist/components/input-search.js +46 -1
  95. package/dist/components/input.cjs +45 -1
  96. package/dist/components/input.d.ts +2 -2
  97. package/dist/components/input.js +11 -1
  98. package/dist/components/item.cjs +186 -1
  99. package/dist/components/item.d.ts +12 -12
  100. package/dist/components/item.js +119 -1
  101. package/dist/components/kbd.cjs +54 -1
  102. package/dist/components/kbd.d.ts +3 -3
  103. package/dist/components/kbd.js +17 -1
  104. package/dist/components/label.cjs +45 -1
  105. package/dist/components/label.d.ts +2 -2
  106. package/dist/components/label.js +11 -1
  107. package/dist/components/menubar.cjs +232 -1
  108. package/dist/components/menubar.d.ts +4 -4
  109. package/dist/components/menubar.js +153 -1
  110. package/dist/components/native-select.cjs +75 -1
  111. package/dist/components/native-select.d.ts +4 -4
  112. package/dist/components/native-select.js +35 -1
  113. package/dist/components/navigation-menu.cjs +146 -2
  114. package/dist/components/navigation-menu.d.ts +2 -2
  115. package/dist/components/navigation-menu.js +94 -2
  116. package/dist/components/pagination.cjs +138 -1
  117. package/dist/components/pagination.d.ts +10 -10
  118. package/dist/components/pagination.js +86 -1
  119. package/dist/components/popover.cjs +86 -1
  120. package/dist/components/popover.d.ts +3 -3
  121. package/dist/components/popover.js +40 -1
  122. package/dist/components/progress-circle.cjs +184 -1
  123. package/dist/components/progress-circle.d.ts +5 -5
  124. package/dist/components/progress-circle.js +147 -1
  125. package/dist/components/progress.cjs +52 -1
  126. package/dist/components/progress.d.ts +2 -2
  127. package/dist/components/progress.js +18 -1
  128. package/dist/components/radio-cards.cjs +66 -1
  129. package/dist/components/radio-cards.d.ts +2 -2
  130. package/dist/components/radio-cards.js +29 -1
  131. package/dist/components/radio-group.cjs +59 -1
  132. package/dist/components/radio-group.d.ts +2 -2
  133. package/dist/components/radio-group.js +22 -1
  134. package/dist/components/radio.cjs +47 -1
  135. package/dist/components/radio.d.ts +2 -2
  136. package/dist/components/radio.js +13 -1
  137. package/dist/components/resizable.cjs +71 -1
  138. package/dist/components/resizable.d.ts +8 -8
  139. package/dist/components/resizable.js +31 -1
  140. package/dist/components/scroll-area.cjs +140 -1
  141. package/dist/components/scroll-area.d.ts +5 -5
  142. package/dist/components/scroll-area.js +100 -1
  143. package/dist/components/select.cjs +180 -1
  144. package/dist/components/select.d.ts +5 -5
  145. package/dist/components/select.js +119 -1
  146. package/dist/components/separator.cjs +82 -1
  147. package/dist/components/separator.d.ts +5 -5
  148. package/dist/components/separator.js +42 -1
  149. package/dist/components/sheet.cjs +184 -1
  150. package/dist/components/sheet.d.ts +9 -9
  151. package/dist/components/sheet.js +123 -1
  152. package/dist/components/sidebar.cjs +506 -1
  153. package/dist/components/sidebar.d.ts +31 -31
  154. package/dist/components/sidebar.js +400 -1
  155. package/dist/components/skeleton.cjs +44 -1
  156. package/dist/components/skeleton.d.ts +2 -2
  157. package/dist/components/skeleton.js +10 -1
  158. package/dist/components/slider.cjs +79 -1
  159. package/dist/components/slider.d.ts +2 -2
  160. package/dist/components/slider.js +45 -1
  161. package/dist/components/sonner.cjs +57 -1
  162. package/dist/components/sonner.d.ts +3 -3
  163. package/dist/components/sonner.js +17 -1
  164. package/dist/components/spinner.cjs +75 -1
  165. package/dist/components/spinner.d.ts +2 -2
  166. package/dist/components/spinner.js +41 -1
  167. package/dist/components/switch.cjs +49 -1
  168. package/dist/components/switch.d.ts +2 -2
  169. package/dist/components/switch.js +15 -1
  170. package/dist/components/table.cjs +118 -1
  171. package/dist/components/table.d.ts +9 -9
  172. package/dist/components/table.js +63 -1
  173. package/dist/components/tabs.cjs +75 -1
  174. package/dist/components/tabs.d.ts +3 -3
  175. package/dist/components/tabs.js +32 -1
  176. package/dist/components/textarea.cjs +44 -1
  177. package/dist/components/textarea.d.ts +2 -2
  178. package/dist/components/textarea.js +10 -1
  179. package/dist/components/toggle-group.cjs +90 -1
  180. package/dist/components/toggle-group.d.ts +10 -12
  181. package/dist/components/toggle-group.js +53 -1
  182. package/dist/components/toggle.cjs +71 -1
  183. package/dist/components/toggle.d.ts +10 -12
  184. package/dist/components/toggle.js +34 -1
  185. package/dist/components/tooltip.cjs +90 -1
  186. package/dist/components/tooltip.d.ts +3 -3
  187. package/dist/components/tooltip.js +44 -1
  188. package/dist/css/amber.css +95 -1
  189. package/dist/css/blue.css +95 -1
  190. package/dist/css/cyan.css +95 -1
  191. package/dist/css/emerald.css +95 -1
  192. package/dist/css/fuchsia.css +95 -1
  193. package/dist/css/gray.css +95 -1
  194. package/dist/css/green.css +95 -1
  195. package/dist/css/indigo.css +95 -1
  196. package/dist/css/lime.css +95 -1
  197. package/dist/css/neutral.css +95 -1
  198. package/dist/css/orange.css +95 -1
  199. package/dist/css/pink.css +95 -1
  200. package/dist/css/preset.css +118 -1
  201. package/dist/css/purple.css +95 -1
  202. package/dist/css/red.css +95 -1
  203. package/dist/css/rose.css +95 -1
  204. package/dist/css/sky.css +95 -1
  205. package/dist/css/slate.css +95 -1
  206. package/dist/css/stone.css +95 -1
  207. package/dist/css/style.css +3 -1
  208. package/dist/css/teal.css +95 -1
  209. package/dist/css/violet.css +95 -1
  210. package/dist/css/yellow.css +95 -1
  211. package/dist/css/zinc.css +95 -1
  212. package/dist/hooks/use-animated-value.cjs +74 -1
  213. package/dist/hooks/use-animated-value.d.ts +9 -10
  214. package/dist/hooks/use-animated-value.js +40 -1
  215. package/dist/hooks/use-copy-to-clipboard.cjs +57 -1
  216. package/dist/hooks/use-copy-to-clipboard.d.ts +18 -1
  217. package/dist/hooks/use-copy-to-clipboard.js +23 -1
  218. package/dist/hooks/use-is-mobile.cjs +39 -1
  219. package/dist/hooks/use-is-mobile.d.ts +15 -6
  220. package/dist/hooks/use-is-mobile.js +5 -1
  221. package/dist/hooks/use-media-query.cjs +56 -1
  222. package/dist/hooks/use-media-query.d.ts +11 -3
  223. package/dist/hooks/use-media-query.js +22 -1
  224. package/dist/hooks/use-mutation-observer.cjs +56 -1
  225. package/dist/hooks/use-mutation-observer.d.ts +8 -12
  226. package/dist/hooks/use-mutation-observer.js +22 -1
  227. package/dist/hooks/use-pagination.cjs +92 -1
  228. package/dist/hooks/use-pagination.d.ts +12 -10
  229. package/dist/hooks/use-pagination.js +55 -1
  230. package/dist/index.cjs +1081 -1
  231. package/dist/index.d.ts +130 -131
  232. package/dist/index.js +69 -1
  233. package/dist/primitives/checkbox-group.cjs +151 -1
  234. package/dist/primitives/checkbox-group.d.ts +11 -11
  235. package/dist/primitives/checkbox-group.js +99 -1
  236. package/dist/primitives/input-number.cjs +439 -1
  237. package/dist/primitives/input-number.d.ts +8 -8
  238. package/dist/primitives/input-number.js +381 -1
  239. package/dist/primitives/input.cjs +99 -1
  240. package/dist/primitives/input.d.ts +4 -4
  241. package/dist/primitives/input.js +53 -1
  242. package/dist/primitives/progress-circle.cjs +198 -1
  243. package/dist/primitives/progress-circle.d.ts +7 -7
  244. package/dist/primitives/progress-circle.js +128 -1
  245. package/package.json +385 -38
@@ -1,32 +1,32 @@
1
- import type { ComponentProps, JSX } from "react";
2
- import type { ButtonProps } from "./button";
3
- import type { InputProps } from "./input";
4
- import type { TextareaProps } from "./textarea";
5
- import type { VariantProps } from "@codefast/tailwind-variants";
1
+ import type { VariantProps } from '@codefast/tailwind-variants';
2
+ import type { ComponentProps, JSX } from 'react';
3
+ import type { ButtonProps } from './button';
4
+ import type { InputProps } from './input';
5
+ import type { TextareaProps } from './textarea';
6
6
  declare const inputGroupVariants: import("@codefast/tailwind-variants").VariantFunctionType<import("@codefast/tailwind-variants").ConfigurationSchema, Record<string, never>>;
7
7
  declare const inputGroupAddonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
8
8
  align: {
9
- "block-end": string;
10
- "block-start": string;
11
- "inline-end": string;
12
- "inline-start": string;
9
+ 'block-end': string;
10
+ 'block-start': string;
11
+ 'inline-end': string;
12
+ 'inline-start': string;
13
13
  };
14
14
  }, Record<string, never>>;
15
15
  declare const inputGroupButtonVariants: import("@codefast/tailwind-variants").VariantFunctionType<{
16
16
  size: {
17
- "icon-sm": string;
18
- "icon-xs": string;
17
+ 'icon-sm': string;
18
+ 'icon-xs': string;
19
19
  sm: string;
20
20
  xs: string;
21
21
  };
22
22
  }, Record<string, never>>;
23
- type InputGroupProps = ComponentProps<"div">;
23
+ type InputGroupProps = ComponentProps<'div'>;
24
24
  declare function InputGroup({ className, ...props }: InputGroupProps): JSX.Element;
25
- type InputGroupAddonProps = ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>;
25
+ type InputGroupAddonProps = ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>;
26
26
  declare function InputGroupAddon({ align, className, ...props }: InputGroupAddonProps): JSX.Element;
27
- type InputGroupButtonProps = Omit<ButtonProps, "size"> & VariantProps<typeof inputGroupButtonVariants>;
27
+ type InputGroupButtonProps = Omit<ButtonProps, 'size'> & VariantProps<typeof inputGroupButtonVariants>;
28
28
  declare function InputGroupButton({ className, size, type, variant, ...props }: InputGroupButtonProps): JSX.Element;
29
- type InputGroupTextProps = ComponentProps<"span">;
29
+ type InputGroupTextProps = ComponentProps<'span'>;
30
30
  declare function InputGroupText({ className, ...props }: InputGroupTextProps): JSX.Element;
31
31
  type InputGroupInputProps = InputProps;
32
32
  declare function InputGroupInput({ className, ...props }: InputGroupInputProps): JSX.Element;
@@ -1,2 +1,98 @@
1
1
  "use client";
2
- import{jsx as t}from"react/jsx-runtime";import{Button as a}from"./button.js";import{Input as r}from"./input.js";import{Textarea as n}from"./textarea.js";import{cn as o,tv as e}from"@codefast/tailwind-variants";let s=e({base:o("group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-lg border shadow-xs transition-[color,box-shadow] outline-none","h-9 min-w-0 has-[>textarea]:h-auto","has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2","has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2","has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3","has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3","has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]","has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40")}),i=e({base:o("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50"),defaultVariants:{align:"inline-start"},variants:{align:{"block-end":"order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5","block-start":"order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5","inline-end":"order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]","inline-start":"order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]"}}}),u=e({base:"text-sm shadow-none flex items-center gap-2 [&>svg:not([class*='size-'])]:size-4",defaultVariants:{size:"xs"},variants:{size:{"icon-sm":"size-8 p-0 has-[>svg]:p-0","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",sm:"h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg]:size-3.5 has-[>svg]:px-2"}}});function p({className:a,...r}){return t("div",{className:s({className:a}),"data-slot":"input-group",role:"group",...r})}function l({align:a="inline-start",className:r,...n}){return t("div",{className:o(i({align:a}),r),"data-align":a,"data-slot":"input-group-addon",role:"group",onPointerDown:t=>{if(t.target.closest("button"))return;t.preventDefault();let a=t.currentTarget.parentElement?.querySelector("input, textarea");a instanceof HTMLElement&&a.focus()},...n})}function d({className:r,size:n="xs",type:e="button",variant:s="ghost",...i}){return t(a,{className:o(u({size:n}),r),"data-size":n,"data-slot":"input-group-button",type:e,variant:s,...i})}function g({className:a,...r}){return t("span",{className:o("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),"data-slot":"input-group-text",...r})}function c({className:a,...n}){return t(r,{className:o("flex-1 rounded-none border-0 bg-transparent px-3 py-1 shadow-none focus-visible:ring-0 dark:bg-transparent",a),"data-slot":"input-group-control",...n})}function b({className:a,...r}){return t(n,{className:o("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent",a),"data-slot":"input-group-control",...r})}export{p as InputGroup,l as InputGroupAddon,d as InputGroupButton,c as InputGroupInput,g as InputGroupText,b as InputGroupTextarea,i as inputGroupAddonVariants,u as inputGroupButtonVariants,s as inputGroupVariants};
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn, tv } from "@codefast/tailwind-variants";
4
+ import { Button } from "./button.js";
5
+ import { Input } from "./input.js";
6
+ import { Textarea } from "./textarea.js";
7
+ const inputGroupVariants = tv({
8
+ base: cn('group/input-group border-input dark:bg-input/30 relative flex w-full items-center rounded-lg border shadow-xs transition-[color,box-shadow] outline-none', 'h-9 min-w-0 has-[>textarea]:h-auto', 'has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2', 'has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2', 'has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:pb-3', 'has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:pt-3', 'has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3', 'has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40')
9
+ });
10
+ const inputGroupAddonVariants = tv({
11
+ base: cn("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50"),
12
+ defaultVariants: {
13
+ align: 'inline-start'
14
+ },
15
+ variants: {
16
+ align: {
17
+ 'block-end': 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5',
18
+ 'block-start': 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5',
19
+ 'inline-end': 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]',
20
+ 'inline-start': 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]'
21
+ }
22
+ }
23
+ });
24
+ const inputGroupButtonVariants = tv({
25
+ base: "text-sm shadow-none flex items-center gap-2 [&>svg:not([class*='size-'])]:size-4",
26
+ defaultVariants: {
27
+ size: 'xs'
28
+ },
29
+ variants: {
30
+ size: {
31
+ 'icon-sm': 'size-8 p-0 has-[>svg]:p-0',
32
+ 'icon-xs': 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0',
33
+ sm: 'h-8 gap-1.5 rounded-md px-2.5 has-[>svg]:px-2.5',
34
+ xs: 'h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg]:size-3.5 has-[>svg]:px-2'
35
+ }
36
+ }
37
+ });
38
+ function InputGroup({ className, ...props }) {
39
+ return /*#__PURE__*/ jsx("div", {
40
+ className: inputGroupVariants({
41
+ className
42
+ }),
43
+ "data-slot": "input-group",
44
+ role: "group",
45
+ ...props
46
+ });
47
+ }
48
+ function InputGroupAddon({ align = 'inline-start', className, ...props }) {
49
+ return /*#__PURE__*/ jsx("div", {
50
+ className: cn(inputGroupAddonVariants({
51
+ align
52
+ }), className),
53
+ "data-align": align,
54
+ "data-slot": "input-group-addon",
55
+ role: "group",
56
+ onPointerDown: (event)=>{
57
+ if (event.target.closest('button')) return;
58
+ event.preventDefault();
59
+ const control = event.currentTarget.parentElement?.querySelector('input, textarea');
60
+ if (control instanceof HTMLElement) control.focus();
61
+ },
62
+ ...props
63
+ });
64
+ }
65
+ function InputGroupButton({ className, size = 'xs', type = 'button', variant = 'ghost', ...props }) {
66
+ return /*#__PURE__*/ jsx(Button, {
67
+ className: cn(inputGroupButtonVariants({
68
+ size
69
+ }), className),
70
+ "data-size": size,
71
+ "data-slot": "input-group-button",
72
+ type: type,
73
+ variant: variant,
74
+ ...props
75
+ });
76
+ }
77
+ function InputGroupText({ className, ...props }) {
78
+ return /*#__PURE__*/ jsx("span", {
79
+ className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
80
+ "data-slot": "input-group-text",
81
+ ...props
82
+ });
83
+ }
84
+ function InputGroupInput({ className, ...props }) {
85
+ return /*#__PURE__*/ jsx(Input, {
86
+ className: cn('flex-1 rounded-none border-0 bg-transparent px-3 py-1 shadow-none focus-visible:ring-0 dark:bg-transparent', className),
87
+ "data-slot": "input-group-control",
88
+ ...props
89
+ });
90
+ }
91
+ function InputGroupTextarea({ className, ...props }) {
92
+ return /*#__PURE__*/ jsx(Textarea, {
93
+ className: cn('flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 dark:bg-transparent', className),
94
+ "data-slot": "input-group-control",
95
+ ...props
96
+ });
97
+ }
98
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupVariants };
@@ -1,2 +1,99 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputNumber:()=>InputNumber});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_button_cjs_namespaceObject=require("./button.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs"),input_number_cjs_namespaceObject=require("../primitives/input-number.cjs"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function InputNumber({ariaDecrementLabel:e,ariaIncrementLabel:r,className:t,defaultValue:i,disabled:n,formatOptions:a,id:s,loaderPosition:o,loading:u,max:c,min:_,onChange:d,prefix:b,readOnly:l,spinner:p,step:m,suffix:v,value:g,...f}){return(0,jsx_runtime_namespaceObject.jsxs)(input_number_cjs_namespaceObject.Root,{ariaDecrementLabel:e,ariaIncrementLabel:r,className:(0,tailwind_variants_namespaceObject.cn)("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),"data-slot":"input-number",defaultValue:i,disabled:n,formatOptions:a,id:s,loaderPosition:o,loading:u,max:c,min:_,prefix:b,readOnly:l,spinner:p??(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{},"spinner"),step:m,suffix:v,value:g,onChange:d,children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.Field,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",spellCheck:"false",...f}),(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.IncrementButton,{"aria-label":"Increment",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon,{})}),(0,jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.DecrementButton,{"aria-label":"Decrement",className:(0,external_button_cjs_namespaceObject.buttonVariants)({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon,{})})]})]})}for(var __webpack_i__ in exports.InputNumber=__webpack_exports__.InputNumber,__webpack_exports__)-1===["InputNumber"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ InputNumber: ()=>InputNumber
29
+ });
30
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
32
+ const external_lucide_react_namespaceObject = require("lucide-react");
33
+ const external_button_cjs_namespaceObject = require("./button.cjs");
34
+ const external_spinner_cjs_namespaceObject = require("./spinner.cjs");
35
+ const input_number_cjs_namespaceObject = require("../primitives/input-number.cjs");
36
+ function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }) {
37
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(input_number_cjs_namespaceObject.Root, {
38
+ ariaDecrementLabel: ariaDecrementLabel,
39
+ ariaIncrementLabel: ariaIncrementLabel,
40
+ className: (0, tailwind_variants_namespaceObject.cn)("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
41
+ "data-slot": "input-number",
42
+ defaultValue: defaultValue,
43
+ disabled: disabled,
44
+ formatOptions: formatOptions,
45
+ id: id,
46
+ loaderPosition: loaderPosition,
47
+ loading: loading,
48
+ max: max,
49
+ min: min,
50
+ prefix: prefix,
51
+ readOnly: readOnly,
52
+ spinner: spinner ?? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner, {}, "spinner"),
53
+ step: step,
54
+ suffix: suffix,
55
+ value: value,
56
+ onChange: onChange,
57
+ children: [
58
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.Field, {
59
+ autoCapitalize: "none",
60
+ autoComplete: "off",
61
+ autoCorrect: "off",
62
+ className: "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
63
+ spellCheck: "false",
64
+ ...props
65
+ }),
66
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
67
+ className: (0, tailwind_variants_namespaceObject.cn)('divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition', '*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0'),
68
+ "data-slot": "input-number-buttons",
69
+ children: [
70
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.IncrementButton, {
71
+ "aria-label": "Increment",
72
+ className: (0, external_button_cjs_namespaceObject.buttonVariants)({
73
+ className: 'text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]',
74
+ variant: 'ghost'
75
+ }),
76
+ "data-slot": "input-number-increment-button",
77
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronUpIcon, {})
78
+ }),
79
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(input_number_cjs_namespaceObject.DecrementButton, {
80
+ "aria-label": "Decrement",
81
+ className: (0, external_button_cjs_namespaceObject.buttonVariants)({
82
+ className: 'text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]',
83
+ variant: 'ghost'
84
+ }),
85
+ "data-slot": "input-number-decrement-button",
86
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.ChevronDownIcon, {})
87
+ })
88
+ ]
89
+ })
90
+ ]
91
+ });
92
+ }
93
+ exports.InputNumber = __webpack_exports__.InputNumber;
94
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
95
+ "InputNumber"
96
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
97
+ Object.defineProperty(exports, '__esModule', {
98
+ value: true
99
+ });
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from "react";
2
- import * as InputNumberPrimitive from "../primitives/input-number";
1
+ import type { ComponentProps, JSX } from 'react';
2
+ import * as InputNumberPrimitive from '../primitives/input-number';
3
3
  interface InputNumberProps extends ComponentProps<typeof InputNumberPrimitive.Field>, ComponentProps<typeof InputNumberPrimitive.Root> {
4
4
  }
5
5
  declare function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }: InputNumberProps): JSX.Element;
@@ -1,2 +1,65 @@
1
1
  "use client";
2
- import{jsx as i,jsxs as r}from"react/jsx-runtime";import{ChevronDownIcon as e,ChevronUpIcon as t}from"lucide-react";import{buttonVariants as o}from"./button.js";import{Spinner as a}from"./spinner.js";import{DecrementButton as n,Field as d,IncrementButton as s,Root as u}from"../primitives/input-number.js";import{cn as l}from"@codefast/tailwind-variants";function c({ariaDecrementLabel:c,ariaIncrementLabel:b,className:g,defaultValue:p,disabled:f,formatOptions:h,id:v,loaderPosition:m,loading:x,max:w,min:k,onChange:N,prefix:y,readOnly:C,spinner:j,step:z,suffix:I,value:D,...L}){return r(u,{ariaDecrementLabel:c,ariaIncrementLabel:b,className:l("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",g),"data-slot":"input-number",defaultValue:p,disabled:f,formatOptions:h,id:v,loaderPosition:m,loading:x,max:w,min:k,prefix:y,readOnly:C,spinner:j??i(a,{},"spinner"),step:z,suffix:I,value:D,onChange:N,children:[i(d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",className:"file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-[3px] disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",spellCheck:"false",...L}),r("div",{className:l("divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition","*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0"),"data-slot":"input-number-buttons",children:[i(s,{"aria-label":"Increment",className:o({className:"text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-increment-button",children:i(t,{})}),i(n,{"aria-label":"Decrement",className:o({className:"text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]",variant:"ghost"}),"data-slot":"input-number-decrement-button",children:i(e,{})})]})]})}export{c as InputNumber};
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@codefast/tailwind-variants";
4
+ import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
5
+ import { buttonVariants } from "./button.js";
6
+ import { Spinner } from "./spinner.js";
7
+ import { DecrementButton, Field, IncrementButton, Root } from "../primitives/input-number.js";
8
+ function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }) {
9
+ return /*#__PURE__*/ jsxs(Root, {
10
+ ariaDecrementLabel: ariaDecrementLabel,
11
+ ariaIncrementLabel: ariaIncrementLabel,
12
+ className: cn("group border-input hover:not-has-disabled:not-focus-within:border-ring/60 focus-within:border-ring focus-within:ring-ring/50 [&>svg]:text-muted-foreground has-aria-invalid:border-destructive hover:not-has-disabled:not-focus-within:has-aria-invalid:border-destructive/60 focus-within:has-aria-invalid:ring-destructive/20 dark:focus-within:has-aria-invalid:ring-destructive/40 dark:bg-input/30 peer flex h-9 w-full grow items-center gap-3 rounded-lg border px-3 pr-0 text-base transition not-has-disabled:shadow-xs focus-within:ring-3 has-disabled:opacity-50 md:text-sm [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
13
+ "data-slot": "input-number",
14
+ defaultValue: defaultValue,
15
+ disabled: disabled,
16
+ formatOptions: formatOptions,
17
+ id: id,
18
+ loaderPosition: loaderPosition,
19
+ loading: loading,
20
+ max: max,
21
+ min: min,
22
+ prefix: prefix,
23
+ readOnly: readOnly,
24
+ spinner: spinner ?? /*#__PURE__*/ jsx(Spinner, {}, "spinner"),
25
+ step: step,
26
+ suffix: suffix,
27
+ value: value,
28
+ onChange: onChange,
29
+ children: [
30
+ /*#__PURE__*/ jsx(Field, {
31
+ autoCapitalize: "none",
32
+ autoComplete: "off",
33
+ autoCorrect: "off",
34
+ className: "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
35
+ spellCheck: "false",
36
+ ...props
37
+ }),
38
+ /*#__PURE__*/ jsxs("div", {
39
+ className: cn('divide-input border-l-input group-hover:not-group-focus-within:not-has-disabled:border-l-border-ring/60 group-hover:not-group-focus-within:not-has-disabled:divide-border-ring/60 group-focus-within:border-l-ring group-focus-within:divide-ring group-has-aria-invalid:border-l-destructive group-has-aria-invalid:divide-destructive group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:border-l-destructive/60 group-hover:group-has-aria-invalid:not-group-focus-within:not-has-disabled:divide-destructive/60 order-last ml-auto grid h-full shrink-0 divide-y border-l transition', '*:[button]:focus-visible:bg-ring/50 group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/20 dark:group-has-aria-invalid:*:[button]:focus-visible:bg-destructive/40 *:[button]:focus-visible:ring-0'),
40
+ "data-slot": "input-number-buttons",
41
+ children: [
42
+ /*#__PURE__*/ jsx(IncrementButton, {
43
+ "aria-label": "Increment",
44
+ className: buttonVariants({
45
+ className: 'text-muted-foreground h-auto rounded-none rounded-tr-[calc(var(--radius-lg)-1px)]',
46
+ variant: 'ghost'
47
+ }),
48
+ "data-slot": "input-number-increment-button",
49
+ children: /*#__PURE__*/ jsx(ChevronUpIcon, {})
50
+ }),
51
+ /*#__PURE__*/ jsx(DecrementButton, {
52
+ "aria-label": "Decrement",
53
+ className: buttonVariants({
54
+ className: 'text-muted-foreground h-auto rounded-none rounded-br-[calc(var(--radius-lg)-1px)]',
55
+ variant: 'ghost'
56
+ }),
57
+ "data-slot": "input-number-decrement-button",
58
+ children: /*#__PURE__*/ jsx(ChevronDownIcon, {})
59
+ })
60
+ ]
61
+ })
62
+ ]
63
+ });
64
+ }
65
+ export { InputNumber };
@@ -1,2 +1,102 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,t)=>{for(var _ in t)__webpack_require__.o(t,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:t[_]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputOTPSlot:()=>InputOTPSlot,InputOTPSeparator:()=>InputOTPSeparator,REGEXP_ONLY_CHARS:()=>external_input_otp_namespaceObject.REGEXP_ONLY_CHARS,REGEXP_ONLY_DIGITS:()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS,InputOTP:()=>InputOTP,REGEXP_ONLY_DIGITS_AND_CHARS:()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS_AND_CHARS,InputOTPGroup:()=>InputOTPGroup});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_input_otp_namespaceObject=require("input-otp"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),tailwind_variants_namespaceObject=require("@codefast/tailwind-variants");function InputOTP({className:e,containerClassName:t,..._}){return(0,jsx_runtime_namespaceObject.jsx)(external_input_otp_namespaceObject.OTPInput,{"aria-label":"One-time password",className:(0,tailwind_variants_namespaceObject.cn)(e),containerClassName:(0,tailwind_variants_namespaceObject.cn)("flex items-center gap-2 has-disabled:opacity-50",t),"data-slot":"input-otp",..._})}function InputOTPGroup({className:e,...t}){return(0,jsx_runtime_namespaceObject.jsx)("div",{className:(0,tailwind_variants_namespaceObject.cn)("flex items-center -space-x-px",e),"data-slot":"input-otp-group",role:"group",...t})}function InputOTPSlot({className:e,index:t,..._}){let{char:a,hasFakeCaret:r,isActive:n}=(0,external_react_namespaceObject.use)(external_input_otp_namespaceObject.OTPInputContext).slots[t];return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,tailwind_variants_namespaceObject.cn)("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border text-sm outline-hidden transition-all not-has-disabled:shadow-xs first:rounded-l-lg last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3",e),"data-active":n,"data-slot":"input-otp-slot",..._,children:[a,r?(0,jsx_runtime_namespaceObject.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,jsx_runtime_namespaceObject.jsx)("div",{className:"animate-caret-blink bg-foreground animation-duration-1000 h-4 w-px"})}):null]})}function InputOTPSeparator({...e}){return(0,jsx_runtime_namespaceObject.jsx)("div",{"data-slot":"input-otp-separator",...e,children:(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MinusIcon,{})})}for(var __webpack_i__ in exports.InputOTP=__webpack_exports__.InputOTP,exports.InputOTPGroup=__webpack_exports__.InputOTPGroup,exports.InputOTPSeparator=__webpack_exports__.InputOTPSeparator,exports.InputOTPSlot=__webpack_exports__.InputOTPSlot,exports.REGEXP_ONLY_CHARS=__webpack_exports__.REGEXP_ONLY_CHARS,exports.REGEXP_ONLY_DIGITS=__webpack_exports__.REGEXP_ONLY_DIGITS,exports.REGEXP_ONLY_DIGITS_AND_CHARS=__webpack_exports__.REGEXP_ONLY_DIGITS_AND_CHARS,__webpack_exports__)-1===["InputOTP","InputOTPGroup","InputOTPSeparator","InputOTPSlot","REGEXP_ONLY_CHARS","REGEXP_ONLY_DIGITS","REGEXP_ONLY_DIGITS_AND_CHARS"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ InputOTPSlot: ()=>InputOTPSlot,
29
+ InputOTPSeparator: ()=>InputOTPSeparator,
30
+ REGEXP_ONLY_CHARS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_CHARS,
31
+ REGEXP_ONLY_DIGITS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS,
32
+ InputOTP: ()=>InputOTP,
33
+ REGEXP_ONLY_DIGITS_AND_CHARS: ()=>external_input_otp_namespaceObject.REGEXP_ONLY_DIGITS_AND_CHARS,
34
+ InputOTPGroup: ()=>InputOTPGroup
35
+ });
36
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
37
+ const tailwind_variants_namespaceObject = require("@codefast/tailwind-variants");
38
+ const external_input_otp_namespaceObject = require("input-otp");
39
+ const external_lucide_react_namespaceObject = require("lucide-react");
40
+ const external_react_namespaceObject = require("react");
41
+ function InputOTP({ className, containerClassName, ...props }) {
42
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_otp_namespaceObject.OTPInput, {
43
+ "aria-label": "One-time password",
44
+ className: (0, tailwind_variants_namespaceObject.cn)(className),
45
+ containerClassName: (0, tailwind_variants_namespaceObject.cn)('flex items-center gap-2 has-disabled:opacity-50', containerClassName),
46
+ "data-slot": "input-otp",
47
+ ...props
48
+ });
49
+ }
50
+ function InputOTPGroup({ className, ...props }) {
51
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
52
+ className: (0, tailwind_variants_namespaceObject.cn)('flex items-center -space-x-px', className),
53
+ "data-slot": "input-otp-group",
54
+ role: "group",
55
+ ...props
56
+ });
57
+ }
58
+ function InputOTPSlot({ className, index, ...props }) {
59
+ const inputOTPContext = (0, external_react_namespaceObject.use)(external_input_otp_namespaceObject.OTPInputContext);
60
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
61
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
62
+ className: (0, tailwind_variants_namespaceObject.cn)('border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border text-sm outline-hidden transition-all not-has-disabled:shadow-xs first:rounded-l-lg last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3', className),
63
+ "data-active": isActive,
64
+ "data-slot": "input-otp-slot",
65
+ ...props,
66
+ children: [
67
+ char,
68
+ hasFakeCaret ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
69
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
70
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
71
+ className: "animate-caret-blink bg-foreground animation-duration-1000 h-4 w-px"
72
+ })
73
+ }) : null
74
+ ]
75
+ });
76
+ }
77
+ function InputOTPSeparator({ ...props }) {
78
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
79
+ "data-slot": "input-otp-separator",
80
+ ...props,
81
+ children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.MinusIcon, {})
82
+ });
83
+ }
84
+ exports.InputOTP = __webpack_exports__.InputOTP;
85
+ exports.InputOTPGroup = __webpack_exports__.InputOTPGroup;
86
+ exports.InputOTPSeparator = __webpack_exports__.InputOTPSeparator;
87
+ exports.InputOTPSlot = __webpack_exports__.InputOTPSlot;
88
+ exports.REGEXP_ONLY_CHARS = __webpack_exports__.REGEXP_ONLY_CHARS;
89
+ exports.REGEXP_ONLY_DIGITS = __webpack_exports__.REGEXP_ONLY_DIGITS;
90
+ exports.REGEXP_ONLY_DIGITS_AND_CHARS = __webpack_exports__.REGEXP_ONLY_DIGITS_AND_CHARS;
91
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
92
+ "InputOTP",
93
+ "InputOTPGroup",
94
+ "InputOTPSeparator",
95
+ "InputOTPSlot",
96
+ "REGEXP_ONLY_CHARS",
97
+ "REGEXP_ONLY_DIGITS",
98
+ "REGEXP_ONLY_DIGITS_AND_CHARS"
99
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
100
+ Object.defineProperty(exports, '__esModule', {
101
+ value: true
102
+ });
@@ -1,15 +1,15 @@
1
- import type { ComponentProps, JSX } from "react";
2
- import { OTPInput } from "input-otp";
1
+ import type { ComponentProps, JSX } from 'react';
2
+ import { OTPInput } from 'input-otp';
3
3
  type InputOTPProps = ComponentProps<typeof OTPInput>;
4
4
  declare function InputOTP({ className, containerClassName, ...props }: InputOTPProps): JSX.Element;
5
- type InputOTPGroupProps = ComponentProps<"div">;
5
+ type InputOTPGroupProps = ComponentProps<'div'>;
6
6
  declare function InputOTPGroup({ className, ...props }: InputOTPGroupProps): JSX.Element;
7
- interface InputOTPSlotProps extends ComponentProps<"div"> {
7
+ interface InputOTPSlotProps extends ComponentProps<'div'> {
8
8
  index: number;
9
9
  }
10
10
  declare function InputOTPSlot({ className, index, ...props }: InputOTPSlotProps): JSX.Element;
11
- type InputOTPSeparatorProps = ComponentProps<"div">;
11
+ type InputOTPSeparatorProps = ComponentProps<'div'>;
12
12
  declare function InputOTPSeparator({ ...props }: InputOTPSeparatorProps): JSX.Element;
13
- export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
13
+ export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'input-otp';
14
14
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
15
15
  export type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps };
@@ -1,2 +1,50 @@
1
1
  "use client";
2
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{OTPInput as a,OTPInputContext as r,REGEXP_ONLY_CHARS as i,REGEXP_ONLY_DIGITS as n,REGEXP_ONLY_DIGITS_AND_CHARS as o}from"input-otp";import{MinusIcon as d}from"lucide-react";import{use as s}from"react";import{cn as l}from"@codefast/tailwind-variants";function u({className:e,containerClassName:r,...i}){return t(a,{"aria-label":"One-time password",className:l(e),containerClassName:l("flex items-center gap-2 has-disabled:opacity-50",r),"data-slot":"input-otp",...i})}function c({className:e,...a}){return t("div",{className:l("flex items-center -space-x-px",e),"data-slot":"input-otp-group",role:"group",...a})}function p({className:a,index:i,...n}){let{char:o,hasFakeCaret:d,isActive:u}=s(r).slots[i];return e("div",{className:l("border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border text-sm outline-hidden transition-all not-has-disabled:shadow-xs first:rounded-l-lg last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3",a),"data-active":u,"data-slot":"input-otp-slot",...n,children:[o,d?t("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:t("div",{className:"animate-caret-blink bg-foreground animation-duration-1000 h-4 w-px"})}):null]})}function m({...e}){return t("div",{"data-slot":"input-otp-separator",...e,children:t(d,{})})}export{u as InputOTP,c as InputOTPGroup,m as InputOTPSeparator,p as InputOTPSlot,i as REGEXP_ONLY_CHARS,n as REGEXP_ONLY_DIGITS,o as REGEXP_ONLY_DIGITS_AND_CHARS};
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { cn } from "@codefast/tailwind-variants";
4
+ import { OTPInput, OTPInputContext, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
5
+ import { MinusIcon } from "lucide-react";
6
+ import { use } from "react";
7
+ function InputOTP({ className, containerClassName, ...props }) {
8
+ return /*#__PURE__*/ jsx(OTPInput, {
9
+ "aria-label": "One-time password",
10
+ className: cn(className),
11
+ containerClassName: cn('flex items-center gap-2 has-disabled:opacity-50', containerClassName),
12
+ "data-slot": "input-otp",
13
+ ...props
14
+ });
15
+ }
16
+ function InputOTPGroup({ className, ...props }) {
17
+ return /*#__PURE__*/ jsx("div", {
18
+ className: cn('flex items-center -space-x-px', className),
19
+ "data-slot": "input-otp-group",
20
+ role: "group",
21
+ ...props
22
+ });
23
+ }
24
+ function InputOTPSlot({ className, index, ...props }) {
25
+ const inputOTPContext = use(OTPInputContext);
26
+ const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
27
+ return /*#__PURE__*/ jsxs("div", {
28
+ className: cn('border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 relative flex size-9 items-center justify-center border text-sm outline-hidden transition-all not-has-disabled:shadow-xs first:rounded-l-lg last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3', className),
29
+ "data-active": isActive,
30
+ "data-slot": "input-otp-slot",
31
+ ...props,
32
+ children: [
33
+ char,
34
+ hasFakeCaret ? /*#__PURE__*/ jsx("div", {
35
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
36
+ children: /*#__PURE__*/ jsx("div", {
37
+ className: "animate-caret-blink bg-foreground animation-duration-1000 h-4 w-px"
38
+ })
39
+ }) : null
40
+ ]
41
+ });
42
+ }
43
+ function InputOTPSeparator({ ...props }) {
44
+ return /*#__PURE__*/ jsx("div", {
45
+ "data-slot": "input-otp-separator",
46
+ ...props,
47
+ children: /*#__PURE__*/ jsx(MinusIcon, {})
48
+ });
49
+ }
50
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS };
@@ -1,2 +1,72 @@
1
+ "use strict";
1
2
  "use client";
2
- "use strict";const __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{InputPassword:()=>InputPassword});const jsx_runtime_namespaceObject=require("react/jsx-runtime"),external_lucide_react_namespaceObject=require("lucide-react"),external_react_namespaceObject=require("react"),external_input_group_cjs_namespaceObject=require("./input-group.cjs");function InputPassword({className:e,disabled:_,readOnly:r,...t}){let[a,s]=(0,external_react_namespaceObject.useState)("password"),c=(0,external_react_namespaceObject.useCallback)(()=>{s(e=>"password"===e?"text":"password")},[]);return(0,jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup,{className:e,"data-disabled":_?"true":void 0,"data-slot":"input-password",children:[(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput,{autoCapitalize:"none","data-slot":"input-password-item",disabled:_,readOnly:r,type:a,...t}),(0,jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton,{"aria-label":"password"===a?"Show password":"Hide password",className:"focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0","data-slot":"input-password-toggle",disabled:_,size:"icon-sm",type:"button",variant:"ghost",onClick:c,children:"password"===a?(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeOffIcon,{}):(0,jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeIcon,{})})]})}for(var __webpack_i__ in exports.InputPassword=__webpack_exports__.InputPassword,__webpack_exports__)-1===["InputPassword"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ InputPassword: ()=>InputPassword
29
+ });
30
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
31
+ const external_lucide_react_namespaceObject = require("lucide-react");
32
+ const external_react_namespaceObject = require("react");
33
+ const external_input_group_cjs_namespaceObject = require("./input-group.cjs");
34
+ function InputPassword({ className, disabled, readOnly, ...props }) {
35
+ const [type, setType] = (0, external_react_namespaceObject.useState)('password');
36
+ const togglePasswordVisibility = (0, external_react_namespaceObject.useCallback)(()=>{
37
+ setType((previous)=>'password' === previous ? 'text' : 'password');
38
+ }, []);
39
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_input_group_cjs_namespaceObject.InputGroup, {
40
+ className: className,
41
+ "data-disabled": disabled ? 'true' : void 0,
42
+ "data-slot": "input-password",
43
+ children: [
44
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupInput, {
45
+ autoCapitalize: "none",
46
+ "data-slot": "input-password-item",
47
+ disabled: disabled,
48
+ readOnly: readOnly,
49
+ type: type,
50
+ ...props
51
+ }),
52
+ /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_input_group_cjs_namespaceObject.InputGroupButton, {
53
+ "aria-label": 'password' === type ? 'Show password' : 'Hide password',
54
+ className: "focus-visible:not-disabled:bg-input rounded-full focus-visible:ring-0",
55
+ "data-slot": "input-password-toggle",
56
+ disabled: disabled,
57
+ size: "icon-sm",
58
+ type: "button",
59
+ variant: "ghost",
60
+ onClick: togglePasswordVisibility,
61
+ children: 'password' === type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeOffIcon, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.EyeIcon, {})
62
+ })
63
+ ]
64
+ });
65
+ }
66
+ exports.InputPassword = __webpack_exports__.InputPassword;
67
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
68
+ "InputPassword"
69
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
70
+ Object.defineProperty(exports, '__esModule', {
71
+ value: true
72
+ });