dgz-ui 1.4.12 → 1.4.13

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 (159) hide show
  1. package/dist/accordion/index.cjs.js +1 -1
  2. package/dist/accordion/index.es.js +1 -1
  3. package/dist/alert/index.cjs.js +1 -1
  4. package/dist/alert/index.es.js +1 -1
  5. package/dist/alert-dialog/index.cjs.js +1 -1
  6. package/dist/alert-dialog/index.es.js +1 -1
  7. package/dist/avatar/index.cjs.js +1 -1
  8. package/dist/avatar/index.es.js +1 -1
  9. package/dist/badge/index.cjs.js +1 -1
  10. package/dist/badge/index.es.js +1 -1
  11. package/dist/breadcrumb/index.cjs.js +1 -1
  12. package/dist/breadcrumb/index.es.js +1 -1
  13. package/dist/button/index.cjs.js +1 -1
  14. package/dist/button/index.es.js +2 -2
  15. package/dist/calendar/index.cjs.js +1 -1
  16. package/dist/calendar/index.es.js +1 -1
  17. package/dist/card/index.cjs.js +1 -1
  18. package/dist/card/index.es.js +1 -1
  19. package/dist/carousel/index.cjs.js +1 -1
  20. package/dist/carousel/index.es.js +2 -2
  21. package/dist/chunks/{alert-D7LmNw1T.es.js → alert-B9rImkiX.es.js} +3 -3
  22. package/dist/chunks/{alert-D7LmNw1T.es.js.map → alert-B9rImkiX.es.js.map} +1 -1
  23. package/dist/chunks/{alert-CQSIGY8u.cjs.js → alert-BNcf_eJn.cjs.js} +2 -2
  24. package/dist/chunks/{alert-CQSIGY8u.cjs.js.map → alert-BNcf_eJn.cjs.js.map} +1 -1
  25. package/dist/chunks/{alert-dialog-BrsfAyUm.cjs.js → alert-dialog-BfBtlIHj.cjs.js} +2 -2
  26. package/dist/chunks/{alert-dialog-BrsfAyUm.cjs.js.map → alert-dialog-BfBtlIHj.cjs.js.map} +1 -1
  27. package/dist/chunks/{alert-dialog-DbC22-z2.es.js → alert-dialog-BrCPhmhd.es.js} +3 -3
  28. package/dist/chunks/{alert-dialog-DbC22-z2.es.js.map → alert-dialog-BrCPhmhd.es.js.map} +1 -1
  29. package/dist/chunks/{avatar-DpvcnhV-.cjs.js → avatar-CQMWDnOM.cjs.js} +2 -2
  30. package/dist/chunks/{avatar-DpvcnhV-.cjs.js.map → avatar-CQMWDnOM.cjs.js.map} +1 -1
  31. package/dist/chunks/{avatar-MPlL_Ty_.es.js → avatar-zl4cf4c2.es.js} +3 -3
  32. package/dist/chunks/{avatar-MPlL_Ty_.es.js.map → avatar-zl4cf4c2.es.js.map} +1 -1
  33. package/dist/chunks/{badge-hJsnkvT2.cjs.js → badge-1ocx6hox.cjs.js} +2 -2
  34. package/dist/chunks/{badge-hJsnkvT2.cjs.js.map → badge-1ocx6hox.cjs.js.map} +1 -1
  35. package/dist/chunks/{badge-aHtYwGC6.es.js → badge-CPzxgRrM.es.js} +3 -3
  36. package/dist/chunks/{badge-aHtYwGC6.es.js.map → badge-CPzxgRrM.es.js.map} +1 -1
  37. package/dist/chunks/{breadcrumb-DWV0rL7P.es.js → breadcrumb-BrMrkZfa.es.js} +2 -2
  38. package/dist/chunks/{breadcrumb-DWV0rL7P.es.js.map → breadcrumb-BrMrkZfa.es.js.map} +1 -1
  39. package/dist/chunks/{breadcrumb-BeExVsql.cjs.js → breadcrumb-iPT-f06l.cjs.js} +2 -2
  40. package/dist/chunks/{breadcrumb-BeExVsql.cjs.js.map → breadcrumb-iPT-f06l.cjs.js.map} +1 -1
  41. package/dist/chunks/{button-BXJ2cCVi.cjs.js → button-CpKtD3qG.cjs.js} +2 -2
  42. package/dist/chunks/{button-BXJ2cCVi.cjs.js.map → button-CpKtD3qG.cjs.js.map} +1 -1
  43. package/dist/chunks/{button-C7Gcg6zZ.es.js → button-DTRIYqDb.es.js} +3 -3
  44. package/dist/chunks/{button-C7Gcg6zZ.es.js.map → button-DTRIYqDb.es.js.map} +1 -1
  45. package/dist/chunks/{button-group-CRBe0_eB.es.js → button-group-B4h4-5eB.es.js} +4 -4
  46. package/dist/chunks/{button-group-CRBe0_eB.es.js.map → button-group-B4h4-5eB.es.js.map} +1 -1
  47. package/dist/chunks/{button-group-BpjA8AOm.cjs.js → button-group-CaFYso6b.cjs.js} +2 -2
  48. package/dist/chunks/{button-group-BpjA8AOm.cjs.js.map → button-group-CaFYso6b.cjs.js.map} +1 -1
  49. package/dist/chunks/{card-ClxRfnoC.cjs.js → card-B1sx5mON.cjs.js} +2 -2
  50. package/dist/chunks/{card-ClxRfnoC.cjs.js.map → card-B1sx5mON.cjs.js.map} +1 -1
  51. package/dist/chunks/{card-DI87w6OJ.es.js → card-BJ0eqFqO.es.js} +2 -2
  52. package/dist/chunks/{card-DI87w6OJ.es.js.map → card-BJ0eqFqO.es.js.map} +1 -1
  53. package/dist/chunks/{dialog-ztKmNTXl.cjs.js → dialog-BWF5BkHj.cjs.js} +2 -2
  54. package/dist/chunks/{dialog-ztKmNTXl.cjs.js.map → dialog-BWF5BkHj.cjs.js.map} +1 -1
  55. package/dist/chunks/{dialog-C5H9YueP.es.js → dialog-D9BMBoAJ.es.js} +2 -2
  56. package/dist/chunks/{dialog-C5H9YueP.es.js.map → dialog-D9BMBoAJ.es.js.map} +1 -1
  57. package/dist/chunks/{dropdown-menu-CHTYlgbi.es.js → dropdown-menu-BUaCITEG.es.js} +2 -2
  58. package/dist/chunks/{dropdown-menu-CHTYlgbi.es.js.map → dropdown-menu-BUaCITEG.es.js.map} +1 -1
  59. package/dist/chunks/{dropdown-menu-Dm0HBDm-.cjs.js → dropdown-menu-D52NH0Di.cjs.js} +2 -2
  60. package/dist/chunks/{dropdown-menu-Dm0HBDm-.cjs.js.map → dropdown-menu-D52NH0Di.cjs.js.map} +1 -1
  61. package/dist/chunks/{index-DcN2zBOn.es.js → index-xA4mlFw5.es.js} +2 -2
  62. package/dist/chunks/{index-DcN2zBOn.es.js.map → index-xA4mlFw5.es.js.map} +1 -1
  63. package/dist/chunks/{index-BP8Me5c9.cjs.js → index-x_Mxo00P.cjs.js} +2 -2
  64. package/dist/chunks/{index-BP8Me5c9.cjs.js.map → index-x_Mxo00P.cjs.js.map} +1 -1
  65. package/dist/chunks/{pagination-Cwng-7FS.es.js → pagination-DFYeehFF.es.js} +3 -3
  66. package/dist/chunks/{pagination-Cwng-7FS.es.js.map → pagination-DFYeehFF.es.js.map} +1 -1
  67. package/dist/chunks/{pagination-CTmvz3Yq.cjs.js → pagination-LHTb7tXo.cjs.js} +2 -2
  68. package/dist/chunks/{pagination-CTmvz3Yq.cjs.js.map → pagination-LHTb7tXo.cjs.js.map} +1 -1
  69. package/dist/chunks/{popover-Cqh2olw7.cjs.js → popover-Bh6emR_J.cjs.js} +2 -2
  70. package/dist/chunks/{popover-Cqh2olw7.cjs.js.map → popover-Bh6emR_J.cjs.js.map} +1 -1
  71. package/dist/chunks/{popover-B52SY7sk.es.js → popover-BredK0sg.es.js} +2 -2
  72. package/dist/chunks/{popover-B52SY7sk.es.js.map → popover-BredK0sg.es.js.map} +1 -1
  73. package/dist/chunks/{react-select-C21jRzGG.es.js → react-select-BDoLUa8t.es.js} +2 -2
  74. package/dist/chunks/{react-select-C21jRzGG.es.js.map → react-select-BDoLUa8t.es.js.map} +1 -1
  75. package/dist/chunks/{react-select-1n8mmj6n.cjs.js → react-select-DvBVNVXL.cjs.js} +2 -2
  76. package/dist/chunks/{react-select-1n8mmj6n.cjs.js.map → react-select-DvBVNVXL.cjs.js.map} +1 -1
  77. package/dist/chunks/{scroll-area-CpVgh3EC.es.js → scroll-area-CwWjTiks.es.js} +2 -2
  78. package/dist/chunks/{scroll-area-CpVgh3EC.es.js.map → scroll-area-CwWjTiks.es.js.map} +1 -1
  79. package/dist/chunks/{scroll-area-DfdUITCu.cjs.js → scroll-area-Nj6J9MqV.cjs.js} +2 -2
  80. package/dist/chunks/{scroll-area-DfdUITCu.cjs.js.map → scroll-area-Nj6J9MqV.cjs.js.map} +1 -1
  81. package/dist/chunks/{separator-BGecc9_9.cjs.js → separator-CGvV-BlI.cjs.js} +2 -2
  82. package/dist/chunks/{separator-BGecc9_9.cjs.js.map → separator-CGvV-BlI.cjs.js.map} +1 -1
  83. package/dist/chunks/{separator-57fHPAAv.es.js → separator-CgP4OHOF.es.js} +2 -2
  84. package/dist/chunks/{separator-57fHPAAv.es.js.map → separator-CgP4OHOF.es.js.map} +1 -1
  85. package/dist/chunks/{sheet-Cd8pVcuR.cjs.js → sheet-BL1AP0aU.cjs.js} +2 -2
  86. package/dist/chunks/{sheet-Cd8pVcuR.cjs.js.map → sheet-BL1AP0aU.cjs.js.map} +1 -1
  87. package/dist/chunks/{sheet-BnHJdRsn.es.js → sheet-CKsRhiVy.es.js} +2 -2
  88. package/dist/chunks/{sheet-BnHJdRsn.es.js.map → sheet-CKsRhiVy.es.js.map} +1 -1
  89. package/dist/chunks/{skeleton-9sn_asi7.cjs.js → skeleton-C7pnV7bc.cjs.js} +2 -2
  90. package/dist/chunks/{skeleton-9sn_asi7.cjs.js.map → skeleton-C7pnV7bc.cjs.js.map} +1 -1
  91. package/dist/chunks/{skeleton-iS5JnNYj.es.js → skeleton-DKbF2Fso.es.js} +2 -2
  92. package/dist/chunks/{skeleton-iS5JnNYj.es.js.map → skeleton-DKbF2Fso.es.js.map} +1 -1
  93. package/dist/chunks/{table-BEkdKcLT.es.js → table-BTb0KUhR.es.js} +2 -2
  94. package/dist/chunks/{table-BEkdKcLT.es.js.map → table-BTb0KUhR.es.js.map} +1 -1
  95. package/dist/chunks/{table-BVd6_9C_.cjs.js → table-Dxainp0Z.cjs.js} +2 -2
  96. package/dist/chunks/{table-BVd6_9C_.cjs.js.map → table-Dxainp0Z.cjs.js.map} +1 -1
  97. package/dist/chunks/{tabs-D2mtxMzj.es.js → tabs-BnamvF0S.es.js} +4 -4
  98. package/dist/chunks/{tabs-D2mtxMzj.es.js.map → tabs-BnamvF0S.es.js.map} +1 -1
  99. package/dist/chunks/{tabs-mihPEAju.cjs.js → tabs-CDt2LiNL.cjs.js} +2 -2
  100. package/dist/chunks/{tabs-mihPEAju.cjs.js.map → tabs-CDt2LiNL.cjs.js.map} +1 -1
  101. package/dist/chunks/{textarea-0VSN2V4u.es.js → textarea-BnUWlaPx.es.js} +5827 -5786
  102. package/dist/chunks/textarea-BnUWlaPx.es.js.map +1 -0
  103. package/dist/chunks/textarea-EPWY09og.cjs.js +173 -0
  104. package/dist/chunks/textarea-EPWY09og.cjs.js.map +1 -0
  105. package/dist/chunks/{timepicker-Bez86y4j.es.js → timepicker-Ca0gLbqn.es.js} +5 -5
  106. package/dist/chunks/timepicker-Ca0gLbqn.es.js.map +1 -0
  107. package/dist/chunks/{timepicker-Ba7H_jbd.cjs.js → timepicker-CuuVE0le.cjs.js} +2 -2
  108. package/dist/chunks/timepicker-CuuVE0le.cjs.js.map +1 -0
  109. package/dist/chunks/{tooltip-DSraOWNq.cjs.js → tooltip-CsZB0nVr.cjs.js} +2 -2
  110. package/dist/chunks/{tooltip-DSraOWNq.cjs.js.map → tooltip-CsZB0nVr.cjs.js.map} +1 -1
  111. package/dist/chunks/{tooltip-DCNsfjjI.es.js → tooltip-Dtzkuphk.es.js} +2 -2
  112. package/dist/chunks/{tooltip-DCNsfjjI.es.js.map → tooltip-Dtzkuphk.es.js.map} +1 -1
  113. package/dist/chunks/utils-C4d7Ql9-.cjs.js +2 -0
  114. package/dist/chunks/utils-C4d7Ql9-.cjs.js.map +1 -0
  115. package/dist/chunks/{utils-D6dQK9i-.es.js → utils-CnvKSirc.es.js} +157 -157
  116. package/dist/chunks/utils-CnvKSirc.es.js.map +1 -0
  117. package/dist/dialog/index.cjs.js +1 -1
  118. package/dist/dialog/index.es.js +1 -1
  119. package/dist/dropdown/index.cjs.js +1 -1
  120. package/dist/dropdown/index.es.js +1 -1
  121. package/dist/form/index.cjs.js +1 -1
  122. package/dist/form/index.es.js +2 -2
  123. package/dist/index.cjs.js +1 -1
  124. package/dist/index.es.js +23 -23
  125. package/dist/pagination/index.cjs.js +1 -1
  126. package/dist/pagination/index.es.js +1 -1
  127. package/dist/popover/index.cjs.js +1 -1
  128. package/dist/popover/index.es.js +1 -1
  129. package/dist/progress/index.cjs.js +1 -1
  130. package/dist/progress/index.es.js +1 -1
  131. package/dist/scroll-area/index.cjs.js +1 -1
  132. package/dist/scroll-area/index.es.js +1 -1
  133. package/dist/separator/index.cjs.js +1 -1
  134. package/dist/separator/index.es.js +1 -1
  135. package/dist/sheet/index.cjs.js +1 -1
  136. package/dist/sheet/index.es.js +1 -1
  137. package/dist/skeleton/index.cjs.js +1 -1
  138. package/dist/skeleton/index.es.js +1 -1
  139. package/dist/styles.css +2 -2
  140. package/dist/tab/index.cjs.js +1 -1
  141. package/dist/tab/index.es.js +1 -1
  142. package/dist/table/index.cjs.js +1 -1
  143. package/dist/table/index.es.js +1 -1
  144. package/dist/tooltip/index.cjs.js +1 -1
  145. package/dist/tooltip/index.es.js +1 -1
  146. package/dist/types/App.d.ts.map +1 -1
  147. package/dist/types/ui/form/html-editor.d.ts +5 -3
  148. package/dist/types/ui/form/html-editor.d.ts.map +1 -1
  149. package/dist/utils/index.cjs.js +1 -1
  150. package/dist/utils/index.es.js +1 -1
  151. package/package.json +5 -2
  152. package/dist/chunks/textarea-0VSN2V4u.es.js.map +0 -1
  153. package/dist/chunks/textarea-DbxcvKTh.cjs.js +0 -186
  154. package/dist/chunks/textarea-DbxcvKTh.cjs.js.map +0 -1
  155. package/dist/chunks/timepicker-Ba7H_jbd.cjs.js.map +0 -1
  156. package/dist/chunks/timepicker-Bez86y4j.es.js.map +0 -1
  157. package/dist/chunks/utils-BWS4jvS6.cjs.js +0 -2
  158. package/dist/chunks/utils-BWS4jvS6.cjs.js.map +0 -1
  159. package/dist/chunks/utils-D6dQK9i-.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-Cwng-7FS.es.js","sources":["../../src/ui/pagination/pagination.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport * as React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cn } from '../../lib';\nimport { type ButtonProps, buttonVariants } from '../button';\n\n/**\n * Pagination - Navigation component for paginated content.\n * @returns {JSX.Element} The rendered Pagination component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination component.\n */\nconst Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('flex w-full justify-center', className)}\n {...props}\n />\n);\nPagination.displayName = 'Pagination';\n\n/**\n * PaginationContent - Wrapper list for pagination items.\n * @returns {JSX.Element} The rendered PaginationContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination content component.\n */\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<'ul'>\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n));\nPaginationContent.displayName = 'PaginationContent';\n\n/**\n * PaginationItem - List item wrapper.\n * @returns {JSX.Element} The rendered PaginationItem component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination item component.\n */\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<'li'>\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('', className)} {...props} />\n));\nPaginationItem.displayName = 'PaginationItem';\n\n/**\n * Props for PaginationLink.\n * @property {boolean} [isActive] - Marks the current page.\n * @property {'lg'|'default'|'sm'|'xs'|'icon'} [size] - Button size forwarded to Button variants.\n */\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<ButtonProps, 'size'> &\n React.ComponentProps<'a'>;\n\n/**\n * PaginationLink - A styled anchor used as a pagination control.\n * @returns {JSX.Element} The rendered PaginationLink component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination link component.\n * @param {boolean} [props.isActive] - Marks the current page.\n * @param {string} [props.size] - The size of the pagination link.\n */\nconst PaginationLink = ({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? 'tertiary' : 'ghost',\n size,\n }),\n 'cursor-pointer',\n className\n )}\n {...props}\n />\n);\nPaginationLink.displayName = 'PaginationLink';\n\n/**\n * PaginationPrevious - Button to navigate to previous page.\n * @returns {JSX.Element} The rendered PaginationPrevious component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination previous component.\n */\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to previous page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationPrevious.displayName = 'PaginationPrevious';\n\n/**\n * PaginationNext - Button to navigate to next page.\n * @returns {JSX.Element} The rendered PaginationNext component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination next component.\n */\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to next page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationNext.displayName = 'PaginationNext';\n\n/**\n * PaginationEllipsis - Non-interactive indicator for collapsed pages.\n * @returns {JSX.Element} The rendered PaginationEllipsis component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination ellipsis component.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<'span'>) => {\n const { t } = useTranslation();\n return (\n <span\n aria-hidden\n className={cn('flex h-9 w-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">{t('More pages')}</span>\n </span>\n );\n};\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","t","useTranslation","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","jsxs","MoreHorizontal"],"mappings":";;;;;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,QAClC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,8BAA8BH,CAAS;AAAA,IACpD,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAQzB,MAAMK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAASK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAI;AAAA,IACA,WAAWH,EAAG,oCAAoCH,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDG,EAAkB,cAAc;AAQhC,MAAMG,IAAiBF,EAAM,WAG3B,CAAC,EAAE,WAAAL,GAAW,GAAGC,KAASK,wBACzB,MAAA,EAAG,KAAAA,GAAU,WAAWH,EAAG,IAAIH,CAAS,GAAI,GAAGC,GAAO,CACxD;AACDM,EAAe,cAAc;AAoB7B,MAAMC,IAAiB,CAAC;AAAA,EACtB,WAAAR;AAAA,EACA,UAAAS;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGT;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,gBAAcO,IAAW,SAAS;AAAA,IAClC,WAAWN;AAAA,MACTQ,EAAe;AAAA,QACb,SAASF,IAAW,aAAa;AAAA,QACjC,MAAAC;AAAA,MAAA,CACD;AAAA,MACD;AAAA,MACAV;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,E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AA;AAGjD;AACAK,EAAmB,cAAc;"}
1
+ {"version":3,"file":"pagination-DFYeehFF.es.js","sources":["../../src/ui/pagination/pagination.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport * as React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cn } from '../../lib';\nimport { type ButtonProps, buttonVariants } from '../button';\n\n/**\n * Pagination - Navigation component for paginated content.\n * @returns {JSX.Element} The rendered Pagination component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination component.\n */\nconst Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('flex w-full justify-center', className)}\n {...props}\n />\n);\nPagination.displayName = 'Pagination';\n\n/**\n * PaginationContent - Wrapper list for pagination items.\n * @returns {JSX.Element} The rendered PaginationContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination content component.\n */\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<'ul'>\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n));\nPaginationContent.displayName = 'PaginationContent';\n\n/**\n * PaginationItem - List item wrapper.\n * @returns {JSX.Element} The rendered PaginationItem component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination item component.\n */\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<'li'>\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('', className)} {...props} />\n));\nPaginationItem.displayName = 'PaginationItem';\n\n/**\n * Props for PaginationLink.\n * @property {boolean} [isActive] - Marks the current page.\n * @property {'lg'|'default'|'sm'|'xs'|'icon'} [size] - Button size forwarded to Button variants.\n */\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<ButtonProps, 'size'> &\n React.ComponentProps<'a'>;\n\n/**\n * PaginationLink - A styled anchor used as a pagination control.\n * @returns {JSX.Element} The rendered PaginationLink component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination link component.\n * @param {boolean} [props.isActive] - Marks the current page.\n * @param {string} [props.size] - The size of the pagination link.\n */\nconst PaginationLink = ({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? 'tertiary' : 'ghost',\n size,\n }),\n 'cursor-pointer',\n className\n )}\n {...props}\n />\n);\nPaginationLink.displayName = 'PaginationLink';\n\n/**\n * PaginationPrevious - Button to navigate to previous page.\n * @returns {JSX.Element} The rendered PaginationPrevious component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination previous component.\n */\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to previous page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationPrevious.displayName = 'PaginationPrevious';\n\n/**\n * PaginationNext - Button to navigate to next page.\n * @returns {JSX.Element} The rendered PaginationNext component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination next component.\n */\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to next page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationNext.displayName = 'PaginationNext';\n\n/**\n * PaginationEllipsis - Non-interactive indicator for collapsed pages.\n * @returns {JSX.Element} The rendered PaginationEllipsis component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination ellipsis component.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<'span'>) => {\n const { t } = useTranslation();\n return (\n <span\n aria-hidden\n className={cn('flex h-9 w-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">{t('More pages')}</span>\n </span>\n );\n};\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","t","useTranslation","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","jsxs","MoreHorizontal"],"mappings":";;;;;;;;AAYA,MAAMA,IAAa,CAAC,EAAE,WAAAC,GAAW,GAAGC,QAClC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,cAAW;AAAA,IACX,WAAWC,EAAG,8BAA8BH,CAAS;AAAA,IACpD,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAW,cAAc;AAQzB,MAAMK,IAAoBC,EAAM,WAG9B,CAAC,EAAE,WAAAL,GAAW,GAAGC,EAAA,GAASK,MAC1B,gBAAAJ;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAI;AAAA,IACA,WAAWH,EAAG,oCAAoCH,CAAS;AAAA,IAC1D,GAAGC;AAAA,EAAA;AACN,CACD;AACDG,EAAkB,cAAc;AAQhC,MAAMG,IAAiBF,EAAM,WAG3B,CAAC,EAAE,WAAAL,GAAW,GAAGC,KAASK,wBACzB,MAAA,EAAG,KAAAA,GAAU,WAAWH,EAAG,IAAIH,CAAS,GAAI,GAAGC,GAAO,CACxD;AACDM,EAAe,cAAc;AAoB7B,MAAMC,IAAiB,CAAC;AAAA,EACtB,WAAAR;AAAA,EACA,UAAAS;AAAA,EACA,MAAAC,IAAO;AAAA,EAC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C,eAAW;AAAA,MACX,WAAWhB,EAAG,4CAA4CH,CAAS;AAAA,MAClE,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAACkB,GAAA,EAAe,WAAU,UAAA,CAAU;AAAA,0BACnC,QAAA,EAAK,WAAU,WAAW,UAAAP,EAAE,YAAY,EAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGjD;AACAK,EAAmB,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";const t=require("react/jsx-runtime"),d=require("react"),r=require("react-i18next"),i=require("./utils-BWS4jvS6.cjs.js"),f=require("./button-BXJ2cCVi.cjs.js"),x=require("./ellipsis-FJjSjEdP.cjs.js"),N=require("./chevron-right-BxyusM7v.cjs.js"),j=require("./chevron-left-B_pqqZqr.cjs.js");function h(n){if(n&&n.__esModule)return n;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return a.default=n,Object.freeze(a)}const c=h(d),l=({className:n,...a})=>t.jsx("nav",{role:"navigation","aria-label":"pagination",className:i.cn("flex w-full justify-center",n),...a});l.displayName="Pagination";const u=c.forwardRef(({className:n,...a},e)=>t.jsx("ul",{ref:e,className:i.cn("flex flex-row items-center gap-1",n),...a}));u.displayName="PaginationContent";const g=c.forwardRef(({className:n,...a},e)=>t.jsx("li",{ref:e,className:i.cn("",n),...a}));g.displayName="PaginationItem";const o=({className:n,isActive:a,size:e="icon",...s})=>t.jsx("a",{"aria-current":a?"page":void 0,className:i.cn(f.buttonVariants({variant:a?"tertiary":"ghost",size:e}),"cursor-pointer",n),...s});o.displayName="PaginationLink";const p=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsx(o,{"aria-label":e("Go to previous page"),size:"default",className:i.cn("gap-1 px-2.5",n),...a,children:t.jsx(j.ChevronLeft,{className:"h-4 w-4"})})};p.displayName="PaginationPrevious";const m=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsx(o,{"aria-label":e("Go to next page"),size:"default",className:i.cn("gap-1 px-2.5",n),...a,children:t.jsx(N.ChevronRight,{className:"h-4 w-4"})})};m.displayName="PaginationNext";const P=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsxs("span",{"aria-hidden":!0,className:i.cn("flex h-9 w-9 items-center justify-center",n),...a,children:[t.jsx(x.Ellipsis,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:e("More pages")})]})};P.displayName="PaginationEllipsis";exports.Pagination=l;exports.PaginationContent=u;exports.PaginationEllipsis=P;exports.PaginationItem=g;exports.PaginationLink=o;exports.PaginationNext=m;exports.PaginationPrevious=p;
2
- //# sourceMappingURL=pagination-CTmvz3Yq.cjs.js.map
1
+ "use strict";const t=require("react/jsx-runtime"),d=require("react"),r=require("react-i18next"),i=require("./utils-C4d7Ql9-.cjs.js"),f=require("./button-CpKtD3qG.cjs.js"),x=require("./ellipsis-FJjSjEdP.cjs.js"),N=require("./chevron-right-BxyusM7v.cjs.js"),j=require("./chevron-left-B_pqqZqr.cjs.js");function h(n){if(n&&n.__esModule)return n;const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(a,e,s.get?s:{enumerable:!0,get:()=>n[e]})}}return a.default=n,Object.freeze(a)}const c=h(d),l=({className:n,...a})=>t.jsx("nav",{role:"navigation","aria-label":"pagination",className:i.cn("flex w-full justify-center",n),...a});l.displayName="Pagination";const u=c.forwardRef(({className:n,...a},e)=>t.jsx("ul",{ref:e,className:i.cn("flex flex-row items-center gap-1",n),...a}));u.displayName="PaginationContent";const g=c.forwardRef(({className:n,...a},e)=>t.jsx("li",{ref:e,className:i.cn("",n),...a}));g.displayName="PaginationItem";const o=({className:n,isActive:a,size:e="icon",...s})=>t.jsx("a",{"aria-current":a?"page":void 0,className:i.cn(f.buttonVariants({variant:a?"tertiary":"ghost",size:e}),"cursor-pointer",n),...s});o.displayName="PaginationLink";const p=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsx(o,{"aria-label":e("Go to previous page"),size:"default",className:i.cn("gap-1 px-2.5",n),...a,children:t.jsx(j.ChevronLeft,{className:"h-4 w-4"})})};p.displayName="PaginationPrevious";const m=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsx(o,{"aria-label":e("Go to next page"),size:"default",className:i.cn("gap-1 px-2.5",n),...a,children:t.jsx(N.ChevronRight,{className:"h-4 w-4"})})};m.displayName="PaginationNext";const P=({className:n,...a})=>{const{t:e}=r.useTranslation();return t.jsxs("span",{"aria-hidden":!0,className:i.cn("flex h-9 w-9 items-center justify-center",n),...a,children:[t.jsx(x.Ellipsis,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:e("More pages")})]})};P.displayName="PaginationEllipsis";exports.Pagination=l;exports.PaginationContent=u;exports.PaginationEllipsis=P;exports.PaginationItem=g;exports.PaginationLink=o;exports.PaginationNext=m;exports.PaginationPrevious=p;
2
+ //# sourceMappingURL=pagination-LHTb7tXo.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination-CTmvz3Yq.cjs.js","sources":["../../src/ui/pagination/pagination.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport * as React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cn } from '../../lib';\nimport { type ButtonProps, buttonVariants } from '../button';\n\n/**\n * Pagination - Navigation component for paginated content.\n * @returns {JSX.Element} The rendered Pagination component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination component.\n */\nconst Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('flex w-full justify-center', className)}\n {...props}\n />\n);\nPagination.displayName = 'Pagination';\n\n/**\n * PaginationContent - Wrapper list for pagination items.\n * @returns {JSX.Element} The rendered PaginationContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination content component.\n */\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<'ul'>\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n));\nPaginationContent.displayName = 'PaginationContent';\n\n/**\n * PaginationItem - List item wrapper.\n * @returns {JSX.Element} The rendered PaginationItem component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination item component.\n */\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<'li'>\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('', className)} {...props} />\n));\nPaginationItem.displayName = 'PaginationItem';\n\n/**\n * Props for PaginationLink.\n * @property {boolean} [isActive] - Marks the current page.\n * @property {'lg'|'default'|'sm'|'xs'|'icon'} [size] - Button size forwarded to Button variants.\n */\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<ButtonProps, 'size'> &\n React.ComponentProps<'a'>;\n\n/**\n * PaginationLink - A styled anchor used as a pagination control.\n * @returns {JSX.Element} The rendered PaginationLink component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination link component.\n * @param {boolean} [props.isActive] - Marks the current page.\n * @param {string} [props.size] - The size of the pagination link.\n */\nconst PaginationLink = ({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? 'tertiary' : 'ghost',\n size,\n }),\n 'cursor-pointer',\n className\n )}\n {...props}\n />\n);\nPaginationLink.displayName = 'PaginationLink';\n\n/**\n * PaginationPrevious - Button to navigate to previous page.\n * @returns {JSX.Element} The rendered PaginationPrevious component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination previous component.\n */\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to previous page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationPrevious.displayName = 'PaginationPrevious';\n\n/**\n * PaginationNext - Button to navigate to next page.\n * @returns {JSX.Element} The rendered PaginationNext component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination next component.\n */\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to next page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationNext.displayName = 'PaginationNext';\n\n/**\n * PaginationEllipsis - Non-interactive indicator for collapsed pages.\n * @returns {JSX.Element} The rendered PaginationEllipsis component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination ellipsis component.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<'span'>) => {\n const { t } = useTranslation();\n return (\n <span\n aria-hidden\n className={cn('flex h-9 w-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">{t('More pages')}</span>\n </span>\n );\n};\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","t","useTranslation","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","jsxs","MoreHorizontal"],"mappings":"kmBAYMA,EAAa,CAAC,CAAE,UAAAC,EAAW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,KAAM,CAAE,EAAAY,CAAA,EAAMC,iBAAA,EACd,OACEZ,EAAAA,IAACM,EAAA,CACC,aAAYK,EAAE,iBAAiB,EAC/B,KAAK,UACL,UAAWV,EAAAA,GAAG,eAAgBH,CAAS,EACtC,GAAGC,EAEJ,SAAAC,EAAAA,IAACe,EAAAA,aAAA,CAAa,UAAU,SAAA,CAAU,CAAA,CAAA,CAGxC,EACAD,EAAe,YAAc,iBAQ7B,MAAME,EAAqB,CAAC,CAC1B,UAAAlB,EACA,GAAGC,CACL,IAAoC,CAClC,KAAM,CAAE,EAAAY,CAAA,EAAMC,iBAAA,EACd,OACEK,EAAAA,KAAC,OAAA,CACC,cAAW,GACX,UAAWhB,EAAAA,GAAG,2CAA4CH,CAAS,EAClE,GAAGC,EAEJ,SAAA,CAAAC,EAAAA,IAACkB,EAAAA,SAAA,CAAe,UAAU,SAAA,CAAU,QACnC,OAAA,CAAK,UAAU,UAAW,SAAAP,EAAE,YAAY,CAAA,CAAE,CAAA,CAAA,CAAA,CAGjD,EACAK,EAAmB,YAAc"}
1
+ {"version":3,"file":"pagination-LHTb7tXo.cjs.js","sources":["../../src/ui/pagination/pagination.tsx"],"sourcesContent":["import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport * as React from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { cn } from '../../lib';\nimport { type ButtonProps, buttonVariants } from '../button';\n\n/**\n * Pagination - Navigation component for paginated content.\n * @returns {JSX.Element} The rendered Pagination component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination component.\n */\nconst Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n className={cn('flex w-full justify-center', className)}\n {...props}\n />\n);\nPagination.displayName = 'Pagination';\n\n/**\n * PaginationContent - Wrapper list for pagination items.\n * @returns {JSX.Element} The rendered PaginationContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination content component.\n */\nconst PaginationContent = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<'ul'>\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n className={cn('flex flex-row items-center gap-1', className)}\n {...props}\n />\n));\nPaginationContent.displayName = 'PaginationContent';\n\n/**\n * PaginationItem - List item wrapper.\n * @returns {JSX.Element} The rendered PaginationItem component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination item component.\n */\nconst PaginationItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<'li'>\n>(({ className, ...props }, ref) => (\n <li ref={ref} className={cn('', className)} {...props} />\n));\nPaginationItem.displayName = 'PaginationItem';\n\n/**\n * Props for PaginationLink.\n * @property {boolean} [isActive] - Marks the current page.\n * @property {'lg'|'default'|'sm'|'xs'|'icon'} [size] - Button size forwarded to Button variants.\n */\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<ButtonProps, 'size'> &\n React.ComponentProps<'a'>;\n\n/**\n * PaginationLink - A styled anchor used as a pagination control.\n * @returns {JSX.Element} The rendered PaginationLink component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination link component.\n * @param {boolean} [props.isActive] - Marks the current page.\n * @param {string} [props.size] - The size of the pagination link.\n */\nconst PaginationLink = ({\n className,\n isActive,\n size = 'icon',\n ...props\n}: PaginationLinkProps) => (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={cn(\n buttonVariants({\n variant: isActive ? 'tertiary' : 'ghost',\n size,\n }),\n 'cursor-pointer',\n className\n )}\n {...props}\n />\n);\nPaginationLink.displayName = 'PaginationLink';\n\n/**\n * PaginationPrevious - Button to navigate to previous page.\n * @returns {JSX.Element} The rendered PaginationPrevious component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination previous component.\n */\nconst PaginationPrevious = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to previous page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationPrevious.displayName = 'PaginationPrevious';\n\n/**\n * PaginationNext - Button to navigate to next page.\n * @returns {JSX.Element} The rendered PaginationNext component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination next component.\n */\nconst PaginationNext = ({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) => {\n const { t } = useTranslation();\n return (\n <PaginationLink\n aria-label={t('Go to next page')}\n size=\"default\"\n className={cn('gap-1 px-2.5', className)}\n {...props}\n >\n <ChevronRight className=\"h-4 w-4\" />\n </PaginationLink>\n );\n};\nPaginationNext.displayName = 'PaginationNext';\n\n/**\n * PaginationEllipsis - Non-interactive indicator for collapsed pages.\n * @returns {JSX.Element} The rendered PaginationEllipsis component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the pagination ellipsis component.\n */\nconst PaginationEllipsis = ({\n className,\n ...props\n}: React.ComponentProps<'span'>) => {\n const { t } = useTranslation();\n return (\n <span\n aria-hidden\n className={cn('flex h-9 w-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">{t('More pages')}</span>\n </span>\n );\n};\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","React","ref","PaginationItem","PaginationLink","isActive","size","buttonVariants","PaginationPrevious","t","useTranslation","ChevronLeft","PaginationNext","ChevronRight","PaginationEllipsis","jsxs","MoreHorizontal"],"mappings":"kmBAYMA,EAAa,CAAC,CAAE,UAAAC,EAAW,GAAGC,KAClCC,EAAAA,IAAC,MAAA,CACC,KAAK,aACL,aAAW,aACX,UAAWC,EAAAA,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,aAAYK,EAAE,iBAAiB,EAC/B,KAAK,UACL,UAAWV,EAAAA,GAAG,eAAgBH,CAAS,EACtC,GAAGC,EAEJ,SAAAC,EAAAA,IAACe,EAAAA,aAAA,CAAa,UAAU,SAAA,CAAU,CAAA,CAAA,CAGxC,EACAD,EAAe,YAAc,iBAQ7B,MAAME,EAAqB,CAAC,CAC1B,UAAAlB,EACA,GAAGC,CACL,IAAoC,CAClC,KAAM,CAAE,EAAAY,CAAA,EAAMC,iBAAA,EACd,OACEK,EAAAA,KAAC,OAAA,CACC,cAAW,GACX,UAAWhB,EAAAA,GAAG,2CAA4CH,CAAS,EAClE,GAAGC,EAEJ,SAAA,CAAAC,EAAAA,IAACkB,EAAAA,SAAA,CAAe,UAAU,SAAA,CAAU,QACnC,OAAA,CAAK,UAAU,UAAW,SAAAP,EAAE,YAAY,CAAA,CAAE,CAAA,CAAA,CAAA,CAGjD,EACAK,EAAmB,YAAc"}
@@ -1,2 +1,2 @@
1
- "use strict";const l=require("react/jsx-runtime"),$=require("react"),d=require("./index-D9zW9Tk7.cjs.js"),_=require("./index-jFOWwfD3.cjs.js"),q=require("./index-CItoM52t.cjs.js"),C=require("./index-DG15yxNP.cjs.js"),y=require("./index-BruMW80s.cjs.js"),g=require("./index-CGLGXpw0.cjs.js"),H=require("./utils-BWS4jvS6.cjs.js");function V(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=V($);function L(e){const r=W(e),t=a.forwardRef((n,o)=>{const{children:s,...c}=n,i=a.Children.toArray(s),u=i.find(G);if(u){const p=u.props.children,m=i.map(v=>v===u?a.Children.count(p)>1?a.Children.only(null):a.isValidElement(p)?p.props.children:null:v);return l.jsx(r,{...c,ref:o,children:a.isValidElement(p)?a.cloneElement(p,void 0,m):null})}return l.jsx(r,{...c,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function W(e){const r=a.forwardRef((t,n)=>{const{children:o,...s}=t;if(a.isValidElement(o)){const c=K(o),i=B(s,o.props);return o.type!==a.Fragment&&(i.ref=n?_.composeRefs(n,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function G(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function B(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function K(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var R="Popover",[E]=d.createContextScope(R,[g.createPopperScope]),x=g.createPopperScope(),[Z,f]=E(R),b=e=>{const{__scopePopover:r,children:t,open:n,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,i=x(r),u=a.useRef(null),[p,m]=a.useState(!1),[v,P]=y.useControllableState({prop:n,defaultProp:o??!1,onChange:s,caller:R});return l.jsx(g.Root2,{...i,children:l.jsx(Z,{scope:r,contentId:y.useId(),triggerRef:u,open:v,onOpenChange:P,onOpenToggle:a.useCallback(()=>P(O=>!O),[P]),hasCustomAnchor:p,onCustomAnchorAdd:a.useCallback(()=>m(!0),[]),onCustomAnchorRemove:a.useCallback(()=>m(!1),[]),modal:c,children:t})})};b.displayName=R;var j="PopoverAnchor",U=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(j,t),s=x(t),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(g.Anchor,{...s,...n,ref:r})});U.displayName=j;var w="PopoverTrigger",S=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(w,t),s=x(t),c=_.useComposedRefs(r,o.triggerRef),i=l.jsx(d.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":I(o.open),...n,ref:c,onClick:d.composeEventHandlers(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(g.Anchor,{asChild:!0,...s,children:i})});S.displayName=w;var A="PopoverPortal",[J,Q]=E(A,{forceMount:void 0}),N=e=>{const{__scopePopover:r,forceMount:t,children:n,container:o}=e,s=f(A,r);return l.jsx(J,{scope:r,forceMount:t,children:l.jsx(d.Presence,{present:t||s.open,children:l.jsx(C.Portal,{asChild:!0,container:o,children:n})})})};N.displayName=A;var h="PopoverContent",F=a.forwardRef((e,r)=>{const t=Q(h,e.__scopePopover),{forceMount:n=t.forceMount,...o}=e,s=f(h,e.__scopePopover);return l.jsx(d.Presence,{present:n||s.open,children:s.modal?l.jsx(Y,{...o,ref:r}):l.jsx(ee,{...o,ref:r})})});F.displayName=h;var X=L("PopoverContent.RemoveScroll"),Y=a.forwardRef((e,r)=>{const t=f(h,e.__scopePopover),n=a.useRef(null),o=_.useComposedRefs(r,n),s=a.useRef(!1);return a.useEffect(()=>{const c=n.current;if(c)return C.hideOthers(c)},[]),l.jsx(C.ReactRemoveScroll,{as:X,allowPinchZoom:!0,children:l.jsx(D,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:d.composeEventHandlers(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),s.current||(i=t.triggerRef.current)==null||i.focus()}),onPointerDownOutside:d.composeEventHandlers(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,p=i.button===2||u;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:d.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ee=a.forwardRef((e,r)=>{const t=f(h,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(D,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(n.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((p=t.triggerRef.current)==null?void 0:p.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),D=a.forwardRef((e,r)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,...v}=e,P=f(h,t),O=x(t);return C.useFocusGuards(),l.jsx(C.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(q.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>P.onOpenChange(!1),children:l.jsx(g.Content,{"data-state":I(P.open),role:"dialog",id:P.contentId,...O,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",oe=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(T,t);return l.jsx(d.Primitive.button,{type:"button",...n,ref:r,onClick:d.composeEventHandlers(e.onClick,()=>o.onOpenChange(!1))})});oe.displayName=T;var te="PopoverArrow",re=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=x(t);return l.jsx(g.Arrow,{...o,...n,ref:r})});re.displayName=te;function I(e){return e?"open":"closed"}var ne=b,se=S,ae=N,M=F;const ce=ne,ie=se,k=a.forwardRef(({className:e,align:r="center",sideOffset:t=4,...n},o)=>l.jsx(ae,{children:l.jsx(M,{ref:o,align:r,sideOffset:t,className:H.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...n})}));k.displayName=M.displayName;exports.Popover=ce;exports.PopoverContent=k;exports.PopoverTrigger=ie;
2
- //# sourceMappingURL=popover-Cqh2olw7.cjs.js.map
1
+ "use strict";const l=require("react/jsx-runtime"),$=require("react"),d=require("./index-D9zW9Tk7.cjs.js"),_=require("./index-jFOWwfD3.cjs.js"),q=require("./index-CItoM52t.cjs.js"),C=require("./index-DG15yxNP.cjs.js"),y=require("./index-BruMW80s.cjs.js"),g=require("./index-CGLGXpw0.cjs.js"),H=require("./utils-C4d7Ql9-.cjs.js");function V(e){if(e&&e.__esModule)return e;const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const a=V($);function L(e){const r=W(e),t=a.forwardRef((n,o)=>{const{children:s,...c}=n,i=a.Children.toArray(s),u=i.find(G);if(u){const p=u.props.children,m=i.map(v=>v===u?a.Children.count(p)>1?a.Children.only(null):a.isValidElement(p)?p.props.children:null:v);return l.jsx(r,{...c,ref:o,children:a.isValidElement(p)?a.cloneElement(p,void 0,m):null})}return l.jsx(r,{...c,ref:o,children:s})});return t.displayName=`${e}.Slot`,t}function W(e){const r=a.forwardRef((t,n)=>{const{children:o,...s}=t;if(a.isValidElement(o)){const c=K(o),i=B(s,o.props);return o.type!==a.Fragment&&(i.ref=n?_.composeRefs(n,c):c),a.cloneElement(o,i)}return a.Children.count(o)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function G(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function B(e,r){const t={...r};for(const n in r){const o=e[n],s=r[n];/^on[A-Z]/.test(n)?o&&s?t[n]=(...i)=>{const u=s(...i);return o(...i),u}:o&&(t[n]=o):n==="style"?t[n]={...o,...s}:n==="className"&&(t[n]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}function K(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}var R="Popover",[E]=d.createContextScope(R,[g.createPopperScope]),x=g.createPopperScope(),[Z,f]=E(R),b=e=>{const{__scopePopover:r,children:t,open:n,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,i=x(r),u=a.useRef(null),[p,m]=a.useState(!1),[v,P]=y.useControllableState({prop:n,defaultProp:o??!1,onChange:s,caller:R});return l.jsx(g.Root2,{...i,children:l.jsx(Z,{scope:r,contentId:y.useId(),triggerRef:u,open:v,onOpenChange:P,onOpenToggle:a.useCallback(()=>P(O=>!O),[P]),hasCustomAnchor:p,onCustomAnchorAdd:a.useCallback(()=>m(!0),[]),onCustomAnchorRemove:a.useCallback(()=>m(!1),[]),modal:c,children:t})})};b.displayName=R;var j="PopoverAnchor",U=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(j,t),s=x(t),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return a.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(g.Anchor,{...s,...n,ref:r})});U.displayName=j;var w="PopoverTrigger",S=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(w,t),s=x(t),c=_.useComposedRefs(r,o.triggerRef),i=l.jsx(d.Primitive.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":I(o.open),...n,ref:c,onClick:d.composeEventHandlers(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(g.Anchor,{asChild:!0,...s,children:i})});S.displayName=w;var A="PopoverPortal",[J,Q]=E(A,{forceMount:void 0}),N=e=>{const{__scopePopover:r,forceMount:t,children:n,container:o}=e,s=f(A,r);return l.jsx(J,{scope:r,forceMount:t,children:l.jsx(d.Presence,{present:t||s.open,children:l.jsx(C.Portal,{asChild:!0,container:o,children:n})})})};N.displayName=A;var h="PopoverContent",F=a.forwardRef((e,r)=>{const t=Q(h,e.__scopePopover),{forceMount:n=t.forceMount,...o}=e,s=f(h,e.__scopePopover);return l.jsx(d.Presence,{present:n||s.open,children:s.modal?l.jsx(Y,{...o,ref:r}):l.jsx(ee,{...o,ref:r})})});F.displayName=h;var X=L("PopoverContent.RemoveScroll"),Y=a.forwardRef((e,r)=>{const t=f(h,e.__scopePopover),n=a.useRef(null),o=_.useComposedRefs(r,n),s=a.useRef(!1);return a.useEffect(()=>{const c=n.current;if(c)return C.hideOthers(c)},[]),l.jsx(C.ReactRemoveScroll,{as:X,allowPinchZoom:!0,children:l.jsx(D,{...e,ref:o,trapFocus:t.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:d.composeEventHandlers(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),s.current||(i=t.triggerRef.current)==null||i.focus()}),onPointerDownOutside:d.composeEventHandlers(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,u=i.button===0&&i.ctrlKey===!0,p=i.button===2||u;s.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:d.composeEventHandlers(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),ee=a.forwardRef((e,r)=>{const t=f(h,e.__scopePopover),n=a.useRef(!1),o=a.useRef(!1);return l.jsx(D,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(n.current||(i=t.triggerRef.current)==null||i.focus(),s.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:s=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((p=t.triggerRef.current)==null?void 0:p.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),D=a.forwardRef((e,r)=>{const{__scopePopover:t,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:m,...v}=e,P=f(h,t),O=x(t);return C.useFocusGuards(),l.jsx(C.FocusScope,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:s,children:l.jsx(q.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>P.onOpenChange(!1),children:l.jsx(g.Content,{"data-state":I(P.open),role:"dialog",id:P.contentId,...O,...v,ref:r,style:{...v.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",oe=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=f(T,t);return l.jsx(d.Primitive.button,{type:"button",...n,ref:r,onClick:d.composeEventHandlers(e.onClick,()=>o.onOpenChange(!1))})});oe.displayName=T;var te="PopoverArrow",re=a.forwardRef((e,r)=>{const{__scopePopover:t,...n}=e,o=x(t);return l.jsx(g.Arrow,{...o,...n,ref:r})});re.displayName=te;function I(e){return e?"open":"closed"}var ne=b,se=S,ae=N,M=F;const ce=ne,ie=se,k=a.forwardRef(({className:e,align:r="center",sideOffset:t=4,...n},o)=>l.jsx(ae,{children:l.jsx(M,{ref:o,align:r,sideOffset:t,className:H.cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...n})}));k.displayName=M.displayName;exports.Popover=ce;exports.PopoverContent=k;exports.PopoverTrigger=ie;
2
+ //# sourceMappingURL=popover-Bh6emR_J.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-Cqh2olw7.cjs.js","sources":["../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/ui/popover/popover.tsx"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\nimport { cn } from '../../lib';\nimport type { ElementDataType } from '../../types';\n\n/**\n * Popover primitives for floating content triggered by another element.\n */\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * PopoverContent - The floating panel that appears near the trigger.\n * @returns {JSX.Element} The rendered PopoverContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the popover content.\n * @param {'start' | 'center' | 'end'} [props.align='center'] - The alignment of the popover content relative to the trigger.\n * @param {number} [props.sideOffset=4] - The distance between the trigger and the popover content.\n */\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Props aggregation for components that wrap Popover primitives.\n * Useful for high-level components needing to forward props to specific Popover parts.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType} [triggerProps] - Props for the PopoverTrigger component.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType} [contentProps] - Props for the PopoverContent component.\n */\ninterface PopoverContainerProps {\n triggerProps?: React.ComponentPropsWithoutRef<typeof PopoverTrigger> &\n ElementDataType;\n contentProps?: React.ComponentPropsWithoutRef<typeof PopoverContent> &\n ElementDataType;\n}\n\nexport { Popover, PopoverContent, PopoverTrigger, type PopoverContainerProps };\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","POPOVER_NAME","createPopoverContext","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","PopoverPrimitive.Root","PopoverPrimitive.Trigger","className","align","sideOffset","ref","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":"8nBAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SA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,EACpC0C,EAAcT,EAAeI,CAAc,EACjD,OAAuB3B,EAAAA,IAAIyG,EAAAA,MAAuB,CAAE,GAAGzE,EAAa,GAAGwE,EAAY,IAAKjH,EAAc,CACxG,CACF,EACAgH,GAAa,YAAcD,GAC3B,SAAS9C,EAASpB,EAAM,CACtB,OAAOA,EAAO,OAAS,QACzB,CACA,IAAIsE,GAAQhF,EAERiF,GAAUzD,EACV0D,GAAS/C,EACTgD,EAAW1C,ECnSf,MAAMzC,GAAUoF,GAEV5D,GAAiB6D,GAUjB5C,EAAiB9E,EAAM,WAG3B,CAAC,CAAE,UAAA2H,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAG5H,CAAA,EAAS6H,IAC5DnH,EAAAA,IAACoH,GAAA,CACC,SAAApH,EAAAA,IAACqH,EAAA,CACC,IAAAF,EACA,MAAAF,EACA,WAAAC,EACA,UAAWI,EAAAA,GACT,6aACAN,CAAA,EAED,GAAG1H,CAAA,CACN,EACF,CACD,EACD6E,EAAe,YAAckD,EAAyB","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"popover-Bh6emR_J.cjs.js","sources":["../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/ui/popover/popover.tsx"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\nimport { cn } from '../../lib';\nimport type { ElementDataType } from '../../types';\n\n/**\n * Popover primitives for floating content triggered by another element.\n */\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * PopoverContent - The floating panel that appears near the trigger.\n * @returns {JSX.Element} The rendered PopoverContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the popover content.\n * @param {'start' | 'center' | 'end'} [props.align='center'] - The alignment of the popover content relative to the trigger.\n * @param {number} [props.sideOffset=4] - The distance between the trigger and the popover content.\n */\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Props aggregation for components that wrap Popover primitives.\n * Useful for high-level components needing to forward props to specific Popover parts.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType} [triggerProps] - Props for the PopoverTrigger component.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType} [contentProps] - Props for the PopoverContent component.\n */\ninterface PopoverContainerProps {\n triggerProps?: React.ComponentPropsWithoutRef<typeof PopoverTrigger> &\n ElementDataType;\n contentProps?: React.ComponentPropsWithoutRef<typeof PopoverContent> &\n ElementDataType;\n}\n\nexport { Popover, PopoverContent, PopoverTrigger, type PopoverContainerProps };\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","POPOVER_NAME","createPopoverContext","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","PopoverPrimitive.Root","PopoverPrimitive.Trigger","className","align","sideOffset","ref","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":"8nBAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,E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,EACV0D,GAAS/C,EACTgD,EAAW1C,ECnSf,MAAMzC,GAAUoF,GAEV5D,GAAiB6D,GAUjB5C,EAAiB9E,EAAM,WAG3B,CAAC,CAAE,UAAA2H,EAAW,MAAAC,EAAQ,SAAU,WAAAC,EAAa,EAAG,GAAG5H,CAAA,EAAS6H,IAC5DnH,EAAAA,IAACoH,GAAA,CACC,SAAApH,EAAAA,IAACqH,EAAA,CACC,IAAAF,EACA,MAAAF,EACA,WAAAC,EACA,UAAWI,EAAAA,GACT,6aACAN,CAAA,EAED,GAAG1H,CAAA,CACN,EACF,CACD,EACD6E,EAAe,YAAckD,EAAyB","x_google_ignoreList":[0,1]}
@@ -6,7 +6,7 @@ import { D as W } from "./index-ClNIHY-1.es.js";
6
6
  import { P as H, h as j, R as z, u as G, F as B } from "./index-BKZjW6I1.es.js";
7
7
  import { u as K, a as Z } from "./index-BdfbDt7y.es.js";
8
8
  import { R as U, A as E, c as b, C as q, a as J } from "./index-Bli6ZByj.es.js";
9
- import { c as Q } from "./utils-D6dQK9i-.es.js";
9
+ import { c as Q } from "./utils-CnvKSirc.es.js";
10
10
  // @__NO_SIDE_EFFECTS__
11
11
  function X(e) {
12
12
  const t = /* @__PURE__ */ Y(e), r = s.forwardRef((n, o) => {
@@ -282,4 +282,4 @@ export {
282
282
  ge as a,
283
283
  xe as b
284
284
  };
285
- //# sourceMappingURL=popover-B52SY7sk.es.js.map
285
+ //# sourceMappingURL=popover-BredK0sg.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-B52SY7sk.es.js","sources":["../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/ui/popover/popover.tsx"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\nimport { cn } from '../../lib';\nimport type { ElementDataType } from '../../types';\n\n/**\n * Popover primitives for floating content triggered by another element.\n */\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * PopoverContent - The floating panel that appears near the trigger.\n * @returns {JSX.Element} The rendered PopoverContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the popover content.\n * @param {'start' | 'center' | 'end'} [props.align='center'] - The alignment of the popover content relative to the trigger.\n * @param {number} [props.sideOffset=4] - The distance between the trigger and the popover content.\n */\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Props aggregation for components that wrap Popover primitives.\n * Useful for high-level components needing to forward props to specific Popover parts.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType} [triggerProps] - Props for the PopoverTrigger component.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType} [contentProps] - Props for the PopoverContent component.\n */\ninterface PopoverContainerProps {\n triggerProps?: React.ComponentPropsWithoutRef<typeof PopoverTrigger> &\n ElementDataType;\n contentProps?: React.ComponentPropsWithoutRef<typeof PopoverContent> &\n ElementDataType;\n}\n\nexport { Popover, PopoverContent, PopoverTrigger, type PopoverContainerProps };\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","POPOVER_NAME","createPopoverContext","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","PopoverPrimitive.Root","PopoverPrimitive.Trigger","className","align","sideOffset","ref","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":";;;;;;;;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI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AEV5D,KAAiB6D,IAUjB5C,KAAiB9E,EAAM,WAG3B,CAAC,EAAE,WAAA2H,GAAW,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,GAAG5H,EAAA,GAAS6H,MAC5D,gBAAAnH,EAACoH,IAAA,EACC,UAAA,gBAAApH;AAAA,EAACqH;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,OAAAF;AAAA,IACA,YAAAC;AAAA,IACA,WAAWI;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAG1H;AAAA,EAAA;AACN,GACF,CACD;AACD6E,GAAe,cAAckD,EAAyB;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"popover-BredK0sg.es.js","sources":["../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs","../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/ui/popover/popover.tsx"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as React from 'react';\nimport { cn } from '../../lib';\nimport type { ElementDataType } from '../../types';\n\n/**\n * Popover primitives for floating content triggered by another element.\n */\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\n/**\n * PopoverContent - The floating panel that appears near the trigger.\n * @returns {JSX.Element} The rendered PopoverContent component.\n * @param {object} props - The properties for the component.\n * @param {string} [props.className] - Additional classes for the popover content.\n * @param {'start' | 'center' | 'end'} [props.align='center'] - The alignment of the popover content relative to the trigger.\n * @param {number} [props.sideOffset=4] - The distance between the trigger and the popover content.\n */\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\n/**\n * Props aggregation for components that wrap Popover primitives.\n * Useful for high-level components needing to forward props to specific Popover parts.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverTrigger> & ElementDataType} [triggerProps] - Props for the PopoverTrigger component.\n * @property {React.ComponentPropsWithoutRef<typeof PopoverContent> & ElementDataType} [contentProps] - Props for the PopoverContent component.\n */\ninterface PopoverContainerProps {\n triggerProps?: React.ComponentPropsWithoutRef<typeof PopoverTrigger> &\n ElementDataType;\n contentProps?: React.ComponentPropsWithoutRef<typeof PopoverContent> &\n ElementDataType;\n}\n\nexport { Popover, PopoverContent, PopoverTrigger, type PopoverContainerProps };\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","_a","mayWarn","_b","POPOVER_NAME","createPopoverContext","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","useControllableState","PopperPrimitive.Root","useId","prevOpen","ANCHOR_NAME","PopoverAnchor","anchorProps","context","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","getState","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","forceMount","container","Presence","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","contentRef","composedRefs","isRightClickOutsideRef","content","hideOthers","RemoveScroll","PopoverContentImpl","event","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Root2","Trigger","Portal","Content2","PopoverPrimitive.Root","PopoverPrimitive.Trigger","className","align","sideOffset","ref","PopoverPrimitive.Portal","PopoverPrimitive.Content","cn"],"mappings":";;;;;;;;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC,EAAgBF,CAAS,GACrDG,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACtD,UAAM,EAAE,UAAAC,GAAU,GAAGC,EAAS,IAAKH,GAC7BI,IAAgBL,EAAM,SAAS,QAAQG,CAAQ,GAC/CG,IAAYD,EAAc,KAAKE,EAAW;AAChD,QAAID,GAAW;AACb,YAAME,IAAaF,EAAU,MAAM,UAC7BG,IAAcJ,EAAc,IAAI,CAACK,MACjCA,MAAUJ,IACRN,EAAM,SAAS,MAAMQ,CAAU,IAAI,IAAUR,EAAM,SAAS,KAAK,IAAI,IAClEA,EAAM,eAAeQ,CAAU,IAAIA,EAAW,MAAM,WAAW,OAE/DE,CAEV;AACD,aAAuB,gBAAAC,EAAId,GAAW,EAAE,GAAGO,GAAW,KAAKF,GAAc,UAAUF,EAAM,eAAeQ,CAAU,IAAIR,EAAM,aAAaQ,GAAY,QAAQC,CAAW,IAAI,MAAM;AAAA,IACpL;AACA,WAAuB,gBAAAE,EAAId,GAAW,EAAE,GAAGO,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ACpCuD,IAAUpB,EAAkB0E,GAAYxE,CAAc;AAC5D,WAAuB,gBAAA3B;AAAA,MACrBuD,EAAU;AAAA,MACV;AAAA,QACE,MAAM;AAAA,QACN,GAAG8C;AAAA,QACH,KAAK9G;AAAA,QACL,SAASkE,EAAqBnE,EAAM,SAAS,MAAMuD,EAAQ,aAAa,EAAK,CAAC;AAAA,MACtF;AAAA,IACA;AAAA,EACE;AACF;AACAuD,GAAa,cAAcD;AAC3B,IAAIG,KAAa,gBACbC,KAAelH,EAAM;AAAA,EACvB,CAACC,GAAOC,MAAiB;AACvB,UAAM,EAAE,gBAAAoC,GAAgB,GAAG6E,EAAU,IAAKlH,GACpC0C,IAAcT,EAAeI,CAAc;AACjD,WAAuB,gBAAA3B,EAAIyG,GAAuB,EAAE,GAAGzE,GAAa,GAAGwE,GAAY,KAAKjH,GAAc;AAAA,EACxG;AACF;AACAgH,GAAa,cAAcD;AAC3B,SAAS9C,EAASpB,GAAM;AACtB,SAAOA,IAAO,SAAS;AACzB;AACA,IAAIsE,KAAQhF,GAERiF,KAAUzD,GACV0D,KAAS/C,GACTgD,IAAW1C;ACnSf,MAAMzC,KAAUoF,IAEV5D,KAAiB6D,IAUjB5C,KAAiB9E,EAAM,WAG3B,CAAC,EAAE,WAAA2H,GAAW,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,GAAG5H,EAAA,GAAS6H,MAC5D,gBAAAnH,EAACoH,IAAA,EACC,UAAA,gBAAApH;AAAA,EAACqH;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,OAAAF;AAAA,IACA,YAAAC;AAAA,IACA,WAAWI;AAAA,MACT;AAAA,MACAN;AAAA,IAAA;AAAA,IAED,GAAG1H;AAAA,EAAA;AACN,GACF,CACD;AACD6E,GAAe,cAAckD,EAAyB;","x_google_ignoreList":[0,1]}
@@ -3,7 +3,7 @@ import * as R from "react";
3
3
  import { useState as be, useCallback as J, forwardRef as ht, useContext as un, useLayoutEffect as Jn, useRef as ge, useMemo as se, createContext as zn, Component as kn, Fragment as gt, useEffect as ze } from "react";
4
4
  import { createPortal as jn } from "react-dom";
5
5
  import { b as Un } from "./index-Bli6ZByj.es.js";
6
- import { t as fe } from "./utils-D6dQK9i-.es.js";
6
+ import { t as fe } from "./utils-CnvKSirc.es.js";
7
7
  function Qn(t) {
8
8
  var e = /* @__PURE__ */ Object.create(null);
9
9
  return function(r) {
@@ -4173,4 +4173,4 @@ export {
4173
4173
  Qn as m,
4174
4174
  $n as u
4175
4175
  };
4176
- //# sourceMappingURL=react-select-C21jRzGG.es.js.map
4176
+ //# sourceMappingURL=react-select-BDoLUa8t.es.js.map