@geotab/zenith 3.15.0 → 3.16.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 (184) hide show
  1. package/dist/absolute/absolute.js +1 -1
  2. package/dist/betaPill/betaPill.js +9 -9
  3. package/dist/commonHelpers/arrowNavigation/arrowNavigationHelper.d.ts +1 -0
  4. package/dist/commonHelpers/arrowNavigation/arrowNavigationHelper.js +5 -1
  5. package/dist/commonHelpers/hooks/useTrapFocus.d.ts +9 -0
  6. package/dist/commonHelpers/hooks/useTrapFocus.js +66 -14
  7. package/dist/controlledPopup/controlledPopup.d.ts +1 -1
  8. package/dist/controlledPopup/controlledPopup.js +1 -1
  9. package/dist/dropdownRaw/dropdownSearchableTrigger.js +1 -1
  10. package/dist/filtersBar/components/filtersBarRange/filtersBarRange.d.ts +1 -1
  11. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.d.ts +1 -1
  12. package/dist/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +8 -5
  13. package/dist/filtersBar/filtersContainer/filtersContainer.js +7 -4
  14. package/dist/header/header.js +9 -2
  15. package/dist/header/headerHelpers.js +8 -5
  16. package/dist/index.css +142 -11
  17. package/dist/index.d.ts +6 -1
  18. package/dist/index.js +12 -3
  19. package/dist/modal/modal.d.ts +48 -0
  20. package/dist/modal/modal.js +37 -7
  21. package/dist/nav/navHeader/navHeader.d.ts +1 -1
  22. package/dist/nav/navHeader/navHeaderSearch/navHeaderSearch.js +1 -1
  23. package/dist/nav/navItem/navItem.d.ts +15 -2
  24. package/dist/nav/navItem/navItem.js +49 -7
  25. package/dist/nav/utils/navUtils.d.ts +2 -2
  26. package/dist/pillExpandable/pillExpandable.js +6 -3
  27. package/dist/rangeRaw/components/rangeField.d.ts +2 -1
  28. package/dist/rangeRaw/components/rangeField.js +4 -3
  29. package/dist/rangeRaw/rangeRaw.js +8 -5
  30. package/dist/rangeRaw/types.d.ts +1 -0
  31. package/dist/sidePanel/sidePanel.js +3 -2
  32. package/dist/table/selectable/interfaces.d.ts +13 -0
  33. package/dist/table/selectable/useSelectableRows.js +46 -12
  34. package/dist/table/selectable/utils/calculateSelectionState.js +35 -0
  35. package/dist/table/selectable/utils/isRowChecked.js +12 -1
  36. package/dist/table/table.d.ts +2 -0
  37. package/dist/table/table.js +3 -1
  38. package/dist/tabs/tabs.js +14 -5
  39. package/dist/textInputRaw/textInputRaw.js +1 -1
  40. package/dist/textInputRaw/types.d.ts +1 -0
  41. package/dist/tooltip/components/inlineTrigger.d.ts +43 -0
  42. package/dist/tooltip/components/inlineTrigger.js +42 -0
  43. package/dist/tooltip/tooltip.d.ts +5 -2
  44. package/dist/tooltip/tooltip.js +15 -4
  45. package/dist/trendIndicator/trendIndicator.d.ts +47 -0
  46. package/dist/trendIndicator/trendIndicator.js +47 -0
  47. package/dist/trendIndicator/trendIndicatorUtils.d.ts +9 -0
  48. package/dist/trendIndicator/trendIndicatorUtils.js +18 -0
  49. package/dist/utils/experimentalFeatures/experimentalContext.d.ts +17 -0
  50. package/dist/utils/experimentalFeatures/experimentalContext.js +29 -0
  51. package/dist/utils/experimentalFeatures/index.d.ts +4 -0
  52. package/dist/utils/experimentalFeatures/index.js +9 -0
  53. package/dist/utils/experimentalFeatures/registry.d.ts +13 -0
  54. package/dist/utils/experimentalFeatures/registry.js +11 -0
  55. package/dist/utils/experimentalFeatures/useExperimentalFeature.d.ts +3 -0
  56. package/dist/utils/experimentalFeatures/useExperimentalFeature.js +25 -0
  57. package/dist/utils/localization/translations/ar.json +1 -1
  58. package/dist/utils/localization/translations/bg-BG.json +1 -1
  59. package/dist/utils/localization/translations/cs.json +1 -1
  60. package/dist/utils/localization/translations/da-DK.json +1 -1
  61. package/dist/utils/localization/translations/de.json +1 -1
  62. package/dist/utils/localization/translations/el-GR.json +1 -1
  63. package/dist/utils/localization/translations/en.json +1 -1
  64. package/dist/utils/localization/translations/es.json +1 -1
  65. package/dist/utils/localization/translations/et-EE.json +1 -1
  66. package/dist/utils/localization/translations/fi-FI.json +1 -1
  67. package/dist/utils/localization/translations/fr-FR.json +1 -1
  68. package/dist/utils/localization/translations/fr.json +1 -1
  69. package/dist/utils/localization/translations/hu-HU.json +1 -1
  70. package/dist/utils/localization/translations/id.json +1 -1
  71. package/dist/utils/localization/translations/it.json +1 -1
  72. package/dist/utils/localization/translations/ja.json +1 -1
  73. package/dist/utils/localization/translations/ka-GE.json +1 -1
  74. package/dist/utils/localization/translations/ko-KR.json +1 -1
  75. package/dist/utils/localization/translations/lt-LT.json +1 -1
  76. package/dist/utils/localization/translations/lv-LV.json +1 -1
  77. package/dist/utils/localization/translations/ms.json +1 -1
  78. package/dist/utils/localization/translations/nb-NO.json +1 -1
  79. package/dist/utils/localization/translations/nl.json +1 -1
  80. package/dist/utils/localization/translations/pl.json +1 -1
  81. package/dist/utils/localization/translations/pt-BR.json +1 -1
  82. package/dist/utils/localization/translations/pt-PT.json +1 -1
  83. package/dist/utils/localization/translations/ro-RO.json +1 -1
  84. package/dist/utils/localization/translations/sk-SK.json +1 -1
  85. package/dist/utils/localization/translations/sv.json +1 -1
  86. package/dist/utils/localization/translations/th.json +1 -1
  87. package/dist/utils/localization/translations/tr.json +1 -1
  88. package/dist/utils/localization/translations/zh-Hans.json +1 -1
  89. package/dist/utils/localization/translations/zh-TW.json +1 -1
  90. package/esm/absolute/absolute.js +1 -1
  91. package/esm/betaPill/betaPill.js +9 -9
  92. package/esm/commonHelpers/arrowNavigation/arrowNavigationHelper.d.ts +1 -0
  93. package/esm/commonHelpers/arrowNavigation/arrowNavigationHelper.js +3 -0
  94. package/esm/commonHelpers/hooks/useTrapFocus.d.ts +9 -0
  95. package/esm/commonHelpers/hooks/useTrapFocus.js +67 -15
  96. package/esm/controlledPopup/controlledPopup.d.ts +1 -1
  97. package/esm/controlledPopup/controlledPopup.js +1 -1
  98. package/esm/dropdownRaw/dropdownSearchableTrigger.js +1 -1
  99. package/esm/filtersBar/components/filtersBarRange/filtersBarRange.d.ts +1 -1
  100. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.d.ts +1 -1
  101. package/esm/filtersBar/filtersBarSidePanel/components/filtersBarSidePanelRange/filtersBarSidePanelRange.js +8 -5
  102. package/esm/filtersBar/filtersContainer/filtersContainer.js +7 -4
  103. package/esm/header/header.js +9 -2
  104. package/esm/header/headerHelpers.js +8 -5
  105. package/esm/index.d.ts +6 -1
  106. package/esm/index.js +5 -1
  107. package/esm/modal/modal.d.ts +48 -0
  108. package/esm/modal/modal.js +37 -7
  109. package/esm/nav/navHeader/navHeader.d.ts +1 -1
  110. package/esm/nav/navHeader/navHeaderSearch/navHeaderSearch.js +1 -1
  111. package/esm/nav/navItem/navItem.d.ts +15 -2
  112. package/esm/nav/navItem/navItem.js +49 -7
  113. package/esm/nav/utils/navUtils.d.ts +2 -2
  114. package/esm/pillExpandable/pillExpandable.js +6 -3
  115. package/esm/rangeRaw/components/rangeField.d.ts +2 -1
  116. package/esm/rangeRaw/components/rangeField.js +4 -3
  117. package/esm/rangeRaw/rangeRaw.js +8 -5
  118. package/esm/rangeRaw/types.d.ts +1 -0
  119. package/esm/sidePanel/sidePanel.js +3 -2
  120. package/esm/table/selectable/interfaces.d.ts +13 -0
  121. package/esm/table/selectable/useSelectableRows.js +46 -12
  122. package/esm/table/selectable/utils/calculateSelectionState.js +35 -0
  123. package/esm/table/selectable/utils/isRowChecked.js +12 -1
  124. package/esm/table/table.d.ts +2 -0
  125. package/esm/table/table.js +2 -0
  126. package/esm/tabs/tabs.js +14 -5
  127. package/esm/testHelpers/renderWithFeatures.d.ts +4 -0
  128. package/esm/testHelpers/renderWithFeatures.js +6 -0
  129. package/esm/textInputRaw/textInputRaw.js +1 -1
  130. package/esm/textInputRaw/types.d.ts +1 -0
  131. package/esm/tooltip/components/inlineTrigger.d.ts +43 -0
  132. package/esm/tooltip/components/inlineTrigger.js +38 -0
  133. package/esm/tooltip/tooltip.d.ts +5 -2
  134. package/esm/tooltip/tooltip.js +15 -4
  135. package/esm/trendIndicator/trendIndicator.d.ts +47 -0
  136. package/esm/trendIndicator/trendIndicator.js +43 -0
  137. package/esm/trendIndicator/trendIndicatorUtils.d.ts +9 -0
  138. package/esm/trendIndicator/trendIndicatorUtils.js +14 -0
  139. package/esm/utils/experimentalFeatures/experimentalContext.d.ts +17 -0
  140. package/esm/utils/experimentalFeatures/experimentalContext.js +25 -0
  141. package/esm/utils/experimentalFeatures/index.d.ts +4 -0
  142. package/esm/utils/experimentalFeatures/index.js +3 -0
  143. package/esm/utils/experimentalFeatures/registry.d.ts +13 -0
  144. package/esm/utils/experimentalFeatures/registry.js +8 -0
  145. package/esm/utils/experimentalFeatures/useExperimentalFeature.d.ts +3 -0
  146. package/esm/utils/experimentalFeatures/useExperimentalFeature.js +21 -0
  147. package/esm/utils/localization/translations/ar.json +1 -1
  148. package/esm/utils/localization/translations/bg-BG.json +1 -1
  149. package/esm/utils/localization/translations/cs.json +1 -1
  150. package/esm/utils/localization/translations/da-DK.json +1 -1
  151. package/esm/utils/localization/translations/de.json +1 -1
  152. package/esm/utils/localization/translations/el-GR.json +1 -1
  153. package/esm/utils/localization/translations/en.json +1 -1
  154. package/esm/utils/localization/translations/es.json +1 -1
  155. package/esm/utils/localization/translations/et-EE.json +1 -1
  156. package/esm/utils/localization/translations/fi-FI.json +1 -1
  157. package/esm/utils/localization/translations/fr-FR.json +1 -1
  158. package/esm/utils/localization/translations/fr.json +1 -1
  159. package/esm/utils/localization/translations/hu-HU.json +1 -1
  160. package/esm/utils/localization/translations/id.json +1 -1
  161. package/esm/utils/localization/translations/it.json +1 -1
  162. package/esm/utils/localization/translations/ja.json +1 -1
  163. package/esm/utils/localization/translations/ka-GE.json +1 -1
  164. package/esm/utils/localization/translations/ko-KR.json +1 -1
  165. package/esm/utils/localization/translations/lt-LT.json +1 -1
  166. package/esm/utils/localization/translations/lv-LV.json +1 -1
  167. package/esm/utils/localization/translations/ms.json +1 -1
  168. package/esm/utils/localization/translations/nb-NO.json +1 -1
  169. package/esm/utils/localization/translations/nl.json +1 -1
  170. package/esm/utils/localization/translations/pl.json +1 -1
  171. package/esm/utils/localization/translations/pt-BR.json +1 -1
  172. package/esm/utils/localization/translations/pt-PT.json +1 -1
  173. package/esm/utils/localization/translations/ro-RO.json +1 -1
  174. package/esm/utils/localization/translations/sk-SK.json +1 -1
  175. package/esm/utils/localization/translations/sv.json +1 -1
  176. package/esm/utils/localization/translations/th.json +1 -1
  177. package/esm/utils/localization/translations/tr.json +1 -1
  178. package/esm/utils/localization/translations/zh-Hans.json +1 -1
  179. package/esm/utils/localization/translations/zh-TW.json +1 -1
  180. package/package.json +36 -16
  181. package/dist/banner/utils/isBannerTarget.d.ts +0 -1
  182. package/dist/banner/utils/isBannerTarget.js +0 -11
  183. package/esm/banner/utils/isBannerTarget.d.ts +0 -1
  184. package/esm/banner/utils/isBannerTarget.js +0 -7
