@ornikar/bumper 2.8.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 +15 -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/primitives/ScrollView/ScrollView.d.ts +3 -0
- package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts.map +1 -0
- package/dist/index-metro.es.android.js +1 -0
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +1 -0
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +2 -0
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +2 -0
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +1 -0
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +1 -0
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +1 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +1 -0
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +12 -9
- 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/__snapshots_web__/Typography.features.stories.tsx.snap +7 -7
- package/src/system/content/typography/__snapshots_web__/Typography.stories.tsx.snap +1 -1
- 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/__snapshots_web__/Center.features.stories.tsx.snap +2 -2
- package/src/system/core/primitives/__snapshots_web__/Center.stories.tsx.snap +1 -1
- package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +3 -3
- package/src/system/core/primitives/__snapshots_web__/Pressable.stories.tsx.snap +1 -1
- package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +6 -6
- package/src/system/core/primitives/__snapshots_web__/Stack.stories.tsx.snap +1 -1
- package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +11 -11
- package/src/system/core/primitives/__snapshots_web__/View.stories.tsx.snap +1 -1
- package/src/system/core/themes/__snapshots_web__/light.stories.tsx.snap +1 -1
- package/src/system/core/tokens/__snapshots_web__/breakpoints.stories.tsx.snap +1 -1
- package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +1 -1
- package/src/system/core/tokens/__snapshots_web__/radius.stories.tsx.snap +1 -1
- package/src/system/core/tokens/__snapshots_web__/size.stories.tsx.snap +1 -1
- package/src/system/core/tokens/__snapshots_web__/space.stories.tsx.snap +1 -1
- package/src/system/core/tokens/palettes/__snapshots_web__/deepPurpleColorPalette.stories.tsx.snap +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/bumper",
|
|
3
|
-
"version": "2.8.0",
|
|
3
|
+
"version": "2.8.1-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "@ornikar/bumper",
|
|
@@ -28,12 +28,14 @@
|
|
|
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",
|
|
35
|
-
"react": "^
|
|
36
|
-
"react-dom": "^
|
|
37
|
+
"react": "^19.0.0",
|
|
38
|
+
"react-dom": "^19.0.0",
|
|
37
39
|
"react-native": ">=0.76.9"
|
|
38
40
|
},
|
|
39
41
|
"peerDependenciesMeta": {
|
|
@@ -49,14 +51,15 @@
|
|
|
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",
|
|
55
|
-
"@types/react": "
|
|
56
|
-
"react": "
|
|
57
|
-
"react-dom": "
|
|
58
|
-
"react-native": "0.
|
|
59
|
-
"react-test-renderer": "
|
|
58
|
+
"@types/react": "19.0.10",
|
|
59
|
+
"react": "19.0.0",
|
|
60
|
+
"react-dom": "19.0.0",
|
|
61
|
+
"react-native": "0.79.6",
|
|
62
|
+
"react-test-renderer": "19.0.0"
|
|
60
63
|
},
|
|
61
64
|
"expo": {},
|
|
62
65
|
"exports": {
|
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
|
+
}
|