@madecki/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,206 @@
1
+ # @madecki/ui
2
+
3
+ A collection of reusable React UI components built with TypeScript and Tailwind CSS. Framework-agnostic (works with Next.js, Vite, Create React App, etc.).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @madecki/ui
9
+ # or
10
+ yarn add @madecki/ui
11
+ # or
12
+ pnpm add @madecki/ui
13
+ ```
14
+
15
+ ## Requirements
16
+
17
+ - React 18+
18
+ - Tailwind CSS 3+
19
+
20
+ ## Setup
21
+
22
+ ### 1. Configure Tailwind CSS
23
+
24
+ Add the Madecki UI preset to your `tailwind.config.js`:
25
+
26
+ ```js
27
+ import { madeckiPreset } from "@madecki/ui/tailwind-preset";
28
+
29
+ /** @type {import('tailwindcss').Config} */
30
+ export default {
31
+ presets: [madeckiPreset],
32
+ content: [
33
+ "./src/**/*.{js,ts,jsx,tsx}",
34
+ // Include the package components
35
+ "./node_modules/@madecki/ui/dist/**/*.{js,cjs}",
36
+ ],
37
+ // ... your config
38
+ };
39
+ ```
40
+
41
+ ### 2. Import Components
42
+
43
+ ```tsx
44
+ import { Button, Input, Tabs, Spinner } from "@madecki/ui";
45
+ import { Heart, Share, TwitterIcon } from "@madecki/ui";
46
+ ```
47
+
48
+ ## Components
49
+
50
+ ### Buttons
51
+
52
+ - **Button** - Primary button with multiple color variants and sizes
53
+ - **ButtonTransparent** - Transparent/outlined button variant
54
+ - **GradientButton** - Button with gradient border effect
55
+ - **RadioButtons** - Radio button group component
56
+
57
+ ```tsx
58
+ <Button variant="primary" size="md" onClick={() => {}}>
59
+ Click me
60
+ </Button>
61
+
62
+ <ButtonTransparent variant="success">
63
+ Transparent Button
64
+ </ButtonTransparent>
65
+
66
+ <GradientButton size="lg">
67
+ Gradient Button
68
+ </GradientButton>
69
+ ```
70
+
71
+ ### Input
72
+
73
+ ```tsx
74
+ <Input
75
+ name="email"
76
+ label="Email Address"
77
+ placeholder="Enter your email"
78
+ type="email"
79
+ variant="primary"
80
+ onChange={(value) => console.log(value)}
81
+ />
82
+ ```
83
+
84
+ ### Tabs
85
+
86
+ ```tsx
87
+ <Tabs
88
+ tabs={[
89
+ { label: "Tab 1", value: "tab1" },
90
+ { label: "Tab 2", value: "tab2" },
91
+ { label: "Tab 3", value: "tab3" },
92
+ ]}
93
+ onTabClick={(value) => console.log("Selected:", value)}
94
+ />
95
+ ```
96
+
97
+ ### Spinner
98
+
99
+ ```tsx
100
+ <Spinner size="md" />
101
+ <SpinnerOverlay isVisible={isLoading} />
102
+ ```
103
+
104
+ ### BlockQuote
105
+
106
+ ```tsx
107
+ <BlockQuote>
108
+ "This is a quote with a nice styling."
109
+ </BlockQuote>
110
+ ```
111
+
112
+ ### ContentBox
113
+
114
+ ```tsx
115
+ import { ContentBox, Info, Warning } from "@madecki/ui";
116
+
117
+ <ContentBox variant="info" icon={<Info />}>
118
+ This is an info box.
119
+ </ContentBox>
120
+
121
+ <ContentBox variant="warning" icon={<Warning />}>
122
+ This is a warning box.
123
+ </ContentBox>
124
+ ```
125
+
126
+ ### Hr (Horizontal Rule)
127
+
128
+ ```tsx
129
+ <Hr className="my-8" />
130
+ ```
131
+
132
+ ## Icons
133
+
134
+ ### Heart
135
+
136
+ ```tsx
137
+ <Heart variant="outline" /> // outline style
138
+ <Heart variant="filled" /> // filled style
139
+ <Heart variant="gradient" /> // gradient style
140
+ ```
141
+
142
+ ### Share
143
+
144
+ ```tsx
145
+ <Share variant="default" />
146
+ <Share variant="gradient" />
147
+ ```
148
+
149
+ ### Utility Icons
150
+
151
+ ```tsx
152
+ <Search size={24} />
153
+ <Info />
154
+ <Warning />
155
+ ```
156
+
157
+ ### Social Icons
158
+
159
+ ```tsx
160
+ <TwitterIcon />
161
+ <LinkedInIcon />
162
+ <InstagramIcon />
163
+
164
+ // Without wrapper
165
+ <TwitterIcon withWrapper={false} />
166
+ ```
167
+
168
+ ## Theming
169
+
170
+ The package comes with a custom color palette:
171
+
172
+ | Color | Value |
173
+ |-----------|-----------|
174
+ | primary | #1E1E1E |
175
+ | darkgray | #272727 |
176
+ | lightgray | #6D6D6D |
177
+ | gray | #3A3A3A |
178
+ | white | #FCFAF7 |
179
+ | success | #87BB54 |
180
+ | danger | #CB5065 |
181
+ | info | #714E8E |
182
+ | blue | #2084E1 |
183
+ | warning | #EDA867 |
184
+ | neutral | #E1E1E1 |
185
+
186
+ All components support dark mode via the `dark:` Tailwind prefix.
187
+
188
+ ## Development
189
+
190
+ ```bash
191
+ # Install dependencies
192
+ npm install
193
+
194
+ # Start Storybook for component development
195
+ npm run storybook
196
+
197
+ # Build the package
198
+ npm run build
199
+
200
+ # Run type checking
201
+ npm run typecheck
202
+ ```
203
+
204
+ ## License
205
+
206
+ MIT