@geotab/zenith 3.10.0-beta.0 → 3.10.0-beta.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.
Files changed (71) hide show
  1. package/README.md +9 -1
  2. package/dist/absolute/absolute.d.ts +7 -1
  3. package/dist/absolute/absolute.js +8 -4
  4. package/dist/betaPill/betaPill.d.ts +18 -2
  5. package/dist/betaPill/betaPill.js +11 -8
  6. package/dist/card/card.d.ts +2 -1
  7. package/dist/card/card.js +4 -2
  8. package/dist/card/components/title.d.ts +3 -1
  9. package/dist/card/components/title.js +5 -3
  10. package/dist/checkbox/checkbox.js +2 -2
  11. package/dist/checkboxListWithAction/checkboxListWithAction.js +2 -1
  12. package/dist/commonStyles/colors/colorsConstant.d.ts +44 -0
  13. package/dist/commonStyles/colors/colorsConstant.js +361 -0
  14. package/dist/commonStyles/typography/components/typographyItem.d.ts +8 -0
  15. package/dist/commonStyles/typography/components/typographyItem.js +45 -0
  16. package/dist/controlledPopup/controlledPopup.d.ts +2 -1
  17. package/dist/controlledPopup/controlledPopup.js +2 -2
  18. package/dist/dropdown/dropdown.js +1 -1
  19. package/dist/dropdownRaw/dropdownList.d.ts +4 -2
  20. package/dist/dropdownRaw/dropdownList.js +15 -36
  21. package/dist/dropdownRaw/dropdownRaw.js +9 -23
  22. package/dist/dropdownRaw/stateReducer/stateReducer.d.ts +1 -0
  23. package/dist/dropdownRaw/stateReducer/stateReducer.js +13 -14
  24. package/dist/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
  25. package/dist/dropdownRaw/stateReducer/stateReducerHelper.js +5 -12
  26. package/dist/headerTitle/headerTitle.d.ts +9 -1
  27. package/dist/headerTitle/headerTitle.js +3 -2
  28. package/dist/index.css +52 -14
  29. package/dist/index.d.ts +3 -1
  30. package/dist/index.js +3 -1
  31. package/dist/menu/controlledMenu.d.ts +1 -0
  32. package/dist/menu/controlledMenu.js +2 -2
  33. package/dist/testHelpers/fakeFetch.d.ts +1 -0
  34. package/dist/testHelpers/fakeFetch.js +14 -0
  35. package/dist/testHelpers/geotab-axe/index.d.ts +2 -0
  36. package/dist/testHelpers/geotab-axe/index.js +81 -0
  37. package/dist/testHelpers/jestRetry.d.ts +0 -0
  38. package/dist/testHelpers/jestRetry.js +2 -0
  39. package/dist/testHelpers/renderAsync.d.ts +2 -0
  40. package/dist/testHelpers/renderAsync.js +12 -0
  41. package/dist/testHelpers/setReadonlyHtmlProperty.d.ts +1 -0
  42. package/dist/testHelpers/setReadonlyHtmlProperty.js +15 -0
  43. package/dist/testHelpers/styled-output.d.ts +30 -0
  44. package/dist/testHelpers/styled-output.js +42 -0
  45. package/esm/absolute/absolute.d.ts +7 -1
  46. package/esm/absolute/absolute.js +8 -4
  47. package/esm/betaPill/betaPill.d.ts +18 -2
  48. package/esm/betaPill/betaPill.js +11 -8
  49. package/esm/card/card.d.ts +2 -1
  50. package/esm/card/card.js +4 -2
  51. package/esm/card/components/title.d.ts +3 -1
  52. package/esm/card/components/title.js +5 -3
  53. package/esm/checkbox/checkbox.js +2 -2
  54. package/esm/checkboxListWithAction/checkboxListWithAction.js +2 -1
  55. package/esm/controlledPopup/controlledPopup.d.ts +2 -1
  56. package/esm/controlledPopup/controlledPopup.js +2 -2
  57. package/esm/dropdown/dropdown.js +1 -1
  58. package/esm/dropdownRaw/dropdownList.d.ts +4 -2
  59. package/esm/dropdownRaw/dropdownList.js +15 -36
  60. package/esm/dropdownRaw/dropdownRaw.js +10 -24
  61. package/esm/dropdownRaw/stateReducer/stateReducer.d.ts +1 -0
  62. package/esm/dropdownRaw/stateReducer/stateReducer.js +14 -15
  63. package/esm/dropdownRaw/stateReducer/stateReducerHelper.d.ts +1 -2
  64. package/esm/dropdownRaw/stateReducer/stateReducerHelper.js +3 -10
  65. package/esm/headerTitle/headerTitle.d.ts +9 -1
  66. package/esm/headerTitle/headerTitle.js +3 -2
  67. package/esm/index.d.ts +3 -1
  68. package/esm/index.js +1 -0
  69. package/esm/menu/controlledMenu.d.ts +1 -0
  70. package/esm/menu/controlledMenu.js +2 -2
  71. package/package.json +1 -1
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypographyItem = 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 useMobile_1 = require("../../../commonHelpers/hooks/useMobile");
8
+ const useDrive_1 = require("../../../utils/theme/useDrive");
9
+ const zen_1 = require("../../../utils/zen");
10
+ const getFontWeightName = (value) => {
11
+ switch (value) {
12
+ case 300:
13
+ return "Light";
14
+ case 400:
15
+ return "Regular";
16
+ case 500:
17
+ return "Medium";
18
+ case 700:
19
+ return "Bold";
20
+ default:
21
+ return "Unknown";
22
+ }
23
+ };
24
+ const TypographyItem = ({ content = "The brown fox jumped over the lazy dog.", contentClassName = "", font = "Roboto", device = "", tag }) => {
25
+ const ref = (0, react_1.useRef)(null);
26
+ const [fontWeightState, setFontWeight] = (0, react_1.useState)("Unknown");
27
+ const [fontSizeState, setFontSize] = (0, react_1.useState)("Unknown");
28
+ const [lineHeightState, setLineHeight] = (0, react_1.useState)("Unknown");
29
+ const [letterSpacingState, setLetterSpacing] = (0, react_1.useState)("Unknown");
30
+ const isMobile = (0, useMobile_1.useMobile)();
31
+ const isDrive = (0, useDrive_1.useDrive)();
32
+ const bigScreenName = isDrive ? "Tablet" : "Desktop";
33
+ const deviceName = device || (isMobile ? "Mobile" : bigScreenName);
34
+ (0, react_1.useLayoutEffect)(() => {
35
+ if (ref.current && zen_1.zen.getComputedStyle) {
36
+ const { fontWeight, fontSize, lineHeight, letterSpacing } = zen_1.zen.getComputedStyle(ref.current);
37
+ setFontWeight(getFontWeightName(parseInt(fontWeight)));
38
+ setFontSize(fontSize);
39
+ setLineHeight(lineHeight);
40
+ setLetterSpacing(letterSpacing === "normal" ? "0px" : letterSpacing);
41
+ }
42
+ }, [isMobile]);
43
+ return ((0, jsx_runtime_1.jsx)("div", { className: "story-typography-item", children: (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-wrapper", children: [(0, jsx_runtime_1.jsx)("p", { ref: ref, className: (0, classNames_1.classNames)(["story-typography-item__content", contentClassName]), children: content }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description", children: [(0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-column", children: [(0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Font" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: font })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Weight" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: fontWeightState })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Size" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: fontSizeState })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Line Height" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: lineHeightState })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-column", children: [(0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Letter Spacing" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: letterSpacingState })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Device" }), (0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-value heading-04", children: deviceName })] }), (0, jsx_runtime_1.jsxs)("div", { className: "story-typography-item__content-description-item", children: [(0, jsx_runtime_1.jsx)("span", { className: "story-typography-item__content-description-name label-01-desktop", children: "Tag" }), (0, jsx_runtime_1.jsxs)("span", { className: "story-typography-item__content-description-value heading-04", children: ["<", tag, ">"] })] })] })] })] }) }));
44
+ };
45
+ exports.TypographyItem = TypographyItem;
@@ -23,8 +23,9 @@ export interface IControlledPopup extends IZenComponentProps {
23
23
  ariaLabel?: string;
24
24
  ariaLabelledby?: string;
25
25
  recalculateOnScroll?: boolean;
26
+ closeOnScroll?: boolean;
26
27
  preventAttributesAutoSet?: boolean;
27
28
  /** Whether to focus the first focusable element when popup opens. Default: true */
28
29
  focusOnOpen?: boolean;
29
30
  }
30
- export declare const ControlledPopup: ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, preventAttributesAutoSet, focusOnOpen, role }: IControlledPopup) => import("react/jsx-runtime").JSX.Element;
31
+ export declare const ControlledPopup: ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, closeOnScroll, preventAttributesAutoSet, focusOnOpen, role }: IControlledPopup) => import("react/jsx-runtime").JSX.Element;
@@ -6,7 +6,7 @@ const react_1 = require("react");
6
6
  const absolute_1 = require("../absolute/absolute");
