@joewinke/jatui 0.8.1 → 0.8.2
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.
|
@@ -335,6 +335,10 @@
|
|
|
335
335
|
{#if 'divider' in item}
|
|
336
336
|
<div class="border-t border-base-300 my-1"></div>
|
|
337
337
|
{:else}
|
|
338
|
+
<!-- Hover derives from base-content (guaranteed contrast against
|
|
339
|
+
the bg-base-200 panel in EVERY theme — base-300 is not: on
|
|
340
|
+
several derived themes it is nearly equal to base-200, so the
|
|
341
|
+
hover read as no-hover). Danger keeps its error tint. -->
|
|
338
342
|
<button
|
|
339
343
|
type="button"
|
|
340
344
|
role="menuitem"
|
|
@@ -342,7 +346,9 @@
|
|
|
342
346
|
aria-expanded={item.submenu?.length ? submenuIndex === i : undefined}
|
|
343
347
|
aria-label={item.content ? item.label : undefined}
|
|
344
348
|
class="w-full flex items-center gap-2 text-left px-3 py-1.5 text-sm transition-colors
|
|
345
|
-
{item.variant === 'danger'
|
|
349
|
+
{item.variant === 'danger'
|
|
350
|
+
? 'text-error hover:bg-error/10'
|
|
351
|
+
: 'hover:bg-base-content/10 focus-visible:bg-base-content/10'}
|
|
346
352
|
{item.disabled ? 'opacity-50 cursor-not-allowed' : ''}"
|
|
347
353
|
disabled={item.disabled}
|
|
348
354
|
onclick={(e) => handleItemClick(item, i, e)}
|