@mdigital_ui/ui 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1023 -341
  3. package/dist/accordion/index.js +3 -3
  4. package/dist/avatar/index.js +4 -0
  5. package/dist/avatar/index.js.map +1 -0
  6. package/dist/badge/index.js +3 -3
  7. package/dist/breadcrumbs/index.js +5 -5
  8. package/dist/button/index.js +4 -4
  9. package/dist/button-group/index.js +2 -2
  10. package/dist/card/index.js +2 -2
  11. package/dist/carousel/index.js +2 -2
  12. package/dist/cascader/index.js +2 -2
  13. package/dist/chart/index.js +2 -2
  14. package/dist/checkbox/index.js +3 -3
  15. package/dist/checkbox-group/index.js +2 -2
  16. package/dist/{chunk-GFQXGLFD.js → chunk-22MY7IWD.js} +82 -62
  17. package/dist/chunk-22MY7IWD.js.map +1 -0
  18. package/dist/{chunk-IRNJZ754.js → chunk-2J57G7XG.js} +76 -18
  19. package/dist/chunk-2J57G7XG.js.map +1 -0
  20. package/dist/{chunk-SOIF4SHB.js → chunk-2NYVRAG4.js} +24 -15
  21. package/dist/chunk-2NYVRAG4.js.map +1 -0
  22. package/dist/{chunk-3WVJE5MF.js → chunk-2OUGJBXK.js} +19 -12
  23. package/dist/chunk-2OUGJBXK.js.map +1 -0
  24. package/dist/{chunk-JFGLDCAK.js → chunk-2REG4OUB.js} +19 -7
  25. package/dist/chunk-2REG4OUB.js.map +1 -0
  26. package/dist/{chunk-YII4K64U.js → chunk-2WZVD7P3.js} +36 -10
  27. package/dist/chunk-2WZVD7P3.js.map +1 -0
  28. package/dist/chunk-3HBMVZF5.js +72 -0
  29. package/dist/chunk-3HBMVZF5.js.map +1 -0
  30. package/dist/{chunk-7ODPSHIQ.js → chunk-3UCZ4GMN.js} +10 -4
  31. package/dist/chunk-3UCZ4GMN.js.map +1 -0
  32. package/dist/{chunk-QVCGNOBE.js → chunk-43RDFTC5.js} +78 -31
  33. package/dist/chunk-43RDFTC5.js.map +1 -0
  34. package/dist/{chunk-7YPX6NJK.js → chunk-4LSKRZOT.js} +12 -7
  35. package/dist/chunk-4LSKRZOT.js.map +1 -0
  36. package/dist/chunk-5PUATOLR.js +127 -0
  37. package/dist/chunk-5PUATOLR.js.map +1 -0
  38. package/dist/{chunk-6IPISGTP.js → chunk-7UCNBMCV.js} +102 -27
  39. package/dist/chunk-7UCNBMCV.js.map +1 -0
  40. package/dist/{chunk-Y2CXG3PT.js → chunk-C5YO5VZS.js} +8 -8
  41. package/dist/chunk-C5YO5VZS.js.map +1 -0
  42. package/dist/chunk-CLLNXRYZ.js +234 -0
  43. package/dist/chunk-CLLNXRYZ.js.map +1 -0
  44. package/dist/{chunk-INH7KYCK.js → chunk-CMGCJXE5.js} +275 -95
  45. package/dist/chunk-CMGCJXE5.js.map +1 -0
  46. package/dist/{chunk-MDY3HCRC.js → chunk-CPDVBHA3.js} +47 -18
  47. package/dist/chunk-CPDVBHA3.js.map +1 -0
  48. package/dist/{chunk-6MYKJE6A.js → chunk-CSRMVLPR.js} +109 -27
  49. package/dist/chunk-CSRMVLPR.js.map +1 -0
  50. package/dist/{chunk-IHKPZOE5.js → chunk-DQQLJ5C5.js} +6 -4
  51. package/dist/chunk-DQQLJ5C5.js.map +1 -0
  52. package/dist/{chunk-555KXZRK.js → chunk-EGNF7BRT.js} +6 -4
  53. package/dist/chunk-EGNF7BRT.js.map +1 -0
  54. package/dist/{chunk-7BUNJYZO.js → chunk-FEMHXG2P.js} +22 -6
  55. package/dist/chunk-FEMHXG2P.js.map +1 -0
  56. package/dist/chunk-FIGSNRWY.js +382 -0
  57. package/dist/chunk-FIGSNRWY.js.map +1 -0
  58. package/dist/{chunk-JGQOEAWL.js → chunk-FVTMKQUE.js} +5 -3
  59. package/dist/chunk-FVTMKQUE.js.map +1 -0
  60. package/dist/chunk-H47C2ENJ.js +215 -0
  61. package/dist/chunk-H47C2ENJ.js.map +1 -0
  62. package/dist/{chunk-77YTCM7G.js → chunk-HEV27FUK.js} +75 -32
  63. package/dist/chunk-HEV27FUK.js.map +1 -0
  64. package/dist/chunk-HWFI4GJE.js +130 -0
  65. package/dist/chunk-HWFI4GJE.js.map +1 -0
  66. package/dist/{chunk-DV5J5NLI.js → chunk-ILQQTKD4.js} +8 -5
  67. package/dist/chunk-ILQQTKD4.js.map +1 -0
  68. package/dist/{chunk-AVPPV5OM.js → chunk-IMGVPMHJ.js} +6 -4
  69. package/dist/chunk-IMGVPMHJ.js.map +1 -0
  70. package/dist/{chunk-23BPDLT4.js → chunk-ITZBSE5F.js} +42 -22
  71. package/dist/chunk-ITZBSE5F.js.map +1 -0
  72. package/dist/{chunk-HBEJ4S2Y.js → chunk-JIREY2VB.js} +19 -13
  73. package/dist/chunk-JIREY2VB.js.map +1 -0
  74. package/dist/{chunk-L6EVOPWH.js → chunk-JZ5F6XDO.js} +6 -4
  75. package/dist/chunk-JZ5F6XDO.js.map +1 -0
  76. package/dist/{chunk-TWZ5LXLL.js → chunk-KPI7MN5V.js} +45 -16
  77. package/dist/chunk-KPI7MN5V.js.map +1 -0
  78. package/dist/{chunk-GGREAJO5.js → chunk-KTHWXHDN.js} +10 -5
  79. package/dist/chunk-KTHWXHDN.js.map +1 -0
  80. package/dist/{chunk-TUTOU4X6.js → chunk-LK4EPTNG.js} +13 -142
  81. package/dist/chunk-LK4EPTNG.js.map +1 -0
  82. package/dist/{chunk-35K7N4JT.js → chunk-LMR7TKDJ.js} +17 -6
  83. package/dist/chunk-LMR7TKDJ.js.map +1 -0
  84. package/dist/{chunk-BYWYC7RC.js → chunk-MRFCITKK.js} +19 -10
  85. package/dist/chunk-MRFCITKK.js.map +1 -0
  86. package/dist/{chunk-TG2AECIN.js → chunk-MXDTUN3V.js} +22 -9
  87. package/dist/chunk-MXDTUN3V.js.map +1 -0
  88. package/dist/{chunk-PQZB43VJ.js → chunk-N32VWE6V.js} +38 -23
  89. package/dist/chunk-N32VWE6V.js.map +1 -0
  90. package/dist/{chunk-NZA526GC.js → chunk-N3ZVPIFC.js} +16 -13
  91. package/dist/chunk-N3ZVPIFC.js.map +1 -0
  92. package/dist/{chunk-2OGZENFC.js → chunk-NGYLRX6F.js} +2 -16
  93. package/dist/chunk-NGYLRX6F.js.map +1 -0
  94. package/dist/{chunk-NQB4V5P7.js → chunk-PHQOHVG3.js} +5 -5
  95. package/dist/chunk-PHQOHVG3.js.map +1 -0
  96. package/dist/{chunk-SYDNDYZJ.js → chunk-PXOHJJBE.js} +22 -9
  97. package/dist/chunk-PXOHJJBE.js.map +1 -0
  98. package/dist/{chunk-HWSLJGT7.js → chunk-Q57THXIU.js} +28 -10
  99. package/dist/chunk-Q57THXIU.js.map +1 -0
  100. package/dist/{chunk-22FIGRGO.js → chunk-QF3NJUUG.js} +31 -7
  101. package/dist/chunk-QF3NJUUG.js.map +1 -0
  102. package/dist/{chunk-CPPFXCNB.js → chunk-QKSDVYKF.js} +4 -4
  103. package/dist/chunk-QKSDVYKF.js.map +1 -0
  104. package/dist/{chunk-7TN4PGYF.js → chunk-REKWBXAQ.js} +49 -33
  105. package/dist/chunk-REKWBXAQ.js.map +1 -0
  106. package/dist/{chunk-DP6AWUH5.js → chunk-ROA7BYGB.js} +49 -19
  107. package/dist/chunk-ROA7BYGB.js.map +1 -0
  108. package/dist/{chunk-XG3KLPPS.js → chunk-RPIJ2KY7.js} +9 -4
  109. package/dist/chunk-RPIJ2KY7.js.map +1 -0
  110. package/dist/{chunk-C2MZL644.js → chunk-RW4RW4DV.js} +80 -30
  111. package/dist/chunk-RW4RW4DV.js.map +1 -0
  112. package/dist/chunk-RYKVZFGB.js +607 -0
  113. package/dist/chunk-RYKVZFGB.js.map +1 -0
  114. package/dist/chunk-SAVEKACZ.js +552 -0
  115. package/dist/chunk-SAVEKACZ.js.map +1 -0
  116. package/dist/{chunk-SMVVCZNM.js → chunk-SGRACNBP.js} +12 -7
  117. package/dist/chunk-SGRACNBP.js.map +1 -0
  118. package/dist/chunk-UUP7YGOS.js +299 -0
  119. package/dist/chunk-UUP7YGOS.js.map +1 -0
  120. package/dist/chunk-VY3X4SDU.js +143 -0
  121. package/dist/chunk-VY3X4SDU.js.map +1 -0
  122. package/dist/{chunk-SGMIDNPI.js → chunk-W3ES3UPV.js} +73 -19
  123. package/dist/chunk-W3ES3UPV.js.map +1 -0
  124. package/dist/{chunk-EFMKUCGX.js → chunk-WTGCXWNX.js} +8 -5
  125. package/dist/chunk-WTGCXWNX.js.map +1 -0
  126. package/dist/chunk-WUBMNJGC.js +141 -0
  127. package/dist/chunk-WUBMNJGC.js.map +1 -0
  128. package/dist/{chunk-O2VJ6KP4.js → chunk-X5SCI7KH.js} +190 -142
  129. package/dist/chunk-X5SCI7KH.js.map +1 -0
  130. package/dist/{chunk-ARK3EROZ.js → chunk-YAAV7FQG.js} +20 -12
  131. package/dist/chunk-YAAV7FQG.js.map +1 -0
  132. package/dist/{chunk-MLNIKNLI.js → chunk-YFK2DHCY.js} +57 -11
  133. package/dist/chunk-YFK2DHCY.js.map +1 -0
  134. package/dist/{chunk-R2FZO7AM.js → chunk-YTUB2Q7P.js} +26 -9
  135. package/dist/chunk-YTUB2Q7P.js.map +1 -0
  136. package/dist/clipboard/index.js +2 -2
  137. package/dist/collapse/index.js +2 -2
  138. package/dist/command/index.js +3 -3
  139. package/dist/context-menu/index.js +4 -0
  140. package/dist/context-menu/index.js.map +1 -0
  141. package/dist/date-picker/index.js +4 -4
  142. package/dist/descriptions/index.js +2 -2
  143. package/dist/divider/index.js +4 -0
  144. package/dist/divider/index.js.map +1 -0
  145. package/dist/drawer/index.js +2 -2
  146. package/dist/dropdown/index.js +4 -4
  147. package/dist/empty/index.js +2 -2
  148. package/dist/fetching-overlay/index.js +4 -4
  149. package/dist/grid/index.js +2 -2
  150. package/dist/image/index.js +2 -2
  151. package/dist/index.d.ts +1249 -168
  152. package/dist/index.js +63 -883
  153. package/dist/index.js.map +1 -1
  154. package/dist/input/index.js +4 -4
  155. package/dist/input-group/index.js +2 -2
  156. package/dist/input-otp/index.js +2 -2
  157. package/dist/input-password/index.js +5 -5
  158. package/dist/kbd/index.js +3 -3
  159. package/dist/modal/index.js +2 -2
  160. package/dist/multi-select/index.js +4 -4
  161. package/dist/notification/index.js +3 -3
  162. package/dist/pagination/index.js +2 -2
  163. package/dist/popover/index.js +3 -3
  164. package/dist/progress/index.js +2 -2
  165. package/dist/radio/index.js +3 -3
  166. package/dist/radio-group/index.js +2 -2
  167. package/dist/rating/index.js +2 -2
  168. package/dist/ribbon/index.js +2 -2
  169. package/dist/select/index.js +5 -5
  170. package/dist/skeleton/index.js +3 -3
  171. package/dist/slider/index.js +2 -2
  172. package/dist/spinner/index.js +3 -3
  173. package/dist/stepper/index.js +2 -2
  174. package/dist/styles/base.css +204 -99
  175. package/dist/styles/global.css +1330 -721
  176. package/dist/styles/themes/dark.css +3 -1
  177. package/dist/styles/themes/light.css +3 -1
  178. package/dist/styles/themes/presets/corporate.css +126 -0
  179. package/dist/styles/themes/presets/minimal.css +126 -0
  180. package/dist/styles/themes/presets/vibrant.css +126 -0
  181. package/dist/switch/index.js +3 -3
  182. package/dist/table/index.js +10 -10
  183. package/dist/tabs/index.js +3 -3
  184. package/dist/tag/index.js +5 -0
  185. package/dist/tag/index.js.map +1 -0
  186. package/dist/textarea/index.js +2 -2
  187. package/dist/theme/index.js +3 -0
  188. package/dist/theme/index.js.map +1 -0
  189. package/dist/toggle/index.js +2 -2
  190. package/dist/toggle-group/index.js +2 -2
  191. package/dist/tooltip/index.js +3 -3
  192. package/dist/transfer/index.js +4 -4
  193. package/dist/tree/index.js +2 -2
  194. package/dist/tree-select/index.js +5 -5
  195. package/dist/upload/index.js +2 -2
  196. package/package.json +439 -66
  197. package/dist/chunk-22FIGRGO.js.map +0 -1
  198. package/dist/chunk-23BPDLT4.js.map +0 -1
  199. package/dist/chunk-2OGZENFC.js.map +0 -1
  200. package/dist/chunk-35K7N4JT.js.map +0 -1
  201. package/dist/chunk-3QKPSJTV.js +0 -120
  202. package/dist/chunk-3QKPSJTV.js.map +0 -1
  203. package/dist/chunk-3WVJE5MF.js.map +0 -1
  204. package/dist/chunk-555KXZRK.js.map +0 -1
  205. package/dist/chunk-6IPISGTP.js.map +0 -1
  206. package/dist/chunk-6MYKJE6A.js.map +0 -1
  207. package/dist/chunk-6PFBSVLK.js +0 -39
  208. package/dist/chunk-6PFBSVLK.js.map +0 -1
  209. package/dist/chunk-77YTCM7G.js.map +0 -1
  210. package/dist/chunk-7BUNJYZO.js.map +0 -1
  211. package/dist/chunk-7ODPSHIQ.js.map +0 -1
  212. package/dist/chunk-7TN4PGYF.js.map +0 -1
  213. package/dist/chunk-7YPX6NJK.js.map +0 -1
  214. package/dist/chunk-ARK3EROZ.js.map +0 -1
  215. package/dist/chunk-AVPPV5OM.js.map +0 -1
  216. package/dist/chunk-BYWYC7RC.js.map +0 -1
  217. package/dist/chunk-C2MZL644.js.map +0 -1
  218. package/dist/chunk-CPPFXCNB.js.map +0 -1
  219. package/dist/chunk-DP6AWUH5.js.map +0 -1
  220. package/dist/chunk-DV5J5NLI.js.map +0 -1
  221. package/dist/chunk-EFMKUCGX.js.map +0 -1
  222. package/dist/chunk-GFQXGLFD.js.map +0 -1
  223. package/dist/chunk-GGREAJO5.js.map +0 -1
  224. package/dist/chunk-GH3CNX5N.js +0 -178
  225. package/dist/chunk-GH3CNX5N.js.map +0 -1
  226. package/dist/chunk-HBEJ4S2Y.js.map +0 -1
  227. package/dist/chunk-HWSLJGT7.js.map +0 -1
  228. package/dist/chunk-IHKPZOE5.js.map +0 -1
  229. package/dist/chunk-INH7KYCK.js.map +0 -1
  230. package/dist/chunk-IRNJZ754.js.map +0 -1
  231. package/dist/chunk-IUUEYOMN.js +0 -470
  232. package/dist/chunk-IUUEYOMN.js.map +0 -1
  233. package/dist/chunk-JFGLDCAK.js.map +0 -1
  234. package/dist/chunk-JGQOEAWL.js.map +0 -1
  235. package/dist/chunk-L6EVOPWH.js.map +0 -1
  236. package/dist/chunk-LSQLUYTD.js +0 -192
  237. package/dist/chunk-LSQLUYTD.js.map +0 -1
  238. package/dist/chunk-MDY3HCRC.js.map +0 -1
  239. package/dist/chunk-MLNIKNLI.js.map +0 -1
  240. package/dist/chunk-NQB4V5P7.js.map +0 -1
  241. package/dist/chunk-NZA526GC.js.map +0 -1
  242. package/dist/chunk-O2VJ6KP4.js.map +0 -1
  243. package/dist/chunk-PQZB43VJ.js.map +0 -1
  244. package/dist/chunk-QVCGNOBE.js.map +0 -1
  245. package/dist/chunk-R2FZO7AM.js.map +0 -1
  246. package/dist/chunk-SGMIDNPI.js.map +0 -1
  247. package/dist/chunk-SMVVCZNM.js.map +0 -1
  248. package/dist/chunk-SOIF4SHB.js.map +0 -1
  249. package/dist/chunk-SYDNDYZJ.js.map +0 -1
  250. package/dist/chunk-TG2AECIN.js.map +0 -1
  251. package/dist/chunk-TIMRHEKH.js +0 -452
  252. package/dist/chunk-TIMRHEKH.js.map +0 -1
  253. package/dist/chunk-TUTOU4X6.js.map +0 -1
  254. package/dist/chunk-TWZ5LXLL.js.map +0 -1
  255. package/dist/chunk-XG3KLPPS.js.map +0 -1
  256. package/dist/chunk-Y2CXG3PT.js.map +0 -1
  257. package/dist/chunk-YII4K64U.js.map +0 -1
