@synergy-design-system/vue 2.7.2 → 2.8.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 (88) hide show
  1. package/dist/components/SynVueAccordion.vue.d.ts +12 -12
  2. package/dist/components/SynVueAlert.vue.d.ts +13 -9
  3. package/dist/components/SynVueBadge.vue.d.ts +4 -4
  4. package/dist/components/SynVueBreadcrumbItem.vue.d.ts +12 -12
  5. package/dist/components/SynVueButton.vue.d.ts +62 -59
  6. package/dist/components/SynVueCard.vue.d.ts +8 -8
  7. package/dist/components/SynVueCheckbox.vue.d.ts +40 -35
  8. package/dist/components/SynVueCombobox.vue.d.ts +232 -0
  9. package/dist/components/SynVueDetails.vue.d.ts +23 -19
  10. package/dist/components/SynVueDialog.vue.d.ts +7 -1
  11. package/dist/components/SynVueDivider.vue.d.ts +4 -4
  12. package/dist/components/SynVueDrawer.vue.d.ts +11 -5
  13. package/dist/components/SynVueDropdown.vue.d.ts +21 -17
  14. package/dist/components/SynVueFile.vue.d.ts +40 -35
  15. package/dist/components/SynVueHeader.vue.d.ts +10 -7
  16. package/dist/components/SynVueIcon.vue.d.ts +13 -11
  17. package/dist/components/SynVueIconButton.vue.d.ts +37 -35
  18. package/dist/components/SynVueInput.vue.d.ts +115 -109
  19. package/dist/components/SynVueMenu.vue.d.ts +2 -1
  20. package/dist/components/SynVueMenuItem.vue.d.ts +24 -24
  21. package/dist/components/SynVueNavItem.vue.d.ts +13 -9
  22. package/dist/components/SynVueOptgroup.vue.d.ts +10 -10
  23. package/dist/components/SynVueOption.vue.d.ts +4 -4
  24. package/dist/components/SynVuePopup.vue.d.ts +34 -33
  25. package/dist/components/SynVueProgressBar.vue.d.ts +12 -12
  26. package/dist/components/SynVueProgressRing.vue.d.ts +8 -8
  27. package/dist/components/SynVueRadio.vue.d.ts +13 -11
  28. package/dist/components/SynVueRadioButton.vue.d.ts +17 -15
  29. package/dist/components/SynVueRadioGroup.vue.d.ts +32 -29
  30. package/dist/components/SynVueRange.vue.d.ts +57 -51
  31. package/dist/components/SynVueRangeTick.vue.d.ts +4 -4
  32. package/dist/components/SynVueSelect.vue.d.ts +55 -45
  33. package/dist/components/SynVueSideNav.vue.d.ts +5 -1
  34. package/dist/components/SynVueSwitch.vue.d.ts +40 -35
  35. package/dist/components/SynVueTab.vue.d.ts +20 -19
  36. package/dist/components/SynVueTabGroup.vue.d.ts +21 -19
  37. package/dist/components/SynVueTabPanel.vue.d.ts +8 -8
  38. package/dist/components/SynVueTag.vue.d.ts +10 -9
  39. package/dist/components/SynVueTextarea.vue.d.ts +86 -81
  40. package/dist/components/SynVueTooltip.vue.d.ts +29 -25
  41. package/dist/index.d.ts +1 -0
  42. package/package.json +3 -3
  43. package/src/components/SynVueAccordion.vue +16 -21
  44. package/src/components/SynVueAlert.vue +29 -29
  45. package/src/components/SynVueBadge.vue +10 -15
  46. package/src/components/SynVueBreadcrumb.vue +8 -13
  47. package/src/components/SynVueBreadcrumbItem.vue +16 -21
  48. package/src/components/SynVueButton.vue +66 -67
  49. package/src/components/SynVueButtonGroup.vue +8 -13
  50. package/src/components/SynVueCard.vue +12 -17
  51. package/src/components/SynVueCheckbox.vue +64 -53
  52. package/src/components/SynVueCombobox.vue +295 -0
  53. package/src/components/SynVueDetails.vue +35 -35
  54. package/src/components/SynVueDialog.vue +33 -31
  55. package/src/components/SynVueDivider.vue +9 -14
  56. package/src/components/SynVueDrawer.vue +37 -35
  57. package/src/components/SynVueDropdown.vue +37 -37
  58. package/src/components/SynVueFile.vue +69 -58
  59. package/src/components/SynVueHeader.vue +23 -24
  60. package/src/components/SynVueIcon.vue +26 -25
  61. package/src/components/SynVueIconButton.vue +42 -41
  62. package/src/components/SynVueInput.vue +123 -111
  63. package/src/components/SynVueMenu.vue +6 -9
  64. package/src/components/SynVueMenuItem.vue +24 -29
  65. package/src/components/SynVueMenuLabel.vue +2 -6
  66. package/src/components/SynVueNavItem.vue +32 -32
  67. package/src/components/SynVueOptgroup.vue +14 -19
  68. package/src/components/SynVueOption.vue +11 -16
  69. package/src/components/SynVuePopup.vue +51 -52
  70. package/src/components/SynVuePrioNav.vue +2 -6
  71. package/src/components/SynVueProgressBar.vue +16 -21
  72. package/src/components/SynVueProgressRing.vue +13 -18
  73. package/src/components/SynVueRadio.vue +23 -23
  74. package/src/components/SynVueRadioButton.vue +26 -26
  75. package/src/components/SynVueRadioGroup.vue +52 -43
  76. package/src/components/SynVueRange.vue +77 -65
  77. package/src/components/SynVueRangeTick.vue +10 -15
  78. package/src/components/SynVueSelect.vue +90 -74
  79. package/src/components/SynVueSideNav.vue +24 -24
  80. package/src/components/SynVueSpinner.vue +1 -5
  81. package/src/components/SynVueSwitch.vue +63 -52
  82. package/src/components/SynVueTab.vue +25 -26
  83. package/src/components/SynVueTabGroup.vue +31 -31
  84. package/src/components/SynVueTabPanel.vue +13 -18
  85. package/src/components/SynVueTag.vue +18 -19
  86. package/src/components/SynVueTextarea.vue +99 -88
  87. package/src/components/SynVueTooltip.vue +41 -41
  88. package/src/index.js +1 -0
