@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/bumper",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "@ornikar/bumper",
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.24.0",
|
|
31
|
-
"@
|
|
31
|
+
"@ornikar/kitt-icons": "14.3.2-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.0",
|
|
32
|
+
"@tamagui/core": "1.144.2",
|
|
33
|
+
"@tamagui/scroll-view": "1.144.2"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
36
|
"@storybook/preview-api": ">=8.6.15",
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|
|
51
53
|
"@babel/core": "7.27.1",
|
|
54
|
+
"@phosphor-icons/core": "2.1.1",
|
|
52
55
|
"@testing-library/dom": "10.4.1",
|
|
53
56
|
"@testing-library/react": "16.3.1",
|
|
54
57
|
"@testing-library/react-native": "13.3.3",
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { CenterProps } from './system/core/primitives/Center';
|
|
|
6
6
|
export { Center } from './system/core/primitives/Center';
|
|
7
7
|
export type { PressableProps } from './system/core/primitives/Pressable';
|
|
8
8
|
export { Pressable } from './system/core/primitives/Pressable';
|
|
9
|
+
export type { ScrollViewProps } from './system/core/primitives/ScrollView/ScrollView';
|
|
10
|
+
export { ScrollView } from './system/core/primitives/ScrollView/ScrollView';
|
|
9
11
|
export type { HStackProps, StackProps, VStackProps } from './system/core/primitives/Stack';
|
|
10
12
|
export { HStack, Stack, VStack } from './system/core/primitives/Stack';
|
|
11
13
|
export type { ViewProps } from './system/core/primitives/View';
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CheckCircleRegularIcon,
|
|
3
|
+
InfoRegularIcon,
|
|
4
|
+
StarRegularIcon,
|
|
5
|
+
WarningRegularIcon,
|
|
6
|
+
} from '@ornikar/kitt-icons/phosphor';
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
import { HStack, VStack } from '../../core/primitives/Stack';
|
|
9
|
+
import { Typography } from '../typography/Typography';
|
|
10
|
+
import { Icon } from './Icon';
|
|
11
|
+
|
|
12
|
+
const meta: Meta<typeof Icon> = {
|
|
13
|
+
title: 'Bumper/Content/Icon/Features',
|
|
14
|
+
component: Icon,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
|
|
20
|
+
export const Sizes: Story = {
|
|
21
|
+
render: () => (
|
|
22
|
+
<HStack gap="$space.16" alignItems="center">
|
|
23
|
+
<VStack alignItems="center" gap="$space.8">
|
|
24
|
+
<Icon icon={<StarRegularIcon />} size="$size.16" />
|
|
25
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
26
|
+
16
|
|
27
|
+
</Typography.Text>
|
|
28
|
+
</VStack>
|
|
29
|
+
<VStack alignItems="center" gap="$space.8">
|
|
30
|
+
<Icon icon={<StarRegularIcon />} size="$size.20" />
|
|
31
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
32
|
+
20
|
|
33
|
+
</Typography.Text>
|
|
34
|
+
</VStack>
|
|
35
|
+
<VStack alignItems="center" gap="$space.8">
|
|
36
|
+
<Icon icon={<StarRegularIcon />} size="$size.24" />
|
|
37
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
38
|
+
24
|
|
39
|
+
</Typography.Text>
|
|
40
|
+
</VStack>
|
|
41
|
+
<VStack alignItems="center" gap="$space.8">
|
|
42
|
+
<Icon icon={<StarRegularIcon />} size="$size.32" />
|
|
43
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
44
|
+
32
|
|
45
|
+
</Typography.Text>
|
|
46
|
+
</VStack>
|
|
47
|
+
<VStack alignItems="center" gap="$space.8">
|
|
48
|
+
<Icon icon={<StarRegularIcon />} size="$size.48" />
|
|
49
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
50
|
+
48
|
|
51
|
+
</Typography.Text>
|
|
52
|
+
</VStack>
|
|
53
|
+
<VStack alignItems="center" gap="$space.8">
|
|
54
|
+
<Icon icon={<StarRegularIcon />} size="$size.64" />
|
|
55
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
56
|
+
64
|
|
57
|
+
</Typography.Text>
|
|
58
|
+
</VStack>
|
|
59
|
+
</HStack>
|
|
60
|
+
),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const Colors: Story = {
|
|
64
|
+
render: () => (
|
|
65
|
+
<HStack gap="$space.16" alignItems="center">
|
|
66
|
+
<VStack alignItems="center" gap="$space.8">
|
|
67
|
+
<Icon icon={<StarRegularIcon />} size="$size.24" color="$content.base.hi" />
|
|
68
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
69
|
+
base.hi
|
|
70
|
+
</Typography.Text>
|
|
71
|
+
</VStack>
|
|
72
|
+
<VStack alignItems="center" gap="$space.8">
|
|
73
|
+
<Icon icon={<StarRegularIcon />} size="$size.24" color="$content.base.mid" />
|
|
74
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
75
|
+
base.mid
|
|
76
|
+
</Typography.Text>
|
|
77
|
+
</VStack>
|
|
78
|
+
<VStack alignItems="center" gap="$space.8">
|
|
79
|
+
<Icon icon={<StarRegularIcon />} size="$size.24" color="$content.base.low" />
|
|
80
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
81
|
+
base.low
|
|
82
|
+
</Typography.Text>
|
|
83
|
+
</VStack>
|
|
84
|
+
<VStack alignItems="center" gap="$space.8">
|
|
85
|
+
<Icon icon={<StarRegularIcon />} size="$size.24" color="$content.accent" />
|
|
86
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
87
|
+
accent
|
|
88
|
+
</Typography.Text>
|
|
89
|
+
</VStack>
|
|
90
|
+
<VStack alignItems="center" gap="$space.8">
|
|
91
|
+
<Icon icon={<CheckCircleRegularIcon />} size="$size.24" color="$content.success" />
|
|
92
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
93
|
+
success
|
|
94
|
+
</Typography.Text>
|
|
95
|
+
</VStack>
|
|
96
|
+
<VStack alignItems="center" gap="$space.8">
|
|
97
|
+
<Icon icon={<WarningRegularIcon />} size="$size.24" color="$content.warning" />
|
|
98
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
99
|
+
warning
|
|
100
|
+
</Typography.Text>
|
|
101
|
+
</VStack>
|
|
102
|
+
<VStack alignItems="center" gap="$space.8">
|
|
103
|
+
<Icon icon={<WarningRegularIcon />} size="$size.24" color="$content.danger" />
|
|
104
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
105
|
+
danger
|
|
106
|
+
</Typography.Text>
|
|
107
|
+
</VStack>
|
|
108
|
+
<VStack alignItems="center" gap="$space.8">
|
|
109
|
+
<Icon icon={<InfoRegularIcon />} size="$size.24" color="$content.info" />
|
|
110
|
+
<Typography.Text variant="body-xs" color="$content.base.mid">
|
|
111
|
+
info
|
|
112
|
+
</Typography.Text>
|
|
113
|
+
</VStack>
|
|
114
|
+
</HStack>
|
|
115
|
+
),
|
|
116
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StarRegularIcon } from '@ornikar/kitt-icons/phosphor';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { Icon } from './Icon';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Icon> = {
|
|
6
|
+
title: 'Bumper/Content/Icon',
|
|
7
|
+
component: Icon,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: 'select',
|
|
12
|
+
options: ['$size.16', '$size.20', '$size.24', '$size.32', '$size.48', '$size.64', '$size.80', '$size.96'],
|
|
13
|
+
description: 'Icon size (uses size tokens)',
|
|
14
|
+
},
|
|
15
|
+
color: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: [
|
|
18
|
+
'$content.base.low',
|
|
19
|
+
'$content.base.mid',
|
|
20
|
+
'$content.base.hi',
|
|
21
|
+
'$content.accent',
|
|
22
|
+
'$content.promo',
|
|
23
|
+
'$content.info',
|
|
24
|
+
'$content.success',
|
|
25
|
+
'$content.warning',
|
|
26
|
+
'$content.danger',
|
|
27
|
+
'$content.muted',
|
|
28
|
+
'$content.disabled',
|
|
29
|
+
],
|
|
30
|
+
description: 'Icon color (semantic theme token)',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
|
|
38
|
+
export const Default: Story = {
|
|
39
|
+
args: {
|
|
40
|
+
icon: <StarRegularIcon />,
|
|
41
|
+
size: '$size.20',
|
|
42
|
+
color: '$content.base.hi',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ColorTokens, GetProps, WithMediaProps } from '@tamagui/core';
|
|
2
|
+
import { View, styled, useStyle } from '@tamagui/core';
|
|
3
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
4
|
+
import { cloneElement } from 'react';
|
|
5
|
+
|
|
6
|
+
const IconContainer = styled(View, {
|
|
7
|
+
name: 'Icon',
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
'...size': (size, { tokens }) => {
|
|
11
|
+
return {
|
|
12
|
+
width: tokens.size[size],
|
|
13
|
+
height: tokens.size[size],
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
} as const,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
type IconContainerProps = GetProps<typeof IconContainer>;
|
|
21
|
+
|
|
22
|
+
interface IconElementProps {
|
|
23
|
+
color?: ColorTokens;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface IconProps {
|
|
27
|
+
icon: ReactElement<IconElementProps>;
|
|
28
|
+
color?: ColorTokens;
|
|
29
|
+
size?: IconContainerProps['size'];
|
|
30
|
+
testID?: IconContainerProps['testID'];
|
|
31
|
+
/** @ignore */
|
|
32
|
+
alignSelf?: IconContainerProps['alignSelf'];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
type IconWithMediaProps = IconProps & WithMediaProps<IconProps>;
|
|
36
|
+
|
|
37
|
+
export function Icon({
|
|
38
|
+
icon,
|
|
39
|
+
color = '$content.base.hi',
|
|
40
|
+
size = '$size.20',
|
|
41
|
+
testID,
|
|
42
|
+
alignSelf,
|
|
43
|
+
}: IconWithMediaProps): ReactNode {
|
|
44
|
+
const style = useStyle({ color });
|
|
45
|
+
|
|
46
|
+
const clonedIcon = cloneElement(icon, { color: style.color });
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<IconContainer size={size} testID={testID} alignSelf={alignSelf}>
|
|
50
|
+
{clonedIcon}
|
|
51
|
+
</IconContainer>
|
|
52
|
+
);
|
|
53
|
+
}
|