package/README.md CHANGED
@@ -1,63 +1,73 @@
1
- # @mdigital/ui
1
+ # @mdigital_ui/ui
2
2
 
3
3
  Modern React component library built with Tailwind CSS v4, designed for multi-brand support and maximum customization.
4
4
 
5
5
  ## Features
6
6
 
7
- - **50+ Components** - Comprehensive UI component library
8
- - **Tailwind CSS v4** - Modern utility-first CSS framework
9
- - **TypeScript** - Full type safety and IntelliSense
10
- - **Dark Mode** - Built-in dark mode support
11
- - **Multi-Brand** - CSS variable-based theming system
12
- - **Tree-Shakeable** - Optimal bundle size with ESM
13
- - **Accessible** - WCAG 2.1 AA compliant
14
- - **React 19** - Modern React patterns (no forwardRef)
7
+ - **57 Components** - Comprehensive UI component library
8
+ - **Tailwind CSS v4** - Modern utility-first CSS with OKLCH colors
9
+ - **TypeScript** - Full type safety and IntelliSense
10
+ - **Dark Mode** - Built-in dark mode support via `.dark` class
11
+ - **Theme Presets** - Pre-built color schemes (Corporate, Vibrant, Minimal)
12
+ - **CSS Variables** - Override any design token without rebuilding
13
+ - **Tree-Shakeable** - Optimal bundle size with ESM
14
+ - **Accessible** - WCAG 2.1 AA compliant
15
+ - **React 19** - Modern React patterns (no forwardRef)
15
16
 
