@synergy-design-system/vue 1.24.0 → 1.25.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/SynVueCard.vue.d.ts +34 -0
- package/dist/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/components/SynVueCard.vue +78 -0
- package/src/index.js +1 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import '@synergy-design-system/components/components/card/card.js';
|
|
2
|
+
import type { SynCard } from '@synergy-design-system/components';
|
|
3
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
4
|
+
/**
|
|
5
|
+
* Draws the card as a nested item.
|
|
6
|
+
* Can be used when nesting multiple syn-cards to create hierarchy
|
|
7
|
+
*/
|
|
8
|
+
nested?: boolean | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
nativeElement: import("vue").Ref<SynCard | undefined>;
|
|
11
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
12
|
+
/**
|
|
13
|
+
* Draws the card as a nested item.
|
|
14
|
+
* Can be used when nesting multiple syn-cards to create hierarchy
|
|
15
|
+
*/
|
|
16
|
+
nested?: boolean | undefined;
|
|
17
|
+
}>>>, {}, {}>, {
|
|
18
|
+
default?(_: {}): any;
|
|
19
|
+
}>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
27
|
+
type __VLS_TypePropsToOption<T> = {
|
|
28
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
29
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
30
|
+
} : {
|
|
31
|
+
type: import('vue').PropType<T[K]>;
|
|
32
|
+
required: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as SynVueAlert } from "./components/SynVueAlert.vue";
|
|
|
2
2
|
export { default as SynVueBadge } from "./components/SynVueBadge.vue";
|
|
3
3
|
export { default as SynVueButton } from "./components/SynVueButton.vue";
|
|
4
4
|
export { default as SynVueButtonGroup } from "./components/SynVueButtonGroup.vue";
|
|
5
|
+
export { default as SynVueCard } from "./components/SynVueCard.vue";
|
|
5
6
|
export { default as SynVueCheckbox } from "./components/SynVueCheckbox.vue";
|
|
6
7
|
export { default as SynVueDialog } from "./components/SynVueDialog.vue";
|
|
7
8
|
export { default as SynVueDivider } from "./components/SynVueDivider.vue";
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://www.sick.com"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@synergy-design-system/components": "^1.
|
|
7
|
+
"@synergy-design-system/components": "^1.25.0"
|
|
8
8
|
},
|
|
9
9
|
"description": "Vue3 wrappers for the Synergy Design System",
|
|
10
10
|
"exports": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"directory": "packages/vue"
|
|
41
41
|
},
|
|
42
42
|
"type": "module",
|
|
43
|
-
"version": "1.
|
|
43
|
+
"version": "1.25.0",
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@vue/tsconfig": "^0.5.1",
|
|
46
46
|
"vue": "^3.4.24"
|
|
@@ -0,0 +1,78 @@
|
|
|
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 Cards can be used to group related subjects in a container.
|
|
10
|
+
* @documentation https://synergy.style/components/card
|
|
11
|
+
* @status stable
|
|
12
|
+
* @since 2.0
|
|
13
|
+
*
|
|
14
|
+
* @slot - The card's main content.
|
|
15
|
+
* @slot header - An optional header for the card.
|
|
16
|
+
* @slot footer - An optional footer for the card.
|
|
17
|
+
* @slot image - An optional image to render at the start of the card.
|
|
18
|
+
*
|
|
19
|
+
* @csspart base - The component's base wrapper.
|
|
20
|
+
* @csspart image - The container that wraps the card's image.
|
|
21
|
+
* @csspart header - The container that wraps the card's header.
|
|
22
|
+
* @csspart body - The container that wraps the card's main content.
|
|
23
|
+
* @csspart footer - The container that wraps the card's footer.
|
|
24
|
+
*
|
|
25
|
+
* @cssproperty --border-color - The card's border color, including borders that occur inside the card.
|
|
26
|
+
* @cssproperty --border-radius - The border radius for the card's edges.
|
|
27
|
+
* @cssproperty --border-width - The width of the card's borders.
|
|
28
|
+
* @cssproperty --padding - The padding to use for the card's sections.
|
|
29
|
+
*/
|
|
30
|
+
import { computed, ref } from 'vue';
|
|
31
|
+
import '@synergy-design-system/components/components/card/card.js';
|
|
32
|
+
|
|
33
|
+
import type { SynCard } from '@synergy-design-system/components';
|
|
34
|
+
|
|
35
|
+
// DOM Reference to the element
|
|
36
|
+
const nativeElement = ref<SynCard>();
|
|
37
|
+
|
|
38
|
+
// Map methods
|
|
39
|
+
|
|
40
|
+
defineExpose({
|
|
41
|
+
|
|
42
|
+
nativeElement,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Map attributes
|
|
46
|
+
const props = defineProps<{
|
|
47
|
+
/**
|
|
48
|
+
* Draws the card as a nested item.
|
|
49
|
+
* Can be used when nesting multiple syn-cards to create hierarchy
|
|
50
|
+
*/
|
|
51
|
+
'nested'?: SynCard['nested'];
|
|
52
|
+
}>();
|
|
53
|
+
|
|
54
|
+
// Make sure prop binding only forwards the props that are actually there.
|
|
55
|
+
// This is needed because :param="param" also adds an empty attribute
|
|
56
|
+
// when using web-components, which breaks optional arguments like size in SynInput
|
|
57
|
+
// @see https://github.com/vuejs/core/issues/5190#issuecomment-1003112498
|
|
58
|
+
const visibleProps = computed(() => Object.fromEntries(
|
|
59
|
+
Object
|
|
60
|
+
.entries(props)
|
|
61
|
+
.filter(([, value]) => typeof value !== 'undefined'),
|
|
62
|
+
));
|
|
63
|
+
|
|
64
|
+
// Map events
|
|
65
|
+
defineEmits<{
|
|
66
|
+
|
|
67
|
+
}>();
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<template>
|
|
71
|
+
<syn-card
|
|
72
|
+
|
|
73
|
+
v-bind="visibleProps"
|
|
74
|
+
ref="nativeElement"
|
|
75
|
+
>
|
|
76
|
+
<slot />
|
|
77
|
+
</syn-card>
|
|
78
|
+
</template>
|
package/src/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { default as SynVueAlert } from './components/SynVueAlert.vue';
|
|
|
7
7
|
export { default as SynVueBadge } from './components/SynVueBadge.vue';
|
|
8
8
|
export { default as SynVueButton } from './components/SynVueButton.vue';
|
|
9
9
|
export { default as SynVueButtonGroup } from './components/SynVueButtonGroup.vue';
|
|
10
|
+
export { default as SynVueCard } from './components/SynVueCard.vue';
|
|
10
11
|
export { default as SynVueCheckbox } from './components/SynVueCheckbox.vue';
|
|
11
12
|
export { default as SynVueDialog } from './components/SynVueDialog.vue';
|
|
12
13
|
export { default as SynVueDivider } from './components/SynVueDivider.vue';
|