@geotab/zenith 3.8.0-beta.1 → 3.9.0-beta.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.
Files changed (204) hide show
  1. package/README.md +11 -12
  2. package/dist/button/button.d.ts +2 -1
  3. package/dist/button/button.js +3 -3
  4. package/dist/calendar/calendar.js +201 -4
  5. package/dist/card/card.d.ts +1 -1
  6. package/dist/card/card.js +1 -1
  7. package/dist/card/components/cardButton/cardButton.d.ts +2 -1
  8. package/dist/card/components/cardButton/cardButton.js +5 -3
  9. package/dist/card/helpers/getIconTypeFromStatus.d.ts +1 -1
  10. package/dist/chart/barChart/getBarLegendItems.js +3 -5
  11. package/dist/chart/lineChart/getLineLegendItems.js +7 -7
  12. package/dist/chart/pieChart/centerTextPlugin.js +13 -5
  13. package/dist/chart/pieChart/getPieLegendItems.js +8 -12
  14. package/dist/chart/pieChart.js +13 -11
  15. package/dist/chart/plugins/legend/interfaces.d.ts +1 -1
  16. package/dist/commonHelpers/generateId.d.ts +8 -0
  17. package/dist/commonHelpers/generateId.js +8 -0
  18. package/dist/commonHelpers/hooks/ssrProvider.d.ts +14 -0
  19. package/dist/commonHelpers/hooks/ssrProvider.js +12 -0
  20. package/dist/commonHelpers/hooks/useClientReady.js +3 -1
  21. package/dist/commonHelpers/hooks/useDeviceType.js +6 -2
  22. package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
  23. package/dist/commonHelpers/hooks/useIsomorphicLayoutEffect.js +6 -0
  24. package/dist/commonHelpers/hooks/useMobile.js +4 -3
  25. package/dist/commonHelpers/hooks/usePortal.js +2 -5
  26. package/dist/commonHelpers/isDomEnv.js +1 -2
  27. package/dist/commonHelpers/useUniqueId.d.ts +6 -0
  28. package/dist/commonHelpers/useUniqueId.js +8 -2
  29. package/dist/commonHelpers/utils.d.ts +0 -1
  30. package/dist/commonHelpers/utils.js +1 -3
  31. package/dist/commonStyles/common.less +13 -1
  32. package/dist/commonStyles/fonts/notosarabic/LICENSE.txt +93 -0
  33. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff +0 -0
  34. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Bold.woff2 +0 -0
  35. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff +0 -0
  36. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Medium.woff2 +0 -0
  37. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff +0 -0
  38. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-Regular.woff2 +0 -0
  39. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff +0 -0
  40. package/dist/commonStyles/fonts/notosarabic/NotoSansArabic-SemiBold.woff2 +0 -0
  41. package/dist/commonStyles/fonts/notosarabic.less +43 -0
  42. package/dist/commonStyles/pillStyles/pillContent.less +2 -3
  43. package/dist/commonStyles/pillStyles/pillStyles.less +1 -2
  44. package/dist/commonStyles/pillStyles/pillTextContent.less +2 -2
  45. package/dist/commonStyles/typography/typography.less +440 -305
  46. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +5 -3
  47. package/dist/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +2 -38
  48. package/dist/dateInputInner/dateInputInnerControlBlock.js +12 -8
  49. package/dist/dateRangeRaw/dateRangeRaw.js +5 -1
  50. package/dist/dialog/dialog.js +4 -3
  51. package/dist/feedbackContainer/feedbackContainer.js +4 -4
  52. package/dist/fileUpload/fileUpload.js +21 -12
  53. package/dist/filters/components/filtersSidePanel.d.ts +1 -1
  54. package/dist/filters/components/filtersSidePanel.js +123 -116
  55. package/dist/filters/filters.js +1 -2
  56. package/dist/filtersBar/filtersBar.d.ts +2 -0
  57. package/dist/filtersBar/filtersBar.js +5 -3
  58. package/dist/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
  59. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +3 -0
  60. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.d.ts +1 -1
  61. package/dist/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +86 -80
  62. package/dist/formFieldError/formFieldError.d.ts +2 -1
  63. package/dist/formFieldError/formFieldError.js +2 -2
  64. package/dist/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
  65. package/dist/index.css +3210 -2238
  66. package/dist/index.d.ts +3 -5
  67. package/dist/index.js +24 -29
  68. package/dist/menu/components/menuItem.js +4 -4
  69. package/dist/menu/controlledMenu.js +4 -4
  70. package/dist/nav/nav.js +10 -5
  71. package/dist/nav/navAddMenu/navAddMenu.js +1 -2
  72. package/dist/nav/navEditList/navEditListUtils.d.ts +1 -1
  73. package/dist/nav/navEditList/navEditListUtils.js +2 -1
  74. package/dist/nav/navItem/navActionItem.js +3 -3
  75. package/dist/nav/navItem/navItem.js +1 -2
  76. package/dist/pageHeader/pageHeaderActions.js +4 -3
  77. package/dist/rangeRaw/rangeRaw.js +7 -1
  78. package/dist/selectList/selectList.js +11 -7
  79. package/dist/selectRaw/selectRaw.js +1 -1
  80. package/dist/shield/shield.js +5 -3
  81. package/dist/sidePanel/sidePanel.js +9 -8
  82. package/dist/summaryTile/summaryTile.d.ts +1 -3
  83. package/dist/summaryTile/summaryTile.js +1 -2
  84. package/dist/table/children/useTableChildren.d.ts +1 -1
  85. package/dist/table/children/useTableChildren.js +3 -3
  86. package/dist/table/flexible/useFlexibleColumns.js +39 -1
  87. package/dist/table/nested/useNestedRows.d.ts +1 -0
  88. package/dist/table/nested/useNestedRows.js +3 -3
  89. package/dist/table/selectable/useSelectableRows.d.ts +9 -0
  90. package/dist/table/selectable/useSelectableRows.js +18 -11
  91. package/dist/table/table.js +1 -7
  92. package/dist/{card/components → title}/title.d.ts +1 -1
  93. package/dist/title/title.js +27 -0
  94. package/dist/toggleButtonRaw/toggleButtonRaw.js +3 -1
  95. package/dist/toggleButtonRaw/types.d.ts +1 -0
  96. package/dist/tooltip/tooltip.d.ts +2 -1
  97. package/dist/tooltip/tooltip.js +68 -64
  98. package/dist/utils/localization/directionContext.d.ts +3 -0
  99. package/dist/utils/localization/directionContext.js +5 -0
  100. package/dist/utils/localization/getTextDirection.d.ts +2 -0
  101. package/dist/utils/localization/getTextDirection.js +6 -0
  102. package/dist/utils/localization/languageProvider.js +15 -1
  103. package/dist/utils/localization/translations/en-json.d.ts +2 -0
  104. package/dist/utils/localization/translations/en-json.js +3 -1
  105. package/dist/utils/localization/translations/en.json +3 -0
  106. package/dist/utils/localization/useDirection.d.ts +2 -0
  107. package/dist/utils/localization/useDirection.js +7 -0
  108. package/esm/button/button.d.ts +2 -1
  109. package/esm/button/button.js +3 -3
  110. package/esm/calendar/calendar.js +201 -4
  111. package/esm/card/card.d.ts +1 -1
  112. package/esm/card/card.js +1 -1
  113. package/esm/card/components/cardButton/cardButton.d.ts +2 -1
  114. package/esm/card/components/cardButton/cardButton.js +5 -3
  115. package/esm/card/helpers/getIconTypeFromStatus.d.ts +1 -1
  116. package/esm/chart/barChart/getBarLegendItems.js +3 -5
  117. package/esm/chart/lineChart/getLineLegendItems.js +7 -7
  118. package/esm/chart/pieChart/centerTextPlugin.js +13 -5
  119. package/esm/chart/pieChart/getPieLegendItems.js +8 -12
  120. package/esm/chart/pieChart.js +14 -12
  121. package/esm/chart/plugins/legend/interfaces.d.ts +1 -1
  122. package/esm/commonHelpers/generateId.d.ts +8 -0
  123. package/esm/commonHelpers/generateId.js +8 -0
  124. package/esm/commonHelpers/hooks/ssrProvider.d.ts +14 -0
  125. package/esm/commonHelpers/hooks/ssrProvider.js +6 -0
  126. package/esm/commonHelpers/hooks/useClientReady.js +4 -2
  127. package/esm/commonHelpers/hooks/useDeviceType.js +7 -3
  128. package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
  129. package/esm/commonHelpers/hooks/useIsomorphicLayoutEffect.js +3 -0
  130. package/esm/commonHelpers/hooks/useMobile.js +4 -3
  131. package/esm/commonHelpers/hooks/usePortal.js +2 -5
  132. package/esm/commonHelpers/isDomEnv.js +1 -2
  133. package/esm/commonHelpers/useUniqueId.d.ts +6 -0
  134. package/esm/commonHelpers/useUniqueId.js +7 -1
  135. package/esm/commonHelpers/utils.d.ts +0 -1
  136. package/esm/commonHelpers/utils.js +0 -1
  137. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.d.ts +5 -3
  138. package/esm/dataGrid/withSelectableRows/components/bulkActions/bulkActions.js +2 -38
  139. package/esm/dateInputInner/dateInputInnerControlBlock.js +13 -9
  140. package/esm/dateRangeRaw/dateRangeRaw.js +5 -1
  141. package/esm/dialog/dialog.js +4 -3
  142. package/esm/feedbackContainer/feedbackContainer.js +4 -4
  143. package/esm/fileUpload/fileUpload.js +21 -12
  144. package/esm/filters/components/filtersSidePanel.d.ts +1 -1
  145. package/esm/filters/components/filtersSidePanel.js +123 -116
  146. package/esm/filters/filters.js +2 -3
  147. package/esm/filtersBar/filtersBar.d.ts +2 -0
  148. package/esm/filtersBar/filtersBar.js +5 -3
  149. package/esm/filtersBar/filtersBarActions/filtersBarActions.js +3 -1
  150. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +3 -0
  151. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.d.ts +1 -1
  152. package/esm/filtersBar/filtersBarSidePanel/filtersBarSidePanel.js +86 -80
  153. package/esm/formFieldError/formFieldError.d.ts +2 -1
  154. package/esm/formFieldError/formFieldError.js +2 -2
  155. package/esm/header/components/collapsedItemsControl/utils/handleCustomMenuWrapper.js +1 -1
  156. package/esm/index.d.ts +3 -5
  157. package/esm/index.js +3 -5
  158. package/esm/menu/components/menuItem.js +1 -1
  159. package/esm/menu/controlledMenu.js +1 -1
  160. package/esm/nav/nav.js +10 -5
  161. package/esm/nav/navAddMenu/navAddMenu.js +2 -3
  162. package/esm/nav/navEditList/navEditListUtils.d.ts +1 -1
  163. package/esm/nav/navEditList/navEditListUtils.js +2 -1
  164. package/esm/nav/navItem/navActionItem.js +3 -2
  165. package/esm/nav/navItem/navItem.js +2 -3
  166. package/esm/pageHeader/pageHeaderActions.js +4 -3
  167. package/esm/rangeRaw/rangeRaw.js +7 -1
  168. package/esm/selectList/selectList.js +11 -7
  169. package/esm/selectRaw/selectRaw.js +1 -1
  170. package/esm/shield/shield.js +5 -3
  171. package/esm/sidePanel/sidePanel.js +9 -8
  172. package/esm/summaryTile/summaryTile.d.ts +1 -3
  173. package/esm/summaryTile/summaryTile.js +1 -2
  174. package/esm/table/children/useTableChildren.d.ts +1 -1
  175. package/esm/table/children/useTableChildren.js +3 -3
  176. package/esm/table/flexible/useFlexibleColumns.js +39 -1
  177. package/esm/table/nested/useNestedRows.d.ts +1 -0
  178. package/esm/table/nested/useNestedRows.js +1 -1
  179. package/esm/table/selectable/useSelectableRows.d.ts +9 -0
  180. package/esm/table/selectable/useSelectableRows.js +15 -8
  181. package/esm/table/table.js +1 -7
  182. package/esm/{card/components → title}/title.d.ts +1 -1
  183. package/esm/title/title.js +23 -0
  184. package/esm/toggleButtonRaw/toggleButtonRaw.js +3 -1
  185. package/esm/toggleButtonRaw/types.d.ts +1 -0
  186. package/esm/tooltip/tooltip.d.ts +2 -1
  187. package/esm/tooltip/tooltip.js +68 -64
  188. package/esm/utils/localization/directionContext.d.ts +3 -0
  189. package/esm/utils/localization/directionContext.js +2 -0
  190. package/esm/utils/localization/getTextDirection.d.ts +2 -0
  191. package/esm/utils/localization/getTextDirection.js +2 -0
  192. package/esm/utils/localization/languageProvider.js +15 -1
  193. package/esm/utils/localization/translations/en-json.d.ts +2 -0
  194. package/esm/utils/localization/translations/en-json.js +3 -1
  195. package/esm/utils/localization/translations/en.json +3 -0
  196. package/esm/utils/localization/useDirection.d.ts +2 -0
  197. package/esm/utils/localization/useDirection.js +3 -0
  198. package/package.json +33 -31
  199. package/dist/card/components/title.js +0 -22
  200. package/dist/commonHelpers/hooks/deviceProvider.d.ts +0 -7
  201. package/dist/commonHelpers/hooks/deviceProvider.js +0 -11
  202. package/esm/card/components/title.js +0 -18
  203. package/esm/commonHelpers/hooks/deviceProvider.d.ts +0 -7
  204. package/esm/commonHelpers/hooks/deviceProvider.js +0 -4
