@mongodb-js/compass-components 1.52.1 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/lib/components/drawer-portal.d.ts +8 -5
  2. package/lib/components/drawer-portal.d.ts.map +1 -1
  3. package/lib/components/drawer-portal.js +105 -28
  4. package/lib/components/drawer-portal.js.map +1 -1
  5. package/lib/components/guide-cue/guide-cue.d.ts +3 -2
  6. package/lib/components/guide-cue/guide-cue.d.ts.map +1 -1
  7. package/lib/components/guide-cue/guide-cue.js +3 -3
  8. package/lib/components/guide-cue/guide-cue.js.map +1 -1
  9. package/lib/components/leafygreen.d.ts +0 -1
  10. package/lib/components/leafygreen.d.ts.map +1 -1
  11. package/lib/components/leafygreen.js +2 -4
  12. package/lib/components/leafygreen.js.map +1 -1
  13. package/package.json +4 -4
  14. package/lib/components/drawer/constants.d.ts +0 -9
  15. package/lib/components/drawer/constants.d.ts.map +0 -1
  16. package/lib/components/drawer/constants.js +0 -13
  17. package/lib/components/drawer/constants.js.map +0 -1
  18. package/lib/components/drawer/drawer/drawer.constants.d.ts +0 -3
  19. package/lib/components/drawer/drawer/drawer.constants.d.ts.map +0 -1
  20. package/lib/components/drawer/drawer/drawer.constants.js +0 -6
  21. package/lib/components/drawer/drawer/drawer.constants.js.map +0 -1
  22. package/lib/components/drawer/drawer/drawer.d.ts +0 -4
  23. package/lib/components/drawer/drawer/drawer.d.ts.map +0 -1
  24. package/lib/components/drawer/drawer/drawer.js +0 -143
  25. package/lib/components/drawer/drawer/drawer.js.map +0 -1
  26. package/lib/components/drawer/drawer/drawer.styles.d.ts +0 -29
  27. package/lib/components/drawer/drawer/drawer.styles.d.ts.map +0 -1
  28. package/lib/components/drawer/drawer/drawer.styles.js +0 -174
  29. package/lib/components/drawer/drawer/drawer.styles.js.map +0 -1
  30. package/lib/components/drawer/drawer/drawer.types.d.ts +0 -40
  31. package/lib/components/drawer/drawer/drawer.types.d.ts.map +0 -1
  32. package/lib/components/drawer/drawer/drawer.types.js +0 -13
  33. package/lib/components/drawer/drawer/drawer.types.js.map +0 -1
  34. package/lib/components/drawer/drawer/index.d.ts +0 -5
  35. package/lib/components/drawer/drawer/index.d.ts.map +0 -1
  36. package/lib/components/drawer/drawer/index.js +0 -12
  37. package/lib/components/drawer/drawer/index.js.map +0 -1
  38. package/lib/components/drawer/drawer-layout/drawer-layout.d.ts +0 -17
  39. package/lib/components/drawer/drawer-layout/drawer-layout.d.ts.map +0 -1
  40. package/lib/components/drawer/drawer-layout/drawer-layout.js +0 -57
  41. package/lib/components/drawer/drawer-layout/drawer-layout.js.map +0 -1
  42. package/lib/components/drawer/drawer-layout/drawer-layout.types.d.ts +0 -34
  43. package/lib/components/drawer/drawer-layout/drawer-layout.types.d.ts.map +0 -1
  44. package/lib/components/drawer/drawer-layout/drawer-layout.types.js +0 -3
  45. package/lib/components/drawer/drawer-layout/drawer-layout.types.js.map +0 -1
  46. package/lib/components/drawer/drawer-layout/index.d.ts +0 -3
  47. package/lib/components/drawer/drawer-layout/index.d.ts.map +0 -1
  48. package/lib/components/drawer/drawer-layout/index.js +0 -6
  49. package/lib/components/drawer/drawer-layout/index.js.map +0 -1
  50. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.d.ts +0 -8
  51. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.d.ts.map +0 -1
  52. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.js +0 -71
  53. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.js.map +0 -1
  54. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.d.ts +0 -21
  55. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.d.ts.map +0 -1
  56. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.js +0 -3
  57. package/lib/components/drawer/drawer-stack-context/drawer-stack-context.types.js.map +0 -1
  58. package/lib/components/drawer/drawer-stack-context/index.d.ts +0 -3
  59. package/lib/components/drawer/drawer-stack-context/index.d.ts.map +0 -1
  60. package/lib/components/drawer/drawer-stack-context/index.js +0 -8
  61. package/lib/components/drawer/drawer-stack-context/index.js.map +0 -1
  62. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.d.ts +0 -6
  63. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.d.ts.map +0 -1
  64. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.js +0 -85
  65. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.js.map +0 -1
  66. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.d.ts +0 -37
  67. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.d.ts.map +0 -1
  68. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.js +0 -3
  69. package/lib/components/drawer/drawer-toolbar-context/drawer-toolbar-context.types.js.map +0 -1
  70. package/lib/components/drawer/drawer-toolbar-context/index.d.ts +0 -2
  71. package/lib/components/drawer/drawer-toolbar-context/index.d.ts.map +0 -1
  72. package/lib/components/drawer/drawer-toolbar-context/index.js +0 -7
  73. package/lib/components/drawer/drawer-toolbar-context/index.js.map +0 -1
  74. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.d.ts +0 -18
  75. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.d.ts.map +0 -1
  76. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.js +0 -86
  77. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout-container.js.map +0 -1
  78. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.d.ts +0 -15
  79. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.d.ts.map +0 -1
  80. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.js +0 -50
  81. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.js.map +0 -1
  82. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.d.ts +0 -2
  83. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.d.ts.map +0 -1
  84. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.js +0 -11
  85. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.styles.js.map +0 -1
  86. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.d.ts +0 -44
  87. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.d.ts.map +0 -1
  88. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.js +0 -3
  89. package/lib/components/drawer/drawer-toolbar-layout/drawer-toolbar-layout.types.js.map +0 -1
  90. package/lib/components/drawer/drawer-toolbar-layout/index.d.ts +0 -3
  91. package/lib/components/drawer/drawer-toolbar-layout/index.d.ts.map +0 -1
  92. package/lib/components/drawer/drawer-toolbar-layout/index.js +0 -6
  93. package/lib/components/drawer/drawer-toolbar-layout/index.js.map +0 -1
  94. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.d.ts +0 -11
  95. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.d.ts.map +0 -1
  96. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.js +0 -63
  97. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.js.map +0 -1
  98. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.d.ts +0 -10
  99. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.d.ts.map +0 -1
  100. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.js +0 -137
  101. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.js.map +0 -1
  102. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.d.ts +0 -11
  103. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.d.ts.map +0 -1
  104. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.js +0 -3
  105. package/lib/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.js.map +0 -1
  106. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.d.ts +0 -2
  107. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.d.ts.map +0 -1
  108. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.js +0 -6
  109. package/lib/components/drawer/drawer-with-toolbar-wrapper/index.js.map +0 -1
  110. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.d.ts +0 -12
  111. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.d.ts.map +0 -1
  112. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.js +0 -55
  113. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.js.map +0 -1
  114. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.d.ts +0 -6
  115. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.d.ts.map +0 -1
  116. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.js +0 -54
  117. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.js.map +0 -1
  118. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.d.ts +0 -8
  119. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.d.ts.map +0 -1
  120. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.js +0 -3
  121. package/lib/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.js.map +0 -1
  122. package/lib/components/drawer/embedded-drawer-layout/index.d.ts +0 -3
  123. package/lib/components/drawer/embedded-drawer-layout/index.d.ts.map +0 -1
  124. package/lib/components/drawer/embedded-drawer-layout/index.js +0 -6
  125. package/lib/components/drawer/embedded-drawer-layout/index.js.map +0 -1
  126. package/lib/components/drawer/index.d.ts +0 -6
  127. package/lib/components/drawer/index.d.ts.map +0 -1
  128. package/lib/components/drawer/index.js +0 -17
  129. package/lib/components/drawer/index.js.map +0 -1
  130. package/lib/components/drawer/layout-component/index.d.ts +0 -3
  131. package/lib/components/drawer/layout-component/index.d.ts.map +0 -1
  132. package/lib/components/drawer/layout-component/index.js +0 -6
  133. package/lib/components/drawer/layout-component/index.js.map +0 -1
  134. package/lib/components/drawer/layout-component/layout-component.d.ts +0 -18
  135. package/lib/components/drawer/layout-component/layout-component.d.ts.map +0 -1
  136. package/lib/components/drawer/layout-component/layout-component.js +0 -53
  137. package/lib/components/drawer/layout-component/layout-component.js.map +0 -1
  138. package/lib/components/drawer/layout-component/layout-component.styles.d.ts +0 -20
  139. package/lib/components/drawer/layout-component/layout-component.styles.d.ts.map +0 -1
  140. package/lib/components/drawer/layout-component/layout-component.styles.js +0 -3
  141. package/lib/components/drawer/layout-component/layout-component.styles.js.map +0 -1
  142. package/lib/components/drawer/overlay-drawer-layout/index.d.ts +0 -3
  143. package/lib/components/drawer/overlay-drawer-layout/index.d.ts.map +0 -1
  144. package/lib/components/drawer/overlay-drawer-layout/index.js +0 -6
  145. package/lib/components/drawer/overlay-drawer-layout/index.js.map +0 -1
  146. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.d.ts +0 -11
  147. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.d.ts.map +0 -1
  148. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.js +0 -54
  149. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.js.map +0 -1
  150. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.d.ts +0 -5
  151. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.d.ts.map +0 -1
  152. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.js +0 -27
  153. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.styles.js.map +0 -1
  154. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.d.ts +0 -3
  155. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.d.ts.map +0 -1
  156. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.js +0 -3
  157. package/lib/components/drawer/overlay-drawer-layout/overlay-drawer-layout.types.js.map +0 -1
  158. package/lib/components/drawer/utils/get-lg-ids.d.ts +0 -8
  159. package/lib/components/drawer/utils/get-lg-ids.d.ts.map +0 -1
  160. package/lib/components/drawer/utils/get-lg-ids.js +0 -11
  161. package/lib/components/drawer/utils/get-lg-ids.js.map +0 -1
  162. package/lib/components/drawer/utils/index.d.ts +0 -2
  163. package/lib/components/drawer/utils/index.d.ts.map +0 -1
  164. package/lib/components/drawer/utils/index.js +0 -7
  165. package/lib/components/drawer/utils/index.js.map +0 -1
  166. package/lib/components/toolbar/constants.d.ts +0 -3
  167. package/lib/components/toolbar/constants.d.ts.map +0 -1
  168. package/lib/components/toolbar/constants.js +0 -6
  169. package/lib/components/toolbar/constants.js.map +0 -1
  170. package/lib/components/toolbar/context/index.d.ts +0 -3
  171. package/lib/components/toolbar/context/index.d.ts.map +0 -1
  172. package/lib/components/toolbar/context/index.js +0 -10
  173. package/lib/components/toolbar/context/index.js.map +0 -1
  174. package/lib/components/toolbar/context/toolbar-context.d.ts +0 -6
  175. package/lib/components/toolbar/context/toolbar-context.d.ts.map +0 -1
  176. package/lib/components/toolbar/context/toolbar-context.js +0 -65
  177. package/lib/components/toolbar/context/toolbar-context.js.map +0 -1
  178. package/lib/components/toolbar/context/toolbar-context.types.d.ts +0 -21
  179. package/lib/components/toolbar/context/toolbar-context.types.d.ts.map +0 -1
  180. package/lib/components/toolbar/context/toolbar-context.types.js +0 -3
  181. package/lib/components/toolbar/context/toolbar-context.types.js.map +0 -1
  182. package/lib/components/toolbar/context/toolbar-descendants-context.d.ts +0 -5
  183. package/lib/components/toolbar/context/toolbar-descendants-context.d.ts.map +0 -1
  184. package/lib/components/toolbar/context/toolbar-descendants-context.js +0 -10
  185. package/lib/components/toolbar/context/toolbar-descendants-context.js.map +0 -1
  186. package/lib/components/toolbar/index.d.ts +0 -5
  187. package/lib/components/toolbar/index.d.ts.map +0 -1
  188. package/lib/components/toolbar/index.js +0 -27
  189. package/lib/components/toolbar/index.js.map +0 -1
  190. package/lib/components/toolbar/toolbar/index.d.ts +0 -4
  191. package/lib/components/toolbar/toolbar/index.d.ts.map +0 -1
  192. package/lib/components/toolbar/toolbar/index.js +0 -8
  193. package/lib/components/toolbar/toolbar/index.js.map +0 -1
  194. package/lib/components/toolbar/toolbar/toolbar.d.ts +0 -4
  195. package/lib/components/toolbar/toolbar/toolbar.d.ts.map +0 -1
  196. package/lib/components/toolbar/toolbar/toolbar.js +0 -93
  197. package/lib/components/toolbar/toolbar/toolbar.js.map +0 -1
  198. package/lib/components/toolbar/toolbar/toolbar.styles.d.ts +0 -7
  199. package/lib/components/toolbar/toolbar/toolbar.styles.d.ts.map +0 -1
  200. package/lib/components/toolbar/toolbar/toolbar.styles.js +0 -26
  201. package/lib/components/toolbar/toolbar/toolbar.styles.js.map +0 -1
  202. package/lib/components/toolbar/toolbar/toolbar.types.d.ts +0 -6
  203. package/lib/components/toolbar/toolbar/toolbar.types.d.ts.map +0 -1
  204. package/lib/components/toolbar/toolbar/toolbar.types.js +0 -3
  205. package/lib/components/toolbar/toolbar/toolbar.types.js.map +0 -1
  206. package/lib/components/toolbar/toolbar-icon-button/index.d.ts +0 -3
  207. package/lib/components/toolbar/toolbar-icon-button/index.d.ts.map +0 -1
  208. package/lib/components/toolbar/toolbar-icon-button/index.js +0 -6
  209. package/lib/components/toolbar/toolbar-icon-button/index.js.map +0 -1
  210. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.d.ts +0 -4
  211. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.d.ts.map +0 -1
  212. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.js +0 -77
  213. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.js.map +0 -1
  214. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.d.ts +0 -13
  215. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.d.ts.map +0 -1
  216. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.js +0 -38
  217. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.styles.js.map +0 -1
  218. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.d.ts +0 -19
  219. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.d.ts.map +0 -1
  220. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.js +0 -3
  221. package/lib/components/toolbar/toolbar-icon-button/toolbar-icon-button.types.js.map +0 -1
  222. package/lib/components/toolbar/utils/get-lg-ids.d.ts +0 -8
  223. package/lib/components/toolbar/utils/get-lg-ids.d.ts.map +0 -1
  224. package/lib/components/toolbar/utils/get-lg-ids.js +0 -14
  225. package/lib/components/toolbar/utils/get-lg-ids.js.map +0 -1
  226. package/lib/components/toolbar/utils/index.d.ts +0 -2
  227. package/lib/components/toolbar/utils/index.d.ts.map +0 -1
  228. package/lib/components/toolbar/utils/index.js +0 -7
  229. package/lib/components/toolbar/utils/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAK/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,mHAmCpC,CAAC"}
