@ornikar/bumper 3.6.2 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/definitions/system/actions/Button/Button.d.ts +3 -3
- package/dist/definitions/system/actions/IconButton/IconButton.d.ts +1 -1
- package/dist/definitions/system/content/icon/Icon.d.ts +1 -1
- package/dist/definitions/system/content/typography/Typography.d.ts.map +1 -1
- package/dist/definitions/system/types.d.ts +13 -2
- package/dist/definitions/system/types.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +2 -1
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +2 -1
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +2 -1
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +2 -1
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +2 -1
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +2 -1
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +2 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +2 -1
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/Bumper.mdx +5 -0
- package/src/system/actions/Button/Button.features.stories.tsx +13 -0
- package/src/system/actions/Button/Button.mdx +86 -0
- package/src/system/actions/Button/Button.stories.tsx +0 -1
- package/src/system/actions/Button/__snapshots__/Button.features.stories.tsx.snap +166 -0
- package/src/system/actions/Button/__snapshots_web__/Button.features.stories.tsx.snap +60 -0
- package/src/system/actions/IconButton/IconButton.features.stories.tsx +8 -0
- package/src/system/actions/IconButton/IconButton.mdx +74 -0
- package/src/system/actions/IconButton/IconButton.stories.tsx +0 -1
- package/src/system/actions/IconButton/__snapshots__/IconButton.features.stories.tsx.snap +76 -0
- package/src/system/actions/IconButton/__snapshots_web__/IconButton.features.stories.tsx.snap +39 -0
- package/src/system/content/icon/Icon.features.stories.tsx +12 -0
- package/src/system/content/icon/__snapshots__/Icon.features.stories.tsx.snap +28 -0
- package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +32 -0
- package/src/system/content/typography/Typography.features.stories.tsx +8 -0
- package/src/system/content/typography/Typography.tsx +3 -1
- package/src/system/content/typography/TypographyIcon.features.stories.tsx +9 -0
- package/src/system/content/typography/TypographyLink.features.stories.tsx +9 -0
- package/src/system/content/typography/__snapshots__/Typography.features.stories.tsx.snap +29 -0
- package/src/system/content/typography/__snapshots__/TypographyIcon.features.stories.tsx.snap +45 -0
- package/src/system/content/typography/__snapshots__/TypographyLink.features.stories.tsx.snap +55 -0
- package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +29 -0
- package/src/system/content/typography/__snapshots_web__/TypographyIcon.features.stories.tsx.snap +41 -0
- package/src/system/content/typography/__snapshots_web__/TypographyLink.features.stories.tsx.snap +36 -0
- package/src/system/core/primitives/Center.features.stories.tsx +17 -0
- package/src/system/core/primitives/Pressable.features.stories.tsx +18 -0
- package/src/system/core/primitives/ScrollView/ScrollView.features.stories.tsx +14 -0
- package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.features.stories.tsx.snap +350 -0
- package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +130 -0
- package/src/system/core/primitives/Stack.features.stories.tsx +29 -0
- package/src/system/core/primitives/View.features.stories.tsx +30 -0
- package/src/system/core/primitives/__snapshots__/Center.features.stories.tsx.snap +50 -0
- package/src/system/core/primitives/__snapshots__/Pressable.features.stories.tsx.snap +60 -0
- package/src/system/core/primitives/__snapshots__/Stack.features.stories.tsx.snap +126 -0
- package/src/system/core/primitives/__snapshots__/View.features.stories.tsx.snap +126 -0
- package/src/system/core/primitives/__snapshots_web__/Center.features.stories.tsx.snap +34 -1
- package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +35 -0
- package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +55 -0
- package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +55 -0
- package/src/system/dataDisplays/Badge/Badge.features.stories.tsx +10 -0
- package/src/system/dataDisplays/Badge/__snapshots__/Badge.features.stories.tsx.snap +30 -0
- package/src/system/dataDisplays/Badge/__snapshots_web__/Badge.features.stories.tsx.snap +27 -0
- package/src/system/types.ts +14 -3
|
@@ -226,6 +226,38 @@ exports[`Bumper/Content/Icon/Features DefaultSize 1`] = `
|
|
|
226
226
|
</DocumentFragment>
|
|
227
227
|
`;
|
|
228
228
|
|
|
229
|
+
exports[`Bumper/Content/Icon/Features Responsive 1`] = `
|
|
230
|
+
<DocumentFragment>
|
|
231
|
+
<div
|
|
232
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
233
|
+
>
|
|
234
|
+
<span
|
|
235
|
+
class=""
|
|
236
|
+
style="display: contents;"
|
|
237
|
+
>
|
|
238
|
+
<span
|
|
239
|
+
class=" "
|
|
240
|
+
style="display: contents;"
|
|
241
|
+
>
|
|
242
|
+
<span
|
|
243
|
+
class=" t_light is_Theme"
|
|
244
|
+
style="display: contents;"
|
|
245
|
+
>
|
|
246
|
+
<div
|
|
247
|
+
class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-bumperIco1504282971 _height-t-bumperIco1504282971"
|
|
248
|
+
>
|
|
249
|
+
<svg
|
|
250
|
+
color="var(--content--base--hi)"
|
|
251
|
+
data-file-name="star.inline.svg"
|
|
252
|
+
/>
|
|
253
|
+
</div>
|
|
254
|
+
</span>
|
|
255
|
+
</span>
|
|
256
|
+
</span>
|
|
257
|
+
</div>
|
|
258
|
+
</DocumentFragment>
|
|
259
|
+
`;
|
|
260
|
+
|
|
229
261
|
exports[`Bumper/Content/Icon/Features Sizes 1`] = `
|
|
230
262
|
<DocumentFragment>
|
|
231
263
|
<div
|
|
@@ -158,3 +158,11 @@ export const ContextInheritance: Story = {
|
|
|
158
158
|
</VStack>
|
|
159
159
|
),
|
|
160
160
|
};
|
|
161
|
+
|
|
162
|
+
export const Responsive: Story = {
|
|
163
|
+
render: () => (
|
|
164
|
+
<Typography.Text variant="body-s" $medium={{ variant: 'body-l' }} $large={{ variant: 'body-xl' }}>
|
|
165
|
+
Responsive text: body-s → body-l → heading-m
|
|
166
|
+
</Typography.Text>
|
|
167
|
+
),
|
|
168
|
+
};
|
|
@@ -2,6 +2,7 @@ import type { ColorTokens, GetProps } from '@tamagui/core';
|
|
|
2
2
|
import { Text, styled } from '@tamagui/core';
|
|
3
3
|
import type { ReactNode } from 'react';
|
|
4
4
|
import { type Except } from 'type-fest';
|
|
5
|
+
import { useProps } from '../../core/hooks/useProps';
|
|
5
6
|
import {
|
|
6
7
|
BODY_VARIANTS,
|
|
7
8
|
type BodyFontVariants,
|
|
@@ -120,7 +121,8 @@ export const InternalTypography = styled(Text, {
|
|
|
120
121
|
export type InternalTypographyProps = GetProps<typeof InternalTypography>;
|
|
121
122
|
|
|
122
123
|
export function TypographyBase(props: TypographyTextProps): ReactNode {
|
|
123
|
-
|
|
124
|
+
const flattenProps = useProps(props);
|
|
125
|
+
return <InternalTypography {...flattenProps} />;
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
export const createHeading = (level: number): ((props: TypographyTextProps) => ReactNode) => {
|
|
@@ -126,6 +126,15 @@ export const DifferentSizes: Story = {
|
|
|
126
126
|
),
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
export const Responsive: Story = {
|
|
130
|
+
render: () => (
|
|
131
|
+
<Typography.Text variant="body-m" color="$content.accent">
|
|
132
|
+
<TypographyIcon icon={<StarIcon />} size="$icon.s" $medium={{ size: '$icon.m' }} $large={{ size: '$icon.l' }} />{' '}
|
|
133
|
+
Icon scales across breakpoints
|
|
134
|
+
</Typography.Text>
|
|
135
|
+
),
|
|
136
|
+
};
|
|
137
|
+
|
|
129
138
|
export const NestedTypographyInheritance: Story = {
|
|
130
139
|
render: () => (
|
|
131
140
|
<VStack gap="$space.24">
|
|
@@ -96,3 +96,12 @@ export const StateHover: Story = {
|
|
|
96
96
|
</VStack>
|
|
97
97
|
),
|
|
98
98
|
};
|
|
99
|
+
|
|
100
|
+
export const Responsive: Story = {
|
|
101
|
+
render: () => (
|
|
102
|
+
<Typography.Text variant="body-s" $medium={{ variant: 'body-l' }}>
|
|
103
|
+
Text with <TypographyLink onPress={action('Link clicked!')}>a responsive link</TypographyLink> that scales with
|
|
104
|
+
its parent
|
|
105
|
+
</Typography.Text>
|
|
106
|
+
),
|
|
107
|
+
};
|
|
@@ -882,3 +882,32 @@ exports[`Bumper/Content/Typography/Features LabelVariants 1`] = `
|
|
|
882
882
|
</View>
|
|
883
883
|
</RNCSafeAreaProvider>
|
|
884
884
|
`;
|
|
885
|
+
|
|
886
|
+
exports[`Bumper/Content/Typography/Features Responsive 1`] = `
|
|
887
|
+
<RNCSafeAreaProvider
|
|
888
|
+
onInsetsChange={[Function]}
|
|
889
|
+
style={
|
|
890
|
+
[
|
|
891
|
+
{
|
|
892
|
+
"flex": 1,
|
|
893
|
+
},
|
|
894
|
+
undefined,
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
>
|
|
898
|
+
<Text
|
|
899
|
+
style={
|
|
900
|
+
{
|
|
901
|
+
"color": "#101010",
|
|
902
|
+
"fontFamily": "GTStandardRegular",
|
|
903
|
+
"fontSize": 14,
|
|
904
|
+
"letterSpacing": 0.3,
|
|
905
|
+
"lineHeight": 20,
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
suppressHighlighting={true}
|
|
909
|
+
>
|
|
910
|
+
Responsive text: body-s → body-l → heading-m
|
|
911
|
+
</Text>
|
|
912
|
+
</RNCSafeAreaProvider>
|
|
913
|
+
`;
|
package/src/system/content/typography/__snapshots__/TypographyIcon.features.stories.tsx.snap
CHANGED
|
@@ -657,6 +657,51 @@ exports[`Bumper/Content/TypographyIcon/Features OverrideInheritedColor 1`] = `
|
|
|
657
657
|
</RNCSafeAreaProvider>
|
|
658
658
|
`;
|
|
659
659
|
|
|
660
|
+
exports[`Bumper/Content/TypographyIcon/Features Responsive 1`] = `
|
|
661
|
+
<RNCSafeAreaProvider
|
|
662
|
+
onInsetsChange={[Function]}
|
|
663
|
+
style={
|
|
664
|
+
[
|
|
665
|
+
{
|
|
666
|
+
"flex": 1,
|
|
667
|
+
},
|
|
668
|
+
undefined,
|
|
669
|
+
]
|
|
670
|
+
}
|
|
671
|
+
>
|
|
672
|
+
<Text
|
|
673
|
+
style={
|
|
674
|
+
{
|
|
675
|
+
"color": "#563B56",
|
|
676
|
+
"fontFamily": "GTStandardRegular",
|
|
677
|
+
"fontSize": 16,
|
|
678
|
+
"letterSpacing": 0.3,
|
|
679
|
+
"lineHeight": 24,
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
suppressHighlighting={true}
|
|
683
|
+
>
|
|
684
|
+
<View>
|
|
685
|
+
<View
|
|
686
|
+
style={
|
|
687
|
+
{
|
|
688
|
+
"height": 16,
|
|
689
|
+
"width": 16,
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
>
|
|
693
|
+
<svg
|
|
694
|
+
color="#563B56"
|
|
695
|
+
data-file-name="star.inline.svg"
|
|
696
|
+
/>
|
|
697
|
+
</View>
|
|
698
|
+
</View>
|
|
699
|
+
|
|
700
|
+
Icon scales across breakpoints
|
|
701
|
+
</Text>
|
|
702
|
+
</RNCSafeAreaProvider>
|
|
703
|
+
`;
|
|
704
|
+
|
|
660
705
|
exports[`Bumper/Content/TypographyIcon/Features WithExplicitColor 1`] = `
|
|
661
706
|
<RNCSafeAreaProvider
|
|
662
707
|
onInsetsChange={[Function]}
|
package/src/system/content/typography/__snapshots__/TypographyLink.features.stories.tsx.snap
CHANGED
|
@@ -315,6 +315,61 @@ exports[`Bumper/Content/TypographyLink/Features NoUnderlineTrue 1`] = `
|
|
|
315
315
|
</RNCSafeAreaProvider>
|
|
316
316
|
`;
|
|
317
317
|
|
|
318
|
+
exports[`Bumper/Content/TypographyLink/Features Responsive 1`] = `
|
|
319
|
+
<RNCSafeAreaProvider
|
|
320
|
+
onInsetsChange={[Function]}
|
|
321
|
+
style={
|
|
322
|
+
[
|
|
323
|
+
{
|
|
324
|
+
"flex": 1,
|
|
325
|
+
},
|
|
326
|
+
undefined,
|
|
327
|
+
]
|
|
328
|
+
}
|
|
329
|
+
>
|
|
330
|
+
<Text
|
|
331
|
+
style={
|
|
332
|
+
{
|
|
333
|
+
"color": "#101010",
|
|
334
|
+
"fontFamily": "GTStandardRegular",
|
|
335
|
+
"fontSize": 14,
|
|
336
|
+
"letterSpacing": 0.3,
|
|
337
|
+
"lineHeight": 20,
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
suppressHighlighting={true}
|
|
341
|
+
>
|
|
342
|
+
Text with
|
|
343
|
+
<Text
|
|
344
|
+
onBlur={[Function]}
|
|
345
|
+
onClick={[Function]}
|
|
346
|
+
onFocus={[Function]}
|
|
347
|
+
onResponderGrant={[Function]}
|
|
348
|
+
onResponderMove={[Function]}
|
|
349
|
+
onResponderRelease={[Function]}
|
|
350
|
+
onResponderTerminate={[Function]}
|
|
351
|
+
onResponderTerminationRequest={[Function]}
|
|
352
|
+
onStartShouldSetResponder={[Function]}
|
|
353
|
+
role="link"
|
|
354
|
+
style={
|
|
355
|
+
{
|
|
356
|
+
"color": "#101010",
|
|
357
|
+
"fontFamily": "GTStandardRegular",
|
|
358
|
+
"fontSize": 14,
|
|
359
|
+
"letterSpacing": 0.3,
|
|
360
|
+
"lineHeight": 20,
|
|
361
|
+
"textDecorationLine": "underline",
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
suppressHighlighting={true}
|
|
365
|
+
>
|
|
366
|
+
a responsive link
|
|
367
|
+
</Text>
|
|
368
|
+
that scales with its parent
|
|
369
|
+
</Text>
|
|
370
|
+
</RNCSafeAreaProvider>
|
|
371
|
+
`;
|
|
372
|
+
|
|
318
373
|
exports[`Bumper/Content/TypographyLink/Features StateHover 1`] = `
|
|
319
374
|
<RNCSafeAreaProvider
|
|
320
375
|
onInsetsChange={[Function]}
|
package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap
CHANGED
|
@@ -477,3 +477,32 @@ exports[`Bumper/Content/Typography/Features LabelVariants 1`] = `
|
|
|
477
477
|
</div>
|
|
478
478
|
</DocumentFragment>
|
|
479
479
|
`;
|
|
480
|
+
|
|
481
|
+
exports[`Bumper/Content/Typography/Features Responsive 1`] = `
|
|
482
|
+
<DocumentFragment>
|
|
483
|
+
<div
|
|
484
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
485
|
+
>
|
|
486
|
+
<span
|
|
487
|
+
class=""
|
|
488
|
+
style="display: contents;"
|
|
489
|
+
>
|
|
490
|
+
<span
|
|
491
|
+
class=" "
|
|
492
|
+
style="display: contents;"
|
|
493
|
+
>
|
|
494
|
+
<span
|
|
495
|
+
class=" t_light is_Theme"
|
|
496
|
+
style="display: contents;"
|
|
497
|
+
>
|
|
498
|
+
<span
|
|
499
|
+
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-body1510 _lh-f-lineHeigh201793153 _ls-f-letterSpa1099960310 _fw-f-weight-re98715119 _col-content--ba907952141"
|
|
500
|
+
>
|
|
501
|
+
Responsive text: body-s → body-l → heading-m
|
|
502
|
+
</span>
|
|
503
|
+
</span>
|
|
504
|
+
</span>
|
|
505
|
+
</span>
|
|
506
|
+
</div>
|
|
507
|
+
</DocumentFragment>
|
|
508
|
+
`;
|
package/src/system/content/typography/__snapshots_web__/TypographyIcon.features.stories.tsx.snap
CHANGED
|
@@ -405,6 +405,47 @@ exports[`Bumper/Content/TypographyIcon/Features OverrideInheritedColor 1`] = `
|
|
|
405
405
|
</DocumentFragment>
|
|
406
406
|
`;
|
|
407
407
|
|
|
408
|
+
exports[`Bumper/Content/TypographyIcon/Features Responsive 1`] = `
|
|
409
|
+
<DocumentFragment>
|
|
410
|
+
<div
|
|
411
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
412
|
+
>
|
|
413
|
+
<span
|
|
414
|
+
class=""
|
|
415
|
+
style="display: contents;"
|
|
416
|
+
>
|
|
417
|
+
<span
|
|
418
|
+
class=" "
|
|
419
|
+
style="display: contents;"
|
|
420
|
+
>
|
|
421
|
+
<span
|
|
422
|
+
class=" t_light is_Theme"
|
|
423
|
+
style="display: contents;"
|
|
424
|
+
>
|
|
425
|
+
<span
|
|
426
|
+
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-body1504 _lh-f-lineHeigh201793147 _ls-f-letterSpa1099960304 _fw-f-weight-re98715119 _col-content--ac3049896"
|
|
427
|
+
>
|
|
428
|
+
<div
|
|
429
|
+
class="is_TypographyViewInternal _dsp-_platformweb_inline-flex _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0"
|
|
430
|
+
>
|
|
431
|
+
<div
|
|
432
|
+
class="is_Icon _dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _width-t-bumperIco1504282971 _height-t-bumperIco1504282971"
|
|
433
|
+
>
|
|
434
|
+
<svg
|
|
435
|
+
color="var(--content--accent)"
|
|
436
|
+
data-file-name="star.inline.svg"
|
|
437
|
+
/>
|
|
438
|
+
</div>
|
|
439
|
+
</div>
|
|
440
|
+
Icon scales across breakpoints
|
|
441
|
+
</span>
|
|
442
|
+
</span>
|
|
443
|
+
</span>
|
|
444
|
+
</span>
|
|
445
|
+
</div>
|
|
446
|
+
</DocumentFragment>
|
|
447
|
+
`;
|
|
448
|
+
|
|
408
449
|
exports[`Bumper/Content/TypographyIcon/Features WithExplicitColor 1`] = `
|
|
409
450
|
<DocumentFragment>
|
|
410
451
|
<div
|
package/src/system/content/typography/__snapshots_web__/TypographyLink.features.stories.tsx.snap
CHANGED
|
@@ -226,6 +226,42 @@ exports[`Bumper/Content/TypographyLink/Features NoUnderlineTrue 1`] = `
|
|
|
226
226
|
</DocumentFragment>
|
|
227
227
|
`;
|
|
228
228
|
|
|
229
|
+
exports[`Bumper/Content/TypographyLink/Features Responsive 1`] = `
|
|
230
|
+
<DocumentFragment>
|
|
231
|
+
<div
|
|
232
|
+
class="css-view-g5y9jx r-flex-13awgt0"
|
|
233
|
+
>
|
|
234
|
+
<span
|
|
235
|
+
class=""
|
|
236
|
+
style="display: contents;"
|
|
237
|
+
>
|
|
238
|
+
<span
|
|
239
|
+
class=" "
|
|
240
|
+
style="display: contents;"
|
|
241
|
+
>
|
|
242
|
+
<span
|
|
243
|
+
class=" t_light is_Theme"
|
|
244
|
+
style="display: contents;"
|
|
245
|
+
>
|
|
246
|
+
<span
|
|
247
|
+
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-body1510 _lh-f-lineHeigh201793153 _ls-f-letterSpa1099960310 _fw-f-weight-re98715119 _col-content--ba907952141"
|
|
248
|
+
>
|
|
249
|
+
Text with
|
|
250
|
+
<a
|
|
251
|
+
class="is_TypographyLink font_GTStandard _WebkitFontSmoothing-_platformweb_antialiased _td-0hover-none _dsp-inline _bxs-border-box _ww-break-word _ws-inherit _marginTop-0px _marginRight-0px _marginBottom-0px _marginLeft-0px _ff-f-family _fs-f-size-body1510 _lh-f-lineHeigh201793153 _ls-f-letterSpa1099960310 _fw-f-weight-re98715119 _col-content--ba907952141 _cur-pointer _td-underline _tt-inherit"
|
|
252
|
+
role="link"
|
|
253
|
+
>
|
|
254
|
+
a responsive link
|
|
255
|
+
</a>
|
|
256
|
+
that scales with its parent
|
|
257
|
+
</span>
|
|
258
|
+
</span>
|
|
259
|
+
</span>
|
|
260
|
+
</span>
|
|
261
|
+
</div>
|
|
262
|
+
</DocumentFragment>
|
|
263
|
+
`;
|
|
264
|
+
|
|
229
265
|
exports[`Bumper/Content/TypographyLink/Features StateHover 1`] = `
|
|
230
266
|
<DocumentFragment>
|
|
231
267
|
<div
|
|
@@ -61,3 +61,20 @@ export const CircularCentering: Story = {
|
|
|
61
61
|
</HStack>
|
|
62
62
|
),
|
|
63
63
|
};
|
|
64
|
+
|
|
65
|
+
export const Responsive: Story = {
|
|
66
|
+
render: () => (
|
|
67
|
+
<Center
|
|
68
|
+
backgroundColor="$bg.accent.default"
|
|
69
|
+
width="$size.96"
|
|
70
|
+
height="$size.96"
|
|
71
|
+
padding="$space.8"
|
|
72
|
+
borderRadius="$radius.m"
|
|
73
|
+
$medium={{ width: '$size.144', height: '$size.144', padding: '$space.24' }}
|
|
74
|
+
>
|
|
75
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi" textAlign="center">
|
|
76
|
+
Responsive
|
|
77
|
+
</Typography.Text>
|
|
78
|
+
</Center>
|
|
79
|
+
),
|
|
80
|
+
};
|
|
@@ -143,3 +143,21 @@ export const PolymorphicAs: Story = {
|
|
|
143
143
|
</VStack>
|
|
144
144
|
),
|
|
145
145
|
};
|
|
146
|
+
|
|
147
|
+
export const Responsive: Story = {
|
|
148
|
+
render: () => (
|
|
149
|
+
<Pressable
|
|
150
|
+
backgroundColor="$bg.accent.default"
|
|
151
|
+
padding="$space.8"
|
|
152
|
+
borderRadius="$radius.s"
|
|
153
|
+
pressStyle={{ scale: 0.98 }}
|
|
154
|
+
$medium={{ padding: '$space.16', borderRadius: '$radius.m' }}
|
|
155
|
+
$large={{ padding: '$space.24', borderRadius: '$radius.l' }}
|
|
156
|
+
onPress={action('Pressed')}
|
|
157
|
+
>
|
|
158
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
159
|
+
Responsive padding and radius
|
|
160
|
+
</Typography.Text>
|
|
161
|
+
</Pressable>
|
|
162
|
+
),
|
|
163
|
+
};
|
|
@@ -82,3 +82,17 @@ export const ScrollDisabled: Story = {
|
|
|
82
82
|
</VStack>
|
|
83
83
|
),
|
|
84
84
|
};
|
|
85
|
+
|
|
86
|
+
export const Responsive: Story = {
|
|
87
|
+
render: () => (
|
|
88
|
+
<ScrollView height="$size.120" width="$size.176" $medium={{ height: '$size.176', width: '$size.208' }}>
|
|
89
|
+
<VStack gap="$space.8" padding="$space.8">
|
|
90
|
+
{Array.from({ length: 10 }, (_, i) => (
|
|
91
|
+
<View key={`item-${i}`} backgroundColor="$bg.info.mid" padding="$space.12" borderRadius="$radius.m">
|
|
92
|
+
<Typography.Text variant="body-s">Item {i + 1}</Typography.Text>
|
|
93
|
+
</View>
|
|
94
|
+
))}
|
|
95
|
+
</VStack>
|
|
96
|
+
</ScrollView>
|
|
97
|
+
),
|
|
98
|
+
};
|