@intlayer/design-system 5.7.6 → 5.7.8

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 (352) hide show
  1. package/README.md +3 -0
  2. package/dist/Form-CriPBaZk.js.map +1 -1
  3. package/dist/Form-DJrUK3mm.cjs.map +1 -1
  4. package/dist/better-auth.8zoxzg-F-BEBqzpjz.cjs.map +1 -1
  5. package/dist/better-auth.8zoxzg-F-D8e0X4ys.js.map +1 -1
  6. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  7. package/dist/components/Accordion/Accordion.mjs.map +1 -1
  8. package/dist/components/Avatar/index.cjs.map +1 -1
  9. package/dist/components/Avatar/index.mjs.map +1 -1
  10. package/dist/components/Badge/index.cjs.map +1 -1
  11. package/dist/components/Badge/index.mjs.map +1 -1
  12. package/dist/components/Breadcrumb/breadcrumb.content.cjs.map +1 -1
  13. package/dist/components/Breadcrumb/breadcrumb.content.mjs.map +1 -1
  14. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  15. package/dist/components/Breadcrumb/index.mjs.map +1 -1
  16. package/dist/components/Button/Button.cjs.map +1 -1
  17. package/dist/components/Button/Button.mjs.map +1 -1
  18. package/dist/components/ClickOutsideDiv/index.cjs.map +1 -1
  19. package/dist/components/ClickOutsideDiv/index.mjs.map +1 -1
  20. package/dist/components/Command/index.cjs.map +1 -1
  21. package/dist/components/Command/index.mjs.map +1 -1
  22. package/dist/components/Container/index.cjs.map +1 -1
  23. package/dist/components/Container/index.mjs.map +1 -1
  24. package/dist/components/ContentEditor/ContentEditor.cjs.map +1 -1
  25. package/dist/components/ContentEditor/ContentEditor.mjs.map +1 -1
  26. package/dist/components/ContentEditor/ContentEditorInput.cjs.map +1 -1
  27. package/dist/components/ContentEditor/ContentEditorInput.mjs.map +1 -1
  28. package/dist/components/ContentEditor/ContentEditorTextArea.cjs.map +1 -1
  29. package/dist/components/ContentEditor/ContentEditorTextArea.mjs.map +1 -1
  30. package/dist/components/ContentSelector/ContentSelector.cjs.map +1 -1
  31. package/dist/components/CopyButton/index.cjs.map +1 -1
  32. package/dist/components/CopyButton/index.mjs.map +1 -1
  33. package/dist/components/CopyToClipboard/index.cjs.map +1 -1
  34. package/dist/components/CopyToClipboard/index.mjs.map +1 -1
  35. package/dist/components/DictionaryEditor/DictionaryEditor.cjs.map +1 -1
  36. package/dist/components/DictionaryEditor/DictionaryEditor.mjs.map +1 -1
  37. package/dist/components/DictionaryEditor/ItemLayout.cjs.map +1 -1
  38. package/dist/components/DictionaryEditor/ItemLayout.mjs.map +1 -1
  39. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.cjs.map +1 -1
  40. package/dist/components/DictionaryEditor/NodeWrapper/FileWrapper.mjs.map +1 -1
  41. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.cjs.map +1 -1
  42. package/dist/components/DictionaryEditor/NodeWrapper/StringWrapper.mjs.map +1 -1
  43. package/dist/components/DictionaryFieldEditor/ContentEditor.cjs.map +1 -1
  44. package/dist/components/DictionaryFieldEditor/ContentEditor.mjs.map +1 -1
  45. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.cjs.map +1 -1
  46. package/dist/components/DictionaryFieldEditor/ContentEditorView/TextEditor.mjs.map +1 -1
  47. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.cjs.map +1 -1
  48. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/DictionaryCreationForm.mjs.map +1 -1
  49. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.cjs.map +1 -1
  50. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/dictionaryCreationForm.content.mjs.map +1 -1
  51. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.cjs.map +1 -1
  52. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.cjs.map +1 -1
  53. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.content.mjs.map +1 -1
  54. package/dist/components/DictionaryFieldEditor/DictionaryCreationForm/useDictionaryFormSchema.mjs.map +1 -1
  55. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.cjs.map +1 -1
  56. package/dist/components/DictionaryFieldEditor/DictionaryDetails/DictionaryDetailsForm.mjs.map +1 -1
  57. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.cjs.map +1 -1
  58. package/dist/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs.map +1 -1
  59. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.cjs.map +1 -1
  60. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.cjs.map +1 -1
  61. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs.map +1 -1
  62. package/dist/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.mjs.map +1 -1
  63. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.cjs.map +1 -1
  64. package/dist/components/DictionaryFieldEditor/DictionaryFieldEditor.mjs.map +1 -1
  65. package/dist/components/DictionaryFieldEditor/EnumKeyInput.cjs.map +1 -1
  66. package/dist/components/DictionaryFieldEditor/EnumKeyInput.mjs.map +1 -1
  67. package/dist/components/DictionaryFieldEditor/JSONEditor.cjs.map +1 -1
  68. package/dist/components/DictionaryFieldEditor/JSONEditor.mjs.map +1 -1
  69. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.cjs.map +1 -1
  70. package/dist/components/DictionaryFieldEditor/KeyPathBreadcrumb.mjs.map +1 -1
  71. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.cjs.map +1 -1
  72. package/dist/components/DictionaryFieldEditor/NavigationView/NavigationViewNode.mjs.map +1 -1
  73. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.cjs.map +1 -1
  74. package/dist/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs.map +1 -1
  75. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.cjs.map +1 -1
  76. package/dist/components/DictionaryFieldEditor/NodeTypeSelector.mjs.map +1 -1
  77. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.cjs.map +1 -1
  78. package/dist/components/DictionaryFieldEditor/SaveForm/SaveForm.mjs.map +1 -1
  79. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.cjs.map +1 -1
  80. package/dist/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs.map +1 -1
  81. package/dist/components/DictionaryFieldEditor/StructureEditor.cjs.map +1 -1
  82. package/dist/components/DictionaryFieldEditor/StructureEditor.mjs.map +1 -1
  83. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.cjs.map +1 -1
  84. package/dist/components/DictionaryFieldEditor/StructureView/StructureView.mjs.map +1 -1
  85. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.cjs.map +1 -1
  86. package/dist/components/DictionaryFieldEditor/StructureView/structureView.content.mjs.map +1 -1
  87. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.cjs.map +1 -1
  88. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcher.mjs.map +1 -1
  89. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.cjs.map +1 -1
  90. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/VersionSwitcherContext.mjs.map +1 -1
  91. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.cjs.map +1 -1
  92. package/dist/components/DictionaryFieldEditor/VersionSwitcherDropDown/versionSwitcherDropDown.content.mjs.map +1 -1
  93. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.cjs.map +1 -1
  94. package/dist/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs.map +1 -1
  95. package/dist/components/DictionaryFieldEditor/getIsEditableSection.cjs.map +1 -1
  96. package/dist/components/DictionaryFieldEditor/getIsEditableSection.mjs.map +1 -1
  97. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.cjs.map +1 -1
  98. package/dist/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs.map +1 -1
  99. package/dist/components/DropDown/index.cjs.map +1 -1
  100. package/dist/components/DropDown/index.mjs.map +1 -1
  101. package/dist/components/EditableField/EditableFieldInput.cjs.map +1 -1
  102. package/dist/components/EditableField/EditableFieldInput.mjs.map +1 -1
  103. package/dist/components/EditableField/EditableFieldLayout.cjs.map +1 -1
  104. package/dist/components/EditableField/EditableFieldLayout.mjs.map +1 -1
  105. package/dist/components/EditableField/EditableFieldTextArea.cjs.map +1 -1
  106. package/dist/components/EditableField/EditableFieldTextArea.mjs.map +1 -1
  107. package/dist/components/Flags/Flag.cjs.map +1 -1
  108. package/dist/components/Flags/Flag.mjs.map +1 -1
  109. package/dist/components/Footer/index.cjs.map +1 -1
  110. package/dist/components/Footer/index.mjs.map +1 -1
  111. package/dist/components/Form/FormBase.cjs.map +1 -1
  112. package/dist/components/Form/FormBase.mjs.map +1 -1
  113. package/dist/components/Form/FormControl.cjs.map +1 -1
  114. package/dist/components/Form/FormControl.mjs.map +1 -1
  115. package/dist/components/Form/FormDescription.cjs.map +1 -1
  116. package/dist/components/Form/FormDescription.mjs.map +1 -1
  117. package/dist/components/Form/FormField.cjs.map +1 -1
  118. package/dist/components/Form/FormField.mjs.map +1 -1
  119. package/dist/components/Form/FormItem.cjs.map +1 -1
  120. package/dist/components/Form/FormItem.mjs.map +1 -1
  121. package/dist/components/Form/FormLabel.cjs.map +1 -1
  122. package/dist/components/Form/FormLabel.mjs.map +1 -1
  123. package/dist/components/Form/FormMessage.cjs.map +1 -1
  124. package/dist/components/Form/FormMessage.mjs.map +1 -1
  125. package/dist/components/Form/elements/FormElementWrapper.cjs.map +1 -1
  126. package/dist/components/Form/elements/FormElementWrapper.mjs.map +1 -1
  127. package/dist/components/Form/layout/FormLabelLayout.cjs.map +1 -1
  128. package/dist/components/Form/layout/FormLabelLayout.mjs.map +1 -1
  129. package/dist/components/Form/layout/RequiredStar.cjs.map +1 -1
  130. package/dist/components/Form/layout/RequiredStar.mjs.map +1 -1
  131. package/dist/components/Headers/SectionScroller.cjs.map +1 -1
  132. package/dist/components/Headers/SectionScroller.mjs.map +1 -1
  133. package/dist/components/Headers/index.cjs.map +1 -1
  134. package/dist/components/Headers/index.mjs.map +1 -1
  135. package/dist/components/HeightResizer/index.cjs.map +1 -1
  136. package/dist/components/HeightResizer/index.mjs.map +1 -1
  137. package/dist/components/IDE/Code.cjs.map +1 -1
  138. package/dist/components/IDE/Code.mjs.map +1 -1
  139. package/dist/components/IDE/CodeBlockClient.cjs.map +1 -1
  140. package/dist/components/IDE/CodeBlockClient.mjs.map +1 -1
  141. package/dist/components/IDE/CodeBlockServer.cjs.map +1 -1
  142. package/dist/components/IDE/CodeBlockServer.mjs.map +1 -1
  143. package/dist/components/IDE/CodeConditionalRenderer.cjs.map +1 -1
  144. package/dist/components/IDE/CodeConditionalRenderer.mjs.map +1 -1
  145. package/dist/components/IDE/CodeContext.cjs.map +1 -1
  146. package/dist/components/IDE/CodeContext.mjs.map +1 -1
  147. package/dist/components/IDE/CodeFormatSelector.cjs.map +1 -1
  148. package/dist/components/IDE/CodeFormatSelector.mjs.map +1 -1
  149. package/dist/components/IDE/ContentDeclarationFormatSelector.cjs.map +1 -1
  150. package/dist/components/IDE/ContentDeclarationFormatSelector.mjs.map +1 -1
  151. package/dist/components/IDE/CopyButton.content.cjs.map +1 -1
  152. package/dist/components/IDE/CopyButton.content.mjs.map +1 -1
  153. package/dist/components/IDE/CopyCode.cjs.map +1 -1
  154. package/dist/components/IDE/CopyCode.mjs.map +1 -1
  155. package/dist/components/IDE/FileList.cjs.map +1 -1
  156. package/dist/components/IDE/FileList.mjs.map +1 -1
  157. package/dist/components/IDE/FileTree.cjs.map +1 -1
  158. package/dist/components/IDE/FileTree.mjs.map +1 -1
  159. package/dist/components/IDE/IDE.cjs.map +1 -1
  160. package/dist/components/IDE/IDE.mjs.map +1 -1
  161. package/dist/components/IDE/MarkDownRender.cjs.map +1 -1
  162. package/dist/components/IDE/MarkDownRender.mjs.map +1 -1
  163. package/dist/components/IDE/MonacoCode.cjs.map +1 -1
  164. package/dist/components/IDE/MonacoCode.mjs.map +1 -1
  165. package/dist/components/IDE/PackageManagerSelector.cjs.map +1 -1
  166. package/dist/components/IDE/PackageManagerSelector.mjs.map +1 -1
  167. package/dist/components/IDE/code.content.cjs.map +1 -1
  168. package/dist/components/IDE/code.content.mjs.map +1 -1
  169. package/dist/components/IDE/copyCode.content.cjs.map +1 -1
  170. package/dist/components/IDE/copyCode.content.mjs.map +1 -1
  171. package/dist/components/IDE/createFileTree.cjs.map +1 -1
  172. package/dist/components/IDE/createFileTree.mjs.map +1 -1
  173. package/dist/components/InformationTag/index.cjs.map +1 -1
  174. package/dist/components/InformationTag/index.mjs.map +1 -1
  175. package/dist/components/Input/Checkbox.cjs.map +1 -1
  176. package/dist/components/Input/Checkbox.mjs.map +1 -1
  177. package/dist/components/Input/Input.cjs.map +1 -1
  178. package/dist/components/Input/Input.mjs.map +1 -1
  179. package/dist/components/Input/InputPassword.cjs.map +1 -1
  180. package/dist/components/Input/InputPassword.mjs.map +1 -1
  181. package/dist/components/KeyboardScreenAdapter/index.cjs.map +1 -1
  182. package/dist/components/KeyboardScreenAdapter/index.mjs.map +1 -1
  183. package/dist/components/Label/index.cjs.map +1 -1
  184. package/dist/components/Link/Link.cjs.map +1 -1
  185. package/dist/components/Link/Link.mjs.map +1 -1
  186. package/dist/components/Loader/index.cjs.map +1 -1
  187. package/dist/components/Loader/index.content.cjs.map +1 -1
  188. package/dist/components/Loader/index.content.mjs.map +1 -1
  189. package/dist/components/Loader/index.mjs.map +1 -1
  190. package/dist/components/Loader/spinner.cjs.map +1 -1
  191. package/dist/components/Loader/spinner.mjs.map +1 -1
  192. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.cjs.map +1 -1
  193. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContent.mjs.map +1 -1
  194. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.cjs.map +1 -1
  195. package/dist/components/LocaleSwitcherContentDropDown/LocaleSwitcherContentContext.mjs.map +1 -1
  196. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.cjs.map +1 -1
  197. package/dist/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs.map +1 -1
  198. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.cjs.map +1 -1
  199. package/dist/components/LocaleSwitcherDropDown/LocaleSwitcher.mjs.map +1 -1
  200. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.cjs.map +1 -1
  201. package/dist/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs.map +1 -1
  202. package/dist/components/Logo/Logo.cjs.map +1 -1
  203. package/dist/components/Logo/Logo.mjs.map +1 -1
  204. package/dist/components/Logo/LogoTextOnly.cjs.map +1 -1
  205. package/dist/components/Logo/LogoTextOnly.mjs.map +1 -1
  206. package/dist/components/Logo/LogoWithText.cjs.map +1 -1
  207. package/dist/components/Logo/LogoWithText.mjs.map +1 -1
  208. package/dist/components/Logo/LogoWithTextBelow.cjs.map +1 -1
  209. package/dist/components/Logo/LogoWithTextBelow.mjs.map +1 -1
  210. package/dist/components/MarkDownRender/index.cjs.map +1 -1
  211. package/dist/components/MarkDownRender/index.mjs.map +1 -1
  212. package/dist/components/MaxHeightSmoother/index.cjs.map +1 -1
  213. package/dist/components/MaxHeightSmoother/index.mjs.map +1 -1
  214. package/dist/components/MaxWidthSmoother/index.cjs.map +1 -1
  215. package/dist/components/MaxWidthSmoother/index.mjs.map +1 -1
  216. package/dist/components/Modal/Modal.cjs.map +1 -1
  217. package/dist/components/Modal/Modal.mjs.map +1 -1
  218. package/dist/components/Navbar/Burger.cjs.map +1 -1
  219. package/dist/components/Navbar/Burger.mjs.map +1 -1
  220. package/dist/components/Navbar/DesktopNavbar.cjs.map +1 -1
  221. package/dist/components/Navbar/DesktopNavbar.mjs.map +1 -1
  222. package/dist/components/Navbar/MobileNavbar.cjs.map +1 -1
  223. package/dist/components/Navbar/MobileNavbar.mjs.map +1 -1
  224. package/dist/components/Navbar/index.cjs.map +1 -1
  225. package/dist/components/Navbar/index.mjs.map +1 -1
  226. package/dist/components/Navbar/useNavigation.cjs.map +1 -1
  227. package/dist/components/Navbar/useNavigation.mjs.map +1 -1
  228. package/dist/components/Pattern/DotPattern.cjs.map +1 -1
  229. package/dist/components/Pattern/DotPattern.mjs.map +1 -1
  230. package/dist/components/Pattern/GridPattern.cjs.map +1 -1
  231. package/dist/components/Pattern/GridPattern.mjs.map +1 -1
  232. package/dist/components/Pattern/SpotLight.cjs.map +1 -1
  233. package/dist/components/Pattern/SpotLight.mjs.map +1 -1
  234. package/dist/components/Popover/index.cjs.map +1 -1
  235. package/dist/components/Popover/index.mjs.map +1 -1
  236. package/dist/components/PressableSpan/PressableSpan.cjs.map +1 -1
  237. package/dist/components/PressableSpan/PressableSpan.mjs.map +1 -1
  238. package/dist/components/RightDrawer/RightDrawer.cjs.map +1 -1
  239. package/dist/components/RightDrawer/RightDrawer.mjs.map +1 -1
  240. package/dist/components/RightDrawer/isElementAtTopAndNotCovered.cjs.map +1 -1
  241. package/dist/components/RightDrawer/isElementAtTopAndNotCovered.mjs.map +1 -1
  242. package/dist/components/RightDrawer/useRightDrawerStore.cjs.map +1 -1
  243. package/dist/components/RightDrawer/useRightDrawerStore.mjs.map +1 -1
  244. package/dist/components/Select/Multiselect.cjs.map +1 -1
  245. package/dist/components/Select/Multiselect.mjs.map +1 -1
  246. package/dist/components/Select/Select.cjs.map +1 -1
  247. package/dist/components/Select/Select.mjs.map +1 -1
  248. package/dist/components/SocialNetworks/DiscordLogo.cjs.map +1 -1
  249. package/dist/components/SocialNetworks/DiscordLogo.mjs.map +1 -1
  250. package/dist/components/SocialNetworks/FacebookLogo.cjs.map +1 -1
  251. package/dist/components/SocialNetworks/FacebookLogo.mjs.map +1 -1
  252. package/dist/components/SocialNetworks/InstagramLogo.cjs.map +1 -1
  253. package/dist/components/SocialNetworks/InstagramLogo.mjs.map +1 -1
  254. package/dist/components/SocialNetworks/LinkedInLogo.cjs.map +1 -1
  255. package/dist/components/SocialNetworks/LinkedInLogo.mjs.map +1 -1
  256. package/dist/components/SocialNetworks/ProductHuntLogo.cjs.map +1 -1
  257. package/dist/components/SocialNetworks/ProductHuntLogo.mjs.map +1 -1
  258. package/dist/components/SocialNetworks/TiktokLogo.cjs.map +1 -1
  259. package/dist/components/SocialNetworks/TiktokLogo.mjs.map +1 -1
  260. package/dist/components/SocialNetworks/XLogo.cjs.map +1 -1
  261. package/dist/components/SocialNetworks/XLogo.mjs.map +1 -1
  262. package/dist/components/SocialNetworks/YoutubeLogo.cjs.map +1 -1
  263. package/dist/components/SocialNetworks/YoutubeLogo.mjs.map +1 -1
  264. package/dist/components/SocialNetworks/index.cjs.map +1 -1
  265. package/dist/components/SocialNetworks/index.mjs.map +1 -1
  266. package/dist/components/SwitchSelector/index.cjs.map +1 -1
  267. package/dist/components/SwitchSelector/index.mjs.map +1 -1
  268. package/dist/components/TabSelector/TabSelector.cjs.map +1 -1
  269. package/dist/components/TabSelector/TabSelector.mjs.map +1 -1
  270. package/dist/components/Tag/index.cjs.map +1 -1
  271. package/dist/components/Tag/index.mjs.map +1 -1
  272. package/dist/components/TextArea/AutoSizeTextArea.cjs.map +1 -1
  273. package/dist/components/TextArea/AutoSizeTextArea.mjs.map +1 -1
  274. package/dist/components/TextArea/AutocompleteTextArea.cjs.map +1 -1
  275. package/dist/components/TextArea/AutocompleteTextArea.mjs.map +1 -1
  276. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  277. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  278. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.cjs.map +1 -1
  279. package/dist/components/ThemeSwitcherDropDown/DesktopThemeSwitcher.mjs.map +1 -1
  280. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.cjs.map +1 -1
  281. package/dist/components/ThemeSwitcherDropDown/MobileThemeSwitcher.mjs.map +1 -1
  282. package/dist/components/ThemeSwitcherDropDown/types.cjs.map +1 -1
  283. package/dist/components/ThemeSwitcherDropDown/types.mjs.map +1 -1
  284. package/dist/components/Toaster/Toast.cjs.map +1 -1
  285. package/dist/components/Toaster/Toast.mjs.map +1 -1
  286. package/dist/components/Toaster/Toaster.cjs.map +1 -1
  287. package/dist/components/Toaster/Toaster.mjs.map +1 -1
  288. package/dist/components/Toaster/useToast.cjs.map +1 -1
  289. package/dist/components/Toaster/useToast.mjs.map +1 -1
  290. package/dist/components/WithResizer/index.cjs.map +1 -1
  291. package/dist/components/WithResizer/index.mjs.map +1 -1
  292. package/dist/hooks/auth.cjs.map +1 -1
  293. package/dist/hooks/auth.mjs.map +1 -1
  294. package/dist/hooks/intlayerAPIHooks.cjs.map +1 -1
  295. package/dist/hooks/intlayerAPIHooks.mjs.map +1 -1
  296. package/dist/hooks/useAsync/useAsync.cjs.map +1 -1
  297. package/dist/hooks/useAsync/useAsync.mjs.map +1 -1
  298. package/dist/hooks/useAsync/useAsyncStateStore.cjs.map +1 -1
  299. package/dist/hooks/useAsync/useAsyncStateStore.mjs.map +1 -1
  300. package/dist/hooks/useAsync/useAsyncWrapper.cjs.map +1 -1
  301. package/dist/hooks/useAsync/useAsyncWrapper.mjs.map +1 -1
  302. package/dist/hooks/useAuth/useAuth.cjs.map +1 -1
  303. package/dist/hooks/useAuth/useAuth.mjs.map +1 -1
  304. package/dist/hooks/useAuth/useOAuth2.cjs.map +1 -1
  305. package/dist/hooks/useAuth/useOAuth2.mjs.map +1 -1
  306. package/dist/hooks/useAuth/useSession.cjs.map +1 -1
  307. package/dist/hooks/useAuth/useSession.mjs.map +1 -1
  308. package/dist/hooks/useDevice.cjs.map +1 -1
  309. package/dist/hooks/useDevice.mjs.map +1 -1
  310. package/dist/hooks/useGetAllDictionaries.cjs.map +1 -1
  311. package/dist/hooks/useGetAllDictionaries.mjs.map +1 -1
  312. package/dist/hooks/useGetElementOrWindow.cjs.map +1 -1
  313. package/dist/hooks/useGetElementOrWindow.mjs.map +1 -1
  314. package/dist/hooks/useIntlayerAPI.cjs.map +1 -1
  315. package/dist/hooks/useIntlayerAPI.mjs.map +1 -1
  316. package/dist/hooks/useIsDarkMode.cjs.map +1 -1
  317. package/dist/hooks/useIsDarkMode.mjs.map +1 -1
  318. package/dist/hooks/useIsMounted.cjs.map +1 -1
  319. package/dist/hooks/useIsMounted.mjs.map +1 -1
  320. package/dist/hooks/useItemSelector.cjs.map +1 -1
  321. package/dist/hooks/useItemSelector.mjs.map +1 -1
  322. package/dist/hooks/useKeyboardDetector.cjs.map +1 -1
  323. package/dist/hooks/useKeyboardDetector.mjs.map +1 -1
  324. package/dist/hooks/usePersistedStore.cjs.map +1 -1
  325. package/dist/hooks/usePersistedStore.mjs.map +1 -1
  326. package/dist/hooks/useScreenWidth.cjs.map +1 -1
  327. package/dist/hooks/useScreenWidth.mjs.map +1 -1
  328. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.cjs.map +1 -1
  329. package/dist/hooks/useScrollBlockage/useScrollBlockageStore.mjs.map +1 -1
  330. package/dist/hooks/useScrollDetection.cjs.map +1 -1
  331. package/dist/hooks/useScrollDetection.mjs.map +1 -1
  332. package/dist/hooks/useUser/index.cjs.map +1 -1
  333. package/dist/hooks/useUser/index.mjs.map +1 -1
  334. package/dist/index-BCuMWKyy.js.map +1 -1
  335. package/dist/index-BYzBot7l.cjs.map +1 -1
  336. package/dist/index-DW4Wnns5.cjs.map +1 -1
  337. package/dist/index-aPP3MzPT.js.map +1 -1
  338. package/dist/parse-BJVwmz92.cjs.map +1 -1
  339. package/dist/parse-pnJgclyf.js.map +1 -1
  340. package/dist/schemas-BIuxHDyZ.js.map +1 -1
  341. package/dist/schemas-Q6C7ZNs3.cjs.map +1 -1
  342. package/dist/tailwind.config.cjs.map +1 -1
  343. package/dist/tailwind.config.mjs.map +1 -1
  344. package/dist/utils/camelCase.cjs.map +1 -1
  345. package/dist/utils/camelCase.mjs.map +1 -1
  346. package/dist/utils/capitalize.cjs.map +1 -1
  347. package/dist/utils/capitalize.mjs.map +1 -1
  348. package/dist/utils/object.cjs.map +1 -1
  349. package/dist/utils/object.mjs.map +1 -1
  350. package/dist/zod-D4WapgbL.js.map +1 -1
  351. package/dist/zod-K7y5gPX4.cjs.map +1 -1
  352. package/package.json +16 -16
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('', {\n variants: {\n size: {\n sm: 'size-3 absolute top-1/2 -translate-y-1/2',\n md: 'size-4 absolute top-1/2 -translate-y-1/2',\n lg: 'size-5 absolute top-1/2 -translate-y-1/2',\n xl: 'size-6 absolute top-1/2 -translate-y-1/2',\n 'icon-sm': 'size-3',\n 'icon-md': 'size-4',\n 'icon-lg': 'size-5',\n 'icon-xl': 'size-6',\n },\n position: {\n left: 'left-3',\n right: 'right-3',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-lg',\n xl: 'min-h-11 px-10 max-md:py-4 text-xl',\n 'icon-sm': 'p-1.5',\n 'icon-md': 'p-1.5',\n 'icon-lg': 'p-2',\n 'icon-xl': 'p-3',\n },\n color: {\n primary: 'text-primary *:text-text-light',\n secondary: 'text-secondary *:text-text-light',\n destructive: 'text-destructive *:text-text-light',\n neutral: 'text-neutral *:text-text-light',\n light: 'text-white *:text-text-light',\n dark: 'text-neutral-800 *:text-text-light',\n text: 'text-text *:text-text-opposite',\n 'text-inverse': 'text-text-opposite *:text-text',\n error: 'text-error *:text-text-light',\n success: 'text-success *:text-text-light',\n custom: '',\n },\n variant: {\n default: 'rounded-lg bg-current',\n none: 'border-none bg-current/0 text-inherit hover:bg-current/0',\n outline:\n '*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30',\n link: '*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline',\n 'invisible-link':\n '*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent',\n hoverable:\n '*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5',\n input: [\n '*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n },\n\n textAlign: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n\n isFullWidth: {\n true: 'w-full',\n false: '',\n },\n\n hasIconLeft: {\n true: 'px-12',\n false: '',\n },\n hasIconRight: {\n true: 'pr-8',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n color: 'primary',\n textAlign: 'center',\n isFullWidth: false,\n hasIconRight: false,\n hasIconLeft: false,\n },\n }\n);\n\nexport type ButtonProps = DetailedHTMLProps<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n VariantProps<typeof buttonVariants> & {\n /**\n * Optional icon to be displayed on the button\n */\n label: string;\n Icon?: FC | LucideIcon;\n IconRight?: FC | LucideIcon;\n iconClassName?: string;\n isLoading?: boolean;\n isActive?: boolean;\n isFullWidth?: boolean;\n };\n\nexport const Button: FC<ButtonProps> = ({\n variant,\n size,\n color,\n children,\n Icon,\n IconRight,\n iconClassName,\n isLoading,\n isActive,\n isFullWidth = false,\n textAlign,\n disabled,\n label,\n className,\n type = 'button',\n ...props\n}) => {\n const isLink = variant === 'link' || variant === 'invisible-link';\n\n return (\n <button\n disabled={isLoading || disabled}\n aria-current={isActive ? 'page' : undefined}\n aria-label={label}\n aria-busy={isLoading}\n role={isLink ? 'link' : undefined}\n type={type}\n className={buttonVariants({\n variant,\n size,\n color,\n isFullWidth,\n textAlign: textAlign ?? (IconRight ? 'left' : 'center'),\n hasIconLeft: Boolean(\n typeof children !== 'undefined' &&\n (typeof Icon !== 'undefined' || typeof isLoading !== 'undefined')\n ),\n hasIconRight: Boolean(\n typeof children !== 'undefined' && typeof IconRight !== 'undefined'\n ),\n className,\n })}\n {...props}\n >\n {Icon && !isLoading && (\n <Icon\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'left',\n })}\n />\n )}\n\n <Loader\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'left',\n })}\n isLoading={isLoading ?? false}\n />\n\n <span>{children}</span>\n\n {IconRight && (\n <IconRight\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'right',\n })}\n />\n )}\n </button>\n );\n};\n"],"names":[],"mappings":";;;AASA,MAAM,qBAAqB,IAAI,IAAI;AAAA,EACjC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IACb;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAED,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,MACb;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,QACN,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,SAAS;AAAA,QACT,QAAQ;AAAA,MACV;AAAA,MACA,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SACE;AAAA,QACF,MAAM;AAAA,QACN,kBACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MAEJ;AAAA,MAEA,WAAW;AAAA,QACT,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA,MAEA,aAAa;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MAEA,aAAa;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IAEX;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAmBO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,MAAM;AACE,QAAA,SAAS,YAAY,UAAU,YAAY;AAG/C,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,aAAa;AAAA,MACvB,gBAAc,WAAW,SAAS;AAAA,MAClC,cAAY;AAAA,MACZ,aAAW;AAAA,MACX,MAAM,SAAS,SAAS;AAAA,MACxB;AAAA,MACA,WAAW,eAAe;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,cAAc,YAAY,SAAS;AAAA,QAC9C,aAAa;AAAA,UACX,OAAO,aAAa,gBACjB,OAAO,SAAS,eAAe,OAAO,cAAc;AAAA,QACzD;AAAA,QACA,cAAc;AAAA,UACZ,OAAO,aAAa,eAAe,OAAO,cAAc;AAAA,QAC1D;AAAA,QACA;AAAA,MAAA,CACD;AAAA,MACA,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA,QAAQ,CAAC,aACR;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YACX,CAAA;AAAA,UAAA;AAAA,QACH;AAAA,QAGF;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YAAA,CACX;AAAA,YACD,WAAW,aAAa;AAAA,UAAA;AAAA,QAC1B;AAAA,QAEA,oBAAC,UAAM,UAAS;AAAA,QAEf,aACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YACX,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ;AAEJ;"}
1
+ {"version":3,"file":"Button.mjs","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { LucideIcon } from 'lucide-react';\nimport {\n type ButtonHTMLAttributes,\n type DetailedHTMLProps,\n type FC,\n} from 'react';\nimport { Loader } from '../Loader';\n\nconst buttonIconVariants = cva('', {\n variants: {\n size: {\n sm: 'size-3 absolute top-1/2 -translate-y-1/2',\n md: 'size-4 absolute top-1/2 -translate-y-1/2',\n lg: 'size-5 absolute top-1/2 -translate-y-1/2',\n xl: 'size-6 absolute top-1/2 -translate-y-1/2',\n 'icon-sm': 'size-3',\n 'icon-md': 'size-4',\n 'icon-lg': 'size-5',\n 'icon-xl': 'size-6',\n },\n position: {\n left: 'left-3',\n right: 'right-3',\n },\n },\n defaultVariants: {\n size: 'md',\n },\n});\n\nconst buttonVariants = cva(\n 'relative cursor-pointer truncate whitespace-nowrap font-medium transition focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n size: {\n sm: 'min-h-7 px-3 max-md:py-1 text-xs',\n md: 'min-h-8 px-6 max-md:py-2 text-sm',\n lg: 'min-h-10 px-8 max-md:py-3 text-lg',\n xl: 'min-h-11 px-10 max-md:py-4 text-xl',\n 'icon-sm': 'p-1.5',\n 'icon-md': 'p-1.5',\n 'icon-lg': 'p-2',\n 'icon-xl': 'p-3',\n },\n color: {\n primary: 'text-primary *:text-text-light',\n secondary: 'text-secondary *:text-text-light',\n destructive: 'text-destructive *:text-text-light',\n neutral: 'text-neutral *:text-text-light',\n light: 'text-white *:text-text-light',\n dark: 'text-neutral-800 *:text-text-light',\n text: 'text-text *:text-text-opposite',\n 'text-inverse': 'text-text-opposite *:text-text',\n error: 'text-error *:text-text-light',\n success: 'text-success *:text-text-light',\n custom: '',\n },\n variant: {\n default: 'rounded-lg bg-current',\n none: 'border-none bg-current/0 text-inherit hover:bg-current/0',\n outline:\n '*:!text-current rounded-lg border-[1.5px] bg-current/0 hover:bg-current/30',\n link: '*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent hover:underline',\n 'invisible-link':\n '*:!text-current h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 hover:bg-transparent',\n hoverable:\n '*:!text-current rounded-lg border-none bg-current/0 transition hover:bg-current/10 aria-[current]:bg-current/5',\n input: [\n '*:!text-current w-full select-text resize-none rounded-xl border-2 bg-input-background text-sm text-input-text shadow-none outline-0 transition-all',\n 'border-input-border hover:border-input-border-hover focus:border-input-border-focus focus:outline-0 focus:[box-shadow:none]',\n 'aria-[invalid=true]:border-error',\n 'disabled:opacity-50',\n ],\n },\n\n textAlign: {\n left: 'text-left',\n center: 'text-center',\n right: 'text-right',\n },\n\n isFullWidth: {\n true: 'w-full',\n false: '',\n },\n\n hasIconLeft: {\n true: 'px-12',\n false: '',\n },\n hasIconRight: {\n true: 'pr-8',\n false: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n color: 'primary',\n textAlign: 'center',\n isFullWidth: false,\n hasIconRight: false,\n hasIconLeft: false,\n },\n }\n);\n\nexport type ButtonProps = DetailedHTMLProps<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n> &\n VariantProps<typeof buttonVariants> & {\n /**\n * Optional icon to be displayed on the button\n */\n label: string;\n Icon?: FC | LucideIcon;\n IconRight?: FC | LucideIcon;\n iconClassName?: string;\n isLoading?: boolean;\n isActive?: boolean;\n isFullWidth?: boolean;\n };\n\nexport const Button: FC<ButtonProps> = ({\n variant,\n size,\n color,\n children,\n Icon,\n IconRight,\n iconClassName,\n isLoading,\n isActive,\n isFullWidth = false,\n textAlign,\n disabled,\n label,\n className,\n type = 'button',\n ...props\n}) => {\n const isLink = variant === 'link' || variant === 'invisible-link';\n\n return (\n <button\n disabled={isLoading || disabled}\n aria-current={isActive ? 'page' : undefined}\n aria-label={label}\n aria-busy={isLoading}\n role={isLink ? 'link' : undefined}\n type={type}\n className={buttonVariants({\n variant,\n size,\n color,\n isFullWidth,\n textAlign: textAlign ?? (IconRight ? 'left' : 'center'),\n hasIconLeft: Boolean(\n typeof children !== 'undefined' &&\n (typeof Icon !== 'undefined' || typeof isLoading !== 'undefined')\n ),\n hasIconRight: Boolean(\n typeof children !== 'undefined' && typeof IconRight !== 'undefined'\n ),\n className,\n })}\n {...props}\n >\n {Icon && !isLoading && (\n <Icon\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'left',\n })}\n />\n )}\n\n <Loader\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'left',\n })}\n isLoading={isLoading ?? false}\n />\n\n <span>{children}</span>\n\n {IconRight && (\n <IconRight\n className={buttonIconVariants({\n size,\n className: iconClassName,\n position: 'right',\n })}\n />\n )}\n </button>\n );\n};\n"],"names":[],"mappings":";;;AASA,MAAM,qBAAqB,IAAI,IAAI;AAAA,EACjC,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,MACX,WAAW;AAAA,IAAA;AAAA,IAEb,UAAU;AAAA,MACR,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,MAAM;AAAA,EAAA;AAEV,CAAC;AAED,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,QACX,WAAW;AAAA,MAAA;AAAA,MAEb,OAAO;AAAA,QACL,SAAS;AAAA,QACT,WAAW;AAAA,QACX,aAAa;AAAA,QACb,SAAS;AAAA,QACT,OAAO;AAAA,QACP,MAAM;AAAA,QACN,MAAM;AAAA,QACN,gBAAgB;AAAA,QAChB,OAAO;AAAA,QACP,SAAS;AAAA,QACT,QAAQ;AAAA,MAAA;AAAA,MAEV,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,QACN,SACE;AAAA,QACF,MAAM;AAAA,QACN,kBACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,MAGF,WAAW;AAAA,QACT,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,OAAO;AAAA,MAAA;AAAA,MAGT,aAAa;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,MAGT,aAAa;AAAA,QACX,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,MAET,cAAc;AAAA,QACZ,MAAM;AAAA,QACN,OAAO;AAAA,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,aAAa;AAAA,MACb,cAAc;AAAA,MACd,aAAa;AAAA,IAAA;AAAA,EACf;AAEJ;AAmBO,MAAM,SAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,MAAM;AACJ,QAAM,SAAS,YAAY,UAAU,YAAY;AAEjD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,UAAU,aAAa;AAAA,MACvB,gBAAc,WAAW,SAAS;AAAA,MAClC,cAAY;AAAA,MACZ,aAAW;AAAA,MACX,MAAM,SAAS,SAAS;AAAA,MACxB;AAAA,MACA,WAAW,eAAe;AAAA,QACxB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,cAAc,YAAY,SAAS;AAAA,QAC9C,aAAa;AAAA,UACX,OAAO,aAAa,gBACjB,OAAO,SAAS,eAAe,OAAO,cAAc;AAAA,QAAA;AAAA,QAEzD,cAAc;AAAA,UACZ,OAAO,aAAa,eAAe,OAAO,cAAc;AAAA,QAAA;AAAA,QAE1D;AAAA,MAAA,CACD;AAAA,MACA,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA,QAAQ,CAAC,aACR;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YAAA,CACX;AAAA,UAAA;AAAA,QAAA;AAAA,QAIL;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YAAA,CACX;AAAA,YACD,WAAW,aAAa;AAAA,UAAA;AAAA,QAAA;AAAA,QAG1B,oBAAC,UAAM,UAAS;AAAA,QAEf,aACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAW,mBAAmB;AAAA,cAC5B;AAAA,cACA,WAAW;AAAA,cACX,UAAU;AAAA,YAAA,CACX;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/ClickOutsideDiv/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n useEffect,\n useRef,\n} from 'react';\n\nexport type ClickOutsideDivProps = PropsWithChildren<{\n onClickOutSide: () => void; // note: changed return type to `void`\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nexport const ClickOutsideDiv: FC<ClickOutsideDivProps> = ({\n children,\n onClickOutSide,\n ...props\n}) => {\n const divRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClick = (event: MouseEvent) => {\n // If clicking outside of the referenced element, call onClickOutSide\n if (divRef.current && !divRef.current.contains(event.target as Node)) {\n onClickOutSide();\n }\n };\n\n // Attach the event listener\n document.addEventListener('mousedown', handleClick, { passive: true });\n\n // Clean up on unmount\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, [onClickOutSide]);\n\n return (\n <div ref={divRef} {...props}>\n {children}\n </div>\n );\n};\n"],"names":["useRef","useEffect"],"mappings":";;;;;AAeO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,SAASA,oBAAuB,IAAI;AAE1CC,eAAAA,UAAU,MAAM;AACR,UAAA,cAAc,CAAC,UAAsB;AAErC,UAAA,OAAO,WAAW,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAc,GAAG;AACrD,uBAAA;AAAA,MAAA;AAAA,IAEnB;AAGA,aAAS,iBAAiB,aAAa,aAAa,EAAE,SAAS,MAAM;AAGrE,WAAO,MAAM;AACF,eAAA,oBAAoB,aAAa,WAAW;AAAA,IACvD;AAAA,EAAA,GACC,CAAC,cAAc,CAAC;AAEnB,wCACG,OAAI,EAAA,KAAK,QAAS,GAAG,OACnB,UACH;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/ClickOutsideDiv/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n useEffect,\n useRef,\n} from 'react';\n\nexport type ClickOutsideDivProps = PropsWithChildren<{\n onClickOutSide: () => void; // note: changed return type to `void`\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nexport const ClickOutsideDiv: FC<ClickOutsideDivProps> = ({\n children,\n onClickOutSide,\n ...props\n}) => {\n const divRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClick = (event: MouseEvent) => {\n // If clicking outside of the referenced element, call onClickOutSide\n if (divRef.current && !divRef.current.contains(event.target as Node)) {\n onClickOutSide();\n }\n };\n\n // Attach the event listener\n document.addEventListener('mousedown', handleClick, { passive: true });\n\n // Clean up on unmount\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, [onClickOutSide]);\n\n return (\n <div ref={divRef} {...props}>\n {children}\n </div>\n );\n};\n"],"names":["useRef","useEffect"],"mappings":";;;;;AAeO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,SAASA,aAAAA,OAAuB,IAAI;AAE1CC,eAAAA,UAAU,MAAM;AACd,UAAM,cAAc,CAAC,UAAsB;AAEzC,UAAI,OAAO,WAAW,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAc,GAAG;AACpE,uBAAA;AAAA,MACF;AAAA,IACF;AAGA,aAAS,iBAAiB,aAAa,aAAa,EAAE,SAAS,MAAM;AAGrE,WAAO,MAAM;AACX,eAAS,oBAAoB,aAAa,WAAW;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,wCACG,OAAA,EAAI,KAAK,QAAS,GAAG,OACnB,UACH;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/ClickOutsideDiv/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n useEffect,\n useRef,\n} from 'react';\n\nexport type ClickOutsideDivProps = PropsWithChildren<{\n onClickOutSide: () => void; // note: changed return type to `void`\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nexport const ClickOutsideDiv: FC<ClickOutsideDivProps> = ({\n children,\n onClickOutSide,\n ...props\n}) => {\n const divRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClick = (event: MouseEvent) => {\n // If clicking outside of the referenced element, call onClickOutSide\n if (divRef.current && !divRef.current.contains(event.target as Node)) {\n onClickOutSide();\n }\n };\n\n // Attach the event listener\n document.addEventListener('mousedown', handleClick, { passive: true });\n\n // Clean up on unmount\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, [onClickOutSide]);\n\n return (\n <div ref={divRef} {...props}>\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;AAeO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,SAAS,OAAuB,IAAI;AAE1C,YAAU,MAAM;AACR,UAAA,cAAc,CAAC,UAAsB;AAErC,UAAA,OAAO,WAAW,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAc,GAAG;AACrD,uBAAA;AAAA,MAAA;AAAA,IAEnB;AAGA,aAAS,iBAAiB,aAAa,aAAa,EAAE,SAAS,MAAM;AAGrE,WAAO,MAAM;AACF,eAAA,oBAAoB,aAAa,WAAW;AAAA,IACvD;AAAA,EAAA,GACC,CAAC,cAAc,CAAC;AAEnB,6BACG,OAAI,EAAA,KAAK,QAAS,GAAG,OACnB,UACH;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/ClickOutsideDiv/index.tsx"],"sourcesContent":["'use client';\n\nimport {\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n useEffect,\n useRef,\n} from 'react';\n\nexport type ClickOutsideDivProps = PropsWithChildren<{\n onClickOutSide: () => void; // note: changed return type to `void`\n}> &\n HTMLAttributes<HTMLDivElement>;\n\nexport const ClickOutsideDiv: FC<ClickOutsideDivProps> = ({\n children,\n onClickOutSide,\n ...props\n}) => {\n const divRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClick = (event: MouseEvent) => {\n // If clicking outside of the referenced element, call onClickOutSide\n if (divRef.current && !divRef.current.contains(event.target as Node)) {\n onClickOutSide();\n }\n };\n\n // Attach the event listener\n document.addEventListener('mousedown', handleClick, { passive: true });\n\n // Clean up on unmount\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, [onClickOutSide]);\n\n return (\n <div ref={divRef} {...props}>\n {children}\n </div>\n );\n};\n"],"names":[],"mappings":";;;AAeO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,SAAS,OAAuB,IAAI;AAE1C,YAAU,MAAM;AACd,UAAM,cAAc,CAAC,UAAsB;AAEzC,UAAI,OAAO,WAAW,CAAC,OAAO,QAAQ,SAAS,MAAM,MAAc,GAAG;AACpE,uBAAA;AAAA,MACF;AAAA,IACF;AAGA,aAAS,iBAAiB,aAAa,aAAa,EAAE,SAAS,MAAM;AAGrE,WAAO,MAAM;AACX,eAAS,oBAAoB,aAAa,WAAW;AAAA,IACvD;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,6BACG,OAAA,EAAI,KAAK,QAAS,GAAG,OACnB,UACH;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Command/index.tsx"],"sourcesContent":["/* eslint-disable react/no-unknown-property */\n'use client';\n\nimport {\n Dialog,\n DialogContent,\n type DialogProps,\n} from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport { type ComponentProps, type FC, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const CommandRoot: FC<ComponentProps<typeof CommandPrimitive>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\ntype CommandDialogProps = DialogProps;\n\nconst CommandDialog: FC<CommandDialogProps> = ({ children, ...props }) => (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <CommandRoot className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </CommandRoot>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput: FC<ComponentProps<typeof CommandPrimitive.Input>> = ({\n className,\n ...props\n}) => (\n <div className=\"flex w-full items-center\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n className={cn(\n 'placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList: FC<ComponentProps<typeof CommandPrimitive.List>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.List\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n);\n\nconst CommandEmpty: FC<ComponentProps<typeof CommandPrimitive.Empty>> = (\n props\n) => <CommandPrimitive.Empty className=\"py-6 text-center text-sm\" {...props} />;\n\nconst CommandGroup: FC<ComponentProps<typeof CommandPrimitive.Group>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Group\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator: FC<\n ComponentProps<typeof CommandPrimitive.Separator>\n> = ({ className, ...props }) => (\n <CommandPrimitive.Separator\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem: FC<ComponentProps<typeof CommandPrimitive.Item>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Item\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\n\n/**\n * Usage example:\n * ```jsx\n * <Command>\n * <Command.Trigger>\n * <Command.Input placeholder=\"Search...\" />\n * </Command.Trigger>\n * <Command.Dialog>\n * <Command.List>\n * <Command.Item>Item 1</Command.Item>\n * <Command.Item>Item 2</Command.Item>\n * <Command.Item>Item 3</Command.Item>\n * </Command.List>\n * </Command.Dialog>\n * </Command>\n * ```\n */\nexport const Command = {\n ...CommandRoot,\n Dialog: CommandDialog,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n Separator: CommandSeparator,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n};\n"],"names":["jsx","CommandPrimitive","cn","Dialog","DialogContent","jsxs","Search"],"mappings":";;;;;;;;AAaO,MAAM,cAA2D,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACEA,2BAAA;AAAA,EAACC,KAAA;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAKF,MAAM,gBAAwC,CAAC,EAAE,UAAU,GAAG,MAAM,qCACjEC,YAAAA,QAAQ,EAAA,GAAG,OACV,UAACH,2BAAAA,IAAAI,YAAAA,eAAA,EAAc,WAAU,uBACvB,UAAAJ,2BAAAA,IAAC,eAAY,WAAU,uSACpB,UACH,EAAA,CACF,EACF,CAAA;AAGF,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACGK,2BAAAA,KAAA,OAAA,EAAI,WAAU,4BAA2B,sBAAmB,IAC3D,UAAA;AAAA,EAACL,2BAAAA,IAAAM,YAAA,QAAA,EAAO,WAAU,kCAAkC,CAAA;AAAA,EACpDN,2BAAA;AAAA,IAACC,KAAAA,QAAiB;AAAA,IAAjB;AAAA,MACC,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AACN,GACF;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACEF,2BAAA;AAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA,GAAG,mDAAmD,SAAS;AAAA,IACzE,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,eAAkE,CACtE,UACIF,2BAAAA,IAAAC,KAAA,QAAiB,OAAjB,EAAuB,WAAU,4BAA4B,GAAG,OAAO;AAE7E,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACED,2BAAA;AAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,mBAEF,CAAC,EAAE,WAAW,GAAG,MACnB,MAAAF,2BAAA;AAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA,GAAG,wBAAwB,SAAS;AAAA,IAC9C,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACEF,2BAAA;AAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,GAAG;AACL,MAAuC;AAEnC,SAAAF,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE,SAAA;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ;AAmBO,MAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AACZ;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Command/index.tsx"],"sourcesContent":["/* eslint-disable react/no-unknown-property */\n'use client';\n\nimport {\n Dialog,\n DialogContent,\n type DialogProps,\n} from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport { type ComponentProps, type FC, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const CommandRoot: FC<ComponentProps<typeof CommandPrimitive>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\ntype CommandDialogProps = DialogProps;\n\nconst CommandDialog: FC<CommandDialogProps> = ({ children, ...props }) => (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <CommandRoot className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </CommandRoot>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput: FC<ComponentProps<typeof CommandPrimitive.Input>> = ({\n className,\n ...props\n}) => (\n <div className=\"flex w-full items-center\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n className={cn(\n 'placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList: FC<ComponentProps<typeof CommandPrimitive.List>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.List\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n);\n\nconst CommandEmpty: FC<ComponentProps<typeof CommandPrimitive.Empty>> = (\n props\n) => <CommandPrimitive.Empty className=\"py-6 text-center text-sm\" {...props} />;\n\nconst CommandGroup: FC<ComponentProps<typeof CommandPrimitive.Group>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Group\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator: FC<\n ComponentProps<typeof CommandPrimitive.Separator>\n> = ({ className, ...props }) => (\n <CommandPrimitive.Separator\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem: FC<ComponentProps<typeof CommandPrimitive.Item>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Item\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\n\n/**\n * Usage example:\n * ```jsx\n * <Command>\n * <Command.Trigger>\n * <Command.Input placeholder=\"Search...\" />\n * </Command.Trigger>\n * <Command.Dialog>\n * <Command.List>\n * <Command.Item>Item 1</Command.Item>\n * <Command.Item>Item 2</Command.Item>\n * <Command.Item>Item 3</Command.Item>\n * </Command.List>\n * </Command.Dialog>\n * </Command>\n * ```\n */\nexport const Command = {\n ...CommandRoot,\n Dialog: CommandDialog,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n Separator: CommandSeparator,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n};\n"],"names":["jsx","CommandPrimitive","cn","Dialog","DialogContent","jsxs","Search"],"mappings":";;;;;;;;AAaO,MAAM,cAA2D,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA;AAAAA,EAACC,KAAAA;AAAAA,EAAA;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAKF,MAAM,gBAAwC,CAAC,EAAE,UAAU,GAAG,MAAA,qCAC3DC,YAAAA,QAAA,EAAQ,GAAG,OACV,UAAAH,2BAAAA,IAACI,YAAAA,eAAA,EAAc,WAAU,uBACvB,UAAAJ,2BAAAA,IAAC,eAAY,WAAU,uSACpB,UACH,EAAA,CACF,EAAA,CACF;AAGF,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACEK,2BAAAA,KAAC,OAAA,EAAI,WAAU,4BAA2B,sBAAmB,IAC3D,UAAA;AAAA,EAAAL,2BAAAA,IAACM,YAAAA,QAAA,EAAO,WAAU,kCAAA,CAAkC;AAAA,EACpDN,2BAAAA;AAAAA,IAACC,KAAAA,QAAiB;AAAA,IAAjB;AAAA,MACC,WAAWC,SAAAA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AACN,GACF;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACEF,2BAAAA;AAAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA,GAAG,mDAAmD,SAAS;AAAA,IACzE,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,eAAkE,CACtE,UACGF,2BAAAA,IAACC,KAAAA,QAAiB,OAAjB,EAAuB,WAAU,4BAA4B,GAAG,OAAO;AAE7E,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACED,2BAAAA;AAAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,mBAEF,CAAC,EAAE,WAAW,GAAG,YACnBF,2BAAAA;AAAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA,GAAG,wBAAwB,SAAS;AAAA,IAC9C,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACEF,2BAAAA;AAAAA,EAACC,KAAAA,QAAiB;AAAA,EAAjB;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,GAAG;AACL,MAAuC;AACrC,SACEF,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE,SAAAA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAmBO,MAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AACZ;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Command/index.tsx"],"sourcesContent":["/* eslint-disable react/no-unknown-property */\n'use client';\n\nimport {\n Dialog,\n DialogContent,\n type DialogProps,\n} from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport { type ComponentProps, type FC, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const CommandRoot: FC<ComponentProps<typeof CommandPrimitive>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\ntype CommandDialogProps = DialogProps;\n\nconst CommandDialog: FC<CommandDialogProps> = ({ children, ...props }) => (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <CommandRoot className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </CommandRoot>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput: FC<ComponentProps<typeof CommandPrimitive.Input>> = ({\n className,\n ...props\n}) => (\n <div className=\"flex w-full items-center\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n className={cn(\n 'placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList: FC<ComponentProps<typeof CommandPrimitive.List>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.List\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n);\n\nconst CommandEmpty: FC<ComponentProps<typeof CommandPrimitive.Empty>> = (\n props\n) => <CommandPrimitive.Empty className=\"py-6 text-center text-sm\" {...props} />;\n\nconst CommandGroup: FC<ComponentProps<typeof CommandPrimitive.Group>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Group\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator: FC<\n ComponentProps<typeof CommandPrimitive.Separator>\n> = ({ className, ...props }) => (\n <CommandPrimitive.Separator\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem: FC<ComponentProps<typeof CommandPrimitive.Item>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Item\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\n\n/**\n * Usage example:\n * ```jsx\n * <Command>\n * <Command.Trigger>\n * <Command.Input placeholder=\"Search...\" />\n * </Command.Trigger>\n * <Command.Dialog>\n * <Command.List>\n * <Command.Item>Item 1</Command.Item>\n * <Command.Item>Item 2</Command.Item>\n * <Command.Item>Item 3</Command.Item>\n * </Command.List>\n * </Command.Dialog>\n * </Command>\n * ```\n */\nexport const Command = {\n ...CommandRoot,\n Dialog: CommandDialog,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n Separator: CommandSeparator,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n};\n"],"names":["CommandPrimitive"],"mappings":";;;;;;AAaO,MAAM,cAA2D,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA;AAAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAKF,MAAM,gBAAwC,CAAC,EAAE,UAAU,GAAG,MAAM,0BACjE,QAAQ,EAAA,GAAG,OACV,UAAC,oBAAA,eAAA,EAAc,WAAU,uBACvB,UAAA,oBAAC,eAAY,WAAU,uSACpB,UACH,EAAA,CACF,EACF,CAAA;AAGF,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACG,qBAAA,OAAA,EAAI,WAAU,4BAA2B,sBAAmB,IAC3D,UAAA;AAAA,EAAC,oBAAA,QAAA,EAAO,WAAU,kCAAkC,CAAA;AAAA,EACpD;AAAA,IAACA,UAAiB;AAAA,IAAjB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AACN,GACF;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,mDAAmD,SAAS;AAAA,IACzE,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,eAAkE,CACtE,UACI,oBAAAA,UAAiB,OAAjB,EAAuB,WAAU,4BAA4B,GAAG,OAAO;AAE7E,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,mBAEF,CAAC,EAAE,WAAW,GAAG,MACnB,MAAA;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,wBAAwB,SAAS;AAAA,IAC9C,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,GAAG;AACL,MAAuC;AAEnC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EACN;AAEJ;AAmBO,MAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AACZ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Command/index.tsx"],"sourcesContent":["/* eslint-disable react/no-unknown-property */\n'use client';\n\nimport {\n Dialog,\n DialogContent,\n type DialogProps,\n} from '@radix-ui/react-dialog';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { Search } from 'lucide-react';\nimport { type ComponentProps, type FC, type HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const CommandRoot: FC<ComponentProps<typeof CommandPrimitive>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive\n className={cn(\n 'flex size-full flex-col overflow-hidden rounded-md',\n className\n )}\n {...props}\n />\n);\n\ntype CommandDialogProps = DialogProps;\n\nconst CommandDialog: FC<CommandDialogProps> = ({ children, ...props }) => (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0\">\n <CommandRoot className=\"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5\">\n {children}\n </CommandRoot>\n </DialogContent>\n </Dialog>\n);\n\nconst CommandInput: FC<ComponentProps<typeof CommandPrimitive.Input>> = ({\n className,\n ...props\n}) => (\n <div className=\"flex w-full items-center\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n className={cn(\n 'placeholder:text-muted-foreground outline-hidden flex w-full rounded-md bg-transparent text-sm disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n);\n\nconst CommandList: FC<ComponentProps<typeof CommandPrimitive.List>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.List\n className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n);\n\nconst CommandEmpty: FC<ComponentProps<typeof CommandPrimitive.Empty>> = (\n props\n) => <CommandPrimitive.Empty className=\"py-6 text-center text-sm\" {...props} />;\n\nconst CommandGroup: FC<ComponentProps<typeof CommandPrimitive.Group>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Group\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className\n )}\n {...props}\n />\n);\n\nconst CommandSeparator: FC<\n ComponentProps<typeof CommandPrimitive.Separator>\n> = ({ className, ...props }) => (\n <CommandPrimitive.Separator\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n);\n\nconst CommandItem: FC<ComponentProps<typeof CommandPrimitive.Item>> = ({\n className,\n ...props\n}) => (\n <CommandPrimitive.Item\n className={cn(\n 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground outline-hidden relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50',\n className\n )}\n {...props}\n />\n);\n\nconst CommandShortcut = ({\n className,\n ...props\n}: HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className\n )}\n {...props}\n />\n );\n};\n\n/**\n * Usage example:\n * ```jsx\n * <Command>\n * <Command.Trigger>\n * <Command.Input placeholder=\"Search...\" />\n * </Command.Trigger>\n * <Command.Dialog>\n * <Command.List>\n * <Command.Item>Item 1</Command.Item>\n * <Command.Item>Item 2</Command.Item>\n * <Command.Item>Item 3</Command.Item>\n * </Command.List>\n * </Command.Dialog>\n * </Command>\n * ```\n */\nexport const Command = {\n ...CommandRoot,\n Dialog: CommandDialog,\n Input: CommandInput,\n List: CommandList,\n Empty: CommandEmpty,\n Group: CommandGroup,\n Separator: CommandSeparator,\n Item: CommandItem,\n Shortcut: CommandShortcut,\n};\n"],"names":["CommandPrimitive"],"mappings":";;;;;;AAaO,MAAM,cAA2D,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA;AAAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAKF,MAAM,gBAAwC,CAAC,EAAE,UAAU,GAAG,MAAA,0BAC3D,QAAA,EAAQ,GAAG,OACV,UAAA,oBAAC,eAAA,EAAc,WAAU,uBACvB,UAAA,oBAAC,eAAY,WAAU,uSACpB,UACH,EAAA,CACF,EAAA,CACF;AAGF,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACE,qBAAC,OAAA,EAAI,WAAU,4BAA2B,sBAAmB,IAC3D,UAAA;AAAA,EAAA,oBAAC,QAAA,EAAO,WAAU,kCAAA,CAAkC;AAAA,EACpD;AAAA,IAACA,UAAiB;AAAA,IAAjB;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AACN,GACF;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,mDAAmD,SAAS;AAAA,IACzE,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,eAAkE,CACtE,UACG,oBAACA,UAAiB,OAAjB,EAAuB,WAAU,4BAA4B,GAAG,OAAO;AAE7E,MAAM,eAAkE,CAAC;AAAA,EACvE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,mBAEF,CAAC,EAAE,WAAW,GAAG,YACnB;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW,GAAG,wBAAwB,SAAS;AAAA,IAC9C,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,cAAgE,CAAC;AAAA,EACrE;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAACA,UAAiB;AAAA,EAAjB;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IAAA;AAAA,IAED,GAAG;AAAA,EAAA;AACN;AAGF,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA,GAAG;AACL,MAAuC;AACrC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAmBO,MAAM,UAAU;AAAA,EACrB,GAAG;AAAA,EACH,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU;AACZ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASa,MAAA,oBAAoBA,2BAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":["cva","jsx","cn"],"mappings":";;;;;AASO,MAAM,oBAAoBA,uBAAAA,IAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,IAER,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA;AAAA,IAER,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IAAA;AAAA,IAER,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IAAA;AAAA,IAER,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IAAA;AAAA,IAER,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEC,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AAAA,IAAA;AAAA,IAEF,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":[],"mappings":";;;AASa,MAAA,oBAAoB,IAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,IACA,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IACA,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IACR;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR;AAAA,IACA,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IACX;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IACR;AAAA,IACA,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EAEX;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAA;AAAA,IACH;AAAA,IACC,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/Container/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport {\n type DetailedHTMLProps,\n type FC,\n type HTMLAttributes,\n type PropsWithChildren,\n} from 'react';\nimport { cn } from '../../utils/cn';\n\nexport const containerVariants = cva('flex text-text flex-col backdrop-blur', {\n variants: {\n roundedSize: {\n none: 'rounded-none',\n sm: 'rounded-sm',\n md: 'rounded-md',\n lg: 'rounded-lg',\n xl: 'rounded-xl',\n '2xl': 'rounded-2xl',\n '3xl': 'rounded-3xl',\n full: 'rounded-full',\n },\n transparency: {\n none: 'bg-card',\n sm: 'bg-card/95',\n md: 'bg-card/70',\n lg: 'bg-card/40',\n xl: 'bg-card/20',\n full: '',\n },\n padding: {\n none: 'p-0',\n sm: 'p-1',\n md: 'p-2',\n lg: 'p-3',\n xl: 'p-4',\n },\n separator: {\n without: '',\n x: 'divide-x divide-dashed divide-text/20',\n y: 'divide-y divide-dashed divide-text/20',\n both: 'divide-x divide-y divide-dashed divide-text/20',\n },\n border: {\n none: '',\n with: 'border-[1.5px]',\n },\n borderColor: {\n primary: 'border-primary',\n secondary: 'border-secondary',\n neutral: 'border-neutral',\n text: 'border-text ',\n error: 'border-error',\n warning: 'border-warning',\n success: 'border-success',\n },\n background: {\n none: 'bg-inherit',\n hoverable:\n '!bg-opacity-5 backdrop-blur-0 hover:!bg-opacity-10 hover:backdrop-blur focus:!bg-opacity-10 focus:backdrop-blur aria-selected:!bg-opacity-15 aria-selected:backdrop-blur',\n with: '',\n },\n gap: {\n none: 'gap-0',\n sm: 'gap-1',\n md: 'gap-3',\n lg: 'gap-5',\n xl: 'gap-8',\n '2xl': 'gap-10',\n },\n },\n defaultVariants: {\n roundedSize: 'md',\n border: 'none',\n borderColor: 'text',\n transparency: 'md',\n padding: 'none',\n separator: 'without',\n gap: 'none',\n },\n});\n\nexport type ContainerProps = PropsWithChildren<\n Omit<VariantProps<typeof containerVariants>, 'border'>\n> &\n DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> & {\n border?: boolean;\n };\n\nexport const Container: FC<ContainerProps> = ({\n children,\n roundedSize,\n padding,\n transparency,\n separator,\n className,\n border,\n borderColor,\n background,\n ...props\n}) => (\n <div\n className={cn(\n containerVariants({\n roundedSize,\n transparency,\n padding,\n separator,\n border:\n typeof border === 'boolean' ? (border ? 'with' : 'none') : undefined,\n background,\n borderColor,\n className,\n })\n )}\n {...props}\n >\n {children}\n </div>\n);\n"],"names":[],"mappings":";;;AASO,MAAM,oBAAoB,IAAI,yCAAyC;AAAA,EAC5E,UAAU;AAAA,IACR,aAAa;AAAA,MACX,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,IAER,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA;AAAA,IAER,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,IAEN,WAAW;AAAA,MACT,SAAS;AAAA,MACT,GAAG;AAAA,MACH,GAAG;AAAA,MACH,MAAM;AAAA,IAAA;AAAA,IAER,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IAAA;AAAA,IAER,aAAa;AAAA,MACX,SAAS;AAAA,MACT,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,SAAS;AAAA,MACT,SAAS;AAAA,IAAA;AAAA,IAEX,YAAY;AAAA,MACV,MAAM;AAAA,MACN,WACE;AAAA,MACF,MAAM;AAAA,IAAA;AAAA,IAER,KAAK;AAAA,MACH,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,IAAA;AAAA,EACT;AAAA,EAEF,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,QAAQ;AAAA,IACR,aAAa;AAAA,IACb,cAAc;AAAA,IACd,SAAS;AAAA,IACT,WAAW;AAAA,IACX,KAAK;AAAA,EAAA;AAET,CAAC;AASM,MAAM,YAAgC,CAAC;AAAA,EAC5C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,kBAAkB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,QACE,OAAO,WAAW,YAAa,SAAS,SAAS,SAAU;AAAA,QAC7D;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACD;AAAA,IAAA;AAAA,IAEF,GAAG;AAAA,IAEH;AAAA,EAAA;AACH;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","AutoSizedTextArea","cn","Check","X"],"mappings":";;;;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAGhC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,qCAAA;AAAA,MAAA;AAAA,QACC,WAAWC,SAAA;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACCH,2BAAA,KAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAAC,2BAAA;AAAA,QAACG,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACAH,2BAAA;AAAA,QAACI,YAAA;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditor.cjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","jsxs","jsx","AutoSizedTextArea","cn","Check","X"],"mappings":";;;;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAElC,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,oDACb,UAAA;AAAA,IAAAC,2BAAAA;AAAAA,MAACC,qCAAAA;AAAAA,MAAA;AAAA,QACC,WAAWC,SAAAA;AAAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAAA;AAAA,QAE9B,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAAA;AAAA,IAKN,YACCH,2BAAAA,KAAC,OAAA,EAAI,WAAU,oDACb,UAAA;AAAA,MAAAC,2BAAAA;AAAAA,QAACG,YAAAA;AAAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAEXH,2BAAAA;AAAAA,QAACI,YAAAA;AAAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAGhC,SAAA,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAC9B;AAAA,QACA,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAIP;AAAA,IACC,YACC,qBAAC,OAAI,EAAA,WAAU,oDACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MACX;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"ContentEditor.mjs","sources":["../../../src/components/ContentEditor/ContentEditor.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport { useState, type FC, type ChangeEventHandler } from 'react';\nimport { cn } from '../../utils/cn';\nimport {\n AutoSizedTextArea,\n AutoSizedTextAreaProps,\n} from '../TextArea/AutoSizeTextArea';\n\nexport type ContentEditorProps = {\n children: string;\n onContentChange: (content: string) => void;\n isEditing?: boolean;\n} & AutoSizedTextAreaProps;\n\nexport const ContentEditor: FC<ContentEditorProps> = ({\n children,\n onContentChange,\n isEditing,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.target.value ?? '');\n\n return (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <AutoSizedTextArea\n className={cn(\n 'break-word outline-hidden m-3 inline w-full bg-transparent',\n isEditing ? 'cursor-text' : 'cursor-pointer'\n )}\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n defaultValue={children}\n {...props}\n />\n {isEdited && (\n <div className=\"flex flex-row items-center justify-between gap-2\">\n <Check\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleValid}\n />\n <X\n className=\"cursor-pointer hover:scale-110\"\n size={16}\n onClick={handleCancel}\n />\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,OAAO,SAAS,EAAE;AAElC,SACE,qBAAC,OAAA,EAAI,WAAU,oDACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,YAAY,gBAAgB;AAAA,QAAA;AAAA,QAE9B,UAAU;AAAA,QAEV,SAAQ;AAAA,QACR,cAAc;AAAA,QACb,GAAG;AAAA,MAAA;AAAA,MAHC;AAAA,IAAA;AAAA,IAKN,YACC,qBAAC,OAAA,EAAI,WAAU,oDACb,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAEX;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAM;AAAA,UACN,SAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX,EAAA,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","Input","Fragment","Button","Check","X"],"mappings":";;;;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEM,QAAA,wBAA8D,CAAC,MAAM;AAC7D,gBAAA,EAAE,cAAc,KAAK;AAAA,EACnC;AAEAC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACC,uBAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,cAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACXF,2BAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,2BAAA,KAAAG,qBAAA,EAAA,UAAA;AAAA,YAAAF,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAMC,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAJ,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAME,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAuCtB;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditorInput.cjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useState","useEffect","jsxs","jsx","Input","Fragment","Button","Check","X"],"mappings":";;;;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAA8D,CAAC,MAAM;AACzE,gBAAY,EAAE,cAAc,KAAK;AAAA,EACnC;AAEAC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EACtB,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAACC,uBAAAA;AAAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,cAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAAA;AAAA,SAOL,YAAY,sBACZF,2BAAAA,KAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YACCA,2BAAAA,KAAAG,qBAAA,EACE,UAAA;AAAA,YAAAF,2BAAAA;AAAAA,cAACG,yBAAAA;AAAAA,cAAA;AAAA,gBACC,MAAMC,YAAAA;AAAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,YAEXJ,2BAAAA;AAAAA,cAACG,yBAAAA;AAAAA,cAAA;AAAA,gBACC,MAAME,YAAAA;AAAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAAA;AAyC1B;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEM,QAAA,wBAA8D,CAAC,MAAM;AAC7D,gBAAA,EAAE,cAAc,KAAK;AAAA,EACnC;AAEA,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,cAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACX,qBAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEG,qBAAA,UAAA,EAAA,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAuCtB;AAEJ;"}
1
+ {"version":3,"file":"ContentEditorInput.mjs","sources":["../../../src/components/ContentEditor/ContentEditorInput.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ReactNode,\n useState,\n type FC,\n type ChangeEventHandler,\n useEffect,\n} from 'react';\nimport { Button } from '../Button';\nimport { type InputProps, Input } from '../Input';\n\nexport type ContentEditorInputProps = {\n children: InputProps['value'];\n onContentChange: (content: InputProps['value']) => void;\n disabled?: boolean;\n validate?: (content: InputProps['value']) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<InputProps, 'children'>;\n\nexport const ContentEditorInput: FC<ContentEditorInputProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const [newValue, setNewValue] = useState<InputProps['value']>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLInputElement> = (e) => {\n setNewValue(e.currentTarget.value);\n };\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={String(children)}\n >\n <Input\n onChange={handleOnContentChange}\n key={resetIncrementor}\n aria-label=\"value\"\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAqBO,MAAM,qBAAkD,CAAC;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAA8B,QAAQ;AACtE,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAA8D,CAAC,MAAM;AACzE,gBAAY,EAAE,cAAc,KAAK;AAAA,EACnC;AAEA,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EACtB,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,cAAW;AAAA,YACX,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACb,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAAA;AAAA,SAOL,YAAY,sBACZ,qBAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YACC,qBAAA,UAAA,EACE,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,YAEX;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG,OAAO,QAAQ;AAAA,EAAA;AAyC1B;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useUser","useState","useEffect","jsxs","jsx","AutoCompleteTextarea","Fragment","Button","Check","X"],"mappings":";;;;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,gBAAgB,IAAIA,4BAAQ;AACpC,QAAM,CAAC,UAAU,WAAW,IAAIC,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAA;AAAA,UAACC,yCAAA;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACXF,2BAAA,KAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEGA,2BAAA,KAAAG,qBAAA,EAAA,UAAA;AAAA,YAAAF,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAMC,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACAJ,2BAAA;AAAA,cAACG,yBAAA;AAAA,cAAA;AAAA,gBACC,MAAME,YAAA;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAuCP;AAEJ;;"}
1
+ {"version":3,"file":"ContentEditorTextArea.cjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":["useUser","useState","useEffect","jsxs","jsx","AutoCompleteTextarea","Fragment","Button","Check","X"],"mappings":";;;;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,gBAAA,IAAoBA,4BAAA;AAC5B,QAAM,CAAC,UAAU,WAAW,IAAIC,aAAAA,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAIA,aAAAA,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzCC,eAAAA,UAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EACtB,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAAC,2BAAAA;AAAAA,UAACC,yCAAAA;AAAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAAA;AAAA,SAOL,YAAY,sBACZF,2BAAAA,KAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YACCA,2BAAAA,KAAAG,qBAAA,EACE,UAAA;AAAA,YAAAF,2BAAAA;AAAAA,cAACG,yBAAAA;AAAAA,cAAA;AAAA,gBACC,MAAMC,YAAAA;AAAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,YAEXJ,2BAAAA;AAAAA,cAACG,yBAAAA;AAAAA,cAAA;AAAA,gBACC,MAAME,YAAAA;AAAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAAA;AAyCX;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,EAAE,gBAAgB,IAAI,QAAQ;AACpC,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACA,wBAAA,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EAAA,GACnB,CAAC,QAAQ,CAAC;AAEP,QAAA,UAAU,WAAW,QAAQ,KAAK;AAGtC,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAMP;AAAA,SACE,YAAY,sBACX,qBAAA,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YAEG,qBAAA,UAAA,EAAA,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YACX;AAAA,YACA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EACH,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAuCP;AAEJ;"}
1
+ {"version":3,"file":"ContentEditorTextArea.mjs","sources":["../../../src/components/ContentEditor/ContentEditorTextArea.tsx"],"sourcesContent":["'use client';\n\nimport { Check, X } from 'lucide-react';\nimport {\n type ChangeEventHandler,\n type FC,\n type ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { useUser } from '../../hooks/useUser';\nimport { Button } from '../Button';\nimport { type AutoSizedTextAreaProps, AutoCompleteTextarea } from '../TextArea';\n\nexport type ContentEditorTextAreaProps = {\n children: string;\n onContentChange: (content: string) => void;\n disabled?: boolean;\n validate?: (content: string) => boolean;\n additionalButtons?: ReactNode;\n} & Omit<AutoSizedTextAreaProps, 'children'>;\n\nexport const ContentEditorTextArea: FC<ContentEditorTextAreaProps> = ({\n children,\n onContentChange,\n disabled,\n validate,\n additionalButtons,\n ...props\n}) => {\n const { isAuthenticated } = useUser();\n const [newValue, setNewValue] = useState<string>(children);\n const [resetIncrementor, setResetIncrementor] = useState<number>(0); // To reset the div on cancel\n const isEdited: boolean = newValue !== children;\n\n const handleCancel = () => {\n setNewValue(children);\n setResetIncrementor((prev) => prev + 1);\n };\n const handleValid = () => {\n onContentChange(newValue);\n };\n\n const handleOnContentChange: ChangeEventHandler<HTMLTextAreaElement> = (e) =>\n setNewValue(e.currentTarget.value ?? '');\n\n useEffect(() => {\n setNewValue(children);\n }, [children]);\n\n const isValid = validate?.(newValue) ?? true;\n\n return (\n <div\n className=\"flex size-full flex-col items-center justify-between gap-2\"\n key={children}\n >\n <AutoCompleteTextarea\n onChange={handleOnContentChange}\n key={resetIncrementor}\n variant=\"invisible\"\n className=\"size-full\"\n defaultValue={children}\n isActive={isAuthenticated}\n {...props}\n />\n {(isEdited || additionalButtons) && (\n <div className=\"flex w-full items-center justify-end gap-2\">\n {isEdited && (\n <>\n <Button\n Icon={Check}\n label=\"Validate\"\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n className=\"cursor-pointer hover:scale-110\"\n disabled={disabled || !isValid}\n onClick={handleValid}\n />\n <Button\n Icon={X}\n label=\"Cancel\"\n variant=\"hoverable\"\n size=\"icon-sm\"\n color=\"text\"\n className=\"cursor-pointer hover:scale-110\"\n onClick={handleCancel}\n />\n </>\n )}\n {additionalButtons}\n </div>\n )}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAsBO,MAAM,wBAAwD,CAAC;AAAA,EACpE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,gBAAA,IAAoB,QAAA;AAC5B,QAAM,CAAC,UAAU,WAAW,IAAI,SAAiB,QAAQ;AACzD,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,SAAiB,CAAC;AAClE,QAAM,WAAoB,aAAa;AAEvC,QAAM,eAAe,MAAM;AACzB,gBAAY,QAAQ;AACpB,wBAAoB,CAAC,SAAS,OAAO,CAAC;AAAA,EACxC;AACA,QAAM,cAAc,MAAM;AACxB,oBAAgB,QAAQ;AAAA,EAC1B;AAEA,QAAM,wBAAiE,CAAC,MACtE,YAAY,EAAE,cAAc,SAAS,EAAE;AAEzC,YAAU,MAAM;AACd,gBAAY,QAAQ;AAAA,EACtB,GAAG,CAAC,QAAQ,CAAC;AAEb,QAAM,UAAU,WAAW,QAAQ,KAAK;AAExC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MAGV,UAAA;AAAA,QAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU;AAAA,YAEV,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,cAAc;AAAA,YACd,UAAU;AAAA,YACT,GAAG;AAAA,UAAA;AAAA,UALC;AAAA,QAAA;AAAA,SAOL,YAAY,sBACZ,qBAAC,OAAA,EAAI,WAAU,8CACZ,UAAA;AAAA,UAAA,YACC,qBAAA,UAAA,EACE,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,OAAM;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,UAAU,YAAY,CAAC;AAAA,gBACvB,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,YAEX;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,MAAM;AAAA,gBACN,OAAM;AAAA,gBACN,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,WAAU;AAAA,gBACV,SAAS;AAAA,cAAA;AAAA,YAAA;AAAA,UACX,GACF;AAAA,UAED;AAAA,QAAA,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,IArCG;AAAA,EAAA;AAyCX;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentSelector.cjs","sources":["../../../src/components/ContentSelector/ContentSelector.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, ReactNode } from 'react';\nimport { PressableSpan } from '../PressableSpan';\n\ntype ContentSelectorProps = {\n children: ReactNode;\n onSelect: () => void;\n onUnselect?: () => void;\n isSelecting?: boolean;\n};\n\nexport const ContentSelector: FC<ContentSelectorProps> = ({\n children,\n onSelect,\n onUnselect,\n isSelecting,\n}) => (\n <PressableSpan\n onPress={onSelect}\n onClickOutside={onUnselect}\n isSelecting={isSelecting}\n >\n {children}\n </PressableSpan>\n);\n"],"names":["jsx","PressableSpan"],"mappings":";;;;;AAYO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACEA,2BAAA;AAAA,EAACC,uCAAA;AAAA,EAAA;AAAA,IACC,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB;AAAA,IAEC;AAAA,EAAA;AACH;;"}
1
+ {"version":3,"file":"ContentSelector.cjs","sources":["../../../src/components/ContentSelector/ContentSelector.tsx"],"sourcesContent":["'use client';\n\nimport type { FC, ReactNode } from 'react';\nimport { PressableSpan } from '../PressableSpan';\n\ntype ContentSelectorProps = {\n children: ReactNode;\n onSelect: () => void;\n onUnselect?: () => void;\n isSelecting?: boolean;\n};\n\nexport const ContentSelector: FC<ContentSelectorProps> = ({\n children,\n onSelect,\n onUnselect,\n isSelecting,\n}) => (\n <PressableSpan\n onPress={onSelect}\n onClickOutside={onUnselect}\n isSelecting={isSelecting}\n >\n {children}\n </PressableSpan>\n);\n"],"names":["jsx","PressableSpan"],"mappings":";;;;;AAYO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MACEA,2BAAAA;AAAAA,EAACC,uCAAAA;AAAAA,EAAA;AAAA,IACC,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB;AAAA,IAEC;AAAA,EAAA;AACH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":["useState","useDictionary","copyContentContent","useEffect","jsx","Button","CopyCheckIcon","CopyIcon"],"mappings":";;;;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAIA,aAAAA,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAUC,cAAA,cAAcC,oDAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEAC,eAAAA,UAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAAC,2BAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACC,MAAM,SAASC,YAAAA,gBAAgBC,YAAA;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAC9B;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":["useState","useDictionary","copyContentContent","useEffect","jsx","Button","CopyCheckIcon","CopyIcon"],"mappings":";;;;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAIA,aAAAA,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAUC,cAAAA,cAAcC,oDAAkB;AAElD,QAAM,aAAa,YAAY;AAC7B,QAAI;AACF,YAAM,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,IAChB,SAAS,OAAO;AACd,cAAQ,MAAM,yBAAyB,KAAK;AAAA,IAC9C;AAAA,EACF;AAEAC,eAAAA,UAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,IACjB,GAAG,GAAI;AACP,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,MAAM,CAAC;AAEX,SACEC,2BAAAA;AAAAA,IAACC,yBAAAA;AAAAA,IAAA;AAAA,MACC,MAAM,SAASC,YAAAA,gBAAgBC,YAAAA;AAAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAAA;AAGlC;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAU,cAAc,kBAAkB;AAElD,QAAM,aAAa,YAAY;AACzB,QAAA;AACI,YAAA,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,aACP,OAAO;AACN,cAAA,MAAM,yBAAyB,KAAK;AAAA,IAAA;AAAA,EAEhD;AAEA,YAAU,MAAM;AACR,UAAA,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,OACd,GAAI;AACA,WAAA,MAAM,aAAa,KAAK;AAAA,EAAA,GAC9B,CAAC,MAAM,CAAC;AAGT,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,SAAS,gBAAgB;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAC9B;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyButton/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheckIcon, CopyIcon } from 'lucide-react';\nimport { useEffect, useState, type FC } from 'react';\nimport { useDictionary } from 'react-intlayer';\nimport { Button, ButtonProps } from '../Button';\nimport { copyContentContent } from '../IDE/CopyButton.content';\n\ntype CopyButtonProps = {\n content: string;\n} & Partial<ButtonProps>;\n\nexport const CopyButton: FC<CopyButtonProps> = ({ content, ...props }) => {\n const [copied, setCopied] = useState(false);\n const { label } = useDictionary(copyContentContent);\n\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(content);\n setCopied(true);\n } catch (error) {\n console.error('Failed to copy text: ', error);\n }\n };\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setCopied(false);\n }, 1000);\n return () => clearTimeout(timer);\n }, [copied]);\n\n return (\n <Button\n Icon={copied ? CopyCheckIcon : CopyIcon}\n onClick={handleCopy}\n variant=\"hoverable\"\n color=\"text\"\n size=\"icon-sm\"\n {...props}\n label={props.label ?? label.value}\n />\n );\n};\n"],"names":[],"mappings":";;;;;;;AAYO,MAAM,aAAkC,CAAC,EAAE,SAAS,GAAG,YAAY;AACxE,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,QAAM,EAAE,MAAA,IAAU,cAAc,kBAAkB;AAElD,QAAM,aAAa,YAAY;AAC7B,QAAI;AACF,YAAM,UAAU,UAAU,UAAU,OAAO;AAC3C,gBAAU,IAAI;AAAA,IAChB,SAAS,OAAO;AACd,cAAQ,MAAM,yBAAyB,KAAK;AAAA,IAC9C;AAAA,EACF;AAEA,YAAU,MAAM;AACd,UAAM,QAAQ,WAAW,MAAM;AAC7B,gBAAU,KAAK;AAAA,IACjB,GAAG,GAAI;AACP,WAAO,MAAM,aAAa,KAAK;AAAA,EACjC,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAM,SAAS,gBAAgB;AAAA,MAC/B,SAAS;AAAA,MACT,SAAQ;AAAA,MACR,OAAM;AAAA,MACN,MAAK;AAAA,MACJ,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS,MAAM;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { type FC, type PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span\n className={cn(\n 'inline-block gap-2 hover:cursor-pointer hover:bg-neutral/10 rounded-md p-0.5',\n className\n )}\n onClick={handleCopy}\n >\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["useState","jsxs","cn","jsx","CopyCheck","CopyIcon"],"mappings":";;;;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAGE,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS;AAAA,MAER,UAAA;AAAA,QAAA;AAAA,QAEAC,2BAAA,IAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,2BAAA;AAAA,UAACC,YAAA;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAGZD,2BAAA;AAAA,UAACE,YAAA;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,GAGlB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { type FC, type PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span\n className={cn(\n 'inline-block gap-2 hover:cursor-pointer hover:bg-neutral/10 rounded-md p-0.5',\n className\n )}\n onClick={handleCopy}\n >\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":["useState","jsxs","cn","jsx","CopyCheck","CopyIcon"],"mappings":";;;;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAIA,aAAAA,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAC3C,CAAC;AAAA,EACH;AAEA,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,SAAAA;AAAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,SAAS;AAAA,MAER,UAAA;AAAA,QAAA;AAAA,QAEDC,2BAAAA,IAAC,QAAA,EAAK,WAAU,eACb,mBACE,WACCA,2BAAAA;AAAAA,UAACC,YAAAA;AAAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAGZD,2BAAAA;AAAAA,UAACE,YAAAA;AAAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,GACZ,CAEN;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { type FC, type PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span\n className={cn(\n 'inline-block gap-2 hover:cursor-pointer hover:bg-neutral/10 rounded-md p-0.5',\n className\n )}\n onClick={handleCopy}\n >\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAAA,CAC1C;AAAA,EACH;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS;AAAA,MAER,UAAA;AAAA,QAAA;AAAA,QAEA,oBAAA,QAAA,EAAK,WAAU,eACb,mBACE,WACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAGZ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,GAGlB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../../src/components/CopyToClipboard/index.tsx"],"sourcesContent":["'use client';\n\nimport { CopyCheck, CopyIcon } from 'lucide-react';\nimport { type FC, type PropsWithChildren, useState } from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type CopyToClipboardProps = PropsWithChildren<{\n text: string;\n className?: string;\n}>;\n\nexport const CopyToClipboard: FC<CopyToClipboardProps> = ({\n text,\n children,\n className,\n}) => {\n const [isCopied, setIsCopied] = useState(false);\n\n const handleCopy = () => {\n navigator.clipboard.writeText(text).then(() => {\n setIsCopied(true);\n setTimeout(() => setIsCopied(false), 1000);\n });\n };\n\n return (\n <span\n className={cn(\n 'inline-block gap-2 hover:cursor-pointer hover:bg-neutral/10 rounded-md p-0.5',\n className\n )}\n onClick={handleCopy}\n >\n {children}\n\n <span className=\"inline-flex\">\n {text &&\n (isCopied ? (\n <CopyCheck\n size={12}\n aria-label=\"copied\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1\"\n />\n ) : (\n <CopyIcon\n size={12}\n aria-label=\"copy\"\n role=\"button\"\n data-testid=\"copy-to-clipboard\"\n className=\"ml-1 mt-1 cursor-pointer\"\n />\n ))}\n </span>\n </span>\n );\n};\n"],"names":[],"mappings":";;;;;AAWO,MAAM,kBAA4C,CAAC;AAAA,EACxD;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,aAAa,MAAM;AACvB,cAAU,UAAU,UAAU,IAAI,EAAE,KAAK,MAAM;AAC7C,kBAAY,IAAI;AAChB,iBAAW,MAAM,YAAY,KAAK,GAAG,GAAI;AAAA,IAC3C,CAAC;AAAA,EACH;AAEA,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAEF,SAAS;AAAA,MAER,UAAA;AAAA,QAAA;AAAA,QAED,oBAAC,QAAA,EAAK,WAAU,eACb,mBACE,WACC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,IAGZ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAM;AAAA,YACN,cAAW;AAAA,YACX,MAAK;AAAA,YACL,eAAY;AAAA,YACZ,WAAU;AAAA,UAAA;AAAA,QAAA,GACZ,CAEN;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAIA,6BAAiB;AAC7D,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChDC,YAAAA,mBAAmB;AAErB,QAAM,iBAAiB,gBAAgB;AAGrC,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OACC,EAAA,UAAAC,6BAAA;AAAA,MAACC,qDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,2BAAA;AAAA,MAACG,mDAAA;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACX,qBAAA;AAAA,QAAA;AAAA,MACb;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
1
+ {"version":3,"file":"DictionaryEditor.cjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","useFocusDictionary","jsxs","jsx","createElement","NodeWrapper","SaveForm"],"mappings":";;;;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAA,IAAqBA,6BAAA;AAC5C,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChDC,YAAAA,mBAAA;AAEF,QAAM,iBAAiB,gBAAgB;AAEvC,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,8CACb,UAAA;AAAA,IAAAC,+BAAC,OAAA,EACC,UAAAC,6BAAAA;AAAAA,MAACC,qDAAAA;AAAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAA;AAAA,QACT;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAAA;AAAA,QAElD,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACAF,2BAAAA;AAAAA,MAACG,mDAAAA;AAAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACtB,qBAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAiB,IAAI,iBAAiB;AAC7D,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChD,mBAAmB;AAErB,QAAM,iBAAiB,gBAAgB;AAGrC,SAAA,qBAAC,OAAI,EAAA,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OACC,EAAA,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAC;AAAA,QACV;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAClD;AAAA,QACA,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACX,qBAAA;AAAA,QAAA;AAAA,MACb;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"DictionaryEditor.mjs","sources":["../../../src/components/DictionaryEditor/DictionaryEditor.tsx"],"sourcesContent":["'use client';\n\nimport type { Locales } from '@intlayer/config/client';\nimport type { Dictionary } from '@intlayer/core';\nimport { useEditedContent, useFocusDictionary } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { SaveForm } from '../DictionaryFieldEditor/SaveForm/SaveForm';\nimport { NodeWrapper } from './NodeWrapper';\n\ntype DictionaryEditorProps = {\n dictionary: Dictionary;\n locale: Locales;\n mode: ('local' | 'remote')[];\n onDelete?: () => void;\n};\n\nexport const DictionaryEditor: FC<DictionaryEditorProps> = ({\n dictionary,\n mode,\n onDelete,\n ...props\n}) => {\n const { editedContent, addEditedContent } = useEditedContent();\n const { focusedContent, setFocusedContentKeyPath, setFocusedContent } =\n useFocusDictionary();\n\n const focusedKeyPath = focusedContent?.keyPath;\n\n return (\n <div className=\"flex flex-1 flex-col justify-between gap-2\">\n <div>\n <NodeWrapper\n {...props}\n keyPath={[]}\n dictionary={dictionary}\n key={JSON.stringify(\n (editedContent?.[dictionary.key] ?? dictionary).content\n )}\n editedContent={editedContent?.[dictionary.key]?.content}\n focusedKeyPath={focusedKeyPath}\n section={dictionary.content}\n onContentChange={(content) => {\n addEditedContent(dictionary.key, content.newValue, content.keyPath);\n }}\n onFocusKeyPath={setFocusedContentKeyPath}\n />\n </div>\n <SaveForm\n dictionary={dictionary}\n mode={mode}\n className=\"mb-4 flex-col\"\n onDelete={() => {\n setFocusedContent(null);\n onDelete?.();\n }}\n />\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;AAgBO,MAAM,mBAA8C,CAAC;AAAA,EAC1D;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,EAAE,eAAe,iBAAA,IAAqB,iBAAA;AAC5C,QAAM,EAAE,gBAAgB,0BAA0B,kBAAA,IAChD,mBAAA;AAEF,QAAM,iBAAiB,gBAAgB;AAEvC,SACE,qBAAC,OAAA,EAAI,WAAU,8CACb,UAAA;AAAA,IAAA,oBAAC,OAAA,EACC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS,CAAA;AAAA,QACT;AAAA,QACA,KAAK,KAAK;AAAA,WACP,gBAAgB,WAAW,GAAG,KAAK,YAAY;AAAA,QAAA;AAAA,QAElD,eAAe,gBAAgB,WAAW,GAAG,GAAG;AAAA,QAChD;AAAA,QACA,SAAS,WAAW;AAAA,QACpB,iBAAiB,CAAC,YAAY;AAC5B,2BAAiB,WAAW,KAAK,QAAQ,UAAU,QAAQ,OAAO;AAAA,QACpE;AAAA,QACA,gBAAgB;AAAA,MAAA;AAAA,IAAA,GAEpB;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAU;AAAA,QACV,UAAU,MAAM;AACd,4BAAkB,IAAI;AACtB,qBAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAA;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAAD,2BAAA;AAAA,MAACE,+BAAA;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACEC,2BAAA,KAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAACA,2BAAAA,KAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAA;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACCD,2BAAA,IAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAA,IAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;;"}
1
+ {"version":3,"file":"ItemLayout.cjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":["jsx","cn","Accordion","jsxs"],"mappings":";;;;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACEA,2BAAAA;AAAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,SAAAA;AAAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IAAA;AAAA,IAExB,GAAG;AAAA,IAEJ,UAAAD,2BAAAA;AAAAA,MAACE,+BAAAA;AAAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,eACb,UAAA;AAAA,UAAAA,2BAAAA,KAAC,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAAH,2BAAAA;AAAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAWC,SAAAA;AAAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAAA;AAAA,gBAGf,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAEF,cACCD,2BAAAA,IAAC,OAAA,EAAI,WAAU,gDACZ,UAAA,WAAA,CACH;AAAA,UAAA,GAEJ;AAAA,UACC,eACCA,2BAAAA,IAAC,KAAA,EAAE,WAAU,0BAA0B,UAAA,YAAA,CAAY;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":[],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IACzB;AAAA,IACC,GAAG;AAAA,IAEJ,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACE,qBAAC,OAAI,EAAA,WAAU,eACb,UAAA;AAAA,UAAC,qBAAA,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAChB;AAAA,gBAEC,UAAA;AAAA,cAAA;AAAA,YACH;AAAA,YACC,cACC,oBAAC,OAAI,EAAA,WAAU,gDACZ,UACH,WAAA,CAAA;AAAA,UAAA,GAEJ;AAAA,UACC,eACC,oBAAC,KAAE,EAAA,WAAU,0BAA0B,UAAY,YAAA,CAAA;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;"}
1
+ {"version":3,"file":"ItemLayout.mjs","sources":["../../../src/components/DictionaryEditor/ItemLayout.tsx"],"sourcesContent":["import type { ReactNode, FC, HTMLAttributes } from 'react';\nimport { cn } from '../../utils/cn';\nimport { Accordion } from '../Accordion';\n\ninterface ItemWrapperProps extends HTMLAttributes<HTMLDivElement> {\n level: number;\n children: ReactNode;\n title: string;\n description: string;\n rightParam?: ReactNode;\n isSelected: boolean;\n}\n\nexport const ItemLayout: FC<ItemWrapperProps> = ({\n level,\n title,\n description,\n children,\n rightParam,\n isSelected,\n ...props\n}) => (\n <div\n className={cn(\n 'rounded-md p-2 transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && '',\n isSelected === true && 'bg-card/40'\n )}\n {...props}\n >\n <Accordion\n isOpen={isSelected}\n label={title}\n header={\n <div className=\"flex w-full\">\n <div className=\"flex w-full items-center justify-between\">\n <span\n className={cn(\n level === 0 && 'text-2xl',\n level === 1 && 'text-xl',\n level === 2 && 'text-lg',\n level >= 3 && 'text-base'\n )}\n >\n {title}\n </span>\n {rightParam && (\n <div className=\"flex w-auto items-center justify-between p-3\">\n {rightParam}\n </div>\n )}\n </div>\n {description && (\n <p className=\"text-card pl-3 text-sm\">{description}</p>\n )}\n </div>\n }\n >\n {children}\n </Accordion>\n </div>\n);\n"],"names":[],"mappings":";;;AAaO,MAAM,aAAmC,CAAC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MACE;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,UAAU,KAAK;AAAA,MACf,SAAS,KAAK;AAAA,MACd,eAAe,QAAQ;AAAA,IAAA;AAAA,IAExB,GAAG;AAAA,IAEJ,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,QACE,qBAAC,OAAA,EAAI,WAAU,eACb,UAAA;AAAA,UAAA,qBAAC,OAAA,EAAI,WAAU,4CACb,UAAA;AAAA,YAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW;AAAA,kBACT,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,UAAU,KAAK;AAAA,kBACf,SAAS,KAAK;AAAA,gBAAA;AAAA,gBAGf,UAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAEF,cACC,oBAAC,OAAA,EAAI,WAAU,gDACZ,UAAA,WAAA,CACH;AAAA,UAAA,GAEJ;AAAA,UACC,eACC,oBAAC,KAAA,EAAE,WAAU,0BAA0B,UAAA,YAAA,CAAY;AAAA,QAAA,GAEvD;AAAA,QAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","getContentNodeByKeyPath","NodeType","jsxs","jsx","StringWrapper","content"],"mappings":";;;;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAIA,6BAAiB;AAC9C,QAAM,qBAAqBC,KAAA;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQC,KAAA,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAAC,2BAAA,KAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAACA,2BAAAA,KAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpDC,2BAAA;AAAA,MAACC,sDAAA;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACC,aAAY;AAC5B;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
1
+ {"version":3,"file":"FileWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["useEditedContent","getContentNodeByKeyPath","NodeType","jsxs","jsx","StringWrapper","content"],"mappings":";;;;;;AAcO,MAAM,cAAoC,CAAC,UAAU;AAC1D,QAAM,EAAE,SAAS,QAAA,IAAY;AAC7B,QAAM,EAAE,iBAAA,IAAqBA,6BAAA;AAC7B,QAAM,qBAAqBC,KAAAA;AAAAA,IACzB,MAAM;AAAA,IACN;AAAA,EAAA;AAGF,QAAM,aAAa,QAAQC,KAAAA,SAAS,IAAI;AACxC,QAAM,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAMA,KAAAA,SAAS;AAAA,IAAA;AAAA,EACjB;AAGF,SACEC,2BAAAA,KAAC,OAAA,EAAI,WAAU,wCACb,UAAA;AAAA,IAAAA,2BAAAA,KAAC,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpDC,2BAAAA;AAAAA,MAACC,sDAAAA;AAAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACC,aAAY;AAC5B;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YAAA;AAAA,YAEnB;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"FileWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["content"],"mappings":";;;;AAca,MAAA,cAAoC,CAAC,UAAU;AACpD,QAAA,EAAE,SAAS,QAAA,IAAY;AACvB,QAAA,EAAE,iBAAiB,IAAI,iBAAiB;AAC9C,QAAM,qBAAqB;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EACF;AAEM,QAAA,aAAa,QAAQ,SAAS,IAAI;AAClC,QAAA,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EAEnB;AAGE,SAAA,qBAAC,OAAI,EAAA,WAAU,wCACb,UAAA;AAAA,IAAC,qBAAA,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpD;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACA,aAAY;AAC5B;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YACnB;AAAA,YACA;AAAA,UACF;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"FileWrapper.mjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/FileWrapper.tsx"],"sourcesContent":["import {\n getContentNodeByKeyPath,\n NodeType,\n type FileContent,\n type KeyPath,\n} from '@intlayer/core';\nimport { useEditedContent } from '@intlayer/editor-react';\nimport type { FC } from 'react';\nimport { StringWrapper, type StringWrapperProps } from './StringWrapper';\n\ntype FileWrapperProps = Omit<StringWrapperProps, 'section'> & {\n section: FileContent;\n};\n\nexport const FileWrapper: FC<FileWrapperProps> = (props) => {\n const { keyPath, section } = props;\n const { addEditedContent } = useEditedContent();\n const editedContentValue = getContentNodeByKeyPath(\n props.editedContent,\n keyPath\n ) as FileContent | undefined;\n\n const subSection = section[NodeType.File];\n const { content } = section;\n\n const newKeyPath: KeyPath[] = [\n ...keyPath,\n {\n type: NodeType.File,\n },\n ];\n\n return (\n <div className=\"ml-2 grid grid-cols-[auto,1fr] gap-2\">\n <span className=\"text-neutral text-sm\">{subSection} </span>\n <StringWrapper\n {...props}\n keyPath={newKeyPath}\n section={content}\n editedContentValue={editedContentValue?.content}\n onContentChange={(content) => {\n addEditedContent(\n props.dictionary.key,\n {\n ...section,\n content: content.newValue,\n } as FileContent,\n keyPath\n );\n }}\n />\n </div>\n );\n};\n"],"names":["content"],"mappings":";;;;AAcO,MAAM,cAAoC,CAAC,UAAU;AAC1D,QAAM,EAAE,SAAS,QAAA,IAAY;AAC7B,QAAM,EAAE,iBAAA,IAAqB,iBAAA;AAC7B,QAAM,qBAAqB;AAAA,IACzB,MAAM;AAAA,IACN;AAAA,EAAA;AAGF,QAAM,aAAa,QAAQ,SAAS,IAAI;AACxC,QAAM,EAAE,YAAY;AAEpB,QAAM,aAAwB;AAAA,IAC5B,GAAG;AAAA,IACH;AAAA,MACE,MAAM,SAAS;AAAA,IAAA;AAAA,EACjB;AAGF,SACE,qBAAC,OAAA,EAAI,WAAU,wCACb,UAAA;AAAA,IAAA,qBAAC,QAAA,EAAK,WAAU,wBAAwB,UAAA;AAAA,MAAA;AAAA,MAAW;AAAA,IAAA,GAAC;AAAA,IACpD;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAG;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,oBAAoB,oBAAoB;AAAA,QACxC,iBAAiB,CAACA,aAAY;AAC5B;AAAA,YACE,MAAM,WAAW;AAAA,YACjB;AAAA,cACE,GAAG;AAAA,cACH,SAASA,SAAQ;AAAA,YAAA;AAAA,YAEnB;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const editedContentValue =\n editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n {typeof renderSection === 'function' ? (\n renderSection(content)\n ) : (\n <EditableFieldTextArea\n aria-label=\"Editable field\"\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n )}\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAWO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBACJ,0BAA0BA,6BAAwB,eAAe,OAAO;AAEtE,MAAA,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEACI,UAGF,sFAAA,CAAA;AAAA,EAAA;AAIJ,QAAM,QAAQ,QAAQ;AAEhB,QAAA,UAAU,OAAO,sBAAsB,OAAO;AAGlD,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAChB;AAAA,MACA,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEC,UAAO,OAAA,kBAAkB,aACxB,cAAc,OAAO,IAErBD,2BAAA;AAAA,QAACE,+CAAA;AAAA,QAAA;AAAA,UACC,cAAW;AAAA,UACX,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EAEJ;AAEJ;;"}
1
+ {"version":3,"file":"StringWrapper.cjs","sources":["../../../../src/components/DictionaryEditor/NodeWrapper/StringWrapper.tsx"],"sourcesContent":["import { getContentNodeByKeyPath } from '@intlayer/core';\nimport type { FC } from 'react';\nimport { cn } from '../../../utils/cn';\nimport { EditableFieldTextArea } from '../../EditableField';\nimport type { NodeWrapperProps } from './index';\n\nexport type StringWrapperProps = Omit<NodeWrapperProps, 'section'> & {\n section: string;\n editedContentValue?: string;\n};\n\nexport const StringWrapper: FC<StringWrapperProps> = ({\n keyPath,\n section,\n editedContent,\n editedContentValue: editedContentValueProp,\n onContentChange,\n onFocusKeyPath,\n renderSection,\n}) => {\n const editedContentValue =\n editedContentValueProp ?? getContentNodeByKeyPath(editedContent, keyPath);\n\n if (editedContentValue && typeof editedContentValue !== 'string') {\n return (\n <>\n Error loading section - Edited content Incoherence with the original\n content format\n </>\n );\n }\n\n const level = keyPath.length;\n\n const content = String(editedContentValue ?? section);\n\n return (\n <span\n role=\"button\"\n tabIndex={0}\n className={cn(\n 'w-full rounded-md p-2 text-left transition',\n 'hover:bg-card/30 [&:has(.section:hover)]:bg-transparent',\n level === 2 && 'hover:bg-card/30',\n level >= 3 && ''\n )}\n onClick={(e) => {\n e.stopPropagation();\n onFocusKeyPath(keyPath);\n }}\n >\n {typeof renderSection === 'function' ? (\n renderSection(content)\n ) : (\n <EditableFieldTextArea\n aria-label=\"Editable field\"\n defaultValue={content}\n onSave={(newValue) => onContentChange({ keyPath, newValue })}\n onCancel={() => null}\n />\n )}\n </span>\n );\n};\n"],"names":["getContentNodeByKeyPath","jsx","cn","EditableFieldTextArea"],"mappings":";;;;;;;;;;;AAWO,MAAM,gBAAwC,CAAC;AAAA,EACpD;AAAA,EACA;AAAA,EACA;AAAA,EACA,oBAAoB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,qBACJ,0BAA0BA,6BAAwB,eAAe,OAAO;AAE1E,MAAI,sBAAsB,OAAO,uBAAuB,UAAU;AAChE,iEACI,UAAA,sFAAA,CAGF;AAAA,EAEJ;AAEA,QAAM,QAAQ,QAAQ;AAEtB,QAAM,UAAU,OAAO,sBAAsB,OAAO;AAEpD,SACEC,2BAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,UAAU;AAAA,MACV,WAAWC,SAAAA;AAAAA,QACT;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,QACf,SAAS,KAAK;AAAA,MAAA;AAAA,MAEhB,SAAS,CAAC,MAAM;AACd,UAAE,gBAAA;AACF,uBAAe,OAAO;AAAA,MACxB;AAAA,MAEC,UAAA,OAAO,kBAAkB,aACxB,cAAc,OAAO,IAErBD,2BAAAA;AAAAA,QAACE,+CAAAA;AAAAA,QAAA;AAAA,UACC,cAAW;AAAA,UACX,cAAc;AAAA,UACd,QAAQ,CAAC,aAAa,gBAAgB,EAAE,SAAS,UAAU;AAAA,UAC3D,UAAU,MAAM;AAAA,QAAA;AAAA,MAAA;AAAA,IAClB;AAAA,EAAA;AAIR;;"}