@synergy-design-system/vue 1.27.0 → 2.1.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.
Files changed (73) hide show
  1. package/README.md +1 -33
  2. package/dist/components/SynVueAlert.vue.d.ts +0 -5
  3. package/dist/components/SynVueBreadcrumbItem.vue.d.ts +0 -2
  4. package/dist/components/SynVueButton.vue.d.ts +0 -8
  5. package/dist/components/SynVueCard.vue.d.ts +8 -6
  6. package/dist/components/SynVueCheckbox.vue.d.ts +0 -9
  7. package/dist/components/SynVueDialog.vue.d.ts +0 -3
  8. package/dist/components/SynVueDivider.vue.d.ts +0 -1
  9. package/dist/components/SynVueDrawer.vue.d.ts +0 -4
  10. package/dist/components/SynVueDropdown.vue.d.ts +0 -13
  11. package/dist/components/SynVueHeader.vue.d.ts +26 -25
  12. package/dist/components/SynVueIcon.vue.d.ts +0 -2
  13. package/dist/components/SynVueIconButton.vue.d.ts +0 -3
  14. package/dist/components/SynVueInput.vue.d.ts +0 -15
  15. package/dist/components/SynVueMenuItem.vue.d.ts +0 -5
  16. package/dist/components/SynVueNavItem.vue.d.ts +0 -4
  17. package/dist/components/SynVueOptgroup.vue.d.ts +0 -1
  18. package/dist/components/SynVueOption.vue.d.ts +0 -4
  19. package/dist/components/SynVuePopup.vue.d.ts +0 -1
  20. package/dist/components/SynVuePrioNav.vue.d.ts +8 -23
  21. package/dist/components/SynVueRadio.vue.d.ts +0 -2
  22. package/dist/components/SynVueRadioButton.vue.d.ts +0 -3
  23. package/dist/components/SynVueRadioGroup.vue.d.ts +0 -6
  24. package/dist/components/SynVueSelect.vue.d.ts +0 -11
  25. package/dist/components/SynVueSideNav.vue.d.ts +0 -5
  26. package/dist/components/SynVueSwitch.vue.d.ts +0 -9
  27. package/dist/components/SynVueTab.vue.d.ts +63 -0
  28. package/dist/components/SynVueTabGroup.vue.d.ts +78 -0
  29. package/dist/components/SynVueTabPanel.vue.d.ts +40 -0
  30. package/dist/components/SynVueTextarea.vue.d.ts +0 -107
  31. package/dist/components/SynVueTooltip.vue.d.ts +0 -5
  32. package/dist/index.d.ts +3 -0
  33. package/package.json +2 -2
  34. package/src/components/SynVueAlert.vue +0 -26
  35. package/src/components/SynVueBadge.vue +0 -3
  36. package/src/components/SynVueBreadcrumb.vue +0 -3
  37. package/src/components/SynVueBreadcrumbItem.vue +0 -6
  38. package/src/components/SynVueButton.vue +0 -41
  39. package/src/components/SynVueButtonGroup.vue +0 -3
  40. package/src/components/SynVueCard.vue +4 -6
  41. package/src/components/SynVueCheckbox.vue +0 -45
  42. package/src/components/SynVueDialog.vue +0 -14
  43. package/src/components/SynVueDivider.vue +0 -4
  44. package/src/components/SynVueDrawer.vue +0 -16
  45. package/src/components/SynVueDropdown.vue +0 -39
  46. package/src/components/SynVueHeader.vue +37 -39
  47. package/src/components/SynVueIcon.vue +0 -6
  48. package/src/components/SynVueIconButton.vue +0 -17
  49. package/src/components/SynVueInput.vue +0 -70
  50. package/src/components/SynVueMenu.vue +0 -3
  51. package/src/components/SynVueMenuItem.vue +0 -15
  52. package/src/components/SynVueMenuLabel.vue +0 -3
  53. package/src/components/SynVueNavItem.vue +0 -19
  54. package/src/components/SynVueOptgroup.vue +0 -4
  55. package/src/components/SynVueOption.vue +0 -13
  56. package/src/components/SynVuePopup.vue +0 -7
  57. package/src/components/SynVuePrioNav.vue +1 -8
  58. package/src/components/SynVueProgressBar.vue +0 -3
  59. package/src/components/SynVueProgressRing.vue +0 -3
  60. package/src/components/SynVueRadio.vue +0 -6
  61. package/src/components/SynVueRadioButton.vue +0 -14
  62. package/src/components/SynVueRadioGroup.vue +0 -28
  63. package/src/components/SynVueSelect.vue +0 -50
  64. package/src/components/SynVueSideNav.vue +0 -18
  65. package/src/components/SynVueSpinner.vue +0 -3
  66. package/src/components/SynVueSwitch.vue +0 -43
  67. package/src/components/SynVueTab.vue +92 -0
  68. package/src/components/SynVueTabGroup.vue +121 -0
  69. package/src/components/SynVueTabPanel.vue +69 -0
  70. package/src/components/SynVueTag.vue +0 -3
  71. package/src/components/SynVueTextarea.vue +0 -60
  72. package/src/components/SynVueTooltip.vue +0 -18
  73. package/src/index.js +3 -0
