Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D2M #14285

Merged
merged 27 commits into from
Sep 14, 2023
Merged

D2M #14285

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e5ebf80
fix(components): [select] gurad value type error (#14074)
sseinHu Aug 28, 2023
2b3a34e
refactor(components): [upload] reuse revkoeObjectURL function (#14126)
HeftyKoo Aug 28, 2023
69750fb
fix(components): [collapse] allow nested inputs in ElCollapseItem (#1…
kinggq Aug 28, 2023
d73bf47
docs: [select-v2] add item-height attribute into doc (#14033)
wonderl17 Aug 28, 2023
68980b3
docs(components): [collapse] (#14066)
btea Aug 28, 2023
cea00f0
fix(components): [rate] bind the textColor property (#14092)
yj-liuzepeng Aug 28, 2023
5c03a34
chore(ci): modify nightly release `PKG_NAME` value (#14147)
btea Aug 29, 2023
ee8f157
refactor(components): [collapse] replace `keypress` with `keydown` (#…
btea Aug 29, 2023
5f028f8
fix(components): [table] add tabindex to tbody to fix #13991 (#14020)
FrankFang Aug 30, 2023
3c1bd4e
fix(components): [form] improve types (#14062)
ModyQyW Aug 30, 2023
6cc5892
fix(components): [select] fix hover index error when creating option …
wzc520pyfm Aug 31, 2023
86beace
fix(i18n): improve Dutch(nl) translation (#14164)
JBtje Sep 1, 2023
ce2315d
docs(components): message-box (#14179)
TomatoDroid Sep 4, 2023
9a60a90
feat(components): [el-pagination] add teleported prop (#14072)
boomboy4 Sep 6, 2023
95494b7
feat(components): [image-viewer] Add rotate event when rotating image…
HADB Sep 6, 2023
9b0a8f8
chore: format (#14200)
btea Sep 7, 2023
c7021b3
refactor(components): [date-picker] add aria-labels to date picker bt…
Karolis-Stoncius Sep 8, 2023
82e9d07
fix(components): [color-picker] first click should be trigger (#14209)
wonderl17 Sep 8, 2023
d96555f
feat(components): [upload] support async data (#14015)
jianjunyuu Sep 8, 2023
0b14c51
fix(docs): [date-picker] `calendar-change` event parameter type error…
btea Sep 9, 2023
27e2c59
docs: refactor switch theme (#14036)
btea Sep 9, 2023
5d7532d
fix(docs): [upload] fix the version of supporting async data (#14242)
HADB Sep 10, 2023
06e8582
refactor(components): [date-picker] basic-date-table (#10344)
jw-foss Sep 10, 2023
d791229
fix(components): [collapse] fix accessibility issues (#13832)
Karolis-Stoncius Sep 12, 2023
6e24736
fix(components): [date-picker] month range should emit `calendar-chan…
Justineo Sep 13, 2023
09bb91a
fix(components): [input] missing autofocus types (#14246)
HeftyKoo Sep 14, 2023
4cccc76
chore: Update changelog 2.3.13 (#14286)
element-bot Sep 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
## Changelog

### 2.3.13

_2023-09-14_

#### Features

- Components [el-pagination] add teleported prop (#14072 by @boomboy4)
- Components [image-viewer] Add rotate event when rotating images (#14138 by @HADB)
- Components [upload] support async data (#14015 by @jianjunyuu)

#### Bug fixes

- Components [select] gurad value type error (#14074 by @sseinHu)
- Components [collapse] allow nested inputs in ElCollapseItem (#14061 by @kinggq)
- Components [rate] bind the textColor property (#14092 by @yj-liuzepeng)
- Components [table] add tabindex to tbody to fix #13991 (#14020 by @FrankFang)
- Components [form] improve types (#14062 by @ModyQyW)
- Components [select] fix hover index error when creating option (#12635 by @wzc520pyfm)
- I18n improve Dutch(nl) translation (#14164 by @JBtje)
- Components [color-picker] first click should be trigger (#14209 by @wonderl17)
- Docs [date-picker] `calendar-change` event parameter type error (#14237 by @btea)
- Docs [upload] fix the version of supporting async data (#14242 by @HADB)
- Components [collapse] fix accessibility issues (#13832 by @Karolis-Stoncius)
- Components [date-picker] month range should emit `calendar-change` (#14262 by @Justineo)
- Components [input] missing autofocus types (#14246 by @HeftyKoo)

#### Refactors

- Components [upload] reuse revkoeObjectURL function (#14126 by @HeftyKoo)
- Components [collapse] replace `keypress` with `keydown` (#14137 by @btea)
- Components [date-picker] add aria-labels to date picker btns (#14149 by @Karolis-Stoncius)
- Components [date-picker] basic-date-table (#10344 by @jw-foss)

### 2.3.11

Expand Down
11 changes: 7 additions & 4 deletions docs/.vitepress/vitepress/components/common/vp-theme-toggler.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
import { isDark } from '../../composables/dark'
import { isDark, toggleDark } from '../../composables/dark'
import DarkIcon from '../icons/dark.vue'
import LightIcon from '../icons/light.vue'

const darkMode = ref(isDark.value)

watch(
() => isDark.value,
(val) => {
darkMode.value = val
() => darkMode.value,
() => {
toggleDark()
}
)
</script>
Expand All @@ -31,16 +31,19 @@ watch(
--el-switch-on-color: var(--bg-color-mute);
--el-switch-off-color: var(--bg-color-mute);
--el-switch-border-color: var(--border-color);

.el-switch__action {
width: 14px;
height: 14px;
}
}

:deep(.dark-icon) {
border-radius: 50%;
color: #cfd3dc;
background-color: #141414;
}

:deep(.light-icon) {
color: #606266;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import CommonThemeToggler from '../common/vp-theme-toggler.vue'
import { isDark, toggleDark } from '../../composables/dark'
import { isDark } from '../../composables/dark'
import { useNavbarLocale } from '../../composables/navbar-locale'

const locale = useNavbarLocale()
Expand All @@ -12,7 +12,6 @@ const locale = useNavbarLocale()
<CommonThemeToggler
:aria-label="locale['theme-toggler']"
:aria-checked="isDark"
@click="toggleDark()"
/>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { isDark, toggleDark } from '../../composables/dark'
import { isDark } from '../../composables/dark'
import { useNavbarLocale } from '../../composables/navbar-locale'
import CommonThemeToggler from '../common/vp-theme-toggler.vue'

Expand All @@ -11,13 +11,13 @@ const locale = useNavbarLocale()
<CommonThemeToggler
:aria-label="locale['theme-toggler']"
:aria-checked="isDark"
@click="() => toggleDark()"
/>
</div>
</template>

<style scoped lang="scss">
@use '../../styles/mixins' as *;

.theme-toggler-content {
@include with-bg;
background-color: transparent;
Expand Down
10 changes: 5 additions & 5 deletions docs/en-US/component/card.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ card/shadow

### Attributes

| Name | Description | Type | Default |
| ---------- | ------------------------------------------------------------- | --------------------------------- | ------- |
| header | title of the card. Also accepts a DOM passed by `slot#header` | ^[string] | — |
| body-style | CSS style of card body | ^[object]`CSSProperties` | — |
| Name | Description | Type | Default |
| -------------------- | ------------------------------------------------------------- | --------------------------------- | ------- |
| header | title of the card. Also accepts a DOM passed by `slot#header` | ^[string] | — |
| body-style | CSS style of card body | ^[object]`CSSProperties` | — |
| body-class ^(2.3.10) | custom class name of card body | ^[string] | — |
| shadow | when to show card shadows | ^[enum]`always \| never \| hover` | always |
| shadow | when to show card shadows | ^[enum]`always \| never \| hover` | always |

### Slots

Expand Down
52 changes: 28 additions & 24 deletions docs/en-US/component/collapse.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,40 @@ collapse/customization

:::

## Collapse Attributes
## Collapse API

| Name | Description | Type | Accepted Values | Default |
| --------------------- | ---------------------------------- | ---------------------------------------------------- | --------------- | ------- |
| model-value / v-model | currently active panel | string (accordion mode) / array (non-accordion mode) | — | — |
| accordion | whether to activate accordion mode | boolean | — | false |
### Collapse Attributes

## Collapse Events
| Name | Description | Type | Default |
| --------------------- | ---------------------------------- | ---------------------------------------------------------- | ------- |
| model-value / v-model | currently active panel | ^[string] (accordion mode) / ^[array] (non-accordion mode) | — |
| accordion | whether to activate accordion mode | ^[boolean] | false |

| Name | Description | Parameters |
| ------ | ---------------------------------- | ------------------------------------------------------------------- |
| change | triggers when active panels change | (activeNames: array (non-accordion mode) / string (accordion mode)) |
### Collapse Events

## Collapse Slots
| Name | Description | Parameters |
| ------ | ---------------------------------- | --------------------------------------------------------------------- |
| change | triggers when active panels change | `(activeNames: array (non-accordion mode) / string (accordion mode))` |

| Name | Description | Subtags |
| ---- | ------------------------- | ------------- |
| - | customize default content | Collapse Item |
### Collapse Slots

## Collapse Item Attributes
| Name | Description | Subtags |
| ------- | ------------------------- | ------------- |
| default | customize default content | Collapse Item |

| Name | Description | Type | Accepted Values | Default |
| -------- | ---------------------------------- | ------------- | --------------- | ------- |
| name | unique identification of the panel | string/number | — | — |
| title | title of the panel | string | — | — |
| disabled | disable the collapse item | boolean | — | — |
## Collapse Item API

## Collapse Item Slot
### Collapse Item Attributes

| Name | Description |
| ----- | ------------------------------ |
| — | content of Collapse Item |
| title | content of Collapse Item title |
| Name | Description | Type | Default |
| -------- | ---------------------------------- | ------------------- | ------- |
| name | unique identification of the panel | ^[string]/^[number] | — |
| title | title of the panel | ^[string] | — |
| disabled | disable the collapse item | ^[boolean] | — |

### Collapse Item Slot

| Name | Description |
| ------- | ------------------------------ |
| default | content of Collapse Item |
| title | content of Collapse Item title |
18 changes: 9 additions & 9 deletions docs/en-US/component/date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,19 @@ Note, date time locale (month name, first day of the week ...) are also configur

## Events

| Name | Description | Parameters |
| --------------- | ------------------------------------------------------------------------- | ----------------------- |
| change | triggers when user confirms the value | `(val: typeof v-model)` |
| blur | triggers when Input blurs | `(e: FocusEvent)` |
| focus | triggers when Input focuses | `(e: FocusEvent)` |
| calendar-change | triggers when the calendar selected date is changed. Only for `daterange` | `(val: [Date, Date])` |
| panel-change | triggers when the navigation button click. | `(date, mode, view)` |
| visible-change | triggers when the DatePicker's dropdown appears/disappears | `(visibility: boolean)` |
| Name | Description | Parameters |
| --------------- | ---------------------------------------------------------- | ----------------------------- |
| change | triggers when user confirms the value | `(val: typeof v-model)` |
| blur | triggers when Input blurs | `(e: FocusEvent)` |
| focus | triggers when Input focuses | `(e: FocusEvent)` |
| calendar-change | triggers when the calendar selected date is changed. | `(val: [Date, null \| Date])` |
| panel-change | triggers when the navigation button click. | `(date, mode, view)` |
| visible-change | triggers when the DatePicker's dropdown appears/disappears | `(visibility: boolean)` |

## Methods

| Method | Description | Parameters |
|-----------------------| --------------------------- | ---------- |
| --------------------- | --------------------------- | ---------- |
| focus | focus the Input component | — |
| handleOpen ^(2.2.16) | open the DatePicker popper | — |
| handleClose ^(2.2.16) | close the DatePicker popper | — |
Expand Down
34 changes: 33 additions & 1 deletion docs/en-US/component/form.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,39 @@ type FormValidateCallback = (
interface FormItemRule extends RuleItem {
trigger?: Arrayable<string>
}
type FormRules = Partial<Record<string, Arrayable<FormItemRule>>>

type Primitive = null | undefined | string | number | boolean | symbol | bigint
type BrowserNativeObject = Date | FileList | File | Blob | RegExp
type IsTuple<T extends ReadonlyArray<any>> = number extends T['length']
? false
: true
type ArrayMethodKey = keyof any[]
type TupleKey<T extends ReadonlyArray<any>> = Exclude<keyof T, ArrayMethodKey>
type ArrayKey = number
type PathImpl<K extends string | number, V> = V extends
| Primitive
| BrowserNativeObject
? `${K}`
: `${K}` | `${K}.${Path<V>}`
type Path<T> = T extends ReadonlyArray<infer V>
? IsTuple<T> extends true
? {
[K in TupleKey<T>]-?: PathImpl<Exclude<K, symbol>, T[K]>
}[TupleKey<T>]
: PathImpl<ArrayKey, V>
: {
[K in keyof T]-?: PathImpl<Exclude<K, symbol>, T[K]>
}[keyof T]
type FieldPath<T> = T extends object ? Path<T> : never
// MaybeRef: see [@vueuse/core](https://github.com/vueuse/vueuse/blob/main/packages/shared/utils/types.ts)
// UnwrapRef: see [vue](https://github.com/vuejs/core/blob/main/packages/reactivity/src/ref.ts)
type FormRules<T extends MaybeRef<Record<string, any> | string> = string> =
Partial<
Record<
UnwrapRef<T> extends string ? UnwrapRef<T> : FieldPath<UnwrapRef<T>>,
Arrayable<FormItemRule>
>
>
```

</details>
1 change: 1 addition & 0 deletions docs/en-US/component/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ image/image-preview
| ------ | ------------------------------------------------------------------------------------------------- | ------------------------------------ |
| close | trigger when clicking on close button or when `hide-on-click-modal` enabled clicking on backdrop. | ^[Function]`() => void` |
| switch | trigger when switching images. | ^[Function]`(index: number) => void` |
| rotate ^(2.3.13) | trigger when rotating images. | ^[Function]`(deg: number) => void` |

### Image Viewer Exposes

Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/component/input-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ input-number/controlled
### Attributes

| Name | Description | Type | Default |
|-------------------------| ------------------------------------------------ | --------------------------------------------- | --------- |
| ----------------------- | ------------------------------------------------ | --------------------------------------------- | --------- |
| model-value / v-model | binding value | ^[number] | — |
| min | the minimum allowed value | ^[number] | -Infinity |
| max | the maximum allowed value | ^[number] | Infinity |
Expand Down
6 changes: 3 additions & 3 deletions docs/en-US/component/message-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,16 @@ The corresponding methods are: `ElMessageBox`, `ElMessageBox.alert`, `ElMessageB
### Options

| Name | Description | Type | Default |
|------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------- |------------------------------------------------------------------------------------| ------------------------------------------------ |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------ |
| autofocus | auto focus when open MessageBox | ^[boolean] | true |
| title | title of the MessageBox | ^[string] | '' |
| message | content of the MessageBox | ^[string] / ^[VNode] / ^[Function]`() => VNode` ^(2.2.17) | — |
| dangerouslyUseHTMLString | whether `message` is treated as HTML string | ^[boolean] | false |
| type | message type, used for icon display | ^[enum]`'success' \ | 'info' \| 'warning' \| 'error'` | '' |
| type | message type, used for icon display | ^[enum]`'success' \| 'info' \| 'warning' \| 'error'` | '' |
| icon | custom icon component, overrides `type` | ^[string] / ^[Component] | '' |
| custom-class | custom class name for MessageBox | ^[string] | '' |
| custom-style | custom inline style for MessageBox | ^[CSSProperties] | {} |
| callback | MessageBox closing callback if you don't prefer Promise | ^[Function]`(value: string, action: Action) => any \ | (action: Action) => any` | null |
| callback | MessageBox closing callback if you don't prefer Promise | ^[Function]`(value: string, action: Action) => any \| (action: Action) => any` | null |
| showClose | whether to show close icon of MessageBox | ^[boolean] | true |
| before-close | callback before MessageBox closes, and it will prevent MessageBox from closing | ^[Function]`(action: Action, instance: MessageBoxState, done: () => void) => void` | null |
| distinguish-cancel-and-close | whether to distinguish canceling and closing the MessageBox | ^[boolean] | false |
Expand Down