diff --git a/changelog/unreleased/change-update-vue b/changelog/unreleased/change-update-vue index 077b533cbf5..9d169d43414 100644 --- a/changelog/unreleased/change-update-vue +++ b/changelog/unreleased/change-update-vue @@ -19,3 +19,6 @@ https://github.com/owncloud/web/pull/8256 https://github.com/owncloud/web/pull/8257 https://github.com/owncloud/web/pull/8258 https://github.com/owncloud/web/pull/8282 +https://github.com/owncloud/web/pull/8289 +https://github.com/owncloud/web/pull/8287 +https://github.com/owncloud/web/pull/8285 diff --git a/package.json b/package.json index 0a2c25bea36..7395fd5c5c0 100644 --- a/package.json +++ b/package.json @@ -85,8 +85,6 @@ "ejs": "3.1.8", "eslint": "8.31.0", "flush-promises": "1.0.2", - "focus-trap": "6.9.4", - "focus-trap-vue": "1.1.1", "git-repo-info": "2.1.1", "jest": "29.3.1", "jest-axe": "5.0.1", diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 66ef8c44702..4c0d8af0eb0 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -65,8 +65,8 @@ "depcheck": "^1.3.1", "file-loader": "^6.2.0", "filesize": "^9.0.11", - "focus-trap": "^6.4.0", - "focus-trap-vue": "^1.1.1", + "focus-trap": "^7.2.0", + "focus-trap-vue": "^4.0.1", "fuse.js": "^6.4.6", "glob": "^8.0.3", "html-loader": "^1.3.2", @@ -126,8 +126,8 @@ "peerDependencies": { "@popperjs/core": "^2.4.0", "filesize": "^9.0.11", - "focus-trap": "^6.4.0", - "focus-trap-vue": "^1.1.1", + "focus-trap": "^7.2.0", + "focus-trap-vue": "^4.0.1", "fuse.js": "^6.4.6", "luxon": "^3.0.1", "postcss-import": "^12.0.1", diff --git a/packages/design-system/src/components/OcButton/OcButton.vue b/packages/design-system/src/components/OcButton/OcButton.vue index 4d2c9e37e3a..2860cc88233 100644 --- a/packages/design-system/src/components/OcButton/OcButton.vue +++ b/packages/design-system/src/components/OcButton/OcButton.vue @@ -4,7 +4,6 @@ v-bind="additionalAttributes" :aria-label="ariaLabel" :class="$_ocButton_buttonClass" - :disabled="disabled" v-on="handlers" > @@ -159,7 +158,8 @@ export default defineComponent({ ...(this.href && { href: this.href }), ...(this.target && { target: this.target }), ...(this.to && { to: this.to }), - ...(this.type === 'button' && { type: this.submit }) + ...(this.type === 'button' && { type: this.submit }), + ...(this.type === 'button' && { disabled: this.disabled }) } }, diff --git a/packages/design-system/src/components/OcCheckbox/OcCheckbox.spec.ts b/packages/design-system/src/components/OcCheckbox/OcCheckbox.spec.ts index 57fba5203c3..87ac4dff5c3 100644 --- a/packages/design-system/src/components/OcCheckbox/OcCheckbox.spec.ts +++ b/packages/design-system/src/components/OcCheckbox/OcCheckbox.spec.ts @@ -59,7 +59,7 @@ describe('OcCheckbox', () => { const checkbox = wrapper.find(checkboxSelector) expect((checkbox.element as any).checked).toBeFalsy() await checkbox.setValue(true) - expect(wrapper.emitted('input')).toBeTruthy() + expect(wrapper.emitted('update:modelValue')).toBeTruthy() expect((checkbox.element as any).checked).toBeTruthy() }) }) diff --git a/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue b/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue index c24e8f08c38..0a5e721393d 100644 --- a/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue +++ b/packages/design-system/src/components/OcCheckbox/OcCheckbox.vue @@ -24,6 +24,7 @@ export default defineComponent({ name: 'OcCheckbox', status: 'ready', release: '1.0.0', + compatConfig: { MODE: 3 }, props: { /** * Id for the checkbox. If it's empty, a generated one will be used. @@ -47,7 +48,7 @@ export default defineComponent({ * Can be any type, but most common is boolean for singular checkbox use, or array when used in a group of checkboxes. **/ // eslint-disable-next-line vue/require-prop-types - value: { + modelValue: { required: false, default: false }, @@ -99,14 +100,14 @@ export default defineComponent({ default: false } }, - emits: ['click'], + emits: ['click', 'update:modelValue'], computed: { model: { get() { - return this.value + return this.modelValue }, set: function (value) { - this.$emit('input', value) + this.$emit('update:modelValue', value) this.setChecked(value) } }, diff --git a/packages/design-system/src/components/OcImage/OcImage.spec.ts b/packages/design-system/src/components/OcImage/OcImage.spec.ts index 1678307847f..605a4f283d9 100644 --- a/packages/design-system/src/components/OcImage/OcImage.spec.ts +++ b/packages/design-system/src/components/OcImage/OcImage.spec.ts @@ -33,12 +33,12 @@ describe('OcImage', () => { it('should set the provided alt for image', () => { expect(wrapper.attributes('alt')).toBe('test alt text') }) - it('should disable aria hidden property', () => { - expect(wrapper.attributes('aria-hidden')).toBe(undefined) + it('should set aria hidden property to "false"', () => { + expect(wrapper.attributes('aria-hidden')).toBe('false') }) }) describe('when alt is not set', () => { - it('should disable aria hidden property', () => { + it('should set aria hidden property to "true"', () => { const wrapper = getWrapper() expect(wrapper.attributes('aria-hidden')).toBe('true') }) diff --git a/packages/design-system/src/components/OcImage/OcImage.vue b/packages/design-system/src/components/OcImage/OcImage.vue index 7b895ccf3c4..806abb21d78 100644 --- a/packages/design-system/src/components/OcImage/OcImage.vue +++ b/packages/design-system/src/components/OcImage/OcImage.vue @@ -1,5 +1,5 @@ diff --git a/packages/web-app-files/src/views/spaces/GenericSpace.vue b/packages/web-app-files/src/views/spaces/GenericSpace.vue index 8deb6210726..9bc83b68d86 100644 --- a/packages/web-app-files/src/views/spaces/GenericSpace.vue +++ b/packages/web-app-files/src/views/spaces/GenericSpace.vue @@ -47,7 +47,7 @@