sonance-brand-mcp 1.3.1 → 1.3.3
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/assets/api/sonance-analyze/route.ts +1116 -0
- package/dist/assets/api/sonance-assets/route.ts +113 -0
- package/dist/assets/api/sonance-components/route.ts +41 -0
- package/dist/assets/api/sonance-inject-id/route.ts +363 -0
- package/dist/assets/api/sonance-save-logo/route.ts +426 -0
- package/dist/assets/api/sonance-theme/route.ts +106 -0
- package/dist/assets/brand-system.ts +1265 -0
- package/dist/assets/components/accordion.stories.tsx +26 -26
- package/dist/assets/components/accordion.tsx +3 -3
- package/dist/assets/components/alert-dialog.stories.tsx +7 -7
- package/dist/assets/components/alert-dialog.tsx +2 -1
- package/dist/assets/components/alert.stories.tsx +3 -3
- package/dist/assets/components/alert.tsx +4 -3
- package/dist/assets/components/aspect-ratio.stories.tsx +4 -1
- package/dist/assets/components/autocomplete.stories.tsx +9 -9
- package/dist/assets/components/autocomplete.tsx +3 -3
- package/dist/assets/components/avatar.stories.tsx +5 -5
- package/dist/assets/components/avatar.tsx +4 -4
- package/dist/assets/components/badge.stories.tsx +10 -10
- package/dist/assets/components/badge.tsx +3 -3
- package/dist/assets/components/breadcrumbs.stories.tsx +7 -7
- package/dist/assets/components/breadcrumbs.tsx +13 -8
- package/dist/assets/components/button.stories.tsx +74 -74
- package/dist/assets/components/button.tsx +2 -0
- package/dist/assets/components/calendar.stories.tsx +11 -11
- package/dist/assets/components/calendar.tsx +4 -4
- package/dist/assets/components/card.stories.tsx +22 -22
- package/dist/assets/components/card.tsx +7 -3
- package/dist/assets/components/carousel.stories.tsx +6 -6
- package/dist/assets/components/carousel.tsx +10 -8
- package/dist/assets/components/chart.tsx +5 -5
- package/dist/assets/components/checkbox-group.stories.tsx +6 -6
- package/dist/assets/components/checkbox-group.tsx +3 -3
- package/dist/assets/components/checkbox.stories.tsx +23 -20
- package/dist/assets/components/checkbox.tsx +13 -16
- package/dist/assets/components/code.stories.tsx +24 -24
- package/dist/assets/components/code.tsx +7 -14
- package/dist/assets/components/collapsible.stories.tsx +3 -3
- package/dist/assets/components/command.stories.tsx +14 -14
- package/dist/assets/components/command.tsx +4 -3
- package/dist/assets/components/context-menu.stories.tsx +1 -1
- package/dist/assets/components/context-menu.tsx +3 -7
- package/dist/assets/components/date-input.stories.tsx +9 -9
- package/dist/assets/components/date-input.tsx +2 -2
- package/dist/assets/components/date-picker.stories.tsx +9 -9
- package/dist/assets/components/date-picker.tsx +3 -3
- package/dist/assets/components/date-range-picker.stories.tsx +12 -12
- package/dist/assets/components/date-range-picker.tsx +3 -3
- package/dist/assets/components/dialog.stories.tsx +40 -40
- package/dist/assets/components/dialog.tsx +8 -12
- package/dist/assets/components/divider.stories.tsx +30 -30
- package/dist/assets/components/divider.tsx +4 -8
- package/dist/assets/components/drawer.stories.tsx +32 -31
- package/dist/assets/components/drawer.tsx +7 -6
- package/dist/assets/components/dropdown-menu.tsx +3 -7
- package/dist/assets/components/dropdown.stories.tsx +12 -12
- package/dist/assets/components/dropdown.tsx +5 -5
- package/dist/assets/components/form.stories.tsx +30 -29
- package/dist/assets/components/form.tsx +5 -5
- package/dist/assets/components/hover-card.stories.tsx +12 -10
- package/dist/assets/components/hover-card.tsx +1 -1
- package/dist/assets/components/image.stories.tsx +48 -25
- package/dist/assets/components/image.tsx +8 -5
- package/dist/assets/components/input-otp.stories.tsx +15 -15
- package/dist/assets/components/input-otp.tsx +5 -5
- package/dist/assets/components/input.stories.tsx +30 -25
- package/dist/assets/components/input.tsx +7 -4
- package/dist/assets/components/kbd.stories.tsx +34 -34
- package/dist/assets/components/kbd.tsx +5 -5
- package/dist/assets/components/link.stories.tsx +36 -36
- package/dist/assets/components/link.tsx +4 -0
- package/dist/assets/components/listbox.stories.tsx +5 -5
- package/dist/assets/components/listbox.tsx +4 -4
- package/dist/assets/components/menubar.tsx +3 -7
- package/dist/assets/components/navbar.stories.tsx +24 -24
- package/dist/assets/components/navbar.tsx +8 -14
- package/dist/assets/components/navigation-menu.stories.tsx +11 -9
- package/dist/assets/components/navigation-menu.tsx +1 -1
- package/dist/assets/components/number-input.stories.tsx +11 -11
- package/dist/assets/components/number-input.tsx +3 -3
- package/dist/assets/components/pagination.stories.tsx +13 -13
- package/dist/assets/components/pagination.tsx +6 -6
- package/dist/assets/components/popover.stories.tsx +35 -35
- package/dist/assets/components/popover.tsx +98 -15
- package/dist/assets/components/progress.stories.tsx +5 -5
- package/dist/assets/components/progress.tsx +5 -5
- package/dist/assets/components/radio-group.stories.tsx +7 -7
- package/dist/assets/components/radio-group.tsx +3 -3
- package/dist/assets/components/range-calendar.stories.tsx +18 -18
- package/dist/assets/components/range-calendar.tsx +3 -3
- package/dist/assets/components/resizable.stories.tsx +23 -23
- package/dist/assets/components/resizable.tsx +1 -1
- package/dist/assets/components/scroll-area.stories.tsx +15 -15
- package/dist/assets/components/scroll-area.tsx +1 -1
- package/dist/assets/components/scroll-shadow.stories.tsx +17 -17
- package/dist/assets/components/scroll-shadow.tsx +2 -2
- package/dist/assets/components/select.stories.tsx +20 -19
- package/dist/assets/components/select.tsx +10 -6
- package/dist/assets/components/separator.tsx +1 -1
- package/dist/assets/components/sheet.tsx +3 -7
- package/dist/assets/components/sidebar.stories.tsx +30 -30
- package/dist/assets/components/sidebar.tsx +24 -27
- package/dist/assets/components/skeleton.stories.tsx +3 -3
- package/dist/assets/components/skeleton.tsx +2 -2
- package/dist/assets/components/slider.stories.tsx +6 -6
- package/dist/assets/components/slider.tsx +3 -3
- package/dist/assets/components/spacer.stories.tsx +11 -11
- package/dist/assets/components/spacer.tsx +2 -2
- package/dist/assets/components/spinner.stories.tsx +8 -8
- package/dist/assets/components/spinner.tsx +5 -5
- package/dist/assets/components/switch.stories.tsx +24 -20
- package/dist/assets/components/switch.tsx +14 -6
- package/dist/assets/components/table.stories.tsx +7 -7
- package/dist/assets/components/table.tsx +8 -8
- package/dist/assets/components/tabs.stories.tsx +37 -37
- package/dist/assets/components/tabs.tsx +3 -3
- package/dist/assets/components/textarea.stories.tsx +13 -12
- package/dist/assets/components/textarea.tsx +3 -3
- package/dist/assets/components/theme-toggle.stories.tsx +31 -30
- package/dist/assets/components/theme-toggle.tsx +2 -2
- package/dist/assets/components/time-input.stories.tsx +16 -16
- package/dist/assets/components/time-input.tsx +2 -2
- package/dist/assets/components/toast.stories.tsx +8 -5
- package/dist/assets/components/toast.tsx +6 -6
- package/dist/assets/components/toggle-group.tsx +1 -1
- package/dist/assets/components/toggle.tsx +1 -1
- package/dist/assets/components/tooltip.stories.tsx +49 -27
- package/dist/assets/components/tooltip.tsx +1 -1
- package/dist/assets/components/user.stories.tsx +23 -23
- package/dist/assets/components/user.tsx +7 -4
- package/dist/assets/dev-tools/SonanceDevTools.tsx +4201 -0
- package/dist/assets/dev-tools/index.ts +10 -0
- package/dist/assets/globals.css +9 -0
- package/dist/assets/styles/brand-overrides.css +37 -0
- package/dist/index.js +1882 -7
- package/package.json +1 -1
|
@@ -76,11 +76,11 @@ export const LoadingStates: Story = {
|
|
|
76
76
|
<div className="space-y-8">
|
|
77
77
|
<div className="flex items-center gap-4">
|
|
78
78
|
<Spinner size="sm" />
|
|
79
|
-
<span className="text-foreground-secondary">Loading content...</span>
|
|
79
|
+
<span id="loading-states-span-loading-content" className="text-foreground-secondary">Loading content...</span>
|
|
80
80
|
</div>
|
|
81
81
|
<div className="flex items-center gap-4">
|
|
82
82
|
<DotsSpinner />
|
|
83
|
-
<span className="text-foreground-secondary">Processing...</span>
|
|
83
|
+
<span id="loading-states-span-processing" className="text-foreground-secondary">Processing...</span>
|
|
84
84
|
</div>
|
|
85
85
|
<div className="text-center p-8 border border-border rounded">
|
|
86
86
|
<Spinner size="lg" label="Loading data" />
|
|
@@ -93,7 +93,7 @@ export const ButtonLoading: Story = {
|
|
|
93
93
|
render: () => (
|
|
94
94
|
<button className="inline-flex items-center gap-2 bg-primary text-primary-foreground px-6 py-3">
|
|
95
95
|
<Spinner size="sm" />
|
|
96
|
-
<span>Processing...</span>
|
|
96
|
+
<span id="button-loading-span-processing">Processing...</span>
|
|
97
97
|
</button>
|
|
98
98
|
),
|
|
99
99
|
};
|
|
@@ -104,7 +104,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
104
104
|
<div className="space-y-8">
|
|
105
105
|
{/* Mobile */}
|
|
106
106
|
<div>
|
|
107
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
107
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
108
108
|
<div className="w-[375px] border border-dashed border-border p-4">
|
|
109
109
|
<div className="text-center p-8 border border-border rounded">
|
|
110
110
|
<Spinner size="md" label="Loading..." />
|
|
@@ -113,7 +113,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
113
113
|
</div>
|
|
114
114
|
{/* Tablet */}
|
|
115
115
|
<div>
|
|
116
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
116
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
117
117
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
118
118
|
<div className="flex justify-center items-center gap-8">
|
|
119
119
|
<Spinner size="sm" label="Small" />
|
|
@@ -124,12 +124,12 @@ export const ResponsiveMatrix: Story = {
|
|
|
124
124
|
</div>
|
|
125
125
|
{/* Desktop */}
|
|
126
126
|
<div>
|
|
127
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
127
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
128
128
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
129
129
|
<div className="flex justify-between items-center">
|
|
130
130
|
<div className="flex items-center gap-4">
|
|
131
131
|
<Spinner size="sm" />
|
|
132
|
-
<span className="text-foreground-secondary">Loading content...</span>
|
|
132
|
+
<span id="responsive-matrix-span-loading-content" className="text-foreground-secondary">Loading content...</span>
|
|
133
133
|
</div>
|
|
134
134
|
<div className="flex items-center gap-8">
|
|
135
135
|
<Spinner size="sm" />
|
|
@@ -139,7 +139,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
139
139
|
</div>
|
|
140
140
|
<div className="flex items-center gap-4">
|
|
141
141
|
<DotsSpinner />
|
|
142
|
-
<span className="text-foreground-secondary">Processing...</span>
|
|
142
|
+
<span id="responsive-matrix-span-processing" className="text-foreground-secondary">Processing...</span>
|
|
143
143
|
</div>
|
|
144
144
|
</div>
|
|
145
145
|
</div>
|
|
@@ -15,7 +15,7 @@ export function Spinner({ size = "md", className, label }: SpinnerProps) {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<div className={cn("inline-flex flex-col items-center gap-2", className)}>
|
|
18
|
+
<div data-sonance-name="spinner" className={cn("inline-flex flex-col items-center gap-2", className)}>
|
|
19
19
|
<div
|
|
20
20
|
role="status"
|
|
21
21
|
aria-label={label || "Loading"}
|
|
@@ -25,9 +25,9 @@ export function Spinner({ size = "md", className, label }: SpinnerProps) {
|
|
|
25
25
|
)}
|
|
26
26
|
/>
|
|
27
27
|
{label && (
|
|
28
|
-
<span className="text-xs font-medium text-foreground-muted">{label}</span>
|
|
28
|
+
<span id="spinner-span-label" className="text-xs font-medium text-foreground-muted">{label}</span>
|
|
29
29
|
)}
|
|
30
|
-
<span className="sr-only">{label || "Loading..."}</span>
|
|
30
|
+
<span id="spinner-span-label-loading" className="sr-only">{label || "Loading..."}</span>
|
|
31
31
|
</div>
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -52,7 +52,7 @@ export function DotsSpinner({ size = "md", className }: DotsSpinnerProps) {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
|
-
<div
|
|
55
|
+
<div data-sonance-name="spinner"
|
|
56
56
|
role="status"
|
|
57
57
|
aria-label="Loading"
|
|
58
58
|
className={cn("inline-flex items-center", gapSizes[size], className)}
|
|
@@ -70,7 +70,7 @@ export function DotsSpinner({ size = "md", className }: DotsSpinnerProps) {
|
|
|
70
70
|
}}
|
|
71
71
|
/>
|
|
72
72
|
))}
|
|
73
|
-
<span className="sr-only">Loading...</span>
|
|
73
|
+
<span id="dots-spinner-span-loading" className="sr-only">Loading...</span>
|
|
74
74
|
</div>
|
|
75
75
|
);
|
|
76
76
|
}
|
|
@@ -84,11 +84,11 @@ export const DisabledChecked: Story = {
|
|
|
84
84
|
export const AllStates: Story = {
|
|
85
85
|
render: () => (
|
|
86
86
|
<div className="space-y-4">
|
|
87
|
-
<Switch label="Off" />
|
|
88
|
-
<Switch label="On" defaultChecked />
|
|
89
|
-
<Switch label="With description" description="Additional context for this setting" />
|
|
90
|
-
<Switch label="Disabled" disabled />
|
|
91
|
-
<Switch label="Disabled on" disabled defaultChecked />
|
|
87
|
+
<Switch id="all-states-switch" label="Off" />
|
|
88
|
+
<Switch id="all-states-switch" label="On" defaultChecked />
|
|
89
|
+
<Switch id="all-states-switch" label="With description" description="Additional context for this setting" />
|
|
90
|
+
<Switch id="all-states-switch" label="Disabled" disabled />
|
|
91
|
+
<Switch id="all-states-switch" label="Disabled on" disabled defaultChecked />
|
|
92
92
|
</div>
|
|
93
93
|
),
|
|
94
94
|
};
|
|
@@ -97,21 +97,24 @@ export const AllStates: Story = {
|
|
|
97
97
|
export const SettingsExample: Story = {
|
|
98
98
|
render: () => (
|
|
99
99
|
<div className="space-y-6 w-96">
|
|
100
|
-
<h3 className="text-lg font-medium text-foreground">Settings</h3>
|
|
100
|
+
<h3 id="settings-example-h3-settings" className="text-lg font-medium text-foreground">Settings</h3>
|
|
101
101
|
<div className="space-y-4 divide-y divide-divider">
|
|
102
102
|
<Switch
|
|
103
|
+
id="settings-example-switch"
|
|
103
104
|
label="Push notifications"
|
|
104
105
|
description="Receive push notifications on your device"
|
|
105
106
|
defaultChecked
|
|
106
107
|
/>
|
|
107
108
|
<div className="pt-4">
|
|
108
109
|
<Switch
|
|
110
|
+
id="settings-example-switch"
|
|
109
111
|
label="Email digest"
|
|
110
112
|
description="Weekly summary of your activity"
|
|
111
113
|
/>
|
|
112
114
|
</div>
|
|
113
115
|
<div className="pt-4">
|
|
114
116
|
<Switch
|
|
117
|
+
id="settings-example-switch"
|
|
115
118
|
label="Auto-update"
|
|
116
119
|
description="Automatically install updates"
|
|
117
120
|
defaultChecked
|
|
@@ -119,6 +122,7 @@ export const SettingsExample: Story = {
|
|
|
119
122
|
</div>
|
|
120
123
|
<div className="pt-4">
|
|
121
124
|
<Switch
|
|
125
|
+
id="settings-example-switch"
|
|
122
126
|
label="Analytics"
|
|
123
127
|
description="Help improve the product with usage data"
|
|
124
128
|
/>
|
|
@@ -134,34 +138,34 @@ export const ResponsiveMatrix: Story = {
|
|
|
134
138
|
<div className="space-y-8">
|
|
135
139
|
{/* Mobile */}
|
|
136
140
|
<div>
|
|
137
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
141
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
138
142
|
<div className="w-[375px] border border-dashed border-border p-4 space-y-4">
|
|
139
|
-
<Switch label="Dark mode" description="Enable dark theme" />
|
|
140
|
-
<Switch label="Notifications" defaultChecked />
|
|
141
|
-
<Switch label="Auto-save" defaultChecked />
|
|
143
|
+
<Switch id="responsive-matrix-switch" label="Dark mode" description="Enable dark theme" />
|
|
144
|
+
<Switch id="responsive-matrix-switch" label="Notifications" defaultChecked />
|
|
145
|
+
<Switch id="responsive-matrix-switch" label="Auto-save" defaultChecked />
|
|
142
146
|
</div>
|
|
143
147
|
</div>
|
|
144
148
|
{/* Tablet */}
|
|
145
149
|
<div>
|
|
146
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
150
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
147
151
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
148
152
|
<div className="grid grid-cols-2 gap-4">
|
|
149
|
-
<Switch label="Email notifications" description="Receive email updates" defaultChecked />
|
|
150
|
-
<Switch label="Push notifications" description="Mobile app alerts" />
|
|
151
|
-
<Switch label="Weekly digest" description="Summary of activity" defaultChecked />
|
|
152
|
-
<Switch label="Marketing emails" description="Product announcements" />
|
|
153
|
+
<Switch id="responsive-matrix-switch" label="Email notifications" description="Receive email updates" defaultChecked />
|
|
154
|
+
<Switch id="responsive-matrix-switch" label="Push notifications" description="Mobile app alerts" />
|
|
155
|
+
<Switch id="responsive-matrix-switch" label="Weekly digest" description="Summary of activity" defaultChecked />
|
|
156
|
+
<Switch id="responsive-matrix-switch" label="Marketing emails" description="Product announcements" />
|
|
153
157
|
</div>
|
|
154
158
|
</div>
|
|
155
159
|
</div>
|
|
156
160
|
{/* Desktop */}
|
|
157
161
|
<div>
|
|
158
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
162
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
159
163
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
160
164
|
<div className="grid grid-cols-4 gap-4">
|
|
161
|
-
<Switch label="Off" />
|
|
162
|
-
<Switch label="On" defaultChecked />
|
|
163
|
-
<Switch label="Disabled" disabled />
|
|
164
|
-
<Switch label="Disabled on" disabled defaultChecked />
|
|
165
|
+
<Switch id="responsive-matrix-switch" label="Off" />
|
|
166
|
+
<Switch id="responsive-matrix-switch" label="On" defaultChecked />
|
|
167
|
+
<Switch id="responsive-matrix-switch" label="Disabled" disabled />
|
|
168
|
+
<Switch id="responsive-matrix-switch" label="Disabled on" disabled defaultChecked />
|
|
165
169
|
</div>
|
|
166
170
|
</div>
|
|
167
171
|
</div>
|
|
@@ -27,16 +27,20 @@ const getTrackStateStyles = (state?: SwitchState) => {
|
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
30
|
-
({ className, label, description, id, state, disabled, checked, ...props }, ref) => {
|
|
30
|
+
({ className, label, description, id, state, disabled, checked, defaultChecked, onChange, style, ...props }, ref) => {
|
|
31
31
|
const uniqueId = useId();
|
|
32
32
|
const inputId = id || `switch-${uniqueId}`;
|
|
33
33
|
const isDisabled = disabled || state === "disabled";
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
// Determine if we're in controlled mode
|
|
36
|
+
const isControlled = checked !== undefined || onChange !== undefined;
|
|
37
|
+
const isCheckedForState = state === "checked";
|
|
35
38
|
|
|
36
39
|
return (
|
|
37
|
-
<div className="flex items-start gap-3">
|
|
40
|
+
<div data-sonance-name="switch" className="flex items-start gap-3">
|
|
38
41
|
<label
|
|
39
42
|
htmlFor={inputId}
|
|
43
|
+
style={style}
|
|
40
44
|
className={cn(
|
|
41
45
|
"relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full",
|
|
42
46
|
"border border-border bg-input transition-colors duration-200",
|
|
@@ -52,11 +56,15 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
52
56
|
id={inputId}
|
|
53
57
|
ref={ref}
|
|
54
58
|
disabled={isDisabled}
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
{...(isControlled
|
|
60
|
+
? { checked: checked || isCheckedForState, onChange }
|
|
61
|
+
: { defaultChecked: defaultChecked || isCheckedForState }
|
|
62
|
+
)}
|
|
63
|
+
className="peer sr-only" data-sonance-name="switch"
|
|
57
64
|
{...props}
|
|
58
65
|
/>
|
|
59
66
|
<span
|
|
67
|
+
id="switch-span"
|
|
60
68
|
className={cn(
|
|
61
69
|
"pointer-events-none absolute left-0.5 h-5 w-5 rounded-full bg-foreground-muted shadow-sm",
|
|
62
70
|
"transition-transform duration-200",
|
|
@@ -76,7 +84,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
76
84
|
</label>
|
|
77
85
|
)}
|
|
78
86
|
{description && (
|
|
79
|
-
<p className="text-xs text-foreground-muted">{description}</p>
|
|
87
|
+
<p id="switch-p-description" className="text-xs text-foreground-muted">{description}</p>
|
|
80
88
|
)}
|
|
81
89
|
</div>
|
|
82
90
|
)}
|
|
@@ -163,7 +163,7 @@ export const WithCheckboxes: Story = {
|
|
|
163
163
|
<TableHeader>
|
|
164
164
|
<TableRow>
|
|
165
165
|
<TableHead className="w-12">
|
|
166
|
-
<Checkbox />
|
|
166
|
+
<Checkbox id="with-checkboxes-checkbox" />
|
|
167
167
|
</TableHead>
|
|
168
168
|
<TableHead>Product</TableHead>
|
|
169
169
|
<TableHead>Category</TableHead>
|
|
@@ -174,7 +174,7 @@ export const WithCheckboxes: Story = {
|
|
|
174
174
|
{products.map((product) => (
|
|
175
175
|
<TableRow key={product.id}>
|
|
176
176
|
<TableCell>
|
|
177
|
-
<Checkbox />
|
|
177
|
+
<Checkbox id="with-checkboxes-checkbox" />
|
|
178
178
|
</TableCell>
|
|
179
179
|
<TableCell className="font-medium">{product.name}</TableCell>
|
|
180
180
|
<TableCell>{product.category}</TableCell>
|
|
@@ -241,7 +241,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
241
241
|
<div className="space-y-8">
|
|
242
242
|
{/* Mobile */}
|
|
243
243
|
<div>
|
|
244
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
244
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
245
245
|
<div className="w-[375px] border border-dashed border-border p-2 overflow-x-auto">
|
|
246
246
|
<Table>
|
|
247
247
|
<TableHeader>
|
|
@@ -263,7 +263,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
263
263
|
</div>
|
|
264
264
|
{/* Tablet */}
|
|
265
265
|
<div>
|
|
266
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
266
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
267
267
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
268
268
|
<Table>
|
|
269
269
|
<TableHeader>
|
|
@@ -287,12 +287,12 @@ export const ResponsiveMatrix: Story = {
|
|
|
287
287
|
</div>
|
|
288
288
|
{/* Desktop */}
|
|
289
289
|
<div>
|
|
290
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
290
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
291
291
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
292
292
|
<Table>
|
|
293
293
|
<TableHeader>
|
|
294
294
|
<TableRow>
|
|
295
|
-
<TableHead className="w-12"><Checkbox /></TableHead>
|
|
295
|
+
<TableHead className="w-12"><Checkbox id="responsive-matrix-checkbox" /></TableHead>
|
|
296
296
|
<TableHead>Product</TableHead>
|
|
297
297
|
<TableHead>Category</TableHead>
|
|
298
298
|
<TableHead>Status</TableHead>
|
|
@@ -302,7 +302,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
302
302
|
<TableBody>
|
|
303
303
|
{products.map((product) => (
|
|
304
304
|
<TableRow key={product.id}>
|
|
305
|
-
<TableCell><Checkbox /></TableCell>
|
|
305
|
+
<TableCell><Checkbox id="responsive-matrix-checkbox" /></TableCell>
|
|
306
306
|
<TableCell className="font-medium">{product.name}</TableCell>
|
|
307
307
|
<TableCell>{product.category}</TableCell>
|
|
308
308
|
<TableCell>
|
|
@@ -8,7 +8,7 @@ export const Table = forwardRef<
|
|
|
8
8
|
<div className="w-full overflow-auto">
|
|
9
9
|
<table
|
|
10
10
|
ref={ref}
|
|
11
|
-
className={cn("w-full caption-bottom text-sm", className)}
|
|
11
|
+
className={cn("w-full caption-bottom text-sm", className)} data-sonance-name="table"
|
|
12
12
|
{...props}
|
|
13
13
|
/>
|
|
14
14
|
</div>
|
|
@@ -20,7 +20,7 @@ export const TableHeader = forwardRef<
|
|
|
20
20
|
HTMLTableSectionElement,
|
|
21
21
|
React.HTMLAttributes<HTMLTableSectionElement>
|
|
22
22
|
>(({ className, ...props }, ref) => (
|
|
23
|
-
<thead ref={ref} className={cn("[&_tr]:border-b", className)} {...props} />
|
|
23
|
+
<thead ref={ref} className={cn("[&_tr]:border-b", className)} data-sonance-name="table" {...props} />
|
|
24
24
|
));
|
|
25
25
|
|
|
26
26
|
TableHeader.displayName = "TableHeader";
|
|
@@ -31,7 +31,7 @@ export const TableBody = forwardRef<
|
|
|
31
31
|
>(({ className, ...props }, ref) => (
|
|
32
32
|
<tbody
|
|
33
33
|
ref={ref}
|
|
34
|
-
className={cn("[&_tr:last-child]:border-0", className)}
|
|
34
|
+
className={cn("[&_tr:last-child]:border-0", className)} data-sonance-name="table"
|
|
35
35
|
{...props}
|
|
36
36
|
/>
|
|
37
37
|
));
|
|
@@ -47,7 +47,7 @@ export const TableFooter = forwardRef<
|
|
|
47
47
|
className={cn(
|
|
48
48
|
"border-t border-border bg-background-secondary font-medium",
|
|
49
49
|
className
|
|
50
|
-
)}
|
|
50
|
+
)} data-sonance-name="table"
|
|
51
51
|
{...props}
|
|
52
52
|
/>
|
|
53
53
|
));
|
|
@@ -65,7 +65,7 @@ export const TableRow = forwardRef<
|
|
|
65
65
|
"hover:bg-card-hover",
|
|
66
66
|
"data-[state=selected]:bg-secondary-hover",
|
|
67
67
|
className
|
|
68
|
-
)}
|
|
68
|
+
)} data-sonance-name="table"
|
|
69
69
|
{...props}
|
|
70
70
|
/>
|
|
71
71
|
));
|
|
@@ -83,7 +83,7 @@ export const TableHead = forwardRef<
|
|
|
83
83
|
"text-xs uppercase tracking-widest",
|
|
84
84
|
"[&:has([role=checkbox])]:pr-0",
|
|
85
85
|
className
|
|
86
|
-
)}
|
|
86
|
+
)} data-sonance-name="table"
|
|
87
87
|
{...props}
|
|
88
88
|
/>
|
|
89
89
|
));
|
|
@@ -100,7 +100,7 @@ export const TableCell = forwardRef<
|
|
|
100
100
|
"p-4 align-middle text-foreground",
|
|
101
101
|
"[&:has([role=checkbox])]:pr-0",
|
|
102
102
|
className
|
|
103
|
-
)}
|
|
103
|
+
)} data-sonance-name="table"
|
|
104
104
|
{...props}
|
|
105
105
|
/>
|
|
106
106
|
));
|
|
@@ -113,7 +113,7 @@ export const TableCaption = forwardRef<
|
|
|
113
113
|
>(({ className, ...props }, ref) => (
|
|
114
114
|
<caption
|
|
115
115
|
ref={ref}
|
|
116
|
-
className={cn("mt-4 text-sm text-foreground-muted", className)}
|
|
116
|
+
className={cn("mt-4 text-sm text-foreground-muted", className)} data-sonance-name="table"
|
|
117
117
|
{...props}
|
|
118
118
|
/>
|
|
119
119
|
));
|
|
@@ -43,17 +43,17 @@ export const Default: Story = {
|
|
|
43
43
|
<TabsTrigger value="tab3">Settings</TabsTrigger>
|
|
44
44
|
</TabsList>
|
|
45
45
|
<TabsContent value="tab1">
|
|
46
|
-
<p className="text-foreground-secondary">
|
|
46
|
+
<p id="default-p-manage-your-account-" className="text-foreground-secondary">
|
|
47
47
|
Manage your account settings and preferences here.
|
|
48
48
|
</p>
|
|
49
49
|
</TabsContent>
|
|
50
50
|
<TabsContent value="tab2">
|
|
51
|
-
<p className="text-foreground-secondary">
|
|
51
|
+
<p id="default-p-change-your-password" className="text-foreground-secondary">
|
|
52
52
|
Change your password and security settings.
|
|
53
53
|
</p>
|
|
54
54
|
</TabsContent>
|
|
55
55
|
<TabsContent value="tab3">
|
|
56
|
-
<p className="text-foreground-secondary">
|
|
56
|
+
<p id="default-p-configure-applicatio" className="text-foreground-secondary">
|
|
57
57
|
Configure application settings and preferences.
|
|
58
58
|
</p>
|
|
59
59
|
</TabsContent>
|
|
@@ -73,8 +73,8 @@ export const WithCards: Story = {
|
|
|
73
73
|
<TabsContent value="overview">
|
|
74
74
|
<Card>
|
|
75
75
|
<CardContent className="pt-6">
|
|
76
|
-
<h4 className="text-lg font-medium text-foreground mb-2">Overview</h4>
|
|
77
|
-
<p className="text-foreground-secondary">
|
|
76
|
+
<h4 id="with-cards-h4-overview" className="text-lg font-medium text-foreground mb-2">Overview</h4>
|
|
77
|
+
<p id="with-cards-p-get-a-highlevel-view" className="text-foreground-secondary">
|
|
78
78
|
Get a high-level view of your account activity and recent changes.
|
|
79
79
|
</p>
|
|
80
80
|
</CardContent>
|
|
@@ -83,8 +83,8 @@ export const WithCards: Story = {
|
|
|
83
83
|
<TabsContent value="analytics">
|
|
84
84
|
<Card>
|
|
85
85
|
<CardContent className="pt-6">
|
|
86
|
-
<h4 className="text-lg font-medium text-foreground mb-2">Analytics</h4>
|
|
87
|
-
<p className="text-foreground-secondary">
|
|
86
|
+
<h4 id="with-cards-h4-analytics" className="text-lg font-medium text-foreground mb-2">Analytics</h4>
|
|
87
|
+
<p id="with-cards-p-view-detailed-analyt" className="text-foreground-secondary">
|
|
88
88
|
View detailed analytics and performance metrics.
|
|
89
89
|
</p>
|
|
90
90
|
</CardContent>
|
|
@@ -93,8 +93,8 @@ export const WithCards: Story = {
|
|
|
93
93
|
<TabsContent value="reports">
|
|
94
94
|
<Card>
|
|
95
95
|
<CardContent className="pt-6">
|
|
96
|
-
<h4 className="text-lg font-medium text-foreground mb-2">Reports</h4>
|
|
97
|
-
<p className="text-foreground-secondary">
|
|
96
|
+
<h4 id="with-cards-h4-reports" className="text-lg font-medium text-foreground mb-2">Reports</h4>
|
|
97
|
+
<p id="with-cards-p-generate-and-downloa" className="text-foreground-secondary">
|
|
98
98
|
Generate and download reports for your data.
|
|
99
99
|
</p>
|
|
100
100
|
</CardContent>
|
|
@@ -116,13 +116,13 @@ export const WithDisabledTab: Story = {
|
|
|
116
116
|
<TabsTrigger value="tab3">Active</TabsTrigger>
|
|
117
117
|
</TabsList>
|
|
118
118
|
<TabsContent value="tab1">
|
|
119
|
-
<p className="text-foreground-secondary">This feature is available now.</p>
|
|
119
|
+
<p id="with-disabled-tab-p-this-feature-is-avai" className="text-foreground-secondary">This feature is available now.</p>
|
|
120
120
|
</TabsContent>
|
|
121
121
|
<TabsContent value="tab2">
|
|
122
|
-
<p className="text-foreground-secondary">This content is coming soon.</p>
|
|
122
|
+
<p id="with-disabled-tab-p-this-content-is-comi" className="text-foreground-secondary">This content is coming soon.</p>
|
|
123
123
|
</TabsContent>
|
|
124
124
|
<TabsContent value="tab3">
|
|
125
|
-
<p className="text-foreground-secondary">This feature is active.</p>
|
|
125
|
+
<p id="with-disabled-tab-p-this-feature-is-acti" className="text-foreground-secondary">This feature is active.</p>
|
|
126
126
|
</TabsContent>
|
|
127
127
|
</Tabs>
|
|
128
128
|
),
|
|
@@ -140,19 +140,19 @@ export const ManyTabs: Story = {
|
|
|
140
140
|
<TabsTrigger value="contact">Contact</TabsTrigger>
|
|
141
141
|
</TabsList>
|
|
142
142
|
<TabsContent value="home">
|
|
143
|
-
<p className="text-foreground-secondary">Welcome to our home page.</p>
|
|
143
|
+
<p id="many-tabs-p-welcome-to-our-home-" className="text-foreground-secondary">Welcome to our home page.</p>
|
|
144
144
|
</TabsContent>
|
|
145
145
|
<TabsContent value="products">
|
|
146
|
-
<p className="text-foreground-secondary">Browse our product catalog.</p>
|
|
146
|
+
<p id="many-tabs-p-browse-our-product-c" className="text-foreground-secondary">Browse our product catalog.</p>
|
|
147
147
|
</TabsContent>
|
|
148
148
|
<TabsContent value="services">
|
|
149
|
-
<p className="text-foreground-secondary">Explore our services.</p>
|
|
149
|
+
<p id="many-tabs-p-explore-our-services" className="text-foreground-secondary">Explore our services.</p>
|
|
150
150
|
</TabsContent>
|
|
151
151
|
<TabsContent value="about">
|
|
152
|
-
<p className="text-foreground-secondary">Learn more about us.</p>
|
|
152
|
+
<p id="many-tabs-p-learn-more-about-us" className="text-foreground-secondary">Learn more about us.</p>
|
|
153
153
|
</TabsContent>
|
|
154
154
|
<TabsContent value="contact">
|
|
155
|
-
<p className="text-foreground-secondary">Get in touch with us.</p>
|
|
155
|
+
<p id="many-tabs-p-get-in-touch-with-us" className="text-foreground-secondary">Get in touch with us.</p>
|
|
156
156
|
</TabsContent>
|
|
157
157
|
</Tabs>
|
|
158
158
|
),
|
|
@@ -170,19 +170,19 @@ export const SettingsPanel: Story = {
|
|
|
170
170
|
<TabsContent value="profile">
|
|
171
171
|
<div className="space-y-4">
|
|
172
172
|
<div>
|
|
173
|
-
<h4 className="font-medium text-foreground">Profile Information</h4>
|
|
174
|
-
<p className="text-sm text-foreground-secondary mt-1">
|
|
173
|
+
<h4 id="settings-panel-h4-profile-information" className="font-medium text-foreground">Profile Information</h4>
|
|
174
|
+
<p id="settings-panel-p-update-your-personal" className="text-sm text-foreground-secondary mt-1">
|
|
175
175
|
Update your personal information and profile picture.
|
|
176
176
|
</p>
|
|
177
177
|
</div>
|
|
178
178
|
<div className="grid grid-cols-2 gap-4 pt-4 border-t border-divider">
|
|
179
179
|
<div>
|
|
180
|
-
<span className="text-xs text-foreground-muted">Name</span>
|
|
181
|
-
<p className="text-foreground">John Doe</p>
|
|
180
|
+
<span id="settings-panel-span-name" className="text-xs text-foreground-muted">Name</span>
|
|
181
|
+
<p id="settings-panel-p-john-doe" className="text-foreground">John Doe</p>
|
|
182
182
|
</div>
|
|
183
183
|
<div>
|
|
184
|
-
<span className="text-xs text-foreground-muted">Email</span>
|
|
185
|
-
<p className="text-foreground">john@example.com</p>
|
|
184
|
+
<span id="settings-panel-span-email" className="text-xs text-foreground-muted">Email</span>
|
|
185
|
+
<p id="settings-panel-p-johnexamplecom" className="text-foreground">john@example.com</p>
|
|
186
186
|
</div>
|
|
187
187
|
</div>
|
|
188
188
|
</div>
|
|
@@ -190,8 +190,8 @@ export const SettingsPanel: Story = {
|
|
|
190
190
|
<TabsContent value="notifications">
|
|
191
191
|
<div className="space-y-4">
|
|
192
192
|
<div>
|
|
193
|
-
<h4 className="font-medium text-foreground">Notification Preferences</h4>
|
|
194
|
-
<p className="text-sm text-foreground-secondary mt-1">
|
|
193
|
+
<h4 id="settings-panel-h4-notification-prefere" className="font-medium text-foreground">Notification Preferences</h4>
|
|
194
|
+
<p id="settings-panel-p-choose-how-you-want-" className="text-sm text-foreground-secondary mt-1">
|
|
195
195
|
Choose how you want to be notified about updates.
|
|
196
196
|
</p>
|
|
197
197
|
</div>
|
|
@@ -200,8 +200,8 @@ export const SettingsPanel: Story = {
|
|
|
200
200
|
<TabsContent value="security">
|
|
201
201
|
<div className="space-y-4">
|
|
202
202
|
<div>
|
|
203
|
-
<h4 className="font-medium text-foreground">Security Settings</h4>
|
|
204
|
-
<p className="text-sm text-foreground-secondary mt-1">
|
|
203
|
+
<h4 id="settings-panel-h4-security-settings" className="font-medium text-foreground">Security Settings</h4>
|
|
204
|
+
<p id="settings-panel-p-manage-your-password" className="text-sm text-foreground-secondary mt-1">
|
|
205
205
|
Manage your password and two-factor authentication.
|
|
206
206
|
</p>
|
|
207
207
|
</div>
|
|
@@ -216,12 +216,12 @@ export const StateMatrix: Story = {
|
|
|
216
216
|
render: () => {
|
|
217
217
|
const states: TabsTriggerState[] = ['default', 'hover', 'focus', 'active', 'disabled'];
|
|
218
218
|
return (
|
|
219
|
-
<div className="space-y-6">
|
|
220
|
-
<h3 className="text-sm font-medium text-foreground-muted">TabsTrigger States</h3>
|
|
219
|
+
<div data-sonance-name="tabs.stories" className="space-y-6">
|
|
220
|
+
<h3 id="state-matrix-h3-tabstrigger-states" className="text-sm font-medium text-foreground-muted">TabsTrigger States</h3>
|
|
221
221
|
<div className="flex flex-wrap gap-4">
|
|
222
222
|
{states.map((state) => (
|
|
223
223
|
<div key={state} className="flex flex-col items-center gap-2">
|
|
224
|
-
<span className="text-xs font-medium text-foreground-muted uppercase">{state}</span>
|
|
224
|
+
<span id="state-matrix-span-state" className="text-xs font-medium text-foreground-muted uppercase">{state}</span>
|
|
225
225
|
<Tabs defaultValue="demo">
|
|
226
226
|
<TabsList>
|
|
227
227
|
<TabsTrigger value="demo" state={state}>
|
|
@@ -243,7 +243,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
243
243
|
<div className="space-y-8">
|
|
244
244
|
{/* Mobile */}
|
|
245
245
|
<div>
|
|
246
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
246
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
247
247
|
<div className="w-[375px] border border-dashed border-border p-4">
|
|
248
248
|
<Tabs defaultValue="tab1" className="w-full">
|
|
249
249
|
<TabsList className="w-full">
|
|
@@ -251,17 +251,17 @@ export const ResponsiveMatrix: Story = {
|
|
|
251
251
|
<TabsTrigger value="tab2" className="flex-1">Tab 2</TabsTrigger>
|
|
252
252
|
</TabsList>
|
|
253
253
|
<TabsContent value="tab1">
|
|
254
|
-
<p className="text-foreground-secondary text-sm">Mobile tab content.</p>
|
|
254
|
+
<p id="responsive-matrix-p-mobile-tab-content" className="text-foreground-secondary text-sm">Mobile tab content.</p>
|
|
255
255
|
</TabsContent>
|
|
256
256
|
<TabsContent value="tab2">
|
|
257
|
-
<p className="text-foreground-secondary text-sm">Second tab content.</p>
|
|
257
|
+
<p id="responsive-matrix-p-second-tab-content" className="text-foreground-secondary text-sm">Second tab content.</p>
|
|
258
258
|
</TabsContent>
|
|
259
259
|
</Tabs>
|
|
260
260
|
</div>
|
|
261
261
|
</div>
|
|
262
262
|
{/* Tablet */}
|
|
263
263
|
<div>
|
|
264
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
264
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
265
265
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
266
266
|
<Tabs defaultValue="overview" className="w-full">
|
|
267
267
|
<TabsList>
|
|
@@ -272,7 +272,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
272
272
|
<TabsContent value="overview">
|
|
273
273
|
<Card>
|
|
274
274
|
<CardContent className="pt-6">
|
|
275
|
-
<p className="text-foreground-secondary">Overview content for tablet view.</p>
|
|
275
|
+
<p id="responsive-matrix-p-overview-content-for" className="text-foreground-secondary">Overview content for tablet view.</p>
|
|
276
276
|
</CardContent>
|
|
277
277
|
</Card>
|
|
278
278
|
</TabsContent>
|
|
@@ -281,7 +281,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
281
281
|
</div>
|
|
282
282
|
{/* Desktop */}
|
|
283
283
|
<div>
|
|
284
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
284
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
285
285
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
286
286
|
<Tabs defaultValue="home" className="w-full">
|
|
287
287
|
<TabsList>
|
|
@@ -294,7 +294,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
294
294
|
<TabsContent value="home">
|
|
295
295
|
<Card>
|
|
296
296
|
<CardContent className="pt-6">
|
|
297
|
-
<p className="text-foreground-secondary">Full-width desktop tab content with multiple tabs available.</p>
|
|
297
|
+
<p id="responsive-matrix-p-fullwidth-desktop-ta" className="text-foreground-secondary">Full-width desktop tab content with multiple tabs available.</p>
|
|
298
298
|
</CardContent>
|
|
299
299
|
</Card>
|
|
300
300
|
</TabsContent>
|
|
@@ -63,7 +63,7 @@ interface TabsListProps {
|
|
|
63
63
|
|
|
64
64
|
export function TabsList({ className, children }: TabsListProps) {
|
|
65
65
|
return (
|
|
66
|
-
<div
|
|
66
|
+
<div data-sonance-name="tabs"
|
|
67
67
|
role="tablist"
|
|
68
68
|
className={cn(
|
|
69
69
|
"inline-flex items-center gap-1 border-b border-border",
|
|
@@ -98,7 +98,7 @@ export function TabsTrigger({
|
|
|
98
98
|
const isDisabled = disabled || state === "disabled";
|
|
99
99
|
|
|
100
100
|
return (
|
|
101
|
-
<button
|
|
101
|
+
<button data-sonance-name="tabs"
|
|
102
102
|
role="tab"
|
|
103
103
|
type="button"
|
|
104
104
|
aria-selected={isActive}
|
|
@@ -117,7 +117,7 @@ export function TabsTrigger({
|
|
|
117
117
|
>
|
|
118
118
|
{children}
|
|
119
119
|
{isActive && (
|
|
120
|
-
<span className="absolute bottom-0 left-0 right-0 h-0.5 bg-primary" />
|
|
120
|
+
<span id="tabs-trigger-span" className="absolute bottom-0 left-0 right-0 h-0.5 bg-primary" />
|
|
121
121
|
)}
|
|
122
122
|
</button>
|
|
123
123
|
);
|