@linzjs/step-ag-grid 23.0.1 → 24.0.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 (274) hide show
  1. package/dist/src/components/ComponentLoadingWrapper.d.ts +1 -1
  2. package/dist/src/components/Grid.d.ts +17 -17
  3. package/dist/src/components/GridCell.d.ts +9 -9
  4. package/dist/src/components/GridCellFiller.d.ts +2 -2
  5. package/dist/src/components/GridCellMultiEditor.d.ts +6 -6
  6. package/dist/src/components/GridCellMultiSelectClassRules.d.ts +1 -1
  7. package/dist/src/components/GridIcon.d.ts +2 -2
  8. package/dist/src/components/GridNoRowsOverlay.d.ts +1 -1
  9. package/dist/src/components/GridPopoverHook.d.ts +2 -2
  10. package/dist/src/components/GridWrapper.d.ts +1 -1
  11. package/dist/src/components/PostSortRowsHook.d.ts +1 -1
  12. package/dist/src/components/clickInputWhenContainingCellClicked.d.ts +1 -1
  13. package/dist/src/components/gridFilter/GridFilterButtons.d.ts +5 -5
  14. package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +1 -1
  15. package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +1 -1
  16. package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +2 -2
  17. package/dist/src/components/gridFilter/GridFilters.d.ts +1 -1
  18. package/dist/src/components/gridFilter/index.d.ts +7 -7
  19. package/dist/src/components/gridFilter/useGridFilter.d.ts +2 -2
  20. package/dist/src/components/gridForm/GridFormDropDown.d.ts +8 -8
  21. package/dist/src/components/gridForm/GridFormEditBearing.d.ts +2 -2
  22. package/dist/src/components/gridForm/GridFormMessage.d.ts +3 -3
  23. package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +4 -4
  24. package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +4 -4
  25. package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +5 -5
  26. package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +4 -4
  27. package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +4 -4
  28. package/dist/src/components/gridForm/GridFormTextArea.d.ts +4 -4
  29. package/dist/src/components/gridForm/GridFormTextInput.d.ts +3 -3
  30. package/dist/src/components/gridForm/index.d.ts +10 -10
  31. package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +1 -1
  32. package/dist/src/components/gridHeader/index.d.ts +1 -1
  33. package/dist/src/components/gridHook/index.d.ts +1 -1
  34. package/dist/src/components/gridHook/useGridContextMenu.d.ts +4 -4
  35. package/dist/src/components/gridPopoverEdit/GridButton.d.ts +5 -5
  36. package/dist/src/components/gridPopoverEdit/GridEditBoolean.d.ts +4 -4
  37. package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +4 -4
  38. package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +4 -4
  39. package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +4 -4
  40. package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +4 -4
  41. package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +4 -4
  42. package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +4 -4
  43. package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +4 -4
  44. package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +4 -4
  45. package/dist/src/components/gridPopoverEdit/index.d.ts +11 -11
  46. package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +5 -5
  47. package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +1 -1
  48. package/dist/src/components/gridRender/index.d.ts +2 -2
  49. package/dist/src/components/gridUtil.d.ts +1 -1
  50. package/dist/src/components/index.d.ts +19 -19
  51. package/dist/src/contexts/GridContext.d.ts +4 -4
  52. package/dist/src/contexts/GridContextProvider.d.ts +3 -3
  53. package/dist/src/contexts/GridPopoverContext.d.ts +3 -3
  54. package/dist/src/contexts/GridPopoverContextProvider.d.ts +4 -4
  55. package/dist/src/contexts/GridUpdatingContextProvider.d.ts +1 -1
  56. package/dist/src/index.d.ts +17 -17
  57. package/dist/src/lui/ActionButton.d.ts +9 -9
  58. package/dist/src/lui/FormError.d.ts +2 -2
  59. package/dist/src/lui/TextAreaInput.d.ts +1 -1
  60. package/dist/src/lui/TextInputFormatted.d.ts +2 -2
  61. package/dist/src/lui/reactUtils.d.ts +1 -1
  62. package/dist/src/lui/stateDeferredHook.d.ts +1 -1
  63. package/dist/src/react-menu3/components/ControlledMenu.d.ts +2 -2
  64. package/dist/src/react-menu3/components/FocusableItem.d.ts +3 -3
  65. package/dist/src/react-menu3/components/Menu.d.ts +3 -3
  66. package/dist/src/react-menu3/components/MenuButton.d.ts +2 -2
  67. package/dist/src/react-menu3/components/MenuDivider.d.ts +1 -1
  68. package/dist/src/react-menu3/components/MenuGroup.d.ts +2 -2
  69. package/dist/src/react-menu3/components/MenuHeader.d.ts +2 -2
  70. package/dist/src/react-menu3/components/MenuItem.d.ts +3 -3
  71. package/dist/src/react-menu3/components/MenuList.d.ts +1 -1
  72. package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
  73. package/dist/src/react-menu3/components/SubMenu.d.ts +5 -5
  74. package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +1 -1
  75. package/dist/src/react-menu3/contexts/MenuListContext.d.ts +2 -2
  76. package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +1 -1
  77. package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +1 -1
  78. package/dist/src/react-menu3/contexts/SettingsContext.d.ts +2 -2
  79. package/dist/src/react-menu3/hooks/index.d.ts +9 -9
  80. package/dist/src/react-menu3/hooks/useBEM.d.ts +1 -1
  81. package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +1 -1
  82. package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +1 -1
  83. package/dist/src/react-menu3/hooks/useItemEffect.d.ts +1 -1
  84. package/dist/src/react-menu3/hooks/useItemState.d.ts +1 -1
  85. package/dist/src/react-menu3/hooks/useItems.d.ts +2 -2
  86. package/dist/src/react-menu3/hooks/useMenuChange.d.ts +1 -1
  87. package/dist/src/react-menu3/hooks/useMenuState.d.ts +1 -1
  88. package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +1 -1
  89. package/dist/src/react-menu3/index.d.ts +11 -11
  90. package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +1 -1
  91. package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
  92. package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +1 -1
  93. package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +1 -1
  94. package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +4 -4
  95. package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +5 -5
  96. package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +2 -2
  97. package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +5 -5
  98. package/dist/src/react-menu3/style-utils/index.d.ts +1 -1
  99. package/dist/src/react-menu3/types.d.ts +15 -15
  100. package/dist/src/react-menu3/utils/constants.d.ts +1 -1
  101. package/dist/src/react-menu3/utils/index.d.ts +3 -3
  102. package/dist/src/react-menu3/utils/utils.d.ts +5 -5
  103. package/dist/src/react-menu3/utils/withHovering.d.ts +1 -1
  104. package/dist/src/utils/testQuick.d.ts +2 -2
  105. package/dist/src/utils/testUtil.d.ts +2 -2
  106. package/dist/src/utils/textValidator.d.ts +2 -2
  107. package/dist/step-ag-grid.cjs.js +966 -952
  108. package/dist/step-ag-grid.cjs.js.map +1 -1
  109. package/dist/step-ag-grid.esm.js +968 -954
  110. package/dist/step-ag-grid.esm.js.map +1 -1
  111. package/package.json +26 -41
  112. package/src/components/ComponentLoadingWrapper.tsx +5 -6
  113. package/src/components/Grid.tsx +85 -83
  114. package/src/components/GridCell.test.tsx +15 -15
  115. package/src/components/GridCell.tsx +46 -44
  116. package/src/components/GridCellFiller.tsx +5 -4
  117. package/src/components/GridCellMultiEditor.tsx +7 -7
  118. package/src/components/GridCellMultiSelectClassRules.tsx +3 -3
  119. package/src/components/GridIcon.tsx +6 -7
  120. package/src/components/GridLoadableCell.tsx +2 -2
  121. package/src/components/GridNoRowsOverlay.tsx +8 -8
  122. package/src/components/GridPopoverHook.tsx +16 -16
  123. package/src/components/GridWrapper.tsx +2 -2
  124. package/src/components/PostSortRowsHook.ts +11 -11
  125. package/src/components/clickInputWhenContainingCellClicked.tsx +5 -5
  126. package/src/components/gridFilter/GridFilterButtons.tsx +8 -9
  127. package/src/components/gridFilter/GridFilterColumnsToggle.tsx +25 -26
  128. package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +12 -13
  129. package/src/components/gridFilter/GridFilterHeaderIconButton.tsx +9 -10
  130. package/src/components/gridFilter/GridFilterQuick.tsx +6 -6
  131. package/src/components/gridFilter/GridFilters.tsx +1 -1
  132. package/src/components/gridFilter/index.ts +7 -7
  133. package/src/components/gridFilter/useGridFilter.ts +3 -3
  134. package/src/components/gridForm/GridFormDropDown.tsx +56 -52
  135. package/src/components/gridForm/GridFormEditBearing.tsx +12 -12
  136. package/src/components/gridForm/GridFormMessage.tsx +10 -10
  137. package/src/components/gridForm/GridFormMultiSelect.tsx +53 -51
  138. package/src/components/gridForm/GridFormMultiSelectGrid.tsx +25 -26
  139. package/src/components/gridForm/GridFormPopoverMenu.tsx +32 -29
  140. package/src/components/gridForm/GridFormSubComponentTextArea.tsx +10 -10
  141. package/src/components/gridForm/GridFormSubComponentTextInput.tsx +8 -8
  142. package/src/components/gridForm/GridFormTextArea.tsx +11 -11
  143. package/src/components/gridForm/GridFormTextInput.tsx +11 -11
  144. package/src/components/gridForm/index.ts +10 -10
  145. package/src/components/gridHeader/GridHeaderSelect.tsx +9 -9
  146. package/src/components/gridHeader/index.ts +1 -1
  147. package/src/components/gridHook/index.ts +1 -1
  148. package/src/components/gridHook/useGridContextMenu.tsx +7 -7
  149. package/src/components/gridPopoverEdit/GridButton.tsx +13 -12
  150. package/src/components/gridPopoverEdit/GridEditBoolean.tsx +19 -18
  151. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +7 -6
  152. package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +7 -6
  153. package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +9 -9
  154. package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +8 -7
  155. package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +6 -6
  156. package/src/components/gridPopoverEdit/GridPopoverMessage.ts +4 -4
  157. package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +4 -4
  158. package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +4 -4
  159. package/src/components/gridPopoverEdit/index.ts +11 -11
  160. package/src/components/gridRender/GridRenderGenericCell.tsx +5 -5
  161. package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +8 -9
  162. package/src/components/gridRender/index.ts +2 -2
  163. package/src/components/gridUtil.ts +3 -3
  164. package/src/components/index.ts +19 -19
  165. package/src/contexts/GridContext.tsx +52 -46
  166. package/src/contexts/GridContextProvider.test.tsx +14 -14
  167. package/src/contexts/GridContextProvider.tsx +42 -41
  168. package/src/contexts/GridPopoverContext.tsx +10 -7
  169. package/src/contexts/GridPopoverContextProvider.tsx +12 -10
  170. package/src/contexts/GridSubComponentContext.ts +6 -5
  171. package/src/contexts/GridUpdatingContext.tsx +5 -4
  172. package/src/contexts/GridUpdatingContextProvider.tsx +3 -3
  173. package/src/index.ts +17 -21
  174. package/src/lui/ActionButton.tsx +42 -41
  175. package/src/lui/FormError.tsx +4 -4
  176. package/src/lui/TextAreaInput.tsx +9 -9
  177. package/src/lui/TextInputFormatted.tsx +11 -11
  178. package/src/lui/reactUtils.test.tsx +8 -8
  179. package/src/lui/reactUtils.tsx +2 -2
  180. package/src/lui/stateDeferredHook.tsx +3 -5
  181. package/src/lui/timeoutHook.test.tsx +5 -5
  182. package/src/lui/timeoutHook.tsx +1 -1
  183. package/src/react-app-env.d.ts +1 -1
  184. package/src/react-menu3/components/ControlledMenu.tsx +48 -48
  185. package/src/react-menu3/components/FocusableItem.tsx +7 -7
  186. package/src/react-menu3/components/Menu.tsx +11 -11
  187. package/src/react-menu3/components/MenuButton.tsx +4 -4
  188. package/src/react-menu3/components/MenuDivider.tsx +4 -4
  189. package/src/react-menu3/components/MenuGroup.tsx +5 -5
  190. package/src/react-menu3/components/MenuHeader.tsx +4 -4
  191. package/src/react-menu3/components/MenuItem.tsx +14 -14
  192. package/src/react-menu3/components/MenuList.tsx +55 -55
  193. package/src/react-menu3/components/MenuRadioGroup.tsx +7 -7
  194. package/src/react-menu3/components/SubMenu.tsx +24 -24
  195. package/src/react-menu3/contexts/EventHandlersContext.ts +2 -2
  196. package/src/react-menu3/contexts/HoverItemContext.ts +1 -1
  197. package/src/react-menu3/contexts/ItemSettingsContext.ts +1 -1
  198. package/src/react-menu3/contexts/MenuListContext.ts +2 -2
  199. package/src/react-menu3/contexts/MenuListItemContext.ts +2 -2
  200. package/src/react-menu3/contexts/RadioGroupContext.ts +2 -2
  201. package/src/react-menu3/contexts/SettingsContext.ts +2 -2
  202. package/src/react-menu3/hooks/index.ts +9 -9
  203. package/src/react-menu3/hooks/useBEM.ts +4 -4
  204. package/src/react-menu3/hooks/useCombinedRef.ts +2 -2
  205. package/src/react-menu3/hooks/useIsomorphicLayoutEffect.ts +4 -4
  206. package/src/react-menu3/hooks/useItemEffect.ts +3 -3
  207. package/src/react-menu3/hooks/useItemState.ts +5 -5
  208. package/src/react-menu3/hooks/useItems.ts +8 -8
  209. package/src/react-menu3/hooks/useMenuChange.ts +3 -3
  210. package/src/react-menu3/hooks/useMenuState.ts +5 -5
  211. package/src/react-menu3/hooks/useMenuStateAndFocus.ts +4 -4
  212. package/src/react-menu3/index.ts +11 -11
  213. package/src/react-menu3/positionUtils/getPositionHelpers.ts +2 -2
  214. package/src/react-menu3/positionUtils/index.ts +3 -3
  215. package/src/react-menu3/positionUtils/placeArrowHorizontal.ts +1 -1
  216. package/src/react-menu3/positionUtils/placeArrowVertical.ts +1 -1
  217. package/src/react-menu3/positionUtils/placeLeftorRight.ts +13 -13
  218. package/src/react-menu3/positionUtils/placeToporBottom.ts +15 -15
  219. package/src/react-menu3/positionUtils/positionContextMenu.ts +4 -4
  220. package/src/react-menu3/positionUtils/positionMenu.ts +14 -14
  221. package/src/react-menu3/style-utils/index.ts +24 -24
  222. package/src/react-menu3/types.ts +15 -15
  223. package/src/react-menu3/utils/constants.ts +33 -33
  224. package/src/react-menu3/utils/index.ts +3 -4
  225. package/src/react-menu3/utils/propTypes2.ts +10 -10
  226. package/src/react-menu3/utils/utils.ts +14 -14
  227. package/src/react-menu3/utils/withHovering.tsx +3 -3
  228. package/src/stories/components/ActionButton.stories.tsx +23 -24
  229. package/src/stories/grid/FormTest.tsx +15 -16
  230. package/src/stories/grid/GridDragRow.stories.tsx +33 -34
  231. package/src/stories/grid/GridFilterButtons.stories.tsx +32 -33
  232. package/src/stories/grid/GridNoRowsOverlay.stories.tsx +9 -10
  233. package/src/stories/grid/GridNonEditableRow.stories.tsx +40 -41
  234. package/src/stories/grid/GridPinnedRow.stories.tsx +25 -26
  235. package/src/stories/grid/GridPopoutContextMenu.stories.tsx +33 -32
  236. package/src/stories/grid/GridPopoutEditBoolean.stories.tsx +21 -22
  237. package/src/stories/grid/GridPopoutEditGeneric.stories.tsx +18 -19
  238. package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +50 -49
  239. package/src/stories/grid/GridPopoverEditBearing.stories.tsx +25 -26
  240. package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +93 -94
  241. package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +62 -63
  242. package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +28 -28
  243. package/src/stories/grid/GridReadOnly.stories.tsx +66 -67
  244. package/src/stories/grid/GridViewList.stories.tsx +37 -38
  245. package/src/stories/grid/gridFormInteraction/GridFormDropDownInteraction.stories.tsx +37 -38
  246. package/src/stories/grid/gridFormInteraction/GridFormEditBearingCorrectionInteraction.stories.tsx +25 -26
  247. package/src/stories/grid/gridFormInteraction/GridFormEditBearingInteraction.stories.tsx +25 -26
  248. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectGridInteraction.stories.tsx +31 -31
  249. package/src/stories/grid/gridFormInteraction/GridFormMultiSelectInteraction.stories.tsx +47 -48
  250. package/src/stories/grid/gridFormInteraction/GridFormPopoverMenuInteraction.stories.tsx +44 -45
  251. package/src/stories/grid/gridFormInteraction/GridFormTextAreaInteraction.stories.tsx +19 -20
  252. package/src/stories/grid/gridFormInteraction/GridFormTextInputInteraction.stories.tsx +21 -22
  253. package/src/stories/grid/gridFormStatic/GridFormDropDown.stories.tsx +40 -41
  254. package/src/stories/grid/gridFormStatic/GridFormEditBearing.stories.tsx +14 -15
  255. package/src/stories/grid/gridFormStatic/GridFormEditBearingCorrection.stories.tsx +14 -15
  256. package/src/stories/grid/gridFormStatic/GridFormMessage.stories.tsx +10 -11
  257. package/src/stories/grid/gridFormStatic/GridFormMultiSelect.stories.tsx +20 -21
  258. package/src/stories/grid/gridFormStatic/GridFormPopoverMenu.stories.tsx +16 -17
  259. package/src/stories/grid/gridFormStatic/GridFormTextArea.stories.tsx +13 -14
  260. package/src/stories/grid/gridFormStatic/GridFormTextInput.stories.tsx +13 -14
  261. package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +68 -71
  262. package/src/stories/react-menu/ReactMenu.stories.tsx +26 -26
  263. package/src/utils/bearing.test.ts +44 -44
  264. package/src/utils/bearing.ts +20 -20
  265. package/src/utils/deferredPromise.ts +1 -1
  266. package/src/utils/storybookTestUtil.ts +2 -2
  267. package/src/utils/testQuick.ts +15 -14
  268. package/src/utils/testUtil.ts +31 -36
  269. package/src/utils/textMatcher.test.ts +9 -9
  270. package/src/utils/textMatcher.ts +8 -8
  271. package/src/utils/textValidator.test.ts +56 -56
  272. package/src/utils/textValidator.ts +11 -11
  273. package/src/utils/util.test.ts +20 -20
  274. package/src/utils/util.ts +7 -7
