vpt-sebraeds 0.0.75 → 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/{ButtomGroup/ButtomGroup.stories.jsx → ButtonGroup/ButtonGroup.stories.jsx} +93 -51
- package/components/ButtonGroup/index.tsx +439 -0
- package/components/Card/Card.stories.jsx +296 -296
- package/components/Card/index.jsx +190 -190
- 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/NotificationDialog/NotificationDialog.stories.jsx +36 -1
- package/components/NotificationDialog/README.md +29 -4
- package/components/NotificationDialog/index.jsx +89 -2
- package/components/SEIcon/CustomIcon/boletoDasMei.jsx +1 -1
- package/components/SEIcon/CustomIcon/calculadoraPrecoIdeal.jsx +1 -1
- package/components/SEIcon/CustomIcon/calculadoraValuation.jsx +1 -1
- package/components/SEIcon/CustomIcon/capacidadePagamento.jsx +1 -1
- package/components/SEIcon/CustomIcon/capitalGiro.jsx +1 -1
- package/components/SEIcon/CustomIcon/catalogoFornecedores.jsx +1 -1
- package/components/SEIcon/CustomIcon/creditoPermutas.jsx +1 -1
- package/components/SEIcon/CustomIcon/dataValidadeEpi.jsx +1 -1
- package/components/SEIcon/CustomIcon/diagnosticoEstrategico.jsx +1 -1
- package/components/SEIcon/CustomIcon/dominandoRedesSociais.jsx +1 -1
- package/components/SEIcon/CustomIcon/empresaGoogle.jsx +1 -1
- package/components/SEIcon/CustomIcon/fluxoCaixa.jsx +1 -1
- package/components/SEIcon/CustomIcon/fornecedoresTi.jsx +1 -1
- package/components/SEIcon/CustomIcon/geradoresIdeiasIA.jsx +1 -1
- package/components/SEIcon/CustomIcon/gestaoAgendamento.jsx +1 -1
- package/components/SEIcon/CustomIcon/impostoMei.jsx +1 -1
- package/components/SEIcon/CustomIcon/indicadoresMercado.jsx +1 -1
- package/components/SEIcon/CustomIcon/listaEpi.jsx +1 -1
- package/components/SEIcon/CustomIcon/lucroPotencial.jsx +1 -1
- package/components/SEIcon/CustomIcon/melhoresRegioesComerciais.jsx +1 -1
- package/components/SEIcon/CustomIcon/ncmComCodigoDeBarras.jsx +1 -1
- package/components/SEIcon/CustomIcon/postsInteligentes.jsx +1 -1
- package/components/SEIcon/CustomIcon/sebraeConecta.jsx +1 -1
- package/components/SEIcon/CustomIcon/segurancaTrabalho.jsx +1 -1
- package/components/SEIcon/CustomIcon/simuladorEmprestimo.jsx +1 -1
- package/components/Toast/Toast.stories.jsx +232 -156
- package/components/Toast/index.jsx +201 -123
- 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/Card/index.js +12 -12
- 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/Header/components/Context.d.ts +7 -7
- package/dist/components/Header/components/Context.js +19 -19
- package/dist/components/Header/components/Information.d.ts +6 -6
- package/dist/components/Header/components/Information.js +58 -58
- package/dist/components/Header/components/Shortcut.d.ts +5 -5
- package/dist/components/Header/components/Shortcut.js +25 -25
- package/dist/components/Header/components/SwitchAccount.d.ts +8 -8
- package/dist/components/Header/components/SwitchAccount.js +138 -138
- package/dist/components/Header/components/Variants.d.ts +22 -22
- package/dist/components/Header/components/Variants.js +288 -288
- package/dist/components/Header/components/index.d.ts +33 -33
- package/dist/components/Header/components/index.js +10 -10
- 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/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/Search/Search.d.ts +14 -14
- package/dist/components/Search/Search.js +227 -227
- 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/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
- package/components/ButtomGroup/index.tsx +0 -398
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
|
|