@adamosuiteservices/ui 2.9.15 → 2.10.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/dist/accordion-rounded.cjs +12 -17
- package/dist/accordion-rounded.js +37 -46
- package/dist/accordion.cjs +8 -7
- package/dist/accordion.js +19 -17
- package/dist/alert.cjs +7 -3
- package/dist/alert.js +14 -10
- package/dist/avatar.cjs +2 -0
- package/dist/avatar.js +42 -40
- package/dist/badge.cjs +9 -2
- package/dist/badge.js +19 -12
- package/dist/breadcrumb.cjs +7 -3
- package/dist/breadcrumb.js +30 -24
- package/dist/{button-B7ZP4LZN.js → button-CUNnLccZ.js} +11 -6
- package/dist/{button-D-qFRXiM.cjs → button-CxGyLoeN.cjs} +7 -2
- package/dist/button-group.cjs +2 -0
- package/dist/button-group.js +15 -13
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +8 -6
- package/dist/calendar.js +507 -492
- package/dist/card.cjs +9 -4
- package/dist/card.js +8 -3
- package/dist/checkbox-CFGlO5wt.cjs +22 -0
- package/dist/{checkbox-DhBcmKze.js → checkbox-DsN1IQGA.js} +70 -68
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/combobox.cjs +10 -13
- package/dist/combobox.js +90 -99
- package/dist/components/ui/icon/icon.d.ts +1 -3
- package/dist/components/ui/icon/icon.stories.d.ts +0 -5
- package/dist/components/ui/spinner/spinner.d.ts +1 -1
- package/dist/components/ui/tooltip/tooltip.stories.d.ts +0 -1
- package/dist/context-menu.cjs +10 -8
- package/dist/context-menu.js +126 -120
- package/dist/custom-layered-styles.css +1 -1
- package/dist/dialog.cjs +10 -7
- package/dist/dialog.js +43 -40
- package/dist/dropdown-menu.cjs +25 -10
- package/dist/dropdown-menu.js +179 -166
- package/dist/icon-D0vVkV-A.js +35 -0
- package/dist/icon-SWksUOv5.cjs +6 -0
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -1
- package/dist/icons.css +1 -1
- package/dist/input-group.cjs +14 -6
- package/dist/input-group.js +25 -17
- package/dist/kbd.cjs +3 -3
- package/dist/kbd.js +1 -0
- package/dist/pagination.cjs +4 -4
- package/dist/pagination.js +41 -43
- package/dist/radio-group.cjs +5 -5
- package/dist/radio-group.js +44 -42
- package/dist/radius.css +1 -1
- package/dist/select.cjs +12 -13
- package/dist/select.js +182 -187
- package/dist/{sheet-Q3dBOQG-.js → sheet-DM7b3ckK.js} +18 -18
- package/dist/{sheet-CGahUP7F.cjs → sheet-DfRu4ByS.cjs} +4 -4
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +6 -11
- package/dist/sidebar.js +38 -49
- package/dist/spinner.cjs +1 -6
- package/dist/spinner.js +10 -16
- package/dist/styles.css +1 -1
- package/dist/tabs-underline.cjs +6 -3
- package/dist/tabs-underline.js +8 -5
- package/dist/tabs.cjs +6 -3
- package/dist/tabs.js +8 -5
- package/dist/toggle.cjs +5 -2
- package/dist/toggle.js +14 -11
- package/docs/components/layout/sidebar.md +18 -23
- package/docs/components/ui/accordion-rounded.md +584 -583
- package/docs/components/ui/accordion.md +3 -1
- package/docs/components/ui/alert.md +650 -671
- package/docs/components/ui/avatar.md +587 -588
- package/docs/components/ui/badge.md +1019 -1024
- package/docs/components/ui/breadcrumb.md +14 -14
- package/docs/components/ui/button-group.md +69 -87
- package/docs/components/ui/button.md +17 -17
- package/docs/components/ui/calendar.md +6 -6
- package/docs/components/ui/card.md +21 -27
- package/docs/components/ui/collapsible.md +16 -13
- package/docs/components/ui/combobox.md +14 -14
- package/docs/components/ui/command.md +6 -6
- package/docs/components/ui/context-menu.md +23 -23
- package/docs/components/ui/dialog.md +16 -16
- package/docs/components/ui/dropdown-menu.md +44 -66
- package/docs/components/ui/hover-card.md +5 -5
- package/docs/components/ui/icon.md +87 -88
- package/docs/components/ui/input-group.md +523 -509
- package/docs/components/ui/kbd.md +8 -8
- package/docs/components/ui/label.md +5 -5
- package/docs/components/ui/pagination.md +5 -5
- package/docs/components/ui/popover.md +14 -14
- package/docs/components/ui/progress.md +2 -2
- package/docs/components/ui/radio-group.md +2 -2
- package/docs/components/ui/select.md +6 -6
- package/docs/components/ui/spinner.md +15 -15
- package/docs/components/ui/switch.md +15 -9
- package/docs/components/ui/tabs-underline.md +4 -4
- package/docs/components/ui/tabs.md +5 -5
- package/docs/components/ui/toggle.md +17 -23
- package/docs/components/ui/tooltip.md +7 -10
- package/package.json +1 -1
- package/dist/check-CLxNVljQ.cjs +0 -6
- package/dist/check-Ci0GjV-B.js +0 -11
- package/dist/checkbox-CdnZ8VFJ.cjs +0 -21
- package/dist/chevron-down-BqEHzml5.cjs +0 -6
- package/dist/chevron-down-CpVS2Z7w.js +0 -11
- package/dist/chevron-left-B8QsBNvc.cjs +0 -6
- package/dist/chevron-left-Eal-WYLp.js +0 -11
- package/dist/chevron-right-BpzggHsr.cjs +0 -6
- package/dist/chevron-right-Cnc2tB4-.js +0 -11
- package/dist/circle-CX7JIirj.cjs +0 -6
- package/dist/circle-DYv-7Qb9.js +0 -11
- package/dist/createLucideIcon-B_8CJpcQ.js +0 -94
- package/dist/createLucideIcon-CAtnV-yz.cjs +0 -21
- package/dist/ellipsis-CryjZKZn.js +0 -15
- package/dist/ellipsis-Ct9VTDOG.cjs +0 -6
- package/dist/icon-DTx6Y_mx.cjs +0 -6
- package/dist/icon-DmU_SEHC.js +0 -36
- package/dist/minus-C0pHPx21.cjs +0 -6
- package/dist/minus-DE-onYs2.js +0 -11
- package/dist/x-CBKgg4YL.cjs +0 -6
- package/dist/x-Dl66o_vF.js +0 -14
|
@@ -156,12 +156,12 @@ import { Button } from "@adamosuiteservices/ui/button";
|
|
|
156
156
|
|
|
157
157
|
```tsx
|
|
158
158
|
import { InputGroup, InputGroupInput, InputGroupAddon } from "@adamosuiteservices/ui/input-group";
|
|
159
|
-
import {
|
|
159
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
160
160
|
|
|
161
161
|
<InputGroup>
|
|
162
162
|
<InputGroupInput placeholder="Search..." />
|
|
163
163
|
<InputGroupAddon>
|
|
164
|
-
<
|
|
164
|
+
<Icon symbol="search" className="text-lg" />
|
|
165
165
|
</InputGroupAddon>
|
|
166
166
|
<InputGroupAddon align="inline-end">
|
|
167
167
|
<Kbd>⌘</Kbd>
|
|
@@ -270,22 +270,22 @@ import { Search } from "lucide-react";
|
|
|
270
270
|
### Con Iconos
|
|
271
271
|
|
|
272
272
|
```tsx
|
|
273
|
-
import {
|
|
273
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
274
274
|
|
|
275
275
|
<div className="flex items-center gap-4">
|
|
276
|
-
<Kbd><
|
|
277
|
-
<Kbd><
|
|
278
|
-
<Kbd><
|
|
276
|
+
<Kbd><Icon symbol="save" className="text-sm" /></Kbd>
|
|
277
|
+
<Kbd><Icon symbol="content_copy" className="text-sm" /></Kbd>
|
|
278
|
+
<Kbd><Icon symbol="settings" className="text-sm" /></Kbd>
|
|
279
279
|
</div>
|
|
280
280
|
|
|
281
281
|
<div className="flex items-center gap-2">
|
|
282
282
|
<span className="text-sm">Quick actions:</span>
|
|
283
283
|
<KbdGroup>
|
|
284
|
-
<Kbd><
|
|
284
|
+
<Kbd><Icon symbol="save" className="text-sm" /></Kbd>
|
|
285
285
|
<Kbd>S</Kbd>
|
|
286
286
|
</KbdGroup>
|
|
287
287
|
<KbdGroup>
|
|
288
|
-
<Kbd><
|
|
288
|
+
<Kbd><Icon symbol="content_copy" className="text-sm" /></Kbd>
|
|
289
289
|
<Kbd>C</Kbd>
|
|
290
290
|
</KbdGroup>
|
|
291
291
|
</div>
|
|
@@ -102,13 +102,13 @@ import { Switch } from "@adamosuiteservices/ui/switch";
|
|
|
102
102
|
### Con Iconos
|
|
103
103
|
|
|
104
104
|
```tsx
|
|
105
|
-
import {
|
|
105
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
106
106
|
import { Input } from "@adamosuiteservices/ui/input";
|
|
107
107
|
|
|
108
108
|
<div className="space-y-6">
|
|
109
109
|
<div className="space-y-2">
|
|
110
110
|
<Label htmlFor="username" className="flex items-center gap-2">
|
|
111
|
-
<
|
|
111
|
+
<Icon symbol="person" className="text-lg" />
|
|
112
112
|
Username
|
|
113
113
|
</Label>
|
|
114
114
|
<Input id="username" placeholder="Enter your username" />
|
|
@@ -116,7 +116,7 @@ import { Input } from "@adamosuiteservices/ui/input";
|
|
|
116
116
|
|
|
117
117
|
<div className="space-y-2">
|
|
118
118
|
<Label htmlFor="email" className="flex items-center gap-2">
|
|
119
|
-
<
|
|
119
|
+
<Icon symbol="mail" className="text-lg" />
|
|
120
120
|
Email Address
|
|
121
121
|
</Label>
|
|
122
122
|
<Input id="email" type="email" placeholder="Enter your email" />
|
|
@@ -124,7 +124,7 @@ import { Input } from "@adamosuiteservices/ui/input";
|
|
|
124
124
|
|
|
125
125
|
<div className="space-y-2">
|
|
126
126
|
<Label htmlFor="password" className="flex items-center gap-2">
|
|
127
|
-
<
|
|
127
|
+
<Icon symbol="lock" className="text-lg" />
|
|
128
128
|
Password
|
|
129
129
|
</Label>
|
|
130
130
|
<Input id="password" type="password" />
|
|
@@ -132,7 +132,7 @@ import { Input } from "@adamosuiteservices/ui/input";
|
|
|
132
132
|
|
|
133
133
|
<div className="space-y-2">
|
|
134
134
|
<Label htmlFor="birthday" className="flex items-center gap-2">
|
|
135
|
-
<
|
|
135
|
+
<Icon symbol="calendar_month" className="text-lg" />
|
|
136
136
|
Date of Birth
|
|
137
137
|
</Label>
|
|
138
138
|
<Input id="birthday" type="date" />
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
| `onClick` | `(e) => void` | - | Click handler |
|
|
99
99
|
| `className` | `string` | - | Clases CSS adicionales |
|
|
100
100
|
|
|
101
|
-
**Nota**: PaginationLink con
|
|
101
|
+
**Nota**: PaginationLink con chevron_left icon (Material Symbol), texto "Previous" oculto en mobile
|
|
102
102
|
|
|
103
103
|
### PaginationNext
|
|
104
104
|
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
| `onClick` | `(e) => void` | - | Click handler |
|
|
110
110
|
| `className` | `string` | - | Clases CSS adicionales |
|
|
111
111
|
|
|
112
|
-
**Nota**: PaginationLink con
|
|
112
|
+
**Nota**: PaginationLink con chevron_right icon (Material Symbol), texto "Next" oculto en mobile
|
|
113
113
|
|
|
114
114
|
### PaginationEllipsis
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
| ----------- | -------- | ---------------------- |
|
|
118
118
|
| `className` | `string` | Clases CSS adicionales |
|
|
119
119
|
|
|
120
|
-
**Nota**: `<span>` con
|
|
120
|
+
**Nota**: `<span>` con more_horiz icon (Material Symbol) y `aria-hidden`
|
|
121
121
|
|
|
122
122
|
## Patrones de Uso
|
|
123
123
|
|
|
@@ -574,7 +574,7 @@ className = "pointer-events-none opacity-50";
|
|
|
574
574
|
### PaginationEllipsis
|
|
575
575
|
|
|
576
576
|
- **Size**: `size-9`
|
|
577
|
-
- **Icon**:
|
|
577
|
+
- **Icon**: more_horiz (Material Symbol) con `text-lg`
|
|
578
578
|
- **Layout**: `flex items-center justify-center`
|
|
579
579
|
- **ARIA**: `aria-hidden`
|
|
580
580
|
|
|
@@ -595,7 +595,7 @@ className = "pointer-events-none opacity-50";
|
|
|
595
595
|
## Notas de Implementación
|
|
596
596
|
|
|
597
597
|
- **Links**: PaginationLink es `<a>` no `<button>`, usa Button styles
|
|
598
|
-
- **Icons**:
|
|
598
|
+
- **Icons**: chevron_left, chevron_right, more_horiz (Material Symbols)
|
|
599
599
|
- **Responsive text**: Previous/Next usan `hidden sm:block` en texto
|
|
600
600
|
- **No state**: Componente stateless, maneja estado externamente
|
|
601
601
|
- **Ellipsis logic**: Representación negativa (-1, -2) común para identificar ellipsis
|
|
@@ -119,7 +119,7 @@ import {
|
|
|
119
119
|
AvatarImage,
|
|
120
120
|
AvatarFallback,
|
|
121
121
|
} from "@adamosuiteservices/ui/avatar";
|
|
122
|
-
import {
|
|
122
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
123
123
|
|
|
124
124
|
<Popover>
|
|
125
125
|
<PopoverTrigger asChild>
|
|
@@ -142,7 +142,7 @@ import { Calendar } from "lucide-react";
|
|
|
142
142
|
The React Framework – created and maintained by @vercel.
|
|
143
143
|
</p>
|
|
144
144
|
<div className="flex items-center pt-2">
|
|
145
|
-
<
|
|
145
|
+
<Icon symbol="calendar_month" className="mr-2 text-lg opacity-70" />
|
|
146
146
|
<span className="text-xs text-muted-foreground">
|
|
147
147
|
Joined December 2021
|
|
148
148
|
</span>
|
|
@@ -158,12 +158,12 @@ import { Calendar } from "lucide-react";
|
|
|
158
158
|
```tsx
|
|
159
159
|
import { Switch } from "@adamosuiteservices/ui/switch";
|
|
160
160
|
import { Separator } from "@adamosuiteservices/ui/separator";
|
|
161
|
-
import {
|
|
161
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
162
162
|
|
|
163
163
|
<Popover>
|
|
164
164
|
<PopoverTrigger asChild>
|
|
165
165
|
<Button variant="outline" size="icon">
|
|
166
|
-
<
|
|
166
|
+
<Icon symbol="settings" className="text-lg" />
|
|
167
167
|
</Button>
|
|
168
168
|
</PopoverTrigger>
|
|
169
169
|
<PopoverContent className="w-80">
|
|
@@ -201,7 +201,7 @@ import { Settings } from "lucide-react";
|
|
|
201
201
|
```tsx
|
|
202
202
|
import { useState } from "react";
|
|
203
203
|
import { Calendar } from "@adamosuiteservices/ui/calendar";
|
|
204
|
-
import {
|
|
204
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
205
205
|
|
|
206
206
|
function App() {
|
|
207
207
|
const [date, setDate] = useState<Date | undefined>(new Date());
|
|
@@ -216,7 +216,7 @@ function App() {
|
|
|
216
216
|
!date && "text-muted-foreground"
|
|
217
217
|
)}
|
|
218
218
|
>
|
|
219
|
-
<
|
|
219
|
+
<Icon symbol="calendar_month" className="mr-2 text-lg" />
|
|
220
220
|
{date ? date.toLocaleDateString() : "Pick a date"}
|
|
221
221
|
</Button>
|
|
222
222
|
</PopoverTrigger>
|
|
@@ -237,7 +237,7 @@ function App() {
|
|
|
237
237
|
|
|
238
238
|
```tsx
|
|
239
239
|
import { useState } from "react";
|
|
240
|
-
import {
|
|
240
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
241
241
|
|
|
242
242
|
function App() {
|
|
243
243
|
const [count, setCount] = useState(0);
|
|
@@ -262,7 +262,7 @@ function App() {
|
|
|
262
262
|
onClick={() => setCount(Math.max(0, count - 1))}
|
|
263
263
|
disabled={count === 0}
|
|
264
264
|
>
|
|
265
|
-
<
|
|
265
|
+
<Icon symbol="remove" className="text-lg" />
|
|
266
266
|
</Button>
|
|
267
267
|
<div className="flex items-center justify-center w-16 h-10 border rounded">
|
|
268
268
|
{count}
|
|
@@ -272,7 +272,7 @@ function App() {
|
|
|
272
272
|
size="icon"
|
|
273
273
|
onClick={() => setCount(count + 1)}
|
|
274
274
|
>
|
|
275
|
-
<
|
|
275
|
+
<Icon symbol="add" className="text-lg" />
|
|
276
276
|
</Button>
|
|
277
277
|
</div>
|
|
278
278
|
<div className="flex gap-2">
|
|
@@ -293,20 +293,20 @@ function App() {
|
|
|
293
293
|
### Con Info Icon
|
|
294
294
|
|
|
295
295
|
```tsx
|
|
296
|
-
import {
|
|
296
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
297
297
|
|
|
298
298
|
<div className="flex items-center gap-4">
|
|
299
299
|
<span>Complex Feature</span>
|
|
300
300
|
<Popover>
|
|
301
301
|
<PopoverTrigger asChild>
|
|
302
302
|
<Button variant="ghost" size="icon" className="h-5 w-5">
|
|
303
|
-
<
|
|
303
|
+
<Icon symbol="info" className="text-sm" />
|
|
304
304
|
</Button>
|
|
305
305
|
</PopoverTrigger>
|
|
306
306
|
<PopoverContent className="w-80">
|
|
307
307
|
<div className="space-y-3">
|
|
308
308
|
<div className="flex items-center gap-2">
|
|
309
|
-
<
|
|
309
|
+
<Icon symbol="error" className="text-lg text-blue-500" />
|
|
310
310
|
<h4 className="font-medium">About this feature</h4>
|
|
311
311
|
</div>
|
|
312
312
|
<p className="text-sm text-muted-foreground">
|
|
@@ -329,14 +329,14 @@ import { Info, AlertCircle } from "lucide-react";
|
|
|
329
329
|
### Con Notifications
|
|
330
330
|
|
|
331
331
|
```tsx
|
|
332
|
-
import {
|
|
332
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
333
333
|
import { Badge } from "@adamosuiteservices/ui/badge";
|
|
334
334
|
import { Separator } from "@adamosuiteservices/ui/separator";
|
|
335
335
|
|
|
336
336
|
<Popover>
|
|
337
337
|
<PopoverTrigger asChild>
|
|
338
338
|
<Button variant="outline" size="icon" className="relative">
|
|
339
|
-
<
|
|
339
|
+
<Icon symbol="mail" className="text-lg" />
|
|
340
340
|
<Badge
|
|
341
341
|
className="absolute -top-2 -right-2 h-5 w-5 p-0 flex items-center justify-center"
|
|
342
342
|
variant="destructive"
|
|
@@ -97,11 +97,11 @@ function App() {
|
|
|
97
97
|
### Con Iconos
|
|
98
98
|
|
|
99
99
|
```tsx
|
|
100
|
-
import {
|
|
100
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
101
101
|
|
|
102
102
|
<div className="space-y-2">
|
|
103
103
|
<div className="flex items-center gap-2">
|
|
104
|
-
<
|
|
104
|
+
<Icon symbol="download" className="text-lg" />
|
|
105
105
|
<Label>Download</Label>
|
|
106
106
|
<span className="ml-auto text-sm text-muted-foreground">65%</span>
|
|
107
107
|
</div>
|
|
@@ -275,7 +275,7 @@ function App() {
|
|
|
275
275
|
|
|
276
276
|
- **Size**: `size-5` (20px)
|
|
277
277
|
- **Border**: `border-input` con `shadow-xs`
|
|
278
|
-
- **Checked**: `
|
|
278
|
+
- **Checked**: Icon `circle` con `text-primary`
|
|
279
279
|
- **Focus**: `ring-ring/50` con `ring-[3px]`
|
|
280
280
|
- **Invalid**: `border-destructive` con `ring-destructive/20`
|
|
281
281
|
- **Spacing**: `gap-3` default entre item y label
|
|
@@ -291,7 +291,7 @@ function App() {
|
|
|
291
291
|
## Notas de Implementación
|
|
292
292
|
|
|
293
293
|
- **Radix UI**: Basado en `@radix-ui/react-radio-group`
|
|
294
|
-
- **Indicador**: Usa
|
|
294
|
+
- **Indicador**: Usa Icon component con symbol `circle` y `text-primary`
|
|
295
295
|
- **Grid layout**: Default usa `grid gap-3` para vertical spacing
|
|
296
296
|
- **Data attributes**: `data-slot` para identificar componentes
|
|
297
297
|
- **Controlled**: Usa `value` + `onValueChange`
|
|
@@ -177,7 +177,7 @@ import { SelectGroup, SelectLabel } from "@adamosuiteservices/ui/select";
|
|
|
177
177
|
### Con Iconos
|
|
178
178
|
|
|
179
179
|
```tsx
|
|
180
|
-
import {
|
|
180
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
181
181
|
|
|
182
182
|
<Select>
|
|
183
183
|
<SelectTrigger className="w-[200px]">
|
|
@@ -185,15 +185,15 @@ import { Apple, Banana, Cherry } from "lucide-react";
|
|
|
185
185
|
</SelectTrigger>
|
|
186
186
|
<SelectContent>
|
|
187
187
|
<SelectItem value="apple">
|
|
188
|
-
<
|
|
188
|
+
<Icon symbol="nutrition" className="mr-2 text-lg" />
|
|
189
189
|
Apple
|
|
190
190
|
</SelectItem>
|
|
191
191
|
<SelectItem value="banana">
|
|
192
|
-
<
|
|
192
|
+
<Icon symbol="nutrition" className="mr-2 text-lg" />
|
|
193
193
|
Banana
|
|
194
194
|
</SelectItem>
|
|
195
195
|
<SelectItem value="cherry">
|
|
196
|
-
<
|
|
196
|
+
<Icon symbol="nutrition" className="mr-2 text-lg" />
|
|
197
197
|
Cherry
|
|
198
198
|
</SelectItem>
|
|
199
199
|
</SelectContent>
|
|
@@ -317,7 +317,7 @@ function App() {
|
|
|
317
317
|
- **Focus**: `ring-ring/50` con `ring-[3px]`
|
|
318
318
|
- **Content**: `bg-popover` con `shadow-md` y `border`
|
|
319
319
|
- **Item hover**: `bg-accent text-accent-foreground`
|
|
320
|
-
- **Check icon**: `
|
|
320
|
+
- **Check icon**: Icon `check` con `text-lg` en item seleccionado
|
|
321
321
|
|
|
322
322
|
## Accesibilidad
|
|
323
323
|
|
|
@@ -331,7 +331,7 @@ function App() {
|
|
|
331
331
|
|
|
332
332
|
- **Radix UI**: Basado en `@radix-ui/react-select`
|
|
333
333
|
- **Portal**: SelectContent se renderiza en portal
|
|
334
|
-
- **Iconos**:
|
|
334
|
+
- **Iconos**: Icon `expand_more` en trigger, Icon `check` en items seleccionados, Icon `expand_less`/`expand_more` en scroll buttons
|
|
335
335
|
- **Scroll buttons**: Auto-mostrados cuando content es scrollable
|
|
336
336
|
- **Position**: `popper` (default) para absolute positioning
|
|
337
337
|
- **Type-ahead**: Buscar items escribiendo
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Spinner
|
|
2
2
|
|
|
3
|
-
Indicador de carga animado
|
|
3
|
+
Indicador de carga animado usando Material Symbols. Icono giratorio para estados de loading.
|
|
4
4
|
|
|
5
5
|
## Descripción
|
|
6
6
|
|
|
7
|
-
El componente `Spinner` muestra un indicador de carga animado.
|
|
7
|
+
El componente `Spinner` muestra un indicador de carga animado usando el ícono `progress_activity` de Material Symbols.
|
|
8
8
|
|
|
9
9
|
## Importación
|
|
10
10
|
|
|
@@ -26,7 +26,7 @@ import { Spinner } from "@adamosuiteservices/ui/spinner";
|
|
|
26
26
|
| ----------- | -------- | ------------------------------ |
|
|
27
27
|
| `className` | `string` | Clases CSS para tamaño y color |
|
|
28
28
|
|
|
29
|
-
**Nota**: Acepta todas las props de `<
|
|
29
|
+
**Nota**: Acepta todas las props de `<span>` (Material Symbols es font-based)
|
|
30
30
|
|
|
31
31
|
## Patrones de Uso
|
|
32
32
|
|
|
@@ -39,10 +39,10 @@ import { Spinner } from "@adamosuiteservices/ui/spinner";
|
|
|
39
39
|
### Tamaños
|
|
40
40
|
|
|
41
41
|
```tsx
|
|
42
|
-
<Spinner className="
|
|
43
|
-
<Spinner className="
|
|
44
|
-
<Spinner className="
|
|
45
|
-
<Spinner className="
|
|
42
|
+
<Spinner className="text-sm" />
|
|
43
|
+
<Spinner className="text-lg" /> {/* Default */}
|
|
44
|
+
<Spinner className="text-2xl" />
|
|
45
|
+
<Spinner className="text-3xl" />
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### Colores
|
|
@@ -116,7 +116,7 @@ import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
|
116
116
|
|
|
117
117
|
<Card>
|
|
118
118
|
<CardContent className="flex items-center space-x-3 p-6">
|
|
119
|
-
<Spinner className="
|
|
119
|
+
<Spinner className="text-xl" />
|
|
120
120
|
<span>Processing your payment...</span>
|
|
121
121
|
</CardContent>
|
|
122
122
|
</Card>;
|
|
@@ -126,7 +126,7 @@ import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
|
126
126
|
|
|
127
127
|
```tsx
|
|
128
128
|
<p>
|
|
129
|
-
Loading data <Spinner className="inline
|
|
129
|
+
Loading data <Spinner className="inline text-lg" />
|
|
130
130
|
</p>
|
|
131
131
|
```
|
|
132
132
|
|
|
@@ -140,7 +140,7 @@ import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
|
140
140
|
|
|
141
141
|
## Estilos Base
|
|
142
142
|
|
|
143
|
-
- **Size**: `
|
|
143
|
+
- **Size**: `text-lg` default (font-size based)
|
|
144
144
|
- **Animation**: `animate-spin`
|
|
145
145
|
- **Role**: `role="status"`
|
|
146
146
|
- **ARIA**: `aria-label="Loading"`
|
|
@@ -153,18 +153,18 @@ import { Card, CardContent } from "@adamosuiteservices/ui/card";
|
|
|
153
153
|
|
|
154
154
|
## Notas de Implementación
|
|
155
155
|
|
|
156
|
-
- **
|
|
156
|
+
- **Material Symbols**: Usa Icon component con symbol `progress_activity`
|
|
157
157
|
- **Spin animation**: Tailwind `animate-spin`
|
|
158
|
-
- **
|
|
159
|
-
- **Customizable**: Tamaño y color via className
|
|
158
|
+
- **Font-based**: Material Symbol icon (span element)
|
|
159
|
+
- **Customizable**: Tamaño y color via className con font-size classes
|
|
160
160
|
|
|
161
161
|
## Troubleshooting
|
|
162
162
|
|
|
163
163
|
**No gira**: Verifica `animate-spin` aplicado
|
|
164
|
-
**Muy pequeño/grande**: Ajusta `
|
|
164
|
+
**Muy pequeño/grande**: Ajusta `text-*` en className (text-lg, text-xl, etc.)
|
|
165
165
|
**Color incorrecto**: Usa `text-*` para cambiar color
|
|
166
166
|
**No se ve en button**: Asegúrate de espaciado con gap
|
|
167
167
|
|
|
168
168
|
## Referencias
|
|
169
169
|
|
|
170
|
-
- **
|
|
170
|
+
- **Material Symbols**: <https://fonts.google.com/icons>
|
|
@@ -83,7 +83,7 @@ function App() {
|
|
|
83
83
|
### Con Iconos y Badges
|
|
84
84
|
|
|
85
85
|
```tsx
|
|
86
|
-
import {
|
|
86
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
87
87
|
import { Badge } from "@adamosuiteservices/ui/badge";
|
|
88
88
|
|
|
89
89
|
function Settings() {
|
|
@@ -96,7 +96,10 @@ function Settings() {
|
|
|
96
96
|
return (
|
|
97
97
|
<div className="space-y-4">
|
|
98
98
|
<div className="flex items-center space-x-3">
|
|
99
|
-
<
|
|
99
|
+
<Icon
|
|
100
|
+
symbol="notifications"
|
|
101
|
+
className="text-lg text-muted-foreground"
|
|
102
|
+
/>
|
|
100
103
|
<Switch
|
|
101
104
|
checked={settings.notifications}
|
|
102
105
|
onCheckedChange={(checked) =>
|
|
@@ -110,7 +113,7 @@ function Settings() {
|
|
|
110
113
|
</div>
|
|
111
114
|
|
|
112
115
|
<div className="flex items-center space-x-3">
|
|
113
|
-
<
|
|
116
|
+
<Icon symbol="dark_mode" className="text-lg text-muted-foreground" />
|
|
114
117
|
<Switch
|
|
115
118
|
checked={settings.darkMode}
|
|
116
119
|
onCheckedChange={(checked) =>
|
|
@@ -137,7 +140,7 @@ import {
|
|
|
137
140
|
CardHeader,
|
|
138
141
|
CardTitle,
|
|
139
142
|
} from "@adamosuiteservices/ui/card";
|
|
140
|
-
import {
|
|
143
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
141
144
|
|
|
142
145
|
function ControlCenter() {
|
|
143
146
|
const [deviceSettings, setDeviceSettings] = useState({
|
|
@@ -159,7 +162,7 @@ function ControlCenter() {
|
|
|
159
162
|
<CardContent className="space-y-4">
|
|
160
163
|
<div className="grid grid-cols-2 gap-4">
|
|
161
164
|
<div className="flex flex-col items-center space-y-2 p-3 border rounded-lg">
|
|
162
|
-
<
|
|
165
|
+
<Icon symbol="flight" className="text-2xl text-muted-foreground" />
|
|
163
166
|
<span className="text-sm font-medium">Airplane</span>
|
|
164
167
|
<Switch
|
|
165
168
|
checked={deviceSettings.airplaneMode}
|
|
@@ -169,7 +172,7 @@ function ControlCenter() {
|
|
|
169
172
|
</div>
|
|
170
173
|
|
|
171
174
|
<div className="flex flex-col items-center space-y-2 p-3 border rounded-lg">
|
|
172
|
-
<
|
|
175
|
+
<Icon symbol="wifi" className="text-2xl text-muted-foreground" />
|
|
173
176
|
<span className="text-sm font-medium">Wi-Fi</span>
|
|
174
177
|
<Switch
|
|
175
178
|
checked={deviceSettings.wifi}
|
|
@@ -179,7 +182,10 @@ function ControlCenter() {
|
|
|
179
182
|
</div>
|
|
180
183
|
|
|
181
184
|
<div className="flex flex-col items-center space-y-2 p-3 border rounded-lg">
|
|
182
|
-
<
|
|
185
|
+
<Icon
|
|
186
|
+
symbol="bluetooth"
|
|
187
|
+
className="text-2xl text-muted-foreground"
|
|
188
|
+
/>
|
|
183
189
|
<span className="text-sm font-medium">Bluetooth</span>
|
|
184
190
|
<Switch
|
|
185
191
|
checked={deviceSettings.bluetooth}
|
|
@@ -197,7 +203,7 @@ function ControlCenter() {
|
|
|
197
203
|
### Privacy Settings
|
|
198
204
|
|
|
199
205
|
```tsx
|
|
200
|
-
import {
|
|
206
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
201
207
|
import { Button } from "@adamosuiteservices/ui/button";
|
|
202
208
|
|
|
203
209
|
function PrivacySettings() {
|
|
@@ -212,7 +218,7 @@ function PrivacySettings() {
|
|
|
212
218
|
<Card className="w-full max-w-lg">
|
|
213
219
|
<CardHeader>
|
|
214
220
|
<CardTitle className="flex items-center space-x-2">
|
|
215
|
-
<
|
|
221
|
+
<Icon symbol="shield" className="text-xl" />
|
|
216
222
|
<span>Privacy & Security</span>
|
|
217
223
|
</CardTitle>
|
|
218
224
|
<CardDescription>
|
|
@@ -58,19 +58,19 @@ Idéntico a `tabs` component. Ver documentación de tabs para props completas.
|
|
|
58
58
|
### Con Iconos
|
|
59
59
|
|
|
60
60
|
```tsx
|
|
61
|
-
import {
|
|
61
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
62
62
|
|
|
63
63
|
<TabsUnderlineList>
|
|
64
64
|
<TabsUnderlineTrigger value="charts">
|
|
65
|
-
<
|
|
65
|
+
<Icon symbol="bar_chart" />
|
|
66
66
|
Charts
|
|
67
67
|
</TabsUnderlineTrigger>
|
|
68
68
|
<TabsUnderlineTrigger value="table">
|
|
69
|
-
<
|
|
69
|
+
<Icon symbol="table" />
|
|
70
70
|
Table
|
|
71
71
|
</TabsUnderlineTrigger>
|
|
72
72
|
<TabsUnderlineTrigger value="report">
|
|
73
|
-
<
|
|
73
|
+
<Icon symbol="description" />
|
|
74
74
|
Report
|
|
75
75
|
</TabsUnderlineTrigger>
|
|
76
76
|
</TabsUnderlineList>;
|
|
@@ -82,23 +82,23 @@ const [activeTab, setActiveTab] = useState("overview");
|
|
|
82
82
|
### Con Iconos
|
|
83
83
|
|
|
84
84
|
```tsx
|
|
85
|
-
import {
|
|
85
|
+
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
86
86
|
|
|
87
87
|
<TabsList>
|
|
88
88
|
<TabsTrigger value="home">
|
|
89
|
-
<
|
|
89
|
+
<Icon symbol="home" />
|
|
90
90
|
Home
|
|
91
91
|
</TabsTrigger>
|
|
92
92
|
<TabsTrigger value="settings">
|
|
93
|
-
<
|
|
93
|
+
<Icon symbol="settings" />
|
|
94
94
|
Settings
|
|
95
95
|
</TabsTrigger>
|
|
96
96
|
<TabsTrigger value="profile">
|
|
97
|
-
<
|
|
97
|
+
<Icon symbol="person" />
|
|
98
98
|
Profile
|
|
99
99
|
</TabsTrigger>
|
|
100
100
|
<TabsTrigger value="security">
|
|
101
|
-
<
|
|
101
|
+
<Icon symbol="key" />
|
|
102
102
|
Security
|
|
103
103
|
</TabsTrigger>
|
|
104
104
|
</TabsList>;
|