diff --git a/package-lock.json b/package-lock.json index 0bd07be4c..12467efec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "element-internals-polyfill": "1.3.5", "esbuild": "0.17.18", "eslint": "8.45.0", - "eslint-config-prettier": "8.9.0", + "eslint-config-prettier": "9.0.0", "eslint-import-resolver-typescript": "3.5.5", "eslint-plugin-html": "7.1.0", "eslint-plugin-import": "2.27.5", @@ -57,7 +57,7 @@ "lint-staged": "13.2.3", "npm-check-updates": "16.10.16", "plop": "3.1.2", - "postcss": "8.4.26", + "postcss": "8.4.31", "postcss-advanced-variables": "3.0.1", "postcss-cli": "10.1.0", "postcss-color-function": "4.1.0", @@ -16376,9 +16376,10 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.9.0", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", + "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", "dev": true, - "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -25628,7 +25629,9 @@ } }, "node_modules/postcss": { - "version": "8.4.26", + "version": "8.4.31", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", + "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", "dev": true, "funding": [ { @@ -25644,7 +25647,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "dependencies": { "nanoid": "^3.3.6", "picocolors": "^1.0.0", @@ -31352,33 +31354,6 @@ "@esbuild/win32-x64": "0.18.20" } }, - "node_modules/vite/node_modules/postcss": { - "version": "8.4.29", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "node_modules/walk-up-path": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz", diff --git a/package.json b/package.json index 9edafb3da..b983c2dda 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "element-internals-polyfill": "1.3.5", "esbuild": "0.17.18", "eslint": "8.45.0", - "eslint-config-prettier": "8.9.0", + "eslint-config-prettier": "9.0.0", "eslint-import-resolver-typescript": "3.5.5", "eslint-plugin-html": "7.1.0", "eslint-plugin-import": "2.27.5", @@ -100,7 +100,7 @@ "lint-staged": "13.2.3", "npm-check-updates": "16.10.16", "plop": "3.1.2", - "postcss": "8.4.26", + "postcss": "8.4.31", "postcss-advanced-variables": "3.0.1", "postcss-cli": "10.1.0", "postcss-color-function": "4.1.0", diff --git a/packages/uui-modal/lib/uui-modal.element.ts b/packages/uui-modal/lib/uui-modal.element.ts index 7e40ff27f..5c4e07c9e 100644 --- a/packages/uui-modal/lib/uui-modal.element.ts +++ b/packages/uui-modal/lib/uui-modal.element.ts @@ -18,11 +18,11 @@ export class UUIModalElement extends LitElement { private _transitionDuration = 250; - @property() + @property({ type: Number, attribute: 'transition-duration' }) public get transitionDuration() { return this._transitionDuration; } - public set transitionDuration(value) { + public set transitionDuration(value: number) { this._transitionDuration = value; this.style.setProperty( '--uui-modal-transition-duration', @@ -45,7 +45,6 @@ export class UUIModalElement extends LitElement { event?.stopImmediatePropagation(); const openEvent = new CustomEvent('open', { - bubbles: true, cancelable: true, }); @@ -60,7 +59,6 @@ export class UUIModalElement extends LitElement { event?.stopImmediatePropagation(); const closeEvent = new CustomEvent('close', { - bubbles: true, cancelable: true, }); this.dispatchEvent(closeEvent); @@ -80,6 +78,9 @@ export class UUIModalElement extends LitElement { this.isClosing = true; this.isOpen = false; this._dialogElement?.close(); + + this.dispatchEvent(new CustomEvent('close-end')); + this.remove(); } diff --git a/packages/uui-modal/lib/uui-modal.mdx b/packages/uui-modal/lib/uui-modal.mdx index 0dc818c25..2ee4a822a 100644 --- a/packages/uui-modal/lib/uui-modal.mdx +++ b/packages/uui-modal/lib/uui-modal.mdx @@ -91,6 +91,10 @@ Dispatched on first render. This will set open to true and show the modal. Can b Dispatched when the modal is closed. Can be cancelled if you want to prevent the modal from closing. But then you'll have to manually call `_closeModal()` when you want to close the modal. This is used in the `uui-modal-sidebar` to wait for the animation to finish before removing the modal from the DOM. +#### `close-end` + +This event is triggered before removing the component from the DOM, either after animations or delays or when `_closeModal()` is manually invoked. + ### CSS Variables ---