@synergy-design-system/vue 2.7.2 → 2.7.3

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 (84) 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/SynVueDetails.vue.d.ts +23 -19
  9. package/dist/components/SynVueDialog.vue.d.ts +7 -1
  10. package/dist/components/SynVueDivider.vue.d.ts +4 -4
  11. package/dist/components/SynVueDrawer.vue.d.ts +11 -5
  12. package/dist/components/SynVueDropdown.vue.d.ts +21 -17
  13. package/dist/components/SynVueFile.vue.d.ts +40 -35
  14. package/dist/components/SynVueHeader.vue.d.ts +10 -7
  15. package/dist/components/SynVueIcon.vue.d.ts +13 -11
  16. package/dist/components/SynVueIconButton.vue.d.ts +37 -35
  17. package/dist/components/SynVueInput.vue.d.ts +115 -109
  18. package/dist/components/SynVueMenu.vue.d.ts +2 -1
  19. package/dist/components/SynVueMenuItem.vue.d.ts +24 -24
  20. package/dist/components/SynVueNavItem.vue.d.ts +13 -9
  21. package/dist/components/SynVueOptgroup.vue.d.ts +10 -10
  22. package/dist/components/SynVueOption.vue.d.ts +4 -4
  23. package/dist/components/SynVuePopup.vue.d.ts +34 -33
  24. package/dist/components/SynVueProgressBar.vue.d.ts +12 -12
  25. package/dist/components/SynVueProgressRing.vue.d.ts +8 -8
  26. package/dist/components/SynVueRadio.vue.d.ts +13 -11
  27. package/dist/components/SynVueRadioButton.vue.d.ts +17 -15
  28. package/dist/components/SynVueRadioGroup.vue.d.ts +32 -29
  29. package/dist/components/SynVueRange.vue.d.ts +57 -51
  30. package/dist/components/SynVueRangeTick.vue.d.ts +4 -4
  31. package/dist/components/SynVueSelect.vue.d.ts +55 -45
  32. package/dist/components/SynVueSideNav.vue.d.ts +5 -1
  33. package/dist/components/SynVueSwitch.vue.d.ts +40 -35
  34. package/dist/components/SynVueTab.vue.d.ts +20 -19
  35. package/dist/components/SynVueTabGroup.vue.d.ts +21 -19
  36. package/dist/components/SynVueTabPanel.vue.d.ts +8 -8
  37. package/dist/components/SynVueTag.vue.d.ts +10 -9
  38. package/dist/components/SynVueTextarea.vue.d.ts +86 -81
  39. package/dist/components/SynVueTooltip.vue.d.ts +29 -25
  40. package/package.json +2 -2
  41. package/src/components/SynVueAccordion.vue +16 -21
  42. package/src/components/SynVueAlert.vue +29 -29
  43. package/src/components/SynVueBadge.vue +10 -15
  44. package/src/components/SynVueBreadcrumb.vue +8 -13
  45. package/src/components/SynVueBreadcrumbItem.vue +16 -21
  46. package/src/components/SynVueButton.vue +66 -67
  47. package/src/components/SynVueButtonGroup.vue +8 -13
  48. package/src/components/SynVueCard.vue +12 -17
  49. package/src/components/SynVueCheckbox.vue +64 -53
  50. package/src/components/SynVueDetails.vue +35 -35
  51. package/src/components/SynVueDialog.vue +33 -31
  52. package/src/components/SynVueDivider.vue +9 -14
  53. package/src/components/SynVueDrawer.vue +37 -35
  54. package/src/components/SynVueDropdown.vue +37 -37
  55. package/src/components/SynVueFile.vue +69 -58
  56. package/src/components/SynVueHeader.vue +23 -24
  57. package/src/components/SynVueIcon.vue +26 -25
  58. package/src/components/SynVueIconButton.vue +42 -41
  59. package/src/components/SynVueInput.vue +123 -111
  60. package/src/components/SynVueMenu.vue +6 -9
  61. package/src/components/SynVueMenuItem.vue +24 -29
  62. package/src/components/SynVueMenuLabel.vue +2 -6
  63. package/src/components/SynVueNavItem.vue +32 -32
  64. package/src/components/SynVueOptgroup.vue +14 -19
  65. package/src/components/SynVueOption.vue +11 -16
  66. package/src/components/SynVuePopup.vue +51 -52
  67. package/src/components/SynVuePrioNav.vue +2 -6
  68. package/src/components/SynVueProgressBar.vue +16 -21
  69. package/src/components/SynVueProgressRing.vue +13 -18
  70. package/src/components/SynVueRadio.vue +23 -23
  71. package/src/components/SynVueRadioButton.vue +26 -26
  72. package/src/components/SynVueRadioGroup.vue +52 -43
  73. package/src/components/SynVueRange.vue +77 -65
  74. package/src/components/SynVueRangeTick.vue +10 -15
  75. package/src/components/SynVueSelect.vue +90 -74
  76. package/src/components/SynVueSideNav.vue +24 -24
  77. package/src/components/SynVueSpinner.vue +1 -5
  78. package/src/components/SynVueSwitch.vue +63 -52
  79. package/src/components/SynVueTab.vue +25 -26
  80. package/src/components/SynVueTabGroup.vue +31 -31
  81. package/src/components/SynVueTabPanel.vue +13 -18
  82. package/src/components/SynVueTag.vue +18 -19
  83. package/src/components/SynVueTextarea.vue +99 -88
  84. package/src/components/SynVueTooltip.vue +41 -41
