@ni/nimble-components 12.0.2 → 13.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/all-components-bundle.js +214 -1733
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1675 -1805
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/dialog/index.d.ts +4 -8
  6. package/dist/esm/dialog/index.js +5 -8
  7. package/dist/esm/dialog/index.js.map +1 -1
  8. package/dist/esm/dialog/styles.js +4 -4
  9. package/dist/esm/dialog/styles.js.map +1 -1
  10. package/dist/esm/drawer/index.d.ts +34 -33
  11. package/dist/esm/drawer/index.js +73 -167
  12. package/dist/esm/drawer/index.js.map +1 -1
  13. package/dist/esm/drawer/styles.js +99 -48
  14. package/dist/esm/drawer/styles.js.map +1 -1
  15. package/dist/esm/drawer/template.d.ts +2 -0
  16. package/dist/esm/drawer/template.js +13 -0
  17. package/dist/esm/drawer/template.js.map +1 -0
  18. package/dist/esm/drawer/types.d.ts +0 -7
  19. package/dist/esm/drawer/types.js +0 -6
  20. package/dist/esm/drawer/types.js.map +1 -1
  21. package/dist/esm/patterns/dialog/types.d.ts +6 -0
  22. package/dist/esm/patterns/dialog/types.js +6 -0
  23. package/dist/esm/patterns/dialog/types.js.map +1 -0
  24. package/dist/esm/theme-provider/design-tokens-static.d.ts +10 -3
  25. package/dist/esm/theme-provider/design-tokens-static.js +11 -4
  26. package/dist/esm/theme-provider/design-tokens-static.js.map +1 -1
  27. package/dist/esm/theme-provider/design-tokens.js +5 -5
  28. package/dist/esm/theme-provider/design-tokens.js.map +1 -1
  29. package/package.json +1 -2
  30. package/dist/esm/drawer/animations.d.ts +0 -14
  31. package/dist/esm/drawer/animations.js +0 -52
  32. package/dist/esm/drawer/animations.js.map +0 -1
@@ -1,15 +1,11 @@
1
1
  import { ARIAGlobalStatesAndProperties, FoundationElement } from '@microsoft/fast-foundation';
2
+ import { UserDismissed } from '../patterns/dialog/types';
3
+ export { UserDismissed };
2
4
  declare global {
3
5
  interface HTMLElementTagNameMap {
4
6
  'nimble-dialog': Dialog;
5
7
  }
6
8
  }
7
- /**
8
- * Symbol that is returned as the dialog close reason (from the Promise returned by show()) when
9
- * the dialog was closed by pressing the ESC key (vs. calling the close() function).
10
- */
11
- export declare const USER_DISMISSED: unique symbol;
12
- export declare type UserDismissed = typeof USER_DISMISSED;
13
9
  /**
14
10
  * This is a workaround for an incomplete definition of the native dialog element:
15
11
  * https://github.com/microsoft/TypeScript/issues/48267
@@ -23,7 +19,7 @@ export interface ExtendedDialog extends HTMLDialogElement {
23
19
  * A nimble-styled dialog.
24
20
  */
