@nordhealth/components 4.14.0 → 4.15.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.
package/lib/react.d.ts CHANGED
@@ -223,12 +223,12 @@ declare module "react" {
223
223
  React.HTMLAttributes<HTMLElement> &
224
224
  React.Attributes & {
225
225
  /**
226
- * {ModalCancelEvent} - Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a `trigger` property containing the original event that caused the dismiss. Call `preventDefault()` on the event to prevent the modal closing.
226
+ * Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a trigger property containing the original event that caused the dismiss. Call preventDefault() on the event to prevent the modal closing.
227
227
  */
228
228
  oncancel?: (event: Event) => void;
229
229
 
230
230
  /**
231
- * {ModalCloseEvent} - Dispatched when a modal is closed for any reason. The event includes an optional `trigger` property containing the original event that caused the close, if the modal was closed by a user action.
231
+ * Dispatched when a modal is closed for any reason. The event includes an optional trigger property containing the original event that caused the close, if the modal was closed by a user action.
232
232
  */
233
233
  onclose?: (event: Event) => void;
234
234
 
@@ -28,8 +28,8 @@ export declare class ModalCloseEvent extends NordEvent {
28
28
  * @slot header - Slot which holds the header of the modal, positioned next to the close button.
29
29
  * @slot feature - Slot for full bleed content like an image.
30
30
  * @slot footer - Slot which is typically used to hold call to action buttons, but can also be used to build custom footers.
31
- * @fires cancel {ModalCancelEvent} - Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a `trigger` property containing the original event that caused the dismiss. Call `preventDefault()` on the event to prevent the modal closing.
32
- * @fires close {ModalCloseEvent} - Dispatched when a modal is closed for any reason. The event includes an optional `trigger` property containing the original event that caused the close, if the modal was closed by a user action.
31
+ * @fires {ModalCancelEvent} cancel - Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a trigger property containing the original event that caused the dismiss. Call preventDefault() on the event to prevent the modal closing.
32
+ * @fires {ModalCloseEvent} close - Dispatched when a modal is closed for any reason. The event includes an optional trigger property containing the original event that caused the close, if the modal was closed by a user action.
33
33
  *
34
34
  * @cssprop [--n-modal-padding-inline=var(--n-space-m)] - Controls the padding on the sides of the modal, using our [spacing tokens](/tokens/#space).
35
35
  * @cssprop [--n-modal-padding-block=var(--n-space-m)] - Controls the padding above and below the header of the modal, using our [spacing tokens](/tokens/#space).
@@ -69,6 +69,12 @@ export default class Modal extends LitElement {
69
69
  * itself remaining fixed.
70
70
  */
71
71
  scrollable: boolean;
72
+ /**
73
+ * When true, the modal will not close when clicking the backdrop or pressing Escape,
74
+ * and the close button will be hidden. Only programmatic close or custom action buttons
75
+ * can dismiss the modal.
76
+ */
77
+ persistent: boolean;
72
78
  connectedCallback(): void;
73
79
  disconnectedCallback(): void;
74
80
  /**
@@ -4,6 +4,7 @@ interface ModalControllerOptions {
4
4
  isOpen: LightDismissOptions['isOpen'];
5
5
  onDismiss: (trigger: Event) => void;
6
6
  close: (returnValue?: string, trigger?: Event) => void;
7
+ isLightDismissEnabled: () => boolean;
7
8
  backdrop: () => HTMLElement;
8
9
  dialog: () => HTMLElement;
9
10
  }
package/lib/vue.d.ts CHANGED
@@ -171,12 +171,12 @@ interface NordComponents {
171
171
  "nord-modal": DefineComponent<
172
172
  WCProps<Components.Modal> & {
173
173
  /**
174
- * {ModalCancelEvent} - Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a `trigger` property containing the original event that caused the dismiss. Call `preventDefault()` on the event to prevent the modal closing.
174
+ * Dispatched before the modal has closed when a user attempts to dismiss a modal. The event includes a trigger property containing the original event that caused the dismiss. Call preventDefault() on the event to prevent the modal closing.
175
175
  */
176
176
  onCancel?: (event: Event) => void;
177
177
 
178
178
  /**
179
- * {ModalCloseEvent} - Dispatched when a modal is closed for any reason. The event includes an optional `trigger` property containing the original event that caused the close, if the modal was closed by a user action.
179
+ * Dispatched when a modal is closed for any reason. The event includes an optional trigger property containing the original event that caused the close, if the modal was closed by a user action.
180
180
  */
181
181
  onClose?: (event: Event) => void;
182
182
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nordhealth/components",
3
3
  "type": "module",
4
- "version": "4.14.0",
4
+ "version": "4.15.0",
5
5
  "description": "This package includes Nord Design System Web Components",
6
6
  "author": "Nordhealth <support@nordhealth.design>",
7
7
  "license": "SEE LICENSE IN LICENSE.md",
@@ -90,5 +90,5 @@
90
90
  "rollup": "~4.21.3"
91
91
  }
92
92
  },
93
- "gitHead": "26e0364993a580c858a1a6e54ee0594af78937d7"
93
+ "gitHead": "3e61bba8657571bd2c410b4cc1ed7a9b382751d5"
94
94
  }