@@ -45,32 +45,27 @@ from other options in the same group.
45
45
  * Values may not contain spaces, as spaces are used as delimiters when listing
46
46
  multiple values.
47
47
  */
48
- 'value'?: SynOption['value'];
48
+ value?: SynOption['value'];
49
49
 
50
50
  /**
51
- * Draws the option in a disabled state, preventing selection.
52
- */
53
- 'disabled'?: SynOption['disabled'];
51
+ * Draws the option in a disabled state, preventing selection.
52
+ */
53
+ disabled?: SynOption['disabled'];
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-option
70
-
71
- v-bind="visibleProps"
72
- ref="nativeElement"
73
- >
74
- <slot />
68
+ <syn-option v-bind="visibleProps" ref="nativeElement">
69
+ <slot></slot>
75
70
  </syn-option>
76
71
  </template>
@@ -37,7 +37,8 @@
37
37
  import { computed, ref } from 'vue';
38
38
  import '@synergy-design-system/components/components/popup/popup.js';
39
39
 
40
- import type { SynPopup, SynRepositionEvent } from '@synergy-design-system/components';
40
+ import type { SynRepositionEvent } from '@synergy-design-system/components';
41
+ import type { SynPopup } from '@synergy-design-system/components';
41
42
 
42
43
  // DOM Reference to the element
43
44
  const nativeElement = ref<SynPopup>();
@@ -55,38 +56,38 @@ element `id`, a DOM element reference, or a `VirtualElement`.
55
56
  * If the anchor lives inside the popup, use the
56
57
  `anchor` slot instead.
57
58
  */
58
- 'anchor'?: SynPopup['anchor'];
59
+ anchor?: SynPopup['anchor'];
59
60
 
60
61
  /**
61
62
  * Activates the positioning logic and shows the popup.
62
63
  * When this attribute is removed, the positioning logic is torn
63
64
  down and the popup will be hidden.
64
65
  */
65
- 'active'?: SynPopup['active'];
66
+ active?: SynPopup['active'];
66
67
 
67
68
  /**
68
69
  * The preferred placement of the popup.
69
70
  * Note that the actual placement will vary as configured to keep the
70
71
  panel inside of the viewport.
71
72
  */
