@admin-layout/tailwind-design-pro 11.0.4-alpha.4 → 11.2.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/README.md +471 -1
  2. package/lib/cdm-locales/en/menu.json +2 -1
  3. package/lib/cdm-locales/en/settings.json +40 -1
  4. package/lib/cdm-locales/es/menu.json +2 -1
  5. package/lib/cdm-locales/es/settings.json +42 -3
  6. package/lib/cdm-locales/index.d.ts +2 -0
  7. package/lib/cdm-locales/index.d.ts.map +1 -0
  8. package/lib/cdm-locales/index.ts +1 -0
  9. package/lib/components/LanguageMenu/LanguageMenu.d.ts +2 -1
  10. package/lib/components/LanguageMenu/LanguageMenu.d.ts.map +1 -1
  11. package/lib/components/LanguageMenu/LanguageMenu.js +40 -61
  12. package/lib/components/LanguageMenu/LanguageMenu.js.map +1 -1
  13. package/lib/components/Layout/BasicLayout/index.d.ts +6 -12
  14. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  15. package/lib/components/Layout/BasicLayout/index.js +274 -108
  16. package/lib/components/Layout/BasicLayout/index.js.map +1 -1
  17. package/lib/components/Layout/BasicLayout/utils.d.ts +4 -2
  18. package/lib/components/Layout/BasicLayout/utils.d.ts.map +1 -1
  19. package/lib/components/Layout/BasicLayout/utils.js +80 -109
  20. package/lib/components/Layout/BasicLayout/utils.js.map +1 -1
  21. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts +1 -8
  22. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.d.ts.map +1 -1
  23. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +28 -38
  24. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  25. package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
  26. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
  27. package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
  28. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
  29. package/lib/components/Layout/GlobalHeader/Header.d.ts +1 -15
  30. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  31. package/lib/components/Layout/GlobalHeader/Header.js +107 -65
  32. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  33. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +4 -0
  34. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -0
  35. package/lib/components/Layout/GlobalHeader/MainHeader.js +187 -0
  36. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -0
  37. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts +1 -12
  38. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  39. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
  40. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  41. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +3 -16
  42. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  43. package/lib/components/Layout/GlobalHeader/RightContent.js +86 -0
  44. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -0
  45. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts +4 -0
  46. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -0
  47. package/lib/components/Layout/GlobalHeader/RightMenu.js +248 -0
  48. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -0
  49. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts +9 -0
  50. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -0
  51. package/lib/components/Layout/GlobalHeader/SearchBar.js +109 -0
  52. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -0
  53. package/lib/components/Layout/GlobalHeader/index.d.ts +3 -0
  54. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -0
  55. package/lib/components/Layout/ProTailwindLayout.d.ts +3 -1
  56. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  57. package/lib/components/Layout/ProTailwindLayout.js +77 -12
  58. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  59. package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
  60. package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
  61. package/lib/components/Layout/Sidebar/BottomMenu.js +294 -0
  62. package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
  63. package/lib/components/Layout/Sidebar/Divider.d.ts +2 -31
  64. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  65. package/lib/components/Layout/Sidebar/Divider.js +26 -28
  66. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  67. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +5 -0
  68. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -0
  69. package/lib/components/Layout/Sidebar/DynamicIcon.js +50 -0
  70. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -0
  71. package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
  72. package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
  73. package/lib/components/Layout/Sidebar/MainSidebar.js +224 -0
  74. package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
  75. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
  76. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
  77. package/lib/components/Layout/Sidebar/MainSidebarMenu.js +451 -0
  78. package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
  79. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
  80. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
  81. package/lib/components/Layout/Sidebar/PerplexSidebar.js +254 -0
  82. package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
  83. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
  84. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
  85. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +318 -0
  86. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
  87. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  88. package/lib/components/Layout/TailwindLayout.js +46 -13
  89. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  90. package/lib/components/Layout/getPageTitle.d.ts +1 -16
  91. package/lib/components/Layout/getPageTitle.d.ts.map +1 -1
  92. package/lib/components/Layout/getPageTitle.js +1 -1
  93. package/lib/components/Layout/getPageTitle.js.map +1 -1
  94. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +5 -0
  95. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -0
  96. package/lib/components/Layout/slot-fill/AdditionalSettings.js +7 -0
  97. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -0
  98. package/lib/components/Layout/slot-fill/Footer.d.ts +4 -3
  99. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
  100. package/lib/components/Layout/slot-fill/Footer.js +6 -6
  101. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  102. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
  103. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
  104. package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
  105. package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
  106. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +4 -0
  107. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -0
  108. package/lib/components/Layout/slot-fill/HeaderSearchBar.js +6 -0
  109. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -0
  110. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +4 -0
  111. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -0
  112. package/lib/components/Layout/slot-fill/HeaderSearchButton.js +6 -0
  113. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -0
  114. package/lib/components/Layout/slot-fill/Logo.d.ts +5 -0
  115. package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
  116. package/lib/components/Layout/slot-fill/Logo.js +7 -0
  117. package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
  118. package/lib/components/Layout/slot-fill/RightContent.d.ts +4 -0
  119. package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -0
  120. package/lib/components/Layout/slot-fill/RightContent.js +6 -0
  121. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -0
  122. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +5 -0
  123. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
  124. package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
  125. package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
  126. package/lib/components/Layout/slot-fill/index.d.ts +6 -0
  127. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  128. package/lib/components/Layout/util.d.ts.map +1 -1
  129. package/lib/components/Layout/util.js +12 -0
  130. package/lib/components/Layout/util.js.map +1 -0
  131. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -25
  132. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  133. package/lib/components/SettingDrawer/SettingDrawer.js +203 -382
  134. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  135. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +8 -0
  136. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
  137. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +21 -0
  138. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
  139. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +4 -0
  140. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
  141. package/lib/components/SettingDrawer/components/CheckBoxTheme.js +119 -0
  142. package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
  143. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +8 -0
  144. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
  145. package/lib/components/SettingDrawer/components/DeviceTabs.js +74 -0
  146. package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
  147. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +4 -0
  148. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
  149. package/lib/components/SettingDrawer/components/InvitationSettings.js +72 -0
  150. package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
  151. package/lib/components/SettingDrawer/components/LayoutChange.d.ts +4 -0
  152. package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
  153. package/lib/components/SettingDrawer/components/LayoutChange.js +111 -0
  154. package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
  155. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +21 -0
  156. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
  157. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +106 -0
  158. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
  159. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +4 -0
  160. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
  161. package/lib/components/SettingDrawer/components/NavigationsModes.js +322 -0
  162. package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
  163. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +4 -0
  164. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
  165. package/lib/components/SettingDrawer/components/RegionalSettings.js +519 -0
  166. package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
  167. package/lib/components/SettingDrawer/components/SettingsActions.d.ts +13 -0
  168. package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
  169. package/lib/components/SettingDrawer/components/SettingsActions.js +42 -0
  170. package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
  171. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +5 -0
  172. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
  173. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +22 -0
  174. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
  175. package/lib/components/SettingDrawer/components/Switch.d.ts +4 -0
  176. package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
  177. package/lib/components/SettingDrawer/components/Switch.js +20 -0
  178. package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
  179. package/lib/components/SettingDrawer/components/ThemeColor.d.ts +4 -0
  180. package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
  181. package/lib/components/SettingDrawer/components/ThemeColor.js +45 -0
  182. package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
  183. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +4 -0
  184. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
  185. package/lib/components/SettingDrawer/components/ThemeSelector.js +16 -0
  186. package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
  187. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +4 -0
  188. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
  189. package/lib/components/SettingDrawer/components/WebFontsSelector.js +22 -0
  190. package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
  191. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
  192. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
  193. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +115 -0
  194. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
  195. package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
  196. package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
  197. package/lib/components/SettingDrawer/utils/constants.js +77 -0
  198. package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
  199. package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
  200. package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
  201. package/lib/components/SettingDrawer/utils/helper.js +154 -0
  202. package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
  203. package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
  204. package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
  205. package/lib/components/SettingDrawer/utils/transformers.js +73 -0
  206. package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
  207. package/lib/components/SettingDrawer/utils/types.d.ts +105 -0
  208. package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
  209. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +16 -1
  210. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  211. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
  212. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
  213. package/lib/components/index.d.ts +2 -0
  214. package/lib/components/index.d.ts.map +1 -0
  215. package/lib/components/index.js +1 -0
  216. package/lib/components/index.js.map +1 -0
  217. package/lib/components/typings.d.ts +154 -50
  218. package/lib/components/typings.d.ts.map +1 -1
  219. package/lib/compute.d.ts.map +1 -1
  220. package/lib/compute.js +16 -6
  221. package/lib/compute.js.map +1 -1
  222. package/lib/config/analytics-config.d.ts +59 -0
  223. package/lib/config/analytics-config.d.ts.map +1 -0
  224. package/lib/config/constants.d.ts +8 -0
  225. package/lib/config/constants.d.ts.map +1 -0
  226. package/lib/config/constants.js +32 -0
  227. package/lib/config/constants.js.map +1 -0
  228. package/lib/config/env-config.d.ts +21 -0
  229. package/lib/config/env-config.d.ts.map +1 -1
  230. package/lib/config/env-config.js +86 -1
  231. package/lib/config/env-config.js.map +1 -1
  232. package/lib/config/index.d.ts +3 -0
  233. package/lib/config/index.d.ts.map +1 -0
  234. package/lib/helpers/DynamicIcon.d.ts +8 -5
  235. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  236. package/lib/helpers/DynamicIcon.js +50 -0
  237. package/lib/helpers/DynamicIcon.js.map +1 -0
  238. package/lib/hooks/index.d.ts +3 -0
  239. package/lib/hooks/index.d.ts.map +1 -0
  240. package/lib/hooks/useMediaQuery.d.ts +14 -0
  241. package/lib/hooks/useMediaQuery.d.ts.map +1 -0
  242. package/lib/hooks/useMediaQuery.js +48 -0
  243. package/lib/hooks/useMediaQuery.js.map +1 -0
  244. package/lib/hooks/useScrollThreshold.d.ts +12 -0
  245. package/lib/hooks/useScrollThreshold.d.ts.map +1 -0
  246. package/lib/hooks/useScrollThreshold.js +60 -0
  247. package/lib/hooks/useScrollThreshold.js.map +1 -0
  248. package/lib/hooks/useTailwindTheme.d.ts +34 -0
  249. package/lib/hooks/useTailwindTheme.d.ts.map +1 -0
  250. package/lib/hooks/useTailwindTheme.js +82 -0
  251. package/lib/hooks/useTailwindTheme.js.map +1 -0
  252. package/lib/icons.d.ts +18 -0
  253. package/lib/icons.d.ts.map +1 -0
  254. package/lib/icons.js +14 -0
  255. package/lib/icons.js.map +1 -0
  256. package/lib/index.d.ts +3 -3
  257. package/lib/index.d.ts.map +1 -1
  258. package/lib/index.js +1 -1
  259. package/lib/index.js.map +1 -1
  260. package/lib/machines/selectors.d.ts +118 -0
  261. package/lib/machines/selectors.d.ts.map +1 -0
  262. package/lib/machines/settingsMachine.d.ts +29 -0
  263. package/lib/machines/settingsMachine.d.ts.map +1 -0
  264. package/lib/machines/settingsMachine.js +171 -0
  265. package/lib/machines/settingsMachine.js.map +1 -0
  266. package/lib/machines/types.d.ts +272 -0
  267. package/lib/machines/types.d.ts.map +1 -0
  268. package/lib/machines/types.js +5 -0
  269. package/lib/machines/types.js.map +1 -0
  270. package/lib/module.d.ts +0 -1
  271. package/lib/module.d.ts.map +1 -1
  272. package/lib/module.js +14 -15
  273. package/lib/module.js.map +1 -1
  274. package/lib/redux/index.d.ts +2 -0
  275. package/lib/redux/index.d.ts.map +1 -0
  276. package/lib/redux/searchReducer.d.ts +42 -0
  277. package/lib/redux/searchReducer.d.ts.map +1 -0
  278. package/lib/redux/searchReducer.js +64 -0
  279. package/lib/redux/searchReducer.js.map +1 -0
  280. package/lib/routes.json +10 -1
  281. package/lib/styles/index.css +667 -45
  282. package/lib/tailwindConfig.d.ts +100 -0
  283. package/lib/tailwindConfig.d.ts.map +1 -0
  284. package/lib/tailwindConfig.js +101 -0
  285. package/lib/tailwindConfig.js.map +1 -0
  286. package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
  287. package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
  288. package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
  289. package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
  290. package/lib/utils/__tests__/menu.test.d.ts +2 -0
  291. package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
  292. package/lib/utils/__tests__/selectors.test.d.ts +2 -0
  293. package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
  294. package/lib/utils/__tests__/settingsMachine.test.d.ts +2 -0
  295. package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
  296. package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
  297. package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
  298. package/lib/utils/analytics-utils.d.ts +43 -0
  299. package/lib/utils/analytics-utils.d.ts.map +1 -0
  300. package/lib/utils/analytics.d.ts +48 -0
  301. package/lib/utils/analytics.d.ts.map +1 -0
  302. package/lib/utils/configOverrides.d.ts +213 -0
  303. package/lib/utils/configOverrides.d.ts.map +1 -0
  304. package/lib/utils/configOverrides.js +91 -0
  305. package/lib/utils/configOverrides.js.map +1 -0
  306. package/lib/utils/formateCarData.d.ts +2 -0
  307. package/lib/utils/formateCarData.d.ts.map +1 -0
  308. package/lib/utils/isBrowser/index.js.map +1 -1
  309. package/lib/utils/menu.d.ts.map +1 -1
  310. package/lib/utils/settingsUtils.d.ts +20 -0
  311. package/lib/utils/settingsUtils.d.ts.map +1 -0
  312. package/lib/utils/settingsUtils.js +74 -0
  313. package/lib/utils/settingsUtils.js.map +1 -0
  314. package/lib/utils/test-utils.d.ts.map +1 -1
  315. package/lib/utils/utils/index.d.ts.map +1 -1
  316. package/lib/utils/utils/index.js.map +1 -1
  317. package/package.json +7 -15
  318. package/lib/components/Layout/GlobalFooter/Copyright.js +0 -8
  319. package/lib/components/Layout/GlobalFooter/Copyright.js.map +0 -1
  320. package/lib/components/Layout/GlobalFooter/Footer.js +0 -22
  321. package/lib/components/Layout/GlobalFooter/Footer.js.map +0 -1
  322. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -15
  323. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
  324. package/lib/components/Layout/Sidebar/Sidebar.js +0 -141
  325. package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
  326. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -6
  327. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
  328. package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -89
  329. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
  330. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -8
  331. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
  332. package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -48
  333. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
  334. package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -7
  335. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
  336. package/lib/components/SettingDrawer/LayoutChange.js +0 -69
  337. package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
  338. package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -8
  339. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
  340. package/lib/components/SettingDrawer/RegionalSettings.js +0 -95
  341. package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
  342. package/lib/components/SettingDrawer/Switch/index.d.ts +0 -9
  343. package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
  344. package/lib/components/SettingDrawer/Switch/index.js +0 -39
  345. package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
  346. package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -8
  347. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
  348. package/lib/components/SettingDrawer/ThemeColor.js +0 -32
  349. package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
  350. package/lib/components/defaultSettings.d.ts +0 -4
  351. package/lib/components/defaultSettings.d.ts.map +0 -1
  352. package/lib/components/defaultSettings.js +0 -14
  353. package/lib/components/defaultSettings.js.map +0 -1
  354. package/lib/utils/index.d.ts +0 -2
  355. package/lib/utils/index.d.ts.map +0 -1
  356. package/lib/utils/index.js +0 -13
  357. package/lib/utils/index.js.map +0 -1
