@saasmakers/ui 2.0.14 → 2.0.15
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/app/components/fields/FieldAvatar.vue +2 -5
- package/app/components/fields/FieldCheckbox.vue +0 -2
- package/app/components/fields/FieldInput.vue +0 -2
- package/app/components/fields/FieldLabel.vue +0 -4
- package/app/components/fields/FieldMessage.vue +0 -3
- package/app/components/fields/FieldSelect.vue +4 -5
- package/app/components/fields/FieldTabs.vue +7 -9
- package/app/components/fields/FieldTextarea.vue +0 -1
- package/app/components/fields/FieldTime.vue +0 -1
- package/app/types/fields.d.ts +1 -1
- package/package.json +1 -1
|
@@ -87,7 +87,6 @@ function onOpenFilePicker() {
|
|
|
87
87
|
'rounded-lg border border-gray-200 shadow-sm dark:border-gray-800': border === 'full',
|
|
88
88
|
'border-b border-gray-200 dark:border-gray-800': border === 'bottom',
|
|
89
89
|
'border-0': border === 'none',
|
|
90
|
-
'text-2xs h-8': size === 'xs',
|
|
91
90
|
'text-xs h-10': size === 'sm',
|
|
92
91
|
'text-sm h-12': size === 'base',
|
|
93
92
|
'text-base h-14': size === 'lg',
|
|
@@ -104,14 +103,13 @@ function onOpenFilePicker() {
|
|
|
104
103
|
v-if="loading"
|
|
105
104
|
class="flex shrink-0 items-center justify-center"
|
|
106
105
|
:class="{
|
|
107
|
-
'h-7 w-7': size === 'xs',
|
|
108
106
|
'h-8 w-8': size === 'sm',
|
|
109
107
|
'h-9 w-9': size === 'base',
|
|
110
108
|
'h-10 w-10': size === 'lg',
|
|
111
109
|
}"
|
|
112
110
|
>
|
|
113
111
|
<BaseSpinner
|
|
114
|
-
:size="size === '
|
|
112
|
+
:size="size === 'sm' ? 'base' : size === 'base' ? 'lg' : 'xl'"
|
|
115
113
|
/>
|
|
116
114
|
</div>
|
|
117
115
|
|
|
@@ -120,7 +118,6 @@ function onOpenFilePicker() {
|
|
|
120
118
|
:border-width="2"
|
|
121
119
|
class="shrink-0"
|
|
122
120
|
:class="{
|
|
123
|
-
'h-7 w-7': size === 'xs',
|
|
124
121
|
'h-8 w-8': size === 'sm',
|
|
125
122
|
'h-9 w-9': size === 'base',
|
|
126
123
|
'h-10 w-10': size === 'lg',
|
|
@@ -131,7 +128,7 @@ function onOpenFilePicker() {
|
|
|
131
128
|
|
|
132
129
|
<BaseText
|
|
133
130
|
class="min-w-0 flex-1 text-gray-900 dark:text-gray-100"
|
|
134
|
-
:size="({ base: 'sm', lg: 'base', sm: 'xs'
|
|
131
|
+
:size="({ base: 'sm', lg: 'base', sm: 'xs' } as const)[size]"
|
|
135
132
|
:text="loading ? t('actionLoading') : (action || t('action'))"
|
|
136
133
|
/>
|
|
137
134
|
</div>
|
|
@@ -52,7 +52,6 @@ const modelValue = defineModel<FieldCheckbox['modelValue']>({ default: false })
|
|
|
52
52
|
'border-gray-300 dark:border-gray-600': !modelValue,
|
|
53
53
|
'group-hover:border-gray-400 dark:group-hover:border-gray-500': !disabled && !modelValue,
|
|
54
54
|
'group-hover:border-indigo-700 dark:group-hover:border-indigo-300': !disabled && modelValue,
|
|
55
|
-
'h-3.5 w-3.5': size === 'xs',
|
|
56
55
|
'h-4 w-4': size === 'sm',
|
|
57
56
|
'h-4.5 w-4.5': size === 'base',
|
|
58
57
|
'h-5 w-5': size === 'lg',
|
|
@@ -64,7 +63,6 @@ const modelValue = defineModel<FieldCheckbox['modelValue']>({ default: false })
|
|
|
64
63
|
:name="getLayerIcon('check')"
|
|
65
64
|
class="shrink-0 text-gray-900 dark:text-white"
|
|
66
65
|
:class="{
|
|
67
|
-
'size-2': size === 'xs',
|
|
68
66
|
'size-2.5': size === 'sm',
|
|
69
67
|
'size-3': size === 'base',
|
|
70
68
|
'size-3.5': size === 'lg',
|
|
@@ -166,7 +166,6 @@ defineExpose({ focus })
|
|
|
166
166
|
<div
|
|
167
167
|
class="flex items-center"
|
|
168
168
|
:class="{
|
|
169
|
-
'h-8': size === 'xs',
|
|
170
169
|
'h-10': size === 'sm',
|
|
171
170
|
'h-12': size === 'base',
|
|
172
171
|
'h-14': size === 'lg',
|
|
@@ -200,7 +199,6 @@ defineExpose({ focus })
|
|
|
200
199
|
'px-10': border === 'bottom' && type !== 'password',
|
|
201
200
|
'border-0 p-0': border === 'none' && type !== 'password',
|
|
202
201
|
'border-0 pr-9': border === 'none' && type === 'password',
|
|
203
|
-
'text-2xs': size === 'xs',
|
|
204
202
|
'text-xs': size === 'sm',
|
|
205
203
|
'text-sm': size === 'base',
|
|
206
204
|
'text-base': size === 'lg',
|
|
@@ -29,8 +29,6 @@ const textSize = computed<BaseSize>(() => {
|
|
|
29
29
|
return 'base'
|
|
30
30
|
case 'sm':
|
|
31
31
|
return 'xs'
|
|
32
|
-
case 'xs':
|
|
33
|
-
return '2xs'
|
|
34
32
|
default:
|
|
35
33
|
return 'sm'
|
|
36
34
|
}
|
|
@@ -71,11 +69,9 @@ function onKeyDown(event: KeyboardEvent) {
|
|
|
71
69
|
'text-gray-500 dark:text-gray-500 line-through': lineThrough,
|
|
72
70
|
'hover:text-black dark:hover:text-white': isClickable && !lineThrough,
|
|
73
71
|
'w-0 truncate': truncate,
|
|
74
|
-
'mb-1.5': size === 'xs' && hasMarginBottom,
|
|
75
72
|
'mb-2': size === 'sm' && hasMarginBottom,
|
|
76
73
|
'mb-2.5': size === 'base' && hasMarginBottom,
|
|
77
74
|
'mb-3': size === 'lg' && hasMarginBottom,
|
|
78
|
-
'ml-1': size === 'xs' && hasMarginLeft,
|
|
79
75
|
'ml-1.5': size === 'sm' && hasMarginLeft,
|
|
80
76
|
'ml-2': size === 'base' && hasMarginLeft,
|
|
81
77
|
'ml-2.5': size === 'lg' && hasMarginLeft,
|
|
@@ -127,8 +127,6 @@ const textSize = computed<BaseSize>(() => {
|
|
|
127
127
|
return 'sm'
|
|
128
128
|
case 'sm':
|
|
129
129
|
return 'xs'
|
|
130
|
-
case 'xs':
|
|
131
|
-
return '2xs'
|
|
132
130
|
default:
|
|
133
131
|
return 'xs'
|
|
134
132
|
}
|
|
@@ -141,7 +139,6 @@ const textSize = computed<BaseSize>(() => {
|
|
|
141
139
|
class="text-left tracking-tighter"
|
|
142
140
|
:class="{
|
|
143
141
|
'field-disabled': disabled,
|
|
144
|
-
'mt-2': size === 'xs',
|
|
145
142
|
'mt-2.5': size === 'sm',
|
|
146
143
|
'mt-3': size === 'base',
|
|
147
144
|
'mt-3.5': size === 'lg',
|
|
@@ -221,7 +221,6 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
221
221
|
'hover:border-gray-300 dark:hover:border-gray-700': !opened && !disabled,
|
|
222
222
|
'focus-visible:border-gray-400 dark:focus-visible:border-gray-600': !disabled,
|
|
223
223
|
'px-3': padding,
|
|
224
|
-
'text-2xs h-8': size === 'xs',
|
|
225
224
|
'text-xs h-10': size === 'sm',
|
|
226
225
|
'text-sm h-12': size === 'base',
|
|
227
226
|
'text-base h-14': size === 'lg',
|
|
@@ -280,11 +279,11 @@ function selectOption(event: MouseEvent, value: string) {
|
|
|
280
279
|
class="options min-w-xs overflow-y-auto border border-gray-400 rounded-lg bg-white text-gray-600 font-medium dark:border-gray-600 dark:bg-gray-900 dark:text-gray-400"
|
|
281
280
|
:class="{
|
|
282
281
|
'md:min-w-xl p-1 pb-0': computedColumns.length >= 2,
|
|
283
|
-
'mt-8':
|
|
284
|
-
'mt-10': ((
|
|
282
|
+
'mt-8': size === 'sm' && !padding && direction === 'bottom',
|
|
283
|
+
'mt-10': ((size === 'sm' && padding) || (size === 'base' && !padding)) && direction === 'bottom',
|
|
285
284
|
'mt-12': size === 'base' && padding && direction === 'bottom',
|
|
286
|
-
'mb-8':
|
|
287
|
-
'mb-10': ((
|
|
285
|
+
'mb-8': size === 'sm' && !padding && direction === 'top',
|
|
286
|
+
'mb-10': ((size === 'sm' && padding) || (size === 'base' && !padding)) && direction === 'top',
|
|
288
287
|
'mb-12': size === 'base' && padding && direction === 'top',
|
|
289
288
|
'max-h-xs': maxHeight === 'xs',
|
|
290
289
|
'max-h-sm': maxHeight === 'sm',
|
|
@@ -38,7 +38,7 @@ function onTabClick(event: MouseEvent, tabValue: string) {
|
|
|
38
38
|
:class="{
|
|
39
39
|
'field-disabled': disabled,
|
|
40
40
|
'gap-0 border-b border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-gray-900': theme === 'border',
|
|
41
|
-
'gap-2 rounded-lg bg-gray-200 dark:bg-gray-800 p-0.5
|
|
41
|
+
'gap-2 rounded-lg bg-gray-200 dark:bg-gray-800 p-0.5': theme === 'rounded',
|
|
42
42
|
}"
|
|
43
43
|
>
|
|
44
44
|
<component
|
|
@@ -51,15 +51,13 @@ function onTabClick(event: MouseEvent, tabValue: string) {
|
|
|
51
51
|
'flex-col': orientation === 'vertical',
|
|
52
52
|
'text-gray-900 dark:text-gray-100': isTabActive(tab.value),
|
|
53
53
|
'text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100': !isTabActive(tab.value) && !disabled,
|
|
54
|
-
'py-1 px-
|
|
55
|
-
'py-1.5 px-3 sm:py-2': size === '
|
|
56
|
-
'py-2 px-
|
|
57
|
-
'py-2.5 px-4 sm:py-3':
|
|
58
|
-
'py-3 px-
|
|
59
|
-
'py-3.5 px-5 sm:py-4': size === 'lg' && theme === 'border' && orientation === 'responsive',
|
|
60
|
-
'py-1.5 px-2.5': size === 'xs' && theme === 'rounded' && orientation !== 'responsive',
|
|
54
|
+
'py-1 px-3 sm:py-2': size === 'sm' && theme === 'rounded' && orientation === 'responsive',
|
|
55
|
+
'py-1.5 px-3.5 sm:py-2.5': size === 'base' && theme === 'rounded' && orientation === 'responsive',
|
|
56
|
+
'py-2 px-4 sm:py-3': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation === 'responsive',
|
|
57
|
+
'py-2.5 px-4.5 sm:py-3.5': size === 'base' && theme === 'border' && orientation === 'responsive',
|
|
58
|
+
'py-3 px-5 sm:py-4': size === 'lg' && theme === 'border' && orientation === 'responsive',
|
|
61
59
|
'py-2 px-3': size === 'sm' && theme === 'rounded' && orientation !== 'responsive',
|
|
62
|
-
'py-2.5 px-3.5':
|
|
60
|
+
'py-2.5 px-3.5': size === 'base' && theme === 'rounded' && orientation !== 'responsive',
|
|
63
61
|
'py-3 px-4': (size === 'lg' && theme === 'rounded' || size === 'sm' && theme === 'border') && orientation !== 'responsive',
|
|
64
62
|
'py-3.5 px-4.5': size === 'base' && theme === 'border' && orientation !== 'responsive',
|
|
65
63
|
'py-4 px-5': size === 'lg' && theme === 'border' && orientation !== 'responsive',
|
|
@@ -81,7 +81,6 @@ function onFieldClick(event: MouseEvent) {
|
|
|
81
81
|
'border shadow-sm border-gray-200 dark:border-gray-800': border,
|
|
82
82
|
'hover:border-gray-300 dark:hover:border-gray-700 focus:border-gray-400 dark:focus:border-gray-600': border && !disabled,
|
|
83
83
|
'border-0': !border,
|
|
84
|
-
'text-2xs': size === 'xs',
|
|
85
84
|
'text-xs': size === 'sm',
|
|
86
85
|
'text-sm': size === 'base',
|
|
87
86
|
'text-base': size === 'lg',
|
|
@@ -61,7 +61,6 @@ function onFieldBlur(event: FocusEvent) {
|
|
|
61
61
|
'focus-within:border-gray-400 hover:border-gray-300 dark:focus-within:border-gray-600 dark:hover:border-gray-700': !disabled,
|
|
62
62
|
'bg-gray-100 dark:bg-gray-900': background === 'gray',
|
|
63
63
|
'bg-white dark:bg-gray-900': background === 'white',
|
|
64
|
-
'text-2xs h-8': size === 'xs',
|
|
65
64
|
'text-xs h-10': size === 'sm',
|
|
66
65
|
'text-sm h-12': size === 'base',
|
|
67
66
|
'text-base h-14': size === 'lg',
|
package/app/types/fields.d.ts
CHANGED