@memori.ai/ui 1.0.4-alpha → 1.1.0

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 (262) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/README.md +82 -6
  3. package/dist/index.d.ts +895 -11
  4. package/dist/memori-ai-ui.cjs.js +57 -0
  5. package/dist/memori-ai-ui.cjs.js.map +1 -0
  6. package/dist/memori-ai-ui.css +1 -2
  7. package/dist/memori-ai-ui.es.js +6139 -549
  8. package/dist/memori-ai-ui.es.js.map +1 -0
  9. package/package.json +59 -30
  10. package/dist/components/Alert/Alert.d.ts +0 -18
  11. package/dist/components/Alert/index.d.ts +0 -2
  12. package/dist/components/Button/Button.d.ts +0 -63
  13. package/dist/components/Button/index.d.ts +0 -3
  14. package/dist/components/Card/Card.d.ts +0 -13
  15. package/dist/components/Card/index.d.ts +0 -2
  16. package/dist/components/Checkbox/Checkbox.d.ts +0 -11
  17. package/dist/components/Checkbox/index.d.ts +0 -2
  18. package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +0 -12
  19. package/dist/components/ConfirmDialog/index.d.ts +0 -2
  20. package/dist/components/Drawer/Drawer.d.ts +0 -32
  21. package/dist/components/Drawer/index.d.ts +0 -2
  22. package/dist/components/Expandable/Expandable.d.ts +0 -15
  23. package/dist/components/Expandable/helpers.d.ts +0 -3
  24. package/dist/components/Expandable/index.d.ts +0 -2
  25. package/dist/components/InputBase/InputBase.d.ts +0 -49
  26. package/dist/components/InputBase/index.d.ts +0 -3
  27. package/dist/components/Modal/Modal.d.ts +0 -16
  28. package/dist/components/Modal/index.d.ts +0 -2
  29. package/dist/components/Select/Select.d.ts +0 -16
  30. package/dist/components/Select/index.d.ts +0 -2
  31. package/dist/components/Slider/Slider.d.ts +0 -12
  32. package/dist/components/Slider/index.d.ts +0 -2
  33. package/dist/components/Spin/Spin.d.ts +0 -9
  34. package/dist/components/Spin/index.d.ts +0 -2
  35. package/dist/components/Tooltip/Tooltip.d.ts +0 -11
  36. package/dist/components/Tooltip/index.d.ts +0 -2
  37. package/dist/i18n/I18nWrapper.d.ts +0 -6
  38. package/dist/icons/AI.d.ts +0 -5
  39. package/dist/icons/Alert.d.ts +0 -5
  40. package/dist/icons/ArrowUp.d.ts +0 -5
  41. package/dist/icons/Bug.d.ts +0 -5
  42. package/dist/icons/Chat.d.ts +0 -5
  43. package/dist/icons/ChevronDown.d.ts +0 -5
  44. package/dist/icons/ChevronLeft.d.ts +0 -5
  45. package/dist/icons/ChevronRight.d.ts +0 -5
  46. package/dist/icons/ChevronUp.d.ts +0 -5
  47. package/dist/icons/Clear.d.ts +0 -5
  48. package/dist/icons/Close.d.ts +0 -6
  49. package/dist/icons/Code.d.ts +0 -5
  50. package/dist/icons/Copy.d.ts +0 -5
  51. package/dist/icons/DeepThought.d.ts +0 -5
  52. package/dist/icons/Delete.d.ts +0 -5
  53. package/dist/icons/Document.d.ts +0 -5
  54. package/dist/icons/Download.d.ts +0 -5
  55. package/dist/icons/Edit.d.ts +0 -5
  56. package/dist/icons/Expand.d.ts +0 -5
  57. package/dist/icons/Eye.d.ts +0 -5
  58. package/dist/icons/EyeInvisible.d.ts +0 -5
  59. package/dist/icons/Facebook.d.ts +0 -5
  60. package/dist/icons/Feedback.d.ts +0 -5
  61. package/dist/icons/File.d.ts +0 -5
  62. package/dist/icons/FileExcel.d.ts +0 -5
  63. package/dist/icons/FilePdf.d.ts +0 -5
  64. package/dist/icons/FileWord.d.ts +0 -5
  65. package/dist/icons/Fullscreen.d.ts +0 -5
  66. package/dist/icons/FullscreenExit.d.ts +0 -5
  67. package/dist/icons/Group.d.ts +0 -5
  68. package/dist/icons/History.d.ts +0 -6
  69. package/dist/icons/Image.d.ts +0 -4
  70. package/dist/icons/Info.d.ts +0 -5
  71. package/dist/icons/Link.d.ts +0 -5
  72. package/dist/icons/Linkedin.d.ts +0 -5
  73. package/dist/icons/Loading.d.ts +0 -6
  74. package/dist/icons/Logout.d.ts +0 -5
  75. package/dist/icons/Mail.d.ts +0 -5
  76. package/dist/icons/MapMarker.d.ts +0 -5
  77. package/dist/icons/MenuHorizontal.d.ts +0 -6
  78. package/dist/icons/MenuVertical.d.ts +0 -6
  79. package/dist/icons/Message.d.ts +0 -5
  80. package/dist/icons/Microphone.d.ts +0 -5
  81. package/dist/icons/Minus.d.ts +0 -5
  82. package/dist/icons/MinusCircle.d.ts +0 -5
  83. package/dist/icons/PaperClip.d.ts +0 -5
  84. package/dist/icons/Picture.d.ts +0 -5
  85. package/dist/icons/Plus.d.ts +0 -5
  86. package/dist/icons/Preview.d.ts +0 -4
  87. package/dist/icons/Print.d.ts +0 -6
  88. package/dist/icons/QuestionHelp.d.ts +0 -5
  89. package/dist/icons/Refresh.d.ts +0 -5
  90. package/dist/icons/SelectIcon.d.ts +0 -5
  91. package/dist/icons/Send.d.ts +0 -5
  92. package/dist/icons/Setting.d.ts +0 -5
  93. package/dist/icons/Share.d.ts +0 -5
  94. package/dist/icons/Sound.d.ts +0 -5
  95. package/dist/icons/SoundDeactivated.d.ts +0 -5
  96. package/dist/icons/Telegram.d.ts +0 -5
  97. package/dist/icons/ThumbDown.d.ts +0 -5
  98. package/dist/icons/ThumbUp.d.ts +0 -5
  99. package/dist/icons/Translation.d.ts +0 -5
  100. package/dist/icons/Twitter.d.ts +0 -5
  101. package/dist/icons/Upload.d.ts +0 -4
  102. package/dist/icons/User.d.ts +0 -5
  103. package/dist/icons/Warning.d.ts +0 -5
  104. package/dist/icons/WhatsApp.d.ts +0 -5
  105. package/dist/memori-ai-ui.umd.js +0 -10
  106. package/src/components/Alert/Alert.css +0 -95
  107. package/src/components/Alert/Alert.stories.tsx +0 -156
  108. package/src/components/Alert/Alert.test.tsx +0 -122
  109. package/src/components/Alert/Alert.tsx +0 -124
  110. package/src/components/Alert/__snapshots__/Alert.test.tsx.snap +0 -70
  111. package/src/components/Alert/index.tsx +0 -2
  112. package/src/components/Button/Button.stories.tsx +0 -629
  113. package/src/components/Button/Button.tsx +0 -161
  114. package/src/components/Button/index.tsx +0 -3
  115. package/src/components/Button/styles.module.css +0 -312
  116. package/src/components/Card/Card.css +0 -67
  117. package/src/components/Card/Card.stories.tsx +0 -104
  118. package/src/components/Card/Card.test.tsx +0 -67
  119. package/src/components/Card/Card.tsx +0 -58
  120. package/src/components/Card/__snapshots__/Card.test.tsx.snap +0 -321
  121. package/src/components/Card/index.tsx +0 -2
  122. package/src/components/Checkbox/Checkbox.css +0 -114
  123. package/src/components/Checkbox/Checkbox.stories.tsx +0 -77
  124. package/src/components/Checkbox/Checkbox.test.tsx +0 -50
  125. package/src/components/Checkbox/Checkbox.tsx +0 -61
  126. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -131
  127. package/src/components/Checkbox/index.tsx +0 -2
  128. package/src/components/ConfirmDialog/ConfirmDialog.css +0 -44
  129. package/src/components/ConfirmDialog/ConfirmDialog.stories.tsx +0 -235
  130. package/src/components/ConfirmDialog/ConfirmDialog.test.tsx +0 -129
  131. package/src/components/ConfirmDialog/ConfirmDialog.tsx +0 -73
  132. package/src/components/ConfirmDialog/__snapshots__/ConfirmDialog.test.tsx.snap +0 -11
  133. package/src/components/ConfirmDialog/index.tsx +0 -2
  134. package/src/components/Details/Details.css +0 -66
  135. package/src/components/Details/Details.stories.tsx +0 -67
  136. package/src/components/Drawer/Drawer.css +0 -210
  137. package/src/components/Drawer/Drawer.stories.tsx +0 -275
  138. package/src/components/Drawer/Drawer.test.tsx +0 -158
  139. package/src/components/Drawer/Drawer.tsx +0 -243
  140. package/src/components/Drawer/__snapshots__/Drawer.test.tsx.snap +0 -21
  141. package/src/components/Drawer/index.tsx +0 -2
  142. package/src/components/Expandable/Expandable.css +0 -15
  143. package/src/components/Expandable/Expandable.stories.tsx +0 -196
  144. package/src/components/Expandable/Expandable.test.tsx +0 -143
  145. package/src/components/Expandable/Expandable.tsx +0 -120
  146. package/src/components/Expandable/__snapshots__/Expandable.test.tsx.snap +0 -199
  147. package/src/components/Expandable/helpers.ts +0 -16
  148. package/src/components/Expandable/index.tsx +0 -2
  149. package/src/components/InputBase/InputBase.stories.tsx +0 -237
  150. package/src/components/InputBase/InputBase.tsx +0 -107
  151. package/src/components/InputBase/index.tsx +0 -3
  152. package/src/components/InputBase/styles.module.css +0 -96
  153. package/src/components/Modal/Modal.css +0 -95
  154. package/src/components/Modal/Modal.stories.tsx +0 -184
  155. package/src/components/Modal/Modal.test.tsx +0 -129
  156. package/src/components/Modal/Modal.tsx +0 -124
  157. package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +0 -17
  158. package/src/components/Modal/index.tsx +0 -2
  159. package/src/components/Select/Select.css +0 -134
  160. package/src/components/Select/Select.stories.tsx +0 -85
  161. package/src/components/Select/Select.test.tsx +0 -85
  162. package/src/components/Select/Select.tsx +0 -84
  163. package/src/components/Select/__snapshots__/Select.test.tsx.snap +0 -261
  164. package/src/components/Select/index.tsx +0 -2
  165. package/src/components/Slider/Slider.css +0 -194
  166. package/src/components/Slider/Slider.stories.tsx +0 -85
  167. package/src/components/Slider/Slider.test.tsx +0 -55
  168. package/src/components/Slider/Slider.tsx +0 -157
  169. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +0 -419
  170. package/src/components/Slider/index.tsx +0 -2
  171. package/src/components/Spin/Spin.css +0 -31
  172. package/src/components/Spin/Spin.stories.tsx +0 -65
  173. package/src/components/Spin/Spin.test.tsx +0 -47
  174. package/src/components/Spin/Spin.tsx +0 -34
  175. package/src/components/Spin/__snapshots__/Spin.test.tsx.snap +0 -193
  176. package/src/components/Spin/index.tsx +0 -2
  177. package/src/components/Table/Table.css +0 -130
  178. package/src/components/Table/Table.stories.tsx +0 -272
  179. package/src/components/Tooltip/Tooltip.css +0 -160
  180. package/src/components/Tooltip/Tooltip.stories.tsx +0 -136
  181. package/src/components/Tooltip/Tooltip.test.tsx +0 -110
  182. package/src/components/Tooltip/Tooltip.tsx +0 -46
  183. package/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap +0 -163
  184. package/src/components/Tooltip/index.tsx +0 -2
  185. package/src/components/definitions.stories.tsx +0 -150
  186. package/src/i18n/I18nWrapper.tsx +0 -13
  187. package/src/i18n/i18n.ts +0 -34
  188. package/src/icons/AI.tsx +0 -38
  189. package/src/icons/Alert.tsx +0 -31
  190. package/src/icons/ArrowUp.tsx +0 -28
  191. package/src/icons/Bug.tsx +0 -81
  192. package/src/icons/Chat.tsx +0 -30
  193. package/src/icons/ChevronDown.tsx +0 -26
  194. package/src/icons/ChevronLeft.tsx +0 -28
  195. package/src/icons/ChevronRight.tsx +0 -28
  196. package/src/icons/ChevronUp.tsx +0 -24
  197. package/src/icons/Clear.tsx +0 -23
  198. package/src/icons/Close.tsx +0 -30
  199. package/src/icons/Code.tsx +0 -30
  200. package/src/icons/Copy.tsx +0 -30
  201. package/src/icons/DeepThought.tsx +0 -38
  202. package/src/icons/Delete.tsx +0 -23
  203. package/src/icons/Document.tsx +0 -52
  204. package/src/icons/Download.tsx +0 -23
  205. package/src/icons/Edit.tsx +0 -17
  206. package/src/icons/Expand.tsx +0 -23
  207. package/src/icons/Eye.tsx +0 -17
  208. package/src/icons/EyeInvisible.tsx +0 -24
  209. package/src/icons/Facebook.tsx +0 -23
  210. package/src/icons/Feedback.tsx +0 -27
  211. package/src/icons/File.tsx +0 -17
  212. package/src/icons/FileExcel.tsx +0 -23
  213. package/src/icons/FilePdf.tsx +0 -23
  214. package/src/icons/FileWord.tsx +0 -23
  215. package/src/icons/Fullscreen.tsx +0 -23
  216. package/src/icons/FullscreenExit.tsx +0 -23
  217. package/src/icons/Group.tsx +0 -30
  218. package/src/icons/History.tsx +0 -33
  219. package/src/icons/Image.tsx +0 -37
  220. package/src/icons/Info.tsx +0 -37
  221. package/src/icons/Link.tsx +0 -17
  222. package/src/icons/Linkedin.tsx +0 -23
  223. package/src/icons/Loading.tsx +0 -28
  224. package/src/icons/Logout.tsx +0 -33
  225. package/src/icons/Mail.tsx +0 -17
  226. package/src/icons/MapMarker.tsx +0 -26
  227. package/src/icons/MenuHorizontal.tsx +0 -29
  228. package/src/icons/MenuVertical.tsx +0 -29
  229. package/src/icons/Message.tsx +0 -23
  230. package/src/icons/Microphone.tsx +0 -23
  231. package/src/icons/Minus.tsx +0 -23
  232. package/src/icons/MinusCircle.tsx +0 -24
  233. package/src/icons/PaperClip.tsx +0 -23
  234. package/src/icons/Picture.tsx +0 -23
  235. package/src/icons/Plus.tsx +0 -18
  236. package/src/icons/Preview.tsx +0 -31
  237. package/src/icons/Print.tsx +0 -37
  238. package/src/icons/QuestionHelp.tsx +0 -34
  239. package/src/icons/Refresh.tsx +0 -30
  240. package/src/icons/SelectIcon.tsx +0 -28
  241. package/src/icons/Send.tsx +0 -17
  242. package/src/icons/Setting.tsx +0 -23
  243. package/src/icons/Share.tsx +0 -23
  244. package/src/icons/Sound.tsx +0 -23
  245. package/src/icons/SoundDeactivated.tsx +0 -27
  246. package/src/icons/Telegram.tsx +0 -26
  247. package/src/icons/ThumbDown.tsx +0 -29
  248. package/src/icons/ThumbUp.tsx +0 -29
  249. package/src/icons/Translation.tsx +0 -24
  250. package/src/icons/Twitter.tsx +0 -23
  251. package/src/icons/Upload.tsx +0 -34
  252. package/src/icons/User.tsx +0 -17
  253. package/src/icons/Warning.tsx +0 -27
  254. package/src/icons/WhatsApp.tsx +0 -24
  255. package/src/icons/icons.stories.css +0 -5
  256. package/src/icons/icons.stories.tsx +0 -110
  257. package/src/icons/loading.css +0 -14
  258. package/src/index.ts +0 -13
  259. package/src/styles/utils.css +0 -17
  260. package/src/styles.css +0 -4
  261. package/src/theme/variables.css +0 -110
  262. package/src/vite-env.d.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
 