25
21
  export declare class Dialog<CloseReason = void> extends FoundationElement {
26
- static readonly USER_DISMISSED: symbol;
22
+ static readonly UserDismissed: symbol;
27
23
  /**
28
24
  * @public
29
25
  * @description
@@ -43,7 +39,7 @@ export declare class Dialog<CloseReason = void> extends FoundationElement {
43
39
  private resolveShow?;
44
40
  /**
45
41
  * Opens the dialog
46
- * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or USER_DISMISSED if the dialog was closed via the ESC key.
42
+ * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or UserDismissed if the dialog was closed via the ESC key.
47
43
  */
48
44
  show(): Promise<CloseReason | UserDismissed>;
49
45
  /**
@@ -1,13 +1,10 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
3
  import { applyMixins, ARIAGlobalStatesAndProperties, DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
4
+ import { UserDismissed } from '../patterns/dialog/types';
4
5
  import { styles } from './styles';
5
6
  import { template } from './template';
6
- /**
7
- * Symbol that is returned as the dialog close reason (from the Promise returned by show()) when
8
- * the dialog was closed by pressing the ESC key (vs. calling the close() function).
9
- */
10
- export const USER_DISMISSED = Symbol('user dismissed');
7
+ export { UserDismissed };
11
8
  /**
12
9
  * A nimble-styled dialog.
13
10
  */
@@ -30,7 +27,7 @@ export class Dialog extends FoundationElement {
30
27
  }
31
28
  /**
32
29
  * Opens the dialog
33
- * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or USER_DISMISSED if the dialog was closed via the ESC key.
30
+ * @returns Promise that is resolved when the dialog is closed. The value of the resolved Promise is the reason value passed to the close() method, or UserDismissed if the dialog was closed via the ESC key.
34
31
  */
35
32
  async show() {
36
33
  if (this.open) {
@@ -61,7 +58,7 @@ export class Dialog extends FoundationElement {
61
58
  event.preventDefault();
62
59
  }
63
60
  else {
64
- this.resolveShow(USER_DISMISSED);
61
+ this.resolveShow(UserDismissed);
65
62
  this.resolveShow = undefined;
66
63
  }
67
64
  return true;
@@ -69,7 +66,7 @@ export class Dialog extends FoundationElement {
69
66
  }
70
67
  // We want the member to match the name of the constant
71
68
  // eslint-disable-next-line @typescript-eslint/naming-convention
72
- Dialog.USER_DISMISSED = USER_DISMISSED;
69
+ Dialog.UserDismissed = UserDismissed;
73
70
  __decorate([
74
71
  attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
75
72
  ], Dialog.prototype, "preventDismiss", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EACH,WAAW,EACX,6BAA6B,EAC7B,YAAY,EACZ,iBAAiB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAatE;;GAEG;AACH,mEAAmE;AACnE,MAAM,OAAO,MAA2B,SAAQ,iBAAiB;IAAj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,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACzC;QACD,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;QAC3B,IAAI,CAAC,WAAY,CAAC,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,KAAY;QAC7B,IAAI,IAAI,CAAC,cAAc,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;SAC1B;aAAM;YACH,IAAI,CAAC,WAAY,CAAC,aAAa,CAAC,CAAC;YACjC,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;SAChC;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;;AAlED,uDAAuD;AACvD,gEAAgE;AACzC,oBAAa,GAAG,aAAa,CAAC;AAQrD;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CAC1B;AA6DlC,WAAW,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC;IAChC,QAAQ,EAAE,QAAQ;IAClB,QAAQ;IACR,MAAM;IACN,SAAS,EAAE,MAAM;CACpB,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '@microsoft/fast-foundation';
3
3
  import { applicationBackgroundColor, borderWidth, popupBoxShadowColor, popupBorderColor } from '../theme-provider/design-tokens';
4
- import { modalBackdropColorThemeColor, modalBackdropColorThemeDark, modalBackdropColorThemeLight } from '../theme-provider/design-tokens-static';
4
+ import { modalBackdropColorThemeColorStatic, modalBackdropColorThemeDarkStatic, modalBackdropColorThemeLightStatic } from '../theme-provider/design-tokens-static';
5
5
  import { Theme } from '../theme-provider/types';
6
6
  import { themeBehavior } from '../utilities/style/theme';
7
7
  export const styles = css `
@@ -20,15 +20,15 @@ export const styles = css `
20
20
  */
21
21
  themeBehavior(Theme.light, css `
22
22
  dialog::backdrop {
23
- background: ${modalBackdropColorThemeLight};
23
+ background: ${modalBackdropColorThemeLightStatic};
24
24
  }
25
25
  `), themeBehavior(Theme.dark, css `
26
26
  dialog::backdrop {
27
- background: ${modalBackdropColorThemeDark};
27
+ background: ${modalBackdropColorThemeDarkStatic};
28
28
  }
29
29
  `), themeBehavior(Theme.color, css `
30
30
  dialog::backdrop {
31
- background: ${modalBackdropColorThemeColor};
31
+ background: ${modalBackdropColorThemeColorStatic};
32
32
  }
33
33
  `));
34
34
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/dialog/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,0BAA0B,EAC1B,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,4BAA4B,EAC5B,2BAA2B,EAC3B,4BAA4B,EAC/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;4BAGO,0BAA0B;kBACpC,WAAW,UAAU,gBAAgB;kCACrB,mBAAmB;;;CAGpD,CAAC,aAAa;AACX;;;GAGG;AACH,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,4BAA4B;;SAEjD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,IAAI,EACV,GAAG,CAAA;;8BAEmB,2BAA2B;;SAEhD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,4BAA4B;;SAEjD,CACJ,CACJ,CAAC"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/dialog/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,OAAO,EACH,0BAA0B,EAC1B,WAAW,EACX,mBAAmB,EACnB,gBAAgB,EACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACH,kCAAkC,EAClC,iCAAiC,EACjC,kCAAkC,EACrC,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;MACnB,OAAO,CAAC,MAAM,CAAC;;;4BAGO,0BAA0B;kBACpC,WAAW,UAAU,gBAAgB;kCACrB,mBAAmB;;;CAGpD,CAAC,aAAa;AACX;;;GAGG;AACH,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,kCAAkC;;SAEvD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,IAAI,EACV,GAAG,CAAA;;8BAEmB,iCAAiC;;SAEtD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,kCAAkC;;SAEvD,CACJ,CACJ,CAAC"}
@@ -1,48 +1,49 @@
1
- import { Dialog as FoundationDialog } from '@microsoft/fast-foundation';
2
- import { DrawerLocation, DrawerState } from './types';
1
+ import { ARIAGlobalStatesAndProperties, FoundationElement } from '@microsoft/fast-foundation';
2
+ import { UserDismissed } from '../patterns/dialog/types';
3
+ import { DrawerLocation } from './types';
4
+ export { UserDismissed };
3
5
  declare global {
4
6
  interface HTMLElementTagNameMap {
5
7
  'nimble-drawer': Drawer;
6
8
  }
7
9
  }
8
10
  /**
9
- * Drawer/Sidenav control. Shows content in a panel on the left / right side of the screen,
11
+ * Drawer control. Shows content in a panel on the left / right side of the screen,
10
12
  * which animates to be visible with a slide-in / slide-out animation.
11
- * Configured via 'location', 'state', 'modal', 'preventDismiss' properties.
12
13
  */
13
- export declare class Drawer extends FoundationDialog {
14
+ export declare class Drawer<CloseReason = void> extends FoundationElement {
15
+ static readonly UserDismissed: symbol;
14
16
  location: DrawerLocation;
15
- state: DrawerState;
17
+ preventDismiss: boolean;
18
+ dialog: HTMLDialogElement;
19
+ private closing;
20
+ private resolveShow?;
21
+ private closeReason;
16
22
  /**
17
- * True to prevent dismissing the drawer when the overlay outside the drawer is clicked.
18
- * Only applicable when 'modal' is set to true (i.e. when the overlay is used).
19
- * HTML Attribute: prevent-dismiss
23
+ * True if the drawer is open, opening, or closing. Otherwise, false.
20
24
  */
21
- preventDismiss: boolean;
22
- private readonly propertiesToWatch;
23
- private propertyChangeNotifier?;
24
- private animationDurationMilliseconds;
25
- private animationGroup?;
26
- private animationsEnabledChangedHandler?;
27
- private propertyChangeSubscriber?;
28
- /** @internal */
29
- connectedCallback(): void;
30
- /** @internal */
31
- disconnectedCallback(): void;
32
- show(): void;
33
- hide(): void;
25
+ get open(): boolean;
26
+ /**
27
+ * Opens the drawer
28
+ * @returns Promise that is resolved when the drawer finishes closing. The value of the resolved
29
+ * Promise is the reason value passed to the close() method, or UserDismissed if the drawer was
30
+ * closed via the ESC key.
31
+ */
32
+ show(): Promise<CloseReason | UserDismissed>;
33
+ /**
34
+ * Closes the drawer
35
+ * @param reason An optional value indicating how/why the drawer was closed.
36
+ */
37
+ close(reason: CloseReason): void;
34
38
  /**
35
- * Handler for overlay clicks (user-initiated dismiss requests) only.
36
39
  * @internal
37
40
  */
38
- dismiss(): void;
39
- private onPropertyChange;
40
- private onHiddenChanged;
41
- private onLocationChanged;
42
- private onStateChanged;
43
- private updateAnimationDuration;
44
- private animateOpening;
45
- private animateClosing;
46
- private animateOpenClose;
47
- private cancelCurrentAnimation;
41
+ cancelHandler(event: Event): boolean;
42
+ private readonly animationEndHandlerFunction;
43
+ private openDialog;
44
+ private closeDialog;
45
+ private triggerAnimation;
46
+ private animationEndHandler;
47
+ }
48
+ export interface Drawer extends ARIAGlobalStatesAndProperties {
48
49
  }
@@ -1,201 +1,107 @@
1
1
  import { __decorate } from "tslib";
2
- import { AnimateGroup, AnimateTo } from '@microsoft/fast-animation';
3
- import { attr, Observable } from '@microsoft/fast-element';
4
- import { DesignSystem, Dialog as FoundationDialog, dialogTemplate as template } from '@microsoft/fast-foundation';
5
- import { largeDelay } from '../theme-provider/design-tokens';
6
- import { prefersReducedMotionMediaQuery } from '../utilities/style/prefers-reduced-motion';
7
- import { animationConfig } from './animations';
2
+ import { attr } from '@microsoft/fast-element';
3
+ import { applyMixins, ARIAGlobalStatesAndProperties, DesignSystem, FoundationElement } from '@microsoft/fast-foundation';
4
+ import { eventAnimationEnd } from '@microsoft/fast-web-utilities';
5
+ import { UserDismissed } from '../patterns/dialog/types';
8
6
  import { styles } from './styles';
9
- import { DrawerLocation, DrawerState } from './types';
10
- const animationDurationWhenDisabledMilliseconds = 0.001;
7
+ import { template } from './template';
8
+ import { DrawerLocation } from './types';
9
+ export { UserDismissed };
11
10
  /**
12
- * Drawer/Sidenav control. Shows content in a panel on the left / right side of the screen,
11
+ * Drawer control. Shows content in a panel on the left / right side of the screen,
13
12
  * which animates to be visible with a slide-in / slide-out animation.
14
- * Configured via 'location', 'state', 'modal', 'preventDismiss' properties.
15
13
  */
16
- export class Drawer extends FoundationDialog {
14
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
15
+ export class Drawer extends FoundationElement {
17
16
  constructor() {
18
17
  super(...arguments);
19
- this.location = DrawerLocation.left;
20
- this.state = DrawerState.closed;
21
- /**
22
- * True to prevent dismissing the drawer when the overlay outside the drawer is clicked.
23
- * Only applicable when 'modal' is set to true (i.e. when the overlay is used).
24
- * HTML Attribute: prevent-dismiss
25
- */
18
+ this.location = DrawerLocation.right;
26
19
  this.preventDismiss = false;
27
- this.propertiesToWatch = ['hidden', 'location', 'state'];
28
- this.animationDurationMilliseconds = animationDurationWhenDisabledMilliseconds;
29
- }
30
- /** @internal */
31
- connectedCallback() {
32
- // disable trapFocus before super.connectedCallback as FAST Dialog will immediately queue work to
33
- // change focus if it's true before connectedCallback
34
- this.trapFocus = false;
35
- super.connectedCallback();
36
- this.updateAnimationDuration();
37
- this.animationsEnabledChangedHandler = () => this.updateAnimationDuration();
38
- prefersReducedMotionMediaQuery.addEventListener('change', this.animationsEnabledChangedHandler);
39
- this.onStateChanged();
40
- const notifier = Observable.getNotifier(this);
41
- const subscriber = {
42
- handleChange: (_source, propertyName) => this.onPropertyChange(propertyName)
43
- };
44
- this.propertiesToWatch.forEach(propertyName => notifier.subscribe(subscriber, propertyName));
45
- this.propertyChangeSubscriber = subscriber;
46
- this.propertyChangeNotifier = notifier;
47
- }
48
- /** @internal */
49
- disconnectedCallback() {
50
- super.disconnectedCallback();
51
- this.cancelCurrentAnimation();
52
- if (this.propertyChangeNotifier && this.propertyChangeSubscriber) {
53
- this.propertiesToWatch.forEach(propertyName => this.propertyChangeNotifier.unsubscribe(this.propertyChangeSubscriber, propertyName));
54
- this.propertyChangeNotifier = undefined;
55
- this.propertyChangeSubscriber = undefined;
56
- }
57
- if (this.animationsEnabledChangedHandler) {
58
- prefersReducedMotionMediaQuery.removeEventListener('change', this.animationsEnabledChangedHandler);
59
- this.animationsEnabledChangedHandler = undefined;
60
- }
61
- }
62
- show() {
63
- // Not calling super.show() as that will immediately show the drawer, whereas 'Opening' state will animate
64
- this.state = DrawerState.opening;
65
- }
66
- hide() {
67
- // Not calling super.hide() as that will immediately hide the drawer, whereas 'Closing' state will animate
68
- this.state = DrawerState.closing;
20
+ this.closing = false;
21
+ this.animationEndHandlerFunction = () => this.animationEndHandler();
69
22
  }
70
23
  /**
71
- * Handler for overlay clicks (user-initiated dismiss requests) only.
72
- * @internal
24
+ * True if the drawer is open, opening, or closing. Otherwise, false.
73
25
  */
74
- dismiss() {
75
- // Note: intentionally not calling super() in this function in order to implement custom preventDismiss behavior
76
- const shouldDismiss = this.$emit('cancel', {},
77
- // Aligned with the configuration of HTMLDialogElement cancel event:
78
- // https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/cancel_event
79
- { bubbles: false, cancelable: true, composed: false });
80
- if (shouldDismiss && !this.preventDismiss) {
81
- this.$emit('dismiss');
82
- this.hide();
83
- }
26
+ get open() {
27
+ return this.resolveShow !== undefined;
84
28
  }
85
- onPropertyChange(propertyName) {
86
- switch (propertyName) {
87
- case 'hidden':
88
- this.onHiddenChanged();
89
- break;
90
- case 'location':
91
- this.onLocationChanged();
92
- break;
93
- case 'state':
94
- this.onStateChanged();
95
- break;
96
- default:
97
- break;
29
+ /**
30
+ * Opens the drawer
31
+ * @returns Promise that is resolved when the drawer finishes closing. The value of the resolved
32
+ * Promise is the reason value passed to the close() method, or UserDismissed if the drawer was
33
+ * closed via the ESC key.
34
+ */
35
+ async show() {
36
+ if (this.open) {
37
+ throw new Error('Drawer is already open');
98
38
  }
39
+ this.openDialog();
40
+ return new Promise((resolve, _reject) => {
41
+ this.resolveShow = resolve;
42
+ });
99
43
  }
100
- onHiddenChanged() {
101
- if (this.hidden && this.state !== DrawerState.closed) {
102
- this.state = DrawerState.closed;
103
- }
104
- else if (!this.hidden && this.state === DrawerState.closed) {
105
- this.state = DrawerState.opened;
44
+ /**
45
+ * Closes the drawer
46
+ * @param reason An optional value indicating how/why the drawer was closed.
47
+ */
48
+ close(reason) {
49
+ if (!this.open || this.closing) {
50
+ throw new Error('Drawer is not open or already closing');
106
51
  }
52
+ this.closeReason = reason;
53
+ this.closeDialog();
107
54
  }
108
- onLocationChanged() {
109
- this.cancelCurrentAnimation();
110
- }
111
- onStateChanged() {
112
- if (this.isConnected) {
113
- this.cancelCurrentAnimation();
114
- switch (this.state) {
115
- case DrawerState.opening:
116
- this.animateOpening();
117
- this.hidden = false;
118
- break;
119
- case DrawerState.opened:
120
- this.hidden = false;
121
- break;
122
- case DrawerState.closing:
123
- this.hidden = false;
124
- this.animateClosing();
125
- break;
126
- case DrawerState.closed:
127
- this.hidden = true;
128
- break;
129
- default:
130
- throw new Error('Unsupported state value. Expected: opening/opened/closing/closed');
131
- }
132
- this.$emit('state-change');
55
+ /**
56
+ * @internal
57
+ */
58
+ cancelHandler(event) {
59
+ // Allowing the dialog to close itself bypasses the drawer's animation logic, so we
60
+ // should close the drawer ourselves when preventDismiss is false.
61
+ event.preventDefault();
62
+ if (!this.preventDismiss) {
63
+ this.closeReason = UserDismissed;
64
+ this.closeDialog();
133
65
  }
66
+ return true;
134
67
  }
135
- updateAnimationDuration() {
136
- const disableAnimations = prefersReducedMotionMediaQuery.matches;
137
- if (disableAnimations) {
138
- this.animationDurationMilliseconds = animationDurationWhenDisabledMilliseconds;
139
- }
140
- else {
141
- // string ends in 's' unit specifier
142
- const secondsString = largeDelay.getValueFor(this);
143
- const secondsNumber = parseFloat(secondsString);
144
- this.animationDurationMilliseconds = 1000 * secondsNumber;
145
- }
68
+ openDialog() {
69
+ this.dialog.showModal();
70
+ this.triggerAnimation();
146
71
  }
147
- animateOpening() {
148
- this.animateOpenClose(true);
72
+ closeDialog() {
73
+ this.closing = true;
74
+ this.triggerAnimation();
149
75
  }
150
- animateClosing() {
151
- if (!this.hidden) {
152
- this.animateOpenClose(false);
153
- }
154
- else {
155
- this.state = DrawerState.closed;
76
+ triggerAnimation() {
77
+ this.dialog.classList.add('animating');
78
+ if (this.closing) {
79
+ this.dialog.classList.add('closing');
156
80
  }
81
+ this.dialog.addEventListener(eventAnimationEnd, this.animationEndHandlerFunction);
157
82
  }
158
- animateOpenClose(drawerOpening) {
159
- const options = {
160
- ...(drawerOpening
161
- ? animationConfig.slideInOptions
162
- : animationConfig.slideOutOptions),
163
- duration: this.animationDurationMilliseconds
164
- };
165
- const drawerKeyframes = this.location === DrawerLocation.right
166
- ? animationConfig.slideRightKeyframes
167
- : animationConfig.slideLeftKeyframes;
168
- const dialogAnimation = new AnimateTo(this.dialog, undefined, options);
169
- dialogAnimation.addKeyframes(drawerKeyframes);
170
- const animations = [dialogAnimation];
171
- const overlay = this.shadowRoot?.querySelector('.overlay');
172
- if (overlay) {
173
- const overlayAnimation = new AnimateTo(overlay, undefined, options);
174
- overlayAnimation.addKeyframes(animationConfig.fadeOverlayKeyframes);
175
- animations.push(overlayAnimation);
83
+ animationEndHandler() {
84
+ this.dialog.removeEventListener(eventAnimationEnd, this.animationEndHandlerFunction);
85
+ this.dialog.classList.remove('animating');
86
+ if (this.closing) {
87
+ this.dialog.classList.remove('closing');
88
+ this.dialog.close();
89
+ this.closing = false;
90
+ this.resolveShow(this.closeReason);
91
+ this.resolveShow = undefined;
176
92
  }
177
- const animationGroup = new AnimateGroup(animations);
178
- animationGroup.onFinish = () => {
179
- this.state = drawerOpening
180
- ? DrawerState.opened
181
- : DrawerState.closed;
182
- };
183
- this.animationGroup = animationGroup;
184
- animationGroup.play();
185
- }
186
- cancelCurrentAnimation() {
187
- this.animationGroup?.cancel();
188
93
  }
189
94
  }
95
+ // We want the member to match the name of the constant
96
+ // eslint-disable-next-line @typescript-eslint/naming-convention
97
+ Drawer.UserDismissed = UserDismissed;
190
98
  __decorate([
191
99
  attr
192
100
  ], Drawer.prototype, "location", void 0);
193
- __decorate([
194
- attr
195
- ], Drawer.prototype, "state", void 0);
196
101
  __decorate([
197
102
  attr({ attribute: 'prevent-dismiss', mode: 'boolean' })
198
103
  ], Drawer.prototype, "preventDismiss", void 0);
104
+ applyMixins(Drawer, ARIAGlobalStatesAndProperties);
199
105
  const nimbleDrawer = Drawer.compose({
200
106
  baseName: 'drawer',
201
107
  template,
@@ -1 +1 @@
1
- {"version":3,"file":"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