@synergy-design-system/react 2.18.7 → 2.19.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/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. Package installation
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
- ### 2. Add the desired theme to your application
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
- ### 3. Using native Synergy components in react (only for react >= 19.0.0) in Typescript projects
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
- #### 3.1. Migrating from synergies react wrappers to native components
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
- ### 4. Using the lit wrappers (required for react < 19.0.0, optional for react >= 19.0.0)
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
- ### 4. Usage of the components
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
- ### 5. Usage of attributes
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
- ### 6. Usage of events
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
- ### 7. Usage of methods
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
 
@@ -1,4 +1,4 @@
1
- import type { DOMAttributes } from 'react';
1
+ import type { CSSProperties, DOMAttributes, RefObject } from 'react';
2
2
  import type { SynShowEvent, SynAfterShowEvent, SynHideEvent, SynAfterHideEvent, SynBlurEvent, SynFocusEvent, SynInvalidEvent, SynChangeEvent, SynInputEvent, SynClearEvent, SynErrorEvent, SynInitialFocusEvent, SynRequestCloseEvent, SynBurgerMenuClosedEvent, SynBurgerMenuHiddenEvent, SynBurgerMenuOpenEvent, SynLoadEvent, SynSelectEvent, SynRepositionEvent, SynMoveEvent, SynCloseEvent, SynTabShowEvent, SynTabHideEvent, SynRemoveEvent, SynAccordion, SynAlert, SynBadge, SynBreadcrumb, SynBreadcrumbItem, SynButton, SynButtonGroup, SynCard, SynCheckbox, SynCombobox, SynDetails, SynDialog, SynDivider, SynDrawer, SynDropdown, SynFile, SynHeader, SynIcon, SynIconButton, SynInput, SynMenu, SynMenuItem, SynMenuLabel, SynNavItem, SynOptgroup, SynOption, SynPopup, SynPrioNav, SynProgressBar, SynProgressRing, SynRadio, SynRadioButton, SynRadioGroup, SynRange, SynRangeTick, SynSelect, SynSideNav, SynSpinner, SynSwitch, SynTab, SynTabGroup, SynTabPanel, SynTag, SynTextarea, SynTooltip, SynValidate } from '@synergy-design-system/components';
3
3
  /**
4
4
  * Used core types
@@ -12,9 +12,11 @@ type SynEventMap<T extends SynEventTuple[]> = {
12
12
  * Synergy custom element type definition
13
13
  * This type is used to define the custom elements in the Synergy Design System
14
14
  */
15
- export type SynCustomElement<SynElement extends HTMLElement, Events extends SynEventTuple[] = []> = Partial<SynElement & DOMAttributes<SynElement> & {
15
+ export type SynCustomElement<SynElement extends HTMLElement, Events extends SynEventTuple[] = []> = Partial<Omit<SynElement, 'style'> & DOMAttributes<SynElement> & {
16
16
  children?: any;
17
17
  key?: any;
18
+ ref?: RefObject<SynElement | null>;
19
+ style?: CSSProperties | undefined;
18
20
  } & SynEventMap<Events>>;
19
21
  /**
20
22
  * @summary Accordions provide the ability to group a list of `<syn-details>`.
@@ -1609,6 +1611,9 @@ export type SynCustomElement<SynElement extends HTMLElement, Events extends SynE
1609
1611
  * @csspart alert__icon - The container that wraps the alert icon.
1610
1612
  */ export type SynValidateJSXElement = SynCustomElement<SynValidate, []>;
1611
1613
  declare module 'react' {
1614
+ interface CSSProperties {
1615
+ [key: `--${string}`]: string | undefined;
1616
+ }
1612
1617
  namespace JSX {
1613
1618
  interface IntrinsicElements {
1614
1619
  /**
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.18.7"
8
+ "@synergy-design-system/components": "^2.19.0"
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.18.7",
46
+ "version": "2.19.0",
47
47
  "devDependencies": {
48
48
  "@types/react": "^19.0.7",
49
49
  "react": "^19.0.0"