@ornikar/bumper 3.1.0 → 3.2.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 (81) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/definitions/shared/storybook/StoryTitle.d.ts +1 -1
  3. package/dist/definitions/system/content/icon/Icon.d.ts +6 -1
  4. package/dist/definitions/system/content/icon/Icon.d.ts.map +1 -1
  5. package/dist/definitions/system/content/typography/Typography.d.ts +10 -52
  6. package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
  7. package/dist/definitions/system/content/typography/TypographyIcon.d.ts +5 -2
  8. package/dist/definitions/system/content/typography/TypographyIcon.d.ts.map +1 -1
  9. package/dist/definitions/system/content/typography/TypographyLink.d.ts +1 -1
  10. package/dist/definitions/system/content/typography/TypographyLink.d.ts.map +1 -1
  11. package/dist/definitions/system/content/typography/TypographyView.d.ts +2 -2
  12. package/dist/definitions/system/content/typography/TypographyView.d.ts.map +1 -1
  13. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts +8 -13
  14. package/dist/definitions/system/content/typography/utils/typographyContext.d.ts.map +1 -1
  15. package/dist/definitions/system/core/hooks/useProps.d.ts +3 -0
  16. package/dist/definitions/system/core/hooks/useProps.d.ts.map +1 -0
  17. package/dist/definitions/system/dataDisplays/Badge/Badge.d.ts.map +1 -1
  18. package/dist/definitions/system/types.d.ts +1 -2
  19. package/dist/definitions/system/types.d.ts.map +1 -1
  20. package/dist/index-metro.es.android.js +69 -160
  21. package/dist/index-metro.es.android.js.map +1 -1
  22. package/dist/index-metro.es.ios.js +69 -160
  23. package/dist/index-metro.es.ios.js.map +1 -1
  24. package/dist/index-node-22.22.cjs.js +71 -163
  25. package/dist/index-node-22.22.cjs.js.map +1 -1
  26. package/dist/index-node-22.22.cjs.web.js +71 -163
  27. package/dist/index-node-22.22.cjs.web.js.map +1 -1
  28. package/dist/index-node-22.22.es.mjs +72 -164
  29. package/dist/index-node-22.22.es.mjs.map +1 -1
  30. package/dist/index-node-22.22.es.web.mjs +72 -164
  31. package/dist/index-node-22.22.es.web.mjs.map +1 -1
  32. package/dist/index.es.js +69 -158
  33. package/dist/index.es.js.map +1 -1
  34. package/dist/index.es.web.js +69 -158
  35. package/dist/index.es.web.js.map +1 -1
  36. package/dist/tsbuildinfo +1 -1
  37. package/package.json +1 -1
  38. package/src/.eslintrc.json +2 -2
  39. package/src/system/content/icon/Icon.tsx +10 -4
  40. package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +11 -22
  41. package/src/system/content/typography/Typography.tsx +66 -75
  42. package/src/system/content/typography/TypographyIcon.tsx +14 -19
  43. package/src/system/content/typography/TypographyLink.features.stories.tsx +34 -8
  44. package/src/system/content/typography/TypographyLink.stories.tsx +2 -1
  45. package/src/system/content/typography/TypographyLink.tsx +2 -0
  46. package/src/system/content/typography/TypographyView.tsx +10 -17
  47. package/src/system/content/typography/__snapshots__/TypographyLink.features.stories.tsx.snap +164 -0
  48. package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +40 -86
  49. package/src/system/content/typography/__snapshots_web__/Typography.stories.tsx.snap +0 -1
  50. package/src/system/content/typography/__snapshots_web__/TypographyIcon.features.stories.tsx.snap +42 -67
  51. package/src/system/content/typography/__snapshots_web__/TypographyIcon.stories.tsx.snap +1 -1
  52. package/src/system/content/typography/__snapshots_web__/TypographyLink.features.stories.tsx.snap +120 -20
  53. package/src/system/content/typography/__snapshots_web__/TypographyLink.stories.tsx.snap +1 -2
  54. package/src/system/content/typography/utils/typographyContext.ts +13 -25
  55. package/src/system/core/hooks/useProps.ts +9 -0
  56. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +37 -74
  57. package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.stories.tsx.snap +10 -20
  58. package/src/system/core/primitives/__snapshots_web__/Center.features.stories.tsx.snap +5 -10
  59. package/src/system/core/primitives/__snapshots_web__/Center.stories.tsx.snap +1 -2
  60. package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +9 -18
  61. package/src/system/core/primitives/__snapshots_web__/Pressable.stories.tsx.snap +0 -1
  62. package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +33 -66
  63. package/src/system/core/primitives/__snapshots_web__/Stack.stories.tsx.snap +3 -6
  64. package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +60 -120
  65. package/src/system/core/themes/light/__snapshots_web__/light.stories.tsx.snap +111 -222
  66. package/src/system/core/tokens/__snapshots_web__/breakpoints.stories.tsx.snap +11 -22
  67. package/src/system/core/tokens/__snapshots_web__/bumperIcon.stories.tsx.snap +7 -14
  68. package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +67 -134
  69. package/src/system/core/tokens/__snapshots_web__/radius.stories.tsx.snap +11 -22
  70. package/src/system/core/tokens/__snapshots_web__/size.stories.tsx.snap +25 -50
  71. package/src/system/core/tokens/__snapshots_web__/space.stories.tsx.snap +28 -56
  72. package/src/system/core/tokens/palettes/__snapshots_web__/deepPurpleColorPalette.stories.tsx.snap +133 -266
  73. package/src/system/dataDisplays/Badge/Badge.tsx +2 -1
  74. package/src/system/dataDisplays/Badge/__snapshots_web__/Badge.features.stories.tsx.snap +8 -16
  75. package/src/system/dataDisplays/Badge/__snapshots_web__/Badge.stories.tsx.snap +1 -2
  76. package/src/system/loading/loader/__snapshots_web__/Loader.features.stories.tsx.snap +2 -4
  77. package/src/system/types.ts +2 -1
  78. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts +0 -10
  79. package/dist/definitions/system/content/typography/utils/getVariantAndWeightValues.d.ts.map +0 -1
  80. package/src/system/content/typography/utils/getVariantAndWeightValues.test.tsx +0 -178
  81. package/src/system/content/typography/utils/getVariantAndWeightValues.tsx +0 -40
