@synergy-design-system/vue 2.7.1 → 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.
- package/dist/components/SynVueAccordion.vue.d.ts +12 -12
- package/dist/components/SynVueAlert.vue.d.ts +13 -9
- package/dist/components/SynVueBadge.vue.d.ts +4 -4
- package/dist/components/SynVueBreadcrumbItem.vue.d.ts +12 -12
- package/dist/components/SynVueButton.vue.d.ts +62 -59
- package/dist/components/SynVueCard.vue.d.ts +8 -8
- package/dist/components/SynVueCheckbox.vue.d.ts +40 -35
- package/dist/components/SynVueDetails.vue.d.ts +23 -19
- package/dist/components/SynVueDialog.vue.d.ts +7 -1
- package/dist/components/SynVueDivider.vue.d.ts +4 -4
- package/dist/components/SynVueDrawer.vue.d.ts +11 -5
- package/dist/components/SynVueDropdown.vue.d.ts +21 -17
- package/dist/components/SynVueFile.vue.d.ts +40 -35
- package/dist/components/SynVueHeader.vue.d.ts +10 -7
- package/dist/components/SynVueIcon.vue.d.ts +13 -11
- package/dist/components/SynVueIconButton.vue.d.ts +37 -35
- package/dist/components/SynVueInput.vue.d.ts +115 -109
- package/dist/components/SynVueMenu.vue.d.ts +2 -1
- package/dist/components/SynVueMenuItem.vue.d.ts +24 -24
- package/dist/components/SynVueNavItem.vue.d.ts +13 -9
- package/dist/components/SynVueOptgroup.vue.d.ts +10 -10
- package/dist/components/SynVueOption.vue.d.ts +4 -4
- package/dist/components/SynVuePopup.vue.d.ts +34 -33
- package/dist/components/SynVueProgressBar.vue.d.ts +12 -12
- package/dist/components/SynVueProgressRing.vue.d.ts +8 -8
- package/dist/components/SynVueRadio.vue.d.ts +13 -11
- package/dist/components/SynVueRadioButton.vue.d.ts +17 -15
- package/dist/components/SynVueRadioGroup.vue.d.ts +32 -29
- package/dist/components/SynVueRange.vue.d.ts +57 -51
- package/dist/components/SynVueRangeTick.vue.d.ts +4 -4
- package/dist/components/SynVueSelect.vue.d.ts +55 -45
- package/dist/components/SynVueSideNav.vue.d.ts +5 -1
- package/dist/components/SynVueSwitch.vue.d.ts +40 -35
- package/dist/components/SynVueTab.vue.d.ts +20 -19
- package/dist/components/SynVueTabGroup.vue.d.ts +21 -19
- package/dist/components/SynVueTabPanel.vue.d.ts +8 -8
- package/dist/components/SynVueTag.vue.d.ts +10 -9
- package/dist/components/SynVueTextarea.vue.d.ts +86 -81
- package/dist/components/SynVueTooltip.vue.d.ts +29 -25
- package/package.json +2 -2
- package/src/components/SynVueAccordion.vue +16 -21
- package/src/components/SynVueAlert.vue +29 -29
- package/src/components/SynVueBadge.vue +10 -15
- package/src/components/SynVueBreadcrumb.vue +8 -13
- package/src/components/SynVueBreadcrumbItem.vue +16 -21
- package/src/components/SynVueButton.vue +66 -67
- package/src/components/SynVueButtonGroup.vue +8 -13
- package/src/components/SynVueCard.vue +12 -17
- package/src/components/SynVueCheckbox.vue +64 -53
- package/src/components/SynVueDetails.vue +35 -35
- package/src/components/SynVueDialog.vue +33 -31
- package/src/components/SynVueDivider.vue +9 -14
- package/src/components/SynVueDrawer.vue +37 -35
- package/src/components/SynVueDropdown.vue +37 -37
- package/src/components/SynVueFile.vue +69 -58
- package/src/components/SynVueHeader.vue +23 -24
- package/src/components/SynVueIcon.vue +26 -25
- package/src/components/SynVueIconButton.vue +42 -41
- package/src/components/SynVueInput.vue +123 -111
- package/src/components/SynVueMenu.vue +6 -9
- package/src/components/SynVueMenuItem.vue +24 -29
- package/src/components/SynVueMenuLabel.vue +2 -6
- package/src/components/SynVueNavItem.vue +32 -32
- package/src/components/SynVueOptgroup.vue +14 -19
- package/src/components/SynVueOption.vue +11 -16
- package/src/components/SynVuePopup.vue +51 -52
- package/src/components/SynVuePrioNav.vue +2 -6
- package/src/components/SynVueProgressBar.vue +16 -21
- package/src/components/SynVueProgressRing.vue +13 -18
- package/src/components/SynVueRadio.vue +23 -23
- package/src/components/SynVueRadioButton.vue +26 -26
- package/src/components/SynVueRadioGroup.vue +52 -43
- package/src/components/SynVueRange.vue +77 -65
- package/src/components/SynVueRangeTick.vue +10 -15
- package/src/components/SynVueSelect.vue +90 -74
- package/src/components/SynVueSideNav.vue +24 -24
- package/src/components/SynVueSpinner.vue +1 -5
- package/src/components/SynVueSwitch.vue +63 -52
- package/src/components/SynVueTab.vue +25 -26
- package/src/components/SynVueTabGroup.vue +31 -31
- package/src/components/SynVueTabPanel.vue +13 -18
- package/src/components/SynVueTag.vue +18 -19
- package/src/components/SynVueTextarea.vue +99 -88
- package/src/components/SynVueTooltip.vue +41 -41
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
import { computed, ref } from 'vue';
|
|
25
25
|
import '@synergy-design-system/components/components/tab/tab.js';
|
|
26
26
|
|
|
27
|
-
import type { SynCloseEvent
|
|
27
|
+
import type { SynCloseEvent } from '@synergy-design-system/components';
|
|
28
|
+
import type { SynTab } from '@synergy-design-system/components';
|
|
28
29
|
|
|
29
30
|
// DOM Reference to the element
|
|
30
31
|
const nativeElement = ref<SynTab>();
|
|
@@ -36,42 +37,42 @@ defineExpose({
|
|
|
36
37
|
// Map attributes
|
|
37
38
|
const props = defineProps<{
|
|
38
39
|
/**
|
|
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
|
-
|
|
40
|
+
* The name of the tab panel this tab is associated with.
|
|
41
|
+
* The panel must be located in the same tab group.
|
|
42
|
+
*/
|
|
43
|
+
panel?: SynTab['panel'];
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* Draws the tab in an active state.
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
* Draws the tab in an active state.
|
|
47
|
+
*/
|
|
48
|
+
active?: SynTab['active'];
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
|
-
* Makes the tab closable and shows a close button.
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
* Makes the tab closable and shows a close button.
|
|
52
|
+
*/
|
|
53
|
+
closable?: SynTab['closable'];
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
|
-
* Disables the tab and prevents selection.
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
* Disables the tab and prevents selection.
|
|
57
|
+
*/
|
|
58
|
+
disabled?: SynTab['disabled'];
|
|
58
59
|
}>();
|
|
59
60
|
|
|
60
61
|
// Make sure prop binding only forwards the props that are actually there.
|
|
61
62
|
// This is needed because :param="param" also adds an empty attribute
|
|
62
63
|
// when using web-components, which breaks optional arguments like size in SynInput
|
|
63
64
|
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
64
|
-
const visibleProps = computed(() =>
|
|
65
|
-
Object
|
|
66
|
-
.entries(props)
|
|
67
|
-
|
|
68
|
-
)
|
|
65
|
+
const visibleProps = computed(() =>
|
|
66
|
+
Object.fromEntries(
|
|
67
|
+
Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
|
|
68
|
+
),
|
|
69
|
+
);
|
|
69
70
|
|
|
70
71
|
// Map events
|
|
71
72
|
defineEmits<{
|
|
72
73
|
/**
|
|
73
|
-
* Emitted when the tab is closable and the close button is activated.
|
|
74
|
-
|
|
74
|
+
* Emitted when the tab is closable and the close button is activated.
|
|
75
|
+
*/
|
|
75
76
|
'syn-close': [e: SynCloseEvent];
|
|
76
77
|
}>();
|
|
77
78
|
</script>
|
|
@@ -82,11 +83,9 @@ export type { SynCloseEvent } from '@synergy-design-system/components';
|
|
|
82
83
|
|
|
83
84
|
<template>
|
|
84
85
|
<syn-tab
|
|
85
|
-
v-bind="visibleProps"
|
|
86
|
-
|
|
87
|
-
ref="nativeElement"
|
|
88
86
|
@syn-close="$emit('syn-close', $event)"
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
v-bind="visibleProps"
|
|
88
|
+
ref="nativeElement">
|
|
89
|
+
<slot></slot>
|
|
91
90
|
</syn-tab>
|
|
92
91
|
</template>
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
import { computed, ref } from 'vue';
|
|
38
38
|
import '@synergy-design-system/components/components/tab-group/tab-group.js';
|
|
39
39
|
|
|
40
|
-
import type {
|
|
40
|
+
import type { SynTabShowEvent } from '@synergy-design-system/components';
|
|
41
|
+
import type { SynTabHideEvent } from '@synergy-design-system/components';
|
|
42
|
+
import type { SynTabGroup } from '@synergy-design-system/components';
|
|
41
43
|
|
|
42
44
|
// DOM Reference to the element
|
|
43
45
|
const nativeElement = ref<SynTabGroup>();
|
|
@@ -49,56 +51,56 @@ defineExpose({
|
|
|
49
51
|
// Map attributes
|
|
50
52
|
const props = defineProps<{
|
|
51
53
|
/**
|
|
52
|
-
* The placement of the tabs.
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
* The placement of the tabs.
|
|
55
|
+
*/
|
|
56
|
+
placement?: SynTabGroup['placement'];
|
|
55
57
|
|
|
56
58
|
/**
|
|
57
59
|
* When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel.
|
|
58
60
|
* When set to
|
|
59
61
|
manual, the tab will receive focus but will not show until the user presses spacebar or enter.
|
|
60
62
|
*/
|
|
61
|
-
|
|
63
|
+
activation?: SynTabGroup['activation'];
|
|
62
64
|
|
|
63
65
|
/**
|
|
64
|
-
* Disables the scroll arrows that appear when tabs overflow.
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
* Disables the scroll arrows that appear when tabs overflow.
|
|
67
|
+
*/
|
|
68
|
+
noScrollControls?: SynTabGroup['noScrollControls'];
|
|
67
69
|
|
|
68
70
|
/**
|
|
69
|
-
* Draws the tab group as a contained element.
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
* Draws the tab group as a contained element.
|
|
72
|
+
*/
|
|
73
|
+
contained?: SynTabGroup['contained'];
|
|
72
74
|
|
|
73
75
|
/**
|
|
74
|
-
* Draws the tab group with edges instead of roundings.
|
|
75
|
-
* Takes only effect if used with the 'contained' property
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
* Draws the tab group with edges instead of roundings.
|
|
77
|
+
* Takes only effect if used with the 'contained' property
|
|
78
|
+
*/
|
|
79
|
+
sharp?: SynTabGroup['sharp'];
|
|
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(() =>
|
|
85
|
-
Object
|
|
86
|
-
.entries(props)
|
|
87
|
-
|
|
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 a tab is shown.
|
|
94
|
-
* The payload of the event returns the "panel" attribute of the shown tab.
|
|
95
|
-
|
|
95
|
+
* Emitted when a tab is shown.
|
|
96
|
+
* The payload of the event returns the "panel" attribute of the shown tab.
|
|
97
|
+
*/
|
|
96
98
|
'syn-tab-show': [e: SynTabShowEvent];
|
|
97
99
|
|
|
98
100
|
/**
|
|
99
|
-
* Emitted when a tab is hidden.
|
|
100
|
-
* The payload of the event returns the "panel" attribute of the hidden tab.
|
|
101
|
-
|
|
101
|
+
* Emitted when a tab is hidden.
|
|
102
|
+
* The payload of the event returns the "panel" attribute of the hidden tab.
|
|
103
|
+
*/
|
|
102
104
|
'syn-tab-hide': [e: SynTabHideEvent];
|
|
103
105
|
}>();
|
|
104
106
|
</script>
|
|
@@ -110,12 +112,10 @@ export type { SynTabHideEvent } from '@synergy-design-system/components';
|
|
|
110
112
|
|
|
111
113
|
<template>
|
|
112
114
|
<syn-tab-group
|
|
113
|
-
v-bind="visibleProps"
|
|
114
|
-
ref="nativeElement"
|
|
115
|
-
|
|
116
115
|
@syn-tab-show="$emit('syn-tab-show', $event)"
|
|
117
116
|
@syn-tab-hide="$emit('syn-tab-hide', $event)"
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
v-bind="visibleProps"
|
|
118
|
+
ref="nativeElement">
|
|
119
|
+
<slot></slot>
|
|
120
120
|
</syn-tab-group>
|
|
121
121
|
</template>
|
|
@@ -32,34 +32,29 @@ defineExpose({
|
|
|
32
32
|
// Map attributes
|
|
33
33
|
const props = defineProps<{
|
|
34
34
|
/**
|
|
35
|
-
* The tab panel's name.
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
* The tab panel's name.
|
|
36
|
+
*/
|
|
37
|
+
name?: SynTabPanel['name'];
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
* When true, the tab panel will be shown.
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
* When true, the tab panel will be shown.
|
|
41
|
+
*/
|
|
42
|
+
active?: SynTabPanel['active'];
|
|
43
43
|
}>();
|
|
44
44
|
|
|
45
45
|
// Make sure prop binding only forwards the props that are actually there.
|
|
46
46
|
// This is needed because :param="param" also adds an empty attribute
|
|
47
47
|
// when using web-components, which breaks optional arguments like size in SynInput
|
|
48
48
|
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
49
|
-
const visibleProps = computed(() =>
|
|
50
|
-
Object
|
|
51
|
-
.entries(props)
|
|
52
|
-
|
|
53
|
-
)
|
|
54
|
-
|
|
49
|
+
const visibleProps = computed(() =>
|
|
50
|
+
Object.fromEntries(
|
|
51
|
+
Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
|
|
52
|
+
),
|
|
53
|
+
);
|
|
55
54
|
</script>
|
|
56
55
|
|
|
57
56
|
<template>
|
|
58
|
-
<syn-tab-panel
|
|
59
|
-
|
|
60
|
-
v-bind="visibleProps"
|
|
61
|
-
ref="nativeElement"
|
|
62
|
-
>
|
|
63
|
-
<slot />
|
|
57
|
+
<syn-tab-panel v-bind="visibleProps" ref="nativeElement">
|
|
58
|
+
<slot></slot>
|
|
64
59
|
</syn-tab-panel>
|
|
65
60
|
</template>
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
import { computed, ref } from 'vue';
|
|
26
26
|
import '@synergy-design-system/components/components/tag/tag.js';
|
|
27
27
|
|
|
28
|
-
import type { SynRemoveEvent
|
|
28
|
+
import type { SynRemoveEvent } from '@synergy-design-system/components';
|
|
29
|
+
import type { SynTag } from '@synergy-design-system/components';
|
|
29
30
|
|
|
30
31
|
// DOM Reference to the element
|
|
31
32
|
const nativeElement = ref<SynTag>();
|
|
@@ -37,31 +38,31 @@ defineExpose({
|
|
|
37
38
|
// Map attributes
|
|
38
39
|
const props = defineProps<{
|
|
39
40
|
/**
|
|
40
|
-
* The tag's size.
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* The tag's size.
|
|
42
|
+
*/
|
|
43
|
+
size?: SynTag['size'];
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
|
-
* Makes the tag removable and shows a remove button.
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
* Makes the tag removable and shows a remove button.
|
|
47
|
+
*/
|
|
48
|
+
removable?: SynTag['removable'];
|
|
48
49
|
}>();
|
|
49
50
|
|
|
50
51
|
// Make sure prop binding only forwards the props that are actually there.
|
|
51
52
|
// This is needed because :param="param" also adds an empty attribute
|
|
52
53
|
// when using web-components, which breaks optional arguments like size in SynInput
|
|
53
54
|
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
54
|
-
const visibleProps = computed(() =>
|
|
55
|
-
Object
|
|
56
|
-
.entries(props)
|
|
57
|
-
|
|
58
|
-
)
|
|
55
|
+
const visibleProps = computed(() =>
|
|
56
|
+
Object.fromEntries(
|
|
57
|
+
Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
|
|
58
|
+
),
|
|
59
|
+
);
|
|
59
60
|
|
|
60
61
|
// Map events
|
|
61
62
|
defineEmits<{
|
|
62
63
|
/**
|
|
63
|
-
* Emitted when the remove button is activated.
|
|
64
|
-
|
|
64
|
+
* Emitted when the remove button is activated.
|
|
65
|
+
*/
|
|
65
66
|
'syn-remove': [e: SynRemoveEvent];
|
|
66
67
|
}>();
|
|
67
68
|
</script>
|
|
@@ -72,11 +73,9 @@ export type { SynRemoveEvent } from '@synergy-design-system/components';
|
|
|
72
73
|
|
|
73
74
|
<template>
|
|
74
75
|
<syn-tag
|
|
75
|
-
v-bind="visibleProps"
|
|
76
|
-
|
|
77
|
-
ref="nativeElement"
|
|
78
76
|
@syn-remove="$emit('syn-remove', $event)"
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
v-bind="visibleProps"
|
|
78
|
+
ref="nativeElement">
|
|
79
|
+
<slot></slot>
|
|
81
80
|
</syn-tag>
|
|
82
81
|
</template>
|
|
@@ -30,9 +30,12 @@
|
|
|
30
30
|
import { computed, ref } from 'vue';
|
|
31
31
|
import '@synergy-design-system/components/components/textarea/textarea.js';
|
|
32
32
|
|
|
33
|
-
import type {
|
|
34
|
-
|
|
35
|
-
} from '@synergy-design-system/components';
|
|
33
|
+
import type { SynBlurEvent } from '@synergy-design-system/components';
|
|
34
|
+
import type { SynChangeEvent } from '@synergy-design-system/components';
|
|
35
|
+
import type { SynFocusEvent } from '@synergy-design-system/components';
|
|
36
|
+
import type { SynInputEvent } from '@synergy-design-system/components';
|
|
37
|
+
import type { SynInvalidEvent } from '@synergy-design-system/components';
|
|
38
|
+
import type { SynTextarea } from '@synergy-design-system/components';
|
|
36
39
|
|
|
37
40
|
// DOM Reference to the element
|
|
38
41
|
const nativeElement = ref<SynTextarea>();
|
|
@@ -43,59 +46,59 @@ defineExpose({
|
|
|
43
46
|
|
|
44
47
|
// Map attributes
|
|
45
48
|
const props = defineProps<{
|
|
46
|
-
|
|
49
|
+
title?: SynTextarea['title'];
|
|
47
50
|
|
|
48
51
|
/**
|
|
49
|
-
* The name of the textarea, submitted as a name/value pair with form data.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
* The name of the textarea, submitted as a name/value pair with form data.
|
|
53
|
+
*/
|
|
54
|
+
name?: SynTextarea['name'];
|
|
52
55
|
|
|
53
56
|
/**
|
|
54
|
-
* The current value of the textarea, submitted as a name/value pair with form data.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
+
* The current value of the textarea, submitted as a name/value pair with form data.
|
|
58
|
+
*/
|
|
59
|
+
value?: SynTextarea['value'];
|
|
57
60
|
|
|
58
61
|
/**
|
|
59
|
-
* The textarea's size.
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
* The textarea's size.
|
|
63
|
+
*/
|
|
64
|
+
size?: SynTextarea['size'];
|
|
62
65
|
|
|
63
66
|
/**
|
|
64
|
-
* The textarea's label.
|
|
65
|
-
* If you need to display HTML, use the `label` slot instead.
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
* The textarea's label.
|
|
68
|
+
* If you need to display HTML, use the `label` slot instead.
|
|
69
|
+
*/
|
|
70
|
+
label?: SynTextarea['label'];
|
|
68
71
|
|
|
69
72
|
/**
|
|
70
|
-
* The textarea's help text.
|
|
71
|
-
* If you need to display HTML, use the `help-text` slot instead.
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
* The textarea's help text.
|
|
74
|
+
* If you need to display HTML, use the `help-text` slot instead.
|
|
75
|
+
*/
|
|
76
|
+
helpText?: SynTextarea['helpText'];
|
|
74
77
|
|
|
75
78
|
/**
|
|
76
|
-
* Placeholder text to show as a hint when the input is empty.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
* Placeholder text to show as a hint when the input is empty.
|
|
80
|
+
*/
|
|
81
|
+
placeholder?: SynTextarea['placeholder'];
|
|
79
82
|
|
|
80
83
|
/**
|
|
81
|
-
* The number of rows to display by default.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
* The number of rows to display by default.
|
|
85
|
+
*/
|
|
86
|
+
rows?: SynTextarea['rows'];
|
|
84
87
|
|
|
85
88
|
/**
|
|
86
|
-
* Controls how the textarea can be resized.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
* Controls how the textarea can be resized.
|
|
90
|
+
*/
|
|
91
|
+
resize?: SynTextarea['resize'];
|
|
89
92
|
|
|
90
93
|
/**
|
|
91
|
-
* Disables the textarea.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
* Disables the textarea.
|
|
95
|
+
*/
|
|
96
|
+
disabled?: SynTextarea['disabled'];
|
|
94
97
|
|
|
95
98
|
/**
|
|
96
|
-
* Makes the textarea readonly.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
* Makes the textarea readonly.
|
|
100
|
+
*/
|
|
101
|
+
readonly?: SynTextarea['readonly'];
|
|
99
102
|
|
|
100
103
|
/**
|
|
101
104
|
* By default, form controls are associated with the nearest containing `<form>` element.
|
|
@@ -104,64 +107,64 @@ to place the form control outside of a form and associate it with the form that
|
|
|
104
107
|
* The form must be in
|
|
105
108
|
the same document or shadow root for this to work.
|
|
106
109
|
*/
|
|
107
|
-
|
|
110
|
+
form?: SynTextarea['form'];
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
|
-
* Makes the textarea a required field.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
* Makes the textarea a required field.
|
|
114
|
+
*/
|
|
115
|
+
required?: SynTextarea['required'];
|
|
113
116
|
|
|
114
117
|
/**
|
|
115
|
-
* The minimum length of input that will be considered valid.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
+
* The minimum length of input that will be considered valid.
|
|
119
|
+
*/
|
|
120
|
+
minlength?: SynTextarea['minlength'];
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
|
-
* The maximum length of input that will be considered valid.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
+
* The maximum length of input that will be considered valid.
|
|
124
|
+
*/
|
|
125
|
+
maxlength?: SynTextarea['maxlength'];
|
|
123
126
|
|
|
124
127
|
/**
|
|
125
|
-
* Controls whether and how text input is automatically capitalized as it is entered by the user.
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
* Controls whether and how text input is automatically capitalized as it is entered by the user.
|
|
129
|
+
*/
|
|
130
|
+
autocapitalize?: SynTextarea['autocapitalize'];
|
|
128
131
|
|
|
129
132
|
/**
|
|
130
|
-
* Indicates whether the browser's autocorrect feature is on or off.
|
|
131
|
-
|
|
132
|
-
|
|
133
|
+
* Indicates whether the browser's autocorrect feature is on or off.
|
|
134
|
+
*/
|
|
135
|
+
autocorrect?: SynTextarea['autocorrect'];
|
|
133
136
|
|
|
134
137
|
/**
|
|
135
138
|
* Specifies what permission the browser has to provide assistance in filling out form field values.
|
|
136
139
|
* Refer to
|
|
137
140
|
[this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.
|
|
138
141
|
*/
|
|
139
|
-
|
|
142
|
+
autocomplete?: SynTextarea['autocomplete'];
|
|
140
143
|
|
|
141
144
|
/**
|
|
142
|
-
* Indicates that the input should receive focus on page load.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
+
* Indicates that the input should receive focus on page load.
|
|
146
|
+
*/
|
|
147
|
+
autofocus?: SynTextarea['autofocus'];
|
|
145
148
|
|
|
146
149
|
/**
|
|
147
|
-
* Used to customize the label or icon of the Enter key on virtual keyboards.
|
|
148
|
-
|
|
149
|
-
|
|
150
|
+
* Used to customize the label or icon of the Enter key on virtual keyboards.
|
|
151
|
+
*/
|
|
152
|
+
enterkeyhint?: SynTextarea['enterkeyhint'];
|
|
150
153
|
|
|
151
154
|
/**
|
|
152
|
-
* Enables spell checking on the textarea.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
+
* Enables spell checking on the textarea.
|
|
156
|
+
*/
|
|
157
|
+
spellcheck?: SynTextarea['spellcheck'];
|
|
155
158
|
|
|
156
159
|
/**
|
|
157
160
|
* Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
|
|
158
161
|
keyboard on supportive devices.
|
|
159
162
|
*/
|
|
160
|
-
|
|
163
|
+
inputmode?: SynTextarea['inputmode'];
|
|
161
164
|
|
|
162
165
|
/**
|
|
163
|
-
* Support for two way data binding
|
|
164
|
-
|
|
166
|
+
* Support for two way data binding
|
|
167
|
+
*/
|
|
165
168
|
modelValue?: SynTextarea['value'];
|
|
166
169
|
}>();
|
|
167
170
|
|
|
@@ -169,42 +172,42 @@ keyboard on supportive devices.
|
|
|
169
172
|
// This is needed because :param="param" also adds an empty attribute
|
|
170
173
|
// when using web-components, which breaks optional arguments like size in SynInput
|
|
171
174
|
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
172
|
-
const visibleProps = computed(() =>
|
|
173
|
-
Object
|
|
174
|
-
.entries(props)
|
|
175
|
-
|
|
176
|
-
)
|
|
175
|
+
const visibleProps = computed(() =>
|
|
176
|
+
Object.fromEntries(
|
|
177
|
+
Object.entries(props).filter(([, value]) => typeof value !== 'undefined'),
|
|
178
|
+
),
|
|
179
|
+
);
|
|
177
180
|
|
|
178
181
|
// Map events
|
|
179
182
|
defineEmits<{
|
|
180
183
|
/**
|
|
181
|
-
* Emitted when the control loses focus.
|
|
182
|
-
|
|
184
|
+
* Emitted when the control loses focus.
|
|
185
|
+
*/
|
|
183
186
|
'syn-blur': [e: SynBlurEvent];
|
|
184
187
|
|
|
185
188
|
/**
|
|
186
|
-
* Emitted when an alteration to the control's value is committed by the user.
|
|
187
|
-
|
|
189
|
+
* Emitted when an alteration to the control's value is committed by the user.
|
|
190
|
+
*/
|
|
188
191
|
'syn-change': [e: SynChangeEvent];
|
|
189
192
|
|
|
190
193
|
/**
|
|
191
|
-
* Emitted when the control gains focus.
|
|
192
|
-
|
|
194
|
+
* Emitted when the control gains focus.
|
|
195
|
+
*/
|
|
193
196
|
'syn-focus': [e: SynFocusEvent];
|
|
194
197
|
|
|
195
198
|
/**
|
|
196
|
-
* Emitted when the control receives input.
|
|
197
|
-
|
|
199
|
+
* Emitted when the control receives input.
|
|
200
|
+
*/
|
|
198
201
|
'syn-input': [e: SynInputEvent];
|
|
199
202
|
|
|
200
203
|
/**
|
|
201
|
-
* Emitted when the form control has been checked for validity and its constraints aren't satisfied.
|
|
202
|
-
|
|
204
|
+
* Emitted when the form control has been checked for validity and its constraints aren't satisfied.
|
|
205
|
+
*/
|
|
203
206
|
'syn-invalid': [e: SynInvalidEvent];
|
|
204
207
|
|
|
205
208
|
/**
|
|
206
|
-
* Support for two way data binding
|
|
207
|
-
|
|
209
|
+
* Support for two way data binding
|
|
210
|
+
*/
|
|
208
211
|
'update:modelValue': [newValue: SynTextarea['value']];
|
|
209
212
|
}>();
|
|
210
213
|
</script>
|
|
@@ -219,15 +222,23 @@ export type { SynInvalidEvent } from '@synergy-design-system/components';
|
|
|
219
222
|
|
|
220
223
|
<template>
|
|
221
224
|
<syn-textarea
|
|
222
|
-
v-bind="visibleProps"
|
|
223
|
-
ref="nativeElement"
|
|
224
|
-
:value="typeof props.modelValue !== 'undefined' ? props.modelValue : typeof props.value !== 'undefined' ? props.value : undefined"
|
|
225
225
|
@syn-blur="$emit('syn-blur', $event)"
|
|
226
226
|
@syn-change="$emit('syn-change', $event)"
|
|
227
227
|
@syn-focus="$emit('syn-focus', $event)"
|
|
228
|
-
@syn-input="
|
|
228
|
+
@syn-input="
|
|
229
|
+
$emit('update:modelValue', $event.target.value);
|
|
230
|
+
$emit('syn-input', $event);
|
|
231
|
+
"
|
|
229
232
|
@syn-invalid="$emit('syn-invalid', $event)"
|
|
230
|
-
|
|
231
|
-
|
|
233
|
+
:value="
|
|
234
|
+
typeof props.modelValue !== 'undefined'
|
|
235
|
+
? props.modelValue
|
|
236
|
+
: typeof props.value !== 'undefined'
|
|
237
|
+
? props.value
|
|
238
|
+
: undefined
|
|
239
|
+
"
|
|
240
|
+
v-bind="visibleProps"
|
|
241
|
+
ref="nativeElement">
|
|
242
|
+
<slot></slot>
|
|
232
243
|
</syn-textarea>
|
|
233
244
|
</template>
|