@@ -0,0 +1,40 @@
1
+ import '@synergy-design-system/components/components/tab-panel/tab-panel.js';
2
+ import type { SynTabPanel } from '@synergy-design-system/components';
3
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
4
+ /**
5
+ * The tab panel's name.
6
+ */
7
+ name?: string | undefined;
8
+ /**
9
+ * When true, the tab panel will be shown.
10
+ */
11
+ active?: boolean | undefined;
12
+ }>, {
13
+ nativeElement: import("vue").Ref<SynTabPanel | undefined>;
14
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
15
+ /**
16
+ * The tab panel's name.
17
+ */
18
+ name?: string | undefined;
19
+ /**
20
+ * When true, the tab panel will be shown.
21
+ */
22
+ active?: boolean | undefined;
23
+ }>>>, {}, {}>, {
24
+ default?(_: {}): any;
25
+ }>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
33
+ type __VLS_TypePropsToOption<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
35
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
36
+ } : {
37
+ type: import('vue').PropType<T[K]>;
38
+ required: true;
39
+ };
40
+ };
@@ -105,113 +105,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
105
105
  */
106
106
  modelValue?: string | undefined;
107
107
  }>, {
108
- callHandleDisabledChange: () => void | undefined;
109
- callHandleRowsChange: () => void | undefined;
110
- callHandleValueChange: () => Promise<void> | undefined;
111
- callFocus: (options?: FocusOptions | undefined) => void | undefined;
112
- callBlur: () => void | undefined;
113
- callSelect: () => void | undefined;
114
- callScrollPosition: (position?: {
115
- /**
116
- * @summary Textareas collect data from the user and allow multiple lines of text.
117
- * @documentation https://synergy.style/components/textarea
118
- * @status stable
119
- * @since 2.0
120
- *
121
- * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.
122
- * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
123
- *
124
- * @event syn-blur - Emitted when the control loses focus.
125
- * @event syn-change - Emitted when an alteration to the control's value is committed by the user.
126
- * @event syn-focus - Emitted when the control gains focus.
127
- * @event syn-input - Emitted when the control receives input.
128
- * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
129
- *
130
- * @csspart form-control - The form control that wraps the label, input, and help text.
131
- * @csspart form-control-label - The label's wrapper.
132
- * @csspart form-control-input - The input's wrapper.
133
- * @csspart form-control-help-text - The help text's wrapper.
134
- * @csspart base - The component's base wrapper.
135
- * @csspart textarea - The internal `<textarea>` control.
136
- */
137
- top?: number | undefined;
138
- /**
139
- * @summary Textareas collect data from the user and allow multiple lines of text.
140
- * @documentation https://synergy.style/components/textarea
141
- * @status stable
142
- * @since 2.0
143
- *
144
- * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.
145
- * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
146
- *
147
- * @event syn-blur - Emitted when the control loses focus.
148
- * @event syn-change - Emitted when an alteration to the control's value is committed by the user.
149
- * @event syn-focus - Emitted when the control gains focus.
150
- * @event syn-input - Emitted when the control receives input.
151
- * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
152
- *
153
- * @csspart form-control - The form control that wraps the label, input, and help text.
154
- * @csspart form-control-label - The label's wrapper.
155
- * @csspart form-control-input - The input's wrapper.
156
- * @csspart form-control-help-text - The help text's wrapper.
157
- * @csspart base - The component's base wrapper.
158
- * @csspart textarea - The internal `<textarea>` control.
159
- */
160
- left?: number | undefined;
161
- } | undefined) => {
162
- /**
163
- * @summary Textareas collect data from the user and allow multiple lines of text.
164
- * @documentation https://synergy.style/components/textarea
165
- * @status stable
166
- * @since 2.0
167
- *
168
- * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.
169
- * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
170
- *
171
- * @event syn-blur - Emitted when the control loses focus.
172
- * @event syn-change - Emitted when an alteration to the control's value is committed by the user.
173
- * @event syn-focus - Emitted when the control gains focus.
174
- * @event syn-input - Emitted when the control receives input.
175
- * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
176
- *
177
- * @csspart form-control - The form control that wraps the label, input, and help text.
178
- * @csspart form-control-label - The label's wrapper.
179
- * @csspart form-control-input - The input's wrapper.
180
- * @csspart form-control-help-text - The help text's wrapper.
181
- * @csspart base - The component's base wrapper.
182
- * @csspart textarea - The internal `<textarea>` control.
183
- */
184
- top: number;
185
- /**
186
- * @summary Textareas collect data from the user and allow multiple lines of text.
187
- * @documentation https://synergy.style/components/textarea
188
- * @status stable
189
- * @since 2.0
190
- *
191
- * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.
192
- * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
193
- *
194
- * @event syn-blur - Emitted when the control loses focus.
195
- * @event syn-change - Emitted when an alteration to the control's value is committed by the user.
196
- * @event syn-focus - Emitted when the control gains focus.
197
- * @event syn-input - Emitted when the control receives input.
198
- * @event syn-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.
199
- *
200
- * @csspart form-control - The form control that wraps the label, input, and help text.
201
- * @csspart form-control-label - The label's wrapper.
202
- * @csspart form-control-input - The input's wrapper.
203
- * @csspart form-control-help-text - The help text's wrapper.
204
- * @csspart base - The component's base wrapper.
205
- * @csspart textarea - The internal `<textarea>` control.
206
- */
207
- left: number;
208
- } | undefined;
209
- callSetSelectionRange: (selectionStart: number, selectionEnd: number, selectionDirection?: "none" | "forward" | "backward" | undefined) => void | undefined;
210
- callSetRangeText: (replacement: string, start?: number | undefined, end?: number | undefined, selectMode?: "select" | "end" | "start" | "preserve" | undefined) => void | undefined;
211
- callCheckValidity: () => boolean | undefined;
212
- callGetForm: () => HTMLFormElement | null | undefined;
213
- callReportValidity: () => boolean | undefined;
214
- callSetCustomValidity: (message: string) => void | undefined;
215
108
  nativeElement: import("vue").Ref<SynTextarea | undefined>;
216
109
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
217
110
  "syn-blur": (e: SynBlurEvent) => void;
@@ -50,11 +50,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
50
50
  */
51
51
  hoist?: boolean | undefined;
52
52
  }>, {
53
- callHandleOpenChange: () => Promise<void> | undefined;
54
- callHandleOptionsChange: () => Promise<void> | undefined;
55
- callHandleDisabledChange: () => void | undefined;
56
- callShow: () => Promise<void> | undefined;
57
- callHide: () => Promise<void> | undefined;
58
53
  nativeElement: import("vue").Ref<SynTooltip | undefined>;
59
54
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
60
55
  "syn-show": (e: SynShowEvent) => void;
package/dist/index.d.ts CHANGED
@@ -31,6 +31,9 @@ export { default as SynVueSelect } from "./components/SynVueSelect.vue";
31
31
  export { default as SynVueSideNav } from "./components/SynVueSideNav.vue";
32
32
  export { default as SynVueSpinner } from "./components/SynVueSpinner.vue";
33
33
  export { default as SynVueSwitch } from "./components/SynVueSwitch.vue";
34
+ export { default as SynVueTab } from "./components/SynVueTab.vue";
35
+ export { default as SynVueTabGroup } from "./components/SynVueTabGroup.vue";
36
+ export { default as SynVueTabPanel } from "./components/SynVueTabPanel.vue";
34
37
  export { default as SynVueTag } from "./components/SynVueTag.vue";
35
38
  export { default as SynVueTextarea } from "./components/SynVueTextarea.vue";
36
39
  export { default as SynVueTooltip } from "./components/SynVueTooltip.vue";
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": "^1.27.0"
7
+ "@synergy-design-system/components": "^2.1.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": "1.27.0",
43
+ "version": "2.1.0",
44
44
  "devDependencies": {
45
45
  "@vue/tsconfig": "^0.5.1",
46
46
  "vue": "^3.4.24"
@@ -40,33 +40,7 @@ import type {
40
40
  // DOM Reference to the element
41
41
  const nativeElement = ref<SynAlert>();
42
42
 
43
- // Map methods
44
- const callHandleOpenChange = (...args: Parameters<SynAlert['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
45
- const callHandleDurationChange = (...args: Parameters<SynAlert['handleDurationChange']>) => nativeElement.value?.handleDurationChange(...args);
46
- /**
47
- * Shows the alert.
48
- */
49
- const callShow = (...args: Parameters<SynAlert['show']>) => nativeElement.value?.show(...args);
50
- /**
51
- * Hides the alert
52
- */
53
- const callHide = (...args: Parameters<SynAlert['hide']>) => nativeElement.value?.hide(...args);
54
- /**
55
- * Displays the alert as a toast notification.
56
- * This will move the alert out of its position in the DOM and, when
57
- dismissed, it will be removed from the DOM completely.
58
- * By storing a reference to the alert, you can reuse it by
59
- calling this method again.
60
- * The returned promise will resolve after the alert is hidden.
61
- */
62
- const callToast = (...args: Parameters<SynAlert['toast']>) => nativeElement.value?.toast(...args);
63
-
64
43
  defineExpose({
65
- callHandleOpenChange,
66
- callHandleDurationChange,
67
- callShow,
68
- callHide,
69
- callToast,
70
44
  nativeElement,
71
45
  });
72
46
 
@@ -23,10 +23,7 @@ import type { SynBadge } from '@synergy-design-system/components';
23
23
  // DOM Reference to the element
24
24
  const nativeElement = ref<SynBadge>();
25
25
 
26
- // Map methods
27
-
28
26
  defineExpose({
29
-
30
27
  nativeElement,
31
28
  });
32
29
 
@@ -26,10 +26,7 @@ import type { SynBreadcrumb } from '@synergy-design-system/components';
26
26
  // DOM Reference to the element
27
27
  const nativeElement = ref<SynBreadcrumb>();
28
28
 
29
- // Map methods
30
-
31
29
  defineExpose({
32
-
33
30
  nativeElement,
34
31
  });
35
32
 
@@ -31,13 +31,7 @@ import type { SynBreadcrumbItem } from '@synergy-design-system/components';
31
31
  // DOM Reference to the element
32
32
  const nativeElement = ref<SynBreadcrumbItem>();
33
33
 
34
- // Map methods
35
- const callHrefChanged = (...args: Parameters<SynBreadcrumbItem['hrefChanged']>) => nativeElement.value?.hrefChanged(...args);
36
- const callHandleSlotChange = (...args: Parameters<SynBreadcrumbItem['handleSlotChange']>) => nativeElement.value?.handleSlotChange(...args);
37
-
38
34
  defineExpose({
39
- callHrefChanged,
40
- callHandleSlotChange,
41
35
  nativeElement,
42
36
  });
43
37
 
@@ -39,48 +39,7 @@ import type {
39
39
  // DOM Reference to the element
40
40
  const nativeElement = ref<SynButton>();
41
41
 
42
- // Map methods
43
- const callHandleDisabledChange = (...args: Parameters<SynButton['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
44
- /**
45
- * Simulates a click on the button.
46
- */
47
- const callClick = (...args: Parameters<SynButton['click']>) => nativeElement.value?.click(...args);
48
- /**
49
- * Sets focus on the button.
50
- */
51
- const callFocus = (...args: Parameters<SynButton['focus']>) => nativeElement.value?.focus(...args);
52
- /**
53
- * Removes focus from the button.
54
- */
55
- const callBlur = (...args: Parameters<SynButton['blur']>) => nativeElement.value?.blur(...args);
56
- /**
57
- * Checks for validity but does not show a validation message.
58
- * Returns `true` when valid and `false` when invalid.
59
- */
60
- const callCheckValidity = (...args: Parameters<SynButton['checkValidity']>) => nativeElement.value?.checkValidity(...args);
61
- /**
62
- * Gets the associated form, if one exists.
63
- */
64
- const callGetForm = (...args: Parameters<SynButton['getForm']>) => nativeElement.value?.getForm(...args);
65
- /**
66
- * Checks for validity and shows the browser's validation message if the control is invalid.
67
- */
68
- const callReportValidity = (...args: Parameters<SynButton['reportValidity']>) => nativeElement.value?.reportValidity(...args);
69
- /**
70
- * Sets a custom validation message.
71
- * Pass an empty string to restore validity.
72
- */
73
- const callSetCustomValidity = (...args: Parameters<SynButton['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
74
-
75
42
  defineExpose({
76
- callHandleDisabledChange,
77
- callClick,
78
- callFocus,
79
- callBlur,
80
- callCheckValidity,
81
- callGetForm,
82
- callReportValidity,
83
- callSetCustomValidity,
84
43
  nativeElement,
85
44
  });
86
45
 
@@ -23,10 +23,7 @@ import type { SynButtonGroup } from '@synergy-design-system/components';
23
23
  // DOM Reference to the element
24
24
  const nativeElement = ref<SynButtonGroup>();
25
25
 
26
- // Map methods
27
-
28
26
  defineExpose({
29
-
30
27
  nativeElement,
31
28
  });
32
29
 
@@ -35,20 +35,18 @@ import type { SynCard } from '@synergy-design-system/components';
35
35
  // DOM Reference to the element
36
36
  const nativeElement = ref<SynCard>();
37
37
 
38
- // Map methods
39
-
40
38
  defineExpose({
41
-
42
39
  nativeElement,
43
40
  });
44
41
 
45
42
  // Map attributes
46
43
  const props = defineProps<{
47
44
  /**
48
- * Draws the card as a nested item.
49
- * Can be used when nesting multiple syn-cards to create hierarchy
45
+ * Draws the card with sharp edges.
46
+ * Can be used e.g.
47
+ * when nesting multiple syn-cards to create hierarchy.
50
48
  */
51
- 'nested'?: SynCard['nested'];
49
+ 'sharp'?: SynCard['sharp'];
52
50
  }>();
53
51
 
54
52
  // Make sure prop binding only forwards the props that are actually there.
@@ -41,52 +41,7 @@ import type {
41
41
  // DOM Reference to the element
42
42
  const nativeElement = ref<SynCheckbox>();
43
43
 
44
- // Map methods
45
- const callHandleDisabledChange = (...args: Parameters<SynCheckbox['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
46
- const callHandleStateChange = (...args: Parameters<SynCheckbox['handleStateChange']>) => nativeElement.value?.handleStateChange(...args);
47
- /**
48
- * Simulates a click on the checkbox.
49
- */
50
- const callClick = (...args: Parameters<SynCheckbox['click']>) => nativeElement.value?.click(...args);
51
- /**
52
- * Sets focus on the checkbox.
53
- */
54
- const callFocus = (...args: Parameters<SynCheckbox['focus']>) => nativeElement.value?.focus(...args);
55
- /**
56
- * Removes focus from the checkbox.
57
- */
58
- const callBlur = (...args: Parameters<SynCheckbox['blur']>) => nativeElement.value?.blur(...args);
59
- /**
60
- * Checks for validity but does not show a validation message.
61
- * Returns `true` when valid and `false` when invalid.
62
- */
63
- const callCheckValidity = (...args: Parameters<SynCheckbox['checkValidity']>) => nativeElement.value?.checkValidity(...args);
64
- /**
65
- * Gets the associated form, if one exists.
66
- */
67
- const callGetForm = (...args: Parameters<SynCheckbox['getForm']>) => nativeElement.value?.getForm(...args);
68
- /**
69
- * Checks for validity and shows the browser's validation message if the control is invalid.
70
- */
71
- const callReportValidity = (...args: Parameters<SynCheckbox['reportValidity']>) => nativeElement.value?.reportValidity(...args);
72
- /**
73
- * Sets a custom validation message.
74
- * The value provided will be shown to the user when the form is submitted.
75
- * To clear
76
- the custom validation message, call this method with an empty string.
77
- */
78
- const callSetCustomValidity = (...args: Parameters<SynCheckbox['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
79
-
80
44
  defineExpose({
81
- callHandleDisabledChange,
82
- callHandleStateChange,
83
- callClick,
84
- callFocus,
85
- callBlur,
86
- callCheckValidity,
87
- callGetForm,
88
- callReportValidity,
89
- callSetCustomValidity,
90
45
  nativeElement,
91
46
  });
92
47
 
@@ -65,21 +65,7 @@ import type {
65
65
  // DOM Reference to the element
66
66
  const nativeElement = ref<SynDialog>();
67
67
 
68
- // Map methods
69
- const callHandleOpenChange = (...args: Parameters<SynDialog['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
70
- /**
71
- * Shows the dialog.
72
- */
73
- const callShow = (...args: Parameters<SynDialog['show']>) => nativeElement.value?.show(...args);
74
- /**
75
- * Hides the dialog
76
- */
77
- const callHide = (...args: Parameters<SynDialog['hide']>) => nativeElement.value?.hide(...args);
78
-
79
68
  defineExpose({
80
- callHandleOpenChange,
81
- callShow,
82
- callHide,
83
69
  nativeElement,
84
70
  });
85
71
 
@@ -23,11 +23,7 @@ import type { SynDivider } from '@synergy-design-system/components';
23
23
  // DOM Reference to the element
24
24
  const nativeElement = ref<SynDivider>();
25
25
 
26
- // Map methods
27
- const callHandleVerticalChange = (...args: Parameters<SynDivider['handleVerticalChange']>) => nativeElement.value?.handleVerticalChange(...args);
28
-
29
26
  defineExpose({
30
- callHandleVerticalChange,
31
27
  nativeElement,
32
28
  });
33
29
 
@@ -72,23 +72,7 @@ import type {
72
72
  // DOM Reference to the element
73
73
  const nativeElement = ref<SynDrawer>();
74
74
 
75
- // Map methods
76
- const callHandleOpenChange = (...args: Parameters<SynDrawer['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
77
- const callHandleNoModalChange = (...args: Parameters<SynDrawer['handleNoModalChange']>) => nativeElement.value?.handleNoModalChange(...args);
78
- /**
79
- * Shows the drawer.
80
- */
81
- const callShow = (...args: Parameters<SynDrawer['show']>) => nativeElement.value?.show(...args);
82
- /**
83
- * Hides the drawer
84
- */
85
- const callHide = (...args: Parameters<SynDrawer['hide']>) => nativeElement.value?.hide(...args);
86
-
87
75
  defineExpose({
88
- callHandleOpenChange,
89
- callHandleNoModalChange,
90
- callShow,
91
- callHide,
92
76
  nativeElement,
93
77
  });
94
78
 
@@ -38,46 +38,7 @@ import type {
38
38
  // DOM Reference to the element
39
39
  const nativeElement = ref<SynDropdown>();
40
40
 
41
- // Map methods
42
- const callFocusOnTrigger = (...args: Parameters<SynDropdown['focusOnTrigger']>) => nativeElement.value?.focusOnTrigger(...args);
43
- const callGetMenu = (...args: Parameters<SynDropdown['getMenu']>) => nativeElement.value?.getMenu(...args);
44
- const callHandleTriggerClick = (...args: Parameters<SynDropdown['handleTriggerClick']>) => nativeElement.value?.handleTriggerClick(...args);
45
- const callHandleTriggerKeyDown = (...args: Parameters<SynDropdown['handleTriggerKeyDown']>) => nativeElement.value?.handleTriggerKeyDown(...args);
46
- const callHandleTriggerKeyUp = (...args: Parameters<SynDropdown['handleTriggerKeyUp']>) => nativeElement.value?.handleTriggerKeyUp(...args);
47
- const callHandleTriggerSlotChange = (...args: Parameters<SynDropdown['handleTriggerSlotChange']>) => nativeElement.value?.handleTriggerSlotChange(...args);
48
- const callUpdateAccessibleTrigger = (...args: Parameters<SynDropdown['updateAccessibleTrigger']>) => nativeElement.value?.updateAccessibleTrigger(...args);
49
- /**
50
- * Shows the dropdown panel.
51
- */
52
- const callShow = (...args: Parameters<SynDropdown['show']>) => nativeElement.value?.show(...args);
53
- /**
54
- * Hides the dropdown panel
55
- */
56
- const callHide = (...args: Parameters<SynDropdown['hide']>) => nativeElement.value?.hide(...args);
57
- /**
58
- * Instructs the dropdown menu to reposition.
59
- * Useful when the position or size of the trigger changes when the menu
60
- is activated.
61
- */
62
- const callReposition = (...args: Parameters<SynDropdown['reposition']>) => nativeElement.value?.reposition(...args);
63
- const callAddOpenListeners = (...args: Parameters<SynDropdown['addOpenListeners']>) => nativeElement.value?.addOpenListeners(...args);
64
- const callRemoveOpenListeners = (...args: Parameters<SynDropdown['removeOpenListeners']>) => nativeElement.value?.removeOpenListeners(...args);
65
- const callHandleOpenChange = (...args: Parameters<SynDropdown['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
66
-
67
41
  defineExpose({
68
- callFocusOnTrigger,
69
- callGetMenu,
70
- callHandleTriggerClick,
71
- callHandleTriggerKeyDown,
72
- callHandleTriggerKeyUp,
73
- callHandleTriggerSlotChange,
74
- callUpdateAccessibleTrigger,
75
- callShow,
76
- callHide,
77
- callReposition,
78
- callAddOpenListeners,
79
- callRemoveOpenListeners,
80
- callHandleOpenChange,
81
42
  nativeElement,
82
43
  });
83
44
 
@@ -13,18 +13,21 @@
13
13
  * @status stable
14
14
  * @since 1.10.0
15
15
  *
16
- * @slot - The label for the header.
17
- * @slot logo - The logo that should be displayed. Will fall back to the SICK logo if not provided.
18
- * @slot meta-navigation - The meta-navigation is used to add various application toolbar icons.
16
+ * @slot label - The label for the header
17
+ * @slot logo - The logo that should be displayed. Will fall back to the SICK logo if not provided
18
+ * @slot meta-navigation - The meta-navigation is used to add various application toolbar icons
19
19
  * Best used with `<syn-icon-button />` and `<syn-drop-down />`
20
20
  * @slot navigation - This slot can be used to add an optional horizontal navigation
21
- * @slot show-burger-menu - An icon to use in lieu of the default show burger menu icon
22
- * @slot hide-burger-menu - An icon to use in lieu of the default hide burger menu icon
21
+ * @slot open-burger-menu-icon - An icon to use in lieu of the default burger-menu=open state.
22
+ * The default close icon is a 'x'.
23
+ * @slot closed-burger-menu-icon - An icon to use in lieu of the default burger-menu=closed state.
24
+ * The default open icon is a burger menu.
23
25
  *
24
- * @event syn-burger-menu-show - Emitted when the burger menu button is toggled to visible
25
- * @event syn-burger-menu-hide - Emitted when the burger menu button is toggled to not visible
26
+ * @event syn-burger-menu-closed - Emitted when the burger menu is toggled to closed
27
+ * @event syn-burger-menu-hidden - Emitted when the burger menu is toggled to hidden
28
+ * @event syn-burger-menu-open - Emitted when the burger menu is toggled to open
26
29
  *
27
- * @csspart base - The component's base wrapper.
30
+ * @csspart base - The component's base wrapper
28
31
  * @csspart content - The wrapper most content items reside
29
32
  * @csspart logo - The wrapper the application logo resides in
30
33
  * @csspart label - The element wrapping the application name
@@ -35,25 +38,14 @@
35
38
  import { computed, ref } from 'vue';
36
39
  import '@synergy-design-system/components/components/header/header.js';
37
40
 
38
- import type { SynBurgerMenuHideEvent, SynBurgerMenuShowEvent, SynHeader } from '@synergy-design-system/components';
41
+ import type {
42
+ SynBurgerMenuClosedEvent, SynBurgerMenuHiddenEvent, SynBurgerMenuOpenEvent, SynHeader,
43
+ } from '@synergy-design-system/components';
39
44
 
40
45
  // DOM Reference to the element
41
46
  const nativeElement = ref<SynHeader>();
42
47
 
43
- // Map methods
44
- const callHandleBurgerMenuVisible = (...args: Parameters<SynHeader['handleBurgerMenuVisible']>) => nativeElement.value?.handleBurgerMenuVisible(...args);
45
- /**
46
- * Connect a `syn-side-nav` to add automatic interaction of the header with the side navigation
47
- like showing the burger menu icon and open / close handling.
48
-
49
- If no side navigation is connected, the header will use the first `syn-side-nav` element it
50
- finds.
51
- */
52
- const callConnectSideNavigation = (...args: Parameters<SynHeader['connectSideNavigation']>) => nativeElement.value?.connectSideNavigation(...args);
53
-
54
48
  defineExpose({
55
- callHandleBurgerMenuVisible,
56
- callConnectSideNavigation,
57
49
  nativeElement,
58
50
  });
59
51
 
@@ -61,20 +53,19 @@ defineExpose({
61
53
  const props = defineProps<{
62
54
  /**
63
55
  * The headers label.
64
- * If you need to display HTML, use the `default` slot instead.
56
+ * If you need to display HTML, use the `label` slot instead.
65
57
  */
66
58
  'label'?: SynHeader['label'];
67
59
 
68
60
  /**
69
- * Adds a button to toggle the burger menu's visibility.
70
- The button is added automatically, if the component finds a syn-side-nav in non-rail mode.
71
- */
72
- 'showBurgerMenu'?: SynHeader['showBurgerMenu'];
73
-
74
- /**
75
- * Determines whether or not the burger menu is currently visible.
61
+ * Defines the current visibility and icon of the burger-menu icon.
62
+ The menu button is added automatically if the component finds a syn-side-nav in non-rail mode.
63
+ The following values can be used:
64
+ - hidden: The burger menu is not visible
65
+ - open: The burger menu is visible and shows the close icon
66
+ - closed: The burger menu is visible and shows the open icon
76
67
  */
77
- 'burgerMenuVisible'?: SynHeader['burgerMenuVisible'];
68
+ 'burgerMenu'?: SynHeader['burgerMenu'];
78
69
  }>();
79
70
 
80
71
  // Make sure prop binding only forwards the props that are actually there.
@@ -90,29 +81,36 @@ const visibleProps = computed(() => Object.fromEntries(
90
81
  // Map events
91
82
  defineEmits<{
92
83
  /**
93
- * Emitted when the burger menu button is toggled to visible
84
+ * Emitted when the burger menu is toggled to closed
85
+ */
86
+ 'syn-burger-menu-closed': [e: SynBurgerMenuClosedEvent];
87
+
88
+ /**
89
+ * Emitted when the burger menu is toggled to hidden
94
90
  */
95
- 'syn-burger-menu-show': [e: SynBurgerMenuShowEvent];
91
+ 'syn-burger-menu-hidden': [e: SynBurgerMenuHiddenEvent];
96
92
 
97
93
  /**
98
- * Emitted when the burger menu button is toggled to not visible
94
+ * Emitted when the burger menu is toggled to open
99
95
  */
100
- 'syn-burger-menu-hide': [e: SynBurgerMenuHideEvent];
96
+ 'syn-burger-menu-open': [e: SynBurgerMenuOpenEvent];
101
97
  }>();
102
98
  </script>
103
99
 
104
100
  <script lang="ts">
105
- export type { SynBurgerMenuShowEvent } from '@synergy-design-system/components';
106
- export type { SynBurgerMenuHideEvent } from '@synergy-design-system/components';
101
+ export type { SynBurgerMenuClosedEvent } from '@synergy-design-system/components';
102
+ export type { SynBurgerMenuHiddenEvent } from '@synergy-design-system/components';
103
+ export type { SynBurgerMenuOpenEvent } from '@synergy-design-system/components';
107
104
  </script>
108
105
 
109
106
  <template>
110
107
  <syn-header
111
108
  v-bind="visibleProps"
112
109
  ref="nativeElement"
110
+ @syn-burger-menu-closed="$emit('syn-burger-menu-closed', $event)"
113
111
 
114
- @syn-burger-menu-show="$emit('syn-burger-menu-show', $event)"
115
- @syn-burger-menu-hide="$emit('syn-burger-menu-hide', $event)"
112
+ @syn-burger-menu-hidden="$emit('syn-burger-menu-hidden', $event)"
113
+ @syn-burger-menu-open="$emit('syn-burger-menu-open', $event)"
116
114
  >
117
115
  <slot />
118
116
  </syn-header>