@admin-layout/tailwind-design-pro 10.1.1-alpha.9 → 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 (443) hide show
  1. package/README.md +376 -250
  2. package/lib/cdm-locales/en/menu.json +2 -1
  3. package/lib/cdm-locales/en/settings.json +6 -1
  4. package/lib/cdm-locales/es/menu.json +2 -1
  5. package/lib/cdm-locales/es/settings.json +6 -1
  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 -5
  14. package/lib/components/Layout/BasicLayout/index.d.ts.map +1 -1
  15. package/lib/components/Layout/BasicLayout/index.js +255 -175
  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.map +1 -1
  22. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js +28 -38
  23. package/lib/components/Layout/GlobalFooter/BottomMenuDropdown.js.map +1 -1
  24. package/lib/components/Layout/GlobalFooter/Copyright.d.ts +2 -1
  25. package/lib/components/Layout/GlobalFooter/Copyright.d.ts.map +1 -1
  26. package/lib/components/Layout/GlobalFooter/Footer.d.ts +2 -1
  27. package/lib/components/Layout/GlobalFooter/Footer.d.ts.map +1 -1
  28. package/lib/components/Layout/GlobalHeader/Header.d.ts +0 -1
  29. package/lib/components/Layout/GlobalHeader/Header.d.ts.map +1 -1
  30. package/lib/components/Layout/GlobalHeader/Header.js +82 -66
  31. package/lib/components/Layout/GlobalHeader/Header.js.map +1 -1
  32. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts +0 -2
  33. package/lib/components/Layout/GlobalHeader/MainHeader.d.ts.map +1 -1
  34. package/lib/components/Layout/GlobalHeader/MainHeader.js +119 -162
  35. package/lib/components/Layout/GlobalHeader/MainHeader.js.map +1 -1
  36. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.d.ts.map +1 -1
  37. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js +26 -30
  38. package/lib/components/Layout/GlobalHeader/OrganizationDropdown.js.map +1 -1
  39. package/lib/components/Layout/GlobalHeader/RightContent.d.ts +1 -0
  40. package/lib/components/Layout/GlobalHeader/RightContent.d.ts.map +1 -1
  41. package/lib/components/Layout/GlobalHeader/RightContent.js +82 -19
  42. package/lib/components/Layout/GlobalHeader/RightContent.js.map +1 -1
  43. package/lib/components/Layout/GlobalHeader/RightMenu.d.ts.map +1 -1
  44. package/lib/components/Layout/GlobalHeader/RightMenu.js +116 -158
  45. package/lib/components/Layout/GlobalHeader/RightMenu.js.map +1 -1
  46. package/lib/components/Layout/GlobalHeader/SearchBar.d.ts.map +1 -1
  47. package/lib/components/Layout/GlobalHeader/SearchBar.js +36 -45
  48. package/lib/components/Layout/GlobalHeader/SearchBar.js.map +1 -1
  49. package/lib/components/Layout/GlobalHeader/index.d.ts +0 -1
  50. package/lib/components/Layout/GlobalHeader/index.d.ts.map +1 -1
  51. package/lib/components/Layout/ProTailwindLayout.d.ts +2 -2
  52. package/lib/components/Layout/ProTailwindLayout.d.ts.map +1 -1
  53. package/lib/components/Layout/ProTailwindLayout.js +70 -9
  54. package/lib/components/Layout/ProTailwindLayout.js.map +1 -1
  55. package/lib/components/Layout/Sidebar/BottomMenu.d.ts +4 -0
  56. package/lib/components/Layout/Sidebar/BottomMenu.d.ts.map +1 -0
  57. package/lib/components/Layout/Sidebar/BottomMenu.js +294 -0
  58. package/lib/components/Layout/Sidebar/BottomMenu.js.map +1 -0
  59. package/lib/components/Layout/Sidebar/Divider.d.ts +2 -1
  60. package/lib/components/Layout/Sidebar/Divider.d.ts.map +1 -1
  61. package/lib/components/Layout/Sidebar/Divider.js +26 -28
  62. package/lib/components/Layout/Sidebar/Divider.js.map +1 -1
  63. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts +1 -1
  64. package/lib/components/Layout/Sidebar/DynamicIcon.d.ts.map +1 -1
  65. package/lib/components/Layout/Sidebar/DynamicIcon.js +10 -11
  66. package/lib/components/Layout/Sidebar/DynamicIcon.js.map +1 -1
  67. package/lib/components/Layout/Sidebar/MainSidebar.d.ts +5 -0
  68. package/lib/components/Layout/Sidebar/MainSidebar.d.ts.map +1 -0
  69. package/lib/components/Layout/Sidebar/MainSidebar.js +224 -0
  70. package/lib/components/Layout/Sidebar/MainSidebar.js.map +1 -0
  71. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts +6 -0
  72. package/lib/components/Layout/Sidebar/MainSidebarMenu.d.ts.map +1 -0
  73. package/lib/components/Layout/Sidebar/MainSidebarMenu.js +451 -0
  74. package/lib/components/Layout/Sidebar/MainSidebarMenu.js.map +1 -0
  75. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts +4 -0
  76. package/lib/components/Layout/Sidebar/PerplexSidebar.d.ts.map +1 -0
  77. package/lib/components/Layout/Sidebar/PerplexSidebar.js +254 -0
  78. package/lib/components/Layout/Sidebar/PerplexSidebar.js.map +1 -0
  79. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts +4 -0
  80. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.d.ts.map +1 -0
  81. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js +318 -0
  82. package/lib/components/Layout/Sidebar/PerplexSidebarMenu.js.map +1 -0
  83. package/lib/components/Layout/TailwindLayout.d.ts.map +1 -1
  84. package/lib/components/Layout/TailwindLayout.js +37 -20
  85. package/lib/components/Layout/TailwindLayout.js.map +1 -1
  86. package/lib/components/Layout/getPageTitle.js.map +1 -1
  87. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts +3 -2
  88. package/lib/components/Layout/slot-fill/AdditionalSettings.d.ts.map +1 -1
  89. package/lib/components/Layout/slot-fill/AdditionalSettings.js +2 -2
  90. package/lib/components/Layout/slot-fill/AdditionalSettings.js.map +1 -1
  91. package/lib/components/Layout/slot-fill/Footer.d.ts +3 -2
  92. package/lib/components/Layout/slot-fill/Footer.d.ts.map +1 -1
  93. package/lib/components/Layout/slot-fill/Footer.js +2 -2
  94. package/lib/components/Layout/slot-fill/Footer.js.map +1 -1
  95. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts +3 -2
  96. package/lib/components/Layout/slot-fill/HeaderNotice.d.ts.map +1 -1
  97. package/lib/components/Layout/slot-fill/HeaderNotice.js +7 -0
  98. package/lib/components/Layout/slot-fill/HeaderNotice.js.map +1 -0
  99. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts +2 -1
  100. package/lib/components/Layout/slot-fill/HeaderSearchBar.d.ts.map +1 -1
  101. package/lib/components/Layout/slot-fill/HeaderSearchBar.js +2 -2
  102. package/lib/components/Layout/slot-fill/HeaderSearchBar.js.map +1 -1
  103. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts +2 -1
  104. package/lib/components/Layout/slot-fill/HeaderSearchButton.d.ts.map +1 -1
  105. package/lib/components/Layout/slot-fill/HeaderSearchButton.js +2 -2
  106. package/lib/components/Layout/slot-fill/HeaderSearchButton.js.map +1 -1
  107. package/lib/components/Layout/slot-fill/Logo.d.ts +5 -0
  108. package/lib/components/Layout/slot-fill/Logo.d.ts.map +1 -0
  109. package/lib/components/Layout/slot-fill/Logo.js +7 -0
  110. package/lib/components/Layout/slot-fill/Logo.js.map +1 -0
  111. package/lib/components/Layout/slot-fill/RightContent.d.ts +2 -1
  112. package/lib/components/Layout/slot-fill/RightContent.d.ts.map +1 -1
  113. package/lib/components/Layout/slot-fill/RightContent.js +2 -2
  114. package/lib/components/Layout/slot-fill/RightContent.js.map +1 -1
  115. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts +5 -0
  116. package/lib/components/Layout/slot-fill/SideMenuLogo.d.ts.map +1 -0
  117. package/lib/components/Layout/slot-fill/SideMenuLogo.js +7 -0
  118. package/lib/components/Layout/slot-fill/SideMenuLogo.js.map +1 -0
  119. package/lib/components/Layout/slot-fill/index.d.ts +2 -0
  120. package/lib/components/Layout/slot-fill/index.d.ts.map +1 -1
  121. package/lib/components/Layout/util.js +1 -1
  122. package/lib/components/Layout/util.js.map +1 -1
  123. package/lib/components/SettingDrawer/SettingDrawer.d.ts +2 -2
  124. package/lib/components/SettingDrawer/SettingDrawer.d.ts.map +1 -1
  125. package/lib/components/SettingDrawer/SettingDrawer.js +190 -499
  126. package/lib/components/SettingDrawer/SettingDrawer.js.map +1 -1
  127. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts +8 -0
  128. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.d.ts.map +1 -0
  129. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js +21 -0
  130. package/lib/components/SettingDrawer/components/ApplyToAllRoutesToggle.js.map +1 -0
  131. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts +4 -0
  132. package/lib/components/SettingDrawer/components/CheckBoxTheme.d.ts.map +1 -0
  133. package/lib/components/SettingDrawer/components/CheckBoxTheme.js +119 -0
  134. package/lib/components/SettingDrawer/components/CheckBoxTheme.js.map +1 -0
  135. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts +8 -0
  136. package/lib/components/SettingDrawer/components/DeviceTabs.d.ts.map +1 -0
  137. package/lib/components/SettingDrawer/components/DeviceTabs.js +74 -0
  138. package/lib/components/SettingDrawer/components/DeviceTabs.js.map +1 -0
  139. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts +4 -0
  140. package/lib/components/SettingDrawer/components/InvitationSettings.d.ts.map +1 -0
  141. package/lib/components/SettingDrawer/components/InvitationSettings.js +72 -0
  142. package/lib/components/SettingDrawer/components/InvitationSettings.js.map +1 -0
  143. package/lib/components/SettingDrawer/components/LayoutChange.d.ts +4 -0
  144. package/lib/components/SettingDrawer/components/LayoutChange.d.ts.map +1 -0
  145. package/lib/components/SettingDrawer/components/LayoutChange.js +111 -0
  146. package/lib/components/SettingDrawer/components/LayoutChange.js.map +1 -0
  147. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts +21 -0
  148. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.d.ts.map +1 -0
  149. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js +106 -0
  150. package/lib/components/SettingDrawer/components/MenuVisibilitySettings.js.map +1 -0
  151. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts +4 -0
  152. package/lib/components/SettingDrawer/components/NavigationsModes.d.ts.map +1 -0
  153. package/lib/components/SettingDrawer/components/NavigationsModes.js +322 -0
  154. package/lib/components/SettingDrawer/components/NavigationsModes.js.map +1 -0
  155. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts +4 -0
  156. package/lib/components/SettingDrawer/components/RegionalSettings.d.ts.map +1 -0
  157. package/lib/components/SettingDrawer/components/RegionalSettings.js +519 -0
  158. package/lib/components/SettingDrawer/components/RegionalSettings.js.map +1 -0
  159. package/lib/components/SettingDrawer/components/SettingsActions.d.ts +13 -0
  160. package/lib/components/SettingDrawer/components/SettingsActions.d.ts.map +1 -0
  161. package/lib/components/SettingDrawer/components/SettingsActions.js +42 -0
  162. package/lib/components/SettingDrawer/components/SettingsActions.js.map +1 -0
  163. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts +5 -0
  164. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.d.ts.map +1 -0
  165. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js +22 -0
  166. package/lib/components/SettingDrawer/components/SettingsDrawerHeader.js.map +1 -0
  167. package/lib/components/SettingDrawer/components/Switch.d.ts +4 -0
  168. package/lib/components/SettingDrawer/components/Switch.d.ts.map +1 -0
  169. package/lib/components/SettingDrawer/components/Switch.js +20 -0
  170. package/lib/components/SettingDrawer/components/Switch.js.map +1 -0
  171. package/lib/components/SettingDrawer/components/ThemeColor.d.ts +4 -0
  172. package/lib/components/SettingDrawer/components/ThemeColor.d.ts.map +1 -0
  173. package/lib/components/SettingDrawer/components/ThemeColor.js +45 -0
  174. package/lib/components/SettingDrawer/components/ThemeColor.js.map +1 -0
  175. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts +4 -0
  176. package/lib/components/SettingDrawer/components/ThemeSelector.d.ts.map +1 -0
  177. package/lib/components/SettingDrawer/components/ThemeSelector.js +16 -0
  178. package/lib/components/SettingDrawer/components/ThemeSelector.js.map +1 -0
  179. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts +4 -0
  180. package/lib/components/SettingDrawer/components/WebFontsSelector.d.ts.map +1 -0
  181. package/lib/components/SettingDrawer/components/WebFontsSelector.js +22 -0
  182. package/lib/components/SettingDrawer/components/WebFontsSelector.js.map +1 -0
  183. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts +18 -0
  184. package/lib/components/SettingDrawer/hooks/useSettingsOperations.d.ts.map +1 -0
  185. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js +115 -0
  186. package/lib/components/SettingDrawer/hooks/useSettingsOperations.js.map +1 -0
  187. package/lib/components/SettingDrawer/utils/constants.d.ts +11 -0
  188. package/lib/components/SettingDrawer/utils/constants.d.ts.map +1 -0
  189. package/lib/components/SettingDrawer/utils/constants.js +77 -0
  190. package/lib/components/SettingDrawer/utils/constants.js.map +1 -0
  191. package/lib/components/SettingDrawer/utils/helper.d.ts +37 -0
  192. package/lib/components/SettingDrawer/utils/helper.d.ts.map +1 -0
  193. package/lib/components/SettingDrawer/utils/helper.js +154 -0
  194. package/lib/components/SettingDrawer/utils/helper.js.map +1 -0
  195. package/lib/components/SettingDrawer/utils/transformers.d.ts +15 -0
  196. package/lib/components/SettingDrawer/utils/transformers.d.ts.map +1 -0
  197. package/lib/components/SettingDrawer/utils/transformers.js +73 -0
  198. package/lib/components/SettingDrawer/utils/transformers.js.map +1 -0
  199. package/lib/components/SettingDrawer/{types.d.ts → utils/types.d.ts} +14 -0
  200. package/lib/components/SettingDrawer/utils/types.d.ts.map +1 -0
  201. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts +13 -4
  202. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.d.ts.map +1 -1
  203. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js +97 -4
  204. package/lib/components/UpdateSettingsResource/UpdateSettingsResource.server.js.map +1 -1
  205. package/lib/components/index.d.ts +0 -2
  206. package/lib/components/index.d.ts.map +1 -1
  207. package/lib/components/index.js +1 -1
  208. package/lib/components/typings.d.ts +20 -6
  209. package/lib/components/typings.d.ts.map +1 -1
  210. package/lib/compute.d.ts.map +1 -1
  211. package/lib/compute.js +10 -2
  212. package/lib/compute.js.map +1 -1
  213. package/lib/config/analytics-config.d.ts +59 -0
  214. package/lib/config/analytics-config.d.ts.map +1 -0
  215. package/lib/config/constants.js.map +1 -1
  216. package/lib/config/env-config.d.ts +6 -0
  217. package/lib/config/env-config.d.ts.map +1 -1
  218. package/lib/config/env-config.js +21 -1
  219. package/lib/config/env-config.js.map +1 -1
  220. package/lib/config/index.d.ts +3 -0
  221. package/lib/config/index.d.ts.map +1 -0
  222. package/lib/helpers/DynamicIcon.d.ts +1 -1
  223. package/lib/helpers/DynamicIcon.d.ts.map +1 -1
  224. package/lib/helpers/DynamicIcon.js +16 -17
  225. package/lib/helpers/DynamicIcon.js.map +1 -1
  226. package/lib/hooks/index.d.ts +0 -3
  227. package/lib/hooks/index.d.ts.map +1 -1
  228. package/lib/hooks/useMediaQuery.js.map +1 -1
  229. package/lib/hooks/useScrollThreshold.js.map +1 -1
  230. package/lib/hooks/useTailwindTheme.js.map +1 -1
  231. package/lib/icons.d.ts +2 -0
  232. package/lib/icons.d.ts.map +1 -1
  233. package/lib/icons.js +4 -2
  234. package/lib/icons.js.map +1 -1
  235. package/lib/index.d.ts +1 -1
  236. package/lib/index.d.ts.map +1 -1
  237. package/lib/index.js +1 -1
  238. package/lib/index.js.map +1 -1
  239. package/lib/machines/selectors.d.ts +118 -0
  240. package/lib/machines/selectors.d.ts.map +1 -0
  241. package/lib/machines/settingsMachine.d.ts +25 -2
  242. package/lib/machines/settingsMachine.d.ts.map +1 -1
  243. package/lib/machines/settingsMachine.js +133 -168
  244. package/lib/machines/settingsMachine.js.map +1 -1
  245. package/lib/machines/types.d.ts +107 -9
  246. package/lib/machines/types.d.ts.map +1 -1
  247. package/lib/machines/types.js.map +1 -1
  248. package/lib/module.js.map +1 -1
  249. package/lib/redux/searchReducer.d.ts +1 -1
  250. package/lib/redux/searchReducer.d.ts.map +1 -1
  251. package/lib/redux/searchReducer.js.map +1 -1
  252. package/lib/routes.json +9 -1
  253. package/lib/styles/index.css +602 -372
  254. package/lib/tailwindConfig.d.ts +85 -27
  255. package/lib/tailwindConfig.d.ts.map +1 -1
  256. package/lib/tailwindConfig.js +96 -18
  257. package/lib/tailwindConfig.js.map +1 -1
  258. package/lib/utils/__tests__/analytics-utils.test.d.ts +2 -0
  259. package/lib/utils/__tests__/analytics-utils.test.d.ts.map +1 -0
  260. package/lib/utils/__tests__/configOverrides.test.d.ts +2 -0
  261. package/lib/utils/__tests__/configOverrides.test.d.ts.map +1 -0
  262. package/lib/utils/__tests__/menu.test.d.ts +2 -0
  263. package/lib/utils/__tests__/menu.test.d.ts.map +1 -0
  264. package/lib/utils/__tests__/selectors.test.d.ts +2 -0
  265. package/lib/utils/__tests__/selectors.test.d.ts.map +1 -0
  266. package/lib/utils/__tests__/settingsMachine.test.d.ts +2 -0
  267. package/lib/utils/__tests__/settingsMachine.test.d.ts.map +1 -0
  268. package/lib/utils/__tests__/settingsUtils.test.d.ts +2 -0
  269. package/lib/utils/__tests__/settingsUtils.test.d.ts.map +1 -0
  270. package/lib/utils/analytics-utils.d.ts +43 -0
  271. package/lib/utils/analytics-utils.d.ts.map +1 -0
  272. package/lib/utils/analytics.d.ts +48 -0
  273. package/lib/utils/analytics.d.ts.map +1 -0
  274. package/lib/utils/configOverrides.d.ts +213 -0
  275. package/lib/utils/configOverrides.d.ts.map +1 -0
  276. package/lib/utils/configOverrides.js +91 -0
  277. package/lib/utils/configOverrides.js.map +1 -0
  278. package/lib/utils/isBrowser/index.js.map +1 -1
  279. package/lib/utils/settingsUtils.d.ts +20 -0
  280. package/lib/utils/settingsUtils.d.ts.map +1 -0
  281. package/lib/utils/settingsUtils.js +74 -0
  282. package/lib/utils/settingsUtils.js.map +1 -0
  283. package/lib/utils/utils/index.js.map +1 -1
  284. package/package.json +7 -15
  285. package/lib/components/Layout/GlobalHeader/Logo.d.ts +0 -4
  286. package/lib/components/Layout/GlobalHeader/Logo.d.ts.map +0 -1
  287. package/lib/components/Layout/GlobalHeader/Logo.js +0 -141
  288. package/lib/components/Layout/GlobalHeader/Logo.js.map +0 -1
  289. package/lib/components/Layout/Sidebar/Sidebar.d.ts +0 -5
  290. package/lib/components/Layout/Sidebar/Sidebar.d.ts.map +0 -1
  291. package/lib/components/Layout/Sidebar/Sidebar.js +0 -186
  292. package/lib/components/Layout/Sidebar/Sidebar.js.map +0 -1
  293. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts +0 -4
  294. package/lib/components/Layout/Sidebar/SidebarMenu.d.ts.map +0 -1
  295. package/lib/components/Layout/Sidebar/SidebarMenu.js +0 -183
  296. package/lib/components/Layout/Sidebar/SidebarMenu.js.map +0 -1
  297. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts +0 -3
  298. package/lib/components/SettingDrawer/CheckBoxTheme.d.ts.map +0 -1
  299. package/lib/components/SettingDrawer/CheckBoxTheme.js +0 -123
  300. package/lib/components/SettingDrawer/CheckBoxTheme.js.map +0 -1
  301. package/lib/components/SettingDrawer/LayoutChange.d.ts +0 -3
  302. package/lib/components/SettingDrawer/LayoutChange.d.ts.map +0 -1
  303. package/lib/components/SettingDrawer/LayoutChange.js +0 -123
  304. package/lib/components/SettingDrawer/LayoutChange.js.map +0 -1
  305. package/lib/components/SettingDrawer/NavigationsModes.d.ts +0 -3
  306. package/lib/components/SettingDrawer/NavigationsModes.d.ts.map +0 -1
  307. package/lib/components/SettingDrawer/NavigationsModes.js +0 -289
  308. package/lib/components/SettingDrawer/NavigationsModes.js.map +0 -1
  309. package/lib/components/SettingDrawer/RegionalSettings.d.ts +0 -3
  310. package/lib/components/SettingDrawer/RegionalSettings.d.ts.map +0 -1
  311. package/lib/components/SettingDrawer/RegionalSettings.js +0 -740
  312. package/lib/components/SettingDrawer/RegionalSettings.js.map +0 -1
  313. package/lib/components/SettingDrawer/Switch/index.d.ts +0 -3
  314. package/lib/components/SettingDrawer/Switch/index.d.ts.map +0 -1
  315. package/lib/components/SettingDrawer/Switch/index.js +0 -22
  316. package/lib/components/SettingDrawer/Switch/index.js.map +0 -1
  317. package/lib/components/SettingDrawer/ThemeColor.d.ts +0 -3
  318. package/lib/components/SettingDrawer/ThemeColor.d.ts.map +0 -1
  319. package/lib/components/SettingDrawer/ThemeColor.js +0 -35
  320. package/lib/components/SettingDrawer/ThemeColor.js.map +0 -1
  321. package/lib/components/SettingDrawer/ThemeSelector.d.ts +0 -3
  322. package/lib/components/SettingDrawer/ThemeSelector.d.ts.map +0 -1
  323. package/lib/components/SettingDrawer/ThemeSelector.js +0 -18
  324. package/lib/components/SettingDrawer/ThemeSelector.js.map +0 -1
  325. package/lib/components/SettingDrawer/WebFontsSelector.d.ts +0 -3
  326. package/lib/components/SettingDrawer/WebFontsSelector.d.ts.map +0 -1
  327. package/lib/components/SettingDrawer/WebFontsSelector.js +0 -24
  328. package/lib/components/SettingDrawer/WebFontsSelector.js.map +0 -1
  329. package/lib/components/SettingDrawer/types.d.ts.map +0 -1
  330. package/lib/components/ThemeProvider/ThemeProvider.d.ts +0 -8
  331. package/lib/components/ThemeProvider/ThemeProvider.d.ts.map +0 -1
  332. package/lib/components/ThemeProvider/ThemeProvider.js +0 -60
  333. package/lib/components/ThemeProvider/ThemeProvider.js.map +0 -1
  334. package/lib/components/ThemeProvider/ThemeToggle.d.ts +0 -7
  335. package/lib/components/ThemeProvider/ThemeToggle.d.ts.map +0 -1
  336. package/lib/components/ThemeProvider/ThemeToggle.js +0 -50
  337. package/lib/components/ThemeProvider/ThemeToggle.js.map +0 -1
  338. package/lib/components/ThemeProvider/index.d.ts +0 -4
  339. package/lib/components/ThemeProvider/index.d.ts.map +0 -1
  340. package/lib/components/ThemeProvider/themes/airbnb.d.ts +0 -3
  341. package/lib/components/ThemeProvider/themes/airbnb.d.ts.map +0 -1
  342. package/lib/components/ThemeProvider/themes/airbnb.js +0 -186
  343. package/lib/components/ThemeProvider/themes/airbnb.js.map +0 -1
  344. package/lib/components/ThemeProvider/themes/default.d.ts +0 -3
  345. package/lib/components/ThemeProvider/themes/default.d.ts.map +0 -1
  346. package/lib/components/ThemeProvider/themes/default.js +0 -183
  347. package/lib/components/ThemeProvider/themes/default.js.map +0 -1
  348. package/lib/components/ThemeProvider/themes/github.d.ts +0 -3
  349. package/lib/components/ThemeProvider/themes/github.d.ts.map +0 -1
  350. package/lib/components/ThemeProvider/themes/github.js +0 -190
  351. package/lib/components/ThemeProvider/themes/github.js.map +0 -1
  352. package/lib/components/ThemeProvider/themes/index.d.ts +0 -15
  353. package/lib/components/ThemeProvider/themes/index.d.ts.map +0 -1
  354. package/lib/components/ThemeProvider/themes/index.js +0 -7
  355. package/lib/components/ThemeProvider/themes/index.js.map +0 -1
  356. package/lib/components/ThemeProvider/themes/slack.d.ts +0 -3
  357. package/lib/components/ThemeProvider/themes/slack.d.ts.map +0 -1
  358. package/lib/components/ThemeProvider/themes/slack.js +0 -188
  359. package/lib/components/ThemeProvider/themes/slack.js.map +0 -1
  360. package/lib/components/ThemeProvider/themes/spotify.d.ts +0 -3
  361. package/lib/components/ThemeProvider/themes/spotify.d.ts.map +0 -1
  362. package/lib/components/ThemeProvider/themes/spotify.js +0 -189
  363. package/lib/components/ThemeProvider/themes/spotify.js.map +0 -1
  364. package/lib/components/ThemeProvider/types.d.ts +0 -112
  365. package/lib/components/ThemeProvider/types.d.ts.map +0 -1
  366. package/lib/components/UI/CardList.d.ts +0 -61
  367. package/lib/components/UI/CardList.d.ts.map +0 -1
  368. package/lib/components/UI/CardList.js +0 -43
  369. package/lib/components/UI/CardList.js.map +0 -1
  370. package/lib/components/UI/CategoriesTypeList.d.ts +0 -29
  371. package/lib/components/UI/CategoriesTypeList.d.ts.map +0 -1
  372. package/lib/components/UI/CategoriesTypeList.js +0 -140
  373. package/lib/components/UI/CategoriesTypeList.js.map +0 -1
  374. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts +0 -83
  375. package/lib/components/UI/LazyLoadingGoogleMarker.d.ts.map +0 -1
  376. package/lib/components/UI/LazyLoadingGoogleMarker.js +0 -107
  377. package/lib/components/UI/LazyLoadingGoogleMarker.js.map +0 -1
  378. package/lib/components/UI/Pagination.d.ts +0 -6
  379. package/lib/components/UI/Pagination.d.ts.map +0 -1
  380. package/lib/components/UI/Pagination.js +0 -59
  381. package/lib/components/UI/Pagination.js.map +0 -1
  382. package/lib/components/UI/ParamSearchResultContainer.d.ts +0 -99
  383. package/lib/components/UI/ParamSearchResultContainer.d.ts.map +0 -1
  384. package/lib/components/UI/ParamSearchResultContainer.js +0 -120
  385. package/lib/components/UI/ParamSearchResultContainer.js.map +0 -1
  386. package/lib/components/UI/PropertyCard.d.ts +0 -24
  387. package/lib/components/UI/PropertyCard.d.ts.map +0 -1
  388. package/lib/components/UI/PropertyCard.js +0 -375
  389. package/lib/components/UI/PropertyCard.js.map +0 -1
  390. package/lib/components/UI/PropertyCardOnMap.d.ts +0 -10
  391. package/lib/components/UI/PropertyCardOnMap.d.ts.map +0 -1
  392. package/lib/components/UI/PropertyCardOnMap.js +0 -108
  393. package/lib/components/UI/PropertyCardOnMap.js.map +0 -1
  394. package/lib/components/UI/VehicleCard/PricePopover.d.ts +0 -8
  395. package/lib/components/UI/VehicleCard/PricePopover.d.ts.map +0 -1
  396. package/lib/components/UI/VehicleCard/PricePopover.js +0 -98
  397. package/lib/components/UI/VehicleCard/PricePopover.js.map +0 -1
  398. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts +0 -7
  399. package/lib/components/UI/VehicleCard/VehicleBadge.d.ts.map +0 -1
  400. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts +0 -9
  401. package/lib/components/UI/VehicleCard/VehicleFeature.d.ts.map +0 -1
  402. package/lib/components/UI/VehicleCard/VehicleFeature.js +0 -23
  403. package/lib/components/UI/VehicleCard/VehicleFeature.js.map +0 -1
  404. package/lib/components/UI/VehicleCard/types.d.ts +0 -59
  405. package/lib/components/UI/VehicleCard/types.d.ts.map +0 -1
  406. package/lib/components/UI/VehicleCard.d.ts +0 -15
  407. package/lib/components/UI/VehicleCard.d.ts.map +0 -1
  408. package/lib/components/UI/VehicleCard.js +0 -166
  409. package/lib/components/UI/VehicleCard.js.map +0 -1
  410. package/lib/components/UI/VehicleCardList.d.ts +0 -14
  411. package/lib/components/UI/VehicleCardList.d.ts.map +0 -1
  412. package/lib/components/UI/VehicleCardList.js +0 -38
  413. package/lib/components/UI/VehicleCardList.js.map +0 -1
  414. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts +0 -90
  415. package/lib/components/UI/VehicleParamSearchResultContainer.d.ts.map +0 -1
  416. package/lib/components/UI/icons/LocationIcon.d.ts +0 -7
  417. package/lib/components/UI/icons/LocationIcon.d.ts.map +0 -1
  418. package/lib/components/UI/icons/LocationIcon.js +0 -18
  419. package/lib/components/UI/icons/LocationIcon.js.map +0 -1
  420. package/lib/components/UI/icons/index.d.ts +0 -2
  421. package/lib/components/UI/icons/index.d.ts.map +0 -1
  422. package/lib/components/UI/index.d.ts +0 -10
  423. package/lib/components/UI/index.d.ts.map +0 -1
  424. package/lib/components/typings.js +0 -6
  425. package/lib/components/typings.js.map +0 -1
  426. package/lib/hooks/use-get-current-lat-long.d.ts +0 -18
  427. package/lib/hooks/use-get-current-lat-long.d.ts.map +0 -1
  428. package/lib/hooks/use-get-current-lat-long.js +0 -29
  429. package/lib/hooks/use-get-current-lat-long.js.map +0 -1
  430. package/lib/hooks/useWindowSize.d.ts +0 -6
  431. package/lib/hooks/useWindowSize.d.ts.map +0 -1
  432. package/lib/hooks/useWindowSize.js +0 -20
  433. package/lib/hooks/useWindowSize.js.map +0 -1
  434. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts +0 -6
  435. package/lib/middlewares/airbnbDatasourcesMiddleware.d.ts.map +0 -1
  436. package/lib/middlewares/bookingCarRentalMiddleware.d.ts +0 -6
  437. package/lib/middlewares/bookingCarRentalMiddleware.d.ts.map +0 -1
  438. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts +0 -7
  439. package/lib/middlewares/bookingDatasourcesMiddleware.d.ts.map +0 -1
  440. package/lib/middlewares/datasourcesMiddleware.d.ts +0 -6
  441. package/lib/middlewares/datasourcesMiddleware.d.ts.map +0 -1
  442. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts +0 -7
  443. package/lib/middlewares/pricelineDatasourcesMiddleware.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # Tailwind Design Pro
