lsoft-ui 0.0.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.
Files changed (159) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +82 -0
  3. package/dist/components/Accordion/CustomAccordionGroup.d.ts +10 -0
  4. package/dist/components/Accordion/CustomAccordionGroup.js +20 -0
  5. package/dist/components/Accordion/CustomAccordionItem.d.ts +12 -0
  6. package/dist/components/Accordion/CustomAccordionItem.js +5 -0
  7. package/dist/components/CustomAlertDialog.d.ts +8 -0
  8. package/dist/components/CustomAlertDialog.js +18 -0
  9. package/dist/components/CustomAutoComplete.d.ts +35 -0
  10. package/dist/components/CustomAutoComplete.js +141 -0
  11. package/dist/components/CustomBadge.d.ts +9 -0
  12. package/dist/components/CustomBadge.js +25 -0
  13. package/dist/components/CustomButton.d.ts +16 -0
  14. package/dist/components/CustomButton.js +18 -0
  15. package/dist/components/CustomCard.d.ts +11 -0
  16. package/dist/components/CustomCard.js +20 -0
  17. package/dist/components/CustomCheckBox.d.ts +12 -0
  18. package/dist/components/CustomCheckBox.js +26 -0
  19. package/dist/components/CustomCheckboxGroup.d.ts +21 -0
  20. package/dist/components/CustomCheckboxGroup.js +28 -0
  21. package/dist/components/CustomDrawer.d.ts +11 -0
  22. package/dist/components/CustomDrawer.js +36 -0
  23. package/dist/components/CustomIconButton.d.ts +7 -0
  24. package/dist/components/CustomIconButton.js +19 -0
  25. package/dist/components/CustomInput.d.ts +19 -0
  26. package/dist/components/CustomInput.js +32 -0
  27. package/dist/components/CustomInputNumber.d.ts +17 -0
  28. package/dist/components/CustomInputNumber.js +23 -0
  29. package/dist/components/CustomList.d.ts +22 -0
  30. package/dist/components/CustomList.js +27 -0
  31. package/dist/components/CustomLoadingCenterPage.d.ts +6 -0
  32. package/dist/components/CustomLoadingCenterPage.js +5 -0
  33. package/dist/components/CustomModal.d.ts +19 -0
  34. package/dist/components/CustomModal.js +83 -0
  35. package/dist/components/CustomModalNfe.d.ts +34 -0
  36. package/dist/components/CustomModalNfe.js +86 -0
  37. package/dist/components/CustomMultSelect.d.ts +28 -0
  38. package/dist/components/CustomMultSelect.js +51 -0
  39. package/dist/components/CustomMultipleInputs.d.ts +36 -0
  40. package/dist/components/CustomMultipleInputs.js +91 -0
  41. package/dist/components/CustomPopover.d.ts +21 -0
  42. package/dist/components/CustomPopover.js +19 -0
  43. package/dist/components/CustomRadioGroup.d.ts +32 -0
  44. package/dist/components/CustomRadioGroup.js +37 -0
  45. package/dist/components/CustomSelect.d.ts +20 -0
  46. package/dist/components/CustomSelect.js +25 -0
  47. package/dist/components/CustomSkeleton.d.ts +9 -0
  48. package/dist/components/CustomSkeleton.js +17 -0
  49. package/dist/components/CustomSwitch.d.ts +20 -0
  50. package/dist/components/CustomSwitch.js +15 -0
  51. package/dist/components/CustomTable.d.ts +51 -0
  52. package/dist/components/CustomTable.js +307 -0
  53. package/dist/components/CustomTabs.d.ts +27 -0
  54. package/dist/components/CustomTabs.js +100 -0
  55. package/dist/components/CustomTextarea.d.ts +14 -0
  56. package/dist/components/CustomTextarea.js +35 -0
  57. package/dist/components/CustomToast.d.ts +10 -0
  58. package/dist/components/CustomToast.js +6 -0
  59. package/dist/components/DatePicker/CustomDatePicker.d.ts +24 -0
  60. package/dist/components/DatePicker/CustomDatePicker.js +628 -0
  61. package/dist/components/Pagination/CustomPagination.d.ts +50 -0
  62. package/dist/components/Pagination/CustomPagination.js +159 -0
  63. package/dist/components/ThemeToggle.d.ts +1 -0
  64. package/dist/components/ThemeToggle.js +30 -0
  65. package/dist/components/index.d.ts +30 -0
  66. package/dist/components/index.js +30 -0
  67. package/dist/contexts/ThemeContext.d.ts +18 -0
  68. package/dist/contexts/ThemeContext.js +34 -0
  69. package/dist/examples/CodeViewer.d.ts +8 -0
  70. package/dist/examples/CodeViewer.js +7 -0
  71. package/dist/examples/FormikExample.d.ts +2 -0
  72. package/dist/examples/FormikExample.js +199 -0
  73. package/dist/examples/NumberInputExample.d.ts +2 -0
  74. package/dist/examples/NumberInputExample.js +198 -0
  75. package/dist/examples/ReactHookFormExample.d.ts +2 -0
  76. package/dist/examples/ReactHookFormExample.js +217 -0
  77. package/dist/examples/SimpleFormExample.d.ts +2 -0
  78. package/dist/examples/SimpleFormExample.js +216 -0
  79. package/dist/examples/TabsExample.d.ts +2 -0
  80. package/dist/examples/TabsExample.js +182 -0
  81. package/dist/examples/index.d.ts +6 -0
  82. package/dist/examples/index.js +6 -0
  83. package/dist/index.d.ts +32 -0
  84. package/dist/index.js +32 -0
  85. package/dist/providers/LsCKFrontProvider.d.ts +6 -0
  86. package/dist/providers/LsCKFrontProvider.js +7 -0
  87. package/dist/stories/Londrisoft/Components/Accordion/CustomAccordionGroup.stories.d.ts +13 -0
  88. package/dist/stories/Londrisoft/Components/Accordion/CustomAccordionGroup.stories.js +787 -0
  89. package/dist/stories/Londrisoft/Components/Accordion/CustomAccordionItem.stories.d.ts +13 -0
  90. package/dist/stories/Londrisoft/Components/Accordion/CustomAccordionItem.stories.js +759 -0
  91. package/dist/stories/Londrisoft/Components/Checkbox/CustomCheckBox.stories.d.ts +15 -0
  92. package/dist/stories/Londrisoft/Components/Checkbox/CustomCheckBox.stories.js +770 -0
  93. package/dist/stories/Londrisoft/Components/Checkbox/CustomCheckboxGroup.stories.d.ts +33 -0
  94. package/dist/stories/Londrisoft/Components/Checkbox/CustomCheckboxGroup.stories.js +2152 -0
  95. package/dist/stories/Londrisoft/Components/CustomAlertDialog.stories.d.ts +24 -0
  96. package/dist/stories/Londrisoft/Components/CustomAlertDialog.stories.js +462 -0
  97. package/dist/stories/Londrisoft/Components/CustomAutoComplete.stories.d.ts +41 -0
  98. package/dist/stories/Londrisoft/Components/CustomAutoComplete.stories.js +1135 -0
  99. package/dist/stories/Londrisoft/Components/CustomBadge.stories.d.ts +21 -0
  100. package/dist/stories/Londrisoft/Components/CustomBadge.stories.js +546 -0
  101. package/dist/stories/Londrisoft/Components/CustomButton.stories.d.ts +17 -0
  102. package/dist/stories/Londrisoft/Components/CustomButton.stories.js +1099 -0
  103. package/dist/stories/Londrisoft/Components/CustomCard.stories.d.ts +17 -0
  104. package/dist/stories/Londrisoft/Components/CustomCard.stories.js +687 -0
  105. package/dist/stories/Londrisoft/Components/CustomDrawer.stories.d.ts +24 -0
  106. package/dist/stories/Londrisoft/Components/CustomDrawer.stories.js +521 -0
  107. package/dist/stories/Londrisoft/Components/CustomIconButton.stories.d.ts +14 -0
  108. package/dist/stories/Londrisoft/Components/CustomIconButton.stories.js +1024 -0
  109. package/dist/stories/Londrisoft/Components/CustomInput.stories.d.ts +15 -0
  110. package/dist/stories/Londrisoft/Components/CustomInput.stories.js +1094 -0
  111. package/dist/stories/Londrisoft/Components/CustomInputNumber.stories.d.ts +11 -0
  112. package/dist/stories/Londrisoft/Components/CustomInputNumber.stories.js +676 -0
  113. package/dist/stories/Londrisoft/Components/CustomList.stories.d.ts +18 -0
  114. package/dist/stories/Londrisoft/Components/CustomList.stories.js +1353 -0
  115. package/dist/stories/Londrisoft/Components/CustomLoadingCenterPage.stories.d.ts +17 -0
  116. package/dist/stories/Londrisoft/Components/CustomLoadingCenterPage.stories.js +304 -0
  117. package/dist/stories/Londrisoft/Components/CustomModal.stories.d.ts +19 -0
  118. package/dist/stories/Londrisoft/Components/CustomModal.stories.js +631 -0
  119. package/dist/stories/Londrisoft/Components/CustomModalNfe.stories.d.ts +19 -0
  120. package/dist/stories/Londrisoft/Components/CustomModalNfe.stories.js +589 -0
  121. package/dist/stories/Londrisoft/Components/CustomMultSelect.stories.d.ts +15 -0
  122. package/dist/stories/Londrisoft/Components/CustomMultSelect.stories.js +447 -0
  123. package/dist/stories/Londrisoft/Components/CustomMultipleInputs.stories.d.ts +15 -0
  124. package/dist/stories/Londrisoft/Components/CustomMultipleInputs.stories.js +1068 -0
  125. package/dist/stories/Londrisoft/Components/CustomPopover.stories.d.ts +10 -0
  126. package/dist/stories/Londrisoft/Components/CustomPopover.stories.js +208 -0
  127. package/dist/stories/Londrisoft/Components/CustomSelect.stories.d.ts +27 -0
  128. package/dist/stories/Londrisoft/Components/CustomSelect.stories.js +1086 -0
  129. package/dist/stories/Londrisoft/Components/CustomSkeleton.stories.d.ts +25 -0
  130. package/dist/stories/Londrisoft/Components/CustomSkeleton.stories.js +534 -0
  131. package/dist/stories/Londrisoft/Components/CustomSwitch.stories.d.ts +15 -0
  132. package/dist/stories/Londrisoft/Components/CustomSwitch.stories.js +422 -0
  133. package/dist/stories/Londrisoft/Components/CustomTable.stories.d.ts +43 -0
  134. package/dist/stories/Londrisoft/Components/CustomTable.stories.js +2121 -0
  135. package/dist/stories/Londrisoft/Components/CustomTabs.stories.d.ts +19 -0
  136. package/dist/stories/Londrisoft/Components/CustomTabs.stories.js +866 -0
  137. package/dist/stories/Londrisoft/Components/CustomTextarea.stories.d.ts +21 -0
  138. package/dist/stories/Londrisoft/Components/CustomTextarea.stories.js +408 -0
  139. package/dist/stories/Londrisoft/Components/CustomToast.stories.d.ts +21 -0
  140. package/dist/stories/Londrisoft/Components/CustomToast.stories.js +1041 -0
  141. package/dist/stories/Londrisoft/Components/DatePicker/CustomDatePicker.stories.d.ts +17 -0
  142. package/dist/stories/Londrisoft/Components/DatePicker/CustomDatePicker.stories.js +653 -0
  143. package/dist/stories/Londrisoft/Components/Pagination/CustomPagination.stories.d.ts +17 -0
  144. package/dist/stories/Londrisoft/Components/Pagination/CustomPagination.stories.js +429 -0
  145. package/dist/stories/Londrisoft/Components/Radio/CustomRadioGroup.stories.d.ts +22 -0
  146. package/dist/stories/Londrisoft/Components/Radio/CustomRadioGroup.stories.js +766 -0
  147. package/dist/stories/Londrisoft/Examples/IntegrationExamples.stories.d.ts +16 -0
  148. package/dist/stories/Londrisoft/Examples/IntegrationExamples.stories.js +514 -0
  149. package/dist/stories/Londrisoft/Theme/ThemeShowcase.stories.d.ts +5 -0
  150. package/dist/stories/Londrisoft/Theme/ThemeShowcase.stories.js +112 -0
  151. package/dist/stories/options.d.ts +13 -0
  152. package/dist/stories/options.js +124 -0
  153. package/dist/theme/bime.d.ts +92 -0
  154. package/dist/theme/bime.js +352 -0
  155. package/dist/theme/index.d.ts +5 -0
  156. package/dist/theme/index.js +8 -0
  157. package/dist/theme/waipe.d.ts +102 -0
  158. package/dist/theme/waipe.js +362 -0
  159. package/package.json +53 -0
