@adamosuiteservices/ui 2.18.6 → 2.19.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.
- package/README.md +1 -1
- package/dist/accordion-rounded.cjs +8 -8
- package/dist/accordion-rounded.js +12 -12
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/alert.cjs +32 -23
- package/dist/alert.js +53 -43
- package/dist/amount-input.cjs +8 -0
- package/dist/amount-input.js +191 -0
- package/dist/avatar.cjs +7 -7
- package/dist/avatar.js +18 -18
- package/dist/badge.cjs +24 -28
- package/dist/badge.js +45 -42
- package/dist/breadcrumb.cjs +3 -4
- package/dist/breadcrumb.js +17 -18
- package/dist/button-CPm4-98H.cjs +87 -0
- package/dist/button-D4ddrxyp.js +156 -0
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{calendar-Dorq3-wv.cjs → calendar-DXq90PYV.cjs} +20 -22
- package/dist/{calendar-xBaFu2sB.js → calendar-DgfO9zab.js} +239 -240
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.cjs +3 -3
- package/dist/card.js +4 -4
- package/dist/checkbox-CIzBdqN7.cjs +24 -0
- package/dist/{checkbox-DL_jFvgl.js → checkbox-DPlUjwLi.js} +54 -52
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/colors.css +1 -1
- package/dist/combobox-DG9u4g84.js +692 -0
- package/dist/combobox-DylTjGrw.cjs +57 -0
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/components/layout/sidebar/sidebar.d.ts +2 -1
- package/dist/components/layout/toaster/toaster.d.ts +1 -1
- package/dist/components/ui/alert/alert.d.ts +1 -1
- package/dist/components/ui/amount-input/amount-input.d.ts +32 -0
- package/dist/components/ui/amount-input/index.d.ts +1 -0
- package/dist/components/ui/badge/badge.d.ts +3 -2
- package/dist/components/ui/calendar/calendar.d.ts +1 -1
- package/dist/components/ui/combobox/combobox.d.ts +3 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +3 -1
- package/dist/components/ui/selectable-card/index.d.ts +1 -0
- package/dist/components/ui/selectable-card/selectable-card.d.ts +22 -0
- package/dist/components/ui/timeline/index.d.ts +1 -0
- package/dist/components/ui/timeline/timeline.d.ts +30 -0
- package/dist/components/ui/typography/typography.d.ts +1 -1
- package/dist/context-menu.cjs +18 -19
- package/dist/context-menu.js +37 -38
- package/dist/date-picker-selector.cjs +1 -1
- package/dist/date-picker-selector.js +3 -3
- package/dist/dialog.cjs +7 -9
- package/dist/dialog.js +36 -38
- package/dist/dropdown-menu.cjs +57 -36
- package/dist/dropdown-menu.js +206 -173
- package/dist/field.cjs +12 -7
- package/dist/field.js +51 -45
- package/dist/file-upload-v2.cjs +11 -5
- package/dist/file-upload-v2.js +75 -60
- package/dist/file-upload.cjs +11 -5
- package/dist/file-upload.js +118 -110
- package/dist/full-screen-loader.cjs +1 -1
- package/dist/full-screen-loader.js +1 -1
- package/dist/{icon-B7joBr0A.cjs → icon-C5Q2b1Am.cjs} +1 -1
- package/dist/{icon-BFQz1tQC.js → icon-t4jt1Z2h.js} +1 -1
- package/dist/icon.cjs +1 -1
- package/dist/icon.js +1 -1
- package/dist/index-BBT2EGq8.js +18 -0
- package/dist/index-DCsgSkBj.cjs +1 -0
- package/dist/input-8sEO5zwD.js +44 -0
- package/dist/input-AONeSXcs.cjs +22 -0
- package/dist/input-group-BLffLxyg.cjs +86 -0
- package/dist/input-group-DmevJAqa.js +240 -0
- package/dist/input-group.cjs +1 -84
- package/dist/input-group.js +7 -234
- package/dist/input-otp.cjs +5 -7
- package/dist/input-otp.js +58 -60
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/kbd.cjs +6 -7
- package/dist/kbd.js +14 -15
- package/dist/{label-DqfX9cHc.cjs → label-B7Z1D5-Q.cjs} +5 -4
- package/dist/{label-C6zVnc3d.js → label-_BWRIH7C.js} +14 -13
- package/dist/label.cjs +1 -1
- package/dist/label.js +1 -1
- package/dist/pagination.cjs +5 -5
- package/dist/pagination.js +18 -18
- package/dist/radio-group.cjs +12 -9
- package/dist/radio-group.js +66 -63
- package/dist/select.cjs +18 -16
- package/dist/select.js +18 -16
- package/dist/selectable-card.cjs +29 -0
- package/dist/selectable-card.js +129 -0
- package/dist/separator-DXdc7LcC.cjs +7 -0
- package/dist/{separator-CsaqP20m.js → separator-DZfXXbNt.js} +1 -1
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +1 -1
- package/dist/{sheet-Cnq7TCzu.cjs → sheet-Cp6JGhWC.cjs} +10 -10
- package/dist/{sheet-C9vce0ut.js → sheet-hWerE8S1.js} +9 -6
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.cjs +10 -10
- package/dist/sidebar.js +83 -92
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +1 -1
- package/dist/{spinner-C7q7NthY.cjs → spinner-DUZ2vcus.cjs} +1 -1
- package/dist/{spinner-DQ5JLL3U.js → spinner-_-J3zJ_g.js} +1 -1
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch.cjs +2 -4
- package/dist/switch.js +71 -73
- package/dist/table.cjs +14 -14
- package/dist/table.js +12 -12
- package/dist/tabs-underline.cjs +11 -15
- package/dist/tabs-underline.js +20 -24
- package/dist/tabs.cjs +10 -14
- package/dist/tabs.js +20 -24
- package/dist/tailwind-colors.css +1 -1
- package/dist/tailwind-theme.css +1 -1
- package/dist/textarea-BSooGyp-.cjs +18 -0
- package/dist/textarea-D_sj6ivo.js +39 -0
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +1 -1
- package/dist/themes.css +1 -1
- package/dist/timeline.cjs +4 -0
- package/dist/timeline.js +189 -0
- package/dist/toaster.cjs +5 -4
- package/dist/toaster.js +33 -32
- package/dist/toggle.cjs +4 -4
- package/dist/toggle.js +17 -17
- package/dist/tooltip.cjs +5 -6
- package/dist/tooltip.js +4 -5
- package/docs/components/layout/sidebar.md +81 -53
- package/docs/components/layout/toaster.md +35 -55
- package/docs/components/ui/accordion-rounded.md +12 -11
- package/docs/components/ui/alert.md +66 -36
- package/docs/components/ui/amount-input.md +229 -0
- package/docs/components/ui/avatar.md +28 -32
- package/docs/components/ui/badge.md +85 -32
- package/docs/components/ui/breadcrumb.md +5 -7
- package/docs/components/ui/button-group.md +16 -16
- package/docs/components/ui/button.md +23 -36
- package/docs/components/ui/calendar.md +54 -27
- package/docs/components/ui/card.md +5 -4
- package/docs/components/ui/checkbox.md +3 -3
- package/docs/components/ui/combobox.md +35 -1
- package/docs/components/ui/command.md +7 -7
- package/docs/components/ui/context-menu.md +14 -15
- package/docs/components/ui/date-picker-selector.md +31 -31
- package/docs/components/ui/dialog.md +47 -49
- package/docs/components/ui/dropdown-menu.md +34 -37
- package/docs/components/ui/field.md +25 -31
- package/docs/components/ui/file-upload-v2.md +11 -0
- package/docs/components/ui/file-upload.md +105 -108
- package/docs/components/ui/hover-card.md +28 -6
- package/docs/components/ui/icon.md +10 -9
- package/docs/components/ui/input-group.md +9 -9
- package/docs/components/ui/input.md +30 -33
- package/docs/components/ui/kbd.md +10 -9
- package/docs/components/ui/label.md +6 -6
- package/docs/components/ui/pagination.md +3 -3
- package/docs/components/ui/popover.md +1 -0
- package/docs/components/ui/progress.md +3 -3
- package/docs/components/ui/radio-group.md +18 -6
- package/docs/components/ui/scroll-area.md +4 -4
- package/docs/components/ui/select.md +14 -12
- package/docs/components/ui/selectable-card.md +204 -0
- package/docs/components/ui/separator.md +4 -4
- package/docs/components/ui/sheet.md +21 -3
- package/docs/components/ui/slider.md +3 -3
- package/docs/components/ui/switch.md +7 -7
- package/docs/components/ui/table.md +7 -4
- package/docs/components/ui/tabs-underline.md +36 -36
- package/docs/components/ui/tabs.md +6 -4
- package/docs/components/ui/textarea.md +6 -4
- package/docs/components/ui/timeline.md +214 -0
- package/docs/components/ui/toggle.md +1 -1
- package/docs/components/ui/tooltip.md +3 -3
- package/llm.txt +7 -4
- package/package.json +13 -1
- package/dist/button-BnUlAtuD.js +0 -132
- package/dist/button-CFJs0esR.cjs +0 -63
- package/dist/checkbox-3RIZX2HF.cjs +0 -22
- package/dist/combobox-MkeJiTXj.js +0 -637
- package/dist/combobox-jJRxvUsB.cjs +0 -40
- package/dist/input-BCiOr4Fy.js +0 -44
- package/dist/input-Bz5k4w94.cjs +0 -22
- package/dist/separator-CCGaTo09.cjs +0 -7
- package/dist/textarea-BRCnIxdB.js +0 -33
- package/dist/textarea-DkFUS_oS.cjs +0 -14
|
@@ -10,7 +10,7 @@ Component for displaying **user profile images** with automatic fallback system
|
|
|
10
10
|
- ✅ Lazy loading of images
|
|
11
11
|
- ✅ Support for initials or icons as fallback
|
|
12
12
|
- ✅ Customizable sizes
|
|
13
|
-
- ✅ Shapes:
|
|
13
|
+
- ✅ Shapes: rounded rectangle (default, `rounded-xl`) or circular
|
|
14
14
|
- ✅ Avatar groups with overlap
|
|
15
15
|
- ✅ Integration with Tooltip
|
|
16
16
|
- ✅ Accessibility: alt text and ARIA
|
|
@@ -79,9 +79,9 @@ Main avatar container.
|
|
|
79
79
|
**Default styles**:
|
|
80
80
|
|
|
81
81
|
- `size-8`: 2rem (32x32px) - base size
|
|
82
|
-
- `rounded-
|
|
82
|
+
- `rounded-xl`: Rounded rectangle shape (12px radius)
|
|
83
83
|
- `shrink-0`: Doesn't shrink in flex/grid
|
|
84
|
-
- `overflow-hidden`: Clips content
|
|
84
|
+
- `overflow-hidden`: Clips content inside container
|
|
85
85
|
- `relative`: For internal positioning
|
|
86
86
|
- `flex`: Flex container
|
|
87
87
|
|
|
@@ -104,6 +104,7 @@ Avatar image with lazy loading.
|
|
|
104
104
|
|
|
105
105
|
- `aspect-square`: Maintains square aspect
|
|
106
106
|
- `size-full`: Fills entire container (100% width/height)
|
|
107
|
+
- `object-cover`: Crops image to fill container without distortion
|
|
107
108
|
|
|
108
109
|
**Behavior**:
|
|
109
110
|
|
|
@@ -129,8 +130,9 @@ Content shown when the image doesn't load or doesn't exist.
|
|
|
129
130
|
|
|
130
131
|
**Default styles**:
|
|
131
132
|
|
|
132
|
-
- `bg-
|
|
133
|
-
- `
|
|
133
|
+
- `bg-primary-100`: Light teal background (matches design system)
|
|
134
|
+
- `text-primary font-bold`: Primary color bold text for initials
|
|
135
|
+
- `rounded-xl`: Rounded rectangle shape (matches container)
|
|
134
136
|
- `size-full`: Fills all space
|
|
135
137
|
- `flex items-center justify-center`: Centers content
|
|
136
138
|
|
|
@@ -205,42 +207,36 @@ The default size is `size-8` (32px). Customize with className:
|
|
|
205
207
|
|
|
206
208
|
## Custom shapes
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
The default shape is `rounded-xl` (12px radius). Override via `className`:
|
|
211
|
+
|
|
212
|
+
### Circular avatar
|
|
209
213
|
|
|
210
214
|
```tsx
|
|
211
|
-
|
|
212
|
-
/* Rounded large */
|
|
213
|
-
}
|
|
214
|
-
<Avatar className="rounded-lg">
|
|
215
|
+
<Avatar className="adm:rounded-full">
|
|
215
216
|
<AvatarImage src={url} alt="User" />
|
|
216
|
-
<AvatarFallback>CN</AvatarFallback>
|
|
217
|
-
</Avatar
|
|
217
|
+
<AvatarFallback className="adm:rounded-full">CN</AvatarFallback>
|
|
218
|
+
</Avatar>
|
|
219
|
+
```
|
|
218
220
|
|
|
219
|
-
|
|
220
|
-
/* Rounded medium */
|
|
221
|
-
}
|
|
222
|
-
<Avatar className="rounded-md">
|
|
223
|
-
<AvatarImage src={url} alt="User" />
|
|
224
|
-
<AvatarFallback>ER</AvatarFallback>
|
|
225
|
-
</Avatar>;
|
|
221
|
+
### Larger radius (profile)
|
|
226
222
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
}
|
|
230
|
-
<Avatar className="rounded-sm">
|
|
223
|
+
```tsx
|
|
224
|
+
<Avatar className="adm:size-[92px] adm:rounded-2xl">
|
|
231
225
|
<AvatarImage src={url} alt="User" />
|
|
232
|
-
<AvatarFallback>ML</AvatarFallback>
|
|
233
|
-
</Avatar
|
|
226
|
+
<AvatarFallback className="adm:text-2xl">ML</AvatarFallback>
|
|
227
|
+
</Avatar>
|
|
228
|
+
```
|
|
234
229
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<Avatar className="rounded-
|
|
239
|
-
<
|
|
240
|
-
</
|
|
230
|
+
### Smaller radius (sidebar)
|
|
231
|
+
|
|
232
|
+
```tsx
|
|
233
|
+
<Avatar className="adm:size-12 adm:rounded-xl">
|
|
234
|
+
<AvatarImage src={url} alt="User" />
|
|
235
|
+
<AvatarFallback>ER</AvatarFallback>
|
|
236
|
+
</Avatar>
|
|
241
237
|
```
|
|
242
238
|
|
|
243
|
-
**Usage**:
|
|
239
|
+
**Usage**: Use `rounded-full` for circular, `rounded-xl`/`rounded-2xl` for profile cards, sidebar items, and company logos.
|
|
244
240
|
|
|
245
241
|
## Advanced patterns
|
|
246
242
|
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
Compact component for **labeling, categorizing and highlighting information**. Offers
|
|
5
|
+
Compact component for **labeling, categorizing and highlighting information**. Offers 16 variants (including soft "medium" versions), 2 sizes, auto-sized icons, support for clickable links, and special styles for numbers. Ideal for states, notifications, product labels, user roles and counters.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- ✅
|
|
10
|
-
- ✅ "Medium" versions with soft backgrounds and vibrant colors
|
|
9
|
+
- ✅ 16 variants: default (2), waiting (2), secondary, success (2), warning (2), destructive (2), info (2), muted, white, outline
|
|
10
|
+
- ✅ "Medium" versions with soft backgrounds and vibrant icon colors
|
|
11
11
|
- ✅ 2 sizes: default (compact) and lg (large)
|
|
12
|
+
- ✅ `shape="pill"` for fully rounded badges
|
|
12
13
|
- ✅ Auto-sized icons (12px default, 16px large)
|
|
13
14
|
- ✅ `asChild` prop for clickable badges (links)
|
|
14
15
|
- ✅ Automatic hover when link (`[a&]:hover`)
|
|
15
16
|
- ✅ Accessible focus ring with aria-invalid support
|
|
16
17
|
- ✅ Auto-adjustable width (`w-fit`)
|
|
17
18
|
- ✅ Special styles for circular numbers
|
|
18
|
-
- ✅ Full dark mode in all variants
|
|
19
19
|
|
|
20
20
|
## Import
|
|
21
21
|
|
|
@@ -83,10 +83,9 @@ Soft version with light background and icon in primary color.
|
|
|
83
83
|
**Styles**:
|
|
84
84
|
|
|
85
85
|
- Background: `bg-primary-50` (very light)
|
|
86
|
-
- Text: `text-
|
|
86
|
+
- Text: `text-foreground`
|
|
87
87
|
- Icon: `text-primary` (vibrant color)
|
|
88
88
|
- Hover (link): `bg-primary-100`
|
|
89
|
-
- Dark mode: `bg-primary-200`, `text-primary-800`
|
|
90
89
|
- Usage: Soft informational states, categories
|
|
91
90
|
|
|
92
91
|
### waiting
|
|
@@ -115,9 +114,8 @@ Soft version of waiting badge.
|
|
|
115
114
|
**Styles**:
|
|
116
115
|
|
|
117
116
|
- Background: `bg-waiting-50`
|
|
118
|
-
- Text: `text-
|
|
117
|
+
- Text: `text-foreground`
|
|
119
118
|
- Icon: `text-waiting`
|
|
120
|
-
- Dark mode: `bg-waiting-200`, `text-waiting-800`
|
|
121
119
|
- Usage: Subtle waiting states
|
|
122
120
|
|
|
123
121
|
### secondary
|
|
@@ -146,10 +144,9 @@ Solid green badge for successful states.
|
|
|
146
144
|
**Styles**:
|
|
147
145
|
|
|
148
146
|
- Background: `bg-success` (green)
|
|
149
|
-
- Text: `text-
|
|
147
|
+
- Text: `text-success-foreground`
|
|
150
148
|
- Hover (link): `bg-success/90`
|
|
151
149
|
- Focus ring: `ring-success/20`
|
|
152
|
-
- Dark mode: `bg-success/60`
|
|
153
150
|
- Usage: Completed, approved, active, available
|
|
154
151
|
|
|
155
152
|
### success-medium
|
|
@@ -162,11 +159,10 @@ Soft version of success badge.
|
|
|
162
159
|
|
|
163
160
|
**Styles**:
|
|
164
161
|
|
|
165
|
-
- Background: `bg-success-
|
|
166
|
-
- Text: `text-
|
|
162
|
+
- Background: `bg-success-25` (very light green)
|
|
163
|
+
- Text: `text-foreground`
|
|
167
164
|
- Icon: `text-success` (vibrant green)
|
|
168
165
|
- Hover (link): `bg-success-100`
|
|
169
|
-
- Dark mode: `bg-success-200`, `text-success-800`
|
|
170
166
|
- Usage: Subtle positive states, confirmations
|
|
171
167
|
|
|
172
168
|
### warning
|
|
@@ -180,10 +176,9 @@ Solid orange/yellow badge for warnings.
|
|
|
180
176
|
**Styles**:
|
|
181
177
|
|
|
182
178
|
- Background: `bg-warning` (orange/yellow)
|
|
183
|
-
- Text: `text-
|
|
179
|
+
- Text: `text-warning-foreground`
|
|
184
180
|
- Hover (link): `bg-warning/90`
|
|
185
181
|
- Focus ring: `ring-warning/20`
|
|
186
|
-
- Dark mode: `bg-warning/60`
|
|
187
182
|
- Usage: Warning, attention required, almost full
|
|
188
183
|
|
|
189
184
|
### warning-medium
|
|
@@ -197,9 +192,8 @@ Soft version of warning badge.
|
|
|
197
192
|
**Styles**:
|
|
198
193
|
|
|
199
194
|
- Background: `bg-warning-50` (very light orange)
|
|
200
|
-
- Text: `text-
|
|
195
|
+
- Text: `text-foreground`
|
|
201
196
|
- Icon: `text-warning`
|
|
202
|
-
- Dark mode: `bg-warning-200`, `text-warning-800`
|
|
203
197
|
- Usage: Subtle warnings, cautions
|
|
204
198
|
|
|
205
199
|
### destructive
|
|
@@ -213,10 +207,9 @@ Solid red badge for errors and negative states.
|
|
|
213
207
|
**Styles**:
|
|
214
208
|
|
|
215
209
|
- Background: `bg-destructive` (red)
|
|
216
|
-
- Text: `text-
|
|
210
|
+
- Text: `text-destructive-foreground`
|
|
217
211
|
- Hover (link): `bg-destructive/90`
|
|
218
212
|
- Focus ring: `ring-destructive/20`
|
|
219
|
-
- Dark mode: `bg-destructive/60`
|
|
220
213
|
- Usage: Error, inactive, cancelled, rejected
|
|
221
214
|
|
|
222
215
|
### destructive-medium
|
|
@@ -230,9 +223,8 @@ Soft version of destructive badge.
|
|
|
230
223
|
**Styles**:
|
|
231
224
|
|
|
232
225
|
- Background: `bg-destructive-50` (very light red)
|
|
233
|
-
- Text: `text-
|
|
226
|
+
- Text: `text-foreground`
|
|
234
227
|
- Icon: `text-destructive` (vibrant red)
|
|
235
|
-
- Dark mode: `bg-destructive-200`, `text-destructive-800`
|
|
236
228
|
- Usage: Subtle errors, negative states
|
|
237
229
|
|
|
238
230
|
### muted
|
|
@@ -248,9 +240,55 @@ Badge with muted colors for low emphasis.
|
|
|
248
240
|
- Background: `bg-muted`
|
|
249
241
|
- Text: `text-muted-foreground`
|
|
250
242
|
- Hover (link): `bg-muted/90`
|
|
251
|
-
- Dark mode: `bg-muted/60`
|
|
252
243
|
- Usage: Secondary information, disabled, draft
|
|
253
244
|
|
|
245
|
+
### info
|
|
246
|
+
|
|
247
|
+
Solid neutral badge for informational states.
|
|
248
|
+
|
|
249
|
+
```tsx
|
|
250
|
+
<Badge variant="info">Info</Badge>
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**Styles**:
|
|
254
|
+
|
|
255
|
+
- Background: `bg-neutrals-500` (medium gray)
|
|
256
|
+
- Text: `text-neutrals-0` (white)
|
|
257
|
+
- Hover (link): `bg-neutrals-600`
|
|
258
|
+
- Usage: Neutral tags, archived, read-only, informational
|
|
259
|
+
|
|
260
|
+
### info-medium
|
|
261
|
+
|
|
262
|
+
Soft version of info badge.
|
|
263
|
+
|
|
264
|
+
```tsx
|
|
265
|
+
<Badge variant="info-medium">Info medium</Badge>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
**Styles**:
|
|
269
|
+
|
|
270
|
+
- Background: `bg-muted` (neutrals-50)
|
|
271
|
+
- Text: `text-foreground`
|
|
272
|
+
- Icon: `text-neutrals-500`
|
|
273
|
+
- Hover (link): `bg-neutrals-100`
|
|
274
|
+
- Usage: Subtle neutral states, inactive, metadata
|
|
275
|
+
|
|
276
|
+
### white
|
|
277
|
+
|
|
278
|
+
Badge with page background color. Stands out on colored backgrounds.
|
|
279
|
+
|
|
280
|
+
```tsx
|
|
281
|
+
<Badge variant="white">White</Badge>
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Styles**:
|
|
285
|
+
|
|
286
|
+
- Background: `bg-background`
|
|
287
|
+
- Text: `text-foreground`
|
|
288
|
+
- Border: Transparent
|
|
289
|
+
- Hover (link): `bg-subtle`
|
|
290
|
+
- Usage: Badges on colored cards or banners
|
|
291
|
+
|
|
254
292
|
### outline
|
|
255
293
|
|
|
256
294
|
Badge with border and transparent background.
|
|
@@ -267,6 +305,20 @@ Badge with border and transparent background.
|
|
|
267
305
|
- Hover (link): `bg-accent`
|
|
268
306
|
- Usage: Tags, categories, filters, neutral labels
|
|
269
307
|
|
|
308
|
+
## Shape
|
|
309
|
+
|
|
310
|
+
### pill
|
|
311
|
+
|
|
312
|
+
Fully rounded badge. Can be combined with any variant and size.
|
|
313
|
+
|
|
314
|
+
```tsx
|
|
315
|
+
<Badge shape="pill" variant="success">Active</Badge>
|
|
316
|
+
<Badge shape="pill" variant="info">Info</Badge>
|
|
317
|
+
<Badge shape="pill" size="lg">Large pill</Badge>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
The default shape uses `rounded-md`. Adding `shape="pill"` overrides it to `rounded-full`.
|
|
321
|
+
|
|
270
322
|
## Sizes
|
|
271
323
|
|
|
272
324
|
### default (Compact)
|
|
@@ -304,14 +356,15 @@ Large size for increased visibility.
|
|
|
304
356
|
|
|
305
357
|
## Props
|
|
306
358
|
|
|
307
|
-
| Prop | Type
|
|
308
|
-
| --------- |
|
|
309
|
-
| variant | `"default" \| "default-medium" \| "waiting" \| "waiting-medium" \| "secondary" \| "success" \| "success-medium" \| "warning" \| "warning-medium" \| "destructive" \| "destructive-medium" \| "muted" \| "outline"` | `"default"` | Visual variant of the badge |
|
|
310
|
-
| size | `"default" \| "lg"`
|
|
311
|
-
|
|
|
312
|
-
|
|
|
313
|
-
|
|
|
314
|
-
|
|
|
359
|
+
| Prop | Type | Default | Description |
|
|
360
|
+
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ----------------------------------------------------------- |
|
|
361
|
+
| variant | `"default" \| "default-medium" \| "waiting" \| "waiting-medium" \| "secondary" \| "success" \| "success-medium" \| "warning" \| "warning-medium" \| "destructive" \| "destructive-medium" \| "info" \| "info-medium" \| "muted" \| "white" \| "outline"` | `"default"` | Visual variant of the badge |
|
|
362
|
+
| size | `"default" \| "lg"` | `"default"` | Size of the badge |
|
|
363
|
+
| shape | `"pill"` | - | `"pill"` overrides border radius to `rounded-full` |
|
|
364
|
+
| asChild | `boolean` | `false` | Renders the child instead of a `<span>`. Uses Radix UI Slot |
|
|
365
|
+
| className | `string` | - | Additional CSS classes |
|
|
366
|
+
| children | `ReactNode` | - | Badge content (text, icons, numbers) |
|
|
367
|
+
| ...props | `HTMLAttributes<HTMLSpanElement>` | - | All native `<span>` props |
|
|
315
368
|
|
|
316
369
|
**Note about asChild**: Useful for clickable badges with `<a>` links.
|
|
317
370
|
|
|
@@ -876,8 +929,8 @@ import { Icon } from "@adamosuiteservices/ui/icon";
|
|
|
876
929
|
|
|
877
930
|
### Color contrast
|
|
878
931
|
|
|
879
|
-
- ✅ All solid variants (default, success, warning, destructive) have
|
|
880
|
-
- ✅ "Medium" variants
|
|
932
|
+
- ✅ All solid variants (default, success, warning, destructive, info) have sufficient contrast
|
|
933
|
+
- ✅ "Medium" variants use `text-foreground` for high-contrast text
|
|
881
934
|
- ✅ Icons in "medium" variants use vibrant colors for better visibility
|
|
882
935
|
- ⚠️ Verify contrast if using custom colors
|
|
883
936
|
|
|
@@ -7,14 +7,13 @@ Navigation component that shows the **user's current location within a navigatio
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- ✅ Semantic structure with `<nav>` and `<ol>`
|
|
10
|
-
- ✅ Customizable separators (
|
|
10
|
+
- ✅ Customizable separators (`/` by default, supports chevron icon or any custom content)
|
|
11
11
|
- ✅ Support for icons at each level
|
|
12
12
|
- ✅ Ellipsis to indicate collapsed elements
|
|
13
13
|
- ✅ Integration with Dropdown Menu for long paths
|
|
14
14
|
- ✅ `asChild` prop for custom link components (React Router, Next.js)
|
|
15
15
|
- ✅ Responsive and mobile-adaptable
|
|
16
16
|
- ✅ Full accessibility (aria-label, aria-current, role)
|
|
17
|
-
- ✅ Automatic dark mode
|
|
18
17
|
- ✅ Styles with smooth transitions
|
|
19
18
|
|
|
20
19
|
## Import
|
|
@@ -130,9 +129,9 @@ Ordered list that contains breadcrumb elements.
|
|
|
130
129
|
|
|
131
130
|
**Styles**:
|
|
132
131
|
|
|
133
|
-
- Text: `text-
|
|
132
|
+
- Text: `text-foreground`, `text-sm`
|
|
134
133
|
- Layout: `flex`, `flex-wrap`, `items-center`
|
|
135
|
-
- Spacing: `gap-
|
|
134
|
+
- Spacing: `gap-2`
|
|
136
135
|
- Utility: `break-words` for long text
|
|
137
136
|
|
|
138
137
|
**Props**: Inherits all props from `React.ComponentProps<"ol">`.
|
|
@@ -150,7 +149,7 @@ Individual breadcrumb element (one navigation level).
|
|
|
150
149
|
**Styles**:
|
|
151
150
|
|
|
152
151
|
- Layout: `inline-flex`, `items-center`
|
|
153
|
-
- Spacing: `gap-
|
|
152
|
+
- Spacing: `gap-2` between icon and text
|
|
154
153
|
|
|
155
154
|
**Props**: Inherits all props from `React.ComponentProps<"li">`.
|
|
156
155
|
|
|
@@ -169,8 +168,7 @@ Navigable link within the breadcrumb.
|
|
|
169
168
|
|
|
170
169
|
**Styles**:
|
|
171
170
|
|
|
172
|
-
-
|
|
173
|
-
- Hover: `hover:text-foreground`
|
|
171
|
+
- Hover: `hover:text-foreground hover:underline`
|
|
174
172
|
- Transition: `transition-colors`
|
|
175
173
|
|
|
176
174
|
**Props**:
|
|
@@ -92,20 +92,20 @@ Main container that groups buttons.
|
|
|
92
92
|
|
|
93
93
|
**Automatic attributes**:
|
|
94
94
|
|
|
95
|
-
- `role="group"`:
|
|
96
|
-
- `data-slot="button-group"`:
|
|
97
|
-
- `data-orientation`:
|
|
95
|
+
- `role="group"`: For accessibility
|
|
96
|
+
- `data-slot="button-group"`: Internal identification
|
|
97
|
+
- `data-orientation`: Value of the orientation prop
|
|
98
98
|
|
|
99
|
-
**
|
|
99
|
+
**Applied styles**:
|
|
100
100
|
|
|
101
|
-
- `flex`:
|
|
102
|
-
- `w-fit`:
|
|
103
|
-
- `items-stretch`:
|
|
104
|
-
-
|
|
101
|
+
- `flex`: Flex display
|
|
102
|
+
- `w-fit`: Auto-adjustable width
|
|
103
|
+
- `items-stretch`: Stretches items vertically
|
|
104
|
+
- Borders and corners adjusted automatically based on orientation
|
|
105
105
|
|
|
106
106
|
### ButtonGroupSeparator
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
Visual separator line between buttons.
|
|
109
109
|
|
|
110
110
|
| Prop | Type | Default | Description |
|
|
111
111
|
| ----------- | ---------------------------- | ------------ | ------------------------------ |
|
|
@@ -115,17 +115,17 @@ Línea separadora visual entre botones.
|
|
|
115
115
|
|
|
116
116
|
**Applied styles**:
|
|
117
117
|
|
|
118
|
-
- `bg-input`:
|
|
119
|
-
- `relative`:
|
|
120
|
-
- `!m-0`:
|
|
121
|
-
- `self-stretch`:
|
|
122
|
-
- `h-auto`
|
|
118
|
+
- `bg-input`: Background color
|
|
119
|
+
- `relative`: Positioning
|
|
120
|
+
- `!m-0`: No margins
|
|
121
|
+
- `self-stretch`: Stretches to fill height/width
|
|
122
|
+
- `h-auto` when orientation="vertical"
|
|
123
123
|
|
|
124
|
-
**
|
|
124
|
+
**Note**: Use `orientation="vertical"` (default) for horizontal groups, and `orientation="horizontal"` for vertical groups.
|
|
125
125
|
|
|
126
126
|
### ButtonGroupText
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
Descriptive text within the group.
|
|
129
129
|
|
|
130
130
|
| Prop | Type | Default | Description |
|
|
131
131
|
| --------- | -------------------------------- | ------- | ---------------------------- |
|
|
@@ -14,7 +14,6 @@ Fundamental component for **user actions and interactions**. Offers 13 visual va
|
|
|
14
14
|
- ✅ Accessible focus ring with keyboard detection
|
|
15
15
|
- ✅ Support for aria-invalid with error rings
|
|
16
16
|
- ✅ Smooth transitions in all states
|
|
17
|
-
- ✅ Full dark mode support in all variants
|
|
18
17
|
|
|
19
18
|
## Import
|
|
20
19
|
|
|
@@ -67,7 +66,7 @@ Primary button with brand colors for primary actions.
|
|
|
67
66
|
|
|
68
67
|
- Background: `bg-primary`
|
|
69
68
|
- Text: `text-primary-foreground`
|
|
70
|
-
- Hover: `bg-primary-
|
|
69
|
+
- Hover: `bg-primary-600`
|
|
71
70
|
- Usage: Primary actions, main CTAs
|
|
72
71
|
|
|
73
72
|
### success
|
|
@@ -80,11 +79,9 @@ Solid green button for successful actions or important confirmations.
|
|
|
80
79
|
|
|
81
80
|
**Styles**:
|
|
82
81
|
|
|
83
|
-
- Background: `bg-success` (green)
|
|
84
|
-
- Text: `text-
|
|
85
|
-
- Hover: `bg-success-
|
|
86
|
-
- Focus ring: `ring-success/20`
|
|
87
|
-
- Dark mode: `bg-success/60`
|
|
82
|
+
- Background: `bg-success-500` (green)
|
|
83
|
+
- Text: `text-success-foreground`
|
|
84
|
+
- Hover: `bg-success-600`
|
|
88
85
|
- Usage: Save, approve, confirm, complete
|
|
89
86
|
|
|
90
87
|
### success-medium
|
|
@@ -98,8 +95,8 @@ Soft version of the success button with light background and green text.
|
|
|
98
95
|
**Styles**:
|
|
99
96
|
|
|
100
97
|
- Background: `bg-success-50` (very light green)
|
|
101
|
-
- Text: `text-success`
|
|
102
|
-
- Hover: `bg-success
|
|
98
|
+
- Text: `text-success-foreground-subtle`
|
|
99
|
+
- Hover: `bg-success-100`
|
|
103
100
|
- Usage: Secondary successful actions, less emphatic success states
|
|
104
101
|
|
|
105
102
|
### warning
|
|
@@ -112,11 +109,9 @@ Solid orange/yellow button for actions that require caution.
|
|
|
112
109
|
|
|
113
110
|
**Styles**:
|
|
114
111
|
|
|
115
|
-
- Background: `bg-warning` (orange/yellow)
|
|
116
|
-
- Text: `text-
|
|
117
|
-
- Hover: `bg-warning-
|
|
118
|
-
- Focus ring: `ring-warning/20`
|
|
119
|
-
- Dark mode: `bg-warning/60`
|
|
112
|
+
- Background: `bg-warning-500` (orange/yellow)
|
|
113
|
+
- Text: `text-warning-foreground`
|
|
114
|
+
- Hover: `bg-warning-600`
|
|
120
115
|
- Usage: Warning actions, confirmations with moderate risk
|
|
121
116
|
|
|
122
117
|
### warning-medium
|
|
@@ -130,8 +125,8 @@ Soft version of the warning button with light background.
|
|
|
130
125
|
**Styles**:
|
|
131
126
|
|
|
132
127
|
- Background: `bg-warning-50` (very light orange/yellow)
|
|
133
|
-
- Text: `text-warning`
|
|
134
|
-
- Hover: `bg-warning
|
|
128
|
+
- Text: `text-warning-foreground-subtle`
|
|
129
|
+
- Hover: `bg-warning-100`
|
|
135
130
|
- Usage: Secondary warnings, less critical alerts
|
|
136
131
|
|
|
137
132
|
### destructive
|
|
@@ -145,10 +140,8 @@ Solid red button for destructive or dangerous actions.
|
|
|
145
140
|
**Styles**:
|
|
146
141
|
|
|
147
142
|
- Background: `bg-destructive` (red)
|
|
148
|
-
- Text: `text-
|
|
149
|
-
- Hover: `bg-destructive-
|
|
150
|
-
- Focus ring: `ring-destructive/20`
|
|
151
|
-
- Dark mode: `bg-destructive/60`
|
|
143
|
+
- Text: `text-destructive-foreground`
|
|
144
|
+
- Hover: `bg-destructive-600`
|
|
152
145
|
- Usage: Delete, cancel subscription, reset, irreversible actions
|
|
153
146
|
|
|
154
147
|
### destructive-medium
|
|
@@ -162,8 +155,8 @@ Soft version of the destructive button with light background.
|
|
|
162
155
|
**Styles**:
|
|
163
156
|
|
|
164
157
|
- Background: `bg-destructive-50` (very light red)
|
|
165
|
-
- Text: `text-destructive`
|
|
166
|
-
- Hover: `bg-destructive
|
|
158
|
+
- Text: `text-destructive-foreground-subtle`
|
|
159
|
+
- Hover: `bg-destructive-100`
|
|
167
160
|
- Usage: Secondary destructive actions, error warnings
|
|
168
161
|
|
|
169
162
|
### secondary
|
|
@@ -191,10 +184,8 @@ Button with border and transparent background for secondary actions.
|
|
|
191
184
|
|
|
192
185
|
**Styles**:
|
|
193
186
|
|
|
194
|
-
- Background: `bg-background` with `border`
|
|
195
|
-
-
|
|
196
|
-
- Hover: `bg-accent`
|
|
197
|
-
- Dark mode: `bg-input/30`, `border-input`
|
|
187
|
+
- Background: `bg-background` with `border border-border`
|
|
188
|
+
- Hover: `bg-subtle`
|
|
198
189
|
- Support for `aria-invalid` with red border and ring
|
|
199
190
|
- Usage: Cancel, alternative actions, buttons in groups
|
|
200
191
|
|
|
@@ -210,8 +201,7 @@ Minimal button without border with primary color that only appears on hover.
|
|
|
210
201
|
|
|
211
202
|
- Background: Transparent
|
|
212
203
|
- Text: `text-primary`
|
|
213
|
-
- Hover: `bg-primary-50
|
|
214
|
-
- Dark mode: `hover:bg-primary-50/20`
|
|
204
|
+
- Hover: `bg-primary-50`
|
|
215
205
|
- Usage: Tertiary actions with primary emphasis, tool icons, menus
|
|
216
206
|
|
|
217
207
|
### ghost-neutral
|
|
@@ -225,9 +215,8 @@ Minimal button without border with neutral color that only appears on hover.
|
|
|
225
215
|
**Styles**:
|
|
226
216
|
|
|
227
217
|
- Background: Transparent
|
|
228
|
-
- Text:
|
|
229
|
-
- Hover: `bg-
|
|
230
|
-
- Dark mode: `hover:bg-accent/50`
|
|
218
|
+
- Text: `text-foreground-secondary`
|
|
219
|
+
- Hover: `bg-subtle`, `text-foreground`
|
|
231
220
|
- Usage: Neutral tertiary actions, tool icons without emphasis, interface controls
|
|
232
221
|
|
|
233
222
|
### link
|
|
@@ -254,7 +243,7 @@ Button that looks like a link with neutral color.
|
|
|
254
243
|
|
|
255
244
|
**Styles**:
|
|
256
245
|
|
|
257
|
-
- Color: `text-foreground`
|
|
246
|
+
- Color: `text-foreground-secondary`
|
|
258
247
|
- No hover underline
|
|
259
248
|
- Usage: Inline navigation without color emphasis, low-impact actions
|
|
260
249
|
|
|
@@ -272,7 +261,6 @@ Compact button for reduced spaces.
|
|
|
272
261
|
|
|
273
262
|
- Height: `h-9` (36px)
|
|
274
263
|
- Horizontal padding: `px-3` (12px)
|
|
275
|
-
- Padding with icon: `px-2.5` (10px) with `has-[>svg]`
|
|
276
264
|
- Gap: `gap-2` (8px)
|
|
277
265
|
- Border radius: `rounded-[12px]` (12px)
|
|
278
266
|
|
|
@@ -287,8 +275,7 @@ Standard size for most cases.
|
|
|
287
275
|
**Dimensions**:
|
|
288
276
|
|
|
289
277
|
- Height: `h-10` (40px)
|
|
290
|
-
- Horizontal padding: `px-
|
|
291
|
-
- Padding with icon: `px-3.5` (14px) with `has-[>svg]` or `has-[>[data-slot=icon]]`
|
|
278
|
+
- Horizontal padding: `px-3` (12px)
|
|
292
279
|
- Gap: `gap-2` (8px)
|
|
293
280
|
- Border radius: `rounded-[12px]` (12px)
|
|
294
281
|
|
|
@@ -304,7 +291,6 @@ Large button for prominent CTAs.
|
|
|
304
291
|
|
|
305
292
|
- Height: `h-11` (44px)
|
|
306
293
|
- Horizontal padding: `px-6` (24px)
|
|
307
|
-
- Padding with icon: `px-5` (20px) with `has-[>svg]`
|
|
308
294
|
- Gap: `gap-2` (8px)
|
|
309
295
|
- Border radius: `rounded-[12px]` (12px)
|
|
310
296
|
|
|
@@ -373,6 +359,7 @@ Disables the button and reduces opacity.
|
|
|
373
359
|
|
|
374
360
|
- `opacity-50`: 50% opacity
|
|
375
361
|
- `pointer-events-none`: Does not accept clicks or hover
|
|
362
|
+
- `*:text-inherit`: All children (icons, text) inherit the button's disabled text color, preventing hardcoded icon colors from overriding the disabled appearance
|
|
376
363
|
- Automatic in all browsers
|
|
377
364
|
|
|
378
365
|
### Loading
|