@omnikit-js/ui 0.5.0 → 0.5.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.
- package/README.md +167 -71
- package/dist/styles.css +2486 -0
- package/dist/styles.prefixed.css +248 -0
- package/package.json +7 -4
- package/src/components/BillingClient.tsx +2 -2
- package/src/components/SubscriptionConfirmModal.tsx +1 -1
- package/src/components/ui/alert.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/components/ui/card-brand-icon.tsx +1 -1
- package/src/components/ui/card.tsx +1 -1
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/dropdown-menu.tsx +6 -6
- package/src/components/ui/navigation-menu.tsx +4 -4
- package/src/components/ui/select.tsx +2 -2
- package/src/components/ui/tabs.tsx +2 -2
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/styles/globals.css +1 -3
- package/src/styles/main.css +95 -0
- package/src/styles/prefixed-main.css +95 -0
- package/src/styles/prefixed.css +1 -3
- package/styles.css +0 -553
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
@layer theme {
|
|
4
|
+
:root, :host {
|
|
5
|
+
--tw-font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
6
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
7
|
+
--tw-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
8
|
+
"Courier New", monospace;
|
|
9
|
+
--tw-color-red-500: oklch(63.7% 0.237 25.331);
|
|
10
|
+
--tw-color-red-600: oklch(57.7% 0.245 27.325);
|
|
11
|
+
--tw-default-font-family: var(--tw-font-sans);
|
|
12
|
+
--tw-default-mono-font-family: var(--tw-font-mono);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@layer base {
|
|
16
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
margin: 0;
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0 solid;
|
|
21
|
+
}
|
|
22
|
+
html, :host {
|
|
23
|
+
line-height: 1.5;
|
|
24
|
+
-webkit-text-size-adjust: 100%;
|
|
25
|
+
tab-size: 4;
|
|
26
|
+
font-family: var(--tw-default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
27
|
+
font-feature-settings: var(--tw-default-font-feature-settings, normal);
|
|
28
|
+
font-variation-settings: var(--tw-default-font-variation-settings, normal);
|
|
29
|
+
-webkit-tap-highlight-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
hr {
|
|
32
|
+
height: 0;
|
|
33
|
+
color: inherit;
|
|
34
|
+
border-top-width: 1px;
|
|
35
|
+
}
|
|
36
|
+
abbr:where([title]) {
|
|
37
|
+
-webkit-text-decoration: underline dotted;
|
|
38
|
+
text-decoration: underline dotted;
|
|
39
|
+
}
|
|
40
|
+
h1, h2, h3, h4, h5, h6 {
|
|
41
|
+
font-size: inherit;
|
|
42
|
+
font-weight: inherit;
|
|
43
|
+
}
|
|
44
|
+
a {
|
|
45
|
+
color: inherit;
|
|
46
|
+
-webkit-text-decoration: inherit;
|
|
47
|
+
text-decoration: inherit;
|
|
48
|
+
}
|
|
49
|
+
b, strong {
|
|
50
|
+
font-weight: bolder;
|
|
51
|
+
}
|
|
52
|
+
code, kbd, samp, pre {
|
|
53
|
+
font-family: var(--tw-default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
54
|
+
font-feature-settings: var(--tw-default-mono-font-feature-settings, normal);
|
|
55
|
+
font-variation-settings: var(--tw-default-mono-font-variation-settings, normal);
|
|
56
|
+
font-size: 1em;
|
|
57
|
+
}
|
|
58
|
+
small {
|
|
59
|
+
font-size: 80%;
|
|
60
|
+
}
|
|
61
|
+
sub, sup {
|
|
62
|
+
font-size: 75%;
|
|
63
|
+
line-height: 0;
|
|
64
|
+
position: relative;
|
|
65
|
+
vertical-align: baseline;
|
|
66
|
+
}
|
|
67
|
+
sub {
|
|
68
|
+
bottom: -0.25em;
|
|
69
|
+
}
|
|
70
|
+
sup {
|
|
71
|
+
top: -0.5em;
|
|
72
|
+
}
|
|
73
|
+
table {
|
|
74
|
+
text-indent: 0;
|
|
75
|
+
border-color: inherit;
|
|
76
|
+
border-collapse: collapse;
|
|
77
|
+
}
|
|
78
|
+
:-moz-focusring {
|
|
79
|
+
outline: auto;
|
|
80
|
+
}
|
|
81
|
+
progress {
|
|
82
|
+
vertical-align: baseline;
|
|
83
|
+
}
|
|
84
|
+
summary {
|
|
85
|
+
display: list-item;
|
|
86
|
+
}
|
|
87
|
+
ol, ul, menu {
|
|
88
|
+
list-style: none;
|
|
89
|
+
}
|
|
90
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
91
|
+
display: block;
|
|
92
|
+
vertical-align: middle;
|
|
93
|
+
}
|
|
94
|
+
img, video {
|
|
95
|
+
max-width: 100%;
|
|
96
|
+
height: auto;
|
|
97
|
+
}
|
|
98
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
99
|
+
font: inherit;
|
|
100
|
+
font-feature-settings: inherit;
|
|
101
|
+
font-variation-settings: inherit;
|
|
102
|
+
letter-spacing: inherit;
|
|
103
|
+
color: inherit;
|
|
104
|
+
border-radius: 0;
|
|
105
|
+
background-color: transparent;
|
|
106
|
+
opacity: 1;
|
|
107
|
+
}
|
|
108
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
109
|
+
font-weight: bolder;
|
|
110
|
+
}
|
|
111
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
112
|
+
padding-inline-start: 20px;
|
|
113
|
+
}
|
|
114
|
+
::file-selector-button {
|
|
115
|
+
margin-inline-end: 4px;
|
|
116
|
+
}
|
|
117
|
+
::placeholder {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
121
|
+
::placeholder {
|
|
122
|
+
color: currentcolor;
|
|
123
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
124
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
textarea {
|
|
129
|
+
resize: vertical;
|
|
130
|
+
}
|
|
131
|
+
::-webkit-search-decoration {
|
|
132
|
+
-webkit-appearance: none;
|
|
133
|
+
}
|
|
134
|
+
::-webkit-date-and-time-value {
|
|
135
|
+
min-height: 1lh;
|
|
136
|
+
text-align: inherit;
|
|
137
|
+
}
|
|
138
|
+
::-webkit-datetime-edit {
|
|
139
|
+
display: inline-flex;
|
|
140
|
+
}
|
|
141
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
142
|
+
padding: 0;
|
|
143
|
+
}
|
|
144
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
145
|
+
padding-block: 0;
|
|
146
|
+
}
|
|
147
|
+
:-moz-ui-invalid {
|
|
148
|
+
box-shadow: none;
|
|
149
|
+
}
|
|
150
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
151
|
+
appearance: button;
|
|
152
|
+
}
|
|
153
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
154
|
+
height: auto;
|
|
155
|
+
}
|
|
156
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
157
|
+
display: none !important;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
@layer utilities {
|
|
161
|
+
.tw\:flex {
|
|
162
|
+
display: flex;
|
|
163
|
+
}
|
|
164
|
+
.tw\:bg-red-500 {
|
|
165
|
+
background-color: var(--tw-color-red-500);
|
|
166
|
+
}
|
|
167
|
+
.tw\:hover\:bg-red-600 {
|
|
168
|
+
&:hover {
|
|
169
|
+
@media (hover: hover) {
|
|
170
|
+
background-color: var(--tw-color-red-600);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
span.omnikit-price-text {
|
|
176
|
+
font-size: 2rem !important;
|
|
177
|
+
line-height: 1 !important;
|
|
178
|
+
font-weight: 700 !important;
|
|
179
|
+
letter-spacing: -0.025em !important;
|
|
180
|
+
display: inline-block !important;
|
|
181
|
+
}
|
|
182
|
+
.omnikit-price-units {
|
|
183
|
+
font-size: 0.875rem;
|
|
184
|
+
line-height: 1.25rem;
|
|
185
|
+
color: #6b7280;
|
|
186
|
+
font-weight: 400;
|
|
187
|
+
margin-left: 0.25rem;
|
|
188
|
+
}
|
|
189
|
+
.omnikit-feature-value {
|
|
190
|
+
font-weight: 600;
|
|
191
|
+
color: #111827;
|
|
192
|
+
}
|
|
193
|
+
.omnikit-feature-value.unlimited {
|
|
194
|
+
color: #10b981;
|
|
195
|
+
}
|
|
196
|
+
.omnikit-badge {
|
|
197
|
+
display: inline-flex;
|
|
198
|
+
align-items: center;
|
|
199
|
+
border-radius: 9999px;
|
|
200
|
+
padding: 0.25rem 0.75rem;
|
|
201
|
+
font-size: 0.75rem;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
transition: all 150ms;
|
|
204
|
+
}
|
|
205
|
+
.omnikit-badge.popular {
|
|
206
|
+
background-color: #fbbf24;
|
|
207
|
+
color: #78350f;
|
|
208
|
+
}
|
|
209
|
+
.omnikit-modal-overlay {
|
|
210
|
+
position: fixed;
|
|
211
|
+
inset: 0;
|
|
212
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
213
|
+
z-index: 50;
|
|
214
|
+
}
|
|
215
|
+
.omnikit-modal-content {
|
|
216
|
+
position: fixed;
|
|
217
|
+
left: 50%;
|
|
218
|
+
top: 50%;
|
|
219
|
+
transform: translate(-50%, -50%);
|
|
220
|
+
background-color: white;
|
|
221
|
+
padding: 1.5rem;
|
|
222
|
+
border-radius: 0.5rem;
|
|
223
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
|
224
|
+
z-index: 50;
|
|
225
|
+
max-width: 500px;
|
|
226
|
+
width: 90%;
|
|
227
|
+
max-height: 90vh;
|
|
228
|
+
overflow-y: auto;
|
|
229
|
+
}
|
|
230
|
+
.omnikit-input {
|
|
231
|
+
width: 100%;
|
|
232
|
+
padding: 0.5rem;
|
|
233
|
+
border: 1px solid #e5e7eb;
|
|
234
|
+
border-radius: 0.375rem;
|
|
235
|
+
font-size: 0.875rem;
|
|
236
|
+
transition: border-color 150ms;
|
|
237
|
+
}
|
|
238
|
+
.omnikit-input:focus {
|
|
239
|
+
outline: none;
|
|
240
|
+
border-color: #3b82f6;
|
|
241
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
242
|
+
}
|
|
243
|
+
.omnikit-input.error {
|
|
244
|
+
border-color: #ef4444;
|
|
245
|
+
}
|
|
246
|
+
.omnikit-input.error:focus {
|
|
247
|
+
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
|
|
248
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omnikit-js/ui",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
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",
|
|
@@ -14,10 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"src",
|
|
17
|
-
"styles.css"
|
|
17
|
+
"dist/styles.css",
|
|
18
|
+
"dist/styles.prefixed.css"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
|
-
"build": "
|
|
21
|
+
"build:css": "node postcss-build.js",
|
|
22
|
+
"build:css:prefixed": "node postcss-build-prefixed.js",
|
|
23
|
+
"build": "rollup -c && npm run build:css && npm run build:css:prefixed",
|
|
21
24
|
"dev": "rollup -c -w",
|
|
22
25
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
23
26
|
"prepublishOnly": "npm run build"
|
|
@@ -72,10 +75,10 @@
|
|
|
72
75
|
"@rollup/plugin-replace": "^6.0.2",
|
|
73
76
|
"@rollup/plugin-terser": "^0.4.4",
|
|
74
77
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
78
|
+
"@tailwindcss/postcss": "^4.1.11",
|
|
75
79
|
"@types/node": "^20",
|
|
76
80
|
"@types/react": "^18.3.3",
|
|
77
81
|
"@types/react-dom": "^18.3.0",
|
|
78
|
-
"autoprefixer": "^10.4.19",
|
|
79
82
|
"postcss": "^8.4.38",
|
|
80
83
|
"react": "^18.3.1",
|
|
81
84
|
"react-dom": "^18.3.1",
|
|
@@ -361,7 +361,7 @@ export default function BillingClient({ customerData, pricingData, paymentMethod
|
|
|
361
361
|
{paymentMethods?.paymentMethods?.length > 0 ? (
|
|
362
362
|
<div className="space-y-3">
|
|
363
363
|
{paymentMethods.paymentMethods.map((method: any) => (
|
|
364
|
-
<div key={method.id} className="flex items-center justify-between p-4 border rounded-lg">
|
|
364
|
+
<div key={method.id} className="flex items-center justify-between p-4 border border-border rounded-lg">
|
|
365
365
|
<div className="flex items-center gap-4">
|
|
366
366
|
<CardBrandIcon brand={method.brand} className="w-16 h-10" />
|
|
367
367
|
<div className="flex-1">
|
|
@@ -594,7 +594,7 @@ export default function BillingClient({ customerData, pricingData, paymentMethod
|
|
|
594
594
|
<div className="space-y-4">
|
|
595
595
|
{invoices.length > 0 ? (
|
|
596
596
|
invoices.map((invoice: any) => (
|
|
597
|
-
<div key={invoice.id} className="flex items-center justify-between p-4 border rounded-lg">
|
|
597
|
+
<div key={invoice.id} className="flex items-center justify-between p-4 border border-border rounded-lg">
|
|
598
598
|
<div className="flex items-center space-x-4">
|
|
599
599
|
<FileText className="h-8 w-8 text-muted-foreground" />
|
|
600
600
|
<div>
|
|
@@ -136,7 +136,7 @@ export default function SubscriptionConfirmModal({
|
|
|
136
136
|
<ul className="space-y-1">
|
|
137
137
|
{plan.features?.map((feature: any) => (
|
|
138
138
|
<li key={feature.id} className="flex items-start text-sm">
|
|
139
|
-
<Check className="h-4 w-4 mr-2 text-primary mt-0.5
|
|
139
|
+
<Check className="h-4 w-4 mr-2 text-primary mt-0.5 shrink-0" />
|
|
140
140
|
<TooltipProvider>
|
|
141
141
|
<Tooltip>
|
|
142
142
|
<TooltipTrigger asChild>
|
|
@@ -8,7 +8,7 @@ const alertVariants = cva(
|
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-background text-foreground",
|
|
11
|
+
default: "bg-background text-foreground border-border",
|
|
12
12
|
destructive:
|
|
13
13
|
"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive",
|
|
14
14
|
},
|
|
@@ -14,7 +14,7 @@ const buttonVariants = cva(
|
|
|
14
14
|
destructive:
|
|
15
15
|
"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
16
16
|
outline:
|
|
17
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
17
|
+
"border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
18
18
|
secondary:
|
|
19
19
|
"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
20
20
|
ghost:
|
|
@@ -80,7 +80,7 @@ export function CardBrandIcon({ brand, className = "w-8 h-5" }: CardBrandIconPro
|
|
|
80
80
|
|
|
81
81
|
default:
|
|
82
82
|
return (
|
|
83
|
-
<div className={`${className} bg-slate-200 dark:bg-slate-800 rounded flex items-center justify-center`}>
|
|
83
|
+
<div className={`${className} bg-slate-200 dark:bg-slate-800 rounded-sm flex items-center justify-center`}>
|
|
84
84
|
<span className="text-xs font-bold uppercase">{brandLower || 'card'}</span>
|
|
85
85
|
</div>
|
|
86
86
|
);
|
|
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
7
7
|
<div
|
|
8
8
|
data-slot="card"
|
|
9
9
|
className={cn(
|
|
10
|
-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-
|
|
10
|
+
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border border-border py-6 shadow-xs",
|
|
11
11
|
className
|
|
12
12
|
)}
|
|
13
13
|
{...props}
|
|
@@ -38,13 +38,13 @@ const DialogContent = React.forwardRef<
|
|
|
38
38
|
<DialogPrimitive.Content
|
|
39
39
|
ref={ref}
|
|
40
40
|
className={cn(
|
|
41
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
|
|
41
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg",
|
|
42
42
|
className
|
|
43
43
|
)}
|
|
44
44
|
{...props}
|
|
45
45
|
>
|
|
46
46
|
{children}
|
|
47
|
-
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-
|
|
47
|
+
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
|
|
48
48
|
<X className="h-4 w-4" />
|
|
49
49
|
<span className="sr-only">Close</span>
|
|
50
50
|
</DialogPrimitive.Close>
|
|
@@ -42,7 +42,7 @@ function DropdownMenuContent({
|
|
|
42
42
|
data-slot="dropdown-menu-content"
|
|
43
43
|
sideOffset={sideOffset}
|
|
44
44
|
className={cn(
|
|
45
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
|
|
45
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border p-1 shadow-md",
|
|
46
46
|
className
|
|
47
47
|
)}
|
|
48
48
|
{...props}
|
|
@@ -74,7 +74,7 @@ function DropdownMenuItem({
|
|
|
74
74
|
data-inset={inset}
|
|
75
75
|
data-variant={variant}
|
|
76
76
|
className={cn(
|
|
77
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-
|
|
77
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
78
78
|
className
|
|
79
79
|
)}
|
|
80
80
|
{...props}
|
|
@@ -92,7 +92,7 @@ function DropdownMenuCheckboxItem({
|
|
|
92
92
|
<DropdownMenuPrimitive.CheckboxItem
|
|
93
93
|
data-slot="dropdown-menu-checkbox-item"
|
|
94
94
|
className={cn(
|
|
95
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-
|
|
95
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
96
96
|
className
|
|
97
97
|
)}
|
|
98
98
|
checked={checked}
|
|
@@ -128,7 +128,7 @@ function DropdownMenuRadioItem({
|
|
|
128
128
|
<DropdownMenuPrimitive.RadioItem
|
|
129
129
|
data-slot="dropdown-menu-radio-item"
|
|
130
130
|
className={cn(
|
|
131
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-
|
|
131
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
132
132
|
className
|
|
133
133
|
)}
|
|
134
134
|
{...props}
|
|
@@ -211,7 +211,7 @@ function DropdownMenuSubTrigger({
|
|
|
211
211
|
data-slot="dropdown-menu-sub-trigger"
|
|
212
212
|
data-inset={inset}
|
|
213
213
|
className={cn(
|
|
214
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-
|
|
214
|
+
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",
|
|
215
215
|
className
|
|
216
216
|
)}
|
|
217
217
|
{...props}
|
|
@@ -230,7 +230,7 @@ function DropdownMenuSubContent({
|
|
|
230
230
|
<DropdownMenuPrimitive.SubContent
|
|
231
231
|
data-slot="dropdown-menu-sub-content"
|
|
232
232
|
className={cn(
|
|
233
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
233
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border border-border p-1 shadow-lg",
|
|
234
234
|
className
|
|
235
235
|
)}
|
|
236
236
|
{...props}
|
|
@@ -91,7 +91,7 @@ function NavigationMenuContent({
|
|
|
91
91
|
data-slot="navigation-menu-content"
|
|
92
92
|
className={cn(
|
|
93
93
|
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full p-2 pr-2.5 md:absolute md:w-auto",
|
|
94
|
-
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
94
|
+
"group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border-border group-data-[viewport=false]/navigation-menu:shadow-sm group-data-[viewport=false]/navigation-menu:duration-200 **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none",
|
|
95
95
|
className
|
|
96
96
|
)}
|
|
97
97
|
{...props}
|
|
@@ -112,7 +112,7 @@ function NavigationMenuViewport({
|
|
|
112
112
|
<NavigationMenuPrimitive.Viewport
|
|
113
113
|
data-slot="navigation-menu-viewport"
|
|
114
114
|
className={cn(
|
|
115
|
-
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
115
|
+
"origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border-border shadow-sm md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
116
116
|
className
|
|
117
117
|
)}
|
|
118
118
|
{...props}
|
|
@@ -129,7 +129,7 @@ function NavigationMenuLink({
|
|
|
129
129
|
<NavigationMenuPrimitive.Link
|
|
130
130
|
data-slot="navigation-menu-link"
|
|
131
131
|
className={cn(
|
|
132
|
-
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-
|
|
132
|
+
"data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-xs p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
|
|
133
133
|
className
|
|
134
134
|
)}
|
|
135
135
|
{...props}
|
|
@@ -150,7 +150,7 @@ function NavigationMenuIndicator({
|
|
|
150
150
|
)}
|
|
151
151
|
{...props}
|
|
152
152
|
>
|
|
153
|
-
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-
|
|
153
|
+
<div className="bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-xs shadow-sm" />
|
|
154
154
|
</NavigationMenuPrimitive.Indicator>
|
|
155
155
|
)
|
|
156
156
|
}
|
|
@@ -61,7 +61,7 @@ function SelectContent({
|
|
|
61
61
|
<SelectPrimitive.Content
|
|
62
62
|
data-slot="select-content"
|
|
63
63
|
className={cn(
|
|
64
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
64
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border shadow-md",
|
|
65
65
|
position === "popper" &&
|
|
66
66
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
67
67
|
className
|
|
@@ -107,7 +107,7 @@ function SelectItem({
|
|
|
107
107
|
<SelectPrimitive.Item
|
|
108
108
|
data-slot="select-item"
|
|
109
109
|
className={cn(
|
|
110
|
-
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-
|
|
110
|
+
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-xs py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
|
|
111
111
|
className
|
|
112
112
|
)}
|
|
113
113
|
{...props}
|
|
@@ -42,7 +42,7 @@ function TabsTrigger({
|
|
|
42
42
|
<TabsPrimitive.Trigger
|
|
43
43
|
data-slot="tabs-trigger"
|
|
44
44
|
className={cn(
|
|
45
|
-
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-
|
|
45
|
+
"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-xs [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
46
46
|
className
|
|
47
47
|
)}
|
|
48
48
|
{...props}
|
|
@@ -57,7 +57,7 @@ function TabsContent({
|
|
|
57
57
|
return (
|
|
58
58
|
<TabsPrimitive.Content
|
|
59
59
|
data-slot="tabs-content"
|
|
60
|
-
className={cn("flex-1 outline-
|
|
60
|
+
className={cn("flex-1 outline-hidden", className)}
|
|
61
61
|
{...props}
|
|
62
62
|
/>
|
|
63
63
|
)
|
|
@@ -19,7 +19,7 @@ const TooltipContent = React.forwardRef<
|
|
|
19
19
|
ref={ref}
|
|
20
20
|
sideOffset={sideOffset}
|
|
21
21
|
className={cn(
|
|
22
|
-
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
22
|
+
"z-50 overflow-hidden rounded-md border border-border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
package/src/styles/globals.css
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@import "./globals.css";
|
|
2
|
+
|
|
3
|
+
/* Essential component-specific styles only */
|
|
4
|
+
|
|
5
|
+
/* Pricing text styles */
|
|
6
|
+
span.omnikit-price-text {
|
|
7
|
+
font-size: 2rem !important;
|
|
8
|
+
line-height: 1 !important;
|
|
9
|
+
font-weight: 700 !important;
|
|
10
|
+
letter-spacing: -0.025em !important;
|
|
11
|
+
display: inline-block !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.omnikit-price-units {
|
|
15
|
+
font-size: 0.875rem;
|
|
16
|
+
line-height: 1.25rem;
|
|
17
|
+
color: #6b7280;
|
|
18
|
+
font-weight: 400;
|
|
19
|
+
margin-left: 0.25rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* Feature value styles */
|
|
23
|
+
.omnikit-feature-value {
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
color: #111827;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.omnikit-feature-value.unlimited {
|
|
29
|
+
color: #10b981;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Badge styles */
|
|
33
|
+
.omnikit-badge {
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
border-radius: 9999px;
|
|
37
|
+
padding: 0.25rem 0.75rem;
|
|
38
|
+
font-size: 0.75rem;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
transition: all 150ms;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.omnikit-badge.popular {
|
|
44
|
+
background-color: #fbbf24;
|
|
45
|
+
color: #78350f;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Modal overlay */
|
|
49
|
+
.omnikit-modal-overlay {
|
|
50
|
+
position: fixed;
|
|
51
|
+
inset: 0;
|
|
52
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
53
|
+
z-index: 50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Modal content */
|
|
57
|
+
.omnikit-modal-content {
|
|
58
|
+
position: fixed;
|
|
59
|
+
left: 50%;
|
|
60
|
+
top: 50%;
|
|
61
|
+
transform: translate(-50%, -50%);
|
|
62
|
+
background-color: white;
|
|
63
|
+
padding: 1.5rem;
|
|
64
|
+
border-radius: 0.5rem;
|
|
65
|
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
|
66
|
+
z-index: 50;
|
|
67
|
+
max-width: 500px;
|
|
68
|
+
width: 90%;
|
|
69
|
+
max-height: 90vh;
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Form input styles */
|
|
74
|
+
.omnikit-input {
|
|
75
|
+
width: 100%;
|
|
76
|
+
padding: 0.5rem;
|
|
77
|
+
border: 1px solid #e5e7eb;
|
|
78
|
+
border-radius: 0.375rem;
|
|
79
|
+
font-size: 0.875rem;
|
|
80
|
+
transition: border-color 150ms;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.omnikit-input:focus {
|
|
84
|
+
outline: none;
|
|
85
|
+
border-color: #3b82f6;
|
|
86
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.omnikit-input.error {
|
|
90
|
+
border-color: #ef4444;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.omnikit-input.error:focus {
|
|
94
|
+
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
|
|
95
|
+
}
|