feat(module)!: use tailwind-merge for class merging (#509)

This commit is contained in:
Benjamin Canac
2023-08-12 17:17:00 +02:00
parent 6d7973f6e1
commit 8880bdc456
47 changed files with 685 additions and 376 deletions

View File

@@ -1,11 +1,11 @@
<template>
<UTooltip :text="color.value" class="capitalize" :open-delay="500">
<UButton
color="gray"
color="transparent"
square
:ui="{
color: {
gray: {
transparent: {
solid: 'bg-gray-100 dark:bg-gray-800',
ghost: 'hover:bg-gray-50 dark:hover:bg-gray-800/50'
}

View File

@@ -8,7 +8,7 @@
v-model="componentProps[prop.name]"
:name="`prop-${prop.name}`"
tabindex="-1"
:ui="{ wrapper: 'relative flex items-start justify-center' }"
class="justify-center"
/>
<USelectMenu
v-else-if="prop.type === 'string' && prop.options.length"
@@ -16,8 +16,9 @@
:options="prop.options"
:name="`prop-${prop.name}`"
variant="none"
:ui-menu="{ width: 'w-32 !-mt-px', rounded: 'rounded-b-md', wrapper: 'relative inline-flex' }"
class="!py-0"
class="inline-flex"
:ui-menu="{ width: 'w-32 !-mt-px', rounded: 'rounded-t-none' }"
select-class="py-0"
tabindex="-1"
:popper="{ strategy: 'fixed', placement: 'bottom-start' }"
/>
@@ -28,7 +29,7 @@
:name="`prop-${prop.name}`"
variant="none"
autocomplete="off"
class="!py-0"
input-class="py-0"
tabindex="-1"
@update:model-value="val => componentProps[prop.name] = prop.type === 'number' ? Number(val) : val"
/>

View File

@@ -1,6 +1,6 @@
<template>
<UFormGroup v-slot="{ error }" label="Email" :error="!email && 'You must enter an email'" help="This is a nice email!">
<UInput v-model="email" type="email" placeholder="Enter email" :trailing-icon="error && 'i-heroicons-exclamation-triangle-20-solid'" />
<UInput v-model="email" type="email" placeholder="Enter email" :trailing-icon="error ? 'i-heroicons-exclamation-triangle-20-solid' : undefined" />
</UFormGroup>
</template>

View File

@@ -231,7 +231,7 @@ const { data: todos, pending } = await useLazyAsyncData('todos', () => $fetch<{
:total="pageTotal"
:ui="{
wrapper: 'flex items-center gap-1',
rounded: 'rounded-full min-w-[32px] justify-center',
rounded: '!rounded-full min-w-[32px] justify-center',
default: {
activeButton: {
variant: 'outline'

View File

@@ -9,7 +9,7 @@ const items = ref(Array(55))
:total="items.length"
:ui="{
wrapper: 'flex items-center gap-1',
rounded: 'rounded-full min-w-[32px] justify-center'
rounded: '!rounded-full min-w-[32px] justify-center'
}"
:prev-button="null"
:next-button="{

View File

@@ -25,8 +25,8 @@ const links = [{
:links="links"
:ui="{
wrapper: 'border-s border-gray-200 dark:border-gray-800 space-y-2',
base: 'group block border-s -ms-px lg:leading-6',
padding: 'ps-4',
base: 'group block border-s -ms-px lg:leading-6 before:hidden',
padding: 'p-0 ps-4',
rounded: '',
font: '',
ring: '',