@@ -25,6 +25,11 @@ const navItemType_1 = require("./navItemType");
25
25
  exports.NavItemContext = (0, react_1.createContext)({ parentLevel: 0 });
26
26
  const defaultTooltipAlignment = "end";
27
27
  const isLinkNavItem = (item) => !!item.link;
28
+ // An empty popupId would render aria-controls="", i.e. a trigger that advertises a popup but names no
29
+ // element. Nothing else catches that — TypeScript accepts "" as a string, and aria-controls is
30
+ // allowEmpty for validators — so reject it here and fall back to the plain button variant rather than
31
+ // emitting a relationship that resolves to nothing.
32
+ const isPopupButtonNavItem = (item) => "popupId" in item && typeof item.popupId === "string" && item.popupId !== "";
28
33
  const isNavItemElement = (child) => (0, react_1.isValidElement)(child) && child.type.displayName === "NavItem";
29
34
  const getWrapperClassName = ({ className, collapsed, active, isMobile, hasNested, isNested, isLink, type }) => (0, classNames_1.classNames)([
30
35
  "zen-nav-item",
@@ -77,11 +82,19 @@ const LinkNavItem = (_a) => {
77
82
  onNavigate && onNavigate();
78
83
  }, className: "zen-link--light zen-nav-item__main", children: (0, jsx_runtime_1.jsx)(navItemContent_1.NavItemContent, Object.assign({ title: title, collapsed: collapsed, level: currentLevel, isExternalLink: isExternalLink }, rest)) }));