package/src/index.ts CHANGED
@@ -1,21 +1,17 @@
1
- export * from "./components";
2
-
3
- export * from "./contexts/GridContext";
4
- export * from "./contexts/GridContextProvider";
5
- export * from "./contexts/GridUpdatingContext";
6
- export * from "./contexts/GridUpdatingContextProvider";
7
- export * from "./contexts/GridPopoverContext";
8
- export * from "./contexts/GridPopoverContextProvider";
9
- export * from "./contexts/GridSubComponentContext";
10
-
11
- export * from "./lui/ActionButton";
12
- export * from "./lui/FormError";
13
- export * from "./lui/TextAreaInput";
14
- export * from "./lui/TextInputFormatted";
15
-
16
- export * from "./react-menu3/index";
17
- export * from "./react-menu3/types";
18
-
19
- export * from "./utils/bearing";
20
- export * from "./utils/util";
21
- export * from "./utils/deferredPromise";
1
+ export * from './components';
2
+ export * from './contexts/GridContext';
3
+ export * from './contexts/GridContextProvider';
4
+ export * from './contexts/GridPopoverContext';
5
+ export * from './contexts/GridPopoverContextProvider';
6
+ export * from './contexts/GridSubComponentContext';
7
+ export * from './contexts/GridUpdatingContext';
8
+ export * from './contexts/GridUpdatingContextProvider';
9
+ export * from './lui/ActionButton';
10
+ export * from './lui/FormError';
11
+ export * from './lui/TextAreaInput';
12
+ export * from './lui/TextInputFormatted';
13
+ export * from './react-menu3/index';
14
+ export * from './react-menu3/types';
15
+ export * from './utils/bearing';
16
+ export * from './utils/deferredPromise';
17
+ export * from './utils/util';
@@ -1,27 +1,27 @@
1
- import "./ActionButton.scss";
1
+ import './ActionButton.scss';
2
2
 