16
17
  ## Installation
17
18
 
18
19
  ```bash
19
20
  npm install @mdigital_ui/ui
21
+ # or
22
+ pnpm add @mdigital_ui/ui
20
23
  ```
21
24
 
22
- **That's it!** All dependencies and styles are included. Tree-shaking ensures only the components you import end up in your production bundle.
23
-
24
25
  ### Peer Dependencies
25
26
 
26
- You need to have these in your project:
27
-
27
+ Required:
28
28
  ```bash
29
29
  npm install react react-dom
30
30
  ```
31
31
 
32
+ Optional (for specific components):
33
+ ```bash
34
+ # For Carousel component
35
+ npm install swiper
36
+
37
+ # For Table component (advanced features)
38
+ npm install @tanstack/react-table
39
+
40
+ # For Chart components
41
+ npm install recharts
42
+
43
+ # For DatePicker component
44
+ npm install react-datepicker
45
+ ```
46
+
32
47
  ## Quick Start
33
48
 
34
49
  ### 1. Import Styles
35
50
 
36
- In your main application entry point (e.g., `app/layout.tsx` or `src/main.tsx`):
51
+ In your main entry point (e.g., `app/layout.tsx` or `src/main.tsx`):
37
52
 
38
53
  ```tsx
39
- // Import the base styles
40
- import '@mdigital_ui/ui/styles/base.css'
41
- // Import light theme (default)
54
+ // Required: Global styles and light theme
55
+ import '@mdigital_ui/ui/styles/global.css'
42
56
  import '@mdigital_ui/ui/styles/themes/light.css'
43
- // Optional: Import dark theme for dark mode support
44
- import '@mdigital_ui/ui/styles/themes/dark.css'
45
- ```
46
57
 
47
- **Or** import in your CSS file:
58
+ // Optional: Dark mode support
59
+ import '@mdigital_ui/ui/styles/themes/dark.css'
48
60
 
49
- ```css
50
- /* app/globals.css or src/index.css */
51
- @import '@mdigital_ui/ui/styles/base.css';
52
- @import '@mdigital_ui/ui/styles/themes/light.css';
53
- /* Optional: Dark mode */
54
- @import '@mdigital_ui/ui/styles/themes/dark.css';
61
+ // Optional: Theme presets
62
+ import '@mdigital_ui/ui/styles/themes/presets/corporate.css'
63
+ import '@mdigital_ui/ui/styles/themes/presets/vibrant.css'
64
+ import '@mdigital_ui/ui/styles/themes/presets/minimal.css'
55
65
  ```
56
66
 
57
67
  ### 2. Use Components
58
68
 
59
69
  ```tsx
60
- import { Button, Input, Card } from '@mdigital/ui'
70
+ import { Button, Input, Card } from '@mdigital_ui/ui'
61
71
 
62
72
  function App() {
63
73
  return (
@@ -71,383 +81,1083 @@ function App() {
71
81
  }
72
82
  ```
73
83
 
74
- ## Import Patterns
75
-
76
- ### Subpath Imports (Recommended)
84
+ ## Customization with ClassNames
77
85
 
78
- ```tsx
79
- import Button from '@mdigital_ui/ui/button'
80
- import Input from '@mdigital_ui/ui/input'
81
- import Table from '@mdigital_ui/ui/table'
82
- ```
86
+ Every component in the UI kit supports fine-grained styling through the `classNames` prop. This allows you to override styles for individual component parts without modifying the entire component.
83
87
 
84
- **Tree-shaking works automatically:**
85
- - Import only `Button`? Only Button code ends up in your bundle
86
- - Import `Table`? Table + @tanstack/react-table are bundled
87
- - Don't import `Carousel`? Swiper never touches your bundle
88
+ ### How ClassNames Work
88
89
 
89
- ### Named Imports
90
+ The `classNames` prop accepts an object where each key corresponds to a specific part of the component. Values are CSS class strings that are merged with the component's default classes using semantic class names.
90
91
 
91
- ```tsx
92
- import { Button, Input, Select } from '@mdigital_ui/ui'
93
- ```
92
+ **Key Principles:**
94
93
 
95
- Both import styles work identically. Use whichever you prefer.
94
+ 1. **Semantic Classes**: Each part uses a semantic class name in the format `{componentName}_{slot}` (e.g., `button_root`, `input_label`)
95
+ 2. **Data Attributes**: All parts include `data-slot` attributes for CSS targeting
96
+ 3. **Class Merging**: Custom classes are merged with default classes, allowing you to:
97
+ - Add Tailwind utilities
98
+ - Override specific properties
99
+ - Add state-based styles
96
100
 
97
- ### Type Imports
101
+ ### Basic Usage
98
102
 
99
103
  ```tsx
100
- import type { ButtonProps, InputProps } from '@mdigital_ui/ui'
104
+ import Button from '@mdigital_ui/ui/button'
105
+
106
+ function App() {
107
+ return (
108
+ <Button
109
+ classNames={{
110
+ root: 'shadow-lg hover:shadow-xl',
111
+ icon: 'text-white',
112
+ content: 'font-bold uppercase',
113
+ }}
114
+ >
115
+ Click Me
116
+ </Button>
117
+ )
118
+ }
101
119
  ```
102
120
 
103
- ## Theming & Customization
121
+ ### Targeting via Semantic Classes in CSS
104
122
 
105
- The UI Kit uses **CSS custom properties (variables)** for all design tokens, making it easy to customize without touching Tailwind's configuration.
123
+ Use semantic class names in your CSS files:
106
124
 
