@momentum-design/components 0.83.3 → 0.83.5

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.
@@ -10,6 +10,11 @@ import Component from '../../components/dialog';
10
10
  * If a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will
11
11
  * remember the previously focused element before the dialog was opened.
12
12
  *
13
+ * The dialog is a controlled component, meaning it does not have its own state management for visibility.
14
+ * Use the `visible` property to control the visibility of the dialog.
15
+ * Use the `onClose` event to handle the close action of the dialog (fired when Close button is clicked
16
+ * or Escape is pressed).
17
+ *
13
18
  * Dialog component have 2 variants: default and promotional.
14
19
  *
15
20
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
@@ -30,6 +35,8 @@ import Component from '../../components/dialog';
30
35
  * @event hidden - (React: onHidden) Dispatched when the dialog is hidden
31
36
  * @event created - (React: onCreated) Dispatched when the dialog is created (added to the DOM)
32
37
  * @event destroyed - (React: onDestroyed) Dispatched when the dialog is destroyed (removed from the DOM)
38
+ * @event close - (React: onClose) Dispatched when the Close Button is clicked or Escape key is pressed
39
+ * (this does not hide the dialog)
33
40
  *
34
41
  * @cssproperty --mdc-dialog-primary-background-color - primary background color of the dialog
35
42
  * @cssproperty --mdc-dialog-border-color - border color of the dialog
@@ -53,5 +60,6 @@ declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {
53
60
  onHidden: EventName<Event>;
54
61
  onCreated: EventName<Event>;
55
62
  onDestroyed: EventName<Event>;
63
+ onClose: EventName<Event>;
56
64
  }>;
57
65
  export default reactWrapper;
@@ -12,6 +12,11 @@ import { TAG_NAME } from '../../components/dialog/dialog.constants';
12
12
  * If a `triggerId` is provided, the dialog will manage focus with that element, otherwise it will
13
13
  * remember the previously focused element before the dialog was opened.
14
14
  *
15
+ * The dialog is a controlled component, meaning it does not have its own state management for visibility.
16
+ * Use the `visible` property to control the visibility of the dialog.
17
+ * Use the `onClose` event to handle the close action of the dialog (fired when Close button is clicked
18
+ * or Escape is pressed).
19
+ *
15
20
  * Dialog component have 2 variants: default and promotional.
16
21
  *
17
22
  * **Accessibility notes for consuming (have to be explicitly set when you consume the component)**
@@ -32,6 +37,8 @@ import { TAG_NAME } from '../../components/dialog/dialog.constants';
32
37
  * @event hidden - (React: onHidden) Dispatched when the dialog is hidden
33
38
  * @event created - (React: onCreated) Dispatched when the dialog is created (added to the DOM)
34
39
  * @event destroyed - (React: onDestroyed) Dispatched when the dialog is destroyed (removed from the DOM)
40
+ * @event close - (React: onClose) Dispatched when the Close Button is clicked or Escape key is pressed
41
+ * (this does not hide the dialog)
35
42
  *
36
43
  * @cssproperty --mdc-dialog-primary-background-color - primary background color of the dialog
37
44
  * @cssproperty --mdc-dialog-border-color - border color of the dialog
@@ -59,6 +66,7 @@ const reactWrapper = createComponent({
59
66
  onHidden: 'hidden',
60
67
  onCreated: 'created',
61
68
  onDestroyed: 'destroyed',
69
+ onClose: 'close',
62
70
  },
63
71
  displayName: 'Dialog',
64
72
  });
@@ -6,16 +6,16 @@ export { default as AvatarButton } from './avatarbutton';
6
6
  export { default as Badge } from './badge';
7
7
  export { default as Brandvisual } from './brandvisual';
8
8
  export { default as Bullet } from './bullet';
9
- export { default as Button } from './button';
10
9
  export { default as ButtonGroup } from './buttongroup';
10
+ export { default as Button } from './button';
11
11
  export { default as ButtonLink } from './buttonlink';
12
12
  export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
16
  export { default as CardRadio } from './cardradio';
17
- export { default as Chip } from './chip';
18
17
  export { default as Checkbox } from './checkbox';
18
+ export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
20
20
  export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
@@ -6,16 +6,16 @@ export { default as AvatarButton } from './avatarbutton';
6
6
  export { default as Badge } from './badge';
7
7
  export { default as Brandvisual } from './brandvisual';
8
8
  export { default as Bullet } from './bullet';
9
- export { default as Button } from './button';
10
9
  export { default as ButtonGroup } from './buttongroup';
10
+ export { default as Button } from './button';
11
11
  export { default as ButtonLink } from './buttonlink';
12
12
  export { default as Buttonsimple } from './buttonsimple';
13
13
  export { default as Card } from './card';
14
14
  export { default as CardButton } from './cardbutton';
15
15
  export { default as CardCheckbox } from './cardcheckbox';
16
16
  export { default as CardRadio } from './cardradio';
17
- export { default as Chip } from './chip';
18
17
  export { default as Checkbox } from './checkbox';
18
+ export { default as Chip } from './chip';
19
19
  export { default as Coachmark } from './coachmark';
20
20
  export { default as Dialog } from './dialog';
21
21
  export { default as Divider } from './divider';
package/package.json CHANGED
@@ -41,5 +41,5 @@
41
41
  "lottie-web": "^5.12.2",
42
42
  "uuid": "^11.0.5"
43
43
  },
44
- "version": "0.83.3"
44
+ "version": "0.83.5"
45
45
  }