2
2
 
3
- A universal tailwind design system for use across all projects.
3
+ A universal tailwind design system with multi-theme support and CSS custom properties for seamless theme switching.
4
4
 
5
5
  ## Features
6
6
 
7
- - Unified theme system with light and dark mode support
8
- - Consistent styling across all projects
9
- - Easy to customize and extend
10
- - Built-in typography, forms, and aspect ratio support
7
+ - **Multi-Theme System**: 5 pre-built themes (Default, Airbnb, Slack, GitHub, Spotify)
8
+ - **CSS Custom Properties**: Theme-aware styling with CSS variables
9
+ - **Dark/Light Mode**: Automatic theme switching with persistent preferences
10
+ - **Component Library**: Pre-built UI components with theme integration
11
+ - **Responsive Design**: Mobile-first approach with consistent breakpoints
12
+ - **Accessibility**: WCAG compliant color contrasts and focus states
11
13
 
12
- ## Usage in Servers
13
-
14
- To use this package in your server project, follow these steps:
14
+ ## Quick Start
15
15
 
16
16
  ### 1. Install the package
17
17
 
@@ -19,327 +19,453 @@ To use this package in your server project, follow these steps:
19
19
  npm install @admin-layout/tailwind-design-pro
20
20
  ```
21
21
 
22
- ### 2. Use the Universal Tailwind Config
22
+ ### 2. Import the CSS
23
+
24
+ ```typescript
25
+ // In your main CSS file or entry point
26
+ import '@admin-layout/tailwind-design-pro/src/styles/index.css';
27
+ ```
23
28
 
24
- Create a `tailwind.config.js` or `tailwind.config.ts` file in your server project and import the universal config:
29
+ ### 3. Configure Tailwind
25
30
 
26
31
  ```typescript
