@atom63/styles 0.1.0-beta.0 → 0.1.0-beta.10

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.
Files changed (118) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -36
  3. package/generated/atom63.figma-sync.json +23201 -0
  4. package/generated/atom63.tokens.json +19649 -8416
  5. package/generated/z-layers.d.ts +33 -0
  6. package/generated/z-layers.js +31 -0
  7. package/package.json +35 -21
  8. package/src/compat/a63-from-shadcn.css +275 -0
  9. package/src/compat/shadcn.browser.test.ts +23 -0
  10. package/src/compat/shadcn.css +133 -17
  11. package/src/contracts/action.css +4 -3
  12. package/src/contracts/action.native.css +11 -0
  13. package/src/contracts/action.tokens.json +66 -0
  14. package/src/contracts/badge.css +128 -58
  15. package/src/contracts/badge.resolver.json +454 -0
  16. package/src/contracts/choice.css +5 -2
  17. package/src/contracts/choice.native.css +9 -0
  18. package/src/contracts/choice.tokens.json +66 -0
  19. package/src/contracts/control.css +54 -57
  20. package/src/contracts/control.native.css +13 -0
  21. package/src/contracts/control.tokens.json +294 -0
  22. package/src/contracts/environment.css +178 -60
  23. package/src/contracts/environment.native.css +23 -0
  24. package/src/contracts/environment.resolver.json +1210 -0
  25. package/src/contracts/field.css +4 -2
  26. package/src/contracts/field.tokens.json +40 -0
  27. package/src/contracts/marker.css +6 -4
  28. package/src/contracts/marker.tokens.json +15 -0
  29. package/src/contracts/menu.css +25 -61
  30. package/src/contracts/menu.native.css +10 -0
  31. package/src/contracts/menu.resolver.json +122 -0
  32. package/src/contracts/overlay.css +11 -13
  33. package/src/contracts/overlay.native.css +13 -0
  34. package/src/contracts/overlay.tokens.json +103 -0
  35. package/src/contracts/segment.css +22 -68
  36. package/src/contracts/segment.tokens.json +19 -0
  37. package/src/contracts/selection.css +5 -1
  38. package/src/contracts/selection.tokens.json +42 -0
  39. package/src/contracts/skeleton.css +18 -2
  40. package/src/contracts/skeleton.resolver.json +62 -0
  41. package/src/contracts/surface.css +17 -24
  42. package/src/contracts/surface.native.css +17 -0
  43. package/src/contracts/surface.tokens.json +154 -0
  44. package/src/contracts/toggle.css +27 -3
  45. package/src/contracts/toggle.resolver.json +129 -0
  46. package/src/contracts/track.css +3 -1
  47. package/src/contracts/track.tokens.json +39 -0
  48. package/src/contracts/trigger.css +5 -2
  49. package/src/contracts/trigger.native.css +9 -0
  50. package/src/contracts/trigger.tokens.json +58 -0
  51. package/src/contracts/widget.css +76 -51
  52. package/src/contracts/widget.native.css +23 -0
  53. package/src/contracts/widget.resolver.json +1110 -0
  54. package/src/tailwind/roles.json +189 -0
  55. package/src/tailwind/theme.css +216 -24
  56. package/src/tailwind/utilities.css +17 -0
  57. package/src/themes/aqua.css +126 -89
  58. package/src/themes/aqua.native.css +80 -0
  59. package/src/themes/aqua.resolver.json +1304 -0
  60. package/src/themes/modern.css +10 -14
  61. package/src/themes/modern.native.css +16 -0
  62. package/src/themes/modern.resolver.json +350 -0
  63. package/src/themes/retro.css +22 -26
  64. package/src/themes/retro.native.css +16 -0
  65. package/src/themes/retro.resolver.json +794 -0
  66. package/src/themes/terminal.css +151 -41
  67. package/src/themes/terminal.native.css +22 -0
  68. package/src/themes/terminal.resolver.json +585 -0
  69. package/src/tokens/brand-action.css +65 -0
  70. package/src/tokens/brand-action.resolver.json +155 -0
  71. package/src/tokens/brand-ramp.css +108 -0
  72. package/src/tokens/brand-ramp.resolver.json +418 -0
  73. package/src/tokens/brand.css +6 -146
  74. package/src/tokens/color-mix-space.browser.test.ts +101 -0
  75. package/src/tokens/contrast.browser.test.ts +257 -5
  76. package/src/tokens/density.browser.test.ts +167 -0
  77. package/src/tokens/figma-parity.browser.test.ts +270 -0
  78. package/src/tokens/font.css +13 -0
  79. package/src/tokens/font.resolver.json +128 -0
  80. package/src/tokens/form-factor.browser.test.ts +129 -0
  81. package/src/tokens/foundation/effects.css +13 -13
  82. package/src/tokens/foundation/effects.resolver.json +433 -0
  83. package/src/tokens/foundation/fonts.css +11 -5
  84. package/src/tokens/foundation/fonts.tokens.json +45 -0
  85. package/src/tokens/foundation/motion.css +3 -0
  86. package/src/tokens/foundation/motion.tokens.json +53 -0
  87. package/src/tokens/foundation/palette.css +3 -0
  88. package/src/tokens/foundation/palette.tokens.json +1743 -0
  89. package/src/tokens/foundation/primitives.css +20 -43
  90. package/src/tokens/foundation/primitives.tokens.json +3258 -0
  91. package/src/tokens/foundation/radius.css +11 -9
  92. package/src/tokens/foundation/radius.tokens.json +108 -0
  93. package/src/tokens/foundation/typography.css +49 -12
  94. package/src/tokens/foundation/typography.native.css +21 -0
  95. package/src/tokens/foundation/typography.resolver.json +1008 -0
  96. package/src/tokens/foundation.css +0 -1
  97. package/src/tokens/index.css +1 -0
  98. package/src/tokens/motion.css +3 -1
  99. package/src/tokens/motion.resolver.json +135 -0
  100. package/src/tokens/native-values.json +38 -0
  101. package/src/tokens/personalization-axes.browser.test.ts +20 -4
  102. package/src/tokens/plate-scope.browser.test.ts +73 -0
  103. package/src/tokens/radius.css +12 -8
  104. package/src/tokens/radius.resolver.json +138 -0
  105. package/src/tokens/semantics.css +656 -39
  106. package/src/tokens/semantics.resolver.json +1606 -0
  107. package/src/tokens/space.css +8 -6
  108. package/src/tokens/space.tokens.json +78 -0
  109. package/src/tokens/surface.css +13 -19
  110. package/src/tokens/surface.resolver.json +706 -0
  111. package/src/tokens/swift-parity.browser.test.ts +141 -0
  112. package/src/tokens/type-roles.css +88 -0
  113. package/src/tokens/type-roles.resolver.json +419 -0
  114. package/src/tokens/type-scale.css +6 -0
  115. package/src/tokens/type-scale.resolver.json +67 -0
  116. package/generated/atom63.figma-tokens.json +0 -21650
  117. package/src/tokens/foundation/aliases.css +0 -28
  118. 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
+ }
@@ -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 oklch, var(--a63-surface-overlay) 82%, transparent);
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
- inside a 4px rim reads as a second concentric ring. */
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
- drop shadow on top of it reads as a second edge rather than as height. The
20
- shadow stays available as a STATE — sticky-note focus and drag both raise
21
- it — and each skin still opts into its own resting elevation (retro's hard
22
- offset, terminal's phosphor glow, aqua's gel drop) on its theme scope.
23
- `none` is safe as the sole value here; it would only be invalid if composed
24
- into a comma-separated list. */
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
- padded rim can carry a gradient across the whole frame; a box-shadow inset
30
- cannot. Themes fill it via --a63-widget-rim-image. */
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
- arc at ANY radius — which is how a bevel theme lights top+left and darkens
37
- bottom+right without breaking when the radius axis is turned up. Transparent
38
- by default so gradient rims show through from --a63-widget-rim-image. */
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
- * Weather FACE material — shared by the weather tile and by Location when it
107
- * carries a condition tone. Outer chrome (rim + drop shadow) stays on the
108
- * shared widget defaults so every tile reads as one system; only the face
109
- * fill / foreground specialize.
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
+ }