79
84
  const item = collapsed ? ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { trigger: linkElement, alignment: tooltipAlignment, children: title })) : (linkElement);
80
- return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({ className, collapsed, active, isMobile, isLink: true, type }), children: [item, (0, jsx_runtime_1.jsx)(NavItemAction, { actionIcon: actionIcon, actionIconTitle: actionIconTitle, onActionIconClick: onActionIconClick, collapsed: collapsed, level: currentLevel, isMenuItem: isMenuItem })] }));
85
+ return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({
86
+ className,
87
+ collapsed,
88
+ active,
89
+ isMobile,
90
+ isLink: true,
91
+ type
92
+ }), children: [item, (0, jsx_runtime_1.jsx)(NavItemAction, { actionIcon: actionIcon, actionIconTitle: actionIconTitle, onActionIconClick: onActionIconClick, collapsed: collapsed, level: currentLevel, isMenuItem: isMenuItem })] }));
81
93
  };
82
94
  LinkNavItem.displayName = "LinkNavItem";
83
- const ButtonNavItem = (_a) => {
84
- var { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "end-top", isMenuItem = true, tooltipAlignment = defaultTooltipAlignment, actionIcon, actionIconTitle, onActionIconClick, onDropdownStateChange, type } = _a, rest = __rest(_a, ["className", "title", "onClick", "collapsed", "active", "children", "tabIndex", "menuAlignment", "isMenuItem", "tooltipAlignment", "actionIcon", "actionIconTitle", "onActionIconClick", "onDropdownStateChange", "type"]);
95
+ const ButtonNavItem = (props) => {
96
+ const isPopupTrigger = isPopupButtonNavItem(props);
97
+ const { className, title, onClick, collapsed, active, children, tabIndex, menuAlignment = "end-top", isMenuItem = true, tooltipAlignment = defaultTooltipAlignment, actionIcon, actionIconTitle, onActionIconClick, onDropdownStateChange, popupId, isPopupOpen, popupType, type } = props, rest = __rest(props, ["className", "title", "onClick", "collapsed", "active", "children", "tabIndex", "menuAlignment", "isMenuItem", "tooltipAlignment", "actionIcon", "actionIconTitle", "onActionIconClick", "onDropdownStateChange", "popupId", "isPopupOpen", "popupType", "type"]);
85
98
  const [menuOpen, setMenuOpen] = (0, react_1.useState)(false);
86
99
  const { parentLevel = 0, closeParentMenu } = (0, react_1.useContext)(exports.NavItemContext);
87
100
  (0, react_1.useEffect)(() => {
@@ -116,7 +129,15 @@ const ButtonNavItem = (_a) => {
116
129
  const { onNavigate } = (0, nav_context_1.useNavContext)();
117
130
  const isActive = active || (hasNestedItems && menuOpen);
118
131
  const triggerId = (0, react_1.useId)();
119
- const buttonElement = ((0, jsx_runtime_1.jsx)("button", { id: triggerId, ref: triggerRef, "aria-label": title, title: title, tabIndex: tabIndex, role: isMenuItem ? "menuitem" : undefined, "aria-haspopup": hasNestedItems ? "menu" : undefined, "aria-expanded": hasNestedItems ? menuOpen : undefined, className: "zen-nav-item__main", onClick: handleClick, onKeyDown: handleKeyPress, children: (0, jsx_runtime_1.jsx)(navItemContent_1.NavItemContent, Object.assign({ title: title, collapsed: collapsed, hasSubmenu: hasNestedItems, level: currentLevel }, rest)) }));
132
+ // All three attributes branch on hasNestedItems first so they always describe the same popup. A
133
+ // nested submenu wins: one button cannot honestly advertise both a submenu and an external popup.
134
+ // TypeScript already forbids the combination (IPopupButtonNavItem declares children?: never); the
135
+ // guard here keeps the triple consistent when that is bypassed at runtime — JS consumers, spread
136
+ // props, or `as any`.
137
+ const ariaHasPopup = hasNestedItems ? "menu" : isPopupTrigger ? (popupType !== null && popupType !== void 0 ? popupType : "dialog") : undefined;
138
+ const ariaExpanded = hasNestedItems ? menuOpen : isPopupTrigger ? isPopupOpen : undefined;
139
+ const ariaControls = hasNestedItems || !isPopupTrigger ? undefined : popupId;
140
+ const buttonElement = ((0, jsx_runtime_1.jsx)("button", { id: triggerId, ref: triggerRef, "aria-label": title, title: title, tabIndex: tabIndex, role: isMenuItem ? "menuitem" : undefined, "aria-haspopup": ariaHasPopup, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, className: "zen-nav-item__main", onClick: handleClick, onKeyDown: handleKeyPress, children: (0, jsx_runtime_1.jsx)(navItemContent_1.NavItemContent, Object.assign({ title: title, collapsed: collapsed, hasSubmenu: hasNestedItems, level: currentLevel }, rest)) }));
120
141
  const trigger = collapsed ? ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { trigger: buttonElement, alignment: tooltipAlignment, children: title })) : (buttonElement);
121
142
  if (hasNestedItems) {
122
143
  const childLevel = currentLevel + 1;
@@ -130,7 +151,14 @@ const ButtonNavItem = (_a) => {
130
151
  };
131
152
  // For mobiles convert the entire subtree into a static NavMenuItem tree
132
153
  if (isMobile) {
133
- return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({ className, collapsed, active: isActive, isMobile, hasNested: hasNestedItems, type }), children: [trigger, (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { triggerRef: triggerRef, isOpen: menuOpen, setIsOpen: setMenuOpen, title: title, alignment: menuAlignment, className: (0, classNames_1.classNames)([popupClass, popupClassMobile]), listClassName: (0, classNames_1.classNames)([popupListClass, popupListClassMobile]), ariaLabelledby: triggerId, children: buildMobileMenuItems(children, triggerId, onNavigate) })] }));
154
+ return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({
155
+ className,
156
+ collapsed,
157
+ active: isActive,
158
+ isMobile,
159
+ hasNested: hasNestedItems,
160
+ type
161
+ }), children: [trigger, (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { triggerRef: triggerRef, isOpen: menuOpen, setIsOpen: setMenuOpen, title: title, alignment: menuAlignment, className: (0, classNames_1.classNames)([popupClass, popupClassMobile]), listClassName: (0, classNames_1.classNames)([popupListClass, popupListClassMobile]), ariaLabelledby: triggerId, children: buildMobileMenuItems(children, triggerId, onNavigate) })] }));
134
162
  }
135
163
  // Desktop: clone children with level classes and render nested ControlledMenu popups per level.
