Skip to content

Commit

Permalink
Merge branch 'feature/visually-hidden' of https://github.com/bjarnef/…
Browse files Browse the repository at this point in the history
…Umbraco.UI into feature/visually-hidden
  • Loading branch information
bjarnef committed Oct 6, 2023
2 parents 923b003 + f7493db commit e878501
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 39 deletions.
41 changes: 8 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
9 changes: 5 additions & 4 deletions packages/uui-modal/lib/uui-modal.element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -45,7 +45,6 @@ export class UUIModalElement extends LitElement {
event?.stopImmediatePropagation();

const openEvent = new CustomEvent('open', {
bubbles: true,
cancelable: true,
});

Expand All @@ -60,7 +59,6 @@ export class UUIModalElement extends LitElement {
event?.stopImmediatePropagation();

const closeEvent = new CustomEvent('close', {
bubbles: true,
cancelable: true,
});
this.dispatchEvent(closeEvent);
Expand All @@ -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();
}

Expand Down
4 changes: 4 additions & 0 deletions packages/uui-modal/lib/uui-modal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand Down

0 comments on commit e878501

Please sign in to comment.