diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index c1e8e1305f2d..96c2526e4c4b 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -1,4 +1,4 @@ { - "sandboxes": ["antd-reproduction-template-y9vgcf"], - "node": "14" + "sandboxes": ["antd-reproduction-template-forked-jyh2k9"], + "node": "18" } diff --git a/.dumi/theme/common/LiveCode.tsx b/.dumi/theme/common/LiveCode.tsx index 9f80e95c6e04..960e47529ac0 100644 --- a/.dumi/theme/common/LiveCode.tsx +++ b/.dumi/theme/common/LiveCode.tsx @@ -16,11 +16,11 @@ const useStyle = createStyles(({ token, css }) => { outline: none; &:hover { - border: 1px solid ${colorPrimaryBorder} !important; + box-shadow: inset 0 0 0 1px ${colorPrimaryBorder} !important; } &:focus { - border: 1px solid ${colorPrimary} !important; + box-shadow: inset 0 0 0 1px ${colorPrimary} !important; } } `, diff --git a/.eslintrc.js b/.eslintrc.js index 12e49328d21e..ca15e6624923 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,7 +25,16 @@ module.exports = { }, }, parser: '@typescript-eslint/parser', - plugins: ['react', '@babel', 'jest', '@typescript-eslint', 'react-hooks', 'unicorn', 'markdown'], + plugins: [ + 'react', + '@babel', + 'jest', + '@typescript-eslint', + 'react-hooks', + 'unicorn', + 'markdown', + 'lodash', + ], // https://github.com/typescript-eslint/typescript-eslint/issues/46#issuecomment-470486034 overrides: [ { @@ -156,6 +165,7 @@ module.exports = { 'react/no-unused-class-component-methods': 0, 'import/extensions': 0, 'import/no-cycle': 2, + 'lodash/import-scope': 2, 'import/no-extraneous-dependencies': [ 'error', { diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index e5b9a627f1e1..000000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Configuration for lock-threads - https://github.com/dessant/lock-threads - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 365 -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked because it has not had recent - activity. Please open a new issue for related bugs and link to relevant - comments in this thread. -# Issues or pull requests with these labels will not be locked -# exemptLabels: -# - no-locking -# Limit to only `issues` or `pulls` -only: issues diff --git a/.github/tests_checker.yml b/.github/tests_checker.yml deleted file mode 100644 index 46378d7461df..000000000000 --- a/.github/tests_checker.yml +++ /dev/null @@ -1,3 +0,0 @@ -comment: 'Could you please add tests to make sure this change works as expected?', -fileExtensions: [.ts', '.tsx', '.json'] -testDir: '__tests__' diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml index 2c6910ea67e3..faff89343859 100644 --- a/.github/workflows/preview-deploy.yml +++ b/.github/workflows/preview-deploy.yml @@ -74,6 +74,7 @@ jobs: # Download site artifact - name: download site artifact + if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }} uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} @@ -81,7 +82,6 @@ jobs: name: site - name: upload surge service - if: ${{ fromJSON(needs.upstream-workflow-summary.outputs.build-success) }} id: deploy continue-on-error: true run: | diff --git a/.github/workflows/upgrade-deps.yml b/.github/workflows/upgrade-deps.yml new file mode 100644 index 000000000000..d6169a8c6b2d --- /dev/null +++ b/.github/workflows/upgrade-deps.yml @@ -0,0 +1,60 @@ +name: Upgrade Dependencies + +on: + schedule: + - cron: "0 18 * * *" # every day at 18:00 UTC + # - timezone: Asia/Shanghai # not supported yet https://github.com/orgs/community/discussions/13454 + +jobs: + upgrade-deps: + runs-on: ubuntu-latest + if: github.ref == 'refs/heads/master' + permissions: + pull-requests: write # for peter-evans/create-pull-request to create PRs + contents: write # for git push + steps: + - name: checkout + uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + .ncurc.js + package.json + + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: upgrade deps + id: upgrade + run: | + if [ ! -d .tmp ] ; then + mkdir .tmp + fi + $(npx npm-check-updates -u > .tmp/upgrade-deps-logs.txt) 2>&1 || true + if [ -s .tmp/upgrade-deps-logs.txt ]; then + cat .tmp/upgrade-deps-logs.txt + echo "logs<> $GITHUB_OUTPUT + cat .tmp/upgrade-deps-logs.txt >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT + fi + + - name: create pull request + id: cpr + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} # Cannot be default!!! + assignees: 'afc163, zombieJ, xrkffgg, MadCcc' + title: "chore: upgrade deps" + commit-message: "chore: upgrade deps" + body: | + Upgrade dependencies + + ``` + ${{ steps.upgrade.outputs.logs }} + ``` + branch: auto-upgrade-deps + delete-branch: true + add-paths: | + package.json diff --git a/.ncurc.js b/.ncurc.js new file mode 100644 index 000000000000..a521db4d8050 --- /dev/null +++ b/.ncurc.js @@ -0,0 +1,29 @@ +// doc: https://github.com/raineorshine/npm-check-updates/tree/v16.14.6#readme +const path = require('path'); + +const rcOrg = ['@rc-component/', 'rc-']; +const check = ['@ant-design/', ...rcOrg]; + +// rules: https://github.com/ant-design/ant-design/pull/45593#issuecomment-1784891887 +module.exports = { + packageFile: path.resolve(__dirname, './package.json'), + upgrade: false, // use `npx npm-check-updates -u` to upgrade + packageManager: 'npm', + dep: ['prod'], // check only prod dependencies + // https://github.com/raineorshine/npm-check-updates#filter + filter: (name) => check.some((prefix) => name.startsWith(prefix)), + // https://github.com/raineorshine/npm-check-updates#target + target: (name, semver) => { + const { operator } = semver[0] ?? {}; + + // rc-component + if (rcOrg.some((prefix) => name.startsWith(prefix))) { + // `^` always upgrade latest, otherwise follow semver. + if (operator === '^') { + return 'latest'; + } + } + + return 'semver'; + }, +}; diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index dfdafd7ce544..d7c5f4b6c288 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -16,6 +16,48 @@ tag: vVERSION --- +## 5.11.0 + +`2023-11-03` + +- Slider + - 🆕 Slider will show tooltip when focus handler. [#45653](https://github.com/ant-design/ant-design/pull/45653) + - 💄 Slider handler should be movable after click tracker. [#45651](https://github.com/ant-design/ant-design/pull/45651) +- InputNumber + - 🆕 InputNumber support `changeOnBlur` prop to disable trigger `onChange` event when blur. [#45395](https://github.com/ant-design/ant-design/pull/45395) + - 🐞 Fix InputNumber in Form with `hasFeedback` that will lose focus when feedback icon appear. [#45632](https://github.com/ant-design/ant-design/pull/45632) [@MadCcc](https://github.com/MadCcc) + - 🐞 Fix InputNumber dynamic modify `formatter` not working. [#45325](https://github.com/ant-design/ant-design/pull/45325) +- Table + - 🆕 Table `columnTitle` support render function. [#41937](https://github.com/ant-design/ant-design/pull/41937) [@Zhou-Bill](https://github.com/Zhou-Bill) + - 🛠 Refactor Table `ref` to support `scrollTo` to scroll to target `key` or `index` or `top`. [#45245](https://github.com/ant-design/ant-design/pull/45245) +- Tabs + - 🆕 Tabs `items` support tab pane level `destroyInactiveTabPane`. [#45359](https://github.com/ant-design/ant-design/pull/45359) + - 🐞 Fix Tabs overflow blinking when Tab bar has decimal width. [#45370](https://github.com/ant-design/ant-design/pull/45370) +- ConfigProvider + - 🆕 ConfigProvider support RangePicker `className` and `style` properties. [#45479](https://github.com/ant-design/ant-design/pull/45479) [@chenzhuo198](https://github.com/chenzhuo198) + - 🆕 ConfigProvider support Dropdown `className` and `style` properties. [#45621](https://github.com/ant-design/ant-design/pull/45621) [@li-jia-nan](https://github.com/li-jia-nan) +- 🆕 ColorPicker `preset` prop support `defaultOpen` to control whether preset colors is open by default. [#45607](https://github.com/ant-design/ant-design/pull/45607) [@Wxh16144](https://github.com/Wxh16144) +- 🆕 Select support `optionRender` prop. [#45529](https://github.com/ant-design/ant-design/pull/45529) [@RedJue](https://github.com/RedJue) +- 🆕 Pagination support combine `simple` and `showSizeChanger`. [#45538](https://github.com/ant-design/ant-design/pull/45538) +- 🆕 Spin support `fullscreen` to display as backdrop. [#44986](https://github.com/ant-design/ant-design/pull/44986) [@Rafael-Martins](https://github.com/Rafael-Martins) [#45436](https://github.com/ant-design/ant-design/pull/45436) [@li-jia-nan](https://github.com/li-jia-nan) +- 🆕 Form `validateFields` support `dirty` for validating touched and validated fields. [#45389](https://github.com/ant-design/ant-design/pull/45389) +- 🆕 Watermark support `inherit` prop to disable watermark pass to Drawer and Modal. [#45319](https://github.com/ant-design/ant-design/pull/45319) +- 🆕 App support `component` for customization. [#45292](https://github.com/ant-design/ant-design/pull/45292) +- 🆕 Input and Input.TextArea support `count` custom character count (for example, fix emoji character length to `1`); `count.max` supports out-of-range styles; restore emoji to native count to solve the problem of `maxLength` and `value` mismatch. [#45140](https://github.com/ant-design/ant-design/pull/45140) +- 🐞 Fix Dropdown not trigger `onOpenChange` when click menu item to close the popup. [#45378](https://github.com/ant-design/ant-design/pull/45378) +- 💄 Modal static function support `styles`. [#45558](https://github.com/ant-design/ant-design/pull/45558) [@KotoriK](https://github.com/KotoriK) +- 💄 Optimize z-index logic of popup components, and make them don't block each other by default. [#45512](https://github.com/ant-design/ant-design/pull/45512) [#45490](https://github.com/ant-design/ant-design/pull/45490) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Menu. [#45498](https://github.com/ant-design/ant-design/pull/45498) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of DatePicker and TimePicker. [#45497](https://github.com/ant-design/ant-design/pull/45497) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Drawer. [#45496](https://github.com/ant-design/ant-design/pull/45496) [#45417](https://github.com/ant-design/ant-design/pull/45417) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Cascader, TreeSelect and AutoComplete. [#45494](https://github.com/ant-design/ant-design/pull/45494) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Dropdown. [#45486](https://github.com/ant-design/ant-design/pull/45486) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Tour. [#45425](https://github.com/ant-design/ant-design/pull/45425) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Tooltip. [#45422](https://github.com/ant-design/ant-design/pull/45422) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Popover. [#45420](https://github.com/ant-design/ant-design/pull/45420) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Popconfirm. [#45421](https://github.com/ant-design/ant-design/pull/45421) [@kiner-tang](https://github.com/kiner-tang) + - Optimize z-index logic of Modal and Select. [#45346](https://github.com/ant-design/ant-design/pull/45346) [@kiner-tang](https://github.com/kiner-tang) + ## 5.10.3 `2023-10-30` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index cb605d6f3953..c6afbfee3a8d 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -16,6 +16,48 @@ tag: vVERSION --- +## 5.11.0 + +`2023-11-03` + +- Slider + - 🆕 Slider 聚焦滑块时现在会显示 Tooltip。[#45653](https://github.com/ant-design/ant-design/pull/45653) + - 💄 优化 Slider 交互体验,点击轨道后可直接拖拽滑块。[#45651](https://github.com/ant-design/ant-design/pull/45651) +- InputNumber + - 🆕 InputNumber 添加 `changeOnBlur` 属性以支持在失去焦点时不触发 `onChange` 事件。[#45395](https://github.com/ant-design/ant-design/pull/45395) + - 🐞 修复 InputNumber 组件在 Form 组件中使用并且启用 `hasFeedback` 时,反馈图标出现会使 InputNumber 失去焦点的问题。[#45632](https://github.com/ant-design/ant-design/pull/45632) [@MadCcc](https://github.com/MadCcc) + - 🐞 修复 InputNumber 动态改变 `formatter` 不生效的问题。[#45325](https://github.com/ant-design/ant-design/pull/45325) +- Table + - 🆕 Table 组件 `columnTitle` 支持传入 render 方法。[#41937](https://github.com/ant-design/ant-design/pull/41937) [@Zhou-Bill](https://github.com/Zhou-Bill) + - 🛠 重构 Table `ref` 支持 `scrollTo` 以滚动到目标 `key` 或 `index` 或 `top`。[#45245](https://github.com/ant-design/ant-design/pull/45245) +- Tabs + - 🆕 Tabs `items` 支持单个标签页设置 `destroyInactiveTabPane`。[#45359](https://github.com/ant-design/ant-design/pull/45359) + - 🐞 修复 Tabs 的标签宽度存在小数时,滚动会出现抖动的问题。[#45370](https://github.com/ant-design/ant-design/pull/45370) +- ConfigProvider + - 🆕 ConfigProvider 支持 RangePicker 组件的 `className` 和 `style` 属性。[#45479](https://github.com/ant-design/ant-design/pull/45479) [@chenzhuo198](https://github.com/chenzhuo198) + - 🆕 ConfigProvider 支持 Dropdown 组件的 `className` 和 `style` 属性。[#45621](https://github.com/ant-design/ant-design/pull/45621) [@li-jia-nan](https://github.com/li-jia-nan) +- 🆕 ColorPicker 组件 `preset` 新增 `defaultOpen` 属性,可控制预设颜色默认是否展开。[#45607](https://github.com/ant-design/ant-design/pull/45607) [@Wxh16144](https://github.com/Wxh16144) +- 🆕 Select 组件支持 `optionRender` 方法。[#45529](https://github.com/ant-design/ant-design/pull/45529) [@RedJue](https://github.com/RedJue) +- 🆕 Pagination 组件支持组合 `simple` 和 `showSizeChanger` 使用。[#45538](https://github.com/ant-design/ant-design/pull/45538) +- 🆕 Spin 组件新增 `fullscreen` 属性,支持全屏展示。[#44986](https://github.com/ant-design/ant-design/pull/44986) [@Rafael-Martins](https://github.com/Rafael-Martins) [#45436](https://github.com/ant-design/ant-design/pull/45436) [@li-jia-nan](https://github.com/li-jia-nan) +- 🆕 Form `validateFields` 支持 `dirty` 参数以校验被修改过和校验过的字段。[#45389](https://github.com/ant-design/ant-design/pull/45389) +- 🆕 Watermark 支持 `inherit` 配置,关闭水印传导至弹出 Drawer 与 Modal。[#45319](https://github.com/ant-design/ant-design/pull/45319) +- 🆕 App 支持 `component` 以自定义渲染元素。[#45292](https://github.com/ant-design/ant-design/pull/45292) +- 🆕 Input 与 Input.TextArea 支持 `count` 自定义字符计数(例如固定 emoji 字符长度为 `1`);`count.max` 支持超出范围样式;将 emoji 计数还原为原生计数以解决 `maxLength` 与 `value` 不匹配的问题。[#45140](https://github.com/ant-design/ant-design/pull/45140) +- 🐞 修复 Dropdown 在点击菜单项关闭弹出框时不会触发 `onOpenChange` 的问题。[#45378](https://github.com/ant-design/ant-design/pull/45378) +- 💄 Modal 静态方法支持 `styles` 属性。[#45558](https://github.com/ant-design/ant-design/pull/45558) [@KotoriK](https://github.com/KotoriK) +- 💄 优化弹层组件的 `z-index` 逻辑,使其在默认情况下不会互相遮挡。[#45512](https://github.com/ant-design/ant-design/pull/45512) [#45490](https://github.com/ant-design/ant-design/pull/45490) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Menu 组件 `z-index` 逻辑。[#45498](https://github.com/ant-design/ant-design/pull/45498) [@kiner-tang](https://github.com/kiner-tang) + - 优化 DatePicker、TimePicker 组件 `z-index` 逻辑。[#45497](https://github.com/ant-design/ant-design/pull/45497) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Drawer 组件 `z-index` 逻辑。[#45496](https://github.com/ant-design/ant-design/pull/45496) [#45417](https://github.com/ant-design/ant-design/pull/45417) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Cascader、TreeSelect、AutoComplete 组件 `z-index` 逻辑。[#45494](https://github.com/ant-design/ant-design/pull/45494) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Dropdown 组件 `z-index` 逻辑。[#45486](https://github.com/ant-design/ant-design/pull/45486) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Tour 组件 `z-index` 逻辑。[#45425](https://github.com/ant-design/ant-design/pull/45425) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Tooltip 组件 `z-index` 逻辑。[#45422](https://github.com/ant-design/ant-design/pull/45422) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Popover 组件 `z-index` 逻辑。[#45420](https://github.com/ant-design/ant-design/pull/45420) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Popconfirm 组件 `z-index` 逻辑。[#45421](https://github.com/ant-design/ant-design/pull/45421) [@kiner-tang](https://github.com/kiner-tang) + - 优化 Modal、Select 组件 `z-index` 逻辑。[#45346](https://github.com/ant-design/ant-design/pull/45346) [@kiner-tang](https://github.com/kiner-tang) + ## 5.10.3 `2023-10-30` diff --git a/README-zh_CN.md b/README-zh_CN.md index 1d9e5c6e417c..aaa74d60c8e5 100644 --- a/README-zh_CN.md +++ b/README-zh_CN.md @@ -84,7 +84,7 @@ pnpm add antd ## 🔨 示例 -```jsx +```tsx import React from 'react'; import { Button, DatePicker } from 'antd'; @@ -94,6 +94,8 @@ const App = () => ( ); + +export default App; ``` ### 🌈 定制主题 diff --git a/README.md b/README.md index 82971f3c6632..cae195876856 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ pnpm add antd ## 🔨 Usage -```jsx +```tsx import React from 'react'; import { Button, DatePicker } from 'antd'; @@ -94,6 +94,8 @@ const App = () => ( ); + +export default App; ``` ### TypeScript @@ -146,11 +148,11 @@ Open your browser and visit http://127.0.0.1:8001 , see more at [Development](ht ## 🤝 Contributing [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) -Read our [contributing guide](https://ant.design/docs/react/contributing) and let's build a better antd together. +Let's build a better antd together. -We welcome all contributions. Please read our [CONTRIBUTING.md](https://github.com/ant-design/ant-design/blob/master/.github/CONTRIBUTING.md) first. You can submit any ideas as [pull requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :) +We welcome all contributions. Please read our [Contributing Guide](https://ant.design/docs/react/contributing) first. You can submit any ideas as [Pull Requests](https://github.com/ant-design/ant-design/pulls) or as [GitHub Issues](https://github.com/ant-design/ant-design/issues). If you'd like to improve code, check out the [Development Instructions](https://github.com/ant-design/ant-design/wiki/Development) and have a good time! :) -If you are a collaborator, please follow our [Pull Request principle](https://github.com/ant-design/ant-design/wiki/PR-principle) to create a Pull Request with [collaborator template](https://github.com/ant-design/ant-design/compare?expand=1&template=collaborator.md). +If you are a collaborator, please follow our [Pull Request Principle](https://github.com/ant-design/ant-design/wiki/PR-principle) to create a Pull Request with our [Pull Request Template](https://github.com/ant-design/ant-design/wiki/PR-principle#pull-request-template). [![Let's fund issues in this repository](https://raw.githubusercontent.com/BoostIO/issuehunt-materials/master/v1/issuehunt-button-v1.svg)](https://issuehunt.io/repos/34526884) diff --git a/components/_util/__tests__/useZIndex.test.tsx b/components/_util/__tests__/useZIndex.test.tsx new file mode 100644 index 000000000000..cf8382dc2982 --- /dev/null +++ b/components/_util/__tests__/useZIndex.test.tsx @@ -0,0 +1,320 @@ +import type { PropsWithChildren } from 'react'; +import React, { useEffect } from 'react'; +import { render } from '@testing-library/react'; +import type { MenuProps } from 'antd'; +import { + AutoComplete, + Cascader, + ColorPicker, + DatePicker, + Drawer, + Dropdown, + Menu, + Modal, + Popconfirm, + Popover, + Select, + Tooltip, + Tour, + TreeSelect, +} from 'antd'; + +import { waitFakeTimer } from '../../../tests/utils'; +import type { ZIndexConsumer, ZIndexContainer } from '../hooks/useZIndex'; +import { consumerBaseZIndexOffset, containerBaseZIndexOffset, useZIndex } from '../hooks/useZIndex'; +import zIndexContext from '../zindexContext'; + +const WrapWithProvider: React.FC> = ({ + children, + containerType, +}) => { + const [, contextZIndex] = useZIndex(containerType); + return {children}; +}; + +const containerComponent: Record< + ZIndexContainer, + React.FC> +> = { + Modal: ({ children, ...restProps }) => ( + + {children} + + ), + Drawer: ({ children, ...restProps }) => ( + + {children} + + ), + Popover: ({ children, ...restProps }) => ( + + {children} + + ), + Popconfirm: ({ children, ...restProps }) => ( + + {children} + + ), + Tooltip: ({ children, ...restProps }) => ( + + {children} + + ), + Tour: ({ children, ...restProps }) => ( + + ), +}; + +const options = [ + { + label: 'Option 1', + value: '1', + }, + { + label: 'Option 2', + value: '2', + }, +]; + +const items: MenuProps['items'] = [ + { + label: 'Test', + key: 'SubMenu', + children: [ + { + type: 'group', + label: 'Item 1', + children: [ + { + label: 'Option 1', + key: 'setting:1', + }, + { + label: 'Option 2', + key: 'setting:2', + }, + ], + }, + { + type: 'group', + label: 'Item 2', + children: [ + { + label: 'Option 3', + key: 'setting:3', + }, + { + label: 'Option 4', + key: 'setting:4', + }, + ], + }, + ], + }, +]; + +const consumerComponent: Record> = { + SelectLike: ({ rootClassName, ...props }) => ( + <> + + + + 12 / 10 + + + + +
+
+ Emoji count as length 1 +
+ + + + + 3 + + + +
+
+
+ Not exceed max +
+ + + + + 6 / 6 + + + +
+ +`; + +exports[`renders components/input/demo/advance-count.tsx extend context correctly 2`] = `[]`; + exports[`renders components/input/demo/align.tsx extend context correctly 1`] = ` Array [
@@ -10347,15 +10435,14 @@ Array [ 0 / 20 - , -
, -
, +