@gv-tech/design-system 2.23.1 → 2.23.3
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/dist/accordion.cjs.map +1 -1
- package/dist/accordion.mjs.map +1 -1
- package/dist/alert-dialog.cjs.map +1 -1
- package/dist/alert-dialog.mjs.map +1 -1
- package/dist/alert.cjs.map +1 -1
- package/dist/alert.mjs.map +1 -1
- package/dist/aspect-ratio.cjs.map +1 -1
- package/dist/aspect-ratio.mjs.map +1 -1
- package/dist/avatar.cjs.map +1 -1
- package/dist/avatar.mjs.map +1 -1
- package/dist/badge.cjs.map +1 -1
- package/dist/badge.mjs.map +1 -1
- package/dist/breadcrumb.cjs.map +1 -1
- package/dist/breadcrumb.mjs.map +1 -1
- package/dist/button.cjs.map +1 -1
- package/dist/button.mjs.map +1 -1
- package/dist/calendar.cjs.map +1 -1
- package/dist/calendar.mjs.map +1 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.mjs.map +1 -1
- package/dist/carousel.cjs.map +1 -1
- package/dist/carousel.mjs.map +1 -1
- package/dist/checkbox.cjs.map +1 -1
- package/dist/checkbox.mjs.map +1 -1
- package/dist/collapsible.cjs.map +1 -1
- package/dist/collapsible.mjs.map +1 -1
- package/dist/command.cjs.map +1 -1
- package/dist/command.mjs.map +1 -1
- package/dist/context-menu.cjs.map +1 -1
- package/dist/context-menu.mjs.map +1 -1
- package/dist/design-system.css +1 -1
- package/dist/dialog.cjs.map +1 -1
- package/dist/dialog.mjs.map +1 -1
- package/dist/drawer.cjs.map +1 -1
- package/dist/drawer.mjs.map +1 -1
- package/dist/dropdown-menu.cjs.map +1 -1
- package/dist/dropdown-menu.mjs.map +1 -1
- package/dist/hover-card.cjs.map +1 -1
- package/dist/hover-card.mjs.map +1 -1
- package/dist/input.cjs.map +1 -1
- package/dist/input.mjs.map +1 -1
- package/dist/label.cjs.map +1 -1
- package/dist/label.mjs.map +1 -1
- package/dist/menubar.cjs.map +1 -1
- package/dist/menubar.mjs.map +1 -1
- package/dist/navigation-menu.cjs.map +1 -1
- package/dist/navigation-menu.mjs.map +1 -1
- package/dist/packages/ui-web/src/accordion.d.ts +2 -0
- package/dist/packages/ui-web/src/alert-dialog.d.ts +2 -0
- package/dist/packages/ui-web/src/alert.d.ts +2 -0
- package/dist/packages/ui-web/src/aspect-ratio.d.ts +2 -0
- package/dist/packages/ui-web/src/avatar.d.ts +2 -0
- package/dist/packages/ui-web/src/badge.d.ts +2 -0
- package/dist/packages/ui-web/src/breadcrumb.d.ts +2 -0
- package/dist/packages/ui-web/src/button.d.ts +2 -0
- package/dist/packages/ui-web/src/calendar.d.ts +2 -0
- package/dist/packages/ui-web/src/card.d.ts +2 -0
- package/dist/packages/ui-web/src/carousel.d.ts +2 -0
- package/dist/packages/ui-web/src/checkbox.d.ts +2 -0
- package/dist/packages/ui-web/src/collapsible.d.ts +2 -0
- package/dist/packages/ui-web/src/command.d.ts +2 -0
- package/dist/packages/ui-web/src/context-menu.d.ts +2 -0
- package/dist/packages/ui-web/src/dialog.d.ts +2 -0
- package/dist/packages/ui-web/src/drawer.d.ts +2 -0
- package/dist/packages/ui-web/src/dropdown-menu.d.ts +2 -0
- package/dist/packages/ui-web/src/hover-card.d.ts +2 -0
- package/dist/packages/ui-web/src/input.d.ts +2 -0
- package/dist/packages/ui-web/src/label.d.ts +2 -0
- package/dist/packages/ui-web/src/menubar.d.ts +2 -0
- package/dist/packages/ui-web/src/navigation-menu.d.ts +2 -0
- package/dist/packages/ui-web/src/pagination.d.ts +2 -0
- package/dist/packages/ui-web/src/popover.d.ts +2 -0
- package/dist/packages/ui-web/src/progress.d.ts +2 -0
- package/dist/packages/ui-web/src/scroll-area.d.ts +2 -0
- package/dist/packages/ui-web/src/select.d.ts +2 -0
- package/dist/packages/ui-web/src/separator.d.ts +2 -0
- package/dist/packages/ui-web/src/sheet.d.ts +2 -0
- package/dist/packages/ui-web/src/skeleton.d.ts +2 -0
- package/dist/packages/ui-web/src/slider.d.ts +2 -0
- package/dist/packages/ui-web/src/sonner.d.ts +3 -1
- package/dist/packages/ui-web/src/switch.d.ts +2 -0
- package/dist/packages/ui-web/src/table.d.ts +2 -0
- package/dist/packages/ui-web/src/tabs.d.ts +2 -0
- package/dist/packages/ui-web/src/textarea.d.ts +2 -0
- package/dist/packages/ui-web/src/toast.d.ts +2 -0
- package/dist/packages/ui-web/src/toggle-group.d.ts +2 -0
- package/dist/packages/ui-web/src/toggle.d.ts +2 -0
- package/dist/packages/ui-web/src/tooltip.d.ts +2 -0
- package/dist/pagination.cjs.map +1 -1
- package/dist/pagination.mjs.map +1 -1
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.mjs.map +1 -1
- package/dist/progress.cjs.map +1 -1
- package/dist/progress.mjs.map +1 -1
- package/dist/scroll-area.cjs.map +1 -1
- package/dist/scroll-area.mjs.map +1 -1
- package/dist/select.cjs.map +1 -1
- package/dist/select.mjs.map +1 -1
- package/dist/separator.cjs.map +1 -1
- package/dist/separator.mjs.map +1 -1
- package/dist/sheet.cjs.map +1 -1
- package/dist/sheet.mjs.map +1 -1
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.mjs.map +1 -1
- package/dist/slider.cjs.map +1 -1
- package/dist/slider.mjs.map +1 -1
- package/dist/sonner.cjs.map +1 -1
- package/dist/sonner.mjs.map +1 -1
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.mjs.map +1 -1
- package/dist/table.cjs.map +1 -1
- package/dist/table.mjs.map +1 -1
- package/dist/tabs.cjs.map +1 -1
- package/dist/tabs.mjs.map +1 -1
- package/dist/textarea.cjs.map +1 -1
- package/dist/textarea.mjs.map +1 -1
- package/dist/toast.cjs.map +1 -1
- package/dist/toast.mjs.map +1 -1
- package/dist/toggle-group.cjs.map +1 -1
- package/dist/toggle-group.mjs.map +1 -1
- package/dist/toggle.cjs.map +1 -1
- package/dist/toggle.mjs.map +1 -1
- package/dist/tooltip.cjs.map +1 -1
- package/dist/tooltip.mjs.map +1 -1
- package/package.json +6 -2
package/dist/carousel.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\n\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-start-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-end-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"carousel.cjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\n\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-start-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-end-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"mappings":"4QA8BM,EAAkB,EAAM,cAA2C,IAAI,EAE7E,SAAS,GAAc,CACrB,IAAM,EAAU,EAAM,WAAW,CAAe,EAEhD,GAAI,CAAC,EACH,MAAU,MAAM,gDAAgD,EAGlE,OAAO,CACT,CAEA,SAAS,EAAS,CAChB,cAAc,aACd,OACA,SACA,UACA,YACA,WACA,GAAG,GAC2C,CAC9C,GAAM,CAAC,EAAa,GAAO,EAAA,EACzB,CACE,GAAG,EACH,KAAM,IAAgB,aAAe,IAAM,GAC7C,EACA,CACF,EACM,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EACxD,CAAC,EAAe,GAAoB,EAAM,SAAS,EAAK,EAExD,EAAW,EAAM,YAAa,GAAqB,CAClD,IAGL,EAAiB,EAAI,cAAc,CAAC,EACpC,EAAiB,EAAI,cAAc,CAAC,EACtC,EAAG,CAAC,CAAC,EAEC,EAAa,EAAM,gBAAkB,CACzC,GAAK,WAAW,CAClB,EAAG,CAAC,CAAG,CAAC,EAEF,EAAa,EAAM,gBAAkB,CACzC,GAAK,WAAW,CAClB,EAAG,CAAC,CAAG,CAAC,EAEF,EAAgB,EAAM,YACzB,GAA+C,CAC1C,EAAM,MAAQ,aAChB,EAAM,eAAe,EACrB,EAAW,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EAAiB,CACxB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,oBACD,UACH,OACN,UAAW,EAAA,EACT,2CACA,IAAgB,aACZ,qCACA,mEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAkB,CAAA,GAClB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,gBAAoB,CAAA,CACxC,GAEZ,CAEA,SAAS,EAAa,CACpB,YACA,UAAU,UACV,OAAO,UACP,GAAG,GACmC,CACtC,GAAM,CAAE,cAAa,aAAY,iBAAkB,EAAY,EAE/D,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CACE,YAAU,gBACD,UACH,OACN,UAAW,EAAA,EACT,2CACA,IAAgB,aACZ,mCACA,sEACJ,CACF,EACA,SAAU,CAAC,EACX,QAAS,EACT,GAAI,WAbN,EAeE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAmB,CAAA,GACnB,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,mBAAU,YAAgB,CAAA,CACpC,GAEZ"}
|
package/dist/carousel.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\n\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-start-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-end-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"carousel.mjs","names":[],"sources":["../packages/ui-web/src/carousel.tsx"],"sourcesContent":["import useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport * as React from 'react';\n\nimport { ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { cn } from './lib/utils';\n\nimport type { CarouselBaseProps } from '@gv-tech/ui-core';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) {\n return;\n }\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n value={{\n carouselRef,\n api: api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n onKeyDownCapture={handleKeyDown}\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div className={cn('flex', orientation === 'horizontal' ? '-ms-4' : '-mt-4 flex-col', className)} {...props} />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'ps-4' : 'pt-4', className)}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-start-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -top-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'icon-sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute touch-manipulation rounded-full',\n orientation === 'horizontal'\n ? '-end-12 top-1/2 -translate-y-1/2'\n : 'start-1/2 -bottom-12 -translate-x-1/2 rotate-90 rtl:translate-x-1/2',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <ChevronRightIcon />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nexport { Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, useCarousel, type CarouselApi };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCarouselContract = React.ComponentProps<typeof Carousel> extends CarouselBaseProps ? true : false;\n"],"m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AAO,WACP,GAAG,KACmC;CACtC,IAAM,EAAE,gBAAa,eAAY,qBAAkB,EAAY;CAE/D,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EACE,aAAU;EACD;EACH;EACN,WAAW,EACT,4CACA,MAAgB,eACZ,qCACA,uEACJ,CACF;EACA,UAAU,CAAC;EACX,SAAS;EACT,GAAI;YAbN,CAeE,iBAAA,GAAA,EAAA,KAAC,GAAD,CAAmB,CAAA,GACnB,iBAAA,GAAA,EAAA,KAAC,QAAD;GAAM,WAAU;aAAU;EAAgB,CAAA,CACpC;;AAEZ"}
|
package/dist/checkbox.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"checkbox.cjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":"kPAQA,SAAS,EAAS,CAAE,YAAW,GAAG,GAA8D,CAC9F,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,WACV,UAAW,EAAA,EACT,osBACA,CACF,EACA,GAAI,YAEJ,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,qBACV,UAAU,oFAEV,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACe,CAAA,CACP,CAAA,CAE5B"}
|
package/dist/checkbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"checkbox.mjs","names":[],"sources":["../packages/ui-web/src/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { CheckboxBaseProps } from '@gv-tech/ui-core';\n\nfunction Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n 'peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"grid place-content-center text-current transition-none [&>svg]:size-3.5\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCheckboxContract = React.ComponentProps<typeof Checkbox> extends CheckboxBaseProps ? true : false;\n"],"mappings":";;;;;;AAQA,SAAS,EAAS,EAAE,cAAW,GAAG,KAA8D;CAC9F,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,qsBACA,CACF;EACA,GAAI;YAEJ,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,aAAU;GACV,WAAU;aAEV,iBAAA,GAAA,EAAA,KAAC,GAAD,CAAY,CAAA;EACe,CAAA;CACP,CAAA;AAE5B"}
|
package/dist/collapsible.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.cjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"collapsible.cjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":"kJAMA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,cAAc,GAAI,CAAQ,CAAA,CACxE,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F,CAEA,SAAS,EAAmB,CAAE,GAAG,GAA+E,CAC9G,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAyC,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAC9F"}
|
package/dist/collapsible.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.mjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"collapsible.mjs","names":[],"sources":["../packages/ui-web/src/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport { Collapsible as CollapsiblePrimitive } from 'radix-ui';\n\nimport type { CollapsibleBaseProps } from '@gv-tech/ui-core';\n\nfunction Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\nfunction CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) {\n return <CollapsiblePrimitive.CollapsibleTrigger data-slot=\"collapsible-trigger\" {...props} />;\n}\n\nfunction CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) {\n return <CollapsiblePrimitive.CollapsibleContent data-slot=\"collapsible-content\" {...props} />;\n}\n\nexport { Collapsible, CollapsibleContent, CollapsibleTrigger };\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCollapsibleContract =\n React.ComponentProps<typeof Collapsible> extends CollapsibleBaseProps ? true : false;\n"],"mappings":";;;;;AAMA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAc,GAAI;CAAQ,CAAA;AACxE;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F;AAEA,SAAS,EAAmB,EAAE,GAAG,KAA+E;CAC9G,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAyC,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAC9F"}
|
package/dist/command.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport * as React from 'react';\n\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { InputGroup, InputGroupAddon } from './input-group';\nimport { cn } from './lib/utils';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"command.cjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport * as React from 'react';\n\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { InputGroup, InputGroupAddon } from './input-group';\nimport { cn } from './lib/utils';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":"2SAUA,SAAS,EAAQ,CAAE,YAAW,GAAG,GAAwD,CACvF,OACE,EAAA,EAAA,KAAC,EAAA,EAAD,CACE,YAAU,UACV,UAAW,EAAA,EACT,6FACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAc,CACrB,QAAQ,kBACR,cAAc,iCACd,WACA,YACA,kBAAkB,GAClB,GAAG,GAMF,CACD,OACE,EAAA,EAAA,MAAC,EAAA,OAAD,CAAQ,GAAI,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AA,EACT,8NACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CAAE,YAAW,GAAG,GAAkE,CAC1G,OACE,EAAA,EAAA,KAAC,EAAA,EAAiB,UAAlB,CACE,YAAU,oBACV,UAAW,EAAA,EAAG,uBAAwB,CAAS,EAC/C,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,WAAU,GAAG,GAA6D,CAC1G,OACE,EAAA,EAAA,MAAC,EAAA,EAAiB,KAAlB,CACE,YAAU,eACV,UAAW,EAAA,EACT,kbACA,CACF,EACA,GAAI,WANN,CAQG,GACD,EAAA,EAAA,KAAC,EAAA,GAAD,CAAW,UAAU,iIAAmI,CAAA,CACnI,GAE3B,CAEA,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAuC,CAC9E,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,mBACV,UAAW,EAAA,EACT,gHACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
package/dist/command.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport * as React from 'react';\n\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { InputGroup, InputGroupAddon } from './input-group';\nimport { cn } from './lib/utils';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\
|
|
1
|
+
{"version":3,"file":"command.mjs","names":[],"sources":["../packages/ui-web/src/command.tsx"],"sourcesContent":["import { Command as CommandPrimitive } from 'cmdk';\nimport * as React from 'react';\n\nimport { CheckIcon, SearchIcon } from 'lucide-react';\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from './dialog';\nimport { InputGroup, InputGroupAddon } from './input-group';\nimport { cn } from './lib/utils';\n\nimport type { CommandBaseProps } from '@gv-tech/ui-core';\n\nfunction Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n 'bg-popover text-popover-foreground flex size-full flex-col overflow-hidden rounded-xl! p-1',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n className,\n showCloseButton = false,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n className?: string;\n showCloseButton?: boolean;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn('top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl', className)}\n showCloseButton={showCloseButton}\n >\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"border-input/30 bg-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:ps-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn('w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50', className)}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\nfunction CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn('no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none', className)}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn('py-6 text-center text-sm', className)}\n {...props}\n />\n );\n}\n\nfunction CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n 'group/command-item data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ms-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\nfunction CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n 'text-muted-foreground group-data-[selected=true]/command-item:text-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyCommandContract = React.ComponentProps<typeof Command> extends CommandBaseProps ? true : false;\n"],"mappings":";;;;;;;;AAUA,SAAS,EAAQ,EAAE,cAAW,GAAG,KAAwD;CACvF,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,8FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAc,EACrB,WAAQ,mBACR,iBAAc,kCACd,aACA,cACA,qBAAkB,IAClB,GAAG,KAMF;CACD,OACE,iBAAA,GAAA,EAAA,MAAC,GAAD;EAAQ,GAAI;YAAZ,CACE,iBAAA,GAAA,EAAA,MAAC,GAAD;GAAc,WAAU;aAAxB,CACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAc,EAAmB,CAAA,GACjC,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UAAoB,EAA+B,CAAA,CACvC;MACd,iBAAA,GAAA,EAAA,KAAC,GAAD;GACE,WAAW,EAAG,oEAAoE,CAAS;GAC1E;aAEjB,iBAAA,GAAA,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EAAiB,MAAlB;EACE,aAAU;EACV,WAAW,EACT,mbACA,CACF;EACA,GAAI;YANN,CAQG,GACD,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAW,WAAU,kIAAmI,CAAA,CACnI;;AAE3B;AAEA,SAAS,EAAgB,EAAE,cAAW,GAAG,KAAuC;CAC9E,OACE,iBAAA,GAAA,EAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAW,EACT,iHACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nconst _verifyContextMenuContract: ContextMenuBaseProps = {} as unknown as React.ComponentProps<typeof ContextMenu>;\n"],"mappings":"kPAQA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,uBACV,UAAW,EAAA,EAAG,cAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA4B,YAAU,qBAAqB,GAAI,CAAQ,CAAA,CAChF,CAEA,SAAS,EAAkB,CAAE,GAAG,GAAmE,CACjG,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAEA,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA0B,YAAU,mBAAmB,GAAI,CAAQ,CAAA,CAC5E,CAEA,SAAS,EAAsB,CAAE,GAAG,GAAuE,CACzG,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAAiC,YAAU,2BAA2B,GAAI,CAAQ,CAAA,C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,MAAA,EAAA,GAAA,CACE,YAAU,0BACV,aAAY,EACZ,UAAW,EAAA,EACT,2TACA,CACF,EACA,GAAI,WAPN,EASE,EAAA,EAAA,KAAC,OAAD,CAAM,UAAU,+CACd,EAAA,EAAA,KAAA,EAAA,GAAA,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,GAAD,CAAY,CAAA,CACsB,CAAA,CAChC,CAAA,EACL,CAC6B,GAEpC,CAEA,SAAS,EAAiB,CACxB,YACA,QACA,GAAG,GAGF,CACD,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,qBACV,aAAY,EACZ,UAAW,EAAA,EAAG,wEAAyE,CAAS,EAChG,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAqB,CAAE,YAAW,GAAG,GAAsE,CAClH,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,yBACV,UAAW,EAAA,EAAG,4BAA6B,CAAS,EACpD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAoB,CAAE,YAAW,GAAG,GAAuC,CAClF,OACE,EAAA,EAAA,KAAC,OAAD,CACE,YAAU,wBACV,UAAW,EAAA,EACT,6GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
|
|
1
|
+
{"version":3,"file":"context-menu.cjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":"kPAQA,SAAS,EAAY,CAAE,GAAG,GAAiE,CACzF,OAAO,EAAA,EAAA,KAAA,EAAA,GAAA,CAA2B,YAAU,eAAe,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAS,EAAmB,CAAE,YAAW,GAAG,GAAoE,CAC9G,OACE,EAAA,EAAA,KAAA,EAAA,GAAA,CACE,YAAU,uBACV,UAAW,EAAA,EAAG,cAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAiB,CAAE,GAAG,GAAkE,CAC/F,OAAO,EAAA,EAAA,KAAA,E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"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nconst _verifyContextMenuContract: ContextMenuBaseProps = {} as unknown as React.ComponentProps<typeof ContextMenu>;\n"],"mappings":";;;;;;AAQA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAoE;CAC9G,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,eAAe,CAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAiB,EAAE,GAAG,KAAkE;CAC/F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;AAEA,SAAS,EAAkB,EAAE,GAAG,KAAmE;CACjG,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,EAAe,EAAE,GAAG,KAAgE;CAC3F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA0B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC5E;AAEA,SAAS,EAAsB,EAAE,GAAG,KAAuE;CACzG,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAAiC,aAAU;EAA2B,GAAI;CAAQ,CAAA;AAC3F;AAEA,SAAS,EAAmB,EAC1B,cACA,GAAG,KAGF;CACD,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD,EAAA,UACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EACT,olBACA,CACF;EACA,GAAI;CACL,CAAA,EAC0B,CAAA;AAEjC;AAEA,SAAS,EAAgB,EACvB,cACA,UACA,aAAU,WACV,GAAG,KAIF;CACD,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,cAAY;EACZ,gB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ACE,aAAU;EACV,cAAY;EACZ,WAAW,EAAG,yEAAyE,CAAS;EAChG,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAqB,EAAE,cAAW,GAAG,KAAsE;CAClH,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,6BAA6B,CAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAoB,EAAE,cAAW,GAAG,KAAuC;CAClF,OACE,iBAAA,GAAA,EAAA,KAAC,QAAD;EACE,aAAU;EACV,WAAW,EACT,8GACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
1
|
+
{"version":3,"file":"context-menu.mjs","names":[],"sources":["../packages/ui-web/src/context-menu.tsx"],"sourcesContent":["import { ContextMenu as ContextMenuPrimitive } from 'radix-ui';\nimport * as React from 'react';\n\nimport { CheckIcon, ChevronRightIcon } from 'lucide-react';\nimport { cn } from './lib/utils';\n\nimport type { ContextMenuBaseProps } from '@gv-tech/ui-core';\n\nfunction ContextMenu({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\nfunction ContextMenuTrigger({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn('select-none', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {\n return <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />;\n}\n\nfunction ContextMenuPortal({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {\n return <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />;\n}\n\nfunction ContextMenuSub({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {\n return <ContextMenuPrimitive.Sub data-slot=\"context-menu-sub\" {...props} />;\n}\n\nfunction ContextMenuRadioGroup({ ...props }: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {\n return <ContextMenuPrimitive.RadioGroup data-slot=\"context-menu-radio-group\" {...props} />;\n}\n\nfunction ContextMenuContent({\n className,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n data-slot=\"context-menu-content\"\n className={cn(\n 'bg-popover text-popover-foreground ring-foreground/10 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 max-h-(--radix-context-menu-content-available-height) min-w-36 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n );\n}\n\nfunction ContextMenuItem({\n className,\n inset,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: 'default' | 'destructive';\n}) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n 'group/context-menu-item focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.SubTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ms-auto\" />\n </ContextMenuPrimitive.SubTrigger>\n );\n}\n\nfunction ContextMenuSubContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {\n return (\n <ContextMenuPrimitive.SubContent\n data-slot=\"context-menu-sub-content\"\n className={cn(\n 'bg-popover text-popover-foreground 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 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 min-w-32 origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-lg border p-1 shadow-lg duration-100',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.CheckboxItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction ContextMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.RadioItem> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n data-inset={inset}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4',\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute end-2\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <ContextMenuPrimitive.Label\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn('text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction ContextMenuShortcut({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n 'text-muted-foreground group-focus/context-menu-item:text-accent-foreground ms-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n ContextMenuGroup,\n ContextMenuItem,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n};\n\n// Verify that the component satisfies the ui-core contract\nexport type ___verifyContextMenuContract =\n React.ComponentProps<typeof ContextMenu> extends ContextMenuBaseProps ? true : false;\n"],"mappings":";;;;;;AAQA,SAAS,EAAY,EAAE,GAAG,KAAiE;CACzF,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA2B,aAAU;EAAe,GAAI;CAAQ,CAAA;AACzE;AAEA,SAAS,EAAmB,EAAE,cAAW,GAAG,KAAoE;CAC9G,OACE,iBAAA,GAAA,EAAA,KAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,eAAe,CAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAiB,EAAE,GAAG,KAAkE;CAC/F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA4B,aAAU;EAAqB,GAAI;CAAQ,CAAA;AAChF;AAEA,SAAS,EAAkB,EAAE,GAAG,KAAmE;CACjG,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA6B,aAAU;EAAsB,GAAI;CAAQ,CAAA;AAClF;AAEA,SAAS,EAAe,EAAE,GAAG,KAAgE;CAC3F,OAAO,iBAAA,GAAA,EAAA,KAAC,GAAD;EAA0B,aAAU;EAAmB,GAAI;CAAQ,CAAA;AAC5E;AAEA,SAAS,EAAsB,EAAE,GAAG,KAAuE;CACzG,OAAO,iB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