@muraldevkit/ui-toolkit 4.70.1 → 4.70.3-dev-kmM6.1

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 (122) hide show
  1. package/dist/cjs/components/form/select/components/MrlSelectContainer.js +6 -1
  2. package/dist/cjs/components/form/select/components/MrlSelectContainer.js.map +1 -1
  3. package/dist/cjs/components/form/select/utils/useMenuEscapeContainment.js +59 -0
  4. package/dist/cjs/components/form/select/utils/useMenuEscapeContainment.js.map +1 -0
  5. package/dist/cjs/components/notification/MrlBlockNotification/MrlBlockNotification.module.scss.js +1 -1
  6. package/dist/cjs/hooks/useAutoClose/useAutoClose.js.map +1 -1
  7. package/dist/components/breadcrumb/MrlBreadcrumbSeparator/MrlBreadcrumbSeparator.d.ts +0 -1
  8. package/dist/components/divider/MrlDivider/MrlDivider.d.ts +0 -1
  9. package/dist/components/empty/default/MrlEmpty.d.ts +0 -1
  10. package/dist/components/empty/large/MrlEmptyLarge.d.ts +0 -1
  11. package/dist/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +0 -1
  12. package/dist/components/form/legacy-select/MrlLegacySelectMenu/MrlLegacySelectMenu.d.ts +0 -1
  13. package/dist/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +1 -2
  14. package/dist/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +1 -2
  15. package/dist/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +1 -2
  16. package/dist/components/form/select/MrlSelect/MrlSelect.d.ts +1 -2
  17. package/dist/components/form/select/components/MrlSelectClearIndicator.d.ts +0 -1
  18. package/dist/components/form/select/components/MrlSelectContainer.d.ts +3 -1
  19. package/dist/components/form/select/components/MrlSelectDropdownIndicator.d.ts +0 -1
  20. package/dist/components/form/select/components/MrlSelectMultiValue.d.ts +0 -1
  21. package/dist/components/form/select/components/MrlSelectMultiValueRemove.d.ts +0 -1
  22. package/dist/components/form/select/components/MrlSelectOption.d.ts +0 -1
  23. package/dist/components/form/select/components/MrlSelectValueContainer.d.ts +0 -1
  24. package/dist/components/form/select/utils/useMenuEscapeContainment.d.ts +21 -0
  25. package/dist/components/form/textarea/MrlTextarea/MrlTextarea.d.ts +0 -1
  26. package/dist/components/grid/MrlCol/MrlCol.d.ts +0 -1
  27. package/dist/components/grid/MrlGrid/MrlGrid.d.ts +0 -1
  28. package/dist/components/grid/MrlRow/MrlRow.d.ts +0 -1
  29. package/dist/components/layout/MrlMain/MrlMain.d.ts +0 -1
  30. package/dist/components/layout/MrlPage/MrlPage.d.ts +0 -1
  31. package/dist/components/layout/MrlPage/index.d.ts +0 -1
  32. package/dist/components/layout/MrlSidebar/demo/MrlSidebarDemo.d.ts +0 -1
  33. package/dist/components/layout/MrlTopbar/MrlTopbar.d.ts +0 -1
  34. package/dist/components/layout/constants.d.ts +0 -1
  35. package/dist/components/live-region/demo/LiveRegionDemo.d.ts +0 -1
  36. package/dist/components/loader/MrlProgressBar/MrlProgressBar.d.ts +0 -1
  37. package/dist/components/loader/MrlSpinner/MrlSpinner.d.ts +0 -1
  38. package/dist/components/loader/constants.d.ts +0 -1
  39. package/dist/components/menu/constants.d.ts +0 -1
  40. package/dist/components/menu/demo/MenuByConfig.d.ts +0 -1
  41. package/dist/components/menu/demo/MenuWithPopover.d.ts +0 -1
  42. package/dist/components/menu/demo/MenuWithSubmenu.d.ts +0 -1
  43. package/dist/components/menu/demo/MenuWithTrigger.d.ts +0 -1
  44. package/dist/components/modal/demo/ModalWithTriggerDemo.d.ts +0 -1
  45. package/dist/components/pagination/MrlPaginationText/MrlPaginationText.d.ts +0 -1
  46. package/dist/components/popover/demo/PopoverWithIconButton.d.ts +0 -1
  47. package/dist/components/popover/demo/PopoverWithSelect.d.ts +0 -1
  48. package/dist/components/popover/demo/PopoverWithTrigger.d.ts +0 -1
  49. package/dist/components/table/MrlSmartTable/storybook-utils.d.ts +9 -10
  50. package/dist/components/table/MrlTableEmptyState/MrlTableEmptyState.d.ts +0 -1
  51. package/dist/components/table/utils.d.ts +1 -1
  52. package/dist/components/toolbar/MrlToolbarItem/MrlToolbarItem.d.ts +0 -1
  53. package/dist/esm/components/form/select/components/MrlSelectContainer.js +6 -1
  54. package/dist/esm/components/form/select/components/MrlSelectContainer.js.map +1 -1
  55. package/dist/esm/components/form/select/utils/useMenuEscapeContainment.js +37 -0
  56. package/dist/esm/components/form/select/utils/useMenuEscapeContainment.js.map +1 -0
  57. package/dist/esm/components/notification/MrlBlockNotification/MrlBlockNotification.module.scss.js +1 -1
  58. package/dist/esm/hooks/useAutoClose/useAutoClose.js.map +1 -1
  59. package/dist/hooks/useBreakpoint/useBreakpointDemo.d.ts +0 -1
  60. package/dist/hooks/useClickOutside/index.d.ts +1 -1
  61. package/dist/styles/MrlBlockNotification/module.scss +7 -12
  62. package/dist/styles.css +1 -1
  63. package/dist/types/components/breadcrumb/MrlBreadcrumbSeparator/MrlBreadcrumbSeparator.d.ts +0 -1
  64. package/dist/types/components/divider/MrlDivider/MrlDivider.d.ts +0 -1
  65. package/dist/types/components/empty/default/MrlEmpty.d.ts +0 -1
  66. package/dist/types/components/empty/large/MrlEmptyLarge.d.ts +0 -1
  67. package/dist/types/components/form/checkbox/MrlCheckboxStandalone/MrlCheckboxStandalone.d.ts +0 -1
  68. package/dist/types/components/form/legacy-select/MrlLegacySelectMenu/MrlLegacySelectMenu.d.ts +0 -1
  69. package/dist/types/components/form/select/MrlCreatableSelect/MrlCreatableSelect.d.ts +1 -2
  70. package/dist/types/components/form/select/MrlMultiCreatableSelect/MrlMultiCreatableSelect.d.ts +1 -2
  71. package/dist/types/components/form/select/MrlMultiSelect/MrlMultiSelect.d.ts +1 -2
  72. package/dist/types/components/form/select/MrlSelect/MrlSelect.d.ts +1 -2
  73. package/dist/types/components/form/select/components/MrlSelectClearIndicator.d.ts +0 -1
  74. package/dist/types/components/form/select/components/MrlSelectContainer.d.ts +3 -1
  75. package/dist/types/components/form/select/components/MrlSelectDropdownIndicator.d.ts +0 -1
  76. package/dist/types/components/form/select/components/MrlSelectMultiValue.d.ts +0 -1
  77. package/dist/types/components/form/select/components/MrlSelectMultiValueRemove.d.ts +0 -1
  78. package/dist/types/components/form/select/components/MrlSelectOption.d.ts +0 -1
  79. package/dist/types/components/form/select/components/MrlSelectValueContainer.d.ts +0 -1
  80. package/dist/types/components/form/select/utils/useMenuEscapeContainment.d.ts +21 -0
  81. package/dist/types/components/form/textarea/MrlTextarea/MrlTextarea.d.ts +0 -1
  82. package/dist/types/components/grid/MrlCol/MrlCol.d.ts +0 -1
  83. package/dist/types/components/grid/MrlGrid/MrlGrid.d.ts +0 -1
  84. package/dist/types/components/grid/MrlRow/MrlRow.d.ts +0 -1
  85. package/dist/types/components/layout/MrlMain/MrlMain.d.ts +0 -1
  86. package/dist/types/components/layout/MrlPage/MrlPage.d.ts +0 -1
  87. package/dist/types/components/layout/MrlPage/index.d.ts +0 -1
  88. package/dist/types/components/layout/MrlSidebar/demo/MrlSidebarDemo.d.ts +0 -1
  89. package/dist/types/components/layout/MrlTopbar/MrlTopbar.d.ts +0 -1
  90. package/dist/types/components/layout/constants.d.ts +0 -1
  91. package/dist/types/components/layout/error-page/MrlBrandColors/MrlBrandColors.d.ts +0 -1
  92. package/dist/types/components/live-region/demo/LiveRegionDemo.d.ts +0 -1
  93. package/dist/types/components/loader/MrlProgressBar/MrlProgressBar.d.ts +0 -1
  94. package/dist/types/components/loader/MrlSpinner/MrlSpinner.d.ts +0 -1
  95. package/dist/types/components/loader/constants.d.ts +0 -1
  96. package/dist/types/components/menu/constants.d.ts +0 -1
  97. package/dist/types/components/menu/demo/MenuByConfig.d.ts +0 -1
  98. package/dist/types/components/menu/demo/MenuWithPopover.d.ts +0 -1
  99. package/dist/types/components/menu/demo/MenuWithSubmenu.d.ts +0 -1
  100. package/dist/types/components/menu/demo/MenuWithTrigger.d.ts +0 -1
  101. package/dist/types/components/modal/demo/ModalWithTriggerDemo.d.ts +0 -1
  102. package/dist/types/components/pagination/MrlPaginationText/MrlPaginationText.d.ts +0 -1
  103. package/dist/types/components/popover/demo/PopoverWithIconButton.d.ts +0 -1
  104. package/dist/types/components/popover/demo/PopoverWithSelect.d.ts +0 -1
  105. package/dist/types/components/popover/demo/PopoverWithTrigger.d.ts +0 -1
  106. package/dist/types/components/table/MrlSmartTable/storybook-utils.d.ts +9 -10
  107. package/dist/types/components/table/MrlTableEmptyState/MrlTableEmptyState.d.ts +0 -1
  108. package/dist/types/components/table/utils.d.ts +1 -1
  109. package/dist/types/components/toolbar/MrlToolbarItem/MrlToolbarItem.d.ts +0 -1
  110. package/dist/types/hooks/useBreakpoint/useBreakpointDemo.d.ts +0 -1
  111. package/dist/types/hooks/useClickOutside/index.d.ts +1 -1
  112. package/dist/types/utils/findAdjacentInteractiveElement/findAdjacentInteractiveElement.d.ts +1 -1
  113. package/dist/utils/findAdjacentInteractiveElement/findAdjacentInteractiveElement.d.ts +1 -1
  114. package/package.json +7 -6
  115. package/dist/types/utils/getCamelCase/getCamelCase.test.d.ts +0 -1
  116. package/dist/types/utils/isElementAriaDisabled/isElementAriaDisabled.test.d.ts +0 -1
  117. package/dist/types/utils/isObject/isObject.test.d.ts +0 -1
  118. package/dist/types/utils/setAttributes/setAttributes.test.d.ts +0 -1
  119. package/dist/utils/getCamelCase/getCamelCase.test.d.ts +0 -1
  120. package/dist/utils/isElementAriaDisabled/isElementAriaDisabled.test.d.ts +0 -1
  121. package/dist/utils/isObject/isObject.test.d.ts +0 -1
  122. package/dist/utils/setAttributes/setAttributes.test.d.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useAutoClose.js","sources":["../../../../src/hooks/useAutoClose/useAutoClose.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type useAutoClose = (\n\tshouldAutoClose?: boolean,\n\tcloseAfterMs?: number,\n\tonClose?: () => unknown\n) => [boolean, React.Dispatch<React.SetStateAction<boolean>>];\n\n/**\n * Hook that exposes a piece of state that allows components to close themselves after a delay\n *\n * @param shouldAutoClose - When false prevents automated close (e.g. can be used to prevent auto-dismissal of interactive elements, an accessibility anti-pattern)\n * @param closeAfterMs - Delay in milliseconds before the component closes\n * @param onClose - Callback to be called when component closes\n * @returns [closed, setClosed] - a boolean tracking closed state, and a setter for that same state\n */\nexport const useAutoClose: useAutoClose = function (\n\tshouldAutoClose = true,\n\tcloseAfterMs = 3000,\n\tonClose\n) {\n\tconst [closed, setClosed] = React.useState<boolean>(false);\n\tconst currentTimeout = React.useRef<NodeJS.Timeout | null>(null);\n\n\tReact.useEffect(() => {\n\t\t// Reset current timeout when component mounts or when notification changes\n\t\tif (currentTimeout.current) {\n\t\t\tresetTimeout();\n\t\t}\n\n\t\t// Allowing autoClose when there are interactive elements in the toast is an anti-pattern\n\t\t// and should be avoided. If autoClose is set to true and interactive elements exist, the\n\t\t// toast will not close automatically.\n\t\tif (shouldAutoClose) {\n\t\t\tsetClosed(false);\n\n\t\t\tcurrentTimeout.current = setTimeout(() => {\n\t\t\t\tsetClosed(true);\n\n\t\t\t\t// Handle onClose after the timeout is elapsed\n\t\t\t\tif (onClose) onClose();\n\t\t\t}, closeAfterMs);\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Clear timeout when component unmounts\n\t\t\tresetTimeout();\n\t\t};\n\t}, [shouldAutoClose, closeAfterMs, onClose]);\n\n\t/** Resets the current timeout and `closed` to its initial value */\n\tconst resetTimeout = (): void => {\n\t\tif (currentTimeout.current !== null) {\n\t\t\tclearTimeout(currentTimeout.current);\n\t\t}\n\t\tsetClosed(false);\n\t};\n\n\treturn [closed, setClosed];\n};\n"],"names":["useAutoClose","shouldAutoClose","arguments","length","undefined","closeAfterMs","onClose","_React$useState","React","useState","_React$useState2","_slicedToArray","closed","setClosed","currentTimeout","useRef","useEffect","current","resetTimeout","setTimeout","clearTimeout"],"mappings":";;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaA,YAA0B,GAAG,SAA7BA,YAA0BA,GAIrC;AAAA,EAAA,IAHDC,eAAe,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI;AAAA,EAAA,IACtBG,YAAY,GAAAH,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI;EAAA,IACnBI,OAAO,GAAAJ,SAAA,CAAAC,MAAA,GAAA,CAAA,GAAAD,SAAA,MAAAE,SAAA;AAEP,EAAA,IAAAG,eAAA,GAA4BC,KAAK,CAACC,QAAQ,CAAU,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAAnDK,IAAAA,MAAM,GAAAF,gBAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,SAAS,GAAAH,gBAAA,CAAA,CAAA,CAAA;AACxB,EAAA,IAAMI,cAAc,GAAGN,KAAK,CAACO,MAAM,CAAwB,IAAI,CAAC;EAEhEP,KAAK,CAACQ,SAAS,CAAC,MAAM;AACrB;IACA,IAAIF,cAAc,CAACG,OAAO,EAAE;AAC3BC,MAAAA,YAAY,EAAE;AACf,IAAA;;AAEA;AACA;AACA;AACA,IAAA,IAAIjB,eAAe,EAAE;MACpBY,SAAS,CAAC,KAAK,CAAC;AAEhBC,MAAAA,cAAc,CAACG,OAAO,GAAGE,UAAU,CAAC,MAAM;QACzCN,SAAS,CAAC,IAAI,CAAC;;AAEf;AACA,QAAA,IAAIP,OAAO,EAAEA,OAAO,EAAE;MACvB,CAAC,EAAED,YAAY,CAAC;AACjB,IAAA;AAEA,IAAA,OAAO,MAAM;AACZ;AACAa,MAAAA,YAAY,EAAE;IACf,CAAC;EACF,CAAC,EAAE,CAACjB,eAAe,EAAEI,YAAY,EAAEC,OAAO,CAAC,CAAC;;AAE5C;EACA,IAAMY,YAAY,GAAGA,MAAY;AAChC,IAAA,IAAIJ,cAAc,CAACG,OAAO,KAAK,IAAI,EAAE;AACpCG,MAAAA,YAAY,CAACN,cAAc,CAACG,OAAO,CAAC;AACrC,IAAA;IACAJ,SAAS,CAAC,KAAK,CAAC;EACjB,CAAC;AAED,EAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;AAC3B;;;;"}
1
+ {"version":3,"file":"useAutoClose.js","sources":["../../../../src/hooks/useAutoClose/useAutoClose.ts"],"sourcesContent":["import * as React from 'react';\n\nexport type useAutoClose = (\n\tshouldAutoClose?: boolean,\n\tcloseAfterMs?: number,\n\tonClose?: () => unknown\n) => [boolean, React.Dispatch<React.SetStateAction<boolean>>];\n\n/**\n * Hook that exposes a piece of state that allows components to close themselves after a delay\n *\n * @param shouldAutoClose - When false prevents automated close (e.g. can be used to prevent auto-dismissal of interactive elements, an accessibility anti-pattern)\n * @param closeAfterMs - Delay in milliseconds before the component closes\n * @param onClose - Callback to be called when component closes\n * @returns [closed, setClosed] - a boolean tracking closed state, and a setter for that same state\n */\nexport const useAutoClose: useAutoClose = function (\n\tshouldAutoClose = true,\n\tcloseAfterMs = 3000,\n\tonClose\n) {\n\tconst [closed, setClosed] = React.useState<boolean>(false);\n\tconst currentTimeout = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n\tReact.useEffect(() => {\n\t\t// Reset current timeout when component mounts or when notification changes\n\t\tif (currentTimeout.current) {\n\t\t\tresetTimeout();\n\t\t}\n\n\t\t// Allowing autoClose when there are interactive elements in the toast is an anti-pattern\n\t\t// and should be avoided. If autoClose is set to true and interactive elements exist, the\n\t\t// toast will not close automatically.\n\t\tif (shouldAutoClose) {\n\t\t\tsetClosed(false);\n\n\t\t\tcurrentTimeout.current = setTimeout(() => {\n\t\t\t\tsetClosed(true);\n\n\t\t\t\t// Handle onClose after the timeout is elapsed\n\t\t\t\tif (onClose) onClose();\n\t\t\t}, closeAfterMs);\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Clear timeout when component unmounts\n\t\t\tresetTimeout();\n\t\t};\n\t}, [shouldAutoClose, closeAfterMs, onClose]);\n\n\t/** Resets the current timeout and `closed` to its initial value */\n\tconst resetTimeout = (): void => {\n\t\tif (currentTimeout.current !== null) {\n\t\t\tclearTimeout(currentTimeout.current);\n\t\t}\n\t\tsetClosed(false);\n\t};\n\n\treturn [closed, setClosed];\n};\n"],"names":["useAutoClose","shouldAutoClose","arguments","length","undefined","closeAfterMs","onClose","_React$useState","React","useState","_React$useState2","_slicedToArray","closed","setClosed","currentTimeout","useRef","useEffect","current","resetTimeout","setTimeout","clearTimeout"],"mappings":";;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;IACaA,YAA0B,GAAG,SAA7BA,YAA0BA,GAIrC;AAAA,EAAA,IAHDC,eAAe,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI;AAAA,EAAA,IACtBG,YAAY,GAAAH,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI;EAAA,IACnBI,OAAO,GAAAJ,SAAA,CAAAC,MAAA,GAAA,CAAA,GAAAD,SAAA,MAAAE,SAAA;AAEP,EAAA,IAAAG,eAAA,GAA4BC,KAAK,CAACC,QAAQ,CAAU,KAAK,CAAC;IAAAC,gBAAA,GAAAC,cAAA,CAAAJ,eAAA,EAAA,CAAA,CAAA;AAAnDK,IAAAA,MAAM,GAAAF,gBAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,SAAS,GAAAH,gBAAA,CAAA,CAAA,CAAA;AACxB,EAAA,IAAMI,cAAc,GAAGN,KAAK,CAACO,MAAM,CAAuC,IAAI,CAAC;EAE/EP,KAAK,CAACQ,SAAS,CAAC,MAAM;AACrB;IACA,IAAIF,cAAc,CAACG,OAAO,EAAE;AAC3BC,MAAAA,YAAY,EAAE;AACf,IAAA;;AAEA;AACA;AACA;AACA,IAAA,IAAIjB,eAAe,EAAE;MACpBY,SAAS,CAAC,KAAK,CAAC;AAEhBC,MAAAA,cAAc,CAACG,OAAO,GAAGE,UAAU,CAAC,MAAM;QACzCN,SAAS,CAAC,IAAI,CAAC;;AAEf;AACA,QAAA,IAAIP,OAAO,EAAEA,OAAO,EAAE;MACvB,CAAC,EAAED,YAAY,CAAC;AACjB,IAAA;AAEA,IAAA,OAAO,MAAM;AACZ;AACAa,MAAAA,YAAY,EAAE;IACf,CAAC;EACF,CAAC,EAAE,CAACjB,eAAe,EAAEI,YAAY,EAAEC,OAAO,CAAC,CAAC;;AAE5C;EACA,IAAMY,YAAY,GAAGA,MAAY;AAChC,IAAA,IAAIJ,cAAc,CAACG,OAAO,KAAK,IAAI,EAAE;AACpCG,MAAAA,YAAY,CAACN,cAAc,CAACG,OAAO,CAAC;AACrC,IAAA;IACAJ,SAAS,CAAC,KAAK,CAAC;EACjB,CAAC;AAED,EAAA,OAAO,CAACD,MAAM,EAAEC,SAAS,CAAC;AAC3B;;;;"}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Demo for useBreakpoint hook
4
3
  *
@@ -8,4 +8,4 @@
8
8
  * @param disabled - If the hook should be disabled.
9
9
  * @param excludeSelectors - Optional array of CSS selectors to exclude from the outside click detection.
10
10
  */
11
- export declare const useClickOutside: (menuRef: React.RefObject<HTMLElement>, triggerRef: React.RefObject<HTMLElement> | undefined, eventType: "click" | "mousedown" | "mouseup" | undefined, onOutsideClick: () => void, disabled?: boolean, excludeSelectors?: string[]) => void;
11
+ export declare const useClickOutside: (menuRef: React.RefObject<HTMLElement>, triggerRef: React.RefObject<HTMLElement> | undefined, eventType: "mousedown" | "mouseup" | "click" | undefined, onOutsideClick: () => void, disabled?: boolean, excludeSelectors?: string[]) => void;
@@ -57,23 +57,18 @@ $mrl-notification-close-inset: var(--mrl-spacing-02);
57
57
  );
58
58
  position: relative;
59
59
  }
60
+ .mrl-blockNotification-heading {
61
+ color: var(--mrl-blockNotification-heading-color);
62
+ }
60
63
  .mrl-blockNotification-message {
61
64
  align-items: center;
62
65
  max-width: 45rem;
63
- h2,
64
- p {
65
- display: contents;
66
- }
67
- h2::after {
68
- content: '\00a0';
69
- display: contents;
66
+ .mrl-blockNotification-heading {
67
+ display: inline;
68
+ margin-right: var(--mrl-blockNotification-inline-spacing-message);
70
69
  }
71
70
  p {
72
71
  @include mrl-text-static('small');
72
+ display: contents;
73
73
  }
74
74
  }
75
- .mrl-blockNotification-heading {
76
- color: var(--mrl-blockNotification-heading-color);
77
- display: inline;
78
- margin-right: var(--mrl-blockNotification-inline-spacing-message);
79
- }
package/dist/styles.css CHANGED
@@ -411,7 +411,7 @@
411
411
  ) var(--mrl-modal-padding-vertical-bottom) var(--mrl-modal-padding-horizontal);transition:box-shadow var(--mrl-duration-04) var(--mrl-timing-m2)}.mrl-modal-scroll-shadow-top--uMyh_{box-shadow:var(--mrl-shadow-01);border-top-left-radius:var(--mrl-modal-border-radius);border-top-right-radius:var(--mrl-modal-border-radius)}