27
- // tailwind.config.ts or tailwind.config.js
32
+ // tailwind.config.ts
28
33
  import { themeConfig } from '@admin-layout/tailwind-design-pro';
29
34
 
30
35
  export default {
31
- // Override content paths to include server-specific paths
32
- content: [
33
- './src/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}',
34
- './app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}',
35
- '../../packages/**/*.{js,jsx,ts,tsx}',
36
- '../../packages-modules/**/*.{js,jsx,ts,tsx}',
37
- ],
38
-
39
- // You can add server-specific overrides here if needed
36
+ content: ['./src/**/*.{js,jsx,ts,tsx}', '../../packages/**/*.{js,jsx,ts,tsx}'],
40
37
  theme: {
41
- extend: {
42
- // Any server-specific extensions would go here
43
- ...themeConfig,
44
- },
38
+ extend: themeConfig,
45
39
  },
46
40
  darkMode: 'class',
47
- variants: {
48
- typography: ['dark'],
49
- },
50
- plugins: [typography, forms, aspectRatio],
41
+ plugins: [],
51
42
  };
52
43
  ```
53
44
 
54
- # Theme System Documentation
45
+ ### 4. Set up Theme Provider
55
46
 
56
- ## Overview
47
+ ```tsx
48
+ import { ThemeProviderTailwind } from '@admin-layout/tailwind-ui';
57
49
 