@@ -3,8 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useClientReady = void 0;
4
4
  const react_1 = require("react");
5
5
  const isDomEnv_1 = require("../isDomEnv");
6
+ const ssrProvider_1 = require("./ssrProvider");
6
7
  const useClientReady = () => {
7
- const [isClientReady, setIsClientReady] = (0, react_1.useState)(true);
8
+ const ctx = (0, react_1.useContext)(ssrProvider_1.SSRContext);
9
+ const [isClientReady, setIsClientReady] = (0, react_1.useState)(ctx !== null ? ctx.isClientReady : true);
8
10
  (0, react_1.useEffect)(() => {
9
11
  if ((0, isDomEnv_1.isDomEnv)()) {
10
12
  setIsClientReady(true);
@@ -2,11 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useDeviceType = exports.getDeviceType = void 0;
4
4
  const react_1 = require("react");
5
+ const useIsomorphicLayoutEffect_1 = require("./useIsomorphicLayoutEffect");
5
6
  const useResize_1 = require("./useResize");
6
7
  const deviceType_1 = require("./deviceType");
7
8
  const topWindowContext_1 = require("../../utils/topWindow/topWindowContext");
8
9
  const getParentWindow_1 = require("../../utils/getParentWindow");
9
10
  const zen_1 = require("../../utils/zen");
11
+ const ssrProvider_1 = require("./ssrProvider");
10
12
  const MobileMaxWidth = 640;
11
13
  const getDeviceType = (width) => {
12
14
  if (width > MobileMaxWidth) {
@@ -16,13 +18,15 @@ const getDeviceType = (width) => {
16
18
  };
17
19
  exports.getDeviceType = getDeviceType;
18
20
  const useDeviceType = (callback) => {
21
+ const ctx = (0, react_1.useContext)(ssrProvider_1.SSRContext);
22
+ const ssrDeviceType = ctx === null || ctx === void 0 ? void 0 : ctx.deviceType;
19
23
  const { topWindow } = (0, react_1.useContext)(topWindowContext_1.topWindowContext);
20
24
  const win = (0, react_1.useMemo)(() => topWindow || (0, getParentWindow_1.getParentWindow)(zen_1.zen), [topWindow]);
21
- const [deviceType, setDeviceType] = (0, react_1.useState)((0, exports.getDeviceType)(win.innerWidth));
25
+ const [deviceType, setDeviceType] = (0, react_1.useState)(ssrDeviceType !== null && ssrDeviceType !== void 0 ? ssrDeviceType : (0, exports.getDeviceType)(win.innerWidth));
22
26
  (0, useResize_1.useResize)(() => {
23
27
  setDeviceType((0, exports.getDeviceType)(win.innerWidth));
24
28
  }, true);
25
- (0, react_1.useLayoutEffect)(() => {
29
+ (0, useIsomorphicLayoutEffect_1.useIsomorphicLayoutEffect)(() => {
26
30
  callback(deviceType);
27
31
  }, [deviceType, callback]);
28
32
  };
@@ -0,0 +1,2 @@
1
+ import { useEffect } from "react";
2
+ export declare const useIsomorphicLayoutEffect: typeof useEffect;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsomorphicLayoutEffect = void 0;
4
+ const react_1 = require("react");
5
+ const isDomEnv_1 = require("../isDomEnv");
6
+ exports.useIsomorphicLayoutEffect = (0, isDomEnv_1.isDomEnv)() ? react_1.useLayoutEffect : react_1.useEffect;
@@ -5,13 +5,14 @@ const react_1 = require("react");
5
5
  const deviceType_1 = require("./deviceType");
6
6
  const useDeviceType_1 = require("./useDeviceType");
7
7
  const getParentWindow_1 = require("../../utils/getParentWindow");
8
- const deviceProvider_1 = require("./deviceProvider");
8
+ const ssrProvider_1 = require("./ssrProvider");
9
9
  const zen_1 = require("../../utils/zen");
10
10
  const initialParent = (0, getParentWindow_1.getParentWindow)(zen_1.zen);
11
11
  exports.initialValue = (0, useDeviceType_1.getDeviceType)(initialParent.innerWidth);
12
12
  const useMobile = () => {
13
- const deviceTypeFromProvider = (0, react_1.useContext)(deviceProvider_1.DeviceContext);
14
- const [deviceType, setDeviceType] = (0, react_1.useState)(deviceTypeFromProvider || exports.initialValue);
13
+ var _a;
14
+ const ctx = (0, react_1.useContext)(ssrProvider_1.SSRContext);
15
+ const [deviceType, setDeviceType] = (0, react_1.useState)((_a = ctx === null || ctx === void 0 ? void 0 : ctx.deviceType) !== null && _a !== void 0 ? _a : exports.initialValue);
15
16
  (0, useDeviceType_1.useDeviceType)(setDeviceType);
16
17
  const isMobile = (0, react_1.useMemo)(() => deviceType === deviceType_1.DeviceType.Mobile, [deviceType]);
17
18
  return isMobile;
@@ -4,13 +4,10 @@ exports.usePortal = void 0;
4
4
  const react_1 = require("react");
5
5
  const react_dom_1 = require("react-dom");
6
6
  const usePortal = (children, container, key) => {
7
- const [portalContainer, setPortalContainer] = (0, react_1.useState)(container);
7
+ const [portalContainer, setPortalContainer] = (0, react_1.useState)(undefined);
8
8
  (0, react_1.useEffect)(() => {
9
- if (portalContainer || !container) {
10
- return;
11
- }
12
9
  setPortalContainer(container);
13
- }, [portalContainer, container]);
10
+ }, [container]);
14
11
  return portalContainer ? (0, react_dom_1.createPortal)(children, portalContainer, key) : null;
15
12
  };
16
13
  exports.usePortal = usePortal;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isDomEnv = void 0;
4
- /* eslint-disable */
5
- const isDomEnv = () => { var _a; return !!(typeof window !== "undefined" && typeof (window === null || window === void 0 ? void 0 : window.document) !== "undefined" && typeof ((_a = window === null || window === void 0 ? void 0 : window.document) === null || _a === void 0 ? void 0 : _a.createElement) !== "undefined"); };
4
+ const isDomEnv = () => !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
6
5
  exports.isDomEnv = isDomEnv;
@@ -6,6 +6,12 @@
6
6
  * component. This can be particularly useful for assigning unique keys to elements
7
7
  * in a list, or for generating unique identifiers for form inputs, labels, etc.
8
8
  *
9
+ * @remarks
10
+ * **Prefer `React.useId()`** when possible. `useId` generates IDs that are stable
11
+ * across server and client renders, preventing SSR hydration mismatches.
12
+ * Use `useUniqueId` only when `useId` is not suitable — for example, when the ID
13
+ * must be truly random and is never rendered during SSR.
14
+ *
9
15
  * @returns {string} A unique identifier.
10
16
  *
11
17
  * Example usage:
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.useUniqueId = void 0;
4
4
  const react_1 = require("react");
5
- const utils_1 = require("./utils");
5
+ const generateId_1 = require("./generateId");
6
6
  /**
7
7
  * `useUniqueId` is a custom React hook that generates and returns a unique identifier.
8
8
  *
@@ -11,6 +11,12 @@ const utils_1 = require("./utils");
11
11
  * component. This can be particularly useful for assigning unique keys to elements
12
12
  * in a list, or for generating unique identifiers for form inputs, labels, etc.
13
13
  *
14
+ * @remarks
15
+ * **Prefer `React.useId()`** when possible. `useId` generates IDs that are stable
16
+ * across server and client renders, preventing SSR hydration mismatches.
17
+ * Use `useUniqueId` only when `useId` is not suitable — for example, when the ID
18
+ * must be truly random and is never rendered during SSR.
19
+ *
14
20
  * @returns {string} A unique identifier.
15
21
  *
16
22
  * Example usage:
@@ -23,7 +29,7 @@ const utils_1 = require("./utils");
23
29
  * ```
24
30
  */
25
31
  const useUniqueId = () => {
26
- const [id] = (0, react_1.useState)(() => (0, utils_1.generateId)());
32
+ const [id] = (0, react_1.useState)(() => (0, generateId_1.generateId)());
27
33
  return id;
28
34
  };
29
35
  exports.useUniqueId = useUniqueId;
@@ -1,4 +1,3 @@
1
- export declare const generateId: () => string;
2
1
  export declare const echo: <T = unknown>(_: T) => T;
3
2
  export declare function flattenArrays<T>(arrayOfArrays: T[][]): T[];
4
3
  type TPlainObject = Record<string, unknown>;
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deepClone = exports.deepMerge = exports.flattenArrays = exports.echo = exports.generateId = void 0;
3
+ exports.deepClone = exports.deepMerge = exports.flattenArrays = exports.echo = void 0;
4
4
  const zen_1 = require("../utils/zen");
5
- const generateId = () => "id" + Math.random().toString().substring(2);
6
- exports.generateId = generateId;
7
5
  const echo = (_) => _;
8
6
  exports.echo = echo;
9
7
  function flattenArrays(arrayOfArrays) {
@@ -1,7 +1,16 @@
1
+ // do not update the order of imports, as some of the files depend on variables defined in other files
2
+ // only variables that are used in multiple files should be defined here, and they should not depend on any other variables
1
3
  @import "fonts/roboto.less";
2
4
  @import "fonts/robotomono.less";
3
- @import "colors/colors.less";
5
+ @import "fonts/notosarabic.less";
6
+ @main-font-family: Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
7
+ @arabic-font-family: "Noto Sans Arabic", Roboto, "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
8
+ @driver-font-family: "Roboto Mono", "Segoe UI", Segoe, "Helvetica Neue", Helvetica, sans-serif;
9
+ @rem: 16rem;
10
+
4
11
  @import "typography/typography.less";
12
+
13
+ @import "colors/colors.less";
5
14
  @import "caption/caption.less";
6
15
  @import "ellipsis.less";
7
16
  @import "notSelectable.less";
@@ -13,6 +22,9 @@
13
22
  @import "zIndex.less";
14
23
  @import "rangeFieldMixin.less";
15
24
 
25
+ // do not set variables or styles here,
26
+ // as this file is imported in all other files and it may cause circular dependencies
27
+
16
28
  @border-width-default: 1px;
17
29
  @border-radius-default: 4px;
18
30
  @padding-top-bottom: 8px;
@@ -0,0 +1,93 @@
1
+ Copyright 2022 The Noto Project Authors (https://github.com/notofonts/arabic)
2
+
3
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4
+ This license is copied below, and is also available with a FAQ at:
5
+ https://openfontlicense.org
6
+
7
+
8
+ -----------------------------------------------------------
9
+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10
+ -----------------------------------------------------------
11
+
12
+ PREAMBLE
13
+ The goals of the Open Font License (OFL) are to stimulate worldwide
14
+ development of collaborative font projects, to support the font creation
15
+ efforts of academic and linguistic communities, and to provide a free and
16
+ open framework in which fonts may be shared and improved in partnership
17
+ with others.
18
+
19
+ The OFL allows the licensed fonts to be used, studied, modified and
20
+ redistributed freely as long as they are not sold by themselves. The
21
+ fonts, including any derivative works, can be bundled, embedded,
22
+ redistributed and/or sold with any software provided that any reserved
23
+ names are not used by derivative works. The fonts and derivatives,
24
+ however, cannot be released under any other type of license. The
25
+ requirement for fonts to remain under this license does not apply
26
+ to any document created using the fonts or their derivatives.
27
+
28
+ DEFINITIONS
29
+ "Font Software" refers to the set of files released by the Copyright
30
+ Holder(s) under this license and clearly marked as such. This may
31
+ include source files, build scripts and documentation.
32
+
33
+ "Reserved Font Name" refers to any names specified as such after the
34
+ copyright statement(s).
35
+
36
+ "Original Version" refers to the collection of Font Software components as
37
+ distributed by the Copyright Holder(s).
38
+
39
+ "Modified Version" refers to any derivative made by adding to, deleting,
40
+ or substituting -- in part or in whole -- any of the components of the
41
+ Original Version, by changing formats or by porting the Font Software to a
42
+ new environment.
43
+
44
+ "Author" refers to any designer, engineer, programmer, technical
45
+ writer or other person who contributed to the Font Software.
46
+
47
+ PERMISSION & CONDITIONS
48
+ Permission is hereby granted, free of charge, to any person obtaining
49
+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50
+ redistribute, and sell modified and unmodified copies of the Font
51
+ Software, subject to the following conditions:
52
+
53
+ 1) Neither the Font Software nor any of its individual components,
54
+ in Original or Modified Versions, may be sold by itself.
55
+
56
+ 2) Original or Modified Versions of the Font Software may be bundled,
57
+ redistributed and/or sold with any software, provided that each copy
58
+ contains the above copyright notice and this license. These can be
59
+ included either as stand-alone text files, human-readable headers or
60
+ in the appropriate machine-readable metadata fields within text or
61
+ binary files as long as those fields can be easily viewed by the user.
62
+
63
+ 3) No Modified Version of the Font Software may use the Reserved Font
64
+ Name(s) unless explicit written permission is granted by the corresponding
65
+ Copyright Holder. This restriction only applies to the primary font name as
66
+ presented to the users.
67
+
68
+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69
+ Software shall not be used to promote, endorse or advertise any
70
+ Modified Version, except to acknowledge the contribution(s) of the
71
+ Copyright Holder(s) and the Author(s) or with their explicit written
72
+ permission.
73
+
74
+ 5) The Font Software, modified or unmodified, in part or in whole,
75
+ must be distributed entirely under this license, and must not be
76
+ distributed under any other license. The requirement for fonts to
77
+ remain under this license does not apply to any document created
78
+ using the Font Software.
79
+
80
+ TERMINATION
81
+ This license becomes null and void if any of the above conditions are
82
+ not met.
83
+
84
+ DISCLAIMER
85
+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88
+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89
+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90
+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91
+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92
+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93
+ OTHER DEALINGS IN THE FONT SOFTWARE.
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Noto Sans Arabic https://fonts.google.com/noto/specimen/Noto+Sans+Arabic
3
+ */
4
+
5
+ @font-face {
6
+ font-family: "Noto Sans Arabic";
7
+ font-style: normal;
8
+ font-weight: 400;
9
+ font-display: fallback;
10
+ src:
11
+ url("./notosarabic/NotoSansArabic-Regular.woff2") format("woff2"),
12
+ url("./notosarabic/NotoSansArabic-Regular.woff") format("woff");
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "Noto Sans Arabic";
17
+ font-style: normal;
18
+ font-weight: 500;
19
+ font-display: fallback;
20
+ src:
21
+ url("./notosarabic/NotoSansArabic-Medium.woff2") format("woff2"),
22
+ url("./notosarabic/NotoSansArabic-Medium.woff") format("woff");
23
+ }
24
+
25
+ @font-face {
26
+ font-family: "Noto Sans Arabic";
27
+ font-style: normal;
28
+ font-weight: 600;
29
+ font-display: fallback;
30
+ src:
31
+ url("./notosarabic/NotoSansArabic-SemiBold.woff2") format("woff2"),
32
+ url("./notosarabic/NotoSansArabic-SemiBold.woff") format("woff");
33
+ }
34
+
35
+ @font-face {
36
+ font-family: "Noto Sans Arabic";
37
+ font-style: normal;
38
+ font-weight: 700;
39
+ font-display: fallback;
40
+ src:
41
+ url("./notosarabic/NotoSansArabic-Bold.woff2") format("woff2"),
42
+ url("./notosarabic/NotoSansArabic-Bold.woff") format("woff");
43
+ }
@@ -1,5 +1,4 @@
1
1
  @import "../common.less";
2
- @import "../typography/typography.less";
3
2
 
4
3
  @pill-min-width-default: 30px;
5
4
  @pill-max-width-default: 200px;
@@ -98,9 +97,9 @@
98
97
  }
99
98
  }
100
99
  &.zen-pill-new-content--drive {
101
- .body-04-mobile-drive();
100
+ .body-04-drive();
102
101
  }
103
102
  &.zen-pill-new-content--drive-tablet {
104
- .body-04-tablet-drive();
103
+ .body-04-drive();
105
104
  }
106
105
  }
@@ -1,5 +1,4 @@
1
- @import "../typography/typography.less";
2
- @import "../colors/colors.less";
1
+ @import "../common.less";
3
2
 
4
3
  .zen-pill-content {
5
4
  .body-04();
@@ -12,9 +12,9 @@
12
12
  height: 20px;
13
13
  }
14
14
  &.zen-pill-text-content--drive {
15
- .body-04-mobile-drive();
15
+ .body-04-drive();
16
16
  }
17
17
  &.zen-pill-text-content--drive-tablet {
18
- .body-04-tablet-drive();
18
+ .body-04-drive();
19
19
  }
20
20
  }