72
- 'placement'?: SynPopup['placement'];
73
+ placement?: SynPopup['placement'];
73
74
 
74
75
  /**
75
76
  * Determines how the popup is positioned.
76
77
  * The `absolute` strategy works well in most cases, but if overflow is
77
78
  clipped, using a `fixed` position strategy can often workaround it.
78
79
  */
79
- 'strategy'?: SynPopup['strategy'];
80
+ strategy?: SynPopup['strategy'];
80
81
 
81
82
  /**
82
- * The distance in pixels from which to offset the panel away from its anchor.
83
- */
84
- 'distance'?: SynPopup['distance'];
83
+ * The distance in pixels from which to offset the panel away from its anchor.
84
+ */
85
+ distance?: SynPopup['distance'];
85
86
 
86
87
  /**
87
- * The distance in pixels from which to offset the panel along its anchor.
88
- */
89
- 'skidding'?: SynPopup['skidding'];
88
+ * The distance in pixels from which to offset the panel along its anchor.
89
+ */
90
+ skidding?: SynPopup['skidding'];
90
91
 
91
92
  /**
92
93
  * Attaches an arrow to the popup.
@@ -95,7 +96,7 @@ clipped, using a `fixed` position strategy can often workaround it.
95
96
  * For additional customizations, you can also target the arrow using
96
97
  `::part(arrow)` in your stylesheet.
97
98
  */
98
- 'arrow'?: SynPopup['arrow'];
99
+ arrow?: SynPopup['arrow'];
99
100
 
100
101
  /**
101
102
  * The placement of the arrow.
@@ -104,21 +105,21 @@ anchor as possible, considering available space and `arrow-padding`.
104
105
  * A value of `start`, `end`, or `center` will
105
106
  align the arrow to the start, end, or center of the popover instead.
106
107
  */
107
- 'arrowPlacement'?: SynPopup['arrowPlacement'];
108
+ arrowPlacement?: SynPopup['arrowPlacement'];
108
109
 
109
110
  /**
110
111
  * The amount of padding between the arrow and the edges of the popup.
111
112
  * If the popup has a border-radius, for example,
112
113
  this will prevent it from overflowing the corners.
113
114
  */
114
- 'arrowPadding'?: SynPopup['arrowPadding'];
115
+ arrowPadding?: SynPopup['arrowPadding'];
115
116
 
116
117
  /**
117
118
  * When set, placement of the popup will flip to the opposite site to keep it in view.
118
119
  * You can use
119
120
  `flipFallbackPlacements` to further configure how the fallback placement is determined.
120
121
  */
121
- 'flip'?: SynPopup['flip'];
122
+ flip?: SynPopup['flip'];
122
123
 
123
124
  /**
124
125
  * If the preferred placement doesn't fit, popup will be tested in these fallback placements until one fits.
@@ -128,14 +129,14 @@ string of any number of placements separated by a space, e.g.
128
129
  * If no placement fits, the flip
129
130
  fallback strategy will be used instead.
130
131
  */
131
- 'flipFallbackPlacements'?: SynPopup['flipFallbackPlacements'];
132
+ flipFallbackPlacements?: SynPopup['flipFallbackPlacements'];
132
133
 
133
134
  /**
134
135
  * When neither the preferred placement nor the fallback placements fit, this value will be used to determine whether
135
136
  the popup should be positioned using the best available fit based on available space or as it was initially
136
137
  preferred.
137
138
  */
138
- 'flipFallbackStrategy'?: SynPopup['flipFallbackStrategy'];
139
+ flipFallbackStrategy?: SynPopup['flipFallbackStrategy'];
139
140
 
140
141
  /**
141
142
  * The flip boundary describes clipping element(s) that overflow will be checked relative to when flipping.
@@ -144,17 +145,17 @@ default, the boundary includes overflow ancestors that will cause the element to
144
145
  * If needed, you can
145
146
  change the boundary by passing a reference to one or more elements to this property.
146
147
  */
