@gv-tech/design-system 2.15.2 → 2.17.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/README.md +13 -13
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.cjs.map +1 -1
- package/dist/accordion.mjs +12 -12
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.cjs.map +1 -1
- package/dist/alert-dialog.mjs +21 -21
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -2
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +1 -1
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.mjs +12 -12
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +2 -2
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +2 -2
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +2 -2
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +2 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -2
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +2 -2
- package/dist/chart.cjs +1 -1
- package/dist/chart.mjs +2 -2
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.mjs +3 -3
- package/dist/checkbox.mjs.map +1 -1
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +1 -1
- package/dist/command.cjs +1 -1
- package/dist/command.cjs.map +1 -1
- package/dist/command.mjs +25 -25
- package/dist/command.mjs.map +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.cjs.map +1 -1
- package/dist/context-menu.mjs +42 -42
- package/dist/context-menu.mjs.map +1 -1
- package/dist/design-system.css +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.mjs +18 -18
- package/dist/dialog.mjs.map +1 -1
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.cjs.map +1 -1
- package/dist/drawer.mjs +19 -19
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.cjs.map +1 -1
- package/dist/dropdown-menu.mjs +58 -58
- package/dist/dropdown-menu.mjs.map +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +2 -2
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.cjs.map +1 -1
- package/dist/hover-card.mjs +4 -4
- package/dist/hover-card.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +113 -0
- package/dist/index.mjs +119 -113
- package/dist/index.mjs.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -2
- package/dist/label.cjs +1 -1
- package/dist/label.cjs.map +1 -1
- package/dist/label.mjs +4 -4
- package/dist/label.mjs.map +1 -1
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.cjs.map +1 -1
- package/dist/menubar.mjs +44 -44
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.cjs.map +1 -1
- package/dist/navigation-menu.mjs +17 -17
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +2 -2
- package/dist/popover.cjs +1 -1
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.mjs +8 -8
- package/dist/popover.mjs.map +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.cjs.map +1 -1
- package/dist/progress.mjs +9 -9
- package/dist/progress.mjs.map +1 -1
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.cjs.map +1 -1
- package/dist/radio-group.mjs +8 -8
- package/dist/radio-group.mjs.map +1 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +2 -2
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.cjs.map +1 -1
- package/dist/scroll-area.mjs +11 -11
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/scroll-to-top.cjs +2 -0
- package/dist/scroll-to-top.cjs.map +1 -0
- package/dist/scroll-to-top.d.ts +37 -0
- package/dist/scroll-to-top.mjs +86 -0
- package/dist/scroll-to-top.mjs.map +1 -0
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +4 -4
- package/dist/select.cjs +1 -1
- package/dist/select.cjs.map +1 -1
- package/dist/select.mjs +37 -37
- package/dist/select.mjs.map +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.mjs +7 -7
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.cjs.map +1 -1
- package/dist/sheet.mjs +20 -20
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -2
- package/dist/slider.cjs +1 -1
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.mjs +3 -3
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.mjs +1 -1
- package/dist/support-fab.cjs +2 -0
- package/dist/support-fab.cjs.map +1 -0
- package/dist/support-fab.d.ts +20 -0
- package/dist/support-fab.mjs +120 -0
- package/dist/support-fab.mjs.map +1 -0
- package/dist/switch.cjs +1 -1
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.mjs +7 -7
- package/dist/switch.mjs.map +1 -1
- package/dist/table-of-contents.cjs +2 -0
- package/dist/table-of-contents.cjs.map +1 -0
- package/dist/table-of-contents.d.ts +68 -0
- package/dist/table-of-contents.mjs +161 -0
- package/dist/table-of-contents.mjs.map +1 -0
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -2
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.mjs +13 -13
- package/dist/tabs.mjs.map +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +2 -2
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -2
- package/dist/theme-provider.cjs +1 -1
- package/dist/theme-provider.mjs +1 -1
- package/dist/{theme-toggle-B1DHy3Aq.mjs → theme-toggle-BNtYv2Jv.mjs} +5 -5
- package/dist/{theme-toggle-B1DHy3Aq.mjs.map → theme-toggle-BNtYv2Jv.mjs.map} +1 -1
- package/dist/{theme-toggle-CEOvAx_E.js → theme-toggle-DK_OhDRf.js} +2 -2
- package/dist/{theme-toggle-CEOvAx_E.js.map → theme-toggle-DK_OhDRf.js.map} +1 -1
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +3 -3
- package/dist/toast.cjs +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.mjs +17 -17
- package/dist/toast.mjs.map +1 -1
- package/dist/{toaster-BqX0t2H6.mjs → toaster-Cj_SryBI.mjs} +2 -2
- package/dist/{toaster-BqX0t2H6.mjs.map → toaster-Cj_SryBI.mjs.map} +1 -1
- package/dist/{toaster-CKwNMV1Z.js → toaster-Q_hzVonm.js} +2 -2
- package/dist/{toaster-CKwNMV1Z.js.map → toaster-Q_hzVonm.js.map} +1 -1
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -2
- package/dist/{toggle-Dmzr60z6.mjs → toggle-DPMTgo47.mjs} +2 -2
- package/dist/{toggle-Dmzr60z6.mjs.map → toggle-DPMTgo47.mjs.map} +1 -1
- package/dist/{toggle-BAzsZDaN.js → toggle-_F_yB_Dj.js} +2 -2
- package/dist/{toggle-BAzsZDaN.js.map → toggle-_F_yB_Dj.js.map} +1 -1
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.cjs.map +1 -1
- package/dist/toggle-group.mjs +19 -19
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.cjs.map +1 -1
- package/dist/toggle.mjs +7 -7
- package/dist/toggle.mjs.map +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.mjs +11 -11
- package/dist/tooltip.mjs.map +1 -1
- package/dist/utils-Bgpn0CK0.mjs +12 -0
- package/dist/utils-Bgpn0CK0.mjs.map +1 -0
- package/dist/utils-CBWPs0D7.js +2 -0
- package/dist/utils-CBWPs0D7.js.map +1 -0
- package/dist/{vendor-DxBXMLEx.mjs → vendor-BQwS7aJt.mjs} +1953 -1929
- package/dist/vendor-BQwS7aJt.mjs.map +1 -0
- package/dist/{vendor-DQFuDa7q.js → vendor-B_07FHqh.js} +14 -14
- package/dist/vendor-B_07FHqh.js.map +1 -0
- package/package.json +73 -78
- package/dist/utils-DKStzUzN.js +0 -2
- package/dist/utils-DKStzUzN.js.map +0 -1
- package/dist/utils-Dk-Gx69q.mjs +0 -8
- package/dist/utils-Dk-Gx69q.mjs.map +0 -1
- package/dist/vendor-DQFuDa7q.js.map +0 -1
- package/dist/vendor-DxBXMLEx.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.mjs","sources":["../packages/ui-web/src/navigation-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n NavigationMenuBaseProps,\n NavigationMenuContentBaseProps,\n NavigationMenuIndicatorBaseProps,\n NavigationMenuItemBaseProps,\n NavigationMenuLinkBaseProps,\n NavigationMenuListBaseProps,\n NavigationMenuTriggerBaseProps,\n NavigationMenuViewportBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> & NavigationMenuBaseProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn('relative z-10 flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root
|
|
1
|
+
{"version":3,"file":"navigation-menu.mjs","sources":["../packages/ui-web/src/navigation-menu.tsx"],"sourcesContent":["'use client';\n\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\nimport * as React from 'react';\n\nimport {\n NavigationMenuBaseProps,\n NavigationMenuContentBaseProps,\n NavigationMenuIndicatorBaseProps,\n NavigationMenuItemBaseProps,\n NavigationMenuLinkBaseProps,\n NavigationMenuListBaseProps,\n NavigationMenuTriggerBaseProps,\n NavigationMenuViewportBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root> & NavigationMenuBaseProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn('relative z-10 flex max-w-max flex-1 items-center justify-center', className)}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root?.displayName || 'NavigationMenu';\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List> & NavigationMenuListBaseProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn('group flex flex-1 list-none items-center justify-center space-x-1', className)}\n {...props}\n />\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List?.displayName || 'NavigationMenuList';\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n 'group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent',\n);\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger> & NavigationMenuTriggerBaseProps\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <ChevronDown\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger?.displayName || 'NavigationMenuTrigger';\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content> & NavigationMenuContentBaseProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto',\n className,\n )}\n {...props}\n />\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content?.displayName || 'NavigationMenuContent';\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport> & NavigationMenuViewportBaseProps\n>(({ className, ...props }, ref) => (\n <div className={cn('absolute top-full left-0 flex justify-center')}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n 'origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]',\n className,\n )}\n ref={ref}\n {...props}\n />\n </div>\n));\nNavigationMenuViewport.displayName = NavigationMenuPrimitive.Viewport?.displayName || 'NavigationMenuViewport';\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator> & NavigationMenuIndicatorBaseProps\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n 'data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden',\n className,\n )}\n {...props}\n >\n <div className=\"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator?.displayName || 'NavigationMenuIndicator';\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuViewport,\n};\n\nexport type {\n NavigationMenuContentBaseProps as NavigationMenuContentProps,\n NavigationMenuIndicatorBaseProps as NavigationMenuIndicatorProps,\n NavigationMenuItemBaseProps as NavigationMenuItemProps,\n NavigationMenuLinkBaseProps as NavigationMenuLinkProps,\n NavigationMenuListBaseProps as NavigationMenuListProps,\n NavigationMenuBaseProps as NavigationMenuProps,\n NavigationMenuTriggerBaseProps as NavigationMenuTriggerProps,\n NavigationMenuViewportBaseProps as NavigationMenuViewportProps,\n};\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive.Root","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuPrimitive.List","NavigationMenuItem","NavigationMenuPrimitive.Item","navigationMenuTriggerStyle","cva","NavigationMenuTrigger","NavigationMenuPrimitive.Trigger","ChevronDown","NavigationMenuContent","NavigationMenuPrimitive.Content","NavigationMenuLink","NavigationMenuPrimitive.Link","NavigationMenuPrimitive.Viewport","NavigationMenuIndicator","NavigationMenuPrimitive.Indicator"],"mappings":";;;;AAmBA,MAAMA,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpCC,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,mEAAmEN,CAAS;AAAA,IACzF,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,4BACAM,GAAA,CAAA,CAAuB;AAAA,IAAA;AAAA,EAAA;AAC1B,CACD;AACDT,EAAe,cAAcO,GAA8B,eAAe;AAE1E,MAAMG,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1BM,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAP;AAAA,IACA,WAAWG,EAAG,qEAAqEN,CAAS;AAAA,IAC3F,GAAGE;AAAA,EAAA;AACN,CACD;AACDM,EAAmB,cAAcE,GAA8B,eAAe;AAE9E,MAAMC,IAAqBC,GAErBC,IAA6BC;AAAA,EACjC;AACF,GAEMC,IAAwBhB,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpCC,gBAAAA,EAAAA;AAAAA,EAACY;AAAAA,EAAA;AAAA,IACC,KAAAb;AAAA,IACA,WAAWG,EAAGO,KAA8B,SAASb,CAAS;AAAA,IAC7D,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MAAU;AAAA,MACXQ,gBAAAA,EAAAA;AAAAA,QAACQ;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,eAAY;AAAA,QAAA;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AACF,CACD;AACDF,EAAsB,cAAcC,GAAiC,eAAe;AAEpF,MAAME,IAAwBnB,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1BM,gBAAAA,EAAAA;AAAAA,EAACU;AAAAA,EAAA;AAAA,IACC,KAAAhB;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,EAAA;AACN,CACD;AACDgB,EAAsB,cAAcC,GAAiC,eAAe;AAEpF,MAAMC,IAAqBC,GAErBd,IAAyBR,EAAM,WAGnC,CAAC,EAAE,WAAAC,GAAW,GAAGE,KAASC,MAC1BM,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWH,EAAG,8CAA8C,GAC/D,UAAAG,gBAAAA,EAAAA;AAAAA,EAACa;AAAAA,EAAA;AAAA,IACC,WAAWhB;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAEF,KAAAG;AAAA,IACC,GAAGD;AAAA,EAAA;AACN,GACF,CACD;AACDK,EAAuB,cAAce,GAAkC,eAAe;AAEtF,MAAMC,IAA0BxB,EAAM,WAGpC,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAA,GAASC,MAC1BM,gBAAAA,EAAAA;AAAAA,EAACe;AAAAA,EAAA;AAAA,IACC,KAAArB;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEJ,UAAAO,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,yEAAA,CAAyE;AAAA,EAAA;AAC1F,CACD;AACDc,EAAwB,cAAcC,GAAmC,eAAe;"}
|
package/dist/pagination.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./vendor-B_07FHqh.js"),g=require("react"),j=require("./button.cjs"),i=require("./utils-CBWPs0D7.js");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=d(g),l=({className:e,...n})=>a.jsxRuntimeExports.jsx("nav",{role:"navigation","aria-label":"pagination",className:i.cn("mx-auto flex w-full justify-center",e),...n});l.displayName="Pagination";const c=r.forwardRef(({className:e,...n},t)=>a.jsxRuntimeExports.jsx("ul",{ref:t,className:i.cn("flex flex-row items-center gap-1",e),...n}));c.displayName="PaginationContent";const u=r.forwardRef(({className:e,...n},t)=>a.jsxRuntimeExports.jsx("li",{ref:t,className:i.cn("",e),...n}));u.displayName="PaginationItem";const o=({className:e,isActive:n,size:t="icon",...s})=>a.jsxRuntimeExports.jsx("a",{"aria-current":n?"page":void 0,className:i.cn(j.buttonVariants({variant:n?"outline":"ghost",size:t}),e),...s});o.displayName="PaginationLink";const x=({className:e,...n})=>a.jsxRuntimeExports.jsxs(o,{"aria-label":"Go to previous page",size:"default",className:i.cn("gap-1 pl-2.5",e),...n,children:[a.jsxRuntimeExports.jsx(a.ChevronLeft,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{children:"Previous"})]});x.displayName="PaginationPrevious";const p=({className:e,...n})=>a.jsxRuntimeExports.jsxs(o,{"aria-label":"Go to next page",size:"default",className:i.cn("gap-1 pr-2.5",e),...n,children:[a.jsxRuntimeExports.jsx("span",{children:"Next"}),a.jsxRuntimeExports.jsx(a.ChevronRight,{className:"h-4 w-4"})]});p.displayName="PaginationNext";const m=({className:e,...n})=>a.jsxRuntimeExports.jsxs("span",{"aria-hidden":!0,className:i.cn("flex h-9 w-9 items-center justify-center",e),...n,children:[a.jsxRuntimeExports.jsx(a.Ellipsis,{className:"h-4 w-4"}),a.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"More pages"})]});m.displayName="PaginationEllipsis";exports.Pagination=l;exports.PaginationContent=c;exports.PaginationEllipsis=m;exports.PaginationItem=u;exports.PaginationLink=o;exports.PaginationNext=p;exports.PaginationPrevious=x;
|
|
2
2
|
//# sourceMappingURL=pagination.cjs.map
|
package/dist/pagination.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as i, E as r, l as c, o as m } from "./vendor-
|
|
2
|
+
import { j as i, E as r, l as c, o as m } from "./vendor-BQwS7aJt.mjs";
|
|
3
3
|
import * as o from "react";
|
|
4
4
|
import { buttonVariants as p } from "./button.mjs";
|
|
5
|
-
import { c as e } from "./utils-
|
|
5
|
+
import { c as e } from "./utils-Bgpn0CK0.mjs";
|
|
6
6
|
const g = ({ className: s, ...a }) => /* @__PURE__ */ i.jsx(
|
|
7
7
|
"nav",
|
|
8
8
|
{
|
package/dist/popover.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-B_07FHqh.js"),s=require("react"),d=require("./utils-CBWPs0D7.js");function c(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,n.get?n:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const p=c(s),l=e.Root2$5,u=e.Trigger$4,m=e.Anchor2,a=p.forwardRef(({className:t,align:r="center",sideOffset:o=4,...n},i)=>e.jsxRuntimeExports.jsx(e.Portal,{children:e.jsxRuntimeExports.jsx(e.Content2$5,{ref:i,align:r,sideOffset:o,className:d.cn("bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none",t),...n})}));a.displayName=e.Content2$5?.displayName||"PopoverContent";exports.Popover=l;exports.PopoverAnchor=m;exports.PopoverContent=a;exports.PopoverTrigger=u;
|
|
2
2
|
//# sourceMappingURL=popover.cjs.map
|
package/dist/popover.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.cjs","sources":["../packages/ui-web/src/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport {\n PopoverAnchorBaseProps,\n PopoverBaseProps,\n PopoverContentBaseProps,\n PopoverTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & PopoverContentBaseProps\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content
|
|
1
|
+
{"version":3,"file":"popover.cjs","sources":["../packages/ui-web/src/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport {\n PopoverAnchorBaseProps,\n PopoverBaseProps,\n PopoverContentBaseProps,\n PopoverTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & PopoverContentBaseProps\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content?.displayName || 'PopoverContent';\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };\nexport type {\n PopoverAnchorBaseProps as PopoverAnchorProps,\n PopoverContentBaseProps as PopoverContentProps,\n PopoverBaseProps as PopoverProps,\n PopoverTriggerBaseProps as PopoverTriggerProps,\n};\n"],"names":["Popover","PopoverPrimitive.Root","PopoverTrigger","PopoverPrimitive.Trigger","PopoverAnchor","PopoverPrimitive.Anchor","PopoverContent","React","className","align","sideOffset","props","ref","jsx","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":"mdAaMA,EAAUC,EAAAA,QAEVC,EAAiBC,EAAAA,UAEjBC,EAAgBC,EAAAA,QAEhBC,EAAiBC,EAAM,WAG3B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAGC,CAAA,EAASC,IAC5DC,EAAAA,kBAAAA,IAACC,EAAAA,OAAA,CACC,SAAAD,EAAAA,kBAAAA,IAACE,EAAAA,WAAA,CACC,IAAAH,EACA,MAAAH,EACA,WAAAC,EACA,UAAWM,EAAAA,GACT,+dACAR,CAAA,EAED,GAAGG,CAAA,CACN,EACF,CACD,EACDL,EAAe,YAAcS,cAA0B,aAAe"}
|
package/dist/popover.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as o,
|
|
2
|
+
import { j as o, aw as d, ax as t, ay as i, az as p, aA as m } from "./vendor-BQwS7aJt.mjs";
|
|
3
3
|
import * as c from "react";
|
|
4
|
-
import { c as l } from "./utils-
|
|
5
|
-
const
|
|
4
|
+
import { c as l } from "./utils-Bgpn0CK0.mjs";
|
|
5
|
+
const v = i, x = m, h = p, f = c.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...s }, n) => /* @__PURE__ */ o.jsx(d, { children: /* @__PURE__ */ o.jsx(
|
|
6
6
|
t,
|
|
7
7
|
{
|
|
8
8
|
ref: n,
|
|
9
|
-
align:
|
|
9
|
+
align: a,
|
|
10
10
|
sideOffset: r,
|
|
11
11
|
className: l(
|
|
12
12
|
"bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none",
|
|
13
|
-
|
|
13
|
+
e
|
|
14
14
|
),
|
|
15
15
|
...s
|
|
16
16
|
}
|
|
17
17
|
) }));
|
|
18
|
-
f.displayName = t
|
|
18
|
+
f.displayName = t?.displayName || "PopoverContent";
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
v as Popover,
|
|
21
21
|
h as PopoverAnchor,
|
|
22
22
|
f as PopoverContent,
|
|
23
|
-
|
|
23
|
+
x as PopoverTrigger
|
|
24
24
|
};
|
|
25
25
|
//# sourceMappingURL=popover.mjs.map
|
package/dist/popover.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.mjs","sources":["../packages/ui-web/src/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport {\n PopoverAnchorBaseProps,\n PopoverBaseProps,\n PopoverContentBaseProps,\n PopoverTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & PopoverContentBaseProps\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content
|
|
1
|
+
{"version":3,"file":"popover.mjs","sources":["../packages/ui-web/src/popover.tsx"],"sourcesContent":["'use client';\n\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport {\n PopoverAnchorBaseProps,\n PopoverBaseProps,\n PopoverContentBaseProps,\n PopoverTriggerBaseProps,\n} from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & PopoverContentBaseProps\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground 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-72 origin-[--radix-popover-content-transform-origin] rounded-md border p-4 shadow-md outline-none',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content?.displayName || 'PopoverContent';\n\nexport { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };\nexport type {\n PopoverAnchorBaseProps as PopoverAnchorProps,\n PopoverContentBaseProps as PopoverContentProps,\n PopoverBaseProps as PopoverProps,\n PopoverTriggerBaseProps as PopoverTriggerProps,\n};\n"],"names":["Popover","PopoverPrimitive.Root","PopoverTrigger","PopoverPrimitive.Trigger","PopoverAnchor","PopoverPrimitive.Anchor","PopoverContent","React","className","align","sideOffset","props","ref","jsx","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":";;;;AAaA,MAAMA,IAAUC,GAEVC,IAAiBC,GAEjBC,IAAgBC,GAEhBC,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,GAAGC,EAAA,GAASC,MAC5DC,gBAAAA,EAAAA,IAACC,GAAA,EACC,UAAAD,gBAAAA,EAAAA;AAAAA,EAACE;AAAAA,EAAA;AAAA,IACC,KAAAH;AAAA,IACA,OAAAH;AAAA,IACA,YAAAC;AAAA,IACA,WAAWM;AAAA,MACT;AAAA,MACAR;AAAA,IAAA;AAAA,IAED,GAAGG;AAAA,EAAA;AACN,GACF,CACD;AACDL,EAAe,cAAcS,GAA0B,eAAe;"}
|
package/dist/progress.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./vendor-B_07FHqh.js"),l=require("react"),a=require("./utils-CBWPs0D7.js");function i(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=i(l),n=c.forwardRef(({className:e,value:t,...r},s)=>o.jsxRuntimeExports.jsx(o.Root$4,{ref:s,className:a.cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),value:t,...r,children:o.jsxRuntimeExports.jsx(o.Indicator$1,{className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));n.displayName=o.Root$4?.displayName||"Progress";exports.Progress=n;
|
|
2
2
|
//# sourceMappingURL=progress.cjs.map
|
package/dist/progress.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.cjs","sources":["../packages/ui-web/src/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport * as React from 'react';\n\nimport { ProgressBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & ProgressBaseProps\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}\n value={value}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root
|
|
1
|
+
{"version":3,"file":"progress.cjs","sources":["../packages/ui-web/src/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport * as React from 'react';\n\nimport { ProgressBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & ProgressBaseProps\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}\n value={value}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root?.displayName || 'Progress';\n\nexport { Progress };\nexport type { ProgressBaseProps as ProgressProps };\n"],"names":["Progress","React","className","value","props","ref","jsx","ProgressPrimitive.Root","cn","ProgressPrimitive.Indicator"],"mappings":"mdAQMA,EAAWC,EAAM,WAGrB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGC,GAASC,IACjCC,EAAAA,kBAAAA,IAACC,EAAAA,OAAA,CACC,IAAAF,EACA,UAAWG,EAAAA,GAAG,iEAAkEN,CAAS,EACzF,MAAAC,EACC,GAAGC,EAEJ,SAAAE,EAAAA,kBAAAA,IAACG,EAAAA,YAAA,CACC,UAAU,iDACV,MAAO,CAAE,UAAW,eAAe,KAAON,GAAS,EAAE,IAAA,CAAK,CAAA,CAC5D,CACF,CACD,EACDH,EAAS,YAAcO,UAAwB,aAAe"}
|
package/dist/progress.mjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as
|
|
2
|
+
import { j as a, aB as s, aC as t } from "./vendor-BQwS7aJt.mjs";
|
|
3
3
|
import * as i from "react";
|
|
4
|
-
import { c as m } from "./utils-
|
|
5
|
-
const f = i.forwardRef(({ className:
|
|
4
|
+
import { c as m } from "./utils-Bgpn0CK0.mjs";
|
|
5
|
+
const f = i.forwardRef(({ className: e, value: r, ...l }, o) => /* @__PURE__ */ a.jsx(
|
|
6
6
|
s,
|
|
7
7
|
{
|
|
8
8
|
ref: o,
|
|
9
|
-
className: m("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",
|
|
10
|
-
value:
|
|
11
|
-
...
|
|
12
|
-
children: /* @__PURE__ */
|
|
9
|
+
className: m("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", e),
|
|
10
|
+
value: r,
|
|
11
|
+
...l,
|
|
12
|
+
children: /* @__PURE__ */ a.jsx(
|
|
13
13
|
t,
|
|
14
14
|
{
|
|
15
15
|
className: "bg-primary h-full w-full flex-1 transition-all",
|
|
16
|
-
style: { transform: `translateX(-${100 - (
|
|
16
|
+
style: { transform: `translateX(-${100 - (r || 0)}%)` }
|
|
17
17
|
}
|
|
18
18
|
)
|
|
19
19
|
}
|
|
20
20
|
));
|
|
21
|
-
f.displayName = s
|
|
21
|
+
f.displayName = s?.displayName || "Progress";
|
|
22
22
|
export {
|
|
23
23
|
f as Progress
|
|
24
24
|
};
|
package/dist/progress.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.mjs","sources":["../packages/ui-web/src/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport * as React from 'react';\n\nimport { ProgressBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & ProgressBaseProps\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}\n value={value}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root
|
|
1
|
+
{"version":3,"file":"progress.mjs","sources":["../packages/ui-web/src/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport * as React from 'react';\n\nimport { ProgressBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst Progress = React.forwardRef<\n React.ElementRef<typeof ProgressPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> & ProgressBaseProps\n>(({ className, value, ...props }, ref) => (\n <ProgressPrimitive.Root\n ref={ref}\n className={cn('bg-primary/20 relative h-2 w-full overflow-hidden rounded-full', className)}\n value={value}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className=\"bg-primary h-full w-full flex-1 transition-all\"\n style={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n />\n </ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root?.displayName || 'Progress';\n\nexport { Progress };\nexport type { ProgressBaseProps as ProgressProps };\n"],"names":["Progress","React","className","value","props","ref","jsx","ProgressPrimitive.Root","cn","ProgressPrimitive.Indicator"],"mappings":";;;;AAQA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,OAAAC,GAAO,GAAGC,KAASC,MACjCC,gBAAAA,EAAAA;AAAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG,EAAG,kEAAkEN,CAAS;AAAA,IACzF,OAAAC;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAAE,gBAAAA,EAAAA;AAAAA,MAACG;AAAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,WAAW,eAAe,OAAON,KAAS,EAAE,KAAA;AAAA,MAAK;AAAA,IAAA;AAAA,EAC5D;AACF,CACD;AACDH,EAAS,cAAcO,GAAwB,eAAe;"}
|
package/dist/radio-group.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-B_07FHqh.js"),u=require("react"),i=require("./utils-CBWPs0D7.js");function l(r){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>r[t]})}}return o.default=r,Object.freeze(o)}const a=l(u),n=a.forwardRef(({className:r,...o},t)=>e.jsxRuntimeExports.jsx(e.Root2$6,{className:i.cn("grid gap-2",r),...o,ref:t}));n.displayName=e.Root2$6?.displayName||"RadioGroup";const c=a.forwardRef(({className:r,...o},t)=>e.jsxRuntimeExports.jsx(e.Item2$1,{ref:t,className:i.cn("border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",r),...o,children:e.jsxRuntimeExports.jsx(e.Indicator$2,{className:"flex items-center justify-center",children:e.jsxRuntimeExports.jsx(e.Circle,{className:"fill-primary h-3.5 w-3.5"})})}));c.displayName=e.Item2$1?.displayName||"RadioGroupItem";exports.RadioGroup=n;exports.RadioGroupItem=c;
|
|
2
2
|
//# sourceMappingURL=radio-group.cjs.map
|
package/dist/radio-group.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.cjs","sources":["../packages/ui-web/src/radio-group.tsx"],"sourcesContent":["'use client';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;\n },\n);\nRadioGroup.displayName = RadioGroupPrimitive.Root
|
|
1
|
+
{"version":3,"file":"radio-group.cjs","sources":["../packages/ui-web/src/radio-group.tsx"],"sourcesContent":["'use client';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;\n },\n);\nRadioGroup.displayName = RadioGroupPrimitive.Root?.displayName || 'RadioGroup';\n\nexport interface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemBaseProps {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"fill-primary h-3.5 w-3.5\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n },\n);\nRadioGroupItem.displayName = RadioGroupPrimitive.Item?.displayName || 'RadioGroupItem';\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":"mdAWMA,EAAaC,EAAM,WACvB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IACjBC,wBAACC,EAAAA,QAAA,CAAyB,UAAWC,EAAAA,GAAG,aAAcL,CAAS,EAAI,GAAGC,EAAO,IAAAC,EAAU,CAElG,EACAJ,EAAW,YAAcM,WAA0B,aAAe,aAKlE,MAAME,EAAiBP,EAAM,WAC3B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAEtBC,EAAAA,kBAAAA,IAACI,EAAAA,QAAA,CACC,IAAAL,EACA,UAAWG,EAAAA,GACT,+LACAL,CAAA,EAED,GAAGC,EAEJ,SAAAE,EAAAA,kBAAAA,IAACK,cAAA,CAA8B,UAAU,mCACvC,SAAAL,EAAAA,kBAAAA,IAACM,EAAAA,OAAA,CAAO,UAAU,0BAAA,CAA2B,CAAA,CAC/C,CAAA,CAAA,CAIR,EACAH,EAAe,YAAcC,WAA0B,aAAe"}
|
package/dist/radio-group.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as a,
|
|
2
|
+
import { j as a, aD as o, aE as i, aF as l, V as c } from "./vendor-BQwS7aJt.mjs";
|
|
3
3
|
import * as t from "react";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as d } from "./utils-Bgpn0CK0.mjs";
|
|
5
5
|
const m = t.forwardRef(
|
|
6
|
-
({ className: r, ...e }, s) => /* @__PURE__ */ a.jsx(
|
|
6
|
+
({ className: r, ...e }, s) => /* @__PURE__ */ a.jsx(o, { className: d("grid gap-2", r), ...e, ref: s })
|
|
7
7
|
);
|
|
8
|
-
m.displayName =
|
|
8
|
+
m.displayName = o?.displayName || "RadioGroup";
|
|
9
9
|
const n = t.forwardRef(
|
|
10
10
|
({ className: r, ...e }, s) => /* @__PURE__ */ a.jsx(
|
|
11
|
-
|
|
11
|
+
i,
|
|
12
12
|
{
|
|
13
13
|
ref: s,
|
|
14
|
-
className:
|
|
14
|
+
className: d(
|
|
15
15
|
"border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
16
|
r
|
|
17
17
|
),
|
|
18
18
|
...e,
|
|
19
|
-
children: /* @__PURE__ */ a.jsx(
|
|
19
|
+
children: /* @__PURE__ */ a.jsx(l, { className: "flex items-center justify-center", children: /* @__PURE__ */ a.jsx(c, { className: "fill-primary h-3.5 w-3.5" }) })
|
|
20
20
|
}
|
|
21
21
|
)
|
|
22
22
|
);
|
|
23
|
-
n.displayName =
|
|
23
|
+
n.displayName = i?.displayName || "RadioGroupItem";
|
|
24
24
|
export {
|
|
25
25
|
m as RadioGroup,
|
|
26
26
|
n as RadioGroupItem
|
package/dist/radio-group.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.mjs","sources":["../packages/ui-web/src/radio-group.tsx"],"sourcesContent":["'use client';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;\n },\n);\nRadioGroup.displayName = RadioGroupPrimitive.Root
|
|
1
|
+
{"version":3,"file":"radio-group.mjs","sources":["../packages/ui-web/src/radio-group.tsx"],"sourcesContent":["'use client';\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { Circle } from 'lucide-react';\nimport * as React from 'react';\n\nimport type { RadioGroupBaseProps, RadioGroupItemBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nexport interface RadioGroupProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, RadioGroupBaseProps {}\n\nconst RadioGroup = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Root>, RadioGroupProps>(\n ({ className, ...props }, ref) => {\n return <RadioGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={ref} />;\n },\n);\nRadioGroup.displayName = RadioGroupPrimitive.Root?.displayName || 'RadioGroup';\n\nexport interface RadioGroupItemProps\n extends React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemBaseProps {}\n\nconst RadioGroupItem = React.forwardRef<React.ElementRef<typeof RadioGroupPrimitive.Item>, RadioGroupItemProps>(\n ({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-primary text-primary focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border shadow focus:outline-none focus-visible:ring-1 disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <Circle className=\"fill-primary h-3.5 w-3.5\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n },\n);\nRadioGroupItem.displayName = RadioGroupPrimitive.Item?.displayName || 'RadioGroupItem';\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":";;;;AAWA,MAAMA,IAAaC,EAAM;AAAA,EACvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MACjBC,gBAAAA,MAACC,GAAA,EAAyB,WAAWC,EAAG,cAAcL,CAAS,GAAI,GAAGC,GAAO,KAAAC,GAAU;AAElG;AACAJ,EAAW,cAAcM,GAA0B,eAAe;AAKlE,MAAME,IAAiBP,EAAM;AAAA,EAC3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEtBC,gBAAAA,EAAAA;AAAAA,IAACI;AAAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAL;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEJ,UAAAE,gBAAAA,EAAAA,IAACK,GAAA,EAA8B,WAAU,oCACvC,UAAAL,gBAAAA,EAAAA,IAACM,GAAA,EAAO,WAAU,2BAAA,CAA2B,EAAA,CAC/C;AAAA,IAAA;AAAA,EAAA;AAIR;AACAH,EAAe,cAAcC,GAA0B,eAAe;"}
|
package/dist/resizable.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-B_07FHqh.js"),i=require("./utils-CBWPs0D7.js"),l=({className:t,direction:a,...r})=>e.jsxRuntimeExports.jsx(e.Dt,{orientation:a,className:i.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),...r}),n=e.At,s=({withHandle:t,className:a,...r})=>e.jsxRuntimeExports.jsx(e.Ft,{className:i.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",a),...r,children:t&&e.jsxRuntimeExports.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-sm border",children:e.jsxRuntimeExports.jsx(e.GripVertical,{className:"h-2.5 w-2.5"})})});exports.ResizableHandle=s;exports.ResizablePanel=n;exports.ResizablePanelGroup=l;
|
|
2
2
|
//# sourceMappingURL=resizable.cjs.map
|
package/dist/resizable.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { c as i } from "./utils-
|
|
2
|
+
import { aG as l, j as e, aH as n, aI as s, aJ as o } from "./vendor-BQwS7aJt.mjs";
|
|
3
|
+
import { c as i } from "./utils-Bgpn0CK0.mjs";
|
|
4
4
|
const d = ({
|
|
5
5
|
className: a,
|
|
6
6
|
direction: t,
|
package/dist/scroll-area.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./vendor-B_07FHqh.js"),i=require("react"),s=require("./utils-CBWPs0D7.js");function u(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(l,t,o.get?o:{enumerable:!0,get:()=>r[t]})}}return l.default=r,Object.freeze(l)}const c=u(i),n=c.forwardRef(({className:r,children:l,...t},o)=>e.jsxRuntimeExports.jsxs(e.Root$5,{ref:o,className:s.cn("relative overflow-hidden",r),...t,children:[e.jsxRuntimeExports.jsx(e.Viewport$1,{className:"h-full w-full rounded-[inherit]",children:l}),e.jsxRuntimeExports.jsx(a,{}),e.jsxRuntimeExports.jsx(e.Corner,{})]}));n.displayName=e.Root$5?.displayName||"ScrollArea";const a=c.forwardRef(({className:r,orientation:l="vertical",...t},o)=>e.jsxRuntimeExports.jsx(e.ScrollAreaScrollbar,{ref:o,orientation:l,className:s.cn("flex touch-none transition-colors select-none",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...t,children:e.jsxRuntimeExports.jsx(e.ScrollAreaThumb,{className:"bg-border relative flex-1 rounded-full"})}));a.displayName=e.ScrollAreaScrollbar?.displayName||"ScrollBar";exports.ScrollArea=n;exports.ScrollBar=a;
|
|
2
2
|
//# sourceMappingURL=scroll-area.cjs.map
|
package/dist/scroll-area.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.cjs","sources":["../packages/ui-web/src/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport * as React from 'react';\n\nimport { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root
|
|
1
|
+
{"version":3,"file":"scroll-area.cjs","sources":["../packages/ui-web/src/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport * as React from 'react';\n\nimport { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root?.displayName || 'ScrollArea';\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & ScrollBarBaseProps\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar?.displayName || 'ScrollBar';\n\nexport { ScrollArea, ScrollBar };\nexport type { ScrollAreaBaseProps as ScrollAreaProps, ScrollBarBaseProps as ScrollBarProps };\n"],"names":["ScrollArea","React","className","children","props","ref","ScrollAreaPrimitive.Root","cn","jsx","ScrollAreaPrimitive.Viewport","ScrollBar","ScrollAreaPrimitive.Corner","orientation","ScrollAreaPrimitive.ScrollAreaScrollbar","ScrollAreaPrimitive.ScrollAreaThumb"],"mappings":"mdAQMA,EAAaC,EAAM,WAGvB,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAA,EAASC,6BACnCC,EAAAA,OAAA,CAAyB,IAAAD,EAAU,UAAWE,EAAAA,GAAG,2BAA4BL,CAAS,EAAI,GAAGE,EAC5F,SAAA,CAAAI,EAAAA,kBAAAA,IAACC,EAAAA,WAAA,CAA6B,UAAU,kCAAmC,SAAAN,CAAA,CAAS,0BACnFO,EAAA,EAAU,EACXF,EAAAA,kBAAAA,IAACG,EAAAA,OAAA,CAAA,CAA2B,CAAA,EAC9B,CACD,EACDX,EAAW,YAAcM,UAA0B,aAAe,aAElE,MAAMI,EAAYT,EAAM,WAGtB,CAAC,CAAE,UAAAC,EAAW,YAAAU,EAAc,WAAY,GAAGR,GAASC,IACpDG,EAAAA,kBAAAA,IAACK,EAAAA,oBAAA,CACC,IAAAR,EACA,YAAAO,EACA,UAAWL,EAAAA,GACT,gDACAK,IAAgB,YAAc,qDAC9BA,IAAgB,cAAgB,uDAChCV,CAAA,EAED,GAAGE,EAEJ,SAAAI,EAAAA,kBAAAA,IAACM,EAAAA,gBAAA,CAAoC,UAAU,wCAAA,CAAyC,CAAA,CAC1F,CACD,EACDJ,EAAU,YAAcG,uBAAyC,aAAe"}
|
package/dist/scroll-area.mjs
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as r,
|
|
3
|
-
import * as
|
|
4
|
-
import { c as d } from "./utils-
|
|
5
|
-
const f =
|
|
2
|
+
import { j as r, aK as s, aL as i, aM as m, aN as c, aO as p } from "./vendor-BQwS7aJt.mjs";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { c as d } from "./utils-Bgpn0CK0.mjs";
|
|
5
|
+
const f = t.forwardRef(({ className: l, children: a, ...e }, o) => /* @__PURE__ */ r.jsxs(s, { ref: o, className: d("relative overflow-hidden", l), ...e, children: [
|
|
6
6
|
/* @__PURE__ */ r.jsx(i, { className: "h-full w-full rounded-[inherit]", children: a }),
|
|
7
7
|
/* @__PURE__ */ r.jsx(n, {}),
|
|
8
8
|
/* @__PURE__ */ r.jsx(m, {})
|
|
9
9
|
] }));
|
|
10
|
-
f.displayName =
|
|
11
|
-
const n =
|
|
12
|
-
|
|
10
|
+
f.displayName = s?.displayName || "ScrollArea";
|
|
11
|
+
const n = t.forwardRef(({ className: l, orientation: a = "vertical", ...e }, o) => /* @__PURE__ */ r.jsx(
|
|
12
|
+
c,
|
|
13
13
|
{
|
|
14
|
-
ref:
|
|
14
|
+
ref: o,
|
|
15
15
|
orientation: a,
|
|
16
16
|
className: d(
|
|
17
17
|
"flex touch-none transition-colors select-none",
|
|
18
18
|
a === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
19
19
|
a === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
20
|
-
|
|
20
|
+
l
|
|
21
21
|
),
|
|
22
|
-
...
|
|
22
|
+
...e,
|
|
23
23
|
children: /* @__PURE__ */ r.jsx(p, { className: "bg-border relative flex-1 rounded-full" })
|
|
24
24
|
}
|
|
25
25
|
));
|
|
26
|
-
n.displayName =
|
|
26
|
+
n.displayName = c?.displayName || "ScrollBar";
|
|
27
27
|
export {
|
|
28
28
|
f as ScrollArea,
|
|
29
29
|
n as ScrollBar
|
package/dist/scroll-area.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.mjs","sources":["../packages/ui-web/src/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport * as React from 'react';\n\nimport { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root
|
|
1
|
+
{"version":3,"file":"scroll-area.mjs","sources":["../packages/ui-web/src/scroll-area.tsx"],"sourcesContent":["'use client';\n\nimport * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';\nimport * as React from 'react';\n\nimport { ScrollAreaBaseProps, ScrollBarBaseProps } from '@gv-tech/ui-core';\nimport { cn } from './lib/utils';\n\nconst ScrollArea = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & ScrollAreaBaseProps\n>(({ className, children, ...props }, ref) => (\n <ScrollAreaPrimitive.Root ref={ref} className={cn('relative overflow-hidden', className)} {...props}>\n <ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">{children}</ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root?.displayName || 'ScrollArea';\n\nconst ScrollBar = React.forwardRef<\n React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> & ScrollBarBaseProps\n>(({ className, orientation = 'vertical', ...props }, ref) => (\n <ScrollAreaPrimitive.ScrollAreaScrollbar\n ref={ref}\n orientation={orientation}\n className={cn(\n 'flex touch-none transition-colors select-none',\n orientation === 'vertical' && 'h-full w-2.5 border-l border-l-transparent p-[1px]',\n orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]',\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.ScrollAreaThumb className=\"bg-border relative flex-1 rounded-full\" />\n </ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar?.displayName || 'ScrollBar';\n\nexport { ScrollArea, ScrollBar };\nexport type { ScrollAreaBaseProps as ScrollAreaProps, ScrollBarBaseProps as ScrollBarProps };\n"],"names":["ScrollArea","React","className","children","props","ref","ScrollAreaPrimitive.Root","cn","jsx","ScrollAreaPrimitive.Viewport","ScrollBar","ScrollAreaPrimitive.Corner","orientation","ScrollAreaPrimitive.ScrollAreaScrollbar","ScrollAreaPrimitive.ScrollAreaThumb"],"mappings":";;;;AAQA,MAAMA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAASC,6BACnCC,GAAA,EAAyB,KAAAD,GAAU,WAAWE,EAAG,4BAA4BL,CAAS,GAAI,GAAGE,GAC5F,UAAA;AAAA,EAAAI,gBAAAA,EAAAA,IAACC,GAAA,EAA6B,WAAU,mCAAmC,UAAAN,EAAA,CAAS;AAAA,wBACnFO,GAAA,EAAU;AAAA,EACXF,gBAAAA,EAAAA,IAACG,GAAA,CAAA,CAA2B;AAAA,GAC9B,CACD;AACDX,EAAW,cAAcM,GAA0B,eAAe;AAElE,MAAMI,IAAYT,EAAM,WAGtB,CAAC,EAAE,WAAAC,GAAW,aAAAU,IAAc,YAAY,GAAGR,KAASC,MACpDG,gBAAAA,EAAAA;AAAAA,EAACK;AAAAA,EAAA;AAAA,IACC,KAAAR;AAAA,IACA,aAAAO;AAAA,IACA,WAAWL;AAAA,MACT;AAAA,MACAK,MAAgB,cAAc;AAAA,MAC9BA,MAAgB,gBAAgB;AAAA,MAChCV;AAAA,IAAA;AAAA,IAED,GAAGE;AAAA,IAEJ,UAAAI,gBAAAA,EAAAA,IAACM,GAAA,EAAoC,WAAU,yCAAA,CAAyC;AAAA,EAAA;AAC1F,CACD;AACDJ,EAAU,cAAcG,GAAyC,eAAe;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./vendor-B_07FHqh.js"),E=require("react"),S=require("./button.cjs"),R=require("./utils-CBWPs0D7.js");function O(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const l=O(E),T=e=>typeof e.scrollY=="number",m=e=>T(e)?e.scrollY:e.scrollTop;function N({threshold:e=240,exitDuration:s=450,behavior:n="smooth",scrollTarget:t,className:x,label:b="Scroll to top",onClick:v,tabIndex:y,type:g,...h}){const[_,u]=l.useState(!1),[c,f]=l.useState(!1),d=l.useRef(null);l.useEffect(()=>{const o=t===void 0?window:t;if(!o){u(!1);return}const r=()=>{const p=m(o);if(c){p<=e&&(u(!1),f(!1));return}u(p>e)};return r(),o.addEventListener("scroll",r,{passive:!0}),()=>{o.removeEventListener("scroll",r)}},[c,t,e]),l.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]);const a=c?"exiting":_?"visible":"hidden",w=o=>{if(v?.(o),o.defaultPrevented||c)return;const r=t===void 0?window:t;if(!r)return;f(!0);const p=Math.max(0,s);d.current=window.setTimeout(()=>{r.scrollTo({top:0,behavior:n});const j=m(r);u(!1),j<=e&&f(!1)},p)};return i.jsxRuntimeExports.jsxs(S.Button,{"aria-label":b,"data-state":a,type:g??"button",variant:"default",size:"icon",tabIndex:a==="hidden"?-1:y,className:R.cn("group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none","before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80","hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95",a==="visible"&&"translate-y-0 scale-100 opacity-100",a==="hidden"&&"pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none",a==="exiting"&&"pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none",x),onClick:w,...h,children:[i.jsxRuntimeExports.jsx("span",{className:"bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100"}),i.jsxRuntimeExports.jsx("span",{className:"border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100"}),i.jsxRuntimeExports.jsx(i.ArrowUp,{className:"relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]"}),i.jsxRuntimeExports.jsx("span",{className:"sr-only",children:b})]})}exports.ScrollToTop=N;
|
|
2
|
+
//# sourceMappingURL=scroll-to-top.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-to-top.cjs","sources":["../packages/ui-web/src/scroll-to-top.tsx"],"sourcesContent":["'use client';\n\nimport { ScrollToTopBaseProps } from '@gv-tech/ui-core';\nimport { ArrowUp } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nexport interface ScrollToTopProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ScrollToTopBaseProps {\n /** Optional custom scroll container; defaults to window when undefined. */\n scrollTarget?: Window | HTMLElement | null;\n}\n\ntype ScrollTarget = Window | HTMLElement | null;\n\nconst isWindowTarget = (target: Exclude<ScrollTarget, null>): target is Window =>\n typeof (target as Window).scrollY === 'number';\n\nconst getScrollOffset = (target: Exclude<ScrollTarget, null>) =>\n isWindowTarget(target) ? target.scrollY : target.scrollTop;\n\nexport function ScrollToTop({\n threshold = 240,\n exitDuration = 450,\n behavior = 'smooth',\n scrollTarget,\n className,\n label = 'Scroll to top',\n onClick,\n tabIndex,\n type,\n ...props\n}: ScrollToTopProps) {\n const [isVisible, setIsVisible] = React.useState(false);\n const [isExiting, setIsExiting] = React.useState(false);\n const timeoutRef = React.useRef<number | null>(null);\n\n React.useEffect(() => {\n const target = scrollTarget === undefined ? window : scrollTarget;\n\n if (!target) {\n setIsVisible(false);\n return;\n }\n\n const updateVisibility = () => {\n const offset = getScrollOffset(target);\n\n if (isExiting) {\n // Keep the control dismissed during the return-to-top animation,\n // then release once we are back under the visibility threshold.\n if (offset <= threshold) {\n setIsVisible(false);\n setIsExiting(false);\n }\n return;\n }\n\n setIsVisible(offset > threshold);\n };\n\n updateVisibility();\n target.addEventListener('scroll', updateVisibility, { passive: true });\n\n return () => {\n target.removeEventListener('scroll', updateVisibility);\n };\n }, [isExiting, scrollTarget, threshold]);\n\n React.useEffect(() => {\n return () => {\n if (timeoutRef.current !== null) {\n window.clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n const state = isExiting ? 'exiting' : isVisible ? 'visible' : 'hidden';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || isExiting) {\n return;\n }\n\n const target = scrollTarget === undefined ? window : scrollTarget;\n if (!target) {\n return;\n }\n\n setIsExiting(true);\n\n const timeout = Math.max(0, exitDuration);\n timeoutRef.current = window.setTimeout(() => {\n target.scrollTo({ top: 0, behavior });\n\n const offset = getScrollOffset(target);\n setIsVisible(false);\n\n if (offset <= threshold) {\n setIsExiting(false);\n }\n }, timeout);\n };\n\n return (\n <Button\n aria-label={label}\n data-state={state}\n type={type ?? 'button'}\n variant=\"default\"\n size=\"icon\"\n tabIndex={state === 'hidden' ? -1 : tabIndex}\n className={cn(\n 'group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',\n 'before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80',\n 'hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95',\n state === 'visible' && 'translate-y-0 scale-100 opacity-100',\n state === 'hidden' &&\n 'pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none',\n state === 'exiting' &&\n 'pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n <span className=\"bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100\" />\n <span className=\"border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100\" />\n <ArrowUp className=\"relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]\" />\n <span className=\"sr-only\">{label}</span>\n </Button>\n );\n}\n"],"names":["isWindowTarget","target","getScrollOffset","ScrollToTop","threshold","exitDuration","behavior","scrollTarget","className","label","onClick","tabIndex","type","props","isVisible","setIsVisible","React","isExiting","setIsExiting","timeoutRef","updateVisibility","offset","state","handleClick","event","timeout","jsxs","Button","cn","jsx","ArrowUp"],"mappings":"6eAeMA,EAAkBC,GACtB,OAAQA,EAAkB,SAAY,SAElCC,EAAmBD,GACvBD,EAAeC,CAAM,EAAIA,EAAO,QAAUA,EAAO,UAE5C,SAASE,EAAY,CAC1B,UAAAC,EAAY,IACZ,aAAAC,EAAe,IACf,SAAAC,EAAW,SACX,aAAAC,EACA,UAAAC,EACA,MAAAC,EAAQ,gBACR,QAAAC,EACA,SAAAC,EACA,KAAAC,EACA,GAAGC,CACL,EAAqB,CACnB,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAS,EAAK,EAChD,CAACC,EAAWC,CAAY,EAAIF,EAAM,SAAS,EAAK,EAChDG,EAAaH,EAAM,OAAsB,IAAI,EAEnDA,EAAM,UAAU,IAAM,CACpB,MAAMf,EAASM,IAAiB,OAAY,OAASA,EAErD,GAAI,CAACN,EAAQ,CACXc,EAAa,EAAK,EAClB,MACF,CAEA,MAAMK,EAAmB,IAAM,CAC7B,MAAMC,EAASnB,EAAgBD,CAAM,EAErC,GAAIgB,EAAW,CAGTI,GAAUjB,IACZW,EAAa,EAAK,EAClBG,EAAa,EAAK,GAEpB,MACF,CAEAH,EAAaM,EAASjB,CAAS,CACjC,EAEA,OAAAgB,EAAA,EACAnB,EAAO,iBAAiB,SAAUmB,EAAkB,CAAE,QAAS,GAAM,EAE9D,IAAM,CACXnB,EAAO,oBAAoB,SAAUmB,CAAgB,CACvD,CACF,EAAG,CAACH,EAAWV,EAAcH,CAAS,CAAC,EAEvCY,EAAM,UAAU,IACP,IAAM,CACPG,EAAW,UAAY,MACzB,OAAO,aAAaA,EAAW,OAAO,CAE1C,EACC,CAAA,CAAE,EAEL,MAAMG,EAAQL,EAAY,UAAYH,EAAY,UAAY,SAExDS,EAAeC,GAA+C,CAElE,GADAd,IAAUc,CAAK,EACXA,EAAM,kBAAoBP,EAC5B,OAGF,MAAMhB,EAASM,IAAiB,OAAY,OAASA,EACrD,GAAI,CAACN,EACH,OAGFiB,EAAa,EAAI,EAEjB,MAAMO,EAAU,KAAK,IAAI,EAAGpB,CAAY,EACxCc,EAAW,QAAU,OAAO,WAAW,IAAM,CAC3ClB,EAAO,SAAS,CAAE,IAAK,EAAG,SAAAK,EAAU,EAEpC,MAAMe,EAASnB,EAAgBD,CAAM,EACrCc,EAAa,EAAK,EAEdM,GAAUjB,GACZc,EAAa,EAAK,CAEtB,EAAGO,CAAO,CACZ,EAEA,OACEC,EAAAA,kBAAAA,KAACC,EAAAA,OAAA,CACC,aAAYlB,EACZ,aAAYa,EACZ,KAAMV,GAAQ,SACd,QAAQ,UACR,KAAK,OACL,SAAUU,IAAU,SAAW,GAAKX,EACpC,UAAWiB,EAAAA,GACT,2WACA,oKACA,sIACAN,IAAU,WAAa,sCACvBA,IAAU,UACR,4FACFA,IAAU,WACR,4FACFd,CAAA,EAEF,QAASe,EACR,GAAGV,EAEJ,SAAA,CAAAgB,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,oJAAA,CAAqJ,EACrKA,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,8JAAA,CAA+J,EAC/KA,EAAAA,kBAAAA,IAACC,EAAAA,QAAA,CAAQ,UAAU,+DAAA,CAAgE,EACnFD,EAAAA,kBAAAA,IAAC,OAAA,CAAK,UAAU,UAAW,SAAApB,CAAA,CAAM,CAAA,CAAA,CAAA,CAGvC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
export declare function ScrollToTop({ threshold, exitDuration, behavior, scrollTarget, className, label, onClick, tabIndex, type, ...props }: ScrollToTopProps): JSX.Element;
|
|
5
|
+
|
|
6
|
+
declare interface ScrollToTopBaseProps {
|
|
7
|
+
/**
|
|
8
|
+
* Number of pixels that must be scrolled before the control appears.
|
|
9
|
+
*
|
|
10
|
+
* @default 240
|
|
11
|
+
*/
|
|
12
|
+
threshold?: number;
|
|
13
|
+
/**
|
|
14
|
+
* Delay in milliseconds before the page scroll-to-top is triggered,
|
|
15
|
+
* allowing the exit animation to complete first.
|
|
16
|
+
*
|
|
17
|
+
* @default 450
|
|
18
|
+
*/
|
|
19
|
+
exitDuration?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Scroll behavior used when returning to the top.
|
|
22
|
+
*
|
|
23
|
+
* @default 'smooth'
|
|
24
|
+
*/
|
|
25
|
+
behavior?: ScrollBehavior;
|
|
26
|
+
/** Optional className for custom positioning and styling. */
|
|
27
|
+
className?: string;
|
|
28
|
+
/** Accessible label for the control. */
|
|
29
|
+
label?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface ScrollToTopProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement>, ScrollToTopBaseProps {
|
|
33
|
+
/** Optional custom scroll container; defaults to window when undefined. */
|
|
34
|
+
scrollTarget?: Window | HTMLElement | null;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { }
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n, bg as E } from "./vendor-BQwS7aJt.mjs";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Button as N } from "./button.mjs";
|
|
5
|
+
import { c as S } from "./utils-Bgpn0CK0.mjs";
|
|
6
|
+
const R = (e) => typeof e.scrollY == "number", d = (e) => R(e) ? e.scrollY : e.scrollTop;
|
|
7
|
+
function V({
|
|
8
|
+
threshold: e = 240,
|
|
9
|
+
exitDuration: m = 450,
|
|
10
|
+
behavior: b = "smooth",
|
|
11
|
+
scrollTarget: i,
|
|
12
|
+
className: v,
|
|
13
|
+
label: p = "Scroll to top",
|
|
14
|
+
onClick: x,
|
|
15
|
+
tabIndex: y,
|
|
16
|
+
type: g,
|
|
17
|
+
...h
|
|
18
|
+
}) {
|
|
19
|
+
const [w, a] = s.useState(!1), [l, u] = s.useState(!1), f = s.useRef(null);
|
|
20
|
+
s.useEffect(() => {
|
|
21
|
+
const t = i === void 0 ? window : i;
|
|
22
|
+
if (!t) {
|
|
23
|
+
a(!1);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const o = () => {
|
|
27
|
+
const c = d(t);
|
|
28
|
+
if (l) {
|
|
29
|
+
c <= e && (a(!1), u(!1));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
a(c > e);
|
|
33
|
+
};
|
|
34
|
+
return o(), t.addEventListener("scroll", o, { passive: !0 }), () => {
|
|
35
|
+
t.removeEventListener("scroll", o);
|
|
36
|
+
};
|
|
37
|
+
}, [l, i, e]), s.useEffect(() => () => {
|
|
38
|
+
f.current !== null && window.clearTimeout(f.current);
|
|
39
|
+
}, []);
|
|
40
|
+
const r = l ? "exiting" : w ? "visible" : "hidden", _ = (t) => {
|
|
41
|
+
if (x?.(t), t.defaultPrevented || l)
|
|
42
|
+
return;
|
|
43
|
+
const o = i === void 0 ? window : i;
|
|
44
|
+
if (!o)
|
|
45
|
+
return;
|
|
46
|
+
u(!0);
|
|
47
|
+
const c = Math.max(0, m);
|
|
48
|
+
f.current = window.setTimeout(() => {
|
|
49
|
+
o.scrollTo({ top: 0, behavior: b });
|
|
50
|
+
const j = d(o);
|
|
51
|
+
a(!1), j <= e && u(!1);
|
|
52
|
+
}, c);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ n.jsxs(
|
|
55
|
+
N,
|
|
56
|
+
{
|
|
57
|
+
"aria-label": p,
|
|
58
|
+
"data-state": r,
|
|
59
|
+
type: g ?? "button",
|
|
60
|
+
variant: "default",
|
|
61
|
+
size: "icon",
|
|
62
|
+
tabIndex: r === "hidden" ? -1 : y,
|
|
63
|
+
className: S(
|
|
64
|
+
"group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
65
|
+
"before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80",
|
|
66
|
+
"hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95",
|
|
67
|
+
r === "visible" && "translate-y-0 scale-100 opacity-100",
|
|
68
|
+
r === "hidden" && "pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none",
|
|
69
|
+
r === "exiting" && "pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none",
|
|
70
|
+
v
|
|
71
|
+
),
|
|
72
|
+
onClick: _,
|
|
73
|
+
...h,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ n.jsx("span", { className: "bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100" }),
|
|
76
|
+
/* @__PURE__ */ n.jsx("span", { className: "border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100" }),
|
|
77
|
+
/* @__PURE__ */ n.jsx(E, { className: "relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]" }),
|
|
78
|
+
/* @__PURE__ */ n.jsx("span", { className: "sr-only", children: p })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
V as ScrollToTop
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=scroll-to-top.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-to-top.mjs","sources":["../packages/ui-web/src/scroll-to-top.tsx"],"sourcesContent":["'use client';\n\nimport { ScrollToTopBaseProps } from '@gv-tech/ui-core';\nimport { ArrowUp } from 'lucide-react';\nimport * as React from 'react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nexport interface ScrollToTopProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ScrollToTopBaseProps {\n /** Optional custom scroll container; defaults to window when undefined. */\n scrollTarget?: Window | HTMLElement | null;\n}\n\ntype ScrollTarget = Window | HTMLElement | null;\n\nconst isWindowTarget = (target: Exclude<ScrollTarget, null>): target is Window =>\n typeof (target as Window).scrollY === 'number';\n\nconst getScrollOffset = (target: Exclude<ScrollTarget, null>) =>\n isWindowTarget(target) ? target.scrollY : target.scrollTop;\n\nexport function ScrollToTop({\n threshold = 240,\n exitDuration = 450,\n behavior = 'smooth',\n scrollTarget,\n className,\n label = 'Scroll to top',\n onClick,\n tabIndex,\n type,\n ...props\n}: ScrollToTopProps) {\n const [isVisible, setIsVisible] = React.useState(false);\n const [isExiting, setIsExiting] = React.useState(false);\n const timeoutRef = React.useRef<number | null>(null);\n\n React.useEffect(() => {\n const target = scrollTarget === undefined ? window : scrollTarget;\n\n if (!target) {\n setIsVisible(false);\n return;\n }\n\n const updateVisibility = () => {\n const offset = getScrollOffset(target);\n\n if (isExiting) {\n // Keep the control dismissed during the return-to-top animation,\n // then release once we are back under the visibility threshold.\n if (offset <= threshold) {\n setIsVisible(false);\n setIsExiting(false);\n }\n return;\n }\n\n setIsVisible(offset > threshold);\n };\n\n updateVisibility();\n target.addEventListener('scroll', updateVisibility, { passive: true });\n\n return () => {\n target.removeEventListener('scroll', updateVisibility);\n };\n }, [isExiting, scrollTarget, threshold]);\n\n React.useEffect(() => {\n return () => {\n if (timeoutRef.current !== null) {\n window.clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n const state = isExiting ? 'exiting' : isVisible ? 'visible' : 'hidden';\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(event);\n if (event.defaultPrevented || isExiting) {\n return;\n }\n\n const target = scrollTarget === undefined ? window : scrollTarget;\n if (!target) {\n return;\n }\n\n setIsExiting(true);\n\n const timeout = Math.max(0, exitDuration);\n timeoutRef.current = window.setTimeout(() => {\n target.scrollTo({ top: 0, behavior });\n\n const offset = getScrollOffset(target);\n setIsVisible(false);\n\n if (offset <= threshold) {\n setIsExiting(false);\n }\n }, timeout);\n };\n\n return (\n <Button\n aria-label={label}\n data-state={state}\n type={type ?? 'button'}\n variant=\"default\"\n size=\"icon\"\n tabIndex={state === 'hidden' ? -1 : tabIndex}\n className={cn(\n 'group border-primary/40 bg-primary text-primary-foreground focus-visible:ring-ring fixed right-6 bottom-6 z-50 inline-flex h-14 w-14 items-center justify-center overflow-hidden rounded-full border shadow-[0_18px_40px_-22px_hsl(var(--primary)/0.9)] transition-all duration-500 ease-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none',\n 'before:pointer-events-none before:absolute before:inset-0 before:bg-[radial-gradient(circle_at_35%_30%,rgba(255,255,255,0.45),transparent_55%)] before:opacity-80',\n 'hover:-translate-y-1 hover:scale-105 hover:shadow-[0_24px_48px_-24px_hsl(var(--primary)/0.95)] active:translate-y-0 active:scale-95',\n state === 'visible' && 'translate-y-0 scale-100 opacity-100',\n state === 'hidden' &&\n 'pointer-events-none translate-y-24 scale-75 opacity-0 blur-[1px] motion-safe:animate-none',\n state === 'exiting' &&\n 'pointer-events-none translate-y-28 scale-90 opacity-0 blur-[2px] motion-safe:animate-none',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n <span className=\"bg-primary-foreground/20 absolute inset-0 rounded-full opacity-0 transition-opacity duration-500 group-hover:animate-pulse group-hover:opacity-100\" />\n <span className=\"border-primary-foreground/35 absolute inset-0 rounded-full border opacity-0 transition-opacity duration-300 group-hover:animate-ping group-hover:opacity-100\" />\n <ArrowUp className=\"relative z-10 h-5 w-5 drop-shadow-[0_2px_2px_rgba(0,0,0,0.2)]\" />\n <span className=\"sr-only\">{label}</span>\n </Button>\n );\n}\n"],"names":["isWindowTarget","target","getScrollOffset","ScrollToTop","threshold","exitDuration","behavior","scrollTarget","className","label","onClick","tabIndex","type","props","isVisible","setIsVisible","React","isExiting","setIsExiting","timeoutRef","updateVisibility","offset","state","handleClick","event","timeout","jsxs","Button","cn","jsx","ArrowUp"],"mappings":";;;;;AAeA,MAAMA,IAAiB,CAACC,MACtB,OAAQA,EAAkB,WAAY,UAElCC,IAAkB,CAACD,MACvBD,EAAeC,CAAM,IAAIA,EAAO,UAAUA,EAAO;AAE5C,SAASE,EAAY;AAAA,EAC1B,WAAAC,IAAY;AAAA,EACZ,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAM,SAAS,EAAK,GAChD,CAACC,GAAWC,CAAY,IAAIF,EAAM,SAAS,EAAK,GAChDG,IAAaH,EAAM,OAAsB,IAAI;AAEnD,EAAAA,EAAM,UAAU,MAAM;AACpB,UAAMf,IAASM,MAAiB,SAAY,SAASA;AAErD,QAAI,CAACN,GAAQ;AACX,MAAAc,EAAa,EAAK;AAClB;AAAA,IACF;AAEA,UAAMK,IAAmB,MAAM;AAC7B,YAAMC,IAASnB,EAAgBD,CAAM;AAErC,UAAIgB,GAAW;AAGb,QAAII,KAAUjB,MACZW,EAAa,EAAK,GAClBG,EAAa,EAAK;AAEpB;AAAA,MACF;AAEA,MAAAH,EAAaM,IAASjB,CAAS;AAAA,IACjC;AAEA,WAAAgB,EAAA,GACAnB,EAAO,iBAAiB,UAAUmB,GAAkB,EAAE,SAAS,IAAM,GAE9D,MAAM;AACX,MAAAnB,EAAO,oBAAoB,UAAUmB,CAAgB;AAAA,IACvD;AAAA,EACF,GAAG,CAACH,GAAWV,GAAcH,CAAS,CAAC,GAEvCY,EAAM,UAAU,MACP,MAAM;AACX,IAAIG,EAAW,YAAY,QACzB,OAAO,aAAaA,EAAW,OAAO;AAAA,EAE1C,GACC,CAAA,CAAE;AAEL,QAAMG,IAAQL,IAAY,YAAYH,IAAY,YAAY,UAExDS,IAAc,CAACC,MAA+C;AAElE,QADAd,IAAUc,CAAK,GACXA,EAAM,oBAAoBP;AAC5B;AAGF,UAAMhB,IAASM,MAAiB,SAAY,SAASA;AACrD,QAAI,CAACN;AACH;AAGF,IAAAiB,EAAa,EAAI;AAEjB,UAAMO,IAAU,KAAK,IAAI,GAAGpB,CAAY;AACxC,IAAAc,EAAW,UAAU,OAAO,WAAW,MAAM;AAC3C,MAAAlB,EAAO,SAAS,EAAE,KAAK,GAAG,UAAAK,GAAU;AAEpC,YAAMe,IAASnB,EAAgBD,CAAM;AACrC,MAAAc,EAAa,EAAK,GAEdM,KAAUjB,KACZc,EAAa,EAAK;AAAA,IAEtB,GAAGO,CAAO;AAAA,EACZ;AAEA,SACEC,gBAAAA,EAAAA;AAAAA,IAACC;AAAA,IAAA;AAAA,MACC,cAAYlB;AAAA,MACZ,cAAYa;AAAA,MACZ,MAAMV,KAAQ;AAAA,MACd,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,UAAUU,MAAU,WAAW,KAAKX;AAAA,MACpC,WAAWiB;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAN,MAAU,aAAa;AAAA,QACvBA,MAAU,YACR;AAAA,QACFA,MAAU,aACR;AAAA,QACFd;AAAA,MAAA;AAAA,MAEF,SAASe;AAAA,MACR,GAAGV;AAAA,MAEJ,UAAA;AAAA,QAAAgB,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,qJAAA,CAAqJ;AAAA,QACrKA,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,+JAAA,CAA+J;AAAA,QAC/KA,gBAAAA,EAAAA,IAACC,GAAA,EAAQ,WAAU,gEAAA,CAAgE;AAAA,QACnFD,gBAAAA,EAAAA,IAAC,QAAA,EAAK,WAAU,WAAW,UAAApB,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGvC;"}
|