@open-pioneer/react-utils 4.8.0 → 4.9.0-dev.20260930055642
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 +52 -50
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @open-pioneer/react-utils
|
|
2
2
|
|
|
3
|
+
## 4.9.0-dev.20260930055642
|
|
4
|
+
|
|
3
5
|
## 4.8.0
|
|
4
6
|
|
|
5
7
|
### Minor Changes
|
|
@@ -29,23 +31,23 @@
|
|
|
29
31
|
These components render translated messages using `intl.formatMessage` / `intl.formatRichMessage`
|
|
30
32
|
and support reactive changes of the `intl` property.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
Example:
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
```tsx
|
|
37
|
+
// currentIntl can be a signal
|
|
38
|
+
<FormattedMessage intl={currentIntl} id="message.id" />
|
|
39
|
+
```
|
|
38
40
|
|
|
39
41
|
- 27f5f1e: Add a new `classnames` function to replace the `classnames` package.
|
|
40
42
|
- 4b207f4: Added a `required` option to `useHeadingLevel` hook to make it return `undefined` instead of throwing an error when used outside of a `TitledSection`.
|
|
41
43
|
|
|
42
|
-
|
|
44
|
+
This allows to use the hook in components which do not necessarily need to be used inside a `TitledSection`.
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
```tsx
|
|
47
|
+
const currentHeading: number | undefined = useHeadingLevel({
|
|
48
|
+
required: false,
|
|
49
|
+
});
|
|
50
|
+
```
|
|
49
51
|
|
|
50
52
|
## 4.5.0
|
|
51
53
|
|
|
@@ -55,20 +57,20 @@
|
|
|
55
57
|
- d523ade: Add more properties to the `CommonComponentProps` interface.
|
|
56
58
|
Previously, trails components only allowed customizing the `className`.
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
Now, these additional properties are supported:
|
|
61
|
+
- `role`: the ARIA role
|
|
62
|
+
- `aria-*`: arbitrary ARIA attributes
|
|
63
|
+
- `data-*`: arbitrary JavaScript values
|
|
64
|
+
- `css`: additional Chakra style rules
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
NOTE: Defining these values may overwrite existing behavior of a component if values cannot be merged.
|
|
67
|
+
For example, overriding an existing `data-` property may break a component.
|
|
66
68
|
|
|
67
69
|
- d523ade: Implement `mergeChakraProps` helper to merge multiple props objects.
|
|
68
70
|
- 604a589: Provide an implementation of the roving tab index pattern for menus ("Roving Menu").
|
|
69
71
|
This roving menu can be used to implement accessible menus with support for keyboard navigation.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
- Supports plain menus (e.g. toolbars, sidebars, ...)
|
|
73
|
+
- Supports simple cases of nesting (horizontal menu in vertical menu, or the other way around)
|
|
72
74
|
|
|
73
75
|
## 4.4.0
|
|
74
76
|
|
|
@@ -112,22 +114,22 @@
|
|
|
112
114
|
- a5177fc: Allow using `SectionHeading` in the children of a `TitledSection` instead of the `title` prop.
|
|
113
115
|
This is more flexible and more readable compared to complex components in the `title` prop.
|
|
114
116
|
|
|
115
|
-
|
|
117
|
+
For example:
|
|
116
118
|
|
|
117
|
-
|
|
119
|
+
```jsx
|
|
120
|
+
<TitledSection>
|
|
121
|
+
<SectionHeading>Top level heading (H1)</SectionHeading>
|
|
122
|
+
.. Some Content ..
|
|
118
123
|
<TitledSection>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<SectionHeading>Other Heading (H2)</SectionHeading>
|
|
124
|
-
</Box>
|
|
125
|
-
.. More Content ..
|
|
126
|
-
</TitledSection>
|
|
124
|
+
<Box backgroundColor="green.500">
|
|
125
|
+
<SectionHeading>Other Heading (H2)</SectionHeading>
|
|
126
|
+
</Box>
|
|
127
|
+
.. More Content ..
|
|
127
128
|
</TitledSection>
|
|
128
|
-
|
|
129
|
+
</TitledSection>
|
|
130
|
+
```
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
Note that you should be using exactly one `<SectionHeading />` for each `<TitledSection />`.
|
|
131
133
|
|
|
132
134
|
### Patch Changes
|
|
133
135
|
|
|
@@ -147,13 +149,13 @@
|
|
|
147
149
|
### Major Changes
|
|
148
150
|
|
|
149
151
|
- 9477e54: Update dependencies
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
- React 19
|
|
153
|
+
- Vite 6
|
|
154
|
+
- FormatJS 3
|
|
155
|
+
- Open Pioneer Build Tools
|
|
156
|
+
- ...
|
|
155
157
|
|
|
156
|
-
|
|
158
|
+
For more details, see https://github.com/open-pioneer/trails-core-packages/pull/81
|
|
157
159
|
|
|
158
160
|
## 2.4.0
|
|
159
161
|
|
|
@@ -187,14 +189,14 @@
|
|
|
187
189
|
|
|
188
190
|
- a208b32: **Breaking:** Removed the `ToolButton` component; it has moved to `@open-pioneer/map-ui-components`.
|
|
189
191
|
|
|
190
|
-
|
|
192
|
+
If you were previously using the `ToolButton` in your app, you need to update your import statements when updating to this version:
|
|
191
193
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
```diff
|
|
195
|
+
- import { ToolButton } from "@open-pioneer/react-utils";
|
|
196
|
+
+ import { ToolButton } from "@open-pioneer/map-ui-components";
|
|
197
|
+
```
|
|
196
198
|
|
|
197
|
-
|
|
199
|
+
You need to update your `package.json` as well to refer to the `map-ui-components` package.
|
|
198
200
|
|
|
199
201
|
### Minor Changes
|
|
200
202
|
|
|
@@ -210,13 +212,13 @@
|
|
|
210
212
|
- 2c092dc: Update dependencies
|
|
211
213
|
- 4140646: Add `sectionHeadingProps` to configure the generated `<SectionHeading>` if `title` is a string.
|
|
212
214
|
|
|
213
|
-
|
|
215
|
+
For example:
|
|
214
216
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
```tsx
|
|
218
|
+
<TitledSection title="some title" sectionHeadingProps={{ size: "lg" }}>
|
|
219
|
+
... Titled content ...
|
|
220
|
+
</TitledSection>
|
|
221
|
+
```
|
|
220
222
|
|
|
221
223
|
## 0.2.2
|
|
222
224
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/react-utils",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.9.0-dev.20260930055642",
|
|
5
5
|
"description": "Contains common react utilities used by the open pioneer trails project",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@chakra-ui/react": "^3.37.0",
|
|
18
18
|
"@conterra/reactivity-core": "^0.8.8",
|
|
19
|
-
"@open-pioneer/core": "4.
|
|
20
|
-
"@open-pioneer/reactivity": "4.
|
|
19
|
+
"@open-pioneer/core": "4.9.0-dev.20260930055642",
|
|
20
|
+
"@open-pioneer/reactivity": "4.9.0-dev.20260930055642",
|
|
21
21
|
"react": "^19.3.0"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|