@mongodb-js/compass-components 1.52.1 → 1.52.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/lib/components/drawer-portal.d.ts +6 -5
  2. package/lib/components/drawer-portal.d.ts.map +1 -1
  3. package/lib/components/drawer-portal.js +51 -24
  4. package/lib/components/drawer-portal.js.map +1 -1
  5. package/lib/components/leafygreen.d.ts +0 -1
  6. package/lib/components/leafygreen.d.ts.map +1 -1
  7. package/lib/components/leafygreen.js +2 -4
  8. package/lib/components/leafygreen.js.map +1 -1
  9. package/package.json +4 -4
  10. package/lib/components/drawer/constants.d.ts +0 -9
  11. package/lib/components/drawer/constants.d.ts.map +0 -1
  12. package/lib/components/drawer/constants.js +0 -13
  13. package/lib/components/drawer/constants.js.map +0 -1
  14. package/lib/components/drawer/drawer/drawer.constants.d.ts +0 -3
  15. package/lib/components/drawer/drawer/drawer.constants.d.ts.map +0 -1
  16. package/lib/components/drawer/drawer/drawer.constants.js +0 -6
  17. package/lib/components/drawer/drawer/drawer.constants.js.map +0 -1
  18. package/lib/components/drawer/drawer/drawer.d.ts +0 -4
  19. package/lib/components/drawer/drawer/drawer.d.ts.map +0 -1
  20. package/lib/components/drawer/drawer/drawer.js +0 -143
  21. package/lib/components/drawer/drawer/drawer.js.map +0 -1
  22. package/lib/components/drawer/drawer/drawer.styles.d.ts +0 -29
  23. package/lib/components/drawer/drawer/drawer.styles.d.ts.map +0 -1
  24. package/lib/components/drawer/drawer/drawer.styles.js +0 -174
  25. package/lib/components/drawer/drawer/drawer.styles.js.map +0 -1
  26. package/lib/components/drawer/drawer/drawer.types.d.ts +0 -40
  27. package/lib/components/drawer/drawer/drawer.types.d.ts.map +0 -1
  28. package/lib/components/drawer/drawer/drawer.types.js +0 -13
  29. package/lib/components/drawer/drawer/drawer.types.js.map +0 -1
  30. package/lib/components/drawer/drawer/index.d.ts +0 -5
  31. package/lib/components/drawer/drawer/index.d.ts.map +0 -1
  32. package/lib/components/drawer/drawer/index.js +0 -12
  33. package/lib/components/drawer/drawer/index.js.map +0 -1
  34. package/lib/components/drawer/drawer-layout/drawer-layout.d.ts +0 -17
  35. package/lib/components/drawer/drawer-layout/drawer-layout.d.ts.map +0 -1
  36. package/lib/components/drawer/drawer-layout/drawer-layout.js +0 -57
  37. package/lib/components/drawer/drawer-layout/drawer-layout.js.map +0 -1
  38. package/lib/components/drawer/drawer-layout/drawer-layout.types.d.ts +0 -34
  39. package/lib/components/drawer/drawer-layout/drawer-layout.types.d.ts.map +0 -1
  40. package/lib/components/drawer/drawer-layout/drawer-layout.types.js +0 -3
  41. package/lib/components/drawer/drawer-layout/drawer-layout.types.js.map +0 -1
  42. package/lib/components/drawer/drawer-layout/index.d.ts +0 -3
  43. package/lib/components/drawer/drawer-layout/index.d.ts.map +0 -1
  44. package/lib/components/drawer/drawer-layout/index.js +0 -6
  45. package/lib/components/drawer/drawer-layout/index.js.map +0 -1
  46. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.d.ts +0 -8
  47. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.d.ts.map +0 -1
  48. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.js +0 -71
  49. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.js.map +0 -1
  50. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.d.ts +0 -21
  51. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.d.ts.map +0 -1
  52. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.js +0 -3
  53. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.js.map +0 -1
  54. package/lib/components/drawer/drawer-stack-context/index.d.ts +0 -3
  55. package/lib/components/drawer/drawer-stack-context/index.d.ts.map +0 -1
  56. package/lib/components/drawer/drawer-stack-context/index.js +0 -8
  57. package/lib/components/drawer/drawer-stack-context/index.js.map +0 -1
  58. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.d.ts +0 -6
  59. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.d.ts.map +0 -1
  60. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.js +0 -85
  61. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.js.map +0 -1
  62. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.d.ts +0 -37
  63. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.d.ts.map +0 -1
  64. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.js +0 -3
  65. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.js.map +0 -1
  66. package/lib/components/drawer/drawer-toolbar-context/index.d.ts +0 -2
  67. package/lib/components/drawer/drawer-toolbar-context/index.d.ts.map +0 -1
  68. package/lib/components/drawer/drawer-toolbar-context/index.js +0 -7
  69. package/lib/components/drawer/drawer-toolbar-context/index.js.map +0 -1
  70. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.d.ts +0 -18
  71. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.d.ts.map +0 -1
  72. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.js +0 -86
  73. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.js.map +0 -1
  74. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.d.ts +0 -15
  75. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.d.ts.map +0 -1
  76. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.js +0 -50
  77. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.js.map +0 -1
  78. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.d.ts +0 -2
  79. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.d.ts.map +0 -1
  80. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.js +0 -11
  81. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.js.map +0 -1
  82. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.d.ts +0 -44
  83. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.d.ts.map +0 -1
  84. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.js +0 -3
  85. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.js.map +0 -1
  86. package/lib/components/drawer/drawer-toolbar-layout/index.d.ts +0 -3
  87. package/lib/components/drawer/drawer-toolbar-layout/index.d.ts.map +0 -1
  88. package/lib/components/drawer/drawer-toolbar-layout/index.js +0 -6
  89. package/lib/components/drawer/drawer-toolbar-layout/index.js.map +0 -1
  90. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.d.ts +0 -11
  91. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.d.ts.map +0 -1
  92. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.js +0 -63
  93. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.js.map +0 -1
  94. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.d.ts +0 -10
  95. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.d.ts.map +0 -1
  96. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.js +0 -137
  97. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.js.map +0 -1
  98. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.d.ts +0 -11
  99. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.d.ts.map +0 -1
  100. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.js +0 -3
  101. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.js.map +0 -1
  102. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.d.ts +0 -2
  103. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.d.ts.map +0 -1
  104. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.js +0 -6
  105. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.js.map +0 -1
  106. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.d.ts +0 -12
  107. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.d.ts.map +0 -1
  108. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.js +0 -55
  109. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.js.map +0 -1
  110. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.d.ts +0 -6
  111. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.d.ts.map +0 -1
  112. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.js +0 -54
  113. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.js.map +0 -1
  114. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.d.ts +0 -8
  115. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.d.ts.map +0 -1
  116. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.js +0 -3
  117. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.js.map +0 -1
  118. package/lib/components/drawer/embedded-drawer-layout/index.d.ts +0 -3
  119. package/lib/components/drawer/embedded-drawer-layout/index.d.ts.map +0 -1
  120. package/lib/components/drawer/embedded-drawer-layout/index.js +0 -6
  121. package/lib/components/drawer/embedded-drawer-layout/index.js.map +0 -1
  122. package/lib/components/drawer/index.d.ts +0 -6
  123. package/lib/components/drawer/index.d.ts.map +0 -1
  124. package/lib/components/drawer/index.js +0 -17
  125. package/lib/components/drawer/index.js.map +0 -1
  126. package/lib/components/drawer/layout-component/index.d.ts +0 -3
  127. package/lib/components/drawer/layout-component/index.d.ts.map +0 -1
  128. package/lib/components/drawer/layout-component/index.js +0 -6
  129. package/lib/components/drawer/layout-component/index.js.map +0 -1
  130. package/lib/components/drawer/layout-component/layout-component.d.ts +0 -18
  131. package/lib/components/drawer/layout-component/layout-component.d.ts.map +0 -1
  132. package/lib/components/drawer/layout-component/layout-component.js +0 -53
  133. package/lib/components/drawer/layout-component/layout-component.js.map +0 -1
  134. package/lib/components/drawer/layout-component/layout-component.styles.d.ts +0 -20
  135. package/lib/components/drawer/layout-component/layout-component.styles.d.ts.map +0 -1
  136. package/lib/components/drawer/layout-component/layout-component.styles.js +0 -3
  137. package/lib/components/drawer/layout-component/layout-component.styles.js.map +0 -1
  138. package/lib/components/drawer/overlay-drawer-layout/index.d.ts +0 -3
  139. package/lib/components/drawer/overlay-drawer-layout/index.d.ts.map +0 -1
  140. package/lib/components/drawer/overlay-drawer-layout/index.js +0 -6
  141. package/lib/components/drawer/overlay-drawer-layout/index.js.map +0 -1
  142. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.d.ts +0 -11
  143. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.d.ts.map +0 -1
  144. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.js +0 -54
  145. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.js.map +0 -1
  146. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.d.ts +0 -5
  147. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.d.ts.map +0 -1
  148. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.js +0 -27
  149. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.js.map +0 -1
  150. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.d.ts +0 -3
  151. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.d.ts.map +0 -1
  152. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.js +0 -3
  153. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.js.map +0 -1
  154. package/lib/components/drawer/utils/get-lg-ids.d.ts +0 -8
  155. package/lib/components/drawer/utils/get-lg-ids.d.ts.map +0 -1
  156. package/lib/components/drawer/utils/get-lg-ids.js +0 -11
  157. package/lib/components/drawer/utils/get-lg-ids.js.map +0 -1
  158. package/lib/components/drawer/utils/index.d.ts +0 -2
  159. package/lib/components/drawer/utils/index.d.ts.map +0 -1
  160. package/lib/components/drawer/utils/index.js +0 -7
  161. package/lib/components/drawer/utils/index.js.map +0 -1
  162. package/lib/components/toolbar/constants.d.ts +0 -3
  163. package/lib/components/toolbar/constants.d.ts.map +0 -1
  164. package/lib/components/toolbar/constants.js +0 -6
  165. package/lib/components/toolbar/constants.js.map +0 -1
  166. package/lib/components/toolbar/context/index.d.ts +0 -3
  167. package/lib/components/toolbar/context/index.d.ts.map +0 -1
  168. package/lib/components/toolbar/context/index.js +0 -10
  169. package/lib/components/toolbar/context/index.js.map +0 -1
  170. package/lib/components/toolbar/context/toolbar-context.d.ts +0 -6
  171. package/lib/components/toolbar/context/toolbar-context.d.ts.map +0 -1
  172. package/lib/components/toolbar/context/toolbar-context.js +0 -65
  173. package/lib/components/toolbar/context/toolbar-context.js.map +0 -1
  174. package/lib/components/toolbar/context/toolbar-context.types.d.ts +0 -21
  175. package/lib/components/toolbar/context/toolbar-context.types.d.ts.map +0 -1
  176. package/lib/components/toolbar/context/toolbar-context.types.js +0 -3
  177. package/lib/components/toolbar/context/toolbar-context.types.js.map +0 -1
  178. package/lib/components/toolbar/context/toolbar-descendants-context.d.ts +0 -5
  179. package/lib/components/toolbar/context/toolbar-descendants-context.d.ts.map +0 -1
  180. package/lib/components/toolbar/context/toolbar-descendants-context.js +0 -10
  181. package/lib/components/toolbar/context/toolbar-descendants-context.js.map +0 -1
  182. package/lib/components/toolbar/index.d.ts +0 -5
  183. package/lib/components/toolbar/index.d.ts.map +0 -1
  184. package/lib/components/toolbar/index.js +0 -27
  185. package/lib/components/toolbar/index.js.map +0 -1
  186. package/lib/components/toolbar/toolbar/index.d.ts +0 -4
  187. package/lib/components/toolbar/toolbar/index.d.ts.map +0 -1
  188. package/lib/components/toolbar/toolbar/index.js +0 -8
  189. package/lib/components/toolbar/toolbar/index.js.map +0 -1
  190. package/lib/components/toolbar/toolbar/toolbar.d.ts +0 -4
  191. package/lib/components/toolbar/toolbar/toolbar.d.ts.map +0 -1
  192. package/lib/components/toolbar/toolbar/toolbar.js +0 -93
  193. package/lib/components/toolbar/toolbar/toolbar.js.map +0 -1
  194. package/lib/components/toolbar/toolbar/toolbar.styles.d.ts +0 -7
  195. package/lib/components/toolbar/toolbar/toolbar.styles.d.ts.map +0 -1
  196. package/lib/components/toolbar/toolbar/toolbar.styles.js +0 -26
  197. package/lib/components/toolbar/toolbar/toolbar.styles.js.map +0 -1
  198. package/lib/components/toolbar/toolbar/toolbar.types.d.ts +0 -6
  199. package/lib/components/toolbar/toolbar/toolbar.types.d.ts.map +0 -1
  200. package/lib/components/toolbar/toolbar/toolbar.types.js +0 -3
  201. package/lib/components/toolbar/toolbar/toolbar.types.js.map +0 -1
  202. package/lib/components/toolbar/toolbar-icon-button/index.d.ts +0 -3
  203. package/lib/components/toolbar/toolbar-icon-button/index.d.ts.map +0 -1
  204. package/lib/components/toolbar/toolbar-icon-button/index.js +0 -6
  205. package/lib/components/toolbar/toolbar-icon-button/index.js.map +0 -1
  206. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.d.ts +0 -4
  207. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.d.ts.map +0 -1
  208. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.js +0 -77
  209. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.js.map +0 -1
  210. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.d.ts +0 -13
  211. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.d.ts.map +0 -1
  212. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.js +0 -38
  213. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.js.map +0 -1
  214. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.d.ts +0 -19
  215. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.d.ts.map +0 -1
  216. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.js +0 -3
  217. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.js.map +0 -1
  218. package/lib/components/toolbar/utils/get-lg-ids.d.ts +0 -8
  219. package/lib/components/toolbar/utils/get-lg-ids.d.ts.map +0 -1
  220. package/lib/components/toolbar/utils/get-lg-ids.js +0 -14
  221. package/lib/components/toolbar/utils/get-lg-ids.js.map +0 -1
  222. package/lib/components/toolbar/utils/index.d.ts +0 -2
  223. package/lib/components/toolbar/utils/index.d.ts.map +0 -1
  224. package/lib/components/toolbar/utils/index.js +0 -7
  225. package/lib/components/toolbar/utils/index.js.map +0 -1
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
- import { DisplayMode as DrawerDisplayMode, type DrawerLayoutProps } from './drawer';
3
- type SectionData = Required<DrawerLayoutProps>['toolbarData'][number];
2
+ import { DisplayMode as DrawerDisplayMode, type DrawerLayoutProps } from '@leafygreen-ui/drawer';
3
+ type ToolbarData = Required<DrawerLayoutProps>['toolbarData'];
4
+ type SectionData = ToolbarData[number];
4
5
  type DrawerSectionProps = Omit<SectionData, 'content' | 'onClick'> & {
6
+ title: React.ReactNode;
5
7
  /**
6
8
  * If `true` will automatically open the section when first mounted. Default: `false`
7
9
  */
@@ -50,9 +52,7 @@ export declare const DrawerContentProvider: React.FunctionComponent;
50
52
  * DrawerAnchor component will render the drawer in any place it is rendered.
51
53
  * This component has to wrap any content that Drawer will be shown near
52
54
  */
53
- export declare const DrawerAnchor: React.FunctionComponent<{
54
- displayMode?: DrawerDisplayMode;
55
- }>;
55
+ export declare const DrawerAnchor: React.FunctionComponent;
56
56
  /**
57
57
  * DrawerSection allows to declaratively render sections inside the drawer
58
58
  * independantly from the Drawer itself
@@ -66,4 +66,5 @@ export declare function useDrawerActions(): {
66
66
  export declare const useDrawerState: () => {
67
67
  isDrawerOpen: boolean;
68
68
  };
69
+ export { getLgIds as getDrawerIds } from '@leafygreen-ui/drawer';
69
70
  //# sourceMappingURL=drawer-portal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-portal.d.ts","sourceRoot":"","sources":["../../src/components/drawer-portal.tsx"],"names":[],"mappings":"AACA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,WAAW,IAAI,iBAAiB,EAEhC,KAAK,iBAAiB,EACvB,MAAM,UAAU,CAAC;AAKlB,KAAK,WAAW,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,KAAK,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG;IACnE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBA0CzC,CAAC;AAyEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC;IACjD,WAAW,CAAC,EAAE,iBAAiB,CAAC;CACjC,CAoDA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAmDrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,wBAAgB,gBAAgB;qBAGX,MAAM;;EAQ1B;AAED,eAAO,MAAM,cAAc;;CAS1B,CAAC"}
1
+ {"version":3,"file":"drawer-portal.d.ts","sourceRoot":"","sources":["../../src/components/drawer-portal.tsx"],"names":[],"mappings":"AACA,OAAO,KAON,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,WAAW,IAAI,iBAAiB,EAEhC,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAM/B,KAAK,WAAW,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC,aAAa,CAAC,CAAC;AAE9D,KAAK,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAEvC,KAAK,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,CAAC,GAAG;IAKnE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBA0CzC,CAAC;AAgFF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBA2DhC,CAAC;AAWF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CA+DrE,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,wBAAgB,gBAAgB;qBAGX,MAAM;;EAU1B;AAED,eAAO,MAAM,cAAc;;CAS1B,CAAC;AAEF,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
@@ -36,15 +36,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.useDrawerState = exports.DrawerDisplayMode = exports.DrawerSection = exports.DrawerAnchor = exports.DrawerContentProvider = void 0;
39
+ exports.getDrawerIds = exports.useDrawerState = exports.DrawerDisplayMode = exports.DrawerSection = exports.DrawerAnchor = exports.DrawerContentProvider = void 0;
40
40
  exports.useDrawerActions = useDrawerActions;
41
41
  const react_dom_1 = __importDefault(require("react-dom"));
42
42
  const react_1 = __importStar(require("react"));
43
- const drawer_1 = require("./drawer");
43
+ const drawer_1 = require("@leafygreen-ui/drawer");
44
44
  Object.defineProperty(exports, "DrawerDisplayMode", { enumerable: true, get: function () { return drawer_1.DisplayMode; } });
45
45
  const emotion_1 = require("@leafygreen-ui/emotion");
46
46
  const lodash_1 = require("lodash");
47
47
  const rafraf_1 = require("../utils/rafraf");
48
+ const tokens_1 = require("@leafygreen-ui/tokens");
48
49
  const DrawerStateContext = react_1.default.createContext([]);
49
50
  const DrawerOpenStateContext = react_1.default.createContext(false);
50
51
  const DrawerSetOpenStateContext = react_1.default.createContext(() => { });
@@ -144,20 +145,17 @@ const drawerLayoutFixesStyles = (0, emotion_1.css)({
144
145
  overflow: 'auto',
145
146
  },
146
147
  // drawer section
147
- '& > div:nth-child(2)': {
148
- marginTop: -1, // hiding the top border as we already have one in the place where the Anchor is currently rendered
148
+ '& > div:nth-child(2) > div': {
149
+ // hiding the border border as we already have one in the place where the
150
+ // Anchor is currently rendered
151
+ borderTop: 'none',
152
+ borderBottom: 'none',
149
153
  },
150
- // We're stretching the title container to all available width so that we can
151
- // layout the controls there better. Doing our best to target the section
152
- // title here, leafygreen really doesn't give us anything else to try.
153
- //
154
- // TODO(ticket): This is obviously a horrible selector and we should make sure
155
- // that LG team provides a better one for us to achieve this behavior when
156
- // we're removing the vendored version of the drawer
157
- '& > div:nth-child(2) > div:nth-child(2) > div:first-child > div:first-child > div:first-child > div:first-child': {
158
- flex: 'none',
159
- width: 'calc(100% - 28px)', // disallow going over the title size (100 - close button width)
160
- overflow: 'hidden',
154
+ // drawer content > title content
155
+ '& > div:nth-child(2) > div:nth-child(2) > div:nth-child(2) > div:first-child > div:first-child > div:first-child': {
156
+ // fix for the flex parent not allowing flex children to collapse if they
157
+ // are overflowing the container
158
+ minWidth: 0,
161
159
  },
162
160
  });
163
161
  const emptyDrawerLayoutFixesStyles = (0, emotion_1.css)({
@@ -185,11 +183,20 @@ const drawerSectionPortalStyles = (0, emotion_1.css)({
185
183
  minHeight: '100%',
186
184
  height: '100%',
187
185
  });
186
+ // Leafygreen dynamically changes styles of the title group based on whether or
187
+ // not title is a `string` or a `ReactNode`, we want it to consistently have
188
+ // bold title styles no matter what title you provided, so we wrap it in our own
189
+ // container
190
+ const drawerTitleGroupStyles = (0, emotion_1.css)({
191
+ width: '100%',
192
+ fontSize: tokens_1.BaseFontSize.Body2,
193
+ fontWeight: tokens_1.fontWeights.bold,
194
+ });
188
195
  /**
189
196
  * DrawerAnchor component will render the drawer in any place it is rendered.
190
197
  * This component has to wrap any content that Drawer will be shown near
191
198
  */
192
- const DrawerAnchor = ({ displayMode, children }) => {
199
+ const DrawerAnchor = ({ children }) => {
193
200
  const actions = (0, react_1.useContext)(DrawerActionsContext);
194
201
  const drawerSectionItems = (0, react_1.useContext)(DrawerStateContext);
195
202
  const prevDrawerSectionItems = (0, react_1.useRef)([]);
@@ -210,7 +217,9 @@ const DrawerAnchor = ({ displayMode, children }) => {
210
217
  return drawerSectionItems
211
218
  .map((data) => {
212
219
  return {
220
+ hasPadding: false,
213
221
  ...data,
222
+ title: (react_1.default.createElement("div", { key: data.id, className: drawerTitleGroupStyles }, data.title)),
214
223
  content: (react_1.default.createElement("div", { key: data.id, "data-drawer-section": data.id, className: drawerSectionPortalStyles })),
215
224
  };
216
225
  })
@@ -218,19 +227,24 @@ const DrawerAnchor = ({ displayMode, children }) => {
218
227
  return orderB < orderA ? 1 : orderB > orderA ? -1 : 0;
219
228
  });
220
229
  }, [drawerSectionItems]);
221
- return (react_1.default.createElement(drawer_1.DrawerLayout, { displayMode: displayMode ?? drawer_1.DisplayMode.Embedded, toolbarData: toolbarData, className: (0, emotion_1.cx)(drawerLayoutFixesStyles, toolbarData.length === 0 && emptyDrawerLayoutFixesStyles,
230
+ return (react_1.default.createElement(drawer_1.DrawerLayout, { displayMode: drawer_1.DisplayMode.Embedded, resizable: true, toolbarData: toolbarData, className: (0, emotion_1.cx)(drawerLayoutFixesStyles, toolbarData.length === 0 && emptyDrawerLayoutFixesStyles,
222
231
  // classname is the only property leafygreen passes over to the drawer
223
232
  // wrapper component that would allow us to target it
224
233
  'compass-drawer-anchor') },
225
234
  react_1.default.createElement(DrawerContextGrabber, null, children)));
226
235
  };
227
236
  exports.DrawerAnchor = DrawerAnchor;
237
+ function querySectionPortal(parent, id) {
238
+ return (parent?.querySelector(`[data-drawer-section${id ? `=${id}` : ''}]`) ?? null);
239
+ }
228
240
  /**
229
241
  * DrawerSection allows to declaratively render sections inside the drawer
230
242
  * independantly from the Drawer itself
231
243
  */
232
244
  const DrawerSection = ({ children, ...props }) => {
233
- const [portalNode, setPortalNode] = (0, react_1.useState)(null);
245
+ const [portalNode, setPortalNode] = (0, react_1.useState)(() => {
246
+ return querySectionPortal(document, props.id);
247
+ });
234
248
  const actions = (0, react_1.useContext)(DrawerActionsContext);
235
249
  const prevProps = (0, react_1.useRef)();
236
250
  (0, react_1.useEffect)(() => {
@@ -244,12 +258,21 @@ const DrawerSection = ({ children, ...props }) => {
244
258
  if (!drawerEl) {
245
259
  throw new Error('Can not use DrawerSection without DrawerAnchor being mounted on the page');
246
260
  }
247
- setPortalNode(document.querySelector(`[data-drawer-section="${props.id}"]`));
261
+ setPortalNode(querySectionPortal(drawerEl, props.id));
248
262
  const mutationObserver = new MutationObserver((mutations) => {
249
263
  for (const mutation of mutations) {
250
- for (const node of Array.from(mutation.addedNodes)) {
251
- if (node.dataset && node.dataset.drawerSection === props.id) {
252
- setPortalNode(node);
264
+ if (mutation.type === 'childList') {
265
+ for (const node of Array.from(mutation.addedNodes)) {
266
+ // Added node can be either the drawer section portal itself, a
267
+ // parent node containing the section (in that case we won't get an
268
+ // explicit mutation for the section itself), or something
269
+ // completely unrelated, like a text node insert. By searching for
270
+ // the section portal from added node parent element we cover all
271
+ // these cases in one go
272
+ const drawerSectionNode = querySectionPortal(node.parentElement, props.id);
273
+ if (drawerSectionNode) {
274
+ setPortalNode(drawerSectionNode);
275
+ }
253
276
  }
254
277
  }
255
278
  }
@@ -261,7 +284,7 @@ const DrawerSection = ({ children, ...props }) => {
261
284
  return () => {
262
285
  mutationObserver.disconnect();
263
286
  };
264
- }, [actions, props.id]);
287
+ }, [props.id]);
265
288
  (0, react_1.useEffect)(() => {
266
289
  return () => {
267
290
  actions.current.removeToolbarData(props.id);
@@ -277,7 +300,9 @@ function useDrawerActions() {
277
300
  const actions = (0, react_1.useContext)(DrawerActionsContext);
278
301
  const stableActions = (0, react_1.useRef)({
279
302
  openDrawer: (id) => {
280
- actions.current.openDrawer(id);
303
+ (0, rafraf_1.rafraf)(() => {
304
+ actions.current.openDrawer(id);
305
+ });
281
306
  },
282
307
  closeDrawer: () => {
283
308
  actions.current.closeDrawer();
@@ -295,4 +320,6 @@ const useDrawerState = () => {
295
320
  };
296
321
  };
297
322
  exports.useDrawerState = useDrawerState;
323
+ var drawer_2 = require("@leafygreen-ui/drawer");
324
+ Object.defineProperty(exports, "getDrawerIds", { enumerable: true, get: function () { return drawer_2.getLgIds; } });
298
325
  //# sourceMappingURL=drawer-portal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer-portal.js","sourceRoot":"","sources":["../../src/components/drawer-portal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2UA,4CAWC;AAtVD,0DAAiC;AACjC,+CAOe;AAEf,qCAKkB;AA0TT,kGA7TQ,oBAAiB,OA6TR;AAzT1B,oDAAiD;AACjD,mCAAiC;AACjC,4CAAyC;AA6BzC,MAAM,kBAAkB,GAAG,eAAK,CAAC,aAAa,CAAuB,EAAE,CAAC,CAAC;AAEzE,MAAM,sBAAsB,GAC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F,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,OAAO,CAAC;AAC/B,CAAC;AAEM,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,sBAAsB,GAAG,IAAA,kBAAU,EAAC,sBAAsB,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,IAAA,kBAAU,EAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO;QACL,YAAY,EACV,sBAAsB;YACtB,iGAAiG;YACjG,WAAW,CAAC,MAAM,GAAG,CAAC;KACzB,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,cAAc,kBASzB;AAEF,gDAAiE;AAAxD,sGAAA,QAAQ,OAAgB"}
@@ -34,7 +34,6 @@ import Toggle from '@leafygreen-ui/toggle';
34
34
  import Tooltip from '@leafygreen-ui/tooltip';
35
35
  import { H1, H2, H3, Subtitle, Body, InlineCode, InlineKeyCode, Disclaimer, Overline, Label, Description } from '@leafygreen-ui/typography';
36
36
  import { Combobox, ComboboxOption, ComboboxGroup } from '@leafygreen-ui/combobox';
37
- export { getLgIds as getDrawerIds } from './drawer';
38
37
  declare const Icon: {
39
38
  ({ size, ...rest }: Omit<React.ComponentProps<typeof LeafyGreenIcon>, "size"> & {
40
39
  size?: LeafyGreenIconSize | "xsmall" | number;
@@ -1 +1 @@
1
- {"version":3,"file":"leafygreen.d.ts","sourceRoot":"","sources":["../../src/components/leafygreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,IAAI,EAAE,EAAE,QAAQ,EAAE,MA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AU,EACV,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,cAAc,EACnB,QAAQ,EACR,aAAa,EACb,cAAc,GACf,CAAC;AAEF,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,6BAA6B,CAAC;AAE3D,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,oBAAoB,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,4BAA4B,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,gBAAgB,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,oBAAoB,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,iBAAiB,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,qBAAqB,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,oBAAoB,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,mBAAmB,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,eAAe,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,cAAc,MAAM,oBAAoB,CAAC"}
@@ -36,8 +36,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Toggle = exports.TextInput = exports.TextArea = exports.Tabs = exports.Tab = exports.Stage = exports.Cell = exports.Row = exports.TableHead = exports.TableBody = exports.Table = exports.OptionGroup = exports.Option = exports.Select = exports.SegmentedControlOption = exports.SegmentedControl = exports.RadioGroup = exports.Radio = exports.RadioBoxGroup = exports.RadioBox = exports.Popover = exports.Pipeline = exports.MongoDBLogo = exports.MongoDBLogoMark = exports.MarketingModal = exports.ModalFooter = exports.Modal = exports.MenuSeparator = exports.MenuItem = exports.Menu = exports.Language = exports.Icon = exports.HeaderRow = exports.HeaderCell = exports.ExpandedContent = exports.Copyable = exports.ConfirmationModal = exports.Code = exports.Chip = exports.Checkbox = exports.Card = exports.Banner = exports.Badge = exports.AtlasNavGraphic = exports.IconButton = exports.Button = exports.Link = exports.getDrawerIds = exports.useMergeRefs = exports.usePrevious = void 0;
40
- exports.LgChatTitleBar = exports.LgChatSuggestions = exports.LgChatRichLinks = exports.LgChatMessage = exports.LgChatMessageRating = exports.LgChatMessagePrompts = exports.LgChatMessageFeedback = exports.LgChatMessageFeed = exports.LgChatMessageActions = exports.LgChatLgMarkdown = exports.LgChatLeafygreenChatProvider = exports.LgChatInputBar = exports.LgChatFixedChatWindow = exports.LgChatChatWindow = exports.LgChatChatDisclaimer = exports.LgChatAvatar = exports.InputOption = exports.Avatar = exports.ComboboxOption = exports.ComboboxGroup = exports.Combobox = exports.getFilteredRowModel = exports.getExpandedRowModel = exports.useLeafyGreenTable = exports.flexRender = exports.InfoSprinkle = exports.SearchInput = exports.Description = exports.Label = exports.Overline = exports.Disclaimer = exports.InlineKeyCode = exports.InlineCode = exports.Body = exports.Subtitle = exports.H3 = exports.H2 = exports.H1 = exports.Tooltip = void 0;
39
+ exports.Tooltip = exports.Toggle = exports.TextInput = exports.TextArea = exports.Tabs = exports.Tab = exports.Stage = exports.Cell = exports.Row = exports.TableHead = exports.TableBody = exports.Table = exports.OptionGroup = exports.Option = exports.Select = exports.SegmentedControlOption = exports.SegmentedControl = exports.RadioGroup = exports.Radio = exports.RadioBoxGroup = exports.RadioBox = exports.Popover = exports.Pipeline = exports.MongoDBLogo = exports.MongoDBLogoMark = exports.MarketingModal = exports.ModalFooter = exports.Modal = exports.MenuSeparator = exports.MenuItem = exports.Menu = exports.Language = exports.Icon = exports.HeaderRow = exports.HeaderCell = exports.ExpandedContent = exports.Copyable = exports.ConfirmationModal = exports.Code = exports.Chip = exports.Checkbox = exports.Card = exports.Banner = exports.Badge = exports.AtlasNavGraphic = exports.IconButton = exports.Button = exports.Link = exports.useMergeRefs = exports.usePrevious = void 0;
40
+ exports.LgChatTitleBar = exports.LgChatSuggestions = exports.LgChatRichLinks = exports.LgChatMessage = exports.LgChatMessageRating = exports.LgChatMessagePrompts = exports.LgChatMessageFeedback = exports.LgChatMessageFeed = exports.LgChatMessageActions = exports.LgChatLgMarkdown = exports.LgChatLeafygreenChatProvider = exports.LgChatInputBar = exports.LgChatFixedChatWindow = exports.LgChatChatWindow = exports.LgChatChatDisclaimer = exports.LgChatAvatar = exports.InputOption = exports.Avatar = exports.ComboboxOption = exports.ComboboxGroup = exports.Combobox = exports.getFilteredRowModel = exports.getExpandedRowModel = exports.useLeafyGreenTable = exports.flexRender = exports.InfoSprinkle = exports.SearchInput = exports.Description = exports.Label = exports.Overline = exports.Disclaimer = exports.InlineKeyCode = exports.InlineCode = exports.Body = exports.Subtitle = exports.H3 = exports.H2 = exports.H1 = void 0;
41
41
  const react_1 = __importStar(require("react"));
42
42
  // This file exports `@leafygreen-ui` components and wraps some of them.
43
43
  // 1. Import the components we use from leafygreen.
@@ -143,8 +143,6 @@ const combobox_1 = require("@leafygreen-ui/combobox");
143
143
  Object.defineProperty(exports, "Combobox", { enumerable: true, get: function () { return combobox_1.Combobox; } });
144
144
  Object.defineProperty(exports, "ComboboxOption", { enumerable: true, get: function () { return combobox_1.ComboboxOption; } });
145
145
  Object.defineProperty(exports, "ComboboxGroup", { enumerable: true, get: function () { return combobox_1.ComboboxGroup; } });
146
- var drawer_1 = require("./drawer");
147
- Object.defineProperty(exports, "getDrawerIds", { enumerable: true, get: function () { return drawer_1.getLgIds; } });
148
146
  // 2. Wrap and make any changes/workaround to leafygreen components.
149
147
  const Icon = ({ size, ...rest }) => {
150
148
  size = size === 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  {
2
2
  "name": "@mongodb-js/compass-components",
3
- "version": "1.52.1",
3
+ "version": "1.52.2",
4
4
  "description": "React Components used in Compass",
5
5
  "license": "SSPL",
6
6
  "main": "lib/index.js",
@@ -46,7 +46,7 @@
46
46
  "@leafygreen-ui/combobox": "^11.0.2",
47
47
  "@leafygreen-ui/confirmation-modal": "^6.0.2",
48
48
  "@leafygreen-ui/copyable": "^10.0.14",
49
- "@leafygreen-ui/descendants": "^2.1.0",
49
+ "@leafygreen-ui/drawer": "^5.0.3",
50
50
  "@leafygreen-ui/emotion": "^4.0.9",
51
51
  "@leafygreen-ui/guide-cue": "^7.0.2",
52
52
  "@leafygreen-ui/hooks": "^8.3.4",
@@ -55,7 +55,6 @@
55
55
  "@leafygreen-ui/info-sprinkle": "^4.0.2",
56
56
  "@leafygreen-ui/input-option": "^3.0.12",
57
57
  "@leafygreen-ui/leafygreen-provider": "^4.0.2",
58
- "@leafygreen-ui/lib": "^15.3.0",
59
58
  "@leafygreen-ui/logo": "^10.0.2",
60
59
  "@leafygreen-ui/marketing-modal": "^5.0.2",
61
60
  "@leafygreen-ui/menu": "^29.0.5",
@@ -119,6 +118,7 @@
119
118
  },
120
119
  "devDependencies": {
121
120
  "@emotion/css": "^11.11.2",
121
+ "@leafygreen-ui/lib": "^15.3.0",
122
122
  "@mongodb-js/eslint-config-compass": "^1.4.10",
123
123
  "@mongodb-js/mocha-config-compass": "^1.7.1",
124
124
  "@mongodb-js/prettier-config-compass": "^1.2.8",
@@ -142,5 +142,5 @@
142
142
  "publishConfig": {
143
143
  "access": "public"
144
144
  },
145
- "gitHead": "3566310d827fff23154a5b387d20215f4f3c155a"
145
+ "gitHead": "7f8d06c283268f28fbaa38d81178f1acb0ea1d21"
146
146
  }
@@ -1,9 +0,0 @@
1
- export { TOOLBAR_WIDTH } from '../toolbar';
2
- export declare const GRID_AREA: {
3
- drawer: string;
4
- content: string;
5
- toolbar: string;
6
- innerDrawer: string;
7
- };
8
- export declare const PANEL_WIDTH = 432;
9
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,eAAO,MAAM,SAAS;;;;;CAKrB,CAAC;AAEF,eAAO,MAAM,WAAW,MAAM,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PANEL_WIDTH = exports.GRID_AREA = exports.TOOLBAR_WIDTH = void 0;
4
- var toolbar_1 = require("../toolbar");
5
- Object.defineProperty(exports, "TOOLBAR_WIDTH", { enumerable: true, get: function () { return toolbar_1.TOOLBAR_WIDTH; } });
6
- exports.GRID_AREA = {
7
- drawer: 'drawer',
8
- content: 'content',
9
- toolbar: 'toolbar',
10
- innerDrawer: 'inner-drawer',
11
- };
12
- exports.PANEL_WIDTH = 432;
13
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/components/drawer/constants.ts"],"names":[],"mappings":";;;AAAA,sCAA2C;AAAlC,wGAAA,aAAa,OAAA;AAET,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,WAAW,GAAG,GAAG,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare const HEADER_HEIGHT = 48;
2
- export declare const MOBILE_BREAKPOINT = 390;
3
- //# sourceMappingURL=drawer.constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.constants.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MOBILE_BREAKPOINT = exports.HEADER_HEIGHT = void 0;
4
- exports.HEADER_HEIGHT = 48;
5
- exports.MOBILE_BREAKPOINT = 390;
6
- //# sourceMappingURL=drawer.constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.constants.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG,EAAE,CAAC;AACnB,QAAA,iBAAiB,GAAG,GAAG,CAAC"}
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { type DrawerProps } from './drawer.types';
3
- export declare const Drawer: React.ForwardRefExoticComponent<Omit<DrawerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- //# sourceMappingURL=drawer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAQ/D,eAAO,MAAM,MAAM,iGA4JlB,CAAC"}
@@ -1,143 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Drawer = void 0;
40
- const react_1 = __importStar(require("react"));
41
- const react_intersection_observer_1 = require("react-intersection-observer");
42
- const hooks_1 = require("@leafygreen-ui/hooks");
43
- const icon_button_1 = __importDefault(require("@leafygreen-ui/icon-button"));
44
- const leafygreen_provider_1 = __importStar(require("@leafygreen-ui/leafygreen-provider"));
45
- const polymorphic_1 = require("@leafygreen-ui/polymorphic");
46
- const tokens_1 = require("@leafygreen-ui/tokens");
47
- const typography_1 = require("@leafygreen-ui/typography");
48
- const drawer_stack_context_1 = require("../drawer-stack-context");
49
- const utils_1 = require("../utils");
50
- const drawer_styles_1 = require("./drawer.styles");
51
- const drawer_types_1 = require("./drawer.types");
52
- const leafygreen_1 = require("../../leafygreen");
53
- const emotion_1 = require("@leafygreen-ui/emotion");
54
- const noPaddingFixesStyles = (0, emotion_1.css)({
55
- padding: 0,
56
- });
57
- exports.Drawer = (0, react_1.forwardRef)(({ children, className, 'data-lgid': dataLgId, displayMode = drawer_types_1.DisplayMode.Overlay, id: idProp, onClose, open = false, title, hasPadding = true, ...rest }, fwdRef) => {
58
- const { darkMode, theme } = (0, leafygreen_provider_1.useDarkMode)();
59
- const { Component } = (0, polymorphic_1.usePolymorphic)(displayMode === drawer_types_1.DisplayMode.Overlay ? 'dialog' : 'div');
60
- const { getDrawerIndex, registerDrawer, unregisterDrawer } = (0, drawer_stack_context_1.useDrawerStackContext)();
61
- const [shouldAnimate, setShouldAnimate] = (0, react_1.useState)(false);
62
- const ref = (0, react_1.useRef)(null);
63
- const drawerRef = (0, hooks_1.useMergeRefs)([fwdRef, ref]);
64
- const lgIds = (0, utils_1.getLgIds)(dataLgId);
65
- const id = (0, hooks_1.useIdAllocator)({ prefix: 'drawer', id: idProp });
66
- const titleId = (0, hooks_1.useIdAllocator)({ prefix: 'drawer' });
67
- // Track when intercept <span> element is no longer visible to add shadow below drawer header
68
- const { ref: interceptRef, inView: isInterceptInView } = (0, react_intersection_observer_1.useInView)({
69
- initialInView: true,
70
- fallbackInView: true,
71
- });
72
- const showCloseButton = !!onClose;
73
- // This will use the default value of 0 if not wrapped in a DrawerStackProvider. If using a Drawer + Toolbar, the DrawerStackProvider will not be necessary.
74
- const drawerIndex = getDrawerIndex(id);
75
- (0, hooks_1.useIsomorphicLayoutEffect)(() => {
76
- const drawerElement = ref.current;
77
- if (!drawerElement || drawerElement instanceof HTMLDivElement) {
78
- return;
79
- }
80
- if (open) {
81
- drawerElement.show();
82
- setShouldAnimate(true);
83
- }
84
- else {
85
- drawerElement.close();
86
- }
87
- }, [ref, open]);
88
- (0, react_1.useEffect)(() => {
89
- if (open) {
90
- registerDrawer(id);
91
- }
92
- else {
93
- setTimeout(() => unregisterDrawer(id), drawer_styles_1.drawerTransitionDuration);
94
- }
95
- }, [id, open, registerDrawer, unregisterDrawer]);
96
- /**
97
- * Focuses the first focusable element in the drawer when the animation ends. We have to manually handle this because we are hiding the drawer with visibility: hidden, which breaks the default focus behavior of dialog element.
98
- *
99
- */
100
- const handleAnimationEnd = () => {
101
- const drawerElement = ref.current;
102
- // Check if the drawerElement is null or is a div, which means it is not a dialog element.
103
- if (!drawerElement || drawerElement instanceof HTMLDivElement) {
104
- return;
105
- }
106
- if (open) {
107
- const firstFocusable = drawerElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
108
- firstFocusable?.focus();
109
- }
110
- };
111
- return (react_1.default.createElement(leafygreen_provider_1.default, { darkMode: darkMode },
112
- react_1.default.createElement(Component, { "aria-hidden": !open, "aria-labelledby": titleId, className: (0, drawer_styles_1.getDrawerStyles)({
113
- theme,
114
- open,
115
- shouldAnimate,
116
- className,
117
- displayMode,
118
- zIndex: 1000 + drawerIndex,
119
- }), "data-lgid": lgIds.root, "data-testid": lgIds.root, id: id, ref: drawerRef, onAnimationEnd: handleAnimationEnd, inert: !open ? 'inert' : undefined, ...rest },
120
- react_1.default.createElement("div", { className: (0, drawer_styles_1.getDrawerShadowStyles)({ theme, displayMode }) },
121
- react_1.default.createElement("div", { className: (0, drawer_styles_1.getInnerContainerStyles)({
122
- theme,
123
- open,
124
- }) },
125
- react_1.default.createElement("div", { className: (0, drawer_styles_1.getHeaderStyles)({
126
- theme,
127
- }) },
128
- react_1.default.createElement(typography_1.Body, { as: typeof title === 'string' ? 'h2' : 'div', baseFontSize: tokens_1.BaseFontSize.Body2, id: titleId },
129
- react_1.default.createElement("strong", null, title)),
130
- showCloseButton && (react_1.default.createElement(icon_button_1.default, { "aria-label": "Close drawer", "data-lgid": lgIds.closeButton, "data-testid": lgIds.closeButton, onClick: onClose },
131
- react_1.default.createElement(leafygreen_1.Icon, { glyph: "X", size: "small" })))),
132
- react_1.default.createElement("div", { className: (0, drawer_styles_1.getChildrenContainerStyles)({
133
- hasShadowTop: !isInterceptInView,
134
- theme,
135
- }) },
136
- react_1.default.createElement("div", { className: (0, emotion_1.cx)(drawer_styles_1.innerChildrenContainerStyles, {
137
- [noPaddingFixesStyles]: !hasPadding,
138
- }) },
139
- react_1.default.createElement("span", { ref: interceptRef }),
140
- children)))))));
141
- });
142
- exports.Drawer.displayName = 'Drawer';
143
- //# sourceMappingURL=drawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.js","sourceRo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,CAAC,KAAK,EAChC,EAAE,EAAE,OAAO;4BAEX,8CAAS,KAAK,CAAU,CACnB;wBACN,eAAe,IAAI,CAClB,8BAAC,qBAAU,kBACE,cAAc,eACd,KAAK,CAAC,WAAW,iBACf,KAAK,CAAC,WAAW,EAC9B,OAAO,EAAE,OAAO;4BAEhB,8BAAC,iBAAI,IAAC,KAAK,EAAC,GAAG,EAAC,IAAI,EAAC,OAAO,GAAG,CACpB,CACd,CACG;oBACN,uCACE,SAAS,EAAE,IAAA,0CAA0B,EAAC;4BACpC,YAAY,EAAE,CAAC,iBAAiB;4BAChC,KAAK;yBACN,CAAC;wBAEF,uCACE,SAAS,EAAE,IAAA,YAAE,EAAC,4CAA4B,EAAE;gCAC1C,CAAC,oBAAoB,CAAC,EAAE,CAAC,UAAU;6BACpC,CAAC;4BAGD,wCAAM,GAAG,EAAE,YAAY,GAAI;4BAC3B,QAAQ,CACL,CACF,CACF,CACF,CACI,CACO,CACtB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type Theme } from '@leafygreen-ui/lib';
2
- import { DisplayMode } from './drawer.types';
3
- export declare const drawerTransitionDuration: 300;
4
- export declare const drawerClassName: string;
5
- export declare const getDrawerStyles: ({ className, displayMode, open, shouldAnimate, theme, zIndex, }: {
6
- className?: string;
7
- displayMode: DisplayMode;
8
- open: boolean;
9
- shouldAnimate: boolean;
10
- theme: Theme;
11
- zIndex: number;
12
- }) => string;
13
- export declare const getDrawerShadowStyles: ({ theme, displayMode, }: {
14
- theme: Theme;
15
- displayMode: DisplayMode;
16
- }) => string;
17
- export declare const getInnerContainerStyles: ({ theme, open, }: {
18
- theme: Theme;
19
- open: boolean;
20
- }) => string;
21
- export declare const getHeaderStyles: ({ theme }: {
22
- theme: Theme;
23
- }) => string;
24
- export declare const getChildrenContainerStyles: ({ hasShadowTop, theme, }: {
25
- hasShadowTop: boolean;
26
- theme: Theme;
27
- }) => string;
28
- export declare const innerChildrenContainerStyles: string;
29
- //# sourceMappingURL=drawer.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAYvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,eAAO,MAAM,wBAAwB,KAA4B,CAAC;AAElE,eAAO,MAAM,eAAe,QAAqC,CAAC;AAiIlE,eAAO,MAAM,eAAe,GAAI,iEAO7B;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,WAME,CAAC;AAEJ,eAAO,MAAM,qBAAqB,GAAI,yBAGnC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,WAAW,CAAC;CAC1B,WAeE,CAAC;AAsBJ,eAAO,MAAM,uBAAuB,GAAI,kBAGrC;IACD,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,OAAO,CAAC;CACf,WAGG,CAAC;AAEL,eAAO,MAAM,eAAe,GAAI,WAAW;IAAE,KAAK,EAAE,KAAK,CAAA;CAAE,WAU1D,CAAC;AAOF,eAAO,MAAM,0BAA0B,GAAI,0BAGxC;IACD,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,KAAK,CAAC;CACd,WAIG,CAAC;AAYL,eAAO,MAAM,4BAA4B,QAGxC,CAAC"}