7
7
  const classNames_1 = require("../commonHelpers/classNames/classNames");
8
8
  const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
9
- const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, preventAttributesAutoSet, focusOnOpen, role = "dialog" }) => {
9
+ const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className, children, alignment, inline, onOpenChange, useTrapFocusWithTrigger, shouldHoldScroll, ariaLabel, ariaLabelledby, recalculateOnScroll, closeOnScroll, preventAttributesAutoSet, focusOnOpen, role = "dialog" }) => {
10
10
  const autoId = (0, react_1.useId)();
11
11
  const popupId = id || autoId;
12
12
  const isClientReady = (0, useClientReady_1.useClientReady)();
@@ -24,6 +24,6 @@ const ControlledPopup = ({ isOpen, id, paddingX, paddingY, triggerRef, className
24
24
  triggerRef.current.setAttribute("aria-expanded", isOpen ? "true" : "false");
25
25
  triggerRef.current.setAttribute("aria-controls", popupId);
26
26
  }, [triggerRef, isOpen, popupId, preventAttributesAutoSet, isClientReady]);
27
- return ((0, jsx_runtime_1.jsx)(absolute_1.Absolute, Object.assign({ triggerRef: triggerRef, alignment: alignment, id: popupId, isOpen: isOpen, className: (0, classNames_1.classNames)(["zen-popup", className ? className : ""]), paddingX: paddingX, paddingY: paddingY, inline: inline, onOpenChange: onOpenChange, useTrapFocusWithTrigger: useTrapFocusWithTrigger, shouldHoldScroll: shouldHoldScroll }, (role !== false && typeof role === "string" ? { role } : {}), (role !== false && ariaLabel ? { ariaLabel } : {}), (role !== false && ariaLabelledby ? { ariaLabelledby } : {}), { recalculateOnScroll: recalculateOnScroll, focusOnOpen: focusOnOpen, children: children })));
27
+ return ((0, jsx_runtime_1.jsx)(absolute_1.Absolute, Object.assign({ triggerRef: triggerRef, alignment: alignment, id: popupId, isOpen: isOpen, className: (0, classNames_1.classNames)(["zen-popup", className ? className : ""]), paddingX: paddingX, paddingY: paddingY, inline: inline, onOpenChange: onOpenChange, useTrapFocusWithTrigger: useTrapFocusWithTrigger, shouldHoldScroll: shouldHoldScroll }, (role !== false && typeof role === "string" ? { role } : {}), (role !== false && ariaLabel ? { ariaLabel } : {}), (role !== false && ariaLabelledby ? { ariaLabelledby } : {}), { recalculateOnScroll: recalculateOnScroll, closeOnScroll: closeOnScroll, focusOnOpen: focusOnOpen, children: children })));
28
28
  };
29
29
  exports.ControlledPopup = ControlledPopup;
@@ -24,4 +24,4 @@ const Dropdown = (_a) => {
24
24
  return (0, jsx_runtime_1.jsx)(DropDownFormField, Object.assign({}, props));
25
25
  };
26
26
  exports.Dropdown = Dropdown;
27
- exports.TRANSLATIONS = ["Filter by group", "Open filter", "Clear search", "Select all", "Deselect all", "Clear", "Back", "No data"];
27
+ exports.TRANSLATIONS = ["Filter by group", "Open filter", "Clear search", "Select all", "Clear", "Back", "No data"];
@@ -13,7 +13,9 @@ export interface IDropdownList extends IZenComponentProps {
13
13
  onSelect: (id: string) => void;
14
14
  onSingleSelect: (reset: boolean, selected?: string) => void;
15
15
  backButtonName?: string;
16
- isAllSelected: boolean;
16
+ isAllSelected?: boolean;
17
+ isSelectAllActive?: boolean;
18
+ shouldBlockItems?: boolean;
17
19
  listData: ICheckboxListWithActionOption[] | ISelectListItem[];
18
20
  isWithFooter: boolean;
19
21
  width?: number;
@@ -39,6 +41,6 @@ interface IDropdownEmptyList extends Pick<IDropdownList, "className" | "width" |
39
41
  hasError: boolean;
40
42
  }
