@open-pioneer/react-utils 1.0.0 → 2.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/CHANGELOG.md +22 -0
- package/README.md +6 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @open-pioneer/react-utils
|
|
2
2
|
|
|
3
|
+
## 2.2.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 39dad46: Switch to a new versioning strategy.
|
|
8
|
+
From now on, packages released by this repository share a common version number.
|
|
9
|
+
- Updated dependencies [39dad46]
|
|
10
|
+
- @open-pioneer/chakra-integration@2.2.0
|
|
11
|
+
- @open-pioneer/core@2.2.0
|
|
12
|
+
|
|
13
|
+
## 1.0.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 5c62522: Update wording and harmonize structure
|
|
18
|
+
- e0b2fae: Update dependencies
|
|
19
|
+
- Updated dependencies [5c62522]
|
|
20
|
+
- Updated dependencies [50550d3]
|
|
21
|
+
- Updated dependencies [e0b2fae]
|
|
22
|
+
- @open-pioneer/chakra-integration@1.1.4
|
|
23
|
+
- @open-pioneer/core@1.3.0
|
|
24
|
+
|
|
3
25
|
## 1.0.0
|
|
4
26
|
|
|
5
27
|
### Major Changes
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
This package provides React utilities that help a developer create applications.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Titled sections
|
|
6
8
|
|
|
7
9
|
Use the `<TitledSection>` and `<SectionHeading>` components instead of raw `hX` HTML tags (such as `<h1>` or `<h2>`).
|
|
8
10
|
This way, the appropriate heading level is determined automatically.
|
|
@@ -41,9 +43,9 @@ Example:
|
|
|
41
43
|
In the preceding example the topmost heading(s) in `TheRestOfYourApplication` start at level 2, and nested headings use increasing levels as usual.
|
|
42
44
|
For more details, see the API documentation.
|
|
43
45
|
|
|
44
|
-
|
|
46
|
+
### Hooks
|
|
45
47
|
|
|
46
|
-
|
|
48
|
+
#### useCommonComponentProps()
|
|
47
49
|
|
|
48
50
|
A helper hook that automatically computes `containerProps`: common properties to set on the topmost container element of a public component.
|
|
49
51
|
|
|
@@ -76,7 +78,7 @@ export const InitialExtent: FC<InitialExtentProps> = forwardRef(function Initial
|
|
|
76
78
|
});
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
#### useEvent()
|
|
80
82
|
|
|
81
83
|
The `useEvent` can be used to obtain a stable event handler function with changing implementation.
|
|
82
84
|
This is useful to avoid re-triggering `useEffect`-hooks when only the event handler changed.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/react-utils",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"description": "Contains common react utilities used by the open pioneer trails project",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"directory": "src/packages/react-utils"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"react": "^18.3.1",
|
|
18
17
|
"classnames": "^2.3.2",
|
|
19
|
-
"
|
|
20
|
-
"@open-pioneer/chakra-integration": "^
|
|
18
|
+
"react": "^18.3.1",
|
|
19
|
+
"@open-pioneer/chakra-integration": "^2.2.0",
|
|
20
|
+
"@open-pioneer/core": "^2.2.0"
|
|
21
21
|
},
|
|
22
22
|
"exports": {
|
|
23
23
|
"./package.json": "./package.json",
|