@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.
Files changed (73) hide show
  1. package/README.md +1 -33
  2. package/dist/components/SynVueAlert.vue.d.ts +0 -5
  3. package/dist/components/SynVueBreadcrumbItem.vue.d.ts +0 -2
  4. package/dist/components/SynVueButton.vue.d.ts +0 -8
  5. package/dist/components/SynVueCard.vue.d.ts +8 -6
  6. package/dist/components/SynVueCheckbox.vue.d.ts +0 -9
  7. package/dist/components/SynVueDialog.vue.d.ts +0 -3
  8. package/dist/components/SynVueDivider.vue.d.ts +0 -1
  9. package/dist/components/SynVueDrawer.vue.d.ts +0 -4
  10. package/dist/components/SynVueDropdown.vue.d.ts +0 -13
  11. package/dist/components/SynVueHeader.vue.d.ts +26 -25
  12. package/dist/components/SynVueIcon.vue.d.ts +0 -2
  13. package/dist/components/SynVueIconButton.vue.d.ts +0 -3
  14. package/dist/components/SynVueInput.vue.d.ts +0 -15
  15. package/dist/components/SynVueMenuItem.vue.d.ts +0 -5
  16. package/dist/components/SynVueNavItem.vue.d.ts +0 -4
  17. package/dist/components/SynVueOptgroup.vue.d.ts +0 -1
  18. package/dist/components/SynVueOption.vue.d.ts +0 -4
  19. package/dist/components/SynVuePopup.vue.d.ts +0 -1
  20. package/dist/components/SynVuePrioNav.vue.d.ts +8 -23
  21. package/dist/components/SynVueRadio.vue.d.ts +0 -2
  22. package/dist/components/SynVueRadioButton.vue.d.ts +0 -3
  23. package/dist/components/SynVueRadioGroup.vue.d.ts +0 -6
  24. package/dist/components/SynVueSelect.vue.d.ts +0 -11
  25. package/dist/components/SynVueSideNav.vue.d.ts +0 -5
  26. package/dist/components/SynVueSwitch.vue.d.ts +0 -9
  27. package/dist/components/SynVueTab.vue.d.ts +63 -0
  28. package/dist/components/SynVueTabGroup.vue.d.ts +78 -0
  29. package/dist/components/SynVueTabPanel.vue.d.ts +40 -0
  30. package/dist/components/SynVueTextarea.vue.d.ts +0 -107
  31. package/dist/components/SynVueTooltip.vue.d.ts +0 -5
  32. package/dist/index.d.ts +3 -0
  33. package/package.json +2 -2
  34. package/src/components/SynVueAlert.vue +0 -26
  35. package/src/components/SynVueBadge.vue +0 -3
  36. package/src/components/SynVueBreadcrumb.vue +0 -3
  37. package/src/components/SynVueBreadcrumbItem.vue +0 -6
  38. package/src/components/SynVueButton.vue +0 -41
  39. package/src/components/SynVueButtonGroup.vue +0 -3
  40. package/src/components/SynVueCard.vue +4 -6
  41. package/src/components/SynVueCheckbox.vue +0 -45
  42. package/src/components/SynVueDialog.vue +0 -14
  43. package/src/components/SynVueDivider.vue +0 -4
  44. package/src/components/SynVueDrawer.vue +0 -16
  45. package/src/components/SynVueDropdown.vue +0 -39
  46. package/src/components/SynVueHeader.vue +37 -39
  47. package/src/components/SynVueIcon.vue +0 -6
  48. package/src/components/SynVueIconButton.vue +0 -17
  49. package/src/components/SynVueInput.vue +0 -70
  50. package/src/components/SynVueMenu.vue +0 -3
  51. package/src/components/SynVueMenuItem.vue +0 -15
  52. package/src/components/SynVueMenuLabel.vue +0 -3
  53. package/src/components/SynVueNavItem.vue +0 -19
  54. package/src/components/SynVueOptgroup.vue +0 -4
  55. package/src/components/SynVueOption.vue +0 -13
  56. package/src/components/SynVuePopup.vue +0 -7
  57. package/src/components/SynVuePrioNav.vue +1 -8
  58. package/src/components/SynVueProgressBar.vue +0 -3
  59. package/src/components/SynVueProgressRing.vue +0 -3
  60. package/src/components/SynVueRadio.vue +0 -6
  61. package/src/components/SynVueRadioButton.vue +0 -14
  62. package/src/components/SynVueRadioGroup.vue +0 -28
  63. package/src/components/SynVueSelect.vue +0 -50
  64. package/src/components/SynVueSideNav.vue +0 -18
  65. package/src/components/SynVueSpinner.vue +0 -3
  66. package/src/components/SynVueSwitch.vue +0 -43
  67. package/src/components/SynVueTab.vue +92 -0
  68. package/src/components/SynVueTabGroup.vue +121 -0
  69. package/src/components/SynVueTabPanel.vue +69 -0
  70. package/src/components/SynVueTag.vue +0 -3
  71. package/src/components/SynVueTextarea.vue +0 -60
  72. package/src/components/SynVueTooltip.vue +0 -18
  73. package/src/index.js +3 -0
