@arolariu/components 0.3.0 → 0.3.1
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.
- package/changelog.md +4 -0
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/carousel.js +1 -1
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +1 -2
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +30 -2
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/field.d.ts +1 -0
- package/dist/components/ui/field.d.ts.map +1 -1
- package/dist/components/ui/field.js +1 -1
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/form.js +1 -1
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +0 -1
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +3 -2
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +2 -1
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +3 -2
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/accordion.tsx +3 -3
- package/src/components/ui/alert-dialog.tsx +6 -6
- package/src/components/ui/alert.tsx +1 -0
- package/src/components/ui/avatar.tsx +12 -11
- package/src/components/ui/calendar.tsx +2 -0
- package/src/components/ui/carousel.tsx +1 -1
- package/src/components/ui/chart.tsx +3 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/collapsible.tsx +1 -3
- package/src/components/ui/command.tsx +8 -7
- package/src/components/ui/context-menu.tsx +8 -8
- package/src/components/ui/dialog.tsx +4 -4
- package/src/components/ui/drawer.tsx +4 -4
- package/src/components/ui/dropdown-menu.tsx +8 -8
- package/src/components/ui/field.tsx +4 -3
- package/src/components/ui/form.tsx +4 -4
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-otp.tsx +5 -5
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +10 -10
- package/src/components/ui/navigation-menu.tsx +6 -7
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +2 -2
- package/src/components/ui/resizable.tsx +2 -1
- package/src/components/ui/scroll-area.tsx +2 -2
- package/src/components/ui/select.tsx +7 -7
- package/src/components/ui/separator.tsx +1 -1
- package/src/components/ui/sheet.tsx +4 -4
- package/src/components/ui/sidebar.tsx +20 -14
- package/src/components/ui/slider.tsx +14 -13
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +3 -3
- package/src/components/ui/toggle-group.tsx +2 -2
- package/src/components/ui/toggle.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
package/changelog.md
CHANGED
|
@@ -8,6 +8,10 @@ All notable changes to **@arolariu/components** are documented here following [K
|
|
|
8
8
|
|
|
9
9
|
## 🎉 Latest Releases
|
|
10
10
|
|
|
11
|
+
### [0.3.1](https://www.npmjs.com/package/@arolariu/components/v/0.3.1) - 2025-11-11
|
|
12
|
+
**🔧 Bug Fixes & Maintenance**
|
|
13
|
+
- 🐛 **Linting** Migrated from deprecated ElementRef to ComponentRef.
|
|
14
|
+
|
|
11
15
|
### [0.3.0](https://www.npmjs.com/package/@arolariu/components/v/0.3.0) - 2025-11-10
|
|
12
16
|
|
|
13
17
|
**✨ New Features & Improvements**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\accordion.js","sources":["webpack://@arolariu/components/./src/components/ui/accordion.tsx"],"sourcesContent":["\r\n\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Accordion = AccordionPrimitive.Root;\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.
|
|
1
|
+
{"version":3,"file":"components\\ui\\accordion.js","sources":["webpack://@arolariu/components/./src/components/ui/accordion.tsx"],"sourcesContent":["\r\n\r\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\r\nimport {ChevronDown} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Accordion = AccordionPrimitive.Root;\r\n\r\nconst AccordionItem = React.forwardRef<\r\n React.ComponentRef<typeof AccordionPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <AccordionPrimitive.Item\r\n ref={ref}\r\n className={cn(\"border-b\", className)}\r\n {...props}\r\n />\r\n));\r\nAccordionItem.displayName = \"AccordionItem\";\r\n\r\nconst AccordionTrigger = React.forwardRef<\r\n React.ComponentRef<typeof AccordionPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\r\n>(({className, children, ...props}, ref) => (\r\n <AccordionPrimitive.Header className='flex'>\r\n <AccordionPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex flex-1 items-center justify-between py-4 text-left text-sm font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronDown className='h-4 w-4 shrink-0 text-neutral-500 transition-transform duration-200 dark:text-neutral-400' />\r\n </AccordionPrimitive.Trigger>\r\n </AccordionPrimitive.Header>\r\n));\r\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\r\n\r\nconst AccordionContent = React.forwardRef<\r\n React.ComponentRef<typeof AccordionPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <AccordionPrimitive.Content\r\n ref={ref}\r\n className='data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm'\r\n {...props}>\r\n <div className={cn(\"pt-0 pb-4\", className)}>{children}</div>\r\n </AccordionPrimitive.Content>\r\n));\r\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\r\n\r\nexport {Accordion, AccordionContent, AccordionItem, AccordionTrigger};\r\n"],"names":["Accordion","AccordionPrimitive","AccordionItem","React","className","props","ref","cn","AccordionTrigger","children","ChevronDown","AccordionContent"],"mappings":";;;;;;AAQA,MAAMA,YAAYC;AAElB,MAAMC,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACL,MAAuB;QACtB,KAAKK;QACL,WAAWC,GAAG,YAAYH;QACzB,GAAGC,KAAK;;AAGbH,cAAc,WAAW,GAAG;AAE5B,MAAMM,mBAAmB,WAAnBA,GAAmBL,WAGvB,CAAC,EAACC,SAAS,EAAEK,QAAQ,EAAE,GAAGJ,OAAM,EAAEC,MAAAA,WAAAA,GAClC,IAACL,QAAyB;QAAC,WAAU;kBACnC,mBAACA,SAA0B;YACzB,KAAKK;YACL,WAAWC,GACT,kJACAH;YAED,GAAGC,KAAK;;gBACRI;8BACD,IAACC,aAAWA;oBAAC,WAAU;;;;;AAI7BF,iBAAiB,WAAW,GAAGP,QAAAA,WAAsC;AAErE,MAAMU,mBAAmB,WAAnBA,GAAmBR,WAGvB,CAAC,EAACC,SAAS,EAAEK,QAAQ,EAAE,GAAGJ,OAAM,EAAEC,MAAAA,WAAAA,GAClC,IAACL,SAA0B;QACzB,KAAKK;QACL,WAAU;QACT,GAAGD,KAAK;kBACT,kBAAC;YAAI,WAAWE,GAAG,aAAaH;sBAAaK;;;AAGjDE,iBAAiB,WAAW,GAAGV,QAAAA,WAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\alert-dialog.js","sources":["webpack://@arolariu/components/./src/components/ui/alert-dialog.tsx"],"sourcesContent":["\r\n\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\r\nimport * as React from \"react\";\r\n\r\nimport {buttonVariants} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root;\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n React.
|
|
1
|
+
{"version":3,"file":"components\\ui\\alert-dialog.js","sources":["webpack://@arolariu/components/./src/components/ui/alert-dialog.tsx"],"sourcesContent":["\r\n\r\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\r\nimport * as React from \"react\";\r\n\r\nimport {buttonVariants} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst AlertDialog = AlertDialogPrimitive.Root;\r\n\r\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\r\n\r\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\r\n\r\nconst AlertDialogOverlay = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPrimitive.Overlay\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80\",\r\n className,\r\n )}\r\n {...props}\r\n ref={ref}\r\n />\r\n));\r\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\r\n\r\nconst AlertDialogContent = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPortal>\r\n <AlertDialogOverlay />\r\n <AlertDialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </AlertDialogPortal>\r\n));\r\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\r\n\r\nconst AlertDialogHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\r\n\r\nconst AlertDialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\r\n {...props}\r\n />\r\n);\r\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\r\n\r\nconst AlertDialogTitle = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg font-semibold\", className)}\r\n {...props}\r\n />\r\n));\r\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\r\n\r\nconst AlertDialogDescription = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\r\n\r\nconst AlertDialogAction = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Action>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPrimitive.Action\r\n ref={ref}\r\n className={cn(buttonVariants(), className)}\r\n {...props}\r\n />\r\n));\r\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\r\n\r\nconst AlertDialogCancel = React.forwardRef<\r\n React.ComponentRef<typeof AlertDialogPrimitive.Cancel>,\r\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\r\n>(({className, ...props}, ref) => (\r\n <AlertDialogPrimitive.Cancel\r\n ref={ref}\r\n className={cn(buttonVariants({variant: \"outline\"}), \"mt-2 sm:mt-0\", className)}\r\n {...props}\r\n />\r\n));\r\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\r\n\r\nexport {\r\n AlertDialog,\r\n AlertDialogAction,\r\n AlertDialogCancel,\r\n AlertDialogContent,\r\n AlertDialogDescription,\r\n AlertDialogFooter,\r\n AlertDialogHeader,\r\n AlertDialogOverlay,\r\n AlertDialogPortal,\r\n AlertDialogTitle,\r\n AlertDialogTrigger,\r\n};\r\n"],"names":["AlertDialog","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","React","className","props","ref","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,MAAME,oBAAoBF;AAE1B,MAAMG,qBAAqB,WAArBA,GAAqBC,WAGzB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MA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EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACP,QAA2B;QAC1B,KAAKO;QACL,WAAWC,GAAGO,kBAAkBV;QAC/B,GAAGC,KAAK;;AAGbQ,kBAAkB,WAAW,GAAGd,OAAAA,WAAuC;AAEvE,MAAMgB,oBAAoB,WAApBA,GAAoBZ,WAGxB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACP,QAA2B;QAC1B,KAAKO;QACL,WAAWC,GAAGO,eAAe;YAAC,SAAS;QAAS,IAAI,gBAAgBV;QACnE,GAAGC,KAAK;;AAGbU,kBAAkB,WAAW,GAAGhB,OAAAA,WAAuC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,QAAA,MAAM,KAAK;;yGASV,CAAC;AAGF,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAM,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoB/B,QAAA,MAAM,KAAK;;yGASV,CAAC;AAGF,QAAA,MAAM,UAAU,uHAOd,CAAC;AAGH,QAAA,MAAM,gBAAgB,yHAQrB,CAAC;AAGF,OAAO,EAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\alert.js","sources":["webpack://@arolariu/components/./src/components/ui/alert.tsx"],"sourcesContent":["\r\n\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border border-neutral-200 px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-neutral-950 [&>svg~*]:pl-7 dark:border-neutral-800 dark:[&>svg]:text-neutral-50\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n destructive:\r\n \"border-red-500/50 text-red-500 dark:border-red-500 [&>svg]:text-red-500 dark:border-red-900/50 dark:text-red-900 dark:dark:border-red-900 dark:[&>svg]:text-red-900\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n },\r\n);\r\n\r\nconst Alert = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>>(\r\n ({className, variant, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n className={cn(alertVariants({variant}), className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nAlert.displayName = \"Alert\";\r\n\r\nconst AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({className, ...props}, ref) => (\r\n <h5\r\n ref={ref}\r\n className={cn(\"mb-1 leading-none font-medium tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nAlertTitle.displayName = \"AlertTitle\";\r\n\r\nconst AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nAlertDescription.displayName = \"AlertDescription\";\r\n\r\nexport {Alert, AlertDescription, AlertTitle};\r\n"],"names":["alertVariants","cva","Alert","React","className","variant","props","ref","cn","AlertTitle","AlertDescription"],"mappings":";;;;;AAOA,MAAMA,gBAAgBC,IACpB,oPACA;IACE,UAAU;QACR,SAAS;YACP,SAAS;YACT,aACE;QACJ;IACF;IACA,iBAAiB;QACf,SAAS;IACX;AACF;AAGF,MAAMC,QAAQ,WAARA,GAAQC,WACZ,CAAC,EAACC,SAAS,EAAEC,OAAO,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC/B,IAAC;QACC,KAAKA;QACL,MAAK;QACL,WAAWC,GAAGR,cAAc;YAACK;QAAO,IAAID;QACvC,GAAGE,KAAK;;AAIfJ,MAAM,WAAW,GAAG;AAEpB,MAAMO,aAAa,WAAbA,GAAaN,WAAiF,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAM,EAAEC,
|
|
1
|
+
{"version":3,"file":"components\\ui\\alert.js","sources":["webpack://@arolariu/components/./src/components/ui/alert.tsx"],"sourcesContent":["\r\n\r\nimport {cva, type VariantProps} from \"class-variance-authority\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst alertVariants = cva(\r\n \"relative w-full rounded-lg border border-neutral-200 px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-neutral-950 [&>svg~*]:pl-7 dark:border-neutral-800 dark:[&>svg]:text-neutral-50\",\r\n {\r\n variants: {\r\n variant: {\r\n default: \"bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n destructive:\r\n \"border-red-500/50 text-red-500 dark:border-red-500 [&>svg]:text-red-500 dark:border-red-900/50 dark:text-red-900 dark:dark:border-red-900 dark:[&>svg]:text-red-900\",\r\n },\r\n },\r\n defaultVariants: {\r\n variant: \"default\",\r\n },\r\n },\r\n);\r\n\r\nconst Alert = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>>(\r\n ({className, variant, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n role='alert'\r\n className={cn(alertVariants({variant}), className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nAlert.displayName = \"Alert\";\r\n\r\nconst AlertTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(({className, ...props}, ref) => (\r\n // eslint-disable-next-line jsx-a11y/heading-has-content -- this will be filled with children.\r\n <h5\r\n ref={ref}\r\n className={cn(\"mb-1 leading-none font-medium tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nAlertTitle.displayName = \"AlertTitle\";\r\n\r\nconst AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(\r\n ({className, ...props}, ref) => (\r\n <div\r\n ref={ref}\r\n className={cn(\"text-sm [&_p]:leading-relaxed\", className)}\r\n {...props}\r\n />\r\n ),\r\n);\r\nAlertDescription.displayName = \"AlertDescription\";\r\n\r\nexport {Alert, AlertDescription, AlertTitle};\r\n"],"names":["alertVariants","cva","Alert","React","className","variant","props","ref","cn","AlertTitle","AlertDescription"],"mappings":";;;;;AAOA,MAAMA,gBAAgBC,IACpB,oPACA;IACE,UAAU;QACR,SAAS;YACP,SAAS;YACT,aACE;QACJ;IACF;IACA,iBAAiB;QACf,SAAS;IACX;AACF;AAGF,MAAMC,QAAQ,WAARA,GAAQC,WACZ,CAAC,EAACC,SAAS,EAAEC,OAAO,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GAC/B,IAAC;QACC,KAAKA;QACL,MAAK;QACL,WAAWC,GAAGR,cAAc;YAACK;QAAO,IAAID;QACvC,GAAGE,KAAK;;AAIfJ,MAAM,WAAW,GAAG;AAEpB,MAAMO,aAAa,WAAbA,GAAaN,WAAiF,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAM,EAAEC,M,cAE1H,IAAC;QACC,KAAKA;QACL,WAAWC,GAAG,gDAAgDJ;QAC7D,GAAGE,KAAK;;AAGbG,WAAW,WAAW,GAAG;AAEzB,MAAMC,mBAAmB,WAAnBA,GAAmBP,WACvB,CAAC,EAACC,SAAS,EAAE,GAAGE,OAAM,EAAEC,MAAAA,WAAAA,GACtB,IAAC;QACC,KAAKA;QACL,WAAWC,GAAG,iCAAiCJ;QAC9C,GAAGE,KAAK;;AAIfI,iBAAiB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,MAAM,yJASV,CAAC;AAGH,QAAA,MAAM,WAAW,gKASf,CAAC;AAGH,QAAA,MAAM,cAAc,iKASlB,CAAC;AAGH,OAAO,EAAC,MAAM,EAAE,cAAc,EAAE,WAAW,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\avatar.js","sources":["webpack://@arolariu/components/./src/components/ui/avatar.tsx"],"sourcesContent":["\r\n\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Avatar = React.forwardRef
|
|
1
|
+
{"version":3,"file":"components\\ui\\avatar.js","sources":["webpack://@arolariu/components/./src/components/ui/avatar.tsx"],"sourcesContent":["\r\n\r\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Avatar = React.forwardRef<\r\n React.ComponentRef<typeof AvatarPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\r\n>(({className, ...props}, ref) => (\r\n <AvatarPrimitive.Root\r\n ref={ref}\r\n className={cn(\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\", className)}\r\n {...props}\r\n />\r\n));\r\nAvatar.displayName = AvatarPrimitive.Root.displayName;\r\n\r\nconst AvatarImage = React.forwardRef<\r\n React.ComponentRef<typeof AvatarPrimitive.Image>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\r\n>(({className, ...props}, ref) => (\r\n <AvatarPrimitive.Image\r\n ref={ref}\r\n className={cn(\"aspect-square h-full w-full\", className)}\r\n {...props}\r\n />\r\n));\r\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\r\n\r\nconst AvatarFallback = React.forwardRef<\r\n React.ComponentRef<typeof AvatarPrimitive.Fallback>,\r\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\r\n>(({className, ...props}, ref) => (\r\n <AvatarPrimitive.Fallback\r\n ref={ref}\r\n className={cn(\"flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\r\n\r\nexport {Avatar, AvatarFallback, AvatarImage};\r\n"],"names":["Avatar","React","className","props","ref","AvatarPrimitive","cn","AvatarImage","AvatarFallback"],"mappings":";;;;;AAOA,MAAMA,SAAS,WAATA,GAASC,WAGb,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAoB;QACnB,KAAKD;QACL,WAAWE,GAAG,iEAAiEJ;QAC9E,GAAGC,KAAK;;AAGbH,OAAO,WAAW,GAAGK,KAAAA,WAAgC;AAErD,MAAME,cAAc,WAAdA,GAAcN,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,OAAqB;QACpB,KAAKD;QACL,WAAWE,GAAG,+BAA+BJ;QAC5C,GAAGC,KAAK;;AAGbI,YAAY,WAAW,GAAGF,MAAAA,WAAiC;AAE3D,MAAMG,iBAAiB,WAAjBA,GAAiBP,WAGrB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,UAAwB;QACvB,KAAKD;QACL,WAAWE,GAAG,kGAAkGJ;QAC/G,GAAGC,KAAK;;AAGbK,eAAe,WAAW,GAAGH,SAAAA,WAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,SAAS,EAAE,SAAS,EAAuB,MAAM,kBAAkB,CAAC;AAE5E,OAAO,EAAC,MAAM,EAAiB,MAAM,wBAAwB,CAAC;AAG9D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAAuB,EACvB,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CAChE,2CA4HA;AAED,iBAAS,iBAAiB,CAAC,EAAC,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CA0BvG;AAED,OAAO,EAAC,QAAQ,EAAE,iBAAiB,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\calendar.js","sources":["webpack://@arolariu/components/./src/components/ui/calendar.tsx"],"sourcesContent":["\r\n\r\nimport {ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport {DayButton, DayPicker, getDefaultClassNames} from \"react-day-picker\";\r\n\r\nimport {Button, buttonVariants} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n captionLayout = \"label\",\r\n buttonVariant = \"ghost\",\r\n formatters,\r\n components,\r\n ...props\r\n}: React.ComponentProps<typeof DayPicker> & {\r\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\r\n}) {\r\n const defaultClassNames = getDefaultClassNames();\r\n\r\n return (\r\n <DayPicker\r\n showOutsideDays={showOutsideDays}\r\n className={cn(\r\n \"group/calendar bg-white p-3 [--cell-size:2rem] dark:bg-neutral-950 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\r\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\r\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\r\n className,\r\n )}\r\n captionLayout={captionLayout}\r\n formatters={{\r\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", {month: \"short\"}),\r\n ...formatters,\r\n }}\r\n classNames={{\r\n root: cn(\"w-fit\", defaultClassNames.root),\r\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\r\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\r\n nav: cn(\"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\", defaultClassNames.nav),\r\n button_previous: cn(\r\n buttonVariants({variant: buttonVariant}),\r\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\r\n defaultClassNames.button_previous,\r\n ),\r\n button_next: cn(\r\n buttonVariants({variant: buttonVariant}),\r\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\r\n defaultClassNames.button_next,\r\n ),\r\n month_caption: cn(\"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]\", defaultClassNames.month_caption),\r\n dropdowns: cn(\"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium\", defaultClassNames.dropdowns),\r\n dropdown_root: cn(\r\n \"has-focus:border-neutral-950 border-neutral-200 shadow-xs has-focus:ring-neutral-950/50 has-focus:ring-[3px] relative rounded-md border dark:has-focus:border-neutral-300 dark:border-neutral-800 dark:has-focus:ring-neutral-300/50\",\r\n defaultClassNames.dropdown_root,\r\n ),\r\n dropdown: cn(\"bg-white absolute inset-0 opacity-0 dark:bg-neutral-950\", defaultClassNames.dropdown),\r\n caption_label: cn(\r\n \"select-none font-medium\",\r\n captionLayout === \"label\"\r\n ? \"text-sm\"\r\n : \"[&>svg]:text-neutral-500 flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5 dark:[&>svg]:text-neutral-400\",\r\n defaultClassNames.caption_label,\r\n ),\r\n table: \"w-full border-collapse\",\r\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\r\n weekday: cn(\r\n \"text-neutral-500 flex-1 select-none rounded-md text-[0.8rem] font-normal dark:text-neutral-400\",\r\n defaultClassNames.weekday,\r\n ),\r\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\r\n week_number_header: cn(\"w-[--cell-size] select-none\", defaultClassNames.week_number_header),\r\n week_number: cn(\"text-neutral-500 select-none text-[0.8rem] dark:text-neutral-400\", defaultClassNames.week_number),\r\n day: cn(\r\n \"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md\",\r\n defaultClassNames.day,\r\n ),\r\n range_start: cn(\"bg-neutral-100 rounded-l-md dark:bg-neutral-800\", defaultClassNames.range_start),\r\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\r\n range_end: cn(\"bg-neutral-100 rounded-r-md dark:bg-neutral-800\", defaultClassNames.range_end),\r\n today: cn(\r\n \"bg-neutral-100 text-neutral-900 rounded-md data-[selected=true]:rounded-none dark:bg-neutral-800 dark:text-neutral-50\",\r\n defaultClassNames.today,\r\n ),\r\n outside: cn(\r\n \"text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400\",\r\n defaultClassNames.outside,\r\n ),\r\n disabled: cn(\"text-neutral-500 opacity-50 dark:text-neutral-400\", defaultClassNames.disabled),\r\n hidden: cn(\"invisible\", defaultClassNames.hidden),\r\n ...classNames,\r\n }}\r\n components={{\r\n Root: ({className, rootRef, ...props}) => {\r\n return (\r\n <div\r\n data-slot='calendar'\r\n ref={rootRef}\r\n className={cn(className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n Chevron: ({className, orientation, ...props}) => {\r\n if (orientation === \"left\") {\r\n return (\r\n <ChevronLeftIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n }\r\n\r\n if (orientation === \"right\") {\r\n return (\r\n <ChevronRightIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <ChevronDownIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n DayButton: CalendarDayButton,\r\n WeekNumber: ({children, ...props}) => {\r\n return (\r\n <td {...props}>\r\n <div className='flex size-[--cell-size] items-center justify-center text-center'>{children}</div>\r\n </td>\r\n );\r\n },\r\n ...components,\r\n }}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction CalendarDayButton({className, day, modifiers, ...props}: React.ComponentProps<typeof DayButton>) {\r\n const defaultClassNames = getDefaultClassNames();\r\n\r\n const ref = React.useRef<HTMLButtonElement>(null);\r\n React.useEffect(() => {\r\n if (modifiers[\"focused\"]) ref.current?.focus();\r\n }, [modifiers[\"focused\"]]);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant='ghost'\r\n size='icon'\r\n data-day={day.date.toLocaleDateString()}\r\n data-selected-single={modifiers[\"selected\"] && !modifiers[\"range_start\"] && !modifiers[\"range_end\"] && !modifiers[\"range_middle\"]}\r\n data-range-start={modifiers[\"range_start\"]}\r\n data-range-end={modifiers[\"range_end\"]}\r\n data-range-middle={modifiers[\"range_middle\"]}\r\n className={cn(\r\n \"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:bg-neutral-900 data-[range-end=true]:text-neutral-50 data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-neutral-100 data-[range-middle=true]:text-neutral-900 data-[range-start=true]:rounded-md data-[range-start=true]:bg-neutral-900 data-[range-start=true]:text-neutral-50 data-[selected-single=true]:bg-neutral-900 data-[selected-single=true]:text-neutral-50 dark:data-[range-end=true]:bg-neutral-50 dark:data-[range-end=true]:text-neutral-900 dark:data-[range-middle=true]:bg-neutral-800 dark:data-[range-middle=true]:text-neutral-50 dark:data-[range-start=true]:bg-neutral-50 dark:data-[range-start=true]:text-neutral-900 dark:data-[selected-single=true]:bg-neutral-50 dark:data-[selected-single=true]:text-neutral-900 [&>span]:text-xs [&>span]:opacity-70\",\r\n defaultClassNames.day,\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Calendar, CalendarDayButton};\r\n"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","DayPicker","cn","String","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","React","Button"],"mappings":";;;;;;;AASA,SAASA,SAAS,EAChBC,SAAS,EACTC,UAAU,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AS,CAAC,UAAU,EAAEC,IAAI,OAAO,EAAE;IACzC,GAAG;QAACD,SAAS,CAAC,UAAU;KAAC;IAEzB,OAAO,WAAP,GACE,IAACG,QAAMA;QACL,KAAKF;QACL,SAAQ;QACR,MAAK;QACL,YAAUF,IAAI,IAAI,CAAC,kBAAkB;QACrC,wBAAsBC,SAAS,CAAC,WAAW,IAAI,CAACA,SAAS,CAAC,cAAc,IAAI,CAACA,SAAS,CAAC,YAAY,IAAI,CAACA,SAAS,CAAC,eAAe;QACjI,oBAAkBA,SAAS,CAAC,cAAc;QAC1C,kBAAgBA,SAAS,CAAC,YAAY;QACtC,qBAAmBA,SAAS,CAAC,eAAe;QAC5C,WAAWZ,GACT,omCACAH,kBAAkB,GAAG,EACrBR;QAED,GAAGO,KAAK;;AAGf"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\calendar.js","sources":["webpack://@arolariu/components/./src/components/ui/calendar.tsx"],"sourcesContent":["\r\n\r\n/* eslint-disable */\r\n\r\nimport {ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon} from \"lucide-react\";\r\nimport * as React from \"react\";\r\nimport {DayButton, DayPicker, getDefaultClassNames} from \"react-day-picker\";\r\n\r\nimport {Button, buttonVariants} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction Calendar({\r\n className,\r\n classNames,\r\n showOutsideDays = true,\r\n captionLayout = \"label\",\r\n buttonVariant = \"ghost\",\r\n formatters,\r\n components,\r\n ...props\r\n}: React.ComponentProps<typeof DayPicker> & {\r\n buttonVariant?: React.ComponentProps<typeof Button>[\"variant\"];\r\n}) {\r\n const defaultClassNames = getDefaultClassNames();\r\n\r\n return (\r\n <DayPicker\r\n showOutsideDays={showOutsideDays}\r\n className={cn(\r\n \"group/calendar bg-white p-3 [--cell-size:2rem] dark:bg-neutral-950 [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent\",\r\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\r\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\r\n className,\r\n )}\r\n captionLayout={captionLayout}\r\n formatters={{\r\n formatMonthDropdown: (date) => date.toLocaleString(\"default\", {month: \"short\"}),\r\n ...formatters,\r\n }}\r\n classNames={{\r\n root: cn(\"w-fit\", defaultClassNames.root),\r\n months: cn(\"relative flex flex-col gap-4 md:flex-row\", defaultClassNames.months),\r\n month: cn(\"flex w-full flex-col gap-4\", defaultClassNames.month),\r\n nav: cn(\"absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1\", defaultClassNames.nav),\r\n button_previous: cn(\r\n buttonVariants({variant: buttonVariant}),\r\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\r\n defaultClassNames.button_previous,\r\n ),\r\n button_next: cn(\r\n buttonVariants({variant: buttonVariant}),\r\n \"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50\",\r\n defaultClassNames.button_next,\r\n ),\r\n month_caption: cn(\"flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]\", defaultClassNames.month_caption),\r\n dropdowns: cn(\"flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium\", defaultClassNames.dropdowns),\r\n dropdown_root: cn(\r\n \"has-focus:border-neutral-950 border-neutral-200 shadow-xs has-focus:ring-neutral-950/50 has-focus:ring-[3px] relative rounded-md border dark:has-focus:border-neutral-300 dark:border-neutral-800 dark:has-focus:ring-neutral-300/50\",\r\n defaultClassNames.dropdown_root,\r\n ),\r\n dropdown: cn(\"bg-white absolute inset-0 opacity-0 dark:bg-neutral-950\", defaultClassNames.dropdown),\r\n caption_label: cn(\r\n \"select-none font-medium\",\r\n captionLayout === \"label\"\r\n ? \"text-sm\"\r\n : \"[&>svg]:text-neutral-500 flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5 dark:[&>svg]:text-neutral-400\",\r\n defaultClassNames.caption_label,\r\n ),\r\n table: \"w-full border-collapse\",\r\n weekdays: cn(\"flex\", defaultClassNames.weekdays),\r\n weekday: cn(\r\n \"text-neutral-500 flex-1 select-none rounded-md text-[0.8rem] font-normal dark:text-neutral-400\",\r\n defaultClassNames.weekday,\r\n ),\r\n week: cn(\"mt-2 flex w-full\", defaultClassNames.week),\r\n week_number_header: cn(\"w-[--cell-size] select-none\", defaultClassNames.week_number_header),\r\n week_number: cn(\"text-neutral-500 select-none text-[0.8rem] dark:text-neutral-400\", defaultClassNames.week_number),\r\n day: cn(\r\n \"group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md\",\r\n defaultClassNames.day,\r\n ),\r\n range_start: cn(\"bg-neutral-100 rounded-l-md dark:bg-neutral-800\", defaultClassNames.range_start),\r\n range_middle: cn(\"rounded-none\", defaultClassNames.range_middle),\r\n range_end: cn(\"bg-neutral-100 rounded-r-md dark:bg-neutral-800\", defaultClassNames.range_end),\r\n today: cn(\r\n \"bg-neutral-100 text-neutral-900 rounded-md data-[selected=true]:rounded-none dark:bg-neutral-800 dark:text-neutral-50\",\r\n defaultClassNames.today,\r\n ),\r\n outside: cn(\r\n \"text-neutral-500 aria-selected:text-neutral-500 dark:text-neutral-400 dark:aria-selected:text-neutral-400\",\r\n defaultClassNames.outside,\r\n ),\r\n disabled: cn(\"text-neutral-500 opacity-50 dark:text-neutral-400\", defaultClassNames.disabled),\r\n hidden: cn(\"invisible\", defaultClassNames.hidden),\r\n ...classNames,\r\n }}\r\n components={{\r\n Root: ({className, rootRef, ...props}) => {\r\n return (\r\n <div\r\n data-slot='calendar'\r\n ref={rootRef}\r\n className={cn(className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n Chevron: ({className, orientation, ...props}) => {\r\n if (orientation === \"left\") {\r\n return (\r\n <ChevronLeftIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n }\r\n\r\n if (orientation === \"right\") {\r\n return (\r\n <ChevronRightIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <ChevronDownIcon\r\n className={cn(\"size-4\", className)}\r\n {...props}\r\n />\r\n );\r\n },\r\n DayButton: CalendarDayButton,\r\n WeekNumber: ({children, ...props}) => {\r\n return (\r\n <td {...props}>\r\n <div className='flex size-[--cell-size] items-center justify-center text-center'>{children}</div>\r\n </td>\r\n );\r\n },\r\n ...components,\r\n }}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction CalendarDayButton({className, day, modifiers, ...props}: React.ComponentProps<typeof DayButton>) {\r\n const defaultClassNames = getDefaultClassNames();\r\n\r\n const ref = React.useRef<HTMLButtonElement>(null);\r\n React.useEffect(() => {\r\n if (modifiers[\"focused\"]) ref.current?.focus();\r\n }, [modifiers[\"focused\"]]);\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant='ghost'\r\n size='icon'\r\n data-day={day.date.toLocaleDateString()}\r\n data-selected-single={modifiers[\"selected\"] && !modifiers[\"range_start\"] && !modifiers[\"range_end\"] && !modifiers[\"range_middle\"]}\r\n data-range-start={modifiers[\"range_start\"]}\r\n data-range-end={modifiers[\"range_end\"]}\r\n data-range-middle={modifiers[\"range_middle\"]}\r\n className={cn(\r\n \"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:bg-neutral-900 data-[range-end=true]:text-neutral-50 data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-neutral-100 data-[range-middle=true]:text-neutral-900 data-[range-start=true]:rounded-md data-[range-start=true]:bg-neutral-900 data-[range-start=true]:text-neutral-50 data-[selected-single=true]:bg-neutral-900 data-[selected-single=true]:text-neutral-50 dark:data-[range-end=true]:bg-neutral-50 dark:data-[range-end=true]:text-neutral-900 dark:data-[range-middle=true]:bg-neutral-800 dark:data-[range-middle=true]:text-neutral-50 dark:data-[range-start=true]:bg-neutral-50 dark:data-[range-start=true]:text-neutral-900 dark:data-[selected-single=true]:bg-neutral-50 dark:data-[selected-single=true]:text-neutral-900 [&>span]:text-xs [&>span]:opacity-70\",\r\n defaultClassNames.day,\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Calendar, CalendarDayButton};\r\n"],"names":["Calendar","className","classNames","showOutsideDays","captionLayout","buttonVariant","formatters","components","props","defaultClassNames","getDefaultClassNames","DayPicker","cn","String","date","buttonVariants","rootRef","orientation","ChevronLeftIcon","ChevronRightIcon","ChevronDownIcon","CalendarDayButton","children","day","modifiers","ref","React","Button"],"mappings":";;;;;;;AAWA,SAASA,SAAS,EAChBC,SAAS,EACTC,UAAU,EACVC,kBAAkB,IAAI,EACtBC,gBAAgB,OAAO,EACvBC,gBAAgB,OAAO,EACvBC,UAAU,EACVC,UAAU,EACV,GAAGC,OAGJ;IACC,MAAMC,oBAAoBC;IAE1B,OAAO,WAAP,GACE,IAACC,WAASA;QACR,iBAAiBR;QACjB,WAAWS,GACT,iKACAC,OAAO,GAAG,CAAC,yCAAyC,CAAC,EACrDA,OAAO,GAAG,CAAC,6CAA6C,CAAC,EACzDZ;QAEF,eAAeG;QACf,YAAY;YACV,qBAAqB,CAACU,OAASA,KAAK,cAAc,CAAC,WAAW;oBAAC,OAAO;gBAAO;YAC7E,GAAGR,UAAU;QACf;QACA,YAAY;YACV,MAAMM,GAAG,SAASH,kBAAkB,IAAI;YACxC,QAAQG,GAAG,4CAA4CH,kBAAkB,MAAM;YAC/E,OAAOG,GAAG,8BAA8BH,kBAAkB,KAAK;YAC/D,KAAKG,GAAG,2EAA2EH,kBAAkB,GAAG;YACxG,iBAAiBG,GACfG,eAAe;gBAAC,SAASV;YAAa,IACtC,4EACAI,kBAAkB,eAAe;YAEnC,aAAaG,GACXG,eAAe;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YAAAA,aACF,OAAO,WAAP,GACE,IAACE,kBAAgBA;oBACf,WAAWP,GAAG,UAAUX;oBACvB,GAAGO,KAAK;;gBAKf,OAAO,WAAP,GACE,IAACY,iBAAeA;oBACd,WAAWR,GAAG,UAAUX;oBACvB,GAAGO,KAAK;;YAGf;YACA,WAAWa;YACX,YAAY,CAAC,EAACC,QAAQ,EAAE,GAAGd,OAAM,GACxB,WAAP,GACE,IAAC;oBAAI,GAAGA,KAAK;8BACX,kBAAC;wBAAI,WAAU;kCAAmEc;;;YAIxF,GAAGf,UAAU;QACf;QACC,GAAGC,KAAK;;AAGf;AAEA,SAASa,kBAAkB,EAACpB,SAAS,EAAEsB,GAAG,EAAEC,SAAS,EAAE,GAAGhB,OAA8C;IACtG,MAAMC,oBAAoBC;IAE1B,MAAMe,MAAMC,OAAgC;IAC5CA,UAAgB;QACd,IAAIF,SAAS,CAAC,UAAU,EAAEC,IAAI,OAAO,EAAE;IACzC,GAAG;QAACD,SAAS,CAAC,UAAU;KAAC;IAEzB,OAAO,WAAP,GACE,IAACG,QAAMA;QACL,KAAKF;QACL,SAAQ;QACR,MAAK;QACL,YAAUF,IAAI,IAAI,CAAC,kBAAkB;QACrC,wBAAsBC,SAAS,CAAC,WAAW,IAAI,CAACA,SAAS,CAAC,cAAc,IAAI,CAACA,SAAS,CAAC,YAAY,IAAI,CAACA,SAAS,CAAC,eAAe;QACjI,oBAAkBA,SAAS,CAAC,cAAc;QAC1C,kBAAgBA,SAAS,CAAC,YAAY;QACtC,qBAAmBA,SAAS,CAAC,eAAe;QAC5C,WAAWZ,GACT,omCACAH,kBAAkB,GAAG,EACrBR;QAED,GAAGO,KAAK;;AAGf"}
|
|
@@ -67,7 +67,7 @@ const Carousel = /*#__PURE__*/ forwardRef(({ orientation = "horizontal", opts, s
|
|
|
67
67
|
return /*#__PURE__*/ jsx(CarouselContext.Provider, {
|
|
68
68
|
value: {
|
|
69
69
|
carouselRef,
|
|
70
|
-
api
|
|
70
|
+
api,
|
|
71
71
|
opts,
|
|
72
72
|
orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
|
|
73
73
|
scrollPrev,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\carousel.js","sources":["webpack://@arolariu/components/./src/components/ui/carousel.tsx"],"sourcesContent":["\r\n\r\nimport useEmblaCarousel, {type UseEmblaCarouselType} from \"embla-carousel-react\";\r\nimport {ArrowLeft, ArrowRight} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Button} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ntype CarouselApi = UseEmblaCarouselType[1];\r\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\r\ntype CarouselOptions = UseCarouselParameters[0];\r\ntype CarouselPlugin = UseCarouselParameters[1];\r\n\r\ntype CarouselProps = {\r\n opts?: CarouselOptions;\r\n plugins?: CarouselPlugin;\r\n orientation?: \"horizontal\" | \"vertical\";\r\n setApi?: (api: CarouselApi) => void;\r\n};\r\n\r\ntype CarouselContextProps = {\r\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\r\n api: ReturnType<typeof useEmblaCarousel>[1];\r\n scrollPrev: () => void;\r\n scrollNext: () => void;\r\n canScrollPrev: boolean;\r\n canScrollNext: boolean;\r\n} & CarouselProps;\r\n\r\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\r\n\r\nfunction useCarousel() {\r\n const context = React.useContext(CarouselContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useCarousel must be used within a <Carousel />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\r\n ({orientation = \"horizontal\", opts, setApi, plugins, className, children, ...props}, ref) => {\r\n const [carouselRef, api] = useEmblaCarousel(\r\n {\r\n ...opts,\r\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\r\n },\r\n plugins,\r\n );\r\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\r\n const [canScrollNext, setCanScrollNext] = React.useState(false);\r\n\r\n const onSelect = React.useCallback((api: CarouselApi) => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n setCanScrollPrev(api.canScrollPrev());\r\n setCanScrollNext(api.canScrollNext());\r\n }, []);\r\n\r\n const scrollPrev = React.useCallback(() => {\r\n api?.scrollPrev();\r\n }, [api]);\r\n\r\n const scrollNext = React.useCallback(() => {\r\n api?.scrollNext();\r\n }, [api]);\r\n\r\n const handleKeyDown = React.useCallback(\r\n (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (event.key === \"ArrowLeft\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowRight\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n },\r\n [scrollPrev, scrollNext],\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!api || !setApi) {\r\n return;\r\n }\r\n\r\n setApi(api);\r\n }, [api, setApi]);\r\n\r\n React.useEffect(() => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n onSelect(api);\r\n api.on(\"reInit\", onSelect);\r\n api.on(\"select\", onSelect);\r\n\r\n return () => {\r\n api?.off(\"select\", onSelect);\r\n };\r\n }, [api, onSelect]);\r\n\r\n return (\r\n <CarouselContext.Provider\r\n value={{\r\n carouselRef,\r\n api: api,\r\n opts,\r\n orientation: orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\r\n scrollPrev,\r\n scrollNext,\r\n canScrollPrev,\r\n canScrollNext,\r\n }}>\r\n <div\r\n ref={ref}\r\n onKeyDownCapture={handleKeyDown}\r\n className={cn(\"relative\", className)}\r\n role='region'\r\n aria-roledescription='carousel'\r\n {...props}>\r\n {children}\r\n </div>\r\n </CarouselContext.Provider>\r\n );\r\n },\r\n);\r\nCarousel.displayName = \"Carousel\";\r\n\r\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {carouselRef, orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={carouselRef}\r\n className='overflow-hidden'>\r\n <div\r\n ref={ref}\r\n className={cn(\"flex\", orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\", className)}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCarouselContent.displayName = \"CarouselContent\";\r\n\r\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='group'\r\n aria-roledescription='slide'\r\n className={cn(\"min-w-0 shrink-0 grow-0 basis-full\", orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\", className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nCarouselItem.displayName = \"CarouselItem\";\r\n\r\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollPrev, canScrollPrev} = useCarousel();\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n \"absolute h-8 w-8 rounded-full\",\r\n orientation === \"horizontal\" ? \"top-1/2 -left-12 -translate-y-1/2\" : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\r\n className,\r\n )}\r\n disabled={!canScrollPrev}\r\n onClick={scrollPrev}\r\n {...props}>\r\n <ArrowLeft className='h-4 w-4' />\r\n <span className='sr-only'>Previous slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselPrevious.displayName = \"CarouselPrevious\";\r\n\r\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollNext, canScrollNext} = useCarousel();\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n \"absolute h-8 w-8 rounded-full\",\r\n orientation === \"horizontal\" ? \"top-1/2 -right-12 -translate-y-1/2\" : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\r\n className,\r\n )}\r\n disabled={!canScrollNext}\r\n onClick={scrollNext}\r\n {...props}>\r\n <ArrowRight className='h-4 w-4' />\r\n <span className='sr-only'>Next slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselNext.displayName = \"CarouselNext\";\r\n\r\nexport {Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi};\r\n"],"names":["CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","ref","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","scrollPrev","scrollNext","handleKeyDown","event","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;;;;AA8BA,MAAMA,kBAAkB,WAAlBA,GAAkBC,cAAiD;AAEzE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,WAAW,WAAXA,GAAWJ,WACf,CAAC,EAACK,cAAc,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IACnF,MAAM,CAACC,aAAaC,IAAI,GAAGC,qBACzB;QACE,GAAGT,IAAI;QACP,MAAMD,iBAAAA,cAA+B,MAAM;IAC7C,GACAG;IAEF,MAAM,CAACQ,eAAeC,iBAAiB,GAAGjB,SAAe;IACzD,MAAM,CAACkB,eAAeC,iBAAiB,GAAGnB,SAAe;IAEzD,MAAMoB,WAAWpB,YAAkB,CAACc;QAClC,IAAI,CAACA,KACH;QAGFG,iBAAiBH,IA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UAAU,CAACS;QACX,SAASI;QACR,GAAGX,KAAK;;0BACT,IAACuB,YAAUA;gBAAC,WAAU;;0BACtB,IAAC;gBAAK,WAAU;0BAAU;;;;AAGhC;AAEFD,aAAa,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\carousel.js","sources":["webpack://@arolariu/components/./src/components/ui/carousel.tsx"],"sourcesContent":["\r\n\r\nimport useEmblaCarousel, {type UseEmblaCarouselType} from \"embla-carousel-react\";\r\nimport {ArrowLeft, ArrowRight} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Button} from \"@/components/ui/button\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ntype CarouselApi = UseEmblaCarouselType[1];\r\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\r\ntype CarouselOptions = UseCarouselParameters[0];\r\ntype CarouselPlugin = UseCarouselParameters[1];\r\n\r\ntype CarouselProps = {\r\n opts?: CarouselOptions;\r\n plugins?: CarouselPlugin;\r\n orientation?: \"horizontal\" | \"vertical\";\r\n setApi?: (api: CarouselApi) => void;\r\n};\r\n\r\ntype CarouselContextProps = {\r\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\r\n api: ReturnType<typeof useEmblaCarousel>[1];\r\n scrollPrev: () => void;\r\n scrollNext: () => void;\r\n canScrollPrev: boolean;\r\n canScrollNext: boolean;\r\n} & CarouselProps;\r\n\r\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\r\n\r\nfunction useCarousel() {\r\n const context = React.useContext(CarouselContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useCarousel must be used within a <Carousel />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst Carousel = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & CarouselProps>(\r\n ({orientation = \"horizontal\", opts, setApi, plugins, className, children, ...props}, ref) => {\r\n const [carouselRef, api] = useEmblaCarousel(\r\n {\r\n ...opts,\r\n axis: orientation === \"horizontal\" ? \"x\" : \"y\",\r\n },\r\n plugins,\r\n );\r\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\r\n const [canScrollNext, setCanScrollNext] = React.useState(false);\r\n\r\n const onSelect = React.useCallback((api: CarouselApi) => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n setCanScrollPrev(api.canScrollPrev());\r\n setCanScrollNext(api.canScrollNext());\r\n }, []);\r\n\r\n const scrollPrev = React.useCallback(() => {\r\n api?.scrollPrev();\r\n }, [api]);\r\n\r\n const scrollNext = React.useCallback(() => {\r\n api?.scrollNext();\r\n }, [api]);\r\n\r\n const handleKeyDown = React.useCallback(\r\n (event: React.KeyboardEvent<HTMLDivElement>) => {\r\n if (event.key === \"ArrowLeft\") {\r\n event.preventDefault();\r\n scrollPrev();\r\n } else if (event.key === \"ArrowRight\") {\r\n event.preventDefault();\r\n scrollNext();\r\n }\r\n },\r\n [scrollPrev, scrollNext],\r\n );\r\n\r\n React.useEffect(() => {\r\n if (!api || !setApi) {\r\n return;\r\n }\r\n\r\n setApi(api);\r\n }, [api, setApi]);\r\n\r\n React.useEffect(() => {\r\n if (!api) {\r\n return;\r\n }\r\n\r\n onSelect(api);\r\n api.on(\"reInit\", onSelect);\r\n api.on(\"select\", onSelect);\r\n\r\n return () => {\r\n api?.off(\"select\", onSelect);\r\n };\r\n }, [api, onSelect]);\r\n\r\n return (\r\n <CarouselContext.Provider\r\n value={{\r\n carouselRef,\r\n api,\r\n opts,\r\n orientation: orientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\r\n scrollPrev,\r\n scrollNext,\r\n canScrollPrev,\r\n canScrollNext,\r\n }}>\r\n <div\r\n ref={ref}\r\n onKeyDownCapture={handleKeyDown}\r\n className={cn(\"relative\", className)}\r\n role='region'\r\n aria-roledescription='carousel'\r\n {...props}>\r\n {children}\r\n </div>\r\n </CarouselContext.Provider>\r\n );\r\n },\r\n);\r\nCarousel.displayName = \"Carousel\";\r\n\r\nconst CarouselContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {carouselRef, orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={carouselRef}\r\n className='overflow-hidden'>\r\n <div\r\n ref={ref}\r\n className={cn(\"flex\", orientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\", className)}\r\n {...props}\r\n />\r\n </div>\r\n );\r\n});\r\nCarouselContent.displayName = \"CarouselContent\";\r\n\r\nconst CarouselItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({className, ...props}, ref) => {\r\n const {orientation} = useCarousel();\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n role='group'\r\n aria-roledescription='slide'\r\n className={cn(\"min-w-0 shrink-0 grow-0 basis-full\", orientation === \"horizontal\" ? \"pl-4\" : \"pt-4\", className)}\r\n {...props}\r\n />\r\n );\r\n});\r\nCarouselItem.displayName = \"CarouselItem\";\r\n\r\nconst CarouselPrevious = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollPrev, canScrollPrev} = useCarousel();\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n \"absolute h-8 w-8 rounded-full\",\r\n orientation === \"horizontal\" ? \"top-1/2 -left-12 -translate-y-1/2\" : \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\r\n className,\r\n )}\r\n disabled={!canScrollPrev}\r\n onClick={scrollPrev}\r\n {...props}>\r\n <ArrowLeft className='h-4 w-4' />\r\n <span className='sr-only'>Previous slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselPrevious.displayName = \"CarouselPrevious\";\r\n\r\nconst CarouselNext = React.forwardRef<HTMLButtonElement, React.ComponentProps<typeof Button>>(\r\n ({className, variant = \"outline\", size = \"icon\", ...props}, ref) => {\r\n const {orientation, scrollNext, canScrollNext} = useCarousel();\r\n\r\n return (\r\n <Button\r\n ref={ref}\r\n variant={variant}\r\n size={size}\r\n className={cn(\r\n \"absolute h-8 w-8 rounded-full\",\r\n orientation === \"horizontal\" ? \"top-1/2 -right-12 -translate-y-1/2\" : \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\r\n className,\r\n )}\r\n disabled={!canScrollNext}\r\n onClick={scrollNext}\r\n {...props}>\r\n <ArrowRight className='h-4 w-4' />\r\n <span className='sr-only'>Next slide</span>\r\n </Button>\r\n );\r\n },\r\n);\r\nCarouselNext.displayName = \"CarouselNext\";\r\n\r\nexport {Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type CarouselApi};\r\n"],"names":["CarouselContext","React","useCarousel","context","Error","Carousel","orientation","opts","setApi","plugins","className","children","props","ref","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","scrollPrev","scrollNext","handleKeyDown","event","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","Button","ArrowLeft","CarouselNext","ArrowRight"],"mappings":";;;;;;;AA8BA,MAAMA,kBAAkB,WAAlBA,GAAkBC,cAAiD;AAEzE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,WAAW,WAAXA,GAAWJ,WACf,CAAC,EAACK,cAAc,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,OAAO,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC;IACnF,MAAM,CAACC,aAAaC,IAAI,GAAGC,qBACzB;QACE,GAAGT,IAAI;QACP,MAAMD,iBAAAA,cAA+B,MAAM;IAC7C,GACAG;IAEF,MAAM,CAACQ,eAAeC,iBAAiB,GAAGjB,SAAe;IACzD,MAAM,CAACkB,eAAeC,iBAAiB,GAAGnB,SAAe;IAEzD,MAAMoB,WAAWpB,YAAkB,CAACc;QAClC,I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AA+B,uCAAuC,kDACtEI;QAEF,UAAU,CAACS;QACX,SAASI;QACR,GAAGX,KAAK;;0BACT,IAACuB,YAAUA;gBAAC,WAAU;;0BACtB,IAAC;gBAAK,WAAU;0BAAU;;;;AAGhC;AAEFD,aAAa,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/components/ui/chart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chart.d.ts","sourceRoot":"","sources":["../../../src/components/ui/chart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,UAAU,CAAC;AAK9C,QAAA,MAAM,MAAM;;;CAAsC,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG;KACvB,CAAC,IAAI,MAAM,GAAG;QACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,GAAG,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG;QAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,OAAO,MAAM,EAAE,MAAM,CAAC,CAAA;KAAC,CAAC;CACpG,CAAC;AAkBF,QAAA,MAAM,cAAc;YAGR,WAAW;cACT,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,mBAAmB,CAAC,CAAC,UAAU,CAAC;gDAwB1F,CAAC;AAGH,QAAA,MAAM,UAAU,GAAI,gBAAc;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,4CA2BlE,CAAC;AAEF,QAAA,MAAM,YAAY,kCAA4B,CAAC;AAE/C,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;gBAIP,OAAO;oBACH,OAAO;gBACX,MAAM,GAAG,KAAK,GAAG,QAAQ;cAC3B,MAAM;eACL,MAAM;gDAqHtB,CAAC;AAGF,QAAA,MAAM,WAAW,iCAA2B,CAAC;AAE7C,QAAA,MAAM,kBAAkB;eAIP,OAAO;cACR,MAAM;gDAuCpB,CAAC;AAuBH,OAAO,EAAC,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\chart.js","sources":["webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["\r\n\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = {\r\n [k in string]: {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>});\r\n};\r\n\r\ntype ChartContextProps = {\r\n config: ChartConfig;\r\n};\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst ChartContainer = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\"> & {\r\n config: ChartConfig;\r\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\r\n }\r\n>(({id, className, children, config, ...props}, ref) => {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-chart={chartId}\r\n ref={ref}\r\n className={cn(\r\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n});\r\nChartContainer.displayName = \"Chart\";\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\")}\r\n}\r\n`,\r\n )\r\n .join(\"\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nconst ChartTooltipContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n }\r\n>(\r\n (\r\n {\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n },\r\n ref,\r\n ) => {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? config[label as keyof typeof config]?.label || label : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color || item.payload.fill || item.color;\r\n\r\n return (\r\n <div\r\n key={item.dataKey}\r\n className={cn(\r\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-neutral-500 dark:text-neutral-400'>{itemConfig?.label || item.name}</span>\r\n </div>\r\n {item.value && (\r\n <span className='font-mono font-medium text-neutral-950 tabular-nums dark:text-neutral-50'>\r\n {item.value.toLocaleString()}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nChartTooltipContent.displayName = \"ChartTooltip\";\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nconst ChartLegendContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\">\r\n & Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n }\r\n>(({className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey}, ref) => {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n});\r\nChartLegendContent.displayName = \"ChartLegend\";\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return undefined;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","ref","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAQA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAaxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,iBAAiB,WAAjBA,GAAiBJ,WAMrB,CAAC,EAACK,EAAE,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,OAAM,EAAEC;IAC9C,MAAMC,WAAWX;IACjB,MAAMY,UAAU,CAAC,MAAM,EAAEP,MAAMM,SAAS,OAAO,CAAC,MAAM,KAAK;IAE3D,OAAO,WAAP,GACE,IAACZ,aAAa,QAAQ;QAAC,OAAO;YAACS;QAAM;kBACnC,mBAAC;YACC,cAAYI;YACZ,KAAKF;YACL,WAAWG,GACT,ypBACAP;YAED,GAAGG,KAAK;;8BACT,IAACK,YAAAA;oBACC,IAAIF;oBACJ,QAAQJ;;8BAEV,IAACO,qBAAqC;8BAAER;;;;;AAIhD;AACAH,eAAe,WAAW,GAAG;AAE7B,MAAMU,aAAa,CAAC,EAACT,EAAE,EAAEG,MAAM,EAAoC;IACjE,MAAMQ,cAAcC,OAAO,OAAO,CAACT,QAAQ,MAAM,CAAC,CAAC,GAAGA,OAAO,GAAKA,OAAO,KAAK,IAAIA,OAAO,KAAK;IAE9F,IAAI,CAACQ,YAAY,MAAM,E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AQ,OAAO,GAAYA,QAAQ,OAAO,GAAGiB;IAE9G,IAAIM,iBAAyB7B;IAE7B,IAAIA,OAAOM,WAAW,mBAAOA,OAAO,CAACN,IAA4B,EAC/D6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IAAI4B,kBAAkB5B,OAAO4B,kBAAkB,mBAAOA,cAAc,CAAC5B,IAAmC,EAC7G6B,iBAAiBD,cAAc,CAAC5B,IAAmC;IAGrE,OAAO6B,kBAAkBzC,SAASA,MAAM,CAACyC,eAAe,GAAGzC,MAAM,CAACY,IAA2B;AAC/F"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\chart.js","sources":["webpack://@arolariu/components/./src/components/ui/chart.tsx"],"sourcesContent":["\r\n\r\n/* eslint-disable */\r\n\r\nimport * as React from \"react\";\r\nimport * as RechartsPrimitive from \"recharts\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\n// Format: { THEME_NAME: CSS_SELECTOR }\r\nconst THEMES = {light: \"\", dark: \".dark\"} as const;\r\n\r\nexport type ChartConfig = {\r\n [k in string]: {\r\n label?: React.ReactNode;\r\n icon?: React.ComponentType;\r\n } & ({color?: string; theme?: never} | {color?: never; theme: Record<keyof typeof THEMES, string>});\r\n};\r\n\r\ntype ChartContextProps = {\r\n config: ChartConfig;\r\n};\r\n\r\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\r\n\r\nfunction useChart() {\r\n const context = React.useContext(ChartContext);\r\n\r\n if (!context) {\r\n throw new Error(\"useChart must be used within a <ChartContainer />\");\r\n }\r\n\r\n return context;\r\n}\r\n\r\nconst ChartContainer = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\"> & {\r\n config: ChartConfig;\r\n children: React.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>[\"children\"];\r\n }\r\n>(({id, className, children, config, ...props}, ref) => {\r\n const uniqueId = React.useId();\r\n const chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\r\n\r\n return (\r\n <ChartContext.Provider value={{config}}>\r\n <div\r\n data-chart={chartId}\r\n ref={ref}\r\n className={cn(\r\n \"[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-sector]:outline-none [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-none\",\r\n className,\r\n )}\r\n {...props}>\r\n <ChartStyle\r\n id={chartId}\r\n config={config}\r\n />\r\n <RechartsPrimitive.ResponsiveContainer>{children}</RechartsPrimitive.ResponsiveContainer>\r\n </div>\r\n </ChartContext.Provider>\r\n );\r\n});\r\nChartContainer.displayName = \"Chart\";\r\n\r\nconst ChartStyle = ({id, config}: {id: string; config: ChartConfig}) => {\r\n const colorConfig = Object.entries(config).filter(([, config]) => config.theme || config.color);\r\n\r\n if (!colorConfig.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <style\r\n dangerouslySetInnerHTML={{\r\n __html: Object.entries(THEMES)\r\n .map(\r\n ([theme, prefix]) => `\r\n${prefix} [data-chart=${id}] {\r\n${colorConfig\r\n .map(([key, itemConfig]) => {\r\n const color = itemConfig.theme?.[theme as keyof typeof itemConfig.theme] || itemConfig.color;\r\n return color ? ` --color-${key}: ${color};` : null;\r\n })\r\n .join(\"\")}\r\n}\r\n`,\r\n )\r\n .join(\"\"),\r\n }}\r\n />\r\n );\r\n};\r\n\r\nconst ChartTooltip = RechartsPrimitive.Tooltip;\r\n\r\nconst ChartTooltipContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<typeof RechartsPrimitive.Tooltip>\r\n & React.ComponentProps<\"div\"> & {\r\n hideLabel?: boolean;\r\n hideIndicator?: boolean;\r\n indicator?: \"line\" | \"dot\" | \"dashed\";\r\n nameKey?: string;\r\n labelKey?: string;\r\n }\r\n>(\r\n (\r\n {\r\n active,\r\n payload,\r\n className,\r\n indicator = \"dot\",\r\n hideLabel = false,\r\n hideIndicator = false,\r\n label,\r\n labelFormatter,\r\n labelClassName,\r\n formatter,\r\n color,\r\n nameKey,\r\n labelKey,\r\n },\r\n ref,\r\n ) => {\r\n const {config} = useChart();\r\n\r\n const tooltipLabel = React.useMemo(() => {\r\n if (hideLabel || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const [item] = payload;\r\n const key = `${labelKey || item?.dataKey || item?.name || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const value = !labelKey && typeof label === \"string\" ? config[label as keyof typeof config]?.label || label : itemConfig?.label;\r\n\r\n if (labelFormatter) {\r\n return <div className={cn(\"font-medium\", labelClassName)}>{labelFormatter(value, payload)}</div>;\r\n }\r\n\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n return <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\r\n }, [label, labelFormatter, payload, hideLabel, labelClassName, config, labelKey]);\r\n\r\n if (!active || !payload?.length) {\r\n return null;\r\n }\r\n\r\n const nestLabel = payload.length === 1 && indicator !== \"dot\";\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\r\n className,\r\n )}>\r\n {!nestLabel ? tooltipLabel : null}\r\n <div className='grid gap-1.5'>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item, index) => {\r\n const key = `${nameKey || item.name || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n const indicatorColor = color || item.payload.fill || item.color;\r\n\r\n return (\r\n <div\r\n key={item.dataKey}\r\n className={cn(\r\n \"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\r\n indicator === \"dot\" && \"items-center\",\r\n )}>\r\n {formatter && item?.value !== undefined && item.name ? (\r\n formatter(item.value, item.name, item, index, item.payload)\r\n ) : (\r\n <>\r\n {itemConfig?.icon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n !hideIndicator && (\r\n <div\r\n className={cn(\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\", {\r\n \"h-2.5 w-2.5\": indicator === \"dot\",\r\n \"w-1\": indicator === \"line\",\r\n \"w-0 border-[1.5px] border-dashed bg-transparent\": indicator === \"dashed\",\r\n \"my-0.5\": nestLabel && indicator === \"dashed\",\r\n })}\r\n style={\r\n {\r\n \"--color-bg\": indicatorColor,\r\n \"--color-border\": indicatorColor,\r\n } as React.CSSProperties\r\n }\r\n />\r\n )\r\n )}\r\n <div className={cn(\"flex flex-1 justify-between leading-none\", nestLabel ? \"items-end\" : \"items-center\")}>\r\n <div className='grid gap-1.5'>\r\n {nestLabel ? tooltipLabel : null}\r\n <span className='text-neutral-500 dark:text-neutral-400'>{itemConfig?.label || item.name}</span>\r\n </div>\r\n {item.value && (\r\n <span className='font-mono font-medium text-neutral-950 tabular-nums dark:text-neutral-50'>\r\n {item.value.toLocaleString()}\r\n </span>\r\n )}\r\n </div>\r\n </>\r\n )}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n </div>\r\n );\r\n },\r\n);\r\nChartTooltipContent.displayName = \"ChartTooltip\";\r\n\r\nconst ChartLegend = RechartsPrimitive.Legend;\r\n\r\nconst ChartLegendContent = React.forwardRef<\r\n HTMLDivElement,\r\n React.ComponentProps<\"div\">\r\n & Pick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\r\n hideIcon?: boolean;\r\n nameKey?: string;\r\n }\r\n>(({className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey}, ref) => {\r\n const {config} = useChart();\r\n\r\n if (!payload?.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\"flex items-center justify-center gap-4\", verticalAlign === \"top\" ? \"pb-3\" : \"pt-3\", className)}>\r\n {payload\r\n .filter((item) => item.type !== \"none\")\r\n .map((item) => {\r\n const key = `${nameKey || item.dataKey || \"value\"}`;\r\n const itemConfig = getPayloadConfigFromPayload(config, item, key);\r\n\r\n return (\r\n <div\r\n key={item.value}\r\n className={cn(\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\")}>\r\n {itemConfig?.icon && !hideIcon ? (\r\n <itemConfig.icon />\r\n ) : (\r\n <div\r\n className='h-2 w-2 shrink-0 rounded-[2px]'\r\n style={{\r\n backgroundColor: item.color,\r\n }}\r\n />\r\n )}\r\n {itemConfig?.label}\r\n </div>\r\n );\r\n })}\r\n </div>\r\n );\r\n});\r\nChartLegendContent.displayName = \"ChartLegend\";\r\n\r\n// Helper to extract item config from a payload.\r\nfunction getPayloadConfigFromPayload(config: ChartConfig, payload: unknown, key: string) {\r\n if (typeof payload !== \"object\" || payload === null) {\r\n return;\r\n }\r\n\r\n const payloadPayload =\r\n \"payload\" in payload && typeof payload.payload === \"object\" && payload.payload !== null ? payload.payload : undefined;\r\n\r\n let configLabelKey: string = key;\r\n\r\n if (key in payload && typeof payload[key as keyof typeof payload] === \"string\") {\r\n configLabelKey = payload[key as keyof typeof payload] as string;\r\n } else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key as keyof typeof payloadPayload] === \"string\") {\r\n configLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\r\n }\r\n\r\n return configLabelKey in config ? config[configLabelKey] : config[key as keyof typeof config];\r\n}\r\n\r\nexport {ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent};\r\n"],"names":["THEMES","ChartContext","React","useChart","context","Error","ChartContainer","id","className","children","config","props","ref","uniqueId","chartId","cn","ChartStyle","RechartsPrimitive","colorConfig","Object","theme","prefix","key","itemConfig","color","ChartTooltip","ChartTooltipContent","active","payload","indicator","hideLabel","hideIndicator","label","labelFormatter","labelClassName","formatter","nameKey","labelKey","tooltipLabel","item","getPayloadConfigFromPayload","value","nestLabel","index","indicatorColor","undefined","ChartLegend","ChartLegendContent","hideIcon","verticalAlign","payloadPayload","configLabelKey"],"mappings":";;;;;AAUA,MAAMA,SAAS;IAAC,OAAO;IAAI,MAAM;AAAO;AAaxC,MAAMC,eAAe,WAAfA,GAAeC,cAA8C;AAEnE,SAASC;IACP,MAAMC,UAAUF,WAAiBD;IAEjC,IAAI,CAACG,SACH,MAAM,IAAIC,MAAM;IAGlB,OAAOD;AACT;AAEA,MAAME,iBAAiB,WAAjBA,GAAiBJ,WAMrB,CAAC,EAACK,EAAE,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,OAAM,EAAEC;IAC9C,MAAMC,WAAWX;IACjB,MAAMY,UAAU,CAAC,MAAM,EAAEP,MAAMM,SAAS,OAAO,CAAC,MAAM,KAAK;IAE3D,OAAO,WAAP,GACE,IAACZ,aAAa,QAAQ;QAAC,OAAO;YAACS;QAAM;kBACnC,mBAAC;YACC,cAAYI;YACZ,KAAKF;YACL,WAAWG,GACT,ypBACAP;YAED,GAAGG,KAAK;;8BACT,IAACK,YAAAA;oBACC,IAAIF;oBACJ,QAAQJ;;8BAEV,IAACO,qBAAqC;8BAAER;;;;;AAIhD;AACAH,eAAe,WAAW,GAAG;AAE7B,MAAMU,aAAa,CAAC,EAACT,EAAE,EAAEG,MAAM,EAAoC;IACjE,MAAMQ,cAAcC,OAAO,OAAO,CAACT,QAAQ,MAAM,CAAC,CAAC,GAAGA,OAAO,GAAKA,OAAO,KAAK,IAAIA,OAAO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,mBAAOA,QAAQ,OAAO,IAAiBA,SAAAA,QAAQ,OAAO,GAAYA,QAAQ,OAAO,GAAGiB;IAE9G,IAAIM,iBAAyB7B;IAE7B,IAAIA,OAAOM,WAAW,mBAAOA,OAAO,CAACN,IAA4B,EAC/D6B,iBAAiBvB,OAAO,CAACN,IAA4B;SAChD,IAAI4B,kBAAkB5B,OAAO4B,kBAAkB,mBAAOA,cAAc,CAAC5B,IAAmC,EAC7G6B,iBAAiBD,cAAc,CAAC5B,IAAmC;IAGrE,OAAO6B,kBAAkBzC,SAASA,MAAM,CAACyC,eAAe,GAAGzC,MAAM,CAACY,IAA2B;AAC/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\checkbox.js","sources":["webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["\r\n\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport {Check} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.
|
|
1
|
+
{"version":3,"file":"components\\ui\\checkbox.js","sources":["webpack://@arolariu/components/./src/components/ui/checkbox.tsx"],"sourcesContent":["\r\n\r\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\r\nimport {Check} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Checkbox = React.forwardRef<\r\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\r\n>(({className, ...props}, ref) => (\r\n <CheckboxPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 shadow focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-50 dark:border-neutral-800 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\r\n className,\r\n )}\r\n {...props}>\r\n <CheckboxPrimitive.Indicator className={cn(\"flex items-center justify-center text-current\")}>\r\n <Check className='h-4 w-4' />\r\n </CheckboxPrimitive.Indicator>\r\n </CheckboxPrimitive.Root>\r\n));\r\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\r\n\r\nexport {Checkbox};\r\n"],"names":["Checkbox","React","className","props","ref","CheckboxPrimitive","cn","Check"],"mappings":";;;;;;AAQA,MAAMA,WAAW,WAAXA,GAAWC,WAGf,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,MAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,scACAJ;QAED,GAAGC,KAAK;kBACT,kBAACE,WAA2B;YAAC,WAAWC,GAAG;sBACzC,kBAACC,OAAKA;gBAAC,WAAU;;;;AAIvBP,SAAS,WAAW,GAAGK,KAAAA,WAAkC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
2
2
|
declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
-
declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>, CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
4
|
export { Collapsible, CollapsibleContent, CollapsibleTrigger };
|
|
6
5
|
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,QAAA,MAAM,WAAW,kIAA4B,CAAC;AAE9C,QAAA,
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,QAAA,MAAM,WAAW,kIAA4B,CAAC;AAE9C,QAAA,MAAO,kBAAkB,8IAAE,kBAAkB,yIAAwB,CAAC;AAEtE,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAC,CAAC"}
|
|
@@ -1,8 +1,36 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CollapsibleContent, CollapsibleTrigger, Root } from "@radix-ui/react-collapsible";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var react_collapsible_namespaceObject = {};
|
|
26
|
+
__webpack_require__.r(react_collapsible_namespaceObject);
|
|
27
|
+
__webpack_require__.d(react_collapsible_namespaceObject, {
|
|
28
|
+
CollapsibleContent: ()=>CollapsibleContent,
|
|
29
|
+
CollapsibleTrigger: ()=>CollapsibleTrigger,
|
|
30
|
+
Root: ()=>Root
|
|
31
|
+
});
|
|
3
32
|
const Collapsible = Root;
|
|
4
|
-
const collapsible_CollapsibleTrigger =
|
|
5
|
-
const collapsible_CollapsibleContent = CollapsibleContent;
|
|
33
|
+
const { CollapsibleTrigger: collapsible_CollapsibleTrigger, CollapsibleContent: collapsible_CollapsibleContent } = react_collapsible_namespaceObject;
|
|
6
34
|
export { Collapsible, collapsible_CollapsibleContent as CollapsibleContent, collapsible_CollapsibleTrigger as CollapsibleTrigger };
|
|
7
35
|
|
|
8
36
|
//# sourceMappingURL=collapsible.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\collapsible.js","sources":["webpack://@arolariu/components/./src/components/ui/collapsible.tsx"],"sourcesContent":["\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root;\r\n\r\nconst CollapsibleTrigger
|
|
1
|
+
{"version":3,"file":"components\\ui\\collapsible.js","sources":["webpack://@arolariu/components/webpack/runtime/define_property_getters","webpack://@arolariu/components/webpack/runtime/has_own_property","webpack://@arolariu/components/webpack/runtime/make_namespace_object","webpack://@arolariu/components/./src/components/ui/collapsible.tsx"],"sourcesContent":["__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n }\n }\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\r\n\r\nimport * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\r\n\r\nconst Collapsible = CollapsiblePrimitive.Root;\r\n\r\nconst {CollapsibleTrigger, CollapsibleContent} = CollapsiblePrimitive;\r\n\r\nexport {Collapsible, CollapsibleContent, CollapsibleTrigger};\r\n"],"names":["__webpack_require__","exports","definition","key","Object","obj","prop","Symbol","Collapsible","CollapsiblePrimitive","CollapsibleTrigger","CollapsibleContent"],"mappings":";;;;IAAAA,oBAAoB,CAAC,GAAG,CAACC,SAASC;QACjC,IAAI,IAAIC,OAAOD,WACR,IAAGF,oBAAoB,CAAC,CAACE,YAAYC,QAAQ,CAACH,oBAAoB,CAAC,CAACC,SAASE,MACzEC,OAAO,cAAc,CAACH,SAASE,KAAK;YAAE,YAAY;YAAM,KAAKD,UAAU,CAACC,IAAI;QAAC;IAGzF;;;ICNAH,oBAAoB,CAAC,GAAG,CAACK,KAAKC,OAAUF,OAAO,SAAS,CAAC,cAAc,CAAC,IAAI,CAACC,KAAKC;;;ICClFN,oBAAoB,CAAC,GAAG,CAACC;QACxB,IAAG,sBAAOM,UAA0BA,OAAO,WAAW,EACrDH,OAAO,cAAc,CAACH,SAASM,OAAO,WAAW,EAAE;YAAE,OAAO;QAAS;QAEtEH,OAAO,cAAc,CAACH,SAAS,cAAc;YAAE,OAAO;QAAK;IAC5D;;;;;;;;;ACFA,MAAMO,cAAcC;AAEpB,MAAM,EAACC,oBAAkB,gCAAEC,oBAAkB,gCAAC,GAAGF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;sFAWZ,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,wBAAsB,WAAW,4CAUvD,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../src/components/ui/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;sFAWZ,CAAC;AAGF,QAAA,MAAM,aAAa,GAAI,wBAAsB,WAAW,4CAUvD,CAAC;AAEF,QAAA,MAAM,YAAY;;;;;;;0FAkBhB,CAAC;AAIH,QAAA,MAAM,WAAW;;;;;;;;sFASf,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;uJAShB,CAAC;AAIH,QAAA,MAAM,YAAY;;;;;;;;;;sFAYhB,CAAC;AAIH,QAAA,MAAM,gBAAgB;;;;;;sFASpB,CAAC;AAGH,QAAA,MAAM,WAAW;;;;;;;;;;;;sFAYf,CAAC;AAIH,QAAA,MAAM,eAAe;8BAA2B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAOpF,CAAC;AAGF,OAAO,EAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\command.js","sources":["webpack://@arolariu/components/./src/components/ui/command.tsx"],"sourcesContent":["\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.
|
|
1
|
+
{"version":3,"file":"components\\ui\\command.js","sources":["webpack://@arolariu/components/./src/components/ui/command.tsx"],"sourcesContent":["\r\n\r\nimport type {DialogProps} from \"@radix-ui/react-dialog\";\r\nimport {Command as CommandPrimitive} from \"cmdk\";\r\nimport {Search} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {Dialog, DialogContent} from \"@/components/ui/dialog\";\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Command = React.forwardRef<React.ComponentRef<typeof CommandPrimitive>, React.ComponentPropsWithoutRef<typeof CommandPrimitive>>(\r\n ({className, ...props}, ref) => (\r\n <CommandPrimitive\r\n ref={ref}\r\n className={cn(\r\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n ),\r\n);\r\nCommand.displayName = CommandPrimitive.displayName;\r\n\r\nconst CommandDialog = ({children, ...props}: DialogProps) => {\r\n return (\r\n <Dialog {...props}>\r\n <DialogContent className='overflow-hidden p-0'>\r\n <Command className='[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400 [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\r\n {children}\r\n </Command>\r\n </DialogContent>\r\n </Dialog>\r\n );\r\n};\r\n\r\nconst CommandInput = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Input>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\r\n>(({className, ...props}, ref) => (\r\n <div\r\n className='flex items-center border-b px-3'\r\n // eslint-disable-next-line react/no-unknown-property -- cmdk specific attribute\r\n cmdk-input-wrapper=''>\r\n <Search className='mr-2 h-4 w-4 shrink-0 opacity-50' />\r\n <CommandPrimitive.Input\r\n ref={ref}\r\n className={cn(\r\n \"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </div>\r\n));\r\n\r\nCommandInput.displayName = CommandPrimitive.Input.displayName;\r\n\r\nconst CommandList = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.List>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.List\r\n ref={ref}\r\n className={cn(\"max-h-[300px] overflow-x-hidden overflow-y-auto\", className)}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandList.displayName = CommandPrimitive.List.displayName;\r\n\r\nconst CommandEmpty = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Empty>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\r\n>((props, ref) => (\r\n <CommandPrimitive.Empty\r\n ref={ref}\r\n className='py-6 text-center text-sm'\r\n {...props}\r\n />\r\n));\r\n\r\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\r\n\r\nconst CommandGroup = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Group>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Group\r\n ref={ref}\r\n className={cn(\r\n \"overflow-hidden p-1 text-neutral-950 dark:text-neutral-50 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\r\n\r\nconst CommandSeparator = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\r\n\r\nconst CommandItem = React.forwardRef<\r\n React.ComponentRef<typeof CommandPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\r\n>(({className, ...props}, ref) => (\r\n <CommandPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-neutral-100 data-[selected=true]:text-neutral-900 dark:data-[selected=true]:bg-neutral-800 dark:data-[selected=true]:text-neutral-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\n\r\nCommandItem.displayName = CommandPrimitive.Item.displayName;\r\n\r\nconst CommandShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nCommandShortcut.displayName = \"CommandShortcut\";\r\n\r\nexport {Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut};\r\n"],"names":["Command","React","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;;;AAUA,MAAMA,kBAAU,WAAHA,GAAGC,WACd,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACtB,IAACC,SAAgBA;QACf,KAAKD;QACL,WAAWE,GACT,6HACAJ;QAED,GAAGC,KAAK;;AAIfH,gBAAQ,WAAW,GAAGK,QAAAA,WAA4B;AAElD,MAAME,gBAAgB,CAAC,EAACC,QAAQ,EAAE,GAAGL,OAAmB,GAC/C,WAAP,GACE,IAACM,QAAMA;QAAE,GAAGN,KAAK;kBACf,kBAACO,eAAaA;YAAC,WAAU;sBACvB,kBAACV,iBAAOA;gBAAC,WAAU;0BAChBQ;;;;AAOX,MAAMG,eAAe,WAAfA,GAAeV,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,KAAC;QACC,WAAU;QAEV,sBAAmB;;0BACnB,IAACQ,QAAMA;gBAAC,WAAU;;0BAClB,IAACP,QAAAA,KAAsB;gBACrB,KAAKD;gBACL,WAAWE,GACT,uLACAJ;gBAED,GAAGC,KAAK;;;;AAKfQ,aAAa,WAAW,GAAGN,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMQ,cAAc,WAAdA,GAAcZ,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GAAG,mDAAmDJ;QAChE,GAAGC,KAAK;;AAIbU,YAAY,WAAW,GAAGR,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMS,eAAe,WAAfA,GAAeb,WAGnB,CAACE,OAAOC,MAAAA,WAAAA,GACR,IAACC,QAAAA,KAAsB;QACrB,KAAKD;QACL,WAAU;QACT,GAAGD,KAAK;;AAIbW,aAAa,WAAW,GAAGT,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMU,eAAe,WAAfA,GAAed,WAGnB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,KAAsB;QACrB,KAAKD;QACL,WAAWE,GACT,0RACAJ;QAED,GAAGC,KAAK;;AAIbY,aAAa,WAAW,GAAGV,QAAAA,KAAAA,CAAAA,WAAkC;AAE7D,MAAMW,mBAAmB,WAAnBA,GAAmBf,WAGvB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,SAA0B;QACzB,KAAKD;QACL,WAAWE,GAAG,iDAAiDJ;QAC9D,GAAGC,KAAK;;AAGba,iBAAiB,WAAW,GAAGX,QAAAA,SAAAA,CAAAA,WAAsC;AAErE,MAAMY,cAAc,WAAdA,GAAchB,WAGlB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACC,QAAAA,IAAqB;QACpB,KAAKD;QACL,WAAWE,GACT,6YACAJ;QAED,GAAGC,KAAK;;AAIbc,YAAY,WAAW,GAAGZ,QAAAA,IAAAA,CAAAA,WAAiC;AAE3D,MAAMa,kBAAkB,CAAC,EAAChB,SAAS,EAAE,GAAGC,OAA6C,GAC5E,WAAP,GACE,IAAC;QACC,WAAWG,GAAG,0EAA0EJ;QACvF,GAAGC,KAAK;;AAIfe,gBAAgB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\context-menu.js","sources":["webpack://@arolariu/components/./src/components/ui/context-menu.tsx"],"sourcesContent":["\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ElementRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,MAAME,mBAAmBF;AAEzB,MAAMG,oBAAoBH;AAE1B,MAAMI,iBAAiBJ;AAEvB,MAAMK,wBAAwBL;AAE9B,MAAMM,wBAAwB,WAAxBA,GAAwBC,WAK5B,CAAC,EAACC,SAAS,EAAEC,KAAK,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACzC,KAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,8UACAJ,SAAS,QACTD;QAED,GAAGG,KAAK;;YACRD;0BACD,IAACI,cAAYA;gBAAC,WAAU;;;;AAG5BR,sBAAsB,WAAW,GAAGN,WAAAA,WAA2C;AAE/E,MAAMe,wBAAwB,WAAxBA,GAAwBR,WAG5B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,YAA+B;QAC9B,KAAKY;QACL,WAAWC,GACT,2jBACAL;QAED,GAAGG,KAAK;;AAGbI,sBAAsB,WAAW,GAAGf,WAAAA,WAA2C;AAE/E,MAAMgB,qBAAqB,WAArBA,GAAqBT,WAGzB,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA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,WAAAA,GAC/B,IAACZ,OAA0B;QACzB,KAAKY;QACL,WAAWC,GAAG,2EAA2EJ,SAAS,QAAQD;QACzG,GAAGG,KAAK;;AAGbY,iBAAiB,WAAW,GAAGvB,MAAAA,WAAsC;AAErE,MAAMwB,uBAAuB,WAAvBA,GAAuBjB,WAG3B,CAAC,EAACC,SAAS,EAAE,GAAGG,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACZ,WAA8B;QAC7B,KAAKY;QACL,WAAWC,GAAG,sDAAsDL;QACnE,GAAGG,KAAK;;AAGba,qBAAqB,WAAW,GAAGxB,UAAAA,WAA0C;AAE7E,MAAMyB,sBAAsB,CAAC,EAACjB,SAAS,EAAE,GAAGG,OAA6C,GAChF,WAAP,GACE,IAAC;QACC,WAAWE,GAAG,0EAA0EL;QACvF,GAAGG,KAAK;;AAIfc,oBAAoB,WAAW,GAAG"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\context-menu.js","sources":["webpack://@arolariu/components/./src/components/ui/context-menu.tsx"],"sourcesContent":["\r\n\r\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\r\nimport {Check, ChevronRight, Circle} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst ContextMenu = ContextMenuPrimitive.Root;\r\n\r\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\r\n\r\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\r\n\r\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\r\n\r\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\r\n\r\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\r\n\r\nconst ContextMenuSubTrigger = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <ChevronRight className='ml-auto h-4 w-4' />\r\n </ContextMenuPrimitive.SubTrigger>\r\n));\r\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\r\n\r\nconst ContextMenuSubContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\r\n\r\nconst ContextMenuContent = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Portal>\r\n <ContextMenuPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-[--radix-context-menu-content-available-height] min-w-[8rem] origin-[--radix-context-menu-content-transform-origin] overflow-x-hidden overflow-y-auto rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ContextMenuPrimitive.Portal>\r\n));\r\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\r\n\r\nconst ContextMenuItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n inset && \"pl-8\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\r\n\r\nconst ContextMenuCheckboxItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\r\n>(({className, children, checked, ...props}, ref) => (\r\n <ContextMenuPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n checked={checked}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Check className='h-4 w-4' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.CheckboxItem>\r\n));\r\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\r\n\r\nconst ContextMenuRadioItem = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\r\n>(({className, children, ...props}, ref) => (\r\n <ContextMenuPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}>\r\n <span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>\r\n <ContextMenuPrimitive.ItemIndicator>\r\n <Circle className='h-4 w-4 fill-current' />\r\n </ContextMenuPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </ContextMenuPrimitive.RadioItem>\r\n));\r\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\r\n\r\nconst ContextMenuLabel = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\r\n inset?: boolean;\r\n }\r\n>(({className, inset, ...props}, ref) => (\r\n <ContextMenuPrimitive.Label\r\n ref={ref}\r\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\", inset && \"pl-8\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\r\n\r\nconst ContextMenuSeparator = React.forwardRef<\r\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\r\n>(({className, ...props}, ref) => (\r\n <ContextMenuPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\r\n {...props}\r\n />\r\n));\r\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\r\n\r\nconst ContextMenuShortcut = ({className, ...props}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n );\r\n};\r\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\r\n\r\nexport {\r\n ContextMenu,\r\n ContextMenuCheckboxItem,\r\n ContextMenuContent,\r\n ContextMenuGroup,\r\n ContextMenuItem,\r\n ContextMenuLabel,\r\n ContextMenuPortal,\r\n ContextMenuRadioGroup,\r\n ContextMenuRadioItem,\r\n ContextMenuSeparator,\r\n ContextMenuShortcut,\r\n ContextMenuSub,\r\n ContextMenuSubContent,\r\n ContextMenuSubTrigger,\r\n ContextMenuTrigger,\r\n};\r\n"],"names":["ContextMenu","ContextMenuPrimitive","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","React","className","inset","children","props","ref","cn","ChevronRight","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","Check","ContextMenuRadioItem","Circle","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"mappings":";;;;;;AAQA,MAAMA,cAAcC;AAEpB,MAAMC,qBAAqBD;AAE3B,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AAGG,KAAK;;AAIfc,oBAAoB,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\dialog.js","sources":["webpack://@arolariu/components/./src/components/ui/dialog.tsx"],"sourcesContent":["\r\n\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.
|
|
1
|
+
{"version":3,"file":"components\\ui\\dialog.js","sources":["webpack://@arolariu/components/./src/components/ui/dialog.tsx"],"sourcesContent":["\r\n\r\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\r\nimport {X} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nconst Dialog = DialogPrimitive.Root;\r\n\r\nconst DialogTrigger = DialogPrimitive.Trigger;\r\n\r\nconst DialogPortal = DialogPrimitive.Portal;\r\n\r\nconst DialogClose = DialogPrimitive.Close;\r\n\r\nconst DialogOverlay = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Overlay\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n));\r\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\r\n\r\nconst DialogContent = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\r\n>(({className, children, ...props}, ref) => (\r\n <DialogPortal>\r\n <DialogOverlay />\r\n <DialogPrimitive.Content\r\n ref={ref}\r\n className={cn(\r\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\r\n className,\r\n )}\r\n {...props}>\r\n {children}\r\n <DialogPrimitive.Close className='absolute top-4 right-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400'>\r\n <X className='h-4 w-4' />\r\n <span className='sr-only'>Close</span>\r\n </DialogPrimitive.Close>\r\n </DialogPrimitive.Content>\r\n </DialogPortal>\r\n));\r\nDialogContent.displayName = DialogPrimitive.Content.displayName;\r\n\r\nconst DialogHeader = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogHeader.displayName = \"DialogHeader\";\r\n\r\nconst DialogFooter = ({className, ...props}: React.HTMLAttributes<HTMLDivElement>) => (\r\n <div\r\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\r\n {...props}\r\n />\r\n);\r\nDialogFooter.displayName = \"DialogFooter\";\r\n\r\nconst DialogTitle = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Title>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Title\r\n ref={ref}\r\n className={cn(\"text-lg leading-none font-semibold tracking-tight\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\r\n\r\nconst DialogDescription = React.forwardRef<\r\n React.ComponentRef<typeof DialogPrimitive.Description>,\r\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\r\n>(({className, ...props}, ref) => (\r\n <DialogPrimitive.Description\r\n ref={ref}\r\n className={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\r\n {...props}\r\n />\r\n));\r\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\r\n\r\nexport {\r\n Dialog,\r\n DialogClose,\r\n DialogContent,\r\n DialogDescription,\r\n DialogFooter,\r\n DialogHeader,\r\n DialogOverlay,\r\n DialogPortal,\r\n DialogTitle,\r\n DialogTrigger,\r\n};\r\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","React","className","props","ref","cn","DialogContent","children","X","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;;;AAQA,MAAMA,SAASC;AAEf,MAAMC,gBAAgBD;AAEtB,MAAME,eAAeF;AAErB,MAAMG,cAAcH;AAEpB,MAAMI,gBAAgB,WAAhBA,GAAgBC,WAGpB,CAAC,EAACC,SAAS,EAAE,GAAGC,OAAM,EAAEC,MAAAA,WAAAA,GACxB,IAACR,SAAuB;QACtB,KAAKQ;QACL,WAAWC,GACT,0JACAH;QAED,GAAGC,KAAK;;AAGbH,cAAc,WAAW,GAAGJ,QAAAA,WAAmC;AAE/D,MAAMU,gBAAgB,WAAhBA,GAAgBL,WAGpB,CAAC,EAACC,SAAS,EAAEK,QAAQ,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