@@ -34,9 +34,12 @@
34
34
  import { computed, ref } from 'vue';
35
35
  import '@synergy-design-system/components/components/checkbox/checkbox.js';
36
36
 
37
- import type {
38
- SynBlurEvent, SynChangeEvent, SynCheckbox, SynFocusEvent, SynInputEvent, SynInvalidEvent,
39
- } from '@synergy-design-system/components';
37
+ import type { SynBlurEvent } from '@synergy-design-system/components';
38
+ import type { SynChangeEvent } from '@synergy-design-system/components';
39
+ import type { SynFocusEvent } from '@synergy-design-system/components';
40
+ import type { SynInputEvent } from '@synergy-design-system/components';
41
+ import type { SynInvalidEvent } from '@synergy-design-system/components';
42
+ import type { SynCheckbox } from '@synergy-design-system/components';
40
43
 
41
44
  // DOM Reference to the element
42
45
  const nativeElement = ref<SynCheckbox>();
@@ -47,39 +50,39 @@ defineExpose({
47
50
 
48
51
  // Map attributes
49
52
  const props = defineProps<{
50
- 'title'?: SynCheckbox['title'];
53
+ title?: SynCheckbox['title'];
51
54
 
52
55
  /**
53
- * The name of the checkbox, submitted as a name/value pair with form data.
54
- */
55
- 'name'?: SynCheckbox['name'];
56
+ * The name of the checkbox, submitted as a name/value pair with form data.
57
+ */
58
+ name?: SynCheckbox['name'];
56
59
 
57
60
  /**
58
- * The current value of the checkbox, submitted as a name/value pair with form data.
59
- */
60
- 'value'?: SynCheckbox['value'];
61
+ * The current value of the checkbox, submitted as a name/value pair with form data.
62
+ */
63
+ value?: SynCheckbox['value'];
61
64
 
62
65
  /**
63
- * The checkbox's size.
64
- */
65
- 'size'?: SynCheckbox['size'];
66
+ * The checkbox's size.
67
+ */
68
+ size?: SynCheckbox['size'];
66
69
 
67
70
  /**
68
- * Disables the checkbox.
69
- */
70
- 'disabled'?: SynCheckbox['disabled'];
71
+ * Disables the checkbox.
72
+ */
73
+ disabled?: SynCheckbox['disabled'];
71
74
 
72
75
  /**
73
- * Draws the checkbox in a checked state.
74
- */
75
- 'checked'?: SynCheckbox['checked'];
76
+ * Draws the checkbox in a checked state.
77
+ */
78
+ checked?: SynCheckbox['checked'];
76
79
 
77
80
  /**
78
81
  * Draws the checkbox in an indeterminate state.
79
82
  * This is usually applied to checkboxes that represents a "select
80
83
  all/none" behavior when associated checkboxes have a mix of checked and unchecked states.
81
84
  */
82
- 'indeterminate'?: SynCheckbox['indeterminate'];
85
+ indeterminate?: SynCheckbox['indeterminate'];
83
86
 
84
87
  /**
85
88
  * By default, form controls are associated with the nearest containing `<form>` element.
@@ -88,22 +91,22 @@ to place the form control outside of a form and associate it with the form that
88
91
  * The form must be in
89
92
  the same document or shadow root for this to work.
90
93
  */
91
- 'form'?: SynCheckbox['form'];
94
+ form?: SynCheckbox['form'];
92
95
 
93
96
  /**
94
- * Makes the checkbox a required field.
95
- */
96
- 'required'?: SynCheckbox['required'];
97
+ * Makes the checkbox a required field.
98
+ */
99
+ required?: SynCheckbox['required'];
97
100
 
98
101
  /**
99
- * The checkbox's help text.
100
- * If you need to display HTML, use the `help-text` slot instead.
101
- */
102
- 'helpText'?: SynCheckbox['helpText'];
102
+ * The checkbox's help text.
103
+ * If you need to display HTML, use the `help-text` slot instead.
104
+ */
105
+ helpText?: SynCheckbox['helpText'];
103
106
 
104
107
  /**
105
- * Support for two way data binding
106
- */
108
+ * Support for two way data binding
109
+ */
107
110
  modelValue?: SynCheckbox['checked'];
108
111
  }>();
109
112
 
@@ -111,42 +114,42 @@ the same document or shadow root for this to work.
111
114
  // This is needed because :param="param" also adds an empty attribute
112
115
  // when using web-components, which breaks optional arguments like size in SynInput
113
116
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
114
- const visibleProps = computed(() => Object.fromEntries(
115
- Object
116
- .entries(props)
117
- .filter(([, value]) => typeof value !== 'undefined'),
118
- ));
117
+ const visibleProps = computed(() =>
118
+ Object.fromEntries(
119
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
120
+ ),
121
+ );
119
122
 
120
123
  // Map events
121
124
  defineEmits<{
122
125
  /**
123
- * Emitted when the checkbox loses focus.
124
- */
126
+ * Emitted when the checkbox loses focus.
127
+ */
125
128
  'syn-blur': [e: SynBlurEvent];
126
129
 
127
130
  /**
128
- * Emitted when the checked state changes.
129
- */
131
+ * Emitted when the checked state changes.
132
+ */
130
133
  'syn-change': [e: SynChangeEvent];
131
134
 
132
135
  /**
133
- * Emitted when the checkbox gains focus.
134
- */
136
+ * Emitted when the checkbox gains focus.
137
+ */
135
138
  'syn-focus': [e: SynFocusEvent];
136
139
 
137
140
  /**
138
- * Emitted when the checkbox receives input.
139
- */
141
+ * Emitted when the checkbox receives input.
142
+ */
140
143
  'syn-input': [e: SynInputEvent];
141
144
 
142
145
  /**
143
- * Emitted when the form control has been checked for validity and its constraints aren't satisfied.
144
- */
146
+ * Emitted when the form control has been checked for validity and its constraints aren't satisfied.
147
+ */
145
148
  'syn-invalid': [e: SynInvalidEvent];
146
149
 
147
150
  /**
148
- * Support for two way data binding
149
- */
151
+ * Support for two way data binding
152
+ */
150
153
  'update:modelValue': [newValue: SynCheckbox['checked']];
151
154
  }>();
152
155
  </script>
@@ -161,15 +164,23 @@ export type { SynInvalidEvent } from '@synergy-design-system/components';
161
164
 
162
165
  <template>
163
166
  <syn-checkbox
164
- v-bind="visibleProps"
165
- ref="nativeElement"
166
- :checked="typeof props.modelValue !== 'undefined' ? props.modelValue : typeof props.checked !== 'undefined' ? props.checked : undefined"
167
167
  @syn-blur="$emit('syn-blur', $event)"
168
168
  @syn-change="$emit('syn-change', $event)"
169
169
  @syn-focus="$emit('syn-focus', $event)"
170
- @syn-input="$emit('update:modelValue', $event.target.checked); $emit('syn-input', $event)"
170
+ @syn-input="
171
+ $emit('update:modelValue', $event.target.checked);
172
+ $emit('syn-input', $event);
173
+ "
171
174
  @syn-invalid="$emit('syn-invalid', $event)"
172
- >
173
- <slot />
175
+ :checked="
176
+ typeof props.modelValue !== 'undefined'
177
+ ? props.modelValue
178
+ : typeof props.checked !== 'undefined'
179
+ ? props.checked
180
+ : undefined
181
+ "
182
+ v-bind="visibleProps"
183
+ ref="nativeElement">
184
+ <slot></slot>
174
185
  </syn-checkbox>
175
186
  </template>
@@ -0,0 +1,295 @@
1
+ <script setup lang="ts">
2
+ // ---------------------------------------------------------------------
3
+ // 🔒 AUTOGENERATED @synergy-design-system/vue wrappers for @synergy-design-system/components
4
+ // Please do not edit this file directly!
5
+ // It will get recreated when running pnpm build.
6
+ // ---------------------------------------------------------------------
7
+
8
+ /**
9
+ * @summary Comboboxes allow you to choose items from a menu of predefined options.
10
+ * @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-combobox--docs
11
+ * @status stable
12
+ *
13
+ * @dependency syn-icon
14
+ * @dependency syn-popup
15
+ *
16
+ * @slot - The listbox options. Must be `<syn-option>` elements.
17
+ * You can use `<syn-optgroup>`'s to group items visually.
18
+ * @slot label - The combobox's label. Alternatively, you can use the `label` attribute.
19
+ * @slot prefix - Used to prepend a presentational icon or similar element to the combobox.
20
+ * @slot suffix - Used to append a presentational icon or similar element to the combobox.
21
+ * @slot clear-icon - An icon to use in lieu of the default clear icon.
22
+ * @slot expand-icon - The icon to show when the control is expanded and collapsed.
23
+ * Rotates on open and close.
24
+ * @slot help-text - Text that describes how to use the combobox.
25
+ * Alternatively, you can use the `help-text` attribute.
26
+ *
27
+ * @event syn-change - Emitted when the control's value changes.
28
+ * @event syn-clear - Emitted when the control's value is cleared.
29
+ * @event syn-input - Emitted when the control receives input.
30
+ * @event syn-focus - Emitted when the control gains focus.
31
+ * @event syn-blur - Emitted when the control loses focus.
32
+ * @event syn-show - Emitted when the combobox's menu opens.
33
+ * @event syn-after-show - Emitted after the combobox's menu opens and all animations are complete.
34
+ * @event syn-hide - Emitted when the combobox's menu closes.
35
+ * @event syn-after-hide - Emitted after the combobox's menu closes and all animations are complete.
36
+ * @event syn-invalid - Emitted when the form control has been checked for validity
37
+ * and its constraints aren't satisfied.
38
+ * @event syn-error - Emitted when the combobox menu fails to open.
39
+ *
40
+ * @csspart form-control - The form control that wraps the label, combobox, and help text.
41
+ * @csspart form-control-label - The label's wrapper.
42
+ * @csspart form-control-input - The combobox's wrapper.
43
+ * @csspart form-control-help-text - The help text's wrapper.
44
+ * @csspart combobox - The container the wraps the prefix, combobox, clear icon, and expand button.
45
+ * @csspart prefix - The container that wraps the prefix slot.
46
+ * @csspart suffix - The container that wraps the suffix slot.
47
+ * @csspart display-input - The element that displays the selected option's label,
48
+ * an `<input>` element.
49
+ * @csspart listbox - The listbox container where the options are slotted
50
+ * and the filtered options list exists.
51
+ * @csspart filtered-listbox - The container that wraps the filtered options.
52
+ * @csspart clear-button - The clear button.
53
+ * @csspart expand-icon - The container that wraps the expand icon.
54
+ *
55
+ * @animation combobox.show - The animation to use when showing the combobox.
56
+ * @animation combobox.hide - The animation to use when hiding the combobox.
57
+ */
58
+ import { computed, ref } from 'vue';
59
+ import '@synergy-design-system/components/components/combobox/combobox.js';
60
+
61
+ import type { SynChangeEvent } from '@synergy-design-system/components';
62
+ import type { SynClearEvent } from '@synergy-design-system/components';
63
+ import type { SynInputEvent } from '@synergy-design-system/components';
64
+ import type { SynFocusEvent } from '@synergy-design-system/components';
65
+ import type { SynBlurEvent } from '@synergy-design-system/components';
66
+ import type { SynShowEvent } from '@synergy-design-system/components';
67
+ import type { SynAfterShowEvent } from '@synergy-design-system/components';
68
+ import type { SynHideEvent } from '@synergy-design-system/components';
69
+ import type { SynAfterHideEvent } from '@synergy-design-system/components';
70
+ import type { SynInvalidEvent } from '@synergy-design-system/components';
71
+ import type { SynErrorEvent } from '@synergy-design-system/components';
72
+ import type { SynCombobox } from '@synergy-design-system/components';
73
+
74
+ // DOM Reference to the element
75
+ const nativeElement = ref<SynCombobox>();
76
+
77
+ defineExpose({
78
+ nativeElement,
79
+ });
80
+
81
+ // Map attributes
82
+ const props = defineProps<{
83
+ /**
84
+ * The name of the combobox, submitted as a name/value pair with form data.
85
+ */
86
+ name?: SynCombobox['name'];
87
+
88
+ /**
89
+ * The current value of the combobox, submitted as a name/value pair with form data.
90
+ */
91
+ value?: SynCombobox['value'];
92
+
93
+ /**
94
+ * The combobox's size.
95
+ */
96
+ size?: SynCombobox['size'];
97
+
98
+ /**
99
+ * Placeholder text to show as a hint when the combobox is empty.
100
+ */
101
+ placeholder?: SynCombobox['placeholder'];
102
+
103
+ /**
104
+ * Disables the combobox control.
105
+ */
106
+ disabled?: SynCombobox['disabled'];
107
+
108
+ /**
109
+ * Adds a clear button when the combobox is not empty.
110
+ */
111
+ clearable?: SynCombobox['clearable'];
112
+
113
+ /**
114
+ * Indicates whether or not the combobox is open.
115
+ You can toggle this attribute to show and hide the listbox, or you can use the `show()`
116
+ and `hide()` methods and this attribute will reflect the combobox's open state.
117
+ */
118
+ open?: SynCombobox['open'];
119
+
120
+ /**
121
+ * Enable this option to prevent the listbox from being clipped,
122
+ when the component is placed inside a container with `overflow: auto|scroll`.
123
+ Hoisting uses a fixed positioning strategy that works in many, but not all, scenarios.
124
+ */
125
+ hoist?: SynCombobox['hoist'];
126
+
127
+ /**
128
+ * The combobox's label.
129
+ * If you need to display HTML, use the `label` slot instead.
130
+ */
131
+ label?: SynCombobox['label'];
132
+
133
+ /**
134
+ * The preferred placement of the combobox's menu.
135
+ Note that the actual placement may vary as needed to keep the listbox inside of the viewport.
136
+ */
137
+ placement?: SynCombobox['placement'];
138
+
139
+ /**
140
+ * The combobox's help text.
141
+ * If you need to display HTML, use the `help-text` slot instead.
142
+ */
143
+ helpText?: SynCombobox['helpText'];
144
+
145
+ /**
146
+ * By default, form controls are associated with the nearest containing `<form>` element.
147
+ This attribute allows you to place the form control outside of a form and associate it
148
+ with the form that has this `id`.
149
+ The form must be in the same document or shadow root for this to work.
150
+ */
151
+ form?: SynCombobox['form'];
152
+
153
+ /**
154
+ * The combobox's required attribute.
155
+ */
156
+ required?: SynCombobox['required'];
157
+
158
+ /**
159
+ * A function that customizes the rendered option.
160
+ * The first argument is the option, the second
161
+ is the query string, which is typed into the combobox.
162
+ The function should return either a Lit TemplateResult or a string containing trusted HTML
163
+ to render in the shown list of filtered options.
164
+ If the query string should be highlighted use the `highlightOptionRenderer` function.
165
+ */
166
+ getOption?: SynCombobox['getOption'];
167
+
168
+ /**
169
+ * A function used to filter options in the combobox component.
170
+ The default filter method is a case- and diacritic-insensitive string comparison.
171
+ */
172
+ filter?: SynCombobox['filter'];
173
+
174
+ /**
175
+ * Support for two way data binding
176
+ */
177
+ modelValue?: SynCombobox['value'];
178
+ }>();
179
+
180
+ // Make sure prop binding only forwards the props that are actually there.
181
+ // This is needed because :param="param" also adds an empty attribute
182
+ // when using web-components, which breaks optional arguments like size in SynInput
183
+ // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
184
+ const visibleProps = computed(() =>
185
+ Object.fromEntries(
186
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
187
+ ),
188
+ );
189
+
190
+ // Map events
191
+ defineEmits<{
192
+ /**
193
+ * Emitted when the control's value changes.
194
+ */
195
+ 'syn-change': [e: SynChangeEvent];
196
+
197
+ /**
198
+ * Emitted when the control's value is cleared.
199
+ */
200
+ 'syn-clear': [e: SynClearEvent];
201
+
202
+ /**
203
+ * Emitted when the control receives input.
204
+ */
205
+ 'syn-input': [e: SynInputEvent];
206
+
207
+ /**
208
+ * Emitted when the control gains focus.
209
+ */
210
+ 'syn-focus': [e: SynFocusEvent];
211
+
212
+ /**
213
+ * Emitted when the control loses focus.
214
+ */
215
+ 'syn-blur': [e: SynBlurEvent];
216
+
217
+ /**
218
+ * Emitted when the combobox's menu opens.
219
+ */
220
+ 'syn-show': [e: SynShowEvent];
221
+
222
+ /**
223
+ * Emitted after the combobox's menu opens and all animations are complete.
224
+ */
225
+ 'syn-after-show': [e: SynAfterShowEvent];
226
+
227
+ /**
228
+ * Emitted when the combobox's menu closes.
229
+ */
230
+ 'syn-hide': [e: SynHideEvent];
231
+
232
+ /**
233
+ * Emitted after the combobox's menu closes and all animations are complete.
234
+ */
235
+ 'syn-after-hide': [e: SynAfterHideEvent];
236
+
237
+ /**
238
+ * Emitted when the form control has been checked for validity and its constraints aren't satisfied.
239
+ */
240
+ 'syn-invalid': [e: SynInvalidEvent];
241
+
242
+ /**
243
+ * Emitted when the combobox menu fails to open.
244
+ */
245
+ 'syn-error': [e: SynErrorEvent];
246
+
247
+ /**
248
+ * Support for two way data binding
249
+ */
250
+ 'update:modelValue': [newValue: SynCombobox['value']];
251
+ }>();
252
+ </script>
253
+
254
+ <script lang="ts">
255
+ export type { SynChangeEvent } from '@synergy-design-system/components';
256
+ export type { SynClearEvent } from '@synergy-design-system/components';
257
+ export type { SynInputEvent } from '@synergy-design-system/components';
258
+ export type { SynFocusEvent } from '@synergy-design-system/components';
259
+ export type { SynBlurEvent } from '@synergy-design-system/components';
260
+ export type { SynShowEvent } from '@synergy-design-system/components';
261
+ export type { SynAfterShowEvent } from '@synergy-design-system/components';
262
+ export type { SynHideEvent } from '@synergy-design-system/components';
263
+ export type { SynAfterHideEvent } from '@synergy-design-system/components';
264
+ export type { SynInvalidEvent } from '@synergy-design-system/components';
265
+ export type { SynErrorEvent } from '@synergy-design-system/components';
266
+ </script>
267
+
268
+ <template>
269
+ <syn-combobox
270
+ @syn-change="$emit('syn-change', $event)"
271
+ @syn-clear="$emit('syn-clear', $event)"
272
+ @syn-input="
273
+ $emit('update:modelValue', $event.target.value);
274
+ $emit('syn-input', $event);
275
+ "
276
+ @syn-focus="$emit('syn-focus', $event)"
277
+ @syn-blur="$emit('syn-blur', $event)"
278
+ @syn-show="$emit('syn-show', $event)"
279
+ @syn-after-show="$emit('syn-after-show', $event)"
280
+ @syn-hide="$emit('syn-hide', $event)"
281
+ @syn-after-hide="$emit('syn-after-hide', $event)"
282
+ @syn-invalid="$emit('syn-invalid', $event)"
283
+ @syn-error="$emit('syn-error', $event)"
284
+ :value="
285
+ typeof props.modelValue !== 'undefined'
286
+ ? props.modelValue
287
+ : typeof props.value !== 'undefined'
288
+ ? props.value
289
+ : undefined
290
+ "
291
+ v-bind="visibleProps"
292
+ ref="nativeElement">
293
+ <slot></slot>
294
+ </syn-combobox>
295
+ </template>
@@ -35,9 +35,11 @@
35
35
  import { computed, ref } from 'vue';
36
36
  import '@synergy-design-system/components/components/details/details.js';
37
37
 
38
- import type {
39
- SynAfterHideEvent, SynAfterShowEvent, SynDetails, SynHideEvent, SynShowEvent,
40
- } from '@synergy-design-system/components';
38
+ import type { SynShowEvent } from '@synergy-design-system/components';
39
+ import type { SynAfterShowEvent } from '@synergy-design-system/components';
40
+ import type { SynHideEvent } from '@synergy-design-system/components';
41
+ import type { SynAfterHideEvent } from '@synergy-design-system/components';
42
+ import type { SynDetails } from '@synergy-design-system/components';
41
43
 
42
44
  // DOM Reference to the element
43
45
  const nativeElement = ref<SynDetails>();
@@ -53,60 +55,60 @@ const props = defineProps<{
53
55
  * You can toggle this attribute to show and hide the details, or you
54
56
  can use the `show()` and `hide()` methods and this attribute will reflect the details' open state.
55
57
  */
56
- 'open'?: SynDetails['open'];
58
+ open?: SynDetails['open'];
57
59
 
58
60
  /**
59
- * The summary to show in the header.
60
- * If you need to display HTML, use the `summary` slot instead.
61
- */
62
- 'summary'?: SynDetails['summary'];
61
+ * The summary to show in the header.
62
+ * If you need to display HTML, use the `summary` slot instead.
63
+ */
64
+ summary?: SynDetails['summary'];
63
65
 
64
66
  /**
65
- * Disables the details so it can't be toggled.
66
- */
67
- 'disabled'?: SynDetails['disabled'];
67
+ * Disables the details so it can't be toggled.
68
+ */
69
+ disabled?: SynDetails['disabled'];
68
70
 
69
71
  /**
70
- * Draws the details as contained element.
71
- */
72
- 'contained'?: SynDetails['contained'];
72
+ * Draws the details as contained element.
73
+ */
74
+ contained?: SynDetails['contained'];
73
75
 
74
76
  /**
75
- * The details's size.
76
- */
77
- 'size'?: SynDetails['size'];
77
+ * The details's size.
78
+ */
79
+ size?: SynDetails['size'];
78
80
  }>();
79
81
 
80
82
  // Make sure prop binding only forwards the props that are actually there.
81
83
  // This is needed because :param="param" also adds an empty attribute
82
84
  // when using web-components, which breaks optional arguments like size in SynInput
83
85
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
84
- const visibleProps = computed(() => Object.fromEntries(
85
- Object
86
- .entries(props)
87
- .filter(([, value]) => typeof value !== 'undefined'),
88
- ));
86
+ const visibleProps = computed(() =>
87
+ Object.fromEntries(
88
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
89
+ ),
90
+ );
89
91
 
90
92
  // Map events
91
93
  defineEmits<{
92
94
  /**
93
- * Emitted when the details opens.
94
- */
95
+ * Emitted when the details opens.
96
+ */
95
97
  'syn-show': [e: SynShowEvent];
96
98
 
97
99
  /**
98
- * Emitted after the details opens and all animations are complete.
99
- */
100
+ * Emitted after the details opens and all animations are complete.
101
+ */
100
102
  'syn-after-show': [e: SynAfterShowEvent];
101
103
 
102
104
  /**
103
- * Emitted when the details closes.
104
- */
105
+ * Emitted when the details closes.
106
+ */
105
107
  'syn-hide': [e: SynHideEvent];
106
108
 
107
109
  /**
108
- * Emitted after the details closes and all animations are complete.
109
- */
110
+ * Emitted after the details closes and all animations are complete.
111
+ */
110
112
  'syn-after-hide': [e: SynAfterHideEvent];
111
113
  }>();
112
114
  </script>
@@ -120,14 +122,12 @@ export type { SynAfterHideEvent } from '@synergy-design-system/components';
120
122
 
121
123
  <template>
122
124
  <syn-details
123
- v-bind="visibleProps"
124
- ref="nativeElement"
125
125
  @syn-show="$emit('syn-show', $event)"
126
126
  @syn-after-show="$emit('syn-after-show', $event)"
127
-
128
127
  @syn-hide="$emit('syn-hide', $event)"
129
128
  @syn-after-hide="$emit('syn-after-hide', $event)"
130
- >
131
- <slot />
129
+ v-bind="visibleProps"
130
+ ref="nativeElement">
131
+ <slot></slot>
132
132
  </syn-details>
133
133
  </template>