147
- 'flipBoundary'?: SynPopup['flipBoundary'];
148
+ flipBoundary?: SynPopup['flipBoundary'];
148
149
 
149
150
  /**
150
- * The amount of padding, in pixels, to exceed before the flip behavior will occur.
151
- */
152
- 'flipPadding'?: SynPopup['flipPadding'];
151
+ * The amount of padding, in pixels, to exceed before the flip behavior will occur.
152
+ */
153
+ flipPadding?: SynPopup['flipPadding'];
153
154
 
154
155
  /**
155
- * Moves the popup along the axis to keep it in view when clipped.
156
- */
157
- 'shift'?: SynPopup['shift'];
156
+ * Moves the popup along the axis to keep it in view when clipped.
157
+ */
158
+ shift?: SynPopup['shift'];
158
159
 
159
160
  /**
160
161
  * The shift boundary describes clipping element(s) that overflow will be checked relative to when shifting.
@@ -163,22 +164,22 @@ default, the boundary includes overflow ancestors that will cause the element to
163
164
  * If needed, you can
164
165
  change the boundary by passing a reference to one or more elements to this property.
165
166
  */
166
- 'shiftBoundary'?: SynPopup['shiftBoundary'];
167
+ shiftBoundary?: SynPopup['shiftBoundary'];
167
168
 
168
169
  /**
169
- * The amount of padding, in pixels, to exceed before the shift behavior will occur.
170
- */
171
- 'shiftPadding'?: SynPopup['shiftPadding'];
170
+ * The amount of padding, in pixels, to exceed before the shift behavior will occur.
171
+ */
172
+ shiftPadding?: SynPopup['shiftPadding'];
172
173
 
173
174
  /**
174
- * When set, this will cause the popup to automatically resize itself to prevent it from overflowing.
175
- */
176
- 'autoSize'?: SynPopup['autoSize'];
175
+ * When set, this will cause the popup to automatically resize itself to prevent it from overflowing.
176
+ */
177
+ autoSize?: SynPopup['autoSize'];
177
178
 
178
179
  /**
179
- * Syncs the popup's width or height to that of the anchor element.
180
- */
181
- 'sync'?: SynPopup['sync'];
180
+ * Syncs the popup's width or height to that of the anchor element.
181
+ */
182
+ sync?: SynPopup['sync'];
182
183
 
183
184
  /**
184
185
  * The auto-size boundary describes clipping element(s) that overflow will be checked relative to when resizing.
@@ -187,12 +188,12 @@ default, the boundary includes overflow ancestors that will cause the element to
187
188
  * If needed, you can
188
189
  change the boundary by passing a reference to one or more elements to this property.
189
190
  */
190
- 'autoSizeBoundary'?: SynPopup['autoSizeBoundary'];
191
+ autoSizeBoundary?: SynPopup['autoSizeBoundary'];
191
192
 
192
193
  /**
193
- * The amount of padding, in pixels, to exceed before the auto-size behavior will occur.
194
- */
195
- 'autoSizePadding'?: SynPopup['autoSizePadding'];
194
+ * The amount of padding, in pixels, to exceed before the auto-size behavior will occur.
195
+ */
196
+ autoSizePadding?: SynPopup['autoSizePadding'];
196
197
 
197
198
  /**
198
199
  * When a gap exists between the anchor and the popup element, this option will add a "hover bridge" that fills the
@@ -202,25 +203,25 @@ because the pointer never technically leaves the element.
202
203
  * The hover bridge will only be drawn when the popover is
203
204
  active.
204
205
  */
205
- 'hoverBridge'?: SynPopup['hoverBridge'];
206
+ hoverBridge?: SynPopup['hoverBridge'];
206
207
  }>();
207
208
 
208
209
  // Make sure prop binding only forwards the props that are actually there.
209
210
  // This is needed because :param="param" also adds an empty attribute
