@kenlo/kdls-design-system 2.28.1 → 2.28.3
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/dist/components/Header/Header.d.ts +8 -5
- package/dist/components/Header/header-fit.d.ts +24 -0
- package/dist/components/Header/header-fit.test.d.ts +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +3052 -3006
- package/kdls-manifest.json +5 -5
- package/package.json +1 -1
|
@@ -38,6 +38,9 @@ export interface HeaderProfileMenuItem {
|
|
|
38
38
|
label: string;
|
|
39
39
|
href?: string;
|
|
40
40
|
onClick?: () => void;
|
|
41
|
+
/** 'item' (default): a row of the menu. 'link': a Button variant="link" (blue text) for an
|
|
42
|
+
* action set apart from the list, e.g. "Restaurar padrão". A link item takes onClick only. */
|
|
43
|
+
variant?: 'item' | 'link';
|
|
41
44
|
}
|
|
42
45
|
export interface HeaderProps {
|
|
43
46
|
/** Kenlo product that determines the logo */
|
|
@@ -96,11 +99,11 @@ export interface HeaderProps {
|
|
|
96
99
|
/** Hides the notifications bell — use when the product has no notifications concept */
|
|
97
100
|
showNotifications?: boolean;
|
|
98
101
|
/**
|
|
99
|
-
* Draws a navigation button (the hamburger) in the collapsed
|
|
100
|
-
* slot and the avatar: logo, right slot,
|
|
101
|
-
* and leave the avatar's menu, which
|
|
102
|
-
* logout). `false` by default: the
|
|
103
|
-
* when there are navItems.
|
|
102
|
+
* Draws a navigation button (the hamburger) in the collapsed bar (below 800px, and wherever
|
|
103
|
+
* the wide row does not fit), between the right slot and the avatar: logo, right slot,
|
|
104
|
+
* navigation, avatar. The navItems then open from it and leave the avatar's menu, which
|
|
105
|
+
* keeps the account (profile, profileMenuItems, FAQs, logout). `false` by default: the
|
|
106
|
+
* navigation stays inside the avatar's menu. Drawn only when there are navItems.
|
|
104
107
|
*/
|
|
105
108
|
showNavButton?: boolean;
|
|
106
109
|
/**
|
|
@@ -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 {};
|