@@ -0,0 +1,294 @@
1
+ import React__default,{useState,useRef,useEffect}from'react';import {Link}from'@remix-run/react';import {useAppSelector}from'@admin-layout/client';import {generateMenuPath}from'../util.js';import {renderDynamicIcon}from'../../../helpers/DynamicIcon.js';import switchDialogs from'@app/dialog/WrappedDialogsSwitch';const DialogComponent = ({
2
+ path,
3
+ onClose
4
+ }) => {
5
+ const [dialog, setDialog] = useState(null);
6
+ useEffect(() => {
7
+ if (!dialog) {
8
+ switchDialogs(path).then(component => {
9
+ setDialog(component);
10
+ });
11
+ }
12
+ }, []);
13
+ return dialog ? React__default.createElement(dialog.default, {
14
+ onClose: onClose
15
+ }) : React__default.createElement("div", null, "Loading...");
16
+ };
17
+ const BottomMenu = ({
18
+ menuData,
19
+ routeParams,
20
+ getMenuSeparation,
21
+ scrolled,
22
+ settings,
23
+ authorities,
24
+ isMobile,
25
+ picture
26
+ }) => {
27
+ const [MenusList, setMenusList] = useState();
28
+ const [isOpen, setIsOpen] = useState(false);
29
+ const [openedModalKey, setOpenedModalKey] = React__default.useState(null);
30
+ const menuRef = useRef(null);
31
+ const {
32
+ t
33
+ } = {
34
+ t: key => key
35
+ }; // Mock translation function
36
+ // const cancelRef = React.useRef();
37
+ const {
38
+ profile = {}
39
+ } = useAppSelector(state => state?.user || {});
40
+ const {
41
+ nickname,
42
+ picture: profilePicture
43
+ } = profile || {};
44
+ const onOpen = () => setIsOpen(true);
45
+ const onClose = () => setIsOpen(false);
46
+ const toggleMenu = () => setIsOpen(!isOpen);
47
+ const accountMenuItems = menuData?.find(menu => menu.key === 'account');
48
+ const logoutMenuItems = menuData?.filter(menu => menu.key === 'logout.modal');
49
+ // Handle outside clicks to close the menu
50
+ useEffect(() => {
51
+ const handleClickOutside = event => {
52
+ if (menuRef.current && !menuRef.current.contains(event.target)) {
53
+ setIsOpen(false);
54
+ }
55
+ };
56
+ // Handle escape key to close the menu
57
+ const handleEscKey = event => {
58
+ if (event.key === 'Escape') {
59
+ setIsOpen(false);
60
+ }
61
+ };
62
+ if (isOpen) {
63
+ document.addEventListener('mousedown', handleClickOutside);
64
+ document.addEventListener('keydown', handleEscKey);
65
+ }
66
+ return () => {
67
+ document.removeEventListener('mousedown', handleClickOutside);
68
+ document.removeEventListener('keydown', handleEscKey);
69
+ };
70
+ }, [isOpen]);
71
+ const newMenuData = menuData?.filter(m => !m.hideInMenu)?.map(m => {
72
+ if (!m.hideInMenu) {
73
+ const path = generateMenuPath(m.path, routeParams);
74
+ return {
75
+ ...m,
76
+ path
77
+ };
78
+ }
79
+ });
80
+ useEffect(() => {
81
+ setMenusList(getMenuSeparation(newMenuData));
82
+ }, [authorities]);
83
+ const conversionPath = path => {
84
+ if (path && path.indexOf('http') === 0) {
85
+ return path;
86
+ }
87
+ if (path && path.indexOf('/http') === 0) {
88
+ return path.replace(/^\//g, '');
89
+ }
90
+ return `/${path || ''}`.replace(/\/+/g, '/');
91
+ };
92
+ const getMenuItemModal = item => {
93
+ // const icon = this.getIcon(item.icon);
94
+ const {
95
+ key,
96
+ name,
97
+ icon
98
+ } = item;
99
+ return React__default.createElement("button", {
100
+ onClick: () => {
101
+ setOpenedModalKey(key);
102
+ setIsOpen(false); // Close the dropdown when opening a modal
103
+ },
104
+ className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
105
+ role: "menuitem"
106
+ }, React__default.createElement("div", {
107
+ className: "mr-3"
108
+ }, renderDynamicIcon(icon)), t(name));
109
+ };
110
+ /**
111
+ * Judge whether it is http link.return or a Link
112
+ * @memberOf SiderMenu
113
+ */
114
+ const getMenuItemPath = item => {
115
+ // const { styles = {} } = props;
116
+ const itemPath = conversionPath(item.path);
117
+ // const icon = this.getIcon(item.icon);
118
+ const {
119
+ target,
120
+ name,
121
+ icon
122
+ } = item;
123
+ // Is it a http link
124
+ if (/^https?:\/\//.test(itemPath)) {
125
+ return React__default.createElement("a", {
126
+ href: itemPath,
127
+ target: target,
128
+ onClick: onClose,
129
+ className: "flex items-center w-full p-3 text-foreground hover:bg-muted",
130
+ role: "menuitem"
131
+ }, React__default.createElement("div", {
132
+ className: "mr-3"
133
+ }, renderDynamicIcon(icon), " "), React__default.createElement("span", {
134
+ className: "ml-1"
135
+ }, name));
136
+ }
137
+ return React__default.createElement(Link, {
138
+ to: itemPath,
139
+ onClick: onClose,
140
+ className: "flex items-center w-full px-3 py-2 text-left text-foreground hover:bg-muted",
141
+ role: "menuitem"
142
+ }, React__default.createElement("div", {
143
+ className: "mr-3"
144
+ }, renderDynamicIcon(icon)), name);
145
+ };
146
+ const getMenuModals = () => {
147
+ let dialogMenus = [];
148
+ const upperMenus = MenusList?.upperMenus?.filter(x => x.modal === true);
149
+ const middleMenus = MenusList?.middleMenus?.filter(x => x.modal === true);
150
+ const lowerMenus = MenusList?.lowerMenus?.filter(x => x.modal === true);
151
+ const bottomMenus = MenusList?.bottomMenus?.filter(x => x.modal === true);
152
+ if (upperMenus?.length > 0) dialogMenus = dialogMenus.concat(...upperMenus);
153
+ if (middleMenus?.length > 0) dialogMenus = dialogMenus.concat(...middleMenus);
154
+ if (lowerMenus?.length > 0) dialogMenus = dialogMenus.concat(...lowerMenus);
155
+ if (bottomMenus?.length > 0) dialogMenus = dialogMenus.concat(...bottomMenus);
156
+ return dialogMenus.map((item, k) => {
157
+ const {
158
+ dialogPath,
159
+ key,
160
+ name
161
+ } = item;
162
+ return key === openedModalKey && React__default.createElement("div", {
163
+ key: k,
164
+ className: "fixed inset-0 z-50 overflow-y-auto"
165
+ }, React__default.createElement("div", {
166
+ className: "flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
167
+ }, React__default.createElement("div", {
168
+ className: "fixed inset-0 transition-opacity",
169
+ "aria-hidden": "true"
170
+ }, React__default.createElement("div", {
171
+ className: "absolute inset-0 bg-black bg-opacity-50",
172
+ onClick: () => {
173
+ onClose();
174
+ setOpenedModalKey(null);
175
+ }
176
+ })), React__default.createElement("span", {
177
+ className: "hidden sm:inline-block sm:align-middle sm:h-screen",
178
+ "aria-hidden": "true"
179
+ }, "\u200B"), React__default.createElement("div", {
180
+ className: "inline-block align-bottom rounded-themed-lg text-left overflow-hidden shadow-themed-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full themed-modal",
181
+ role: "dialog",
182
+ "aria-modal": "true",
183
+ "aria-labelledby": "modal-headline"
184
+ }, React__default.createElement("div", {
185
+ className: "px-4 pt-5 pb-4 sm:p-6 sm:pb-4"
186
+ }, React__default.createElement("div", {
187
+ className: "flex justify-end"
188
+ }, React__default.createElement("button", {
189
+ type: "button",
190
+ className: "rounded-themed text-muted-foreground hover:text-foreground focus-themed",
191
+ onClick: () => {
192
+ onClose();
193
+ setOpenedModalKey(null);
194
+ }
195
+ }, React__default.createElement("span", {
196
+ className: "sr-only"
197
+ }, "Close"), React__default.createElement("svg", {
198
+ className: "h-6 w-6",
199
+ xmlns: "http://www.w3.org/2000/svg",
200
+ fill: "none",
201
+ viewBox: "0 0 24 24",
202
+ stroke: "currentColor",
203
+ "aria-hidden": "true"
204
+ }, React__default.createElement("path", {
205
+ strokeLinecap: "round",
206
+ strokeLinejoin: "round",
207
+ strokeWidth: "2",
208
+ d: "M6 18L18 6M6 6l12 12"
209
+ })))), React__default.createElement("div", {
210
+ className: "mt-2"
211
+ }, React__default.createElement(DialogComponent, {
212
+ path: dialogPath,
213
+ onClose: () => {
214
+ onClose();
215
+ setOpenedModalKey(null);
216
+ }
217
+ }))))));
218
+ });
219
+ };
220
+ return React__default.createElement(React__default.Fragment, null, React__default.createElement("div", {
221
+ className: "relative",
222
+ ref: menuRef,
223
+ onMouseEnter: onOpen
224
+ }, React__default.createElement("div", {
225
+ className: "flex items-center gap-2",
226
+ onClick: toggleMenu
227
+ }, React__default.createElement("button", {
228
+ className: `
229
+ inline-flex items-center justify-center bg-muted hover:bg-muted-foreground text-foreground rounded-full h-12 w-12 min-w-[48px] outline-none transform transition-colors duration-200
230
+ `,
231
+ "aria-expanded": "false"
232
+ }, picture ? React__default.createElement("img", {
233
+ src: picture,
234
+ className: "rounded-full",
235
+ alt: "User"
236
+ }) : React__default.createElement("svg", {
237
+ className: "h-6 w-6 text-foreground",
238
+ fill: "none",
239
+ stroke: "currentColor",
240
+ viewBox: "0 0 24 24",
241
+ xmlns: "http://www.w3.org/2000/svg"
242
+ }, React__default.createElement("path", {
243
+ strokeLinecap: "round",
244
+ strokeLinejoin: "round",
245
+ strokeWidth: "2",
246
+ d: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
247
+ }))), isMobile && React__default.createElement("span", {
248
+ className: "text-lg font-medium"
249
+ }, t(nickname))), isOpen && React__default.createElement("div", {
250
+ className: "bg-background absolute bottom-full mb-2 w-72 rounded-themed shadow-themed-lg py-1 themed-dropdown ring-1 ring-border focus:outline-none z-40",
251
+ role: "menu",
252
+ "aria-orientation": "vertical",
253
+ "aria-labelledby": "user-menu"
254
+ }, MenusList?.upperMenus?.map((item, k) => React__default.createElement("div", {
255
+ key: k,
256
+ className: "px-1 py-1"
257
+ }, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), MenusList?.upperMenus?.length > 0 && MenusList?.middleMenus?.length > 0 && React__default.createElement("hr", {
258
+ className: "border-border my-1"
259
+ }), MenusList?.middleMenus?.map((item, k) => React__default.createElement("div", {
260
+ key: k,
261
+ className: "px-1 py-1"
262
+ }, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))), profile && accountMenuItems?.children && React__default.createElement("div", {
263
+ className: "py-2"
264
+ }, accountMenuItems.children.map(item => React__default.createElement(Link, {
265
+ key: item.key,
266
+ className: "flex items-center justify-between px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer transition-colors",
267
+ to: generateMenuPath(item.path, routeParams)
268
+ }, React__default.createElement("div", {
269
+ className: "flex items-center"
270
+ }, React__default.createElement("span", {
271
+ className: "mr-3 text-base"
272
+ }, item.icon), React__default.createElement("span", null, item.name)), item.hasNotification && React__default.createElement("div", {
273
+ className: "w-2 h-2 bg-blue-500 rounded-full"
274
+ })))), profile && React__default.createElement("hr", {
275
+ className: "border-border my-1"
276
+ }), profile && React__default.createElement("div", {
277
+ className: "flex items-center px-4 py-2"
278
+ }, React__default.createElement("div", {
279
+ className: "w-8 h-8 rounded-full bg-red-500 flex items-center justify-center overflow-hidden mr-3"
280
+ }, picture ? React__default.createElement("img", {
281
+ src: picture,
282
+ alt: nickname || 'Guest',
283
+ className: "w-full h-full object-cover"
284
+ }) : React__default.createElement("span", {
285
+ className: "text-white text-sm font-medium"
286
+ }, (nickname || 'Guest').charAt(0).toUpperCase())), React__default.createElement("span", {
287
+ className: "text-sm font-medium"
288
+ }, nickname || 'Guest')), logoutMenuItems?.length > 0 && React__default.createElement("hr", {
289
+ className: "border-border my-1"
290
+ }), logoutMenuItems?.map((item, k) => React__default.createElement("div", {
291
+ key: k,
292
+ className: "px-1 py-1"
293
+ }, item.modal ? getMenuItemModal(item) : getMenuItemPath(item))))), getMenuModals());
294
+ };export{BottomMenu};//# sourceMappingURL=BottomMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomMenu.js","sources":["../../../../src/components/Layout/Sidebar/BottomMenu.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"yTASA,MAAM,eAAe,GAAkB,CAAC;MACpC;;;eAIQ,EAAA,SAAc,IAAI,QAAQ,CAAA,IAAA,CAAA;kBACtB;AACJ,IAAA,IAAA,CAAA,MAAG,EAAA;mBACN,CAAA,IAAA,CAAA,CAAA,IAAA,CAAA,SAAA,IAAA;QACF,SAAI,CAAA,SAAA,CAAA;AAEP,MAAA,CAAA,CAAA;AACJ,IAAE;AAEF,EAAA,CAAA,EAAA,EAAO;SAUH,uBAAkB,CAAA,aAAa,CAAG,MAAA,CAAA,OAA+B,EAAA;IACjE,OAAO,EAAA;AACP,GAAA,CAAA,GAAAA,cAAO,CAAA,aAAc,CAAE,KAAA,EAAA,IAAA,EAAA,YAAqB,CAAK;AACjD,CAAA;AACQ,MAAC,UAAU,GAAC,CAAG;UACvB;AAEA,EAAA,WAAQ;mBACA;UAEF;UACA;aACA;AACN,EAAA,QAAM;AACN,EAAA;MAEA;QACA,CAAA,SAAa,EAAE,YAAA,CAAA,GAAA,QAAA,EAAA;AACX,EAAA,MAAA,CAAA,MAAM,EAAA,SAAA,CAAA,GAAA,QAAsB,CAAA,KAAmB,CAAE;AAC7C,EAAA,MAAA,CAAA,cAAW,EAAC,kBAAmB,GAACA,cAAO,CAAC,QAAQ,CAAC,IAAA,CAAK;kBAClD,MAAA,CAAS,IAAC,CAAA;;AAElB,IAAA;;AAGA,IAAA,CAAA,EAAA,GAAA,IAAM;AACF,GAAA,CAAA;;;AAGJ,IAAA,OAAE,GAAA;oBAE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pC,MAAA,MAAA;AAEA,QAAA,UAAA;;;;AAsBA,MAAA,OAAA,GAAA,KAAA,cAAiB,IAAKA,cAAM,CAAC,aAC1B,CAAA,KAAA,EAAA;QAOf,GAAA,EAAA,CAAA;AAGb,QAAE,SAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,33 +1,4 @@
1
1
  import React from 'react';
2
- interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {
3
- /**
4
- * Text to display in the middle of the divider
5
- */
6
- children?: React.ReactNode;
7
- /**
8
- * Direction of the divider
9
- * @default "horizontal"
10
- */
11
- orientation?: 'horizontal' | 'vertical';
12
- /**
13
- * Whether the divider text is less emphasized
14
- * @default false
15
- */
16
- plain?: boolean;
17
- /**
18
- * Custom className for the divider
19
- */
20
- className?: string;
21
- /**
22
- * Custom style for the divider
23
- */
24
- style?: React.CSSProperties;
25
- /**
26
- * Text alignment
27
- * @default "center"
28
- */
29
- align?: 'left' | 'right' | 'center';
30
- }
31
- export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
32
- export {};
2
+ import { DividerProps } from '../../typings';
3
+ export declare function Divider({ children, orientation, plain, className, style, align, ...props }: DividerProps): React.JSX.Element;
33
4
  //# sourceMappingURL=Divider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;CACvC;AAED,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,WAA0B,EAC1B,KAAa,EACb,SAAS,EACT,KAAK,EACL,KAAgB,EAChB,GAAG,KAAK,EACX,EAAE,YAAY,2CAgEd"}
1
+ {"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,WAA0B,EAC1B,KAAa,EACb,SAAS,EACT,KAAK,EACL,KAAgB,EAChB,GAAG,KAAK,EACX,EAAE,YAAY,qBAgEd"}
@@ -1,4 +1,4 @@
1
- import {jsx,jsxs}from'react/jsx-runtime';import {cn}from'../../../utils/utils/index.js';function Divider({
1
+ import React__default from'react';import {cn}from'../../../utils/utils/index.js';function Divider({
2
2
  children,
3
3
  orientation = 'horizontal',
4
4
  plain = false,
@@ -9,39 +9,37 @@ import {jsx,jsxs}from'react/jsx-runtime';import {cn}from'../../../utils/utils/in
9
9
  }) {
10
10
  // If there's no children, render a simple divider
11
11
  if (!children) {
12
- return jsx("div", {
12
+ return React__default.createElement("div", {
13
13
  className: cn(orientation === 'horizontal' ? 'w-full border-t' : 'h-full border-l', 'border-gray-200 dark:border-gray-700', className),
14
14
  style: style,
15
15
  ...props
16
16
  });
17
17
  }
18
18
  // With children, render a divider with text
19
- return jsxs("div", {
19
+ return React__default.createElement("div", {
20
20
  className: cn('flex items-center w-full', orientation === 'vertical' && 'flex-col h-full', className),
21
21
  style: style,
22
- ...props,
23
- children: [jsx("div", {
24
- className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
25
- 'flex-[30%]': align === 'left' && orientation === 'horizontal',
26
- 'flex-[70%]': align === 'right' && orientation === 'horizontal'
27
- }),
28
- style: {
29
- borderColor: style?.borderColor
30
- }
31
- }), jsx("div", {
32
- className: cn('px-4', orientation === 'vertical' && 'py-4', plain ? 'text-gray-500 font-normal' : 'text-gray-900 font-medium', 'dark:text-gray-300'),
33
- style: {
34
- color: style?.color
35
- },
36
- children: children
37
- }), jsx("div", {
38
- className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
39
- 'flex-[70%]': align === 'left' && orientation === 'horizontal',
40
- 'flex-[30%]': align === 'right' && orientation === 'horizontal'
41
- }),
42
- style: {
43
- borderColor: style?.borderColor
44
- }
45
- })]
46
- });
22
+ ...props
23
+ }, React__default.createElement("div", {
24
+ className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
25
+ 'flex-[30%]': align === 'left' && orientation === 'horizontal',
26
+ 'flex-[70%]': align === 'right' && orientation === 'horizontal'
27
+ }),
28
+ style: {
29
+ borderColor: style?.borderColor
30
+ }
31
+ }), React__default.createElement("div", {
32
+ className: cn('px-4', orientation === 'vertical' && 'py-4', plain ? 'text-gray-500 font-normal' : 'text-gray-900 font-medium', 'dark:text-gray-300'),
33
+ style: {
34
+ color: style?.color
35
+ }
36
+ }, children), React__default.createElement("div", {
37
+ className: cn('border-gray-200 dark:border-gray-700', orientation === 'horizontal' ? 'border-t flex-grow' : 'border-l h-full', {
38
+ 'flex-[70%]': align === 'left' && orientation === 'horizontal',
39
+ 'flex-[30%]': align === 'right' && orientation === 'horizontal'
40
+ }),
41
+ style: {
42
+ borderColor: style?.borderColor
43
+ }
44
+ }));
47
45
  }export{Divider};//# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":"wFAiCM,SAAU,OAAO,CAAC;UAS8B;aACrC,GAAA,YAAG;AACZ,EAAA,KAAA,GAAA,KAAO;WAWV;OAE2C;AAC5C,EAAA,KAAA,GAAA,QAEQ;AASY,EAAA,GAAA;AACA,CAAA,EAAA;;;AAKP,IAAA,OAAAA,GAAA,CAAA,KAEL,EAAA;oBAQQ,WAAY,KAAO,YAAA,GAAA,iBAAA,GAAA,iBAAA,EAAA,sCAAA,EAAA,SAAA,CAAA;kBAGtB;AAOO,MAAA,GAAA;AACA,KAAA,CAAA;;;mBAMV,EAAA;AAGd,IAAC,SAAA,EAAA,EAAA,CAAA,0BAAA,EAAA,WAAA,KAAA,UAAA,IAAA,iBAAA,EAAA,SAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Divider.js","sources":["../../../../src/components/Layout/Sidebar/Divider.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"iFAIM,SAAU,OAAO,CAAC;UASpB;aACK,GAAA,YAAW;AACZ,EAAA,KAAA,GAAA,KAAO;WAWV;OAED;OACA,GAAA;AAMQ,EAAA,GAAA;AAKY,CAAA,EAAA;AACA;eAEP;yBAEG,CAAA,aAAa,CAAA,KAAO,EAAA;eACvB,EACH,EAAA,CAAA,WAAA,KAAA,YAAA,GAAA,iBAAA,GAAA,iBAAA,EAAA,sCAAA,EAAA,SAAA,CAAA;WACF,EAAA,KAAA;;AASK,KAAA,CAAA;AAIL,EAAA;AAKY;AACA,EAAA,OAAAA,cAAA,CAAA,aAAY,MAAE,EAAK;aACtB,EACJ,6BACM,EAAA,WAAA,KAAA,UAAA,IAAA,iBAAA,EAAA,SAAA,CAAA;gBACH;;AAKpB,GAAC,EAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { DynamicTypeIconsProps } from '../../typings';