41
43
  export declare const EmptyList: ({ className, width, onClearClick, onApplyClick, onCancelClick, hasApplyButton, isApplyDisabled, isClearButtonDisabled, isWithFooter, hasError }: IDropdownEmptyList) => import("react/jsx-runtime").JSX.Element;
42
- export declare const DropdownList: ({ onBackButtonClick, onSelectAllClick, onClearClick, onApplyClick, onCancelClick, onChange, onSelect, onSingleSelect, listData, isAllSelected, backButtonName, width, minWidth, isSelectAllButtonDisable, hasSelectAllButton, filterName, isMultiselect, hasApplyButton, isApplyDisabled, isClearButtonDisabled, activeValue, forceSelection, isWithFooter, isMobile, handleCheckboxChange, checkboxLabel, isChecked, listElementRef, listId }: IDropdownList) => import("react/jsx-runtime").JSX.Element;
44
+ export declare const DropdownList: ({ onBackButtonClick, onSelectAllClick, onClearClick, onApplyClick, onCancelClick, onChange, onSelect, onSingleSelect, listData, isSelectAllActive, shouldBlockItems, backButtonName, width, minWidth, isSelectAllButtonDisable, hasSelectAllButton, filterName, isMultiselect, hasApplyButton, isApplyDisabled, isClearButtonDisabled, activeValue, forceSelection, isWithFooter, isMobile, handleCheckboxChange, checkboxLabel, isChecked, listElementRef, listId }: IDropdownList) => import("react/jsx-runtime").JSX.Element;
43
45
  export declare const TRANSLATIONS: string[];
44
46
  export {};
@@ -174,33 +174,6 @@ injectString("zh-Hans", "Apply", "\u5E94\u7528");
174
174
  injectString("zh-TW", "Apply", "\u5957\u7528");
175
175
  injectString("ro-RO", "Apply", "Aplica\u021Bi");
176
176
  injectString("ar-SA", "Apply", "\u062A\u0637\u0628\u064A\u0642");
177
- injectString("cs", "Deselect all", "Zru\u0161it v\xFDb\u011Br v\u0161ech");
178
- injectString("da-DK", "Deselect all", "Frav\xE6lg alle");
179
- injectString("de", "Deselect all", "Auswahl f\xFCr alle aufheben");
180
- injectString("en", "Deselect all", "Deselect all");
181
- injectString("es", "Deselect all", "Deseleccionar todo");
182
- injectString("fi-FI", "Deselect all", "Poista kaikki valinnat");
183
- injectString("fr", "Deselect all", "D\xE9s\xE9lectionner tout");
184
- injectString("fr-FR", "Deselect all", "D\xE9s\xE9lectionner tout");
185
- injectString("hu-HU", "Deselect all", "Ne v\xE1lassz ki semmit.");
186
- injectString("id", "Deselect all", "Batalkan pilih semua");
187
- injectString("it", "Deselect all", "Deselezionare tutto");
188
- injectString("ja", "Deselect all", "\u3059\u3079\u3066\u3092\u9078\u629E\u89E3\u9664");
189
- injectString("ko-KR", "Deselect all", "\uBAA8\uB450 \uC120\uD0DD \uCDE8\uC18C");
190
- injectString("ms", "Deselect all", "Nyahpilih semua");
191
- injectString("nb-NO", "Deselect all", "Fjern alle valg");
192
- injectString("nl", "Deselect all", "Alles deselecteren");
193
- injectString("pl", "Deselect all", "Usu\u0144 wyb\xF3r wszystkich");
194
- injectString("pt-BR", "Deselect all", "Desmarcar tudo");
195
- injectString("pt-PT", "Deselect all", "Desmarcar tudo");
196
- injectString("sk-SK", "Deselect all", "Zru\u0161 v\xFDber v\u0161etk\xFDch.");
197
- injectString("sv", "Deselect all", "Avmarkera alla");
198
- injectString("th", "Deselect all", "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E01\u0E32\u0E23\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14");
199
- injectString("tr", "Deselect all", "T\xFCm\xFCn\xFCn se\xE7imini iptal et");
200
- injectString("zh-Hans", "Deselect all", "\u53D6\u6D88\u5168\u9009");
201
- injectString("zh-TW", "Deselect all", "\u53D6\u6D88\u5168\u9078");
202
- injectString("ro-RO", "Deselect all", "Deselecta\u021Bi tot");
203
- injectString("ar-SA", "Deselect all", "\u0625\u0644\u063A\u0627\u0621 \u062A\u062D\u062F\u064A\u062F \u0627\u0644\u0643\u0644");
204
177
  injectString("cs", "Select all", "Vybrat v\u0161e");
205
178
  injectString("da-DK", "Select all", "V\xE6lg alle");
206
179
  injectString("de", "Select all", "Alle ausw\xE4hlen");