58
- The theme system provides a flexible and powerful way to manage the visual appearance of your application. It supports multiple pre-built themes (default, Airbnb, Slack, GitHub, and Spotify) and includes dark mode functionality.
50
+ const App = () => {
51
+ const settings = {
52
+ theme: 'default', // 'default', 'airbnb', 'slack', 'github', 'spotify'
53
+ navTheme: 'light', // 'light' or 'dark'
54
+ primaryColor: '#000000',
55
+ fontFamily: 'Inter, sans-serif',
56
+ };
57
+
58
+ return (
59
+ <ThemeProviderTailwind settings={settings} actor={actor}>
60
+ <YourApp />
61
+ </ThemeProviderTailwind>
62
+ );
63
+ };
64
+ ```
59
65
 
60
66
  ## Available Themes
61
67
 
62
- The system comes with several pre-built themes:
68
+ ### 1. Default Theme
63
69
 
64
- - `default`: A neutral theme with standard components
65
- - `airbnb`: Inspired by Airbnb's design system
66
- - `slack`: Based on Slack's color scheme and components
67
- - `github`: Following GitHub's design patterns
68
- - `spotify`: Matching Spotify's visual identity
70
+ - Clean, professional design
71
+ - Neutral color palette
72
+ - Perfect for business applications
69
73
 
70
- ## Theme Structure
74
+ ### 2. Airbnb Theme
71
75
 
72
- Each theme follows a consistent structure defined by the `DefaultTheme` interface:
76
+ - Warm, welcoming colors
77
+ - Red accent colors
78
+ - Great for hospitality and travel apps
73
79
 
74
- ```typescript
75
- interface DefaultTheme {
76
- name: string;
77
- colors: {
78
- primary: ColorRamp;
79
- secondary: ColorRamp;
80
- accent: ColorRamp;
81
- success: ColorRamp;
82
- warning: ColorRamp;
83
- error: ColorRamp;
84
- neutral: ColorRamp;
85
- background: {
86
- light: string;
87
- dark: string;
88
- };
89
- text: {
90
- light: {
91
- primary: string;
92
- secondary: string;
93
- tertiary: string;
94
- };
95
- dark: {
96
- primary: string;
97
- secondary: string;
98
- tertiary: string;
99
- };
100
- };
101
- };
102
- borderRadius: {
103
- sm: string;
104
- DEFAULT: string;
105
- md: string;
106
- lg: string;
107
- xl: string;
108
- '2xl': string;
109
- full: string;
110
- };
111
- fontFamily: {
112
- sans: string[];
113
- serif: string[];
114
- mono: string[];
115
- };
116
- boxShadow: {
117
- sm: string;
118
- DEFAULT: string;
119
- md: string;
120
- lg: string;
121
- xl: string;
122
- };
123
- components: {
124
- buttons: {
125
- primary: ButtonStyle;
126
- secondary: ButtonStyle;
127
- };
128
- cards: {
129
- borderRadius: string;
130
- padding: string;
131
- shadow: string;
132
- border: string;
133
- };
134
- inputs: {
135
- borderRadius: string;
136
- borderColor: string;
137
- focusBorderColor: string;
138
- padding: string;
139
- fontSize: string;
140
- lineHeight: string;
141
- };
142
- };
143
- }
80
+ ### 3. Slack Theme
81
+
82
+ - Purple-based design
83
+ - Modern, collaborative feel
84
+ - Ideal for team communication tools
85
+
86
+ ### 4. GitHub Theme
87
+
88
+ - Dark, developer-friendly
89
+ - High contrast design
90
+ - Perfect for developer tools
91
+
92
+ ### 5. Spotify Theme
93
+
94
+ - Green accent colors
95
+ - Music and entertainment focused
96
+ - Great for media applications
97
+
98
+ ## Theme-Aware CSS Classes
99
+
100
+ The design system provides theme-aware CSS classes that automatically adapt to the current theme:
101
+
102
+ ### Background Colors
103
+
104
+ ```css
105
+ .bg-background /* Main background */
106
+ /* Main background */
107
+ /* Main background */
108
+ /* Main background */
109
+ /* Main background */
110
+ /* Main background */
111
+ /* Main background */
112
+ /* Main background */
113
+ /* Main background */
114
+ /* Main background */
115
+ /* Main background */
116
+ /* Main background */
117
+ /* Main background */
118
+ /* Main background */
119
+ /* Main background */
120
+ /* Main background */
121
+ .bg-card /* Card background */
122
+ .bg-popover /* Popover background */
123
+ .bg-muted /* Muted background */
124
+ .bg-accent; /* Accent background */
144
125
  ```
