@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,309 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`Bumper/Content/Icon/Features Colors 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="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
22
+ >
23
+ <div
24
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
25
+ >
26
+ <div
27
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
28
+ >
29
+ <svg
30
+ color="var(--content--base--hi)"
31
+ data-file-name="star.inline.svg"
32
+ />
33
+ </div>
34
+ <span
35
+ 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 _col-content--ba1918259606"
36
+ data-disable-theme="true"
37
+ >
38
+ base.hi
39
+ </span>
40
+ </div>
41
+ <div
42
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
43
+ >
44
+ <div
45
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
46
+ >
47
+ <svg
48
+ color="var(--content--base--mid)"
49
+ data-file-name="star.inline.svg"
50
+ />
51
+ </div>
52
+ <span
53
+ 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 _col-content--ba1918259606"
54
+ data-disable-theme="true"
55
+ >
56
+ base.mid
57
+ </span>
58
+ </div>
59
+ <div
60
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
61
+ >
62
+ <div
63
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
64
+ >
65
+ <svg
66
+ color="var(--content--base--low)"
67
+ data-file-name="star.inline.svg"
68
+ />
69
+ </div>
70
+ <span
71
+ 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 _col-content--ba1918259606"
72
+ data-disable-theme="true"
73
+ >
74
+ base.low
75
+ </span>
76
+ </div>
77
+ <div
78
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
79
+ >
80
+ <div
81
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
82
+ >
83
+ <svg
84
+ color="var(--content--accent)"
85
+ data-file-name="star.inline.svg"
86
+ />
87
+ </div>
88
+ <span
89
+ 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 _col-content--ba1918259606"
90
+ data-disable-theme="true"
91
+ >
92
+ accent
93
+ </span>
94
+ </div>
95
+ <div
96
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
97
+ >
98
+ <div
99
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
100
+ >
101
+ <svg
102
+ color="var(--content--success)"
103
+ data-file-name="check-circle.inline.svg"
104
+ />
105
+ </div>
106
+ <span
107
+ 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 _col-content--ba1918259606"
108
+ data-disable-theme="true"
109
+ >
110
+ success
111
+ </span>
112
+ </div>
113
+ <div
114
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
115
+ >
116
+ <div
117
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
118
+ >
119
+ <svg
120
+ color="var(--content--warning)"
121
+ data-file-name="warning.inline.svg"
122
+ />
123
+ </div>
124
+ <span
125
+ 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 _col-content--ba1918259606"
126
+ data-disable-theme="true"
127
+ >
128
+ warning
129
+ </span>
130
+ </div>
131
+ <div
132
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
133
+ >
134
+ <div
135
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
136
+ >
137
+ <svg
138
+ color="var(--content--danger)"
139
+ data-file-name="warning.inline.svg"
140
+ />
141
+ </div>
142
+ <span
143
+ 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 _col-content--ba1918259606"
144
+ data-disable-theme="true"
145
+ >
146
+ danger
147
+ </span>
148
+ </div>
149
+ <div
150
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
151
+ >
152
+ <div
153
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
154
+ >
155
+ <svg
156
+ color="var(--content--info)"
157
+ data-file-name="info.inline.svg"
158
+ />
159
+ </div>
160
+ <span
161
+ 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 _col-content--ba1918259606"
162
+ data-disable-theme="true"
163
+ >
164
+ info
165
+ </span>
166
+ </div>
167
+ </div>
168
+ </span>
169
+ </span>
170
+ </span>
171
+ </div>
172
+ </DocumentFragment>
173
+ `;
174
+
175
+ exports[`Bumper/Content/Icon/Features Sizes 1`] = `
176
+ <DocumentFragment>
177
+ <div
178
+ class="css-view-175oi2r r-flex-13awgt0"
179
+ >
180
+ <span
181
+ class=""
182
+ style="display: contents;"
183
+ >
184
+ <span
185
+ class=" "
186
+ style="display: contents;"
187
+ >
188
+ <span
189
+ class=" t_light is_Theme"
190
+ style="display: contents;"
191
+ >
192
+ <div
193
+ class="is_HStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-row _gap-t-space-spa1366020313 _alignItems-center"
194
+ >
195
+ <div
196
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
197
+ >
198
+ <div
199
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385413 _height-t-size-size1385413"
200
+ >
201
+ <svg
202
+ color="var(--content--base--hi)"
203
+ data-file-name="star.inline.svg"
204
+ />
205
+ </div>
206
+ <span
207
+ 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 _col-content--ba1918259606"
208
+ data-disable-theme="true"
209
+ >
210
+ 16
211
+ </span>
212
+ </div>
213
+ <div
214
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
215
+ >
216
+ <div
217
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385438 _height-t-size-size1385438"
218
+ >
219
+ <svg
220
+ color="var(--content--base--hi)"
221
+ data-file-name="star.inline.svg"
222
+ />
223
+ </div>
224
+ <span
225
+ 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 _col-content--ba1918259606"
226
+ data-disable-theme="true"
227
+ >
228
+ 20
229
+ </span>
230
+ </div>
231
+ <div
232
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
233
+ >
234
+ <div
235
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385442 _height-t-size-size1385442"
236
+ >
237
+ <svg
238
+ color="var(--content--base--hi)"
239
+ data-file-name="star.inline.svg"
240
+ />
241
+ </div>
242
+ <span
243
+ 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 _col-content--ba1918259606"
244
+ data-disable-theme="true"
245
+ >
246
+ 24
247
+ </span>
248
+ </div>
249
+ <div
250
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
251
+ >
252
+ <div
253
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385471 _height-t-size-size1385471"
254
+ >
255
+ <svg
256
+ color="var(--content--base--hi)"
257
+ data-file-name="star.inline.svg"
258
+ />
259
+ </div>
260
+ <span
261
+ 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 _col-content--ba1918259606"
262
+ data-disable-theme="true"
263
+ >
264
+ 32
265
+ </span>
266
+ </div>
267
+ <div
268
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
269
+ >
270
+ <div
271
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385508 _height-t-size-size1385508"
272
+ >
273
+ <svg
274
+ color="var(--content--base--hi)"
275
+ data-file-name="star.inline.svg"
276
+ />
277
+ </div>
278
+ <span
279
+ 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 _col-content--ba1918259606"
280
+ data-disable-theme="true"
281
+ >
282
+ 48
283
+ </span>
284
+ </div>
285
+ <div
286
+ class="is_VStack _dsp-flex _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _fd-column _alignItems-center _gap-t-space-spa94482166"
287
+ >
288
+ <div
289
+ class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385566 _height-t-size-size1385566"
290
+ >
291
+ <svg
292
+ color="var(--content--base--hi)"
293
+ data-file-name="star.inline.svg"
294
+ />
295
+ </div>
296
+ <span
297
+ 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 _col-content--ba1918259606"
298
+ data-disable-theme="true"
299
+ >
300
+ 64
301
+ </span>
302
+ </div>
303
+ </div>
304
+ </span>
305
+ </span>
306
+ </span>
307
+ </div>
308
+ </DocumentFragment>
309
+ `;
@@ -0,0 +1,33 @@
1
+ // Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
2
+
3
+ exports[`Bumper/Content/Icon 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="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-size-size1385438 _height-t-size-size1385438"
22
+ >
23
+ <svg
24
+ color="var(--content--base--hi)"
25
+ data-file-name="star.inline.svg"
26
+ />
27
+ </div>
28
+ </span>
29
+ </span>
30
+ </span>
31
+ </div>
32
+ </DocumentFragment>
33
+ `;
@@ -1,6 +1,5 @@
1
- import type { GetProps, GetThemeValueForKey, TamaguiComponent, WithMediaProps } from '@tamagui/core';
1
+ import type { ColorTokens, GetProps, GetThemeValueForKey, TamaguiComponent, WithMediaProps } from '@tamagui/core';
2
2
  import { Text, styled } from '@tamagui/core';
3
- import { createContext, useContext } from 'react';
4
3
  import { type Except } from 'type-fest';
5
4
  import type {
6
5
  BodyFontVariants,
@@ -9,7 +8,18 @@ import type {
9
8
  HeadingFontVariants,
10
9
  LabelFontVariants,
11
10
  } from '../../core/tokens/fonts';
11
+ import { TypographyIcon } from './TypographyIcon';
12
12
  import { getVariantAndWeightValues } from './utils/getVariantAndWeightValues';
13
+ import {
14
+ TypograhyColorContext,
15
+ TypographyContext,
16
+ TypographyVariantContext,
17
+ TypographyWeightContext,
18
+ useTypographyColor,
19
+ useTypographyContext,
20
+ useTypographyVariant,
21
+ useTypographyWeight,
22
+ } from './utils/typographyContext';
13
23
 
14
24
  // Should use type from tamagui (PropsWithoutMediaStyles) when fixed: https://github.com/tamagui/tamagui/pull/3783
15
25
  type PropsWithoutMedia<A> = {
@@ -55,14 +65,6 @@ const InternalTypography = styled(Text, {
55
65
 
56
66
  export type InternalTypographyProps = GetProps<typeof InternalTypography>;
57
67
 
58
- export type TypographyVariantContextValue = FontVariants | null;
59
- export type TypographyWeightContextValue = 'regular' | 'bold' | 'semibold' | null;
60
- export type TypograhyColorContextValue = InternalTypographyProps['color'] | null;
61
-
62
- const TypographyVariantContext = createContext<TypographyVariantContextValue>(null);
63
- const TypographyWeightContext = createContext<TypographyWeightContextValue>(null);
64
- const TypograhyColorContext = createContext<TypograhyColorContextValue>(null);
65
-
66
68
  // Remove font-related style props from InternalTypography Props
67
69
  type TypographyExcludedFontStyleProps =
68
70
  | 'fontFamily'
@@ -70,9 +72,12 @@ type TypographyExcludedFontStyleProps =
70
72
  | 'lineHeight'
71
73
  | 'fontStyle'
72
74
  | 'fontVariant'
73
- | 'fontWeight';
75
+ | 'fontWeight'
76
+ | 'color';
74
77
 
75
- type TypographyPropsWithoutFontStyleProps = Except<InternalTypographyProps, TypographyExcludedFontStyleProps>;
78
+ type TypographyPropsWithoutFontStyleProps = Except<InternalTypographyProps, TypographyExcludedFontStyleProps> & {
79
+ color: ColorTokens;
80
+ };
76
81
 
77
82
  export interface BodyProps extends TypographyPropsWithoutFontStyleProps {
78
83
  variant?: BodyFontVariants;
@@ -93,9 +98,10 @@ export type TypographyTextProps =
93
98
  | OverrideTamaguiComponentProps<ContentCapsProps>;
94
99
 
95
100
  const TypographyBase = InternalTypography.styleable<TypographyTextProps, TypographyTextProps>((props, ref) => {
96
- const typographyVariantAncestorValue = useContext(TypographyVariantContext);
97
- const typographyWeightAncestorValue = useContext(TypographyWeightContext);
98
- const typographyColorAncestorValue = useContext(TypograhyColorContext);
101
+ const typographyVariantAncestorValue = useTypographyVariant();
102
+ const typographyWeightAncestorValue = useTypographyWeight();
103
+ const typographyColorAncestorValue = useTypographyColor();
104
+ const typographyContext = useTypographyContext();
99
105
 
100
106
  const { variant, weight } = getVariantAndWeightValues(
101
107
  props.weight,
@@ -115,6 +121,8 @@ const TypographyBase = InternalTypography.styleable<TypographyTextProps, Typogra
115
121
  />
116
122
  );
117
123
 
124
+ content = typographyContext ? content : <TypographyContext.Provider value>{content}</TypographyContext.Provider>;
125
+
118
126
  // If a variant is provided, we set it in the context for children to be able to inherit variant value
119
127
  content = props.variant ? (
120
128
  <TypographyVariantContext.Provider value={props.variant}>{content}</TypographyVariantContext.Provider>
@@ -153,4 +161,5 @@ export const Typography = {
153
161
  Header4: createHeading(4),
154
162
  Header5: createHeading(5),
155
163
  Header6: createHeading(6),
164
+ Icon: TypographyIcon,
156
165
  };
@@ -0,0 +1,163 @@
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';
10
+ import { TypographyIcon } from './TypographyIcon';
11
+
12
+ const meta: Meta<typeof TypographyIcon> = {
13
+ title: 'Bumper/Content/TypographyIcon/Features',
14
+ component: TypographyIcon,
15
+ };
16
+
17
+ export default meta;
18
+ type Story = StoryObj<typeof meta>;
19
+
20
+ export const WithExplicitColor: Story = {
21
+ render: () => (
22
+ <HStack gap="$space.16" alignItems="center">
23
+ <VStack alignItems="center" gap="$space.8">
24
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.24" color="$content.accent" />
25
+ <Typography.Text variant="body-xs" color="$content.base.mid">
26
+ Explicit accent
27
+ </Typography.Text>
28
+ </VStack>
29
+ <VStack alignItems="center" gap="$space.8">
30
+ <TypographyIcon icon={<CheckCircleRegularIcon />} size="$size.24" color="$content.success" />
31
+ <Typography.Text variant="body-xs" color="$content.base.mid">
32
+ Explicit success
33
+ </Typography.Text>
34
+ </VStack>
35
+ <VStack alignItems="center" gap="$space.8">
36
+ <TypographyIcon icon={<WarningRegularIcon />} size="$size.24" color="$content.warning" />
37
+ <Typography.Text variant="body-xs" color="$content.base.mid">
38
+ Explicit warning
39
+ </Typography.Text>
40
+ </VStack>
41
+ <VStack alignItems="center" gap="$space.8">
42
+ <TypographyIcon icon={<WarningRegularIcon />} size="$size.24" color="$content.danger" />
43
+ <Typography.Text variant="body-xs" color="$content.base.mid">
44
+ Explicit danger
45
+ </Typography.Text>
46
+ </VStack>
47
+ </HStack>
48
+ ),
49
+ };
50
+
51
+ export const InheritFromTypography: Story = {
52
+ render: () => (
53
+ <VStack gap="$space.24">
54
+ <VStack gap="$space.8">
55
+ <Typography.Text variant="body-s" color="$content.base.mid">
56
+ Icon inherits accent color from Typography
57
+ </Typography.Text>
58
+ <Typography.Text variant="body-m" color="$content.accent">
59
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.20" /> This icon inherits the accent color
60
+ </Typography.Text>
61
+ </VStack>
62
+
63
+ <VStack gap="$space.8">
64
+ <Typography.Text variant="body-s" color="$content.base.mid">
65
+ Icon inherits success color from Typography
66
+ </Typography.Text>
67
+ <Typography.Text variant="body-m" color="$content.success">
68
+ <TypographyIcon icon={<CheckCircleRegularIcon />} size="$size.20" /> Operation completed successfully
69
+ </Typography.Text>
70
+ </VStack>
71
+
72
+ <VStack gap="$space.8">
73
+ <Typography.Text variant="body-s" color="$content.base.mid">
74
+ Icon inherits danger color from Typography
75
+ </Typography.Text>
76
+ <Typography.Text variant="body-m" color="$content.danger">
77
+ <TypographyIcon icon={<WarningRegularIcon />} size="$size.20" /> Error: Something went wrong
78
+ </Typography.Text>
79
+ </VStack>
80
+
81
+ <VStack gap="$space.8">
82
+ <Typography.Text variant="body-s" color="$content.base.mid">
83
+ Icon inherits warning color from Typography
84
+ </Typography.Text>
85
+ <Typography.Text variant="body-m" color="$content.warning">
86
+ <TypographyIcon icon={<InfoRegularIcon />} size="$size.20" /> Warning: Please review this item
87
+ </Typography.Text>
88
+ </VStack>
89
+ </VStack>
90
+ ),
91
+ };
92
+
93
+ export const OverrideInheritedColor: Story = {
94
+ render: () => (
95
+ <VStack gap="$space.24">
96
+ <VStack gap="$space.8">
97
+ <Typography.Text variant="body-s" color="$content.base.mid">
98
+ Typography is accent, but icon explicitly uses success color
99
+ </Typography.Text>
100
+ <Typography.Text variant="body-m" color="$content.accent">
101
+ <TypographyIcon icon={<CheckCircleRegularIcon />} size="$size.20" color="$content.success" /> Icon overrides
102
+ inherited color
103
+ </Typography.Text>
104
+ </VStack>
105
+
106
+ <VStack gap="$space.8">
107
+ <Typography.Text variant="body-s" color="$content.base.mid">
108
+ Typography is success, but icon explicitly uses danger color
109
+ </Typography.Text>
110
+ <Typography.Text variant="body-m" color="$content.success">
111
+ <TypographyIcon icon={<WarningRegularIcon />} size="$size.20" color="$content.danger" /> Mixed color scenario
112
+ </Typography.Text>
113
+ </VStack>
114
+ </VStack>
115
+ ),
116
+ };
117
+
118
+ export const DifferentSizes: Story = {
119
+ render: () => (
120
+ <VStack gap="$space.16">
121
+ <Typography.Text variant="heading-l" color="$content.accent">
122
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.32" /> Large heading with size 32 icon
123
+ </Typography.Text>
124
+ <Typography.Text variant="body-m" color="$content.accent">
125
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.20" /> Body text with size 20 icon
126
+ </Typography.Text>
127
+ <Typography.Text variant="body-s" color="$content.accent">
128
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.16" /> Small text with size 16 icon
129
+ </Typography.Text>
130
+ </VStack>
131
+ ),
132
+ };
133
+
134
+ export const NestedTypographyInheritance: Story = {
135
+ render: () => (
136
+ <VStack gap="$space.24">
137
+ <VStack gap="$space.8">
138
+ <Typography.Text variant="body-s" color="$content.base.mid">
139
+ Nested Typography components - icon inherits from parent
140
+ </Typography.Text>
141
+ <Typography.Text variant="body-l" color="$content.accent">
142
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.20" /> Parent text with icon
143
+ <Typography.Text variant="body-m">
144
+ <TypographyIcon icon={<CheckCircleRegularIcon />} size="$size.16" /> Nested text - icon inherits parent
145
+ color
146
+ </Typography.Text>
147
+ </Typography.Text>
148
+ </VStack>
149
+
150
+ <VStack gap="$space.8">
151
+ <Typography.Text variant="body-s" color="$content.base.mid">
152
+ Nested with override - child overrides parent color
153
+ </Typography.Text>
154
+ <Typography.Text variant="body-l" color="$content.accent">
155
+ <TypographyIcon icon={<StarRegularIcon />} size="$size.20" /> Parent accent color
156
+ <Typography.Text variant="body-m" color="$content.success">
157
+ <TypographyIcon icon={<CheckCircleRegularIcon />} size="$size.16" /> Child overrides to success
158
+ </Typography.Text>
159
+ </Typography.Text>
160
+ </VStack>
161
+ </VStack>
162
+ ),
163
+ };
@@ -0,0 +1,52 @@
1
+ import { StarRegularIcon } from '@ornikar/kitt-icons/phosphor';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { TypographyIcon } from './TypographyIcon';
4
+
5
+ const meta: Meta<typeof TypographyIcon> = {
6
+ title: 'Bumper/Content/TypographyIcon',
7
+ component: TypographyIcon,
8
+ tags: ['autodocs'],
9
+ argTypes: {
10
+ icon: {
11
+ control: false,
12
+ description: 'The icon element to render',
13
+ },
14
+ size: {
15
+ control: 'select',
16
+ options: ['$size.16', '$size.20', '$size.24', '$size.32', '$size.48', '$size.64', '$size.80', '$size.96'],
17
+ description: 'Icon size (uses size tokens)',
18
+ },
19
+ color: {
20
+ control: 'select',
21
+ options: [
22
+ '$content.base.low',
23
+ '$content.base.mid',
24
+ '$content.base.hi',
25
+ '$content.base.onContrasted.low',
26
+ '$content.base.onContrasted.mid',
27
+ '$content.base.onContrasted.hi',
28
+ '$content.accent',
29
+ '$content.promo',
30
+ '$content.promo.onContrasted',
31
+ '$content.info',
32
+ '$content.success',
33
+ '$content.warning',
34
+ '$content.danger',
35
+ '$content.muted',
36
+ '$content.disabled',
37
+ '$content.disabled.onContrasted',
38
+ ],
39
+ description: 'Icon color (semantic theme token). When omitted, inherits from parent Typography context.',
40
+ },
41
+ },
42
+ };
43
+
44
+ export default meta;
45
+ type Story = StoryObj<typeof meta>;
46
+
47
+ export const Default: Story = {
48
+ args: {
49
+ icon: <StarRegularIcon />,
50
+ size: '$size.20',
51
+ },
52
+ };