anima-ds-nucleus 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +20 -0
- package/README.md +109 -0
- package/dist/anima-ds.cjs.js +1332 -0
- package/dist/anima-ds.esm.js +88297 -0
- package/dist/vite.svg +1 -0
- package/package.json +76 -0
- package/src/assets/charly.png +0 -0
- package/src/components/Atoms/Alert/Alert.jsx +52 -0
- package/src/components/Atoms/Alert/Alert.stories.jsx +62 -0
- package/src/components/Atoms/Avatar/Avatar.jsx +60 -0
- package/src/components/Atoms/Avatar/Avatar.stories.jsx +61 -0
- package/src/components/Atoms/Badge/Badge.jsx +34 -0
- package/src/components/Atoms/Badge/Badge.stories.jsx +55 -0
- package/src/components/Atoms/Button/Button.jsx +281 -0
- package/src/components/Atoms/Button/Button.stories.jsx +365 -0
- package/src/components/Atoms/Divider/Divider.jsx +49 -0
- package/src/components/Atoms/Divider/Divider.stories.jsx +62 -0
- package/src/components/Atoms/Icon/Icon.jsx +361 -0
- package/src/components/Atoms/Icon/Icon.stories.jsx +115 -0
- package/src/components/Atoms/Label/Label.jsx +22 -0
- package/src/components/Atoms/Progress/Progress.jsx +49 -0
- package/src/components/Atoms/Progress/Progress.stories.jsx +88 -0
- package/src/components/Atoms/Radios/Radios.jsx +39 -0
- package/src/components/Atoms/Radios/Radios.stories.jsx +119 -0
- package/src/components/Atoms/Shadow/Shadow.stories.jsx +25 -0
- package/src/components/Atoms/Skeleton/Skeleton.jsx +50 -0
- package/src/components/Atoms/Skeleton/Skeleton.stories.jsx +55 -0
- package/src/components/Atoms/Spacing/Spacing.jsx +56 -0
- package/src/components/Atoms/Spacing/Spacing.stories.jsx +78 -0
- package/src/components/Atoms/Spinner/Spinner.jsx +47 -0
- package/src/components/Atoms/Spinner/Spinner.stories.jsx +56 -0
- package/src/components/Atoms/Toast/Toast.jsx +74 -0
- package/src/components/Atoms/Toast/Toast.stories.jsx +101 -0
- package/src/components/Atoms/Tooltip/Tooltip.jsx +49 -0
- package/src/components/Atoms/Tooltip/Tooltip.stories.jsx +58 -0
- package/src/components/Atoms/Typography/Typography.jsx +52 -0
- package/src/components/Atoms/Typography/Typography.stories.jsx +267 -0
- package/src/components/DataDisplay/AreaChart/AreaChart.jsx +95 -0
- package/src/components/DataDisplay/AreaChart/AreaChart.stories.jsx +51 -0
- package/src/components/DataDisplay/BarChart/BarChart.jsx +90 -0
- package/src/components/DataDisplay/BarChart/BarChart.stories.jsx +60 -0
- package/src/components/DataDisplay/Card/Card.jsx +31 -0
- package/src/components/DataDisplay/Card/Card.stories.jsx +50 -0
- package/src/components/DataDisplay/ColumnChart/ColumnChart.jsx +92 -0
- package/src/components/DataDisplay/ColumnChart/ColumnChart.stories.jsx +65 -0
- package/src/components/DataDisplay/DBGrid/DBGrid.jsx +138 -0
- package/src/components/DataDisplay/DBGrid/DBGrid.stories.jsx +126 -0
- package/src/components/DataDisplay/DonutChart/DonutChart.jsx +83 -0
- package/src/components/DataDisplay/DonutChart/DonutChart.stories.jsx +48 -0
- package/src/components/DataDisplay/EmptyState/EmptyState.jsx +30 -0
- package/src/components/DataDisplay/EmptyState/EmptyState.stories.jsx +42 -0
- package/src/components/DataDisplay/LineChart/LineChart.jsx +86 -0
- package/src/components/DataDisplay/LineChart/LineChart.stories.jsx +67 -0
- package/src/components/DataDisplay/List/List.jsx +30 -0
- package/src/components/DataDisplay/List/List.stories.jsx +59 -0
- package/src/components/DataDisplay/PieChart/PieChart.jsx +64 -0
- package/src/components/DataDisplay/PieChart/PieChart.stories.jsx +47 -0
- package/src/components/DataDisplay/StatCard/StatCard.jsx +55 -0
- package/src/components/DataDisplay/StatCard/StatCard.stories.jsx +59 -0
- package/src/components/DataDisplay/TagList/TagList.jsx +37 -0
- package/src/components/DataDisplay/TagList/TagList.stories.jsx +48 -0
- package/src/components/DataDisplay/Timeline/Timeline.jsx +41 -0
- package/src/components/DataDisplay/Timeline/Timeline.stories.jsx +64 -0
- package/src/components/Inputs/Checkbox/Checkbox.jsx +27 -0
- package/src/components/Inputs/Checkbox/Checkbox.stories.jsx +51 -0
- package/src/components/Inputs/DatePicker/DatePicker.jsx +55 -0
- package/src/components/Inputs/DatePicker/DatePicker.stories.jsx +52 -0
- package/src/components/Inputs/FileUpload/FileUpload.jsx +108 -0
- package/src/components/Inputs/FileUpload/FileUpload.stories.jsx +52 -0
- package/src/components/Inputs/Input/Input.jsx +50 -0
- package/src/components/Inputs/Input/Input.stories.jsx +63 -0
- package/src/components/Inputs/RadioButton/RadioButton.jsx +31 -0
- package/src/components/Inputs/RadioButton/RadioButton.stories.jsx +59 -0
- package/src/components/Inputs/Select/Select.jsx +59 -0
- package/src/components/Inputs/Select/Select.stories.jsx +66 -0
- package/src/components/Inputs/Switch/Switch.jsx +44 -0
- package/src/components/Inputs/Switch/Switch.stories.jsx +51 -0
- package/src/components/Inputs/Textarea/Textarea.jsx +51 -0
- package/src/components/Inputs/Textarea/Textarea.stories.jsx +65 -0
- package/src/components/Layout/Accordion/Accordion.jsx +58 -0
- package/src/components/Layout/Accordion/Accordion.stories.jsx +55 -0
- package/src/components/Layout/Breadcrumbs/Breadcrumbs.jsx +49 -0
- package/src/components/Layout/Breadcrumbs/Breadcrumbs.stories.jsx +44 -0
- package/src/components/Layout/Breakpoint/Breakpoint.jsx +35 -0
- package/src/components/Layout/Breakpoint/Breakpoint.stories.jsx +348 -0
- package/src/components/Layout/Drawer/Drawer.jsx +75 -0
- package/src/components/Layout/Drawer/Drawer.stories.jsx +77 -0
- package/src/components/Layout/Dropdown/Dropdown.jsx +83 -0
- package/src/components/Layout/Dropdown/Dropdown.stories.jsx +53 -0
- package/src/components/Layout/Grid/Grid.jsx +39 -0
- package/src/components/Layout/Grid/Grid.stories.jsx +546 -0
- package/src/components/Layout/Header/Header.jsx +50 -0
- package/src/components/Layout/Header/Header.stories.jsx +36 -0
- package/src/components/Layout/Layout/Layout.jsx +14 -0
- package/src/components/Layout/Layout/Layout.stories.jsx +34 -0
- package/src/components/Layout/Modal/Modal.jsx +78 -0
- package/src/components/Layout/Modal/Modal.stories.jsx +98 -0
- package/src/components/Layout/Pagination/Pagination.jsx +109 -0
- package/src/components/Layout/Pagination/Pagination.stories.jsx +62 -0
- package/src/components/Layout/Sidebar/Sidebar.jsx +57 -0
- package/src/components/Layout/Sidebar/Sidebar.stories.jsx +51 -0
- package/src/components/Layout/Stepper/Stepper.jsx +132 -0
- package/src/components/Layout/Stepper/Stepper.stories.jsx +78 -0
- package/src/components/Layout/Tabs/Tabs.jsx +63 -0
- package/src/components/Layout/Tabs/Tabs.stories.jsx +62 -0
- package/src/components/Views/ChangePasswordForm/ChangePasswordForm.jsx +125 -0
- package/src/components/Views/ChangePasswordForm/ChangePasswordForm.stories.jsx +55 -0
- package/src/components/Views/Chat/Chat.jsx +134 -0
- package/src/components/Views/Chat/Chat.stories.jsx +143 -0
- package/src/components/Views/LoginForm/LoginForm.jsx +98 -0
- package/src/components/Views/LoginForm/LoginForm.stories.jsx +55 -0
- package/src/i18n/config.js +209 -0
- package/src/index.js +60 -0
- package/src/main.jsx +510 -0
- package/src/providers/I18nProvider.jsx +13 -0
- package/src/style.css +721 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
import { Button } from './Button';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/Button',
|
|
5
|
+
component: Button,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
texto: {
|
|
9
|
+
control: 'text',
|
|
10
|
+
description: 'Texto a mostrar en el botón',
|
|
11
|
+
},
|
|
12
|
+
tipo: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['Primary', 'Secondary', 'Ghost'],
|
|
15
|
+
description: 'Tipo del botón',
|
|
16
|
+
},
|
|
17
|
+
color: {
|
|
18
|
+
control: 'select',
|
|
19
|
+
options: ['Teal', 'Grape', 'Honey'],
|
|
20
|
+
description: 'Color del botón',
|
|
21
|
+
},
|
|
22
|
+
tamaño: {
|
|
23
|
+
control: 'select',
|
|
24
|
+
options: ['Small', 'Default', 'Large'],
|
|
25
|
+
description: 'Tamaño del botón',
|
|
26
|
+
},
|
|
27
|
+
onClick: {
|
|
28
|
+
action: 'clicked',
|
|
29
|
+
description: 'Función a ejecutar cuando se hace click',
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
control: 'boolean',
|
|
33
|
+
description: 'Estado deshabilitado',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
// Grid de todas las variantes según el diseño
|
|
39
|
+
export const AllVariants = {
|
|
40
|
+
render: () => (
|
|
41
|
+
<div className="space-y-12">
|
|
42
|
+
{/* Teal Theme */}
|
|
43
|
+
<div>
|
|
44
|
+
<h2 className="text-lg font-bold text-gray-900 mb-6">Teal</h2>
|
|
45
|
+
<div className="space-y-6">
|
|
46
|
+
{/* Primary */}
|
|
47
|
+
<div>
|
|
48
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Primary</h3>
|
|
49
|
+
<div className="flex items-center gap-6">
|
|
50
|
+
<div className="flex flex-col items-center gap-2">
|
|
51
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
52
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Small" />
|
|
53
|
+
</div>
|
|
54
|
+
<div className="flex flex-col items-center gap-2">
|
|
55
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
56
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Default" />
|
|
57
|
+
</div>
|
|
58
|
+
<div className="flex flex-col items-center gap-2">
|
|
59
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
60
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Large" />
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{/* Secondary */}
|
|
66
|
+
<div>
|
|
67
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Secondary</h3>
|
|
68
|
+
<div className="flex items-center gap-6">
|
|
69
|
+
<div className="flex flex-col items-center gap-2">
|
|
70
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
71
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Small" />
|
|
72
|
+
</div>
|
|
73
|
+
<div className="flex flex-col items-center gap-2">
|
|
74
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
75
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Default" />
|
|
76
|
+
</div>
|
|
77
|
+
<div className="flex flex-col items-center gap-2">
|
|
78
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
79
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Large" />
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
{/* Ghost */}
|
|
85
|
+
<div>
|
|
86
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Ghost</h3>
|
|
87
|
+
<div className="flex items-center gap-6">
|
|
88
|
+
<div className="flex flex-col items-center gap-2">
|
|
89
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
90
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Small" />
|
|
91
|
+
</div>
|
|
92
|
+
<div className="flex flex-col items-center gap-2">
|
|
93
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
94
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Default" />
|
|
95
|
+
</div>
|
|
96
|
+
<div className="flex flex-col items-center gap-2">
|
|
97
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
98
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Large" />
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
{/* Grape Theme */}
|
|
106
|
+
<div>
|
|
107
|
+
<h2 className="text-lg font-bold text-gray-900 mb-6">Grape</h2>
|
|
108
|
+
<div className="space-y-6">
|
|
109
|
+
{/* Primary */}
|
|
110
|
+
<div>
|
|
111
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Primary</h3>
|
|
112
|
+
<div className="flex items-center gap-6">
|
|
113
|
+
<div className="flex flex-col items-center gap-2">
|
|
114
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
115
|
+
<Button texto="Button" tipo="Primary" color="Grape" tamaño="Small" />
|
|
116
|
+
</div>
|
|
117
|
+
<div className="flex flex-col items-center gap-2">
|
|
118
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
119
|
+
<Button texto="Button" tipo="Primary" color="Grape" tamaño="Default" />
|
|
120
|
+
</div>
|
|
121
|
+
<div className="flex flex-col items-center gap-2">
|
|
122
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
123
|
+
<Button texto="Button" tipo="Primary" color="Grape" tamaño="Large" />
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{/* Secondary */}
|
|
129
|
+
<div>
|
|
130
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Secondary</h3>
|
|
131
|
+
<div className="flex items-center gap-6">
|
|
132
|
+
<div className="flex flex-col items-center gap-2">
|
|
133
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
134
|
+
<Button texto="Button" tipo="Secondary" color="Grape" tamaño="Small" />
|
|
135
|
+
</div>
|
|
136
|
+
<div className="flex flex-col items-center gap-2">
|
|
137
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
138
|
+
<Button texto="Button" tipo="Secondary" color="Grape" tamaño="Default" />
|
|
139
|
+
</div>
|
|
140
|
+
<div className="flex flex-col items-center gap-2">
|
|
141
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
142
|
+
<Button texto="Button" tipo="Secondary" color="Grape" tamaño="Large" />
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
{/* Ghost */}
|
|
148
|
+
<div>
|
|
149
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Ghost</h3>
|
|
150
|
+
<div className="flex items-center gap-6">
|
|
151
|
+
<div className="flex flex-col items-center gap-2">
|
|
152
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
153
|
+
<Button texto="Button" tipo="Ghost" color="Grape" tamaño="Small" />
|
|
154
|
+
</div>
|
|
155
|
+
<div className="flex flex-col items-center gap-2">
|
|
156
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
157
|
+
<Button texto="Button" tipo="Ghost" color="Grape" tamaño="Default" />
|
|
158
|
+
</div>
|
|
159
|
+
<div className="flex flex-col items-center gap-2">
|
|
160
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
161
|
+
<Button texto="Button" tipo="Ghost" color="Grape" tamaño="Large" />
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
{/* Honey Theme */}
|
|
169
|
+
<div>
|
|
170
|
+
<h2 className="text-lg font-bold text-gray-900 mb-6">Honey</h2>
|
|
171
|
+
<div className="space-y-6">
|
|
172
|
+
{/* Primary */}
|
|
173
|
+
<div>
|
|
174
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Primary</h3>
|
|
175
|
+
<div className="flex items-center gap-6">
|
|
176
|
+
<div className="flex flex-col items-center gap-2">
|
|
177
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
178
|
+
<Button texto="Button" tipo="Primary" color="Honey" tamaño="Small" />
|
|
179
|
+
</div>
|
|
180
|
+
<div className="flex flex-col items-center gap-2">
|
|
181
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
182
|
+
<Button texto="Button" tipo="Primary" color="Honey" tamaño="Default" />
|
|
183
|
+
</div>
|
|
184
|
+
<div className="flex flex-col items-center gap-2">
|
|
185
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
186
|
+
<Button texto="Button" tipo="Primary" color="Honey" tamaño="Large" />
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
{/* Secondary */}
|
|
192
|
+
<div>
|
|
193
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Secondary</h3>
|
|
194
|
+
<div className="flex items-center gap-6">
|
|
195
|
+
<div className="flex flex-col items-center gap-2">
|
|
196
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
197
|
+
<Button texto="Button" tipo="Secondary" color="Honey" tamaño="Small" />
|
|
198
|
+
</div>
|
|
199
|
+
<div className="flex flex-col items-center gap-2">
|
|
200
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
201
|
+
<Button texto="Button" tipo="Secondary" color="Honey" tamaño="Default" />
|
|
202
|
+
</div>
|
|
203
|
+
<div className="flex flex-col items-center gap-2">
|
|
204
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
205
|
+
<Button texto="Button" tipo="Secondary" color="Honey" tamaño="Large" />
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
{/* Ghost */}
|
|
211
|
+
<div>
|
|
212
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Ghost</h3>
|
|
213
|
+
<div className="flex items-center gap-6">
|
|
214
|
+
<div className="flex flex-col items-center gap-2">
|
|
215
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
216
|
+
<Button texto="Button" tipo="Ghost" color="Honey" tamaño="Small" />
|
|
217
|
+
</div>
|
|
218
|
+
<div className="flex flex-col items-center gap-2">
|
|
219
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
220
|
+
<Button texto="Button" tipo="Ghost" color="Honey" tamaño="Default" />
|
|
221
|
+
</div>
|
|
222
|
+
<div className="flex flex-col items-center gap-2">
|
|
223
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
224
|
+
<Button texto="Button" tipo="Ghost" color="Honey" tamaño="Large" />
|
|
225
|
+
</div>
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
{/* Disabled States */}
|
|
232
|
+
<div>
|
|
233
|
+
<h2 className="text-lg font-bold text-gray-900 mb-6">Disabled</h2>
|
|
234
|
+
<div className="space-y-6">
|
|
235
|
+
{/* Primary Disabled */}
|
|
236
|
+
<div>
|
|
237
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Primary</h3>
|
|
238
|
+
<div className="flex items-center gap-6">
|
|
239
|
+
<div className="flex flex-col items-center gap-2">
|
|
240
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
241
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Small" disabled />
|
|
242
|
+
</div>
|
|
243
|
+
<div className="flex flex-col items-center gap-2">
|
|
244
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
245
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Default" disabled />
|
|
246
|
+
</div>
|
|
247
|
+
<div className="flex flex-col items-center gap-2">
|
|
248
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
249
|
+
<Button texto="Button" tipo="Primary" color="Teal" tamaño="Large" disabled />
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
{/* Outline Disabled (Secondary disabled) */}
|
|
255
|
+
<div>
|
|
256
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Outline</h3>
|
|
257
|
+
<div className="flex items-center gap-6">
|
|
258
|
+
<div className="flex flex-col items-center gap-2">
|
|
259
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
260
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Small" disabled />
|
|
261
|
+
</div>
|
|
262
|
+
<div className="flex flex-col items-center gap-2">
|
|
263
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
264
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Default" disabled />
|
|
265
|
+
</div>
|
|
266
|
+
<div className="flex flex-col items-center gap-2">
|
|
267
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
268
|
+
<Button texto="Button" tipo="Secondary" color="Teal" tamaño="Large" disabled />
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
{/* Ghost Disabled */}
|
|
274
|
+
<div>
|
|
275
|
+
<h3 className="text-sm font-semibold text-gray-700 mb-4">Ghost</h3>
|
|
276
|
+
<div className="flex items-center gap-6">
|
|
277
|
+
<div className="flex flex-col items-center gap-2">
|
|
278
|
+
<span className="text-xs text-gray-500">Small</span>
|
|
279
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Small" disabled />
|
|
280
|
+
</div>
|
|
281
|
+
<div className="flex flex-col items-center gap-2">
|
|
282
|
+
<span className="text-xs text-gray-500">Default</span>
|
|
283
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Default" disabled />
|
|
284
|
+
</div>
|
|
285
|
+
<div className="flex flex-col items-center gap-2">
|
|
286
|
+
<span className="text-xs text-gray-500">Large</span>
|
|
287
|
+
<Button texto="Button" tipo="Ghost" color="Teal" tamaño="Large" disabled />
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
|
+
</div>
|
|
293
|
+
</div>
|
|
294
|
+
),
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
// Ejemplos individuales
|
|
298
|
+
export const Primary = {
|
|
299
|
+
args: {
|
|
300
|
+
texto: 'Button',
|
|
301
|
+
tipo: 'Primary',
|
|
302
|
+
tamaño: 'Default',
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
export const Secondary = {
|
|
307
|
+
args: {
|
|
308
|
+
texto: 'Button',
|
|
309
|
+
tipo: 'Secondary',
|
|
310
|
+
tamaño: 'Default',
|
|
311
|
+
},
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
export const Ghost = {
|
|
315
|
+
args: {
|
|
316
|
+
texto: 'Button',
|
|
317
|
+
tipo: 'Ghost',
|
|
318
|
+
tamaño: 'Default',
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export const Disabled = {
|
|
323
|
+
args: {
|
|
324
|
+
texto: 'Button',
|
|
325
|
+
tipo: 'Primary',
|
|
326
|
+
color: 'Teal',
|
|
327
|
+
tamaño: 'Default',
|
|
328
|
+
disabled: true,
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export const Small = {
|
|
333
|
+
args: {
|
|
334
|
+
texto: 'Button',
|
|
335
|
+
tipo: 'Primary',
|
|
336
|
+
tamaño: 'Small',
|
|
337
|
+
},
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
export const Default = {
|
|
341
|
+
args: {
|
|
342
|
+
texto: 'Button',
|
|
343
|
+
tipo: 'Primary',
|
|
344
|
+
tamaño: 'Default',
|
|
345
|
+
},
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
export const Large = {
|
|
349
|
+
args: {
|
|
350
|
+
texto: 'Button',
|
|
351
|
+
tipo: 'Primary',
|
|
352
|
+
tamaño: 'Large',
|
|
353
|
+
},
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// Ejemplo con onClick
|
|
357
|
+
export const WithClickHandler = {
|
|
358
|
+
args: {
|
|
359
|
+
texto: 'Click me!',
|
|
360
|
+
tipo: 'Primary',
|
|
361
|
+
tamaño: 'Default',
|
|
362
|
+
onClick: () => alert('Button clicked!'),
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export const Divider = ({
|
|
2
|
+
orientation = 'horizontal',
|
|
3
|
+
variant = 'solid',
|
|
4
|
+
spacing = 'medium',
|
|
5
|
+
label,
|
|
6
|
+
className = '',
|
|
7
|
+
...props
|
|
8
|
+
}) => {
|
|
9
|
+
const variantClasses = {
|
|
10
|
+
solid: 'border-solid',
|
|
11
|
+
dashed: 'border-dashed',
|
|
12
|
+
dotted: 'border-dotted',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const spacingClasses = {
|
|
16
|
+
small: orientation === 'horizontal' ? 'my-2' : 'mx-2',
|
|
17
|
+
medium: orientation === 'horizontal' ? 'my-4' : 'mx-4',
|
|
18
|
+
large: orientation === 'horizontal' ? 'my-6' : 'mx-6',
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
if (orientation === 'vertical') {
|
|
22
|
+
return (
|
|
23
|
+
<div
|
|
24
|
+
className={`border-l border-gray-300 ${variantClasses[variant]} ${spacingClasses[spacing]} ${className}`}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (label) {
|
|
31
|
+
return (
|
|
32
|
+
<div className={`flex items-center ${spacingClasses[spacing]} ${className}`} {...props}>
|
|
33
|
+
<div className={`flex-1 border-t border-gray-300 ${variantClasses[variant]}`} />
|
|
34
|
+
<span className="px-4 text-sm text-gray-500">{label}</span>
|
|
35
|
+
<div className={`flex-1 border-t border-gray-300 ${variantClasses[variant]}`} />
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<hr
|
|
42
|
+
className={`border-0 border-t border-gray-300 ${variantClasses[variant]} ${spacingClasses[spacing]} ${className}`}
|
|
43
|
+
{...props}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default Divider;
|
|
49
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Divider } from './Divider';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Atoms/Divider',
|
|
5
|
+
component: Divider,
|
|
6
|
+
tags: ['autodocs'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
orientation: {
|
|
9
|
+
control: 'select',
|
|
10
|
+
options: ['horizontal', 'vertical'],
|
|
11
|
+
},
|
|
12
|
+
variant: {
|
|
13
|
+
control: 'select',
|
|
14
|
+
options: ['solid', 'dashed', 'dotted'],
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const Default = {
|
|
20
|
+
args: {},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const WithLabel = {
|
|
24
|
+
args: {
|
|
25
|
+
label: 'O',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export const Dashed = {
|
|
30
|
+
args: {
|
|
31
|
+
variant: 'dashed',
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const Dotted = {
|
|
36
|
+
args: {
|
|
37
|
+
variant: 'dotted',
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Vertical = {
|
|
42
|
+
render: () => (
|
|
43
|
+
<div className="flex items-center h-20">
|
|
44
|
+
<span>Izquierda</span>
|
|
45
|
+
<Divider orientation="vertical" />
|
|
46
|
+
<span>Derecha</span>
|
|
47
|
+
</div>
|
|
48
|
+
),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const SmallSpacing = {
|
|
52
|
+
args: {
|
|
53
|
+
spacing: 'small',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const LargeSpacing = {
|
|
58
|
+
args: {
|
|
59
|
+
spacing: 'large',
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|