@geotab/zenith 3.9.1 → 3.9.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.
- package/README.md +4 -0
- package/dist/betaPill/betaPill.d.ts +18 -2
- package/dist/betaPill/betaPill.js +11 -8
- package/dist/headerTitle/headerTitle.d.ts +9 -1
- package/dist/headerTitle/headerTitle.js +3 -2
- package/dist/index.css +1 -1
- package/esm/betaPill/betaPill.d.ts +18 -2
- package/esm/betaPill/betaPill.js +11 -8
- package/esm/headerTitle/headerTitle.d.ts +9 -1
- package/esm/headerTitle/headerTitle.js +3 -2
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -6,10 +6,26 @@ export interface IBetaPillActions {
|
|
|
6
6
|
link?: string;
|
|
7
7
|
linkOptions?: ILinkOptions;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @internal - temporary escape hatch
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
export interface IBetaPillBaseInternal {
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
interface IBetaPillBase {
|
|
10
18
|
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface IBetaPillWithActions extends IBetaPillBase {
|
|
11
21
|
feedbackAction?: IBetaPillActions;
|
|
12
22
|
betaOptionAction?: IBetaPillActions;
|
|
13
23
|
}
|
|
14
|
-
|
|
24
|
+
interface IBetaPillWithoutActions extends IBetaPillBase {
|
|
25
|
+
feedbackAction?: never;
|
|
26
|
+
betaOptionAction?: never;
|
|
27
|
+
}
|
|
28
|
+
export type IBetaPill = IBetaPillWithActions | IBetaPillWithoutActions;
|
|
29
|
+
export declare const BetaPill: (props: IBetaPill) => import("react/jsx-runtime").JSX.Element;
|
|
15
30
|
export declare const TRANSLATIONS: string[];
|
|
31
|
+
export {};
|
|
@@ -124,11 +124,14 @@ injectString("zh-Hans", "Beta", "\u6D4B\u8BD5\u7248");
|
|
|
124
124
|
injectString("zh-TW", "Beta", "\u6E2C\u8A66\u7248");
|
|
125
125
|
injectString("ro-RO", "Beta", "Beta");
|
|
126
126
|
injectString("ar-SA", "Beta", "\u062A\u062C\u0631\u064A\u0628\u064A");
|
|
127
|
-
const BetaPill =
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
const BetaPill = props => {
|
|
128
|
+
const {
|
|
129
|
+
className,
|
|
130
|
+
feedbackAction,
|
|
131
|
+
betaOptionAction,
|
|
132
|
+
name,
|
|
133
|
+
description
|
|
134
|
+
} = props;
|
|
132
135
|
const {
|
|
133
136
|
translate
|
|
134
137
|
} = (0, useLanguage_1.useLanguage)();
|
|
@@ -147,8 +150,8 @@ const BetaPill = ({
|
|
|
147
150
|
return (0, jsx_runtime_1.jsx)(pillExpandable_1.PillExpandable, {
|
|
148
151
|
isBeta: true,
|
|
149
152
|
icon: iconLab_1.IconLab,
|
|
150
|
-
description: translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
|
|
151
|
-
text: translate("Beta"),
|
|
153
|
+
description: description !== null && description !== void 0 ? description : translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
|
|
154
|
+
text: name !== null && name !== void 0 ? name : translate("Beta"),
|
|
152
155
|
type: "info",
|
|
153
156
|
className: pillClasses,
|
|
154
157
|
mainAction: resolvedMainAction,
|
|
@@ -161,7 +164,7 @@ const BetaPill = ({
|
|
|
161
164
|
type: "info",
|
|
162
165
|
children: !isMobile && (0, jsx_runtime_1.jsx)("span", {
|
|
163
166
|
className: "zen-caption__content",
|
|
164
|
-
children: translate("Beta")
|
|
167
|
+
children: name !== null && name !== void 0 ? name : translate("Beta")
|
|
165
168
|
})
|
|
166
169
|
});
|
|
167
170
|
};
|
|
@@ -3,6 +3,14 @@ import "./headerTitle.less";
|
|
|
3
3
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
4
4
|
import { IBetaPillActions } from "../betaPill/betaPill";
|
|
5
5
|
export declare const HeaderTitleDisplayName = "PageHeader";
|
|
6
|
+
/**
|
|
7
|
+
* @internal - temporary escape hatch
|
|
8
|
+
* @deprecated DO NOT USE in external consumers
|
|
9
|
+
*/
|
|
10
|
+
export interface IHeaderTitleInternal {
|
|
11
|
+
betaPillName?: string;
|
|
12
|
+
betaPillDescription?: string;
|
|
13
|
+
}
|
|
6
14
|
export interface IHeaderTitle extends IZenComponentProps {
|
|
7
15
|
id?: string;
|
|
8
16
|
pageName: string;
|
|
@@ -18,7 +26,7 @@ export interface IHeaderTitle extends IZenComponentProps {
|
|
|
18
26
|
betaOptionAction?: IBetaPillActions;
|
|
19
27
|
}
|
|
20
28
|
export declare const HeaderTitle: {
|
|
21
|
-
(
|
|
29
|
+
(props: IHeaderTitle): import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
displayName: string;
|
|
23
31
|
};
|
|
24
32
|
export declare const TRANSLATIONS: string[];
|
|
@@ -10,7 +10,8 @@ const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
|
10
10
|
const headerBack_1 = require("../header/headerBack");
|
|
11
11
|
const bookmark_1 = require("../bookmark/bookmark");
|
|
12
12
|
exports.HeaderTitleDisplayName = "PageHeader";
|
|
13
|
-
const HeaderTitle = (
|
|
13
|
+
const HeaderTitle = (props) => {
|
|
14
|
+
const { id, children, className, pageName, subline, isBeta, isMobile: isMobileProp, allowBookmarkWithBack, feedBackAction, betaOptionAction, betaPillName, betaPillDescription } = props;
|
|
14
15
|
const isMobile = (0, useMobile_1.useMobile)();
|
|
15
16
|
const driveMainLineClassName = (0, useDriveClassName_1.useDriveClassName)("zen-page-header__main-line");
|
|
16
17
|
const drivePageNameClassName = (0, useDriveClassName_1.useDriveClassName)("zen-page-header__page-name");
|
|
@@ -33,7 +34,7 @@ const HeaderTitle = ({ id, children, className, pageName, subline, isBeta, isMob
|
|
|
33
34
|
});
|
|
34
35
|
return [b, b.length && !allowBookmarkWithBack ? o.filter(el => el.type !== bookmark_1.Bookmark) : o];
|
|
35
36
|
}, [children, allowBookmarkWithBack]);
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)("header", { id: id, className: clsNames, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-page-header__main-line", driveMainLineClassName || ""]), children: [back.length ? back : null, pageName ? (0, jsx_runtime_1.jsx)("h1", { className: (0, classNames_1.classNames)(["zen-page-header__page-name", drivePageNameClassName || ""]), children: pageName }) : null, isBeta ? (0, jsx_runtime_1.jsx)(betaPill_1.BetaPill, { feedbackAction: feedBackAction, betaOptionAction: betaOptionAction, className: "zen-page-header__beta" }) : null, other.length ? other : null] }), subline || ""] }));
|
|
37
|
+
return ((0, jsx_runtime_1.jsxs)("header", { id: id, className: clsNames, children: [(0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)(["zen-page-header__main-line", driveMainLineClassName || ""]), children: [back.length ? back : null, pageName ? (0, jsx_runtime_1.jsx)("h1", { className: (0, classNames_1.classNames)(["zen-page-header__page-name", drivePageNameClassName || ""]), children: pageName }) : null, isBeta ? ((0, jsx_runtime_1.jsx)(betaPill_1.BetaPill, Object.assign({ feedbackAction: feedBackAction, betaOptionAction: betaOptionAction, className: "zen-page-header__beta" }, { name: betaPillName, description: betaPillDescription }))) : null, other.length ? other : null] }), subline || ""] }));
|
|
37
38
|
};
|
|
38
39
|
exports.HeaderTitle = HeaderTitle;
|
|
39
40
|
exports.HeaderTitle.displayName = exports.HeaderTitleDisplayName;
|
package/dist/index.css
CHANGED
|
@@ -3438,7 +3438,7 @@ html:lang(ar) .zen-menu-button__action--drive-tablet {
|
|
|
3438
3438
|
box-sizing: border-box;
|
|
3439
3439
|
background-color: var(--backgrounds-main);
|
|
3440
3440
|
padding: 4px 0;
|
|
3441
|
-
max-height:
|
|
3441
|
+
max-height: 90vh;
|
|
3442
3442
|
border: 0px;
|
|
3443
3443
|
min-height: 30px;
|
|
3444
3444
|
min-width: 170px;
|
|
@@ -6,10 +6,26 @@ export interface IBetaPillActions {
|
|
|
6
6
|
link?: string;
|
|
7
7
|
linkOptions?: ILinkOptions;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @internal - temporary escape hatch
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
export interface IBetaPillBaseInternal {
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
}
|
|
17
|
+
interface IBetaPillBase {
|
|
10
18
|
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface IBetaPillWithActions extends IBetaPillBase {
|
|
11
21
|
feedbackAction?: IBetaPillActions;
|
|
12
22
|
betaOptionAction?: IBetaPillActions;
|
|
13
23
|
}
|
|
14
|
-
|
|
24
|
+
interface IBetaPillWithoutActions extends IBetaPillBase {
|
|
25
|
+
feedbackAction?: never;
|
|
26
|
+
betaOptionAction?: never;
|
|
27
|
+
}
|
|
28
|
+
export type IBetaPill = IBetaPillWithActions | IBetaPillWithoutActions;
|
|
29
|
+
export declare const BetaPill: (props: IBetaPill) => import("react/jsx-runtime").JSX.Element;
|
|
15
30
|
export declare const TRANSLATIONS: string[];
|
|
31
|
+
export {};
|
package/esm/betaPill/betaPill.js
CHANGED
|
@@ -116,11 +116,14 @@ injectString("zh-Hans", "Beta", "\u6D4B\u8BD5\u7248");
|
|
|
116
116
|
injectString("zh-TW", "Beta", "\u6E2C\u8A66\u7248");
|
|
117
117
|
injectString("ro-RO", "Beta", "Beta");
|
|
118
118
|
injectString("ar-SA", "Beta", "\u062A\u062C\u0631\u064A\u0628\u064A");
|
|
119
|
-
export const BetaPill =
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
export const BetaPill = props => {
|
|
120
|
+
const {
|
|
121
|
+
className,
|
|
122
|
+
feedbackAction,
|
|
123
|
+
betaOptionAction,
|
|
124
|
+
name,
|
|
125
|
+
description
|
|
126
|
+
} = props;
|
|
124
127
|
const {
|
|
125
128
|
translate
|
|
126
129
|
} = useLanguage();
|
|
@@ -139,8 +142,8 @@ export const BetaPill = ({
|
|
|
139
142
|
return _jsx(PillExpandable, {
|
|
140
143
|
isBeta: true,
|
|
141
144
|
icon: IconLab,
|
|
142
|
-
description: translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
|
|
143
|
-
text: translate("Beta"),
|
|
145
|
+
description: description !== null && description !== void 0 ? description : translate("This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements."),
|
|
146
|
+
text: name !== null && name !== void 0 ? name : translate("Beta"),
|
|
144
147
|
type: "info",
|
|
145
148
|
className: pillClasses,
|
|
146
149
|
mainAction: resolvedMainAction,
|
|
@@ -153,7 +156,7 @@ export const BetaPill = ({
|
|
|
153
156
|
type: "info",
|
|
154
157
|
children: !isMobile && _jsx("span", {
|
|
155
158
|
className: "zen-caption__content",
|
|
156
|
-
children: translate("Beta")
|
|
159
|
+
children: name !== null && name !== void 0 ? name : translate("Beta")
|
|
157
160
|
})
|
|
158
161
|
});
|
|
159
162
|
};
|
|
@@ -3,6 +3,14 @@ import "./headerTitle.less";
|
|
|
3
3
|
import { IZenComponentProps } from "../commonHelpers/zenComponent";
|
|
4
4
|
import { IBetaPillActions } from "../betaPill/betaPill";
|
|
5
5
|
export declare const HeaderTitleDisplayName = "PageHeader";
|
|
6
|
+
/**
|
|
7
|
+
* @internal - temporary escape hatch
|
|
8
|
+
* @deprecated DO NOT USE in external consumers
|
|
9
|
+
*/
|
|
10
|
+
export interface IHeaderTitleInternal {
|
|
11
|
+
betaPillName?: string;
|
|
12
|
+
betaPillDescription?: string;
|
|
13
|
+
}
|
|
6
14
|
export interface IHeaderTitle extends IZenComponentProps {
|
|
7
15
|
id?: string;
|
|
8
16
|
pageName: string;
|
|
@@ -18,7 +26,7 @@ export interface IHeaderTitle extends IZenComponentProps {
|
|
|
18
26
|
betaOptionAction?: IBetaPillActions;
|
|
19
27
|
}
|
|
20
28
|
export declare const HeaderTitle: {
|
|
21
|
-
(
|
|
29
|
+
(props: IHeaderTitle): import("react/jsx-runtime").JSX.Element;
|
|
22
30
|
displayName: string;
|
|
23
31
|
};
|
|
24
32
|
export declare const TRANSLATIONS: string[];
|
|
@@ -7,7 +7,8 @@ import { useDriveClassName } from "../utils/theme/useDriveClassName";
|
|
|
7
7
|
import { HeaderBack } from "../header/headerBack";
|
|
8
8
|
import { Bookmark } from "../bookmark/bookmark";
|
|
9
9
|
export const HeaderTitleDisplayName = "PageHeader";
|
|
10
|
-
export const HeaderTitle = (
|
|
10
|
+
export const HeaderTitle = (props) => {
|
|
11
|
+
const { id, children, className, pageName, subline, isBeta, isMobile: isMobileProp, allowBookmarkWithBack, feedBackAction, betaOptionAction, betaPillName, betaPillDescription } = props;
|
|
11
12
|
const isMobile = useMobile();
|
|
12
13
|
const driveMainLineClassName = useDriveClassName("zen-page-header__main-line");
|
|
13
14
|
const drivePageNameClassName = useDriveClassName("zen-page-header__page-name");
|
|
@@ -30,7 +31,7 @@ export const HeaderTitle = ({ id, children, className, pageName, subline, isBeta
|
|
|
30
31
|
});
|
|
31
32
|
return [b, b.length && !allowBookmarkWithBack ? o.filter(el => el.type !== Bookmark) : o];
|
|
32
33
|
}, [children, allowBookmarkWithBack]);
|
|
33
|
-
return (_jsxs("header", { id: id, className: clsNames, children: [_jsxs("div", { className: classNames(["zen-page-header__main-line", driveMainLineClassName || ""]), children: [back.length ? back : null, pageName ? _jsx("h1", { className: classNames(["zen-page-header__page-name", drivePageNameClassName || ""]), children: pageName }) : null, isBeta ? _jsx(BetaPill, { feedbackAction: feedBackAction, betaOptionAction: betaOptionAction, className: "zen-page-header__beta" }) : null, other.length ? other : null] }), subline || ""] }));
|
|
34
|
+
return (_jsxs("header", { id: id, className: clsNames, children: [_jsxs("div", { className: classNames(["zen-page-header__main-line", driveMainLineClassName || ""]), children: [back.length ? back : null, pageName ? _jsx("h1", { className: classNames(["zen-page-header__page-name", drivePageNameClassName || ""]), children: pageName }) : null, isBeta ? (_jsx(BetaPill, Object.assign({ feedbackAction: feedBackAction, betaOptionAction: betaOptionAction, className: "zen-page-header__beta" }, { name: betaPillName, description: betaPillDescription }))) : null, other.length ? other : null] }), subline || ""] }));
|
|
34
35
|
};
|
|
35
36
|
HeaderTitle.displayName = HeaderTitleDisplayName;
|
|
36
37
|
export const TRANSLATIONS = [...BetaPillTranslations];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotab/zenith",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "Zenith components library on React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -82,6 +82,8 @@
|
|
|
82
82
|
"less": "^4.1.3",
|
|
83
83
|
"less-loader": "^12.2.0",
|
|
84
84
|
"mini-css-extract-plugin": "^2.9.2",
|
|
85
|
+
"postcss-loader": "^8.2.1",
|
|
86
|
+
"postcss-rtlcss": "^6.0.0",
|
|
85
87
|
"prettier": "^3.8.1",
|
|
86
88
|
"storybook": "^10.3.5",
|
|
87
89
|
"style-loader": "^4.0.0",
|