@aphexcms/ui 0.3.2 → 0.3.3
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { type VariantProps, tv } from 'tailwind-variants';
|
|
5
5
|
|
|
6
6
|
export const buttonVariants = tv({
|
|
7
|
-
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
10
|
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
@@ -18,7 +18,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
18
18
|
'icon-sm': string;
|
|
19
19
|
'icon-lg': string;
|
|
20
20
|
};
|
|
21
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
21
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
22
22
|
variant: {
|
|
23
23
|
default: string;
|
|
24
24
|
destructive: string;
|
|
@@ -52,7 +52,7 @@ export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
|
52
52
|
'icon-sm': string;
|
|
53
53
|
'icon-lg': string;
|
|
54
54
|
};
|
|
55
|
-
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
55
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
56
56
|
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
57
57
|
export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
|
|
58
58
|
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
package/package.json
CHANGED
package/src/app.css
CHANGED
|
@@ -47,50 +47,106 @@
|
|
|
47
47
|
--shadow-xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.1), 0px 8px 10px -2px hsl(0 0% 0% / 0.1);
|
|
48
48
|
--shadow-2xl: 0px 4px 8px -1px hsl(0 0% 0% / 0.25);
|
|
49
49
|
--tracking-normal: 0em;
|
|
50
|
+
/* Thinner hairline variant for large dividers — dark mode overrides this */
|
|
51
|
+
--rule: oklch(0.9 0.005 95);
|
|
50
52
|
}
|
|
51
53
|
|
|
52
54
|
.dark {
|
|
53
|
-
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
--
|
|
58
|
-
--
|
|
59
|
-
--
|
|
60
|
-
|
|
61
|
-
--
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
--
|
|
70
|
-
--
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
--
|
|
82
|
-
--
|
|
83
|
-
|
|
84
|
-
|
|
55
|
+
/* ——— Aphex "Night" palette, lifted one notch for a brighter admin ——— */
|
|
56
|
+
--night-0: oklch(0.11 0.028 256); /* deep horizon (was 0.08) */
|
|
57
|
+
--night-1: oklch(0.16 0.032 258); /* sky mid — main bg (was 0.13) */
|
|
58
|
+
--night-2: oklch(0.22 0.04 260); /* sky top — cards/panes (was 0.20) */
|
|
59
|
+
--night-3: oklch(0.29 0.05 262);
|
|
60
|
+
--form: oklch(0.1 0.012 260);
|
|
61
|
+
--form-edge: oklch(0.17 0.025 260);
|
|
62
|
+
|
|
63
|
+
--bone: oklch(0.95 0.015 82);
|
|
64
|
+
--bone-2: oklch(0.88 0.018 82);
|
|
65
|
+
--bone-3: oklch(0.72 0.02 82);
|
|
66
|
+
--bone-4: oklch(0.55 0.02 82);
|
|
67
|
+
|
|
68
|
+
/* Match light-mode --primary so the brand orange is identical across themes */
|
|
69
|
+
--brand: oklch(0.62 0.14 39.04);
|
|
70
|
+
--brand-2: oklch(0.7 0.14 41);
|
|
71
|
+
--brand-deep: oklch(0.5 0.15 30);
|
|
72
|
+
--glow-strength: 0.32;
|
|
73
|
+
|
|
74
|
+
/* Two hairline levels:
|
|
75
|
+
--rule stays whisper-thin (used on large structural dividers like the doc editor)
|
|
76
|
+
--rule-2 is stronger — that's what --border maps to so individual components
|
|
77
|
+
(buttons, inputs, badges, cards) get a visible edge */
|
|
78
|
+
--rule: color-mix(in oklab, var(--bone) 9%, transparent);
|
|
79
|
+
--rule-2: color-mix(in oklab, var(--bone) 22%, transparent);
|
|
80
|
+
|
|
81
|
+
/* ——— Shadcn-mapped tokens ——— */
|
|
82
|
+
/* Solid blue background — more visibly blue than the near-black night-0 */
|
|
83
|
+
--background: var(--night-1);
|
|
84
|
+
--foreground: var(--bone);
|
|
85
|
+
|
|
86
|
+
/* Cards — one step lighter than bg so they read as lifted panes */
|
|
87
|
+
--card: var(--night-2);
|
|
88
|
+
--card-foreground: var(--bone);
|
|
89
|
+
|
|
90
|
+
--popover: var(--night-2);
|
|
91
|
+
--popover-foreground: var(--bone);
|
|
92
|
+
|
|
93
|
+
/* BRAND primary — burnt orange, used sparingly */
|
|
94
|
+
--primary: var(--brand);
|
|
95
|
+
--primary-foreground: var(--bone);
|
|
96
|
+
|
|
97
|
+
--secondary: var(--night-2);
|
|
98
|
+
--secondary-foreground: var(--bone-2);
|
|
99
|
+
|
|
100
|
+
--muted: var(--night-2);
|
|
101
|
+
--muted-foreground: var(--bone-3);
|
|
102
|
+
|
|
103
|
+
/* Accent = SUBTLE hover surface (NOT brand) — a whisper of bone */
|
|
104
|
+
--accent: color-mix(in oklab, var(--bone) 6%, transparent);
|
|
105
|
+
--accent-foreground: var(--bone);
|
|
106
|
+
|
|
107
|
+
--destructive: oklch(0.58 0.2 27);
|
|
108
|
+
--destructive-foreground: var(--bone);
|
|
109
|
+
|
|
110
|
+
/* --border → stronger rule (components need visible edges); doc editor can opt into
|
|
111
|
+
bg-rule / border-rule on its large panels if it wants the whisper-thin variant */
|
|
112
|
+
--border: var(--rule-2);
|
|
113
|
+
--input: var(--rule-2);
|
|
114
|
+
--ring: var(--brand);
|
|
115
|
+
|
|
116
|
+
--chart-1: var(--brand);
|
|
117
|
+
--chart-2: var(--brand-2);
|
|
118
|
+
--chart-3: var(--brand-deep);
|
|
119
|
+
--chart-4: var(--night-3);
|
|
120
|
+
--chart-5: var(--bone-3);
|
|
121
|
+
|
|
122
|
+
/* Sidebar — same hue/chroma as --background (night-1, 0.16 0.032 258), just a touch darker */
|
|
123
|
+
--sidebar: oklch(0.15 0.032 258);
|
|
124
|
+
--sidebar-foreground: var(--bone-2);
|
|
125
|
+
--sidebar-primary: var(--brand);
|
|
126
|
+
--sidebar-primary-foreground: var(--bone);
|
|
127
|
+
--sidebar-accent: color-mix(in oklab, var(--bone) 6%, transparent);
|
|
128
|
+
--sidebar-accent-foreground: var(--bone);
|
|
129
|
+
--sidebar-border: var(--rule);
|
|
130
|
+
--sidebar-ring: var(--brand);
|
|
131
|
+
|
|
85
132
|
--radius: 0.5rem;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
--shadow-
|
|
89
|
-
--shadow:
|
|
90
|
-
--shadow-
|
|
91
|
-
--shadow
|
|
92
|
-
--shadow-
|
|
93
|
-
--shadow-
|
|
133
|
+
|
|
134
|
+
/* Shadows tuned to the cool blue-black bg — deeper saturation, longer falloff */
|
|
135
|
+
--shadow-2xs: 0 1px 2px -1px oklch(0 0 0 / 0.5);
|
|
136
|
+
--shadow-xs: 0 2px 6px -2px oklch(0 0 0 / 0.55);
|
|
137
|
+
--shadow-sm: 0 4px 14px -4px oklch(0 0 0 / 0.55), 0 1px 2px -1px oklch(0 0 0 / 0.4);
|
|
138
|
+
--shadow: 0 8px 24px -8px oklch(0 0 0 / 0.6), 0 2px 4px -2px oklch(0 0 0 / 0.45);
|
|
139
|
+
--shadow-md: 0 12px 32px -10px oklch(0 0 0 / 0.6), 0 4px 8px -4px oklch(0 0 0 / 0.5);
|
|
140
|
+
--shadow-lg: 0 20px 48px -14px oklch(0 0 0 / 0.65), 0 8px 16px -8px oklch(0 0 0 / 0.5);
|
|
141
|
+
--shadow-xl: 0 32px 64px -20px oklch(0 0 0 / 0.7), 0 12px 24px -12px oklch(0 0 0 / 0.55);
|
|
142
|
+
--shadow-2xl: 0 48px 96px -28px oklch(0 0 0 / 0.75);
|
|
143
|
+
|
|
144
|
+
/* Brand glow — use on buttons / focused inputs to echo the landing's window-glow.
|
|
145
|
+
Glow strength scales ring + drop-shadow opacity together. */
|
|
146
|
+
--glow-brand:
|
|
147
|
+
0 0 0 1px color-mix(in oklab, var(--brand) calc(var(--glow-strength) * 75%), transparent),
|
|
148
|
+
0 16px 40px -12px
|
|
149
|
+
color-mix(in oklab, var(--brand) calc(var(--glow-strength) * 94%), transparent);
|
|
94
150
|
}
|
|
95
151
|
|
|
96
152
|
@theme inline {
|
|
@@ -127,6 +183,11 @@
|
|
|
127
183
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
128
184
|
--color-destructive-foreground: var(--destructive-foreground);
|
|
129
185
|
|
|
186
|
+
/* Thinner hairline — opt-in via border-rule / bg-rule / text-rule utilities.
|
|
187
|
+
Use on large structural dividers (doc editor panels, section separators) where
|
|
188
|
+
the component --border (22%) reads too loud. */
|
|
189
|
+
--color-rule: var(--rule);
|
|
190
|
+
|
|
130
191
|
--font-sans: var(--font-sans);
|
|
131
192
|
--font-mono: var(--font-mono);
|
|
132
193
|
--font-serif: var(--font-serif);
|
|
@@ -153,4 +214,48 @@
|
|
|
153
214
|
body {
|
|
154
215
|
@apply bg-background text-foreground;
|
|
155
216
|
}
|
|
217
|
+
|
|
218
|
+
/* Dark-mode text reads heavier than light due to halation on dark bgs.
|
|
219
|
+
Antialiased smoothing + suppressing the browser's auto-bolding brings
|
|
220
|
+
dark-mode text one visual step lighter, matching light mode. */
|
|
221
|
+
.dark {
|
|
222
|
+
-webkit-font-smoothing: antialiased;
|
|
223
|
+
-moz-osx-font-smoothing: grayscale;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Selection in burnt orange — the landing's signature */
|
|
227
|
+
.dark ::selection {
|
|
228
|
+
background: var(--brand);
|
|
229
|
+
color: var(--night-0);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/* Popovers/dialogs get a backdrop blur when translucent so content under doesn't fight text */
|
|
233
|
+
.dark [data-slot='popover-content'],
|
|
234
|
+
.dark [data-slot='dropdown-menu-content'],
|
|
235
|
+
.dark [data-slot='select-content'],
|
|
236
|
+
.dark [data-slot='command'],
|
|
237
|
+
.dark [data-radix-popper-content-wrapper] > * {
|
|
238
|
+
backdrop-filter: blur(12px) saturate(1.2);
|
|
239
|
+
-webkit-backdrop-filter: blur(12px) saturate(1.2);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Primary buttons carry the landing's window-glow: accent ring + drop-shadow bloom */
|
|
243
|
+
.dark button[data-slot='button'].bg-primary,
|
|
244
|
+
.dark [data-slot='button'].bg-primary {
|
|
245
|
+
box-shadow: var(--glow-brand);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* Subtle top-edge highlight on cards so they read as "lit from above" on the gradient.
|
|
249
|
+
This is the "floating" cue — a 1px inset bone highlight at the top. */
|
|
250
|
+
.dark [data-slot='card'] {
|
|
251
|
+
box-shadow:
|
|
252
|
+
inset 0 1px 0 0 color-mix(in oklab, var(--bone) 6%, transparent),
|
|
253
|
+
var(--shadow-sm);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
/* Shadcn's sidebar-container applies border-r / border-l with the default --border,
|
|
257
|
+
which resolves to rule-2 (thicker). Force the thin --rule for this structural divider. */
|
|
258
|
+
.dark [data-slot='sidebar-container'] {
|
|
259
|
+
border-color: var(--rule);
|
|
260
|
+
}
|
|
156
261
|
}
|