@ornikar/bumper 3.0.0 → 3.0.1
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/CHANGELOG.md +9 -0
- package/dist/definitions/system/content/typography/Typography.d.ts +2 -1
- package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts.map +1 -1
- package/dist/definitions/system/core/tokens/GTStandardFont.d.ts +14 -0
- package/dist/definitions/system/core/tokens/GTStandardFont.d.ts.map +1 -0
- package/dist/definitions/system/core/tokens/GTStandardNarrowFont.d.ts +9 -0
- package/dist/definitions/system/core/tokens/GTStandardNarrowFont.d.ts.map +1 -0
- package/dist/definitions/system/core/tokens/fonts.d.ts +0 -14
- package/dist/definitions/system/core/tokens/fonts.d.ts.map +1 -1
- package/dist/definitions/tamagui.config.d.ts +27 -11
- package/dist/definitions/tamagui.config.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +80 -53
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +80 -53
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +80 -53
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +80 -53
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +80 -53
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +80 -53
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +74 -47
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +74 -47
- package/dist/index.es.web.js.map +1 -1
- package/dist/storybook-metro.es.android.js +76 -52
- package/dist/storybook-metro.es.android.js.map +1 -1
- package/dist/storybook-metro.es.ios.js +76 -52
- package/dist/storybook-metro.es.ios.js.map +1 -1
- package/dist/storybook-node-22.22.cjs.js +76 -52
- package/dist/storybook-node-22.22.cjs.js.map +1 -1
- package/dist/storybook-node-22.22.cjs.web.js +76 -52
- package/dist/storybook-node-22.22.cjs.web.js.map +1 -1
- package/dist/storybook-node-22.22.es.mjs +76 -52
- package/dist/storybook-node-22.22.es.mjs.map +1 -1
- package/dist/storybook-node-22.22.es.web.mjs +76 -52
- package/dist/storybook-node-22.22.es.web.mjs.map +1 -1
- package/dist/storybook.es.js +70 -46
- package/dist/storybook.es.js.map +1 -1
- package/dist/storybook.es.web.js +70 -46
- package/dist/storybook.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/system/content/typography/Typography.features.stories.tsx +1 -1
- package/src/system/content/typography/Typography.tsx +6 -7
- package/src/system/content/typography/__snapshots__/Typography.features.stories.tsx.snap +15 -8
- package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +8 -8
- package/src/system/content/typography/utils/getVariantAndWeightValues.test.tsx +2 -1
- package/src/system/content/typography/utils/getVariantAndWeightValues.tsx +2 -1
- package/src/system/core/tokens/GTStandardFont.ts +90 -0
- package/src/system/core/tokens/GTStandardNarrowFont.ts +51 -0
- package/src/system/core/tokens/__snapshots__/fonts.stories.tsx.snap +14 -7
- package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +7 -7
- package/src/system/core/tokens/fonts.stories.tsx +7 -2
- package/src/system/core/tokens/fonts.ts +3 -116
- package/src/system/dataDisplays/Badge/__snapshots__/Badge.features.stories.tsx.snap +16 -8
- package/src/system/dataDisplays/Badge/__snapshots__/Badge.stories.tsx.snap +2 -1
- package/src/system/dataDisplays/Badge/__snapshots_web__/Badge.features.stories.tsx.snap +8 -8
- package/src/system/dataDisplays/Badge/__snapshots_web__/Badge.stories.tsx.snap +1 -1
- package/src/tamagui.config.ts +30 -7
package/package.json
CHANGED
|
@@ -83,7 +83,7 @@ export const LabelVariants: Story = {
|
|
|
83
83
|
export const ContentCapsVariants: Story = {
|
|
84
84
|
render: () => (
|
|
85
85
|
<VStack gap="$space.16">
|
|
86
|
-
<Typography.Text variant="content-caps-3xl">
|
|
86
|
+
<Typography.Text variant="content-caps-3xl">content caps 3xl</Typography.Text>
|
|
87
87
|
<Typography.Text variant="content-caps-2xl">CONTENT CAPS 2XL</Typography.Text>
|
|
88
88
|
<Typography.Text variant="content-caps-xl">CONTENT CAPS XL</Typography.Text>
|
|
89
89
|
<Typography.Text variant="content-caps-l">CONTENT CAPS L</Typography.Text>
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import type { ColorTokens, GetProps, GetThemeValueForKey, TamaguiComponent } from '@tamagui/core';
|
|
2
2
|
import { Text, styled } from '@tamagui/core';
|
|
3
3
|
import { type Except } from 'type-fest';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
FontVariants,
|
|
8
|
-
HeadingFontVariants,
|
|
9
|
-
LabelFontVariants,
|
|
10
|
-
} from '../../core/tokens/fonts';
|
|
4
|
+
import type { BodyFontVariants, HeadingFontVariants, LabelFontVariants } from '../../core/tokens/GTStandardFont';
|
|
5
|
+
import { CONTENT_CAPS_VARIANTS, type ContentCapsVariants } from '../../core/tokens/GTStandardNarrowFont';
|
|
6
|
+
import type { FontVariants } from '../../core/tokens/fonts';
|
|
11
7
|
import type { TamaguiMediaProps } from '../../types';
|
|
12
8
|
import { getVariantAndWeightValues } from './utils/getVariantAndWeightValues';
|
|
13
9
|
import {
|
|
@@ -30,8 +26,11 @@ const InternalTypography = styled(Text, {
|
|
|
30
26
|
variants: {
|
|
31
27
|
variant: (variant: FontVariants | undefined) => {
|
|
32
28
|
if (!variant) return {};
|
|
29
|
+
const isContentCapsVariant = (CONTENT_CAPS_VARIANTS as readonly string[]).includes(variant);
|
|
33
30
|
|
|
34
31
|
return {
|
|
32
|
+
fontFamily: isContentCapsVariant ? '$GTStandardNarrow' : '$GTStandard',
|
|
33
|
+
textTransform: isContentCapsVariant ? 'uppercase' : undefined,
|
|
35
34
|
fontSize: `$${variant}`,
|
|
36
35
|
lineHeight: `$${variant}`,
|
|
37
36
|
letterSpacing: `$${variant}`,
|
|
@@ -201,23 +201,25 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
201
201
|
<Text
|
|
202
202
|
style={
|
|
203
203
|
{
|
|
204
|
-
"fontFamily": "
|
|
204
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
205
205
|
"fontSize": 40,
|
|
206
206
|
"letterSpacing": 0,
|
|
207
207
|
"lineHeight": 40,
|
|
208
|
+
"textTransform": "uppercase",
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
suppressHighlighting={true}
|
|
211
212
|
>
|
|
212
|
-
|
|
213
|
+
content caps 3xl
|
|
213
214
|
</Text>
|
|
214
215
|
<Text
|
|
215
216
|
style={
|
|
216
217
|
{
|
|
217
|
-
"fontFamily": "
|
|
218
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
218
219
|
"fontSize": 32,
|
|
219
220
|
"letterSpacing": 0,
|
|
220
221
|
"lineHeight": 40,
|
|
222
|
+
"textTransform": "uppercase",
|
|
221
223
|
}
|
|
222
224
|
}
|
|
223
225
|
suppressHighlighting={true}
|
|
@@ -227,10 +229,11 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
227
229
|
<Text
|
|
228
230
|
style={
|
|
229
231
|
{
|
|
230
|
-
"fontFamily": "
|
|
232
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
231
233
|
"fontSize": 24,
|
|
232
234
|
"letterSpacing": 0,
|
|
233
235
|
"lineHeight": 28,
|
|
236
|
+
"textTransform": "uppercase",
|
|
234
237
|
}
|
|
235
238
|
}
|
|
236
239
|
suppressHighlighting={true}
|
|
@@ -240,10 +243,11 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
240
243
|
<Text
|
|
241
244
|
style={
|
|
242
245
|
{
|
|
243
|
-
"fontFamily": "
|
|
246
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
244
247
|
"fontSize": 18,
|
|
245
248
|
"letterSpacing": 0,
|
|
246
249
|
"lineHeight": 20,
|
|
250
|
+
"textTransform": "uppercase",
|
|
247
251
|
}
|
|
248
252
|
}
|
|
249
253
|
suppressHighlighting={true}
|
|
@@ -253,10 +257,11 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
253
257
|
<Text
|
|
254
258
|
style={
|
|
255
259
|
{
|
|
256
|
-
"fontFamily": "
|
|
260
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
257
261
|
"fontSize": 16,
|
|
258
262
|
"letterSpacing": 0,
|
|
259
263
|
"lineHeight": 18,
|
|
264
|
+
"textTransform": "uppercase",
|
|
260
265
|
}
|
|
261
266
|
}
|
|
262
267
|
suppressHighlighting={true}
|
|
@@ -266,10 +271,11 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
266
271
|
<Text
|
|
267
272
|
style={
|
|
268
273
|
{
|
|
269
|
-
"fontFamily": "
|
|
274
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
270
275
|
"fontSize": 14,
|
|
271
276
|
"letterSpacing": 0,
|
|
272
277
|
"lineHeight": 16,
|
|
278
|
+
"textTransform": "uppercase",
|
|
273
279
|
}
|
|
274
280
|
}
|
|
275
281
|
suppressHighlighting={true}
|
|
@@ -279,10 +285,11 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
279
285
|
<Text
|
|
280
286
|
style={
|
|
281
287
|
{
|
|
282
|
-
"fontFamily": "
|
|
288
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
283
289
|
"fontSize": 12,
|
|
284
290
|
"letterSpacing": 0,
|
|
285
291
|
"lineHeight": 14,
|
|
292
|
+
"textTransform": "uppercase",
|
|
286
293
|
}
|
|
287
294
|
}
|
|
288
295
|
suppressHighlighting={true}
|
package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap
CHANGED
|
@@ -137,43 +137,43 @@ exports[`Bumper/Content/Typography/Features ContentCapsVariants 1`] = `
|
|
|
137
137
|
class="is_VStack _dsp-flex _alignItems-stretch _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _gap-t-space-spa1366020313"
|
|
138
138
|
>
|
|
139
139
|
<span
|
|
140
|
-
class="
|
|
140
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1048365027 _lh-f-lineHeigh1404119176 _ls-f-letterSpa1744401475 _fw-f-weight-bo3448"
|
|
141
141
|
data-disable-theme="true"
|
|
142
142
|
>
|
|
143
|
-
|
|
143
|
+
content caps 3xl
|
|
144
144
|
</span>
|
|
145
145
|
<span
|
|
146
|
-
class="
|
|
146
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1048365988 _lh-f-lineHeigh1404118215 _ls-f-letterSpa1744402436 _fw-f-weight-bo3448"
|
|
147
147
|
data-disable-theme="true"
|
|
148
148
|
>
|
|
149
149
|
CONTENT CAPS 2XL
|
|
150
150
|
</span>
|
|
151
151
|
<span
|
|
152
|
-
class="
|
|
152
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109886 _lh-f-lineHeigh599485619 _ls-f-letterSpa1883393758 _fw-f-weight-bo3448"
|
|
153
153
|
data-disable-theme="true"
|
|
154
154
|
>
|
|
155
155
|
CONTENT CAPS XL
|
|
156
156
|
</span>
|
|
157
157
|
<span
|
|
158
|
-
class="
|
|
158
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321890 _lh-f-lineHeigh1366135091 _ls-f-letterSpa199301954 _fw-f-weight-bo3448"
|
|
159
159
|
data-disable-theme="true"
|
|
160
160
|
>
|
|
161
161
|
CONTENT CAPS L
|
|
162
162
|
</span>
|
|
163
163
|
<span
|
|
164
|
-
class="
|
|
164
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321891 _lh-f-lineHeigh1366135090 _ls-f-letterSpa199301955 _fw-f-weight-bo3448"
|
|
165
165
|
data-disable-theme="true"
|
|
166
166
|
>
|
|
167
167
|
CONTENT CAPS M
|
|
168
168
|
</span>
|
|
169
169
|
<span
|
|
170
|
-
class="
|
|
170
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321897 _lh-f-lineHeigh1366135084 _ls-f-letterSpa199301961 _fw-f-weight-bo3448"
|
|
171
171
|
data-disable-theme="true"
|
|
172
172
|
>
|
|
173
173
|
CONTENT CAPS S
|
|
174
174
|
</span>
|
|
175
175
|
<span
|
|
176
|
-
class="
|
|
176
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448"
|
|
177
177
|
data-disable-theme="true"
|
|
178
178
|
>
|
|
179
179
|
CONTENT CAPS XS
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { BODY_VARIANTS,
|
|
1
|
+
import { BODY_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from '../../../core/tokens/GTStandardFont';
|
|
2
|
+
import { CONTENT_CAPS_VARIANTS } from '../../../core/tokens/GTStandardNarrowFont';
|
|
2
3
|
import { getVariantAndWeightValues } from './getVariantAndWeightValues';
|
|
3
4
|
|
|
4
5
|
describe('getVariantAndWeightValues', () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BODY_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from '../../../core/tokens/GTStandardFont';
|
|
2
|
+
import { CONTENT_CAPS_VARIANTS } from '../../../core/tokens/GTStandardNarrowFont';
|
|
1
3
|
import type { FontVariants } from '../../../core/tokens/fonts';
|
|
2
|
-
import { BODY_VARIANTS, CONTENT_CAPS_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from '../../../core/tokens/fonts';
|
|
3
4
|
import type { InternalTypographyProps, TypographyTextProps } from '../Typography';
|
|
4
5
|
import type { TypographyVariantContextValue, TypographyWeightContextValue } from './typographyContext';
|
|
5
6
|
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
export const HEADING_VARIANTS = [
|
|
2
|
+
'heading-2xl',
|
|
3
|
+
'heading-xl',
|
|
4
|
+
'heading-l',
|
|
5
|
+
'heading-m',
|
|
6
|
+
'heading-s',
|
|
7
|
+
'heading-xs',
|
|
8
|
+
'heading-2xs',
|
|
9
|
+
] as const;
|
|
10
|
+
export const BODY_VARIANTS = ['body-xl', 'body-l', 'body-m', 'body-s', 'body-xs'] as const;
|
|
11
|
+
export const LABEL_VARIANTS = ['label-xl', 'label-l', 'label-m', 'label-s'] as const;
|
|
12
|
+
|
|
13
|
+
export type GTStandardVariants =
|
|
14
|
+
| (typeof HEADING_VARIANTS)[number]
|
|
15
|
+
| (typeof BODY_VARIANTS)[number]
|
|
16
|
+
| (typeof LABEL_VARIANTS)[number];
|
|
17
|
+
export type BodyFontVariants = (typeof BODY_VARIANTS)[number];
|
|
18
|
+
export type LabelFontVariants = (typeof LABEL_VARIANTS)[number];
|
|
19
|
+
export type HeadingFontVariants = (typeof HEADING_VARIANTS)[number];
|
|
20
|
+
|
|
21
|
+
export type GTStandardFontWeight = '500' | '600' | '700';
|
|
22
|
+
|
|
23
|
+
export const GTStandardFaces: Record<GTStandardFontWeight, Record<string, string>> = {
|
|
24
|
+
500: { normal: 'GTStandardRegular' },
|
|
25
|
+
600: { normal: 'GTStandardSemibold' },
|
|
26
|
+
700: { normal: 'GTStandardBold' },
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const GTStandardSizes: Record<GTStandardVariants, number> = {
|
|
30
|
+
'heading-2xl': 56,
|
|
31
|
+
'heading-xl': 48,
|
|
32
|
+
'heading-l': 38,
|
|
33
|
+
'heading-m': 28,
|
|
34
|
+
'heading-s': 24,
|
|
35
|
+
'heading-xs': 20,
|
|
36
|
+
'heading-2xs': 20,
|
|
37
|
+
'body-xl': 24,
|
|
38
|
+
'body-l': 18,
|
|
39
|
+
'body-m': 16,
|
|
40
|
+
'body-s': 14,
|
|
41
|
+
'body-xs': 12,
|
|
42
|
+
'label-xl': 18,
|
|
43
|
+
'label-l': 16,
|
|
44
|
+
'label-m': 14,
|
|
45
|
+
'label-s': 12,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const GTStandardLineHeights: Record<GTStandardVariants, number> = {
|
|
49
|
+
'heading-2xl': 64,
|
|
50
|
+
'heading-xl': 56,
|
|
51
|
+
'heading-l': 44,
|
|
52
|
+
'heading-m': 32,
|
|
53
|
+
'heading-s': 28,
|
|
54
|
+
'heading-xs': 24,
|
|
55
|
+
'heading-2xs': 20,
|
|
56
|
+
'body-xl': 32,
|
|
57
|
+
'body-l': 26,
|
|
58
|
+
'body-m': 24,
|
|
59
|
+
'body-s': 20,
|
|
60
|
+
'body-xs': 16,
|
|
61
|
+
'label-xl': 26,
|
|
62
|
+
'label-l': 20,
|
|
63
|
+
'label-m': 18,
|
|
64
|
+
'label-s': 14,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export const GTStandardLetterSpacings: Record<GTStandardVariants, number> = {
|
|
68
|
+
'heading-2xl': 0,
|
|
69
|
+
'heading-xl': 0,
|
|
70
|
+
'heading-l': 0,
|
|
71
|
+
'heading-m': 0,
|
|
72
|
+
'heading-s': 0,
|
|
73
|
+
'heading-xs': 0,
|
|
74
|
+
'heading-2xs': 0,
|
|
75
|
+
'body-xl': 0.3,
|
|
76
|
+
'body-l': 0.3,
|
|
77
|
+
'body-m': 0.3,
|
|
78
|
+
'body-s': 0.3,
|
|
79
|
+
'body-xs': 0.3,
|
|
80
|
+
'label-xl': 0,
|
|
81
|
+
'label-l': 0,
|
|
82
|
+
'label-m': 0,
|
|
83
|
+
'label-s': 0,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const GTStandardWeights: Record<string, GTStandardFontWeight> = {
|
|
87
|
+
bold: '700',
|
|
88
|
+
semibold: '600',
|
|
89
|
+
regular: '500',
|
|
90
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export const CONTENT_CAPS_VARIANTS = [
|
|
2
|
+
'content-caps-3xl',
|
|
3
|
+
'content-caps-2xl',
|
|
4
|
+
'content-caps-xl',
|
|
5
|
+
'content-caps-l',
|
|
6
|
+
'content-caps-m',
|
|
7
|
+
'content-caps-s',
|
|
8
|
+
'content-caps-xs',
|
|
9
|
+
] as const;
|
|
10
|
+
|
|
11
|
+
export type ContentCapsVariants = (typeof CONTENT_CAPS_VARIANTS)[number];
|
|
12
|
+
|
|
13
|
+
export type GTStandardNarrowFontWeight = '700';
|
|
14
|
+
|
|
15
|
+
export const GTStandardNarrowFaces: Record<GTStandardNarrowFontWeight, Record<string, string>> = {
|
|
16
|
+
700: { normal: 'GTStandardNarrowBold' },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const GTStandardNarrowSizes: Record<ContentCapsVariants, number> = {
|
|
20
|
+
'content-caps-3xl': 40,
|
|
21
|
+
'content-caps-2xl': 32,
|
|
22
|
+
'content-caps-xl': 24,
|
|
23
|
+
'content-caps-l': 18,
|
|
24
|
+
'content-caps-m': 16,
|
|
25
|
+
'content-caps-s': 14,
|
|
26
|
+
'content-caps-xs': 12,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const GTStandardNarrowLineHeights: Record<ContentCapsVariants, number> = {
|
|
30
|
+
'content-caps-3xl': 40,
|
|
31
|
+
'content-caps-2xl': 40,
|
|
32
|
+
'content-caps-xl': 28,
|
|
33
|
+
'content-caps-l': 20,
|
|
34
|
+
'content-caps-m': 18,
|
|
35
|
+
'content-caps-s': 16,
|
|
36
|
+
'content-caps-xs': 14,
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const GTStandardNarrowLetterSpacings: Record<ContentCapsVariants, number> = {
|
|
40
|
+
'content-caps-3xl': 0,
|
|
41
|
+
'content-caps-2xl': 0,
|
|
42
|
+
'content-caps-xl': 0,
|
|
43
|
+
'content-caps-l': 0,
|
|
44
|
+
'content-caps-m': 0,
|
|
45
|
+
'content-caps-s': 0,
|
|
46
|
+
'content-caps-xs': 0,
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const GTStandardNarrowWeights: Record<string, GTStandardNarrowFontWeight> = {
|
|
50
|
+
bold: '700',
|
|
51
|
+
};
|
|
@@ -1204,10 +1204,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1204
1204
|
<Text
|
|
1205
1205
|
style={
|
|
1206
1206
|
{
|
|
1207
|
-
"fontFamily": "
|
|
1207
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1208
1208
|
"fontSize": 40,
|
|
1209
1209
|
"letterSpacing": 0,
|
|
1210
1210
|
"lineHeight": 40,
|
|
1211
|
+
"textTransform": "uppercase",
|
|
1211
1212
|
}
|
|
1212
1213
|
}
|
|
1213
1214
|
suppressHighlighting={true}
|
|
@@ -1273,10 +1274,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1273
1274
|
<Text
|
|
1274
1275
|
style={
|
|
1275
1276
|
{
|
|
1276
|
-
"fontFamily": "
|
|
1277
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1277
1278
|
"fontSize": 32,
|
|
1278
1279
|
"letterSpacing": 0,
|
|
1279
1280
|
"lineHeight": 40,
|
|
1281
|
+
"textTransform": "uppercase",
|
|
1280
1282
|
}
|
|
1281
1283
|
}
|
|
1282
1284
|
suppressHighlighting={true}
|
|
@@ -1342,10 +1344,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1342
1344
|
<Text
|
|
1343
1345
|
style={
|
|
1344
1346
|
{
|
|
1345
|
-
"fontFamily": "
|
|
1347
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1346
1348
|
"fontSize": 24,
|
|
1347
1349
|
"letterSpacing": 0,
|
|
1348
1350
|
"lineHeight": 28,
|
|
1351
|
+
"textTransform": "uppercase",
|
|
1349
1352
|
}
|
|
1350
1353
|
}
|
|
1351
1354
|
suppressHighlighting={true}
|
|
@@ -1411,10 +1414,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1411
1414
|
<Text
|
|
1412
1415
|
style={
|
|
1413
1416
|
{
|
|
1414
|
-
"fontFamily": "
|
|
1417
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1415
1418
|
"fontSize": 18,
|
|
1416
1419
|
"letterSpacing": 0,
|
|
1417
1420
|
"lineHeight": 20,
|
|
1421
|
+
"textTransform": "uppercase",
|
|
1418
1422
|
}
|
|
1419
1423
|
}
|
|
1420
1424
|
suppressHighlighting={true}
|
|
@@ -1480,10 +1484,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1480
1484
|
<Text
|
|
1481
1485
|
style={
|
|
1482
1486
|
{
|
|
1483
|
-
"fontFamily": "
|
|
1487
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1484
1488
|
"fontSize": 16,
|
|
1485
1489
|
"letterSpacing": 0,
|
|
1486
1490
|
"lineHeight": 18,
|
|
1491
|
+
"textTransform": "uppercase",
|
|
1487
1492
|
}
|
|
1488
1493
|
}
|
|
1489
1494
|
suppressHighlighting={true}
|
|
@@ -1549,10 +1554,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1549
1554
|
<Text
|
|
1550
1555
|
style={
|
|
1551
1556
|
{
|
|
1552
|
-
"fontFamily": "
|
|
1557
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1553
1558
|
"fontSize": 14,
|
|
1554
1559
|
"letterSpacing": 0,
|
|
1555
1560
|
"lineHeight": 16,
|
|
1561
|
+
"textTransform": "uppercase",
|
|
1556
1562
|
}
|
|
1557
1563
|
}
|
|
1558
1564
|
suppressHighlighting={true}
|
|
@@ -1618,10 +1624,11 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
1618
1624
|
<Text
|
|
1619
1625
|
style={
|
|
1620
1626
|
{
|
|
1621
|
-
"fontFamily": "
|
|
1627
|
+
"fontFamily": "GTStandardNarrowBold",
|
|
1622
1628
|
"fontSize": 12,
|
|
1623
1629
|
"letterSpacing": 0,
|
|
1624
1630
|
"lineHeight": 14,
|
|
1631
|
+
"textTransform": "uppercase",
|
|
1625
1632
|
}
|
|
1626
1633
|
}
|
|
1627
1634
|
suppressHighlighting={true}
|
|
@@ -533,7 +533,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
533
533
|
</span>
|
|
534
534
|
</div>
|
|
535
535
|
<span
|
|
536
|
-
class="
|
|
536
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1048365027 _lh-f-lineHeigh1404119176 _ls-f-letterSpa1744401475 _fw-f-weight-bo3448"
|
|
537
537
|
data-disable-theme="true"
|
|
538
538
|
>
|
|
539
539
|
The quick brown fox
|
|
@@ -563,7 +563,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
563
563
|
</span>
|
|
564
564
|
</div>
|
|
565
565
|
<span
|
|
566
|
-
class="
|
|
566
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1048365988 _lh-f-lineHeigh1404118215 _ls-f-letterSpa1744402436 _fw-f-weight-bo3448"
|
|
567
567
|
data-disable-theme="true"
|
|
568
568
|
>
|
|
569
569
|
The quick brown fox
|
|
@@ -593,7 +593,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
593
593
|
</span>
|
|
594
594
|
</div>
|
|
595
595
|
<span
|
|
596
|
-
class="
|
|
596
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109886 _lh-f-lineHeigh599485619 _ls-f-letterSpa1883393758 _fw-f-weight-bo3448"
|
|
597
597
|
data-disable-theme="true"
|
|
598
598
|
>
|
|
599
599
|
The quick brown fox
|
|
@@ -623,7 +623,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
623
623
|
</span>
|
|
624
624
|
</div>
|
|
625
625
|
<span
|
|
626
|
-
class="
|
|
626
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321890 _lh-f-lineHeigh1366135091 _ls-f-letterSpa199301954 _fw-f-weight-bo3448"
|
|
627
627
|
data-disable-theme="true"
|
|
628
628
|
>
|
|
629
629
|
The quick brown fox
|
|
@@ -653,7 +653,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
653
653
|
</span>
|
|
654
654
|
</div>
|
|
655
655
|
<span
|
|
656
|
-
class="
|
|
656
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321891 _lh-f-lineHeigh1366135090 _ls-f-letterSpa199301955 _fw-f-weight-bo3448"
|
|
657
657
|
data-disable-theme="true"
|
|
658
658
|
>
|
|
659
659
|
The quick brown fox
|
|
@@ -683,7 +683,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
683
683
|
</span>
|
|
684
684
|
</div>
|
|
685
685
|
<span
|
|
686
|
-
class="
|
|
686
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont593321897 _lh-f-lineHeigh1366135084 _ls-f-letterSpa199301961 _fw-f-weight-bo3448"
|
|
687
687
|
data-disable-theme="true"
|
|
688
688
|
>
|
|
689
689
|
The quick brown fox
|
|
@@ -713,7 +713,7 @@ exports[`Bumper/Core/Tokens Fonts 1`] = `
|
|
|
713
713
|
</span>
|
|
714
714
|
</div>
|
|
715
715
|
<span
|
|
716
|
-
class="
|
|
716
|
+
class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448"
|
|
717
717
|
data-disable-theme="true"
|
|
718
718
|
>
|
|
719
719
|
The quick brown fox
|
|
@@ -2,7 +2,12 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { Typography } from '../../content/typography';
|
|
3
3
|
import { HStack, VStack } from '../primitives/Stack';
|
|
4
4
|
import { View } from '../primitives/View';
|
|
5
|
-
import {
|
|
5
|
+
import { GTStandardLineHeights, GTStandardSizes } from './GTStandardFont';
|
|
6
|
+
import { GTStandardNarrowLineHeights, GTStandardNarrowSizes } from './GTStandardNarrowFont';
|
|
7
|
+
import { VARIANTS } from './fonts';
|
|
8
|
+
|
|
9
|
+
const allSizes = { ...GTStandardSizes, ...GTStandardNarrowSizes };
|
|
10
|
+
const allLineHeights = { ...GTStandardLineHeights, ...GTStandardNarrowLineHeights };
|
|
6
11
|
|
|
7
12
|
const meta: Meta = {
|
|
8
13
|
title: 'Bumper/Core/Tokens',
|
|
@@ -27,7 +32,7 @@ export const Fonts: Story = {
|
|
|
27
32
|
</View>
|
|
28
33
|
<View width={80}>
|
|
29
34
|
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
30
|
-
{
|
|
35
|
+
{allSizes[variant]}px / {allLineHeights[variant]}px
|
|
31
36
|
</Typography.Text>
|
|
32
37
|
</View>
|
|
33
38
|
<Typography.Text variant={variant}>The quick brown fox</Typography.Text>
|
|
@@ -1,119 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
'heading-l',
|
|
5
|
-
'heading-m',
|
|
6
|
-
'heading-s',
|
|
7
|
-
'heading-xs',
|
|
8
|
-
'heading-2xs',
|
|
9
|
-
] as const;
|
|
10
|
-
export const BODY_VARIANTS = ['body-xl', 'body-l', 'body-m', 'body-s', 'body-xs'] as const;
|
|
11
|
-
export const LABEL_VARIANTS = ['label-xl', 'label-l', 'label-m', 'label-s'] as const;
|
|
12
|
-
export const CONTENT_CAPS_VARIANTS = [
|
|
13
|
-
'content-caps-3xl',
|
|
14
|
-
'content-caps-2xl',
|
|
15
|
-
'content-caps-xl',
|
|
16
|
-
'content-caps-l',
|
|
17
|
-
'content-caps-m',
|
|
18
|
-
'content-caps-s',
|
|
19
|
-
'content-caps-xs',
|
|
20
|
-
] as const;
|
|
1
|
+
import { BODY_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from './GTStandardFont';
|
|
2
|
+
import { CONTENT_CAPS_VARIANTS } from './GTStandardNarrowFont';
|
|
3
|
+
|
|
21
4
|
export const VARIANTS = [...HEADING_VARIANTS, ...BODY_VARIANTS, ...LABEL_VARIANTS, ...CONTENT_CAPS_VARIANTS] as const;
|
|
22
5
|
|
|
23
6
|
export type FontVariants = (typeof VARIANTS)[number];
|
|
24
|
-
export type BodyFontVariants = (typeof BODY_VARIANTS)[number];
|
|
25
|
-
export type LabelFontVariants = (typeof LABEL_VARIANTS)[number];
|
|
26
|
-
export type HeadingFontVariants = (typeof HEADING_VARIANTS)[number];
|
|
27
|
-
export type ContentCapsVariants = (typeof CONTENT_CAPS_VARIANTS)[number];
|
|
28
|
-
|
|
29
|
-
export type GTStandardFontWeight = '500' | '600' | '700';
|
|
30
|
-
|
|
31
|
-
export const GTStandardFaces: Record<GTStandardFontWeight, Record<string, string>> = {
|
|
32
|
-
500: { normal: 'GTStandardRegular' },
|
|
33
|
-
600: { normal: 'GTStandardSemibold' },
|
|
34
|
-
700: { normal: 'GTStandardBold' },
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const size: Record<FontVariants, number> = {
|
|
38
|
-
'heading-2xl': 56,
|
|
39
|
-
'heading-xl': 48,
|
|
40
|
-
'heading-l': 38,
|
|
41
|
-
'heading-m': 28,
|
|
42
|
-
'heading-s': 24,
|
|
43
|
-
'heading-xs': 20,
|
|
44
|
-
'heading-2xs': 20,
|
|
45
|
-
'body-xl': 24,
|
|
46
|
-
'body-l': 18,
|
|
47
|
-
'body-m': 16,
|
|
48
|
-
'body-s': 14,
|
|
49
|
-
'body-xs': 12,
|
|
50
|
-
'label-xl': 18,
|
|
51
|
-
'label-l': 16,
|
|
52
|
-
'label-m': 14,
|
|
53
|
-
'label-s': 12,
|
|
54
|
-
'content-caps-3xl': 40,
|
|
55
|
-
'content-caps-2xl': 32,
|
|
56
|
-
'content-caps-xl': 24,
|
|
57
|
-
'content-caps-l': 18,
|
|
58
|
-
'content-caps-m': 16,
|
|
59
|
-
'content-caps-s': 14,
|
|
60
|
-
'content-caps-xs': 12,
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const lineHeight: Record<FontVariants, number> = {
|
|
64
|
-
'heading-2xl': 64,
|
|
65
|
-
'heading-xl': 56,
|
|
66
|
-
'heading-l': 44,
|
|
67
|
-
'heading-m': 32,
|
|
68
|
-
'heading-s': 28,
|
|
69
|
-
'heading-xs': 24,
|
|
70
|
-
'heading-2xs': 20,
|
|
71
|
-
'body-xl': 32,
|
|
72
|
-
'body-l': 26,
|
|
73
|
-
'body-m': 24,
|
|
74
|
-
'body-s': 20,
|
|
75
|
-
'body-xs': 16,
|
|
76
|
-
'label-xl': 26,
|
|
77
|
-
'label-l': 20,
|
|
78
|
-
'label-m': 18,
|
|
79
|
-
'label-s': 14,
|
|
80
|
-
'content-caps-3xl': 40,
|
|
81
|
-
'content-caps-2xl': 40,
|
|
82
|
-
'content-caps-xl': 28,
|
|
83
|
-
'content-caps-l': 20,
|
|
84
|
-
'content-caps-m': 18,
|
|
85
|
-
'content-caps-s': 16,
|
|
86
|
-
'content-caps-xs': 14,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
export const letterSpacing: Record<FontVariants, number> = {
|
|
90
|
-
'heading-2xl': 0,
|
|
91
|
-
'heading-xl': 0,
|
|
92
|
-
'heading-l': 0,
|
|
93
|
-
'heading-m': 0,
|
|
94
|
-
'heading-s': 0,
|
|
95
|
-
'heading-xs': 0,
|
|
96
|
-
'heading-2xs': 0,
|
|
97
|
-
'body-xl': 0.3,
|
|
98
|
-
'body-l': 0.3,
|
|
99
|
-
'body-m': 0.3,
|
|
100
|
-
'body-s': 0.3,
|
|
101
|
-
'body-xs': 0.3,
|
|
102
|
-
'label-xl': 0,
|
|
103
|
-
'label-l': 0,
|
|
104
|
-
'label-m': 0,
|
|
105
|
-
'label-s': 0,
|
|
106
|
-
'content-caps-3xl': 0,
|
|
107
|
-
'content-caps-2xl': 0,
|
|
108
|
-
'content-caps-xl': 0,
|
|
109
|
-
'content-caps-l': 0,
|
|
110
|
-
'content-caps-m': 0,
|
|
111
|
-
'content-caps-s': 0,
|
|
112
|
-
'content-caps-xs': 0,
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const weight: Record<string, GTStandardFontWeight> = {
|
|
116
|
-
bold: '700',
|
|
117
|
-
semibold: '600',
|
|
118
|
-
regular: '500',
|
|
119
|
-
};
|