@robzepdev/trama 0.0.0-stage → 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/CHANGELOG.md +16 -0
- package/README.md +44 -3
- package/dist/AGENTS.md +19 -0
- package/dist/components/button.d.mts +30 -0
- package/dist/components/button.mjs +32 -0
- package/dist/components/card.d.mts +19 -0
- package/dist/components/card.mjs +77 -0
- package/dist/components/checkbox.d.mts +13 -0
- package/dist/components/checkbox.mjs +33 -0
- package/dist/components/dialog.d.mts +25 -0
- package/dist/components/dialog.mjs +97 -0
- package/dist/components/field.d.mts +18 -0
- package/dist/components/field.mjs +41 -0
- package/dist/components/input.d.mts +4 -0
- package/dist/components/input.mjs +14 -0
- package/dist/components/menu.d.mts +22 -0
- package/dist/components/menu.mjs +89 -0
- package/dist/components/select.d.mts +25 -0
- package/dist/components/select.mjs +127 -0
- package/dist/components/stack.d.mts +48 -0
- package/dist/components/stack.mjs +196 -0
- package/dist/components/text.d.mts +25 -0
- package/dist/components/text.mjs +81 -0
- package/dist/components/toast.d.mts +15 -0
- package/dist/components/toast.mjs +49 -0
- package/dist/docs/button.md +84 -0
- package/dist/docs/card-content.md +41 -0
- package/dist/docs/card-description.md +41 -0
- package/dist/docs/card-footer.md +41 -0
- package/dist/docs/card-header.md +41 -0
- package/dist/docs/card-title.md +41 -0
- package/dist/docs/card.md +41 -0
- package/dist/docs/checkbox.md +142 -0
- package/dist/docs/dialog-close.md +53 -0
- package/dist/docs/dialog-content.md +70 -0
- package/dist/docs/dialog-description.md +46 -0
- package/dist/docs/dialog-footer.md +28 -0
- package/dist/docs/dialog-header.md +28 -0
- package/dist/docs/dialog-title.md +46 -0
- package/dist/docs/dialog-trigger.md +70 -0
- package/dist/docs/dialog.md +100 -0
- package/dist/docs/field-description.md +69 -0
- package/dist/docs/field-error.md +77 -0
- package/dist/docs/field-label.md +77 -0
- package/dist/docs/field.md +128 -0
- package/dist/docs/index.md +41 -0
- package/dist/docs/input.md +46 -0
- package/dist/docs/menu-content.md +95 -0
- package/dist/docs/menu-group.md +51 -0
- package/dist/docs/menu-item.md +79 -0
- package/dist/docs/menu-label.md +46 -0
- package/dist/docs/menu-separator.md +51 -0
- package/dist/docs/menu-trigger.md +93 -0
- package/dist/docs/menu.md +135 -0
- package/dist/docs/select-content.md +91 -0
- package/dist/docs/select-group.md +46 -0
- package/dist/docs/select-item.md +75 -0
- package/dist/docs/select-label.md +46 -0
- package/dist/docs/select-separator.md +51 -0
- package/dist/docs/select-trigger.md +63 -0
- package/dist/docs/select-value.md +59 -0
- package/dist/docs/select.md +164 -0
- package/dist/docs/stack.md +58 -0
- package/dist/docs/text.md +60 -0
- package/dist/docs/toast-provider.md +34 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.mjs +12 -0
- package/dist/lib/cn.mjs +9 -0
- package/dist/lib/responsive.d.mts +4 -0
- package/dist/lib/responsive.mjs +17 -0
- package/package.json +67 -3
- package/styles.css +67 -0
- package/themes/brutalista.css +36 -0
- package/themes/neon.css +37 -0
package/styles.css
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@source "./dist";
|
|
3
|
+
|
|
4
|
+
/* Scheme: data-scheme only sets color-scheme (ADR 0001). */
|
|
5
|
+
:root { color-scheme: light dark; }
|
|
6
|
+
[data-scheme="light"] { color-scheme: light; }
|
|
7
|
+
[data-scheme="dark"] { color-scheme: dark; }
|
|
8
|
+
|
|
9
|
+
/* Bridge from Tailwind names to the --ui-* token contract. */
|
|
10
|
+
@theme inline {
|
|
11
|
+
--color-*: initial;
|
|
12
|
+
--color-background: var(--ui-background);
|
|
13
|
+
--color-foreground: var(--ui-foreground);
|
|
14
|
+
--color-card: var(--ui-card);
|
|
15
|
+
--color-card-foreground: var(--ui-card-foreground);
|
|
16
|
+
--color-popover: var(--ui-popover);
|
|
17
|
+
--color-popover-foreground: var(--ui-popover-foreground);
|
|
18
|
+
--color-primary: var(--ui-primary);
|
|
19
|
+
--color-primary-foreground: var(--ui-primary-foreground);
|
|
20
|
+
--color-secondary: var(--ui-secondary);
|
|
21
|
+
--color-secondary-foreground: var(--ui-secondary-foreground);
|
|
22
|
+
--color-muted: var(--ui-muted);
|
|
23
|
+
--color-muted-foreground: var(--ui-muted-foreground);
|
|
24
|
+
--color-accent: var(--ui-accent);
|
|
25
|
+
--color-accent-foreground: var(--ui-accent-foreground);
|
|
26
|
+
--color-destructive: var(--ui-destructive);
|
|
27
|
+
--color-destructive-foreground: var(--ui-destructive-foreground);
|
|
28
|
+
--color-border: var(--ui-border);
|
|
29
|
+
--color-input: var(--ui-input);
|
|
30
|
+
--color-ring: var(--ui-ring);
|
|
31
|
+
--color-transparent: transparent;
|
|
32
|
+
--color-current: currentColor;
|
|
33
|
+
|
|
34
|
+
--font-sans: var(--ui-font-sans);
|
|
35
|
+
--font-heading: var(--ui-font-heading);
|
|
36
|
+
--font-mono: var(--ui-font-mono);
|
|
37
|
+
--font-weight-heading: var(--ui-heading-weight);
|
|
38
|
+
|
|
39
|
+
/* clear Tailwind's fixed scales so only contract-driven values remain */
|
|
40
|
+
--radius-*: initial;
|
|
41
|
+
--shadow-*: initial;
|
|
42
|
+
--inset-shadow-*: initial;
|
|
43
|
+
--drop-shadow-*: initial;
|
|
44
|
+
|
|
45
|
+
--radius-xs: calc(var(--ui-radius) * 0.35);
|
|
46
|
+
--radius-sm: calc(var(--ui-radius) * 0.5);
|
|
47
|
+
--radius-md: calc(var(--ui-radius) * 0.75);
|
|
48
|
+
--radius-lg: var(--ui-radius);
|
|
49
|
+
|
|
50
|
+
--shadow-sm: var(--ui-shadow-sm);
|
|
51
|
+
--shadow-md: var(--ui-shadow-md);
|
|
52
|
+
|
|
53
|
+
--default-transition-duration: var(--ui-duration);
|
|
54
|
+
--default-transition-timing-function: var(--ui-ease);
|
|
55
|
+
--ease-ui: var(--ui-ease);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Tailwind has no theme key for border width: border-ui reads the token. */
|
|
59
|
+
@utility border-ui {
|
|
60
|
+
border-style: var(--tw-border-style, solid);
|
|
61
|
+
border-width: var(--ui-border-width, 1px);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (prefers-reduced-motion: reduce) {
|
|
65
|
+
/* doubled selectors outrank any theme file, whatever the import order */
|
|
66
|
+
:root:root, [data-theme][data-theme] { --ui-duration: 0ms; }
|
|
67
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Brutalista: yellow paper, black ink, solid borders, flat offset shadows, no motion. */
|
|
2
|
+
/* :where() keeps the root default weaker than any data-theme, whatever the import order. */
|
|
3
|
+
:where(:root),
|
|
4
|
+
[data-theme="brutalista"] {
|
|
5
|
+
--ui-background: light-dark(oklch(0.97 0.05 100), oklch(0.15 0 0));
|
|
6
|
+
--ui-foreground: light-dark(oklch(0.15 0 0), oklch(0.96 0.06 100));
|
|
7
|
+
--ui-card: light-dark(oklch(1 0 0), oklch(0.2 0 0));
|
|
8
|
+
--ui-card-foreground: var(--ui-foreground);
|
|
9
|
+
--ui-popover: var(--ui-card);
|
|
10
|
+
--ui-popover-foreground: var(--ui-foreground);
|
|
11
|
+
--ui-primary: light-dark(oklch(0.15 0 0), oklch(0.9 0.17 100));
|
|
12
|
+
--ui-primary-foreground: light-dark(oklch(0.97 0.05 100), oklch(0.15 0 0));
|
|
13
|
+
--ui-secondary: light-dark(oklch(0.85 0.12 200), oklch(0.45 0.1 200));
|
|
14
|
+
--ui-secondary-foreground: light-dark(oklch(0.15 0 0), oklch(0.98 0 0));
|
|
15
|
+
--ui-muted: light-dark(oklch(0.92 0.04 100), oklch(0.24 0 0));
|
|
16
|
+
--ui-muted-foreground: light-dark(oklch(0.4 0.02 100), oklch(0.78 0.03 100));
|
|
17
|
+
--ui-accent: light-dark(oklch(0.82 0.15 350), oklch(0.5 0.17 350));
|
|
18
|
+
--ui-accent-foreground: light-dark(oklch(0.15 0 0), oklch(0.98 0 0));
|
|
19
|
+
--ui-destructive: light-dark(oklch(0.55 0.22 28), oklch(0.68 0.2 28));
|
|
20
|
+
--ui-destructive-foreground: light-dark(oklch(1 0 0), oklch(0.15 0 0));
|
|
21
|
+
--ui-border: var(--ui-foreground);
|
|
22
|
+
--ui-input: var(--ui-foreground);
|
|
23
|
+
/* Light ring is blue, not red: red is destructive, and focus must not read as an error. */
|
|
24
|
+
--ui-ring: light-dark(oklch(0.5 0.2 260), oklch(0.9 0.17 100));
|
|
25
|
+
--ui-font-sans: "Space Grotesk", system-ui, sans-serif;
|
|
26
|
+
--ui-font-heading: "Space Grotesk", system-ui, sans-serif;
|
|
27
|
+
--ui-font-mono: ui-monospace, monospace;
|
|
28
|
+
--ui-heading-weight: 700;
|
|
29
|
+
--ui-radius: 0rem;
|
|
30
|
+
--ui-border-width: 2px;
|
|
31
|
+
--ui-shadow-sm: 3px 3px 0 var(--ui-foreground);
|
|
32
|
+
--ui-shadow-md: 6px 6px 0 var(--ui-foreground);
|
|
33
|
+
--ui-duration: 0ms;
|
|
34
|
+
--ui-ease: steps(1);
|
|
35
|
+
--spacing: 0.25rem;
|
|
36
|
+
}
|
package/themes/neon.css
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* Neon: born dark (night violet, mint glow); light is photo paper with magenta. Glow comes from --ui-primary. */
|
|
2
|
+
/* :where() keeps the root default weaker than any data-theme, whatever the import order. */
|
|
3
|
+
:where(:root),
|
|
4
|
+
[data-theme="neon"] {
|
|
5
|
+
--ui-background: light-dark(oklch(0.97 0.012 300), oklch(0.15 0.035 285));
|
|
6
|
+
--ui-foreground: light-dark(oklch(0.22 0.05 285), oklch(0.95 0.02 285));
|
|
7
|
+
--ui-card: light-dark(oklch(1 0 0), oklch(0.19 0.04 285));
|
|
8
|
+
--ui-card-foreground: var(--ui-foreground);
|
|
9
|
+
--ui-popover: light-dark(oklch(1 0 0), oklch(0.21 0.045 285));
|
|
10
|
+
--ui-popover-foreground: var(--ui-foreground);
|
|
11
|
+
--ui-primary: light-dark(oklch(0.5 0.24 330), oklch(0.86 0.19 165));
|
|
12
|
+
--ui-primary-foreground: light-dark(oklch(0.99 0 0), oklch(0.18 0.05 165));
|
|
13
|
+
--ui-secondary: light-dark(oklch(0.93 0.04 220), oklch(0.3 0.08 230));
|
|
14
|
+
--ui-secondary-foreground: light-dark(oklch(0.3 0.09 230), oklch(0.9 0.08 210));
|
|
15
|
+
--ui-muted: light-dark(oklch(0.94 0.012 300), oklch(0.22 0.04 285));
|
|
16
|
+
--ui-muted-foreground: light-dark(oklch(0.48 0.04 285), oklch(0.74 0.04 285));
|
|
17
|
+
--ui-accent: light-dark(oklch(0.93 0.06 330), oklch(0.32 0.12 330));
|
|
18
|
+
--ui-accent-foreground: light-dark(oklch(0.35 0.15 330), oklch(0.93 0.06 330));
|
|
19
|
+
--ui-destructive: light-dark(oklch(0.53 0.21 20), oklch(0.72 0.19 20));
|
|
20
|
+
--ui-destructive-foreground: light-dark(oklch(1 0 0), oklch(0.16 0.05 20));
|
|
21
|
+
--ui-border: light-dark(oklch(0.88 0.03 300), oklch(0.32 0.06 285));
|
|
22
|
+
--ui-input: light-dark(oklch(0.6 0.06 300), oklch(0.58 0.08 285));
|
|
23
|
+
--ui-ring: var(--ui-primary);
|
|
24
|
+
--ui-font-sans: "Inter Tight", system-ui, sans-serif;
|
|
25
|
+
--ui-font-heading: "Unbounded", system-ui, sans-serif;
|
|
26
|
+
--ui-font-mono: "Space Mono", ui-monospace, monospace;
|
|
27
|
+
--ui-heading-weight: 600;
|
|
28
|
+
--ui-radius: 0.625rem;
|
|
29
|
+
--ui-border-width: 1px;
|
|
30
|
+
--ui-shadow-sm: 0 0 18px -4px color-mix(in oklch, var(--ui-primary) 55%, transparent);
|
|
31
|
+
--ui-shadow-md:
|
|
32
|
+
0 0 0 1px color-mix(in oklch, var(--ui-primary) 35%, transparent),
|
|
33
|
+
0 12px 40px -8px color-mix(in oklch, var(--ui-primary) 45%, transparent);
|
|
34
|
+
--ui-duration: 260ms;
|
|
35
|
+
--ui-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
36
|
+
--spacing: 0.27rem;
|
|
37
|
+
}
|