@ornikar/bumper 2.7.2-canary.1768566928.e85c568dc49c9180e37b7aec8792b1e8d45968a6.0 → 2.8.1-canary.1768839311.501438316959a9593513e74c70cb87b0597f2db6.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 +19 -4
- package/CLAUDE.md +45 -0
- package/dist/definitions/index.d.ts +2 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/definitions/system/content/icon/Icon.d.ts +21 -0
- package/dist/definitions/system/content/icon/Icon.d.ts.map +1 -0
- package/dist/definitions/system/core/breakpoints/hooks/useCurrentBreakpointName.d.ts +1 -1
- package/dist/definitions/system/core/breakpoints/hooks/useCurrentBreakpointName.d.ts.map +1 -1
- package/dist/definitions/system/core/breakpoints/utils/breakpointsUtils.d.ts +1 -1
- package/dist/definitions/system/core/breakpoints/utils/breakpointsUtils.d.ts.map +1 -1
- package/dist/definitions/system/core/primitives/Pressable.d.ts +0 -9
- package/dist/definitions/system/core/primitives/Pressable.d.ts.map +1 -1
- package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts +3 -0
- package/dist/definitions/system/core/primitives/ScrollView/ScrollView.d.ts.map +1 -0
- package/dist/definitions/system/core/{breakpoints/constants.d.ts → tokens/breakpoints.d.ts} +1 -1
- package/dist/definitions/system/core/tokens/breakpoints.d.ts.map +1 -0
- package/dist/definitions/tamagui.config.d.ts +2 -28
- package/dist/definitions/tamagui.config.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +43 -26
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +43 -26
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.22.cjs.js +44 -26
- package/dist/index-node-22.22.cjs.js.map +1 -1
- package/dist/index-node-22.22.cjs.web.js +44 -26
- package/dist/index-node-22.22.cjs.web.js.map +1 -1
- package/dist/index-node-22.22.es.mjs +43 -26
- package/dist/index-node-22.22.es.mjs.map +1 -1
- package/dist/index-node-22.22.es.web.mjs +43 -26
- package/dist/index-node-22.22.es.web.mjs.map +1 -1
- package/dist/index.es.js +37 -20
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +37 -20
- package/dist/index.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +5 -2
- package/src/index.ts +2 -0
- package/src/system/content/icon/Icon.features.stories.tsx +116 -0
- package/src/system/content/icon/Icon.stories.tsx +44 -0
- package/src/system/content/icon/Icon.tsx +53 -0
- package/src/system/content/icon/__snapshots__/Icon.features.stories.tsx.snap +569 -0
- package/src/system/content/icon/__snapshots__/Icon.stories.tsx.snap +29 -0
- package/src/system/content/icon/__snapshots_web__/Icon.features.stories.tsx.snap +309 -0
- package/src/system/content/icon/__snapshots_web__/Icon.stories.tsx.snap +33 -0
- package/src/system/content/typography/Typography.features.stories.tsx +156 -0
- package/src/system/content/typography/Typography.stories.tsx +72 -166
- package/src/system/content/typography/__snapshots__/Typography.features.stories.tsx.snap +826 -0
- package/src/system/content/typography/__snapshots__/Typography.stories.tsx.snap +10 -1990
- package/src/system/content/typography/__snapshots_web__/Typography.features.stories.tsx.snap +501 -0
- package/src/system/content/typography/__snapshots_web__/Typography.stories.tsx.snap +6 -807
- package/src/system/core/breakpoints/hooks/useBreakpointValue.test.ts +1 -1
- package/src/system/core/breakpoints/hooks/useCurrentBreakpointName.test.ts +1 -1
- package/src/system/core/breakpoints/hooks/useCurrentBreakpointName.ts +1 -1
- package/src/system/core/breakpoints/utils/breakpointsUtils.test.ts +1 -1
- package/src/system/core/breakpoints/utils/breakpointsUtils.ts +1 -1
- package/src/system/core/primitives/Center.features.stories.tsx +63 -0
- package/src/system/core/primitives/Center.stories.tsx +111 -12
- package/src/system/core/primitives/Pressable.features.stories.tsx +171 -0
- package/src/system/core/primitives/Pressable.stories.tsx +82 -20
- package/src/system/core/primitives/Pressable.tsx +0 -9
- package/src/system/core/primitives/ScrollView/ScrollView.features.stories.tsx +84 -0
- package/src/system/core/primitives/ScrollView/ScrollView.stories.tsx +63 -0
- package/src/system/core/primitives/ScrollView/ScrollView.ts +2 -0
- package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.features.stories.tsx.snap +1245 -0
- package/src/system/core/primitives/ScrollView/__snapshots__/ScrollView.stories.tsx.snap +334 -0
- package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.features.stories.tsx.snap +503 -0
- package/src/system/core/primitives/ScrollView/__snapshots_web__/ScrollView.stories.tsx.snap +138 -0
- package/src/system/core/primitives/Stack.features.stories.tsx +179 -0
- package/src/system/core/primitives/Stack.stories.tsx +74 -44
- package/src/system/core/primitives/View.features.stories.tsx +452 -0
- package/src/system/core/primitives/View.stories.tsx +122 -9
- package/src/system/core/primitives/__snapshots__/Center.features.stories.tsx.snap +208 -0
- package/src/system/core/primitives/__snapshots__/Center.stories.tsx.snap +13 -8
- package/src/system/core/primitives/__snapshots__/Pressable.features.stories.tsx.snap +470 -0
- package/src/system/core/primitives/__snapshots__/Pressable.stories.tsx.snap +11 -10
- package/src/system/core/primitives/__snapshots__/Stack.features.stories.tsx.snap +1234 -0
- package/src/system/core/primitives/__snapshots__/Stack.stories.tsx.snap +63 -84
- package/src/system/core/primitives/__snapshots__/View.features.stories.tsx.snap +2338 -0
- package/src/system/core/primitives/__snapshots__/View.stories.tsx.snap +6 -4
- package/src/system/core/primitives/__snapshots_web__/Center.features.stories.tsx.snap +107 -0
- package/src/system/core/primitives/__snapshots_web__/Center.stories.tsx.snap +8 -5
- package/src/system/core/primitives/__snapshots_web__/Pressable.features.stories.tsx.snap +193 -0
- package/src/system/core/primitives/__snapshots_web__/Pressable.stories.tsx.snap +4 -4
- package/src/system/core/primitives/__snapshots_web__/Stack.features.stories.tsx.snap +515 -0
- package/src/system/core/primitives/__snapshots_web__/Stack.stories.tsx.snap +29 -21
- package/src/system/core/primitives/__snapshots_web__/View.features.stories.tsx.snap +941 -0
- package/src/system/core/primitives/__snapshots_web__/View.stories.tsx.snap +2 -2
- package/src/system/core/themes/__snapshots__/light.stories.tsx.snap +3822 -2233
- package/src/system/core/themes/__snapshots_web__/light.stories.tsx.snap +1243 -991
- package/src/system/core/themes/light.stories.tsx +61 -28
- package/src/system/core/tokens/__snapshots__/breakpoints.stories.tsx.snap +423 -0
- package/src/system/core/tokens/__snapshots__/fonts.stories.tsx.snap +1635 -0
- package/src/system/core/tokens/__snapshots__/radius.stories.tsx.snap +383 -0
- package/src/system/core/tokens/__snapshots__/size.stories.tsx.snap +864 -0
- package/src/system/core/tokens/__snapshots__/space.stories.tsx.snap +945 -0
- package/src/system/core/tokens/__snapshots_web__/breakpoints.stories.tsx.snap +194 -0
- package/src/system/core/tokens/__snapshots_web__/fonts.stories.tsx.snap +729 -0
- package/src/system/core/tokens/__snapshots_web__/radius.stories.tsx.snap +174 -0
- package/src/system/core/tokens/__snapshots_web__/size.stories.tsx.snap +363 -0
- package/src/system/core/tokens/__snapshots_web__/space.stories.tsx.snap +396 -0
- package/src/system/core/tokens/breakpoints.stories.tsx +46 -0
- package/src/system/core/tokens/fonts.stories.tsx +39 -0
- package/src/system/core/tokens/palettes/__snapshots__/deepPurpleColorPalette.stories.tsx.snap +4337 -2747
- package/src/system/core/tokens/palettes/__snapshots_web__/deepPurpleColorPalette.stories.tsx.snap +1524 -1256
- package/src/system/core/tokens/palettes/deepPurpleColorPalette.stories.tsx +42 -28
- package/src/system/core/tokens/radius.stories.tsx +39 -0
- package/src/system/core/tokens/size.stories.tsx +39 -0
- package/src/system/core/tokens/space.stories.tsx +40 -0
- package/src/tamagui.config.ts +3 -3
- package/dist/definitions/system/core/breakpoints/constants.d.ts.map +0 -1
- package/src/system/core/breakpoints/__snapshots__/breakpoints.stories.tsx.snap +0 -49
- package/src/system/core/breakpoints/__snapshots_web__/breakpoints.stories.tsx.snap +0 -43
- package/src/system/core/breakpoints/breakpoints.stories.tsx +0 -45
- /package/src/system/core/{breakpoints/constants.ts → tokens/breakpoints.ts} +0 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
|
+
|
|
3
|
+
exports[`Bumper/Core/Primitives/ScrollView Default 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="css-view-g5y9jx 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
|
+
<span
|
|
21
|
+
class="_dsp_contents"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
class="css-view-g5y9jx r-WebkitOverflowScrolling-150rngu r-flexDirection-eqz5dr r-flexGrow-16y2uox r-flexShrink-1wbh5a2 r-overflowX-11yh6sk r-overflowY-1rnoaur r-transform-agouwx is_ScrollView _height-t-size-size42947888 _width-t-size-size42948634"
|
|
25
|
+
>
|
|
26
|
+
<div
|
|
27
|
+
class="css-view-g5y9jx"
|
|
28
|
+
style="gap: var(--t-space-space--8);"
|
|
29
|
+
>
|
|
30
|
+
<div
|
|
31
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
32
|
+
>
|
|
33
|
+
<span
|
|
34
|
+
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"
|
|
35
|
+
data-disable-theme="true"
|
|
36
|
+
>
|
|
37
|
+
Item 1
|
|
38
|
+
</span>
|
|
39
|
+
</div>
|
|
40
|
+
<div
|
|
41
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
42
|
+
>
|
|
43
|
+
<span
|
|
44
|
+
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"
|
|
45
|
+
data-disable-theme="true"
|
|
46
|
+
>
|
|
47
|
+
Item 2
|
|
48
|
+
</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div
|
|
51
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
52
|
+
>
|
|
53
|
+
<span
|
|
54
|
+
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"
|
|
55
|
+
data-disable-theme="true"
|
|
56
|
+
>
|
|
57
|
+
Item 3
|
|
58
|
+
</span>
|
|
59
|
+
</div>
|
|
60
|
+
<div
|
|
61
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
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"
|
|
65
|
+
data-disable-theme="true"
|
|
66
|
+
>
|
|
67
|
+
Item 4
|
|
68
|
+
</span>
|
|
69
|
+
</div>
|
|
70
|
+
<div
|
|
71
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
72
|
+
>
|
|
73
|
+
<span
|
|
74
|
+
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"
|
|
75
|
+
data-disable-theme="true"
|
|
76
|
+
>
|
|
77
|
+
Item 5
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
82
|
+
>
|
|
83
|
+
<span
|
|
84
|
+
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"
|
|
85
|
+
data-disable-theme="true"
|
|
86
|
+
>
|
|
87
|
+
Item 6
|
|
88
|
+
</span>
|
|
89
|
+
</div>
|
|
90
|
+
<div
|
|
91
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
92
|
+
>
|
|
93
|
+
<span
|
|
94
|
+
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"
|
|
95
|
+
data-disable-theme="true"
|
|
96
|
+
>
|
|
97
|
+
Item 7
|
|
98
|
+
</span>
|
|
99
|
+
</div>
|
|
100
|
+
<div
|
|
101
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
102
|
+
>
|
|
103
|
+
<span
|
|
104
|
+
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"
|
|
105
|
+
data-disable-theme="true"
|
|
106
|
+
>
|
|
107
|
+
Item 8
|
|
108
|
+
</span>
|
|
109
|
+
</div>
|
|
110
|
+
<div
|
|
111
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
112
|
+
>
|
|
113
|
+
<span
|
|
114
|
+
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"
|
|
115
|
+
data-disable-theme="true"
|
|
116
|
+
>
|
|
117
|
+
Item 9
|
|
118
|
+
</span>
|
|
119
|
+
</div>
|
|
120
|
+
<div
|
|
121
|
+
class="_dsp-flex _alignItems-stretch _fd-column _fb-auto _bxs-border-box _pos-relative _minHeight-0px _minWidth-0px _flexShrink-0 _backgroundColor-bg--info--m3355 _paddingTop-t-space-spa1366020313 _paddingRight-t-space-spa1366020313 _paddingBottom-t-space-spa1366020313 _paddingLeft-t-space-spa1366020313 _btlr-t-radius-ra1673638410 _btrr-t-radius-ra1673638410 _bbrr-t-radius-ra1673638410 _bblr-t-radius-ra1673638410"
|
|
122
|
+
>
|
|
123
|
+
<span
|
|
124
|
+
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"
|
|
125
|
+
data-disable-theme="true"
|
|
126
|
+
>
|
|
127
|
+
Item 10
|
|
128
|
+
</span>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</span>
|
|
133
|
+
</span>
|
|
134
|
+
</span>
|
|
135
|
+
</span>
|
|
136
|
+
</div>
|
|
137
|
+
</DocumentFragment>
|
|
138
|
+
`;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Typography } from '../../content/typography/Typography';
|
|
3
|
+
import { HStack, Stack, VStack } from './Stack';
|
|
4
|
+
import { View } from './View';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Stack> = {
|
|
7
|
+
title: 'Bumper/Core/Primitives/Stack/Features',
|
|
8
|
+
component: Stack,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
export const VStackBasic: Story = {
|
|
15
|
+
render: () => (
|
|
16
|
+
<VStack gap="$space.16" backgroundColor="$bg.base.mid.default" padding="$space.16" borderRadius="$radius.m">
|
|
17
|
+
<View backgroundColor="$bg.accent.default" padding="$space.16" borderRadius="$radius.s">
|
|
18
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
19
|
+
VStack Item 1
|
|
20
|
+
</Typography.Text>
|
|
21
|
+
</View>
|
|
22
|
+
<View backgroundColor="$bg.promo.hi.default" padding="$space.16" borderRadius="$radius.s">
|
|
23
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
24
|
+
VStack Item 2
|
|
25
|
+
</Typography.Text>
|
|
26
|
+
</View>
|
|
27
|
+
<View backgroundColor="$bg.info.hi" padding="$space.16" borderRadius="$radius.s">
|
|
28
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
29
|
+
VStack Item 3
|
|
30
|
+
</Typography.Text>
|
|
31
|
+
</View>
|
|
32
|
+
</VStack>
|
|
33
|
+
),
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const HStackBasic: Story = {
|
|
37
|
+
render: () => (
|
|
38
|
+
<HStack gap="$space.16" backgroundColor="$bg.base.mid.default" padding="$space.16" borderRadius="$radius.m">
|
|
39
|
+
<View backgroundColor="$bg.accent.default" padding="$space.16" borderRadius="$radius.s">
|
|
40
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
41
|
+
HStack Item 1
|
|
42
|
+
</Typography.Text>
|
|
43
|
+
</View>
|
|
44
|
+
<View backgroundColor="$bg.promo.hi.default" padding="$space.16" borderRadius="$radius.s">
|
|
45
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
46
|
+
HStack Item 2
|
|
47
|
+
</Typography.Text>
|
|
48
|
+
</View>
|
|
49
|
+
<View backgroundColor="$bg.info.hi" padding="$space.16" borderRadius="$radius.s">
|
|
50
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
51
|
+
HStack Item 3
|
|
52
|
+
</Typography.Text>
|
|
53
|
+
</View>
|
|
54
|
+
</HStack>
|
|
55
|
+
),
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const FlexWrap: Story = {
|
|
59
|
+
render: () => (
|
|
60
|
+
<HStack
|
|
61
|
+
gap="$space.8"
|
|
62
|
+
flexWrap="wrap"
|
|
63
|
+
backgroundColor="$bg.base.mid.default"
|
|
64
|
+
padding="$space.16"
|
|
65
|
+
borderRadius="$radius.m"
|
|
66
|
+
maxWidth={400}
|
|
67
|
+
>
|
|
68
|
+
{Array.from({ length: 10 }, (_, i) => (
|
|
69
|
+
<View key={`item-${i}`} backgroundColor="$bg.accent.default" padding="$space.12" borderRadius="$radius.s">
|
|
70
|
+
<Typography.Text variant="body-s" color="$content.base.onContrasted.hi">
|
|
71
|
+
Item {i + 1}
|
|
72
|
+
</Typography.Text>
|
|
73
|
+
</View>
|
|
74
|
+
))}
|
|
75
|
+
</HStack>
|
|
76
|
+
),
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const NestedStacks: Story = {
|
|
80
|
+
render: () => (
|
|
81
|
+
<VStack gap="$space.16" backgroundColor="$bg.base.hi.default" padding="$space.24" borderRadius="$radius.l">
|
|
82
|
+
<Typography.Text variant="heading-m">Nested Stacks Layout</Typography.Text>
|
|
83
|
+
|
|
84
|
+
<VStack gap="$space.12" backgroundColor="$bg.base.low.default" padding="$space.16" borderRadius="$radius.m">
|
|
85
|
+
<Typography.Text variant="label-m">Section 1</Typography.Text>
|
|
86
|
+
<HStack gap="$space.8">
|
|
87
|
+
<View backgroundColor="$bg.info.mid" padding="$space.12" borderRadius="$radius.s" flexGrow={1}>
|
|
88
|
+
<Typography.Text variant="body-s">Col 1</Typography.Text>
|
|
89
|
+
</View>
|
|
90
|
+
<View backgroundColor="$bg.success.mid" padding="$space.12" borderRadius="$radius.s" flexGrow={1}>
|
|
91
|
+
<Typography.Text variant="body-s">Col 2</Typography.Text>
|
|
92
|
+
</View>
|
|
93
|
+
</HStack>
|
|
94
|
+
</VStack>
|
|
95
|
+
|
|
96
|
+
<VStack gap="$space.12" backgroundColor="$bg.base.low.default" padding="$space.16" borderRadius="$radius.m">
|
|
97
|
+
<Typography.Text variant="label-m">Section 2</Typography.Text>
|
|
98
|
+
<VStack gap="$space.8">
|
|
99
|
+
<View backgroundColor="$bg.warning.mid" padding="$space.12" borderRadius="$radius.s">
|
|
100
|
+
<Typography.Text variant="body-s">Row 1</Typography.Text>
|
|
101
|
+
</View>
|
|
102
|
+
<View backgroundColor="$bg.danger.mid" padding="$space.12" borderRadius="$radius.s">
|
|
103
|
+
<Typography.Text variant="body-s">Row 2</Typography.Text>
|
|
104
|
+
</View>
|
|
105
|
+
</VStack>
|
|
106
|
+
</VStack>
|
|
107
|
+
</VStack>
|
|
108
|
+
),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const FlexGrowExample: Story = {
|
|
112
|
+
render: () => (
|
|
113
|
+
<HStack
|
|
114
|
+
gap="$space.8"
|
|
115
|
+
backgroundColor="$bg.base.mid.default"
|
|
116
|
+
padding="$space.16"
|
|
117
|
+
borderRadius="$radius.m"
|
|
118
|
+
height="$size.144"
|
|
119
|
+
>
|
|
120
|
+
<View backgroundColor="$bg.info.mid" padding="$space.12" borderRadius="$radius.s">
|
|
121
|
+
<Typography.Text variant="body-s">Fixed</Typography.Text>
|
|
122
|
+
</View>
|
|
123
|
+
<View backgroundColor="$bg.success.mid" padding="$space.12" borderRadius="$radius.s" flexGrow={1}>
|
|
124
|
+
<Typography.Text variant="body-s">flexGrow: 1</Typography.Text>
|
|
125
|
+
</View>
|
|
126
|
+
<View backgroundColor="$bg.warning.mid" padding="$space.12" borderRadius="$radius.s" flexGrow={2}>
|
|
127
|
+
<Typography.Text variant="body-s">flexGrow: 2</Typography.Text>
|
|
128
|
+
</View>
|
|
129
|
+
<View backgroundColor="$bg.danger.mid" padding="$space.12" borderRadius="$radius.s">
|
|
130
|
+
<Typography.Text variant="body-s">Fixed</Typography.Text>
|
|
131
|
+
</View>
|
|
132
|
+
</HStack>
|
|
133
|
+
),
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export const GridLikeLayout: Story = {
|
|
137
|
+
render: () => (
|
|
138
|
+
<VStack gap="$space.16" backgroundColor="$bg.base.mid.default" padding="$space.16" borderRadius="$radius.m">
|
|
139
|
+
<HStack gap="$space.16">
|
|
140
|
+
<View backgroundColor="$bg.accent.default" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
141
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
142
|
+
1
|
|
143
|
+
</Typography.Text>
|
|
144
|
+
</View>
|
|
145
|
+
<View backgroundColor="$bg.promo.hi.default" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
146
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
147
|
+
2
|
|
148
|
+
</Typography.Text>
|
|
149
|
+
</View>
|
|
150
|
+
</HStack>
|
|
151
|
+
|
|
152
|
+
<HStack gap="$space.16">
|
|
153
|
+
<View backgroundColor="$bg.info.hi" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
154
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
155
|
+
3
|
|
156
|
+
</Typography.Text>
|
|
157
|
+
</View>
|
|
158
|
+
<View backgroundColor="$bg.success.hi" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
159
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
160
|
+
4
|
|
161
|
+
</Typography.Text>
|
|
162
|
+
</View>
|
|
163
|
+
</HStack>
|
|
164
|
+
|
|
165
|
+
<HStack gap="$space.16">
|
|
166
|
+
<View backgroundColor="$bg.warning.hi" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
167
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
168
|
+
5
|
|
169
|
+
</Typography.Text>
|
|
170
|
+
</View>
|
|
171
|
+
<View backgroundColor="$bg.danger.hi" padding="$space.24" borderRadius="$radius.s" flexGrow={1}>
|
|
172
|
+
<Typography.Text variant="body-m" color="$content.base.onContrasted.hi">
|
|
173
|
+
6
|
|
174
|
+
</Typography.Text>
|
|
175
|
+
</View>
|
|
176
|
+
</HStack>
|
|
177
|
+
</VStack>
|
|
178
|
+
),
|
|
179
|
+
};
|
|
@@ -1,49 +1,79 @@
|
|
|
1
|
-
import type { Meta,
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Typography } from '../../content/typography/Typography';
|
|
3
|
+
import { Stack } from './Stack';
|
|
4
4
|
import { View } from './View';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
title: '
|
|
6
|
+
const meta: Meta<typeof Stack> = {
|
|
7
|
+
title: 'Bumper/Core/Primitives/Stack',
|
|
8
8
|
component: Stack,
|
|
9
|
-
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
flexDirection: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['row', 'column', 'row-reverse', 'column-reverse'],
|
|
14
|
+
description: 'Flex direction',
|
|
15
|
+
},
|
|
16
|
+
gap: {
|
|
17
|
+
control: 'select',
|
|
18
|
+
options: [
|
|
19
|
+
'$space.none',
|
|
20
|
+
'$space.2',
|
|
21
|
+
'$space.4',
|
|
22
|
+
'$space.8',
|
|
23
|
+
'$space.12',
|
|
24
|
+
'$space.16',
|
|
25
|
+
'$space.24',
|
|
26
|
+
'$space.32',
|
|
27
|
+
'$space.40',
|
|
28
|
+
'$space.48',
|
|
29
|
+
'$space.56',
|
|
30
|
+
'$space.64',
|
|
31
|
+
'$space.80',
|
|
32
|
+
],
|
|
33
|
+
description: 'Gap between items (space token)',
|
|
34
|
+
},
|
|
35
|
+
padding: {
|
|
36
|
+
control: 'select',
|
|
37
|
+
options: [
|
|
38
|
+
'$space.none',
|
|
39
|
+
'$space.2',
|
|
40
|
+
'$space.4',
|
|
41
|
+
'$space.8',
|
|
42
|
+
'$space.12',
|
|
43
|
+
'$space.16',
|
|
44
|
+
'$space.24',
|
|
45
|
+
'$space.32',
|
|
46
|
+
'$space.40',
|
|
47
|
+
'$space.48',
|
|
48
|
+
'$space.56',
|
|
49
|
+
'$space.64',
|
|
50
|
+
'$space.80',
|
|
51
|
+
],
|
|
52
|
+
description: 'Padding (space token)',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
};
|
|
10
56
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<View
|
|
14
|
-
width="$size.64"
|
|
15
|
-
height="$size.20"
|
|
16
|
-
backgroundColor="$bg.accent.default"
|
|
17
|
-
padding="$space.4"
|
|
18
|
-
borderRadius="$radius.s"
|
|
19
|
-
/>
|
|
57
|
+
export default meta;
|
|
58
|
+
type Story = StoryObj<typeof meta>;
|
|
20
59
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
backgroundColor="$bg.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<HStack gap="$space.4">{items}</HStack>
|
|
42
|
-
|
|
43
|
-
<VStack gap="$space.4" marginTop="$space.16">
|
|
44
|
-
{items}
|
|
45
|
-
</VStack>
|
|
46
|
-
</>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
StackStory.storyName = 'Stack';
|
|
60
|
+
export const Default: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
flexDirection: 'row',
|
|
63
|
+
gap: '$space.16',
|
|
64
|
+
padding: '$space.16',
|
|
65
|
+
},
|
|
66
|
+
render: (args) => (
|
|
67
|
+
<Stack {...args}>
|
|
68
|
+
<View backgroundColor="$bg.info.mid" padding="$space.12" borderRadius="$radius.s">
|
|
69
|
+
<Typography.Text variant="body-s">Item 1</Typography.Text>
|
|
70
|
+
</View>
|
|
71
|
+
<View backgroundColor="$bg.success.mid" padding="$space.12" borderRadius="$radius.s">
|
|
72
|
+
<Typography.Text variant="body-s">Item 2</Typography.Text>
|
|
73
|
+
</View>
|
|
74
|
+
<View backgroundColor="$bg.warning.mid" padding="$space.12" borderRadius="$radius.s">
|
|
75
|
+
<Typography.Text variant="body-s">Item 3</Typography.Text>
|
|
76
|
+
</View>
|
|
77
|
+
</Stack>
|
|
78
|
+
),
|
|
79
|
+
};
|