@ornikar/bumper 2.8.0 → 2.8.1-canary.1768927687.5a0439490957cfbbe8b8c5136c5fc68b0828466d.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/definitions/index.d.ts +5 -0
  3. package/dist/definitions/index.d.ts.map +1 -1
  4. package/dist/definitions/system/content/icon/Icon.d.ts +18 -0
  5. package/dist/definitions/system/content/icon/Icon.d.ts.map +1 -0
  6. package/dist/definitions/system/content/typography/Typography.d.ts +8 -7
  7. package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
  8. package/dist/definitions/system/content/typography/TypographyIcon.d.ts +9 -0
  9. package/dist/definitions/system/content/typography/TypographyIcon.d.ts.map +1 -0
  10. package/dist/definitions/system/content/typography/TypographyView.d.ts +18 -0
  11. package/dist/definitions/system/content/typography/TypographyView.d.ts.map +1 -0
  12. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts +2 -1
  13. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts.map +1 -1
  14. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts +16 -0
  15. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts.map +1 -0
  16. package/dist/definitions/system/core/primitives/Image/Image.d.ts +3 -0
  17. package/dist/definitions/system/core/primitives/Image/Image.d.ts.map +1 -0
  18. package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts +3 -0
  19. package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts.map +1 -0
  20. package/dist/index-metro.es.android.js +117 -11
  21. package/dist/index-metro.es.android.js.map +1 -1
  22. package/dist/index-metro.es.ios.js +117 -11
  23. package/dist/index-metro.es.ios.js.map +1 -1
  24. package/dist/index-node-22.22.cjs.js +121 -7
  25. package/dist/index-node-22.22.cjs.js.map +1 -1
  26. package/dist/index-node-22.22.cjs.web.js +121 -7
  27. package/dist/index-node-22.22.cjs.web.js.map +1 -1
  28. package/dist/index-node-22.22.es.mjs +121 -9
  29. package/dist/index-node-22.22.es.mjs.map +1 -1
  30. package/dist/index-node-22.22.es.web.mjs +121 -9
  31. package/dist/index-node-22.22.es.web.mjs.map +1 -1
  32. package/dist/index.es.js +115 -11
  33. package/dist/index.es.js.map +1 -1
  34. package/dist/index.es.web.js +115 -11
  35. package/dist/index.es.web.js.map +1 -1
  36. package/dist/tsbuildinfo +1 -1
  37. package/package.json +7 -3
  38. package/src/index.ts +5 -0
  39. package/src/system/content/icon/Icon.features.stories.tsx +116 -0
  40. package/src/system/content/icon/Icon.stories.tsx +44 -0
  41. package/src/system/content/icon/Icon.tsx +43 -0
  42. package/src/system/content/icon/__snapshots__/Icon.features.stories.tsx.snap +569 -0
  43. package/src/system/content/icon/__snapshots__/Icon.stories.tsx.snap +29 -0
  44. package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +309 -0
  45. package/src/system/content/icon/__snapshots_web__/Icon.stories.tsx.snap +33 -0
  46. package/src/system/content/typography/Typography.tsx +24 -15
  47. package/src/system/content/typography/TypographyIcon.features.stories.tsx +163 -0
  48. package/src/system/content/typography/TypographyIcon.stories.tsx +52 -0
  49. package/src/system/content/typography/TypographyIcon.tsx +33 -0
  50. package/src/system/content/typography/TypographyView.tsx +34 -0
  51. package/src/system/content/typography/__snapshots__/TypographyIcon.features.stories.tsx.snap +839 -0
  52. package/src/system/content/typography/__snapshots__/TypographyIcon.stories.tsx.snap +31 -0
  53. package/src/system/content/typography/__snapshots_web__/TypographyIcon.features.stories.tsx.snap +543 -0
  54. package/src/system/content/typography/__snapshots_web__/TypographyIcon.stories.tsx.snap +37 -0
  55. package/src/system/content/typography/utils/getVariantAndWeightValues.tsx +2 -6
  56. package/src/system/content/typography/utils/typographyContext.ts +29 -0
  57. package/src/system/core/primitives/Image/Image.stories.tsx +39 -0
  58. package/src/system/core/primitives/Image/Image.ts +2 -0
  59. package/src/system/core/primitives/Image/__snapshots__/Image.stories.tsx.snap +30 -0
  60. package/src/system/core/primitives/Image/__snapshots_web__/Image.stories.tsx.snap +40 -0
  61. package/src/system/core/primitives/ScrollView/ScrollView.features.stories.tsx +84 -0
  62. package/src/system/core/primitives/ScrollView/ScrollView.stories.tsx +63 -0
  63. package/src/system/core/primitives/ScrollView/ScrollView.ts +2 -0
  64. package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.features.stories.tsx.snap +1245 -0
  65. package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.stories.tsx.snap +334 -0
  66. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +503 -0
  67. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.stories.tsx.snap +138 -0