@@ -1,6 +1,7 @@
1
- import { styled, useProps } from '@tamagui/core';
1
+ import { styled } from '@tamagui/core';
2
2
  import type { ReactNode } from 'react';
3
3
  import { InternalTypography } from '../../content/typography/Typography';
4
+ import { useProps } from '../../core/hooks/useProps';
4
5
  import { Center } from '../../core/primitives/Center';
5
6
  import type { TamaguiMediaProps } from '../../types';
6
7
 
@@ -24,8 +24,7 @@ exports[`Bumper/Data Displays/Badge/Features WithCount 1`] = `
24
24
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
25
25
  >
26
26
  <span
27
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
28
- data-disable-theme="true"
27
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
29
28
  >
30
29
  1
31
30
  </span>
@@ -34,8 +33,7 @@ exports[`Bumper/Data Displays/Badge/Features WithCount 1`] = `
34
33
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
35
34
  >
36
35
  <span
37
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
38
- data-disable-theme="true"
36
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
39
37
  >
40
38
  5
41
39
  </span>
@@ -44,8 +42,7 @@ exports[`Bumper/Data Displays/Badge/Features WithCount 1`] = `
44
42
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
45
43
  >
46
44
  <span
47
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
48
- data-disable-theme="true"
45
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
49
46
  >
50
47
  9+
51
48
  </span>
@@ -54,8 +51,7 @@ exports[`Bumper/Data Displays/Badge/Features WithCount 1`] = `
54
51
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
55
52
  >
56
53
  <span
