sonance-brand-mcp 1.2.5 → 1.3.2
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 +142 -0
- package/dist/assets/components/alert-dialog.tsx +143 -0
- 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 +70 -0
- package/dist/assets/components/aspect-ratio.tsx +8 -0
- 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 +67 -23
- 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 +158 -0
- package/dist/assets/components/carousel.tsx +264 -0
- package/dist/assets/components/chart.stories.tsx +376 -0
- package/dist/assets/components/chart.tsx +384 -0
- 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 -6
- package/dist/assets/components/code.stories.tsx +24 -24
- package/dist/assets/components/code.tsx +22 -27
- package/dist/assets/components/collapsible.stories.tsx +128 -0
- package/dist/assets/components/collapsible.tsx +10 -0
- package/dist/assets/components/command.stories.tsx +183 -0
- package/dist/assets/components/command.tsx +171 -0
- package/dist/assets/components/context-menu.stories.tsx +159 -0
- package/dist/assets/components/context-menu.tsx +214 -0
- 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 +34 -35
- package/dist/assets/components/drawer.stories.tsx +32 -31
- package/dist/assets/components/drawer.tsx +7 -6
- package/dist/assets/components/dropdown-menu.tsx +213 -0
- 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 +115 -0
- package/dist/assets/components/hover-card.tsx +35 -0
- 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 +9 -9
- 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.stories.tsx +208 -0
- package/dist/assets/components/menubar.tsx +247 -0
- 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 +239 -0
- package/dist/assets/components/navigation-menu.tsx +135 -0
- 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 +197 -0
- package/dist/assets/components/resizable.tsx +47 -0
- package/dist/assets/components/scroll-area.stories.tsx +123 -0
- package/dist/assets/components/scroll-area.tsx +48 -0
- package/dist/assets/components/scroll-shadow.stories.tsx +17 -17
- package/dist/assets/components/scroll-shadow.tsx +31 -9
- package/dist/assets/components/select.stories.tsx +20 -19
- package/dist/assets/components/select.tsx +10 -6
- package/dist/assets/components/separator.tsx +32 -0
- package/dist/assets/components/sheet.tsx +137 -0
- package/dist/assets/components/sidebar.stories.tsx +351 -0
- package/dist/assets/components/sidebar.tsx +757 -0
- 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.stories.tsx +153 -0
- package/dist/assets/components/toggle-group.tsx +61 -0
- package/dist/assets/components/toggle.stories.tsx +77 -0
- package/dist/assets/components/toggle.tsx +46 -0
- package/dist/assets/components/tooltip.stories.tsx +49 -27
- package/dist/assets/components/tooltip.tsx +23 -90
- 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 +39 -0
- package/dist/assets/logos/40th-anniversary/Sonance_40_Logo_CMYK_BEAM_BLUE_40_AND_BEAM_DARK.png +0 -0
- package/dist/assets/logos/Sonance logo dark mode.png +0 -0
- package/dist/assets/logos/Sonance logo light mode.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_2C_Light_RGB_05162025.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_3C_Dark_RGB_05162025.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_White_RGB_05162025.png +0 -0
- package/dist/assets/logos/iport/IPORT_Sonance_LockUp_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/iport/IPORT_Sonance_LockUp_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Black_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_LtGray_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_LtGray_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Polished_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Reverse_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_White_CMYK.png +0 -0
- package/dist/assets/logos/life-is-better/Sonance_LifeisBetter_Dark_RGB.png +0 -0
- package/dist/assets/logos/life-is-better/Sonance_LifeisBetter_Light_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Grayscale_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-academy/SonanceAcademy_Logo_Dark_CMYK.png +0 -0
- package/dist/assets/logos/sonance-academy/SonanceAcademy_Logo_Light_CMYK.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Dark_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Light_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Black_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Grayscale_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-james/Sonance_James_Lockup_Dark.png +0 -0
- package/dist/assets/logos/sonance-james/Sonance_James_Lockup_Light.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_LockupStacked_Dark.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_LockupStacked_Light.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_Lockup_Dark.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_Lockup_Light.png +0 -0
- package/dist/assets/logos/trufig/TrufigLogo_Black.png +0 -0
- package/dist/assets/logos/trufig/TrufigLogo_Light.png +0 -0
- package/dist/assets/logos/trufig/TrufigWatermark_Black.png +0 -0
- package/dist/assets/logos/trufig/TrufigWatermark_Light.png +0 -0
- package/dist/assets/styles/brand-overrides.css +37 -0
- package/dist/index.js +2055 -15
- package/package.json +1 -1
|
@@ -60,7 +60,7 @@ export const Default: Story = {
|
|
|
60
60
|
render: () => {
|
|
61
61
|
const [date, setDate] = useState<Date | undefined>(undefined);
|
|
62
62
|
return (
|
|
63
|
-
<div className="w-72">
|
|
63
|
+
<div data-sonance-name="date-picker.stories" className="w-72">
|
|
64
64
|
<DatePicker
|
|
65
65
|
value={date}
|
|
66
66
|
onValueChange={setDate}
|
|
@@ -134,7 +134,7 @@ export const WithMinMaxDates: Story = {
|
|
|
134
134
|
minDate={addDays(today, 1)}
|
|
135
135
|
maxDate={addDays(today, 30)}
|
|
136
136
|
/>
|
|
137
|
-
<p className="text-xs text-foreground-muted">
|
|
137
|
+
<p id="with-min-max-dates-p-delivery-available-w" className="text-xs text-foreground-muted">
|
|
138
138
|
Delivery available within 1-30 days from today
|
|
139
139
|
</p>
|
|
140
140
|
</div>
|
|
@@ -237,7 +237,7 @@ export const FormExample: Story = {
|
|
|
237
237
|
|
|
238
238
|
return (
|
|
239
239
|
<div className="space-y-4 w-72">
|
|
240
|
-
<h3 className="text-sm font-medium">Book Your Stay</h3>
|
|
240
|
+
<h3 id="form-example-h3-book-your-stay" className="text-sm font-medium">Book Your Stay</h3>
|
|
241
241
|
<DatePicker
|
|
242
242
|
label="Check-in"
|
|
243
243
|
placeholder="Select check-in date"
|
|
@@ -254,7 +254,7 @@ export const FormExample: Story = {
|
|
|
254
254
|
error={checkOutError}
|
|
255
255
|
/>
|
|
256
256
|
{checkIn && checkOut && !checkOutError && (
|
|
257
|
-
<p className="text-sm text-foreground-muted">
|
|
257
|
+
<p id="form-example-p-mathceilcheckoutgett" className="text-sm text-foreground-muted">
|
|
258
258
|
{Math.ceil((checkOut.getTime() - checkIn.getTime()) / (1000 * 60 * 60 * 24))} nights
|
|
259
259
|
</p>
|
|
260
260
|
)}
|
|
@@ -281,11 +281,11 @@ export const StateMatrix: Story = {
|
|
|
281
281
|
const states: DatePickerState[] = ['default', 'hover', 'focus', 'open', 'error', 'disabled'];
|
|
282
282
|
return (
|
|
283
283
|
<div className="space-y-6 w-72">
|
|
284
|
-
<h3 className="text-sm font-medium text-foreground-muted">DatePicker States</h3>
|
|
284
|
+
<h3 id="state-matrix-h3-datepicker-states" className="text-sm font-medium text-foreground-muted">DatePicker States</h3>
|
|
285
285
|
<div className="grid grid-cols-1 gap-4">
|
|
286
286
|
{states.map((state) => (
|
|
287
287
|
<div key={state} className="flex items-center gap-4">
|
|
288
|
-
<span className="text-xs font-medium text-foreground-muted uppercase w-20">{state}</span>
|
|
288
|
+
<span id="state-matrix-span-state" className="text-xs font-medium text-foreground-muted uppercase w-20">{state}</span>
|
|
289
289
|
<DatePicker
|
|
290
290
|
state={state}
|
|
291
291
|
placeholder="Select date"
|
|
@@ -305,14 +305,14 @@ export const ResponsiveMatrix: Story = {
|
|
|
305
305
|
<div className="space-y-8">
|
|
306
306
|
{/* Mobile */}
|
|
307
307
|
<div>
|
|
308
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
308
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
309
309
|
<div className="w-[375px] border border-dashed border-border p-4">
|
|
310
310
|
<DatePicker label="Appointment Date" placeholder="Select date" />
|
|
311
311
|
</div>
|
|
312
312
|
</div>
|
|
313
313
|
{/* Tablet */}
|
|
314
314
|
<div>
|
|
315
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
315
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
316
316
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
317
317
|
<div className="grid grid-cols-2 gap-4">
|
|
318
318
|
<DatePicker label="Check-in" placeholder="Select date" />
|
|
@@ -322,7 +322,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
322
322
|
</div>
|
|
323
323
|
{/* Desktop */}
|
|
324
324
|
<div>
|
|
325
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
325
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
326
326
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
327
327
|
<div className="grid grid-cols-4 gap-4">
|
|
328
328
|
<DatePicker label="Default" placeholder="Select date" />
|
|
@@ -93,7 +93,7 @@ export function DatePicker({
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<div ref={containerRef} className={cn("relative w-full", className)}>
|
|
96
|
+
<div data-sonance-name="date-picker" ref={containerRef} className={cn("relative w-full", className)}>
|
|
97
97
|
{label && (
|
|
98
98
|
<label className="mb-2 block text-xs font-medium uppercase tracking-widest text-foreground-muted">
|
|
99
99
|
{label}
|
|
@@ -113,7 +113,7 @@ export function DatePicker({
|
|
|
113
113
|
getStateStyles(state)
|
|
114
114
|
)}
|
|
115
115
|
>
|
|
116
|
-
<span className={value ? "text-foreground" : "text-input-placeholder"}>
|
|
116
|
+
<span id="span-value-formatvalue-da" className={value ? "text-foreground" : "text-input-placeholder"}>
|
|
117
117
|
{value ? format(value, dateFormat) : placeholder}
|
|
118
118
|
</span>
|
|
119
119
|
<CalendarIcon className="h-4 w-4 text-foreground-muted" />
|
|
@@ -131,7 +131,7 @@ export function DatePicker({
|
|
|
131
131
|
</div>
|
|
132
132
|
)}
|
|
133
133
|
|
|
134
|
-
{error && <p className="mt-1 text-sm text-error">{error}</p>}
|
|
134
|
+
{error && <p id="p-error" className="mt-1 text-sm text-error">{error}</p>}
|
|
135
135
|
</div>
|
|
136
136
|
);
|
|
137
137
|
}
|
|
@@ -57,7 +57,7 @@ export const Default: Story = {
|
|
|
57
57
|
render: () => {
|
|
58
58
|
const [range, setRange] = useState<DateRange>({ start: undefined, end: undefined });
|
|
59
59
|
return (
|
|
60
|
-
<div className="w-80">
|
|
60
|
+
<div data-sonance-name="date-range-picker.stories" className="w-80">
|
|
61
61
|
<DateRangePicker
|
|
62
62
|
value={range}
|
|
63
63
|
onValueChange={setRange}
|
|
@@ -135,7 +135,7 @@ export const WithMinMaxDates: Story = {
|
|
|
135
135
|
minDate={today}
|
|
136
136
|
maxDate={addMonths(today, 3)}
|
|
137
137
|
/>
|
|
138
|
-
<p className="text-xs text-foreground-muted">
|
|
138
|
+
<p id="with-min-max-dates-p-available-dates-toda" className="text-xs text-foreground-muted">
|
|
139
139
|
Available dates: Today through {addMonths(today, 3).toLocaleDateString()}
|
|
140
140
|
</p>
|
|
141
141
|
</div>
|
|
@@ -204,7 +204,7 @@ export const HotelBookingExample: Story = {
|
|
|
204
204
|
|
|
205
205
|
return (
|
|
206
206
|
<div className="w-80 space-y-4 p-6 border border-border rounded-sm">
|
|
207
|
-
<h3 className="font-medium">Reserve Your Room</h3>
|
|
207
|
+
<h3 id="hotel-booking-example-h3-reserve-your-room" className="font-medium">Reserve Your Room</h3>
|
|
208
208
|
<DateRangePicker
|
|
209
209
|
label="Stay Duration"
|
|
210
210
|
placeholder="Select check-in and check-out"
|
|
@@ -216,16 +216,16 @@ export const HotelBookingExample: Story = {
|
|
|
216
216
|
{nights > 0 && (
|
|
217
217
|
<div className="space-y-2 pt-2 border-t border-border">
|
|
218
218
|
<div className="flex justify-between text-sm">
|
|
219
|
-
<span className="text-foreground-muted">Duration</span>
|
|
220
|
-
<span>{nights} night{nights > 1 ? 's' : ''}</span>
|
|
219
|
+
<span id="hotel-booking-example-span-duration" className="text-foreground-muted">Duration</span>
|
|
220
|
+
<span id="hotel-booking-example-span-nights-nightnights-1">{nights} night{nights > 1 ? 's' : ''}</span>
|
|
221
221
|
</div>
|
|
222
222
|
<div className="flex justify-between text-sm">
|
|
223
|
-
<span className="text-foreground-muted">Rate per night</span>
|
|
224
|
-
<span>$299</span>
|
|
223
|
+
<span id="hotel-booking-example-span-rate-per-night" className="text-foreground-muted">Rate per night</span>
|
|
224
|
+
<span id="hotel-booking-example-span-299">$299</span>
|
|
225
225
|
</div>
|
|
226
226
|
<div className="flex justify-between font-medium pt-2 border-t border-border">
|
|
227
|
-
<span>Total</span>
|
|
228
|
-
<span>${(nights * 299).toLocaleString()}</span>
|
|
227
|
+
<span id="hotel-booking-example-span-total">Total</span>
|
|
228
|
+
<span id="hotel-booking-example-span-nights-299tolocalest">${(nights * 299).toLocaleString()}</span>
|
|
229
229
|
</div>
|
|
230
230
|
</div>
|
|
231
231
|
)}
|
|
@@ -301,14 +301,14 @@ export const ResponsiveMatrix: Story = {
|
|
|
301
301
|
<div className="space-y-8">
|
|
302
302
|
{/* Mobile */}
|
|
303
303
|
<div>
|
|
304
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
304
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
305
305
|
<div className="w-[375px] border border-dashed border-border p-4">
|
|
306
306
|
<DateRangePicker label="Travel Dates" placeholder="Select dates" />
|
|
307
307
|
</div>
|
|
308
308
|
</div>
|
|
309
309
|
{/* Tablet */}
|
|
310
310
|
<div>
|
|
311
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
311
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
312
312
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
313
313
|
<div className="grid grid-cols-2 gap-4">
|
|
314
314
|
<DateRangePicker label="Booking Period" placeholder="Select range" />
|
|
@@ -321,7 +321,7 @@ export const ResponsiveMatrix: Story = {
|
|
|
321
321
|
</div>
|
|
322
322
|
{/* Desktop */}
|
|
323
323
|
<div>
|
|
324
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
324
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
325
325
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
326
326
|
<div className="grid grid-cols-3 gap-4">
|
|
327
327
|
<DateRangePicker label="Default" placeholder="Select range" />
|
|
@@ -90,7 +90,7 @@ export function DateRangePicker({
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
return (
|
|
93
|
-
<div ref={containerRef} className={cn("relative w-full", className)}>
|
|
93
|
+
<div data-sonance-name="date-range-picker" ref={containerRef} className={cn("relative w-full", className)}>
|
|
94
94
|
{label && (
|
|
95
95
|
<label className="mb-2 block text-xs font-medium uppercase tracking-widest text-foreground-muted">
|
|
96
96
|
{label}
|
|
@@ -109,7 +109,7 @@ export function DateRangePicker({
|
|
|
109
109
|
isOpen && "border-input-focus"
|
|
110
110
|
)}
|
|
111
111
|
>
|
|
112
|
-
<span className={value.start ? "text-foreground" : "text-input-placeholder"}>
|
|
112
|
+
<span id="span-getdisplayvalue" className={value.start ? "text-foreground" : "text-input-placeholder"}>
|
|
113
113
|
{getDisplayValue()}
|
|
114
114
|
</span>
|
|
115
115
|
<CalendarIcon className="h-4 w-4 text-foreground-muted" />
|
|
@@ -126,7 +126,7 @@ export function DateRangePicker({
|
|
|
126
126
|
</div>
|
|
127
127
|
)}
|
|
128
128
|
|
|
129
|
-
{error && <p className="mt-1 text-sm text-error">{error}</p>}
|
|
129
|
+
{error && <p id="p-error" className="mt-1 text-sm text-error">{error}</p>}
|
|
130
130
|
</div>
|
|
131
131
|
);
|
|
132
132
|
}
|
|
@@ -35,7 +35,7 @@ export const Default: Story = {
|
|
|
35
35
|
const [open, setOpen] = useState(false);
|
|
36
36
|
return (
|
|
37
37
|
<>
|
|
38
|
-
<Button onClick={() => setOpen(true)}>Open Dialog</Button>
|
|
38
|
+
<Button id="default-button" onClick={() => setOpen(true)}>Open Dialog</Button>
|
|
39
39
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
40
40
|
<DialogContent>
|
|
41
41
|
<DialogHeader>
|
|
@@ -45,15 +45,15 @@ export const Default: Story = {
|
|
|
45
45
|
</DialogDescription>
|
|
46
46
|
</DialogHeader>
|
|
47
47
|
<DialogBody>
|
|
48
|
-
<p className="text-foreground-secondary">
|
|
48
|
+
<p id="default-p-dialog-body-content-" className="text-foreground-secondary">
|
|
49
49
|
Dialog body content goes here. You can add any content you need.
|
|
50
50
|
</p>
|
|
51
51
|
</DialogBody>
|
|
52
52
|
<DialogFooter>
|
|
53
|
-
<Button variant="secondary" onClick={() => setOpen(false)}>
|
|
53
|
+
<Button id="default-button-secondary" variant="secondary" onClick={() => setOpen(false)}>
|
|
54
54
|
Cancel
|
|
55
55
|
</Button>
|
|
56
|
-
<Button onClick={() => setOpen(false)}>Confirm</Button>
|
|
56
|
+
<Button id="default-button" onClick={() => setOpen(false)}>Confirm</Button>
|
|
57
57
|
</DialogFooter>
|
|
58
58
|
</DialogContent>
|
|
59
59
|
</Dialog>
|
|
@@ -68,7 +68,7 @@ export const Confirmation: Story = {
|
|
|
68
68
|
const [open, setOpen] = useState(false);
|
|
69
69
|
return (
|
|
70
70
|
<>
|
|
71
|
-
<Button variant="secondary" onClick={() => setOpen(true)}>
|
|
71
|
+
<Button id="confirmation-button-secondary" variant="secondary" onClick={() => setOpen(true)}>
|
|
72
72
|
Delete Item
|
|
73
73
|
</Button>
|
|
74
74
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
@@ -81,10 +81,10 @@ export const Confirmation: Story = {
|
|
|
81
81
|
</DialogDescription>
|
|
82
82
|
</DialogHeader>
|
|
83
83
|
<DialogFooter>
|
|
84
|
-
<Button variant="secondary" onClick={() => setOpen(false)}>
|
|
84
|
+
<Button id="confirmation-button-secondary" variant="secondary" onClick={() => setOpen(false)}>
|
|
85
85
|
Cancel
|
|
86
86
|
</Button>
|
|
87
|
-
<Button onClick={() => setOpen(false)}>Delete</Button>
|
|
87
|
+
<Button id="confirmation-button" onClick={() => setOpen(false)}>Delete</Button>
|
|
88
88
|
</DialogFooter>
|
|
89
89
|
</DialogContent>
|
|
90
90
|
</Dialog>
|
|
@@ -99,7 +99,7 @@ export const FormDialog: Story = {
|
|
|
99
99
|
const [open, setOpen] = useState(false);
|
|
100
100
|
return (
|
|
101
101
|
<>
|
|
102
|
-
<Button onClick={() => setOpen(true)}>Add New Item</Button>
|
|
102
|
+
<Button id="form-dialog-button" onClick={() => setOpen(true)}>Add New Item</Button>
|
|
103
103
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
104
104
|
<DialogContent>
|
|
105
105
|
<DialogHeader>
|
|
@@ -110,16 +110,16 @@ export const FormDialog: Story = {
|
|
|
110
110
|
</DialogHeader>
|
|
111
111
|
<DialogBody>
|
|
112
112
|
<form className="space-y-4">
|
|
113
|
-
<Input label="Item Name" placeholder="Enter item name" />
|
|
114
|
-
<Input label="SKU" placeholder="Enter SKU" />
|
|
115
|
-
<Input label="Price" type="number" placeholder="0.00" />
|
|
113
|
+
<Input id="form-dialog-input-enter-item-name" label="Item Name" placeholder="Enter item name" />
|
|
114
|
+
<Input id="form-dialog-input-enter-sku" label="SKU" placeholder="Enter SKU" />
|
|
115
|
+
<Input id="form-dialog-input-000" label="Price" type="number" placeholder="0.00" />
|
|
116
116
|
</form>
|
|
117
117
|
</DialogBody>
|
|
118
118
|
<DialogFooter>
|
|
119
|
-
<Button variant="secondary" onClick={() => setOpen(false)}>
|
|
119
|
+
<Button id="form-dialog-button-secondary" variant="secondary" onClick={() => setOpen(false)}>
|
|
120
120
|
Cancel
|
|
121
121
|
</Button>
|
|
122
|
-
<Button onClick={() => setOpen(false)}>Add Item</Button>
|
|
122
|
+
<Button id="form-dialog-button" onClick={() => setOpen(false)}>Add Item</Button>
|
|
123
123
|
</DialogFooter>
|
|
124
124
|
</DialogContent>
|
|
125
125
|
</Dialog>
|
|
@@ -134,7 +134,7 @@ export const WithoutCloseButton: Story = {
|
|
|
134
134
|
const [open, setOpen] = useState(false);
|
|
135
135
|
return (
|
|
136
136
|
<>
|
|
137
|
-
<Button onClick={() => setOpen(true)}>Open Dialog</Button>
|
|
137
|
+
<Button id="without-close-button-button" onClick={() => setOpen(true)}>Open Dialog</Button>
|
|
138
138
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
139
139
|
<DialogContent showClose={false}>
|
|
140
140
|
<DialogHeader>
|
|
@@ -144,12 +144,12 @@ export const WithoutCloseButton: Story = {
|
|
|
144
144
|
</DialogDescription>
|
|
145
145
|
</DialogHeader>
|
|
146
146
|
<DialogBody>
|
|
147
|
-
<p className="text-foreground-secondary">
|
|
147
|
+
<p id="without-close-button-p-this-dialog-has-no-c" className="text-foreground-secondary">
|
|
148
148
|
This dialog has no close button, requiring user to use the action buttons.
|
|
149
149
|
</p>
|
|
150
150
|
</DialogBody>
|
|
151
151
|
<DialogFooter>
|
|
152
|
-
<Button onClick={() => setOpen(false)}>Complete</Button>
|
|
152
|
+
<Button id="without-close-button-button" onClick={() => setOpen(false)}>Complete</Button>
|
|
153
153
|
</DialogFooter>
|
|
154
154
|
</DialogContent>
|
|
155
155
|
</Dialog>
|
|
@@ -164,7 +164,7 @@ export const LongContent: Story = {
|
|
|
164
164
|
const [open, setOpen] = useState(false);
|
|
165
165
|
return (
|
|
166
166
|
<>
|
|
167
|
-
<Button onClick={() => setOpen(true)}>Terms & Conditions</Button>
|
|
167
|
+
<Button id="long-content-button" onClick={() => setOpen(true)}>Terms & Conditions</Button>
|
|
168
168
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
169
169
|
<DialogContent className="max-w-2xl">
|
|
170
170
|
<DialogHeader>
|
|
@@ -173,7 +173,7 @@ export const LongContent: Story = {
|
|
|
173
173
|
<DialogBody className="max-h-[60vh] overflow-y-auto">
|
|
174
174
|
<div className="space-y-4 text-foreground-secondary text-sm">
|
|
175
175
|
{Array.from({ length: 10 }, (_, i) => (
|
|
176
|
-
<p key={i}>
|
|
176
|
+
<p id="long-content-p-lorem-ipsum-dolor-si" key={i}>
|
|
177
177
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do
|
|
178
178
|
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
|
|
179
179
|
enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
@@ -185,10 +185,10 @@ export const LongContent: Story = {
|
|
|
185
185
|
</div>
|
|
186
186
|
</DialogBody>
|
|
187
187
|
<DialogFooter>
|
|
188
|
-
<Button variant="secondary" onClick={() => setOpen(false)}>
|
|
188
|
+
<Button id="long-content-button-secondary" variant="secondary" onClick={() => setOpen(false)}>
|
|
189
189
|
Decline
|
|
190
190
|
</Button>
|
|
191
|
-
<Button onClick={() => setOpen(false)}>Accept</Button>
|
|
191
|
+
<Button id="long-content-button" onClick={() => setOpen(false)}>Accept</Button>
|
|
192
192
|
</DialogFooter>
|
|
193
193
|
</DialogContent>
|
|
194
194
|
</Dialog>
|
|
@@ -203,19 +203,19 @@ export const AlertDialog: Story = {
|
|
|
203
203
|
const [open, setOpen] = useState(false);
|
|
204
204
|
return (
|
|
205
205
|
<>
|
|
206
|
-
<Button onClick={() => setOpen(true)}>Show Alert</Button>
|
|
206
|
+
<Button id="alert-dialog-button" onClick={() => setOpen(true)}>Show Alert</Button>
|
|
207
207
|
<Dialog open={open} onClose={() => setOpen(false)}>
|
|
208
208
|
<DialogContent className="max-w-sm">
|
|
209
209
|
<DialogHeader>
|
|
210
210
|
<DialogTitle>Alert</DialogTitle>
|
|
211
211
|
</DialogHeader>
|
|
212
212
|
<DialogBody>
|
|
213
|
-
<p className="text-foreground-secondary">
|
|
213
|
+
<p id="alert-dialog-p-your-session-will-ex" className="text-foreground-secondary">
|
|
214
214
|
Your session will expire in 5 minutes.
|
|
215
215
|
</p>
|
|
216
216
|
</DialogBody>
|
|
217
217
|
<DialogFooter>
|
|
218
|
-
<Button onClick={() => setOpen(false)}>Okay</Button>
|
|
218
|
+
<Button id="alert-dialog-button" onClick={() => setOpen(false)}>Okay</Button>
|
|
219
219
|
</DialogFooter>
|
|
220
220
|
</DialogContent>
|
|
221
221
|
</Dialog>
|
|
@@ -230,52 +230,52 @@ export const ResponsiveMatrix: Story = {
|
|
|
230
230
|
<div className="space-y-8">
|
|
231
231
|
{/* Mobile */}
|
|
232
232
|
<div>
|
|
233
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
233
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
234
234
|
<div className="w-[375px] border border-dashed border-border p-4 bg-black/50">
|
|
235
235
|
<div className="bg-background rounded-lg p-4 shadow-lg">
|
|
236
236
|
<div className="space-y-2">
|
|
237
|
-
<h3 className="text-lg font-semibold">Confirm Action</h3>
|
|
238
|
-
<p className="text-sm text-foreground-secondary">Are you sure you want to proceed?</p>
|
|
237
|
+
<h3 id="responsive-matrix-h3-confirm-action" className="text-lg font-semibold">Confirm Action</h3>
|
|
238
|
+
<p id="responsive-matrix-p-are-you-sure-you-wan" className="text-sm text-foreground-secondary">Are you sure you want to proceed?</p>
|
|
239
239
|
</div>
|
|
240
240
|
<div className="flex flex-col gap-2 mt-4">
|
|
241
|
-
<Button className="w-full">Confirm</Button>
|
|
242
|
-
<Button variant="secondary" className="w-full">Cancel</Button>
|
|
241
|
+
<Button id="responsive-matrix-button" className="w-full">Confirm</Button>
|
|
242
|
+
<Button id="responsive-matrix-button-secondary" variant="secondary" className="w-full">Cancel</Button>
|
|
243
243
|
</div>
|
|
244
244
|
</div>
|
|
245
245
|
</div>
|
|
246
246
|
</div>
|
|
247
247
|
{/* Tablet */}
|
|
248
248
|
<div>
|
|
249
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
249
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
250
250
|
<div className="w-[768px] border border-dashed border-border p-4 bg-black/50 flex items-center justify-center">
|
|
251
251
|
<div className="bg-background rounded-lg p-6 shadow-lg w-[400px]">
|
|
252
252
|
<div className="space-y-2">
|
|
253
|
-
<h3 className="text-lg font-semibold">Add New Item</h3>
|
|
254
|
-
<p className="text-sm text-foreground-secondary">Fill out the form below.</p>
|
|
253
|
+
<h3 id="responsive-matrix-h3-add-new-item" className="text-lg font-semibold">Add New Item</h3>
|
|
254
|
+
<p id="responsive-matrix-p-fill-out-the-form-be" className="text-sm text-foreground-secondary">Fill out the form below.</p>
|
|
255
255
|
</div>
|
|
256
256
|
<div className="space-y-4 mt-4">
|
|
257
|
-
<Input label="Item Name" placeholder="Enter name" />
|
|
258
|
-
<Input label="Price" type="number" placeholder="0.00" />
|
|
257
|
+
<Input id="responsive-matrix-input-enter-name" label="Item Name" placeholder="Enter name" />
|
|
258
|
+
<Input id="responsive-matrix-input-000" label="Price" type="number" placeholder="0.00" />
|
|
259
259
|
</div>
|
|
260
260
|
<div className="flex justify-end gap-2 mt-6">
|
|
261
|
-
<Button variant="secondary">Cancel</Button>
|
|
262
|
-
<Button>Add Item</Button>
|
|
261
|
+
<Button id="responsive-matrix-button-secondary" variant="secondary">Cancel</Button>
|
|
262
|
+
<Button id="responsive-matrix-button">Add Item</Button>
|
|
263
263
|
</div>
|
|
264
264
|
</div>
|
|
265
265
|
</div>
|
|
266
266
|
</div>
|
|
267
267
|
{/* Desktop */}
|
|
268
268
|
<div>
|
|
269
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
269
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
270
270
|
<div className="w-[1280px] border border-dashed border-border p-4 bg-black/50 flex items-center justify-center">
|
|
271
271
|
<div className="bg-background rounded-lg p-6 shadow-lg w-[500px]">
|
|
272
272
|
<div className="space-y-2">
|
|
273
|
-
<h3 className="text-lg font-semibold">Delete Item?</h3>
|
|
274
|
-
<p className="text-sm text-foreground-secondary">This action cannot be undone. This will permanently delete the item from your account.</p>
|
|
273
|
+
<h3 id="responsive-matrix-h3-delete-item" className="text-lg font-semibold">Delete Item?</h3>
|
|
274
|
+
<p id="responsive-matrix-p-this-action-cannot-b" className="text-sm text-foreground-secondary">This action cannot be undone. This will permanently delete the item from your account.</p>
|
|
275
275
|
</div>
|
|
276
276
|
<div className="flex justify-end gap-2 mt-6">
|
|
277
|
-
<Button variant="secondary">Cancel</Button>
|
|
278
|
-
<Button>Delete</Button>
|
|
277
|
+
<Button id="responsive-matrix-button-secondary" variant="secondary">Cancel</Button>
|
|
278
|
+
<Button id="responsive-matrix-button">Delete</Button>
|
|
279
279
|
</div>
|
|
280
280
|
</div>
|
|
281
281
|
</div>
|
|
@@ -67,13 +67,7 @@ export const DialogContent = forwardRef<
|
|
|
67
67
|
const context = useContext(DialogContext);
|
|
68
68
|
|
|
69
69
|
return (
|
|
70
|
-
<div
|
|
71
|
-
ref={ref}
|
|
72
|
-
className={cn(
|
|
73
|
-
"relative w-full max-w-lg mx-4 bg-background-elevated border border-border shadow-xl",
|
|
74
|
-
"max-h-[90vh] overflow-auto",
|
|
75
|
-
className
|
|
76
|
-
)}
|
|
70
|
+
<div data-sonance-name="dialog"
|
|
77
71
|
{...props}
|
|
78
72
|
>
|
|
79
73
|
{showClose && context && (
|
|
@@ -82,7 +76,7 @@ export const DialogContent = forwardRef<
|
|
|
82
76
|
className="absolute right-4 top-4 p-1 text-foreground-muted hover:text-foreground transition-colors"
|
|
83
77
|
>
|
|
84
78
|
<X className="h-5 w-5" />
|
|
85
|
-
<span className="sr-only">Close</span>
|
|
79
|
+
<span id="dialog-content-span-close" className="sr-only">Close</span>
|
|
86
80
|
</button>
|
|
87
81
|
)}
|
|
88
82
|
{children}
|
|
@@ -98,7 +92,7 @@ export const DialogHeader = forwardRef<
|
|
|
98
92
|
>(({ className, ...props }, ref) => (
|
|
99
93
|
<div
|
|
100
94
|
ref={ref}
|
|
101
|
-
className={cn("px-6 py-4 border-b border-border", className)}
|
|
95
|
+
className={cn("px-6 py-4 border-b border-border", className)} data-sonance-name="dialog"
|
|
102
96
|
{...props}
|
|
103
97
|
/>
|
|
104
98
|
));
|
|
@@ -110,6 +104,7 @@ export const DialogTitle = forwardRef<
|
|
|
110
104
|
React.HTMLAttributes<HTMLHeadingElement>
|
|
111
105
|
>(({ className, ...props }, ref) => (
|
|
112
106
|
<h2
|
|
107
|
+
id="dialog-title-h2"
|
|
113
108
|
ref={ref}
|
|
114
109
|
className={cn("text-lg font-medium text-foreground", className)}
|
|
115
110
|
{...props}
|
|
@@ -123,8 +118,9 @@ export const DialogDescription = forwardRef<
|
|
|
123
118
|
React.HTMLAttributes<HTMLParagraphElement>
|
|
124
119
|
>(({ className, ...props }, ref) => (
|
|
125
120
|
<p
|
|
121
|
+
id="dialog-description-p"
|
|
126
122
|
ref={ref}
|
|
127
|
-
className={cn("mt-1 text-sm text-foreground-secondary", className)}
|
|
123
|
+
className={cn("mt-1 text-sm text-foreground-secondary", className)} data-sonance-name="dialog"
|
|
128
124
|
{...props}
|
|
129
125
|
/>
|
|
130
126
|
));
|
|
@@ -135,7 +131,7 @@ export const DialogBody = forwardRef<
|
|
|
135
131
|
HTMLDivElement,
|
|
136
132
|
React.HTMLAttributes<HTMLDivElement>
|
|
137
133
|
>(({ className, ...props }, ref) => (
|
|
138
|
-
<div ref={ref} className={cn("px-6 py-4", className)} {...props} />
|
|
134
|
+
<div ref={ref} className={cn("px-6 py-4", className)} data-sonance-name="dialog" {...props} />
|
|
139
135
|
));
|
|
140
136
|
|
|
141
137
|
DialogBody.displayName = "DialogBody";
|
|
@@ -149,7 +145,7 @@ export const DialogFooter = forwardRef<
|
|
|
149
145
|
className={cn(
|
|
150
146
|
"flex items-center justify-end gap-3 px-6 py-4 border-t border-border",
|
|
151
147
|
className
|
|
152
|
-
)}
|
|
148
|
+
)} data-sonance-name="dialog"
|
|
153
149
|
{...props}
|
|
154
150
|
/>
|
|
155
151
|
));
|
|
@@ -27,9 +27,9 @@ type Story = StoryObj<typeof meta>;
|
|
|
27
27
|
export const Default: Story = {
|
|
28
28
|
render: () => (
|
|
29
29
|
<div className="w-full max-w-md">
|
|
30
|
-
<p className="text-foreground-secondary">Content above the divider</p>
|
|
30
|
+
<p id="default-p-content-above-the-di" className="text-foreground-secondary">Content above the divider</p>
|
|
31
31
|
<Divider className="my-4" />
|
|
32
|
-
<p className="text-foreground-secondary">Content below the divider</p>
|
|
32
|
+
<p id="default-p-content-below-the-di" className="text-foreground-secondary">Content below the divider</p>
|
|
33
33
|
</div>
|
|
34
34
|
),
|
|
35
35
|
};
|
|
@@ -37,9 +37,9 @@ export const Default: Story = {
|
|
|
37
37
|
export const WithLabel: Story = {
|
|
38
38
|
render: () => (
|
|
39
39
|
<div className="w-full max-w-md">
|
|
40
|
-
<p className="text-foreground-secondary">Content above</p>
|
|
40
|
+
<p id="with-label-p-content-above" className="text-foreground-secondary">Content above</p>
|
|
41
41
|
<Divider label="OR" className="my-4" />
|
|
42
|
-
<p className="text-foreground-secondary">Content below</p>
|
|
42
|
+
<p id="with-label-p-content-below" className="text-foreground-secondary">Content below</p>
|
|
43
43
|
</div>
|
|
44
44
|
),
|
|
45
45
|
};
|
|
@@ -47,11 +47,11 @@ export const WithLabel: Story = {
|
|
|
47
47
|
export const Vertical: Story = {
|
|
48
48
|
render: () => (
|
|
49
49
|
<div className="flex items-center gap-4 h-12">
|
|
50
|
-
<span className="text-foreground-secondary">Item 1</span>
|
|
50
|
+
<span id="vertical-span-item-1" className="text-foreground-secondary">Item 1</span>
|
|
51
51
|
<Divider orientation="vertical" />
|
|
52
|
-
<span className="text-foreground-secondary">Item 2</span>
|
|
52
|
+
<span id="vertical-span-item-2" className="text-foreground-secondary">Item 2</span>
|
|
53
53
|
<Divider orientation="vertical" />
|
|
54
|
-
<span className="text-foreground-secondary">Item 3</span>
|
|
54
|
+
<span id="vertical-span-item-3" className="text-foreground-secondary">Item 3</span>
|
|
55
55
|
</div>
|
|
56
56
|
),
|
|
57
57
|
};
|
|
@@ -59,10 +59,10 @@ export const Vertical: Story = {
|
|
|
59
59
|
export const InCard: Story = {
|
|
60
60
|
render: () => (
|
|
61
61
|
<div className="w-80 border border-border p-4">
|
|
62
|
-
<h3 className="font-medium text-foreground">Card Title</h3>
|
|
63
|
-
<p className="text-sm text-foreground-muted mt-1">Card subtitle or description</p>
|
|
62
|
+
<h3 id="in-card-h3-card-title" className="font-medium text-foreground">Card Title</h3>
|
|
63
|
+
<p id="in-card-p-card-subtitle-or-des" className="text-sm text-foreground-muted mt-1">Card subtitle or description</p>
|
|
64
64
|
<Divider className="my-4" />
|
|
65
|
-
<p className="text-sm text-foreground-secondary">
|
|
65
|
+
<p id="in-card-p-this-is-the-main-con" className="text-sm text-foreground-secondary">
|
|
66
66
|
This is the main content area of the card. The divider separates the header from the content.
|
|
67
67
|
</p>
|
|
68
68
|
<Divider className="my-4" />
|
|
@@ -99,12 +99,12 @@ export const LoginForm: Story = {
|
|
|
99
99
|
export const NavigationBar: Story = {
|
|
100
100
|
render: () => (
|
|
101
101
|
<nav className="flex items-center gap-4 p-4 border border-border">
|
|
102
|
-
<a href="#" className="text-sm text-foreground hover:text-foreground-secondary">Home</a>
|
|
103
|
-
<a href="#" className="text-sm text-foreground hover:text-foreground-secondary">Products</a>
|
|
104
|
-
<a href="#" className="text-sm text-foreground hover:text-foreground-secondary">About</a>
|
|
102
|
+
<a id="nav-a" href="#" className="text-sm text-foreground hover:text-foreground-secondary">Home</a>
|
|
103
|
+
<a id="nav-a" href="#" className="text-sm text-foreground hover:text-foreground-secondary">Products</a>
|
|
104
|
+
<a id="nav-a" href="#" className="text-sm text-foreground hover:text-foreground-secondary">About</a>
|
|
105
105
|
<Divider orientation="vertical" className="h-4" />
|
|
106
|
-
<a href="#" className="text-sm text-foreground hover:text-foreground-secondary">Support</a>
|
|
107
|
-
<a href="#" className="text-sm text-foreground hover:text-foreground-secondary">Contact</a>
|
|
106
|
+
<a id="nav-a" href="#" className="text-sm text-foreground hover:text-foreground-secondary">Support</a>
|
|
107
|
+
<a id="navigation-bar-a" href="#" className="text-sm text-foreground hover:text-foreground-secondary">Contact</a>
|
|
108
108
|
</nav>
|
|
109
109
|
),
|
|
110
110
|
};
|
|
@@ -113,23 +113,23 @@ export const AllExamples: Story = {
|
|
|
113
113
|
render: () => (
|
|
114
114
|
<div className="space-y-8 w-full max-w-md">
|
|
115
115
|
<div>
|
|
116
|
-
<p className="text-xs text-foreground-muted mb-2">Horizontal</p>
|
|
116
|
+
<p id="all-examples-p-horizontal" className="text-xs text-foreground-muted mb-2">Horizontal</p>
|
|
117
117
|
<Divider />
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
120
|
<div>
|
|
121
|
-
<p className="text-xs text-foreground-muted mb-2">With Label</p>
|
|
121
|
+
<p id="all-examples-p-with-label" className="text-xs text-foreground-muted mb-2">With Label</p>
|
|
122
122
|
<Divider label="Section" />
|
|
123
123
|
</div>
|
|
124
124
|
|
|
125
125
|
<div>
|
|
126
|
-
<p className="text-xs text-foreground-muted mb-2">Vertical (in flex container)</p>
|
|
126
|
+
<p id="all-examples-p-vertical-in-flex-con" className="text-xs text-foreground-muted mb-2">Vertical (in flex container)</p>
|
|
127
127
|
<div className="flex items-center gap-4 h-8">
|
|
128
|
-
<span>Left</span>
|
|
128
|
+
<span id="all-examples-span-left">Left</span>
|
|
129
129
|
<Divider orientation="vertical" />
|
|
130
|
-
<span>Center</span>
|
|
130
|
+
<span id="all-examples-span-center">Center</span>
|
|
131
131
|
<Divider orientation="vertical" />
|
|
132
|
-
<span>Right</span>
|
|
132
|
+
<span id="all-examples-span-right">Right</span>
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
@@ -142,32 +142,32 @@ export const ResponsiveMatrix: Story = {
|
|
|
142
142
|
<div className="space-y-8">
|
|
143
143
|
{/* Mobile */}
|
|
144
144
|
<div>
|
|
145
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
145
|
+
<h4 id="responsive-matrix-h4-mobile-375px" className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
146
146
|
<div className="w-[375px] border border-dashed border-border p-4">
|
|
147
|
-
<p className="text-foreground-secondary text-sm">Content above</p>
|
|
147
|
+
<p id="responsive-matrix-p-content-above" className="text-foreground-secondary text-sm">Content above</p>
|
|
148
148
|
<Divider className="my-4" />
|
|
149
|
-
<p className="text-foreground-secondary text-sm">Content below</p>
|
|
149
|
+
<p id="responsive-matrix-p-content-below" className="text-foreground-secondary text-sm">Content below</p>
|
|
150
150
|
</div>
|
|
151
151
|
</div>
|
|
152
152
|
{/* Tablet */}
|
|
153
153
|
<div>
|
|
154
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
154
|
+
<h4 id="responsive-matrix-h4-tablet-768px" className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
155
155
|
<div className="w-[768px] border border-dashed border-border p-4">
|
|
156
156
|
<Divider label="OR" />
|
|
157
157
|
</div>
|
|
158
158
|
</div>
|
|
159
159
|
{/* Desktop */}
|
|
160
160
|
<div>
|
|
161
|
-
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
161
|
+
<h4 id="responsive-matrix-h4-desktop-1280px" className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
162
162
|
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
163
163
|
<div className="flex items-center gap-4 h-8">
|
|
164
|
-
<span className="text-foreground-secondary">Section 1</span>
|
|
164
|
+
<span id="responsive-matrix-span-section-1" className="text-foreground-secondary">Section 1</span>
|
|
165
165
|
<Divider orientation="vertical" />
|
|
166
|
-
<span className="text-foreground-secondary">Section 2</span>
|
|
166
|
+
<span id="responsive-matrix-span-section-2" className="text-foreground-secondary">Section 2</span>
|
|
167
167
|
<Divider orientation="vertical" />
|
|
168
|
-
<span className="text-foreground-secondary">Section 3</span>
|
|
168
|
+
<span id="responsive-matrix-span-section-3" className="text-foreground-secondary">Section 3</span>
|
|
169
169
|
<Divider orientation="vertical" />
|
|
170
|
-
<span className="text-foreground-secondary">Section 4</span>
|
|
170
|
+
<span id="responsive-matrix-span-section-4" className="text-foreground-secondary">Section 4</span>
|
|
171
171
|
</div>
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|