@synergy-design-system/vue 2.5.0 → 2.7.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/dist/components/SynVueAccordion.vue.d.ts +12 -10
- package/dist/components/SynVueAlert.vue.d.ts +8 -8
- package/dist/components/SynVueBadge.vue.d.ts +8 -6
- package/dist/components/SynVueBreadcrumb.vue.d.ts +8 -6
- package/dist/components/SynVueBreadcrumbItem.vue.d.ts +12 -10
- package/dist/components/SynVueButton.vue.d.ts +38 -38
- package/dist/components/SynVueButtonGroup.vue.d.ts +8 -6
- package/dist/components/SynVueCard.vue.d.ts +8 -6
- package/dist/components/SynVueCheckbox.vue.d.ts +22 -22
- package/dist/components/SynVueDetails.vue.d.ts +10 -10
- package/dist/components/SynVueDialog.vue.d.ts +6 -6
- package/dist/components/SynVueDivider.vue.d.ts +2 -2
- package/dist/components/SynVueDrawer.vue.d.ts +10 -10
- package/dist/components/SynVueDropdown.vue.d.ts +16 -16
- package/dist/components/SynVueFile.vue.d.ts +32 -32
- package/dist/components/SynVueHeader.vue.d.ts +4 -4
- package/dist/components/SynVueIcon.vue.d.ts +8 -8
- package/dist/components/SynVueIconButton.vue.d.ts +20 -20
- package/dist/components/SynVueInput.vue.d.ts +60 -60
- package/dist/components/SynVueMenuItem.vue.d.ts +16 -14
- package/dist/components/SynVueMenuLabel.vue.d.ts +6 -4
- package/dist/components/SynVueNavItem.vue.d.ts +14 -14
- package/dist/components/SynVueOptgroup.vue.d.ts +10 -8
- package/dist/components/SynVueOption.vue.d.ts +10 -8
- package/dist/components/SynVuePopup.vue.d.ts +44 -44
- package/dist/components/SynVuePrioNav.vue.d.ts +6 -4
- package/dist/components/SynVueProgressBar.vue.d.ts +12 -10
- package/dist/components/SynVueProgressRing.vue.d.ts +10 -8
- package/dist/components/SynVueRadio.vue.d.ts +6 -6
- package/dist/components/SynVueRadioButton.vue.d.ts +8 -8
- package/dist/components/SynVueRadioGroup.vue.d.ts +16 -16
- package/dist/components/SynVueRange.vue.d.ts +154 -0
- package/dist/components/SynVueRangeTick.vue.d.ts +34 -0
- package/dist/components/SynVueSelect.vue.d.ts +34 -34
- package/dist/components/SynVueSideNav.vue.d.ts +6 -6
- package/dist/components/SynVueSwitch.vue.d.ts +20 -20
- package/dist/components/SynVueTab.vue.d.ts +8 -8
- package/dist/components/SynVueTabGroup.vue.d.ts +10 -10
- package/dist/components/SynVueTabPanel.vue.d.ts +10 -8
- package/dist/components/SynVueTag.vue.d.ts +4 -4
- package/dist/components/SynVueTextarea.vue.d.ts +46 -46
- package/dist/components/SynVueTooltip.vue.d.ts +16 -16
- package/dist/index.d.ts +2 -0
- package/package.json +4 -4
- package/src/components/SynVueDropdown.vue +2 -1
- package/src/components/SynVueRange.vue +210 -0
- package/src/components/SynVueRangeTick.vue +62 -0
- package/src/components/SynVueSelect.vue +3 -1
- package/src/index.js +2 -0
|
@@ -0,0 +1,210 @@
|
|
|
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 Ranges allow the user to select values within a given range using one or two thumbs.
|
|
10
|
+
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-range--docs
|
|
11
|
+
* @status stable
|
|
12
|
+
*
|
|
13
|
+
* @dependency syn-tooltip
|
|
14
|
+
*
|
|
15
|
+
* @slot label - The range's label. Alternatively, you can use the `label` attribute.
|
|
16
|
+
* @slot prefix - Used to prepend a presentational icon or similar element to the range.
|
|
17
|
+
* @slot suffix - Used to append a presentational icon or similar element to the range.
|
|
18
|
+
* @slot help-text - Text that describes how to use the range.
|
|
19
|
+
* Alternatively, you can use the `help-text` attribute.
|
|
20
|
+
* @slot ticks - Used to display tick marks at specific intervals along the range.
|
|
21
|
+
*
|
|
22
|
+
* @event syn-blur - Emitted when the control loses focus.
|
|
23
|
+
* @event syn-change - Emitted when an alteration to the control's value is committed by the user.
|
|
24
|
+
* @event syn-focus - Emitted when the control gains focus.
|
|
25
|
+
* @event syn-input - Emitted when the control receives input.
|
|
26
|
+
* @event syn-invalid - Emitted when the form control has been checked for validity
|
|
27
|
+
* and its constraints aren't satisfied.
|
|
28
|
+
* @event syn-move - Emitted when the user moves a thumb, either via touch or keyboard.
|
|
29
|
+
* Use `Event.preventDefault()` to prevent movement.
|
|
30
|
+
*
|
|
31
|
+
* @csspart form-control - The form control that wraps the label, input, and help text.
|
|
32
|
+
* @csspart form-control-label - The label's wrapper.
|
|
33
|
+
* @csspart form-control-help-text - The help text's wrapper.
|
|
34
|
+
* @csspart base - The component's base wrapper.
|
|
35
|
+
* @csspart input-wrapper - The container that wraps the input track and ticks.
|
|
36
|
+
* @csspart track-wrapper - The wrapper for the track.
|
|
37
|
+
* @csspart track - The inactive track.
|
|
38
|
+
* @csspart active-track - The active track.
|
|
39
|
+
* @csspart prefix - The container that wraps the prefix.
|
|
40
|
+
* @csspart suffix - The container that wraps the suffix.
|
|
41
|
+
* @csspart ticks - The container that wraps the tick marks.
|
|
42
|
+
* @csspart thumb - The thumb(s) that the user can drag to change the range.
|
|
43
|
+
*
|
|
44
|
+
* @cssproperty --thumb-size - The size of a thumb.
|
|
45
|
+
* @cssproperty --thumb-hit-area-size - The clickable area around the thumb.
|
|
46
|
+
* Per default this is set to 140% of the thumb size. Must be a scale css value (defaults to 1.4).
|
|
47
|
+
* @cssproperty --track-hit-area-size - The clickable area around the track (top and left).
|
|
48
|
+
* @cssproperty --track-color-active - Color of the track representing the current value.
|
|
49
|
+
* @cssproperty --track-color-inactive - Color of the track that represents the remaining value.
|
|
50
|
+
* @cssproperty --track-height - The height of the track.
|
|
51
|
+
* @cssproperty --track-active-offset - The point of origin of the active track,
|
|
52
|
+
* starting at the left side of the range.
|
|
53
|
+
*/
|
|
54
|
+
import { computed, ref } from 'vue';
|
|
55
|
+
import '@synergy-design-system/components/components/range/range.js';
|
|
56
|
+
|
|
57
|
+
import type {
|
|
58
|
+
SynBlurEvent, SynChangeEvent, SynFocusEvent, SynInputEvent, SynInvalidEvent, SynMoveEvent, SynRange,
|
|
59
|
+
} from '@synergy-design-system/components';
|
|
60
|
+
|
|
61
|
+
// DOM Reference to the element
|
|
62
|
+
const nativeElement = ref<SynRange>();
|
|
63
|
+
|
|
64
|
+
defineExpose({
|
|
65
|
+
nativeElement,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// Map attributes
|
|
69
|
+
const props = defineProps<{
|
|
70
|
+
/**
|
|
71
|
+
* The name of the range, submitted as a name/value pair with form data.
|
|
72
|
+
*/
|
|
73
|
+
'name'?: SynRange['name'];
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The range's label.
|
|
77
|
+
* If you need to display HTML, use the `label` slot instead.
|
|
78
|
+
*/
|
|
79
|
+
'label'?: SynRange['label'];
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The range's help text.
|
|
83
|
+
* If you need to display HTML, use the help-text slot instead.
|
|
84
|
+
*/
|
|
85
|
+
'helpText'?: SynRange['helpText'];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Disables the range.
|
|
89
|
+
*/
|
|
90
|
+
'disabled'?: SynRange['disabled'];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The minimum acceptable value of the range.
|
|
94
|
+
*/
|
|
95
|
+
'min'?: SynRange['min'];
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The maximum acceptable value of the range.
|
|
99
|
+
*/
|
|
100
|
+
'max'?: SynRange['max'];
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The interval at which the range will increase and decrease.
|
|
104
|
+
*/
|
|
105
|
+
'step'?: SynRange['step'];
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The range's size.
|
|
109
|
+
*/
|
|
110
|
+
'size'?: SynRange['size'];
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The preferred placement of the range's tooltip.
|
|
114
|
+
* Use "none" to disable the tooltip
|
|
115
|
+
*/
|
|
116
|
+
'tooltipPlacement'?: SynRange['tooltipPlacement'];
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The current values of the input (in ascending order) as a string of space separated values
|
|
120
|
+
*/
|
|
121
|
+
'value'?: SynRange['value'];
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* By default, form controls are associated with the nearest containing `<form>` element.
|
|
125
|
+
This attribute allows you to place the form control outside of a form
|
|
126
|
+
and associate it with the form that has this `id`.
|
|
127
|
+
The form must be in the same document or shadow root for this to work.
|
|
128
|
+
*/
|
|
129
|
+
'form'?: SynRange['form'];
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Support for two way data binding
|
|
133
|
+
*/
|
|
134
|
+
modelValue?: SynRange['value'];
|
|
135
|
+
}>();
|
|
136
|
+
|
|
137
|
+
// Make sure prop binding only forwards the props that are actually there.
|
|
138
|
+
// This is needed because :param="param" also adds an empty attribute
|
|
139
|
+
// when using web-components, which breaks optional arguments like size in SynInput
|
|
140
|
+
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
141
|
+
const visibleProps = computed(() => Object.fromEntries(
|
|
142
|
+
Object
|
|
143
|
+
.entries(props)
|
|
144
|
+
.filter(([, value]) => typeof value !== 'undefined'),
|
|
145
|
+
));
|
|
146
|
+
|
|
147
|
+
// Map events
|
|
148
|
+
defineEmits<{
|
|
149
|
+
/**
|
|
150
|
+
* Emitted when the control loses focus.
|
|
151
|
+
*/
|
|
152
|
+
'syn-blur': [e: SynBlurEvent];
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Emitted when an alteration to the control's value is committed by the user.
|
|
156
|
+
*/
|
|
157
|
+
'syn-change': [e: SynChangeEvent];
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Emitted when the control gains focus.
|
|
161
|
+
*/
|
|
162
|
+
'syn-focus': [e: SynFocusEvent];
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Emitted when the control receives input.
|
|
166
|
+
*/
|
|
167
|
+
'syn-input': [e: SynInputEvent];
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Emitted when the form control has been checked for validity and its constraints aren't satisfied.
|
|
171
|
+
*/
|
|
172
|
+
'syn-invalid': [e: SynInvalidEvent];
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Emitted when the user moves a thumb, either via touch or keyboard.
|
|
176
|
+
* Use `Event.preventDefault()` to prevent movement.
|
|
177
|
+
*/
|
|
178
|
+
'syn-move': [e: SynMoveEvent];
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Support for two way data binding
|
|
182
|
+
*/
|
|
183
|
+
'update:modelValue': [newValue: SynRange['value']];
|
|
184
|
+
}>();
|
|
185
|
+
</script>
|
|
186
|
+
|
|
187
|
+
<script lang="ts">
|
|
188
|
+
export type { SynBlurEvent } from '@synergy-design-system/components';
|
|
189
|
+
export type { SynChangeEvent } from '@synergy-design-system/components';
|
|
190
|
+
export type { SynFocusEvent } from '@synergy-design-system/components';
|
|
191
|
+
export type { SynInputEvent } from '@synergy-design-system/components';
|
|
192
|
+
export type { SynInvalidEvent } from '@synergy-design-system/components';
|
|
193
|
+
export type { SynMoveEvent } from '@synergy-design-system/components';
|
|
194
|
+
</script>
|
|
195
|
+
|
|
196
|
+
<template>
|
|
197
|
+
<syn-range
|
|
198
|
+
v-bind="visibleProps"
|
|
199
|
+
ref="nativeElement"
|
|
200
|
+
:value="typeof props.modelValue !== 'undefined' ? props.modelValue : typeof props.value !== 'undefined' ? props.value : undefined"
|
|
201
|
+
@syn-blur="$emit('syn-blur', $event)"
|
|
202
|
+
@syn-change="$emit('syn-change', $event)"
|
|
203
|
+
@syn-focus="$emit('syn-focus', $event)"
|
|
204
|
+
@syn-input="$emit('update:modelValue', $event.target.value); $emit('syn-input', $event)"
|
|
205
|
+
@syn-invalid="$emit('syn-invalid', $event)"
|
|
206
|
+
@syn-move="$emit('syn-move', $event)"
|
|
207
|
+
>
|
|
208
|
+
<slot />
|
|
209
|
+
</syn-range>
|
|
210
|
+
</template>
|
|
@@ -0,0 +1,62 @@
|
|
|
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 Ticks visually improve positioning on range sliders.
|
|
10
|
+
* @documentation https://synergy-design-system.github.io/?path=/docs/components-syn-range--docs
|
|
11
|
+
* @status stable
|
|
12
|
+
*
|
|
13
|
+
* @slot - The tick's label
|
|
14
|
+
*
|
|
15
|
+
* @csspart base - The component's base wrapper.
|
|
16
|
+
* @csspart label - The component's label.
|
|
17
|
+
* @csspart line - The component's tick line.
|
|
18
|
+
*
|
|
19
|
+
* @cssproperty --tick-height - The height of the tick marker.
|
|
20
|
+
* @cssproperty --tick-label-top - The top offset of the tick label.
|
|
21
|
+
*/
|
|
22
|
+
import { computed, ref } from 'vue';
|
|
23
|
+
import '@synergy-design-system/components/components/range-tick/range-tick.js';
|
|
24
|
+
|
|
25
|
+
import type { SynRangeTick } from '@synergy-design-system/components';
|
|
26
|
+
|
|
27
|
+
// DOM Reference to the element
|
|
28
|
+
const nativeElement = ref<SynRangeTick>();
|
|
29
|
+
|
|
30
|
+
defineExpose({
|
|
31
|
+
nativeElement,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// Map attributes
|
|
35
|
+
const props = defineProps<{
|
|
36
|
+
/**
|
|
37
|
+
* Whether the tick should be shown as a subdivision.
|
|
38
|
+
*/
|
|
39
|
+
'subdivision'?: SynRangeTick['subdivision'];
|
|
40
|
+
}>();
|
|
41
|
+
|
|
42
|
+
// Make sure prop binding only forwards the props that are actually there.
|
|
43
|
+
// This is needed because :param="param" also adds an empty attribute
|
|
44
|
+
// when using web-components, which breaks optional arguments like size in SynInput
|
|
45
|
+
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
46
|
+
const visibleProps = computed(() => Object.fromEntries(
|
|
47
|
+
Object
|
|
48
|
+
.entries(props)
|
|
49
|
+
.filter(([, value]) => typeof value !== 'undefined'),
|
|
50
|
+
));
|
|
51
|
+
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<template>
|
|
55
|
+
<syn-range-tick
|
|
56
|
+
|
|
57
|
+
v-bind="visibleProps"
|
|
58
|
+
ref="nativeElement"
|
|
59
|
+
>
|
|
60
|
+
<slot />
|
|
61
|
+
</syn-range-tick>
|
|
62
|
+
</template>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* @slot - The listbox options. Must be `<syn-option>` elements. You can use `<syn-divider>` to group items visually.
|
|
19
19
|
* @slot label - The input's label. Alternatively, you can use the `label` attribute.
|
|
20
20
|
* @slot prefix - Used to prepend a presentational icon or similar element to the combobox.
|
|
21
|
+
* @slot suffix - Used to append a presentational icon or similar element to the combobox.
|
|
21
22
|
* @slot clear-icon - An icon to use in lieu of the default clear icon.
|
|
22
23
|
* @slot expand-icon - The icon to show when the control is expanded and collapsed. Rotates on open and close.
|
|
23
24
|
* @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.
|
|
@@ -37,8 +38,9 @@
|
|
|
37
38
|
* @csspart form-control-label - The label's wrapper.
|
|
38
39
|
* @csspart form-control-input - The select's wrapper.
|
|
39
40
|
* @csspart form-control-help-text - The help text's wrapper.
|
|
40
|
-
* @csspart combobox - The container the wraps the prefix, combobox, clear icon, and expand button.
|
|
41
|
+
* @csspart combobox - The container the wraps the prefix, suffix, combobox, clear icon, and expand button.
|
|
41
42
|
* @csspart prefix - The container that wraps the prefix slot.
|
|
43
|
+
* @csspart suffix - The container that wraps the suffix slot.
|
|
42
44
|
* @csspart display-input - The element that displays the selected option's label, an `<input>` element.
|
|
43
45
|
* @csspart listbox - The listbox container where options are slotted.
|
|
44
46
|
* @csspart tags - The container that houses option tags when `multiselect` is used.
|
package/src/index.js
CHANGED
|
@@ -35,6 +35,8 @@ export { default as SynVueProgressRing } from './components/SynVueProgressRing.v
|
|
|
35
35
|
export { default as SynVueRadio } from './components/SynVueRadio.vue';
|
|
36
36
|
export { default as SynVueRadioButton } from './components/SynVueRadioButton.vue';
|
|
37
37
|
export { default as SynVueRadioGroup } from './components/SynVueRadioGroup.vue';
|
|
38
|
+
export { default as SynVueRange } from './components/SynVueRange.vue';
|
|
39
|
+
export { default as SynVueRangeTick } from './components/SynVueRangeTick.vue';
|
|
38
40
|
export { default as SynVueSelect } from './components/SynVueSelect.vue';
|
|
39
41
|
export { default as SynVueSideNav } from './components/SynVueSideNav.vue';
|
|
40
42
|
export { default as SynVueSpinner } from './components/SynVueSpinner.vue';
|