@itwin/core-react 5.27.0 → 5.28.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@use "sass:meta";
|
|
5
6
|
@use "sass:map";
|
|
6
7
|
|
|
7
8
|
@forward "../style/themecolors";
|
|
@@ -17,7 +18,9 @@
|
|
|
17
18
|
small: var(--iui-font-size-0),
|
|
18
19
|
);
|
|
19
20
|
|
|
20
|
-
$type: if(
|
|
21
|
+
$type: if(
|
|
22
|
+
sass(map.has-key($sizes, $type)): $type; else: body,
|
|
23
|
+
);
|
|
21
24
|
|
|
22
25
|
font-size: map.get($sizes, $type);
|
|
23
26
|
font-weight: var(--iui-font-weight-normal);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@use "sass:meta";
|
|
5
6
|
@use "sass:map";
|
|
6
7
|
|
|
7
8
|
@forward "../style/themecolors";
|
|
@@ -17,7 +18,9 @@
|
|
|
17
18
|
small: var(--iui-font-size-0),
|
|
18
19
|
);
|
|
19
20
|
|
|
20
|
-
$type: if(
|
|
21
|
+
$type: if(
|
|
22
|
+
sass(map.has-key($sizes, $type)): $type; else: body,
|
|
23
|
+
);
|
|
21
24
|
|
|
22
25
|
font-size: map.get($sizes, $type);
|
|
23
26
|
font-weight: var(--iui-font-weight-normal);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
3
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
4
|
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
@use "sass:meta";
|
|
5
6
|
@use "sass:map";
|
|
6
7
|
|
|
7
8
|
@forward "../style/themecolors";
|
|
@@ -17,7 +18,9 @@
|
|
|
17
18
|
small: var(--iui-font-size-0),
|
|
18
19
|
);
|
|
19
20
|
|
|
20
|
-
$type: if(
|
|
21
|
+
$type: if(
|
|
22
|
+
sass(map.has-key($sizes, $type)): $type; else: body,
|
|
23
|
+
);
|
|
21
24
|
|
|
22
25
|
font-size: map.get($sizes, $type);
|
|
23
26
|
font-weight: var(--iui-font-weight-normal);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-react",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.0",
|
|
4
4
|
"description": "A react component library of iTwin.js UI general purpose components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./lib/core-react.d.ts",
|
|
@@ -44,61 +44,64 @@
|
|
|
44
44
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@itwin/appui-abstract": "^5.1
|
|
48
|
-
"@itwin/build-tools": "^5.
|
|
49
|
-
"@itwin/core-bentley": "^5.1
|
|
50
|
-
"@itwin/core-common": "^5.1
|
|
51
|
-
"@itwin/core-geometry": "^5.1
|
|
52
|
-
"@itwin/core-i18n": "^5.1
|
|
47
|
+
"@itwin/appui-abstract": "^5.8.1",
|
|
48
|
+
"@itwin/build-tools": "^5.8.1",
|
|
49
|
+
"@itwin/core-bentley": "^5.8.1",
|
|
50
|
+
"@itwin/core-common": "^5.8.1",
|
|
51
|
+
"@itwin/core-geometry": "^5.8.1",
|
|
52
|
+
"@itwin/core-i18n": "^5.8.1",
|
|
53
53
|
"@itwin/eslint-plugin": "^6.0.0",
|
|
54
|
-
"@itwin/itwinui-react": "^3.20.
|
|
54
|
+
"@itwin/itwinui-react": "^3.20.2",
|
|
55
55
|
"@testing-library/dom": "^10.4.1",
|
|
56
|
-
"@testing-library/react": "^16.3.
|
|
56
|
+
"@testing-library/react": "^16.3.2",
|
|
57
57
|
"@testing-library/user-event": "^14.6.1",
|
|
58
|
-
"@types/lodash": "^4.17.
|
|
59
|
-
"@types/react": "^19.2.
|
|
58
|
+
"@types/lodash": "^4.17.24",
|
|
59
|
+
"@types/react": "^19.2.14",
|
|
60
60
|
"@types/react-autosuggest": "10.1.2",
|
|
61
61
|
"@types/react-dom": "^19.2.3",
|
|
62
|
-
"@vitest/coverage-v8": "^3.
|
|
63
|
-
"cpx2": "^3.0.
|
|
64
|
-
"cross-env": "^5.1
|
|
65
|
-
"eslint": "^9.39.
|
|
62
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
63
|
+
"cpx2": "^3.0.2",
|
|
64
|
+
"cross-env": "^5.2.1",
|
|
65
|
+
"eslint": "^9.39.4",
|
|
66
66
|
"eslint-config-prettier": "^10.1.8",
|
|
67
67
|
"ignore-styles": "^5.0.1",
|
|
68
|
-
"jsdom": "^24.
|
|
68
|
+
"jsdom": "^24.1.3",
|
|
69
69
|
"npm-run-all": "^4.1.5",
|
|
70
|
-
"raf": "^3.4.
|
|
71
|
-
"react": "^19.2.
|
|
72
|
-
"react-dom": "^19.2.
|
|
73
|
-
"rimraf": "^6.1.
|
|
70
|
+
"raf": "^3.4.1",
|
|
71
|
+
"react": "^19.2.5",
|
|
72
|
+
"react-dom": "^19.2.5",
|
|
73
|
+
"rimraf": "^6.1.3",
|
|
74
74
|
"typemoq": "^2.1.0",
|
|
75
|
-
"typescript": "~5.6.
|
|
75
|
+
"typescript": "~5.6.3",
|
|
76
76
|
"upath": "^2.0.1",
|
|
77
77
|
"vitest": "^3.2.4"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@itwin/itwinui-icons-react": "^2.
|
|
80
|
+
"@itwin/itwinui-icons-react": "^2.11.0",
|
|
81
81
|
"classnames": "2.5.1",
|
|
82
|
-
"dompurify": "^3.3.
|
|
83
|
-
"lodash": "^4.
|
|
82
|
+
"dompurify": "^3.3.3",
|
|
83
|
+
"lodash": "^4.18.1",
|
|
84
84
|
"react-autosuggest": "^10.1.0",
|
|
85
|
-
"ts-key-enum": "~2.0.
|
|
85
|
+
"ts-key-enum": "~2.0.13"
|
|
86
86
|
},
|
|
87
87
|
"scripts": {
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"compat:cjs": "cpx \"./src/**/*.{*css,svg}\" ./lib/cjs",
|
|
94
|
-
"compat:esm": "cpx \"./src/**/*.{*css,svg}\" ./lib/esm",
|
|
88
|
+
"dev": "pnpm \"/^dev:.*/\"",
|
|
89
|
+
"dev:css": "pnpm build:css -w",
|
|
90
|
+
"dev:locale": "pnpm build:locale -w",
|
|
91
|
+
"dev:tsc": "tsc -w --preserveWatchOutput",
|
|
92
|
+
"build": "pnpm \"/^build:.*/\"",
|
|
93
|
+
"build:compat:cjs": "cpx \"./src/**/*.{*css,svg}\" ./lib/cjs",
|
|
94
|
+
"build:compat:esm": "cpx \"./src/**/*.{*css,svg}\" ./lib/esm",
|
|
95
|
+
"build:locale": "cpx ./src/core-react/UiCore.json ./lib/public/locales/en",
|
|
96
|
+
"build:css": "cpx \"./src/**/*.{*css,svg}\" ./lib",
|
|
97
|
+
"build:tsc": "tsc",
|
|
95
98
|
"clean": "rimraf -g lib",
|
|
96
99
|
"cover": "vitest run --coverage",
|
|
97
100
|
"lint": "eslint \"./src/**/*.{ts,tsx}\"",
|
|
98
|
-
"lint:fix": "
|
|
101
|
+
"lint:fix": "pnpm lint --fix",
|
|
99
102
|
"extract-api": "betools extract-api --entry=./lib/core-react --apiReportFolder=../../common/api --apiReportTempFolder=../../common/temp/api --apiSummaryFolder=../../common/api/summary",
|
|
100
103
|
"test": "vitest",
|
|
101
|
-
"docs": "
|
|
104
|
+
"docs": "pnpm \"/^docs:.*/\"",
|
|
102
105
|
"docs:changelog": "cpx ./CHANGELOG.md ../../generated-docs/reference/core-react",
|
|
103
106
|
"docs:reference": "cross-env NODE_PROJECT_ROOT_DIRECTORY=../../ betools docs --includes=../../generated-docs/extract --json=../../generated-docs/reference/core-react/file.json --tsIndexFile=./core-react.ts --onlyJson"
|
|
104
107
|
}
|
package/ContributeGuidelines.md
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
# Guidelines for Contributing to iTwin.js UI Source Code
|
|
2
|
-
|
|
3
|
-
Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
|
|
4
|
-
|
|
5
|
-
## Description
|
|
6
|
-
|
|
7
|
-
In order to maintain consistency in the iTwin.js UI source code, please abide by the following guidelines for classes and React components.
|
|
8
|
-
|
|
9
|
-
## Guidelines
|
|
10
|
-
|
|
11
|
-
- Include a copyright notice at the top of **all** TypeScript and CSS/Sass files. The copyright notice comment should be similar to the following:
|
|
12
|
-
|
|
13
|
-
```typescript
|
|
14
|
-
/*---------------------------------------------------------------------------------------------
|
|
15
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
16
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
17
|
-
*--------------------------------------------------------------------------------------------*/
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- Document **all** exported classes, interfaces, enums, types, etc.
|
|
21
|
-
- Add release tags (`@public`, `@beta`, `@alpha` or `@internal`) to all exported classes, interfaces, enums, types, etc. For more information on release tags, see [Release Tags](https://www.itwinjs.org/learning/guidelines/release-tags-guidelines/).
|
|
22
|
-
- In addition, it’s preferable that all \*Props interface members and component public methods be documented. You can put `@internal` on React lifecycle and render methods.
|
|
23
|
-
- Add a,
|
|
24
|
-
|
|
25
|
-
```ts
|
|
26
|
-
/** @packageDocumentation
|
|
27
|
-
* @module xyz
|
|
28
|
-
*/
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
comment to the top of the TypeScript file for the documentation module. An existing documentation module will often be appropriate to use. However, if you need to add a documentation module, see additional guidelines below. Example of `@module` comment:
|
|
32
|
-
|
|
33
|
-
```ts
|
|
34
|
-
/** @packageDocumentation
|
|
35
|
-
* @module Button
|
|
36
|
-
*/
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
- Use the theme colors (e.g. $buic-text-color, $buic-background-control, $buic-background-widget, etc.). These are located in `appui/ui/core-react/src/core-react/style/themecolors.scss`. Please do **not** use $uicore-text-color, $uicore-black, $uicore-white, $uicore-gray\*, etc.)
|
|
40
|
-
- Include an appropriate prefix on CSS class names to prevent class name clashes (e.g. `uifw-` in appui-react, `core-` in core-react, `components-` in components-react)
|
|
41
|
-
- Add an export for the component to the barrel file of the package (e.g. appui-react.ts, components-react.ts, core-react.ts). Example:
|
|
42
|
-
|
|
43
|
-
```typescript
|
|
44
|
-
export * from "./core-react/badge/Badge";
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
- Localize all strings to be seen by the user and use `useTranslation` hook to get the localized string. Please do **not** use hard-coded strings. The translatable strings should be in a JSON file in the `src/{package-name}/{Package}.json` of the repository. Example:
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
. . .
|
|
52
|
-
"dialog": {
|
|
53
|
-
"ok": "OK",
|
|
54
|
-
. . .
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
buttonText = useTranslation("dialog.ok");
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
- Run `npm run extract-api` to update the `*api.md` file for the package
|
|
64
|
-
- Write unit tests for the new component or class. The tests should cover as many code statements, branches, functions and lines as possible (100% is the goal). To run the tests, run `npm run test` or `pnpm test`. To run coverage, run `npm run cover`. To see the coverage report, open the report from one of the following directories in your browser:
|
|
65
|
-
- appui/ui/appui-react/lib/test/coverage/lcov-report/index.html
|
|
66
|
-
- appui/ui/components-react/lib/test/coverage/lcov-report/index.html
|
|
67
|
-
- appui/ui/core-react/lib/test/coverage/lcov-report/index.html
|
|
68
|
-
- appui/ui/imodel-components-react/lib/test/coverage/lcov-report/index.html
|
|
69
|
-
|
|
70
|
-
## New Documentation Module
|
|
71
|
-
|
|
72
|
-
If the component’s documentation @module is new, please follow these guidelines:
|
|
73
|
-
|
|
74
|
-
- Add a `@docs-group-description` comment to the barrel file of the package. Example:
|
|
75
|
-
|
|
76
|
-
```js
|
|
77
|
-
/**
|
|
78
|
-
* @docs-group-description Button
|
|
79
|
-
* Classes for working with various Buttons.
|
|
80
|
-
*/
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
Note: The following steps are in [itwinjs-core](https://github.com/itwin/itwinjs-core) repository, NOT in the appui repository:
|
|
84
|
-
|
|
85
|
-
- Add the module to the itwinjs-core/docs/ui/reference/leftNav.md file in alphabetical order. Example:
|
|
86
|
-
|
|
87
|
-
```md
|
|
88
|
-
- [Button]($core:Button)
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
- Add the module to the appropriate `index.md` in the Learning section (e.g. itwinjs-core/docs/ui/learning/components/index.md or itwinjs-core/docs/ui/learning/core/index.md). Example:
|
|
92
|
-
|
|
93
|
-
```md
|
|
94
|
-
- [Button](./Button.md)
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
- Add a markdown file in the same folder as the `index.md` above (e.g. itwinjs-core/docs/ui/learning/components/Timeline.md)
|
|
98
|
-
- Add learning content and an example usage to the new markdown file
|