2
2
 
3
+ ## [1.1.0](https://github.com/memori-ai/ui/compare/v1.0.5-alpha...v1.1.0) (2026-02-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * add Collapsible component ([58a82f2](https://github.com/memori-ai/ui/commit/58a82f241f2c5c317eb2cbb9a4ac5eea2cbdf509))
9
+ * add ComponentShowcase stories ([2dac871](https://github.com/memori-ai/ui/commit/2dac8715bf14068b047da87c2c0f8da58a1e66be))
10
+ * add dark mode support with theme management hook and update README ([173b387](https://github.com/memori-ai/ui/commit/173b3876311c2957f1cd89db46b27dd3a12ce2bc))
11
+ * added Drawer component to index.ts export ([d8f0f7a](https://github.com/memori-ai/ui/commit/d8f0f7a61c102ccaca6b9db029175ef2409b69f8))
12
+ * enhance theme management with dynamic tenant color settings and update Storybook integration ([e24d2c6](https://github.com/memori-ai/ui/commit/e24d2c6128984f908173bcfe7166ab07bdea3292))
13
+ * implement Alert component with customizable options, improved accessibility, and enhanced styling ([2e0da23](https://github.com/memori-ai/ui/commit/2e0da231797e9326ae9fd1005f93d2c13d47ee81))
14
+ * improved Button component UX and fixed variables.css oklch calculated values ([3e3644a](https://github.com/memori-ai/ui/commit/3e3644a70af893d8264deda9b6ea35700654ee79))
15
+ * improved interaction effects and animations across different components ([4066914](https://github.com/memori-ai/ui/commit/40669144733cb1d0eafce017550bd5d51e439dd7))
16
+ * update component implementations ([de6449e](https://github.com/memori-ai/ui/commit/de6449ed7316e356f774a0a6c1ca6004b03cbf52))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * correct oklch color calculation values in variables.css ([ad1013b](https://github.com/memori-ai/ui/commit/ad1013b47dfe8a493aaf6895524d791e7af5f5ed))
22
+ * enhance plugin filtering in Storybook configuration ([d21e63a](https://github.com/memori-ai/ui/commit/d21e63a88407404bf1743e45827e88797bc77054))
23
+ * linting ([2f01329](https://github.com/memori-ai/ui/commit/2f0132972337ab8293a7d5153d86b827bd65033d))
24
+ * **types:** resolve portability error in generated declarations ([9c73d5e](https://github.com/memori-ai/ui/commit/9c73d5ea76268cb8ea08d6e6fa9805678dd19c26))
25
+ * update plugin filtering in Storybook configuration to correctly exclude vite:dts ([f4622bb](https://github.com/memori-ai/ui/commit/f4622bbab397ab17f3b1b04c4b3c8e67c24a7d7a))
26
+ * update Tooltip story to use new styles file ([9db0a3e](https://github.com/memori-ai/ui/commit/9db0a3eb82118122ac17a2e4a987d90ad75762fe))
27
+ * wrong import ([87cd301](https://github.com/memori-ai/ui/commit/87cd30184511195c52a822873715e179b59dd1f4))
28
+
29
+ ## [1.0.5-alpha](https://github.com/memori-ai/ui/compare/v1.0.4-alpha...v1.0.5-alpha) (2026-01-07)
30
+
31
+
32
+ ### Features
33
+
34
+ * add storybook for theme design ([0409aa9](https://github.com/memori-ai/ui/commit/0409aa92fc5791ea785eec775a15d3d4957c30c0))
35
+ * configure Vitest with a new setup file for testing-library ([efd8c0a](https://github.com/memori-ai/ui/commit/efd8c0a90f830edeb0186551b23fd604dd107ab9))
36
+ * implement Checkbox component with CSS Modules and updated Storybook ([50f02e4](https://github.com/memori-ai/ui/commit/50f02e40f9a93fa2263fe923d3378772c9f3d797))
37
+ * implement Drawer component with CSS Modules and updated Storybook ([f5e9b16](https://github.com/memori-ai/ui/commit/f5e9b167f91fed987bad32302a76df26c1b19d17))
38
+ * integrate loading styles and update icon imports ([0e458ff](https://github.com/memori-ai/ui/commit/0e458ff4d304312c38ef8feb3648243b3ed3450c))
39
+ * update Card, Checkbox, and Alert snapshots ([5ce66be](https://github.com/memori-ai/ui/commit/5ce66be30e25eb410e589d46fd24fa719d6f08e9))
40
+ * update Card, Checkbox, and Alert snapshots ([b1ae385](https://github.com/memori-ai/ui/commit/b1ae385425a2f303eda94d16ac93ea3a4570c6cb))
41
+
42
+
43
+ ### Bug Fixes
44
+
45
+ * style linting ([cc66fa7](https://github.com/memori-ai/ui/commit/cc66fa79279ceeafd19c5447608b255294d833d7))
46
+
47
+
48
+ ### Changes
49
+
50
+ * modal component using base-ui with new props and styles ([8f5a58e](https://github.com/memori-ai/ui/commit/8f5a58e0e48b0e7ad292fce5c6a199f73f0ea3e1))
51
+ * remove conditional Vitest browser testing setup ([b5c88b4](https://github.com/memori-ai/ui/commit/b5c88b49eaa279e535254eb9592bafe8a2ce9e5a))
52
+ * remove old story files for definitions and icons ([1301efd](https://github.com/memori-ai/ui/commit/1301efd0399d4e4b1017bc3c417a696511c604ac))
53
+ * replace Card component styles with CSS modules and enhance props for better customization ([2d87933](https://github.com/memori-ai/ui/commit/2d879331bbb2d838b57c305435389cdb16f67ea3))
54
+ * replace Select component with new SelectBox component ([a735df6](https://github.com/memori-ai/ui/commit/a735df6c7ae4830d645ce85b878a351fb380888c))
55
+
3
56
  ## [1.0.4-alpha](https://github.com/memori-ai/ui/compare/1.0.1-alpha...v1.0.4-alpha) (2026-01-02)
4
57
 
5
58
 
@@ -66,4 +119,4 @@
66
119
  * add recommended exts ([c830bee](https://github.com/memori-ai/ui/commit/c830beed074b1dc09aa47199c655b95854af3dab))
67
120
  * add storybook, tests, and ci ([6b9763a](https://github.com/memori-ai/ui/commit/6b9763ad12d995cdf0b84070a359c56567ae2017))
68
121
  * add vite + css lint + build steps ([b435ce3](https://github.com/memori-ai/ui/commit/b435ce37c90f23e8eb996d62d3503b51311f9267))
69
- * lint staged css ([522b2ed](https://github.com/memori-ai/ui/commit/522b2edb5307b7ea09beaebc4852d3b296ca359f))
122
+ * lint staged css ([522b2ed](https://github.com/memori-ai/ui/commit/522b2edb5307b7ea09beaebc4852d3b296ca359f))
package/README.md CHANGED
@@ -16,17 +16,92 @@ bun add @memori.ai/ui
16
16
 
17
17
  ## Usage
18
18
 
19
- Example usage for the Button component:
19
+ ### 1. Import Styles (Required)
20
+
21
+ You **must** import the compiled CSS file in your application's entry point (e.g., `main.tsx` or `App.tsx`) to ensure components are styled correctly.
22
+
23
+ ```tsx
24
+ import '@memori.ai/ui/styles.css'
25
+ ```
26
+
27
+ ### 2. Import Components
20
28
 
21
29
  ```tsx
22
30
  import { Button } from '@memori.ai/ui'
31
+
32
+ function App() {
33
+ return <Button variant="primary">Click me</Button>
34
+ }
35
+ ```
36
+
37
+ ## Theming & Customization
38
+
39
+ This library uses a **dynamic OKLCH color system**. The entire color palette (shades 100-900) is automatically generated from base primary and secondary colors using CSS Relative Color Syntax.
40
+
41
+ ### Overriding Brand Colors
42
+
43
+ To customize the theme, simply set the following CSS variables in your application (e.g., in `:root` or a specific container). You do **not** need to define every shade; the library calculates them for you.
44
+
45
+ ```css
46
+ :root {
47
+ /* Override Primary Color (Purple default) */
48
+ --memori-primary-rgb: oklch(0.55 0.22 290); /* or hex, rgb, etc. */
49
+
50
+ /* Override Secondary Color (Cyan default) */
51
+ --memori-secondary-rgb: oklch(0.7 0.15 200);
52
+ }
53
+ ```
54
+
55
+ ### Dark Mode
56
+
57
+ The library includes built-in dark mode support. All components automatically adapt when dark mode is enabled.
58
+
59
+ #### Using the Theme Hook
60
+
61
+ The easiest way to add theme switching is using the `useTheme` hook:
62
+
63
+ ```tsx
64
+ import { useTheme } from '@memori.ai/ui'
65
+
66
+ function App() {
67
+ const { theme, setTheme, toggleTheme } = useTheme()
68
+
69
+ return (
70
+ <button onClick={toggleTheme}>
71
+ Switch to {theme === 'light' ? 'dark' : 'light'} mode
72
+ </button>
73
+ )
74
+ }
23
75
  ```
24
76
 
25
- ```jsx
26
- <Button>Click me</Button>
77
+ The hook automatically:
78
+
79
+ - Detects system preference on first load
80
+ - Persists theme choice in localStorage
81
+ - Applies the theme to the document root
82
+
83
+ #### Manual Theme Control
84
+
85
+ You can also control the theme manually by setting a `data-theme` attribute or `dark` class on the document root:
86
+
87
+ ```tsx
88
+ // Set dark mode
89
+ document.documentElement.setAttribute('data-theme', 'dark')
90
+ // or
91
+ document.documentElement.classList.add('dark')
92
+
93
+ // Set light mode
94
+ document.documentElement.removeAttribute('data-theme')
95
+ document.documentElement.classList.remove('dark')
27
96
  ```
28
97
 
29
- To see all components, visit our [Storybook](https://memori-ai.github.io/ui/).
98
+ ### Styling Architecture
99
+
100
+ - **Plain CSS**: We use standard CSS files, not CSS Modules or CSS-in-JS.
101
+ - **Namespace**: All CSS classes and variables are prefixed with `memori-` to avoid conflicts (e.g., `.memori-button`, `--memori-spacing-md`).
102
+ - **BEM Convention**: Classes follow the Block Element Modifier convention (e.g., `.memori-card__header--active`).
103
+ - **Theme**: Is defined inside the '/theme/variables.css' file.
104
+ - **Icons**: We use [Lucide React](https://lucide.dev) for all icons.
30
105
 
31
106
  ## Development
32
107
 
@@ -46,7 +121,7 @@ To run tests (in watch mode):
46
121
 
47
122
  ```bash
48
123
  bun run test
49
- # this is not the same as `bun test` 
124
+ # this is not the same as `bun test`
50
125
  # `bun test` runs the tests using Bun test runner and it's not compatible with our setup
51
126
  ```
52
127
 
@@ -96,10 +171,11 @@ bun run release
96
171
 
97
172
  - [Bun](https://bun.com)
98
173
  - [React](https://react.dev)
99
- - [React Aria](https://react-spectrum.adobe.com/react-aria/index.html)
174
+ - [@base-ui/react](https://github.com/base-ui/react)
100
175
  - [Storybook](https://storybook.js.org)
101
176
  - [Vite](https://vitejs.dev)
102
177
  - [Vitest](https://vitest.dev)
103
178
  - [Playwright](https://playwright.dev)
104
179
  - [React Testing Library](https://testing-library.com/react)
105
180
  - [React I18next](https://react.i18next.com)
181
+ - [Lucide React](https://lucide.dev)