@@ -359,7 +332,8 @@ const DropdownList = ({
359
332
  onSelect,
360
333
  onSingleSelect,
361
334
  listData,
362
- isAllSelected,
335
+ isSelectAllActive,
336
+ shouldBlockItems,
363
337
  backButtonName,
364
338
  width,
365
339
  minWidth,
@@ -388,7 +362,7 @@ const DropdownList = ({
388
362
  const internalListId = (0, react_1.useId)();
389
363
  const selectListId = listId || internalListId;
390
364
  const handleSelectAllClick = () => {
391
- onSelectAllClick(isAllSelected);
365
+ onSelectAllClick(isSelectAllActive === true);
392
366
  };
393
367
  const handleBackButtonKeyDown = (0, react_1.useCallback)(event => {
394
368
  if (event.key === "ArrowLeft") {
@@ -416,13 +390,14 @@ const DropdownList = ({
416
390
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
417
391
  forceSelection ? onSingleSelect(false, newActiveEl || activeValue) : onSingleSelect(false, newActiveEl);
418
392
  }, [activeValue, forceSelection, onSingleSelect]);
419
- const selectButtonLabel = isAllSelected ? translate("Deselect all") : translate("Select all");
420
- const getActionButton = (label, title, icon, isDisabled, clickHandler, size, onKeyDown) => (0, jsx_runtime_1.jsx)("button", {
393
+ const selectButtonLabel = translate("Select all");
394
+ const getActionButton = (label, title, icon, isDisabled, clickHandler, size, onKeyDown, isSelected) => (0, jsx_runtime_1.jsx)("button", {
421
395
  type: "button",
422
396
  disabled: isDisabled,
423
397
  onClick: clickHandler,
424
398
  onKeyDown: onKeyDown,
425
- className: "zen-dropdown-list__item zen-dropdown-list__item--interactive zen-dropdown-list__action-button zen-dropdown-list__action-button-back",
399
+ "aria-pressed": isSelected,
400
+ className: (0, classNames_1.classNames)(["zen-dropdown-list__item zen-dropdown-list__item--interactive zen-dropdown-list__action-button zen-dropdown-list__action-button-back", isSelected ? "zen-dropdown-list__action-button--selected" : ""]),
426
401
  title: title,
427
402
  children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, {
428
403
  children: [react_1.default.createElement(icon, {
@@ -458,11 +433,15 @@ const DropdownList = ({
458
433
  });
459
434
  return values;
460
435
  };
436
+ const multiselectOptions = shouldBlockItems ? listData.map(item => Object.assign(Object.assign({}, item), {
437
+ blocked: true,
438
+ checked: false
439
+ })) : listData;
461
440
  return (0, jsx_runtime_1.jsx)("div", {
462
441
  className: "zen-dropdown-list__elements",
463
442
  ref: listElementRef,
464
443
  children: isMultiselect ? (0, jsx_runtime_1.jsx)(checkboxListWithAction_1.CheckboxListWithAction, {
465
- options: listData,
444
+ options: multiselectOptions,
466
445
  label: "",
467
446
  onChange: handleChange,
468
447
  onClick: handleClick
@@ -478,7 +457,7 @@ const DropdownList = ({
478
457
  value: createValue(listData, activeValue)
479
458
  })
480
459
  });
481
- }, [listElementRef, isMultiselect, listData, handleChange, handleClick, handleSingleChange, translate, selectListId, forceSelection, activeValue]);
460
+ }, [listElementRef, isMultiselect, shouldBlockItems, listData, handleChange, handleClick, handleSingleChange, translate, selectListId, forceSelection, activeValue]);
482
461
  return (0, jsx_runtime_1.jsxs)("div", Object.assign({
483
462
  className: (0, classNames_1.classNames)(["zen-dropdown-list", driveComponentClass || ""])
484
463
  }, styleWidth, {
@@ -496,7 +475,7 @@ const DropdownList = ({
496
475
  }) : null, backButtonName ? (0, jsx_runtime_1.jsx)("div", {
497
476
  className: "zen-dropdown-list__item-wrapper",
498
477
  children: getActionButton(backButtonName, translate("Back"), iconBackArrow_1.IconBackArrow, false, onBackButtonClick, "large", handleBackButtonKeyDown)
499
- }) : null, hasSelectAllButton ? getActionButton(selectButtonLabel, selectButtonLabel, iconCheckRadio_1.IconCheckRadio, !!isSelectAllButtonDisable, handleSelectAllClick, isDrive ? "huger" : "huge") : null, listDataComponent, isWithFooter ? (0, jsx_runtime_1.jsxs)("div", {
478
+ }) : null, hasSelectAllButton ? getActionButton(selectButtonLabel, selectButtonLabel, iconCheckRadio_1.IconCheckRadio, !!isSelectAllButtonDisable, handleSelectAllClick, isDrive ? "huger" : "huge", undefined, isSelectAllActive) : null, listDataComponent, isWithFooter ? (0, jsx_runtime_1.jsxs)("div", {
500
479
  className: "zen-dropdown-list__footer",
501
480
  children: [(0, jsx_runtime_1.jsx)(button_1.Button, {
502
481
  onClick: isMultiselect ? onClearClick : handleClearClick,
@@ -525,4 +504,4 @@ const DropdownList = ({
525
504
  }));
526
505
  };
527
506
  exports.DropdownList = DropdownList;
528
- exports.TRANSLATIONS = ["Select all", "Deselect all", "Clear", "Back", "No data"];
507
+ exports.TRANSLATIONS = ["Select all", "Clear", "Back", "No data"];
@@ -399,23 +399,6 @@ const DropdownRaw = props => {
399
399
  payload: state.currentId || state.rootId
400
400
  });
401
401
  }, [isFullSelectionMode, state.currentId, state.rootId]);
402
- const handleSelectAllInSearch = (0, react_1.useCallback)(isAllSelect => {
403
- if (isFullSelectionMode && state.isAllSelected) {
404
- dispatchState({
405
- type: stateActionType_1.StateActionType.DeselectItemsFromAllSelected,
406
- payload: undefined
407
- });
408
- return;
409
- }
410
- const dataForChange = (0, dropdownHelper_1.getDataForChange)((0, dropdownHelper_1.getListDataWithDisabled)(state.listData, state.isNestedList), state.selectedIds, isAllSelect);
411
- dispatchState({
412
- type: stateActionType_1.StateActionType.ChangeBulkSelection,
413
- payload: {
414
- itemsIds: dataForChange,
415
- value: !isAllSelect
416
- }
417
- });
418
- }, [isFullSelectionMode, state.isAllSelected, state.listData, state.isNestedList, state.selectedIds]);
419
402
  const handleClearClick = (0, react_1.useCallback)(() => {
420
403
  var _a, _b;
421
404
  dispatchState({
@@ -862,13 +845,14 @@ const DropdownRaw = props => {
862
845
  });
863
846
  }
864
847
  if (state.showList) {
865
- const isSearchMode = state.inputValue && !state.currentId;
848
+ const isSearchMode = Boolean(state.inputValue) && !state.currentId;
866
849
  const currentListData = (0, dropdownHelper_1.createListDataOptions)(state, translate, isSearchMode ? (0, dropdownHelper_1.sortDropdownItemArray)(state.listData, sortFn).slice(0, listLimit).filter(el => el.id !== state.rootId) :
867
850
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
868
851
  (0, dropdownHelper_1.sortDropdownItemArray)(((_b = state.groupsMap[state.currentId || state.rootId]) === null || _b === void 0 ? void 0 : _b.children) || [], sortFn).slice(0, listLimit) || [], multiselect, currentAllSelected);
852
+ const selectAllActiveForCurrentLevel = state.selectAllActiveForId === (state.currentId || state.rootId);
869
853
  return (0, jsx_runtime_1.jsx)(dropdownList_1.DropdownList, {
870
854
  onBackButtonClick: handleBackButtonClick,
871
- onSelectAllClick: isSearchMode ? handleSelectAllInSearch : handleSelectAllClick,
855
+ onSelectAllClick: handleSelectAllClick,
872
856
  onClearClick: handleClearClick,
873
857
  onCancelClick: handleCancelClick,
874
858
  onApplyClick: handleApplyClick,
@@ -879,15 +863,17 @@ const DropdownRaw = props => {
879
863
  backButtonName: state.currentId && state.groupsMap[state.currentId] ? (0, groupsHelper_1.getGroupDescription)(state.groupsMap[state.currentId], translate) : undefined,
880
864
  filterName: isMobile ? undefined : filterName,
881
865
  isAllSelected: currentAllSelected ? currentAllSelected : isSearchMode ? (0, dropdownHelper_1.isEveryItemSelected)((0, dropdownHelper_1.getListDataWithDisabled)(state.listData, state.isNestedList), state.selectedIds) : currentAllSelected === undefined ? (0, dropdownHelper_1.isAllChildrenSelected)(state, state.currentId || state.rootId) : false,
866
+ isSelectAllActive: isFullSelectionMode ? currentAllSelected : selectAllActiveForCurrentLevel,
867
+ shouldBlockItems: !state.inputValue && !isFullSelectionMode && selectAllActiveForCurrentLevel,
882
868
  isMultiselect: multiselect,
883
869
  forceSelection: forceSelection,
884
870
  listData: currentListData,
885
871
  width: width || currentWidth === 180 ? undefined : currentWidth,
886
872
  minWidth: currentWidth,
887
- hasSelectAllButton: selectAllButton && multiselect,
873
+ hasSelectAllButton: selectAllButton && multiselect && !state.inputValue,
888
874
  hasApplyButton: hasApplyButton,
889
875
  isApplyDisabled: memoizedIsApplyButtonDisabled,
890
- isSelectAllButtonDisable: currentListData.length === 0 || isSearchMode !== "" && state.isNestedList && (0, dropdownHelper_1.isAllItemsHasOneParent)(state.listData.filter(el => el.id !== state.rootId), (((_c = state.groupsMap[state.rootId]) === null || _c === void 0 ? void 0 : _c.children) || []).map(el => el.id)),
876
+ isSelectAllButtonDisable: currentListData.length === 0 || isSearchMode && state.isNestedList && (0, dropdownHelper_1.isAllItemsHasOneParent)(state.listData.filter(el => el.id !== state.rootId), (((_c = state.groupsMap[state.rootId]) === null || _c === void 0 ? void 0 : _c.children) || []).map(el => el.id)),
891
877
  isClearButtonDisabled: memoizedIsClearButtonDisabled,
892
878
  isWithFooter: memoizedWithFooter && !isMobile,
893
879
  isMobile: isMobile,
@@ -899,7 +885,7 @@ const DropdownRaw = props => {
899
885
  });
900
886
  }
901
887
  return null;
902
- }, [state, isLoading, isQueryMode, fetchState === null || fetchState === void 0 ? void 0 : fetchState.isLoading, fetchState === null || fetchState === void 0 ? void 0 : fetchState.error, handleClearClick, handleCancelClick, handleApplyClick, hasApplyButton, memoizedWithFooter, translate, sortFn, listLimit, multiselect, currentAllSelected, handleBackButtonClick, handleSelectAllInSearch, handleSelectAllClick, handleSelect, handleChangeCurrentId, handleSingleSelection, isMobile, filterName, forceSelection, width, selectAllButton, memoizedIsApplyButtonDisabled, memoizedIsClearButtonDisabled, isCheckboxMode, handleCheckboxChange, checkboxLabel, selectListId]);
888
+ }, [state, isLoading, isQueryMode, fetchState === null || fetchState === void 0 ? void 0 : fetchState.isLoading, fetchState === null || fetchState === void 0 ? void 0 : fetchState.error, handleClearClick, handleCancelClick, handleApplyClick, hasApplyButton, memoizedWithFooter, translate, sortFn, listLimit, multiselect, currentAllSelected, handleBackButtonClick, handleSelectAllClick, handleSelect, handleChangeCurrentId, handleSingleSelection, isMobile, filterName, forceSelection, width, selectAllButton, memoizedIsApplyButtonDisabled, memoizedIsClearButtonDisabled, isCheckboxMode, handleCheckboxChange, checkboxLabel, selectListId, isFullSelectionMode]);
903
889
  const currentStringFromSelected = isFullSelectionMode && hasApplyButton && state.globalIsAllSelected || isFullSelectionMode && !hasApplyButton && state.isAllSelected ? (0, dropdownHelper_1.getStringFromAllSelected)(state.groupsMap, translate, state.rootId) : (0, dropdownHelper_1.getStringFromSelected)(hasApplyButton ? state.globalSelectedIds : state.selectedIds, state.groupsMapSelected, translate, state.rootId);
904
890
  const memoizedCurrentSelection = (0, react_1.useMemo)(() => showSelection && !state.inputValue ? currentStringFromSelected : "", [showSelection, state.inputValue, currentStringFromSelected]);
905
891
  const parentTriggerWidth = ((_b = comboboxRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width) || 420;
@@ -997,4 +983,4 @@ const DropdownRaw = props => {
997
983
  };
998
984
  exports.DropdownRaw = DropdownRaw;
999
985
  exports.DropdownRaw.displayName = "DropdownRaw";
1000
- exports.TRANSLATIONS = ["Filter by group", "Open filter", "Clear search", "Select all", "Deselect all", "Clear", "Back", "No data"];
986
+ exports.TRANSLATIONS = ["Filter by group", "Open filter", "Clear search", "Select all", "Clear", "Back", "No data"];
@@ -25,6 +25,7 @@ export interface IDropdownState {
25
25
  listLimit: number;
26
26
  resultsExceedListLimit?: boolean;
27
27
  isAllSelected?: boolean;
28
+ selectAllActiveForId?: string;
28
29
  globalIsAllSelected?: boolean;
29
30
  defaultValueIsAllSelected?: boolean;
30
31
  isChecked?: boolean;
@@ -77,10 +77,12 @@ function stateReducer(state, action) {
77
77
  }
78
78
  const isCurrentListNested = Object.keys(updatedGroupsMap).length > 0 &&
79
79
  (updatedGroupsMap[exports.ROOT_GROUP_ID].children || []).some(el => el.children && el.children.length);
80
- state.groupsMap = updatedGroupsMap;
81
- const additionalStateUpdates = (0, stateReducerHelper_1.updateAllSelectedStateValueBasedOnTotalSelected)(state, state.selectedIds.length - newNamelessIds.size);
80
+ const groupsMapLength = Object.keys(updatedGroupsMap).length - 1;
81
+ const newResultsExceedListLimit = groupsMapLength >= state.listLimit;
82
+ const selectedInNewMap = state.selectedIds.filter(id => id in updatedGroupsMap).length;
83
+ const newIsAllSelected = (0, stateReducerHelper_1.computeIsAllSelected)(state.isAllSelected, state.isFullSelectionMode, newResultsExceedListLimit, groupsMapLength, selectedInNewMap);
82
84
  const rootId = (0, stateReducerHelper_1.getRootId)(updatedGroupsMap, exports.ROOT_GROUP_ID, state.firstParentNodeIsVisible);
83
- return Object.assign(Object.assign(Object.assign({}, state), { rootId: rootId || exports.ROOT_GROUP_ID, namelessIds: newNamelessIds, isNestedList: state.isNestedList ? state.isNestedList : isCurrentListNested, resultsExceedListLimit: Object.keys(updatedGroupsMap).length - 1 >= state.listLimit }), additionalStateUpdates);
85
+ return Object.assign(Object.assign({}, state), { groupsMap: updatedGroupsMap, rootId: rootId || exports.ROOT_GROUP_ID, namelessIds: newNamelessIds, isNestedList: state.isNestedList ? state.isNestedList : isCurrentListNested, resultsExceedListLimit: newResultsExceedListLimit, isAllSelected: newIsAllSelected });
84
86
  }
85
87
  case stateActionType_1.StateActionType.SetListData: {
86
88
  state.selectedIds.forEach(id => {
@@ -105,9 +107,9 @@ function stateReducer(state, action) {
105
107
  case stateActionType_1.StateActionType.SetIsOpenCombo:
106
108
  return Object.assign(Object.assign({}, state), { isOpenCombo: payload });
107
109
  case stateActionType_1.StateActionType.ResetSelection:
108
- return Object.assign(Object.assign({}, state), { selectedIds: [...state.defaultValue], isAllSelected: state.defaultValueIsAllSelected, isChecked: typeof state.isChecked === "boolean" ? state.defaultValueIsChecked || false : undefined });
110
+ return Object.assign(Object.assign({}, state), { selectedIds: [...state.defaultValue], isAllSelected: state.defaultValueIsAllSelected, isChecked: typeof state.isChecked === "boolean" ? state.defaultValueIsChecked || false : undefined, selectAllActiveForId: undefined });
109
111
  case stateActionType_1.StateActionType.ResetStateToGlobal:
110
- return Object.assign(Object.assign({}, state), { selectedIds: [...state.globalSelectedIds], isAllSelected: state.globalIsAllSelected, isChecked: state.globalIsChecked });
112
+ return Object.assign(Object.assign({}, state), { selectedIds: [...state.globalSelectedIds], isAllSelected: state.globalIsAllSelected, isChecked: state.globalIsChecked, selectAllActiveForId: undefined });
111
113
  case stateActionType_1.StateActionType.NothingToShow:
112
114
  return Object.assign(Object.assign({}, state), { showWaiting: false, showEmptyList: false, showList: false });
113
115
  case stateActionType_1.StateActionType.Show:
@@ -223,8 +225,7 @@ function stateReducer(state, action) {
223
225
  state.groupsMapSelected.set(id, Object.assign(Object.assign({ id }, (item.name ? { name: item.name } : {})), (item.color ? { color: item.color } : {})));
224
226
  }
225
227
  });
226
- const additionalStateUpdates = (0, stateReducerHelper_1.updateAllSelectedStateValueBasedOnTotalSelected)(state, currentSelectedIds.size);
227
- return Object.assign(Object.assign(Object.assign({}, state), { selectedIds: Array.from(currentSelectedIds) }), additionalStateUpdates);
228
+ return Object.assign(Object.assign({}, state), { selectedIds: Array.from(currentSelectedIds), selectAllActiveForId: undefined, isAllSelected: state.isAllSelected });
228
229
  }
229
230
  case stateActionType_1.StateActionType.ChangeBulkSelection: {
230
231
  const { itemsIds, value } = payload;
@@ -257,8 +258,7 @@ function stateReducer(state, action) {
257
258
  state.groupsMapSelected.set(id, Object.assign(Object.assign({ id }, (item.name ? { name: item.name } : {})), (item.color ? { color: item.color } : {})));
258
259
  }
259
260
  });
260
- const additionalStateUpdates = (0, stateReducerHelper_1.updateAllSelectedStateValueBasedOnTotalSelected)(state, currentSelectedIds.size);
261
- return Object.assign(Object.assign(Object.assign({}, state), { selectedIds: Array.from(currentSelectedIds) }), additionalStateUpdates);
261
+ return Object.assign(Object.assign({}, state), { selectedIds: Array.from(currentSelectedIds), selectAllActiveForId: undefined });
262
262
  }
263
263
  case stateActionType_1.StateActionType.SelectAllChildren: {
264
264
  const currentEl = state.groupsMap[payload];
@@ -295,7 +295,7 @@ function stateReducer(state, action) {
295
295
  state.groupsMapSelected.set(id, Object.assign(Object.assign({ id }, (item.name ? { name: item.name } : {})), (item.color ? { color: item.color } : {})));
296
296
  }
297
297
  });
298
- return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected) });
298
+ return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected), selectAllActiveForId: payload });
299
299
  }
300
300
  case stateActionType_1.StateActionType.DeselectItemsFromAllSelected: {
301
301
  const currentEl = state.groupsMap[state.rootId];
@@ -319,7 +319,7 @@ function stateReducer(state, action) {
319
319
  state.groupsMapSelected.set(id, Object.assign(Object.assign({ id }, (item.name ? { name: item.name } : {})), (item.color ? { color: item.color } : {})));
320
320
  }
321
321
  });
322
- return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected), isAllSelected: state.isFullSelectionMode ? false : undefined });
322
+ return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected), isAllSelected: state.isFullSelectionMode ? false : undefined, selectAllActiveForId: undefined });
323
323
  }