412
412
  .mrl-u-focus-wrapper--NJiZg{position:relative}:root{--mrl-button-background-color-skeleton: var(--mrl-color-skeleton);--mrl-button-border-radius: var(--mrl-border-radius-functional)}.mrl-u-preHydrateSkeleton--fzk0A mrl-button:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-icon-button:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-shadow-button:not(.hydrated--nDK2K){min-height:var(--mrl-spacing-09);min-width:var(--mrl-spacing-09);background:var(--mrl-button-background-color-skeleton);border-radius:var(--mrl-button-border-radius);box-shadow:none;color:rgba(0,0,0,0);display:inline-flex;font-family:var(--mrl-body-font);pointer-events:none;visibility:inherit}.mrl-u-preHydrateSkeleton--fzk0A mrl-button[kind=inverse]:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-button[kind=ghost-inverse]:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-icon-button[kind=inverse]:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-icon-button[kind=ghost-inverse]:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-shadow-button[kind=inverse]:not(.hydrated--nDK2K),.mrl-u-preHydrateSkeleton--fzk0A mrl-shadow-button[kind=ghost-inverse]:not(.hydrated--nDK2K){--mrl-button-background-color-skeleton: var(--mrl-color-skeleton-inverse)}mrl-button[size=small],mrl-shadow-button[size=small]{min-height:var(--mrl-spacing-08)}mrl-icon-button[size=small]{min-height:var(--mrl-spacing-08);min-width:var(--mrl-spacing-08)}mrl-button[size=large],mrl-shadow-button[size=large]{min-height:calc(var(--mrl-spacing-09) + var(--mrl-spacing-02))}mrl-icon-button[size=large]{min-height:calc(var(--mrl-spacing-09) + var(--mrl-spacing-02));min-width:calc(var(--mrl-spacing-09) + var(--mrl-spacing-02))}mrl-icon-button[size=xsmall][kind=ghost],mrl-icon-button[size=xsmall][kind=ghost-inverse]{min-height:var(--mrl-spacing-07);min-width:var(--mrl-spacing-07)}.mrl-blockNotification--xbhrd{--mrl-blockNotification-background: var(--mrl-color-background-info);--mrl-blockNotification-background-general: rgba(var(--mrl-gray-100), 1);--mrl-blockNotification-color: rgba(var(--mrl-gray-10), 1);--mrl-blockNotification-heading-color: var(--mrl-color-text-inverse);--mrl-blockNotification-height: var(--mrl-spacing-09);--mrl-blockNotification-inline-spacing: var(--mrl-spacing-03);--mrl-blockNotification-inline-spacing-message: var(--mrl-spacing-02);--mrl-blockNotification-inset-spacing: var(--mrl-spacing-02) var(--mrl-spacing-07);--mrl-blockNotification-radius: 0;--mrl-blockNotification-svg-color: var(--mrl-color-text-inverse)}.mrl-blockNotification--xbhrd[data-kind=info]{--mrl-blockNotification-background: var(--mrl-color-background-info)}.mrl-blockNotification--xbhrd[data-kind=info][data-scope=inline]{--mrl-blockNotification-background: var(--mrl-color-background-info-light);--mrl-blockNotification-color: var(--mrl-color-text-info);--mrl-blockNotification-svg-color: var(--mrl-color-text-info);--mrl-blockNotification-heading-color: var(--mrl-color-text-info)}.mrl-blockNotification--xbhrd[data-kind=error]{--mrl-blockNotification-background: var(--mrl-color-background-error)}.mrl-blockNotification--xbhrd[data-kind=error][data-scope=inline]{--mrl-blockNotification-background: var(--mrl-color-background-error-light);--mrl-blockNotification-color: var(--mrl-color-text-error);--mrl-blockNotification-svg-color: var(--mrl-color-text-error);--mrl-blockNotification-heading-color: var(--mrl-color-text-error)}.mrl-blockNotification--xbhrd[data-kind=success]{--mrl-blockNotification-background: var(--mrl-color-background-success)}.mrl-blockNotification--xbhrd[data-kind=success][data-scope=inline]{--mrl-blockNotification-background: var(--mrl-color-background-success-light);--mrl-blockNotification-color: var(--mrl-color-text-success);--mrl-blockNotification-svg-color: var(--mrl-color-text-success);--mrl-blockNotification-heading-color: var(--mrl-color-text-success)}.mrl-blockNotification--xbhrd[data-kind=warning]{--mrl-blockNotification-background: var(--mrl-color-background-warning);--mrl-blockNotification-color: rgba(var(--mrl-gray-90), 1);--mrl-blockNotification-heading-color: rgba(var(--mrl-black), 1);--mrl-blockNotification-svg-color: rgba(var(--mrl-color-text-warning), 1)}.mrl-blockNotification--xbhrd[data-kind=warning][data-scope=inline]{--mrl-blockNotification-background: var(--mrl-color-background-warning-light);--mrl-blockNotification-color: var(--mrl-color-text-warning);--mrl-blockNotification-heading-color: var(--mrl-color-text-warning);--mrl-blockNotification-svg-color: rgba(var(--mrl-status-warning), 1)}.mrl-blockNotification--xbhrd[data-kind=general],.mrl-blockNotification--xbhrd[data-kind=private]{--mrl-blockNotification-background: var(--mrl-blockNotification-background-general)}.mrl-blockNotification--xbhrd[data-scope=inline]{--mrl-blockNotification-radius: var(--mrl-border-radius-content-large);--mrl-blockNotification-inset-spacing: calc(var(--mrl-spacing-03) + var(--mrl-spacing-01)) var(--mrl-spacing-04);--mrl-blockNotification-cta-spacing: calc( calc(var(--mrl-spacing-03) - var(--mrl-spacing-01)) * -1 ) calc(var(--mrl-spacing-03) * -1) calc(calc(var(--mrl-spacing-03) - var(--mrl-spacing-01)) * -1) 0}.mrl-blockNotification-icon--CAq04{display:flex;min-width:fit-content}.mrl-blockNotification-icon--CAq04 svg{color:var(--mrl-blockNotification-svg-color)}.mrl-blockNotification--xbhrd{margin-top:0;opacity:1;transition-duration:var(--mrl-duration-03);transition-property:margin opacity;transition-timing-function:var(--mrl-timing-m1);align-items:center;background:var(--mrl-blockNotification-background);color:var(--mrl-blockNotification-color);display:flex;flex-direction:row;gap:var(--mrl-blockNotification-inline-spacing);justify-content:center;min-height:var(--mrl-blockNotification-height);padding:var(--mrl-blockNotification-inset-spacing);position:relative;width:100%}.mrl-blockNotification--xbhrd .mrl-blockNotification-close-wrapper--yODTH{position:absolute;right:var(--mrl-spacing-02);top:50%;transform:translateY(-50%)}.mrl-blockNotification--xbhrd .mrl-blockNotification-close-wrapper--yODTH svg{color:var(--mrl-blockNotification-color)}.mrl-blockNotification--xbhrd[data-scope=inline]{display:inline-flex;justify-content:start;position:relative;width:100%}.mrl-blockNotification--xbhrd[data-scope=inline] .cta--gnyoO{margin:var(--mrl-blockNotification-cta-spacing)}.mrl-blockNotification--xbhrd[data-scope=inline] .mrl-blockNotification-icon--CAq04{align-self:baseline}.mrl-blockNotification--xbhrd[data-scope=inline] .mrl-blockNotification-close-wrapper--yODTH{position:absolute;top:20px}.mrl-blockNotification--dismissible--ZlIID{padding-right:calc(
413
413
  var(--mrl-spacing-02) + var(--mrl-blockNotification-inline-spacing) + var(--mrl-spacing-08)
414
- );position:relative}.mrl-blockNotification-message--MdtXZ{align-items:center;max-width:45rem}.mrl-blockNotification-message--MdtXZ h2,.mrl-blockNotification-message--MdtXZ p{display:contents}.mrl-blockNotification-message--MdtXZ h2::after{content:" ";display:contents}.mrl-blockNotification-message--MdtXZ p{font-family:var(--mrl-body-font);font-size:var(--mrl-type-size-text-small);font-weight:var(--mrl-type-weight-text);letter-spacing:var(--mrl-type-spacing-text);line-height:var(--mrl-type-line-height-text-small)}.mrl-blockNotification-heading--WGPWE{color:var(--mrl-blockNotification-heading-color);display:inline;margin-right:var(--mrl-blockNotification-inline-spacing-message)}
414
+ );position:relative}.mrl-blockNotification-heading--WGPWE{color:var(--mrl-blockNotification-heading-color)}.mrl-blockNotification-message--MdtXZ{align-items:center;max-width:45rem}.mrl-blockNotification-message--MdtXZ .mrl-blockNotification-heading--WGPWE{display:inline;margin-right:var(--mrl-blockNotification-inline-spacing-message)}.mrl-blockNotification-message--MdtXZ p{font-family:var(--mrl-body-font);font-size:var(--mrl-type-size-text-small);font-weight:var(--mrl-type-weight-text);letter-spacing:var(--mrl-type-spacing-text);line-height:var(--mrl-type-line-height-text-small);display:contents}
415
415
  .mrl-u-focus-wrapper{position:relative}.mrl-blockNotification{border-radius:var(--mrl-blockNotification-radius)}.mrl-blockNotification.mrl-is--transitioning{opacity:0}.mrl-blockNotification.mrl-is--closed{display:none;padding:0}@media(prefers-reduced-motion: no-preference){.mrl-blockNotification.mrl-is--transitioning{margin-top:calc(var(--mrl-blockNotification-height)*-1)}}
