@ornikar/bumper 2.8.1-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.0 → 2.8.1-canary.1769087114.a46790da1b5b6361954b6ad25766074d3ed69784.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 (123) hide show
  1. package/CHANGELOG.md +6 -6
  2. package/dist/definitions/index.d.ts +5 -1
  3. package/dist/definitions/index.d.ts.map +1 -1
  4. package/dist/definitions/shared/storybook/StoryTitle.d.ts +1 -1
  5. package/dist/definitions/shared/storybook/helpers/argsHelpers.d.ts +8 -0
  6. package/dist/definitions/shared/storybook/helpers/argsHelpers.d.ts.map +1 -0
  7. package/dist/definitions/system/content/icon/Icon.d.ts +4 -7
  8. package/dist/definitions/system/content/icon/Icon.d.ts.map +1 -1
  9. package/dist/definitions/system/content/typography/Typography.d.ts +11 -19
  10. package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
  11. package/dist/definitions/system/content/typography/TypographyIcon.d.ts +9 -0
  12. package/dist/definitions/system/content/typography/TypographyIcon.d.ts.map +1 -0
  13. package/dist/definitions/system/content/typography/TypographyLink.d.ts +9 -0
  14. package/dist/definitions/system/content/typography/TypographyLink.d.ts.map +1 -0
  15. package/dist/definitions/system/content/typography/TypographyView.d.ts +18 -0
  16. package/dist/definitions/system/content/typography/TypographyView.d.ts.map +1 -0
  17. package/dist/definitions/system/content/typography/index.d.ts +21 -0
  18. package/dist/definitions/system/content/typography/index.d.ts.map +1 -0
  19. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts +2 -1
  20. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts.map +1 -1
  21. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts +16 -0
  22. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts.map +1 -0
  23. package/dist/definitions/system/core/primitives/Image/Image.d.ts +3 -0
  24. package/dist/definitions/system/core/primitives/Image/Image.d.ts.map +1 -0
  25. package/dist/definitions/system/core/themes/light/light.d.ts +3 -0
  26. package/dist/definitions/system/core/themes/light/light.d.ts.map +1 -0
  27. package/dist/definitions/system/core/themes/themes.d.ts +6 -0
  28. package/dist/definitions/system/core/themes/themes.d.ts.map +1 -0
  29. package/dist/definitions/tamagui.config.d.ts +1 -57
  30. package/dist/definitions/tamagui.config.d.ts.map +1 -1
  31. package/dist/index-metro.es.android.js +151 -12
  32. package/dist/index-metro.es.android.js.map +1 -1
  33. package/dist/index-metro.es.ios.js +151 -12
  34. package/dist/index-metro.es.ios.js.map +1 -1
  35. package/dist/index-node-22.22.cjs.js +154 -8
  36. package/dist/index-node-22.22.cjs.js.map +1 -1
  37. package/dist/index-node-22.22.cjs.web.js +154 -8
  38. package/dist/index-node-22.22.cjs.web.js.map +1 -1
  39. package/dist/index-node-22.22.es.mjs +155 -10
  40. package/dist/index-node-22.22.es.mjs.map +1 -1
  41. package/dist/index-node-22.22.es.web.mjs +155 -10
  42. package/dist/index-node-22.22.es.web.mjs.map +1 -1
  43. package/dist/index.es.js +149 -12
  44. package/dist/index.es.js.map +1 -1
  45. package/dist/index.es.web.js +149 -12
  46. package/dist/index.es.web.js.map +1 -1
  47. package/dist/tsbuildinfo +1 -1
  48. package/package.json +11 -10
  49. package/src/index.ts +5 -1
  50. package/src/shared/storybook/StoryTitle.tsx +1 -1
  51. package/src/shared/storybook/helpers/argsHelpers.ts +47 -0
  52. package/src/system/content/icon/Icon.features.stories.tsx +1 -1
  53. package/src/system/content/icon/Icon.stories.tsx +3 -22
  54. package/src/system/content/icon/Icon.tsx +4 -14
  55. package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +2 -2
  56. package/src/system/content/icon/__snapshots_web__/Icon.stories.tsx.snap +1 -1
  57. package/src/system/content/typography/Typography.features.stories.tsx +1 -1
  58. package/src/system/content/typography/Typography.stories.tsx +3 -23
  59. package/src/system/content/typography/Typography.tsx +24 -27
  60. package/src/system/content/typography/TypographyIcon.features.stories.tsx +163 -0
  61. package/src/system/content/typography/TypographyIcon.stories.tsx +35 -0
  62. package/src/system/content/typography/TypographyIcon.tsx +33 -0
  63. package/src/system/content/typography/TypographyLink.features.stories.tsx +62 -0
  64. package/src/system/content/typography/TypographyLink.stories.tsx +72 -0
  65. package/src/system/content/typography/TypographyLink.tsx +38 -0
  66. package/src/system/content/typography/TypographyView.tsx +34 -0
  67. package/src/system/content/typography/__snapshots__/TypographyIcon.features.stories.tsx.snap +839 -0
  68. package/src/system/content/typography/__snapshots__/TypographyIcon.stories.tsx.snap +31 -0
  69. package/src/system/content/typography/__snapshots__/TypographyLink.features.stories.tsx.snap +229 -0
  70. package/src/system/content/typography/__snapshots__/TypographyLink.stories.tsx.snap +41 -0
  71. package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +7 -7
  72. package/src/system/content/typography/__snapshots_web__/Typography.stories.tsx.snap +1 -1
  73. package/src/system/content/typography/__snapshots_web__/TypographyIcon.features.stories.tsx.snap +543 -0
  74. package/src/system/content/typography/__snapshots_web__/TypographyIcon.stories.tsx.snap +37 -0
  75. package/src/system/content/typography/__snapshots_web__/TypographyLink.features.stories.tsx.snap +196 -0
  76. package/src/system/content/typography/__snapshots_web__/TypographyLink.stories.tsx.snap +33 -0
  77. package/src/system/content/typography/index.ts +15 -0
  78. package/src/system/content/typography/utils/getVariantAndWeightValues.tsx +2 -6
  79. package/src/system/content/typography/utils/typographyContext.ts +29 -0
  80. package/src/system/core/primitives/Center.features.stories.tsx +1 -1
  81. package/src/system/core/primitives/Center.stories.tsx +6 -89
  82. package/src/system/core/primitives/Image/Image.stories.tsx +34 -0
  83. package/src/system/core/primitives/Image/Image.ts +2 -0
  84. package/src/system/core/primitives/Image/__snapshots__/Image.stories.tsx.snap +30 -0
  85. package/src/system/core/primitives/Image/__snapshots_web__/Image.stories.tsx.snap +40 -0
  86. package/src/system/core/primitives/Pressable.features.stories.tsx +1 -1
  87. package/src/system/core/primitives/Pressable.stories.tsx +4 -53
  88. package/src/system/core/primitives/ScrollView/ScrollView.features.stories.tsx +1 -1
  89. package/src/system/core/primitives/ScrollView/ScrollView.stories.tsx +3 -6
  90. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +11 -11
  91. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.stories.tsx.snap +3 -3
  92. package/src/system/core/primitives/Stack.features.stories.tsx +1 -1
  93. package/src/system/core/primitives/Stack.stories.tsx +4 -39
  94. package/src/system/core/primitives/View.features.stories.tsx +1 -1
  95. package/src/system/core/primitives/View.stories.tsx +6 -107
  96. package/src/system/core/primitives/__snapshots_web__/Center.features.stories.tsx.snap +2 -2
  97. package/src/system/core/primitives/__snapshots_web__/Center.stories.tsx.snap +1 -1
  98. package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +3 -3
  99. package/src/system/core/primitives/__snapshots_web__/Pressable.stories.tsx.snap +1 -1
  100. package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +6 -6
  101. package/src/system/core/primitives/__snapshots_web__/Stack.stories.tsx.snap +1 -1
  102. package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +11 -11
  103. package/src/system/core/primitives/__snapshots_web__/View.stories.tsx.snap +1 -1
  104. package/src/system/core/themes/{__snapshots_web__ → light/__snapshots_web__}/light.stories.tsx.snap +1 -1
  105. package/src/system/core/themes/{light.stories.tsx → light/light.stories.tsx} +5 -5
  106. package/src/system/core/themes/{light.ts → light/light.ts} +3 -2
  107. package/src/system/core/themes/themes.ts +69 -0
  108. package/src/system/core/tokens/__snapshots_web__/breakpoints.stories.tsx.snap +1 -1
  109. package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +1 -1
  110. package/src/system/core/tokens/__snapshots_web__/radius.stories.tsx.snap +1 -1
  111. package/src/system/core/tokens/__snapshots_web__/size.stories.tsx.snap +1 -1
  112. package/src/system/core/tokens/__snapshots_web__/space.stories.tsx.snap +1 -1
  113. package/src/system/core/tokens/breakpoints.stories.tsx +1 -1
  114. package/src/system/core/tokens/fonts.stories.tsx +1 -1
  115. package/src/system/core/tokens/palettes/__snapshots_web__/deepPurpleColorPalette.stories.tsx.snap +1 -1
  116. package/src/system/core/tokens/palettes/deepPurpleColorPalette.stories.tsx +1 -1
  117. package/src/system/core/tokens/radius.stories.tsx +1 -1
  118. package/src/system/core/tokens/size.stories.tsx +1 -1
  119. package/src/system/core/tokens/space.stories.tsx +1 -1
  120. package/src/tamagui.config.ts +1 -1
  121. package/dist/definitions/system/core/themes/light.d.ts +0 -58
  122. package/dist/definitions/system/core/themes/light.d.ts.map +0 -1
  123. /package/src/system/core/themes/{__snapshots__ → light/__snapshots__}/light.stories.tsx.snap +0 -0
