@synergy-design-system/vue 2.18.8 → 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 +13 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,7 +14,11 @@ Got any problems using our Vue wrappers? Please take a look at [our list of know
|
|
|
14
14
|
|
|
15
15
|
## Getting started
|
|
16
16
|
|
|
17
|
-
### 1.
|
|
17
|
+
### 1. Usage example
|
|
18
|
+
|
|
19
|
+
If you want to see a usage example, please check out our [test Vue repository](https://github.com/synergy-design-system/synergy-design-system/tree/main/packages/_private/vue-demo).
|
|
20
|
+
|
|
21
|
+
### 2. Package installation
|
|
18
22
|
|
|
19
23
|
Run the following steps to install the required packages.
|
|
20
24
|
|
|
@@ -32,9 +36,9 @@ npm install --save @synergy-design-system/assets
|
|
|
32
36
|
> ⚠️ Note we do **not** ship Vue in this package.
|
|
33
37
|
> You will have to install it by yourself first!
|
|
34
38
|
|
|
35
|
-
###
|
|
39
|
+
### 3. Load the desired theme (required) and utility classes (recommended)
|
|
36
40
|
|
|
37
|
-
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 Vue application:
|
|
41
|
+
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 Vue application:
|
|
38
42
|
|
|
39
43
|
```ts
|
|
40
44
|
// src/main.ts
|
|
@@ -51,7 +55,7 @@ import App from "./App.vue";
|
|
|
51
55
|
createApp(App).mount("#app");
|
|
52
56
|
```
|
|
53
57
|
|
|
54
|
-
###
|
|
58
|
+
### 4. Importing and rendering components
|
|
55
59
|
|
|
56
60
|
You may now use the components by importing them from the `@synergy-design-system/vue` package and rendering them in your own Vue components.
|
|
57
61
|
|
|
@@ -68,7 +72,7 @@ You may now use the components by importing them from the `@synergy-design-syste
|
|
|
68
72
|
</template>
|
|
69
73
|
```
|
|
70
74
|
|
|
71
|
-
###
|
|
75
|
+
### 5. Usage of the components
|
|
72
76
|
|
|
73
77
|
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).
|
|
74
78
|
The documentation is written for no specific web framework but only vanilla html and javascript.
|
|
@@ -88,7 +92,7 @@ The naming of the components for Vue changes from kebab-case to PascalCase with
|
|
|
88
92
|
<SynVueButton> My Button </SynVueButton>
|
|
89
93
|
```
|
|
90
94
|
|
|
91
|
-
###
|
|
95
|
+
### 6. Usage of attributes
|
|
92
96
|
|
|
93
97
|
The attribute naming of the components are the same as in the documentation.
|
|
94
98
|
|
|
@@ -110,7 +114,7 @@ The attribute naming of the components are the same as in the documentation.
|
|
|
110
114
|
/>
|
|
111
115
|
```
|
|
112
116
|
|
|
113
|
-
###
|
|
117
|
+
### 7. Usage of events
|
|
114
118
|
|
|
115
119
|
Custom events are named in the documentation as following: `syn-change`, `syn-clear`, ...
|
|
116
120
|
They stay the same for the Vue components:
|
|
@@ -150,7 +154,7 @@ An example for how these types can be used in case of event handling, is shown b
|
|
|
150
154
|
</template>
|
|
151
155
|
```
|
|
152
156
|
|
|
153
|
-
###
|
|
157
|
+
### 8. Obtaining a reference to the underlying native element (e.g. for usage of methods)
|
|
154
158
|
|
|
155
159
|
Sometimes, there is a need to interact directly with the underlying native web-component. For this reason, the library exposes a `nativeElement` property for all vue components.
|
|
156
160
|
|
|
@@ -173,7 +177,7 @@ Sometimes, there is a need to interact directly with the underlying native web-c
|
|
|
173
177
|
</template>
|
|
174
178
|
```
|
|
175
179
|
|
|
176
|
-
###
|
|
180
|
+
### 9. Using two way databinding
|
|
177
181
|
|
|
178
182
|
We support [Vue two way data binding](https://vuejs.org/guide/components/v-model.html) for form components out of the box.
|
|
179
183
|
You may use it in one of the following ways:
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://www.sick.com"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@synergy-design-system/components": "^2.
|
|
7
|
+
"@synergy-design-system/components": "^2.19.0"
|
|
8
8
|
},
|
|
9
9
|
"description": "Vue3 wrappers for the Synergy Design System",
|
|
10
10
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"directory": "packages/vue"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "2.
|
|
43
|
+
"version": "2.19.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@vitejs/plugin-vue": "^5.2.0",
|
|
46
46
|
"@vue/tsconfig": "^0.5.1",
|