Skip to content

Commit edc3501

Browse files
committed
chore: fix vs code types collisions
1 parent 72f094d commit edc3501

File tree

6 files changed

+7
-5
lines changed

6 files changed

+7
-5
lines changed

packages/kit-headless/.storybook/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"emitDecoratorMetadata": true,
55
"types": ["node", "jest", "@testing-library/jest-dom"]
66
},
7-
87
"exclude": [
98
"../**/*.spec.ts",
109
"../**/*.test.ts",
1110
"../**/*.spec.tsx",
12-
"../**/*.test.tsx"
11+
"../**/*.test.tsx",
12+
"../cypress.config.ts"
1313
],
1414
"include": [
1515
"../src/**/*.stories.ts",

packages/kit-headless/src/components/tabs/tab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const Tab = component$((props: TabProps) => {
6565
onFocus$={selectIfAutomatic$}
6666
onMouseEnter$={selectIfAutomatic$}
6767
aria-selected={isSelectedSignal.value}
68+
tabIndex={isSelectedSignal.value ? 0 : -1}
6869
aria-controls={'tabpanel-' + contextService.tabsMap[uniqueId]?.tabPanelId}
6970
class={`${
7071
isSelectedSignal.value ? `selected ${props.selectedClassName}` : ''

packages/kit-headless/src/components/tabs/tabs-panel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ export const TabPanel = component$(({ ...props }: TabPanelProps) => {
4141
id={'tabpanel-' + panelUID}
4242
role="tabpanel"
4343
tabIndex={0}
44+
hidden={isSelectedSignal.value ? undefined : true}
4445
aria-labelledby={`tab-${matchedTabId}`}
4546
class={`${isSelectedSignal.value ? 'is-hidden' : ''}${
4647
props.class ? ` ${props.class}` : ''

packages/kit-headless/src/components/tabs/tabs.stories.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export const Primary: Story = {
3333

3434
const tabPanel = await canvas.findByRole('tabpanel');
3535

36-
// await expect(tabPanel).toBeInTheDocument();
37-
// await expect(tabPanel).toContain('Panel 2');
36+
await expect(tabPanel).toHaveTextContent('Panel 2');
3837
},
3938
};

packages/kit-headless/tsconfig.editor.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"extends": "./tsconfig.json",
33
"include": ["**/*.ts", "**/*.tsx"],
44
"compilerOptions": {
5-
"types": ["cypress", "node"]
5+
"types": ["node", "jest", "@testing-library/jest-dom"]
66
}
77
}

packages/kit-headless/tsconfig.lib.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"exclude": [
99
"**/*.stories.ts",
1010
"**/*.stories.js",
11+
"**/*.stories.tsx",
1112
"cypress/**/*",
1213
"cypress.config.ts",
1314
"**/*.cy.ts",

0 commit comments

Comments
 (0)