diff --git a/packages/web/components/elements/Button.tsx b/packages/web/components/elements/Button.tsx index 8e6d2f57b..2d0fe45d3 100644 --- a/packages/web/components/elements/Button.tsx +++ b/packages/web/components/elements/Button.tsx @@ -20,7 +20,7 @@ export const Button = styled('button', { }, ctaDarkYellow: { border: 0, - fontSize: '14px', + fontSize: '16px', fontWeight: 500, fontStyle: 'normal', fontFamily: 'Inter', @@ -30,6 +30,21 @@ export const Button = styled('button', { bg: '$omnivoreCtaYellow', p: '10px 12px', }, + ctaOutlineYellow: { + boxSizing: 'border-box', + '-moz-box-sizing': 'border-box', + '-webkit-box-sizing': 'border-box', + border: '1px solid $omnivoreCtaYellow', + fontSize: '16px', + fontWeight: 500, + fontStyle: 'normal', + fontFamily: 'Inter', + borderRadius: '8px', + cursor: 'pointer', + color: '$utilityTextDefault', + bg: 'transparent', + p: '9px 12px', + }, ctaLightGray: { border: 0, fontSize: '14px', diff --git a/packages/web/components/elements/FormElements.tsx b/packages/web/components/elements/FormElements.tsx index 2c26ec6b5..c94389250 100644 --- a/packages/web/components/elements/FormElements.tsx +++ b/packages/web/components/elements/FormElements.tsx @@ -73,7 +73,7 @@ export function GeneralFormInput(props: FormInputProps): JSX.Element { ) } else if (props.type === 'select') { return ( - {input.options?.map((label, index) => ( ))} @@ -96,13 +96,14 @@ export function GeneralFormInput(props: FormInputProps): JSX.Element { hidden={input.hidden} required={input.required} css={{ - border: '1px solid $grayBorder', + border: '1px solid $textNonessential', borderRadius: '8px', width: '100%', bg: 'transparent', fontSize: '16px', textIndent: '8px', marginBottom: '2px', + height: '38px', color: '$grayTextContrast', '&:focus': { outline: 'none', diff --git a/packages/web/components/elements/ModalPrimitives.tsx b/packages/web/components/elements/ModalPrimitives.tsx index b1e9083de..a8e6db4d2 100644 --- a/packages/web/components/elements/ModalPrimitives.tsx +++ b/packages/web/components/elements/ModalPrimitives.tsx @@ -1,5 +1,9 @@ import { Root, Overlay, Content } from '@radix-ui/react-dialog' +import { X } from 'phosphor-react' import { styled, keyframes, theme } from '../tokens/stitches.config' +import { Button } from './Button' +import { HStack } from './LayoutPrimitives' +import { StyledText } from './StyledText' export const ModalRoot = styled(Root, {}) @@ -37,10 +41,72 @@ export const ModalContent = styled(Modal, { left: '50%', transform: 'translate(-50%, -50%)', width: '90vw', - maxWidth: '600px', + maxWidth: '450px', maxHeight: '85vh', '@smDown': { maxWidth: '95%', width: '95%', }, }) + +export type ModalTitleBarProps = { + title: string + onOpenChange: (open: boolean) => void +} + +export const ModalTitleBar = (props: ModalTitleBarProps) => { + return ( + + + {props.title} + + + + ) +} + +type ModalButtonBarProps = { + acceptButtonLabel?: string + onOpenChange: (open: boolean) => void +} + +export const ModalButtonBar = (props: ModalButtonBarProps) => { + return ( + + + + + ) +} \ No newline at end of file diff --git a/packages/web/components/elements/StyledText.tsx b/packages/web/components/elements/StyledText.tsx index a7674cf39..938f174ab 100644 --- a/packages/web/components/elements/StyledText.tsx +++ b/packages/web/components/elements/StyledText.tsx @@ -45,7 +45,7 @@ const textVariants = { }, modalHeadline: { fontWeight: '500', - fontSize: '16px', + fontSize: '24px', lineHeight: '1', color: '$grayText', margin: 0, @@ -65,7 +65,7 @@ const textVariants = { shareHighlightModalAnnotation: { fontSize: '18px', lineHeight: '23.4px', - color: '$textSubtle', + color: '$utilityTextSubtle', m: 0, }, footnote: { @@ -105,7 +105,7 @@ const textVariants = { lineHeight: '22.5px', letterSpacing: '0.01em', margin: '0px', - color: '$textSubtle', + color: '$utilityTextSubtle', }, highlightTitle: { fontSize: '14px', @@ -133,9 +133,8 @@ const textVariants = { menuTitle: { pt: '0px', m: '0px', - cursor: 'default', - color: '$grayText', - fontSize: 16, + color: '$utilityTextSubtle', + fontSize: 14, fontFamily: 'inter', fontWeight: '500', lineHeight: 'unset', diff --git a/packages/web/components/patterns/FormModal.tsx b/packages/web/components/patterns/FormModal.tsx index e9d56ac4a..14a6235e2 100644 --- a/packages/web/components/patterns/FormModal.tsx +++ b/packages/web/components/patterns/FormModal.tsx @@ -1,15 +1,17 @@ import { + ModalButtonBar, ModalContent, ModalOverlay, ModalRoot, + ModalTitleBar, } from '../elements/ModalPrimitives' import { Box, HStack, VStack } from '../elements/LayoutPrimitives' import { Button } from '../elements/Button' import { StyledText } from '../elements/StyledText' import { useState } from 'react' import { FormInputProps, GeneralFormInput } from '../elements/FormElements' -import { CrossIcon } from '../elements/images/CrossIcon' import { theme } from '../tokens/stitches.config' +import { X } from 'phosphor-react' export interface FormModalProps { inputs?: FormInputProps[] @@ -30,30 +32,10 @@ export function FormModal(props: FormModalProps): JSX.Element { event.preventDefault() props.onOpenChange(false) }} - css={{ overflow: 'auto', p: '0' }} + css={{ overflow: 'auto', px: '24px' }} > - - - {props.title} - - - +
{ @@ -63,36 +45,16 @@ export function FormModal(props: FormModalProps): JSX.Element { }} > {inputs.map((input, index) => ( - - - - {input.label} + + 0 ? '10px' : 'unset' }}> + {input.label} - - + - + ))} - - - +
diff --git a/packages/web/components/patterns/HighlightView.tsx b/packages/web/components/patterns/HighlightView.tsx index e6c5d631d..5ada52dd4 100644 --- a/packages/web/components/patterns/HighlightView.tsx +++ b/packages/web/components/patterns/HighlightView.tsx @@ -16,23 +16,17 @@ export function HighlightView(props: HighlightViewProps): JSX.Element { () => props.highlight.quote.split('\n'), [props.highlight.quote] ) - const annotation = props.highlight.annotation ?? ''; const StyledQuote = styled(Blockquote, { - margin: '0px 24px 16px 24px', + margin: '0px 0px 0px 0px', fontSize: '18px', lineHeight: '27px', - color: '$textDefault', + color: '$utilityTextDefault', cursor: 'pointer', }) return ( - {annotation && ( - - {annotation} - ) - } { if (props.scrollToHighlight) { props.scrollToHighlight(props.highlight.id) diff --git a/packages/web/components/templates/article/FontFamiliesOptions.tsx b/packages/web/components/templates/article/FontFamiliesOptions.tsx index 74d8be422..ab0070916 100644 --- a/packages/web/components/templates/article/FontFamiliesOptions.tsx +++ b/packages/web/components/templates/article/FontFamiliesOptions.tsx @@ -55,7 +55,7 @@ export function FontFamiliesOptions(props: FontFamiliesListProps): JSX.Element { css={{ cursor: 'pointer', py: '4px', width: '100%' }} onClick={() => props.setShowFontFamilies(false)} > - + Choose Font diff --git a/packages/web/components/templates/article/HighlightNoteModal.tsx b/packages/web/components/templates/article/HighlightNoteModal.tsx index 66cf1959c..cece1ecb5 100644 --- a/packages/web/components/templates/article/HighlightNoteModal.tsx +++ b/packages/web/components/templates/article/HighlightNoteModal.tsx @@ -2,6 +2,8 @@ import { ModalRoot, ModalContent, ModalOverlay, + ModalTitleBar, + ModalButtonBar, } from './../../elements/ModalPrimitives' import { Box, HStack, SpanBox, VStack } from '../../elements/LayoutPrimitives' import { Button } from '../../elements/Button' @@ -75,41 +77,22 @@ export function HighlightNoteModal( { event.preventDefault() }} > - - - Notes - - - - + - - - - + diff --git a/packages/web/components/templates/article/HighlightsModal.tsx b/packages/web/components/templates/article/HighlightsModal.tsx index 9f3ffde6c..f8f7569fd 100644 --- a/packages/web/components/templates/article/HighlightsModal.tsx +++ b/packages/web/components/templates/article/HighlightsModal.tsx @@ -2,6 +2,7 @@ import { ModalRoot, ModalOverlay, ModalContent, + ModalTitleBar, } from '../../elements/ModalPrimitives' import { Box, HStack, VStack, Separator, SpanBox } from '../../elements/LayoutPrimitives' import { Button } from '../../elements/Button' @@ -33,29 +34,11 @@ export function HighlightsModal(props: HighlightsModalProps): JSX.Element { event.preventDefault() props.onOpenChange(false) }} - css={{ overflow: 'auto', p: '0' }} + css={{ overflow: 'auto', px: '24px' }} > - - All your highlights and notes - - - + + {props.highlights.map((highlight) => ( {props.highlight.annotation && !isEditing ? ( - {props.highlight.annotation} + {props.highlight.annotation} ) : null} {isEditing ? : } - + {showDeleteConfirmation ? ( { // remove focus from modal ;(document.activeElement as HTMLElement).blur() }} > - - Add a Link - - - - + +
{ event.preventDefault() @@ -119,16 +102,15 @@ export function AddLinkModal(props: AddLinkModalProps): JSX.Element { onChange={(event) => setLink(event.target.value)} css={{ borderRadius: '8px', - border: '1px solid $grayTextContrast', + border: '1px solid $textNonessential', width: '100%', + height: '38px', p: '6px', + mb: '13px', + fontSize: '14px', }} /> - - - +
diff --git a/packages/web/components/tokens/stitches.config.ts b/packages/web/components/tokens/stitches.config.ts index 0e74af7e6..bca8ade05 100644 --- a/packages/web/components/tokens/stitches.config.ts +++ b/packages/web/components/tokens/stitches.config.ts @@ -114,7 +114,10 @@ export const { styled, css, theme, getCssText, globalCss, keyframes, config } = grayBorder: '#F0F0F0', grayTextContrast: '#3A3939', graySolid: '#9C9B9A', + textDefault: 'rgba(255, 255, 255, 0.8)', utilityTextDefault: '#3B3938', + utilityTextSubtle: 'rgba(255, 255, 255, 0.65)', + textNonessential: 'rgba(10, 8, 6, 0.4)', grayBgSubtle: 'hsl(0 0% 97.3%)', grayBgHover: 'hsl(0 0% 93.0%)', @@ -153,8 +156,6 @@ export const { styled, css, theme, getCssText, globalCss, keyframes, config } = tooltipIcons: '#FDFAEC', //utility - textDefault: 'rgba(10, 8, 6, 0.8)', - textSubtle: 'rgba(10, 8, 6, 0.65)', textNonEssential: 'rgba(10, 8, 6, 0.4)', overlay: 'rgba(63, 62, 60, 0.2)', }, @@ -179,7 +180,9 @@ const darkThemeSpec = { grayTextContrast: '#D8D7D7', grayBorder: '#323232', graySolid: '#9C9B9A', + textDefault: 'rgba(10, 8, 6, 0.8)', utilityTextDefault: '#CDCDCD', + textNonessential: 'rgba(97, 97, 97, 1)', grayBgSubtle: 'hsl(0 0% 9.8%)', grayBgHover: 'hsl(0 0% 13.8%)', @@ -205,8 +208,7 @@ const darkThemeSpec = { avatarFont: 'rgba(255, 255, 255, 0.8)', //utility - textDefault: 'rgba(255, 255, 255, 0.8)', - textSubtle: 'rgba(255, 255, 255, 0.65)', + utilityTextSubtle: 'rgba(255, 255, 255, 0.65)', textNonEssential: 'rgba(10, 8, 6, 0.4)', overlay: 'rgba(10, 8, 6, 0.65)', diff --git a/packages/web/lib/networking/queries/useGetApiKeysQuery.tsx b/packages/web/lib/networking/queries/useGetApiKeysQuery.tsx index b13422427..9b3c9e79c 100644 --- a/packages/web/lib/networking/queries/useGetApiKeysQuery.tsx +++ b/packages/web/lib/networking/queries/useGetApiKeysQuery.tsx @@ -49,7 +49,6 @@ export function useGetApiKeysQuery(): ApiKeysQueryResponse { ` const { data, mutate, error, isValidating } = useSWR(query, publicGqlFetcher) - console.log('api keys data', data) try { if (data) {