416
416
  .MrlToast--WHnT9{align-items:center;background-color:rgba(var(--mrl-status-info), 1);border-radius:var(--mrl-border-radius-container);box-shadow:var(--mrl-shadows-lifted);color:rgba(var(--mrl-white), 1);display:flex;justify-content:space-between;max-width:32rem;min-width:8.75rem;padding:calc(var(--mrl-spacing-01) + var(--mrl-spacing-02)) var(--mrl-spacing-05) calc(var(--mrl-spacing-01) + var(--mrl-spacing-02)) var(--mrl-spacing-03);pointer-events:auto;width:fit-content;z-index:800}.MrlToast--WHnT9.has-cta--D2bJy{padding:var(--mrl-spacing-02) var(--mrl-spacing-02) var(--mrl-spacing-02) var(--mrl-spacing-03)}.MrlToast--WHnT9.has-avatar--KFztL{padding-left:var(--mrl-spacing-02)}.MrlToast--WHnT9.closing--ORG1o{animation:fadeout--tteGt .3s forwards}@keyframes fadeout--tteGt{from{opacity:1}to{opacity:0;visibility:hidden}}.MrlToast--WHnT9 .content--PsaqT{align-items:center;display:flex}.MrlToast--WHnT9 .content--PsaqT .iconWrapper--NSYKT{align-items:center;display:flex;flex-shrink:0;height:var(--mrl-spacing-06);margin-right:calc(var(--mrl-spacing-01) + var(--mrl-spacing-02))}.MrlToast--WHnT9 .content--PsaqT .avatarWrapper--TKMkv{align-items:center;display:flex;flex-shrink:0;height:var(--mrl-spacing-06);margin-right:var(--mrl-spacing-02)}.MrlToast--WHnT9 .content--PsaqT .textContent--g9ima{font-size:var(--mrl-font-size-03);letter-spacing:var(--mrl-letter-spacing-03);line-height:var(--mrl-line-height-02)}.MrlToast--WHnT9 .content--PsaqT .primaryMessage--CwHWD{font-family:var(--mrl-heading-font);font-weight:var(--mrl-font-weight-04)}.MrlToast--WHnT9 .content--PsaqT .secondaryMessage--VMVbR{font-family:var(--mrl-body-font);font-weight:var(--mrl-font-weight-01)}.MrlToast--WHnT9 .content--PsaqT .link--Qccyr{margin-left:var(--mrl-spacing-02)}.MrlToast--WHnT9 .cta-container--HMghw{align-items:center;display:flex;height:100%;justify-content:center;margin-left:calc(var(--mrl-spacing-03) + var(--mrl-spacing-01))}.MrlToast--WHnT9 .cta--hhAlS{display:flex;gap:var(--mrl-space-inline-sibling);vertical-align:middle}.MrlToast--WHnT9 .cta--secondary--qRqGT{margin-right:var(--mrl-spacing-02)}.MrlToast--WHnT9 .cta--close--yi8kz{margin-left:var(--mrl-spacing-02)}.MrlToast--WHnT9 .cta--close--yi8kz:only-child{margin-left:calc(var(--mrl-spacing-01) + var(--mrl-spacing-02))}.MrlToast--WHnT9.infoNotification--GObYB{background-color:rgba(var(--mrl-status-info), 1)}.MrlToast--WHnT9.warningNotification--nnWE0{background-color:rgba(var(--mrl-status-warning), 1);color:var(--mrl-color-text)}.MrlToast--WHnT9.successNotification--kirSR{background-color:rgba(var(--mrl-status-success), 1)}.MrlToast--WHnT9.errorNotification--lPM7c{background-color:rgba(var(--mrl-status-error), 1)}.MrlToast--WHnT9.privateNotification--Uzbo_{background-color:rgba(var(--mrl-status-private), 1)}.MrlToast--WHnT9.generalNotification--Qmi6y{background-color:var(--mrl-color-background-inverse);color:var(--mrl-color-text-inverse);max-width:100%}.MrlToast--WHnT9.generalNotification--Qmi6y .secondaryMessage--VMVbR{color:var(--mrl-color-text-inverse-secondary)}.MrlToast--WHnT9.collaboratorNotification--JUtKn{background-color:rgba(0,0,0,0)}.MrlToast--WHnT9.collaboratorNotification--JUtKn .primaryMessage--CwHWD{align-items:center;display:flex;gap:var(--mrl-spacing-04)}.MrlToast--WHnT9.collaboratorNotification--JUtKn.darkCollaborator--sIsI9{color:var(--mrl-color-text)}
