@next-degree/pickle-shared-js 0.7.51 → 0.9.2

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 (105) hide show
  1. package/dist/components/jobPost/JobDescription.cjs +2 -1
  2. package/dist/components/jobPost/JobDescription.cjs.map +1 -1
  3. package/dist/components/jobPost/JobDescription.js +2 -1
  4. package/dist/components/jobPost/JobDescription.js.map +1 -1
  5. package/dist/components/jobPost/JobPost.cjs +2 -1
  6. package/dist/components/jobPost/JobPost.cjs.map +1 -1
  7. package/dist/components/jobPost/JobPost.d.cts +1 -1
  8. package/dist/components/jobPost/JobPost.d.ts +1 -1
  9. package/dist/components/jobPost/JobPost.js +2 -1
  10. package/dist/components/jobPost/JobPost.js.map +1 -1
  11. package/dist/components/primitives/command.d.cts +7 -7
  12. package/dist/components/primitives/command.d.ts +7 -7
  13. package/dist/components/primitives/radio-group.cjs +74 -0
  14. package/dist/components/primitives/radio-group.cjs.map +1 -0
  15. package/dist/components/primitives/radio-group.d.cts +9 -0
  16. package/dist/components/primitives/radio-group.d.ts +9 -0
  17. package/dist/components/primitives/radio-group.js +39 -0
  18. package/dist/components/primitives/radio-group.js.map +1 -0
  19. package/dist/components/ui/Button.cjs +2 -1
  20. package/dist/components/ui/Button.cjs.map +1 -1
  21. package/dist/components/ui/Button.d.cts +1 -1
  22. package/dist/components/ui/Button.d.ts +1 -1
  23. package/dist/components/ui/Button.js +2 -1
  24. package/dist/components/ui/Button.js.map +1 -1
  25. package/dist/components/ui/Checkbox.cjs +38 -13
  26. package/dist/components/ui/Checkbox.cjs.map +1 -1
  27. package/dist/components/ui/Checkbox.d.cts +2 -1
  28. package/dist/components/ui/Checkbox.d.ts +2 -1
  29. package/dist/components/ui/Checkbox.js +31 -11
  30. package/dist/components/ui/Checkbox.js.map +1 -1
  31. package/dist/components/ui/Combobox.cjs +62 -41
  32. package/dist/components/ui/Combobox.cjs.map +1 -1
  33. package/dist/components/ui/Combobox.js +53 -32
  34. package/dist/components/ui/Combobox.js.map +1 -1
  35. package/dist/components/ui/DatePicker.cjs +133 -149
  36. package/dist/components/ui/DatePicker.cjs.map +1 -1
  37. package/dist/components/ui/DatePicker.js +132 -148
  38. package/dist/components/ui/DatePicker.js.map +1 -1
  39. package/dist/components/ui/ListItem.cjs +40 -21
  40. package/dist/components/ui/ListItem.cjs.map +1 -1
  41. package/dist/components/ui/ListItem.js +36 -17
  42. package/dist/components/ui/ListItem.js.map +1 -1
  43. package/dist/components/ui/Radio.cjs +177 -0
  44. package/dist/components/ui/Radio.cjs.map +1 -0
  45. package/dist/components/ui/Radio.d.cts +27 -0
  46. package/dist/components/ui/Radio.d.ts +27 -0
  47. package/dist/components/ui/Radio.js +142 -0
  48. package/dist/components/ui/Radio.js.map +1 -0
  49. package/dist/components/ui/ReadMore.cjs +2 -1
  50. package/dist/components/ui/ReadMore.cjs.map +1 -1
  51. package/dist/components/ui/ReadMore.js +2 -1
  52. package/dist/components/ui/ReadMore.js.map +1 -1
  53. package/dist/components/ui/Select.cjs +48 -24
  54. package/dist/components/ui/Select.cjs.map +1 -1
  55. package/dist/components/ui/Select.js +49 -25
  56. package/dist/components/ui/Select.js.map +1 -1
  57. package/dist/components/ui/Switch.cjs +83 -0
  58. package/dist/components/ui/Switch.cjs.map +1 -0
  59. package/dist/components/ui/Switch.d.cts +10 -0
  60. package/dist/components/ui/Switch.d.ts +10 -0
  61. package/dist/components/ui/Switch.js +48 -0
  62. package/dist/components/ui/Switch.js.map +1 -0
  63. package/dist/components/ui/buttonShadcn.cjs +2 -9
  64. package/dist/components/ui/buttonShadcn.cjs.map +1 -1
  65. package/dist/components/ui/buttonShadcn.d.cts +2 -2
  66. package/dist/components/ui/buttonShadcn.d.ts +2 -2
  67. package/dist/components/ui/buttonShadcn.js +2 -9
  68. package/dist/components/ui/buttonShadcn.js.map +1 -1
  69. package/dist/components/ui/calendar.cjs +7 -17
  70. package/dist/components/ui/calendar.cjs.map +1 -1
  71. package/dist/components/ui/calendar.js +7 -17
  72. package/dist/components/ui/calendar.js.map +1 -1
  73. package/dist/{displayText-CQRZ2fOT.d.cts → displayText-ca_ofoAC.d.cts} +2 -2
  74. package/dist/{displayText-LlsLfkTS.d.ts → displayText-eoAHqSNz.d.ts} +2 -2
  75. package/dist/hooks/useDisplayText.d.cts +3 -3
  76. package/dist/hooks/useDisplayText.d.ts +3 -3
  77. package/dist/index.cjs +574 -259
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.d.cts +13 -7
  80. package/dist/index.d.ts +13 -7
  81. package/dist/index.js +536 -224
  82. package/dist/index.js.map +1 -1
  83. package/dist/lib/locations.d.cts +2 -2
  84. package/dist/lib/locations.d.ts +2 -2
  85. package/dist/lib/mappings.d.cts +3 -3
  86. package/dist/lib/mappings.d.ts +3 -3
  87. package/dist/lib/salaryRange.d.cts +1 -1
  88. package/dist/lib/salaryRange.d.ts +1 -1
  89. package/dist/services/displayText.d.cts +3 -3
  90. package/dist/services/displayText.d.ts +3 -3
  91. package/dist/styles/globals.css +78 -0
  92. package/dist/styles/globals.css.map +1 -1
  93. package/dist/types/data/company_service_latest.d.cts +1 -1
  94. package/dist/types/data/company_service_latest.d.ts +1 -1
  95. package/dist/types/data/job_posting_service_latest.d.cts +1 -1
  96. package/dist/types/data/job_posting_service_latest.d.ts +1 -1
  97. package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
  98. package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
  99. package/package.json +7 -10
  100. package/dist/{company_service_latest-8IMr2hMZ.d.cts → company_service_latest-CRQFzMep.d.cts} +364 -364
  101. package/dist/{company_service_latest-8IMr2hMZ.d.ts → company_service_latest-CRQFzMep.d.ts} +364 -364
  102. package/dist/{job_posting_service_latest-CKITrYyz.d.cts → job_posting_service_latest-BOVbz68F.d.cts} +314 -314
  103. package/dist/{job_posting_service_latest-CKITrYyz.d.ts → job_posting_service_latest-BOVbz68F.d.ts} +314 -314
  104. package/dist/{shared_pickle_output_latest-Cwf2EMdH.d.cts → shared_pickle_output_latest-DKOmTyYk.d.cts} +18 -18
  105. package/dist/{shared_pickle_output_latest-Cwf2EMdH.d.ts → shared_pickle_output_latest-DKOmTyYk.d.ts} +18 -18
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+
4
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
6
+ children?: React.ReactNode | undefined;
7
+ } & React.RefAttributes<HTMLButtonElement>>;
8
+
9
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,39 @@
1
+ "use client";
2
+
3
+ // src/components/primitives/radio-group.tsx
4
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
5
+
6
+ // src/lib/utils.ts
7
+ import { clsx } from "clsx";
8
+ import { twMerge } from "tailwind-merge";
9
+ function cn(...inputs) {
10
+ return twMerge(clsx(inputs));
11
+ }
12
+
13
+ // src/components/primitives/radio-group.tsx
14
+ import { forwardRef } from "react";
15
+ import { jsx, jsxs } from "react/jsx-runtime";
16
+ var RadioGroup = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { className, ...props, ref }));
17
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
18
+ var RadioGroupItem = forwardRef(({ className, children, ...props }, ref) => {
19
+ return /* @__PURE__ */ jsxs("div", { className: "group flex flex-row items-center gap-2", children: [
20
+ /* @__PURE__ */ jsx(
21
+ RadioGroupPrimitive.Item,
22
+ {
23
+ ref,
24
+ className: cn(
25
+ "focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
26
+ className
27
+ ),
28
+ ...props
29
+ }
30
+ ),
31
+ /* @__PURE__ */ jsx("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40", children })
32
+ ] });
33
+ });
34
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
35
+ export {
36
+ RadioGroup,
37
+ RadioGroupItem
38
+ };
39
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts"],"sourcesContent":["'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport { cn } from '@/lib/utils'\nimport { ComponentPropsWithoutRef, ElementRef, forwardRef, PropsWithChildren } from 'react'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'focus-visible:ring-ring peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;AAEA,YAAY,yBAAyB;;;ACFrC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADAA,SAA+C,kBAAqC;AAMlF,cASE,YATF;AAJK,IAAM,aAAa,WAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAqB,0BAApB,EAAyB,WAAuB,GAAG,OAAO,KAAU,CACtE;AACD,WAAW,cAAkC,yBAAK;AAE3C,IAAM,iBAAiB,WAG5B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5C,SACE,qBAAC,SAAI,WAAU,0CACb;AAAA;AAAA,MAAqB;AAAA,MAApB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,IACA,oBAAC,WAAM,SAAS,MAAM,IAAI,WAAU,6CACjC,UACH;AAAA,KACF;AAEJ,CAAC;AACD,eAAe,cAAkC,yBAAK;","names":[]}
@@ -37,12 +37,13 @@ function cn(...inputs) {
37
37
  // src/components/ui/Button.tsx
38
38
  var import_jsx_runtime = require("react/jsx-runtime");
39
39
  var Button = (0, import_react.forwardRef)(
40
- ({ className, variant, size, asChild = false, ...props }, ref) => {
40
+ ({ className, variant, size, asChild = false, type = "button", ...props }, ref) => {
41
41
  const Component = asChild ? import_react_slot.Slot : "button";
42
42
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
43
43
  Component,
44
44
  {
45
45
  className: cn(buttonVariants({ variant, size, className })),
46
+ type,
46
47
  ref,
47
48
  ...props
48
49
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Props for the Button component.\n * @interface ButtonProps\n * @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}\n * @extends {VariantProps<typeof buttonVariants>}\n */\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * When true, the component will render its children directly without wrapping them in a button element.\n * Useful when you want to use the button styles on a different element.\n * @default false\n */\n asChild?: boolean\n}\n\n/**\n * A versatile button component that supports multiple variants and sizes.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Primary variant with large size\n * <Button variant=\"primary\" size=\"lg\">Large Button</Button>\n *\n * // As a link\n * <Button asChild>\n * <a href=\"/somewhere\">Go somewhere</a>\n * </Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\n/**\n * Variant definitions for the Button component using class-variance-authority.\n * Provides consistent styling across different button variations.\n */\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAqB;AACrB,iBAAuC;AACvC,mBAAkC;;;ACFlC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADyCM;AAL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SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,aAAa,KAAK;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ui/Button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Props for the Button component.\n * @interface ButtonProps\n * @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}\n * @extends {VariantProps<typeof buttonVariants>}\n */\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * When true, the component will render its children directly without wrapping them in a button element.\n * Useful when you want to use the button styles on a different element.\n * @default false\n */\n asChild?: boolean\n}\n\n/**\n * A versatile button component that supports multiple variants and sizes.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Primary variant with large size\n * <Button variant=\"primary\" size=\"lg\">Large Button</Button>\n *\n * // As a link\n * <Button asChild>\n * <a href=\"/somewhere\">Go somewhere</a>\n * </Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, type = 'button', ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n type={type}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\n/**\n * Variant definitions for the Button component using class-variance-authority.\n * Provides consistent styling across different button variations.\n */\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(cl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UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,OAAO,CAAC,QAAQ,WAAW,QAAQ,MAAM;AAAA,QACzC,QAAQ,CAAC,QAAQ,aAAa,QAAQ,MAAM;AAAA,QAC5C,OAAO,CAAC,QAAQ,WAAW,QAAQ,MAAM;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,aAAa,KAAK;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -40,7 +40,7 @@ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Rea
40
40
  * Provides consistent styling across different button variations.
41
41
  */
42
42
  declare const buttonVariants: (props?: ({
43
- variant?: "link" | "neutral" | "primary" | "secondary" | "transparent" | null | undefined;
43
+ variant?: "neutral" | "primary" | "link" | "secondary" | "transparent" | null | undefined;
44
44
  size?: "small" | "medium" | "large" | null | undefined;
45
45
  } & cva_types.ClassProp) | undefined) => string;
46
46
 
@@ -40,7 +40,7 @@ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & Rea
40
40
  * Provides consistent styling across different button variations.
41
41
  */
42
42
  declare const buttonVariants: (props?: ({
43
- variant?: "link" | "neutral" | "primary" | "secondary" | "transparent" | null | undefined;
43
+ variant?: "neutral" | "primary" | "link" | "secondary" | "transparent" | null | undefined;
44
44
  size?: "small" | "medium" | "large" | null | undefined;
45
45
  } & cva_types.ClassProp) | undefined) => string;
46
46
 
@@ -13,12 +13,13 @@ function cn(...inputs) {
13
13
  // src/components/ui/Button.tsx
14
14
  import { jsx } from "react/jsx-runtime";
15
15
  var Button = forwardRef(
16
- ({ className, variant, size, asChild = false, ...props }, ref) => {
16
+ ({ className, variant, size, asChild = false, type = "button", ...props }, ref) => {
17
17
  const Component = asChild ? Slot : "button";
18
18
  return /* @__PURE__ */ jsx(
19
19
  Component,
20
20
  {
21
21
  className: cn(buttonVariants({ variant, size, className })),
22
+ type,
22
23
  ref,
23
24
  ...props
24
25
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Props for the Button component.\n * @interface ButtonProps\n * @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}\n * @extends {VariantProps<typeof buttonVariants>}\n */\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * When true, the component will render its children directly without wrapping them in a button element.\n * Useful when you want to use the button styles on a different element.\n * @default false\n */\n asChild?: boolean\n}\n\n/**\n * A versatile button component that supports multiple variants and sizes.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Primary variant with large size\n * <Button variant=\"primary\" size=\"lg\">Large Button</Button>\n *\n * // As a link\n * <Button asChild>\n * <a href=\"/somewhere\">Go somewhere</a>\n * </Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\n/**\n * Variant definitions for the Button component using class-variance-authority.\n * Provides consistent styling across different button variations.\n */\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,WA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ACzC,QAAQ,CAAC,QAAQ,aAAa,QAAQ,MAAM;AAAA,QAC5C,OAAO,CAAC,QAAQ,WAAW,QAAQ,MAAM;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,aAAa,KAAK;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ui/Button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'cva'\nimport React, { forwardRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/**\n * Props for the Button component.\n * @interface ButtonProps\n * @extends {React.ButtonHTMLAttributes<HTMLButtonElement>}\n * @extends {VariantProps<typeof buttonVariants>}\n */\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n /**\n * When true, the component will render its children directly without wrapping them in a button element.\n * Useful when you want to use the button styles on a different element.\n * @default false\n */\n asChild?: boolean\n}\n\n/**\n * A versatile button component that supports multiple variants and sizes.\n *\n * @component\n * @example\n * ```tsx\n * // Default button\n * <Button>Click me</Button>\n *\n * // Primary variant with large size\n * <Button variant=\"primary\" size=\"lg\">Large Button</Button>\n *\n * // As a link\n * <Button asChild>\n * <a href=\"/somewhere\">Go somewhere</a>\n * </Button>\n * ```\n */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, type = 'button', ...props }, ref) => {\n const Component = asChild ? Slot : 'button'\n\n return (\n <Component\n className={cn(buttonVariants({ variant, size, className }))}\n type={type}\n ref={ref}\n {...props}\n />\n )\n }\n)\nButton.displayName = 'Button'\n\n/**\n * Variant definitions for the Button component using class-variance-authority.\n * Provides consistent styling across different button variations.\n */\nconst buttonVariants = cva(\n [\n 'flex',\n 'items-center',\n 'justify-center',\n 'gap-2',\n 'rounded-full',\n 'font-bold',\n 'outline-2',\n 'outline-offset-2',\n 'outline-dashed',\n 'outline-transparent',\n ],\n {\n variants: {\n variant: {\n neutral: [\n 'bg-black',\n 'text-white',\n 'hover:bg-grey-90',\n 'active:bg-grey-80',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n primary: [\n 'bg-pickle-100',\n 'text-black',\n 'hover:bg-pickle-80',\n 'active:bg-pickle-60',\n 'focus:outline-purple-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n secondary: [\n 'bg-green-80',\n 'text-white',\n 'hover:bg-green-90',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n 'disabled:bg-grey-10',\n ],\n transparent: [\n 'text-white',\n 'hover:bg-green-80',\n 'active:bg-green-100',\n 'focus:outline-pickle-100',\n 'disabled:text-grey-40',\n ],\n link: [\n 'leading-tight',\n 'text-black',\n 'underline',\n 'hover:text-purple-100',\n 'focus:text-black',\n 'focus:outline-purple-100',\n 'active:text-purple-80',\n ],\n },\n size: {\n small: ['h-10', 'text-sm', 'px-4', 'py-2'],\n medium: ['h-12', 'text-base', 'px-6', 'py-3'],\n large: ['h-14', 'text-lg', 'px-8', 'py-4'],\n },\n },\n defaultVariants: {\n variant: 'neutral',\n size: 'medium',\n },\n compoundVariants: [\n {\n variant: 'link',\n size: 'small',\n class: ['h-3', 'text-xs', 'p-0'],\n },\n {\n variant: 'link',\n size: 'medium',\n class: ['h-4', 'text-sm', 'p-0'],\n },\n {\n variant: 'link',\n size: 'large',\n class: ['h-6', 'text-base', 'p-0'],\n },\n ],\n }\n)\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";AAAA,SAAS,YAAY;AACrB,SAAS,WAA8B;AACvC,SAAgB,kBAAkB;;;ACFlC,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADyCM;AALC,IAAM,SAAS;AAAA,EACpB,CAAC,EAAE,WAAW,SAAS,MAAM,UAAU,OAAO,OAAO,UAAU,GAAG,MAAM,GAAG,QAAQ;AACjF,UAAM,YAAY,UAAU,OAAO;AAEnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,GAAG,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC,CAAC;AAAA,QAC1D;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;AAMrB,IAAM,iBAAiB;AAAA,EACrB;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,SAAS;AAAA,UACP;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,aAAa;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA,MAAM;AAAA,QACJ,OAAO,CAAC,QAAQ,WAAW,QAAQ,MAAM;AAAA,QACzC,QAAQ,CAAC,QAAQ,aAAa,QAAQ,MAAM;AAAA,QAC5C,OAAO,CAAC,QAAQ,WAAW,QAAQ,MAAM;AAAA,MAC3C;AAAA,IACF;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IACR;AAAA,IACA,kBAAkB;AAAA,MAChB;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,WAAW,KAAK;AAAA,MACjC;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,MAAM;AAAA,QACN,OAAO,CAAC,OAAO,aAAa,KAAK;AAAA,MACnC;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
@@ -31,7 +31,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  // src/components/ui/Checkbox.tsx
32
32
  var Checkbox_exports = {};
33
33
  __export(Checkbox_exports, {
34
- default: () => Checkbox_default
34
+ Checkbox: () => Checkbox,
35
+ CheckboxToggle: () => CheckboxToggle
35
36
  });
36
37
  module.exports = __toCommonJS(Checkbox_exports);
37
38
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
@@ -45,9 +46,17 @@ function cn(...inputs) {
45
46
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
46
47
  }
47
48
 
48
- // src/components/ui/Checkbox.tsx
49
+ // src/components/ui/ErrorMessage.tsx
49
50
  var import_jsx_runtime = require("react/jsx-runtime");
50
- var CheckboxToggle = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
51
+ function ErrorMessage({ message, className, ...props }) {
52
+ if (!message) return null;
53
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
54
+ }
55
+ var ErrorMessage_default = ErrorMessage;
56
+
57
+ // src/components/ui/Checkbox.tsx
58
+ var import_jsx_runtime2 = require("react/jsx-runtime");
59
+ var CheckboxToggle = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
51
60
  CheckboxPrimitive.Root,
52
61
  {
53
62
  ref,
@@ -77,24 +86,40 @@ var CheckboxToggle = (0, import_react.forwardRef)(({ className, ...props }, ref)
77
86
  className
78
87
  ),
79
88
  ...props,
80
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
81
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
89
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
90
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
91
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
83
92
  ] })
84
93
  }
85
94
  ));
86
95
  CheckboxToggle.displayName = CheckboxPrimitive.Root.displayName;
87
96
  var Checkbox = (0, import_react.forwardRef)(
88
- ({ classNames, children, ...props }, ref) => {
89
- const { disabled } = props;
97
+ ({ error, classNames, children, ...props }, ref) => {
90
98
  const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
91
- const labelClassName = disabled ? "text-grey-40 pointer-events-none" : "";
92
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxToggle, { id, disabled, ref, ...props }),
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
99
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CheckboxToggle, { id, ref, ...props }),
101
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
102
+ "label",
103
+ {
104
+ htmlFor: id,
105
+ className: cn(
106
+ "text-sm",
107
+ props.disabled && "pointer-events-none text-grey-40",
108
+ classNames?.label
109
+ ),
110
+ children: [
111
+ children,
112
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorMessage_default, { message: error, className: "mt-1" })
113
+ ]
114
+ }
115
+ )
95
116
  ] });
