Skip to content

Commit 9ad5d46

Browse files
Merge branch 'coreui:main' into main
2 parents 49a9c5e + b85adb2 commit 9ad5d46

File tree

17 files changed

+874
-674
lines changed

17 files changed

+874
-674
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
Several quick start options are available:
4848

49-
- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v4.3.1.zip)
49+
- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v4.4.0.zip)
5050
- Clone the repo: `git clone https://github.com/coreui/coreui-vue.git`
5151
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue`
5252
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue`

lerna.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"packages/*"
55
],
66
"useWorkspaces": true,
7-
"version": "4.3.1"
7+
"version": "4.4.0"
88
}

package.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@
2020
"test:update": "jest --coverage --updateSnapshot"
2121
},
2222
"devDependencies": {
23-
"@types/jest": "^28.1.6",
24-
"@typescript-eslint/eslint-plugin": "^5.30.7",
25-
"@typescript-eslint/parser": "^5.30.7",
26-
"@vue/compiler-sfc": "^3.2.37",
23+
"@types/jest": "^28.1.8",
24+
"@typescript-eslint/eslint-plugin": "^5.37.0",
25+
"@typescript-eslint/parser": "^5.37.0",
26+
"@vue/compiler-sfc": "^3.2.39",
2727
"@vue/eslint-config-prettier": "^7.0.0",
28-
"@vue/eslint-config-typescript": "^11.0.0",
28+
"@vue/eslint-config-typescript": "^11.0.1",
2929
"@vue/vue3-jest": "28.0.1",
30-
"eslint": "8.20.0",
30+
"eslint": "8.23.1",
3131
"eslint-plugin-prettier": "^4.2.1",
32-
"eslint-plugin-vue": "^9.3.0",
32+
"eslint-plugin-vue": "^9.5.1",
3333
"jest": "^28.1.3",
3434
"jest-canvas-mock": "^2.4.0",
3535
"jest-environment-jsdom": "^28.1.3",
3636
"lerna": "^4.0.0",
3737
"prettier": "^2.7.1",
38-
"ts-jest": "^28.0.7"
38+
"ts-jest": "^28.0.8"
3939
}
4040
}

