sprintify-ui 0.0.53 → 0.0.54

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -10,10 +10,12 @@
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>
@@ -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 trim(value);
161
- }
162
-
163
- if (isNumber(value)) {
164
- return trim(value + '');
160
+ return value;
165
161
  }
166
162
 
167
163
  return '';
@@ -79,7 +79,7 @@ function transformInputValue(event: Event | null): string | null {
79
79
  const value = get(event, 'target.value', null);
80
80
 
81
81
  if (isString(value)) {
82
- return trim(value);
82
+ return value;
83
83
  }
84
84
 
85
85
  return '';