@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
@@ -49,9 +49,13 @@
49
49
  import { computed, ref } from 'vue';
50
50
  import '@synergy-design-system/components/components/input/input.js';
51
51
 
52
- import type {
53
- SynBlurEvent, SynChangeEvent, SynClearEvent, SynFocusEvent, SynInput, SynInputEvent, SynInvalidEvent,
54
- } from '@synergy-design-system/components';
52
+ import type { SynBlurEvent } from '@synergy-design-system/components';
53
+ import type { SynChangeEvent } from '@synergy-design-system/components';
54
+ import type { SynClearEvent } from '@synergy-design-system/components';
55
+ import type { SynFocusEvent } from '@synergy-design-system/components';
56
+ import type { SynInputEvent } from '@synergy-design-system/components';
57
+ import type { SynInvalidEvent } from '@synergy-design-system/components';
58
+ import type { SynInput } from '@synergy-design-system/components';
55
59
 
56
60
  // DOM Reference to the element
57
61
  const nativeElement = ref<SynInput>();
@@ -62,7 +66,7 @@ defineExpose({
62
66
 
63
67
  // Map attributes
64
68
  const props = defineProps<{
65
- 'title'?: SynInput['title'];
69
+ title?: SynInput['title'];
66
70
 
67
71
  /**
68
72
  * The type of input.
@@ -70,71 +74,71 @@ const props = defineProps<{
70
74
  * Defaults
71
75
  to `text`.
72
76
  */
73
- 'type'?: SynInput['type'];
77
+ type?: SynInput['type'];
74
78
 
75
79
  /**
76
- * The name of the input, submitted as a name/value pair with form data.
77
- */
78
- 'name'?: SynInput['name'];
80
+ * The name of the input, submitted as a name/value pair with form data.
81
+ */
82
+ name?: SynInput['name'];
79
83
 
80
84
  /**
81
- * The current value of the input, submitted as a name/value pair with form data.
82
- */
83
- 'value'?: SynInput['value'];
85
+ * The current value of the input, submitted as a name/value pair with form data.
86
+ */
87
+ value?: SynInput['value'];
84
88
 
85
89
  /**
86
- * The input's size.
87
- */
88
- 'size'?: SynInput['size'];
90
+ * The input's size.
91
+ */
92
+ size?: SynInput['size'];
89
93
 
90
94
  /**
91
- * The input's label.
92
- * If you need to display HTML, use the `label` slot instead.
93
- */
94
- 'label'?: SynInput['label'];
95
+ * The input's label.
96
+ * If you need to display HTML, use the `label` slot instead.
97
+ */
98
+ label?: SynInput['label'];
95
99
 
96
100
  /**
97
- * The input's help text.
98
- * If you need to display HTML, use the `help-text` slot instead.
99
- */
100
- 'helpText'?: SynInput['helpText'];
101
+ * The input's help text.
102
+ * If you need to display HTML, use the `help-text` slot instead.
103
+ */
104
+ helpText?: SynInput['helpText'];
101
105
 
102
106
  /**
103
- * Adds a clear button when the input is not empty.
104
- */
105
- 'clearable'?: SynInput['clearable'];
107
+ * Adds a clear button when the input is not empty.
108
+ */
109
+ clearable?: SynInput['clearable'];
106
110
 
107
111
  /**
108
- * Disables the input.
109
- */
110
- 'disabled'?: SynInput['disabled'];
112
+ * Disables the input.
113
+ */
114
+ disabled?: SynInput['disabled'];
111
115
 
112
116
  /**
113
- * Placeholder text to show as a hint when the input is empty.
114
- */
115
- 'placeholder'?: SynInput['placeholder'];
117
+ * Placeholder text to show as a hint when the input is empty.
118
+ */
119
+ placeholder?: SynInput['placeholder'];
116
120
 
117
121
  /**
118
- * Makes the input readonly.
119
- */
120
- 'readonly'?: SynInput['readonly'];
122
+ * Makes the input readonly.
123
+ */
124
+ readonly?: SynInput['readonly'];
121
125
 
122
126
  /**
123
- * Adds a button to toggle the password's visibility.
124
- * Only applies to password types.
125
- */
126
- 'passwordToggle'?: SynInput['passwordToggle'];
127
+ * Adds a button to toggle the password's visibility.
128
+ * Only applies to password types.
129
+ */
130
+ passwordToggle?: SynInput['passwordToggle'];
127
131
 
128
132
  /**
129
- * Determines whether or not the password is currently visible.
130
- * Only applies to password input types.
131
- */
132
- 'passwordVisible'?: SynInput['passwordVisible'];
133
+ * Determines whether or not the password is currently visible.
134
+ * Only applies to password input types.
135
+ */
136
+ passwordVisible?: SynInput['passwordVisible'];
133
137
 
134
138
  /**
135
- * Hides the increment/decrement spin buttons for number inputs.
136
- */
137
- 'noSpinButtons'?: SynInput['noSpinButtons'];
139
+ * Hides the increment/decrement spin buttons for number inputs.
140
+ */
141
+ noSpinButtons?: SynInput['noSpinButtons'];
138
142
 
139
143
  /**
140
144
  * By default, form controls are associated with the nearest containing `<form>` element.
@@ -143,88 +147,88 @@ to place the form control outside of a form and associate it with the form that
143
147
  * The form must be in
144
148
  the same document or shadow root for this to work.
145
149
  */
146
- 'form'?: SynInput['form'];
150
+ form?: SynInput['form'];
147
151
 
148
152
  /**
149
- * Makes the input a required field.
150
- */
151
- 'required'?: SynInput['required'];
153
+ * Makes the input a required field.
154
+ */
155
+ required?: SynInput['required'];
152
156
 
153
157
  /**
154
- * A regular expression pattern to validate input against.
155
- */
156
- 'pattern'?: SynInput['pattern'];
158
+ * A regular expression pattern to validate input against.
159
+ */
160
+ pattern?: SynInput['pattern'];
157
161
 
158
162
  /**
159
- * The minimum length of input that will be considered valid.
160
- */
161
- 'minlength'?: SynInput['minlength'];
163
+ * The minimum length of input that will be considered valid.
164
+ */
165
+ minlength?: SynInput['minlength'];
162
166
 
163
167
  /**
164
- * The maximum length of input that will be considered valid.
165
- */
166
- 'maxlength'?: SynInput['maxlength'];
168
+ * The maximum length of input that will be considered valid.
169
+ */
170
+ maxlength?: SynInput['maxlength'];
167
171
 
168
172
  /**
169
- * The input's minimum value.
170
- * Only applies to date and number input types.
171
- */
172
- 'min'?: SynInput['min'];
173
+ * The input's minimum value.
174
+ * Only applies to date and number input types.
175
+ */
176
+ min?: SynInput['min'];
173
177
 
174
178
  /**
175
- * The input's maximum value.
176
- * Only applies to date and number input types.
177
- */
178
- 'max'?: SynInput['max'];
179
+ * The input's maximum value.
180
+ * Only applies to date and number input types.
181
+ */
182
+ max?: SynInput['max'];
179
183
 
180
184
  /**
181
185
  * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is
182
186
  implied, allowing any numeric value.
183
187
  * Only applies to date and number input types.
184
188
  */
185
- 'step'?: SynInput['step'];
189
+ step?: SynInput['step'];
186
190
 
187
191
  /**
188
- * Controls whether and how text input is automatically capitalized as it is entered by the user.
189
- */
190
- 'autocapitalize'?: SynInput['autocapitalize'];
192
+ * Controls whether and how text input is automatically capitalized as it is entered by the user.
193
+ */
194
+ autocapitalize?: SynInput['autocapitalize'];
191
195
 
192
196
  /**
193
- * Indicates whether the browser's autocorrect feature is on or off.
194
- */
195
- 'autocorrect'?: SynInput['autocorrect'];
197
+ * Indicates whether the browser's autocorrect feature is on or off.
198
+ */
199
+ autocorrect?: SynInput['autocorrect'];
196
200
 
197
201
  /**
198
202
  * Specifies what permission the browser has to provide assistance in filling out form field values.
199
203
  * Refer to
200
204
  [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
201
205
  */
202
- 'autocomplete'?: SynInput['autocomplete'];
206
+ autocomplete?: SynInput['autocomplete'];
203
207
 
204
208
  /**
205
- * Indicates that the input should receive focus on page load.
206
- */
207
- 'autofocus'?: SynInput['autofocus'];
209
+ * Indicates that the input should receive focus on page load.
210
+ */
211
+ autofocus?: SynInput['autofocus'];
208
212
 
209
213
  /**
210
- * Used to customize the label or icon of the Enter key on virtual keyboards.
211
- */
212
- 'enterkeyhint'?: SynInput['enterkeyhint'];
214
+ * Used to customize the label or icon of the Enter key on virtual keyboards.
215
+ */
216
+ enterkeyhint?: SynInput['enterkeyhint'];
213
217
 
214
218
  /**
215
- * Enables spell checking on the input.
216
- */
217
- 'spellcheck'?: SynInput['spellcheck'];
219
+ * Enables spell checking on the input.
220
+ */
221
+ spellcheck?: SynInput['spellcheck'];
218
222
 
219
223
  /**
220
224
  * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
221
225
  keyboard on supportive devices.
222
226
  */
223
- 'inputmode'?: SynInput['inputmode'];
227
+ inputmode?: SynInput['inputmode'];
224
228
 
225
229
  /**
226
- * Support for two way data binding
227
- */
230
+ * Support for two way data binding
231
+ */
228
232
  modelValue?: SynInput['value'];
229
233
  }>();
230
234
 
@@ -232,47 +236,47 @@ keyboard on supportive devices.
232
236
  // This is needed because :param="param" also adds an empty attribute
233
237
  // when using web-components, which breaks optional arguments like size in SynInput
234
238
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
235
- const visibleProps = computed(() => Object.fromEntries(
236
- Object
237
- .entries(props)
238
- .filter(([, value]) => typeof value !== 'undefined'),
239
- ));
239
+ const visibleProps = computed(() =>
240
+ Object.fromEntries(
241
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
242
+ ),
243
+ );
240
244
 
241
245
  // Map events
242
246
  defineEmits<{
243
247
  /**
244
- * Emitted when the control loses focus.
245
- */
248
+ * Emitted when the control loses focus.
249
+ */
246
250
  'syn-blur': [e: SynBlurEvent];
247
251
 
248
252
  /**
249
- * Emitted when an alteration to the control's value is committed by the user.
250
- */
253
+ * Emitted when an alteration to the control's value is committed by the user.
254
+ */
251
255
  'syn-change': [e: SynChangeEvent];
252
256
 
253
257
  /**
254
- * Emitted when the clear button is activated.
255
- */
258
+ * Emitted when the clear button is activated.
259
+ */
256
260
  'syn-clear': [e: SynClearEvent];
257
261
 
258
262
  /**
259
- * Emitted when the control gains focus.
260
- */
263
+ * Emitted when the control gains focus.
264
+ */
261
265
  'syn-focus': [e: SynFocusEvent];
262
266
 
263
267
  /**
264
- * Emitted when the control receives input.
265
- */
268
+ * Emitted when the control receives input.
269
+ */
266
270
  'syn-input': [e: SynInputEvent];
267
271
 
268
272
  /**
269
- * Emitted when the form control has been checked for validity and its constraints aren't satisfied.
270
- */
273
+ * Emitted when the form control has been checked for validity and its constraints aren't satisfied.
274
+ */
271
275
  'syn-invalid': [e: SynInvalidEvent];
272
276
 
273
277
  /**
274
- * Support for two way data binding
275
- */
278
+ * Support for two way data binding
279
+ */
276
280
  'update:modelValue': [newValue: SynInput['value']];
277
281
  }>();
278
282
  </script>
@@ -288,16 +292,24 @@ export type { SynInvalidEvent } from '@synergy-design-system/components';
288
292
 
289
293
  <template>
290
294
  <syn-input
291
- v-bind="visibleProps"
292
- ref="nativeElement"
293
- :value="typeof props.modelValue !== 'undefined' ? props.modelValue : typeof props.value !== 'undefined' ? props.value : undefined"
294
295
  @syn-blur="$emit('syn-blur', $event)"
295
296
  @syn-change="$emit('syn-change', $event)"
296
297
  @syn-clear="$emit('syn-clear', $event)"
297
298
  @syn-focus="$emit('syn-focus', $event)"
298
- @syn-input="$emit('update:modelValue', $event.target.value); $emit('syn-input', $event)"
299
+ @syn-input="
300
+ $emit('update:modelValue', $event.target.value);
301
+ $emit('syn-input', $event);
302
+ "
299
303
  @syn-invalid="$emit('syn-invalid', $event)"
300
- >
301
- <slot />
304
+ :value="
305
+ typeof props.modelValue !== 'undefined'
306
+ ? props.modelValue
307
+ : typeof props.value !== 'undefined'
308
+ ? props.value
309
+ : undefined
310
+ "
311
+ v-bind="visibleProps"
312
+ ref="nativeElement">
313
+ <slot></slot>
302
314
  </syn-input>
303
315
  </template>
@@ -18,7 +18,8 @@
18
18
  import { computed, ref } from 'vue';
19
19
  import '@synergy-design-system/components/components/menu/menu.js';
20
20
 
21
- import type { SynMenu, SynSelectEvent } from '@synergy-design-system/components';
21
+ import type { SynSelectEvent } from '@synergy-design-system/components';
22
+ import type { SynMenu } from '@synergy-design-system/components';
22
23
 
23
24
  // DOM Reference to the element
24
25
  const nativeElement = ref<SynMenu>();
@@ -30,8 +31,8 @@ defineExpose({
30
31
  // Map events
31
32
  defineEmits<{
32
33
  /**
33
- * Emitted when a menu item is selected.
34
- */
34
+ * Emitted when a menu item is selected.
35
+ */
35
36
  'syn-select': [e: SynSelectEvent];
36
37
  }>();
37
38
  </script>
@@ -41,11 +42,7 @@ export type { SynSelectEvent } from '@synergy-design-system/components';
41
42
  </script>
42
43
 
43
44
  <template>
44
- <syn-menu
45
- ref="nativeElement"
46
-
47
- @syn-select="$emit('syn-select', $event)"
48
- >
49
- <slot />
45
+ <syn-menu @syn-select="$emit('syn-select', $event)" ref="nativeElement">
46
+ <slot></slot>
50
47
  </syn-menu>
51
48
  </template>
@@ -46,51 +46,46 @@ defineExpose({
46
46
  // Map attributes
47
47
  const props = defineProps<{
48
48
  /**
49
- * The type of menu item to render.
50
- * To use `checked`, this value must be set to `checkbox`.
51
- */
52
- 'type'?: SynMenuItem['type'];
49
+ * The type of menu item to render.
50
+ * To use `checked`, this value must be set to `checkbox`.
51
+ */
52
+ type?: SynMenuItem['type'];
53
53
 
54
54
  /**
55
- * Draws the item in a checked state.
56
- */
57
- 'checked'?: SynMenuItem['checked'];
55
+ * Draws the item in a checked state.
56
+ */
57
+ checked?: SynMenuItem['checked'];
58
58
 
59
59
  /**
60
- * A unique value to store in the menu item.
61
- * This can be used as a way to identify menu items when selected.
62
- */
63
- 'value'?: SynMenuItem['value'];
60
+ * A unique value to store in the menu item.
61
+ * This can be used as a way to identify menu items when selected.
62
+ */
63
+ value?: SynMenuItem['value'];
64
64
 
65
65
  /**
66
- * Draws the menu item in a loading state.
67
- */
68
- 'loading'?: SynMenuItem['loading'];
66
+ * Draws the menu item in a loading state.
67
+ */
68
+ loading?: SynMenuItem['loading'];
69
69
 
70
70
  /**
71
- * Draws the menu item in a disabled state, preventing selection.
72
- */
73
- 'disabled'?: SynMenuItem['disabled'];
71
+ * Draws the menu item in a disabled state, preventing selection.
72
+ */
73
+ disabled?: SynMenuItem['disabled'];
74
74
  }>();
75
75
 
76
76
  // Make sure prop binding only forwards the props that are actually there.
77
77
  // This is needed because :param="param" also adds an empty attribute
78
78
  // when using web-components, which breaks optional arguments like size in SynInput
79
79
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
80
- const visibleProps = computed(() => Object.fromEntries(
81
- Object
82
- .entries(props)
83
- .filter(([, value]) => typeof value !== 'undefined'),
84
- ));
85
-
80
+ const visibleProps = computed(() =>
81
+ Object.fromEntries(
82
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
83
+ ),
84
+ );
86
85
  </script>
87
86
 
88
87
  <template>
89
- <syn-menu-item
90
-
91
- v-bind="visibleProps"
92
- ref="nativeElement"
93
- >
94
- <slot />
88
+ <syn-menu-item v-bind="visibleProps" ref="nativeElement">
89
+ <slot></slot>
95
90
  </syn-menu-item>
96
91
  </template>
@@ -32,14 +32,10 @@ const nativeElement = ref<SynMenuLabel>();
32
32
  defineExpose({
33
33
  nativeElement,
34
34
  });
35
-
36
35
  </script>
37
36
 
38
37
  <template>
39
- <syn-menu-label
40
-
41
- ref="nativeElement"
42
- >
43
- <slot />
38
+ <syn-menu-label ref="nativeElement">
39
+ <slot></slot>
44
40
  </syn-menu-label>
45
41
  </template>
@@ -53,9 +53,11 @@
53
53
  import { computed, ref } from 'vue';
54
54
  import '@synergy-design-system/components/components/nav-item/nav-item.js';
55
55
 
56
- import type {
57
- SynBlurEvent, SynFocusEvent, SynHideEvent, SynNavItem, SynShowEvent,
58
- } from '@synergy-design-system/components';
56
+ import type { SynShowEvent } from '@synergy-design-system/components';
57
+ import type { SynHideEvent } from '@synergy-design-system/components';
58
+ import type { SynBlurEvent } from '@synergy-design-system/components';
59
+ import type { SynFocusEvent } from '@synergy-design-system/components';
60
+ import type { SynNavItem } from '@synergy-design-system/components';
59
61
 
60
62
  // DOM Reference to the element
61
63
  const nativeElement = ref<SynNavItem>();
@@ -73,69 +75,69 @@ If provided, the navigation item will use an anchor tag otherwise it will use a
73
75
  If the 'children' slot is provided, the navigation item will ignore the 'href' and use
74
76
  accordion behavior.
75
77
  */
76
- 'href'?: SynNavItem['href'];
78
+ href?: SynNavItem['href'];
77
79
 
78
- 'current'?: SynNavItem['current'];
80
+ current?: SynNavItem['current'];
79
81
 
80
82
  /**
81
- * Disables the navigation item.
82
- */
83
- 'disabled'?: SynNavItem['disabled'];
83
+ * Disables the navigation item.
84
+ */
85
+ disabled?: SynNavItem['disabled'];
84
86
 
85
87
  /**
86
- * The navigation item's orientation.
87
- */
88
- 'horizontal'?: SynNavItem['horizontal'];
88
+ * The navigation item's orientation.
89
+ */
90
+ horizontal?: SynNavItem['horizontal'];
89
91
 
90
92
  /**
91
93
  * Appends a chevron to the right side of a navigation item.
92
94
  Only used if `horizontal` is false.
93
95
  */
94
- 'chevron'?: SynNavItem['chevron'];
96
+ chevron?: SynNavItem['chevron'];
95
97
 
96
98
  /**
97
99
  * Reflects HTML details element state and allows control from parent.
98
100
  Only used if `horizontal` is false and `children` is defined.
99
101
  */
100
- 'open'?: SynNavItem['open'];
102
+ open?: SynNavItem['open'];
101
103
 
102
104
  /**
103
105
  * Toggle to true to show a divider above the element.
104
106
  Only available when horizontal is false.
105
107
  */
106
- 'divider'?: SynNavItem['divider'];
108
+ divider?: SynNavItem['divider'];
107
109
  }>();
108
110
 
109
111
  // Make sure prop binding only forwards the props that are actually there.
110
112
  // This is needed because :param="param" also adds an empty attribute
111
113
  // when using web-components, which breaks optional arguments like size in SynInput
112
114
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
113
- const visibleProps = computed(() => Object.fromEntries(
114
- Object
115
- .entries(props)
116
- .filter(([, value]) => typeof value !== 'undefined'),
117
- ));
115
+ const visibleProps = computed(() =>
116
+ Object.fromEntries(
117
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
118
+ ),
119
+ );
118
120
 
119
121
  // Map events
120
122
  defineEmits<{
121
123
  /**
122
- * Emitted when the navigation item: - has children, - and is clicked while HTML details are hidden.
123
- */
124
+ * Emitted when the navigation item: - has children, - and is clicked while HTML details are hidden.
125
+ */
124
126
  'syn-show': [e: SynShowEvent];
125
127
 
126
128
  /**
127
- * Emitted when the navigation item: - has children, - and is clicked while HTML details are shown.
128
- */
129
+ * Emitted when the navigation item: - has children, - and is clicked while HTML details are shown.
130
+ */
129
131
  'syn-hide': [e: SynHideEvent];
130
132
 
131
133
  /**
132
- * Emitted when the button loses focus.
133
- */
134
+ * Emitted when the button loses focus.
135
+ */
134
136
  'syn-blur': [e: SynBlurEvent];
135
137
 
136
138
  /**
137
- * Emitted when the button gains focus.
138
- */
139
+ * Emitted when the button gains focus.
140
+ */
139
141
  'syn-focus': [e: SynFocusEvent];
140
142
  }>();
141
143
  </script>
@@ -149,14 +151,12 @@ export type { SynFocusEvent } from '@synergy-design-system/components';
149
151
 
150
152
  <template>
151
153
  <syn-nav-item
152
- v-bind="visibleProps"
153
- ref="nativeElement"
154
154
  @syn-show="$emit('syn-show', $event)"
155
155
  @syn-hide="$emit('syn-hide', $event)"
156
-
157
156
  @syn-blur="$emit('syn-blur', $event)"
158
157
  @syn-focus="$emit('syn-focus', $event)"
159
- >
160
- <slot />
158
+ v-bind="visibleProps"
159
+ ref="nativeElement">
160
+ <slot></slot>
161
161
  </syn-nav-item>
162
162
  </template>
@@ -42,35 +42,30 @@ defineExpose({
42
42
  // Map attributes
43
43
  const props = defineProps<{
44
44
  /**
45
- * Disables all options in the optgroup.
46
- */
47
- 'disabled'?: SynOptgroup['disabled'];
45
+ * Disables all options in the optgroup.
46
+ */
47
+ disabled?: SynOptgroup['disabled'];
48
48
 
49
49
  /**
50
- * The optgroups label.
51
- * If you need to display HTML, use the `label` slot instead.
52
- */
53
- 'label'?: SynOptgroup['label'];
50
+ * The optgroups label.
51
+ * If you need to display HTML, use the `label` slot instead.
52
+ */
53
+ label?: SynOptgroup['label'];
54
54
  }>();
55
55
 
56
56
  // Make sure prop binding only forwards the props that are actually there.
57
57
  // This is needed because :param="param" also adds an empty attribute
58
58
  // when using web-components, which breaks optional arguments like size in SynInput
59
59
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
60
- const visibleProps = computed(() => Object.fromEntries(
61
- Object
62
- .entries(props)
63
- .filter(([, value]) => typeof value !== 'undefined'),
64
- ));
65
-
60
+ const visibleProps = computed(() =>
61
+ Object.fromEntries(
62
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
63
+ ),
64
+ );
66
65
  </script>
67
66
 
68
67
  <template>
69
- <syn-optgroup
70
-
71
- v-bind="visibleProps"
72
- ref="nativeElement"
73
- >
74
- <slot />
68
+ <syn-optgroup v-bind="visibleProps" ref="nativeElement">
69
+ <slot></slot>
75
70
  </syn-optgroup>
76
71
  </template>