vpt-sebraeds 0.0.90 → 0.0.92

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.
Files changed (209) hide show
  1. package/README.md +119 -3
  2. package/components/Accordion/Accordion.stories.jsx +1 -1
  3. package/components/Accordion/index.jsx +34 -35
  4. package/components/Avatar/index.jsx +1 -1
  5. package/components/BottomSheet/BottomSheet.jsx +1 -1
  6. package/components/BottomSheet/BottomSheet.stories.jsx +1 -2
  7. package/components/Bullet/index.jsx +1 -1
  8. package/components/Button/index.jsx +68 -5
  9. package/components/ButtonGroup/index.tsx +1 -1
  10. package/components/CNAESelectItem/index.jsx +1 -1
  11. package/components/Checkbox/index.jsx +1 -1
  12. package/components/EventListItem/index.tsx +1 -1
  13. package/components/ExpandableNumberDisplay/index.tsx +1 -1
  14. package/components/FilterTag/index.jsx +1 -1
  15. package/components/FilterableMultiSelect/index.jsx +1 -1
  16. package/components/FilterableUniSelect/index.jsx +1 -1
  17. package/components/GeneralInformationCard/index.tsx +1 -1
  18. package/components/Header/v1/components/SwitchAccount.jsx +1 -1
  19. package/components/Header/v1/components/Variants.jsx +1 -1
  20. package/components/Header/v2/parts/Hero.jsx +1 -1
  21. package/components/Header/v2/parts/SwitchAccount.jsx +1 -1
  22. package/components/Header/v2/parts/Variants.jsx +1 -1
  23. package/components/Input/InputUnderline.tsx +31 -35
  24. package/components/Input/index.jsx +76 -52
  25. package/components/Link/index.jsx +1 -1
  26. package/components/MiniEventCard/index.jsx +1 -1
  27. package/components/NavigationItem/index.tsx +1 -1
  28. package/components/NotificationDialog/index.jsx +27 -27
  29. package/components/ProgressChart/index.jsx +1 -1
  30. package/components/RangeSlider/index.tsx +1 -1
  31. package/components/Search/index.jsx +1 -1
  32. package/components/Select/index.jsx +1 -1
  33. package/components/SelectableOption/SelectableOption.stories.jsx +139 -139
  34. package/components/SelectableOption/index.jsx +261 -261
  35. package/components/Shortcut/index.jsx +1 -1
  36. package/components/ShuffleItem/index.jsx +1 -1
  37. package/components/StackedBar/StackedBar.stories.jsx +122 -122
  38. package/components/StackedBar/index.jsx +241 -241
  39. package/components/Table/index.jsx +2 -2
  40. package/components/TaggedInputText/index.jsx +1 -1
  41. package/components/TaskCard/index.jsx +1 -1
  42. package/components/Templates/Loading/Icons/index.jsx +76 -0
  43. package/components/Templates/Loading/Loading.stories.jsx +200 -0
  44. package/components/Templates/Loading/README.md +41 -0
  45. package/components/Templates/Loading/assets/almost-there.svg +111 -0
  46. package/components/Templates/Loading/assets/something-wrong.svg +55 -0
  47. package/components/Templates/Loading/context/index.jsx +24 -0
  48. package/components/Templates/Loading/index.jsx +540 -0
  49. package/components/Templates/StatusFeedback/Icons/index.jsx +119 -0
  50. package/components/Templates/StatusFeedback/README.md +33 -0
  51. package/components/Templates/StatusFeedback/StatusFeedback.stories.jsx +96 -0
  52. package/components/Templates/StatusFeedback/assets/action-success.svg +22 -0
  53. package/components/Templates/StatusFeedback/assets/action-unsuccess.svg +26 -0
  54. package/components/Templates/StatusFeedback/assets/not-found.svg +18 -0
  55. package/components/Templates/StatusFeedback/context/index.jsx +26 -0
  56. package/components/Templates/StatusFeedback/index.jsx +377 -0
  57. package/components/Tools/NavigationButton/NavigationButton.stories.jsx +1 -1
  58. package/components/Tools/NavigationButton/index.jsx +1 -1
  59. package/components/Tools/SearchResult/index.jsx +1 -1
  60. package/components/TooltipCard/index.jsx +1 -1
  61. package/components/Typography/RichText/index.d.ts +2 -0
  62. package/components/Typography/RichText/index.js +8 -0
  63. package/components/{SEText → Typography/SEText}/index.d.ts +6 -2
  64. package/components/Typography/SEText/index.js +248 -0
  65. package/components/Typography/SEText/styles.js +38 -0
  66. package/components/Typography/Typography.stories.jsx +28 -203
  67. package/components/Typography/index.jsx +5 -133
  68. package/components/styles/fonts.js +10 -8
  69. package/components/styles/index,js +32 -2
  70. package/components/styles/tokens/borders.ts +13 -0
  71. package/components/styles/tokens/colors.ts +81 -0
  72. package/components/styles/tokens/elevations.ts +49 -0
  73. package/components/styles/tokens/index.ts +47 -0
  74. package/components/styles/tokens/opacity.ts +11 -0
  75. package/components/styles/tokens/palette.ts +86 -0
  76. package/components/styles/tokens/radius.ts +12 -0
  77. package/components/styles/tokens/spacing.ts +25 -0
  78. package/components/styles/tokens/surfaces.ts +28 -0
  79. package/components/styles/tokens/typography.ts +282 -0
  80. package/components/styles/tokens.ts +13 -217
  81. package/components/utils/fontFamily.js +6 -3
  82. package/dist/components/Accordion/index.d.ts +1 -1
  83. package/dist/components/Accordion/index.js +34 -35
  84. package/dist/components/Avatar/index.js +1 -1
  85. package/dist/components/BottomSheet/BottomSheet.js +1 -1
  86. package/dist/components/Bullet/index.js +1 -1
  87. package/dist/components/Button/index.d.ts +12 -1
  88. package/dist/components/Button/index.d.ts.map +1 -1
  89. package/dist/components/Button/index.js +46 -6
  90. package/dist/components/ButtonGroup/index.js +1 -1
  91. package/dist/components/CNAESelectItem/index.js +1 -1
  92. package/dist/components/Checkbox/index.js +1 -1
  93. package/dist/components/EventListItem/index.js +1 -1
  94. package/dist/components/ExpandableNumberDisplay/index.js +1 -1
  95. package/dist/components/FilterTag/index.js +1 -1
  96. package/dist/components/FilterableMultiSelect/index.js +1 -1
  97. package/dist/components/FilterableUniSelect/index.js +1 -1
  98. package/dist/components/GeneralInformationCard/index.js +1 -1
  99. package/dist/components/Header/v1/components/SwitchAccount.js +1 -1
  100. package/dist/components/Header/v1/components/Variants.js +1 -1
  101. package/dist/components/Header/v2/parts/Hero.js +1 -1
  102. package/dist/components/Header/v2/parts/SwitchAccount.js +1 -1
  103. package/dist/components/Header/v2/parts/Variants.js +1 -1
  104. package/dist/components/Input/InputUnderline.d.ts.map +1 -1
  105. package/dist/components/Input/InputUnderline.js +31 -35
  106. package/dist/components/Input/index.d.ts.map +1 -1
  107. package/dist/components/Input/index.js +73 -50
  108. package/dist/components/Link/index.js +1 -1
  109. package/dist/components/MiniEventCard/index.js +1 -1
  110. package/dist/components/NavigationItem/index.js +1 -1
  111. package/dist/components/NotificationDialog/index.js +27 -27
  112. package/dist/components/ProgressChart/index.js +1 -1
  113. package/dist/components/RangeSlider/index.js +1 -1
  114. package/dist/components/SEText/index.d.ts +1 -1
  115. package/dist/components/SEText/index.d.ts.map +1 -1
  116. package/dist/components/SEText/index.js +24 -39
  117. package/dist/components/SEText/styles.d.ts +236 -266
  118. package/dist/components/SEText/styles.js +11 -329
  119. package/dist/components/Search/index.js +1 -1
  120. package/dist/components/Select/index.js +1 -1
  121. package/dist/components/SelectableOption/index.js +17 -17
  122. package/dist/components/Shortcut/index.js +1 -1
  123. package/dist/components/ShuffleItem/index.js +1 -1
  124. package/dist/components/StackedBar/index.js +23 -23
  125. package/dist/components/Table/index.js +2 -2
  126. package/dist/components/TaggedInputText/index.js +1 -1
  127. package/dist/components/TaskCard/index.js +1 -1
  128. package/dist/components/Templates/Loading/Icons/index.d.ts +12 -0
  129. package/dist/components/Templates/Loading/Icons/index.d.ts.map +1 -0
  130. package/dist/components/Templates/Loading/Icons/index.js +61 -0
  131. package/dist/components/Templates/Loading/assets/almost-there.svg +111 -0
  132. package/dist/components/Templates/Loading/assets/something-wrong.svg +55 -0
  133. package/dist/components/Templates/Loading/context/index.d.ts +9 -0
  134. package/dist/components/Templates/Loading/context/index.d.ts.map +1 -0
  135. package/dist/components/Templates/Loading/context/index.js +16 -0
  136. package/dist/components/Templates/Loading/index.d.ts +141 -0
  137. package/dist/components/Templates/Loading/index.d.ts.map +1 -0
  138. package/dist/components/Templates/Loading/index.js +316 -0
  139. package/dist/components/Templates/StatusFeedback/Icons/index.d.ts +21 -0
  140. package/dist/components/Templates/StatusFeedback/Icons/index.d.ts.map +1 -0
  141. package/dist/components/Templates/StatusFeedback/Icons/index.js +85 -0
  142. package/dist/components/Templates/StatusFeedback/assets/action-success.svg +22 -0
  143. package/dist/components/Templates/StatusFeedback/assets/action-unsuccess.svg +26 -0
  144. package/dist/components/Templates/StatusFeedback/assets/not-found.svg +18 -0
  145. package/dist/components/Templates/StatusFeedback/context/index.d.ts +9 -0
  146. package/dist/components/Templates/StatusFeedback/context/index.d.ts.map +1 -0
  147. package/dist/components/Templates/StatusFeedback/context/index.js +16 -0
  148. package/dist/components/Templates/StatusFeedback/index.d.ts +102 -0
  149. package/dist/components/Templates/StatusFeedback/index.d.ts.map +1 -0
  150. package/dist/components/Templates/StatusFeedback/index.js +230 -0
  151. package/dist/components/Tools/NavigationButton/index.js +1 -1
  152. package/dist/components/Tools/SearchResult/index.js +1 -1
  153. package/dist/components/TooltipCard/index.js +1 -1
  154. package/dist/components/Typography/RichText/index.d.ts +4 -0
  155. package/dist/components/Typography/RichText/index.d.ts.map +1 -0
  156. package/dist/components/Typography/RichText/index.js +6 -0
  157. package/dist/components/Typography/SEText/index.d.ts +60 -0
  158. package/dist/components/Typography/SEText/index.d.ts.map +1 -0
  159. package/dist/components/Typography/SEText/index.js +172 -0
  160. package/dist/components/Typography/SEText/styles.d.ts +442 -0
  161. package/dist/components/Typography/SEText/styles.d.ts.map +1 -0
  162. package/dist/components/Typography/SEText/styles.js +36 -0
  163. package/dist/components/Typography/index.d.ts +6 -13
  164. package/dist/components/Typography/index.d.ts.map +1 -1
  165. package/dist/components/Typography/index.js +5 -114
  166. package/dist/components/styles/fonts.d.ts +8 -8
  167. package/dist/components/styles/fonts.js +9 -8
  168. package/dist/components/styles/tokens/borders.d.ts +14 -0
  169. package/dist/components/styles/tokens/borders.d.ts.map +1 -0
  170. package/dist/components/styles/tokens/borders.js +13 -0
  171. package/dist/components/styles/tokens/colors.d.ts +78 -0
  172. package/dist/components/styles/tokens/colors.d.ts.map +1 -0
  173. package/dist/components/styles/tokens/colors.js +79 -0
  174. package/dist/components/styles/tokens/elevations.d.ts +127 -0
  175. package/dist/components/styles/tokens/elevations.d.ts.map +1 -0
  176. package/dist/components/styles/tokens/elevations.js +47 -0
  177. package/dist/components/styles/tokens/index.d.ts +842 -0
  178. package/dist/components/styles/tokens/index.d.ts.map +1 -0
  179. package/dist/components/styles/tokens/index.js +28 -0
  180. package/dist/components/styles/tokens/opacity.d.ts +12 -0
  181. package/dist/components/styles/tokens/opacity.d.ts.map +1 -0
  182. package/dist/components/styles/tokens/opacity.js +11 -0
  183. package/dist/components/styles/tokens/palette.d.ts +86 -0
  184. package/dist/components/styles/tokens/palette.d.ts.map +1 -0
  185. package/dist/components/styles/tokens/palette.js +85 -0
  186. package/dist/components/styles/tokens/radius.d.ts +21 -0
  187. package/dist/components/styles/tokens/radius.d.ts.map +1 -0
  188. package/dist/components/styles/tokens/radius.js +11 -0
  189. package/dist/components/styles/tokens/spacing.d.ts +25 -0
  190. package/dist/components/styles/tokens/spacing.d.ts.map +1 -0
  191. package/dist/components/styles/tokens/spacing.js +24 -0
  192. package/dist/components/styles/tokens/surfaces.d.ts +27 -0
  193. package/dist/components/styles/tokens/surfaces.d.ts.map +1 -0
  194. package/dist/components/styles/tokens/surfaces.js +27 -0
  195. package/dist/components/styles/tokens/typography.d.ts +456 -0
  196. package/dist/components/styles/tokens/typography.d.ts.map +1 -0
  197. package/dist/components/styles/tokens/typography.js +259 -0
  198. package/dist/components/styles/tokens.d.ts +1 -259
  199. package/dist/components/styles/tokens.d.ts.map +1 -1
  200. package/dist/components/styles/tokens.js +1 -213
  201. package/dist/components/utils/fontFamily.d.ts +3 -0
  202. package/dist/components/utils/fontFamily.js +6 -3
  203. package/dist/src/index.d.ts +5 -1
  204. package/dist/src/index.d.ts.map +1 -1
  205. package/dist/src/index.js +5 -1
  206. package/package.json +1 -1
  207. package/src/index.ts +19 -1
  208. package/components/SEText/index.js +0 -171
  209. package/components/SEText/styles.js +0 -348
