@telefonica/mistica 16.56.0 → 16.57.0-beta.1
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/README.md +31 -0
- package/css/mistica.css +1 -1
- package/dist/accordion.css-mistica.js +16 -16
- package/dist/align.css-mistica.js +2 -2
- package/dist/autocomplete.css-mistica.js +6 -6
- package/dist/avatar.css-mistica.js +3 -3
- package/dist/badge.css-mistica.js +7 -7
- package/dist/box.css-mistica.js +15 -15
- package/dist/boxed.css-mistica.js +31 -31
- package/dist/button-group.css-mistica.js +10 -10
- package/dist/button-layout.css-mistica.js +21 -21
- package/dist/button.css-mistica.js +51 -51
- package/dist/callout.css-mistica.js +16 -16
- package/dist/card-internal.css-mistica.js +36 -36
- package/dist/carousel.css-mistica.js +18 -18
- package/dist/checkbox.css-mistica.js +21 -21
- package/dist/chip.css-mistica.js +30 -30
- package/dist/circle.css-mistica.js +2 -2
- package/dist/community/advanced-data-card.css-mistica.js +26 -26
- package/dist/community/blocks.css-mistica.js +3 -3
- package/dist/community/example-component.css-mistica.js +2 -2
- package/dist/counter.css-mistica.js +12 -12
- package/dist/cover-hero.css-mistica.js +16 -16
- package/dist/credit-card-number-field.css-mistica.js +6 -6
- package/dist/date-field.css-mistica.js +1 -1
- package/dist/date-time-picker.css-mistica.js +2 -2
- package/dist/dialog.css-mistica.js +15 -15
- package/dist/divider.css-mistica.js +5 -5
- package/dist/double-field.css-mistica.js +4 -4
- package/dist/drawer.css-mistica.js +15 -15
- package/dist/empty-state-card.css-mistica.js +4 -4
- package/dist/empty-state.css-mistica.js +14 -14
- package/dist/fade-in.css-mistica.js +1 -1
- package/dist/feedback.css-mistica.js +14 -14
- package/dist/file-upload.css-mistica.js +14 -14
- package/dist/fixed-footer-layout.css-mistica.js +12 -12
- package/dist/form.css-mistica.js +2 -2
- package/dist/grid-layout.css-mistica.js +9 -9
- package/dist/grid.css-mistica.js +147 -147
- package/dist/header.css-mistica.js +5 -5
- package/dist/hero.css-mistica.js +11 -11
- package/dist/horizontal-scroll.css-mistica.js +3 -3
- package/dist/icon-button.css-mistica.js +66 -66
- package/dist/icons/icon-chevron.css-mistica.js +6 -6
- package/dist/icons/icon-error.css-mistica.js +3 -3
- package/dist/image.css-mistica.js +11 -11
- package/dist/inline.css-mistica.js +16 -16
- package/dist/list.css-mistica.js +15 -15
- package/dist/loading-bar.css-mistica.js +5 -5
- package/dist/loading-screen.css-mistica.js +15 -15
- package/dist/logo-blau-shell.d.ts +10 -0
- package/dist/logo-blau-shell.js +25 -0
- package/dist/logo-blau.d.ts +1 -1
- package/dist/logo-blau.js +25 -40
- package/dist/logo-common.d.ts +0 -1
- package/dist/logo-esimflag-shell.d.ts +10 -0
- package/dist/logo-esimflag-shell.js +25 -0
- package/dist/logo-esimflag.d.ts +1 -1
- package/dist/logo-esimflag.js +11 -26
- package/dist/logo-movistar-new-shell.d.ts +10 -0
- package/dist/logo-movistar-new-shell.js +25 -0
- package/dist/logo-movistar-new.d.ts +1 -1
- package/dist/logo-movistar-new.js +84 -103
- package/dist/logo-movistar-shell.d.ts +10 -0
- package/dist/logo-movistar-shell.js +25 -0
- package/dist/logo-movistar.d.ts +1 -1
- package/dist/logo-movistar.js +16 -31
- package/dist/logo-o2-new-shell.d.ts +8 -0
- package/dist/logo-o2-new-shell.js +24 -0
- package/dist/logo-o2-new.d.ts +1 -1
- package/dist/logo-o2-new.js +6 -13
- package/dist/logo-o2-shell.d.ts +8 -0
- package/dist/logo-o2-shell.js +24 -0
- package/dist/logo-o2.d.ts +1 -1
- package/dist/logo-o2.js +6 -13
- package/dist/logo-telefonica-shell.d.ts +10 -0
- package/dist/logo-telefonica-shell.js +25 -0
- package/dist/logo-telefonica.d.ts +1 -1
- package/dist/logo-telefonica.js +11 -26
- package/dist/logo-tu-shell.d.ts +8 -0
- package/dist/logo-tu-shell.js +24 -0
- package/dist/logo-tu.d.ts +1 -1
- package/dist/logo-tu.js +10 -14
- package/dist/logo-vivo-shell.d.ts +10 -0
- package/dist/logo-vivo-shell.js +25 -0
- package/dist/logo-vivo.d.ts +1 -1
- package/dist/logo-vivo.js +11 -26
- package/dist/logo.css-mistica.js +9 -9
- package/dist/logo.js +223 -205
- package/dist/menu.css-mistica.js +24 -24
- package/dist/mosaic.css-mistica.js +3 -3
- package/dist/navigation-bar.css-mistica.js +45 -45
- package/dist/navigation-breadcrumbs.css-mistica.js +5 -5
- package/dist/package-version.js +2 -2
- package/dist/pin-field.css-mistica.js +10 -10
- package/dist/popover.css-mistica.js +2 -2
- package/dist/progress-bar.css-mistica.js +12 -12
- package/dist/radio-button.css-mistica.js +33 -33
- package/dist/rating.css-mistica.js +12 -12
- package/dist/responsive-layout.css-mistica.js +20 -20
- package/dist/screen-reader-only.css-mistica.js +2 -2
- package/dist/select.css-mistica.js +29 -29
- package/dist/sheet-action-row.css-mistica.js +2 -2
- package/dist/sheet-common.css-mistica.js +16 -16
- package/dist/sheet-info.css-mistica.js +4 -4
- package/dist/skeletons.css-mistica.js +12 -12
- package/dist/skins/skin-contract.css-mistica.js +686 -686
- package/dist/skip-link.css-mistica.js +3 -3
- package/dist/slider.css-mistica.js +28 -28
- package/dist/snackbar.css-mistica.js +16 -16
- package/dist/spinner.css-mistica.js +5 -5
- package/dist/square.css-mistica.js +2 -2
- package/dist/stack.css-mistica.js +9 -9
- package/dist/stacking-group.css-mistica.js +2 -2
- package/dist/stepper.css-mistica.js +16 -16
- package/dist/switch-component.css-mistica.js +53 -53
- package/dist/table.css-mistica.js +24 -24
- package/dist/tabs.css-mistica.js +30 -30
- package/dist/tag.css-mistica.js +5 -5
- package/dist/text-field-base.css-mistica.js +30 -30
- package/dist/text-field-base.js +52 -51
- package/dist/text-field-components.css-mistica.js +20 -17
- package/dist/text-field-components.css.d.ts +1 -0
- package/dist/text-field-components.d.ts +2 -1
- package/dist/text-field-components.js +25 -25
- package/dist/text-link.css-mistica.js +10 -10
- package/dist/text.css-mistica.js +13 -13
- package/dist/theme-context.css-mistica.js +2 -2
- package/dist/timeline.css-mistica.js +18 -18
- package/dist/timer.css-mistica.js +13 -13
- package/dist/tooltip.css-mistica.js +12 -12
- package/dist/touchable.css-mistica.js +5 -5
- package/dist/utils/aspect-ratio-support.css-mistica.js +7 -7
- package/dist/video.css-mistica.js +2 -2
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -3
- package/dist-es/accordion.css-mistica.js +7 -7
- package/dist-es/align.css-mistica.js +2 -2
- package/dist-es/autocomplete.css-mistica.js +2 -2
- package/dist-es/avatar.css-mistica.js +2 -2
- package/dist-es/badge.css-mistica.js +2 -2
- package/dist-es/box.css-mistica.js +15 -15
- package/dist-es/boxed.css-mistica.js +25 -25
- package/dist-es/button-group.css-mistica.js +2 -2
- package/dist-es/button-layout.css-mistica.js +16 -16
- package/dist-es/button.css-mistica.js +38 -38
- package/dist-es/callout.css-mistica.js +12 -12
- package/dist-es/card-internal.css-mistica.js +20 -20
- package/dist-es/carousel.css-mistica.js +10 -10
- package/dist-es/checkbox.css-mistica.js +14 -14
- package/dist-es/chip.css-mistica.js +17 -17
- package/dist-es/circle.css-mistica.js +2 -2
- package/dist-es/community/advanced-data-card.css-mistica.js +7 -7
- package/dist-es/community/blocks.css-mistica.js +2 -2
- package/dist-es/community/example-component.css-mistica.js +2 -2
- package/dist-es/counter.css-mistica.js +2 -2
- package/dist-es/cover-hero.css-mistica.js +4 -4
- package/dist-es/credit-card-number-field.css-mistica.js +4 -4
- package/dist-es/date-field.css-mistica.js +1 -1
- package/dist-es/date-time-picker.css-mistica.js +2 -2
- package/dist-es/dialog.css-mistica.js +5 -5
- package/dist-es/divider.css-mistica.js +5 -5
- package/dist-es/double-field.css-mistica.js +4 -4
- package/dist-es/drawer.css-mistica.js +2 -2
- package/dist-es/empty-state-card.css-mistica.js +2 -2
- package/dist-es/empty-state.css-mistica.js +7 -7
- package/dist-es/fade-in.css-mistica.js +1 -1
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/file-upload.css-mistica.js +8 -8
- package/dist-es/fixed-footer-layout.css-mistica.js +4 -4
- package/dist-es/form.css-mistica.js +2 -2
- package/dist-es/grid-layout.css-mistica.js +4 -4
- package/dist-es/grid.css-mistica.js +127 -127
- package/dist-es/header.css-mistica.js +2 -2
- package/dist-es/hero.css-mistica.js +4 -4
- package/dist-es/horizontal-scroll.css-mistica.js +2 -2
- package/dist-es/icon-button.css-mistica.js +56 -56
- package/dist-es/icons/icon-chevron.css-mistica.js +4 -4
- package/dist-es/icons/icon-error.css-mistica.js +2 -2
- package/dist-es/image.css-mistica.js +4 -4
- package/dist-es/inline.css-mistica.js +10 -10
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-screen.css-mistica.js +5 -5
- package/dist-es/logo-blau-shell.js +16 -0
- package/dist-es/logo-blau.js +36 -51
- package/dist-es/logo-esimflag-shell.js +16 -0
- package/dist-es/logo-esimflag.js +13 -28
- package/dist-es/logo-movistar-new-shell.js +16 -0
- package/dist-es/logo-movistar-new.js +86 -105
- package/dist-es/logo-movistar-shell.js +16 -0
- package/dist-es/logo-movistar.js +18 -33
- package/dist-es/logo-o2-new-shell.js +15 -0
- package/dist-es/logo-o2-new.js +7 -14
- package/dist-es/logo-o2-shell.js +15 -0
- package/dist-es/logo-o2.js +7 -14
- package/dist-es/logo-telefonica-shell.js +16 -0
- package/dist-es/logo-telefonica.js +13 -28
- package/dist-es/logo-tu-shell.js +15 -0
- package/dist-es/logo-tu.js +12 -16
- package/dist-es/logo-vivo-shell.js +16 -0
- package/dist-es/logo-vivo.js +13 -28
- package/dist-es/logo.css-mistica.js +7 -7
- package/dist-es/logo.js +221 -203
- package/dist-es/menu.css-mistica.js +15 -15
- package/dist-es/mosaic.css-mistica.js +2 -2
- package/dist-es/navigation-bar.css-mistica.js +20 -20
- package/dist-es/navigation-breadcrumbs.css-mistica.js +2 -2
- package/dist-es/package-version.js +2 -2
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/popover.css-mistica.js +2 -2
- package/dist-es/progress-bar.css-mistica.js +8 -8
- package/dist-es/radio-button.css-mistica.js +25 -25
- package/dist-es/rating.css-mistica.js +4 -4
- package/dist-es/responsive-layout.css-mistica.js +7 -7
- package/dist-es/screen-reader-only.css-mistica.js +2 -2
- package/dist-es/select.css-mistica.js +20 -20
- package/dist-es/sheet-action-row.css-mistica.js +2 -2
- package/dist-es/sheet-common.css-mistica.js +2 -2
- package/dist-es/sheet-info.css-mistica.js +2 -2
- package/dist-es/skeletons.css-mistica.js +8 -8
- package/dist-es/skins/skin-contract.css-mistica.js +686 -686
- package/dist-es/skip-link.css-mistica.js +2 -2
- package/dist-es/slider.css-mistica.js +20 -20
- package/dist-es/snackbar.css-mistica.js +5 -5
- package/dist-es/spinner.css-mistica.js +2 -2
- package/dist-es/square.css-mistica.js +2 -2
- package/dist-es/stack.css-mistica.js +7 -7
- package/dist-es/stacking-group.css-mistica.js +2 -2
- package/dist-es/stepper.css-mistica.js +4 -4
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +41 -41
- package/dist-es/table.css-mistica.js +11 -11
- package/dist-es/tabs.css-mistica.js +21 -21
- package/dist-es/tag.css-mistica.js +2 -2
- package/dist-es/text-field-base.css-mistica.js +17 -17
- package/dist-es/text-field-base.js +52 -51
- package/dist-es/text-field-components.css-mistica.js +4 -4
- package/dist-es/text-field-components.js +52 -52
- package/dist-es/text-link.css-mistica.js +9 -9
- package/dist-es/text.css-mistica.js +8 -8
- package/dist-es/theme-context.css-mistica.js +2 -2
- package/dist-es/timeline.css-mistica.js +11 -11
- package/dist-es/timer.css-mistica.js +7 -7
- package/dist-es/tooltip.css-mistica.js +3 -3
- package/dist-es/touchable.css-mistica.js +2 -2
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +4 -4
- package/dist-es/video.css-mistica.js +2 -2
- package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +2 -2
- package/doc/analytics.md +145 -0
- package/doc/components.md +730 -0
- package/doc/design-tokens.md +199 -0
- package/doc/fonts.md +287 -0
- package/doc/forms.md +177 -0
- package/doc/images/layout/box.svg +6 -0
- package/doc/images/layout/grid-layout-desktop-5-4.svg +8 -0
- package/doc/images/layout/grid-layout-desktop-6-6.svg +8 -0
- package/doc/images/layout/grid-layout-desktop-8-4.svg +8 -0
- package/doc/images/layout/grid-layout-desktop.svg +16 -0
- package/doc/images/layout/grid-layout-mobile-5-4.svg +9 -0
- package/doc/images/layout/grid-layout-mobile-6-6.svg +9 -0
- package/doc/images/layout/grid-layout-mobile-8-4.svg +9 -0
- package/doc/images/layout/grid-layout-mobile.svg +5 -0
- package/doc/images/layout/grid-layout-tablet-5-4.svg +8 -0
- package/doc/images/layout/grid-layout-tablet-6-6.svg +8 -0
- package/doc/images/layout/grid-layout-tablet-8-4.svg +8 -0
- package/doc/images/layout/grid-layout-tablet.svg +5 -0
- package/doc/images/layout/header-layout-desktop.svg +6 -0
- package/doc/images/layout/header-layout-mobile.svg +6 -0
- package/doc/images/layout/header-layout-tablet.svg +6 -0
- package/doc/images/layout/inline-around.svg +6 -0
- package/doc/images/layout/inline-between.svg +6 -0
- package/doc/images/layout/inline-evenly.svg +6 -0
- package/doc/images/layout/inline.svg +6 -0
- package/doc/images/layout/master-detail-layout-desktop.svg +8 -0
- package/doc/images/layout/master-detail-layout-mobile-detail.svg +6 -0
- package/doc/images/layout/master-detail-layout-mobile-master.svg +6 -0
- package/doc/images/layout/negative-box-ok-outline.svg +17 -0
- package/doc/images/layout/negative-box-ok-preview.svg +11 -0
- package/doc/images/layout/negative-box-wrong-outline.svg +14 -0
- package/doc/images/layout/negative-box-wrong-preview.svg +11 -0
- package/doc/images/layout/responsive-layout-desktop.svg +4 -0
- package/doc/images/layout/responsive-layout-mobile.svg +4 -0
- package/doc/images/layout/responsive-layout-tablet.svg +4 -0
- package/doc/images/layout/stack.svg +8 -0
- package/doc/images/layout/vertical-rhythm.png +0 -0
- package/doc/layout.md +527 -0
- package/doc/llms.md +290 -0
- package/doc/lottie.md +17 -0
- package/doc/migration-guide.md +76 -0
- package/doc/patterns.md +548 -0
- package/doc/sheet.md +122 -0
- package/doc/testing.md +43 -0
- package/doc/texts.md +42 -0
- package/doc/theme-config.md +124 -0
- package/package.json +2 -1
package/doc/layout.md
ADDED
|
@@ -0,0 +1,527 @@
|
|
|
1
|
+
# Layout
|
|
2
|
+
|
|
3
|
+
<!-- TOC depthFrom:2 -->
|
|
4
|
+
|
|
5
|
+
- [Core layout primitives](#core-layout-primitives)
|
|
6
|
+
- [Box](#box)
|
|
7
|
+
- [Stack](#stack)
|
|
8
|
+
- [Inline](#inline)
|
|
9
|
+
- [numeric space](#numeric-space)
|
|
10
|
+
- [between](#between)
|
|
11
|
+
- [around](#around)
|
|
12
|
+
- [evenly](#evenly)
|
|
13
|
+
- [Align](#align)
|
|
14
|
+
- [Grid / GridItem](#grid--griditem)
|
|
15
|
+
- [NegativeBox](#negativebox)
|
|
16
|
+
- [Without NegativeBox](#without-negativebox)
|
|
17
|
+
- [With NegativeBox](#with-negativebox)
|
|
18
|
+
- [Divider](#divider)
|
|
19
|
+
- [HorizontalScroll](#horizontalscroll)
|
|
20
|
+
- [Boxed](#boxed)
|
|
21
|
+
- [Overlay](#overlay)
|
|
22
|
+
- [StackingGroup](#stackinggroup)
|
|
23
|
+
- [Page layouts](#page-layouts)
|
|
24
|
+
- [ResponsiveLayout](#responsivelayout)
|
|
25
|
+
- [HeaderLayout](#headerlayout)
|
|
26
|
+
- [GridLayout](#gridlayout)
|
|
27
|
+
- [MasterDetailLayout](#masterdetaillayout)
|
|
28
|
+
- [FixedFooterLayout](#fixedfooterlayout)
|
|
29
|
+
- [ButtonFixedFooterLayout](#buttonfixedfooterlayout)
|
|
30
|
+
- [ButtonLayout](#buttonlayout)
|
|
31
|
+
- [DoubleField](#doublefield)
|
|
32
|
+
- [Vertical rhythm](#vertical-rhythm)
|
|
33
|
+
- [Doubts?](#doubts)
|
|
34
|
+
|
|
35
|
+
<!-- /TOC -->
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
# Core layout primitives
|
|
40
|
+
|
|
41
|
+
These are the fundamental building blocks for spacing, alignment, and visual structure. Use them to compose
|
|
42
|
+
any UI inside a page.
|
|
43
|
+
|
|
44
|
+
## Box
|
|
45
|
+
|
|
46
|
+
Box provides a set of padding options which can be used to create container elements with **internal**
|
|
47
|
+
spacing. All padding props accept a numeric value or a responsive object `{mobile, tablet?, desktop}`.
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<Box paddingX={16} paddingY={32}>
|
|
51
|
+
<Child />
|
|
52
|
+
</Box>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
<img src="./images/layout/box.svg" />
|
|
56
|
+
|
|
57
|
+
:warning: Do not use `Box` to add external spacings or distribute items, instead use `Stack` or `Inline`.
|
|
58
|
+
|
|
59
|
+
## Stack
|
|
60
|
+
|
|
61
|
+
Vertically distributes its children using the given `space` separation.
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
<Stack space={24}>
|
|
65
|
+
<Child1 />
|
|
66
|
+
<Child2 />
|
|
67
|
+
<Child3 />
|
|
68
|
+
</Stack>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<img src="./images/layout/stack.svg" />
|
|
72
|
+
|
|
73
|
+
## Inline
|
|
74
|
+
|
|
75
|
+
Horizontally distributes its children using the given `space` separation. This component can be considered as
|
|
76
|
+
an horizontal `Stack`.
|
|
77
|
+
|
|
78
|
+
:information_source: Items can be aligned vertically. Check `Inline` component in
|
|
79
|
+
[Storybook](https://mistica-web.vercel.app/?path=/story/layout-inline--default) to learn more about it.
|
|
80
|
+
|
|
81
|
+
### numeric space
|
|
82
|
+
|
|
83
|
+
```tsx
|
|
84
|
+
<Inline space={16}>
|
|
85
|
+
<Child1 />
|
|
86
|
+
<Child2 />
|
|
87
|
+
<Child3 />
|
|
88
|
+
</Inline>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
<img src="./images/layout/inline.svg" />
|
|
92
|
+
|
|
93
|
+
### between
|
|
94
|
+
|
|
95
|
+
Distribute items evenly. The first item is flush with the start, the last is flush with the end
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
<Inline space="between">
|
|
99
|
+
<Child1 />
|
|
100
|
+
<Child2 />
|
|
101
|
+
<Child3 />
|
|
102
|
+
</Inline>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
<img src="./images/layout/inline-between.svg" />
|
|
106
|
+
|
|
107
|
+
### around
|
|
108
|
+
|
|
109
|
+
Distribute items evenly. Items have a half-size space on either end
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
<Inline space="around">
|
|
113
|
+
<Child1 />
|
|
114
|
+
<Child2 />
|
|
115
|
+
<Child3 />
|
|
116
|
+
</Inline>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
<img src="./images/layout/inline-around.svg" />
|
|
120
|
+
|
|
121
|
+
### evenly
|
|
122
|
+
|
|
123
|
+
Distribute items evenly. Items have equal space around them
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
<Inline space="evenly">
|
|
127
|
+
<Child1 />
|
|
128
|
+
<Child2 />
|
|
129
|
+
<Child3 />
|
|
130
|
+
</Inline>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
<img src="./images/layout/inline-evenly.svg" />
|
|
134
|
+
|
|
135
|
+
## Align
|
|
136
|
+
|
|
137
|
+
Positions its children within a container using CSS grid alignment. Useful for centering content or placing it
|
|
138
|
+
at specific positions within a defined area.
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
<Align x="center" y="center" height="100%">
|
|
142
|
+
<Text2 regular>Centered content</Text2>
|
|
143
|
+
</Align>
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
<Align x="end">
|
|
148
|
+
<ButtonPrimary onPress={() => {}}>Action</ButtonPrimary>
|
|
149
|
+
</Align>
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Grid / GridItem
|
|
153
|
+
|
|
154
|
+
A low-level CSS Grid component for creating custom grid layouts. For page-level column layouts, prefer
|
|
155
|
+
`GridLayout` instead. `Grid` is ideal for card grids, image galleries, or any layout needing explicit
|
|
156
|
+
row/column control.
|
|
157
|
+
|
|
158
|
+
```tsx
|
|
159
|
+
<Grid columns={3} gap={{mobile: 8, desktop: 16}}>
|
|
160
|
+
<Card1 />
|
|
161
|
+
<Card2 />
|
|
162
|
+
<Card3 />
|
|
163
|
+
</Grid>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
<Grid columns={4} gap={16}>
|
|
168
|
+
<GridItem columnSpan={2}>
|
|
169
|
+
<FeatureCard />
|
|
170
|
+
</GridItem>
|
|
171
|
+
<GridItem>
|
|
172
|
+
<SmallCard1 />
|
|
173
|
+
</GridItem>
|
|
174
|
+
<GridItem>
|
|
175
|
+
<SmallCard2 />
|
|
176
|
+
</GridItem>
|
|
177
|
+
</Grid>
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## NegativeBox
|
|
181
|
+
|
|
182
|
+
Some components, like non boxed Lists, need to be rendered overflowing its container, because the hover effect
|
|
183
|
+
is larger than the container. This can be achieved using a `NegativeBox`.
|
|
184
|
+
|
|
185
|
+
By default both sides get negative margins. Use the `left` or `right` props to apply margin on one side only.
|
|
186
|
+
|
|
187
|
+
### Without NegativeBox
|
|
188
|
+
|
|
189
|
+
<!-- prettier-ignore -->
|
|
190
|
+
|Outline|Preview|
|
|
191
|
+
|-|-|
|
|
192
|
+
|<img src="./images/layout/negative-box-wrong-outline.svg" />|<img src="./images/layout/negative-box-wrong-preview.svg" />|
|
|
193
|
+
|
|
194
|
+
As you can see there are two problems. The hover is not filling available horizontal space and Row circles are
|
|
195
|
+
not aligned with the content container. These problems are solved using `NegativeBox`.
|
|
196
|
+
|
|
197
|
+
### With NegativeBox
|
|
198
|
+
|
|
199
|
+
```tsx
|
|
200
|
+
<ResponsiveLayout>
|
|
201
|
+
<NegativeBox>
|
|
202
|
+
<RowList>
|
|
203
|
+
<Row1 />
|
|
204
|
+
<Row2 />
|
|
205
|
+
<Row3 />
|
|
206
|
+
</RowList>
|
|
207
|
+
</NegativeBox>
|
|
208
|
+
</ResponsiveLayout>
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
<!-- prettier-ignore -->
|
|
212
|
+
|Outline|Preview|
|
|
213
|
+
|-|-|
|
|
214
|
+
|<img src="./images/layout/negative-box-ok-outline.svg" />|<img src="./images/layout/negative-box-ok-preview.svg" />|
|
|
215
|
+
|
|
216
|
+
Hover effect fills horizontal space and circles are aligned with the container edge.
|
|
217
|
+
|
|
218
|
+
## Divider
|
|
219
|
+
|
|
220
|
+
A simple horizontal divider line. Theme-variant-aware (adapts its color to the current `ThemeVariant`
|
|
221
|
+
context). Takes no props.
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
<Stack space={16}>
|
|
225
|
+
<Text2 regular>Section A</Text2>
|
|
226
|
+
<Divider />
|
|
227
|
+
<Text2 regular>Section B</Text2>
|
|
228
|
+
</Stack>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## HorizontalScroll
|
|
232
|
+
|
|
233
|
+
A container that enables horizontal scrolling for its children. Useful for scrollable rows of cards, chips,
|
|
234
|
+
tags, or any horizontally overflowing content.
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
<HorizontalScroll>
|
|
238
|
+
<Inline space={8}>
|
|
239
|
+
<Chip value="Option 1">Option 1</Chip>
|
|
240
|
+
<Chip value="Option 2">Option 2</Chip>
|
|
241
|
+
<Chip value="Option 3">Option 3</Chip>
|
|
242
|
+
<Chip value="Option 4">Option 4</Chip>
|
|
243
|
+
</Inline>
|
|
244
|
+
</HorizontalScroll>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Boxed
|
|
248
|
+
|
|
249
|
+
A rounded container with background color and optional border. Theme-variant-aware: the background and border
|
|
250
|
+
automatically adapt based on the current and specified `variant`. Useful for creating visually distinct
|
|
251
|
+
sections or card-like containers without card semantics.
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
<Boxed>
|
|
255
|
+
<Box padding={16}>
|
|
256
|
+
<Text2 regular>Content inside a boxed container</Text2>
|
|
257
|
+
</Box>
|
|
258
|
+
</Boxed>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Overlay
|
|
262
|
+
|
|
263
|
+
A full-screen fixed overlay that covers the viewport. Used internally by dialogs, drawers, and sheets, but
|
|
264
|
+
available for custom overlay use cases.
|
|
265
|
+
|
|
266
|
+
```tsx
|
|
267
|
+
<Overlay onPress={handleClose} disableScroll>
|
|
268
|
+
<MyCustomModal />
|
|
269
|
+
</Overlay>
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## StackingGroup
|
|
273
|
+
|
|
274
|
+
Displays a group of items (typically avatars or icons) with optional overlapping. Shows a "+N" indicator when
|
|
275
|
+
items exceed `maxItems`.
|
|
276
|
+
|
|
277
|
+
```tsx
|
|
278
|
+
<StackingGroup stacked maxItems={3} moreItemsStyle={{type: 'circle', size: 40}}>
|
|
279
|
+
<Avatar size={40} src={avatar1} />
|
|
280
|
+
<Avatar size={40} src={avatar2} />
|
|
281
|
+
<Avatar size={40} src={avatar3} />
|
|
282
|
+
<Avatar size={40} src={avatar4} />
|
|
283
|
+
<Avatar size={40} src={avatar5} />
|
|
284
|
+
</StackingGroup>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
# Page layouts
|
|
290
|
+
|
|
291
|
+
These components define the overall structure of a page or screen. They handle responsive breakpoints,
|
|
292
|
+
constrain content width, and provide standard page patterns.
|
|
293
|
+
|
|
294
|
+
## ResponsiveLayout
|
|
295
|
+
|
|
296
|
+
Creates a responsive container for your page content. The size of this container depends on the viewport size.
|
|
297
|
+
Supports a `variant` prop to set background color and theme variant, and `fullWidth` to remove margin
|
|
298
|
+
constraints.
|
|
299
|
+
|
|
300
|
+
```tsx
|
|
301
|
+
<ResponsiveLayout>
|
|
302
|
+
<MyFeature />
|
|
303
|
+
</ResponsiveLayout>
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
<!-- prettier-ignore -->
|
|
307
|
+
|Mobile|Tablet|Desktop|
|
|
308
|
+
|-|-|-|
|
|
309
|
+
|<img src="./images/layout/responsive-layout-mobile.svg" />|<img src="./images/layout/responsive-layout-tablet.svg" />|<img src="./images/layout/responsive-layout-desktop.svg" />|
|
|
310
|
+
|
|
311
|
+
## HeaderLayout
|
|
312
|
+
|
|
313
|
+
The `HeaderLayout` is responsible for render the page header and related components. It uses the
|
|
314
|
+
`ResponsiveLayout` internally so you must not wrap it inside one.
|
|
315
|
+
|
|
316
|
+
```tsx
|
|
317
|
+
<HeaderLayout header={<Header title="Header" />} />
|
|
318
|
+
<ResponsiveLayout>
|
|
319
|
+
<MyFeature />
|
|
320
|
+
</ResponsiveLayout>
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
<!-- prettier-ignore -->
|
|
324
|
+
|Mobile|Tablet|Desktop|
|
|
325
|
+
|-|-|-|
|
|
326
|
+
|<img src="./images/layout/header-layout-mobile.svg" />|<img src="./images/layout/header-layout-tablet.svg" />|<img src="./images/layout/header-layout-desktop.svg" />|
|
|
327
|
+
|
|
328
|
+
## Components that include ResponsiveLayout internally
|
|
329
|
+
|
|
330
|
+
The following components manage their own `ResponsiveLayout` internally. **Do not wrap them inside a
|
|
331
|
+
`ResponsiveLayout`** — that would create a double-nested layout that breaks spacing and alignment.
|
|
332
|
+
|
|
333
|
+
| Component | Reason |
|
|
334
|
+
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
|
335
|
+
| `HeaderLayout` | Wraps its header content in a responsive container |
|
|
336
|
+
| `MainSectionHeaderLayout` | Contains its own responsive wrapper |
|
|
337
|
+
| `Hero` | Manages internal responsive layout for content and media |
|
|
338
|
+
| `CoverHero` | Applies responsive layout to its text content column |
|
|
339
|
+
| `MasterDetailLayout` | Full-width responsive grid managed internally |
|
|
340
|
+
| `ButtonFixedFooterLayout` | Footer buttons aligned via an internal responsive container |
|
|
341
|
+
| `NavigationBar` | All navigation bar variants (including `MainNavigationBar` and `FunnelNavigationBar`) center content using an internal `ResponsiveLayout` |
|
|
342
|
+
| `Tabs` | Tab list constrained with `ResponsiveLayout fullWidth` |
|
|
343
|
+
| `SuccessFeedbackScreen` | All feedback screen variants contain their own page layout |
|
|
344
|
+
| `LoadingScreen` | `BrandLoadingScreen` also uses an internal responsive text layout |
|
|
345
|
+
|
|
346
|
+
These components are placed **directly at the page level**, side by side with `ResponsiveLayout` blocks, not
|
|
347
|
+
inside them:
|
|
348
|
+
|
|
349
|
+
```tsx
|
|
350
|
+
<MainNavigationBar sections={[...]} selectedIndex={0} />
|
|
351
|
+
<HeaderLayout header={<Header title="Page Title" />} />
|
|
352
|
+
<Tabs selectedIndex={0} onChange={setTab} tabs={[{text: 'Tab 1'}, {text: 'Tab 2'}]} />
|
|
353
|
+
<ResponsiveLayout>
|
|
354
|
+
<Box paddingY={24}>
|
|
355
|
+
<Stack space={16}>
|
|
356
|
+
<Text2 regular>Content</Text2>
|
|
357
|
+
</Stack>
|
|
358
|
+
</Box>
|
|
359
|
+
</ResponsiveLayout>
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
## GridLayout
|
|
363
|
+
|
|
364
|
+
A 12-column grid with predefined templates for common page layouts. Must be used inside a `ResponsiveLayout`.
|
|
365
|
+
|
|
366
|
+
Available templates:
|
|
367
|
+
|
|
368
|
+
- Split layouts (use `left`/`right` props): `'6+6'`, `'8+4'`, `'5+4'`, `'4+6'`, `'3+9'`
|
|
369
|
+
- Centered single-column layouts (use `children`): `'10'`, `'8'`
|
|
370
|
+
- No template (raw 12-column grid, use `children`)
|
|
371
|
+
|
|
372
|
+
<!-- prettier-ignore -->
|
|
373
|
+
```tsx
|
|
374
|
+
<ResponsiveLayout>
|
|
375
|
+
<GridLayout
|
|
376
|
+
template="6+6"
|
|
377
|
+
left={<LeftComponent />}
|
|
378
|
+
right={<RightComponent />}
|
|
379
|
+
/>
|
|
380
|
+
</ResponsiveLayout>
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
<!-- prettier-ignore -->
|
|
384
|
+
|Mobile|Tablet|Desktop|
|
|
385
|
+
|-|-|-|
|
|
386
|
+
|<img src="./images/layout/grid-layout-mobile-6-6.svg" />|<img src="./images/layout/grid-layout-tablet-6-6.svg" />|<img src="./images/layout/grid-layout-desktop-6-6.svg" />|
|
|
387
|
+
|
|
388
|
+
## MasterDetailLayout
|
|
389
|
+
|
|
390
|
+
A common layout pattern with a list of items in a left sidebar and a detail view in the main content area. In
|
|
391
|
+
mobile, this translates to a navigation of 2 levels: a first screen with the list and a second screen with the
|
|
392
|
+
content.
|
|
393
|
+
|
|
394
|
+
```tsx
|
|
395
|
+
<MasterDetailLayout isOpen={isOpen} master={listView} detail={detailView} />
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
The `isOpen` prop controls whether the master (when `false`) or detail (when `true`) view is shown in mobile.
|
|
399
|
+
|
|
400
|
+
Take into account that the `detail` view is always visible in desktop, so if you want to show an empty state
|
|
401
|
+
in desktop when there isn't any selected item from the aside list, you can do something like this:
|
|
402
|
+
|
|
403
|
+
```tsx
|
|
404
|
+
<MasterDetailLayout isOpen={isOpen} master={listView} detail={isOpen ? detailView : emptyCase} />
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
<!-- prettier-ignore -->
|
|
408
|
+
|Mobile Master|Mobile Detail|Desktop|
|
|
409
|
+
|-|-|-|
|
|
410
|
+
|<img src="./images/layout/master-detail-layout-mobile-master.svg" />|<img src="./images/layout/master-detail-layout-mobile-detail.svg" />|<img src="./images/layout/master-detail-layout-desktop.svg" />|
|
|
411
|
+
|
|
412
|
+
## FixedFooterLayout
|
|
413
|
+
|
|
414
|
+
A layout with a footer that sticks to the bottom of the viewport. The footer becomes fixed when there is
|
|
415
|
+
enough available height, and scrolls with the content otherwise. Includes an elevation shadow on mobile when
|
|
416
|
+
content is scrollable.
|
|
417
|
+
|
|
418
|
+
```tsx
|
|
419
|
+
<FixedFooterLayout
|
|
420
|
+
footer={
|
|
421
|
+
<Box paddingX={16} paddingY={8}>
|
|
422
|
+
<ButtonLayout primaryButton={<ButtonPrimary onPress={handleSubmit}>Confirm</ButtonPrimary>} />
|
|
423
|
+
</Box>
|
|
424
|
+
}
|
|
425
|
+
>
|
|
426
|
+
<ResponsiveLayout>
|
|
427
|
+
<Box paddingY={24}>
|
|
428
|
+
<Stack space={16}>{/* page content */}</Stack>
|
|
429
|
+
</Box>
|
|
430
|
+
</ResponsiveLayout>
|
|
431
|
+
</FixedFooterLayout>
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## ButtonFixedFooterLayout
|
|
435
|
+
|
|
436
|
+
A convenience wrapper around `FixedFooterLayout` specifically for pages that need a fixed footer with buttons.
|
|
437
|
+
Handles the button layout, responsive padding, and footer visibility automatically.
|
|
438
|
+
|
|
439
|
+
```tsx
|
|
440
|
+
<ButtonFixedFooterLayout
|
|
441
|
+
button={<ButtonPrimary onPress={handleConfirm}>Confirm</ButtonPrimary>}
|
|
442
|
+
secondaryButton={<ButtonSecondary onPress={handleCancel}>Cancel</ButtonSecondary>}
|
|
443
|
+
>
|
|
444
|
+
<ResponsiveLayout>
|
|
445
|
+
<Box paddingY={24}>
|
|
446
|
+
<Stack space={16}>{/* page content */}</Stack>
|
|
447
|
+
</Box>
|
|
448
|
+
</ResponsiveLayout>
|
|
449
|
+
</ButtonFixedFooterLayout>
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
## ButtonLayout
|
|
453
|
+
|
|
454
|
+
Arranges a primary button, secondary button, and/or link in a standardized layout. Handles responsive stacking
|
|
455
|
+
and alignment.
|
|
456
|
+
|
|
457
|
+
```tsx
|
|
458
|
+
<ButtonLayout
|
|
459
|
+
align="full-width"
|
|
460
|
+
primaryButton={<ButtonPrimary onPress={handlePrimary}>Accept</ButtonPrimary>}
|
|
461
|
+
secondaryButton={<ButtonSecondary onPress={handleSecondary}>Cancel</ButtonSecondary>}
|
|
462
|
+
/>
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
## DoubleField
|
|
466
|
+
|
|
467
|
+
Places two form fields side by side with configurable width ratios (`'50/50'`, `'40/60'`, `'60/40'`). Used
|
|
468
|
+
inside forms to group related fields horizontally.
|
|
469
|
+
|
|
470
|
+
```tsx
|
|
471
|
+
<DoubleField layout="50/50">
|
|
472
|
+
<TextField name="firstName" label="First name" />
|
|
473
|
+
<TextField name="lastName" label="Last name" />
|
|
474
|
+
</DoubleField>
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
---
|
|
478
|
+
|
|
479
|
+
## Vertical rhythm
|
|
480
|
+
|
|
481
|
+
Vertical rhythm is an important concept in web design and development. It makes the page feel consistent and
|
|
482
|
+
visually pleasant. It is important to maintain the rhythm across the site.
|
|
483
|
+
|
|
484
|
+
Elements inside our page content can be divided in 3 main groups:
|
|
485
|
+
|
|
486
|
+
- **Container**: should have a top and bottom space of 24px
|
|
487
|
+
- **Sections**: should have a 32px space between them
|
|
488
|
+
- **Elements**: should have a 16px separation between them
|
|
489
|
+
|
|
490
|
+
This is how a page layout could look like:
|
|
491
|
+
|
|
492
|
+
```tsx
|
|
493
|
+
<HeaderLayout header={<Header title="Header" />} />
|
|
494
|
+
<ResponsiveLayout>
|
|
495
|
+
<Box paddingY={24}>
|
|
496
|
+
<Stack space={32}>
|
|
497
|
+
<Stack space={16}>
|
|
498
|
+
<Title1>Section 1</Title1>
|
|
499
|
+
<Text2 regular>
|
|
500
|
+
Some example text
|
|
501
|
+
</Text2>
|
|
502
|
+
</Stack>
|
|
503
|
+
|
|
504
|
+
<Stack space={16}>
|
|
505
|
+
<Title1>Section 2</Title1>
|
|
506
|
+
<NegativeBox>
|
|
507
|
+
<RowList>
|
|
508
|
+
<Row1 />
|
|
509
|
+
<Row2 />
|
|
510
|
+
<Row3 />
|
|
511
|
+
</RowList>
|
|
512
|
+
</NegativeBox>
|
|
513
|
+
</Stack>
|
|
514
|
+
</Stack>
|
|
515
|
+
</Box>
|
|
516
|
+
</ResponsiveLayout>
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
<img src="./images/layout/vertical-rhythm.png">
|
|
520
|
+
|
|
521
|
+
:pencil2:
|
|
522
|
+
[View this example in playroom](https://mistica-web.vercel.app/playroom#?code=N4Igxg9gJgpiBcIA8AJGBDWAnAMugnhAK4AuABABYbYC8wq1MWZJAliQDYw0A6IamJnzIB6AHwBfUWJ4A7JACUYAZwAOEWctYA3GHkKkZssmSQAhCAA8yqzFFayA5gE06AJgAsEoyZNIAyiToYADWZGrB3MAAzG7ecr6%2BAUGh4bZgUQCMAGzxxolJ-jBgbBoAKuxcYkUlrBpkmUgiNaWyFZwwPgV%2BZTCWJG5kWDCORBzoWGIAopboALaqXGS9-U0rA12JTYHBIZuFKWERGXQ5ed1%2BLXVtlZ1X9W7bxa3tVQkXSAByI%2BhsuhaWfbdRQQADuOFYyhIQI%2BCjB7wuBVYkFkdCQAGFWFgwEsAEa7RxYYiyKDoiAcCBYOiQClYZQAOlkMFIWHQHBwYKkWgAXlEPAAGKTiCQIxG%2BNgdXggOGghp8UVisgaAAKw2UyjoAAoAJRkGhiMjACQi-KK8QK2Hw02KsjIjRozHYvEEolEElk2nU8mUhlMllsjmgrmsXl0AVCyQWxESrhSmVkNzy62KlVqjXAHV6g1Gk026RRgog0EF7p21H0R04mBkfGhQnE0neqnAGk%2BxnMkis9mc8IhvmC6S5vMsW5xsFkaJJ4dK2SqlTpzP6w3Gku%2Bc3JwsiGUQqEwvwib6OX46GAAmHbQ77C%2B7LpNM9yJpKNQaLS6fTEaFyEAAGhAJCocwqAgADaIAALIQNokJBFgIAALq-qCrBQP%2ByggbE-JwRIQA)
|
|
523
|
+
|
|
524
|
+
## Doubts?
|
|
525
|
+
|
|
526
|
+
Don't hesitate to ask at
|
|
527
|
+
[Mistica Teams](https://teams.microsoft.com/l/channel/19%3ad2e3607a32ec411b8bf492f43cd0fe0c%40thread.tacv2/General?groupId=e265fe99-929f-45d1-8154-699649674a40&tenantId=9744600e-3e04-492e-baa1-25ec245c6f10)
|