@@ -0,0 +1,121 @@
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 Tab groups organize content into a container that shows one section at a time.
10
+ * @documentation https://synergy.style/components/tab-group
11
+ * @status stable
12
+ * @since 2.0
13
+ *
14
+ * @dependency syn-icon-button
15
+ *
16
+ * @slot - Used for grouping tab panels in the tab group. Must be `<syn-tab-panel>` elements.
17
+ * @slot nav - Used for grouping tabs in the tab group. Must be `<syn-tab>` elements.
18
+ *
19
+ * @event {{ name: String }} syn-tab-show - Emitted when a tab is shown. The payload of the event returns the "panel" attribute of the shown tab.
20
+ * @event {{ name: String }} syn-tab-hide - Emitted when a tab is hidden. The payload of the event returns the "panel" attribute of the hidden tab.
21
+ *
22
+ * @csspart base - The component's base wrapper.
23
+ * @csspart nav - The tab group's navigation container where tabs are slotted in.
24
+ * @csspart tabs - The container that wraps the tabs.
25
+ * @csspart active-tab-indicator - The line that highlights the currently selected tab.
26
+ * @csspart body - The tab group's body where tab panels are slotted in.
27
+ * @csspart scroll-button - The previous/next scroll buttons that show when tabs are scrollable, an `<syn-icon-button>`.
28
+ * @csspart scroll-button--start - The starting scroll button.
29
+ * @csspart scroll-button--end - The ending scroll button.
30
+ * @csspart scroll-button__base - The scroll button's exported `base` part.
31
+ *
32
+ * @cssproperty --indicator-color - The color of the active tab indicator.
33
+ * @cssproperty --indicator-width - The width of the active tab indicator.
34
+ * @cssproperty --track-color - The color of the indicator's track (the line that separates tabs from panels).
35
+ * @cssproperty --track-width - The width of the indicator's track (the line that separates tabs from panels).
36
+ */
37
+ import { computed, ref } from 'vue';
38
+ import '@synergy-design-system/components/components/tab-group/tab-group.js';
39
+
40
+ import type { SynTabGroup, SynTabHideEvent, SynTabShowEvent } from '@synergy-design-system/components';
41
+
42
+ // DOM Reference to the element
43
+ const nativeElement = ref<SynTabGroup>();
44
+
45
+ defineExpose({
46
+ nativeElement,
47
+ });
48
+
49
+ // Map attributes
50
+ const props = defineProps<{
51
+ /**
52
+ * The placement of the tabs.
53
+ */
54
+ 'placement'?: SynTabGroup['placement'];
55
+
56
+ /**
57
+ * When set to auto, navigating tabs with the arrow keys will instantly show the corresponding tab panel.
58
+ * When set to
59
+ manual, the tab will receive focus but will not show until the user presses spacebar or enter.
60
+ */
61
+ 'activation'?: SynTabGroup['activation'];
62
+
63
+ /**
64
+ * Disables the scroll arrows that appear when tabs overflow.
65
+ */
66
+ 'noScrollControls'?: SynTabGroup['noScrollControls'];
67
+
68
+ /**
69
+ * Draws the tab group as a contained element.
70
+ */
71
+ 'contained'?: SynTabGroup['contained'];
72
+
73
+ /**
74
+ * Draws the tab group with edges instead of roundings.
75
+ * Takes only effect if used with the 'contained' property
76
+ */
77
+ 'sharp'?: SynTabGroup['sharp'];
78
+ }>();
79
+
80
+ // Make sure prop binding only forwards the props that are actually there.
81
+ // This is needed because :param="param" also adds an empty attribute
82
+ // when using web-components, which breaks optional arguments like size in SynInput
83
+ // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
84
+ const visibleProps = computed(() => Object.fromEntries(
85
+ Object
86
+ .entries(props)
87
+ .filter(([, value]) => typeof value !== 'undefined'),
88
+ ));
89
+
90
+ // Map events
91
+ defineEmits<{
92
+ /**
93
+ * Emitted when a tab is shown.
94
+ * The payload of the event returns the "panel" attribute of the shown tab.
95
+ */
96
+ 'syn-tab-show': [e: SynTabShowEvent];
97
+
98
+ /**
99
+ * Emitted when a tab is hidden.
100
+ * The payload of the event returns the "panel" attribute of the hidden tab.
101
+ */
102
+ 'syn-tab-hide': [e: SynTabHideEvent];
103
+ }>();
104
+ </script>
105
+
106
+ <script lang="ts">
107
+ export type { SynTabShowEvent } from '@synergy-design-system/components';
108
+ export type { SynTabHideEvent } from '@synergy-design-system/components';
109
+ </script>
110
+
111
+ <template>
112
+ <syn-tab-group
113
+ v-bind="visibleProps"
114
+ ref="nativeElement"
115
+
116
+ @syn-tab-show="$emit('syn-tab-show', $event)"
117
+ @syn-tab-hide="$emit('syn-tab-hide', $event)"
118
+ >
119
+ <slot />
120
+ </syn-tab-group>
121
+ </template>
@@ -0,0 +1,69 @@
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 Tab panels are used inside [tab groups](/components/tab-group) to display tabbed content.
10
+ * @documentation https://synergy.style/components/tab-panel
11
+ * @status stable
12
+ * @since 2.0
13
+ *
14
+ * @slot - The tab panel's content.
15
+ *
16
+ * @csspart base - The component's base wrapper.
17
+ *
18
+ * @cssproperty --padding - The tab panel's padding.
19
+ */
20
+ import { computed, ref } from 'vue';
21
+ import '@synergy-design-system/components/components/tab-panel/tab-panel.js';
22
+
23
+ import type { SynTabPanel } from '@synergy-design-system/components';
24
+
25
+ // DOM Reference to the element
26
+ const nativeElement = ref<SynTabPanel>();
27
+
28
+ defineExpose({
29
+ nativeElement,
30
+ });
31
+
32
+ // Map attributes
33
+ const props = defineProps<{
34
+ /**
35
+ * The tab panel's name.
36
+ */
37
+ 'name'?: SynTabPanel['name'];
38
+
39
+ /**
40
+ * When true, the tab panel will be shown.
41
+ */
42
+ 'active'?: SynTabPanel['active'];
43
+ }>();
44
+
45
+ // Make sure prop binding only forwards the props that are actually there.
46
+ // This is needed because :param="param" also adds an empty attribute
47
+ // when using web-components, which breaks optional arguments like size in SynInput
48
+ // @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
49
+ const visibleProps = computed(() => Object.fromEntries(
50
+ Object
51
+ .entries(props)
52
+ .filter(([, value]) => typeof value !== 'undefined'),
53
+ ));
54
+
55
+ // Map events
56
+ defineEmits<{
57
+
58
+ }>();
59
+ </script>
60
+
61
+ <template>
62
+ <syn-tab-panel
63
+
64
+ v-bind="visibleProps"
65
+ ref="nativeElement"
66
+ >
67
+ <slot />
68
+ </syn-tab-panel>
69
+ </template>
@@ -30,10 +30,7 @@ import type { SynRemoveEvent, SynTag } from '@synergy-design-system/components';
30
30
  // DOM Reference to the element
