diff --git a/src/common-elements/fields-layout.ts b/src/common-elements/fields-layout.ts index 9e7fce0b..2c5c4dcc 100644 --- a/src/common-elements/fields-layout.ts +++ b/src/common-elements/fields-layout.ts @@ -9,10 +9,10 @@ export const PropertiesTableCaption = styled.caption` `; export const PropertyCell = styled.td<{ kind?: string }>` - border-left: 1px solid ${props => props.theme.schema.linesColor}; + border-left: 1px dashed ${props => props.theme.schema.linesColor}; box-sizing: border-box; position: relative; - padding: 10px 10px 10px 0; + padding: 10px; ${media.lessThan('small')` display: block; @@ -28,23 +28,29 @@ export const PropertyCell = styled.td<{ kind?: string }>` } tr:first-of-type > & { - background-image: linear-gradient( - to bottom, - transparent 0%, - transparent 22px, - ${props => props.theme.schema.linesColor} 22px, - ${props => props.theme.schema.linesColor} 100% + background-image: repeating-linear-gradient( + 0deg, + ${props => props.theme.schema.linesColor}, + ${props => props.theme.schema.linesColor} 3px, + transparent 3px, + transparent 5px, + ${props => props.theme.schema.linesColor} 5px ); + background-position: 0 10px; + padding-top: 0; } tr.last > & { - background-image: linear-gradient( - to bottom, - ${props => props.theme.schema.linesColor} 0%, - ${props => props.theme.schema.linesColor} 22px, - transparent 22px, - transparent 100% + background-image: repeating-linear-gradient( + 0deg, + ${props => props.theme.schema.linesColor}, + ${props => props.theme.schema.linesColor} 3px, + transparent 3px, + transparent 5px, + ${props => props.theme.schema.linesColor} 5px ); + background-size: 1px 22px; + padding-bottom: 0; } tr.last + tr > & { @@ -97,7 +103,7 @@ export const PropertyNameCell = styled(PropertyCell)` `; export const PropertyDetailsCell = styled.td` - border-bottom: 1px solid #9fb4be; + border-bottom: 1px solid rgb(228, 231, 235); padding: 10px 0; width: ${props => props.theme.schema.defaultDetailsWidth}; box-sizing: border-box; @@ -109,12 +115,15 @@ export const PropertyDetailsCell = styled.td` ${media.lessThan('small')` padding: 0 20px; border-bottom: none; - border-left: 1px solid ${props => props.theme.schema.linesColor}; + border-left: 1px dashed ${props => props.theme.schema.linesColor}; tr.last > & { border-left: none; } `} + tr:first-of-type > & { + padding-top: 0; + } ${extensionsHook('PropertyDetailsCell')}; `; diff --git a/src/common-elements/fields.ts b/src/common-elements/fields.ts index 23ab5a81..a5c378ee 100644 --- a/src/common-elements/fields.ts +++ b/src/common-elements/fields.ts @@ -75,7 +75,6 @@ export const RequiredLabel = styled(FieldLabel).attrs({ color: ${props => props.theme.schema.requireLabelColor}; font-size: ${props => props.theme.schema.labelsTextSize}; font-weight: normal; - margin-left: 20px; line-height: 1; `; diff --git a/src/common-elements/headers.ts b/src/common-elements/headers.ts index e5be1649..607019a3 100644 --- a/src/common-elements/headers.ts +++ b/src/common-elements/headers.ts @@ -35,17 +35,19 @@ export const H3 = styled.h2` ${extensionsHook('H3')}; `; -export const RightPanelHeader = styled.h3` - color: ${({ theme }) => theme.rightPanel.textColor}; - +export const RightPanelHeader = styled.div` + color: #ffffff; + padding: 10px; + font-weight: 700; + border-radius: 4px 4px 0 0; + background: rgb(50, 63, 75); ${extensionsHook('RightPanelHeader')}; `; export const UnderlinedHeader = styled.h5` - border-bottom: 1px solid rgba(38, 50, 56, 0.3); margin: 1em 0 1em 0; - color: rgba(38, 50, 56, 0.5); - font-weight: normal; + color: rgb(96, 106, 119); + font-weight: bold; text-transform: uppercase; font-size: 0.929em; line-height: 20px; diff --git a/src/common-elements/panels.ts b/src/common-elements/panels.ts index cacdb685..582426da 100644 --- a/src/common-elements/panels.ts +++ b/src/common-elements/panels.ts @@ -41,7 +41,6 @@ export const Section = styled.div.attrs(props => ({ width: 100%; display: block; content: ''; - border-bottom: 1px solid rgba(0, 0, 0, 0.2); } `) || ''} diff --git a/src/common-elements/samples.tsx b/src/common-elements/samples.tsx index ce4a9632..0d3858ae 100644 --- a/src/common-elements/samples.tsx +++ b/src/common-elements/samples.tsx @@ -39,6 +39,9 @@ export const StyledPre = styled(PrismDiv).attrs({ font-size: ${props => props.theme.typography.code.fontSize}; overflow-x: auto; margin: 0; - + padding: 10px; + border-radius: 4px; + background-color: rgb(50, 63, 75); + contain: content; white-space: ${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')}; `; diff --git a/src/common-elements/tabs.ts b/src/common-elements/tabs.ts index fe41e34f..e33907da 100644 --- a/src/common-elements/tabs.ts +++ b/src/common-elements/tabs.ts @@ -6,70 +6,59 @@ import styled from '../styled-components'; export { Tab, TabList, TabPanel } from 'react-tabs'; export const Tabs = styled(ReactTabs)` + padding: 10px 20px 20px; + color: rgb(245, 247, 250); + border-radius: 0 0 4px 4px; + background-color: rgb(82, 96, 109); + > ul { list-style: none; padding: 0; - margin: 0; - margin: 0 -5px; - + margin: 0 0 10px; + border-bottom: 4px solid rgb(97, 110, 124); > li { padding: 5px 10px; display: inline-block; - background-color: ${({ theme }) => theme.codeBlock.backgroundColor}; - border-bottom: 1px solid rgba(0, 0, 0, 0.5); + background-color: rgb(82, 96, 109); cursor: pointer; text-align: center; outline: none; color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)}; - margin: 0 - ${({ theme }) => `${theme.spacing.unit}px ${theme.spacing.unit}px ${theme.spacing.unit}px`}; - border: 1px solid ${({ theme }) => darken(0.05, theme.codeBlock.backgroundColor)}; - border-radius: 5px; min-width: 60px; font-size: 0.9em; font-weight: bold; &.react-tabs__tab--selected { - color: ${props => props.theme.colors.text.primary}; - background: ${({ theme }) => theme.rightPanel.textColor}; - &:focus { - outline: auto; - } + color: white; + background: rgb(50, 63, 75); + border-bottom: 4px solid rgb(89, 195, 255); + margin-bottom: -4px; } &:only-child { flex: none; min-width: 100px; } + } - &.tab-success { - color: ${props => props.theme.colors.responses.success.tabTextColor}; - } + > li:first-of-type { + border-top-left-radius: 4px; + } - &.tab-redirect { - color: ${props => props.theme.colors.responses.redirect.tabTextColor}; - } - - &.tab-info { - color: ${props => props.theme.colors.responses.info.tabTextColor}; - } - - &.tab-error { - color: ${props => props.theme.colors.responses.error.tabTextColor}; - } + > li:last-of-type { + border-top-right-radius: 4px; } } > .react-tabs__tab-panel { background: ${({ theme }) => theme.codeBlock.backgroundColor}; & > div, & > pre { - padding: ${props => props.theme.spacing.unit * 4}px; - margin: 0; + margin-top: 10px; } & > div > pre { - padding: 0; + padding: 10px; } } `; @@ -101,7 +90,7 @@ export const SmallTabs = styled(Tabs)` > .react-tabs__tab-panel { & > div, & > pre { - padding: ${props => props.theme.spacing.unit * 2}px 0; + padding: ${props => props.theme.spacing.unit * 2}px 10px; } } `; diff --git a/src/components/Endpoint/styled.elements.ts b/src/components/Endpoint/styled.elements.ts index 01fbd4ae..2acdb814 100644 --- a/src/components/Endpoint/styled.elements.ts +++ b/src/components/Endpoint/styled.elements.ts @@ -3,7 +3,7 @@ import styled from '../../styled-components'; export const OperationEndpointWrap = styled.div` cursor: pointer; position: relative; - margin-bottom: 5px; + margin-bottom: 10px; `; export const ServerRelativeURL = styled.span` @@ -21,9 +21,8 @@ export const EndpointInfo = styled.button<{ $expanded?: boolean; $inverted?: boo text-align: left; cursor: pointer; padding: 10px 30px 10px ${props => (props.$inverted ? '10px' : '20px')}; - border-radius: ${props => (props.$inverted ? '0' : '4px 4px 0 0')}; - background-color: ${props => - props.$inverted ? 'transparent' : props.theme.codeBlock.backgroundColor}; + border-radius: ${props => (props.$inverted ? '0' : '4px')}; + background-color: rgb(50, 63, 75); display: flex; white-space: nowrap; align-items: center; @@ -54,6 +53,7 @@ export const HttpVerb = styled.span.attrs((props: { type: string; $compact?: boo text-transform: uppercase; font-family: ${props => props.theme.typography.headings.fontFamily}; margin: 0; + border-radius: 16px; `; export const ServersOverlay = styled.div<{ $expanded: boolean }>` diff --git a/src/components/Fields/Field.tsx b/src/components/Fields/Field.tsx index d142c9a5..d953b958 100644 --- a/src/components/Fields/Field.tsx +++ b/src/components/Fields/Field.tsx @@ -9,7 +9,6 @@ import { import { FieldDetails } from './FieldDetails'; import { InnerPropertiesWrap, - PropertyBullet, PropertyCellWithInner, PropertyDetailsCell, PropertyNameCell, @@ -69,7 +68,6 @@ export class Field extends React.Component { kind={kind} title={name} > - ); } diff --git a/src/components/Responses/styled.elements.ts b/src/components/Responses/styled.elements.ts index 65a3c9cc..9cebc6e6 100644 --- a/src/components/Responses/styled.elements.ts +++ b/src/components/Responses/styled.elements.ts @@ -3,17 +3,20 @@ import styled from '../../styled-components'; import { ResponseTitle } from './ResponseTitle'; export const StyledResponseTitle = styled(ResponseTitle)` - display: block; - border: 0; + display: flex; + font-size: 14px; + justify-content: space-between; + align-items: center; + white-space: normal; width: 100%; text-align: left; - padding: 10px; - border-radius: 2px; - margin-bottom: 4px; + padding: 10px 20px; + border-radius: 4px; + margin-bottom: 10px; line-height: 1.5em; cursor: pointer; + border: 1px solid ${props => props.theme.colors.responses[props.type].color}; - color: ${props => props.theme.colors.responses[props.type].color}; background-color: ${props => props.theme.colors.responses[props.type].backgroundColor}; &:focus { outline: auto ${props => props.theme.colors.responses[props.type].color}; @@ -38,7 +41,7 @@ cursor: default; `; export const ResponseDetailsWrap = styled.div` - padding: 10px; + padding: 5px 10px 25px; `; export const HeadersCaption = styled(UnderlinedHeader).attrs({ @@ -52,3 +55,8 @@ export const HeadersCaption = styled(UnderlinedHeader).attrs({ export const Code = styled.strong` vertical-align: top; `; +export const ResponseTitleWrap = styled.div` + display: flex; + gap: 5px; + align-items: baseline; +`; diff --git a/src/components/SecurityRequirement/styled.elements.ts b/src/components/SecurityRequirement/styled.elements.ts index 9c501df2..10771db6 100644 --- a/src/components/SecurityRequirement/styled.elements.ts +++ b/src/components/SecurityRequirement/styled.elements.ts @@ -102,6 +102,8 @@ export const Wrap = styled.div<{ $expanded?: boolean }>` width: 100%; display: flex; margin: 1em 0; + padding-bottom: 1em; + border-bottom: 1px solid rgb(228, 231, 235); flex-direction: ${p => (p.$expanded ? 'column' : 'row')}; ${media.lessThan('small')` flex-direction: column; diff --git a/src/components/SideMenu/SideMenu.tsx b/src/components/SideMenu/SideMenu.tsx index 58dd34c5..3750d34c 100644 --- a/src/components/SideMenu/SideMenu.tsx +++ b/src/components/SideMenu/SideMenu.tsx @@ -8,7 +8,6 @@ import { MenuItems } from './MenuItems'; import { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar'; import { RedocAttribution } from './styled.elements'; -import RedoclyLogo from './Logo'; @observer export class SideMenu extends React.Component<{ menu: MenuStore; className?: string }> { @@ -28,7 +27,6 @@ export class SideMenu extends React.Component<{ menu: MenuStore; className?: str - API docs by Redocly diff --git a/src/components/SideMenu/styled.elements.ts b/src/components/SideMenu/styled.elements.ts index 0caf809e..7b0a9622 100644 --- a/src/components/SideMenu/styled.elements.ts +++ b/src/components/SideMenu/styled.elements.ts @@ -183,7 +183,7 @@ export const RedocAttribution = styled.div` position: fixed; width: ${theme.sidebar.width}; bottom: 0; - background: ${theme.sidebar.backgroundColor}; + opacity: 0.5; a, a:visited,