@aphexcms/ui 0.8.2 → 0.8.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.
- package/dist/components/ui/button-group/button-group-separator.svelte +23 -0
- package/dist/components/ui/button-group/button-group-separator.svelte.d.ts +13 -0
- package/dist/components/ui/button-group/button-group-text.svelte +31 -0
- package/dist/components/ui/button-group/button-group-text.svelte.d.ts +11 -0
- package/dist/components/ui/button-group/button-group.svelte +46 -0
- package/dist/components/ui/button-group/button-group.svelte.d.ts +26 -0
- package/dist/components/ui/button-group/index.d.ts +4 -0
- package/dist/components/ui/button-group/index.js +6 -0
- package/dist/components/ui/sidebar/context.svelte.js +9 -0
- package/dist/components/ui/sidebar/sidebar-input.svelte.d.ts +1 -1
- package/package.json +6 -1
- package/src/app.css +112 -186
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { ComponentProps } from 'svelte';
|
|
4
|
+
import { Separator } from '../separator/index.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
orientation = 'vertical',
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof Separator> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Separator
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="button-group-separator"
|
|
17
|
+
{orientation}
|
|
18
|
+
class={cn(
|
|
19
|
+
'bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const ButtonGroupSeparator: import("svelte").Component<Omit<{
|
|
2
|
+
orientation?: import("bits-ui").Orientation;
|
|
3
|
+
decorative?: boolean;
|
|
4
|
+
}, "child" | "children"> & {
|
|
5
|
+
child?: import("svelte").Snippet<[{
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}]> | undefined;
|
|
8
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
9
|
+
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
10
|
+
ref?: HTMLElement | null | undefined;
|
|
11
|
+
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
12
|
+
type ButtonGroupSeparator = ReturnType<typeof ButtonGroupSeparator>;
|
|
13
|
+
export default ButtonGroupSeparator;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
child,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
|
+
child?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
13
|
+
} = $props();
|
|
14
|
+
|
|
15
|
+
const mergedProps = $derived({
|
|
16
|
+
...restProps,
|
|
17
|
+
class: cn(
|
|
18
|
+
"bg-muted gap-2 rounded-lg border px-2.5 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
'data-slot': 'button-group-text'
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
{#if child}
|
|
26
|
+
{@render child({ props: mergedProps })}
|
|
27
|
+
{:else}
|
|
28
|
+
<div bind:this={ref} {...mergedProps}>
|
|
29
|
+
{@render mergedProps.children?.()}
|
|
30
|
+
</div>
|
|
31
|
+
{/if}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
5
|
+
child?: Snippet<[{
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}]>;
|
|
8
|
+
};
|
|
9
|
+
declare const ButtonGroupText: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
|
+
type ButtonGroupText = ReturnType<typeof ButtonGroupText>;
|
|
11
|
+
export default ButtonGroupText;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
export const buttonGroupVariants = tv({
|
|
5
|
+
base: "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
6
|
+
variants: {
|
|
7
|
+
orientation: {
|
|
8
|
+
horizontal:
|
|
9
|
+
'[&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]]:rounded-r-none [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0',
|
|
10
|
+
vertical:
|
|
11
|
+
'[&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! flex-col [&>[data-slot]]:rounded-b-none [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
orientation: 'horizontal'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>['orientation'];
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
24
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
ref = $bindable(null),
|
|
28
|
+
class: className,
|
|
29
|
+
children,
|
|
30
|
+
orientation = 'horizontal',
|
|
31
|
+
...restProps
|
|
32
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
33
|
+
orientation?: ButtonGroupOrientation;
|
|
34
|
+
} = $props();
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<div
|
|
38
|
+
bind:this={ref}
|
|
39
|
+
role="group"
|
|
40
|
+
data-slot="button-group"
|
|
41
|
+
data-orientation={orientation}
|
|
42
|
+
class={cn(buttonGroupVariants({ orientation }), className)}
|
|
43
|
+
{...restProps}
|
|
44
|
+
>
|
|
45
|
+
{@render children?.()}
|
|
46
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const buttonGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
orientation: {
|
|
4
|
+
horizontal: string;
|
|
5
|
+
vertical: string;
|
|
6
|
+
};
|
|
7
|
+
}, undefined, "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
|
+
orientation: {
|
|
9
|
+
horizontal: string;
|
|
10
|
+
vertical: string;
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: string;
|
|
15
|
+
vertical: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg flex w-fit items-stretch [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", unknown, unknown, undefined>>;
|
|
18
|
+
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>['orientation'];
|
|
19
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
20
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
21
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
22
|
+
orientation?: ButtonGroupOrientation;
|
|
23
|
+
};
|
|
24
|
+
declare const ButtonGroup: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
25
|
+
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
26
|
+
export default ButtonGroup;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import Root, { buttonGroupVariants, type ButtonGroupOrientation } from './button-group.svelte';
|
|
2
|
+
import Text from './button-group-text.svelte';
|
|
3
|
+
import Separator from './button-group-separator.svelte';
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants, type ButtonGroupOrientation, Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Root, { buttonGroupVariants } from './button-group.svelte';
|
|
2
|
+
import Text from './button-group-text.svelte';
|
|
3
|
+
import Separator from './button-group-separator.svelte';
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants,
|
|
5
|
+
//
|
|
6
|
+
Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator };
|
|
@@ -21,6 +21,15 @@ class SidebarState {
|
|
|
21
21
|
// Event handler to apply to the `<svelte:window>`
|
|
22
22
|
handleShortcutKeydown = (e) => {
|
|
23
23
|
if (e.key === SIDEBAR_KEYBOARD_SHORTCUT && (e.metaKey || e.ctrlKey)) {
|
|
24
|
+
// Don't steal the shortcut while the user is typing in an editable field —
|
|
25
|
+
// Cmd/Ctrl+B is bold in the rich-text editor, and this global toggle would
|
|
26
|
+
// otherwise fire alongside it. Bail for inputs, textareas, and any
|
|
27
|
+
// contenteditable (ProseMirror) surface.
|
|
28
|
+
const target = e.target;
|
|
29
|
+
if (target instanceof HTMLElement &&
|
|
30
|
+
(target.isContentEditable || target.closest('input, textarea, [contenteditable="true"]'))) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
24
33
|
e.preventDefault();
|
|
25
34
|
this.toggle();
|
|
26
35
|
}
|
|
@@ -2,7 +2,7 @@ declare const SidebarInput: import("svelte").Component<(Omit<import("svelte/elem
|
|
|
2
2
|
type: "file";
|
|
3
3
|
files?: FileList;
|
|
4
4
|
} | {
|
|
5
|
-
type?: "number" | "hidden" | "color" | "
|
|
5
|
+
type?: "number" | "hidden" | "color" | "button" | "search" | "time" | "image" | "text" | "submit" | "reset" | (string & {}) | "checkbox" | "radio" | "tel" | "url" | "email" | "date" | "datetime-local" | "month" | "password" | "range" | "week";
|
|
6
6
|
files?: undefined;
|
|
7
7
|
})) & {
|
|
8
8
|
ref?: HTMLElement | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aphexcms/ui",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Shared UI components for Aphex CMS (shadcn-svelte)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
"svelte": "./dist/components/ui/button/index.js",
|
|
46
46
|
"default": "./dist/components/ui/button/index.js"
|
|
47
47
|
},
|
|
48
|
+
"./shadcn/button-group": {
|
|
49
|
+
"types": "./dist/components/ui/button-group/index.d.ts",
|
|
50
|
+
"svelte": "./dist/components/ui/button-group/index.js",
|
|
51
|
+
"default": "./dist/components/ui/button-group/index.js"
|
|
52
|
+
},
|
|
48
53
|
"./shadcn/calendar": {
|
|
49
54
|
"types": "./dist/components/ui/calendar/index.d.ts",
|
|
50
55
|
"svelte": "./dist/components/ui/calendar/index.js",
|
package/src/app.css
CHANGED
|
@@ -10,150 +10,125 @@
|
|
|
10
10
|
@custom-variant data-horizontal (&[data-orientation='horizontal']);
|
|
11
11
|
@custom-variant data-vertical (&[data-orientation='vertical']);
|
|
12
12
|
|
|
13
|
+
@import 'tailwindcss';
|
|
14
|
+
|
|
15
|
+
@custom-variant dark (&:is(.dark *));
|
|
16
|
+
|
|
13
17
|
:root {
|
|
14
|
-
--background: oklch(0.
|
|
15
|
-
--foreground: oklch(0.
|
|
16
|
-
--card: oklch(0
|
|
17
|
-
--card-foreground: oklch(0.
|
|
18
|
+
--background: oklch(0.9846 0.0017 247.8389);
|
|
19
|
+
--foreground: oklch(0.2809 0 0);
|
|
20
|
+
--card: oklch(1 0 0);
|
|
21
|
+
--card-foreground: oklch(0.2809 0 0);
|
|
18
22
|
--popover: oklch(1 0 0);
|
|
19
|
-
--popover-foreground: oklch(0.
|
|
20
|
-
--primary: oklch(0.
|
|
23
|
+
--popover-foreground: oklch(0.2809 0 0);
|
|
24
|
+
--primary: oklch(0.6802 0.1902 32.0008);
|
|
21
25
|
--primary-foreground: oklch(1 0 0);
|
|
22
|
-
--secondary: oklch(0.
|
|
23
|
-
--secondary-foreground: oklch(0.
|
|
24
|
-
--muted: oklch(0.
|
|
25
|
-
--muted-foreground: oklch(0.
|
|
26
|
-
--accent: oklch(0.
|
|
27
|
-
--accent-foreground: oklch(0.
|
|
28
|
-
--destructive: oklch(0.
|
|
29
|
-
--border: oklch(0.88 0.01 97.36);
|
|
30
|
-
--input: oklch(0.76 0.02 98.35);
|
|
31
|
-
/* Brand orange — was an unthemed blue default; dark mode already uses the brand. */
|
|
32
|
-
--ring: var(--primary);
|
|
33
|
-
--chart-1: oklch(0.56 0.13 43);
|
|
34
|
-
--chart-2: oklch(0.69 0.16 290.41);
|
|
35
|
-
--chart-3: oklch(0.88 0.03 93.13);
|
|
36
|
-
--chart-4: oklch(0.88 0.04 298.18);
|
|
37
|
-
--chart-5: oklch(0.56 0.13 42.06);
|
|
38
|
-
--sidebar: oklch(0.97 0.01 98.88);
|
|
39
|
-
--sidebar-foreground: oklch(0.36 0.01 106.65);
|
|
40
|
-
--sidebar-primary: oklch(0.62 0.14 39.04);
|
|
41
|
-
--sidebar-primary-foreground: oklch(0.99 0 0);
|
|
42
|
-
--sidebar-accent: oklch(0.92 0.01 92.99);
|
|
43
|
-
--sidebar-accent-foreground: oklch(0.33 0 0);
|
|
44
|
-
--sidebar-border: oklch(0.94 0 0);
|
|
45
|
-
--sidebar-ring: oklch(0.77 0 0);
|
|
26
|
+
--secondary: oklch(0.9394 0.0046 258.3251);
|
|
27
|
+
--secondary-foreground: oklch(0.4489 0.02 251.0512);
|
|
28
|
+
--muted: oklch(0.9697 0.0017 247.8393);
|
|
29
|
+
--muted-foreground: oklch(0.4999 0.0154 251.6849);
|
|
30
|
+
--accent: oklch(0.9204 0.0203 238.6791);
|
|
31
|
+
--accent-foreground: oklch(0.3808 0.1001 259.7551);
|
|
32
|
+
--destructive: oklch(0.6509 0.2199 25.0358);
|
|
46
33
|
--destructive-foreground: oklch(1 0 0);
|
|
47
|
-
--
|
|
48
|
-
--
|
|
49
|
-
--
|
|
50
|
-
--
|
|
51
|
-
--
|
|
52
|
-
--
|
|
53
|
-
--
|
|
54
|
-
--
|
|
55
|
-
--
|
|
34
|
+
--border: oklch(0.9209 0.0035 247.8607);
|
|
35
|
+
--input: oklch(0.9659 0.0025 228.7842);
|
|
36
|
+
--ring: oklch(0.6802 0.1902 32.0008);
|
|
37
|
+
--chart-1: oklch(0.7011 0.1193 239.6974);
|
|
38
|
+
--chart-2: oklch(0.7449 0.1558 32.2982);
|
|
39
|
+
--chart-3: oklch(0.765 0.177 163.223);
|
|
40
|
+
--chart-4: oklch(0.879 0.169 91.605);
|
|
41
|
+
--chart-5: oklch(0.785 0.115 274.713);
|
|
42
|
+
--sidebar: oklch(0.9757 0.0017 247.8391);
|
|
43
|
+
--sidebar-foreground: oklch(0.3211 0 0);
|
|
44
|
+
--sidebar-primary: oklch(0.6802 0.1902 32.0008);
|
|
45
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
46
|
+
--sidebar-accent: oklch(0.9204 0.0203 238.6791);
|
|
47
|
+
--sidebar-accent-foreground: oklch(0.3808 0.1001 259.7551);
|
|
48
|
+
--sidebar-border: oklch(0.9106 0.006 239.8262);
|
|
49
|
+
--sidebar-ring: oklch(0.6802 0.1902 32.0008);
|
|
50
|
+
--font-sans: Inter, sans-serif;
|
|
51
|
+
--font-serif: Source Serif 4, serif;
|
|
52
|
+
--font-mono: JetBrains Mono, monospace;
|
|
53
|
+
--radius: 0.75rem;
|
|
54
|
+
--shadow-x: 0px;
|
|
55
|
+
--shadow-y: 1px;
|
|
56
|
+
--shadow-blur: 3px;
|
|
57
|
+
--shadow-spread: 0px;
|
|
58
|
+
--shadow-opacity: 0.1;
|
|
59
|
+
--shadow-color: #29303d;
|
|
60
|
+
--shadow-2xs: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.05);
|
|
61
|
+
--shadow-xs: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.05);
|
|
62
|
+
--shadow-sm:
|
|
63
|
+
0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.1);
|
|
64
|
+
--shadow:
|
|
65
|
+
0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 1px 2px -1px hsl(219 19.6078% 20% / 0.1);
|
|
66
|
+
--shadow-md:
|
|
67
|
+
0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 2px 4px -1px hsl(219 19.6078% 20% / 0.1);
|
|
68
|
+
--shadow-lg:
|
|
69
|
+
0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 4px 6px -1px hsl(219 19.6078% 20% / 0.1);
|
|
70
|
+
--shadow-xl:
|
|
71
|
+
0px 1px 3px 0px hsl(219 19.6078% 20% / 0.1), 0px 8px 10px -1px hsl(219 19.6078% 20% / 0.1);
|
|
72
|
+
--shadow-2xl: 0px 1px 3px 0px hsl(219 19.6078% 20% / 0.25);
|
|
56
73
|
--tracking-normal: 0em;
|
|
57
|
-
|
|
58
|
-
--rule: oklch(0.9 0.005 95);
|
|
74
|
+
--spacing: 0.25rem;
|
|
59
75
|
}
|
|
60
76
|
|
|
61
77
|
.dark {
|
|
62
|
-
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
--
|
|
67
|
-
--
|
|
68
|
-
--
|
|
69
|
-
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
73
|
-
--
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
--
|
|
77
|
-
--
|
|
78
|
-
--
|
|
79
|
-
--
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
--
|
|
86
|
-
--
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
--
|
|
91
|
-
--foreground:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
--
|
|
95
|
-
--
|
|
96
|
-
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
--
|
|
102
|
-
--
|
|
103
|
-
|
|
104
|
-
--
|
|
105
|
-
--
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
--
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
--
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
--
|
|
116
|
-
|
|
117
|
-
/* --border → stronger rule (components need visible edges); doc editor can opt into
|
|
118
|
-
bg-rule / border-rule on its large panels if it wants the whisper-thin variant */
|
|
119
|
-
--border: var(--rule-2);
|
|
120
|
-
--input: var(--rule-2);
|
|
121
|
-
--ring: var(--brand);
|
|
122
|
-
|
|
123
|
-
--chart-1: var(--brand);
|
|
124
|
-
--chart-2: var(--brand-2);
|
|
125
|
-
--chart-3: var(--brand-deep);
|
|
126
|
-
--chart-4: var(--night-3);
|
|
127
|
-
--chart-5: var(--bone-3);
|
|
128
|
-
|
|
129
|
-
/* Sidebar — same hue/chroma as --background (night-1, 0.16 0.032 258), just a touch darker */
|
|
130
|
-
--sidebar: oklch(0.15 0.032 258);
|
|
131
|
-
--sidebar-foreground: var(--bone-2);
|
|
132
|
-
--sidebar-primary: var(--brand);
|
|
133
|
-
--sidebar-primary-foreground: var(--bone);
|
|
134
|
-
--sidebar-accent: color-mix(in oklab, var(--bone) 6%, transparent);
|
|
135
|
-
--sidebar-accent-foreground: var(--bone);
|
|
136
|
-
--sidebar-border: var(--rule);
|
|
137
|
-
--sidebar-ring: var(--brand);
|
|
138
|
-
|
|
139
|
-
--radius: 0.5rem;
|
|
140
|
-
|
|
141
|
-
/* Shadows tuned to the cool blue-black bg — deeper saturation, longer falloff */
|
|
142
|
-
--shadow-2xs: 0 1px 2px -1px oklch(0 0 0 / 0.5);
|
|
143
|
-
--shadow-xs: 0 2px 6px -2px oklch(0 0 0 / 0.55);
|
|
144
|
-
--shadow-sm: 0 4px 14px -4px oklch(0 0 0 / 0.55), 0 1px 2px -1px oklch(0 0 0 / 0.4);
|
|
145
|
-
--shadow: 0 8px 24px -8px oklch(0 0 0 / 0.6), 0 2px 4px -2px oklch(0 0 0 / 0.45);
|
|
146
|
-
--shadow-md: 0 12px 32px -10px oklch(0 0 0 / 0.6), 0 4px 8px -4px oklch(0 0 0 / 0.5);
|
|
147
|
-
--shadow-lg: 0 20px 48px -14px oklch(0 0 0 / 0.65), 0 8px 16px -8px oklch(0 0 0 / 0.5);
|
|
148
|
-
--shadow-xl: 0 32px 64px -20px oklch(0 0 0 / 0.7), 0 12px 24px -12px oklch(0 0 0 / 0.55);
|
|
149
|
-
--shadow-2xl: 0 48px 96px -28px oklch(0 0 0 / 0.75);
|
|
150
|
-
|
|
151
|
-
/* Brand glow — use on buttons / focused inputs to echo the landing's window-glow.
|
|
152
|
-
Glow strength scales ring + drop-shadow opacity together. */
|
|
153
|
-
--glow-brand:
|
|
154
|
-
0 0 0 1px color-mix(in oklab, var(--brand) calc(var(--glow-strength) * 75%), transparent),
|
|
155
|
-
0 16px 40px -12px
|
|
156
|
-
color-mix(in oklab, var(--brand) calc(var(--glow-strength) * 94%), transparent);
|
|
78
|
+
--background: oklch(0.2188 0.0148 248.507);
|
|
79
|
+
--foreground: oklch(0.9189 0 0);
|
|
80
|
+
--card: oklch(0.2617 0.0197 254.8441);
|
|
81
|
+
--card-foreground: oklch(0.9189 0 0);
|
|
82
|
+
--popover: oklch(0.2617 0.0197 254.8441);
|
|
83
|
+
--popover-foreground: oklch(0.9189 0 0);
|
|
84
|
+
--primary: oklch(0.6802 0.1902 32.0008);
|
|
85
|
+
--primary-foreground: oklch(1 0 0);
|
|
86
|
+
--secondary: oklch(0.2988 0.0207 257.2741);
|
|
87
|
+
--secondary-foreground: oklch(0.9006 0 0);
|
|
88
|
+
--muted: oklch(0.2786 0.0211 257.2774);
|
|
89
|
+
--muted-foreground: oklch(0.6993 0 0);
|
|
90
|
+
--accent: oklch(0.3206 0.0396 254.678);
|
|
91
|
+
--accent-foreground: oklch(0.8996 0.0504 251.1357);
|
|
92
|
+
--destructive: oklch(0.6509 0.2199 25.0358);
|
|
93
|
+
--destructive-foreground: oklch(1 0 0);
|
|
94
|
+
--border: oklch(0.3408 0.0192 251.4559);
|
|
95
|
+
--input: oklch(0.3408 0.0192 251.4559);
|
|
96
|
+
--ring: oklch(0.6802 0.1902 32.0008);
|
|
97
|
+
--chart-1: oklch(0.7011 0.1193 239.6974);
|
|
98
|
+
--chart-2: oklch(0.7449 0.1558 32.2982);
|
|
99
|
+
--chart-3: oklch(0.765 0.177 163.223);
|
|
100
|
+
--chart-4: oklch(0.879 0.169 91.605);
|
|
101
|
+
--chart-5: oklch(0.785 0.115 274.713);
|
|
102
|
+
--sidebar: oklch(0.2492 0.02 254.8597);
|
|
103
|
+
--sidebar-foreground: oklch(0.9189 0 0);
|
|
104
|
+
--sidebar-primary: oklch(0.6802 0.1902 32.0008);
|
|
105
|
+
--sidebar-primary-foreground: oklch(1 0 0);
|
|
106
|
+
--sidebar-accent: oklch(0.3206 0.0396 254.678);
|
|
107
|
+
--sidebar-accent-foreground: oklch(0.8996 0.0504 251.1357);
|
|
108
|
+
--sidebar-border: oklch(0.3408 0.0192 251.4559);
|
|
109
|
+
--sidebar-ring: oklch(0.6802 0.1902 32.0008);
|
|
110
|
+
--font-sans: Inter, sans-serif;
|
|
111
|
+
--font-serif: Source Serif 4, serif;
|
|
112
|
+
--font-mono: JetBrains Mono, monospace;
|
|
113
|
+
--radius: 0.75rem;
|
|
114
|
+
--shadow-x: 0px;
|
|
115
|
+
--shadow-y: 1px;
|
|
116
|
+
--shadow-blur: 3px;
|
|
117
|
+
--shadow-spread: 0px;
|
|
118
|
+
--shadow-opacity: 0.1;
|
|
119
|
+
--shadow-color: #0a0c0f;
|
|
120
|
+
--shadow-2xs: 0px 1px 3px 0px hsl(216 20% 4.902% / 0.05);
|
|
121
|
+
--shadow-xs: 0px 1px 3px 0px hsl(216 20% 4.902% / 0.05);
|
|
122
|
+
--shadow-sm:
|
|
123
|
+
0px 1px 3px 0px hsl(216 20% 4.902% / 0.1), 0px 1px 2px -1px hsl(216 20% 4.902% / 0.1);
|
|
124
|
+
--shadow: 0px 1px 3px 0px hsl(216 20% 4.902% / 0.1), 0px 1px 2px -1px hsl(216 20% 4.902% / 0.1);
|
|
125
|
+
--shadow-md:
|
|
126
|
+
0px 1px 3px 0px hsl(216 20% 4.902% / 0.1), 0px 2px 4px -1px hsl(216 20% 4.902% / 0.1);
|
|
127
|
+
--shadow-lg:
|
|
128
|
+
0px 1px 3px 0px hsl(216 20% 4.902% / 0.1), 0px 4px 6px -1px hsl(216 20% 4.902% / 0.1);
|
|
129
|
+
--shadow-xl:
|
|
130
|
+
0px 1px 3px 0px hsl(216 20% 4.902% / 0.1), 0px 8px 10px -1px hsl(216 20% 4.902% / 0.1);
|
|
131
|
+
--shadow-2xl: 0px 1px 3px 0px hsl(216 20% 4.902% / 0.25);
|
|
157
132
|
}
|
|
158
133
|
|
|
159
134
|
@theme inline {
|
|
@@ -172,6 +147,7 @@
|
|
|
172
147
|
--color-accent: var(--accent);
|
|
173
148
|
--color-accent-foreground: var(--accent-foreground);
|
|
174
149
|
--color-destructive: var(--destructive);
|
|
150
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
175
151
|
--color-border: var(--border);
|
|
176
152
|
--color-input: var(--input);
|
|
177
153
|
--color-ring: var(--ring);
|
|
@@ -188,12 +164,6 @@
|
|
|
188
164
|
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
189
165
|
--color-sidebar-border: var(--sidebar-border);
|
|
190
166
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
191
|
-
--color-destructive-foreground: var(--destructive-foreground);
|
|
192
|
-
|
|
193
|
-
/* Thinner hairline — opt-in via border-rule / bg-rule / text-rule utilities.
|
|
194
|
-
Use on large structural dividers (doc editor panels, section separators) where
|
|
195
|
-
the component --border (22%) reads too loud. */
|
|
196
|
-
--color-rule: var(--rule);
|
|
197
167
|
|
|
198
168
|
--font-sans: var(--font-sans);
|
|
199
169
|
--font-mono: var(--font-mono);
|
|
@@ -221,48 +191,4 @@
|
|
|
221
191
|
body {
|
|
222
192
|
@apply bg-background text-foreground;
|
|
223
193
|
}
|
|
224
|
-
|
|
225
|
-
/* Dark-mode text reads heavier than light due to halation on dark bgs.
|
|
226
|
-
Antialiased smoothing + suppressing the browser's auto-bolding brings
|
|
227
|
-
dark-mode text one visual step lighter, matching light mode. */
|
|
228
|
-
.dark {
|
|
229
|
-
-webkit-font-smoothing: antialiased;
|
|
230
|
-
-moz-osx-font-smoothing: grayscale;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/* Selection in burnt orange — the landing's signature */
|
|
234
|
-
.dark ::selection {
|
|
235
|
-
background: var(--brand);
|
|
236
|
-
color: var(--night-0);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/* Popovers/dialogs get a backdrop blur when translucent so content under doesn't fight text */
|
|
240
|
-
.dark [data-slot='popover-content'],
|
|
241
|
-
.dark [data-slot='dropdown-menu-content'],
|
|
242
|
-
.dark [data-slot='select-content'],
|
|
243
|
-
.dark [data-slot='command'],
|
|
244
|
-
.dark [data-radix-popper-content-wrapper] > * {
|
|
245
|
-
backdrop-filter: blur(12px) saturate(1.2);
|
|
246
|
-
-webkit-backdrop-filter: blur(12px) saturate(1.2);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Primary buttons carry the landing's window-glow: accent ring + drop-shadow bloom */
|
|
250
|
-
.dark button[data-slot='button'].bg-primary,
|
|
251
|
-
.dark [data-slot='button'].bg-primary {
|
|
252
|
-
box-shadow: var(--glow-brand);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/* Subtle top-edge highlight on cards so they read as "lit from above" on the gradient.
|
|
256
|
-
This is the "floating" cue — a 1px inset bone highlight at the top. */
|
|
257
|
-
.dark [data-slot='card'] {
|
|
258
|
-
box-shadow:
|
|
259
|
-
inset 0 1px 0 0 color-mix(in oklab, var(--bone) 6%, transparent),
|
|
260
|
-
var(--shadow-sm);
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
/* Shadcn's sidebar-container applies border-r / border-l with the default --border,
|
|
264
|
-
which resolves to rule-2 (thicker). Force the thin --rule for this structural divider. */
|
|
265
|
-
.dark [data-slot='sidebar-container'] {
|
|
266
|
-
border-color: var(--rule);
|
|
267
|
-
}
|
|
268
194
|
}
|