feat: shared components for worlds + p2p instances (#5135)
* feat: base content card component * fix: tooltips + colors * feat: fix orgs * feat: add ContentModpackCard * fix: extract types * feat: selection v-model * add show icon in selected for combobox with stories * feat: add project combobox * clean up project combobox * feat: start install to play modal * fix: events * feat: figma alignments * feat: migrate toggle to tailwind * fix: row borders * feat: disabled state * feat: virtual list impl for card table based on window scroll * fix: lint * feat: virtualization + smaller contentcard items * feat: fix gap + border issues on last elm * fix: use TeleportOverflowMenu * fix: hasUpdate type * fix: fallback to svg if src is invalid on avatar component * fix: storybook * feat: start on updater modal * feat: finish content updater modal * feat: i18n pass * remove install to play modal from ui package * pnpm prepr * feat: reusable table component * feat: add column width prop for table and fix stories * feat: add table overflow menu story example * feat: add surface-1.5 and use in table * chore: export table in index * fix: allow more loose typing on columns * feat: update table component to derive key from column instead of data * feat: surface 1.5 for oled + refactor story for contentcardtable + yeet sorting funcs * fix: lint * feat: add no padding story for new modal --------- Signed-off-by: Calum H. <contact@cal.engineer> Co-authored-by: tdgao <mr.trumgao@gmail.com>
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
|
||||
import type { FunctionalComponent, SVGAttributes } from 'vue'
|
||||
|
||||
export type IconComponent = FunctionalComponent<SVGAttributes>
|
||||
|
||||
import _AffiliateIcon from './icons/affiliate.svg?component'
|
||||
import _AlignLeftIcon from './icons/align-left.svg?component'
|
||||
import _ArchiveIcon from './icons/archive.svg?component'
|
||||
@@ -327,6 +325,8 @@ import _XCircleIcon from './icons/x-circle.svg?component'
|
||||
import _ZoomInIcon from './icons/zoom-in.svg?component'
|
||||
import _ZoomOutIcon from './icons/zoom-out.svg?component'
|
||||
|
||||
export type IconComponent = FunctionalComponent<SVGAttributes>
|
||||
|
||||
export const AffiliateIcon = _AffiliateIcon
|
||||
export const AlignLeftIcon = _AlignLeftIcon
|
||||
export const ArchiveIcon = _ArchiveIcon
|
||||
|
||||
@@ -63,10 +63,10 @@ import _WindowsIcon from './external/windows.svg?component'
|
||||
import _YouTubeIcon from './external/youtube.svg?component'
|
||||
import _YouTubeGaming from './external/youtubegaming.svg?component'
|
||||
import _YouTubeShortsIcon from './external/youtubeshorts.svg?component'
|
||||
import _EmptyIllustration from './illustrations/empty.svg?component'
|
||||
// Tag icon helpers - import maps from generated-icons
|
||||
import type { IconComponent } from './generated-icons'
|
||||
import { categoryIconMap, loaderIconMap } from './generated-icons'
|
||||
import _EmptyIllustration from './illustrations/empty.svg?component'
|
||||
|
||||
export const ModrinthIcon = _ModrinthIcon
|
||||
export const BrowserWindowSuccessIllustration = _BrowserWindowSuccessIllustration
|
||||
|
||||
@@ -70,10 +70,7 @@
|
||||
:where(input) {
|
||||
box-sizing: border-box;
|
||||
max-height: 40px;
|
||||
|
||||
&:not(.stylized-toggle) {
|
||||
max-width: 100%;
|
||||
}
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
:where(.adjacent-input, &.adjacent-input) {
|
||||
@@ -118,10 +115,6 @@
|
||||
&:not(&.small) {
|
||||
flex-direction: column;
|
||||
align-items: start;
|
||||
|
||||
.stylized-toggle {
|
||||
flex-basis: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -766,60 +759,6 @@ a,
|
||||
}
|
||||
}
|
||||
|
||||
.switch {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.stylized-toggle {
|
||||
@extend .button-base;
|
||||
|
||||
box-sizing: content-box;
|
||||
min-height: 32px;
|
||||
height: 32px;
|
||||
min-width: 52px;
|
||||
max-width: 52px;
|
||||
border-radius: var(--radius-max);
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
transition: all 0.2s ease;
|
||||
background: var(--color-button-bg);
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 7px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--color-gray);
|
||||
transition: all 0.2s cubic-bezier(0.5, 0.1, 0.75, 1.35);
|
||||
outline: 2px solid transparent;
|
||||
|
||||
@media (prefers-reduced-motion) {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:checked {
|
||||
background-color: var(--color-brand);
|
||||
|
||||
&:after {
|
||||
transform: translatex(20px);
|
||||
background: var(--color-accent-contrast);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover &:focus {
|
||||
background: var(--color-button-bg);
|
||||
}
|
||||
}
|
||||
|
||||
// TOOLTIPS
|
||||
|
||||
.v-popper--theme-dropdown,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.light-properties {
|
||||
--surface-1: #ebebeb;
|
||||
--surface-1-5: #ededed;
|
||||
--surface-2: #f5f5f5;
|
||||
--surface-3: #f8f8f8;
|
||||
--surface-4: #ffffff;
|
||||
@@ -221,6 +222,7 @@ html {
|
||||
.dark,
|
||||
:root[data-theme='dark'] {
|
||||
--surface-1: #16181c;
|
||||
--surface-1-5: #1a1c20;
|
||||
--surface-2: #1d1f23;
|
||||
--surface-3: #27292e;
|
||||
--surface-4: #34363c;
|
||||
@@ -392,6 +394,7 @@ html {
|
||||
.oled-mode {
|
||||
@extend .dark-mode;
|
||||
--surface-1: #000000;
|
||||
--surface-1-5: #050506;
|
||||
--surface-2: #09090a;
|
||||
--surface-3: #101013;
|
||||
--surface-4: #1b1b20;
|
||||
|
||||
Reference in New Issue
Block a user