@saasmakers/ui 1.4.55 → 1.4.56
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/bases/BaseCard.vue +2 -7
- package/app/components/bases/BaseDivider.vue +21 -16
- package/app/components/layout/LayoutBottomSheet.vue +5 -2
- package/app/components/layout/LayoutModal.vue +1 -1
- package/app/types/bases.d.ts +1 -1
- package/package.json +1 -1
- package/uno.config.ts +2 -0
|
@@ -42,14 +42,10 @@ const hasAvatarBox = computed<boolean>(() => {
|
|
|
42
42
|
})
|
|
43
43
|
|
|
44
44
|
const isClickable = computed(() => {
|
|
45
|
-
return
|
|
45
|
+
return props.to || props.clickable
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
function onClick(event: MouseEvent) {
|
|
49
|
-
if (props.disabled) {
|
|
50
|
-
return
|
|
51
|
-
}
|
|
52
|
-
|
|
53
49
|
emit('click', event, props.id)
|
|
54
50
|
}
|
|
55
51
|
</script>
|
|
@@ -61,7 +57,6 @@ function onClick(event: MouseEvent) {
|
|
|
61
57
|
:class="{
|
|
62
58
|
'cursor-default': !isClickable,
|
|
63
59
|
'cursor-pointer': isClickable,
|
|
64
|
-
'pointer-events-none': disabled,
|
|
65
60
|
'opacity-50': disabled,
|
|
66
61
|
'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-1.5 pr-2.5': hasBackground && size === 'base' && orientation === 'horizontal',
|
|
67
62
|
'border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900 shadow-sm p-2.5 pr-4': hasBackground && size === 'lg' && orientation === 'horizontal',
|
|
@@ -137,7 +132,7 @@ function onClick(event: MouseEvent) {
|
|
|
137
132
|
|
|
138
133
|
<img
|
|
139
134
|
v-else-if="image"
|
|
140
|
-
class="object-cover shadow-sm transition-[filter] duration-300 drag-none flex-initial"
|
|
135
|
+
class="select-none object-cover shadow-sm transition-[filter] duration-300 drag-none flex-initial"
|
|
141
136
|
:class="{
|
|
142
137
|
'rounded-lg': orientation === 'horizontal',
|
|
143
138
|
'rounded-full': orientation === 'vertical',
|
|
@@ -6,8 +6,8 @@ const props = withDefaults(defineProps<BaseDivider>(), {
|
|
|
6
6
|
hideNext: false,
|
|
7
7
|
hidePrevious: false,
|
|
8
8
|
loading: false,
|
|
9
|
-
margin: 6,
|
|
10
9
|
navigable: false,
|
|
10
|
+
pill: false,
|
|
11
11
|
size: 'base',
|
|
12
12
|
title: '',
|
|
13
13
|
})
|
|
@@ -28,18 +28,10 @@ function onNavigate(event: MouseEvent, direction: BaseDividerNavigateDirection)
|
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
30
|
<div
|
|
31
|
+
class="my-6"
|
|
31
32
|
:class="{
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'my-5': margin === 5,
|
|
35
|
-
'my-6': margin === 6,
|
|
36
|
-
'my-7': margin === 7,
|
|
37
|
-
'my-8': margin === 8,
|
|
38
|
-
'my-10': margin === 10,
|
|
39
|
-
'my-12': margin === 12,
|
|
40
|
-
'my-16': margin === 16,
|
|
41
|
-
'my-20': margin === 20,
|
|
42
|
-
'mx-auto max-w-xs': size === 'sm',
|
|
33
|
+
'mx-auto max-w-xs': size === 'sm' && !pill,
|
|
34
|
+
'mx-auto w-full max-w-sm': pill,
|
|
43
35
|
}"
|
|
44
36
|
>
|
|
45
37
|
<div
|
|
@@ -53,7 +45,11 @@ function onNavigate(event: MouseEvent, direction: BaseDividerNavigateDirection)
|
|
|
53
45
|
|
|
54
46
|
<div
|
|
55
47
|
v-else
|
|
56
|
-
class="grid
|
|
48
|
+
class="grid items-center"
|
|
49
|
+
:class="{
|
|
50
|
+
'grid-cols-[minmax(1.5rem,1fr)_auto_minmax(1.5rem,1fr)]': pill,
|
|
51
|
+
'grid-cols-[1fr_auto_1fr]': !pill,
|
|
52
|
+
}"
|
|
57
53
|
>
|
|
58
54
|
<div class="flex items-center">
|
|
59
55
|
<BaseIcon
|
|
@@ -67,17 +63,24 @@ function onNavigate(event: MouseEvent, direction: BaseDividerNavigateDirection)
|
|
|
67
63
|
/>
|
|
68
64
|
|
|
69
65
|
<div
|
|
70
|
-
class="flex-1 border-t
|
|
66
|
+
class="flex-1 border-t"
|
|
71
67
|
:class="{
|
|
72
68
|
'border-dashed': borderStyle === 'dashed',
|
|
73
69
|
'border-dotted': borderStyle === 'dotted',
|
|
70
|
+
'border-gray-900 dark:border-gray-300': pill,
|
|
71
|
+
'border-gray-300 dark:border-gray-700': !pill,
|
|
74
72
|
}"
|
|
75
73
|
style="height: 1px"
|
|
76
74
|
/>
|
|
77
75
|
</div>
|
|
78
76
|
|
|
77
|
+
<span
|
|
78
|
+
v-if="pill && title && !loading"
|
|
79
|
+
class="mx-3 rounded-full bg-gray-900 px-3 py-1 text-xs text-white font-medium tracking-wide uppercase dark:bg-gray-100 dark:text-gray-900"
|
|
80
|
+
>{{ title }}</span>
|
|
81
|
+
|
|
79
82
|
<BaseText
|
|
80
|
-
v-if="loading || title"
|
|
83
|
+
v-else-if="loading || title"
|
|
81
84
|
class="px-4 text-center"
|
|
82
85
|
:size="navigable ? 'xs' : 'sm'"
|
|
83
86
|
:text="loading ? t('loading') : title"
|
|
@@ -85,10 +88,12 @@ function onNavigate(event: MouseEvent, direction: BaseDividerNavigateDirection)
|
|
|
85
88
|
|
|
86
89
|
<div class="flex items-center">
|
|
87
90
|
<div
|
|
88
|
-
class="flex-1 border-t
|
|
91
|
+
class="flex-1 border-t"
|
|
89
92
|
:class="{
|
|
90
93
|
'border-dashed': borderStyle === 'dashed',
|
|
91
94
|
'border-dotted': borderStyle === 'dotted',
|
|
95
|
+
'border-gray-900 dark:border-gray-300': pill,
|
|
96
|
+
'border-gray-300 dark:border-gray-700': !pill,
|
|
92
97
|
}"
|
|
93
98
|
style="height: 1px"
|
|
94
99
|
/>
|
|
@@ -5,6 +5,7 @@ withDefaults(defineProps<LayoutBottomSheet>(), { title: undefined })
|
|
|
5
5
|
|
|
6
6
|
defineSlots<{
|
|
7
7
|
default?: () => VNode[]
|
|
8
|
+
hero?: () => VNode[]
|
|
8
9
|
}>()
|
|
9
10
|
|
|
10
11
|
const closeThresholdRatio = 0.25
|
|
@@ -214,7 +215,7 @@ watch(visible, (isVisible) => {
|
|
|
214
215
|
ref="panelRef"
|
|
215
216
|
:aria-label="title"
|
|
216
217
|
aria-modal="true"
|
|
217
|
-
class="layout-bottom-sheet fixed bottom-0 left-0 right-0 z-[60] mx-auto max-h-[85dvh] max-w-screen-md flex flex-col rounded-t-2xl bg-white text-gray-900 shadow-lg safe-bottom dark:bg-gray-900 dark:text-gray-100"
|
|
218
|
+
class="layout-bottom-sheet fixed bottom-0 left-0 right-0 z-[60] mx-auto max-h-[85dvh] max-w-screen-md flex flex-col rounded-t-2xl bg-white text-gray-900 shadow-lg outline-none safe-bottom dark:bg-gray-900 dark:text-gray-100"
|
|
218
219
|
:class="{
|
|
219
220
|
'transition-none motion-reduce:transition-none': drag.isDragging,
|
|
220
221
|
'transition-transform duration-200 ease motion-reduce:transition-none motion-reduce:duration-0': !drag.isDragging && (drag.closing || drag.offset > 0),
|
|
@@ -236,9 +237,11 @@ watch(visible, (isVisible) => {
|
|
|
236
237
|
<div class="h-1.5 w-10 rounded-full bg-gray-300 dark:bg-gray-700" />
|
|
237
238
|
</div>
|
|
238
239
|
|
|
240
|
+
<slot name="hero" />
|
|
241
|
+
|
|
239
242
|
<div
|
|
240
243
|
ref="contentRef"
|
|
241
|
-
class="min-h-0 flex-1 overflow-y-auto px-5 pb-
|
|
244
|
+
class="min-h-0 flex-1 overflow-y-auto px-5 pb-8"
|
|
242
245
|
@pointercancel="onPointerUp"
|
|
243
246
|
@pointerdown="onContentPointerDown"
|
|
244
247
|
@pointermove="onPointerMove"
|
|
@@ -52,7 +52,7 @@ function onClose() {
|
|
|
52
52
|
ref="panelRef"
|
|
53
53
|
:aria-label="title"
|
|
54
54
|
aria-modal="true"
|
|
55
|
-
class="pointer-events-auto max-h-[85dvh] max-w-md w-full overflow-y-auto rounded-2xl bg-white p-5 text-gray-900 shadow-lg dark:bg-gray-900 dark:text-gray-100"
|
|
55
|
+
class="pointer-events-auto max-h-[85dvh] max-w-md w-full overflow-y-auto rounded-2xl bg-white p-5 text-gray-900 shadow-lg outline-none dark:bg-gray-900 dark:text-gray-100"
|
|
56
56
|
role="dialog"
|
|
57
57
|
tabindex="-1"
|
|
58
58
|
>
|
package/app/types/bases.d.ts
CHANGED
package/package.json
CHANGED
package/uno.config.ts
CHANGED
|
@@ -12,7 +12,9 @@ export const rules: [string, Record<string, string>][] = [
|
|
|
12
12
|
'-ms-user-drag': 'none',
|
|
13
13
|
'-webkit-tap-highlight-color': 'transparent',
|
|
14
14
|
'-webkit-user-drag': 'none',
|
|
15
|
+
'-webkit-user-select': 'none',
|
|
15
16
|
'user-drag': 'none',
|
|
17
|
+
'user-select': 'none',
|
|
16
18
|
},
|
|
17
19
|
],
|
|
18
20
|
['flex-initial', { flex: '0 0 auto' }],
|