3
+ export declare const renderDynamicIcon: (icon: any) => React.JSX.Element;
4
+ export declare const DynamicIcon: React.FC<DynamicTypeIconsProps>;
5
+ //# sourceMappingURL=DynamicIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEtD,eAAO,MAAM,iBAAiB,GAAI,SAAI,sBAQrC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuCvD,CAAC"}
@@ -0,0 +1,50 @@
1
+ import React__default,{useState,useEffect}from'react';import selectiveIcons from'@app/selectiveIcons';const renderDynamicIcon = icon => {
2
+ if (typeof icon === 'object') {
3
+ return React__default.createElement(DynamicIcon, {
4
+ icon: icon.name,
5
+ iconStyle: icon.style
6
+ });
7
+ } else if (typeof icon === 'string') {
8
+ return React__default.createElement(DynamicIcon, {
9
+ icon: icon
10
+ });
11
+ } else {
12
+ return null;
13
+ }
14
+ };
15
+ const DynamicIcon = React__default.memo(({
16
+ icon,
17
+ iconStyle,
18
+ ...props
19
+ }) => {
20
+ const [IconComponent, setIconComponent] = useState(null);
21
+ useEffect(() => {
22
+ const loadIcon = () => {
23
+ if (!IconComponent) {
24
+ const selectedIcon = selectiveIcons(icon);
25
+ selectedIcon.then(module => {
26
+ if (typeof module.default === 'object') {
27
+ setIconComponent(() => module.default[icon]);
28
+ } else {
29
+ setIconComponent(() => module.default);
30
+ }
31
+ }).catch(err => {
32
+ setIconComponent(null);
33
+ });
34
+ }
35
+ };
36
+ loadIcon();
37
+ }, []);
38
+ if (!IconComponent) return null;
39
+ return React__default.createElement("div", {
40
+ style: {
41
+ margin: '0px',
42
+ display: 'flex'
43
+ }
44
+ }, IconComponent && React__default.createElement(IconComponent, {
45
+ style: {
46
+ ...iconStyle
47
+ },
48
+ ...props
49
+ }));
50
+ }, (prevProps, nextProps) => prevProps.icon === nextProps.icon);export{DynamicIcon,renderDynamicIcon};//# sourceMappingURL=DynamicIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DynamicIcon.js","sources":["../../../../src/components/Layout/Sidebar/DynamicIcon.tsx"],"sourcesContent":[null],"names":["React"],"mappings":"sGAKO,MAAM,iBAAiB,GAAG,IAAC,IAAM;AACpC,EAAA,IAAA,OAAI,IAAO,KAAI,QAAK,EAAQ;AACxB,IAAA,OAAAA,cAAO,CAAA,aAAA,CAAA,WAAC,EAAA;MACX,IAAA,EAAA,IAAA,CAAA,IAAA;AAAM,MAAA,SAAI,EAAA,IAAO,CAAA;AACd,KAAA,CAAA;SACH,IAAA,OAAA,IAAA,KAAA,QAAA,EAAA;WAAOA,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AACJ,MAAA,IAAA,EAAA;KACH,CAAA;AACL,EAAE,CAAA,MAAA;AAEF,IAAA,OAAO,IAAM;;;AAID,MAAA,WAAc,GAAGA,cAAK,CAAA,IAAA,CAAA,CAAA;;AAEd,EAAA,SAAA;;AAEK,CAAA,KAAA;AACG,EAAA,MAAA,CAAA,aAAA,EAAI,4BAA0B,CAAA,IAAA,CAAQ;;qBAErC,MAAA;0BAAO;0BACJ,GAAA,eAAoB;oBACxB,CAAC,IAAA,CAAA,MAAA,IAAA;AACL,UAAA,IAAA,OAAE,MAAA,CAAA,OAAA,KAAA,QAAA,EAAA;AACD,YAAA,gBAAO,CAAA,MAAO,MAAA,CAAA,OAAA,CAAA,IAAA,CAAA,CAAA;;AAEf,YAAA,gBAAG,CAAA,MAAA,MAAA,CAAA,OAAA,CAAA;;AAEf,QAAA,CAAC,CAAC,CAAA,KAAA,CAAA,GAAA,IAAA;AACF,UAAA,gBAAW,CAAA,IAAA,CAAA;QACZ,CAAE,CAAC;AAEN,MAAA;AAAoB,IAAA,CAAA;IAEpB,QACI;AAIgB,EAAA,CAAA,EAAA,EAAA,CAAA;AACH,EAAA,IAAA,CAAA,aACQ,EACX,OAGZ,IAAA;AACN,SACCA,cAAS,CAAE,aAAa,CAAC,KAAA,EAAA;;;;;;;;;;;"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { SidebarProps } from '../../typings';
3
+ export declare const MainSidebar: React.FC<SidebarProps>;
4
+ export default MainSidebar;
5
+ //# sourceMappingURL=MainSidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MainSidebar.d.ts","sourceRoot":"","sources":["../../../../src/components/Layout/Sidebar/MainSidebar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAO7C,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoR9C,CAAC;AAEF,eAAe,WAAW,CAAC"}