packages/coreui-vue-chartjs/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@
3636
},
3737
"devDependencies": {
3838
"@coreui/chartjs": "^3.0.0",
39-
"@rollup/plugin-commonjs": "^22.0.1",
39+
"@rollup/plugin-commonjs": "^22.0.2",
4040
"@rollup/plugin-node-resolve": "^13.3.0",
41-
"@rollup/plugin-typescript": "^8.3.3",
42-
"@types/lodash": "^4.14.181",
41+
"@rollup/plugin-typescript": "^8.5.0",
42+
"@types/lodash": "^4.14.185",
4343
"@vue/test-utils": "^2.0.2",
4444
"chart.js": "^3.8.2",
4545
"lodash": "^4.17.21",
46-
"rollup": "^2.77.0",
46+
"rollup": "^2.79.0",
4747
"rollup-plugin-peer-deps-external": "^2.2.4",
4848
"rollup-plugin-vue": "^6.0.0",
49-
"typescript": "^4.7.4",
50-
"vue": "^3.2.37",
51-
"vue-types": "^4.2.0"
49+
"typescript": "^4.8.3",
50+
"vue": "^3.2.39",
51+
"vue-types": "^4.2.1"
5252
},
5353
"peerDependencies": {
5454
"@coreui/chartjs": "^3.0.0",

packages/coreui-vue/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747
Several quick start options are available:
4848

49-
- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v4.3.1.zip)
49+
- [Download the latest release](https://github.com/coreui/coreui-vue/archive/v4.4.0.zip)
5050
- Clone the repo: `git clone https://github.com/coreui/coreui-vue.git`
5151
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/vue`
5252
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/vue`

packages/coreui-vue/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coreui/vue",
3-
"version": "4.3.1",
3+
"version": "4.4.0",
44
"description": "UI Components Library for Vue.js",
55
"keywords": [
66
"vue",
@@ -37,19 +37,19 @@
3737
"version_short": "4.3"
3838
},
3939
"devDependencies": {
40-
"@popperjs/core": "^2.11.5",
41-
"@rollup/plugin-commonjs": "^22.0.1",
40+
"@popperjs/core": "^2.11.6",
41+
"@rollup/plugin-commonjs": "^22.0.2",
4242
"@rollup/plugin-node-resolve": "^13.3.0",
43-
"@rollup/plugin-typescript": "^8.3.3",
43+
"@rollup/plugin-typescript": "^8.5.0",
4444
"@vue/test-utils": "^2.0.2",
45-
"rollup": "^2.77.0",
45+
"rollup": "^2.79.0",
4646
"rollup-plugin-vue": "^6.0.0",
47-
"typescript": "^4.7.4",
48-
"vue": "^3.2.37",
49-
"vue-types": "^4.2.0"
47+
"typescript": "^4.8.3",
48+
"vue": "^3.2.39",
49+
"vue-types": "^4.2.1"
5050
},
5151
"peerDependencies": {
52-
"@coreui/coreui": "^4.2.0",
52+
"@coreui/coreui": "^4.2.2",
5353
"vue": "^3.2.21"
5454
},
5555
"standard": {

packages/coreui-vue/src/components/dropdown/CDropdown.ts

+18-3
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ const CDropdown = defineComponent({
6464
/**
6565
* Sets a specified direction and location of the dropdown menu.
6666
*
67-
* @values 'dropup', 'dropend', 'dropstart'
67+
* @values 'center', 'dropup', 'dropup-center', 'dropend', 'dropstart'
6868
*/
6969
direction: {
7070
type: String,
7171
default: undefined,
7272
required: false,
7373
validator: (value: string) => {
74-
return ['dropup', 'dropend', 'dropstart'].includes(value)
74+
return ['center', 'dropup', 'dropup-center', 'dropend', 'dropstart'].includes(value)
7575
},
7676
},
7777
/**
@@ -164,15 +164,26 @@ const CDropdown = defineComponent({
164164
provide('dropdownToggleRef', dropdownToggleRef)
165165
provide('dropdownMenuRef', dropdownMenuRef)
166166

167+
if (props.direction === 'center') {
168+
placement.value = 'bottom'
169+
}
170+
167171
if (props.direction === 'dropup') {
168172
placement.value = 'top-start'
169173
}
174+
175+
if (props.direction === 'dropup-center') {
176+
placement.value = 'top'
177+
}
178+
170179
if (props.direction === 'dropend') {
171180
placement.value = 'right-start'
172181
}
182+
173183
if (props.direction === 'dropstart') {
174184
placement.value = 'left-start'
175185
}
186+
176187
if (props.alignment === 'end') {
177188
placement.value = 'bottom-end'
178189
}
@@ -240,7 +251,11 @@ const CDropdown = defineComponent({
240251
{
241252
class: [
242253
props.variant === 'nav-item' ? 'nav-item dropdown' : props.variant,
243-
props.direction,
254+
props.direction === 'center'
255+
? 'dropdown-center'
256+
: props.direction === 'dropup-center'
257+
? 'dropup dropup-center'
258+
: props.direction,
244259
],
245260
},
246261
slots.default && slots.default(),

packages/coreui-vue/src/components/modal/CModal.ts

+4
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ const CModal = defineComponent({
145145
const handleEnter = (el: RendererElement, done: () => void) => {
146146
executeAfterTransition(() => done(), el as HTMLElement)
147147
document.body.classList.add('modal-open')
148+
document.body.style.overflow = 'hidden'
149+
document.body.style.paddingRight = '0px'
148150
el.style.display = 'block'
149151
setTimeout(() => {
150152
el.classList.add('show')
@@ -160,6 +162,8 @@ const CModal = defineComponent({
160162
const handleLeave = (el: RendererElement, done: () => void) => {
161163
executeAfterTransition(() => done(), el as HTMLElement)
162164
document.body.classList.remove('modal-open')
165+
document.body.style.removeProperty('overflow')
166+
document.body.style.removeProperty('padding-right')
163167
if (document.body.className === '') {
164168
document.body.removeAttribute('class')
165169
}

packages/coreui-vue/src/components/sidebar/CSidebar.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ const CSidebar = defineComponent({
121121

122122
const handleHide = () => {
123123
visible.value = false
124+
emit('visible-change', false)
124125
}
125126

126127
const handleResize = () => {
@@ -173,9 +174,7 @@ const CSidebar = defineComponent({
173174
h(CBackdrop, {
174175
class: 'sidebar-backdrop d-none',
175176
visible: props.visible,
176-
onClick: () => {
177-
visible.value = false
178-
},
177+
onClick: () => handleHide(),
179178
}),
180179
]
181180
},

packages/coreui-vue/src/components/table/CTable.ts

+10
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,15 @@ const CTable = defineComponent({
9797
type: Boolean,
9898
required: false,
9999
},
100+
/**
101+
* Add zebra-striping to any table column.
102+
*
103+
* @since 4.4.0
104+
*/
105+
stripedColumns: {
106+
type: Boolean,
107+
required: false,
108+
},
100109
},
101110
setup(props, { slots, attrs }) {
102111
const table = () =>
@@ -115,6 +124,7 @@ const CTable = defineComponent({
115124
'table-hover': props.hover,
116125
'table-sm': props.small,
117126
'table-striped': props.striped,
127+
'table-striped-columns': props.stripedColumns,
118128
},
119129
attrs.class,
120130
],

packages/docs/api/dropdown/CDropdown.api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import CDropdown from '@coreui/vue/src/components/dropdown/CDropdown'
1313
| **alignment** | Set aligment of dropdown menu. | string\|object | `{ 'start' \| 'end' \| { xs: 'start' \| 'end' } \| { sm: 'start' \| 'end' } \| { md: 'start' \| 'end' } \| { lg: 'start' \| 'end' } \| { xl: 'start' \| 'end'} \| { xxl: 'start' \| 'end'} }` | - |
1414
| **auto-close** | Configure the auto close behavior of the dropdown:<br>- `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.<br>- `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)<br>- `'inside'` - the dropdown will be closed (only) by clicking inside the dropdown menu.<br>- `'outside'` - the dropdown will be closed (only) by clicking outside the dropdown menu. | boolean\|string | - | true |
1515
| **dark** | Sets a darker color scheme to match a dark navbar. | boolean | - | |
16-
| **direction** | Sets a specified direction and location of the dropdown menu. | string | `'dropup'`, `'dropend'`, `'dropstart'` | - |
16+
| **direction** | Sets a specified direction and location of the dropdown menu. | string | `'center'`, `'dropup'`, `'dropup-center'`, `'dropend'`, `'dropstart'` | - |
1717
| **disabled** | Toggle the disabled state for the component. | boolean | - | |
1818
| **placement** | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | Placement | `'auto'`, `'top-end'`, `'top'`, `'top-start'`, `'bottom-end'`, `'bottom'`, `'bottom-start'`, `'right-start'`, `'right'`, `'right-end'`, `'left-start'`, `'left'`, `'left-end'` | 'bottom-start' |
1919
| **popper** | If you want to disable dynamic positioning set this property to `true`. | boolean | - | true |

0 commit comments

Comments
 (0)