57
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
58
- data-disable-theme="true"
54
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
59
55
  >
60
56
  9+
61
57
  </span>
@@ -64,8 +60,7 @@ exports[`Bumper/Data Displays/Badge/Features WithCount 1`] = `
64
60
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
65
61
  >
66
62
  <span
67
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
68
- data-disable-theme="true"
63
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
69
64
  >
70
65
  0
71
66
  </span>
@@ -102,8 +97,7 @@ exports[`Bumper/Data Displays/Badge/Features WithMaximumCount 1`] = `
102
97
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
103
98
  >
104
99
  <span
105
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
106
- data-disable-theme="true"
100
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
107
101
  >
108
102
  9+
109
103
  </span>
@@ -112,8 +106,7 @@ exports[`Bumper/Data Displays/Badge/Features WithMaximumCount 1`] = `
112
106
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
113
107
  >
114
108
  <span
115
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
116
- data-disable-theme="true"
109
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
117
110
  >
118
111
  99+
119
112
  </span>
@@ -122,8 +115,7 @@ exports[`Bumper/Data Displays/Badge/Features WithMaximumCount 1`] = `
122
115
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
123
116
  >
124
117
  <span
125
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
126
- data-disable-theme="true"
118
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
127
119
  >
128
120
  999
129
121
  </span>
@@ -21,8 +21,7 @@ exports[`Bumper/Data Displays/Badge Default 1`] = `
21
21
  class="_dsp-flex _fd-column _fb-auto _bxs-border-box _pos-relative _flexShrink-0 _justifyContent-center _alignItems-center _btlr-t-radius-ra1854241453 _btrr-t-radius-ra1854241453 _bbrr-t-radius-ra1854241453 _bblr-t-radius-ra1854241453 _backgroundColor-bg--danger-46574 _alignSelf-flex-start _minWidth-16px _minHeight-16px _paddingRight-t-space-spa94482162 _paddingLeft-t-space-spa94482162"
22
22
  >
23
23
  <span
24
- class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _tt-uppercase _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _col-content--ba254712717 _paddingBottom-1px"
25
- data-disable-theme="true"
24
+ class="font_GTStandardNarrow _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-cont1213109893 _lh-f-lineHeigh599485626 _ls-f-letterSpa1883393765 _fw-f-weight-bo3448 _tt-uppercase _col-content--ba254712717 _paddingBottom-1px"
26
25
  >
27
26
  3
28
27
  </span>
@@ -165,8 +165,7 @@ exports[`Bumper/Loading/Loader/Features Sizes 1`] = `
165
165
  </svg>
166
166
  </div>
167
167
  <span
168
- class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fw-f-weight-re98715119 _fs-f-size-body47080 _lh-f-lineHeigh1960620717 _ls-f-letterSpa260968488 _col-content--ba1918259606"
169
- data-disable-theme="true"
168
+ class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-body47080 _lh-f-lineHeigh1960620717 _ls-f-letterSpa260968488 _fw-f-weight-re98715119 _col-content--ba1918259606"
170
169
  >
171
170
  icon (20)
172
171
  </span>
