@ukic/react 3.0.0 → 3.1.0
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/README.md +7 -6
- package/dist/components.d.ts +1 -0
- package/dist/components.js +1 -0
- package/dist/core/core.css +1737 -64
- package/dist/performance-tests/App.d.ts +3 -0
- package/dist/performance-tests/App.js +17 -0
- package/dist/performance-tests/index.d.ts +3 -0
- package/dist/performance-tests/index.js +9 -0
- package/dist/performance-tests/pages/IcButton/index.d.ts +3 -0
- package/dist/performance-tests/pages/IcButton/index.js +8 -0
- package/dist/performance-tests/pages/IcCheckbox/index.d.ts +3 -0
- package/dist/performance-tests/pages/IcCheckbox/index.js +15 -0
- package/dist/performance-tests/pages/MultipleIcButtons/index.d.ts +3 -0
- package/dist/performance-tests/pages/MultipleIcButtons/index.js +18 -0
- package/package.json +42 -19
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Routes, Route } from "react-router-dom";
|
|
3
|
+
import IcButtonPage from "./pages/IcButton";
|
|
4
|
+
import MultipleIcButtonsPage from "./pages/MultipleIcButtons";
|
|
5
|
+
import IcCheckboxPage from "./pages/IcCheckbox";
|
|
6
|
+
// Using React router to create pages
|
|
7
|
+
// HashRouter (https://reactrouter.com/en/main/router-components/hash-router) is used so reloading the page doesn't re-direct to 404
|
|
8
|
+
var App = function () {
|
|
9
|
+
return (React.createElement(React.Fragment, null,
|
|
10
|
+
React.createElement("main", null,
|
|
11
|
+
React.createElement(Routes, null,
|
|
12
|
+
React.createElement(Route, { path: "/" },
|
|
13
|
+
React.createElement(Route, { path: "buttons", element: React.createElement(IcButtonPage, null) }),
|
|
14
|
+
React.createElement(Route, { path: "multiple-buttons", element: React.createElement(MultipleIcButtonsPage, null) }),
|
|
15
|
+
React.createElement(Route, { path: "checkbox", element: React.createElement(IcCheckboxPage, null) }))))));
|
|
16
|
+
};
|
|
17
|
+
export default App;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOM from "react-dom";
|
|
3
|
+
import App from "./App";
|
|
4
|
+
import { HashRouter } from "react-router-dom";
|
|
5
|
+
import "../../dist/core/normalize.css";
|
|
6
|
+
import "@ukic/fonts/dist/fonts.css";
|
|
7
|
+
import "../../dist/core/core.css";
|
|
8
|
+
ReactDOM.render(React.createElement(HashRouter, null,
|
|
9
|
+
React.createElement(App, null)), document.getElementById("root"));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IcButton } from "../../../components";
|
|
3
|
+
var IcButtonPage = function () {
|
|
4
|
+
return (React.createElement(React.Fragment, null,
|
|
5
|
+
React.createElement("h1", null, "Button Page"),
|
|
6
|
+
React.createElement(IcButton, null, "Button")));
|
|
7
|
+
};
|
|
8
|
+
export default IcButtonPage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IcCheckbox, IcCheckboxGroup, IcTextField } from "../../../components";
|
|
3
|
+
var IcCheckboxPage = function () {
|
|
4
|
+
return (React.createElement(React.Fragment, null,
|
|
5
|
+
React.createElement("h1", null, "Checkbox Page"),
|
|
6
|
+
React.createElement(IcCheckboxGroup, { label: "Select your extras", name: "default", onIcChange: function (ev) { return console.log("onIcChange", ev.detail.value); } },
|
|
7
|
+
React.createElement(IcCheckbox, { value: "extra", label: "Extra shot (50p)", onIcCheck: function (ev) { return console.log("onIcCheck", ev); } }),
|
|
8
|
+
React.createElement(IcCheckbox, { value: "Soya milk", label: "Soya milk", checked: true }),
|
|
9
|
+
React.createElement(IcCheckbox, { value: "keep cup", label: "Takeaway cup", disabled: true }),
|
|
10
|
+
React.createElement(IcCheckbox, { value: "other", label: "Other" },
|
|
11
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." })),
|
|
12
|
+
React.createElement(IcCheckbox, { additionalFieldDisplay: "dynamic", value: "other", label: "Other" },
|
|
13
|
+
React.createElement(IcTextField, { slot: "additional-field", label: "Please let us know..." })))));
|
|
14
|
+
};
|
|
15
|
+
export default IcCheckboxPage;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IcButton } from "../../../components";
|
|
3
|
+
var MultipleIcButtonsPage = function () {
|
|
4
|
+
return (React.createElement(React.Fragment, null,
|
|
5
|
+
React.createElement("h1", null, "Multiple Buttons Page"),
|
|
6
|
+
React.createElement(IcButton, null, "Button"),
|
|
7
|
+
React.createElement(IcButton, null, "Button"),
|
|
8
|
+
React.createElement(IcButton, null, "Button"),
|
|
9
|
+
React.createElement(IcButton, null, "Button"),
|
|
10
|
+
React.createElement(IcButton, null, "Button"),
|
|
11
|
+
React.createElement(IcButton, null, "Button"),
|
|
12
|
+
React.createElement(IcButton, null, "Button"),
|
|
13
|
+
React.createElement(IcButton, null, "Button"),
|
|
14
|
+
React.createElement(IcButton, null, "Button"),
|
|
15
|
+
React.createElement(IcButton, null, "Button"),
|
|
16
|
+
React.createElement(IcButton, null, "Button")));
|
|
17
|
+
};
|
|
18
|
+
export default MultipleIcButtonsPage;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sideEffects": [
|
|
4
4
|
"*.css"
|
|
5
5
|
],
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.1.0",
|
|
7
7
|
"description": "React-wrapped web components compiled using StencilJS",
|
|
8
8
|
"author": "mi6",
|
|
9
9
|
"bugs": {
|
|
@@ -20,13 +20,19 @@
|
|
|
20
20
|
"cypress:open": "cypress open",
|
|
21
21
|
"cypress:component": "cypress run --component --headless",
|
|
22
22
|
"cypress:ci": "cross-env CYPRESS_CI=true npm run cypress:component",
|
|
23
|
+
"perf:local": "webpack serve --config ./.webpack/webpack.perf.config.js --mode development",
|
|
24
|
+
"perf:build": "webpack build --config ./.webpack/webpack.perf.config.js --mode production",
|
|
25
|
+
"perf:lighthouse": "node ./scripts/lighthouse-runner.js",
|
|
26
|
+
"cypress:performance": "cypress run --e2e --headless --browser=chrome",
|
|
27
|
+
"test:performance": "npm run perf:clean && npm run perf:build && npm run perf:lighthouse",
|
|
28
|
+
"perf:clean": "rimraf dist-perf",
|
|
23
29
|
"clean": "rimraf dist",
|
|
24
30
|
"compile": "npm run tsc",
|
|
25
31
|
"tsc": "tsc -p .",
|
|
26
32
|
"rollup": "rollup -c",
|
|
27
33
|
"lint:cypress": "eslint --config ./cypress/.eslintrc.json ./src/component-tests",
|
|
28
34
|
"storybook": "storybook dev -p 6007",
|
|
29
|
-
"build-storybook": "rimraf ./storybook-static && storybook build
|
|
35
|
+
"build-storybook": "rimraf ./storybook-static && storybook build public",
|
|
30
36
|
"audit": "echo 'Audit for: @ukic/react' && audit-ci -m --config ../../audit-ci.json",
|
|
31
37
|
"prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore src --check",
|
|
32
38
|
"prettier:fix": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore src --write",
|
|
@@ -40,24 +46,30 @@
|
|
|
40
46
|
"dist/"
|
|
41
47
|
],
|
|
42
48
|
"dependencies": {
|
|
43
|
-
"@ukic/web-components": "^3.
|
|
49
|
+
"@ukic/web-components": "^3.1.0"
|
|
44
50
|
},
|
|
45
51
|
"devDependencies": {
|
|
52
|
+
"@ag-grid-community/styles": "^33.0.3",
|
|
46
53
|
"@babel/core": "^7.23.2",
|
|
47
54
|
"@babel/preset-env": "^7.23.2",
|
|
55
|
+
"@babel/preset-react": "^7.24.7",
|
|
56
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
57
|
+
"@cypress-audit/lighthouse": "^1.4.2",
|
|
48
58
|
"@cypress/react": "^8.0.0",
|
|
49
59
|
"@cypress/webpack-preprocessor": "^6.0.0",
|
|
50
60
|
"@mdi/js": "^7.2.96",
|
|
51
61
|
"@stencil/react-output-target": "^0.5.3",
|
|
52
|
-
"@storybook/addon-a11y": "^
|
|
53
|
-
"@storybook/addon-actions": "^
|
|
54
|
-
"@storybook/addon-docs": "^
|
|
55
|
-
"@storybook/addon-essentials": "^
|
|
56
|
-
"@storybook/addon-links": "^
|
|
57
|
-
"@storybook/addon-mdx-gfm": "^
|
|
62
|
+
"@storybook/addon-a11y": "^8.5.3",
|
|
63
|
+
"@storybook/addon-actions": "^8.5.3",
|
|
64
|
+
"@storybook/addon-docs": "^8.5.3",
|
|
65
|
+
"@storybook/addon-essentials": "^8.5.3",
|
|
66
|
+
"@storybook/addon-links": "^8.5.3",
|
|
67
|
+
"@storybook/addon-mdx-gfm": "^8.5.3",
|
|
58
68
|
"@storybook/addon-postcss": "^2.0.0",
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
69
|
+
"@storybook/addon-webpack5-compiler-babel": "^3.0.5",
|
|
70
|
+
"@storybook/blocks": "^8.5.3",
|
|
71
|
+
"@storybook/react": "^8.5.3",
|
|
72
|
+
"@storybook/react-webpack5": "^8.5.3",
|
|
61
73
|
"@types/node": "^16.11.11",
|
|
62
74
|
"@types/react": "^17.0.37",
|
|
63
75
|
"@types/react-dom": "^17.0.11",
|
|
@@ -66,30 +78,41 @@
|
|
|
66
78
|
"axe-core": "^4.8.2",
|
|
67
79
|
"babel-loader": "^8.3.0",
|
|
68
80
|
"cross-env": "^7.0.3",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
81
|
+
"cross-port-killer": "^1.4.0",
|
|
82
|
+
"css-loader": "^6.11.0",
|
|
83
|
+
"cypress": "^13.6.2",
|
|
84
|
+
"cypress-audit": "^1.1.0",
|
|
71
85
|
"cypress-axe": "^1.5.0",
|
|
72
86
|
"cypress-file-upload": "^5.0.8",
|
|
87
|
+
"cypress-image-diff-html-report": "^2.2.0",
|
|
73
88
|
"cypress-image-diff-js": "^2.1.3",
|
|
74
89
|
"cypress-real-events": "^1.12.0",
|
|
75
90
|
"eslint-plugin-cypress": "^2.15.1",
|
|
91
|
+
"html-webpack-plugin": "^5.6.0",
|
|
92
|
+
"http-proxy-middleware": "^2.0.7",
|
|
76
93
|
"mkdirp": "^1.0.4",
|
|
77
94
|
"np": "^7.6.0",
|
|
95
|
+
"npm-run-all": "^4.1.5",
|
|
78
96
|
"react": "^16.14.0",
|
|
79
97
|
"react-dom": "^16.14.0",
|
|
80
98
|
"react-hook-form": "^7.38.0",
|
|
81
|
-
"react-router-dom": "^6.
|
|
82
|
-
"storybook": "^
|
|
99
|
+
"react-router-dom": "^6.26.2",
|
|
100
|
+
"storybook": "^8.5.3",
|
|
83
101
|
"storybook-addon-performance": "^0.17.3",
|
|
102
|
+
"style-loader": "^4.0.0",
|
|
84
103
|
"ts-loader": "^9.5.0",
|
|
85
104
|
"typescript": "^4.9.5",
|
|
86
|
-
"
|
|
105
|
+
"wait-on": "^8.0.1",
|
|
106
|
+
"webpack": "^5.94.0",
|
|
107
|
+
"webpack-cli": "^5.1.4",
|
|
108
|
+
"webpack-dev-server": "^4.15.2"
|
|
87
109
|
},
|
|
88
110
|
"peerDependencies": {
|
|
89
111
|
"@ukic/fonts": "^2.6.0",
|
|
90
|
-
"react": "^16.7.0 || ^17.0.2 || ^18.2.0",
|
|
91
|
-
"react-dom": "^16.7.0 || ^17.0.2 || ^18.2.0"
|
|
112
|
+
"react": "^16.7.0 || ^17.0.2 || ^18.2.0 || ^19.0.0",
|
|
113
|
+
"react-dom": "^16.7.0 || ^17.0.2 || ^18.2.0 || ^19.0.0"
|
|
92
114
|
},
|
|
93
115
|
"license": "MIT",
|
|
94
|
-
"
|
|
116
|
+
"packageManager": "^npm@10.9.2",
|
|
117
|
+
"gitHead": "6ddd470175efc6e34d94c67fe05db42304dd4e3c"
|
|
95
118
|
}
|