mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-20 15:01:46 +01:00
fix(module): stop using tailwind's shorthand arbitrary variable syntax (#2366)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
@@ -2,10 +2,10 @@ import type { ModuleOptions } from '../module'
|
||||
|
||||
export default (options: Required<ModuleOptions>) => ({
|
||||
slots: {
|
||||
content: 'min-w-32 bg-[--ui-bg] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[--ui-border] divide-y divide-[--ui-border] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]',
|
||||
content: 'min-w-32 bg-[var(--ui-bg)] shadow-lg rounded-[calc(var(--ui-radius)*1.5)] ring ring-[var(--ui-border)] divide-y divide-[var(--ui-border)] overflow-y-auto scroll-py-1 data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in]',
|
||||
group: 'p-1 isolate',
|
||||
label: 'w-full flex items-center font-semibold text-[--ui-text-highlighted]',
|
||||
separator: '-mx-1 my-1 h-px bg-[--ui-border]',
|
||||
label: 'w-full flex items-center font-semibold text-[var(--ui-text-highlighted)]',
|
||||
separator: '-mx-1 my-1 h-px bg-[var(--ui-border)]',
|
||||
item: 'group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-[calc(var(--ui-radius)*1.5)] data-disabled:cursor-not-allowed data-disabled:opacity-75',
|
||||
itemLeadingIcon: 'shrink-0',
|
||||
itemLeadingAvatar: 'shrink-0',
|
||||
@@ -15,17 +15,17 @@ export default (options: Required<ModuleOptions>) => ({
|
||||
itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0',
|
||||
itemTrailingKbdsSize: '',
|
||||
itemLabel: 'truncate',
|
||||
itemLabelExternalIcon: 'size-3 align-top text-[--ui-text-dimmed]'
|
||||
itemLabelExternalIcon: 'size-3 align-top text-[var(--ui-text-dimmed)]'
|
||||
},
|
||||
variants: {
|
||||
active: {
|
||||
true: {
|
||||
item: 'text-[--ui-text-highlighted] before:bg-[--ui-bg-elevated]',
|
||||
itemLeadingIcon: 'text-[--ui-text]'
|
||||
item: 'text-[var(--ui-text-highlighted)] before:bg-[var(--ui-bg-elevated)]',
|
||||
itemLeadingIcon: 'text-[var(--ui-text)]'
|
||||
},
|
||||
false: {
|
||||
item: ['text-[--ui-text] data-highlighted:text-[--ui-text-highlighted] data-[state=open]:text-[--ui-text-highlighted] data-highlighted:before:bg-[--ui-bg-elevated]/50 data-[state=open]:before:bg-[--ui-bg-elevated]/50', options.theme.transitions && 'transition-colors before:transition-colors'],
|
||||
itemLeadingIcon: ['text-[--ui-text-dimmed] group-data-highlighted:text-[--ui-text] group-data-[state=open]:text-[--ui-text]', options.theme.transitions && 'transition-colors']
|
||||
item: ['text-[var(--ui-text)] data-highlighted:text-[var(--ui-text-highlighted)] data-[state=open]:text-[var(--ui-text-highlighted)] data-highlighted:before:bg-[var(--ui-bg-elevated)]/50 data-[state=open]:before:bg-[var(--ui-bg-elevated)]/50', options.theme.transitions && 'transition-colors before:transition-colors'],
|
||||
itemLeadingIcon: ['text-[var(--ui-text-dimmed)] group-data-highlighted:text-[var(--ui-text)] group-data-[state=open]:text-[var(--ui-text)]', options.theme.transitions && 'transition-colors']
|
||||
}
|
||||
},
|
||||
size: {
|
||||
|
||||
Reference in New Issue
Block a user