107
- ### Quick Customization
125
+ ```css
126
+ /* Target the root button element */
127
+ .button_root {
128
+ border-radius: 12px;
129
+ font-family: 'Inter', sans-serif;
130
+ }
108
131
 
109
- Create a CSS file to override any design tokens:
132
+ /* Target button icon */
133
+ .button_icon {
134
+ margin: 0 4px;
135
+ }
110
136
 
111
- ```css
112
- /* app/theme.css or src/theme.css */
113
- :root {
114
- /* Brand Colors */
115
- --color-primary: oklch(0.55 0.22 270); /* Purple primary */
116
- --color-primary-hover: oklch(0.50 0.24 270);
117
- --color-accent: oklch(0.75 0.18 45); /* Orange accent */
137
+ /* Combine with states */
138
+ .button_root:hover {
139
+ transform: scale(1.05);
140
+ }
141
+ ```
118
142
 
119
- /* Semantic Colors */
120
- --color-success: oklch(0.65 0.20 140);
121
- --color-error: oklch(0.60 0.25 20);
143
+ ### Using Data-Slot Attributes
122
144
 
123
- /* Component Sizing */
124
- --button-height-md: 2.5rem;
125
- --input-height-md: 2.5rem;
126
- --radius-md: 0.5rem;
145
+ Target component parts using `data-slot` attributes:
127
146
 
128
- /* Typography */
129
- --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
130
- --text-base: 1rem;
147
+ ```css
148
+ /* Target via data attribute (highest specificity) */
149
+ [data-slot="root"] {
150
+ /* Styles */
151
+ }
152
+
153
+ [data-slot="content"] {
154
+ /* Styles */
131
155
  }
132
156
  ```
133
157
 
134
- Then import it **after** the UI Kit styles:
158
+ ### Combining with Tailwind Classes
159
+
160
+ Mix custom Tailwind classes with component classNames:
135
161
 
136
162
  ```tsx
137
- import '@mdigital_ui/ui/styles/base.css'
138
- import '@mdigital_ui/ui/styles/themes/light.css'
139
- import './theme.css' // Your customizations
163
+ <Input
164
+ classNames={{
165
+ root: 'custom-wrapper',
166
+ input: 'bg-blue-50 text-blue-900 focus:ring-blue-500',
167
+ label: 'font-semibold text-blue-700',
168
+ }}
169
+ />
140
170
  ```
141
171
 
142
- ### Available Variables
172
+ ### TypeScript Support
143
173
 
144
- <details>
145
- <summary><strong>🎨 Colors (Click to expand)</strong></summary>
174
+ Import type definitions for full IntelliSense:
146
175
 
147
- ```css
148
- /* Brand Colors */
149
- --color-primary
150
- --color-primary-hover
151
- --color-primary-active
152
- --color-primary-foreground
153
- --color-secondary
154
- --color-secondary-hover
155
- --color-secondary-active
156
- --color-secondary-foreground
157
- --color-accent
158
- --color-accent-hover
159
- --color-accent-active
160
- --color-accent-foreground
161
-
162
- /* Semantic Colors */
163
- --color-success
164
- --color-success-hover
165
- --color-success-active
166
- --color-error
167
- --color-error-hover
168
- --color-error-active
169
- --color-warning
170
- --color-warning-hover
171
- --color-warning-active
172
- --color-info
173
- --color-info-hover
174
- --color-info-active
175
-
176
- /* Backgrounds & Surfaces */
177
- --color-background
178
- --color-background-secondary
179
- --color-surface
180
- --color-border
181
- --color-border-primary
182
-
183
- /* Text Colors */
184
- --color-text-primary
185
- --color-text-secondary
186
- --color-text-muted
176
+ ```tsx
177
+ import type { ButtonClassNames, InputClassNames, SelectClassNames } from '@mdigital_ui/ui'
187
178
 
188
- /* Grayscale */
189
- --color-gray-50 through --color-gray-950
190
- --color-white
191
- --color-black
179
+ const buttonClasses: ButtonClassNames = {
180
+ root: 'custom-root',
181
+ icon: 'custom-icon',
182
+ content: 'custom-content',
183
+ spinner: 'custom-spinner',
184
+ }
185
+
186
+ <Button classNames={buttonClasses}>Submit</Button>
192
187
  ```
193
- </details>
194
188
 
195
- <details>
196
- <summary><strong>📐 Sizing & Spacing (Click to expand)</strong></summary>
189
+ ### ClassNames Reference
190
+
191
+ Each component below documents all available `classNames` keys. Use these to target specific parts of the component for styling.
192
+
193
+ #### Form Components
194
+
195
+ **Input**
196
+
197
+ | Key | Semantic Class | Purpose |
198
+ |-----|----------------|---------|
199
+ | root | input_root | Wrapper div containing label and input |
200
+ | wrapper | input_wrapper | Input wrapper with positioning context |
201
+ | label | input_label | Label element |
202
+ | input | input_input | Input element |
203
+ | leftIcon | input_leftIcon | Left icon container |
204
+ | rightIcon | input_rightIcon | Right icon container |
205
+ | clearButton | input_clearButton | Clear button element |
206
+ | helper | input_helper | Helper/hint text |
207
+ | error | input_error | Error message text |
208
+
209
+ **InputPassword**
210
+
211
+ | Key | Semantic Class | Purpose |
212
+ |-----|----------------|---------|
213
+ | root | inputPassword_root | Wrapper div |
214
+ | wrapper | inputPassword_wrapper | Input wrapper with positioning |
215
+ | label | inputPassword_label | Label element |
216
+ | input | inputPassword_input | Password input element |
217
+ | toggleButton | inputPassword_toggleButton | Show/hide toggle button |
218
+ | toggleIcon | inputPassword_toggleIcon | Toggle icon element |
219
+ | helper | inputPassword_helper | Helper text |
220
+ | error | inputPassword_error | Error message text |
221
+
222
+ **InputOTP**
223
+
224
+ | Key | Semantic Class | Purpose |
225
+ |-----|----------------|---------|
226
+ | root | inputOTP_root | Root wrapper |
227
+ | wrapper | inputOTP_wrapper | Input slots container |
228
+ | label | inputOTP_label | Label element |
229
+ | slot | inputOTP_slot | Individual OTP input slot |
230
+ | slotActive | inputOTP_slotActive | Active/focused slot |
231
+ | separator | inputOTP_separator | Separator between slots |
232
+ | helper | inputOTP_helper | Helper text |
233
+
234
+ **InputGroup**
235
+
236
+ | Key | Semantic Class | Purpose |
237
+ |-----|----------------|---------|
238
+ | root | inputGroup_root | Root wrapper |
239
+ | addon | inputGroup_addon | Addon (prefix/suffix) element |
240
+ | input | inputGroup_input | Input element |
241
+
242
+ **Textarea**
243
+
244
+ | Key | Semantic Class | Purpose |
245
+ |-----|----------------|---------|
246
+ | root | textarea_root | Wrapper div |
247
+ | wrapper | textarea_wrapper | Textarea wrapper |
248
+ | label | textarea_label | Label element |
249
+ | textarea | textarea_textarea | Textarea element |
250
+ | counter | textarea_counter | Character count display |
251
+ | helper | textarea_helper | Helper text |
252
+ | error | textarea_error | Error message |
253
+
254
+ **Select**
255
+
256
+ | Key | Semantic Class | Purpose |
257
+ |-----|----------------|---------|
258
+ | root | select_root | Root wrapper |
259
+ | trigger | select_trigger | Dropdown trigger button |
260
+ | triggerIcon | select_triggerIcon | Icon in trigger |
261
+ | dropdown | select_dropdown | Dropdown menu container |
262
+ | search | select_search | Search input in dropdown |
263
+ | option | select_option | Individual option item |
264
+ | optionSelected | select_optionSelected | Selected option |
265
+ | group | select_group | Option group container |
266
+ | groupLabel | select_groupLabel | Group label |
267
+ | empty | select_empty | Empty state message |
268
+ | label | select_label | Form label |
269
+ | helper | select_helper | Helper text |
270
+
271
+ **MultiSelect**
272
+
273
+ | Key | Semantic Class | Purpose |
274
+ |-----|----------------|---------|
275
+ | root | multiSelect_root | Root wrapper |
276
+ | trigger | multiSelect_trigger | Trigger button |
277
+ | tag | multiSelect_tag | Selected item tag |
278
+ | tagRemove | multiSelect_tagRemove | Remove button in tag |
279
+ | dropdown | multiSelect_dropdown | Dropdown menu |
280
+ | option | multiSelect_option | Option item |
281
+ | optionSelected | multiSelect_optionSelected | Selected option |
282
+ | selectAll | multiSelect_selectAll | Select all checkbox |
283
+ | empty | multiSelect_empty | Empty state |
284
+ | label | multiSelect_label | Form label |
285
+ | helper | multiSelect_helper | Helper text |
286
+
287
+ **Checkbox**
288
+
289
+ | Key | Semantic Class | Purpose |
290
+ |-----|----------------|---------|
291
+ | root | checkbox_root | Root wrapper |
292
+ | checkbox | checkbox_checkbox | Checkbox element |
293
+ | indicator | checkbox_indicator | Checkmark indicator |
294
+ | label | checkbox_label | Label text |
295
+ | description | checkbox_description | Description text |
296
+
297
+ **CheckboxGroup**
298
+
299
+ | Key | Semantic Class | Purpose |
300
+ |-----|----------------|---------|
301
+ | root | checkboxGroup_root | Root wrapper |
302
+ | label | checkboxGroup_label | Group label |
303
+ | group | checkboxGroup_group | Items container |
304
+ | item | checkboxGroup_item | Individual checkbox |
305
+ | helper | checkboxGroup_helper | Helper text |
306
+ | error | checkboxGroup_error | Error message |
307
+
308
+ **Radio**
309
+
310
+ | Key | Semantic Class | Purpose |
311
+ |-----|----------------|---------|
312
+ | root | radio_root | Root wrapper |
313
+ | radio | radio_radio | Radio button element |
314
+ | indicator | radio_indicator | Selection indicator |
315
+ | label | radio_label | Label text |
316
+ | description | radio_description | Description text |
317
+
318
+ **RadioGroup**
319
+
320
+ | Key | Semantic Class | Purpose |
321
+ |-----|----------------|---------|
322
+ | root | radioGroup_root | Root wrapper |
323
+ | label | radioGroup_label | Group label |
324
+ | group | radioGroup_group | Items container |
325
+ | item | radioGroup_item | Individual radio |
326
+ | helper | radioGroup_helper | Helper text |
327
+ | error | radioGroup_error | Error message |
328
+
329
+ **Switch**
330
+
331
+ | Key | Semantic Class | Purpose |
332
+ |-----|----------------|---------|
333
+ | root | switch_root | Root wrapper |
334
+ | track | switch_track | Track/background |
335
+ | thumb | switch_thumb | Animated thumb |
336
+ | label | switch_label | Label text |
337
+ | description | switch_description | Description text |
338
+
339
+ **Slider**
340
+
341
+ | Key | Semantic Class | Purpose |
342
+ |-----|----------------|---------|
343
+ | root | slider_root | Root wrapper |
344
+ | track | slider_track | Track background |
345
+ | range | slider_range | Active range fill |
346
+ | thumb | slider_thumb | Draggable thumb |
347
+ | label | slider_label | Label text |
348
+ | value | slider_value | Value display |
349
+
350
+ **Rating**
351
+
352
+ | Key | Semantic Class | Purpose |
353
+ |-----|----------------|---------|
354
+ | root | rating_root | Root wrapper |
355
+ | star | rating_star | Star element |
356
+ | starFilled | rating_starFilled | Filled star |
357
+ | label | rating_label | Label text |
358
+
359
+ **DatePicker**
360
+
361
+ | Key | Semantic Class | Purpose |
362
+ |-----|----------------|---------|
363
+ | root | datePicker_root | Root wrapper |
364
+ | trigger | datePicker_trigger | Input trigger |
365
+ | calendar | datePicker_calendar | Calendar container |
366
+ | header | datePicker_header | Calendar header |
367
+ | navigation | datePicker_navigation | Navigation controls |
368
+ | day | datePicker_day | Day cell |
369
+ | daySelected | datePicker_daySelected | Selected day |
370
+ | dayToday | datePicker_dayToday | Today indicator |
371
+
372
+ **Upload**
373
+
374
+ | Key | Semantic Class | Purpose |
375
+ |-----|----------------|---------|
376
+ | root | upload_root | Root wrapper |
377
+ | dropzone | upload_dropzone | Drag-drop area |
378
+ | input | upload_input | File input |
379
+ | icon | upload_icon | Icon element |
380
+ | text | upload_text | Text content |
381
+ | hint | upload_hint | Hint/instructions |
382
+ | fileList | upload_fileList | Files list container |
383
+ | fileItem | upload_fileItem | Individual file item |
384
+ | progress | upload_progress | Upload progress bar |
385
+
386
+ #### Layout & Action Components
387
+
388
+ **Button**
389
+
390
+ | Key | Semantic Class | Purpose |
391
+ |-----|----------------|---------|
392
+ | root | button_root | Root button element |
393
+ | icon | button_icon | Icon container |
394
+ | spinner | button_spinner | Loading spinner container |
395
+ | content | button_content | Button text content |
396
+
397
+ **ButtonGroup**
398
+
399
+ | Key | Semantic Class | Purpose |
400
+ |-----|----------------|---------|
401
+ | root | buttonGroup_root | Root wrapper |
402
+ | button | buttonGroup_button | Individual button |
403
+
404
+ **Card**
405
+
406
+ | Key | Semantic Class | Purpose |
407
+ |-----|----------------|---------|
408
+ | root | card_root | Root card element |
409
+ | header | card_header | Header section |
410
+ | title | card_title | Title element |
411
+ | description | card_description | Description text |
412
+ | content | card_content | Main content area |
413
+ | footer | card_footer | Footer section |
414
+ | action | card_action | Action buttons area |
415
+ | image | card_image | Image element |
416
+
417
+ **Modal**
418
+
419
+ | Key | Semantic Class | Purpose |
420
+ |-----|----------------|---------|
421
+ | root | modal_root | Root wrapper |
422
+ | overlay | modal_overlay | Backdrop overlay |
423
+ | content | modal_content | Modal content box |
424
+ | header | modal_header | Header section |
425
+ | title | modal_title | Title element |
426
+ | description | modal_description | Description text |
427
+ | body | modal_body | Body content |
428
+ | footer | modal_footer | Footer section |
429
+ | closeButton | modal_closeButton | Close button |
430
+
431
+ **Drawer**
432
+
433
+ | Key | Semantic Class | Purpose |
434
+ |-----|----------------|---------|
435
+ | root | drawer_root | Root wrapper |
436
+ | overlay | drawer_overlay | Backdrop overlay |
437
+ | content | drawer_content | Drawer content box |
438
+ | header | drawer_header | Header section |
439
+ | title | drawer_title | Title element |
440
+ | description | drawer_description | Description text |
441
+ | body | drawer_body | Body content |
442
+ | footer | drawer_footer | Footer section |
443
+ | handle | drawer_handle | Drag handle (mobile) |
444
+ | closeButton | drawer_closeButton | Close button |
445
+
446
+ **Accordion**
447
+
448
+ | Key | Semantic Class | Purpose |
449
+ |-----|----------------|---------|
450
+ | root | accordion_root | Root wrapper |
451
+ | item | accordion_item | Individual accordion item |
452
+ | trigger | accordion_trigger | Item trigger/header |
453
+ | content | accordion_content | Item content |
454
+ | icon | accordion_icon | Expand/collapse icon |
455
+
456
+ **Tabs**
457
+
458
+ | Key | Semantic Class | Purpose |
459
+ |-----|----------------|---------|
460
+ | root | tabs_root | Root wrapper |
461
+ | list | tabs_list | Tab list container |
462
+ | tab | tabs_tab | Individual tab |
463
+ | tabActive | tabs_tabActive | Active tab |
464
+ | panel | tabs_panel | Tab panel content |
465
+
466
+ **Collapse**
467
+
468
+ | Key | Semantic Class | Purpose |
469
+ |-----|----------------|---------|
470
+ | root | collapse_root | Root wrapper |
471
+ | header | collapse_header | Header/trigger |
472
+ | content | collapse_content | Collapsible content |
473
+ | icon | collapse_icon | Toggle icon |
474
+
475
+ **Toggle**
476
+
477
+ | Key | Semantic Class | Purpose |
478
+ |-----|----------------|---------|
479
+ | root | toggle_root | Root toggle element |
480
+
481
+ **ToggleGroup**
482
+
483
+ | Key | Semantic Class | Purpose |
484
+ |-----|----------------|---------|
485
+ | root | toggleGroup_root | Root wrapper |
486
+ | item | toggleGroup_item | Individual toggle item |
487
+
488
+ #### Navigation Components
489
+
490
+ **Dropdown**
491
+
492
+ | Key | Semantic Class | Purpose |
493
+ |-----|----------------|---------|
494
+ | root | dropdown_root | Root wrapper |
495
+ | trigger | dropdown_trigger | Trigger button |
496
+ | menu | dropdown_menu | Menu container |
497
+ | item | dropdown_item | Menu item |
498
+ | itemIcon | dropdown_itemIcon | Item icon |
499
+ | itemLabel | dropdown_itemLabel | Item label |
500
+ | divider | dropdown_divider | Divider line |
501
+
502
+ **ContextMenu**
503
+
504
+ | Key | Semantic Class | Purpose |
505
+ |-----|----------------|---------|
506
+ | root | contextMenu_root | Root wrapper |
507
+ | content | contextMenu_content | Menu content |
508
+ | item | contextMenu_item | Menu item |
509
+ | itemIcon | contextMenu_itemIcon | Item icon |
510
+ | itemLabel | contextMenu_itemLabel | Item label |
511
+ | divider | contextMenu_divider | Divider line |
512
+ | submenu | contextMenu_submenu | Submenu container |
513
+
514
+ **Breadcrumbs**
515
+
516
+ | Key | Semantic Class | Purpose |
517
+ |-----|----------------|---------|
518
+ | root | breadcrumbs_root | Root wrapper |
519
+ | list | breadcrumbs_list | Breadcrumb list |
520
+ | item | breadcrumbs_item | Individual breadcrumb |
521
+ | link | breadcrumbs_link | Link element |
522
+ | separator | breadcrumbs_separator | Separator between items |
523
+ | current | breadcrumbs_current | Current page indicator |
524
+
525
+ **Pagination**
526
+
527
+ | Key | Semantic Class | Purpose |
528
+ |-----|----------------|---------|
529
+ | root | pagination_root | Root wrapper |
530
+ | list | pagination_list | Items list |
531
+ | item | pagination_item | Individual page item |
532
+ | button | pagination_button | Page button |
533
+ | buttonActive | pagination_buttonActive | Active page button |
534
+ | ellipsis | pagination_ellipsis | Ellipsis indicator |
535
+ | info | pagination_info | Info text |
536
+
537
+ **Stepper**
538
+
539
+ | Key | Semantic Class | Purpose |
540
+ |-----|----------------|---------|
541
+ | root | stepper_root | Root wrapper |
542
+ | step | stepper_step | Individual step |
543
+ | stepActive | stepper_stepActive | Active step |
544
+ | stepCompleted | stepper_stepCompleted | Completed step |
545
+ | icon | stepper_icon | Step icon |
546
+ | label | stepper_label | Step label |
547
+ | description | stepper_description | Step description |
548
+ | connector | stepper_connector | Connector line between steps |
549
+
550
+ #### Feedback Components
551
+
552
+ **Notification**
553
+
554
+ | Key | Semantic Class | Purpose |
555
+ |-----|----------------|---------|
556
+ | root | notification_root | Root wrapper |
557
+ | icon | notification_icon | Icon element |
558
+ | content | notification_content | Content container |
559
+ | title | notification_title | Title text |
560
+ | description | notification_description | Description text |
561
+ | action | notification_action | Action button |
562
+ | closeButton | notification_closeButton | Close button |
563
+
564
+ **Tooltip**
565
+
566
+ | Key | Semantic Class | Purpose |
567
+ |-----|----------------|---------|
568
+ | root | tooltip_root | Root wrapper |
569
+ | trigger | tooltip_trigger | Trigger element |
570
+ | content | tooltip_content | Tooltip content |
571
+ | arrow | tooltip_arrow | Arrow element |
572
+
573
+ **Popover**
574
+
575
+ | Key | Semantic Class | Purpose |
576
+ |-----|----------------|---------|
577
+ | root | popover_root | Root wrapper |
578
+ | trigger | popover_trigger | Trigger element |
579
+ | content | popover_content | Popover content |
580
+ | arrow | popover_arrow | Arrow element |
581
+ | closeButton | popover_closeButton | Close button |
582
+
583
+ **Progress**
584
+
585
+ | Key | Semantic Class | Purpose |
586
+ |-----|----------------|---------|
587
+ | root | progress_root | Root wrapper |
588
+ | track | progress_track | Background track |
589
+ | fill | progress_fill | Progress fill |
590
+ | label | progress_label | Label text |
591
+ | value | progress_value | Value display |
592
+
593
+ #### Data Display Components
594
+
595
+ **Table**
596
+
597
+ | Key | Semantic Class | Purpose |
598
+ |-----|----------------|---------|
599
+ | root | table_root | Root wrapper |
600
+ | wrapper | table_wrapper | Table container |
601
+ | header | table_header | Table head |
602
+ | headerRow | table_headerRow | Header row |
603
+ | headerCell | table_headerCell | Header cell |
604
+ | body | table_body | Table body |
605
+ | row | table_row | Table row |
606
+ | cell | table_cell | Table cell |
607
+ | footer | table_footer | Table footer |
608
+ | pagination | table_pagination | Pagination area |
609
+ | empty | table_empty | Empty state |
610
+ | skeleton | table_skeleton | Loading skeleton |
611
+ | actions | table_actions | Actions column |
612
+
613
+ **Tree**
614
+
615
+ | Key | Semantic Class | Purpose |
616
+ |-----|----------------|---------|
617
+ | root | tree_root | Root wrapper |
618
+ | node | tree_node | Tree node |
619
+ | nodeContent | tree_nodeContent | Node content |
620
+ | icon | tree_icon | Node icon |
621
+ | expandIcon | tree_expandIcon | Expand/collapse icon |
622
+ | label | tree_label | Node label |
623
+ | children | tree_children | Children container |
624
+
625
+ **TreeSelect**
626
+
627
+ | Key | Semantic Class | Purpose |
628
+ |-----|----------------|---------|
629
+ | root | treeSelect_root | Root wrapper |
630
+ | trigger | treeSelect_trigger | Trigger button |
631
+ | dropdown | treeSelect_dropdown | Dropdown menu |
632
+ | tree | treeSelect_tree | Tree container |
633
+ | node | treeSelect_node | Tree node |
634
+ | checkbox | treeSelect_checkbox | Node checkbox |
635
+ | label | treeSelect_label | Node label |
636
+
637
+ **Tag**
638
+
639
+ | Key | Semantic Class | Purpose |
640
+ |-----|----------------|---------|
641
+ | root | tag_root | Root wrapper |
642
+ | content | tag_content | Tag content |
643
+ | closeButton | tag_closeButton | Remove button |
644
+
645
+ **Avatar**
646
+
647
+ | Key | Semantic Class | Purpose |
648
+ |-----|----------------|---------|
649
+ | root | avatar_root | Root element |
650
+ | image | avatar_image | Image element |
651
+ | fallback | avatar_fallback | Fallback text |
652
+ | status | avatar_status | Status indicator |
653
+
654
+ **AvatarGroup**
655
+
656
+ | Key | Semantic Class | Purpose |
657
+ |-----|----------------|---------|
658
+ | root | avatarGroup_root | Root wrapper |
659
+ | overflow | avatarGroup_overflow | Overflow indicator |
660
+
661
+ **Descriptions**
662
+
663
+ | Key | Semantic Class | Purpose |
664
+ |-----|----------------|---------|
665
+ | root | descriptions_root | Root wrapper |
666
+ | item | descriptions_item | Description item |
667
+ | label | descriptions_label | Label text |
668
+ | content | descriptions_content | Content text |
669
+
670
+ **Empty**
671
+
672
+ | Key | Semantic Class | Purpose |
673
+ |-----|----------------|---------|
674
+ | root | empty_root | Root wrapper |
675
+ | icon | empty_icon | Icon element |
676
+ | title | empty_title | Title text |
677
+ | description | empty_description | Description text |
678
+ | action | empty_action | Action buttons |
679
+
680
+ **Image**
681
+
682
+ | Key | Semantic Class | Purpose |
683
+ |-----|----------------|---------|
684
+ | root | image_root | Root wrapper |
685
+ | image | image_image | Image element |
686
+ | placeholder | image_placeholder | Placeholder |
687
+ | error | image_error | Error state |
688
+
689
+ **Carousel**
690
+
691
+ | Key | Semantic Class | Purpose |
692
+ |-----|----------------|---------|
693
+ | root | carousel_root | Root wrapper |
694
+ | wrapper | carousel_wrapper | Slides wrapper |
695
+ | slide | carousel_slide | Individual slide |
696
+ | navigation | carousel_navigation | Navigation area |
697
+ | navButton | carousel_navButton | Navigation button |
698
+ | pagination | carousel_pagination | Pagination area |
699
+ | dot | carousel_dot | Pagination dot |
700
+ | dotActive | carousel_dotActive | Active dot |
701
+
702
+ **Command**
703
+
704
+ | Key | Semantic Class | Purpose |
705
+ |-----|----------------|---------|
706
+ | root | command_root | Root wrapper |
707
+ | input | command_input | Command input |
708
+ | inputIcon | command_inputIcon | Input icon |
709
+ | list | command_list | Commands list |
710
+ | empty | command_empty | Empty state |
711
+ | group | command_group | Command group |
712
+ | groupLabel | command_groupLabel | Group label |
713
+ | item | command_item | Command item |
714
+ | itemIcon | command_itemIcon | Item icon |
715
+ | shortcut | command_shortcut | Keyboard shortcut |
716
+
717
+ **Cascader**
718
+
719
+ | Key | Semantic Class | Purpose |
720
+ |-----|----------------|---------|
721
+ | root | cascader_root | Root wrapper |
722
+ | trigger | cascader_trigger | Trigger button |
723
+ | dropdown | cascader_dropdown | Dropdown menu |
724
+ | menu | cascader_menu | Menu column |
725
+ | option | cascader_option | Menu option |
726
+
727
+ **Transfer**
728
+
729
+ | Key | Semantic Class | Purpose |
730
+ |-----|----------------|---------|
731
+ | root | transfer_root | Root wrapper |
732
+ | list | transfer_list | Individual list |
733
+ | header | transfer_header | List header |
734
+ | search | transfer_search | Search input |
735
+ | item | transfer_item | Transfer item |
736
+ | actions | transfer_actions | Action buttons |
737
+
738
+ **Clipboard**
739
+
740
+ | Key | Semantic Class | Purpose |
741
+ |-----|----------------|---------|
742
+ | root | clipboard_root | Root wrapper |
743
+ | input | clipboard_input | Hidden input |
744
+ | button | clipboard_button | Copy button |
745
+
746
+ #### Single-Element Components
747
+
748
+ Single-element components don't have a `classNames` prop. Instead, pass classes directly via the `className` prop or target via semantic CSS classes:
749
+
750
+ | Component | Semantic Class |
751
+ |-----------|----------------|
752
+ | Badge | badge_root |
753
+ | Divider | divider_root |
754
+ | Kbd | kbd_root |
755
+ | Skeleton | skeleton_root |
756
+ | Spinner | spinner_root |
757
+ | Ribbon | ribbon_root |
758
+ | Grid | grid_root |
759
+ | FetchingOverlay | fetchingOverlay_root |
760
+ | Chart | chart_root |
197
761
 
198
- ```css
199
- /* Button Sizes */
200
- --button-height-xs: 1.75rem
201
- --button-height-sm: 2rem
202
- --button-height-md: 2.25rem
203
- --button-height-lg: 2.75rem
204
- --button-padding-x-xs: 0.5rem
205
- --button-padding-x-sm: 0.75rem
206
- --button-padding-x-md: 0.875rem
207
- --button-padding-x-lg: 1.25rem
208
-
209
- /* Input Sizes */
210
- --input-height-xs: 1.75rem
211
- --input-height-sm: 2rem
212
- --input-height-md: 2.25rem
213
- --input-height-lg: 2.75rem
214
- --input-padding-x-xs through --input-padding-x-lg
215
-
216
- /* Select Sizes */
217
- --select-height-xs through --select-height-lg
218
- --select-padding-x-xs through --select-padding-x-lg
219
-
220
- /* Checkbox/Radio Sizes */
221
- --checkbox-size-xs: 0.875rem
222
- --checkbox-size-sm: 1rem
223
- --checkbox-size-md: 1.125rem
224
- --checkbox-size-lg: 1.375rem
225
-
226
- /* Switch Sizes */
227
- --switch-width-xs through --switch-width-lg
228
- --switch-height-xs through --switch-height-lg
229
-
230
- /* Spacing Scale */
231
- --spacing-0 through --spacing-12
762
+ ```tsx
763
+ // Direct className
764
+ <Badge className="custom-badge-style">New</Badge>
765
+
766
+ // Or target via CSS
767
+ <style>
768
+ .badge_root {
769
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
770
+ }
771
+ </style>
232
772
  ```
233
- </details>
234
773
 
235
- <details>
236
- <summary><strong>✏️ Typography (Click to expand)</strong></summary>
774
+ ### Advanced Examples
237
775
 
238
- ```css
239
- /* Font Families */
240
- --font-sans: ui-sans-serif, system-ui, sans-serif
241
- --font-mono: ui-monospace, 'SF Mono', monospace
776
+ **Theme-based customization:**
242
777
 
243
- /* Font Sizes */
244
- --text-xs: 0.75rem
245
- --text-sm: 0.875rem
246
- --text-base: 0.9rem
247
- --text-lg: 1.125rem
778
+ ```tsx
779
+ const isDark = useTheme()
780
+
781
+ <Button
782
+ classNames={{
783
+ root: isDark ? 'dark:bg-slate-800 dark:text-white' : 'bg-white',
784
+ content: 'font-semibold uppercase tracking-wide',
785
+ }}
786
+ >
787
+ Themed Button
788
+ </Button>
789
+ ```
248
790
 
249
- /* Font Weights */
250
- --font-weight-normal: 400
251
- --font-weight-medium: 500
252
- --font-weight-semibold: 600
253
- --font-weight-bold: 700
791
+ **Combining multiple approaches:**
254
792
 
255
- /* Label Sizes */
256
- --label-font-size-xs through --label-font-size-lg
793
+ ```tsx
794
+ <Input
795
+ className="mx-4 my-2"
796
+ classNames={{
797
+ root: 'my-custom-wrapper',
798
+ input: 'border-2 border-blue-300 focus:border-blue-600',
799
+ label: 'text-blue-900 font-bold',
800
+ }}
801
+ style={{ maxWidth: '400px' }}
802
+ />
257
803
  ```
258
- </details>
259
804
 
260
- <details>
261
- <summary><strong>🎭 Effects & Decoration (Click to expand)</strong></summary>
805
+ **Component composition with consistent styling:**
262
806
 
263
- ```css
264
- /* Border Radius */
265
- --radius-none: 0px
266
- --radius-sm: 0.25rem
267
- --radius-md: 0.375rem
268
- --radius-lg: 0.5rem
269
- --radius-xl: 0.625rem
270
- --radius-2xl: 0.75rem
271
- --radius-3xl: 1rem
272
- --radius-full: 9999px
807
+ ```tsx
808
+ const formClasses = {
809
+ label: 'text-sm font-semibold text-gray-700',
810
+ helper: 'text-xs text-gray-500 mt-1',
811
+ error: 'text-xs text-red-600 mt-1',
812
+ }
273
813
 
274
- /* Shadows */
275
- --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05)
276
- --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1)
277
- --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1)
278
- --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1)
279
- --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25)
814
+ <div>
815
+ <Input classNames={formClasses} label="Email" />
816
+ <Input classNames={formClasses} label="Password" type="password" />
817
+ <Button classNames={{ content: 'font-bold' }}>Submit</Button>
818
+ </div>
819
+ ```
280
820
 
281
- /* Transitions */
282
- --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1)
283
- --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1)
284
- --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1)
821
+ ## Available Components
822
+
823
+ ### Form Components (16)
824
+
825
+ | Component | Description | Import |
826
+ |-----------|-------------|--------|
827
+ | **Input** | Text input with validation states | `@mdigital_ui/ui/input` |
828
+ | **InputGroup** | Input with addons (icons, buttons) | `@mdigital_ui/ui/input-group` |
829
+ | **InputPassword** | Password input with visibility toggle | `@mdigital_ui/ui/input-password` |
830
+ | **InputOTP** | One-time password input | `@mdigital_ui/ui/input-otp` |
831
+ | **Textarea** | Multi-line text input | `@mdigital_ui/ui/textarea` |
832
+ | **Select** | Dropdown selection | `@mdigital_ui/ui/select` |
833
+ | **MultiSelect** | Multiple selection dropdown | `@mdigital_ui/ui/multi-select` |
834
+ | **Checkbox** | Toggle option | `@mdigital_ui/ui/checkbox` |
835
+ | **CheckboxGroup** | Grouped checkboxes | `@mdigital_ui/ui/checkbox-group` |
836
+ | **Radio** | Single selection | `@mdigital_ui/ui/radio` |
837
+ | **RadioGroup** | Grouped radio buttons | `@mdigital_ui/ui/radio-group` |
838
+ | **Switch** | Toggle switch | `@mdigital_ui/ui/switch` |
839
+ | **Toggle** | Toggle button | `@mdigital_ui/ui/toggle` |
840
+ | **Slider** | Range slider | `@mdigital_ui/ui/slider` |
841
+ | **Rating** | Star rating | `@mdigital_ui/ui/rating` |
842
+ | **DatePicker** | Date selection (requires react-datepicker) | `@mdigital_ui/ui/date-picker` |
843
+ | **Upload** | File upload | `@mdigital_ui/ui/upload` |
844
+
845
+ ### Display Components (13)
846
+
847
+ | Component | Description | Import |
848
+ |-----------|-------------|--------|
849
+ | **Card** | Content container | `@mdigital_ui/ui/card` |
850
+ | **Badge** | Status indicator | `@mdigital_ui/ui/badge` |
851
+ | **Tag** | Label chip | `@mdigital_ui/ui/tag` |
852
+ | **Avatar** | User profile image | `@mdigital_ui/ui/avatar` |
853
+ | **Skeleton** | Loading placeholder | `@mdigital_ui/ui/skeleton` |
854
+ | **Empty** | Empty state | `@mdigital_ui/ui/empty` |
855
+ | **Spinner** | Loading indicator | `@mdigital_ui/ui/spinner` |
856
+ | **Progress** | Progress bar | `@mdigital_ui/ui/progress` |
857
+ | **Ribbon** | Corner ribbon | `@mdigital_ui/ui/ribbon` |
858
+ | **Divider** | Content separator | `@mdigital_ui/ui/divider` |
859
+ | **Kbd** | Keyboard key | `@mdigital_ui/ui/kbd` |
860
+ | **Descriptions** | Key-value display | `@mdigital_ui/ui/descriptions` |
861
+ | **Image** | Optimized image with blur loading | `@mdigital_ui/ui/image` |
862
+
863
+ ### Navigation Components (6)
864
+
865
+ | Component | Description | Import |
866
+ |-----------|-------------|--------|
867
+ | **Tabs** | Tabbed navigation | `@mdigital_ui/ui/tabs` |
868
+ | **Breadcrumbs** | Hierarchical navigation | `@mdigital_ui/ui/breadcrumbs` |
869
+ | **Pagination** | Page navigation | `@mdigital_ui/ui/pagination` |
870
+ | **Dropdown** | Dropdown menu | `@mdigital_ui/ui/dropdown` |
871
+ | **Stepper** | Step progress indicator | `@mdigital_ui/ui/stepper` |
872
+
873
+ ### Feedback Components (6)
874
+
875
+ | Component | Description | Import |
876
+ |-----------|-------------|--------|
877
+ | **Modal** | Dialog overlay | `@mdigital_ui/ui/modal` |
878
+ | **Drawer** | Side panel | `@mdigital_ui/ui/drawer` |
879
+ | **Tooltip** | Hover information | `@mdigital_ui/ui/tooltip` |
880
+ | **Popover** | Contextual popup | `@mdigital_ui/ui/popover` |
881
+ | **Notification** | Toast messages | `@mdigital_ui/ui/notification` |
882
+ | **FetchingOverlay** | Loading overlay | `@mdigital_ui/ui/fetching-overlay` |
883
+
884
+ ### Data Display Components (8)
885
+
886
+ | Component | Description | Import |
887
+ |-----------|-------------|--------|
888
+ | **Table** | Data table with sorting/filtering | `@mdigital_ui/ui/table` |
889
+ | **Tree** | Hierarchical tree view | `@mdigital_ui/ui/tree` |
890
+ | **TreeSelect** | Tree selection dropdown | `@mdigital_ui/ui/tree-select` |
891
+ | **Transfer** | Dual list selector | `@mdigital_ui/ui/transfer` |
892
+ | **Cascader** | Cascading selection | `@mdigital_ui/ui/cascader` |
893
+ | **Collapse** | Collapsible panels | `@mdigital_ui/ui/collapse` |
894
+ | **Accordion** | Accordion panels | `@mdigital_ui/ui/accordion` |
895
+
896
+ ### Layout Components (4)
897
+
898
+ | Component | Description | Import |
899
+ |-----------|-------------|--------|
900
+ | **Button** | Button with variants | `@mdigital_ui/ui/button` |
901
+ | **ButtonGroup** | Grouped buttons | `@mdigital_ui/ui/button-group` |
902
+ | **ToggleGroup** | Toggle button group | `@mdigital_ui/ui/toggle-group` |
903
+ | **Grid** | Responsive grid system | `@mdigital_ui/ui/grid` |
904
+
905
+ ### Advanced Components (5)
906
+
907
+ | Component | Description | Import |
908
+ |-----------|-------------|--------|
909
+ | **Chart** | LineChart, BarChart, AreaChart, PieChart | `@mdigital_ui/ui/chart` |
910
+ | **Carousel** | Image/content slider (requires Swiper) | `@mdigital_ui/ui/carousel` |
911
+ | **Command** | Command palette | `@mdigital_ui/ui/command` |
912
+ | **ContextMenu** | Right-click menu | `@mdigital_ui/ui/context-menu` |
913
+ | **Clipboard** | Copy to clipboard | `@mdigital_ui/ui/clipboard` |
914
+
915
+ ### Utilities (1)
916
+
917
+ | Component | Description | Import |
918
+ |-----------|-------------|--------|
919
+ | **ThemeProvider** | Theme management with persistence | `@mdigital_ui/ui/theme` |
920
+
921
+ ## Import Patterns
922
+
923
+ ### Subpath Imports (Recommended for tree-shaking)
285
924
 
286
- /* Z-Index Layers */
287
- --z-dropdown: 1000
288
- --z-sticky: 1020
289
- --z-modal: 1040
290
- --z-popover: 1050
291
- --z-tooltip: 1060
925
+ ```tsx
926
+ import Button from '@mdigital_ui/ui/button'
927
+ import Input from '@mdigital_ui/ui/input'
928
+ import Table from '@mdigital_ui/ui/table'
292
929
  ```
293
- </details>
294
930
 
295
- ### Example: Custom Brand Theme
931
+ ### Named Imports
296
932
 
297
- See [`examples/custom-theme.css`](./examples/custom-theme.css) for a complete template with all available variables and comments.
933
+ ```tsx
934
+ import { Button, Input, Select } from '@mdigital_ui/ui'
935
+ ```
298
936
 
299
- Quick example:
937
+ ### Type Imports
300
938
 
301
- ```css
302
- /* brand-theme.css */
303
- :root {
304
- /* Acme Corp Brand Colors */
305
- --color-primary: oklch(0.60 0.20 200); /* Acme Blue */
306
- --color-primary-hover: oklch(0.55 0.22 200);
307
- --color-secondary: oklch(0.55 0.15 320); /* Acme Purple */
308
- --color-accent: oklch(0.75 0.18 160); /* Acme Green */
309
-
310
- /* Rounded Everything */
311
- --radius-sm: 0.5rem;
312
- --radius-md: 0.75rem;
313
- --radius-lg: 1rem;
314
-
315
- /* Larger Buttons */
316
- --button-height-sm: 2.25rem;
317
- --button-height-md: 2.75rem;
318
- --button-height-lg: 3.25rem;
319
-
320
- /* Custom Font */
321
- --font-sans: 'Poppins', ui-sans-serif, system-ui, sans-serif;
322
- }
939
+ ```tsx
940
+ import type { ButtonProps, InputProps } from '@mdigital_ui/ui'
323
941
  ```
