@ornikar/bumper 2.7.2-canary.1768566928.e85c568dc49c9180e37b7aec8792b1e8d45968a6.0 → 2.8.1-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.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 +19 -4
- package/CLAUDE.md +45 -0
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/system/content/icon/Icon.d.ts +21 -0
- package/dist/definitions/system/content/icon/Icon.d.ts.map +1 -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/primitives/ScrollView/ScrollView.d.ts +3 -0
- package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts.map +1 -0
- 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 +43 -26
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +43 -26
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +44 -26
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +44 -26
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +43 -26
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +43 -26
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +37 -20
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +37 -20
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -2
- package/src/index.ts +2 -0
- package/src/system/content/icon/Icon.features.stories.tsx +116 -0
- package/src/system/content/icon/Icon.stories.tsx +44 -0
- package/src/system/content/icon/Icon.tsx +53 -0
- package/src/system/content/icon/__snapshots__/Icon.features.stories.tsx.snap +569 -0
- package/src/system/content/icon/__snapshots__/Icon.stories.tsx.snap +29 -0
- package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +309 -0
- package/src/system/content/icon/__snapshots_web__/Icon.stories.tsx.snap +33 -0
- 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 +6 -807
- 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/ScrollView/ScrollView.features.stories.tsx +84 -0
- package/src/system/core/primitives/ScrollView/ScrollView.stories.tsx +63 -0
- package/src/system/core/primitives/ScrollView/ScrollView.ts +2 -0
- package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.features.stories.tsx.snap +1245 -0
- package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.stories.tsx.snap +334 -0
- package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +503 -0
- package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.stories.tsx.snap +138 -0
- 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 +8 -5
- 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 +4 -4
- 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 +29 -21
- 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 +2 -2
- package/src/system/core/themes/__snapshots__/light.stories.tsx.snap +3822 -2233
- package/src/system/core/themes/__snapshots_web__/light.stories.tsx.snap +1243 -991
- 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 +1524 -1256
- 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
|
@@ -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
|
};
|