3
- import clsx from "clsx";
4
- import { CSSProperties, ReactElement, useEffect, useState } from "react";
3
+ import { LuiButton, LuiIcon, LuiMiniSpinner } from '@linzjs/lui';
4
+ import { LuiButtonProps } from '@linzjs/lui/dist/components/LuiButton/LuiButton';
5
+ import { IconName } from '@linzjs/lui/dist/components/LuiIcon/LuiIcon';
6
+ import clsx from 'clsx';
7
+ import { CSSProperties, ReactElement, useEffect, useState } from 'react';
5
8
 
6
- import { LuiButton, LuiIcon, LuiMiniSpinner } from "@linzjs/lui";
7
- import { LuiButtonProps } from "@linzjs/lui/dist/components/LuiButton/LuiButton";
8
- import { IconName } from "@linzjs/lui/dist/components/LuiIcon/LuiIcon";
9
-
10
- import { usePrevious } from "./reactUtils";
11
- import { useStateDeferred } from "./stateDeferredHook";
9
+ import { usePrevious } from './reactUtils';
10
+ import { useStateDeferred } from './stateDeferredHook';
12
11
 
13
12
  export interface ActionButtonProps {
14
13
  icon: IconName;
15
14
  name?: string;
16
- "aria-label"?: string;
15
+ 'aria-label'?: string;
17
16
  inProgressName?: string;
18
17
  title?: string;
19
18
  dataTestId?: string;
20
- size?: "xs" | "sm" | "md" | "lg" | "xl" | "ns";
21
- iconPosition?: "left" | "right";
22
- className?: "ActionButton-fill" | "ActionButton-tight" | string;
19
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'ns';
20
+ iconPosition?: 'left' | 'right';
21
+ // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
22
+ className?: 'ActionButton-fill' | 'ActionButton-tight' | string;
23
23
  onClick: () => Promise<void> | void;
24
- level?: LuiButtonProps["level"];
24
+ level?: LuiButtonProps['level'];
25
25
  style?: CSSProperties;
26
26
  disabled?: boolean;
27
27
  }