@@ -0,0 +1,1094 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text, VStack, HStack, Icon } from "@chakra-ui/react";
3
+ import { Search as SearchIcon, Check as CheckIcon, Mail as MailIcon, Lock as LockIcon, Phone as PhoneIcon, User, MapPin, Calendar, Clock, Filter, Eye, Star, } from "lucide-react";
4
+ import { CustomInput } from "../../../components/CustomInput";
5
+ import CustomTextarea from "../../../components/CustomTextarea";
6
+ import { CustomCheckbox } from "../../../components/CustomCheckBox";
7
+ import CustomCard from "../../../components/CustomCard";
8
+ import CustomSelect from "../../../components/CustomSelect";
9
+ import { CustomAutocomplete } from "../../../components/CustomAutoComplete";
10
+ import { CustomTable } from "../../../components/CustomTable";
11
+ import { CustomButton } from "../../../components/CustomButton";
12
+ const meta = {
13
+ title: "Londrisoft/Components/CustomInput",
14
+ component: CustomInput,
15
+ tags: ["autodocs"],
16
+ args: {
17
+ label: "Nome completo",
18
+ placeholder: "Digite seu nome completo",
19
+ type: "text",
20
+ error: "",
21
+ showError: true,
22
+ withFormControl: true,
23
+ isDisabled: false,
24
+ required: false,
25
+ tooltip: "",
26
+ labelColor: "",
27
+ labelBold: false,
28
+ size: "md",
29
+ rightIcon: _jsx(Icon, { as: SearchIcon }),
30
+ leftIcon: _jsx(Icon, { as: User }),
31
+ },
32
+ argTypes: {
33
+ label: {
34
+ control: "text",
35
+ description: "Texto do label exibido acima do input.",
36
+ table: { category: "Content" },
37
+ },
38
+ placeholder: {
39
+ control: "text",
40
+ description: "Texto exibido quando o campo está vazio.",
41
+ table: { category: "Content" },
42
+ },
43
+ type: {
44
+ control: {
45
+ type: "select",
46
+ options: [
47
+ "text",
48
+ "email",
49
+ "password",
50
+ "number",
51
+ "search",
52
+ "tel",
53
+ "url",
54
+ ],
55
+ },
56
+ description: "Tipo do input HTML.",
57
+ table: { category: "Behavior" },
58
+ },
59
+ error: {
60
+ control: "text",
61
+ description: "Mensagem de erro exibida abaixo do input.",
62
+ table: { category: "State" },
63
+ },
64
+ showError: {
65
+ control: "boolean",
66
+ description: "Define se a mensagem de erro é exibida.",
67
+ table: { category: "Behavior" },
68
+ },
69
+ withFormControl: {
70
+ control: "boolean",
71
+ description: "Envolve o input em FormControl para exibir erros.",
72
+ table: { category: "Behavior" },
73
+ },
74
+ isDisabled: {
75
+ control: "boolean",
76
+ description: "Desabilita o input.",
77
+ table: { category: "Behavior" },
78
+ },
79
+ required: {
80
+ control: "boolean",
81
+ description: "Adiciona asterisco vermelho indicando campo obrigatório.",
82
+ table: { category: "Behavior" },
83
+ },
84
+ tooltip: {
85
+ control: "text",
86
+ description: "Texto do tooltip exibido ao lado do label.",
87
+ table: { category: "Content" },
88
+ },
89
+ labelColor: {
90
+ control: "color",
91
+ description: "Cor do texto do label.",
92
+ table: { category: "Styling" },
93
+ },
94
+ labelBold: {
95
+ control: "boolean",
96
+ description: "Define se o label deve ser exibido em negrito.",
97
+ table: { category: "Styling" },
98
+ },
99
+ size: {
100
+ control: { type: "select", options: ["sm", "md", "lg"] },
101
+ description: "Tamanho do input (small, medium, large).",
102
+ table: { category: "Styling" },
103
+ },
104
+ leftIcon: {
105
+ description: "Ícone exibido à esquerda dentro do input.",
106
+ table: { category: "Content", disable: true },
107
+ },
108
+ rightIcon: {
109
+ description: "Ícone exibido à direita dentro do input.",
110
+ table: { category: "Content", disable: true },
111
+ },
112
+ value: {
113
+ table: { disable: true },
114
+ },
115
+ onChange: {
116
+ table: { disable: true },
117
+ },
118
+ },
119
+ parameters: {
120
+ docs: {
121
+ description: {
122
+ component: `
123
+ **CustomInput** é um componente de entrada de texto baseado no Input do Chakra UI, otimizado para formulários e interfaces de usuário modernas.
124
+
125
+ ## Características Principais
126
+
127
+ - **Ícones Lucide React**: Suporte completo à biblioteca Lucide React para ícones modernos e consistentes
128
+ - **Validação Integrada**: Sistema de validação com exibição de erros e estados visuais
129
+ - **Acessibilidade**: Implementação completa de ARIA labels, navegação por teclado e leitores de tela
130
+ - **Estados Responsivos**: Suporte a estados disabled, error, focus e loading
131
+ - **Integração com Tema**: Compatível com o sistema de design Londrisoft
132
+ - **FormControl Opcional**: Flexibilidade para usar com ou sem FormControl do Chakra UI
133
+
134
+ ## Casos de Uso Comuns
135
+
136
+ - **Formulários de Cadastro**: Nome, e-mail, telefone, endereço
137
+ - **Autenticação**: Login, senha, confirmação de senha
138
+ - **Busca e Filtros**: Campos de pesquisa com ícones
139
+ - **Configurações**: Campos de configuração com tooltips
140
+ - **Validação em Tempo Real**: Feedback imediato para o usuário
141
+
142
+ ## Benefícios de UX
143
+
144
+ - **Feedback Visual**: Estados claros para erro, sucesso e loading
145
+ - **Consistência**: Padrão visual uniforme em toda aplicação
146
+ - **Acessibilidade**: Suporte completo para usuários com necessidades especiais
147
+ - **Flexibilidade**: Adaptável a diferentes contextos e layouts
148
+
149
+ ## Tipos Disponíveis
150
+
151
+ - **text**: Texto simples
152
+ - **email**: Validação de e-mail
153
+ - **password**: Senha com toggle de visibilidade
154
+ - **number**: Números com validação
155
+ - **search**: Campo de busca
156
+ - **tel**: Telefone com formatação
157
+ - **url**: URLs com validação
158
+
159
+ ## Responsividade
160
+
161
+ O componente se adapta automaticamente a diferentes tamanhos de tela, mantendo a usabilidade em dispositivos móveis e desktop.
162
+ `,
163
+ },
164
+ },
165
+ backgrounds: {
166
+ default: "light",
167
+ values: [
168
+ { name: "light", value: "#ffffff" },
169
+ { name: "dark", value: "#000000" },
170
+ ],
171
+ },
172
+ a11y: {
173
+ element: "#root",
174
+ },
175
+ },
176
+ };
177
+ export default meta;
178
+ /** 🎯 Default: Exemplo básico do CustomInput */
179
+ export const Default = {
180
+ name: "Padrão",
181
+ parameters: {
182
+ docs: {
183
+ description: {
184
+ story: `
185
+ **Exemplo básico** do CustomInput com configuração padrão.
186
+
187
+ **Características:**
188
+ - Label descritivo
189
+ - Placeholder informativo
190
+ - Tipo de texto padrão
191
+ - Sem erros ou validações
192
+ - Tamanho médio
193
+
194
+ **Casos de uso:**
195
+ - Campos de texto simples
196
+ - Formulários básicos
197
+ - Entrada de dados não críticos
198
+ - Prototipagem rápida
199
+
200
+ **Dicas de implementação:**
201
+ - Use labels claros e descritivos
202
+ - Placeholders devem guiar o usuário
203
+ - Considere validação quando necessário
204
+ - Mantenha consistência visual
205
+ `,
206
+ },
207
+ source: {
208
+ code: `
209
+ import React from 'react';
210
+ import { CustomInput } from '../../../components/CustomInput';
211
+
212
+ const BasicInput = () => {
213
+ const [value, setValue] = React.useState('');
214
+
215
+ const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
216
+ setValue(e.target.value);
217
+ };
218
+
219
+ return (
220
+ <CustomInput
221
+ label="Nome completo"
222
+ placeholder="Digite seu nome completo"
223
+ type="text"
224
+ value={value}
225
+ onChange={handleChange}
226
+ error=""
227
+ showError={true}
228
+ withFormControl={true}
229
+ isDisabled={false}
230
+ required={false}
231
+ size="md"
232
+ rightIcon={<SearchIcon />}
233
+ />
234
+ );
235
+ };
236
+ `,
237
+ language: "tsx",
238
+ },
239
+ },
240
+ },
241
+ };
242
+ /** 🎯 Variants: Demonstração de diferentes tipos de input */
243
+ export const Variants = {
244
+ name: "Variantes",
245
+ render: () => (_jsxs(VStack, { spacing: 6, align: "stretch", children: [_jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Tipos de Input" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Texto", placeholder: "Digite texto simples", type: "text", leftIcon: _jsx(User, {}) }), _jsx(CustomInput, { label: "E-mail", placeholder: "Digite seu e-mail", type: "email", leftIcon: _jsx(MailIcon, {}), required: true }), _jsx(CustomInput, { label: "Senha", placeholder: "Digite sua senha", type: "password", leftIcon: _jsx(LockIcon, {}), required: true }), _jsx(CustomInput, { label: "Telefone", placeholder: "(11) 99999-9999", type: "tel", leftIcon: _jsx(PhoneIcon, {}) }), _jsx(CustomInput, { label: "Busca", placeholder: "Digite para buscar...", type: "search", leftIcon: _jsx(SearchIcon, {}) }), _jsx(CustomInput, { label: "N\u00FAmero", placeholder: "Digite um n\u00FAmero", type: "number" })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Com \u00CDcones" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Nome com \u00EDcone", placeholder: "Digite seu nome", leftIcon: _jsx(User, {}) }), _jsx(CustomInput, { label: "E-mail com valida\u00E7\u00E3o", placeholder: "Digite seu e-mail", type: "email", leftIcon: _jsx(MailIcon, {}), rightIcon: _jsx(CheckIcon, {}) }), _jsx(CustomInput, { label: "Senha com toggle", placeholder: "Digite sua senha", type: "password", leftIcon: _jsx(LockIcon, {}), rightIcon: _jsx(Eye, {}) })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Estados Visuais" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Campo Normal", placeholder: "Estado normal" }), _jsx(CustomInput, { label: "Campo com Erro", placeholder: "Campo com erro", error: "Este campo tem um erro" }), _jsx(CustomInput, { label: "Campo Desabilitado", placeholder: "Campo desabilitado", isDisabled: true, value: "Valor fixo" }), _jsx(CustomInput, { label: "Campo Obrigat\u00F3rio", placeholder: "Campo obrigat\u00F3rio", required: true, tooltip: "Este campo \u00E9 obrigat\u00F3rio" })] })] })] })),
246
+ parameters: {
247
+ docs: {
248
+ description: {
249
+ story: `
250
+ **Demonstração** de diferentes variantes e tipos do CustomInput.
251
+
252
+ **Variantes mostradas:**
253
+ - **Tipos de Input**: text, email, password, tel, search, number
254
+ - **Com Ícones**: Ícones à esquerda e direita
255
+ - **Estados Visuais**: Normal, erro, desabilitado, obrigatório
256
+
257
+ **Casos de uso por tipo:**
258
+ - **text**: Nomes, descrições, texto livre
259
+ - **email**: Validação automática de formato
260
+ - **password**: Senhas com toggle de visibilidade
261
+ - **tel**: Telefones com formatação
262
+ - **search**: Campos de busca com ícone
263
+ - **number**: Valores numéricos com validação
264
+
265
+ **Dicas de design:**
266
+ - Use ícones que representem o tipo de dado
267
+ - Mantenha consistência visual entre campos relacionados
268
+ - Considere validação em tempo real para melhor UX
269
+ `,
270
+ },
271
+ source: {
272
+ code: `
273
+ import React from 'react';
274
+ import { VStack, Box, Text } from '@chakra-ui/react';
275
+ import { User, Mail, Lock, Phone, Search, Check, Eye } from 'lucide-react';
276
+ import { CustomInput } from '../../../components/CustomInput';
277
+
278
+ const InputVariants = () => {
279
+ return (
280
+ <VStack spacing={6} align="stretch">
281
+ <Box>
282
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Tipos de Input</Text>
283
+ <VStack spacing={4} align="stretch">
284
+ <CustomInput
285
+ label="Texto"
286
+ placeholder="Digite texto simples"
287
+ type="text"
288
+ leftIcon={<User />}
289
+ />
290
+ <CustomInput
291
+ label="E-mail"
292
+ placeholder="Digite seu e-mail"
293
+ type="email"
294
+ leftIcon={<Mail />}
295
+ required={true}
296
+ />
297
+ <CustomInput
298
+ label="Senha"
299
+ placeholder="Digite sua senha"
300
+ type="password"
301
+ leftIcon={<Lock />}
302
+ required={true}
303
+ />
304
+ <CustomInput
305
+ label="Telefone"
306
+ placeholder="(11) 99999-9999"
307
+ type="tel"
308
+ leftIcon={<Phone />}
309
+ />
310
+ <CustomInput
311
+ label="Busca"
312
+ placeholder="Digite para buscar..."
313
+ type="search"
314
+ leftIcon={<Search />}
315
+ />
316
+ <CustomInput
317
+ label="Número"
318
+ placeholder="Digite um número"
319
+ type="number"
320
+ />
321
+ </VStack>
322
+ </Box>
323
+
324
+ <Box>
325
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Com Ícones</Text>
326
+ <VStack spacing={4} align="stretch">
327
+ <CustomInput
328
+ label="Nome com ícone"
329
+ placeholder="Digite seu nome"
330
+ leftIcon={<User />}
331
+ />
332
+ <CustomInput
333
+ label="E-mail com validação"
334
+ placeholder="Digite seu e-mail"
335
+ type="email"
336
+ leftIcon={<Mail />}
337
+ rightIcon={<Check />}
338
+ />
339
+ <CustomInput
340
+ label="Senha com toggle"
341
+ placeholder="Digite sua senha"
342
+ type="password"
343
+ leftIcon={<Lock />}
344
+ rightIcon={<Eye />}
345
+ />
346
+ </VStack>
347
+ </Box>
348
+
349
+ <Box>
350
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Estados Visuais</Text>
351
+ <VStack spacing={4} align="stretch">
352
+ <CustomInput
353
+ label="Campo Normal"
354
+ placeholder="Estado normal"
355
+ />
356
+ <CustomInput
357
+ label="Campo com Erro"
358
+ placeholder="Campo com erro"
359
+ error="Este campo tem um erro"
360
+ />
361
+ <CustomInput
362
+ label="Campo Desabilitado"
363
+ placeholder="Campo desabilitado"
364
+ isDisabled={true}
365
+ value="Valor fixo"
366
+ />
367
+ <CustomInput
368
+ label="Campo Obrigatório"
369
+ placeholder="Campo obrigatório"
370
+ required={true}
371
+ tooltip="Este campo é obrigatório"
372
+ />
373
+ </VStack>
374
+ </Box>
375
+ </VStack>
376
+ );
377
+ };
378
+ `,
379
+ language: "tsx",
380
+ },
381
+ },
382
+ },
383
+ };
384
+ /** 🎯 States: Demonstração de diferentes estados */
385
+ export const States = {
386
+ name: "Estados",
387
+ render: () => (_jsxs(VStack, { spacing: 6, align: "stretch", children: [_jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Estados de Valida\u00E7\u00E3o" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Campo Normal", placeholder: "Estado normal" }), _jsx(CustomInput, { label: "Campo com Erro", placeholder: "Campo com erro", error: "Este campo tem um erro de valida\u00E7\u00E3o" }), _jsx(CustomInput, { label: "Campo Desabilitado", placeholder: "Campo desabilitado", isDisabled: true, value: "Valor fixo" }), _jsx(CustomInput, { label: "Campo Obrigat\u00F3rio", placeholder: "Campo obrigat\u00F3rio", required: true, tooltip: "Este campo \u00E9 obrigat\u00F3rio" })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Valida\u00E7\u00E3o em Tempo Real" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "E-mail", placeholder: "Digite seu e-mail", type: "email", leftIcon: _jsx(MailIcon, {}), error: "E-mail inv\u00E1lido", tooltip: "Digite um e-mail v\u00E1lido" }), _jsx(CustomInput, { label: "Senha", placeholder: "Digite sua senha", type: "password", leftIcon: _jsx(LockIcon, {}), error: "Senha deve ter pelo menos 8 caracteres", required: true }), _jsx(CustomInput, { label: "Telefone", placeholder: "(11) 99999-9999", type: "tel", leftIcon: _jsx(PhoneIcon, {}), error: "Telefone inv\u00E1lido" })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Estados de Loading" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Campo com Loading", placeholder: "Carregando...", isDisabled: true, value: "Processando..." }), _jsx(CustomInput, { label: "Valida\u00E7\u00E3o em Andamento", placeholder: "Validando...", rightIcon: _jsx(CheckIcon, {}) })] })] })] })),
388
+ parameters: {
389
+ docs: {
390
+ description: {
391
+ story: `
392
+ **Demonstração** dos diferentes estados do CustomInput.
393
+
394
+ **Estados mostrados:**
395
+ - **Validação**: Normal, erro, obrigatório
396
+ - **Validação em Tempo Real**: Feedback imediato para o usuário
397
+ - **Loading**: Estados de processamento e validação
398
+
399
+ **Casos de uso:**
400
+ - **Normal**: Campos funcionais sem validação
401
+ - **Erro**: Feedback visual para dados inválidos
402
+ - **Desabilitado**: Campos não editáveis
403
+ - **Obrigatório**: Campos que devem ser preenchidos
404
+
405
+ **Dicas de implementação:**
406
+ - Use mensagens de erro claras e específicas
407
+ - Considere validação em tempo real para melhor UX
408
+ - Mantenha consistência visual entre estados
409
+ - Use tooltips para orientação adicional
410
+ `,
411
+ },
412
+ source: {
413
+ code: `
414
+ import React from 'react';
415
+ import { VStack, Box, Text } from '@chakra-ui/react';
416
+ import { Mail, Lock, Phone, Check } from 'lucide-react';
417
+ import { CustomInput } from '../../../components/CustomInput';
418
+
419
+ const InputStates = () => {
420
+ return (
421
+ <VStack spacing={6} align="stretch">
422
+ <Box>
423
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Estados de Validação</Text>
424
+ <VStack spacing={4} align="stretch">
425
+ <CustomInput
426
+ label="Campo Normal"
427
+ placeholder="Estado normal"
428
+ />
429
+ <CustomInput
430
+ label="Campo com Erro"
431
+ placeholder="Campo com erro"
432
+ error="Este campo tem um erro de validação"
433
+ />
434
+ <CustomInput
435
+ label="Campo Desabilitado"
436
+ placeholder="Campo desabilitado"
437
+ isDisabled={true}
438
+ value="Valor fixo"
439
+ />
440
+ <CustomInput
441
+ label="Campo Obrigatório"
442
+ placeholder="Campo obrigatório"
443
+ required={true}
444
+ tooltip="Este campo é obrigatório"
445
+ />
446
+ </VStack>
447
+ </Box>
448
+
449
+ <Box>
450
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Validação em Tempo Real</Text>
451
+ <VStack spacing={4} align="stretch">
452
+ <CustomInput
453
+ label="E-mail"
454
+ placeholder="Digite seu e-mail"
455
+ type="email"
456
+ leftIcon={<Mail />}
457
+ error="E-mail inválido"
458
+ tooltip="Digite um e-mail válido"
459
+ />
460
+ <CustomInput
461
+ label="Senha"
462
+ placeholder="Digite sua senha"
463
+ type="password"
464
+ leftIcon={<Lock />}
465
+ error="Senha deve ter pelo menos 8 caracteres"
466
+ required={true}
467
+ />
468
+ <CustomInput
469
+ label="Telefone"
470
+ placeholder="(11) 99999-9999"
471
+ type="tel"
472
+ leftIcon={<Phone />}
473
+ error="Telefone inválido"
474
+ />
475
+ </VStack>
476
+ </Box>
477
+
478
+ <Box>
479
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Estados de Loading</Text>
480
+ <VStack spacing={4} align="stretch">
481
+ <CustomInput
482
+ label="Campo com Loading"
483
+ placeholder="Carregando..."
484
+ isDisabled={true}
485
+ value="Processando..."
486
+ />
487
+ <CustomInput
488
+ label="Validação em Andamento"
489
+ placeholder="Validando..."
490
+ rightIcon={<Check />}
491
+ />
492
+ </VStack>
493
+ </Box>
494
+ </VStack>
495
+ );
496
+ };
497
+ `,
498
+ language: "tsx",
499
+ },
500
+ },
501
+ },
502
+ };
503
+ /** 🎯 RealWorldScenarios: Cenários práticos de uso */
504
+ export const RealWorldScenarios = {
505
+ name: "Cenários do Mundo Real",
506
+ render: () => (_jsxs(VStack, { spacing: 8, align: "stretch", children: [_jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Formul\u00E1rio de Cadastro" }), _jsx(CustomCard, { header: _jsx(Text, { fontSize: "lg", fontWeight: "bold", children: "Cadastro de Usu\u00E1rio" }), body: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "Nome", placeholder: "Digite seu nome", leftIcon: _jsx(User, {}), required: true }), _jsx(CustomInput, { label: "Sobrenome", placeholder: "Digite seu sobrenome", leftIcon: _jsx(User, {}), required: true })] }), _jsx(CustomInput, { label: "E-mail", placeholder: "Digite seu e-mail", type: "email", leftIcon: _jsx(MailIcon, {}), required: true, tooltip: "Digite um e-mail v\u00E1lido" }), _jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "Telefone", placeholder: "(11) 99999-9999", type: "tel", leftIcon: _jsx(PhoneIcon, {}) }), _jsx(CustomInput, { label: "CPF", placeholder: "000.000.000-00", leftIcon: _jsx(User, {}), required: true })] }), _jsx(CustomInput, { label: "Senha", placeholder: "Digite sua senha", type: "password", leftIcon: _jsx(LockIcon, {}), required: true, error: "Senha deve ter pelo menos 8 caracteres" }), _jsx(CustomInput, { label: "Confirmar Senha", placeholder: "Confirme sua senha", type: "password", leftIcon: _jsx(LockIcon, {}), required: true, error: "Senhas n\u00E3o coincidem" })] }), footer: _jsxs(HStack, { justify: "flex-end", spacing: 2, children: [_jsx(CustomButton, { variant: "outline", backgroundColor: "transparent", color: "#3182ce", borderColor: "#3182ce", size: "sm", children: "Cancelar" }), _jsx(CustomButton, { variant: "primary", backgroundColor: "#3182ce", color: "#ffffff", size: "sm", children: "Cadastrar" })] }) })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Formul\u00E1rio de Endere\u00E7o" }), _jsx(CustomCard, { header: _jsx(Text, { fontSize: "lg", fontWeight: "bold", children: "Endere\u00E7o de Entrega" }), body: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "CEP", placeholder: "00000-000", leftIcon: _jsx(MapPin, {}), required: true }), _jsx(CustomInput, { label: "Endere\u00E7o", placeholder: "Rua, Avenida, etc.", leftIcon: _jsx(MapPin, {}), required: true }), _jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "N\u00FAmero", placeholder: "123", type: "number", required: true }), _jsx(CustomInput, { label: "Complemento", placeholder: "Apto, Casa, etc." })] }), _jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "Bairro", placeholder: "Digite o bairro", leftIcon: _jsx(MapPin, {}), required: true }), _jsx(CustomInput, { label: "Cidade", placeholder: "Digite a cidade", leftIcon: _jsx(MapPin, {}), required: true })] }), _jsx(CustomInput, { label: "Estado", placeholder: "Digite o estado", leftIcon: _jsx(MapPin, {}), required: true })] }) })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Barra de Pesquisa Avan\u00E7ada" }), _jsxs(HStack, { spacing: 3, p: 4, bg: "gray.50", borderRadius: "md", children: [_jsx(CustomInput, { placeholder: "Buscar produtos...", type: "search", leftIcon: _jsx(SearchIcon, {}) }), _jsx(CustomInput, { placeholder: "Filtrar por pre\u00E7o", type: "number", leftIcon: _jsx(Filter, {}) }), _jsx(CustomInput, { placeholder: "Data inicial", type: "date", leftIcon: _jsx(Calendar, {}) }), _jsx(CustomInput, { placeholder: "Data final", type: "date", leftIcon: _jsx(Calendar, {}) })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Configura\u00E7\u00F5es de Perfil" }), _jsx(CustomCard, { header: _jsx(Text, { fontSize: "lg", fontWeight: "bold", children: "Configura\u00E7\u00F5es" }), body: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(CustomInput, { label: "Nome de Exibi\u00E7\u00E3o", placeholder: "Como voc\u00EA quer ser chamado", leftIcon: _jsx(User, {}), tooltip: "Este nome ser\u00E1 exibido para outros usu\u00E1rios" }), _jsx(CustomInput, { label: "E-mail de Contato", placeholder: "E-mail para notifica\u00E7\u00F5es", type: "email", leftIcon: _jsx(MailIcon, {}), required: true }), _jsx(CustomInput, { label: "Telefone de Emerg\u00EAncia", placeholder: "(11) 99999-9999", type: "tel", leftIcon: _jsx(PhoneIcon, {}), tooltip: "Usado apenas em emerg\u00EAncias" }), _jsx(CustomInput, { label: "URL do Site", placeholder: "https://meusite.com", type: "url", leftIcon: _jsx(MapPin, {}) }), _jsx(CustomInput, { label: "Fuso Hor\u00E1rio", placeholder: "UTC-3", leftIcon: _jsx(Clock, {}), tooltip: "Fuso hor\u00E1rio para agendamentos" })] }) })] })] })),
507
+ parameters: {
508
+ docs: {
509
+ description: {
510
+ story: `
511
+ **Cenários práticos** de uso do CustomInput em aplicações reais.
512
+
513
+ **Cenários demonstrados:**
514
+
515
+ ### 1. Formulário de Cadastro
516
+ - **Campos pessoais**: Nome, sobrenome, e-mail, telefone, CPF
517
+ - **Campos de segurança**: Senha e confirmação
518
+ - **Validação**: Campos obrigatórios e validação de formato
519
+ - **Layout responsivo**: Organização em grid com espaçamento adequado
520
+
521
+ ### 2. Formulário de Endereço
522
+ - **Campos de localização**: CEP, endereço, número, complemento
523
+ - **Campos geográficos**: Bairro, cidade, estado
524
+ - **Validação**: Campos obrigatórios para entrega
525
+ - **Ícones contextuais**: MapPin para campos de localização
526
+
527
+ ### 3. Barra de Pesquisa Avançada
528
+ - **Busca principal**: Campo de pesquisa com ícone
529
+ - **Filtros**: Preço, datas de início e fim
530
+ - **Layout compacto**: Organização horizontal para economizar espaço
531
+ - **Tipos específicos**: search, number, date
532
+
533
+ ### 4. Configurações de Perfil
534
+ - **Campos informativos**: Nome de exibição, e-mail, telefone
535
+ - **Campos opcionais**: URL do site, fuso horário
536
+ - **Tooltips explicativos**: Informações adicionais sobre cada campo
537
+ - **Validação específica**: E-mail, URL, telefone
538
+
539
+ **Dicas de implementação:**
540
+ - Use ícones que representem o tipo de dado
541
+ - Mantenha consistência visual entre campos relacionados
542
+ - Considere validação em tempo real para melhor UX
543
+ - Use tooltips para orientação adicional
544
+ - Organize campos em grupos lógicos
545
+ `,
546
+ },
547
+ source: {
548
+ code: `
549
+ import React from 'react';
550
+ import { VStack, HStack, Box, Text } from '@chakra-ui/react';
551
+ import {
552
+ User, Mail, Phone, Lock, MapPin, Search, Filter,
553
+ Calendar, Clock
554
+ } from 'lucide-react';
555
+ import { CustomInput } from '../../../components/CustomInput';
556
+ import CustomCard from '../../../components/CustomCard';
557
+ import { CustomButton } from '../../../components/CustomButton';
558
+
559
+ const RealWorldScenarios = () => {
560
+ return (
561
+ <VStack spacing={8} align="stretch">
562
+ {/* Formulário de Cadastro */}
563
+ <Box>
564
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Formulário de Cadastro</Text>
565
+ <CustomCard
566
+ header={<Text fontSize="lg" fontWeight="bold">Cadastro de Usuário</Text>}
567
+ body={
568
+ <VStack spacing={4} align="stretch">
569
+ <HStack spacing={4}>
570
+ <CustomInput
571
+ label="Nome"
572
+ placeholder="Digite seu nome"
573
+ leftIcon={<User />}
574
+ required={true}
575
+ />
576
+ <CustomInput
577
+ label="Sobrenome"
578
+ placeholder="Digite seu sobrenome"
579
+ leftIcon={<User />}
580
+ required={true}
581
+ />
582
+ </HStack>
583
+
584
+ <CustomInput
585
+ label="E-mail"
586
+ placeholder="Digite seu e-mail"
587
+ type="email"
588
+ leftIcon={<Mail />}
589
+ required={true}
590
+ tooltip="Digite um e-mail válido"
591
+ />
592
+
593
+ <HStack spacing={4}>
594
+ <CustomInput
595
+ label="Telefone"
596
+ placeholder="(11) 99999-9999"
597
+ type="tel"
598
+ leftIcon={<Phone />}
599
+ />
600
+ <CustomInput
601
+ label="CPF"
602
+ placeholder="000.000.000-00"
603
+ leftIcon={<User />}
604
+ required={true}
605
+ />
606
+ </HStack>
607
+
608
+ <CustomInput
609
+ label="Senha"
610
+ placeholder="Digite sua senha"
611
+ type="password"
612
+ leftIcon={<Lock />}
613
+ required={true}
614
+ error="Senha deve ter pelo menos 8 caracteres"
615
+ />
616
+
617
+ <CustomInput
618
+ label="Confirmar Senha"
619
+ placeholder="Confirme sua senha"
620
+ type="password"
621
+ leftIcon={<Lock />}
622
+ required={true}
623
+ error="Senhas não coincidem"
624
+ />
625
+ </VStack>
626
+ }
627
+ footer={
628
+ <HStack justify="flex-end" spacing={2}>
629
+ <CustomButton
630
+ variant="outline"
631
+ backgroundColor="transparent"
632
+ color="#3182ce"
633
+ borderColor="#3182ce"
634
+ size="sm"
635
+ >
636
+ Cancelar
637
+ </CustomButton>
638
+ <CustomButton
639
+ variant="primary"
640
+ backgroundColor="#3182ce"
641
+ color="#ffffff"
642
+ size="sm"
643
+ >
644
+ Cadastrar
645
+ </CustomButton>
646
+ </HStack>
647
+ }
648
+ />
649
+ </Box>
650
+
651
+ {/* Formulário de Endereço */}
652
+ <Box>
653
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Formulário de Endereço</Text>
654
+ <CustomCard
655
+ header={<Text fontSize="lg" fontWeight="bold">Endereço de Entrega</Text>}
656
+ body={
657
+ <VStack spacing={4} align="stretch">
658
+ <CustomInput
659
+ label="CEP"
660
+ placeholder="00000-000"
661
+ leftIcon={<MapPin />}
662
+ required={true}
663
+ />
664
+
665
+ <CustomInput
666
+ label="Endereço"
667
+ placeholder="Rua, Avenida, etc."
668
+ leftIcon={<MapPin />}
669
+ required={true}
670
+ />
671
+
672
+ <HStack spacing={4}>
673
+ <CustomInput
674
+ label="Número"
675
+ placeholder="123"
676
+ type="number"
677
+ required={true}
678
+ />
679
+ <CustomInput
680
+ label="Complemento"
681
+ placeholder="Apto, Casa, etc."
682
+ />
683
+ </HStack>
684
+
685
+ <HStack spacing={4}>
686
+ <CustomInput
687
+ label="Bairro"
688
+ placeholder="Digite o bairro"
689
+ leftIcon={<MapPin />}
690
+ required={true}
691
+ />
692
+ <CustomInput
693
+ label="Cidade"
694
+ placeholder="Digite a cidade"
695
+ leftIcon={<MapPin />}
696
+ required={true}
697
+ />
698
+ </HStack>
699
+
700
+ <CustomInput
701
+ label="Estado"
702
+ placeholder="Digite o estado"
703
+ leftIcon={<MapPin />}
704
+ required={true}
705
+ />
706
+ </VStack>
707
+ }
708
+ />
709
+ </Box>
710
+
711
+ {/* Barra de Pesquisa Avançada */}
712
+ <Box>
713
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Barra de Pesquisa Avançada</Text>
714
+ <HStack spacing={3} p={4} bg="gray.50" borderRadius="md">
715
+ <CustomInput
716
+ placeholder="Buscar produtos..."
717
+ type="search"
718
+ leftIcon={<Search />}
719
+ />
720
+
721
+ <CustomInput
722
+ placeholder="Filtrar por preço"
723
+ type="number"
724
+ leftIcon={<Filter />}
725
+ />
726
+
727
+ <CustomInput
728
+ placeholder="Data inicial"
729
+ type="date"
730
+ leftIcon={<Calendar />}
731
+ />
732
+
733
+ <CustomInput
734
+ placeholder="Data final"
735
+ type="date"
736
+ leftIcon={<Calendar />}
737
+ />
738
+ </HStack>
739
+ </Box>
740
+
741
+ {/* Formulário de Configurações */}
742
+ <Box>
743
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Configurações de Perfil</Text>
744
+ <CustomCard
745
+ header={<Text fontSize="lg" fontWeight="bold">Configurações</Text>}
746
+ body={
747
+ <VStack spacing={4} align="stretch">
748
+ <CustomInput
749
+ label="Nome de Exibição"
750
+ placeholder="Como você quer ser chamado"
751
+ leftIcon={<User />}
752
+ tooltip="Este nome será exibido para outros usuários"
753
+ />
754
+
755
+ <CustomInput
756
+ label="E-mail de Contato"
757
+ placeholder="E-mail para notificações"
758
+ type="email"
759
+ leftIcon={<Mail />}
760
+ required={true}
761
+ />
762
+
763
+ <CustomInput
764
+ label="Telefone de Emergência"
765
+ placeholder="(11) 99999-9999"
766
+ type="tel"
767
+ leftIcon={<Phone />}
768
+ tooltip="Usado apenas em emergências"
769
+ />
770
+
771
+ <CustomInput
772
+ label="URL do Site"
773
+ placeholder="https://meusite.com"
774
+ type="url"
775
+ leftIcon={<MapPin />}
776
+ />
777
+
778
+ <CustomInput
779
+ label="Fuso Horário"
780
+ placeholder="UTC-3"
781
+ leftIcon={<Clock />}
782
+ tooltip="Fuso horário para agendamentos"
783
+ />
784
+ </VStack>
785
+ }
786
+ />
787
+ </Box>
788
+ </VStack>
789
+ );
790
+ };
791
+ `,
792
+ language: "tsx",
793
+ },
794
+ },
795
+ },
796
+ };
797
+ /** 🎯 IntegrationWithCustomComponents: Integração com outros componentes custom */
798
+ export const IntegrationWithCustomComponents = {
799
+ name: "Integração com Componentes Custom",
800
+ render: () => (_jsxs(VStack, { spacing: 8, align: "stretch", children: [_jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Formul\u00E1rio Completo" }), _jsx(CustomCard, { header: _jsx(Text, { fontSize: "lg", fontWeight: "bold", children: "Cadastro de Produto" }), body: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "Nome do Produto", placeholder: "Digite o nome do produto", leftIcon: _jsx(User, {}), required: true }), _jsx(CustomInput, { label: "SKU", placeholder: "C\u00F3digo do produto", leftIcon: _jsx(Star, {}), required: true })] }), _jsx(CustomInput, { label: "Pre\u00E7o", placeholder: "0,00", type: "number", leftIcon: _jsx(Star, {}), required: true }), _jsx(CustomSelect, { label: "Categoria", placeholder: "Selecione a categoria", options: [
801
+ { value: "eletronicos", label: "Eletrônicos" },
802
+ { value: "roupas", label: "Roupas" },
803
+ { value: "casa", label: "Casa e Jardim" },
804
+ ] }), _jsx(CustomAutocomplete, { label: "Tags", placeholder: "Digite as tags", options: [
805
+ { value: "novo", label: "Novo" },
806
+ { value: "promocao", label: "Promoção" },
807
+ { value: "lancamento", label: "Lançamento" },
808
+ ], allowCustomValue: true }), _jsx(CustomTextarea, { label: "Descri\u00E7\u00E3o", placeholder: "Descreva o produto...", rows: 4 }), _jsx(CustomCheckbox, { label: "Produto ativo", required: true })] }), footer: _jsxs(HStack, { justify: "flex-end", spacing: 2, children: [_jsx(CustomButton, { variant: "outline", backgroundColor: "transparent", color: "#3182ce", borderColor: "#3182ce", size: "sm", children: "Cancelar" }), _jsx(CustomButton, { variant: "primary", backgroundColor: "#3182ce", color: "#ffffff", size: "sm", children: "Salvar Produto" })] }) })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Dashboard com Filtros" }), _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsxs(HStack, { spacing: 3, p: 4, bg: "gray.50", borderRadius: "md", children: [_jsx(CustomInput, { placeholder: "Buscar usu\u00E1rios...", type: "search", leftIcon: _jsx(SearchIcon, {}) }), _jsx(CustomInput, { placeholder: "Filtrar por idade", type: "number", leftIcon: _jsx(Filter, {}) }), _jsx(CustomSelect, { placeholder: "Status", options: [
809
+ { value: "ativo", label: "Ativo" },
810
+ { value: "inativo", label: "Inativo" },
811
+ { value: "pendente", label: "Pendente" },
812
+ ] }), _jsx(CustomButton, { variant: "primary", backgroundColor: "#3182ce", color: "#ffffff", size: "sm", children: "Aplicar Filtros" })] }), _jsx(CustomTable, { data: [
813
+ { id: 1, name: "João Silva", email: "joao@email.com", status: "Ativo" },
814
+ { id: 2, name: "Maria Santos", email: "maria@email.com", status: "Inativo" },
815
+ { id: 3, name: "Pedro Costa", email: "pedro@email.com", status: "Ativo" },
816
+ ], columns: [
817
+ { header: "Nome", accessor: "name" },
818
+ { header: "E-mail", accessor: "email" },
819
+ { header: "Status", accessor: "status" },
820
+ ] })] })] }), _jsxs(Box, { children: [_jsx(Text, { fontSize: "lg", fontWeight: "bold", mb: 3, children: "Configura\u00E7\u00F5es Avan\u00E7adas" }), _jsx(CustomCard, { header: _jsx(Text, { fontSize: "lg", fontWeight: "bold", children: "Configura\u00E7\u00F5es do Sistema" }), body: _jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsxs(HStack, { spacing: 4, children: [_jsx(CustomInput, { label: "URL da API", placeholder: "https://api.exemplo.com", type: "url", leftIcon: _jsx(MapPin, {}), required: true }), _jsx(CustomInput, { label: "Timeout (ms)", placeholder: "5000", type: "number", leftIcon: _jsx(Clock, {}) })] }), _jsx(CustomInput, { label: "Chave da API", placeholder: "Digite a chave da API", type: "password", leftIcon: _jsx(LockIcon, {}), required: true }), _jsx(CustomSelect, { label: "Ambiente", placeholder: "Selecione o ambiente", options: [
821
+ { value: "dev", label: "Desenvolvimento" },
822
+ { value: "staging", label: "Homologação" },
823
+ { value: "prod", label: "Produção" },
824
+ ] }), _jsx(CustomAutocomplete, { label: "Dom\u00EDnios Permitidos", placeholder: "Digite os dom\u00EDnios", options: [
825
+ { value: "exemplo.com", label: "exemplo.com" },
826
+ { value: "teste.com", label: "teste.com" },
827
+ ], allowCustomValue: true }), _jsx(CustomCheckbox, { label: "Habilitar logs detalhados" }), _jsx(CustomCheckbox, { label: "Modo de manuten\u00E7\u00E3o" })] }) })] })] })),
828
+ parameters: {
829
+ docs: {
830
+ description: {
831
+ story: `
832
+ **Integração completa** do CustomInput com outros componentes custom do sistema Londrisoft.
833
+
834
+ **Cenários demonstrados:**
835
+
836
+ ### 1. Formulário Completo
837
+ - **Campos de entrada**: CustomInput para dados básicos
838
+ - **Seleção**: CustomSelect para categorias
839
+ - **Autocomplete**: CustomAutocomplete para tags
840
+ - **Área de texto**: CustomTextarea para descrições
841
+ - **Checkbox**: CustomCheckbox para opções
842
+ - **Botões**: CustomButton para ações
843
+
844
+ ### 2. Dashboard com Filtros
845
+ - **Busca**: CustomInput com tipo search
846
+ - **Filtros numéricos**: CustomInput com tipo number
847
+ - **Seleção**: CustomSelect para status
848
+ - **Tabela**: CustomTable para exibição de dados
849
+ - **Ações**: CustomButton para aplicar filtros
850
+
851
+ ### 3. Configurações Avançadas
852
+ - **Campos de configuração**: URLs, timeouts, chaves
853
+ - **Seleção de ambiente**: CustomSelect para ambientes
854
+ - **Lista dinâmica**: CustomAutocomplete para domínios
855
+ - **Opções booleanas**: CustomCheckbox para flags
856
+
857
+ **Benefícios da integração:**
858
+ - **Consistência visual**: Todos os componentes seguem o mesmo padrão
859
+ - **Experiência unificada**: Navegação intuitiva entre elementos
860
+ - **Acessibilidade**: ARIA labels e navegação por teclado
861
+ - **Responsividade**: Adaptação automática a diferentes telas
862
+
863
+ **Dicas de implementação:**
864
+ - Use ícones que representem o tipo de dado
865
+ - Mantenha consistência de cores por tipo de funcionalidade
866
+ - Considere o contexto e hierarquia visual
867
+ - Integre com o sistema de design Londrisoft
868
+ `,
869
+ },
870
+ source: {
871
+ code: `
872
+ import React from 'react';
873
+ import { VStack, HStack, Box, Text } from '@chakra-ui/react';
874
+ import {
875
+ User, Star, Search, Filter, Lock, MapPin, Clock
876
+ } from 'lucide-react';
877
+ import { CustomInput } from '../../../components/CustomInput';
878
+ import CustomCard from '../../../components/CustomCard';
879
+ import CustomSelect from '../../../components/CustomSelect';
880
+ import { CustomAutocomplete } from '../../../components/CustomAutoComplete';
881
+ import CustomTextarea from '../../../components/CustomTextarea';
882
+ import { CustomCheckbox } from '../../../components/CustomCheckBox';
883
+ import { CustomTable } from '../../../components/CustomTable';
884
+ import { CustomButton } from '../../../components/CustomButton';
885
+
886
+ const IntegrationExample = () => {
887
+ return (
888
+ <VStack spacing={8} align="stretch">
889
+ {/* Formulário Completo */}
890
+ <Box>
891
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Formulário Completo</Text>
892
+ <CustomCard
893
+ header={<Text fontSize="lg" fontWeight="bold">Cadastro de Produto</Text>}
894
+ body={
895
+ <VStack spacing={4} align="stretch">
896
+ <HStack spacing={4}>
897
+ <CustomInput
898
+ label="Nome do Produto"
899
+ placeholder="Digite o nome do produto"
900
+ leftIcon={<User />}
901
+ required={true}
902
+ />
903
+ <CustomInput
904
+ label="SKU"
905
+ placeholder="Código do produto"
906
+ leftIcon={<Star />}
907
+ required={true}
908
+ />
909
+ </HStack>
910
+
911
+ <CustomInput
912
+ label="Preço"
913
+ placeholder="0,00"
914
+ type="number"
915
+ leftIcon={<Star />}
916
+ required={true}
917
+ />
918
+
919
+ <CustomSelect
920
+ label="Categoria"
921
+ placeholder="Selecione a categoria"
922
+ options={[
923
+ { value: "eletronicos", label: "Eletrônicos" },
924
+ { value: "roupas", label: "Roupas" },
925
+ { value: "casa", label: "Casa e Jardim" },
926
+ ]}
927
+ />
928
+
929
+ <CustomAutocomplete
930
+ label="Tags"
931
+ placeholder="Digite as tags"
932
+ options={[
933
+ { value: "novo", label: "Novo" },
934
+ { value: "promocao", label: "Promoção" },
935
+ { value: "lancamento", label: "Lançamento" },
936
+ ]}
937
+ allowCustomValue={true}
938
+ />
939
+
940
+ <CustomTextarea
941
+ label="Descrição"
942
+ placeholder="Descreva o produto..."
943
+ rows={4}
944
+ />
945
+
946
+ <CustomCheckbox
947
+ label="Produto ativo"
948
+ required={true}
949
+ />
950
+ </VStack>
951
+ }
952
+ footer={
953
+ <HStack justify="flex-end" spacing={2}>
954
+ <CustomButton
955
+ variant="outline"
956
+ backgroundColor="transparent"
957
+ color="#3182ce"
958
+ borderColor="#3182ce"
959
+ size="sm"
960
+ >
961
+ Cancelar
962
+ </CustomButton>
963
+ <CustomButton
964
+ variant="primary"
965
+ backgroundColor="#3182ce"
966
+ color="#ffffff"
967
+ size="sm"
968
+ >
969
+ Salvar Produto
970
+ </CustomButton>
971
+ </HStack>
972
+ }
973
+ />
974
+ </Box>
975
+
976
+ {/* Dashboard com Filtros */}
977
+ <Box>
978
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Dashboard com Filtros</Text>
979
+ <VStack spacing={4} align="stretch">
980
+ <HStack spacing={3} p={4} bg="gray.50" borderRadius="md">
981
+ <CustomInput
982
+ placeholder="Buscar usuários..."
983
+ type="search"
984
+ leftIcon={<Search />}
985
+ />
986
+ <CustomInput
987
+ placeholder="Filtrar por idade"
988
+ type="number"
989
+ leftIcon={<Filter />}
990
+ />
991
+ <CustomSelect
992
+ placeholder="Status"
993
+ options={[
994
+ { value: "ativo", label: "Ativo" },
995
+ { value: "inativo", label: "Inativo" },
996
+ { value: "pendente", label: "Pendente" },
997
+ ]}
998
+ />
999
+ <CustomButton
1000
+ variant="primary"
1001
+ backgroundColor="#3182ce"
1002
+ color="#ffffff"
1003
+ size="sm"
1004
+ >
1005
+ Aplicar Filtros
1006
+ </CustomButton>
1007
+ </HStack>
1008
+
1009
+ <CustomTable
1010
+ data={[
1011
+ { id: 1, name: "João Silva", email: "joao@email.com", status: "Ativo" },
1012
+ { id: 2, name: "Maria Santos", email: "maria@email.com", status: "Inativo" },
1013
+ { id: 3, name: "Pedro Costa", email: "pedro@email.com", status: "Ativo" },
1014
+ ]}
1015
+ columns={[
1016
+ { header: "Nome", accessor: "name" },
1017
+ { header: "E-mail", accessor: "email" },
1018
+ { header: "Status", accessor: "status" },
1019
+ ]}
1020
+ />
1021
+ </VStack>
1022
+ </Box>
1023
+
1024
+ {/* Configurações Avançadas */}
1025
+ <Box>
1026
+ <Text fontSize="lg" fontWeight="bold" mb={3}>Configurações Avançadas</Text>
1027
+ <CustomCard
1028
+ header={<Text fontSize="lg" fontWeight="bold">Configurações do Sistema</Text>}
1029
+ body={
1030
+ <VStack spacing={4} align="stretch">
1031
+ <HStack spacing={4}>
1032
+ <CustomInput
1033
+ label="URL da API"
1034
+ placeholder="https://api.exemplo.com"
1035
+ type="url"
1036
+ leftIcon={<MapPin />}
1037
+ required={true}
1038
+ />
1039
+ <CustomInput
1040
+ label="Timeout (ms)"
1041
+ placeholder="5000"
1042
+ type="number"
1043
+ leftIcon={<Clock />}
1044
+ />
1045
+ </HStack>
1046
+
1047
+ <CustomInput
1048
+ label="Chave da API"
1049
+ placeholder="Digite a chave da API"
1050
+ type="password"
1051
+ leftIcon={<Lock />}
1052
+ required={true}
1053
+ />
1054
+
1055
+ <CustomSelect
1056
+ label="Ambiente"
1057
+ placeholder="Selecione o ambiente"
1058
+ options={[
1059
+ { value: "dev", label: "Desenvolvimento" },
1060
+ { value: "staging", label: "Homologação" },
1061
+ { value: "prod", label: "Produção" },
1062
+ ]}
1063
+ />
1064
+
1065
+ <CustomAutocomplete
1066
+ label="Domínios Permitidos"
1067
+ placeholder="Digite os domínios"
1068
+ options={[
1069
+ { value: "exemplo.com", label: "exemplo.com" },
1070
+ { value: "teste.com", label: "teste.com" },
1071
+ ]}
1072
+ allowCustomValue={true}
1073
+ />
1074
+
1075
+ <CustomCheckbox
1076
+ label="Habilitar logs detalhados"
1077
+ />
1078
+
1079
+ <CustomCheckbox
1080
+ label="Modo de manutenção"
1081
+ />
1082
+ </VStack>
1083
+ }
1084
+ />
1085
+ </Box>
1086
+ </VStack>
1087
+ );
1088
+ };
1089
+ `,
1090
+ language: "tsx",
1091
+ },
1092
+ },
1093
+ },
1094
+ };