@omnikit-js/ui 0.5.2 → 0.5.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 +11 -8
- package/dist/styles.css +20 -0
- package/dist/styles.isolated.css +2643 -0
- package/package.json +7 -4
- package/src/components/BillingClient.tsx +1 -1
- package/src/components/BillingServer.tsx +9 -7
- package/src/components/ui/progress.tsx +2 -2
- package/src/styles/isolated.css +316 -0
- package/src/styles/main.css +27 -0
package/README.md
CHANGED
|
@@ -44,13 +44,13 @@ export default function BillingPage() {
|
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
### Option 2:
|
|
47
|
+
### Option 2: Isolated CSS (Recommended for Apps With Style Conflicts)
|
|
48
48
|
|
|
49
|
-
To
|
|
49
|
+
To completely isolate the component styles and avoid any conflicts:
|
|
50
50
|
|
|
51
51
|
```javascript
|
|
52
|
-
// Import the
|
|
53
|
-
import '@omnikit-js/ui/dist/styles.
|
|
52
|
+
// Import the isolated CSS version
|
|
53
|
+
import '@omnikit-js/ui/dist/styles.isolated.css'
|
|
54
54
|
|
|
55
55
|
// Use the component
|
|
56
56
|
import { Billing } from '@omnikit-js/ui'
|
|
@@ -66,13 +66,13 @@ export default function BillingPage() {
|
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
**Note:** The
|
|
69
|
+
**Note:** The isolated version wraps all styles in `.omnikit-billing-component` and uses `!important` for critical styles like progress bars to prevent conflicts.
|
|
70
70
|
|
|
71
71
|
### Next.js App Router Example
|
|
72
72
|
|
|
73
73
|
```javascript
|
|
74
74
|
// app/billing/page.tsx
|
|
75
|
-
import '@omnikit-js/ui/dist/styles.
|
|
75
|
+
import '@omnikit-js/ui/dist/styles.isolated.css'
|
|
76
76
|
import { Billing } from '@omnikit-js/ui'
|
|
77
77
|
|
|
78
78
|
export default function BillingPage() {
|
|
@@ -93,7 +93,7 @@ export default function BillingPage() {
|
|
|
93
93
|
|
|
94
94
|
```javascript
|
|
95
95
|
// pages/_app.tsx
|
|
96
|
-
import '@omnikit-js/ui/dist/styles.
|
|
96
|
+
import '@omnikit-js/ui/dist/styles.isolated.css'
|
|
97
97
|
import type { AppProps } from 'next/app'
|
|
98
98
|
|
|
99
99
|
export default function App({ Component, pageProps }: AppProps) {
|
|
@@ -264,10 +264,13 @@ The component expects the following API endpoints:
|
|
|
264
264
|
|
|
265
265
|
5. **Styles not loading**
|
|
266
266
|
- Ensure you're importing the CSS file
|
|
267
|
-
- Check the correct path: `@omnikit-js/ui/dist/styles.css` or `@omnikit-js/ui/dist/styles.
|
|
267
|
+
- Check the correct path: `@omnikit-js/ui/dist/styles.css` or `@omnikit-js/ui/dist/styles.isolated.css`
|
|
268
|
+
- For apps with style conflicts, use the isolated version
|
|
268
269
|
|
|
269
270
|
## Version History
|
|
270
271
|
|
|
272
|
+
- **0.5.3** - Added isolated CSS option for better style conflict resolution
|
|
273
|
+
- **0.5.2** - Fixed CSS exports in package.json
|
|
271
274
|
- **0.5.1** - Tailwind CSS v4 support with prefix option
|
|
272
275
|
- **0.3.5** - Previous version with Tailwind CSS v3
|
|
273
276
|
|
package/dist/styles.css
CHANGED
|
@@ -2145,6 +2145,26 @@
|
|
|
2145
2145
|
}
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
|
+
[data-slot="card"] {
|
|
2149
|
+
background-color: transparent !important;
|
|
2150
|
+
border: none !important;
|
|
2151
|
+
box-shadow: none !important;
|
|
2152
|
+
}
|
|
2153
|
+
.pricing-card {
|
|
2154
|
+
background-color: rgba(255, 255, 255, 0.05) !important;
|
|
2155
|
+
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
|
2156
|
+
border-radius: 0.75rem !important;
|
|
2157
|
+
}
|
|
2158
|
+
.pricing-card.current {
|
|
2159
|
+
border-color: #3b82f6 !important;
|
|
2160
|
+
background-color: rgba(59, 130, 246, 0.1) !important;
|
|
2161
|
+
}
|
|
2162
|
+
@media (prefers-color-scheme: dark) {
|
|
2163
|
+
.pricing-card {
|
|
2164
|
+
background-color: rgba(31, 41, 55, 0.5) !important;
|
|
2165
|
+
border-color: rgba(255, 255, 255, 0.1) !important;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2148
2168
|
span.omnikit-price-text {
|
|
2149
2169
|
font-size: 2rem !important;
|
|
2150
2170
|
line-height: 1 !important;
|