chore(ui): Run tailwind upgrade and review changes

Ran the `npx @tailwindcss/upgrade` and accepted the changes that seemed safe.

They're things like:
- `data-[closed]:translate-y-9` -> `data-closed:translate-y-8` ()swaps the square bracket syntax to a `-` modifier)
- `bg-gradient-to-*` -> `bg-linear-to-*`
- `/[*%]` -> `/*` (swap square bracket syntax for inline)
- `theme(*.*)` -> `var(--*-*)` (theme styles are exposed as variables with hyphens for dots now)
- `[background-size:*]` -> `bg-size[*]` (move the square brackets inside tag)
- `[.active_&]:` -> `in[.active]:` (new syntax for parent query)
- `!class` -> `class!` (e.g. _!overflow-visible_ to _overflow-visible!_, for [important flag](https://tailwindcss.com/docs/styling-with-utility-classes#using-the-important-flag style)
- `w-[1px]` -> `w-px` (that's a new syntax for a 1px width)
- `h-[1px]` -> `h-px` (that's a new syntax for a 1px height)
- moved `html` and `html, body` global settings in the _index.css_

Also killed off an unused `import` and blank css class.
Also picked up the two `flex-grow` -> `grow` that I missed last pass, oops.
This commit is contained in:
Marc Brooks 2025-05-15 13:16:11 -05:00
parent 73d41bd207
commit d82d424985
No known key found for this signature in database
GPG Key ID: 583A6AF2D6AE1DC6
23 changed files with 92 additions and 95 deletions

6
ui/package-lock.json generated
View File

@ -3232,9 +3232,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.154", "version": "1.5.155",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.154.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz",
"integrity": "sha512-G4VCFAyKbp1QJ+sWdXYIRYsPGvlV5sDACfCmoMFog3rjm1syLhI41WXm/swZypwCIWIm4IFLWzHY14joWMQ5Fw==", "integrity": "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },

View File

@ -89,8 +89,8 @@ export default function Actionbar({
anchor="bottom start" anchor="bottom start"
transition transition
className={cx( className={cx(
"z-10 flex w-[420px] origin-top flex-col !overflow-visible", "z-10 flex w-[420px] origin-top flex-col overflow-visible!",
"flex origin-top flex-col transition duration-300 ease-out data-[closed]:translate-y-8 data-[closed]:opacity-0", "flex origin-top flex-col transition duration-300 ease-out data-closed:translate-y-8 data-closed:opacity-0",
)} )}
> >
{({ open }) => { {({ open }) => {
@ -131,8 +131,8 @@ export default function Actionbar({
anchor="bottom start" anchor="bottom start"
transition transition
className={cx( className={cx(
"z-10 flex w-[420px] origin-top flex-col !overflow-visible", "z-10 flex w-[420px] origin-top flex-col overflow-visible!",
"flex origin-top flex-col transition duration-300 ease-out data-[closed]:translate-y-8 data-[closed]:opacity-0", "flex origin-top flex-col transition duration-300 ease-out data-closed:translate-y-8 data-closed:opacity-0",
)} )}
> >
{({ open }) => { {({ open }) => {
@ -183,8 +183,8 @@ export default function Actionbar({
transitionProperty: "opacity", transitionProperty: "opacity",
}} }}
className={cx( className={cx(
"z-10 flex w-[420px] origin-top flex-col !overflow-visible", "z-10 flex w-[420px] origin-top flex-col overflow-visible!",
"flex origin-top flex-col transition duration-300 ease-out data-[closed]:translate-y-8 data-[closed]:opacity-0", "flex origin-top flex-col transition duration-300 ease-out data-closed:translate-y-8 data-closed:opacity-0",
)} )}
> >
{({ open }) => { {({ open }) => {
@ -226,8 +226,8 @@ export default function Actionbar({
anchor="bottom start" anchor="bottom start"
transition transition
className={cx( className={cx(
"z-10 flex w-[420px] flex-col !overflow-visible", "z-10 flex w-[420px] flex-col overflow-visible!",
"flex origin-top flex-col transition duration-300 ease-out data-[closed]:translate-y-8 data-[closed]:opacity-0", "flex origin-top flex-col transition duration-300 ease-out data-closed:translate-y-8 data-closed:opacity-0",
)} )}
> >
{({ open }) => { {({ open }) => {
@ -274,7 +274,7 @@ export default function Actionbar({
</div> </div>
<div className="hidden items-center gap-x-2 lg:flex"> <div className="hidden items-center gap-x-2 lg:flex">
<div className="h-4 w-[1px] bg-slate-300 dark:bg-slate-600" /> <div className="h-4 w-px bg-slate-300 dark:bg-slate-600" />
<Button <Button
size="XS" size="XS"
theme="light" theme="light"

View File

@ -126,9 +126,9 @@ function ButtonContent(props: ButtonContentPropsType) {
<div <div
className={cx( className={cx(
"flex w-full min-w-0 items-center gap-x-1.5 text-center", "flex w-full min-w-0 items-center gap-x-1.5 text-center",
textAlign === "left" ? "!text-left" : "", textAlign === "left" ? "text-left!" : "",
textAlign === "center" ? "!text-center" : "", textAlign === "center" ? "text-center!" : "",
textAlign === "right" ? "!text-right" : "", textAlign === "right" ? "text-right!" : "",
)} )}
> >
{loading ? ( {loading ? (
@ -216,7 +216,7 @@ type LinkPropsType = Pick<LinkProps, "to"> &
export const LinkButton = ({ to, ...props }: LinkPropsType) => { export const LinkButton = ({ to, ...props }: LinkPropsType) => {
const classes = cx( const classes = cx(
"group outline-hidden", "group outline-hidden",
props.disabled ? "pointer-events-none !opacity-70" : "", props.disabled ? "pointer-events-none opacity-70!" : "",
props.fullWidth ? "w-full" : "", props.fullWidth ? "w-full" : "",
props.loading ? "pointer-events-none" : "", props.loading ? "pointer-events-none" : "",
props.className, props.className,
@ -242,7 +242,7 @@ type LabelPropsType = Pick<HTMLLabelElement, "htmlFor"> &
export const LabelButton = ({ htmlFor, ...props }: LabelPropsType) => { export const LabelButton = ({ htmlFor, ...props }: LabelPropsType) => {
const classes = cx( const classes = cx(
"group outline-hidden block cursor-pointer", "group outline-hidden block cursor-pointer",
props.disabled ? "pointer-events-none !opacity-70" : "", props.disabled ? "pointer-events-none opacity-70!" : "",
props.fullWidth ? "w-full" : "", props.fullWidth ? "w-full" : "",
props.loading ? "pointer-events-none" : "", props.loading ? "pointer-events-none" : "",
props.className, props.className,

View File

@ -17,8 +17,8 @@ export const GridCard = ({
return ( return (
<Card className={cx("overflow-hidden", cardClassName)}> <Card className={cx("overflow-hidden", cardClassName)}>
<div className="relative h-full"> <div className="relative h-full">
<div className="absolute inset-0 z-0 h-full w-full bg-gradient-to-tr from-blue-50/30 to-blue-50/20 transition-colors duration-300 ease-in-out dark:from-slate-800/30 dark:to-slate-800/20" /> <div className="absolute inset-0 z-0 h-full w-full bg-linear-to-tr from-blue-50/30 to-blue-50/20 transition-colors duration-300 ease-in-out dark:from-slate-800/30 dark:to-slate-800/20" />
<div className="absolute inset-0 z-0 h-full w-full rotate-0 bg-grid-blue-100/[25%] dark:bg-grid-slate-700/[7%]" /> <div className="absolute inset-0 z-0 h-full w-full rotate-0 bg-grid-blue-100/25 dark:bg-grid-slate-700/7" />
<div className="isolate h-full">{children}</div> <div className="isolate h-full">{children}</div>
</div> </div>
</Card> </Card>

View File

@ -58,7 +58,7 @@ export function Combobox({
<HeadlessCombobox onChange={onChange} {...otherProps}> <HeadlessCombobox onChange={onChange} {...otherProps}>
{() => ( {() => (
<> <>
<Card className="w-auto !border border-solid !border-slate-800/30 shadow-xs outline-0 dark:!border-slate-300/30"> <Card className="w-auto border! border-solid border-slate-800/30! shadow-xs outline-0 dark:border-slate-300/30!">
<ComboboxInput <ComboboxInput
ref={inputRef} ref={inputRef}
className={clsx( className={clsx(
@ -88,7 +88,7 @@ export function Combobox({
</Card> </Card>
{options().length > 0 && ( {options().length > 0 && (
<ComboboxOptions className="hide-scrollbar absolute left-0 z-[100] mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 dark:bg-slate-800 dark:ring-slate-700"> <ComboboxOptions className="hide-scrollbar absolute left-0 z-100 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black/5 dark:bg-slate-800 dark:ring-slate-700">
{options().map(option => ( {options().map(option => (
<ComboboxOption <ComboboxOption
key={option.value} key={option.value}
@ -111,7 +111,7 @@ export function Combobox({
)} )}
{options().length === 0 && inputRef.current?.value && ( {options().length === 0 && inputRef.current?.value && (
<div className="absolute left-0 z-[100] mt-1 w-full rounded-md bg-white px-4 py-2 text-sm shadow-lg ring-1 ring-black/5 dark:bg-slate-800 dark:ring-slate-700"> <div className="absolute left-0 z-100 mt-1 w-full rounded-md bg-white px-4 py-2 text-sm shadow-lg ring-1 ring-black/5 dark:bg-slate-800 dark:ring-slate-700">
<div className="text-slate-500 dark:text-slate-400">{emptyMessage}</div> <div className="text-slate-500 dark:text-slate-400">{emptyMessage}</div>
</div> </div>
)} )}

View File

@ -100,7 +100,7 @@ export default function DashboardNavbar({
)} )}
{isLoggedIn ? ( {isLoggedIn ? (
<> <>
<hr className="h-[20px] w-[1px] self-center border-none bg-slate-800/20 dark:bg-slate-300/20" /> <hr className="h-[20px] w-px self-center border-none bg-slate-800/20 dark:bg-slate-300/20" />
<div className="relative inline-block text-left"> <div className="relative inline-block text-left">
<Menu> <Menu>
<MenuButton className="h-full"> <MenuButton className="h-full">

View File

@ -78,7 +78,7 @@ export default function KvmCard({
)} )}
</div> </div>
</div> </div>
<div className="h-[1px] bg-slate-800/20 dark:bg-slate-300/20" /> <div className="h-px bg-slate-800/20 dark:bg-slate-300/20" />
<div className="flex justify-between"> <div className="flex justify-between">
<div> <div>
{online ? ( {online ? (
@ -111,7 +111,7 @@ export default function KvmCard({
<MenuItems <MenuItems
transition transition
className="data-[closed]:scale-95 data-[closed]:transform data-[closed]:opacity-0 data-[enter]:duration-100 data-[leave]:duration-75 data-[enter]:ease-out data-[leave]:ease-in" className="data-closed:scale-95 data-closed:transform data-closed:opacity-0 data-enter:duration-100 data-leave:duration-75 data-enter:ease-out data-leave:ease-in"
> >
<Card className="absolute right-0 z-10 w-56 px-1 mt-2 transition origin-top-right ring-1 ring-black/50 focus:outline-hidden"> <Card className="absolute right-0 z-10 w-56 px-1 mt-2 transition origin-top-right ring-1 ring-black/50 focus:outline-hidden">
<div className="divide-y divide-slate-800/20 dark:divide-slate-300/20"> <div className="divide-y divide-slate-800/20 dark:divide-slate-300/20">

View File

@ -18,7 +18,7 @@ const Modal = React.memo(function Modal({
<Dialog open={open} onClose={onClose} className="relative z-20"> <Dialog open={open} onClose={onClose} className="relative z-20">
<DialogBackdrop <DialogBackdrop
transition transition
className="fixed inset-0 bg-gray-500/75 transition-opacity data-[closed]:opacity-0 data-[enter]:duration-500 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in dark:bg-slate-900/90" className="fixed inset-0 bg-gray-500/75 transition-opacity data-closed:opacity-0 data-enter:duration-500 data-leave:duration-200 data-enter:ease-out data-leave:ease-in dark:bg-slate-900/90"
/> />
<div className="fixed inset-0 z-20 w-screen overflow-y-auto"> <div className="fixed inset-0 z-20 w-screen overflow-y-auto">
{/* TODO: This doesn't work well with other-sessions */} {/* TODO: This doesn't work well with other-sessions */}
@ -26,8 +26,8 @@ const Modal = React.memo(function Modal({
<DialogPanel <DialogPanel
transition transition
className={cx( className={cx(
"pointer-events-none relative w-full md:my-8 md:!mt-[10vh]", "pointer-events-none relative w-full md:my-8 md:mt-[10vh]!",
"transform transition-all data-[closed]:translate-y-8 data-[closed]:opacity-0 data-[enter]:duration-500 data-[leave]:duration-200 data-[enter]:ease-out data-[leave]:ease-in", "transform transition-all data-closed:translate-y-8 data-closed:opacity-0 data-enter:duration-500 data-leave:duration-200 data-enter:ease-out data-leave:ease-in",
className, className,
)} )}
> >

View File

@ -63,7 +63,7 @@ export const SelectMenuBasic = React.forwardRef<HTMLSelectElement, SelectMenuPro
)} )}
> >
{label && <FieldLabel label={label} id={id} as="span" />} {label && <FieldLabel label={label} id={id} as="span" />}
<Card className="w-auto !border border-solid !border-slate-800/30 shadow-xs outline-0 dark:!border-slate-300/30"> <Card className="w-auto border! border-solid border-slate-800/30! shadow-xs outline-0 dark:border-slate-300/30!">
<select <select
ref={ref} ref={ref}
name={name} name={name}

View File

@ -23,7 +23,7 @@ const variants = cva({
export default function StepCounter({ nSteps, currStepIdx, size = "MD" }: Props) { export default function StepCounter({ nSteps, currStepIdx, size = "MD" }: Props) {
const textStyle = variants({ size }); const textStyle = variants({ size });
return ( return (
<Card className="!inline-flex w-auto select-none items-center justify-center gap-x-2 rounded-lg p-1"> <Card className="inline-flex! w-auto select-none items-center justify-center gap-x-2 rounded-lg p-1">
{[...Array(nSteps).keys()].map(i => { {[...Array(nSteps).keys()].map(i => {
if (i < currStepIdx) { if (i < currStepIdx) {
return ( return (
@ -57,7 +57,7 @@ export default function StepCounter({ nSteps, currStepIdx, size = "MD" }: Props)
return ( return (
<Card <Card
className={cx( className={cx(
"flex items-center justify-center !rounded-full text-slate-600 dark:text-slate-400", "flex items-center justify-center rounded-full! text-slate-600 dark:text-slate-400",
textStyle, textStyle,
size === "SM" ? "h-5 w-5" : "h-6 w-6", size === "SM" ? "h-5 w-5" : "h-6 w-6",
)} )}

View File

@ -171,12 +171,12 @@ function Terminal({
[ [
// Base styles // Base styles
"fixed bottom-0 w-full transform transition duration-500 ease-in-out", "fixed bottom-0 w-full transform transition duration-500 ease-in-out",
"translate-y-[0px]", "-translate-y-[0px]",
], ],
{ {
"pointer-events-none translate-y-[500px] opacity-100 transition duration-300": "pointer-events-none translate-y-[500px] opacity-100 transition duration-300":
!enableTerminal, !enableTerminal,
"pointer-events-auto translate-y-[0px] opacity-100 transition duration-300": "pointer-events-auto -translate-y-[0px] opacity-100 transition duration-300":
enableTerminal, enableTerminal,
}, },
)} )}

View File

@ -11,7 +11,7 @@ export default function UpdateInProgressStatusCard() {
return ( return (
<div className="w-full select-none opacity-100 transition-all duration-300 ease-in-out"> <div className="w-full select-none opacity-100 transition-all duration-300 ease-in-out">
<GridCard cardClassName="!shadow-xl"> <GridCard cardClassName="shadow-xl!">
<div className="flex items-center justify-between gap-x-3 px-2.5 py-2.5 text-black dark:text-white"> <div className="flex items-center justify-between gap-x-3 px-2.5 py-2.5 text-black dark:text-white">
<div className="flex items-center gap-x-3"> <div className="flex items-center gap-x-3">
<LoadingSpinner className={cx("h-5 w-5", "shrink-0 text-blue-700")} /> <LoadingSpinner className={cx("h-5 w-5", "shrink-0 text-blue-700")} />

View File

@ -150,7 +150,7 @@ export function UsbDeviceSetting() {
return ( return (
<Fieldset disabled={loading} className="space-y-4"> <Fieldset disabled={loading} className="space-y-4">
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20" /> <div className="h-px w-full bg-slate-800/10 dark:bg-slate-300/20" />
<SettingsSectionHeader <SettingsSectionHeader
title="USB Device" title="USB Device"

View File

@ -14,7 +14,7 @@ interface OverlayContentProps {
} }
function OverlayContent({ children }: OverlayContentProps) { function OverlayContent({ children }: OverlayContentProps) {
return ( return (
<GridCard cardClassName="h-full pointer-events-auto !outline-hidden"> <GridCard cardClassName="h-full pointer-events-auto outline-hidden!">
<div className="flex h-full w-full flex-col items-center justify-center rounded-md border border-slate-800/30 dark:border-slate-300/20"> <div className="flex h-full w-full flex-col items-center justify-center rounded-md border border-slate-800/30 dark:border-slate-300/20">
{children} {children}
</div> </div>
@ -376,7 +376,7 @@ export function PointerLockBar({ show }: PointerLockBarProps) {
transition={{ duration: 0.5, ease: "easeInOut", delay: 0.5 }} transition={{ duration: 0.5, ease: "easeInOut", delay: 0.5 }}
> >
<div> <div>
<Card className="rounded-b-none shadow-none !outline-0"> <Card className="rounded-b-none shadow-none outline-0!">
<div className="flex items-center justify-between border border-slate-800/50 px-4 py-2 outline-0 backdrop-blur-xs dark:border-slate-300/20 dark:bg-slate-800"> <div className="flex items-center justify-between border border-slate-800/50 px-4 py-2 outline-0 backdrop-blur-xs dark:border-slate-300/20 dark:bg-slate-800">
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<BsMouseFill className="h-4 w-4 text-blue-700 dark:text-blue-500" /> <BsMouseFill className="h-4 w-4 text-blue-700 dark:text-blue-500" />

View File

@ -691,15 +691,15 @@ export default function WebRTCVideo() {
<div <div
className={cx( className={cx(
"absolute inset-0 -z-0 bg-blue-50/40 opacity-80 dark:bg-slate-800/40", "absolute inset-0 -z-0 bg-blue-50/40 opacity-80 dark:bg-slate-800/40",
"[background-image:radial-gradient(theme(colors.blue.300)_0.5px,transparent_0.5px),radial-gradient(theme(colors.blue.300)_0.5px,transparent_0.5px)] dark:[background-image:radial-gradient(theme(colors.slate.700)_0.5px,transparent_0.5px),radial-gradient(theme(colors.slate.700)_0.5px,transparent_0.5px)]", "bg-[radial-gradient(var(--color-blue-300)_0.5px,transparent_0.5px),radial-gradient(var(--color-blue-300)_0.5px,transparent_0.5px)] dark:bg-[radial-gradient(var(--color-slate-700)_0.5px,transparent_0.5px),radial-gradient(var(--color-slate-700)_0.5px,transparent_0.5px)]",
"[background-position:0_0,10px_10px]", "bg-position-[0_0,10px_10px]",
"[background-size:20px_20px]", "bg-size-[20px_20px]",
)} )}
/> />
<div className="flex h-full flex-col"> <div className="flex h-full flex-col">
<div className="relative flex-grow overflow-hidden"> <div className="relative grow overflow-hidden">
<div className="flex h-full flex-col"> <div className="flex h-full flex-col">
<div className="grid flex-grow grid-rows-(--grid-bodyFooter) overflow-hidden"> <div className="grid grow grid-rows-(--grid-bodyFooter) overflow-hidden">
<div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden"> <div className="relative mx-4 my-2 flex items-center justify-center overflow-hidden">
<div className="relative flex h-full w-full items-center justify-center"> <div className="relative flex h-full w-full items-center justify-center">
<div className="relative inline-block"> <div className="relative inline-block">
@ -723,7 +723,7 @@ export default function WebRTCVideo() {
isVideoLoading || isVideoLoading ||
hdmiError || hdmiError ||
peerConnectionState !== "connected", peerConnectionState !== "connected",
"!opacity-60": showPointerLockBar, "opacity-60!": showPointerLockBar,
"animate-slideUpFade border border-slate-800/30 shadow-xs dark:border-slate-300/20": "animate-slideUpFade border border-slate-800/30 shadow-xs dark:border-slate-300/20":
isPlaying, isPlaying,
}, },

View File

@ -1,5 +1,7 @@
@import "tailwindcss"; @import 'tailwindcss';
@config "../tailwind.config.js"; @config "../tailwind.config.js";
@plugin "@tailwindcss/typography"; @plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms"; @plugin "@tailwindcss/forms";
@plugin "@headlessui/tailwindcss"; @plugin "@headlessui/tailwindcss";
@ -7,22 +9,11 @@
/* Dark mode uses CSS selector instead of prefers-color-scheme */ /* Dark mode uses CSS selector instead of prefers-color-scheme */
@custom-variant dark (&:where(.dark, .dark *)); @custom-variant dark (&:where(.dark, .dark *));
html {
@apply scroll-smooth;
}
html,
body {
height: 100%;
width: 100%;
overflow: auto;
}
@theme { @theme {
--font-sans: "Circular", sans-serif; --font-sans: 'Circular', sans-serif;
--font-display: "Circular", sans-serif; --font-display: 'Circular', sans-serif;
--font-serif: "Circular", serif; --font-serif: 'Circular', serif;
--font-mono: "Source Code Pro Variable", monospace; --font-mono: 'Source Code Pro Variable', monospace;
--grid-layout: auto 1fr auto; --grid-layout: auto 1fr auto;
--grid-headerBody: auto 1fr; --grid-headerBody: auto 1fr;
@ -140,15 +131,26 @@ body {
animation-delay: --value(integer) ms; animation-delay: --value(integer) ms;
} }
html {
@apply scroll-smooth;
}
html,
body {
height: 100%;
width: 100%;
overflow: auto;
}
@property --grid-color-start { @property --grid-color-start {
syntax: "<color>"; syntax: "<color>";
initial-value: theme("colors.blue.50/10"); initial-value: var(--color-blue-50/10);
inherits: false; inherits: false;
} }
@property --grid-color-end { @property --grid-color-end {
syntax: "<color>"; syntax: "<color>";
initial-value: theme("colors.blue.50/100"); initial-value: var(--color-blue-50/100);
inherits: false; inherits: false;
} }
@ -164,8 +166,8 @@ body {
} }
.group:hover .grid-card { .group:hover .grid-card {
--grid-color-start: theme("colors.blue.100/50"); --grid-color-start: var(--color-blue-100/50);
--grid-color-end: theme("colors.blue.50/50"); --grid-color-end: var(--color-blue-50/50);
} }
video::-webkit-media-controls { video::-webkit-media-controls {
@ -173,11 +175,11 @@ video::-webkit-media-controls {
} }
.hg-theme-default { .hg-theme-default {
@apply !font-display font-normal; @apply font-display! font-normal;
} }
.hg-theme-default .hg-button { .hg-theme-default .hg-button {
@apply border !border-b border-slate-800/25 !border-b-slate-800/25 !shadow-xs; @apply border border-b! border-slate-800/25 border-b-slate-800/25! shadow-xs!;
} }
.hg-theme-default .hg-button span { .hg-theme-default .hg-button span {
@ -249,7 +251,7 @@ video::-webkit-media-controls {
} }
.hg-button { .hg-button {
@apply dark:!bg-slate-800 dark:text-white; @apply dark:bg-slate-800! dark:text-white;
} }
.simple-keyboard-control .hg-button { .simple-keyboard-control .hg-button {
@ -297,25 +299,21 @@ video::-webkit-media-controls {
} }
.hg-button.hg-standardBtn[data-skbtn="Space"] { .hg-button.hg-standardBtn[data-skbtn="Space"] {
@apply md:!w-[350px]; @apply md:w-[350px]!;
} }
.hg-theme-default .hg-row .combination-key { .hg-theme-default .hg-row .combination-key {
@apply inline-flex !h-auto !w-auto grow-0 py-1 text-xs; @apply inline-flex h-auto! w-auto! grow-0 py-1 text-xs;
}
.hg-theme-default .hg-row:has(.combination-key) {
/*margin-bottom: 100px !important;*/
} }
.hg-theme-default .hg-row .hg-button-container, .hg-theme-default .hg-row .hg-button-container,
.hg-theme-default .hg-row .hg-button:not(:last-child) { .hg-theme-default .hg-row .hg-button:not(:last-child) {
@apply !mr-[2px] md:!mr-[5px]; @apply mr-[2px]! md:mr-[5px]!;
} }
/* Hide the scrollbar by setting the scrollbar color to the background color */ /* Hide the scrollbar by setting the scrollbar color to the background color */
.xterm .xterm-viewport { .xterm .xterm-viewport {
scrollbar-color: theme("colors.gray.900") #002b36; scrollbar-color: var(--color-gray-900) #002b36;
scrollbar-width: thin; scrollbar-width: thin;
} }

View File

@ -22,7 +22,7 @@ const ToastContent = ({
<Card <Card
className={`${ className={`${
t.visible ? "animate-enter" : "animate-leave" t.visible ? "animate-enter" : "animate-leave"
} pointer-events-auto z-30 w-full max-w-sm !shadow-xl`} } pointer-events-auto z-30 w-full max-w-sm shadow-xl!`}
> >
<div className="flex items-center gap-x-2 p-2.5 px-2"> <div className="flex items-center gap-x-2 p-2.5 px-2">
{icon} {icon}

View File

@ -185,7 +185,7 @@ export function Dialog({ onClose }: { onClose: () => void }) {
<img <img
src={LogoWhiteIcon} src={LogoWhiteIcon}
alt="JetKVM Logo" alt="JetKVM Logo"
className="hidden h-[24px] dark:!mt-0 dark:block" className="hidden h-[24px] dark:mt-0! dark:block"
/> />
{modalView === "mode" && ( {modalView === "mode" && (
<ModeSelectionView <ModeSelectionView
@ -332,7 +332,7 @@ function ModeSelectionView({
{ {
"ring-2 ring-blue-700": selectedMode === mode, "ring-2 ring-blue-700": selectedMode === mode,
"hover:ring-2 hover:ring-blue-500": selectedMode !== mode && !disabled, "hover:ring-2 hover:ring-blue-500": selectedMode !== mode && !disabled,
"!cursor-not-allowed": disabled, "cursor-not-allowed!": disabled,
}, },
)} )}
> >
@ -1489,7 +1489,7 @@ function PreUploadedImageItem({
<div className="flex items-center gap-x-1 text-slate-600 dark:text-slate-400"> <div className="flex items-center gap-x-1 text-slate-600 dark:text-slate-400">
{formatters.date(new Date(uploadedAt), { month: "short" })} {formatters.date(new Date(uploadedAt), { month: "short" })}
</div> </div>
<div className="mx-1 h-[10px] w-[1px] bg-slate-300 text-slate-300 dark:bg-slate-600"></div> <div className="mx-1 h-[10px] w-px bg-slate-300 text-slate-300 dark:bg-slate-600"></div>
<div className="text-gray-600 dark:text-slate-400">{size}</div> <div className="text-gray-600 dark:text-slate-400">{size}</div>
</div> </div>
</div> </div>

View File

@ -345,7 +345,7 @@ export default function SettingsNetworkRoute() {
/> />
</div> </div>
<div className="h-[1px] w-full bg-slate-800/10 dark:bg-slate-300/20" /> <div className="h-px w-full bg-slate-800/10 dark:bg-slate-300/20" />
<div className="space-y-4"> <div className="space-y-4">
<SettingsItem title="IPv4 Mode" description="Configure the IPv4 mode"> <SettingsItem title="IPv4 Mode" description="Configure the IPv4 mode">

View File

@ -111,7 +111,7 @@ export default function SettingsRoute() {
{/* Gradient overlay for left side - only visible on mobile when scrolled */} {/* Gradient overlay for left side - only visible on mobile when scrolled */}
<div <div
className={cx( className={cx(
"pointer-events-none absolute inset-y-0 left-0 z-10 w-8 bg-gradient-to-r from-white to-transparent transition-opacity duration-300 ease-in-out md:hidden dark:from-slate-900", "pointer-events-none absolute inset-y-0 left-0 z-10 w-8 bg-linear-to-r from-white to-transparent transition-opacity duration-300 ease-in-out md:hidden dark:from-slate-900",
{ {
"opacity-0": !showLeftGradient, "opacity-0": !showLeftGradient,
"opacity-100": showLeftGradient, "opacity-100": showLeftGradient,
@ -121,7 +121,7 @@ export default function SettingsRoute() {
{/* Gradient overlay for right side - only visible on mobile when there's more content */} {/* Gradient overlay for right side - only visible on mobile when there's more content */}
<div <div
className={cx( className={cx(
"pointer-events-none absolute inset-y-0 right-0 z-10 w-8 bg-gradient-to-l from-white to-transparent transition duration-300 ease-in-out md:hidden dark:from-slate-900", "pointer-events-none absolute inset-y-0 right-0 z-10 w-8 bg-linear-to-l from-white to-transparent transition duration-300 ease-in-out md:hidden dark:from-slate-900",
{ {
"opacity-0": !showRightGradient, "opacity-0": !showRightGradient,
"opacity-100": showRightGradient, "opacity-100": showRightGradient,
@ -137,7 +137,7 @@ export default function SettingsRoute() {
to="general" to="general"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuSettings className="h-4 w-4 shrink-0" /> <LuSettings className="h-4 w-4 shrink-0" />
<h1>General</h1> <h1>General</h1>
</div> </div>
@ -148,7 +148,7 @@ export default function SettingsRoute() {
to="mouse" to="mouse"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuKeyboard className="h-4 w-4 shrink-0" /> <LuKeyboard className="h-4 w-4 shrink-0" />
<h1>Mouse</h1> <h1>Mouse</h1>
</div> </div>
@ -159,7 +159,7 @@ export default function SettingsRoute() {
to="video" to="video"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuVideo className="h-4 w-4 shrink-0" /> <LuVideo className="h-4 w-4 shrink-0" />
<h1>Video</h1> <h1>Video</h1>
</div> </div>
@ -170,7 +170,7 @@ export default function SettingsRoute() {
to="hardware" to="hardware"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuCpu className="h-4 w-4 shrink-0" /> <LuCpu className="h-4 w-4 shrink-0" />
<h1>Hardware</h1> <h1>Hardware</h1>
</div> </div>
@ -181,7 +181,7 @@ export default function SettingsRoute() {
to="access" to="access"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuShieldCheck className="h-4 w-4 shrink-0" /> <LuShieldCheck className="h-4 w-4 shrink-0" />
<h1>Access</h1> <h1>Access</h1>
</div> </div>
@ -192,7 +192,7 @@ export default function SettingsRoute() {
to="appearance" to="appearance"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuPalette className="h-4 w-4 shrink-0" /> <LuPalette className="h-4 w-4 shrink-0" />
<h1>Appearance</h1> <h1>Appearance</h1>
</div> </div>
@ -203,7 +203,7 @@ export default function SettingsRoute() {
to="macros" to="macros"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuCommand className="h-4 w-4 shrink-0" /> <LuCommand className="h-4 w-4 shrink-0" />
<h1>Keyboard Macros</h1> <h1>Keyboard Macros</h1>
</div> </div>
@ -214,7 +214,7 @@ export default function SettingsRoute() {
to="network" to="network"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuNetwork className="h-4 w-4 shrink-0" /> <LuNetwork className="h-4 w-4 shrink-0" />
<h1>Network</h1> <h1>Network</h1>
</div> </div>
@ -225,7 +225,7 @@ export default function SettingsRoute() {
to="advanced" to="advanced"
className={({ isActive }) => (isActive ? "active" : "")} className={({ isActive }) => (isActive ? "active" : "")}
> >
<div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 [.active_&]:bg-blue-50 [.active_&]:!text-blue-700 md:[.active_&]:bg-transparent dark:[.active_&]:bg-blue-900 dark:[.active_&]:!text-blue-200 dark:md:[.active_&]:bg-transparent"> <div className="flex items-center gap-x-2 rounded-md px-2.5 py-2.5 text-sm transition-colors hover:bg-slate-100 dark:hover:bg-slate-700 in-[.active]:bg-blue-50 in-[.active]:text-blue-700! md:in-[.active]:bg-transparent dark:in-[.active]:bg-blue-900 dark:in-[.active]:text-blue-200! dark:md:in-[.active]:bg-transparent">
<LuWrench className="h-4 w-4 shrink-0" /> <LuWrench className="h-4 w-4 shrink-0" />
<h1>Advanced</h1> <h1>Advanced</h1>
</div> </div>

View File

@ -90,8 +90,8 @@ export default function WelcomeLocalModeRoute() {
<GridCard <GridCard
key={mode} key={mode}
cardClassName={cx("transition-all duration-100", { cardClassName={cx("transition-all duration-100", {
"!outline-blue-700 !outline-2": selectedMode === mode, "outline-blue-700! outline-2!": selectedMode === mode,
"hover:!outline-blue-700": selectedMode !== mode, "hover:outline-blue-700!": selectedMode !== mode,
})} })}
> >
<div <div

View File

@ -68,7 +68,7 @@ export default function WelcomeRoute() {
</div> </div>
</div> </div>
<div className="!-mt-2 -ml-6 flex items-center justify-center"> <div className="-mt-2! -ml-6 flex items-center justify-center">
<img <img
src={DeviceImage} src={DeviceImage}
alt="JetKVM Device" alt="JetKVM Device"
@ -90,7 +90,7 @@ export default function WelcomeRoute() {
theme="light" theme="light"
text="Set up your JetKVM" text="Set up your JetKVM"
LeadingIcon={({ className }) => ( LeadingIcon={({ className }) => (
<img src={LogoMark} className={cx(className, "mr-1.5 !h-5")} /> <img src={LogoMark} className={cx(className, "mr-1.5 h-5!")} />
)} )}
textAlign="center" textAlign="center"
to="/welcome/mode" to="/welcome/mode"

View File

@ -1,4 +1,3 @@
import defaultTheme from "tailwindcss/defaultTheme";
import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette"; import flattenColorPalette from "tailwindcss/lib/util/flattenColorPalette";
import svgToDataUri from "mini-svg-data-uri"; import svgToDataUri from "mini-svg-data-uri";
import plugin from "tailwindcss/plugin"; import plugin from "tailwindcss/plugin";