diff --git a/docs/app/components/Buttons/NavButton.css.ts b/docs/app/components/Buttons/NavButton.css.ts
index 97cff24ec1..954d90f68f 100644
--- a/docs/app/components/Buttons/NavButton.css.ts
+++ b/docs/app/components/Buttons/NavButton.css.ts
@@ -74,7 +74,7 @@ export const navAnchor = recipe({
variants: {
active: {
true: {
- background: '$redYellowGradient100',
+ background: vars.colors.redYellowGradient100,
},
false: {
backgroundColor: '$white',
diff --git a/docs/app/components/Header/Header.css.ts b/docs/app/components/Header/Header.css.ts
index cee102903f..9d0a4bebe1 100644
--- a/docs/app/components/Header/Header.css.ts
+++ b/docs/app/components/Header/Header.css.ts
@@ -10,6 +10,7 @@ export const desktopHeight = createVar()
export const header = style({
width: '100%',
paddingTop: vars.space['15'],
+ paddingBottom: vars.space['15'],
zIndex: vars.zIndices['1'],
'@media': {
@@ -19,6 +20,17 @@ export const header = style({
[`screen and ${BREAKPOINTS.tabletUp}`]: {
paddingTop: vars.space['25'],
+ paddingBottom: vars.space['25'],
+ },
+ },
+})
+
+export const headerSpacing = style({
+ height: mobileHeight,
+
+ '@media': {
+ [`screen and ${BREAKPOINTS.tabletUp}`]: {
+ height: desktopHeight,
},
},
})
diff --git a/docs/app/components/Header/Header.tsx b/docs/app/components/Header/Header.tsx
index c27e469c61..b099e9d1f0 100644
--- a/docs/app/components/Header/Header.tsx
+++ b/docs/app/components/Header/Header.tsx
@@ -27,6 +27,7 @@ import {
headerScrolledDown,
headerTransparentBackground,
headerAddMarginToMain,
+ headerSpacing,
} from './Header.css'
import clsx from 'clsx'
@@ -43,7 +44,7 @@ interface HeaderProps {
}
export const getHeaderHeights = (): [desktop: number, mobile: number] => [
- 89, 63,
+ 114, 78,
]
export const Header = ({
@@ -72,41 +73,54 @@ export const Header = ({
const [desktopHeight, mobileHeight] = headerHeights
return (
- 0 || (scrollTop > 20 && direction === 'up')) &&
- headerScrolledDown,
- transparentBackground && headerTransparentBackground,
- addMarginToMain && headerAddMarginToMain,
- className
+ <>
+ {isStuck && (
+
)}
- style={{
- ...styles,
- position,
- ...assignInlineVars({
- [mobileHeightVar]: `${mobileHeight}px`,
- [desktopHeightVar]: `${desktopHeight}px`,
- }),
- }}
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
+ 0 || (scrollTop > 20 && direction === 'up')) &&
+ headerScrolledDown,
+ transparentBackground && headerTransparentBackground,
+ addMarginToMain && headerAddMarginToMain,
+ className
+ )}
+ style={{
+ ...styles,
+ position,
+ ...assignInlineVars({
+ [mobileHeightVar]: `${mobileHeight}px`,
+ [desktopHeightVar]: `${desktopHeight}px`,
+ }),
+ }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
)
}
diff --git a/docs/app/components/Select.css.ts b/docs/app/components/Select.css.ts
new file mode 100644
index 0000000000..f7ee4886d9
--- /dev/null
+++ b/docs/app/components/Select.css.ts
@@ -0,0 +1,83 @@
+import { style } from '@vanilla-extract/css'
+import { vars } from '../styles/theme-contract.css'
+import { BREAKPOINTS } from '../styles/breakpoints.css'
+import { darkThemeClass } from '../styles/dark-theme.css'
+import { recipe } from '@vanilla-extract/recipes'
+
+export const controlDiv = recipe({
+ base: {
+ background: 'transparent',
+ fontWeight: vars.fontWeights.default,
+ cursor: 'pointer',
+ },
+ variants: {
+ isFocused: {
+ true: {
+ borderBottom: `solid 2px ${vars.colors.red100}`,
+ },
+ false: {
+ borderBottom: `solid 2px ${vars.colors.black}`,
+ },
+ },
+ },
+})
+
+export const placeholderSpan = style({
+ fontSize: vars.fontSizes.XXS,
+ lineHeight: vars.lineHeights.XXS,
+
+ '@media': {
+ [`screen and ${BREAKPOINTS.tabletUp}`]: {
+ fontSize: vars.fontSizes.XS,
+ lineHeight: vars.lineHeights.XS,
+ },
+ },
+})
+
+export const menuBackground = style({
+ backgroundColor: vars.colors.white,
+ opacity: 0.2,
+ position: 'absolute',
+ inset: 0,
+ zIndex: vars.zIndices['1'],
+})
+
+export const menu = style({
+ position: 'absolute',
+ zIndex: vars.zIndices['2'],
+ background: vars.colors.codeBackground,
+ color: vars.colors.black,
+ fontSize: vars.fontSizes.XXS,
+ lineHeight: vars.lineHeights.XXS,
+ overflow: 'hidden',
+ boxShadow:
+ 'rgba(27,31,36,0.12) 0px 1px 3px, rgba(66,74,83,0.12) 0px 8px 24px',
+ width: '100%',
+ borderTopRightRadius: vars.radii.r8,
+ borderTopLeftRadius: vars.radii.r8,
+ bottom: 0,
+ left: 0,
+
+ [`${darkThemeClass} &`]: {
+ boxShadow:
+ 'rgba(27,31,36,0.5) 0px 1px 3px, rgba(18 21 23 / 40%) 0px 8px 24px',
+ },
+
+ '@media': {
+ [`screen and ${BREAKPOINTS.tabletUp}`]: {
+ bottom: 'unset',
+ borderRadius: vars.radii.r8,
+ width: 200,
+ fontSize: vars.fontSizes.XS,
+ lineHeight: vars.lineHeights.XS,
+ },
+ },
+})
+
+export const option = style({
+ cursor: 'pointer',
+ display: 'flex',
+ justifyContent: 'space-between',
+ alignItems: 'center',
+ padding: `${vars.space['10']} ${vars.space['40']} ${vars.space['10']} ${vars.space['20']}`,
+})
diff --git a/docs-old/app/components/Select.tsx b/docs/app/components/Select.tsx
similarity index 66%
rename from docs-old/app/components/Select.tsx
rename to docs/app/components/Select.tsx
index b9de88f251..2e50604e01 100644
--- a/docs-old/app/components/Select.tsx
+++ b/docs/app/components/Select.tsx
@@ -6,8 +6,13 @@ import ReactSelect, {
MultiValue,
OptionProps,
} from 'react-select'
-
-import { dark, styled } from '~/styles/stitches.config'
+import {
+ controlDiv,
+ menu,
+ menuBackground,
+ option,
+ placeholderSpan,
+} from './Select.css'
export interface SelectProps {
options?: { value: string; label: string }[]
@@ -58,7 +63,6 @@ export const Select = ({
container: () => ({
display: 'inline-block',
margin: '0 6px',
-
'@media(min-width: 768px)': {
position: 'relative',
},
@@ -73,41 +77,25 @@ const SelectControl = (props: ControlProps) => {
const { children, isFocused, innerRef, innerProps } = props
return (
-
{children}
-
+
)
}
-const ControlDiv = styled('div', {
- background: 'transparent',
- fontWeight: '$default',
- cursor: 'pointer',
-})
-
const SelectPlaceholder = ({
children,
}: Pick) => (
- {children}
+ {children}
)
-const PlaceholderSpan = styled('span', {
- fontSize: '$XXS',
- lineHeight: '$XXS',
-
- '@tabletUp': {
- fontSize: '$XS',
- lineHeight: '$XS',
- },
-})
-
const SelectValueContainer = ({
children,
placeholder,
@@ -116,78 +104,39 @@ const SelectValueContainer = ({
if (placeholderChild.key !== 'placeholder') {
return (
-
+
{placeholder}
{menu}
-
+
)
}
- return {children}
+ return {children}
}
-const ValueContainerDiv = styled('div', {})
-
const SelectMenu = (props: MenuProps) => {
const { children, innerRef, innerProps } = props
return (
<>
-
+
{/* @ts-ignore */}
-