diff --git a/.dumi/scripts/clarity.js b/.dumi/scripts/clarity.js new file mode 100644 index 0000000000..b36cab890a --- /dev/null +++ b/.dumi/scripts/clarity.js @@ -0,0 +1,14 @@ +/* eslint-disable */ +// https://clarity.microsoft.com +(function (c, l, a, r, i, t, y) { + c[a] = + c[a] || + function () { + (c[a].q = c[a].q || []).push(arguments); + }; + t = l.createElement(r); + t.async = 1; + t.src = 'https://www.clarity.ms/tag/' + i; + y = l.getElementsByTagName(r)[0]; + y.parentNode.insertBefore(t, y); +})(window, document, 'clarity', 'script', 'lyia7jfwui'); diff --git a/.dumi/mirror-modal.js b/.dumi/scripts/mirror-modal.js similarity index 100% rename from .dumi/mirror-modal.js rename to .dumi/scripts/mirror-modal.js diff --git a/.dumi/theme/builtins/ComponentMeta/index.tsx b/.dumi/theme/builtins/ComponentMeta/index.tsx index f1d9759997..7b891497b0 100644 --- a/.dumi/theme/builtins/ComponentMeta/index.tsx +++ b/.dumi/theme/builtins/ComponentMeta/index.tsx @@ -139,7 +139,7 @@ const ComponentMeta: React.FC = (props) => { colon={false} column={1} style={{ marginTop: token.margin }} - labelStyle={{ paddingInlineEnd: token.padding, width: 54 }} + labelStyle={{ paddingInlineEnd: token.padding, width: 56 }} items={ [ { diff --git a/.dumirc.ts b/.dumirc.ts index e96945a97c..a19b41b59c 100644 --- a/.dumirc.ts +++ b/.dumirc.ts @@ -171,7 +171,13 @@ export default defineConfig({ scripts: [ { async: true, - content: fs.readFileSync(path.join(__dirname, '.dumi', 'mirror-modal.js')).toString(), + content: fs + .readFileSync(path.join(__dirname, '.dumi', 'scripts', 'mirror-modal.js')) + .toString(), + }, + { + async: true, + content: fs.readFileSync(path.join(__dirname, '.dumi', 'scripts', 'clarity.js')).toString(), }, ], }); diff --git a/components/_util/ActionButton.tsx b/components/_util/ActionButton.tsx index b0dd28c11f..db0ba99774 100644 --- a/components/_util/ActionButton.tsx +++ b/components/_util/ActionButton.tsx @@ -111,7 +111,7 @@ const ActionButton: React.FC = (props) => { clickedRef.current = false; } else { returnValueOfOnOk = actionFn(); - if (!returnValueOfOnOk) { + if (!isThenable(returnValueOfOnOk)) { onInternalClose(); return; } diff --git a/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap index ebe3c3c045..7986e72923 100644 --- a/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/carousel/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -12,9 +12,7 @@ Array [