324
942
 
943
+ ## Theming
944
+
325
945
  ### Dark Mode
326
946
 
327
- Enable dark mode by adding the `dark` class to your HTML element:
947
+ Enable dark mode by adding the `dark` class to your `<html>` element:
328
948
 
329
949
  ```tsx
330
- // Example with state
331
- const [isDark, setIsDark] = useState(false)
332
-
333
950
  <html className={isDark ? 'dark' : ''}>
334
951
  <body>{children}</body>
335
952
  </html>
336
953
  ```
337
954
 
338
- All components automatically adapt to dark mode via CSS variables.
955
+ All components automatically adapt via CSS variables.
339
956
 
340
- ### Creating Custom Themes
957
+ ### Theme Presets
341
958
 
342
- Create your own theme file:
959
+ Pre-built color schemes for quick brand customization:
343
960
 
344
- ```css
345
- /* my-brand-theme.css */
346
- :root {
347
- --color-primary: oklch(0.6 0.2 150); /* Green */
348
- --color-secondary: oklch(0.5 0.15 30); /* Orange */
349
- --color-background: oklch(98% 0 0);
350
- --color-text-primary: oklch(20% 0 0);
351
- }
352
- ```
961
+ | Preset | Style | Use Case |
962
+ |--------|-------|----------|
963
+ | `corporate` | Professional navy blue | Enterprise, dashboards |
964
+ | `vibrant` | Bold purple/magenta | Creative apps, consumer products |
965
+ | `minimal` | Muted grayscale | Content-focused, reading interfaces |
353
966
 
