diff --git a/ui/frontend/build_src/package-lock.json b/ui/frontend/build_src/package-lock.json index 99be5ccb..bfa45c4f 100644 --- a/ui/frontend/build_src/package-lock.json +++ b/ui/frontend/build_src/package-lock.json @@ -13,6 +13,7 @@ "@tanstack/react-query": "^4.2.3", "@tanstack/react-query-devtools": "^4.2.3", "@vanilla-extract/css": "^1.9.0", + "@vanilla-extract/css-utils": "^0.1.2", "@vanilla-extract/recipes": "^0.2.5", "@vanilla-extract/vite-plugin": "^3.5.0", "i18next": "^21.9.2", @@ -1166,6 +1167,11 @@ "outdent": "^0.8.0" } }, + "node_modules/@vanilla-extract/css-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@vanilla-extract/css-utils/-/css-utils-0.1.2.tgz", + "integrity": "sha512-qoxIu5E/UhJtoKsPL1JaU9nhTN0Xl5zYV0pScOgsvc3JN46TvTTt0L3GV8x3PQpZP7x3elw8BsC9czYbhJy9Gg==" + }, "node_modules/@vanilla-extract/css/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -5733,6 +5739,11 @@ } } }, + "@vanilla-extract/css-utils": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@vanilla-extract/css-utils/-/css-utils-0.1.2.tgz", + "integrity": "sha512-qoxIu5E/UhJtoKsPL1JaU9nhTN0Xl5zYV0pScOgsvc3JN46TvTTt0L3GV8x3PQpZP7x3elw8BsC9czYbhJy9Gg==" + }, "@vanilla-extract/integration": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/@vanilla-extract/integration/-/integration-5.0.1.tgz", diff --git a/ui/frontend/build_src/package.json b/ui/frontend/build_src/package.json index af627228..e5b27a7e 100644 --- a/ui/frontend/build_src/package.json +++ b/ui/frontend/build_src/package.json @@ -15,6 +15,7 @@ "@tanstack/react-query": "^4.2.3", "@tanstack/react-query-devtools": "^4.2.3", "@vanilla-extract/css": "^1.9.0", + "@vanilla-extract/css-utils": "^0.1.2", "@vanilla-extract/recipes": "^0.2.5", "@vanilla-extract/vite-plugin": "^3.5.0", "i18next": "^21.9.2", diff --git a/ui/frontend/build_src/src/components/_recipes/button.css.ts b/ui/frontend/build_src/src/components/_recipes/button.css.ts new file mode 100644 index 00000000..ad58f24a --- /dev/null +++ b/ui/frontend/build_src/src/components/_recipes/button.css.ts @@ -0,0 +1,111 @@ +import { recipe } from "@vanilla-extract/recipes"; +import { vars } from "../../styles/theme/index.css"; + +export const buttonStyle = recipe({ + + // would prefer to use a var here, but it doesn't work + // vars: { + // '--button-base-saturation': vars.colorMod.saturation.normal, + // '--button-base-lightness': vars.colorMod.lightness.normal, + // }, + + base: { + fontSize: vars.fonts.sizes.Subheadline, + fontWeight: "bold", + color: vars.colors.text.normal, + padding: vars.spacing.small, + border: "0", + borderRadius: vars.trim.smallBorderRadius, + }, + + variants: { + type: { + primary: { + '--primary-button-hue': vars.brandHue, + backgroundColor: `hsl(var(--primary-button-hue),${vars.colorMod.saturation.normal},${vars.colorMod.lightness.normal})`, + ":hover": { + backgroundColor: `hsl(var(--primary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.normal})`, + }, + + ":active": { + backgroundColor: `hsl(var(--primary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":focus": { + backgroundColor: `hsl(var(--primary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":disabled": { + backgroundColor: `hsl(var(--primary-button-hue),${vars.colorMod.saturation.dim},${vars.colorMod.lightness.dim})`, + }, + }, + secondary: { + '--secondary-button-hue': vars.secondaryHue, + backgroundColor: `hsl(var(--secondary-button-hue),${vars.colorMod.saturation.normal},${vars.colorMod.lightness.normal})`, + ":hover": { + backgroundColor: `hsl(var(--secondary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.normal})`, + }, + + ":active": { + backgroundColor: `hsl(var(--secondary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":focus": { + backgroundColor: `hsl(var(--secondary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":disabled": { + backgroundColor: `hsl(var(--secondary-button-hue),${vars.colorMod.saturation.dim},${vars.colorMod.lightness.dim})`, + }, + }, + tertiary: { + '--tertiary-button-hue': vars.tertiaryHue, + backgroundColor: `hsl(var(--tertiary-button-hue),${vars.colorMod.saturation.normal},${vars.colorMod.lightness.normal})`, + ":hover": { + backgroundColor: `hsl(var(--tertiary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.normal})`, + }, + + ":active": { + backgroundColor: `hsl(var(--tertiary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":focus": { + backgroundColor: `hsl(var(--tertiary-button-hue),${vars.colorMod.saturation.bright},${vars.colorMod.lightness.dim})`, + }, + + ":disabled": { + backgroundColor: `hsl(var(--tertiary-button-hue),${vars.colorMod.saturation.dim},${vars.colorMod.lightness.dim})`, + }, + }, + + cancel: { + '--cancel-button-hue': vars.errorHue, + backgroundColor: `hsl(var(--cancel-button-hue), ${vars.colorMod.saturation.normal},${vars.colorMod.lightness.normal})`, + ":hover": { + backgroundColor: `hsl(var(--cancel-button-hue), ${vars.colorMod.saturation.bright},${vars.colorMod.lightness.normal})`, + }, + ":active": { + backgroundColor: `hsl(var(--cancel-button-hue), ${vars.colorMod.saturation.bright} ,${vars.colorMod.lightness.dim})`, + }, + ":focus": { + backgroundColor: `hsl(var(--cancel-button-hue), ${vars.colorMod.saturation.bright} ,${vars.colorMod.lightness.dim})`, + }, + ":disabled": { + backgroundColor: `hsl(var(--cancel-button-hue), ${vars.colorMod.saturation.dim} ,${vars.colorMod.lightness.dim})`, + }, + }, + + }, + + size: { + large: { + width: "100%", + fontSize: vars.fonts.sizes.Headline, + } + } + }, + defaultVariants: { + type: "primary", + }, + +}); \ No newline at end of file diff --git a/ui/frontend/build_src/src/components/_recipes/card.css.ts b/ui/frontend/build_src/src/components/_recipes/card.css.ts new file mode 100644 index 00000000..b5a609f3 --- /dev/null +++ b/ui/frontend/build_src/src/components/_recipes/card.css.ts @@ -0,0 +1,23 @@ +import { recipe } from "@vanilla-extract/recipes"; +import { vars } from "../../styles/theme/index.css"; + +export const card = recipe({ + base: { + background: vars.colors.background, + color: vars.colors.text.normal, + padding: vars.spacing.medium, + borderRadius: vars.trim.smallBorderRadius, + }, + variants: { + level: { + 1: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + 2: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + 3: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + }, + }, + defaultVariants: { + level: 1, + }, +}); + + diff --git a/ui/frontend/build_src/src/components/_recipes/index.css.ts b/ui/frontend/build_src/src/components/_recipes/index.css.ts new file mode 100644 index 00000000..ab6e8ee7 --- /dev/null +++ b/ui/frontend/build_src/src/components/_recipes/index.css.ts @@ -0,0 +1,24 @@ +import { recipe } from "@vanilla-extract/recipes"; +import { vars } from "../../styles/theme/index.css"; + + +export const card = recipe({ + base: { + background: vars.colors.background, + color: vars.colors.text.normal, + padding: vars.spacing.medium, + borderRadius: vars.trim.smallBorderRadius, + }, + variants: { + level: { + 1: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + 2: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + 3: { boxShadow: "0 4px 8px 0 rgba(0, 0, 0, 0.15), 0 6px 20px 0 rgba(0, 0, 0, 0.15)" }, + }, + }, + defaultVariants: { + level: 1, + }, +}); + + diff --git a/ui/frontend/build_src/src/components/_headless/popover/index.css.ts b/ui/frontend/build_src/src/components/_recipes/popover_headless.css.ts similarity index 86% rename from ui/frontend/build_src/src/components/_headless/popover/index.css.ts rename to ui/frontend/build_src/src/components/_recipes/popover_headless.css.ts index 06b66c91..6f7d2626 100644 --- a/ui/frontend/build_src/src/components/_headless/popover/index.css.ts +++ b/ui/frontend/build_src/src/components/_recipes/popover_headless.css.ts @@ -1,7 +1,9 @@ import { style, globalStyle } from "@vanilla-extract/css"; -import { vars } from "../../../styles/theme/index.css"; +// import { recipe } from "@vanilla-extract/recipes"; +import { vars } from "../../styles/theme/index.css"; + export const PopoverMain = style({ position: 'relative' diff --git a/ui/frontend/build_src/src/components/_headless/switch/index.css.ts b/ui/frontend/build_src/src/components/_recipes/switch_headless.css.ts similarity index 70% rename from ui/frontend/build_src/src/components/_headless/switch/index.css.ts rename to ui/frontend/build_src/src/components/_recipes/switch_headless.css.ts index d9922b20..22a5be25 100644 --- a/ui/frontend/build_src/src/components/_headless/switch/index.css.ts +++ b/ui/frontend/build_src/src/components/_recipes/switch_headless.css.ts @@ -1,6 +1,7 @@ import { style, } from "@vanilla-extract/css"; -//import { vars } from "../../../styles/theme/index.css"; +// import { recipe } from "@vanilla-extract/recipes"; +import { vars } from "../../styles/theme/index.css"; export const SwitchGroupMain = style({ }); diff --git a/ui/frontend/build_src/src/components/layouts/CreationTabs/creationTabs.css.ts b/ui/frontend/build_src/src/components/layouts/CreationTabs/creationTabs.css.ts new file mode 100644 index 00000000..add572d4 --- /dev/null +++ b/ui/frontend/build_src/src/components/layouts/CreationTabs/creationTabs.css.ts @@ -0,0 +1,9 @@ +import { style, globalStyle } from '@vanilla-extract/css'; + + +import { PanelBox } from '../../../styles/shared.css'; + + +export const CreationTabsMain = style([PanelBox, { + flexGrow: 1, +}]); \ No newline at end of file diff --git a/ui/frontend/build_src/src/components/layouts/CreationTabs/index.tsx b/ui/frontend/build_src/src/components/layouts/CreationTabs/index.tsx new file mode 100644 index 00000000..a8d25021 --- /dev/null +++ b/ui/frontend/build_src/src/components/layouts/CreationTabs/index.tsx @@ -0,0 +1,29 @@ +import React from "react"; +import { Tab } from '@headlessui/react'; + +import CreationPanel from "../../organisms/creationPanel"; +import QueueDisplay from "../../organisms/queueDisplay"; + +import { + CreationTabsMain +} from "./creationTabs.css"; + +export default function CreationTabs() { + + return ( + + + Create + Queue + + + + + + + + + + + ); +} diff --git a/ui/frontend/build_src/src/components/molecules/clearQueue/index.tsx b/ui/frontend/build_src/src/components/molecules/clearQueue/index.tsx index b833bf1f..4f3d8196 100644 --- a/ui/frontend/build_src/src/components/molecules/clearQueue/index.tsx +++ b/ui/frontend/build_src/src/components/molecules/clearQueue/index.tsx @@ -8,7 +8,7 @@ import { export default function ClearQueue() { - const hasQueue = useRequestQueue((state) => state.hasPendingQueue()); + const hasQueue = useRequestQueue((state) => state.hasAnyQueue()); const clearQueue = useRequestQueue((state) => state.clearQueue); const stopAll = async () => { diff --git a/ui/frontend/build_src/src/components/molecules/makeButton/index.tsx b/ui/frontend/build_src/src/components/molecules/makeButton/index.tsx index 03e37e6f..708f4686 100644 --- a/ui/frontend/build_src/src/components/molecules/makeButton/index.tsx +++ b/ui/frontend/build_src/src/components/molecules/makeButton/index.tsx @@ -24,9 +24,10 @@ import { ImageOutput, doMakeImage, } from "../../../api"; + import { - MakeButtonStyle, -} from "./makeButton.css"; + buttonStyle +} from "../../_recipes/button.css"; import { useTranslation } from "react-i18next"; @@ -260,7 +261,9 @@ export default function MakeButton() { return ( <> - + + {requests.map((request) => { return ; diff --git a/ui/frontend/build_src/src/components/organisms/queueDisplay/queueDisplay.css.ts b/ui/frontend/build_src/src/components/organisms/queueDisplay/queueDisplay.css.ts index e5ba8aea..a23b806a 100644 --- a/ui/frontend/build_src/src/components/organisms/queueDisplay/queueDisplay.css.ts +++ b/ui/frontend/build_src/src/components/organisms/queueDisplay/queueDisplay.css.ts @@ -7,7 +7,7 @@ import { vars } from "../../../styles/theme/index.css"; export const QueueDisplayMain = style({ display: "flex", flexDirection: "column", - width: '400px', + width: '100%', height: '100%', }); diff --git a/ui/frontend/build_src/src/pages/Home/home.css.ts b/ui/frontend/build_src/src/pages/Home/home.css.ts index 8e80cba2..bfc5cf37 100644 --- a/ui/frontend/build_src/src/pages/Home/home.css.ts +++ b/ui/frontend/build_src/src/pages/Home/home.css.ts @@ -1,4 +1,4 @@ -import { style } from "@vanilla-extract/css"; +import { style, globalStyle } from "@vanilla-extract/css"; import { vars } from "../../styles/theme/index.css"; export const AppLayout = style({ @@ -38,8 +38,18 @@ export const HeaderLayout = style({ export const CreateLayout = style({ gridArea: "create", position: "relative", + display: "flex", + flexDirection: "column", + overflowY: "auto", + overflowX: "hidden", }); +// globalStyle(`${CreateLayout}`, { + + + +// } + export const DisplayLayout = style({ gridArea: "display", overflow: "auto", diff --git a/ui/frontend/build_src/src/pages/Home/index.tsx b/ui/frontend/build_src/src/pages/Home/index.tsx index 368ceb0c..86e7da7b 100644 --- a/ui/frontend/build_src/src/pages/Home/index.tsx +++ b/ui/frontend/build_src/src/pages/Home/index.tsx @@ -19,6 +19,7 @@ import HeaderDisplay from "../../components/organisms/headerDisplay"; import CreationPanel from "../../components/organisms/creationPanel"; import DisplayPanel from "../../components/organisms/displayPanel"; import FooterDisplay from "../../components/organisms/footerDisplay"; +import CreationTabs from "../../components/layouts/CreationTabs"; function Home({ className }: { className: any }) { // Get the original save directory @@ -56,7 +57,8 @@ function Home({ className }: { className: any }) {
diff --git a/ui/frontend/build_src/src/styles/recipes/index.css.ts b/ui/frontend/build_src/src/styles/recipes/index.css.ts deleted file mode 100644 index ad7ebafb..00000000 --- a/ui/frontend/build_src/src/styles/recipes/index.css.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { recipe } from "@vanilla-extract/recipes"; - -export const button = recipe({ - variants: { - color: { - neutral: { background: "whitesmoke" }, - brand: { background: "blueviolet" }, - accent: { background: "slateblue" }, - }, - size: { - small: { padding: 12 }, - medium: { padding: 16 }, - large: { padding: 24 }, - }, - }, -}); - -// export const card = recipe({ -// variants: { -// color: { - -// alt: { background: 'whitesmoke' }, diff --git a/ui/frontend/build_src/src/styles/shared.css.ts b/ui/frontend/build_src/src/styles/shared.css.ts index ed548e7f..96d47854 100644 --- a/ui/frontend/build_src/src/styles/shared.css.ts +++ b/ui/frontend/build_src/src/styles/shared.css.ts @@ -26,13 +26,11 @@ globalStyle(`${PanelBox} .panel-box-toggle-btn`, { //TODO this should probably just be for all li elements export const SettingItem = style({ marginBottom: vars.spacing.medium, - selectors: { "&:last-of-type": { marginBottom: vars.spacing.none, }, }, - }); diff --git a/ui/frontend/build_src/src/styles/theme/index.css.ts b/ui/frontend/build_src/src/styles/theme/index.css.ts index 7aee7f2e..bb3c5f12 100644 --- a/ui/frontend/build_src/src/styles/theme/index.css.ts +++ b/ui/frontend/build_src/src/styles/theme/index.css.ts @@ -11,6 +11,21 @@ import { * * Lots of these arent used yet, but once they are defined and useable then they can be set. */ + +// const SharedColors = { + +// pending: null, +// processing: null, +// paused: null, + +// link: null, + +// warning: null, +// error: null, +// success: null, + +// } + const colors = createThemeContract({ brand: null, brandDimmed: null, @@ -46,7 +61,13 @@ const colors = createThemeContract({ accentDimmed: null, }, + // pending: null, + // processing: null, + // paused: null, + + link: null, + warning: null, error: null, success: null, @@ -80,6 +101,28 @@ const app = createGlobalTheme(":root", { }, }, colors, + + brandHue: '265', + secondaryHue: '54', + tertiaryHue: '116', + + errorHue: '0', + warningHue: '60', + successHue: '120', + + colorMod: { + saturation: { + normal: "70%", + bright: "100%", + dim: "30%", + }, + lightness: { + normal: "50%", + bright: "60%", + dim: "40%", + }, + }, + }); export const darkTheme = createTheme(colors, {