@@ -210,8 +209,7 @@ exports[`Bumper/Loading/Loader/Features Sizes 1`] = `
210
209
  </svg>
211
210
  </div>
212
211
  <span
213
- class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fw-f-weight-re98715119 _fs-f-size-body47080 _lh-f-lineHeigh1960620717 _ls-f-letterSpa260968488 _col-content--ba1918259606"
214
- data-disable-theme="true"
212
+ class="font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _dsp-inline _bxs-border-box _ww-break-word _ws-pre-wrap _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-body47080 _lh-f-lineHeigh1960620717 _ls-f-letterSpa260968488 _fw-f-weight-re98715119 _col-content--ba1918259606"
215
213
  >
216
214
  page (48)
217
215
  </span>
@@ -1,6 +1,7 @@
1
1
  import type { WithMediaProps } from '@tamagui/core';
2
2
 
3
- type PropsWithoutMediaStyles<A> = {
3
+ // Rewrite PropsWithoutMediaStyles to fix Tamagui's one. Which make optionnall all media props, even if they are required in the original props type. This is a problem for our components which have required media props (like variant for Typography).
4
+ export type PropsWithoutMediaStyles<A> = {
4
5
  [Key in keyof A as Key extends `$${string}` ? never : Key]: A[Key];
5
6
  };
6
7
 
@@ -1,10 +0,0 @@
1
- import type { FontVariants } from '../../../core/tokens/fonts';
2
- import type { TypographyTextProps } from '../Typography';
3
- import type { TypographyVariantContextValue, TypographyWeightContextValue } from './typographyContext';
4
- interface VariantAndWeightValues {
5
- weight: TypographyTextProps['weight'] | undefined;
6
- variant: FontVariants | undefined;
7
- }
8
- export declare function getVariantAndWeightValues(weightProp: TypographyTextProps['weight'], variantProp: TypographyTextProps['variant'], typographyWeightAncestorValue: TypographyWeightContextValue, typographyVariantAncestorValue: TypographyVariantContextValue): VariantAndWeightValues;
9
- export {};
10
- //# sourceMappingURL=getVariantAndWeightValues.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getVariantAndWeightValues.d.ts","sourceRoot":"","sources":["../../../../../../src/system/content/typography/utils/getVariantAndWeightValues.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAEvG,UAAU,sBAAsB;IAC9B,MAAM,EAAE,mBAAmB,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC;IAClD,OAAO,EAAE,YAAY,GAAG,SAAS,CAAC;CACnC;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EACzC,WAAW,EAAE,mBAAmB,CAAC,SAAS,CAAC,EAC3C,6BAA6B,EAAE,4BAA4B,EAC3D,8BAA8B,EAAE,6BAA6B,GAC5D,sBAAsB,CAuBxB"}
@@ -1,178 +0,0 @@
1
- import { BODY_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from '../../../core/tokens/GTStandardFont';
2
- import { CONTENT_CAPS_VARIANTS } from '../../../core/tokens/GTStandardNarrowFont';
3
- import { getVariantAndWeightValues } from './getVariantAndWeightValues';
4
-
5
- describe('getVariantAndWeightValues', () => {
6
- describe('when variant is a body size', () => {
7
- it.each(BODY_VARIANTS.map((size) => [size, undefined, null, null, { weight: undefined, variant: size }]))(
8
- 'should return weight from prop and variant "%s" when weight prop is undefined and no ancestor values',
9
- (variant, weight, ancestorWeight, ancestorVariant, expected) => {
10
- expect(getVariantAndWeightValues(weight, variant, ancestorWeight, ancestorVariant)).toEqual(expected);
11
- },
12
- );
13
-
14
- it('should return weight from prop when defined', () => {
15
- expect(getVariantAndWeightValues('regular', 'body-l', null, null)).toEqual({
16
- weight: 'regular',
17
- variant: 'body-l',
18
- });
19
- });
20
-
21
- it('should return weight from ancestor when weight prop is undefined', () => {
22
- expect(getVariantAndWeightValues(undefined, 'body-m', 'regular', null)).toEqual({
23
- weight: 'regular',
24
- variant: 'body-m',
25
- });
26
- });
27
-
28
- it('should prioritize weight prop over ancestor weight for body sizes', () => {
29
- expect(getVariantAndWeightValues('bold', 'body-m', 'regular', null)).toEqual({
30
- weight: 'bold',
31
- variant: 'body-m',
32
- });
33
- });
34
- });
35
-
36
- describe('when variant is a heading size', () => {
37
- it.each(HEADING_VARIANTS.map((size) => [size, undefined, null, null, { weight: 'semibold', variant: size }]))(
38
- 'should return weight "semibold" for heading variant "%s"',
39
- (variant, weight, ancestorWeight, ancestorVariant, expected) => {
40
- expect(getVariantAndWeightValues(weight, variant, ancestorWeight, ancestorVariant)).toEqual(expected);
41
- },
42
- );
43
-
44
- it('should ignore weight prop for heading sizes and always return semibold', () => {
45
- expect(getVariantAndWeightValues('regular', 'heading-m', null, null)).toEqual({
46
- weight: 'semibold',
47
- variant: 'heading-m',
48
- });
49
- });
50
-
51
- it('should ignore ancestor weight for heading sizes and always return semibold', () => {
52
- expect(getVariantAndWeightValues(undefined, 'heading-m', 'bold', null)).toEqual({
53
- weight: 'semibold',
54
- variant: 'heading-m',
55
- });
56
- });
57
- });
58
-
59
- describe('when variant is a label size', () => {
60
- it.each(LABEL_VARIANTS.map((size) => [size, undefined, null, null, { weight: 'semibold', variant: size }]))(
61
- 'should return weight "semibold" for label variant "%s"',
62
- (variant, weight, ancestorWeight, ancestorVariant, expected) => {
63
- expect(getVariantAndWeightValues(weight, variant, ancestorWeight, ancestorVariant)).toEqual(expected);
64
- },
65
- );
66
-
67
- it('should ignore weight prop for label sizes and always return semibold', () => {
68
- expect(getVariantAndWeightValues('regular', 'label-m', null, null)).toEqual({
69
- weight: 'semibold',
70
- variant: 'label-m',
71
- });
72
- });
73
-
74
- it('should ignore ancestor weight for label sizes and always return semibold', () => {
75
- expect(getVariantAndWeightValues(undefined, 'label-m', 'bold', null)).toEqual({
76
- weight: 'semibold',
77
- variant: 'label-m',
78
- });
79
- });
80
- });
81
-
82
- describe('when variant is a content caps size', () => {
83
- it.each(CONTENT_CAPS_VARIANTS.map((size) => [size, undefined, null, null, { weight: 'bold', variant: size }]))(
84
- 'should return weight "bold" for label variant "%s"',
85
- (variant, weight, ancestorWeight, ancestorVariant, expected) => {
86
- expect(getVariantAndWeightValues(weight, variant, ancestorWeight, ancestorVariant)).toEqual(expected);
87
- },
88
- );
89
-
90
- it('should ignore weight prop for label sizes and always return bold', () => {
91
- expect(getVariantAndWeightValues('regular', 'content-caps-m', null, null)).toEqual({
92
- weight: 'bold',
93
- variant: 'content-caps-m',
94
- });
95
- });
96
-
97
- it('should ignore ancestor weight for label sizes and always return bold', () => {
98
- expect(getVariantAndWeightValues(undefined, 'content-caps-m', 'bold', null)).toEqual({
99
- weight: 'bold',
100
- variant: 'content-caps-m',
101
- });
102
- });
103
- });
104
-
105
- describe('when variant comes from ancestor', () => {
106
- it('should use ancestor variant when variant prop is undefined', () => {
107
- expect(getVariantAndWeightValues(undefined, undefined, null, 'body-m')).toEqual({
108
- weight: undefined,
109
- variant: 'body-m',
110
- });
111
- });
112
-
113
- it('should prioritize variant prop over ancestor type', () => {
114
- expect(getVariantAndWeightValues(undefined, 'body-l', null, 'body-m')).toEqual({
115
- weight: undefined,
116
- variant: 'body-l',
117
- });
118
- });
119
-
120
- it('should return semibold weight when ancestor variant is a heading', () => {
121
- expect(getVariantAndWeightValues(undefined, undefined, null, 'heading-m')).toEqual({
122
- weight: 'semibold',
123
- variant: 'heading-m',
124
- });
125
- });
126
-
127
- it('should return semibold weight when ancestor variant is a label', () => {
128
- expect(getVariantAndWeightValues(undefined, undefined, null, 'label-m')).toEqual({
129
- weight: 'semibold',
130
- variant: 'label-m',
131
- });
132
- });
133
-
134
- it('should use ancestor weight when ancestor variant is a body size', () => {
135
- expect(getVariantAndWeightValues(undefined, undefined, 'bold', 'body-m')).toEqual({
136
- weight: 'bold',
137
- variant: 'body-m',
138
- });
139
- });
140
-
141
- it('should use ancestor weight when ancestor variant is a content caps size', () => {
142
- expect(getVariantAndWeightValues(undefined, undefined, 'bold', 'content-caps-m')).toEqual({
143
- weight: 'bold',
144
- variant: 'content-caps-m',
145
- });
146
- });
147
- });
148
-
149
- describe('when no variant is provided', () => {
150
- it('should return weight from prop and undefined variant when no ancestor values', () => {
151
- expect(getVariantAndWeightValues('regular', undefined, null, null)).toEqual({
152
- weight: 'regular',
153
- variant: undefined,
154
- });
155
- });
156
-
157
- it('should return weight from prop and undefined variant when ancestor variant is null', () => {
158
- expect(getVariantAndWeightValues('bold', undefined, null, null)).toEqual({
159
- weight: 'bold',
160
- variant: undefined,
161
- });
162
- });
163
-
164
- it('should return undefined weight when weight prop is undefined and no variant', () => {
165
- expect(getVariantAndWeightValues(undefined, undefined, null, null)).toEqual({
166
- weight: undefined,
167
- variant: undefined,
168
- });
169
- });
170
-
171
- it('should ignore ancestor weight when no variant is provided', () => {
172
- expect(getVariantAndWeightValues(undefined, undefined, 'bold', null)).toEqual({
173
- weight: undefined,
174
- variant: undefined,
175
- });
176
- });
177
- });
178
- });
@@ -1,40 +0,0 @@
1
- import { BODY_VARIANTS, HEADING_VARIANTS, LABEL_VARIANTS } from '../../../core/tokens/GTStandardFont';
2
- import { CONTENT_CAPS_VARIANTS } from '../../../core/tokens/GTStandardNarrowFont';
3
- import type { FontVariants } from '../../../core/tokens/fonts';
4
- import type { TypographyTextProps } from '../Typography';
5
- import type { TypographyVariantContextValue, TypographyWeightContextValue } from './typographyContext';
6
-
7
- interface VariantAndWeightValues {
8
- weight: TypographyTextProps['weight'] | undefined;
9
- variant: FontVariants | undefined;
10
- }
11
-
12
- export function getVariantAndWeightValues(
13
- weightProp: TypographyTextProps['weight'],
14
- variantProp: TypographyTextProps['variant'],
15
- typographyWeightAncestorValue: TypographyWeightContextValue,
16
- typographyVariantAncestorValue: TypographyVariantContextValue,
17
- ): VariantAndWeightValues {
18
- const computedVariant = variantProp || typographyVariantAncestorValue || undefined;
19
-
20
- if (computedVariant) {
21
- if ((BODY_VARIANTS as readonly string[]).includes(computedVariant)) {
22
- const computedWeight = weightProp || typographyWeightAncestorValue || undefined;
23
- return { weight: computedWeight, variant: computedVariant };
24
- }
25
- // Content Caps variant have fixed weights so we override any provided weight
26
- if ((CONTENT_CAPS_VARIANTS as readonly string[]).includes(computedVariant)) {
27
- return { weight: 'bold', variant: computedVariant };
28
- }
29
- // Heading variants have fixed weights so we override any provided weight
30
- if ((HEADING_VARIANTS as readonly string[]).includes(computedVariant)) {
31
- return { weight: 'semibold', variant: computedVariant };
32
- }
33
- // Label variants have fixed weights so we override any provided weight
34
- if ((LABEL_VARIANTS as readonly string[]).includes(computedVariant)) {
35
- return { weight: 'semibold', variant: computedVariant };
36
- }
37
- }
38
-
39
- return { weight: weightProp, variant: undefined };
40
- }