@aziontech/theme 4.3.0 → 5.0.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.
@@ -41,6 +41,46 @@ export const textsData = {
41
41
  fontWeight: fontWeight.normal,
42
42
  fontFamily: fontFamily.display
43
43
  },
44
+ // ── The amount ladder (Currency) ─────────────────────────────────────────
45
+ //
46
+ // The three sizes `Currency` typesets a monetary amount at, one per reading
47
+ // distance: `sm` inside a table row or list cell, `md` an amount stated as a fact on
48
+ // a card, `lg` the headline figure of a pricing card. Each MIRRORS the heading/label
49
+ // token it used to borrow (`text-label-lg`, `text-heading-md`, `text-heading-2xl`) —
50
+ // same size ramp, same leading, same weight — and adds the one thing that made
51
+ // borrowing wrong: the amount's negative tracking.
52
+ //
53
+ // `-0.08em` is PROPORTIONAL, and deliberately so, which is why it lives here and not
54
+ // in `tracking.js`. That scale is absolute (`rem`) on purpose so a step resolves to a
55
+ // fixed measure at any font size (see its docstring), and it therefore holds no
56
+ // `-0.08em`-equivalent step. A figure is the one place where the tracking has to
57
+ // scale WITH the glyphs: the Figma amount specifies −1.28px @16px, −1.92px @24px and
58
+ // −4.48px @56px, which is one ratio, not three steps. Expressing it as `em` is what
59
+ // makes a single declaration correct at all three sizes and at every breakpoint of
60
+ // `lg`'s responsive ramp.
61
+ //
62
+ // Dedicated tokens rather than tracking added to the borrowed ones: `text-heading-2xl`
63
+ // sets every hero headline in the system, and a hero is prose, not a numeral.
64
+ 'text-amount-lg': {
65
+ textWrapStyle: 'balance',
66
+ fontSize: { _: fontSize['3xl'], sm: fontSize['5xl'], md: fontSize['6xl'] },
67
+ lineHeight: leading.tight,
68
+ fontWeight: fontWeight.normal,
69
+ letterSpacing: '-0.08em'
70
+ },
71
+ 'text-amount-md': {
72
+ textWrapStyle: 'balance',
73
+ fontSize: { _: fontSize.base, sm: fontSize.xl, md: fontSize['2xl'] },
74
+ lineHeight: leading.tight,
75
+ fontWeight: fontWeight.normal,
76
+ letterSpacing: '-0.08em'
77
+ },
78
+ 'text-amount-sm': {
79
+ fontSize: fontSize.base,
80
+ lineHeight: leading.normal,
81
+ fontWeight: fontWeight.normal,
82
+ letterSpacing: '-0.08em'
83
+ },
44
84
  'text-heading-2xl': {
45
85
  fontSize: { _: fontSize['3xl'], sm: fontSize['5xl'], md: fontSize['6xl'] },
46
86
  lineHeight: leading.tight,
@@ -98,6 +138,14 @@ export const textsData = {
98
138
  fontWeight: fontWeight.normal,
99
139
  letterSpacing: tracking.normal
100
140
  },
141
+ 'text-body-code-sm': {
142
+ textWrapStyle: 'pretty',
143
+ fontFamily: fontFamily.code,
144
+ fontSize: fontSize.xs,
145
+ lineHeight: leading.relaxed,
146
+ fontWeight: fontWeight.normal,
147
+ letterSpacing: tracking.normal
148
+ },
101
149
  'text-label-code-md': {
102
150
  fontFamily: fontFamily.code,
103
151
  fontSize: fontSize.sm,
@@ -114,33 +162,43 @@ export const textsData = {
114
162
  },
115
163
  'text-body-lg': {
116
164
  fontSize: { _: fontSize.base, md: fontSize.lg },
117
- lineHeight: leading.normal
165
+ fontWeight: fontWeight.normal,
166
+ lineHeight: leading.snug
118
167
  },
119
168
  'text-body-md': {
120
169
  fontSize: fontSize.base,
121
- lineHeight: leading.normal
170
+ fontWeight: fontWeight.normal,
171
+ lineHeight: leading.snug
172
+ },
173
+ 'text-body-prose-md': {
174
+ fontSize: fontSize.base,
175
+ fontWeight: fontWeight.normal,
176
+ lineHeight: leading.relaxed
122
177
  },
123
178
  'text-body-sm': {
124
179
  fontSize: fontSize.sm,
125
- lineHeight: leading.normal
180
+ fontWeight: fontWeight.normal,
181
+ lineHeight: leading.snug
126
182
  },
127
183
  'text-body-xs': {
128
184
  fontSize: fontSize.xs,
185
+ fontWeight: fontWeight.normal,
186
+ lineHeight: leading.snug
187
+ },
188
+ 'text-body-xxs': {
189
+ fontSize: fontSize.xs,
190
+ fontWeight: fontWeight.normal,
129
191
  lineHeight: leading.normal
130
192
  },
131
193
  'text-tag-sm': {
132
194
  fontSize: fontSize.xs,
133
195
  lineHeight: leading.tight,
134
- fontWeight: fontWeight.semibold
196
+ fontWeight: fontWeight.normal
135
197
  },
136
198
  'text-tag-md': {
137
199
  fontSize: fontSize.xs,
138
200
  lineHeight: leading.tight,
139
- fontWeight: fontWeight.semibold
140
- },
141
- 'text-body-xxs': {
142
- fontSize: fontSize.xs,
143
- lineHeight: leading.normal
201
+ fontWeight: fontWeight.normal
144
202
  },
145
203
  'text-overline-md': {
146
204
  fontFamily: fontFamily.display,
@@ -17,7 +17,7 @@
17
17
  * such as drawers, modals, and fixed headers.
18
18
  *
19
19
  * Values are intentionally small and well-spaced to make future additions
20
- * obvious. Consume as `z-[var(--z-input-*)]` in components — do not
20
+ * obvious. Consume as `z-(--z-input-*)` in components — do not
21
21
  * introduce ad-hoc numeric z-index in input `.vue` files.
22
22
  */
23
23
  export const zIndicesData: {
@@ -17,7 +17,7 @@
17
17
  * such as drawers, modals, and fixed headers.
18
18
  *
19
19
  * Values are intentionally small and well-spaced to make future additions
20
- * obvious. Consume as `z-[var(--z-input-*)]` in components — do not
20
+ * obvious. Consume as `z-(--z-input-*)` in components — do not
21
21
  * introduce ad-hoc numeric z-index in input `.vue` files.
22
22
  */
23
23
 
@@ -1,15 +1,37 @@
1
1
  import { tokenRef } from '../../scripts/refs.js'
2
2
 
3
+ // The neutral rules are OPAQUE steps of the surface palette, not alpha.
4
+ //
5
+ // They used to be `alpha.black.100` / `alpha.white.100` / `alpha.white.50`, which meant one
6
+ // token painted a different colour on every backdrop — the same hairline read four different
7
+ // ways across canvas / surface / raised / overlay — and two rules meeting composited into a
8
+ // brighter line, so any stacked or abutting border doubled. An opaque step gives a rule one
9
+ // identity wherever it is drawn, and makes overlap a no-op.
10
+ //
11
+ // The steps are ones added to fill the ramp's gaps (`gray.150` / `gray.250` / `gray.750` /
12
+ // `gray.775`), NOT the steps that bracket them — `surface-200` (light) and `surface-800` (dark)
13
+ // are what `--bg-selected` and `--bg-disabled` already use, so a border drawn there is exactly
14
+ // its own fill and vanishes. Every pairing a component can produce now clears zero:
15
+ // light default surface-250 vs canvas 32 · surface 37 · selected/disabled 11
16
+ // light muted surface-150 vs canvas 14 · surface 19 · selected/disabled 7
17
+ // dark default surface-750 vs canvas 43 · surface 33 · raised 23 · selected 17
18
+ // dark muted surface-775 vs canvas 36 · surface 26 · raised 16 · selected 10
19
+ //
20
+ // `muted` sits closer to the background than `default` in BOTH themes — lighter in light,
21
+ // darker in dark. It is a subtler rule, not a second default; it is drawn on `--bg-surface` /
22
+ // `--bg-canvas` (the segmented-button track, the tab-view list, a flow node), never on a
23
+ // selected or disabled fill, which is what lets the light step go as light as it does. Dark
24
+ // cannot go proportionally as subtle: `--bg-surface-raised` sits at 20 and would swallow it.
3
25
  export const border = {
4
26
  light: {
5
- 'border-default': tokenRef('primitives.alpha.black.100'),
6
- 'border-muted': tokenRef('primitives.alpha.black.100'),
27
+ 'border-default': tokenRef('theme.surfaces.surface-250'),
28
+ 'border-muted': tokenRef('theme.surfaces.surface-150'),
7
29
  'border-strong': tokenRef('primitives.base.black'),
8
30
  'border-selected': tokenRef('brand.primary.primary-500')
9
31
  },
10
32
  dark: {
11
- 'border-default': tokenRef('primitives.alpha.white.100'),
12
- 'border-muted': tokenRef('primitives.alpha.white.50'),
33
+ 'border-default': tokenRef('theme.surfaces.surface-750'),
34
+ 'border-muted': tokenRef('theme.surfaces.surface-775'),
13
35
  'border-strong': tokenRef('primitives.base.white'),
14
36
  'border-selected': tokenRef('brand.primary.primary-500')
15
37
  }
@@ -16,9 +16,15 @@ declare const shared: {
16
16
  'surface-100': {
17
17
  __ref: any;
18
18
  };
19
+ 'surface-150': {
20
+ __ref: any;
21
+ };
19
22
  'surface-200': {
20
23
  __ref: any;
21
24
  };
25
+ 'surface-250': {
26
+ __ref: any;
27
+ };
22
28
  'surface-300': {
23
29
  __ref: any;
24
30
  };
@@ -34,6 +40,12 @@ declare const shared: {
34
40
  'surface-700': {
35
41
  __ref: any;
36
42
  };
43
+ 'surface-750': {
44
+ __ref: any;
45
+ };
46
+ 'surface-775': {
47
+ __ref: any;
48
+ };
37
49
  'surface-800': {
38
50
  __ref: any;
39
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["surfaces.js"],"names":[],"mappings":";;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaC"}
1
+ {"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["surfaces.js"],"names":[],"mappings":";;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBC"}
@@ -4,12 +4,16 @@ const shared = {
4
4
  'surface-0': tokenRef('primitives.base.white'),
5
5
  'surface-50': tokenRef('primitives.gray.50'),
6
6
  'surface-100': tokenRef('primitives.gray.100'),
7
+ 'surface-150': tokenRef('primitives.gray.150'),
7
8
  'surface-200': tokenRef('primitives.gray.200'),
9
+ 'surface-250': tokenRef('primitives.gray.250'),
8
10
  'surface-300': tokenRef('primitives.gray.300'),
9
11
  'surface-400': tokenRef('primitives.gray.400'),
10
12
  'surface-500': tokenRef('primitives.gray.500'),
11
13
  'surface-600': tokenRef('primitives.gray.600'),
12
14
  'surface-700': tokenRef('primitives.gray.700'),
15
+ 'surface-750': tokenRef('primitives.gray.750'),
16
+ 'surface-775': tokenRef('primitives.gray.775'),
13
17
  'surface-800': tokenRef('primitives.gray.800'),
14
18
  'surface-900': tokenRef('primitives.gray.900'),
15
19
  'surface-950': tokenRef('primitives.gray.950')
@@ -77,12 +77,16 @@ export namespace theme {
77
77
  let gray: {
78
78
  50: string;
79
79
  100: string;
80
+ 150: string;
80
81
  200: string;
82
+ 250: string;
81
83
  300: string;
82
84
  400: string;
83
85
  500: string;
84
86
  600: string;
85
87
  700: string;
88
+ 750: string;
89
+ 775: string;
86
90
  800: string;
87
91
  900: string;
88
92
  950: string;