417
417
  .MrlInlineMessage--QFQ5I{display:flex;font-size:var(--mrl-font-size-03);font-weight:var(--mrl-font-weight-02);margin-top:var(--mrl-spacing-02)}.MrlInlineMessage--QFQ5I:not(.helper--t6Wxz) a{color:inherit}.MrlInlineMessage--QFQ5I.error--dG1GD{color:var(--mrl-color-text-error)}.MrlInlineMessage--QFQ5I.information--FFyzz{color:var(--mrl-color-text-emph)}.MrlInlineMessage--QFQ5I.information--FFyzz .MrlSvgContainer{color:var(--mrl-color-background-info)}.MrlInlineMessage--QFQ5I.warning--G_zyY{color:var(--mrl-color-text-emph)}.MrlInlineMessage--QFQ5I.warning--G_zyY .MrlSvgContainer{color:var(--mrl-color-background-warning)}.MrlInlineMessage--QFQ5I.success--nrMdN .MrlSvgContainer{color:var(--mrl-color-text-success)}.MrlInlineMessage--QFQ5I.success--nrMdN .MrlSvgContainer.mrl-link-icon,.MrlInlineMessage--QFQ5I.warning--G_zyY .MrlSvgContainer.mrl-link-icon,.MrlInlineMessage--QFQ5I.information--FFyzz .MrlSvgContainer.mrl-link-icon{color:inherit}.MrlInlineMessage--QFQ5I.helper--t6Wxz{color:var(--mrl-color-text-secondary)}.MrlInlineMessage-icon--Lvzuc{flex-shrink:0;height:var(--mrl-spacing-05);margin-right:var(--mrl-spacing-02);width:var(--mrl-spacing-05)}
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * MrlBreadcrumbSeparator component.
4
3
  * @returns The MrlBreadcrumbSeparator component.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AttrsObject } from '../../../utils';