210
211
  // when using web-components, which breaks optional arguments like size in SynInput
211
212
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
212
- const visibleProps = computed(() => Object.fromEntries(
213
- Object
214
- .entries(props)
215
- .filter(([, value]) => typeof value !== 'undefined'),
216
- ));
213
+ const visibleProps = computed(() =>
214
+ Object.fromEntries(
215
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
216
+ ),
217
+ );
217
218
 
218
219
  // Map events
219
220
  defineEmits<{
220
221
  /**
221
- * Emitted when the popup is repositioned.
222
- * This event can fire a lot, so avoid putting expensive operations in your listener or consider debouncing it.
223
- */
222
+ * Emitted when the popup is repositioned.
223
+ * This event can fire a lot, so avoid putting expensive operations in your listener or consider debouncing it.
224
+ */
224
225
  'syn-reposition': [e: SynRepositionEvent];
225
226
  }>();
226
227
  </script>
@@ -231,11 +232,9 @@ export type { SynRepositionEvent } from '@synergy-design-system/components';
231
232
 
232
233
  <template>
233
234
  <syn-popup
234
- v-bind="visibleProps"
235
-
236
- ref="nativeElement"
237
235
  @syn-reposition="$emit('syn-reposition', $event)"
238
- >
239
- <slot />
236
+ v-bind="visibleProps"
237
+ ref="nativeElement">
238
+ <slot></slot>
240
239
  </syn-popup>
241
240
  </template>
@@ -50,14 +50,10 @@ const nativeElement = ref<SynPrioNav>();
50
50
  defineExpose({
51
51
  nativeElement,
52
52
  });
53
-
54
53
  </script>
55
54
 
56
55
  <template>
57
- <syn-prio-nav
58
-
59
- ref="nativeElement"
60
- >
61
- <slot />
56
+ <syn-prio-nav ref="nativeElement">
57
+ <slot></slot>
62
58
  </syn-prio-nav>
63
59
  </template>
