ant-design/ab3a4b16-async.e51f2f99.js
2024-11-20 18:30:54 +00:00

1 line
30 KiB
JavaScript

(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["ab3a4b16"],{ab3a4b16:function(e,t,r){"use strict";r.d(t,"__esModule",{value:!0}),r.d(t,"default",{enumerable:!0,get:function(){return u;}});var s=r("777fffbe"),i=r("f19d2b93"),n=s._(r("b622e337")),o=s._(r("67074e5d")),c=s._(r("84b131b4")),a=s._(r("97c488ea")),p=s._(r("c96b0d01")),l=r("5b220c3d"),d=r("9c86e52a");function m(){let{texts:e}=(0,d.useRouteMeta)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"markdown",children:[(0,i.jsxs)("h2",{id:"when-to-use",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#when-to-use",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"When To Use"]}),(0,i.jsx)("p",{children:e[0].value}),(0,i.jsx)("p",{children:e[1].value}),(0,i.jsxs)("blockquote",{children:[(0,i.jsx)("p",{children:e[2].value}),(0,i.jsxs)("p",{children:[e[3].value,(0,i.jsx)("code",{children:e[4].value}),e[5].value,(0,i.jsx)("code",{children:e[6].value}),e[7].value]})]}),(0,i.jsxs)("h2",{id:"examples",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#examples",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"Examples"]})]}),(0,i.jsx)(c.default,{items:[{demo:{id:"affix-demo-basic"},previewerProps:{title:"Basic",filename:"components/affix/demo/basic.tsx",pkgDependencyList:{"@ant-design/compatible":"^5.1.3","@ant-design/happy-work-theme":"^1.0.0","@ant-design/tools":"^18.0.2","@antfu/eslint-config":"^3.8.0","@antv/g6":"^4.8.24","@biomejs/biome":"^1.9.4","@codecov/webpack-plugin":"^1.2.1","@codesandbox/sandpack-react":"^2.19.9","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@emotion/css":"^11.13.4","@emotion/react":"^11.13.3","@emotion/server":"^11.11.0","@eslint-react/eslint-plugin":"^1.15.0","@ianvs/prettier-plugin-sort-imports":"^4.3.1","@inquirer/prompts":"^7.0.0","@madccc/duplicate-package-checker-webpack-plugin":"^1.0.0","@microflash/rehype-figure":"^2.1.1","@npmcli/run-script":"^9.0.1","@octokit/rest":"^21.0.2","@qixian.cs/github-contributors-list":"^2.0.2","@size-limit/file":"^11.1.6","@stackblitz/sdk":"^1.11.0","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.2","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@types/adm-zip":"^0.5.5","@types/ali-oss":"^6.16.11","@types/cli-progress":"^3.11.6","@types/fs-extra":"^11.0.4","@types/gtag.js":"^0.0.20","@types/http-server":"^0.12.4","@types/isomorphic-fetch":"^0.0.39","@types/jest":"^29.5.13","@types/jest-axe":"^3.5.9","@types/jest-environment-puppeteer":"^5.0.6","@types/jest-image-snapshot":"^6.4.0","@types/jquery":"^3.5.31","@types/jsdom":"^21.1.7","@types/lodash":"^4.17.12","@types/minimist":"^1.2.5","@types/node":"^22.7.7","@types/nprogress":"^0.2.3","@types/pixelmatch":"^5.2.6","@types/pngjs":"^6.0.5","@types/prismjs":"^1.26.4","@types/progress":"^2.0.7","@types/qs":"^6.9.16","@types/react":"^18.3.11","@types/react-copy-to-clipboard":"^5.0.7","@types/react-dom":"^18.3.1","@types/react-highlight-words":"^0.20.0","@types/react-resizable":"^3.0.8","@types/semver":"^7.5.8","@types/spinnies":"^0.5.3","@types/tar":"^6.1.13","@types/throttle-debounce":"^5.0.2","@types/warning":"^3.0.3","adm-zip":"^0.5.16","ali-oss":"^6.21.0","antd-img-crop":"^4.23.0","antd-style":"^3.7.0","antd-token-previewer":"^2.0.8",axios:"^1.7.7",chalk:"^4.1.2",cheerio:"^1.0.0","circular-dependency-plugin":"^5.2.2","cli-progress":"^3.12.0","cross-env":"^7.0.3","cross-fetch":"^4.0.0",dekko:"^0.2.1",dotenv:"^16.4.5",dumi:"~2.4.13","dumi-plugin-color-chunk":"^1.1.2",eslint:"^9.13.0","eslint-plugin-compat":"^6.0.1","eslint-plugin-jest":"^28.8.3","eslint-plugin-jsx-a11y":"^6.10.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.13","fast-glob":"^3.3.2","fetch-jsonp":"^1.3.0","fs-extra":"^11.2.0","gh-pages":"^6.2.0",glob:"^11.0.0",html2sketch:"^1.0.2","http-server":"^14.1.1",husky:"^9.1.6","identity-obj-proxy":"^3.0.0",immer:"^10.1.1","is-ci":"^3.0.1","isomorphic-fetch":"^3.0.0",jest:"^29.7.0","jest-axe":"^9.0.0","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.7.0","jest-environment-node":"^29.7.0","jest-image-snapshot":"^6.4.0","jest-puppeteer":"^10.1.2",jquery:"^3.7.1",jsdom:"^25.0.1","jsonml-to-react-element":"^1.1.11","jsonml.js":"^0.1.0","lint-staged":"^15.2.10",lodash:"^4.17.21","lunar-typescript":"^1.7.5","lz-string":"^1.5.0",minimist:"^1.2.8",mockdate:"^3.0.5","node-fetch":"^3.3.2","node-notifier":"^10.0.1",nprogress:"^0.2.0",open:"^10.1.0",ora:"^8.1.0","p-all":"^5.0.0",pixelmatch:"^6.0.0",pngjs:"^7.0.0",prettier:"^3.3.3","pretty-format":"^29.7.0",prismjs:"^1.29.0",puppeteer:"^23.6.0",qs:"^6.13.0","rc-footer":"^0.6.8","rc-tween-one":"^3.0.6","rc-virtual-list":"^3.15.0",react:"^18.3.1","react-copy-to-clipboard":"^5.1.0","react-countup":"^6.5.3","react-dom":"^18.3.1","react-draggable":"^4.4.6","react-fast-marquee":"^1.6.5","react-highlight-words":"^0.20.0","react-infinite-scroll-component":"^6.1.0","react-intersection-observer":"^9.13.1","react-resizable":"^3.0.5","react-router-dom":"^6.27.0","react-sticky-box":"^2.0.5","regenerator-runtime":"^0.14.1","rehype-stringify":"^10.0.1",remark:"^15.0.1","remark-cli":"^12.0.1","remark-gfm":"^4.0.0","remark-lint":"^10.0.0","remark-lint-no-undefined-references":"^5.0.0","remark-preset-lint-recommended":"^7.0.0","remark-rehype":"^11.1.1",rimraf:"^6.0.1",runes2:"^1.1.4",semver:"^7.6.3",sharp:"^0.33.5","simple-git":"^3.27.0","size-limit":"^11.1.6",spinnies:"^0.5.1",sylvanas:"^0.6.1",tar:"^7.4.3","tar-fs":"^3.0.6",terser:"^5.36.0",tsx:"4.11.2",typedoc:"^0.26.10",typescript:"~5.6.3","vanilla-jsoneditor":"^2.0.0","vanilla-tilt":"^1.8.1",webpack:"^5.95.0","webpack-bundle-analyzer":"^4.10.2","xhr-mock":"^2.5.1","@ant-design/colors":"^7.1.0","@ant-design/cssinjs":"^1.21.1","@ant-design/cssinjs-utils":"^1.1.1","@ant-design/icons":"^5.5.1","@ant-design/react-slick":"~1.1.2","@babel/runtime":"^7.25.7","@ctrl/tinycolor":"^3.6.1","@rc-component/color-picker":"~2.0.1","@rc-component/mutate-observer":"^1.1.0","@rc-component/qrcode":"~1.0.0","@rc-component/tour":"~1.15.1","@rc-component/trigger":"^2.2.5",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.11","rc-cascader":"~3.30.0","rc-checkbox":"~3.3.0","rc-collapse":"~3.9.0","rc-dialog":"~9.6.0","rc-drawer":"~7.2.0","rc-dropdown":"~4.2.0","rc-field-form":"~2.5.1","rc-image":"~7.11.0","rc-input":"~1.6.3","rc-input-number":"~9.3.0","rc-mentions":"~2.17.0","rc-menu":"~9.16.0","rc-motion":"^2.9.3","rc-notification":"~5.6.2","rc-pagination":"~4.3.0","rc-picker":"~4.8.1","rc-progress":"~4.0.0","rc-rate":"~2.13.0","rc-resize-observer":"^1.4.0","rc-segmented":"~2.5.0","rc-select":"~14.16.3","rc-slider":"~11.1.7","rc-steps":"~6.0.1","rc-switch":"~4.1.0","rc-table":"~7.48.1","rc-tabs":"~15.4.0","rc-textarea":"~1.8.2","rc-tooltip":"~6.2.1","rc-tree":"~5.10.1","rc-tree-select":"~5.24.4","rc-upload":"~4.8.1","rc-util":"^5.43.0","scroll-into-view-if-needed":"^3.1.0","throttle-debounce":"^5.0.2"},jsx:"import React from 'react';\nimport { Affix, Button } from 'antd';\nconst App = () => {\n const [top, setTop] = React.useState(100);\n const [bottom, setBottom] = React.useState(100);\n return (\n <>\n <Affix offsetTop={top}>\n <Button type=\"primary\" onClick={() => setTop(top + 10)}>\n Affix top\n </Button>\n </Affix>\n <br />\n <Affix offsetBottom={bottom}>\n <Button type=\"primary\" onClick={() => setBottom(bottom + 10)}>\n Affix bottom\n </Button>\n </Affix>\n </>\n );\n};\nexport default App;\n",description:"<p>The simplest usage.</p>"}},{demo:{id:"affix-demo-on-change"},previewerProps:{title:"Callback",filename:"components/affix/demo/on-change.tsx",pkgDependencyList:{"@ant-design/compatible":"^5.1.3","@ant-design/happy-work-theme":"^1.0.0","@ant-design/tools":"^18.0.2","@antfu/eslint-config":"^3.8.0","@antv/g6":"^4.8.24","@biomejs/biome":"^1.9.4","@codecov/webpack-plugin":"^1.2.1","@codesandbox/sandpack-react":"^2.19.9","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@emotion/css":"^11.13.4","@emotion/react":"^11.13.3","@emotion/server":"^11.11.0","@eslint-react/eslint-plugin":"^1.15.0","@ianvs/prettier-plugin-sort-imports":"^4.3.1","@inquirer/prompts":"^7.0.0","@madccc/duplicate-package-checker-webpack-plugin":"^1.0.0","@microflash/rehype-figure":"^2.1.1","@npmcli/run-script":"^9.0.1","@octokit/rest":"^21.0.2","@qixian.cs/github-contributors-list":"^2.0.2","@size-limit/file":"^11.1.6","@stackblitz/sdk":"^1.11.0","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.2","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@types/adm-zip":"^0.5.5","@types/ali-oss":"^6.16.11","@types/cli-progress":"^3.11.6","@types/fs-extra":"^11.0.4","@types/gtag.js":"^0.0.20","@types/http-server":"^0.12.4","@types/isomorphic-fetch":"^0.0.39","@types/jest":"^29.5.13","@types/jest-axe":"^3.5.9","@types/jest-environment-puppeteer":"^5.0.6","@types/jest-image-snapshot":"^6.4.0","@types/jquery":"^3.5.31","@types/jsdom":"^21.1.7","@types/lodash":"^4.17.12","@types/minimist":"^1.2.5","@types/node":"^22.7.7","@types/nprogress":"^0.2.3","@types/pixelmatch":"^5.2.6","@types/pngjs":"^6.0.5","@types/prismjs":"^1.26.4","@types/progress":"^2.0.7","@types/qs":"^6.9.16","@types/react":"^18.3.11","@types/react-copy-to-clipboard":"^5.0.7","@types/react-dom":"^18.3.1","@types/react-highlight-words":"^0.20.0","@types/react-resizable":"^3.0.8","@types/semver":"^7.5.8","@types/spinnies":"^0.5.3","@types/tar":"^6.1.13","@types/throttle-debounce":"^5.0.2","@types/warning":"^3.0.3","adm-zip":"^0.5.16","ali-oss":"^6.21.0","antd-img-crop":"^4.23.0","antd-style":"^3.7.0","antd-token-previewer":"^2.0.8",axios:"^1.7.7",chalk:"^4.1.2",cheerio:"^1.0.0","circular-dependency-plugin":"^5.2.2","cli-progress":"^3.12.0","cross-env":"^7.0.3","cross-fetch":"^4.0.0",dekko:"^0.2.1",dotenv:"^16.4.5",dumi:"~2.4.13","dumi-plugin-color-chunk":"^1.1.2",eslint:"^9.13.0","eslint-plugin-compat":"^6.0.1","eslint-plugin-jest":"^28.8.3","eslint-plugin-jsx-a11y":"^6.10.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.13","fast-glob":"^3.3.2","fetch-jsonp":"^1.3.0","fs-extra":"^11.2.0","gh-pages":"^6.2.0",glob:"^11.0.0",html2sketch:"^1.0.2","http-server":"^14.1.1",husky:"^9.1.6","identity-obj-proxy":"^3.0.0",immer:"^10.1.1","is-ci":"^3.0.1","isomorphic-fetch":"^3.0.0",jest:"^29.7.0","jest-axe":"^9.0.0","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.7.0","jest-environment-node":"^29.7.0","jest-image-snapshot":"^6.4.0","jest-puppeteer":"^10.1.2",jquery:"^3.7.1",jsdom:"^25.0.1","jsonml-to-react-element":"^1.1.11","jsonml.js":"^0.1.0","lint-staged":"^15.2.10",lodash:"^4.17.21","lunar-typescript":"^1.7.5","lz-string":"^1.5.0",minimist:"^1.2.8",mockdate:"^3.0.5","node-fetch":"^3.3.2","node-notifier":"^10.0.1",nprogress:"^0.2.0",open:"^10.1.0",ora:"^8.1.0","p-all":"^5.0.0",pixelmatch:"^6.0.0",pngjs:"^7.0.0",prettier:"^3.3.3","pretty-format":"^29.7.0",prismjs:"^1.29.0",puppeteer:"^23.6.0",qs:"^6.13.0","rc-footer":"^0.6.8","rc-tween-one":"^3.0.6","rc-virtual-list":"^3.15.0",react:"^18.3.1","react-copy-to-clipboard":"^5.1.0","react-countup":"^6.5.3","react-dom":"^18.3.1","react-draggable":"^4.4.6","react-fast-marquee":"^1.6.5","react-highlight-words":"^0.20.0","react-infinite-scroll-component":"^6.1.0","react-intersection-observer":"^9.13.1","react-resizable":"^3.0.5","react-router-dom":"^6.27.0","react-sticky-box":"^2.0.5","regenerator-runtime":"^0.14.1","rehype-stringify":"^10.0.1",remark:"^15.0.1","remark-cli":"^12.0.1","remark-gfm":"^4.0.0","remark-lint":"^10.0.0","remark-lint-no-undefined-references":"^5.0.0","remark-preset-lint-recommended":"^7.0.0","remark-rehype":"^11.1.1",rimraf:"^6.0.1",runes2:"^1.1.4",semver:"^7.6.3",sharp:"^0.33.5","simple-git":"^3.27.0","size-limit":"^11.1.6",spinnies:"^0.5.1",sylvanas:"^0.6.1",tar:"^7.4.3","tar-fs":"^3.0.6",terser:"^5.36.0",tsx:"4.11.2",typedoc:"^0.26.10",typescript:"~5.6.3","vanilla-jsoneditor":"^2.0.0","vanilla-tilt":"^1.8.1",webpack:"^5.95.0","webpack-bundle-analyzer":"^4.10.2","xhr-mock":"^2.5.1","@ant-design/colors":"^7.1.0","@ant-design/cssinjs":"^1.21.1","@ant-design/cssinjs-utils":"^1.1.1","@ant-design/icons":"^5.5.1","@ant-design/react-slick":"~1.1.2","@babel/runtime":"^7.25.7","@ctrl/tinycolor":"^3.6.1","@rc-component/color-picker":"~2.0.1","@rc-component/mutate-observer":"^1.1.0","@rc-component/qrcode":"~1.0.0","@rc-component/tour":"~1.15.1","@rc-component/trigger":"^2.2.5",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.11","rc-cascader":"~3.30.0","rc-checkbox":"~3.3.0","rc-collapse":"~3.9.0","rc-dialog":"~9.6.0","rc-drawer":"~7.2.0","rc-dropdown":"~4.2.0","rc-field-form":"~2.5.1","rc-image":"~7.11.0","rc-input":"~1.6.3","rc-input-number":"~9.3.0","rc-mentions":"~2.17.0","rc-menu":"~9.16.0","rc-motion":"^2.9.3","rc-notification":"~5.6.2","rc-pagination":"~4.3.0","rc-picker":"~4.8.1","rc-progress":"~4.0.0","rc-rate":"~2.13.0","rc-resize-observer":"^1.4.0","rc-segmented":"~2.5.0","rc-select":"~14.16.3","rc-slider":"~11.1.7","rc-steps":"~6.0.1","rc-switch":"~4.1.0","rc-table":"~7.48.1","rc-tabs":"~15.4.0","rc-textarea":"~1.8.2","rc-tooltip":"~6.2.1","rc-tree":"~5.10.1","rc-tree-select":"~5.24.4","rc-upload":"~4.8.1","rc-util":"^5.43.0","scroll-into-view-if-needed":"^3.1.0","throttle-debounce":"^5.0.2"},jsx:"import React from 'react';\nimport { Affix, Button } from 'antd';\nconst App = () => (\n <Affix offsetTop={120} onChange={(affixed) => console.log(affixed)}>\n <Button>120px to affix top</Button>\n </Affix>\n);\nexport default App;\n",description:"<p>Callback with affixed state.</p>"}},{demo:{id:"affix-demo-target"},previewerProps:{title:"Container to scroll.",filename:"components/affix/demo/target.tsx",pkgDependencyList:{"@ant-design/compatible":"^5.1.3","@ant-design/happy-work-theme":"^1.0.0","@ant-design/tools":"^18.0.2","@antfu/eslint-config":"^3.8.0","@antv/g6":"^4.8.24","@biomejs/biome":"^1.9.4","@codecov/webpack-plugin":"^1.2.1","@codesandbox/sandpack-react":"^2.19.9","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@emotion/css":"^11.13.4","@emotion/react":"^11.13.3","@emotion/server":"^11.11.0","@eslint-react/eslint-plugin":"^1.15.0","@ianvs/prettier-plugin-sort-imports":"^4.3.1","@inquirer/prompts":"^7.0.0","@madccc/duplicate-package-checker-webpack-plugin":"^1.0.0","@microflash/rehype-figure":"^2.1.1","@npmcli/run-script":"^9.0.1","@octokit/rest":"^21.0.2","@qixian.cs/github-contributors-list":"^2.0.2","@size-limit/file":"^11.1.6","@stackblitz/sdk":"^1.11.0","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.2","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@types/adm-zip":"^0.5.5","@types/ali-oss":"^6.16.11","@types/cli-progress":"^3.11.6","@types/fs-extra":"^11.0.4","@types/gtag.js":"^0.0.20","@types/http-server":"^0.12.4","@types/isomorphic-fetch":"^0.0.39","@types/jest":"^29.5.13","@types/jest-axe":"^3.5.9","@types/jest-environment-puppeteer":"^5.0.6","@types/jest-image-snapshot":"^6.4.0","@types/jquery":"^3.5.31","@types/jsdom":"^21.1.7","@types/lodash":"^4.17.12","@types/minimist":"^1.2.5","@types/node":"^22.7.7","@types/nprogress":"^0.2.3","@types/pixelmatch":"^5.2.6","@types/pngjs":"^6.0.5","@types/prismjs":"^1.26.4","@types/progress":"^2.0.7","@types/qs":"^6.9.16","@types/react":"^18.3.11","@types/react-copy-to-clipboard":"^5.0.7","@types/react-dom":"^18.3.1","@types/react-highlight-words":"^0.20.0","@types/react-resizable":"^3.0.8","@types/semver":"^7.5.8","@types/spinnies":"^0.5.3","@types/tar":"^6.1.13","@types/throttle-debounce":"^5.0.2","@types/warning":"^3.0.3","adm-zip":"^0.5.16","ali-oss":"^6.21.0","antd-img-crop":"^4.23.0","antd-style":"^3.7.0","antd-token-previewer":"^2.0.8",axios:"^1.7.7",chalk:"^4.1.2",cheerio:"^1.0.0","circular-dependency-plugin":"^5.2.2","cli-progress":"^3.12.0","cross-env":"^7.0.3","cross-fetch":"^4.0.0",dekko:"^0.2.1",dotenv:"^16.4.5",dumi:"~2.4.13","dumi-plugin-color-chunk":"^1.1.2",eslint:"^9.13.0","eslint-plugin-compat":"^6.0.1","eslint-plugin-jest":"^28.8.3","eslint-plugin-jsx-a11y":"^6.10.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.13","fast-glob":"^3.3.2","fetch-jsonp":"^1.3.0","fs-extra":"^11.2.0","gh-pages":"^6.2.0",glob:"^11.0.0",html2sketch:"^1.0.2","http-server":"^14.1.1",husky:"^9.1.6","identity-obj-proxy":"^3.0.0",immer:"^10.1.1","is-ci":"^3.0.1","isomorphic-fetch":"^3.0.0",jest:"^29.7.0","jest-axe":"^9.0.0","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.7.0","jest-environment-node":"^29.7.0","jest-image-snapshot":"^6.4.0","jest-puppeteer":"^10.1.2",jquery:"^3.7.1",jsdom:"^25.0.1","jsonml-to-react-element":"^1.1.11","jsonml.js":"^0.1.0","lint-staged":"^15.2.10",lodash:"^4.17.21","lunar-typescript":"^1.7.5","lz-string":"^1.5.0",minimist:"^1.2.8",mockdate:"^3.0.5","node-fetch":"^3.3.2","node-notifier":"^10.0.1",nprogress:"^0.2.0",open:"^10.1.0",ora:"^8.1.0","p-all":"^5.0.0",pixelmatch:"^6.0.0",pngjs:"^7.0.0",prettier:"^3.3.3","pretty-format":"^29.7.0",prismjs:"^1.29.0",puppeteer:"^23.6.0",qs:"^6.13.0","rc-footer":"^0.6.8","rc-tween-one":"^3.0.6","rc-virtual-list":"^3.15.0",react:"^18.3.1","react-copy-to-clipboard":"^5.1.0","react-countup":"^6.5.3","react-dom":"^18.3.1","react-draggable":"^4.4.6","react-fast-marquee":"^1.6.5","react-highlight-words":"^0.20.0","react-infinite-scroll-component":"^6.1.0","react-intersection-observer":"^9.13.1","react-resizable":"^3.0.5","react-router-dom":"^6.27.0","react-sticky-box":"^2.0.5","regenerator-runtime":"^0.14.1","rehype-stringify":"^10.0.1",remark:"^15.0.1","remark-cli":"^12.0.1","remark-gfm":"^4.0.0","remark-lint":"^10.0.0","remark-lint-no-undefined-references":"^5.0.0","remark-preset-lint-recommended":"^7.0.0","remark-rehype":"^11.1.1",rimraf:"^6.0.1",runes2:"^1.1.4",semver:"^7.6.3",sharp:"^0.33.5","simple-git":"^3.27.0","size-limit":"^11.1.6",spinnies:"^0.5.1",sylvanas:"^0.6.1",tar:"^7.4.3","tar-fs":"^3.0.6",terser:"^5.36.0",tsx:"4.11.2",typedoc:"^0.26.10",typescript:"~5.6.3","vanilla-jsoneditor":"^2.0.0","vanilla-tilt":"^1.8.1",webpack:"^5.95.0","webpack-bundle-analyzer":"^4.10.2","xhr-mock":"^2.5.1","@ant-design/colors":"^7.1.0","@ant-design/cssinjs":"^1.21.1","@ant-design/cssinjs-utils":"^1.1.1","@ant-design/icons":"^5.5.1","@ant-design/react-slick":"~1.1.2","@babel/runtime":"^7.25.7","@ctrl/tinycolor":"^3.6.1","@rc-component/color-picker":"~2.0.1","@rc-component/mutate-observer":"^1.1.0","@rc-component/qrcode":"~1.0.0","@rc-component/tour":"~1.15.1","@rc-component/trigger":"^2.2.5",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.11","rc-cascader":"~3.30.0","rc-checkbox":"~3.3.0","rc-collapse":"~3.9.0","rc-dialog":"~9.6.0","rc-drawer":"~7.2.0","rc-dropdown":"~4.2.0","rc-field-form":"~2.5.1","rc-image":"~7.11.0","rc-input":"~1.6.3","rc-input-number":"~9.3.0","rc-mentions":"~2.17.0","rc-menu":"~9.16.0","rc-motion":"^2.9.3","rc-notification":"~5.6.2","rc-pagination":"~4.3.0","rc-picker":"~4.8.1","rc-progress":"~4.0.0","rc-rate":"~2.13.0","rc-resize-observer":"^1.4.0","rc-segmented":"~2.5.0","rc-select":"~14.16.3","rc-slider":"~11.1.7","rc-steps":"~6.0.1","rc-switch":"~4.1.0","rc-table":"~7.48.1","rc-tabs":"~15.4.0","rc-textarea":"~1.8.2","rc-tooltip":"~6.2.1","rc-tree":"~5.10.1","rc-tree-select":"~5.24.4","rc-upload":"~4.8.1","rc-util":"^5.43.0","scroll-into-view-if-needed":"^3.1.0","throttle-debounce":"^5.0.2"},jsx:"import React from 'react';\nimport { Affix, Button } from 'antd';\nconst containerStyle = {\n width: '100%',\n height: 100,\n overflow: 'auto',\n boxShadow: '0 0 0 1px #1677ff',\n scrollbarWidth: 'thin',\n scrollbarGutter: 'stable',\n};\nconst style = {\n width: '100%',\n height: 1000,\n};\nconst App = () => {\n const [container, setContainer] = React.useState(null);\n return (\n <div style={containerStyle} ref={setContainer}>\n <div style={style}>\n <Affix target={() => container}>\n <Button type=\"primary\">Fixed at the top of container</Button>\n </Affix>\n </div>\n </div>\n );\n};\nexport default App;\n",description:"<p>Set a <code>target</code> for 'Affix', which is listen to scroll event of target element (default is <code>window</code>).</p>"}},{demo:{id:"affix-demo-debug"},previewerProps:{debug:!0,title:"debug",filename:"components/affix/demo/debug.tsx",pkgDependencyList:{"@ant-design/compatible":"^5.1.3","@ant-design/happy-work-theme":"^1.0.0","@ant-design/tools":"^18.0.2","@antfu/eslint-config":"^3.8.0","@antv/g6":"^4.8.24","@biomejs/biome":"^1.9.4","@codecov/webpack-plugin":"^1.2.1","@codesandbox/sandpack-react":"^2.19.9","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@emotion/css":"^11.13.4","@emotion/react":"^11.13.3","@emotion/server":"^11.11.0","@eslint-react/eslint-plugin":"^1.15.0","@ianvs/prettier-plugin-sort-imports":"^4.3.1","@inquirer/prompts":"^7.0.0","@madccc/duplicate-package-checker-webpack-plugin":"^1.0.0","@microflash/rehype-figure":"^2.1.1","@npmcli/run-script":"^9.0.1","@octokit/rest":"^21.0.2","@qixian.cs/github-contributors-list":"^2.0.2","@size-limit/file":"^11.1.6","@stackblitz/sdk":"^1.11.0","@testing-library/dom":"^10.4.0","@testing-library/jest-dom":"^6.6.2","@testing-library/react":"^16.0.1","@testing-library/user-event":"^14.5.2","@types/adm-zip":"^0.5.5","@types/ali-oss":"^6.16.11","@types/cli-progress":"^3.11.6","@types/fs-extra":"^11.0.4","@types/gtag.js":"^0.0.20","@types/http-server":"^0.12.4","@types/isomorphic-fetch":"^0.0.39","@types/jest":"^29.5.13","@types/jest-axe":"^3.5.9","@types/jest-environment-puppeteer":"^5.0.6","@types/jest-image-snapshot":"^6.4.0","@types/jquery":"^3.5.31","@types/jsdom":"^21.1.7","@types/lodash":"^4.17.12","@types/minimist":"^1.2.5","@types/node":"^22.7.7","@types/nprogress":"^0.2.3","@types/pixelmatch":"^5.2.6","@types/pngjs":"^6.0.5","@types/prismjs":"^1.26.4","@types/progress":"^2.0.7","@types/qs":"^6.9.16","@types/react":"^18.3.11","@types/react-copy-to-clipboard":"^5.0.7","@types/react-dom":"^18.3.1","@types/react-highlight-words":"^0.20.0","@types/react-resizable":"^3.0.8","@types/semver":"^7.5.8","@types/spinnies":"^0.5.3","@types/tar":"^6.1.13","@types/throttle-debounce":"^5.0.2","@types/warning":"^3.0.3","adm-zip":"^0.5.16","ali-oss":"^6.21.0","antd-img-crop":"^4.23.0","antd-style":"^3.7.0","antd-token-previewer":"^2.0.8",axios:"^1.7.7",chalk:"^4.1.2",cheerio:"^1.0.0","circular-dependency-plugin":"^5.2.2","cli-progress":"^3.12.0","cross-env":"^7.0.3","cross-fetch":"^4.0.0",dekko:"^0.2.1",dotenv:"^16.4.5",dumi:"~2.4.13","dumi-plugin-color-chunk":"^1.1.2",eslint:"^9.13.0","eslint-plugin-compat":"^6.0.1","eslint-plugin-jest":"^28.8.3","eslint-plugin-jsx-a11y":"^6.10.0","eslint-plugin-react-hooks":"^5.0.0","eslint-plugin-react-refresh":"^0.4.13","fast-glob":"^3.3.2","fetch-jsonp":"^1.3.0","fs-extra":"^11.2.0","gh-pages":"^6.2.0",glob:"^11.0.0",html2sketch:"^1.0.2","http-server":"^14.1.1",husky:"^9.1.6","identity-obj-proxy":"^3.0.0",immer:"^10.1.1","is-ci":"^3.0.1","isomorphic-fetch":"^3.0.0",jest:"^29.7.0","jest-axe":"^9.0.0","jest-canvas-mock":"^2.5.2","jest-environment-jsdom":"^29.7.0","jest-environment-node":"^29.7.0","jest-image-snapshot":"^6.4.0","jest-puppeteer":"^10.1.2",jquery:"^3.7.1",jsdom:"^25.0.1","jsonml-to-react-element":"^1.1.11","jsonml.js":"^0.1.0","lint-staged":"^15.2.10",lodash:"^4.17.21","lunar-typescript":"^1.7.5","lz-string":"^1.5.0",minimist:"^1.2.8",mockdate:"^3.0.5","node-fetch":"^3.3.2","node-notifier":"^10.0.1",nprogress:"^0.2.0",open:"^10.1.0",ora:"^8.1.0","p-all":"^5.0.0",pixelmatch:"^6.0.0",pngjs:"^7.0.0",prettier:"^3.3.3","pretty-format":"^29.7.0",prismjs:"^1.29.0",puppeteer:"^23.6.0",qs:"^6.13.0","rc-footer":"^0.6.8","rc-tween-one":"^3.0.6","rc-virtual-list":"^3.15.0",react:"^18.3.1","react-copy-to-clipboard":"^5.1.0","react-countup":"^6.5.3","react-dom":"^18.3.1","react-draggable":"^4.4.6","react-fast-marquee":"^1.6.5","react-highlight-words":"^0.20.0","react-infinite-scroll-component":"^6.1.0","react-intersection-observer":"^9.13.1","react-resizable":"^3.0.5","react-router-dom":"^6.27.0","react-sticky-box":"^2.0.5","regenerator-runtime":"^0.14.1","rehype-stringify":"^10.0.1",remark:"^15.0.1","remark-cli":"^12.0.1","remark-gfm":"^4.0.0","remark-lint":"^10.0.0","remark-lint-no-undefined-references":"^5.0.0","remark-preset-lint-recommended":"^7.0.0","remark-rehype":"^11.1.1",rimraf:"^6.0.1",runes2:"^1.1.4",semver:"^7.6.3",sharp:"^0.33.5","simple-git":"^3.27.0","size-limit":"^11.1.6",spinnies:"^0.5.1",sylvanas:"^0.6.1",tar:"^7.4.3","tar-fs":"^3.0.6",terser:"^5.36.0",tsx:"4.11.2",typedoc:"^0.26.10",typescript:"~5.6.3","vanilla-jsoneditor":"^2.0.0","vanilla-tilt":"^1.8.1",webpack:"^5.95.0","webpack-bundle-analyzer":"^4.10.2","xhr-mock":"^2.5.1","@ant-design/colors":"^7.1.0","@ant-design/cssinjs":"^1.21.1","@ant-design/cssinjs-utils":"^1.1.1","@ant-design/icons":"^5.5.1","@ant-design/react-slick":"~1.1.2","@babel/runtime":"^7.25.7","@ctrl/tinycolor":"^3.6.1","@rc-component/color-picker":"~2.0.1","@rc-component/mutate-observer":"^1.1.0","@rc-component/qrcode":"~1.0.0","@rc-component/tour":"~1.15.1","@rc-component/trigger":"^2.2.5",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.11","rc-cascader":"~3.30.0","rc-checkbox":"~3.3.0","rc-collapse":"~3.9.0","rc-dialog":"~9.6.0","rc-drawer":"~7.2.0","rc-dropdown":"~4.2.0","rc-field-form":"~2.5.1","rc-image":"~7.11.0","rc-input":"~1.6.3","rc-input-number":"~9.3.0","rc-mentions":"~2.17.0","rc-menu":"~9.16.0","rc-motion":"^2.9.3","rc-notification":"~5.6.2","rc-pagination":"~4.3.0","rc-picker":"~4.8.1","rc-progress":"~4.0.0","rc-rate":"~2.13.0","rc-resize-observer":"^1.4.0","rc-segmented":"~2.5.0","rc-select":"~14.16.3","rc-slider":"~11.1.7","rc-steps":"~6.0.1","rc-switch":"~4.1.0","rc-table":"~7.48.1","rc-tabs":"~15.4.0","rc-textarea":"~1.8.2","rc-tooltip":"~6.2.1","rc-tree":"~5.10.1","rc-tree-select":"~5.24.4","rc-upload":"~4.8.1","rc-util":"^5.43.0","scroll-into-view-if-needed":"^3.1.0","throttle-debounce":"^5.0.2"},jsx:"import React, { useState } from 'react';\nimport { Affix, Button } from 'antd';\nconst App = () => {\n const [top, setTop] = useState(10);\n return (\n <div\n style={{\n height: 10000,\n }}\n >\n <div>Top</div>\n <Affix offsetTop={top}>\n <div\n style={{\n background: 'red',\n }}\n >\n <Button type=\"primary\" onClick={() => setTop(top + 10)}>\n Affix top\n </Button>\n </div>\n </Affix>\n <div>Bottom</div>\n </div>\n );\n};\nexport default App;\n",description:"<p>DEBUG</p>"}}]}),(0,i.jsxs)("div",{className:"markdown",children:[(0,i.jsxs)("h2",{id:"api",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#api",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"API"]}),(0,i.jsxs)("p",{children:[e[8].value,(0,i.jsx)(a.default,{to:"/docs/react/common-props",sourceType:"Link",children:e[9].value})]}),(0,i.jsxs)(o.default,{className:"component-api-table",children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:e[10].value}),(0,i.jsx)("th",{children:e[11].value}),(0,i.jsx)("th",{children:e[12].value}),(0,i.jsx)("th",{children:e[13].value})]})}),(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:e[14].value}),(0,i.jsx)("td",{children:e[15].value}),(0,i.jsx)("td",{children:e[16].value}),(0,i.jsx)("td",{children:e[17].value})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:e[18].value}),(0,i.jsx)("td",{children:e[19].value}),(0,i.jsx)("td",{children:e[20].value}),(0,i.jsx)("td",{children:e[21].value})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:e[22].value}),(0,i.jsx)("td",{children:e[23].value}),(0,i.jsx)("td",{children:e[24].value}),(0,i.jsx)("td",{children:e[25].value})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:e[26].value}),(0,i.jsx)("td",{children:e[27].value}),(0,i.jsx)("td",{children:e[28].value}),(0,i.jsx)("td",{children:e[29].value})]})]})]}),(0,i.jsxs)("p",{children:[(0,i.jsx)("strong",{children:e[30].value}),e[31].value,(0,i.jsx)("code",{children:e[32].value}),e[33].value,(0,i.jsx)("code",{children:e[34].value}),e[35].value,(0,i.jsx)("code",{children:e[36].value}),e[37].value,(0,i.jsx)("code",{children:e[38].value}),e[39].value]}),(0,i.jsx)(n.default,{lang:"jsx",children:e[40].value}),(0,i.jsxs)("h2",{id:"faq",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#faq",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"FAQ"]}),(0,i.jsxs)("h3",{id:"when-binding-container-with-target-in-affix-elements-sometimes-move-out-of-the-container",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#when-binding-container-with-target-in-affix-elements-sometimes-move-out-of-the-container",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"When binding container with ",(0,i.jsx)("code",{children:e[41].value})," in Affix, elements sometimes move out of the container."]}),(0,i.jsxs)("p",{children:[e[42].value,(0,i.jsx)(a.default,{href:"https://codesandbox.io/s/stupefied-maxwell-ophqnm?file=/index.js",sourceType:"a",children:e[43].value})]}),(0,i.jsxs)("p",{children:[e[44].value,(0,i.jsx)(a.default,{href:"https://github.com/ant-design/ant-design/issues/3938",sourceType:"a",children:e[45].value}),e[46].value,(0,i.jsx)(a.default,{href:"https://github.com/ant-design/ant-design/issues/5642",sourceType:"a",children:e[47].value}),e[48].value,(0,i.jsx)(a.default,{href:"https://github.com/ant-design/ant-design/issues/16120",sourceType:"a",children:e[49].value})]}),(0,i.jsxs)("h3",{id:"when-affix-is-used-in-a-horizontal-scroll-container-the-position-of-the-element-left-is-incorrect",children:[(0,i.jsx)(a.default,{"aria-hidden":"true",tabIndex:"-1",href:"#when-affix-is-used-in-a-horizontal-scroll-container-the-position-of-the-element-left-is-incorrect",sourceType:"a",children:(0,i.jsx)("span",{className:"icon icon-link"})}),"When Affix is \u200B\u200Bused in a horizontal scroll container, the position of the element ",(0,i.jsx)("code",{children:e[50].value})," is incorrect."]}),(0,i.jsxs)("p",{children:[e[51].value,(0,i.jsx)("code",{children:e[52].value}),e[53].value]}),(0,i.jsxs)("p",{children:[e[54].value,(0,i.jsx)(a.default,{href:"https://github.com/ant-design/ant-design/issues/29108",sourceType:"a",children:e[55].value})]})]})]});}var u=function(){return(0,i.jsx)(d.DumiPage,{children:(0,i.jsx)(l.Suspense,{fallback:(0,i.jsx)(p.default,{}),children:(0,i.jsx)(m,{})})});};}}]);