3
2
  import { Kind, Orientation, Spacing, Weight } from '../constants';
4
3
  interface MrlDividerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MrlEmptyProps {
3
2
  graphic?: JSX.Element;
4
3
  heading: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MrlEmptyLargeProps {
3
2
  graphic?: JSX.Element;
4
3
  heading: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AttrsObject } from '../../../../utils';
3
2
  import { CheckboxSelected, CheckboxStates } from '../../constants';
4
3
  import './MrlCheckboxStandalone.global.scss';
@@ -1,5 +1,4 @@
1
1
  import * as React from 'react';
2
- import { ReactElement } from 'react';
3
2
  import { SelectMenuPositions } from '../../constants';
4
3
  import { AttrsObject } from '../../../../utils';
5
4
  export interface MrlLegacySelectMenuProptypes extends React.HTMLAttributes<HTMLDivElement> {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CreatableProps } from 'react-select/creatable';
3
2
  import { GroupBase } from 'react-select';
4
3
  import { SelectKind } from '../types';
@@ -17,7 +16,7 @@ export interface MrlCreatableSelectProps<Option, IsMulti extends boolean = false
17
16
  showClearIndicatorIcon?: boolean;
18
17
  }
19
18
  export declare const CREATABLE_SELECT_CLASS_NAME_PREFIX = "MrlCreatableSelect";
