@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.
- package/README.md +1 -33
- package/dist/components/SynVueAlert.vue.d.ts +0 -5
- package/dist/components/SynVueBreadcrumbItem.vue.d.ts +0 -2
- package/dist/components/SynVueButton.vue.d.ts +0 -8
- package/dist/components/SynVueCard.vue.d.ts +8 -6
- package/dist/components/SynVueCheckbox.vue.d.ts +0 -9
- package/dist/components/SynVueDialog.vue.d.ts +0 -3
- package/dist/components/SynVueDivider.vue.d.ts +0 -1
- package/dist/components/SynVueDrawer.vue.d.ts +0 -4
- package/dist/components/SynVueDropdown.vue.d.ts +0 -13
- package/dist/components/SynVueHeader.vue.d.ts +26 -25
- package/dist/components/SynVueIcon.vue.d.ts +0 -2
- package/dist/components/SynVueIconButton.vue.d.ts +0 -3
- package/dist/components/SynVueInput.vue.d.ts +0 -15
- package/dist/components/SynVueMenuItem.vue.d.ts +0 -5
- package/dist/components/SynVueNavItem.vue.d.ts +0 -4
- package/dist/components/SynVueOptgroup.vue.d.ts +0 -1
- package/dist/components/SynVueOption.vue.d.ts +0 -4
- package/dist/components/SynVuePopup.vue.d.ts +0 -1
- package/dist/components/SynVuePrioNav.vue.d.ts +8 -23
- package/dist/components/SynVueRadio.vue.d.ts +0 -2
- package/dist/components/SynVueRadioButton.vue.d.ts +0 -3
- package/dist/components/SynVueRadioGroup.vue.d.ts +0 -6
- package/dist/components/SynVueSelect.vue.d.ts +0 -11
- package/dist/components/SynVueSideNav.vue.d.ts +0 -5
- package/dist/components/SynVueSwitch.vue.d.ts +0 -9
- package/dist/components/SynVueTab.vue.d.ts +63 -0
- package/dist/components/SynVueTabGroup.vue.d.ts +78 -0
- package/dist/components/SynVueTabPanel.vue.d.ts +40 -0
- package/dist/components/SynVueTextarea.vue.d.ts +0 -107
- package/dist/components/SynVueTooltip.vue.d.ts +0 -5
- package/dist/index.d.ts +3 -0
- package/package.json +2 -2
- package/src/components/SynVueAlert.vue +0 -26
- package/src/components/SynVueBadge.vue +0 -3
- package/src/components/SynVueBreadcrumb.vue +0 -3
- package/src/components/SynVueBreadcrumbItem.vue +0 -6
- package/src/components/SynVueButton.vue +0 -41
- package/src/components/SynVueButtonGroup.vue +0 -3
- package/src/components/SynVueCard.vue +4 -6
- package/src/components/SynVueCheckbox.vue +0 -45
- package/src/components/SynVueDialog.vue +0 -14
- package/src/components/SynVueDivider.vue +0 -4
- package/src/components/SynVueDrawer.vue +0 -16
- package/src/components/SynVueDropdown.vue +0 -39
- package/src/components/SynVueHeader.vue +37 -39
- package/src/components/SynVueIcon.vue +0 -6
- package/src/components/SynVueIconButton.vue +0 -17
- package/src/components/SynVueInput.vue +0 -70
- package/src/components/SynVueMenu.vue +0 -3
- package/src/components/SynVueMenuItem.vue +0 -15
- package/src/components/SynVueMenuLabel.vue +0 -3
- package/src/components/SynVueNavItem.vue +0 -19
- package/src/components/SynVueOptgroup.vue +0 -4
- package/src/components/SynVueOption.vue +0 -13
- package/src/components/SynVuePopup.vue +0 -7
- package/src/components/SynVuePrioNav.vue +1 -8
- package/src/components/SynVueProgressBar.vue +0 -3
- package/src/components/SynVueProgressRing.vue +0 -3
- package/src/components/SynVueRadio.vue +0 -6
- package/src/components/SynVueRadioButton.vue +0 -14
- package/src/components/SynVueRadioGroup.vue +0 -28
- package/src/components/SynVueSelect.vue +0 -50
- package/src/components/SynVueSideNav.vue +0 -18
- package/src/components/SynVueSpinner.vue +0 -3
- package/src/components/SynVueSwitch.vue +0 -43
- package/src/components/SynVueTab.vue +92 -0
- package/src/components/SynVueTabGroup.vue +121 -0
- package/src/components/SynVueTabPanel.vue +69 -0
- package/src/components/SynVueTag.vue +0 -3
- package/src/components/SynVueTextarea.vue +0 -60
- package/src/components/SynVueTooltip.vue +0 -18
- package/src/index.js +3 -0
|
@@ -25,13 +25,7 @@ import type { SynErrorEvent, SynIcon, SynLoadEvent } from '@synergy-design-syste
|
|
|
25
25
|
// DOM Reference to the element
|
|
26
26
|
const nativeElement = ref<SynIcon>();
|
|
27
27
|
|
|
28
|
-
// Map methods
|
|
29
|
-
const callHandleLabelChange = (...args: Parameters<SynIcon['handleLabelChange']>) => nativeElement.value?.handleLabelChange(...args);
|
|
30
|
-
const callSetIcon = (...args: Parameters<SynIcon['setIcon']>) => nativeElement.value?.setIcon(...args);
|
|
31
|
-
|
|
32
28
|
defineExpose({
|
|
33
|
-
callHandleLabelChange,
|
|
34
|
-
callSetIcon,
|
|
35
29
|
nativeElement,
|
|
36
30
|
});
|
|
37
31
|
|
|
@@ -26,24 +26,7 @@ import type { SynBlurEvent, SynFocusEvent, SynIconButton } from '@synergy-design
|
|
|
26
26
|
// DOM Reference to the element
|
|
27
27
|
const nativeElement = ref<SynIconButton>();
|
|
28
28
|
|
|
29
|
-
// Map methods
|
|
30
|
-
/**
|
|
31
|
-
* Simulates a click on the icon button.
|
|
32
|
-
*/
|
|
33
|
-
const callClick = (...args: Parameters<SynIconButton['click']>) => nativeElement.value?.click(...args);
|
|
34
|
-
/**
|
|
35
|
-
* Sets focus on the icon button.
|
|
36
|
-
*/
|
|
37
|
-
const callFocus = (...args: Parameters<SynIconButton['focus']>) => nativeElement.value?.focus(...args);
|
|
38
|
-
/**
|
|
39
|
-
* Removes focus from the icon button.
|
|
40
|
-
*/
|
|
41
|
-
const callBlur = (...args: Parameters<SynIconButton['blur']>) => nativeElement.value?.blur(...args);
|
|
42
|
-
|
|
43
29
|
defineExpose({
|
|
44
|
-
callClick,
|
|
45
|
-
callFocus,
|
|
46
|
-
callBlur,
|
|
47
30
|
nativeElement,
|
|
48
31
|
});
|
|
49
32
|
|
|
@@ -56,77 +56,7 @@ import type {
|
|
|
56
56
|
// DOM Reference to the element
|
|
57
57
|
const nativeElement = ref<SynInput>();
|
|
58
58
|
|
|
59
|
-
// Map methods
|
|
60
|
-
const callHandleDisabledChange = (...args: Parameters<SynInput['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
61
|
-
const callHandleStepChange = (...args: Parameters<SynInput['handleStepChange']>) => nativeElement.value?.handleStepChange(...args);
|
|
62
|
-
const callHandleValueChange = (...args: Parameters<SynInput['handleValueChange']>) => nativeElement.value?.handleValueChange(...args);
|
|
63
|
-
/**
|
|
64
|
-
* Sets focus on the input.
|
|
65
|
-
*/
|
|
66
|
-
const callFocus = (...args: Parameters<SynInput['focus']>) => nativeElement.value?.focus(...args);
|
|
67
|
-
/**
|
|
68
|
-
* Removes focus from the input.
|
|
69
|
-
*/
|
|
70
|
-
const callBlur = (...args: Parameters<SynInput['blur']>) => nativeElement.value?.blur(...args);
|
|
71
|
-
/**
|
|
72
|
-
* Selects all the text in the input.
|
|
73
|
-
*/
|
|
74
|
-
const callSelect = (...args: Parameters<SynInput['select']>) => nativeElement.value?.select(...args);
|
|
75
|
-
/**
|
|
76
|
-
* Sets the start and end positions of the text selection (0-based).
|
|
77
|
-
*/
|
|
78
|
-
const callSetSelectionRange = (...args: Parameters<SynInput['setSelectionRange']>) => nativeElement.value?.setSelectionRange(...args);
|
|
79
|
-
/**
|
|
80
|
-
* Replaces a range of text with a new string.
|
|
81
|
-
*/
|
|
82
|
-
const callSetRangeText = (...args: Parameters<SynInput['setRangeText']>) => nativeElement.value?.setRangeText(...args);
|
|
83
|
-
/**
|
|
84
|
-
* Displays the browser picker for an input element (only works if the browser supports it for the input type).
|
|
85
|
-
*/
|
|
86
|
-
const callShowPicker = (...args: Parameters<SynInput['showPicker']>) => nativeElement.value?.showPicker(...args);
|
|
87
|
-
/**
|
|
88
|
-
* Increments the value of a numeric input type by the value of the step attribute.
|
|
89
|
-
*/
|
|
90
|
-
const callStepUp = (...args: Parameters<SynInput['stepUp']>) => nativeElement.value?.stepUp(...args);
|
|
91
|
-
/**
|
|
92
|
-
* Decrements the value of a numeric input type by the value of the step attribute.
|
|
93
|
-
*/
|
|
94
|
-
const callStepDown = (...args: Parameters<SynInput['stepDown']>) => nativeElement.value?.stepDown(...args);
|
|
95
|
-
/**
|
|
96
|
-
* Checks for validity but does not show a validation message.
|
|
97
|
-
* Returns `true` when valid and `false` when invalid.
|
|
98
|
-
*/
|
|
99
|
-
const callCheckValidity = (...args: Parameters<SynInput['checkValidity']>) => nativeElement.value?.checkValidity(...args);
|
|
100
|
-
/**
|
|
101
|
-
* Gets the associated form, if one exists.
|
|
102
|
-
*/
|
|
103
|
-
const callGetForm = (...args: Parameters<SynInput['getForm']>) => nativeElement.value?.getForm(...args);
|
|
104
|
-
/**
|
|
105
|
-
* Checks for validity and shows the browser's validation message if the control is invalid.
|
|
106
|
-
*/
|
|
107
|
-
const callReportValidity = (...args: Parameters<SynInput['reportValidity']>) => nativeElement.value?.reportValidity(...args);
|
|
108
|
-
/**
|
|
109
|
-
* Sets a custom validation message.
|
|
110
|
-
* Pass an empty string to restore validity.
|
|
111
|
-
*/
|
|
112
|
-
const callSetCustomValidity = (...args: Parameters<SynInput['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
|
|
113
|
-
|
|
114
59
|
defineExpose({
|
|
115
|
-
callHandleDisabledChange,
|
|
116
|
-
callHandleStepChange,
|
|
117
|
-
callHandleValueChange,
|
|
118
|
-
callFocus,
|
|
119
|
-
callBlur,
|
|
120
|
-
callSelect,
|
|
121
|
-
callSetSelectionRange,
|
|
122
|
-
callSetRangeText,
|
|
123
|
-
callShowPicker,
|
|
124
|
-
callStepUp,
|
|
125
|
-
callStepDown,
|
|
126
|
-
callCheckValidity,
|
|
127
|
-
callGetForm,
|
|
128
|
-
callReportValidity,
|
|
129
|
-
callSetCustomValidity,
|
|
130
60
|
nativeElement,
|
|
131
61
|
});
|
|
132
62
|
|
|
@@ -39,22 +39,7 @@ import type { SynMenuItem } from '@synergy-design-system/components';
|
|
|
39
39
|
// DOM Reference to the element
|
|
40
40
|
const nativeElement = ref<SynMenuItem>();
|
|
41
41
|
|
|
42
|
-
// Map methods
|
|
43
|
-
const callHandleCheckedChange = (...args: Parameters<SynMenuItem['handleCheckedChange']>) => nativeElement.value?.handleCheckedChange(...args);
|
|
44
|
-
const callHandleDisabledChange = (...args: Parameters<SynMenuItem['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
45
|
-
const callHandleTypeChange = (...args: Parameters<SynMenuItem['handleTypeChange']>) => nativeElement.value?.handleTypeChange(...args);
|
|
46
|
-
/**
|
|
47
|
-
* Returns a text label based on the contents of the menu item's default slot.
|
|
48
|
-
*/
|
|
49
|
-
const callGetTextLabel = (...args: Parameters<SynMenuItem['getTextLabel']>) => nativeElement.value?.getTextLabel(...args);
|
|
50
|
-
const callIsSubmenu = (...args: Parameters<SynMenuItem['isSubmenu']>) => nativeElement.value?.isSubmenu(...args);
|
|
51
|
-
|
|
52
42
|
defineExpose({
|
|
53
|
-
callHandleCheckedChange,
|
|
54
|
-
callHandleDisabledChange,
|
|
55
|
-
callHandleTypeChange,
|
|
56
|
-
callGetTextLabel,
|
|
57
|
-
callIsSubmenu,
|
|
58
43
|
nativeElement,
|
|
59
44
|
});
|
|
60
45
|
|
|
@@ -60,26 +60,7 @@ import type {
|
|
|
60
60
|
// DOM Reference to the element
|
|
61
61
|
const nativeElement = ref<SynNavItem>();
|
|
62
62
|
|
|
63
|
-
// Map methods
|
|
64
|
-
const callHandleOpenChange = (...args: Parameters<SynNavItem['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
|
|
65
|
-
/**
|
|
66
|
-
* Removes focus from the button.
|
|
67
|
-
*/
|
|
68
|
-
const callBlur = (...args: Parameters<SynNavItem['blur']>) => nativeElement.value?.blur(...args);
|
|
69
|
-
/**
|
|
70
|
-
* Simulates a click on the nav-items button, link or summary.
|
|
71
|
-
*/
|
|
72
|
-
const callClick = (...args: Parameters<SynNavItem['click']>) => nativeElement.value?.click(...args);
|
|
73
|
-
/**
|
|
74
|
-
* Sets focus on the nav-item
|
|
75
|
-
*/
|
|
76
|
-
const callFocus = (...args: Parameters<SynNavItem['focus']>) => nativeElement.value?.focus(...args);
|
|
77
|
-
|
|
78
63
|
defineExpose({
|
|
79
|
-
callHandleOpenChange,
|
|
80
|
-
callBlur,
|
|
81
|
-
callClick,
|
|
82
|
-
callFocus,
|
|
83
64
|
nativeElement,
|
|
84
65
|
});
|
|
85
66
|
|
|
@@ -35,11 +35,7 @@ import type { SynOptgroup } from '@synergy-design-system/components';
|
|
|
35
35
|
// DOM Reference to the element
|
|
36
36
|
const nativeElement = ref<SynOptgroup>();
|
|
37
37
|
|
|
38
|
-
// Map methods
|
|
39
|
-
const callHandleDisabledChange = (...args: Parameters<SynOptgroup['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
40
|
-
|
|
41
38
|
defineExpose({
|
|
42
|
-
callHandleDisabledChange,
|
|
43
39
|
nativeElement,
|
|
44
40
|
});
|
|
45
41
|
|
|
@@ -31,20 +31,7 @@ import type { SynOption } from '@synergy-design-system/components';
|
|
|
31
31
|
// DOM Reference to the element
|
|
32
32
|
const nativeElement = ref<SynOption>();
|
|
33
33
|
|
|
34
|
-
// Map methods
|
|
35
|
-
const callHandleDisabledChange = (...args: Parameters<SynOption['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
36
|
-
const callHandleSelectedChange = (...args: Parameters<SynOption['handleSelectedChange']>) => nativeElement.value?.handleSelectedChange(...args);
|
|
37
|
-
const callHandleValueChange = (...args: Parameters<SynOption['handleValueChange']>) => nativeElement.value?.handleValueChange(...args);
|
|
38
|
-
/**
|
|
39
|
-
* Returns a plain text label based on the option's content.
|
|
40
|
-
*/
|
|
41
|
-
const callGetTextLabel = (...args: Parameters<SynOption['getTextLabel']>) => nativeElement.value?.getTextLabel(...args);
|
|
42
|
-
|
|
43
34
|
defineExpose({
|
|
44
|
-
callHandleDisabledChange,
|
|
45
|
-
callHandleSelectedChange,
|
|
46
|
-
callHandleValueChange,
|
|
47
|
-
callGetTextLabel,
|
|
48
35
|
nativeElement,
|
|
49
36
|
});
|
|
50
37
|
|
|
@@ -42,14 +42,7 @@ import type { SynPopup, SynRepositionEvent } from '@synergy-design-system/compon
|
|
|
42
42
|
// DOM Reference to the element
|
|
43
43
|
const nativeElement = ref<SynPopup>();
|
|
44
44
|
|
|
45
|
-
// Map methods
|
|
46
|
-
/**
|
|
47
|
-
* Forces the popup to recalculate and reposition itself.
|
|
48
|
-
*/
|
|
49
|
-
const callReposition = (...args: Parameters<SynPopup['reposition']>) => nativeElement.value?.reposition(...args);
|
|
50
|
-
|
|
51
45
|
defineExpose({
|
|
52
|
-
callReposition,
|
|
53
46
|
nativeElement,
|
|
54
47
|
});
|
|
55
48
|
|
|
@@ -47,20 +47,13 @@ import type { SynPrioNav } from '@synergy-design-system/components';
|
|
|
47
47
|
// DOM Reference to the element
|
|
48
48
|
const nativeElement = ref<SynPrioNav>();
|
|
49
49
|
|
|
50
|
-
// Map methods
|
|
51
|
-
|
|
52
50
|
defineExpose({
|
|
53
|
-
|
|
54
51
|
nativeElement,
|
|
55
52
|
});
|
|
56
53
|
|
|
57
54
|
// Map attributes
|
|
58
55
|
const props = defineProps<{
|
|
59
|
-
|
|
60
|
-
* The components priority menu label.
|
|
61
|
-
This will be shown after the priority menu 3 dots link
|
|
62
|
-
*/
|
|
63
|
-
'priorityMenuLabel'?: SynPrioNav['priorityMenuLabel'];
|
|
56
|
+
|
|
64
57
|
}>();
|
|
65
58
|
|
|
66
59
|
// Make sure prop binding only forwards the props that are actually there.
|
|
@@ -32,13 +32,7 @@ import type { SynBlurEvent, SynFocusEvent, SynRadio } from '@synergy-design-syst
|
|
|
32
32
|
// DOM Reference to the element
|
|
33
33
|
const nativeElement = ref<SynRadio>();
|
|
34
34
|
|
|
35
|
-
// Map methods
|
|
36
|
-
const callHandleCheckedChange = (...args: Parameters<SynRadio['handleCheckedChange']>) => nativeElement.value?.handleCheckedChange(...args);
|
|
37
|
-
const callHandleDisabledChange = (...args: Parameters<SynRadio['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
38
|
-
|
|
39
35
|
defineExpose({
|
|
40
|
-
callHandleCheckedChange,
|
|
41
|
-
callHandleDisabledChange,
|
|
42
36
|
nativeElement,
|
|
43
37
|
});
|
|
44
38
|
|
|
@@ -33,21 +33,7 @@ import type { SynBlurEvent, SynFocusEvent, SynRadioButton } from '@synergy-desig
|
|
|
33
33
|
// DOM Reference to the element
|
|
34
34
|
const nativeElement = ref<SynRadioButton>();
|
|
35
35
|
|
|
36
|
-
// Map methods
|
|
37
|
-
const callHandleDisabledChange = (...args: Parameters<SynRadioButton['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
38
|
-
/**
|
|
39
|
-
* Sets focus on the radio button.
|
|
40
|
-
*/
|
|
41
|
-
const callFocus = (...args: Parameters<SynRadioButton['focus']>) => nativeElement.value?.focus(...args);
|
|
42
|
-
/**
|
|
43
|
-
* Removes focus from the radio button.
|
|
44
|
-
*/
|
|
45
|
-
const callBlur = (...args: Parameters<SynRadioButton['blur']>) => nativeElement.value?.blur(...args);
|
|
46
|
-
|
|
47
36
|
defineExpose({
|
|
48
|
-
callHandleDisabledChange,
|
|
49
|
-
callFocus,
|
|
50
|
-
callBlur,
|
|
51
37
|
nativeElement,
|
|
52
38
|
});
|
|
53
39
|
|
|
@@ -39,35 +39,7 @@ import type {
|
|
|
39
39
|
// DOM Reference to the element
|
|
40
40
|
const nativeElement = ref<SynRadioGroup>();
|
|
41
41
|
|
|
42
|
-
// Map methods
|
|
43
|
-
const callHandleSizeChange = (...args: Parameters<SynRadioGroup['handleSizeChange']>) => nativeElement.value?.handleSizeChange(...args);
|
|
44
|
-
const callHandleValueChange = (...args: Parameters<SynRadioGroup['handleValueChange']>) => nativeElement.value?.handleValueChange(...args);
|
|
45
|
-
/**
|
|
46
|
-
* Checks for validity but does not show a validation message.
|
|
47
|
-
* Returns `true` when valid and `false` when invalid.
|
|
48
|
-
*/
|
|
49
|
-
const callCheckValidity = (...args: Parameters<SynRadioGroup['checkValidity']>) => nativeElement.value?.checkValidity(...args);
|
|
50
|
-
/**
|
|
51
|
-
* Gets the associated form, if one exists.
|
|
52
|
-
*/
|
|
53
|
-
const callGetForm = (...args: Parameters<SynRadioGroup['getForm']>) => nativeElement.value?.getForm(...args);
|
|
54
|
-
/**
|
|
55
|
-
* Checks for validity and shows the browser's validation message if the control is invalid.
|
|
56
|
-
*/
|
|
57
|
-
const callReportValidity = (...args: Parameters<SynRadioGroup['reportValidity']>) => nativeElement.value?.reportValidity(...args);
|
|
58
|
-
/**
|
|
59
|
-
* Sets a custom validation message.
|
|
60
|
-
* Pass an empty string to restore validity.
|
|
61
|
-
*/
|
|
62
|
-
const callSetCustomValidity = (...args: Parameters<SynRadioGroup['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
|
|
63
|
-
|
|
64
42
|
defineExpose({
|
|
65
|
-
callHandleSizeChange,
|
|
66
|
-
callHandleValueChange,
|
|
67
|
-
callCheckValidity,
|
|
68
|
-
callGetForm,
|
|
69
|
-
callReportValidity,
|
|
70
|
-
callSetCustomValidity,
|
|
71
43
|
nativeElement,
|
|
72
44
|
});
|
|
73
45
|
|
|
@@ -60,57 +60,7 @@ import type {
|
|
|
60
60
|
// DOM Reference to the element
|
|
61
61
|
const nativeElement = ref<SynSelect>();
|
|
62
62
|
|
|
63
|
-
// Map methods
|
|
64
|
-
const callHandleDisabledChange = (...args: Parameters<SynSelect['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
65
|
-
const callHandleValueChange = (...args: Parameters<SynSelect['handleValueChange']>) => nativeElement.value?.handleValueChange(...args);
|
|
66
|
-
const callHandleOpenChange = (...args: Parameters<SynSelect['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
|
|
67
|
-
/**
|
|
68
|
-
* Shows the listbox.
|
|
69
|
-
*/
|
|
70
|
-
const callShow = (...args: Parameters<SynSelect['show']>) => nativeElement.value?.show(...args);
|
|
71
|
-
/**
|
|
72
|
-
* Hides the listbox.
|
|
73
|
-
*/
|
|
74
|
-
const callHide = (...args: Parameters<SynSelect['hide']>) => nativeElement.value?.hide(...args);
|
|
75
|
-
/**
|
|
76
|
-
* Checks for validity but does not show a validation message.
|
|
77
|
-
* Returns `true` when valid and `false` when invalid.
|
|
78
|
-
*/
|
|
79
|
-
const callCheckValidity = (...args: Parameters<SynSelect['checkValidity']>) => nativeElement.value?.checkValidity(...args);
|
|
80
|
-
/**
|
|
81
|
-
* Gets the associated form, if one exists.
|
|
82
|
-
*/
|
|
83
|
-
const callGetForm = (...args: Parameters<SynSelect['getForm']>) => nativeElement.value?.getForm(...args);
|
|
84
|
-
/**
|
|
85
|
-
* Checks for validity and shows the browser's validation message if the control is invalid.
|
|
86
|
-
*/
|
|
87
|
-
const callReportValidity = (...args: Parameters<SynSelect['reportValidity']>) => nativeElement.value?.reportValidity(...args);
|
|
88
|
-
/**
|
|
89
|
-
* Sets a custom validation message.
|
|
90
|
-
* Pass an empty string to restore validity.
|
|
91
|
-
*/
|
|
92
|
-
const callSetCustomValidity = (...args: Parameters<SynSelect['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
|
|
93
|
-
/**
|
|
94
|
-
* Sets focus on the control.
|
|
95
|
-
*/
|
|
96
|
-
const callFocus = (...args: Parameters<SynSelect['focus']>) => nativeElement.value?.focus(...args);
|
|
97
|
-
/**
|
|
98
|
-
* Removes focus from the control.
|
|
99
|
-
*/
|
|
100
|
-
const callBlur = (...args: Parameters<SynSelect['blur']>) => nativeElement.value?.blur(...args);
|
|
101
|
-
|
|
102
63
|
defineExpose({
|
|
103
|
-
callHandleDisabledChange,
|
|
104
|
-
callHandleValueChange,
|
|
105
|
-
callHandleOpenChange,
|
|
106
|
-
callShow,
|
|
107
|
-
callHide,
|
|
108
|
-
callCheckValidity,
|
|
109
|
-
callGetForm,
|
|
110
|
-
callReportValidity,
|
|
111
|
-
callSetCustomValidity,
|
|
112
|
-
callFocus,
|
|
113
|
-
callBlur,
|
|
114
64
|
nativeElement,
|
|
115
65
|
});
|
|
116
66
|
|
|
@@ -59,25 +59,7 @@ import type {
|
|
|
59
59
|
// DOM Reference to the element
|
|
60
60
|
const nativeElement = ref<SynSideNav>();
|
|
61
61
|
|
|
62
|
-
// Map methods
|
|
63
|
-
const callHandleModeChange = (...args: Parameters<SynSideNav['handleModeChange']>) => nativeElement.value?.handleModeChange(...args);
|
|
64
|
-
const callHandleOpenChange = (...args: Parameters<SynSideNav['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
|
|
65
|
-
const callHandleFocusTrapping = (...args: Parameters<SynSideNav['handleFocusTrapping']>) => nativeElement.value?.handleFocusTrapping(...args);
|
|
66
|
-
/**
|
|
67
|
-
* Shows the side-nav.
|
|
68
|
-
*/
|
|
69
|
-
const callShow = (...args: Parameters<SynSideNav['show']>) => nativeElement.value?.show(...args);
|
|
70
|
-
/**
|
|
71
|
-
* Hides the side-nav
|
|
72
|
-
*/
|
|
73
|
-
const callHide = (...args: Parameters<SynSideNav['hide']>) => nativeElement.value?.hide(...args);
|
|
74
|
-
|
|
75
62
|
defineExpose({
|
|
76
|
-
callHandleModeChange,
|
|
77
|
-
callHandleOpenChange,
|
|
78
|
-
callHandleFocusTrapping,
|
|
79
|
-
callShow,
|
|
80
|
-
callHide,
|
|
81
63
|
nativeElement,
|
|
82
64
|
});
|
|
83
65
|
|
|
@@ -40,50 +40,7 @@ import type {
|
|
|
40
40
|
// DOM Reference to the element
|
|
41
41
|
const nativeElement = ref<SynSwitch>();
|
|
42
42
|
|
|
43
|
-
// Map methods
|
|
44
|
-
const callHandleCheckedChange = (...args: Parameters<SynSwitch['handleCheckedChange']>) => nativeElement.value?.handleCheckedChange(...args);
|
|
45
|
-
const callHandleDisabledChange = (...args: Parameters<SynSwitch['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
|
|
46
|
-
/**
|
|
47
|
-
* Simulates a click on the switch.
|
|
48
|
-
*/
|
|
49
|
-
const callClick = (...args: Parameters<SynSwitch['click']>) => nativeElement.value?.click(...args);
|
|
50
|
-
/**
|
|
51
|
-
* Sets focus on the switch.
|
|
52
|
-
*/
|
|
53
|
-
const callFocus = (...args: Parameters<SynSwitch['focus']>) => nativeElement.value?.focus(...args);
|
|
54
|
-
/**
|
|
55
|
-
* Removes focus from the switch.
|
|
56
|
-
*/
|
|
57
|
-
const callBlur = (...args: Parameters<SynSwitch['blur']>) => nativeElement.value?.blur(...args);
|
|
58
|
-
/**
|
|
59
|
-
* Checks for validity but does not show a validation message.
|
|
60
|
-
* Returns `true` when valid and `false` when invalid.
|
|
61
|
-
*/
|
|
62
|
-
const callCheckValidity = (...args: Parameters<SynSwitch['checkValidity']>) => nativeElement.value?.checkValidity(...args);
|
|
63
|
-
/**
|
|
64
|
-
* Gets the associated form, if one exists.
|
|
65
|
-
*/
|
|
66
|
-
const callGetForm = (...args: Parameters<SynSwitch['getForm']>) => nativeElement.value?.getForm(...args);
|
|
67
|
-
/**
|
|
68
|
-
* Checks for validity and shows the browser's validation message if the control is invalid.
|
|
69
|
-
*/
|
|
70
|
-
const callReportValidity = (...args: Parameters<SynSwitch['reportValidity']>) => nativeElement.value?.reportValidity(...args);
|
|
71
|
-
/**
|
|
72
|
-
* Sets a custom validation message.
|
|
73
|
-
* Pass an empty string to restore validity.
|
|
74
|
-
*/
|
|
75
|
-
const callSetCustomValidity = (...args: Parameters<SynSwitch['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
|
|
76
|
-
|
|
77
43
|
defineExpose({
|
|
78
|
-
callHandleCheckedChange,
|
|
79
|
-
callHandleDisabledChange,
|
|
80
|
-
callClick,
|
|
81
|
-
callFocus,
|
|
82
|
-
callBlur,
|
|
83
|
-
callCheckValidity,
|
|
84
|
-
callGetForm,
|
|
85
|
-
callReportValidity,
|
|
86
|
-
callSetCustomValidity,
|
|
87
44
|
nativeElement,
|
|
88
45
|
});
|
|
89
46
|
|
|
@@ -0,0 +1,92 @@
|
|
|
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 Tabs are used inside [tab groups](/components/tab-group) to represent and activate [tab panels](/components/tab-panel).
|
|
10
|
+
* @documentation https://synergy.style/components/tab
|
|
11
|
+
* @status stable
|
|
12
|
+
* @since 2.0
|
|
13
|
+
*
|
|
14
|
+
* @dependency syn-icon-button
|
|
15
|
+
*
|
|
16
|
+
* @slot - The tab's label.
|
|
17
|
+
*
|
|
18
|
+
* @event syn-close - Emitted when the tab is closable and the close button is activated.
|
|
19
|
+
*
|
|
20
|
+
* @csspart base - The component's base wrapper.
|
|
21
|
+
* @csspart close-button - The close button, an `<syn-icon-button>`.
|
|
22
|
+
* @csspart close-button__base - The close button's exported `base` part.
|
|
23
|
+
*/
|
|
24
|
+
import { computed, ref } from 'vue';
|
|
25
|
+
import '@synergy-design-system/components/components/tab/tab.js';
|
|
26
|
+
|
|
27
|
+
import type { SynCloseEvent, SynTab } from '@synergy-design-system/components';
|
|
28
|
+
|
|
29
|
+
// DOM Reference to the element
|
|
30
|
+
const nativeElement = ref<SynTab>();
|
|
31
|
+
|
|
32
|
+
defineExpose({
|
|
33
|
+
nativeElement,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Map attributes
|
|
37
|
+
const props = defineProps<{
|
|
38
|
+
/**
|
|
39
|
+
* The name of the tab panel this tab is associated with.
|
|
40
|
+
* The panel must be located in the same tab group.
|
|
41
|
+
*/
|
|
42
|
+
'panel'?: SynTab['panel'];
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Draws the tab in an active state.
|
|
46
|
+
*/
|
|
47
|
+
'active'?: SynTab['active'];
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Makes the tab closable and shows a close button.
|
|
51
|
+
*/
|
|
52
|
+
'closable'?: SynTab['closable'];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Disables the tab and prevents selection.
|
|
56
|
+
*/
|
|
57
|
+
'disabled'?: SynTab['disabled'];
|
|
58
|
+
}>();
|
|
59
|
+
|
|
60
|
+
// Make sure prop binding only forwards the props that are actually there.
|
|
61
|
+
// This is needed because :param="param" also adds an empty attribute
|
|
62
|
+
// when using web-components, which breaks optional arguments like size in SynInput
|
|
63
|
+
// @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
|
+
));
|
|
69
|
+
|
|
70
|
+
// Map events
|
|
71
|
+
defineEmits<{
|
|
72
|
+
/**
|
|
73
|
+
* Emitted when the tab is closable and the close button is activated.
|
|
74
|
+
*/
|
|
75
|
+
'syn-close': [e: SynCloseEvent];
|
|
76
|
+
}>();
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<script lang="ts">
|
|
80
|
+
export type { SynCloseEvent } from '@synergy-design-system/components';
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
84
|
+
<syn-tab
|
|
85
|
+
v-bind="visibleProps"
|
|
86
|
+
|
|
87
|
+
ref="nativeElement"
|
|
88
|
+
@syn-close="$emit('syn-close', $event)"
|
|
89
|
+
>
|
|
90
|
+
<slot />
|
|
91
|
+
</syn-tab>
|
|
92
|
+
</template>
|