@ornikar/bumper 2.7.2-canary.1768566928.e85c568dc49c9180e37b7aec8792b1e8d45968a6.0 → 2.8.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/CHANGELOG.md +4 -4
- package/CLAUDE.md +45 -0
- package/dist/definitions/system/core/breakpoints/hooks/useCurrentBreakpointName.d.ts +1 -1
- package/dist/definitions/system/core/breakpoints/hooks/useCurrentBreakpointName.d.ts.map +1 -1
- package/dist/definitions/system/core/breakpoints/utils/breakpointsUtils.d.ts +1 -1
- package/dist/definitions/system/core/breakpoints/utils/breakpointsUtils.d.ts.map +1 -1
- package/dist/definitions/system/core/primitives/Pressable.d.ts +0 -9
- package/dist/definitions/system/core/primitives/Pressable.d.ts.map +1 -1
- package/dist/definitions/system/core/{breakpoints/constants.d.ts → tokens/breakpoints.d.ts} +1 -1
- package/dist/definitions/system/core/tokens/breakpoints.d.ts.map +1 -0
- package/dist/definitions/tamagui.config.d.ts +2 -28
- package/dist/definitions/tamagui.config.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +42 -26
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +42 -26
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +42 -26
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +42 -26
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +42 -26
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +42 -26
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +36 -20
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +36 -20
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/system/content/typography/Typography.features.stories.tsx +156 -0
- package/src/system/content/typography/Typography.stories.tsx +72 -166
- package/src/system/content/typography/__snapshots__/Typography.features.stories.tsx.snap +826 -0
- package/src/system/content/typography/__snapshots__/Typography.stories.tsx.snap +10 -1990
- package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +501 -0
- package/src/system/content/typography/__snapshots_web__/Typography.stories.tsx.snap +7 -808
- package/src/system/core/breakpoints/hooks/useBreakpointValue.test.ts +1 -1
- package/src/system/core/breakpoints/hooks/useCurrentBreakpointName.test.ts +1 -1
- package/src/system/core/breakpoints/hooks/useCurrentBreakpointName.ts +1 -1
- package/src/system/core/breakpoints/utils/breakpointsUtils.test.ts +1 -1
- package/src/system/core/breakpoints/utils/breakpointsUtils.ts +1 -1
- package/src/system/core/primitives/Center.features.stories.tsx +63 -0
- package/src/system/core/primitives/Center.stories.tsx +111 -12
- package/src/system/core/primitives/Pressable.features.stories.tsx +171 -0
- package/src/system/core/primitives/Pressable.stories.tsx +82 -20
- package/src/system/core/primitives/Pressable.tsx +0 -9
- package/src/system/core/primitives/Stack.features.stories.tsx +179 -0
- package/src/system/core/primitives/Stack.stories.tsx +74 -44
- package/src/system/core/primitives/View.features.stories.tsx +452 -0
- package/src/system/core/primitives/View.stories.tsx +122 -9
- package/src/system/core/primitives/__snapshots__/Center.features.stories.tsx.snap +208 -0
- package/src/system/core/primitives/__snapshots__/Center.stories.tsx.snap +13 -8
- package/src/system/core/primitives/__snapshots__/Pressable.features.stories.tsx.snap +470 -0
- package/src/system/core/primitives/__snapshots__/Pressable.stories.tsx.snap +11 -10
- package/src/system/core/primitives/__snapshots__/Stack.features.stories.tsx.snap +1234 -0
- package/src/system/core/primitives/__snapshots__/Stack.stories.tsx.snap +63 -84
- package/src/system/core/primitives/__snapshots__/View.features.stories.tsx.snap +2338 -0
- package/src/system/core/primitives/__snapshots__/View.stories.tsx.snap +6 -4
- package/src/system/core/primitives/__snapshots_web__/Center.features.stories.tsx.snap +107 -0
- package/src/system/core/primitives/__snapshots_web__/Center.stories.tsx.snap +9 -6
- package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +193 -0
- package/src/system/core/primitives/__snapshots_web__/Pressable.stories.tsx.snap +5 -5
- package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +515 -0
- package/src/system/core/primitives/__snapshots_web__/Stack.stories.tsx.snap +30 -22
- package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +941 -0
- package/src/system/core/primitives/__snapshots_web__/View.stories.tsx.snap +3 -3
- package/src/system/core/themes/__snapshots__/light.stories.tsx.snap +3822 -2233
- package/src/system/core/themes/__snapshots_web__/light.stories.tsx.snap +1244 -992
- package/src/system/core/themes/light.stories.tsx +61 -28
- package/src/system/core/tokens/__snapshots__/breakpoints.stories.tsx.snap +423 -0
- package/src/system/core/tokens/__snapshots__/fonts.stories.tsx.snap +1635 -0
- package/src/system/core/tokens/__snapshots__/radius.stories.tsx.snap +383 -0
- package/src/system/core/tokens/__snapshots__/size.stories.tsx.snap +864 -0
- package/src/system/core/tokens/__snapshots__/space.stories.tsx.snap +945 -0
- package/src/system/core/tokens/__snapshots_web__/breakpoints.stories.tsx.snap +194 -0
- package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +729 -0
- package/src/system/core/tokens/__snapshots_web__/radius.stories.tsx.snap +174 -0
- package/src/system/core/tokens/__snapshots_web__/size.stories.tsx.snap +363 -0
- package/src/system/core/tokens/__snapshots_web__/space.stories.tsx.snap +396 -0
- package/src/system/core/tokens/breakpoints.stories.tsx +46 -0
- package/src/system/core/tokens/fonts.stories.tsx +39 -0
- package/src/system/core/tokens/palettes/__snapshots__/deepPurpleColorPalette.stories.tsx.snap +4337 -2747
- package/src/system/core/tokens/palettes/__snapshots_web__/deepPurpleColorPalette.stories.tsx.snap +1525 -1257
- package/src/system/core/tokens/palettes/deepPurpleColorPalette.stories.tsx +42 -28
- package/src/system/core/tokens/radius.stories.tsx +39 -0
- package/src/system/core/tokens/size.stories.tsx +39 -0
- package/src/system/core/tokens/space.stories.tsx +40 -0
- package/src/tamagui.config.ts +3 -3
- package/dist/definitions/system/core/breakpoints/constants.d.ts.map +0 -1
- package/src/system/core/breakpoints/__snapshots__/breakpoints.stories.tsx.snap +0 -49
- package/src/system/core/breakpoints/__snapshots_web__/breakpoints.stories.tsx.snap +0 -43
- package/src/system/core/breakpoints/breakpoints.stories.tsx +0 -45
- /package/src/system/core/{breakpoints/constants.ts → tokens/breakpoints.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/bumper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "@ornikar/bumper",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.24.0",
|
|
31
|
-
"@tamagui/core": "1.
|
|
31
|
+
"@tamagui/core": "1.144.2"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@storybook/preview-api": ">=8.6.15",
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-dom": "^
|
|
35
|
+
"react": "^18.3.1",
|
|
36
|
+
"react-dom": "^18.3.1",
|
|
37
37
|
"react-native": ">=0.76.9"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@testing-library/dom": "10.4.1",
|
|
53
53
|
"@testing-library/react": "16.3.1",
|
|
54
54
|
"@testing-library/react-native": "13.3.3",
|
|
55
|
-
"@types/react": "
|
|
56
|
-
"react": "
|
|
57
|
-
"react-dom": "
|
|
58
|
-
"react-native": "0.
|
|
59
|
-
"react-test-renderer": "
|
|
55
|
+
"@types/react": "18.3.27",
|
|
56
|
+
"react": "18.3.1",
|
|
57
|
+
"react-dom": "18.3.1",
|
|
58
|
+
"react-native": "0.76.9",
|
|
59
|
+
"react-test-renderer": "18.3.1"
|
|
60
60
|
},
|
|
61
61
|
"expo": {},
|
|
62
62
|
"exports": {
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { VStack } from '../../core/primitives/Stack';
|
|
3
|
+
import { Typography } from './Typography';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Typography.Text> = {
|
|
6
|
+
title: 'Bumper/Content/Typography/Features',
|
|
7
|
+
component: Typography.Text,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
|
|
13
|
+
export const HeadingVariants: Story = {
|
|
14
|
+
render: () => (
|
|
15
|
+
<VStack gap="$space.16">
|
|
16
|
+
<Typography.Text variant="heading-2xl">Heading 2XL - Semibold</Typography.Text>
|
|
17
|
+
<Typography.Text variant="heading-xl">Heading XL - Semibold</Typography.Text>
|
|
18
|
+
<Typography.Text variant="heading-l">Heading L - Semibold</Typography.Text>
|
|
19
|
+
<Typography.Text variant="heading-m">Heading M - Semibold</Typography.Text>
|
|
20
|
+
<Typography.Text variant="heading-s">Heading S - Semibold</Typography.Text>
|
|
21
|
+
<Typography.Text variant="heading-xs">Heading XS - Semibold</Typography.Text>
|
|
22
|
+
<Typography.Text variant="heading-2xs">Heading 2XS - Semibold</Typography.Text>
|
|
23
|
+
</VStack>
|
|
24
|
+
),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const BodyVariants: Story = {
|
|
28
|
+
render: () => (
|
|
29
|
+
<VStack gap="$space.16">
|
|
30
|
+
<Typography.Text variant="body-xl" weight="regular">
|
|
31
|
+
Body XL Regular - The quick brown fox jumps over the lazy dog
|
|
32
|
+
</Typography.Text>
|
|
33
|
+
<Typography.Text variant="body-l" weight="regular">
|
|
34
|
+
Body L Regular - The quick brown fox jumps over the lazy dog
|
|
35
|
+
</Typography.Text>
|
|
36
|
+
<Typography.Text variant="body-m" weight="regular">
|
|
37
|
+
Body M Regular - The quick brown fox jumps over the lazy dog
|
|
38
|
+
</Typography.Text>
|
|
39
|
+
<Typography.Text variant="body-s" weight="regular">
|
|
40
|
+
Body S Regular - The quick brown fox jumps over the lazy dog
|
|
41
|
+
</Typography.Text>
|
|
42
|
+
<Typography.Text variant="body-xs" weight="regular">
|
|
43
|
+
Body XS Regular - The quick brown fox jumps over the lazy dog
|
|
44
|
+
</Typography.Text>
|
|
45
|
+
</VStack>
|
|
46
|
+
),
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const BodyVariantsBold: Story = {
|
|
50
|
+
render: () => (
|
|
51
|
+
<VStack gap="$space.16">
|
|
52
|
+
<Typography.Text variant="body-xl" weight="bold">
|
|
53
|
+
Body XL Bold - The quick brown fox jumps over the lazy dog
|
|
54
|
+
</Typography.Text>
|
|
55
|
+
<Typography.Text variant="body-l" weight="bold">
|
|
56
|
+
Body L Bold - The quick brown fox jumps over the lazy dog
|
|
57
|
+
</Typography.Text>
|
|
58
|
+
<Typography.Text variant="body-m" weight="bold">
|
|
59
|
+
Body M Bold - The quick brown fox jumps over the lazy dog
|
|
60
|
+
</Typography.Text>
|
|
61
|
+
<Typography.Text variant="body-s" weight="bold">
|
|
62
|
+
Body S Bold - The quick brown fox jumps over the lazy dog
|
|
63
|
+
</Typography.Text>
|
|
64
|
+
<Typography.Text variant="body-xs" weight="bold">
|
|
65
|
+
Body XS Bold - The quick brown fox jumps over the lazy dog
|
|
66
|
+
</Typography.Text>
|
|
67
|
+
</VStack>
|
|
68
|
+
),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const LabelVariants: Story = {
|
|
72
|
+
render: () => (
|
|
73
|
+
<VStack gap="$space.16">
|
|
74
|
+
<Typography.Text variant="label-xl">Label XL - Semibold</Typography.Text>
|
|
75
|
+
<Typography.Text variant="label-l">Label L - Semibold</Typography.Text>
|
|
76
|
+
<Typography.Text variant="label-m">Label M - Semibold</Typography.Text>
|
|
77
|
+
<Typography.Text variant="label-s">Label S - Semibold</Typography.Text>
|
|
78
|
+
</VStack>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const ContentCapsVariants: Story = {
|
|
83
|
+
render: () => (
|
|
84
|
+
<VStack gap="$space.16">
|
|
85
|
+
<Typography.Text variant="content-caps-3xl">CONTENT CAPS 3XL</Typography.Text>
|
|
86
|
+
<Typography.Text variant="content-caps-2xl">CONTENT CAPS 2XL</Typography.Text>
|
|
87
|
+
<Typography.Text variant="content-caps-xl">CONTENT CAPS XL</Typography.Text>
|
|
88
|
+
<Typography.Text variant="content-caps-l">CONTENT CAPS L</Typography.Text>
|
|
89
|
+
<Typography.Text variant="content-caps-m">CONTENT CAPS M</Typography.Text>
|
|
90
|
+
<Typography.Text variant="content-caps-s">CONTENT CAPS S</Typography.Text>
|
|
91
|
+
<Typography.Text variant="content-caps-xs">CONTENT CAPS XS</Typography.Text>
|
|
92
|
+
</VStack>
|
|
93
|
+
),
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
export const HeaderComponents: Story = {
|
|
97
|
+
render: () => (
|
|
98
|
+
<VStack gap="$space.16">
|
|
99
|
+
<Typography.Header1 variant="heading-2xl">Header 1 - heading-2xl</Typography.Header1>
|
|
100
|
+
<Typography.Header2 variant="heading-xl">Header 2 - heading-xl</Typography.Header2>
|
|
101
|
+
<Typography.Header3 variant="heading-l">Header 3 - heading-l</Typography.Header3>
|
|
102
|
+
<Typography.Header4 variant="heading-m">Header 4 - heading-m</Typography.Header4>
|
|
103
|
+
<Typography.Header5 variant="heading-s">Header 5 - heading-s</Typography.Header5>
|
|
104
|
+
<Typography.Header6 variant="heading-xs">Header 6 - heading-xs</Typography.Header6>
|
|
105
|
+
</VStack>
|
|
106
|
+
),
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export const ContextInheritance: Story = {
|
|
110
|
+
render: () => (
|
|
111
|
+
<VStack gap="$space.24">
|
|
112
|
+
<VStack gap="$space.8">
|
|
113
|
+
<Typography.Text variant="body-s" weight="regular" color="$content.base.mid">
|
|
114
|
+
Parent variant
|
|
115
|
+
</Typography.Text>
|
|
116
|
+
<Typography.Text variant="body-l" weight="bold" color="$content.accent">
|
|
117
|
+
Parent: body-l bold accent
|
|
118
|
+
<Typography.Text> - Child inherits all (variant, weight, color)</Typography.Text>
|
|
119
|
+
</Typography.Text>
|
|
120
|
+
</VStack>
|
|
121
|
+
|
|
122
|
+
<VStack gap="$space.8">
|
|
123
|
+
<Typography.Text variant="body-s" weight="regular" color="$content.base.mid">
|
|
124
|
+
Weight inheritance
|
|
125
|
+
</Typography.Text>
|
|
126
|
+
<Typography.Text variant="body-m" weight="bold">
|
|
127
|
+
Parent: body-m bold
|
|
128
|
+
<Typography.Text> - Child inherits weight</Typography.Text>
|
|
129
|
+
</Typography.Text>
|
|
130
|
+
</VStack>
|
|
131
|
+
|
|
132
|
+
<VStack gap="$space.8">
|
|
133
|
+
<Typography.Text variant="body-s" weight="regular" color="$content.base.mid">
|
|
134
|
+
Color inheritance
|
|
135
|
+
</Typography.Text>
|
|
136
|
+
<Typography.Text variant="body-m" color="$content.success">
|
|
137
|
+
Parent: success color
|
|
138
|
+
<Typography.Text> - Child inherits color</Typography.Text>
|
|
139
|
+
</Typography.Text>
|
|
140
|
+
</VStack>
|
|
141
|
+
|
|
142
|
+
<VStack gap="$space.8">
|
|
143
|
+
<Typography.Text variant="body-s" weight="regular" color="$content.base.mid">
|
|
144
|
+
Override inherited values
|
|
145
|
+
</Typography.Text>
|
|
146
|
+
<Typography.Text variant="body-m" weight="bold" color="$content.accent">
|
|
147
|
+
Parent: body-m bold accent
|
|
148
|
+
<Typography.Text variant="body-s" weight="regular" color="$content.danger">
|
|
149
|
+
{' '}
|
|
150
|
+
- Child overrides all
|
|
151
|
+
</Typography.Text>
|
|
152
|
+
</Typography.Text>
|
|
153
|
+
</VStack>
|
|
154
|
+
</VStack>
|
|
155
|
+
),
|
|
156
|
+
};
|
|
@@ -1,172 +1,78 @@
|
|
|
1
|
-
import type { Meta,
|
|
2
|
-
import type { FC } from 'react';
|
|
3
|
-
import { StorySection } from '../../../shared/storybook/StorySection';
|
|
4
|
-
import { VStack } from '../../core/primitives/Stack';
|
|
5
|
-
import { View } from '../../core/primitives/View';
|
|
6
|
-
import type {
|
|
7
|
-
BodyFontVariants,
|
|
8
|
-
ContentCapsVariants,
|
|
9
|
-
FontVariants,
|
|
10
|
-
HeadingFontVariants,
|
|
11
|
-
LabelFontVariants,
|
|
12
|
-
} from '../../core/tokens/fonts';
|
|
13
|
-
import type { TypographyTextProps } from './Typography';
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
14
2
|
import { Typography } from './Typography';
|
|
15
3
|
|
|
16
|
-
|
|
17
|
-
title: '
|
|
4
|
+
const meta: Meta<typeof Typography.Text> = {
|
|
5
|
+
title: 'Bumper/Content/Typography',
|
|
18
6
|
component: Typography.Text,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
backgroundColor="$bg.base.mid.default"
|
|
80
|
-
marginTop="$space.4"
|
|
81
|
-
>
|
|
82
|
-
{/* @ts-expect-error some variants does not support specific weight */}
|
|
83
|
-
<Typography.Text variant={type.variant} weight={weight}>
|
|
84
|
-
The quick brown fox jumps over the lazy dog
|
|
85
|
-
</Typography.Text>
|
|
86
|
-
</View>
|
|
87
|
-
</VStack>
|
|
88
|
-
));
|
|
89
|
-
})}
|
|
90
|
-
</>
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const TypographyStory: StoryFn<typeof Typography.Text> = (args) => (
|
|
95
|
-
<>
|
|
96
|
-
<StorySection.Demo>
|
|
97
|
-
<Typography.Text {...args} />
|
|
98
|
-
</StorySection.Demo>
|
|
99
|
-
<StorySection title="Inheritance">
|
|
100
|
-
<StorySection.SubSection title="Type inheritance">
|
|
101
|
-
<Typography.Text variant="body-l">
|
|
102
|
-
Type is body-l{' '}
|
|
103
|
-
<Typography.Text variant="heading-l">
|
|
104
|
-
type is heading-l <Typography.Text color="$content.accent">type is undefined</Typography.Text>
|
|
105
|
-
</Typography.Text>{' '}
|
|
106
|
-
<Typography.Text color="$content.danger">
|
|
107
|
-
type is undefined <Typography.Text variant="body-s">Type is body-s</Typography.Text>
|
|
108
|
-
</Typography.Text>
|
|
109
|
-
.
|
|
110
|
-
</Typography.Text>
|
|
111
|
-
</StorySection.SubSection>
|
|
112
|
-
<StorySection.SubSection title="Weight inheritance">
|
|
113
|
-
<Typography.Text>
|
|
114
|
-
weight is undefined{' '}
|
|
115
|
-
<Typography.Text weight="bold">
|
|
116
|
-
weight is bold{' '}
|
|
117
|
-
<Typography.Text variant="heading-m">
|
|
118
|
-
weight is undefined and type is heading-m{' '}
|
|
119
|
-
<Typography.Text variant="body-m" weight="regular">
|
|
120
|
-
weight is regular <Typography.Text weight="bold">weight is bold</Typography.Text>
|
|
121
|
-
</Typography.Text>
|
|
122
|
-
</Typography.Text>
|
|
123
|
-
</Typography.Text>{' '}
|
|
124
|
-
</Typography.Text>
|
|
125
|
-
</StorySection.SubSection>
|
|
126
|
-
<StorySection.SubSection title="Color inheritance">
|
|
127
|
-
<Typography.Text>
|
|
128
|
-
color is undefined{' '}
|
|
129
|
-
<Typography.Text color="$content.accent">
|
|
130
|
-
color is $content.accent{' '}
|
|
131
|
-
<Typography.Text>
|
|
132
|
-
color is undefined{' '}
|
|
133
|
-
<Typography.Text color="$content.danger">
|
|
134
|
-
color is content.danger{' '}
|
|
135
|
-
<Typography.Text color="$content.base.hi">color is content.base.hi</Typography.Text>
|
|
136
|
-
</Typography.Text>
|
|
137
|
-
</Typography.Text>
|
|
138
|
-
</Typography.Text>
|
|
139
|
-
</Typography.Text>
|
|
140
|
-
</StorySection.SubSection>
|
|
141
|
-
<StorySection title="Heading">
|
|
142
|
-
<TypographyVariants types={headingVariants} />
|
|
143
|
-
</StorySection>
|
|
144
|
-
<StorySection title="Body">
|
|
145
|
-
<TypographyVariants types={bodyVariants} />
|
|
146
|
-
</StorySection>
|
|
147
|
-
<StorySection title="Label">
|
|
148
|
-
<TypographyVariants types={labelVariants} />
|
|
149
|
-
</StorySection>
|
|
150
|
-
<StorySection title="Content Caps">
|
|
151
|
-
<TypographyVariants types={contentCapsVariants} />
|
|
152
|
-
</StorySection>
|
|
153
|
-
<StorySection title="Accessibility">
|
|
154
|
-
<Typography.Header1>role: heading aria-level: 1</Typography.Header1>
|
|
155
|
-
<Typography.Header2>role: heading aria-level: 2</Typography.Header2>
|
|
156
|
-
<Typography.Header3>role: heading aria-level: 3</Typography.Header3>
|
|
157
|
-
<Typography.Header4>role: heading aria-level: 4</Typography.Header4>
|
|
158
|
-
<Typography.Header5>role: heading aria-level: 5</Typography.Header5>
|
|
159
|
-
<Typography.Header6>role: heading aria-level: 6</Typography.Header6>
|
|
160
|
-
</StorySection>
|
|
161
|
-
</StorySection>
|
|
162
|
-
</>
|
|
163
|
-
);
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
argTypes: {
|
|
9
|
+
variant: {
|
|
10
|
+
control: 'select',
|
|
11
|
+
options: [
|
|
12
|
+
'heading-2xl',
|
|
13
|
+
'heading-xl',
|
|
14
|
+
'heading-l',
|
|
15
|
+
'heading-m',
|
|
16
|
+
'heading-s',
|
|
17
|
+
'heading-xs',
|
|
18
|
+
'heading-2xs',
|
|
19
|
+
'body-xl',
|
|
20
|
+
'body-l',
|
|
21
|
+
'body-m',
|
|
22
|
+
'body-s',
|
|
23
|
+
'body-xs',
|
|
24
|
+
'label-xl',
|
|
25
|
+
'label-l',
|
|
26
|
+
'label-m',
|
|
27
|
+
'label-s',
|
|
28
|
+
'content-caps-3xl',
|
|
29
|
+
'content-caps-2xl',
|
|
30
|
+
'content-caps-xl',
|
|
31
|
+
'content-caps-l',
|
|
32
|
+
'content-caps-m',
|
|
33
|
+
'content-caps-s',
|
|
34
|
+
'content-caps-xs',
|
|
35
|
+
],
|
|
36
|
+
description: 'Typography variant (heading, body, label, or content-caps)',
|
|
37
|
+
},
|
|
38
|
+
weight: {
|
|
39
|
+
control: 'select',
|
|
40
|
+
options: ['regular', 'semibold', 'bold'],
|
|
41
|
+
description: 'Font weight (note: heading/label/content-caps variants have fixed weights)',
|
|
42
|
+
},
|
|
43
|
+
color: {
|
|
44
|
+
control: 'select',
|
|
45
|
+
options: [
|
|
46
|
+
'$content.base.low',
|
|
47
|
+
'$content.base.mid',
|
|
48
|
+
'$content.base.hi',
|
|
49
|
+
'$content.base.onContrasted.low',
|
|
50
|
+
'$content.base.onContrasted.mid',
|
|
51
|
+
'$content.base.onContrasted.hi',
|
|
52
|
+
'$content.accent',
|
|
53
|
+
'$content.promo',
|
|
54
|
+
'$content.promo.onContrasted',
|
|
55
|
+
'$content.info',
|
|
56
|
+
'$content.success',
|
|
57
|
+
'$content.warning',
|
|
58
|
+
'$content.danger',
|
|
59
|
+
'$content.muted',
|
|
60
|
+
'$content.disabled',
|
|
61
|
+
'$content.disabled.onContrasted',
|
|
62
|
+
],
|
|
63
|
+
description: 'Text color (semantic theme token)',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
164
67
|
|
|
165
|
-
|
|
68
|
+
export default meta;
|
|
69
|
+
type Story = StoryObj<typeof meta>;
|
|
166
70
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
71
|
+
export const Default: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
variant: 'body-m',
|
|
74
|
+
weight: 'regular',
|
|
75
|
+
color: '$content.base.hi',
|
|
76
|
+
children: 'The quick brown fox jumps over the lazy dog',
|
|
77
|
+
},
|
|
172
78
|
};
|