20
- export declare const CREATABLE_SELECT_MENU_LIST_CLASS_NAME: string;
19
+ export declare const CREATABLE_SELECT_MENU_LIST_CLASS_NAME = "MrlCreatableSelect__menu-list";
21
20
  /**
22
21
  * MrlCreatableSelect component that supports creating extra options with user input. Option creating could be async too.
23
22
  * @param props - the component props
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CreatableProps } from 'react-select/creatable';
3
2
  import { GroupBase } from 'react-select';
4
3
  import { DefaultOption, SelectKind } from '../types';
@@ -17,7 +16,7 @@ export interface MrlMultiCreatableSelectProps<Option, IsMulti extends boolean =
17
16
  showClearIndicatorIcon?: boolean;
18
17
  }
19
18
  export declare const MULTI_CREATABLE_SELECT_CLASS_NAME_PREFIX = "MrlMultiCreatableSelect";
20
- export declare const MULTI_CREATABLE_SELECT_MENU_LIST_CLASS_NAME: string;
19
+ export declare const MULTI_CREATABLE_SELECT_MENU_LIST_CLASS_NAME = "MrlMultiCreatableSelect__menu-list";
21
20
  /**
22
21
  * MrlMultiCreatableSelect component that supports creating extra options with user input. Option creating could be async too.
23
22
  * @param props - the component props
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, Props } from 'react-select';
3
2
  import { DefaultOption, SelectKind } from '../types';
4
3
  export interface MrlMultiSelectProps<T, IsMulti extends boolean = false, Group extends GroupBase<T> = GroupBase<T>> extends Omit<Props<T, IsMulti, Group>, 'isMulti' | 'hideSelectedOptions'> {
@@ -15,7 +14,7 @@ export interface MrlMultiSelectProps<T, IsMulti extends boolean = false, Group e
15
14
  ['data-qa']?: string;
16
15
  }
17
16
  export declare const MULTI_SELECT_CLASS_NAME_PREFIX = "MrlMultiSelect";
18
- export declare const MULTI_SELECT_MENU_LIST_CLASS_NAME: string;
17
+ export declare const MULTI_SELECT_MENU_LIST_CLASS_NAME = "MrlMultiSelect__menu-list";
19
18
  /**
20
19
  * MrlSelect component
21
20
  * @param props - the component props
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, Props } from 'react-select';
3
2
  import { SelectKind } from '../types';
4
3
  export interface MrlSelectProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
@@ -15,7 +14,7 @@ export interface MrlSelectProps<Option, IsMulti extends boolean = false, Group e
15
14
  ['data-qa']?: string;
16
15
  }
17
16
  export declare const SELECT_CLASS_NAME_PREFIX = "MrlSelect";
18
- export declare const SELECT_MENU_LIST_CLASS_NAME: string;
17
+ export declare const SELECT_MENU_LIST_CLASS_NAME = "MrlSelect__menu-list";
19
18
  /**
20
19
  * MrlSelect component
21
20
  * @param props - the component props
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ClearIndicatorProps, GroupBase } from 'react-select';
3
2
  /**
4
3
  * MrlSelectClearIndicator component
@@ -1,8 +1,10 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, ContainerProps } from 'react-select';
3
2
  /**
4
3
  * MrlSelectContainer component
5
4
  *
5
+ * Adds `data-qa` support and keeps the `Escape` press that dismisses an open menu
6
+ * from also closing an outer dismissible surface (e.g. a select inside MrlModal).
7
+ *
6
8
  * @param props - the react-select container props
7
9
  * @returns a select container
8
10
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DropdownIndicatorProps, GroupBase } from 'react-select';
3
2
  /**
4
3
  * MrlSelectDropdownIndicator component
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, MultiValueProps } from 'react-select';
3
2
  import { DefaultOption } from '../types';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, MultiValueRemoveProps } from 'react-select';
3
2
  /**
4
3
  * MrlSelectMultiValueRemove component
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, OptionProps } from 'react-select';
3
2
  /**
4
3
  * MrlSelectOption component
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { GroupBase, ValueContainerProps } from 'react-select';
3
2
  /**
4
3
  * MrlSelectValueContainer component
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ interface MenuEscapeContainmentHandlers {
3
+ onKeyDown: React.KeyboardEventHandler<HTMLDivElement>;
4
+ onKeyUp: React.KeyboardEventHandler<HTMLDivElement>;
5
+ }
6
+ /**
7
+ * Keeps the `Escape` press that dismisses an open select menu from reaching outer
8
+ * dismissible surfaces. MrlModal, MrlPanel and MrlPopover close on `Escape` keydown
9
+ * and MrlSidebar on keyup, so without containment a single press would close the
10
+ * menu and the surface behind it at the same time.
11
+ *
12
+ * While the menu is open, the `Escape` keydown and its paired keyup stop propagating
13
+ * after react-select handles them. Once the menu is closed, `Escape` bubbles as
14
+ * usual so the outer surface can respond to the next press.
15
+ *
16
+ * @param menuIsOpen - the resolved react-select menu state
17
+ * @param onKeyDown - react-select's container keydown handler to wrap
18
+ * @returns key event handlers to spread into the select container's `innerProps`
19
+ */
20
+ export declare function useMenuEscapeContainment(menuIsOpen: boolean, onKeyDown: React.KeyboardEventHandler<HTMLDivElement> | undefined): MenuEscapeContainmentHandlers;
21
+ export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AttrsObject } from '../../../../utils';
3
2
  import './MrlTextarea.global.scss';
