@adamosuiteservices/ui 2.18.6 → 2.19.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/README.md +1 -1
- package/dist/accordion-rounded.cjs +8 -8
- package/dist/accordion-rounded.js +12 -12
- 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 +2 -3
- package/dist/breadcrumb.js +16 -17
- package/dist/button-CXFZVTXF.cjs +87 -0
- package/dist/button-dT8nqgU3.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-xBaFu2sB.js → calendar-6NvJv-sP.js} +238 -239
- package/dist/{calendar-Dorq3-wv.cjs → calendar-B8S5a0TG.cjs} +20 -22
- 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-BBlvCoB1.cjs +24 -0
- package/dist/{checkbox-DL_jFvgl.js → checkbox-BuzBXARX.js} +54 -52
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/colors.css +1 -1
- package/dist/combobox-B002BLsg.js +692 -0
- package/dist/combobox-B2BkUl7v.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 +36 -37
- 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 +205 -172
- 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 +74 -59
- package/dist/file-upload.cjs +11 -5
- package/dist/file-upload.js +117 -109
- 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-13VFVAxD.cjs +86 -0
- package/dist/input-group-D4S18xiq.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 +65 -62
- package/dist/select.cjs +18 -16
- package/dist/select.js +17 -15
- 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-C9vce0ut.js → sheet-DNwg4a6M.js} +8 -5
- package/dist/{sheet-Cnq7TCzu.cjs → sheet-va7o2x0w.cjs} +10 -10
- 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/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,27 +10,27 @@ Variant of the Tabs component with underline style instead of background.
|
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
12
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
Tabs,
|
|
14
|
+
TabsList,
|
|
15
|
+
TabsTrigger,
|
|
16
|
+
TabsContent,
|
|
17
17
|
} from "@adamosuiteservices/ui/tabs-underline";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Anatomy
|
|
21
21
|
|
|
22
22
|
```tsx
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
<
|
|
27
|
-
</
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
</
|
|
23
|
+
<Tabs defaultValue="account">
|
|
24
|
+
<TabsList>
|
|
25
|
+
<TabsTrigger value="account">Account</TabsTrigger>
|
|
26
|
+
<TabsTrigger value="password">Password</TabsTrigger>
|
|
27
|
+
</TabsList>
|
|
28
|
+
<TabsContent value="account">Account content</TabsContent>
|
|
29
|
+
<TabsContent value="password">Password content</TabsContent>
|
|
30
|
+
</Tabs>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
**Components**: 4 (
|
|
33
|
+
**Components**: 4 (Tabs, TabsList, TabsTrigger, TabsContent)
|
|
34
34
|
|
|
35
35
|
## Props
|
|
36
36
|
|
|
@@ -41,18 +41,16 @@ Identical to `tabs` component. See tabs documentation for complete props.
|
|
|
41
41
|
### Basic
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
<
|
|
47
|
-
<
|
|
48
|
-
<
|
|
49
|
-
</
|
|
50
|
-
<
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<TabsUnderlineContent value="reports">Reports content</TabsUnderlineContent>
|
|
55
|
-
</TabsUnderline>
|
|
44
|
+
<Tabs defaultValue="overview">
|
|
45
|
+
<TabsList>
|
|
46
|
+
<TabsTrigger value="overview">Overview</TabsTrigger>
|
|
47
|
+
<TabsTrigger value="analytics">Analytics</TabsTrigger>
|
|
48
|
+
<TabsTrigger value="reports">Reports</TabsTrigger>
|
|
49
|
+
</TabsList>
|
|
50
|
+
<TabsContent value="overview">Overview content</TabsContent>
|
|
51
|
+
<TabsContent value="analytics">Analytics content</TabsContent>
|
|
52
|
+
<TabsContent value="reports">Reports content</TabsContent>
|
|
53
|
+
</Tabs>
|
|
56
54
|
```
|
|
57
55
|
|
|
58
56
|
### With icons
|
|
@@ -60,20 +58,20 @@ Identical to `tabs` component. See tabs documentation for complete props.
|
|
|
60
58
|
```tsx
|
|
61
59
|
import { Icon } from "@adamosuiteservices/ui/icon";
|
|
62
60
|
|
|
63
|
-
<
|
|
64
|
-
<
|
|
61
|
+
<TabsList>
|
|
62
|
+
<TabsTrigger value="charts">
|
|
65
63
|
<Icon symbol="bar_chart" />
|
|
66
64
|
Charts
|
|
67
|
-
</
|
|
68
|
-
<
|
|
65
|
+
</TabsTrigger>
|
|
66
|
+
<TabsTrigger value="table">
|
|
69
67
|
<Icon symbol="table" />
|
|
70
68
|
Table
|
|
71
|
-
</
|
|
72
|
-
<
|
|
69
|
+
</TabsTrigger>
|
|
70
|
+
<TabsTrigger value="report">
|
|
73
71
|
<Icon symbol="description" />
|
|
74
72
|
Report
|
|
75
|
-
</
|
|
76
|
-
</
|
|
73
|
+
</TabsTrigger>
|
|
74
|
+
</TabsList>;
|
|
77
75
|
```
|
|
78
76
|
|
|
79
77
|
## Differences with regular tabs
|
|
@@ -95,12 +93,14 @@ import { Icon } from "@adamosuiteservices/ui/icon";
|
|
|
95
93
|
|
|
96
94
|
## Base styles
|
|
97
95
|
|
|
98
|
-
- **List**: No background, `h-
|
|
96
|
+
- **List**: No background, `h-12` (48px to match tabs)
|
|
97
|
+
- **Trigger**: `px-3 py-2.5 gap-2 text-foreground`
|
|
99
98
|
- **Trigger active**: `border-b-2 border-b-primary text-primary`
|
|
100
|
-
- **Trigger inactive**: `border-b-2 border-b-
|
|
99
|
+
- **Trigger inactive**: `border-b-2` (transparent border, set by the trigger's `border-b-2` class without active state)
|
|
100
|
+
- **Trigger focus**: `ring-4 ring-primary/10`
|
|
101
101
|
|
|
102
102
|
## References
|
|
103
103
|
|
|
104
|
-
-
|
|
104
|
+
- See [Tabs](./tabs.md) for complete documentation
|
|
105
105
|
- **Radix UI Tabs**: <https://www.radix-ui.com/primitives/docs/components/tabs>
|
|
106
106
|
- **shadcn/ui Tabs**: <https://ui.shadcn.com/docs/components/tabs>
|
|
@@ -112,12 +112,14 @@ import { Icon } from "@adamosuiteservices/ui/icon";
|
|
|
112
112
|
|
|
113
113
|
## Base styles
|
|
114
114
|
|
|
115
|
-
- **
|
|
116
|
-
- **
|
|
117
|
-
- **Trigger
|
|
115
|
+
- **Root**: `flex flex-col gap-6`
|
|
116
|
+
- **List**: `h-12 bg-accent rounded-2xl p-1 gap-1`
|
|
117
|
+
- **Trigger**: `h-full rounded-[12px] px-3 py-2.5 text-sm font-semibold text-foreground`
|
|
118
|
+
- **Trigger active**: `bg-background border border-input`
|
|
119
|
+
- **Trigger focus**: `ring-4 ring-primary/10`
|
|
118
120
|
- **Gap**: `gap-2` between icons and text
|
|
119
121
|
|
|
120
|
-
**Note**: Tabs now have
|
|
122
|
+
**Note**: Tabs now have a height of 48px to match the Figma design.
|
|
121
123
|
|
|
122
124
|
## References
|
|
123
125
|
|
|
@@ -153,7 +153,7 @@ function CommentForm() {
|
|
|
153
153
|
}
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
-
### Chat
|
|
156
|
+
### Chat input with Enter
|
|
157
157
|
|
|
158
158
|
```tsx
|
|
159
159
|
function ChatInput() {
|
|
@@ -223,11 +223,13 @@ function ChatInput() {
|
|
|
223
223
|
|
|
224
224
|
- **Min height**: `min-h-16` default
|
|
225
225
|
- **Border**: `border-input` with `shadow-xs`
|
|
226
|
-
- **
|
|
226
|
+
- **Background**: `bg-background`, `hover:bg-muted`
|
|
227
|
+
- **Focus**: `border-primary-300 ring-4 ring-primary/10`
|
|
227
228
|
- **Padding**: `px-3 py-2`
|
|
228
|
-
- **Font**: `text-
|
|
229
|
+
- **Font**: `text-sm`
|
|
229
230
|
- **Field sizing**: `field-sizing-content` for auto-resize
|
|
230
|
-
- **Invalid**: `border-destructive` with `ring-destructive/
|
|
231
|
+
- **Invalid**: `border-destructive` with `focus-visible:ring-4 ring-destructive/10`
|
|
232
|
+
- **Disabled**: `bg-input-disabled text-input-foreground-disabled opacity-100`
|
|
231
233
|
|
|
232
234
|
## Accessibility
|
|
233
235
|
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Timeline component
|
|
2
|
+
|
|
3
|
+
A composable timeline / stepper that renders a sequence of steps with dots, connector lines, and text content in either vertical or horizontal orientation.
|
|
4
|
+
|
|
5
|
+
## Description
|
|
6
|
+
|
|
7
|
+
`Timeline` is built from seven composable sub-components. Each step is a `TimelineItem` with a `status` that drives the dot appearance, connector color, and text color. Connector coloring is automatic: segments between completed steps are primary-colored; pending segments use the border color.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Vertical (default) and horizontal orientations
|
|
12
|
+
- Horizontal collapses to vertical on mobile (< 640 px) by default — opt out with `responsive={false}` for scroll
|
|
13
|
+
- Three step statuses: `pending`, `active`, `complete`
|
|
14
|
+
- Connector segments colored automatically based on step status
|
|
15
|
+
- `TimelineTime` is optional — omit it when no timestamp is available
|
|
16
|
+
- All sub-components accept `className` for custom styling
|
|
17
|
+
- Semantic `<ol>` / `<li>` markup
|
|
18
|
+
|
|
19
|
+
## Import
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import {
|
|
23
|
+
Timeline,
|
|
24
|
+
TimelineItem,
|
|
25
|
+
TimelineIndicator,
|
|
26
|
+
TimelineContent,
|
|
27
|
+
TimelineTitle,
|
|
28
|
+
TimelineDescription,
|
|
29
|
+
TimelineTime,
|
|
30
|
+
type TimelineProps,
|
|
31
|
+
type TimelineItemProps,
|
|
32
|
+
type TimelineIndicatorProps,
|
|
33
|
+
type TimelineContentProps,
|
|
34
|
+
type TimelineTitleProps,
|
|
35
|
+
type TimelineDescriptionProps,
|
|
36
|
+
type TimelineTimeProps,
|
|
37
|
+
type TimelineStatus,
|
|
38
|
+
type TimelineOrientation,
|
|
39
|
+
} from "@adamosuiteservices/ui/timeline";
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Basic usage
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
<Timeline>
|
|
46
|
+
<TimelineItem status="complete">
|
|
47
|
+
<TimelineIndicator />
|
|
48
|
+
<TimelineContent>
|
|
49
|
+
<TimelineTitle>Payment sent</TimelineTitle>
|
|
50
|
+
<TimelineTime>02 Sep. 2:35 PM</TimelineTime>
|
|
51
|
+
</TimelineContent>
|
|
52
|
+
</TimelineItem>
|
|
53
|
+
<TimelineItem status="active">
|
|
54
|
+
<TimelineIndicator />
|
|
55
|
+
<TimelineContent>
|
|
56
|
+
<TimelineTitle>Processing</TimelineTitle>
|
|
57
|
+
<TimelineDescription>Your payment is being routed.</TimelineDescription>
|
|
58
|
+
<TimelineTime>02 Sep. 2:36 PM</TimelineTime>
|
|
59
|
+
</TimelineContent>
|
|
60
|
+
</TimelineItem>
|
|
61
|
+
<TimelineItem status="pending">
|
|
62
|
+
<TimelineIndicator />
|
|
63
|
+
<TimelineContent>
|
|
64
|
+
<TimelineTitle>Confirmation</TimelineTitle>
|
|
65
|
+
</TimelineContent>
|
|
66
|
+
</TimelineItem>
|
|
67
|
+
</Timeline>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Horizontal orientation
|
|
71
|
+
|
|
72
|
+
By default, `orientation="horizontal"` collapses to vertical below the `sm` breakpoint (640 px). Use `responsive={false}` to keep it horizontal at all sizes with overflow-x scroll instead.
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
// Collapses to vertical on mobile (default)
|
|
76
|
+
<Timeline orientation="horizontal" className="adm:w-full">
|
|
77
|
+
...
|
|
78
|
+
</Timeline>
|
|
79
|
+
|
|
80
|
+
// Always horizontal — scrolls on small screens
|
|
81
|
+
<Timeline orientation="horizontal" responsive={false}>
|
|
82
|
+
...
|
|
83
|
+
</Timeline>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Props
|
|
87
|
+
|
|
88
|
+
### Timeline
|
|
89
|
+
|
|
90
|
+
| Prop | Type | Default | Description |
|
|
91
|
+
| ------------- | ---------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
92
|
+
| `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Layout direction of the step list |
|
|
93
|
+
| `responsive` | `boolean` | `true` | Only applies when `orientation="horizontal"`. `true`: collapses to vertical below 640 px. `false`: stays horizontal at all sizes with overflow-x scroll. |
|
|
94
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
95
|
+
|
|
96
|
+
Renders as `<ol>`. Accepts all `<ol>` props.
|
|
97
|
+
|
|
98
|
+
### TimelineItem
|
|
99
|
+
|
|
100
|
+
| Prop | Type | Default | Description |
|
|
101
|
+
| ----------- | ------------------------------------- | ----------- | ------------------------------------- |
|
|
102
|
+
| `status` | `"pending" \| "active" \| "complete"` | `"pending"` | Visual and semantic state of the step |
|
|
103
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
104
|
+
|
|
105
|
+
Renders as `<li>`. Accepts all `<li>` props.
|
|
106
|
+
|
|
107
|
+
### TimelineIndicator
|
|
108
|
+
|
|
109
|
+
| Prop | Type | Default | Description |
|
|
110
|
+
| ----------- | -------- | ------- | ---------------------- |
|
|
111
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
112
|
+
|
|
113
|
+
Renders the step dot and connector line. Takes `status` and `orientation` from context — no props required beyond optional `className`. Accepts all `<div>` props.
|
|
114
|
+
|
|
115
|
+
### TimelineContent
|
|
116
|
+
|
|
117
|
+
| Prop | Type | Default | Description |
|
|
118
|
+
| ----------- | -------- | ------- | ---------------------- |
|
|
119
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
120
|
+
|
|
121
|
+
Wrapper for the text area. Colors text based on `status` from context (`pending` → muted, `active`/`complete` → foreground). Accepts all `<div>` props.
|
|
122
|
+
|
|
123
|
+
### TimelineTitle
|
|
124
|
+
|
|
125
|
+
| Prop | Type | Default | Description |
|
|
126
|
+
| ----------- | -------- | ------- | ---------------------- |
|
|
127
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
128
|
+
|
|
129
|
+
Renders as a `<p>` with `text-sm font-semibold`. Accepts all `<p>` props.
|
|
130
|
+
|
|
131
|
+
### TimelineDescription
|
|
132
|
+
|
|
133
|
+
| Prop | Type | Default | Description |
|
|
134
|
+
| ----------- | -------- | ------- | ---------------------- |
|
|
135
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
136
|
+
|
|
137
|
+
Renders as a `<p>` with `text-sm font-normal`. Accepts all `<p>` props.
|
|
138
|
+
|
|
139
|
+
### TimelineTime
|
|
140
|
+
|
|
141
|
+
| Prop | Type | Default | Description |
|
|
142
|
+
| ----------- | -------- | ------- | ---------------------- |
|
|
143
|
+
| `className` | `string` | — | Additional CSS classes |
|
|
144
|
+
|
|
145
|
+
Renders as a `<time>` element with `text-xs`. Optional — omit when no timestamp is available. Accepts all `<time>` props.
|
|
146
|
+
|
|
147
|
+
## Examples
|
|
148
|
+
|
|
149
|
+
### All complete
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
<Timeline>
|
|
153
|
+
{steps.map((step) => (
|
|
154
|
+
<TimelineItem key={step.title} status="complete">
|
|
155
|
+
<TimelineIndicator />
|
|
156
|
+
<TimelineContent>
|
|
157
|
+
<TimelineTitle>{step.title}</TimelineTitle>
|
|
158
|
+
<TimelineTime>{step.time}</TimelineTime>
|
|
159
|
+
</TimelineContent>
|
|
160
|
+
</TimelineItem>
|
|
161
|
+
))}
|
|
162
|
+
</Timeline>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Single active step with no history
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
<Timeline>
|
|
169
|
+
<TimelineItem status="active">
|
|
170
|
+
<TimelineIndicator />
|
|
171
|
+
<TimelineContent>
|
|
172
|
+
<TimelineTitle>Verifying your identity.</TimelineTitle>
|
|
173
|
+
<TimelineDescription>
|
|
174
|
+
We are reviewing your documents.
|
|
175
|
+
</TimelineDescription>
|
|
176
|
+
<TimelineTime>02 Sep. 3:00 PM</TimelineTime>
|
|
177
|
+
</TimelineContent>
|
|
178
|
+
</TimelineItem>
|
|
179
|
+
<TimelineItem status="pending">
|
|
180
|
+
<TimelineIndicator />
|
|
181
|
+
<TimelineContent>
|
|
182
|
+
<TimelineTitle>Account activation.</TimelineTitle>
|
|
183
|
+
</TimelineContent>
|
|
184
|
+
</TimelineItem>
|
|
185
|
+
</Timeline>
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## Implementation notes
|
|
189
|
+
|
|
190
|
+
### Responsive behavior
|
|
191
|
+
|
|
192
|
+
`responsive` only has effect when `orientation="horizontal"`.
|
|
193
|
+
|
|
194
|
+
- **`responsive={true}` (default)**: `useMediaQuery("(max-width: 639px)")` overrides the orientation to `"vertical"` on small screens. No scrollbar, no cramped layout.
|
|
195
|
+
- **`responsive={false}`**: the orientation is always horizontal. The `<ol>` is wrapped in `<div class="overflow-x-auto">` and each item receives `min-w-28` so the content is scrollable without clipping.
|
|
196
|
+
|
|
197
|
+
### Connector color logic
|
|
198
|
+
|
|
199
|
+
Each connector segment is split in two halves. The connector below a step (vertical) or the right half of a step (horizontal) is colored by whether **that step itself** is `complete`. The left half of a horizontal step is colored by whether the **previous step** was `complete`. This is managed internally via React context — no extra props are needed.
|
|
200
|
+
|
|
201
|
+
### `group-last:hidden` and `group-first:invisible`
|
|
202
|
+
|
|
203
|
+
- The vertical connector of the last `TimelineItem` is hidden via `group-last:hidden` so no trailing line appears below the final step.
|
|
204
|
+
- The horizontal left spacer of the first item uses `group-first:invisible` (takes space but is transparent) to keep the first dot center-aligned with the rest.
|
|
205
|
+
|
|
206
|
+
## Accessibility
|
|
207
|
+
|
|
208
|
+
- The container renders as a semantic `<ol>` (ordered list), and each step is an `<li>`.
|
|
209
|
+
- The checkmark SVG inside completed dots has `aria-hidden="true"` since the status is conveyed through `data-status` and context.
|
|
210
|
+
- Consider wrapping the timeline in a `<section>` or `<nav>` with an `aria-label` when it represents navigation steps (e.g. a checkout flow).
|
|
211
|
+
|
|
212
|
+
## References
|
|
213
|
+
|
|
214
|
+
- [WAI-ARIA: Patterns – Process steps](https://www.w3.org/WAI/ARIA/apg/)
|
|
@@ -204,7 +204,7 @@ function MediaControls() {
|
|
|
204
204
|
- **Sizes**: `h-8 min-w-8` (sm), `h-9 min-w-9` (default), `h-10 min-w-10` (lg)
|
|
205
205
|
- **State off**: `bg-transparent`
|
|
206
206
|
- **State on**: `bg-accent text-accent-foreground`
|
|
207
|
-
- **Hover**: `bg-
|
|
207
|
+
- **Hover**: `bg-subtle text-foreground`
|
|
208
208
|
- **Outline**: `border border-input shadow-xs`
|
|
209
209
|
- **Focus**: `ring-ring/50` with `ring-[3px]`
|
|
210
210
|
|
|
@@ -281,11 +281,11 @@ function App() {
|
|
|
281
281
|
|
|
282
282
|
## Base styles
|
|
283
283
|
|
|
284
|
-
- **Background**: `bg-
|
|
285
|
-
- **Text**: `text-
|
|
284
|
+
- **Background**: `bg-neutrals-900` (dark)
|
|
285
|
+
- **Text**: `text-neutrals-0 text-xs` (white)
|
|
286
286
|
- **Padding**: `px-3 py-1.5`
|
|
287
287
|
- **Border radius**: `rounded-md`
|
|
288
|
-
- **Arrow**: `size-2.5` with `bg-
|
|
288
|
+
- **Arrow**: `size-2.5` with `bg-neutrals-900`
|
|
289
289
|
- **Z-index**: `z-50`
|
|
290
290
|
- **Animation**: Fade + zoom in/out
|
|
291
291
|
|
package/llm.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Adamo UI Component Library - LLM Context
|
|
2
2
|
|
|
3
|
-
> **CRITICAL**: This is a COMPLETE React component library with
|
|
3
|
+
> **CRITICAL**: This is a COMPLETE React component library with 49+ components. DO NOT create components that already exist. ALWAYS check this file first and use existing components.
|
|
4
4
|
|
|
5
5
|
## 🚨 MOST IMPORTANT RULES
|
|
6
6
|
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
|
|
14
14
|
4. **Users NEVER use `adm:` prefix** - Only library internals use it
|
|
15
15
|
|
|
16
|
-
## 📦 Available Components (
|
|
16
|
+
## 📦 Available Components (49+)
|
|
17
17
|
|
|
18
18
|
Before creating ANY component, verify it doesn't exist here. For implementation details, props, and examples, see the linked documentation.
|
|
19
19
|
|
|
20
|
-
### Form Components (
|
|
20
|
+
### Form Components (16)
|
|
21
21
|
- **Button** [`docs/components/ui/button.md`] - `@adamosuiteservices/ui/button`
|
|
22
22
|
- **Button Group** [`docs/components/ui/button-group.md`] - `@adamosuiteservices/ui/button-group`
|
|
23
23
|
- **Input** [`docs/components/ui/input.md`] - `@adamosuiteservices/ui/input`
|
|
@@ -31,6 +31,7 @@ Before creating ANY component, verify it doesn't exist here. For implementation
|
|
|
31
31
|
- **Field** [`docs/components/ui/field.md`] - `@adamosuiteservices/ui/field` (form wrapper with label/error)
|
|
32
32
|
- **Label** [`docs/components/ui/label.md`] - `@adamosuiteservices/ui/label`
|
|
33
33
|
- **Input Group** [`docs/components/ui/input-group.md`] - `@adamosuiteservices/ui/input-group`
|
|
34
|
+
- **Amount Input** [`docs/components/ui/amount-input.md`] - `@adamosuiteservices/ui/amount-input` (monetary input with locale-based flag and currency)
|
|
34
35
|
- **File Upload** [`docs/components/ui/file-upload.md`] - `@adamosuiteservices/ui/file-upload` ⚠️ Simple file upload
|
|
35
36
|
- **File Upload V2** [`docs/components/ui/file-upload-v2.md`] - `@adamosuiteservices/ui/file-upload-v2` ⚠️ With unique IDs and metadata for server integration
|
|
36
37
|
|
|
@@ -57,13 +58,15 @@ Before creating ANY component, verify it doesn't exist here. For implementation
|
|
|
57
58
|
- **Pagination** [`docs/components/ui/pagination.md`] - `@adamosuiteservices/ui/pagination`
|
|
58
59
|
- **Sidebar** [`docs/components/layout/sidebar.md`] - `@adamosuiteservices/ui/sidebar`
|
|
59
60
|
|
|
60
|
-
### Data Display Components (
|
|
61
|
+
### Data Display Components (8)
|
|
61
62
|
- **Table** [`docs/components/ui/table.md`] - `@adamosuiteservices/ui/table`
|
|
62
63
|
- **Card** [`docs/components/ui/card.md`] - `@adamosuiteservices/ui/card`
|
|
63
64
|
- **Badge** [`docs/components/ui/badge.md`] - `@adamosuiteservices/ui/badge`
|
|
64
65
|
- **Avatar** [`docs/components/ui/avatar.md`] - `@adamosuiteservices/ui/avatar`
|
|
65
66
|
- **Typography** [`docs/components/ui/typography.md`] - `@adamosuiteservices/ui/typography`
|
|
66
67
|
- **Skeleton** [`docs/components/ui/skeleton.md`] - `@adamosuiteservices/ui/skeleton`
|
|
68
|
+
- **Selectable Card** [`docs/components/ui/selectable-card.md`] - `@adamosuiteservices/ui/selectable-card` (radio/checkbox card selection)
|
|
69
|
+
- **Timeline** [`docs/components/ui/timeline.md`] - `@adamosuiteservices/ui/timeline` (step-by-step vertical/horizontal timeline)
|
|
67
70
|
|
|
68
71
|
### Layout Components (5)
|
|
69
72
|
- **Accordion** [`docs/components/ui/accordion.md`] - `@adamosuiteservices/ui/accordion`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamosuiteservices/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"types": "./dist/components/ui/alert/alert.d.ts",
|
|
55
55
|
"import": "./dist/alert.js"
|
|
56
56
|
},
|
|
57
|
+
"./amount-input": {
|
|
58
|
+
"types": "./dist/components/ui/amount-input/amount-input.d.ts",
|
|
59
|
+
"import": "./dist/amount-input.js"
|
|
60
|
+
},
|
|
57
61
|
"./avatar": {
|
|
58
62
|
"types": "./dist/components/ui/avatar/avatar.d.ts",
|
|
59
63
|
"import": "./dist/avatar.js"
|
|
@@ -174,6 +178,10 @@
|
|
|
174
178
|
"types": "./dist/components/ui/separator/separator.d.ts",
|
|
175
179
|
"import": "./dist/separator.js"
|
|
176
180
|
},
|
|
181
|
+
"./selectable-card": {
|
|
182
|
+
"types": "./dist/components/ui/selectable-card/selectable-card.d.ts",
|
|
183
|
+
"import": "./dist/selectable-card.js"
|
|
184
|
+
},
|
|
177
185
|
"./sheet": {
|
|
178
186
|
"types": "./dist/components/ui/sheet/sheet.d.ts",
|
|
179
187
|
"import": "./dist/sheet.js"
|
|
@@ -210,6 +218,10 @@
|
|
|
210
218
|
"types": "./dist/components/ui/textarea/textarea.d.ts",
|
|
211
219
|
"import": "./dist/textarea.js"
|
|
212
220
|
},
|
|
221
|
+
"./timeline": {
|
|
222
|
+
"types": "./dist/components/ui/timeline/timeline.d.ts",
|
|
223
|
+
"import": "./dist/timeline.js"
|
|
224
|
+
},
|
|
213
225
|
"./toggle": {
|
|
214
226
|
"types": "./dist/components/ui/toggle/toggle.d.ts",
|
|
215
227
|
"import": "./dist/toggle.js"
|
package/dist/button-BnUlAtuD.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
3
|
-
import { S as u } from "./index-BvLQnI56.js";
|
|
4
|
-
import { S as g } from "./spinner-DQ5JLL3U.js";
|
|
5
|
-
import { c as v } from "./index-CRiPKpXj.js";
|
|
6
|
-
import { c as b } from "./index-BqtVL8d-.js";
|
|
7
|
-
import "react";
|
|
8
|
-
const l = b(
|
|
9
|
-
`
|
|
10
|
-
adm:inline-flex adm:items-center adm:justify-center adm:gap-2
|
|
11
|
-
adm:rounded-[12px] adm:text-sm adm:font-semibold adm:whitespace-nowrap
|
|
12
|
-
adm:transition-all adm:outline-none
|
|
13
|
-
adm:focus-visible:ring-[3px] adm:focus-visible:ring-ring/50
|
|
14
|
-
adm:disabled:pointer-events-none adm:disabled:opacity-50
|
|
15
|
-
adm:aria-invalid:border-destructive adm:aria-invalid:ring-destructive/20
|
|
16
|
-
adm:dark:aria-invalid:ring-destructive/40
|
|
17
|
-
adm:[&_svg]:pointer-events-none adm:[&_svg]:shrink-0
|
|
18
|
-
adm:[&_svg:not([class*=size-])]:size-5
|
|
19
|
-
adm:[&>[data-slot=icon]]:shrink-0 adm:[&>[data-slot=icon]]:text-2xl
|
|
20
|
-
`,
|
|
21
|
-
{
|
|
22
|
-
variants: {
|
|
23
|
-
variant: {
|
|
24
|
-
default: `
|
|
25
|
-
adm:bg-primary adm:text-primary-foreground
|
|
26
|
-
adm:hover:bg-primary-700
|
|
27
|
-
`,
|
|
28
|
-
success: `
|
|
29
|
-
adm:bg-success adm:text-white
|
|
30
|
-
adm:hover:bg-success-700
|
|
31
|
-
adm:focus-visible:ring-success/20
|
|
32
|
-
adm:dark:bg-success/60 adm:dark:focus-visible:ring-success/40
|
|
33
|
-
`,
|
|
34
|
-
"success-medium": `
|
|
35
|
-
adm:bg-success-50 adm:text-success
|
|
36
|
-
adm:hover:bg-success/20
|
|
37
|
-
adm:focus-visible:ring-success/20
|
|
38
|
-
adm:dark:bg-success-50/60 adm:dark:focus-visible:ring-success/40
|
|
39
|
-
`,
|
|
40
|
-
warning: `
|
|
41
|
-
adm:bg-warning adm:text-white
|
|
42
|
-
adm:hover:bg-warning-700
|
|
43
|
-
adm:focus-visible:ring-warning/20
|
|
44
|
-
adm:dark:bg-warning/60 adm:dark:focus-visible:ring-warning/40
|
|
45
|
-
`,
|
|
46
|
-
"warning-medium": `
|
|
47
|
-
adm:bg-warning-50 adm:text-warning
|
|
48
|
-
adm:hover:bg-warning/20
|
|
49
|
-
adm:focus-visible:ring-warning/20
|
|
50
|
-
adm:dark:bg-warning-50/60 adm:dark:focus-visible:ring-warning/40
|
|
51
|
-
`,
|
|
52
|
-
destructive: `
|
|
53
|
-
adm:bg-destructive adm:text-white
|
|
54
|
-
adm:hover:bg-destructive-700
|
|
55
|
-
adm:focus-visible:ring-destructive/20
|
|
56
|
-
adm:dark:bg-destructive/60 adm:dark:focus-visible:ring-destructive/40
|
|
57
|
-
`,
|
|
58
|
-
"destructive-medium": `
|
|
59
|
-
adm:bg-destructive-50 adm:text-destructive
|
|
60
|
-
adm:hover:bg-destructive/20
|
|
61
|
-
adm:focus-visible:ring-destructive/20
|
|
62
|
-
adm:dark:bg-destructive-50/60
|
|
63
|
-
adm:dark:focus-visible:ring-destructive/40
|
|
64
|
-
`,
|
|
65
|
-
outline: `
|
|
66
|
-
adm:border adm:bg-background adm:shadow-xs
|
|
67
|
-
adm:hover:bg-accent adm:hover:text-accent-foreground
|
|
68
|
-
adm:aria-invalid:border-destructive
|
|
69
|
-
adm:aria-invalid:ring-destructive/20
|
|
70
|
-
adm:dark:border-input adm:dark:bg-input/30 adm:dark:hover:bg-input/50
|
|
71
|
-
adm:dark:aria-invalid:ring-destructive/40
|
|
72
|
-
`,
|
|
73
|
-
secondary: `
|
|
74
|
-
adm:bg-secondary adm:text-secondary-foreground
|
|
75
|
-
adm:hover:bg-primary-200
|
|
76
|
-
`,
|
|
77
|
-
ghost: `
|
|
78
|
-
adm:text-primary
|
|
79
|
-
adm:hover:bg-primary-50
|
|
80
|
-
adm:dark:hover:bg-primary-50/20
|
|
81
|
-
`,
|
|
82
|
-
"ghost-neutral": `
|
|
83
|
-
adm:hover:bg-accent adm:hover:text-accent-foreground
|
|
84
|
-
adm:dark:hover:bg-accent/50
|
|
85
|
-
`,
|
|
86
|
-
link: "adm:text-primary",
|
|
87
|
-
"link-neutral": "adm:text-foreground"
|
|
88
|
-
},
|
|
89
|
-
size: {
|
|
90
|
-
default: "adm:h-10 adm:px-3",
|
|
91
|
-
sm: "adm:h-9 adm:px-3",
|
|
92
|
-
lg: "adm:h-11 adm:px-6",
|
|
93
|
-
icon: "adm:size-10",
|
|
94
|
-
"icon-sm": "adm:size-9",
|
|
95
|
-
"icon-lg": "adm:size-11"
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
defaultVariants: {
|
|
99
|
-
variant: "default",
|
|
100
|
-
size: "default"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
function y({
|
|
105
|
-
className: i,
|
|
106
|
-
variant: s,
|
|
107
|
-
size: t,
|
|
108
|
-
asChild: d = !1,
|
|
109
|
-
loading: a = !1,
|
|
110
|
-
children: r,
|
|
111
|
-
disabled: m,
|
|
112
|
-
...n
|
|
113
|
-
}) {
|
|
114
|
-
const c = d && !a ? u : "button", o = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
115
|
-
a && /* @__PURE__ */ e.jsx(g, { className: "adm:text-base" }),
|
|
116
|
-
r
|
|
117
|
-
] });
|
|
118
|
-
return /* @__PURE__ */ e.jsx(
|
|
119
|
-
c,
|
|
120
|
-
{
|
|
121
|
-
"data-slot": "button",
|
|
122
|
-
className: v(l({ variant: s, size: t, className: i })),
|
|
123
|
-
disabled: m || a,
|
|
124
|
-
...n,
|
|
125
|
-
children: d && !a ? r : o
|
|
126
|
-
}
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
export {
|
|
130
|
-
y as B,
|
|
131
|
-
l as b
|
|
132
|
-
};
|