@saasmakers/ui 2.0.28 → 2.0.30
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/BaseEmoji.vue +8 -5
- package/app/components/bases/BaseHeading.vue +5 -6
- package/app/components/bases/BaseMessage.vue +2 -2
- package/app/components/bases/BaseParagraph.vue +3 -3
- package/app/composables/useToasts.ts +1 -1
- package/app/types/bases.d.ts +2 -6
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ const props = withDefaults(defineProps<BaseEmoji>(), {
|
|
|
6
6
|
clickable: true,
|
|
7
7
|
emoji: undefined,
|
|
8
8
|
hasBox: false,
|
|
9
|
+
legend: undefined,
|
|
9
10
|
size: 'base',
|
|
10
11
|
})
|
|
11
12
|
|
|
@@ -13,10 +14,6 @@ const emit = defineEmits<{
|
|
|
13
14
|
click: [event: MouseEvent, emoji?: string]
|
|
14
15
|
}>()
|
|
15
16
|
|
|
16
|
-
defineSlots<{
|
|
17
|
-
default?: () => VNode[]
|
|
18
|
-
}>()
|
|
19
|
-
|
|
20
17
|
const { urls } = useAppConfig()
|
|
21
18
|
|
|
22
19
|
function onClick(event: MouseEvent) {
|
|
@@ -34,6 +31,7 @@ function onKeyDown(event: KeyboardEvent) {
|
|
|
34
31
|
<span
|
|
35
32
|
class="flex items-center justify-center transition"
|
|
36
33
|
:class="{
|
|
34
|
+
'relative': legend,
|
|
37
35
|
'border base-border': hasBox,
|
|
38
36
|
'bg-gray-100 dark:bg-gray-900 shadow-inner': hasBox && background === 'gray',
|
|
39
37
|
'bg-white dark:bg-gray-900 shadow-sm': hasBox && background === 'white',
|
|
@@ -79,6 +77,11 @@ function onKeyDown(event: KeyboardEvent) {
|
|
|
79
77
|
:src="`${urls.storage}/images/emojis/${emoji}.svg`"
|
|
80
78
|
>
|
|
81
79
|
|
|
82
|
-
<
|
|
80
|
+
<BaseText
|
|
81
|
+
v-if="legend"
|
|
82
|
+
class="absolute bottom-0 left-0 right-0 select-none rounded-b bg-gray-200 text-center text-gray-900 leading-[0.75rem] opacity-90 -mx-px -mb-px dark:bg-gray-800 dark:text-gray-100"
|
|
83
|
+
size="3xs"
|
|
84
|
+
:text="legend"
|
|
85
|
+
/>
|
|
83
86
|
</span>
|
|
84
87
|
</template>
|
|
@@ -21,12 +21,11 @@ defineSlots<{
|
|
|
21
21
|
'justify-start': alignment === 'left',
|
|
22
22
|
'justify-center text-center': alignment === 'center',
|
|
23
23
|
'justify-end': alignment === 'right',
|
|
24
|
-
'font-bold':
|
|
25
|
-
'font-extrabold': ['base', 'lg'
|
|
26
|
-
'text-lg
|
|
27
|
-
'text-xl
|
|
28
|
-
'text-2xl
|
|
29
|
-
'text-2xl sm:text-4xl': size === 'lg',
|
|
24
|
+
'font-bold': size === 'sm',
|
|
25
|
+
'font-extrabold': ['base', 'lg'].includes(size),
|
|
26
|
+
'text-lg': size === 'sm',
|
|
27
|
+
'text-xl': size === 'base',
|
|
28
|
+
'text-2xl': size === 'lg',
|
|
30
29
|
}"
|
|
31
30
|
>
|
|
32
31
|
<template v-if="text && typeof text === 'string'">
|
|
@@ -30,7 +30,7 @@ defineSlots<{
|
|
|
30
30
|
<BaseHeading
|
|
31
31
|
v-if="title"
|
|
32
32
|
alignment="center"
|
|
33
|
-
size="
|
|
33
|
+
size="sm"
|
|
34
34
|
tag="h1"
|
|
35
35
|
:text="title"
|
|
36
36
|
/>
|
|
@@ -45,7 +45,7 @@ defineSlots<{
|
|
|
45
45
|
|
|
46
46
|
<div
|
|
47
47
|
v-if="$slots.default"
|
|
48
|
-
class="mt-
|
|
48
|
+
class="mt-5 flex flex-col items-center justify-center gap-2 sm:flex-row sm:gap-3"
|
|
49
49
|
>
|
|
50
50
|
<slot />
|
|
51
51
|
</div>
|
|
@@ -19,9 +19,9 @@ defineSlots<{
|
|
|
19
19
|
'text-center': alignment === 'center',
|
|
20
20
|
'text-left': alignment === 'left',
|
|
21
21
|
'text-right': alignment === 'right',
|
|
22
|
-
'text-sm
|
|
23
|
-
'text-base
|
|
24
|
-
'text-lg
|
|
22
|
+
'text-sm': size === 'sm',
|
|
23
|
+
'text-base': size === 'base',
|
|
24
|
+
'text-lg': size === 'lg',
|
|
25
25
|
}"
|
|
26
26
|
>
|
|
27
27
|
<template v-if="text && typeof text === 'string'">
|
package/app/types/bases.d.ts
CHANGED
|
@@ -169,6 +169,7 @@ export interface BaseEmoji {
|
|
|
169
169
|
clickable?: boolean
|
|
170
170
|
emoji?: string
|
|
171
171
|
hasBox?: boolean
|
|
172
|
+
legend?: string
|
|
172
173
|
size?: BaseSize
|
|
173
174
|
}
|
|
174
175
|
|
|
@@ -179,12 +180,7 @@ export interface BaseHeading {
|
|
|
179
180
|
text?: BaseTextText
|
|
180
181
|
}
|
|
181
182
|
|
|
182
|
-
export type BaseHeadingSize
|
|
183
|
-
= | 'base'
|
|
184
|
-
| 'lg'
|
|
185
|
-
| 'sm'
|
|
186
|
-
| 'xl'
|
|
187
|
-
| 'xs'
|
|
183
|
+
export type BaseHeadingSize = 'base' | 'lg' | 'sm'
|
|
188
184
|
|
|
189
185
|
export type BaseHeadingTag
|
|
190
186
|
= | 'h1'
|