4
3
  type MrlTextareaState = 'default' | 'disabled' | 'error' | 'read-only';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../../layout/constants';
3
2
  import { GridColumns } from '../constants';
4
3
  type MrlCol = LayoutComponent & GridColumns;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../../layout/constants';
3
2
  import '../grid.variables.scss';
4
3
  import '../grid.global.scss';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../../layout/constants';
3
2
  import { AlignOptions, GutterSizes, JustifyOptions } from '../constants';
4
3
  interface MrlRow extends LayoutComponent {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../constants';
3
2
  /**
4
3
  * MrlMain React component.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../constants';
3
2
  type MrlPage = LayoutComponent;
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent } from '../constants';
3
2
  type MrlPage = LayoutComponent;
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * MrlSidebar demo with the use of the forward ref to make open/close/toggle the sidebar
4
3
  * through buttons as children and outside of the sidebar.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { LayoutComponent, LayoutSection } from '../constants';
3
2
  type MrlTopbar = LayoutComponent & LayoutSection;
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface LayoutComponent {
3
2
  /**
4
3
  * Children to be rendered within the component.
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface MrlBrandColorsProps {
3
2
  /**
4
3
  * Custom class name to be added to the component
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Demo of a live region
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ProgressBarComponent } from '../constants';
3
2
  import '../../../styles/shared/a11y-helpers/a11y.global.scss';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SpinnerComponent } from '../constants';
3
2
  import '../../../styles/shared/a11y-helpers/a11y.global.scss';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type CreateArrayWithLengthX<LENGTH extends number, ACC extends unknown[] = []> = ACC['length'] extends LENGTH ? ACC : CreateArrayWithLengthX<LENGTH, [...ACC, 1]>;
3
2
  type NumericRange<START_ARR extends number[], END extends number, ACC extends number = never> = START_ARR['length'] extends END ? ACC | END : NumericRange<[...START_ARR, 1], END, ACC | START_ARR['length']>;
4
3
  export type ProgressRange = NumericRange<CreateArrayWithLengthX<0>, 100>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export type MenuPosition = 'bottom' | 'left' | 'right' | 'top' | 'static' | MenuIgnore;
3
2
  export type MenuAlignment = 'start' | 'end' | 'center';
4
3
  export type HorizontalAlign = 'left' | 'right' | 'center';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Demo of a menu with a trigger for stories and testing
4
3
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuPosition, ActionState, MenuAlignment } from '../constants';
3
2
  interface MenuWithPopoverProps {
4
3
  position?: MenuPosition;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuPosition, ActionState, MenuAlignment } from '../constants';
3
2
  interface MenuWithSubmenuProps {
4
3
  position?: MenuPosition;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CustomMenuPosition } from '../';
3
2
  import { MenuPosition, ActionState, MenuAlignment } from '../constants';
4
3
  export interface MenuWithTriggerProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../MrlModal/stories.scss';
3
2
  interface ModalDemoProps {
4
3
  /** Additional function to be run when the modal closes */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MrlPaginationTextProps {
3
2
  /** Additional class to add to the container element */
4
3
  className?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuPosition, ActionState, MenuAlignment } from '../../menu/constants';
3
2
  interface PopoverWithIconButtonProps {
4
3
  hasCloseButton?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuPosition, ActionState, MenuAlignment } from '../../menu/constants';
3
2
  interface PopoverWithSelectProps {
4
3
  hasCloseButton?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuPosition, ActionState, MenuAlignment } from '../../menu/constants';
3
2
  interface PopoverWithTriggerProps {
4
3
  hasCloseButton?: boolean;
@@ -1,11 +1,10 @@
1
- /// <reference types="react" />
2
- import { MrlSmartCellRendererProps, MrlSmartTableColumn } from './MrlSmartTable';
3
- export declare const LicenseCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
4
- export declare const MemberSinceCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
5
- export declare const LastSeenCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
6
- export declare const CreateRoomCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
7
- export declare const SeeOpenRoomsCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
8
- export declare const PublishTemplatesCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
9
- export declare const WorkspaceAdminCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
10
- export declare const ActionsCell: ((props: MrlSmartCellRendererProps) => JSX.Element) | undefined;
1
+ import { MrlSmartTableColumn } from './MrlSmartTable';
2
+ export declare const LicenseCell: MrlSmartTableColumn["renderCell"];
3
+ export declare const MemberSinceCell: MrlSmartTableColumn["renderCell"];
4
+ export declare const LastSeenCell: MrlSmartTableColumn["renderCell"];
5
+ export declare const CreateRoomCell: MrlSmartTableColumn["renderCell"];
6
+ export declare const SeeOpenRoomsCell: MrlSmartTableColumn["renderCell"];
7
+ export declare const PublishTemplatesCell: MrlSmartTableColumn["renderCell"];
8
+ export declare const WorkspaceAdminCell: MrlSmartTableColumn["renderCell"];
9
+ export declare const ActionsCell: MrlSmartTableColumn["renderCell"];
11
10
  export declare const SAMPLE_COLUMNS_WITH_EDIT_ICON_BUTTON: MrlSmartTableColumn[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface MrlTableEmptyStateProps {
3
2
  /**
4
3
  * Text to be displayed in the empty state.
@@ -19,7 +19,7 @@ export declare const sortAlphabeticallyAsCoercedStrings: (a: unknown, b: unknown
19
19
  * @param {string[]} keys a set of properties to uniquely identify the element
20
20
  * @returns {string} the generated key
21
21
  */
22
- export declare const keyFor: (prefix: string, elementType: 'header' | 'column' | 'body' | 'row' | 'row-cell', ...keys: string[]) => string;
22
+ export declare const keyFor: (prefix: string, elementType: "header" | "column" | "body" | "row" | "row-cell", ...keys: string[]) => string;
23
23
  /**
24
24
  * Provides sort icon based on direction.
25
25
  *
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Props for the MrlToolbarItem component.
4
3
  */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * Demo for useBreakpoint hook
4
3
  *
@@ -8,4 +8,4 @@
8
8
  * @param disabled - If the hook should be disabled.
9
9
  * @param excludeSelectors - Optional array of CSS selectors to exclude from the outside click detection.
10
10
  */
11
- export declare const useClickOutside: (menuRef: React.RefObject<HTMLElement>, triggerRef: React.RefObject<HTMLElement> | undefined, eventType: "click" | "mousedown" | "mouseup" | undefined, onOutsideClick: () => void, disabled?: boolean, excludeSelectors?: string[]) => void;
11
+ export declare const useClickOutside: (menuRef: React.RefObject<HTMLElement>, triggerRef: React.RefObject<HTMLElement> | undefined, eventType: "mousedown" | "mouseup" | "click" | undefined, onOutsideClick: () => void, disabled?: boolean, excludeSelectors?: string[]) => void;
@@ -5,4 +5,4 @@
5
5
  * @param direction - The direction to search in
6
6
  * @returns The interactive element or null if none is found
7
7
  */
8
- export declare const findAdjacentInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: 'next' | 'previous') => HTMLElement | null;
8
+ export declare const findAdjacentInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: "next" | "previous") => HTMLElement | null;
@@ -5,4 +5,4 @@
5
5
  * @param direction - The direction to search in
6
6
  * @returns The interactive element or null if none is found
7
7
  */
8
- export declare const findAdjacentInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: 'next' | 'previous') => HTMLElement | null;
8
+ export declare const findAdjacentInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: "next" | "previous") => HTMLElement | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muraldevkit/ui-toolkit",
3
- "version": "4.70.1",
3
+ "version": "4.70.3-dev-kmM6.1",
4
4
  "description": "Mural's UI Toolkit",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -80,12 +80,13 @@
