@atom63/styles 0.1.0-beta.1 → 0.1.0-beta.11
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/LICENSE +21 -0
- package/README.md +22 -13
- package/generated/atom63.figma-sync.json +23277 -0
- package/generated/atom63.tokens.json +19650 -8403
- package/generated/z-layers.d.ts +33 -0
- package/generated/z-layers.js +31 -0
- package/package.json +29 -15
- package/src/compat/a63-from-shadcn.css +281 -0
- package/src/compat/shadcn.browser.test.ts +23 -0
- package/src/compat/shadcn.css +133 -17
- package/src/contracts/action.css +4 -3
- package/src/contracts/action.native.css +11 -0
- package/src/contracts/action.tokens.json +66 -0
- package/src/contracts/badge.css +128 -58
- package/src/contracts/badge.resolver.json +454 -0
- package/src/contracts/choice.css +5 -2
- package/src/contracts/choice.native.css +9 -0
- package/src/contracts/choice.tokens.json +66 -0
- package/src/contracts/control.css +54 -57
- package/src/contracts/control.native.css +13 -0
- package/src/contracts/control.tokens.json +294 -0
- package/src/contracts/environment.css +178 -60
- package/src/contracts/environment.native.css +23 -0
- package/src/contracts/environment.resolver.json +1210 -0
- package/src/contracts/field.css +4 -2
- package/src/contracts/field.tokens.json +40 -0
- package/src/contracts/marker.css +6 -4
- package/src/contracts/marker.tokens.json +15 -0
- package/src/contracts/menu.css +25 -61
- package/src/contracts/menu.native.css +10 -0
- package/src/contracts/menu.resolver.json +122 -0
- package/src/contracts/overlay.css +11 -13
- package/src/contracts/overlay.native.css +13 -0
- package/src/contracts/overlay.tokens.json +103 -0
- package/src/contracts/segment.css +22 -68
- package/src/contracts/segment.tokens.json +19 -0
- package/src/contracts/selection.css +5 -1
- package/src/contracts/selection.tokens.json +42 -0
- package/src/contracts/skeleton.css +18 -2
- package/src/contracts/skeleton.resolver.json +62 -0
- package/src/contracts/surface.css +17 -24
- package/src/contracts/surface.native.css +17 -0
- package/src/contracts/surface.tokens.json +154 -0
- package/src/contracts/toggle.css +27 -3
- package/src/contracts/toggle.resolver.json +129 -0
- package/src/contracts/track.css +3 -1
- package/src/contracts/track.tokens.json +39 -0
- package/src/contracts/trigger.css +5 -2
- package/src/contracts/trigger.native.css +9 -0
- package/src/contracts/trigger.tokens.json +58 -0
- package/src/contracts/widget.css +76 -51
- package/src/contracts/widget.native.css +23 -0
- package/src/contracts/widget.resolver.json +1110 -0
- package/src/tailwind/roles.json +189 -0
- package/src/tailwind/theme.css +216 -24
- package/src/tailwind/utilities.css +17 -0
- package/src/themes/aqua.css +126 -89
- package/src/themes/aqua.native.css +80 -0
- package/src/themes/aqua.resolver.json +1304 -0
- package/src/themes/modern.css +10 -14
- package/src/themes/modern.native.css +16 -0
- package/src/themes/modern.resolver.json +350 -0
- package/src/themes/retro.css +22 -26
- package/src/themes/retro.native.css +16 -0
- package/src/themes/retro.resolver.json +794 -0
- package/src/themes/terminal.css +164 -41
- package/src/themes/terminal.native.css +22 -0
- package/src/themes/terminal.resolver.json +585 -0
- package/src/tokens/brand-action.css +65 -0
- package/src/tokens/brand-action.resolver.json +155 -0
- package/src/tokens/brand-ramp.css +108 -0
- package/src/tokens/brand-ramp.resolver.json +418 -0
- package/src/tokens/brand.css +6 -146
- package/src/tokens/chart-palette.browser.test.ts +188 -0
- package/src/tokens/color-mix-space.browser.test.ts +101 -0
- package/src/tokens/contrast.browser.test.ts +303 -5
- package/src/tokens/density.browser.test.ts +167 -0
- package/src/tokens/figma-parity.browser.test.ts +270 -0
- package/src/tokens/font.css +12 -0
- package/src/tokens/font.resolver.json +128 -0
- package/src/tokens/form-factor.browser.test.ts +129 -0
- package/src/tokens/foundation/effects.css +13 -13
- package/src/tokens/foundation/effects.resolver.json +433 -0
- package/src/tokens/foundation/fonts.css +11 -5
- package/src/tokens/foundation/fonts.tokens.json +45 -0
- package/src/tokens/foundation/motion.css +3 -0
- package/src/tokens/foundation/motion.tokens.json +53 -0
- package/src/tokens/foundation/palette.css +3 -0
- package/src/tokens/foundation/palette.tokens.json +1743 -0
- package/src/tokens/foundation/primitives.css +20 -43
- package/src/tokens/foundation/primitives.tokens.json +3258 -0
- package/src/tokens/foundation/radius.css +11 -9
- package/src/tokens/foundation/radius.tokens.json +108 -0
- package/src/tokens/foundation/typography.css +49 -12
- package/src/tokens/foundation/typography.native.css +21 -0
- package/src/tokens/foundation/typography.resolver.json +1008 -0
- package/src/tokens/foundation.css +0 -1
- package/src/tokens/index.css +1 -0
- package/src/tokens/motion.css +3 -1
- package/src/tokens/motion.resolver.json +135 -0
- package/src/tokens/native-values.json +38 -0
- package/src/tokens/personalization-axes.browser.test.ts +18 -3
- package/src/tokens/plate-scope.browser.test.ts +73 -0
- package/src/tokens/radius.css +12 -8
- package/src/tokens/radius.resolver.json +138 -0
- package/src/tokens/semantics.css +716 -41
- package/src/tokens/semantics.resolver.json +1639 -0
- package/src/tokens/space.css +8 -6
- package/src/tokens/space.tokens.json +78 -0
- package/src/tokens/surface.css +13 -19
- package/src/tokens/surface.resolver.json +706 -0
- package/src/tokens/swift-parity.browser.test.ts +141 -0
- package/src/tokens/type-roles.css +88 -0
- package/src/tokens/type-roles.resolver.json +419 -0
- package/src/tokens/type-scale.css +6 -0
- package/src/tokens/type-scale.resolver.json +67 -0
- package/generated/atom63.figma-tokens.json +0 -21664
- package/src/tokens/foundation/aliases.css +0 -28
- package/src/z-layers.ts +0 -40
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "Trigger contract — controls whose main job is to open another surface.\n\nCovers DropdownMenuTrigger, PopoverTrigger, SelectTrigger, NavigationMenu\ntrigger, Menubar trigger, and disclosure-style triggers. A trigger can render\nas button-like, field-like, or navigation-like, but it needs an explicit open\nstate so \"pressed\" is not confused with Button's momentary press.\n\nAxis-dependent hooks resolve at the recipe use-site:\n --a63-trigger-background -> transparent / field background / action fill\n --a63-trigger-foreground -> var(--a63-text-primary)\n --a63-trigger-hover-background -> var(--a63-surface-control-hover)\n --a63-trigger-open-background -> var(--a63-surface-control-hover)",
|
|
3
|
+
"a63": {
|
|
4
|
+
"trigger": {
|
|
5
|
+
"border": {
|
|
6
|
+
"width": {
|
|
7
|
+
"$type": "dimension",
|
|
8
|
+
"$value": "{a63.control.border.width}"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"focus": {
|
|
12
|
+
"ring": {
|
|
13
|
+
"width": {
|
|
14
|
+
"$type": "dimension",
|
|
15
|
+
"$value": "{a63.control.focus.ring.width}"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"gap": {
|
|
20
|
+
"$type": "dimension",
|
|
21
|
+
"$value": "{a63.control.gap}"
|
|
22
|
+
},
|
|
23
|
+
"radius": {
|
|
24
|
+
"$type": "dimension",
|
|
25
|
+
"$value": "{a63.control.radius}"
|
|
26
|
+
},
|
|
27
|
+
"shadow": {
|
|
28
|
+
"$type": "shadow",
|
|
29
|
+
"$value": [],
|
|
30
|
+
"$extensions": {
|
|
31
|
+
"io.atom63.derive": "0 0 #0000"
|
|
32
|
+
},
|
|
33
|
+
"$description": "`0 0 #0000` not `none` — composed into comma-separated box-shadow lists\n alongside the focus ring, where `none` invalidates the declaration."
|
|
34
|
+
},
|
|
35
|
+
"open": {
|
|
36
|
+
"shadow": {
|
|
37
|
+
"$type": "shadow",
|
|
38
|
+
"$value": "{a63.trigger.shadow}"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"feedback": {
|
|
42
|
+
"duration": {
|
|
43
|
+
"$type": "duration",
|
|
44
|
+
"$value": "{a63.control.feedback.duration}"
|
|
45
|
+
},
|
|
46
|
+
"ease": {
|
|
47
|
+
"$type": "duration",
|
|
48
|
+
"$value": "{a63.control.feedback.ease}"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"$extensions": {
|
|
54
|
+
"io.atom63.css": {
|
|
55
|
+
"imports": ["./trigger.native.css"]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
package/src/contracts/widget.css
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
1
|
/*
|
|
2
|
+
* Generated from src/contracts/widget.resolver.json by scripts/build-css-from-dtcg.mjs. Do not edit;
|
|
3
|
+
* change the DTCG source and run `pnpm --filter @atom63/styles generate:tokens`.
|
|
4
|
+
*
|
|
2
5
|
* Widget contract — a persistent floating surface hosted on a desktop, card
|
|
3
6
|
* flow, or agent surface. Defaults compose the overlay archetype; widget kinds
|
|
4
7
|
* can specialize the material without replacing surface anatomy.
|
|
8
|
+
*
|
|
9
|
+
* Raised media sitting ON a widget face — poster-fan prints, stacked cards.
|
|
10
|
+
*
|
|
11
|
+
* Deliberately heavier than --a63-widget-shadow: the tile floats above the
|
|
12
|
+
* desktop, but this is print stock resting on the tile, so it needs a near
|
|
13
|
+
* contact throw plus a far soft one to read as a physical object rather than a
|
|
14
|
+
* second pane. `-raised` is the focused/centered print; the base token is the
|
|
15
|
+
* resting one.
|
|
16
|
+
*
|
|
17
|
+
* Each stack carries its own hairline rim and specular inset, so the consumer
|
|
18
|
+
* paints ONE box-shadow. A separate `ring` utility is composed into box-shadow
|
|
19
|
+
* as well, so it would clobber the whole stack rather than sit beside it.
|
|
20
|
+
*
|
|
21
|
+
* Mode-split like semantics.css: the throw is far stronger on a dark face, and
|
|
22
|
+
* the hairline rim flips from a white specular edge to a dark hairline.
|
|
23
|
+
*
|
|
24
|
+
* Weather FACE material — shared by the weather tile and by Location when it
|
|
25
|
+
* carries a condition tone. Outer chrome (rim + drop shadow) stays on the
|
|
26
|
+
* shared widget defaults so every tile reads as one system; only the face
|
|
27
|
+
* fill / foreground specialize.
|
|
28
|
+
*
|
|
29
|
+
* Sticky note focus: lift the shared rim shadow while editing. The variable
|
|
30
|
+
* lives on the shell (where box-shadow is painted), so it must be set there —
|
|
31
|
+
* a face-only className cannot reach it.
|
|
5
32
|
*/
|
|
33
|
+
@import './widget.native.css';
|
|
6
34
|
|
|
7
35
|
:root {
|
|
8
|
-
--a63-widget-background-color: color-mix(in
|
|
36
|
+
--a63-widget-background-color: color-mix(in oklab, var(--a63-surface-overlay) 82%, transparent);
|
|
9
37
|
--a63-widget-background-image: var(--a63-overlay-gloss), var(--a63-overlay-texture-image);
|
|
10
38
|
--a63-widget-background-blend: normal, var(--a63-overlay-texture-blend);
|
|
11
39
|
--a63-widget-foreground: var(--a63-text-primary);
|
|
12
40
|
--a63-widget-border-color: var(--a63-border-subtle);
|
|
13
41
|
--a63-widget-border-style: var(--a63-overlay-border-style);
|
|
14
42
|
/* No border by default: the rim IS the tile's edge. A hairline on the face
|
|
15
|
-
|
|
43
|
+
inside a 4px rim reads as a second concentric ring. */
|
|
16
44
|
--a63-widget-border-width: 0px;
|
|
17
45
|
--a63-widget-radius: var(--a63-overlay-radius, var(--radius-xl));
|
|
18
46
|
/* Flat by default: the 4px rim already separates the tile from the page, so a
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
47
|
+
drop shadow on top of it reads as a second edge rather than as height. The
|
|
48
|
+
shadow stays available as a STATE — sticky-note focus and drag both raise
|
|
49
|
+
it — and each skin still opts into its own resting elevation (retro's hard
|
|
50
|
+
offset, terminal's phosphor glow, aqua's gel drop) on its theme scope.
|
|
51
|
+
`none` is safe as the sole value here; it would only be invalid if composed
|
|
52
|
+
into a comma-separated list. */
|
|
25
53
|
--a63-widget-shadow: none;
|
|
26
|
-
--a63-widget-backdrop: var(--a63-overlay-backdrop);
|
|
27
|
-
|
|
28
54
|
/* Rim = the padded outer shell between the tile edge and the card face. A
|
|
29
|
-
|
|
30
|
-
|
|
55
|
+
padded rim can carry a gradient across the whole frame; a box-shadow inset
|
|
56
|
+
cannot. Themes fill it via --a63-widget-rim-image. */
|
|
31
57
|
--a63-widget-rim-width: 4px;
|
|
32
58
|
--a63-widget-rim-color: var(--a63-border-subtle);
|
|
33
|
-
--a63-widget-rim-image: none;
|
|
34
|
-
--a63-widget-rim-backdrop: none;
|
|
35
59
|
/* Per-side rim color. The rim is a border, so this mitres around the corner
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
arc at ANY radius — which is how a bevel theme lights top+left and darkens
|
|
61
|
+
bottom+right without breaking when the radius axis is turned up. Transparent
|
|
62
|
+
by default so gradient rims show through from --a63-widget-rim-image. */
|
|
39
63
|
--a63-widget-rim-border-color: transparent;
|
|
40
|
-
|
|
41
64
|
/* Weather defaults preserve live condition color in the neutral theme. */
|
|
42
65
|
--a63-weather-background-color: transparent;
|
|
43
|
-
/* --a63-weather-background-image is intentionally optional. When a theme
|
|
44
|
-
leaves it unset, the weather element resolves its local condition image. */
|
|
45
|
-
--a63-weather-background-blend: normal;
|
|
46
66
|
--a63-weather-foreground: white;
|
|
47
67
|
--a63-weather-muted-foreground: rgb(255 255 255 / 0.7);
|
|
48
68
|
--a63-weather-divider-color: rgb(255 255 255 / 0.2);
|
|
49
69
|
--a63-weather-text-shadow: none;
|
|
50
70
|
--a63-weather-border-color: transparent;
|
|
51
|
-
/* No --a63-weather-shadow knob: weather specializes the FACE only. Outer
|
|
52
|
-
chrome (rim + drop) stays on the shared widget system so every tile reads as
|
|
53
|
-
one desktop — see the weather case in widget-chrome-signature.browser.test. */
|
|
54
|
-
--a63-weather-backdrop: none;
|
|
55
71
|
--a63-weather-condition-mode-color: transparent;
|
|
56
72
|
--a63-weather-condition-color-strength: 100%;
|
|
57
73
|
}
|
|
58
74
|
|
|
59
|
-
/*
|
|
60
|
-
* Raised media sitting ON a widget face — poster-fan prints, stacked cards.
|
|
61
|
-
*
|
|
62
|
-
* Deliberately heavier than --a63-widget-shadow: the tile floats above the
|
|
63
|
-
* desktop, but this is print stock resting on the tile, so it needs a near
|
|
64
|
-
* contact throw plus a far soft one to read as a physical object rather than a
|
|
65
|
-
* second pane. `-raised` is the focused/centered print; the base token is the
|
|
66
|
-
* resting one.
|
|
67
|
-
*
|
|
68
|
-
* Each stack carries its own hairline rim and specular inset, so the consumer
|
|
69
|
-
* paints ONE box-shadow. A separate `ring` utility is composed into box-shadow
|
|
70
|
-
* as well, so it would clobber the whole stack rather than sit beside it.
|
|
71
|
-
*
|
|
72
|
-
* Mode-split like semantics.css: the throw is far stronger on a dark face, and
|
|
73
|
-
* the hairline rim flips from a white specular edge to a dark hairline.
|
|
74
|
-
*/
|
|
75
75
|
:root,
|
|
76
76
|
.light,
|
|
77
77
|
[data-a63-mode='light'] {
|
|
@@ -102,12 +102,41 @@
|
|
|
102
102
|
0 32px 48px -18px color-mix(in oklch, black 72%, transparent);
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
[data-a63-brand],
|
|
106
|
+
[data-a63-surface] {
|
|
107
|
+
/* The mode roles again, on scopes that change what they read, keyed to the nearest mode scope. */
|
|
108
|
+
--a63-widget-media-shadow: var(
|
|
109
|
+
--a63-if-light,
|
|
110
|
+
0 0 0 1px color-mix(in oklch, black 8%, transparent),
|
|
111
|
+
0 1px 0 color-mix(in oklch, white 45%, transparent) inset,
|
|
112
|
+
0 10px 16px -10px color-mix(in oklch, black 22%, transparent),
|
|
113
|
+
0 22px 34px -16px color-mix(in oklch, black 26%, transparent)
|
|
114
|
+
)
|
|
115
|
+
var(
|
|
116
|
+
--a63-if-dark,
|
|
117
|
+
0 0 0 1px color-mix(in oklch, white 10%, transparent),
|
|
118
|
+
0 1px 0 color-mix(in oklch, white 8%, transparent) inset,
|
|
119
|
+
0 10px 16px -10px color-mix(in oklch, black 50%, transparent),
|
|
120
|
+
0 22px 34px -16px color-mix(in oklch, black 62%, transparent)
|
|
121
|
+
);
|
|
122
|
+
--a63-widget-media-shadow-raised: var(
|
|
123
|
+
--a63-if-light,
|
|
124
|
+
0 0 0 1px color-mix(in oklch, black 12%, transparent),
|
|
125
|
+
0 1px 0 color-mix(in oklch, white 60%, transparent) inset,
|
|
126
|
+
0 1px 1px color-mix(in oklch, black 12%, transparent),
|
|
127
|
+
0 14px 22px -10px color-mix(in oklch, black 26%, transparent),
|
|
128
|
+
0 32px 48px -18px color-mix(in oklch, black 30%, transparent)
|
|
129
|
+
)
|
|
130
|
+
var(
|
|
131
|
+
--a63-if-dark,
|
|
132
|
+
0 0 0 1px color-mix(in oklch, white 16%, transparent),
|
|
133
|
+
0 1px 0 color-mix(in oklch, white 12%, transparent) inset,
|
|
134
|
+
0 1px 1px color-mix(in oklch, black 35%, transparent),
|
|
135
|
+
0 14px 22px -10px color-mix(in oklch, black 58%, transparent),
|
|
136
|
+
0 32px 48px -18px color-mix(in oklch, black 72%, transparent)
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
111
140
|
[data-widget-kind='weather'],
|
|
112
141
|
[data-widget-kind='location'][data-weather-tone] {
|
|
113
142
|
--a63-widget-background-color: var(--a63-weather-background-color);
|
|
@@ -117,7 +146,6 @@
|
|
|
117
146
|
);
|
|
118
147
|
--a63-widget-background-blend: var(--a63-weather-background-blend);
|
|
119
148
|
--a63-widget-foreground: var(--a63-weather-foreground);
|
|
120
|
-
--a63-widget-backdrop: var(--a63-weather-backdrop);
|
|
121
149
|
--a63-weather-condition-background-image: linear-gradient(
|
|
122
150
|
135deg,
|
|
123
151
|
color-mix(
|
|
@@ -188,9 +216,6 @@
|
|
|
188
216
|
--a63-weather-condition-color-strength: 88%;
|
|
189
217
|
}
|
|
190
218
|
|
|
191
|
-
/* Sticky note focus: lift the shared rim shadow while editing. The variable
|
|
192
|
-
lives on the shell (where box-shadow is painted), so it must be set there —
|
|
193
|
-
a face-only className cannot reach it. */
|
|
194
219
|
[data-widget-kind='sticky-note'][data-focused] {
|
|
195
220
|
--a63-widget-shadow: var(--a63-overlay-drag-shadow);
|
|
196
221
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* CSS-native values of the widget contract: values with no DTCG type. The rest of
|
|
3
|
+
* the contract is generated from widget.resolver.json. Each declaration here is listed
|
|
4
|
+
* in native-values.json; see docs/design-system/token-single-source.md.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--a63-widget-backdrop: var(--a63-overlay-backdrop);
|
|
9
|
+
--a63-widget-rim-image: none;
|
|
10
|
+
--a63-widget-rim-backdrop: none;
|
|
11
|
+
/* --a63-weather-background-image is intentionally optional. When a theme
|
|
12
|
+
leaves it unset, the weather element resolves its local condition image. */
|
|
13
|
+
--a63-weather-background-blend: normal;
|
|
14
|
+
/* No --a63-weather-shadow knob: weather specializes the FACE only. Outer
|
|
15
|
+
chrome (rim + drop) stays on the shared widget system so every tile reads as
|
|
16
|
+
one desktop — see the weather case in widget-chrome-signature.browser.test. */
|
|
17
|
+
--a63-weather-backdrop: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-widget-kind='weather'],
|
|
21
|
+
[data-widget-kind='location'][data-weather-tone] {
|
|
22
|
+
--a63-widget-backdrop: var(--a63-weather-backdrop);
|
|
23
|
+
}
|