136
164
  const processedChildren = validChildren.map(child => {
@@ -139,9 +167,23 @@ const ButtonNavItem = (_a) => {
139
167
  const nestedClass = childLevel > 1 ? "zen-nav-item--nested" : "";
140
168
  return (0, react_1.cloneElement)(childElement, Object.assign(Object.assign({}, childElement.props), { className: (0, classNames_1.classNames)([levelClass, nestedClass, childElement.props.className || ""]), collapsed: false }));
141
169
  });
142
- return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({ className, collapsed, active: isActive, isMobile, hasNested: hasNestedItems, type }), children: [trigger, (0, jsx_runtime_1.jsx)(exports.NavItemContext, { value: { parentLevel: currentLevel, closeParentMenu: closeLevelMenu }, children: (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { triggerRef: triggerRef, isOpen: menuOpen, setIsOpen: setMenuOpen, title: title, alignment: menuAlignment, className: popupClass, listClassName: popupListClass, ariaLabelledby: triggerId, children: processedChildren }) })] }));
170
+ return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({
171
+ className,
172
+ collapsed,
173
+ active: isActive,
174
+ isMobile,
175
+ hasNested: hasNestedItems,
176
+ type
177
+ }), children: [trigger, (0, jsx_runtime_1.jsx)(exports.NavItemContext, { value: { parentLevel: currentLevel, closeParentMenu: closeLevelMenu }, children: (0, jsx_runtime_1.jsx)(controlledMenu_1.ControlledMenu, { triggerRef: triggerRef, isOpen: menuOpen, setIsOpen: setMenuOpen, title: title, alignment: menuAlignment, className: popupClass, listClassName: popupListClass, ariaLabelledby: triggerId, children: processedChildren }) })] }));
143
178
  }
144
- return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({ className, collapsed, active: isActive, isMobile, hasNested: hasNestedItems, type }), children: [trigger, (0, jsx_runtime_1.jsx)(NavItemAction, { actionIcon: actionIcon, actionIconTitle: actionIconTitle, onActionIconClick: onActionIconClick, collapsed: collapsed, level: currentLevel, isMenuItem: isMenuItem })] }));
179
+ return ((0, jsx_runtime_1.jsxs)("div", { className: getWrapperClassName({
180
+ className,
181
+ collapsed,
182
+ active: isActive,
183
+ isMobile,
184
+ hasNested: hasNestedItems,
185
+ type
186
+ }), children: [trigger, (0, jsx_runtime_1.jsx)(NavItemAction, { actionIcon: actionIcon, actionIconTitle: actionIconTitle, onActionIconClick: onActionIconClick, collapsed: collapsed, level: currentLevel, isMenuItem: isMenuItem })] }));
145
187
  };
146
188
  ButtonNavItem.displayName = "ButtonNavItem";
