solid-tom-ui 0.2.4 → 1.0.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 (246) hide show
  1. package/README.md +237 -237
  2. package/dist/components/badge/badge.d.ts +0 -1
  3. package/dist/components/badge/badge.d.ts.map +1 -1
  4. package/dist/solid-ui.css +1 -1
  5. package/dist/src/components/avatar/avatar.js.map +1 -0
  6. package/dist/src/components/badge/badge.js +2 -0
  7. package/dist/src/components/badge/badge.js.map +1 -0
  8. package/dist/src/components/breadcrumb/breadcrumb.js.map +1 -0
  9. package/dist/{components → src/components}/button/button.js +1 -1
  10. package/dist/src/components/button/button.js.map +1 -0
  11. package/dist/src/components/carousel/carousel.js +2 -0
  12. package/dist/src/components/carousel/carousel.js.map +1 -0
  13. package/dist/src/components/chat-bubble/chatBubble.js.map +1 -0
  14. package/dist/src/components/checkbox/checkbox.js.map +1 -0
  15. package/dist/src/components/code-preview/code-preview.js +2 -0
  16. package/dist/src/components/code-preview/code-preview.js.map +1 -0
  17. package/dist/src/components/collapse/collapse.js.map +1 -0
  18. package/dist/src/components/context-menu/context-menu.js +2 -0
  19. package/dist/src/components/context-menu/context-menu.js.map +1 -0
  20. package/dist/src/components/context-menu/context-menu.store.js.map +1 -0
  21. package/dist/src/components/diff/diff.js.map +1 -0
  22. package/dist/src/components/divider/divider.js.map +1 -0
  23. package/dist/src/components/drawer/drawer.js +2 -0
  24. package/dist/src/components/drawer/drawer.js.map +1 -0
  25. package/dist/src/components/dropdown/dropdown.js.map +1 -0
  26. package/dist/src/components/dropdown/dropdown.store.js.map +1 -0
  27. package/dist/src/components/float-button/float-button.js.map +1 -0
  28. package/dist/src/components/hover-3d-image/hover-3d-image.js.map +1 -0
  29. package/dist/src/components/image-preview/image-preview.js +2 -0
  30. package/dist/src/components/image-preview/image-preview.js.map +1 -0
  31. package/dist/src/components/indicator/indicator.js.map +1 -0
  32. package/dist/src/components/input/input.js.map +1 -0
  33. package/dist/src/components/input/input.utils.js.map +1 -0
  34. package/dist/src/components/input/variants/input-color.js.map +1 -0
  35. package/dist/src/components/input/variants/input-date.js.map +1 -0
  36. package/dist/src/components/input/variants/input-number.js +2 -0
  37. package/dist/src/components/input/variants/input-number.js.map +1 -0
  38. package/dist/src/components/input/variants/input-otp.js.map +1 -0
  39. package/dist/src/components/input/variants/input-password.js +2 -0
  40. package/dist/src/components/input/variants/input-password.js.map +1 -0
  41. package/dist/src/components/input/variants/input-radio.js.map +1 -0
  42. package/dist/src/components/input/variants/input-range.js.map +1 -0
  43. package/dist/src/components/input/variants/input-text.js +2 -0
  44. package/dist/src/components/input/variants/input-text.js.map +1 -0
  45. package/dist/src/components/input/variants/input-textarea.js +2 -0
  46. package/dist/src/components/input/variants/input-textarea.js.map +1 -0
  47. package/dist/src/components/loading/loading.js +2 -0
  48. package/dist/src/components/loading/loading.js.map +1 -0
  49. package/dist/src/components/mansory/mansory.js.map +1 -0
  50. package/dist/src/components/menu/menu.js +2 -0
  51. package/dist/src/components/menu/menu.js.map +1 -0
  52. package/dist/src/components/modal/modal.js +2 -0
  53. package/dist/src/components/modal/modal.js.map +1 -0
  54. package/dist/src/components/modal/modalContext.js.map +1 -0
  55. package/dist/src/components/pagination/pagination.js +2 -0
  56. package/dist/src/components/pagination/pagination.js.map +1 -0
  57. package/dist/src/components/progress-bar/progress-bar.js.map +1 -0
  58. package/dist/src/components/qr-code/qr-code.js +2 -0
  59. package/dist/src/components/qr-code/qr-code.js.map +1 -0
  60. package/dist/src/components/rating/rating.js.map +1 -0
  61. package/dist/src/components/select/select.js +2 -0
  62. package/dist/src/components/select/select.js.map +1 -0
  63. package/dist/src/components/select-zone/select-zone.js.map +1 -0
  64. package/dist/src/components/skeleton/skeleton.js.map +1 -0
  65. package/dist/src/components/slider/slider.js.map +1 -0
  66. package/dist/src/components/splitter/splitter.js.map +1 -0
  67. package/dist/src/components/steps/steps.js +2 -0
  68. package/dist/src/components/steps/steps.js.map +1 -0
  69. package/dist/src/components/swap/swap.js.map +1 -0
  70. package/dist/src/components/switch/switch.js.map +1 -0
  71. package/dist/src/components/tab/tab.js +2 -0
  72. package/dist/src/components/tab/tab.js.map +1 -0
  73. package/dist/src/components/table/table.js +2 -0
  74. package/dist/src/components/table/table.js.map +1 -0
  75. package/dist/src/components/text-rotate/text-rotate.js.map +1 -0
  76. package/dist/src/components/timeline/timeline.js +2 -0
  77. package/dist/src/components/timeline/timeline.js.map +1 -0
  78. package/dist/src/components/toast/icons/ErrorIcon.js.map +1 -0
  79. package/dist/src/components/toast/icons/IconCircle.js.map +1 -0
  80. package/dist/src/components/toast/icons/InfoIcon.js.map +1 -0
  81. package/dist/src/components/toast/icons/LoaderIcon.js.map +1 -0
  82. package/dist/src/components/toast/icons/SuccessIcon.js.map +1 -0
  83. package/dist/src/components/toast/icons/WarningIcon.js.map +1 -0
  84. package/dist/src/components/toast/toast.js +2 -0
  85. package/dist/src/components/toast/toast.js.map +1 -0
  86. package/dist/src/components/toast/toast.store.js.map +1 -0
  87. package/dist/src/components/tooltip/tooltip.js.map +1 -0
  88. package/dist/{components → src/components}/tour/tour.js +1 -1
  89. package/dist/src/components/tour/tour.js.map +1 -0
  90. package/dist/src/components/upload/upload.js +2 -0
  91. package/dist/src/components/upload/upload.js.map +1 -0
  92. package/dist/src/components/z-index/z-index.context.js.map +1 -0
  93. package/dist/src/components/z-index/z-index.js.map +1 -0
  94. package/dist/src/components/z-index/z-index.store.js.map +1 -0
  95. package/dist/src/components/z-index/z-index.types.js.map +1 -0
  96. package/dist/src/utils/cn.js.map +1 -0
  97. package/dist/src/utils/element-tracker.js.map +1 -0
  98. package/dist/src/utils/helper.js.map +1 -0
  99. package/dist/src/utils/hoc.js.map +1 -0
  100. package/dist/src/utils/shiki-highlight.js +2 -0
  101. package/dist/src/utils/shiki-highlight.js.map +1 -0
  102. package/package.json +120 -120
  103. package/dist/components/avatar/avatar.js.map +0 -1
  104. package/dist/components/badge/badge.js +0 -2
  105. package/dist/components/badge/badge.js.map +0 -1
  106. package/dist/components/breadcrumb/breadcrumb.js.map +0 -1
  107. package/dist/components/button/button.js.map +0 -1
  108. package/dist/components/carousel/carousel.js +0 -2
  109. package/dist/components/carousel/carousel.js.map +0 -1
  110. package/dist/components/chat-bubble/chatBubble.js.map +0 -1
  111. package/dist/components/checkbox/checkbox.js.map +0 -1
  112. package/dist/components/code-preview/code-preview.js +0 -2
  113. package/dist/components/code-preview/code-preview.js.map +0 -1
  114. package/dist/components/collapse/collapse.js.map +0 -1
  115. package/dist/components/context-menu/context-menu.js +0 -2
  116. package/dist/components/context-menu/context-menu.js.map +0 -1
  117. package/dist/components/context-menu/context-menu.store.js.map +0 -1
  118. package/dist/components/diff/diff.js.map +0 -1
  119. package/dist/components/divider/divider.js.map +0 -1
  120. package/dist/components/drawer/drawer.js +0 -2
  121. package/dist/components/drawer/drawer.js.map +0 -1
  122. package/dist/components/dropdown/dropdown.js.map +0 -1
  123. package/dist/components/dropdown/dropdown.store.js.map +0 -1
  124. package/dist/components/float-button/float-button.js.map +0 -1
  125. package/dist/components/hover-3d-image/hover-3d-image.js.map +0 -1
  126. package/dist/components/image-preview/image-preview.js +0 -2
  127. package/dist/components/image-preview/image-preview.js.map +0 -1
  128. package/dist/components/indicator/indicator.js.map +0 -1
  129. package/dist/components/input/input.js.map +0 -1
  130. package/dist/components/input/input.utils.js.map +0 -1
  131. package/dist/components/input/variants/input-color.js.map +0 -1
  132. package/dist/components/input/variants/input-date.js.map +0 -1
  133. package/dist/components/input/variants/input-number.js +0 -2
  134. package/dist/components/input/variants/input-number.js.map +0 -1
  135. package/dist/components/input/variants/input-otp.js.map +0 -1
  136. package/dist/components/input/variants/input-password.js +0 -2
  137. package/dist/components/input/variants/input-password.js.map +0 -1
  138. package/dist/components/input/variants/input-radio.js.map +0 -1
  139. package/dist/components/input/variants/input-range.js.map +0 -1
  140. package/dist/components/input/variants/input-text.js +0 -2
  141. package/dist/components/input/variants/input-text.js.map +0 -1
  142. package/dist/components/input/variants/input-textarea.js +0 -2
  143. package/dist/components/input/variants/input-textarea.js.map +0 -1
  144. package/dist/components/loading/loading.js +0 -2
  145. package/dist/components/loading/loading.js.map +0 -1
  146. package/dist/components/mansory/mansory.js.map +0 -1
  147. package/dist/components/menu/menu.js +0 -2
  148. package/dist/components/menu/menu.js.map +0 -1
  149. package/dist/components/modal/modal.js +0 -2
  150. package/dist/components/modal/modal.js.map +0 -1
  151. package/dist/components/modal/modalContext.js.map +0 -1
  152. package/dist/components/pagination/pagination.js +0 -2
  153. package/dist/components/pagination/pagination.js.map +0 -1
  154. package/dist/components/progress-bar/progress-bar.js.map +0 -1
  155. package/dist/components/qr-code/qr-code.js +0 -2
  156. package/dist/components/qr-code/qr-code.js.map +0 -1
  157. package/dist/components/rating/rating.js.map +0 -1
  158. package/dist/components/select/select.js +0 -2
  159. package/dist/components/select/select.js.map +0 -1
  160. package/dist/components/select-zone/select-zone.js.map +0 -1
  161. package/dist/components/skeleton/skeleton.js.map +0 -1
  162. package/dist/components/slider/slider.js.map +0 -1
  163. package/dist/components/splitter/splitter.js.map +0 -1
  164. package/dist/components/steps/steps.js +0 -2
  165. package/dist/components/steps/steps.js.map +0 -1
  166. package/dist/components/swap/swap.js.map +0 -1
  167. package/dist/components/switch/switch.js.map +0 -1
  168. package/dist/components/tab/tab.js +0 -2
  169. package/dist/components/tab/tab.js.map +0 -1
  170. package/dist/components/table/table.js +0 -2
  171. package/dist/components/table/table.js.map +0 -1
  172. package/dist/components/text-rotate/text-rotate.js.map +0 -1
  173. package/dist/components/timeline/timeline.js +0 -2
  174. package/dist/components/timeline/timeline.js.map +0 -1
  175. package/dist/components/toast/icons/ErrorIcon.js.map +0 -1
  176. package/dist/components/toast/icons/IconCircle.js.map +0 -1
  177. package/dist/components/toast/icons/InfoIcon.js.map +0 -1
  178. package/dist/components/toast/icons/LoaderIcon.js.map +0 -1
  179. package/dist/components/toast/icons/SuccessIcon.js.map +0 -1
  180. package/dist/components/toast/icons/WarningIcon.js.map +0 -1
  181. package/dist/components/toast/toast.js +0 -2
  182. package/dist/components/toast/toast.js.map +0 -1
  183. package/dist/components/toast/toast.store.js.map +0 -1
  184. package/dist/components/tooltip/tooltip.js.map +0 -1
  185. package/dist/components/tour/tour.js.map +0 -1
  186. package/dist/components/upload/upload.js +0 -2
  187. package/dist/components/upload/upload.js.map +0 -1
  188. package/dist/components/z-index/z-index.context.js.map +0 -1
  189. package/dist/components/z-index/z-index.js.map +0 -1
  190. package/dist/components/z-index/z-index.store.js.map +0 -1
  191. package/dist/components/z-index/z-index.types.js.map +0 -1
  192. package/dist/utils/cn.js.map +0 -1
  193. package/dist/utils/element-tracker.js.map +0 -1
  194. package/dist/utils/helper.js.map +0 -1
  195. package/dist/utils/hoc.js.map +0 -1
  196. package/dist/utils/shiki-highlight.js +0 -2
  197. package/dist/utils/shiki-highlight.js.map +0 -1
  198. /package/dist/{components → src/components}/avatar/avatar.js +0 -0
  199. /package/dist/{components → src/components}/breadcrumb/breadcrumb.js +0 -0
  200. /package/dist/{components → src/components}/chat-bubble/chatBubble.js +0 -0
  201. /package/dist/{components → src/components}/checkbox/checkbox.js +0 -0
  202. /package/dist/{components → src/components}/collapse/collapse.js +0 -0
  203. /package/dist/{components → src/components}/context-menu/context-menu.store.js +0 -0
  204. /package/dist/{components → src/components}/diff/diff.js +0 -0
  205. /package/dist/{components → src/components}/divider/divider.js +0 -0
  206. /package/dist/{components → src/components}/dropdown/dropdown.js +0 -0
  207. /package/dist/{components → src/components}/dropdown/dropdown.store.js +0 -0
  208. /package/dist/{components → src/components}/float-button/float-button.js +0 -0
  209. /package/dist/{components → src/components}/hover-3d-image/hover-3d-image.js +0 -0
  210. /package/dist/{components → src/components}/indicator/indicator.js +0 -0
  211. /package/dist/{components → src/components}/input/input.js +0 -0
  212. /package/dist/{components → src/components}/input/input.utils.js +0 -0
  213. /package/dist/{components → src/components}/input/variants/input-color.js +0 -0
  214. /package/dist/{components → src/components}/input/variants/input-date.js +0 -0
  215. /package/dist/{components → src/components}/input/variants/input-otp.js +0 -0
  216. /package/dist/{components → src/components}/input/variants/input-radio.js +0 -0
  217. /package/dist/{components → src/components}/input/variants/input-range.js +0 -0
  218. /package/dist/{components → src/components}/mansory/mansory.js +0 -0
  219. /package/dist/{components → src/components}/modal/modalContext.js +0 -0
  220. /package/dist/{components → src/components}/progress-bar/progress-bar.js +0 -0
  221. /package/dist/{components → src/components}/rating/rating.js +0 -0
  222. /package/dist/{components → src/components}/select-zone/select-zone.js +0 -0
  223. /package/dist/{components → src/components}/skeleton/skeleton.js +0 -0
  224. /package/dist/{components → src/components}/slider/slider.js +0 -0
  225. /package/dist/{components → src/components}/splitter/splitter.js +0 -0
  226. /package/dist/{components → src/components}/swap/swap.js +0 -0
  227. /package/dist/{components → src/components}/switch/switch.js +0 -0
  228. /package/dist/{components → src/components}/table/index.js +0 -0
  229. /package/dist/{components → src/components}/text-rotate/text-rotate.js +0 -0
  230. /package/dist/{components → src/components}/toast/icons/ErrorIcon.js +0 -0
  231. /package/dist/{components → src/components}/toast/icons/IconCircle.js +0 -0
  232. /package/dist/{components → src/components}/toast/icons/InfoIcon.js +0 -0
  233. /package/dist/{components → src/components}/toast/icons/LoaderIcon.js +0 -0
  234. /package/dist/{components → src/components}/toast/icons/SuccessIcon.js +0 -0
  235. /package/dist/{components → src/components}/toast/icons/WarningIcon.js +0 -0
  236. /package/dist/{components → src/components}/toast/toast.store.js +0 -0
  237. /package/dist/{components → src/components}/tooltip/tooltip.js +0 -0
  238. /package/dist/{components → src/components}/z-index/z-index.context.js +0 -0
  239. /package/dist/{components → src/components}/z-index/z-index.js +0 -0
  240. /package/dist/{components → src/components}/z-index/z-index.store.js +0 -0
  241. /package/dist/{components → src/components}/z-index/z-index.types.js +0 -0
  242. /package/dist/{lib.js → src/lib.js} +0 -0
  243. /package/dist/{utils → src/utils}/cn.js +0 -0
  244. /package/dist/{utils → src/utils}/element-tracker.js +0 -0
  245. /package/dist/{utils → src/utils}/helper.js +0 -0
  246. /package/dist/{utils → src/utils}/hoc.js +0 -0