96
117
  }
97
118
  );
98
119
  Checkbox.displayName = "Checkbox";
99
- var Checkbox_default = Checkbox;
120
+ // Annotate the CommonJS export names for ESM import in node:
121
+ 0 && (module.exports = {
122
+ Checkbox,
123
+ CheckboxToggle
124
+ });
100
125
  //# sourceMappingURL=Checkbox.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,wBAAmC;AACnC,0BAA6B;AAC7B,mBAKO;;;ACTP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;AD0CI;AAlCJ,IAAM,qBAAiB,yBAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,YACJ;AAAA,MACF;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,uDAAmB,6BAAlB,EAA4B,WAAU,iDACrC;AAAA,kDAAC,6BAAM,WAAU,mDAAkD;AAAA,MACnE,4CAAC,6BAAM,WAAU,yDAAwD;AAAA,OAC3E;AAAA;AACF,CACD;AACD,eAAe,cAAgC,uBAAK;AAUpD,IAAM,eAAW;AAAA,EACf,CAAC,EAAE,YAAY,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC3C,UAAM,EAAE,SAAS,IAAI;AACrB,UAAM,KAAK,MAAM,MAAM,GAAG,MAAM,QAAQ,MAAM,OAAO,SAAS,CAAC;AAC/D,UAAM,iBAAiB,WAAW,qCAAqC;AACvE,WACE,6CAAC,SAAI,WAAW,GAAG,kBAAkB,YAAY,OAAO,GACtD;AAAA,kDAAC,kBAAe,IAAQ,UAAoB,KAAW,GAAG,OAAO;AAAA,MACjE,4CAAC,WAAM,SAAS,IAAI,WAAW,GAAG,gBAAgB,YAAY,KAAK,GAChE,UACH;AAAA,OACF;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;AAEvB,IAAO,mBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\nexport const CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nexport const Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ error, classNames, children, ...props }, ref) => {\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} ref={ref} {...props} />\n <label\n htmlFor={id}\n className={cn(\n 'text-sm',\n props.disabled && 'pointer-events-none text-grey-40',\n classNames?.label\n )}\n >\n {children}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,wBAAmC;AACnC,0BAA6B;AAC7B,mBAKO;;;ACTP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,4CAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO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ildren } from 'react';
