diff --git a/packages/web/components/elements/SplitButton.tsx b/packages/web/components/elements/SplitButton.tsx index ce6df2b67..952966937 100644 --- a/packages/web/components/elements/SplitButton.tsx +++ b/packages/web/components/elements/SplitButton.tsx @@ -18,7 +18,7 @@ const CaretButton = (): JSX.Element => { width: '20px', height: '100%', alignItems: 'center', - bg: '#6A6968', + bg: '$ctaBlue', border: '0px solid transparent', borderTopRightRadius: '5px', borderBottomRightRadius: '5px', @@ -38,7 +38,8 @@ export const SplitButton = (props: SplitButtonProps): JSX.Element => { css={{ display: 'flex', minWidth: '70px', - bg: '#6A6968', + bg: '$ctaBlue', + color: '#EDEDED', fontSize: '12px', fontFamily: '$inter', border: '0px solid transparent', diff --git a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx index 82af009e8..fc8cf7e29 100644 --- a/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx +++ b/packages/web/components/patterns/LibraryCards/LibraryGridCard.tsx @@ -64,15 +64,14 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { css={{ pl: '0px', padding: '0px', - width: '320px', + width: '293px', height: '100%', minHeight: '270px', background: 'white', borderRadius: '5px', borderWidth: '1px', - borderStyle: 'solid', + borderStyle: 'none', overflow: 'hidden', - borderColor: '$thBorderColor', cursor: 'pointer', '@media (max-width: 930px)': { m: '15px', @@ -88,6 +87,10 @@ export function LibraryGridCard(props: LinkedItemCardProps): JSX.Element { setIsHovered(false) }} onClick={(event) => { + if (props.multiSelectMode !== 'off') { + props.setIsChecked(props.item.id, !props.isChecked) + return + } if (event.metaKey || event.ctrlKey) { window.open( `/${props.viewer.profile.username}/${props.item.slug}`, diff --git a/packages/web/components/patterns/LibraryCards/LibraryListCard.tsx b/packages/web/components/patterns/LibraryCards/LibraryListCard.tsx index 7afcd42f4..b4554504e 100644 --- a/packages/web/components/patterns/LibraryCards/LibraryListCard.tsx +++ b/packages/web/components/patterns/LibraryCards/LibraryListCard.tsx @@ -66,7 +66,7 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element { height: '100%', cursor: 'pointer', gap: '10px', - border: '1px solid $grayBorder', + borderStyle: 'none', borderBottom: 'none', borderRadius: '6px', width: '100vw', @@ -82,16 +82,14 @@ export function LibraryListCard(props: LinkedItemCardProps): JSX.Element { '@media (min-width: 1600px)': { width: '1340px', }, - boxShadow: - '0 1px 3px 0 rgba(0, 0, 0, 0.1),0 1px 2px 0 rgba(0, 0, 0, 0.06);', - '@media (max-width: 930px)': { - boxShadow: 'unset', - borderRadius: 'unset', - }, }} alignment="start" distribution="start" onClick={(event) => { + if (props.multiSelectMode !== 'off') { + props.setIsChecked(props.item.id, !props.isChecked) + return + } if (event.metaKey || event.ctrlKey) { window.open( `/${props.viewer.profile.username}/${props.item.slug}`, diff --git a/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx b/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx index dad163a9e..12043cb47 100644 --- a/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx +++ b/packages/web/components/templates/homeFeed/LibraryFilterMenu.tsx @@ -633,12 +633,7 @@ const Footer = (): JSX.Element => { }, }} > - { - console.log('show') - }} - /> + diff --git a/packages/web/components/templates/homeFeed/LibraryHeader.tsx b/packages/web/components/templates/homeFeed/LibraryHeader.tsx index 47fca61b0..cf9a813b5 100644 --- a/packages/web/components/templates/homeFeed/LibraryHeader.tsx +++ b/packages/web/components/templates/homeFeed/LibraryHeader.tsx @@ -57,8 +57,6 @@ type LibraryHeaderProps = { showFilterMenu: boolean setShowFilterMenu: (show: boolean) => void - showAddLinkModal: () => void - numItemsSelected: number multiSelectMode: MultiSelectMode setMultiSelectMode: (mode: MultiSelectMode) => void @@ -80,16 +78,15 @@ const controlWidths = ( width: '95%', '@mdDown': { width: multiSelectMode !== 'off' ? '100%' : '95%', - display: multiSelectMode !== 'off' ? 'flex' : 'none', }, '@media (min-width: 930px)': { - width: layout == 'GRID_LAYOUT' ? '660px' : '640px', + width: layout == 'GRID_LAYOUT' ? '640px' : '640px', }, '@media (min-width: 1280px)': { - width: '1000px', + width: '950px', }, '@media (min-width: 1600px)': { - width: '1340px', + width: '1260px', }, } } @@ -100,9 +97,7 @@ export function LibraryHeader(props: LibraryHeaderProps): JSX.Element { useEffect(() => { if (typeof window !== 'undefined') { - window.addEventListener('scroll', () => - setSmall(window.pageYOffset > 200) - ) + window.addEventListener('scroll', () => setSmall(window.scrollY > 40)) } }, []) @@ -114,22 +109,19 @@ export function LibraryHeader(props: LibraryHeaderProps): JSX.Element { css={{ top: '0', right: '0', - left: LIBRARY_LEFT_MENU_WIDTH, zIndex: 5, + bg: '$thLibraryBackground', position: 'fixed', + left: LIBRARY_LEFT_MENU_WIDTH, height: small ? '60px' : DEFAULT_HEADER_HEIGHT, - bg: 'red', transition: '0.5s', '@mdDown': { left: '0px', right: '0', - height: small ? '60px' : DEFAULT_HEADER_HEIGHT, }, }} > - {/* These will display/hide depending on breakpoints */} - {/* This spacer is put in to push library content down @@ -147,15 +139,6 @@ function LargeHeaderLayout(props: LibraryHeaderProps): JSX.Element { initialValue: [], isSessionStorage: false, }) - const [small, setSmall] = useState(false) - - useEffect(() => { - if (typeof window !== 'undefined') { - window.addEventListener('scroll', () => - setSmall(window.pageYOffset > 200) - ) - } - }, []) return ( - - - - - {props.layout == 'LIST_LAYOUT' ? ( - - ) : ( - - )} - - - ) -} - -function SmallHeaderLayout(props: LibraryHeaderProps): JSX.Element { - const [showInlineSearch, setShowInlineSearch] = useState(false) - - return ( - - {showInlineSearch ? ( - - - + {props.multiSelectMode !== 'off' ? ( + + ) : ( <> - {props.multiSelectMode === 'off' && } - + + + + + + )} @@ -468,8 +426,6 @@ type ControlButtonBoxProps = { updateLayout: (layout: LayoutType) => void setShowInlineSearch?: (show: boolean) => void - showAddLinkModal: () => void - allowSelectMultiple: boolean numItemsSelected: number @@ -667,97 +623,87 @@ const MuliSelectControl = (props: ControlButtonBoxProps): JSX.Element => { ) } -function ControlButtonBox(props: ControlButtonBoxProps): JSX.Element { - return ( - <> - - - {props.multiSelectMode !== 'off' && ( - - - {props.numItemsSelected}{' '} - - selected - - - - )} - {props.multiSelectMode !== 'off' ? ( - <> - - - - ) : ( - - )} - +// function ControlButtonBox(props: ControlButtonBoxProps): JSX.Element { +// return ( +// <> - {props.setShowInlineSearch && props.multiSelectMode === 'off' && ( - - - - - )} - - ) -} +// +// +// {props.numItemsSelected}{' '} +// +// selected +// +// +// +// )} +// {/* {props.multiSelectMode !== 'off' ? ( +// <> +// +// +// +// ) : ( +// +// )} */} +// {/* */} + +// // {props.setShowInlineSearch && props.multiSelectMode === 'off' && ( +// // +// // +// // +// // +// // )} +// +// ) +// } diff --git a/packages/web/components/tokens/stitches.config.ts b/packages/web/components/tokens/stitches.config.ts index b502f0d98..911e73a6c 100644 --- a/packages/web/components/tokens/stitches.config.ts +++ b/packages/web/components/tokens/stitches.config.ts @@ -129,7 +129,8 @@ export const { styled, css, theme, getCssText, globalCss, keyframes, config } = grayBorderHover: 'hsl(0 0% 78.0%)', grayText: '#6A6968', - // Semantic Colors + ctaBlue: '#007AFF', + highlightBackground: '255, 210, 52', recommendedHighlightBackground: '#E5FFE5', highlight: '#FFD234', @@ -172,7 +173,7 @@ export const { styled, css, theme, getCssText, globalCss, keyframes, config } = thBackgroundActive: '#FFEA9F', thBackgroundContrast: '#FFFFFF', thLeftMenuBackground: '#FCFCFC', - thLibraryBackground: '#F3F3F3', + thLibraryBackground: '#FFFFFF', thLibrarySearchbox: '#FCFCFC', thLibraryMenuPrimary: '#3D3D3D', thLibraryMenuSecondary: '#3D3D3D', @@ -285,7 +286,7 @@ const darkThemeSpec = { thBackgroundActive: '#3D3D3D', thBackgroundContrast: '#000000', thLeftMenuBackground: '#343434', - thLibraryBackground: '#333333', + thLibraryBackground: '#2A2A2A', thLibrarySearchbox: '#3D3D3D', thLibraryMenuPrimary: '#EBEBEB', thLibraryMenuSecondary: '#EBEBEB',