package/README.md CHANGED
@@ -1,237 +1,237 @@
1
- # solid-ui
2
-
3
- > A high-performance, easy-to-use UI component library for [SolidJS](https://solidjs.com), inspired by Ant Design.
4
-
5
- Built on **Tailwind CSS 4** and **DaisyUI 5**, leveraging SolidJS fine-grained reactivity for minimal re-renders and optimal bundle size.
6
-
7
- ## Features
8
-
9
- - **45+ components** — from simple buttons to complex data tables with virtual scrolling
10
- - **Tree-shakeable** — each component is its own module; unused components are not bundled
11
- - **Typed** — full TypeScript support with exported prop interfaces
12
- - **Themeable** — DaisyUI color tokens + unified `color` prop across all components
13
- - **Accessible** — semantic HTML, ARIA attributes, keyboard navigation
14
- - **Zero CSS setup** — pre-compiled CSS bundle includes Tailwind + DaisyUI, no extra config needed
15
-
16
- ## Installation
17
-
18
- ```bash
19
- npm install solid-tom-ui
20
-
21
- pnpm i solid-tom-ui
22
-
23
- bun i solid-tom-ui
24
- ```
25
-
26
- ### Peer dependencies
27
-
28
- ```bash
29
- npm install solid-js
30
- ```
31
-
32
- Optional (only needed for specific components):
33
-
34
- | Package | Component |
35
- |---------|-----------|
36
- | `imask` | `Input` with mask |
37
- | `qrcode` | `QrCode` |
38
- | `@tanstack/solid-table` | `Table` |
39
-
40
- ## Setup
41
-
42
- ### 1. Import the pre-compiled CSS bundle
43
-
44
- ```css
45
- /* app.css */
46
- @import 'solid-tom-ui/styles';
47
- ```
48
-
49
- Make sure this CSS file is imported in your app entry point:
50
-
51
- ```tsx
52
- // src/index.tsx
53
- import './app.css';
54
- import { render } from 'solid-js/web';
55
- import App from './App';
56
-
57
- render(() => <App />, document.getElementById('root')!);
58
- ```
59
- ---
60
-
61
- ### 2. Use components
62
-
63
- ```tsx
64
- import { Button, Modal, toast } from 'solid-tom-ui';
65
-
66
- function App() {
67
- return (
68
- <Button color="primary" onClick={() => toast.success('Hello!')}>
69
- Click me
70
- </Button>
71
- );
72
- }
73
- ```
74
-
75
- ---
76
-
77
- ## Advanced Setup (Custom Theme)
78
-
79
- Overwrite css variable
80
-
81
- ```css
82
- :root {
83
- --color-base-100: white;
84
- --color-base-content: black;
85
-
86
- --color-primary: red;
87
- --color-primary-content: white;
88
-
89
- --color-secondary: red;
90
- --color-secondary-content: white;
91
-
92
- --color-accent: red;
93
- --color-accent-content: white;
94
-
95
- --color-neutral: red;
96
- --color-neutral-content: white;
97
-
98
- --color-info: red;
99
- --color-info-content: white;
100
-
101
- --color-success: red;
102
- --color-success-content: white;
103
-
104
- --color-warning: red;
105
- --color-warning-content: white;
106
-
107
- --color-error: red;
108
- --color-error-content: white;
109
- --radius-selector: 8px;
110
- --radius-field: 4px;
111
- --radius-box: 6px;
112
- --size-selector: 4px;
113
- --size-field: 4px;
114
- --border: 1px;
115
- --depth: 0;
116
- --noise: 0;
117
- }
118
- ```
119
-
120
- ---
121
-
122
- ## Components
123
-
124
- ### Layout & Navigation
125
- | Component | Description |
126
- |-----------|-------------|
127
- | `Breadcrumb` | Navigation breadcrumb trail |
128
- | `Divider` | Horizontal or vertical divider |
129
- | `Drawer` | Slide-in side panel |
130
- | `Dropdown` | Dropdown menu |
131
- | `Menu` | Vertical/horizontal navigation menu |
132
- | `Pagination` | Page navigation |
133
- | `Splitter` | Resizable split pane |
134
- | `Steps` | Step-by-step progress indicator |
135
- | `Tab` | Tabbed navigation |
136
-
137
- ### Data Display
138
- | Component | Description |
139
- |-----------|-------------|
140
- | `Avatar` | User avatar with fallback |
141
- | `Badge` | Status badge / tag |
142
- | `Carousel` | Image/content carousel |
143
- | `ChatBubble` | Chat message bubble |
144
- | `Diff` | Side-by-side diff viewer |
145
- | `Indicator` | Numeric badge overlay |
146
- | `Skeleton` | Loading skeleton placeholder |
147
- | `Table` | Feature-rich table (virtual scroll, sort, filter, pinned columns) |
148
- | `Timeline` | Vertical timeline |
149
- | `Tooltip` | Hover tooltip |
150
- | `Tour` | Interactive product tour |
151
-
152
- ### Input & Forms
153
- | Component | Description |
154
- |-----------|-------------|
155
- | `Checkbox` | Checkbox input |
156
- | `Input` | Text, password, number, textarea, color, date, range, OTP, masked inputs |
157
- | `Rating` | Star rating |
158
- | `Select` | Dropdown select |
159
- | `SelectZone` | Drag-to-select zone |
160
- | `Slider` | Range slider |
161
- | `Switch` | Toggle switch |
162
- | `Upload` | File upload with drag & drop |
163
-
164
- ### Feedback
165
- | Component | Description |
166
- |-----------|-------------|
167
- | `Loading` | Spinner / loading indicator |
168
- | `Modal` | Dialog modal |
169
- | `ProgressBar` | Progress bar |
170
- | `Toast` | Toast notifications (`toast.success()`, `toast.error()`, …) |
171
-
172
- ### Visual & Effects
173
- | Component | Description |
174
- |-----------|-------------|
175
- | `Collapse` | Collapsible content panel |
176
- | `ContextMenu` | Right-click context menu |
177
- | `FloatButton` | Floating action button |
178
- | `Hover3dImage` | 3D parallax image on hover |
179
- | `ImagePreview` | Lightbox image preview |
180
- | `Mansory` | Masonry grid layout |
181
- | `QrCode` | QR code generator |
182
- | `Swap` | Flip between two states |
183
- | `TextRotate` | Animated rotating text |
184
-
185
- ### Utilities
186
- | Component | Description |
187
- |-----------|-------------|
188
- | `CodePreview` | Code preview |
189
-
190
- ---
191
-
192
- ## API
193
-
194
- ### Color prop
195
-
196
- Most components accept a `color` prop:
197
-
198
- ```tsx
199
- type BaseColorProps =
200
- | 'primary' | 'secondary' | 'accent' | 'neutral'
201
- | 'info' | 'success' | 'warning' | 'error';
202
- ```
203
-
204
- ```tsx
205
- <Badge color="success">Active</Badge>
206
- <Button color="warning">Caution</Button>
207
- ```
208
-
209
- ### Class override (slot system)
210
-
211
- Every component exposes a `class` prop to override individual slots:
212
-
213
- ```tsx
214
- // Single-element components
215
- <Badge class="font-bold text-lg" />
216
-
217
- // Multi-slot components
218
- <Modal
219
- class={{
220
- root: 'max-w-2xl',
221
- header: 'bg-base-200',
222
- body: 'p-8',
223
- }}
224
- />
225
- ```
226
-
227
- ## TypeScript
228
-
229
- All prop types are exported:
230
-
231
- ```tsx
232
- import type { ButtonProps, ModalProps, BaseColorProps, SolidComponent } from 'solid-tom-ui';
233
- ```
234
-
235
- ## License
236
-
237
- MIT © [Truong Tom](https://github.com/truongtom1993)
1
+ # solid-ui
2
+
3
+ > A high-performance, easy-to-use UI component library for [SolidJS](https://solidjs.com), inspired by Ant Design.
4
+
5
+ Built on **Tailwind CSS 4** and **DaisyUI 5**, leveraging SolidJS fine-grained reactivity for minimal re-renders and optimal bundle size.
6
+
7
+ ## Features
8
+
9
+ - **45+ components** — from simple buttons to complex data tables with virtual scrolling
10
+ - **Tree-shakeable** — each component is its own module; unused components are not bundled
11
+ - **Typed** — full TypeScript support with exported prop interfaces
12
+ - **Themeable** — DaisyUI color tokens + unified `color` prop across all components
13
+ - **Accessible** — semantic HTML, ARIA attributes, keyboard navigation
14
+ - **Zero CSS setup** — pre-compiled CSS bundle includes Tailwind + DaisyUI, no extra config needed
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install solid-tom-ui
20
+
21
+ pnpm i solid-tom-ui
22
+
23
+ bun i solid-tom-ui
24
+ ```
25
+
26
+ ### Peer dependencies
27
+
28
+ ```bash
29
+ npm install solid-js
30
+ ```
31
+
32
+ Optional (only needed for specific components):
33
+
34
+ | Package | Component |
35
+ |---------|-----------|
36
+ | `imask` | `Input` with mask |
37
+ | `qrcode` | `QrCode` |
38
+ | `@tanstack/solid-table` | `Table` |
39
+
40
+ ## Setup
41
+
42
+ ### 1. Import the pre-compiled CSS bundle
43
+
44
+ ```css
45
+ /* app.css */
46
+ @import 'solid-tom-ui/styles';
47
+ ```
48
+
49
+ Make sure this CSS file is imported in your app entry point:
50
+
51
+ ```tsx
52
+ // src/index.tsx
53
+ import './app.css';
54
+ import { render } from 'solid-js/web';
55
+ import App from './App';
56
+
57
+ render(() => <App />, document.getElementById('root')!);
58
+ ```
59
+ ---
60
+
61
+ ### 2. Use components
62
+
63
+ ```tsx
64
+ import { Button, Modal, toast } from 'solid-tom-ui';
65
+
66
+ function App() {
67
+ return (
68
+ <Button color="primary" onClick={() => toast.success('Hello!')}>
69
+ Click me
70
+ </Button>
71
+ );
72
+ }
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Advanced Setup (Custom Theme)
78
+
79
+ Overwrite css variable
80
+
81
+ ```css
82
+ :root {
83
+ --color-base-100: white;
84
+ --color-base-content: black;
85
+
86
+ --color-primary: red;
87
+ --color-primary-content: white;
88
+
89
+ --color-secondary: red;
90
+ --color-secondary-content: white;
91
+
92
+ --color-accent: red;
93
+ --color-accent-content: white;
94
+
95
+ --color-neutral: red;
96
+ --color-neutral-content: white;
97
+
98
+ --color-info: red;
99
+ --color-info-content: white;
100
+
101
+ --color-success: red;
102
+ --color-success-content: white;
103
+
104
+ --color-warning: red;
105
+ --color-warning-content: white;
106
+
107
+ --color-error: red;
108
+ --color-error-content: white;
109
+ --radius-selector: 8px;
110
+ --radius-field: 4px;
111
+ --radius-box: 6px;
112
+ --size-selector: 4px;
113
+ --size-field: 4px;
114
+ --border: 1px;
115
+ --depth: 0;
116
+ --noise: 0;
117
+ }
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Components
123
+
124
+ ### Layout & Navigation
125
+ | Component | Description |
126
+ |-----------|-------------|
127
+ | `Breadcrumb` | Navigation breadcrumb trail |
128
+ | `Divider` | Horizontal or vertical divider |
129
+ | `Drawer` | Slide-in side panel |
130
+ | `Dropdown` | Dropdown menu |
131
+ | `Menu` | Vertical/horizontal navigation menu |
132
+ | `Pagination` | Page navigation |
133
+ | `Splitter` | Resizable split pane |
134
+ | `Steps` | Step-by-step progress indicator |
135
+ | `Tab` | Tabbed navigation |
136
+
137
+ ### Data Display
138
+ | Component | Description |
139
+ |-----------|-------------|
140
+ | `Avatar` | User avatar with fallback |
141
+ | `Badge` | Status badge / tag |
142
+ | `Carousel` | Image/content carousel |
143
+ | `ChatBubble` | Chat message bubble |
144
+ | `Diff` | Side-by-side diff viewer |
145
+ | `Indicator` | Numeric badge overlay |
146
+ | `Skeleton` | Loading skeleton placeholder |
147
+ | `Table` | Feature-rich table (virtual scroll, sort, filter, pinned columns) |
148
+ | `Timeline` | Vertical timeline |
149
+ | `Tooltip` | Hover tooltip |
150
+ | `Tour` | Interactive product tour |
151
+
152
+ ### Input & Forms
153
+ | Component | Description |
154
+ |-----------|-------------|
155
+ | `Checkbox` | Checkbox input |
156
+ | `Input` | Text, password, number, textarea, color, date, range, OTP, masked inputs |
157
+ | `Rating` | Star rating |
158
+ | `Select` | Dropdown select |
159
+ | `SelectZone` | Drag-to-select zone |
160
+ | `Slider` | Range slider |
161
+ | `Switch` | Toggle switch |
162
+ | `Upload` | File upload with drag & drop |
163
+
164
+ ### Feedback
165
+ | Component | Description |
166
+ |-----------|-------------|
167
+ | `Loading` | Spinner / loading indicator |
168
+ | `Modal` | Dialog modal |
169
+ | `ProgressBar` | Progress bar |
170
+ | `Toast` | Toast notifications (`toast.success()`, `toast.error()`, …) |
171
+
172
+ ### Visual & Effects
173
+ | Component | Description |
174
+ |-----------|-------------|
175
+ | `Collapse` | Collapsible content panel |
176
+ | `ContextMenu` | Right-click context menu |
177
+ | `FloatButton` | Floating action button |
178
+ | `Hover3dImage` | 3D parallax image on hover |
179
+ | `ImagePreview` | Lightbox image preview |
180
+ | `Mansory` | Masonry grid layout |
181
+ | `QrCode` | QR code generator |
182
+ | `Swap` | Flip between two states |
183
+ | `TextRotate` | Animated rotating text |
184
+
185
+ ### Utilities
186
+ | Component | Description |
187
+ |-----------|-------------|
188
+ | `CodePreview` | Code preview |
189
+
190
+ ---
191
+
192
+ ## API
193
+
194
+ ### Color prop
195
+
196
+ Most components accept a `color` prop:
197
+
198
+ ```tsx
199
+ type BaseColorProps =
200
+ | 'primary' | 'secondary' | 'accent' | 'neutral'
201
+ | 'info' | 'success' | 'warning' | 'error';
202
+ ```
203
+
204
+ ```tsx
205
+ <Badge color="success">Active</Badge>
206
+ <Button color="warning">Caution</Button>
207
+ ```
208
+
209
+ ### Class override (slot system)
210
+
211
+ Every component exposes a `class` prop to override individual slots:
212
+
213
+ ```tsx
214
+ // Single-element components
215
+ <Badge class="font-bold text-lg" />
216
+
217
+ // Multi-slot components
218
+ <Modal
219
+ class={{
220
+ root: 'max-w-2xl',
221
+ header: 'bg-base-200',
222
+ body: 'p-8',
223
+ }}
224
+ />
225
+ ```
226
+
227
+ ## TypeScript
228
+
229
+ All prop types are exported:
230
+
231
+ ```tsx
232
+ import type { ButtonProps, ModalProps, BaseColorProps, SolidComponent } from 'solid-tom-ui';
233
+ ```
234
+
235
+ ## License
236
+
237
+ MIT © [Truong Tom](https://github.com/truongtom1993)
@@ -3,7 +3,6 @@ import { Component } from 'solid-js';
3
3
  import { BadgeProps } from './badge.types';
4
4
  declare const variants: (props?: ({
5
5
  size?: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | null | undefined;
6
- color?: "primary" | "neutral" | "secondary" | "accent" | "info" | "success" | "warning" | "error" | null | undefined;
7
6
  variants?: "outline" | "soft" | "dashed" | null | undefined;
8
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
8
  export type BadgeVariantsProps = VariantProps<typeof variants>;
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,QAAA,MAAM,QAAQ;;;;8EA6BZ,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/D,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,UAAU,CAkBvC,CAAC"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAc,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,QAAA,MAAM,QAAQ;;;8EAmBZ,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE/D,eAAO,MAAM,KAAK,EAAE,SAAS,CAAC,UAAU,CAmBvC,CAAC"}