@iress-oss/ids-mcp-server 6.0.0-alpha.0 → 6.0.0-alpha.1-canary-20251204014525-3f0dce4
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/searchHandlers.test.js +8 -2
- package/dist/toolHandler.test.js +9 -9
- package/dist/utils.test.js +6 -2
- package/package.json +32 -30
- package/generated/docs/components-alert-docs.md +0 -702
- package/generated/docs/components-autocomplete-docs.md +0 -1433
- package/generated/docs/components-autocomplete-recipes-docs.md +0 -104
- package/generated/docs/components-badge-docs.md +0 -531
- package/generated/docs/components-button-docs.md +0 -1442
- package/generated/docs/components-buttongroup-docs.md +0 -748
- package/generated/docs/components-card-docs.md +0 -944
- package/generated/docs/components-checkbox-docs.md +0 -694
- package/generated/docs/components-checkboxgroup-docs.md +0 -1087
- package/generated/docs/components-checkboxgroup-recipes-docs.md +0 -119
- package/generated/docs/components-col-docs.md +0 -881
- package/generated/docs/components-container-docs.md +0 -123
- package/generated/docs/components-divider-docs.md +0 -576
- package/generated/docs/components-expander-docs.md +0 -594
- package/generated/docs/components-field-docs.md +0 -2007
- package/generated/docs/components-filter-docs.md +0 -1322
- package/generated/docs/components-hide-docs.md +0 -702
- package/generated/docs/components-icon-docs.md +0 -816
- package/generated/docs/components-image-docs.md +0 -493
- package/generated/docs/components-inline-docs.md +0 -2003
- package/generated/docs/components-input-docs.md +0 -867
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -689
- package/generated/docs/components-inputcurrency-recipes-docs.md +0 -115
- package/generated/docs/components-introduction-docs.md +0 -450
- package/generated/docs/components-label-docs.md +0 -562
- package/generated/docs/components-link-docs.md +0 -586
- package/generated/docs/components-menu-docs.md +0 -1146
- package/generated/docs/components-menu-menuitem-docs.md +0 -739
- package/generated/docs/components-modal-docs.md +0 -1346
- package/generated/docs/components-panel-docs.md +0 -600
- package/generated/docs/components-placeholder-docs.md +0 -446
- package/generated/docs/components-popover-docs.md +0 -1529
- package/generated/docs/components-popover-recipes-docs.md +0 -211
- package/generated/docs/components-progress-docs.md +0 -568
- package/generated/docs/components-provider-docs.md +0 -160
- package/generated/docs/components-radio-docs.md +0 -563
- package/generated/docs/components-radiogroup-docs.md +0 -1153
- package/generated/docs/components-readonly-docs.md +0 -535
- package/generated/docs/components-richselect-docs.md +0 -5836
- package/generated/docs/components-row-docs.md +0 -2354
- package/generated/docs/components-select-docs.md +0 -940
- package/generated/docs/components-skeleton-docs.md +0 -597
- package/generated/docs/components-skeleton-recipes-docs.md +0 -76
- package/generated/docs/components-skiplink-docs.md +0 -587
- package/generated/docs/components-slideout-docs.md +0 -1036
- package/generated/docs/components-slider-docs.md +0 -828
- package/generated/docs/components-spinner-docs.md +0 -450
- package/generated/docs/components-stack-docs.md +0 -923
- package/generated/docs/components-table-ag-grid-docs.md +0 -1444
- package/generated/docs/components-table-docs.md +0 -2327
- package/generated/docs/components-tabset-docs.md +0 -768
- package/generated/docs/components-tabset-tab-docs.md +0 -550
- package/generated/docs/components-tag-docs.md +0 -548
- package/generated/docs/components-text-docs.md +0 -585
- package/generated/docs/components-toaster-docs.md +0 -755
- package/generated/docs/components-toggle-docs.md +0 -614
- package/generated/docs/components-tooltip-docs.md +0 -747
- package/generated/docs/components-validationmessage-docs.md +0 -1161
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -1181
- package/generated/docs/extensions-editor-recipes-docs.md +0 -89
- package/generated/docs/foundations-accessibility-docs.md +0 -40
- package/generated/docs/foundations-consistency-docs.md +0 -52
- package/generated/docs/foundations-content-docs.md +0 -23
- package/generated/docs/foundations-grid-docs.md +0 -74
- package/generated/docs/foundations-introduction-docs.md +0 -19
- package/generated/docs/foundations-principles-docs.md +0 -70
- package/generated/docs/foundations-responsive-breakpoints-docs.md +0 -193
- package/generated/docs/foundations-tokens-colour-docs.md +0 -564
- package/generated/docs/foundations-tokens-elevation-docs.md +0 -155
- package/generated/docs/foundations-tokens-introduction-docs.md +0 -190
- package/generated/docs/foundations-tokens-radius-docs.md +0 -71
- package/generated/docs/foundations-tokens-spacing-docs.md +0 -89
- package/generated/docs/foundations-tokens-typography-docs.md +0 -322
- package/generated/docs/foundations-user-experience-docs.md +0 -63
- package/generated/docs/foundations-visual-design-docs.md +0 -46
- package/generated/docs/foundations-z-index-stacking-docs.md +0 -31
- package/generated/docs/frequently-asked-questions-docs.md +0 -53
- package/generated/docs/get-started-develop-docs.md +0 -209
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/guidelines.md +0 -2054
- package/generated/docs/introduction-docs.md +0 -87
- package/generated/docs/news-version-6-docs.md +0 -93
- package/generated/docs/patterns-form-docs.md +0 -3902
- package/generated/docs/patterns-form-recipes-docs.md +0 -1370
- package/generated/docs/patterns-introduction-docs.md +0 -24
- package/generated/docs/patterns-loading-docs.md +0 -4043
- package/generated/docs/resources-code-katas-docs.md +0 -29
- package/generated/docs/resources-introduction-docs.md +0 -38
- package/generated/docs/resources-mcp-server-docs.md +0 -27
- package/generated/docs/resources-migration-guides-from-v4-to-v5-docs.md +0 -437
- package/generated/docs/styling-props-colour-docs.md +0 -172
- package/generated/docs/styling-props-elevation-docs.md +0 -88
- package/generated/docs/styling-props-radius-docs.md +0 -86
- package/generated/docs/styling-props-reference-docs.md +0 -160
- package/generated/docs/styling-props-screen-readers-docs.md +0 -71
- package/generated/docs/styling-props-sizing-docs.md +0 -627
- package/generated/docs/styling-props-spacing-docs.md +0 -2282
- package/generated/docs/styling-props-typography-docs.md +0 -121
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/versions-docs.md +0 -17
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
[](#code-katas)Code Katas
|
|
2
|
-
=========================
|
|
3
|
-
|
|
4
|
-
A code kata is an exercise in programming that helps a programmer hone their skills through practice and repetition. Code katas are a great way to learn a new language, practice a new technique, or just to keep your skills fresh. They are also a great way to get a team to practice working together.
|
|
5
|
-
|
|
6
|
-
In our case, we will be using code katas to help you practice using the Iress Design System (IDS) components.
|
|
7
|
-
|
|
8
|
-
1. Lightsaber Order Form: This code kata was created specifically to introduce version five to Iress product engineering teams. It allows you to practice using the latest `IressForm` and its controlled elements, as well as practice writing tests efficiently using React Testing Library out-of-the-box.
|
|
9
|
-
2. Pizza Ordering: This is an older kata that is great for practicing UI in general.
|
|
10
|
-
|
|
11
|
-
The code katas can be found in the Code Katas repository.
|
|
12
|
-
|
|
13
|
-
[](#want-more-code-katas)Want more code katas?
|
|
14
|
-
----------------------------------------------
|
|
15
|
-
|
|
16
|
-
If you want to do some more code katas, check out the following resources. You can even use IDS for the UI based ones to put in some more practice.
|
|
17
|
-
|
|
18
|
-
* [Iress code katas](https://github.com/oneiresslab/code-katas)
|
|
19
|
-
* [Codurance](https://www.codurance.com/katas)
|
|
20
|
-
* [TDD Buddy](https://tddbuddy.com/katas.html)
|
|
21
|
-
* [Code Kata](http://codekata.com/)
|
|
22
|
-
* [Awesome Katas](https://github.com/gamontal/awesome-katas)
|
|
23
|
-
* [CSS Battle](https://cssbattle.dev/)
|
|
24
|
-
* [Code Chef](https://www.codechef.com/)
|
|
25
|
-
* [Project Euler](https://projecteuler.net/)
|
|
26
|
-
|
|
27
|
-
On this page
|
|
28
|
-
|
|
29
|
-
* [Want more code katas?](#want-more-code-katas)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
[](#resources)Resources
|
|
2
|
-
=======================
|
|
3
|
-
|
|
4
|
-
These are additional resources to help you make the most of the Iress Design System.
|
|
5
|
-
|
|
6
|
-
[](#migration-guides)Migration guides
|
|
7
|
-
-------------------------------------
|
|
8
|
-
|
|
9
|
-
These guides help you transition from previous versions of the Iress Design System to the latest version. They provide step-by-step instructions and highlight the changes made in each version.
|
|
10
|
-
|
|
11
|
-
1. [Version 5 to 6](https://docs.google.com/document/d/17K81rHBZjjF_tsrC8QFrSsmjrC0IJu_bpU4sB2N7PSQ/edit?usp=sharing)
|
|
12
|
-
2. [Version 4 to 5](./?path=/docs/resources-migration-guides-from-v4-to-v5--docs)
|
|
13
|
-
|
|
14
|
-
[](#mcp-server)MCP Server
|
|
15
|
-
-------------------------
|
|
16
|
-
|
|
17
|
-
The MCP Server provides AI agents with contextual information about the Iress Design System (IDS) components, allowing them to assist with development tasks such as writing code and UIs consistently, generating documentation, and answering questions about the design system, and all according to best practice.
|
|
18
|
-
|
|
19
|
-
[](/?path=/docs/resources-mcp-server--docs)
|
|
20
|
-
|
|
21
|
-
[View MCP Server](/?path=/docs/resources-mcp-server--docs)
|
|
22
|
-
|
|
23
|
-
[](#code-katas)Code katas
|
|
24
|
-
-------------------------
|
|
25
|
-
|
|
26
|
-
These are exercises to help you practice and improve your skills with the Iress Design System. They cover various components and patterns, providing a hands-on way to learn.
|
|
27
|
-
|
|
28
|
-
You can even try using the [MCP Server](./?path=/?path=/docs/resources-mcp-server--docs) to help you complete the code katas by asking questions about the components and patterns.
|
|
29
|
-
|
|
30
|
-
[](/?path=/docs/resources-code-katas--docs)
|
|
31
|
-
|
|
32
|
-
[View code katas](/?path=/docs/resources-code-katas--docs)
|
|
33
|
-
|
|
34
|
-
On this page
|
|
35
|
-
|
|
36
|
-
* [Migration guides](#migration-guides)
|
|
37
|
-
* [MCP Server](#mcp-server)
|
|
38
|
-
* [Code katas](#code-katas)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
[](#mcp-server)MCP Server
|
|
2
|
-
=========================
|
|
3
|
-
|
|
4
|
-
The MCP Server provides AI agents with contextual information about the Iress Design System (IDS) components, allowing them to assist with development tasks such as writing code and UIs consistently, generating documentation, and answering questions about the design system, and all according to best practice.
|
|
5
|
-
|
|
6
|
-
[
|
|
7
|
-
|
|
8
|
-
View MCP Server on NPM
|
|
9
|
-
|
|
10
|
-
](https://www.npmjs.com/package/@iress-oss/ids-mcp-server)
|
|
11
|
-
|
|
12
|
-
* * *
|
|
13
|
-
|
|
14
|
-
[](#installation)Installation
|
|
15
|
-
-----------------------------
|
|
16
|
-
|
|
17
|
-
[
|
|
18
|
-
|
|
19
|
-
Install on Visual Studio Code
|
|
20
|
-
|
|
21
|
-
](vscode:mcp/install?%7B%22name%22%3A%22iress-design-system%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22%40iress-oss%2Fids-mcp-server%22%5D%7D)
|
|
22
|
-
|
|
23
|
-
For other MCP clients or manual configuration, check the [MCP Server README](https://www.npmjs.com/package/@iress-oss/ids-mcp-server)
|
|
24
|
-
|
|
25
|
-
On this page
|
|
26
|
-
|
|
27
|
-
* [Installation](#installation)
|
|
@@ -1,437 +0,0 @@
|
|
|
1
|
-
[](#migration-from-v4-to-v5)Migration from v4 to v5
|
|
2
|
-
===================================================
|
|
3
|
-
|
|
4
|
-
This is a step-by-step guide for upgrading your application from IDS v4 to v5. To learn more about the benefits of upgrading, see the [IDS v5 initiative Atlas post](https://team.atlassian.com/project/IRESS4-19/about).
|
|
5
|
-
|
|
6
|
-
[](#updating-your-dependencies)Updating your dependencies
|
|
7
|
-
---------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
### [](#upgrade-ids-and-themes)Upgrade IDS and themes
|
|
10
|
-
|
|
11
|
-
Update your dependencies in your `package.json` file to the following:
|
|
12
|
-
|
|
13
|
-
\[data-radix-scroll-area-viewport\] {
|
|
14
|
-
scrollbar-width: none;
|
|
15
|
-
-ms-overflow-style: none;
|
|
16
|
-
-webkit-overflow-scrolling: touch;
|
|
17
|
-
}
|
|
18
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
19
|
-
display: none;
|
|
20
|
-
}
|
|
21
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
align-items: stretch;
|
|
25
|
-
}
|
|
26
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
27
|
-
flex-grow: 1;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"@iress-oss/ids-components": "^5.0.0",
|
|
32
|
-
"@iress/themes": "^5.0.0"
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
Copy
|
|
36
|
-
|
|
37
|
-
or run:
|
|
38
|
-
|
|
39
|
-
\[data-radix-scroll-area-viewport\] {
|
|
40
|
-
scrollbar-width: none;
|
|
41
|
-
-ms-overflow-style: none;
|
|
42
|
-
-webkit-overflow-scrolling: touch;
|
|
43
|
-
}
|
|
44
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
45
|
-
display: none;
|
|
46
|
-
}
|
|
47
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
48
|
-
display: flex;
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
align-items: stretch;
|
|
51
|
-
}
|
|
52
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
53
|
-
flex-grow: 1;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
yarn add @iress-oss/ids-components@^5.0.0 @iress/themes@^5.0.0
|
|
57
|
-
|
|
58
|
-
Copy
|
|
59
|
-
|
|
60
|
-
### [](#upgrade-react)Upgrade React
|
|
61
|
-
|
|
62
|
-
The minimum required version of React is 17. If you are using an older version of React, you will need to update it.
|
|
63
|
-
|
|
64
|
-
[](#updating-imports)Updating imports
|
|
65
|
-
-------------------------------------
|
|
66
|
-
|
|
67
|
-
### [](#changing-components)Changing components
|
|
68
|
-
|
|
69
|
-
Update your imports to the new package name:
|
|
70
|
-
|
|
71
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { IressButton } from '@iress/components-react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { IressButton } from '@iress-oss/ids-components';</pre></td></tr></tbody></table>
|
|
72
|
-
|
|
73
|
-
You can run both packages together, so you can migrate components one by one.
|
|
74
|
-
|
|
75
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { IressModal, IressButton } from '@iress/components-react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { IressModal } from '@iress/components-react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { IressButton } from '@iress-oss/ids-components';</pre></td></tr></tbody></table>
|
|
76
|
-
|
|
77
|
-
### [](#importing-component-styles)Importing component styles
|
|
78
|
-
|
|
79
|
-
IDS v5 no longer injects CSS into the DOM. You will need to import the stylesheet directly into your application.
|
|
80
|
-
|
|
81
|
-
\[data-radix-scroll-area-viewport\] {
|
|
82
|
-
scrollbar-width: none;
|
|
83
|
-
-ms-overflow-style: none;
|
|
84
|
-
-webkit-overflow-scrolling: touch;
|
|
85
|
-
}
|
|
86
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
87
|
-
display: none;
|
|
88
|
-
}
|
|
89
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
align-items: stretch;
|
|
93
|
-
}
|
|
94
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
95
|
-
flex-grow: 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
import '@iress-oss/ids-components/dist/style.css';
|
|
99
|
-
|
|
100
|
-
Copy
|
|
101
|
-
|
|
102
|
-
[](#update-jest-configuration)Update Jest configuration
|
|
103
|
-
-------------------------------------------------------
|
|
104
|
-
|
|
105
|
-
If you are using Jest, you will need to update your Jest configuration to add the new IDS package to your `transformIgnorePatterns`.
|
|
106
|
-
|
|
107
|
-
**Note:** If you are using version 4 and version 5 in parallel, you will need to keep the old IDS packages in your `transformIgnorePatterns` until you have completely migrated over your components.
|
|
108
|
-
|
|
109
|
-
\[data-radix-scroll-area-viewport\] {
|
|
110
|
-
scrollbar-width: none;
|
|
111
|
-
-ms-overflow-style: none;
|
|
112
|
-
-webkit-overflow-scrolling: touch;
|
|
113
|
-
}
|
|
114
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
115
|
-
display: none;
|
|
116
|
-
}
|
|
117
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
118
|
-
display: flex;
|
|
119
|
-
flex-direction: column;
|
|
120
|
-
align-items: stretch;
|
|
121
|
-
}
|
|
122
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
123
|
-
flex-grow: 1;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
"transformIgnorePatterns": \[
|
|
127
|
-
"/node\_modules/(?!@iress-oss/ids-components)"
|
|
128
|
-
\]
|
|
129
|
-
|
|
130
|
-
Copy
|
|
131
|
-
|
|
132
|
-
If you are mocking CSS files for your tests, you'll also need to make sure the new stylesheet is matched by your `moduleNameMapper`:
|
|
133
|
-
|
|
134
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> "moduleNameMapper": {</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> "^.+\.(scss|less)$": "<rootDir>/test/style-mock.ts",</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> "ids-web-components.css$": "<rootDir>/test/style-mock.ts",</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> "global.css$": "<rootDir>/test/style-mock.ts"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> "global.css$": "<rootDir>/test/style-mock.ts",</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> "@iress-oss/ids-components/(.*).css": "<rootDir>/test/style-mock.ts"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> },</pre></td></tr></tbody></table>
|
|
135
|
-
|
|
136
|
-
[](#handling-breaking-changes)Handling breaking changes
|
|
137
|
-
-------------------------------------------------------
|
|
138
|
-
|
|
139
|
-
### [](#components)Components
|
|
140
|
-
|
|
141
|
-
Since the move to React, the majority of the components have been simplified to improve developer experience. We have listed the changes in this google doc by component, so you can attend to each component separately.
|
|
142
|
-
|
|
143
|
-
[](https://docs.google.com/document/d/1H3-zFDftCHDjwaFkwFxVo1uziPsOj8qJn7p3NFG3aUg/edit)
|
|
144
|
-
|
|
145
|
-
[Google doc](https://docs.google.com/document/d/1H3-zFDftCHDjwaFkwFxVo1uziPsOj8qJn7p3NFG3aUg/edit)
|
|
146
|
-
|
|
147
|
-
### [](#testing)Testing
|
|
148
|
-
|
|
149
|
-
Components are no longer loaded asynchronously, so you can test them as you would any other React component. The testing utilities have been removed from the package, so you will need to update your tests to use [React Testing Library](https://testing-library.com/docs/react-testing-library/intro/) or another testing library.
|
|
150
|
-
|
|
151
|
-
Below is an example of a changed test using React Testing Library.
|
|
152
|
-
|
|
153
|
-
Mode
|
|
154
|
-
|
|
155
|
-
DiffOldNew
|
|
156
|
-
|
|
157
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { render } from '@testing-library/react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import { render, fireEvent } from '@testing-library/react';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { idsFireEvent } from '@iress/ids-react-test-utils';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> </pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">test('login form', () => {</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">test('login form', async () => {</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> const loginMock = jest.fn();</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> const screen = render(<LoginForm loginUser={loginMock}/>);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const usernameInput = await screen.findByTestId('username__input');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const usernameInput = screen.getByRole('textbox', { name: 'Username' });</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const passwordInput = await screen.findByTestId('password__input');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const passwordInput = screen.getByRole('textbox', { name: 'Password' });</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> const submitBtn = await screen.findByTestId('submit-btn__button');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> const submitBtn = screen.getByRole('button');</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> idsFireEvent.change(usernameInput, { target: { value: 'joe.bloggs' }});</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> fireEvent.change(usernameInput, { target: { value: 'joe.bloggs' }});</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> idsFireEvent.change(passwordInput, { target: { value: '1234' }});</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> fireEvent.change(passwordInput, { target: { value: '1234' }});</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> idsFireEvent.click(submitBtn);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> fireEvent.click(submitBtn);</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> expect(loginMock).toHaveBeenCalledWith("joe.bloggs", "1234");</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">});</pre></td></tr></tbody></table>
|
|
158
|
-
|
|
159
|
-
#### [](#component-specific-testing)Component specific testing
|
|
160
|
-
|
|
161
|
-
Some components have additional testing requirements. The changed testing requirements will be listed on each component's docs page.
|
|
162
|
-
|
|
163
|
-
These include:
|
|
164
|
-
|
|
165
|
-
* [Form](./?path=/docs/components-form--docs#testing)
|
|
166
|
-
* [Modal](./?path=/docs/components-modal--docs#testing)
|
|
167
|
-
* [Slideout](./?path=/docs/components-slideout--docs#testing)
|
|
168
|
-
|
|
169
|
-
### [](#styling)Styling
|
|
170
|
-
|
|
171
|
-
The original CSS framework used for IDS was based on the Stencil library. It was lightly scoped (no shadow DOM) using CSS classes like: `sc-iress-radio-h sc-iress-radio-s`.
|
|
172
|
-
|
|
173
|
-
These classes have been removed from version 5. If you are targeting components using these classes, it will be good for you review if you should adapt the CSS in a different way (ie. using design tokens/CSS variables instead, which should work no matter the class name, or adding custom classes to the IDS components). If targeting elements is still required, the new classes will be formatted as: `.ids-radio-${ids-version}`, and nested elements will use a modified BEM naming convention: `.ids-radio--label-${ids-version}`. The version number will be exposed; you can import it via Javascript, SASS and CSS module values to make future upgrades easier.
|
|
174
|
-
|
|
175
|
-
#### [](#option-1-use-design-tokens-and-custom-classes)Option 1: Use design tokens and custom classes
|
|
176
|
-
|
|
177
|
-
This is the recommended approach. You can use design tokens and custom classes to style the components.
|
|
178
|
-
|
|
179
|
-
\[data-radix-scroll-area-viewport\] {
|
|
180
|
-
scrollbar-width: none;
|
|
181
|
-
-ms-overflow-style: none;
|
|
182
|
-
-webkit-overflow-scrolling: touch;
|
|
183
|
-
}
|
|
184
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
185
|
-
display: none;
|
|
186
|
-
}
|
|
187
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
188
|
-
display: flex;
|
|
189
|
-
flex-direction: column;
|
|
190
|
-
align-items: stretch;
|
|
191
|
-
}
|
|
192
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
193
|
-
flex-grow: 1;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.custom-radio {
|
|
197
|
-
\--iress-text-color: red;
|
|
198
|
-
align-self: center;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
Copy
|
|
202
|
-
|
|
203
|
-
\[data-radix-scroll-area-viewport\] {
|
|
204
|
-
scrollbar-width: none;
|
|
205
|
-
-ms-overflow-style: none;
|
|
206
|
-
-webkit-overflow-scrolling: touch;
|
|
207
|
-
}
|
|
208
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
209
|
-
display: none;
|
|
210
|
-
}
|
|
211
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
212
|
-
display: flex;
|
|
213
|
-
flex-direction: column;
|
|
214
|
-
align-items: stretch;
|
|
215
|
-
}
|
|
216
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
217
|
-
flex-grow: 1;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
<IressRadio className\="custom-radio" />
|
|
221
|
-
|
|
222
|
-
Copy
|
|
223
|
-
|
|
224
|
-
#### [](#option-2-target-the-new-classes)Option 2: Target the new classes
|
|
225
|
-
|
|
226
|
-
This option is **not recommended** and should be used as a last resort, as the class names can change in future, in which case your stylesheet will no longer have any effect. It is recommended to use design tokens or custom classes instead.
|
|
227
|
-
|
|
228
|
-
\[data-radix-scroll-area-viewport\] {
|
|
229
|
-
scrollbar-width: none;
|
|
230
|
-
-ms-overflow-style: none;
|
|
231
|
-
-webkit-overflow-scrolling: touch;
|
|
232
|
-
}
|
|
233
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
234
|
-
display: none;
|
|
235
|
-
}
|
|
236
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
237
|
-
display: flex;
|
|
238
|
-
flex-direction: column;
|
|
239
|
-
align-items: stretch;
|
|
240
|
-
}
|
|
241
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
242
|
-
flex-grow: 1;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
@use '@iress-oss/ids-components/dist/constants/index.scss' as \*;
|
|
246
|
-
.ids-radio-#{$ids-version} {
|
|
247
|
-
align-self: center;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.ids-radio--label-#{$ids-version} {
|
|
251
|
-
color: red;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
Copy
|
|
255
|
-
|
|
256
|
-
### [](#theme-tokens)Theme tokens
|
|
257
|
-
|
|
258
|
-
There are a few token changes that have changed (though this has been relatively minor). The version 5 themes have been updated to use the new design tokens, however if you are using version 4 in parallel with version 5, you may notice that the version 4 styles can no longer find the removed/changed tokens.
|
|
259
|
-
|
|
260
|
-
To fix this issue, please backfill the tokens in your application until you have finished your migration.
|
|
261
|
-
|
|
262
|
-
\[data-radix-scroll-area-viewport\] {
|
|
263
|
-
scrollbar-width: none;
|
|
264
|
-
-ms-overflow-style: none;
|
|
265
|
-
-webkit-overflow-scrolling: touch;
|
|
266
|
-
}
|
|
267
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
268
|
-
display: none;
|
|
269
|
-
}
|
|
270
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
271
|
-
display: flex;
|
|
272
|
-
flex-direction: column;
|
|
273
|
-
align-items: stretch;
|
|
274
|
-
}
|
|
275
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
276
|
-
flex-grow: 1;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/\* TODO: Will be removed once we have moved to IDS version 5 \*/
|
|
280
|
-
/\* Change to the name(s) of the themes you want to back fill. \*/
|
|
281
|
-
.iress-theme-light {
|
|
282
|
-
--iress-alert-error-text-color: var(--iress-alert-danger-text-color);
|
|
283
|
-
--iress-alert-error-background-color: var(
|
|
284
|
-
--iress-alert-danger-background-color
|
|
285
|
-
);
|
|
286
|
-
--iress-alert-error-border-color: var(--iress-alert-danger-border-color);
|
|
287
|
-
--iress-alert-error-heading-icon-text-color: var(
|
|
288
|
-
--iress-alert-danger-heading-icon-text-color
|
|
289
|
-
);
|
|
290
|
-
|
|
291
|
-
--iress-button-margin-right: var(--iress-g-spacing-xs);
|
|
292
|
-
|
|
293
|
-
--iress-combobox-option-meta-font-weight: var(
|
|
294
|
-
--iress-a-muted-font-weight,
|
|
295
|
-
var(--iress-g-font-weight, normal)
|
|
296
|
-
);
|
|
297
|
-
--iress-combobox-option-meta-text-color: var(
|
|
298
|
-
--iress-g-muted-text-color,
|
|
299
|
-
var(--iress-default-text-color--light)
|
|
300
|
-
);
|
|
301
|
-
|
|
302
|
-
--iress-filter-option-meta-font-weight: var(
|
|
303
|
-
--iress-a-muted-font-weight,
|
|
304
|
-
var(--iress-g-font-weight, normal)
|
|
305
|
-
);
|
|
306
|
-
--iress-filter-option-meta-text-color: var(
|
|
307
|
-
--iress-g-muted-text-color,
|
|
308
|
-
var(--iress-default-text-color--light)
|
|
309
|
-
);
|
|
310
|
-
|
|
311
|
-
--iress-form-field-margin-bottom: var(
|
|
312
|
-
--iress-a-vertical-spacing-lg,
|
|
313
|
-
var(--iress-g-spacing-lg)
|
|
314
|
-
);
|
|
315
|
-
|
|
316
|
-
--iress-table-cell-buy-text-color: var(
|
|
317
|
-
--iress-table-cell-positive-text-color
|
|
318
|
-
);
|
|
319
|
-
--iress-table-cell-sell-text-color: var(
|
|
320
|
-
--iress-table-cell-negative-text-color
|
|
321
|
-
);
|
|
322
|
-
--iress-table-cell-selected-buy-text-color: var(
|
|
323
|
-
--iress-table-cell-selected-positive-text-color
|
|
324
|
-
);
|
|
325
|
-
--iress-table-cell-selected-sell-text-color: var(
|
|
326
|
-
--iress-table-cell-selected-negative-text-color
|
|
327
|
-
);
|
|
328
|
-
|
|
329
|
-
--iress-validation-message-error-text-color: var(
|
|
330
|
-
--iress-validation-message-danger-text-color
|
|
331
|
-
);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
Copy
|
|
335
|
-
|
|
336
|
-
[](#ag-grid-theme)AG grid theme
|
|
337
|
-
-------------------------------
|
|
338
|
-
|
|
339
|
-
As of version 5, we only support the lite AG grid theme, which is used in conjunction with the default alpine theme. In version 5, its imports have changed slightly.
|
|
340
|
-
|
|
341
|
-
Run the following command to install the AG grid lite theme:
|
|
342
|
-
|
|
343
|
-
\[data-radix-scroll-area-viewport\] {
|
|
344
|
-
scrollbar-width: none;
|
|
345
|
-
-ms-overflow-style: none;
|
|
346
|
-
-webkit-overflow-scrolling: touch;
|
|
347
|
-
}
|
|
348
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
349
|
-
display: none;
|
|
350
|
-
}
|
|
351
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
352
|
-
display: flex;
|
|
353
|
-
flex-direction: column;
|
|
354
|
-
align-items: stretch;
|
|
355
|
-
}
|
|
356
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
357
|
-
flex-grow: 1;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
yarn add @iress/ag-grid-theme@^5.0.0
|
|
361
|
-
|
|
362
|
-
Copy
|
|
363
|
-
|
|
364
|
-
Then you can import the AG Grid theme CSS, import the relevant IDS theme, and hook up the styles by setting a class of ag-theme-alpine ag-theme-iress-lite on your grid wrapper.
|
|
365
|
-
|
|
366
|
-
Mode
|
|
367
|
-
|
|
368
|
-
DiffOldNew
|
|
369
|
-
|
|
370
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">import "@iress/themes/build/css/iress-theme-dark.css";</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import "@iress/themes/global.css";</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">import 'ag-grid-community/styles/ag-grid.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">import 'ag-grid-community/styles/ag-theme-alpine.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import '@iress/ag-grid-theme/dist/lite/css/all.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">import '@iress/ag-grid-theme/dist/ag-theme-iress-lite.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">// You can also include variables, styles and utilities separately for easy debugging</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/lite/css/variables.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/css/variables.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/lite/css/styles.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/css/styles.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/lite/css/utilities.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">// import '@iress/ag-grid-theme/dist/css/utilities.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-10regm7-empty-line"><pre></pre></td><td class="css-vl0irh-content css-10regm7-empty-line"><pre class="css-o1u8iu-content-text"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"><div className="ag-theme-alpine ag-theme-iress-lite"></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"> <AgGridReact /></pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text"></div></pre></td></tr></tbody></table>
|
|
371
|
-
|
|
372
|
-
[](#removing-version-4)Removing version 4
|
|
373
|
-
-----------------------------------------
|
|
374
|
-
|
|
375
|
-
Version 5 and version 4 can be run in parallel, but it is recommended to remove version 4 to avoid any conflicts once you have completely migrated over your components.
|
|
376
|
-
|
|
377
|
-
Run the following to remove version 4 and its related packages:
|
|
378
|
-
|
|
379
|
-
\[data-radix-scroll-area-viewport\] {
|
|
380
|
-
scrollbar-width: none;
|
|
381
|
-
-ms-overflow-style: none;
|
|
382
|
-
-webkit-overflow-scrolling: touch;
|
|
383
|
-
}
|
|
384
|
-
\[data-radix-scroll-area-viewport\]::-webkit-scrollbar {
|
|
385
|
-
display: none;
|
|
386
|
-
}
|
|
387
|
-
:where(\[data-radix-scroll-area-viewport\]) {
|
|
388
|
-
display: flex;
|
|
389
|
-
flex-direction: column;
|
|
390
|
-
align-items: stretch;
|
|
391
|
-
}
|
|
392
|
-
:where(\[data-radix-scroll-area-content\]) {
|
|
393
|
-
flex-grow: 1;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
yarn remove @iress/components @iress/components-react @iress/components-react-custom-elements @iress/ids-react-test-utils
|
|
397
|
-
|
|
398
|
-
Copy
|
|
399
|
-
|
|
400
|
-
### [](#remove-globalcss)Remove `global.css`
|
|
401
|
-
|
|
402
|
-
The `global.css` file has been removed, it is now recommended to include the Roboto font directly using Google Fonts.
|
|
403
|
-
|
|
404
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import '@iress/themes/global.css';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"><link</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;700&display=swap"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> rel="stylesheet"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text">/></pre></td></tr></tbody></table>
|
|
405
|
-
|
|
406
|
-
### [](#remove-from-jest-configuration)Remove from Jest configuration
|
|
407
|
-
|
|
408
|
-
If you are using Jest, you will need to update your Jest configuration to remove the old IDS packages from your `transformIgnorePatterns`.
|
|
409
|
-
|
|
410
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">"transformIgnorePatterns": [</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> "node_modules/(?!(@iress/components-react|@iress/components|@iress/components-react-custom-elements|@stencil/core)/)"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-cnnxkz-diff-added"><pre>+</pre></td><td class="css-vl0irh-content css-cnnxkz-diff-added"><pre class="css-o1u8iu-content-text"> "/node_modules/(?!@iress-oss/ids-components)"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker"><pre></pre></td><td class="css-vl0irh-content"><pre class="css-o1u8iu-content-text">]</pre></td></tr></tbody></table>
|
|
411
|
-
|
|
412
|
-
You can also remove the `mockLazyLoadedComponents` function from your Jest setup.
|
|
413
|
-
|
|
414
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">import { mockLazyLoadedComponents } from '@iress/ids-react-test-utils/dist/react-test-utils/src/mocks/mockLazyLoadedComponents';</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">mockLazyLoadedComponents();</pre></td></tr></tbody></table>
|
|
415
|
-
|
|
416
|
-
You should also be able to remove the style mocks from your Jest configuration's `moduleNameMapper`, unless you are using CSS-in-JS, as IDS no longer injects CSS into the DOM.
|
|
417
|
-
|
|
418
|
-
<table class="css-1n5o7vh-diff-container"><tbody><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">"moduleNameMapper": {</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text"> "\.css$": "<rootDir>/PATH/TO/style-mock.ts"</pre></td></tr><tr class="css-1n7ec1i-line"><td class="css-17vezug-marker css-rq9a2a-diff-removed"><pre>-</pre></td><td class="css-vl0irh-content css-rq9a2a-diff-removed"><pre class="css-o1u8iu-content-text">}</pre></td></tr></tbody></table>
|
|
419
|
-
|
|
420
|
-
On this page
|
|
421
|
-
|
|
422
|
-
* [Updating your dependencies](#updating-your-dependencies)
|
|
423
|
-
* [Upgrade IDS and themes](#upgrade-ids-and-themes)
|
|
424
|
-
* [Upgrade React](#upgrade-react)
|
|
425
|
-
* [Updating imports](#updating-imports)
|
|
426
|
-
* [Changing components](#changing-components)
|
|
427
|
-
* [Importing component styles](#importing-component-styles)
|
|
428
|
-
* [Update Jest configuration](#update-jest-configuration)
|
|
429
|
-
* [Handling breaking changes](#handling-breaking-changes)
|
|
430
|
-
* [Components](#components)
|
|
431
|
-
* [Testing](#testing)
|
|
432
|
-
* [Styling](#styling)
|
|
433
|
-
* [Theme tokens](#theme-tokens)
|
|
434
|
-
* [AG grid theme](#ag-grid-theme)
|
|
435
|
-
* [Removing version 4](#removing-version-4)
|
|
436
|
-
* [Remove global.css](#remove-globalcss)
|
|
437
|
-
* [Remove from Jest configuration](#remove-from-jest-configuration)
|