@nordhealth/components 3.4.0-alpha.1 → 3.4.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.
@@ -0,0 +1,16 @@
1
+ import { ReactiveController, ReactiveControllerHost } from "lit";
2
+ type Options<T> = {
3
+ channelName: string;
4
+ onMessage: (message: T) => void;
5
+ enabled?: () => boolean;
6
+ };
7
+ export declare class BroadcastChannelController<T> implements ReactiveController {
8
+ private channel?;
9
+ private options;
10
+ constructor(host: ReactiveControllerHost, options: Options<T>);
11
+ hostConnected(): void;
12
+ hostDisconnected(): void;
13
+ handleEvent(event: MessageEvent<T>): void;
14
+ post(message: T): void;
15
+ }
16
+ export {};
@@ -32,6 +32,7 @@ export default class Layout extends LitElement {
32
32
  private direction;
33
33
  private events;
34
34
  private lightDismiss;
35
+ private broadcast;
35
36
  private navEl;
36
37
  private navWidth;
37
38
  private isDragging;
@@ -47,6 +48,11 @@ export default class Layout extends LitElement {
47
48
  * This is useful for multi-page apps, where clicks on links trigger a full page load.
48
49
  */
49
50
  persistNavState: boolean;
51
+ /**
52
+ * Controls whether the navigation's open/closed state and width is synced across tabs/windows on the same origin.
53
+ * This is useful for long-lived app sessions where you may have multiple tabs/windows open at once.
54
+ */
55
+ syncNavState: boolean;
50
56
  /**
51
57
  * Controls the padding of the default main section slot. When set to “none”,
52
58
  * the nav and header slots will still have padding.
@@ -66,9 +72,9 @@ export default class Layout extends LitElement {
66
72
  render(): import("lit-html").TemplateResult<1>;
67
73
  private renderNavToggle;
68
74
  private renderNavCollapse;
69
- protected handleNavWidthChange(): void;
75
+ protected handleNavWidthChange(prev: number): void;
70
76
  protected handleNavStateChange(prev: NavState): void;
71
- protected handleOpenChange(): void;
77
+ protected handleOpenChange(prev: boolean): void;
72
78
  private navTransition;
73
79
  private handleNavClick;
74
80
  private handleMainClick;
@@ -1,14 +1,12 @@
1
1
  import { LitElement } from "lit";
2
- declare const TopBar_base: typeof LitElement;
3
2
  /**
4
3
  * Top bar is a header component that is always visible at the top of the interface. Top bar allows functionality such as search and contextual menus to be placed at the top of the interface.
5
4
  *
6
- * @status draft
7
5
  * @category structure
8
6
  * @slot - Used for the main content of the top bar. We recommend placing your application’s global search functionality into this slot.
9
7
  * @slot end - Optional slot for menus, buttons, toggles, etc.
10
8
  */
11
- export default class TopBar extends TopBar_base {
9
+ export default class TopBar extends LitElement {
12
10
  static styles: import("lit").CSSResult[];
13
11
  render(): import("lit-html").TemplateResult<1>;
14
12
  }
@@ -17,4 +15,3 @@ declare global {
17
15
  "nord-top-bar": TopBar;
18
16
  }
19
17
  }
20
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nordhealth/components",
3
- "version": "3.4.0-alpha.1",
3
+ "version": "3.4.0",
4
4
  "description": "This package includes Nord Design System Web Components",
5
5
  "author": "Nordhealth <support@nordhealth.design>",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -184,5 +184,5 @@
184
184
  }
185
185
  ]
186
186
  },
187
- "gitHead": "30139bc279edbad8607c47930ab5eb949756376b"
187
+ "gitHead": "868661706ab64318049222648a8826a20bb65aab"
188
188
  }