80
80
  "@types/jest": "29.5.1",
81
81
  "@types/lodash.debounce": "4.0.7",
82
82
  "@types/lodash.uniqueid": "4.0.9",
83
+ "@types/node": "22.19.1",
83
84
  "@types/path-browserify": "1.0.2",
84
85
  "@types/react": "18.2.22",
85
86
  "@types/react-dom": "18.2.7",
86
87
  "@types/react-router-dom": "5.3.3",
87
- "@typescript-eslint/eslint-plugin": "8.35.1",
88
- "@typescript-eslint/parser": "8.35.1",
88
+ "@typescript-eslint/eslint-plugin": "8.64.0",
89
+ "@typescript-eslint/parser": "8.64.0",
89
90
  "babel-loader": "9.1.2",
90
91
  "copy-webpack-plugin": "11.0.0",
91
92
  "css-loader": "6.7.3",
@@ -123,9 +124,9 @@
123
124
  "stylelint-config-standard-scss": "13.1.0",
124
125
  "stylelint-order": "6.0.4",
125
126
  "stylelint-scss": "6.8.1",
126
- "ts-jest": "29.1.0",
127
- "ts-loader": "9.4.2",
128
- "typescript": "5.0.4",
127
+ "ts-jest": "29.4.11",
128
+ "ts-loader": "9.6.2",
129
+ "typescript": "6.0.3",
129
130
  "webpack": "5.100.2",
130
131
  "webpack-bundle-analyzer": "4.10.2",
131
132
  "webpack-cli": "5.0.1"
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};