145
126
 
146
- ## Setting Up the Theme Provider
127
+ ### Text Colors
128
+
129
+ ```css
130
+ .text-foreground /* Primary text */
131
+ /* Primary text */
132
+ /* Primary text */
133
+ /* Primary text */
134
+ /* Primary text */
135
+ /* Primary text */
136
+ /* Primary text */
137
+ /* Primary text */
138
+ /* Primary text */
139
+ /* Primary text */
140
+ /* Primary text */
141
+ /* Primary text */
142
+ /* Primary text */
143
+ /* Primary text */
144
+ /* Primary text */
145
+ /* Primary text */
146
+ .text-muted-foreground /* Secondary text */
147
+ .text-primary /* Primary brand color */
148
+ .text-secondary /* Secondary brand color */
149
+ .text-accent; /* Accent color */
150
+ ```
147
151
 
148
- To use the theme system, wrap your application with the `ThemeProviderTailwind` component:
152
+ ### Semantic Colors
153
+
154
+ ```css
155
+ .text-success /* Success text */
156
+ /* Success text */
157
+ /* Success text */
158
+ /* Success text */
159
+ /* Success text */
160
+ /* Success text */
161
+ /* Success text */
162
+ /* Success text */
163
+ /* Success text */
164
+ /* Success text */
165
+ /* Success text */
166
+ /* Success text */
167
+ /* Success text */
168
+ /* Success text */
169
+ /* Success text */
170
+ /* Success text */
171
+ .text-warning /* Warning text */
172
+ .text-error /* Error text */
173
+ .text-info /* Info text */
174
+ .bg-success /* Success background */
175
+ .bg-warning /* Warning background */
176
+ .bg-error /* Error background */
177
+ .bg-info; /* Info background */
178
+ ```
149
179
 
