@vritti/quantum-ui 0.1.22 → 0.2.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 (91) hide show
  1. package/dist/Button.d.ts +10 -3
  2. package/dist/Button.js +21 -36
  3. package/dist/Button.js.map +1 -1
  4. package/dist/Button2.js +42 -0
  5. package/dist/Button2.js.map +1 -0
  6. package/dist/Card.d.ts +8 -8
  7. package/dist/Card.js.map +1 -1
  8. package/dist/Checkbox.d.ts +5 -8
  9. package/dist/Checkbox.js +38 -278
  10. package/dist/Checkbox.js.map +1 -1
  11. package/dist/DatePicker.d.ts +68 -0
  12. package/dist/DatePicker.js +12038 -0
  13. package/dist/DatePicker.js.map +1 -0
  14. package/dist/Form.d.ts +70 -88
  15. package/dist/Form.js +34 -30
  16. package/dist/Form.js.map +1 -1
  17. package/dist/Label.js +40 -0
  18. package/dist/Label.js.map +1 -0
  19. package/dist/OTPField.js +2 -12
  20. package/dist/OTPField.js.map +1 -1
  21. package/dist/PasswordField.js.map +1 -1
  22. package/dist/PhoneField.js +6 -12
  23. package/dist/PhoneField.js.map +1 -1
  24. package/dist/Skeleton.d.ts +6 -0
  25. package/dist/Skeleton.js +9 -0
  26. package/dist/Skeleton.js.map +1 -0
  27. package/dist/Spinner.d.ts +14 -0
  28. package/dist/Spinner.js +31 -0
  29. package/dist/Spinner.js.map +1 -0
  30. package/dist/TextArea.js +4 -10
  31. package/dist/TextArea.js.map +1 -1
  32. package/dist/TextField.js.map +1 -1
  33. package/dist/ThemeToggle.js.map +1 -1
  34. package/dist/Typography.js.map +1 -1
  35. package/dist/assets/quantum-ui.css +66 -44
  36. package/dist/axios.d.ts +11 -6
  37. package/dist/axios.js +186 -147
  38. package/dist/axios.js.map +1 -1
  39. package/dist/components/Button.d.ts +7 -0
  40. package/dist/components/Button.js +2 -1
  41. package/dist/components/Button.js.map +1 -1
  42. package/dist/components/Card.d.ts +7 -0
  43. package/dist/components/Checkbox.d.ts +7 -0
  44. package/dist/components/DatePicker.d.ts +9 -0
  45. package/dist/components/DatePicker.js +2 -0
  46. package/dist/components/DatePicker.js.map +1 -0
  47. package/dist/components/Form.d.ts +7 -0
  48. package/dist/components/Form.js +1 -1
  49. package/dist/components/OTPField.d.ts +7 -0
  50. package/dist/components/PasswordField.d.ts +7 -0
  51. package/dist/components/PhoneField.d.ts +7 -0
  52. package/dist/components/Progress.d.ts +7 -0
  53. package/dist/components/Progress.js +2 -5
  54. package/dist/components/Progress.js.map +1 -1
  55. package/dist/components/Skeleton.d.ts +9 -0
  56. package/dist/components/Skeleton.js +2 -0
  57. package/dist/components/Skeleton.js.map +1 -0
  58. package/dist/components/Spinner.d.ts +9 -0
  59. package/dist/components/Spinner.js +2 -0
  60. package/dist/components/Spinner.js.map +1 -0
  61. package/dist/components/TextArea.d.ts +7 -0
  62. package/dist/components/TextField.d.ts +7 -0
  63. package/dist/components/ThemeToggle.d.ts +7 -0
  64. package/dist/components/Typography.d.ts +7 -0
  65. package/dist/createLucideIcon.js.map +1 -1
  66. package/dist/field.js +26 -177
  67. package/dist/field.js.map +1 -1
  68. package/dist/index.d.ts +146 -142
  69. package/dist/index.js +10 -7
  70. package/dist/index.js.map +1 -1
  71. package/dist/index2.js +54 -116
  72. package/dist/index2.js.map +1 -1
  73. package/dist/index3.js +103 -1
  74. package/dist/index3.js.map +1 -1
  75. package/dist/index4.js +31 -55
  76. package/dist/index4.js.map +1 -1
  77. package/dist/index5.js +90 -3
  78. package/dist/index5.js.map +1 -1
  79. package/dist/index6.js +246 -0
  80. package/dist/index6.js.map +1 -0
  81. package/dist/shadcn/shadcnField.d.ts +7 -0
  82. package/dist/utils/axios.d.ts +21 -6
  83. package/dist/utils/axios.js +1 -1
  84. package/dist/utils.js.map +1 -1
  85. package/package.json +33 -17
  86. package/dist/AuthProvider.d.ts +0 -34
  87. package/dist/OnboardingProvider.js +0 -113
  88. package/dist/OnboardingProvider.js.map +0 -1
  89. package/dist/context/AuthProvider.d.ts +0 -2
  90. package/dist/context/AuthProvider.js +0 -2
  91. package/dist/context/AuthProvider.js.map +0 -1
