@atom63/styles 0.1.0-beta.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 +233 -0
- package/generated/atom63.figma-tokens.json +21650 -0
- package/generated/atom63.tokens.json +21909 -0
- package/package.json +116 -0
- package/src/animations/animations.css +55 -0
- package/src/animations/index.css +1 -0
- package/src/compat/a63-from-shadcn.css +141 -0
- package/src/compat/index.css +2 -0
- package/src/compat/mdx.css +13 -0
- package/src/compat/shadcn.css +52 -0
- package/src/contracts/action.css +31 -0
- package/src/contracts/badge.css +68 -0
- package/src/contracts/choice.css +32 -0
- package/src/contracts/control.css +102 -0
- package/src/contracts/environment.css +158 -0
- package/src/contracts/field.css +26 -0
- package/src/contracts/index.css +26 -0
- package/src/contracts/marker.css +23 -0
- package/src/contracts/menu.css +100 -0
- package/src/contracts/overlay.css +44 -0
- package/src/contracts/segment.css +100 -0
- package/src/contracts/selection.css +21 -0
- package/src/contracts/skeleton.css +14 -0
- package/src/contracts/surface.css +56 -0
- package/src/contracts/toggle.css +26 -0
- package/src/contracts/track.css +26 -0
- package/src/contracts/trigger.css +28 -0
- package/src/contracts/widget.css +196 -0
- package/src/index.css +17 -0
- package/src/manifest/types.ts +61 -0
- package/src/os/index.css +2 -0
- package/src/os/macos.css +54 -0
- package/src/os/windows.css +299 -0
- package/src/tailwind/animations.css +8 -0
- package/src/tailwind/index.css +4 -0
- package/src/tailwind/theme.css +516 -0
- package/src/tailwind/utilities.css +41 -0
- package/src/tailwind/variants.css +64 -0
- package/src/test/apply-styles.ts +30 -0
- package/src/themes/aqua.css +240 -0
- package/src/themes/index.css +4 -0
- package/src/themes/modern.css +55 -0
- package/src/themes/retro.css +112 -0
- package/src/themes/terminal.css +179 -0
- package/src/tokens/brand.css +148 -0
- package/src/tokens/contrast.browser.test.ts +140 -0
- package/src/tokens/font.css +24 -0
- package/src/tokens/foundation/aliases.css +28 -0
- package/src/tokens/foundation/effects.css +31 -0
- package/src/tokens/foundation/fonts.css +11 -0
- package/src/tokens/foundation/motion.css +19 -0
- package/src/tokens/foundation/palette.css +255 -0
- package/src/tokens/foundation/primitives.css +420 -0
- package/src/tokens/foundation/radius.css +36 -0
- package/src/tokens/foundation/typography.css +191 -0
- package/src/tokens/foundation.css +15 -0
- package/src/tokens/index.css +9 -0
- package/src/tokens/motion.css +27 -0
- package/src/tokens/personalization-axes.browser.test.ts +240 -0
- package/src/tokens/radius.css +35 -0
- package/src/tokens/semantics.css +157 -0
- package/src/tokens/space.css +21 -0
- package/src/tokens/surface.css +184 -0
- package/src/tokens/theme-overrides.browser.test.ts +140 -0
- package/src/tokens/type-scale.css +20 -0
- package/src/tokens/widget-chrome-signature.browser.test.ts +225 -0
- package/src/tokens/widget-paint.browser.test.ts +98 -0
- package/src/utils/code-highlighting.css +35 -0
- package/src/utils/debug.css +453 -0
- package/src/utils/index.css +9 -0
- package/src/utils/scroll-bar.css +78 -0
- package/src/utils/scroll-mask.css +119 -0
- package/src/utils/view-transition.css +16 -0
- package/src/z-layers.ts +40 -0
package/package.json
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atom63/styles",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"description": "CSS tokens, themes, contracts, and utilities for the Atom63 design system",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/ATOM63/atom63-design-system.git",
|
|
9
|
+
"directory": "packages/styles"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/ATOM63/atom63-design-system/tree/main/packages/styles#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ATOM63/atom63-design-system/issues"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"atom63",
|
|
20
|
+
"design-system",
|
|
21
|
+
"css",
|
|
22
|
+
"design-tokens",
|
|
23
|
+
"themes",
|
|
24
|
+
"tailwindcss"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"style": "./src/index.css",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": "./src/index.css",
|
|
30
|
+
"./compat": "./src/compat/index.css",
|
|
31
|
+
"./compat/a63-from-shadcn": "./src/compat/a63-from-shadcn.css",
|
|
32
|
+
"./animations": "./src/animations/index.css",
|
|
33
|
+
"./compat/mdx": "./src/compat/mdx.css",
|
|
34
|
+
"./compat/shadcn": "./src/compat/shadcn.css",
|
|
35
|
+
"./contracts": "./src/contracts/index.css",
|
|
36
|
+
"./contracts/action": "./src/contracts/action.css",
|
|
37
|
+
"./contracts/choice": "./src/contracts/choice.css",
|
|
38
|
+
"./contracts/control": "./src/contracts/control.css",
|
|
39
|
+
"./contracts/environment": "./src/contracts/environment.css",
|
|
40
|
+
"./contracts/field": "./src/contracts/field.css",
|
|
41
|
+
"./contracts/marker": "./src/contracts/marker.css",
|
|
42
|
+
"./contracts/menu": "./src/contracts/menu.css",
|
|
43
|
+
"./contracts/overlay": "./src/contracts/overlay.css",
|
|
44
|
+
"./contracts/segment": "./src/contracts/segment.css",
|
|
45
|
+
"./contracts/selection": "./src/contracts/selection.css",
|
|
46
|
+
"./contracts/surface": "./src/contracts/surface.css",
|
|
47
|
+
"./contracts/toggle": "./src/contracts/toggle.css",
|
|
48
|
+
"./contracts/track": "./src/contracts/track.css",
|
|
49
|
+
"./contracts/trigger": "./src/contracts/trigger.css",
|
|
50
|
+
"./contracts/widget": "./src/contracts/widget.css",
|
|
51
|
+
"./tailwind": "./src/tailwind/index.css",
|
|
52
|
+
"./tailwind/animations": "./src/tailwind/animations.css",
|
|
53
|
+
"./tailwind/theme": "./src/tailwind/theme.css",
|
|
54
|
+
"./tailwind/utilities": "./src/tailwind/utilities.css",
|
|
55
|
+
"./tailwind/variants": "./src/tailwind/variants.css",
|
|
56
|
+
"./themes": "./src/themes/index.css",
|
|
57
|
+
"./themes/aqua": "./src/themes/aqua.css",
|
|
58
|
+
"./themes/modern": "./src/themes/modern.css",
|
|
59
|
+
"./themes/retro": "./src/themes/retro.css",
|
|
60
|
+
"./themes/terminal": "./src/themes/terminal.css",
|
|
61
|
+
"./os": "./src/os/index.css",
|
|
62
|
+
"./os/macos": "./src/os/macos.css",
|
|
63
|
+
"./os/windows": "./src/os/windows.css",
|
|
64
|
+
"./tokens": "./src/tokens/index.css",
|
|
65
|
+
"./tokens/brand": "./src/tokens/brand.css",
|
|
66
|
+
"./tokens/foundation": "./src/tokens/foundation.css",
|
|
67
|
+
"./tokens/foundation/aliases": "./src/tokens/foundation/aliases.css",
|
|
68
|
+
"./tokens/foundation/effects": "./src/tokens/foundation/effects.css",
|
|
69
|
+
"./tokens/foundation/fonts": "./src/tokens/foundation/fonts.css",
|
|
70
|
+
"./tokens/foundation/motion": "./src/tokens/foundation/motion.css",
|
|
71
|
+
"./tokens/foundation/palette": "./src/tokens/foundation/palette.css",
|
|
72
|
+
"./tokens/foundation/primitives": "./src/tokens/foundation/primitives.css",
|
|
73
|
+
"./tokens/foundation/radius": "./src/tokens/foundation/radius.css",
|
|
74
|
+
"./tokens/foundation/typography": "./src/tokens/foundation/typography.css",
|
|
75
|
+
"./tokens/motion": "./src/tokens/motion.css",
|
|
76
|
+
"./tokens/radius": "./src/tokens/radius.css",
|
|
77
|
+
"./tokens/semantics": "./src/tokens/semantics.css",
|
|
78
|
+
"./tokens/space": "./src/tokens/space.css",
|
|
79
|
+
"./tokens/surface": "./src/tokens/surface.css",
|
|
80
|
+
"./utils": "./src/utils/index.css",
|
|
81
|
+
"./utils/code-highlighting": "./src/utils/code-highlighting.css",
|
|
82
|
+
"./utils/debug": "./src/utils/debug.css",
|
|
83
|
+
"./utils/scroll-bar": "./src/utils/scroll-bar.css",
|
|
84
|
+
"./utils/scroll-mask": "./src/utils/scroll-mask.css",
|
|
85
|
+
"./utils/view-transition": "./src/utils/view-transition.css",
|
|
86
|
+
"./z-layers": {
|
|
87
|
+
"typescript": "./src/z-layers.ts",
|
|
88
|
+
"types": "./src/z-layers.ts",
|
|
89
|
+
"default": "./src/z-layers.ts"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"files": [
|
|
93
|
+
"generated",
|
|
94
|
+
"src"
|
|
95
|
+
],
|
|
96
|
+
"sideEffects": [
|
|
97
|
+
"*.css"
|
|
98
|
+
],
|
|
99
|
+
"scripts": {
|
|
100
|
+
"generate:tokens": "node scripts/generate-token-manifest.mjs",
|
|
101
|
+
"check:tokens": "node scripts/check-token-manifest.mjs",
|
|
102
|
+
"lint": "eslint . --cache --max-warnings 0",
|
|
103
|
+
"test": "vitest run"
|
|
104
|
+
},
|
|
105
|
+
"dependencies": {
|
|
106
|
+
"tw-animate-css": "1.4.0"
|
|
107
|
+
},
|
|
108
|
+
"devDependencies": {
|
|
109
|
+
"@atom63/eslint-config": "workspace:*",
|
|
110
|
+
"@vitest/browser": "4.1.10",
|
|
111
|
+
"@vitest/browser-playwright": "4.1.10",
|
|
112
|
+
"eslint": "10.7.0",
|
|
113
|
+
"playwright": "1.61.1",
|
|
114
|
+
"vitest": "catalog:"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI component animations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/* Base UI sets --accordion-panel-height on Accordion.Panel */
|
|
6
|
+
@keyframes accordion-down {
|
|
7
|
+
from {
|
|
8
|
+
height: 0;
|
|
9
|
+
}
|
|
10
|
+
to {
|
|
11
|
+
height: var(--accordion-panel-height, auto);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@keyframes accordion-up {
|
|
16
|
+
from {
|
|
17
|
+
height: var(--accordion-panel-height, auto);
|
|
18
|
+
}
|
|
19
|
+
to {
|
|
20
|
+
height: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes marquee {
|
|
25
|
+
0% {
|
|
26
|
+
transform: translateX(0);
|
|
27
|
+
}
|
|
28
|
+
100% {
|
|
29
|
+
transform: translateX(calc(-100% - var(--gap)));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes marquee-vertical {
|
|
34
|
+
0% {
|
|
35
|
+
transform: translateY(0);
|
|
36
|
+
}
|
|
37
|
+
100% {
|
|
38
|
+
transform: translateY(calc(-100% - var(--gap)));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes skeleton-shimmer {
|
|
43
|
+
0% {
|
|
44
|
+
transform: translateX(-100%);
|
|
45
|
+
}
|
|
46
|
+
100% {
|
|
47
|
+
transform: translateX(100%);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@media (prefers-reduced-motion: reduce) {
|
|
52
|
+
.skeleton::after {
|
|
53
|
+
animation: none;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './animations.css';
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Reverse compat: --a63-* FROM shadcn (opt-in).
|
|
3
|
+
*
|
|
4
|
+
* The INVERSE of compat/shadcn.css. For external shadcn apps that DON'T load the
|
|
5
|
+
* @atom63/styles foundation but render @atom63/ui-react components, this defines
|
|
6
|
+
* the canonical --a63-* layer in terms of shadcn tokens those apps already
|
|
7
|
+
* provide (--background/--card/--popover/--primary/…), plus flat defaults for
|
|
8
|
+
* the tactile archetype tokens the DS foundation would otherwise supply.
|
|
9
|
+
*
|
|
10
|
+
* Load this + `@atom63/ui-react/recipes.css` in a shadcn app to render DS
|
|
11
|
+
* components with a clean, flat, shadcn-matching look. Import via
|
|
12
|
+
* `@atom63/styles/compat/a63-from-shadcn`; NOT part of the default bundle.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
:root {
|
|
16
|
+
/* ── Semantic surfaces / text / border (from shadcn) ─────────────────── */
|
|
17
|
+
--a63-surface-page: var(--background);
|
|
18
|
+
--a63-surface-panel: var(--card);
|
|
19
|
+
--a63-surface-overlay: var(--popover);
|
|
20
|
+
--a63-surface-muted: var(--muted);
|
|
21
|
+
--a63-surface-control: var(--background);
|
|
22
|
+
--a63-surface-control-hover: var(--accent);
|
|
23
|
+
--a63-text-primary: var(--foreground);
|
|
24
|
+
--a63-text-secondary: var(--muted-foreground);
|
|
25
|
+
--a63-border-subtle: var(--border);
|
|
26
|
+
--a63-border-control: var(--input);
|
|
27
|
+
|
|
28
|
+
/* ── Action / status ─────────────────────────────────────────────────── */
|
|
29
|
+
--a63-action-primary: var(--primary);
|
|
30
|
+
--a63-action-primary-foreground: var(--primary-foreground);
|
|
31
|
+
--a63-action-primary-hover: color-mix(in oklch, var(--primary) 90%, transparent);
|
|
32
|
+
--a63-action-danger: var(--destructive);
|
|
33
|
+
--a63-action-danger-foreground: var(--destructive-foreground, white);
|
|
34
|
+
--a63-action-danger-hover: color-mix(in oklch, var(--destructive) 90%, transparent);
|
|
35
|
+
--a63-action-neutral: var(--foreground);
|
|
36
|
+
--a63-action-neutral-foreground: var(--background);
|
|
37
|
+
--a63-status-info: var(--info, oklch(0.6 0.14 250));
|
|
38
|
+
--a63-status-info-foreground: white;
|
|
39
|
+
--a63-status-success: var(--success, oklch(0.65 0.16 150));
|
|
40
|
+
--a63-status-success-foreground: white;
|
|
41
|
+
--a63-status-warning: var(--warning, oklch(0.75 0.15 80));
|
|
42
|
+
--a63-status-warning-foreground: white;
|
|
43
|
+
|
|
44
|
+
--a63-scrim: color-mix(in oklch, black 40%, transparent);
|
|
45
|
+
--a63-focus-ring: var(--ring);
|
|
46
|
+
|
|
47
|
+
/* ── Tactile archetype tokens → FLAT (shadcn has no bevel/gloss system) ── */
|
|
48
|
+
--a63-control-shadow: 0 0 #0000;
|
|
49
|
+
--a63-control-shadow-active: 0 0 #0000;
|
|
50
|
+
--a63-control-shadow-flat: 0 0 #0000;
|
|
51
|
+
--a63-control-gloss: none;
|
|
52
|
+
--a63-control-highlight: transparent;
|
|
53
|
+
--a63-surface-shadow: 0 0 #0000;
|
|
54
|
+
--a63-track-shadow: 0 0 #0000;
|
|
55
|
+
--a63-field-shadow: 0 0 #0000;
|
|
56
|
+
--a63-marker-shadow: 0 0 #0000;
|
|
57
|
+
--a63-overlay-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
58
|
+
--a63-control-focus-ring-color: var(--ring);
|
|
59
|
+
--a63-control-focus-ring-width: 2px;
|
|
60
|
+
--a63-control-border-width: 1px;
|
|
61
|
+
|
|
62
|
+
/* ── Geometry / type ramp (fixed, standard-control values) ───────────── */
|
|
63
|
+
--a63-radius-control: var(--radius, 0.5rem);
|
|
64
|
+
--a63-control-radius: var(--radius, 0.5rem);
|
|
65
|
+
--a63-control-gap: 0.5rem;
|
|
66
|
+
--a63-control-font-family: inherit;
|
|
67
|
+
--a63-control-font-weight: 500;
|
|
68
|
+
--a63-control-font-size-xs: 0.75rem;
|
|
69
|
+
--a63-control-font-size-sm: 0.75rem;
|
|
70
|
+
--a63-control-font-size-md: 0.875rem;
|
|
71
|
+
--a63-control-font-size-lg: 1rem;
|
|
72
|
+
--a63-control-font-size-xl: 1.125rem;
|
|
73
|
+
--a63-control-height-xs: 1.5rem;
|
|
74
|
+
--a63-control-height-sm: 2rem;
|
|
75
|
+
--a63-control-height-md: 2.25rem;
|
|
76
|
+
--a63-control-height-lg: 2.5rem;
|
|
77
|
+
--a63-control-height-xl: 2.75rem;
|
|
78
|
+
--a63-control-padding-inline-xs: 0.5rem;
|
|
79
|
+
--a63-control-padding-inline-sm: 0.625rem;
|
|
80
|
+
--a63-control-padding-inline-md: 0.75rem;
|
|
81
|
+
--a63-control-padding-inline-lg: 0.875rem;
|
|
82
|
+
--a63-control-padding-inline-xl: 1rem;
|
|
83
|
+
--a63-control-min-size: 1.5rem;
|
|
84
|
+
--a63-control-min-size-lg: var(--a63-control-min-size);
|
|
85
|
+
--a63-control-min-size-xl: var(--a63-control-min-size);
|
|
86
|
+
--a63-control-min-target: 2.25rem;
|
|
87
|
+
--a63-control-min-target-lg: var(--a63-control-min-target);
|
|
88
|
+
--a63-control-min-target-xl: var(--a63-control-min-target);
|
|
89
|
+
--a63-density-scale: 1;
|
|
90
|
+
--a63-editable-font-size-min: 0px;
|
|
91
|
+
--a63-safe-area-top: env(safe-area-inset-top, 0px);
|
|
92
|
+
--a63-safe-area-right: env(safe-area-inset-right, 0px);
|
|
93
|
+
--a63-safe-area-bottom: env(safe-area-inset-bottom, 0px);
|
|
94
|
+
--a63-safe-area-left: env(safe-area-inset-left, 0px);
|
|
95
|
+
--a63-viewport-height: 100vh;
|
|
96
|
+
|
|
97
|
+
--a63-space-unit: 0.25rem;
|
|
98
|
+
--a63-space-0: 0;
|
|
99
|
+
--a63-space-1: 0.25rem;
|
|
100
|
+
--a63-space-2: 0.5rem;
|
|
101
|
+
--a63-space-3: 0.75rem;
|
|
102
|
+
--a63-space-4: 1rem;
|
|
103
|
+
--a63-space-5: 1.25rem;
|
|
104
|
+
--a63-space-6: 1.5rem;
|
|
105
|
+
|
|
106
|
+
/* Brand ramp → derive from --primary so DS brand-tinted bits read as accent. */
|
|
107
|
+
--a63-brand-500: var(--primary);
|
|
108
|
+
--a63-brand-50: color-mix(in oklch, var(--primary) 8%, var(--background));
|
|
109
|
+
--a63-brand-100: color-mix(in oklch, var(--primary) 14%, var(--background));
|
|
110
|
+
--a63-brand-200: color-mix(in oklch, var(--primary) 26%, var(--background));
|
|
111
|
+
--a63-brand-300: color-mix(in oklch, var(--primary) 40%, var(--background));
|
|
112
|
+
--a63-brand-400: color-mix(in oklch, var(--primary) 68%, var(--background));
|
|
113
|
+
--a63-brand-600: color-mix(in oklch, var(--primary) 88%, black);
|
|
114
|
+
--a63-brand-700: color-mix(in oklch, var(--primary) 74%, black);
|
|
115
|
+
--a63-brand-800: color-mix(in oklch, var(--primary) 60%, black);
|
|
116
|
+
--a63-brand-900: color-mix(in oklch, var(--primary) 46%, black);
|
|
117
|
+
--a63-brand-950: color-mix(in oklch, var(--primary) 34%, black);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media (pointer: coarse) {
|
|
121
|
+
:root {
|
|
122
|
+
--a63-control-min-size: 2rem;
|
|
123
|
+
--a63-control-min-size-lg: var(--a63-control-min-size);
|
|
124
|
+
--a63-control-min-size-xl: var(--a63-control-min-size);
|
|
125
|
+
--a63-control-min-target: 2.75rem;
|
|
126
|
+
--a63-control-min-target-lg: 3rem;
|
|
127
|
+
--a63-control-min-target-xl: 3.25rem;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@supports (height: 100dvh) {
|
|
132
|
+
:root {
|
|
133
|
+
--a63-viewport-height: 100dvh;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media (max-width: 40rem) {
|
|
138
|
+
:root {
|
|
139
|
+
--a63-editable-font-size-min: 1rem;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* MDX compatibility bridge.
|
|
3
|
+
*
|
|
4
|
+
* Keep MDX-prefixed variables out of the generic token foundation. Consumers
|
|
5
|
+
* that still need the @atom63/mdx CSS motion names can opt into this adapter.
|
|
6
|
+
*/
|
|
7
|
+
:root {
|
|
8
|
+
--mdx-motion-fast: var(--duration-fast);
|
|
9
|
+
--mdx-motion-base: var(--duration-normal);
|
|
10
|
+
--mdx-motion-slow: var(--duration-slow);
|
|
11
|
+
--mdx-ease-standard: var(--ease-standard);
|
|
12
|
+
--mdx-ease-emphasized: var(--ease-emphasized);
|
|
13
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* shadcn/ui compatibility bridge (opt-in).
|
|
3
|
+
*
|
|
4
|
+
* Aliases the shadcn token vocabulary back onto the canonical --a63-* semantic
|
|
5
|
+
* layer, so shadcn-based components keep working without making those names part
|
|
6
|
+
* of the core foundation. Import via `@atom63/styles/compat/shadcn`; NOT part of
|
|
7
|
+
* the default bundle. Light/dark is handled by the --a63-* layer, so these are
|
|
8
|
+
* mode-agnostic alias-backs except where shadcn intentionally diverged (sidebar).
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
--background: var(--a63-surface-page);
|
|
13
|
+
--foreground: var(--a63-text-primary);
|
|
14
|
+
--card: var(--a63-surface-panel);
|
|
15
|
+
--card-foreground: var(--a63-text-primary);
|
|
16
|
+
--popover: var(--a63-surface-overlay);
|
|
17
|
+
--popover-foreground: var(--a63-text-primary);
|
|
18
|
+
--muted: var(--a63-surface-muted);
|
|
19
|
+
--muted-foreground: var(--a63-text-secondary);
|
|
20
|
+
--secondary: var(--a63-surface-muted);
|
|
21
|
+
--secondary-foreground: var(--a63-text-secondary);
|
|
22
|
+
--accent: var(--a63-surface-control-hover);
|
|
23
|
+
--accent-foreground: var(--a63-text-primary);
|
|
24
|
+
--border: var(--a63-border-subtle);
|
|
25
|
+
--input: var(--a63-border-control);
|
|
26
|
+
--ring: var(--a63-focus-ring);
|
|
27
|
+
--primary: var(--a63-action-primary);
|
|
28
|
+
--primary-foreground: var(--a63-action-primary-foreground);
|
|
29
|
+
--destructive: var(--a63-action-danger);
|
|
30
|
+
--info: var(--a63-status-info);
|
|
31
|
+
--success: var(--a63-status-success);
|
|
32
|
+
--warning: var(--a63-status-warning);
|
|
33
|
+
|
|
34
|
+
/* Fixed mode references (adapter-local) */
|
|
35
|
+
--light: var(--surface-light-1);
|
|
36
|
+
--dark: var(--surface-dark-1);
|
|
37
|
+
|
|
38
|
+
/* Sidebar */
|
|
39
|
+
--sidebar: var(--a63-surface-muted);
|
|
40
|
+
--sidebar-foreground: var(--a63-text-primary);
|
|
41
|
+
--sidebar-accent: var(--a63-surface-control-hover);
|
|
42
|
+
--sidebar-accent-foreground: var(--a63-text-primary);
|
|
43
|
+
--sidebar-border: var(--a63-border-subtle);
|
|
44
|
+
--sidebar-primary: var(--a63-action-primary);
|
|
45
|
+
--sidebar-primary-foreground: var(--a63-action-primary-foreground);
|
|
46
|
+
--sidebar-ring: var(--a63-focus-ring);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dark {
|
|
50
|
+
/* shadcn's dark sidebar collapses onto the page surface. */
|
|
51
|
+
--sidebar: var(--a63-surface-page);
|
|
52
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Action contract — momentary controls that perform an action now.
|
|
3
|
+
*
|
|
4
|
+
* Covers Button, IconButton, SplitButton, and ButtonGroup. Action controls share
|
|
5
|
+
* the physical CONTROL substrate (height, padding, focus ring, press feedback),
|
|
6
|
+
* but get their own namespace so momentary "pressed" styling never has to stand
|
|
7
|
+
* in for persistent selected/on styling (Toggle/Segment).
|
|
8
|
+
*
|
|
9
|
+
* Axis-dependent colour hooks are intentionally not declared at :root. Recipes
|
|
10
|
+
* should consume them at the use-site with live semantic fallbacks, e.g.
|
|
11
|
+
* --a63-action-control-background -> var(--a63-action-neutral)
|
|
12
|
+
* --a63-action-control-foreground -> var(--a63-action-neutral-foreground)
|
|
13
|
+
* --a63-action-primary-background -> var(--a63-action-primary)
|
|
14
|
+
* --a63-action-danger-background -> var(--a63-action-danger)
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
:root {
|
|
18
|
+
--a63-action-control-border-width: var(--a63-control-border-width);
|
|
19
|
+
--a63-action-control-focus-ring-width: var(--a63-control-focus-ring-width);
|
|
20
|
+
--a63-action-control-gap: var(--a63-control-gap);
|
|
21
|
+
--a63-action-control-gloss: var(--a63-control-gloss);
|
|
22
|
+
--a63-action-control-highlight: var(--a63-control-highlight);
|
|
23
|
+
--a63-action-control-press-transform: var(--a63-control-press-transform);
|
|
24
|
+
--a63-action-control-radius: var(--a63-control-radius);
|
|
25
|
+
--a63-action-control-shadow: var(--a63-control-shadow);
|
|
26
|
+
--a63-action-control-shadow-active: var(--a63-control-shadow-active);
|
|
27
|
+
--a63-action-control-shadow-flat: var(--a63-control-shadow-flat);
|
|
28
|
+
--a63-action-control-shadow-tint: var(--a63-control-shadow-tint);
|
|
29
|
+
--a63-action-control-text-shadow: var(--a63-control-text-shadow);
|
|
30
|
+
--a63-action-disabled-opacity: 0.56;
|
|
31
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Badge palette contract — category/tag hues owned by @atom63/styles.
|
|
3
|
+
*
|
|
4
|
+
* Recipes read --a63-badge-*-accent / --a63-badge-*-foreground only. Accent
|
|
5
|
+
* references foundation primitives; foreground flips for dark mode contrast.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
:root,
|
|
9
|
+
.light,
|
|
10
|
+
[data-a63-mode='light'] {
|
|
11
|
+
--a63-badge-red-accent: var(--color-red-500);
|
|
12
|
+
--a63-badge-red-foreground: var(--color-red-600);
|
|
13
|
+
--a63-badge-orange-accent: var(--color-orange-500);
|
|
14
|
+
--a63-badge-orange-foreground: var(--color-orange-600);
|
|
15
|
+
--a63-badge-amber-accent: var(--color-amber-500);
|
|
16
|
+
--a63-badge-amber-foreground: var(--color-amber-600);
|
|
17
|
+
--a63-badge-yellow-accent: var(--color-yellow-500);
|
|
18
|
+
--a63-badge-yellow-foreground: var(--color-yellow-600);
|
|
19
|
+
--a63-badge-lime-accent: var(--color-lime-500);
|
|
20
|
+
--a63-badge-lime-foreground: var(--color-lime-600);
|
|
21
|
+
--a63-badge-green-accent: var(--color-green-500);
|
|
22
|
+
--a63-badge-green-foreground: var(--color-green-600);
|
|
23
|
+
--a63-badge-emerald-accent: var(--color-emerald-500);
|
|
24
|
+
--a63-badge-emerald-foreground: var(--color-emerald-600);
|
|
25
|
+
--a63-badge-teal-accent: var(--color-teal-500);
|
|
26
|
+
--a63-badge-teal-foreground: var(--color-teal-600);
|
|
27
|
+
--a63-badge-cyan-accent: var(--color-cyan-500);
|
|
28
|
+
--a63-badge-cyan-foreground: var(--color-cyan-600);
|
|
29
|
+
--a63-badge-sky-accent: var(--color-sky-500);
|
|
30
|
+
--a63-badge-sky-foreground: var(--color-sky-600);
|
|
31
|
+
--a63-badge-blue-accent: var(--color-blue-500);
|
|
32
|
+
--a63-badge-blue-foreground: var(--color-blue-600);
|
|
33
|
+
--a63-badge-indigo-accent: var(--color-indigo-500);
|
|
34
|
+
--a63-badge-indigo-foreground: var(--color-indigo-600);
|
|
35
|
+
--a63-badge-violet-accent: var(--color-violet-500);
|
|
36
|
+
--a63-badge-violet-foreground: var(--color-violet-600);
|
|
37
|
+
--a63-badge-purple-accent: var(--color-purple-500);
|
|
38
|
+
--a63-badge-purple-foreground: var(--color-purple-600);
|
|
39
|
+
--a63-badge-fuchsia-accent: var(--color-fuchsia-500);
|
|
40
|
+
--a63-badge-fuchsia-foreground: var(--color-fuchsia-600);
|
|
41
|
+
--a63-badge-pink-accent: var(--color-pink-500);
|
|
42
|
+
--a63-badge-pink-foreground: var(--color-pink-600);
|
|
43
|
+
--a63-badge-rose-accent: var(--color-rose-500);
|
|
44
|
+
--a63-badge-rose-foreground: var(--color-rose-600);
|
|
45
|
+
--a63-badge-neutral-accent: var(--color-neutral-500);
|
|
46
|
+
--a63-badge-neutral-foreground: var(--color-neutral-600);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:is(.dark, [data-a63-mode='dark']) {
|
|
50
|
+
--a63-badge-red-foreground: var(--color-red-400);
|
|
51
|
+
--a63-badge-orange-foreground: var(--color-orange-400);
|
|
52
|
+
--a63-badge-amber-foreground: var(--color-amber-400);
|
|
53
|
+
--a63-badge-yellow-foreground: var(--color-yellow-400);
|
|
54
|
+
--a63-badge-lime-foreground: var(--color-lime-400);
|
|
55
|
+
--a63-badge-green-foreground: var(--color-green-400);
|
|
56
|
+
--a63-badge-emerald-foreground: var(--color-emerald-400);
|
|
57
|
+
--a63-badge-teal-foreground: var(--color-teal-400);
|
|
58
|
+
--a63-badge-cyan-foreground: var(--color-cyan-400);
|
|
59
|
+
--a63-badge-sky-foreground: var(--color-sky-400);
|
|
60
|
+
--a63-badge-blue-foreground: var(--color-blue-400);
|
|
61
|
+
--a63-badge-indigo-foreground: var(--color-indigo-400);
|
|
62
|
+
--a63-badge-violet-foreground: var(--color-violet-400);
|
|
63
|
+
--a63-badge-purple-foreground: var(--color-purple-400);
|
|
64
|
+
--a63-badge-fuchsia-foreground: var(--color-fuchsia-400);
|
|
65
|
+
--a63-badge-pink-foreground: var(--color-pink-400);
|
|
66
|
+
--a63-badge-rose-foreground: var(--color-rose-400);
|
|
67
|
+
--a63-badge-neutral-foreground: var(--color-neutral-400);
|
|
68
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Choice contract — form controls that expose checked/selected value state.
|
|
3
|
+
*
|
|
4
|
+
* Covers Checkbox, Radio, and Switch. This is the visual home for indicators,
|
|
5
|
+
* dots, thumbs, and on/off tracks. It aliases the older `selection` namespace so
|
|
6
|
+
* current recipes keep working while new recipes can use the clearer name.
|
|
7
|
+
*
|
|
8
|
+
* Axis-dependent colour hooks are resolved at the recipe use-site:
|
|
9
|
+
* --a63-choice-accent -> var(--a63-action-primary)
|
|
10
|
+
* --a63-choice-border -> var(--a63-border-control)
|
|
11
|
+
* --a63-choice-track-off -> var(--a63-surface-control)
|
|
12
|
+
* --a63-choice-focus-ring -> var(--a63-focus-ring)
|
|
13
|
+
*
|
|
14
|
+
* Material hooks are axis-independent defaults. Themes override them to express
|
|
15
|
+
* glass, bevel, or phosphor treatment without making choice controls inherit the
|
|
16
|
+
* full Button chrome. Switch maps the box shadows to its track and the indicator
|
|
17
|
+
* gloss to its checked fill; Checkbox and Radio use the same hooks on their
|
|
18
|
+
* boxes and indicators.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
:root {
|
|
22
|
+
--a63-choice-thumb: var(--a63-selection-thumb);
|
|
23
|
+
--a63-choice-thumb-fg: var(--a63-selection-thumb-fg);
|
|
24
|
+
--a63-choice-switch-thumb-size: var(--a63-switch-thumb-size);
|
|
25
|
+
--a63-choice-border-width: var(--a63-control-border-width);
|
|
26
|
+
--a63-choice-focus-ring-width: var(--a63-control-focus-ring-width);
|
|
27
|
+
--a63-choice-feedback-duration: var(--a63-control-feedback-duration);
|
|
28
|
+
--a63-choice-feedback-ease: var(--a63-control-feedback-ease);
|
|
29
|
+
--a63-choice-box-shadow: none;
|
|
30
|
+
--a63-choice-box-shadow-checked: none;
|
|
31
|
+
--a63-choice-indicator-gloss: none;
|
|
32
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared control contracts.
|
|
3
|
+
*
|
|
4
|
+
* Component recipes consume these first and introduce component-specific
|
|
5
|
+
* variables only for genuinely unique needs. Design language overrides the
|
|
6
|
+
* sizing/feedback tokens (see contracts/environment.css); recipes never hardcode
|
|
7
|
+
* sizes. Radius comes from the semantic ramp (theme/personalization), not here.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
/* Height ramp (xs..xl) — web defaults (desktop density: 24/28/32/36/40, to
|
|
12
|
+
match production @atom63/ui). iOS overrides in environment.css. */
|
|
13
|
+
--a63-control-height-xs: calc(var(--a63-space-unit) * 6);
|
|
14
|
+
--a63-control-height-sm: calc(var(--a63-space-unit) * 7);
|
|
15
|
+
--a63-control-height-md: calc(var(--a63-space-unit) * 8);
|
|
16
|
+
--a63-control-height-lg: calc(var(--a63-space-unit) * 9);
|
|
17
|
+
--a63-control-height-xl: calc(var(--a63-space-unit) * 10);
|
|
18
|
+
|
|
19
|
+
/*
|
|
20
|
+
* Recipes resolve rendered size at their own use-site:
|
|
21
|
+
* max(calc(height * density), size-appropriate min-SIZE)
|
|
22
|
+
* Do not cache that formula in a :root custom property. Input, density, and
|
|
23
|
+
* design-language axes can be scoped to nested providers; deriving at :root
|
|
24
|
+
* would freeze the root values and ignore those local overrides.
|
|
25
|
+
*
|
|
26
|
+
* Floor with --a63-control-min-size (rendered geometry), NOT
|
|
27
|
+
* --a63-control-min-target (interaction). The two are separate on purpose —
|
|
28
|
+
* see contracts/environment.css. Touch therefore keeps the xs/sm/md ramp
|
|
29
|
+
* intact and satisfies the 44px target by expanding the interaction area:
|
|
30
|
+
* compact markers (checkbox, radio, switch, slider, badge) via a positioned
|
|
31
|
+
* pseudo-element, button-class controls the same way. Square icon buttons are
|
|
32
|
+
* NOT an exception — they sit on the rendered ramp like everything else, so a
|
|
33
|
+
* 32px icon button and a 32px text button line up in the same toolbar row.
|
|
34
|
+
*
|
|
35
|
+
* The button recipe delivers that interaction floor on `::before`. Consumer
|
|
36
|
+
* CSS must not paint on, resize, or hide `.a63-Button::before`: it wins the
|
|
37
|
+
* cascade at higher specificity than a single consumer class, and silently
|
|
38
|
+
* breaks either the visual or the touch target.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
/* Inline padding ramp */
|
|
42
|
+
--a63-control-padding-inline-xs: var(--a63-space-2);
|
|
43
|
+
--a63-control-padding-inline-sm: var(--a63-space-2_5);
|
|
44
|
+
--a63-control-padding-inline-md: var(--a63-space-3);
|
|
45
|
+
--a63-control-padding-inline-lg: var(--a63-space-3_5);
|
|
46
|
+
--a63-control-padding-inline-xl: var(--a63-space-4);
|
|
47
|
+
|
|
48
|
+
/* Text ramp */
|
|
49
|
+
--a63-control-font-weight: var(--font-weight-medium, 500);
|
|
50
|
+
--a63-control-font-family: var(--font-family-sans);
|
|
51
|
+
--a63-control-text-shadow: none;
|
|
52
|
+
--a63-control-font-size-xs: var(--typography-xs-font-size);
|
|
53
|
+
--a63-control-font-size-sm: var(--typography-xs-font-size);
|
|
54
|
+
--a63-control-font-size-md: var(--typography-sm-font-size);
|
|
55
|
+
--a63-control-font-size-lg: var(--typography-base-font-size);
|
|
56
|
+
--a63-control-font-size-xl: var(--typography-lg-font-size);
|
|
57
|
+
|
|
58
|
+
/* Icon geometry follows control size, not the compressed text ramp. */
|
|
59
|
+
--a63-control-icon-size-xs: 0.75rem;
|
|
60
|
+
--a63-control-icon-size-sm: 0.875rem;
|
|
61
|
+
--a63-control-icon-size-md: 1rem;
|
|
62
|
+
--a63-control-icon-size-lg: 1.125rem;
|
|
63
|
+
--a63-control-icon-size-xl: 1.25rem;
|
|
64
|
+
|
|
65
|
+
--a63-control-gap: var(--a63-space-2);
|
|
66
|
+
--a63-control-radius: var(--a63-radius-control);
|
|
67
|
+
|
|
68
|
+
/* Row block padding. Rows (Item today; Menu/Command rows are the intended
|
|
69
|
+
next tenants) take their height from content + this padding, floored by the
|
|
70
|
+
control ramp, so a single-line row lands on ~44pt and a two-line row on
|
|
71
|
+
~59pt. Those targets come from our own measurement of shipping iOS apps
|
|
72
|
+
(docs/design-system/web-ios-token-parity.md) — Apple publishes no iOS row
|
|
73
|
+
height, so do not cite UIKit cell metrics for them. It lives here rather
|
|
74
|
+
than in the recipe
|
|
75
|
+
because the design-language axis has to retune it (contracts/environment.css)
|
|
76
|
+
and axes own tokens; recipes only read them. */
|
|
77
|
+
--a63-row-padding-block-xs: var(--a63-space-2);
|
|
78
|
+
--a63-row-padding-block-sm: var(--a63-space-3);
|
|
79
|
+
--a63-row-padding-block-md: var(--a63-space-4);
|
|
80
|
+
--a63-control-border-width: 1px;
|
|
81
|
+
/* `0 0 #0000` not `none` — composed into comma-separated box-shadow lists
|
|
82
|
+
alongside the focus ring, where `none` invalidates the declaration. */
|
|
83
|
+
--a63-control-shadow: 0 0 #0000;
|
|
84
|
+
--a63-control-shadow-active: var(--a63-control-shadow);
|
|
85
|
+
/* Shadow for flat/bordered variants (outline, destructive-outline). Defaults to
|
|
86
|
+
the regular shadow; a theme can soften it — e.g. aqua drops the bright top rim
|
|
87
|
+
that's too strong on a light fill while keeping a gentle lift. */
|
|
88
|
+
--a63-control-shadow-flat: var(--a63-control-shadow);
|
|
89
|
+
/* How strongly a control's drop shadow is tinted by its own fill colour (0% =
|
|
90
|
+
neutral shadow). The recipe composes the tinted layer at the button so it
|
|
91
|
+
follows each button's colour; a theme just sets the strength. */
|
|
92
|
+
--a63-control-shadow-tint: 0%;
|
|
93
|
+
--a63-control-gloss: none;
|
|
94
|
+
/* A gloss reflection panel painted in the top of the control (recipe ::after);
|
|
95
|
+
none = no reflection. Themes set a gradient (e.g. aqua's glass highlight). */
|
|
96
|
+
--a63-control-highlight: none;
|
|
97
|
+
--a63-control-focus-ring-width: 3px;
|
|
98
|
+
--a63-control-focus-ring-color: var(--a63-focus-ring);
|
|
99
|
+
--a63-control-feedback-duration: var(--a63-motion-control-feedback-duration);
|
|
100
|
+
--a63-control-feedback-ease: var(--a63-motion-ease-standard);
|
|
101
|
+
--a63-control-press-transform: translateY(1px);
|
|
102
|
+
}
|