@@ -39,10 +39,10 @@ export const ActionButton = ({
39
39
  className,
40
40
  title,
41
41
  onClick,
42
- size = "sm",
43
- iconPosition = "left",
44
- level = "tertiary",
45
- "aria-label": ariaLabel,
42
+ size = 'sm',
43
+ iconPosition = 'left',
44
+ level = 'tertiary',
45
+ 'aria-label': ariaLabel,
46
46
  }: ActionButtonProps): ReactElement => {
47
47
  const [inProgress, setInProgress] = useState(false);
48
48
  const lastInProgress = usePrevious(inProgress ?? false);
@@ -54,63 +54,64 @@ export const ActionButton = ({
54
54
  }, [inProgress, lastInProgress, setLocalInProgress, setLocalInProgressDeferred]);
55
55
 
56
56
  const buttonText = (
57
- <span className={"ActionButton-minimalArea"}>
58
- <span className={"ActionButton-minimalAreaDisplay"}>{(localInProgress ? inProgressName : name) ?? name}</span>
57
+ <span className={'ActionButton-minimalArea'}>
58
+ <span className={'ActionButton-minimalAreaDisplay'}>{(localInProgress ? inProgressName : name) ?? name}</span>
59
59
  {/* This makes sure the button expands to fill maximum length text at all times */}
60
- <span className={"ActionButton-minimalAreaExpand"}>{name}</span>
60
+ <span className={'ActionButton-minimalAreaExpand'}>{name}</span>
61
61
  </span>
62
62
  );
63
63
 
64
64
  return (
65
65
  <LuiButton
66
66
  data-testid={dataTestId}
67
- type={"button"}
67
+ type={'button'}
68
68
  level={level}
69
69
  title={title ?? ariaLabel ?? name}
70
- buttonProps={{ "aria-label": ariaLabel ?? name }}
70
+ buttonProps={{ 'aria-label': ariaLabel ?? name }}
71
71
  className={clsx(
72
- "lui-button-icon-right",
73
- "ActionButton",
72
+ 'lui-button-icon-right',
73
+ 'ActionButton',
74
74
  className,
75
- localInProgress && "ActionButton-inProgress",
76
- name != null && !className?.includes("ActionButton-fill") && "ActionButton-minimal",
77
- name == null && "ActionButton-iconOnly",
75
+ localInProgress && 'ActionButton-inProgress',
76
+ name != null && !className?.includes('ActionButton-fill') && 'ActionButton-minimal',
77
+ name == null && 'ActionButton-iconOnly',
78
78
  )}
79
- size={"lg"}
79
+ size={'lg'}
80
80
  style={style}
81
- onClick={async () => {
81
+ onClick={() => {
82
82
  const promise = onClick();
83
- const isPromise = typeof promise !== "undefined";
83
+ const isPromise = typeof promise !== 'undefined';
84
84
  if (isPromise) {
85
85
  setInProgress(true);
86
- if (isPromise) await promise;
87
- setInProgress(false);
86
+ void promise.finally(() => {
87
+ setInProgress(false);
88
+ });
88
89
  }
89
90
  }}
90
91
  disabled={localInProgress || disabled}
91
92
  >
92
- {iconPosition === "right" && buttonText}
93
+ {iconPosition === 'right' && buttonText}
93
94
  {localInProgress && (
94
- <div style={{ position: "relative" }}>
95
+ <div style={{ position: 'relative' }}>
95
96
  <LuiMiniSpinner
96
97
  size={14}
97
98
  divProps={{
98
- "data-testid": "loading-spinner",
99
+ 'data-testid': 'loading-spinner',
99
100
  style: {
100
- position: "absolute",
101
+ position: 'absolute',
101
102
  left: 4,
102
103
  top: -10,
103
104
  bottom: 10,
104
105
  right: -4,
105
106
  },
106
- role: "status",
107
- "aria-label": "Loading",
107
+ role: 'status',
108
+ 'aria-label': 'Loading',
108
109
  }}
109
110
  />
110
111
  </div>
111
112
  )}
112
- <LuiIcon name={icon} alt={ariaLabel ?? name ?? ""} size={size} />
113
- {iconPosition === "left" && buttonText}
113
+ <LuiIcon name={icon} alt={ariaLabel ?? name ?? ''} size={size} />
114
+ {iconPosition === 'left' && buttonText}
114
115
  </LuiButton>
115
116
  );
116
117
  };
@@ -1,7 +1,7 @@
1
- import "./FormError.scss";
1
+ import './FormError.scss';
2
2
 
3
- import { ReactElement } from "react";
4
- import { LuiIcon } from "@linzjs/lui";
3
+ import { LuiIcon } from '@linzjs/lui';
4
+ import { ReactElement } from 'react';
5
5
 
6
6
  export interface FormErrorProps {
7
7
  helpText?: string;
@@ -18,7 +18,7 @@ export const FormError = (props: FormErrorProps) => {
18
18
  </div>
19
19
  )}
20
20
 
21
- {props.helpText && !props.error && <span className={"FormError-helpText"}>{props.helpText}</span>}
21
+ {props.helpText && !props.error && <span className={'FormError-helpText'}>{props.helpText}</span>}
22
22
  </>
23
23
  );
24
24
  };
