@codefast/ui 0.1.13 → 0.1.14

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.
Files changed (96) hide show
  1. package/dist/chunk-AH3OBTDO.cjs +2 -0
  2. package/dist/chunk-AH3OBTDO.cjs.map +1 -0
  3. package/dist/chunk-CIMAEJ26.js +2 -0
  4. package/dist/chunk-CIMAEJ26.js.map +1 -0
  5. package/dist/chunk-EWFBUJ5V.cjs +2 -0
  6. package/dist/chunk-EWFBUJ5V.cjs.map +1 -0
  7. package/dist/chunk-FPCACNPX.cjs +2 -0
  8. package/dist/chunk-FPCACNPX.cjs.map +1 -0
  9. package/dist/chunk-O5EAJQGO.js +2 -0
  10. package/dist/chunk-O5EAJQGO.js.map +1 -0
  11. package/dist/chunk-SP6TA64U.js +2 -0
  12. package/dist/chunk-SP6TA64U.js.map +1 -0
  13. package/dist/components/accordion.cjs +1 -1
  14. package/dist/components/accordion.cjs.map +1 -1
  15. package/dist/components/accordion.js +1 -1
  16. package/dist/components/accordion.js.map +1 -1
  17. package/dist/components/alert-dialog.cjs +1 -1
  18. package/dist/components/alert-dialog.cjs.map +1 -1
  19. package/dist/components/alert-dialog.js +1 -1
  20. package/dist/components/alert-dialog.js.map +1 -1
  21. package/dist/components/carousel.cjs +1 -1
  22. package/dist/components/carousel.cjs.map +1 -1
  23. package/dist/components/carousel.d.cts +6 -1
  24. package/dist/components/carousel.d.ts +6 -1
  25. package/dist/components/carousel.js +1 -1
  26. package/dist/components/carousel.js.map +1 -1
  27. package/dist/components/collapsible.cjs +1 -1
  28. package/dist/components/collapsible.cjs.map +1 -1
  29. package/dist/components/collapsible.js +1 -1
  30. package/dist/components/collapsible.js.map +1 -1
  31. package/dist/components/command.cjs +1 -1
  32. package/dist/components/command.cjs.map +1 -1
  33. package/dist/components/command.d.cts +8 -8
  34. package/dist/components/command.d.ts +8 -8
  35. package/dist/components/command.js +1 -1
  36. package/dist/components/command.js.map +1 -1
  37. package/dist/components/context-menu.cjs +1 -1
  38. package/dist/components/context-menu.cjs.map +1 -1
  39. package/dist/components/context-menu.js +1 -1
  40. package/dist/components/context-menu.js.map +1 -1
  41. package/dist/components/data-table.cjs +1 -1
  42. package/dist/components/data-table.cjs.map +1 -1
  43. package/dist/components/data-table.js +1 -1
  44. package/dist/components/data-table.js.map +1 -1
  45. package/dist/components/dialog.cjs +1 -1
  46. package/dist/components/dialog.js +1 -1
  47. package/dist/components/dropdown-menu.cjs +1 -1
  48. package/dist/components/dropdown-menu.cjs.map +1 -1
  49. package/dist/components/dropdown-menu.d.cts +3 -1
  50. package/dist/components/dropdown-menu.d.ts +3 -1
  51. package/dist/components/dropdown-menu.js +1 -1
  52. package/dist/components/hover-card.cjs +1 -1
  53. package/dist/components/hover-card.cjs.map +1 -1
  54. package/dist/components/hover-card.js +1 -1
  55. package/dist/components/hover-card.js.map +1 -1
  56. package/dist/components/menubar.cjs +1 -1
  57. package/dist/components/menubar.cjs.map +1 -1
  58. package/dist/components/menubar.d.cts +3 -1
  59. package/dist/components/menubar.d.ts +3 -1
  60. package/dist/components/menubar.js +1 -1
  61. package/dist/components/menubar.js.map +1 -1
  62. package/dist/components/navigation-menu.cjs +1 -1
  63. package/dist/components/navigation-menu.cjs.map +1 -1
  64. package/dist/components/navigation-menu.js +1 -1
  65. package/dist/components/navigation-menu.js.map +1 -1
  66. package/dist/components/popover.cjs +1 -1
  67. package/dist/components/popover.cjs.map +1 -1
  68. package/dist/components/popover.js +1 -1
  69. package/dist/components/popover.js.map +1 -1
  70. package/dist/components/select.cjs +1 -1
  71. package/dist/components/select.js +1 -1
  72. package/dist/components/sheet.cjs +1 -1
  73. package/dist/components/sheet.cjs.map +1 -1
  74. package/dist/components/sheet.d.cts +30 -30
  75. package/dist/components/sheet.d.ts +30 -30
  76. package/dist/components/sheet.js +1 -1
  77. package/dist/components/sheet.js.map +1 -1
  78. package/dist/components/table.cjs +1 -1
  79. package/dist/components/table.cjs.map +1 -1
  80. package/dist/components/table.js +1 -1
  81. package/dist/components/table.js.map +1 -1
  82. package/dist/styles.css +1 -1
  83. package/dist/styles.css.map +1 -1
  84. package/package.json +11 -11
  85. package/dist/chunk-CF44244M.js +0 -2
  86. package/dist/chunk-CF44244M.js.map +0 -1
  87. package/dist/chunk-EXOTUGK5.cjs +0 -2
  88. package/dist/chunk-EXOTUGK5.cjs.map +0 -1
  89. package/dist/chunk-KH4PSDPI.js +0 -2
  90. package/dist/chunk-KH4PSDPI.js.map +0 -1
  91. package/dist/chunk-TY2YG7LH.cjs +0 -2
  92. package/dist/chunk-TY2YG7LH.cjs.map +0 -1
  93. package/dist/chunk-XOSPBKAU.cjs +0 -2
  94. package/dist/chunk-XOSPBKAU.cjs.map +0 -1
  95. package/dist/chunk-ZBAEU4QU.js +0 -2
  96. package/dist/chunk-ZBAEU4QU.js.map +0 -1