package/dist/Button.d.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  import * as React_2 from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
 
4
- export declare function Button({
4
+ export declare const Button: React_2.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
5
+
6
+ declare function Button_2({
5
7
  className,
6
8
  variant,
7
9
  size,
@@ -13,7 +15,12 @@ VariantProps<typeof buttonVariants> & {
13
15
  }) {
14
16
  const Comp = asChild ? Slot : 'button';
15
17
 
16
- return <Comp data-slot='button' className={cn(buttonVariants({ variant, size, className }))} {...props} />;
18
+ return <Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} />;
19
+ }
20
+
21
+ export declare interface ButtonProps extends React_2.ComponentProps<typeof Button_2> {
22
+ isLoading?: boolean;
23
+ loadingText?: string;
17
24
  }
18
25
 
19
26
  export declare const buttonVariants = cva(
@@ -41,7 +48,7 @@ export declare const buttonVariants = cva(
41
48
  variant: 'default',
42
49
  size: 'default',
43
50
  },
44
- }
51
+ },
45
52
  );
46
53
 
47
54
  export { }
package/dist/Button.js CHANGED
@@ -1,43 +1,28 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { S as Slot } from './index2.js';
3
- import { c as cva } from './index3.js';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { S as Spinner } from './Spinner.js';
4
4
  import { c as cn } from './utils.js';
5
+ import { B as Button$1 } from './Button2.js';
5
6
 
6
- const buttonVariants = cva(
7
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
12
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
13
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
14
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
15
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
16
- link: "text-primary underline-offset-4 hover:underline"
17
- },
18
- size: {
19
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
20
- sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
21
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
22
- icon: "size-9"
7
+ const Button = React.forwardRef(
8
+ ({ children, isLoading = false, loadingText, disabled, className, ...props }, ref) => {
9
+ return /* @__PURE__ */ jsx(
10
+ Button$1,
11
+ {
12
+ ref,
13
+ disabled: disabled || isLoading,
14
+ "aria-busy": isLoading,
15
+ className: cn(isLoading && "cursor-wait", className),
16
+ ...props,
17
+ children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
18
+ /* @__PURE__ */ jsx(Spinner, { className: "mr-2" }),
19
+ loadingText ?? children
20
+ ] }) : children
23
21
  }
24
- },
25
- defaultVariants: {
26
- variant: "default",
27
- size: "default"
28
- }
22
+ );
29
23
  }
30
24
  );
31
- function Button({
32
- className,
33
- variant,
34
- size,
35
- asChild = false,
36
- ...props
37
- }) {
38
- const Comp = asChild ? Slot : "button";
39
- return /* @__PURE__ */ jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props });
40
- }
25
+ Button.displayName = "Button";
41
26
 
