@icij/murmur-next 4.7.4 → 4.7.5
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.
|
@@ -97,8 +97,12 @@ const color = computed(() => {
|
|
|
97
97
|
return colorVariant
|
|
98
98
|
})
|
|
99
99
|
|
|
100
|
+
const isPercentSize = computed(() => {
|
|
101
|
+
return typeof props.size === 'string' && props.size.endsWith('%')
|
|
102
|
+
})
|
|
103
|
+
|
|
100
104
|
const isRawSize = computed(() => {
|
|
101
|
-
return !['2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', undefined].includes(props.size)
|
|
105
|
+
return !['2xs', 'xs', 'sm', 'md', 'lg', 'xl', '2xl', undefined].includes(props.size) && !isPercentSize.value
|
|
102
106
|
})
|
|
103
107
|
|
|
104
108
|
const hasSize = computed(() => {
|
|
@@ -109,6 +113,7 @@ const style = computed(() => {
|
|
|
109
113
|
return {
|
|
110
114
|
'--app-icon-color': color.value,
|
|
111
115
|
'--app-icon-raw-size': isRawSize.value ? props.size : undefined,
|
|
116
|
+
'--app-icon-percent-size': isPercentSize.value ? props.size : undefined,
|
|
112
117
|
'--app-icon-size': hasSize.value ? props.size : undefined,
|
|
113
118
|
'--app-icon-scale': props.scale ?? 1,
|
|
114
119
|
'--app-icon-spin-duration': props.spinDuration,
|
|
@@ -122,6 +127,7 @@ const classList = computed(() => {
|
|
|
122
127
|
[`app-icon--size-${props.size}`]: hasSize.value,
|
|
123
128
|
[`app-icon--has-size`]: hasSize.value,
|
|
124
129
|
[`app-icon--raw-size`]: isRawSize.value,
|
|
130
|
+
[`app-icon--percent-size`]: isPercentSize.value,
|
|
125
131
|
[`app-icon--hover`]: currentHover.value,
|
|
126
132
|
[`app-icon--spin`]: props.spin,
|
|
127
133
|
[`app-icon--spin-reverse`]: props.spinReverse,
|
|
@@ -171,6 +177,16 @@ const classList = computed(() => {
|
|
|
171
177
|
font-size: var(--app-icon-raw-size);
|
|
172
178
|
}
|
|
173
179
|
|
|
180
|
+
&--percent-size {
|
|
181
|
+
width: var(--app-icon-percent-size);
|
|
182
|
+
height: auto;
|
|
183
|
+
|
|
184
|
+
:deep(svg) {
|
|
185
|
+
width: 100%;
|
|
186
|
+
height: auto;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
174
190
|
&--spin :deep(svg) {
|
|
175
191
|
animation: app-icon-spin var(--app-icon-spin-duration, 1s) linear infinite;
|
|
176
192
|
}
|