354
- ## Components
967
+ **Usage:**
355
968
 
356
- ### Core Components
969
+ ```tsx
970
+ // 1. Import preset CSS
971
+ import '@mdigital_ui/ui/styles/themes/presets/corporate.css'
357
972
 
358
- - **Button** - Primary action buttons with variants
359
- - **Input** - Form input with validation
360
- - **Select** - Dropdown selection
361
- - **Checkbox** - Toggle option
362
- - **Radio** - Single selection
363
- - **Switch** - Toggle switch
364
- - **Textarea** - Multi-line text input
973
+ // 2. Apply via data-theme attribute on <html>
974
+ <html data-theme="corporate">
975
+ <body>{children}</body>
976
+ </html>
977
+ ```
365
978
 
366
- ### Display Components
979
+ **Combine with dark mode:**
367
980
 
368
- - **Card** - Content container
369
- - **Badge** - Status indicator
370
- - **Tag** - Label chip
371
- - **Avatar** - User profile image
372
- - **Skeleton** - Loading placeholder
373
- - **Empty** - Empty state
374
- - **Spinner** - Loading indicator
981
+ ```tsx
982
+ <html className="dark" data-theme="vibrant">
983
+ <body>{children}</body>
984
+ </html>
985
+ ```
375
986
 
376
- ### Navigation
987
+ **Dynamic switching:**
377
988
 