42
- export { Button as B, buttonVariants as b };
27
+ export { Button as B };
43
28
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../shadcn/shadcnButton/Button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '../utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n }\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot='button' className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"names":[],"mappings":";;;;;AAMA,MAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,6bAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,kEAAA;AAAA,QACT,WAAA,EACE,6JAAA;AAAA,QACF,OAAA,EACE,uIAAA;AAAA,QACF,SAAA,EAAW,wEAAA;AAAA,QACX,KAAA,EAAO,sEAAA;AAAA,QACP,IAAA,EAAM;AAAA,OACR;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,+BAAA;AAAA,QACT,EAAA,EAAI,+CAAA;AAAA,QACJ,EAAA,EAAI,sCAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAEA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV,GAAG;AACL,CAAA,EAGK;AACH,EAAA,MAAM,IAAA,GAAO,UAAU,IAAA,GAAO,QAAA;AAE9B,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,WAAA,EAAU,QAAA,EAAS,WAAW,EAAA,CAAG,cAAA,CAAe,EAAE,OAAA,EAAS,MAAM,SAAA,EAAW,CAAC,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAC1G;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../lib/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Button as ShadcnButton, buttonVariants } from '../../../shadcn/shadcnButton';\nimport { Spinner } from '../Spinner';\nimport { cn } from '../../../shadcn/utils';\n\nexport interface ButtonProps extends React.ComponentProps<typeof ShadcnButton> {\n /** Shows loading spinner and disables button */\n isLoading?: boolean;\n /** Text to display while loading (defaults to children) */\n loadingText?: string;\n}\n\n/**\n * Button component with built-in loading state support.\n *\n * @example\n * ```tsx\n * // Basic usage\n * <Button>Click me</Button>\n *\n * // Loading state\n * <Button isLoading>Submit</Button>\n *\n * // Loading with custom text\n * <Button isLoading loadingText=\"Submitting...\">Submit</Button>\n * ```\n */\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, isLoading = false, loadingText, disabled, className, ...props }, ref) => {\n return (\n <ShadcnButton\n ref={ref}\n disabled={disabled || isLoading}\n aria-busy={isLoading}\n className={cn(isLoading && 'cursor-wait', className)}\n {...props}\n >\n {isLoading ? (\n <>\n <Spinner className=\"mr-2\" />\n {loadingText ?? children}\n </>\n ) : (\n children\n )}\n </ShadcnButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n"],"names":["ShadcnButton"],"mappings":";;;;;;AA2BA,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EACnB,CAAC,EAAE,QAAA,EAAU,SAAA,GAAY,KAAA,EAAO,WAAA,EAAa,QAAA,EAAU,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AACpF,IAAA,uBACE,GAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,UAAU,QAAA,IAAY,SAAA;AAAA,QACtB,WAAA,EAAW,SAAA;AAAA,QACX,SAAA,EAAW,EAAA,CAAG,SAAA,IAAa,aAAA,EAAe,SAAS,CAAA;AAAA,QAClD,GAAG,KAAA;AAAA,QAEH,sCACC,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,OAAA,EAAA,EAAQ,WAAU,MAAA,EAAO,CAAA;AAAA,UACzB,WAAA,IAAe;AAAA,SAAA,EAClB,CAAA,GAEA;AAAA;AAAA,KAEJ;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -0,0 +1,42 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { c as cva, S as Slot } from './index3.js';
3
+ import { c as cn } from './utils.js';
4
+
5
+ const buttonVariants = cva(
6
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
11
+ destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
12
+ outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
13
+ secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
14
+ ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
15
+ link: "text-primary underline-offset-4 hover:underline"
16
+ },
17
+ size: {
18
+ default: "h-9 px-4 py-2 has-[>svg]:px-3",
19
+ sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
20
+ lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
21
+ icon: "size-9"
22
+ }
23
+ },
24
+ defaultVariants: {
25
+ variant: "default",
26
+ size: "default"
27
+ }
28
+ }
29
+ );
30
+ function Button({
31
+ className,
32
+ variant,
33
+ size,
34
+ asChild = false,
35
+ ...props
36
+ }) {
37
+ const Comp = asChild ? Slot : "button";
38
+ return /* @__PURE__ */ jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props });
39
+ }
40
+
41
+ export { Button as B, buttonVariants as b };
42
+ //# sourceMappingURL=Button2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button2.js","sources":["../shadcn/shadcnButton/Button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type * as React from 'react';\n\nimport { cn } from '../utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n outline:\n 'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return <Comp data-slot=\"button\" className={cn(buttonVariants({ variant, size, className }))} {...props} />;\n}\n\nexport { Button, buttonVariants };\n"],"names":[],"mappings":";;;;AAMA,MAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,6bAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,kEAAA;AAAA,QACT,WAAA,EACE,6JAAA;AAAA,QACF,OAAA,EACE,uIAAA;AAAA,QACF,SAAA,EAAW,wEAAA;AAAA,QACX,KAAA,EAAO,sEAAA;AAAA,QACP,IAAA,EAAM;AAAA,OACR;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS,+BAAA;AAAA,QACT,EAAA,EAAI,+CAAA;AAAA,QACJ,EAAA,EAAI,sCAAA;AAAA,QACJ,IAAA,EAAM;AAAA;AACR,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAEA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,OAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA,GAAU,KAAA;AAAA,EACV,GAAG;AACL,CAAA,EAGK;AACH,EAAA,MAAM,IAAA,GAAO,UAAU,IAAA,GAAO,QAAA;AAE9B,EAAA,uBAAO,GAAA,CAAC,IAAA,EAAA,EAAK,WAAA,EAAU,QAAA,EAAS,WAAW,EAAA,CAAG,cAAA,CAAe,EAAE,OAAA,EAAS,MAAM,SAAA,EAAW,CAAC,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAC1G;;;;"}
package/dist/Card.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import * as React_2 from 'react';
1
+ import type * as React_2 from 'react';
2
2
 
