@codelitdev/design-system 0.1.0-alpha.6 → 0.1.0-alpha.7
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 +15 -15
- package/package.json +7 -7
- package/src/assets/logo-codelit.svg +1 -1
- package/src/assets/logo-courselit.svg +1 -1
- package/src/assets/logo-frontlit.svg +1 -1
- package/src/assets/logo-medialit.svg +1 -1
- package/src/assets/logo-sendlit.svg +1 -1
- package/src/components/actions/Button.tsx +10 -2
- package/src/components/actions/IconButton.tsx +9 -2
- package/src/components/display/Badge.tsx +1 -1
- package/src/components/display/Card.tsx +1 -1
- package/src/components/display/Tabs.tsx +21 -3
- package/src/components/feedback/Dialog.tsx +20 -3
- package/src/components/feedback/Loader.tsx +57 -15
- package/src/components/feedback/Toast.tsx +51 -4
- package/src/components/feedback/Tooltip.tsx +5 -1
- package/src/components/forms/Checkbox.tsx +30 -4
- package/src/components/forms/Input.tsx +2 -1
- package/src/components/forms/Radio.tsx +21 -3
- package/src/components/forms/Select.tsx +22 -5
- package/src/components/forms/Switch.tsx +18 -3
- package/src/components.css +489 -134
- package/src/index.ts +1 -1
- package/src/tokens/fonts.css +1 -1
- package/src/tokens/layout.css +4 -4
- package/src/tokens/products.css +8 -4
- package/src/tokens/typography.css +24 -13
package/src/index.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { Badge } from "./components/display/Badge";
|
|
|
4
4
|
export { Card } from "./components/display/Card";
|
|
5
5
|
export { Tabs } from "./components/display/Tabs";
|
|
6
6
|
export { Dialog } from "./components/feedback/Dialog";
|
|
7
|
-
export { Loader } from "./components/feedback/Loader";
|
|
8
7
|
export type { LoaderProps } from "./components/feedback/Loader";
|
|
8
|
+
export { Loader } from "./components/feedback/Loader";
|
|
9
9
|
export { Toast } from "./components/feedback/Toast";
|
|
10
10
|
export { Tooltip } from "./components/feedback/Tooltip";
|
|
11
11
|
export { Checkbox } from "./components/forms/Checkbox";
|
package/src/tokens/fonts.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* CodeLit — webfonts (Google Fonts CDN; no binaries vendored) */
|
|
2
|
-
@import url(
|
|
2
|
+
@import url("https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=Spline+Sans+Mono:wght@400;500;600&display=swap");
|
package/src/tokens/layout.css
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
--space-12: 48px;
|
|
14
14
|
|
|
15
15
|
/* Radii */
|
|
16
|
-
--radius: 0.625rem;
|
|
17
|
-
--radius-sm: 6px;
|
|
18
|
-
--radius-lg: 16px;
|
|
19
|
-
--radius-full: 999px;
|
|
16
|
+
--radius: 0.625rem; /* 10px — controls, inputs, buttons */
|
|
17
|
+
--radius-sm: 6px; /* chips, code spans, small tiles */
|
|
18
|
+
--radius-lg: 16px; /* cards, dialogs */
|
|
19
|
+
--radius-full: 999px; /* pills, badges, avatars */
|
|
20
20
|
|
|
21
21
|
/* Shadows — warm-tinted, soft */
|
|
22
22
|
--shadow-card: 0 2px 12px oklch(0.3 0.02 60 / 0.06);
|
package/src/tokens/products.css
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
--primary-hover: oklch(0.55 0.14 30);
|
|
10
10
|
--ring: oklch(0.6 0.14 30);
|
|
11
11
|
}
|
|
12
|
-
.dark[data-product="courselit"],
|
|
12
|
+
.dark[data-product="courselit"],
|
|
13
|
+
.dark [data-product="courselit"] {
|
|
13
14
|
--primary: oklch(0.72 0.13 30);
|
|
14
15
|
--primary-foreground: oklch(0.2 0.04 30);
|
|
15
16
|
--primary-soft: oklch(0.72 0.13 30 / 0.16);
|
|
@@ -24,7 +25,8 @@
|
|
|
24
25
|
--primary-hover: oklch(0.55 0.14 300);
|
|
25
26
|
--ring: oklch(0.6 0.14 300);
|
|
26
27
|
}
|
|
27
|
-
.dark[data-product="medialit"],
|
|
28
|
+
.dark[data-product="medialit"],
|
|
29
|
+
.dark [data-product="medialit"] {
|
|
28
30
|
--primary: oklch(0.72 0.13 300);
|
|
29
31
|
--primary-foreground: oklch(0.2 0.04 300);
|
|
30
32
|
--primary-soft: oklch(0.72 0.13 300 / 0.16);
|
|
@@ -39,7 +41,8 @@
|
|
|
39
41
|
--primary-hover: oklch(0.55 0.14 150);
|
|
40
42
|
--ring: oklch(0.6 0.14 150);
|
|
41
43
|
}
|
|
42
|
-
.dark[data-product="sendlit"],
|
|
44
|
+
.dark[data-product="sendlit"],
|
|
45
|
+
.dark [data-product="sendlit"] {
|
|
43
46
|
--primary: oklch(0.72 0.13 150);
|
|
44
47
|
--primary-foreground: oklch(0.2 0.04 150);
|
|
45
48
|
--primary-soft: oklch(0.72 0.13 150 / 0.16);
|
|
@@ -54,7 +57,8 @@
|
|
|
54
57
|
--primary-hover: oklch(0.55 0.14 230);
|
|
55
58
|
--ring: oklch(0.6 0.14 230);
|
|
56
59
|
}
|
|
57
|
-
.dark[data-product="frontlit"],
|
|
60
|
+
.dark[data-product="frontlit"],
|
|
61
|
+
.dark [data-product="frontlit"] {
|
|
58
62
|
--primary: oklch(0.72 0.13 230);
|
|
59
63
|
--primary-foreground: oklch(0.2 0.04 230);
|
|
60
64
|
--primary-soft: oklch(0.72 0.13 230 / 0.16);
|
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
--font-mono: "Spline Sans Mono", ui-monospace, "SF Mono", monospace;
|
|
6
6
|
|
|
7
7
|
/* Type scale */
|
|
8
|
-
--text-display: 800 2.25rem/1.12 var(--font-sans);
|
|
9
|
-
--text-h1: 700 1.75rem/1.2 var(--font-sans);
|
|
10
|
-
--text-h2: 700 1.375rem/1.25 var(--font-sans);
|
|
11
|
-
--text-h3: 600 1.125rem/1.3 var(--font-sans);
|
|
12
|
-
--text-body: 400 0.9375rem/1.55 var(--font-sans);
|
|
13
|
-
--text-body-sm: 400 0.875rem/1.5 var(--font-sans);
|
|
14
|
-
--text-label: 600 0.8125rem/1.3 var(--font-sans);
|
|
15
|
-
--text-caption: 400 0.75rem/1.4 var(--font-sans);
|
|
16
|
-
--text-code: 400 0.8125rem/1.5 var(--font-mono);
|
|
17
|
-
--text-eyebrow:
|
|
8
|
+
--text-display: 800 2.25rem / 1.12 var(--font-sans); /* 36px, -0.02em */
|
|
9
|
+
--text-h1: 700 1.75rem / 1.2 var(--font-sans); /* 28px, -0.02em */
|
|
10
|
+
--text-h2: 700 1.375rem / 1.25 var(--font-sans); /* 22px, -0.015em */
|
|
11
|
+
--text-h3: 600 1.125rem / 1.3 var(--font-sans); /* 18px */
|
|
12
|
+
--text-body: 400 0.9375rem / 1.55 var(--font-sans); /* 15px */
|
|
13
|
+
--text-body-sm: 400 0.875rem / 1.5 var(--font-sans); /* 14px */
|
|
14
|
+
--text-label: 600 0.8125rem / 1.3 var(--font-sans); /* 13px */
|
|
15
|
+
--text-caption: 400 0.75rem / 1.4 var(--font-sans); /* 12px */
|
|
16
|
+
--text-code: 400 0.8125rem / 1.5 var(--font-mono); /* 13px */
|
|
17
|
+
--text-eyebrow:
|
|
18
|
+
500 0.6875rem / 1.3 var(--font-mono); /* 11px mono, letter-spacing 0.08em, sentence case */
|
|
18
19
|
|
|
19
20
|
--tracking-tight: -0.02em;
|
|
20
21
|
--tracking-heading: -0.015em;
|
|
@@ -34,7 +35,17 @@ body {
|
|
|
34
35
|
blanket hover-underline breaks that UX. Opt in explicitly with .cl-link for
|
|
35
36
|
inline text links (prose, footnotes, etc.); interactive apps should use the
|
|
36
37
|
Button `link` variant / registry Button instead. */
|
|
37
|
-
.cl-link {
|
|
38
|
-
|
|
38
|
+
.cl-link {
|
|
39
|
+
color: var(--primary);
|
|
40
|
+
text-decoration: none;
|
|
41
|
+
}
|
|
42
|
+
.cl-link:hover {
|
|
43
|
+
color: var(--primary-hover);
|
|
44
|
+
text-decoration: underline;
|
|
45
|
+
}
|
|
39
46
|
|
|
40
|
-
code,
|
|
47
|
+
code,
|
|
48
|
+
kbd,
|
|
49
|
+
pre {
|
|
50
|
+
font: var(--text-code);
|
|
51
|
+
}
|