150
- ```tsx
151
- import { ThemeProviderTailwind } from 'packages/tailwind-design-pro/src/components/ThemeProvider';
180
+ ### Component Classes
181
+
182
+ ```css
183
+ .themed-button /* Theme-aware button */
184
+ /* Theme-aware button */
185
+ /* Theme-aware button */
186
+ /* Theme-aware button */
187
+ /* Theme-aware button */
188
+ /* Theme-aware button */
189
+ /* Theme-aware button */
190
+ /* Theme-aware button */
191
+ /* Theme-aware button */
192
+ /* Theme-aware button */
193
+ /* Theme-aware button */
194
+ /* Theme-aware button */
195
+ /* Theme-aware button */
196
+ /* Theme-aware button */
197
+ /* Theme-aware button */
198
+ /* Theme-aware button */
199
+ .themed-card /* Theme-aware card */
200
+ .themed-input /* Theme-aware input */
201
+ .themed-modal /* Theme-aware modal */
202
+ .themed-dropdown /* Theme-aware dropdown */
203
+ .themed-sidebar; /* Theme-aware sidebar */
204
+ ```
152
205
 
153
- const App = () => {
154
- const settings = {
155
- theme: 'default', // or 'airbnb', 'slack', 'github', 'spotify'
156
- themeType: 'light',
157
- primaryColor: '#your-color',
158
- fontFamily: 'your-font-family',
159
- navTheme: 'light', // or 'dark'
160
- };
206
+ ### Interactive Classes
207
+
208
+ ```css
209
+ .interactive-hover /* Hover effects */
210
+ /* Hover effects */
211
+ /* Hover effects */
212
+ /* Hover effects */
213
+ /* Hover effects */
214
+ /* Hover effects */
215
+ /* Hover effects */
216
+ /* Hover effects */
217
+ /* Hover effects */
218
+ /* Hover effects */
219
+ /* Hover effects */
220
+ /* Hover effects */
221
+ /* Hover effects */
222
+ /* Hover effects */
223
+ /* Hover effects */
224
+ /* Hover effects */
225
+ .focus-themed /* Focus states */
226
+ .rounded-themed /* Theme-aware border radius */
227
+ .shadow-themed-sm /* Theme-aware shadows */
228
+ .shadow-themed-md
229
+ .shadow-themed-lg
230
+ .shadow-themed-xl;
231
+ ```
161
232
 
162
- return <ThemeProviderTailwind settings={settings}>{/* Your app components */}</ThemeProviderTailwind>;
233
+ ## Using Theme-Aware Components
234
+
235
+ ### Basic Usage
236
+
237
+ ```tsx
238
+ import { Button, Card, CardContent, CardHeader, CardTitle } from '@admin-layout/tailwind-ui';
239
+
240
+ const MyComponent = () => {
241
+ return (
242
+ <div className="bg-background text-foreground p-6">
243
+ <Card className="themed-card">
244
+ <CardHeader>
245
+ <CardTitle className="text-foreground">Card Title</CardTitle>
246
+ </CardHeader>
247
+ <CardContent>
248
+ <p className="text-muted-foreground">Card content</p>
249
+ <Button className="themed-button interactive-hover">Click Me</Button>
250
+ </CardContent>
251
+ </Card>
252
+ </div>
253
+ );
163
254
  };