@@ -0,0 +1,62 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { VStack } from '../../core/primitives/Stack';
3
+ import { TypographyLink } from './TypographyLink';
4
+
5
+ const meta: Meta<typeof TypographyLink> = {
6
+ title: 'Bumper/Content/TypographyLink/Features',
7
+ component: TypographyLink,
8
+ };
9
+
10
+ export default meta;
11
+ type Story = StoryObj<typeof meta>;
12
+
13
+ export const DisabledFalse: Story = {
14
+ args: {
15
+ disabled: false,
16
+ children: 'Enabled link (clickable with pointer cursor)',
17
+ onPress: () => alert('Link clicked!'),
18
+ },
19
+ };
20
+
21
+ export const DisabledTrue: Story = {
22
+ args: {
23
+ disabled: true,
24
+ children: 'Disabled link (not-allowed cursor, onPress removed)',
25
+ onPress: () => alert('This should not be called'),
26
+ },
27
+ };
28
+
29
+ export const NoUnderlineFalse: Story = {
30
+ args: {
31
+ noUnderline: false,
32
+ children: 'Link with underline (default)',
33
+ onPress: () => alert('Link clicked!'),
34
+ },
35
+ };
36
+
37
+ export const NoUnderlineTrue: Story = {
38
+ args: {
39
+ noUnderline: true,
40
+ children: 'Link without underline',
41
+ onPress: () => alert('Link clicked!'),
42
+ },
43
+ };
44
+
45
+ export const StateHover: Story = {
46
+ render: () => (
47
+ <VStack gap="$space.16">
48
+ <TypographyLink forceStyle="hover" onPress={() => alert('Link clicked!')}>
49
+ Forced hover state - underline removed (hoverStyle applied)
50
+ </TypographyLink>
51
+ <TypographyLink noUnderline forceStyle="hover" onPress={() => alert('Link clicked!')}>
52
+ Forced hover state with noUnderline - no visual change
53
+ </TypographyLink>
54
+ <TypographyLink disabled forceStyle="hover" onPress={() => alert('Link clicked!')}>
55
+ Forced hover state on disabled - underline removed (hoverStyle applied)
56
+ </TypographyLink>
57
+ <TypographyLink disabled noUnderline forceStyle="hover" onPress={() => alert('Link clicked!')}>
58
+ Forced hover state with noUnderline on disabled - no visual change
59
+ </TypographyLink>
60
+ </VStack>
61
+ ),
62
+ };
@@ -0,0 +1,72 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { contentColorArgType } from '../../../shared/storybook/helpers/argsHelpers';
3
+ import { TypographyLink } from './TypographyLink';
4
+
5
+ const meta: Meta<typeof TypographyLink> = {
6
+ title: 'Bumper/Content/TypographyLink',
7
+ component: TypographyLink,
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ variant: {
11
+ control: 'select',
12
+ options: [
13
+ 'heading-2xl',
14
+ 'heading-xl',
15
+ 'heading-l',
16
+ 'heading-m',
17
+ 'heading-s',
18
+ 'heading-xs',
19
+ 'heading-2xs',
20
+ 'body-xl',
21
+ 'body-l',
22
+ 'body-m',
23
+ 'body-s',
24
+ 'body-xs',
25
+ 'label-xl',
26
+ 'label-l',
27
+ 'label-m',
28
+ 'label-s',
29
+ 'content-caps-3xl',
30
+ 'content-caps-2xl',
31
+ 'content-caps-xl',
32
+ 'content-caps-l',
33
+ 'content-caps-m',
34
+ 'content-caps-s',
35
+ 'content-caps-xs',
36
+ ],
37
+ description: 'Typography variant (inherited from Typography.Text)',
38
+ },
39
+ weight: {
40
+ control: 'select',
41
+ options: ['regular', 'semibold', 'bold'],
42
+ description: 'Font weight (inherited from Typography.Text)',
43
+ },
44
+ color: contentColorArgType,
45
+ disabled: {
46
+ control: 'boolean',
47
+ description: 'When true, shows not-allowed cursor and disabled color',
48
+ },
49
+ noUnderline: {
50
+ control: 'boolean',
51
+ description: 'When true, removes the underline decoration',
52
+ },
53
+ onPress: {
54
+ description: 'Click/press handler (automatically removed when disabled=true)',
55
+ },
56
+ },
57
+ };
58
+
59
+ export default meta;
60
+ type Story = StoryObj<typeof meta>;
61
+
62
+ export const Default: Story = {
63
+ args: {
64
+ variant: 'body-m',
65
+ weight: 'regular',
66
+ color: '$content.accent',
67
+ disabled: false,
68
+ noUnderline: false,
69
+ children: 'This is a link',
70
+ onPress: () => alert('Link clicked!'),
71
+ },
72
+ };
@@ -0,0 +1,38 @@
1
+ import type { GetProps } from '@tamagui/core';
2
+ import { styled } from '@tamagui/core';
3
+ import { TypographyBase } from './Typography';
4
+
5
+ export const TypographyLink = styled(TypographyBase, {
6
+ name: 'TypographyLink',
7
+ role: 'link',
8
+ variants: {
9
+ disabled: {
10
+ true: {
11
+ cursor: 'not-allowed',
12
+ onPress: undefined,
13
+ color: '$content.disabled',
14
+ hoverStyle: undefined,
15
+ },
16
+ false: {
17
+ cursor: 'pointer',
18
+ hoverStyle: {
19
+ textDecorationLine: 'none',
20
+ },
21
+ },
22
+ },
23
+ noUnderline: {
24
+ true: {
25
+ textDecorationLine: 'none',
26
+ },
27
+ false: {
28
+ textDecorationLine: 'underline',
29
+ },
30
+ },
31
+ } as const,
32
+ defaultVariants: {
33
+ disabled: false,
34
+ noUnderline: false,
35
+ },
36
+ });
37
+
38
+ export type TypographyLinkProps = GetProps<typeof TypographyLink>;
@@ -0,0 +1,34 @@
1
+ import type { GetProps } from '@tamagui/core';
2
+ import { View, styled } from '@tamagui/core';
3
+ import type { ReactNode } from 'react';
4
+ import { useTypographyContext } from './utils/typographyContext';
5
+
6
+ const InternalTypographyView = styled(View, {
7
+ name: 'TypographyView',
8
+ });
9
+
10
+ type TypographyViewProps = GetProps<typeof InternalTypographyView>;
11
+
12
+ /**
13
+ *
14
+ * A wrapper component that applies typography styles to its children in order to maintain consistent style between web and native
15
+ * In native, it simply renders a View as it renders correctly by default
16
+ * In web, it ensures that the display is set to inline-flex when inside a Typography context
17
+ *
18
+ * React Native Web includes this implementation in its codebase
19
+ * but Tamagui does not use React Native Webview, we need to implement it ourselves
20
+ *
21
+ * Inside a Typography component, always use TypographyView to wrap external components like Icon or Svg
22
+ */
23
+ export function TypographyView(props: TypographyViewProps): ReactNode {
24
+ const isInTypographyContext = useTypographyContext();
25
+
26
+ return (
27
+ <InternalTypographyView
28
+ {...props}
29
+ $platform-web={
30
+ isInTypographyContext ? { ...props['$platform-web'], display: 'inline-flex' } : props['$platform-web']
31
+ }
32
+ />
33
+ );
34
+ }