Commit 9b66ff8a authored by tom's avatar tom

fixes for select, color-mode, navigation

parent 76ef8386
...@@ -15,9 +15,9 @@ export function ColorModeProvider(props: ColorModeProviderProps) { ...@@ -15,9 +15,9 @@ export function ColorModeProvider(props: ColorModeProviderProps) {
<ThemeProvider <ThemeProvider
attribute="class" attribute="class"
scriptProps={{ 'data-cfasync': 'false' }} scriptProps={{ 'data-cfasync': 'false' }}
enableSystem={ false }
defaultTheme={ config.UI.colorTheme.default?.colorMode } defaultTheme={ config.UI.colorTheme.default?.colorMode }
disableTransitionOnChange { ...props } disableTransitionOnChange
{ ...props }
/> />
); );
} }
......
...@@ -200,7 +200,7 @@ export const SelectRoot = React.forwardRef< ...@@ -200,7 +200,7 @@ export const SelectRoot = React.forwardRef<
lazyMount={ lazyMount } lazyMount={ lazyMount }
unmountOnExit={ unmountOnExit } unmountOnExit={ unmountOnExit }
{ ...rest } { ...rest }
positioning={{ sameWidth: true, ...props.positioning, offset: { mainAxis: 4, ...props.positioning?.offset } }} positioning={{ sameWidth: false, ...props.positioning, offset: { mainAxis: 4, ...props.positioning?.offset } }}
> >
{ props.asChild ? ( { props.asChild ? (
props.children props.children
......
...@@ -196,6 +196,10 @@ export const recipe = defineSlotRecipe({ ...@@ -196,6 +196,10 @@ export const recipe = defineSlotRecipe({
}, },
}, },
}, },
plain: {
trigger: {},
indicatorGroup: {},
},
}, },
size: { size: {
...@@ -257,6 +261,9 @@ export const recipe = defineSlotRecipe({ ...@@ -257,6 +261,9 @@ export const recipe = defineSlotRecipe({
trigger: { trigger: {
_placeholderShown: { _placeholderShown: {
color: 'select.trigger.outline.fg', color: 'select.trigger.outline.fg',
_hover: {
color: 'select.trigger.outline.fg',
},
}, },
}, },
}, },
......
...@@ -26,7 +26,8 @@ const PopoverFilterRadio = ({ name, hasActiveFilter, collection, isLoading, onCh ...@@ -26,7 +26,8 @@ const PopoverFilterRadio = ({ name, hasActiveFilter, collection, isLoading, onCh
collection={ collection } collection={ collection }
defaultValue={ initialValue ? [ initialValue ] : [ collection.items[0].value ] } defaultValue={ initialValue ? [ initialValue ] : [ collection.items[0].value ] }
onValueChange={ handleValueChange } onValueChange={ handleValueChange }
positioning={{ sameWidth: false }} w="fit-content"
variant="plain"
> >
<SelectControl <SelectControl
triggerProps={{ asChild: true, px: { base: 1, lg: 2 } }} triggerProps={{ asChild: true, px: { base: 1, lg: 2 } }}
......
...@@ -49,6 +49,7 @@ const FormFieldSelect = < ...@@ -49,6 +49,7 @@ const FormFieldSelect = <
invalid={ Boolean(fieldState.error) } invalid={ Boolean(fieldState.error) }
errorText={ getFieldErrorText(fieldState.error) } errorText={ getFieldErrorText(fieldState.error) }
size={ size } size={ size }
positioning={{ sameWidth: true }}
{ ...rest } { ...rest }
/> />
); );
......
...@@ -49,6 +49,7 @@ const FormFieldSelectAsync = < ...@@ -49,6 +49,7 @@ const FormFieldSelectAsync = <
invalid={ Boolean(fieldState.error) } invalid={ Boolean(fieldState.error) }
errorText={ getFieldErrorText(fieldState.error) } errorText={ getFieldErrorText(fieldState.error) }
size={ size } size={ size }
positioning={{ sameWidth: true }}
{ ...rest } { ...rest }
/> />
); );
......
...@@ -33,8 +33,9 @@ const Sort = (props: Props) => { ...@@ -33,8 +33,9 @@ const Sort = (props: Props) => {
return ( return (
<SelectControl <SelectControl
triggerProps={{ borderColor: 'transparent' }}
loading={ isLoading } loading={ isLoading }
_hover={{ color: 'link.primary.hover' }}
_open={{ color: 'link.primary.hover' }}
> >
<chakra.span <chakra.span
flexShrink={ 0 } flexShrink={ 0 }
...@@ -55,7 +56,7 @@ const Sort = (props: Props) => { ...@@ -55,7 +56,7 @@ const Sort = (props: Props) => {
})(); })();
return ( return (
<SelectRoot collection={ collection } positioning={{ sameWidth: false }} { ...rest }> <SelectRoot collection={ collection } w="fit-content" variant="plain" { ...rest }>
{ trigger } { trigger }
<SelectContent> <SelectContent>
{ collection.items.map((item) => ( { collection.items.map((item) => (
......
...@@ -90,7 +90,7 @@ const StatsWidget = ({ ...@@ -90,7 +90,7 @@ const StatsWidget = ({
display="flex" display="flex"
alignItems="baseline" alignItems="baseline"
fontWeight={ 500 } fontWeight={ 500 }
textStyle="lg" textStyle="heading.md"
> >
{ valuePrefix && <chakra.span whiteSpace="pre">{ valuePrefix }</chakra.span> } { valuePrefix && <chakra.span whiteSpace="pre">{ valuePrefix }</chakra.span> }
{ typeof value === 'string' ? ( { typeof value === 'string' ? (
......
...@@ -68,6 +68,7 @@ const NavLinkGroup = ({ item, isCollapsed }: Props) => { ...@@ -68,6 +68,7 @@ const NavLinkGroup = ({ item, isCollapsed }: Props) => {
pr={{ lg: isExpanded ? 0 : '15px', xl: isCollapsed ? '15px' : 0 }} pr={{ lg: isExpanded ? 0 : '15px', xl: isCollapsed ? '15px' : 0 }}
aria-label={ `${ item.text } link group` } aria-label={ `${ item.text } link group` }
position="relative" position="relative"
color={ item.isActive ? 'link.navigation.fg.selected' : 'link.navigation.fg' }
bgColor={ item.isActive ? 'link.navigation.bg.selected' : 'link.navigation.bg' } bgColor={ item.isActive ? 'link.navigation.bg.selected' : 'link.navigation.bg' }
> >
<HStack gap={ 0 } overflow="hidden"> <HStack gap={ 0 } overflow="hidden">
......
...@@ -29,7 +29,7 @@ const NetworkMenuButton = ({ isActive, onClick, className, ...rest }: Props, ref ...@@ -29,7 +29,7 @@ const NetworkMenuButton = ({ isActive, onClick, className, ...rest }: Props, ref
name="networks" name="networks"
boxSize={ 4 } boxSize={ 4 }
color={ isActive ? { _light: 'blue.700', _dark: 'blue.50' } : { _light: 'gray.600', _dark: 'gray.400' } } color={ isActive ? { _light: 'blue.700', _dark: 'blue.50' } : { _light: 'gray.600', _dark: 'gray.400' } }
_hover={{ color: 'link.hovered' }} _hover={{ color: 'link.primary.hover' }}
cursor="pointer" cursor="pointer"
/> />
</IconButton> </IconButton>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment