Skip to content

Commit 5da4d70

Browse files
committed
fix: apply formatter and linter fixes
1 parent d21ed0c commit 5da4d70

36 files changed

+607
-1065
lines changed

packages/component-library/src/AppShell/index.stories.tsx

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
import type { Meta, StoryObj } from "@storybook/react";
22

3-
import { ErrorPage, type Props as ErrorPageProps } from "../ErrorPage/index.jsx";
3+
import { AppBody as AppShellComponent } from "./index.jsx";
4+
import type { Props as ErrorPageProps } from "../ErrorPage/index.jsx";
5+
import { ErrorPage } from "../ErrorPage/index.jsx";
46
import { NetworkError as NetworkErrorStory } from "../ErrorPage/index.stories.jsx";
57
import { InfoBox } from "../InfoBox/index.jsx";
6-
import { NoResults, type Props as NoResultsProps } from "../NoResults/index.jsx";
8+
import type { Props as NoResultsProps } from "../NoResults/index.jsx";
9+
import { NoResults } from "../NoResults/index.jsx";
710
import { WarningVariant as WarningVariantStory } from "../NoResults/index.stories.jsx";
811
import { NotFoundPage } from "../NotFoundPage/index.jsx";
9-
import { AppBody as AppShellComponent } from "./index.jsx";
1012

1113
const meta = {
1214
title: "layouts & pages/AppShell",
1315
component: AppShellComponent,
1416
subcomponents: { ErrorPage, NoResults, NotFoundPage },
1517
globals: {
1618
args: {
17-
appName: "Component Library",
18-
children: "Hello world!",
19-
tabs: [
20-
{ children: "Home", segment: "" },
21-
{ children: "Products", segment: "products" },
22-
{ children: "Developers", segment: "developers" },
23-
],
24-
},
19+
appName: "Component Library",
20+
children: "Hello world!",
21+
tabs: [
22+
{ children: "Home", segment: "" },
23+
{ children: "Products", segment: "products" },
24+
{ children: "Developers", segment: "developers" },
25+
],
26+
},
2527
bare: true,
2628
theme: {
2729
disable: true,
@@ -58,48 +60,46 @@ export default meta;
5860

5961
export const AppShell = {
6062
args: {
61-
...meta.globals?.args,
63+
...meta.globals.args,
6264
},
6365
render: (args) => (
6466
<AppShellComponent {...args}>
65-
<InfoBox>
66-
{args.children}
67-
</InfoBox>
67+
<InfoBox>{args.children}</InfoBox>
6868
</AppShellComponent>
69-
)
69+
),
7070
} satisfies StoryObj<typeof AppShellComponent>;
7171

7272
type Story = StoryObj<typeof meta>;
7373

7474
export const ErrorStory: Story = {
7575
args: {
76-
...meta.globals?.args,
76+
...meta.globals.args,
7777
},
7878
render: (args) => (
7979
<AppShellComponent {...args}>
80-
<ErrorPage {...NetworkErrorStory.args as ErrorPageProps} />
80+
<ErrorPage {...(NetworkErrorStory.args as ErrorPageProps)} />
8181
</AppShellComponent>
82-
)
82+
),
8383
};
8484

8585
export const NoResultsStory: Story = {
8686
args: {
87-
...meta.globals?.args,
87+
...meta.globals.args,
8888
},
8989
render: (args) => (
9090
<AppShellComponent {...args}>
91-
<NoResults {...WarningVariantStory.args as NoResultsProps} />
91+
<NoResults {...(WarningVariantStory.args as NoResultsProps)} />
9292
</AppShellComponent>
93-
)
93+
),
9494
};
9595

9696
export const NotFoundStory: Story = {
9797
args: {
98-
...meta.globals?.args,
98+
...meta.globals.args,
9999
},
100100
render: (args) => (
101101
<AppShellComponent {...args}>
102102
<NotFoundPage />
103103
</AppShellComponent>
104-
)
105-
};
104+
),
105+
};

packages/component-library/src/Badge/index.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
gap: theme.spacing(2);
66
flex-wrap: wrap;
77
align-items: center;
8-
}
8+
}