@@ -1,8 +1,8 @@
1
- import clsx from "clsx";
2
- import { omit } from "lodash-es";
3
- import { InputHTMLAttributes, ReactElement, useId } from "react";
1
+ import clsx from 'clsx';
2
+ import { omit } from 'lodash-es';
3
+ import { InputHTMLAttributes, ReactElement, useId } from 'react';
4
4
 
5
- import { FormError } from "./FormError";
5
+ import { FormError } from './FormError';
6
6
 
7
7
  export interface LuiTextAreaInputProps extends InputHTMLAttributes<HTMLTextAreaElement> {
8
8
  // overrides value in base class to be string type only
@@ -23,9 +23,9 @@ export const TextAreaInput = (props: LuiTextAreaInputProps) => {
23
23
  return (
24
24
  <div
25
25
  className={clsx(
26
- "LuiTextAreaInput Grid-popoverContainer",
27
- props.disabled ? "isDisabled" : "",
28
- props.error ? "hasError" : "",
26
+ 'LuiTextAreaInput Grid-popoverContainer',
27
+ props.disabled ? 'isDisabled' : '',
28
+ props.error ? 'hasError' : '',
29
29
  props.className,
30
30
  )}
31
31
  >
@@ -36,9 +36,9 @@ export const TextAreaInput = (props: LuiTextAreaInputProps) => {
36
36
  {/* wrapper div used for error styling */}
37
37
  <textarea
38
38
  rows={5}
39
- {...omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"])}
39
+ {...omit(props, ['error', 'value', 'helpText', 'formatted', 'className', 'allowTabToSave'])}
40
40
  id={id}
41
- value={props.value ?? ""}
41
+ value={props.value ?? ''}
42
42
  spellCheck={true}
43
43
  onMouseEnter={(e) => {
44
44
  if (document.activeElement != e.currentTarget) {
@@ -1,10 +1,10 @@
1
- import "./TextInputFormatted.scss";
1
+ import './TextInputFormatted.scss';
2
2
 
3
- import clsx from "clsx";
4
- import { omit } from "lodash-es";
5
- import { DetailedHTMLProps, InputHTMLAttributes, ReactElement } from "react";
3
+ import clsx from 'clsx';
4
+ import { omit } from 'lodash-es';
5
+ import { DetailedHTMLProps, InputHTMLAttributes, ReactElement } from 'react';
6
6
 
7
- import { FormError } from "./FormError";
7
+ import { FormError } from './FormError';
8
8
 
9
9
  export interface LuiTextInputProps extends DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
10
10
  // overrides value in base class to be string type only
@@ -21,26 +21,26 @@ export const TextInputFormatted = (props: LuiTextInputProps): ReactElement => {
21
21
  return (
22
22
  <div
23
23
  className={clsx(
24
- "LuiTextInput GridLuiTextInput Grid-popoverContainer",
25
- props.error && "hasError",
24
+ 'LuiTextInput GridLuiTextInput Grid-popoverContainer',
25
+ props.error && 'hasError',
26
26
  props.className,
27
27
  )}
28
28
  >
29
29
  <span className="LuiTextInput-inputWrapper">
30
30
  {/* wrapper div used for error styling */}
31
31
  <input
32
- type={"text"}
32
+ type={'text'}
33
33
  spellCheck={true}
34
34
  defaultValue={props.value}
35
- {...omit(props, ["error", "value", "helpText", "formatted", "className", "allowTabToSave"])}
36
- className={"LuiTextInput-input"}
35
+ {...omit(props, ['error', 'value', 'helpText', 'formatted', 'className', 'allowTabToSave'])}
36
+ className={'LuiTextInput-input'}
37
37
  onMouseEnter={(e) => {
38
38
  e.currentTarget.focus();
39
39
  props.onMouseEnter && props.onMouseEnter(e);
40
40
  }}
41
41
  data-allowtabtosave={props.allowTabToSave}
42
42
  />
43
- <span className={"LuiTextInput-formatted"}>{props.formatted}</span>
43
+ <span className={'LuiTextInput-formatted'}>{props.formatted}</span>
44
44
  </span>
45
45
 
46
46
  <FormError error={props.error} helpText={props.helpText} />
@@ -1,9 +1,9 @@
1
- import { screen } from "@testing-library/dom";
2
- import { render } from "@testing-library/react";
3
- import userEvent from "@testing-library/user-event";
4
- import { ReactElement, useEffect, useState } from "react";
1
+ import { screen } from '@testing-library/dom';
2
+ import { render } from '@testing-library/react';
3
+ import userEvent from '@testing-library/user-event';
4
+ import { ReactElement, useEffect, useState } from 'react';
5
5
 
6
- import { usePrevious } from "./reactUtils";
6
+ import { usePrevious } from './reactUtils';
7
7
 
8
8
  interface WrapperProps {
9
9
  value: boolean;
@@ -33,10 +33,10 @@ const TestComponent = (): ReactElement => {
33
33
  );
34
34
  };
35
35
 
36
- describe("usePrevious", () => {
37
- test("usePrevious", async () => {
36
+ describe('usePrevious', () => {
37
+ test('usePrevious', async () => {
38
38
  render(<TestComponent />);
39
- const button = await screen.findByText("Change value");
39
+ const button = await screen.findByText('Change value');
40
40
 
41
41
  expect(extPrevious).toBeUndefined();
42
42
 
@@ -1,11 +1,11 @@
1
- import { useEffect, useRef } from "react";
1
+ import { useEffect, useRef } from 'react';
2
2
 
3
3
  /**
4
4
  * Track previous values of states.
5
5
  *
6
6
  * @param value Value to track.
7
7
  */
8
- export const usePrevious = <T extends unknown>(value: T): T | undefined => {
8
+ export const usePrevious = <T,>(value: T): T | undefined => {
9
9
  const ref = useRef<T>();
10
10
  useEffect(() => {
11
11
  ref.current = value;
@@ -1,13 +1,11 @@
1
- import { useCallback, useRef, useState } from "react";
1
+ import { useCallback, useRef, useState } from 'react';
2
2
 
3
- import { useTimeoutHook } from "./timeoutHook";
3
+ import { useTimeoutHook } from './timeoutHook';
4
4
 
5
5
  /**
6
6
  * Defers state change up to a minimum time since last state change.
7
7
  */
8
- export const useStateDeferred = <T extends unknown>(
9
- initialValue: T,
10
- ): [T, (v: T) => void, (v: T, w: number) => void] => {
8
+ export const useStateDeferred = <T,>(initialValue: T): [T, (v: T) => void, (v: T, w: number) => void] => {
11
9
  const startTime = useRef<number>(0);
12
10
  const timeoutHook = useTimeoutHook();
13
11
 
@@ -1,8 +1,8 @@
1
- import { render } from "@testing-library/react";
1
+ import { render } from '@testing-library/react';
2
2
 
3
- import { useTimeoutHook } from "./timeoutHook";
3
+ import { useTimeoutHook } from './timeoutHook';
4
4
 
5
- describe("useTimeoutHook", () => {
5
+ describe('useTimeoutHook', () => {
6
6
  beforeEach(() => {
7
7
  jest.useFakeTimers();
8
8
  });
@@ -19,7 +19,7 @@ describe("useTimeoutHook", () => {
19
19
  return <div />;
20
20
  };
21
21
 
22
- test("invokes on timeout", async () => {
22
+ test('invokes on timeout', () => {
23
23
  const callback = jest.fn();
24
24
 
25
25
  render(<TestComponent callback={callback} />);
@@ -28,7 +28,7 @@ describe("useTimeoutHook", () => {
28
28
  expect(callback).toHaveBeenCalledTimes(1);
29
29
  });
30
30
 
31
- test("invokes once on double invocation", async () => {
31
+ test('invokes once on double invocation', () => {
32
32
  const callback = jest.fn();
33
33
 
34
34
  render(<TestComponent callback={callback} repeat={2} />);
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useRef } from "react";
1
+ import { useCallback, useEffect, useRef } from 'react';
2
2
 
3
3
  /**
4
4
  * Cancels timeouts on scope being destroyed.
@@ -1 +1 @@
1
- /// <reference types="react-scripts" />
1
+ /// <reference types="react-scripts" />
@@ -1,18 +1,18 @@
1
- import { FocusEvent, ForwardedRef, MutableRefObject, forwardRef, useCallback, useEffect, useMemo, useRef } from "react";
2
- import { createPortal } from "react-dom";
3
-
4
- import { hasParentClass } from "../../utils/util";
5
- import { EventHandlersContext, EventHandlersContextType } from "../contexts/EventHandlersContext";
6
- import { ItemSettingsContext } from "../contexts/ItemSettingsContext";
7
- import { SettingsContext } from "../contexts/SettingsContext";
8
- import { useBEM } from "../hooks";
9
- import { ControlledMenuProps, PortalFieldType, RadioChangeEvent } from "../types";
10
- import { CloseReason, Keys, getTransition, isMenuOpen, menuContainerClass, mergeProps, safeCall } from "../utils";
11
- import { MenuList } from "./MenuList";
1
+ import { FocusEvent, ForwardedRef, forwardRef, MutableRefObject, useCallback, useEffect, useMemo, useRef } from 'react';
2
+ import { createPortal } from 'react-dom';
3
+
4
+ import { hasParentClass } from '../../utils/util';
5
+ import { EventHandlersContext, EventHandlersContextType } from '../contexts/EventHandlersContext';
6
+ import { ItemSettingsContext } from '../contexts/ItemSettingsContext';
7
+ import { SettingsContext } from '../contexts/SettingsContext';
8
+ import { useBEM } from '../hooks';
9
+ import { ControlledMenuProps, PortalFieldType, RadioChangeEvent } from '../types';
10
+ import { CloseReason, getTransition, isMenuOpen, Keys, menuContainerClass, mergeProps, safeCall } from '../utils';
11
+ import { MenuList } from './MenuList';
12
12
 
13
13
  export const ControlledMenuFr = (
14
14
  {
15
- "aria-label": ariaLabel,
15
+ 'aria-label': ariaLabel,
16
16
  className,
17
17
  containerProps,
18
18
  initialMounted,
@@ -21,11 +21,11 @@ export const ControlledMenuFr = (
21
21
  transitionTimeout,
22
22
  boundingBoxRef,
23
23
  boundingBoxPadding,
24
- reposition = "auto",
24
+ reposition = 'auto',
25
25
  submenuOpenDelay = 300,
26
26
  submenuCloseDelay = 150,
27
27
  skipOpen,
28
- viewScroll = "initial",
28
+ viewScroll = 'initial',
29
29
  portal,
30
30
  theming,
31
31
  onItemClick,
@@ -68,10 +68,10 @@ export const ControlledMenuFr = (
68
68
 
69
69
  const isWithinMenu = useCallback(
70
70
  (target: EventTarget | null) =>
71
- hasParentClass("szh-menu--state-open", target as Node) ||
71
+ hasParentClass('szh-menu--state-open', target as Node) ||
72
72
  // This is temporary, it will be removed when the overlay click is fixed
73
- hasParentClass("LuiModalPrefab", target as Node) ||
74
- hasParentClass("prefab-modal", target as Node),
73
+ hasParentClass('LuiModalPrefab', target as Node) ||
74
+ hasParentClass('prefab-modal', target as Node),
75
75
  [],
76
76
  );
77
77
 
@@ -85,7 +85,7 @@ export const ControlledMenuFr = (
85
85
  // This doesn't happen in React18
86
86
  // To work around it, I invoke the save by clicking on a passed in invisible button ref
87
87
  if (saveButtonRef?.current) {
88
- saveButtonRef.current.setAttribute("data-reason", CloseReason.BLUR);
88
+ saveButtonRef.current.setAttribute('data-reason', CloseReason.BLUR);
89
89
  saveButtonRef.current.click();
90
90
  } else safeCall(onClose, { reason: CloseReason.BLUR });
91
91
 
@@ -121,7 +121,7 @@ export const ControlledMenuFr = (
121
121
  const thisDocument = anchorRef?.current ? anchorRef?.current.ownerDocument : document;
122
122
  const activeElement = thisDocument.activeElement;
123
123
  if (!anchorRef?.current || !activeElement) return;
124
- if (ev.key !== "Tab" && ev.key !== "Enter") return;
124
+ if (ev.key !== 'Tab' && ev.key !== 'Enter') return;
125
125
 
126
126
  if (ev.repeat) {
127
127
  ev.preventDefault();
@@ -131,14 +131,14 @@ export const ControlledMenuFr = (
131
131
 
132
132
  const invokeSave = (reason: string) => {
133
133
  if (!saveButtonRef?.current) return;
134
- saveButtonRef.current?.setAttribute("data-reason", reason);
134
+ saveButtonRef.current?.setAttribute('data-reason', reason);
135
135
  saveButtonRef?.current?.click();
136
136
  };
137
137
 
138
138
  // data-allowtabtosave is used such that list filter inputs can use tab to save
139
- const allowTabToSave = activeElement.getAttribute("data-allowtabtosave") == "true";
139
+ const allowTabToSave = activeElement.getAttribute('data-allowtabtosave') == 'true';
140
140
 
141
- const inputElsIterator = thisDocument.querySelectorAll<HTMLElement>(".szh-menu--state-open input,textarea");
141
+ const inputElsIterator = thisDocument.querySelectorAll<HTMLElement>('.szh-menu--state-open input,textarea');
142
142
  let inputEls: HTMLElement[] = [];
143
143
  inputElsIterator.forEach((el) => inputEls.push(el));
144
144
  inputEls = inputEls.filter((el) => !(el as any).disabled);
@@ -146,10 +146,10 @@ export const ControlledMenuFr = (
146
146
  const firstInputEl = inputEls[0];
147
147
  const lastInputEl = inputEls[inputEls.length - 1];
148
148
 
149
- const isTextArea = activeElement.nodeName === "TEXTAREA";
150
- const suppressEnterAutoSave = activeElement.getAttribute("data-disableenterautosave") == "true" || isTextArea;
149
+ const isTextArea = activeElement.nodeName === 'TEXTAREA';
150
+ const suppressEnterAutoSave = activeElement.getAttribute('data-disableenterautosave') == 'true' || isTextArea;
151
151
 
152
- if (ev.key === "Tab") {
152
+ if (ev.key === 'Tab') {
153
153
  const tabDirection = ev.shiftKey ? CloseReason.TAB_BACKWARD : CloseReason.TAB_FORWARD;
154
154
  if (
155
155
  (activeElement === lastInputEl && !ev.shiftKey) ||
@@ -167,14 +167,14 @@ export const ControlledMenuFr = (
167
167
  }
168
168
  }
169
169
 
170
- const type = activeElement.getAttribute("type");
171
- const isTextInput = type === "text" || type == null || type === "textarea";
170
+ const type = activeElement.getAttribute('type');
171
+ const isTextInput = type === 'text' || type == null || type === 'textarea';
172
172
 
173
173
  switch (activeElement.nodeName) {
174
- case "INPUT":
174
+ case 'INPUT':
175
175
  {
176
176
  // If there's only one input element, we support tab and enter
177
- if (isTextInput && ev.key === "Enter" && !suppressEnterAutoSave) {
177
+ if (isTextInput && ev.key === 'Enter' && !suppressEnterAutoSave) {
178
178
  ev.preventDefault();
179
179
  ev.stopPropagation();
180
180
  if (isDown) {
@@ -196,19 +196,19 @@ export const ControlledMenuFr = (
196
196
  useEffect(() => {
197
197
  if (isMenuOpen(state)) {
198
198
  const thisDocument = anchorRef?.current ? anchorRef?.current.ownerDocument : document;
199
- thisDocument.addEventListener("keydown", handleKeydownTabAndEnter, true);
200
- thisDocument.addEventListener("keyup", handleKeyupTabAndEnter, true);
201
- thisDocument.addEventListener("mousedown", handleScreenEventForSave, true);
202
- thisDocument.addEventListener("mouseup", handleScreenEventForCancel, true);
203
- thisDocument.addEventListener("click", handleScreenEventForCancel, true);
204
- thisDocument.addEventListener("dblclick", handleScreenEventForCancel, true);
199
+ thisDocument.addEventListener('keydown', handleKeydownTabAndEnter, true);
200
+ thisDocument.addEventListener('keyup', handleKeyupTabAndEnter, true);
201
+ thisDocument.addEventListener('mousedown', handleScreenEventForSave, true);
202
+ thisDocument.addEventListener('mouseup', handleScreenEventForCancel, true);
203
+ thisDocument.addEventListener('click', handleScreenEventForCancel, true);
204
+ thisDocument.addEventListener('dblclick', handleScreenEventForCancel, true);
205
205
  return () => {
206
- thisDocument.removeEventListener("keydown", handleKeydownTabAndEnter, true);
207
- thisDocument.removeEventListener("keyup", handleKeyupTabAndEnter, true);
208
- thisDocument.removeEventListener("mousedown", handleScreenEventForSave, true);
209
- thisDocument.removeEventListener("mouseup", handleScreenEventForCancel, true);
210
- thisDocument.removeEventListener("click", handleScreenEventForCancel, true);
211
- thisDocument.removeEventListener("dblclick", handleScreenEventForCancel, true);
206
+ thisDocument.removeEventListener('keydown', handleKeydownTabAndEnter, true);
207
+ thisDocument.removeEventListener('keyup', handleKeyupTabAndEnter, true);
208
+ thisDocument.removeEventListener('mousedown', handleScreenEventForSave, true);
209
+ thisDocument.removeEventListener('mouseup', handleScreenEventForCancel, true);
210
+ thisDocument.removeEventListener('click', handleScreenEventForCancel, true);
211
+ thisDocument.removeEventListener('dblclick', handleScreenEventForCancel, true);
212
212
  };
213
213
  }
214
214
  return () => {};
@@ -248,7 +248,7 @@ export const ControlledMenuFr = (
248
248
  key: event.key,
249
249
  shiftKey: event.shiftKey,
250
250
  reason:
251
- event.key === "Tab"
251
+ event.key === 'Tab'
252
252
  ? event.shiftKey
253
253
  ? CloseReason.TAB_BACKWARD
254
254
  : CloseReason.TAB_FORWARD
@@ -295,7 +295,7 @@ export const ControlledMenuFr = (
295
295
  }
296
296
  };
297
297
 
298
- const itemTransition = getTransition(transition, "item");
298
+ const itemTransition = getTransition(transition, 'item');
299
299
  const modifiers = useMemo(() => ({ theme: theming, itemTransition }), [theming, itemTransition]);
300
300
 
301
301
  const menuList = (
@@ -306,7 +306,7 @@ export const ControlledMenuFr = (
306
306
  modifiers,
307
307
  className,
308
308
  })}
309
- style={{ ...containerProps?.style, position: "relative" }}
309
+ style={{ ...containerProps?.style, position: 'relative' }}
310
310
  ref={containerRef}
311
311
  >
312
312
  {state && (
@@ -315,7 +315,7 @@ export const ControlledMenuFr = (
315
315
  <EventHandlersContext.Provider value={eventHandlers}>
316
316
  <MenuList
317
317
  {...restProps}
318
- ariaLabel={ariaLabel || "Menu"}
318
+ ariaLabel={ariaLabel || 'Menu'}
319
319
  externalRef={externalRef}
320
320
  containerRef={containerRef}
321
321
  onClose={onClose}
@@ -328,7 +328,7 @@ export const ControlledMenuFr = (
328
328
  );
329
329
 
330
330
  if (portal === true && anchorRef?.current != null) {
331
- if (hasParentClass("react-menu-inline-test", anchorRef.current)) {
331
+ if (hasParentClass('react-menu-inline-test', anchorRef.current)) {
332
332
  portal = false;
333
333
  } else {
334
334
  portal = { target: anchorRef.current.ownerDocument.body } as PortalFieldType;
@@ -336,8 +336,8 @@ export const ControlledMenuFr = (
336
336
  }
337
337
 
338
338
  if (portal) {
339
- if (typeof portal === "boolean") {
340
- if (portal && typeof document !== "undefined") {
339
+ if (typeof portal === 'boolean') {
340
+ if (portal && typeof document !== 'undefined') {
341
341
  return createPortal(menuList, document.body);
342
342
  }
343
343
  } else {
@@ -1,10 +1,10 @@
1
- import { LegacyRef, ReactElement, useContext, useMemo, useRef } from "react";
1
+ import { LegacyRef, ReactElement, useContext, useMemo, useRef } from 'react';
2
2
 
3
- import { EventHandlersContext } from "../contexts/EventHandlersContext";
4
- import { useBEM, useCombinedRef, useItemState } from "../hooks";
5
- import { BaseProps } from "../types";
6
- import { commonProps, menuClass, menuItemClass, mergeProps, safeCall, withHovering } from "../utils";
7
- import { withHoveringResultProps } from "../utils/withHovering";
3
+ import { EventHandlersContext } from '../contexts/EventHandlersContext';
4
+ import { useBEM, useCombinedRef, useItemState } from '../hooks';
5
+ import { BaseProps } from '../types';
6
+ import { commonProps, menuClass, menuItemClass, mergeProps, safeCall, withHovering } from '../utils';
7
+ import { withHoveringResultProps } from '../utils/withHovering';
8
8
 
9
9
  export interface FocusableItemProps extends BaseProps, withHoveringResultProps {
10
10
  disabled?: boolean;
@@ -66,4 +66,4 @@ export const FocusableItemFr = ({
66
66
  );
67
67
  };
68
68
 
69
- export const FocusableItem = withHovering("FocusableItem", FocusableItemFr);
69
+ export const FocusableItem = withHovering('FocusableItem', FocusableItemFr);