From d82d424985332ad1a02d284ee6bd7aaa4a433df4 Mon Sep 17 00:00:00 2001 From: Marc Brooks Date: Thu, 15 May 2025 13:16:11 -0500 Subject: [PATCH] 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. --- ui/package-lock.json | 6 +- ui/src/components/ActionBar.tsx | 18 +++--- ui/src/components/Button.tsx | 10 ++-- ui/src/components/Card.tsx | 4 +- ui/src/components/Combobox.tsx | 6 +- ui/src/components/Header.tsx | 2 +- ui/src/components/KvmCard.tsx | 4 +- ui/src/components/Modal.tsx | 6 +- ui/src/components/SelectMenuBasic.tsx | 2 +- ui/src/components/StepCounter.tsx | 4 +- ui/src/components/Terminal.tsx | 4 +- .../components/UpdateInProgressStatusCard.tsx | 2 +- ui/src/components/UsbDeviceSetting.tsx | 2 +- ui/src/components/VideoOverlay.tsx | 4 +- ui/src/components/WebRTCVideo.tsx | 12 ++-- ui/src/index.css | 60 +++++++++---------- ui/src/notifications.tsx | 2 +- ui/src/routes/devices.$id.mount.tsx | 6 +- .../routes/devices.$id.settings.network.tsx | 2 +- ui/src/routes/devices.$id.settings.tsx | 22 +++---- ui/src/routes/welcome-local.mode.tsx | 4 +- ui/src/routes/welcome-local.tsx | 4 +- ui/tailwind.config.js | 1 - 23 files changed, 92 insertions(+), 95 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index 5ac569b..dbdf5c3 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -3232,9 +3232,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.154", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.154.tgz", - "integrity": "sha512-G4VCFAyKbp1QJ+sWdXYIRYsPGvlV5sDACfCmoMFog3rjm1syLhI41WXm/swZypwCIWIm4IFLWzHY14joWMQ5Fw==", + "version": "1.5.155", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.155.tgz", + "integrity": "sha512-ps5KcGGmwL8VaeJlvlDlu4fORQpv3+GIcF5I3f9tUKUlJ/wsysh6HU8P5L1XWRYeXfA0oJd4PyM8ds8zTFf6Ng==", "dev": true, "license": "ISC" }, diff --git a/ui/src/components/ActionBar.tsx b/ui/src/components/ActionBar.tsx index 1afef63..83ae509 100644 --- a/ui/src/components/ActionBar.tsx +++ b/ui/src/components/ActionBar.tsx @@ -89,8 +89,8 @@ export default function Actionbar({ anchor="bottom start" transition className={cx( - "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", + "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", )} > {({ open }) => { @@ -131,8 +131,8 @@ export default function Actionbar({ anchor="bottom start" transition className={cx( - "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", + "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", )} > {({ open }) => { @@ -183,8 +183,8 @@ export default function Actionbar({ transitionProperty: "opacity", }} className={cx( - "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", + "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", )} > {({ open }) => { @@ -226,8 +226,8 @@ export default function Actionbar({ anchor="bottom start" transition className={cx( - "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", + "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", )} > {({ open }) => { @@ -274,7 +274,7 @@ export default function Actionbar({
-
+