324
324
  case stateActionType_1.StateActionType.ToggleValueForAllSelected: {
325
325
  const currentEl = state.groupsMap[state.rootId];
@@ -338,8 +338,7 @@ function stateReducer(state, action) {
338
338
  }
339
339
  });
340
340
  const updatedIsAllSelectedValue = state.isFullSelectionMode ? !state.isAllSelected : undefined;
341
- const additionalStateUpdates = (0, stateReducerHelper_1.updateAllSelectedStateValueBasedOnTotalSelected)(state, newSelected.size);
342
- return Object.assign(Object.assign(Object.assign({}, state), { selectedIds: state.isAllSelected ? Array.from(newSelected) : [], isAllSelected: updatedIsAllSelectedValue }), additionalStateUpdates);
341
+ return Object.assign(Object.assign({}, state), { selectedIds: state.isAllSelected ? Array.from(newSelected) : [], isAllSelected: updatedIsAllSelectedValue });
343
342
  }
344
343
  case stateActionType_1.StateActionType.DeselectAllChildren: {
345
344
  const childrenForDeselect = [];
@@ -351,7 +350,7 @@ function stateReducer(state, action) {
351
350
  });
352
351
  const newSelected = new Set(state.selectedIds);
353
352
  childrenForDeselect.forEach(childId => newSelected.delete(childId));
