@kenlo/kdls-design-system 2.28.0 → 2.28.2

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.
@@ -81,7 +81,8 @@ export interface HeaderProps {
81
81
  };
82
82
  /** Slot for context selector (unit/site) */
83
83
  contextSelector?: React.ReactNode;
84
- /** Free slot on the right, before the avatar — e.g. a version badge */
84
+ /** Free slot on the right, before the avatar (and before the navigation button, when
85
+ * showNavButton draws one) — e.g. a version badge */
85
86
  rightSlot?: React.ReactNode;
86
87
  /** Items shown in the profile menu (desktop dropdown + mobile menu), below the user info. Customizable per product — empty by default, nothing decorative is assumed. */
87
88
  profileMenuItems?: HeaderProfileMenuItem[];
@@ -94,6 +95,20 @@ export interface HeaderProps {
94
95
  showFAQs?: boolean;
95
96
  /** Hides the notifications bell — use when the product has no notifications concept */
96
97
  showNotifications?: boolean;
98
+ /**
99
+ * Draws a navigation button (the hamburger) in the collapsed bar (below 800px, and wherever
100
+ * the wide row does not fit), between the right slot and the avatar: logo, right slot,
101
+ * navigation, avatar. The navItems then open from it and leave the avatar's menu, which
102
+ * keeps the account (profile, profileMenuItems, FAQs, logout). `false` by default: the
103
+ * navigation stays inside the avatar's menu. Drawn only when there are navItems.
104
+ */
105
+ showNavButton?: boolean;
106
+ /**
107
+ * Draws the 1px line under the bar. `false` by default.
108
+ * Use `true` only when nothing sits right under the Header (no sub-header) and the page
109
+ * behind it has the Header's own background — the line is what tells the two apart.
110
+ */
111
+ bordered?: boolean;
97
112
  className?: string;
98
113
  }
99
114
  export declare const Header: React.FC<HeaderProps>;
@@ -0,0 +1,24 @@
1
+ /** Set on the header while it is measured. Under it the stylesheet draws the wide row even
2
+ * when the bar is collapsed for lack of room, so there is always a real row to measure. */
3
+ export declare const FIT_PROBE = "data-fit-probe";
4
+ /** Room the navigation keeps clear of the controls on its right: the Nav's own gap. */
5
+ export declare const NAV_CLEARANCE = 16;
6
+ export interface WideRow {
7
+ /** Right edge of the bar's content box: where its padding starts. */
8
+ barEnd: number;
9
+ /** Right edge of the last control in the row. */
10
+ rowEnd: number;
11
+ /** Right edge of the navigation's last item. */
12
+ navEnd: number;
13
+ /** Left edge of the first control. */
14
+ controlsStart: number;
15
+ }
16
+ /** The wide row fits when it ends inside the bar and the navigation keeps clear of the controls. */
17
+ export declare function wideRowFits({ barEnd, rowEnd, navEnd, controlsStart }: WideRow): boolean;
18
+ /**
19
+ * Measures the wide row of `header`, whichever layout is on screen. Nothing is painted in
20
+ * between: the attribute is set, the boxes are read and the attribute is taken off in the
21
+ * same task. `null` when there is nothing to measure: no navigation in the row, or a bar
22
+ * with no width (not laid out).
23
+ */
24
+ export declare function measureWideRow(header: HTMLElement): WideRow | null;
@@ -0,0 +1 @@
1
+ export {};