packages/component-library/src/Badge/index.stories.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ export const Badge = {
5050

5151
type Story = StoryObj<typeof BadgeComponent>;
5252

53-
const renderAllVariants = (style: typeof STYLES[number], size: typeof SIZES[number], children: React.ReactNode) => (
53+
const renderAllVariants = (
54+
style: (typeof STYLES)[number],
55+
size: (typeof SIZES)[number],
56+
children: React.ReactNode,
57+
) => (
5458
<div className={styles.variantsContainer}>
5559
{VARIANTS.map((variant) => (
5660
<BadgeComponent key={variant} variant={variant} style={style} size={size}>
@@ -136,7 +140,6 @@ export const OutlineXS: Story = {
136140
},
137141
};
138142

139-
140143
export const OutlineMD: Story = {
141144
args: {
142145
children: "Badge",

packages/component-library/src/Card/index.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@
5555
display: flex;
5656
flex-direction: column;
5757
gap: theme.spacing(4);
58-
}
58+
}

packages/component-library/src/Card/index.stories.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as icons from "@phosphor-icons/react/dist/ssr";
22
import type { Meta, StoryObj } from "@storybook/react";
3+
import { fn } from "@storybook/test";
34

45
import { Badge } from "../Badge/index.jsx";
56
import { Button } from "../Button/index.jsx";
@@ -87,8 +88,8 @@ export const BasicCard: Story = {
8788
args: {
8889
children: (
8990
<p>
90-
This is a basic card with just content. It can contain any React elements
91-
and will display them with appropriate styling.
91+
This is a basic card with just content. It can contain any React
92+
elements and will display them with appropriate styling.
9293
</p>
9394
),
9495
variant: "secondary",
@@ -102,7 +103,7 @@ export const WithTitleAndIcon: Story = {
102103
children: (
103104
<div>
104105
<p>This card has a title and an icon in the header.</p>
105-
<p>Icons help users quickly identify the card's purpose.</p>
106+
<p>Icons help users quickly identify the card&apos;s purpose.</p>
106107
</div>
107108
),
108109
variant: "secondary",
@@ -146,9 +147,7 @@ export const WithFooter: Story = {
146147
),
147148
footer: (
148149
<div className={styles.footerContent}>
149-
<span className={styles.footerText}>
150-
Last updated 5 minutes ago
151-
</span>
150+
<span className={styles.footerText}>Last updated 5 minutes ago</span>
152151
<Button size="sm" variant="outline">
153152
View All
154153
</Button>
@@ -175,7 +174,7 @@ export const AsLink: Story = {
175174

176175
export const AsButton: Story = {
177176
args: {
178-
onPress: () => alert("Card clicked!"),
177+
onPress: fn(),
179178
icon: <icons.CursorClick />,
180179
title: "Interactive Card",
181180
children: (

packages/component-library/src/CrossfadeTabPanels/index.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,4 @@
112112
&:hover {
113113
background-color: theme.color("button", "primary", "background", "hover");
114114
}
115-
}
115+
}

packages/component-library/src/CrossfadeTabPanels/index.stories.tsx

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Meta, StoryObj } from "@storybook/react";
22

3-
import { TabList } from "../TabList/index.jsx";
4-
import { Tabs } from "../unstyled/Tabs/index.jsx";
53
import { CrossfadeTabPanels as CrossfadeTabPanelsComponent } from "./index.jsx";
64
import styles from "./index.stories.module.scss";
5+
import { TabList } from "../TabList/index.jsx";
6+
import { Tabs } from "../unstyled/Tabs/index.jsx";
77

88
const meta = {
99
title: "navigation & menus/CrossfadeTabPanels",
@@ -18,7 +18,8 @@ const meta = {
1818
},
1919
argTypes: {
2020
items: {
21-
description: "Array of tab panel items with id, optional className, and children",
21+
description:
22+
"Array of tab panel items with id, optional className, and children",
2223
table: {
2324
category: "Props",
2425
},
@@ -156,8 +157,14 @@ export const DifferentHeights: Story = {
156157
<div className={styles.tabContent}>
157158
<h2 className={styles.heading}>Medium Content</h2>
158159
<p>This tab has more content than the first one.</p>
159-
<p>It includes multiple paragraphs to show how the crossfade handles different heights.</p>
160-
<p>The animation should smoothly transition between different content sizes.</p>
160+
<p>
161+
It includes multiple paragraphs to show how the crossfade
162+
handles different heights.
163+
</p>
164+
<p>
165+
The animation should smoothly transition between different
166+
content sizes.
167+
</p>
161168
</div>
162169
),
163170
},
@@ -166,13 +173,22 @@ export const DifferentHeights: Story = {
166173
children: (
167174
<div className={styles.tabContent}>
168175
<h2 className={styles.heading}>Long Content</h2>
169-
<p>This tab contains the most content to demonstrate height transitions.</p>
176+
<p>
177+
This tab contains the most content to demonstrate height
178+
transitions.
179+
</p>
170180
<h3>Section 1</h3>
171181
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
172182
<h3>Section 2</h3>
173-
<p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
183+
<p>
184+
Sed do eiusmod tempor incididunt ut labore et dolore magna
185+
aliqua.
186+
</p>
174187
<h3>Section 3</h3>
175-
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris.</p>
188+
<p>
189+
Ut enim ad minim veniam, quis nostrud exercitation ullamco
190+
laboris.
191+
</p>
176192
</div>
177193
),
178194
},
@@ -221,11 +237,12 @@ export const ComplexContent: Story = {
221237
<div className={styles.section}>
222238
<div className={styles.chartPlaceholder}>
223239
<h3>Chart Placeholder</h3>
224-
<div className={styles.chart}>
225-
Chart would go here
226-
</div>
240+
<div className={styles.chart}>Chart would go here</div>
227241
</div>
228-
<p>Analytics data and insights would be displayed in this panel.</p>
242+
<p>
243+
Analytics data and insights would be displayed in this
244+
panel.
245+
</p>
229246
</div>
230247
</div>
231248
),
@@ -237,12 +254,16 @@ export const ComplexContent: Story = {
237254
<h2 className={styles.heading}>Settings</h2>
238255
<form className={styles.form}>
239256
<div className={styles.formField}>
240-
<label className={styles.label}>Setting 1</label>
241-
<input type="text" className={styles.input} />
257+
<label className={styles.label} htmlFor="setting1">
258+
Setting 1
259+
</label>
260+
<input type="text" className={styles.input} id="setting1" />
242261
</div>
243262
<div className={styles.formField}>
244-
<label className={styles.label}>Setting 2</label>
245-
<select className={styles.select}>
263+
<label className={styles.label} htmlFor="setting2">
264+
Setting 2
265+
</label>
266+
<select className={styles.select} id="setting2">
246267
<option>Option 1</option>
247268
<option>Option 2</option>
248269
</select>
@@ -258,4 +279,4 @@ export const ComplexContent: Story = {
258279
/>
259280
</Tabs>
260281
),
261-
};
282+
};

packages/component-library/src/DropdownCaretDown/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ export default meta;
5151

5252
type Story = StoryObj<typeof DropdownCaretDownComponent>;
5353

54-
export const Default: Story = {};
54+
export const Default: Story = {};

packages/component-library/src/EntityList/index.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
.actionsContainer {
99
display: flex;
1010
gap: theme.spacing(2);
11-
}
11+
}

packages/component-library/src/EntityList/index.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Meta, StoryObj } from "@storybook/react";
22

3-
import { Badge } from "../Badge/index.jsx";
43
import { EntityList as EntityListComponent } from "./index.jsx";
54
import styles from "./index.stories.module.scss";
5+
import { Badge } from "../Badge/index.jsx";
66

77
const meta = {
88
title: "data & tables/EntityList",
@@ -232,4 +232,4 @@ export const ComplexContent: Story = {
232232
},
233233
],
234234
},
235-
};
235+
};

packages/component-library/src/ErrorPage/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ export const LongErrorMessage: Story = {
7373
),
7474
reset: fn(),
7575
},
76-
};
76+
};

packages/component-library/src/Header/index.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { Meta, StoryObj } from "@storybook/react";
22
import { ThemeProvider } from "next-themes";
33

4+
import { Header as HeaderComponent } from "./index.jsx";
45
import { TabRoot } from "../AppShell/tabs.jsx";
56
import { Badge } from "../Badge/index.jsx";
67
import { Button } from "../Button/index.jsx";
78
import { MainNavTabs } from "../MainNavTabs/index.jsx";
8-
import { Header as HeaderComponent } from "./index.jsx";
99

1010
const meta = {
1111
title: "navigation & menus/Header",

packages/component-library/src/InfoBox/index.stories.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
display: flex;
55
flex-direction: column;
66
gap: theme.spacing(4);
7-
}
7+
}

0 commit comments

Comments
 (0)