@geotab/zenith 3.9.0-beta.ssr.2 → 3.9.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/README.md +29 -8
- package/dist/card/card.d.ts +1 -1
- package/dist/card/card.js +1 -1
- package/dist/{title → card/components}/title.d.ts +1 -1
- package/dist/card/components/title.js +26 -0
- package/dist/card/helpers/getIconTypeFromStatus.d.ts +1 -1
- package/dist/chart/pieChart/centerTextPlugin.js +11 -4
- package/dist/chart/pieChart.js +10 -1
- package/dist/commonHelpers/hooks/useDeviceType.js +2 -1
- package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/dist/commonHelpers/isDomEnv.js +1 -2
- package/dist/commonHelpers/useUniqueId.js +2 -2
- package/dist/commonHelpers/utils.d.ts +0 -9
- package/dist/commonHelpers/utils.js +1 -11
- package/dist/commonStyles/common.less +13 -1
- package/dist/commonStyles/fonts/notosarabic/LICENSE.txt +93 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff +0 -0
- package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff2 +0 -0
- package/dist/commonStyles/fonts/notosarabic.less +43 -0
- package/dist/commonStyles/typography/typography.less +6 -0
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -5
- package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +38 -2
- package/dist/dateInputInner/dateInputInnerControlBlock.js +5 -2
- package/dist/dateRangeRaw/dateRangeRaw.js +5 -1
- package/dist/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
- package/dist/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
- package/dist/index.css +1981 -212
- package/dist/index.d.ts +5 -5
- package/dist/index.js +24 -26
- package/dist/menu/components/menuItem.js +4 -4
- package/dist/menu/controlledMenu.js +4 -4
- package/dist/nav/nav.js +10 -5
- package/dist/selectRaw/selectRaw.js +1 -1
- package/dist/shield/shield.js +5 -3
- package/dist/table/children/useTableChildren.d.ts +1 -1
- package/dist/table/children/useTableChildren.js +3 -3
- package/dist/table/selectable/useSelectableRows.d.ts +0 -8
- package/dist/table/selectable/useSelectableRows.js +7 -14
- package/dist/table/table.js +7 -1
- package/dist/tooltip/tooltip.d.ts +2 -1
- package/dist/tooltip/tooltip.js +51 -55
- package/dist/utils/localization/languageProvider.js +5 -2
- package/dist/utils/localization/translations/ar.json +0 -1
- package/dist/utils/localization/translations/cs.json +0 -1
- package/dist/utils/localization/translations/da-DK.json +0 -1
- package/dist/utils/localization/translations/de.json +0 -1
- package/dist/utils/localization/translations/en.json +3 -1
- package/dist/utils/localization/translations/es.json +0 -1
- package/dist/utils/localization/translations/fi-FI.json +0 -1
- package/dist/utils/localization/translations/fr-FR.json +0 -1
- package/dist/utils/localization/translations/fr.json +0 -1
- package/dist/utils/localization/translations/hu-HU.json +0 -1
- package/dist/utils/localization/translations/id.json +0 -1
- package/dist/utils/localization/translations/it.json +0 -1
- package/dist/utils/localization/translations/ja.json +0 -1
- package/dist/utils/localization/translations/ko-KR.json +0 -1
- package/dist/utils/localization/translations/ms.json +0 -1
- package/dist/utils/localization/translations/nb-NO.json +0 -1
- package/dist/utils/localization/translations/nl.json +0 -1
- package/dist/utils/localization/translations/pl.json +0 -1
- package/dist/utils/localization/translations/pt-BR.json +0 -1
- package/dist/utils/localization/translations/pt-PT.json +0 -1
- package/dist/utils/localization/translations/ro-RO.json +0 -1
- package/dist/utils/localization/translations/sk-SK.json +0 -1
- package/dist/utils/localization/translations/sv.json +0 -1
- package/dist/utils/localization/translations/th.json +0 -1
- package/dist/utils/localization/translations/tr.json +0 -1
- package/dist/utils/localization/translations/zh-Hans.json +0 -1
- package/dist/utils/localization/translations/zh-TW.json +0 -1
- package/esm/card/card.d.ts +1 -1
- package/esm/card/card.js +1 -1
- package/esm/{title → card/components}/title.d.ts +1 -1
- package/esm/card/components/title.js +22 -0
- package/esm/card/helpers/getIconTypeFromStatus.d.ts +1 -1
- package/esm/chart/pieChart/centerTextPlugin.js +11 -4
- package/esm/chart/pieChart.js +11 -2
- package/esm/commonHelpers/hooks/useDeviceType.js +3 -2
- package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/esm/commonHelpers/isDomEnv.js +1 -2
- package/esm/commonHelpers/useUniqueId.js +1 -1
- package/esm/commonHelpers/utils.d.ts +0 -9
- package/esm/commonHelpers/utils.js +0 -9
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +3 -5
- package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +38 -2
- package/esm/dateInputInner/dateInputInnerControlBlock.js +5 -2
- package/esm/dateRangeRaw/dateRangeRaw.js +5 -1
- package/esm/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
- package/esm/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
- package/esm/index.d.ts +5 -5
- package/esm/index.js +5 -5
- package/esm/menu/components/menuItem.js +1 -1
- package/esm/menu/controlledMenu.js +1 -1
- package/esm/nav/nav.js +10 -5
- package/esm/selectRaw/selectRaw.js +1 -1
- package/esm/shield/shield.js +5 -3
- package/esm/table/children/useTableChildren.d.ts +1 -1
- package/esm/table/children/useTableChildren.js +3 -3
- package/esm/table/selectable/useSelectableRows.d.ts +0 -8
- package/esm/table/selectable/useSelectableRows.js +7 -14
- package/esm/table/table.js +7 -1
- package/esm/tooltip/tooltip.d.ts +2 -1
- package/esm/tooltip/tooltip.js +51 -55
- package/esm/utils/localization/languageProvider.js +5 -2
- package/esm/utils/localization/translations/ar.json +0 -1
- package/esm/utils/localization/translations/cs.json +0 -1
- package/esm/utils/localization/translations/da-DK.json +0 -1
- package/esm/utils/localization/translations/de.json +0 -1
- package/esm/utils/localization/translations/en.json +3 -1
- package/esm/utils/localization/translations/es.json +0 -1
- package/esm/utils/localization/translations/fi-FI.json +0 -1
- package/esm/utils/localization/translations/fr-FR.json +0 -1
- package/esm/utils/localization/translations/fr.json +0 -1
- package/esm/utils/localization/translations/hu-HU.json +0 -1
- package/esm/utils/localization/translations/id.json +0 -1
- package/esm/utils/localization/translations/it.json +0 -1
- package/esm/utils/localization/translations/ja.json +0 -1
- package/esm/utils/localization/translations/ko-KR.json +0 -1
- package/esm/utils/localization/translations/ms.json +0 -1
- package/esm/utils/localization/translations/nb-NO.json +0 -1
- package/esm/utils/localization/translations/nl.json +0 -1
- package/esm/utils/localization/translations/pl.json +0 -1
- package/esm/utils/localization/translations/pt-BR.json +0 -1
- package/esm/utils/localization/translations/pt-PT.json +0 -1
- package/esm/utils/localization/translations/ro-RO.json +0 -1
- package/esm/utils/localization/translations/sk-SK.json +0 -1
- package/esm/utils/localization/translations/sv.json +0 -1
- package/esm/utils/localization/translations/th.json +0 -1
- package/esm/utils/localization/translations/tr.json +0 -1
- package/esm/utils/localization/translations/zh-Hans.json +0 -1
- package/esm/utils/localization/translations/zh-TW.json +0 -1
- package/package.json +38 -35
- package/dist/title/title.js +0 -27
- package/esm/title/title.js +0 -23
package/esm/tooltip/tooltip.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import React, { createElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { useResize } from "../commonHelpers/hooks/useResize";
|
|
5
5
|
import { calculatePosition as calculatePos } from "../utils/positioningUtils/calculatePosition";
|
|
6
|
-
import {
|
|
6
|
+
import { usePortal } from "../commonHelpers/hooks/usePortal";
|
|
7
7
|
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
8
8
|
import { calculateArrowPosition } from "./helpers/calculateArrowPosition";
|
|
9
9
|
import { DeviceType } from "../commonHelpers/hooks/deviceType";
|
|
@@ -150,12 +150,15 @@ const EventWrapper = ({
|
|
|
150
150
|
export const Tooltip = ({
|
|
151
151
|
trigger,
|
|
152
152
|
triggerClassName,
|
|
153
|
+
triggerAriaLabel,
|
|
153
154
|
className = "",
|
|
154
155
|
alignment,
|
|
155
156
|
children,
|
|
156
157
|
mobileSheetTitle,
|
|
157
158
|
mobileTitle
|
|
159
|
+
// eslint-disable-next-line complexity
|
|
158
160
|
}) => {
|
|
161
|
+
var _a, _b, _c, _d;
|
|
159
162
|
const GAP = 12;
|
|
160
163
|
const isDrive = useDrive();
|
|
161
164
|
const triggerRefNative = trigger ? trigger.props.ref : undefined;
|
|
@@ -219,12 +222,12 @@ export const Tooltip = ({
|
|
|
219
222
|
tabIndex: 0,
|
|
220
223
|
type: "button",
|
|
221
224
|
className: "zen-tooltip__trigger-container",
|
|
222
|
-
"aria-label": translate("Information"),
|
|
225
|
+
"aria-label": triggerAriaLabel !== null && triggerAriaLabel !== void 0 ? triggerAriaLabel : translate("Information"),
|
|
223
226
|
children: createElement(IconInfoCircle, {
|
|
224
227
|
size: isMobile ? "huge" : "large",
|
|
225
228
|
className: classNames([triggerClassName || "", "zen-tooltip__trigger"])
|
|
226
229
|
})
|
|
227
|
-
}), [trigger, isMobile, triggerClassName, translate]);
|
|
230
|
+
}), [trigger, isMobile, triggerClassName, triggerAriaLabel, translate]);
|
|
228
231
|
const triggerClone = _jsx(EventWrapper, {
|
|
229
232
|
deviceType: deviceType,
|
|
230
233
|
isTooltipVisible: isTooltipVisible,
|
|
@@ -316,61 +319,54 @@ export const Tooltip = ({
|
|
|
316
319
|
}
|
|
317
320
|
return preferredAlignment;
|
|
318
321
|
}, [isMobile, TOOLTIP_ARROW_HEIGHT, triggerRef, checkNaturalFit]);
|
|
319
|
-
|
|
320
|
-
const
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
322
|
+
const container = (_d = (_b = (_a = zen.document) === null || _a === void 0 ? void 0 : _a.fullscreenElement) !== null && _b !== void 0 ? _b : (_c = zen.document) === null || _c === void 0 ? void 0 : _c.body) !== null && _d !== void 0 ? _d : undefined;
|
|
323
|
+
const portal = usePortal(isTooltipVisible ? _jsxs(_Fragment, {
|
|
324
|
+
children: [isMobile && _jsx(Shield, {
|
|
325
|
+
className: "zen-tooltip__shield"
|
|
326
|
+
}), _jsxs("div", {
|
|
327
|
+
id: tooltipId,
|
|
328
|
+
role: "tooltip",
|
|
329
|
+
ref: tooltipRef,
|
|
330
|
+
className: classNames(["zen-tooltip", dark ? "zen-dark" : "", `zen-tooltip--auto`, isMobile ? "zen-tooltip--mobile" : "", isDrive ? "zen-tooltip--drive" : "", className]),
|
|
331
|
+
onMouseEnter: () => {
|
|
332
|
+
var _a, _b;
|
|
333
|
+
timerRef.current && ((_a = zen.clearTimeout) === null || _a === void 0 ? void 0 : _a.call(zen, timerRef.current));
|
|
334
|
+
timerMouseLeaveRef.current && ((_b = zen.clearTimeout) === null || _b === void 0 ? void 0 : _b.call(zen, timerMouseLeaveRef.current));
|
|
335
|
+
},
|
|
336
|
+
onMouseLeave: () => {
|
|
337
|
+
var _a;
|
|
338
|
+
timerMouseLeaveRef.current = (_a = zen.setTimeout) === null || _a === void 0 ? void 0 : _a.call(zen, () => {
|
|
339
|
+
if (!isMobile && !isDrive) {
|
|
340
|
+
setTooltipVisible(false);
|
|
341
|
+
}
|
|
342
|
+
}, TOOLTIP_VISIBILITY_DELAY);
|
|
343
|
+
},
|
|
344
|
+
children: [!isMobile && !isDrive && _jsx("div", {
|
|
345
|
+
className: classNames(["zen-tooltip__arrow", arrowClass]),
|
|
346
|
+
ref: arrowRef
|
|
328
347
|
}), _jsxs("div", {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
348
|
+
className: classNames(["zen-tooltip__body", "zen-tooltip__body--auto", isDrive ? "zen-tooltip__body--drive" : "", isMobile ? "zen-tooltip__body--mobile" : "", deviceType === DeviceType.Desktop && !isDrive ? "zen-tooltip__body--desktop" : ""]),
|
|
349
|
+
children: [(mobileSheetTitle || mobileTitle) && (deviceType === DeviceType.Mobile || isDrive) && _jsx("div", {
|
|
350
|
+
className: "zen-tooltip__title",
|
|
351
|
+
children: mobileSheetTitle || mobileTitle
|
|
352
|
+
}), children]
|
|
353
|
+
}), (deviceType === DeviceType.Mobile || isDrive) && _jsx(Button, {
|
|
354
|
+
className: "zen-tooltip__close-button",
|
|
355
|
+
title: translate("Close"),
|
|
356
|
+
"aria-label": translate("Close"),
|
|
357
|
+
onClick: () => {
|
|
339
358
|
var _a;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
setTooltipVisible(false);
|
|
343
|
-
}
|
|
344
|
-
}, TOOLTIP_VISIBILITY_DELAY);
|
|
359
|
+
setTooltipVisible(false);
|
|
360
|
+
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
345
361
|
},
|
|
346
|
-
children:
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
children: [(mobileSheetTitle || mobileTitle) && (deviceType === DeviceType.Mobile || isDrive) && _jsx("div", {
|
|
352
|
-
className: "zen-tooltip__title",
|
|
353
|
-
children: mobileSheetTitle || mobileTitle
|
|
354
|
-
}), children]
|
|
355
|
-
}), (deviceType === DeviceType.Mobile || isDrive) && _jsx(Button, {
|
|
356
|
-
className: "zen-tooltip__close-button",
|
|
357
|
-
title: translate("Close"),
|
|
358
|
-
"aria-label": translate("Close"),
|
|
359
|
-
onClick: () => {
|
|
360
|
-
var _a;
|
|
361
|
-
setTooltipVisible(false);
|
|
362
|
-
(_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
363
|
-
},
|
|
364
|
-
children: _jsx(IconClose, {
|
|
365
|
-
description: translate("Close"),
|
|
366
|
-
className: "svgIcon",
|
|
367
|
-
size: "huge"
|
|
368
|
-
})
|
|
369
|
-
})]
|
|
362
|
+
children: _jsx(IconClose, {
|
|
363
|
+
description: translate("Close"),
|
|
364
|
+
className: "svgIcon",
|
|
365
|
+
size: "huge"
|
|
366
|
+
})
|
|
370
367
|
})]
|
|
371
|
-
})
|
|
372
|
-
|
|
373
|
-
};
|
|
368
|
+
})]
|
|
369
|
+
}) : null, container, tooltipId);
|
|
374
370
|
const calculatePosition = useCallback(() => {
|
|
375
371
|
const eAlignment = getEffectiveAlignment(tooltipAlignmentRef.current);
|
|
376
372
|
calculatePos(triggerRef, tooltipRef, TOOLTIP_ARROW_HEIGHT + GAP, TOOLTIP_ARROW_HEIGHT + GAP, false, eAlignment, tooltipAlignments, undefined, isMobile);
|
|
@@ -426,6 +422,6 @@ export const Tooltip = ({
|
|
|
426
422
|
}
|
|
427
423
|
}, []);
|
|
428
424
|
return _jsxs(_Fragment, {
|
|
429
|
-
children: [
|
|
425
|
+
children: [portal, triggerClone]
|
|
430
426
|
});
|
|
431
427
|
};
|
|
@@ -9,7 +9,10 @@ export const LanguageProvider = ({ language, children }) => {
|
|
|
9
9
|
const validLanguage = getSupportedLanguage(language);
|
|
10
10
|
const direction = getTextDirection(validLanguage);
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
if (zen.document) {
|
|
13
|
+
zen.document.documentElement.dir = direction;
|
|
14
|
+
zen.document.documentElement.lang = validLanguage;
|
|
15
|
+
}
|
|
16
|
+
}, [direction, validLanguage]);
|
|
14
17
|
return (_jsx(languageContext.Provider, { value: validLanguage, children: _jsx(directionContext.Provider, { value: direction, children: children }) }));
|
|
15
18
|
};
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "هذه الميزة لا تزال قيد الاختبار وغير مدعومة بالكامل بعد. ملاحظاتك قيمة للمساعدة في توجيه التحسينات المستقبلية.",
|
|
204
204
|
"Send feedback": "إرسال ملاحظات",
|
|
205
205
|
"Manage beta option": "إدارة الخيار التجريبي",
|
|
206
|
-
"Ma": "مايو",
|
|
207
206
|
"Y-axis": "المحور ص",
|
|
208
207
|
"X-axis": "المحور س",
|
|
209
208
|
"Previous": "السابق",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Funktionen er stadig under test og virker ikke helt endnu. Din feedback er guld værd og hjælper os med fremtidige forbedringer.",
|
|
202
202
|
"Send feedback": "Send feedback",
|
|
203
203
|
"Manage beta option": "Styr beta-indstillingen",
|
|
204
|
-
"Ma": "Maj",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Forrige",
|
|
@@ -203,11 +203,12 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.",
|
|
204
204
|
"Send feedback": "Send feedback",
|
|
205
205
|
"Manage beta option": "Manage beta option",
|
|
206
|
-
"Ma": "May",
|
|
207
206
|
"Y-axis": "Y-axis",
|
|
208
207
|
"X-axis": "X-axis",
|
|
209
208
|
"Previous": "Previous",
|
|
210
209
|
"Next": "Next",
|
|
210
|
+
"Previous date period": "Previous date period",
|
|
211
|
+
"Next date period": "Next date period",
|
|
211
212
|
"Choose dates": "Choose dates",
|
|
212
213
|
"Date range not available": "Date range not available",
|
|
213
214
|
"Choose your date range": "Choose your date range",
|
|
@@ -217,6 +218,7 @@
|
|
|
217
218
|
"Favorite": "Favorite",
|
|
218
219
|
"All Filters": "All Filters",
|
|
219
220
|
"Reset All": "Reset all",
|
|
221
|
+
"Active filters: {}": "Active filters: {}",
|
|
220
222
|
"Loading": "Loading",
|
|
221
223
|
"Select option": "Select option",
|
|
222
224
|
"Value": "Value",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Tämä ominaisuus on vielä testausvaiheessa eikä ole täysin tuettu. Palautteesi on tärkeää, sillä sen avulla voimme kehittää asioita entistä paremmin.",
|
|
202
202
|
"Send feedback": "Lähetä palautetta",
|
|
203
203
|
"Manage beta option": "Hallitse beta-vaihtoehtoa",
|
|
204
|
-
"Ma": "Tou.",
|
|
205
204
|
"Y-axis": "Y-akseli",
|
|
206
205
|
"X-axis": "X-akseli",
|
|
207
206
|
"Previous": "Edellinen",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Ez a funkció még tesztelés alatt áll, és még nem támogatott teljes mértékben. A visszajelzésed értékes, segít a jövőbeli fejlesztésekben.",
|
|
202
202
|
"Send feedback": "Küldj visszajelzést.",
|
|
203
203
|
"Manage beta option": "Béta-opció kezelése",
|
|
204
|
-
"Ma": "Május",
|
|
205
204
|
"Y-axis": "Y tengely",
|
|
206
205
|
"X-axis": "X tengely",
|
|
207
206
|
"Previous": "Előző",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "이 기능은 여전히 테스트 중이며 아직 완전히 지원되지 않습니다. 귀하의 피드백은 향후 개선 방향을 제시하는 데 매우 중요합니다.",
|
|
202
202
|
"Send feedback": "피드백 보내기",
|
|
203
203
|
"Manage beta option": "베타 옵션 관리",
|
|
204
|
-
"Ma": "5월",
|
|
205
204
|
"Y-axis": "Y축",
|
|
206
205
|
"X-axis": "X축",
|
|
207
206
|
"Open": "열려 있는",
|
|
@@ -201,7 +201,6 @@
|
|
|
201
201
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Denne funksjonen er fortsatt under testing, og støttes ikke fullt ut ennå. Tilbakemeldingen din er viktig for at vi skal kunne forbedre tjenesten.",
|
|
202
202
|
"Send feedback": "Send tilbakemelding",
|
|
203
203
|
"Manage beta option": "Administrer beta-alternativ",
|
|
204
|
-
"Ma": "Mai",
|
|
205
204
|
"Y-axis": "Y-akse",
|
|
206
205
|
"X-axis": "X-akse",
|
|
207
206
|
"Previous": "Tidligere",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Esta funcionalidade ainda está em testes e ainda não é totalmente suportada. O seu feedback é valioso para ajudar a orientar melhorias futuras.",
|
|
204
204
|
"Send feedback": "Enviar feedback",
|
|
205
205
|
"Manage beta option": "Gerenciar opção beta",
|
|
206
|
-
"Ma": "Mai",
|
|
207
206
|
"Y-axis": "Eixo Y",
|
|
208
207
|
"X-axis": "Eixo X",
|
|
209
208
|
"Previous": "Anterior",
|
|
@@ -203,7 +203,6 @@
|
|
|
203
203
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "Această funcție este în testare și încă nu este complet compatibilă. Feedbackul dvs. este important și ne va ajuta la îmbunătățirile viitoare.",
|
|
204
204
|
"Send feedback": "Trimiteți feedback",
|
|
205
205
|
"Manage beta option": "Administrați opțiunea beta",
|
|
206
|
-
"Ma": "Ma",
|
|
207
206
|
"Y-axis": "Axa Y",
|
|
208
207
|
"X-axis": "Axa X",
|
|
209
208
|
"Previous": "Înapoi",
|
|
@@ -215,7 +215,6 @@
|
|
|
215
215
|
"This feature is still in testing, and is not fully supported yet. Your feedback is valuable to help guide future enhancements.": "此功能仍在測試階段,尚未完全支援。您的意見回饋對我們來說非常重要,能協助我們確認未來改進的方向。",
|
|
216
216
|
"Send feedback": "傳送意見回饋",
|
|
217
217
|
"Manage beta option": "管理測試版選項",
|
|
218
|
-
"Ma": "五月",
|
|
219
218
|
"Next": "下一步",
|
|
220
219
|
"Previous": "上一個",
|
|
221
220
|
"Open": "開啟",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geotab/zenith",
|
|
3
|
-
"version": "3.9.0
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"description": "Zenith components library on React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "esm/index.d.ts",
|
|
@@ -12,35 +12,37 @@
|
|
|
12
12
|
"**/react-chartjs/dateAdapter.js"
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"prettier-fix": "npx prettier --write \"**/*.{ts,tsx,js,jsx,json,md,less,css}\"",
|
|
19
|
-
"prettier": "npx prettier --check \"**/*.{ts,tsx,js,jsx,json,md,less,css}\"",
|
|
20
|
-
"new": "node newComponent.mjs",
|
|
21
|
-
"translations": "node build-utils/translations/translation-integrity.mjs",
|
|
15
|
+
"add-icon": "node addIcon.js",
|
|
16
|
+
"build-rtl": "node build-utils/rtl/generate-rtl-css.js",
|
|
17
|
+
"build": "npm run clean && npm run build-index && npm run update-version && npm run build-ts && npm run build-less && npm run build-copy && npm run build-clean && npm run translations",
|
|
22
18
|
"build-ai-mdx": "node collectmdx.js",
|
|
23
|
-
"build-esm": "npx tsc -b tsconfig.esm.json",
|
|
24
19
|
"build-cjs": "npx tsc -b tsconfig.cjs.json",
|
|
25
|
-
"build-ts": "npm run build-esm && npm run build-cjs && node build-utils/translations/inject-translations.js && node less-transformer.js",
|
|
26
|
-
"build-less": "node less-compile.js",
|
|
27
|
-
"build-copy": "node build-copy.js",
|
|
28
20
|
"build-clean": "node build-clean.js",
|
|
21
|
+
"build-copy": "node build-copy.js",
|
|
22
|
+
"build-esm": "npx tsc -b tsconfig.esm.json",
|
|
29
23
|
"build-index": "node buildIndex.js",
|
|
30
|
-
"
|
|
31
|
-
"build": "npm run build-index && npm run update-version && npm run build-ts && npm run build-less && npm run build-copy && npm run build-clean && npm run translations",
|
|
32
|
-
"add-icon": "node addIcon.js",
|
|
33
|
-
"watch": "npx tsc -b tsconfig.build.json -w",
|
|
34
|
-
"watch:inject": "npx nodemon --watch dist --ext js --exec 'node build-utils/translations/inject-translations.js' --delay 500ms",
|
|
35
|
-
"test-build": "npx tsc -b tsconfig.jestTests.json",
|
|
36
|
-
"test-watch": "npm run clean && npm run test-build && node build-utils/translations/inject-translations.js && npx tsc -b tsconfig.jestTests.json -w",
|
|
37
|
-
"test-watch:inject": "npx nodemon --watch dist --ext js --exec 'node build-utils/translations/inject-translations.js' --delay 500ms",
|
|
38
|
-
"test-coverage": "npm run clean && npm run test-build && node build-utils/translations/inject-translations.js && jest --clearCache && jest --collectCoverage=true --coverage --collectCoverageFrom='./dist/**/*.js' --collectCoverageFrom='!./dist/**/*.test.js' --json --outputFile=jest-result.json --coverageReporters=html --coverageReporters=text-summary --coverageReporters=cobertura --maxWorkers=4 --noStackTrace && node testHelpers/cobertura/cobertura.js",
|
|
39
|
-
"coverage": "npm run test-coverage && google-chrome ./jest-coverage/index.html",
|
|
40
|
-
"storybook": "storybook dev -p 6006",
|
|
24
|
+
"build-less": "node less-compile.js",
|
|
41
25
|
"build-storybook": "storybook build && npm run build-ai-mdx",
|
|
26
|
+
"build-ts": "npm run build-esm && npm run build-cjs && npm run inject-translations && node less-transformer.js",
|
|
42
27
|
"clean": "rm -rf ./dist && rm -rf ./esm && rm -rf ./jest-coverage",
|
|
43
|
-
"
|
|
28
|
+
"coverage": "npm run test-coverage && google-chrome ./jest-coverage/index.html",
|
|
29
|
+
"inject-translations": "node build-utils/translations/inject-translations.js",
|
|
30
|
+
"lint": "npx eslint",
|
|
31
|
+
"new": "node newComponent.mjs",
|
|
32
|
+
"prettier": "npx prettier . --config '.prettierrc' --ignore-path '.prettierignore'",
|
|
33
|
+
"prettier-check": "npm run prettier -- --check",
|
|
34
|
+
"prettier-fix": "npm run prettier -- --write",
|
|
35
|
+
"start": "npm run storybook",
|
|
36
|
+
"storybook": "storybook dev -p 6006",
|
|
37
|
+
"test": "npm run clean && npm run test-build && jest",
|
|
38
|
+
"test-build": "npx tsc -b tsconfig.jestTests.json && npm run build-less && npm run inject-translations && jest --clearCache",
|
|
39
|
+
"test-coverage": "npm run clean && npm run test-build && jest --collectCoverage=true --coverage --collectCoverageFrom='./dist/**/*.js' --collectCoverageFrom='!./dist/**/*.test.js' --json --outputFile=jest-result.json --coverageReporters=html --coverageReporters=text-summary --coverageReporters=cobertura --maxWorkers=4 --noStackTrace && node testHelpers/cobertura/cobertura.js",
|
|
40
|
+
"test-storybook": "test-storybook",
|
|
41
|
+
"test-watch": "npm run clean && npm run test-build && npx tsc -b tsconfig.jestTests.json -w",
|
|
42
|
+
"translations": "node build-utils/translations/translation-integrity.mjs",
|
|
43
|
+
"update-version": "node updateVersion.js",
|
|
44
|
+
"watch": "npx tsc -b tsconfig.cjs.json -w",
|
|
45
|
+
"watch:inject-translations": "npx nodemon --watch dist --delay 500ms --ext js --exec 'npm run inject-translations'"
|
|
44
46
|
},
|
|
45
47
|
"author": "",
|
|
46
48
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -53,11 +55,12 @@
|
|
|
53
55
|
"@babel/preset-typescript": "^7.24.1",
|
|
54
56
|
"@babel/traverse": "^7.28.5",
|
|
55
57
|
"@eslint/js": "^9.18.0",
|
|
56
|
-
"@storybook/addon-
|
|
57
|
-
"@storybook/addon-
|
|
58
|
-
"@storybook/addon-
|
|
59
|
-
"@storybook/
|
|
60
|
-
"@storybook/
|
|
58
|
+
"@storybook/addon-a11y": "^10.3.5",
|
|
59
|
+
"@storybook/addon-docs": "^10.3.5",
|
|
60
|
+
"@storybook/addon-links": "^10.3.5",
|
|
61
|
+
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
62
|
+
"@storybook/react-webpack5": "^10.3.5",
|
|
63
|
+
"@storybook/test-runner": "^0.24.3",
|
|
61
64
|
"@tanstack/react-query": "^5.85.5",
|
|
62
65
|
"@testing-library/react": "^16.3.0",
|
|
63
66
|
"@types/jest": "^29.5.12",
|
|
@@ -71,7 +74,7 @@
|
|
|
71
74
|
"eslint-config-prettier": "^10.1.8",
|
|
72
75
|
"eslint-plugin-react": "^7.37.3",
|
|
73
76
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
74
|
-
"eslint-plugin-storybook": "^10.
|
|
77
|
+
"eslint-plugin-storybook": "^10.3.5",
|
|
75
78
|
"globals": "^17.1.0",
|
|
76
79
|
"jest": "^30.2.0",
|
|
77
80
|
"jest-environment-jsdom": "^30.2.0",
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
"less-loader": "^12.2.0",
|
|
81
84
|
"mini-css-extract-plugin": "^2.9.2",
|
|
82
85
|
"prettier": "^3.8.1",
|
|
83
|
-
"storybook": "^10.
|
|
86
|
+
"storybook": "^10.3.5",
|
|
84
87
|
"style-loader": "^4.0.0",
|
|
85
88
|
"typescript": "^5.4.3",
|
|
86
89
|
"typescript-eslint": "^8.20.0",
|
|
@@ -89,14 +92,14 @@
|
|
|
89
92
|
},
|
|
90
93
|
"dependencies": {
|
|
91
94
|
"chart.js": "^4.4.6",
|
|
92
|
-
"react": "^19.2.
|
|
93
|
-
"react-dom": "^19.2.
|
|
95
|
+
"react": "^19.2.0",
|
|
96
|
+
"react-dom": "^19.2.0",
|
|
94
97
|
"react-hook-form": "^7.60.0"
|
|
95
98
|
},
|
|
96
99
|
"peerDependencies": {
|
|
97
100
|
"chart.js": "^4.4.6",
|
|
98
|
-
"react": "^19.2.
|
|
99
|
-
"react-dom": "^19.2.
|
|
101
|
+
"react": "^19.2.0",
|
|
102
|
+
"react-dom": "^19.2.0"
|
|
100
103
|
},
|
|
101
104
|
"files": [
|
|
102
105
|
"./dist/",
|
package/dist/title/title.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Title = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const classNames_1 = require("../commonHelpers/classNames/classNames");
|
|
7
|
-
const useDrive_1 = require("../utils/theme/useDrive");
|
|
8
|
-
const useDriveClassName_1 = require("../utils/theme/useDriveClassName");
|
|
9
|
-
const iconChevronRightSmall_1 = require("../icons/iconChevronRightSmall");
|
|
10
|
-
const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick }) => {
|
|
11
|
-
const isDrive = (0, useDrive_1.useDrive)();
|
|
12
|
-
const driveClassName = (0, useDriveClassName_1.useDriveClassName)("zen-title");
|
|
13
|
-
const h3ClassName = (0, classNames_1.classNames)(["zen-title", driveClassName !== null && driveClassName !== void 0 ? driveClassName : ""]);
|
|
14
|
-
const clickableClass = onClick ? "zen-title__clickable" : "";
|
|
15
|
-
const iconClassName = iconType ? `zen-title__icon--${iconType}` : "";
|
|
16
|
-
const iconSize = (0, react_1.useMemo)(() => (isDrive ? "huge" : "large"), [isDrive]);
|
|
17
|
-
const iconElement = (0, react_1.useMemo)(() => (icon ? (0, jsx_runtime_1.jsx)("div", { className: (0, classNames_1.classNames)(["zen-title__icon", iconClassName]), children: (0, react_1.createElement)(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
|
|
18
|
-
const chevron = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)("span", { className: "zen-title__link-chevron", children: (0, jsx_runtime_1.jsx)(iconChevronRightSmall_1.IconChevronRightSmall, { size: iconSize, className: "zen-title__chevron-icon" }) })), [iconSize]);
|
|
19
|
-
if (onClick) {
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)("h3", { className: h3ClassName, children: (0, jsx_runtime_1.jsxs)("button", { type: "button", className: clickableClass, onClick: onClick, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-title__text", isMobile && !isDrive ? "zen-title__text--mobile" : "", className]), children: [title, chevron] })] }) }));
|
|
21
|
-
}
|
|
22
|
-
if (link) {
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)("h3", { className: h3ClassName, children: (0, jsx_runtime_1.jsxs)("a", { id: id, className: "zen-title__link", href: link, target: target, children: [iconElement, (0, jsx_runtime_1.jsxs)("span", { title: title, className: (0, classNames_1.classNames)(["zen-title__link-text"]), children: [title, chevron] })] }) }));
|
|
24
|
-
}
|
|
25
|
-
return ((0, jsx_runtime_1.jsxs)("h3", { className: h3ClassName, children: [iconElement, (0, jsx_runtime_1.jsx)("span", { title: title, id: id, className: (0, classNames_1.classNames)(["zen-title__text", isMobile && !isDrive ? "zen-title__text--mobile" : "", className]), children: title })] }));
|
|
26
|
-
};
|
|
27
|
-
exports.Title = Title;
|
package/esm/title/title.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createElement, useMemo } from "react";
|
|
3
|
-
import { classNames } from "../commonHelpers/classNames/classNames";
|
|
4
|
-
import { useDrive } from "../utils/theme/useDrive";
|
|
5
|
-
import { useDriveClassName } from "../utils/theme/useDriveClassName";
|
|
6
|
-
import { IconChevronRightSmall } from "../icons/iconChevronRightSmall";
|
|
7
|
-
export const Title = ({ isMobile, link, target, title, id, icon, iconType, className = "", onClick }) => {
|
|
8
|
-
const isDrive = useDrive();
|
|
9
|
-
const driveClassName = useDriveClassName("zen-title");
|
|
10
|
-
const h3ClassName = classNames(["zen-title", driveClassName !== null && driveClassName !== void 0 ? driveClassName : ""]);
|
|
11
|
-
const clickableClass = onClick ? "zen-title__clickable" : "";
|
|
12
|
-
const iconClassName = iconType ? `zen-title__icon--${iconType}` : "";
|
|
13
|
-
const iconSize = useMemo(() => (isDrive ? "huge" : "large"), [isDrive]);
|
|
14
|
-
const iconElement = useMemo(() => (icon ? _jsx("div", { className: classNames(["zen-title__icon", iconClassName]), children: createElement(icon, { size: iconSize }) }) : null), [icon, iconSize, iconClassName]);
|
|
15
|
-
const chevron = useMemo(() => (_jsx("span", { className: "zen-title__link-chevron", children: _jsx(IconChevronRightSmall, { size: iconSize, className: "zen-title__chevron-icon" }) })), [iconSize]);
|
|
16
|
-
if (onClick) {
|
|
17
|
-
return (_jsx("h3", { className: h3ClassName, children: _jsxs("button", { type: "button", className: clickableClass, onClick: onClick, children: [iconElement, _jsxs("span", { title: title, id: id, className: classNames(["zen-title__text", isMobile && !isDrive ? "zen-title__text--mobile" : "", className]), children: [title, chevron] })] }) }));
|
|
18
|
-
}
|
|
19
|
-
if (link) {
|
|
20
|
-
return (_jsx("h3", { className: h3ClassName, children: _jsxs("a", { id: id, className: "zen-title__link", href: link, target: target, children: [iconElement, _jsxs("span", { title: title, className: classNames(["zen-title__link-text"]), children: [title, chevron] })] }) }));
|
|
21
|
-
}
|
|
22
|
-
return (_jsxs("h3", { className: h3ClassName, children: [iconElement, _jsx("span", { title: title, id: id, className: classNames(["zen-title__text", isMobile && !isDrive ? "zen-title__text--mobile" : "", className]), children: title })] }));
|
|
23
|
-
};
|