@vc-shell/framework 1.1.57 → 1.1.59
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/CHANGELOG.md +13 -0
- package/core/services/widget-service.ts +6 -4
- package/dist/assets/154365acf3010d96.woff2 +0 -0
- package/dist/assets/475937116ee3314a.woff2 +0 -0
- package/dist/assets/49791943b3872376.woff2 +0 -0
- package/dist/assets/7a5aa5abd625137f.ttf +0 -0
- package/dist/assets/ac1a99b3d05d8232.woff +0 -0
- package/dist/assets/ccc878931d74181b.woff2 +0 -0
- package/dist/assets/ee6983981ffcbb41.woff2 +0 -0
- package/dist/core/services/widget-service.d.ts +2 -2
- package/dist/core/services/widget-service.d.ts.map +1 -1
- package/dist/framework.js +3535 -3506
- package/dist/index.css +9 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts +5 -0
- package/dist/ui/components/atoms/vc-icon/vc-lucide-icon.vue.d.ts.map +1 -1
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts +6 -1
- package/dist/ui/components/atoms/vc-icon/vc-material-icon.vue.d.ts.map +1 -1
- package/dist/{vendor-intlify-core-base-Bvt2vJFV.js → vendor-intlify-core-base-DZ8xhqFL.js} +4 -4
- package/dist/{vendor-intlify-message-compiler-1VxNzq21.js → vendor-intlify-message-compiler-8PCyu80g.js} +2 -2
- package/dist/{vendor-intlify-shared-D7kiPMOG.js → vendor-intlify-shared-BBJw7VuB.js} +1 -1
- package/dist/vendor-lucide-vue-next-m0L4DzUL.js +29780 -0
- package/dist/{vendor-vue-i18n-DPtOLen3.js → vendor-vue-i18n-CXIkMpzB.js} +5 -5
- package/package.json +8 -5
- package/ui/components/atoms/vc-icon/composables/use-icon.ts +1 -1
- package/ui/components/atoms/vc-icon/vc-bootstrap-icon.vue +5 -6
- package/ui/components/atoms/vc-icon/vc-fontawesome-icon.vue +31 -37
- package/ui/components/atoms/vc-icon/vc-icon.vue +186 -43
- package/ui/components/atoms/vc-icon/vc-lucide-icon.vue +70 -23
- package/ui/components/atoms/vc-icon/vc-material-icon.vue +37 -45
- package/dist/vendor-iconify-vue-D4fihzvl.js +0 -1205
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-if="finalIconName"
|
|
4
|
-
:icon="finalIconName"
|
|
2
|
+
<span
|
|
5
3
|
:class="[
|
|
6
4
|
'vc-material-icon',
|
|
5
|
+
'material-symbols-' + type,
|
|
7
6
|
!hasCustomSize && `vc-material-icon--${size}`,
|
|
8
7
|
variant ? `vc-material-icon--${variant}` : '',
|
|
9
8
|
]"
|
|
10
|
-
:style="
|
|
9
|
+
:style="iconStyle"
|
|
11
10
|
aria-hidden="true"
|
|
12
|
-
|
|
11
|
+
>
|
|
12
|
+
{{ icon }}
|
|
13
|
+
</span>
|
|
13
14
|
</template>
|
|
14
15
|
|
|
15
16
|
<script lang="ts" setup>
|
|
16
|
-
import {
|
|
17
|
-
import { Icon, loadIcon } from "@iconify/vue";
|
|
17
|
+
import { computed } from "vue";
|
|
18
18
|
import type { IconSize, IconVariant } from "./types";
|
|
19
19
|
import { useIcon } from "./composables";
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
22
|
/**
|
|
23
|
-
* Material icon name
|
|
23
|
+
* Material icon name (e.g., "home", "settings", "account_circle")
|
|
24
24
|
*/
|
|
25
25
|
icon: string;
|
|
26
26
|
|
|
@@ -29,6 +29,11 @@ interface Props {
|
|
|
29
29
|
*/
|
|
30
30
|
size?: IconSize;
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Type of the Material icon (outlined, rounded, sharp)
|
|
34
|
+
*/
|
|
35
|
+
type?: "outlined" | "rounded" | "sharp";
|
|
36
|
+
|
|
32
37
|
/**
|
|
33
38
|
* Icon color variant
|
|
34
39
|
*/
|
|
@@ -42,57 +47,36 @@ interface Props {
|
|
|
42
47
|
|
|
43
48
|
const props = withDefaults(defineProps<Props>(), {
|
|
44
49
|
size: "m",
|
|
50
|
+
type: "outlined",
|
|
45
51
|
});
|
|
46
52
|
|
|
47
|
-
// Check if using custom size to conditionally apply CSS class
|
|
48
53
|
const hasCustomSize = computed(() => typeof props.customSize === "number" && props.customSize > 0);
|
|
49
54
|
|
|
50
|
-
// Use the shared icon composable for consistent scaling
|
|
51
55
|
const { iconStyle } = useIcon({
|
|
52
56
|
type: "material",
|
|
53
57
|
size: props.size,
|
|
54
58
|
variant: props.variant,
|
|
55
59
|
customSize: props.customSize,
|
|
56
60
|
});
|
|
57
|
-
|
|
58
|
-
const finalIconName = ref("");
|
|
59
|
-
|
|
60
|
-
watch(
|
|
61
|
-
() => props.icon,
|
|
62
|
-
(icon) => {
|
|
63
|
-
const collection = "material-symbols-light";
|
|
64
|
-
|
|
65
|
-
const cleanIconName = icon.replace(/_/g, "-");
|
|
66
|
-
const baseIcon = `${collection}:${cleanIconName}`;
|
|
67
|
-
const outlineIcon = `${collection}:${cleanIconName}-outline`;
|
|
68
|
-
|
|
69
|
-
loadIcon(outlineIcon)
|
|
70
|
-
.then(() => {
|
|
71
|
-
finalIconName.value = outlineIcon;
|
|
72
|
-
})
|
|
73
|
-
.catch(() => {
|
|
74
|
-
finalIconName.value = baseIcon;
|
|
75
|
-
});
|
|
76
|
-
},
|
|
77
|
-
{ immediate: true },
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
// Combine the shared icon styles with Material-specific settings
|
|
81
|
-
const computedStyle = computed(() => {
|
|
82
|
-
const styles = { ...iconStyle.value };
|
|
83
|
-
|
|
84
|
-
// font-variation-settings is not applicable for SVG icons
|
|
85
|
-
// If using custom size, make sure fontSize is applied with !important
|
|
86
|
-
if (hasCustomSize.value && styles.fontSize) {
|
|
87
|
-
styles.fontSize = `${styles.fontSize.replace("px", "")}px !important`;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return styles;
|
|
91
|
-
});
|
|
92
61
|
</script>
|
|
93
62
|
|
|
94
63
|
<style lang="scss">
|
|
95
64
|
.vc-material-icon {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
font-feature-settings: "liga"; // Enable ligatures for icons
|
|
69
|
+
font-style: normal;
|
|
70
|
+
font-weight: normal;
|
|
71
|
+
letter-spacing: normal;
|
|
72
|
+
line-height: 1;
|
|
73
|
+
text-transform: none;
|
|
74
|
+
white-space: nowrap;
|
|
75
|
+
word-wrap: normal;
|
|
76
|
+
-webkit-font-smoothing: antialiased;
|
|
77
|
+
text-rendering: optimizeLegibility;
|
|
78
|
+
|
|
79
|
+
// Sizes
|
|
96
80
|
&--xs {
|
|
97
81
|
font-size: var(--icon-size-xs);
|
|
98
82
|
}
|
|
@@ -121,6 +105,7 @@ const computedStyle = computed(() => {
|
|
|
121
105
|
font-size: var(--icon-size-xxxl);
|
|
122
106
|
}
|
|
123
107
|
|
|
108
|
+
// Variants
|
|
124
109
|
&--warning {
|
|
125
110
|
color: var(--icon-color-warning);
|
|
126
111
|
}
|
|
@@ -133,4 +118,11 @@ const computedStyle = computed(() => {
|
|
|
133
118
|
color: var(--icon-color-success);
|
|
134
119
|
}
|
|
135
120
|
}
|
|
121
|
+
|
|
122
|
+
// Base class provided by the @material-symbols/font-300 package
|
|
123
|
+
.material-symbols-outlined,
|
|
124
|
+
.material-symbols-rounded,
|
|
125
|
+
.material-symbols-sharp {
|
|
126
|
+
font-family: "Material Symbols Outlined", "Material Symbols Rounded", "Material Symbols Sharp";
|
|
127
|
+
}
|
|
136
128
|
</style>
|