@danielthurau/atlas-labs-codex 0.1.0
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 +138 -0
- package/components/react/Badge/Badge.module.css +38 -0
- package/components/react/Badge/Badge.stories.tsx +79 -0
- package/components/react/Badge/Badge.tsx +42 -0
- package/components/react/Badge/index.ts +2 -0
- package/components/react/Button/Button.module.css +118 -0
- package/components/react/Button/Button.stories.tsx +108 -0
- package/components/react/Button/Button.tsx +73 -0
- package/components/react/Button/index.ts +2 -0
- package/components/react/Card/Card.module.css +59 -0
- package/components/react/Card/Card.stories.tsx +114 -0
- package/components/react/Card/Card.tsx +79 -0
- package/components/react/Card/index.ts +11 -0
- package/components/react/Input/Input.module.css +63 -0
- package/components/react/Input/Input.stories.tsx +88 -0
- package/components/react/Input/Input.tsx +50 -0
- package/components/react/Input/index.ts +2 -0
- package/components/react/Modal/Modal.module.css +103 -0
- package/components/react/Modal/Modal.stories.tsx +119 -0
- package/components/react/Modal/Modal.tsx +75 -0
- package/components/react/Modal/index.ts +2 -0
- package/components/react/RefreshButton/RefreshButton.module.css +202 -0
- package/components/react/RefreshButton/RefreshButton.stories.tsx +43 -0
- package/components/react/RefreshButton/RefreshButton.tsx +222 -0
- package/components/react/RefreshButton/index.ts +2 -0
- package/components/react/Tabs/Tabs.module.css +58 -0
- package/components/react/Tabs/Tabs.stories.tsx +101 -0
- package/components/react/Tabs/Tabs.tsx +62 -0
- package/components/react/Tabs/index.ts +2 -0
- package/components/react/Toast/Toast.module.css +145 -0
- package/components/react/Toast/Toast.stories.tsx +143 -0
- package/components/react/Toast/Toast.tsx +123 -0
- package/components/react/Toast/index.ts +2 -0
- package/components/react/index.ts +31 -0
- package/lib/index.ts +7 -0
- package/lib/utils.ts +32 -0
- package/package.json +95 -0
- package/public/fonts/MartianMono-OFL.txt +93 -0
- package/public/fonts/MartianMono-VariableFont_wdth,wght.ttf +0 -0
- package/themes/css/base.css +142 -0
- package/themes/css/theme-dark.css +48 -0
- package/themes/css/theme-light.css +49 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
.viewport {
|
|
2
|
+
position: fixed;
|
|
3
|
+
bottom: 0;
|
|
4
|
+
right: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
padding: var(--space-6);
|
|
8
|
+
gap: var(--space-3);
|
|
9
|
+
width: 390px;
|
|
10
|
+
max-width: 100vw;
|
|
11
|
+
margin: 0;
|
|
12
|
+
list-style: none;
|
|
13
|
+
z-index: 2147483647;
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.root {
|
|
18
|
+
background-color: var(--color-bg-elevated);
|
|
19
|
+
border-radius: var(--radius-lg);
|
|
20
|
+
box-shadow: var(--shadow-lg);
|
|
21
|
+
padding: var(--space-4);
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: flex-start;
|
|
24
|
+
gap: var(--space-3);
|
|
25
|
+
border: 1px solid var(--color-border-default);
|
|
26
|
+
position: relative;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.root[data-state="open"] {
|
|
30
|
+
animation: slideIn 150ms ease-out;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.root[data-state="closed"] {
|
|
34
|
+
animation: slideOut 100ms ease-in;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.root[data-swipe="move"] {
|
|
38
|
+
transform: translateX(var(--radix-toast-swipe-move-x));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.root[data-swipe="cancel"] {
|
|
42
|
+
transform: translateX(0);
|
|
43
|
+
transition: transform 200ms ease-out;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.root[data-swipe="end"] {
|
|
47
|
+
animation: swipeOut 100ms ease-out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Variants */
|
|
51
|
+
.default {
|
|
52
|
+
border-left: 4px solid var(--color-border-strong);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.success {
|
|
56
|
+
border-left: 4px solid var(--color-intent-success);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.warning {
|
|
60
|
+
border-left: 4px solid var(--color-intent-warning);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.error {
|
|
64
|
+
border-left: 4px solid var(--color-intent-danger);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.content {
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.title {
|
|
73
|
+
font-size: var(--text-sm);
|
|
74
|
+
font-weight: var(--font-semibold);
|
|
75
|
+
color: var(--color-text-primary);
|
|
76
|
+
margin: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.description {
|
|
80
|
+
font-size: var(--text-sm);
|
|
81
|
+
color: var(--color-text-secondary);
|
|
82
|
+
margin: var(--space-1) 0 0 0;
|
|
83
|
+
line-height: var(--leading-base);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.close {
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: var(--space-2);
|
|
89
|
+
right: var(--space-2);
|
|
90
|
+
width: 24px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
border-radius: var(--radius-sm);
|
|
96
|
+
color: var(--color-text-muted);
|
|
97
|
+
background: transparent;
|
|
98
|
+
border: none;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
transition: background-color 150ms ease, color 150ms ease;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.close:hover {
|
|
104
|
+
background-color: var(--color-bg-subtle);
|
|
105
|
+
color: var(--color-text-secondary);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.close:focus-visible {
|
|
109
|
+
outline: none;
|
|
110
|
+
box-shadow: var(--focus-ring);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes slideIn {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: translateX(100%);
|
|
117
|
+
}
|
|
118
|
+
to {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
transform: translateX(0);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes slideOut {
|
|
125
|
+
from {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
transform: translateX(0);
|
|
128
|
+
}
|
|
129
|
+
to {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transform: translateX(100%);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes swipeOut {
|
|
136
|
+
from {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: translateX(100%);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { Toast, ToastProvider } from "./Toast";
|
|
4
|
+
import { Button } from "../Button";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Toast> = {
|
|
7
|
+
title: "Components/Toast",
|
|
8
|
+
component: Toast,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered",
|
|
11
|
+
},
|
|
12
|
+
tags: ["autodocs"],
|
|
13
|
+
decorators: [
|
|
14
|
+
(Story) => (
|
|
15
|
+
<ToastProvider>
|
|
16
|
+
<Story />
|
|
17
|
+
</ToastProvider>
|
|
18
|
+
),
|
|
19
|
+
],
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
|
|
25
|
+
const ToastDemo = ({
|
|
26
|
+
variant,
|
|
27
|
+
title,
|
|
28
|
+
description,
|
|
29
|
+
}: {
|
|
30
|
+
variant: "default" | "success" | "warning" | "error";
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
}) => {
|
|
34
|
+
const [open, setOpen] = useState(false);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<>
|
|
38
|
+
<Button onClick={() => setOpen(true)}>Show {variant} toast</Button>
|
|
39
|
+
<Toast
|
|
40
|
+
open={open}
|
|
41
|
+
onOpenChange={setOpen}
|
|
42
|
+
variant={variant}
|
|
43
|
+
title={title}
|
|
44
|
+
description={description}
|
|
45
|
+
/>
|
|
46
|
+
</>
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Default: Story = {
|
|
51
|
+
render: () => (
|
|
52
|
+
<ToastDemo
|
|
53
|
+
variant="default"
|
|
54
|
+
title="Notification"
|
|
55
|
+
description="This is a default toast message."
|
|
56
|
+
/>
|
|
57
|
+
),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const Success: Story = {
|
|
61
|
+
render: () => (
|
|
62
|
+
<ToastDemo
|
|
63
|
+
variant="success"
|
|
64
|
+
title="Changes saved"
|
|
65
|
+
description="Your changes have been saved successfully."
|
|
66
|
+
/>
|
|
67
|
+
),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Warning: Story = {
|
|
71
|
+
render: () => (
|
|
72
|
+
<ToastDemo
|
|
73
|
+
variant="warning"
|
|
74
|
+
title="Warning"
|
|
75
|
+
description="This action may have unintended consequences."
|
|
76
|
+
/>
|
|
77
|
+
),
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const Error: Story = {
|
|
81
|
+
render: () => (
|
|
82
|
+
<ToastDemo
|
|
83
|
+
variant="error"
|
|
84
|
+
title="Error"
|
|
85
|
+
description="Something went wrong. Please try again."
|
|
86
|
+
/>
|
|
87
|
+
),
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const AllVariantsDemo = () => {
|
|
91
|
+
const [toasts, setToasts] = useState<
|
|
92
|
+
{ id: number; variant: "default" | "success" | "warning" | "error"; open: boolean }[]
|
|
93
|
+
>([]);
|
|
94
|
+
|
|
95
|
+
const showToast = (variant: "default" | "success" | "warning" | "error") => {
|
|
96
|
+
const id = Date.now();
|
|
97
|
+
setToasts((prev) => [...prev, { id, variant, open: true }]);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const closeToast = (id: number) => {
|
|
101
|
+
setToasts((prev) =>
|
|
102
|
+
prev.map((t) => (t.id === id ? { ...t, open: false } : t))
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const titles = {
|
|
107
|
+
default: "Notification",
|
|
108
|
+
success: "Success",
|
|
109
|
+
warning: "Warning",
|
|
110
|
+
error: "Error",
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const descriptions = {
|
|
114
|
+
default: "This is a default toast message.",
|
|
115
|
+
success: "Your changes have been saved successfully.",
|
|
116
|
+
warning: "This action may have unintended consequences.",
|
|
117
|
+
error: "Something went wrong. Please try again.",
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
return (
|
|
121
|
+
<div style={{ display: "flex", gap: "8px", flexWrap: "wrap" }}>
|
|
122
|
+
<Button onClick={() => showToast("default")}>Default</Button>
|
|
123
|
+
<Button onClick={() => showToast("success")}>Success</Button>
|
|
124
|
+
<Button onClick={() => showToast("warning")}>Warning</Button>
|
|
125
|
+
<Button onClick={() => showToast("error")}>Error</Button>
|
|
126
|
+
{toasts.map((toast) => (
|
|
127
|
+
<Toast
|
|
128
|
+
key={toast.id}
|
|
129
|
+
open={toast.open}
|
|
130
|
+
onOpenChange={(open) => !open && closeToast(toast.id)}
|
|
131
|
+
variant={toast.variant}
|
|
132
|
+
title={titles[toast.variant]}
|
|
133
|
+
description={descriptions[toast.variant]}
|
|
134
|
+
/>
|
|
135
|
+
))}
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
export const AllVariants: Story = {
|
|
141
|
+
render: () => <AllVariantsDemo />,
|
|
142
|
+
};
|
|
143
|
+
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
forwardRef,
|
|
5
|
+
type ReactNode,
|
|
6
|
+
createContext,
|
|
7
|
+
useContext,
|
|
8
|
+
useState,
|
|
9
|
+
useCallback,
|
|
10
|
+
} from "react";
|
|
11
|
+
import * as ToastPrimitive from "@radix-ui/react-toast";
|
|
12
|
+
import { clsx } from "clsx";
|
|
13
|
+
import styles from "./Toast.module.css";
|
|
14
|
+
|
|
15
|
+
// Toast Provider
|
|
16
|
+
export interface ToastProviderProps {
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function ToastProvider({ children }: ToastProviderProps) {
|
|
21
|
+
return (
|
|
22
|
+
<ToastPrimitive.Provider swipeDirection="right">
|
|
23
|
+
{children}
|
|
24
|
+
<ToastPrimitive.Viewport className={styles.viewport} />
|
|
25
|
+
</ToastPrimitive.Provider>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Individual Toast
|
|
30
|
+
export interface ToastProps {
|
|
31
|
+
open?: boolean;
|
|
32
|
+
onOpenChange?: (open: boolean) => void;
|
|
33
|
+
title?: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
action?: ReactNode;
|
|
36
|
+
variant?: "default" | "success" | "warning" | "error";
|
|
37
|
+
duration?: number;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const Toast = forwardRef<HTMLLIElement, ToastProps>(
|
|
41
|
+
(
|
|
42
|
+
{
|
|
43
|
+
open,
|
|
44
|
+
onOpenChange,
|
|
45
|
+
title,
|
|
46
|
+
description,
|
|
47
|
+
action,
|
|
48
|
+
variant = "default",
|
|
49
|
+
duration = 5000,
|
|
50
|
+
},
|
|
51
|
+
ref
|
|
52
|
+
) => {
|
|
53
|
+
return (
|
|
54
|
+
<ToastPrimitive.Root
|
|
55
|
+
ref={ref}
|
|
56
|
+
open={open}
|
|
57
|
+
onOpenChange={onOpenChange}
|
|
58
|
+
duration={duration}
|
|
59
|
+
className={clsx(styles.root, styles[variant])}
|
|
60
|
+
>
|
|
61
|
+
<div className={styles.content}>
|
|
62
|
+
{title && (
|
|
63
|
+
<ToastPrimitive.Title className={styles.title}>
|
|
64
|
+
{title}
|
|
65
|
+
</ToastPrimitive.Title>
|
|
66
|
+
)}
|
|
67
|
+
{description && (
|
|
68
|
+
<ToastPrimitive.Description className={styles.description}>
|
|
69
|
+
{description}
|
|
70
|
+
</ToastPrimitive.Description>
|
|
71
|
+
)}
|
|
72
|
+
</div>
|
|
73
|
+
{action && (
|
|
74
|
+
<ToastPrimitive.Action asChild altText="Action">
|
|
75
|
+
{action}
|
|
76
|
+
</ToastPrimitive.Action>
|
|
77
|
+
)}
|
|
78
|
+
<ToastPrimitive.Close className={styles.close} aria-label="Close">
|
|
79
|
+
<svg
|
|
80
|
+
width="15"
|
|
81
|
+
height="15"
|
|
82
|
+
viewBox="0 0 15 15"
|
|
83
|
+
fill="none"
|
|
84
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
85
|
+
>
|
|
86
|
+
<path
|
|
87
|
+
d="M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z"
|
|
88
|
+
fill="currentColor"
|
|
89
|
+
fillRule="evenodd"
|
|
90
|
+
clipRule="evenodd"
|
|
91
|
+
/>
|
|
92
|
+
</svg>
|
|
93
|
+
</ToastPrimitive.Close>
|
|
94
|
+
</ToastPrimitive.Root>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
Toast.displayName = "Toast";
|
|
100
|
+
|
|
101
|
+
// Toast hook for programmatic usage
|
|
102
|
+
interface ToastConfig {
|
|
103
|
+
title?: string;
|
|
104
|
+
description?: string;
|
|
105
|
+
variant?: "default" | "success" | "warning" | "error";
|
|
106
|
+
duration?: number;
|
|
107
|
+
action?: ReactNode;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
interface ToastContextValue {
|
|
111
|
+
toast: (config: ToastConfig) => void;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const ToastContext = createContext<ToastContextValue | null>(null);
|
|
115
|
+
|
|
116
|
+
export function useToast() {
|
|
117
|
+
const context = useContext(ToastContext);
|
|
118
|
+
if (!context) {
|
|
119
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
120
|
+
}
|
|
121
|
+
return context;
|
|
122
|
+
}
|
|
123
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Core Components
|
|
2
|
+
export { Button, type ButtonProps } from "./Button";
|
|
3
|
+
export { Input, type InputProps } from "./Input";
|
|
4
|
+
export {
|
|
5
|
+
Card,
|
|
6
|
+
CardHeader,
|
|
7
|
+
CardContent,
|
|
8
|
+
CardFooter,
|
|
9
|
+
type CardProps,
|
|
10
|
+
type CardHeaderProps,
|
|
11
|
+
type CardContentProps,
|
|
12
|
+
type CardFooterProps,
|
|
13
|
+
} from "./Card";
|
|
14
|
+
|
|
15
|
+
// Feedback Components
|
|
16
|
+
export { Badge, type BadgeProps } from "./Badge";
|
|
17
|
+
export { Modal, type ModalProps } from "./Modal";
|
|
18
|
+
export {
|
|
19
|
+
Toast,
|
|
20
|
+
ToastProvider,
|
|
21
|
+
useToast,
|
|
22
|
+
type ToastProps,
|
|
23
|
+
type ToastProviderProps,
|
|
24
|
+
} from "./Toast";
|
|
25
|
+
|
|
26
|
+
// Navigation Components
|
|
27
|
+
export { Tabs, type TabsProps, type TabItem } from "./Tabs";
|
|
28
|
+
|
|
29
|
+
// Action Components
|
|
30
|
+
export { RefreshButton } from "./RefreshButton";
|
|
31
|
+
|
package/lib/index.ts
ADDED
package/lib/utils.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design Codex Utilities
|
|
3
|
+
* Shared utility functions for projects using the design system
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Format a date as a relative time string (e.g., "2m ago", "1h ago")
|
|
8
|
+
*/
|
|
9
|
+
export function formatRelativeTime(date: Date | string | null): string {
|
|
10
|
+
if (!date) return "Never";
|
|
11
|
+
|
|
12
|
+
const now = new Date();
|
|
13
|
+
const then = typeof date === "string" ? new Date(date) : date;
|
|
14
|
+
const diffMs = now.getTime() - then.getTime();
|
|
15
|
+
|
|
16
|
+
const seconds = Math.floor(diffMs / 1000);
|
|
17
|
+
const minutes = Math.floor(seconds / 60);
|
|
18
|
+
const hours = Math.floor(minutes / 60);
|
|
19
|
+
const days = Math.floor(hours / 24);
|
|
20
|
+
|
|
21
|
+
if (seconds < 10) return "Just now";
|
|
22
|
+
if (seconds < 60) return `${seconds}s ago`;
|
|
23
|
+
if (minutes < 60) return `${minutes}m ago`;
|
|
24
|
+
if (hours < 24) return `${hours}h ago`;
|
|
25
|
+
if (days < 7) return `${days}d ago`;
|
|
26
|
+
|
|
27
|
+
return then.toLocaleDateString();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Re-export clsx for convenience
|
|
31
|
+
export { clsx } from "clsx";
|
|
32
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@danielthurau/atlas-labs-codex",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Personal design system with React components, CSS tokens, and utilities",
|
|
5
|
+
"author": "thurau",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/thurau/atlas-labs-codex"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"design-system",
|
|
13
|
+
"react",
|
|
14
|
+
"components",
|
|
15
|
+
"css-variables",
|
|
16
|
+
"design-tokens"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./components/react/index.ts",
|
|
20
|
+
"types": "./components/react/index.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./components/react/index.ts",
|
|
24
|
+
"types": "./components/react/index.ts"
|
|
25
|
+
},
|
|
26
|
+
"./components/react": {
|
|
27
|
+
"import": "./components/react/index.ts",
|
|
28
|
+
"types": "./components/react/index.ts"
|
|
29
|
+
},
|
|
30
|
+
"./lib": {
|
|
31
|
+
"import": "./lib/index.ts",
|
|
32
|
+
"types": "./lib/index.ts"
|
|
33
|
+
},
|
|
34
|
+
"./themes/css/base.css": "./themes/css/base.css",
|
|
35
|
+
"./themes/css/theme-light.css": "./themes/css/theme-light.css",
|
|
36
|
+
"./themes/css/theme-dark.css": "./themes/css/theme-dark.css"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"components",
|
|
40
|
+
"lib",
|
|
41
|
+
"themes",
|
|
42
|
+
"public/fonts"
|
|
43
|
+
],
|
|
44
|
+
"sideEffects": [
|
|
45
|
+
"**/*.css"
|
|
46
|
+
],
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">=18.0.0"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"dev": "next dev",
|
|
52
|
+
"build": "next build",
|
|
53
|
+
"start": "next start",
|
|
54
|
+
"lint": "next lint",
|
|
55
|
+
"storybook": "storybook dev -p 6006",
|
|
56
|
+
"build-storybook": "storybook build",
|
|
57
|
+
"prepublishOnly": "echo 'Ready to publish!'"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"react": "^18.0.0",
|
|
61
|
+
"react-dom": "^18.0.0"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
65
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
66
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
67
|
+
"@radix-ui/react-tabs": "^1.1.1",
|
|
68
|
+
"@radix-ui/react-toast": "^1.2.2",
|
|
69
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
70
|
+
"class-variance-authority": "^0.7.0",
|
|
71
|
+
"clsx": "^2.1.1"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@storybook/addon-essentials": "^8.4.7",
|
|
75
|
+
"@storybook/addon-interactions": "^8.4.7",
|
|
76
|
+
"@storybook/addon-links": "^8.4.7",
|
|
77
|
+
"@storybook/addon-themes": "^8.4.7",
|
|
78
|
+
"@storybook/blocks": "^8.4.7",
|
|
79
|
+
"@storybook/react": "^8.4.7",
|
|
80
|
+
"@storybook/react-vite": "^8.4.7",
|
|
81
|
+
"@storybook/test": "^8.4.7",
|
|
82
|
+
"@types/node": "^20.10.0",
|
|
83
|
+
"@types/react": "^18.3.0",
|
|
84
|
+
"@types/react-dom": "^18.3.0",
|
|
85
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
86
|
+
"eslint": "^8.57.0",
|
|
87
|
+
"eslint-config-next": "14.2.15",
|
|
88
|
+
"next": "14.2.15",
|
|
89
|
+
"react": "^18.3.1",
|
|
90
|
+
"react-dom": "^18.3.1",
|
|
91
|
+
"storybook": "^8.4.7",
|
|
92
|
+
"typescript": "^5.7.2",
|
|
93
|
+
"vite": "^5.4.0"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2021 The Martian Mono Project Authors (https://github.com/evilmartians/mono)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|