sesame-components-testing 2.0.0 → 2.0.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/Button/Button.js
CHANGED
|
@@ -10,19 +10,13 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
}
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
14
|
exports.Button = void 0;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
16
|
const FlexCenter_1 = require("../Common/FlexCenter");
|
|
19
17
|
const Button_styles_1 = require("./Button.styles");
|
|
20
|
-
const react_1 = __importDefault(require("react"));
|
|
21
18
|
const Button = (_a) => {
|
|
22
19
|
var { variant = 'primary', size = 'm', selected, children, leftIcon, rightIcon, stretch = false, type = 'button' } = _a, rest = __rest(_a, ["variant", "size", "selected", "children", "leftIcon", "rightIcon", "stretch", "type"]);
|
|
23
|
-
return (
|
|
24
|
-
leftIcon && react_1.default.createElement(FlexCenter_1.FlexCenter, null, leftIcon),
|
|
25
|
-
react_1.default.createElement(FlexCenter_1.FlexCenter, null, children),
|
|
26
|
-
rightIcon && react_1.default.createElement(FlexCenter_1.FlexCenter, null, rightIcon)));
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(Button_styles_1.StyledButton, Object.assign({ type: type, "$variant": variant, "$size": size, "$selected": selected, "$stretch": stretch }, rest, { children: [leftIcon && (0, jsx_runtime_1.jsx)(FlexCenter_1.FlexCenter, { children: leftIcon }), (0, jsx_runtime_1.jsx)(FlexCenter_1.FlexCenter, { children: children }), rightIcon && (0, jsx_runtime_1.jsx)(FlexCenter_1.FlexCenter, { children: rightIcon })] })));
|
|
27
21
|
};
|
|
28
22
|
exports.Button = Button;
|
package/dist/SesameComponent.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.SesameComponent = void 0;
|
|
7
|
-
const
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
9
9
|
const StyledDiv = styled_1.default.div `
|
|
10
10
|
background-color: red;
|
|
@@ -12,6 +12,6 @@ const StyledDiv = styled_1.default.div `
|
|
|
12
12
|
font-size: 33px;
|
|
13
13
|
`;
|
|
14
14
|
const SesameComponent = ({ message = "Hello, Sesame!" }) => {
|
|
15
|
-
return
|
|
15
|
+
return (0, jsx_runtime_1.jsx)(StyledDiv, { children: message });
|
|
16
16
|
};
|
|
17
17
|
exports.SesameComponent = SesameComponent;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ThemeProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
5
|
const react_1 = require("@emotion/react");
|
|
8
6
|
const react_2 = require("react");
|
|
9
7
|
const getSizedTheme_1 = require("./sizes/getSizedTheme");
|
|
10
8
|
const useBreakpointSize_1 = require("./useBreakpointSize");
|
|
11
|
-
const react_3 = __importDefault(require("react"));
|
|
12
9
|
const useSizedTheme = (theme) => {
|
|
13
10
|
const size = (0, useBreakpointSize_1.useBreakpointSize)();
|
|
14
11
|
return (0, react_2.useMemo)(() => {
|
|
@@ -17,6 +14,6 @@ const useSizedTheme = (theme) => {
|
|
|
17
14
|
};
|
|
18
15
|
const ThemeProvider = ({ theme, children }) => {
|
|
19
16
|
const sizedTheme = useSizedTheme(theme);
|
|
20
|
-
return
|
|
17
|
+
return (0, jsx_runtime_1.jsx)(react_1.ThemeProvider, { theme: sizedTheme, children: children });
|
|
21
18
|
};
|
|
22
19
|
exports.ThemeProvider = ThemeProvider;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sesame-components-testing",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A reusable npm component package.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,15 +18,67 @@
|
|
|
18
18
|
"npm",
|
|
19
19
|
"typescript"
|
|
20
20
|
],
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@types/react": "^19.2.13",
|
|
23
|
-
"@types/react-dom": "^19.2.3",
|
|
24
|
-
"react": "^19.2.4",
|
|
25
|
-
"react-dom": "^19.2.4",
|
|
26
|
-
"typescript": "^5.9.3"
|
|
27
|
-
},
|
|
28
21
|
"dependencies": {
|
|
22
|
+
"@floating-ui/react": "^0.27.15",
|
|
23
|
+
"@fontsource/inter": "^5.2.6"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"@chromatic-com/storybook": "^4.1.1",
|
|
27
|
+
"@commitlint/cli": "^19.8.1",
|
|
28
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
29
|
+
"@emotion/babel-plugin": "^11.13.5",
|
|
29
30
|
"@emotion/react": "^11.14.0",
|
|
30
|
-
"@emotion/styled": "^11.14.1"
|
|
31
|
+
"@emotion/styled": "^11.14.1",
|
|
32
|
+
"@storybook/addon-a11y": "^9.1.5",
|
|
33
|
+
"@storybook/addon-docs": "^9.1.5",
|
|
34
|
+
"@storybook/addon-themes": "^9.1.5",
|
|
35
|
+
"@storybook/addon-vitest": "^9.1.5",
|
|
36
|
+
"@storybook/react": "^9.1.5",
|
|
37
|
+
"@storybook/react-vite": "^9.1.5",
|
|
38
|
+
"@testing-library/dom": "^10.4.1",
|
|
39
|
+
"@testing-library/react": "^16.3.0",
|
|
40
|
+
"@testing-library/user-event": "^14.6.1",
|
|
41
|
+
"@types/node": "^24.1.0",
|
|
42
|
+
"@types/react": "^19.1.9",
|
|
43
|
+
"@types/react-dom": "^19.1.7",
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
46
|
+
"@vitejs/plugin-react": "^5.0.2",
|
|
47
|
+
"@vitest/browser": "^3.2.4",
|
|
48
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
49
|
+
"@vitest/eslint-plugin": "^1.3.6",
|
|
50
|
+
"@vitest/ui": "^3.2.4",
|
|
51
|
+
"cypress": "^14.5.3",
|
|
52
|
+
"esbuild": "^0.25.9",
|
|
53
|
+
"eslint": "^9.32.0",
|
|
54
|
+
"eslint-config-prettier": "^10.1.8",
|
|
55
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
56
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
57
|
+
"eslint-plugin-import": "^2.32.0",
|
|
58
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
59
|
+
"eslint-plugin-react": "^7.37.5",
|
|
60
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
61
|
+
"eslint-plugin-storybook": "^9.1.1",
|
|
62
|
+
"husky": "^9.1.7",
|
|
63
|
+
"jsdom": "^26.1.0",
|
|
64
|
+
"mkdirp": "^3.0.1",
|
|
65
|
+
"playwright": "^1.54.2",
|
|
66
|
+
"prettier": "^3.6.2",
|
|
67
|
+
"react": "^19.1.1",
|
|
68
|
+
"react-dom": "^19.1.1",
|
|
69
|
+
"storybook": "^9.1.1",
|
|
70
|
+
"svgo": "^4.0.0",
|
|
71
|
+
"ts-node": "^10.9.2",
|
|
72
|
+
"typescript": "~5.8.3",
|
|
73
|
+
"vite": "^7.0.6",
|
|
74
|
+
"vite-plugin-dts": "^4.5.4",
|
|
75
|
+
"vite-plugin-svgr": "^4.5.0",
|
|
76
|
+
"vitest": "^3.2.4"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@emotion/react": ">=11.14.0",
|
|
80
|
+
"@emotion/styled": ">=11.14.1",
|
|
81
|
+
"react": ">=19.0.0",
|
|
82
|
+
"react-dom": ">=19.0.0"
|
|
31
83
|
}
|
|
32
84
|
}
|