147
189
  /**
@@ -1,8 +1,8 @@
1
1
  import { PropsWithChildren, ReactElement, ReactNode } from "react";
2
- import { IButtonNavItem, ILinkNavItem } from "../navItem/navItem";
2
+ import { ILinkNavItem, TButtonNavItem } from "../navItem/navItem";
3
3
  export declare const navHeaderImage = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIzIiBoZWlnaHQ9IjE1IiB2aWV3Qm94PSIwIDAgMTIzIDE1IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNDcuNDE3OCA1LjY2MDFIMzkuNTkxNVY2Ljc0NTI2SDQ1LjM1MjdDNDUuNDE5MiA3LjA2NjkzIDQ1LjQ1MjggNy4yNzc1IDQ1LjQ1MjggNy4zNzA5QzQ1LjQ1MjggOC41OTE3NyA0NS4xOTczIDkuMzU1MjUgNDQuNjk0IDkuNjM5OTdDNDQuMTg1NCA5LjkyODEzIDQyLjgyODkgMTAuMDczOSA0MC42NjIzIDEwLjA3MzlDMzcuODI1NyAxMC4wNzM5IDM2LjA1NzggOS45MTk3IDM1LjQwNzkgOS42MTUxNEMzNC43NjUzIDkuMzE0NDkgMzQuNDM5NyA4LjQ4ODM4IDM0LjQzOTcgNy4xNTkwM0wzNC40MjY2IDUuNjMwOThMMzQuNDUzIDQuMjExNTVDMzQuNDUzIDIuOTAyNCAzNC43NDYyIDIuMDc0MzkgMzUuMzI0MiAxLjc1MDMzQzM1LjkwNzcgMS40MjMxOSAzNy4zOTE1IDEuMjU3MzEgMzkuNzM0MiAxLjI1NzMxQzQyLjI3MjQgMS4yNTczMS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g1IDQuODc0NjhaIiBmaWxsPSIjMjU0NzdCIi8+Cjwvc3ZnPg==";
5
5
  export declare const detectOverlayScrollbar: () => boolean;
6
6
  export declare function isImageUrl(str?: string | ReactNode): boolean;
7
7
  export declare const filterPrimaryNavItems: <T extends PropsWithChildren>(element: ReactElement<T>, isNegative: boolean) => ReactElement<T> | null;
8
- export declare const collectNavItems: (element: ReactElement) => (ReactElement<ILinkNavItem> | ReactElement<IButtonNavItem>)[];
8
+ export declare const collectNavItems: (element: ReactElement) => (ReactElement<ILinkNavItem> | ReactElement<TButtonNavItem>)[];
@@ -176,7 +176,8 @@ const PillExpandableChild = ({
176
176
  type,
177
177
  errorHandler,
178
178
  content,
179
- autoExpandChildren
179
+ autoExpandChildren,
180
+ dataAnalyticsId
180
181
  }) => {
181
182
  const pillId = (0, react_1.useId)();
182
183
  const descriptionId = (0, react_1.useId)();
@@ -234,7 +235,8 @@ const PillExpandableChild = ({
234
235
  onExpand: handleChildToggle,
235
236
  type: type,
236
237
  errorHandler: errorHandler,
237
- descriptionId: descriptionId
238
+ descriptionId: descriptionId,
239
+ dataAnalyticsId: dataAnalyticsId
238
240
  }), (0, jsx_runtime_1.jsx)(pillContent_1.PillContent, {
239
241
  onActionClick: handleChildToggle,
240
242
  descriptionText: content.description,
@@ -555,7 +557,8 @@ const PillExpandableBase = ({
555
557
  type: type,
556
558
  errorHandler: errorHandler,
557
559
  content: content,
558
- autoExpandChildren: autoExpandChildren
560
+ autoExpandChildren: autoExpandChildren,
561
+ dataAnalyticsId: dataAnalyticsId
559
562
  });
560
563
  }
561
564
  return (0, jsx_runtime_1.jsx)(PillContext.Provider, {
@@ -16,5 +16,6 @@ export interface IRangeField {
16
16
  errorString?: string;
17
17
  direction?: TDirection;
18
18
  isMinField: boolean;
19
+ integer?: boolean;
19
20
  }
20
- export declare const RangeField: ({ value, onChange, onBlur, id, label, unit, disabled, min, max, inputRef, errorString, className, direction, isMinField }: IRangeField) => import("react/jsx-runtime").JSX.Element;
21
+ export declare const RangeField: ({ value, onChange, onBlur, id, label, unit, disabled, min, max, inputRef, errorString, className, direction, isMinField, integer }: IRangeField) => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ const textInput_1 = require("../../textInput/textInput");
7
7
  const classNames_1 = require("../../commonHelpers/classNames/classNames");
8
8
  const iconException_1 = require("../../icons/iconException");
9
9
  const useMobileClassName_1 = require("../../utils/theme/useMobileClassName");
10
- const RangeField = ({ value, onChange, onBlur, id, label, unit, disabled, min, max, inputRef, errorString, className, direction, isMinField }) => {
10
+ const RangeField = ({ value, onChange, onBlur, id, label, unit, disabled, min, max, inputRef, errorString, className, direction, isMinField, integer }) => {
11
11
  const inputId = (0, react_1.useId)();
12
12
  const labelId = (0, react_1.useId)();
13
13
  const unitId = (0, react_1.useId)();
@@ -15,7 +15,8 @@ const RangeField = ({ value, onChange, onBlur, id, label, unit, disabled, min, m
15
15
  const mobileSenseClass = (0, useMobileClassName_1.useMobileClassName)("zen-range-field__sense");
16
16
  const mobileInputClass = (0, useMobileClassName_1.useMobileClassName)("zen-range-field__input");
17
17
  const handleChange = e => {
18
- const newValue = e.target.value ? Number(e.target.value) : null;
18
+ const rawValue = e.target.value ? Number(e.target.value) : null;
19
+ const newValue = integer && rawValue !== null ? Math.trunc(rawValue) : rawValue;
19
20
  onChange(id, newValue);
20
21
  };
21
22
  return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classNames_1.classNames)([
@@ -23,6 +24,6 @@ const RangeField = ({ value, onChange, onBlur, id, label, unit, disabled, min, m
23
24
  direction === "row" ? "zen-range-field--row" : "zen-range-field--column",
24
25
  isMinField ? "zen-range-field--min" : "zen-range-field--max",
25
26
  className || ""
26
- ]), children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-range-field__content", children: [(0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-range-field__label", "zen-ellipsis", mobileLabelClass || ""]), id: labelId, htmlFor: inputId, children: label }), (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__input-container", children: (0, jsx_runtime_1.jsx)(textInput_1.TextInput, { inputClassName: (0, classNames_1.classNames)(["zen-range-field__input", mobileInputClass || "", errorString ? "zen-text-input--error" : ""]), value: value !== null ? value.toString() : "", placeholder: "", onChange: handleChange, onBlur: onBlur, disabled: disabled, type: "number", ref: inputRef, id: inputId, error: "", ariaLabelledby: `${labelId} ${unit ? unitId : ""}`, min: min, max: max }) }), unit ? ((0, jsx_runtime_1.jsx)("div", { id: unitId, className: (0, classNames_1.classNames)(["zen-range-field__sense", "zen-ellipsis", mobileSenseClass || ""]), children: (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__sense-text zen-ellipsis", children: unit }) })) : null] }), errorString && direction !== "row" ? ((0, jsx_runtime_1.jsxs)("div", { className: "zen-range-field__error", children: [(0, jsx_runtime_1.jsx)(iconException_1.IconException, { className: "zen-range-field__error-icon", size: "bigger" }), (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__error-text", children: errorString })] })) : null] }));
27
+ ]), children: [(0, jsx_runtime_1.jsxs)("div", { className: "zen-range-field__content", children: [(0, jsx_runtime_1.jsx)("label", { className: (0, classNames_1.classNames)(["zen-range-field__label", "zen-ellipsis", mobileLabelClass || ""]), id: labelId, htmlFor: inputId, children: label }), (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__input-container", children: (0, jsx_runtime_1.jsx)(textInput_1.TextInput, { inputClassName: (0, classNames_1.classNames)(["zen-range-field__input", mobileInputClass || "", errorString ? "zen-text-input--error" : ""]), value: value !== null ? value.toString() : "", placeholder: "", onChange: handleChange, onBlur: onBlur, disabled: disabled, type: "number", ref: inputRef, id: inputId, error: "", ariaLabelledby: `${labelId} ${unit ? unitId : ""}`, min: min, max: max, step: integer ? 1 : undefined }) }), unit ? ((0, jsx_runtime_1.jsx)("div", { id: unitId, className: (0, classNames_1.classNames)(["zen-range-field__sense", "zen-ellipsis", mobileSenseClass || ""]), children: (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__sense-text zen-ellipsis", children: unit }) })) : null] }), errorString && direction !== "row" ? ((0, jsx_runtime_1.jsxs)("div", { className: "zen-range-field__error", children: [(0, jsx_runtime_1.jsx)(iconException_1.IconException, { className: "zen-range-field__error-icon", size: "bigger" }), (0, jsx_runtime_1.jsx)("div", { className: "zen-range-field__error-text", children: errorString })] })) : null] }));
27
28
  };
28
29
  exports.RangeField = RangeField;
@@ -281,7 +281,8 @@ const RangeRaw = props => {
281
281
  chip,
282
282
  chipIcon,
283
283
  chipId,
284
- chipName
284
+ chipName,
285
+ integer
285
286
  } = props;
286
287
  const labelLocal = label && !title ? label : title;
287
288
  const accessibilityProps = (0, getAriaAttributes_1.getAriaAttributes)(props);
@@ -432,8 +433,9 @@ const RangeRaw = props => {
432
433
  max: max,
433
434
  min: min,
434
435
  isMinField: true,
435
- direction: directionState
436
- }), [labelMin, translate, unit, currentValue.min, errorType, min, max, handleChange, handleBlur, directionState]);
436
+ direction: directionState,
437
+ integer: integer
438
+ }), [labelMin, translate, unit, currentValue.min, errorType, min, max, handleChange, handleBlur, directionState, integer]);
437
439
  const memoizedMaxRangeField = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsx)(rangeField_1.RangeField, {
438
440
  className: "zen-range__max-field",
439
441
  label: labelMax || translate("Max"),
@@ -447,8 +449,9 @@ const RangeRaw = props => {
447
449
  max: max,
448
450
  min: min,
449
451
  isMinField: false,
450
- direction: directionState
451
- }), [max, min, labelMax, handleChange, handleBlur, currentValue.max, translate, unit, errorType, directionState]);
452
+ direction: directionState,
453
+ integer: integer
454
+ }), [max, min, labelMax, handleChange, handleBlur, currentValue.max, translate, unit, errorType, directionState, integer]);
452
455
  const selection = (0, react_1.useMemo)(() => getSelection(), [getSelection]);
453
456
  const memoizedContent = (0, react_1.useMemo)(() => (0, jsx_runtime_1.jsxs)("div", {
454
457
  className: "zen-range__fields-wrapper",
@@ -20,6 +20,7 @@ export interface IRangeRawBase extends IZenComponentProps, IChipsParent {
20
20
  allowEqualMinMax?: boolean;
21
21
  error?: string;
22
22
  triggerAriaLabel?: string;
23
+ integer?: boolean;
23
24
  }
24
25
  export interface IRangeRawDefault extends IRangeRawBase {
25
26
  onChange: (values: IRangeValuesRaw) => void;
@@ -18,12 +18,13 @@ const useMobile_1 = require("../commonHelpers/hooks/useMobile");
18
18
  const isAlertTarget_1 = require("../alert/utils/isAlertTarget");
19
19
  const isToastTarget_1 = require("../toast/utils/isToastTarget");
20
20
  const isModalTarget_1 = require("../modal/utils/isModalTarget");
21
- const isBannerTarget_1 = require("../banner/utils/isBannerTarget");
22
21
  const useClientReady_1 = require("../commonHelpers/hooks/useClientReady");
23
22
  const zen_1 = require("../utils/zen");
24
23
  const usePortal_1 = require("../commonHelpers/hooks/usePortal");
25
24
  /* eslint-enable @typescript-eslint/naming-convention */
