From d06784958d73159b5e4abafe5114804662114ed7 Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Thu, 9 Jul 2026 22:15:53 -0400 Subject: move ubersicht modules in tree --- .../lib/styles/components/spaces/space-options.js | 137 +++++++++++++++++++ .../lib/styles/components/spaces/space.js | 152 +++++++++++++++++++++ .../lib/styles/components/spaces/spaces.js | 50 +++++++ 3 files changed, 339 insertions(+) create mode 100755 users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space-options.js create mode 100755 users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space.js create mode 100755 users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/spaces.js (limited to 'users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces') diff --git a/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space-options.js b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space-options.js new file mode 100755 index 0000000..1f43895 --- /dev/null +++ b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space-options.js @@ -0,0 +1,137 @@ +export const spaceOptionsStyles = /* css */ ` +.space-options { + position: absolute; + top: calc(100% + 3px); + left: calc(50% - 22px); + height: 90%; + width: 50px; + height: 18px; + display: flex; + align-items: stretch; + background-color: var(--white); + opacity: 0; + pointer-events: none; + touch-action: none; + border-radius: 3px; + box-shadow: var(--light-shadow); + transform-origin: top center; + transform: translateZ(0) scale(0); + transition: opacity 160ms var(--transition-easing), transform 160ms var(--transition-easing); + z-index: 1; +} +.simple-bar--on-bottom .space-options { + top: unset; + bottom: calc(100% + 3px); + transform-origin: bottom center; +} +.simple-bar--inline-spaces-options .space-options { + height: 100%; + top: 0; + left: 100%; + border-radius: 3px; + transform-origin: center; +} +.space--hovered .space-options { + opacity: 1; + transform: translateZ(0); + pointer-events: auto; + touch-action: auto; + transition: opacity 160ms 1s var(--transition-easing), transform 160ms 1s var(--transition-easing); +} +.space--hovered.space--no-delay .space-options { + transition: opacity 160ms var(--transition-easing), transform 160ms var(--transition-easing); +} +.space-options::before { + content: ""; + position: absolute; + bottom: 100%; + left: 0; + width: 100%; + height: 3px; + z-index: 2; +} +.space-options::after { + content: ''; + position: absolute; + top: -3px; + left: calc(50% - 4px); + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-bottom: 3px solid var(--white); +} +.simple-bar--on-bottom .space-options::after { + top: unset; + bottom: -3px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 3px solid var(--white); + border-bottom: none; +} +.simple-bar--inline-spaces-options .space-options::after { + top: calc(50% - 4px); + left: -3px; + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-right: 3px solid var(--white); + border-left: none; +} +.space-options__option { + position: relative; + flex: 1 1 100%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + user-select: none; + -webkit-user-select: none; + transform: translateZ(0); + transition: background-color 160ms var(--transition-easing), opacity 160ms var(--transition-easing); +} +.space-options__option:last-child { + opacity: 0.8; + background-color: var(--red); +} +.space--fullscreen .space-options__option:last-child, +.space:first-of-type:only-of-type .space-options__option:last-child, +.space:first-of-type:nth-last-of-type(2) .space-options__option:last-child { + pointer-events: none; + touch-action: none; + opacity: 0.5; + filter: grayscale(100%); +} +.space:first-of-type .space-options__option--move-prev, +.space:nth-last-of-type(1) .space-options__option--move-next, +.space:first-of-type:only-of-type .space-options__option--move-prev, +.space:first-of-type:only-of-type .space-options__option--move-next, +.space:first-of-type:nth-last-of-type(1) .space-options__option--move-prev, +.space:first-of-type:nth-last-of-type(1) .space-options__option--move-next { + opacity: 0.2; + pointer-events: none; + touch-action: none; +} +.space .space-options__option:first-of-type { + border-radius: 3px 0 0 3px; +} +.space-options__option:last-of-type { + border-radius: 0 3px 3px 0; +} +.space-options__option:not(:last-child):hover { + background-color: var(--transparent-dark); +} +.space-options__option:last-child:hover { + opacity: 1; +} +.space-options__option > svg { + width: 8px; + height: 8px; + fill: var(--black); + curor: pointer; + user-select: none; + -webkit-user-select: none; +} +.space-options__option:last-child > svg { + fill: var(--white); +} +`; diff --git a/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space.js b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space.js new file mode 100755 index 0000000..0e6d1cb --- /dev/null +++ b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/space.js @@ -0,0 +1,152 @@ +export const spaceStyles = /* css */ ` +.space, .stickies { + position: relative; + display: flex; + align-items: center; + animation: space-appearance 320ms var(--transition-easing); +} + +@keyframes space-appearance { + 0% { + opacity: 0; + } +} +.space__inner, +.spaces__add, +.stickies__inner { + height: 100%; + display: flex; + align-items: center; + margin: var(--item-outer-margin); + padding: var(--item-inner-margin); + color: currentColor; + font-family: var(--font); + background-color: var(--minor); + border-radius: var(--item-radius); + border: 0; + outline: none; + box-shadow: var(--light-shadow); + cursor: pointer; + user-select: none; + -webkit-user-select: none; + transition: color 160ms var(--transition-easing), background-color 160ms var(--transition-easing), + border 160ms var(--transition-easing), box-shadow 160ms var(--transition-easing); + z-index: 0; +} +.space__inner:disabled { + cursor: default; +} +.stickies__inner { + padding-block: 0; + background-color: var(--background); + box-shadow: none; + cursor: default; +} +.simple-bar--spaces-background-color-as-foreground .space__inner, +.simple-bar--spaces-background-color-as-foreground .spaces__add, +.simple-bar--spaces-background-color-as-foreground .stickies__inner { + background-color: transparent; + box-shadow: none; +} +.simple-bar--no-shadow .space__inner, +.simple-bar--no-shadow .spaces__add, +.simple-bar--no-shadow .stickies__inner { + box-shadow: none; +} +.space:first-of-type .space__inner { + margin-left: 0; +} +.space:hover .space__inner { + z-index: 1; +} +.spaces__add { + height: auto; + background-color: transparent; + box-shadow: none; +} +.spaces__add:hover { + background-color: var(--minor); +} +.space--fullscreen .space__inner { + color: var(--minor); + background-color: var(--yellow); +} +.simple-bar--spaces-background-color-as-foreground .space--fullscreen .space__inner { + color: var(--yellow); + background-color: transparent; +} +.space--focused .space__inner { + color: var(--minor); + background-color: var(--foreground); +} +.simple-bar--spaces-background-color-as-foreground .space--focused .space__inner { + color: var(--foreground); + background-color: transparent; +} +.space--visible .space__inner { + box-shadow: var(--light-shadow), var(--foreground-shadow); +} +.simple-bar--no-shadow .space--visible .space__inner { + box-shadow: none; +} +.space:not(.space--focused) .space__inner:not(:disabled):hover, +.spaces__add:hover { + box-shadow: var(--light-shadow), var(--hover-ring); +} +.space:not(.space--focused) .space__inner:not(:disabled):active, +.spaces__add:active { + box-shadow: var(--light-shadow), var(--focus-ring); +} +.simple-bar--no-shadow .space:not(.space--focused) .space__inner:not(:disabled):hover, +.simple-bar--no-shadow .spaces__add:hover { + box-shadow: var(--hover-ring); +} +.simple-bar--no-shadow .space:not(.space--focused) .space__inner:not(:disabled):active, +.simple-bar--no-shadow .spaces__add:active { +box-shadow: var(--focus-ring); +} +.space__label { + display: block; + margin: 0; + color: currentColor; + font-family: inherit; + font-size: var(--font-size); + line-height: 1; + text-align: center; + background-color: transparent; + border: 0; + border-radius: 2px; + outline: none; +} +.space__label:not(:read-only):focus { + box-shadow: var(--focus-ring); +} +.simple-bar--spaces-background-color-as-foreground .space--focused .space__label { + font-weight: 700; +} +.space__icon { + flex: 0 0 11px; + width: 11px; + height: 11px; + margin-left: 6px; + fill: currentColor; + opacity: 0.5; + transform: translateZ(0); +} +.stickies__inner .space__icon:first-child { + margin: 0; +} +.space__icon--focused { + opacity: 1; +} +.space__icon--fullscreen { + fill: var(--yellow); +} +.space__icon--topmost { + fill: var(--orange); +} +.space--focused .space__icon--fullscreen { + stroke: rgba(0, 0, 0, 0.3); + stroke-width: 2px; +} +`; diff --git a/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/spaces.js b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/spaces.js new file mode 100755 index 0000000..8657b9c --- /dev/null +++ b/users/ryan/modules/simple-bar/simple-bar-source/lib/styles/components/spaces/spaces.js @@ -0,0 +1,50 @@ +// Styles for /lib/components/{yabai|aerospace}/*.jsx components +import { spaceStyles } from "./space"; +import { spaceOptionsStyles } from "./space-options"; + +export const styles = /* css */ ` +.spaces { + flex: 0 0 auto; + display: flex; + align-items: stretch; +} +.simple-bar--no-bar-background .spaces { + padding: 4px 5px; + background-color: var(--background); + box-shadow: var(--light-shadow); + border-radius: var(--bar-radius); +} +.simple-bar--no-bar-background.simple-bar--no-shadow .spaces { + box-shadow: none; +} +.simple-bar--process-aligned-to-left .spaces { + margin-right: 4px; +} +.spaces__separator { + align-self: center; + flex: 0 0 5px; + width: 5px; + height: 5px; + margin: var(--item-outer-margin); + background-color: var(--foreground); + border-radius: 50%; + opacity: 0.35; +} +${spaceStyles} +${spaceOptionsStyles} +.spaces__add > svg { + width: 10px; + height: 10px; + fill: currentColor; +} +.spaces__end-separator { + align-self: center; + flex: 0 0 4px; + width: 4px; + height: 4px; + margin: var(--item-outer-margin); + background-color: var(--main-alt); + border-radius: 50%; + opacity: 0.35; +} +`; -- cgit v1.3