Merge pull request #617 from smartxworks/fix/improve-style

Fix some style bugs
This commit is contained in:
yz-yu 2022-09-22 19:27:43 +08:00 committed by GitHub
commit 8d42271244
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 17 additions and 29 deletions

View File

@ -32,7 +32,7 @@
"@sunmao-ui/core": "^0.7.3",
"@sunmao-ui/runtime": "^0.7.3",
"@sunmao-ui/shared": "^0.2.3",
"codemirror": "^5.63.3",
"codemirror": "^5.65.9",
"formik": "^2.2.9",
"framer-motion": "^3.10.6",
"immer": "^9.0.6",

View File

@ -151,7 +151,13 @@ export const PopoverWidget = React.forwardRef<
}));
return (
<Popover placement="left" closeOnBlur={false} isOpen={isOpen} onOpen={handleOpen}>
<Popover
isLazy
placement="left"
closeOnBlur={false}
isOpen={isOpen}
onOpen={handleOpen}
>
<PopoverTrigger>
{isObjectChildren && 'trigger' in children ? (
(children as Children).trigger

View File

@ -133,7 +133,7 @@ const DefaultTemplate: React.FC<TemplateProps> = props => {
return (
<FormControl className={FormControlStyle} isRequired={required} id={id}>
{displayLabel && (
<Popover trigger="hover" closeOnBlur placement="left">
<Popover trigger="hover" isLazy closeOnBlur placement="left">
<PopoverTrigger>
<FormLabel display="flex" alignItems="center">
<span className={LabelStyle}>{children.title || label}</span>

View File

@ -50,7 +50,7 @@ export const ColorWidget: React.FC<WidgetProps<ColorWidgetType, string>> = props
onChange={onInputChange}
/>
<InputRightElement>
<Popover arrowSize={8} placement="left" matchWidth>
<Popover isLazy arrowSize={8} placement="left" matchWidth>
<PopoverTrigger>
<Box
cursor="pointer"

View File

@ -48,7 +48,7 @@
"acorn-loose": "^8.3.0",
"acorn-walk": "^8.2.0",
"ajv": "^8.8.2",
"codemirror": "^5.63.3",
"codemirror": "^5.65.9",
"escodegen": "^2.0.0",
"formik": "^2.2.9",
"immer": "^9.0.6",

View File

@ -81,7 +81,7 @@ export const ComponentFilter: React.FC<FilterProps> = ({
};
return (
<Popover closeOnBlur placement="bottom">
<Popover isLazy closeOnBlur placement="bottom">
<PopoverTrigger>
<Button _focus={{ boxShadow: 'none' }} bg="transparent" h="1.75rem" size="sm">
<FilterIcon />

View File

@ -116,6 +116,7 @@ export const StructureTree: React.FC<Props> = props => {
<AutoCompleteInput
value={search}
placeholder="Search component"
autocomplete="off"
size="md"
variant="filled"
marginTop={0}

View File

@ -2718,13 +2718,6 @@
dependencies:
"@emotion/memoize" "^0.8.0"
"@emotion/is-prop-valid@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@emotion/is-prop-valid/-/is-prop-valid-1.2.0.tgz#7f2d35c97891669f7e276eb71c83376a5dc44c83"
integrity sha512-3aDpDprjM0AwaxGE09bOPkNxHpBd+kA6jty3RnaEXdweX1DF1U3VQpPYb0g1IStAuK7SVQ1cy+bNBBKp4W3Fjg==
dependencies:
"@emotion/memoize" "^0.8.0"
"@emotion/memoize@0.7.4":
version "0.7.4"
resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.4.tgz#19bf0f5af19149111c40d98bb0cf82119f5d9eeb"
@ -2798,18 +2791,6 @@
"@emotion/use-insertion-effect-with-fallbacks" "^1.0.0"
"@emotion/utils" "^1.2.0"
"@emotion/styled@^11.6.0":
version "11.10.4"
resolved "https://registry.yarnpkg.com/@emotion/styled/-/styled-11.10.4.tgz#e93f84a4d54003c2acbde178c3f97b421fce1cd4"
integrity sha512-pRl4R8Ez3UXvOPfc2bzIoV8u9P97UedgHS4FPX594ntwEuAMA114wlaHvOK24HB48uqfXiGlYIZYCxVJ1R1ttQ==
dependencies:
"@babel/runtime" "^7.18.3"
"@emotion/babel-plugin" "^11.10.0"
"@emotion/is-prop-valid" "^1.2.0"
"@emotion/serialize" "^1.1.0"
"@emotion/use-insertion-effect-with-fallbacks" "^1.0.0"
"@emotion/utils" "^1.2.0"
"@emotion/unitless@^0.7.5":
version "0.7.5"
resolved "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz"
@ -5580,10 +5561,10 @@ code-point-at@^1.0.0:
resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz"
integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=
codemirror@^5.63.3:
version "5.63.3"
resolved "https://registry.npmjs.org/codemirror/-/codemirror-5.63.3.tgz"
integrity sha512-1C+LELr+5grgJYqwZKqxrcbPsHFHapVaVAloBsFBASbpLnQqLw1U8yXJ3gT5D+rhxIiSpo+kTqN+hQ+9ialIXw==
codemirror@^5.65.9:
version "5.65.9"
resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.9.tgz#ec70c92aa206ee4c9853d5f1e7c4ed356cdab68c"
integrity sha512-19Jox5sAKpusTDgqgKB5dawPpQcY+ipQK7xoEI+MVucEF9qqFaXpeqY1KaoyGBso/wHQoDa4HMMxMjdsS3Zzzw==
collect-v8-coverage@^1.0.0:
version "1.0.1"