26
- const OVERLAY_TARGET_CHECKS = [isAlertTarget_1.isAlertTarget, isToastTarget_1.isToastTarget, isModalTarget_1.isModalTarget, isBannerTarget_1.isBannerTarget];
25
+ // Banner is an inline/static element, not a floating overlay — clicks on it should close the panel.
26
+ // Only Modal, Toast and Alert are floating overlays that should suppress click-outside close.
27
+ const OVERLAY_TARGET_CHECKS = [isAlertTarget_1.isAlertTarget, isToastTarget_1.isToastTarget, isModalTarget_1.isModalTarget];
27
28
  const isChildPopup = (target, stopElement) => {
28
29
  var _a;
29
30
  const parentPopup = (0, getParentByClass_1.getParentByClass)(target, "zen-absolute");
@@ -5,6 +5,19 @@ export declare enum SelectionState {
5
5
  None = "none"
6
6
  }
7
7
  export interface ISelectionValue {
8
+ /**
9
+ * Whether every selectable row across every page is selected.
10
+ */
8
11
  all: boolean;
12
+ /**
13
+ * The meaning of this list depends on `all`:
14
+ * - when `all` is `false`, it is the ids explicitly *included* in the selection.
15
+ * - when `all` is `true`, it is the ids explicitly *excluded* from the otherwise
16
+ * fully-selected set (e.g. rows unchecked after a "select all" across paginated data).
17
+ *
18
+ * This lets `all: true` represent "all except these ids" without needing to know the
19
+ * full id universe (MYG-142234) - unchecking a row while `all` is true only ever adds
20
+ * to this exclusion list; it must never be rebuilt from the currently rendered page.
21
+ */
9
22
  selected: string[];
10
23
  }
@@ -142,19 +142,30 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
142
142
  }
143
143
  }, [checkboxDisabled, checkboxVisible, entities, selectable, setSelectMode, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
144
144
  const getNewSelection = (0, react_1.useCallback)((id, checked) => {
145
- if (state === interfaces_1.SelectionState.All) {
146
- const newSelection = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
147
- (0, checkRow_1.checkRow)(newSelection, selectable, entities, id, false);
148
- return newSelection;
145
+ var _a;
146
+ if ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) {
147
+ // MYG-142234: `selections` holds the ids excluded from the "all" selection.
148
+ // Toggling a row here must only ever add/remove that single id from the
149
+ // exclusion set - it must never be rebuilt from `entities` (the current page),
150
+ // otherwise every other page's rows would silently fall out of the selection.
151
+ const excluded = new Set(selections);
152
+ (0, checkRow_1.checkRow)(excluded, selectable, entities, id, !checked);
153
+ return excluded;
149
154
  }
150
155
  (0, checkRow_1.checkRow)(selections, selectable, entities, id, checked);
151
156
  return selections;
152
- }, [state, entities, selectable, selections]);
157
+ }, [entities, selectable, selections]);
153
158
  const onSelectListener = (0, react_1.useCallback)((id, checked) => {
154
159
  var _a;
160
+ const wasAllSelected = ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) || false;
155
161
  const newSelection = getNewSelection(id, checked);
156
- const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newSelection, ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) || false, checkboxVisible, checkboxDisabled, selectable === null || selectable === void 0 ? void 0 : selectable.strategy);
157
- const newValue = {
162
+ const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newSelection, wasAllSelected, checkboxVisible, checkboxDisabled, selectable === null || selectable === void 0 ? void 0 : selectable.strategy);
163
+ // MYG-142234: once selection spans "all" pages, unchecking a row must keep `all: true`
164
+ // and only record the exclusion - it must not collapse to the current page's ids.
165
+ const newValue = wasAllSelected ? {
166
+ selected: [...newSelection],
167
+ all: true
168
+ } : {
158
169
  selected: [...newSelection],
159
170
  all: newState === interfaces_1.SelectionState.All
160
171
  };
@@ -163,7 +174,7 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
163
174
  setSelectMode(newValue.all || newValue.selected.length > 0);
164
175
  }, [checkboxDisabled, checkboxVisible, entities, selectable, setSelectMode, setState, getNewSelection]);