package/README.md CHANGED
@@ -14,6 +14,22 @@
14
14
 
15
15
  Este é o repositório do Design System em React Native desenvolvido para o projeto Sebrae Na Palma da Mão. O objetivo é fornecer uma biblioteca de componentes reutilizáveis que seguem os padrões visuais e de interação do Sebrae, garantindo consistência e eficiência no desenvolvimento do aplicativo principal.
16
16
 
17
+ ## 🧭 Princípios do Design System
18
+
19
+ - **Composition Pattern**: componentes devem priorizar composição sobre herança, com subcomponentes acessados via `Parent.Child` quando fizer sentido.
20
+ - **Tokenização obrigatória**: cores, tipografia, surfaces, bordas, elevações e demais aspectos visuais devem nascer em `components/styles/tokens/`.
21
+ - **Sem hardcodes visuais estruturais**: componentes não devem declarar diretamente `color`, `backgroundColor`, `borderColor`, `fontFamily`, `fontSize`, `fontWeight`, `shadow*` ou `elevation` fora do sistema de tokens.
22
+ - **Tipografia centralizada**: a família atual é Nunito, com adaptação entre iOS e Android encapsulada no domínio de tipografia do Design System.
23
+
24
+ Referências diretas:
25
+
26
+ - Tokens por aspecto: [components/styles/tokens/](file:///Users/tegra/sebrae/storybook/dev/components/styles/tokens)
27
+ - Entry point compatível: [components/styles/tokens.ts](file:///Users/tegra/sebrae/storybook/dev/components/styles/tokens.ts)
28
+ - Tipografia centralizada: [typography.ts](file:///Users/tegra/sebrae/storybook/dev/components/styles/tokens/typography.ts)
29
+ - Texto padronizado: [RichText/index.js](file:///Users/tegra/sebrae/storybook/dev/components/RichText/index.js)
30
+ - Base compatível de tipografia: [SEText/index.js](file:///Users/tegra/sebrae/storybook/dev/components/SEText/index.js)
31
+ - Regras do projeto: [AGENTS.md](file:///Users/tegra/sebrae/storybook/dev/AGENTS.md)
32
+
17
33
  ## ✅ Requisitos
18
34
 
19
35
  - Node.js >= 18 ([package.json](file:///Users/tegra/sebrae/storybook/dev/package.json#L107-L109))
@@ -35,10 +51,17 @@ npm install
35
51
  - Histórias em `*.stories.(jsx|tsx)` ao lado de cada componente
36
52
  - Veja a lista completa em [components/](file:///Users/tegra/sebrae/storybook/dev/components) ou rode o Storybook
37
53
 
54
+ Padrão de construção esperado:
55
+
56
+ - Componentes novos devem seguir composição e contexto quando houver partes acopladas semanticamente.
57
+ - Tipografia deve ser aplicada com `RichText`, `SEText` compatível ou via `tokens.textStyles`/`tokens.typography`.
58
+ - Estilos estáticos devem usar `StyleSheet.create` e tokens semânticos.
59
+
38
60
  Exemplos de componentes:
39
61
 
40
62
  - Accordion, Button, Checkbox, FilterTag, Input, Modal, Navbar, Pagination,
41
- Datepicker, Dropdown, Card, Toast, Typography, SEIcon, SEText, e muitos outros.
63
+ Datepicker, Dropdown, Card, Toast, Typography, SEIcon, RichText, SEText,
64
+ e muitos outros.
42
65
 
43
66
  ## 🚀 Como Usar
44
67
 
@@ -74,6 +97,96 @@ Cada componente possui sua própria história no Storybook, permitindo visualiza
74
97
  - Nativo: `storybook:ios` e `storybook:android`
75
98
  - Web: `storybook:web` ([@storybook/react-native-web-vite](file:///Users/tegra/sebrae/storybook/dev/package.json#L80-L83))
76
99
 
100
+ As stories devem refletir o contrato real dos componentes e demonstrar:
101
+
102
+ - Uso básico
103
+ - Variações semânticas
104
+ - Estados visuais importantes
105
+ - Exemplos aderentes aos tokens do projeto
106
+
107
+ ## 🎯 Tokens e Estilo
108
+
109
+ O projeto adota um sistema central de design tokens por aspecto. A estrutura atual fica em `components/styles/tokens/` e está organizada em módulos como:
110
+
111
+ - `palette`
112
+ - `colors`
113
+ - `surfaces`
114
+ - `elevations`
115
+ - `spacing` e `space`
116
+ - `typography`
117
+ - `radius`
118
+ - `borders`
119
+ - `opacity`
120
+
121
+ ### Como consumir
122
+
123
+ Entrada principal compatível:
124
+
125
+ ```tsx
126
+ import tokens from 'vpt-sebraeds/components/styles/tokens'
127
+ ```
128
+
129
+ Uso recomendado em componentes:
130
+
131
+ ```tsx
132
+ import { StyleSheet, View } from 'react-native'
133
+ import RichText from 'vpt-sebraeds/components/RichText'
134
+ import tokens from 'vpt-sebraeds/components/styles/tokens'
135
+
136
+ const styles = StyleSheet.create({
137
+ card: {
138
+ backgroundColor: tokens.colors.surface.default,
139
+ borderColor: tokens.colors.border.default,
140
+ borderRadius: tokens.radius.sm,
141
+ borderWidth: tokens.borders.width.thin,
142
+ padding: tokens.space.md,
143
+ ...tokens.elevations[1],
144
+ },
145
+ })
146
+
147
+ export function ExemploTokenizado() {
148
+ return (
149
+ <View style={styles.card}>
150
+ <RichText type="ns-heading-5">Título</RichText>
151
+ <RichText type="ns-sm-body" color={tokens.colors.text.secondary}>
152
+ Conteúdo seguindo os tokens do projeto
153
+ </RichText>
154
+ </View>
155
+ )
156
+ }
157
+ ```
158
+
159
+ ### Regras importantes
160
+
161
+ - Componentes devem consumir tokens semânticos, não `palette`.
162
+ - Se um valor visual ainda não existir, ele deve ser adicionado primeiro em `components/styles/tokens/`.
163
+ - A diferença tipográfica entre iOS e Android já está encapsulada em `tokens/typography.ts`.
164
+ - `colors.js`, `fonts.js` e utilitários antigos existem apenas como camadas de compatibilidade durante a migração.
165
+
166
+ ## 🧩 Composition Pattern
167
+
168
+ O padrão preferencial para novos componentes é composição. Quando um componente possui partes relacionadas entre si, ele deve expor subcomponentes e, se necessário, compartilhar configuração via Context.
169
+
170
+ Exemplo conceitual:
171
+
172
+ ```tsx
173
+ <Card>
174
+ <Card.Header>
175
+ <RichText type="ns-heading-5">Título</RichText>
176
+ </Card.Header>
177
+ <Card.Body>
178
+ <RichText type="ns-sm-body">Conteúdo</RichText>
179
+ </Card.Body>
180
+ </Card>
181
+ ```
182
+
183
+ Boas práticas:
184
+
185
+ - Expor partes via `Parent.Child`, e não como exports avulsos.
186
+ - Compartilhar estilos/configuração por Context quando isso reduzir acoplamento.
187
+ - Compor estilos na ordem `[baseStyle, contextStyle, propStyle]`.
188
+ - Evitar sobrecarga de props quando a composição resolve melhor a API.
189
+
77
190
  ## 🔗 Integração com o Projeto Principal
78
191
 
79
192
  Este Design System é um artefato do projeto principal [Sebrae Na Palma da Mão], um aplicativo móvel que funciona como uma agência do Sebrae na palma da mão. O aplicativo principal inclui diversas funcionalidades como:
@@ -202,6 +315,8 @@ yarn publish
202
315
  ## 🗂️ Estrutura do Projeto
203
316
 
204
317
  - `components/` – componentes e histórias
318
+ - `components/styles/tokens/` – design tokens por aspecto
319
+ - `components/styles/tokens.ts` – porta de entrada compatível para tokens
205
320
  - `src/` – ponto de entrada e exports da biblioteca
206
321
  - `assets/` – imagens, ícones e fontes
207
322
  - `.rnstorybook/` e `.storybook/` – configs de Storybook nativo e web
@@ -218,8 +333,9 @@ Antes de adicionar novos componentes ou fazer modificações:
218
333
  2. Adicione a documentação apropriada no Storybook
219
334
  3. Teste o componente em diferentes dispositivos
220
335
  4. Certifique-se de que as alterações não quebram a compatibilidade com o projeto principal
221
-
222
- 5. Mantenha o estilo de código (ESLint/Prettier) e exports em [src/index.ts](file:///Users/tegra/sebrae/storybook/dev/src/index.ts)
336
+ 5. Use tokens semânticos em vez de hardcodes visuais
337
+ 6. Adote composição quando a estrutura do componente pedir subpartes reutilizáveis
338
+ 7. Mantenha o estilo de código (ESLint/Prettier) e exports em [src/index.ts](file:///Users/tegra/sebrae/storybook/dev/src/index.ts)
223
339
  ## 📝 Licença
224
340
 
225
341
  Este projeto está sob a licença MIT.
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
3
  import Accordion from '.';
4
- import SEText from '../SEText';
4
+ import SEText from '../Typography/SEText';
5
5
 
6
6
  const meta = {
7
7
  title: 'Atom/Accordion',
@@ -2,8 +2,8 @@ import React, { useState, useRef, useEffect, useContext, createContext } from 'r
2
2
  import { View, TouchableOpacity, StyleSheet, Animated, LayoutAnimation, Platform, UIManager } from 'react-native';
3
3
  import PropTypes from 'prop-types';
4
4
  import Icon from '../Icon';
5
- import SEText from '../SEText';
6
- import colors from '../styles/colors';
5
+ import SEText from '../Typography/SEText';
6
+ import tokens from '../styles/tokens';
7
7
 
8
8
  if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
9
9
  UIManager.setLayoutAnimationEnabledExperimental(true);
@@ -77,7 +77,7 @@ const AccordionHeader = ({
77
77
  overline,
78
78
  label,
79
79
  icon,
80
- backgroundColor = '#F7F9FF',
80
+ backgroundColor = tokens.colors.surface.subtle,
81
81
  style,
82
82
  titleStyle: customTitleStyle,
83
83
  ...props
@@ -105,30 +105,30 @@ const AccordionHeader = ({
105
105
  const getIconColor = () => {
106
106
  switch (variant) {
107
107
  case 'success':
108
- return colors.GREEN_DARK; // #037A1C
108
+ return tokens.colors.feedback.success;
109
109
  case 'alert':
110
- return "#AB6005"
110
+ return tokens.palette.yellow[700];
111
111
  case 'error':
112
- return colors.RED; // #d62828
112
+ return tokens.colors.feedback.error;
113
113
  default:
114
- return colors.SE_TEXT_DARK;
114
+ return tokens.colors.text.default;
115
115
  }
116
116
  };
117
117
 
118
118
  const getIconContainerBackgroundColor = () => {
119
119
  switch (variant) {
120
120
  case 'success':
121
- return '#C2EFD1';
121
+ return tokens.palette.green[200];
122
122
  case 'alert':
123
- return '#FEEBC8';
123
+ return tokens.palette.yellow[200];
124
124
  case 'error':
125
- return '#FCD5D5';
125
+ return tokens.palette.red[200];
126
126
  default:
127
127
  return 'transparent';
128
128
  }
129
129
  };
130
130
 
131
- const getTextColor = () => "#485274";
131
+ const getTextColor = () => tokens.colors.text.secondary;
132
132
 
133
133
  const isTransparent = !backgroundColor || backgroundColor === 'transparent' ||
134
134
  backgroundColor.toLowerCase() === '#ffffff' || backgroundColor.toLowerCase() === '#fff' ||
@@ -156,7 +156,7 @@ const AccordionHeader = ({
156
156
  styles.header,
157
157
  getVariantStyles(),
158
158
  isOpen && styles.headerOpen,
159
- isTransparent && !isOpen && { borderBottomWidth: 1, borderBottomColor: '#E2E9FC', borderBottomLeftRadius: 0, borderBottomRightRadius: 0 },
159
+ isTransparent && !isOpen && { borderBottomWidth: 1, borderBottomColor: tokens.colors.border.default, borderBottomLeftRadius: 0, borderBottomRightRadius: 0 },
160
160
  style
161
161
  ]}
162
162
  onPress={toggle}
@@ -187,7 +187,7 @@ const AccordionHeader = ({
187
187
  </View>
188
188
 
189
189
  <Animated.View style={{ transform: [{ rotate: rotateArrow }] }}>
190
- <Icon name="arrow-down-s-line" size={24} color="#485274" />
190
+ <Icon name="arrow-down-s-line" size={24} color={tokens.colors.text.secondary} />
191
191
  </Animated.View>
192
192
  </TouchableOpacity>
193
193
  );
@@ -208,7 +208,7 @@ const AccordionContent = ({ children, style, backgroundColor, ...props }) => {
208
208
  styles.content,
209
209
  styles.contentOpen,
210
210
  backgroundColor && { backgroundColor },
211
- isTransparent && { borderBottomWidth: 1, borderBottomColor: '#E2E9FC', borderBottomLeftRadius: 0, borderBottomRightRadius: 0 },
211
+ isTransparent && { borderBottomWidth: 1, borderBottomColor: tokens.colors.border.default, borderBottomLeftRadius: 0, borderBottomRightRadius: 0 },
212
212
  style
213
213
  ]}
214
214
  {...props}
@@ -221,16 +221,16 @@ const AccordionContent = ({ children, style, backgroundColor, ...props }) => {
221
221
  const styles = StyleSheet.create({
222
222
  container: {
223
223
  overflow: 'hidden',
224
- marginBottom: 8,
224
+ marginBottom: tokens.space.xs,
225
225
  },
226
226
  header: {
227
227
  flexDirection: 'row',
228
228
  alignItems: 'center',
229
229
  justifyContent: 'space-between',
230
- paddingVertical: 16,
231
- paddingHorizontal: 16,
232
- borderRadius: 8,
233
- backgroundColor: '#F7F9FF', // Default
230
+ paddingVertical: tokens.space.md,
231
+ paddingHorizontal: tokens.space.md,
232
+ borderRadius: tokens.radius.sm,
233
+ backgroundColor: tokens.colors.surface.subtle,
234
234
  },
235
235
  headerOpen: {
236
236
  borderBottomLeftRadius: 0,
@@ -242,9 +242,9 @@ const styles = StyleSheet.create({
242
242
  flex: 1,
243
243
  },
244
244
  leadingIconContainer: {
245
- padding: 4,
246
- borderRadius: 20,
247
- marginRight: 12,
245
+ padding: tokens.space.xxs,
246
+ borderRadius: tokens.radius.pill,
247
+ marginRight: tokens.space.sm,
248
248
  },
249
249
  leadingIcon: {
250
250
  // marginRight: 12, // Removed
@@ -254,23 +254,22 @@ const styles = StyleSheet.create({
254
254
  justifyContent: 'center',
255
255
  },
256
256
  title: {
257
- fontFamily: 'Nunito Sans',
257
+ color: tokens.colors.text.default,
258
258
  },
259
259
  overline: {
260
- fontSize: 12,
261
- fontFamily: 'Nunito Sans',
262
- marginBottom: 4,
260
+ fontSize: tokens.typography.fontSize.xxs,
261
+ marginBottom: tokens.space.xxs,
263
262
  textTransform: 'uppercase',
264
- letterSpacing: 0.5,
263
+ letterSpacing: tokens.typography.letterSpacing.wide,
265
264
  },
266
265
  label: {
267
- fontFamily: 'Nunito Sans',
266
+ color: tokens.colors.text.default,
268
267
  },
269
268
  content: {
270
- padding: 16,
271
- backgroundColor: '#FFFFFF',
272
- borderBottomLeftRadius: 8,
273
- borderBottomRightRadius: 8,
269
+ padding: tokens.space.md,
270
+ backgroundColor: tokens.colors.surface.default,
271
+ borderBottomLeftRadius: tokens.radius.sm,
272
+ borderBottomRightRadius: tokens.radius.sm,
274
273
  },
275
274
  contentOpen: {
276
275
  borderTopLeftRadius: 0,
@@ -284,17 +283,17 @@ const styles = StyleSheet.create({
284
283
  // borderBottomColor: '#E2E9FC',
285
284
  // },
286
285
  headerSuccess: {
287
- backgroundColor: '#F7F9FF',
286
+ backgroundColor: tokens.colors.surface.subtle,
288
287
  height: 40,
289
288
  paddingVertical: 0,
290
289
  },
291
290
  headerAlert: {
292
- backgroundColor: '#F7F9FF',
291
+ backgroundColor: tokens.colors.surface.subtle,
293
292
  height: 40,
294
293
  paddingVertical: 0,
295
294
  },
296
295
  headerError: {
297
- backgroundColor: '#F7F9FF',
296
+ backgroundColor: tokens.colors.surface.subtle,
298
297
  height: 40,
299
298
  paddingVertical: 0,
300
299
  },
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { TouchableOpacity, Image, StyleSheet, View } from 'react-native';
3
- import SEText from '../SEText';
3
+ import SEText from '../Typography/SEText';
4
4
 
5
5
  const Avatar = ({
6
6
  size = 'medium',
@@ -11,7 +11,7 @@ import {
11
11
  } from 'react-native';
12
12
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
13
13
  import Icon from '../Icon';
14
- import SEText from '../SEText';
14
+ import SEText from '../Typography/SEText';
15
15
 
16
16
  const { height: screenHeight, width: screenWidth } = Dimensions.get('window');
17
17
 
@@ -4,7 +4,7 @@ import BottomSheet, { BottomSheetNomeEmpresa } from ".";
4
4
  import Button from "../Button";
5
5
  import { ListaDeEstados } from "./Components/ListaDeEstados";
6
6
  import ActionButtons from "./Components/ActionButtons";
7
- import SEText from "../SEText";
7
+ import SEText from "../Typography/SEText";
8
8
 
9
9
 
10
10
  const meta = {
@@ -538,4 +538,3 @@ export const AlinhadoAoCentro = {
538
538
  <BottomSheetMock showIcon={true} showSlot={true} actions="two-vertical" headerAlignment="center" />
539
539
  ),
540
540
  };
541
-
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import { View, StyleSheet } from 'react-native';
4
4
 
5
5
  import Icon from '../Icon';
6
- import SEText from '../SEText';
6
+ import SEText from '../Typography/SEText';
7
7
  import tokens from '../styles/tokens';
8
8
 
9
9
  const VARIANTS = {
@@ -1,9 +1,10 @@
1
1
  import React, { useMemo, useState } from 'react';
2
2
  import { TouchableOpacity, StyleSheet, View } from 'react-native';
3
3
  import Icon from '../Icon';
4
- import SEText from '../SEText';
4
+ import SEText from '../Typography/SEText';
5
5
 
6
6
  const Button = ({
7
+ children,
7
8
  label,
8
9
  size = 'medium',
9
10
  variant = 'filled',
@@ -16,9 +17,26 @@ const Button = ({
16
17
  iconColor,
17
18
  badge,
18
19
  testID,
20
+ style,
21
+ contentStyle,
22
+ textStyle,
23
+ backgroundColor,
24
+ borderColor,
25
+ textColor,
26
+ borderStyle,
27
+ borderWidth,
28
+ borderRadius,
29
+ contentAlignment = 'center',
19
30
  }) => {
20
31
  const [isFocused, setIsFocused] = useState(false);
21
- const iconOnly = useMemo(() => !label && iconName, [label, iconName]);
32
+ const content = children ?? label;
33
+ const hasContent = content !== undefined && content !== null && content !== false;
34
+ const shouldWrapContent = typeof content === 'string' || typeof content === 'number';
35
+ const shouldUseCustomContentLayout =
36
+ children !== undefined ||
37
+ contentAlignment !== 'center' ||
38
+ !!contentStyle;
39
+ const iconOnly = useMemo(() => !hasContent && iconName, [hasContent, iconName]);
22
40
 
23
41
  const sizeOptions = {
24
42
  large: {
@@ -123,6 +141,14 @@ const Button = ({
123
141
  // if (disabled) baseStyle.push(styles.containerDisabled);
124
142
  if (isFocused && !disabled) baseStyle.push(variantOptions[variant].focused);
125
143
 
144
+ baseStyle.push({
145
+ ...(backgroundColor ? { backgroundColor } : {}),
146
+ ...(borderColor ? { borderColor } : {}),
147
+ ...(borderStyle ? { borderStyle } : {}),
148
+ ...(borderWidth !== undefined ? { borderWidth } : {}),
149
+ ...(borderRadius !== undefined ? { borderRadius } : {}),
150
+ });
151
+
126
152
  return baseStyle;
127
153
  };
128
154
 
@@ -135,9 +161,34 @@ const Button = ({
135
161
  // Estado
136
162
  if (disabled) baseStyle.push(styles.labelDisabled);
137
163
 
164
+ if (textColor) {
165
+ baseStyle.push({ color: textColor });
166
+ }
167
+
168
+ if (textStyle) {
169
+ baseStyle.push(textStyle);
170
+ }
171
+
138
172
  return baseStyle;
139
173
  };
140
174
 
175
+ const getContentContainerStyle = () => {
176
+ const alignmentMap = {
177
+ left: 'flex-start',
178
+ center: 'center',
179
+ right: 'flex-end',
180
+ };
181
+
182
+ return [
183
+ styles.contentContainer,
184
+ shouldUseCustomContentLayout && styles.contentContainerFlexible,
185
+ shouldUseCustomContentLayout && {
186
+ justifyContent: alignmentMap[contentAlignment] || alignmentMap.center,
187
+ },
188
+ contentStyle,
189
+ ];
190
+ };
191
+
141
192
  const getIconSize = () => {
142
193
  switch (size) {
143
194
  case 'large':
@@ -202,7 +253,8 @@ const Button = ({
202
253
  style={[
203
254
  getContainerStyle(),
204
255
  iconOnly && styles.iconOnlyContainer,
205
- expand && styles.expand
256
+ expand && styles.expand,
257
+ style,
206
258
  ]}
207
259
  onPress={onPress}
208
260
  disabled={disabled}
@@ -211,7 +263,7 @@ const Button = ({
211
263
  activeOpacity={0.95}
212
264
  testID={testID}
213
265
  >
214
- <View style={styles.contentContainer}>
266
+ <View style={getContentContainerStyle()}>
215
267
  {iconOnly && renderIcon()}
216
268
 
217
269
  {!iconOnly && (
@@ -221,7 +273,15 @@ const Button = ({
221
273
  iconPosition === 'both') &&
222
274
  renderIcon()
223
275
  }
224
- <SEText type={getSETextType()} style={getLabelStyle()}>{label}</SEText>
276
+ {hasContent && (
277
+ shouldWrapContent ? (
278
+ <SEText type={getSETextType()} style={getLabelStyle()}>
279
+ {content}
280
+ </SEText>
281
+ ) : (
282
+ content
283
+ )
284
+ )}
225
285
  {renderBadge()}
226
286
  {(
227
287
  iconPosition === 'right' ||
@@ -240,6 +300,9 @@ const styles = StyleSheet.create({
240
300
  flexDirection: 'row',
241
301
  alignItems: 'center',
242
302
  },
303
+ contentContainerFlexible: {
304
+ width: '100%',
305
+ },
243
306
  container: {
244
307
  alignItems: 'center',
245
308
  justifyContent: 'center',
@@ -7,7 +7,7 @@ import {
7
7
  View,
8
8
  ViewStyle,
9
9
  } from 'react-native';
10
- import SEText from '../SEText';
10
+ import SEText from '../Typography/SEText';
11
11
  import Icon from '../Icon';
12
12
 
13
13
  const { useCallback, useMemo, useState, createContext, useContext } = React;
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Pressable, StyleSheet, View } from 'react-native';
4
4
  import SEIcon from '../SEIcon';
5
- import SEText from '../SEText';
5
+ import SEText from '../Typography/SEText';
6
6
 
7
7
  const COLORS = {
8
8
  white: '#FFFFFF',
@@ -6,7 +6,7 @@ import {
6
6
  StyleSheet,
7
7
  } from 'react-native';
8
8
  import Icon from '../Icon';
9
- import SEText from '../SEText';
9
+ import SEText from '../Typography/SEText';
10
10
  import { fontFamily } from '../utils/fontFamily';
11
11
 
12
12
  const Checkbox = ({ label, checked, disabled, variant, onChange, noBorder = false, testID }) => {
@@ -12,7 +12,7 @@ import Icon from '../Icon';
12
12
  import Tag from '../Tag';
13
13
  import tokens from '../styles/tokens';
14
14
  import { fontFamily } from '../utils/fontFamily';
15
- import SEText from '../SEText';
15
+ import SEText from '../Typography/SEText';
16
16
 
17
17
  export type EventListItemKind = 'detailed' | 'simple';
18
18
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { View, StyleSheet, TouchableOpacity, Platform } from 'react-native';
3
- import SEText from '../SEText';
3
+ import SEText from '../Typography/SEText';
4
4
  import Icon from '../Icon';
5
5
 
6
6
  export interface ExpandableNumberDisplayProps {
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
2
  import { TouchableOpacity, StyleSheet, View } from 'react-native';
3
- import SEText from '../SEText';
3
+ import SEText from '../Typography/SEText';
4
4
 
5
5
  const FilterTag = ({ label, onRemove, color }) => {
6
6
  const [isHovered, setIsHovered] = useState(false);
@@ -9,7 +9,7 @@ import {
9
9
  TouchableWithoutFeedback
10
10
  } from 'react-native';
11
11
  import Icon from '../Icon';
12
- import SEText from '../SEText';
12
+ import SEText from '../Typography/SEText';
13
13
  import ScrollBar from '../ScrollBar';
14
14
  import { set } from 'lodash';
15
15
 
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
2
2
  import { View, TextInput, StyleSheet, TouchableOpacity, Platform } from 'react-native';
3
3
  import Icon from '../Icon';
4
4
  import ScrollBar from '../ScrollBar';
5
- import SEText from '../SEText';
5
+ import SEText from '../Typography/SEText';
6
6
 
7
7
  const CustomRadio = ({ selected, iconColor, size = 20 }) => {
8
8
  return (
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { View, StyleSheet, TouchableOpacity } from 'react-native';
3
- import SEText from '../SEText';
3
+ import SEText from '../Typography/SEText';
4
4
  import Icon from '../Icon';
5
5
 
6
6
  export interface GeneralInformationCardProps {
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useMemo, useState, useRef } from 'react';
2
2
  import { FlatList, Modal, Pressable, StyleSheet, TouchableOpacity, View, Dimensions } from 'react-native';
3
3
  import Icon from '../../../Icon';
4
- import SEText from '../../../SEText';
4
+ import SEText from '../../../Typography/SEText';
5
5
  import { useHeader } from './Context';
6
6
 
7
7
  const { height: SCREEN_HEIGHT, width: SCREEN_WIDTH } = Dimensions.get('window');
@@ -4,7 +4,7 @@ import { View, StyleSheet, TouchableOpacity } from 'react-native';
4
4
  import Button from '../../../Button';
5
5
  import Avatar from '../../../Avatar';
6
6
  import Icon from '../../../Icon';
7
- import SEText from '../../../SEText';
7
+ import SEText from '../../../Typography/SEText';
8
8
 
9
9
  export function Default({ showSwitchAccount = true, showShortcut = true }) {
10
10
  const headerOpt = useHeader();
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { StyleSheet, TouchableOpacity, View } from 'react-native'
3
3
  import PropTypes from 'prop-types'
4
- import SEText from '../../../SEText'
4
+ import SEText from '../../../Typography/SEText'
5
5
  import Shortcut from './Shortcut'
6
6
  import Icon from '../../../Icon'
7
7
 
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useMemo, useRef, useState } from 'react'
2
2
  import { Dimensions, FlatList, Modal, Pressable, StyleSheet, TouchableOpacity, View } from 'react-native'
3
3
  import Icon from '../../../Icon'
4
- import SEText from '../../../SEText'
4
+ import SEText from '../../../Typography/SEText'
5
5
  import { useHeaderV2 } from './Context'
6
6
 
7
7
  const { height: SCREEN_HEIGHT } = Dimensions.get('window')
@@ -3,7 +3,7 @@ import { Image, TouchableOpacity, View } from 'react-native'
3
3
  import Avatar from '../../../Avatar'
4
4
  import Button from '../../../Button'
5
5
  import Icon from '../../../Icon'
6
- import SEText from '../../../SEText'
6
+ import SEText from '../../../Typography/SEText'
7
7
  import Header from '.'
8
8
  import BackButton from './BackButton'
9
9
  import { useHeaderV2 } from './Context'