Skip to content

Commit 381476a

Browse files
authored
Merge pull request #1724 from dxc-technology/gomezivann/radix-popover-update
Update Radix Popover version
2 parents c7fe136 + 9d1d805 commit 381476a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+26598
-34113
lines changed

lib/.eslintrc.json

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,65 @@
44
"browser": true,
55
"window": true
66
},
7-
"extends": ["airbnb", "prettier", "plugin:jest/recommended"],
8-
"plugins": ["jest", "react-hooks"],
7+
"extends": [
8+
"airbnb",
9+
"prettier",
10+
"plugin:jest/recommended",
11+
"plugin:storybook/recommended",
12+
"plugin:storybook/recommended"
13+
],
14+
"plugins": [
15+
"jest",
16+
"react-hooks"
17+
],
918
"rules": {
1019
"linebreak-style": 0,
11-
"no-use-before-define": ["error", { "functions": false }],
12-
"no-underscore-dangle": ["error", { "allow": ["_options", "_links"] }],
20+
"no-use-before-define": [
21+
"error",
22+
{
23+
"functions": false
24+
}
25+
],
26+
"no-underscore-dangle": [
27+
"error",
28+
{
29+
"allow": [
30+
"_options",
31+
"_links"
32+
]
33+
}
34+
],
1335
"react/jsx-one-expression-per-line": "allow",
1436
"no-nested-ternary": "off",
1537
"import/extensions": "allow",
16-
"import/no-unresolved": ["error", { "ignore": ["react", "styled-components"] }],
17-
"react/prop-types": [2, { "ignore": ["children"] }],
38+
"import/no-unresolved": [
39+
"error",
40+
{
41+
"ignore": [
42+
"react",
43+
"styled-components"
44+
]
45+
}
46+
],
47+
"react/prop-types": [
48+
2,
49+
{
50+
"ignore": [
51+
"children"
52+
]
53+
}
54+
],
1855
"react/self-closing-comp": "allow",
1956
"react-hooks/rules-of-hooks": "error",
2057
"react-hooks/exhaustive-deps": "warn",
21-
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
58+
"react/jsx-filename-extension": [
59+
1,
60+
{
61+
"extensions": [
62+
".js",
63+
".jsx"
64+
]
65+
}
66+
]
2267
}
2368
}

lib/.storybook/components/DarkSection.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

lib/.storybook/components/ExampleContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type Props = {
88
};
99

1010
const ExampleContainer = ({ children, pseudoState, expanded = false }: Props): JSX.Element => (
11-
<DivContainer className={pseudoState} expanded={expanded}>
11+
<DivContainer className={`${pseudoState}-all`} expanded={expanded}>
1212
{children}
1313
</DivContainer>
1414
);

lib/.storybook/main.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

lib/.storybook/main.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { StorybookConfig } from "@storybook/react-vite";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-links",
7+
"@storybook/addon-essentials",
8+
"@storybook/addon-interactions",
9+
"storybook-addon-pseudo-states",
10+
],
11+
framework: {
12+
name: "@storybook/react-vite",
13+
options: {},
14+
},
15+
};
16+
export default config;

lib/.storybook/preview.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

lib/.storybook/preview.tsx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { HalstackProvider } from "../src/HalstackContext";
2+
import styled from "styled-components";
3+
import type { Preview } from "@storybook/react";
4+
import React from "react";
5+
6+
const preview: Preview = {
7+
parameters: {
8+
actions: { argTypesRegex: "^on[A-Z].*" },
9+
controls: {
10+
matchers: {
11+
color: /(background|color)$/i,
12+
date: /Date$/i,
13+
},
14+
},
15+
},
16+
decorators: [
17+
(Story) => (
18+
<HalstackProvider>
19+
<Container>
20+
<Story />
21+
</Container>
22+
</HalstackProvider>
23+
),
24+
],
25+
};
26+
27+
const Container = styled.div`
28+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
29+
"Droid Sans", "Helvetica Neue", sans-serif;
30+
`;
31+
32+
export default preview;

0 commit comments

Comments
 (0)