@arolariu/components 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DEBUGGING.md +396 -396
- package/LICENSE.md +21 -21
- package/changelog.md +109 -118
- package/dist/components/ui/accordion.d.ts +2 -2
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion.js +4 -4
- package/dist/components/ui/accordion.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +13 -13
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +4 -4
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +5 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +3 -3
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/aspect-ratio.d.ts +1 -1
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/aspect-ratio.js +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +2 -2
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +3 -3
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/background-beams.d.ts.map +1 -1
- package/dist/components/ui/background-beams.js +6 -6
- package/dist/components/ui/background-beams.js.map +1 -1
- package/dist/components/ui/badge.d.ts +4 -4
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +2 -2
- package/dist/components/ui/badge.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +6 -6
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +5 -5
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/bubble-background.d.ts +1 -1
- package/dist/components/ui/bubble-background.d.ts.map +1 -1
- package/dist/components/ui/bubble-background.js +13 -13
- package/dist/components/ui/bubble-background.js.map +1 -1
- package/dist/components/ui/button.d.ts +5 -5
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +2 -2
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/calendar.js +4 -4
- package/dist/components/ui/calendar.js.map +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +3 -3
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/carousel.d.ts +2 -2
- package/dist/components/ui/carousel.d.ts.map +1 -1
- package/dist/components/ui/carousel.js +3 -3
- package/dist/components/ui/carousel.js.map +1 -1
- package/dist/components/ui/chart.d.ts +4 -4
- package/dist/components/ui/chart.d.ts.map +1 -1
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chart.js.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox.js +3 -3
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/collapsible.d.ts +2 -2
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible.js +1 -1
- package/dist/components/ui/collapsible.js.map +1 -1
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +9 -9
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -2
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +11 -11
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/counting-number.d.ts +1 -1
- package/dist/components/ui/counting-number.d.ts.map +1 -1
- package/dist/components/ui/counting-number.js +4 -3
- package/dist/components/ui/counting-number.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +6 -6
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dot-background.d.ts +10 -17
- package/dist/components/ui/dot-background.d.ts.map +1 -1
- package/dist/components/ui/dot-background.js +2 -2
- package/dist/components/ui/dot-background.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +10 -10
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/dropdrawer.d.ts +2 -2
- package/dist/components/ui/dropdrawer.d.ts.map +1 -1
- package/dist/components/ui/dropdrawer.js +12 -12
- package/dist/components/ui/dropdrawer.js.map +1 -1
- package/dist/components/ui/fireworks-background.d.ts.map +1 -1
- package/dist/components/ui/fireworks-background.js +1 -1
- package/dist/components/ui/fireworks-background.js.map +1 -1
- package/dist/components/ui/flip-button.d.ts +1 -1
- package/dist/components/ui/flip-button.d.ts.map +1 -1
- package/dist/components/ui/flip-button.js +3 -3
- package/dist/components/ui/flip-button.js.map +1 -1
- package/dist/components/ui/form.d.ts +3 -3
- package/dist/components/ui/form.d.ts.map +1 -1
- package/dist/components/ui/form.js +4 -4
- package/dist/components/ui/form.js.map +1 -1
- package/dist/components/ui/gradient-background.d.ts +1 -1
- package/dist/components/ui/gradient-background.d.ts.map +1 -1
- package/dist/components/ui/gradient-background.js +2 -2
- package/dist/components/ui/gradient-background.js.map +1 -1
- package/dist/components/ui/gradient-text.d.ts +1 -1
- package/dist/components/ui/gradient-text.d.ts.map +1 -1
- package/dist/components/ui/gradient-text.js +5 -5
- package/dist/components/ui/gradient-text.js.map +1 -1
- package/dist/components/ui/highlight-text.d.ts +1 -1
- package/dist/components/ui/highlight-text.d.ts.map +1 -1
- package/dist/components/ui/highlight-text.js +3 -3
- package/dist/components/ui/highlight-text.js.map +1 -1
- package/dist/components/ui/hole-background.d.ts.map +1 -1
- package/dist/components/ui/hole-background.js +11 -10
- package/dist/components/ui/hole-background.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +2 -2
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/hover-card.js +3 -3
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +2 -2
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js +5 -5
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +2 -2
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +2 -2
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +12 -12
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/navigation-menu.d.ts +3 -3
- package/dist/components/ui/navigation-menu.d.ts.map +1 -1
- package/dist/components/ui/navigation-menu.js +6 -7
- package/dist/components/ui/navigation-menu.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +2 -2
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +8 -4
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +2 -2
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +3 -3
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js +4 -4
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/radio-group.d.ts +1 -1
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/radio-group.js +3 -3
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/resizable.d.ts +1 -1
- package/dist/components/ui/resizable.d.ts.map +1 -1
- package/dist/components/ui/resizable.js +5 -5
- package/dist/components/ui/resizable.js.map +1 -1
- package/dist/components/ui/ripple-button.d.ts +1 -1
- package/dist/components/ui/ripple-button.d.ts.map +1 -1
- package/dist/components/ui/ripple-button.js +4 -4
- package/dist/components/ui/ripple-button.js.map +1 -1
- package/dist/components/ui/scratcher.d.ts.map +1 -1
- package/dist/components/ui/scratcher.js +7 -5
- package/dist/components/ui/scratcher.js.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +1 -1
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.js +4 -4
- package/dist/components/ui/scroll-area.js.map +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +7 -7
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -1
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/separator.js +3 -3
- package/dist/components/ui/separator.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +6 -6
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +5 -5
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/sidebar.js +5 -5
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/skeleton.js +2 -2
- package/dist/components/ui/skeleton.js.map +1 -1
- package/dist/components/ui/slider.d.ts +1 -1
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/slider.js +5 -5
- package/dist/components/ui/slider.js.map +1 -1
- package/dist/components/ui/sonner.d.ts +1 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/sonner.js +1 -1
- package/dist/components/ui/sonner.js.map +1 -1
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/switch.js +4 -4
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +1 -1
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +5 -5
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +2 -2
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js +4 -4
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/toggle-group.d.ts +3 -3
- package/dist/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/toggle-group.js.map +1 -1
- package/dist/components/ui/toggle.d.ts +6 -6
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/toggle.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +6 -6
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +4 -4
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/components/ui/typewriter.d.ts.map +1 -1
- package/dist/components/ui/typewriter.js +15 -11
- package/dist/components/ui/typewriter.js.map +1 -1
- package/dist/hooks/useIsMobile.d.ts +2 -5
- package/dist/hooks/useIsMobile.d.ts.map +1 -1
- package/dist/hooks/useIsMobile.js +1 -1
- package/dist/hooks/useIsMobile.js.map +1 -1
- package/dist/hooks/useWindowSize.d.ts +0 -1
- package/dist/hooks/useWindowSize.d.ts.map +1 -1
- package/dist/hooks/useWindowSize.js +1 -1
- package/dist/hooks/useWindowSize.js.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +37 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/lib/utilities.d.ts +9 -0
- package/dist/lib/utilities.d.ts.map +1 -0
- package/dist/lib/{utils.js → utilities.js} +1 -1
- package/dist/lib/utilities.js.map +1 -0
- package/package.json +85 -89
- package/{README.md → readme.md} +627 -627
- package/src/components/ui/accordion.tsx +56 -66
- package/src/components/ui/alert-dialog.tsx +135 -160
- package/src/components/ui/alert.tsx +58 -69
- package/src/components/ui/aspect-ratio.tsx +15 -12
- package/src/components/ui/avatar.tsx +38 -53
- package/src/components/ui/background-beams.tsx +145 -142
- package/src/components/ui/badge.tsx +47 -48
- package/src/components/ui/breadcrumb.tsx +97 -117
- package/src/components/ui/bubble-background.tsx +170 -189
- package/src/components/ui/button.tsx +61 -61
- package/src/components/ui/calendar.tsx +177 -216
- package/src/components/ui/card.tsx +83 -97
- package/src/components/ui/carousel.tsx +204 -241
- package/src/components/ui/chart.tsx +303 -385
- package/src/components/ui/checkbox.tsx +27 -32
- package/src/components/ui/collapsible.tsx +33 -34
- package/src/components/ui/command.tsx +137 -184
- package/src/components/ui/context-menu.tsx +229 -255
- package/src/components/ui/counting-number.tsx +92 -108
- package/src/components/ui/dialog.tsx +141 -146
- package/src/components/ui/dot-background.tsx +153 -158
- package/src/components/ui/drawer.tsx +133 -141
- package/src/components/ui/dropdown-menu.tsx +235 -260
- package/src/components/ui/dropdrawer.tsx +870 -973
- package/src/components/ui/fireworks-background.tsx +325 -378
- package/src/components/ui/flip-button.tsx +89 -110
- package/src/components/ui/form.tsx +145 -174
- package/src/components/ui/gradient-background.tsx +30 -43
- package/src/components/ui/gradient-text.tsx +62 -65
- package/src/components/ui/highlight-text.tsx +54 -71
- package/src/components/ui/hole-background.tsx +326 -361
- package/src/components/ui/hover-card.tsx +48 -44
- package/src/components/ui/input-otp.tsx +76 -77
- package/src/components/ui/input.tsx +22 -22
- package/src/components/ui/label.tsx +21 -24
- package/src/components/ui/menubar.tsx +256 -279
- package/src/components/ui/navigation-menu.tsx +135 -171
- package/src/components/ui/pagination.tsx +103 -129
- package/src/components/ui/popover.tsx +52 -48
- package/src/components/ui/progress.tsx +23 -31
- package/src/components/ui/radio-group.tsx +37 -45
- package/src/components/ui/resizable.tsx +52 -56
- package/src/components/ui/ripple-button.tsx +90 -111
- package/src/components/ui/scratcher.tsx +167 -171
- package/src/components/ui/scroll-area.tsx +45 -58
- package/src/components/ui/select.tsx +160 -191
- package/src/components/ui/separator.tsx +28 -28
- package/src/components/ui/sheet.tsx +133 -145
- package/src/components/ui/sidebar.tsx +673 -729
- package/src/components/ui/skeleton.tsx +16 -19
- package/src/components/ui/slider.tsx +49 -63
- package/src/components/ui/sonner.tsx +30 -26
- package/src/components/ui/switch.tsx +27 -31
- package/src/components/ui/table.tsx +98 -119
- package/src/components/ui/tabs.tsx +54 -66
- package/src/components/ui/textarea.tsx +20 -20
- package/src/components/ui/toggle-group.tsx +66 -73
- package/src/components/ui/toggle.tsx +46 -47
- package/src/components/ui/tooltip.tsx +56 -61
- package/src/components/ui/typewriter.tsx +174 -188
- package/src/hooks/useIsMobile.tsx +42 -45
- package/src/hooks/useWindowSize.tsx +66 -72
- package/src/index.css +73 -73
- package/src/index.ts +303 -408
- package/src/lib/utilities.ts +12 -0
- package/dist/lib/utils.d.ts +0 -7
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js.map +0 -1
- package/src/lib/utils.ts +0 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\n\nimport
|
|
1
|
+
{"version":3,"file":"components\\ui\\gradient-text.js","sources":["webpack://@arolariu/components/./src/components/ui/gradient-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, type Transition} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface GradientTextProps extends React.HTMLAttributes<HTMLSpanElement> {\r\n text: string;\r\n gradient?: string;\r\n neon?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst GradientText = React.forwardRef<HTMLSpanElement, GradientTextProps>(\r\n (\r\n {\r\n text,\r\n className,\r\n gradient = \"linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)\",\r\n neon = false,\r\n transition = {duration: 50, repeat: Infinity, ease: \"linear\"},\r\n ...props\r\n },\r\n ref,\r\n ) => {\r\n const baseStyle: React.CSSProperties = {\r\n backgroundImage: gradient,\r\n };\r\n\r\n return (\r\n <span\r\n ref={ref}\r\n className={cn(\"relative inline-block\", className)}\r\n {...props}>\r\n <motion.span\r\n className='m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n\r\n {Boolean(neon) && (\r\n <motion.span\r\n className='absolute top-0 left-0 m-0 bg-[length:700%_100%] bg-clip-text bg-[position:0%_0%] text-transparent mix-blend-plus-lighter blur-[8px]'\r\n style={baseStyle}\r\n initial={{backgroundPosition: \"0% 0%\"}}\r\n animate={{backgroundPosition: \"500% 100%\"}}\r\n transition={transition}>\r\n {text}\r\n </motion.span>\r\n )}\r\n </span>\r\n );\r\n },\r\n);\r\n\r\nGradientText.displayName = \"GradientText\";\r\n\r\nexport {GradientText, type GradientTextProps};\r\n"],"names":["GradientText","React","text","className","gradient","neon","transition","Infinity","props","ref","baseStyle","cn","motion","Boolean"],"mappings":";;;;;AAcA,MAAMA,eAAe,WAAfA,GAAeC,WACnB,CACE,EACEC,IAAI,EACJC,SAAS,EACTC,WAAW,yFAAyF,EACpGC,OAAO,KAAK,EACZC,aAAa;IAAC,UAAU;IAAI,QAAQC;IAAU,MAAM;AAAQ,CAAC,EAC7D,GAAGC,OACJ,EACDC;IAEA,MAAMC,YAAiC;QACrC,iBAAiBN;IACnB;IAEA,OAAO,WAAP,GACE,KAAC;QACC,KAAKK;QACL,WAAWE,GAAG,yBAAyBR;QACtC,GAAGK,KAAK;;0BACT,IAACI,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;YAGFW,QAAQR,SAAS,WAATA,GACP,IAACO,OAAO,IAAI;gBACV,WAAU;gBACV,OAAOF;gBACP,SAAS;oBAAC,oBAAoB;gBAAO;gBACrC,SAAS;oBAAC,oBAAoB;gBAAW;gBACzC,YAAYJ;0BACXJ;;;;AAKX;AAGFF,aAAa,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"highlight-text.d.ts","sourceRoot":"","sources":["../../../src/components/ui/highlight-text.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoB,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC7G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,kBAAmB,SAAQ,eAAe,CAAC,MAAM,CAAC;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAID,QAAA,MAAM,aAAa,yGAiClB,CAAC;AAGF,OAAO,EAAC,aAAa,EAAE,KAAK,kBAAkB,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
4
3
|
import { motion, useInView } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
const animation = {
|
|
7
7
|
backgroundSize: "100% 100%"
|
|
8
8
|
};
|
|
@@ -29,7 +29,7 @@ const HighlightText = /*#__PURE__*/ forwardRef(({ text, className, inView = fals
|
|
|
29
29
|
backgroundPosition: "left center",
|
|
30
30
|
display: "inline"
|
|
31
31
|
},
|
|
32
|
-
className: cn("relative inline-block
|
|
32
|
+
className: cn("relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500", className),
|
|
33
33
|
...props,
|
|
34
34
|
children: text
|
|
35
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\n\
|
|
1
|
+
{"version":3,"file":"components\\ui\\highlight-text.js","sources":["webpack://@arolariu/components/./src/components/ui/highlight-text.tsx"],"sourcesContent":["\r\n\r\nimport {motion, useInView, type HTMLMotionProps, type Transition, type UseInViewOptions} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface HighlightTextProps extends HTMLMotionProps<\"span\"> {\r\n text: string;\r\n inView?: boolean;\r\n inViewMargin?: UseInViewOptions[\"margin\"];\r\n inViewOnce?: boolean;\r\n transition?: Transition;\r\n}\r\n\r\nconst animation = {backgroundSize: \"100% 100%\"};\r\n\r\nconst HighlightText = React.forwardRef<HTMLSpanElement, HighlightTextProps>(\r\n ({text, className, inView = false, inViewMargin = \"0px\", transition = {duration: 2, ease: \"easeInOut\"}, ...props}, ref) => {\r\n const localRef = React.useRef<HTMLSpanElement>(null);\r\n React.useImperativeHandle(ref, () => localRef.current as HTMLSpanElement);\r\n\r\n const inViewResult = useInView(localRef, {\r\n once: true,\r\n margin: inViewMargin,\r\n });\r\n const isInView = !inView || inViewResult;\r\n\r\n return (\r\n <motion.span\r\n ref={localRef}\r\n initial={{\r\n backgroundSize: \"0% 100%\",\r\n }}\r\n animate={isInView ? animation : undefined}\r\n transition={transition}\r\n style={{\r\n backgroundRepeat: \"no-repeat\",\r\n backgroundPosition: \"left center\",\r\n display: \"inline\",\r\n }}\r\n className={cn(\r\n `relative inline-block rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 px-2 py-1 dark:from-blue-500 dark:to-purple-500`,\r\n className,\r\n )}\r\n {...props}>\r\n {text}\r\n </motion.span>\r\n );\r\n },\r\n);\r\nHighlightText.displayName = \"HighlightText\";\r\n\r\nexport {HighlightText, type HighlightTextProps};\r\n"],"names":["animation","HighlightText","React","text","className","inView","inViewMargin","transition","props","ref","localRef","inViewResult","useInView","isInView","motion","undefined","cn"],"mappings":";;;;;AAeA,MAAMA,YAAY;IAAC,gBAAgB;AAAW;AAE9C,MAAMC,gBAAgB,WAAhBA,GAAgBC,WACpB,CAAC,EAACC,IAAI,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAEC,eAAe,KAAK,EAAEC,aAAa;IAAC,UAAU;IAAG,MAAM;AAAW,CAAC,EAAE,GAAGC,OAAM,EAAEC;IACjH,MAAMC,WAAWR,OAA8B;IAC/CA,oBAA0BO,KAAK,IAAMC,SAAS,OAAO;IAErD,MAAMC,eAAeC,UAAUF,UAAU;QACvC,MAAM;QACN,QAAQJ;IACV;IACA,MAAMO,WAAW,CAACR,UAAUM;IAE5B,OAAO,WAAP,GACE,IAACG,OAAO,IAAI;QACV,KAAKJ;QACL,SAAS;YACP,gBAAgB;QAClB;QACA,SAASG,WAAWb,YAAYe;QAChC,YAAYR;QACZ,OAAO;YACL,kBAAkB;YAClB,oBAAoB;YACpB,SAAS;QACX;QACA,WAAWS,GACT,iIACAZ;QAED,GAAGI,KAAK;kBACRL;;AAGP;AAEFF,cAAc,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hole-background.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hole-background.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,UAAU,mBAAoB,SAAQ,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAKD,QAAA,MAAM,cAAc,+FAiTnB,CAAC;AAGF,OAAO,EAAC,cAAc,EAAE,KAAK,mBAAmB,EAAC,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
|
|
4
3
|
import { motion } from "motion/react";
|
|
5
|
-
import {
|
|
4
|
+
import { forwardRef, useCallback, useEffect, useImperativeHandle, useRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
|
+
const linear = (p)=>p;
|
|
7
|
+
const easeInExpo = (p)=>0 === p ? 0 : 2 ** (10 * (p - 1));
|
|
6
8
|
const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numberOfLines = 50, numberOfDiscs = 50, particleRGBColor = [
|
|
7
9
|
255,
|
|
8
10
|
255,
|
|
@@ -30,8 +32,6 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
30
32
|
particleArea: {},
|
|
31
33
|
linesCanvas: null
|
|
32
34
|
});
|
|
33
|
-
const linear = (p)=>p;
|
|
34
|
-
const easeInExpo = (p)=>0 === p ? 0 : Math.pow(2, 10 * (p - 1));
|
|
35
35
|
const tweenValue = useCallback((start, end, p, ease = null)=>{
|
|
36
36
|
const delta = end - start;
|
|
37
37
|
const easeFn = "inExpo" === ease ? easeInExpo : linear;
|
|
@@ -100,7 +100,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
100
100
|
stateRef.current.discs.push(disc);
|
|
101
101
|
}
|
|
102
102
|
const clipPath = new Path2D();
|
|
103
|
-
const disc = stateRef.current.clip
|
|
103
|
+
const { disc } = stateRef.current.clip;
|
|
104
104
|
clipPath.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, 2 * Math.PI);
|
|
105
105
|
clipPath.rect(disc.x - disc.w, 0, 2 * disc.w, disc.y);
|
|
106
106
|
stateRef.current.clip.path = clipPath;
|
|
@@ -170,7 +170,7 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
170
170
|
const setParticles = useCallback(()=>{
|
|
171
171
|
const { width, height } = stateRef.current.rect;
|
|
172
172
|
stateRef.current.particles = [];
|
|
173
|
-
const disc = stateRef.current.clip
|
|
173
|
+
const { disc } = stateRef.current.clip;
|
|
174
174
|
stateRef.current.particleArea = {
|
|
175
175
|
sw: 0.5 * disc.w,
|
|
176
176
|
ew: 2 * disc.w,
|
|
@@ -297,16 +297,16 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
297
297
|
setParticles
|
|
298
298
|
]);
|
|
299
299
|
return /*#__PURE__*/ jsxs("div", {
|
|
300
|
-
className: cn("relative size-full overflow-hidden", 'before:
|
|
300
|
+
className: cn("relative size-full overflow-hidden", 'before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] before:[transform:translate3d(-50%,-50%,0)] before:content-[""] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)]', 'after:absolute after:top-1/2 after:left-1/2 after:z-[5] after:block after:size-full after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay after:content-[""] after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)]', className),
|
|
301
301
|
children: [
|
|
302
302
|
children,
|
|
303
303
|
/*#__PURE__*/ jsx("canvas", {
|
|
304
304
|
ref: canvasRef,
|
|
305
|
-
className: "absolute inset-0 block size-full dark:opacity-20
|
|
305
|
+
className: "absolute inset-0 block size-full opacity-10 dark:opacity-20",
|
|
306
306
|
...props
|
|
307
307
|
}),
|
|
308
308
|
/*#__PURE__*/ jsx(motion.div, {
|
|
309
|
-
className: cn("absolute top-[-71.5%] left-1/2 z-[3]
|
|
309
|
+
className: cn("absolute top-[-71.5%] left-1/2 z-[3] h-[140%] w-[30%] [transform:translate3d(-50%,0,0)] rounded-b-full [background-size:100%_200%] [background-position:0%_100%] opacity-75 mix-blend-plus-darker blur-3xl dark:mix-blend-plus-lighter", "[background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]"),
|
|
310
310
|
animate: {
|
|
311
311
|
backgroundPosition: "0% 300%"
|
|
312
312
|
},
|
|
@@ -317,11 +317,12 @@ const HoleBackground = /*#__PURE__*/ forwardRef(({ strokeColor = "#737373", numb
|
|
|
317
317
|
}
|
|
318
318
|
}),
|
|
319
319
|
/*#__PURE__*/ jsx("div", {
|
|
320
|
-
className: "absolute top-0 left-0 z-[7] size-full dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]
|
|
320
|
+
className: "absolute top-0 left-0 z-[7] size-full opacity-50 mix-blend-overlay dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]"
|
|
321
321
|
})
|
|
322
322
|
]
|
|
323
323
|
});
|
|
324
324
|
});
|
|
325
|
+
HoleBackground.displayName = "HoleBackground";
|
|
325
326
|
export { HoleBackground };
|
|
326
327
|
|
|
327
328
|
//# sourceMappingURL=hole-background.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\hole-background.js","sources":["webpack://@arolariu/components/./src/components/ui/hole-background.tsx"],"sourcesContent":["\n\nimport * as React from \"react\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/utils\";\n\ninterface HoleBackgroundProps extends React.HTMLAttributes<HTMLCanvasElement> {\n strokeColor?: string;\n numberOfLines?: number;\n numberOfDiscs?: number;\n particleRGBColor?: [number, number, number];\n}\n\nconst HoleBackground = React.forwardRef<HTMLCanvasElement, HoleBackgroundProps>(\n (\n {\n strokeColor = \"#737373\",\n numberOfLines = 50,\n numberOfDiscs = 50,\n particleRGBColor = [255, 255, 255],\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const canvasRef = React.useRef<HTMLCanvasElement>(null);\n React.useImperativeHandle(\n ref,\n () => canvasRef.current as HTMLCanvasElement,\n );\n\n const animationFrameIdRef = React.useRef<number>(0);\n const stateRef = React.useRef<any>({\n discs: [] as any[],\n lines: [] as any[],\n particles: [] as any[],\n clip: {},\n startDisc: {},\n endDisc: {},\n rect: { width: 0, height: 0 },\n render: { width: 0, height: 0, dpi: 1 },\n particleArea: {},\n linesCanvas: null,\n });\n\n const linear = (p: number) => p;\n const easeInExpo = (p: number) => (p === 0 ? 0 : Math.pow(2, 10 * (p - 1)));\n\n const tweenValue = React.useCallback(\n (start: number, end: number, p: number, ease: \"inExpo\" | null = null) => {\n const delta = end - start;\n const easeFn = ease === \"inExpo\" ? easeInExpo : linear;\n return start + delta * easeFn(p);\n },\n [],\n );\n\n const tweenDisc = React.useCallback(\n (disc: any) => {\n const { startDisc, endDisc } = stateRef.current;\n disc.x = tweenValue(startDisc.x, endDisc.x, disc.p);\n disc.y = tweenValue(startDisc.y, endDisc.y, disc.p, \"inExpo\");\n disc.w = tweenValue(startDisc.w, endDisc.w, disc.p);\n disc.h = tweenValue(startDisc.h, endDisc.h, disc.p);\n },\n [tweenValue],\n );\n\n const setSize = React.useCallback(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n const rect = canvas.getBoundingClientRect();\n stateRef.current.rect = { width: rect.width, height: rect.height };\n stateRef.current.render = {\n width: rect.width,\n height: rect.height,\n dpi: window.devicePixelRatio || 1,\n };\n canvas.width =\n stateRef.current.render.width * stateRef.current.render.dpi;\n canvas.height =\n stateRef.current.render.height * stateRef.current.render.dpi;\n }, []);\n\n const setDiscs = React.useCallback(() => {\n const { width, height } = stateRef.current.rect;\n stateRef.current.discs = [];\n stateRef.current.startDisc = {\n x: width * 0.5,\n y: height * 0.45,\n w: width * 0.75,\n h: height * 0.7,\n };\n stateRef.current.endDisc = {\n x: width * 0.5,\n y: height * 0.95,\n w: 0,\n h: 0,\n };\n let prevBottom = height;\n stateRef.current.clip = {};\n for (let i = 0; i < numberOfDiscs; i++) {\n const p = i / numberOfDiscs;\n const disc = { p, x: 0, y: 0, w: 0, h: 0 };\n tweenDisc(disc);\n const bottom = disc.y + disc.h;\n if (bottom <= prevBottom) {\n stateRef.current.clip = { disc: { ...disc }, i };\n }\n prevBottom = bottom;\n stateRef.current.discs.push(disc);\n }\n const clipPath = new Path2D();\n const disc = stateRef.current.clip.disc;\n clipPath.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, Math.PI * 2);\n clipPath.rect(disc.x - disc.w, 0, disc.w * 2, disc.y);\n stateRef.current.clip.path = clipPath;\n }, [tweenDisc]);\n\n const setLines = React.useCallback(() => {\n const { width, height } = stateRef.current.rect;\n stateRef.current.lines = [];\n const linesAngle = (Math.PI * 2) / numberOfLines;\n for (let i = 0; i < numberOfLines; i++) {\n stateRef.current.lines.push([]);\n }\n stateRef.current.discs.forEach((disc: any) => {\n for (let i = 0; i < numberOfLines; i++) {\n const angle = i * linesAngle;\n const p = {\n x: disc.x + Math.cos(angle) * disc.w,\n y: disc.y + Math.sin(angle) * disc.h,\n };\n stateRef.current.lines[i].push(p);\n }\n });\n const offCanvas = document.createElement(\"canvas\");\n offCanvas.width = width;\n offCanvas.height = height;\n const ctx = offCanvas.getContext(\"2d\");\n if (!ctx) return;\n stateRef.current.lines.forEach((line: any) => {\n ctx.save();\n let lineIsIn = false;\n line.forEach((p1: any, j: number) => {\n if (j === 0) return;\n const p0 = line[j - 1];\n if (\n !lineIsIn &&\n (ctx.isPointInPath(stateRef.current.clip.path, p1.x, p1.y) ||\n ctx.isPointInStroke(stateRef.current.clip.path, p1.x, p1.y))\n ) {\n lineIsIn = true;\n } else if (lineIsIn) {\n ctx.clip(stateRef.current.clip.path);\n }\n ctx.beginPath();\n ctx.moveTo(p0.x, p0.y);\n ctx.lineTo(p1.x, p1.y);\n ctx.strokeStyle = strokeColor;\n ctx.lineWidth = 2;\n ctx.stroke();\n ctx.closePath();\n });\n ctx.restore();\n });\n stateRef.current.linesCanvas = offCanvas;\n }, [strokeColor]);\n\n const initParticle = React.useCallback((start: boolean = false) => {\n const sx =\n stateRef.current.particleArea.sx +\n stateRef.current.particleArea.sw * Math.random();\n const ex =\n stateRef.current.particleArea.ex +\n stateRef.current.particleArea.ew * Math.random();\n const dx = ex - sx;\n const y = start\n ? stateRef.current.particleArea.h * Math.random()\n : stateRef.current.particleArea.h;\n const r = 0.5 + Math.random() * 4;\n const vy = 0.5 + Math.random();\n return {\n x: sx,\n sx,\n dx,\n y,\n vy,\n p: 0,\n r,\n c: `rgba(${particleRGBColor[0]}, ${particleRGBColor[1]}, ${\n particleRGBColor[2]\n }, ${Math.random()})`,\n };\n }, []);\n\n const setParticles = React.useCallback(() => {\n const { width, height } = stateRef.current.rect;\n stateRef.current.particles = [];\n const disc = stateRef.current.clip.disc;\n stateRef.current.particleArea = {\n sw: disc.w * 0.5,\n ew: disc.w * 2,\n h: height * 0.85,\n };\n stateRef.current.particleArea.sx =\n (width - stateRef.current.particleArea.sw) / 2;\n stateRef.current.particleArea.ex =\n (width - stateRef.current.particleArea.ew) / 2;\n const totalParticles = 100;\n for (let i = 0; i < totalParticles; i++) {\n stateRef.current.particles.push(initParticle(true));\n }\n }, [initParticle]);\n\n const drawDiscs = React.useCallback(\n (ctx: CanvasRenderingContext2D) => {\n ctx.strokeStyle = strokeColor;\n ctx.lineWidth = 2;\n const outerDisc = stateRef.current.startDisc;\n ctx.beginPath();\n ctx.ellipse(\n outerDisc.x,\n outerDisc.y,\n outerDisc.w,\n outerDisc.h,\n 0,\n 0,\n Math.PI * 2,\n );\n ctx.stroke();\n ctx.closePath();\n stateRef.current.discs.forEach((disc: any, i: number) => {\n if (i % 5 !== 0) return;\n if (disc.w < stateRef.current.clip.disc.w - 5) {\n ctx.save();\n ctx.clip(stateRef.current.clip.path);\n }\n ctx.beginPath();\n ctx.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, Math.PI * 2);\n ctx.stroke();\n ctx.closePath();\n if (disc.w < stateRef.current.clip.disc.w - 5) {\n ctx.restore();\n }\n });\n },\n [strokeColor],\n );\n\n const drawLines = React.useCallback((ctx: CanvasRenderingContext2D) => {\n if (stateRef.current.linesCanvas) {\n ctx.drawImage(stateRef.current.linesCanvas, 0, 0);\n }\n }, []);\n\n const drawParticles = React.useCallback((ctx: CanvasRenderingContext2D) => {\n ctx.save();\n ctx.clip(stateRef.current.clip.path);\n stateRef.current.particles.forEach((particle: any) => {\n ctx.fillStyle = particle.c;\n ctx.beginPath();\n ctx.rect(particle.x, particle.y, particle.r, particle.r);\n ctx.closePath();\n ctx.fill();\n });\n ctx.restore();\n }, []);\n\n const moveDiscs = React.useCallback(() => {\n stateRef.current.discs.forEach((disc: any) => {\n disc.p = (disc.p + 0.001) % 1;\n tweenDisc(disc);\n });\n }, [tweenDisc]);\n\n const moveParticles = React.useCallback(() => {\n stateRef.current.particles.forEach((particle: any, idx: number) => {\n particle.p = 1 - particle.y / stateRef.current.particleArea.h;\n particle.x = particle.sx + particle.dx * particle.p;\n particle.y -= particle.vy;\n if (particle.y < 0) {\n stateRef.current.particles[idx] = initParticle();\n }\n });\n }, [initParticle]);\n\n const tick = React.useCallback(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return;\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.save();\n ctx.scale(stateRef.current.render.dpi, stateRef.current.render.dpi);\n moveDiscs();\n moveParticles();\n drawDiscs(ctx);\n drawLines(ctx);\n drawParticles(ctx);\n ctx.restore();\n animationFrameIdRef.current = requestAnimationFrame(tick);\n }, [moveDiscs, moveParticles, drawDiscs, drawLines, drawParticles]);\n\n const init = React.useCallback(() => {\n setSize();\n setDiscs();\n setLines();\n setParticles();\n }, [setSize, setDiscs, setLines, setParticles]);\n\n React.useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n init();\n tick();\n const handleResize = () => {\n setSize();\n setDiscs();\n setLines();\n setParticles();\n };\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n cancelAnimationFrame(animationFrameIdRef.current);\n };\n }, [init, tick, setSize, setDiscs, setLines, setParticles]);\n\n return (\n <div\n className={cn(\n \"relative size-full overflow-hidden\",\n 'before:content-[\"\"] before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] before:[transform:translate3d(-50%,-50%,0)]',\n 'after:content-[\"\"] after:absolute after:z-[5] after:top-1/2 after:left-1/2 after:block after:size-full after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)] after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay',\n className,\n )}\n >\n {children}\n <canvas\n ref={canvasRef}\n className=\"absolute inset-0 block size-full dark:opacity-20 opacity-10\"\n {...props}\n />\n <motion.div\n className={cn(\n \"absolute top-[-71.5%] left-1/2 z-[3] w-[30%] h-[140%] rounded-b-full blur-3xl opacity-75 dark:mix-blend-plus-lighter mix-blend-plus-darker [transform:translate3d(-50%,0,0)] [background-position:0%_100%] [background-size:100%_200%]\",\n \"dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] [background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]\",\n )}\n animate={{ backgroundPosition: \"0% 300%\" }}\n transition={{ duration: 5, ease: \"linear\", repeat: Infinity }}\n />\n <div className=\"absolute top-0 left-0 z-[7] size-full dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)] mix-blend-overlay opacity-50\" />\n </div>\n );\n },\n);\n\nexport { HoleBackground, type HoleBackgroundProps };\n"],"names":["HoleBackground","React","strokeColor","numberOfLines","numberOfDiscs","particleRGBColor","className","children","props","ref","canvasRef","animationFrameIdRef","stateRef","linear","p","easeInExpo","Math","tweenValue","start","end","ease","delta","easeFn","tweenDisc","disc","startDisc","endDisc","setSize","canvas","rect","window","setDiscs","width","height","prevBottom","i","bottom","clipPath","Path2D","setLines","linesAngle","angle","offCanvas","document","ctx","line","lineIsIn","p1","j","p0","initParticle","sx","ex","dx","y","r","vy","setParticles","totalParticles","drawDiscs","outerDisc","drawLines","drawParticles","particle","moveDiscs","moveParticles","idx","tick","requestAnimationFrame","init","handleResize","cancel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BAAI,WAAU;;;;AAGrB"}
|
|
1
|
+
{"version":3,"file":"components\\ui\\hole-background.js","sources":["webpack://@arolariu/components/./src/components/ui/hole-background.tsx"],"sourcesContent":["\r\n\r\nimport {motion} from \"motion/react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\ninterface HoleBackgroundProps extends React.HTMLAttributes<HTMLCanvasElement> {\r\n strokeColor?: string;\r\n numberOfLines?: number;\r\n numberOfDiscs?: number;\r\n particleRGBColor?: [number, number, number];\r\n}\r\n\r\nconst linear = (p: number) => p;\r\nconst easeInExpo = (p: number) => (p === 0 ? 0 : 2 ** (10 * (p - 1)));\r\n\r\nconst HoleBackground = React.forwardRef<HTMLCanvasElement, HoleBackgroundProps>(\r\n (\r\n {strokeColor = \"#737373\", numberOfLines = 50, numberOfDiscs = 50, particleRGBColor = [255, 255, 255], className, children, ...props},\r\n ref,\r\n ) => {\r\n const canvasRef = React.useRef<HTMLCanvasElement>(null);\r\n React.useImperativeHandle(ref, () => canvasRef.current as HTMLCanvasElement);\r\n\r\n const animationFrameIdRef = React.useRef<number>(0);\r\n const stateRef = React.useRef<any>({\r\n discs: [] as any[],\r\n lines: [] as any[],\r\n particles: [] as any[],\r\n clip: {},\r\n startDisc: {},\r\n endDisc: {},\r\n rect: {width: 0, height: 0},\r\n render: {width: 0, height: 0, dpi: 1},\r\n particleArea: {},\r\n linesCanvas: null,\r\n });\r\n\r\n const tweenValue = React.useCallback((start: number, end: number, p: number, ease: \"inExpo\" | null = null) => {\r\n const delta = end - start;\r\n const easeFn = ease === \"inExpo\" ? easeInExpo : linear;\r\n return start + delta * easeFn(p);\r\n }, []);\r\n\r\n const tweenDisc = React.useCallback(\r\n (disc: any) => {\r\n const {startDisc, endDisc} = stateRef.current;\r\n disc.x = tweenValue(startDisc.x, endDisc.x, disc.p);\r\n disc.y = tweenValue(startDisc.y, endDisc.y, disc.p, \"inExpo\");\r\n disc.w = tweenValue(startDisc.w, endDisc.w, disc.p);\r\n disc.h = tweenValue(startDisc.h, endDisc.h, disc.p);\r\n },\r\n [tweenValue],\r\n );\r\n\r\n const setSize = React.useCallback(() => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n const rect = canvas.getBoundingClientRect();\r\n stateRef.current.rect = {width: rect.width, height: rect.height};\r\n stateRef.current.render = {\r\n width: rect.width,\r\n height: rect.height,\r\n dpi: window.devicePixelRatio || 1,\r\n };\r\n canvas.width = stateRef.current.render.width * stateRef.current.render.dpi;\r\n canvas.height = stateRef.current.render.height * stateRef.current.render.dpi;\r\n }, []);\r\n\r\n const setDiscs = React.useCallback(() => {\r\n const {width, height} = stateRef.current.rect;\r\n stateRef.current.discs = [];\r\n stateRef.current.startDisc = {\r\n x: width * 0.5,\r\n y: height * 0.45,\r\n w: width * 0.75,\r\n h: height * 0.7,\r\n };\r\n stateRef.current.endDisc = {\r\n x: width * 0.5,\r\n y: height * 0.95,\r\n w: 0,\r\n h: 0,\r\n };\r\n let prevBottom = height;\r\n stateRef.current.clip = {};\r\n for (let i = 0; i < numberOfDiscs; i++) {\r\n const p = i / numberOfDiscs;\r\n const disc = {p, x: 0, y: 0, w: 0, h: 0};\r\n tweenDisc(disc);\r\n const bottom = disc.y + disc.h;\r\n if (bottom <= prevBottom) {\r\n stateRef.current.clip = {disc: {...disc}, i};\r\n }\r\n prevBottom = bottom;\r\n stateRef.current.discs.push(disc);\r\n }\r\n const clipPath = new Path2D();\r\n const {disc} = stateRef.current.clip;\r\n clipPath.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, Math.PI * 2);\r\n clipPath.rect(disc.x - disc.w, 0, disc.w * 2, disc.y);\r\n stateRef.current.clip.path = clipPath;\r\n }, [tweenDisc]);\r\n\r\n const setLines = React.useCallback(() => {\r\n const {width, height} = stateRef.current.rect;\r\n stateRef.current.lines = [];\r\n const linesAngle = (Math.PI * 2) / numberOfLines;\r\n for (let i = 0; i < numberOfLines; i++) {\r\n stateRef.current.lines.push([]);\r\n }\r\n stateRef.current.discs.forEach((disc: any) => {\r\n for (let i = 0; i < numberOfLines; i++) {\r\n const angle = i * linesAngle;\r\n const p = {\r\n x: disc.x + Math.cos(angle) * disc.w,\r\n y: disc.y + Math.sin(angle) * disc.h,\r\n };\r\n stateRef.current.lines[i].push(p);\r\n }\r\n });\r\n const offCanvas = document.createElement(\"canvas\");\r\n offCanvas.width = width;\r\n offCanvas.height = height;\r\n const ctx = offCanvas.getContext(\"2d\");\r\n if (!ctx) return;\r\n stateRef.current.lines.forEach((line: any) => {\r\n ctx.save();\r\n let lineIsIn = false;\r\n line.forEach((p1: any, j: number) => {\r\n if (j === 0) return;\r\n const p0 = line[j - 1];\r\n if (\r\n !lineIsIn\r\n && (ctx.isPointInPath(stateRef.current.clip.path, p1.x, p1.y) || ctx.isPointInStroke(stateRef.current.clip.path, p1.x, p1.y))\r\n ) {\r\n lineIsIn = true;\r\n } else if (lineIsIn) {\r\n ctx.clip(stateRef.current.clip.path);\r\n }\r\n ctx.beginPath();\r\n ctx.moveTo(p0.x, p0.y);\r\n ctx.lineTo(p1.x, p1.y);\r\n ctx.strokeStyle = strokeColor;\r\n ctx.lineWidth = 2;\r\n ctx.stroke();\r\n ctx.closePath();\r\n });\r\n ctx.restore();\r\n });\r\n stateRef.current.linesCanvas = offCanvas;\r\n }, [strokeColor]);\r\n\r\n const initParticle = React.useCallback((start: boolean = false) => {\r\n const sx = stateRef.current.particleArea.sx + stateRef.current.particleArea.sw * Math.random();\r\n const ex = stateRef.current.particleArea.ex + stateRef.current.particleArea.ew * Math.random();\r\n const dx = ex - sx;\r\n const y = start ? stateRef.current.particleArea.h * Math.random() : stateRef.current.particleArea.h;\r\n const r = 0.5 + Math.random() * 4;\r\n const vy = 0.5 + Math.random();\r\n return {\r\n x: sx,\r\n sx,\r\n dx,\r\n y,\r\n vy,\r\n p: 0,\r\n r,\r\n c: `rgba(${particleRGBColor[0]}, ${particleRGBColor[1]}, ${particleRGBColor[2]}, ${Math.random()})`,\r\n };\r\n }, []);\r\n\r\n const setParticles = React.useCallback(() => {\r\n const {width, height} = stateRef.current.rect;\r\n stateRef.current.particles = [];\r\n const {disc} = stateRef.current.clip;\r\n stateRef.current.particleArea = {\r\n sw: disc.w * 0.5,\r\n ew: disc.w * 2,\r\n h: height * 0.85,\r\n };\r\n stateRef.current.particleArea.sx = (width - stateRef.current.particleArea.sw) / 2;\r\n stateRef.current.particleArea.ex = (width - stateRef.current.particleArea.ew) / 2;\r\n const totalParticles = 100;\r\n for (let i = 0; i < totalParticles; i++) {\r\n stateRef.current.particles.push(initParticle(true));\r\n }\r\n }, [initParticle]);\r\n\r\n const drawDiscs = React.useCallback(\r\n (ctx: CanvasRenderingContext2D) => {\r\n ctx.strokeStyle = strokeColor;\r\n ctx.lineWidth = 2;\r\n const outerDisc = stateRef.current.startDisc;\r\n ctx.beginPath();\r\n ctx.ellipse(outerDisc.x, outerDisc.y, outerDisc.w, outerDisc.h, 0, 0, Math.PI * 2);\r\n ctx.stroke();\r\n ctx.closePath();\r\n stateRef.current.discs.forEach((disc: any, i: number) => {\r\n if (i % 5 !== 0) return;\r\n if (disc.w < stateRef.current.clip.disc.w - 5) {\r\n ctx.save();\r\n ctx.clip(stateRef.current.clip.path);\r\n }\r\n ctx.beginPath();\r\n ctx.ellipse(disc.x, disc.y, disc.w, disc.h, 0, 0, Math.PI * 2);\r\n ctx.stroke();\r\n ctx.closePath();\r\n if (disc.w < stateRef.current.clip.disc.w - 5) {\r\n ctx.restore();\r\n }\r\n });\r\n },\r\n [strokeColor],\r\n );\r\n\r\n const drawLines = React.useCallback((ctx: CanvasRenderingContext2D) => {\r\n if (stateRef.current.linesCanvas) {\r\n ctx.drawImage(stateRef.current.linesCanvas, 0, 0);\r\n }\r\n }, []);\r\n\r\n const drawParticles = React.useCallback((ctx: CanvasRenderingContext2D) => {\r\n ctx.save();\r\n ctx.clip(stateRef.current.clip.path);\r\n stateRef.current.particles.forEach((particle: any) => {\r\n ctx.fillStyle = particle.c;\r\n ctx.beginPath();\r\n ctx.rect(particle.x, particle.y, particle.r, particle.r);\r\n ctx.closePath();\r\n ctx.fill();\r\n });\r\n ctx.restore();\r\n }, []);\r\n\r\n const moveDiscs = React.useCallback(() => {\r\n stateRef.current.discs.forEach((disc: any) => {\r\n disc.p = (disc.p + 0.001) % 1;\r\n tweenDisc(disc);\r\n });\r\n }, [tweenDisc]);\r\n\r\n const moveParticles = React.useCallback(() => {\r\n stateRef.current.particles.forEach((particle: any, idx: number) => {\r\n particle.p = 1 - particle.y / stateRef.current.particleArea.h;\r\n particle.x = particle.sx + particle.dx * particle.p;\r\n particle.y -= particle.vy;\r\n if (particle.y < 0) {\r\n stateRef.current.particles[idx] = initParticle();\r\n }\r\n });\r\n }, [initParticle]);\r\n\r\n const tick = React.useCallback(() => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n const ctx = canvas.getContext(\"2d\");\r\n if (!ctx) return;\r\n ctx.clearRect(0, 0, canvas.width, canvas.height);\r\n ctx.save();\r\n ctx.scale(stateRef.current.render.dpi, stateRef.current.render.dpi);\r\n moveDiscs();\r\n moveParticles();\r\n drawDiscs(ctx);\r\n drawLines(ctx);\r\n drawParticles(ctx);\r\n ctx.restore();\r\n animationFrameIdRef.current = requestAnimationFrame(tick);\r\n }, [moveDiscs, moveParticles, drawDiscs, drawLines, drawParticles]);\r\n\r\n const init = React.useCallback(() => {\r\n setSize();\r\n setDiscs();\r\n setLines();\r\n setParticles();\r\n }, [setSize, setDiscs, setLines, setParticles]);\r\n\r\n React.useEffect(() => {\r\n const canvas = canvasRef.current;\r\n if (!canvas) return;\r\n init();\r\n tick();\r\n const handleResize = () => {\r\n setSize();\r\n setDiscs();\r\n setLines();\r\n setParticles();\r\n };\r\n window.addEventListener(\"resize\", handleResize);\r\n return () => {\r\n window.removeEventListener(\"resize\", handleResize);\r\n cancelAnimationFrame(animationFrameIdRef.current);\r\n };\r\n }, [init, tick, setSize, setDiscs, setLines, setParticles]);\r\n\r\n return (\r\n <div\r\n className={cn(\r\n \"relative size-full overflow-hidden\",\r\n 'before:absolute before:top-1/2 before:left-1/2 before:block before:size-[140%] before:[transform:translate3d(-50%,-50%,0)] before:content-[\"\"] before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,white_50%)] dark:before:[background:radial-gradient(ellipse_at_50%_55%,transparent_10%,black_50%)]',\r\n 'after:absolute after:top-1/2 after:left-1/2 after:z-[5] after:block after:size-full after:[transform:translate3d(-50%,-50%,0)] after:mix-blend-overlay after:content-[\"\"] after:[background:radial-gradient(ellipse_at_50%_75%,#a900ff_20%,transparent_75%)]',\r\n className,\r\n )}>\r\n {children}\r\n <canvas\r\n ref={canvasRef}\r\n className='absolute inset-0 block size-full opacity-10 dark:opacity-20'\r\n {...props}\r\n />\r\n <motion.div\r\n className={cn(\r\n \"absolute top-[-71.5%] left-1/2 z-[3] h-[140%] w-[30%] [transform:translate3d(-50%,0,0)] rounded-b-full [background-size:100%_200%] [background-position:0%_100%] opacity-75 mix-blend-plus-darker blur-3xl dark:mix-blend-plus-lighter\",\r\n \"[background:linear-gradient(20deg,#00f8f1,#ffbd1e40_16.5%,#fe848f_33%,#fe848f40_49.5%,#00f8f1_66%,#00f8f180_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%] dark:[background:linear-gradient(20deg,#00f8f1,#ffbd1e20_16.5%,#fe848f_33%,#fe848f20_49.5%,#00f8f1_66%,#00f8f160_85.5%,#ffbd1e_100%)_0_100%_/_100%_200%]\",\r\n )}\r\n animate={{backgroundPosition: \"0% 300%\"}}\r\n transition={{duration: 5, ease: \"linear\", repeat: Infinity}}\r\n />\r\n <div className='absolute top-0 left-0 z-[7] size-full opacity-50 mix-blend-overlay dark:[background:repeating-linear-gradient(transparent,transparent_1px,white_1px,white_2px)]' />\r\n </div>\r\n );\r\n },\r\n);\r\n\r\nHoleBackground.displayName = \"HoleBackground\";\r\nexport {HoleBackground, type HoleBackgroundProps};\r\n"],"names":["linear","p","easeInExpo","HoleBackground","React","strokeColor","numberOfLines","numberOfDiscs","particleRGBColor","className","children","props","ref","canvasRef","animationFrameIdRef","stateRef","tweenValue","start","end","ease","delta","easeFn","tweenDisc","disc","startDisc","endDisc","setSize","canvas","rect","window","setDiscs","width","height","prevBottom","i","bottom","clipPath","Path2D","Math","setLines","linesAngle","angle","offCanvas","document","ctx","line","lineIsIn","p1","j","p0","initParticle","sx","ex","dx","y","r","vy","setParticles","totalParticles","drawDiscs","outerDisc","drawLines","drawParticles","particle","moveDiscs","moveParticles","idx","tick","requestAnimationFrame","init","handleResize","cancelAnimationFrame","cn","motion","Infinity"],"mappings":";;;;;AAcA,MAAMA,SAAS,CAACC,IAAcA;AAC9B,MAAMC,aAAa,CAACD,IAAeA,MAAAA,IAAU,IAAI,KAAM,MAAMA,CAAAA,IAAI,EAAC;AAElE,MAAME,iBAAiB,WAAjBA,GAAiBC,WACrB,CACE,EAACC,cAAc,SAAS,EAAEC,gBAAgB,EAAE,EAAEC,gBAAgB,EAAE,EAAEC,mBAAmB;IAAC;IAAK;IAAK;CAAI,EAAEC,SAAS,EAAEC,QAAQ,EAAE,GAAGC,OAAM,EACpIC;IAEA,MAAMC,YAAYT,OAAgC;IAClDA,oBAA0BQ,KAAK,IAAMC,UAAU,OAAO;IAEtD,MAAMC,sBAAsBV,OAAqB;IACjD,MAAMW,WAAWX,OAAkB;QACjC,OAAO,EAAE;QACT,OAAO,EAAE;QACT,WAAW,EAAE;QACb,MAAM,CAAC;QACP,WAAW,CAAC;QACZ,SAAS,CAAC;QACV,MAAM;YAAC,OAAO;YAAG,QAAQ;QAAC;QAC1B,QAAQ;YAAC,OAAO;YAAG,QAAQ;YAAG,KAAK;QAAC;QACpC,cAAc,CAAC;QACf,aAAa;IACf;IAEA,MAAMY,aAAaZ,YAAkB,CAACa,OAAeC,KAAajB,GAAWkB,OAAwB,IAAI;QACvG,MAAMC,QAAQF,MAAMD;QACpB,MAAMI,SAASF,aAAAA,OAAoBjB,aAAaF;QAChD,OAAOiB,QAAQG,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F,GAAG;QAACuD;QAAMF;QAAMzC;QAASI;QAAUS;QAAUkB;KAAa;IAE1D,OAAO,WAAP,GACE,KAAC;QACC,WAAWe,GACT,sCACA,2TACA,gQACA/D;;YAEDC;0BACD,IAAC;gBACC,KAAKG;gBACL,WAAU;gBACT,GAAGF,KAAK;;0BAEX,IAAC8D,OAAO,GAAG;gBACT,WAAWD,GACT,0OACA;gBAEF,SAAS;oBAAC,oBAAoB;gBAAS;gBACvC,YAAY;oBAAC,UAAU;oBAAG,MAAM;oBAAU,QAAQE;gBAAQ;;0BAE5D,IAAC;gBAAI,WAAU;;;;AAGrB;AAGFvE,eAAe,WAAW,GAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export { HoverCard,
|
|
6
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
7
7
|
//# sourceMappingURL=hover-card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,kBAAkB,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,SAAS,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAOlF;AAED,iBAAS,gBAAgB,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAO5F;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,KAAgB,EAChB,UAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAezD;AAED,OAAO,EAAC,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Content, Portal, Root, Trigger } from "@radix-ui/react-hover-card";
|
|
5
|
-
import
|
|
4
|
+
import "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
function HoverCard({ ...props }) {
|
|
7
7
|
return /*#__PURE__*/ jsx(Root, {
|
|
8
8
|
"data-slot": "hover-card",
|
|
@@ -22,7 +22,7 @@ function HoverCardContent({ className, align = "center", sideOffset = 4, ...prop
|
|
|
22
22
|
"data-slot": "hover-card-content",
|
|
23
23
|
align: align,
|
|
24
24
|
sideOffset: sideOffset,
|
|
25
|
-
className: cn("
|
|
25
|
+
className: cn("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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50", className),
|
|
26
26
|
...props
|
|
27
27
|
})
|
|
28
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\hover-card.js","sources":["webpack://@arolariu/components/./src/components/ui/hover-card.tsx"],"sourcesContent":["\n\nimport * as
|
|
1
|
+
{"version":3,"file":"components\\ui\\hover-card.js","sources":["webpack://@arolariu/components/./src/components/ui/hover-card.tsx"],"sourcesContent":["\r\n\r\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction HoverCard({...props}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\r\n return (\r\n <HoverCardPrimitive.Root\r\n data-slot='hover-card'\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction HoverCardTrigger({...props}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\r\n return (\r\n <HoverCardPrimitive.Trigger\r\n data-slot='hover-card-trigger'\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction HoverCardContent({\r\n className,\r\n align = \"center\",\r\n sideOffset = 4,\r\n ...props\r\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\r\n return (\r\n <HoverCardPrimitive.Portal data-slot='hover-card-portal'>\r\n <HoverCardPrimitive.Content\r\n data-slot='hover-card-content'\r\n align={align}\r\n sideOffset={sideOffset}\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 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-hidden dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </HoverCardPrimitive.Portal>\r\n );\r\n}\r\n\r\nexport {HoverCard, HoverCardContent, HoverCardTrigger};\r\n"],"names":["HoverCard","props","HoverCardPrimitive","HoverCardTrigger","HoverCardContent","className","align","sideOffset","cn"],"mappings":";;;;;AAOA,SAASA,UAAU,EAAC,GAAGC,OAA4D;IACjF,OAAO,WAAP,GACE,IAACC,MAAuB;QACtB,aAAU;QACT,GAAGD,KAAK;;AAGf;AAEA,SAASE,iBAAiB,EAAC,GAAGF,OAA+D;IAC3F,OAAO,WAAP,GACE,IAACC,SAA0B;QACzB,aAAU;QACT,GAAGD,KAAK;;AAGf;AAEA,SAASG,iBAAiB,EACxBC,SAAS,EACTC,QAAQ,QAAQ,EAChBC,aAAa,CAAC,EACd,GAAGN,OACqD;IACxD,OAAO,WAAP,GACE,IAACC,QAAyB;QAAC,aAAU;kBACnC,kBAACA,SAA0B;YACzB,aAAU;YACV,OAAOI;YACP,YAAYC;YACZ,WAAWC,GACT,gjBACAH;YAED,GAAGJ,KAAK;;;AAIjB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import { OTPInput } from "input-otp";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
|
|
4
4
|
containerClassName?: string;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,5 +8,5 @@ declare function InputOTPSlot({ index, className, ...props }: React.ComponentPro
|
|
|
8
8
|
index: number;
|
|
9
9
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export { InputOTP, InputOTPGroup,
|
|
11
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
12
12
|
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input-otp.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,QAAQ,EAAkB,MAAM,WAAW,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,2CASA;AAED,iBAAS,aAAa,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,2CAqBA;AAED,iBAAS,iBAAiB,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CASjE;AAED,OAAO,EAAC,QAAQ,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useContext } from "react";
|
|
4
3
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
5
4
|
import { MinusIcon } from "lucide-react";
|
|
6
|
-
import {
|
|
5
|
+
import { useContext } from "react";
|
|
6
|
+
import { cn } from "../../lib/utilities.js";
|
|
7
7
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
8
8
|
return /*#__PURE__*/ jsx(OTPInput, {
|
|
9
9
|
"data-slot": "input-otp",
|
|
@@ -25,14 +25,14 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
25
25
|
return /*#__PURE__*/ jsxs("div", {
|
|
26
26
|
"data-slot": "input-otp-slot",
|
|
27
27
|
"data-active": isActive,
|
|
28
|
-
className: cn("data-[active=true]:
|
|
28
|
+
className: cn("relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-red-500 data-[active=true]:z-10 data-[active=true]:border-neutral-950 data-[active=true]:ring-[3px] data-[active=true]:ring-neutral-950/50 data-[active=true]:aria-invalid:border-red-500 data-[active=true]:aria-invalid:ring-red-500/20 dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30 dark:aria-invalid:border-red-900 dark:data-[active=true]:border-neutral-300 dark:data-[active=true]:ring-neutral-300/50 dark:data-[active=true]:aria-invalid:border-red-900 dark:dark:data-[active=true]:aria-invalid:ring-red-900/40 dark:data-[active=true]:aria-invalid:ring-red-500/40 dark:data-[active=true]:aria-invalid:ring-red-900/20", className),
|
|
29
29
|
...props,
|
|
30
30
|
children: [
|
|
31
31
|
char,
|
|
32
|
-
hasFakeCaret && /*#__PURE__*/ jsx("div", {
|
|
32
|
+
Boolean(hasFakeCaret) && /*#__PURE__*/ jsx("div", {
|
|
33
33
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
34
34
|
children: /*#__PURE__*/ jsx("div", {
|
|
35
|
-
className: "animate-caret-blink
|
|
35
|
+
className: "animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50"
|
|
36
36
|
})
|
|
37
37
|
})
|
|
38
38
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\input-otp.js","sources":["webpack://@arolariu/components/./src/components/ui/input-otp.tsx"],"sourcesContent":["\n\nimport
|
|
1
|
+
{"version":3,"file":"components\\ui\\input-otp.js","sources":["webpack://@arolariu/components/./src/components/ui/input-otp.tsx"],"sourcesContent":["\r\n\r\nimport {OTPInput, OTPInputContext} from \"input-otp\";\r\nimport {MinusIcon} from \"lucide-react\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction InputOTP({\r\n className,\r\n containerClassName,\r\n ...props\r\n}: React.ComponentProps<typeof OTPInput> & {\r\n containerClassName?: string;\r\n}) {\r\n return (\r\n <OTPInput\r\n data-slot='input-otp'\r\n containerClassName={cn(\"flex items-center gap-2 has-disabled:opacity-50\", containerClassName)}\r\n className={cn(\"disabled:cursor-not-allowed\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction InputOTPGroup({className, ...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='input-otp-group'\r\n className={cn(\"flex items-center\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nfunction InputOTPSlot({\r\n index,\r\n className,\r\n ...props\r\n}: React.ComponentProps<\"div\"> & {\r\n index: number;\r\n}) {\r\n const inputOTPContext = React.useContext(OTPInputContext);\r\n const {char, hasFakeCaret, isActive} = inputOTPContext?.slots[index] ?? {};\r\n\r\n return (\r\n <div\r\n data-slot='input-otp-slot'\r\n data-active={isActive}\r\n className={cn(\r\n \"relative flex h-9 w-9 items-center justify-center border-y border-r border-neutral-200 text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-red-500 data-[active=true]:z-10 data-[active=true]:border-neutral-950 data-[active=true]:ring-[3px] data-[active=true]:ring-neutral-950/50 data-[active=true]:aria-invalid:border-red-500 data-[active=true]:aria-invalid:ring-red-500/20 dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30 dark:aria-invalid:border-red-900 dark:data-[active=true]:border-neutral-300 dark:data-[active=true]:ring-neutral-300/50 dark:data-[active=true]:aria-invalid:border-red-900 dark:dark:data-[active=true]:aria-invalid:ring-red-900/40 dark:data-[active=true]:aria-invalid:ring-red-500/40 dark:data-[active=true]:aria-invalid:ring-red-900/20\",\r\n className,\r\n )}\r\n {...props}>\r\n {char}\r\n {Boolean(hasFakeCaret) && (\r\n <div className='pointer-events-none absolute inset-0 flex items-center justify-center'>\r\n <div className='animate-caret-blink h-4 w-px bg-neutral-950 duration-1000 dark:bg-neutral-50' />\r\n </div>\r\n )}\r\n </div>\r\n );\r\n}\r\n\r\nfunction InputOTPSeparator({...props}: React.ComponentProps<\"div\">) {\r\n return (\r\n <div\r\n data-slot='input-otp-separator'\r\n role='separator'\r\n {...props}>\r\n <MinusIcon />\r\n </div>\r\n );\r\n}\r\n\r\nexport {InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot};\r\n"],"names":["InputOTP","className","containerClassName","props","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","React","OTPInputContext","char","hasFakeCaret","isActive","Boolean","InputOTPSeparator","MinusIcon"],"mappings":";;;;;;AAQA,SAASA,SAAS,EAChBC,SAAS,EACTC,kBAAkB,EAClB,GAAGC,OAGJ;IACC,OAAO,WAAP,GACE,IAACC,UAAQA;QACP,aAAU;QACV,oBAAoBC,GAAG,mDAAmDH;QAC1E,WAAWG,GAAG,+BAA+BJ;QAC5C,GAAGE,KAAK;;AAGf;AAEA,SAASG,cAAc,EAACL,SAAS,EAAE,GAAGE,OAAmC;IACvE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,WAAWE,GAAG,qBAAqBJ;QAClC,GAAGE,KAAK;;AAGf;AAEA,SAASI,aAAa,EACpBC,KAAK,EACLP,SAAS,EACT,GAAGE,OAGJ;IACC,MAAMM,kBAAkBC,WAAiBC;IACzC,MAAM,EAACC,IAAI,EAAEC,YAAY,EAAEC,QAAQ,EAAC,GAAGL,iBAAiB,KAAK,CAACD,MAAM,IAAI,CAAC;IAEzE,OAAO,WAAP,GACE,KAAC;QACC,aAAU;QACV,eAAaM;QACb,WAAWT,GACT,q1BACAJ;QAED,GAAGE,KAAK;;YACRS;YACAG,QAAQF,iBAAiB,WAAjBA,GACP,IAAC;gBAAI,WAAU;0BACb,kBAAC;oBAAI,WAAU;;;;;AAKzB;AAEA,SAASG,kBAAkB,EAAC,GAAGb,OAAmC;IAChE,OAAO,WAAP,GACE,IAAC;QACC,aAAU;QACV,MAAK;QACJ,GAAGA,KAAK;kBACT,kBAACc,WAASA,CAAAA;;AAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,iBAAS,KAAK,CAAC,EAAC,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,2CAcxE;AAED,OAAO,EAAC,KAAK,EAAC,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../lib/utilities.js";
|
|
3
4
|
import "react";
|
|
4
|
-
import { cn } from "../../lib/utils.js";
|
|
5
5
|
function Input({ className, type, ...props }) {
|
|
6
6
|
return /*#__PURE__*/ jsx("input", {
|
|
7
7
|
type: type,
|
|
8
8
|
"data-slot": "input",
|
|
9
|
-
className: cn("
|
|
9
|
+
className: cn("flex h-9 w-full min-w-0 rounded-md border border-neutral-200 bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-neutral-900 selection:text-neutral-50 file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-neutral-950 placeholder:text-neutral-500 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30 dark:selection:bg-neutral-50 dark:selection:text-neutral-900 dark:file:text-neutral-50 dark:placeholder:text-neutral-400", "focus-visible:border-neutral-950 focus-visible:ring-[3px] focus-visible:ring-neutral-950/50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50", "aria-invalid:border-red-500 aria-invalid:ring-red-500/20 dark:aria-invalid:border-red-900 dark:aria-invalid:ring-red-500/40 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40", className),
|
|
10
10
|
...props
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\input.js","sources":["webpack://@arolariu/components/./src/components/ui/input.tsx"],"sourcesContent":["\n\nimport
|
|
1
|
+
{"version":3,"file":"components\\ui\\input.js","sources":["webpack://@arolariu/components/./src/components/ui/input.tsx"],"sourcesContent":["\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\nimport * as React from \"react\";\r\n\r\nfunction Input({className, type, ...props}: React.ComponentProps<\"input\">) {\r\n return (\r\n <input\r\n type={type}\r\n data-slot='input'\r\n className={cn(\r\n \"flex h-9 w-full min-w-0 rounded-md border border-neutral-200 bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-neutral-900 selection:text-neutral-50 file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-neutral-950 placeholder:text-neutral-500 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-neutral-800 dark:bg-neutral-200/30 dark:dark:bg-neutral-800/30 dark:selection:bg-neutral-50 dark:selection:text-neutral-900 dark:file:text-neutral-50 dark:placeholder:text-neutral-400\",\r\n \"focus-visible:border-neutral-950 focus-visible:ring-[3px] focus-visible:ring-neutral-950/50 dark:focus-visible:border-neutral-300 dark:focus-visible:ring-neutral-300/50\",\r\n \"aria-invalid:border-red-500 aria-invalid:ring-red-500/20 dark:aria-invalid:border-red-900 dark:aria-invalid:ring-red-500/40 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Input};\r\n"],"names":["Input","className","type","props","cn"],"mappings":";;;;AAKA,SAASA,MAAM,EAACC,SAAS,EAAEC,IAAI,EAAE,GAAGC,OAAqC;IACvE,OAAO,WAAP,GACE,IAAC;QACC,MAAMD;QACN,aAAU;QACV,WAAWE,GACT,onBACA,4KACA,wMACAH;QAED,GAAGE,KAAK;;AAGf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Label };
|
|
5
5
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,KAAK,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAWrF;AAED,OAAO,EAAC,KAAK,EAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import "react";
|
|
4
3
|
import { Root } from "@radix-ui/react-label";
|
|
5
|
-
import
|
|
4
|
+
import "react";
|
|
5
|
+
import { cn } from "../../lib/utilities.js";
|
|
6
6
|
function Label({ className, ...props }) {
|
|
7
7
|
return /*#__PURE__*/ jsx(Root, {
|
|
8
8
|
"data-slot": "label",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\ui\\label.js","sources":["webpack://@arolariu/components/./src/components/ui/label.tsx"],"sourcesContent":["\n\nimport * as
|
|
1
|
+
{"version":3,"file":"components\\ui\\label.js","sources":["webpack://@arolariu/components/./src/components/ui/label.tsx"],"sourcesContent":["\r\n\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\r\nimport * as React from \"react\";\r\n\r\nimport {cn} from \"@/lib/utilities\";\r\n\r\nfunction Label({className, ...props}: React.ComponentProps<typeof LabelPrimitive.Root>) {\r\n return (\r\n <LabelPrimitive.Root\r\n data-slot='label'\r\n className={cn(\r\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {Label};\r\n"],"names":["Label","className","props","LabelPrimitive","cn"],"mappings":";;;;;AAOA,SAASA,MAAM,EAACC,SAAS,EAAE,GAAGC,OAAwD;IACpF,OAAO,WAAP,GACE,IAACC,MAAmB;QAClB,aAAU;QACV,WAAWC,GACT,uNACAH;QAED,GAAGC,KAAK;;AAGf"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
1
|
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare function MenubarMenu({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Menu>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
declare function MenubarGroup({ ...props }: React.ComponentProps<typeof MenubarPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,5 +23,5 @@ declare function MenubarSubTrigger({ className, inset, children, ...props }: Rea
|
|
|
23
23
|
inset?: boolean;
|
|
24
24
|
}): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
declare function MenubarSubContent({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
26
|
-
export { Menubar,
|
|
26
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, };
|
|
27
27
|
//# sourceMappingURL=menubar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,OAAO,CAAC,EAAC,SAAS,EAAE,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAWzF;AAED,iBAAS,WAAW,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAOlF;AAED,iBAAS,YAAY,CAAC,EAAC,GAAG,KAAK,EAAC,EAAE,KAAK,CAAC,cAAc,CAAC,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