@codefast/ui 0.0.45 → 0.0.47
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/{chunk-SCJ3W2VO.js → chunk-DTSAQICV.js} +2 -2
- package/dist/chunk-DTSAQICV.js.map +1 -0
- package/dist/{chunk-7HJV22OF.mjs → chunk-JOBEKA4M.mjs} +1 -1
- package/dist/{chunk-7HJV22OF.mjs.map → chunk-JOBEKA4M.mjs.map} +1 -1
- package/dist/{chunk-WYYOCZNI.mjs → chunk-KZ3CIZTP.mjs} +2 -2
- package/dist/{chunk-WYYOCZNI.mjs.map → chunk-KZ3CIZTP.mjs.map} +1 -1
- package/dist/{chunk-WL65TBKJ.mjs → chunk-MU2MZ434.mjs} +2 -2
- package/dist/{chunk-WL65TBKJ.mjs.map → chunk-MU2MZ434.mjs.map} +1 -1
- package/dist/{chunk-NSK74YTM.js → chunk-OP6Q7VT5.js} +2 -2
- package/dist/{chunk-NSK74YTM.js.map → chunk-OP6Q7VT5.js.map} +1 -1
- package/dist/{chunk-ELWITZPX.js → chunk-SDGUDONZ.js} +2 -2
- package/dist/{chunk-ELWITZPX.js.map → chunk-SDGUDONZ.js.map} +1 -1
- package/dist/{chunk-MZJL73RI.js → chunk-UYRRHPPH.js} +1 -1
- package/dist/{chunk-MZJL73RI.js.map → chunk-UYRRHPPH.js.map} +1 -1
- package/dist/{chunk-HX5YKP4E.mjs → chunk-XHNT6PVI.mjs} +2 -2
- package/dist/{chunk-HX5YKP4E.mjs.map → chunk-XHNT6PVI.mjs.map} +1 -1
- package/dist/hooks/use-media-query.js.map +1 -1
- package/dist/hooks/use-media-query.mjs.map +1 -1
- package/dist/hooks/use-mutation-observer.js.map +1 -1
- package/dist/hooks/use-mutation-observer.mjs.map +1 -1
- package/dist/plugin/base.plugin.js +1 -1
- package/dist/plugin/base.plugin.mjs +1 -1
- package/dist/react/alert-dialog.js.map +1 -1
- package/dist/react/alert-dialog.mjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.js.map +1 -1
- package/dist/react/checkbox-cards.mjs +1 -1
- package/dist/react/checkbox-cards.mjs.map +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.mjs +1 -1
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox-group.primitive.mjs +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.js.map +1 -1
- package/dist/react/command.mjs +1 -1
- package/dist/react/command.mjs.map +1 -1
- package/dist/react/context-menu.js +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/context-menu.mjs +1 -1
- package/dist/react/context-menu.mjs.map +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/dropdown-menu.mjs +1 -1
- package/dist/react/menubar.js +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/menubar.mjs +1 -1
- package/dist/react/menubar.mjs.map +1 -1
- package/dist/react/radio-cards.js +1 -1
- package/dist/react/radio-cards.js.map +1 -1
- package/dist/react/radio-cards.mjs +1 -1
- package/dist/react/radio-cards.mjs.map +1 -1
- package/dist/react/select.js +1 -1
- package/dist/react/select.mjs +1 -1
- package/dist/react/tooltip.js +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/react/tooltip.mjs +1 -1
- package/dist/react/tooltip.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/tailwind.config.js +1 -1
- package/dist/tailwind.config.mjs +1 -1
- package/package.json +6 -6
- package/plugin/base.plugin.ts +0 -3
- package/src/hooks/use-media-query.ts +1 -0
- package/src/hooks/use-mutation-observer.ts +1 -0
- package/src/react/alert-dialog.tsx +1 -0
- package/src/react/checkbox-cards.tsx +1 -1
- package/src/react/checkbox-group.primitive.tsx +1 -0
- package/src/react/command.tsx +1 -1
- package/src/react/context-menu.tsx +4 -4
- package/src/react/dropdown-menu.tsx +4 -4
- package/src/react/menubar.tsx +5 -5
- package/src/react/radio-cards.tsx +1 -1
- package/src/react/select.tsx +3 -3
- package/src/react/tooltip.tsx +1 -1
- package/dist/chunk-SCJ3W2VO.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/use-media-query.ts"],"names":["React","useMediaQuery","query","value","setValue","onChange","event","result"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,SAASC,EAAcC,EAAwB,CACpD,GAAM,CAACC,EAAOC,CAAQ,EAAU,WAAS,EAAK,EAE9C,OAAM,YAAU,IAAM,CACpB,SAASC,EAASC,EAAkC,CAClDF,EAASE,EAAM,OAAO,CACxB,CAEA,IAAMC,EAAS,WAAWL,CAAK,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-media-query.ts"],"names":["React","useMediaQuery","query","value","setValue","onChange","event","result"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,SAASC,EAAcC,EAAwB,CACpD,GAAM,CAACC,EAAOC,CAAQ,EAAU,WAAS,EAAK,EAE9C,OAAM,YAAU,IAAM,CACpB,SAASC,EAASC,EAAkC,CAClDF,EAASE,EAAM,OAAO,CACxB,CAEA,IAAMC,EAAS,WAAWL,CAAK,EAE/B,OAAAK,EAAO,iBAAiB,SAAUF,CAAQ,EAC1CD,EAASG,EAAO,OAAO,EAEhB,IAAM,CACXA,EAAO,oBAAoB,SAAUF,CAAQ,CAC/C,CACF,EAAG,CAACH,CAAK,CAAC,EAEHC,CACT","sourcesContent":["import * as React from 'react';\n\nexport function useMediaQuery(query: string): boolean {\n const [value, setValue] = React.useState(false);\n\n React.useEffect(() => {\n function onChange(event: MediaQueryListEvent): void {\n setValue(event.matches);\n }\n\n const result = matchMedia(query);\n\n result.addEventListener('change', onChange);\n setValue(result.matches);\n\n return () => {\n result.removeEventListener('change', onChange);\n };\n }, [query]);\n\n return value;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/use-media-query.ts"],"sourcesContent":["import * as React from 'react';\n\nexport function useMediaQuery(query: string): boolean {\n const [value, setValue] = React.useState(false);\n\n React.useEffect(() => {\n function onChange(event: MediaQueryListEvent): void {\n setValue(event.matches);\n }\n\n const result = matchMedia(query);\n result.addEventListener('change', onChange);\n setValue(result.matches);\n\n return () => {\n result.removeEventListener('change', onChange);\n };\n }, [query]);\n\n return value;\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,SAASC,EAAcC,EAAwB,CACpD,GAAM,CAACC,EAAOC,CAAQ,EAAU,WAAS,EAAK,EAE9C,OAAM,YAAU,IAAM,CACpB,SAASC,EAASC,EAAkC,CAClDF,EAASE,EAAM,OAAO,CACxB,CAEA,IAAMC,EAAS,WAAWL,CAAK,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-media-query.ts"],"sourcesContent":["import * as React from 'react';\n\nexport function useMediaQuery(query: string): boolean {\n const [value, setValue] = React.useState(false);\n\n React.useEffect(() => {\n function onChange(event: MediaQueryListEvent): void {\n setValue(event.matches);\n }\n\n const result = matchMedia(query);\n\n result.addEventListener('change', onChange);\n setValue(result.matches);\n\n return () => {\n result.removeEventListener('change', onChange);\n };\n }, [query]);\n\n return value;\n}\n"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,SAASC,EAAcC,EAAwB,CACpD,GAAM,CAACC,EAAOC,CAAQ,EAAU,WAAS,EAAK,EAE9C,OAAM,YAAU,IAAM,CACpB,SAASC,EAASC,EAAkC,CAClDF,EAASE,EAAM,OAAO,CACxB,CAEA,IAAMC,EAAS,WAAWL,CAAK,EAE/B,OAAAK,EAAO,iBAAiB,SAAUF,CAAQ,EAC1CD,EAASG,EAAO,OAAO,EAEhB,IAAM,CACXA,EAAO,oBAAoB,SAAUF,CAAQ,CAC/C,CACF,EAAG,CAACH,CAAK,CAAC,EAEHC,CACT","names":["React","useMediaQuery","query","value","setValue","onChange","event","result"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/use-mutation-observer.ts"],"names":["React","useMutationObserver","ref","callback","options","observer"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,IAAMC,EAAsB,CACjCC,EACAC,EACAC,EAAgC,CAC9B,WAAY,GACZ,cAAe,GACf,UAAW,GACX,QAAS,EACX,IACS,CACH,YAAU,IAAM,CACpB,GAAI,CAACF,EAAI,QACP,OAGF,IAAMG,EAAW,IAAI,iBAAiBF,CAAQ,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-mutation-observer.ts"],"names":["React","useMutationObserver","ref","callback","options","observer"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,IAAMC,EAAsB,CACjCC,EACAC,EACAC,EAAgC,CAC9B,WAAY,GACZ,cAAe,GACf,UAAW,GACX,QAAS,EACX,IACS,CACH,YAAU,IAAM,CACpB,GAAI,CAACF,EAAI,QACP,OAGF,IAAMG,EAAW,IAAI,iBAAiBF,CAAQ,EAE9C,OAAAE,EAAS,QAAQH,EAAI,QAASE,CAAO,EAE9B,IAAM,CACXC,EAAS,WAAW,CACtB,CACF,EAAG,CAACH,EAAKC,EAAUC,CAAO,CAAC,CAC7B","sourcesContent":["import * as React from 'react';\n\nexport const useMutationObserver = (\n ref: React.MutableRefObject<HTMLElement | null>,\n callback: MutationCallback,\n options: MutationObserverInit = {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n },\n): void => {\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n const observer = new MutationObserver(callback);\n\n observer.observe(ref.current, options);\n\n return () => {\n observer.disconnect();\n };\n }, [ref, callback, options]);\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/use-mutation-observer.ts"],"sourcesContent":["import * as React from 'react';\n\nexport const useMutationObserver = (\n ref: React.MutableRefObject<HTMLElement | null>,\n callback: MutationCallback,\n options: MutationObserverInit = {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n },\n): void => {\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n const observer = new MutationObserver(callback);\n observer.observe(ref.current, options);\n\n return () => {\n observer.disconnect();\n };\n }, [ref, callback, options]);\n};\n"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,IAAMC,EAAsB,CACjCC,EACAC,EACAC,EAAgC,CAC9B,WAAY,GACZ,cAAe,GACf,UAAW,GACX,QAAS,EACX,IACS,CACH,YAAU,IAAM,CACpB,GAAI,CAACF,EAAI,QACP,OAGF,IAAMG,EAAW,IAAI,iBAAiBF,CAAQ,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/use-mutation-observer.ts"],"sourcesContent":["import * as React from 'react';\n\nexport const useMutationObserver = (\n ref: React.MutableRefObject<HTMLElement | null>,\n callback: MutationCallback,\n options: MutationObserverInit = {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n },\n): void => {\n React.useEffect(() => {\n if (!ref.current) {\n return;\n }\n\n const observer = new MutationObserver(callback);\n\n observer.observe(ref.current, options);\n\n return () => {\n observer.disconnect();\n };\n }, [ref, callback, options]);\n};\n"],"mappings":"AAAA,UAAYA,MAAW,QAEhB,IAAMC,EAAsB,CACjCC,EACAC,EACAC,EAAgC,CAC9B,WAAY,GACZ,cAAe,GACf,UAAW,GACX,QAAS,EACX,IACS,CACH,YAAU,IAAM,CACpB,GAAI,CAACF,EAAI,QACP,OAGF,IAAMG,EAAW,IAAI,iBAAiBF,CAAQ,EAE9C,OAAAE,EAAS,QAAQH,EAAI,QAASE,CAAO,EAE9B,IAAM,CACXC,EAAS,WAAW,CACtB,CACF,EAAG,CAACH,EAAKC,EAAUC,CAAO,CAAC,CAC7B","names":["React","useMutationObserver","ref","callback","options","observer"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDTSAQICVjs = require('../chunk-DTSAQICV.js');exports.default = _chunkDTSAQICVjs.a;
|
|
2
2
|
//# sourceMappingURL=base.plugin.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-KZ3CIZTP.mjs";export{a as default};
|
|
2
2
|
//# sourceMappingURL=base.plugin.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/alert-dialog.tsx"],"names":["React","AlertDialogPrimitive","jsx","jsxs","AlertDialog","AlertDialogTrigger","AlertDialogContent","className","props","ref","cn","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"],"mappings":"4HAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BAmCpC,OACE,OAAAC,EADF,QAAAC,MAAA,oBA1BF,IAAMC,EAAmC,OASnCC,EAA0C,UAa1CC,EAA2B,aAG/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BN,EAAsB,SAArB,CACC,UAAAD,EAAsB,UAArB,CAA6B,UAAU,+IAA+I,EACvLA,EAAsB,UAArB,CACC,IAAKO,EACL,UAAWC,EACT,yhBACAH,CACF,EACC,GAAGC,EACN,GACF,CACD,EAEDF,EAAmB,YAAmC,UAAQ,YAQ9D,SAASK,EAAkB,CACzB,UAAAJ,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,sCACA,eACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAkB,CACzB,UAAAL,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,8BACA,6BACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAaA,IAAMK,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,QAArB,CACC,IAAKO,EACL,UAAWC,EAAG,wBAAyBH,CAAS,EAC/C,GAAGC,EACN,CACD,EAEDK,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,cAArB,CACC,IAAKO,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CACD,EAEDM,EAAuB,YACA,cAAY,YAanC,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,UAAAT,CAAU,CAAC,EACtC,GAAGC,EACN,CACD,EAEDO,EAAkB,YAAmC,SAAO,YAa5D,IAAME,EAA0B,aAG9B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,QAAS,UAAW,UAAAT,CAAU,CAAC,EAC1D,GAAGC,EACN,CACD,
|
|
1
|
+
{"version":3,"sources":["../../src/react/alert-dialog.tsx"],"names":["React","AlertDialogPrimitive","jsx","jsxs","AlertDialog","AlertDialogTrigger","AlertDialogContent","className","props","ref","cn","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"],"mappings":"4HAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BAmCpC,OACE,OAAAC,EADF,QAAAC,MAAA,oBA1BF,IAAMC,EAAmC,OASnCC,EAA0C,UAa1CC,EAA2B,aAG/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BN,EAAsB,SAArB,CACC,UAAAD,EAAsB,UAArB,CAA6B,UAAU,+IAA+I,EACvLA,EAAsB,UAArB,CACC,IAAKO,EACL,UAAWC,EACT,yhBACAH,CACF,EACC,GAAGC,EACN,GACF,CACD,EAEDF,EAAmB,YAAmC,UAAQ,YAQ9D,SAASK,EAAkB,CACzB,UAAAJ,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,sCACA,eACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAkB,CACzB,UAAAL,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,8BACA,6BACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAaA,IAAMK,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,QAArB,CACC,IAAKO,EACL,UAAWC,EAAG,wBAAyBH,CAAS,EAC/C,GAAGC,EACN,CACD,EAEDK,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,cAArB,CACC,IAAKO,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CACD,EAEDM,EAAuB,YACA,cAAY,YAanC,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,UAAAT,CAAU,CAAC,EACtC,GAAGC,EACN,CACD,EAEDO,EAAkB,YAAmC,SAAO,YAa5D,IAAME,EAA0B,aAG9B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,QAAS,UAAW,UAAAT,CAAU,CAAC,EAC1D,GAAGC,EACN,CACD,EAEDS,EAAkB,YAAmC,SAAO","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialog\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>;\nconst AlertDialog = AlertDialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTriggerProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Trigger\n>;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogContent\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogContentElement = React.ElementRef<\n typeof AlertDialogPrimitive.Content\n>;\ntype AlertDialogContentProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n>;\n\nconst AlertDialogContent = React.forwardRef<\n AlertDialogContentElement,\n AlertDialogContentProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n {...props}\n />\n </AlertDialogPrimitive.Portal>\n));\n\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogHeader\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: AlertDialogHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col space-y-2 text-center',\n 'sm:text-left',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogFooter\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: AlertDialogFooterProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col-reverse gap-2',\n 'sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTitle\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTitleElement = React.ElementRef<\n typeof AlertDialogPrimitive.Title\n>;\ntype AlertDialogTitleProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Title\n>;\n\nconst AlertDialogTitle = React.forwardRef<\n AlertDialogTitleElement,\n AlertDialogTitleProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n));\n\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogDescription\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogDescriptionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Description\n>;\ntype AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Description\n>;\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogAction\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogActionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Action\n>;\ntype AlertDialogActionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Action\n>;\n\nconst AlertDialogAction = React.forwardRef<\n AlertDialogActionElement,\n AlertDialogActionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={buttonVariants({ className })}\n {...props}\n />\n));\n\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogCancel\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogCancelElement = React.ElementRef<\n typeof AlertDialogPrimitive.Cancel\n>;\ntype AlertDialogCancelProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Cancel\n>;\n\nconst AlertDialogCancel = React.forwardRef<\n AlertDialogCancelElement,\n AlertDialogCancelProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={buttonVariants({ variant: 'outline', className })}\n {...props}\n />\n));\n\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n type AlertDialogProps,\n type AlertDialogTriggerProps,\n type AlertDialogContentProps,\n type AlertDialogHeaderProps,\n type AlertDialogFooterProps,\n type AlertDialogTitleProps,\n type AlertDialogDescriptionProps,\n type AlertDialogActionProps,\n type AlertDialogCancelProps,\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialog\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>;\nconst AlertDialog = AlertDialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTriggerProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Trigger\n>;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogContent\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogContentElement = React.ElementRef<\n typeof AlertDialogPrimitive.Content\n>;\ntype AlertDialogContentProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n>;\n\nconst AlertDialogContent = React.forwardRef<\n AlertDialogContentElement,\n AlertDialogContentProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n {...props}\n />\n </AlertDialogPrimitive.Portal>\n));\n\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogHeader\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: AlertDialogHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col space-y-2 text-center',\n 'sm:text-left',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogFooter\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: AlertDialogFooterProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col-reverse gap-2',\n 'sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTitle\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTitleElement = React.ElementRef<\n typeof AlertDialogPrimitive.Title\n>;\ntype AlertDialogTitleProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Title\n>;\n\nconst AlertDialogTitle = React.forwardRef<\n AlertDialogTitleElement,\n AlertDialogTitleProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n));\n\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogDescription\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogDescriptionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Description\n>;\ntype AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Description\n>;\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogAction\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogActionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Action\n>;\ntype AlertDialogActionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Action\n>;\n\nconst AlertDialogAction = React.forwardRef<\n AlertDialogActionElement,\n AlertDialogActionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={buttonVariants({ className })}\n {...props}\n />\n));\n\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogCancel\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogCancelElement = React.ElementRef<\n typeof AlertDialogPrimitive.Cancel\n>;\ntype AlertDialogCancelProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Cancel\n>;\n\nconst AlertDialogCancel = React.forwardRef<\n AlertDialogCancelElement,\n AlertDialogCancelProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={buttonVariants({ variant: 'outline', className })}\n {...props}\n />\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n type AlertDialogProps,\n type AlertDialogTriggerProps,\n type AlertDialogContentProps,\n type AlertDialogHeaderProps,\n type AlertDialogFooterProps,\n type AlertDialogTitleProps,\n type AlertDialogDescriptionProps,\n type AlertDialogActionProps,\n type AlertDialogCancelProps,\n};\n"],"mappings":"+HAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BAmCpC,OACE,OAAAC,EADF,QAAAC,MAAA,oBA1BF,IAAMC,EAAmC,OASnCC,EAA0C,UAa1CC,EAA2B,aAG/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BN,EAAsB,SAArB,CACC,UAAAD,EAAsB,UAArB,CAA6B,UAAU,+IAA+I,EACvLA,EAAsB,UAArB,CACC,IAAKO,EACL,UAAWC,EACT,yhBACAH,CACF,EACC,GAAGC,EACN,GACF,CACD,EAEDF,EAAmB,YAAmC,UAAQ,YAQ9D,SAASK,EAAkB,CACzB,UAAAJ,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,sCACA,eACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAkB,CACzB,UAAAL,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,8BACA,6BACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAaA,IAAMK,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,QAArB,CACC,IAAKO,EACL,UAAWC,EAAG,wBAAyBH,CAAS,EAC/C,GAAGC,EACN,CACD,EAEDK,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,cAArB,CACC,IAAKO,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CACD,EAEDM,EAAuB,YACA,cAAY,YAanC,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,UAAAT,CAAU,CAAC,EACtC,GAAGC,EACN,CACD,EAEDO,EAAkB,YAAmC,SAAO,YAa5D,IAAME,EAA0B,aAG9B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,QAAS,UAAW,UAAAT,CAAU,CAAC,EAC1D,GAAGC,EACN,CACD,
|
|
1
|
+
{"version":3,"sources":["../../src/react/alert-dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\nimport { cn } from '../lib/utils';\nimport { buttonVariants } from './button';\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialog\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogProps = React.ComponentProps<typeof AlertDialogPrimitive.Root>;\nconst AlertDialog = AlertDialogPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTrigger\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTriggerProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Trigger\n>;\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogContent\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogContentElement = React.ElementRef<\n typeof AlertDialogPrimitive.Content\n>;\ntype AlertDialogContentProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n>;\n\nconst AlertDialogContent = React.forwardRef<\n AlertDialogContentElement,\n AlertDialogContentProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Portal>\n <AlertDialogPrimitive.Overlay className=\"data-[state=open]:animate-duration-200 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=open]:animate-duration-200 data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg',\n className,\n )}\n {...props}\n />\n </AlertDialogPrimitive.Portal>\n));\n\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogHeader\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: AlertDialogHeaderProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col space-y-2 text-center',\n 'sm:text-left',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogFooter\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: AlertDialogFooterProps): React.JSX.Element {\n return (\n <div\n className={cn(\n 'flex flex-col-reverse gap-2',\n 'sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogTitle\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogTitleElement = React.ElementRef<\n typeof AlertDialogPrimitive.Title\n>;\ntype AlertDialogTitleProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Title\n>;\n\nconst AlertDialogTitle = React.forwardRef<\n AlertDialogTitleElement,\n AlertDialogTitleProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold', className)}\n {...props}\n />\n));\n\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogDescription\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogDescriptionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Description\n>;\ntype AlertDialogDescriptionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Description\n>;\n\nconst AlertDialogDescription = React.forwardRef<\n AlertDialogDescriptionElement,\n AlertDialogDescriptionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n));\n\nAlertDialogDescription.displayName =\n AlertDialogPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogAction\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogActionElement = React.ElementRef<\n typeof AlertDialogPrimitive.Action\n>;\ntype AlertDialogActionProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Action\n>;\n\nconst AlertDialogAction = React.forwardRef<\n AlertDialogActionElement,\n AlertDialogActionProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={buttonVariants({ className })}\n {...props}\n />\n));\n\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: AlertDialogCancel\n * -------------------------------------------------------------------------- */\n\ntype AlertDialogCancelElement = React.ElementRef<\n typeof AlertDialogPrimitive.Cancel\n>;\ntype AlertDialogCancelProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Cancel\n>;\n\nconst AlertDialogCancel = React.forwardRef<\n AlertDialogCancelElement,\n AlertDialogCancelProps\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={buttonVariants({ variant: 'outline', className })}\n {...props}\n />\n));\n\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n AlertDialog,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n type AlertDialogProps,\n type AlertDialogTriggerProps,\n type AlertDialogContentProps,\n type AlertDialogHeaderProps,\n type AlertDialogFooterProps,\n type AlertDialogTitleProps,\n type AlertDialogDescriptionProps,\n type AlertDialogActionProps,\n type AlertDialogCancelProps,\n};\n"],"mappings":"+HAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BAmCpC,OACE,OAAAC,EADF,QAAAC,MAAA,oBA1BF,IAAMC,EAAmC,OASnCC,EAA0C,UAa1CC,EAA2B,aAG/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BN,EAAsB,SAArB,CACC,UAAAD,EAAsB,UAArB,CAA6B,UAAU,+IAA+I,EACvLA,EAAsB,UAArB,CACC,IAAKO,EACL,UAAWC,EACT,yhBACAH,CACF,EACC,GAAGC,EACN,GACF,CACD,EAEDF,EAAmB,YAAmC,UAAQ,YAQ9D,SAASK,EAAkB,CACzB,UAAAJ,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,sCACA,eACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAQA,SAASI,EAAkB,CACzB,UAAAL,EACA,GAAGC,CACL,EAA8C,CAC5C,OACEN,EAAC,OACC,UAAWQ,EACT,8BACA,6BACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAaA,IAAMK,EAAyB,aAG7B,CAAC,CAAE,UAAAN,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,QAArB,CACC,IAAKO,EACL,UAAWC,EAAG,wBAAyBH,CAAS,EAC/C,GAAGC,EACN,CACD,EAEDK,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA+B,aAGnC,CAAC,CAAE,UAAAP,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,cAArB,CACC,IAAKO,EACL,UAAWC,EAAG,gCAAiCH,CAAS,EACvD,GAAGC,EACN,CACD,EAEDM,EAAuB,YACA,cAAY,YAanC,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,UAAAT,CAAU,CAAC,EACtC,GAAGC,EACN,CACD,EAEDO,EAAkB,YAAmC,SAAO,YAa5D,IAAME,EAA0B,aAG9B,CAAC,CAAE,UAAAV,EAAW,GAAGC,CAAM,EAAGC,IAC1BP,EAAsB,SAArB,CACC,IAAKO,EACL,UAAWO,EAAe,CAAE,QAAS,UAAW,UAAAT,CAAU,CAAC,EAC1D,GAAGC,EACN,CACD,EAEDS,EAAkB,YAAmC,SAAO","names":["React","AlertDialogPrimitive","jsx","jsxs","AlertDialog","AlertDialogTrigger","AlertDialogContent","className","props","ref","cn","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkUYRRHPPHjs = require('../chunk-UYRRHPPH.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var b=a.forwardRef(({className:r,...t},i)=>_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.e,{className:_chunkHQ4AUOQMjs.b.call(void 0, "grid gap-2",r),...t,ref:i}));b.displayName=_chunkUYRRHPPHjs.e.displayName;var l=a.forwardRef(({children:r,className:t,checkboxClassName:i,...p},C)=>_jsxruntime.jsxs.call(void 0, "label",{className:_chunkHQ4AUOQMjs.b.call(void 0, "flex items-center justify-center gap-4 rounded-md border p-4",t),children:[r,_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.f,{ref:C,className:_chunkHQ4AUOQMjs.b.call(void 0, "border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i),...p,children:_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.d,{className:"flex size-full items-center justify-center text-current",children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-3.5"})})})]}));l.displayName=_chunkUYRRHPPHjs.f.displayName;exports.CheckboxCards = b; exports.CheckboxCardsItem = l;
|
|
2
2
|
//# sourceMappingURL=checkbox-cards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"names":["React","CheckIcon","jsx","jsxs","CheckboxCards","className","props","ref","Root","cn","CheckboxCardsItem","children","checkboxClassName","Item","CheckboxGroupIndicator"],"mappings":"6GAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAoBtB,cAAAC,EA4BA,QAAAC,MA5BA,oBALJ,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExBL,EAAwBM,EAAvB,CACC,UAAWC,EAAG,aAAcJ,CAAS,EACpC,GAAGC,EACJ,IAAKC,EACP,CAEH,EAEDH,EAAc,YAAqCI,EAAK,YAexD,IAAME,EAA0B,aAG9B,CAAC,CAAE,SAAAC,EAAU,UAAAN,EAAW,kBAAAO,EAAmB,GAAGN,CAAM,EAAGC,IAErDJ,EAAC,SACC,UAAWM,EACT,+DACAJ,CACF,EAEC,UAAAM,EACDT,EAAwBW,EAAvB,CACC,IAAKN,EACL,UAAWE,EACT,0SACAG,CACF,EACC,GAAGN,EAEJ,SAAAJ,EAAwBY,EAAvB,CAA8C,UAAU,0DACvD,SAAAZ,EAACD,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAEH,EAEDS,EAAkB,YAAqCG,EAAK","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Root\n>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<\n typeof CheckboxGroupPrimitive.Root\n>;\n\nconst CheckboxCards = React.forwardRef<\n CheckboxCardsElement,\n CheckboxCardsProps\n>(({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Root\n className={cn('grid gap-2', className)}\n {...props}\n ref={ref}\n />\n );\n});\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Item\n>;\n\ninterface CheckboxCardsItemProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<\n CheckboxCardsItemElement,\n CheckboxCardsItemProps\n>(({ children, className, checkboxClassName, ...props }, ref) => {\n return (\n <label\n className={cn(\n 'flex items-center justify-center gap-4 rounded-md border p-4',\n className,\n )}\n >\n {children}\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-
|
|
1
|
+
{"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"names":["React","CheckIcon","jsx","jsxs","CheckboxCards","className","props","ref","Root","cn","CheckboxCardsItem","children","checkboxClassName","Item","CheckboxGroupIndicator"],"mappings":"6GAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAoBtB,cAAAC,EA4BA,QAAAC,MA5BA,oBALJ,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExBL,EAAwBM,EAAvB,CACC,UAAWC,EAAG,aAAcJ,CAAS,EACpC,GAAGC,EACJ,IAAKC,EACP,CAEH,EAEDH,EAAc,YAAqCI,EAAK,YAexD,IAAME,EAA0B,aAG9B,CAAC,CAAE,SAAAC,EAAU,UAAAN,EAAW,kBAAAO,EAAmB,GAAGN,CAAM,EAAGC,IAErDJ,EAAC,SACC,UAAWM,EACT,+DACAJ,CACF,EAEC,UAAAM,EACDT,EAAwBW,EAAvB,CACC,IAAKN,EACL,UAAWE,EACT,0SACAG,CACF,EACC,GAAGN,EAEJ,SAAAJ,EAAwBY,EAAvB,CAA8C,UAAU,0DACvD,SAAAZ,EAACD,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAEH,EAEDS,EAAkB,YAAqCG,EAAK","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Root\n>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<\n typeof CheckboxGroupPrimitive.Root\n>;\n\nconst CheckboxCards = React.forwardRef<\n CheckboxCardsElement,\n CheckboxCardsProps\n>(({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Root\n className={cn('grid gap-2', className)}\n {...props}\n ref={ref}\n />\n );\n});\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Item\n>;\n\ninterface CheckboxCardsItemProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<\n CheckboxCardsItemElement,\n CheckboxCardsItemProps\n>(({ children, className, checkboxClassName, ...props }, ref) => {\n return (\n <label\n className={cn(\n 'flex items-center justify-center gap-4 rounded-md border p-4',\n className,\n )}\n >\n {children}\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n checkboxClassName,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n );\n});\n\nCheckboxCardsItem.displayName = CheckboxGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n CheckboxCards,\n CheckboxCardsItem,\n type CheckboxCardsProps,\n type CheckboxCardsItemProps,\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{d as m,e as c,f as
|
|
1
|
+
"use client";import{d as m,e as c,f as s}from"../chunk-JOBEKA4M.mjs";import{b as e}from"../chunk-LEUB3C3L.mjs";import*as a from"react";import{CheckIcon as d}from"@radix-ui/react-icons";import{jsx as o,jsxs as n}from"react/jsx-runtime";var b=a.forwardRef(({className:r,...t},i)=>o(c,{className:e("grid gap-2",r),...t,ref:i}));b.displayName=c.displayName;var l=a.forwardRef(({children:r,className:t,checkboxClassName:i,...p},C)=>n("label",{className:e("flex items-center justify-center gap-4 rounded-md border p-4",t),children:[r,o(s,{ref:C,className:e("border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50",i),...p,children:o(m,{className:"flex size-full items-center justify-center text-current",children:o(d,{className:"size-3.5"})})})]}));l.displayName=s.displayName;export{b as CheckboxCards,l as CheckboxCardsItem};
|
|
2
2
|
//# sourceMappingURL=checkbox-cards.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Root\n>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<\n typeof CheckboxGroupPrimitive.Root\n>;\n\nconst CheckboxCards = React.forwardRef<\n CheckboxCardsElement,\n CheckboxCardsProps\n>(({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Root\n className={cn('grid gap-2', className)}\n {...props}\n ref={ref}\n />\n );\n});\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Item\n>;\n\ninterface CheckboxCardsItemProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<\n CheckboxCardsItemElement,\n CheckboxCardsItemProps\n>(({ children, className, checkboxClassName, ...props }, ref) => {\n return (\n <label\n className={cn(\n 'flex items-center justify-center gap-4 rounded-md border p-4',\n className,\n )}\n >\n {children}\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-
|
|
1
|
+
{"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\nimport * as CheckboxGroupPrimitive from './checkbox-group.primitive';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Root\n>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<\n typeof CheckboxGroupPrimitive.Root\n>;\n\nconst CheckboxCards = React.forwardRef<\n CheckboxCardsElement,\n CheckboxCardsProps\n>(({ className, ...props }, ref) => {\n return (\n <CheckboxGroupPrimitive.Root\n className={cn('grid gap-2', className)}\n {...props}\n ref={ref}\n />\n );\n});\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<\n typeof CheckboxGroupPrimitive.Item\n>;\n\ninterface CheckboxCardsItemProps\n extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<\n CheckboxCardsItemElement,\n CheckboxCardsItemProps\n>(({ children, className, checkboxClassName, ...props }, ref) => {\n return (\n <label\n className={cn(\n 'flex items-center justify-center gap-4 rounded-md border p-4',\n className,\n )}\n >\n {children}\n <CheckboxGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\n checkboxClassName,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n );\n});\n\nCheckboxCardsItem.displayName = CheckboxGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n CheckboxCards,\n CheckboxCardsItem,\n type CheckboxCardsProps,\n type CheckboxCardsItemProps,\n};\n"],"mappings":"+GAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAoBtB,cAAAC,EA4BA,QAAAC,MA5BA,oBALJ,IAAMC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAExBL,EAAwBM,EAAvB,CACC,UAAWC,EAAG,aAAcJ,CAAS,EACpC,GAAGC,EACJ,IAAKC,EACP,CAEH,EAEDH,EAAc,YAAqCI,EAAK,YAexD,IAAME,EAA0B,aAG9B,CAAC,CAAE,SAAAC,EAAU,UAAAN,EAAW,kBAAAO,EAAmB,GAAGN,CAAM,EAAGC,IAErDJ,EAAC,SACC,UAAWM,EACT,+DACAJ,CACF,EAEC,UAAAM,EACDT,EAAwBW,EAAvB,CACC,IAAKN,EACL,UAAWE,EACT,0SACAG,CACF,EACC,GAAGN,EAEJ,SAAAJ,EAAwBY,EAAvB,CAA8C,UAAU,0DACvD,SAAAZ,EAACa,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAEH,EAEDL,EAAkB,YAAqCG,EAAK","names":["React","CheckIcon","jsx","jsxs","CheckboxCards","className","props","ref","Root","cn","CheckboxCardsItem","children","checkboxClassName","Item","CheckboxGroupIndicator","CheckIcon"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkUYRRHPPHjs = require('../chunk-UYRRHPPH.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var a=p.forwardRef(({className:o,...r},t)=>_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.e,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "grid gap-2",o),...r}));a.displayName="CheckboxGroup";var b=p.forwardRef(({className:o,...r},t)=>_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.f,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",o),...r,children:_jsxruntime.jsx.call(void 0, _chunkUYRRHPPHjs.d,{className:"flex size-full items-center justify-center text-current",children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-3.5"})})}));b.displayName="CheckboxGroupItem";exports.CheckboxGroup = a; exports.CheckboxGroupItem = b;
|
|
2
2
|
//# sourceMappingURL=checkbox-group.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{d as c,e as m,f as u}from"../chunk-
|
|
1
|
+
"use client";import{d as c,e as m,f as u}from"../chunk-JOBEKA4M.mjs";import{b as i}from"../chunk-LEUB3C3L.mjs";import*as p from"react";import{CheckIcon as s}from"@radix-ui/react-icons";import{jsx as e}from"react/jsx-runtime";var a=p.forwardRef(({className:o,...r},t)=>e(m,{ref:t,className:i("grid gap-2",o),...r}));a.displayName="CheckboxGroup";var b=p.forwardRef(({className:o,...r},t)=>e(u,{ref:t,className:i("border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",o),...r,children:e(c,{className:"flex size-full items-center justify-center text-current",children:e(s,{className:"size-3.5"})})}));b.displayName="CheckboxGroupItem";export{a as CheckboxGroup,b as CheckboxGroupItem};
|
|
2
2
|
//# sourceMappingURL=checkbox-group.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUYRRHPPHjs = require('../chunk-UYRRHPPH.js');exports.CheckboxGroup = _chunkUYRRHPPHjs.b; exports.CheckboxGroupIndicator = _chunkUYRRHPPHjs.d; exports.CheckboxGroupItem = _chunkUYRRHPPHjs.c; exports.Indicator = _chunkUYRRHPPHjs.g; exports.Item = _chunkUYRRHPPHjs.f; exports.Root = _chunkUYRRHPPHjs.e; exports.createCheckboxGroupScope = _chunkUYRRHPPHjs.a;
|
|
2
2
|
//# sourceMappingURL=checkbox-group.primitive.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-JOBEKA4M.mjs";export{b as CheckboxGroup,d as CheckboxGroupIndicator,c as CheckboxGroupItem,g as Indicator,f as Item,e as Root,a as createCheckboxGroupScope};
|
|
2
2
|
//# sourceMappingURL=checkbox-group.primitive.mjs.map
|
package/dist/react/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkVXPAGNPJjs = require('../chunk-VXPAGNPJ.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _cmdk = require('cmdk');var _jsxruntime = require('react/jsx-runtime');var i=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=_cmdk.Command.displayName;function v({children:e,...m}){return _jsxruntime.jsx.call(void 0, _chunkVXPAGNPJjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkVXPAGNPJjs.d,{className:"p-0",children:_jsxruntime.jsx.call(void 0, i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _reacticons.MagnifyingGlassIcon,{className:"size-5 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...m})]}));l.displayName=_cmdk.Command.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=_cmdk.Command.List.displayName;var f=p.forwardRef((e,m)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=_cmdk.Command.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "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",e),...m}));C.displayName=_cmdk.Command.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-border -mx-1 h-px",e),...m}));y.displayName=_cmdk.Command.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkVXPAGNPJjs = require('../chunk-VXPAGNPJ.js');var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _cmdk = require('cmdk');var _jsxruntime = require('react/jsx-runtime');var i=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=_cmdk.Command.displayName;function v({children:e,...m}){return _jsxruntime.jsx.call(void 0, _chunkVXPAGNPJjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkVXPAGNPJjs.d,{className:"p-0",children:_jsxruntime.jsx.call(void 0, i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _reacticons.MagnifyingGlassIcon,{className:"size-5 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...m})]}));l.displayName=_cmdk.Command.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=_cmdk.Command.List.displayName;var f=p.forwardRef((e,m)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=_cmdk.Command.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "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",e),...m}));C.displayName=_cmdk.Command.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-border -mx-1 h-px",e),...m}));y.displayName=_cmdk.Command.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=_cmdk.Command.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Loading,{ref:t,className:_chunkHQ4AUOQMjs.b.call(void 0, "flex justify-center p-2",e),...m}));P.displayName=_cmdk.Command.Loading.displayName;function N({className:e,...m}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}exports.Command = i; exports.CommandDialog = v; exports.CommandEmpty = f; exports.CommandGroup = C; exports.CommandInput = l; exports.CommandItem = u; exports.CommandList = c; exports.CommandLoading = P; exports.CommandSeparator = y; exports.CommandShortcut = N;
|
|
2
2
|
//# sourceMappingURL=command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/command.tsx"],"names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","ref","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAaxC,cAAAC,EA6CA,QAAAC,MA7CA,oBAFJ,IAAMC,EAAgB,aACpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAA,CACC,IAAKM,EACL,UAAWC,EACT,4FACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAQ,YAAcH,EAAiB,YAQvC,SAASQ,EAAc,CACrB,SAAAC,EACA,GAAGJ,CACL,EAA0C,CACxC,OACEJ,EAACS,EAAA,CAAQ,GAAGL,EACV,SAAAJ,EAACU,EAAA,CAAc,UAAU,MACvB,SAAAV,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAM,EACH,EACF,EACF,CAEJ,CAWA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OACC,UAAU,wCACV,qBAAmB,GAEnB,UAAAD,EAACF,EAAA,CAAoB,UAAU,6BAA6B,EAC5DE,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAWC,EACT,oJACAH,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAO,EAAa,YAAcZ,EAAiB,MAAM,YAWlD,IAAMa,EAAoB,aACxB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,KAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,6CAA8CH,CAAS,EACpE,GAAGC,EACN,CAEJ,EAEAQ,EAAY,YAAcb,EAAiB,KAAK,YAWhD,IAAMc,EAAqB,aACzB,CAACT,EAAOC,IACNL,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAU,2BACT,GAAGD,EACN,CAEJ,EAEAS,EAAa,YAAcd,EAAiB,MAAM,YAWlD,IAAMe,EAAqB,aACzB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAWC,EACT,yNACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAU,EAAa,YAAcf,EAAiB,MAAM,YAalD,IAAMgB,EAAyB,aAG7B,CAAC,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACD,EAAiB,UAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,uBAAwBH,CAAS,EAC9C,GAAGC,EACN,CACD,EAEDW,EAAiB,YAAchB,EAAiB,UAAU,YAW1D,IAAMiB,EAAoB,aACxB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,KAAjB,CACC,IAAKM,EACL,UAAWC,EACT,0OACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAY,EAAY,YAAcjB,EAAiB,KAAK,YAWhD,IAAMkB,EAAuB,aAG3B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACD,EAAiB,QAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,0BAA2BH,CAAS,EACjD,GAAGC,EACN,CACD,EAEDa,EAAe,YAAclB,EAAiB,QAAQ,YAQtD,SAASmB,EAAgB,CACvB,UAAAf,EACA,GAAGC,CACL,EAA4C,CAC1C,OACEJ,EAAC,QACC,UAAWM,EACT,wDACAH,CACF,EACC,GAAGC,EACN,CAEJ","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({\n children,\n ...props\n}: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Input\n>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, ref) => (\n <div\n className=\"flex items-center gap-2 border-b px-3\"\n cmdk-input-wrapper=\"\"\n >\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.List\n>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n ),\n);\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Empty\n>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>(\n (props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n ),\n);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Group\n>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\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\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<\n typeof CommandPrimitive.Separator\n>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Separator\n>;\n\nconst CommandSeparator = React.forwardRef<\n CommandSeparatorElement,\n CommandSeparatorProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n));\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Item\n>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Loading\n>;\n\nconst CommandLoading = React.forwardRef<\n CommandLoadingElement,\n CommandLoadingProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Loading\n ref={ref}\n className={cn('flex justify-center p-2', className)}\n {...props}\n />\n));\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({\n className,\n ...props\n}: CommandShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/react/command.tsx"],"names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","ref","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":"iGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAaxC,cAAAC,EA6CA,QAAAC,MA7CA,oBAFJ,IAAMC,EAAgB,aACpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAA,CACC,IAAKM,EACL,UAAWC,EACT,4FACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAQ,YAAcH,EAAiB,YAQvC,SAASQ,EAAc,CACrB,SAAAC,EACA,GAAGJ,CACL,EAA0C,CACxC,OACEJ,EAACS,EAAA,CAAQ,GAAGL,EACV,SAAAJ,EAACU,EAAA,CAAc,UAAU,MACvB,SAAAV,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAM,EACH,EACF,EACF,CAEJ,CAWA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OACC,UAAU,wCACV,qBAAmB,GAEnB,UAAAD,EAACF,EAAA,CAAoB,UAAU,6BAA6B,EAC5DE,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAWC,EACT,oJACAH,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAO,EAAa,YAAcZ,EAAiB,MAAM,YAWlD,IAAMa,EAAoB,aACxB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,KAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,6CAA8CH,CAAS,EACpE,GAAGC,EACN,CAEJ,EAEAQ,EAAY,YAAcb,EAAiB,KAAK,YAWhD,IAAMc,EAAqB,aACzB,CAACT,EAAOC,IACNL,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAU,2BACT,GAAGD,EACN,CAEJ,EAEAS,EAAa,YAAcd,EAAiB,MAAM,YAWlD,IAAMe,EAAqB,aACzB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,MAAjB,CACC,IAAKM,EACL,UAAWC,EACT,yNACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAU,EAAa,YAAcf,EAAiB,MAAM,YAalD,IAAMgB,EAAyB,aAG7B,CAAC,CAAE,UAAAZ,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACD,EAAiB,UAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,uBAAwBH,CAAS,EAC9C,GAAGC,EACN,CACD,EAEDW,EAAiB,YAAchB,EAAiB,UAAU,YAW1D,IAAMiB,EAAoB,aACxB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACD,EAAiB,KAAjB,CACC,IAAKM,EACL,UAAWC,EACT,0OACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAY,EAAY,YAAcjB,EAAiB,KAAK,YAWhD,IAAMkB,EAAuB,aAG3B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACD,EAAiB,QAAjB,CACC,IAAKM,EACL,UAAWC,EAAG,0BAA2BH,CAAS,EACjD,GAAGC,EACN,CACD,EAEDa,EAAe,YAAclB,EAAiB,QAAQ,YAQtD,SAASmB,EAAgB,CACvB,UAAAf,EACA,GAAGC,CACL,EAA4C,CAC1C,OACEJ,EAAC,QACC,UAAWM,EACT,wDACAH,CACF,EACC,GAAGC,EACN,CAEJ","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({\n children,\n ...props\n}: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Input\n>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, ref) => (\n <div\n className=\"flex items-center gap-2 border-b px-3\"\n cmdk-input-wrapper=\"\"\n >\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.List\n>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n ),\n);\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Empty\n>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>(\n (props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n ),\n);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Group\n>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\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\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<\n typeof CommandPrimitive.Separator\n>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Separator\n>;\n\nconst CommandSeparator = React.forwardRef<\n CommandSeparatorElement,\n CommandSeparatorProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n));\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Item\n>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Loading\n>;\n\nconst CommandLoading = React.forwardRef<\n CommandLoadingElement,\n CommandLoadingProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Loading\n ref={ref}\n className={cn('flex justify-center p-2', className)}\n {...props}\n />\n));\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({\n className,\n ...props\n}: CommandShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"]}
|
package/dist/react/command.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a as r,d}from"../chunk-PWF46YXQ.mjs";import{b as n}from"../chunk-LEUB3C3L.mjs";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className: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",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className:n("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-
|
|
1
|
+
"use client";import{a as r,d}from"../chunk-PWF46YXQ.mjs";import{b as n}from"../chunk-LEUB3C3L.mjs";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className: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",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className:n("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=o.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));P.displayName=o.Loading.displayName;function N({className:e,...m}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}export{i as Command,v as CommandDialog,f as CommandEmpty,C as CommandGroup,l as CommandInput,u as CommandItem,c as CommandList,P as CommandLoading,y as CommandSeparator,N as CommandShortcut};
|
|
2
2
|
//# sourceMappingURL=command.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({\n children,\n ...props\n}: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Input\n>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, ref) => (\n <div\n className=\"flex items-center gap-2 border-b px-3\"\n cmdk-input-wrapper=\"\"\n >\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.List\n>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n ),\n);\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Empty\n>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>(\n (props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n ),\n);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Group\n>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\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\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<\n typeof CommandPrimitive.Separator\n>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Separator\n>;\n\nconst CommandSeparator = React.forwardRef<\n CommandSeparatorElement,\n CommandSeparatorProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n));\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Item\n>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Loading\n>;\n\nconst CommandLoading = React.forwardRef<\n CommandLoadingElement,\n CommandLoadingProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Loading\n ref={ref}\n className={cn('flex justify-center p-2', className)}\n {...props}\n />\n));\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({\n className,\n ...props\n}: CommandShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"],"mappings":"mGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAaxC,cAAAC,EA6CA,QAAAC,MA7CA,oBAFJ,IAAMC,EAAgB,aACpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAA,CACC,IAAKD,EACL,UAAWE,EACT,4FACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAQ,YAAcI,EAAiB,YAQvC,SAASE,EAAc,CACrB,SAAAC,EACA,GAAGL,CACL,EAA0C,CACxC,OACEJ,EAACU,EAAA,CAAQ,GAAGN,EACV,SAAAJ,EAACW,EAAA,CAAc,UAAU,MACvB,SAAAX,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAO,EACH,EACF,EACF,CAEJ,CAWA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OACC,UAAU,wCACV,qBAAmB,GAEnB,UAAAD,EAACa,EAAA,CAAoB,UAAU,6BAA6B,EAC5Db,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,oJACAJ,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAQ,EAAa,YAAcN,EAAiB,MAAM,YAWlD,IAAMQ,EAAoB,aACxB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,6CAA8CJ,CAAS,EACpE,GAAGC,EACN,CAEJ,EAEAU,EAAY,YAAcR,EAAiB,KAAK,YAWhD,IAAMS,EAAqB,aACzB,CAACX,EAAOC,IACNL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAU,2BACT,GAAGD,EACN,CAEJ,EAEAW,EAAa,YAAcT,EAAiB,MAAM,YAWlD,IAAMU,EAAqB,aACzB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,yNACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAY,EAAa,YAAcV,EAAiB,MAAM,YAalD,IAAMW,EAAyB,aAG7B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACM,EAAiB,UAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,uBAAwBJ,CAAS,EAC9C,GAAGC,EACN,CACD,EAEDa,EAAiB,YAAcX,EAAiB,UAAU,YAW1D,IAAMY,EAAoB,aACxB,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EACT,0OACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAc,EAAY,YAAcZ,EAAiB,KAAK,YAWhD,IAAMa,EAAuB,aAG3B,CAAC,CAAE,UAAAhB,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACM,EAAiB,QAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,0BAA2BJ,CAAS,EACjD,GAAGC,EACN,CACD,EAEDe,EAAe,YAAcb,EAAiB,QAAQ,YAQtD,SAASc,EAAgB,CACvB,UAAAjB,EACA,GAAGC,CACL,EAA4C,CAC1C,OACEJ,EAAC,QACC,UAAWO,EACT,wDACAJ,CACF,EACC,GAAGC,EACN,CAEJ","names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"]}
|
|
1
|
+
{"version":3,"sources":["../../src/react/command.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { MagnifyingGlassIcon } from '@radix-ui/react-icons';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { cn } from '../lib/utils';\nimport { Dialog, DialogContent } from './dialog';\n\n/* -----------------------------------------------------------------------------\n * Component: Command\n * -------------------------------------------------------------------------- */\n\ntype CommandElement = React.ElementRef<typeof CommandPrimitive>;\ntype CommandProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n\nconst Command = React.forwardRef<CommandElement, CommandProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({\n children,\n ...props\n}: CommandDialogProps): React.JSX.Element {\n return (\n <Dialog {...props}>\n <DialogContent className=\"p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[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\n/* -----------------------------------------------------------------------------\n * Component: CommandInput\n * -------------------------------------------------------------------------- */\n\ntype CommandInputElement = React.ElementRef<typeof CommandPrimitive.Input>;\ntype CommandInputProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Input\n>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, ref) => (\n <div\n className=\"flex items-center gap-2 border-b px-3\"\n cmdk-input-wrapper=\"\"\n >\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n ),\n);\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandList\n * -------------------------------------------------------------------------- */\n\ntype CommandListElement = React.ElementRef<typeof CommandPrimitive.List>;\ntype CommandListProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.List\n>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n ),\n);\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandEmpty\n * -------------------------------------------------------------------------- */\n\ntype CommandEmptyElement = React.ElementRef<typeof CommandPrimitive.Empty>;\ntype CommandEmptyProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Empty\n>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>(\n (props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n ),\n);\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandGroup\n * -------------------------------------------------------------------------- */\n\ntype CommandGroupElement = React.ElementRef<typeof CommandPrimitive.Group>;\ntype CommandGroupProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Group\n>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\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\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandSeparator\n * -------------------------------------------------------------------------- */\n\ntype CommandSeparatorElement = React.ElementRef<\n typeof CommandPrimitive.Separator\n>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Separator\n>;\n\nconst CommandSeparator = React.forwardRef<\n CommandSeparatorElement,\n CommandSeparatorProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n));\n\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandItem\n * -------------------------------------------------------------------------- */\n\ntype CommandItemElement = React.ElementRef<typeof CommandPrimitive.Item>;\ntype CommandItemProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Item\n>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(\n ({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n 'aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandLoading\n * -------------------------------------------------------------------------- */\n\ntype CommandLoadingElement = React.ElementRef<typeof CommandPrimitive.Loading>;\ntype CommandLoadingProps = React.ComponentPropsWithoutRef<\n typeof CommandPrimitive.Loading\n>;\n\nconst CommandLoading = React.forwardRef<\n CommandLoadingElement,\n CommandLoadingProps\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Loading\n ref={ref}\n className={cn('flex justify-center p-2', className)}\n {...props}\n />\n));\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({\n className,\n ...props\n}: CommandShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandLoading,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandLoadingProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"],"mappings":"mGAEA,UAAYA,MAAW,QACvB,OAAS,uBAAAC,MAA2B,wBACpC,OAAS,WAAWC,MAAwB,OAaxC,cAAAC,EA6CA,QAAAC,MA7CA,oBAFJ,IAAMC,EAAgB,aACpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAA,CACC,IAAKD,EACL,UAAWE,EACT,4FACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAQ,YAAcI,EAAiB,YAQvC,SAASE,EAAc,CACrB,SAAAC,EACA,GAAGL,CACL,EAA0C,CACxC,OACEJ,EAACU,EAAA,CAAQ,GAAGN,EACV,SAAAJ,EAACW,EAAA,CAAc,UAAU,MACvB,SAAAX,EAACE,EAAA,CAAQ,UAAU,2TAChB,SAAAO,EACH,EACF,EACF,CAEJ,CAWA,IAAMG,EAAqB,aACzB,CAAC,CAAE,UAAAT,EAAW,GAAGC,CAAM,EAAGC,IACxBJ,EAAC,OACC,UAAU,wCACV,qBAAmB,GAEnB,UAAAD,EAACa,EAAA,CAAoB,UAAU,6BAA6B,EAC5Db,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,oJACAJ,CACF,EACC,GAAGC,EACN,GACF,CAEJ,EAEAQ,EAAa,YAAcN,EAAiB,MAAM,YAWlD,IAAMQ,EAAoB,aACxB,CAAC,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,6CAA8CJ,CAAS,EACpE,GAAGC,EACN,CAEJ,EAEAU,EAAY,YAAcR,EAAiB,KAAK,YAWhD,IAAMS,EAAqB,aACzB,CAACX,EAAOC,IACNL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAU,2BACT,GAAGD,EACN,CAEJ,EAEAW,EAAa,YAAcT,EAAiB,MAAM,YAWlD,IAAMU,EAAqB,aACzB,CAAC,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,MAAjB,CACC,IAAKD,EACL,UAAWE,EACT,yNACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAY,EAAa,YAAcV,EAAiB,MAAM,YAalD,IAAMW,EAAyB,aAG7B,CAAC,CAAE,UAAAd,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACM,EAAiB,UAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,uBAAwBJ,CAAS,EAC9C,GAAGC,EACN,CACD,EAEDa,EAAiB,YAAcX,EAAiB,UAAU,YAW1D,IAAMY,EAAoB,aACxB,CAAC,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAAGC,IACxBL,EAACM,EAAiB,KAAjB,CACC,IAAKD,EACL,UAAWE,EACT,0OACAJ,CACF,EACC,GAAGC,EACN,CAEJ,EAEAc,EAAY,YAAcZ,EAAiB,KAAK,YAWhD,IAAMa,EAAuB,aAG3B,CAAC,CAAE,UAAAhB,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAACM,EAAiB,QAAjB,CACC,IAAKD,EACL,UAAWE,EAAG,0BAA2BJ,CAAS,EACjD,GAAGC,EACN,CACD,EAEDe,EAAe,YAAcb,EAAiB,QAAQ,YAQtD,SAASc,EAAgB,CACvB,UAAAjB,EACA,GAAGC,CACL,EAA4C,CAC1C,OACEJ,EAAC,QACC,UAAWO,EACT,wDACAJ,CACF,EACC,GAAGC,EACN,CAEJ","names":["React","MagnifyingGlassIcon","CommandPrimitive","jsx","jsxs","Command","className","props","ref","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reactcontextmenu = require('@radix-ui/react-context-menu'); var e = _interopRequireWildcard(_reactcontextmenu);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var I=e.Root,S= exports.ContextMenuTrigger =e.Trigger,h= exports.ContextMenuGroup =e.Group,N= exports.ContextMenuSub =e.Sub,E= exports.ContextMenuRadioGroup =e.RadioGroup,d= exports.ContextMenuSubTrigger =a.forwardRef(({children:t,className:o,inset:n,...s},u)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:u,className:_chunkHQ4AUOQMjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkHQ4AUOQMjs = require('../chunk-HQ4AUOQM.js');var _react = require('react'); var a = _interopRequireWildcard(_react);var _reactcontextmenu = require('@radix-ui/react-context-menu'); var e = _interopRequireWildcard(_reactcontextmenu);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var I=e.Root,S= exports.ContextMenuTrigger =e.Trigger,h= exports.ContextMenuGroup =e.Group,N= exports.ContextMenuSub =e.Sub,E= exports.ContextMenuRadioGroup =e.RadioGroup,d= exports.ContextMenuSubTrigger =a.forwardRef(({children:t,className:o,inset:n,...s},u)=>_jsxruntime.jsxs.call(void 0, e.SubTrigger,{ref:u,className:_chunkHQ4AUOQMjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none",n&&"pl-8",o),...s,children:[t,_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"ml-auto size-4"})]}));d.displayName=e.SubTrigger.displayName;var c=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.SubContent,{ref:n,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...o})}));c.displayName=e.SubContent.displayName;var l=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Portal,{children:_jsxruntime.jsx.call(void 0, e.Content,{ref:n,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...o})}));l.displayName=e.Content.displayName;var M=a.forwardRef(({className:t,inset:o,...n},s)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var f=a.forwardRef(({children:t,className:o,checked:n,...s},u)=>_jsxruntime.jsxs.call(void 0, e.CheckboxItem,{ref:u,className:_chunkHQ4AUOQMjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o),checked:n,...s,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;var P=a.forwardRef(({children:t,className:o,...n},s)=>_jsxruntime.jsxs.call(void 0, e.RadioItem,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:_jsxruntime.jsx.call(void 0, e.ItemIndicator,{children:_jsxruntime.jsx.call(void 0, _reacticons.DotFilledIcon,{className:"size-4 fill-current"})})}),t]}));P.displayName=e.RadioItem.displayName;var y=a.forwardRef(({className:t,inset:o,...n},s)=>_jsxruntime.jsx.call(void 0, e.Label,{ref:s,className:_chunkHQ4AUOQMjs.b.call(void 0, "text-foreground px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...n}));y.displayName=e.Label.displayName;var R=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Separator,{ref:n,className:_chunkHQ4AUOQMjs.b.call(void 0, "bg-border -mx-1 my-1 h-px",t),...o}));R.displayName=e.Separator.displayName;function w({className:t,...o}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunkHQ4AUOQMjs.b.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}var b=a.forwardRef(({className:t,...o},n)=>_jsxruntime.jsx.call(void 0, e.Arrow,{ref:n,className:_chunkHQ4AUOQMjs.b.call(void 0, "fill-popover",t),...o}));b.displayName=e.Arrow.displayName;exports.ContextMenu = I; exports.ContextMenuArrow = b; exports.ContextMenuCheckboxItem = f; exports.ContextMenuContent = l; exports.ContextMenuGroup = h; exports.ContextMenuItem = M; exports.ContextMenuLabel = y; exports.ContextMenuRadioGroup = E; exports.ContextMenuRadioItem = P; exports.ContextMenuSeparator = R; exports.ContextMenuShortcut = w; exports.ContextMenuSub = N; exports.ContextMenuSubContent = c; exports.ContextMenuSubTrigger = d; exports.ContextMenuTrigger = S;
|
|
2
2
|
//# sourceMappingURL=context-menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/react/context-menu.tsx"],"names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","ref","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OACE,aAAAC,EACA,oBAAAC,EACA,iBAAAC,MACK,wBAiEL,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBAzDF,IAAMC,EAAmC,OASnCC,EAA0C,UAS1CC,EAAwC,QASxCC,EAAsC,MAStCC,EAA6C,aAiB7CC,EAA8B,aAGlC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC3CX,EAAsB,aAArB,CACC,IAAKW,EACL,UAAWC,EACT,mNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACF,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CACD,EAEDS,EAAsB,YAAmC,aAAW,YAapE,IAAMO,EAA8B,aAGlC,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,aAArB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDG,EAAsB,YAAmC,aAAW,YAapE,IAAMC,EAA2B,aAG/B,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,UAArB,CACC,IAAKY,EACL,UAAWC,EACT,2YACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDI,EAAmB,YAAmC,UAAQ,YAe9D,IAAMC,EAAwB,aAG5B,CAAC,CAAE,UAAAP,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACjCZ,EAAsB,OAArB,CACC,IAAKY,EACL,UAAWC,EACT,kNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CACD,EAEDK,EAAgB,YAAmC,OAAK,YAaxD,IAAMC,EAAgC,aAGpC,CAAC,CAAE,SAAAT,EAAU,UAAAC,EAAW,QAAAS,EAAS,GAAGP,CAAM,EAAGC,IAC7CX,EAAsB,eAArB,CACC,IAAKW,EACL,UAAWC,EACT,uNACAJ,CACF,EACA,QAASS,EACR,GAAGP,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAsB,gBAArB,CACC,SAAAA,EAACH,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACCW,GACH,CACD,EAEDS,EAAwB,YACD,eAAa,YAapC,IAAME,EAA6B,aAGjC,CAAC,CAAE,SAAAX,EAAU,UAAAC,EAAW,GAAGE,CAAM,EAAGC,IACpCX,EAAsB,YAArB,CACC,IAAKW,EACL,UAAWC,EACT,uNACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAsB,gBAArB,CACC,SAAAA,EAACD,EAAA,CAAc,UAAU,sBAAsB,EACjD,EACF,EACCS,GACH,CACD,EAEDW,EAAqB,YAAmC,YAAU,YAelE,IAAMC,EAAyB,aAG7B,CAAC,CAAE,UAAAX,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACjCZ,EAAsB,QAArB,CACC,IAAKY,EACL,UAAWC,EACT,oDACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CACD,EAEDS,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA6B,aAGjC,CAAC,CAAE,UAAAZ,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,YAArB,CACC,IAAKY,EACL,UAAWC,EAAG,4BAA6BJ,CAAS,EACnD,GAAGE,EACN,CACD,EAEDU,EAAqB,YAAmC,YAAU,YAQlE,SAASC,EAAoB,CAC3B,UAAAb,EACA,GAAGE,CACL,EAAgD,CAC9C,OACEX,EAAC,QACC,UAAWa,EACT,wDACAJ,CACF,EACC,GAAGE,EACN,CAEJ,CAWA,IAAMY,EAAyB,aAG7B,CAAC,CAAE,UAAAd,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,QAArB,CACC,IAAKY,EACL,UAAWC,EAAG,eAAgBJ,CAAS,EACtC,GAAGE,EACN,CACD,EAEDY,EAAiB,YAAmC,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Trigger\n>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Group\n>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<\n typeof ContextMenuPrimitive.Sub\n>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioGroup\n>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<\n typeof ContextMenuPrimitive.SubTrigger\n>;\n\ninterface ContextMenuSubTriggerProps\n extends React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubTrigger\n > {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(({ children, className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\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 select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<\n typeof ContextMenuPrimitive.SubContent\n>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubContent\n>;\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<\n typeof ContextMenuPrimitive.Content\n>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Content\n>;\n\nconst ContextMenuContent = React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.Item\n>;\n\ninterface ContextMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(({ children, className, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\n\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(({ children, className, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<\n typeof ContextMenuPrimitive.Label\n>;\n\ninterface ContextMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'text-foreground px-2 py-1.5 text-sm font-semibold',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<\n typeof ContextMenuPrimitive.Separator\n>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Separator\n>;\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n));\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: ContextMenuShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<\n typeof ContextMenuPrimitive.Arrow\n>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow\n ref={ref}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n ContextMenuArrow,\n type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/react/context-menu.tsx"],"names":["React","ContextMenuPrimitive","CheckIcon","ChevronRightIcon","DotFilledIcon","jsx","jsxs","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","children","className","inset","props","ref","cn","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","checked","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut","ContextMenuArrow"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,+BACtC,OACE,aAAAC,EACA,oBAAAC,EACA,iBAAAC,MACK,wBAiEL,OAUE,OAAAC,EAVF,QAAAC,MAAA,oBAzDF,IAAMC,EAAmC,OASnCC,EAA0C,UAS1CC,EAAwC,QASxCC,EAAsC,MAStCC,EAA6C,aAiB7CC,EAA8B,aAGlC,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IAC3CX,EAAsB,aAArB,CACC,IAAKW,EACL,UAAWC,EACT,mNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EAEH,UAAAH,EACDR,EAACF,EAAA,CAAiB,UAAU,iBAAiB,GAC/C,CACD,EAEDS,EAAsB,YAAmC,aAAW,YAapE,IAAMO,EAA8B,aAGlC,CAAC,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,aAArB,CACC,IAAKY,EACL,UAAWC,EACT,gtBACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDG,EAAsB,YAAmC,aAAW,YAapE,IAAMC,EAA2B,aAG/B,CAAC,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,SAArB,CACC,SAAAA,EAAsB,UAArB,CACC,IAAKY,EACL,UAAWC,EACT,2YACAJ,CACF,EACC,GAAGE,EACN,EACF,CACD,EAEDI,EAAmB,YAAmC,UAAQ,YAe9D,IAAMC,EAAwB,aAG5B,CAAC,CAAE,UAAAP,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACjCZ,EAAsB,OAArB,CACC,IAAKY,EACL,UAAWC,EACT,kNACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CACD,EAEDK,EAAgB,YAAmC,OAAK,YAaxD,IAAMC,EAAgC,aAGpC,CAAC,CAAE,SAAAT,EAAU,UAAAC,EAAW,QAAAS,EAAS,GAAGP,CAAM,EAAGC,IAC7CX,EAAsB,eAArB,CACC,IAAKW,EACL,UAAWC,EACT,uNACAJ,CACF,EACA,QAASS,EACR,GAAGP,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAsB,gBAArB,CACC,SAAAA,EAACH,EAAA,CAAU,UAAU,SAAS,EAChC,EACF,EACCW,GACH,CACD,EAEDS,EAAwB,YACD,eAAa,YAapC,IAAME,EAA6B,aAGjC,CAAC,CAAE,SAAAX,EAAU,UAAAC,EAAW,GAAGE,CAAM,EAAGC,IACpCX,EAAsB,YAArB,CACC,IAAKW,EACL,UAAWC,EACT,uNACAJ,CACF,EACC,GAAGE,EAEJ,UAAAX,EAAC,QAAK,UAAU,4DACd,SAAAA,EAAsB,gBAArB,CACC,SAAAA,EAACD,EAAA,CAAc,UAAU,sBAAsB,EACjD,EACF,EACCS,GACH,CACD,EAEDW,EAAqB,YAAmC,YAAU,YAelE,IAAMC,EAAyB,aAG7B,CAAC,CAAE,UAAAX,EAAW,MAAAC,EAAO,GAAGC,CAAM,EAAGC,IACjCZ,EAAsB,QAArB,CACC,IAAKY,EACL,UAAWC,EACT,oDACAH,GAAS,OACTD,CACF,EACC,GAAGE,EACN,CACD,EAEDS,EAAiB,YAAmC,QAAM,YAa1D,IAAMC,EAA6B,aAGjC,CAAC,CAAE,UAAAZ,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,YAArB,CACC,IAAKY,EACL,UAAWC,EAAG,4BAA6BJ,CAAS,EACnD,GAAGE,EACN,CACD,EAEDU,EAAqB,YAAmC,YAAU,YAQlE,SAASC,EAAoB,CAC3B,UAAAb,EACA,GAAGE,CACL,EAAgD,CAC9C,OACEX,EAAC,QACC,UAAWa,EACT,wDACAJ,CACF,EACC,GAAGE,EACN,CAEJ,CAWA,IAAMY,EAAyB,aAG7B,CAAC,CAAE,UAAAd,EAAW,GAAGE,CAAM,EAAGC,IAC1BZ,EAAsB,QAArB,CACC,IAAKY,EACL,UAAWC,EAAG,eAAgBJ,CAAS,EACtC,GAAGE,EACN,CACD,EAEDY,EAAiB,YAAmC,QAAM","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ContextMenuPrimitive from '@radix-ui/react-context-menu';\nimport {\n CheckIcon,\n ChevronRightIcon,\n DotFilledIcon,\n} from '@radix-ui/react-icons';\nimport { cn } from '../lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenu\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuProps = React.ComponentProps<typeof ContextMenuPrimitive.Root>;\nconst ContextMenu = ContextMenuPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuTriggerProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Trigger\n>;\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuGroupProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Group\n>;\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSub\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubProps = React.ComponentProps<\n typeof ContextMenuPrimitive.Sub\n>;\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioGroup\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioGroupProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioGroup\n>;\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubTrigger\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubTriggerElement = React.ElementRef<\n typeof ContextMenuPrimitive.SubTrigger\n>;\n\ninterface ContextMenuSubTriggerProps\n extends React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubTrigger\n > {\n inset?: boolean;\n}\n\nconst ContextMenuSubTrigger = React.forwardRef<\n ContextMenuSubTriggerElement,\n ContextMenuSubTriggerProps\n>(({ children, className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\n\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSubContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSubContentElement = React.ElementRef<\n typeof ContextMenuPrimitive.SubContent\n>;\ntype ContextMenuSubContentProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.SubContent\n>;\n\nconst ContextMenuSubContent = React.forwardRef<\n ContextMenuSubContentElement,\n ContextMenuSubContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuContent\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuContentElement = React.ElementRef<\n typeof ContextMenuPrimitive.Content\n>;\ntype ContextMenuContentProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Content\n>;\n\nconst ContextMenuContent = React.forwardRef<\n ContextMenuContentElement,\n ContextMenuContentProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md',\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\n\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.Item\n>;\n\ninterface ContextMenuItemProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> {\n inset?: boolean;\n}\n\nconst ContextMenuItem = React.forwardRef<\n ContextMenuItemElement,\n ContextMenuItemProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuCheckboxItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuCheckboxItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\ntype ContextMenuCheckboxItemProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.CheckboxItem\n>;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n ContextMenuCheckboxItemElement,\n ContextMenuCheckboxItemProps\n>(({ children, className, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\n\nContextMenuCheckboxItem.displayName =\n ContextMenuPrimitive.CheckboxItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuRadioItem\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuRadioItemElement = React.ElementRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\ntype ContextMenuRadioItemProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.RadioItem\n>;\n\nconst ContextMenuRadioItem = React.forwardRef<\n ContextMenuRadioItemElement,\n ContextMenuRadioItemProps\n>(({ children, className, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <DotFilledIcon className=\"size-4 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\n\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuLabel\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuLabelElement = React.ElementRef<\n typeof ContextMenuPrimitive.Label\n>;\n\ninterface ContextMenuLabelProps\n extends React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> {\n inset?: boolean;\n}\n\nconst ContextMenuLabel = React.forwardRef<\n ContextMenuLabelElement,\n ContextMenuLabelProps\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\n 'text-foreground px-2 py-1.5 text-sm font-semibold',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\n\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuSeparator\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuSeparatorElement = React.ElementRef<\n typeof ContextMenuPrimitive.Separator\n>;\ntype ContextMenuSeparatorProps = React.ComponentPropsWithoutRef<\n typeof ContextMenuPrimitive.Separator\n>;\n\nconst ContextMenuSeparator = React.forwardRef<\n ContextMenuSeparatorElement,\n ContextMenuSeparatorProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn('bg-border -mx-1 my-1 h-px', className)}\n {...props}\n />\n));\n\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuShortcut\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction ContextMenuShortcut({\n className,\n ...props\n}: ContextMenuShortcutProps): React.JSX.Element {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: ContextMenuArrow\n * -------------------------------------------------------------------------- */\n\ntype ContextMenuArrowElement = React.ElementRef<\n typeof ContextMenuPrimitive.Arrow\n>;\ntype ContextMenuArrowProps = ContextMenuPrimitive.ContextMenuArrowProps;\n\nconst ContextMenuArrow = React.forwardRef<\n ContextMenuArrowElement,\n ContextMenuArrowProps\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Arrow\n ref={ref}\n className={cn('fill-popover', className)}\n {...props}\n />\n));\n\nContextMenuArrow.displayName = ContextMenuPrimitive.Arrow.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n ContextMenuArrow,\n type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n type ContextMenuArrowProps,\n};\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{b as r}from"../chunk-LEUB3C3L.mjs";import*as a from"react";import*as e from"@radix-ui/react-context-menu";import{CheckIcon as m,ChevronRightIcon as C,DotFilledIcon as x}from"@radix-ui/react-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";var I=e.Root,S=e.Trigger,h=e.Group,N=e.Sub,E=e.RadioGroup,d=a.forwardRef(({children:t,className:o,inset:n,...s},u)=>p(e.SubTrigger,{ref:u,className:r("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-
|
|
1
|
+
"use client";import{b as r}from"../chunk-LEUB3C3L.mjs";import*as a from"react";import*as e from"@radix-ui/react-context-menu";import{CheckIcon as m,ChevronRightIcon as C,DotFilledIcon as x}from"@radix-ui/react-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";var I=e.Root,S=e.Trigger,h=e.Group,N=e.Sub,E=e.RadioGroup,d=a.forwardRef(({children:t,className:o,inset:n,...s},u)=>p(e.SubTrigger,{ref:u,className:r("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none",n&&"pl-8",o),...s,children:[t,i(C,{className:"ml-auto size-4"})]}));d.displayName=e.SubTrigger.displayName;var c=a.forwardRef(({className:t,...o},n)=>i(e.Portal,{children:i(e.SubContent,{ref:n,className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...o})}));c.displayName=e.SubContent.displayName;var l=a.forwardRef(({className:t,...o},n)=>i(e.Portal,{children:i(e.Content,{ref:n,className:r("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=open]:fade-in data-[state=open]:zoom-in-95 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 z-50 min-w-32 rounded-md border p-1 shadow-md",t),...o})}));l.displayName=e.Content.displayName;var M=a.forwardRef(({className:t,inset:o,...n},s)=>i(e.Item,{ref:s,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o&&"pl-8",t),...n}));M.displayName=e.Item.displayName;var f=a.forwardRef(({children:t,className:o,checked:n,...s},u)=>p(e.CheckboxItem,{ref:u,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o),checked:n,...s,children:[i("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(m,{className:"size-4"})})}),t]}));f.displayName=e.CheckboxItem.displayName;var P=a.forwardRef(({children:t,className:o,...n},s)=>p(e.RadioItem,{ref:s,className:r("focus:bg-accent focus:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50",o),...n,children:[i("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:i(e.ItemIndicator,{children:i(x,{className:"size-4 fill-current"})})}),t]}));P.displayName=e.RadioItem.displayName;var y=a.forwardRef(({className:t,inset:o,...n},s)=>i(e.Label,{ref:s,className:r("text-foreground px-2 py-1.5 text-sm font-semibold",o&&"pl-8",t),...n}));y.displayName=e.Label.displayName;var R=a.forwardRef(({className:t,...o},n)=>i(e.Separator,{ref:n,className:r("bg-border -mx-1 my-1 h-px",t),...o}));R.displayName=e.Separator.displayName;function w({className:t,...o}){return i("span",{className:r("text-muted-foreground ml-auto text-xs tracking-widest",t),...o})}var b=a.forwardRef(({className:t,...o},n)=>i(e.Arrow,{ref:n,className:r("fill-popover",t),...o}));b.displayName=e.Arrow.displayName;export{I as ContextMenu,b as ContextMenuArrow,f as ContextMenuCheckboxItem,l as ContextMenuContent,h as ContextMenuGroup,M as ContextMenuItem,y as ContextMenuLabel,E as ContextMenuRadioGroup,P as ContextMenuRadioItem,R as ContextMenuSeparator,w as ContextMenuShortcut,N as ContextMenuSub,c as ContextMenuSubContent,d as ContextMenuSubTrigger,S as ContextMenuTrigger};
|
|
2
2
|
//# sourceMappingURL=context-menu.mjs.map
|