@@ -38,39 +38,34 @@ defineExpose({
38
38
  // Map attributes
39
39
  const props = defineProps<{
40
40
  /**
41
- * The current progress as a percentage, 0 to 100.
42
- */
43
- 'value'?: SynProgressBar['value'];
41
+ * The current progress as a percentage, 0 to 100.
42
+ */
43
+ value?: SynProgressBar['value'];
44
44
 
45
45
  /**
46
- * When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state.
47
- */
48
- 'indeterminate'?: SynProgressBar['indeterminate'];
46
+ * When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state.
47
+ */
48
+ indeterminate?: SynProgressBar['indeterminate'];
49
49
 
50
50
  /**
51
- * A custom label for assistive devices.
52
- */
53
- 'label'?: SynProgressBar['label'];
51
+ * A custom label for assistive devices.
52
+ */
53
+ label?: SynProgressBar['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-progress-bar
70
-
71
- v-bind="visibleProps"
72
- ref="nativeElement"
73
- >
74
- <slot />
68
+ <syn-progress-bar v-bind="visibleProps" ref="nativeElement">
69
+ <slot></slot>
75
70
  </syn-progress-bar>
76
71
  </template>
@@ -38,34 +38,29 @@ defineExpose({
38
38
  // Map attributes
39
39
  const props = defineProps<{
40
40
  /**
41
- * The current progress as a percentage, 0 to 100.
42
- */
43
- 'value'?: SynProgressRing['value'];
41
+ * The current progress as a percentage, 0 to 100.
42
+ */
43
+ value?: SynProgressRing['value'];
44
44
 
45
45
  /**
46
- * A custom label for assistive devices.
47
- */
48
- 'label'?: SynProgressRing['label'];
46
+ * A custom label for assistive devices.
47
+ */
48
+ label?: SynProgressRing['label'];
49
49
  }>();
50
50
 
51
51
  // Make sure prop binding only forwards the props that are actually there.
52
52
  // This is needed because :param="param" also adds an empty attribute
53
53
  // when using web-components, which breaks optional arguments like size in SynInput
54
54
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
55
- const visibleProps = computed(() => Object.fromEntries(
56
- Object
57
- .entries(props)
58
- .filter(([, value]) => typeof value !== 'undefined'),
59
- ));
60
-
55
+ const visibleProps = computed(() =>
56
+ Object.fromEntries(
57
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
58
+ ),
59
+ );
61
60
  </script>
62
61
 
63
62
  <template>
64
- <syn-progress-ring
65
-
66
- v-bind="visibleProps"
67
- ref="nativeElement"
68
- >
69
- <slot />
63
+ <syn-progress-ring v-bind="visibleProps" ref="nativeElement">
64
+ <slot></slot>
70
65
  </syn-progress-ring>
71
66
  </template>
@@ -27,7 +27,9 @@
27
27
  import { computed, ref } from 'vue';
28
28
  import '@synergy-design-system/components/components/radio/radio.js';
29
29
 
30
- import type { SynBlurEvent, SynFocusEvent, SynRadio } from '@synergy-design-system/components';
30
+ import type { SynBlurEvent } from '@synergy-design-system/components';
31
+ import type { SynFocusEvent } from '@synergy-design-system/components';
32
+ import type { SynRadio } from '@synergy-design-system/components';
31
33
 
32
34
  // DOM Reference to the element
33
35
  const nativeElement = ref<SynRadio>();
@@ -39,44 +41,44 @@ defineExpose({
39
41
  // Map attributes
40
42
  const props = defineProps<{
41
43
  /**
42
- * The radio's value.
43
- * When selected, the radio group will receive this value.
44
- */
45
- 'value'?: SynRadio['value'];
44
+ * The radio's value.
45
+ * When selected, the radio group will receive this value.
46
+ */
47
+ value?: SynRadio['value'];
46
48
 
47
49
  /**
48
50
  * The radio's size.
49
51
  * When used inside a radio group, the size will be determined by the radio group's size so this
50
52
  attribute can typically be omitted.
51
53
  */
52
- 'size'?: SynRadio['size'];
54
+ size?: SynRadio['size'];
53
55
 
54
56
  /**
55
- * Disables the radio.
56
- */
57
- 'disabled'?: SynRadio['disabled'];
57
+ * Disables the radio.
58
+ */
59
+ disabled?: SynRadio['disabled'];
58
60
  }>();
59
61
 
60
62
  // Make sure prop binding only forwards the props that are actually there.
61
63
  // This is needed because :param="param" also adds an empty attribute
62
64
  // when using web-components, which breaks optional arguments like size in SynInput
63
65
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
64
- const visibleProps = computed(() => Object.fromEntries(
65
- Object
66
- .entries(props)
67
- .filter(([, value]) => typeof value !== 'undefined'),
68
- ));
66
+ const visibleProps = computed(() =>
67
+ Object.fromEntries(
68
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
69
+ ),
70
+ );
69
71
 
70
72
  // Map events
71
73
  defineEmits<{
72
74
  /**
73
- * Emitted when the control loses focus.
74
- */
75
+ * Emitted when the control loses focus.
76
+ */
75
77
  'syn-blur': [e: SynBlurEvent];
76
78
 
77
79
  /**
78
- * Emitted when the control gains focus.
79
- */
80
+ * Emitted when the control gains focus.
81
+ */
80
82
  'syn-focus': [e: SynFocusEvent];
81
83
  }>();
82
84
  </script>
@@ -88,12 +90,10 @@ export type { SynFocusEvent } from '@synergy-design-system/components';
88
90
 
89
91
  <template>
90
92
  <syn-radio
91
- v-bind="visibleProps"
92
- ref="nativeElement"
93
-
94
93
  @syn-blur="$emit('syn-blur', $event)"
95
94
  @syn-focus="$emit('syn-focus', $event)"
96
- >
97
- <slot />
95
+ v-bind="visibleProps"
96
+ ref="nativeElement">
97
+ <slot></slot>
98
98
  </syn-radio>
99
99
  </template>
@@ -28,7 +28,9 @@
28
28
  import { computed, ref } from 'vue';
29
29
  import '@synergy-design-system/components/components/radio-button/radio-button.js';
30
30
 
31
- import type { SynBlurEvent, SynFocusEvent, SynRadioButton } from '@synergy-design-system/components';
31
+ import type { SynBlurEvent } from '@synergy-design-system/components';
32
+ import type { SynFocusEvent } from '@synergy-design-system/components';
33
+ import type { SynRadioButton } from '@synergy-design-system/components';
32
34
 
33
35
  // DOM Reference to the element
34
36
  const nativeElement = ref<SynRadioButton>();
@@ -40,49 +42,49 @@ defineExpose({
40
42
  // Map attributes
41
43
  const props = defineProps<{
42
44
  /**
43
- * The radio's value.
44
- * When selected, the radio group will receive this value.
45
- */
46
- 'value'?: SynRadioButton['value'];
45
+ * The radio's value.
46
+ * When selected, the radio group will receive this value.
47
+ */
48
+ value?: SynRadioButton['value'];
47
49
 
48
50
  /**
49
- * Disables the radio button.
50
- */
51
- 'disabled'?: SynRadioButton['disabled'];
51
+ * Disables the radio button.
52
+ */
53
+ disabled?: SynRadioButton['disabled'];
52
54
 
53
55
  /**
54
56
  * The radio button's size.
55
57
  * When used inside a radio group, the size will be determined by the radio group's size so
56
58
  this attribute can typically be omitted.
57
59
  */
58
- 'size'?: SynRadioButton['size'];
60
+ size?: SynRadioButton['size'];
59
61
 
60
62
  /**
61
- * Draws a pill-style radio button with rounded edges.
62
- */
63
- 'pill'?: SynRadioButton['pill'];
63
+ * Draws a pill-style radio button with rounded edges.
64
+ */
65
+ pill?: SynRadioButton['pill'];
64
66
  }>();
65
67
 
66
68
  // Make sure prop binding only forwards the props that are actually there.
67
69
  // This is needed because :param="param" also adds an empty attribute
68
70
  // when using web-components, which breaks optional arguments like size in SynInput
69
71
  // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
70
- const visibleProps = computed(() => Object.fromEntries(
71
- Object
72
- .entries(props)
73
- .filter(([, value]) => typeof value !== 'undefined'),
74
- ));
72
+ const visibleProps = computed(() =>
73
+ Object.fromEntries(
74
+ Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
75
+ ),
76
+ );
75
77
 
76
78
  // Map events
77
79
  defineEmits<{
78
80
  /**
79
- * Emitted when the button loses focus.
80
- */
81
+ * Emitted when the button loses focus.
82
+ */
81
83
  'syn-blur': [e: SynBlurEvent];
82
84
 
83
85
  /**
84
- * Emitted when the button gains focus.
85
- */
86
+ * Emitted when the button gains focus.
87
+ */
86
88
  'syn-focus': [e: SynFocusEvent];
87
89
  }>();
88
90
  </script>
@@ -94,12 +96,10 @@ export type { SynFocusEvent } from '@synergy-design-system/components';
94
96
 
95
97
  <template>
96
98
  <syn-radio-button
97
- v-bind="visibleProps"
98
- ref="nativeElement"
99
-
100
99
  @syn-blur="$emit('syn-blur', $event)"
101
100
  @syn-focus="$emit('syn-focus', $event)"
102
- >
103
- <slot />
101
+ v-bind="visibleProps"
102
+ ref="nativeElement">
103
+ <slot></slot>
104
104
  </syn-radio-button>
105
105
  </template>