31
31
  const nativeElement = ref<SynTag>();
32
32
 
33
- // Map methods
34
-
35
33
  defineExpose({
36
-
37
34
  nativeElement,
38
35
  });
39
36
 
@@ -37,67 +37,7 @@ import type {
37
37
  // DOM Reference to the element
38
38
  const nativeElement = ref<SynTextarea>();
39
39
 
40
- // Map methods
41
- const callHandleDisabledChange = (...args: Parameters<SynTextarea['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
42
- const callHandleRowsChange = (...args: Parameters<SynTextarea['handleRowsChange']>) => nativeElement.value?.handleRowsChange(...args);
43
- const callHandleValueChange = (...args: Parameters<SynTextarea['handleValueChange']>) => nativeElement.value?.handleValueChange(...args);
44
- /**
45
- * Sets focus on the textarea.
46
- */
47
- const callFocus = (...args: Parameters<SynTextarea['focus']>) => nativeElement.value?.focus(...args);
48
- /**
49
- * Removes focus from the textarea.
50
- */
51
- const callBlur = (...args: Parameters<SynTextarea['blur']>) => nativeElement.value?.blur(...args);
52
- /**
53
- * Selects all the text in the textarea.
54
- */
55
- const callSelect = (...args: Parameters<SynTextarea['select']>) => nativeElement.value?.select(...args);
56
- /**
57
- * Gets or sets the textarea's scroll position.
58
- */
59
- const callScrollPosition = (...args: Parameters<SynTextarea['scrollPosition']>) => nativeElement.value?.scrollPosition(...args);
60
- /**
61
- * Sets the start and end positions of the text selection (0-based).
62
- */
63
- const callSetSelectionRange = (...args: Parameters<SynTextarea['setSelectionRange']>) => nativeElement.value?.setSelectionRange(...args);
64
- /**
65
- * Replaces a range of text with a new string.
66
- */
67
- const callSetRangeText = (...args: Parameters<SynTextarea['setRangeText']>) => nativeElement.value?.setRangeText(...args);
68
- /**
69
- * Checks for validity but does not show a validation message.
70
- * Returns `true` when valid and `false` when invalid.
71
- */
72
- const callCheckValidity = (...args: Parameters<SynTextarea['checkValidity']>) => nativeElement.value?.checkValidity(...args);
73
- /**
74
- * Gets the associated form, if one exists.
75
- */
76
- const callGetForm = (...args: Parameters<SynTextarea['getForm']>) => nativeElement.value?.getForm(...args);
77
- /**
78
- * Checks for validity and shows the browser's validation message if the control is invalid.
79
- */
80
- const callReportValidity = (...args: Parameters<SynTextarea['reportValidity']>) => nativeElement.value?.reportValidity(...args);
81
- /**
82
- * Sets a custom validation message.
83
- * Pass an empty string to restore validity.
84
- */
85
- const callSetCustomValidity = (...args: Parameters<SynTextarea['setCustomValidity']>) => nativeElement.value?.setCustomValidity(...args);
86
-
87
40
  defineExpose({
88
- callHandleDisabledChange,
89
- callHandleRowsChange,
90
- callHandleValueChange,
91
- callFocus,
92
- callBlur,
93
- callSelect,
94
- callScrollPosition,
95
- callSetSelectionRange,
96
- callSetRangeText,
97
- callCheckValidity,
98
- callGetForm,
99
- callReportValidity,
100
- callSetCustomValidity,
101
41
  nativeElement,
102
42
  });
103
43
 
@@ -43,25 +43,7 @@ import type {
43
43
  // DOM Reference to the element
44
44
  const nativeElement = ref<SynTooltip>();
45
45
 
46
- // Map methods
47
- const callHandleOpenChange = (...args: Parameters<SynTooltip['handleOpenChange']>) => nativeElement.value?.handleOpenChange(...args);
48
- const callHandleOptionsChange = (...args: Parameters<SynTooltip['handleOptionsChange']>) => nativeElement.value?.handleOptionsChange(...args);
49
- const callHandleDisabledChange = (...args: Parameters<SynTooltip['handleDisabledChange']>) => nativeElement.value?.handleDisabledChange(...args);
50
- /**
51
- * Shows the tooltip.
52
- */
53
- const callShow = (...args: Parameters<SynTooltip['show']>) => nativeElement.value?.show(...args);
54
- /**
55
- * Hides the tooltip
56
- */
57
- const callHide = (...args: Parameters<SynTooltip['hide']>) => nativeElement.value?.hide(...args);
58
-
59
46
  defineExpose({
60
- callHandleOpenChange,
61
- callHandleOptionsChange,
62
- callHandleDisabledChange,
63
- callShow,
64
- callHide,
65
47
  nativeElement,
66
48
  });
67
49
 
package/src/index.js CHANGED
@@ -36,6 +36,9 @@ export { default as SynVueSelect } from './components/SynVueSelect.vue';
36
36
  export { default as SynVueSideNav } from './components/SynVueSideNav.vue';
37
37
  export { default as SynVueSpinner } from './components/SynVueSpinner.vue';
38
38
  export { default as SynVueSwitch } from './components/SynVueSwitch.vue';
39
+ export { default as SynVueTab } from './components/SynVueTab.vue';
40
+ export { default as SynVueTabGroup } from './components/SynVueTabGroup.vue';
41
+ export { default as SynVueTabPanel } from './components/SynVueTabPanel.vue';
39
42
  export { default as SynVueTag } from './components/SynVueTag.vue';
40
43
  export { default as SynVueTextarea } from './components/SynVueTextarea.vue';
41
44
  export { default as SynVueTooltip } from './components/SynVueTooltip.vue';