3
3
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
4
 
5
+ declare const CheckboxToggle: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
6
  interface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {
6
7
  error?: string;
7
8
  classNames?: {
@@ -11,4 +12,4 @@ interface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {
11
12
  }
12
13
  declare const Checkbox: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
13
14
 
14
- export { Checkbox as default };
15
+ export { Checkbox, CheckboxToggle };
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { PropsWithChildren } from 'react';
3
3
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
4
 
5
+ declare const CheckboxToggle: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
6
  interface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {
6
7
  error?: string;
7
8
  classNames?: {
@@ -11,4 +12,4 @@ interface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {
11
12
  }
12
13
  declare const Checkbox: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
13
14
 
14
- export { Checkbox as default };
15
+ export { Checkbox, CheckboxToggle };
@@ -14,9 +14,17 @@ function cn(...inputs) {
14
14
  return twMerge(clsx(inputs));
15
15
  }
16
16
 
17
+ // src/components/ui/ErrorMessage.tsx
18
+ import { jsx } from "react/jsx-runtime";
19
+ function ErrorMessage({ message, className, ...props }) {
20
+ if (!message) return null;
21
+ return /* @__PURE__ */ jsx("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
22
+ }
23
+ var ErrorMessage_default = ErrorMessage;
24
+
17
25
  // src/components/ui/Checkbox.tsx
18
- import { jsx, jsxs } from "react/jsx-runtime";
19
- var CheckboxToggle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
26
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
27
+ var CheckboxToggle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
20
28
  CheckboxPrimitive.Root,
21
29
  {
22
30
  ref,
@@ -47,26 +55,38 @@ var CheckboxToggle = forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
47
55
  ),
48
56
  ...props,
49
57
  children: /* @__PURE__ */ jsxs(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
50
- /* @__PURE__ */ jsx(Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
51
- /* @__PURE__ */ jsx(Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
58
+ /* @__PURE__ */ jsx2(Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
59
+ /* @__PURE__ */ jsx2(Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
52
60
  ] })
53
61
  }
54
62
  ));
55
63
  CheckboxToggle.displayName = CheckboxPrimitive.Root.displayName;
56
64
  var Checkbox = forwardRef(
57
- ({ classNames, children, ...props }, ref) => {
58
- const { disabled } = props;
65
+ ({ error, classNames, children, ...props }, ref) => {
59
66
  const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
60
- const labelClassName = disabled ? "text-grey-40 pointer-events-none" : "";
61
67
  return /* @__PURE__ */ jsxs("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
62
- /* @__PURE__ */ jsx(CheckboxToggle, { id, disabled, ref, ...props }),
63
- /* @__PURE__ */ jsx("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
68
+ /* @__PURE__ */ jsx2(CheckboxToggle, { id, ref, ...props }),
69
+ /* @__PURE__ */ jsxs(
70
+ "label",
71
+ {
72
+ htmlFor: id,
73
+ className: cn(
74
+ "text-sm",
75
+ props.disabled && "pointer-events-none text-grey-40",
76
+ classNames?.label
77
+ ),
78
+ children: [
79
+ children,
80
+ /* @__PURE__ */ jsx2(ErrorMessage_default, { message: error, className: "mt-1" })
81
+ ]
82
+ }
83
+ )
64
84
  ] });
65
85
  }
66
86
  );
67
87
  Checkbox.displayName = "Checkbox";
68
- var Checkbox_default = Checkbox;
69
88
  export {
70
- Checkbox_default as default
89
+ Checkbox,
90
+ CheckboxToggle
71
91
  };
72
92
  //# sourceMappingURL=Checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nconst Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ classNames, children, ...props }, ref) => {\n const { disabled } = props\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n const labelClassName = disabled ? 'text-grey-40 pointer-events-none' : ''\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} disabled={disabled} ref={ref} {...props} />\n <label htmlFor={id} className={cn(labelClassName, classNames?.label)}>\n {children}\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n\nexport default Checkbox\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;;AAEA,YAAY,uBAAuB;AACnC,SAAS,OAAO,aAAa;AAC7B;AAAA,EAGE;AAAA,OAEK;;;ACTP,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;AD0CI,SACE,KADF;AAlCJ,IAAM,iBAAiB,WAGrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,YACJ;AAAA,MACF;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,+BAAmB,6BAAlB,EAA4B,WAAU,iDACrC;AAAA,0BAAC,SAAM,WAAU,mDAAkD;AAAA,MACnE,oBAAC,SAAM,WAAU,yDAAwD;AAAA,OAC3E;AAAA;AACF,CACD;AACD,eAAe,cAAgC,uBAAK;AAUpD,IAAM,WAAW;AAAA,EACf,CAAC,EAAE,YAAY,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC3C,UAAM,EAAE,SAAS,IAAI;AACrB,UAAM,KAAK,MAAM,MAAM,GAAG,MAAM,QAAQ,MAAM,OAAO,SAAS,CAAC;AAC/D,UAAM,iBAAiB,WAAW,qCAAqC;AACvE,WACE,qBAAC,SAAI,WAAW,GAAG,kBAAkB,YAAY,OAAO,GACtD;AAAA,0BAAC,kBAAe,IAAQ,UAAoB,KAAW,GAAG,OAAO;AAAA,MACjE,oBAAC,WAAM,SAAS,IAAI,WAAW,GAAG,gBAAgB,YAAY,KAAK,GAChE,UACH;AAAA,OACF;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;AAEvB,IAAO,mBAAQ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/ui/Checkbox.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx"],"sourcesContent":["'use client'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport { cn } from '@/lib/utils'\n\nexport const CheckboxToggle = forwardRef<\n ElementRef<typeof CheckboxPrimitive.Root>,\n ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'group',\n 'peer',\n 'h-5',\n 'w-5',\n 'shrink-0',\n 'rounded-md',\n 'border',\n 'border-grey-10',\n 'outline',\n 'outline-1',\n 'outline-offset-2',\n 'outline-transparent',\n 'hover:border-grey-20',\n 'focus:outline-purple-100',\n 'active:border-green-80',\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-50',\n 'data-[state=checked]:bg-green-80',\n 'data-[state=indeterminate]:bg-green-80',\n 'data-[state=checked]:text-white',\n 'data-[state=indeterminate]:text-primary-foreground',\n props.disabled &&\n 'data-[state=checked]:text-foreground bg-grey-20 data-[state=checked]:bg-grey-20',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"flex items-center justify-center text-current\">\n <Check className=\"hidden h-4 w-4 group-data-[state=checked]:block\" />\n <Minus className=\"hidden h-4 w-4 group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckboxToggle.displayName = CheckboxPrimitive.Root.displayName\n\ninterface Props extends CheckboxPrimitive.CheckboxProps, PropsWithChildren {\n error?: string\n classNames?: {\n wrapper?: string\n label?: string\n }\n}\n\nexport const Checkbox = forwardRef<ElementRef<typeof CheckboxPrimitive.Root>, Props>(\n ({ error, classNames, children, ...props }, ref) => {\n const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`\n return (\n <div className={cn('flex space-x-2', classNames?.wrapper)}>\n <CheckboxToggle id={id} ref={ref} {...props} />\n <label\n htmlFor={id}\n className={cn(\n 'text-sm',\n props.disabled && 'pointer-events-none text-grey-40',\n classNames?.label\n )}\n >\n {children}\n\n <ErrorMessage message={error} className=\"mt-1\" />\n </label>\n </div>\n )\n }\n)\nCheckbox.displayName = 'Checkbox'\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n"],"mappings":";;;AAEA,YAAY,uBAAuB;AACnC,SAAS,OAAO,aAAa;AAC7B;AAAA,EAGE;AAAA,OAEK;;;ACTP,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACOI;AAJJ,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oBAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,OAC3D,mBACH;AAEJ;AAEA,IAAO,uBAAQ;;;AF8BX,SACE,OAAAA,MADF;AAlCG,IAAM,iBAAiB,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,gBAAAA;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,YACJ;AAAA,MACF;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,+BAAmB,6BAAlB,EAA4B,WAAU,iDACrC;AAAA,sBAAAA,KAAC,SAAM,WAAU,mDAAkD;AAAA,MACnE,gBAAAA,KAAC,SAAM,WAAU,yDAAwD;AAAA,OAC3E;AAAA;AACF,CACD;AACD,eAAe,cAAgC,uBAAK;AAU7C,IAAM,WAAW;AAAA,EACtB,CAAC,EAAE,OAAO,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