@omnikit-js/ui 0.3.3 → 0.3.4

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 (3) hide show
  1. package/README.md +8 -9
  2. package/package.json +1 -1
  3. package/styles.css +360 -3
package/README.md CHANGED
@@ -29,21 +29,20 @@ npm install -D tailwindcss postcss autoprefixer
29
29
  npx tailwindcss init -p
30
30
  ```
31
31
 
32
- 2. Import the component's CSS in your main CSS file or `layout.js`:
32
+ 2. Import the component's CSS file in your app:
33
+
34
+ **In your `app/globals.css` or main CSS file:**
33
35
  ```css
34
36
  @import '@omnikit-js/ui/styles.css';
35
37
  ```
36
38
 
37
- Or in your `app/globals.css`:
38
- ```css
39
- @tailwind base;
40
- @tailwind components;
41
- @tailwind utilities;
42
-
43
- /* Import the component styles */
44
- @import '@omnikit-js/ui/styles.css';
39
+ **Or in your layout file:**
40
+ ```tsx
41
+ import '@omnikit-js/ui/styles.css';
45
42
  ```
46
43
 
44
+ That's it! The component includes all necessary styles and works with or without Tailwind CSS.
45
+
47
46
  ## Prerequisites
48
47
 
49
48
  1. A Stripe account with API keys
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnikit-js/ui",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "A SaaS billing component for Next.js with Stripe integration",
5
5
  "main": "src/index.ts",
6
6
  "module": "src/index.ts",
