sprintify-ui 0.0.53 → 0.0.55
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/sprintify-ui.es.js +1710 -1691
- package/package.json +1 -1
- package/src/components/BaseAvatar.vue +23 -4
- package/src/components/BaseBreadcrumbs.stories.js +1 -1
- package/src/components/BaseBreadcrumbs.vue +2 -1
- package/src/components/BaseInput.vue +1 -5
- package/src/components/BaseTextarea.vue +1 -1
package/package.json
CHANGED
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
<img
|
|
4
4
|
:src="user.avatar_url"
|
|
5
5
|
:class="[sizeClass, detailsPosition == 'left' ? 'order-2' : 'order-1']"
|
|
6
|
-
class="shrink-0 overflow-hidden rounded-full"
|
|
6
|
+
class="shrink-0 overflow-hidden rounded-full object-cover object-center"
|
|
7
7
|
/>
|
|
8
8
|
<div
|
|
9
9
|
v-if="showDetails"
|
|
10
10
|
class="max-w-[120px] grow leading-tight"
|
|
11
11
|
:class="[
|
|
12
12
|
textSizeClass,
|
|
13
|
-
detailsPosition == 'left'
|
|
14
|
-
? 'order-1 mr-3 text-right'
|
|
15
|
-
: 'order-2 ml-3 text-left',
|
|
13
|
+
detailsPosition == 'left' ? 'order-1 text-right' : 'order-2 text-left',
|
|
16
14
|
]"
|
|
15
|
+
:style="{
|
|
16
|
+
marginLeft: detailsPosition == 'right' ? spacing : '0',
|
|
17
|
+
marginRight: detailsPosition == 'left' ? spacing : '0',
|
|
18
|
+
}"
|
|
17
19
|
>
|
|
18
20
|
<div class="truncate">
|
|
19
21
|
{{ user.full_name }}
|
|
@@ -94,4 +96,21 @@ const textSizeClass = computed((): string => {
|
|
|
94
96
|
}
|
|
95
97
|
return base;
|
|
96
98
|
});
|
|
99
|
+
|
|
100
|
+
const spacing = computed(() => {
|
|
101
|
+
switch (props.size) {
|
|
102
|
+
case 'xl':
|
|
103
|
+
return '0.95rem';
|
|
104
|
+
case 'lg':
|
|
105
|
+
return '0.85rem';
|
|
106
|
+
case 'base':
|
|
107
|
+
return '0.75rem';
|
|
108
|
+
case 'sm':
|
|
109
|
+
return '0.65rem';
|
|
110
|
+
case 'xs':
|
|
111
|
+
return '0.5rem';
|
|
112
|
+
default:
|
|
113
|
+
return '1rem';
|
|
114
|
+
}
|
|
115
|
+
});
|
|
97
116
|
</script>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<BaseIcon :icon="breadcrumb.icon" />
|
|
35
35
|
</span>
|
|
36
36
|
<span v-else>
|
|
37
|
-
{{ breadcrumb.label }}
|
|
37
|
+
{{ truncate(breadcrumb.label) }}
|
|
38
38
|
</span>
|
|
39
39
|
</a>
|
|
40
40
|
</RouterLink>
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
<script lang="ts" setup>
|
|
62
62
|
import { PropType } from 'vue';
|
|
63
63
|
import { Breadcrumb } from '@/types';
|
|
64
|
+
import { truncate } from 'lodash';
|
|
64
65
|
|
|
65
66
|
const props = defineProps({
|
|
66
67
|
breadcrumbs: {
|
|
@@ -157,11 +157,7 @@ function transformInputValue(event: Event | null): string | null {
|
|
|
157
157
|
const value = get(event, 'target.value', null);
|
|
158
158
|
|
|
159
159
|
if (isString(value)) {
|
|
160
|
-
return
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (isNumber(value)) {
|
|
164
|
-
return trim(value + '');
|
|
160
|
+
return value;
|
|
165
161
|
}
|
|
166
162
|
|
|
167
163
|
return '';
|