@@ -0,0 +1,39 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Image } from './Image';
3
+
4
+ const meta: Meta<typeof Image> = {
5
+ title: 'Bumper/Core/Primitives/Image',
6
+ component: Image,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ source: {
10
+ table: { disable: true },
11
+ },
12
+ width: {
13
+ control: 'select',
14
+ options: ['$size.48', '$size.64', '$size.96', '$size.120', '$size.144'],
15
+ },
16
+ height: {
17
+ control: 'select',
18
+ options: ['$size.48', '$size.64', '$size.96', '$size.120', '$size.144'],
19
+ },
20
+ resizeMode: {
21
+ control: 'select',
22
+ options: ['cover', 'contain', 'stretch', 'center'],
23
+ },
24
+ },
25
+ };
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ export const Default: Story = {
31
+ args: {
32
+ source: {
33
+ uri: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGUExURUUvRf///xUXFNgAAAABYktHRAH/Ai3eAAAAB3RJTUUH6gETDxAgfjc2IQAAABRJREFUOMtjYBgFo2AUjIJRQE8AAAV4AAEpcbn8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTAxLTE5VDE1OjE2OjMyKzAwOjAwpvKSnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wMS0xOVQxNToxNjozMiswMDowMNevKiMAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDEtMTlUMTU6MTY6MzIrMDA6MDCAugv8AAAAAElFTkSuQmCC',
34
+ },
35
+ width: '$size.120',
36
+ height: '$size.144',
37
+ resizeMode: 'contain',
38
+ },
39
+ };
@@ -0,0 +1,2 @@
1
+ export type { ImageProps } from '@tamagui/image';
2
+ export { Image } from '@tamagui/image';
@@ -0,0 +1,30 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`Bumper/Core/Primitives/Image Default 1`] = `
4
+ <RNCSafeAreaProvider
5
+ onInsetsChange={[Function]}
6
+ style={
7
+ [
8
+ {
9
+ "flex": 1,
10
+ },
11
+ undefined,
12
+ ]
13
+ }
14
+ >
15
+ <Image
16
+ resizeMode="contain"
17
+ source={
18
+ {
19
+ "uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGUExURUUvRf///xUXFNgAAAABYktHRAH/Ai3eAAAAB3RJTUUH6gETDxAgfjc2IQAAABRJREFUOMtjYBgFo2AUjIJRQE8AAAV4AAEpcbn8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTAxLTE5VDE1OjE2OjMyKzAwOjAwpvKSnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wMS0xOVQxNToxNjozMiswMDowMNevKiMAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDEtMTlUMTU6MTY6MzIrMDA6MDCAugv8AAAAAElFTkSuQmCC",
20
+ }
21
+ }
22
+ style={
23
+ {
24
+ "height": 144,
25
+ "width": 120,
26
+ }
27
+ }
28
+ />
29
+ </RNCSafeAreaProvider>
30
+ `;
@@ -0,0 +1,40 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`Bumper/Core/Primitives/Image Default 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="css-view-175oi2r r-flex-13awgt0"
7
+ >
8
+ <span
9
+ class=""
10
+ style="display: contents;"
11
+ >
12
+ <span
13
+ class=" "
14
+ style="display: contents;"
15
+ >
16
+ <span
17
+ class=" t_light is_Theme"
18
+ style="display: contents;"
19
+ >
20
+ <div
21
+ class="css-view-175oi2r r-flexBasis-1mlwlqe r-overflow-1udh08x r-zIndex-417010"
22
+ style="width: var(--t-size-size--120); height: var(--t-size-size--144);"
23
+ >
24
+ <div
25
+ class="css-view-175oi2r r-backgroundColor-1niwhzg r-backgroundPosition-vvn4in r-backgroundRepeat-u6sd8q r-bottom-1p0dtai r-height-1pi2tsx r-left-1d2f490 r-position-u8s1d r-right-zchlnj r-top-ipm5af r-width-13qz1uu r-zIndex-1wyyakw r-backgroundSize-ehq7j7"
26
+ style="background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGUExURUUvRf///xUXFNgAAAABYktHRAH/Ai3eAAAAB3RJTUUH6gETDxAgfjc2IQAAABRJREFUOMtjYBgFo2AUjIJRQE8AAAV4AAEpcbn8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTAxLTE5VDE1OjE2OjMyKzAwOjAwpvKSnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wMS0xOVQxNToxNjozMiswMDowMNevKiMAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDEtMTlUMTU6MTY6MzIrMDA6MDCAugv8AAAAAElFTkSuQmCC");"
27
+ />
28
+ <img
29
+ alt=""
30
+ class="css-accessibilityImage-9pa8cd"
31
+ draggable="false"
32
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkAQMAAABKLAcXAAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGUExURUUvRf///xUXFNgAAAABYktHRAH/Ai3eAAAAB3RJTUUH6gETDxAgfjc2IQAAABRJREFUOMtjYBgFo2AUjIJRQE8AAAV4AAEpcbn8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI2LTAxLTE5VDE1OjE2OjMyKzAwOjAwpvKSnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNi0wMS0xOVQxNToxNjozMiswMDowMNevKiMAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjYtMDEtMTlUMTU6MTY6MzIrMDA6MDCAugv8AAAAAElFTkSuQmCC"
33
+ />
34
+ </div>
35
+ </span>
36
+ </span>
37
+ </span>
38
+ </div>
39
+ </DocumentFragment>
40
+ `;
@@ -0,0 +1,84 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from '../../../content/typography/Typography';
3
+ import { HStack, VStack } from '../Stack';
4
+ import { View } from '../View';
5
+ import { ScrollView } from './ScrollView';
6
+
7
+ const meta: Meta<typeof ScrollView> = {
8
+ title: 'Bumper/Core/Primitives/ScrollView/Features',
9
+ component: ScrollView,
10
+ };
11
+
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+
15
+ export const HorizontalScroll: Story = {
16
+ render: () => (
17
+ <ScrollView horizontal height="$size.96" width="$size.208">
18
+ <HStack gap="$space.8" padding="$space.8">
19
+ {Array.from({ length: 10 }, (_, i) => (
20
+ <View
21
+ key={`item-${i}`}
22
+ backgroundColor="$bg.success.mid"
23
+ padding="$space.16"
24
+ borderRadius="$radius.m"
25
+ width="$size.96"
26
+ >
27
+ <Typography.Text variant="body-s">H-Item {i + 1}</Typography.Text>
28
+ </View>
29
+ ))}
30
+ </HStack>
31
+ </ScrollView>
32
+ ),
33
+ };
34
+
35
+ export const HiddenIndicators: Story = {
36
+ render: () => (
37
+ <VStack gap="$space.16">
38
+ <Typography.Text variant="body-s">Vertical scroll without indicator:</Typography.Text>
39
+ <ScrollView height="$size.120" width="$size.208" showsVerticalScrollIndicator={false}>
40
+ <VStack gap="$space.8" padding="$space.8">
41
+ {Array.from({ length: 8 }, (_, i) => (
42
+ <View key={`item-${i}`} backgroundColor="$bg.warning.mid" padding="$space.12" borderRadius="$radius.m">
43
+ <Typography.Text variant="body-s">Item {i + 1}</Typography.Text>
44
+ </View>
45
+ ))}
46
+ </VStack>
47
+ </ScrollView>
48
+
49
+ <Typography.Text variant="body-s">Horizontal scroll without indicator:</Typography.Text>
50
+ <ScrollView horizontal height="$size.80" width="$size.208" showsHorizontalScrollIndicator={false}>
51
+ <HStack gap="$space.8" padding="$space.8">
52
+ {Array.from({ length: 8 }, (_, i) => (
53
+ <View
54
+ key={`item-${i}`}
55
+ backgroundColor="$bg.danger.mid"
56
+ padding="$space.12"
57
+ borderRadius="$radius.m"
58
+ width="$size.80"
59
+ >
60
+ <Typography.Text variant="body-s">Item {i + 1}</Typography.Text>
61
+ </View>
62
+ ))}
63
+ </HStack>
64
+ </ScrollView>
65
+ </VStack>
66
+ ),
67
+ };
68
+
69
+ export const ScrollDisabled: Story = {
70
+ render: () => (
71
+ <VStack gap="$space.16">
72
+ <Typography.Text variant="body-s">Scroll disabled (cannot scroll):</Typography.Text>
73
+ <ScrollView height="$size.120" width="$size.208" scrollEnabled={false}>
74
+ <VStack gap="$space.8" padding="$space.8">
75
+ {Array.from({ length: 8 }, (_, i) => (
76
+ <View key={`item-${i}`} backgroundColor="$bg.disabled.mid" padding="$space.12" borderRadius="$radius.m">
77
+ <Typography.Text variant="body-s">Item {i + 1}</Typography.Text>
78
+ </View>
79
+ ))}
80
+ </VStack>
81
+ </ScrollView>
82
+ </VStack>
83
+ ),
84
+ };
@@ -0,0 +1,63 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Typography } from '../../../content/typography/Typography';
3
+ import { View } from '../View';
4
+ import { ScrollView } from './ScrollView';
5
+
6
+ const meta: Meta<typeof ScrollView> = {
7
+ title: 'Bumper/Core/Primitives/ScrollView',
8
+ component: ScrollView,
9
+ tags: ['autodocs'],
10
+ argTypes: {
11
+ horizontal: {
12
+ control: 'boolean',
13
+ description: 'When true, the scroll view content is arranged horizontally',
14
+ },
15
+ scrollEnabled: {
16
+ control: 'boolean',
17
+ description: 'When false, the view cannot be scrolled',
18
+ },
19
+ showsVerticalScrollIndicator: {
20
+ control: 'boolean',
21
+ description: 'When true, shows a vertical scroll indicator',
22
+ },
23
+ showsHorizontalScrollIndicator: {
24
+ control: 'boolean',
25
+ description: 'When true, shows a horizontal scroll indicator',
26
+ },
27
+ height: {
28
+ control: 'select',
29
+ options: ['$size.96', '$size.120', '$size.144', '$size.176', '$size.208'],
30
+ description: 'Height of the scroll view (size token)',
31
+ },
32
+ width: {
33
+ control: 'select',
34
+ options: ['$size.176', '$size.208', '100%'],
35
+ description: 'Width of the scroll view (size token)',
36
+ },
37
+ },
38
+ };
39
+
40
+ export default meta;
41
+ type Story = StoryObj<typeof meta>;
42
+
43
+ export const Default: Story = {
44
+ args: {
45
+ height: '$size.176',
46
+ width: '$size.208',
47
+ showsVerticalScrollIndicator: true,
48
+ },
49
+ render: (args) => (
50
+ <ScrollView
51
+ {...args}
52
+ contentContainerStyle={{
53
+ gap: '$space.8',
54
+ }}
55
+ >
56
+ {Array.from({ length: 10 }, (_, i) => (
57
+ <View key={`item-${i}`} backgroundColor="$bg.info.mid" padding="$space.16" borderRadius="$radius.m">
58
+ <Typography.Text variant="body-s">Item {i + 1}</Typography.Text>
59
+ </View>
60
+ ))}
61
+ </ScrollView>
62
+ ),
63
+ };
@@ -0,0 +1,2 @@
1
+ export type { ScrollViewProps } from '@tamagui/scroll-view';
2
+ export { ScrollView } from '@tamagui/scroll-view';