package/styles.css CHANGED
@@ -1,3 +1,360 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
1
+ /* @omnikit-js/ui Component Styles */
2
+
3
+ /* Base component styles */
4
+ .omnikit-billing {
5
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
6
+ }
7
+
8
+ /* Card styles */
9
+ .omnikit-card {
10
+ background: white;
11
+ border: 1px solid #e5e7eb;
12
+ border-radius: 0.5rem;
13
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
14
+ }
15
+
16
+ .omnikit-card-header {
17
+ padding: 1.5rem 1.5rem 0 1.5rem;
18
+ }
19
+
20
+ .omnikit-card-content {
21
+ padding: 1.5rem;
22
+ }
23
+
24
+ .omnikit-card-footer {
25
+ padding: 0 1.5rem 1.5rem 1.5rem;
26
+ }
27
+
28
+ /* Button styles */
29
+ .omnikit-button {
30
+ display: inline-flex;
31
+ align-items: center;
32
+ justify-content: center;
33
+ border-radius: 0.375rem;
34
+ font-size: 0.875rem;
35
+ font-weight: 500;
36
+ padding: 0.5rem 1rem;
37
+ border: 1px solid transparent;
38
+ cursor: pointer;
39
+ transition: all 0.2s;
40
+ }
41
+
42
+ .omnikit-button-primary {
43
+ background: #3b82f6;
44
+ color: white;
45
+ }
46
+
47
+ .omnikit-button-primary:hover {
48
+ background: #2563eb;
49
+ }
50
+
51
+ .omnikit-button-secondary {
52
+ background: #f3f4f6;
53
+ color: #374151;
54
+ }
55
+
56
+ .omnikit-button-secondary:hover {
57
+ background: #e5e7eb;
58
+ }
59
+
60
+ .omnikit-button-outline {
61
+ background: transparent;
62
+ border-color: #d1d5db;
63
+ color: #374151;
64
+ }
65
+
66
+ .omnikit-button-outline:hover {
67
+ background: #f9fafb;
68
+ }
69
+
70
+ .omnikit-button-destructive {
71
+ background: #ef4444;
72
+ color: white;
73
+ }
74
+
75
+ .omnikit-button-destructive:hover {
76
+ background: #dc2626;
77
+ }
78
+
79
+ /* Pricing card styles */
80
+ .omnikit-pricing-grid {
81
+ display: grid;
82
+ gap: 1rem;
83
+ grid-template-columns: 1fr;
84
+ }
85
+
86
+ @media (min-width: 768px) {
87
+ .omnikit-pricing-grid {
88
+ grid-template-columns: repeat(2, 1fr);
89
+ }
90
+ }
91
+
92
+ @media (min-width: 1024px) {
93
+ .omnikit-pricing-grid {
94
+ grid-template-columns: repeat(3, 1fr);
95
+ }
96
+ }
97
+
98
+ @media (min-width: 1280px) {
99
+ .omnikit-pricing-grid-4 {
100
+ grid-template-columns: repeat(4, 1fr);
101
+ }
102
+ }
103
+
104
+ .omnikit-pricing-card {
105
+ position: relative;
106
+ display: flex;
107
+ flex-direction: column;
108
+ height: 100%;
109
+ overflow: hidden;
110
+ }
111
+
112
+ .omnikit-pricing-card.current {
113
+ border-color: #3b82f6;
114
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
115
+ }
116
+
117
+ .omnikit-pricing-card.popular {
118
+ border-color: rgba(59, 130, 246, 0.5);
119
+ }
120
+
121
+ /* Feature styles */
122
+ .omnikit-feature-value {
123
+ font-size: 1.125rem;
124
+ font-weight: 600;
125
+ color: #111827;
126
+ }
127
+
128
+ .omnikit-feature-units {
129
+ font-size: 0.875rem;
130
+ color: #6b7280;
131
+ font-weight: 400;
132
+ }
133
+
134
+ .omnikit-feature-name {
135
+ font-size: 0.75rem;
136
+ color: #6b7280;
137
+ margin-top: 0.25rem;
138
+ cursor: help;
139
+ }
140
+
141
+ /* Badge styles */
142
+ .omnikit-badge {
143
+ display: inline-flex;
144
+ align-items: center;
145
+ border-radius: 9999px;
146
+ padding: 0.25rem 0.75rem;
147
+ font-size: 0.75rem;
148
+ font-weight: 500;
149
+ background: #f3f4f6;
150
+ color: #374151;
151
+ }
152
+
153
+ .omnikit-badge-secondary {
154
+ background: #f3f4f6;
155
+ color: #374151;
156
+ }
157
+
158
+ /* Progress bar styles */
159
+ .omnikit-progress {
160
+ width: 100%;
161
+ height: 0.5rem;
162
+ background: #f3f4f6;
163
+ border-radius: 9999px;
164
+ overflow: hidden;
165
+ }
166
+
167
+ .omnikit-progress-fill {
168
+ height: 100%;
169
+ background: #3b82f6;
170
+ transition: width 0.3s ease;
171
+ }
172
+
173
+ /* Modal/Dialog styles */
174
+ .omnikit-dialog-overlay {
175
+ position: fixed;
176
+ inset: 0;
177
+ background: rgba(0, 0, 0, 0.5);
178
+ z-index: 50;
179
+ }
180
+
181
+ .omnikit-dialog-content {
182
+ position: fixed;
183
+ left: 50%;
184
+ top: 50%;
185
+ transform: translate(-50%, -50%);
186
+ background: white;
187
+ border-radius: 0.5rem;
188
+ padding: 1.5rem;
189
+ max-width: 28rem;
190
+ width: 90vw;
191
+ z-index: 51;
192
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
193
+ }
194
+
195
+ /* Tabs styles */
196
+ .omnikit-tabs-list {
197
+ display: inline-flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ border-radius: 0.375rem;
201
+ background: #f3f4f6;
202
+ padding: 0.25rem;
203
+ }
204
+
205
+ .omnikit-tabs-trigger {
206
+ display: inline-flex;
207
+ align-items: center;
208
+ justify-content: center;
209
+ padding: 0.375rem 0.75rem;
210
+ font-size: 0.875rem;
211
+ font-weight: 500;
212
+ border-radius: 0.25rem;
213
+ cursor: pointer;
214
+ color: #6b7280;
215
+ transition: all 0.2s;
216
+ }
217
+
218
+ .omnikit-tabs-trigger[data-state="active"] {
219
+ background: white;
220
+ color: #111827;
221
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
222
+ }
223
+
224
+ /* Utility classes */
225
+ .omnikit-text-muted {
226
+ color: #6b7280;
227
+ }
228
+
229
+ .omnikit-text-foreground {
230
+ color: #111827;
231
+ }
232
+
233
+ .omnikit-text-primary {
234
+ color: #3b82f6;
235
+ }
236
+
237
+ .omnikit-flex {
238
+ display: flex;
239
+ }
240
+
241
+ .omnikit-flex-col {
242
+ flex-direction: column;
243
+ }
244
+
245
+ .omnikit-flex-1 {
246
+ flex: 1 1 0%;
247
+ }
248
+
249
+ .omnikit-items-center {
250
+ align-items: center;
251
+ }
252
+
253
+ .omnikit-justify-center {
254
+ justify-content: center;
255
+ }
256
+
257
+ .omnikit-justify-between {
258
+ justify-content: space-between;
259
+ }
260
+
261
+ .omnikit-space-y-2 > * + * {
262
+ margin-top: 0.5rem;
263
+ }
264
+
265
+ .omnikit-space-y-3 > * + * {
266
+ margin-top: 0.75rem;
267
+ }
268
+
269
+ .omnikit-space-y-4 > * + * {
270
+ margin-top: 1rem;
271
+ }
272
+
273
+ .omnikit-mt-1 {
274
+ margin-top: 0.25rem;
275
+ }
276
+
277
+ .omnikit-mt-2 {
278
+ margin-top: 0.5rem;
279
+ }
280
+
281
+ .omnikit-mb-4 {
282
+ margin-bottom: 1rem;
283
+ }
284
+
285
+ .omnikit-p-4 {
286
+ padding: 1rem;
287
+ }
288
+
289
+ .omnikit-pt-2 {
290
+ padding-top: 0.5rem;
291
+ }
292
+
293
+ .omnikit-pt-3 {
294
+ padding-top: 0.75rem;
295
+ }
296
+
297
+ .omnikit-w-full {
298
+ width: 100%;
299
+ }
300
+
301
+ .omnikit-h-6 {
302
+ height: 1.5rem;
303
+ }
304
+
305
+ .omnikit-min-h-300 {
306
+ min-height: 300px;
307
+ }
308
+
309
+ /* Dark mode support */
310
+ @media (prefers-color-scheme: dark) {
311
+ .omnikit-card {
312
+ background: #1f2937;
313
+ border-color: #374151;
314
+ color: white;
315
+ }
316
+
317
+ .omnikit-feature-value {
318
+ color: white;
319
+ }
320
+
321
+ .omnikit-text-foreground {
322
+ color: white;
323
+ }
324
+
325
+ .omnikit-button-secondary {
326
+ background: #374151;
327
+ color: #d1d5db;
328
+ }
329
+
330
+ .omnikit-button-secondary:hover {
331
+ background: #4b5563;
332
+ }
333
+
334
+ .omnikit-button-outline {
335
+ border-color: #4b5563;
336
+ color: #d1d5db;
337
+ }
338
+
339
+ .omnikit-button-outline:hover {
340
+ background: #374151;
341
+ }
342
+
343
+ .omnikit-dialog-content {
344
+ background: #1f2937;
345
+ color: white;
346
+ }
347
+
348
+ .omnikit-tabs-list {
349
+ background: #374151;
350
+ }
351
+
352
+ .omnikit-tabs-trigger {
353
+ color: #9ca3af;
354
+ }
355
+
356
+ .omnikit-tabs-trigger[data-state="active"] {
357
+ background: #1f2937;
358
+ color: white;
359
+ }
360
+ }