@omnikit-js/ui 0.3.4 → 0.3.5
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 +5 -13
- package/package.json +1 -1
- package/styles.css +196 -3
package/README.md
CHANGED
|
@@ -19,29 +19,21 @@ A comprehensive SaaS billing component for Next.js applications with Stripe inte
|
|
|
19
19
|
npm install @omnikit-js/ui
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
### Simple Setup - No Tailwind Required!
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Just import the component's CSS file in your app:
|
|
25
25
|
|
|
26
|
-
1
|
|
27
|
-
```bash
|
|
28
|
-
npm install -D tailwindcss postcss autoprefixer
|
|
29
|
-
npx tailwindcss init -p
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
2. Import the component's CSS file in your app:
|
|
33
|
-
|
|
34
|
-
**In your `app/globals.css` or main CSS file:**
|
|
26
|
+
**Option 1: In your `app/globals.css` or main CSS file:**
|
|
35
27
|
```css
|
|
36
28
|
@import '@omnikit-js/ui/styles.css';
|
|
37
29
|
```
|
|
38
30
|
|
|
39
|
-
**
|
|
31
|
+
**Option 2: In your layout file:**
|
|
40
32
|
```tsx
|
|
41
33
|
import '@omnikit-js/ui/styles.css';
|
|
42
34
|
```
|
|
43
35
|
|
|
44
|
-
That's it
|
|
36
|
+
**That's it!** The component includes all necessary styles and works without requiring Tailwind CSS configuration.
|
|
45
37
|
|
|
46
38
|
## Prerequisites
|
|
47
39
|
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -1,8 +1,201 @@
|
|
|
1
1
|
/* @omnikit-js/ui Component Styles */
|
|
2
|
+
/* This file includes all Tailwind CSS classes used by the billing component */
|
|
3
|
+
|
|
4
|
+
/* Reset and base styles */
|
|
5
|
+
*, ::before, ::after {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/* Color utilities */
|
|
10
|
+
.text-red-600 { color: #dc2626; }
|
|
11
|
+
.text-red-400 { color: #f87171; }
|
|
12
|
+
.text-orange-600 { color: #ea580c; }
|
|
13
|
+
.text-orange-400 { color: #fb923c; }
|
|
14
|
+
.text-yellow-600 { color: #d97706; }
|
|
15
|
+
.text-yellow-400 { color: #facc15; }
|
|
16
|
+
.text-green-600 { color: #16a34a; }
|
|
17
|
+
.text-green-400 { color: #4ade80; }
|
|
18
|
+
.text-gray-500 { color: #6b7280; }
|
|
19
|
+
.text-muted-foreground { color: #6b7280; }
|
|
20
|
+
.text-foreground { color: #111827; }
|
|
21
|
+
.text-primary { color: #3b82f6; }
|
|
22
|
+
.text-primary-foreground { color: #ffffff; }
|
|
23
|
+
|
|
24
|
+
/* Background colors */
|
|
25
|
+
.bg-red-100 { background-color: #fee2e2; }
|
|
26
|
+
.bg-red-950 { background-color: #450a0a; }
|
|
27
|
+
.bg-orange-100 { background-color: #ffedd5; }
|
|
28
|
+
.bg-orange-950 { background-color: #431407; }
|
|
29
|
+
.bg-yellow-100 { background-color: #fef3c7; }
|
|
30
|
+
.bg-yellow-950 { background-color: #451a03; }
|
|
31
|
+
.bg-green-100 { background-color: #dcfce7; }
|
|
32
|
+
.bg-green-950 { background-color: #14532d; }
|
|
33
|
+
.bg-primary { background-color: #3b82f6; }
|
|
34
|
+
.bg-popover { background-color: #ffffff; }
|
|
35
|
+
.bg-muted { background-color: #f9fafb; }
|
|
36
|
+
.bg-secondary { background-color: #f3f4f6; }
|
|
37
|
+
.bg-destructive { background-color: #ef4444; }
|
|
38
|
+
|
|
39
|
+
/* Border colors */
|
|
40
|
+
.border-primary { border-color: #3b82f6; }
|
|
41
|
+
.border-primary\/50 { border-color: rgba(59, 130, 246, 0.5); }
|
|
42
|
+
.border-muted { border-color: #e5e7eb; }
|
|
43
|
+
.border { border-width: 1px; }
|
|
44
|
+
.border-t { border-top-width: 1px; }
|
|
45
|
+
|
|
46
|
+
/* Text sizes */
|
|
47
|
+
.text-xs { font-size: 0.75rem; line-height: 1rem; }
|
|
48
|
+
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
|
|
49
|
+
.text-base { font-size: 1rem; line-height: 1.5rem; }
|
|
50
|
+
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
|
|
51
|
+
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
|
|
52
|
+
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
|
|
53
|
+
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
|
|
54
|
+
.text-5xl { font-size: 3rem; line-height: 1; }
|
|
55
|
+
|
|
56
|
+
/* Font weights */
|
|
57
|
+
.font-normal { font-weight: 400; }
|
|
58
|
+
.font-medium { font-weight: 500; }
|
|
59
|
+
.font-semibold { font-weight: 600; }
|
|
60
|
+
.font-bold { font-weight: 700; }
|
|
61
|
+
|
|
62
|
+
/* Spacing */
|
|
63
|
+
.p-1 { padding: 0.25rem; }
|
|
64
|
+
.p-3 { padding: 0.75rem; }
|
|
65
|
+
.p-4 { padding: 1rem; }
|
|
66
|
+
.p-6 { padding: 1.5rem; }
|
|
67
|
+
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
|
|
68
|
+
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
|
|
69
|
+
.pt-2 { padding-top: 0.5rem; }
|
|
70
|
+
.pt-3 { padding-top: 0.75rem; }
|
|
71
|
+
.pt-4 { padding-top: 1rem; }
|
|
72
|
+
.pb-4 { padding-bottom: 1rem; }
|
|
73
|
+
.pb-8 { padding-bottom: 2rem; }
|
|
74
|
+
.ml-1 { margin-left: 0.25rem; }
|
|
75
|
+
.ml-2 { margin-left: 0.5rem; }
|
|
76
|
+
.mr-2 { margin-right: 0.5rem; }
|
|
77
|
+
.mt-1 { margin-top: 0.25rem; }
|
|
78
|
+
.mt-2 { margin-top: 0.5rem; }
|
|
79
|
+
.mb-4 { margin-bottom: 1rem; }
|
|
80
|
+
.mb-8 { margin-bottom: 2rem; }
|
|
81
|
+
|
|
82
|
+
/* Layout */
|
|
83
|
+
.flex { display: flex; }
|
|
84
|
+
.inline-flex { display: inline-flex; }
|
|
85
|
+
.grid { display: grid; }
|
|
86
|
+
.hidden { display: none; }
|
|
87
|
+
.flex-col { flex-direction: column; }
|
|
88
|
+
.flex-1 { flex: 1 1 0%; }
|
|
89
|
+
.flex-shrink-0 { flex-shrink: 0; }
|
|
90
|
+
.items-start { align-items: flex-start; }
|
|
91
|
+
.items-center { align-items: center; }
|
|
92
|
+
.items-baseline { align-items: baseline; }
|
|
93
|
+
.justify-center { justify-content: center; }
|
|
94
|
+
.justify-between { justify-content: space-between; }
|
|
95
|
+
.justify-end { justify-content: flex-end; }
|
|
96
|
+
|
|
97
|
+
/* Grid */
|
|
98
|
+
.gap-4 { gap: 1rem; }
|
|
99
|
+
.gap-6 { gap: 1.5rem; }
|
|
100
|
+
|
|
101
|
+
/* Width and height */
|
|
102
|
+
.w-full { width: 100%; }
|
|
103
|
+
.h-4 { height: 1rem; }
|
|
104
|
+
.h-6 { height: 1.5rem; }
|
|
105
|
+
.h-full { height: 100%; }
|
|
106
|
+
.min-h-\[300px\] { min-height: 300px; }
|
|
107
|
+
|
|
108
|
+
/* Positioning */
|
|
109
|
+
.relative { position: relative; }
|
|
110
|
+
.absolute { position: absolute; }
|
|
111
|
+
.fixed { position: fixed; }
|
|
112
|
+
.top-0 { top: 0px; }
|
|
113
|
+
.right-0 { right: 0px; }
|
|
114
|
+
.left-1\/2 { left: 50%; }
|
|
115
|
+
.top-1\/2 { top: 50%; }
|
|
116
|
+
.inset { inset: 0px; }
|
|
117
|
+
.z-50 { z-index: 50; }
|
|
118
|
+
.z-51 { z-index: 51; }
|
|
119
|
+
|
|
120
|
+
/* Transforms */
|
|
121
|
+
.-translate-x-1\/2 { transform: translateX(-50%); }
|
|
122
|
+
.-translate-y-1\/2 { transform: translateY(-50%); }
|
|
123
|
+
|
|
124
|
+
/* Overflow */
|
|
125
|
+
.overflow-hidden { overflow: hidden; }
|
|
126
|
+
|
|
127
|
+
/* Border radius */
|
|
128
|
+
.rounded { border-radius: 0.25rem; }
|
|
129
|
+
.rounded-md { border-radius: 0.375rem; }
|
|
130
|
+
.rounded-lg { border-radius: 0.5rem; }
|
|
131
|
+
.rounded-bl-lg { border-bottom-left-radius: 0.5rem; }
|
|
132
|
+
.rounded-full { border-radius: 9999px; }
|
|
133
|
+
|
|
134
|
+
/* Box shadow */
|
|
135
|
+
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
|
|
136
|
+
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
|
|
137
|
+
|
|
138
|
+
/* Cursor */
|
|
139
|
+
.cursor-pointer { cursor: pointer; }
|
|
140
|
+
.cursor-help { cursor: help; }
|
|
141
|
+
|
|
142
|
+
/* Transitions */
|
|
143
|
+
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
|
|
144
|
+
.animate-in { animation: enter 150ms ease-out; }
|
|
145
|
+
.animate-out { animation: exit 150ms ease-in; }
|
|
146
|
+
.animate-spin { animation: spin 1s linear infinite; }
|
|
147
|
+
|
|
148
|
+
/* Space between children */
|
|
149
|
+
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
|
|
150
|
+
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
|
|
151
|
+
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
|
|
152
|
+
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
|
|
153
|
+
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }
|
|
154
|
+
.space-x-2 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.5rem; }
|
|
155
|
+
|
|
156
|
+
/* Responsive grid columns */
|
|
157
|
+
@media (min-width: 768px) {
|
|
158
|
+
.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
159
|
+
.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media (min-width: 1024px) {
|
|
163
|
+
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media (min-width: 1280px) {
|
|
167
|
+
.xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Pseudo-class utilities */
|
|
171
|
+
.first\:border-t-0:first-child { border-top-width: 0px; }
|
|
172
|
+
.first\:pt-0:first-child { padding-top: 0px; }
|
|
173
|
+
|
|
174
|
+
/* Dark mode styles */
|
|
175
|
+
@media (prefers-color-scheme: dark) {
|
|
176
|
+
.dark\:text-red-400 { color: #f87171; }
|
|
177
|
+
.dark\:text-orange-400 { color: #fb923c; }
|
|
178
|
+
.dark\:text-yellow-400 { color: #facc15; }
|
|
179
|
+
.dark\:text-green-400 { color: #4ade80; }
|
|
180
|
+
.dark\:bg-red-950 { background-color: #450a0a; }
|
|
181
|
+
.dark\:bg-orange-950 { background-color: #431407; }
|
|
182
|
+
.dark\:bg-yellow-950 { background-color: #451a03; }
|
|
183
|
+
.dark\:bg-green-950 { background-color: #14532d; }
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* Custom keyframes */
|
|
187
|
+
@keyframes enter {
|
|
188
|
+
from { opacity: 0; transform: scale(0.95); }
|
|
189
|
+
to { opacity: 1; transform: scale(1); }
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@keyframes exit {
|
|
193
|
+
from { opacity: 1; transform: scale(1); }
|
|
194
|
+
to { opacity: 0; transform: scale(0.95); }
|
|
195
|
+
}
|
|
2
196
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
197
|
+
@keyframes spin {
|
|
198
|
+
to { transform: rotate(360deg); }
|
|
6
199
|
}
|
|
7
200
|
|
|
8
201
|
/* Card styles */
|