164
255
  ```
165
256
 
166
- ## Using the useTheme Hook
257
+ ### Form Components
167
258
 
168
- The `useTheme` hook provides access to the current theme and theme-related functionality. Here's how to use it:
259
+ ```tsx
260
+ const FormExample = () => {
261
+ return (
262
+ <form className="space-y-4">
263
+ <div>
264
+ <label className="text-foreground font-medium">Email</label>
265
+ <input type="email" className="w-full themed-input focus-themed" placeholder="Enter your email" />
266
+ </div>
267
+ <Button type="submit" className="themed-button">
268
+ Submit
269
+ </Button>
270
+ </form>
271
+ );
272
+ };
273
+ ```
274
+
275
+ ### Theme Switching
169
276
 
170
277
  ```tsx
171
- import { useTheme } from 'packages/tailwind-design-pro/src/components/ThemeProvider';
278
+ import { useTheme } from '@admin-layout/tailwind-ui';
172
279
 
173
- const YourComponent = () => {
174
- const { themeName, theme, isDarkMode, toggleDarkMode } = useTheme();
280
+ const ThemeSwitcher = () => {
281
+ const { theme, mode, toggleMode, setTheme, setMode } = useTheme();
175
282
 
176
283
  return (
177
- <div>
178
- {/* Access theme colors */}
179
- <div style={{ color: theme.colors.primary[500] }}>Primary Color</div>
180
-
181
- {/* Use theme-specific styles */}
182
- <button
183
- style={{
184
- borderRadius: theme.borderRadius.DEFAULT,
185
- fontFamily: theme.fontFamily.sans.join(', '),
186
- }}
284
+ <div className="space-x-2">
285
+ <Button
286
+ onClick={() => setTheme('airbnb')}
287
+ className={theme === 'airbnb' ? 'themed-button' : 'bg-muted text-foreground'}
187
288
  >
188
- Themed Button
189
- </button>
190
-
191
- {/* Toggle dark mode */}
192
- <button onClick={toggleDarkMode}>Toggle {isDarkMode ? 'Light' : 'Dark'} Mode</button>
289
+ Airbnb
290
+ </Button>
291
+ <Button
292
+ onClick={() => setTheme('slack')}
293
+ className={theme === 'slack' ? 'themed-button' : 'bg-muted text-foreground'}
294
+ >
295
+ Slack
296
+ </Button>
297
+ <Button onClick={toggleDarkMode}>{mode === 'dark' ? 'Light' : 'Dark'} Mode</Button>
193
298
  </div>
194
299
  );
195
300
  };
196
301
  ```
197
302
 
198
- ### Available Properties from useTheme
199
-
200
- 1. `themeName`: The current theme name ('default', 'airbnb', 'slack', 'github', or 'spotify')
201
- 2. `theme`: The complete theme object containing all styling properties
202
- 3. `isDarkMode`: Boolean indicating if dark mode is active
203
- 4. `toggleDarkMode`: Function to toggle between light and dark modes
303
+ ## CSS Custom Properties
304
+
305
+ The design system uses CSS custom properties for dynamic theming:
306
+
307
+ ### Color Variables
308
+
309
+ ```css
310
+ :root {
311
+ --background: 0 0% 100%;
312
+ --foreground: 222.2 84% 4.9%;
313
+ --primary: 222.2 47.4% 11.2%;
314
+ --primary-foreground: 210 40% 98%;
315
+ --secondary: 210 40% 96.1%;
316
+ --secondary-foreground: 222.2 47.4% 11.2%;
317
+ --muted: 210 40% 96.1%;
318
+ --muted-foreground: 215.4 16.3% 46.9%;
319
+ --accent: 210 40% 96.1%;
320
+ --accent-foreground: 222.2 47.4% 11.2%;
321
+ --destructive: 0 84.2% 60.2%;
322
+ --destructive-foreground: 210 40% 98%;
323
+ --border: 214.3 31.8% 91.4%;
324
+ --input: 214.3 31.8% 91.4%;
325
+ --ring: 222.2 84% 4.9%;
326
+ --radius: 0.5rem;
327
+ }
328
+ ```
204
329
 
205
- ## Theme Features
330
+ ### Theme-Specific Variables
206
331
 
207
- ### 1. Dark Mode Support
332
+ Each theme has its own set of variables:
208
333
 
209
- - Automatically handles dark mode through the `isDarkMode` state
210
- - Persists dark mode preference in localStorage
211
- - Applies appropriate dark mode classes to the document
334
+ ```css
335
+ [data-theme='airbnb'] {
336
+ --primary: 0 100% 60%;
337
+ --background: 0 0% 100%;
338
+ /* ... other theme-specific variables */
339
+ }
340
+ ```
212
341
 
213
- ### 2. Dynamic Theme Switching
342
+ ## Best Practices
214
343
 
215
- - Themes can be changed dynamically through the settings prop
216
- - All theme properties are immediately applied when changed
344
+ ### 1. Use Theme-Aware Classes
217
345
 
218
- ### 3. Component-Specific Styling
346
+ ```tsx
347
+ // ✅ Good - Theme-aware
348
+ <div className="bg-background text-foreground">
349
+ <Button className="themed-button">Click</Button>
350
+ </div>
351
+
352
+ // ❌ Avoid - Hardcoded colors
353
+ <div className="bg-white text-black">
354
+ <Button className="bg-blue-500 text-white">Click</Button>
355
+ </div>
356
+ ```
219
357
 
220
- Each theme includes specific styling for common components:
358
+ ### 2. Leverage Semantic Colors
221
359
 
222
- - Buttons (primary and secondary variants)
223
- - Cards
224
- - Input fields
360
+ ```tsx
361
+ // ✅ Good - Semantic meaning
362
+ <div className="text-success">Success message</div>
363
+ <div className="text-error">Error message</div>
225
364
 
226
- ### 4. Color System
365
+ // Avoid - Hardcoded colors
366
+ <div className="text-green-500">Success message</div>
367
+ <div className="text-red-500">Error message</div>
368
+ ```
227
369
 
228
- - Each theme includes a comprehensive color system with:
229
- - Primary colors
230
- - Secondary colors
231
- - Accent colors
232
- - Semantic colors (success, warning, error)
233
- - Neutral colors
234
- - Background colors
235
- - Text colors
370
+ ### 3. Use Interactive Classes
236
371
 
237
- ### 5. Typography
372
+ ```tsx
373
+ // ✅ Good - Built-in interactions
374
+ <Button className="themed-button interactive-hover">
375
+ Hover me
376
+ </Button>
377
+
378
+ // ❌ Avoid - Custom hover states
379
+ <Button className="themed-button hover:scale-105 hover:shadow-lg">
380
+ Hover me
381
+ </Button>
382
+ ```
238
383
 
239
- - Customizable font families for different text styles
240
- - Consistent typography settings across themes
384
+ ### 4. Responsive Design
241
385
 
242
- ## Best Practices
386
+ ```tsx
387
+ // ✅ Good - Responsive with theme
388
+ <div className="bg-background p-4 md:p-6 lg:p-8">
389
+ <Card className="themed-card">
390
+ <CardContent className="p-4 md:p-6">Content</CardContent>
391
+ </Card>
392
+ </div>
393
+ ```
243
394
 
244
- 1. **Theme Access**
395
+ ## Migration Guide
245
396
 
246
- ```tsx
247
- const { theme } = useTheme();
248
- // Use theme properties directly
249
- const primaryColor = theme.colors.primary[500];
250
- ```
397
+ ### From Inline Styles to CSS Classes
251
398
 
252
- 2. **Dark Mode Handling**
399
+ **Before:**
253
400
 
254
- ```tsx
255
- const { isDarkMode, toggleDarkMode } = useTheme();
256
- // Use isDarkMode to conditionally render styles
257
- const backgroundColor = isDarkMode ? theme.colors.background.dark : theme.colors.background.light;
258
- ```
401
+ ```tsx
402
+ const { theme, isDarkMode } = useTheme();
403
+ const textColor = isDarkMode ? theme.colors.text.dark.primary : theme.colors.text.light.primary;
259
404
 
260
- 3. **Component Styling**
405
+ <div style={{ color: textColor, backgroundColor: theme.colors.background.light }}>Content</div>;
406
+ ```
261
407
 
262
- ```tsx
263
- const { theme } = useTheme();
264
- // Use theme component styles
265
- const buttonStyle = {
266
- ...theme.components.buttons.primary,
267
- // Add custom styles as needed
268
- };
269
- ```
270
-
271
- 4. **Responsive Design**
272
- ```tsx
273
- const { theme } = useTheme();
274
- // Use theme's responsive values
275
- const cardStyle = {
276
- borderRadius: theme.borderRadius.md,
277
- boxShadow: theme.boxShadow.DEFAULT,
278
- };
279
- ```
408
+ **After:**
280
409
 
281
- ## Theme Customization
410
+ ```tsx
411
+ <div className="bg-background text-foreground">Content</div>
412
+ ```
282
413
 
283
- ### Creating a Custom Theme
414
+ ### From Custom Components to Theme-Aware Components
284
415
 
285
- You can create your own theme by following the `DefaultTheme` interface structure:
416
+ **Before:**
286
417
 
287
- ```typescript
288
- const customTheme: DefaultTheme = {
289
- name: 'custom',
290
- colors: {
291
- // Define your color palette
292
- },
293
- // Define other theme properties
294
- };
418
+ ```tsx
419
+ <button
420
+ style={{
421
+ backgroundColor: theme.components.buttons.primary.background,
422
+ color: theme.components.buttons.primary.text,
423
+ borderRadius: theme.components.buttons.primary.borderRadius,
424
+ }}
425
+ >
426
+ Button
427
+ </button>
295
428
  ```
296
429
 
297
- ### Extending Existing Themes
298
-
299
- You can extend existing themes by importing them and modifying specific properties:
430
+ **After:**
300
431
 
301
- ```typescript
302
- import { defaultTheme } from './themes/default';
303
-
304
- const extendedTheme: DefaultTheme = {
305
- ...defaultTheme,
306
- name: 'extended',
307
- colors: {
308
- ...defaultTheme.colors,
309
- primary: {
310
- // Override primary colors
311
- },
312
- },
313
- };
432
+ ```tsx
433
+ <Button className="themed-button">Button</Button>
314
434
  ```
315
435
 
316
436
  ## Troubleshooting
317
437
 
318
- ### Common Issues
438
+ ### Theme Not Applying
319
439
 
320
- 1. **Theme Not Applying**
440
+ 1. Ensure CSS is imported: `import '@admin-layout/tailwind-design-pro/src/styles/index.css'`
441
+ 2. Check that `ThemeProviderTailwind` wraps your app
442
+ 3. Verify theme name is valid: `'default'`, `'airbnb'`, `'slack'`, `'github'`, `'spotify'`
321
443
 
322
- - Ensure the `ThemeProviderTailwind` is properly wrapped around your application
323
- - Check if the theme name matches one of the available themes
324
- - Verify that the settings prop is correctly configured
444
+ ### Dark Mode Not Working
325
445
 
326
- 2. **Dark Mode Not Working**
446
+ 1. Check `navTheme` setting: `'light'` or `'dark'`
447
+ 2. Ensure `darkMode: 'class'` in Tailwind config
448
+ 3. Verify CSS custom properties are being applied
327
449
 
328
- - Check if `navTheme` is properly set in the settings
329
- - Verify that the dark mode classes are being applied to the document
330
- - Ensure localStorage is accessible in your environment
450
+ ### Components Not Styled
331
451
 
332
- 3. **Custom Styles Not Taking Effect**
333
- - Verify that your custom theme follows the `DefaultTheme` interface
334
- - Check if the theme is properly registered in the themes object
335
- - Ensure the theme name is correctly referenced in the settings
452
+ 1. Use theme-aware classes: `themed-button`, `themed-card`, etc.
453
+ 2. Import components from `@admin-layout/tailwind-ui`
454
+ 3. Check that CSS custom properties are loaded
336
455
 
337
456
  ## Contributing
338
457
 
339
458
  When contributing to the theme system:
340
459
 
341
- 1. Follow the existing theme structure
342
- 2. Maintain consistency with other themes
343
- 3. Include both light and dark mode variants
344
- 4. Document any new theme properties or features
345
- 5. Test the theme across different components and scenarios
460
+ 1. **Follow the CSS Custom Properties pattern**
461
+ 2. **Use semantic color names**
462
+ 3. **Test across all themes**
463
+ 4. **Ensure accessibility compliance**
464
+ 5. **Update documentation for new features**
465
+
466
+ ## Examples
467
+
468
+ See the demo applications for complete examples:
469
+
470
+ - `packages-modules/demo/tailwind-browser` - Tailwind examples
471
+ - `packages-modules/demo/chakra-browser` - Chakra UI examples