@@ -1,63 +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
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.DrawerWithToolbarWrapper = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const leafygreen_provider_1 = require("@leafygreen-ui/leafygreen-provider");
39
- const drawer_with_toolbar_wrapper_styles_1 = require("./drawer-with-toolbar-wrapper.styles");
40
- /**
41
- * @internal
42
- *
43
- * This layout wrapper is used to position the toolbar and drawer together. When the drawer is open, the toolbar and drawer will shift to the right.
44
- *
45
- * If the drawer is overlay, a box shadow will be applied to the left side of this component.
46
- */
47
- exports.DrawerWithToolbarWrapper = (0, react_1.forwardRef)(({ children, className, isDrawerOpen, displayMode, }, forwardedRef) => {
48
- const { theme } = (0, leafygreen_provider_1.useDarkMode)();
49
- const [shouldAnimate, setShouldAnimate] = (0, react_1.useState)(false);
50
- (0, react_1.useEffect)(() => {
51
- if (isDrawerOpen)
52
- setShouldAnimate(true);
53
- }, [isDrawerOpen]);
54
- return (react_1.default.createElement("div", { ref: forwardedRef, className: (0, drawer_with_toolbar_wrapper_styles_1.getDrawerWithToolbarWrapperStyles)({
55
- className,
56
- isDrawerOpen,
57
- shouldAnimate,
58
- displayMode,
59
- theme,
60
- }) }, children));
61
- });
62
- exports.DrawerWithToolbarWrapper.displayName = 'DrawerWithToolbarWrapper';
63
- //# sourceMappingURL=drawer-with-toolbar-wrapper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+D;AAE/D,4EAAiE;AAEjE,6FAAyF;AAGzF;;;;;;GAMG;AACU,QAAA,wBAAwB,GAAG,IAAA,kBAAU,EAIhD,CACE,EACE,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,GACmB,EAChC,YAAY,EACZ,EAAE;IACF,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,iCAAW,GAAE,CAAC;IAChC,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE1D,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,YAAY;YAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,uCACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,IAAA,sEAAiC,EAAC;YAC3C,SAAS;YACT,YAAY;YACZ,aAAa;YACb,WAAW;YACX,KAAK;SACN,CAAC,IAED,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gCAAwB,CAAC,WAAW,GAAG,0BAA0B,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { Theme } from '@leafygreen-ui/lib';
2
- import { DisplayMode } from '../drawer/drawer.types';
3
- export declare const getDrawerWithToolbarWrapperStyles: ({ className, isDrawerOpen, shouldAnimate, displayMode, theme, }: {
4
- className?: string;
5
- isDrawerOpen: boolean;
6
- shouldAnimate?: boolean;
7
- displayMode: DisplayMode;
8
- theme: Theme;
9
- }) => string;
10
- //# sourceMappingURL=drawer-with-toolbar-wrapper.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAUhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAwIrD,eAAO,MAAM,iCAAiC,GAAI,iEAM/C;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC;CACd,WAWE,CAAC"}
@@ -1,137 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDrawerWithToolbarWrapperStyles = void 0;
4
- const emotion_1 = require("@leafygreen-ui/emotion");
5
- const tokens_1 = require("@leafygreen-ui/tokens");
6
- const toolbar_1 = require("../../toolbar");
7
- const constants_1 = require("../constants");
8
- const constants_2 = require("../constants");
9
- const drawer_styles_1 = require("../drawer/drawer.styles");
10
- const drawer_types_1 = require("../drawer/drawer.types");
11
- const MOBILE_BREAKPOINT = tokens_1.breakpoints.Tablet;
12
- const SHADOW_WIDTH = 36; // Width of the shadow padding on the left side
13
- const drawerIn = (0, emotion_1.keyframes) `
14
- from {
15
- // Because of .show() and .close() in the drawer component, transitioning from 0px to (x)px does not transition correctly. Using 1px along with css animations is a workaround to get the animation to work.
16
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px 1px;
17
- }
18
- to {
19
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px ${constants_2.PANEL_WIDTH}px;
20
- }
21
- `;
22
- const drawerOut = (0, emotion_1.keyframes) `
23
- from {
24
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px ${constants_2.PANEL_WIDTH}px;
25
- }
26
- to {
27
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px 0px;
28
- }
29
- `;
30
- const drawerOutMobile = (0, emotion_1.keyframes) `
31
- from {
32
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px calc(100vw - ${constants_2.TOOLBAR_WIDTH * 2}px);
33
- }
34
- to {
35
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px 0px;
36
- }
37
- `;
38
- const drawerInMobile = (0, emotion_1.keyframes) `
39
- from {
40
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px 1px;
41
- }
42
- to {
43
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px calc(100vw - ${constants_2.TOOLBAR_WIDTH * 2}px);
44
- }
45
- `;
46
- // This animation is used to animate the padding of the drawer when it closes, so that the padding does not block the content underneath it.
47
- const drawerPaddingOut = (0, emotion_1.keyframes) `
48
- 0% {
49
- padding-left: ${SHADOW_WIDTH}px;
50
- }
51
- 99% {
52
- padding-left: ${SHADOW_WIDTH}px;
53
- }
54
- 100% {
55
- padding-left: 0px;
56
- }
57
- `;
58
- const openStyles = (0, emotion_1.css) `
59
- animation-name: ${drawerIn};
60
- animation-fill-mode: forwards;
61
-
62
- @media only screen and (max-width: ${MOBILE_BREAKPOINT}px) {
63
- animation-name: ${drawerInMobile};
64
- }
65
- `;
66
- const closedStyles = (0, emotion_1.css) `
67
- animation-name: ${drawerOut};
68
-
69
- @media only screen and (max-width: ${MOBILE_BREAKPOINT}px) {
70
- animation-name: ${drawerOutMobile};
71
- }
72
- `;
73
- const getDrawerShadowStyles = ({ theme }) => (0, emotion_1.css) `
74
- ${(0, tokens_1.addOverflowShadow)({ isInside: false, side: tokens_1.Side.Left, theme })};
75
-
76
- // Need this to show the box shadow since we are using overflow: hidden
77
- padding-left: ${SHADOW_WIDTH}px;
78
-
79
- &::before {
80
- transition-property: opacity;
81
- transition-duration: ${drawer_styles_1.drawerTransitionDuration}ms;
82
- transition-timing-function: ease-in-out;
83
- opacity: 1;
84
- left: ${SHADOW_WIDTH}px;
85
- }
86
- `;
87
- const baseStyles = (0, emotion_1.css) `
88
- display: grid;
89
- grid-template-columns: ${constants_2.TOOLBAR_WIDTH}px 0px;
90
- grid-template-areas: '${constants_1.GRID_AREA.toolbar} ${constants_1.GRID_AREA.innerDrawer}';
91
- grid-area: ${constants_1.GRID_AREA.drawer};
92
- justify-self: end;
93
- animation-timing-function: ease-in-out;
94
- animation-duration: ${drawer_styles_1.drawerTransitionDuration}ms;
95
- z-index: 0;
96
- height: 100%;
97
- overflow: hidden;
98
-
99
- .${toolbar_1.toolbarClassName} {
100
- grid-area: ${constants_1.GRID_AREA.toolbar};
101
- }
102
-
103
- .${drawer_styles_1.drawerClassName} {
104
- grid-area: ${constants_1.GRID_AREA.innerDrawer};
105
- position: unset;
106
- transition: none;
107
- transform: unset;
108
- overflow: hidden;
109
- opacity: 1;
110
- border-left: 0;
111
- border-right: 0;
112
- height: 100%;
113
- animation: none;
114
-
115
- > div::before {
116
- box-shadow: unset;
117
- }
118
- }
119
- `;
120
- const closedDrawerShadowStyles = (0, emotion_1.css) `
121
- padding-left: 0;
122
- animation-name: ${drawerPaddingOut};
123
- animation-timing-function: ease-in-out;
124
- animation-duration: ${drawer_styles_1.drawerTransitionDuration}ms;
125
-
126
- ::before {
127
- opacity: 0;
128
- }
129
- `;
130
- const getDrawerWithToolbarWrapperStyles = ({ className, isDrawerOpen, shouldAnimate, displayMode, theme, }) => (0, emotion_1.cx)(baseStyles, {
131
- [getDrawerShadowStyles({ theme })]: displayMode === drawer_types_1.DisplayMode.Overlay,
132
- [closedDrawerShadowStyles]: displayMode === drawer_types_1.DisplayMode.Overlay && !isDrawerOpen,
133
- [openStyles]: isDrawerOpen,
134
- [closedStyles]: !isDrawerOpen && shouldAnimate, // This ensures that the drawer does not animate closed on initial render
135
- }, className);
136
- exports.getDrawerWithToolbarWrapperStyles = getDrawerWithToolbarWrapperStyles;
137
- //# sourceMappingURL=drawer-with-toolbar-wrapper.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.styles.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.styles.ts"],"names":[],"mappings":";;;AAAA,oDAA4D;AAE5D,kDAA6E;AAC7E,2CAAiD;AAEjD,4CAAyC;AACzC,4CAA0D;AAC1D,2DAGiC;AACjC,yDAAqD;AAErD,MAAM,iBAAiB,GAAG,oBAAW,CAAC,MAAM,CAAC;AAC7C,MAAM,YAAY,GAAG,EAAE,CAAC,CAAC,+CAA+C;AAExE,MAAM,QAAQ,GAAG,IAAA,mBAAS,EAAA;;;6BAGG,yBAAa;;;6BAGb,yBAAa,MAAM,uBAAW;;CAE1D,CAAC;AAEF,MAAM,SAAS,GAAG,IAAA,mBAAS,EAAA;;6BAEE,yBAAa,MAAM,uBAAW;;;6BAG9B,yBAAa;;CAEzC,CAAC;AAEF,MAAM,eAAe,GAAG,IAAA,mBAAS,EAAA;;6BAEJ,yBAAa,mBACxC,yBAAa,GAAG,CAClB;;;6BAG6B,yBAAa;;CAEzC,CAAC;AAEF,MAAM,cAAc,GAAG,IAAA,mBAAS,EAAA;;6BAEH,yBAAa;;;6BAGb,yBAAa,mBACxC,yBAAa,GAAG,CAClB;;CAEC,CAAC;AAEF,4IAA4I;AAC5I,MAAM,gBAAgB,GAAG,IAAA,mBAAS,EAAA;;oBAEd,YAAY;;;oBAGZ,YAAY;;;;;CAK/B,CAAC;AAEF,MAAM,UAAU,GAAG,IAAA,aAAG,EAAA;oBACF,QAAQ;;;uCAGW,iBAAiB;sBAClC,cAAc;;CAEnC,CAAC;AAEF,MAAM,YAAY,GAAG,IAAA,aAAG,EAAA;oBACJ,SAAS;;uCAEU,iBAAiB;sBAClC,eAAe;;CAEpC,CAAC;AAEF,MAAM,qBAAqB,GAAG,CAAC,EAAE,KAAK,EAAoB,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA;IAC9D,IAAA,0BAAiB,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,aAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;;;kBAGhD,YAAY;;;;2BAIH,wCAAwB;;;YAGvC,YAAY;;CAEvB,CAAC;AAEF,MAAM,UAAU,GAAG,IAAA,aAAG,EAAA;;2BAEK,yBAAa;0BACd,qBAAS,CAAC,OAAO,IAAI,qBAAS,CAAC,WAAW;eACrD,qBAAS,CAAC,MAAM;;;wBAGP,wCAAwB;;;;;KAK3C,0BAAgB;iBACJ,qBAAS,CAAC,OAAO;;;KAG7B,+BAAe;iBACH,qBAAS,CAAC,WAAW;;;;;;;;;;;;;;;CAerC,CAAC;AAEF,MAAM,wBAAwB,GAAG,IAAA,aAAG,EAAA;;oBAEhB,gBAAgB;;wBAEZ,wCAAwB;;;;;CAK/C,CAAC;AAEK,MAAM,iCAAiC,GAAG,CAAC,EAChD,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,KAAK,GAON,EAAE,EAAE,CACH,IAAA,YAAE,EACA,UAAU,EACV;IACE,CAAC,qBAAqB,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,0BAAW,CAAC,OAAO;IACvE,CAAC,wBAAwB,CAAC,EACxB,WAAW,KAAK,0BAAW,CAAC,OAAO,IAAI,CAAC,YAAY;IACtD,CAAC,UAAU,CAAC,EAAE,YAAY;IAC1B,CAAC,YAAY,CAAC,EAAE,CAAC,YAAY,IAAI,aAAa,EAAE,yEAAyE;CAC1H,EACD,SAAS,CACV,CAAC;AAvBS,QAAA,iCAAiC,qCAuB1C"}
@@ -1,11 +0,0 @@
1
- import type { HTMLElementProps } from '@leafygreen-ui/lib';
2
- import type { DrawerProps } from '../drawer/drawer.types';
3
- type PickedDrawerProps = Required<Pick<DrawerProps, 'displayMode'>>;
4
- export interface DrawerWithToolbarWrapperProps extends HTMLElementProps<'div'>, PickedDrawerProps {
5
- /**
6
- * Determines if the Drawer instance is open or closed
7
- */
8
- isDrawerOpen: boolean;
9
- }
10
- export {};
11
- //# sourceMappingURL=drawer-with-toolbar-wrapper.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC,CAAC;AAEpE,MAAM,WAAW,6BACf,SAAQ,gBAAgB,CAAC,KAAK,CAAC,EAC7B,iBAAiB;IACnB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=drawer-with-toolbar-wrapper.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-with-toolbar-wrapper.types.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/drawer-with-toolbar-wrapper.types.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export { DrawerWithToolbarWrapper } from './drawer-with-toolbar-wrapper';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DrawerWithToolbarWrapper = void 0;
4
- var drawer_with_toolbar_wrapper_1 = require("./drawer-with-toolbar-wrapper");
5
- Object.defineProperty(exports, "DrawerWithToolbarWrapper", { enumerable: true, get: function () { return drawer_with_toolbar_wrapper_1.DrawerWithToolbarWrapper; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-with-toolbar-wrapper/index.ts"],"names":[],"mappings":";;;AAAA,6EAAyE;AAAhE,uIAAA,wBAAwB,OAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import type { EmbeddedDrawerLayoutProps } from './embedded-drawer-layout.types';
3
- /**
4
- * @internal
5
- *
6
- * This layout wrapper is used to create a layout that has 2 grid columns. The main content is on the left and the drawer is on the right.
7
- *
8
- * Since this layout is used for embedded drawers, when the drawer is open, the layout will shift to the right by the width of the drawer + toolbar if it exists.
9
- *
10
- */
11
- export declare const EmbeddedDrawerLayout: React.ForwardRefExoticComponent<Omit<EmbeddedDrawerLayoutProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
- //# sourceMappingURL=embedded-drawer-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,+GA0BhC,CAAC"}
@@ -1,55 +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
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.EmbeddedDrawerLayout = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const embedded_drawer_layout_styles_1 = require("./embedded-drawer-layout.styles");
39
- /**
40
- * @internal
41
- *
42
- * This layout wrapper is used to create a layout that has 2 grid columns. The main content is on the left and the drawer is on the right.
43
- *
44
- * Since this layout is used for embedded drawers, when the drawer is open, the layout will shift to the right by the width of the drawer + toolbar if it exists.
45
- *
46
- */
47
- exports.EmbeddedDrawerLayout = (0, react_1.forwardRef)(({ children, className, isDrawerOpen = false, hasToolbar = false, }, forwardedRef) => {
48
- return (react_1.default.createElement("div", { ref: forwardedRef, className: (0, embedded_drawer_layout_styles_1.getEmbeddedDrawerLayoutStyles)({
49
- className,
50
- isDrawerOpen,
51
- hasToolbar,
52
- }) }, children));
53
- });
54
- exports.EmbeddedDrawerLayout.displayName = 'EmbeddedDrawerLayout';
55
- //# sourceMappingURL=embedded-drawer-layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.js","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,mFAAgF;AAGhF;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAG,IAAA,kBAAU,EAI5C,CACE,EACE,QAAQ,EACR,SAAS,EACT,YAAY,GAAG,KAAK,EACpB,UAAU,GAAG,KAAK,GACQ,EAC5B,YAAY,EACZ,EAAE;IACF,OAAO,CACL,uCACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,IAAA,6DAA6B,EAAC;YACvC,SAAS;YACT,YAAY;YACZ,UAAU;SACX,CAAC,IAED,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,4BAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC"}
@@ -1,6 +0,0 @@
1
- export declare const getEmbeddedDrawerLayoutStyles: ({ className, isDrawerOpen, hasToolbar, }: {
2
- className?: string;
3
- isDrawerOpen: boolean;
4
- hasToolbar?: boolean;
5
- }) => string;
6
- //# sourceMappingURL=embedded-drawer-layout.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.ts"],"names":[],"mappings":"AAkDA,eAAO,MAAM,6BAA6B,GAAI,0CAI3C;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,WAUE,CAAC"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getEmbeddedDrawerLayoutStyles = void 0;
4
- const emotion_1 = require("@leafygreen-ui/emotion");
5
- const tokens_1 = require("@leafygreen-ui/tokens");
6
- const constants_1 = require("../constants");
7
- const constants_2 = require("../constants");
8
- const drawer_1 = require("../drawer");
9
- const drawer_styles_1 = require("../drawer/drawer.styles");
10
- const baseStyles = (0, emotion_1.css) `
11
- width: 100%;
12
- display: grid;
13
- grid-template-columns: auto 0;
14
- transition-property: grid-template-columns, grid-template-rows;
15
- transition-timing-function: ease-in-out;
16
- transition-duration: ${drawer_styles_1.drawerTransitionDuration}ms;
17
- overflow: hidden;
18
- position: relative;
19
- height: 100%;
20
- `;
21
- const drawerBaseStyles = (0, emotion_1.css) `
22
- @media only screen and (max-width: ${drawer_1.MOBILE_BREAKPOINT}px) {
23
- grid-template-columns: unset;
24
- grid-template-rows: 100% 0;
25
- }
26
- `;
27
- // If there is no toolbar and the drawer is open, we need to shift the layout by the panel width;
28
- const drawerOpenStyles = (0, emotion_1.css) `
29
- grid-template-columns: auto ${constants_2.PANEL_WIDTH}px;
30
-
31
- @media only screen and (max-width: ${drawer_1.MOBILE_BREAKPOINT}px) {
32
- grid-template-rows: 50% 50%;
33
- }
34
- `;
35
- const withToolbarBaseStyles = (0, emotion_1.css) `
36
- grid-template-columns: auto ${constants_2.TOOLBAR_WIDTH}px;
37
- grid-template-areas: '${constants_1.GRID_AREA.content} ${constants_1.GRID_AREA.drawer}';
38
- `;
39
- // If there is a toolbar and the drawer is open, we need to shift the layout by toolbar width + panel width;
40
- const withToolbarOpenStyles = (0, emotion_1.css) `
41
- grid-template-columns: auto ${constants_2.PANEL_WIDTH + constants_2.TOOLBAR_WIDTH}px;
42
-
43
- @media only screen and (max-width: ${tokens_1.breakpoints.Tablet}px) {
44
- grid-template-columns: auto ${constants_2.TOOLBAR_WIDTH}px;
45
- }
46
- `;
47
- const getEmbeddedDrawerLayoutStyles = ({ className, isDrawerOpen, hasToolbar = false, }) => (0, emotion_1.cx)(baseStyles, {
48
- [withToolbarBaseStyles]: hasToolbar,
49
- [withToolbarOpenStyles]: isDrawerOpen && hasToolbar,
50
- [drawerBaseStyles]: !hasToolbar,
51
- [drawerOpenStyles]: isDrawerOpen && !hasToolbar,
52
- }, className);
53
- exports.getEmbeddedDrawerLayoutStyles = getEmbeddedDrawerLayoutStyles;
54
- //# sourceMappingURL=embedded-drawer-layout.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.styles.js","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.styles.ts"],"names":[],"mappings":";;;AAAA,oDAAiD;AACjD,kDAAoD;AAEpD,4CAAyC;AACzC,4CAA0D;AAC1D,sCAA8C;AAC9C,2DAAmE;AAEnE,MAAM,UAAU,GAAG,IAAA,aAAG,EAAA;;;;;;yBAMG,wCAAwB;;;;CAIhD,CAAC;AAEF,MAAM,gBAAgB,GAAG,IAAA,aAAG,EAAA;uCACW,0BAAiB;;;;CAIvD,CAAC;AAEF,iGAAiG;AACjG,MAAM,gBAAgB,GAAG,IAAA,aAAG,EAAA;gCACI,uBAAW;;uCAEJ,0BAAiB;;;CAGvD,CAAC;AAEF,MAAM,qBAAqB,GAAG,IAAA,aAAG,EAAA;gCACD,yBAAa;0BACnB,qBAAS,CAAC,OAAO,IAAI,qBAAS,CAAC,MAAM;CAC9D,CAAC;AAEF,4GAA4G;AAC5G,MAAM,qBAAqB,GAAG,IAAA,aAAG,EAAA;gCACD,uBAAW,GAAG,yBAAa;;uCAEpB,oBAAW,CAAC,MAAM;kCACvB,yBAAa;;CAE9C,CAAC;AAEK,MAAM,6BAA6B,GAAG,CAAC,EAC5C,SAAS,EACT,YAAY,EACZ,UAAU,GAAG,KAAK,GAKnB,EAAE,EAAE,CACH,IAAA,YAAE,EACA,UAAU,EACV;IACE,CAAC,qBAAqB,CAAC,EAAE,UAAU;IACnC,CAAC,qBAAqB,CAAC,EAAE,YAAY,IAAI,UAAU;IACnD,CAAC,gBAAgB,CAAC,EAAE,CAAC,UAAU;IAC/B,CAAC,gBAAgB,CAAC,EAAE,YAAY,IAAI,CAAC,UAAU;CAChD,EACD,SAAS,CACV,CAAC;AAlBS,QAAA,6BAA6B,iCAkBtC"}
@@ -1,8 +0,0 @@
1
- import type { BaseLayoutComponentProps } from '../layout-component/layout-component.styles';
2
- export type EmbeddedDrawerLayoutProps = BaseLayoutComponentProps & {
3
- /**
4
- * Determines if the Drawer is open. This will shift the layout to the right by the width of the drawer + toolbar if it exists if the display mode is set to 'embedded'.
5
- */
6
- isDrawerOpen?: boolean;
7
- };
8
- //# sourceMappingURL=embedded-drawer-layout.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,MAAM,MAAM,yBAAyB,GAAG,wBAAwB,GAAG;IACjE;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=embedded-drawer-layout.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embedded-drawer-layout.types.js","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/embedded-drawer-layout.types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export { EmbeddedDrawerLayout } from './embedded-drawer-layout';
2
- export { type EmbeddedDrawerLayoutProps } from './embedded-drawer-layout.types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EmbeddedDrawerLayout = void 0;
4
- var embedded_drawer_layout_1 = require("./embedded-drawer-layout");
5
- Object.defineProperty(exports, "EmbeddedDrawerLayout", { enumerable: true, get: function () { return embedded_drawer_layout_1.EmbeddedDrawerLayout; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/embedded-drawer-layout/index.tsx"],"names":[],"mappings":";;;AAAA,mEAAgE;AAAvD,8HAAA,oBAAoB,OAAA"}
@@ -1,6 +0,0 @@
1
- export { DisplayMode, Drawer, drawerClassName, type DrawerProps, } from './drawer';
2
- export { DrawerLayout, type DrawerLayoutProps } from './drawer-layout';
3
- export { DrawerStackProvider, useDrawerStackContext, } from './drawer-stack-context';
4
- export { useDrawerToolbarContext } from './drawer-toolbar-context';
5
- export { getLgIds } from './utils';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,MAAM,EACN,eAAe,EACf,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLgIds = exports.useDrawerToolbarContext = exports.useDrawerStackContext = exports.DrawerStackProvider = exports.DrawerLayout = exports.drawerClassName = exports.Drawer = exports.DisplayMode = void 0;
4
- var drawer_1 = require("./drawer");
5
- Object.defineProperty(exports, "DisplayMode", { enumerable: true, get: function () { return drawer_1.DisplayMode; } });
6
- Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_1.Drawer; } });
7
- Object.defineProperty(exports, "drawerClassName", { enumerable: true, get: function () { return drawer_1.drawerClassName; } });
8
- var drawer_layout_1 = require("./drawer-layout");
9
- Object.defineProperty(exports, "DrawerLayout", { enumerable: true, get: function () { return drawer_layout_1.DrawerLayout; } });
10
- var drawer_stack_context_1 = require("./drawer-stack-context");
11
- Object.defineProperty(exports, "DrawerStackProvider", { enumerable: true, get: function () { return drawer_stack_context_1.DrawerStackProvider; } });
12
- Object.defineProperty(exports, "useDrawerStackContext", { enumerable: true, get: function () { return drawer_stack_context_1.useDrawerStackContext; } });
13
- var drawer_toolbar_context_1 = require("./drawer-toolbar-context");
14
- Object.defineProperty(exports, "useDrawerToolbarContext", { enumerable: true, get: function () { return drawer_toolbar_context_1.useDrawerToolbarContext; } });
15
- var utils_1 = require("./utils");
16
- Object.defineProperty(exports, "getLgIds", { enumerable: true, get: function () { return utils_1.getLgIds; } });
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/drawer/index.ts"],"names":[],"mappings":";;;AAAA,mCAKkB;AAJhB,qGAAA,WAAW,OAAA;AACX,gGAAA,MAAM,OAAA;AACN,yGAAA,eAAe,OAAA;AAGjB,iDAAuE;AAA9D,6GAAA,YAAY,OAAA;AACrB,+DAGgC;AAF9B,2HAAA,mBAAmB,OAAA;AACnB,6HAAA,qBAAqB,OAAA;AAEvB,mEAAmE;AAA1D,iIAAA,uBAAuB,OAAA;AAChC,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA"}
@@ -1,3 +0,0 @@
1
- export { LayoutComponent } from './layout-component';
2
- export { type LayoutComponentProps } from './layout-component.styles';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/layout-component/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LayoutComponent = void 0;
4
- var layout_component_1 = require("./layout-component");
5
- Object.defineProperty(exports, "LayoutComponent", { enumerable: true, get: function () { return layout_component_1.LayoutComponent; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/layout-component/index.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAA5C,mHAAA,eAAe,OAAA"}
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import { DisplayMode } from '../drawer';
3
- /**
4
- * @internal
5
- *
6
- * LayoutComponent is a wrapper component that provides a layout for displaying content with a drawer.
7
- * It can be used in both overlay and embedded modes.
8
- */
9
- export declare const LayoutComponent: React.ForwardRefExoticComponent<(Omit<{
10
- displayMode: DisplayMode;
11
- } & import("@leafygreen-ui/lib").DarkModeProps & import("./layout-component.styles").BaseLayoutComponentProps & {
12
- isDrawerOpen?: boolean;
13
- }, "ref"> | Omit<{
14
- displayMode: DisplayMode;
15
- } & import("@leafygreen-ui/lib").DarkModeProps & import("./layout-component.styles").BaseLayoutComponentProps & {
16
- isDrawerOpen?: never;
17
- }, "ref">) & React.RefAttributes<HTMLDivElement>>;
18
- //# sourceMappingURL=layout-component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout-component.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/layout-component/layout-component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAM1C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAMxC;;;;;GAKG;AACH,eAAO,MAAM,eAAe;;;;;;;;iDA+B3B,CAAC"}
@@ -1,53 +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
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.LayoutComponent = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const leafygreen_provider_1 = __importStar(require("@leafygreen-ui/leafygreen-provider"));
39
- const drawer_1 = require("../drawer");
40
- const embedded_drawer_layout_1 = require("../embedded-drawer-layout");
41
- const overlay_drawer_layout_1 = require("../overlay-drawer-layout");
42
- /**
43
- * @internal
44
- *
45
- * LayoutComponent is a wrapper component that provides a layout for displaying content with a drawer.
46
- * It can be used in both overlay and embedded modes.
47
- */
48
- exports.LayoutComponent = (0, react_1.forwardRef)(({ children, displayMode, darkMode: darkModeProp, isDrawerOpen = false, ...rest }, forwardRef) => {
49
- const { darkMode } = (0, leafygreen_provider_1.useDarkMode)(darkModeProp);
50
- return (react_1.default.createElement(leafygreen_provider_1.default, { darkMode: darkMode }, displayMode === drawer_1.DisplayMode.Overlay ? (react_1.default.createElement(overlay_drawer_layout_1.OverlayDrawerLayout, { ref: forwardRef, ...rest }, children)) : (react_1.default.createElement(embedded_drawer_layout_1.EmbeddedDrawerLayout, { ref: forwardRef, isDrawerOpen: isDrawerOpen, ...rest }, children))));
51
- });
52
- exports.LayoutComponent.displayName = 'LayoutComponent';
53
- //# sourceMappingURL=layout-component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layout-component.js","sourceRoot":"","sources":["../../../../src/components/drawer/layout-component/layout-component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,0FAE4C;AAE5C,sCAAwC;AACxC,sEAAiE;AACjE,oEAA+D;AAI/D;;;;;GAKG;AACU,QAAA,eAAe,GAAG,IAAA,kBAAU,EACvC,CACE,EACE,QAAQ,EACR,WAAW,EACX,QAAQ,EAAE,YAAY,EACtB,YAAY,GAAG,KAAK,EACpB,GAAG,IAAI,EACc,EACvB,UAAU,EACV,EAAE;IACF,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,iCAAW,EAAC,YAAY,CAAC,CAAC;IAE/C,OAAO,CACL,8BAAC,6BAAkB,IAAC,QAAQ,EAAE,QAAQ,IACnC,WAAW,KAAK,oBAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CACrC,8BAAC,2CAAmB,IAAC,GAAG,EAAE,UAAU,KAAM,IAAI,IAC3C,QAAQ,CACW,CACvB,CAAC,CAAC,CAAC,CACF,8BAAC,6CAAoB,IACnB,GAAG,EAAE,UAAU,EACf,YAAY,EAAE,YAAY,KACtB,IAAI,IAEP,QAAQ,CACY,CACxB,CACkB,CACtB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,uBAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { DarkModeProps, HTMLElementProps } from '@leafygreen-ui/lib';
2
- import type { DisplayMode } from '../drawer';
3
- import type { EmbeddedDrawerLayoutProps } from '../embedded-drawer-layout';
4
- import type { OverlayDrawerLayoutProps } from '../overlay-drawer-layout';
5
- export type LayoutComponentProps = {
6
- displayMode: DisplayMode;
7
- } & DarkModeProps & (EmbeddedDrawerLayoutProps | (OverlayDrawerLayoutProps & {
8
- isDrawerOpen?: never;
9
- }));
10
- export interface BaseLayoutComponentProps extends Omit<HTMLElementProps<'div'>, 'children'> {
11
- /**
12
- * Determines if the Toolbar is present in the layout
13
- */
14
- hasToolbar?: boolean;
15
- /**
16
- * The content to be rendered inside the Drawer
17
- */
18
- children: React.ReactNode;
19
- }
20
- //# sourceMappingURL=layout-component.styles.d.ts.map