3
3
  export declare function Card({ className, ...props }: React_2.ComponentProps<'div'>) {
4
4
  return (
5
5
  <div
6
- data-slot='card'
6
+ data-slot="card"
7
7
  className={cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className)}
8
8
  {...props}
9
9
  />
@@ -11,26 +11,26 @@ export declare function Card({ className, ...props }: React_2.ComponentProps<'di
11
11
  }
12
12
 
13
13
  export declare function CardContent({ className, ...props }: React_2.ComponentProps<'div'>) {
14
- return <div data-slot='card-content' className={cn('px-6', className)} {...props} />;
14
+ return <div data-slot="card-content" className={cn('px-6', className)} {...props} />;
15
15
  }
16
16
 
17
17
  export declare function CardDescription({ className, ...props }: React_2.ComponentProps<'div'>) {
18
- return <div data-slot='card-description' className={cn('text-muted-foreground text-sm', className)} {...props} />;
18
+ return <div data-slot="card-description" className={cn('text-muted-foreground text-sm', className)} {...props} />;
19
19
  }
20
20
 
21
21
  export declare function CardFooter({ className, ...props }: React_2.ComponentProps<'div'>) {
22
22
  return (
23
- <div data-slot='card-footer' className={cn('flex items-center px-6 [.border-t]:pt-6', className)} {...props} />
23
+ <div data-slot="card-footer" className={cn('flex items-center px-6 [.border-t]:pt-6', className)} {...props} />
24
24
  );
25
25
  }
26
26
 
27
27
  export declare function CardHeader({ className, ...props }: React_2.ComponentProps<'div'>) {
28
28
  return (
29
29
  <div
30
- data-slot='card-header'
30
+ data-slot="card-header"
31
31
  className={cn(
32
32
  '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
33
- className
33
+ className,
34
34
  )}
35
35
  {...props}
36
36
  />
@@ -38,7 +38,7 @@ export declare function CardHeader({ className, ...props }: React_2.ComponentPro
38
38
  }
39
39
 
40
40
  export declare function CardTitle({ className, ...props }: React_2.ComponentProps<'div'>) {
41
- return <div data-slot='card-title' className={cn('leading-none font-semibold', className)} {...props} />;
41
+ return <div data-slot="card-title" className={cn('leading-none font-semibold', className)} {...props} />;
42
42
  }
43
43
 
44
44
  export { }
package/dist/Card.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../shadcn/shadcnCard/Card.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Card({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card'\n className={cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-header'\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot='card-title' className={cn('leading-none font-semibold', className)} {...props} />;\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot='card-description' className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='card-action'\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot='card-content' className={cn('px-6', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot='card-footer' className={cn('flex items-center px-6 [.border-t]:pt-6', className)} {...props} />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"names":[],"mappings":";;;AAIA,SAAS,IAAA,CAAK,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAClE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,MAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,mFAAA,EAAqF,SAAS,CAAA;AAAA,MAC3G,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,4JAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,SAAA,CAAU,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACvE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,YAAA,EAAa,SAAA,EAAW,GAAG,4BAAA,EAA8B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxG;AAEA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC7E,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,kBAAA,EAAmB,SAAA,EAAW,GAAG,+BAAA,EAAiC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACjH;AAYA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,cAAA,EAAe,SAAA,EAAW,GAAG,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACpF;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,aAAA,EAAc,SAAA,EAAW,GAAG,yCAAA,EAA2C,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAEjH;;;;"}
1
+ {"version":3,"file":"Card.js","sources":["../shadcn/shadcnCard/Card.tsx"],"sourcesContent":["import type * as React from 'react';\n\nimport { cn } from '../utils';\n\nfunction Card({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card\"\n className={cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n '@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-title\" className={cn('leading-none font-semibold', className)} {...props} />;\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-description\" className={cn('text-muted-foreground text-sm', className)} {...props} />;\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn('col-start-2 row-span-2 row-start-1 self-start justify-self-end', className)}\n {...props}\n />\n );\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"card-content\" className={cn('px-6', className)} {...props} />;\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"card-footer\" className={cn('flex items-center px-6 [.border-t]:pt-6', className)} {...props} />\n );\n}\n\nexport { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };\n"],"names":[],"mappings":";;;AAIA,SAAS,IAAA,CAAK,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAClE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,MAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,mFAAA,EAAqF,SAAS,CAAA;AAAA,MAC3G,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,4JAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ;AAEA,SAAS,SAAA,CAAU,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACvE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,YAAA,EAAa,SAAA,EAAW,GAAG,4BAAA,EAA8B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACxG;AAEA,SAAS,eAAA,CAAgB,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AAC7E,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,kBAAA,EAAmB,SAAA,EAAW,GAAG,+BAAA,EAAiC,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACjH;AAYA,SAAS,WAAA,CAAY,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACzE,EAAA,uBAAO,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,cAAA,EAAe,SAAA,EAAW,GAAG,MAAA,EAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AACpF;AAEA,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAgC;AACxE,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,WAAA,EAAU,aAAA,EAAc,SAAA,EAAW,GAAG,yCAAA,EAA2C,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAEjH;;;;"}
@@ -1,19 +1,16 @@
1
1
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
2
2
  import { default as default_2 } from 'react';
3
- import * as React_2 from 'react';
3
+ import type * as React_2 from 'react';
4
4
 
5
5
  export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps & default_2.RefAttributes<HTMLButtonElement>>;
6
6
 
7
- declare function Checkbox_2({
8
- className,
9
- ...props
10
- }: React_2.ComponentProps<typeof CheckboxPrimitive.Root>) {
7
+ declare function Checkbox_2({ className, ...props }: React_2.ComponentProps<typeof CheckboxPrimitive.Root>) {
11
8
  return (
12
9
  <CheckboxPrimitive.Root
13
10
  data-slot="checkbox"
14
11
  className={cn(
15
- "peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
16
- className
12
+ 'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
13
+ className,
17
14
  )}
18
15
  {...props}
19
16
  >
@@ -24,7 +21,7 @@ declare function Checkbox_2({
24
21
  <CheckIcon className="size-3.5" />
25
22
  </CheckboxPrimitive.Indicator>
26
23
  </CheckboxPrimitive.Root>
27
- )
24
+ );
28
25
  }
29
26
 
30
27
  declare interface CheckboxProps extends default_2.ComponentPropsWithoutRef<typeof Checkbox_2> {
package/dist/Checkbox.js CHANGED
@@ -2,91 +2,23 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import React__default from 'react';
4
4
  import { F as Field, a as FieldContent, e as FieldLabel, b as FieldDescription, c as FieldError } from './field.js';
5
- import { u as useComposedRefs } from './index2.js';
6
- import { c as createContextScope } from './index4.js';
5
+ import { u as useComposedRefs } from './index4.js';
6
+ import { c as createContextScope } from './index2.js';
7
+ import { P as Presence, u as useControllableState, c as composeEventHandlers, a as useSize } from './index6.js';
7
8
  import { P as Primitive } from './index5.js';
8
9
  import { c as cn } from './utils.js';
9
10
  import { c as createLucideIcon } from './createLucideIcon.js';
10
11
 
11
- // src/primitive.tsx
12
- function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
13
- return function handleEvent(event) {
14
- originalEventHandler?.(event);
15
- if (checkForDefaultPrevented === false || !event.defaultPrevented) {
16
- return ourEventHandler?.(event);
17
- }
18
- };
19
- }
12
+ /**
13
+ * @license lucide-react v0.544.0 - ISC
14
+ *
15
+ * This source code is licensed under the ISC license.
16
+ * See the LICENSE file in the root directory of this source tree.
17
+ */
20
18
 
21
- // packages/react/use-layout-effect/src/use-layout-effect.tsx
22
- var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
23
- };
24
19
 
25
- // src/use-controllable-state.tsx
26
- var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
27
- function useControllableState({
28
- prop,
29
- defaultProp,
30
- onChange = () => {
31
- },
32
- caller
33
- }) {
34
- const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
35
- defaultProp,
36
- onChange
37
- });
38
- const isControlled = prop !== void 0;
39
- const value = isControlled ? prop : uncontrolledProp;
40
- {
41
- const isControlledRef = React.useRef(prop !== void 0);
42
- React.useEffect(() => {
43
- const wasControlled = isControlledRef.current;
44
- if (wasControlled !== isControlled) {
45
- const from = wasControlled ? "controlled" : "uncontrolled";
46
- const to = isControlled ? "controlled" : "uncontrolled";
47
- console.warn(
48
- `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
49
- );
50
- }
51
- isControlledRef.current = isControlled;
52
- }, [isControlled, caller]);
53
- }
54
- const setValue = React.useCallback(
55
- (nextValue) => {
56
- if (isControlled) {
57
- const value2 = isFunction$1(nextValue) ? nextValue(prop) : nextValue;
58
- if (value2 !== prop) {
59
- onChangeRef.current?.(value2);
60
- }
61
- } else {
62
- setUncontrolledProp(nextValue);
63
- }
64
- },
65
- [isControlled, prop, setUncontrolledProp, onChangeRef]
66
- );
67
- return [value, setValue];
68
- }
69
- function useUncontrolledState({
70
- defaultProp,
71
- onChange
72
- }) {
73
- const [value, setValue] = React.useState(defaultProp);
74
- const prevValueRef = React.useRef(value);
75
- const onChangeRef = React.useRef(onChange);
76
- useInsertionEffect(() => {
77
- onChangeRef.current = onChange;
78
- }, [onChange]);
79
- React.useEffect(() => {
80
- if (prevValueRef.current !== value) {
81
- onChangeRef.current?.(value);
82
- prevValueRef.current = value;
83
- }
84
- }, [value, prevValueRef]);
85
- return [value, setValue, onChangeRef];
86
- }
87
- function isFunction$1(value) {
88
- return typeof value === "function";
89
- }
20
+ const __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
21
+ const Check = createLucideIcon("check", __iconNode);
90
22
 
91
23
  // packages/react/use-previous/src/use-previous.tsx
92
24
  function usePrevious(value) {
@@ -100,167 +32,6 @@ function usePrevious(value) {
100
32
  }, [value]);
101
33
  }
102
34
 
103
- // packages/react/use-size/src/use-size.tsx
104
- function useSize(element) {
105
- const [size, setSize] = React.useState(void 0);
106
- useLayoutEffect2(() => {
107
- if (element) {
108
- setSize({ width: element.offsetWidth, height: element.offsetHeight });
109
- const resizeObserver = new ResizeObserver((entries) => {
110
- if (!Array.isArray(entries)) {
111
- return;
112
- }
113
- if (!entries.length) {
114
- return;
115
- }
116
- const entry = entries[0];
117
- let width;
118
- let height;
119
- if ("borderBoxSize" in entry) {
120
- const borderSizeEntry = entry["borderBoxSize"];
121
- const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
122
- width = borderSize["inlineSize"];
123
- height = borderSize["blockSize"];
124
- } else {
125
- width = element.offsetWidth;
126
- height = element.offsetHeight;
127
- }
128
- setSize({ width, height });
129
- });
130
- resizeObserver.observe(element, { box: "border-box" });
131
- return () => resizeObserver.unobserve(element);
132
- } else {
133
- setSize(void 0);
134
- }
135
- }, [element]);
136
- return size;
137
- }
138
-
139
- function useStateMachine(initialState, machine) {
140
- return React.useReducer((state, event) => {
141
- const nextState = machine[state][event];
142
- return nextState ?? state;
143
- }, initialState);
144
- }
145
-
146
- // src/presence.tsx
147
- var Presence = (props) => {
148
- const { present, children } = props;
149
- const presence = usePresence(present);
150
- const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
151
- const ref = useComposedRefs(presence.ref, getElementRef(child));
152
- const forceMount = typeof children === "function";
153
- return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
154
- };
155
- Presence.displayName = "Presence";
156
- function usePresence(present) {
157
- const [node, setNode] = React.useState();
158
- const stylesRef = React.useRef(null);
159
- const prevPresentRef = React.useRef(present);
160
- const prevAnimationNameRef = React.useRef("none");
161
- const initialState = present ? "mounted" : "unmounted";
162
- const [state, send] = useStateMachine(initialState, {
163
- mounted: {
164
- UNMOUNT: "unmounted",
165
- ANIMATION_OUT: "unmountSuspended"
166
- },
167
- unmountSuspended: {
168
- MOUNT: "mounted",
169
- ANIMATION_END: "unmounted"
170
- },
171
- unmounted: {
172
- MOUNT: "mounted"
173
- }
174
- });
175
- React.useEffect(() => {
176
- const currentAnimationName = getAnimationName(stylesRef.current);
177
- prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
178
- }, [state]);
179
- useLayoutEffect2(() => {
180
- const styles = stylesRef.current;
181
- const wasPresent = prevPresentRef.current;
182
- const hasPresentChanged = wasPresent !== present;
183
- if (hasPresentChanged) {
184
- const prevAnimationName = prevAnimationNameRef.current;
185
- const currentAnimationName = getAnimationName(styles);
186
- if (present) {
187
- send("MOUNT");
188
- } else if (currentAnimationName === "none" || styles?.display === "none") {
189
- send("UNMOUNT");
190
- } else {
191
- const isAnimating = prevAnimationName !== currentAnimationName;
192
- if (wasPresent && isAnimating) {
193
- send("ANIMATION_OUT");
194
- } else {
195
- send("UNMOUNT");
196
- }
197
- }
198
- prevPresentRef.current = present;
199
- }
200
- }, [present, send]);
201
- useLayoutEffect2(() => {
202
- if (node) {
203
- let timeoutId;
204
- const ownerWindow = node.ownerDocument.defaultView ?? window;
205
- const handleAnimationEnd = (event) => {
206
- const currentAnimationName = getAnimationName(stylesRef.current);
207
- const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
208
- if (event.target === node && isCurrentAnimation) {
209
- send("ANIMATION_END");
210
- if (!prevPresentRef.current) {
211
- const currentFillMode = node.style.animationFillMode;
212
- node.style.animationFillMode = "forwards";
213
- timeoutId = ownerWindow.setTimeout(() => {
214
- if (node.style.animationFillMode === "forwards") {
215
- node.style.animationFillMode = currentFillMode;
216
- }
217
- });
218
- }
219
- }
220
- };
221
- const handleAnimationStart = (event) => {
222
- if (event.target === node) {
223
- prevAnimationNameRef.current = getAnimationName(stylesRef.current);
224
- }
225
- };
226
- node.addEventListener("animationstart", handleAnimationStart);
227
- node.addEventListener("animationcancel", handleAnimationEnd);
228
- node.addEventListener("animationend", handleAnimationEnd);
229
- return () => {
230
- ownerWindow.clearTimeout(timeoutId);
231
- node.removeEventListener("animationstart", handleAnimationStart);
232
- node.removeEventListener("animationcancel", handleAnimationEnd);
233
- node.removeEventListener("animationend", handleAnimationEnd);
234
- };
235
- } else {
236
- send("ANIMATION_END");
237
- }
238
- }, [node, send]);
239
- return {
240
- isPresent: ["mounted", "unmountSuspended"].includes(state),
241
- ref: React.useCallback((node2) => {
242
- stylesRef.current = node2 ? getComputedStyle(node2) : null;
243
- setNode(node2);
244
- }, [])
245
- };
246
- }
247
- function getAnimationName(styles) {
248
- return styles?.animationName || "none";
249
- }
250
- function getElementRef(element) {
251
- let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
252
- let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
253
- if (mayWarn) {
254
- return element.ref;
255
- }
256
- getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
257
- mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
258
- if (mayWarn) {
259
- return element.props.ref;
260
- }
261
- return element.props.ref || element.ref;
262
- }
263
-
264
35
  var CHECKBOX_NAME = "Checkbox";
265
36
  var [createCheckboxContext] = createContextScope(CHECKBOX_NAME);
266
37
  var [CheckboxProviderImpl, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME);
@@ -519,21 +290,7 @@ function getState(checked) {
519
290
  return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
520
291
  }
521
292
 
522
- /**
523
- * @license lucide-react v0.544.0 - ISC
524
- *
525
- * This source code is licensed under the ISC license.
526
- * See the LICENSE file in the root directory of this source tree.
527
- */
528
-
529
-
530
- const __iconNode = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
531
- const Check = createLucideIcon("check", __iconNode);
532
-
533
- function Checkbox$1({
534
- className,
535
- ...props
536
- }) {
293
+ function Checkbox$1({ className, ...props }) {
537
294
  return /* @__PURE__ */ jsx(
538
295
  Checkbox$2,
539
296
  {
@@ -555,30 +312,33 @@ function Checkbox$1({
555
312
  );
556
313
  }
557
314
 
558
- const Checkbox = React__default.forwardRef(({ label, description, error, id, ...props }, ref) => {
559
- const fieldId = id || React__default.useId();
560
- const hasError = !!error;
561
- if (!label && !description && !error) {
562
- return /* @__PURE__ */ jsx(Checkbox$1, { ...props, ref, id: fieldId });
315
+ const Checkbox = React__default.forwardRef(
316
+ ({ label, description, error, id, ...props }, ref) => {
317
+ const generatedId = React__default.useId();
318
+ const fieldId = id || generatedId;
319
+ const hasError = !!error;
320
+ if (!label && !description && !error) {
321
+ return /* @__PURE__ */ jsx(Checkbox$1, { ...props, ref, id: fieldId });
322
+ }
323
+ return /* @__PURE__ */ jsxs(Field, { orientation: "horizontal", "data-disabled": props.disabled, "data-invalid": hasError, children: [
324
+ /* @__PURE__ */ jsx(
325
+ Checkbox$1,
326
+ {
327
+ ...props,
328
+ ref,
329
+ id: fieldId,
330
+ "aria-describedby": description || error ? `${fieldId}-description ${fieldId}-error` : void 0,
331
+ "aria-invalid": hasError
332
+ }
333
+ ),
334
+ /* @__PURE__ */ jsxs(FieldContent, { children: [
335
+ label && /* @__PURE__ */ jsx(FieldLabel, { htmlFor: fieldId, className: "font-normal cursor-pointer", children: label }),
336
+ description && /* @__PURE__ */ jsx(FieldDescription, { id: `${fieldId}-description`, children: description }),
337
+ error && /* @__PURE__ */ jsx(FieldError, { id: `${fieldId}-error`, children: error })
338
+ ] })
339
+ ] });
563
340
  }
564
- return /* @__PURE__ */ jsxs(Field, { orientation: "horizontal", "data-disabled": props.disabled, "data-invalid": hasError, children: [
565
- /* @__PURE__ */ jsx(
566
- Checkbox$1,
567
- {
568
- ...props,
569
- ref,
570
- id: fieldId,
571
- "aria-describedby": description || error ? `${fieldId}-description ${fieldId}-error` : void 0,
572
- "aria-invalid": hasError
573
- }
574
- ),
575
- /* @__PURE__ */ jsxs(FieldContent, { children: [
576
- label && /* @__PURE__ */ jsx(FieldLabel, { htmlFor: fieldId, className: "font-normal cursor-pointer", children: label }),
577
- description && /* @__PURE__ */ jsx(FieldDescription, { id: `${fieldId}-description`, children: description }),
578
- error && /* @__PURE__ */ jsx(FieldError, { id: `${fieldId}-error`, children: error })
579
- ] })
580
- ] });
581
- });
341
+ );
582
342
  Checkbox.displayName = "Checkbox";
583
343
 
584
344
  export { Checkbox as C };