2026-02-03 08:56:11 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { TrackGridDensitySelector } from './TrackGridDensitySelector';
|
2026-02-07 08:08:39 +00:00
|
|
|
import { useArgs } from '@storybook/preview-api';
|
2026-02-03 08:56:11 +00:00
|
|
|
|
|
|
|
|
const meta: Meta<typeof TrackGridDensitySelector> = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'Components/Features/Tracks/TrackGridDensitySelector',
|
2026-02-03 08:56:11 +00:00
|
|
|
component: TrackGridDensitySelector,
|
2026-02-07 08:08:39 +00:00
|
|
|
parameters: { layout: 'centered' },
|
2026-02-03 08:56:11 +00:00
|
|
|
tags: ['autodocs'],
|
2026-02-07 08:08:39 +00:00
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
ui(design): Phase 3 - rounded tokens, min-w/min-h, stories, NavigationProgress
- rounded-[var(--radius-xl/md/lg/sm)] → rounded-xl, rounded-md, rounded-lg, rounded-sm
- Timeline: min-w-[200px] → min-w-50
- AddEquipmentView, MetadataForm: min-h-[100px] → min-h-25
- NavigationProgress: shadow-[...] → shadow-button-primary-glow
- Stories: ActivityGraph, StatCard, NotificationBell, LoadingState, ScrollArea, Skeleton, FileUploadZone
- Reduced arbitrary values from ~60+ to 11 (5 files, exceptions documented)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-10 18:24:07 +00:00
|
|
|
<div className="p-4 bg-background border border-border rounded-xl min-h-layout-story">
|
2026-02-07 08:08:39 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-02-03 08:56:11 +00:00
|
|
|
argTypes: {
|
|
|
|
|
onChange: { action: 'onChange' },
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof TrackGridDensitySelector>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
value: 'normal',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Compact: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
value: 'compact',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Comfortable: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
value: 'comfortable',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Interactive: Story = {
|
2026-02-07 08:08:39 +00:00
|
|
|
render: function InteractiveStory(args) {
|
|
|
|
|
const [{ value }, updateArgs] = useArgs();
|
|
|
|
|
return (
|
|
|
|
|
<TrackGridDensitySelector
|
|
|
|
|
{...args}
|
|
|
|
|
value={value}
|
|
|
|
|
onChange={(v) => updateArgs({ value: v })}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
args: {
|
|
|
|
|
value: 'normal',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/** All states for token and transition check. */
|
|
|
|
|
export const VisualStressTest: Story = {
|
|
|
|
|
render: function VisualStressTestStory(args) {
|
|
|
|
|
const [{ value }, updateArgs] = useArgs();
|
|
|
|
|
return (
|
|
|
|
|
<TrackGridDensitySelector
|
|
|
|
|
{...args}
|
|
|
|
|
value={value}
|
|
|
|
|
onChange={(v) => updateArgs({ value: v })}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
args: {
|
|
|
|
|
value: 'comfortable',
|
2026-02-03 08:56:11 +00:00
|
|
|
},
|
|
|
|
|
};
|