@sola-air-ui/tokens 1.0.2 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sola-air-ui/tokens",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "Design tokens for Sola AIR — spacing, radius, type scale, color, and semantic palette",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -94,6 +94,28 @@ export const tokens = {
94
94
  high: { fg: '#dc2626', bg: '#fef2f2' },
95
95
  critical: { fg: '#9333ea', bg: '#faf5ff' },
96
96
  },
97
+
98
+ /**
99
+ * Stacking order. nav < dropdown < overlay-scrim < modal/sheet (same tier
100
+ * — mutually exclusive, focused overlays) < toast (always topmost).
101
+ */
102
+ zIndex: {
103
+ nav: 40,
104
+ dropdown: 100,
105
+ overlay: 800,
106
+ modal: 900,
107
+ sheet: 900,
108
+ toast: 1000,
109
+ },
110
+
111
+ /** One easing curve, two durations — see tokens.css for the rationale. */
112
+ motion: {
113
+ ease: 'cubic-bezier(0.16, 1, 0.3, 1)',
114
+ duration: {
115
+ fast: '160ms',
116
+ base: '240ms',
117
+ },
118
+ },
97
119
  };
98
120
 
99
121
  export default tokens;
package/src/tokens.css CHANGED
@@ -159,6 +159,31 @@
159
159
 
160
160
  /* ─── Focus ring ────────────────────────────────────────────────────────────*/
161
161
  --sola-focus-ring: 0 0 0 3px rgba(16, 185, 129, 0.4);
162
+
163
+ /* ─── Z-index scale ─────────────────────────────────────────────────────────
164
+ * Every stacking-context component in the library should sit on one of
165
+ * these steps, never a bare magic number. nav < dropdown < overlay-scrim
166
+ * < modal/sheet (same tier — both are focused, blocking overlays that
167
+ * shouldn't appear at once) < toast (always topmost, so a confirmation
168
+ * or error stays visible even while a modal is open).
169
+ */
170
+ --sola-z-nav: 40;
171
+ --sola-z-dropdown: 100;
172
+ --sola-z-overlay: 800;
173
+ --sola-z-modal: 900;
174
+ --sola-z-sheet: 900;
175
+ --sola-z-toast: 1000;
176
+
177
+ /* ─── Motion ─────────────────────────────────────────────────────────────────
178
+ * One easing curve, two durations. `fast` for micro-interactions (hover,
179
+ * toggle); `base` for anything that opens/closes a surface (modal, sheet,
180
+ * dropdown). Components should reference these rather than hardcoding
181
+ * their own timing — three different curves across a handful of overlay
182
+ * components is what "inconsistent" looks like in practice.
183
+ */
184
+ --sola-ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
185
+ --sola-duration-fast: 160ms;
186
+ --sola-duration-base: 240ms;
162
187
  }
163
188
 
164
189
  /* ─── Dark mode — system default ─────────────────────────────────────────────