378
- - **Tabs** - Tabbed navigation
379
- - **Breadcrumbs** - Hierarchical navigation
380
- - **Pagination** - Page navigation
381
- - **Dropdown** - Dropdown menu
989
+ ```tsx
990
+ import '@mdigital_ui/ui/styles/themes/presets/corporate.css'
991
+ import '@mdigital_ui/ui/styles/themes/presets/vibrant.css'
992
+ import '@mdigital_ui/ui/styles/themes/presets/minimal.css'
382
993
 
383
- ### Feedback
994
+ function App() {
995
+ const [preset, setPreset] = useState<'corporate' | 'vibrant' | 'minimal'>('corporate')
384
996
 
385
- - **Modal** - Dialog overlay
386
- - **Drawer** - Side panel
387
- - **Tooltip** - Hover information
388
- - **Popover** - Contextual popup
389
- - **Notification** - Toast message
390
- - **Progress** - Progress indicator
997
+ useEffect(() => {
998
+ document.documentElement.setAttribute('data-theme', preset)
999
+ }, [preset])
391
1000
 
392
- ### Data Display
1001
+ return (
1002
+ <Select
1003
+ value={preset}
1004
+ onChange={(e) => setPreset(e.target.value)}
1005
+ options={[
1006
+ { value: 'corporate', label: 'Corporate' },
1007
+ { value: 'vibrant', label: 'Vibrant' },
1008
+ { value: 'minimal', label: 'Minimal' },
1009
+ ]}
1010
+ />
1011
+ )
1012
+ }
1013
+ ```
393
1014
 