165
176
  const onChangeSelectionState = (0, react_1.useCallback)(newState => {
166
- var _a, _b;
177
+ var _a, _b, _c;
167
178
  if (newState === interfaces_1.SelectionState.All) {
168
179
  (selectable === null || selectable === void 0 ? void 0 : selectable.onSelect) && selectable.onSelect({
169
180
  selected: [],
@@ -182,7 +193,11 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
182
193
  }
183
194
  const newSelections = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
184
195
  setState(newState);
185
- const previousSelections = (_b = (_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : [];
196
+ // MYG-142234: previous `selected` ids mean something different depending on `all` -
197
+ // included ids when `all` is false, excluded ids when `all` is true. Switching to an
198
+ // explicit "select current page" here always leaves `all: false`, so a previous
199
+ // exclusion list must not be reinterpreted as an inclusion list.
200
+ const previousSelections = ((_a = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _a === void 0 ? void 0 : _a.all) ? [] : (_c = (_b = selectable === null || selectable === void 0 ? void 0 : selectable.selection) === null || _b === void 0 ? void 0 : _b.selected) !== null && _c !== void 0 ? _c : [];
186
201
  const mergedSelections = new Set([...previousSelections, ...newSelections]);
187
202
  const newValue = {
188
203
  selected: [...mergedSelections],
@@ -201,7 +216,12 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
201
216
  }
202
217
  return translate("Deselect all");
203
218
  }, [selectable, selectableState, state, translate]);
204
- const isEntityChecked = (0, react_1.useCallback)((entity, isNested) => (0, isRowChecked_1.isRowChecked)(selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy, entity, isNested), [selections, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
219
+ const isEntityChecked = (0, react_1.useCallback)(
220
+ // MYG-142234: while `selection.all` is true, `selections` holds excluded ids, and every
221
+ // row must be evaluated through the SelectionState.All (exclusion-aware) branch of
222
+ // isRowChecked - not the per-page `state`, which can be Partial/None for a page that
223
+ // contains some of those exclusions.
224
+ (entity, isNested) => (0, isRowChecked_1.isRowChecked)(selections, isAllSelected ? interfaces_1.SelectionState.All : state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy, entity, isNested), [selections, isAllSelected, state, selectable === null || selectable === void 0 ? void 0 : selectable.strategy]);
205
225
  const hasSelectable = !!selectable;
206
226
  const selectableCheckboxSelectsCurrentPage = selectable === null || selectable === void 0 ? void 0 : selectable.checkboxSelectsCurrentPage;
207
227
  const selectableTurnOffSelectAll = selectable === null || selectable === void 0 ? void 0 : selectable.turnOffSelectAll;
@@ -253,16 +273,30 @@ const useSelectableRows = (columns, entities, isMobile, selectMode, setSelectMod
253
273
  checked: state === interfaces_1.SelectionState.CurrentPage || state === interfaces_1.SelectionState.All,
254
274
  indeterminate: state === interfaces_1.SelectionState.Partial,
255
275
  onChange: newValue => {
256
- var _a, _b;
276
+ var _a, _b, _c;
257
277
  if (newValue) {
258
278
  const newState = checkboxEmitsCurrentPage ? interfaces_1.SelectionState.CurrentPage : interfaces_1.SelectionState.All;
259
279
  setState(newState);
260
280
  onChangeSelectionState(newState);
281
+ } else if ((_a = selectable.selection) === null || _a === void 0 ? void 0 : _a.all) {
282
+ // MYG-142234: in exclusion mode, `selected` holds excluded ids. Unchecking
283
+ // the header must add the current page's ids to that exclusion set and
284
+ // keep `all: true` - it must never be treated as an inclusion list, or
285
+ // every other page's selection would be silently wiped out.
286
+ const currentPageIds = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
287
+ const newExcluded = new Set([...selectable.selection.selected, ...currentPageIds]);
288
+ const newState = (0, calculateSelectionState_1.calculateSelectionState)(entities, newExcluded, true, checkboxVisible, checkboxDisabled, selectable.strategy);
289
+ setState(newState);
290
+ selectable.onSelect({
291
+ selected: [...newExcluded],
292
+ all: true
293
+ });
294
+ setSelectMode(true);
261
295
  } else {
262
296
  // Intentionally different from onSelect(None) ("Deselect all" menu item, which clears everything).
263
297
  // Unchecking the header checkbox only removes the current page from the selection, preserving other pages.
264
298
  const currentPageIds = (0, getCurrentPageSelection_1.getCurrentPageSelection)(entities, selectable);
265
- const remaining = ((_b = (_a = selectable.selection) === null || _a === void 0 ? void 0 : _a.selected) !== null && _b !== void 0 ? _b : []).filter(id => !currentPageIds.has(id));
299
+ const remaining = ((_c = (_b = selectable.selection) === null || _b === void 0 ? void 0 : _b.selected) !== null && _c !== void 0 ? _c : []).filter(id => !currentPageIds.has(id));
266
300
  const newState = remaining.length > 0 ? interfaces_1.SelectionState.Partial : interfaces_1.SelectionState.None;
267
301
  setState(newState);
268
302
  selectable.onSelect({
@@ -6,6 +6,41 @@ const calculateSelectionState = (entities, selections, all, checkboxVisible, che
6
6
  if (selections.size === 0) {
7
7
  return all ? interfaces_1.SelectionState.All : interfaces_1.SelectionState.None;
8
8
  }
9
+ if (all) {
10
+ // When `all` is true, `selections` holds the ids explicitly excluded from the
11
+ // otherwise-fully-selected set (see ISelectionValue), rather than included ids.
12
+ const isExcluded = (entity) => {
13
+ if (strategy === "nested" && entity.children) {
14
+ if (entity.children.length === 0) {
15
+ return false;
16
+ }
17
+ return entity.children.every(child => {
18
+ if (!checkboxVisible(child)) {
19
+ return true;
20
+ }
21
+ if (checkboxDisabled(child)) {
22
+ return true;
23
+ }
24
+ return selections.has(child.id);
25
+ });
26
+ }
27
+ return selections.has(entity.id);
28
+ };
29
+ const isPartiallyExcluded = (entity) => {
30
+ if (strategy === "nested" && entity.children) {
31
+ return entity.children.some(child => selections.has(child.id));
32
+ }
33
+ return selections.has(entity.id);
34
+ };
35
+ const relevantEntities = entities.filter(entity => checkboxVisible(entity) && !checkboxDisabled(entity));
36
+ if (relevantEntities.length === 0) {
37
+ return interfaces_1.SelectionState.All;
38
+ }
39
+ if (relevantEntities.every(entity => !isPartiallyExcluded(entity))) {
40
+ return interfaces_1.SelectionState.All;
41
+ }
42
+ return relevantEntities.every(entity => isExcluded(entity)) ? interfaces_1.SelectionState.None : interfaces_1.SelectionState.Partial;
43
+ }
9
44
  return entities.every(entity => {
10
45
  if (!checkboxVisible(entity)) {
11
46
  return true;
@@ -4,7 +4,18 @@ exports.isRowChecked = void 0;
4
4
  const interfaces_1 = require("../interfaces");
5
5
  const isRowChecked = (selections, state, strategy, entity, isNested) => {
6
6
  if (state === interfaces_1.SelectionState.All) {
7
- return { indeterminate: false, checked: true };
7
+ // When the overall selection is "all", `selections` holds the ids that have been
8
+ // explicitly excluded from that selection (see ISelectionValue), not included ids.
9
+ if (isNested) {
10
+ return { indeterminate: false, checked: !selections.has(entity.id) };
11
+ }
12
+ const mainEntity = entity;
13
+ if (strategy === "nested" && mainEntity.children && mainEntity.children.length > 0) {
14
+ const allChildrenChecked = mainEntity.children.every(child => !selections.has(child.id));
15
+ const someChildrenChecked = mainEntity.children.some(child => !selections.has(child.id));
16
+ return { indeterminate: someChildrenChecked && !allChildrenChecked, checked: allChildrenChecked };
17
+ }
18
+ return { indeterminate: false, checked: !selections.has(entity.id) };
8
19
  }
9
20
  if (isNested) {
10
21
  return { indeterminate: false, checked: selections.has(entity.id) };
@@ -25,6 +25,7 @@ import { IRowEntity } from "../dataGrid/row/row";
25
25
  import { IEntityWithId } from "../commonHelpers/entity";
26
26
  import "../cardContainer/cardContainer.less";
27
27
  import { ITableDetailPanel } from "./children/tableDetailPanel";
28
+ import { ITrendIndicator } from "../trendIndicator/trendIndicator";
28
29
  export interface IListColumn<T extends IRowEntity<N>, N extends IEntityWithId = T> {
29
30
  readonly id: string;
30
31
  readonly title: string;
@@ -92,6 +93,7 @@ interface ITableComponents {
92
93
  BulkButton: React.FC<IBulkActionButton>;
93
94
  BulkLink: React.FC<IBulkActionLink>;
94
95
  DetailPanel: React.FC<ITableDetailPanel>;
96
+ TrendIndicator: React.FC<ITrendIndicator>;
95
97
  }
96
98
  declare const TableInner: <T extends IRowEntity<N>, N extends IEntityWithId = T>({ entities, columns, selectable, sortable, flexible, isLoading, loading, children, className, height, onFeedEnd, onScrollEnd, rowClassName, feedExpandable, expandedRows, onExpand, active, onClick }: ITable<T, N>) => import("react/jsx-runtime").JSX.Element;
97
99
  declare const Table: typeof TableInner & ITableComponents;
@@ -204,6 +204,7 @@ const feedExpandControl_1 = require("../dataFeed/feedExpandControl/feedExpandCon
204
204
  const getGridClasses_1 = require("../gridLayout/utils/getGridClasses");
205
205
  const useNestedRows_1 = require("./nested/useNestedRows");
206
206
  const tableDetailPanel_1 = require("./children/tableDetailPanel");
207
+ const trendIndicator_1 = require("../trendIndicator/trendIndicator");
207
208
  const useLanguage_1 = require("../utils/localization/useLanguage");
208
209
  // Interpolation placeholder used in the "{count} more rows loaded" translation key.
209
210
  // `translate()` has no interpolation overload, so the count is substituted at runtime via
@@ -452,4 +453,5 @@ Table.Pagination = tablePagination_1.TablePagination;
452
453
  Table.Fullscreen = tableFullscreen_1.TableFullscreen;
453
454
  Table.BulkButton = bulkActionButton_1.BulkActionButton;
454
455
  Table.BulkLink = bulkActionLink_1.BulkActionLink;
455
- Table.DetailPanel = tableDetailPanel_1.TableDetailPanel;
456
+ Table.DetailPanel = tableDetailPanel_1.TableDetailPanel;
457
+ Table.TrendIndicator = trendIndicator_1.TrendIndicator;
package/dist/tabs/tabs.js CHANGED
@@ -85,6 +85,7 @@ const iconChevronLeft_1 = require("../icons/iconChevronLeft");
85
85
  const useDirectionalIcon_1 = require("../utils/localization/useDirectionalIcon");
86
86
  const textIconButton_1 = require("../textIconButton/textIconButton");
87
87
  const tabsKeyboard_1 = require("../commonHelpers/tabsKeyboard");
88
+ const arrowNavigationHelper_1 = require("../commonHelpers/arrowNavigation/arrowNavigationHelper");
88
89
  const useMobileClassName_1 = require("../utils/theme/useMobileClassName");
89
90
  require("../utils/globalThisPolyfill");
90
91
  const zen_1 = require("../utils/zen");
@@ -97,13 +98,15 @@ const getScrollButtonType = (element, isRTL) => {
97
98
  return "";
98
99
  }
99
100
  if (isRTL) {
101
+ // scrollLeft is 0 at the start (right edge) and negative toward the end (left edge),
102
+ // so the button to offer is the mirror of the LTR case below.
100
103
  if (scrollLeft < -1 && scrollLeft > clientWidth - scrollWidth + 1) {
101
104
  return "both";
102
105
  }
103
106
  if (scrollLeft >= -1) {
104
- return "start";
107
+ return "end";
105
108
  }
106
- return "end";
109
+ return "start";
107
110
  }
108
111
  if (scrollLeft > 0 && scrollWidth > clientWidth + scrollLeft + 1) {
109
112
  return "both";
@@ -137,6 +140,7 @@ const Tabs = ({
137
140
  const scrollableRef = (0, react_1.useRef)(null);
138
141
  const scrollRef = (0, react_1.useRef)(0);
139
142
  const focusableTabIdRef = (0, react_1.useRef)("");
143
+ const userInitiatedTabChangeRef = (0, react_1.useRef)(false);
140
144
  const handleButtonClick = e => {
141
145
  if (disabled) {
142
146
  return;
@@ -144,6 +148,7 @@ const Tabs = ({
144
148
  const newState = e.currentTarget.id;
145
149
  focusableTabIdRef.current = newState;
146
150
  if (newState !== activeTabId) {
151
+ userInitiatedTabChangeRef.current = true;
147
152
  onTabChange(newState);
148
153
  }
149
154
  };
@@ -160,6 +165,7 @@ const Tabs = ({
160
165
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
161
166
  if (target && target.id && tabs.some(tab => tab.id === target.id)) {
162
167
  focusableTabIdRef.current = target.id;
168
+ userInitiatedTabChangeRef.current = true;
163
169
  onTabChange(target.id);
164
170
  }
165
171
  return;
@@ -241,7 +247,10 @@ const Tabs = ({
241
247
  const activeTab = scrollableRef.current.querySelector(`.zen-tab-item[id='${activeTabId}']`);
242
248
  if (activeTab instanceof HTMLElement) {
243
249
  focusableTabIdRef.current = activeTab.getAttribute("id") || "";
244
- // activeTab.focus();
250
+ if (userInitiatedTabChangeRef.current) {
251
+ userInitiatedTabChangeRef.current = false;
252
+ activeTab.focus();
253
+ }
245
254
  }
246
255
  }, [activeTabId]);
247
256
  return (0, jsx_runtime_1.jsx)("div", {
@@ -257,7 +266,7 @@ const Tabs = ({
257
266
  icon: ScrollStartIcon,
258
267
  type: "tertiary",
259
268
  iconPosition: textIconButton_1.ButtonIconPosition.Start,
260
- onClick: handleScrollButtonClick(scrollableRef.current, -scrollableStep),
269
+ onClick: handleScrollButtonClick(scrollableRef.current, (0, arrowNavigationHelper_1.getDirectionalScrollDelta)(-scrollableStep, isRTL)),
261
270
  iconClasses: "zen-tabs__start-icon"
262
271
  })]
263
272
  }) : null, (0, jsx_runtime_1.jsx)("div", {
@@ -290,7 +299,7 @@ const Tabs = ({
290
299
  className: (0, classNames_1.classNames)(["zen-tabs__scroller", driveClassNameScroller || mobileClassNameScroller || "", "zen-tabs__end"]),
291
300
  icon: ScrollEndIcon,
292
301
  type: "tertiary",
293
- onClick: handleScrollButtonClick(scrollableRef.current, scrollableStep),
302
+ onClick: handleScrollButtonClick(scrollableRef.current, (0, arrowNavigationHelper_1.getDirectionalScrollDelta)(scrollableStep, isRTL)),
294
303
  iconPosition: textIconButton_1.ButtonIconPosition.End
295
304
  })]
296
305
  }) : null]
@@ -21,7 +21,7 @@ const TextInputRaw = (props) => {
21
21
  props.isError ? "zen-text-input--error" : ""
22
22
  ]), value: maxLength ? value.substring(0, maxLength) : value, placeholder: props.placeholder, disabled: disabled, onChange: onChange, onKeyDown: props.onKeyDown, onBlur: onBlur, maxLength: maxLength, autoComplete: props.autocomplete,
23
23
  // TODO: add tests
24
- min: min, max: max, "aria-labelledby": props.ariaLabelledby, "aria-label": props.ariaLabel, autoFocus: props.autoFocus, required: !!required, onFocus: props.onFocus, minLength: minLength, name: name, pattern: pattern, role: props.role, "aria-expanded": props.ariaExpanded === undefined ? undefined : props.ariaExpanded === "true" || props.ariaExpanded === true, "aria-haspopup": props.ariaHaspopup, "aria-controls": props.ariaControls, "aria-autocomplete": props.ariaAutocomplete, "aria-describedby": props.ariaDescribedby }));
24
+ min: min, max: max, step: props.step, "aria-labelledby": props.ariaLabelledby, "aria-label": props.ariaLabel, autoFocus: props.autoFocus, required: !!required, onFocus: props.onFocus, minLength: minLength, name: name, pattern: pattern, role: props.role, "aria-expanded": props.ariaExpanded === undefined ? undefined : props.ariaExpanded === "true" || props.ariaExpanded === true, "aria-haspopup": props.ariaHaspopup, "aria-controls": props.ariaControls, "aria-autocomplete": props.ariaAutocomplete, "aria-describedby": props.ariaDescribedby }));
25
25
  };
26
26
  exports.TextInputRaw = TextInputRaw;
27
27
  exports.TextInputRaw.displayName = "TextInputRaw";
@@ -31,6 +31,7 @@ export interface ITextInputDefaultRaw extends IZenComponentProps, ITextInputRawB
31
31
  onBlur?: React.FocusEventHandler<HTMLInputElement>;
32
32
  min?: number;
33
33
  max?: number;
34
+ step?: number | "any";
34
35
  minLength?: number;
35
36
  maxLength?: number;
36
37
  pattern?: RegExp;