@intlayer/design-system 5.8.0-canary.0 → 5.8.1

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 (168) hide show
  1. package/dist/.vite/manifest.json +45 -37
  2. package/dist/components/Breadcrumb/index.cjs +2 -3
  3. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  4. package/dist/components/Breadcrumb/index.d.ts.map +1 -1
  5. package/dist/components/Breadcrumb/index.mjs +3 -4
  6. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  7. package/dist/components/CopyButton/CopyButton.content.cjs.map +1 -0
  8. package/dist/components/CopyButton/CopyButton.content.d.ts.map +1 -0
  9. package/dist/components/CopyButton/CopyButton.content.mjs.map +1 -0
  10. package/dist/components/CopyButton/index.cjs +1 -2
  11. package/dist/components/CopyButton/index.cjs.map +1 -1
  12. package/dist/components/CopyButton/index.d.ts.map +1 -1
  13. package/dist/components/CopyButton/index.mjs +2 -3
  14. package/dist/components/CopyButton/index.mjs.map +1 -1
  15. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs +3 -7
  16. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  17. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.d.ts.map +1 -1
  18. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs +4 -8
  19. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  20. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs +1 -4
  21. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  22. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.d.ts.map +1 -1
  23. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs +2 -5
  24. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  25. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs +1 -2
  26. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
  27. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.d.ts.map +1 -1
  28. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs +2 -3
  29. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
  30. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs +1 -2
  31. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  32. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.d.ts.map +1 -1
  33. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs +2 -3
  34. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  35. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts +2 -24
  36. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.d.ts.map +1 -1
  37. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs +1 -2
  38. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  39. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.d.ts.map +1 -1
  40. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs +2 -3
  41. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  42. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs +1 -5
  43. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  44. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.d.ts.map +1 -1
  45. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs +2 -6
  46. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  47. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs +1 -2
  48. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  49. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.d.ts.map +1 -1
  50. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs +2 -3
  51. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  52. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs +1 -2
  53. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  54. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.d.ts.map +1 -1
  55. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs +2 -3
  56. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  57. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs +1 -2
  58. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  59. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.d.ts.map +1 -1
  60. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs +2 -3
  61. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  62. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts +2 -24
  63. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.d.ts.map +1 -1
  64. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs +2 -3
  65. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
  66. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.d.ts.map +1 -1
  67. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs +3 -4
  68. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
  69. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs +1 -1
  70. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
  71. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs +1 -1
  72. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
  73. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs +1 -4
  74. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
  75. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.d.ts.map +1 -1
  76. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs +2 -5
  77. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
  78. package/dist/components/ExpandCollapse/ExpandCollapse.cjs +56 -0
  79. package/dist/components/ExpandCollapse/ExpandCollapse.cjs.map +1 -0
  80. package/dist/components/ExpandCollapse/ExpandCollapse.d.ts +9 -0
  81. package/dist/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -0
  82. package/dist/components/ExpandCollapse/ExpandCollapse.mjs +56 -0
  83. package/dist/components/ExpandCollapse/ExpandCollapse.mjs.map +1 -0
  84. package/dist/components/ExpandCollapse/expandCollapse.content.cjs +41 -0
  85. package/dist/components/ExpandCollapse/expandCollapse.content.cjs.map +1 -0
  86. package/dist/components/ExpandCollapse/expandCollapse.content.d.ts +40 -0
  87. package/dist/components/ExpandCollapse/expandCollapse.content.d.ts.map +1 -0
  88. package/dist/components/ExpandCollapse/expandCollapse.content.mjs +42 -0
  89. package/dist/components/ExpandCollapse/expandCollapse.content.mjs.map +1 -0
  90. package/dist/components/ExpandCollapse/index.cjs +5 -0
  91. package/dist/components/ExpandCollapse/index.cjs.map +1 -0
  92. package/dist/components/ExpandCollapse/index.d.ts +2 -0
  93. package/dist/components/ExpandCollapse/index.d.ts.map +1 -0
  94. package/dist/components/ExpandCollapse/index.mjs +5 -0
  95. package/dist/components/ExpandCollapse/index.mjs.map +1 -0
  96. package/dist/components/IDE/Code.cjs +12 -1
  97. package/dist/components/IDE/Code.cjs.map +1 -1
  98. package/dist/components/IDE/Code.d.ts +1 -0
  99. package/dist/components/IDE/Code.d.ts.map +1 -1
  100. package/dist/components/IDE/Code.mjs +12 -1
  101. package/dist/components/IDE/Code.mjs.map +1 -1
  102. package/dist/components/IDE/CopyCode.cjs +1 -2
  103. package/dist/components/IDE/CopyCode.cjs.map +1 -1
  104. package/dist/components/IDE/CopyCode.d.ts.map +1 -1
  105. package/dist/components/IDE/CopyCode.mjs +2 -3
  106. package/dist/components/IDE/CopyCode.mjs.map +1 -1
  107. package/dist/components/Loader/index.content.d.ts +2 -24
  108. package/dist/components/Loader/index.content.d.ts.map +1 -1
  109. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs +1 -2
  110. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
  111. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.d.ts.map +1 -1
  112. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs +2 -3
  113. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
  114. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs +1 -2
  115. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  116. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.d.ts.map +1 -1
  117. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs +2 -3
  118. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  119. package/dist/components/MarkDownRender/index.cjs +7 -0
  120. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  121. package/dist/components/MarkDownRender/index.d.ts.map +1 -1
  122. package/dist/components/MarkDownRender/index.mjs +7 -0
  123. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  124. package/dist/components/Modal/Modal.cjs +1 -1
  125. package/dist/components/Modal/Modal.cjs.map +1 -1
  126. package/dist/components/Modal/Modal.mjs +1 -1
  127. package/dist/components/Modal/Modal.mjs.map +1 -1
  128. package/dist/components/Navbar/DesktopNavbar.cjs +1 -1
  129. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  130. package/dist/components/Navbar/DesktopNavbar.mjs +1 -1
  131. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  132. package/dist/components/Navbar/index.cjs +1 -1
  133. package/dist/components/Navbar/index.cjs.map +1 -1
  134. package/dist/components/Navbar/index.mjs +1 -1
  135. package/dist/components/Navbar/index.mjs.map +1 -1
  136. package/dist/components/Popover/index.cjs.map +1 -1
  137. package/dist/components/Popover/index.d.ts +2 -2
  138. package/dist/components/Popover/index.d.ts.map +1 -1
  139. package/dist/components/Popover/index.mjs.map +1 -1
  140. package/dist/components/SocialNetworks/index.cjs +1 -1
  141. package/dist/components/SocialNetworks/index.cjs.map +1 -1
  142. package/dist/components/SocialNetworks/index.mjs +1 -1
  143. package/dist/components/SocialNetworks/index.mjs.map +1 -1
  144. package/dist/components/Table/Table.cjs +4 -50
  145. package/dist/components/Table/Table.cjs.map +1 -1
  146. package/dist/components/Table/Table.d.ts +3 -1
  147. package/dist/components/Table/Table.d.ts.map +1 -1
  148. package/dist/components/Table/Table.mjs +5 -51
  149. package/dist/components/Table/Table.mjs.map +1 -1
  150. package/dist/components/Table/table.content.cjs +0 -30
  151. package/dist/components/Table/table.content.cjs.map +1 -1
  152. package/dist/components/Table/table.content.d.ts +0 -66
  153. package/dist/components/Table/table.content.d.ts.map +1 -1
  154. package/dist/components/Table/table.content.mjs +0 -30
  155. package/dist/components/Table/table.content.mjs.map +1 -1
  156. package/dist/components/index.cjs +2 -0
  157. package/dist/components/index.cjs.map +1 -1
  158. package/dist/components/index.d.ts +1 -0
  159. package/dist/components/index.d.ts.map +1 -1
  160. package/dist/components/index.mjs +2 -0
  161. package/dist/components/index.mjs.map +1 -1
  162. package/package.json +19 -18
  163. package/dist/components/IDE/CopyButton.content.cjs.map +0 -1
  164. package/dist/components/IDE/CopyButton.content.d.ts.map +0 -1
  165. package/dist/components/IDE/CopyButton.content.mjs.map +0 -1
  166. /package/dist/components/{IDE → CopyButton}/CopyButton.content.cjs +0 -0
  167. /package/dist/components/{IDE → CopyButton}/CopyButton.content.d.ts +0 -0
  168. /package/dist/components/{IDE → CopyButton}/CopyButton.content.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/MarkDownRender/index.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport Markdown, { type MarkdownToJSX } from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { H1, H2, H3, H4 } from '../Headers';\nimport { Code } from '../IDE/Code';\nimport { CodeProvider } from '../IDE/CodeContext';\nimport { Link } from '../Link';\nimport { Table } from '../Table';\n\ntype MarkdownRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n options?: MarkdownToJSX.Options;\n};\n\n/**\n * Removes frontmatter from markdown content\n * Frontmatter is the YAML metadata block at the beginning of markdown files\n * delimited by --- at the start and end\n */\nconst stripFrontmatter = (markdown: string): string => {\n const lines = markdown.split(/\\r?\\n/);\n\n // Check if the very first non-empty line is the metadata start delimiter\n const firstNonEmptyLine = lines.find((line) => line.trim() !== '');\n\n if (!firstNonEmptyLine || firstNonEmptyLine.trim() !== '---') {\n // No frontmatter, return original content\n return markdown;\n }\n\n let inMetadataBlock = false;\n let endOfMetadataIndex = -1;\n\n for (let i = 0; i < lines.length; i++) {\n const trimmedLine = lines[i].trim();\n\n // Toggle metadata block on encountering the delimiter\n if (trimmedLine === '---') {\n if (!inMetadataBlock) {\n // Begin metadata block\n inMetadataBlock = true;\n continue;\n } else {\n // End of metadata block\n endOfMetadataIndex = i;\n break;\n }\n }\n }\n\n if (endOfMetadataIndex > -1) {\n // Return content after the frontmatter\n return lines.slice(endOfMetadataIndex + 1).join('\\n');\n }\n\n // If we couldn't find the end delimiter, return original content\n return markdown;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n locale,\n options,\n}) => {\n const { overrides, ...restOptions } = options ?? {};\n\n // Strip frontmatter from the markdown content before rendering\n const cleanMarkdown = stripFrontmatter(children);\n\n return (\n <CodeProvider>\n <Markdown\n options={{\n overrides: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} {...props} />,\n h3: (props) => <H3 isClickable={true} {...props} />,\n h4: (props) => <H4 isClickable={true} {...props} />,\n\n code: (props) =>\n typeof props.className === 'undefined' ? (\n <strong className=\"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {props.children}\n </strong>\n ) : (\n <Code\n isDarkMode={isDarkMode}\n language={props.className?.replace('lang-', '')}\n {...props}\n />\n ),\n\n blockquote: ({ className, ...props }) => (\n <blockquote\n className={cn(\n 'border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5',\n className\n )}\n {...props}\n />\n ),\n ul: ({ className, ...props }) => (\n <ul\n className={cn(\n 'mt-5 flex flex-col gap-3 pl-5 list-disc',\n className\n )}\n {...props}\n />\n ),\n ol: ({ className, ...props }) => (\n <ol\n className={cn(\n 'mt-5 flex flex-col gap-3 pl-5 list-decimal',\n className\n )}\n {...props}\n />\n ),\n li: ({ className, ...props }) => (\n <li className={cn('', className)} {...props} />\n ),\n img: ({ className, ...props }) => (\n <img\n {...props}\n loading=\"lazy\"\n className={cn('max-w-full rounded-md', className)}\n src={`${props.src}?raw=true`}\n />\n ),\n a: (props) => (\n <Link\n color=\"neutral\"\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n {...props}\n />\n ),\n pre: (props) => props.children,\n table: (props) => <Table {...props} />,\n\n th: ({ className, ...props }) => (\n <th\n className={cn(\n 'border-neutral bg-neutral/10 border-b p-4',\n className\n )}\n {...props}\n />\n ),\n tr: ({ className, ...props }) => (\n <tr\n className={cn('hover:bg-neutral/10 hover:/10', className)}\n {...props}\n />\n ),\n td: ({ className, ...props }) => (\n <td\n className={cn('border-b border-neutral-500/50 p-4', className)}\n {...props}\n />\n ),\n ...overrides,\n },\n ...restOptions,\n }}\n >\n {cleanMarkdown ?? ''}\n </Markdown>\n </CodeProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAsBA,MAAM,mBAAmB,CAAC,aAA6B;AACrD,QAAM,QAAQ,SAAS,MAAM,OAAO;AAGpC,QAAM,oBAAoB,MAAM,KAAK,CAAC,SAAS,KAAK,KAAA,MAAW,EAAE;AAEjE,MAAI,CAAC,qBAAqB,kBAAkB,KAAA,MAAW,OAAO;AAE5D,WAAO;AAAA,EACT;AAEA,MAAI,kBAAkB;AACtB,MAAI,qBAAqB;AAEzB,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,UAAM,cAAc,MAAM,CAAC,EAAE,KAAA;AAG7B,QAAI,gBAAgB,OAAO;AACzB,UAAI,CAAC,iBAAiB;AAEpB,0BAAkB;AAClB;AAAA,MACF,OAAO;AAEL,6BAAqB;AACrB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,MAAI,qBAAqB,IAAI;AAE3B,WAAO,MAAM,MAAM,qBAAqB,CAAC,EAAE,KAAK,IAAI;AAAA,EACtD;AAGA,SAAO;AACT;AAEO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,WAAW,GAAG,YAAA,IAAgB,WAAW,CAAA;AAGjD,QAAM,gBAAgB,iBAAiB,QAAQ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,CAAC,EAAE,WAAW,GAAG,YACpB;AAAA,YAAC;AAAA,YAAA;AAAA,cACE,GAAG;AAAA,cACJ,SAAQ;AAAA,cACR,WAAW,GAAG,yBAAyB,SAAS;AAAA,cAChD,KAAK,GAAG,MAAM,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGrB,GAAG,CAAC,UACF;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,OAAM;AAAA,cACN,gBAAgB,MAAM,MAAM,WAAW,MAAM;AAAA,cAC7C,YAAY;AAAA,cACZ;AAAA,cACC,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,KAAK,CAAC,UAAU,MAAM;AAAA,UACtB,OAAO,CAAC,UAAU,oBAAC,OAAA,EAAO,GAAG,OAAO;AAAA,UAEpC,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cAAA;AAAA,cAED,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,iCAAiC,SAAS;AAAA,cACvD,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,sCAAsC,SAAS;AAAA,cAC5D,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,GAAG;AAAA,QAAA;AAAA,QAEL,GAAG;AAAA,MAAA;AAAA,MAGJ,UAAA,iBAAiB;AAAA,IAAA;AAAA,EAAA,GAEtB;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/MarkDownRender/index.tsx"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport Markdown, { type MarkdownToJSX } from 'markdown-to-jsx';\nimport type { FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { H1, H2, H3, H4 } from '../Headers';\nimport { Code } from '../IDE/Code';\nimport { CodeProvider } from '../IDE/CodeContext';\nimport { Link } from '../Link';\nimport { Table } from '../Table';\n\ntype MarkdownRendererProps = {\n children: string;\n isDarkMode?: boolean;\n locale?: LocalesValues;\n options?: MarkdownToJSX.Options;\n};\n\n/**\n * Removes frontmatter from markdown content\n * Frontmatter is the YAML metadata block at the beginning of markdown files\n * delimited by --- at the start and end\n */\nconst stripFrontmatter = (markdown: string): string => {\n const lines = markdown.split(/\\r?\\n/);\n\n // Check if the very first non-empty line is the metadata start delimiter\n const firstNonEmptyLine = lines.find((line) => line.trim() !== '');\n\n if (!firstNonEmptyLine || firstNonEmptyLine.trim() !== '---') {\n // No frontmatter, return original content\n return markdown;\n }\n\n let inMetadataBlock = false;\n let endOfMetadataIndex = -1;\n\n for (let i = 0; i < lines.length; i++) {\n const trimmedLine = lines[i].trim();\n\n // Toggle metadata block on encountering the delimiter\n if (trimmedLine === '---') {\n if (!inMetadataBlock) {\n // Begin metadata block\n inMetadataBlock = true;\n continue;\n } else {\n // End of metadata block\n endOfMetadataIndex = i;\n break;\n }\n }\n }\n\n if (endOfMetadataIndex > -1) {\n // Return content after the frontmatter\n return lines.slice(endOfMetadataIndex + 1).join('\\n');\n }\n\n // If we couldn't find the end delimiter, return original content\n return markdown;\n};\n\nexport const MarkdownRenderer: FC<MarkdownRendererProps> = ({\n children,\n isDarkMode,\n locale,\n options,\n}) => {\n const { overrides, ...restOptions } = options ?? {};\n\n // Strip frontmatter from the markdown content before rendering\n const cleanMarkdown = stripFrontmatter(children);\n\n return (\n <CodeProvider>\n <Markdown\n options={{\n overrides: {\n h1: (props) => <H1 isClickable={true} {...props} />,\n h2: (props) => <H2 isClickable={true} {...props} />,\n h3: (props) => <H3 isClickable={true} {...props} />,\n h4: (props) => <H4 isClickable={true} {...props} />,\n\n code: (props) =>\n typeof props.className === 'undefined' ? (\n <strong className=\"bg-card/60 rounded p-1 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {props.children}\n </strong>\n ) : (\n <Code\n isDarkMode={isDarkMode}\n language={props.className?.replace('lang-', '')}\n {...props}\n />\n ),\n\n blockquote: ({ className, ...props }) => (\n <blockquote\n className={cn(\n 'border-card text-neutral mt-5 flex flex-col gap-3 border-l-4 pl-5',\n className\n )}\n {...props}\n />\n ),\n ul: ({ className, ...props }) => (\n <ul\n className={cn(\n 'mt-5 flex flex-col gap-3 pl-5 list-disc',\n className\n )}\n {...props}\n />\n ),\n ol: ({ className, ...props }) => (\n <ol\n className={cn(\n 'mt-5 flex flex-col gap-3 pl-5 list-decimal',\n className\n )}\n {...props}\n />\n ),\n li: ({ className, ...props }) => (\n <li className={cn('', className)} {...props} />\n ),\n img: ({ className, ...props }) => (\n <img\n {...props}\n loading=\"lazy\"\n className={cn('max-w-full rounded-md', className)}\n src={`${props.src}?raw=true`}\n />\n ),\n a: (props) => (\n <Link\n color=\"neutral\"\n isExternalLink={props.href?.startsWith('http')}\n underlined={true}\n locale={locale}\n {...props}\n />\n ),\n pre: (props) => props.children,\n table: (props) => <Table {...props} />,\n\n th: ({ className, ...props }) => (\n <th\n className={cn(\n 'border-neutral bg-neutral/10 border-b p-4',\n className\n )}\n {...props}\n />\n ),\n tr: ({ className, ...props }) => (\n <tr\n className={cn('hover:bg-neutral/10 hover:/10', className)}\n {...props}\n />\n ),\n td: ({ className, ...props }) => (\n <td\n className={cn('border-b border-neutral-500/50 p-4', className)}\n {...props}\n />\n ),\n hr: ({ className, ...props }) => (\n <hr\n className={cn('mt-16 mx-6 text-neutral', className)}\n {...props}\n />\n ),\n ...overrides,\n },\n ...restOptions,\n }}\n >\n {cleanMarkdown ?? ''}\n </Markdown>\n </CodeProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAsBA,MAAM,mBAAmB,CAAC,aAA6B;AACrD,QAAM,QAAQ,SAAS,MAAM,OAAO;AAGpC,QAAM,oBAAoB,MAAM,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AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cAAA;AAAA,cAED,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,iCAAiC,SAAS;AAAA,cACvD,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,sCAAsC,SAAS;AAAA,cAC5D,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,IAAI,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW,GAAG,2BAA2B,SAAS;AAAA,cACjD,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGR,GAAG;AAAA,QAAA;AAAA,QAEL,GAAG;AAAA,MAAA;AAAA,MAGJ,UAAA,iBAAiB;AAAA,IAAA;AAAA,EAAA,GAEtB;AAEJ;"}
@@ -50,7 +50,7 @@ const Modal = ({
50
50
  children,
51
51
  isOpen,
52
52
  container,
53
- disableScroll = false,
53
+ disableScroll = true,
54
54
  onClose,
55
55
  hasCloseButton = false,
56
56
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.cjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { ReactNode, type FC } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\nexport enum ModalSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n UNSET = 'unset',\n}\n\ntype ModalProps = {\n children: ReactNode;\n isOpen: boolean;\n onClose?: () => void;\n container?: HTMLElement;\n disableScroll?: boolean;\n hasCloseButton?: boolean;\n title?: string;\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\nconst modalVariants = cva(\n 'cursor-default overflow-auto py-3 shadow-sm justify-center',\n {\n variants: {\n size: {\n sm: 'h-auto max-h-[30vh] w-[95vw] max-w-xl',\n md: 'h-auto max-h-[50vh] w-[95vw] max-w-xl',\n lg: 'h-auto max-h-[70vh] w-[95vw] max-w-2xl',\n xl: 'h-auto max-h-[95vh] w-[95vw] max-w-6xl',\n unset: 'h-auto max-h-[95vh] w-[95vw]',\n },\n },\n defaultVariants: {\n size: 'unset',\n },\n }\n);\n\nconst MotionModal = m.create(Container);\n\n/**\n * Usage example:\n * ```jsx\n * <Modal isOpen={isOpen} onClose={onClose}>\n * Modal content\n * </Modal>\n * ```\n */\nexport const Modal: FC<ModalProps> = ({\n children,\n isOpen,\n container,\n disableScroll = false,\n onClose,\n hasCloseButton = false,\n title,\n size = ModalSize.MD,\n className,\n ...props\n}) => {\n const containerElement = useGetElementOrWindow(container);\n\n useScrollBlockage({ key: 'modal', disableScroll: isOpen && disableScroll });\n\n if (!containerElement) return <></>;\n\n const hasTitle = typeof title === 'string';\n\n return createPortal(\n <m.div\n className=\"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur\"\n animate={isOpen ? 'visible' : 'invisible'}\n variants={{\n visible: {\n opacity: 1,\n visibility: 'visible',\n transition: { duration: 0.1, when: 'beforeChildren' },\n },\n invisible: {\n opacity: 0,\n visibility: 'hidden',\n transition: { duration: 0.1, when: 'afterChildren' },\n },\n }}\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n aria-hidden={!isOpen}\n >\n <div className=\"flex justify-center p-4\">\n <MotionModal\n onClick={(e) => e.stopPropagation()}\n initial={{ scale: isOpen ? 0.5 : 1 }}\n animate={{ scale: isOpen ? 1 : 0.5 }}\n transition={{ duration: 0.3 }}\n className={modalVariants({\n size,\n className,\n })}\n role=\"dialog\"\n aria-modal\n roundedSize=\"2xl\"\n {...props}\n >\n <div\n className={cn(\n 'cursor-default px-4',\n hasCloseButton && hasTitle\n ? `flex items-center justify-center`\n : hasCloseButton\n ? `flex items-center justify-end`\n : hasTitle\n ? `items-center`\n : `hidden`\n )}\n >\n {hasTitle && (\n <H3 className=\"ml-4 flex items-center justify-center text-lg font-bold\">\n {title}\n </H3>\n )}\n {hasCloseButton && (\n <Button\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n label=\"Close modal\"\n className=\"ml-auto\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n Icon={X}\n size={ButtonSize.ICON_MD}\n />\n )}\n </div>\n <div className=\"flex flex-1 flex-col items-center overflow-auto\">\n {children}\n </div>\n </MotionModal>\n </div>\n </m.div>,\n containerElement\n );\n};\n"],"names":["ModalSize","cva","m","Container","useGetElementOrWindow","useScrollBlockage","jsx","Fragment","createPortal","jsxs","cn","H3","Button","ButtonVariant","ButtonColor","X","ButtonSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaO,IAAK,8BAAAA,eAAL;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,OAAA,IAAQ;AALE,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AA8BZ,MAAM,gBAAgBC,uBAAAA;AAAAA,EACpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,OAAO;A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AAA;AAAA,YAC/B,YAAY,EAAE,UAAU,IAAA;AAAA,YACxB,WAAW,cAAc;AAAA,cACvB;AAAA,cACA;AAAA,YAAA,CACD;AAAA,YACD,MAAK;AAAA,YACL,cAAU;AAAA,YACV,aAAY;AAAA,YACX,GAAG;AAAA,YAEJ,UAAA;AAAA,cAAAA,2BAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWC,SAAAA;AAAAA,oBACT;AAAA,oBACA,kBAAkB,WACd,qCACA,iBACE,kCACA,WACE,iBACA;AAAA,kBAAA;AAAA,kBAGT,UAAA;AAAA,oBAAA,YACCJ,2BAAAA,IAACK,6BAAA,EAAG,WAAU,2DACX,UAAA,OACH;AAAA,oBAED,kBACCL,2BAAAA;AAAAA,sBAACM,yBAAAA;AAAAA,sBAAA;AAAA,wBACC,SAASC,yBAAAA,cAAc;AAAA,wBACvB,OAAOC,yBAAAA,YAAY;AAAA,wBACnB,OAAM;AAAA,wBACN,WAAU;AAAA,wBACV,SAAS,CAAC,MAAM;AACd,4BAAE,gBAAA;AACF,oCAAA;AAAA,wBACF;AAAA,wBACA,MAAMC,YAAAA;AAAAA,wBACN,MAAMC,yBAAAA,WAAW;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACnB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGJV,2BAAAA,IAAC,OAAA,EAAI,WAAU,mDACZ,SAAA,CACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AAEJ;;;"}
1
+ {"version":3,"file":"Modal.cjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { ReactNode, type FC } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\nexport enum ModalSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n UNSET = 'unset',\n}\n\ntype ModalProps = {\n children: ReactNode;\n isOpen: boolean;\n onClose?: () => void;\n container?: HTMLElement;\n disableScroll?: boolean;\n hasCloseButton?: boolean;\n title?: string;\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\nconst modalVariants = cva(\n 'cursor-default overflow-auto py-3 shadow-sm justify-center',\n {\n variants: {\n size: {\n sm: 'h-auto max-h-[30vh] w-[95vw] max-w-xl',\n md: 'h-auto max-h-[50vh] w-[95vw] max-w-xl',\n lg: 'h-auto max-h-[70vh] w-[95vw] max-w-2xl',\n xl: 'h-auto max-h-[95vh] w-[95vw] max-w-6xl',\n unset: 'h-auto max-h-[95vh] w-[95vw]',\n },\n },\n defaultVariants: {\n size: 'unset',\n },\n }\n);\n\nconst MotionModal = m.create(Container);\n\n/**\n * Usage example:\n * ```jsx\n * <Modal isOpen={isOpen} onClose={onClose}>\n * Modal content\n * </Modal>\n * ```\n */\nexport const Modal: FC<ModalProps> = ({\n children,\n isOpen,\n container,\n disableScroll = true,\n onClose,\n hasCloseButton = false,\n title,\n size = ModalSize.MD,\n className,\n ...props\n}) => {\n const containerElement = useGetElementOrWindow(container);\n\n useScrollBlockage({ key: 'modal', disableScroll: isOpen && disableScroll });\n\n if (!containerElement) return <></>;\n\n const hasTitle = typeof title === 'string';\n\n return createPortal(\n <m.div\n className=\"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur\"\n animate={isOpen ? 'visible' : 'invisible'}\n variants={{\n visible: {\n opacity: 1,\n visibility: 'visible',\n transition: { duration: 0.1, when: 'beforeChildren' },\n },\n invisible: {\n opacity: 0,\n visibility: 'hidden',\n transition: { duration: 0.1, when: 'afterChildren' },\n },\n }}\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n aria-hidden={!isOpen}\n >\n <div className=\"flex justify-center p-4\">\n <MotionModal\n onClick={(e) => e.stopPropagation()}\n initial={{ scale: isOpen ? 0.5 : 1 }}\n animate={{ scale: isOpen ? 1 : 0.5 }}\n transition={{ duration: 0.3 }}\n className={modalVariants({\n size,\n className,\n })}\n role=\"dialog\"\n aria-modal\n roundedSize=\"2xl\"\n {...props}\n >\n <div\n className={cn(\n 'cursor-default px-4',\n hasCloseButton && hasTitle\n ? `flex items-center justify-center`\n : hasCloseButton\n ? `flex items-center justify-end`\n : hasTitle\n ? `items-center`\n : `hidden`\n )}\n >\n {hasTitle && (\n <H3 className=\"ml-4 flex items-center justify-center text-lg font-bold\">\n {title}\n </H3>\n )}\n {hasCloseButton && (\n <Button\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n label=\"Close modal\"\n className=\"ml-auto\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n Icon={X}\n size={ButtonSize.ICON_MD}\n />\n )}\n </div>\n <div className=\"flex flex-1 flex-col items-center overflow-auto\">\n {children}\n </div>\n </MotionModal>\n </div>\n </m.div>,\n containerElement\n );\n};\n"],"names":["ModalSize","cva","m","Container","useGetElementOrWindow","useScrollBlockage","jsx","Fragment","createPortal","jsxs","cn","H3","Button","ButtonVariant","ButtonColor","X","ButtonSize"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaO,IAAK,8BAAAA,eAAL;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,OAAA,IAAQ;AALE,SAAAA;AAAA,GAAA,aAAA,CAAA,CAAA;AA8BZ,MAAM,gBAAgBC,uBA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A,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,CAAC,MAAM,EAAE,gBAAA;AAAA,YAClB,SAAS,EAAE,OAAO,SAAS,MAAM,EAAA;AAAA,YACjC,SAAS,EAAE,OAAO,SAAS,IAAI,IAAA;AAAA,YAC/B,YAAY,EAAE,UAAU,IAAA;AAAA,YACxB,WAAW,cAAc;AAAA,cACvB;AAAA,cACA;AAAA,YAAA,CACD;AAAA,YACD,MAAK;AAAA,YACL,cAAU;AAAA,YACV,aAAY;AAAA,YACX,GAAG;AAAA,YAEJ,UAAA;AAAA,cAAAA,2BAAAA;AAAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWC,SAAAA;AAAAA,oBACT;AAAA,oBACA,kBAAkB,WACd,qCACA,iBACE,kCACA,WACE,iBACA;AAAA,kBAAA;AAAA,kBAGT,UAAA;AAAA,oBAAA,YACCJ,2BAAAA,IAACK,6BAAA,EAAG,WAAU,2DACX,UAAA,OACH;AAAA,oBAED,kBACCL,2BAAAA;AAAAA,sBAACM,yBAAAA;AAAAA,sBAAA;AAAA,wBACC,SAASC,yBAAAA,cAAc;AAAA,wBACvB,OAAOC,yBAAAA,YAAY;AAAA,wBACnB,OAAM;AAAA,wBACN,WAAU;AAAA,wBACV,SAAS,CAAC,MAAM;AACd,4BAAE,gBAAA;AACF,oCAAA;AAAA,wBACF;AAAA,wBACA,MAAMC,YAAAA;AAAAA,wBACN,MAAMC,yBAAAA,WAAW;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACnB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGJV,2BAAAA,IAAC,OAAA,EAAI,WAAU,mDACZ,SAAA,CACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AAEJ;;;"}
@@ -48,7 +48,7 @@ const Modal = ({
48
48
  children,
49
49
  isOpen,
50
50
  container,
51
- disableScroll = false,
51
+ disableScroll = true,
52
52
  onClose,
53
53
  hasCloseButton = false,
54
54
  title,
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.mjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { ReactNode, type FC } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\nexport enum ModalSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n UNSET = 'unset',\n}\n\ntype ModalProps = {\n children: ReactNode;\n isOpen: boolean;\n onClose?: () => void;\n container?: HTMLElement;\n disableScroll?: boolean;\n hasCloseButton?: boolean;\n title?: string;\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\nconst modalVariants = cva(\n 'cursor-default overflow-auto py-3 shadow-sm justify-center',\n {\n variants: {\n size: {\n sm: 'h-auto max-h-[30vh] w-[95vw] max-w-xl',\n md: 'h-auto max-h-[50vh] w-[95vw] max-w-xl',\n lg: 'h-auto max-h-[70vh] w-[95vw] max-w-2xl',\n xl: 'h-auto max-h-[95vh] w-[95vw] max-w-6xl',\n unset: 'h-auto max-h-[95vh] w-[95vw]',\n },\n },\n defaultVariants: {\n size: 'unset',\n },\n }\n);\n\nconst MotionModal = m.create(Container);\n\n/**\n * Usage example:\n * ```jsx\n * <Modal isOpen={isOpen} onClose={onClose}>\n * Modal content\n * </Modal>\n * ```\n */\nexport const Modal: FC<ModalProps> = ({\n children,\n isOpen,\n container,\n disableScroll = false,\n onClose,\n hasCloseButton = false,\n title,\n size = ModalSize.MD,\n className,\n ...props\n}) => {\n const containerElement = useGetElementOrWindow(container);\n\n useScrollBlockage({ key: 'modal', disableScroll: isOpen && disableScroll });\n\n if (!containerElement) return <></>;\n\n const hasTitle = typeof title === 'string';\n\n return createPortal(\n <m.div\n className=\"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur\"\n animate={isOpen ? 'visible' : 'invisible'}\n variants={{\n visible: {\n opacity: 1,\n visibility: 'visible',\n transition: { duration: 0.1, when: 'beforeChildren' },\n },\n invisible: {\n opacity: 0,\n visibility: 'hidden',\n transition: { duration: 0.1, when: 'afterChildren' },\n },\n }}\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n aria-hidden={!isOpen}\n >\n <div className=\"flex justify-center p-4\">\n <MotionModal\n onClick={(e) => e.stopPropagation()}\n initial={{ scale: isOpen ? 0.5 : 1 }}\n animate={{ scale: isOpen ? 1 : 0.5 }}\n transition={{ duration: 0.3 }}\n className={modalVariants({\n size,\n className,\n })}\n role=\"dialog\"\n aria-modal\n roundedSize=\"2xl\"\n {...props}\n >\n <div\n className={cn(\n 'cursor-default px-4',\n hasCloseButton && hasTitle\n ? `flex items-center justify-center`\n : hasCloseButton\n ? `flex items-center justify-end`\n : hasTitle\n ? `items-center`\n : `hidden`\n )}\n >\n {hasTitle && (\n <H3 className=\"ml-4 flex items-center justify-center text-lg font-bold\">\n {title}\n </H3>\n )}\n {hasCloseButton && (\n <Button\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n label=\"Close modal\"\n className=\"ml-auto\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n Icon={X}\n size={ButtonSize.ICON_MD}\n />\n )}\n </div>\n <div className=\"flex flex-1 flex-col items-center overflow-auto\">\n {children}\n </div>\n </MotionModal>\n </div>\n </m.div>,\n containerElement\n );\n};\n"],"names":["ModalSize","m"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaO,IAAK,8B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;AACF,oBAAA;AAAA,QACF;AAAA,QACA,eAAa,CAAC;AAAA,QAEd,UAAA,oBAAC,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,SAAS,CAAC,MAAM,EAAE,gBAAA;AAAA,YAClB,SAAS,EAAE,OAAO,SAAS,MAAM,EAAA;AAAA,YACjC,SAAS,EAAE,OAAO,SAAS,IAAI,IAAA;AAAA,YAC/B,YAAY,EAAE,UAAU,IAAA;AAAA,YACxB,WAAW,cAAc;AAAA,cACvB;AAAA,cACA;AAAA,YAAA,CACD;AAAA,YACD,MAAK;AAAA,YACL,cAAU;AAAA,YACV,aAAY;AAAA,YACX,GAAG;AAAA,YAEJ,UAAA;AAAA,cAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,kBAAkB,WACd,qCACA,iBACE,kCACA,WACE,iBACA;AAAA,kBAAA;AAAA,kBAGT,UAAA;AAAA,oBAAA,YACC,oBAAC,IAAA,EAAG,WAAU,2DACX,UAAA,OACH;AAAA,oBAED,kBACC;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,SAAS,cAAc;AAAA,wBACvB,OAAO,YAAY;AAAA,wBACnB,OAAM;AAAA,wBACN,WAAU;AAAA,wBACV,SAAS,CAAC,MAAM;AACd,4BAAE,gBAAA;AACF,oCAAA;AAAA,wBACF;AAAA,wBACA,MAAM;AAAA,wBACN,MAAM,WAAW;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACnB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGJ,oBAAC,OAAA,EAAI,WAAU,mDACZ,SAAA,CACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"Modal.mjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["'use client';\n\nimport { cva } from 'class-variance-authority';\nimport { motion as m } from 'framer-motion';\nimport { X } from 'lucide-react';\nimport { ReactNode, type FC } from 'react';\nimport { createPortal } from 'react-dom';\nimport { useGetElementOrWindow, useScrollBlockage } from '../../hooks/index';\nimport { cn } from '../../utils/cn';\nimport { Button, ButtonColor, ButtonSize, ButtonVariant } from '../Button';\nimport { Container, type ContainerProps } from '../Container';\nimport { H3 } from '../Headers';\n\nexport enum ModalSize {\n SM = 'sm',\n MD = 'md',\n LG = 'lg',\n XL = 'xl',\n UNSET = 'unset',\n}\n\ntype ModalProps = {\n children: ReactNode;\n isOpen: boolean;\n onClose?: () => void;\n container?: HTMLElement;\n disableScroll?: boolean;\n hasCloseButton?: boolean;\n title?: string;\n size?: ModalSize | `${ModalSize}`;\n} & Pick<\n ContainerProps,\n | 'className'\n | 'transparency'\n | 'border'\n | 'background'\n | 'roundedSize'\n | 'borderColor'\n | 'padding'\n | 'separator'\n | 'gap'\n>;\n\nconst modalVariants = cva(\n 'cursor-default overflow-auto py-3 shadow-sm justify-center',\n {\n variants: {\n size: {\n sm: 'h-auto max-h-[30vh] w-[95vw] max-w-xl',\n md: 'h-auto max-h-[50vh] w-[95vw] max-w-xl',\n lg: 'h-auto max-h-[70vh] w-[95vw] max-w-2xl',\n xl: 'h-auto max-h-[95vh] w-[95vw] max-w-6xl',\n unset: 'h-auto max-h-[95vh] w-[95vw]',\n },\n },\n defaultVariants: {\n size: 'unset',\n },\n }\n);\n\nconst MotionModal = m.create(Container);\n\n/**\n * Usage example:\n * ```jsx\n * <Modal isOpen={isOpen} onClose={onClose}>\n * Modal content\n * </Modal>\n * ```\n */\nexport const Modal: FC<ModalProps> = ({\n children,\n isOpen,\n container,\n disableScroll = true,\n onClose,\n hasCloseButton = false,\n title,\n size = ModalSize.MD,\n className,\n ...props\n}) => {\n const containerElement = useGetElementOrWindow(container);\n\n useScrollBlockage({ key: 'modal', disableScroll: isOpen && disableScroll });\n\n if (!containerElement) return <></>;\n\n const hasTitle = typeof title === 'string';\n\n return createPortal(\n <m.div\n className=\"bg-background/40 /40 invisible fixed left-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-auto backdrop-blur\"\n animate={isOpen ? 'visible' : 'invisible'}\n variants={{\n visible: {\n opacity: 1,\n visibility: 'visible',\n transition: { duration: 0.1, when: 'beforeChildren' },\n },\n invisible: {\n opacity: 0,\n visibility: 'hidden',\n transition: { duration: 0.1, when: 'afterChildren' },\n },\n }}\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n aria-hidden={!isOpen}\n >\n <div className=\"flex justify-center p-4\">\n <MotionModal\n onClick={(e) => e.stopPropagation()}\n initial={{ scale: isOpen ? 0.5 : 1 }}\n animate={{ scale: isOpen ? 1 : 0.5 }}\n transition={{ duration: 0.3 }}\n className={modalVariants({\n size,\n className,\n })}\n role=\"dialog\"\n aria-modal\n roundedSize=\"2xl\"\n {...props}\n >\n <div\n className={cn(\n 'cursor-default px-4',\n hasCloseButton && hasTitle\n ? `flex items-center justify-center`\n : hasCloseButton\n ? `flex items-center justify-end`\n : hasTitle\n ? `items-center`\n : `hidden`\n )}\n >\n {hasTitle && (\n <H3 className=\"ml-4 flex items-center justify-center text-lg font-bold\">\n {title}\n </H3>\n )}\n {hasCloseButton && (\n <Button\n variant={ButtonVariant.HOVERABLE}\n color={ButtonColor.TEXT}\n label=\"Close modal\"\n className=\"ml-auto\"\n onClick={(e) => {\n e.stopPropagation();\n onClose?.();\n }}\n Icon={X}\n size={ButtonSize.ICON_MD}\n />\n )}\n </div>\n <div className=\"flex flex-1 flex-col items-center overflow-auto\">\n {children}\n </div>\n </MotionModal>\n </div>\n </m.div>,\n containerElement\n );\n};\n"],"names":["ModalSize","m"],"mappings":";;;;;;;;;;;;;;;;;;;;AAaO,IAAK,8BAAAA,eAAL;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,IAAA,IAAK;AACLA,aAAA,OAAA,IAAQ;AALE,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AAS,CAAC,MAAM,EAAE,gBAAA;AAAA,YAClB,SAAS,EAAE,OAAO,SAAS,MAAM,EAAA;AAAA,YACjC,SAAS,EAAE,OAAO,SAAS,IAAI,IAAA;AAAA,YAC/B,YAAY,EAAE,UAAU,IAAA;AAAA,YACxB,WAAW,cAAc;AAAA,cACvB;AAAA,cACA;AAAA,YAAA,CACD;AAAA,YACD,MAAK;AAAA,YACL,cAAU;AAAA,YACV,aAAY;AAAA,YACX,GAAG;AAAA,YAEJ,UAAA;AAAA,cAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,kBAAkB,WACd,qCACA,iBACE,kCACA,WACE,iBACA;AAAA,kBAAA;AAAA,kBAGT,UAAA;AAAA,oBAAA,YACC,oBAAC,IAAA,EAAG,WAAU,2DACX,UAAA,OACH;AAAA,oBAED,kBACC;AAAA,sBAAC;AAAA,sBAAA;AAAA,wBACC,SAAS,cAAc;AAAA,wBACvB,OAAO,YAAY;AAAA,wBACnB,OAAM;AAAA,wBACN,WAAU;AAAA,wBACV,SAAS,CAAC,MAAM;AACd,4BAAE,gBAAA;AACF,oCAAA;AAAA,wBACF;AAAA,wBACA,MAAM;AAAA,wBACN,MAAM,WAAW;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBACnB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGJ,oBAAC,OAAA,EAAI,WAAU,mDACZ,SAAA,CACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,EACF,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF;AAAA,EAAA;AAEJ;"}
@@ -15,7 +15,7 @@ const DesktopNavbar = ({
15
15
  components_TabSelector_TabSelector.TabSelector,
16
16
  {
17
17
  selectedChoice,
18
- className: "text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[10vw] lg:gap-6",
18
+ className: "text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[5vw] lg:gap-3 xl:ml-[10vw] xl:gap-6",
19
19
  tabs: sections,
20
20
  hoverable: true,
21
21
  color: components_TabSelector_TabSelector.TabSelectorColor.TEXT
@@ -1 +1 @@
1
- {"version":3,"file":"DesktopNavbar.cjs","sources":["../../../src/components/Navbar/DesktopNavbar.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { type TabProps, TabSelector, TabSelectorColor } from '../TabSelector';\n\ntype DesktopNavbarProps<T extends TabProps> = {\n logo: ReactNode;\n sections: ReactElement<T>[];\n rightItems?: ReactNode;\n selectedChoice: T['key'];\n};\n\nexport const DesktopNavbar = <T extends TabProps>({\n logo,\n sections,\n rightItems,\n selectedChoice,\n}: DesktopNavbarProps<T>) => {\n return (\n <nav className=\"bg-card/80 sticky top-0 z-50 flex w-full items-center px-4 py-3 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {logo}\n\n <TabSelector\n selectedChoice={selectedChoice}\n className=\"text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[10vw] lg:gap-6\"\n tabs={sections}\n hoverable\n color={TabSelectorColor.TEXT}\n />\n\n <div className=\"mr-4 flex items-center justify-end gap-2 md:gap-4\">\n {rightItems}\n </div>\n </nav>\n );\n};\n"],"names":["jsxs","jsx","TabSelector","TabSelectorColor"],"mappings":";;;;;AAaO,MAAM,gBAAgB,CAAqB;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,SACEA,2BAAAA,KAAC,OAAA,EAAI,WAAU,yHACZ,UAAA;AAAA,IAAA;AAAA,IAEDC,2BAAAA;AAAAA,MAACC,mCAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,MAAM;AAAA,QACN,WAAS;AAAA,QACT,OAAOC,mCAAAA,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG1BF,2BAAAA,IAAC,OAAA,EAAI,WAAU,qDACZ,UAAA,WAAA,CACH;AAAA,EAAA,GACF;AAEJ;;"}
1
+ {"version":3,"file":"DesktopNavbar.cjs","sources":["../../../src/components/Navbar/DesktopNavbar.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { type TabProps, TabSelector, TabSelectorColor } from '../TabSelector';\n\ntype DesktopNavbarProps<T extends TabProps> = {\n logo: ReactNode;\n sections: ReactElement<T>[];\n rightItems?: ReactNode;\n selectedChoice: T['key'];\n};\n\nexport const DesktopNavbar = <T extends TabProps>({\n logo,\n sections,\n rightItems,\n selectedChoice,\n}: DesktopNavbarProps<T>) => {\n return (\n <nav className=\"bg-card/80 sticky top-0 z-50 flex w-full items-center px-4 py-3 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {logo}\n\n <TabSelector\n selectedChoice={selectedChoice}\n className=\"text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[5vw] lg:gap-3 xl:ml-[10vw] xl:gap-6\"\n tabs={sections}\n hoverable\n color={TabSelectorColor.TEXT}\n />\n\n <div className=\"mr-4 flex items-center justify-end gap-2 md:gap-4\">\n {rightItems}\n </div>\n </nav>\n );\n};\n"],"names":["jsxs","jsx","TabSelector","TabSelectorColor"],"mappings":";;;;;AAaO,MAAM,gBAAgB,CAAqB;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,SACEA,2BAAAA,KAAC,OAAA,EAAI,WAAU,yHACZ,UAAA;AAAA,IAAA;AAAA,IAEDC,2BAAAA;AAAAA,MAACC,mCAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,MAAM;AAAA,QACN,WAAS;AAAA,QACT,OAAOC,mCAAAA,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG1BF,2BAAAA,IAAC,OAAA,EAAI,WAAU,qDACZ,UAAA,WAAA,CACH;AAAA,EAAA,GACF;AAEJ;;"}
@@ -13,7 +13,7 @@ const DesktopNavbar = ({
13
13
  TabSelector,
14
14
  {
15
15
  selectedChoice,
16
- className: "text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[10vw] lg:gap-6",
16
+ className: "text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[5vw] lg:gap-3 xl:ml-[10vw] xl:gap-6",
17
17
  tabs: sections,
18
18
  hoverable: true,
19
19
  color: TabSelectorColor.TEXT
@@ -1 +1 @@
1
- {"version":3,"file":"DesktopNavbar.mjs","sources":["../../../src/components/Navbar/DesktopNavbar.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { type TabProps, TabSelector, TabSelectorColor } from '../TabSelector';\n\ntype DesktopNavbarProps<T extends TabProps> = {\n logo: ReactNode;\n sections: ReactElement<T>[];\n rightItems?: ReactNode;\n selectedChoice: T['key'];\n};\n\nexport const DesktopNavbar = <T extends TabProps>({\n logo,\n sections,\n rightItems,\n selectedChoice,\n}: DesktopNavbarProps<T>) => {\n return (\n <nav className=\"bg-card/80 sticky top-0 z-50 flex w-full items-center px-4 py-3 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {logo}\n\n <TabSelector\n selectedChoice={selectedChoice}\n className=\"text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[10vw] lg:gap-6\"\n tabs={sections}\n hoverable\n color={TabSelectorColor.TEXT}\n />\n\n <div className=\"mr-4 flex items-center justify-end gap-2 md:gap-4\">\n {rightItems}\n </div>\n </nav>\n );\n};\n"],"names":[],"mappings":";;;AAaO,MAAM,gBAAgB,CAAqB;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,SACE,qBAAC,OAAA,EAAI,WAAU,yHACZ,UAAA;AAAA,IAAA;AAAA,IAED;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,MAAM;AAAA,QACN,WAAS;AAAA,QACT,OAAO,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG1B,oBAAC,OAAA,EAAI,WAAU,qDACZ,UAAA,WAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"DesktopNavbar.mjs","sources":["../../../src/components/Navbar/DesktopNavbar.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\n\nimport { type TabProps, TabSelector, TabSelectorColor } from '../TabSelector';\n\ntype DesktopNavbarProps<T extends TabProps> = {\n logo: ReactNode;\n sections: ReactElement<T>[];\n rightItems?: ReactNode;\n selectedChoice: T['key'];\n};\n\nexport const DesktopNavbar = <T extends TabProps>({\n logo,\n sections,\n rightItems,\n selectedChoice,\n}: DesktopNavbarProps<T>) => {\n return (\n <nav className=\"bg-card/80 sticky top-0 z-50 flex w-full items-center px-4 py-3 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur\">\n {logo}\n\n <TabSelector\n selectedChoice={selectedChoice}\n className=\"text-neutral ml-[2vw] gap-3 overflow-x-auto tracking-wide lg:ml-[5vw] lg:gap-3 xl:ml-[10vw] xl:gap-6\"\n tabs={sections}\n hoverable\n color={TabSelectorColor.TEXT}\n />\n\n <div className=\"mr-4 flex items-center justify-end gap-2 md:gap-4\">\n {rightItems}\n </div>\n </nav>\n );\n};\n"],"names":[],"mappings":";;;AAaO,MAAM,gBAAgB,CAAqB;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAA6B;AAC3B,SACE,qBAAC,OAAA,EAAI,WAAU,yHACZ,UAAA;AAAA,IAAA;AAAA,IAED;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAU;AAAA,QACV,MAAM;AAAA,QACN,WAAS;AAAA,QACT,OAAO,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,IAG1B,oBAAC,OAAA,EAAI,WAAU,qDACZ,UAAA,WAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
@@ -26,7 +26,7 @@ const Navbar = ({
26
26
  rightItemsMobile,
27
27
  selectedChoice
28
28
  }) => {
29
- const { isMobile } = hooks_useDevice.useDevice();
29
+ const { isMobile } = hooks_useDevice.useDevice("lg");
30
30
  const isMoUnted = hooks_useIsMounted.useIsMounted();
31
31
  if (!isMoUnted) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
32
32
  return isMobile ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Navbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport { useDevice, useIsMounted } from '../../hooks';\nimport type { TabProps } from '../TabSelector';\nimport { DesktopNavbar } from './DesktopNavbar';\nimport { MobileNavbar } from './MobileNavbar';\n\ntype NavbarProps<T extends TabProps> = {\n logo: ReactNode;\n selectedChoice: T['key'];\n desktopSections?: ReactElement<T>[];\n mobileTopChildren?: ReactNode;\n mobileTopSections?: ReactElement<T>[];\n mobileBottomChildren?: ReactNode;\n mobileBottomSections?: ReactElement<T>[];\n rightItemsDesktop?: ReactNode;\n rightItemsMobile?: ReactNode;\n};\n\nexport const Navbar = <T extends TabProps>({\n logo,\n mobileTopChildren,\n desktopSections = [],\n mobileTopSections = [],\n mobileBottomChildren,\n mobileBottomSections = [],\n rightItemsDesktop,\n rightItemsMobile,\n selectedChoice,\n}: NavbarProps<T>) => {\n const { isMobile } = useDevice();\n const isMoUnted = useIsMounted();\n\n if (!isMoUnted) return <></>;\n\n return isMobile ? (\n <MobileNavbar\n topChildren={mobileTopChildren}\n topSections={mobileTopSections}\n bottomChildren={mobileBottomChildren}\n bottomSections={mobileBottomSections}\n logo={logo}\n rightItems={rightItemsMobile}\n />\n ) : (\n <DesktopNavbar\n sections={desktopSections}\n rightItems={rightItemsDesktop}\n logo={logo}\n selectedChoice={selectedChoice}\n />\n );\n};\n"],"names":["useDevice","useIsMounted","jsx","Fragment","MobileNavbar","DesktopNavbar"],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAM,SAAS,CAAqB;AAAA,EACzC;AAAA,EACA;AAAA,EACA,kBAAkB,CAAA;AAAA,EAClB,oBAAoB,CAAA;AAAA,EACpB;AAAA,EACA,uBAAuB,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,MAAsB;AACpB,QAAM,EAAE,SAAA,IAAaA,0BAAA;AACrB,QAAM,YAAYC,mBAAAA,aAAA;AAElB,MAAI,CAAC,UAAW,QAAOC,+BAAAC,WAAAA,UAAA,CAAA,CAAE;AAEzB,SAAO,WACLD,2BAAAA;AAAAA,IAACE,+BAAAA;AAAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,EAAA,IAGdF,2BAAAA;AAAAA,IAACG,gCAAAA;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Navbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport { useDevice, useIsMounted } from '../../hooks';\nimport type { TabProps } from '../TabSelector';\nimport { DesktopNavbar } from './DesktopNavbar';\nimport { MobileNavbar } from './MobileNavbar';\n\ntype NavbarProps<T extends TabProps> = {\n logo: ReactNode;\n selectedChoice: T['key'];\n desktopSections?: ReactElement<T>[];\n mobileTopChildren?: ReactNode;\n mobileTopSections?: ReactElement<T>[];\n mobileBottomChildren?: ReactNode;\n mobileBottomSections?: ReactElement<T>[];\n rightItemsDesktop?: ReactNode;\n rightItemsMobile?: ReactNode;\n};\n\nexport const Navbar = <T extends TabProps>({\n logo,\n mobileTopChildren,\n desktopSections = [],\n mobileTopSections = [],\n mobileBottomChildren,\n mobileBottomSections = [],\n rightItemsDesktop,\n rightItemsMobile,\n selectedChoice,\n}: NavbarProps<T>) => {\n const { isMobile } = useDevice('lg');\n const isMoUnted = useIsMounted();\n\n if (!isMoUnted) return <></>;\n\n return isMobile ? (\n <MobileNavbar\n topChildren={mobileTopChildren}\n topSections={mobileTopSections}\n bottomChildren={mobileBottomChildren}\n bottomSections={mobileBottomSections}\n logo={logo}\n rightItems={rightItemsMobile}\n />\n ) : (\n <DesktopNavbar\n sections={desktopSections}\n rightItems={rightItemsDesktop}\n logo={logo}\n selectedChoice={selectedChoice}\n />\n );\n};\n"],"names":["useDevice","useIsMounted","jsx","Fragment","MobileNavbar","DesktopNavbar"],"mappings":";;;;;;;;;;;;;;;;;AAoBO,MAAM,SAAS,CAAqB;AAAA,EACzC;AAAA,EACA;AAAA,EACA,kBAAkB,CAAA;AAAA,EAClB,oBAAoB,CAAA;AAAA,EACpB;AAAA,EACA,uBAAuB,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,MAAsB;AACpB,QAAM,EAAE,SAAA,IAAaA,gBAAAA,UAAU,IAAI;AACnC,QAAM,YAAYC,mBAAAA,aAAA;AAElB,MAAI,CAAC,UAAW,QAAOC,+BAAAC,WAAAA,UAAA,CAAA,CAAE;AAEzB,SAAO,WACLD,2BAAAA;AAAAA,IAACE,+BAAAA;AAAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,EAAA,IAGdF,2BAAAA;AAAAA,IAACG,gCAAAA;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
@@ -24,7 +24,7 @@ const Navbar = ({
24
24
  rightItemsMobile,
25
25
  selectedChoice
26
26
  }) => {
27
- const { isMobile } = useDevice();
27
+ const { isMobile } = useDevice("lg");
28
28
  const isMoUnted = useIsMounted();
29
29
  if (!isMoUnted) return /* @__PURE__ */ jsx(Fragment, {});
30
30
  return isMobile ? /* @__PURE__ */ jsx(
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Navbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport { useDevice, useIsMounted } from '../../hooks';\nimport type { TabProps } from '../TabSelector';\nimport { DesktopNavbar } from './DesktopNavbar';\nimport { MobileNavbar } from './MobileNavbar';\n\ntype NavbarProps<T extends TabProps> = {\n logo: ReactNode;\n selectedChoice: T['key'];\n desktopSections?: ReactElement<T>[];\n mobileTopChildren?: ReactNode;\n mobileTopSections?: ReactElement<T>[];\n mobileBottomChildren?: ReactNode;\n mobileBottomSections?: ReactElement<T>[];\n rightItemsDesktop?: ReactNode;\n rightItemsMobile?: ReactNode;\n};\n\nexport const Navbar = <T extends TabProps>({\n logo,\n mobileTopChildren,\n desktopSections = [],\n mobileTopSections = [],\n mobileBottomChildren,\n mobileBottomSections = [],\n rightItemsDesktop,\n rightItemsMobile,\n selectedChoice,\n}: NavbarProps<T>) => {\n const { isMobile } = useDevice();\n const isMoUnted = useIsMounted();\n\n if (!isMoUnted) return <></>;\n\n return isMobile ? (\n <MobileNavbar\n topChildren={mobileTopChildren}\n topSections={mobileTopSections}\n bottomChildren={mobileBottomChildren}\n bottomSections={mobileBottomSections}\n logo={logo}\n rightItems={rightItemsMobile}\n />\n ) : (\n <DesktopNavbar\n sections={desktopSections}\n rightItems={rightItemsDesktop}\n logo={logo}\n selectedChoice={selectedChoice}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoBO,MAAM,SAAS,CAAqB;AAAA,EACzC;AAAA,EACA;AAAA,EACA,kBAAkB,CAAA;AAAA,EAClB,oBAAoB,CAAA;AAAA,EACpB;AAAA,EACA,uBAAuB,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,MAAsB;AACpB,QAAM,EAAE,SAAA,IAAa,UAAA;AACrB,QAAM,YAAY,aAAA;AAElB,MAAI,CAAC,UAAW,QAAO,oBAAA,UAAA,CAAA,CAAE;AAEzB,SAAO,WACL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,EAAA,IAGd;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Navbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode } from 'react';\nimport { useDevice, useIsMounted } from '../../hooks';\nimport type { TabProps } from '../TabSelector';\nimport { DesktopNavbar } from './DesktopNavbar';\nimport { MobileNavbar } from './MobileNavbar';\n\ntype NavbarProps<T extends TabProps> = {\n logo: ReactNode;\n selectedChoice: T['key'];\n desktopSections?: ReactElement<T>[];\n mobileTopChildren?: ReactNode;\n mobileTopSections?: ReactElement<T>[];\n mobileBottomChildren?: ReactNode;\n mobileBottomSections?: ReactElement<T>[];\n rightItemsDesktop?: ReactNode;\n rightItemsMobile?: ReactNode;\n};\n\nexport const Navbar = <T extends TabProps>({\n logo,\n mobileTopChildren,\n desktopSections = [],\n mobileTopSections = [],\n mobileBottomChildren,\n mobileBottomSections = [],\n rightItemsDesktop,\n rightItemsMobile,\n selectedChoice,\n}: NavbarProps<T>) => {\n const { isMobile } = useDevice('lg');\n const isMoUnted = useIsMounted();\n\n if (!isMoUnted) return <></>;\n\n return isMobile ? (\n <MobileNavbar\n topChildren={mobileTopChildren}\n topSections={mobileTopSections}\n bottomChildren={mobileBottomChildren}\n bottomSections={mobileBottomSections}\n logo={logo}\n rightItems={rightItemsMobile}\n />\n ) : (\n <DesktopNavbar\n sections={desktopSections}\n rightItems={rightItemsDesktop}\n logo={logo}\n selectedChoice={selectedChoice}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAoBO,MAAM,SAAS,CAAqB;AAAA,EACzC;AAAA,EACA;AAAA,EACA,kBAAkB,CAAA;AAAA,EAClB,oBAAoB,CAAA;AAAA,EACpB;AAAA,EACA,uBAAuB,CAAA;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF,MAAsB;AACpB,QAAM,EAAE,SAAA,IAAa,UAAU,IAAI;AACnC,QAAM,YAAY,aAAA;AAElB,MAAI,CAAC,UAAW,QAAO,oBAAA,UAAA,CAAA,CAAE;AAEzB,SAAO,WACL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAa;AAAA,MACb,aAAa;AAAA,MACb,gBAAgB;AAAA,MAChB,gBAAgB;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,IAAA;AAAA,EAAA,IAGd;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Popover/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\n\nexport type PopoverProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n identifier: string;\n};\n\nexport type PopoverType = FC<PopoverProps> & {\n Detail: FC<DetailProps>;\n};\n\n/**\n * Trigger allowing to open a popover menu.\n *\n * Example:\n * ```jsx\n * <Popover identifier=\"popover\">\n * Open popover\n *\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * > Note Popover.Trigger can be replaced by a button. Don't add a button inside the trigger.\n */\nexport const Popover: PopoverType = ({\n children,\n className,\n identifier,\n ...props\n}) => (\n <div\n className={cn('group/popover relative flex cursor-pointer', className)}\n aria-label={`Popover ${identifier}`}\n id={`unrollable-panel-button-${identifier}`}\n aria-haspopup\n {...props}\n >\n {children}\n </div>\n);\n\nexport type DetailProps = HTMLAttributes<HTMLDivElement> & {\n isFocusable?: boolean;\n isHidden?: boolean;\n isOverable?: boolean;\n identifier: string;\n xAlign?: PopoverXAlign;\n yAlign?: PopoverYAlign;\n displayArrow?: boolean;\n};\n\nexport enum PopoverXAlign {\n START = 'start',\n END = 'end',\n}\n\nexport enum PopoverYAlign {\n BELOW = 'bellow',\n ABOVE = 'above',\n}\n\n/**\n * Component that opens a popover menu when the trigger is clicked.\n *\n * Example:\n * ```jsx\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * ```\n */\nconst Detail: FC<DetailProps> = ({\n children,\n isHidden = undefined,\n isOverable = true,\n isFocusable = false,\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n identifier,\n className,\n displayArrow = true,\n ...props\n}) => (\n <Container\n transparency=\"sm\"\n aria-hidden={isHidden}\n aria-labelledby={`unrollable-panel-button-${identifier}`}\n id={`unrollable-panel-${identifier}`}\n className={cn(\n 'absolute z-[1000] min-w-full ring-neutral ring-1 rounded-md',\n\n /* Positioning */\n xAlign === 'start' && 'left-0',\n xAlign === 'end' && 'right-0',\n yAlign === 'bellow' && 'top-[calc(100%+1rem)]',\n yAlign === 'above' && 'bottom-[calc(100%+1rem)]',\n\n /* Arrow indicator */\n displayArrow &&\n 'before:absolute before:z-[999] before:content-[\"\"] before:w-0 before:h-0',\n\n /* Horizontal positioning */\n displayArrow && xAlign === 'start' && 'before:left-2',\n displayArrow && xAlign === 'end' && 'before:right-2',\n\n /* Arrow pointing up (when popover is below trigger) */\n displayArrow &&\n yAlign === 'bellow' &&\n 'before:-top-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral',\n\n /* Arrow pointing down (when popover is above trigger) */\n displayArrow &&\n yAlign === 'above' &&\n 'before:-bottom-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-t-[10px] before:border-t-neutral',\n\n /* Visibility management */\n 'overflow-x-visible transition-all duration-400 ease-in-out opacity-0',\n isHidden !== false ? 'invisible' : 'delay-800 visible opacity-100',\n isOverable &&\n 'group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800',\n isFocusable &&\n 'group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800',\n className\n )}\n {...props}\n >\n {children}\n </Container>\n);\n\nPopover.Detail = Detail;\n"],"names":["jsx","cn","PopoverXAlign","PopoverYAlign","Container"],"mappings":";;;;;AA+BO,MAAM,UAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAAA,GAAG,8CAA8C,SAAS;AAAA,IACrE,cAAY,WAAW,UAAU;AAAA,IACjC,IAAI,2BAA2B,UAAU;AAAA,IACzC,iBAAa;AAAA,IACZ,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAaK,IAAK,kCAAAC,mBAAL;AACLA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,KAAA,IAAM;AAFI,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAKL,IAAK,kCAAAC,mBAAL;AACLA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAeZ,MAAM,SAA0B,CAAC;AAAA,EAC/B;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MACEH,2BAAAA;AAAAA,EAACI,2BAAAA;AAAAA,EAAA;AAAA,IACC,cAAa;AAAA,IACb,eAAa;AAAA,IACb,mBAAiB,2BAA2B,UAAU;AAAA,IACtD,IAAI,oBAAoB,UAAU;AAAA,IAClC,WAAWH,SAAAA;AAAAA,MACT;AAAA;AAAA,MAGA,WAAW,WAAW;AAAA,MACtB,WAAW,SAAS;AAAA,MACpB,WAAW,YAAY;AAAA,MACvB,WAAW,WAAW;AAAA;AAAA,MAGtB,gBACE;AAAA;AAAA,MAGF,gBAAgB,WAAW,WAAW;AAAA,MACtC,gBAAgB,WAAW,SAAS;AAAA;AAAA,MAGpC,gBACE,WAAW,YACX;AAAA;AAAA,MAGF,gBACE,WAAW,WACX;AAAA;AAAA,MAGF;AAAA,MACA,aAAa,QAAQ,cAAc;AAAA,MACnC,cACE;AAAA,MACF,eACE;AAAA,MACF;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,QAAQ,SAAS;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Popover/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\n\nexport type PopoverProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n identifier: string;\n};\n\nexport type PopoverType = FC<PopoverProps> & {\n Detail: FC<DetailProps>;\n};\n\n/**\n * Trigger allowing to open a popover menu.\n *\n * Example:\n * ```jsx\n * <Popover identifier=\"popover\">\n * Open popover\n *\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * > Note Popover.Trigger can be replaced by a button. Don't add a button inside the trigger.\n */\nexport const Popover: PopoverType = ({\n children,\n className,\n identifier,\n ...props\n}) => (\n <div\n className={cn('group/popover relative flex cursor-pointer', className)}\n aria-label={`Popover ${identifier}`}\n id={`unrollable-panel-button-${identifier}`}\n aria-haspopup\n {...props}\n >\n {children}\n </div>\n);\n\nexport type DetailProps = HTMLAttributes<HTMLDivElement> & {\n isFocusable?: boolean;\n isHidden?: boolean;\n isOverable?: boolean;\n identifier: string;\n xAlign?: PopoverXAlign | `${PopoverXAlign}`;\n yAlign?: PopoverYAlign | `${PopoverYAlign}`;\n displayArrow?: boolean;\n};\n\nexport enum PopoverXAlign {\n START = 'start',\n END = 'end',\n}\n\nexport enum PopoverYAlign {\n BELOW = 'bellow',\n ABOVE = 'above',\n}\n\n/**\n * Component that opens a popover menu when the trigger is clicked.\n *\n * Example:\n * ```jsx\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * ```\n */\nconst Detail: FC<DetailProps> = ({\n children,\n isHidden = undefined,\n isOverable = true,\n isFocusable = false,\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n identifier,\n className,\n displayArrow = true,\n ...props\n}) => (\n <Container\n transparency=\"sm\"\n aria-hidden={isHidden}\n aria-labelledby={`unrollable-panel-button-${identifier}`}\n id={`unrollable-panel-${identifier}`}\n className={cn(\n 'absolute z-[1000] min-w-full ring-neutral ring-1 rounded-md',\n\n /* Positioning */\n xAlign === 'start' && 'left-0',\n xAlign === 'end' && 'right-0',\n yAlign === 'bellow' && 'top-[calc(100%+1rem)]',\n yAlign === 'above' && 'bottom-[calc(100%+1rem)]',\n\n /* Arrow indicator */\n displayArrow &&\n 'before:absolute before:z-[999] before:content-[\"\"] before:w-0 before:h-0',\n\n /* Horizontal positioning */\n displayArrow && xAlign === 'start' && 'before:left-2',\n displayArrow && xAlign === 'end' && 'before:right-2',\n\n /* Arrow pointing up (when popover is below trigger) */\n displayArrow &&\n yAlign === 'bellow' &&\n 'before:-top-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral',\n\n /* Arrow pointing down (when popover is above trigger) */\n displayArrow &&\n yAlign === 'above' &&\n 'before:-bottom-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-t-[10px] before:border-t-neutral',\n\n /* Visibility management */\n 'overflow-x-visible transition-all duration-400 ease-in-out opacity-0',\n isHidden !== false ? 'invisible' : 'delay-800 visible opacity-100',\n isOverable &&\n 'group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800',\n isFocusable &&\n 'group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800',\n className\n )}\n {...props}\n >\n {children}\n </Container>\n);\n\nPopover.Detail = Detail;\n"],"names":["jsx","cn","PopoverXAlign","PopoverYAlign","Container"],"mappings":";;;;;AA+BO,MAAM,UAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAAA,GAAG,8CAA8C,SAAS;AAAA,IACrE,cAAY,WAAW,UAAU;AAAA,IACjC,IAAI,2BAA2B,UAAU;AAAA,IACzC,iBAAa;AAAA,IACZ,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAaK,IAAK,kCAAAC,mBAAL;AACLA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,KAAA,IAAM;AAFI,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAKL,IAAK,kCAAAC,mBAAL;AACLA,iBAAA,OAAA,IAAQ;AACRA,iBAAA,OAAA,IAAQ;AAFE,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAeZ,MAAM,SAA0B,CAAC;AAAA,EAC/B;AAAA,EACA,WAAW;AAAA,EACX,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAAS;AAAA,EACT,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,MACEH,2BAAAA;AAAAA,EAACI,2BAAAA;AAAAA,EAAA;AAAA,IACC,cAAa;AAAA,IACb,eAAa;AAAA,IACb,mBAAiB,2BAA2B,UAAU;AAAA,IACtD,IAAI,oBAAoB,UAAU;AAAA,IAClC,WAAWH,SAAAA;AAAAA,MACT;AAAA;AAAA,MAGA,WAAW,WAAW;AAAA,MACtB,WAAW,SAAS;AAAA,MACpB,WAAW,YAAY;AAAA,MACvB,WAAW,WAAW;AAAA;AAAA,MAGtB,gBACE;AAAA;AAAA,MAGF,gBAAgB,WAAW,WAAW;AAAA,MACtC,gBAAgB,WAAW,SAAS;AAAA;AAAA,MAGpC,gBACE,WAAW,YACX;AAAA;AAAA,MAGF,gBACE,WAAW,WACX;AAAA;AAAA,MAGF;AAAA,MACA,aAAa,QAAQ,cAAc;AAAA,MACnC,cACE;AAAA,MACF,eACE;AAAA,MACF;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,QAAQ,SAAS;;;;"}
@@ -27,8 +27,8 @@ export type DetailProps = HTMLAttributes<HTMLDivElement> & {
27
27
  isHidden?: boolean;
28
28
  isOverable?: boolean;
29
29
  identifier: string;
30
- xAlign?: PopoverXAlign;
31
- yAlign?: PopoverYAlign;
30
+ xAlign?: PopoverXAlign | `${PopoverXAlign}`;
31
+ yAlign?: PopoverYAlign | `${PopoverYAlign}`;
32
32
  displayArrow?: boolean;
33
33
  };
34
34
  export declare enum PopoverXAlign {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAInE,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAC1C,cAAc,CAAC,cAAc,CAAC,EAC9B,cAAc,CACf,GAAG;IACF,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG;IAC3C,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC;CACzB,CAAC;AAEF;;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AAa,EAAE,CAAC;IAC5C,MAAM,CAAC,EAAE,aAAa,GAAG,GAAG,aAAa,EAAE,CAAC;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,oBAAY,aAAa;IACvB,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,oBAAY,aAAa;IACvB,KAAK,WAAW;IAChB,KAAK,UAAU;CAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Popover/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\n\nexport type PopoverProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n identifier: string;\n};\n\nexport type PopoverType = FC<PopoverProps> & {\n Detail: FC<DetailProps>;\n};\n\n/**\n * Trigger allowing to open a popover menu.\n *\n * Example:\n * ```jsx\n * <Popover identifier=\"popover\">\n * Open popover\n *\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * > Note Popover.Trigger can be replaced by a button. Don't add a button inside the trigger.\n */\nexport const Popover: PopoverType = ({\n children,\n className,\n identifier,\n ...props\n}) => (\n <div\n className={cn('group/popover relative flex cursor-pointer', className)}\n aria-label={`Popover ${identifier}`}\n id={`unrollable-panel-button-${identifier}`}\n aria-haspopup\n {...props}\n >\n {children}\n </div>\n);\n\nexport type DetailProps = HTMLAttributes<HTMLDivElement> & {\n isFocusable?: boolean;\n isHidden?: boolean;\n isOverable?: boolean;\n identifier: string;\n xAlign?: PopoverXAlign;\n yAlign?: PopoverYAlign;\n displayArrow?: boolean;\n};\n\nexport enum PopoverXAlign {\n START = 'start',\n END = 'end',\n}\n\nexport enum PopoverYAlign {\n BELOW = 'bellow',\n ABOVE = 'above',\n}\n\n/**\n * Component that opens a popover menu when the trigger is clicked.\n *\n * Example:\n * ```jsx\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * ```\n */\nconst Detail: FC<DetailProps> = ({\n children,\n isHidden = undefined,\n isOverable = true,\n isFocusable = false,\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n identifier,\n className,\n displayArrow = true,\n ...props\n}) => (\n <Container\n transparency=\"sm\"\n aria-hidden={isHidden}\n aria-labelledby={`unrollable-panel-button-${identifier}`}\n id={`unrollable-panel-${identifier}`}\n className={cn(\n 'absolute z-[1000] min-w-full ring-neutral ring-1 rounded-md',\n\n /* Positioning */\n xAlign === 'start' && 'left-0',\n xAlign === 'end' && 'right-0',\n yAlign === 'bellow' && 'top-[calc(100%+1rem)]',\n yAlign === 'above' && 'bottom-[calc(100%+1rem)]',\n\n /* Arrow indicator */\n displayArrow &&\n 'before:absolute before:z-[999] before:content-[\"\"] before:w-0 before:h-0',\n\n /* Horizontal positioning */\n displayArrow && xAlign === 'start' && 'before:left-2',\n displayArrow && xAlign === 'end' && 'before:right-2',\n\n /* Arrow pointing up (when popover is below trigger) */\n displayArrow &&\n yAlign === 'bellow' &&\n 'before:-top-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral',\n\n /* Arrow pointing down (when popover is above trigger) */\n displayArrow &&\n yAlign === 'above' &&\n 'before:-bottom-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-t-[10px] before:border-t-neutral',\n\n /* Visibility management */\n 'overflow-x-visible transition-all duration-400 ease-in-out opacity-0',\n isHidden !== false ? 'invisible' : 'delay-800 visible opacity-100',\n isOverable &&\n 'group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800',\n isFocusable &&\n 'group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800',\n className\n )}\n {...props}\n >\n {children}\n </Container>\n);\n\nPopover.Detail = Detail;\n"],"names":["PopoverXAlign","PopoverYAlign"],"m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ACF;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;AAGF,QAAQ,SAAS;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Popover/index.tsx"],"sourcesContent":["import type { DetailedHTMLProps, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Container } from '../Container';\n\nexport type PopoverProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n identifier: string;\n};\n\nexport type PopoverType = FC<PopoverProps> & {\n Detail: FC<DetailProps>;\n};\n\n/**\n * Trigger allowing to open a popover menu.\n *\n * Example:\n * ```jsx\n * <Popover identifier=\"popover\">\n * Open popover\n *\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * </Popover>\n * ```\n *\n * > Note Popover.Trigger can be replaced by a button. Don't add a button inside the trigger.\n */\nexport const Popover: PopoverType = ({\n children,\n className,\n identifier,\n ...props\n}) => (\n <div\n className={cn('group/popover relative flex cursor-pointer', className)}\n aria-label={`Popover ${identifier}`}\n id={`unrollable-panel-button-${identifier}`}\n aria-haspopup\n {...props}\n >\n {children}\n </div>\n);\n\nexport type DetailProps = HTMLAttributes<HTMLDivElement> & {\n isFocusable?: boolean;\n isHidden?: boolean;\n isOverable?: boolean;\n identifier: string;\n xAlign?: PopoverXAlign | `${PopoverXAlign}`;\n yAlign?: PopoverYAlign | `${PopoverYAlign}`;\n displayArrow?: boolean;\n};\n\nexport enum PopoverXAlign {\n START = 'start',\n END = 'end',\n}\n\nexport enum PopoverYAlign {\n BELOW = 'bellow',\n ABOVE = 'above',\n}\n\n/**\n * Component that opens a popover menu when the trigger is clicked.\n *\n * Example:\n * ```jsx\n * <Popover.Detail identifier=\"popover\">\n * <div>Content</div>\n * </Popover.Detail>\n * ```\n */\nconst Detail: FC<DetailProps> = ({\n children,\n isHidden = undefined,\n isOverable = true,\n isFocusable = false,\n xAlign = PopoverXAlign.START,\n yAlign = PopoverYAlign.BELOW,\n identifier,\n className,\n displayArrow = true,\n ...props\n}) => (\n <Container\n transparency=\"sm\"\n aria-hidden={isHidden}\n aria-labelledby={`unrollable-panel-button-${identifier}`}\n id={`unrollable-panel-${identifier}`}\n className={cn(\n 'absolute z-[1000] min-w-full ring-neutral ring-1 rounded-md',\n\n /* Positioning */\n xAlign === 'start' && 'left-0',\n xAlign === 'end' && 'right-0',\n yAlign === 'bellow' && 'top-[calc(100%+1rem)]',\n yAlign === 'above' && 'bottom-[calc(100%+1rem)]',\n\n /* Arrow indicator */\n displayArrow &&\n 'before:absolute before:z-[999] before:content-[\"\"] before:w-0 before:h-0',\n\n /* Horizontal positioning */\n displayArrow && xAlign === 'start' && 'before:left-2',\n displayArrow && xAlign === 'end' && 'before:right-2',\n\n /* Arrow pointing up (when popover is below trigger) */\n displayArrow &&\n yAlign === 'bellow' &&\n 'before:-top-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral',\n\n /* Arrow pointing down (when popover is above trigger) */\n displayArrow &&\n yAlign === 'above' &&\n 'before:-bottom-[10px] before:border-l-[10px] before:border-l-transparent before:border-r-[10px] before:border-r-transparent before:border-t-[10px] before:border-t-neutral',\n\n /* Visibility management */\n 'overflow-x-visible transition-all duration-400 ease-in-out opacity-0',\n isHidden !== false ? 'invisible' : 'delay-800 visible opacity-100',\n isOverable &&\n 'group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800',\n isFocusable &&\n 'group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800',\n className\n )}\n {...props}\n >\n {children}\n </Container>\n);\n\nPopover.Detail = Detail;\n"],"names":["PopoverXAlign","PopoverYAlign"],"mappings":";;;AA+BO,MAAM,UAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW,GAAG,8CAA8C,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ocialNetworks_YoutubeLogo = require("./YoutubeLogo.cjs");
13
13
  const socialNetworks = [
14
14
  {
15
- href: "https://discord.gg/528mBV4N",
15
+ href: "https://discord.gg/7uxamYVeCk",
16
16
  component: /* @__PURE__ */ jsxRuntime.jsx(components_SocialNetworks_DiscordLogo.DiscordLogo, { className: "max-w-full max-h-full h-auto" }),
17
17
  label: "Discord"
18
18
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { DiscordLogo } from './DiscordLogo';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://discord.gg/528mBV4N',\n component: <DiscordLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Discord',\n },\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './DiscordLogo';\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","DiscordLogo","ProductHuntLogo","XLogo","YoutubeLogo","LinkedInLogo","TiktokLogo","InstagramLogo","FacebookLogo","createElement"],"mappings":";;;;;;;;;;;;AAUA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA,2BAAAA,IAACC,sCAAAA,aAAA,EAAY,WAAU,+BAAA,CAA+B;AAAA,IACjE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWD,2BAAAA,IAACE,0CAAAA,iBAAA,EAAgB,WAAU,+BAAA,CAA+B;AAAA,IACrE,OAAO;AAAA,EAAA;AAAA,EAET;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"index.cjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { DiscordLogo } from './DiscordLogo';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://discord.gg/7uxamYVeCk',\n component: <DiscordLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Discord',\n },\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './DiscordLogo';\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":["jsx","DiscordLogo","ProductHuntLogo","XLogo","YoutubeLogo","LinkedInLogo","TiktokLogo","InstagramLogo","FacebookLogo","createElement"],"mappings":";;;;;;;;;;;;AAUA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA,2BAAAA,IAACC,sCAAAA,aAAA,EAAY,WAAU,+BAAA,CAA+B;AAAA,IACjE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWD,2BAAAA,IAACE,0CAAAA,iBAAA,EAAgB,WAAU,+BAAA,CAA+B;AAAA,IACrE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWF,2BAAAA,IAACG,gCAAAA,OAAA,EAAM,WAAU,+BAAA,CAA+B;AAAA,IAC3D,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWH,2BAAAA,IAACI,sCAAAA,aAAA,EAAY,WAAU,+BAAA,CAA+B;AAAA,IACjE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWJ,2BAAAA,IAACK,uCAAAA,cAAA,EAAa,WAAU,+BAAA,CAA+B;AAAA,IAClE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWL,2BAAAA,IAACM,qCAAAA,YAAA,EAAW,WAAU,+BAAA,CAA+B;AAAA,IAChE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWN,2BAAAA,IAACO,wCAAAA,eAAA,EAAc,WAAU,+BAAA,CAA+B;AAAA,IACnE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAWP,2BAAAA,IAACQ,uCAAAA,cAAA,EAAa,WAAU,+BAAA,CAA+B;AAAA,IAClE,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACER,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACAS,6BAAAA,cAAC,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAA,CAAO;AAErE;;;;;;;;;;"}
@@ -10,7 +10,7 @@ import { XLogo } from "./XLogo.mjs";
10
10
  import { YoutubeLogo } from "./YoutubeLogo.mjs";
11
11
  const socialNetworks = [
12
12
  {
13
- href: "https://discord.gg/528mBV4N",
13
+ href: "https://discord.gg/7uxamYVeCk",
14
14
  component: /* @__PURE__ */ jsx(DiscordLogo, { className: "max-w-full max-h-full h-auto" }),
15
15
  label: "Discord"
16
16
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { DiscordLogo } from './DiscordLogo';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://discord.gg/528mBV4N',\n component: <DiscordLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Discord',\n },\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './DiscordLogo';\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLogo';\nexport * from './YoutubeLogo';\n"],"names":[],"mappings":";;;;;;;;;;AAUA,MAAM,iBAAiB;AAAA,EACrB;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,aAAA,EAAY,WAAU,+BAAA,CAA+B;AAAA,IACjE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,iBAAA,EAAgB,WAAU,+BAAA,CAA+B;AAAA,IACrE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,OAAA,EAAM,WAAU,+BAAA,CAA+B;AAAA,IAC3D,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,aAAA,EAAY,WAAU,+BAAA,CAA+B;AAAA,IACjE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAA,EAAa,WAAU,+BAAA,CAA+B;AAAA,IAClE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,YAAA,EAAW,WAAU,+BAAA,CAA+B;AAAA,IAChE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,eAAA,EAAc,WAAU,+BAAA,CAA+B;AAAA,IACnE,OAAO;AAAA,EAAA;AAAA,EAET;AAAA,IACE,MAAM;AAAA,IACN,WAAW,oBAAC,cAAA,EAAa,WAAU,+BAAA,CAA+B;AAAA,IAClE,OAAO;AAAA,EAAA;AAEX;AAiBA,MAAM,oBAAgD,CAAC;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IAEC;AAAA,IACA,cAAY;AAAA,IACZ,WAAU;AAAA,IACT,GAAG;AAAA,IAEH,UAAA;AAAA,EAAA;AAAA,EANI;AAOP;AAGK,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACA,8BAAC,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAA,CAAO;AAErE;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/SocialNetworks/index.tsx"],"sourcesContent":["import { AnchorHTMLAttributes, DetailedHTMLProps, FC, ReactNode } from 'react';\nimport { DiscordLogo } from './DiscordLogo';\nimport { FacebookLogo } from './FacebookLogo';\nimport { InstagramLogo } from './InstagramLogo';\nimport { LinkedInLogo } from './LinkedInLogo';\nimport { ProductHuntLogo } from './ProductHuntLogo';\nimport { TiktokLogo } from './TiktokLogo';\nimport { XLogo } from './XLogo';\nimport { YoutubeLogo } from './YoutubeLogo';\n\nconst socialNetworks = [\n {\n href: 'https://discord.gg/7uxamYVeCk',\n component: <DiscordLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Discord',\n },\n {\n href: 'https://www.producthunt.com/posts/intlayer?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-intlayer',\n component: <ProductHuntLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Product Hunt',\n },\n {\n href: 'https://x.com/Intlayer183096',\n component: <XLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'X',\n },\n {\n href: 'https://www.youtube.com/@intlayer',\n component: <YoutubeLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'YouTube',\n },\n {\n href: 'https://www.linkedin.com/company/intlayerorg',\n component: <LinkedInLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'LinkedIn',\n },\n {\n href: 'https://www.tiktok.com/@intlayer',\n component: <TiktokLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'TikTok',\n },\n {\n href: 'https://www.instagram.com/intlayer/',\n component: <InstagramLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Instagram',\n },\n {\n href: 'https://www.facebook.com/intlayer',\n component: <FacebookLogo className=\"max-w-full max-h-full h-auto\" />,\n label: 'Facebook',\n },\n];\n\ntype SocialNetworksProps = {\n renderItem?: (item: (typeof socialNetworks)[number]) => ReactNode;\n} & DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n>;\n\ntype DefaultRenderItemProps = DetailedHTMLProps<\n AnchorHTMLAttributes<HTMLAnchorElement>,\n HTMLAnchorElement\n> & {\n component: ReactNode;\n label: string;\n};\n\nconst DefaultRenderItem: FC<DefaultRenderItemProps> = ({\n href,\n component,\n label,\n ...iconProps\n}) => (\n <a\n key={href}\n href={href}\n aria-label={label}\n className=\"max-w-4 max-h-4\"\n {...iconProps}\n >\n {component}\n </a>\n);\n\nexport const SocialNetworks = ({\n renderItem,\n ...iconProps\n}: SocialNetworksProps) =>\n socialNetworks.map(\n renderItem ??\n ((props) => (\n <DefaultRenderItem {...props} {...iconProps} key={props.label} />\n ))\n );\n\nexport * from './DiscordLogo';\nexport * from './FacebookLogo';\nexport * from './InstagramLogo';\nexport * from './LinkedInLogo';\nexport * from './ProductHuntLogo';\nexport * from './TiktokLogo';\nexport * from './XLog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BAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,eAAe;AAAA,EACb,eACG,CAAC,UACA,8BAAC,mBAAA,EAAmB,GAAG,OAAQ,GAAG,WAAW,KAAK,MAAM,MAAA,CAAO;AAErE;"}
@@ -4,25 +4,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
5
  const lucideReact = require("lucide-react");
6
6
  const ReactExports = require("react");
7
- const reactIntlayer = require("react-intlayer");
8
7
  const utils_cn = require("../../utils/cn.cjs");
9
8
  const components_Button_Button = require("../Button/Button.cjs");
10
- const components_MaxHeightSmoother_index = require("../MaxHeightSmoother/index.cjs");
9
+ const components_ExpandCollapse_ExpandCollapse = require("../ExpandCollapse/ExpandCollapse.cjs");
11
10
  const components_Modal_Modal = require("../Modal/Modal.cjs");
12
- const components_Table_table_content = require("./table.content.cjs");
13
- const MIN_HEIGHT = 700;
14
- const Table = ({ className, ...props }) => {
15
- const [isDeployed, setIsDeployed] = ReactExports.useState(false);
11
+ const Table = ({ className, isRollable, ...props }) => {
16
12
  const [isModalOpen, setIsModalOpen] = ReactExports.useState(false);
17
- const { show, hide } = reactIntlayer.useDictionary(components_Table_table_content);
18
- const [tableHeight, setTableHeight] = ReactExports.useState(0);
19
- const tableRef = ReactExports.useRef(null);
20
- const isTooBig = (tableHeight ?? 0) > MIN_HEIGHT;
21
- ReactExports.useEffect(() => {
22
- if (tableRef.current) {
23
- setTableHeight(tableRef.current.clientHeight);
24
- }
25
- }, []);
26
13
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
27
14
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "sticky top-48 z-10", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-2", children: /* @__PURE__ */ jsxRuntime.jsx(
28
15
  components_Button_Button.Button,
@@ -36,48 +23,16 @@ const Table = ({ className, ...props }) => {
36
23
  Icon: lucideReact.MoveDiagonal
37
24
  }
38
25
  ) }) }),
39
- isTooBig ? /* @__PURE__ */ jsxRuntime.jsxs(
40
- components_MaxHeightSmoother_index.MaxHeightSmoother,
41
- {
42
- isHidden: !isDeployed,
43
- minHeight: MIN_HEIGHT,
44
- className: "w-full overflow-x-scroll overflow-y-hidden",
45
- children: [
46
- /* @__PURE__ */ jsxRuntime.jsx(
47
- "table",
48
- {
49
- className: utils_cn.cn(
50
- "max-w-full table-auto text-left min-w-full",
51
- className
52
- ),
53
- ref: tableRef,
54
- ...props
55
- }
56
- ),
57
- /* @__PURE__ */ jsxRuntime.jsx(
58
- "button",
59
- {
60
- className: utils_cn.cn(
61
- "absolute bottom-0 right-0 flex justify-center cursor-pointer w-full px-2 py-0.5 hover:py-1 transition-all duration-300 text-md text-neutral-700 dark:text-neutral-400 items-center shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent",
62
- isDeployed && "w-auto"
63
- ),
64
- onClick: () => setIsDeployed((prev) => !prev),
65
- children: isDeployed ? hide : show
66
- }
67
- )
68
- ]
69
- }
70
- ) : /* @__PURE__ */ jsxRuntime.jsx(
26
+ /* @__PURE__ */ jsxRuntime.jsx(components_ExpandCollapse_ExpandCollapse.ExpandCollapse, { isRollable, children: /* @__PURE__ */ jsxRuntime.jsx(
71
27
  "table",
72
28
  {
73
29
  className: utils_cn.cn(
74
30
  "max-w-full table-auto text-left min-w-full",
75
31
  className
76
32
  ),
77
- ref: tableRef,
78
33
  ...props
79
34
  }
80
- ),
35
+ ) }),
81
36
  /* @__PURE__ */ jsxRuntime.jsx(
82
37
  components_Modal_Modal.Modal,
83
38
  {
@@ -92,7 +47,6 @@ const Table = ({ className, ...props }) => {
92
47
  "max-w-full table-auto text-left min-w-full",
93
48
  className
94
49
  ),
95
- ref: tableRef,
96
50
  ...props
97
51
  }
98
52
  ) }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
@@ -1 +1 @@
1
- {"version":3,"file":"Table.cjs","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["'use client';\n\nimport { MoveDiagonal } from 'lucide-react';\nimport { HTMLAttributes, useEffect, useRef, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../Button';\nimport { MaxHeightSmoother } from '../MaxHeightSmoother';\nimport { Modal, ModalSize } from '../Modal';\nimport tableContent from './table.content';\n\ntype TableProps = HTMLAttributes<HTMLTableElement>;\n\nconst MIN_HEIGHT = 700;\n\nexport const Table: FC<TableProps> = ({ className, ...props }) => {\n const [isDeployed, setIsDeployed] = useState(false);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const { show, hide } = useDictionary(tableContent);\n const [tableHeight, setTableHeight] = useState(0);\n const tableRef = useRef<HTMLTableElement>(null);\n const isTooBig = (tableHeight ?? 0) > MIN_HEIGHT;\n\n useEffect(() => {\n if (tableRef.current) {\n setTableHeight(tableRef.current.clientHeight);\n }\n }, []);\n\n return (\n <div className=\"relative\">\n <div className=\"sticky top-48 z-10\">\n <div className=\"absolute top-4 right-2\">\n <Button\n variant=\"hoverable\"\n size=\"icon-md\"\n onClick={() => {\n setIsModalOpen(true);\n }}\n label=\"Move\"\n Icon={MoveDiagonal}\n />\n </div>\n </div>\n {isTooBig ? (\n <MaxHeightSmoother\n isHidden={!isDeployed}\n minHeight={MIN_HEIGHT}\n className=\"w-full overflow-x-scroll overflow-y-hidden\"\n >\n <table\n className={cn(\n 'max-w-full table-auto text-left min-w-full',\n className\n )}\n ref={tableRef}\n {...props}\n />\n <button\n className={cn(\n 'absolute bottom-0 right-0 flex justify-center cursor-pointer w-full px-2 py-0.5 hover:py-1 transition-all duration-300 text-md text-neutral-700 dark:text-neutral-400 items-center shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent',\n isDeployed && 'w-auto'\n )}\n onClick={() => setIsDeployed((prev) => !prev)}\n >\n {isDeployed ? hide : show}\n </button>\n </MaxHeightSmoother>\n ) : (\n <table\n className={cn(\n 'max-w-full table-auto text-left min-w-full',\n className\n )}\n ref={tableRef}\n {...props}\n />\n )}\n <Modal\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n size={ModalSize.XL}\n hasCloseButton\n >\n {isModalOpen ? (\n <div className=\"grid\">\n <table\n className={cn(\n 'max-w-full table-auto text-left min-w-full',\n className\n )}\n ref={tableRef}\n {...props}\n />\n </div>\n ) : (\n <></>\n )}\n </Modal>\n </div>\n );\n};\n"],"names":["useState","useDictionary","tableContent","useRef","useEffect","jsxs","jsx","Button","MoveDiagonal","MaxHeightSmoother","cn","Modal","ModalSize","Fragment"],"mappings":";;;;;;;;;;;;AAaA,MAAM,aAAa;AAEZ,MAAM,QAAwB,CAAC,EAAE,WAAW,GAAG,YAAY;AAChE,QAAM,CAAC,YAAY,aAAa,IAAIA,aAAAA,SAAS,KAAK;AAClD,QAAM,CAAC,aAAa,cAAc,IAAIA,aAAAA,SAAS,KAAK;AACpD,QAAM,EAAE,MAAM,SAASC,cAAAA,cAAcC,8BAAY;AACjD,QAAM,CAAC,aAAa,cAAc,IAAIF,aAAAA,SAAS,CAAC;AAChD,QAAM,WAAWG,aAAAA,OAAyB,IAAI;AAC9C,QAAM,YAAY,eAAe,KAAK;AAEtCC,eAAAA,UAAU,MAAM;AACd,QAAI,SAAS,SAAS;AACpB,qBAAe,SAAS,QAAQ,YAAY;AAAA,IAC9C;AAAA,EACF,GAAG,CAAA,CAAE;AAEL,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,IAAAC,2BAAAA,IAAC,SAAI,WAAU,sBACb,UAAAA,+BAAC,OAAA,EAAI,WAAU,0BACb,UAAAA,2BAAAA;AAAAA,MAACC,yBAAAA;AAAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,SAAS,MAAM;AACb,yBAAe,I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,UAAA,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;;"}
1
+ {"version":3,"file":"Table.cjs","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["'use client';\n\nimport { MoveDiagonal } from 'lucide-react';\nimport { HTMLAttributes, useState, type FC } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Button } from '../Button';\nimport { ExpandCollapse } from '../ExpandCollapse';\nimport { Modal, ModalSize } from '../Modal';\n\ntype TableProps = HTMLAttributes<HTMLTableElement> & {\n isRollable?: boolean;\n};\n\nexport const Table: FC<TableProps> = ({ className, isRollable, ...props }) => {\n const [isModalOpen, setIsModalOpen] = useState(false);\n\n return (\n <div className=\"relative\">\n <div className=\"sticky top-48 z-10\">\n <div className=\"absolute top-4 right-2\">\n <Button\n variant=\"hoverable\"\n size=\"icon-md\"\n onClick={() => {\n setIsModalOpen(true);\n }}\n label=\"Move\"\n Icon={MoveDiagonal}\n />\n </div>\n </div>\n <ExpandCollapse isRollable={isRollable}>\n <table\n className={cn(\n 'max-w-full table-auto text-left min-w-full',\n className\n )}\n {...props}\n />\n </ExpandCollapse>\n\n <Modal\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n size={ModalSize.XL}\n hasCloseButton\n >\n {isModalOpen ? (\n <div className=\"grid\">\n <table\n className={cn(\n 'max-w-full table-auto text-left min-w-full',\n className\n )}\n {...props}\n />\n </div>\n ) : (\n <></>\n )}\n </Modal>\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","Button","MoveDiagonal","ExpandCollapse","cn","Modal","ModalSize","Fragment"],"mappings":";;;;;;;;;;AAaO,MAAM,QAAwB,CAAC,EAAE,WAAW,YAAY,GAAG,YAAY;AAC5E,QAAM,CAAC,aAAa,cAAc,IAAIA,aAAAA,SAAS,KAAK;AAEpD,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,YACb,UAAA;AAAA,IAAAC,2BAAAA,IAAC,SAAI,WAAU,sBACb,UAAAA,+BAAC,OAAA,EAAI,WAAU,0BACb,UAAAA,2BAAAA;AAAAA,MAACC,yBAAAA;AAAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,SAAS,MAAM;AACb,yBAAe,IAAI;AAAA,QACrB;AAAA,QACA,OAAM;AAAA,QACN,MAAMC,YAAAA;AAAAA,MAAA;AAAA,IAAA,GAEV,EAAA,CACF;AAAA,IACAF,2BAAAA,IAACG,yCAAAA,kBAAe,YACd,UAAAH,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWI,SAAAA;AAAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,MAAA;AAAA,IAAA,GAER;AAAA,IAEAJ,2BAAAA;AAAAA,MAACK,uBAAAA;AAAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,SAAS,MAAM,eAAe,KAAK;AAAA,QACnC,MAAMC,uBAAAA,UAAU;AAAA,QAChB,gBAAc;AAAA,QAEb,UAAA,cACCN,+BAAC,OAAA,EAAI,WAAU,QACb,UAAAA,2BAAAA;AAAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWI,SAAAA;AAAAA,cACT;AAAA,cACA;AAAA,YAAA;AAAA,YAED,GAAG;AAAA,UAAA;AAAA,QAAA,GAER,IAEAJ,+BAAAO,WAAAA,UAAA,CAAA,CAAE;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,GACF;AAEJ;;"}
@@ -1,5 +1,7 @@
1
1
  import { HTMLAttributes, FC } from 'react';
2
- type TableProps = HTMLAttributes<HTMLTableElement>;
2
+ type TableProps = HTMLAttributes<HTMLTableElement> & {
3
+ isRollable?: boolean;
4
+ };
3
5
  export declare const Table: FC<TableProps>;
4
6
  export {};
5
7
  //# sourceMappingURL=Table.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAA+B,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQ7E,KAAK,UAAU,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAInD,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAsFhC,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAY,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAM1D,KAAK,UAAU,GAAG,cAAc,CAAC,gBAAgB,CAAC,GAAG;IACnD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAkDhC,CAAC"}