Skip to content

Commit

Permalink
Merge branch 'main' into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
07akioni committed Oct 2, 2023
2 parents c3c9278 + 79cdba5 commit 121a983
Show file tree
Hide file tree
Showing 177 changed files with 1,787 additions and 661 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,20 @@ on:
branches: [ main, feat, docs ]

jobs:
build:
lint:
environment: test

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.15]
node-version: [18]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
Expand All @@ -38,11 +35,31 @@ jobs:
- name: Lint
run: pnpm run lint

test:
environment: test

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3

- name: Install pnpm
run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- run: pnpm install

- name: Test
run: pnpm run test:cov

- name: Code coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

token: ${{ secrets.CODECOV_TOKEN }}
59 changes: 58 additions & 1 deletion CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# CHANGELOG

## 2.35.0

### Breaking Changes

- `n-input`'s `suffix` to the back of `loading`, close [#4685](https://github.com/tusen-ai/naive-ui/issues/4685).
- Fix `n-log`'s `silent` attribute spelling problem, closes [#4875](https://github.com/tusen-ai/naive-ui/issues/4875).

### Fixes

- Fix `n-radio` export `radioProps` dosen't not includes `theme-overrides`.
- Fix `n-description-item`'s `span` doesn't work when `n-descriptions`'s `label-placement` is `'top'` if there's only single line, closes [#4874](https://github.com/tusen-ai/naive-ui/issues/4874).
- Fix `n-upload`'s `data` prop type can't include `Blob` element.
- Fix `n-select` allows option to be created with existed label, closes [#4703](https://github.com/tusen-ai/naive-ui/issues/4703)
- Fix `n-upload`'s `render-icon` prop's type.
- Fix `n-auto-complete`'s `onSelect` type, closes [#4617](https://github.com/tusen-ai/naive-ui/issues/4617).
- Fix `n-grid-item`'s suffix prop won't work with responsive config, closes [#4635](https://github.com/tusen-ai/naive-ui/issues/4635)
- Fix `n-tabs`'s `paneWrapperStyle` prop missing height after animation
- Fix `n-tree` should check all items instead of uncheck all if indeterminate checkbox is clicked, closes [#4941](https://github.com/tusen-ai/naive-ui/issues/4941).
- Fix the Popover was not displayed when the `n-internal-selection` was disabled and the mouse was moved over the '+n' tag. closes [#4789](https://github.com/tusen-ai/naive-ui/issues/4789)
- Fix `n-input` doesn't display the horizontal scroll bar when `type` is `textarea`, closes [#4570](https://github.com/tusen-ai/naive-ui/issues/4570).
- Fix `n-alert`'s content style problem, when there is no title and use closable, closes [#4588](https://github.com/tusen-ai/naive-ui/issues/4588).
- Fix `n-select`'s `empty` slot action then it is an interactive component, closes [#4700](https://github.com/tusen-ai/naive-ui/issues/4700).
- Fix `n-data-table` header and body's scrolling are not sync when using the keyboard, closes [#3941](https://github.com/tusen-ai/naive-ui/issues/3941).
- Fix `n-data-table` drag column causing text selection in Safari, closes [#4957](https://github.com/tusen-ai/naive-ui/issues/4957).
- Fix `n-data-table` ellipsis content in table cell would wrap with expand button when using tree data, closes [#3755](https://github.com/tusen-ai/naive-ui/issues/3755).
- Fix `useLoadingBar` can't finish loading when called `finish` method, closes [#4965](https://github.com/tusen-ai/naive-ui/issues/4965).
- Fix `n-select` can still trigger focus and blur event in the disabled state, closes [#4454](https://github.com/tusen-ai/naive-ui/issues/4454).
- Fix `n-steps` may have line wrap issue if step is more than 9.
- Fix `n-grid` v-show reports errors when switching multiple times, closes [#4422](https://github.com/tusen-ai/naive-ui/issues/4422).
- Fix `n-tree`'s `TreeOption`'s `checkboxDisabled` prop doesn't work when `check-on-click` is `true`.
- Fix rapid clicks on `n-date-input`'s buttons triggering a text select for the rest of the website.
- Fix `n-auto-complete`'s autocomplete menu's unexpected open when clicking the clear icon with the input not focused, closes [#4658](https://github.com/tusen-ai/naive-ui/issues/4658).
- Fix `n-input`'s `on-keyup` prop type, closes [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)
- Fix `n-popconfirm`'s action button should not be triggered multiple times,closes [#4687](https://github.com/tusen-ai/naive-ui/issues/4687).

### Features

- `n-drawer` adds `max-height`, `min-height`, `max-width` and `max-width` props.
- `n-progress` supports indicator slot when the `indicator-placement` is set to `'inside'` in the `'line'` type, closes [#4888](https://github.com/tusen-ai/naive-ui/issues/4888).
- `n-image-preview` adds `downaload` button, closes [#4302](https://github.com/tusen-ai/naive-ui/issues/4302).
- `n-transfer` adds `select-all-text` and `clear-text` prop, closes [#4910](https://github.com/tusen-ai/naive-ui/issues/4910).
- `n-tree` adds `scrollbar-props` prop, closes [#4021](https://github.com/tusen-ai/naive-ui/issues/4666).
- `n-select` adds `focusInput` `blurInput` methods.
- `n-tree-select` adds `focusInput` `blurInput` methods.
- `n-image-group` adds `on-preview-prev` `on-preview-next` prop
- `n-tree` adds `show-line` prop, closes [#3796](https://github.com/tusen-ai/naive-ui/issues/3796), [#4554](https://github.com/tusen-ai/naive-ui/pull/4554)
- `n-tree` adds node information for `render-switcher-icon` props, closes [#4815](https://github.com/tusen-ai/naive-ui/issues/4815).
- `n-input-number` export the `select` method.
- `n-data-table` adds `n-data-table-tr--expanded` class to expanded rows, and `n-data-table-tr n-data-table-tr--expand` class to the additional row, closes [#4420](https://github.com/tusen-ai/naive-ui/issues/4420).
- `n-spin` adds `delay` prop.
- Adds `n-performant-ellipsis` component.
- `DataTableBaseColumn` adds `ellipsisComponent` prop.

### i18n

- Update `zhTW` locale.
- Add `svSE` locale.

## 2.34.4

### Fixes
Expand All @@ -21,7 +79,6 @@
- `n-data-table` adds `titleAlign` prop, closes [#3954](https://github.com/tusen-ai/naive-ui/issues/3954).
- `n-rate` exposes `index` in the default slot, closes [#4413](https://github.com/tusen-ai/naive-ui/issues/4413).
- `n-scrollbar` adds `size` prop, closes [#3896](https://github.com/tusen-ai/naive-ui/issues/3896).
- `n-select` adds `keyboard` prop, closes [#4340](https://github.com/tusen-ai/naive-ui/issues/4340).
- `n-data-table`'s `render-expand-icon` add `expanded` param, closes [#4439](https://github.com/tusen-ai/naive-ui/issues/4439).
- `n-tabs` adds `pane-wrapper-class` `pane-wrapper-style` prop.
- `n-collapse` adds `titlePadding` theme variable, closes [#4728](https://github.com/tusen-ai/naive-ui/issues/4728).
Expand Down
58 changes: 58 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# CHANGELOG

## 2.35.0

### Breaking Changes

- `n-input``suffix` 移动到 `loading` 之后,关闭 [#4685](https://github.com/tusen-ai/naive-ui/issues/4685)
- 修复 `n-log``silent` 拼写问题,关闭 [#4875](https://github.com/tusen-ai/naive-ui/issues/4875)

### Fixes

- 修复 `n-radio` 导出的 `radioProps` 未包含 `theme-overrides`
- 修复 `n-descriptions``label-placement``'top'` 的时候并且只有一列的时候,生成的 table 缺少对应的列导致 `n-description-item``span` 属性失效,关闭 [#4874](https://github.com/tusen-ai/naive-ui/issues/4874)
- 修复 `n-upload``data` 属性类型不能包含 `Blob` 元素
- 修复 `n-select` 动态添加选项时,可以添加已存在的选项,关闭 [#4703](https://github.com/tusen-ai/naive-ui/issues/4703)
- 修复 `n-upload` `render-icon` 属性的类型
- 修复 `n-auto-complete``onSelect` 类型,关闭[#4617](https://github.com/tusen-ai/naive-ui/issues/4617)
- 修复 `n-grid-item` 属性 suffix 响应式设置不生效,关闭[#4635](https://github.com/tusen-ai/naive-ui/issues/4635)
- 修复 `n-tabs``paneWrapperStyle` 属性在动画后丢失高度
- 修复 `n-tree` 在级联选择下点击半选状态勾选框时应选中全部而不是清空已选,关闭 [#4941](https://github.com/tusen-ai/naive-ui/issues/4941)
- 修复 `n-internal-selection``disabled` 时,鼠标移动到 `+n` 标签上时,未展示 popover,关闭 [#4789](https://github.com/tusen-ai/naive-ui/issues/4789)
- 修复 `n-input``type``textarea` 时不显示纵向滚动条的问题,关闭 [#4570](https://github.com/tusen-ai/naive-ui/issues/4570)
- 修复 `n-alert` 在没有标题且可关闭时,内容样式出现的问题,关闭 [#4588](https://github.com/tusen-ai/naive-ui/issues/4588)
- 修复 `n-select``empty` slot 为可交互组件时的行为,关闭 [#4700](https://github.com/tusen-ai/naive-ui/issues/4700)
- 修复 `n-data-table` 使用按键滚动时 header 和 body 不同步,关闭 [#3941](https://github.com/tusen-ai/naive-ui/issues/3941)
- 修复 `n-data-table` 在 Safari 中拖拽列时文本会被选中, 关闭 [#4957](https://github.com/tusen-ai/naive-ui/issues/4957)
- 修复 `n-data-table` 当使用树形表格时,某一列设置了固定宽度且 ellipsis: true 后,如果文字溢出,不会显示省略号,而是换行[#3755](https://github.com/tusen-ai/naive-ui/issues/3755)
- 修复 `useLoadingBar` 调用 `finish` 方法无法结束加载,关闭 [#4965](https://github.com/tusen-ai/naive-ui/issues/4965)
- 修复 `n-select``disabled` 的情况下还可以触发 `focus``blur`,关闭 [#4454](https://github.com/tusen-ai/naive-ui/issues/4454)
- 修复 `n-steps` 在超过 9 个步数的时候换行可能存在问题
- 修复 `n-form-item-gi` v-show 多次切换报错,关闭 [#4422](https://github.com/tusen-ai/naive-ui/issues/4422)
- 修复 `n-tree` `check-on-click``true` 时,`TreeOption` `checkboxDisabled` 不生效
- 修复 `n-date-input` 的按钮快速点击时网站其余文本会被选中
- 修复 `n-auto-complete` 在未聚焦状态下点击清除按钮时补全菜单意外打开的问题,关闭 [#4658](https://github.com/tusen-ai/naive-ui/issues/4658)
- 修复 `n-input` 属性 `on-keyup` 类型,关闭 [#5101](https://github.com/tusen-ai/naive-ui/issues/5101)
- 修复 `n-popconfirm` 操作按钮不应该被多次触发,关闭 [#4687](https://github.com/tusen-ai/naive-ui/issues/4687)

### Features

- `n-drawer` 新增 `max-height``min-height``max-width``max-width` 属性
- `n-progress``'line'` 类型下设置指标位置为 `'inside'` 时支持指示标插槽,关闭 [#4888](https://github.com/tusen-ai/naive-ui/issues/4888)
- `n-image-preview` 新增 `downaload` 按钮,关闭 [#4302](https://github.com/tusen-ai/naive-ui/issues/4302)
- `n-transfer` 新增 `select-all-text``clear-text` 属性,关闭 [#4910](https://github.com/tusen-ai/naive-ui/issues/4910)
- `n-tree` 新增 `scrollbar-props` 属性,关闭 [#4021](https://github.com/tusen-ai/naive-ui/issues/4666)
- `n-select` 新增 `focusInput` `blurInput` 方法
- `n-tree-select` 新增 `focusInput` `blurInput` 方法
- `n-image-group` 新增 `on-preview-prev` `on-preview-next` 属性
- `n-tree` 新增 `show-line` 属性,关闭 [#3796](https://github.com/tusen-ai/naive-ui/issues/3796)[#4554](https://github.com/tusen-ai/naive-ui/issues/4554)
- `n-tree``render-switcher-icon` 属性添加节点信息,关闭 [#4815](https://github.com/tusen-ai/naive-ui/issues/4815)
- `n-input-number` 导出 `select` 方法
- `n-data-table` 新增 `n-data-table-tr--expanded` class 到展开行,新增 `n-data-table-tr n-data-table-tr--expand` class 到附加行,关闭 [#4420](https://github.com/tusen-ai/naive-ui/issues/4420)
- `n-spin` 新增 `delay` 属性
- 新增 `n-performant-ellipsis` 组件
- `DataTableBaseColumn` 新增 `ellipsisComponent` 属性

### i18n

- 更新 zhTW locale
- 新增 svSE locale

## 2.34.4

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion demo/pages/docs/community/enUS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ If you want to contribute excellent resources, please contact 07akioni or amadeu
| [GoView](https://github.com/dromara/go-view) | A free open source and powerful yet accessible data visualization tool. |
| [Dolphin Admin](https://dolphin-admin.bit-ocean.studio) | An open-source, light-weight, elegant, support i18n back-end management template based on Vue 3 + Vite + Naive UI + TypeScript + TailwindCSS. |
| [Vue Naive Admin](https://github.com/zclzone/vue-naive-admin) | A lightweight backend management template base on Vue3 + Vite4 + Pinia + Unocss + Naive UI. |

| [Celeris Web](https://github.com/kirklin/celeris-web) | Celeris Web, based on Vue 3 and Vite, is a free and open-source front-end framework with Naive UI components and TypeScript support, featuring a Monorepo structure. It also integrates with OpenAI, providing natural language processing capabilities for modern web development. |
1 change: 1 addition & 0 deletions demo/pages/docs/community/zhCN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Naive-ui 是统一设计规范的高质量 Vue 组件库,我们倾向于只提
| [GoView](https://gitee.com/dromara/go-view) | 开源、精美、便捷的「数据可视化」低代码开发平台 |
| [Dolphin Admin](https://dolphin-admin.bit-ocean.studio) | 基于 Vue 3 + Vite + Naive UI + TypeScript + TailwindCSS 的开源、轻量级、优雅精致、支持国际化的后台管理模板 |
| [Vue Naive Admin](https://github.com/zclzone/vue-naive-admin) | 基于 Vue3 + Vite4 + Pinia + Unocss + Naive UI 的轻量级后台管理模板 |
| [Celeris Web](https://github.com/kirklin/celeris-web) | 一个基于 Vue 3 和 Vite 的免费开源前端框架,具有 Naive UI 组件和 TypeScript 支持,采用 Monorepo 结构。它还集成了 OpenAI,为现代 Web 开发提供自然语言处理能力。 |
1 change: 1 addition & 0 deletions demo/pages/docs/i18n/enUS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ The following list is sorted by 'Config' column.
| Portuguese (Brazil) | ptBR | datePtBR | 2.28.1 |
| Russian | ruRU | dateRuRU | |
| Slovak | skSK | dateSkSK | 2.25.3 |
| Swedish | svSE | dateSvSE | 2.35.0 |
| Thai (Thailand) | thTH | dateThTH | 2.27.0 |
| Turkish | trTR | dateTrTR | 2.34.0 |
| Ukrainian | ukUA | dateUkUA | |
Expand Down
1 change: 1 addition & 0 deletions demo/pages/docs/i18n/zhCN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Naive-ui 通过使用 `n-config-provider` 调整语言,默认情况下所有
| 葡萄牙语 (巴西) | ptBR | datePtBR | 2.28.1 |
| 俄罗斯语 | ruRU | dateRuRU | |
| 斯洛伐克语 | skSK | dateSkSK | 2.25.3 |
| 瑞典語 | svSE | dateSvSE | 2.35.0 |
| 泰语(泰国) | thTH | dateThTH | 2.27.0 |
| 土耳其语 | trTR | dateTrTR | 2.34.0 |
| 乌克兰语 | ukUA | dateUkUA | |
Expand Down
2 changes: 1 addition & 1 deletion demo/pages/docs/ssr/enUS/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineNuxtConfig({
optimizeDeps: {
include:
process.env.NODE_ENV === 'development'
? ['naive-ui', 'vueuc', 'date-fns-tz/esm/formatInTimeZone']
? ['naive-ui', 'vueuc', 'date-fns-tz/formatInTimeZone']
: []
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/pages/docs/ssr/zhCN/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default defineNuxtConfig({
optimizeDeps: {
include:
process.env.NODE_ENV === 'development'
? ['naive-ui', 'vueuc', 'date-fns-tz/esm/formatInTimeZone']
? ['naive-ui', 'vueuc', 'date-fns-tz/formatInTimeZone']
: []
}
}
Expand Down
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ module.exports = {
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'^lodash-es$': 'lodash',
'^date-fns/esm(.*)$': 'date-fns$1',
'^date-fns-tz/esm(.*)$': 'date-fns-tz$1'
'^date-fns/esm(.*)$': 'date-fns$1'
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down
Loading

0 comments on commit 121a983

Please sign in to comment.