@ukic/react 3.0.0 → 3.2.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 +37 -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 +43 -20
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/mi6/ic-design-system/tree/main/LICENSE)
|
|
4
4
|
[](https://github.com/mi6/ic-design-system/tree/main/LICENSE)
|
|
5
|
+
[](https://npmjs.com/package/@ukic/react)
|
|
5
6
|
|
|
6
7
|
The [Intelligence Community Design System](https://design.sis.gov.uk) helps the United Kingdom's Intelligence Community (MI6, GCHQ, MI5, and partners) to quickly build powerful capabilities that are accessible and easy to use.
|
|
7
8
|
|
|
@@ -16,10 +17,10 @@ To install the components:
|
|
|
16
17
|
In the root of your project:
|
|
17
18
|
|
|
18
19
|
```shell
|
|
19
|
-
|
|
20
|
+
# using npm
|
|
20
21
|
npm install @ukic/react @ukic/fonts
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
# using yarn
|
|
23
24
|
rm package-lock.json
|
|
24
25
|
yarn add @ukic/react @ukic/fonts
|
|
25
26
|
```
|
|
@@ -43,7 +44,7 @@ Add the following into the top level CSS file for your project.
|
|
|
43
44
|
@import "@ukic/react/dist/core/core.css";
|
|
44
45
|
```
|
|
45
46
|
|
|
46
|
-
In order to be rendered consistently across browsers and in line with modern standards, each of the ICDS components uses styles from a global CSS file based on [Normalize.css](https://necolas.github.io/normalize.css/).
|
|
47
|
+
In order to be rendered consistently across browsers and in line with modern standards, each of the ICDS components uses styles from a global CSS file based on [Normalize.css](https://necolas.github.io/normalize.css/).
|
|
47
48
|
|
|
48
49
|
If you would like to import these styles to apply them to the rest of your project and slotted elements used within any of the ICDS components, add the following into the top level CSS file as well.
|
|
49
50
|
|
|
@@ -57,6 +58,36 @@ The `@ukic/react` package will need to be transformed before you can use these c
|
|
|
57
58
|
|
|
58
59
|
Add a `transformIgnorePatterns` field with the value `["/node_modules/(?!@ukic/react)"]` to your Jest config.
|
|
59
60
|
|
|
61
|
+
## Typescript
|
|
62
|
+
|
|
63
|
+
If your project is making use of Typescript, you can import the custom types used in the ICDS component library. For details on the types implemented in each component, refer to the Props table on the Code page for each Component on the [Design System Guidance site](https://design.sis.gov.uk/components/select/code)
|
|
64
|
+
|
|
65
|
+
Types can be imported from the @ukic/web-components package as per the below example.
|
|
66
|
+
|
|
67
|
+
> [!NOTE]
|
|
68
|
+
> You do not have to install this package into your project, it is already installed as a dependency of @ukic/react.
|
|
69
|
+
|
|
70
|
+
```ts
|
|
71
|
+
import { IcSelectTypes, IcMenuOption } from '@ukic/web-components';
|
|
72
|
+
|
|
73
|
+
const selectType: IcSelectTypes = "single";
|
|
74
|
+
|
|
75
|
+
const options: IcMenuOption[] = [
|
|
76
|
+
{
|
|
77
|
+
label: "Americano",
|
|
78
|
+
value: "ame",
|
|
79
|
+
description: "Classic black coffee",
|
|
80
|
+
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
label: "Latte",
|
|
84
|
+
value: "lat",
|
|
85
|
+
description: "This coffee has milk in, we know that much",
|
|
86
|
+
disabled: true
|
|
87
|
+
}
|
|
88
|
+
];
|
|
89
|
+
```
|
|
90
|
+
|
|
60
91
|
## Contributing
|
|
61
92
|
|
|
62
93
|
We have a couple of resources to help you with contributing.
|
|
@@ -68,7 +99,7 @@ We have a couple of resources to help you with contributing.
|
|
|
68
99
|
|
|
69
100
|
## Changelog
|
|
70
101
|
|
|
71
|
-
For a comprehensive changelog of the React components, please read the web components [CHANGELOG](https://github.com/mi6/ic-ui-kit/blob/main/CHANGELOG.md). The released updates made to the web components are reflected on the React components.
|
|
102
|
+
For a comprehensive changelog of the React components, please read the web components [CHANGELOG](https://github.com/mi6/ic-ui-kit/blob/main/CHANGELOG.md). The released updates made to the web components are reflected on the React components.
|
|
72
103
|
|
|
73
104
|
## Security
|
|
74
105
|
|
|
@@ -76,7 +107,7 @@ If you've found a vulnerability, we want to know so that we can fix it. [Our sec
|
|
|
76
107
|
|
|
77
108
|
## Questions about the departments
|
|
78
109
|
|
|
79
|
-
The team is only able to talk about the projects we've put on GitHub
|
|
110
|
+
The team is only able to talk about the projects we've put on GitHub. We unfortunately can't talk about the work of our departments.
|
|
80
111
|
|
|
81
112
|
Visit our websites to learn more about:
|
|
82
113
|
|
|
@@ -88,4 +119,4 @@ Visit our websites to learn more about:
|
|
|
88
119
|
|
|
89
120
|
Unless stated otherwise, the codebase is released under the [MIT License](https://opensource.org/licenses/MIT). This covers both the codebase and any sample code in the documentation. The documentation is and available under the terms of the [Open Government License v3.0](https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/).
|
|
90
121
|
|
|
91
|
-
© Crown copyright 2022
|
|
122
|
+
© Crown copyright 2022
|
package/dist/components.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare const IcSectionContainer: import("react").ForwardRefExoticCompone
|
|
|
46
46
|
export declare const IcSelect: import("react").ForwardRefExoticComponent<JSX.IcSelect & Omit<import("react").HTMLAttributes<HTMLIcSelectElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcSelectElement>>;
|
|
47
47
|
export declare const IcSideNavigation: import("react").ForwardRefExoticComponent<JSX.IcSideNavigation & Omit<import("react").HTMLAttributes<HTMLIcSideNavigationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcSideNavigationElement>>;
|
|
48
48
|
export declare const IcSkeleton: import("react").ForwardRefExoticComponent<JSX.IcSkeleton & Omit<import("react").HTMLAttributes<HTMLIcSkeletonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcSkeletonElement>>;
|
|
49
|
+
export declare const IcSkipLink: import("react").ForwardRefExoticComponent<JSX.IcSkipLink & Omit<import("react").HTMLAttributes<HTMLIcSkipLinkElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcSkipLinkElement>>;
|
|
49
50
|
export declare const IcStatusTag: import("react").ForwardRefExoticComponent<JSX.IcStatusTag & Omit<import("react").HTMLAttributes<HTMLIcStatusTagElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcStatusTagElement>>;
|
|
50
51
|
export declare const IcStep: import("react").ForwardRefExoticComponent<JSX.IcStep & Omit<import("react").HTMLAttributes<HTMLIcStepElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcStepElement>>;
|
|
51
52
|
export declare const IcStepper: import("react").ForwardRefExoticComponent<JSX.IcStepper & Omit<import("react").HTMLAttributes<HTMLIcStepperElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLIcStepperElement>>;
|
package/dist/components.js
CHANGED
|
@@ -51,6 +51,7 @@ export var IcSectionContainer = /*@__PURE__*/ createReactComponent('ic-section-c
|
|
|
51
51
|
export var IcSelect = /*@__PURE__*/ createReactComponent('ic-select');
|
|
52
52
|
export var IcSideNavigation = /*@__PURE__*/ createReactComponent('ic-side-navigation');
|
|
53
53
|
export var IcSkeleton = /*@__PURE__*/ createReactComponent('ic-skeleton');
|
|
54
|
+
export var IcSkipLink = /*@__PURE__*/ createReactComponent('ic-skip-link');
|
|
54
55
|
export var IcStatusTag = /*@__PURE__*/ createReactComponent('ic-status-tag');
|
|
55
56
|
export var IcStep = /*@__PURE__*/ createReactComponent('ic-step');
|
|
56
57
|
export var IcStepper = /*@__PURE__*/ createReactComponent('ic-stepper');
|