@synergy-design-system/react 2.18.8 → 2.19.1
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 +18 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,9 +11,17 @@ This package aims for an improved UX when used in React applications:
|
|
|
11
11
|
> For those react versions, this package can be used by loading custom types,
|
|
12
12
|
> you **do not need to use the exported components** anymore.
|
|
13
13
|
|
|
14
|
+
## Known issues and limitations
|
|
15
|
+
|
|
16
|
+
Got any problems using our React wrappers? Currently there are no known issues relating to them. But please take a look at [our list of known issues and limitations of the web components](https://synergy-design-system.github.io/?path=/docs/limitations-known-issues-and-limitations--docs) before [creating a ticket](https://github.com/synergy-design-system/synergy-design-system/issues/new?assignees=&labels=&projects=&template=generic-bug.md&title=fix%3A+%F0%9F%90%9B+), maybe you can find your problem there.
|
|
17
|
+
|
|
14
18
|
## Getting started
|
|
15
19
|
|
|
16
|
-
### 1.
|
|
20
|
+
### 1. Usage example
|
|
21
|
+
|
|
22
|
+
If you want to see a usage example, please check out our [test React repository](https://github.com/synergy-design-system/synergy-design-system/tree/main/packages/_private/react-demo).
|
|
23
|
+
|
|
24
|
+
### 2. Package installation
|
|
17
25
|
|
|
18
26
|
Run the following steps to install the required packages.
|
|
19
27
|
|
|
@@ -34,9 +42,9 @@ npm install --save @synergy-design-system/assets
|
|
|
34
42
|
> ⚠️ Note we do **not** ship React in this package.
|
|
35
43
|
> You will have to install React by yourself first!
|
|
36
44
|
|
|
37
|
-
###
|
|
45
|
+
### 3. Load the desired theme (required) and utility classes (recommended)
|
|
38
46
|
|
|
39
|
-
The components will not display correctly without the needed theme. Please include either light or dark theme in your application, for example in a newly installed React application:
|
|
47
|
+
The components will not display correctly without the needed theme and utility classes. Please include either light or dark theme in your application, for example in a newly installed React application:
|
|
40
48
|
|
|
41
49
|
```tsx
|
|
42
50
|
// main.tsx
|
|
@@ -58,7 +66,7 @@ createRoot(document.getElementById("root")!).render(
|
|
|
58
66
|
);
|
|
59
67
|
```
|
|
60
68
|
|
|
61
|
-
###
|
|
69
|
+
### 4. Using native Synergy components in react (only for react >= 19.0.0) in Typescript projects
|
|
62
70
|
|
|
63
71
|
React@19 finally shipped with official support for web components.
|
|
64
72
|
With this version of react, you are free to **use our native web components** directly in your application.
|
|
@@ -93,7 +101,7 @@ export const MyInput = () => (
|
|
|
93
101
|
);
|
|
94
102
|
```
|
|
95
103
|
|
|
96
|
-
####
|
|
104
|
+
#### 4.1. Migrating from synergies react wrappers to native components
|
|
97
105
|
|
|
98
106
|
1. First make sure you have react@19 or higher installed in your project.
|
|
99
107
|
2. Upgrade `@synergy-design-system/react` to the latest version.
|
|
@@ -104,7 +112,7 @@ export const MyInput = () => (
|
|
|
104
112
|
|
|
105
113
|
---
|
|
106
114
|
|
|
107
|
-
###
|
|
115
|
+
### 5. Using the lit wrappers (required for react < 19.0.0, optional for react >= 19.0.0)
|
|
108
116
|
|
|
109
117
|
You may now use the components by importing them from the `@synergy-design-system/react` package and rendering them in a React component.
|
|
110
118
|
|
|
@@ -117,7 +125,7 @@ export const MyInput = () => (
|
|
|
117
125
|
);
|
|
118
126
|
```
|
|
119
127
|
|
|
120
|
-
###
|
|
128
|
+
### 6. Usage of the components
|
|
121
129
|
|
|
122
130
|
All information about which components exist as well as the available properties, events and usage of a component, can be found at `components` in our [documentation](https://synergy-design-system.github.io/?path=/docs/components).
|
|
123
131
|
The documentation is written for no specific web framework but only vanilla html and javascript.
|
|
@@ -137,7 +145,7 @@ The naming of the components for React changes from kebab-case to PascalCase.
|
|
|
137
145
|
<SynButton> My Button </SynButton>
|
|
138
146
|
```
|
|
139
147
|
|
|
140
|
-
###
|
|
148
|
+
### 7. Usage of attributes
|
|
141
149
|
|
|
142
150
|
The attribute namings of the components are the same as in the documentation.
|
|
143
151
|
|
|
@@ -159,7 +167,7 @@ The attribute namings of the components are the same as in the documentation.
|
|
|
159
167
|
/>
|
|
160
168
|
```
|
|
161
169
|
|
|
162
|
-
###
|
|
170
|
+
### 8. Usage of events
|
|
163
171
|
|
|
164
172
|
Custom events are named in the documentation as following: `syn-change`, `syn-clear`, ...
|
|
165
173
|
|
|
@@ -209,7 +217,7 @@ export const MyComponent = () => (
|
|
|
209
217
|
);
|
|
210
218
|
```
|
|
211
219
|
|
|
212
|
-
###
|
|
220
|
+
### 9. Usage of methods
|
|
213
221
|
|
|
214
222
|
Components can have methods (like `focus`, `click`, `stepUp`, etc. ), which can trigger an action, if they are called.
|
|
215
223
|
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@lit/react": "^1.0.7",
|
|
8
|
-
"@synergy-design-system/components": "^2.
|
|
8
|
+
"@synergy-design-system/components": "^2.19.1"
|
|
9
9
|
},
|
|
10
10
|
"description": "React wrappers for the Synergy Design System",
|
|
11
11
|
"exports": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"directory": "packages/react"
|
|
44
44
|
},
|
|
45
45
|
"type": "module",
|
|
46
|
-
"version": "2.
|
|
46
|
+
"version": "2.19.1",
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "^19.0.7",
|
|
49
49
|
"react": "^19.0.0"
|