vpt-sebraeds 0.0.74 → 0.0.76
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/components/Bullet/Bullet.stories.jsx +55 -0
- package/components/Bullet/index.jsx +224 -0
- package/components/{ButtomGroup/ButtomGroup.stories.jsx → ButtonGroup/ButtonGroup.stories.jsx} +93 -51
- package/components/ButtonGroup/index.tsx +439 -0
- package/components/EventListItem/EventListItem.stories.tsx +179 -0
- package/components/EventListItem/index.tsx +514 -0
- package/components/ListItem/ListItem.stories.jsx +145 -264
- package/components/ListItem/index.jsx +384 -68
- package/components/Modal/index.jsx +2 -1
- package/components/NotificationDialog/NotificationDialog.stories.jsx +36 -1
- package/components/NotificationDialog/README.md +29 -4
- package/components/NotificationDialog/index.jsx +89 -2
- package/components/Toast/Toast.stories.jsx +232 -156
- package/components/Toast/index.jsx +201 -123
- package/components/styles/index,js +2 -1
- package/components/styles/tokens.ts +222 -0
- package/dist/components/Bullet/index.d.ts +178 -0
- package/dist/components/Bullet/index.d.ts.map +1 -0
- package/dist/components/Bullet/index.js +179 -0
- package/dist/components/ButtonGroup/index.d.ts +61 -0
- package/dist/components/ButtonGroup/index.d.ts.map +1 -0
- package/dist/components/ButtonGroup/index.js +268 -0
- package/dist/components/EventListItem/index.d.ts +60 -0
- package/dist/components/EventListItem/index.d.ts.map +1 -0
- package/dist/components/EventListItem/index.js +301 -0
- package/dist/components/ListItem/index.d.ts +85 -25
- package/dist/components/ListItem/index.d.ts.map +1 -1
- package/dist/components/ListItem/index.js +286 -52
- package/dist/components/Modal/index.d.ts +2 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NotificationDialog/index.d.ts +44 -2
- package/dist/components/NotificationDialog/index.d.ts.map +1 -1
- package/dist/components/NotificationDialog/index.js +60 -3
- package/dist/components/Toast/index.d.ts +76 -10
- package/dist/components/Toast/index.d.ts.map +1 -1
- package/dist/components/Toast/index.js +143 -80
- package/dist/components/styles/tokens.d.ts +260 -0
- package/dist/components/styles/tokens.d.ts.map +1 -0
- package/dist/components/styles/tokens.js +213 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +2 -1
- package/package.json +1 -1
- package/src/index.ts +2 -1
- package/components/ButtomGroup/index.tsx +0 -398
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Bullet from './index.jsx';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Atom/Bullet',
|
|
6
|
+
component: Bullet.Root,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
backgrounds: {
|
|
11
|
+
default: 'light',
|
|
12
|
+
values: [
|
|
13
|
+
{ name: 'light', value: '#FBFAFF' },
|
|
14
|
+
{ name: 'dark', value: '#28293D' },
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
argTypes: {
|
|
19
|
+
variant: {
|
|
20
|
+
description: 'Variação visual',
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: ['flat', 'low-outlined'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default meta;
|
|
28
|
+
|
|
29
|
+
export const Flat = {
|
|
30
|
+
args: { variant: 'flat' },
|
|
31
|
+
render: (args) => (
|
|
32
|
+
<Bullet.Root variant={args.variant} style={{ maxWidth: 520 }}>
|
|
33
|
+
<Bullet.Icon name="sparkling-2-line" color="#C167E6" />
|
|
34
|
+
<Bullet.Content>
|
|
35
|
+
<Bullet.Title>Lorem ipsum dolor sit amet</Bullet.Title>
|
|
36
|
+
<Bullet.Description>
|
|
37
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id quam ac massa ullamcorper
|
|
38
|
+
dignissim vitae eu turpis.
|
|
39
|
+
</Bullet.Description>
|
|
40
|
+
</Bullet.Content>
|
|
41
|
+
</Bullet.Root>
|
|
42
|
+
),
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const LowOutlined = {
|
|
46
|
+
args: { variant: 'low-outlined' },
|
|
47
|
+
render: (args) => (
|
|
48
|
+
<Bullet.Root variant={args.variant} style={{ maxWidth: 520 }}>
|
|
49
|
+
<Bullet.Icon name="sparkling-2-line" />
|
|
50
|
+
<Bullet.Content>
|
|
51
|
+
<Bullet.Title>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc id quam ac massa.</Bullet.Title>
|
|
52
|
+
</Bullet.Content>
|
|
53
|
+
</Bullet.Root>
|
|
54
|
+
),
|
|
55
|
+
};
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { View, StyleSheet } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import Icon from '../Icon';
|
|
6
|
+
import SEText from '../SEText';
|
|
7
|
+
import tokens from '../styles/tokens';
|
|
8
|
+
|
|
9
|
+
const VARIANTS = {
|
|
10
|
+
flat: {
|
|
11
|
+
container: {
|
|
12
|
+
backgroundColor: 'transparent',
|
|
13
|
+
borderWidth: 0,
|
|
14
|
+
padding: 0,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
'low-outlined': {
|
|
18
|
+
container: {
|
|
19
|
+
backgroundColor: tokens.colors.background.light,
|
|
20
|
+
borderColor: tokens.colors.border.default,
|
|
21
|
+
borderWidth: 1,
|
|
22
|
+
padding: tokens.space.md,
|
|
23
|
+
borderRadius: tokens.borderRadius.lg,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// =============================================================================
|
|
29
|
+
// Composition API
|
|
30
|
+
// =============================================================================
|
|
31
|
+
const BulletRoot = ({ children, variant = 'flat', style }) => {
|
|
32
|
+
const v = VARIANTS[variant] || VARIANTS.flat;
|
|
33
|
+
return <View style={[styles.container, v.container, style]}>{children}</View>;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const BulletIcon = ({ name, size = 24, color = tokens.colors.brand.primary, style }) => {
|
|
37
|
+
if (!name) return null;
|
|
38
|
+
return (
|
|
39
|
+
<View style={[styles.iconWrapper, style]}>
|
|
40
|
+
<Icon name={name} size={size} color={color} />
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const BulletContent = ({ children, style }) => {
|
|
46
|
+
return <View style={[styles.content, style]}>{children}</View>;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const BulletTitle = ({ children, style }) => {
|
|
50
|
+
if (!children) return null;
|
|
51
|
+
return (
|
|
52
|
+
<SEText style={[styles.title, style]}>
|
|
53
|
+
{children}
|
|
54
|
+
</SEText>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const BulletDescription = ({ children, style }) => {
|
|
59
|
+
if (!children) return null;
|
|
60
|
+
return (
|
|
61
|
+
<SEText
|
|
62
|
+
type="ns-sm-body"
|
|
63
|
+
color={tokens.colors.text.secondary}
|
|
64
|
+
style={[styles.description, style]}
|
|
65
|
+
>
|
|
66
|
+
{children}
|
|
67
|
+
</SEText>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Bullet (compat)
|
|
73
|
+
*
|
|
74
|
+
* Mantém a API por props (title/description/iconName) para facilitar adoção,
|
|
75
|
+
* mas a forma preferida é via composição:
|
|
76
|
+
*
|
|
77
|
+
* <Bullet.Root variant="low-outlined">
|
|
78
|
+
* <Bullet.Icon name="sparkling-2-line" />
|
|
79
|
+
* <Bullet.Content>
|
|
80
|
+
* <Bullet.Title>...</Bullet.Title>
|
|
81
|
+
* <Bullet.Description>...</Bullet.Description>
|
|
82
|
+
* </Bullet.Content>
|
|
83
|
+
* </Bullet.Root>
|
|
84
|
+
*/
|
|
85
|
+
const Bullet = ({
|
|
86
|
+
children,
|
|
87
|
+
title,
|
|
88
|
+
description,
|
|
89
|
+
iconName,
|
|
90
|
+
iconColor = tokens.colors.brand.primary,
|
|
91
|
+
iconSize = 24,
|
|
92
|
+
variant = 'flat',
|
|
93
|
+
style,
|
|
94
|
+
contentStyle,
|
|
95
|
+
}) => {
|
|
96
|
+
if (children) {
|
|
97
|
+
return (
|
|
98
|
+
<BulletRoot variant={variant} style={style}>
|
|
99
|
+
{children}
|
|
100
|
+
</BulletRoot>
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<BulletRoot variant={variant} style={style}>
|
|
106
|
+
<BulletIcon name={iconName} size={iconSize} color={iconColor} />
|
|
107
|
+
<BulletContent style={contentStyle}>
|
|
108
|
+
<BulletTitle>{title}</BulletTitle>
|
|
109
|
+
<BulletDescription>{description}</BulletDescription>
|
|
110
|
+
</BulletContent>
|
|
111
|
+
</BulletRoot>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
Bullet.propTypes = {
|
|
116
|
+
children: PropTypes.node,
|
|
117
|
+
title: PropTypes.string,
|
|
118
|
+
description: PropTypes.string,
|
|
119
|
+
iconName: PropTypes.string,
|
|
120
|
+
iconColor: PropTypes.string,
|
|
121
|
+
iconSize: PropTypes.number,
|
|
122
|
+
variant: PropTypes.oneOf(['flat', 'low-outlined']),
|
|
123
|
+
style: PropTypes.any,
|
|
124
|
+
contentStyle: PropTypes.any,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
Bullet.defaultProps = {
|
|
128
|
+
children: null,
|
|
129
|
+
title: '',
|
|
130
|
+
description: '',
|
|
131
|
+
iconName: null,
|
|
132
|
+
iconColor: tokens.colors.brand.primary,
|
|
133
|
+
iconSize: 24,
|
|
134
|
+
variant: 'flat',
|
|
135
|
+
style: undefined,
|
|
136
|
+
contentStyle: undefined,
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
BulletRoot.propTypes = {
|
|
140
|
+
children: PropTypes.node,
|
|
141
|
+
variant: PropTypes.oneOf(['flat', 'low-outlined']),
|
|
142
|
+
style: PropTypes.any,
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
BulletRoot.defaultProps = {
|
|
146
|
+
children: null,
|
|
147
|
+
variant: 'flat',
|
|
148
|
+
style: undefined,
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
BulletIcon.propTypes = {
|
|
152
|
+
name: PropTypes.string,
|
|
153
|
+
size: PropTypes.number,
|
|
154
|
+
color: PropTypes.string,
|
|
155
|
+
style: PropTypes.any,
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
BulletIcon.defaultProps = {
|
|
159
|
+
name: null,
|
|
160
|
+
size: 24,
|
|
161
|
+
color: tokens.colors.brand.primary,
|
|
162
|
+
style: undefined,
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
BulletContent.propTypes = {
|
|
166
|
+
children: PropTypes.node,
|
|
167
|
+
style: PropTypes.any,
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
BulletContent.defaultProps = {
|
|
171
|
+
children: null,
|
|
172
|
+
style: undefined,
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
BulletTitle.propTypes = {
|
|
176
|
+
children: PropTypes.node,
|
|
177
|
+
style: PropTypes.any,
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
BulletTitle.defaultProps = {
|
|
181
|
+
children: null,
|
|
182
|
+
style: undefined,
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
BulletDescription.propTypes = {
|
|
186
|
+
children: PropTypes.node,
|
|
187
|
+
style: PropTypes.any,
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
BulletDescription.defaultProps = {
|
|
191
|
+
children: null,
|
|
192
|
+
style: undefined,
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
const styles = StyleSheet.create({
|
|
196
|
+
container: {
|
|
197
|
+
flexDirection: 'row',
|
|
198
|
+
alignItems: 'flex-start',
|
|
199
|
+
},
|
|
200
|
+
iconWrapper: {
|
|
201
|
+
marginRight: tokens.space.sm,
|
|
202
|
+
paddingTop: 2,
|
|
203
|
+
},
|
|
204
|
+
content: {
|
|
205
|
+
flex: 1,
|
|
206
|
+
},
|
|
207
|
+
title: {
|
|
208
|
+
marginBottom: 4,
|
|
209
|
+
color: tokens.colors.text.brand,
|
|
210
|
+
fontSize: tokens.typography.fontSize.md,
|
|
211
|
+
fontWeight: tokens.typography.fontWeight.bold,
|
|
212
|
+
},
|
|
213
|
+
description: {
|
|
214
|
+
lineHeight: 20,
|
|
215
|
+
},
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
Bullet.Root = BulletRoot;
|
|
219
|
+
Bullet.Icon = BulletIcon;
|
|
220
|
+
Bullet.Content = BulletContent;
|
|
221
|
+
Bullet.Title = BulletTitle;
|
|
222
|
+
Bullet.Description = BulletDescription;
|
|
223
|
+
|
|
224
|
+
export default Bullet;
|
package/components/{ButtomGroup/ButtomGroup.stories.jsx → ButtonGroup/ButtonGroup.stories.jsx}
RENAMED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
-
import { View, StyleSheet, Text } from 'react-native';
|
|
3
|
-
import
|
|
2
|
+
import { View, StyleSheet, Text, ScrollView } from 'react-native';
|
|
3
|
+
import ButtonGroup from './index';
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: 'Atom/
|
|
7
|
-
component:
|
|
6
|
+
title: 'Atom/ButtonGroup',
|
|
7
|
+
component: ButtonGroup,
|
|
8
8
|
render: (props) => (
|
|
9
9
|
<View style={styles.page}>
|
|
10
10
|
<View style={styles.card}>
|
|
11
|
-
<
|
|
11
|
+
<ButtonGroup {...props}>
|
|
12
|
+
{(props.items || []).map((it) => (
|
|
13
|
+
<ButtonGroup.Item key={it.id} {...it} />
|
|
14
|
+
))}
|
|
15
|
+
</ButtonGroup>
|
|
12
16
|
</View>
|
|
13
17
|
</View>
|
|
14
18
|
),
|
|
@@ -26,7 +30,7 @@ const meta = {
|
|
|
26
30
|
argTypes: {
|
|
27
31
|
items: {
|
|
28
32
|
control: { type: 'object' },
|
|
29
|
-
description: 'Lista de botões (id/label/disabled/onPress)',
|
|
33
|
+
description: 'Lista de botões (id/label/disabled/onPress) - Apenas para uso no Storybook, na prática use <ButtonGroup.Item />',
|
|
30
34
|
},
|
|
31
35
|
multiple: {
|
|
32
36
|
control: 'boolean',
|
|
@@ -42,7 +46,7 @@ const meta = {
|
|
|
42
46
|
},
|
|
43
47
|
onItemPress: {
|
|
44
48
|
action: 'itemPressed',
|
|
45
|
-
description: 'Callback por item (recebe
|
|
49
|
+
description: 'Callback por item (recebe id, nextSelected, selectedIds e itemData)',
|
|
46
50
|
},
|
|
47
51
|
variant: {
|
|
48
52
|
control: { type: 'select', options: ['default', 'card'] },
|
|
@@ -135,12 +139,15 @@ export const InteractionArea = {
|
|
|
135
139
|
return (
|
|
136
140
|
<View style={styles.page}>
|
|
137
141
|
<View style={styles.cardLarge}>
|
|
138
|
-
<
|
|
142
|
+
<ButtonGroup
|
|
139
143
|
{...args}
|
|
140
|
-
items={items}
|
|
141
144
|
value={value}
|
|
142
145
|
onChange={(ids) => setValue(ids)}
|
|
143
|
-
|
|
146
|
+
>
|
|
147
|
+
{items.map((it) => (
|
|
148
|
+
<ButtonGroup.Item key={it.id} {...it} />
|
|
149
|
+
))}
|
|
150
|
+
</ButtonGroup>
|
|
144
151
|
</View>
|
|
145
152
|
</View>
|
|
146
153
|
);
|
|
@@ -151,7 +158,7 @@ export const InteractionArea = {
|
|
|
151
158
|
|
|
152
159
|
export const AllCardVariants = {
|
|
153
160
|
render: () => (
|
|
154
|
-
<
|
|
161
|
+
<ScrollView style={styles.page} contentContainerStyle={{ paddingBottom: 40 }}>
|
|
155
162
|
<View style={[styles.cardLarge, { gap: 32 }]}>
|
|
156
163
|
{/* ===== CORES ===== */}
|
|
157
164
|
<Text style={styles.sectionTitle}>Cores</Text>
|
|
@@ -159,40 +166,44 @@ export const AllCardVariants = {
|
|
|
159
166
|
<View style={styles.row}>
|
|
160
167
|
<View style={styles.col}>
|
|
161
168
|
<Text style={styles.variantLabel}>Gray</Text>
|
|
162
|
-
<
|
|
169
|
+
<ButtonGroup
|
|
163
170
|
variant="card"
|
|
164
171
|
cardVariant="gray"
|
|
165
|
-
|
|
166
|
-
|
|
172
|
+
>
|
|
173
|
+
<ButtonGroup.Item id="1" title="+123,45" label="Label" />
|
|
174
|
+
</ButtonGroup>
|
|
167
175
|
</View>
|
|
168
176
|
<View style={styles.col}>
|
|
169
177
|
<Text style={styles.variantLabel}>Gray - Pressed</Text>
|
|
170
|
-
<
|
|
178
|
+
<ButtonGroup
|
|
171
179
|
variant="card"
|
|
172
180
|
cardVariant="gray"
|
|
173
|
-
items={[{ id: '2', title: '+123,45', label: 'Label' }]}
|
|
174
181
|
itemStyle={{ backgroundColor: '#E2E9FC' }}
|
|
175
|
-
|
|
182
|
+
>
|
|
183
|
+
<ButtonGroup.Item id="2" title="+123,45" label="Label" />
|
|
184
|
+
</ButtonGroup>
|
|
176
185
|
</View>
|
|
177
186
|
</View>
|
|
178
187
|
|
|
179
188
|
<View style={styles.row}>
|
|
180
189
|
<View style={styles.col}>
|
|
181
190
|
<Text style={styles.variantLabel}>Green</Text>
|
|
182
|
-
<
|
|
191
|
+
<ButtonGroup
|
|
183
192
|
variant="card"
|
|
184
193
|
cardVariant="green"
|
|
185
|
-
|
|
186
|
-
|
|
194
|
+
>
|
|
195
|
+
<ButtonGroup.Item id="3" title="+123,45" label="Label" />
|
|
196
|
+
</ButtonGroup>
|
|
187
197
|
</View>
|
|
188
198
|
<View style={styles.col}>
|
|
189
199
|
<Text style={styles.variantLabel}>Green - Pressed</Text>
|
|
190
|
-
<
|
|
200
|
+
<ButtonGroup
|
|
191
201
|
variant="card"
|
|
192
202
|
cardVariant="green"
|
|
193
|
-
items={[{ id: '4', title: '+123,45', label: 'Label' }]}
|
|
194
203
|
itemStyle={{ backgroundColor: '#D1E575' }}
|
|
195
|
-
|
|
204
|
+
>
|
|
205
|
+
<ButtonGroup.Item id="4" title="+123,45" label="Label" />
|
|
206
|
+
</ButtonGroup>
|
|
196
207
|
</View>
|
|
197
208
|
</View>
|
|
198
209
|
|
|
@@ -202,46 +213,73 @@ export const AllCardVariants = {
|
|
|
202
213
|
<View style={styles.row}>
|
|
203
214
|
<View style={styles.col}>
|
|
204
215
|
<Text style={styles.variantLabel}>metric</Text>
|
|
205
|
-
<
|
|
216
|
+
<ButtonGroup
|
|
206
217
|
variant="card"
|
|
207
218
|
cardVariant="gray"
|
|
208
219
|
cardLayout="metric"
|
|
209
|
-
|
|
210
|
-
|
|
220
|
+
>
|
|
221
|
+
<ButtonGroup.Item id="5" title="+1.790" label="municípios atendidos" />
|
|
222
|
+
</ButtonGroup>
|
|
211
223
|
</View>
|
|
212
224
|
<View style={styles.col}>
|
|
213
225
|
<Text style={styles.variantLabel}>center</Text>
|
|
214
|
-
<
|
|
226
|
+
<ButtonGroup
|
|
215
227
|
variant="card"
|
|
216
228
|
cardVariant="gray"
|
|
217
229
|
cardLayout="center"
|
|
218
|
-
|
|
219
|
-
|
|
230
|
+
>
|
|
231
|
+
<ButtonGroup.Item id="6" title="R$ 1.234,89" label="Novembro 2025" />
|
|
232
|
+
</ButtonGroup>
|
|
220
233
|
</View>
|
|
221
234
|
</View>
|
|
222
235
|
|
|
223
236
|
<View style={styles.row}>
|
|
224
237
|
<View style={styles.col}>
|
|
225
238
|
<Text style={styles.variantLabel}>left</Text>
|
|
226
|
-
<
|
|
239
|
+
<ButtonGroup
|
|
227
240
|
variant="card"
|
|
228
241
|
cardVariant="gray"
|
|
229
242
|
cardLayout="left"
|
|
230
|
-
|
|
231
|
-
|
|
243
|
+
>
|
|
244
|
+
<ButtonGroup.Item id="7" title="R$ 1.234,89" label="Nov/2025" />
|
|
245
|
+
</ButtonGroup>
|
|
232
246
|
</View>
|
|
233
247
|
<View style={styles.col}>
|
|
234
|
-
<Text style={styles.variantLabel}>auto</Text>
|
|
235
|
-
<
|
|
248
|
+
{/* <Text style={styles.variantLabel}>auto</Text>
|
|
249
|
+
<ButtonGroup
|
|
236
250
|
variant="card"
|
|
237
251
|
cardVariant="gray"
|
|
238
252
|
cardLayout="auto"
|
|
239
|
-
|
|
240
|
-
|
|
253
|
+
>
|
|
254
|
+
<ButtonGroup.Item id="8" title="R$ 1.234,89" label="Nov/2025" />
|
|
255
|
+
</ButtonGroup> */}
|
|
256
|
+
</View>
|
|
257
|
+
</View>
|
|
258
|
+
|
|
259
|
+
{/* ===== COM ÍCONE ===== */}
|
|
260
|
+
<Text style={styles.sectionTitle}>Com Ícone</Text>
|
|
261
|
+
<View style={styles.row}>
|
|
262
|
+
<View style={styles.col}>
|
|
263
|
+
<Text style={styles.variantLabel}>Ícone Customizado</Text>
|
|
264
|
+
<ButtonGroup
|
|
265
|
+
variant="card"
|
|
266
|
+
cardVariant="gray"
|
|
267
|
+
>
|
|
268
|
+
<ButtonGroup.Item id="9" iconName="star-line" title="9.876.543" label="Label" />
|
|
269
|
+
</ButtonGroup>
|
|
270
|
+
</View>
|
|
271
|
+
<View style={styles.col}>
|
|
272
|
+
<Text style={styles.variantLabel}>Com Cor de Destaque</Text>
|
|
273
|
+
<ButtonGroup
|
|
274
|
+
variant="card"
|
|
275
|
+
cardVariant="green"
|
|
276
|
+
>
|
|
277
|
+
<ButtonGroup.Item id="10" iconName="star-line" title="9.876.543" label="Label" />
|
|
278
|
+
</ButtonGroup>
|
|
241
279
|
</View>
|
|
242
280
|
</View>
|
|
243
281
|
</View>
|
|
244
|
-
</
|
|
282
|
+
</ScrollView>
|
|
245
283
|
),
|
|
246
284
|
};
|
|
247
285
|
|
|
@@ -249,50 +287,54 @@ export const AllCardVariants = {
|
|
|
249
287
|
|
|
250
288
|
export const StructuralVariants = {
|
|
251
289
|
render: () => (
|
|
252
|
-
<
|
|
290
|
+
<ScrollView style={styles.page} contentContainerStyle={{ paddingBottom: 40 }}>
|
|
253
291
|
<View style={[styles.cardLarge, { gap: 24 }]}>
|
|
254
292
|
{/* Metric - centralizado para métricas, big numbers, KPIs */}
|
|
255
293
|
<View>
|
|
256
294
|
<Text style={styles.variantLabel}>metric (para métricas, big numbers, KPIs)</Text>
|
|
257
|
-
<
|
|
295
|
+
<ButtonGroup
|
|
258
296
|
variant="card"
|
|
259
297
|
cardVariant="gray"
|
|
260
298
|
cardLayout="metric"
|
|
261
|
-
|
|
262
|
-
|
|
299
|
+
>
|
|
300
|
+
<ButtonGroup.Item id="1" title="+1.790" label="municípios atendidos" />
|
|
301
|
+
</ButtonGroup>
|
|
263
302
|
</View>
|
|
264
303
|
{/* Center - centralizado */}
|
|
265
304
|
<View>
|
|
266
305
|
<Text style={styles.variantLabel}>center (centralizado)</Text>
|
|
267
|
-
<
|
|
306
|
+
<ButtonGroup
|
|
268
307
|
variant="card"
|
|
269
308
|
cardVariant="gray"
|
|
270
309
|
cardLayout="center"
|
|
271
|
-
|
|
272
|
-
|
|
310
|
+
>
|
|
311
|
+
<ButtonGroup.Item id="2" title="R$ 1.234,89" label="Novembro 2025" />
|
|
312
|
+
</ButtonGroup>
|
|
273
313
|
</View>
|
|
274
314
|
{/* Left - alinhado à esquerda */}
|
|
275
315
|
<View>
|
|
276
316
|
<Text style={styles.variantLabel}>left (alinhado à esquerda)</Text>
|
|
277
|
-
<
|
|
317
|
+
<ButtonGroup
|
|
278
318
|
variant="card"
|
|
279
319
|
cardVariant="gray"
|
|
280
320
|
cardLayout="left"
|
|
281
|
-
|
|
282
|
-
|
|
321
|
+
>
|
|
322
|
+
<ButtonGroup.Item id="3" title="R$ 1.234,89" label="Nov/2025" />
|
|
323
|
+
</ButtonGroup>
|
|
283
324
|
</View>
|
|
284
325
|
{/* Auto - título esquerda, label direita */}
|
|
285
326
|
<View>
|
|
286
327
|
<Text style={styles.variantLabel}>auto (título esquerda, label direita)</Text>
|
|
287
|
-
<
|
|
328
|
+
<ButtonGroup
|
|
288
329
|
variant="card"
|
|
289
330
|
cardVariant="gray"
|
|
290
331
|
cardLayout="auto"
|
|
291
|
-
|
|
292
|
-
|
|
332
|
+
>
|
|
333
|
+
<ButtonGroup.Item id="4" title="R$ 1.234,89" label="Nov/2025" />
|
|
334
|
+
</ButtonGroup>
|
|
293
335
|
</View>
|
|
294
336
|
</View>
|
|
295
|
-
</
|
|
337
|
+
</ScrollView>
|
|
296
338
|
),
|
|
297
339
|
};
|
|
298
340
|
|