diff --git a/src/chakra-components/control.tsx b/src/chakra-components/control.tsx index 13540db..a647a8f 100644 --- a/src/chakra-components/control.tsx +++ b/src/chakra-components/control.tsx @@ -98,7 +98,7 @@ const Control = < data-focus-visible={isFocused ? true : undefined} data-invalid={isInvalid ? true : undefined} data-disabled={isDisabled ? true : undefined} - aria-readonly={isReadOnly ? true : undefined} + data-readonly={isReadOnly ? true : undefined} > {children} diff --git a/src/chakra-components/input.tsx b/src/chakra-components/input.tsx index d027ba8..14b1822 100644 --- a/src/chakra-components/input.tsx +++ b/src/chakra-components/input.tsx @@ -16,7 +16,7 @@ const Input = < className, cx, value, - selectProps: { chakraStyles, isReadOnly, isRequired }, + selectProps: { chakraStyles, isReadOnly }, } = props; const { innerRef, isDisabled, isHidden, inputClassName, ...innerProps } = cleanCommonProps(props); @@ -76,8 +76,6 @@ const Input = < sx={inputSx} disabled={isDisabled} readOnly={isReadOnly ? true : undefined} - aria-readonly={isReadOnly ? true : undefined} - aria-required={isRequired ? true : undefined} {...innerProps} /> diff --git a/src/chakra-components/menu.tsx b/src/chakra-components/menu.tsx index 86659e3..a2c53d8 100644 --- a/src/chakra-components/menu.tsx +++ b/src/chakra-components/menu.tsx @@ -118,6 +118,7 @@ export const MenuList = < return ( @@ -374,14 +378,18 @@ export const Option = < }, } = props; - const size = useSize(sizeProp); - const menuItemStyles: ThemeObject = useMultiStyleConfig("Menu").item; - const paddings: SizeProps = { - sm: "0.3rem 0.6rem", - md: "0.4rem 0.8rem", - lg: "0.5rem 1rem", + const size = useSize(sizeProp); + const horizontalPaddingOptions: SizeProps = { + sm: "0.6rem", + md: "0.8rem", + lg: "1rem", + }; + const verticalPaddingOptions: SizeProps = { + sm: "0.3rem", + md: "0.4rem", + lg: "0.5rem", }; /** @@ -410,25 +418,24 @@ export const Option = < width: "100%", textAlign: "start", fontSize: size, - padding: paddings[size], - ...(isFocused && menuItemStyles._focus), + paddingX: horizontalPaddingOptions[size], + paddingY: verticalPaddingOptions[size], ...(shouldHighlight && { - bg: selectedBg, - color: selectedColor, - _active: { bg: selectedBg }, + _selected: { + bg: selectedBg, + color: selectedColor, + _active: { bg: selectedBg }, + }, }), - ...(isDisabled && menuItemStyles._disabled), - ...(isDisabled && { _active: {} }), }; const sx = chakraStyles?.option ? chakraStyles.option(initialSx, props) : initialSx; - return ( {showCheckIcon && (