394
- - **Table** - Data table with sorting
395
- - **Descriptions** - Key-value pairs
396
- - **Tree** - Hierarchical data
397
- - **Timeline** - Event timeline
1015
+ ### ThemeProvider
398
1016
 
399
- ### Advanced
1017
+ For full theme management with persistence and SSR support:
400
1018
 
401
- - **DatePicker** - Date selection
402
- - **Upload** - File upload
403
- - **Transfer** - Dual list selector
404
- - **Cascader** - Cascading selection
405
- - **TreeSelect** - Tree selection
1019
+ ```tsx
1020
+ import { ThemeProvider, useTheme } from '@mdigital_ui/ui'
406
1021
 
407
- [See full component list and documentation](https://storybook.mdigital.com)
1022
+ function App() {
1023
+ return (
1024
+ <ThemeProvider defaultTheme="system" storageKey="my-app-theme">
1025
+ <YourApp />
1026
+ </ThemeProvider>
1027
+ )
1028
+ }
408
1029
 
409
- ## Customization
1030
+ function ThemeToggle() {
1031
+ const { theme, setTheme, resolvedTheme } = useTheme()
410
1032
 
411
- ### Three Levels of Customization
1033
+ return (
1034
+ <button onClick={() => setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')}>
1035
+ {resolvedTheme === 'dark' ? '☀️' : '🌙'}
1036
+ </button>
1037
+ )
1038
+ }
1039
+ ```
412
1040
 
413
- #### 1. CSS Variables (Global)
1041
+ ### Custom CSS Variables
1042
+
1043
+ Override any design token in your CSS:
414
1044
 
415
1045
  ```css
416
1046
  :root {
1047
+ /* Brand Colors */
417
1048
  --color-primary: oklch(0.55 0.22 270);
1049
+ --color-primary-hover: oklch(0.50 0.24 270);
1050
+ --color-accent: oklch(0.75 0.18 45);
1051
+
1052
+ /* Component Sizing */
1053
+ --button-height-md: 2.5rem;
1054
+ --input-height-md: 2.5rem;
1055
+ --radius-md: 0.5rem;
1056
+
1057
+ /* Typography */
1058
+ --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
418
1059
  }
419
1060
  ```
420
1061
 
421
- #### 2. className Prop (Instance)
1062
+ Import after UI Kit styles:
422
1063
 
423
1064
  ```tsx
424
- <Button className="shadow-lg hover:scale-105">
425
- Custom Button
426
- </Button>
1065
+ import '@mdigital_ui/ui/styles/global.css'
1066
+ import '@mdigital_ui/ui/styles/themes/light.css'
1067
+ import './your-theme.css' // Your overrides
427
1068
  ```
428
1069
 
429
- #### 3. Wrapper Components (New Variants)
1070
+ ### Available CSS Variables
1071
+
1072
+ #### Colors
1073
+ ```css
1074
+ /* Brand */
1075
+ --color-primary, --color-primary-hover, --color-primary-active, --color-primary-foreground
1076
+ --color-secondary, --color-secondary-hover, --color-secondary-active, --color-secondary-foreground
1077
+ --color-accent, --color-accent-hover, --color-accent-active, --color-accent-foreground
430
1078
 
1079
+ /* Semantic */
1080
+ --color-success, --color-error, --color-warning, --color-info (with hover/active variants)
1081
+
1082
+ /* Surfaces */
1083
+ --color-background, --color-background-secondary, --color-surface, --color-card
1084
+ --color-border, --color-border-primary
1085
+
1086
+ /* Text */
1087
+ --color-text-primary, --color-text-secondary, --color-text-muted
1088
+
1089
+ /* Grayscale */
1090
+ --color-gray-50 through --color-gray-950
1091
+ ```
1092
+
1093
+ #### Sizing
1094
+ ```css
1095
+ /* Buttons */
1096
+ --button-height-xs/sm/md/lg
1097
+ --button-padding-x-xs/sm/md/lg
1098
+
1099
+ /* Inputs */
1100
+ --input-height-xs/sm/md/lg
1101
+ --input-padding-x-xs/sm/md/lg
1102
+
1103
+ /* Switch */
1104
+ --switch-width-xs/sm/md/lg/xl
1105
+ --switch-height-xs/sm/md/lg/xl
1106
+
1107
+ /* Spacing */
1108
+ --spacing-0 through --spacing-12
1109
+ ```
1110
+
1111
+ #### Effects
1112
+ ```css
1113
+ /* Border Radius */
1114
+ --radius-none, --radius-sm, --radius-md, --radius-lg, --radius-xl, --radius-full
1115
+
1116
+ /* Shadows */
1117
+ --shadow-sm, --shadow-md, --shadow-lg, --shadow-xl, --shadow-2xl
1118
+
1119
+ /* Transitions */
1120
+ --transition-fast, --transition-base, --transition-slow
1121
+
1122
+ /* Z-Index */
1123
+ --z-dropdown, --z-sticky, --z-modal, --z-popover, --z-tooltip
1124
+ ```
1125
+
1126
+ ## External Dependencies
1127
+
1128
+ Some components require additional setup:
1129
+
1130
+ ### Carousel (Swiper)
431
1131
  ```tsx
432
- function GlassButton({ className, ...props }) {
433
- return (
434
- <Button
435
- className={cn(
436
- 'bg-white/10 backdrop-blur-md border-white/20',
437
- className
438
- )}
439
- {...props}
440
- />
441
- )
442
- }
1132
+ npm install swiper
1133
+
1134
+ // Import CSS in your entry file
1135
+ import 'swiper/css'
1136
+ import 'swiper/css/pagination'
1137
+ import 'swiper/css/navigation'
1138
+ ```
1139
+
1140
+ ### DatePicker (react-datepicker)
1141
+ ```tsx
1142
+ npm install react-datepicker
1143
+ ```
1144
+
1145
+ ### Table (TanStack Table)
1146
+ ```tsx
1147
+ npm install @tanstack/react-table
1148
+ ```
1149
+
1150
+ ### Charts (Recharts)
1151
+ ```tsx
1152
+ npm install recharts
443
1153
  ```
444
1154
 
445
1155
  ## TypeScript
446
1156
 
447
- Full TypeScript support with auto-generated types:
1157
+ Full TypeScript support:
448
1158
 
449
1159
  ```tsx
450
- import type { ButtonProps } from '@mdigital/ui'
1160
+ import type { ButtonProps, ButtonColor, ButtonVariant } from '@mdigital_ui/ui'
451
1161
 
452
1162
  const MyButton: React.FC<ButtonProps> = (props) => {
453
1163
  return <Button {...props} />
@@ -458,19 +1168,11 @@ const MyButton: React.FC<ButtonProps> = (props) => {
458
1168
 
459
1169
  All components follow WCAG 2.1 AA standards:
460
1170
 
461
- - Keyboard navigation
462
- - Screen reader support
463
- - Focus indicators
464
- - ARIA attributes
465
- - Color contrast compliance
466
-
467
- ## Bundle Size
468
-
469
- Optimized for minimal bundle impact:
470
-
471
- - Single component: ~3-8kb (gzipped)
472
- - Full package (tree-shaken): ~20-40kb (gzipped)
473
- - CSS variables: ~2kb (gzipped)
1171
+ - Keyboard navigation
1172
+ - Screen reader support
1173
+ - Focus indicators
1174
+ - ARIA attributes
1175
+ - Color contrast compliance
474
1176
 
475
1177
  ## Browser Support
476
1178
 
@@ -479,26 +1181,6 @@ Optimized for minimal bundle impact:
479
1181
  - Safari (latest 2 versions)
480
1182
  - Edge (latest 2 versions)
481
1183
 
482
- ## Documentation
483
-
484
- - [Storybook](https://storybook.mdigital.com) - Interactive component playground
485
- - [Theming Guide](./docs/theming.md) - Detailed theming documentation
486
- - [Migration Guide](./docs/migration.md) - Upgrade guides
487
-
488
- ## Contributing
489
-
490
- Internal contributions welcome! Please follow the [contribution guidelines](./CONTRIBUTING.md).
491
-
492
1184
  ## License
493
1185
 
494
1186
  MIT © MDigital
495
-
496
- ## Support
497
-
498
- For issues or questions:
499
- - Internal Slack: #design-system
500
- - Issues: [GitHub Issues](https://github.com/mdigital/ui/issues)
501
-
502
- ---
503
-
504
- Made with ❤️ by the MDigital Design System Team