354
- return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected) });
353
+ return Object.assign(Object.assign({}, state), { selectedIds: Array.from(newSelected), selectAllActiveForId: undefined });
355
354
  }
356
355
  case stateActionType_1.StateActionType.SetFirstParentNodeIsVisible: {
357
356
  if (state.firstParentNodeIsVisible === payload) {
@@ -1,6 +1,5 @@
1
- import { IDropdownState } from "./stateReducer";
2
1
  import { IDropdownRawItem } from "../types";
3
2
  import { IGroupTree, ITypedHash } from "../../groupsFilterRaw/groupsFilterInterfaces";
4
3
  export declare function getChildList(childArr: IDropdownRawItem[] | undefined): IDropdownRawItem[];
5
- export declare const updateAllSelectedStateValueBasedOnTotalSelected: (state: IDropdownState, totalSelected: number) => Partial<Pick<IDropdownState, "isAllSelected">>;
4
+ export declare const computeIsAllSelected: (currentIsAllSelected: boolean | undefined, isFullSelectionMode: boolean, resultsExceedListLimit: boolean | undefined, groupsMapLength: number, selectedCount: number) => boolean | undefined;
6
5
  export declare const getRootId: (groupsMap: ITypedHash<IGroupTree>, rootIdKey: string, firstParentNodeIsVisible?: boolean) => string | undefined;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getRootId = exports.updateAllSelectedStateValueBasedOnTotalSelected = exports.getChildList = void 0;
3
+ exports.getRootId = exports.computeIsAllSelected = exports.getChildList = void 0;
4
4
  const groupsHelper_1 = require("../../groupsFilterRaw/groupsHelper");
5
5
  function getChildList(childArr) {
6
6
  const list = [];
@@ -17,17 +17,10 @@ function getChildList(childArr) {
17
17
  return list;
18
18
  }
19
19
  exports.getChildList = getChildList;
20
- const updateAllSelectedStateValueBasedOnTotalSelected = (state, totalSelected) => {
21
- const additionalStateUpdates = {};
22
- const groupsMapLength = Object.keys(state.groupsMap).length - 1;
23
- if (!state.resultsExceedListLimit && !state.isAllSelected && state.isFullSelectionMode && groupsMapLength > 0) {
24
- if (totalSelected >= groupsMapLength) {
25
- additionalStateUpdates.isAllSelected = true;
26
- }
27
- }
28
- return additionalStateUpdates;
29
- };
30
- exports.updateAllSelectedStateValueBasedOnTotalSelected = updateAllSelectedStateValueBasedOnTotalSelected;
20
+ const computeIsAllSelected = (currentIsAllSelected, isFullSelectionMode, resultsExceedListLimit, groupsMapLength, selectedCount) => !resultsExceedListLimit && currentIsAllSelected === false && isFullSelectionMode && groupsMapLength > 0 && selectedCount >= groupsMapLength
21
+ ? true
22
+ : currentIsAllSelected;
23
+ exports.computeIsAllSelected = computeIsAllSelected;
31
24
  const getRootId = (groupsMap, rootIdKey, firstParentNodeIsVisible) => {
32
25
  var _a;
33
26
  if (Object.keys(groupsMap).length === 0) {
@@ -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
- ({ id, children, className, pageName, subline, isBeta, isMobile: isMobileProp, allowBookmarkWithBack, feedBackAction, betaOptionAction }: IHeaderTitle): import("react/jsx-runtime").JSX.Element;
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 = ({ id, children, className, pageName, subline, isBeta, isMobile: isMobileProp, allowBookmarkWithBack, feedBackAction, betaOptionAction }) => {
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
@@ -3031,6 +3031,10 @@ html:lang(ar) .zen-title-text--drive {
3031
3031
  font-family: var(--arabic-font-family);
3032
3032
  }
3033
3033
  .zen-card-title {
3034
+ margin: 0;
3035
+ padding: 0;
3036
+ font-size: inherit;
3037
+ font-weight: inherit;
3034
3038
  display: flex;
3035
3039
  gap: 8px;
3036
3040
  align-items: center;
@@ -3443,7 +3447,7 @@ html:lang(ar) .zen-menu-button__action--drive-tablet {
3443
3447
  box-sizing: border-box;
3444
3448
  background-color: var(--backgrounds-main);
3445
3449
  padding: 4px 0;
3446
- max-height: 800px;
3450
+ max-height: 90vh;
3447
3451
  border: 0px;
3448
3452
  min-height: 30px;
3449
3453
  min-width: 170px;
@@ -3523,6 +3527,9 @@ html:lang(ar) .zen-side-panel {
3523
3527
  visibility: visible;
3524
3528
  pointer-events: auto;
3525
3529
  }
3530
+ .zen-side-panel.zen-side-panel--shown {
3531
+ transform: translateX(0);
3532
+ }
3526
3533
  .zen-side-panel--shown .zen-form-field--new-component {
3527
3534
  display: flex;
3528
3535
  }
@@ -4849,42 +4856,47 @@ html:lang(ar) .zen-checkbox__label-text {
4849
4856
  .zen-checkbox__icon--disabled {
4850
4857
  fill: var(--backgrounds-content-0);
4851
4858
  }
4852
- .zen-checkbox__input:checked + .zen-checkbox__label > .zen-checkbox__box,
4853
- .zen-checkbox__input:indeterminate + .zen-checkbox__label > .zen-checkbox__box {
4859
+ .zen-checkbox:has(.zen-checkbox__input:checked) .zen-checkbox__box,
4860
+ .zen-checkbox:has(.zen-checkbox__input:indeterminate) .zen-checkbox__box {
4854
4861
  border-color: var(--borders-form-field--active);
4855
4862
  background-color: var(--borders-form-field--active);
4856
4863
  fill: var(--text-reverse-primary);
4857
4864
  color: var(--text-reverse-primary);
4858
4865
  stroke: var(--text-reverse-primary);
4859
4866
  }
4860
- .zen-checkbox__input:checked + .zen-checkbox__label > .zen-checkbox__box .zen-checkbox__icon,
4861
- .zen-checkbox__input:indeterminate + .zen-checkbox__label > .zen-checkbox__box .zen-checkbox__icon {
4867
+ .zen-checkbox:has(.zen-checkbox__input:checked) .zen-checkbox__box .zen-checkbox__icon,
4868
+ .zen-checkbox:has(.zen-checkbox__input:indeterminate) .zen-checkbox__box .zen-checkbox__icon {
4862
4869
  display: block;
4863
4870
  }
4864
- .zen-checkbox__input:focus + .zen-checkbox__label > .zen-checkbox__box {
4871
+ .zen-checkbox:has(.zen-checkbox__input:focus) .zen-checkbox__box,
4872
+ .zen-checkbox:has(.zen-checkbox__input:focus) .zen-checkbox__label {
4865
4873
  outline: 1px solid var(--zen-checkbox-outline, var(--borders-form-field--active));
4866
4874
  outline-offset: var(--border-width-default);
4867
4875
  }
4868
4876
  /* This was added because safari just added support for :focus-visible. Can be removed after 3 versions of safari browser. */
4869
4877
  @supports selector(:focus-visible) {
4870
- .zen-checkbox__input:focus + .zen-checkbox__label > .zen-checkbox__box {
4878
+ .zen-checkbox:has(.zen-checkbox__input:focus) .zen-checkbox__box,
4879
+ .zen-checkbox:has(.zen-checkbox__input:focus) .zen-checkbox__label {
4871
4880
  outline: none;
4872
4881
  }
4873
- .zen-checkbox__input:focus-visible + .zen-checkbox__label > .zen-checkbox__box {
4882
+ .zen-checkbox:has(.zen-checkbox__input:focus-visible) .zen-checkbox__box,
4883
+ .zen-checkbox:has(.zen-checkbox__input:focus-visible) .zen-checkbox__label {
4874
4884
  outline: 1px solid var(--zen-checkbox-outline, var(--borders-form-field--active));
4875
4885
  outline-offset: var(--border-width-default);
4876
4886
  }
4877
4887
  }
4878
- .zen-checkbox__input:disabled + .zen-checkbox__label {
4888
+ .zen-checkbox:has(.zen-checkbox__input:disabled) .zen-checkbox__label {
4879
4889
  fill: var(--text-reverse-primary);
4880
4890
  color: var(--text-button-disabled);
4891
+ cursor: default;
4881
4892
  }
4882
- .zen-checkbox__input:disabled + .zen-checkbox__label > .zen-checkbox__box {
4893
+ .zen-checkbox:has(.zen-checkbox__input:disabled) .zen-checkbox__box {
4883
4894
  border-color: var(--borders-general);
4884
4895
  background-color: var(--backgrounds-field-disabled);
4896
+ cursor: default;
4885
4897
  }
4886
- .zen-checkbox__input:disabled:checked + .zen-checkbox__label > .zen-checkbox__box,
4887
- .zen-checkbox__input:disabled:indeterminate + .zen-checkbox__label > .zen-checkbox__box {
4898
+ .zen-checkbox:has(.zen-checkbox__input:disabled:checked) .zen-checkbox__box,
4899
+ .zen-checkbox:has(.zen-checkbox__input:disabled:indeterminate) .zen-checkbox__box {
4888
4900
  border-color: var(--borders-general);
4889
4901
  background-color: var(--borders-general);
4890
4902
  }
@@ -7603,6 +7615,11 @@ html:lang(ar) .zen-checkbox-list-with-action__label {
7603
7615
  color: var(--text-hyperlink);
7604
7616
  fill: var(--text-hyperlink);
7605
7617
  }
7618
+ .zen-checkbox-list-with-action__label--action:disabled {
7619
+ cursor: default;
7620
+ color: var(--text-disabled);
7621
+ fill: var(--text-disabled);
7622
+ }
7606
7623
  .zen-checkbox-list-with-action__label-text {
7607
7624
  display: flex;
7608
7625
  flex-grow: 1;
@@ -7818,8 +7835,8 @@ html:lang(ar) .zen-dropdown-list__label {
7818
7835
  .zen-dropdown-list__item--interactive:not(:disabled) {
7819
7836
  cursor: pointer;
7820
7837
  }
7821
- .zen-dropdown-list__item--interactive:not(:disabled):hover,
7822
- .zen-dropdown-list__item--interactive:not(:disabled):focus {
7838
+ .zen-dropdown-list__item--interactive:not(:disabled):hover:not(.zen-dropdown-list__action-button--selected),
7839
+ .zen-dropdown-list__item--interactive:not(:disabled):focus:not(.zen-dropdown-list__action-button--selected) {
7823
7840
  color: var(--text-primary);
7824
7841
  fill: var(--action-secondary--default);
7825
7842
  outline: none;
@@ -7889,6 +7906,27 @@ html:lang(ar) .zen-dropdown-list__action-label {
7889
7906
  .zen-dropdown-list__action-button:disabled svg {
7890
7907
  fill: var(--text-button-disabled);
7891
7908
  }
7909
+ .zen-dropdown-list__action-button--selected {
7910
+ background-color: var(--action-primary--default);
7911
+ }
7912
+ .zen-dropdown-list__action-button--selected.zen-dropdown-list__item--interactive:not(:disabled):hover,
7913
+ .zen-dropdown-list__action-button--selected.zen-dropdown-list__item--interactive:not(:disabled):focus {
7914
+ background-color: var(--action-primary--default);
7915
+ fill: var(--text-reverse-primary);
7916
+ color: var(--text-reverse-primary);
7917
+ }
7918
+ .zen-dropdown-list__action-button--selected.zen-dropdown-list__item--interactive:not(:disabled):focus-visible {
7919
+ border-color: var(--backgrounds-content-1);
7920
+ outline: 1px solid var(--borders-form-field--active);
7921
+ outline-offset: 2px;
7922
+ }
7923
+ .zen-dropdown-list__action-button--selected .zen-dropdown-list__icon {
7924
+ color: var(--text-reverse-primary);
7925
+ fill: var(--text-reverse-primary);
7926
+ }
7927
+ .zen-dropdown-list__action-button--selected .zen-dropdown-list__action-label {
7928
+ color: var(--text-reverse-primary);
7929
+ }
7892
7930
  .zen-dropdown-list__footer {
7893
7931
  display: flex;
7894
7932
  justify-content: flex-start;