@@ -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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkYGWCQ264cjs = require('../chunk-YGWCQ264.cjs');require('../chunk-SL4DH4JN.cjs');require('../chunk-LSBI35ZE.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);var _reacticons = require('@radix-ui/react-icons');var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var d="Carousel",[D,J]=_reactcontext.createContextScope.call(void 0, d),[U,y]=D(d),_= exports.Carousel =e.forwardRef(({__scopeCarousel:a,children:l,orientation:s,opts:r,setApi:t,plugins:c,className:p,...C},m)=>{let[P,o]=_emblacarouselreact2.default.call(void 0, {...r,axis:s==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),f=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),v=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _2 => _2.scrollPrev, 'call', _3 => _3()])},[o]),N=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _4 => _4.scrollNext, 'call', _5 => _5()])},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),v()):u.key==="ArrowRight"&&(u.preventDefault(),N())},[v,N]);return e.useEffect(()=>{!o||!t||t(o)},[o,t]),e.useEffect(()=>{if(o)return f(o),o.on("reInit",f),o.on("select",f),()=>{o.off("select",f)}},[o,f]),_jsxruntime.jsx.call(void 0, U,{api:o,canScrollNext:M,canScrollPrev:L,carouselRef:P,opts:r,orientation:_nullishCoalesce(s, () => ((_optionalChain([r, 'optionalAccess', _6 => _6.axis])==="y"?"vertical":"horizontal"))),scope:a,scrollNext:N,scrollPrev:v,children:_jsxruntime.jsx.call(void 0, "div",{ref:m,"aria-roledescription":"carousel",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "relative",p),role:"region",onKeyDownCapture:I,...C,children:l})})});_.displayName=d;var R="CarouselContent",g= exports.CarouselContent =e.forwardRef(({__scopeCarousel:a,className:l,...s},r)=>{let{carouselRef:t,orientation:c}=y(R,a);return _jsxruntime.jsx.call(void 0, "div",{ref:t,className:"overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{ref:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex",c==="horizontal"?"-ml-4":"-mt-4 flex-col",l),...s})})});g.displayName=R;var x="CarouselItem",k= exports.CarouselItem =e.forwardRef(({__scopeCarousel:a,className:l,...s},r)=>{let{orientation:t}=y(x,a);return _jsxruntime.jsx.call(void 0, "div",{ref:r,"aria-roledescription":"slide",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",l),role:"group",...s})});k.displayName=x;var S="CarouselPrevious",O= exports.CarouselPrevious =e.forwardRef(({__scopeCarousel:a,className:l,variant:s="outline",size:r,icon:t,...c},p)=>{let{orientation:C,scrollPrev:m,canScrollPrev:P}=y(S,a);return _jsxruntime.jsxs.call(void 0, _chunkYGWCQ264cjs.a,{ref:p,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "absolute size-8",C==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:t,size:r,variant:s,onClick:m,...c,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=S;var b="CarouselNext",K= exports.CarouselNext =e.forwardRef(({__scopeCarousel:a,className:l,variant:s="outline",size:r,icon:t,...c},p)=>{let{orientation:C,scrollNext:m,canScrollNext:P}=y(b,a);return _jsxruntime.jsxs.call(void 0, _chunkYGWCQ264cjs.a,{ref:p,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "absolute size-8",C==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:t,size:r,variant:s,onClick:m,...c,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowRightIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Next slide"})]})});K.displayName=b;exports.Carousel = _; exports.CarouselContent = g; exports.CarouselItem = k; exports.CarouselNext = K; exports.CarouselPrevious = O; exports.createCarouselScope = J;
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";var _chunkYGWCQ264cjs = require('../chunk-YGWCQ264.cjs');require('../chunk-SL4DH4JN.cjs');require('../chunk-LSBI35ZE.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var e = _interopRequireWildcard(_react);var _emblacarouselreact = require('embla-carousel-react'); var _emblacarouselreact2 = _interopRequireDefault(_emblacarouselreact);var _reacticons = require('@radix-ui/react-icons');var _reactcontext = require('@radix-ui/react-context');var _jsxruntime = require('react/jsx-runtime');var d="Carousel",[B,J]=_reactcontext.createContextScope.call(void 0, d),[D,y]=B(d),U= exports.Carousel =e.forwardRef(({__scopeCarousel:a,children:l,orientation:r,opts:t,setApi:s,plugins:c,className:i,...C},m)=>{let[P,o]=_emblacarouselreact2.default.call(void 0, {...t,axis:r==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),f=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),v=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _2 => _2.scrollPrev, 'call', _3 => _3()])},[o]),N=e.useCallback(()=>{_optionalChain([o, 'optionalAccess', _4 => _4.scrollNext, 'call', _5 => _5()])},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),v()):u.key==="ArrowRight"&&(u.preventDefault(),N())},[v,N]);return e.useEffect(()=>{!o||!s||s(o)},[o,s]),e.useEffect(()=>{if(o)return f(o),o.on("reInit",f),o.on("select",f),()=>{o.off("select",f)}},[o,f]),_jsxruntime.jsx.call(void 0, D,{api:o,canScrollNext:M,canScrollPrev:L,carouselRef:P,opts:t,orientation:_nullishCoalesce(r, () => ((_optionalChain([t, 'optionalAccess', _6 => _6.axis])==="y"?"vertical":"horizontal"))),scope:a,scrollNext:N,scrollPrev:v,children:_jsxruntime.jsx.call(void 0, "div",{ref:m,"aria-roledescription":"carousel",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "relative",i),role:"region",onKeyDownCapture:I,...C,children:l})})});U.displayName=d;var R="CarouselContent",_= exports.CarouselContent =e.forwardRef(({__scopeCarousel:a,className:l,classNames:r,...t},s)=>{let{carouselRef:c,orientation:i}=y(R,a);return _jsxruntime.jsx.call(void 0, "div",{ref:c,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "overflow-hidden",_optionalChain([r, 'optionalAccess', _7 => _7.wrapper])),children:_jsxruntime.jsx.call(void 0, "div",{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",_optionalChain([r, 'optionalAccess', _8 => _8.content]),l),...t})})});_.displayName=R;var x="CarouselItem",k= exports.CarouselItem =e.forwardRef(({__scopeCarousel:a,className:l,...r},t)=>{let{orientation:s}=y(x,a);return _jsxruntime.jsx.call(void 0, "div",{ref:t,"aria-roledescription":"slide",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "min-w-0 shrink-0 grow-0 basis-full",s==="horizontal"?"pl-4":"pt-4",l),role:"group",...r})});k.displayName=x;var S="CarouselPrevious",O= exports.CarouselPrevious =e.forwardRef(({__scopeCarousel:a,className:l,variant:r="outline",size:t,icon:s,...c},i)=>{let{orientation:C,scrollPrev:m,canScrollPrev:P}=y(S,a);return _jsxruntime.jsxs.call(void 0, _chunkYGWCQ264cjs.a,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "absolute size-8",C==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:s,size:t,variant:r,onClick:m,...c,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=S;var b="CarouselNext",K= exports.CarouselNext =e.forwardRef(({__scopeCarousel:a,className:l,variant:r="outline",size:t,icon:s,...c},i)=>{let{orientation:C,scrollNext:m,canScrollNext:P}=y(b,a);return _jsxruntime.jsxs.call(void 0, _chunkYGWCQ264cjs.a,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "absolute size-8",C==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:s,size:t,variant:r,onClick:m,...c,children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowRightIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Next slide"})]})});K.displayName=b;exports.Carousel = U; exports.CarouselContent = _; exports.CarouselItem = k; exports.CarouselNext = K; exports.CarouselPrevious = O; exports.createCarouselScope = J;
2
2
  //# sourceMappingURL=carousel.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/carousel.cjs","../../src/components/carousel.tsx"],"names":["CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselProvider","useCarouselContext","Carousel","__scopeCarousel","children","orientation","opts","setApi","plugins","className","props","forwardedRef","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","jsx","cn","CAROUSEL_CONTENT_NAME","CarouselContent","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","variant","size","icon","jsxs","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"],"mappings":"AAAA,+iCAAY,CAAC,yDAAyC,iCAA8B,iCAA8B,yDAA0C,uECErI,kIACqC,mDACd,uDACC,+CAwHvC,IAhHFA,CAAAA,CAAgB,UAAA,CAIhB,CAACC,CAAAA,CAAuBC,CAAmB,CAAA,CAAIC,8CAAAA,CAAgC,CAAA,CAuB/E,CAACC,CAAAA,CAAkBC,CAAkB,CAAA,CAAIJ,CAAAA,CAA4CD,CAAa,CAAA,CAKlGM,CAAAA,oBAAiB,CAAA,CAAA,UAAA,CACrB,CACE,CAAE,eAAA,CAAAC,CAAAA,CAAiB,QAAA,CAAAC,CAAAA,CAAU,WAAA,CAAAC,CAAAA,CAAa,IAAA,CAAAC,CAAAA,CAAM,MAAA,CAAAC,CAAAA,CAAQ,OAAA,CAAAC,CAAAA,CAAS,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CACrFC,CAAAA,CAAAA,EACG,CACH,GAAM,CAACC,CAAAA,CAAaC,CAAG,CAAA,CAAIC,0CAAAA,CAEvB,GAAGR,CAAAA,CACH,IAAA,CAAMD,CAAAA,GAAgB,UAAA,CAAa,GAAA,CAAM,GAC3C,CAAA,CACAG,CACF,CAAA,CAEM,CAACO,CAAAA,CAAeC,CAAgB,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CACxD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AAA,CAAK1B,CAAAA,CACL,SAAA,CAAWe,iCAAAA,iBACT,CACArB,CAAAA,GAAgB,YAAA,CACZ,oCAAA,CACA,gDAAA,CACJI,CACF,CAAA,CACA,QAAA,CAAU,CAACQ,CAAAA,CACX,IAAA,CAAMkB,CAAAA,CACN,IAAA,CAAMD,CAAAA,CACN,OAAA,CAASD,CAAAA,CACT,OAAA,CAASX,CAAAA,CACR,GAAGZ,CAAAA,CAEJ,QAAA,CAAA,CAAAe,6BAAAA,0BAACgB,CAAA,CAAe,SAAA,CAAU,QAAA,CAAS,CAAA,CACnChB,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,SAAA,CAAU,QAAA,CAAA,YAAA,CAAU,CAAA,CAAA,CACtC,CAEJ,CACF,CAAA,CAEAe,CAAAA,CAAa,WAAA,CAAcD,CAAAA,CAAAA,qKAAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/carousel.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonProps } from '@/components/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = 'Carousel';\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: 'horizontal' | 'vertical';\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n} & BaseCarouselProps;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\ntype CarouselElement = HTMLDivElement;\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;\n\nconst Carousel = React.forwardRef<CarouselElement, CarouselProps>(\n (\n { __scopeCarousel, children, orientation, opts, setApi, plugins, className, ...props }: ScopedProps<CarouselProps>,\n forwardedRef,\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'vertical' ? 'y' : 'x',\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal')}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n ref={forwardedRef}\n aria-roledescription=\"carousel\"\n className={cn('relative', className)}\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselProvider>\n );\n },\n);\n\nCarousel.displayName = CAROUSEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = 'CarouselContent';\n\ntype CarouselContentElement = HTMLDivElement;\ntype CarouselContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselContent = React.forwardRef<CarouselContentElement, CarouselContentProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselContentProps>, forwardedRef) => {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={forwardedRef}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n },\n);\n\nCarouselContent.displayName = CAROUSEL_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = 'CarouselItem';\n\ntype CarouselItemElement = HTMLDivElement;\ntype CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselItem = React.forwardRef<CarouselItemElement, CarouselItemProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>, forwardedRef) => {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n ref={forwardedRef}\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n role=\"group\"\n {...props}\n />\n );\n },\n);\n\nCarouselItem.displayName = CAROUSEL_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = 'CarouselPrevious';\n\ntype CarouselPreviousElement = HTMLButtonElement;\ntype CarouselPreviousProps = ButtonProps;\n\nconst CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPreviousProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselPreviousProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n },\n);\n\nCarouselPrevious.displayName = CAROUSEL_PREVIOUS_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = 'CarouselNext';\n\ntype CarouselNextElement = HTMLButtonElement;\ntype CarouselNextProps = ButtonProps;\n\nconst CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselNextProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollNext, canScrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\n\nCarouselNext.displayName = CAROUSEL_NEXT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createCarouselScope,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n type CarouselApi,\n type CarouselProps,\n type CarouselContentProps,\n type CarouselItemProps,\n type CarouselPreviousProps,\n type CarouselNextProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/carousel.cjs","../../src/components/carousel.tsx"],"names":["CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselProvider","useCarouselContext","Carousel","__scopeCarousel","children","orientation","opts","setApi","plugins","className","props","forwardedRef","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","jsx","cn","CAROUSEL_CONTENT_NAME","CarouselContent","classNames","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","variant","size","icon","jsxs","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"],"mappings":"AAAA,+iCAAY,CAAC,yDAAyC,iCAA8B,iCAA8B,yDAA0C,uECErI,kIACqC,mDACd,uDACC,+CAwHvC,IAhHFA,CAAAA,CAAgB,UAAA,CAIhB,CAACC,CAAAA,CAAuBC,CAAmB,CAAA,CAAIC,8CAAAA,CAAgC,CAAA,CAuB/E,CAACC,CAAAA,CAAkBC,CAAkB,CAAA,CAAIJ,CAAAA,CAA4CD,CAAa,CAAA,C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sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonProps } from '@/components/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = 'Carousel';\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: 'horizontal' | 'vertical';\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n} & BaseCarouselProps;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\ntype CarouselElement = HTMLDivElement;\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;\n\nconst Carousel = React.forwardRef<CarouselElement, CarouselProps>(\n (\n { __scopeCarousel, children, orientation, opts, setApi, plugins, className, ...props }: ScopedProps<CarouselProps>,\n forwardedRef,\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'vertical' ? 'y' : 'x',\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal')}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n ref={forwardedRef}\n aria-roledescription=\"carousel\"\n className={cn('relative', className)}\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselProvider>\n );\n },\n);\n\nCarousel.displayName = CAROUSEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = 'CarouselContent';\n\ntype CarouselContentElement = HTMLDivElement;\ninterface CarouselContentProps extends React.HTMLAttributes<HTMLDivElement> {\n classNames?: {\n content?: string;\n wrapper?: string;\n };\n}\n\nconst CarouselContent = React.forwardRef<CarouselContentElement, CarouselContentProps>(\n ({ __scopeCarousel, className, classNames, ...props }: ScopedProps<CarouselContentProps>, forwardedRef) => {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className={cn('overflow-hidden', classNames?.wrapper)}>\n <div\n ref={forwardedRef}\n className={cn(\n 'flex',\n orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',\n classNames?.content,\n className,\n )}\n {...props}\n />\n </div>\n );\n },\n);\n\nCarouselContent.displayName = CAROUSEL_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = 'CarouselItem';\n\ntype CarouselItemElement = HTMLDivElement;\ntype CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselItem = React.forwardRef<CarouselItemElement, CarouselItemProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>, forwardedRef) => {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n ref={forwardedRef}\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n role=\"group\"\n {...props}\n />\n );\n },\n);\n\nCarouselItem.displayName = CAROUSEL_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = 'CarouselPrevious';\n\ntype CarouselPreviousElement = HTMLButtonElement;\ntype CarouselPreviousProps = ButtonProps;\n\nconst CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPreviousProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselPreviousProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n },\n);\n\nCarouselPrevious.displayName = CAROUSEL_PREVIOUS_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = 'CarouselNext';\n\ntype CarouselNextElement = HTMLButtonElement;\ntype CarouselNextProps = ButtonProps;\n\nconst CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselNextProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollNext, canScrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\n\nCarouselNext.displayName = CAROUSEL_NEXT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createCarouselScope,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n type CarouselApi,\n type CarouselProps,\n type CarouselContentProps,\n type CarouselItemProps,\n type CarouselPreviousProps,\n type CarouselNextProps,\n};\n"]}
@@ -19,7 +19,12 @@ interface BaseCarouselProps {
19
19
  }
20
20
  type CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;
21
21
  declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps & React.RefAttributes<HTMLDivElement>>;
22
- type CarouselContentProps = React.HTMLAttributes<HTMLDivElement>;
22
+ interface CarouselContentProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ classNames?: {
24
+ content?: string;
25
+ wrapper?: string;
26
+ };
27
+ }
23
28
  declare const CarouselContent: React.ForwardRefExoticComponent<CarouselContentProps & React.RefAttributes<HTMLDivElement>>;
24
29
  type CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;
25
30
  declare const CarouselItem: React.ForwardRefExoticComponent<CarouselItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -19,7 +19,12 @@ interface BaseCarouselProps {
19
19
  }
20
20
  type CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;
21
21
  declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps & React.RefAttributes<HTMLDivElement>>;
22
- type CarouselContentProps = React.HTMLAttributes<HTMLDivElement>;
22
+ interface CarouselContentProps extends React.HTMLAttributes<HTMLDivElement> {
23
+ classNames?: {
24
+ content?: string;
25
+ wrapper?: string;
26
+ };
27
+ }
23
28
  declare const CarouselContent: React.ForwardRefExoticComponent<CarouselContentProps & React.RefAttributes<HTMLDivElement>>;
24
29
  type CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;
25
30
  declare const CarouselItem: React.ForwardRefExoticComponent<CarouselItemProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- "use client";import{a as E}from"../chunk-ONMU2LFX.js";import"../chunk-K4DIHWHX.js";import"../chunk-YGPIWXWP.js";import{a as i}from"../chunk-VRBUDJBH.js";import*as e from"react";import h from"embla-carousel-react";import{ArrowLeftIcon as z,ArrowRightIcon as H}from"@radix-ui/react-icons";import{createContextScope as B}from"@radix-ui/react-context";import{jsx as n,jsxs as T}from"react/jsx-runtime";var d="Carousel",[D,J]=B(d),[U,y]=D(d),_=e.forwardRef(({__scopeCarousel:a,children:l,orientation:s,opts:r,setApi:t,plugins:c,className:p,...C},m)=>{let[P,o]=h({...r,axis:s==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),f=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),v=e.useCallback(()=>{o?.scrollPrev()},[o]),N=e.useCallback(()=>{o?.scrollNext()},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),v()):u.key==="ArrowRight"&&(u.preventDefault(),N())},[v,N]);return e.useEffect(()=>{!o||!t||t(o)},[o,t]),e.useEffect(()=>{if(o)return f(o),o.on("reInit",f),o.on("select",f),()=>{o.off("select",f)}},[o,f]),n(U,{api:o,canScrollNext:M,canScrollPrev:L,carouselRef:P,opts:r,orientation:s??(r?.axis==="y"?"vertical":"horizontal"),scope:a,scrollNext:N,scrollPrev:v,children:n("div",{ref:m,"aria-roledescription":"carousel",className:i("relative",p),role:"region",onKeyDownCapture:I,...C,children:l})})});_.displayName=d;var R="CarouselContent",g=e.forwardRef(({__scopeCarousel:a,className:l,...s},r)=>{let{carouselRef:t,orientation:c}=y(R,a);return n("div",{ref:t,className:"overflow-hidden",children:n("div",{ref:r,className:i("flex",c==="horizontal"?"-ml-4":"-mt-4 flex-col",l),...s})})});g.displayName=R;var x="CarouselItem",k=e.forwardRef(({__scopeCarousel:a,className:l,...s},r)=>{let{orientation:t}=y(x,a);return n("div",{ref:r,"aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",t==="horizontal"?"pl-4":"pt-4",l),role:"group",...s})});k.displayName=x;var S="CarouselPrevious",O=e.forwardRef(({__scopeCarousel:a,className:l,variant:s="outline",size:r,icon:t,...c},p)=>{let{orientation:C,scrollPrev:m,canScrollPrev:P}=y(S,a);return T(E,{ref:p,className:i("absolute size-8",C==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:t,size:r,variant:s,onClick:m,...c,children:[n(z,{className:"size-4"}),n("span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=S;var b="CarouselNext",K=e.forwardRef(({__scopeCarousel:a,className:l,variant:s="outline",size:r,icon:t,...c},p)=>{let{orientation:C,scrollNext:m,canScrollNext:P}=y(b,a);return T(E,{ref:p,className:i("absolute size-8",C==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:t,size:r,variant:s,onClick:m,...c,children:[n(H,{className:"size-4"}),n("span",{className:"sr-only",children:"Next slide"})]})});K.displayName=b;export{_ as Carousel,g as CarouselContent,k as CarouselItem,K as CarouselNext,O as CarouselPrevious,J as createCarouselScope};
1
+ "use client";import{a as E}from"../chunk-ONMU2LFX.js";import"../chunk-K4DIHWHX.js";import"../chunk-YGPIWXWP.js";import{a as p}from"../chunk-VRBUDJBH.js";import*as e from"react";import h from"embla-carousel-react";import{ArrowLeftIcon as z,ArrowRightIcon as H}from"@radix-ui/react-icons";import{createContextScope as g}from"@radix-ui/react-context";import{jsx as n,jsxs as T}from"react/jsx-runtime";var d="Carousel",[B,J]=g(d),[D,y]=B(d),U=e.forwardRef(({__scopeCarousel:a,children:l,orientation:r,opts:t,setApi:s,plugins:c,className:i,...C},m)=>{let[P,o]=h({...t,axis:r==="vertical"?"y":"x"},c),[L,A]=e.useState(!1),[M,w]=e.useState(!1),f=e.useCallback(u=>{u&&(A(u.canScrollPrev()),w(u.canScrollNext()))},[]),v=e.useCallback(()=>{o?.scrollPrev()},[o]),N=e.useCallback(()=>{o?.scrollNext()},[o]),I=e.useCallback(u=>{u.key==="ArrowLeft"?(u.preventDefault(),v()):u.key==="ArrowRight"&&(u.preventDefault(),N())},[v,N]);return e.useEffect(()=>{!o||!s||s(o)},[o,s]),e.useEffect(()=>{if(o)return f(o),o.on("reInit",f),o.on("select",f),()=>{o.off("select",f)}},[o,f]),n(D,{api:o,canScrollNext:M,canScrollPrev:L,carouselRef:P,opts:t,orientation:r??(t?.axis==="y"?"vertical":"horizontal"),scope:a,scrollNext:N,scrollPrev:v,children:n("div",{ref:m,"aria-roledescription":"carousel",className:p("relative",i),role:"region",onKeyDownCapture:I,...C,children:l})})});U.displayName=d;var R="CarouselContent",_=e.forwardRef(({__scopeCarousel:a,className:l,classNames:r,...t},s)=>{let{carouselRef:c,orientation:i}=y(R,a);return n("div",{ref:c,className:p("overflow-hidden",r?.wrapper),children:n("div",{ref:s,className:p("flex",i==="horizontal"?"-ml-4":"-mt-4 flex-col",r?.content,l),...t})})});_.displayName=R;var x="CarouselItem",k=e.forwardRef(({__scopeCarousel:a,className:l,...r},t)=>{let{orientation:s}=y(x,a);return n("div",{ref:t,"aria-roledescription":"slide",className:p("min-w-0 shrink-0 grow-0 basis-full",s==="horizontal"?"pl-4":"pt-4",l),role:"group",...r})});k.displayName=x;var S="CarouselPrevious",O=e.forwardRef(({__scopeCarousel:a,className:l,variant:r="outline",size:t,icon:s,...c},i)=>{let{orientation:C,scrollPrev:m,canScrollPrev:P}=y(S,a);return T(E,{ref:i,className:p("absolute size-8",C==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:s,size:t,variant:r,onClick:m,...c,children:[n(z,{className:"size-4"}),n("span",{className:"sr-only",children:"Previous slide"})]})});O.displayName=S;var b="CarouselNext",K=e.forwardRef(({__scopeCarousel:a,className:l,variant:r="outline",size:t,icon:s,...c},i)=>{let{orientation:C,scrollNext:m,canScrollNext:P}=y(b,a);return T(E,{ref:i,className:p("absolute size-8",C==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",l),disabled:!P,icon:s,size:t,variant:r,onClick:m,...c,children:[n(H,{className:"size-4"}),n("span",{className:"sr-only",children:"Next slide"})]})});K.displayName=b;export{U as Carousel,_ as CarouselContent,k as CarouselItem,K as CarouselNext,O as CarouselPrevious,J as createCarouselScope};
2
2
  //# sourceMappingURL=carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonProps } from '@/components/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = 'Carousel';\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: 'horizontal' | 'vertical';\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n} & BaseCarouselProps;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\ntype CarouselElement = HTMLDivElement;\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;\n\nconst Carousel = React.forwardRef<CarouselElement, CarouselProps>(\n (\n { __scopeCarousel, children, orientation, opts, setApi, plugins, className, ...props }: ScopedProps<CarouselProps>,\n forwardedRef,\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'vertical' ? 'y' : 'x',\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal')}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n ref={forwardedRef}\n aria-roledescription=\"carousel\"\n className={cn('relative', className)}\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselProvider>\n );\n },\n);\n\nCarousel.displayName = CAROUSEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = 'CarouselContent';\n\ntype CarouselContentElement = HTMLDivElement;\ntype CarouselContentProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselContent = React.forwardRef<CarouselContentElement, CarouselContentProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselContentProps>, forwardedRef) => {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\">\n <div\n ref={forwardedRef}\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n },\n);\n\nCarouselContent.displayName = CAROUSEL_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = 'CarouselItem';\n\ntype CarouselItemElement = HTMLDivElement;\ntype CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselItem = React.forwardRef<CarouselItemElement, CarouselItemProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>, forwardedRef) => {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n ref={forwardedRef}\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n role=\"group\"\n {...props}\n />\n );\n },\n);\n\nCarouselItem.displayName = CAROUSEL_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = 'CarouselPrevious';\n\ntype CarouselPreviousElement = HTMLButtonElement;\ntype CarouselPreviousProps = ButtonProps;\n\nconst CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPreviousProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselPreviousProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n },\n);\n\nCarouselPrevious.displayName = CAROUSEL_PREVIOUS_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = 'CarouselNext';\n\ntype CarouselNextElement = HTMLButtonElement;\ntype CarouselNextProps = ButtonProps;\n\nconst CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselNextProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollNext, canScrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\n\nCarouselNext.displayName = CAROUSEL_NEXT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createCarouselScope,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n type CarouselApi,\n type CarouselProps,\n type CarouselContentProps,\n type CarouselItemProps,\n type CarouselPreviousProps,\n type CarouselNextProps,\n};\n"],"mappings":"yJAEA,UAAYA,MAAW,QACvB,OAAOC,MAAqD,uBAC5D,OAAS,iBAAAC,EAAe,kBAAAC,MAAsB,wBAC9C,OAAS,sBAAAC,MAAsC,0BAwHvC,cAAAC,EAwFF,QAAAC,MAxFE,oBAhHR,IAAMC,EAAgB,WAIhB,CAACC,EAAuBC,CAAmB,EAAIC,EAAmBH,CAAa,EAuB/E,CAACI,EAAkBC,CAAkB,EAAIJ,EAA4CD,CAAa,EAKlGM,EAAiB,aACrB,CACE,CAAE,gBAAAC,EAAiB,SAAAC,EAAU,YAAAC,EAAa,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAM,EACrFC,IACG,CACH,GAAM,CAACC,EAAaC,CAAG,EAAIC,EACzB,CACE,GAAGR,EACH,KAAMD,IAAgB,WAAa,IAAM,GAC3C,EACAG,CACF,EAEM,CAACO,EAAeC,CAAgB,EAAU,WAAS,EAAK,EACxD,CAACC,EAAeC,CAAgB,EAAU,WAAS,EAAK,EAExDC,EAAiB,cAAaC,GAA6B,CAC1DA,IAILJ,EAAiBI,EAAY,cAAc,CAAC,EAC5CF,EAAiBE,EAAY,cAAc,CAAC,EAC9C,EAAG,CAAC,CAAC,EAECC,EAAmB,cAAY,IAAM,CACzCR,GAAK,WAAW,CAClB,EAAG,CAACA,CAAG,CAAC,EAEFS,EAAmB,cAAY,IAAM,CACzCT,GAAK,WAAW,CAClB,EAAG,CAACA,CAAG,CAAC,EAEFU,EAAsB,cACzBC,GAA+C,CAC1CA,EAAM,MAAQ,aAChBA,EAAM,eAAe,EACrBH,EAAW,GACFG,EAAM,MAAQ,eACvBA,EAAM,eAAe,EACrBF,EAAW,EAEf,EACA,CAACD,EAAYC,CAAU,CACzB,EAEA,OAAM,YAAU,IAAM,CAChB,CAACT,GAAO,CAACN,G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mblaCarousel","ArrowLeftIcon","ArrowRightIcon","createContextScope","jsx","jsxs","CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselProvider","useCarouselContext","Carousel","__scopeCarousel","children","orientation","opts","setApi","plugins","className","props","forwardedRef","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","cn","CAROUSEL_CONTENT_NAME","CarouselContent","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","variant","size","icon","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"]}
1
+ {"version":3,"sources":["../../src/components/carousel.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { ArrowLeftIcon, ArrowRightIcon } from '@radix-ui/react-icons';\nimport { createContextScope, type Scope } from '@radix-ui/react-context';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonProps } from '@/components/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Carousel\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NAME = 'Carousel';\n\ntype ScopedProps<P> = P & { __scopeCarousel?: Scope };\n\nconst [createCarouselContext, createCarouselScope] = createContextScope(CAROUSEL_NAME);\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ninterface BaseCarouselProps {\n opts?: CarouselOptions;\n orientation?: 'horizontal' | 'vertical';\n plugins?: CarouselPlugin;\n setApi?: (api: CarouselApi) => void;\n}\n\ntype CarouselContextValue = {\n api: ReturnType<typeof useEmblaCarousel>[1];\n canScrollNext: boolean;\n canScrollPrev: boolean;\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n scrollNext: () => void;\n scrollPrev: () => void;\n} & BaseCarouselProps;\n\nconst [CarouselProvider, useCarouselContext] = createCarouselContext<CarouselContextValue>(CAROUSEL_NAME);\n\ntype CarouselElement = HTMLDivElement;\ntype CarouselProps = React.HTMLAttributes<HTMLDivElement> & BaseCarouselProps;\n\nconst Carousel = React.forwardRef<CarouselElement, CarouselProps>(\n (\n { __scopeCarousel, children, orientation, opts, setApi, plugins, className, ...props }: ScopedProps<CarouselProps>,\n forwardedRef,\n ) => {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'vertical' ? 'y' : 'x',\n },\n plugins,\n );\n\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n\n const onSelect = React.useCallback((carouselApi: CarouselApi) => {\n if (!carouselApi) {\n return;\n }\n\n setCanScrollPrev(carouselApi.canScrollPrev());\n setCanScrollNext(carouselApi.canScrollNext());\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n const handleKeyDown = React.useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'ArrowLeft') {\n event.preventDefault();\n scrollPrev();\n } else if (event.key === 'ArrowRight') {\n event.preventDefault();\n scrollNext();\n }\n },\n [scrollPrev, scrollNext],\n );\n\n React.useEffect(() => {\n if (!api || !setApi) {\n return;\n }\n\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) {\n return;\n }\n\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n return () => {\n api.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselProvider\n api={api}\n canScrollNext={canScrollNext}\n canScrollPrev={canScrollPrev}\n carouselRef={carouselRef}\n opts={opts}\n orientation={orientation ?? (opts?.axis === 'y' ? 'vertical' : 'horizontal')}\n scope={__scopeCarousel}\n scrollNext={scrollNext}\n scrollPrev={scrollPrev}\n >\n <div\n ref={forwardedRef}\n aria-roledescription=\"carousel\"\n className={cn('relative', className)}\n role=\"region\"\n onKeyDownCapture={handleKeyDown}\n {...props}\n >\n {children}\n </div>\n </CarouselProvider>\n );\n },\n);\n\nCarousel.displayName = CAROUSEL_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselContent\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_CONTENT_NAME = 'CarouselContent';\n\ntype CarouselContentElement = HTMLDivElement;\ninterface CarouselContentProps extends React.HTMLAttributes<HTMLDivElement> {\n classNames?: {\n content?: string;\n wrapper?: string;\n };\n}\n\nconst CarouselContent = React.forwardRef<CarouselContentElement, CarouselContentProps>(\n ({ __scopeCarousel, className, classNames, ...props }: ScopedProps<CarouselContentProps>, forwardedRef) => {\n const { carouselRef, orientation } = useCarouselContext(CAROUSEL_CONTENT_NAME, __scopeCarousel);\n\n return (\n <div ref={carouselRef} className={cn('overflow-hidden', classNames?.wrapper)}>\n <div\n ref={forwardedRef}\n className={cn(\n 'flex',\n orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col',\n classNames?.content,\n className,\n )}\n {...props}\n />\n </div>\n );\n },\n);\n\nCarouselContent.displayName = CAROUSEL_CONTENT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselItem\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_ITEM_NAME = 'CarouselItem';\n\ntype CarouselItemElement = HTMLDivElement;\ntype CarouselItemProps = React.HTMLAttributes<HTMLDivElement>;\n\nconst CarouselItem = React.forwardRef<CarouselItemElement, CarouselItemProps>(\n ({ __scopeCarousel, className, ...props }: ScopedProps<CarouselItemProps>, forwardedRef) => {\n const { orientation } = useCarouselContext(CAROUSEL_ITEM_NAME, __scopeCarousel);\n\n return (\n <div\n ref={forwardedRef}\n aria-roledescription=\"slide\"\n className={cn('min-w-0 shrink-0 grow-0 basis-full', orientation === 'horizontal' ? 'pl-4' : 'pt-4', className)}\n role=\"group\"\n {...props}\n />\n );\n },\n);\n\nCarouselItem.displayName = CAROUSEL_ITEM_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselPrevious\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_PREVIOUS_NAME = 'CarouselPrevious';\n\ntype CarouselPreviousElement = HTMLButtonElement;\ntype CarouselPreviousProps = ButtonProps;\n\nconst CarouselPrevious = React.forwardRef<CarouselPreviousElement, CarouselPreviousProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselPreviousProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollPrev, canScrollPrev } = useCarouselContext(CAROUSEL_PREVIOUS_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-left-12 top-1/2 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollPrev}\n {...props}\n >\n <ArrowLeftIcon className=\"size-4\" />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n },\n);\n\nCarouselPrevious.displayName = CAROUSEL_PREVIOUS_NAME;\n\n/* -----------------------------------------------------------------------------\n * Component: CarouselNext\n * -------------------------------------------------------------------------- */\n\nconst CAROUSEL_NEXT_NAME = 'CarouselNext';\n\ntype CarouselNextElement = HTMLButtonElement;\ntype CarouselNextProps = ButtonProps;\n\nconst CarouselNext = React.forwardRef<CarouselNextElement, CarouselNextProps>(\n (\n { __scopeCarousel, className, variant = 'outline', size, icon, ...props }: ScopedProps<CarouselNextProps>,\n forwardedRef,\n ) => {\n const { orientation, scrollNext, canScrollNext } = useCarouselContext(CAROUSEL_NEXT_NAME, __scopeCarousel);\n\n return (\n <Button\n ref={forwardedRef}\n className={cn(\n 'absolute size-8',\n orientation === 'horizontal'\n ? '-right-12 top-1/2 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n icon={icon}\n size={size}\n variant={variant}\n onClick={scrollNext}\n {...props}\n >\n <ArrowRightIcon className=\"size-4\" />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n },\n);\n\nCarouselNext.displayName = CAROUSEL_NEXT_NAME;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n createCarouselScope,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n type CarouselApi,\n type CarouselProps,\n type CarouselContentProps,\n type CarouselItemProps,\n type CarouselPreviousProps,\n type CarouselNextProps,\n};\n"],"mappings":"yJAEA,UAAYA,MAAW,QACvB,OAAOC,MAAqD,uBAC5D,OAAS,iBAAAC,EAAe,kBAAAC,MAAsB,wBAC9C,OAAS,sBAAAC,MAAsC,0BAwHvC,cAAAC,EAkGF,QAAAC,MAlGE,oBAhHR,IAAMC,EAAgB,WAIhB,CAACC,EAAuBC,CAAmB,EAAIC,EAAmBH,CAAa,EAuB/E,CAACI,EAAkBC,CAAkB,EAAIJ,EAA4CD,CAAa,EAKlGM,EAAiB,aACrB,CACE,CAAE,gBAAAC,EAAiB,SAAAC,EAAU,YAAAC,EAAa,KAAAC,EAAM,OAAAC,EAAQ,QAAAC,EAAS,UAAAC,EAAW,GAAGC,CAAM,EACrFC,IACG,CACH,GAAM,CAACC,EAAaC,CAAG,EAAIC,EACzB,CACE,GAAGR,EACH,KAAMD,IAAgB,WAAa,IAAM,GAC3C,EACAG,CACF,EAEM,CAACO,EAAeC,CAAgB,EAAU,WAAS,EAAK,EACxD,CAACC,EAAeC,CAAgB,EAAU,WAAS,EAAK,EAExDC,EAAiB,cAAaC,GAA6B,CAC1DA,IAILJ,EAAiBI,EAAY,cAAc,CAAC,EAC5CF,EAAiBE,EAAY,cAAc,CAAC,EAC9C,EAAG,CAAC,CAAC,EAECC,EAAmB,cAAY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G,CACH,GAAM,CAAE,YAAAN,EAAa,WAAAiB,EAAY,cAAAL,CAAc,EAAIhB,EAAmBqC,EAAoBnC,CAAe,EAEzG,OACER,EAACyC,EAAA,CACC,IAAKzB,EACL,UAAWc,EACT,kBACApB,IAAgB,aACZ,qCACA,iDACJI,CACF,EACA,SAAU,CAACQ,EACX,KAAMkB,EACN,KAAMD,EACN,QAASD,EACT,QAASX,EACR,GAAGZ,EAEJ,UAAAhB,EAAC8C,EAAA,CAAe,UAAU,SAAS,EACnC9C,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ,CACF,EAEA6C,EAAa,YAAcD","names":["React","useEmblaCarousel","ArrowLeftIcon","ArrowRightIcon","createContextScope","jsx","jsxs","CAROUSEL_NAME","createCarouselContext","createCarouselScope","createContextScope","CarouselProvider","useCarouselContext","Carousel","__scopeCarousel","children","orientation","opts","setApi","plugins","className","props","forwardedRef","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","onSelect","carouselApi","scrollPrev","scrollNext","handleKeyDown","event","cn","CAROUSEL_CONTENT_NAME","CarouselContent","classNames","CAROUSEL_ITEM_NAME","CarouselItem","CAROUSEL_PREVIOUS_NAME","CarouselPrevious","variant","size","icon","Button","ArrowLeftIcon","CAROUSEL_NEXT_NAME","CarouselNext","ArrowRightIcon"]}
@@ -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 _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactcollapsible = require('@radix-ui/react-collapsible'); var e = _interopRequireWildcard(_reactcollapsible);var _jsxruntime = require('react/jsx-runtime');var n=e.Root,r= exports.CollapsibleTrigger =e.CollapsibleTrigger,a= exports.CollapsibleContent =o.forwardRef(({className:t,...i},p)=>_jsxruntime.jsx.call(void 0, e.CollapsibleContent,{ref:p,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden",t),...i}));a.displayName=e.CollapsibleContent.displayName;exports.Collapsible = n; exports.CollapsibleContent = a; exports.CollapsibleTrigger = r;
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 _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactcollapsible = require('@radix-ui/react-collapsible'); var e = _interopRequireWildcard(_reactcollapsible);var _jsxruntime = require('react/jsx-runtime');var n=e.Root,r= exports.CollapsibleTrigger =e.CollapsibleTrigger,a= exports.CollapsibleContent =o.forwardRef(({className:t,...i},p)=>_jsxruntime.jsx.call(void 0, e.CollapsibleContent,{ref:p,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "overflow-hidden","data-[state=open]:animate-collapsible-open","data-[state=closed]:animate-collapsible-closed",t),...i}));a.displayName=e.CollapsibleContent.displayName;exports.Collapsible = n; exports.CollapsibleContent = a; exports.CollapsibleTrigger = r;
2
2
  //# sourceMappingURL=collapsible.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/collapsible.cjs","../../src/components/collapsible.tsx"],"names":["Collapsible","CollapsibleTrigger","CollapsibleContent","className","props","forwardedRef","jsx","cn"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,mHACe,+CA0BlC,IAlBEA,CAAAA,CAAmC,CAAA,CAAA,IAAA,CAOnCC,CAAAA,8BAA0C,CAAA,CAAA,kBAAA,CAS1CC,CAAAA,8BAA2B,CAAA,CAAA,UAAA,CAC/B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAsB,CAAA,kBAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,2GACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CAEAF,CAAAA,CAAmB,WAAA,CAAmC,CAAA,CAAA,kBAAA,CAAmB,WAAA,CAAA,wFAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/collapsible.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Collapsible\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\nconst Collapsible = CollapsiblePrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleTrigger\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>;\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleContent\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleContentElement = React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>;\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={forwardedRef}\n className={cn(\n 'data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n type CollapsibleProps,\n type CollapsibleTriggerProps,\n type CollapsibleContentProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/collapsible.cjs","../../src/components/collapsible.tsx"],"names":["Collapsible","CollapsibleTrigger","CollapsibleContent","className","props","forwardedRef","jsx","cn"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,mHACe,+CA0BlC,IAlBEA,CAAAA,CAAmC,CAAA,CAAA,IAAA,CAOnCC,CAAAA,8BAA0C,CAAA,CAAA,kBAAA,CAS1CC,CAAAA,8BAA2B,CAAA,CAAA,UAAA,CAC/B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,CAAsB,CAAA,kBAAA,CAArB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,iBACT,CACA,4CAAA,CACA,gDAAA,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAEJ,CAAA,CAEAF,CAAAA,CAAmB,WAAA,CAAmC,CAAA,CAAA,kBAAA,CAAmB,WAAA,CAAA,wFAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/collapsible.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Collapsible\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\nconst Collapsible = CollapsiblePrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleTrigger\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>;\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleContent\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleContentElement = React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>;\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={forwardedRef}\n className={cn(\n 'overflow-hidden',\n 'data-[state=open]:animate-collapsible-open',\n 'data-[state=closed]:animate-collapsible-closed',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n type CollapsibleProps,\n type CollapsibleTriggerProps,\n type CollapsibleContentProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as l}from"../chunk-VRBUDJBH.js";import*as o from"react";import*as e from"@radix-ui/react-collapsible";import{jsx as s}from"react/jsx-runtime";var n=e.Root,r=e.CollapsibleTrigger,a=o.forwardRef(({className:t,...i},p)=>s(e.CollapsibleContent,{ref:p,className:l("data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden",t),...i}));a.displayName=e.CollapsibleContent.displayName;export{n as Collapsible,a as CollapsibleContent,r as CollapsibleTrigger};
1
+ "use client";import{a as l}from"../chunk-VRBUDJBH.js";import*as o from"react";import*as e from"@radix-ui/react-collapsible";import{jsx as s}from"react/jsx-runtime";var n=e.Root,r=e.CollapsibleTrigger,a=o.forwardRef(({className:t,...i},p)=>s(e.CollapsibleContent,{ref:p,className:l("overflow-hidden","data-[state=open]:animate-collapsible-open","data-[state=closed]:animate-collapsible-closed",t),...i}));a.displayName=e.CollapsibleContent.displayName;export{n as Collapsible,a as CollapsibleContent,r as CollapsibleTrigger};
2
2
  //# sourceMappingURL=collapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Collapsible\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\nconst Collapsible = CollapsiblePrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleTrigger\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>;\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleContent\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleContentElement = React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>;\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={forwardedRef}\n className={cn(\n 'data-[state=open]:animate-collapsible-open data-[state=closed]:animate-collapsible-closed overflow-hidden',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n type CollapsibleProps,\n type CollapsibleTriggerProps,\n type CollapsibleContentProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,8BA0BlC,cAAAC,MAAA,oBAlBJ,IAAMC,EAAmC,OAOnCC,EAA0C,qBAS1CC,EAA2B,aAC/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAsB,qBAArB,CACC,IAAKM,EACL,UAAWC,EACT,4GACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAmB,YAAmC,qBAAmB","names":["React","CollapsiblePrimitive","jsx","Collapsible","CollapsibleTrigger","CollapsibleContent","className","props","forwardedRef","cn"]}
1
+ {"version":3,"sources":["../../src/components/collapsible.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as CollapsiblePrimitive from '@radix-ui/react-collapsible';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: Collapsible\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.Root>;\nconst Collapsible = CollapsiblePrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleTrigger\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleTriggerProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleTrigger>;\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\n/* -----------------------------------------------------------------------------\n * Component: CollapsibleContent\n * -------------------------------------------------------------------------- */\n\ntype CollapsibleContentElement = React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>;\ntype CollapsibleContentProps = React.ComponentPropsWithoutRef<typeof CollapsiblePrimitive.CollapsibleContent>;\n\nconst CollapsibleContent = React.forwardRef<CollapsibleContentElement, CollapsibleContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <CollapsiblePrimitive.CollapsibleContent\n ref={forwardedRef}\n className={cn(\n 'overflow-hidden',\n 'data-[state=open]:animate-collapsible-open',\n 'data-[state=closed]:animate-collapsible-closed',\n className,\n )}\n {...props}\n />\n ),\n);\n\nCollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n type CollapsibleProps,\n type CollapsibleTriggerProps,\n type CollapsibleContentProps,\n};\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,UAAYC,MAA0B,8BA0BlC,cAAAC,MAAA,oBAlBJ,IAAMC,EAAmC,OAOnCC,EAA0C,qBAS1CC,EAA2B,aAC/B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACxBN,EAAsB,qBAArB,CACC,IAAKM,EACL,UAAWC,EACT,kBACA,6CACA,iDACAH,CACF,EACC,GAAGC,EACN,CAEJ,EAEAF,EAAmB,YAAmC,qBAAmB","names":["React","CollapsiblePrimitive","jsx","Collapsible","CollapsibleTrigger","CollapsibleContent","className","props","forwardedRef","cn"]}
@@ -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 _chunkTY2YG7LHcjs = require('../chunk-TY2YG7LH.cjs');require('../chunk-LSBI35ZE.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');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:_chunk4XRBMJ5Qcjs.a.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, _chunkTY2YG7LHcjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkTY2YG7LHcjs.c,{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:_chunk4XRBMJ5Qcjs.a.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default 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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.call(void 0, "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:bg-accent aria-selected:text-accent-foreground 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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.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;
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 _chunkAH3OBTDOcjs = require('../chunk-AH3OBTDO.cjs');require('../chunk-LSBI35ZE.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');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:_chunk4XRBMJ5Qcjs.a.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, _chunkAH3OBTDOcjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkAH3OBTDOcjs.c,{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:_chunk4XRBMJ5Qcjs.a.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default 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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.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:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-2.75 gap-2.75 h-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none",e),...m}));u.displayName=_cmdk.Command.Item.displayName;var g=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Loading,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex justify-center p-2",e),...m}));g.displayName=_cmdk.Command.Loading.displayName;function N({className:e,...m}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunk4XRBMJ5Qcjs.a.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 = g; exports.CommandSeparator = y; exports.CommandShortcut = N;
2
2
  //# sourceMappingURL=command.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/components/command.cjs","../../src/components/command.tsx"],"names":["Command","className","props","forwardedRef","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":"AAAA,uWAAY,CAAC,yDAAgD,iCAA8B,yDAA0C,uECE9G,mDACa,4BACQ,+CAY1C,IADIA,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAyC,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACvFC,6BAAAA,aAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,2FACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDF,CAAAA,CAAQ,WAAA,CAAcK,aAAAA,CAAiB,WAAA,CAQvC,SAASE,CAAAA,CAAc,CAAE,QAAA,CAAAC,CAAAA,CAAU,GAAGN,CAAM,CAAA,CAA0C,CACpF,OACEE,6BAAAA,mBAACK,CAAA,CAAQ,GAAGP,CAAAA,CACV,QAAA,CAAAE,6BAAAA,mBAACM,CAAA,CAAc,SAAA,CAAU,KAAA,CACvB,QAAA,CAAAN,6BAAAA,CAACJ,CAAA,CAAQ,SAAA,CAAU,0TAAA,CAChB,QAAA,CAAAQ,CAAAA,CACH,CAAA,CACF,CAAA,CACF,CAEJ,CASA,IAAMG,CAAAA,CAAqB,CAAA,CAAA,UAAA,CACzB,CAAC,CAAE,SAAA,CAAAV,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBS,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A,CAAcd,aAAAA,CAAiB,OAAA,CAAQ,WAAA,CAQtD,SAASe,CAAAA,CAAgB,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA4C,CACzF,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWE,iCAAAA,uDAAG,CAAyDL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC7G,CAAA,sQAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/command.cjs","sourcesContent":[null,"'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 '@/components/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>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive\n ref={forwardedRef}\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\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({ children, ...props }: 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<typeof CommandPrimitive.Input>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, forwardedRef) => (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={forwardedRef}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default 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<typeof CommandPrimitive.List>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.List\n ref={forwardedRef}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\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<typeof CommandPrimitive.Empty>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>((props, forwardedRef) => (\n <CommandPrimitive.Empty ref={forwardedRef} className=\"py-6 text-center text-sm\" {...props} />\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<typeof CommandPrimitive.Group>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Group\n ref={forwardedRef}\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<typeof CommandPrimitive.Separator>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nconst CommandSeparator = React.forwardRef<CommandSeparatorElement, CommandSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Separator ref={forwardedRef} className={cn('bg-border -mx-1 h-px', className)} {...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<typeof CommandPrimitive.Item>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n 'aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none',\n className,\n )}\n {...props}\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<typeof CommandPrimitive.Loading>;\n\nconst CommandLoading = React.forwardRef<CommandLoadingElement, CommandLoadingProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Loading ref={forwardedRef} className={cn('flex justify-center p-2', className)} {...props} />\n ),\n);\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\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":["/home/runner/work/codefast/codefast/packages/ui/dist/components/command.cjs","../../src/components/command.tsx"],"names":["Command","className","props","forwardedRef","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","MagnifyingGlassIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandLoading","CommandShortcut"],"mappings":"AAAA,uWAAY,CAAC,yDAAgD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AAG,CAAwBL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEhH,CAAA,CAEAe,CAAAA,CAAiB,WAAA,CAAcZ,aAAAA,CAAiB,SAAA,CAAU,WAAA,CAS1D,IAAMa,CAAAA,CAAoB,CAAA,CAAA,UAAA,CAAiD,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnGC,6BAAAA,aAACC,CAAiB,IAAA,CAAjB,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,iCAAAA,sBACT,CACA,0EAAA,CACA,4DAAA,CACA,yFAAA,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDgB,CAAAA,CAAY,WAAA,CAAcb,aAAAA,CAAiB,IAAA,CAAK,WAAA,CAShD,IAAMc,CAAAA,CAAuB,CAAA,CAAA,UAAA,CAC3B,CAAC,CAAE,SAAA,CAAAlB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACxBC,6BAAAA,aAACC,CAAiB,OAAA,CAAjB,CAAyB,GAAA,CAAKF,CAAAA,CAAc,SAAA,CAAWG,iCAAAA,yBAAG,CAA2BL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEjH,CAAA,CAEAiB,CAAAA,CAAe,WAAA,CAAcd,aAAAA,CAAiB,OAAA,CAAQ,WAAA,CAQtD,SAASe,CAAAA,CAAgB,CAAE,SAAA,CAAAnB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA4C,CACzF,OAAOE,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAWE,iCAAAA,uDAAG,CAAyDL,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAC7G,CAAA,sQAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/components/command.cjs","sourcesContent":[null,"'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 '@/components/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>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive\n ref={forwardedRef}\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\nCommand.displayName = CommandPrimitive.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandDialog\n * -------------------------------------------------------------------------- */\n\ntype CommandDialogProps = React.ComponentProps<typeof Dialog>;\n\nfunction CommandDialog({ children, ...props }: 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<typeof CommandPrimitive.Input>;\n\nconst CommandInput = React.forwardRef<CommandInputElement, CommandInputProps>(\n ({ className, ...props }, forwardedRef) => (\n <div className=\"flex items-center gap-2 border-b px-3\" cmdk-input-wrapper=\"\">\n <MagnifyingGlassIcon className=\"size-5 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={forwardedRef}\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default 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<typeof CommandPrimitive.List>;\n\nconst CommandList = React.forwardRef<CommandListElement, CommandListProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.List\n ref={forwardedRef}\n className={cn('max-h-72 overflow-y-auto overflow-x-hidden', className)}\n {...props}\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<typeof CommandPrimitive.Empty>;\n\nconst CommandEmpty = React.forwardRef<CommandEmptyElement, CommandEmptyProps>((props, forwardedRef) => (\n <CommandPrimitive.Empty ref={forwardedRef} className=\"py-6 text-center text-sm\" {...props} />\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<typeof CommandPrimitive.Group>;\n\nconst CommandGroup = React.forwardRef<CommandGroupElement, CommandGroupProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Group\n ref={forwardedRef}\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<typeof CommandPrimitive.Separator>;\ntype CommandSeparatorProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;\n\nconst CommandSeparator = React.forwardRef<CommandSeparatorElement, CommandSeparatorProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Separator ref={forwardedRef} className={cn('bg-border -mx-1 h-px', className)} {...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<typeof CommandPrimitive.Item>;\n\nconst CommandItem = React.forwardRef<CommandItemElement, CommandItemProps>(({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'px-2.75 gap-2.75 h-8',\n 'relative flex cursor-pointer select-none items-center rounded-sm text-sm',\n 'aria-disabled:pointer-events-none aria-disabled:opacity-50',\n 'aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none',\n className,\n )}\n {...props}\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<typeof CommandPrimitive.Loading>;\n\nconst CommandLoading = React.forwardRef<CommandLoadingElement, CommandLoadingProps>(\n ({ className, ...props }, forwardedRef) => (\n <CommandPrimitive.Loading ref={forwardedRef} className={cn('flex justify-center p-2', className)} {...props} />\n ),\n);\n\nCommandLoading.displayName = CommandPrimitive.Loading.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CommandShortcut\n * -------------------------------------------------------------------------- */\n\ntype CommandShortcutProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps): React.JSX.Element {\n return <span className={cn('text-muted-foreground ml-auto text-xs tracking-widest', className)} {...props} />;\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"]}
@@ -13,7 +13,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
13
13
  ref?: React.Ref<HTMLDivElement>;
14
14
  } & {
15
15
  asChild?: boolean;
16
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
16
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
17
17
  label?: string;
18
18
  shouldFilter?: boolean;
19
19
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -31,7 +31,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
31
31
  ref?: React.Ref<HTMLInputElement>;
32
32
  } & {
33
33
  asChild?: boolean;
34
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
34
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
35
35
  value?: string;
36
36
  onValueChange?: (search: string) => void;
37
37
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -42,7 +42,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
42
42
  ref?: React.Ref<HTMLDivElement>;
43
43
  } & {
44
44
  asChild?: boolean;
45
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
45
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
46
46
  label?: string;
47
47
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
48
48
  type CommandEmptyProps = React.ComponentPropsWithoutRef<typeof Command$1.Empty>;
@@ -52,7 +52,7 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
52
52
  ref?: React.Ref<HTMLDivElement>;
53
53
  } & {
54
54
  asChild?: boolean;
55
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
56
  type CommandGroupProps = React.ComponentPropsWithoutRef<typeof Command$1.Group>;
57
57
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
58
58
  children?: React.ReactNode;
@@ -60,7 +60,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
60
60
  ref?: React.Ref<HTMLDivElement>;
61
61
  } & {
62
62
  asChild?: boolean;
63
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
63
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
64
64
  heading?: React.ReactNode;
65
65
  value?: string;
66
66
  forceMount?: boolean;
@@ -70,7 +70,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
70
70
  ref?: React.Ref<HTMLDivElement>;
71
71
  } & {
72
72
  asChild?: boolean;
73
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
73
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
74
74
  alwaysRender?: boolean;
75
75
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
76
  type CommandItemProps = React.ComponentPropsWithoutRef<typeof Command$1.Item>;
@@ -80,7 +80,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
80
80
  ref?: React.Ref<HTMLDivElement>;
81
81
  } & {
82
82
  asChild?: boolean;
83
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
83
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
84
84
  disabled?: boolean;
85
85
  onSelect?: (value: string) => void;
86
86
  value?: string;
@@ -94,7 +94,7 @@ declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
94
94
  ref?: React.Ref<HTMLDivElement>;
95
95
  } & {
96
96
  asChild?: boolean;
97
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
97
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
98
98
  progress?: number;
99
99
  label?: string;
100
100
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -13,7 +13,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
13
13
  ref?: React.Ref<HTMLDivElement>;
14
14
  } & {
15
15
  asChild?: boolean;
16
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
16
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
17
17
  label?: string;
18
18
  shouldFilter?: boolean;
19
19
  filter?: (value: string, search: string, keywords?: string[]) => number;
@@ -31,7 +31,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
31
31
  ref?: React.Ref<HTMLInputElement>;
32
32
  } & {
33
33
  asChild?: boolean;
34
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
34
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
35
35
  value?: string;
36
36
  onValueChange?: (search: string) => void;
37
37
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
@@ -42,7 +42,7 @@ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
42
42
  ref?: React.Ref<HTMLDivElement>;
43
43
  } & {
44
44
  asChild?: boolean;
45
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
45
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
46
46
  label?: string;
47
47
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
48
48
  type CommandEmptyProps = React.ComponentPropsWithoutRef<typeof Command$1.Empty>;
@@ -52,7 +52,7 @@ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
52
52
  ref?: React.Ref<HTMLDivElement>;
53
53
  } & {
54
54
  asChild?: boolean;
55
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
55
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
56
56
  type CommandGroupProps = React.ComponentPropsWithoutRef<typeof Command$1.Group>;
57
57
  declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
58
58
  children?: React.ReactNode;
@@ -60,7 +60,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
60
60
  ref?: React.Ref<HTMLDivElement>;
61
61
  } & {
62
62
  asChild?: boolean;
63
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "value" | "heading"> & {
63
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
64
64
  heading?: React.ReactNode;
65
65
  value?: string;
66
66
  forceMount?: boolean;
@@ -70,7 +70,7 @@ declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<R
70
70
  ref?: React.Ref<HTMLDivElement>;
71
71
  } & {
72
72
  asChild?: boolean;
73
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
73
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
74
74
  alwaysRender?: boolean;
75
75
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
76
76
  type CommandItemProps = React.ComponentPropsWithoutRef<typeof Command$1.Item>;
@@ -80,7 +80,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
80
80
  ref?: React.Ref<HTMLDivElement>;
81
81
  } & {
82
82
  asChild?: boolean;
83
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "value" | "disabled"> & {
83
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
84
84
  disabled?: boolean;
85
85
  onSelect?: (value: string) => void;
86
86
  value?: string;
@@ -94,7 +94,7 @@ declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
94
94
  ref?: React.Ref<HTMLDivElement>;
95
95
  } & {
96
96
  asChild?: boolean;
97
- }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
97
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
98
98
  progress?: number;
99
99
  label?: string;
100
100
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- "use client";import{a as r,c as d}from"../chunk-KH4PSDPI.js";import"../chunk-YGPIWXWP.js";import{a as n}from"../chunk-VRBUDJBH.js";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-default 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("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:bg-accent aria-selected:text-accent-foreground 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};
1
+ "use client";import{a as r,c as d}from"../chunk-CIMAEJ26.js";import"../chunk-YGPIWXWP.js";import{a as n}from"../chunk-VRBUDJBH.js";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 P}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)=>P("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-default 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("px-2.75 gap-2.75 h-8","relative flex cursor-pointer select-none items-center rounded-sm text-sm","aria-disabled:pointer-events-none aria-disabled:opacity-50","aria-selected:bg-accent aria-selected:text-accent-foreground aria-selected:outline-none",e),...m}));u.displayName=o.Item.displayName;var g=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));g.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,g as CommandLoading,y as CommandSeparator,N as CommandShortcut};
2
2
  //# sourceMappingURL=command.js.map